@agentclientprotocol/claude-agent-acp 0.102.1-preview.1 → 0.102.1-preview.2
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/README.md +5 -1
- package/dist/acp-agent.d.ts +113 -439
- package/dist/acp-agent.d.ts.map +1 -1
- package/dist/acp-agent.js +362 -2409
- package/dist/acp-subagents.d.ts +1 -2
- package/dist/acp-subagents.d.ts.map +1 -1
- package/dist/auth-methods.d.ts +21 -0
- package/dist/auth-methods.d.ts.map +1 -0
- package/dist/auth-methods.js +68 -0
- package/dist/auth-status-reporter.d.ts +112 -0
- package/dist/auth-status-reporter.d.ts.map +1 -0
- package/dist/auth-status-reporter.js +253 -0
- package/dist/background-work.d.ts +12 -265
- package/dist/background-work.d.ts.map +1 -1
- package/dist/background-work.js +8 -558
- package/dist/client-system-prompt.d.ts +7 -0
- package/dist/client-system-prompt.d.ts.map +1 -1
- package/dist/client-system-prompt.js +24 -0
- package/dist/context-compaction.d.ts +20 -0
- package/dist/context-compaction.d.ts.map +1 -1
- package/dist/context-compaction.js +26 -0
- package/dist/context-window.d.ts +70 -0
- package/dist/context-window.d.ts.map +1 -0
- package/dist/context-window.js +132 -0
- package/dist/diff.d.ts +1 -1
- package/dist/diff.js +1 -1
- package/dist/elicitation.d.ts +66 -1
- package/dist/elicitation.d.ts.map +1 -1
- package/dist/elicitation.js +109 -0
- package/dist/file-change-audit.d.ts +4 -3
- package/dist/file-change-audit.d.ts.map +1 -1
- package/dist/file-change-audit.js +3 -2
- package/dist/mcp-oauth.d.ts +44 -0
- package/dist/mcp-oauth.d.ts.map +1 -0
- package/dist/mcp-oauth.js +142 -0
- package/dist/mcp-servers.d.ts +10 -0
- package/dist/mcp-servers.d.ts.map +1 -0
- package/dist/mcp-servers.js +29 -0
- package/dist/native-subagents.d.ts +18 -8
- package/dist/native-subagents.d.ts.map +1 -1
- package/dist/native-subagents.js +7 -35
- package/dist/permissions/presentation.d.ts +29 -0
- package/dist/permissions/presentation.d.ts.map +1 -1
- package/dist/permissions/presentation.js +38 -11
- package/dist/prompt-suggestions.d.ts +29 -0
- package/dist/prompt-suggestions.d.ts.map +1 -1
- package/dist/prompt-suggestions.js +45 -0
- package/dist/providers.d.ts +139 -0
- package/dist/providers.d.ts.map +1 -0
- package/dist/providers.js +286 -0
- package/dist/remote-control.d.ts +62 -0
- package/dist/remote-control.d.ts.map +1 -0
- package/dist/remote-control.js +78 -0
- package/dist/result-end.d.ts +39 -0
- package/dist/result-end.d.ts.map +1 -0
- package/dist/result-end.js +50 -0
- package/dist/serve.d.ts +7 -2
- package/dist/serve.d.ts.map +1 -1
- package/dist/serve.js +10 -5
- package/dist/session-config-ids.d.ts +1 -0
- package/dist/session-config-ids.d.ts.map +1 -1
- package/dist/session-config-ids.js +1 -0
- package/dist/session-config-options.d.ts +64 -0
- package/dist/session-config-options.d.ts.map +1 -0
- package/dist/session-config-options.js +162 -0
- package/dist/session-effort.d.ts +67 -0
- package/dist/session-effort.d.ts.map +1 -1
- package/dist/session-effort.js +98 -0
- package/dist/session-env.d.ts +22 -0
- package/dist/session-env.d.ts.map +1 -0
- package/dist/session-env.js +66 -0
- package/dist/session-fast-mode.d.ts +83 -0
- package/dist/session-fast-mode.d.ts.map +1 -0
- package/dist/session-fast-mode.js +142 -0
- package/dist/session-index/connection.d.ts +2 -5
- package/dist/session-index/connection.d.ts.map +1 -1
- package/dist/session-index/connection.js +3 -5
- package/dist/session-mode.d.ts +1 -0
- package/dist/session-mode.d.ts.map +1 -1
- package/dist/session-mode.js +1 -1
- package/dist/session-model.d.ts +41 -0
- package/dist/session-model.d.ts.map +1 -1
- package/dist/session-model.js +110 -45
- package/dist/session-notices.d.ts +44 -0
- package/dist/session-notices.d.ts.map +1 -1
- package/dist/session-notices.js +68 -0
- package/dist/session-titles.d.ts +34 -12
- package/dist/session-titles.d.ts.map +1 -1
- package/dist/session-titles.js +7 -6
- package/dist/session-usage.d.ts +125 -0
- package/dist/session-usage.d.ts.map +1 -0
- package/dist/session-usage.js +196 -0
- package/dist/streamed-text.d.ts +33 -0
- package/dist/streamed-text.d.ts.map +1 -0
- package/dist/streamed-text.js +71 -0
- package/dist/subagent-configuration.d.ts +32 -0
- package/dist/subagent-configuration.d.ts.map +1 -0
- package/dist/subagent-configuration.js +70 -0
- package/dist/subagent-replay.d.ts +18 -0
- package/dist/subagent-replay.d.ts.map +1 -1
- package/dist/subagent-replay.js +25 -15
- package/dist/tool-calls/client-capabilities.d.ts +8 -8
- package/dist/tool-calls/client-capabilities.js +4 -4
- package/dist/tool-calls/renderer.d.ts +4 -5
- package/dist/tool-calls/renderer.d.ts.map +1 -1
- package/dist/tool-calls/renderer.js +4 -5
- package/dist/turn-events.d.ts +6 -46
- package/dist/turn-events.d.ts.map +1 -1
- package/dist/v2/agent.d.ts +7 -11
- package/dist/v2/agent.d.ts.map +1 -1
- package/dist/v2/agent.js +751 -331
- package/dist/v2/air.d.ts +33 -0
- package/dist/v2/air.d.ts.map +1 -0
- package/dist/v2/air.js +29 -0
- package/dist/v2/auth.d.ts +97 -0
- package/dist/v2/auth.d.ts.map +1 -0
- package/dist/v2/auth.js +216 -0
- package/dist/v2/background.d.ts +27 -16
- package/dist/v2/background.d.ts.map +1 -1
- package/dist/v2/background.js +4 -32
- package/dist/v2/child-config.d.ts +55 -0
- package/dist/v2/child-config.d.ts.map +1 -0
- package/dist/v2/child-config.js +92 -0
- package/dist/v2/clear-context.d.ts +94 -0
- package/dist/v2/clear-context.d.ts.map +1 -0
- package/dist/v2/clear-context.js +176 -0
- package/dist/v2/commands.d.ts +46 -0
- package/dist/v2/commands.d.ts.map +1 -0
- package/dist/v2/commands.js +54 -0
- package/dist/v2/config.d.ts +187 -0
- package/dist/v2/config.d.ts.map +1 -0
- package/dist/v2/config.js +494 -0
- package/dist/v2/elicitation.d.ts +93 -0
- package/dist/v2/elicitation.d.ts.map +1 -0
- package/dist/v2/elicitation.js +160 -0
- package/dist/v2/file-changes.d.ts +61 -0
- package/dist/v2/file-changes.d.ts.map +1 -0
- package/dist/v2/file-changes.js +108 -0
- package/dist/v2/file-preview.d.ts +18 -0
- package/dist/v2/file-preview.d.ts.map +1 -0
- package/dist/v2/file-preview.js +29 -0
- package/dist/v2/initialize.d.ts +10 -24
- package/dist/v2/initialize.d.ts.map +1 -1
- package/dist/v2/initialize.js +4 -111
- package/dist/v2/outcome.d.ts +81 -0
- package/dist/v2/outcome.d.ts.map +1 -0
- package/dist/v2/outcome.js +165 -0
- package/dist/v2/permissions.d.ts +92 -0
- package/dist/v2/permissions.d.ts.map +1 -0
- package/dist/v2/permissions.js +162 -0
- package/dist/v2/prompt.d.ts +2 -42
- package/dist/v2/prompt.d.ts.map +1 -1
- package/dist/v2/prompt.js +2 -119
- package/dist/v2/remote-control.d.ts +41 -0
- package/dist/v2/remote-control.d.ts.map +1 -0
- package/dist/v2/remote-control.js +63 -0
- package/dist/v2/reports.d.ts +198 -0
- package/dist/v2/reports.d.ts.map +1 -0
- package/dist/v2/reports.js +487 -0
- package/dist/v2/restarts.d.ts +128 -0
- package/dist/v2/restarts.d.ts.map +1 -0
- package/dist/v2/restarts.js +348 -0
- package/dist/v2/session-requests.d.ts +20 -0
- package/dist/v2/session-requests.d.ts.map +1 -0
- package/dist/v2/session-requests.js +108 -0
- package/dist/v2/session-update.d.ts +2 -13
- package/dist/v2/session-update.d.ts.map +1 -1
- package/dist/v2/session-update.js +2 -22
- package/dist/v2/session.d.ts +340 -41
- package/dist/v2/session.d.ts.map +1 -1
- package/dist/v2/session.js +1223 -141
- package/dist/v2/setup.d.ts +49 -0
- package/dist/v2/setup.d.ts.map +1 -0
- package/dist/v2/setup.js +62 -0
- package/dist/v2/stopped-work.d.ts +123 -0
- package/dist/v2/stopped-work.d.ts.map +1 -0
- package/dist/v2/stopped-work.js +210 -0
- package/dist/v2/stream.d.ts +228 -0
- package/dist/v2/stream.d.ts.map +1 -0
- package/dist/v2/stream.js +506 -0
- package/dist/v2/subagent-replay.d.ts +115 -0
- package/dist/v2/subagent-replay.d.ts.map +1 -0
- package/dist/v2/subagent-replay.js +479 -0
- package/dist/v2/subscription-guard.d.ts +60 -0
- package/dist/v2/subscription-guard.d.ts.map +1 -0
- package/dist/v2/subscription-guard.js +84 -0
- package/dist/v2/tasks.d.ts +492 -0
- package/dist/v2/tasks.d.ts.map +1 -0
- package/dist/v2/tasks.js +1728 -0
- package/dist/v2/terminal.d.ts.map +1 -1
- package/dist/v2/terminal.js +6 -1
- package/dist/v2/tool-call.d.ts +3 -2
- package/dist/v2/tool-call.d.ts.map +1 -1
- package/dist/v2/update-translator.d.ts +36 -0
- package/dist/v2/update-translator.d.ts.map +1 -0
- package/dist/v2/update-translator.js +80 -0
- package/dist/workflow-progress.d.ts +23 -0
- package/dist/workflow-progress.d.ts.map +1 -1
- package/dist/workflow-progress.js +31 -8
- package/package.json +1 -1
- package/dist/v2/permission.d.ts +0 -28
- package/dist/v2/permission.d.ts.map +0 -1
- package/dist/v2/permission.js +0 -41
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OAuth for the MCP servers that Claude Code reports as `needs-auth`, as an
|
|
3
|
+
* ACP URL elicitation. Protocol-neutral: the v1 core and the v2 core
|
|
4
|
+
* both start it once a session's setup response is sent.
|
|
5
|
+
*/
|
|
6
|
+
import { randomUUID } from "node:crypto";
|
|
7
|
+
/** Claude Code keeps the OAuth callback listener open in the background after
|
|
8
|
+
* `mcpAuthenticate` returns the authorization URL. The SDK does not expose
|
|
9
|
+
* that listener's completion promise, so watch the server status while the
|
|
10
|
+
* ACP client has the URL elicitation open. */
|
|
11
|
+
const MCP_OAUTH_STATUS_POLL_MS = 1_000;
|
|
12
|
+
const MCP_OAUTH_TIMEOUT_MS = 10 * 60_000;
|
|
13
|
+
export function supportsMcpOAuth(query) {
|
|
14
|
+
return typeof query.mcpAuthenticate === "function";
|
|
15
|
+
}
|
|
16
|
+
const mcpAuthentications = new WeakMap();
|
|
17
|
+
/** Start OAuth in the background for the servers in `requestedServers` that
|
|
18
|
+
* Claude reports as needing authentication. It does nothing while another
|
|
19
|
+
* OAuth run of the session is in progress. */
|
|
20
|
+
export function startMcpServerAuthentication(client, session, requestedServers) {
|
|
21
|
+
if (!client.urlElicitation || requestedServers.size === 0)
|
|
22
|
+
return;
|
|
23
|
+
const query = session.currentQuery();
|
|
24
|
+
if (!query || mcpAuthentications.has(session.key))
|
|
25
|
+
return;
|
|
26
|
+
const authentication = authenticateMcpServers(client, session, query, requestedServers)
|
|
27
|
+
.catch((error) => {
|
|
28
|
+
if (!session.closed.aborted) {
|
|
29
|
+
client.logger.error(`Failed to inspect MCP servers for OAuth: ${error}`);
|
|
30
|
+
}
|
|
31
|
+
})
|
|
32
|
+
.finally(() => {
|
|
33
|
+
if (mcpAuthentications.get(session.key) === authentication) {
|
|
34
|
+
mcpAuthentications.delete(session.key);
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
mcpAuthentications.set(session.key, authentication);
|
|
38
|
+
}
|
|
39
|
+
async function authenticateMcpServers(client, session, query, requestedServers) {
|
|
40
|
+
if (!supportsMcpOAuth(query)) {
|
|
41
|
+
client.logger.error("The Claude Agent SDK does not expose MCP OAuth authentication.");
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
const statuses = await query.mcpServerStatus();
|
|
45
|
+
for (const status of statuses) {
|
|
46
|
+
if (status.status !== "needs-auth" || !requestedServers.has(status.name))
|
|
47
|
+
continue;
|
|
48
|
+
try {
|
|
49
|
+
await authenticateMcpServer(client, session, query, status.name);
|
|
50
|
+
}
|
|
51
|
+
catch (error) {
|
|
52
|
+
if (session.currentQuery() && !session.closed.aborted) {
|
|
53
|
+
client.logger.error(`Failed to authenticate MCP server ${status.name}: ${error}`);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
/** Bridge Claude Code's startup MCP OAuth control to ACP URL elicitation.
|
|
59
|
+
* Claude opens and owns the localhost callback listener; the ACP client only
|
|
60
|
+
* needs to present the returned authorization URL. */
|
|
61
|
+
async function authenticateMcpServer(client, session, query, serverName) {
|
|
62
|
+
if (!session.currentQuery())
|
|
63
|
+
return;
|
|
64
|
+
const login = await query.mcpAuthenticate(serverName);
|
|
65
|
+
if (!login.requiresUserAction)
|
|
66
|
+
return;
|
|
67
|
+
if (!login.authUrl) {
|
|
68
|
+
throw new Error("Claude Code requested user action without returning an authorization URL");
|
|
69
|
+
}
|
|
70
|
+
const elicitationId = `mcp-oauth-${randomUUID()}`;
|
|
71
|
+
const flowAbort = new AbortController();
|
|
72
|
+
const abortFlow = () => flowAbort.abort(session.closed.reason);
|
|
73
|
+
session.closed.addEventListener("abort", abortFlow, { once: true });
|
|
74
|
+
if (session.closed.aborted)
|
|
75
|
+
abortFlow();
|
|
76
|
+
try {
|
|
77
|
+
const completed = waitForMcpAuthentication(session, query, serverName, flowAbort.signal);
|
|
78
|
+
const elicitation = client.createElicitation({
|
|
79
|
+
mode: "url",
|
|
80
|
+
sessionId: session.sessionId,
|
|
81
|
+
message: `Authenticate with MCP server ${serverName}`,
|
|
82
|
+
url: login.authUrl,
|
|
83
|
+
elicitationId,
|
|
84
|
+
}, flowAbort.signal);
|
|
85
|
+
const first = await Promise.race([
|
|
86
|
+
completed.then((authenticated) => ({ type: "completed", authenticated })),
|
|
87
|
+
elicitation.then((response) => ({ type: "elicitation", response })),
|
|
88
|
+
]);
|
|
89
|
+
// A url-mode accept carries no content to check. The guard
|
|
90
|
+
// `CreateElicitationResponse.isAccept` would also reject an accept whose
|
|
91
|
+
// `content` holds a v2-only value, such as an object.
|
|
92
|
+
if (first.type === "elicitation" && first.response.action !== "accept") {
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
if (first.type === "elicitation") {
|
|
96
|
+
await completed;
|
|
97
|
+
}
|
|
98
|
+
try {
|
|
99
|
+
await client.completeElicitation({ elicitationId });
|
|
100
|
+
}
|
|
101
|
+
catch (error) {
|
|
102
|
+
if (!flowAbort.signal.aborted) {
|
|
103
|
+
client.logger.error(`Failed to complete MCP OAuth elicitation: ${error}`);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
finally {
|
|
108
|
+
flowAbort.abort();
|
|
109
|
+
session.closed.removeEventListener("abort", abortFlow);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
async function waitForMcpAuthentication(session, query, serverName, signal) {
|
|
113
|
+
const deadline = Date.now() + MCP_OAUTH_TIMEOUT_MS;
|
|
114
|
+
while (!signal.aborted && Date.now() < deadline) {
|
|
115
|
+
if (session.currentQuery() !== query)
|
|
116
|
+
return false;
|
|
117
|
+
const status = (await query.mcpServerStatus()).find((server) => server.name === serverName);
|
|
118
|
+
if (!status || status.status === "failed" || status.status === "disabled")
|
|
119
|
+
return false;
|
|
120
|
+
if (status.status === "connected")
|
|
121
|
+
return true;
|
|
122
|
+
if (!(await waitUnlessAborted(MCP_OAUTH_STATUS_POLL_MS, signal)))
|
|
123
|
+
return false;
|
|
124
|
+
}
|
|
125
|
+
return false;
|
|
126
|
+
}
|
|
127
|
+
/** Wait for a polling interval, resolving false when the session is aborted. */
|
|
128
|
+
export function waitUnlessAborted(milliseconds, signal) {
|
|
129
|
+
if (signal.aborted)
|
|
130
|
+
return Promise.resolve(false);
|
|
131
|
+
return new Promise((resolve) => {
|
|
132
|
+
const timer = setTimeout(() => {
|
|
133
|
+
signal.removeEventListener("abort", onAbort);
|
|
134
|
+
resolve(true);
|
|
135
|
+
}, milliseconds);
|
|
136
|
+
const onAbort = () => {
|
|
137
|
+
clearTimeout(timer);
|
|
138
|
+
resolve(false);
|
|
139
|
+
};
|
|
140
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
141
|
+
});
|
|
142
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { McpServer } from "@agentclientprotocol/sdk/unstable";
|
|
2
|
+
import type { McpServerConfig } from "@anthropic-ai/claude-agent-sdk";
|
|
3
|
+
/**
|
|
4
|
+
* The SDK configs of a session's ACP MCP servers, by name. HTTP and SSE
|
|
5
|
+
* servers keep their URL and headers; a server without `type` is stdio. A
|
|
6
|
+
* server of any other transport is left out: the session's `initialize`
|
|
7
|
+
* advertises none.
|
|
8
|
+
*/
|
|
9
|
+
export declare function sdkMcpServers(servers: readonly McpServer[] | null | undefined): Record<string, McpServerConfig>;
|
|
10
|
+
//# sourceMappingURL=mcp-servers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-servers.d.ts","sourceRoot":"","sources":["../src/mcp-servers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAEtE;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,SAAS,SAAS,EAAE,GAAG,IAAI,GAAG,SAAS,GAC/C,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAqBjC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The SDK configs of a session's ACP MCP servers, by name. HTTP and SSE
|
|
3
|
+
* servers keep their URL and headers; a server without `type` is stdio. A
|
|
4
|
+
* server of any other transport is left out: the session's `initialize`
|
|
5
|
+
* advertises none.
|
|
6
|
+
*/
|
|
7
|
+
export function sdkMcpServers(servers) {
|
|
8
|
+
const configs = {};
|
|
9
|
+
for (const server of servers ?? []) {
|
|
10
|
+
if ("type" in server && (server.type === "http" || server.type === "sse")) {
|
|
11
|
+
configs[server.name] = {
|
|
12
|
+
type: server.type,
|
|
13
|
+
url: server.url,
|
|
14
|
+
headers: server.headers
|
|
15
|
+
? Object.fromEntries(server.headers.map((e) => [e.name, e.value]))
|
|
16
|
+
: undefined,
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
else if (!("type" in server)) {
|
|
20
|
+
configs[server.name] = {
|
|
21
|
+
type: "stdio",
|
|
22
|
+
command: server.command,
|
|
23
|
+
args: server.args,
|
|
24
|
+
env: server.env ? Object.fromEntries(server.env.map((e) => [e.name, e.value])) : undefined,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return configs;
|
|
29
|
+
}
|
|
@@ -109,6 +109,12 @@ type TaskStarted = {
|
|
|
109
109
|
description?: unknown;
|
|
110
110
|
prompt?: unknown;
|
|
111
111
|
};
|
|
112
|
+
export type SubagentIdentity = {
|
|
113
|
+
name?: string;
|
|
114
|
+
description?: string;
|
|
115
|
+
prompt?: string;
|
|
116
|
+
subagentType?: string;
|
|
117
|
+
};
|
|
112
118
|
/** An agent of the session's subagent history, as the runtime restores it. */
|
|
113
119
|
export type HistoricalSubagent = {
|
|
114
120
|
agentId: string;
|
|
@@ -218,13 +224,6 @@ export declare class NativeSubagentRuntime {
|
|
|
218
224
|
* `sessionId` of this live session, or undefined when no such child runs here.
|
|
219
225
|
*/
|
|
220
226
|
liveWorkState(sessionId: string): WorkState["state"] | undefined;
|
|
221
|
-
/**
|
|
222
|
-
* The RFD form: the `subagent_update` that tells a client that holds nothing
|
|
223
|
-
* of the announced child `sessionId` of this live session what it is now:
|
|
224
|
-
* its labels, its directory, its `cancel` capability, and its work state.
|
|
225
|
-
* Undefined when no such child runs here.
|
|
226
|
-
*/
|
|
227
|
-
currentUpdate(sessionId: string): AcpSessionNotification | undefined;
|
|
228
227
|
/**
|
|
229
228
|
* Reports the model of a child response, an exact model id, as the entry of
|
|
230
229
|
* the root session's `model` option that matches it, else as the id (see
|
|
@@ -582,7 +581,7 @@ export declare function launchReply(launchId: string, childSessionId: string, pa
|
|
|
582
581
|
* A failure is idle with the `error` stop reason and, when the SDK gives its
|
|
583
582
|
* text, the JSON-RPC `error`, as the RFD asks: a v1 child has no prompt
|
|
584
583
|
* response, so this is how a client learns that its work failed. The error is
|
|
585
|
-
* an internal error, as for a failed turn on
|
|
584
|
+
* an internal error, as for a failed turn on v2.
|
|
586
585
|
*
|
|
587
586
|
* A task that a worker restart orphaned, or that was still running when the
|
|
588
587
|
* stream ended, is idle with no stop reason: its work ended, but the adapter
|
|
@@ -631,6 +630,17 @@ export declare function isNativeSubagentControlUpdate(update: AcpSessionNotifica
|
|
|
631
630
|
sessionUpdate: "tool_call" | "tool_call_update";
|
|
632
631
|
}>;
|
|
633
632
|
export declare function isNativeSubagentControlTool(toolName: unknown): boolean;
|
|
633
|
+
/**
|
|
634
|
+
* A tool call that the client was not shown, as one `tool_call` with its
|
|
635
|
+
* final status, shown after all: an Agent/Task call whose child was never
|
|
636
|
+
* exposed (AIR's draft shows only a failed one, the RFD form also a completed
|
|
637
|
+
* one), a SendMessage call whose message reached no announced child, or a
|
|
638
|
+
* failed SubagentHandback call.
|
|
639
|
+
*/
|
|
640
|
+
export declare function unexposedControlFallback(initial: AcpSessionNotification | undefined, terminal: AcpSessionNotification, sessionId: string): AcpSessionNotification;
|
|
641
|
+
/** The labels and prompt of a child, from the input of the Agent or Task call that launched it. */
|
|
642
|
+
export declare function subagentIdentity(input: unknown): SubagentIdentity | undefined;
|
|
643
|
+
export declare function mergeSubagentIdentity(previous: SubagentIdentity | undefined, next: SubagentIdentity): SubagentIdentity;
|
|
634
644
|
/**
|
|
635
645
|
* Whether `left` and `right` are the same directory, also when one is
|
|
636
646
|
* spelled through a symlink, e.g. `/tmp/project` and `/private/tmp/project`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"native-subagents.d.ts","sourceRoot":"","sources":["../src/native-subagents.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACzB,MAAM,mCAAmC,CAAC;AAG3C,OAAO,KAAK,EAAE,sBAAsB,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAK9F,kFAAkF;AAClF,MAAM,MAAM,SAAS,GAAG,WAAW,CACjC,OAAO,CAAC,mBAAmB,CAAC,QAAQ,CAAC,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AAO,CAAC,OAAO,CAAC,CAKjF"}
|
package/dist/native-subagents.js
CHANGED
|
@@ -3,6 +3,7 @@ import { realpath } from "node:fs/promises";
|
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { AIR_SUBAGENT_KEY, airExtensionMeta } from "./air-extension.js";
|
|
5
5
|
import { MODEL_CONFIG_ID } from "./session-model.js";
|
|
6
|
+
import { orderedSubagentConfiguration } from "./subagent-configuration.js";
|
|
6
7
|
import { isFinalToolCallStatus } from "./tool-calls/renderer.js";
|
|
7
8
|
const MAX_PENDING_PARENTS = 64;
|
|
8
9
|
const MAX_PENDING_UPDATES = 256;
|
|
@@ -123,31 +124,6 @@ export class NativeSubagentRuntime {
|
|
|
123
124
|
const child = this.children.get(sessionId);
|
|
124
125
|
return child?.announced ? child.workState : undefined;
|
|
125
126
|
}
|
|
126
|
-
/**
|
|
127
|
-
* The RFD form: the `subagent_update` that tells a client that holds nothing
|
|
128
|
-
* of the announced child `sessionId` of this live session what it is now:
|
|
129
|
-
* its labels, its directory, its `cancel` capability, and its work state.
|
|
130
|
-
* Undefined when no such child runs here.
|
|
131
|
-
*/
|
|
132
|
-
currentUpdate(sessionId) {
|
|
133
|
-
if (this.form !== "rfd")
|
|
134
|
-
return undefined;
|
|
135
|
-
const child = this.childOfSession(sessionId);
|
|
136
|
-
if (!child?.announced || !child.workState)
|
|
137
|
-
return undefined;
|
|
138
|
-
return {
|
|
139
|
-
sessionId: child.parentSessionId,
|
|
140
|
-
update: {
|
|
141
|
-
sessionUpdate: "subagent_update",
|
|
142
|
-
sessionId: child.sessionId,
|
|
143
|
-
...(child.title ? { title: child.title } : {}),
|
|
144
|
-
...(child.description ? { description: child.description } : {}),
|
|
145
|
-
...(child.reportedCwd ? { cwd: child.reportedCwd } : {}),
|
|
146
|
-
capabilities: { cancel: {} },
|
|
147
|
-
state: { state: child.workState },
|
|
148
|
-
},
|
|
149
|
-
};
|
|
150
|
-
}
|
|
151
127
|
/**
|
|
152
128
|
* Reports the model of a child response, an exact model id, as the entry of
|
|
153
129
|
* the root session's `model` option that matches it, else as the id (see
|
|
@@ -228,12 +204,7 @@ export class NativeSubagentRuntime {
|
|
|
228
204
|
const publishing = config.publishing.then(async () => {
|
|
229
205
|
if (this.configBySession.get(child.sessionId) !== config || ended())
|
|
230
206
|
return;
|
|
231
|
-
const
|
|
232
|
-
const rank = (option) => {
|
|
233
|
-
const index = priority.indexOf(option.category ?? "");
|
|
234
|
-
return index < 0 ? priority.length : index;
|
|
235
|
-
};
|
|
236
|
-
const configOptions = [...config.options.values()].sort((left, right) => rank(left) - rank(right));
|
|
207
|
+
const configOptions = orderedSubagentConfiguration(config.options.values());
|
|
237
208
|
const snapshot = JSON.stringify(configOptions);
|
|
238
209
|
if (config.published === snapshot)
|
|
239
210
|
return;
|
|
@@ -1600,7 +1571,7 @@ function isWorking(child) {
|
|
|
1600
1571
|
* A failure is idle with the `error` stop reason and, when the SDK gives its
|
|
1601
1572
|
* text, the JSON-RPC `error`, as the RFD asks: a v1 child has no prompt
|
|
1602
1573
|
* response, so this is how a client learns that its work failed. The error is
|
|
1603
|
-
* an internal error, as for a failed turn on
|
|
1574
|
+
* an internal error, as for a failed turn on v2.
|
|
1604
1575
|
*
|
|
1605
1576
|
* A task that a worker restart orphaned, or that was still running when the
|
|
1606
1577
|
* stream ended, is idle with no stop reason: its work ended, but the adapter
|
|
@@ -1733,7 +1704,7 @@ function isFailedToolCallUpdate(update) {
|
|
|
1733
1704
|
* one), a SendMessage call whose message reached no announced child, or a
|
|
1734
1705
|
* failed SubagentHandback call.
|
|
1735
1706
|
*/
|
|
1736
|
-
function unexposedControlFallback(initial, terminal, sessionId) {
|
|
1707
|
+
export function unexposedControlFallback(initial, terminal, sessionId) {
|
|
1737
1708
|
if (terminal.update.sessionUpdate !== "tool_call" &&
|
|
1738
1709
|
terminal.update.sessionUpdate !== "tool_call_update") {
|
|
1739
1710
|
return { ...terminal, sessionId };
|
|
@@ -1805,7 +1776,8 @@ function subagentDescription(prompt, description) {
|
|
|
1805
1776
|
}
|
|
1806
1777
|
return "Delegated task";
|
|
1807
1778
|
}
|
|
1808
|
-
|
|
1779
|
+
/** The labels and prompt of a child, from the input of the Agent or Task call that launched it. */
|
|
1780
|
+
export function subagentIdentity(input) {
|
|
1809
1781
|
if (typeof input !== "object" || input === null || Array.isArray(input))
|
|
1810
1782
|
return undefined;
|
|
1811
1783
|
const value = input;
|
|
@@ -1817,7 +1789,7 @@ function subagentIdentity(input) {
|
|
|
1817
1789
|
};
|
|
1818
1790
|
return Object.values(identity).some(Boolean) ? identity : undefined;
|
|
1819
1791
|
}
|
|
1820
|
-
function mergeSubagentIdentity(previous, next) {
|
|
1792
|
+
export function mergeSubagentIdentity(previous, next) {
|
|
1821
1793
|
return {
|
|
1822
1794
|
name: next.name ?? previous?.name,
|
|
1823
1795
|
description: next.description ?? previous?.description,
|
|
@@ -39,4 +39,33 @@ export interface ClaudePermissionPresentationInput {
|
|
|
39
39
|
* v2 client as `title` and `description`.
|
|
40
40
|
*/
|
|
41
41
|
export declare function buildClaudePermissionPresentation(value: ClaudePermissionPresentationInput): Pick<AcpPermissionRequest, "toolCall" | "_meta" | "title" | "description">;
|
|
42
|
+
/**
|
|
43
|
+
* The `_meta.jetbrains.air.permission` of a permission request, from the
|
|
44
|
+
* heading and explanation that {@link buildClaudePermissionPresentation}
|
|
45
|
+
* built. The v2 core adds it for an AIR client, whose tool calls it
|
|
46
|
+
* renders without the AIR tool call contract.
|
|
47
|
+
*/
|
|
48
|
+
export declare function airPermissionMeta({ title, description, defaultToNo, }: {
|
|
49
|
+
title: string;
|
|
50
|
+
description?: string;
|
|
51
|
+
defaultToNo?: boolean;
|
|
52
|
+
}): Record<string, unknown>;
|
|
53
|
+
/**
|
|
54
|
+
* The `_meta.claudeCode` of a permission request's tool call: which MCP
|
|
55
|
+
* server serves an `mcp__*` tool and where its definition came from
|
|
56
|
+
* (`mcpServer`, SDK 0.3.274+), so a client can key trust on `source`, and,
|
|
57
|
+
* for clients other than AIR, the tool name and the Agent or Task call of a
|
|
58
|
+
* subagent's request. Undefined when there is nothing to add.
|
|
59
|
+
*/
|
|
60
|
+
export declare function permissionToolCallMeta({ toolName, parentToolUseId, mcpServer, airClient, }: {
|
|
61
|
+
toolName: string;
|
|
62
|
+
parentToolUseId: string | undefined;
|
|
63
|
+
mcpServer: {
|
|
64
|
+
name: string;
|
|
65
|
+
source: string;
|
|
66
|
+
} | undefined;
|
|
67
|
+
airClient: boolean;
|
|
68
|
+
}): {
|
|
69
|
+
claudeCode: Record<string, unknown>;
|
|
70
|
+
} | undefined;
|
|
42
71
|
//# sourceMappingURL=presentation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presentation.d.ts","sourceRoot":"","sources":["../../src/permissions/presentation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAEnG,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAG1E;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG,wBAAwB,GAAG;IAC5D,uEAAuE;IACvE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mCAAmC;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,WAAW,iCAAiC;IAChD,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAClC,oGAAoG;IACpG,cAAc,CAAC,EAAE,eAAe,EAAE,CAAC;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC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GAAG,OAAO,GAAG,OAAO,GAAG,aAAa,CAAC,CAuD5E;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,WAAW,EACX,WAAW,GACZ,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAU1B;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,QAAQ,EACR,eAAe,EACf,SAAS,EACT,SAAS,GACV,EAAE;IACD,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,SAAS,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,CAAC;IACxD,SAAS,EAAE,OAAO,CAAC;CACpB,GAAG;IAAE,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,GAAG,SAAS,CAWtD"}
|
|
@@ -80,18 +80,45 @@ export function buildClaudePermissionPresentation(value) {
|
|
|
80
80
|
}),
|
|
81
81
|
// Only AIR gets the permission presentation.
|
|
82
82
|
...(title && capabilities.air.client
|
|
83
|
-
? {
|
|
84
|
-
_meta: withAirMeta(undefined, AIR_PERMISSION_KEY, {
|
|
85
|
-
version: 1,
|
|
86
|
-
title,
|
|
87
|
-
...(description ? { description } : {}),
|
|
88
|
-
// The CLI's own hint, forwarded so a client that can pre-select
|
|
89
|
-
// an option keeps the decline focused; the option order already
|
|
90
|
-
// leads with the reject options when this is set.
|
|
91
|
-
...(value.defaultToNo === true ? { defaultToNo: true } : {}),
|
|
92
|
-
}),
|
|
93
|
-
}
|
|
83
|
+
? { _meta: airPermissionMeta({ title, description, defaultToNo: value.defaultToNo }) }
|
|
94
84
|
: {}),
|
|
95
85
|
...(capabilities.v2 ? { title, ...(description ? { description } : {}) } : {}),
|
|
96
86
|
};
|
|
97
87
|
}
|
|
88
|
+
/**
|
|
89
|
+
* The `_meta.jetbrains.air.permission` of a permission request, from the
|
|
90
|
+
* heading and explanation that {@link buildClaudePermissionPresentation}
|
|
91
|
+
* built. The v2 core adds it for an AIR client, whose tool calls it
|
|
92
|
+
* renders without the AIR tool call contract.
|
|
93
|
+
*/
|
|
94
|
+
export function airPermissionMeta({ title, description, defaultToNo, }) {
|
|
95
|
+
return withAirMeta(undefined, AIR_PERMISSION_KEY, {
|
|
96
|
+
version: 1,
|
|
97
|
+
title,
|
|
98
|
+
...(description ? { description } : {}),
|
|
99
|
+
// The CLI's own hint, forwarded so a client that can pre-select an
|
|
100
|
+
// option keeps the decline focused; the option order already leads with
|
|
101
|
+
// the reject options when this is set.
|
|
102
|
+
...(defaultToNo === true ? { defaultToNo: true } : {}),
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* The `_meta.claudeCode` of a permission request's tool call: which MCP
|
|
107
|
+
* server serves an `mcp__*` tool and where its definition came from
|
|
108
|
+
* (`mcpServer`, SDK 0.3.274+), so a client can key trust on `source`, and,
|
|
109
|
+
* for clients other than AIR, the tool name and the Agent or Task call of a
|
|
110
|
+
* subagent's request. Undefined when there is nothing to add.
|
|
111
|
+
*/
|
|
112
|
+
export function permissionToolCallMeta({ toolName, parentToolUseId, mcpServer, airClient, }) {
|
|
113
|
+
if (!mcpServer && !(parentToolUseId && !airClient))
|
|
114
|
+
return undefined;
|
|
115
|
+
// The name is the config key as authored: untrusted text, so it rides
|
|
116
|
+
// `_meta` rather than the title.
|
|
117
|
+
return {
|
|
118
|
+
claudeCode: {
|
|
119
|
+
...(airClient ? {} : { toolName }),
|
|
120
|
+
...(parentToolUseId && !airClient ? { parentToolUseId } : {}),
|
|
121
|
+
...(mcpServer ? { mcpServer: { name: mcpServer.name, source: mcpServer.source } } : {}),
|
|
122
|
+
},
|
|
123
|
+
};
|
|
124
|
+
}
|
|
@@ -34,4 +34,33 @@ export declare function promptSuggestionText(raw: string | null | undefined): st
|
|
|
34
34
|
* predicted nothing, so the composer must not keep the previous prediction.
|
|
35
35
|
*/
|
|
36
36
|
export declare function promptSuggestionsMeta(text: string | null): Record<string, unknown>;
|
|
37
|
+
/**
|
|
38
|
+
* The prediction a session holds on the client, and whether an arriving
|
|
39
|
+
* `prompt_suggestion` still answers the turn the user waits on. Both cores
|
|
40
|
+
* keep one per session and send the `_meta` that its methods return as a
|
|
41
|
+
* `session_info_update`, to an AIR client only. Undefined: nothing to send.
|
|
42
|
+
*/
|
|
43
|
+
export declare class PromptSuggestions {
|
|
44
|
+
/** The last text sent (`null` after a clear). Undefined until the first send. */
|
|
45
|
+
private published;
|
|
46
|
+
/**
|
|
47
|
+
* Set at a turn's result, cleared when the next prompt arrives. A
|
|
48
|
+
* prediction that the next prompt outran (sent before the prediction was
|
|
49
|
+
* read off the stream) follows a turn that is answered already, so it is
|
|
50
|
+
* dropped instead of published mid-turn.
|
|
51
|
+
*/
|
|
52
|
+
private expected;
|
|
53
|
+
/** A result came: the CLI predicts the next prompt right after it. */
|
|
54
|
+
resultArrived(): void;
|
|
55
|
+
/** The `_meta` of the CLI's `prompt_suggestion`, if it answers the last result and changes what the client holds. */
|
|
56
|
+
suggested(raw: string | null | undefined): Record<string, unknown> | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* The `_meta` that clears the prediction: a client prompt spent it, or a
|
|
59
|
+
* `conversation_reset` dropped the transcript it came from. It also drops
|
|
60
|
+
* a prediction still in flight for the last result. Undefined when the
|
|
61
|
+
* client holds none.
|
|
62
|
+
*/
|
|
63
|
+
clear(): Record<string, unknown> | undefined;
|
|
64
|
+
private publish;
|
|
65
|
+
}
|
|
37
66
|
//# sourceMappingURL=prompt-suggestions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt-suggestions.d.ts","sourceRoot":"","sources":["../src/prompt-suggestions.ts"],"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IAAI,GAAG,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;IAM9E;;;;;OAKG;IACH,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;IAK5C,OAAO,CAAC,OAAO;CAMhB"}
|
|
@@ -34,3 +34,48 @@ export function promptSuggestionsMeta(text) {
|
|
|
34
34
|
const value = { suggestions: text === null ? [] : [{ text }] };
|
|
35
35
|
return { [PROMPT_SUGGESTIONS_META_KEY]: value };
|
|
36
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* The prediction a session holds on the client, and whether an arriving
|
|
39
|
+
* `prompt_suggestion` still answers the turn the user waits on. Both cores
|
|
40
|
+
* keep one per session and send the `_meta` that its methods return as a
|
|
41
|
+
* `session_info_update`, to an AIR client only. Undefined: nothing to send.
|
|
42
|
+
*/
|
|
43
|
+
export class PromptSuggestions {
|
|
44
|
+
/** The last text sent (`null` after a clear). Undefined until the first send. */
|
|
45
|
+
published;
|
|
46
|
+
/**
|
|
47
|
+
* Set at a turn's result, cleared when the next prompt arrives. A
|
|
48
|
+
* prediction that the next prompt outran (sent before the prediction was
|
|
49
|
+
* read off the stream) follows a turn that is answered already, so it is
|
|
50
|
+
* dropped instead of published mid-turn.
|
|
51
|
+
*/
|
|
52
|
+
expected = false;
|
|
53
|
+
/** A result came: the CLI predicts the next prompt right after it. */
|
|
54
|
+
resultArrived() {
|
|
55
|
+
this.expected = true;
|
|
56
|
+
}
|
|
57
|
+
/** The `_meta` of the CLI's `prompt_suggestion`, if it answers the last result and changes what the client holds. */
|
|
58
|
+
suggested(raw) {
|
|
59
|
+
if (!this.expected)
|
|
60
|
+
return undefined;
|
|
61
|
+
this.expected = false;
|
|
62
|
+
return this.publish(promptSuggestionText(raw));
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* The `_meta` that clears the prediction: a client prompt spent it, or a
|
|
66
|
+
* `conversation_reset` dropped the transcript it came from. It also drops
|
|
67
|
+
* a prediction still in flight for the last result. Undefined when the
|
|
68
|
+
* client holds none.
|
|
69
|
+
*/
|
|
70
|
+
clear() {
|
|
71
|
+
this.expected = false;
|
|
72
|
+
return this.publish(null);
|
|
73
|
+
}
|
|
74
|
+
publish(text) {
|
|
75
|
+
// An unchanged prediction is not sent again.
|
|
76
|
+
if ((this.published ?? null) === text)
|
|
77
|
+
return undefined;
|
|
78
|
+
this.published = text;
|
|
79
|
+
return promptSuggestionsMeta(text);
|
|
80
|
+
}
|
|
81
|
+
}
|