@rynfar/meridian 1.49.0 → 1.49.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.
|
@@ -18713,6 +18713,7 @@ function createProxyServer(config = {}) {
|
|
|
18713
18713
|
const capturedToolUses = [];
|
|
18714
18714
|
const capturedSignatures = new Set;
|
|
18715
18715
|
const capturedToolNames = new Set;
|
|
18716
|
+
const droppedToolUseIds = new Set;
|
|
18716
18717
|
let sawDuplicateToolUse = false;
|
|
18717
18718
|
const earlyStopEnabled = passthrough && process.env.MERIDIAN_PASSTHROUGH_EARLY_STOP !== "0";
|
|
18718
18719
|
const earlyStop = createEarlyStopTracker();
|
|
@@ -18780,11 +18781,13 @@ function createProxyServer(config = {}) {
|
|
|
18780
18781
|
}
|
|
18781
18782
|
const signature = toolUseSignature(toolName, toolInput);
|
|
18782
18783
|
const isExactDuplicate = capturedSignatures.has(signature);
|
|
18783
|
-
const isSameToolRepeat = !isExactDuplicate && capturedToolNames.has(toolName);
|
|
18784
|
+
const isSameToolRepeat = !earlyStopEnabled && !isExactDuplicate && capturedToolNames.has(toolName);
|
|
18784
18785
|
const exceedsForcedSingle = forceSingleToolUse && capturedToolUses.length >= 1;
|
|
18785
18786
|
if (isExactDuplicate) {
|
|
18787
|
+
droppedToolUseIds.add(input.tool_use_id);
|
|
18786
18788
|
claudeLog("passthrough.duplicate_tool_use_dropped", { name: toolName });
|
|
18787
18789
|
} else if (isSameToolRepeat || exceedsForcedSingle) {
|
|
18790
|
+
droppedToolUseIds.add(input.tool_use_id);
|
|
18788
18791
|
sawDuplicateToolUse = true;
|
|
18789
18792
|
claudeLog("passthrough.extra_tool_use_dropped", {
|
|
18790
18793
|
name: toolName,
|
|
@@ -19214,6 +19217,14 @@ Subprocess stderr: ${stderrOutput}`;
|
|
|
19214
19217
|
});
|
|
19215
19218
|
}
|
|
19216
19219
|
if (passthrough && capturedToolUses.length > 0) {
|
|
19220
|
+
if (droppedToolUseIds.size > 0) {
|
|
19221
|
+
for (let i = contentBlocks.length - 1;i >= 0; i--) {
|
|
19222
|
+
const b = contentBlocks[i];
|
|
19223
|
+
if (b.type === "tool_use" && droppedToolUseIds.has(b.id)) {
|
|
19224
|
+
contentBlocks.splice(i, 1);
|
|
19225
|
+
}
|
|
19226
|
+
}
|
|
19227
|
+
}
|
|
19217
19228
|
const capturedById = new Map(capturedToolUses.map((tu) => [tu.id, tu]));
|
|
19218
19229
|
for (const block of contentBlocks) {
|
|
19219
19230
|
if (block.type === "tool_use" && capturedById.has(block.id)) {
|
package/dist/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/proxy/server.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AACtE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,CAAA;AAGvD,YAAY,EACV,SAAS,EACT,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,WAAW,GACZ,MAAM,aAAa,CAAA;AAKpB,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAsCnG,OAAO,EACL,kBAAkB,EAClB,WAAW,EACX,oBAAoB,EAEpB,KAAK,aAAa,EAGnB,MAAM,mBAAmB,CAAA;AAG1B,OAAO,EAA+B,iBAAiB,EAAE,mBAAmB,EAAsC,MAAM,iBAAiB,CAAA;AAGzI,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,oBAAoB,EAAE,CAAA;AAChE,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,CAAA;AACjD,YAAY,EAAE,aAAa,EAAE,CAAA;AA+Q7B,wBAAgB,iBAAiB,CAAC,MAAM,GAAE,OAAO,CAAC,WAAW,CAAM,GAAG,WAAW,
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/proxy/server.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AACtE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,CAAA;AAGvD,YAAY,EACV,SAAS,EACT,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,WAAW,GACZ,MAAM,aAAa,CAAA;AAKpB,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAsCnG,OAAO,EACL,kBAAkB,EAClB,WAAW,EACX,oBAAoB,EAEpB,KAAK,aAAa,EAGnB,MAAM,mBAAmB,CAAA;AAG1B,OAAO,EAA+B,iBAAiB,EAAE,mBAAmB,EAAsC,MAAM,iBAAiB,CAAA;AAGzI,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,oBAAoB,EAAE,CAAA;AAChE,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,CAAA;AACjD,YAAY,EAAE,aAAa,EAAE,CAAA;AA+Q7B,wBAAgB,iBAAiB,CAAC,MAAM,GAAE,OAAO,CAAC,WAAW,CAAM,GAAG,WAAW,CA2tGhF;AAWD,wBAAgB,gCAAgC,IAAI,IAAI,CAavD;AAED,wBAAsB,gBAAgB,CAAC,MAAM,GAAE,OAAO,CAAC,WAAW,CAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAmGhG"}
|
package/dist/server.js
CHANGED
package/package.json
CHANGED