@parcha/agentrun-harness-acp 0.1.0-beta.56 → 0.1.0-beta.58

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/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## 0.1.0-beta.57 (2026-11-24)
6
+
7
+ - A Goose 1.59.2 call of one of AgentRun's tools whose title carries Goose's summary of its arguments (`agentrun: write · proof.txt`) is now tied to that tool. Before, it reached the tool gate as Goose's own call (`acp_other`) and waited for an approval, so a write the agent was allowed to make stopped the run at input_required. The title alone still ties nothing: the call needs the tool_call Goose announced for it, and a kind with effects of its own (a shell, an edit) is never ours. <!-- changes/acp-goose-title-summary.md -->
8
+ - A harness recipe's install is checked by one rule, its tree, in harness-check, harness sign-in, a server's harness entry and each start. The tree digest covers every file, the binary among them, so an install no longer writes a separate first-seen binary record: it records its first tree alone, and a recipe's own binarySha256 is still checked at install. An install with no tree record is refused with the line that installs it again, and an install folder holding any link that leads out of it, as the filesystem resolves it (a chain of links included), or that leads to nothing (the tree digest holds a link by its target's name, not the bytes behind it: the executable behind a linked folder, or code beside it) is refused at the install, before anything is put in place, and at every check; an old install that holds one is not taken as already installed, so installing it again says why. The check note keeps the recipe, the tree and the platform. A recipe's keyMethod is checked by the ACP package's AUTH_METHOD, the adapter's own definition. <!-- changes/recipe-install-tree.md -->
9
+
5
10
  ## 0.1.0-beta.53 (2026-11-22)
6
11
 
7
12
  - A harness recipe now covers an outside agent's release as its vendor ships it (Google's agy CLI among them), and the owner's own sign-in, made by the agent itself: <!-- changes/recipes-outside-harness.md -->
package/dist/calls.d.ts CHANGED
@@ -6,7 +6,8 @@ export declare function canonical(value: unknown): string;
6
6
  * our tools, whatever its title says. */
7
7
  export declare const NATIVE_EFFECT_KINDS: ReadonlySet<string>;
8
8
  /** The host tool an ACP tool call names, by the agent's own name for our MCP server's tools (Goose `agentrun__<tool>`, or
9
- * as Goose 1.59.2 titles it, `agentrun: <tool>` with the tool's underscores as spaces; Cursor `agentrun-<tool>: <tool>`),
9
+ * as Goose 1.59.2 titles it, `agentrun: <tool>` with the tool's underscores as spaces, and ` · <summary>` after it for a
10
+ * call whose arguments it summarizes, a path; Cursor `agentrun-<tool>: <tool>`),
10
11
  * when it is one of `tools` and its kind is not one with effects of its own. The title is the agent's text, so this alone
11
12
  * is never evidence that a call is ours: a permission request also needs the tool_call that announced it
12
13
  * (CallIds.announced). */
