gatelineAPI reference
interface ExecuteIntentOptions {
    adapter: string;
    createWorkspaceImpl?: (opts: CreateWorkspaceOptions) => Promise<Workspace>;
    getHeadImpl?: (ws: Workspace) => Promise<string>;
    harvestAndPushImpl?: (
        ws: Workspace,
        branch: string,
        pathspecs: string[],
        base: string,
        identity: { email: string; name: string },
        slug: string,
        role: string,
    ) => Promise<HarvestResult>;
    intent: PendingIntent;
    manifestLoaderImpl?: (
        repoDir: string,
        adapter: string,
        prefixHint?: string,
    ) => Promise<HeadlessManifest>;
    prefixHint?: string;
    repoUrl: string;
    resolveFrameworkRootsImpl?: (
        repoDir: string,
        prefixHint?: string,
    ) => Promise<FrameworkRoots>;
    runCommandImpl?: (
        cmd: string,
        args: string[],
        cwd: string,
        timeoutMs: number,
    ) => Promise<RunResult>;
    workDir: string;
}

Properties

adapter: string
createWorkspaceImpl?: (opts: CreateWorkspaceOptions) => Promise<Workspace>

Injection seams for tests — production callers never set these.

getHeadImpl?: (ws: Workspace) => Promise<string>

Type declaration

    • (ws: Workspace): Promise<string>
    • The workspace's current HEAD — callers capture this before the harness runs (review-04.md round-2 F8: base must be the pre-harness commit, not post, since the harness itself is instructed to commit its own work).

      Parameters

      • ws: Workspace

      Returns Promise<string>

harvestAndPushImpl?: (
    ws: Workspace,
    branch: string,
    pathspecs: string[],
    base: string,
    identity: { email: string; name: string },
    slug: string,
    role: string,
) => Promise<HarvestResult>

Type declaration

    • (
          ws: Workspace,
          branch: string,
          pathspecs: string[],
          base: string,
          identity: { email: string; name: string },
          slug: string,
          role: string,
      ): Promise<HarvestResult>
    • Harvest-then-dispose (run "runner-agent" ADR-3; review-04.md round-2 F8): base is the workspace's HEAD before the harness ran (the caller captures it at that point — every dispatch prompt instructs the harness to commit its own work, so by the time this runs HEAD may already be past base). This sweeps up any of the role's own pathspecs the harness left uncommitted into one more commit, then pushes whatever's reachable from HEAD back to base — the harness's own commit(s) included — to branch, never the run branch itself, which stays the control plane's alone to write. Nothing to push (HEAD never moved past base, and nothing matched the sweep) resolves pushed: false, not an error. A push failure throws: the caller is expected to keep the workspace rather than dispose of completed, paid work it could not deliver (ADR-3's ordering — disposal is gated on the push landing, never on the harness returning).

      Parameters

      • ws: Workspace
      • branch: string
      • pathspecs: string[]
      • base: string
      • identity: { email: string; name: string }
      • slug: string
      • role: string

      Returns Promise<HarvestResult>

manifestLoaderImpl?: (
    repoDir: string,
    adapter: string,
    prefixHint?: string,
) => Promise<HeadlessManifest>
prefixHint?: string

Framework-metadata prefix override, forwarded to loadHeadlessManifest (gateline init --prefix hosts, #95); undefined auto-detects.

repoUrl: string
resolveFrameworkRootsImpl?: (
    repoDir: string,
    prefixHint?: string,
) => Promise<FrameworkRoots>

Type declaration

    • (repoDir: string, prefixHint?: string): Promise<FrameworkRoots>
    • Same resolution, but from a live checkout on disk — for the orchestrator's adapter manifests, which it shells out to as installed files rather than reading through git history.

      Parameters

      • repoDir: string
      • OptionalprefixHint: string

      Returns Promise<FrameworkRoots>

runCommandImpl?: (
    cmd: string,
    args: string[],
    cwd: string,
    timeoutMs: number,
) => Promise<RunResult>
workDir: string