dsh-context-compression-improved 0.8.0 → 0.9.3
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/.gitattributes +2 -2
- package/.githooks/pre-push +37 -37
- package/.github/workflows/ci.yml +39 -39
- package/CHANGELOG.de.md +41 -0
- package/CHANGELOG.es.md +41 -0
- package/CHANGELOG.fr.md +42 -0
- package/CHANGELOG.it.md +41 -0
- package/CHANGELOG.ja.md +35 -0
- package/CHANGELOG.ko.md +34 -0
- package/CHANGELOG.md +96 -0
- package/CHANGELOG.ru.md +37 -0
- package/CHANGELOG.zh.md +32 -0
- package/CONTRIBUTING.md +22 -22
- package/LICENSE +21 -21
- package/README.de.md +7 -9
- package/README.es.md +7 -9
- package/README.fr.md +7 -9
- package/README.it.md +7 -9
- package/README.ja.md +6 -2
- package/README.ko.md +6 -2
- package/README.md +96 -98
- package/README.ru.md +7 -9
- package/README.zh.md +89 -85
- package/SECURITY.md +18 -18
- package/THIRD_PARTY_NOTICES.md +14 -14
- package/docs/compat-0.1.5-report.md +77 -77
- package/docs/installation.de.md +5 -5
- package/docs/installation.es.md +5 -5
- package/docs/installation.fr.md +5 -5
- package/docs/installation.it.md +5 -5
- package/docs/installation.ja.md +5 -5
- package/docs/installation.ko.md +5 -5
- package/docs/installation.md +5 -5
- package/docs/installation.ru.md +5 -5
- package/docs/installation.zh.md +5 -5
- package/docs/repair-log.md +657 -657
- package/package.json +24 -22
- package/packages/selector/LICENSE +21 -21
- package/packages/selector/README.md +26 -26
- package/packages/selector/README.zh.md +24 -24
- package/packages/selector/THIRD_PARTY_NOTICES.md +32 -32
- package/packages/selector/cordis.patch.yml +27 -27
- package/packages/selector/docs/history-tool-call-working-set-spec.md +112 -112
- package/packages/selector/docs/native-tool-result-selector-spec.md +34 -34
- package/packages/selector/docs/subagent-cache-reuse-spec.md +46 -46
- package/packages/selector/dsh.plugin.json +16 -16
- package/packages/selector/lib/client.js +180 -22
- package/packages/selector/lib/host-generation.js +62 -0
- package/packages/selector/lib/index.js +208 -1
- package/packages/selector/lib/invariant.js +1 -1
- package/packages/selector/lib/pruner.js +46 -44
- package/packages/selector/lib/style.css +53 -53
- package/packages/selector/lib/tail-trim.js +73 -4
- package/packages/selector/package.json +80 -21
- package/packages/selector/screenshots.json +3 -3
- package/packages/selector/src/client/CustomPolicyEditor.tsx +216 -216
- package/packages/selector/src/client/EstimatorControls.tsx +277 -277
- package/packages/selector/src/client/bridge-scope.ts +125 -0
- package/packages/selector/src/client/index.ts +122 -36
- package/packages/selector/src/client/monitor-fab.ts +0 -2
- package/packages/selector/src/client/preset-options.ts +88 -88
- package/packages/selector/src/client/scope-face.ts +24 -24
- package/packages/selector/src/compat/host-generation.ts +96 -0
- package/packages/selector/src/compat/settings-lease.ts +108 -0
- package/packages/selector/src/compat/tool-result.ts +91 -0
- package/packages/selector/src/css-modules.d.ts +6 -6
- package/packages/selector/src/deepseek-v4-tokenizer.ts +205 -205
- package/packages/selector/src/estimator-catalog.ts +104 -104
- package/packages/selector/src/index.ts +8 -0
- package/packages/selector/src/invariant.ts +113 -113
- package/packages/selector/src/preset-overlay.ts +626 -626
- package/packages/selector/src/pruner/content.ts +198 -198
- package/packages/selector/src/pruner/session.ts +97 -96
- package/packages/selector/src/pruner/tuning.ts +23 -23
- package/packages/selector/src/pruner/types.ts +78 -78
- package/packages/selector/src/pruner.ts +61 -41
- package/packages/selector/src/runtime/adaptive-cost.ts +205 -205
- package/packages/selector/src/runtime/custom-policy.ts +278 -278
- package/packages/selector/src/runtime/deepseek-official-pricing.ts +298 -298
- package/packages/selector/src/runtime/deepseek-v4-vision-tokens.ts +254 -254
- package/packages/selector/src/runtime/measurement.ts +444 -431
- package/packages/selector/src/runtime/reducers.ts +1674 -1674
- package/packages/selector/src/runtime/retrieve.ts +7 -3
- package/packages/selector/src/runtime/session-events.ts +30 -30
- package/packages/selector/src/runtime/tail-trim.ts +175 -165
- package/packages/selector/src/runtime/token-count.ts +72 -72
- package/packages/selector/src/runtime/tokenpilot/advisor.ts +419 -419
- package/packages/selector/src/runtime/tokenpilot/benefit.ts +200 -200
- package/packages/selector/src/runtime/tokenpilot/dedup.ts +81 -81
- package/packages/selector/src/runtime/tokenpilot/estimator.ts +151 -151
- package/packages/selector/src/runtime/tokenpilot/locator.ts +128 -128
- package/packages/selector/src/runtime/tokenpilot/read-state.ts +98 -98
- package/packages/selector/src/runtime/tokenpilot/sidechannel.ts +303 -303
- package/packages/selector/src/runtime/toolclass.ts +103 -103
- package/packages/selector/src/runtime/value.ts +48 -48
- package/packages/selector/src/settings-bridge.ts +175 -0
- package/packages/selector/tests/advisor-report.host.spec.ts +223 -223
- package/packages/selector/tests/built/client-artifact.spec.ts +6 -9
- package/packages/selector/tests/cache-prefix-audit.spec.ts +123 -123
- package/packages/selector/tests/code-skeleton.client.spec.ts +98 -94
- package/packages/selector/tests/compat/compat-narrow-waist.spec.ts +150 -0
- package/packages/selector/tests/custom-contract.client.spec.ts +226 -223
- package/packages/selector/tests/estimator-catalog.spec.ts +70 -70
- package/packages/selector/tests/estimator-route-registration.host.spec.ts +199 -194
- package/packages/selector/tests/helpers/legacy-namespace.ts +35 -35
- package/packages/selector/tests/helpers/legacy-settings/index.ts +15 -15
- package/packages/selector/tests/helpers/legacy-settings/legacy/provider.d.ts +41 -41
- package/packages/selector/tests/helpers/legacy-settings/legacy/provider.js +647 -647
- package/packages/selector/tests/helpers/legacy-settings/legacy/redact.js +78 -78
- package/packages/selector/tests/helpers/legacy-settings/legacy/util-values.js +234 -234
- package/packages/selector/tests/host-preset-overlay.host.spec.ts +204 -204
- package/packages/selector/tests/preset-options-write.client.spec.ts +192 -188
- package/packages/selector/tests/preset-overlay-loader.e2e.host.spec.ts +200 -200
- package/packages/selector/tests/preset-overlay.host.spec.ts +246 -246
- package/packages/selector/tests/public/package-contract.client.spec.ts +11 -3
- package/packages/selector/tests/runtime/adaptive-cost.spec.ts +167 -167
- package/packages/selector/tests/runtime/advice-never-withholds.host.spec.ts +230 -230
- package/packages/selector/tests/runtime/advisor-invariant.spec.ts +272 -272
- package/packages/selector/tests/runtime/advisor.spec.ts +226 -226
- package/packages/selector/tests/runtime/auto-compact-config.spec.ts +523 -523
- package/packages/selector/tests/runtime/char-basis.spec.ts +30 -30
- package/packages/selector/tests/runtime/code-skeleton.spec.ts +152 -152
- package/packages/selector/tests/runtime/deepseek-official-pricing.spec.ts +186 -186
- package/packages/selector/tests/runtime/deepseek-v4-tokenizer.spec.ts +122 -122
- package/packages/selector/tests/runtime/deepseek-v4-vision-tokens.spec.ts +122 -122
- package/packages/selector/tests/runtime/deprecated-preset-options.spec.ts +96 -96
- package/packages/selector/tests/runtime/fixtures/profile-baseline.json +273 -273
- package/packages/selector/tests/runtime/fixtures/tokenizer-golden.json +106 -106
- package/packages/selector/tests/runtime/fixtures/vision-golden.json +459 -459
- package/packages/selector/tests/runtime/frequency-longstrings.spec.ts +74 -74
- package/packages/selector/tests/runtime/html-reducer.spec.ts +212 -212
- package/packages/selector/tests/runtime/line-mapping.spec.ts +153 -153
- package/packages/selector/tests/runtime/prose-reducers.spec.ts +133 -133
- package/packages/selector/tests/runtime/public/public-runtime.spec.ts +3 -3
- package/packages/selector/tests/runtime/read-input-cap.spec.ts +33 -33
- package/packages/selector/tests/runtime/search-reducer.spec.ts +110 -110
- package/packages/selector/tests/runtime/session-events.spec.ts +27 -27
- package/packages/selector/tests/runtime/sidechannel.spec.ts +241 -241
- package/packages/selector/tests/runtime/toc-and-bundled.spec.ts +159 -159
- package/packages/selector/tests/runtime/tokenizer-golden.spec.ts +53 -53
- package/packages/selector/tests/runtime/tokenpilot/benefit.spec.ts +217 -217
- package/packages/selector/tests/runtime/tokenpilot/dedup.spec.ts +52 -52
- package/packages/selector/tests/runtime/tokenpilot/estimator.spec.ts +79 -79
- package/packages/selector/tests/runtime/tokenpilot/locator.spec.ts +76 -76
- package/packages/selector/tests/runtime/tokenpilot/profile-baseline.spec.ts +116 -116
- package/packages/selector/tests/runtime/tokenpilot/read-state.spec.ts +82 -82
- package/packages/selector/tests/runtime/toolclass.spec.ts +156 -156
- package/packages/selector/tests/runtime/value.spec.ts +23 -23
- package/packages/selector/tests/settings-seat.client.spec.ts +45 -7
- package/packages/selector/tests/standing-generation.host.spec.ts +724 -724
- package/packages/selector/tests/subagent-cache-reuse.host.spec.ts +269 -269
- package/packages/selector/tests/support/cache-prefix-audit.ts +105 -105
- package/packages/selector/tests/support/mock-adapter.ts +37 -37
- package/packages/selector/tests/support/ui-primitives.tsx +34 -34
- package/packages/selector/tsconfig.json +11 -11
- package/packages/selector/tsdown.client.config.ts +102 -102
- package/packages/selector/tsdown.config.ts +20 -20
- package/scripts/capture-profile-baseline.mjs +42 -42
- package/scripts/cell-browser-e2e.mjs +354 -0
- package/scripts/generate-tokenizer-fixtures.py +81 -81
- package/scripts/generate-vision-fixtures.py +208 -208
- package/scripts/hosts.mjs +74 -0
- package/scripts/packed-components-smoke.mjs +763 -732
- package/scripts/packed-install-e2e.mjs +1330 -1273
- package/scripts/sync-hosts.mjs +174 -0
- package/scripts/toolclass-corpus-replay.mjs +281 -281
- package/scripts/verify-release.mjs +335 -318
- package/tsconfig.base.json +18 -18
- package/tsconfig.json +7 -7
- package/tsconfig.tests.json +15 -15
- package/vitest.built.config.ts +9 -9
- package/vitest.config.ts +46 -43
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { A as getLastIntentFold, C as estimateSavingsPricing, D as INTENT_GATE_GROWTH_TOKENS, E as INTENT_GATE_FLOOR_FRACTION, M as getSummaryOverride, R as setSummaryOverride, S as buildMonitorSnapshot, U as getSavingsLedger, a as DEFAULT_CONTEXT_COMPRESSION_SETTINGS, j as getObservedIntentEnabled, k as getAdvisorState, w as isSessionOverrideAction, x as applySessionOverride } from "./config.js";
|
|
1
|
+
import { A as getLastIntentFold, C as estimateSavingsPricing, D as INTENT_GATE_GROWTH_TOKENS, E as INTENT_GATE_FLOOR_FRACTION, M as getSummaryOverride, R as setSummaryOverride, S as buildMonitorSnapshot, U as getSavingsLedger, a as DEFAULT_CONTEXT_COMPRESSION_SETTINGS, j as getObservedIntentEnabled, k as getAdvisorState, n as CONTEXT_COMPRESSION_SETTINGS_NAMESPACE, r as ContextCompressionSettingsSchema, w as isSessionOverrideAction, x as applySessionOverride } from "./config.js";
|
|
2
|
+
import { i as noteResolvedSettingsService, n as detectHostGeneration, t as compatLog } from "./host-generation.js";
|
|
2
3
|
import z from "@deepseek-ai/schemastery";
|
|
3
4
|
import { createHash } from "node:crypto";
|
|
4
5
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
@@ -165,6 +166,211 @@ function registerSummaryCommand(ctx) {
|
|
|
165
166
|
});
|
|
166
167
|
}
|
|
167
168
|
//#endregion
|
|
169
|
+
//#region src/compat/settings-lease.ts
|
|
170
|
+
const SHARED_LEASE = Symbol.for("dsh-context-compression-improved/settings-lease");
|
|
171
|
+
/**
|
|
172
|
+
* Lease the namespace. No-op on modern hosts (register absent). Returns a
|
|
173
|
+
* read/update face; both are undefined-safe on modern hosts so callers can
|
|
174
|
+
* hold the face unconditionally and stay on the entry-config path there.
|
|
175
|
+
*/
|
|
176
|
+
function acquireSettingsLease(ctx, namespace, schema) {
|
|
177
|
+
const settings = ctx.settings;
|
|
178
|
+
if (settings === void 0 || typeof settings.register !== "function") return {
|
|
179
|
+
get: () => void 0,
|
|
180
|
+
update: async () => false
|
|
181
|
+
};
|
|
182
|
+
const owner = { settings };
|
|
183
|
+
let shared = settings[SHARED_LEASE];
|
|
184
|
+
if (shared === void 0) {
|
|
185
|
+
shared = {
|
|
186
|
+
owners: /* @__PURE__ */ new Set(),
|
|
187
|
+
registrationOwner: owner
|
|
188
|
+
};
|
|
189
|
+
Object.defineProperty(settings, SHARED_LEASE, {
|
|
190
|
+
configurable: true,
|
|
191
|
+
enumerable: false,
|
|
192
|
+
writable: false,
|
|
193
|
+
value: shared
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
shared.owners.add(owner);
|
|
197
|
+
const state = shared;
|
|
198
|
+
ctx.effect(() => () => {
|
|
199
|
+
state.owners.delete(owner);
|
|
200
|
+
if (state.registrationOwner === owner && state.owners.size > 0) {
|
|
201
|
+
const next = state.owners.values().next().value;
|
|
202
|
+
state.registrationOwner = next;
|
|
203
|
+
next.settings.register(namespace, schema);
|
|
204
|
+
}
|
|
205
|
+
if (state.owners.size === 0 && settings[SHARED_LEASE] === state) Reflect.deleteProperty(settings, SHARED_LEASE);
|
|
206
|
+
}, "contextCompressionSelector.settingsLease()");
|
|
207
|
+
if (state.owners.size === 1) settings.register(namespace, schema);
|
|
208
|
+
return {
|
|
209
|
+
get: () => {
|
|
210
|
+
try {
|
|
211
|
+
return settings.get?.(namespace);
|
|
212
|
+
} catch {
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
update: async (patch) => {
|
|
217
|
+
try {
|
|
218
|
+
await settings.update?.(namespace, patch);
|
|
219
|
+
return true;
|
|
220
|
+
} catch {
|
|
221
|
+
return false;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
//#endregion
|
|
227
|
+
//#region src/settings-bridge.ts
|
|
228
|
+
const ENTRY_ID = "context-compression-improved-bundle";
|
|
229
|
+
/** Hand back the service itself — the host reads route tables off `this`. */
|
|
230
|
+
function asWebServer$1(value) {
|
|
231
|
+
if (typeof value !== "object" || value === null) return void 0;
|
|
232
|
+
return typeof value.register === "function" ? value : void 0;
|
|
233
|
+
}
|
|
234
|
+
function jsonResponse$1(res, status, body) {
|
|
235
|
+
const typed = res;
|
|
236
|
+
if (typeof typed?.writeHead !== "function" || typeof typed?.end !== "function") return;
|
|
237
|
+
typed.writeHead(status, {
|
|
238
|
+
"content-type": "application/json; charset=utf-8",
|
|
239
|
+
"cache-control": "no-cache"
|
|
240
|
+
});
|
|
241
|
+
typed.end(JSON.stringify(body));
|
|
242
|
+
}
|
|
243
|
+
/** Modern-host read: the entry config descriptor's resolved value (pruner parity). */
|
|
244
|
+
function readEntryDoc(settings) {
|
|
245
|
+
const host = settings;
|
|
246
|
+
try {
|
|
247
|
+
const described = host?.describe?.().find((d) => String(d.ns) === ENTRY_ID)?.value;
|
|
248
|
+
if (described !== void 0) {
|
|
249
|
+
const record = described;
|
|
250
|
+
return record !== null && typeof record === "object" && "settings" in record ? record.settings : described;
|
|
251
|
+
}
|
|
252
|
+
} catch {}
|
|
253
|
+
}
|
|
254
|
+
function wireSettingsBridge(ctx) {
|
|
255
|
+
const log = compatLog(ctx, "warn");
|
|
256
|
+
let generation = detectHostGeneration(ctx);
|
|
257
|
+
let lease;
|
|
258
|
+
try {
|
|
259
|
+
ctx.inject(["settings"], (settingsCtx) => {
|
|
260
|
+
lease = acquireSettingsLease(settingsCtx, CONTEXT_COMPRESSION_SETTINGS_NAMESPACE, ContextCompressionSettingsSchema);
|
|
261
|
+
const svc = settingsCtx.settings;
|
|
262
|
+
generation = noteResolvedSettingsService(svc);
|
|
263
|
+
compatLog(ctx, "info")(`settings service resolved, generation=${generation}`);
|
|
264
|
+
});
|
|
265
|
+
} catch (error) {
|
|
266
|
+
log("settings lease wiring failed:", error);
|
|
267
|
+
}
|
|
268
|
+
const readDoc = () => {
|
|
269
|
+
const settings = (() => {
|
|
270
|
+
try {
|
|
271
|
+
return ctx.get("settings");
|
|
272
|
+
} catch {
|
|
273
|
+
return;
|
|
274
|
+
}
|
|
275
|
+
})();
|
|
276
|
+
if (generation === "legacy") return lease?.get() ?? settings?.get?.("context-compression");
|
|
277
|
+
return readEntryDoc(settings) ?? settings?.get?.("context-compression");
|
|
278
|
+
};
|
|
279
|
+
const handleGet = (_req, res) => {
|
|
280
|
+
jsonResponse$1(res, 200, {
|
|
281
|
+
ok: true,
|
|
282
|
+
doc: readDoc() ?? null,
|
|
283
|
+
generation
|
|
284
|
+
});
|
|
285
|
+
};
|
|
286
|
+
const handlePost = (req, res) => {
|
|
287
|
+
if (generation !== "legacy" || lease === void 0) {
|
|
288
|
+
jsonResponse$1(res, 409, {
|
|
289
|
+
ok: false,
|
|
290
|
+
error: "modern-host: configForms is authoritative"
|
|
291
|
+
});
|
|
292
|
+
return;
|
|
293
|
+
}
|
|
294
|
+
const chunks = [];
|
|
295
|
+
const typed = req;
|
|
296
|
+
if (typeof typed?.on !== "function") {
|
|
297
|
+
jsonResponse$1(res, 400, {
|
|
298
|
+
ok: false,
|
|
299
|
+
error: "unreadable request body"
|
|
300
|
+
});
|
|
301
|
+
return;
|
|
302
|
+
}
|
|
303
|
+
typed.on("data", (chunk) => {
|
|
304
|
+
if (chunk) chunks.push(chunk);
|
|
305
|
+
});
|
|
306
|
+
typed.on("end", async () => {
|
|
307
|
+
try {
|
|
308
|
+
const parsed = JSON.parse(Buffer.concat(chunks).toString("utf8"));
|
|
309
|
+
if (parsed.doc === void 0 || parsed.doc === null || typeof parsed.doc !== "object") {
|
|
310
|
+
jsonResponse$1(res, 400, {
|
|
311
|
+
ok: false,
|
|
312
|
+
error: "doc must be an object"
|
|
313
|
+
});
|
|
314
|
+
return;
|
|
315
|
+
}
|
|
316
|
+
if (!await lease.update(parsed.doc)) {
|
|
317
|
+
jsonResponse$1(res, 502, {
|
|
318
|
+
ok: false,
|
|
319
|
+
error: "settings update rejected by host"
|
|
320
|
+
});
|
|
321
|
+
return;
|
|
322
|
+
}
|
|
323
|
+
jsonResponse$1(res, 200, {
|
|
324
|
+
ok: true,
|
|
325
|
+
doc: parsed.doc
|
|
326
|
+
});
|
|
327
|
+
} catch (error) {
|
|
328
|
+
jsonResponse$1(res, 500, {
|
|
329
|
+
ok: false,
|
|
330
|
+
error: String(error?.message ?? error)
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
});
|
|
334
|
+
};
|
|
335
|
+
let registered = false;
|
|
336
|
+
const register = (webServer, channel) => {
|
|
337
|
+
if (registered) return;
|
|
338
|
+
try {
|
|
339
|
+
const disposers = [`/endpoint/dsh-context-compression-improved/settings`, `/api/dsh-context-compression-improved/settings`].map((path) => webServer.register({
|
|
340
|
+
kind: "exact",
|
|
341
|
+
path,
|
|
342
|
+
handler: (req, res) => {
|
|
343
|
+
if (String(req?.method ?? "GET").toUpperCase() === "POST") return handlePost(req, res);
|
|
344
|
+
return handleGet(req, res);
|
|
345
|
+
}
|
|
346
|
+
})).filter((off) => typeof off === "function");
|
|
347
|
+
registered = true;
|
|
348
|
+
ctx.effect(() => () => {
|
|
349
|
+
for (const off of disposers) off();
|
|
350
|
+
}, "contextCompressionSelector.settings bridge route");
|
|
351
|
+
compatLog(ctx, "info")(`settings bridge registered (${channel}), generation=${generation}`);
|
|
352
|
+
} catch (error) {
|
|
353
|
+
log("settings bridge registration failed:", error);
|
|
354
|
+
}
|
|
355
|
+
};
|
|
356
|
+
const active = asWebServer$1((() => {
|
|
357
|
+
try {
|
|
358
|
+
return ctx.get("webServer");
|
|
359
|
+
} catch {
|
|
360
|
+
return;
|
|
361
|
+
}
|
|
362
|
+
})());
|
|
363
|
+
if (active !== void 0) {
|
|
364
|
+
register(active, "direct");
|
|
365
|
+
if (registered) return;
|
|
366
|
+
}
|
|
367
|
+
ctx.inject(["webServer"], (injected) => {
|
|
368
|
+
const webServer = asWebServer$1(injected.webServer);
|
|
369
|
+
if (webServer === void 0) return;
|
|
370
|
+
register(webServer, "inject");
|
|
371
|
+
});
|
|
372
|
+
}
|
|
373
|
+
//#endregion
|
|
168
374
|
//#region src/preset-overlay.ts
|
|
169
375
|
/** Plugin-owned, reversible compression overlays for native agent presets. */
|
|
170
376
|
/**
|
|
@@ -1032,6 +1238,7 @@ function apply(ctx, config = {}) {
|
|
|
1032
1238
|
if (config.estimatorCatalogRoute === true) registerEstimatorCatalogRoute(ctx);
|
|
1033
1239
|
registerSavingsRoute(ctx);
|
|
1034
1240
|
registerMonitorRoute(ctx);
|
|
1241
|
+
wireSettingsBridge(ctx);
|
|
1035
1242
|
if (config.advisorReportRoute === true) registerAdvisorReportRoute(ctx);
|
|
1036
1243
|
registerSummaryCommand(ctx);
|
|
1037
1244
|
if (config.presetOverlay !== true) return;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as validatePublishedTailTrim,
|
|
1
|
+
import { a as validatePublishedTailTrim, l as sessionEvents } from "./tail-trim.js";
|
|
2
2
|
//#region src/invariant.ts
|
|
3
3
|
const PACKAGE_NAME = "dsh-context-compression-improved-runtime";
|
|
4
4
|
/** Cordis companion plugin name. */
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { B as decimalRateNanoUnits, F as recordIntentFold, H as resolveOfficialDeepSeekPrice, I as recordRecertified, L as recordScore, M as getSummaryOverride, N as invalidateOnTaskChange, O as evaluateIntentGate, P as observeIntentEnabled, T as observeContextUsage, U as getSavingsLedger, V as priceOfficialDeepSeekUsage, _ as resolveCustomPolicy, b as COMPRESSION_PROFILES, c as charsToTokens, d as isValidAutoCompactThresholdPercent, f as parseContextCompressionSettings, g as DEFAULT_CUSTOM_COMPRESSION_POLICY, h as CustomCompressionPolicySchema, i as DEFAULTS, k as getAdvisorState, l as codePointLength, m as resolvePolicy, n as CONTEXT_COMPRESSION_SETTINGS_NAMESPACE, o as PRUNE_MARKER, p as resolveConfig, r as ContextCompressionSettingsSchema, s as charsForTokens, t as AUTO_COMPACT_THRESHOLD_LIMITS, u as isCompressionProfile, v as assertNever, y as deepFreeze, z as DEEPSEEK_OFFICIAL_PRICE_CATALOG_VERSION } from "./config.js";
|
|
2
|
-
import { a as validatePublishedTailTrim, i as tailTrimStub, n as tailTrimMessage, o as
|
|
2
|
+
import { a as validatePublishedTailTrim, c as eventBySeq, i as tailTrimStub, l as sessionEvents, n as tailTrimMessage, o as compressionMessageSource, r as tailTrimRef, s as viewToolResult, t as parseTailTrimRef } from "./tail-trim.js";
|
|
3
3
|
import z from "@deepseek-ai/schemastery";
|
|
4
4
|
import { createHash } from "node:crypto";
|
|
5
5
|
import { Service } from "@deepseek-ai/cordis";
|
|
6
6
|
import { createUserMessage, freezeMessage } from "@deepseek-ai/dsh-llm";
|
|
7
|
-
import
|
|
7
|
+
import * as dshSessionNamespace from "@deepseek-ai/dsh-session";
|
|
8
8
|
import { readFileSync } from "node:fs";
|
|
9
9
|
import { Tokenizer } from "@huggingface/tokenizers";
|
|
10
10
|
import { defineTool } from "@deepseek-ai/dsh-tools";
|
|
@@ -469,6 +469,8 @@ function emptyResult() {
|
|
|
469
469
|
}
|
|
470
470
|
//#endregion
|
|
471
471
|
//#region src/runtime/measurement.ts
|
|
472
|
+
const dshSessionSoft$1 = dshSessionNamespace;
|
|
473
|
+
const deriveEventMessage = dshSessionSoft$1.deriveEventMessage ?? dshSessionSoft$1.default?.deriveEventMessage ?? (() => null);
|
|
472
474
|
/**
|
|
473
475
|
* Character pressure of one model-visible content array, measured on the same
|
|
474
476
|
* level `SnapshotCandidate.characterPressure` uses: a tool/result message is
|
|
@@ -814,7 +816,8 @@ function installContextCompressionRetrieve(ctx, config = {}) {
|
|
|
814
816
|
const event = sessionEvents(exec.agent.session)[seq];
|
|
815
817
|
if (event?.type !== "tool/result") throw new Error(`context_compression_retrieve: event ${String(seq)} is not a tool/result in the current session`);
|
|
816
818
|
const maxLines = resolveMaxLines(args.max_lines);
|
|
817
|
-
const
|
|
819
|
+
const resultView = viewToolResult(event.data.message);
|
|
820
|
+
const scan = scanBlocks(resultView.blocks, maxScanChars);
|
|
818
821
|
const scannedLines = splitScannedLines(scan);
|
|
819
822
|
const lines = scannedLines.lines;
|
|
820
823
|
const query = args.query;
|
|
@@ -823,8 +826,8 @@ function installContextCompressionRetrieve(ctx, config = {}) {
|
|
|
823
826
|
const total = scan.complete ? String(lines.length) : `at least ${String(lines.length)}`;
|
|
824
827
|
const bounded = boundCodePoints(`${[
|
|
825
828
|
`source: ${args.ref}`,
|
|
826
|
-
`tool_call_id: ${
|
|
827
|
-
`status: ${
|
|
829
|
+
`tool_call_id: ${resultView.callId}`,
|
|
830
|
+
`status: ${resultView.isError ? "error" : "completed"}`,
|
|
828
831
|
`lines: ${String(selected.start)}-${String(selected.end)} of ${total}`,
|
|
829
832
|
scan.complete ? "" : "note: source scan limit reached; later lines were not inspected",
|
|
830
833
|
selected.partialLine === void 0 ? "" : `note: line ${String(selected.partialLine)} is a partial prefix ending at the source scan limit`,
|
|
@@ -1127,7 +1130,7 @@ function tokenizerAuditFact(route) {
|
|
|
1127
1130
|
}
|
|
1128
1131
|
/** Check whether a snapshot candidate represents an error result. */
|
|
1129
1132
|
function isError(candidate) {
|
|
1130
|
-
return candidate.event.data.message.isError
|
|
1133
|
+
return viewToolResult(candidate.event.data.message).isError || candidate.event.data.error !== void 0;
|
|
1131
1134
|
}
|
|
1132
1135
|
/** Wrap a plan list into a HistoryPlanOutcome. */
|
|
1133
1136
|
function historyOutcome(plans) {
|
|
@@ -3964,9 +3967,11 @@ function emitCompressionAudit(logger, record) {
|
|
|
3964
3967
|
*
|
|
3965
3968
|
* @module dsh-context-compression-improved-runtime
|
|
3966
3969
|
*/
|
|
3970
|
+
const dshSessionSoft = dshSessionNamespace;
|
|
3971
|
+
const SessionSeq = dshSessionSoft.SessionSeq ?? dshSessionSoft.default?.SessionSeq ?? ((value) => value);
|
|
3967
3972
|
/** 节省统计配对键用原文(纯文本块才可配对;富内容返回 undefined)。 */
|
|
3968
3973
|
function originalTextForSavings(candidate) {
|
|
3969
|
-
return flattenPlainText(candidate.event.data.message.
|
|
3974
|
+
return flattenPlainText(viewToolResult(candidate.event.data.message).blocks);
|
|
3970
3975
|
}
|
|
3971
3976
|
/** Mixed deterministic selector behind the existing `ctx.toolResultPruner` seam. */
|
|
3972
3977
|
var ToolResultPruner = class extends Service {
|
|
@@ -4227,7 +4232,7 @@ var ToolResultPruner = class extends Service {
|
|
|
4227
4232
|
lastText.text = `${lastText.text}\n\n${block}`;
|
|
4228
4233
|
const replacement = createUserMessage({
|
|
4229
4234
|
content,
|
|
4230
|
-
source:
|
|
4235
|
+
source: compressionMessageSource()
|
|
4231
4236
|
});
|
|
4232
4237
|
session.append("user/message", replacement, {
|
|
4233
4238
|
surfaceOp: {
|
|
@@ -4369,7 +4374,7 @@ var ToolResultPruner = class extends Service {
|
|
|
4369
4374
|
const candidates = this.snapshot(session, view).filter((candidate) => !this.isRecoveryExempt(session, candidate)).map((candidate) => ({
|
|
4370
4375
|
seq: candidate.seq,
|
|
4371
4376
|
characterPressure: candidate.characterPressure,
|
|
4372
|
-
preview: advisorCandidatePreview(candidate.call.name, candidate.event.data.message.
|
|
4377
|
+
preview: advisorCandidatePreview(candidate.call.name, viewToolResult(candidate.event.data.message).blocks)
|
|
4373
4378
|
}));
|
|
4374
4379
|
let sawFailure = false;
|
|
4375
4380
|
const outcome = await runSessionAdvisorPass(session, channel, (record) => {
|
|
@@ -4459,8 +4464,7 @@ var ToolResultPruner = class extends Service {
|
|
|
4459
4464
|
for (const seq of range.seqs) {
|
|
4460
4465
|
const candidate = bySeq.get(seq);
|
|
4461
4466
|
if (candidate === void 0) continue;
|
|
4462
|
-
const
|
|
4463
|
-
const text = onlyTextBlock(result.content)?.text ?? "";
|
|
4467
|
+
const text = onlyTextBlock(viewToolResult(candidate.event.data.message).blocks)?.text ?? "";
|
|
4464
4468
|
const masked = maskCandidateForSummary(seq, candidate.call.name, candidate.call.arguments, text);
|
|
4465
4469
|
records.push({
|
|
4466
4470
|
seq,
|
|
@@ -4552,8 +4556,7 @@ var ToolResultPruner = class extends Service {
|
|
|
4552
4556
|
let charsAfter = 0;
|
|
4553
4557
|
for (const seq of foldable) {
|
|
4554
4558
|
const candidate = bySeq.get(seq);
|
|
4555
|
-
const
|
|
4556
|
-
const block = onlyTextBlock(result.content);
|
|
4559
|
+
const block = onlyTextBlock(viewToolResult(candidate.event.data.message).blocks);
|
|
4557
4560
|
if (block === null) continue;
|
|
4558
4561
|
const text = renderIntentFoldBlock(pending, seq);
|
|
4559
4562
|
const plan = this.plan(candidate, [{
|
|
@@ -4927,7 +4930,7 @@ var ToolResultPruner = class extends Service {
|
|
|
4927
4930
|
const ledger = getSavingsLedger();
|
|
4928
4931
|
const sid = String(session.id);
|
|
4929
4932
|
for (const candidate of candidates) {
|
|
4930
|
-
const text = flattenPlainText(candidate.event.data.message.
|
|
4933
|
+
const text = flattenPlainText(viewToolResult(candidate.event.data.message).blocks);
|
|
4931
4934
|
if (text === void 0) continue;
|
|
4932
4935
|
ledger.noteFullText({
|
|
4933
4936
|
sessionId: sid,
|
|
@@ -5019,11 +5022,12 @@ var ToolResultPruner = class extends Service {
|
|
|
5019
5022
|
if (event?.type !== "tool/result") continue;
|
|
5020
5023
|
const shadowedHeuristicTokenCount = projectionPrices.get(seq);
|
|
5021
5024
|
if (shadowedHeuristicTokenCount === void 0) throw new Error(`surface node ${String(seq)} is absent from the atomic legacy projection`);
|
|
5022
|
-
const
|
|
5025
|
+
const resultView = viewToolResult(event.data.message);
|
|
5026
|
+
const content = resultView.blocks;
|
|
5023
5027
|
candidates.push({
|
|
5024
5028
|
seq,
|
|
5025
5029
|
event,
|
|
5026
|
-
call: calls.get(
|
|
5030
|
+
call: calls.get(resultView.callId ?? "") ?? {
|
|
5027
5031
|
name: "unknown",
|
|
5028
5032
|
arguments: "{}"
|
|
5029
5033
|
},
|
|
@@ -5037,15 +5041,14 @@ var ToolResultPruner = class extends Service {
|
|
|
5037
5041
|
planNative(candidate, session, stage, policy, view) {
|
|
5038
5042
|
if (this.isRecoveryExempt(session, candidate)) return null;
|
|
5039
5043
|
if (candidate.characterPressure <= charsForTokens(policy.nativeTriggerTokens)) return null;
|
|
5040
|
-
const
|
|
5041
|
-
if (onlyTextBlocks(
|
|
5044
|
+
const resultContent = viewToolResult(candidate.event.data.message).blocks;
|
|
5045
|
+
if (onlyTextBlocks(resultContent) === null) return null;
|
|
5042
5046
|
const sourceSeq = rootToolResultSeq(session, candidate.seq);
|
|
5043
5047
|
const marker = (startLine) => recoveryMarker(sourceRef(session, sourceSeq), "tool result middle pruned", startLine);
|
|
5044
5048
|
let head = this.state.config.headChars;
|
|
5045
5049
|
let tail = this.state.config.tailChars;
|
|
5046
5050
|
for (let attempt = 0; attempt < 10; attempt += 1) {
|
|
5047
|
-
const
|
|
5048
|
-
const content = nativePruneContent(result.content, threshold, head, tail, marker);
|
|
5051
|
+
const content = nativePruneContent(resultContent, head + codePointLength(marker(1)) + tail, head, tail, marker);
|
|
5049
5052
|
if (content !== null) {
|
|
5050
5053
|
const plan = this.plan(candidate, content, sourceSeq, "native-head-tail", stage, "native-tool-result", void 0, view);
|
|
5051
5054
|
if (plan !== null && plan.tokensAfter <= policy.nativeTargetTokens) return plan;
|
|
@@ -5064,8 +5067,7 @@ var ToolResultPruner = class extends Service {
|
|
|
5064
5067
|
*/
|
|
5065
5068
|
planDedupe(candidate, session, policy, view) {
|
|
5066
5069
|
if (typeof candidate.event.surfaceOp === "object") return null;
|
|
5067
|
-
const
|
|
5068
|
-
const text = flattenPlainText(result.content);
|
|
5070
|
+
const text = flattenPlainText(viewToolResult(candidate.event.data.message).blocks);
|
|
5069
5071
|
if (text === void 0) return null;
|
|
5070
5072
|
if (candidate.characterPressure <= charsForTokens(policy.freshTriggerTokens)) return null;
|
|
5071
5073
|
let table = this.state.dedupeTables.get(session);
|
|
@@ -5094,11 +5096,11 @@ var ToolResultPruner = class extends Service {
|
|
|
5094
5096
|
}
|
|
5095
5097
|
planFresh(candidate, session, policy, view) {
|
|
5096
5098
|
if (typeof candidate.event.surfaceOp === "object") return null;
|
|
5097
|
-
const
|
|
5099
|
+
const resultView = viewToolResult(candidate.event.data.message);
|
|
5098
5100
|
if (candidate.characterPressure <= charsForTokens(policy.freshTriggerTokens)) return null;
|
|
5099
5101
|
const sourceSeq = candidate.seq;
|
|
5100
5102
|
const sourceRef$1 = sourceRef(session, sourceSeq);
|
|
5101
|
-
const textBlock = onlyTextBlock(
|
|
5103
|
+
const textBlock = onlyTextBlock(resultView.blocks);
|
|
5102
5104
|
if (textBlock !== null) {
|
|
5103
5105
|
let budgetChars = Math.max(1, Math.floor(codePointLength(textBlock.text) * .75));
|
|
5104
5106
|
const codeSkeleton = this.activeSettings(session).codeSkeleton.enabled;
|
|
@@ -5109,7 +5111,7 @@ var ToolResultPruner = class extends Service {
|
|
|
5109
5111
|
text: textBlock.text,
|
|
5110
5112
|
budgetChars,
|
|
5111
5113
|
sourceRef: sourceRef$1,
|
|
5112
|
-
isError:
|
|
5114
|
+
isError: resultView.isError || candidate.event.data.error !== void 0,
|
|
5113
5115
|
codeSkeleton
|
|
5114
5116
|
});
|
|
5115
5117
|
if (output !== null) {
|
|
@@ -5132,8 +5134,8 @@ var ToolResultPruner = class extends Service {
|
|
|
5132
5134
|
if (isError(candidate)) return this.planErrorEvidence(candidate, session, view, stage, targetTokens, component, historyMode);
|
|
5133
5135
|
const sourceSeq = rootToolResultSeq(session, candidate.seq);
|
|
5134
5136
|
const sourceRef$2 = sourceRef(session, sourceSeq);
|
|
5135
|
-
const
|
|
5136
|
-
if (onlyTextBlocks(
|
|
5137
|
+
const redactedContent = viewToolResult(candidate.event.data.message).blocks;
|
|
5138
|
+
if (onlyTextBlocks(redactedContent) === null) return null;
|
|
5137
5139
|
const text = [
|
|
5138
5140
|
"[Tool result reduced to satisfy the completed-step aggregate budget]",
|
|
5139
5141
|
`tool: ${candidate.call.name}`,
|
|
@@ -5149,8 +5151,7 @@ var ToolResultPruner = class extends Service {
|
|
|
5149
5151
|
/** Preserve bounded diagnostic evidence whenever an all-text error is reduced. */
|
|
5150
5152
|
planErrorEvidence(candidate, session, view, stage, targetTokens, component = "aggregate", historyMode) {
|
|
5151
5153
|
if (!isError(candidate)) return null;
|
|
5152
|
-
const
|
|
5153
|
-
const blocks = onlyTextBlocks(result.content);
|
|
5154
|
+
const blocks = onlyTextBlocks(viewToolResult(candidate.event.data.message).blocks);
|
|
5154
5155
|
if (blocks === null) return null;
|
|
5155
5156
|
const text = blocks.map((block) => block.text).join("\n");
|
|
5156
5157
|
const sourceSeq = rootToolResultSeq(session, candidate.seq);
|
|
@@ -5188,8 +5189,7 @@ var ToolResultPruner = class extends Service {
|
|
|
5188
5189
|
const protectedSeqs = this.protectedHistoryCandidateSeqs(candidates, policy);
|
|
5189
5190
|
const isUnsafe = (candidate) => {
|
|
5190
5191
|
if (this.isRecoveryExempt(session, candidate)) return true;
|
|
5191
|
-
const
|
|
5192
|
-
const block = onlyTextBlock(result.content);
|
|
5192
|
+
const block = onlyTextBlock(viewToolResult(candidate.event.data.message).blocks);
|
|
5193
5193
|
if (block?.text.includes("[Intent summary") === true) return true;
|
|
5194
5194
|
return block?.text.includes("[Old tool result content cleared from active context]") === true;
|
|
5195
5195
|
};
|
|
@@ -5229,8 +5229,8 @@ var ToolResultPruner = class extends Service {
|
|
|
5229
5229
|
const required = Math.max(minReclaimChars, total - trigger, ...microTarget === void 0 ? [] : [charsForTokens(view.totalTokens) - microTarget]);
|
|
5230
5230
|
const batchTarget = microTarget === void 0 ? minReclaimChars : required;
|
|
5231
5231
|
for (const candidate of eligible) {
|
|
5232
|
-
const
|
|
5233
|
-
const block = onlyTextBlock(
|
|
5232
|
+
const resultView = viewToolResult(candidate.event.data.message);
|
|
5233
|
+
const block = onlyTextBlock(resultView.blocks);
|
|
5234
5234
|
if (policy.presetOptions?.readState === true && block !== null) {
|
|
5235
5235
|
const readPath = toolCallPath(candidate.call.arguments);
|
|
5236
5236
|
const estimatorExpired = this.state.estimatorVerdicts.get(session)?.get(candidate.seq) === true;
|
|
@@ -5256,7 +5256,7 @@ var ToolResultPruner = class extends Service {
|
|
|
5256
5256
|
toolName: candidate.call.name,
|
|
5257
5257
|
sourceRef: sourceRef(session, sourceSeq),
|
|
5258
5258
|
charsBefore: codePointLength(block.text),
|
|
5259
|
-
isError:
|
|
5259
|
+
isError: resultView.isError || candidate.event.data.error !== void 0,
|
|
5260
5260
|
text: block.text,
|
|
5261
5261
|
compact: false
|
|
5262
5262
|
});
|
|
@@ -5266,7 +5266,7 @@ var ToolResultPruner = class extends Service {
|
|
|
5266
5266
|
text: block.text,
|
|
5267
5267
|
budgetChars: 1200,
|
|
5268
5268
|
sourceRef: sourceRef(session, sourceSeq),
|
|
5269
|
-
isError:
|
|
5269
|
+
isError: resultView.isError || candidate.event.data.error !== void 0
|
|
5270
5270
|
}, output)) continue;
|
|
5271
5271
|
let replacementText = output.text;
|
|
5272
5272
|
if (policy.presetOptions?.readState === true) {
|
|
@@ -5368,15 +5368,16 @@ var ToolResultPruner = class extends Service {
|
|
|
5368
5368
|
const resultSeqs = nodes.slice(index + 1, index + 1 + calls.length);
|
|
5369
5369
|
if (resultSeqs.length !== calls.length || resultSeqs.some((seq) => protectedResults.has(seq))) continue;
|
|
5370
5370
|
const results = resultSeqs.map((seq) => events[seq]);
|
|
5371
|
-
|
|
5372
|
-
|
|
5373
|
-
const
|
|
5374
|
-
if (
|
|
5375
|
-
|
|
5371
|
+
const resultViews = results.map((event) => event?.type === "tool/result" ? viewToolResult(event.data.message) : void 0);
|
|
5372
|
+
if (results.some((event, resultIndex) => {
|
|
5373
|
+
const view = resultViews[resultIndex];
|
|
5374
|
+
if (event?.type !== "tool/result" || view === void 0 || event.data.turn !== assistant.data.turn || event.data.step !== assistant.data.step || event.data.error !== void 0) return true;
|
|
5375
|
+
if (view.isError) return true;
|
|
5376
|
+
return view.blocks.some((contentBlock) => contentBlock.type !== "text");
|
|
5376
5377
|
})) continue;
|
|
5377
5378
|
const next = events[nodes[index + 1 + calls.length] ?? -1];
|
|
5378
5379
|
if (next?.type === "tool/result" && next.data.turn === assistant.data.turn && next.data.step === assistant.data.step) continue;
|
|
5379
|
-
const resultIds =
|
|
5380
|
+
const resultIds = resultViews.map((view) => view === void 0 ? "" : String(view.callId));
|
|
5380
5381
|
if (new Set(resultIds).size !== resultIds.length || resultIds.some((id, resultIndex) => id !== callIds[resultIndex])) continue;
|
|
5381
5382
|
const shadowedSeqs = [assistantSeq, ...resultSeqs];
|
|
5382
5383
|
const roots = shadowedSeqs.map((seq) => this.uniqueAppendRoot(session, seq));
|
|
@@ -5464,7 +5465,7 @@ var ToolResultPruner = class extends Service {
|
|
|
5464
5465
|
tokenizerId: exact === true && exactSurface !== void 0 ? exactSurface.tokenizerId : "characters",
|
|
5465
5466
|
tokenizerRevision: exact === true && exactSurface !== void 0 ? exactSurface.tokenizerRevision : "chars-per-token-4.0"
|
|
5466
5467
|
});
|
|
5467
|
-
const groupText = shadowedSeqs.map((seq) => sessionEvents(session)[seq]).filter((event) => event?.type === "tool/result").map((event) => flattenPlainText(event.data.message.
|
|
5468
|
+
const groupText = shadowedSeqs.map((seq) => sessionEvents(session)[seq]).filter((event) => event?.type === "tool/result").map((event) => flattenPlainText(viewToolResult(event.data.message).blocks)).filter((text) => text !== void 0).join("\n");
|
|
5468
5469
|
if (groupText.length > 0) getSavingsLedger().recordSaving({
|
|
5469
5470
|
sessionId: String(session.id),
|
|
5470
5471
|
component: "tail-trim",
|
|
@@ -5527,7 +5528,7 @@ var ToolResultPruner = class extends Service {
|
|
|
5527
5528
|
const tokensBefore = exact ? countBefore.tokens : charsToTokens(charsBefore);
|
|
5528
5529
|
const tokensAfter = exact ? countAfter.tokens : charsToTokens(charsAfter);
|
|
5529
5530
|
if (options.noNetSavingsGuard === true) {
|
|
5530
|
-
const originalBlocks = onlyTextBlocks(candidate.event.data.message.
|
|
5531
|
+
const originalBlocks = onlyTextBlocks(viewToolResult(candidate.event.data.message).blocks);
|
|
5531
5532
|
const replacementBlocks = onlyTextBlocks(content);
|
|
5532
5533
|
if (originalBlocks !== null && replacementBlocks !== null) {
|
|
5533
5534
|
const originalChars = originalBlocks.reduce((sum, block) => sum + codePointLength(block.text), 0);
|
|
@@ -5554,6 +5555,7 @@ var ToolResultPruner = class extends Service {
|
|
|
5554
5555
|
}
|
|
5555
5556
|
land(session, plan) {
|
|
5556
5557
|
const { candidate } = plan;
|
|
5558
|
+
const resultView = viewToolResult(candidate.event.data.message);
|
|
5557
5559
|
const message = freezeMessage({
|
|
5558
5560
|
...candidate.event.data.message,
|
|
5559
5561
|
content: plan.content
|
|
@@ -5618,7 +5620,7 @@ var ToolResultPruner = class extends Service {
|
|
|
5618
5620
|
originalSeq: candidate.seq,
|
|
5619
5621
|
sourceSeq: plan.sourceSeq,
|
|
5620
5622
|
replacementSeq: replacement.seq,
|
|
5621
|
-
callId:
|
|
5623
|
+
callId: resultView.callId,
|
|
5622
5624
|
reducer: plan.reducer,
|
|
5623
5625
|
stage: plan.stage,
|
|
5624
5626
|
charsBefore: plan.charsBefore,
|