@parcha/agentrun-harness-acp 0.1.0-beta.46 → 0.1.0-beta.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cursor.js ADDED
@@ -0,0 +1,53 @@
1
+ // Cursor as an AgentRun harness: its recipe (recipes/cursor.json), loaded and typed, and the adapter a host builds from
2
+ // it on a pinned install. Written for AgentRun.
3
+ //
4
+ // Cursor's config directory is $CURSOR_CONFIG_DIR, else $XDG_CONFIG_HOME/cursor, else $HOME/.cursor (its
5
+ // cursor-config/dist/paths.js, Cursor 2026.11.13-eacade1): the adapter sets XDG_CONFIG_HOME to $HOME/.config, so the
6
+ // recipe's config and sessions are under `$HOME/.config/cursor`, and a file under ~/.cursor is never read.
7
+ import { normalize, sep } from "node:path";
8
+ import { acpAdapter } from "./adapter.js";
9
+ import { ACP_CODES } from "./facts.js";
10
+ import { CURSOR_LIMITS } from "./cursor-facts.js";
11
+ import { recipeFile } from "./goose.js";
12
+ import { acpPlatform, AcpBinaryRefused, CURSOR_PIN, pinnedRelease, unpinned, verifyPinnedBinary, verifyPinnedTree } from "./pinned-binary.js";
13
+ import { recipeProblems } from "./recipe.js";
14
+ /** Cursor's recipe for one run: its file, with the launcher, the run's model and its limits. Refused when it could not
15
+ * run. */
16
+ export function cursorRecipe(options) {
17
+ const limits = options.limits ?? CURSOR_LIMITS;
18
+ const file = recipeFile("cursor");
19
+ const recipe = { ...file, command: options.command, billing: { kind: "plan", maxTurns: limits.maxTurns, maxToolCalls: limits.maxToolCalls }, ...(options.model !== undefined ? { model: options.model } : {}) };
20
+ const problems = recipeProblems(recipe);
21
+ if (problems.length)
22
+ throw new Error(`acp: the cursor recipe cannot run: ${problems.join("; ")}`);
23
+ return recipe;
24
+ }
25
+ /** The folder Cursor was installed into, from its launcher's path and the pin's `cmd` (`./dist-package/cursor-agent`). */
26
+ export function cursorRootOf(binary, cmd) {
27
+ const tail = normalize(cmd);
28
+ const path = normalize(binary);
29
+ return path.endsWith(`${sep}${tail}`) ? path.slice(0, -(tail.length + 1)) : undefined;
30
+ }
31
+ /** Cursor's release pinned for `platform` (default this host's), with its launcher's and its tree's digests; undefined
32
+ * where none is pinned (CURSOR_PIN pins linux-x86_64 alone), where Cursor is refused ACP_BINARY_UNPINNED before any file
33
+ * of it is read: pinnedRelease's tree test on CURSOR_PIN, the one the adapter, serve and their tests make. */
34
+ export const cursorRelease = (platform = acpPlatform()) => pinnedRelease(CURSOR_PIN, platform, true);
35
+ /** Cursor as a harness adapter (id `cursor`): its pinned install checked, its recipe for the run's model and limits. */
36
+ export function cursorAdapter(options) {
37
+ const { binary, model, limits, ...rest } = options;
38
+ const release = cursorRelease();
39
+ if (!release)
40
+ throw unpinned("Cursor", CURSOR_PIN.version);
41
+ const root = cursorRootOf(binary, release.cmd);
42
+ if (!root)
43
+ throw new AcpBinaryRefused(ACP_CODES.binaryMismatch, `the Cursor launcher at ${binary} is not at its pinned path ${release.cmd} inside its folder`);
44
+ verifyPinnedBinary(binary, release.binarySha256);
45
+ return acpAdapter({
46
+ ...rest,
47
+ recipe: cursorRecipe({ command: binary, ...(model !== undefined ? { model } : {}), ...(limits ? { limits } : {}) }),
48
+ // Checked again before each process starts, every file it runs, the launcher among them (the tree's digest covers
49
+ // it): a file replaced since the adapter was made never runs unchecked. An unchanged file is not hashed again (the
50
+ // check remembers it by its identity).
51
+ beforeStart: () => verifyPinnedTree(root, release.treeSha256),
52
+ });
53
+ }
@@ -0,0 +1,39 @@
1
+ /** The codes the adapter's refusals start with (`<code>: <words>`), so a host tells them apart without reading words. */
2
+ export declare const ACP_CODES: Readonly<{
3
+ /** initialize advertised less than the recipe declares (session/load, MCP over HTTP). */
4
+ readonly capabilityMismatch: "ACP_CAPABILITY_MISMATCH";
5
+ /** initialize answered a protocol version the adapter does not speak. */
6
+ readonly protocolMismatch: "ACP_PROTOCOL_MISMATCH";
7
+ /** A plan-billed run reached the owner's limit of session/prompt turns. */
8
+ readonly turnLimit: "ACP_TURN_LIMIT";
9
+ /** A plan-billed run reached the owner's limit of tool calls. */
10
+ readonly toolCallLimit: "ACP_TOOL_CALL_LIMIT";
11
+ /** The agent's process ended, or never answered initialize. */
12
+ readonly agentExited: "ACP_AGENT_EXITED";
13
+ /** The agent stopped the turn at its own limit of requests (stopReason max_turn_requests). */
14
+ readonly agentTurnRequests: "ACP_MAX_TURN_REQUESTS";
15
+ /** The agent refused to go on (stopReason refusal). */
16
+ readonly refusal: "ACP_REFUSAL";
17
+ /** The agent's binary is not the pinned one: its sha256 differs from the pin's. */
18
+ readonly binaryMismatch: "ACP_BINARY_MISMATCH";
19
+ /** The agent's binary cannot be read to be checked. */
20
+ readonly binaryUnreadable: "ACP_BINARY_UNREADABLE";
21
+ /** No digest is pinned for the agent's binary on this platform, and none was given. */
22
+ readonly binaryUnpinned: "ACP_BINARY_UNPINNED";
23
+ /** A key the recipe runs on (recipe.keys) is not in the host's environment: the agent was not started. */
24
+ readonly keyMissing: "ACP_KEY_MISSING";
25
+ /** The run's model (recipe.model) is not one the agent lists for its key: no prompt was sent. */
26
+ readonly modelUnlisted: "ACP_MODEL_UNLISTED";
27
+ }>;
28
+ export interface AcpFacts {
29
+ readonly id: string;
30
+ readonly label: string;
31
+ /** A message mid-turn waits for the turn's end: ACP has no steer. */
32
+ readonly steer: false;
33
+ /** A call the agent started is never run again: one cut off is reported interrupted, never repeated. */
34
+ readonly rerunsStarted: false;
35
+ /** An answer cut at the output limit (stopReason max_tokens) ends the turn. */
36
+ readonly recoversCutAnswers: 0;
37
+ }
38
+ /** The facts of the ACP harness `id`. */
39
+ export declare function acpFacts(id: string, label?: string): AcpFacts;
package/dist/facts.js ADDED
@@ -0,0 +1,34 @@
1
+ // What an ACP harness is, as its adapter states it, and the codes its refusals carry. Narrower than the kernel's
2
+ // AdapterFacts: an ACP agent's wire, policy and install are its recipe's (S1's table makes those optional for plan
3
+ // harnesses), so this states only what the adapter itself guarantees. Written for AgentRun.
4
+ /** The codes the adapter's refusals start with (`<code>: <words>`), so a host tells them apart without reading words. */
5
+ export const ACP_CODES = Object.freeze({
6
+ /** initialize advertised less than the recipe declares (session/load, MCP over HTTP). */
7
+ capabilityMismatch: "ACP_CAPABILITY_MISMATCH",
8
+ /** initialize answered a protocol version the adapter does not speak. */
9
+ protocolMismatch: "ACP_PROTOCOL_MISMATCH",
10
+ /** A plan-billed run reached the owner's limit of session/prompt turns. */
11
+ turnLimit: "ACP_TURN_LIMIT",
12
+ /** A plan-billed run reached the owner's limit of tool calls. */
13
+ toolCallLimit: "ACP_TOOL_CALL_LIMIT",
14
+ /** The agent's process ended, or never answered initialize. */
15
+ agentExited: "ACP_AGENT_EXITED",
16
+ /** The agent stopped the turn at its own limit of requests (stopReason max_turn_requests). */
17
+ agentTurnRequests: "ACP_MAX_TURN_REQUESTS",
18
+ /** The agent refused to go on (stopReason refusal). */
19
+ refusal: "ACP_REFUSAL",
20
+ /** The agent's binary is not the pinned one: its sha256 differs from the pin's. */
21
+ binaryMismatch: "ACP_BINARY_MISMATCH",
22
+ /** The agent's binary cannot be read to be checked. */
23
+ binaryUnreadable: "ACP_BINARY_UNREADABLE",
24
+ /** No digest is pinned for the agent's binary on this platform, and none was given. */
25
+ binaryUnpinned: "ACP_BINARY_UNPINNED",
26
+ /** A key the recipe runs on (recipe.keys) is not in the host's environment: the agent was not started. */
27
+ keyMissing: "ACP_KEY_MISSING",
28
+ /** The run's model (recipe.model) is not one the agent lists for its key: no prompt was sent. */
29
+ modelUnlisted: "ACP_MODEL_UNLISTED",
30
+ });
31
+ /** The facts of the ACP harness `id`. */
32
+ export function acpFacts(id, label = id) {
33
+ return Object.freeze({ id, label, steer: false, rerunsStarted: false, recoversCutAnswers: 0 });
34
+ }
@@ -0,0 +1,6 @@
1
+ import type { AdapterFacts } from "@parcha/agentrun-kernel";
2
+ /** The command that installs the pinned Goose into an AgentRun server's data (`<data>/harnesses/goose`). */
3
+ export declare const GOOSE_INSTALL = "agentrun harness install goose";
4
+ /** The code a host's refusal carries when Goose is not installed where it looks. */
5
+ export declare const GOOSE_NOT_INSTALLED = "HARNESS_NOT_INSTALLED";
6
+ export declare const gooseFacts: AdapterFacts;
@@ -0,0 +1,32 @@
1
+ import { ACP_CODES } from "./facts.js";
2
+ import { goosePolicy, gooseToolName } from "./host/goose-proxy.js";
3
+ import { GOOSE_PIN } from "./pinned-binary.js";
4
+ /** The command that installs the pinned Goose into an AgentRun server's data (`<data>/harnesses/goose`). */
5
+ export const GOOSE_INSTALL = "agentrun harness install goose";
6
+ /** The code a host's refusal carries when Goose is not installed where it looks. */
7
+ export const GOOSE_NOT_INSTALLED = "HARNESS_NOT_INSTALLED";
8
+ const OURS = gooseToolName("");
9
+ export const gooseFacts = Object.freeze({
10
+ id: "goose",
11
+ label: "Goose",
12
+ wire: "anthropic-messages",
13
+ // ACP has no steer: a message mid-turn waits for the turn's end.
14
+ steer: false,
15
+ // A call Goose started is never run again: one cut off is reported interrupted, never repeated.
16
+ rerunsStarted: false,
17
+ // An answer cut at the output limit (stopReason max_tokens) ends the turn.
18
+ recoversCutAnswers: 0,
19
+ // One run's memory, measured with the server's (serve's host.ts): Goose's own process beside the run's.
20
+ runMib: 256,
21
+ // Goose asks for adaptive thinking at the model's own effort (high), whatever the run's level: no level is passed to it.
22
+ thinking: Object.freeze(["high"]),
23
+ // Its model is Anthropic's, on its own settings, never the gateway's default for the other harnesses.
24
+ ownModel: true,
25
+ // Anthropic's ids hold no dot; OpenRouter names the same models with dots (anthropic/claude-sonnet-5.5).
26
+ normalizeModel: (model) => (model.provider === "anthropic" ? { ...model, modelId: model.modelId.replaceAll(".", "-") } : model),
27
+ // Installed by its owner, never on first use: the archive the pin names, its digests checked (serve's harness-archive.ts).
28
+ install: Object.freeze({ npmLine: GOOSE_INSTALL, spec: `goose@${GOOSE_PIN.version}`, codes: Object.freeze({ install: GOOSE_NOT_INSTALLED, pins: ACP_CODES.binaryMismatch }) }),
29
+ // Its bundled extensions are off: the model calls only our MCP server's tools, as `agentrun__<host tool>`.
30
+ hostName: (given) => (given.startsWith(OURS) ? given.slice(OURS.length) : given),
31
+ policy: (options) => goosePolicy({ model: options.model, tools: options.tools, ...(options.auth ? { auth: options.auth } : {}), ...(options.maxOutputTokens ? { maxOutputTokens: options.maxOutputTokens } : {}) }),
32
+ });
@@ -0,0 +1,29 @@
1
+ import type { AgentAdapter } from "@parcha/agentrun-kernel";
2
+ import { type AcpAdapterOptions } from "./adapter.js";
3
+ import { type GooseProxyOptions } from "./host/goose-proxy.js";
4
+ import { type AcpRecipe } from "./recipe.js";
5
+ /** A recipe as its file holds it: everything but the binary, which the host's install puts where it does. */
6
+ export type AcpRecipeFile = Omit<AcpRecipe, "command">;
7
+ /** The recipes this package ships, by name. */
8
+ export type AcpRecipeName = "goose" | "cursor";
9
+ /** The recipe file `name`, as shipped beside this package's code. */
10
+ export declare function recipeFile(name: AcpRecipeName): AcpRecipeFile;
11
+ export interface GooseRecipeOptions {
12
+ /** The Goose binary, absolute: one that met its pin (verifyPinnedBinary). */
13
+ command: string;
14
+ /** The run's model, as the provider names it. */
15
+ model: string;
16
+ }
17
+ /** Goose's recipe for one run: its file, with the binary and the run's model. Refused when it could not run. */
18
+ export declare function gooseRecipe(options: GooseRecipeOptions): AcpRecipe;
19
+ export interface GooseAdapterOptions extends Omit<AcpAdapterOptions, "recipe" | "proxy" | "beforeStart">, Omit<GooseProxyOptions, "log"> {
20
+ /** The Goose binary, absolute. Its sha256 is checked when the adapter is made and again before every start of a Goose
21
+ * process (a restart included), and it is never run for the check. */
22
+ binary: string;
23
+ /** The sha256 it must have. Default: the pin's for this platform (GOOSE_PIN), refused with ACP_BINARY_UNPINNED where
24
+ * the pin has none. */
25
+ sha256?: string;
26
+ }
27
+ /** Goose as a harness adapter (id `goose`): its pinned binary checked, its recipe for the run's model, and a model proxy
28
+ * of its own for each Goose process, on the session's booking. */
29
+ export declare function gooseAdapter(options: GooseAdapterOptions): AgentAdapter;
package/dist/goose.js ADDED
@@ -0,0 +1,63 @@
1
+ // Goose as an AgentRun harness: its recipe (recipes/goose.json), loaded and typed, and the adapter a host builds from
2
+ // it on a pinned binary. Written for AgentRun.
3
+ //
4
+ // What the recipe holds was measured on Goose 1.59.2 over ACP:
5
+ // - `goose acp` in a private HOME, provider `anthropic` in approve mode (every tool call asks permission, and the
6
+ // adapter answers allow_once or reject_once, never an `always`); session naming and the keyring off;
7
+ // - every bundled extension off in `$HOME/.config/goose/config.yaml`, which leaves the model our MCP server's tools
8
+ // (`agentrun__<name>`) and `load_skill`, which Goose always offers. ACP's `_meta.enabledExtensions: []` is not used:
9
+ // it drops our MCP server too;
10
+ // - HTTP(S)_PROXY to a dead loopback port, loopback exempt: Goose downloads a model catalog from the internet at every
11
+ // start, and this blocks it while its model's requests (to the session's loopback proxy) go on;
12
+ // - its sessions in `$HOME/.local/share/goose/sessions` (sessions.db), mirrored so another runner's Goose loads them;
13
+ // - session/load and MCP over HTTP declared; its model billed through the host's proxy.
14
+ // The run's model is GOOSE_MODEL, set here; ANTHROPIC_HOST and ANTHROPIC_API_KEY are the proxy's (gooseProxy), never
15
+ // the recipe's.
16
+ import { readFileSync } from "node:fs";
17
+ import { acpAdapter } from "./adapter.js";
18
+ import { gooseProxy } from "./host/goose-proxy.js";
19
+ import { GOOSE_PIN, pinnedRelease, unpinned, verifyPinnedBinary, verifyPinnedBinaryAsync } from "./pinned-binary.js";
20
+ import { MODEL_ID, recipeProblems } from "./recipe.js";
21
+ /** The variables the proxy (ANTHROPIC_HOST, ANTHROPIC_API_KEY) and the loader (GOOSE_MODEL) set: a recipe file never
22
+ * names them. */
23
+ const SET_ELSEWHERE = new Set(["ANTHROPIC_HOST", "ANTHROPIC_API_KEY", "GOOSE_MODEL"]);
24
+ /** The recipe file `name`, as shipped beside this package's code. */
25
+ export function recipeFile(name) {
26
+ const parsed = JSON.parse(readFileSync(new URL(`../recipes/${name}.json`, import.meta.url), "utf8"));
27
+ if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed))
28
+ throw new Error(`acp: the recipe file ${name}.json is not an object`);
29
+ if ("command" in parsed)
30
+ throw new Error(`acp: the recipe file ${name}.json names a command; the host's install gives it`);
31
+ return parsed;
32
+ }
33
+ /** Goose's recipe for one run: its file, with the binary and the run's model. Refused when it could not run. */
34
+ export function gooseRecipe(options) {
35
+ if (typeof options.model !== "string" || !MODEL_ID.test(options.model))
36
+ throw new Error(`acp: the model ${JSON.stringify(String(options.model).slice(0, 80))} is not a model id`);
37
+ const file = recipeFile("goose");
38
+ const named = Object.keys(file.env ?? {}).filter((name) => SET_ELSEWHERE.has(name));
39
+ if (named.length)
40
+ throw new Error(`acp: the goose recipe file names ${named.join(", ")}, which the proxy and the loader set`);
41
+ const recipe = { ...file, command: options.command, env: { ...file.env, GOOSE_MODEL: options.model } };
42
+ const problems = recipeProblems(recipe);
43
+ if (problems.length)
44
+ throw new Error(`acp: the goose recipe cannot run: ${problems.join("; ")}`);
45
+ return recipe;
46
+ }
47
+ /** Goose as a harness adapter (id `goose`): its pinned binary checked, its recipe for the run's model, and a model proxy
48
+ * of its own for each Goose process, on the session's booking. */
49
+ export function gooseAdapter(options) {
50
+ const { binary, sha256, model, provider, price, maxOutputTokens, fetch, ...rest } = options;
51
+ const pinned = sha256 ?? pinnedRelease(GOOSE_PIN)?.binarySha256;
52
+ if (!pinned)
53
+ throw unpinned("Goose", GOOSE_PIN.version);
54
+ verifyPinnedBinary(binary, pinned);
55
+ return acpAdapter({
56
+ ...rest,
57
+ recipe: gooseRecipe({ command: binary, model }),
58
+ // Checked again before each process starts: a binary replaced since the adapter was made never runs unchecked. An
59
+ // unchanged file is not hashed again (the check remembers it by its identity).
60
+ beforeStart: (command) => verifyPinnedBinaryAsync(command, pinned),
61
+ proxy: gooseProxy({ model, provider, ...(price ? { price } : {}), ...(maxOutputTokens ? { maxOutputTokens } : {}), ...(fetch ? { fetch } : {}), ...(rest.log ? { log: rest.log } : {}) }),
62
+ });
63
+ }
@@ -0,0 +1,80 @@
1
+ import type { GateAnswer, GateCall } from "@parcha/agentrun-kernel";
2
+ import type { DriveContext, HostTool, SessionState } from "@parcha/agentrun-kernel/kernel";
3
+ import type { ParentWatch } from "@parcha/agentrun-kernel/host";
4
+ import { type AcpRecipe } from "./recipe.js";
5
+ import type { ConfineChild } from "./host/child.js";
6
+ /** The agent's session id, one record each time a new agent session is opened. */
7
+ export declare const SESSION_STREAM = "acp.session";
8
+ /** One record per session/prompt sent (written just before it): the turns a plan-billed run counts. */
9
+ export declare const PROMPT_STREAM = "acp.prompt";
10
+ /** Our tools' calls as the MCP server took them (`seen`, before the gate) and as they ended (`answered`). */
11
+ export declare const CALL_STREAM = "acp.call";
12
+ /** The permission requests for the agent's own tools: `asked` before the gate is, `answered` with what it said. */
13
+ export declare const PERMISSION_STREAM = "acp.permission";
14
+ /** One record per tool call the agent announced (or MCP call it made unannounced): the calls a plan-billed run counts. */
15
+ export declare const TOOLS_STREAM = "acp.tools";
16
+ /** The model chosen for the agent's session (recipe.model, as the agent lists it), one record each time one is chosen. */
17
+ export declare const MODEL_STREAM = "acp.model";
18
+ /** How long a session waits for the agent to start and answer initialize, or open its session. */
19
+ export declare const START_MS = 60000;
20
+ /** How long an MCP call waits for the agent's tool_call that announces it. */
21
+ export declare const CALL_ID_WAIT_MS = 10000;
22
+ /** How long an agent past the plan's limit of tool calls has to end its turn after session/cancel before its process is
23
+ * ended: past the limit, each moment it goes on is spent on the owner's plan. */
24
+ export declare const LIMIT_STOP_MS = 3000;
25
+ /** How long a turn's end waits for the calls of ours still running in it to stop, once their signal is aborted. */
26
+ export declare const CALL_STOP_MS = 5000;
27
+ /** The most of an earlier call's input, and of its result or error, a context note quotes. */
28
+ export declare const NOTE_INPUT_CHARS = 1000;
29
+ export declare const NOTE_RESULT_CHARS = 2000;
30
+ export interface AcpHarnessOptions {
31
+ recipe: AcpRecipe;
32
+ /** The kernel's tools: exactly the host's. */
33
+ tools: HostTool[];
34
+ /** The session's instructions. */
35
+ instructions?: string;
36
+ /** The session's own directory: its private HOME, tmp and (with no `cwd`) work directory are made in it. */
37
+ dir: string;
38
+ /** The workspace the agent runs in (absolute), or `<dir>/work`. */
39
+ cwd?: string;
40
+ confine?: ConfineChild;
41
+ parentWatch?: ParentWatch;
42
+ /** The environment the child's allowlist reads. Default process.env. */
43
+ env?: Readonly<Record<string, string | undefined>>;
44
+ /** The host's gate (SessionIO.gate). Absent: every call runs. */
45
+ gate?: (call: GateCall) => Promise<GateAnswer>;
46
+ /** Proxy billing: what each agent process gets to reach the host's model proxy (its variables), closed with it.
47
+ * `halt` ends the drive the process serves. */
48
+ proxy?: (drive: {
49
+ halt(reason: unknown): void;
50
+ }) => Promise<{
51
+ env: Record<string, string>;
52
+ close(): Promise<void>;
53
+ }>;
54
+ /** Run before every start of the agent's process, a restart included: the host's check of the binary it runs. A throw
55
+ * refuses that start, so a binary replaced after the adapter was made is checked before it ever runs. */
56
+ beforeStart?: (command: string) => Promise<void>;
57
+ callIdWaitMs?: number;
58
+ startMs?: number;
59
+ log?: (message: string, fields?: Record<string, unknown>) => void;
60
+ }
61
+ /** What the adapter holds of the drive in flight, to stop its turn. */
62
+ export interface DriveControl {
63
+ /** Cancel the turn in flight (session/cancel): resolves true once the agent ended it within `ms`, with no end written
64
+ * for it (it stays open); false when the drive must be halted instead. */
65
+ interrupt(ms: number): Promise<boolean>;
66
+ }
67
+ /** The submissions a drive marked as sent to the agent (PROMPT_STREAM), with those a recovery's send carried. */
68
+ export declare function sentSubmissions(state: SessionState): Set<string>;
69
+ /** The conversation before the open turn (all of it with none open), as a new agent session reads it: each user
70
+ * message, each answer and each call of ours with its input and how it ended (its result, or its error), each cut to a
71
+ * bound (NOTE_INPUT_CHARS, NOTE_RESULT_CHARS) that says how much was left out. The inputs and results are quoted as
72
+ * the session's records hold them, as the kernel's recovery note quotes them. Empty when there is none. */
73
+ export declare function contextNote(state: SessionState): string | undefined;
74
+ /** The ACP harness. `control` is told of each drive call's stop hook while it runs. */
75
+ export declare function acpHarness(options: AcpHarnessOptions, control?: (drive: DriveControl | undefined) => void): {
76
+ name: string;
77
+ drive(ctx: DriveContext): Promise<void>;
78
+ /** End the agent's process and its MCP server. */
79
+ close(): Promise<void>;
80
+ };