@agentclientprotocol/claude-agent-acp 0.81.3-preview.1 → 0.81.3-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.
Files changed (95) hide show
  1. package/README.md +8 -5
  2. package/dist/acp-agent.d.ts +31 -37
  3. package/dist/acp-agent.d.ts.map +1 -1
  4. package/dist/acp-agent.js +546 -534
  5. package/dist/acp-subagents.d.ts +6 -0
  6. package/dist/acp-subagents.d.ts.map +1 -1
  7. package/dist/air-extension.d.ts +31 -1
  8. package/dist/air-extension.d.ts.map +1 -1
  9. package/dist/air-extension.js +35 -1
  10. package/dist/async-tasks.d.ts +39 -2
  11. package/dist/async-tasks.d.ts.map +1 -1
  12. package/dist/async-tasks.js +147 -44
  13. package/dist/context-compaction-meta.d.ts +6 -5
  14. package/dist/context-compaction-meta.d.ts.map +1 -1
  15. package/dist/context-compaction-meta.js +10 -10
  16. package/dist/context-compaction.d.ts +3 -0
  17. package/dist/context-compaction.d.ts.map +1 -1
  18. package/dist/context-compaction.js +23 -57
  19. package/dist/diff.d.ts +73 -5
  20. package/dist/diff.d.ts.map +1 -1
  21. package/dist/diff.js +435 -64
  22. package/dist/elicitation.d.ts +1 -1
  23. package/dist/elicitation.d.ts.map +1 -1
  24. package/dist/elicitation.js +12 -14
  25. package/dist/native-subagents.d.ts +58 -0
  26. package/dist/native-subagents.d.ts.map +1 -1
  27. package/dist/native-subagents.js +186 -34
  28. package/dist/paths.d.ts +3 -0
  29. package/dist/paths.d.ts.map +1 -0
  30. package/dist/paths.js +6 -0
  31. package/dist/permissions/presentation.d.ts +13 -2
  32. package/dist/permissions/presentation.d.ts.map +1 -1
  33. package/dist/permissions/presentation.js +49 -44
  34. package/dist/resumed-session.d.ts +11 -0
  35. package/dist/resumed-session.d.ts.map +1 -1
  36. package/dist/resumed-session.js +106 -4
  37. package/dist/session-mode.d.ts +2 -0
  38. package/dist/session-mode.d.ts.map +1 -1
  39. package/dist/session-mode.js +12 -5
  40. package/dist/settings.js +2 -2
  41. package/dist/subagent-history.d.ts +20 -0
  42. package/dist/subagent-history.d.ts.map +1 -0
  43. package/dist/subagent-history.js +46 -0
  44. package/dist/tool-calls/background.d.ts +20 -0
  45. package/dist/tool-calls/background.d.ts.map +1 -0
  46. package/dist/tool-calls/background.js +41 -0
  47. package/dist/tool-calls/changed-meta-filter.d.ts +27 -0
  48. package/dist/tool-calls/changed-meta-filter.d.ts.map +1 -0
  49. package/dist/tool-calls/changed-meta-filter.js +102 -0
  50. package/dist/tool-calls/client-capabilities.d.ts +51 -0
  51. package/dist/tool-calls/client-capabilities.d.ts.map +1 -0
  52. package/dist/tool-calls/client-capabilities.js +43 -0
  53. package/dist/tool-calls/content.d.ts +59 -0
  54. package/dist/tool-calls/content.d.ts.map +1 -0
  55. package/dist/tool-calls/content.js +194 -0
  56. package/dist/tool-calls/facts.d.ts +116 -0
  57. package/dist/tool-calls/facts.d.ts.map +1 -0
  58. package/dist/tool-calls/facts.js +1 -0
  59. package/dist/tool-calls/field-tracker.d.ts +58 -0
  60. package/dist/tool-calls/field-tracker.d.ts.map +1 -0
  61. package/dist/tool-calls/field-tracker.js +167 -0
  62. package/dist/tool-calls/renderer.d.ts +216 -0
  63. package/dist/tool-calls/renderer.d.ts.map +1 -0
  64. package/dist/tool-calls/renderer.js +487 -0
  65. package/dist/tool-calls/reporters/agent.d.ts +7 -0
  66. package/dist/tool-calls/reporters/agent.d.ts.map +1 -0
  67. package/dist/tool-calls/reporters/agent.js +190 -0
  68. package/dist/tool-calls/reporters/bash.d.ts +9 -0
  69. package/dist/tool-calls/reporters/bash.d.ts.map +1 -0
  70. package/dist/tool-calls/reporters/bash.js +83 -0
  71. package/dist/tool-calls/reporters/compaction.d.ts +24 -0
  72. package/dist/tool-calls/reporters/compaction.d.ts.map +1 -0
  73. package/dist/tool-calls/reporters/compaction.js +66 -0
  74. package/dist/tool-calls/reporters/file-edit.d.ts +46 -0
  75. package/dist/tool-calls/reporters/file-edit.d.ts.map +1 -0
  76. package/dist/tool-calls/reporters/file-edit.js +180 -0
  77. package/dist/tool-calls/reporters/index.d.ts +4 -0
  78. package/dist/tool-calls/reporters/index.d.ts.map +1 -0
  79. package/dist/tool-calls/reporters/index.js +40 -0
  80. package/dist/tool-calls/reporters/interaction.d.ts +71 -0
  81. package/dist/tool-calls/reporters/interaction.d.ts.map +1 -0
  82. package/dist/tool-calls/reporters/interaction.js +222 -0
  83. package/dist/tool-calls/reporters/read.d.ts +7 -0
  84. package/dist/tool-calls/reporters/read.d.ts.map +1 -0
  85. package/dist/tool-calls/reporters/read.js +64 -0
  86. package/dist/tool-calls/reporters/search.d.ts +10 -0
  87. package/dist/tool-calls/reporters/search.d.ts.map +1 -0
  88. package/dist/tool-calls/reporters/search.js +50 -0
  89. package/dist/tool-calls/reporters/web.d.ts +11 -0
  90. package/dist/tool-calls/reporters/web.d.ts.map +1 -0
  91. package/dist/tool-calls/reporters/web.js +42 -0
  92. package/dist/tools.d.ts +32 -37
  93. package/dist/tools.d.ts.map +1 -1
  94. package/dist/tools.js +48 -970
  95. package/package.json +4 -1
