@tarquinen/opencode-dcp 0.4.2 → 0.4.13
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 +8 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -15
- package/dist/index.js.map +1 -1
- package/dist/lib/config.js +2 -2
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/core/janitor.d.ts +3 -25
- package/dist/lib/core/janitor.d.ts.map +1 -1
- package/dist/lib/core/janitor.js +2 -11
- package/dist/lib/core/janitor.js.map +1 -1
- package/dist/lib/core/strategies/deduplication.d.ts +1 -1
- package/dist/lib/core/strategies/index.d.ts +32 -2
- package/dist/lib/core/strategies/index.d.ts.map +1 -1
- package/dist/lib/core/strategies/index.js.map +1 -1
- package/dist/lib/fetch-wrapper/formats/anthropic.d.ts +8 -0
- package/dist/lib/fetch-wrapper/formats/anthropic.d.ts.map +1 -0
- package/dist/lib/fetch-wrapper/formats/anthropic.js +96 -0
- package/dist/lib/fetch-wrapper/formats/anthropic.js.map +1 -0
- package/dist/lib/fetch-wrapper/formats/bedrock.d.ts +3 -9
- package/dist/lib/fetch-wrapper/formats/bedrock.d.ts.map +1 -1
- package/dist/lib/fetch-wrapper/formats/bedrock.js +15 -46
- package/dist/lib/fetch-wrapper/formats/bedrock.js.map +1 -1
- package/dist/lib/fetch-wrapper/formats/gemini.d.ts +1 -7
- package/dist/lib/fetch-wrapper/formats/gemini.d.ts.map +1 -1
- package/dist/lib/fetch-wrapper/formats/gemini.js +19 -23
- package/dist/lib/fetch-wrapper/formats/gemini.js.map +1 -1
- package/dist/lib/fetch-wrapper/formats/index.d.ts +1 -0
- package/dist/lib/fetch-wrapper/formats/index.d.ts.map +1 -1
- package/dist/lib/fetch-wrapper/formats/index.js +1 -0
- package/dist/lib/fetch-wrapper/formats/index.js.map +1 -1
- package/dist/lib/fetch-wrapper/formats/openai-chat.d.ts +0 -11
- package/dist/lib/fetch-wrapper/formats/openai-chat.d.ts.map +1 -1
- package/dist/lib/fetch-wrapper/formats/openai-chat.js +19 -25
- package/dist/lib/fetch-wrapper/formats/openai-chat.js.map +1 -1
- package/dist/lib/fetch-wrapper/formats/openai-responses.d.ts +0 -8
- package/dist/lib/fetch-wrapper/formats/openai-responses.d.ts.map +1 -1
- package/dist/lib/fetch-wrapper/formats/openai-responses.js +15 -21
- package/dist/lib/fetch-wrapper/formats/openai-responses.js.map +1 -1
- package/dist/lib/fetch-wrapper/handler.d.ts +0 -10
- package/dist/lib/fetch-wrapper/handler.d.ts.map +1 -1
- package/dist/lib/fetch-wrapper/handler.js +74 -41
- package/dist/lib/fetch-wrapper/handler.js.map +1 -1
- package/dist/lib/fetch-wrapper/index.d.ts +4 -5
- package/dist/lib/fetch-wrapper/index.d.ts.map +1 -1
- package/dist/lib/fetch-wrapper/index.js +16 -7
- package/dist/lib/fetch-wrapper/index.js.map +1 -1
- package/dist/lib/fetch-wrapper/prunable-list.d.ts +8 -0
- package/dist/lib/fetch-wrapper/prunable-list.d.ts.map +1 -0
- package/dist/lib/fetch-wrapper/prunable-list.js +38 -0
- package/dist/lib/fetch-wrapper/prunable-list.js.map +1 -0
- package/dist/lib/fetch-wrapper/tool-tracker.d.ts +8 -0
- package/dist/lib/fetch-wrapper/tool-tracker.d.ts.map +1 -0
- package/dist/lib/fetch-wrapper/tool-tracker.js +7 -0
- package/dist/lib/fetch-wrapper/tool-tracker.js.map +1 -0
- package/dist/lib/fetch-wrapper/types.d.ts +31 -46
- package/dist/lib/fetch-wrapper/types.d.ts.map +1 -1
- package/dist/lib/fetch-wrapper/types.js +6 -44
- package/dist/lib/fetch-wrapper/types.js.map +1 -1
- package/dist/lib/hooks.d.ts +6 -2
- package/dist/lib/hooks.d.ts.map +1 -1
- package/dist/lib/hooks.js +21 -11
- package/dist/lib/hooks.js.map +1 -1
- package/dist/lib/prompts/nudge.txt +8 -5
- package/dist/lib/prompts/synthetic.txt +30 -28
- package/dist/lib/prompts/tool.txt +46 -63
- package/dist/lib/pruning-tool.d.ts +1 -1
- package/dist/lib/pruning-tool.d.ts.map +1 -1
- package/dist/lib/pruning-tool.js +30 -23
- package/dist/lib/pruning-tool.js.map +1 -1
- package/dist/lib/state/id-mapping.d.ts +0 -1
- package/dist/lib/state/id-mapping.d.ts.map +1 -1
- package/dist/lib/state/id-mapping.js +0 -3
- package/dist/lib/state/id-mapping.js.map +1 -1
- package/dist/lib/state/index.d.ts +3 -0
- package/dist/lib/state/index.d.ts.map +1 -1
- package/dist/lib/state/index.js.map +1 -1
- package/dist/lib/state/tool-cache.d.ts +5 -12
- package/dist/lib/state/tool-cache.d.ts.map +1 -1
- package/dist/lib/state/tool-cache.js +47 -72
- package/dist/lib/state/tool-cache.js.map +1 -1
- package/dist/lib/ui/display-utils.d.ts +12 -0
- package/dist/lib/ui/display-utils.d.ts.map +1 -1
- package/dist/lib/ui/display-utils.js +66 -0
- package/dist/lib/ui/display-utils.js.map +1 -1
- package/dist/lib/ui/notification.d.ts +5 -12
- package/dist/lib/ui/notification.d.ts.map +1 -1
- package/dist/lib/ui/notification.js +31 -138
- package/dist/lib/ui/notification.js.map +1 -1
- package/package.json +1 -1
- package/dist/lib/api-formats/prunable-list.d.ts +0 -49
- package/dist/lib/api-formats/prunable-list.d.ts.map +0 -1
- package/dist/lib/api-formats/prunable-list.js +0 -112
- package/dist/lib/api-formats/prunable-list.js.map +0 -1
- package/dist/lib/api-formats/synth-instruction.d.ts +0 -29
- package/dist/lib/api-formats/synth-instruction.d.ts.map +0 -1
- package/dist/lib/api-formats/synth-instruction.js +0 -171
- package/dist/lib/api-formats/synth-instruction.js.map +0 -1
- package/dist/lib/core/strategies/types.d.ts +0 -35
- package/dist/lib/core/strategies/types.d.ts.map +0 -1
- package/dist/lib/core/strategies/types.js +0 -6
- package/dist/lib/core/strategies/types.js.map +0 -1
|
@@ -1,73 +1,56 @@
|
|
|
1
|
-
Prunes tool outputs from context to manage conversation size
|
|
1
|
+
Prunes tool outputs from context to manage conversation size and reduce noise.
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## IMPORTANT: The Prunable List
|
|
4
|
+
A `<prunable-tools>` list is injected into user messages showing available tool outputs you can prune. Each line has the format `ID: tool, parameter` (e.g., `20: read, /path/to/file.ts`). Use these numeric IDs to select which tools to prune.
|
|
4
5
|
|
|
5
|
-
## CRITICAL:
|
|
6
|
+
## CRITICAL: When and How to Prune
|
|
6
7
|
|
|
7
|
-
You
|
|
8
|
+
You must use this tool in three specific scenarios. The rules for distillation (summarizing findings) differ for each. **You must specify the reason as the first element of the `ids` array** to indicate which scenario applies.
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
### 1. Task Completion (Clean Up) — reason: `completion`
|
|
11
|
+
**When:** You have successfully completed a specific unit of work (e.g., fixed a bug, wrote a file, answered a question).
|
|
12
|
+
**Action:** Prune the tools used for that task.
|
|
13
|
+
**Distillation:** NOT REQUIRED. Since the task is done, the raw data is no longer needed. Simply state that the task is complete.
|
|
10
14
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
- What you found (the key facts/signals)
|
|
16
|
-
- What you concluded (how this affects the task or next step)
|
|
17
|
-
3. ONLY AFTER narrating, call `prune` with the numeric IDs of outputs no longer needed
|
|
15
|
+
### 2. Removing Noise (Garbage Collection) — reason: `noise`
|
|
16
|
+
**When:** You have read files or run commands that turned out to be irrelevant, unhelpful, or outdated (meaning later tools have provided fresher, more valid information).
|
|
17
|
+
**Action:** Prune these specific tool outputs immediately.
|
|
18
|
+
**Distillation:** FORBIDDEN. Do not pollute the context by summarizing useless information. Just cut it out.
|
|
18
19
|
|
|
19
|
-
|
|
20
|
+
### 3. Context Conservation (Research & Consolidation) — reason: `consolidation`
|
|
21
|
+
**When:** You have gathered useful information. Prune frequently as you work (e.g., after reading a few files), rather than waiting for a "long" phase to end.
|
|
22
|
+
**Action:** Convert raw data into distilled knowledge. This allows you to discard large outputs (like full file reads) while keeping only the specific parts you need (like a single function signature or constant).
|
|
23
|
+
**Distillation:** MANDATORY. Before pruning, you *must* explicitly summarize the key findings from *every* tool you plan to prune.
|
|
24
|
+
- **Extract specific value:** If you read a large file but only care about one function, record that function's details and prune the whole read.
|
|
25
|
+
- Narrative format: "I found X in file Y..."
|
|
26
|
+
- Capture all relevant details (function names, logic, constraints).
|
|
27
|
+
- Once distilled into your response history, the raw tool output can be safely pruned.
|
|
20
28
|
|
|
21
|
-
##
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
<prunable-tools>
|
|
26
|
-
1: read, src/foo.ts
|
|
27
|
-
2: bash, run tests
|
|
28
|
-
3: grep, "error" in logs/
|
|
29
|
-
</prunable-tools>
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
To prune outputs 1 and 3, call: `prune({ ids: [1, 3] })`
|
|
33
|
-
|
|
34
|
-
## When to Use This Tool
|
|
35
|
-
|
|
36
|
-
**Key heuristic: Distill, then prune when you finish something and are about to start something else.**
|
|
37
|
-
|
|
38
|
-
Ask yourself: "Have I just completed a discrete unit of work?" If yes, narrate your findings, then prune before moving on.
|
|
39
|
-
|
|
40
|
-
**After completing a unit of work:**
|
|
41
|
-
- Made a commit
|
|
42
|
-
- Fixed a bug and confirmed it works
|
|
43
|
-
- Answered a question the user asked
|
|
44
|
-
- Finished implementing a feature or function
|
|
45
|
-
- Completed one item in a list and moving to the next
|
|
46
|
-
|
|
47
|
-
**After repetitive or exploratory work:**
|
|
48
|
-
- Explored multiple files that didn't lead to changes
|
|
49
|
-
- Iterated on a difficult problem where some approaches didn't pan out
|
|
50
|
-
- Used the same tool multiple times (e.g., re-reading a file, running repeated build/type checks)
|
|
29
|
+
## Best Practices
|
|
30
|
+
- **Don't wait too long:** Prune frequently to keep the context agile.
|
|
31
|
+
- **Be surgical:** You can mix strategies. Prune noise without comment, while distilling useful context in the same turn.
|
|
32
|
+
- **Verify:** Ensure you have captured what you need before deleting useful raw data.
|
|
51
33
|
|
|
52
34
|
## Examples
|
|
53
35
|
|
|
54
|
-
<
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
36
|
+
<example_noise>
|
|
37
|
+
Assistant: [Reads 'wrong_file.ts']
|
|
38
|
+
This file isn't relevant to the auth system. I'll remove it to clear the context.
|
|
39
|
+
[Uses prune with ids: ["noise", 5]]
|
|
40
|
+
</example_noise>
|
|
41
|
+
|
|
42
|
+
<example_consolidation>
|
|
43
|
+
Assistant: [Reads 5 different config files]
|
|
44
|
+
I have analyzed the configuration. Here is the distillation:
|
|
45
|
+
- 'config.ts' uses port 3000.
|
|
46
|
+
- 'db.ts' connects to mongo:27017.
|
|
47
|
+
- The other 3 files were defaults.
|
|
48
|
+
I have preserved the signals above, so I am now pruning the raw reads.
|
|
49
|
+
[Uses prune with ids: ["consolidation", 10, 11, 12, 13, 14]]
|
|
50
|
+
</example_consolidation>
|
|
51
|
+
|
|
52
|
+
<example_completion>
|
|
53
|
+
Assistant: [Runs tests, they pass]
|
|
54
|
+
The tests passed. The feature is verified.
|
|
55
|
+
[Uses prune with ids: ["completion", 20, 21]]
|
|
56
|
+
</example_completion>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { tool } from "@opencode-ai/plugin";
|
|
2
2
|
import type { PluginState } from "./state";
|
|
3
3
|
import type { PluginConfig } from "./config";
|
|
4
|
-
import type { ToolTracker } from "./
|
|
4
|
+
import type { ToolTracker } from "./fetch-wrapper/tool-tracker";
|
|
5
5
|
import { type NotificationContext } from "./ui/notification";
|
|
6
6
|
import type { Logger } from "./logger";
|
|
7
7
|
export interface PruneToolContext {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pruning-tool.d.ts","sourceRoot":"","sources":["../../lib/pruning-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAC1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAC1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAC5C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"pruning-tool.d.ts","sourceRoot":"","sources":["../../lib/pruning-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAC1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAC1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAC5C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAK/D,OAAO,EAA2B,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAIrF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAQtC,MAAM,WAAW,gBAAgB;IAC7B,MAAM,EAAE,GAAG,CAAA;IACX,KAAK,EAAE,WAAW,CAAA;IAClB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,YAAY,CAAA;IACpB,eAAe,EAAE,mBAAmB,CAAA;IACpC,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC5B;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC7B,GAAG,EAAE,gBAAgB,EACrB,WAAW,EAAE,WAAW,GACzB,UAAU,CAAC,OAAO,IAAI,CAAC,CA4HzB"}
|
package/dist/lib/pruning-tool.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { tool } from "@opencode-ai/plugin";
|
|
2
|
-
import { resetToolTrackerCount } from "./
|
|
3
|
-
import { isSubagentSession } from "./hooks";
|
|
2
|
+
import { resetToolTrackerCount } from "./fetch-wrapper/tool-tracker";
|
|
3
|
+
import { isSubagentSession, findCurrentAgent } from "./hooks";
|
|
4
4
|
import { getActualId } from "./state/id-mapping";
|
|
5
|
-
import {
|
|
5
|
+
import { sendUnifiedNotification } from "./ui/notification";
|
|
6
|
+
import { formatPruningResultForTool } from "./ui/display-utils";
|
|
6
7
|
import { ensureSessionRestored } from "./state";
|
|
7
8
|
import { saveSessionState } from "./state/persistence";
|
|
8
9
|
import { estimateTokensBatch } from "./tokenizer";
|
|
@@ -17,10 +18,13 @@ export function createPruningTool(ctx, toolTracker) {
|
|
|
17
18
|
return tool({
|
|
18
19
|
description: TOOL_DESCRIPTION,
|
|
19
20
|
args: {
|
|
20
|
-
ids: tool.schema.array(tool.schema.
|
|
21
|
+
ids: tool.schema.array(tool.schema.union([
|
|
22
|
+
tool.schema.enum(["completion", "noise", "consolidation"]),
|
|
23
|
+
tool.schema.number()
|
|
24
|
+
])).describe("First element is the reason ('completion', 'noise', 'consolidation'), followed by numeric IDs to prune"),
|
|
21
25
|
},
|
|
22
26
|
async execute(args, toolCtx) {
|
|
23
|
-
const { client, state, logger, config, notificationCtx
|
|
27
|
+
const { client, state, logger, config, notificationCtx } = ctx;
|
|
24
28
|
const sessionId = toolCtx.sessionID;
|
|
25
29
|
if (await isSubagentSession(client, sessionId)) {
|
|
26
30
|
return "Pruning is unavailable in subagent sessions. Do not call this tool again. Continue with your current task - if you were in the middle of work, proceed with your next step. If you had just finished, provide your final summary/findings to return to the main agent.";
|
|
@@ -28,8 +32,23 @@ export function createPruningTool(ctx, toolTracker) {
|
|
|
28
32
|
if (!args.ids || args.ids.length === 0) {
|
|
29
33
|
return "No IDs provided. Check the <prunable-tools> list for available IDs to prune.";
|
|
30
34
|
}
|
|
35
|
+
// Parse reason from first element, numeric IDs from the rest
|
|
36
|
+
const firstElement = args.ids[0];
|
|
37
|
+
const validReasons = ["completion", "noise", "consolidation"];
|
|
38
|
+
let reason;
|
|
39
|
+
let numericIds;
|
|
40
|
+
if (typeof firstElement === "string" && validReasons.includes(firstElement)) {
|
|
41
|
+
reason = firstElement;
|
|
42
|
+
numericIds = args.ids.slice(1).filter((id) => typeof id === "number");
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
numericIds = args.ids.filter((id) => typeof id === "number");
|
|
46
|
+
}
|
|
47
|
+
if (numericIds.length === 0) {
|
|
48
|
+
return "No numeric IDs provided. Format: [reason, id1, id2, ...] where reason is 'completion', 'noise', or 'consolidation'.";
|
|
49
|
+
}
|
|
31
50
|
await ensureSessionRestored(state, sessionId, logger);
|
|
32
|
-
const prunedIds =
|
|
51
|
+
const prunedIds = numericIds
|
|
33
52
|
.map(numId => getActualId(sessionId, numId))
|
|
34
53
|
.filter((id) => id !== undefined);
|
|
35
54
|
if (prunedIds.length === 0) {
|
|
@@ -80,7 +99,8 @@ export function createPruningTool(ctx, toolTracker) {
|
|
|
80
99
|
aiPrunedIds: prunedIds,
|
|
81
100
|
toolMetadata,
|
|
82
101
|
gcPending: null,
|
|
83
|
-
sessionStats
|
|
102
|
+
sessionStats,
|
|
103
|
+
reason
|
|
84
104
|
}, currentAgent);
|
|
85
105
|
toolTracker.skipNextIdle = true;
|
|
86
106
|
if (config.nudge_freq > 0) {
|
|
@@ -91,26 +111,13 @@ export function createPruningTool(ctx, toolTracker) {
|
|
|
91
111
|
tokensSaved,
|
|
92
112
|
llmPrunedIds: prunedIds,
|
|
93
113
|
toolMetadata,
|
|
94
|
-
sessionStats
|
|
114
|
+
sessionStats,
|
|
115
|
+
reason
|
|
95
116
|
};
|
|
96
|
-
|
|
97
|
-
return formatPruningResultForTool(result, workingDirectory) + postPruneGuidance;
|
|
117
|
+
return formatPruningResultForTool(result, ctx.workingDirectory);
|
|
98
118
|
},
|
|
99
119
|
});
|
|
100
120
|
}
|
|
101
|
-
/**
|
|
102
|
-
* Finds the current agent from messages (same logic as janitor.ts).
|
|
103
|
-
*/
|
|
104
|
-
function findCurrentAgent(messages) {
|
|
105
|
-
for (let i = messages.length - 1; i >= 0; i--) {
|
|
106
|
-
const msg = messages[i];
|
|
107
|
-
const info = msg.info;
|
|
108
|
-
if (info?.role === 'user') {
|
|
109
|
-
return info.agent || 'build';
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
return undefined;
|
|
113
|
-
}
|
|
114
121
|
/**
|
|
115
122
|
* Calculates approximate tokens saved by pruning the given tool call IDs.
|
|
116
123
|
* Uses pre-fetched messages to avoid duplicate API calls.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pruning-tool.js","sourceRoot":"","sources":["../../lib/pruning-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"pruning-tool.js","sourceRoot":"","sources":["../../lib/pruning-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAK1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAA;AACpE,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAChD,OAAO,EAAE,uBAAuB,EAA4B,MAAM,mBAAmB,CAAA;AACrF,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAA;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAEtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAEjD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAE1C,oDAAoD;AACpD,MAAM,gBAAgB,GAAG,UAAU,CAAC,MAAM,CAAC,CAAA;AAW3C;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAC7B,GAAqB,EACrB,WAAwB;IAExB,OAAO,IAAI,CAAC;QACR,WAAW,EAAE,gBAAgB;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C,CAAC;AACL,CAAC"}
|
|
@@ -21,6 +21,5 @@ export interface IdMapping {
|
|
|
21
21
|
*/
|
|
22
22
|
export declare function getOrCreateNumericId(sessionId: string, actualId: string): number;
|
|
23
23
|
export declare function getActualId(sessionId: string, numericId: number): string | undefined;
|
|
24
|
-
export declare function clearSessionMapping(sessionId: string): void;
|
|
25
24
|
export declare function clearAllMappings(): void;
|
|
26
25
|
//# sourceMappingURL=id-mapping.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"id-mapping.d.ts","sourceRoot":"","sources":["../../../lib/state/id-mapping.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,WAAW,SAAS;IACtB,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACpC,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACpC,MAAM,EAAE,MAAM,CAAA;CACjB;AAkBD;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAehF;AAED,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAGpF;AAED,wBAAgB,
|
|
1
|
+
{"version":3,"file":"id-mapping.d.ts","sourceRoot":"","sources":["../../../lib/state/id-mapping.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,WAAW,SAAS;IACtB,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACpC,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACpC,MAAM,EAAE,MAAM,CAAA;CACjB;AAkBD;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAehF;AAED,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAGpF;AAED,wBAAgB,gBAAgB,IAAI,IAAI,CAEvC"}
|
|
@@ -45,9 +45,6 @@ export function getActualId(sessionId, numericId) {
|
|
|
45
45
|
const mapping = sessionMappings.get(sessionId);
|
|
46
46
|
return mapping?.numericToActual.get(numericId);
|
|
47
47
|
}
|
|
48
|
-
export function clearSessionMapping(sessionId) {
|
|
49
|
-
sessionMappings.delete(sessionId);
|
|
50
|
-
}
|
|
51
48
|
export function clearAllMappings() {
|
|
52
49
|
sessionMappings.clear();
|
|
53
50
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"id-mapping.js","sourceRoot":"","sources":["../../../lib/state/id-mapping.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAQH,8BAA8B;AAC9B,MAAM,eAAe,GAAG,IAAI,GAAG,EAAqB,CAAA;AAEpD,SAAS,iBAAiB,CAAC,SAAiB;IACxC,IAAI,OAAO,GAAG,eAAe,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA;IAC5C,IAAI,CAAC,OAAO,EAAE,CAAC;QACX,OAAO,GAAG;YACN,eAAe,EAAE,IAAI,GAAG,EAAE;YAC1B,eAAe,EAAE,IAAI,GAAG,EAAE;YAC1B,MAAM,EAAE,CAAC;SACZ,CAAA;QACD,eAAe,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAA;IAC3C,CAAC;IACD,OAAO,OAAO,CAAA;AAClB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,oBAAoB,CAAC,SAAiB,EAAE,QAAgB;IACpE,MAAM,OAAO,GAAG,iBAAiB,CAAC,SAAS,CAAC,CAAA;IAE5C,0BAA0B;IAC1B,MAAM,QAAQ,GAAG,OAAO,CAAC,eAAe,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;IACtD,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;Q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C,GAAG,CAAC,QAAQ,CAAC,CAAA;IACtD,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QACzB,OAAO,QAAQ,CAAA;IACnB,CAAC;IAED,gBAAgB;IAChB,MAAM,SAAS,GAAG,OAAO,CAAC,MAAM,EAAE,CAAA;IAClC,OAAO,CAAC,eAAe,CAAC,GAAG,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAA;IAChD,OAAO,CAAC,eAAe,CAAC,GAAG,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAA;IAEhD,OAAO,SAAS,CAAA;AACpB,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,SAAiB,EAAE,SAAiB;IAC5D,MAAM,OAAO,GAAG,eAAe,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA;IAC9C,OAAO,OAAO,EAAE,eAAe,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA;AAClD,CAAC;AAED,MAAM,UAAU,gBAAgB;IAC5B,eAAe,CAAC,KAAK,EAAE,CAAA;AAC3B,CAAC"}
|
|
@@ -12,9 +12,12 @@ export interface PluginState {
|
|
|
12
12
|
subagentSessions: Set<string>;
|
|
13
13
|
lastSeenSessionId: string | null;
|
|
14
14
|
}
|
|
15
|
+
export type ToolStatus = "pending" | "running" | "completed" | "error";
|
|
15
16
|
export interface ToolParameterEntry {
|
|
16
17
|
tool: string;
|
|
17
18
|
parameters: any;
|
|
19
|
+
status?: ToolStatus;
|
|
20
|
+
error?: string;
|
|
18
21
|
}
|
|
19
22
|
export interface ModelInfo {
|
|
20
23
|
providerID: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/state/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAC5D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAGvC,MAAM,WAAW,WAAW;IACxB,SAAS,EA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AqB,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IACvD,gBAAgB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC7B,eAAe,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC5B,gBAAgB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC7B,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAA;CACnC;AAED,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,OAAO,CAAA;AAEtE,MAAM,WAAW,kBAAkB;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,GAAG,CAAA;IACf,MAAM,CAAC,EAAE,UAAU,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,SAAS;IACtB,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,MAAM,CAAA;CAClB;AAED,wBAAgB,iBAAiB,IAAI,WAAW,CAa/C;AAED,wBAAsB,qBAAqB,CACvC,KAAK,EAAE,WAAW,EAClB,SAAS,EAAE,MAAM,EACjB,MAAM,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC,IAAI,CAAC,CA0Bf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/state/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/state/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AA6BhD,MAAM,UAAU,iBAAiB;IAC7B,OAAO;QACH,SAAS,EAAE,IAAI,GAAG,EAAE;QACpB,KAAK,EAAE,IAAI,GAAG,EAAE;QAChB,SAAS,EAAE,IAAI,GAAG,EAAE;QACpB,cAA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a,IAAI,CAAC;gBACjD,YAAY,EAAE,SAAS,CAAC,KAAK,CAAC,YAAY,IAAI,CAAC;aAClD,CAAA;YACD,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,SAAS,EAAE,KAAK,CAAC,CAAA;QACrC,CAAC;IACL,CAAC;AACL,CAAC"}
|
|
@@ -1,19 +1,12 @@
|
|
|
1
1
|
import type { PluginState } from "./index";
|
|
2
2
|
import type { Logger } from "../logger";
|
|
3
|
+
import type { ToolTracker } from "../fetch-wrapper/tool-tracker";
|
|
3
4
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* Supports:
|
|
8
|
-
* - OpenAI format: message.tool_calls[] with id, function.name, function.arguments
|
|
9
|
-
* - Anthropic format: message.content[] with type='tool_use', id, name, input
|
|
5
|
+
* Sync tool parameters from OpenCode's session.messages() API.
|
|
6
|
+
* This is the single source of truth for tool parameters, replacing
|
|
7
|
+
* format-specific parsing from LLM API requests.
|
|
10
8
|
*/
|
|
11
|
-
export declare function
|
|
12
|
-
/**
|
|
13
|
-
* Cache tool parameters from OpenAI Responses API format.
|
|
14
|
-
* Extracts from input array items with type='function_call'.
|
|
15
|
-
*/
|
|
16
|
-
export declare function cacheToolParametersFromInput(input: any[], state: PluginState, logger?: Logger): void;
|
|
9
|
+
export declare function syncToolCache(client: any, sessionId: string, state: PluginState, tracker?: ToolTracker, protectedTools?: Set<string>, logger?: Logger): Promise<void>;
|
|
17
10
|
/**
|
|
18
11
|
* Trim the tool parameters cache to prevent unbounded memory growth.
|
|
19
12
|
* Uses FIFO eviction - removes oldest entries first.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-cache.d.ts","sourceRoot":"","sources":["../../../lib/state/tool-cache.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"tool-cache.d.ts","sourceRoot":"","sources":["../../../lib/state/tool-cache.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAc,MAAM,SAAS,CAAA;AACtD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AACvC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAA;AAKhE;;;;GAIG;AACH,wBAAsB,aAAa,CAC/B,MAAM,EAAE,GAAG,EACX,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,WAAW,EAClB,OAAO,CAAC,EAAE,WAAW,EACrB,cAAc,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,EAC5B,MAAM,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC,IAAI,CAAC,CA2Df;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI,CAWhE"}
|
|
@@ -1,90 +1,65 @@
|
|
|
1
|
+
/** Maximum number of entries to keep in the tool parameters cache */
|
|
2
|
+
const MAX_TOOL_CACHE_SIZE = 500;
|
|
1
3
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* Supports:
|
|
6
|
-
* - OpenAI format: message.tool_calls[] with id, function.name, function.arguments
|
|
7
|
-
* - Anthropic format: message.content[] with type='tool_use', id, name, input
|
|
4
|
+
* Sync tool parameters from OpenCode's session.messages() API.
|
|
5
|
+
* This is the single source of truth for tool parameters, replacing
|
|
6
|
+
* format-specific parsing from LLM API requests.
|
|
8
7
|
*/
|
|
9
|
-
export function
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
export async function syncToolCache(client, sessionId, state, tracker, protectedTools, logger) {
|
|
9
|
+
try {
|
|
10
|
+
const messagesResponse = await client.session.messages({
|
|
11
|
+
path: { id: sessionId },
|
|
12
|
+
query: { limit: 500 }
|
|
13
|
+
});
|
|
14
|
+
const messages = messagesResponse.data || messagesResponse;
|
|
15
|
+
if (!Array.isArray(messages)) {
|
|
16
|
+
return;
|
|
15
17
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
let synced = 0;
|
|
19
|
+
for (const msg of messages) {
|
|
20
|
+
if (!msg.parts)
|
|
21
|
+
continue;
|
|
22
|
+
for (const part of msg.parts) {
|
|
23
|
+
if (part.type !== "tool" || !part.callID)
|
|
19
24
|
continue;
|
|
25
|
+
const id = part.callID.toLowerCase();
|
|
26
|
+
// Track tool results for nudge injection
|
|
27
|
+
if (tracker && !tracker.seenToolResultIds.has(id)) {
|
|
28
|
+
tracker.seenToolResultIds.add(id);
|
|
29
|
+
// Only count non-protected tools toward nudge threshold
|
|
30
|
+
if (!part.tool || !protectedTools?.has(part.tool)) {
|
|
31
|
+
tracker.toolResultCount++;
|
|
32
|
+
}
|
|
20
33
|
}
|
|
21
|
-
|
|
22
|
-
const params = typeof toolCall.function.arguments === 'string'
|
|
23
|
-
? JSON.parse(toolCall.function.arguments)
|
|
24
|
-
: toolCall.function.arguments;
|
|
25
|
-
state.toolParameters.set(toolCall.id.toLowerCase(), {
|
|
26
|
-
tool: toolCall.function.name,
|
|
27
|
-
parameters: params
|
|
28
|
-
});
|
|
29
|
-
openaiCached++;
|
|
30
|
-
}
|
|
31
|
-
catch (error) {
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
if (Array.isArray(message.content)) {
|
|
36
|
-
for (const part of message.content) {
|
|
37
|
-
if (part.type !== 'tool_use' || !part.id || !part.name) {
|
|
34
|
+
if (state.toolParameters.has(id))
|
|
38
35
|
continue;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
36
|
+
if (part.tool && protectedTools?.has(part.tool))
|
|
37
|
+
continue;
|
|
38
|
+
const status = part.state?.status;
|
|
39
|
+
state.toolParameters.set(id, {
|
|
40
|
+
tool: part.tool,
|
|
41
|
+
parameters: part.state?.input ?? {},
|
|
42
|
+
status,
|
|
43
|
+
error: status === "error" ? part.state?.error : undefined,
|
|
43
44
|
});
|
|
44
|
-
|
|
45
|
+
synced++;
|
|
45
46
|
}
|
|
46
47
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
totalCached: state.toolParameters.size
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Cache tool parameters from OpenAI Responses API format.
|
|
58
|
-
* Extracts from input array items with type='function_call'.
|
|
59
|
-
*/
|
|
60
|
-
export function cacheToolParametersFromInput(input, state, logger) {
|
|
61
|
-
let cached = 0;
|
|
62
|
-
for (const item of input) {
|
|
63
|
-
if (item.type !== 'function_call' || !item.call_id || !item.name) {
|
|
64
|
-
continue;
|
|
65
|
-
}
|
|
66
|
-
try {
|
|
67
|
-
const params = typeof item.arguments === 'string'
|
|
68
|
-
? JSON.parse(item.arguments)
|
|
69
|
-
: item.arguments;
|
|
70
|
-
state.toolParameters.set(item.call_id.toLowerCase(), {
|
|
71
|
-
tool: item.name,
|
|
72
|
-
parameters: params
|
|
48
|
+
trimToolParametersCache(state);
|
|
49
|
+
if (logger && synced > 0) {
|
|
50
|
+
logger.debug("tool-cache", "Synced tool parameters from OpenCode", {
|
|
51
|
+
sessionId: sessionId.slice(0, 8),
|
|
52
|
+
synced
|
|
73
53
|
});
|
|
74
|
-
cached++;
|
|
75
|
-
}
|
|
76
|
-
catch (error) {
|
|
77
54
|
}
|
|
78
55
|
}
|
|
79
|
-
|
|
80
|
-
logger
|
|
81
|
-
|
|
82
|
-
|
|
56
|
+
catch (error) {
|
|
57
|
+
logger?.warn("tool-cache", "Failed to sync tool parameters from OpenCode", {
|
|
58
|
+
sessionId: sessionId.slice(0, 8),
|
|
59
|
+
error: error instanceof Error ? error.message : String(error)
|
|
83
60
|
});
|
|
84
61
|
}
|
|
85
62
|
}
|
|
86
|
-
/** Maximum number of entries to keep in the tool parameters cache */
|
|
87
|
-
const MAX_TOOL_CACHE_SIZE = 500;
|
|
88
63
|
/**
|
|
89
64
|
* Trim the tool parameters cache to prevent unbounded memory growth.
|
|
90
65
|
* Uses FIFO eviction - removes oldest entries first.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-cache.js","sourceRoot":"","sources":["../../../lib/state/tool-cache.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tool-cache.js","sourceRoot":"","sources":["../../../lib/state/tool-cache.ts"],"names":[],"mappings":"AAIA,qEAAqE;AACrE,MAAM,mBAAmB,GAAG,GAAG,CAAA;AAE/B;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAC/B,MAAW,EACX,SAAiB,EACjB,KAAkB,EAClB,OAAqB,EACrB,cAA4B,EAC5B,MAAe;IAEf,IAAI,CAAC;QACD,MAAM,gBAAgB,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC;YACnD,IAAI,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE;YACvB,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE;SACxB,CAAC,CAAA;QACF,MAAM,QAAQ,GAAG,gBAAgB,CAAC,IAAI,IAAI,gBAAgB,CAAA;QAE1D,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC3B,OAAM;QACV,CAAC;QAED,IAAI,MAAM,GAAG,CAAC,CAAA;QAEd,KAAK,MAAM,GAAG,IAAI,QAAQ,EAAE,CAAC;YACzB,IAAI,CAAC,GAAG,CAAC,KAAK;gBAAE,SAAQ;YAExB,KAAK,MAAM,IAAI,IAAI,GAAG,CAAC,KAAK,EAAE,CAAC;gBAC3B,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM;oBAAE,SAAQ;gBAElD,MAAM,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,CAAA;gBAEpC,yCAAyC;gBACzC,IAAI,OAAO,IAAI,CAAC,OAAO,CAAC,iBAA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AE;YACvE,SAAS,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;YAChC,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;SAChE,CAAC,CAAA;IACN,CAAC;AACL,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CAAC,KAAkB;IACtD,IAAI,KAAK,CAAC,cAAc,CAAC,IAAI,IAAI,mBAAmB,EAAE,CAAC;QACnD,OAAM;IACV,CAAC;IAED,MAAM,YAAY,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC;SACvD,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,GAAG,mBAAmB,CAAC,CAAA;IAE9D,KAAK,MAAM,GAAG,IAAI,YAAY,EAAE,CAAC;QAC7B,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;IACpC,CAAC;AACL,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { ToolMetadata } from "../fetch-wrapper/types";
|
|
2
|
+
import type { PruningResult } from "../core/janitor";
|
|
1
3
|
/**
|
|
2
4
|
* Extracts a human-readable key from tool metadata for display purposes.
|
|
3
5
|
* Used by both deduplication and AI analysis to show what was pruned.
|
|
@@ -6,4 +8,14 @@ export declare function extractParameterKey(metadata: {
|
|
|
6
8
|
tool: string;
|
|
7
9
|
parameters?: any;
|
|
8
10
|
}): string;
|
|
11
|
+
export declare function truncate(str: string, maxLen?: number): string;
|
|
12
|
+
export declare function shortenPath(input: string, workingDirectory?: string): string;
|
|
13
|
+
/**
|
|
14
|
+
* Formats a list of pruned items in the style: "→ tool: parameter"
|
|
15
|
+
*/
|
|
16
|
+
export declare function formatPrunedItemsList(prunedIds: string[], toolMetadata: Map<string, ToolMetadata>, workingDirectory?: string): string[];
|
|
17
|
+
/**
|
|
18
|
+
* Formats a PruningResult into a human-readable string for the prune tool output.
|
|
19
|
+
*/
|
|
20
|
+
export declare function formatPruningResultForTool(result: PruningResult, workingDirectory?: string): string;
|
|
9
21
|
//# sourceMappingURL=display-utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"display-utils.d.ts","sourceRoot":"","sources":["../../../lib/ui/display-utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,GAAG,CAAA;CAAE,GAAG,MAAM,CAoExF"}
|
|
1
|
+
{"version":3,"file":"display-utils.d.ts","sourceRoot":"","sources":["../../../lib/ui/display-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAEpD;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,GAAG,CAAA;CAAE,GAAG,MAAM,CAoExF;AAED,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,GAAE,MAAW,GAAG,MAAM,CAGjE;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,CAU5E;AAeD;;GAEG;AACH,wBAAgB,qBAAqB,CACjC,SAAS,EAAE,MAAM,EAAE,EACnB,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,EACvC,gBAAgB,CAAC,EAAE,MAAM,GAC1B,MAAM,EAAE,CA6BV;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CACtC,MAAM,EAAE,aAAa,EACrB,gBAAgB,CAAC,EAAE,MAAM,GAC1B,MAAM,CAWR"}
|