@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.
@@ -0,0 +1,75 @@
1
+ /** Who pays for the agent's model requests. `plan`: the vendor bills the owner's plan (Cursor), no request reaches us, so
2
+ * the adapter itself stops the run at these limits. `proxy`: the agent's model goes through the host's proxy, which the
3
+ * adapter's `proxy` option starts for each agent process (Goose, S3). */
4
+ export type AcpBilling = {
5
+ readonly kind: "plan";
6
+ readonly maxTurns: number;
7
+ readonly maxToolCalls: number;
8
+ } | {
9
+ readonly kind: "proxy";
10
+ };
11
+ /** One of the agent's own refusals: the words it says (`says`, matched as they are), the code a host reads, and the
12
+ * words the host says instead. */
13
+ export type AcpRefusal = {
14
+ readonly says: string;
15
+ readonly code: string;
16
+ readonly words: string;
17
+ };
18
+ /** A model id as an agent lists one (`gpt-5.4-nano[reasoning=medium]`): one line, no spaces, not an option. */
19
+ export declare const MODEL_ID: RegExp;
20
+ export interface AcpRecipe {
21
+ /** The harness's id: the adapter's. */
22
+ readonly id: string;
23
+ /** Its name in a sentence. */
24
+ readonly label?: string;
25
+ /** The agent's binary (absolute) and the arguments that start it as an ACP agent over stdio. */
26
+ readonly command: string;
27
+ readonly args?: readonly string[];
28
+ /** Variables the agent gets beyond the allowlist (PATH, LANG, TZ). */
29
+ readonly env?: Readonly<Record<string, string>>;
30
+ /** The keys the agent runs on (Cursor's CURSOR_API_KEY), by name: each is read from the host's environment at every
31
+ * start and handed to the agent under the same name, never written in the recipe. A start whose host lacks one of
32
+ * them is refused with ACP_CODES.keyMissing before anything starts. */
33
+ readonly keys?: readonly string[];
34
+ /** Files in HOME the agent derives from its keys (Cursor's `.config/cursor/auth.json`): never written, since each
35
+ * start makes every one an empty folder the agent cannot write a file at (an agent named here must run on the key in
36
+ * its env when its save fails, as Cursor 2026.11.13 does), so a hard kill leaves none on disk; never mirrored; and
37
+ * once a recipe names one, the agent's whole private HOME and tmp are also removed when its process ends (the
38
+ * drive's end, the session's close, a stop past the plan's limit). The next start makes them again from the
39
+ * session's records. */
40
+ readonly credentials?: readonly string[];
41
+ /** The agent's own refusals, by words it prints (on stderr, or in an error it answers): a start or a turn that fails
42
+ * saying `says` is said as `<code>: <words>`, so a host tells it apart without reading the agent's words. */
43
+ readonly refusals?: readonly AcpRefusal[];
44
+ /** Words the agent prints on stderr that never say why it failed (Cursor's warning that it could not save the
45
+ * credential the adapter keeps unwritable, and the error line under it): a stderr line holding one is left out of a
46
+ * failure's words, as are the terminal's escapes. Matched as they are. */
47
+ readonly quiet?: readonly string[];
48
+ /** The run's model, by the agent's id (`gpt-5.4-nano[reasoning=medium]`) or its name before the brackets
49
+ * (`gpt-5.4-nano`): chosen with session/set_model among those session/new lists, before the first prompt. One it
50
+ * does not list is refused with ACP_CODES.modelUnlisted. Absent: the agent's own default. */
51
+ readonly model?: string;
52
+ /** Files written into its private HOME before it starts, by their path in HOME (`.config/goose/config.yaml`). */
53
+ readonly files?: Readonly<Record<string, string>>;
54
+ /** Where in HOME the agent keeps its own sessions: mirrored into the session's records, so another runner's agent
55
+ * loads them (session/load). Credential files under them are never mirrored. */
56
+ readonly state?: readonly string[];
57
+ /** What the agent is expected to advertise at initialize: a mismatch refuses with ACP_CODES.capabilityMismatch.
58
+ * `load`: it resumes a session with session/load. `mcp`: the transport our tools go over. */
59
+ readonly declares: {
60
+ readonly load: boolean;
61
+ readonly mcp: "http" | "stdio";
62
+ };
63
+ readonly billing: AcpBilling;
64
+ readonly quirks?: {
65
+ /** How an MCP call finds its id. `match` (default): the agent's own tool_call for it, by tool and arguments; `mint`:
66
+ * an id of the adapter's, for an agent that announces no tool_call for an MCP call. */
67
+ readonly mcpCall?: "match" | "mint";
68
+ };
69
+ }
70
+ /** `path` in HOME, normalized, or undefined when it leaves HOME (absolute, `..`, or a `$HOME/` prefix spelled out). */
71
+ export declare function homePath(path: string): string | undefined;
72
+ /** What is wrong with `recipe`, each in words; none when it may run. */
73
+ export declare function recipeProblems(recipe: AcpRecipe): string[];
74
+ /** The variables the adapter sets itself: a recipe never names them. */
75
+ export declare const RESERVED_ENV: Set<string>;
package/dist/recipe.js ADDED
@@ -0,0 +1,71 @@
1
+ // What the adapter is told about one ACP agent (design TDD §3.3, door 1): how to start it, what it declares, where it
2
+ // keeps its sessions and who bills its model. The loader's own rules (keys, registry archives, owner installs) are S5's;
3
+ // these are the checks the adapter itself needs before it starts anything. Written for AgentRun.
4
+ import { isAbsolute, normalize, sep } from "node:path";
5
+ /** An environment variable's name, as a key's. */
6
+ const KEY_NAME = /^[A-Z][A-Z0-9_]{0,63}$/;
7
+ /** A model id as an agent lists one (`gpt-5.4-nano[reasoning=medium]`): one line, no spaces, not an option. */
8
+ export const MODEL_ID = /^[A-Za-z0-9][A-Za-z0-9._:/=,[\]-]{0,199}$/;
9
+ /** A refusal's code: capitals, digits and `_`. */
10
+ const CODE = /^[A-Z][A-Z0-9_]{1,63}$/;
11
+ /** `path` in HOME, normalized, or undefined when it leaves HOME (absolute, `..`, or a `$HOME/` prefix spelled out). */
12
+ export function homePath(path) {
13
+ const bare = path.startsWith("$HOME/") ? path.slice("$HOME/".length) : path;
14
+ if (!bare || isAbsolute(bare))
15
+ return undefined;
16
+ const clean = normalize(bare);
17
+ if (clean === "." || clean === ".." || clean.startsWith(`..${sep}`))
18
+ return undefined;
19
+ return clean;
20
+ }
21
+ /** What is wrong with `recipe`, each in words; none when it may run. */
22
+ export function recipeProblems(recipe) {
23
+ const problems = [];
24
+ if (!/^[a-z][a-z0-9-]{0,62}$/.test(recipe.id ?? ""))
25
+ problems.push(`the id ${JSON.stringify(recipe.id)} is not lowercase letters, digits and dashes`);
26
+ if (typeof recipe.command !== "string" || !isAbsolute(recipe.command))
27
+ problems.push("the command must be an absolute path");
28
+ if (!recipe.declares || typeof recipe.declares.load !== "boolean" || (recipe.declares.mcp !== "http" && recipe.declares.mcp !== "stdio"))
29
+ problems.push('declares needs load (true or false) and mcp ("http" or "stdio")');
30
+ const billing = recipe.billing;
31
+ if (billing?.kind === "plan") {
32
+ if (!Number.isInteger(billing.maxTurns) || billing.maxTurns < 1)
33
+ problems.push("plan billing needs maxTurns, a whole number of turns of at least 1");
34
+ if (!Number.isInteger(billing.maxToolCalls) || billing.maxToolCalls < 0)
35
+ problems.push("plan billing needs maxToolCalls, a whole number of calls");
36
+ }
37
+ else if (billing?.kind !== "proxy")
38
+ problems.push('billing is { kind: "plan", maxTurns, maxToolCalls } or { kind: "proxy" }');
39
+ for (const path of Object.keys(recipe.files ?? {}))
40
+ if (!homePath(path))
41
+ problems.push(`the file ${JSON.stringify(path)} must be inside the private HOME`);
42
+ for (const path of recipe.state ?? [])
43
+ if (!homePath(path))
44
+ problems.push(`the state path ${JSON.stringify(path)} must be inside the private HOME`);
45
+ const reserved = Object.keys(recipe.env ?? {}).filter((name) => RESERVED_ENV.has(name));
46
+ if (reserved.length)
47
+ problems.push(`the env names ${reserved.join(", ")}, which the adapter sets`);
48
+ for (const name of recipe.keys ?? []) {
49
+ if (typeof name !== "string" || !KEY_NAME.test(name))
50
+ problems.push(`the key ${JSON.stringify(name)} is not a variable's name (capitals, digits and _)`);
51
+ else if (RESERVED_ENV.has(name))
52
+ problems.push(`the key ${name} is a variable the adapter sets`);
53
+ else if (Object.hasOwn(recipe.env ?? {}, name))
54
+ problems.push(`the key ${name} is also in env: a key is read from the host by name, never written in the recipe`);
55
+ }
56
+ for (const path of recipe.credentials ?? [])
57
+ if (!homePath(path))
58
+ problems.push(`the credential ${JSON.stringify(path)} must be inside the private HOME`);
59
+ for (const refusal of recipe.refusals ?? []) {
60
+ const ok = typeof refusal?.says === "string" && refusal.says.trim() !== "" && typeof refusal.code === "string" && CODE.test(refusal.code) && typeof refusal.words === "string" && refusal.words.trim() !== "";
61
+ if (!ok)
62
+ problems.push(`the refusal ${JSON.stringify(refusal ?? null).slice(0, 120)} needs says, a code (capitals, digits and _) and words`);
63
+ }
64
+ if (recipe.quiet !== undefined && (!Array.isArray(recipe.quiet) || recipe.quiet.some((words) => typeof words !== "string" || words.trim() === "")))
65
+ problems.push("quiet is a list of words, none empty");
66
+ if (recipe.model !== undefined && (typeof recipe.model !== "string" || !MODEL_ID.test(recipe.model)))
67
+ problems.push(`the model ${JSON.stringify(String(recipe.model).slice(0, 80))} is not a model id`);
68
+ return problems;
69
+ }
70
+ /** The variables the adapter sets itself: a recipe never names them. */
71
+ export const RESERVED_ENV = new Set(["HOME", "TMPDIR", "XDG_CONFIG_HOME", "XDG_DATA_HOME", "XDG_CACHE_HOME", "XDG_STATE_HOME", "GIT_CEILING_DIRECTORIES"]);
@@ -0,0 +1,33 @@
1
+ import type { NativeJournal } from "@parcha/agentrun-kernel/process";
2
+ /** The journal stream that holds the agent's session store. */
3
+ export declare const STATE_STREAM = "acp.state";
4
+ export interface StateRecord {
5
+ path: string;
6
+ sha256?: string;
7
+ data?: string;
8
+ deleted?: true;
9
+ }
10
+ /** A file the mirror never takes: its name says it holds a credential. */
11
+ export declare const CREDENTIAL_FILE: RegExp;
12
+ /** The most bytes one file may have to be mirrored; a larger one is skipped, said in the log. */
13
+ export declare const MAX_STATE_FILE: number;
14
+ /** The newest record of each path, as the records hold them. */
15
+ export declare function foldState(records: readonly StateRecord[]): Map<string, StateRecord>;
16
+ /** Write the mirrored files back into `home`. */
17
+ export declare function restoreState(home: string, records: readonly StateRecord[]): void;
18
+ /** The mirror of one agent process's HOME: what changed since the records' newest, appended to `journal`. */
19
+ export declare class StateMirror {
20
+ private readonly home;
21
+ private readonly paths;
22
+ /** Paths in HOME never mirrored, each a file or a folder: the recipe's own files (written at every start) and the
23
+ * credentials it names. */
24
+ private readonly skip;
25
+ private readonly log;
26
+ private readonly known;
27
+ constructor(home: string, paths: readonly string[],
28
+ /** Paths in HOME never mirrored, each a file or a folder: the recipe's own files (written at every start) and the
29
+ * credentials it names. */
30
+ skip: ReadonlySet<string>, records: readonly StateRecord[], log?: (message: string, fields?: Record<string, unknown>) => void);
31
+ /** Append what changed to `journal` (the caller flushes). Returns how many records it appended. */
32
+ take(journal: NativeJournal, stream?: string): number;
33
+ }
package/dist/state.js ADDED
@@ -0,0 +1,157 @@
1
+ // The agent's own session store, mirrored into the session's records and given back to the next agent process. ACP has
2
+ // no hook before a paid request, so the mirror is taken at the points the adapter sees: after session/new, after each
3
+ // finished tool call, and at each turn's end. Written for AgentRun.
4
+ // - Each file under the recipe's `state` paths is one record of STATE_STREAM: its path in HOME, its sha256, and its bytes
5
+ // (base64), or `deleted`. Only a file whose bytes changed since the last record is written again; a large one goes to
6
+ // the journal's blob stream on its own (NativeJournal offloads it).
7
+ // - A file whose name says it holds a credential (a token, a key, an auth or credentials file) is never mirrored, and the
8
+ // recipe's own files (written fresh at every start) and the credentials it names (whatever their names) are not either.
9
+ // - The next process's HOME gets the newest record of each path back, before the agent starts.
10
+ import { createHash } from "node:crypto";
11
+ import { lstatSync, mkdirSync, readdirSync, readFileSync, realpathSync, writeFileSync } from "node:fs";
12
+ import { dirname, join, relative, sep } from "node:path";
13
+ /** The journal stream that holds the agent's session store. */
14
+ export const STATE_STREAM = "acp.state";
15
+ /** A file the mirror never takes: its name says it holds a credential. */
16
+ export const CREDENTIAL_FILE = /(^|[._-])(credentials?|tokens?|auth|secrets?|keyring|keychain|cookies?)([._-]|$)|\.(pem|key|p12)$/i;
17
+ /** The most bytes one file may have to be mirrored; a larger one is skipped, said in the log. */
18
+ export const MAX_STATE_FILE = 16 * 1024 * 1024;
19
+ const sha = (bytes) => createHash("sha256").update(bytes).digest("hex");
20
+ /** A file or directory the agent removed (or replaced with a file) while the walk read it: gone, never an error. */
21
+ const gone = (error) => ["ENOENT", "ENOTDIR"].includes(error?.code ?? "");
22
+ /** `read()`, or undefined when what it reads is gone. Any other error is thrown: the mirror says nothing it did not read. */
23
+ function unlessGone(read) {
24
+ try {
25
+ return read();
26
+ }
27
+ catch (error) {
28
+ if (gone(error))
29
+ return undefined;
30
+ throw error;
31
+ }
32
+ }
33
+ /** Whether `path` (in HOME, POSIX separators) is one of `skip` or inside one of them. */
34
+ const skipped = (path, skip) => skip.has(path) || [...skip].some((each) => path.startsWith(`${each}/`));
35
+ /** Every file under `paths` in `home`, by its path in HOME (POSIX separators). A link is never followed: a state path
36
+ * whose directories in HOME include one (the agent made `.agent/store` a link out of HOME) is skipped whole, and a link
37
+ * inside the walk is neither a file nor a directory. */
38
+ function filesUnder(home, paths, skip, log) {
39
+ const out = new Map();
40
+ const visit = (absolute) => {
41
+ const stat = unlessGone(() => lstatSync(absolute));
42
+ if (!stat)
43
+ return;
44
+ const path = relative(home, absolute).split(sep).join("/");
45
+ if (stat.isDirectory()) {
46
+ for (const name of (unlessGone(() => readdirSync(absolute)) ?? []).sort())
47
+ visit(join(absolute, name));
48
+ return;
49
+ }
50
+ if (!stat.isFile() || skipped(path, skip) || CREDENTIAL_FILE.test(path.split("/").at(-1) ?? ""))
51
+ return;
52
+ if (stat.size > MAX_STATE_FILE) {
53
+ log("acp: a state file too large to mirror was skipped", { path, bytes: stat.size });
54
+ return;
55
+ }
56
+ // A directory on the way swapped for a link after the check below: the file's own resolved path says so.
57
+ const real = unlessGone(() => realpathSync(absolute));
58
+ if (!real)
59
+ return;
60
+ if (!realHome || !real.startsWith(realHome + sep)) {
61
+ log("acp: a state file outside HOME was skipped", { path });
62
+ return;
63
+ }
64
+ const bytes = unlessGone(() => readFileSync(absolute));
65
+ if (bytes)
66
+ out.set(path, bytes);
67
+ };
68
+ const realHome = unlessGone(() => realpathSync(home));
69
+ /** Whether each directory between HOME and the state path's last part is a directory of HOME's own, not a link. */
70
+ const withinHome = (parts) => {
71
+ let at = home;
72
+ for (const part of parts.slice(0, -1)) {
73
+ at = join(at, part);
74
+ const stat = unlessGone(() => lstatSync(at));
75
+ if (!stat)
76
+ return true; // Not there: the walk finds nothing under it.
77
+ if (!stat.isDirectory())
78
+ return false;
79
+ }
80
+ return true;
81
+ };
82
+ for (const path of paths) {
83
+ const parts = path.split(/[\\/]/).filter(Boolean);
84
+ if (!withinHome(parts)) {
85
+ log("acp: a state path that leaves HOME through a link was skipped", { path });
86
+ continue;
87
+ }
88
+ visit(join(home, ...parts));
89
+ }
90
+ return out;
91
+ }
92
+ /** The newest record of each path, as the records hold them. */
93
+ export function foldState(records) {
94
+ const out = new Map();
95
+ for (const record of records) {
96
+ if (!record || typeof record.path !== "string")
97
+ continue;
98
+ if (record.deleted)
99
+ out.delete(record.path);
100
+ else
101
+ out.set(record.path, record);
102
+ }
103
+ return out;
104
+ }
105
+ /** Write the mirrored files back into `home`. */
106
+ export function restoreState(home, records) {
107
+ for (const [path, record] of foldState(records)) {
108
+ if (record.data === undefined || path.split("/").includes(".."))
109
+ continue;
110
+ const file = join(home, ...path.split("/"));
111
+ mkdirSync(dirname(file), { recursive: true, mode: 0o700 });
112
+ writeFileSync(file, Buffer.from(record.data, "base64"), { mode: 0o600 });
113
+ }
114
+ }
115
+ /** The mirror of one agent process's HOME: what changed since the records' newest, appended to `journal`. */
116
+ export class StateMirror {
117
+ home;
118
+ paths;
119
+ skip;
120
+ log;
121
+ known = new Map();
122
+ constructor(home, paths,
123
+ /** Paths in HOME never mirrored, each a file or a folder: the recipe's own files (written at every start) and the
124
+ * credentials it names. */
125
+ skip, records, log = () => { }) {
126
+ this.home = home;
127
+ this.paths = paths;
128
+ this.skip = skip;
129
+ this.log = log;
130
+ for (const [path, record] of foldState(records))
131
+ if (record.sha256)
132
+ this.known.set(path, record.sha256);
133
+ }
134
+ /** Append what changed to `journal` (the caller flushes). Returns how many records it appended. */
135
+ take(journal, stream = STATE_STREAM) {
136
+ if (this.paths.length === 0)
137
+ return 0;
138
+ const now = filesUnder(this.home, this.paths, this.skip, this.log);
139
+ let appended = 0;
140
+ for (const [path, bytes] of now) {
141
+ const digest = sha(bytes);
142
+ if (this.known.get(path) === digest)
143
+ continue;
144
+ journal.append(stream, { path, sha256: digest, data: bytes.toString("base64") });
145
+ this.known.set(path, digest);
146
+ appended++;
147
+ }
148
+ for (const path of [...this.known.keys()]) {
149
+ if (now.has(path))
150
+ continue;
151
+ journal.append(stream, { path, deleted: true });
152
+ this.known.delete(path);
153
+ appended++;
154
+ }
155
+ return appended;
156
+ }
157
+ }
@@ -0,0 +1,16 @@
1
+ import type { AcpRecipe } from "./recipe.js";
2
+ /** The fake agent's file: `node FAKE_ACP_AGENT <config.json>` starts it (its header says what the config holds). */
3
+ export declare const FAKE_ACP_AGENT: string;
4
+ /** How the fake plays an agent: `load` it resumes with session/load (else a crash restarts the turn); `http` our tools
5
+ * reach it over HTTP (else stdio); `style` how it names our tools and what it asks permission for ("goose": every tool
6
+ * asks; "cursor": MCP and shell calls ask, edits do not); `askMcp` whether an MCP call asks first (default: the
7
+ * style's). */
8
+ export interface FakeAgentPlay {
9
+ readonly load?: boolean;
10
+ readonly http?: boolean;
11
+ readonly style?: "goose" | "cursor";
12
+ readonly askMcp?: boolean;
13
+ }
14
+ /** The fake agent as the recipe of harness `id`, its config written into `dir`, driven by `script` (the conformance
15
+ * suite's ScriptStep list). Billed `plan`: the fake calls no model, so no proxy is started. */
16
+ export declare function fakeAgentRecipe(id: string, dir: string, script: readonly unknown[], play?: FakeAgentPlay): AcpRecipe;
@@ -0,0 +1,26 @@
1
+ // What a harness author tests an ACP harness on (`@parcha/agentrun-harness-acp/testing`, HARNESS.md): the fake ACP agent,
2
+ // a stdio agent on the official SDK whose model is a script, and its recipe. No binary, no model, no network beyond
3
+ // loopback: the conformance suite's script drives it, so an author's module runs the suite before any real agent is in it.
4
+ // Written for AgentRun.
5
+ import { writeFileSync } from "node:fs";
6
+ import { join } from "node:path";
7
+ import { fileURLToPath } from "node:url";
8
+ /** The fake agent's file: `node FAKE_ACP_AGENT <config.json>` starts it (its header says what the config holds). */
9
+ export const FAKE_ACP_AGENT = fileURLToPath(new URL("../testing/fake-acp-agent.mjs", import.meta.url));
10
+ /** The fake agent as the recipe of harness `id`, its config written into `dir`, driven by `script` (the conformance
11
+ * suite's ScriptStep list). Billed `plan`: the fake calls no model, so no proxy is started. */
12
+ export function fakeAgentRecipe(id, dir, script, play = {}) {
13
+ const load = play.load ?? true;
14
+ const http = play.http ?? true;
15
+ const config = join(dir, `${id}-fake-agent.json`);
16
+ writeFileSync(config, JSON.stringify({ script, load, http, style: play.style ?? "goose", ...(play.askMcp === undefined ? {} : { askMcp: play.askMcp }) }));
17
+ return {
18
+ id,
19
+ label: `${id} (the fake ACP agent)`,
20
+ command: process.execPath,
21
+ args: [FAKE_ACP_AGENT, config],
22
+ state: [".fake-acp"],
23
+ declares: { load, mcp: http ? "http" : "stdio" },
24
+ billing: { kind: "plan", maxTurns: 100, maxToolCalls: 100 },
25
+ };
26
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parcha/agentrun-harness-acp",
3
- "version": "0.1.0-beta.46",
3
+ "version": "0.1.0-beta.48",
4
4
  "description": "Any Agent Client Protocol agent as an AgentRun harness: the agent over stdio in a private HOME, the host's tools as one loopback MCP server, its permission asks through the host's gate, durable in AgentRun's own store.",
5
5
  "keywords": [
6
6
  "agentrun",
@@ -26,11 +26,16 @@
26
26
  "types": "./dist/facts.d.ts",
27
27
  "default": "./dist/facts.js"
28
28
  },
29
+ "./testing": {
30
+ "types": "./dist/testing.d.ts",
31
+ "default": "./dist/testing.js"
32
+ },
29
33
  "./package.json": "./package.json"
30
34
  },