@@ -0,0 +1,71 @@
1
+ import type { ToolReporter, ToolResultContext, ToolResultFacts, ToolUseContext, ToolUseFacts } from "../facts.js";
2
+ /**
3
+ * ExitPlanMode: the plan is input that the user approves.
4
+ *
5
+ * Claude writes the plan to a file under `plansDirectory` while it drafts it.
6
+ * The CLI adds the file text as `plan` and the file path as `planFilePath` to
7
+ * the complete input. A `planFile` client gets the path and reads the plan
8
+ * from the file. Without the file, it gets the plan text like other clients.
9
+ */
10
+ export declare class ExitPlanModeReporter implements ToolReporter {
11
+ toolUse(input: unknown, { capabilities }: ToolUseContext): ToolUseFacts;
12
+ /** The approval text repeats the plan, which the input holds. */
13
+ toolResult(context: ToolResultContext): ToolResultFacts;
14
+ /**
15
+ * The rejection reason has no display form. Claude fences it, so unfence it.
16
+ * A client that is not AIR gets the error text as the result to show.
17
+ */
18
+ errorResult(context: ToolResultContext): ToolResultFacts | undefined;
19
+ }
20
+ /** AskUserQuestion: the questions are input that the user reads. */
21
+ export declare class AskUserQuestionReporter implements ToolReporter {
22
+ /**
23
+ * AIR gets a fixed title, because the question is input. Every other client
24
+ * gets the question of a single question as the title, like upstream.
25
+ */
26
+ toolUse(input: unknown, { capabilities }: ToolUseContext): ToolUseFacts;
27
+ }
28
+ /** Skill: the skill name is the label. The result is a confirmation. */
29
+ export declare class SkillReporter implements ToolReporter {
30
+ toolUse(input: unknown): ToolUseFacts;
31
+ toolResult(): ToolResultFacts;
32
+ }
33
+ /**
34
+ * TodoWrite and the Task* tools. The stream reports them as a plan. Only a
35
+ * permission request surfaces them as a tool call.
36
+ */
37
+ export declare class PlanToolReporter implements ToolReporter {
38
+ private readonly toolName;
39
+ constructor(toolName: string);
40
+ toolUse(input: unknown): ToolUseFacts;
41
+ }
42
+ /** ReportFindings: the findings are input that the user reads. */
43
+ export declare class ReportFindingsReporter implements ToolReporter {
44
+ toolUse(input: unknown): ToolUseFacts;
45
+ }
46
+ /** Every other tool, MCP tools too: the result text is the result to show. */
47
+ export declare class GenericReporter implements ToolReporter {
48
+ private readonly toolName;
49
+ constructor(toolName: string);
50
+ toolUse(input: unknown): ToolUseFacts;
51
+ }
52
+ /**
53
+ * An agent control tool (SendMessage, TaskStop, ListAgents, Monitor). AIR
54
+ * shows the result in its own frame and parses the JSON result of SendMessage
55
+ * and TaskStop. So AIR gets the error text as plain text, without a fence.
56
+ * A client that is not AIR gets the fenced error text.
57
+ */
58
+ export declare class AgentControlReporter extends GenericReporter {
59
+ errorResult({ result, capabilities }: ToolResultContext): ToolResultFacts | undefined;
60
+ }
61
+ /**
62
+ * Absolute path of a skill's `SKILL.md`, or `undefined` when none of the known layouts holds one.
63
+ *
64
+ * The `Skill` tool reports only the skill's name, so the file has to be located by probing the layouts skills
65
+ * actually use: project- and user-level `.claude/skills` (plus this repo's `.agents/skills` source of truth), and
66
+ * for a `<prefix>:<name>` spelling either a plugin (`.claude/plugins/<prefix>/skills/<name>`) or a
67
+ * directory-scoped skill (`<prefix>/.claude/skills/<name>`), which share that spelling. Only a path that exists
68
+ * on disk is returned, so a wrong guess costs nothing and clients never render a link to a missing file.
69
+ */
70
+ export declare function resolveSkillPath(skillName: string, cwd?: string): string | undefined;
71
+ //# sourceMappingURL=interaction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interaction.d.ts","sourceRoot":"","sources":["../../../src/tool-calls/reporters/interaction.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EACV,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,YAAY,EACb,MAAM,aAAa,CAAC;AAErB;;;;;;;GAOG;AACH,qBAAa,oBAAqB,YAAW,YAAY;IACvD,OAAO,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,YAAY,EAAE,EAAE,cAAc,GAAG,YAAY;IAYvE,iEAAiE;IACjE,UAAU,CAAC,OAAO,EAAE,iBAAiB,GAAG,eAAe;IASvD;;;OAGG;IACH,WAAW,CAAC,OAAO,EAAE,iBAAiB,GAAG,eAAe,GAAG,SAAS;CASrE;AAqBD,oEAAoE;AACpE,qBAAa,uBAAwB,YAAW,YAAY;IAC1D;;;OAGG;IACH,OAAO,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,YAAY,EAAE,EAAE,cAAc,GAAG,YAAY;CAgBxE;AAED,wEAAwE;AACxE,qBAAa,aAAc,YAAW,YAAY;IAChD,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY;IAKrC,UAAU,IAAI,eAAe;CAG9B;AAED;;;GAGG;AACH,qBAAa,gBAAiB,YAAW,YAAY;IACvC,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,MAAM;IAE7C,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY;CAyBtC;AAED,kEAAkE;AAClE,qBAAa,sBAAuB,YAAW,YAAY;IACzD,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY;CAmBtC;AAED,8EAA8E;AAC9E,qBAAa,eAAgB,YAAW,YAAY;IACtC,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,MAAM;IAE7C,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY;CAgBtC;AAED;;;;;GAKG;AACH,qBAAa,oBAAqB,SAAQ,eAAe;IACvD,WAAW,CAAC,EAAE,MAAM,EAAE,YAAY,EAAE,EAAE,iBAAiB,GAAG,eAAe,GAAG,SAAS;CAGtF;AAKD;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAwBpF"}
@@ -0,0 +1,222 @@
1
+ import { existsSync, statSync } from "node:fs";
2
+ import os from "node:os";
3
+ import path from "node:path";
4
+ import { exitPlanModeRawOutput } from "../../exit-plan.js";
5
+ import { textContent, toAcpContentUpdate } from "../content.js";
6
+ /**
7
+ * ExitPlanMode: the plan is input that the user approves.
8
+ *
9
+ * Claude writes the plan to a file under `plansDirectory` while it drafts it.
10
+ * The CLI adds the file text as `plan` and the file path as `planFilePath` to
11
+ * the complete input. A `planFile` client gets the path and reads the plan
12
+ * from the file. Without the file, it gets the plan text like other clients.
13
+ */
14
+ export class ExitPlanModeReporter {
15
+ toolUse(input, { capabilities }) {
16
+ const plan = input?.plan;
17
+ const planFilePath = capabilities.air.planFile
18
+ ? existingPlanFile(input?.planFilePath)
19
+ : undefined;
20
+ return {
21
+ title: "Approve Plan",
22
+ kind: "switch_mode",
23
+ ...(planFilePath ? { planFilePath } : plan ? { display: [textContent(plan)] } : {}),
24
+ };
25
+ }
26
+ /** The approval text repeats the plan, which the input holds. */
27
+ toolResult(context) {
28
+ const planFilePath = resultPlanFile(context);
29
+ return {
30
+ title: "Exited Plan Mode",
31
+ rawOutput: undefined,
32
+ ...(planFilePath ? { planFilePath, planFileReleased: true } : {}),
33
+ };
34
+ }
35
+ /**
36
+ * The rejection reason has no display form. Claude fences it, so unfence it.
37
+ * A client that is not AIR gets the error text as the result to show.
38
+ */
39
+ errorResult(context) {
40
+ const { toolUse, result, capabilities } = context;
41
+ if (!capabilities.air.client)
42
+ return undefined;
43
+ const planFilePath = resultPlanFile(context);
44
+ return {
45
+ rawOutput: exitPlanModeRawOutput(toolUse.name, result.content),
46
+ ...(planFilePath ? { planFilePath } : {}),
47
+ };
48
+ }
49
+ }
50
+ /** The plan file of a result: the path of the input, else the `filePath` of the structured result. */
51
+ function resultPlanFile({ toolUse, structured, capabilities }) {
52
+ if (!capabilities.air.planFile)
53
+ return undefined;
54
+ return (existingPlanFile(toolUse.input?.planFilePath) ??
55
+ existingPlanFile(structured?.filePath));
56
+ }
57
+ /** The path when it is an absolute path of a regular file, else undefined. */
58
+ function existingPlanFile(value) {
59
+ if (typeof value !== "string" || !path.isAbsolute(value))
60
+ return undefined;
61
+ try {
62
+ return statSync(value).isFile() ? value : undefined;
63
+ }
64
+ catch {
65
+ return undefined;
66
+ }
67
+ }
68
+ /** AskUserQuestion: the questions are input that the user reads. */
69
+ export class AskUserQuestionReporter {
70
+ /**
71
+ * AIR gets a fixed title, because the question is input. Every other client
72
+ * gets the question of a single question as the title, like upstream.
73
+ */
74
+ toolUse(input, { capabilities }) {
75
+ const ask = input;
76
+ const questions = Array.isArray(ask?.questions) ? ask.questions : [];
77
+ const display = questions
78
+ .filter((q) => typeof q?.question === "string")
79
+ .map((q) => textContent(q.question));
80
+ const single = !capabilities.air.client && questions.length === 1 && questions[0]?.question
81
+ ? questions[0].question
82
+ : undefined;
83
+ return {
84
+ title: single ?? "Asking for your input",
85
+ kind: "other",
86
+ ...(display.length > 0 ? { display } : {}),
87
+ };
88
+ }
89
+ }
90
+ /** Skill: the skill name is the label. The result is a confirmation. */
91
+ export class SkillReporter {
92
+ toolUse(input) {
93
+ const skill = input?.skill;
94
+ return { title: skill ? `Load skill: ${skill}` : "Load skill", kind: "other" };
95
+ }
96
+ toolResult() {
97
+ return {};
98
+ }
99
+ }
100
+ /**
101
+ * TodoWrite and the Task* tools. The stream reports them as a plan. Only a
102
+ * permission request surfaces them as a tool call.
103
+ */
104
+ export class PlanToolReporter {
105
+ toolName;
106
+ constructor(toolName) {
107
+ this.toolName = toolName;
108
+ }
109
+ toolUse(input) {
110
+ switch (this.toolName) {
111
+ case "TodoWrite": {
112
+ const todos = input?.todos;
113
+ return {
114
+ title: Array.isArray(todos)
115
+ ? `Update TODOs: ${todos.map((todo) => todo.content).join(", ")}`
116
+ : "Update TODOs",
117
+ kind: "think",
118
+ };
119
+ }
120
+ case "TaskCreate": {
121
+ const subject = input?.subject;
122
+ return { title: subject ? `Create task: ${subject}` : "Create task", kind: "think" };
123
+ }
124
+ case "TaskUpdate": {
125
+ const subject = input?.subject;
126
+ return { title: subject ? `Update task: ${subject}` : "Update task", kind: "think" };
127
+ }
128
+ case "TaskList":
129
+ return { title: "List tasks", kind: "think" };
130
+ default:
131
+ return { title: "Get task", kind: "think" };
132
+ }
133
+ }
134
+ }
135
+ /** ReportFindings: the findings are input that the user reads. */
136
+ export class ReportFindingsReporter {
137
+ toolUse(input) {
138
+ const findings = input?.findings ?? [];
139
+ return {
140
+ title: findings.length === 0
141
+ ? "Report findings: none found"
142
+ : `Report ${findings.length} finding${findings.length === 1 ? "" : "s"}`,
143
+ kind: "think",
144
+ ...(findings.length > 0
145
+ ? {
146
+ display: findings.map((finding) => textContent(`**${finding.file}${finding.line ? `:${finding.line}` : ""}** — ${finding.summary}`)),
147
+ }
148
+ : {}),
149
+ };
150
+ }
151
+ }
152
+ /** Every other tool, MCP tools too: the result text is the result to show. */
153
+ export class GenericReporter {
154
+ toolName;
155
+ constructor(toolName) {
156
+ this.toolName = toolName;
157
+ }
158
+ toolUse(input) {
159
+ if (this.toolName !== "Other") {
160
+ return { title: this.toolName || "Unknown Tool", kind: "other" };
161
+ }
162
+ let json;
163
+ try {
164
+ json = JSON.stringify(input, null, 2);
165
+ }
166
+ catch {
167
+ json = typeof input === "string" ? input : "{}";
168
+ }
169
+ return {
170
+ title: this.toolName,
171
+ kind: "other",
172
+ display: [textContent(`\`\`\`json\n${json}\`\`\``)],
173
+ };
174
+ }
175
+ }
176
+ /**
177
+ * An agent control tool (SendMessage, TaskStop, ListAgents, Monitor). AIR
178
+ * shows the result in its own frame and parses the JSON result of SendMessage
179
+ * and TaskStop. So AIR gets the error text as plain text, without a fence.
180
+ * A client that is not AIR gets the fenced error text.
181
+ */
182
+ export class AgentControlReporter extends GenericReporter {
183
+ errorResult({ result, capabilities }) {
184
+ return capabilities.air.client ? toAcpContentUpdate(result.content, false) : undefined;
185
+ }
186
+ }
187
+ /** Roots a skill's directory may sit under, relative to the directory the scope resolves to. */
188
+ const SKILL_CONTAINER_DIRS = [".claude/skills", ".agents/skills"];
189
+ /**
190
+ * Absolute path of a skill's `SKILL.md`, or `undefined` when none of the known layouts holds one.
191
+ *
192
+ * The `Skill` tool reports only the skill's name, so the file has to be located by probing the layouts skills
193
+ * actually use: project- and user-level `.claude/skills` (plus this repo's `.agents/skills` source of truth), and
194
+ * for a `<prefix>:<name>` spelling either a plugin (`.claude/plugins/<prefix>/skills/<name>`) or a
195
+ * directory-scoped skill (`<prefix>/.claude/skills/<name>`), which share that spelling. Only a path that exists
196
+ * on disk is returned, so a wrong guess costs nothing and clients never render a link to a missing file.
197
+ */
198
+ export function resolveSkillPath(skillName, cwd) {
199
+ if (!cwd) {
200
+ return undefined;
201
+ }
202
+ const colon = skillName.indexOf(":");
203
+ const scope = colon < 0 ? undefined : skillName.slice(0, colon);
204
+ const name = colon < 0 ? skillName : skillName.slice(colon + 1);
205
+ if (!name) {
206
+ return undefined;
207
+ }
208
+ const candidates = [];
209
+ const addCandidates = (base) => {
210
+ for (const container of SKILL_CONTAINER_DIRS) {
211
+ candidates.push(path.join(base, container, name, "SKILL.md"));
212
+ }
213
+ };
214
+ if (scope) {
215
+ // A `<prefix>:<name>` skill is either directory-scoped or a plugin's; both spellings look identical.
216
+ addCandidates(path.join(cwd, scope));
217
+ candidates.push(path.join(cwd, ".claude/plugins", scope, "skills", name, "SKILL.md"));
218
+ }
219
+ addCandidates(cwd);
220
+ addCandidates(os.homedir());
221
+ return candidates.find((candidate) => existsSync(candidate));
222
+ }
@@ -0,0 +1,7 @@
1
+ import type { ToolReporter, ToolResultContext, ToolResultFacts, ToolUseContext, ToolUseFacts } from "../facts.js";
2
+ /** Read: the file text is the result to show. */
3
+ export declare class ReadReporter implements ToolReporter {
4
+ toolUse(input: unknown, { cwd }: ToolUseContext): ToolUseFacts;
5
+ toolResult({ toolUse, result, structured }: ToolResultContext): ToolResultFacts;
6
+ }
7
+ //# sourceMappingURL=read.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../../../src/tool-calls/reporters/read.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,YAAY,EACb,MAAM,aAAa,CAAC;AAErB,iDAAiD;AACjD,qBAAa,YAAa,YAAW,YAAY;IAC/C,OAAO,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,GAAG,EAAE,EAAE,cAAc,GAAG,YAAY;IAgB9D,UAAU,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,iBAAiB,GAAG,eAAe;CAiDhF"}
@@ -0,0 +1,64 @@
1
+ import { markdownEscape, structuredResult, textContent, toAcpContentBlock, toDisplayPath, } from "../content.js";
2
+ /** Read: the file text is the result to show. */
3
+ export class ReadReporter {
4
+ toolUse(input, { cwd }) {
5
+ const read = input;
6
+ let limit = "";
7
+ if (read?.limit && read.limit > 0) {
8
+ limit = " (" + (read.offset ?? 1) + " - " + ((read.offset ?? 1) + read.limit - 1) + ")";
9
+ }
10
+ else if (read?.offset) {
11
+ limit = " (from line " + read.offset + ")";
12
+ }
13
+ const displayPath = read?.file_path ? toDisplayPath(read.file_path, cwd) : "File";
14
+ return {
15
+ title: "Read " + displayPath + limit,
16
+ kind: "read",
17
+ locations: read?.file_path ? [{ path: read.file_path, line: read.offset ?? 1 }] : [],
18
+ };
19
+ }
20
+ toolResult({ toolUse, result, structured }) {
21
+ // The raw tool_result text is the model-facing view: line-numbered content
22
+ // plus appended <system-reminder> blocks that clients must not see. The
23
+ // structured FileReadOutput carries the clean content, so rebuild the
24
+ // line-numbered view from it. Image, notebook, and PDF variants use the
25
+ // raw content blocks, which already render.
26
+ const structuredRead = structuredResult(structured);
27
+ if (structuredRead?.type === "text" &&
28
+ typeof structuredRead.file?.content === "string" &&
29
+ // An empty file has nothing to number: keep the raw "file is empty" note.
30
+ structuredRead.file.content.length > 0) {
31
+ const startLine = structuredRead.file.startLine ?? toolUse.input?.offset ?? 1;
32
+ // A trailing newline ends the last line. It is not an extra line.
33
+ let numbered = structuredRead.file.content
34
+ .replace(/\n$/, "")
35
+ .split("\n")
36
+ .map((line, i) => `${startLine + i}\t${line}`)
37
+ .join("\n");
38
+ // The model-facing truncation banner does not survive the rebuild.
39
+ if (structuredRead.file.truncatedByTokenCap) {
40
+ const { numLines, totalLines } = structuredRead.file;
41
+ const detail = typeof numLines === "number" && typeof totalLines === "number"
42
+ ? `: showing ${numLines} of ${totalLines} lines`
43
+ : "";
44
+ numbered += `\n[File truncated${detail}]`;
45
+ }
46
+ return { content: [textContent(markdownEscape(numbered))] };
47
+ }
48
+ const content = result.content;
49
+ if (Array.isArray(content) && content.length > 0) {
50
+ return {
51
+ content: content.map((block) => ({
52
+ type: "content",
53
+ content: block.type === "text"
54
+ ? { type: "text", text: markdownEscape(block.text) }
55
+ : toAcpContentBlock(block, false),
56
+ })),
57
+ };
58
+ }
59
+ if (typeof content === "string" && content.length > 0) {
60
+ return { content: [textContent(markdownEscape(content))] };
61
+ }
62
+ return {};
63
+ }
64
+ }
@@ -0,0 +1,10 @@
1
+ import type { ToolReporter, ToolUseFacts } from "../facts.js";
2
+ /** Glob: the file list is the result to show. */
3
+ export declare class GlobReporter implements ToolReporter {
4
+ toolUse(input: unknown): ToolUseFacts;
5
+ }
6
+ /** Grep: the title is the equivalent grep command line. */
7
+ export declare class GrepReporter implements ToolReporter {
8
+ toolUse(input: unknown): ToolUseFacts;
9
+ }
10
+ //# sourceMappingURL=search.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../src/tool-calls/reporters/search.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE9D,iDAAiD;AACjD,qBAAa,YAAa,YAAW,YAAY;IAC/C,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY;CAWtC;AAED,2DAA2D;AAC3D,qBAAa,YAAa,YAAW,YAAY;IAC/C,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY;CAkBtC"}
@@ -0,0 +1,50 @@
1
+ /** Glob: the file list is the result to show. */
2
+ export class GlobReporter {
3
+ toolUse(input) {
4
+ const glob = input;
5
+ let label = "Find";
6
+ if (glob?.path)
7
+ label += ` \`${glob.path}\``;
8
+ if (glob?.pattern)
9
+ label += ` \`${glob.pattern}\``;
10
+ return {
11
+ title: label,
12
+ kind: "search",
13
+ locations: glob?.path ? [{ path: glob.path }] : [],
14
+ };
15
+ }
16
+ }
17
+ /** Grep: the title is the equivalent grep command line. */
18
+ export class GrepReporter {
19
+ toolUse(input) {
20
+ const grep = input;
21
+ let label = "grep";
22
+ if (grep?.["-i"])
23
+ label += " -i";
24
+ if (grep?.["-n"])
25
+ label += " -n";
26
+ if (grep?.["-A"] !== undefined)
27
+ label += ` -A ${grep["-A"]}`;
28
+ if (grep?.["-B"] !== undefined)
29
+ label += ` -B ${grep["-B"]}`;
30
+ if (grep?.["-C"] !== undefined)
31
+ label += ` -C ${grep["-C"]}`;
32
+ if (grep?.output_mode === "files_with_matches")
33
+ label += " -l";
34
+ else if (grep?.output_mode === "count")
35
+ label += " -c";
36
+ if (grep?.head_limit !== undefined)
37
+ label += ` | head -${grep.head_limit}`;
38
+ if (grep?.glob)
39
+ label += ` --include="${grep.glob}"`;
40
+ if (grep?.type)
41
+ label += ` --type=${grep.type}`;
42
+ if (grep?.multiline)
43
+ label += " -P";
44
+ if (grep?.pattern)
45
+ label += ` "${grep.pattern}"`;
46
+ if (grep?.path)
47
+ label += ` ${grep.path}`;
48
+ return { title: label, kind: "search" };
49
+ }
50
+ }
@@ -0,0 +1,11 @@
1
+ import type { ToolReporter, ToolResultContext, ToolResultFacts, ToolUseFacts } from "../facts.js";
2
+ /** WebFetch: the prompt is input that the user reads. The answer is the result. */
3
+ export declare class WebFetchReporter implements ToolReporter {
4
+ toolUse(input: unknown): ToolUseFacts;
5
+ }
6
+ /** WebSearch: the hits are the result to show. */
7
+ export declare class WebSearchReporter implements ToolReporter {
8
+ toolUse(input: unknown): ToolUseFacts;
9
+ toolResult({ result, structured }: ToolResultContext): ToolResultFacts;
10
+ }
11
+ //# sourceMappingURL=web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web.d.ts","sourceRoot":"","sources":["../../../src/tool-calls/reporters/web.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAElG,mFAAmF;AACnF,qBAAa,gBAAiB,YAAW,YAAY;IACnD,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY;CAQtC;AAED,kDAAkD;AAClD,qBAAa,iBAAkB,YAAW,YAAY;IACpD,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY;IAQrC,UAAU,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,iBAAiB,GAAG,eAAe;CAuBvE"}
@@ -0,0 +1,42 @@
1
+ import { formatWebSearchHit, resultText, structuredResult, textContent } from "../content.js";
2
+ /** WebFetch: the prompt is input that the user reads. The answer is the result. */
3
+ export class WebFetchReporter {
4
+ toolUse(input) {
5
+ const fetch = input;
6
+ return {
7
+ title: fetch?.url ? `Fetch ${fetch.url}` : "Fetch",
8
+ kind: "fetch",
9
+ ...(fetch?.prompt ? { display: [textContent(fetch.prompt)] } : {}),
10
+ };
11
+ }
12
+ }
13
+ /** WebSearch: the hits are the result to show. */
14
+ export class WebSearchReporter {
15
+ toolUse(input) {
16
+ const search = input;
17
+ return {
18
+ title: search?.query ? `Search "${search.query}"` : "Web search",
19
+ kind: "fetch",
20
+ };
21
+ }
22
+ toolResult({ result, structured }) {
23
+ // The raw tool_result text is a model-directed dump. The structured
24
+ // WebSearchOutput carries the hits: render them like server-side
25
+ // web_search_result blocks ("Title (url)").
26
+ const structuredSearch = structuredResult(structured);
27
+ if (structuredSearch && Array.isArray(structuredSearch.results)) {
28
+ const lines = structuredSearch.results.flatMap((entry) => typeof entry === "string"
29
+ ? [entry]
30
+ : Array.isArray(entry?.content)
31
+ ? // tool_use_result arrives untyped across CLI versions: skip
32
+ // off-spec hits instead of "undefined (undefined)" lines.
33
+ entry.content.flatMap((hit) => typeof hit?.title === "string" && typeof hit?.url === "string"
34
+ ? [formatWebSearchHit(hit)]
35
+ : [])
36
+ : []);
37
+ if (lines.length > 0)
38
+ return { content: [textContent(lines.join("\n"))] };
39
+ }
40
+ return resultText(result);
41
+ }
42
+ }
package/dist/tools.d.ts CHANGED
@@ -1,44 +1,26 @@
1
- import { PlanEntry, ToolCallContent, ToolCallLocation, ToolKind } from "@agentclientprotocol/sdk";
1
+ import type { PlanEntry, ToolCallContent, ToolCallLocation, ToolKind } from "@agentclientprotocol/sdk";
2
2
  import { HookCallback } from "@anthropic-ai/claude-agent-sdk";
