@tarquinen/opencode-dcp 0.2.8 → 0.3.1
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 +73 -49
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +79 -15
- package/dist/index.js.map +1 -1
- package/dist/lib/config.d.ts +1 -0
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +19 -7
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/deduplicator.d.ts +50 -0
- package/dist/lib/deduplicator.d.ts.map +1 -0
- package/dist/lib/deduplicator.js +181 -0
- package/dist/lib/deduplicator.js.map +1 -0
- package/dist/lib/janitor.d.ts +30 -1
- package/dist/lib/janitor.d.ts.map +1 -1
- package/dist/lib/janitor.js +380 -237
- package/dist/lib/janitor.js.map +1 -1
- package/dist/lib/logger.d.ts +8 -1
- package/dist/lib/logger.d.ts.map +1 -1
- package/dist/lib/logger.js +43 -1
- package/dist/lib/logger.js.map +1 -1
- package/dist/lib/prompt.d.ts.map +1 -1
- package/dist/lib/prompt.js +77 -5
- package/dist/lib/prompt.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deduplicator Module
|
|
3
|
+
*
|
|
4
|
+
* Handles automatic detection and removal of duplicate tool calls based on
|
|
5
|
+
* tool name + parameter signature matching.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Detects duplicate tool calls based on tool name + parameter signature
|
|
9
|
+
* Keeps only the most recent occurrence of each duplicate set
|
|
10
|
+
* Respects protected tools - they are never deduplicated
|
|
11
|
+
*/
|
|
12
|
+
export function detectDuplicates(toolMetadata, unprunedToolCallIds, // In chronological order
|
|
13
|
+
protectedTools) {
|
|
14
|
+
const signatureMap = new Map();
|
|
15
|
+
// Filter out protected tools before processing
|
|
16
|
+
const deduplicatableIds = unprunedToolCallIds.filter(id => {
|
|
17
|
+
const metadata = toolMetadata.get(id);
|
|
18
|
+
return !metadata || !protectedTools.includes(metadata.tool);
|
|
19
|
+
});
|
|
20
|
+
// Build map of signature -> [ids in chronological order]
|
|
21
|
+
for (const id of deduplicatableIds) {
|
|
22
|
+
const metadata = toolMetadata.get(id);
|
|
23
|
+
if (!metadata)
|
|
24
|
+
continue;
|
|
25
|
+
const signature = createToolSignature(metadata.tool, metadata.parameters);
|
|
26
|
+
if (!signatureMap.has(signature)) {
|
|
27
|
+
signatureMap.set(signature, []);
|
|
28
|
+
}
|
|
29
|
+
signatureMap.get(signature).push(id);
|
|
30
|
+
}
|
|
31
|
+
// Identify duplicates (keep only last occurrence)
|
|
32
|
+
const duplicateIds = [];
|
|
33
|
+
const deduplicationDetails = new Map();
|
|
34
|
+
for (const [signature, ids] of signatureMap.entries()) {
|
|
35
|
+
if (ids.length > 1) {
|
|
36
|
+
const metadata = toolMetadata.get(ids[0]);
|
|
37
|
+
const idsToRemove = ids.slice(0, -1); // All except last
|
|
38
|
+
duplicateIds.push(...idsToRemove);
|
|
39
|
+
deduplicationDetails.set(signature, {
|
|
40
|
+
toolName: metadata.tool,
|
|
41
|
+
parameterKey: extractParameterKey(metadata),
|
|
42
|
+
duplicateCount: ids.length,
|
|
43
|
+
prunedIds: idsToRemove,
|
|
44
|
+
keptId: ids[ids.length - 1]
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return { duplicateIds, deduplicationDetails };
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Creates a deterministic signature for a tool call
|
|
52
|
+
* Format: "toolName::JSON(sortedParameters)"
|
|
53
|
+
*/
|
|
54
|
+
function createToolSignature(tool, parameters) {
|
|
55
|
+
if (!parameters)
|
|
56
|
+
return tool;
|
|
57
|
+
// Normalize parameters for consistent comparison
|
|
58
|
+
const normalized = normalizeParameters(parameters);
|
|
59
|
+
const sorted = sortObjectKeys(normalized);
|
|
60
|
+
return `${tool}::${JSON.stringify(sorted)}`;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Normalize parameters to handle edge cases:
|
|
64
|
+
* - Remove undefined/null values
|
|
65
|
+
* - Resolve relative paths to absolute (future enhancement)
|
|
66
|
+
* - Sort arrays if order doesn't matter (future enhancement)
|
|
67
|
+
*/
|
|
68
|
+
function normalizeParameters(params) {
|
|
69
|
+
if (typeof params !== 'object' || params === null)
|
|
70
|
+
return params;
|
|
71
|
+
if (Array.isArray(params))
|
|
72
|
+
return params;
|
|
73
|
+
const normalized = {};
|
|
74
|
+
for (const [key, value] of Object.entries(params)) {
|
|
75
|
+
if (value !== undefined && value !== null) {
|
|
76
|
+
normalized[key] = value;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return normalized;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Recursively sort object keys for deterministic comparison
|
|
83
|
+
*/
|
|
84
|
+
function sortObjectKeys(obj) {
|
|
85
|
+
if (typeof obj !== 'object' || obj === null)
|
|
86
|
+
return obj;
|
|
87
|
+
if (Array.isArray(obj))
|
|
88
|
+
return obj.map(sortObjectKeys);
|
|
89
|
+
const sorted = {};
|
|
90
|
+
for (const key of Object.keys(obj).sort()) {
|
|
91
|
+
sorted[key] = sortObjectKeys(obj[key]);
|
|
92
|
+
}
|
|
93
|
+
return sorted;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Extract human-readable parameter key for notifications
|
|
97
|
+
* Supports all ACTIVE OpenCode tools with appropriate parameter extraction
|
|
98
|
+
*
|
|
99
|
+
* ACTIVE Tools (always available):
|
|
100
|
+
* - File: read, write, edit
|
|
101
|
+
* - Search: list, glob, grep
|
|
102
|
+
* - Execution: bash
|
|
103
|
+
* - Agent: task
|
|
104
|
+
* - Web: webfetch
|
|
105
|
+
* - Todo: todowrite, todoread
|
|
106
|
+
*
|
|
107
|
+
* CONDITIONAL Tools (may be disabled):
|
|
108
|
+
* - batch (experimental.batch_tool flag)
|
|
109
|
+
* - websearch, codesearch (OPENCODE_EXPERIMENTAL_EXA flag)
|
|
110
|
+
*
|
|
111
|
+
* INACTIVE Tools (exist but not registered, skip):
|
|
112
|
+
* - multiedit, patch, lsp_diagnostics, lsp_hover
|
|
113
|
+
*/
|
|
114
|
+
export function extractParameterKey(metadata) {
|
|
115
|
+
if (!metadata.parameters)
|
|
116
|
+
return '';
|
|
117
|
+
const { tool, parameters } = metadata;
|
|
118
|
+
// ===== File Operation Tools =====
|
|
119
|
+
if (tool === "read" && parameters.filePath) {
|
|
120
|
+
return parameters.filePath;
|
|
121
|
+
}
|
|
122
|
+
if (tool === "write" && parameters.filePath) {
|
|
123
|
+
return parameters.filePath;
|
|
124
|
+
}
|
|
125
|
+
if (tool === "edit" && parameters.filePath) {
|
|
126
|
+
return parameters.filePath;
|
|
127
|
+
}
|
|
128
|
+
// ===== Directory/Search Tools =====
|
|
129
|
+
if (tool === "list" && parameters.path) {
|
|
130
|
+
return parameters.path;
|
|
131
|
+
}
|
|
132
|
+
if (tool === "glob" && parameters.pattern) {
|
|
133
|
+
const pathInfo = parameters.path ? ` in ${parameters.path}` : "";
|
|
134
|
+
return `"${parameters.pattern}"${pathInfo}`;
|
|
135
|
+
}
|
|
136
|
+
if (tool === "grep" && parameters.pattern) {
|
|
137
|
+
const pathInfo = parameters.path ? ` in ${parameters.path}` : "";
|
|
138
|
+
return `"${parameters.pattern}"${pathInfo}`;
|
|
139
|
+
}
|
|
140
|
+
// ===== Execution Tools =====
|
|
141
|
+
if (tool === "bash") {
|
|
142
|
+
if (parameters.description)
|
|
143
|
+
return parameters.description;
|
|
144
|
+
if (parameters.command) {
|
|
145
|
+
return parameters.command.length > 50
|
|
146
|
+
? parameters.command.substring(0, 50) + "..."
|
|
147
|
+
: parameters.command;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
// ===== Web Tools =====
|
|
151
|
+
if (tool === "webfetch" && parameters.url) {
|
|
152
|
+
return parameters.url;
|
|
153
|
+
}
|
|
154
|
+
if (tool === "websearch" && parameters.query) {
|
|
155
|
+
return `"${parameters.query}"`;
|
|
156
|
+
}
|
|
157
|
+
if (tool === "codesearch" && parameters.query) {
|
|
158
|
+
return `"${parameters.query}"`;
|
|
159
|
+
}
|
|
160
|
+
// ===== Todo Tools =====
|
|
161
|
+
// Note: Todo tools are stateful and in protectedTools by default
|
|
162
|
+
if (tool === "todowrite") {
|
|
163
|
+
return `${parameters.todos?.length || 0} todos`;
|
|
164
|
+
}
|
|
165
|
+
if (tool === "todoread") {
|
|
166
|
+
return "read todo list";
|
|
167
|
+
}
|
|
168
|
+
// ===== Agent/Task Tools =====
|
|
169
|
+
// Note: task is in protectedTools by default
|
|
170
|
+
if (tool === "task" && parameters.description) {
|
|
171
|
+
return parameters.description;
|
|
172
|
+
}
|
|
173
|
+
// Note: batch is experimental and needs special handling
|
|
174
|
+
if (tool === "batch") {
|
|
175
|
+
return `${parameters.tool_calls?.length || 0} parallel tools`;
|
|
176
|
+
}
|
|
177
|
+
// ===== Fallback =====
|
|
178
|
+
// For unknown tools, custom tools, or tools without extractable keys
|
|
179
|
+
return JSON.stringify(parameters).substring(0, 50);
|
|
180
|
+
}
|
|
181
|
+
//# sourceMappingURL=deduplicator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deduplicator.js","sourceRoot":"","sources":["../../lib/deduplicator.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAaH;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAC5B,YAA6D,EAC7D,mBAA6B,EAAG,yBAAyB;AACzD,cAAwB;IAExB,MAAM,YAAY,GAAG,IAAI,GAAG,EAAoB,CAAA;IAEhD,+CAA+C;IAC/C,MAAM,iBAAiB,GAAG,mBAAmB,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE;QACtD,MAAM,QAAQ,GAAG,YAAY,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;QACrC,OAAO,CAAC,QAAQ,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,QAAQ,C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AA;IAC3B,CAAC;IAED,+BAA+B;IAC/B,6CAA6C;IAC7C,IAAI,IAAI,KAAK,MAAM,IAAI,UAAU,CAAC,WAAW,EAAE,CAAC;QAC5C,OAAO,UAAU,CAAC,WAAW,CAAA;IACjC,CAAC;IACD,yDAAyD;IACzD,IAAI,IAAI,KAAK,OAAO,EAAE,CAAC;QACnB,OAAO,GAAG,UAAU,CAAC,UAAU,EAAE,MAAM,IAAI,CAAC,iBAAiB,CAAA;IACjE,CAAC;IAED,uBAAuB;IACvB,qEAAqE;IACrE,OAAO,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;AACtD,CAAC"}
|
package/dist/lib/janitor.d.ts
CHANGED
|
@@ -9,15 +9,44 @@ export declare class Janitor {
|
|
|
9
9
|
private modelCache;
|
|
10
10
|
private configModel?;
|
|
11
11
|
private showModelErrorToasts;
|
|
12
|
+
private pruningMode;
|
|
12
13
|
constructor(client: any, stateManager: StateManager, logger: Logger, toolParametersCache: Map<string, any>, protectedTools: string[], modelCache: Map<string, {
|
|
13
14
|
providerID: string;
|
|
14
15
|
modelID: string;
|
|
15
16
|
}>, configModel?: string | undefined, // Format: "provider/model"
|
|
16
|
-
showModelErrorToasts?: boolean
|
|
17
|
+
showModelErrorToasts?: boolean, // Whether to show toast for model errors
|
|
18
|
+
pruningMode?: "auto" | "smart");
|
|
17
19
|
/**
|
|
18
20
|
* Sends an ignored message to the session UI (user sees it, AI doesn't)
|
|
19
21
|
*/
|
|
20
22
|
private sendIgnoredMessage;
|
|
21
23
|
run(sessionID: string): Promise<void>;
|
|
24
|
+
/**
|
|
25
|
+
* Helper function to shorten paths for display
|
|
26
|
+
*/
|
|
27
|
+
private shortenPath;
|
|
28
|
+
/**
|
|
29
|
+
* Replace pruned tool outputs with placeholder text to save tokens in janitor context
|
|
30
|
+
* This applies the same replacement logic as the global fetch wrapper, but for the
|
|
31
|
+
* janitor's shadow inference to avoid sending already-pruned content to the LLM
|
|
32
|
+
*/
|
|
33
|
+
private replacePrunedToolOutputs;
|
|
34
|
+
/**
|
|
35
|
+
* Helper function to calculate token savings from tool outputs
|
|
36
|
+
*/
|
|
37
|
+
private calculateTokensSaved;
|
|
38
|
+
/**
|
|
39
|
+
* Build a summary of tools by grouping them
|
|
40
|
+
* Uses shared extractParameterKey logic for consistent parameter extraction
|
|
41
|
+
*/
|
|
42
|
+
private buildToolsSummary;
|
|
43
|
+
/**
|
|
44
|
+
* Auto mode notification - shows only deduplication results
|
|
45
|
+
*/
|
|
46
|
+
private sendAutoModeNotification;
|
|
47
|
+
/**
|
|
48
|
+
* Smart mode notification - shows both deduplication and LLM analysis results
|
|
49
|
+
*/
|
|
50
|
+
private sendSmartModeNotification;
|
|
22
51
|
}
|
|
23
52
|
//# sourceMappingURL=janitor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"janitor.d.ts","sourceRoot":"","sources":["../../lib/janitor.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACtC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"janitor.d.ts","sourceRoot":"","sources":["../../lib/janitor.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACtC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAM3C,qBAAa,OAAO;IAEZ,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,mBAAmB;IAC3B,OAAO,CAAC,cAAc;IACtB,OAAO,CAAC,UAAU;IAClB,OAAO,CAAC,WAAW,CAAC;IACpB,OAAO,CAAC,oBAAoB;IAC5B,OAAO,CAAC,WAAW;gBARX,MAAM,EAAE,GAAG,EACX,YAAY,EAAE,YAAY,EAC1B,M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