@noetic-tools/acp 1.3.1-next.2 → 1.4.0

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.
Files changed (51) hide show
  1. package/dist/agents.d.ts +72 -8
  2. package/dist/agents.js +162 -58
  3. package/dist/bin.d.ts +19 -0
  4. package/dist/bin.js +99 -0
  5. package/dist/client.d.ts +14 -0
  6. package/dist/client.js +49 -0
  7. package/dist/connection.d.ts +3 -0
  8. package/dist/connection.js +26 -4
  9. package/dist/define.d.ts +21 -7
  10. package/dist/define.js +139 -15
  11. package/dist/index.d.ts +13 -3
  12. package/dist/index.js +10 -2
  13. package/dist/mcp/node.d.ts +24 -0
  14. package/dist/mcp/node.js +146 -0
  15. package/dist/mcp/server.d.ts +16 -0
  16. package/dist/mcp/server.js +104 -0
  17. package/dist/pi/extension.d.ts +31 -0
  18. package/dist/pi/extension.js +223 -0
  19. package/dist/pi/launch.d.ts +11 -0
  20. package/dist/pi/launch.js +35 -0
  21. package/dist/remote.d.ts +52 -0
  22. package/dist/remote.js +108 -0
  23. package/dist/runner/grants.d.ts +47 -0
  24. package/dist/runner/grants.js +127 -0
  25. package/dist/runner/host.d.ts +21 -0
  26. package/dist/runner/host.js +318 -0
  27. package/dist/runner/options.d.ts +21 -0
  28. package/dist/runner/options.js +82 -0
  29. package/dist/runner/protocol.d.ts +101 -0
  30. package/dist/runner/protocol.js +218 -0
  31. package/dist/runner/serve.d.ts +60 -0
  32. package/dist/runner/serve.js +285 -0
  33. package/dist/runner/ws-link.d.ts +6 -0
  34. package/dist/runner/ws-link.js +47 -0
  35. package/dist/server-env.d.ts +10 -0
  36. package/dist/server-env.js +47 -0
  37. package/dist/spawn.d.ts +12 -0
  38. package/dist/spawn.js +37 -0
  39. package/dist/stdio.d.ts +9 -1
  40. package/dist/stdio.js +97 -55
  41. package/dist/tool-bridge.d.ts +67 -0
  42. package/dist/tool-bridge.js +62 -0
  43. package/dist/tool-permissions.d.ts +46 -0
  44. package/dist/tool-permissions.js +70 -0
  45. package/dist/tool-wiring.d.ts +46 -0
  46. package/dist/tool-wiring.js +203 -0
  47. package/dist/transport-loopback.d.ts +8 -1
  48. package/dist/transport-loopback.js +22 -1
  49. package/dist/turn.d.ts +11 -5
  50. package/dist/turn.js +39 -16
  51. package/package.json +17 -4
package/dist/spawn.js ADDED
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Start a process on an agent's machine and hold its stdio — the seam a stdio
3
+ * MCP server that depends on that machine is started through, with Noetic
4
+ * still its MCP client on the host.
5
+ */
6
+ /**
7
+ * Each call opens the machine, starts `command` there, and releases the
8
+ * machine when the process's stream closes.
9
+ * @public
10
+ */
11
+ export function spawnOn(machine, signal) {
12
+ return async (command) => {
13
+ const opened = await machine({
14
+ signal,
15
+ });
16
+ let process;
17
+ try {
18
+ process = await opened.spawn(command);
19
+ }
20
+ catch (e) {
21
+ await opened.close().catch(() => undefined);
22
+ throw e;
23
+ }
24
+ return {
25
+ readable: process.readable,
26
+ writable: process.writable,
27
+ async close() {
28
+ try {
29
+ await process.close();
30
+ }
31
+ finally {
32
+ await opened.close();
33
+ }
34
+ },
35
+ };
36
+ };
37
+ }
package/dist/stdio.d.ts CHANGED
@@ -7,7 +7,7 @@
7
7
  * lazy dynamic import, so `claudeCode()` works with no extra wiring while
8
8
  * keeping the dependency off the main graph.
9
9
  */
10
- import type { AcpTransportFactory } from '@noetic-tools/types';
10
+ import type { AcpMachineFactory, AcpTransportFactory } from '@noetic-tools/types';
11
11
  /** @public How to launch an ACP agent as a child process. */