3
- import { TaskCreateInput, TaskCreateOutput, TaskListOutput, TaskUpdateInput, TaskUpdateOutput } from "@anthropic-ai/claude-agent-sdk/sdk-tools.js";
4
- import { ToolResultBlockParam, WebSearchToolResultBlockParam } from "@anthropic-ai/sdk/resources";
5
- import { BetaBashCodeExecutionToolResultBlockParam, BetaCodeExecutionToolResultBlockParam, BetaRequestMCPToolResultBlockParam, BetaTextEditorCodeExecutionToolResultBlockParam, BetaToolResultBlockParam, BetaToolSearchToolResultBlockParam, BetaWebFetchToolResultBlockParam, BetaWebSearchToolResultBlockParam } from "@anthropic-ai/sdk/resources/beta.mjs";
6
- interface ToolInfo {
3
+ import type { TaskCreateInput, TaskCreateOutput, TaskListOutput, TaskUpdateInput, TaskUpdateOutput } from "@anthropic-ai/claude-agent-sdk/sdk-tools.js";
4
+ import type { ToolResultBlock } from "./tool-calls/content.js";
5
+ import { type RenderedResult } from "./tool-calls/renderer.js";
6
+ export { markdownEscape, toDisplayPath } from "./tool-calls/content.js";
7
+ /**
8
+ * The title, kind, content, and locations of a tool use, for a client with the
9
+ * given terminal and patch capabilities. The {@link AcpToolCallRenderer} builds
10
+ * them from the facts of the tool reporter.
11
+ */
12
+ export declare function toolInfoFromToolUse(toolUse: any, supportsTerminalOutput?: boolean, cwd?: string, supportsDiffPatch?: boolean): {
7
13
  title: string;
8
14
  kind: ToolKind;
9
15
  content: ToolCallContent[];
10
16
  locations?: ToolCallLocation[];
11
- }
12
- interface ToolUpdate {
13
- title?: string;
14
- content?: ToolCallContent[];
15
- locations?: ToolCallLocation[];
16
- _meta?: {
17
- terminal_info?: {
18
- terminal_id: string;
19
- };
20
- terminal_output?: {
21
- terminal_id: string;
22
- data: string;
23
- };
24
- terminal_output_delta?: {
25
- terminal_id: string;
26
- data: string;
27
- };
28
- terminal_exit?: {
29
- terminal_id: string;
30
- exit_code: number;
31
- signal: string | null;
32
- };
33
- };
34
- }
17
+ };
35
18
  /**
36
- * Convert an absolute file path to a project-relative path for display.
37
- * Returns the original path if it's outside the project directory or if no cwd is provided.
19
+ * The result fields of a tool result, for a client with the given terminal
20
+ * capabilities. The {@link AcpToolCallRenderer} builds them from the facts of
21
+ * the tool reporter.
38
22
  */
