@ouro.bot/cli 0.1.0-alpha.134 → 0.1.0-alpha.135
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/changelog.json +7 -0
- package/dist/heart/core.js +63 -39
- package/dist/heart/tool-loop.js +5 -1
- package/dist/mind/context.js +62 -0
- package/dist/mind/prompt.js +9 -4
- package/dist/repertoire/ado-semantic.js +6 -0
- package/dist/repertoire/coding/tools.js +5 -0
- package/dist/repertoire/tools-base.js +24 -31
- package/dist/repertoire/tools-bluebubbles.js +1 -0
- package/dist/repertoire/tools-github.js +1 -6
- package/dist/repertoire/tools-teams.js +9 -36
- package/dist/repertoire/tools.js +15 -69
- package/package.json +1 -1
- package/dist/heart/safe-workspace.js +0 -381
|
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.settleTool = exports.observeTool = exports.
|
|
36
|
+
exports.settleTool = exports.observeTool = exports.descendTool = exports.tools = exports.baseToolDefinitions = exports.editFileReadTracker = void 0;
|
|
37
37
|
exports.renderInnerProgressStatus = renderInnerProgressStatus;
|
|
38
38
|
const fs = __importStar(require("fs"));
|
|
39
39
|
const fg = __importStar(require("fast-glob"));
|
|
@@ -43,7 +43,7 @@ const skills_1 = require("./skills");
|
|
|
43
43
|
const config_1 = require("../heart/config");
|
|
44
44
|
const runtime_1 = require("../nerves/runtime");
|
|
45
45
|
const identity_1 = require("../heart/identity");
|
|
46
|
-
const
|
|
46
|
+
const identity_2 = require("../heart/identity");
|
|
47
47
|
const socket_client_1 = require("../heart/daemon/socket-client");
|
|
48
48
|
const thoughts_1 = require("../heart/daemon/thoughts");
|
|
49
49
|
const manager_1 = require("../heart/bridges/manager");
|
|
@@ -74,7 +74,10 @@ function buildContextDiff(lines, changeStart, changeEnd, contextSize = 3) {
|
|
|
74
74
|
return result.join("\n");
|
|
75
75
|
}
|
|
76
76
|
function resolveLocalToolPath(targetPath) {
|
|
77
|
-
|
|
77
|
+
if (!path.isAbsolute(targetPath)) {
|
|
78
|
+
return path.resolve((0, identity_2.getRepoRoot)(), targetPath);
|
|
79
|
+
}
|
|
80
|
+
return targetPath;
|
|
78
81
|
}
|
|
79
82
|
const NO_SESSION_FOUND_MESSAGE = "no session found for that friend/channel/key combination.";
|
|
80
83
|
const EMPTY_SESSION_MESSAGE = "session exists but has no non-system messages.";
|
|
@@ -357,6 +360,7 @@ exports.baseToolDefinitions = [
|
|
|
357
360
|
const end = limit !== undefined ? start + limit : lines.length;
|
|
358
361
|
return lines.slice(start, end).join("\n");
|
|
359
362
|
},
|
|
363
|
+
summaryKeys: ["path"],
|
|
360
364
|
},
|
|
361
365
|
{
|
|
362
366
|
tool: {
|
|
@@ -377,6 +381,7 @@ exports.baseToolDefinitions = [
|
|
|
377
381
|
fs.writeFileSync(resolvedPath, a.content, "utf-8");
|
|
378
382
|
return "ok";
|
|
379
383
|
},
|
|
384
|
+
summaryKeys: ["path"],
|
|
380
385
|
},
|
|
381
386
|
{
|
|
382
387
|
tool: {
|
|
@@ -435,6 +440,7 @@ exports.baseToolDefinitions = [
|
|
|
435
440
|
const changeEndLine = changeStartLine + newStringLines.length;
|
|
436
441
|
return buildContextDiff(lines, changeStartLine, changeEndLine);
|
|
437
442
|
},
|
|
443
|
+
summaryKeys: ["path"],
|
|
438
444
|
},
|
|
439
445
|
{
|
|
440
446
|
tool: {
|
|
@@ -457,6 +463,7 @@ exports.baseToolDefinitions = [
|
|
|
457
463
|
const matches = fg.globSync(a.pattern, { cwd, dot: true });
|
|
458
464
|
return matches.sort().join("\n");
|
|
459
465
|
},
|
|
466
|
+
summaryKeys: ["pattern", "cwd"],
|
|
460
467
|
},
|
|
461
468
|
{
|
|
462
469
|
tool: {
|
|
@@ -565,29 +572,7 @@ exports.baseToolDefinitions = [
|
|
|
565
572
|
}
|
|
566
573
|
return allResults.join("\n");
|
|
567
574
|
},
|
|
568
|
-
|
|
569
|
-
{
|
|
570
|
-
tool: {
|
|
571
|
-
type: "function",
|
|
572
|
-
function: {
|
|
573
|
-
name: "safe_workspace",
|
|
574
|
-
description: "acquire or inspect the safe harness repo workspace for local edits. returns the real workspace path, branch, and why it was chosen.",
|
|
575
|
-
parameters: {
|
|
576
|
-
type: "object",
|
|
577
|
-
properties: {},
|
|
578
|
-
},
|
|
579
|
-
},
|
|
580
|
-
},
|
|
581
|
-
handler: () => {
|
|
582
|
-
const selection = (0, safe_workspace_1.ensureSafeRepoWorkspace)();
|
|
583
|
-
return [
|
|
584
|
-
`workspace: ${selection.workspaceRoot}`,
|
|
585
|
-
`branch: ${selection.workspaceBranch}`,
|
|
586
|
-
`runtime: ${selection.runtimeKind}`,
|
|
587
|
-
`cleanup_after_merge: ${selection.cleanupAfterMerge ? "yes" : "no"}`,
|
|
588
|
-
`note: ${selection.note}`,
|
|
589
|
-
].join("\n");
|
|
590
|
-
},
|
|
575
|
+
summaryKeys: ["pattern", "path", "include"],
|
|
591
576
|
},
|
|
592
577
|
{
|
|
593
578
|
tool: {
|
|
@@ -603,13 +588,12 @@ exports.baseToolDefinitions = [
|
|
|
603
588
|
},
|
|
604
589
|
},
|
|
605
590
|
handler: (a) => {
|
|
606
|
-
|
|
607
|
-
return (0, child_process_1.execSync)(prepared.command, {
|
|
591
|
+
return (0, child_process_1.execSync)(a.command, {
|
|
608
592
|
encoding: "utf-8",
|
|
609
593
|
timeout: 30000,
|
|
610
|
-
...(prepared.cwd ? { cwd: prepared.cwd } : {}),
|
|
611
594
|
});
|
|
612
595
|
},
|
|
596
|
+
summaryKeys: ["command"],
|
|
613
597
|
},
|
|
614
598
|
{
|
|
615
599
|
tool: {
|
|
@@ -643,6 +627,7 @@ exports.baseToolDefinitions = [
|
|
|
643
627
|
return `error: ${e}`;
|
|
644
628
|
}
|
|
645
629
|
},
|
|
630
|
+
summaryKeys: ["name"],
|
|
646
631
|
},
|
|
647
632
|
{
|
|
648
633
|
tool: {
|
|
@@ -674,6 +659,7 @@ exports.baseToolDefinitions = [
|
|
|
674
659
|
return `error: ${e}`;
|
|
675
660
|
}
|
|
676
661
|
},
|
|
662
|
+
summaryKeys: ["prompt"],
|
|
677
663
|
},
|
|
678
664
|
{
|
|
679
665
|
tool: {
|
|
@@ -714,6 +700,7 @@ exports.baseToolDefinitions = [
|
|
|
714
700
|
return `error: ${e}`;
|
|
715
701
|
}
|
|
716
702
|
},
|
|
703
|
+
summaryKeys: ["query"],
|
|
717
704
|
},
|
|
718
705
|
{
|
|
719
706
|
tool: {
|
|
@@ -743,6 +730,7 @@ exports.baseToolDefinitions = [
|
|
|
743
730
|
return `error: ${e instanceof Error ? e.message : String(e)}`;
|
|
744
731
|
}
|
|
745
732
|
},
|
|
733
|
+
summaryKeys: ["query"],
|
|
746
734
|
},
|
|
747
735
|
{
|
|
748
736
|
tool: {
|
|
@@ -771,6 +759,7 @@ exports.baseToolDefinitions = [
|
|
|
771
759
|
});
|
|
772
760
|
return `saved memory fact (added=${result.added}, skipped=${result.skipped})`;
|
|
773
761
|
},
|
|
762
|
+
summaryKeys: ["text", "about"],
|
|
774
763
|
},
|
|
775
764
|
{
|
|
776
765
|
tool: {
|
|
@@ -798,6 +787,7 @@ exports.baseToolDefinitions = [
|
|
|
798
787
|
return `friend not found: ${friendId}`;
|
|
799
788
|
return JSON.stringify(friend, null, 2);
|
|
800
789
|
},
|
|
790
|
+
summaryKeys: ["friendId"],
|
|
801
791
|
},
|
|
802
792
|
{
|
|
803
793
|
tool: {
|
|
@@ -881,6 +871,7 @@ exports.baseToolDefinitions = [
|
|
|
881
871
|
return `error saving note: ${err instanceof Error ? err.message : String(err)}`;
|
|
882
872
|
}
|
|
883
873
|
},
|
|
874
|
+
summaryKeys: ["type", "key", "content"],
|
|
884
875
|
},
|
|
885
876
|
// -- cross-session awareness --
|
|
886
877
|
{
|
|
@@ -979,6 +970,7 @@ exports.baseToolDefinitions = [
|
|
|
979
970
|
}
|
|
980
971
|
return `unknown bridge action: ${action}`;
|
|
981
972
|
},
|
|
973
|
+
summaryKeys: ["action", "bridgeId", "objective", "friendId", "channel", "key"],
|
|
982
974
|
},
|
|
983
975
|
{
|
|
984
976
|
tool: {
|
|
@@ -1342,14 +1334,15 @@ exports.baseToolDefinitions = [
|
|
|
1342
1334
|
return `reasoning effort set to "${level}".`;
|
|
1343
1335
|
},
|
|
1344
1336
|
requiredCapability: "reasoning-effort",
|
|
1337
|
+
summaryKeys: ["level"],
|
|
1345
1338
|
},
|
|
1346
1339
|
...tools_1.codingToolDefinitions,
|
|
1347
1340
|
];
|
|
1348
1341
|
exports.tools = exports.baseToolDefinitions.map((d) => d.tool);
|
|
1349
|
-
exports.
|
|
1342
|
+
exports.descendTool = {
|
|
1350
1343
|
type: "function",
|
|
1351
1344
|
function: {
|
|
1352
|
-
name: "
|
|
1345
|
+
name: "descend",
|
|
1353
1346
|
description: "i need to think about this privately. this takes the current thread inward -- i'll sit with it, work through it, or carry it to where it needs to go. must be the only tool call in the turn.",
|
|
1354
1347
|
parameters: {
|
|
1355
1348
|
type: "object",
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.githubToolDefinitions = void 0;
|
|
4
|
-
exports.summarizeGithubArgs = summarizeGithubArgs;
|
|
5
4
|
const github_client_1 = require("./github-client");
|
|
6
5
|
const runtime_1 = require("../nerves/runtime");
|
|
7
6
|
exports.githubToolDefinitions = [
|
|
@@ -44,10 +43,6 @@ exports.githubToolDefinitions = [
|
|
|
44
43
|
},
|
|
45
44
|
integration: "github",
|
|
46
45
|
confirmationRequired: true,
|
|
46
|
+
summaryKeys: ["title"],
|
|
47
47
|
},
|
|
48
48
|
];
|
|
49
|
-
function summarizeGithubArgs(name, args) {
|
|
50
|
-
if (name === "file_ouroboros_bug")
|
|
51
|
-
return args.title || "";
|
|
52
|
-
return undefined;
|
|
53
|
-
}
|
|
@@ -4,7 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.teamsToolDefinitions = void 0;
|
|
7
|
-
exports.summarizeTeamsArgs = summarizeTeamsArgs;
|
|
8
7
|
const graph_client_1 = require("./graph-client");
|
|
9
8
|
const ado_client_1 = require("./ado-client");
|
|
10
9
|
const graph_endpoints_json_1 = __importDefault(require("./data/graph-endpoints.json"));
|
|
@@ -36,6 +35,7 @@ exports.teamsToolDefinitions = [
|
|
|
36
35
|
return (0, graph_client_1.graphRequest)(ctx.graphToken, "GET", args.path);
|
|
37
36
|
},
|
|
38
37
|
integration: "graph",
|
|
38
|
+
summaryKeys: ["path"],
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
tool: {
|
|
@@ -65,6 +65,7 @@ exports.teamsToolDefinitions = [
|
|
|
65
65
|
},
|
|
66
66
|
integration: "graph",
|
|
67
67
|
confirmationRequired: true,
|
|
68
|
+
summaryKeys: ["method", "path"],
|
|
68
69
|
},
|
|
69
70
|
// -- Generic ADO tools --
|
|
70
71
|
{
|
|
@@ -94,6 +95,7 @@ exports.teamsToolDefinitions = [
|
|
|
94
95
|
return (0, ado_client_1.adoRequest)(ctx.adoToken, method, args.organization, args.path, args.body, args.host);
|
|
95
96
|
},
|
|
96
97
|
integration: "ado",
|
|
98
|
+
summaryKeys: ["method", "organization", "path"],
|
|
97
99
|
},
|
|
98
100
|
{
|
|
99
101
|
tool: {
|
|
@@ -125,6 +127,7 @@ exports.teamsToolDefinitions = [
|
|
|
125
127
|
},
|
|
126
128
|
integration: "ado",
|
|
127
129
|
confirmationRequired: true,
|
|
130
|
+
summaryKeys: ["method", "organization", "path"],
|
|
128
131
|
},
|
|
129
132
|
// -- Convenience aliases (backward compat) --
|
|
130
133
|
{
|
|
@@ -143,6 +146,7 @@ exports.teamsToolDefinitions = [
|
|
|
143
146
|
return (0, graph_client_1.getProfile)(ctx.graphToken);
|
|
144
147
|
},
|
|
145
148
|
integration: "graph",
|
|
149
|
+
summaryKeys: [],
|
|
146
150
|
},
|
|
147
151
|
{
|
|
148
152
|
tool: {
|
|
@@ -186,6 +190,7 @@ exports.teamsToolDefinitions = [
|
|
|
186
190
|
return (0, ado_client_1.queryWorkItems)(ctx.adoToken, org, query);
|
|
187
191
|
},
|
|
188
192
|
integration: "ado",
|
|
193
|
+
summaryKeys: ["organization", "query"],
|
|
189
194
|
},
|
|
190
195
|
// -- Proactive messaging --
|
|
191
196
|
{
|
|
@@ -233,6 +238,7 @@ exports.teamsToolDefinitions = [
|
|
|
233
238
|
},
|
|
234
239
|
/* v8 ignore stop */
|
|
235
240
|
confirmationRequired: true,
|
|
241
|
+
summaryKeys: ["user_name", "user_id"],
|
|
236
242
|
},
|
|
237
243
|
// -- Documentation tools --
|
|
238
244
|
{
|
|
@@ -254,6 +260,7 @@ exports.teamsToolDefinitions = [
|
|
|
254
260
|
return searchEndpoints(graph_endpoints_json_1.default, args.query || "");
|
|
255
261
|
},
|
|
256
262
|
integration: "graph",
|
|
263
|
+
summaryKeys: ["query"],
|
|
257
264
|
},
|
|
258
265
|
{
|
|
259
266
|
tool: {
|
|
@@ -274,6 +281,7 @@ exports.teamsToolDefinitions = [
|
|
|
274
281
|
return searchEndpoints(ado_endpoints_json_1.default, args.query || "");
|
|
275
282
|
},
|
|
276
283
|
integration: "ado",
|
|
284
|
+
summaryKeys: ["query"],
|
|
277
285
|
},
|
|
278
286
|
];
|
|
279
287
|
function searchEndpoints(entries, query) {
|
|
@@ -304,38 +312,3 @@ function searchEndpoints(entries, query) {
|
|
|
304
312
|
return lines.join("\n");
|
|
305
313
|
}).join("\n\n");
|
|
306
314
|
}
|
|
307
|
-
function summarizeTeamsArgs(name, args) {
|
|
308
|
-
function summarizeKeyValues(keys) {
|
|
309
|
-
const parts = [];
|
|
310
|
-
for (const key of keys) {
|
|
311
|
-
const raw = args[key];
|
|
312
|
-
if (raw === undefined || raw === null)
|
|
313
|
-
continue;
|
|
314
|
-
const compact = String(raw).replace(/\s+/g, " ").trim();
|
|
315
|
-
if (!compact)
|
|
316
|
-
continue;
|
|
317
|
-
const clipped = compact.length > 60 ? compact.slice(0, 60) + "..." : compact;
|
|
318
|
-
parts.push(`${key}=${clipped}`);
|
|
319
|
-
}
|
|
320
|
-
return parts.join(" ");
|
|
321
|
-
}
|
|
322
|
-
if (name === "graph_profile")
|
|
323
|
-
return "";
|
|
324
|
-
if (name === "ado_work_items")
|
|
325
|
-
return summarizeKeyValues(["organization", "query"]);
|
|
326
|
-
if (name === "graph_query")
|
|
327
|
-
return summarizeKeyValues(["path"]);
|
|
328
|
-
if (name === "graph_mutate")
|
|
329
|
-
return summarizeKeyValues(["method", "path"]);
|
|
330
|
-
if (name === "ado_query")
|
|
331
|
-
return summarizeKeyValues(["method", "organization", "path"]);
|
|
332
|
-
if (name === "ado_mutate")
|
|
333
|
-
return summarizeKeyValues(["method", "organization", "path"]);
|
|
334
|
-
if (name === "graph_docs")
|
|
335
|
-
return summarizeKeyValues(["query"]);
|
|
336
|
-
if (name === "ado_docs")
|
|
337
|
-
return summarizeKeyValues(["query"]);
|
|
338
|
-
if (name === "teams_send_message")
|
|
339
|
-
return summarizeKeyValues(["user_name", "user_id"]);
|
|
340
|
-
return undefined;
|
|
341
|
-
}
|
package/dist/repertoire/tools.js
CHANGED
|
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.
|
|
36
|
+
exports.descendTool = exports.observeTool = exports.settleTool = exports.tools = void 0;
|
|
37
37
|
exports.getToolsForChannel = getToolsForChannel;
|
|
38
38
|
exports.isConfirmationRequired = isConfirmationRequired;
|
|
39
39
|
exports.execTool = execTool;
|
|
@@ -46,7 +46,6 @@ const tools_github_1 = require("./tools-github");
|
|
|
46
46
|
const runtime_1 = require("../nerves/runtime");
|
|
47
47
|
const guardrails_1 = require("./guardrails");
|
|
48
48
|
const identity_1 = require("../heart/identity");
|
|
49
|
-
const safe_workspace_1 = require("../heart/safe-workspace");
|
|
50
49
|
const surface_tool_1 = require("../senses/surface-tool");
|
|
51
50
|
const obligations_1 = require("../mind/obligations");
|
|
52
51
|
const session_activity_1 = require("../heart/session-activity");
|
|
@@ -64,7 +63,7 @@ var tools_base_2 = require("./tools-base");
|
|
|
64
63
|
Object.defineProperty(exports, "tools", { enumerable: true, get: function () { return tools_base_2.tools; } });
|
|
65
64
|
Object.defineProperty(exports, "settleTool", { enumerable: true, get: function () { return tools_base_2.settleTool; } });
|
|
66
65
|
Object.defineProperty(exports, "observeTool", { enumerable: true, get: function () { return tools_base_2.observeTool; } });
|
|
67
|
-
Object.defineProperty(exports, "
|
|
66
|
+
Object.defineProperty(exports, "descendTool", { enumerable: true, get: function () { return tools_base_2.descendTool; } });
|
|
68
67
|
// Surface tool handler: routes content to friend's freshest session
|
|
69
68
|
/* v8 ignore start -- surface handler wiring: core logic tested via surface-tool.test.ts; this wires identity/routing deps @preserve */
|
|
70
69
|
const surfaceToolDefinition = {
|
|
@@ -102,6 +101,10 @@ const surfaceToolDefinition = {
|
|
|
102
101
|
text: content,
|
|
103
102
|
});
|
|
104
103
|
if (proactiveResult.delivered) {
|
|
104
|
+
// Inject surfaced content into the target session so it knows what was delivered
|
|
105
|
+
const { appendSyntheticAssistantMessage } = await Promise.resolve().then(() => __importStar(require("../mind/context")));
|
|
106
|
+
const sessionFilePath = path.join(sessionsDir, bridgeTarget.friendId, bridgeTarget.channel, `${bridgeTarget.key}.json`);
|
|
107
|
+
appendSyntheticAssistantMessage(sessionFilePath, `[surfaced from inner dialog] ${content}`);
|
|
105
108
|
return { status: "delivered", detail: "via iMessage" };
|
|
106
109
|
}
|
|
107
110
|
}
|
|
@@ -138,6 +141,10 @@ const surfaceToolDefinition = {
|
|
|
138
141
|
text: content,
|
|
139
142
|
});
|
|
140
143
|
if (proactiveResult.delivered) {
|
|
144
|
+
// Inject surfaced content into the target session so it knows what was delivered
|
|
145
|
+
const { appendSyntheticAssistantMessage } = await Promise.resolve().then(() => __importStar(require("../mind/context")));
|
|
146
|
+
const sessionFilePath = path.join(sessionsDir, freshest.friendId, freshest.channel, `${freshest.key}.json`);
|
|
147
|
+
appendSyntheticAssistantMessage(sessionFilePath, `[surfaced from inner dialog] ${content}`);
|
|
141
148
|
return { status: "delivered", detail: "via iMessage" };
|
|
142
149
|
}
|
|
143
150
|
}
|
|
@@ -201,6 +208,7 @@ const surfaceToolDefinition = {
|
|
|
201
208
|
},
|
|
202
209
|
});
|
|
203
210
|
},
|
|
211
|
+
summaryKeys: ["content", "delegationId"],
|
|
204
212
|
};
|
|
205
213
|
/* v8 ignore stop */
|
|
206
214
|
// All tool definitions in a single registry
|
|
@@ -275,13 +283,7 @@ function isConfirmationRequired(toolName) {
|
|
|
275
283
|
const def = allDefinitions.find((d) => d.tool.function.name === toolName);
|
|
276
284
|
return def?.confirmationRequired === true;
|
|
277
285
|
}
|
|
278
|
-
function normalizeGuardArgs(
|
|
279
|
-
if ((name === "read_file" || name === "write_file" || name === "edit_file") && args.path) {
|
|
280
|
-
return {
|
|
281
|
-
...args,
|
|
282
|
-
path: (0, safe_workspace_1.resolveSafeRepoPath)({ requestedPath: args.path }).resolvedPath,
|
|
283
|
-
};
|
|
284
|
-
}
|
|
286
|
+
function normalizeGuardArgs(_name, args) {
|
|
285
287
|
return args;
|
|
286
288
|
}
|
|
287
289
|
async function execTool(name, args, ctx) {
|
|
@@ -363,65 +365,9 @@ function summarizeUnknownArgs(args) {
|
|
|
363
365
|
return summarizeKeyValues(args, keys);
|
|
364
366
|
}
|
|
365
367
|
function summarizeArgs(name, args) {
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
return teamsSummary;
|
|
370
|
-
// Check github tools
|
|
371
|
-
const githubSummary = (0, tools_github_1.summarizeGithubArgs)(name, args);
|
|
372
|
-
if (githubSummary !== undefined)
|
|
373
|
-
return githubSummary;
|
|
374
|
-
// Base tools
|
|
375
|
-
if (name === "read_file" || name === "write_file")
|
|
376
|
-
return summarizeKeyValues(args, ["path"]);
|
|
377
|
-
if (name === "edit_file")
|
|
378
|
-
return summarizeKeyValues(args, ["path"]);
|
|
379
|
-
if (name === "glob")
|
|
380
|
-
return summarizeKeyValues(args, ["pattern", "cwd"]);
|
|
381
|
-
if (name === "grep")
|
|
382
|
-
return summarizeKeyValues(args, ["pattern", "path", "include"]);
|
|
383
|
-
if (name === "shell")
|
|
384
|
-
return summarizeKeyValues(args, ["command"]);
|
|
385
|
-
if (name === "load_skill")
|
|
386
|
-
return summarizeKeyValues(args, ["name"]);
|
|
387
|
-
if (name === "coding_spawn")
|
|
388
|
-
return summarizeKeyValues(args, ["runner", "workdir", "taskRef"]);
|
|
389
|
-
if (name === "coding_status")
|
|
390
|
-
return summarizeKeyValues(args, ["sessionId"]);
|
|
391
|
-
if (name === "coding_tail")
|
|
392
|
-
return summarizeKeyValues(args, ["sessionId"]);
|
|
393
|
-
if (name === "coding_send_input")
|
|
394
|
-
return summarizeKeyValues(args, ["sessionId", "input"]);
|
|
395
|
-
if (name === "coding_kill")
|
|
396
|
-
return summarizeKeyValues(args, ["sessionId"]);
|
|
397
|
-
if (name === "bluebubbles_set_reply_target")
|
|
398
|
-
return summarizeKeyValues(args, ["target", "threadOriginatorGuid"]);
|
|
399
|
-
if (name === "set_reasoning_effort")
|
|
400
|
-
return summarizeKeyValues(args, ["level"]);
|
|
401
|
-
if (name === "claude")
|
|
402
|
-
return summarizeKeyValues(args, ["prompt"]);
|
|
403
|
-
if (name === "web_search")
|
|
404
|
-
return summarizeKeyValues(args, ["query"]);
|
|
405
|
-
if (name === "memory_search")
|
|
406
|
-
return summarizeKeyValues(args, ["query"]);
|
|
407
|
-
if (name === "memory_save")
|
|
408
|
-
return summarizeKeyValues(args, ["text", "about"]);
|
|
409
|
-
if (name === "get_friend_note")
|
|
410
|
-
return summarizeKeyValues(args, ["friendId"]);
|
|
411
|
-
if (name === "save_friend_note") {
|
|
412
|
-
return summarizeKeyValues(args, ["type", "key", "content"]);
|
|
368
|
+
const def = allDefinitions.find((d) => d.tool.function.name === name);
|
|
369
|
+
if (def && def.summaryKeys !== undefined) {
|
|
370
|
+
return summarizeKeyValues(args, def.summaryKeys);
|
|
413
371
|
}
|
|
414
|
-
if (name === "bridge_manage")
|
|
415
|
-
return summarizeKeyValues(args, ["action", "bridgeId", "objective", "friendId", "channel", "key"]);
|
|
416
|
-
if (name === "ado_backlog_list")
|
|
417
|
-
return summarizeKeyValues(args, ["organization", "project"]);
|
|
418
|
-
if (name === "ado_batch_update")
|
|
419
|
-
return summarizeKeyValues(args, ["organization", "project"]);
|
|
420
|
-
if (name === "ado_create_epic" || name === "ado_create_issue")
|
|
421
|
-
return summarizeKeyValues(args, ["organization", "project", "title"]);
|
|
422
|
-
if (name === "ado_move_items")
|
|
423
|
-
return summarizeKeyValues(args, ["organization", "project", "workItemIds"]);
|
|
424
|
-
if (name === "ado_restructure_backlog")
|
|
425
|
-
return summarizeKeyValues(args, ["organization", "project"]);
|
|
426
372
|
return summarizeUnknownArgs(args);
|
|
427
373
|
}
|