Skip to content
Français

AttachOptions

import type { AttachOptions } from "@elie-laloum/outpost";
  • askOptional
    VariableQuestion | undefined
    Answers each {{name}} variable a file brief leaves without a value, one call per name, before the terminal opens. Without it, Outpost asks on the host terminal and rejects with code configuration when stdin is not a TTY.
  • agentOptional
    Agent | undefined
    CLI agent that opens in the terminal, replacing the sandbox’s agent for this session. Built-in harness, replay and fallback agents reject with code configuration.
  • briefOptional
    Brief | undefined
    First message given to the agent: literal text or a file brief. Without it, the terminal opens with no message.
  • continuationOptional
    { readonly id: string; readonly fork?: boolean; } | undefined
    Native conversation to reopen, by id; fork: true opens a copy and leaves the original unchanged. Rejects with code configuration when the agent cannot resume or fork.
  • signalOptional
    AbortSignal | undefined
    Aborting it stops the agent process and rejects the attach with the signal’s reason.
  • terminalOptional
    { readonly input?: Readable; readonly output?: Writable; readonly error?: Writable; } | undefined
    Streams used instead of the host terminal: input feeds the agent, output and error receive what it writes. Omitted, the agent reads and writes the host process’s stdin and stdout.
export interface AttachOptions {
  readonly ask?: VariableQuestion;
  readonly agent?: Agent;
  readonly brief?: Brief;
  readonly continuation?: {
    readonly id: string;
    readonly fork?: boolean;
  };
  readonly signal?: AbortSignal;
  readonly terminal?: Command["terminal"];
}