mise API - v0.0.0
    Preparing search index...

    Class HeadlessSurface

    The default surface for a host that has not installed one: it can do nothing interactive and says so clearly. This is the correct default for an unknown host — a CLI host replaces it (see ./cliSurface.js), and any attempt to prompt or edit before a real surface is installed fails loudly instead of hanging.

    Implements

    Index
    capabilities: SurfaceCapabilities = ...

    What this surface can do; read by builtins before they interact.

    • Places one file where this surface's operator can reach it.

      The mechanics are the surface's: a write to the resolved path for the local CLI, a write on the client machine for a remote CLI, a saved file for a browser. A daemon never writes to its own disk on a surface's behalf, for the same reason it never spawns a shell there.

      Parameters

      Returns Promise<FileDeliverResult>

      Where it landed and how large it was.

      When the surface lacks fileDelivery.

    • Opens content in the surface's local editor and returns the result. The editor mechanics are the surface's business — a temp file and $EDITOR for the local CLI, the client's editor for a remote CLI, an editor component in a browser.

      Parameters

      Returns Promise<LocalEditResult>

      The edited content and whether it changed.

      When the surface lacks the localEdit capability.

    • Runs one pipeline segment against an input, returning its output. Where this runs is the surface's business — in-process for the local CLI, on the client machine for a remote CLI — but never on a daemon host.

      Parameters

      • _command: string

        The segment command line (e.g. grep foo).

      • _input: Buffer

        The bytes to feed the segment on stdin.

      • Optional_signal: AbortSignal

        Aborted when the operator cancels the command; a surface that started a process kills it.

      Returns Promise<Buffer<ArrayBufferLike>>

      The segment's stdout.

      When the surface lacks the pipeSegments capability.

    • Prompts for a line of input.

      Parameters

      • _request: PromptRequest

        The prompt message and whether to hide the input.

      Returns Promise<string>

      The entered line, trimmed.

      When hidden input is requested but the surface lacks the hiddenInput capability, or the surface cannot prompt.

    • Runs one host-shell command on the surface machine.

      Parameters

      • _command: string

        The shell command without the leading !.

      • Optional_signal: AbortSignal

        Aborted when the operator cancels the command; a surface that started a process kills it.

      Returns Promise<number>

      The process exit code.

      When the surface lacks shellCommands.