31
35
  "files": [
32
36
  "dist",
33
37
  "recipes",
38
+ "testing",
34
39
  "README.md",
35
40
  "CHANGELOG.md",
36
41
  "LICENSE",
@@ -44,7 +49,7 @@
44
49
  },
45
50
  "dependencies": {
46
51
  "@agentclientprotocol/sdk": "2.7.0",
47
- "@parcha/agentrun-kernel": "0.1.0-beta.46",
52
+ "@parcha/agentrun-kernel": "0.1.0-beta.48",
48
53
  "zod": "4.6.6"
49
54
  },
50
55
  "publishConfig": {
@@ -0,0 +1,21 @@
1
+ {
2
+ "id": "cursor",
3
+ "label": "Cursor",
4
+ "args": ["--disable-auto-update", "acp"],
5
+ "keys": ["CURSOR_API_KEY"],
6
+ "files": {
7
+ ".config/cursor/cli-config.json":"{\"version\":1,\"permissions\":{\"allow\":[],\"deny\":[\"Write(**)\"]},\"approvalMode\":\"allowlist\"}\n"
8
+ },
9
+ "state": [".config/cursor/acp-sessions"],
10
+ "credentials": [".config/cursor/auth.json"],
11
+ "refusals": [
12
+ {
13
+ "says": "disabled headless Cursor CLI usage",
14
+ "code": "CURSOR_HEADLESS_DISABLED",
15
+ "words": "your Cursor team administrator has disabled headless Cursor CLI usage, so AgentRun does not run Cursor on this key; ask them to allow it in Cursor's team settings"
16
+ }
17
+ ],
18
+ "quiet": ["couldn't save your credentials", "EISDIR: illegal operation on a directory, open"],
19
+ "declares": { "load": true, "mcp": "http" },
20
+ "billing": { "kind": "plan", "maxTurns": 20, "maxToolCalls": 100 }
21
+ }