12
12
  export interface StdioAgentSpec {
13
13
  /** Identifier used in error messages. */
@@ -25,3 +25,11 @@ export interface StdioAgentSpec {
25
25
  * @public
26
26
  */
27
27
  export declare function stdioAcpTransport(spec: StdioAgentSpec): AcpTransportFactory;
28
+ /**
29
+ * This machine: the bridge is reached on its own loopback address, and the
30
+ * agent and any MCP server beside it run as child processes. The agent gets
31
+ * this process's environment; an MCP server, as the MCP SDK starts one, only
32
+ * `serverEnv`'s short list.
33
+ * @public
34
+ */
35
+ export declare function localMachine(agentId?: string): AcpMachineFactory;
package/dist/stdio.js CHANGED
@@ -10,6 +10,7 @@
10
10
  import { spawn } from 'node:child_process';
11
11
  import { Readable, Writable } from 'node:stream';
12
12
  import { AcpConnectError, frameworkCast } from '@noetic-tools/types';
13
+ import { serverEnv } from './server-env.js';
13
14
  /**
14
15
  * Build a transport factory that spawns `spec.command` and speaks ACP over its
15
16
  * stdin/stdout. The child's stderr is inherited so agent diagnostics reach the
@@ -17,66 +18,107 @@ import { AcpConnectError, frameworkCast } from '@noetic-tools/types';
17
18
  * @public
18
19
  */
19
20
  export function stdioAcpTransport(spec) {
20
- return async (opts) => {
21
- const child = spawn(spec.command, [
22
- ...(spec.args ?? []),
23
- ], {
24
- cwd: opts.cwd,
25
- env: {
26
- ...process.env,
27
- ...spec.env,
28
- ...opts.env,
29
- },
30
- stdio: [
31
- 'pipe',
32
- 'pipe',
33
- 'inherit',
34
- ],
35
- });
36
- const stdin = child.stdin;
37
- const stdout = child.stdout;
38
- if (!stdin || !stdout) {
39
- child.kill();
40
- throw new AcpConnectError({
41
- agentId: spec.agentId,
42
- message: `ACP agent '${spec.agentId}' was spawned without usable stdio pipes.`,
43
- });
44
- }
45
- // A missing binary surfaces asynchronously on the child, long after spawn()
46
- // returned. Capture it so the failure is reported against the agent rather
47
- // than escaping as an unhandled 'error' event.
48
- let spawnError;
49
- child.once('error', (error) => {
50
- spawnError = error;
51
- });
52
- const onAbort = () => {
53
- child.kill();
21
+ return async (opts) => spawnStdio(spec.agentId, {
22
+ command: spec.command,
23
+ args: spec.args,
24
+ env: {
25
+ ...process.env,
26
+ ...spec.env,
27
+ ...opts.env,
28
+ },
29
+ cwd: opts.cwd,
30
+ }, opts.signal);
31
+ }
32
+ /**
33
+ * This machine: the bridge is reached on its own loopback address, and the
34
+ * agent and any MCP server beside it run as child processes. The agent gets
35
+ * this process's environment; an MCP server, as the MCP SDK starts one, only
36
+ * `serverEnv`'s short list.
37
+ * @public
38
+ */
39
+ export function localMachine(agentId = 'local') {
40
+ return async ({ signal }) => {
41
+ const started = new Set();
42
+ const start = async (command, env) => {
43
+ const transport = await spawnStdio(agentId, {
44
+ ...command,
45
+ env,
46
+ }, signal);
47
+ started.add(transport);
48
+ return transport;
54
49
  };
55
- opts.signal?.addEventListener('abort', onAbort, {
56
- once: true,
57
- });
58
- let closed = false;
59
50
  return {
60
- // `node:stream`'s web-stream types are structurally the same as the
61
- // global ones but nominally distinct, so the bridge is cast once here
62
- // rather than leaking a Node-specific type through the transport contract.
63
- readable: frameworkCast(Readable.toWeb(stdout)),
64
- writable: frameworkCast(Writable.toWeb(stdin)),
51
+ reach: async (bridge) => bridge,
52
+ launch: (command) => start(command, {
53
+ ...process.env,
54
+ ...command.env,
55
+ }),
56
+ spawn: (command) => start(command, serverEnv(command.env)),
65
57
  async close() {
66
- if (closed) {
67
- return;
68
- }
69
- closed = true;
70
- opts.signal?.removeEventListener('abort', onAbort);
71
- child.kill();
72
- if (spawnError) {
73
- throw new AcpConnectError({
74
- agentId: spec.agentId,
75
- message: `ACP agent '${spec.agentId}' (${spec.command}) failed to start.`,
76
- cause: spawnError,
77
- });
58
+ for (const transport of started) {
59
+ await transport.close().catch(() => undefined);
78
60
  }
61
+ started.clear();
79
62
  },
80
63
  };
81
64
  };
82
65
  }
66
+ /** Spawn `command` with exactly its `env` and carry its stdin/stdout as a byte stream. */
67
+ async function spawnStdio(agentId, command, signal) {
68
+ const child = spawn(command.command, [
69
+ ...(command.args ?? []),
70
+ ], {
71
+ cwd: command.cwd,
72
+ env: command.env,
73
+ stdio: [
74
+ 'pipe',
75
+ 'pipe',
76
+ 'inherit',
77
+ ],
78
+ });
79
+ const stdin = child.stdin;
80
+ const stdout = child.stdout;
81
+ if (!stdin || !stdout) {
82
+ child.kill();
83
+ throw new AcpConnectError({
84
+ agentId,
85
+ message: `ACP agent '${agentId}' was spawned without usable stdio pipes.`,
86
+ });
87
+ }
88
+ // A missing binary surfaces asynchronously on the child, long after spawn()
89
+ // returned. Capture it so the failure is reported against the agent rather
90
+ // than escaping as an unhandled 'error' event.
91
+ let spawnError;
92
+ child.once('error', (error) => {
93
+ spawnError = error;
94
+ });
95
+ const onAbort = () => {
96
+ child.kill();
97
+ };
98
+ signal?.addEventListener('abort', onAbort, {
99
+ once: true,
100
+ });
101
+ let closed = false;
102
+ return {
103
+ // `node:stream`'s web-stream types are structurally the same as the
104
+ // global ones but nominally distinct, so the bridge is cast once here
105
+ // rather than leaking a Node-specific type through the transport contract.
106
+ readable: frameworkCast(Readable.toWeb(stdout)),
107
+ writable: frameworkCast(Writable.toWeb(stdin)),
108
+ async close() {
109
+ if (closed) {
110
+ return;
111
+ }
112
+ closed = true;
113
+ signal?.removeEventListener('abort', onAbort);
114
+ child.kill();
115
+ if (spawnError) {
116
+ throw new AcpConnectError({
117
+ agentId,
118
+ message: `ACP agent '${agentId}' (${command.command}) failed to start.`,
119
+ cause: spawnError,
120
+ });
121
+ }
122
+ },
123
+ };
124
+ }
@@ -0,0 +1,67 @@
1
+ /**
2
+ * Serves a step's Noetic tools to the agent over MCP, configured so the
3
+ * agent's model sees them exactly as a `callModel` model would.
4
+ *
5
+ * Out of the box agents hide MCP tools behind a search or code step, cut large
6
+ * results, and run their own approval review. Each preset's
7
+ * {@link AcpToolWiring} turns those off. Some agents only read those settings
8
+ * at launch, so the bridge starts before the agent process does.
9
+ */
10
+ import type { AcpMcpServer, AcpTool, AcpToolHost, ToolBridgeAddress } from '@noetic-tools/types';
11
+ import type { BridgedPermissionCheck } from './tool-permissions.js';
12
+ export type { ToolBridgeAddress } from '@noetic-tools/types';
13
+ /** @public What a preset's launch settings are built from. */
14
+ export interface ToolBridgeLaunch {
15
+ /** The bridge as the agent reaches it, from its own machine. */
16
+ readonly bridge: ToolBridgeAddress;
17
+ readonly tools: ReadonlyArray<AcpTool>;
18
+ /** The user's own MCP servers for the session. */
19
+ readonly mcpServers: ReadonlyArray<AcpMcpServer>;
20
+ /** The preset's environment, to merge into rather than replace. */
21
+ readonly env: Record<string, string | undefined>;
22
+ }
23
+ /**
24
+ * How one agent takes the bridge.
25
+ * @public
26
+ */
27
+ export interface AcpToolWiring {
28
+ /**
29
+ * `'session'`: the bridge joins the `session/new` MCP servers.
30
+ * `'launch'`: `launchEnv` declares every MCP server — the bridge and the
31
+ * user's own — and `session/new` carries none. For agents that drop
32
+ * per-server settings from servers given in `session/new`.
33
+ */
34
+ readonly declare: 'session' | 'launch';
35
+ /** Environment for the agent process that switches its tool handling to match `callModel`. */
36
+ launchEnv?(launch: ToolBridgeLaunch): Record<string, string>;
37
+ /**
38
+ * Recognizes this agent's permission requests for bridged tools, which are
39
+ * then allowed. Without one, every request goes to the step's policy.
40
+ */
41
+ readonly permits?: BridgedPermissionCheck;
42
+ }
43
+ /** A running bridge, owned by one connection. */
44
+ export interface ToolBridge {
45
+ readonly declare: AcpToolWiring['declare'];
46
+ /** The MCP server entry for `session/new`. */
47
+ readonly server: AcpMcpServer;
48
+ readonly env: Record<string, string>;
49
+ readonly permits?: BridgedPermissionCheck;
50
+ close(): Promise<void>;
51
+ }
52
+ /**
53
+ * Start the loopback MCP server, carry it to the agent's machine, and work
54
+ * out the agent's launch settings from the address it reaches there. The
55
+ * node-only server module loads on first use, so the package's main entry
56
+ * stays runtime-neutral.
57
+ */
58
+ export declare function startToolBridge(opts: {
59
+ wiring: AcpToolWiring;
60
+ getHost: () => AcpToolHost | undefined;
61
+ serverName: string;
62
+ tools: ReadonlyArray<AcpTool>;
63
+ mcpServers: ReadonlyArray<AcpMcpServer>;
64
+ env?: Record<string, string | undefined>;
65
+ /** Carries the bridge to the agent's machine; this machine's loopback by default. */
66
+ reach?: (bridge: ToolBridgeAddress) => Promise<ToolBridgeAddress>;
67
+ }): Promise<ToolBridge>;
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Serves a step's Noetic tools to the agent over MCP, configured so the
3
+ * agent's model sees them exactly as a `callModel` model would.
4
+ *
5
+ * Out of the box agents hide MCP tools behind a search or code step, cut large
6
+ * results, and run their own approval review. Each preset's
7
+ * {@link AcpToolWiring} turns those off. Some agents only read those settings
8
+ * at launch, so the bridge starts before the agent process does.
9
+ */
10
+ //#endregion
11
+ //#region Public API
12
+ /**
13
+ * Start the loopback MCP server, carry it to the agent's machine, and work
14
+ * out the agent's launch settings from the address it reaches there. The
15
+ * node-only server module loads on first use, so the package's main entry
16
+ * stays runtime-neutral.
17
+ */
18
+ export async function startToolBridge(opts) {
19
+ const { serveToolsOverHttp } = await import('./mcp/node.js');
20
+ const http = await serveToolsOverHttp(opts.getHost);
21
+ const local = {
22
+ serverName: opts.serverName,
23
+ url: http.url,
24
+ headers: [
25
+ {
26
+ name: 'Authorization',
27
+ value: `Bearer ${http.token}`,
28
+ },
29
+ ],
30
+ };
31
+ let bridge;
32
+ let env;
33
+ try {
34
+ bridge = opts.reach ? await opts.reach(local) : local;
35
+ env =
36
+ opts.wiring.launchEnv?.({
37
+ bridge,
38
+ tools: opts.tools,
39
+ mcpServers: opts.mcpServers,
40
+ env: opts.env ?? {},
41
+ }) ?? {};
42
+ }
43
+ catch (e) {
44
+ await http.close();
45
+ throw e;
46
+ }
47
+ return {
48
+ declare: opts.wiring.declare,
49
+ server: {
50
+ type: 'http',
51
+ name: bridge.serverName,
52
+ url: bridge.url,
53
+ headers: [
54
+ ...bridge.headers,
55
+ ],
56
+ },
57
+ env,
58
+ permits: opts.wiring.permits,
59
+ close: () => http.close(),
60
+ };
61
+ }
62
+ //#endregion
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Recognizes an agent's permission request for one of the bridged Noetic tools.
3
+ *
4
+ * A bridged tool is gated by the same steering and `needsApproval` checks as
5
+ * in `callModel`, when the call reaches the bridge. The agent's own
6
+ * permission request is a second gate `callModel` never has, so it is
7
+ * answered `allow` without consulting the step's ACP permission policy.
8
+ *
9
+ * Because that skips the policy, each agent is recognized only by fields its
10
+ * own adapter sets, never by a title alone: some agents title a call with
11
+ * text the model wrote (a subagent's description), which could spell a
12
+ * bridged tool's name. An agent with no such field gets no automatic answer;
13
+ * its requests go to the step's policy like any other.
14
+ */
15
+ import type { AcpPermissionOption, AcpRequestPermissionRequest, AcpToolHost } from '@noetic-tools/types';
16
+ type ToolCallUpdate = AcpRequestPermissionRequest['toolCall'];
17
+ /**
18
+ * True when a permission request is for one of the host's tools. `announced`
19
+ * is the agent's earlier `tool_call` update for the same id.
20
+ * @public
21
+ */
22
+ export type BridgedPermissionCheck = (request: AcpRequestPermissionRequest, host: AcpToolHost, announced: ToolCallUpdate | undefined) => boolean;
23
+ /**
24
+ * Claude Code names the tool it runs in `_meta.claudeCode.toolName`, and the
25
+ * MCP server in `_meta.claudeCode.mcpServer.name` — both set by its adapter,
26
+ * not the model.
27
+ * @public
28
+ */
29
+ export declare const claudeBridgedPermission: BridgedPermissionCheck;
30
+ /**
31
+ * Codex marks an MCP approval with `_meta.is_mcp_tool_approval` and sends no
32
+ * title; the `tool_call` it announced for the same id carries
33
+ * `_meta.is_mcp_tool_call` and the title `mcp.<server>.<tool>`, which Codex
34
+ * builds from the server and tool it is calling.
35
+ * @public
36
+ */
37
+ export declare const codexBridgedPermission: BridgedPermissionCheck;
38
+ /**
39
+ * Gemini CLI titles a call with display text, but builds its id from the
40
+ * registered tool name: `mcp_<server>_<tool>__call_<n>`.
41
+ * @public
42
+ */
43
+ export declare const geminiBridgedPermission: BridgedPermissionCheck;
44
+ /** The option that allows the call once, falling back to any allow option. */
45
+ export declare function allowOnceOption(options: ReadonlyArray<AcpPermissionOption>): AcpPermissionOption | undefined;
46
+ export {};
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Recognizes an agent's permission request for one of the bridged Noetic tools.
3
+ *
4
+ * A bridged tool is gated by the same steering and `needsApproval` checks as
5
+ * in `callModel`, when the call reaches the bridge. The agent's own
6
+ * permission request is a second gate `callModel` never has, so it is
7
+ * answered `allow` without consulting the step's ACP permission policy.
8
+ *
9
+ * Because that skips the policy, each agent is recognized only by fields its
10
+ * own adapter sets, never by a title alone: some agents title a call with
11
+ * text the model wrote (a subagent's description), which could spell a
12
+ * bridged tool's name. An agent with no such field gets no automatic answer;
13
+ * its requests go to the step's policy like any other.
14
+ */
15
+ import { bridgedToolTitles, geminiToolNameMatches } from '@noetic-tools/types';
16
+ //#endregion
17
+ //#region Helpers
18
+ function recordOf(value) {
19
+ if (typeof value !== 'object' || value === null || Array.isArray(value)) {
20
+ return undefined;
21
+ }
22
+ return Object.fromEntries(Object.entries(value));
23
+ }
24
+ /** The exact titles `form` gives the host's tools. */
25
+ function titlesOf(host, form) {
26
+ return new Set(host.tools.flatMap((tool) => bridgedToolTitles(host.serverName, tool.name)[form] ?? []));
27
+ }
28
+ const CLAUDE_FORM = 0;
29
+ const CODEX_FORM = 1;
30
+ //#endregion
31
+ //#region Public API
32
+ /**
33
+ * Claude Code names the tool it runs in `_meta.claudeCode.toolName`, and the
34
+ * MCP server in `_meta.claudeCode.mcpServer.name` — both set by its adapter,
35
+ * not the model.
36
+ * @public
37
+ */
38
+ export const claudeBridgedPermission = (request, host) => {
39
+ const claudeCode = recordOf(recordOf(request.toolCall._meta)?.claudeCode);
40
+ const toolName = claudeCode?.toolName;
41
+ return (recordOf(claudeCode?.mcpServer)?.name === host.serverName &&
42
+ typeof toolName === 'string' &&
43
+ titlesOf(host, CLAUDE_FORM).has(toolName));
44
+ };
45
+ /**
46
+ * Codex marks an MCP approval with `_meta.is_mcp_tool_approval` and sends no
47
+ * title; the `tool_call` it announced for the same id carries
48
+ * `_meta.is_mcp_tool_call` and the title `mcp.<server>.<tool>`, which Codex
49
+ * builds from the server and tool it is calling.
50
+ * @public
51
+ */
52
+ export const codexBridgedPermission = (request, host, announced) => {
53
+ const title = announced?.title;
54
+ return (recordOf(request._meta)?.is_mcp_tool_approval === true &&
55
+ recordOf(announced?._meta)?.is_mcp_tool_call === true &&
56
+ typeof title === 'string' &&
57
+ titlesOf(host, CODEX_FORM).has(title));
58
+ };
59
+ /**
60
+ * Gemini CLI titles a call with display text, but builds its id from the
61
+ * registered tool name: `mcp_<server>_<tool>__call_<n>`.
62
+ * @public
63
+ */
64
+ export const geminiBridgedPermission = (request, host) => host.tools.some((tool) => geminiToolNameMatches(host.serverName, tool.name, request.toolCall.toolCallId));
65
+ /** The option that allows the call once, falling back to any allow option. */
66
+ export function allowOnceOption(options) {
67
+ return (options.find((option) => option.kind === 'allow_once') ??
68
+ options.find((option) => option.kind === 'allow_always'));
69
+ }
70
+ //#endregion
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Per-agent settings that make bridged tools reach the agent's model exactly
3
+ * as they reach a `callModel` model: listed up front, output uncut, no extra
4
+ * approval step, and no timeout a model-driven call would not have.
5
+ */
6
+ import type { AcpToolWiring } from './tool-bridge.js';
7
+ /**
8
+ * codex-acp replaces `CODEX_CONFIG.mcp_servers` with the servers in
9
+ * `session/new`, and builds those from address fields only. So every server —
10
+ * the bridge with its settings, and the user's own — is declared here, and
11
+ * `session/new` carries none.
12
+ */
13
+ export declare const codexToolWiring: AcpToolWiring;
14
+ /**
15
+ * Claude Code reads its per-tool hints from the tool listing; the call
16
+ * timeout and its MCP output token cap are set here.
17
+ */
18
+ export declare const claudeToolWiring: AcpToolWiring;
19
+ /** opencode otherwise cuts tool output at 50 KiB and saves the rest to a file. */
20
+ export declare const opencodeToolWiring: AcpToolWiring;
21
+ /**
22
+ * Gemini CLI lists tools up front and returns output whole as is. It starts
23
+ * the bridge only in a folder it trusts, which is the user's call to make
24
+ * (`gemini({ trustWorkspace })`), never the wiring's.
25
+ */
26
+ export declare const geminiToolWiring: AcpToolWiring;
27
+ /**
28
+ * pi has no MCP client, and pi-acp drops the MCP servers it is given. So the
29
+ * bridge is declared at launch: pi-acp starts the `noetic-pi` launcher in
30
+ * place of `pi` (`PI_ACP_PI_COMMAND`), which adds the `pi-noetic-tools`
31
+ * extension. The extension registers each bridged tool as a native pi tool —
32
+ * same name, description and schema — and pi cuts no extension tool's result.
33
+ * A `PI_ACP_PI_COMMAND` the host already set is the pi the launcher starts.
34
+ */
35
+ export declare const piToolWiring: AcpToolWiring;
36
+ /**
37
+ * The launcher shipped beside this module. A runner started with
38
+ * `--agent pi` names its own in place of the one a host sends.
39
+ */
40
+ export declare function piLauncherPath(): string;
41
+ /**
42
+ * Any agent that takes MCP servers in `session/new` and needs no settings.
43
+ * It has no way to recognize the agent's permission requests for bridged
44
+ * tools, so those go to the step's policy.
45
+ */
46
+ export declare const sessionToolWiring: AcpToolWiring;