package/dist/calls.js CHANGED
@@ -23,7 +23,8 @@ export function canonical(value) {
23
23
  * our tools, whatever its title says. */
24
24
  export const NATIVE_EFFECT_KINDS = new Set(["execute", "edit", "delete", "move", "fetch"]);
25
25
  /** The host tool an ACP tool call names, by the agent's own name for our MCP server's tools (Goose `agentrun__<tool>`, or
26
- * as Goose 1.59.2 titles it, `agentrun: <tool>` with the tool's underscores as spaces; Cursor `agentrun-<tool>: <tool>`),
26
+ * as Goose 1.59.2 titles it, `agentrun: <tool>` with the tool's underscores as spaces, and ` · <summary>` after it for a
27
+ * call whose arguments it summarizes, a path; Cursor `agentrun-<tool>: <tool>`),
27
28
  * when it is one of `tools` and its kind is not one with effects of its own. The title is the agent's text, so this alone
28
29
  * is never evidence that a call is ours: a permission request also needs the tool_call that announced it
29
30
  * (CallIds.announced). */
@@ -31,9 +32,11 @@ export function ourTool(update, tools) {
31
32
  if (typeof update.kind === "string" && NATIVE_EFFECT_KINDS.has(update.kind))
32
33
  return undefined;
33
34
  const candidates = [];
34
- for (const said of [update.name, update.title]) {
35
- if (typeof said !== "string")
35
+ for (const whole of [update.name, update.title]) {
36
+ if (typeof whole !== "string")
36
37
  continue;
38
+ // The name is what comes before Goose's summary (` · proof.txt`): the summary is the call's argument, never a name.
39
+ const said = whole.split(" · ")[0];
37
40
  const goose = new RegExp(`^${MCP_SERVER}__(.+)$`).exec(said);
38
41
  if (goose)
39
42
  candidates.push(goose[1]);
@@ -48,7 +48,8 @@ export interface GooseProxyOptions {
48
48
  price?: ModelProxyOptions["price"];
49
49
  maxOutputTokens?: number;
50
50
  log?: (message: string, fields?: Record<string, unknown>) => void;
51
- /** For tests: the fetch the proxy forwards with. */
51
+ /** The fetch the proxy forwards with: the host's route for a model it translates onto Messages (a test's recorder,
52
+ * too); absent, the network. Forwarding it is the harness contract (HARNESS.md, the facts' `wire`). */
52
53
  fetch?: typeof fetch;
53
54
  }
54
55
  /** The proxy option for a Goose adapter (`acpAdapter`'s `proxy`): each Goose process gets a model proxy of its own, on the
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export { acpAdapter, type AcpAdapterOptions, type AcpProxy, type AcpProxySession } from "./adapter.js";
2
2
  export { ACP_CODES, acpFacts, type AcpFacts } from "./facts.js";
3
- export { homePath, MODEL_ID, recipeProblems, RESERVED_ENV, type AcpBilling, type AcpRecipe, type AcpRefusal } from "./recipe.js";
3
+ export { AUTH_METHOD, homePath, MODEL_ID, recipeProblems, RESERVED_ENV, type AcpBilling, type AcpRecipe, type AcpRefusal } from "./recipe.js";
4
4
  export { CALL_STREAM, contextNote, MODEL_STREAM, PERMISSION_STREAM, PROMPT_STREAM, REASK_LIMIT, SESSION_STREAM, sentSubmissions, TOOLS_STREAM } from "./harness.js";
5
5
  export { STATE_BUDGET, STATE_STREAM, stateBudgetPassed, stateFiles, type StateRecord } from "./state.js";
6
6
  export type { ConfineChild } from "./host/child.js";
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  // Any Agent Client Protocol agent as an AgentRun harness. Written for AgentRun.
2
2
  export { acpAdapter } from "./adapter.js";
3
3
  export { ACP_CODES, acpFacts } from "./facts.js";
4
- export { homePath, MODEL_ID, recipeProblems, RESERVED_ENV } from "./recipe.js";
4
+ export { AUTH_METHOD, homePath, MODEL_ID, recipeProblems, RESERVED_ENV } from "./recipe.js";
5
5
  export { CALL_STREAM, contextNote, MODEL_STREAM, PERMISSION_STREAM, PROMPT_STREAM, REASK_LIMIT, SESSION_STREAM, sentSubmissions, TOOLS_STREAM } from "./harness.js";
6
6
  export { STATE_BUDGET, STATE_STREAM, stateBudgetPassed, stateFiles } from "./state.js";
7
7
  export { GOOSE_INSTALL, GOOSE_NOT_INSTALLED, gooseFacts } from "./goose-facts.js";
@@ -11,7 +11,8 @@ export interface AcpArchivePin {
11
11
  /** The binary's path inside the archive (the registry's `cmd`). */
12
12
  readonly cmd: string;
13
13
  /** The sha256 of the binary the archive unpacks to, where it was measured. Absent: unmeasured on this platform, so an
14
- * installer records the first one it unpacks from the verified archive (agentrun-serve's binaryRecord). */
14
+ * installer records the first tree it unpacks from the verified archive, the binary among it (agentrun-serve's
15
+ * treeRecord). */
15
16
  readonly binarySha256?: string;
16
17
  /** The digest of every file the archive unpacks to (treeDigest), for an agent whose binary is a launcher of the code
17
18
  * beside it (Cursor's `cursor-agent` runs its own `node` on `index.js` and a hundred chunks): checked by the installer
@@ -5,8 +5,8 @@
5
5
  // unpacks to where it was measured. An installer verifies the archive, then the binary; a host checks the binary
6
6
  // again at each start (`verifyPinnedBinary`).
7
7
  // - An agent the registry lists with no digest (Cursor) is pinned here by what its first download held; a binary no
8
- // pin names has its first digest recorded by the server's installer alone (agentrun-serve, harness-archive.ts
9
- // installArchive's binaryRecord), the one first-seen path.
8
+ // pin names is held by the first tree digest (every file, the binary among them) the server's installer records
9
+ // (agentrun-serve, harness-archive.ts installArchive's treeRecord), the one first-seen path.
10
10
  // Every check reads the file's bytes (the kernel's chunked sha256, kept once per file identity) and never executes it.
11
11
  import { createHash } from "node:crypto";
12
12
  import { lstat, readdir, readlink } from "node:fs/promises";
package/dist/recipe.d.ts CHANGED
@@ -17,6 +17,9 @@ export type AcpRefusal = {
17
17
  };
18
18
  /** A model id as an agent lists one (`gpt-5.4-nano[reasoning=medium]`): one line, no spaces, not an option. */
19
19
  export declare const MODEL_ID: RegExp;
20
+ /** A sign-in method's id as an agent lists one in authMethods (`gemini-api-key`): the one definition, a serve recipe's
21
+ * keyMethod included. */
22
+ export declare const AUTH_METHOD: RegExp;
20
23
  export interface AcpRecipe {
21
24
  /** The harness's id: the adapter's. */
22
25
  readonly id: string;
package/dist/recipe.js CHANGED
@@ -7,8 +7,9 @@ import { KEY_NAME, launchEnv } from "@parcha/agentrun-kernel";
7
7
  export const MODEL_ID = /^[A-Za-z0-9][A-Za-z0-9._:/=,[\]-]{0,199}$/;
8
8
  /** A refusal's code: capitals, digits and `_`. */
9
9
  const CODE = /^[A-Z][A-Z0-9_]{1,63}$/;
10
- /** A sign-in method's id as an agent lists one in authMethods (`gemini-api-key`). */
11
- const AUTH_METHOD = /^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/;
10
+ /** A sign-in method's id as an agent lists one in authMethods (`gemini-api-key`): the one definition, a serve recipe's
11
+ * keyMethod included. */
12
+ export const AUTH_METHOD = /^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/;
12
13
  /** `path` in HOME, normalized, or undefined when it leaves HOME (absolute, `..`, or a `$HOME/` prefix spelled out). */
13
14
  export function homePath(path) {
14
15
  const bare = path.startsWith("$HOME/") ? path.slice("$HOME/".length) : path;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parcha/agentrun-harness-acp",
3
- "version": "0.1.0-beta.56",
3
+ "version": "0.1.0-beta.58",
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",
@@ -49,7 +49,7 @@
49
49
  },
50
50
  "dependencies": {
51
51
  "@agentclientprotocol/sdk": "2.7.0",
52
- "@parcha/agentrun-kernel": "0.1.0-beta.56",
52
+ "@parcha/agentrun-kernel": "0.1.0-beta.58",
53
53
  "zod": "4.6.6"
54
54
  },
55
55
  "publishConfig": {
@@ -10,6 +10,8 @@
10
10
  // (titles agentrun-<tool>: <tool>; MCP and execute ask, edits do not; a refused native call still reports
11
11
  // completed), or "goose-1.59" (as "goose", but titled as Goose 1.59.2 titles a call of an extension's tool:
12
12
  // `agentrun: <tool, its underscores as spaces>`);
13
+ // titleSummary: with style "goose-1.59", the summary Goose 1.59.2 writes after such a title for a call whose
14
+ // arguments it summarizes (a path): `agentrun: <tool> · <titleSummary>`;
13
15
  // askMcp: ask permission before an MCP call (default: by style); askNative: the native kinds that ask;
14
16
  // nativeLog: a file each native call that runs appends its title to;
15
17
  // countFile: a file each event (new, load, prompt, cancel, mcp, permission) is appended to, one JSON line;
@@ -100,7 +102,7 @@ const pgid = (() => {
100
102
  }
101
103
  })();
102
104
  said({ type: "start", env: Object.keys(process.env).sort(), home, cwd: process.cwd(), pgid, ...(config.cursorDirs ? { cursorDir, deniesWrite } : {}) });
103
- const titleOf = (tool) => (style === "cursor" ? `agentrun-${tool}: ${tool}` : style === "goose-1.59" ? `agentrun: ${tool.replace(/_/g, " ")}` : `agentrun__${tool}`);
105
+ const titleOf = (tool) => (style === "cursor" ? `agentrun-${tool}: ${tool}` : style === "goose-1.59" ? `agentrun: ${tool.replace(/_/g, " ")}${config.titleSummary ? ` · ${config.titleSummary}` : ""}` : `agentrun__${tool}`);
104
106
  const late = style === "cursor" && config.announce === "late";
105
107
  const models = config.models ? { currentModelId: config.models[0].modelId, availableModels: config.models } : undefined;
106
108
  /** The credential Cursor derives from its key, in its private HOME: here the key's sha256, never the key. */
@@ -315,7 +317,8 @@ async function takeTurn(client, session, prompt, signal) {
315
317
  const entry = { kind: "native", id, title: update.title, status: "pending" };
316
318
  session.history.push(entry);
317
319
  save(session);
318
- await notify({ sessionUpdate: "tool_call", ...update });
320
+ // {announce: false}: a permission request for a call no tool_call announced.
321
+ if (s.announce !== false) await notify({ sessionUpdate: "tool_call", ...update });
319
322
  const allowed = deniesWrite && EDITS.has(s.native) ? false : askNative.has(s.native) ? await permitted(client, session, update) : true;
320
323
  if (signal.aborted) return { stopReason: "cancelled" };
321
324
  if (allowed && config.nativeLog) appendFileSync(config.nativeLog, `${update.title}\n`);