gatelineAPI reference
interface HeadlessManifest {
    adapter: string;
    command: string[];
    dispatchPrompt: string;
    modelMap: Record<string, string>;
    modelOverrides: Record<string, string>;
    modelVendors: Record<string, string>;
    resumeArgs?: string[];
    sessionField?: string;
    usage: {
        errorField?: string;
        fields?: { cost_usd?: string; tokens_in?: string; tokens_out?: string };
        format: UsageFormat;
        lineFilter?: Record<string, string>;
        resultField?: string;
    };
}

Properties

adapter: string
command: string[]

argv template; {prompt} is replaced with the rendered dispatch prompt.

dispatchPrompt: string

Prompt template; {role} and {body} are replaced per dispatch.

modelMap: Record<string, string>

profile → this runner's model spelling (the manifest's model_map).

modelOverrides: Record<string, string>

role → spelling overrides (how copilot-cli implements the P5 pins).

modelVendors: Record<string, string>

spelling → vendor, for the dispatch-time avoid_vendor_of check.

resumeArgs?: string[]

argv fragment that makes this harness continue a prior session, with {session} replaced by the recorded id. Absent → this runner never resumes, and a retry is simply a fresh dispatch.

sessionField?: string

Dotted path to the harness's own session id in its output (#181). The seam records whatever it finds there on the dispatch's ledger entry; a runner whose manifest omits this never reports a session.

usage: {
    errorField?: string;
    fields?: { cost_usd?: string; tokens_in?: string; tokens_out?: string };
    format: UsageFormat;
    lineFilter?: Record<string, string>;
    resultField?: string;
}

Type declaration

  • OptionalerrorField?: string
  • Optionalfields?: { cost_usd?: string; tokens_in?: string; tokens_out?: string }

    Dotted paths into the harness's JSON output. For json-stdout, read from the one parsed object. For ndjson-sum, summed across every line matching lineFilter (a harness that streams one JSON event per agent turn — e.g. opencode's step_finish — reports cost/tokens per turn, not as a single running total).

  • format: UsageFormat
  • OptionallineFilter?: Record<string, string>

    ndjson-sum only: a line is summed iff every dotted-path field here matches (as a string).

  • OptionalresultField?: string