39
- export declare function toDisplayPath(filePath: string, cwd?: string): string;
40
- export declare function toolInfoFromToolUse(toolUse: any, supportsTerminalOutput?: boolean, cwd?: string): ToolInfo;
41
- export declare function toolUpdateFromToolResult(toolResult: ToolResultBlockParam | BetaToolResultBlockParam | BetaWebSearchToolResultBlockParam | BetaWebFetchToolResultBlockParam | WebSearchToolResultBlockParam | BetaCodeExecutionToolResultBlockParam | BetaBashCodeExecutionToolResultBlockParam | BetaTextEditorCodeExecutionToolResultBlockParam | BetaRequestMCPToolResultBlockParam | BetaToolSearchToolResultBlockParam, toolUse: any | undefined, supportsTerminalOutput?: boolean, toolUseResult?: unknown, preferTerminalOutputDelta?: boolean): ToolUpdate;
23
+ export declare function toolUpdateFromToolResult(toolResult: ToolResultBlock, toolUse: any | undefined, supportsTerminalOutput?: boolean, toolUseResult?: unknown, preferTerminalOutputDelta?: boolean): RenderedResult;
42
24
  export type ClaudePlanEntry = {
43
25
  content: string;
44
26
  status: "pending" | "in_progress" | "completed";
@@ -68,11 +50,25 @@ export declare function applyTaskCreate(state: TaskState, input: TaskCreateInput
68
50
  export declare function applyTaskUpdate(state: TaskState, input: TaskUpdateInput | undefined): void;
69
51
  export declare function applyTaskList(state: TaskState, output: TaskListOutput): void;
70
52
  export declare function taskStateToPlanEntries(state: TaskState): PlanEntry[];
71
- export declare function markdownEscape(text: string): string;
72
- export declare const registerHookCallback: (toolUseID: string, { onPostToolUseHook, }: {
53
+ /**
54
+ * The plan entries of the task list, or undefined when the client already
55
+ * holds the same entries. The TaskCreated and TaskCompleted hooks and the
56
+ * Task* tool results report the same change, so the second report of a
57
+ * change has nothing new.
58
+ *
59
+ * Only an AIR client skips the repeated plan. Every other client gets every
60
+ * plan, like upstream.
61
+ */
62
+ export declare function changedTaskPlanEntries(state: TaskState, airClient: boolean): PlanEntry[] | undefined;
63
+ /** Forgets the plan that the client holds, so that the next plan goes out, for example on replay. */
64
+ export declare function forgetPublishedTaskPlan(state: TaskState): void;
65
+ export declare const registerHookCallback: (toolUseID: string, { onPostToolUseHook, onRelease, }: {
73
66
  onPostToolUseHook?: (toolUseID: string, toolInput: unknown, toolResponse: unknown) => Promise<void>;
67
+ onRelease?: () => void;
74
68
  }, ownerId?: string) => void;
75
69
  export declare function unregisterHookCallback(toolUseID: string): void;
70
+ /** Whether a PostToolUse callback for the tool use is still registered. */
71
+ export declare function hasHookCallback(toolUseID: string): boolean;
76
72
  /** PostToolUse normally follows tool_result, so keep the callback for a short
77
73
  * grace period while still bounding retention when the hook never arrives. */
78
74
  export declare function completeHookCallback(toolUseID: string): void;
@@ -94,5 +90,4 @@ export declare const createTaskHook: (options: {
94
90
  taskState: TaskState;
95
91
  onChange?: () => Promise<void>;
96
92
  }) => HookCallback;
97
- export {};
98
93
  //# sourceMappingURL=tools.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,QAAQ,EACT,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAaL,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,gBAAgB,EAKjB,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAIL,oBAAoB,EAEpB,6BAA6B,EAE9B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAEL,yCAAyC,EAGzC,qCAAqC,EAGrC,kCAAkC,EAGlC,+CAA+C,EAI/C,wBAAwB,EACxB,kCAAkC,EAIlC,gCAAgC,EAEhC,iCAAiC,EAClC,MAAM,sCAAsC,CAAC;AA4B9C,UAAU,QAAQ;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,QAAQ,CAAC;IACf,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,SAAS,CAAC,EAAE,gBAAgB,EAAE,CAAC;CAChC;AAED,UAAU,UAAU;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;IAC5B,SAAS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