dsh-context-compression-improved 0.10.5 → 0.11.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/CHANGELOG.md +8 -0
- package/CHANGELOG.zh.md +9 -0
- package/README.de.md +1 -1
- package/assets/dshfind-card.svg +33 -0
- package/docs/shallow-teaching-preset-template.md +46 -0
- package/package.json +6 -6
- package/packages/selector/dsh.plugin.json +2 -2
- package/packages/selector/lib/client.d.ts +8 -0
- package/packages/selector/lib/client.js +212 -3
- package/packages/selector/lib/index.js +1 -1
- package/packages/selector/lib/profiles.d.ts +34 -0
- package/packages/selector/lib/pruner.d.ts +55 -0
- package/packages/selector/lib/pruner.js +1925 -303
- package/packages/selector/lib/savings-integral.js +126 -3
- package/packages/selector/lib/tool-result.js +9 -1
- package/packages/selector/package.json +21 -21
- package/packages/selector/src/client/CompressionProfileControls.tsx +33 -0
- package/packages/selector/src/client/CompressionProfileSelector.tsx +2 -0
- package/packages/selector/src/client/decode.ts +5 -1
- package/packages/selector/src/client/index.ts +4 -0
- package/packages/selector/src/client/locales/de.ts +7 -0
- package/packages/selector/src/client/locales/es.ts +7 -0
- package/packages/selector/src/client/locales/fr.ts +7 -0
- package/packages/selector/src/client/locales/it.ts +7 -0
- package/packages/selector/src/client/locales/ja.ts +7 -0
- package/packages/selector/src/client/locales/ko.ts +7 -0
- package/packages/selector/src/client/locales/ru.ts +7 -0
- package/packages/selector/src/client/locales.ts +14 -0
- package/packages/selector/src/client/monitor-fab.ts +14 -0
- package/packages/selector/src/client/settings-section.tsx +9 -2
- package/packages/selector/src/profiles.ts +103 -0
- package/packages/selector/src/pruner.ts +310 -4
- package/packages/selector/src/runtime/audit.ts +1 -0
- package/packages/selector/src/runtime/config.ts +88 -1
- package/packages/selector/src/runtime/fold-router.ts +143 -0
- package/packages/selector/src/runtime/monitor.ts +31 -0
- package/packages/selector/src/runtime/reducers.ts +1 -1
- package/packages/selector/src/runtime/sediment-card.ts +126 -0
- package/packages/selector/src/runtime/sediment-clock.ts +87 -0
- package/packages/selector/src/runtime/sediment-guard.ts +136 -0
- package/packages/selector/src/runtime/sediment-publish.ts +144 -0
- package/packages/selector/src/runtime/sediment-span.ts +170 -0
- package/packages/selector/src/runtime/sediment.ts +209 -0
- package/packages/selector/src/runtime/shallow-tools.ts +342 -0
- package/packages/selector/src/runtime/tool-names.ts +6 -0
- package/packages/selector/src/runtime/triage/masks.ts +128 -0
- package/packages/selector/src/runtime/triage/shallow.ts +132 -0
- package/packages/selector/src/runtime/triage/signals.ts +167 -0
- package/packages/selector/src/runtime/triage/types.ts +125 -0
- package/packages/selector/src/runtime/types.ts +28 -0
- package/packages/selector/tests/fixtures/sediment-pool/52adc205-cloud-5.orig.txt +231 -0
- package/packages/selector/tests/fixtures/sediment-pool/95fcba5d-cloud-25.orig.txt +236 -0
- package/packages/selector/tests/fixtures/sediment-pool/95fcba5d-cloud-38.orig.txt +220 -0
- package/packages/selector/tests/fixtures/sediment-pool/95fcba5d-cloud-42.orig.txt +140 -0
- package/packages/selector/tests/fixtures/sediment-pool/95fcba5d-cloud-53.orig.txt +117 -0
- package/packages/selector/tests/fixtures/sediment-pool/95fcba5d-local-10.orig.txt +67 -0
- package/packages/selector/tests/fixtures/sediment-pool/a7a767c0-cloud-45.orig.txt +119 -0
- package/packages/selector/tests/fixtures/sediment-pool/a7a767c0-cloud-49.orig.txt +119 -0
- package/packages/selector/tests/fixtures/sediment-pool/a7a767c0-cloud-63.orig.txt +131 -0
- package/packages/selector/tests/fixtures/sediment-pool/a7a767c0-cloud-75.orig.txt +196 -0
- package/packages/selector/tests/fixtures/sediment-pool/a7a767c0-cloud-76.orig.txt +71 -0
- package/packages/selector/tests/fixtures/sediment-pool/a7a767c0-cloud-85.orig.txt +126 -0
- package/packages/selector/tests/fixtures/sediment-pool/a7a767c0-cloud-86.orig.txt +86 -0
- package/packages/selector/tests/fixtures/sediment-pool/a7a767c0-cloud-87.orig.txt +50 -0
- package/packages/selector/tests/fixtures/sediment-pool/a7a767c0-cloud-96.orig.txt +102 -0
- package/packages/selector/tests/public/package-contract.client.spec.ts +7 -4
- package/packages/selector/tests/runtime/fold-router.spec.ts +140 -0
- package/packages/selector/tests/runtime/sediment-card.spec.ts +111 -0
- package/packages/selector/tests/runtime/sediment-config.spec.ts +56 -0
- package/packages/selector/tests/runtime/sediment-guard.spec.ts +71 -0
- package/packages/selector/tests/runtime/sediment-masks.spec.ts +95 -0
- package/packages/selector/tests/runtime/sediment-orchestrator.spec.ts +166 -0
- package/packages/selector/tests/runtime/sediment-pool-share.spec.ts +65 -0
- package/packages/selector/tests/runtime/sediment-publish.spec.ts +142 -0
- package/packages/selector/tests/runtime/sediment-real-shapes.spec.ts +158 -0
- package/packages/selector/tests/runtime/sediment-settings.spec.ts +73 -0
- package/packages/selector/tests/runtime/sediment-signals.spec.ts +124 -0
- package/packages/selector/tests/runtime/sediment-span.spec.ts +92 -0
- package/packages/selector/tests/runtime/shallow-primitives.spec.ts +135 -0
- package/packages/selector/tests/settings-seat.client.spec.ts +1 -1
- package/scripts/hosts.d.mts +3 -0
- package/scripts/hosts.mjs +3 -1
- package/scripts/sediment-latency-report.mjs +63 -0
- package/scripts/verify-release.mjs +7 -2
- package/$null +0 -1
|
@@ -785,6 +785,30 @@ function evaluateIntentGate(input) {
|
|
|
785
785
|
* (默认 80%)——提前一档给出人工干预窗口。
|
|
786
786
|
*/
|
|
787
787
|
const MONITOR_SUGGEST_PCT = .7;
|
|
788
|
+
const sedimentBySession = /* @__PURE__ */ new Map();
|
|
789
|
+
const SEDIMENT_CAP = 64;
|
|
790
|
+
/** Record the latest sediment observation for one session (pruner side). */
|
|
791
|
+
function setSedimentObservation(sessionId, block) {
|
|
792
|
+
if (sedimentBySession.size >= SEDIMENT_CAP && !sedimentBySession.has(sessionId)) {
|
|
793
|
+
const oldest = sedimentBySession.keys().next().value;
|
|
794
|
+
if (oldest !== void 0) sedimentBySession.delete(oldest);
|
|
795
|
+
}
|
|
796
|
+
sedimentBySession.set(sessionId, {
|
|
797
|
+
...block,
|
|
798
|
+
at: Date.now()
|
|
799
|
+
});
|
|
800
|
+
}
|
|
801
|
+
/** Read the latest sediment observation (absent before first observation). */
|
|
802
|
+
function getSedimentObservation(sessionId) {
|
|
803
|
+
const found = sedimentBySession.get(sessionId);
|
|
804
|
+
if (found === void 0) return void 0;
|
|
805
|
+
const { conservative, reason, cuts } = found;
|
|
806
|
+
return {
|
|
807
|
+
conservative,
|
|
808
|
+
reason,
|
|
809
|
+
cuts
|
|
810
|
+
};
|
|
811
|
+
}
|
|
788
812
|
/**
|
|
789
813
|
* Savings snapshot plus the intent-summary control block. Ledger is
|
|
790
814
|
* injectable so tests seed a private instance instead of the process
|
|
@@ -805,10 +829,12 @@ function buildMonitorSnapshot(sessionId, ledger = getSavingsLedger()) {
|
|
|
805
829
|
thresholdPct: MONITOR_SUGGEST_PCT,
|
|
806
830
|
occupancyPct: contextBlock.pct
|
|
807
831
|
};
|
|
832
|
+
const sedimentBlock = scopeKey.length === 0 ? void 0 : getSedimentObservation(scopeKey);
|
|
808
833
|
return {
|
|
809
834
|
...ledger.snapshot(sessionId),
|
|
810
835
|
...contextBlock === void 0 ? {} : { context: contextBlock },
|
|
811
836
|
...suggestion === void 0 ? {} : { suggestion },
|
|
837
|
+
...sedimentBlock === void 0 ? {} : { sediment: sedimentBlock },
|
|
812
838
|
intent: {
|
|
813
839
|
override,
|
|
814
840
|
observedEnabled: getObservedIntentEnabled(scopeKey),
|
|
@@ -2202,6 +2228,100 @@ function parseMonitorPanelSettings(value) {
|
|
|
2202
2228
|
if (typeof enabled !== "boolean") throw new TypeError("Context-compression monitorPanel.enabled must be a boolean");
|
|
2203
2229
|
return { enabled };
|
|
2204
2230
|
}
|
|
2231
|
+
/** Off defaults for the sediment gate; mirrored browser-side in profiles.ts DEFAULT_SEDIMENT_SETTINGS. */
|
|
2232
|
+
const DEFAULT_SEDIMENT_SETTINGS = {
|
|
2233
|
+
enabled: false,
|
|
2234
|
+
granularity: "turn",
|
|
2235
|
+
minClosingTokens: 120,
|
|
2236
|
+
rewriteGuardRatio: 3,
|
|
2237
|
+
maxTurnSpanTokens: 32e3
|
|
2238
|
+
};
|
|
2239
|
+
const SEDIMENT_KEYS = /* @__PURE__ */ new Set([
|
|
2240
|
+
"enabled",
|
|
2241
|
+
"granularity",
|
|
2242
|
+
"minClosingTokens",
|
|
2243
|
+
"rewriteGuardRatio",
|
|
2244
|
+
"maxTurnSpanTokens",
|
|
2245
|
+
"extraSignalPatterns",
|
|
2246
|
+
"foldMode",
|
|
2247
|
+
"foldBaseUrl",
|
|
2248
|
+
"foldBaseUrlKey",
|
|
2249
|
+
"foldStrataProvider",
|
|
2250
|
+
"foldStrataModel",
|
|
2251
|
+
"foldLocal35Provider",
|
|
2252
|
+
"foldLocal35Model"
|
|
2253
|
+
]);
|
|
2254
|
+
function isSafeSignalPatternSource(entry) {
|
|
2255
|
+
return typeof entry === "string" && entry.length > 0 && entry.length <= 200 && (() => {
|
|
2256
|
+
try {
|
|
2257
|
+
new RegExp(entry);
|
|
2258
|
+
return true;
|
|
2259
|
+
} catch {
|
|
2260
|
+
return false;
|
|
2261
|
+
}
|
|
2262
|
+
})();
|
|
2263
|
+
}
|
|
2264
|
+
/**
|
|
2265
|
+
* Strictly parse the persisted sediment section (plan cci-sedimentation-triage
|
|
2266
|
+
* T0.2/T0.3): absent inherits the off defaults; present-but-invalid values
|
|
2267
|
+
* throw — never coerced, never silently dropped.
|
|
2268
|
+
*/
|
|
2269
|
+
function parseSedimentSettings(value) {
|
|
2270
|
+
if (value === void 0) return { ...DEFAULT_SEDIMENT_SETTINGS };
|
|
2271
|
+
if (!isPlainRecord(value)) throw new TypeError("Context-compression sediment must be a plain object");
|
|
2272
|
+
const unknownKey = Object.keys(value).find((key) => !SEDIMENT_KEYS.has(key));
|
|
2273
|
+
if (unknownKey !== void 0) throw new TypeError(`Context-compression sediment: unknown key "${unknownKey}"`);
|
|
2274
|
+
if (value.enabled !== void 0 && typeof value.enabled !== "boolean") throw new TypeError("Context-compression sediment.enabled must be a boolean");
|
|
2275
|
+
if (value.granularity !== void 0 && value.granularity !== "turn" && value.granularity !== "span") throw new TypeError("Context-compression sediment.granularity must be \"turn\" or \"span\"");
|
|
2276
|
+
const bounded = [
|
|
2277
|
+
[
|
|
2278
|
+
"minClosingTokens",
|
|
2279
|
+
value.minClosingTokens,
|
|
2280
|
+
40,
|
|
2281
|
+
2e3
|
|
2282
|
+
],
|
|
2283
|
+
[
|
|
2284
|
+
"rewriteGuardRatio",
|
|
2285
|
+
value.rewriteGuardRatio,
|
|
2286
|
+
1,
|
|
2287
|
+
10
|
|
2288
|
+
],
|
|
2289
|
+
[
|
|
2290
|
+
"maxTurnSpanTokens",
|
|
2291
|
+
value.maxTurnSpanTokens,
|
|
2292
|
+
4e3,
|
|
2293
|
+
64e3
|
|
2294
|
+
]
|
|
2295
|
+
];
|
|
2296
|
+
for (const [name, entry, min, max] of bounded) if (entry !== void 0 && (typeof entry !== "number" || !Number.isSafeInteger(entry) || entry < min || entry > max)) throw new TypeError(`Context-compression sediment.${name} must be an integer in [${min}, ${max}]`);
|
|
2297
|
+
if (value.extraSignalPatterns !== void 0) {
|
|
2298
|
+
if (!Array.isArray(value.extraSignalPatterns) || value.extraSignalPatterns.some((entry) => !isSafeSignalPatternSource(entry))) throw new TypeError("Context-compression sediment.extraSignalPatterns must be parseable non-empty patterns");
|
|
2299
|
+
}
|
|
2300
|
+
if (value.foldMode !== void 0 && value.foldMode !== "" && value.foldMode !== "host" && value.foldMode !== "direct") throw new TypeError("Context-compression sediment.foldMode must be \"\", \"host\", or \"direct\"");
|
|
2301
|
+
for (const key of [
|
|
2302
|
+
"foldBaseUrl",
|
|
2303
|
+
"foldBaseUrlKey",
|
|
2304
|
+
"foldStrataProvider",
|
|
2305
|
+
"foldStrataModel",
|
|
2306
|
+
"foldLocal35Provider",
|
|
2307
|
+
"foldLocal35Model"
|
|
2308
|
+
]) if (value[key] !== void 0 && typeof value[key] !== "string") throw new TypeError(`Context-compression sediment.${key} must be a string`);
|
|
2309
|
+
return {
|
|
2310
|
+
enabled: value.enabled ?? DEFAULT_SEDIMENT_SETTINGS.enabled,
|
|
2311
|
+
granularity: value.granularity ?? DEFAULT_SEDIMENT_SETTINGS.granularity,
|
|
2312
|
+
minClosingTokens: value.minClosingTokens ?? DEFAULT_SEDIMENT_SETTINGS.minClosingTokens,
|
|
2313
|
+
rewriteGuardRatio: value.rewriteGuardRatio ?? DEFAULT_SEDIMENT_SETTINGS.rewriteGuardRatio,
|
|
2314
|
+
maxTurnSpanTokens: value.maxTurnSpanTokens ?? DEFAULT_SEDIMENT_SETTINGS.maxTurnSpanTokens,
|
|
2315
|
+
...value.extraSignalPatterns === void 0 ? {} : { extraSignalPatterns: [...value.extraSignalPatterns] },
|
|
2316
|
+
...value.foldMode === void 0 ? {} : { foldMode: value.foldMode },
|
|
2317
|
+
...value.foldBaseUrl === void 0 ? {} : { foldBaseUrl: value.foldBaseUrl },
|
|
2318
|
+
...value.foldBaseUrlKey === void 0 ? {} : { foldBaseUrlKey: value.foldBaseUrlKey },
|
|
2319
|
+
...value.foldStrataProvider === void 0 ? {} : { foldStrataProvider: value.foldStrataProvider },
|
|
2320
|
+
...value.foldStrataModel === void 0 ? {} : { foldStrataModel: value.foldStrataModel },
|
|
2321
|
+
...value.foldLocal35Provider === void 0 ? {} : { foldLocal35Provider: value.foldLocal35Provider },
|
|
2322
|
+
...value.foldLocal35Model === void 0 ? {} : { foldLocal35Model: value.foldLocal35Model }
|
|
2323
|
+
};
|
|
2324
|
+
}
|
|
2205
2325
|
/**
|
|
2206
2326
|
* Parse the optional tokenpilot-inspired preset sub-capability section. Absent
|
|
2207
2327
|
* inherits the preset defaults; present-but-invalid is rejected, mirroring the
|
|
@@ -2313,7 +2433,8 @@ const DEFAULT_CONTEXT_COMPRESSION_SETTINGS = {
|
|
|
2313
2433
|
autoCompact: { thresholdPercent: AUTO_COMPACT_THRESHOLD_LIMITS.default },
|
|
2314
2434
|
codeSkeleton: { enabled: false },
|
|
2315
2435
|
intentSummary: { enabled: false },
|
|
2316
|
-
monitorPanel: { enabled: false }
|
|
2436
|
+
monitorPanel: { enabled: false },
|
|
2437
|
+
sediment: { ...DEFAULT_SEDIMENT_SETTINGS }
|
|
2317
2438
|
};
|
|
2318
2439
|
/**
|
|
2319
2440
|
* Parse one settings document with the persisted-section semantics: `undefined`
|
|
@@ -2331,7 +2452,7 @@ const ContextCompressionSettingsSchema = z.transform(z.any().required(), (value)
|
|
|
2331
2452
|
if (!isPlainRecord(value)) throw new TypeError("Context-compression settings must be a plain object");
|
|
2332
2453
|
assertPlainDataTree(value);
|
|
2333
2454
|
const candidate = structuredClone(value);
|
|
2334
|
-
const unknown = Object.keys(candidate).find((key) => key !== "profile" && key !== "custom" && key !== "ptcCustom" && key !== "autoCompact" && key !== "codeSkeleton" && key !== "intentSummary" && key !== "monitorPanel" && key !== "presetOptions");
|
|
2455
|
+
const unknown = Object.keys(candidate).find((key) => key !== "profile" && key !== "custom" && key !== "ptcCustom" && key !== "autoCompact" && key !== "codeSkeleton" && key !== "intentSummary" && key !== "monitorPanel" && key !== "sediment" && key !== "presetOptions");
|
|
2335
2456
|
if (unknown !== void 0) throw new TypeError(`Context-compression settings: unknown key "${unknown}"`);
|
|
2336
2457
|
assertPresentSection(candidate, "profile", isSupportedProfile);
|
|
2337
2458
|
assertPresentSection(candidate, "custom", isUsableCustomDocument);
|
|
@@ -2340,6 +2461,7 @@ const ContextCompressionSettingsSchema = z.transform(z.any().required(), (value)
|
|
|
2340
2461
|
const codeSkeleton = parseCodeSkeletonSettings(candidate.codeSkeleton);
|
|
2341
2462
|
const intentSummary = parseIntentSummarySettings(candidate.intentSummary);
|
|
2342
2463
|
const monitorPanel = parseMonitorPanelSettings(candidate.monitorPanel);
|
|
2464
|
+
const sediment = parseSedimentSettings(candidate.sediment);
|
|
2343
2465
|
const presetOptions = parsePresetOptionsSettings(candidate.presetOptions);
|
|
2344
2466
|
return {
|
|
2345
2467
|
...contextCompressionSettingsInputSchema(candidate),
|
|
@@ -2347,6 +2469,7 @@ const ContextCompressionSettingsSchema = z.transform(z.any().required(), (value)
|
|
|
2347
2469
|
codeSkeleton,
|
|
2348
2470
|
intentSummary,
|
|
2349
2471
|
monitorPanel,
|
|
2472
|
+
sediment,
|
|
2350
2473
|
...presetOptions === void 0 ? {} : { presetOptions }
|
|
2351
2474
|
};
|
|
2352
2475
|
}).default(DEFAULT_CONTEXT_COMPRESSION_SETTINGS);
|
|
@@ -4573,4 +4696,4 @@ function formatFemtoUnits(value) {
|
|
|
4573
4696
|
return fraction.length === 0 ? whole : `${whole}.${fraction}`;
|
|
4574
4697
|
}
|
|
4575
4698
|
//#endregion
|
|
4576
|
-
export { isValidAutoCompactThresholdPercent as $, officialRequestUsage as A,
|
|
4699
|
+
export { isValidAutoCompactThresholdPercent as $, officialRequestUsage as A, recordIntentFold as At, unavailableCount as B, resolveStatsDshHome as C, evaluateIntentGate as Ct, dedupePlaceholder as D, getSummaryOverride as Dt, dedupeHash as E, getObservedIntentEnabled as Et, onlyTextBlocks as F, decimalRateNanoUnits as Ft, ContextCompressionSettingsSchema as G, countOmittedLines as H, pressureCost as I, priceOfficialDeepSeekUsage as It, PRUNE_MARKER as J, DEFAULTS as K, recoveryMarker as L, resolveOfficialDeepSeekPrice as Lt, emptyResult as M, recordScore as Mt, nativePruneContent as N, setSummaryOverride as Nt, flattenPlainText as O, invalidateOnTaskChange as Ot, onlyTextBlock as P, DEEPSEEK_OFFICIAL_PRICE_CATALOG_VERSION as Pt, isCompressionProfile as Q, sameProviderMeasurementKey as R, getSavingsLedger as Rt, statsPersistenceState as S, INTENT_GATE_GROWTH_TOKENS as St, DedupeTable as T, getLastIntentFold as Tt, AUTO_COMPACT_THRESHOLD_LIMITS as U, CAPACITY_PRESSURE_RATIO as V, CONTEXT_COMPRESSION_SETTINGS_NAMESPACE as W, charsToTokens as X, charsForTokens as Y, codePointLength as Z, scheduleUsageFlush as _, isSessionOverrideAction as _t, getStatsBackfillStatus as a, resolveCustomPolicy as at, ensureStatsStore as b, setSedimentObservation as bt, pauseStatsBackfill as c, COMPRESSION_PROFILES as ct, claimFromLand as d, decodeSessionLogBytes as dt, parseContextCompressionSettings as et, claimOffset as f, deepSeekV4TokenizerForModel as ft, reclaimFromTailTrim as g, estimateSavingsPricing as gt, getStatsActiveSessionId as h, drsTotalsFragment as ht, discoverBackfillSessionLogs as i, DEFAULT_CUSTOM_COMPRESSION_POLICY as it, countToolContent as j, recordRecertified as jt, measureForCompaction as k, observeIntentEnabled as kt, resumeStatsBackfill as l, countExactCanonicalTextFields as lt, flushUsageOnDispose as m, buildMonitorSnapshot as mt, sampleIntegralBoundary as n, resolvePolicy as nt, kickStatsBackfillOnDispose as o, assertNever as ot, flushPendingUsageNow as p, applySessionOverride as pt, DEFAULT_CONTEXT_COMPRESSION_SETTINGS as q, configureStatsBackfillTrigger as r, CustomCompressionPolicySchema as rt, kickStatsBackfillOnRouteHit as s, deepFreeze as st, estimateIntegralMoney as t, resolveConfig as tt, cancelPendingUsageFlushes as u, unavailableTokenCount as ut, setStatsLivePathBusy as v, mergeCompositionByComponent as vt, projectSessionSavings as w, getAdvisorState as wt, getStatsStore as x, INTENT_GATE_FLOOR_FRACTION as xt, closeStatsStore as y, observeContextUsage as yt, summarize as z };
|
|
@@ -30,7 +30,15 @@ function eventBySeq(events, seq) {
|
|
|
30
30
|
* compression surface without any error. Keeping one source prevents that class
|
|
31
31
|
* of silent split here.
|
|
32
32
|
*/
|
|
33
|
-
const RUNTIME_TOOL_NAMES = Object.freeze({
|
|
33
|
+
const RUNTIME_TOOL_NAMES = Object.freeze({
|
|
34
|
+
RETRIEVE: "context_compression_retrieve",
|
|
35
|
+
/** Shallow read preview: declaration skeleton over a type-classified view. */
|
|
36
|
+
SHALLOW: "context_compression_shallow",
|
|
37
|
+
/** Upgrade-discard pair primitive: drop one side of a shallow/full read pair. */
|
|
38
|
+
DISCARD: "context_compression_discard",
|
|
39
|
+
/** O(1) header probe recommending which shallow view fits a file. */
|
|
40
|
+
PROBE: "context_compression_probe"
|
|
41
|
+
});
|
|
34
42
|
/**
|
|
35
43
|
* Calling-convention note appended to the retrieval tool description. In a
|
|
36
44
|
* standard (direct tool-call) preset the model calls the tool directly; when the
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-context-compression-improved",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.1",
|
|
4
4
|
"description": "One-install context-compression selector bundle for DeepSeek Harness",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"author": "WilliamShi666",
|
|
71
71
|
"engines": {
|
|
72
72
|
"node": "^22.19.0 || >=24.0.0",
|
|
73
|
-
"dsh": "0.1.0-rc.2
|
|
73
|
+
"dsh": ">=0.1.0-rc.2 <0.3.0-0"
|
|
74
74
|
},
|
|
75
75
|
"keywords": [
|
|
76
76
|
"deepseek",
|
|
@@ -95,25 +95,25 @@
|
|
|
95
95
|
"@deepseek-ai/cordis": ">=4.0.1 <5",
|
|
96
96
|
"@deepseek-ai/cordis-plugin-include": ">=1.0.6 <2",
|
|
97
97
|
"@deepseek-ai/cordis-plugin-loader": ">=1.0.2 <2",
|
|
98
|
-
"@deepseek-ai/dsh-agent": "0.1.0-rc.2
|
|
99
|
-
"@deepseek-ai/dsh-agent-presets": "0.1.0-rc.2
|
|
100
|
-
"@deepseek-ai/dsh-client-locale": "0.1.0-rc.2
|
|
101
|
-
"@deepseek-ai/dsh-client-store": "0.1.0-rc.2
|
|
102
|
-
"@deepseek-ai/dsh-client-ui-primitives": "0.1.0-rc.2
|
|
103
|
-
"@deepseek-ai/dsh-client-ui-session": "0.1.0-rc.2
|
|
104
|
-
"@deepseek-ai/dsh-client-ui-settings": "0.1.0-rc.2
|
|
105
|
-
"@deepseek-ai/dsh-client-ui-slots": "0.1.0-rc.2
|
|
106
|
-
"@deepseek-ai/dsh-client-ui-workspace": "0.1.0-rc.2
|
|
107
|
-
"@deepseek-ai/dsh-command-compact": "0.1.0-rc.2
|
|
108
|
-
"@deepseek-ai/dsh-compaction": "0.1.0-rc.2
|
|
109
|
-
"@deepseek-ai/dsh-compaction-basic": "0.1.0-rc.2
|
|
110
|
-
"@deepseek-ai/dsh-invariants": "0.1.0-rc.2
|
|
111
|
-
"@deepseek-ai/dsh-llm": "0.1.0-rc.2
|
|
112
|
-
"@deepseek-ai/dsh-session": "0.1.0-rc.2
|
|
113
|
-
"@deepseek-ai/dsh-settings": "0.1.0-rc.2
|
|
114
|
-
"@deepseek-ai/dsh-system-prompt": "0.1.0-rc.2
|
|
115
|
-
"@deepseek-ai/dsh-token-meter": "0.1.0-rc.2
|
|
116
|
-
"@deepseek-ai/dsh-tools": "0.1.0-rc.2
|
|
98
|
+
"@deepseek-ai/dsh-agent": ">=0.1.0-rc.2 <0.3.0-0",
|
|
99
|
+
"@deepseek-ai/dsh-agent-presets": ">=0.1.0-rc.2 <0.3.0-0",
|
|
100
|
+
"@deepseek-ai/dsh-client-locale": ">=0.1.0-rc.2 <0.3.0-0",
|
|
101
|
+
"@deepseek-ai/dsh-client-store": ">=0.1.0-rc.2 <0.3.0-0",
|
|
102
|
+
"@deepseek-ai/dsh-client-ui-primitives": ">=0.1.0-rc.2 <0.3.0-0",
|
|
103
|
+
"@deepseek-ai/dsh-client-ui-session": ">=0.1.0-rc.2 <0.3.0-0",
|
|
104
|
+
"@deepseek-ai/dsh-client-ui-settings": ">=0.1.0-rc.2 <0.3.0-0",
|
|
105
|
+
"@deepseek-ai/dsh-client-ui-slots": ">=0.1.0-rc.2 <0.3.0-0",
|
|
106
|
+
"@deepseek-ai/dsh-client-ui-workspace": ">=0.1.0-rc.2 <0.3.0-0",
|
|
107
|
+
"@deepseek-ai/dsh-command-compact": ">=0.1.0-rc.2 <0.3.0-0",
|
|
108
|
+
"@deepseek-ai/dsh-compaction": ">=0.1.0-rc.2 <0.3.0-0",
|
|
109
|
+
"@deepseek-ai/dsh-compaction-basic": ">=0.1.0-rc.2 <0.3.0-0",
|
|
110
|
+
"@deepseek-ai/dsh-invariants": ">=0.1.0-rc.2 <0.3.0-0",
|
|
111
|
+
"@deepseek-ai/dsh-llm": ">=0.1.0-rc.2 <0.3.0-0",
|
|
112
|
+
"@deepseek-ai/dsh-session": ">=0.1.0-rc.2 <0.3.0-0",
|
|
113
|
+
"@deepseek-ai/dsh-settings": ">=0.1.0-rc.2 <0.3.0-0",
|
|
114
|
+
"@deepseek-ai/dsh-system-prompt": ">=0.1.0-rc.2 <0.3.0-0",
|
|
115
|
+
"@deepseek-ai/dsh-token-meter": ">=0.1.0-rc.2 <0.3.0-0",
|
|
116
|
+
"@deepseek-ai/dsh-tools": ">=0.1.0-rc.2 <0.3.0-0",
|
|
117
117
|
"react": ">=18 <19"
|
|
118
118
|
},
|
|
119
119
|
"peerDependenciesMeta": {
|
|
@@ -317,3 +317,36 @@ export function CodeSkeletonControls({ value, disabled, save, settle, t }: CodeS
|
|
|
317
317
|
</section>
|
|
318
318
|
)
|
|
319
319
|
}
|
|
320
|
+
|
|
321
|
+
interface SedimentControlsProps {
|
|
322
|
+
value: boolean
|
|
323
|
+
disabled: boolean
|
|
324
|
+
save: (enabled: boolean) => Promise<void>
|
|
325
|
+
settle: (operation: () => Promise<void>) => void
|
|
326
|
+
t: (key: ContextCompressionLocaleKey) => string
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* Turn-tail sedimentation gate (plan cci-sedimentation-triage T3.7): on/off
|
|
331
|
+
* select with the display-impact disclosure in its description (M13) —
|
|
332
|
+
* replaced spans leave the transcript view; originals stay in the log.
|
|
333
|
+
*/
|
|
334
|
+
export function SedimentControls({ value, disabled, save, settle, t }: SedimentControlsProps) {
|
|
335
|
+
return (
|
|
336
|
+
<section className={css.autoCompact} aria-labelledby="context-compression-sediment-title">
|
|
337
|
+
<h3 id="context-compression-sediment-title" className={css.autoCompactTitle}>{t('sediment.title')}</h3>
|
|
338
|
+
<p className={css.customNote}>{t('sediment.description')}</p>
|
|
339
|
+
<label className={css.field}>
|
|
340
|
+
<span>{t('sediment.enabled')}</span>
|
|
341
|
+
<select
|
|
342
|
+
value={value ? 'on' : 'off'}
|
|
343
|
+
disabled={disabled}
|
|
344
|
+
onChange={(event) => { settle(() => save(event.currentTarget.value === 'on')) }}
|
|
345
|
+
>
|
|
346
|
+
<option value="on">{t('sediment.enabled.on')}</option>
|
|
347
|
+
<option value="off">{t('sediment.enabled.off')}</option>
|
|
348
|
+
</select>
|
|
349
|
+
</label>
|
|
350
|
+
</section>
|
|
351
|
+
)
|
|
352
|
+
}
|
|
@@ -31,6 +31,7 @@ export interface CompressionSelectorInjected {
|
|
|
31
31
|
resetPtcCustom: () => Promise<void>
|
|
32
32
|
saveAutoCompact: (thresholdPercent: number) => Promise<void>
|
|
33
33
|
saveCodeSkeleton: (enabled: boolean) => Promise<void>
|
|
34
|
+
saveSediment: (enabled: boolean) => Promise<void>
|
|
34
35
|
saveIntentSummary: (enabled: boolean) => Promise<void>
|
|
35
36
|
saveMonitorPanel: (enabled: boolean) => Promise<void>
|
|
36
37
|
/** Patch of `presetOptions` members; an explicit `undefined` clears that field. */
|
|
@@ -58,6 +59,7 @@ export {
|
|
|
58
59
|
CompressionProfileControls,
|
|
59
60
|
AutoCompactThresholdControls,
|
|
60
61
|
CodeSkeletonControls,
|
|
62
|
+
SedimentControls,
|
|
61
63
|
} from './CompressionProfileControls.tsx'
|
|
62
64
|
|
|
63
65
|
export {
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
decodeIntentSummarySettings,
|
|
10
10
|
decodeMonitorPanelSettings,
|
|
11
11
|
decodePresetOptionsSettings,
|
|
12
|
+
decodeSedimentSettings,
|
|
12
13
|
isCustomCompressionPolicy,
|
|
13
14
|
isPlainRecord,
|
|
14
15
|
type CompressionProfile,
|
|
@@ -28,7 +29,7 @@ import {
|
|
|
28
29
|
export function decodeSettings(value: unknown): ContextCompressionSettings | undefined {
|
|
29
30
|
if (!isPlainRecord(value)) return undefined
|
|
30
31
|
const keys = Object.keys(value)
|
|
31
|
-
if (keys.some(key => key !== 'profile' && key !== 'custom' && key !== 'ptcCustom' && key !== 'autoCompact' && key !== 'codeSkeleton' && key !== 'intentSummary' && key !== 'monitorPanel' && key !== 'presetOptions')) {
|
|
32
|
+
if (keys.some(key => key !== 'profile' && key !== 'custom' && key !== 'ptcCustom' && key !== 'autoCompact' && key !== 'codeSkeleton' && key !== 'intentSummary' && key !== 'monitorPanel' && key !== 'sediment' && key !== 'presetOptions')) {
|
|
32
33
|
return undefined
|
|
33
34
|
}
|
|
34
35
|
const profile = (value as { profile?: unknown }).profile
|
|
@@ -41,6 +42,7 @@ export function decodeSettings(value: unknown): ContextCompressionSettings | und
|
|
|
41
42
|
const codeSkeleton = decodeCodeSkeletonSettings((value as { codeSkeleton?: unknown }).codeSkeleton)
|
|
42
43
|
const intentSummary = decodeIntentSummarySettings((value as { intentSummary?: unknown }).intentSummary)
|
|
43
44
|
const monitorPanel = decodeMonitorPanelSettings((value as { monitorPanel?: unknown }).monitorPanel)
|
|
45
|
+
const sediment = decodeSedimentSettings((value as { sediment?: unknown }).sediment)
|
|
44
46
|
const presetOptions = decodePresetOptionsSettings((value as { presetOptions?: unknown }).presetOptions)
|
|
45
47
|
return typeof profile === 'string'
|
|
46
48
|
&& (COMPRESSION_PROFILES as readonly string[]).includes(profile)
|
|
@@ -50,6 +52,7 @@ export function decodeSettings(value: unknown): ContextCompressionSettings | und
|
|
|
50
52
|
&& codeSkeleton !== undefined
|
|
51
53
|
&& intentSummary !== undefined
|
|
52
54
|
&& monitorPanel !== undefined
|
|
55
|
+
&& sediment !== undefined
|
|
53
56
|
? {
|
|
54
57
|
profile: profile as CompressionProfile,
|
|
55
58
|
custom: canonicalizeCustomPolicy(custom),
|
|
@@ -58,6 +61,7 @@ export function decodeSettings(value: unknown): ContextCompressionSettings | und
|
|
|
58
61
|
codeSkeleton,
|
|
59
62
|
intentSummary,
|
|
60
63
|
...monitorPanel === undefined ? {} : { monitorPanel },
|
|
64
|
+
sediment,
|
|
61
65
|
...presetOptions === undefined ? {} : { presetOptions },
|
|
62
66
|
}
|
|
63
67
|
: undefined
|
|
@@ -333,6 +333,10 @@ let readMonitorPanelEnabled = (): boolean => monitorPanelEnabledCache
|
|
|
333
333
|
() => scope.set('codeSkeleton', { enabled }),
|
|
334
334
|
settings => settings.codeSkeleton.enabled === enabled,
|
|
335
335
|
),
|
|
336
|
+
saveSediment: enabled => writeAndConfirm(
|
|
337
|
+
() => scope.set('sediment', { enabled }),
|
|
338
|
+
settings => settings.sediment?.enabled === enabled,
|
|
339
|
+
),
|
|
336
340
|
saveIntentSummary: enabled => writeAndConfirm(
|
|
337
341
|
() => scope.set('intentSummary', { enabled }),
|
|
338
342
|
settings => settings.intentSummary.enabled === enabled,
|
|
@@ -66,6 +66,11 @@ export const de = {
|
|
|
66
66
|
'codeSkeleton.enabled': 'Code-Skelettkomprimierung',
|
|
67
67
|
'codeSkeleton.enabled.on': 'Ein',
|
|
68
68
|
'codeSkeleton.enabled.off': 'Aus (Standard)',
|
|
69
|
+
'sediment.title': 'Wendelsenkung (experimentell)',
|
|
70
|
+
'sediment.description': 'Wenn aktiv, ersetzt jeder abgeschlossene Turn sein Tool-Call-Fenster durch eine dauerhafte Sedimentkarte (Fehlerzeilen wörtlich + Dateilisten/Code-Skelette + Auslassungsstatistik), verkleinert das Fenstervolumen und verschiebt die offizielle Komprimierung. Hinweis: ersetzte Meldungen verschwinden aus der Transkript-Ansicht (Originale bleiben im Sitzungsprotokoll und sind über die Sequenznummern der Karte wiederholbar); gilt nur für neu beobachtete Sitzungen.',
|
|
71
|
+
'sediment.enabled': 'Wendelsenkung',
|
|
72
|
+
'sediment.enabled.on': 'Ein',
|
|
73
|
+
'sediment.enabled.off': 'Aus (Standard)',
|
|
69
74
|
'intentSummary.title': 'Abschluss-Zusammenfassung (Turn-Tail)',
|
|
70
75
|
'intentSummary.description': 'Aktiviert faltet der Turn-Abschluss den verbrauchten Zuwachs nach semantischen Rollen zu Intent-Zusammenfassungsblöcken: Lese-Tool-Ergebnisse werden zu Einzeilern mit Ziel/Umfang, die Schreibklasse behält Skelettköpfe plus wörtliche Fehlerzeilen; die Landung erfolgt in der nächsten Druckrunde über die gewöhnliche Falt-Pipeline. Zündet nur, wenn die Wachstumsschwelle passiert ist (live Oberfläche >45 % und >50K Token seit der letzten Faltung). Gilt für neue Sitzungen; die aktuelle lässt sich mit /ctx-summary off|on|status übersteuern.',
|
|
71
76
|
'intentSummary.enabled': 'Abschluss-Zusammenfassung',
|
|
@@ -97,6 +102,8 @@ export const de = {
|
|
|
97
102
|
'monitor.panel.stateOff': 'aus',
|
|
98
103
|
'monitor.panel.gateUnknown': 'noch nicht bewertet',
|
|
99
104
|
'monitor.panel.lastFold': 'Letzte Faltung',
|
|
105
|
+
'monitor.panel.sedimentCuts': 'Sediment-Schnitte',
|
|
106
|
+
'monitor.panel.sedimentConservative': 'Sediment: konservativer Modus (Netto-Spar-Rückkopplung)',
|
|
100
107
|
'monitor.panel.stale': 'Snapshot nicht erreichbar — letzte Daten',
|
|
101
108
|
'monitorPanel.title': 'Komprimierungs-Monitorpanel',
|
|
102
109
|
'monitorPanel.description': 'Aktiviert erscheint neben dem Eingabebereich eine ziehbare Schwebekugel — öffne sie, um den Live-Komprimierungszustand zu beobachten: Nettoeinsparung (exakte Basis), Cache-Trefferquote, Kostenschätzung, das Turn-Tail-Gate und letzte Ausgleiche. Das Panel kann den Intent-Zusammenfassungsschalter der aktuellen Sitzung temporär übersteuern. Statistiken werden in SQLite persistiert und überstehen Host-Neustarts.',
|
|
@@ -66,6 +66,11 @@ export const es = {
|
|
|
66
66
|
'codeSkeleton.enabled': 'Compresión de esqueleto del código',
|
|
67
67
|
'codeSkeleton.enabled.on': 'Activado',
|
|
68
68
|
'codeSkeleton.enabled.off': 'Desactivado (predeterminado)',
|
|
69
|
+
'sediment.title': 'Sedimentación de fin de turno (experimental)',
|
|
70
|
+
'sediment.description': 'Si se activa, cada turno completado sustituye su rango de llamadas a herramientas por una tarjeta de sedimentación persistente (líneas de error literales + listas de archivos/esqueletos de código + estadísticas de omisión), reduciendo la ventana y posponiendo la compactación oficial. Nota: los mensajes sustituidos salen de la vista del transcript (los originales quedan en el registro de sesión y se recuperan por los números de secuencia de la tarjeta); solo afecta a sesiones nuevas.',
|
|
71
|
+
'sediment.enabled': 'Sedimentación de fin de turno',
|
|
72
|
+
'sediment.enabled.on': 'Activado',
|
|
73
|
+
'sediment.enabled.off': 'Desactivado (predeterminado)',
|
|
69
74
|
'intentSummary.title': 'Resumen de intención al cierre del turno',
|
|
70
75
|
'intentSummary.description': 'Al activarlo, el postflight de cierre de turno pliega el incremento consumido en bloques de resumen de intención por rol semántico: los resultados de herramientas de lectura se convierten en registros de una línea con objetivo/escala y los de escritura conservan la cabecera de esqueleto más las líneas de error textuales; aterriza en la siguiente ronda de presión por el conducto de plegado normal. Solo se dispara si se supera la puerta de crecimiento (superficie activa >45 % y >50K tokens desde el último plegado). Aplica a sesiones nuevas; la actual se gobierna con /ctx-summary off|on|status.',
|
|
71
76
|
'intentSummary.enabled': 'Resumen de intención al cierre',
|
|
@@ -97,6 +102,8 @@ export const es = {
|
|
|
97
102
|
'monitor.panel.stateOff': 'no',
|
|
98
103
|
'monitor.panel.gateUnknown': 'aún sin evaluar',
|
|
99
104
|
'monitor.panel.lastFold': 'Último plegado',
|
|
105
|
+
'monitor.panel.sedimentCuts': 'Cortes de sedimento',
|
|
106
|
+
'monitor.panel.sedimentConservative': 'Sedimento: modo conservador (retroalimentación de ahorro neto)',
|
|
100
107
|
'monitor.panel.stale': 'Instantánea inalcanzable — se muestran los últimos datos',
|
|
101
108
|
'monitorPanel.title': 'Panel de monitor de compresión',
|
|
102
109
|
'monitorPanel.description': 'Al activarlo, junto al área de entrada aparece una burbuja flotante arrastrable — ábrela para observar el estado de compresión en vivo: ahorro neto (base exacta), tasa de acierto de caché, estimación de coste, la puerta de resumen de intención del turno y compensaciones recientes. El panel puede invalidar temporalmente el interruptor de resumen de intención de la sesión actual. Las estadísticas se persisten en SQLite y sobreviven al reinicio del host.',
|
|
@@ -66,6 +66,11 @@ export const fr = {
|
|
|
66
66
|
'codeSkeleton.enabled': 'Compression du code en squelette',
|
|
67
67
|
'codeSkeleton.enabled.on': 'Activé',
|
|
68
68
|
'codeSkeleton.enabled.off': 'Désactivé (par défaut)',
|
|
69
|
+
'sediment.title': 'Sédimentation de fin de tour (expérimental)',
|
|
70
|
+
'sediment.description': "Si activé, chaque tour terminé remplace sa plage d'appels d'outils par une carte de sédimentation durable (lignes d'erreur littérales + listes de fichiers/squelettes de code + statistiques d'omission), réduisant la fenêtre et repoussant la compaction officielle. Note : les messages remplacés quittent la vue du transcript (les originaux restent dans le journal de session et sont récupérables via les numéros de séquence de la carte) ; ne s'applique qu'aux nouvelles sessions.",
|
|
71
|
+
'sediment.enabled': 'Sédimentation de fin de tour',
|
|
72
|
+
'sediment.enabled.on': 'Activé',
|
|
73
|
+
'sediment.enabled.off': 'Désactivé (par défaut)',
|
|
69
74
|
'intentSummary.title': 'Résumé d\'intention en fin de tour',
|
|
70
75
|
'intentSummary.description': 'Activé, le postflight de fin de tour plie l\'incrément consommé en blocs de résumé d\'intention par rôle sémantique : les résultats d\'outils de lecture deviennent des enregistrements une-ligne objectif/échelle, les écrits gardent la tête de squelette plus les lignes d\'erreur verbatim ; l\'atterrissage se fait au prochain tour de pression via le pipeline de pliage habituel. Ne se déclenche que si la porte de croissance passe (surface active >45 % et >50K tokens depuis le dernier pliage). S\'applique aux nouvelles sessions ; la session courante se pilote avec /ctx-summary off|on|status.',
|
|
71
76
|
'intentSummary.enabled': 'Résumé d\'intention en fin de tour',
|
|
@@ -97,6 +102,8 @@ export const fr = {
|
|
|
97
102
|
'monitor.panel.stateOff': 'désactivé',
|
|
98
103
|
'monitor.panel.gateUnknown': 'pas encore évalué',
|
|
99
104
|
'monitor.panel.lastFold': 'Dernier pliage',
|
|
105
|
+
'monitor.panel.sedimentCuts': 'Coupes de sédimentation',
|
|
106
|
+
'monitor.panel.sedimentConservative': 'Sédimentation : mode conservateur (rétroaction sur économie nette)',
|
|
100
107
|
'monitor.panel.stale': 'Instantané injoignable — dernières données',
|
|
101
108
|
'monitorPanel.title': 'Panneau de monitorage de compression',
|
|
102
109
|
'monitorPanel.description': 'Activé, une bulle flottante déplaçable apparaît près de la zone de saisie — ouvrez-la pour observer l\'état de compression en direct : économie nette (base exacte), taux de réussite du cache, estimation de coût, la porte de résumé d\'intention du tour et les compensations récentes. Le panneau peut contourner temporairement l\'interrupteur de résumé d\'intention de la session courante. Les statistiques sont persistées en SQLite et survivent au redémarrage de l\'hôte.',
|
|
@@ -66,6 +66,11 @@ export const it = {
|
|
|
66
66
|
'codeSkeleton.enabled': 'Compressione a scheletro del codice',
|
|
67
67
|
'codeSkeleton.enabled.on': 'Attivato',
|
|
68
68
|
'codeSkeleton.enabled.off': 'Disattivato (predefinito)',
|
|
69
|
+
'sediment.title': 'Sedimentazione di fine turno (sperimentale)',
|
|
70
|
+
'sediment.description': 'Se attiva, ogni turno completato sostituisce il suo intervallo di chiamate tool con una carta di sedimentazione durevole (righe di errore letterali + elenchi file/scheletri di codice + statistiche di omissione), riducendo la finestra e rinviando la compattazione ufficiale. Nota: i messaggi sostituiti escono dalla vista del transcript (gli originali restano nel log di sessione e sono recuperabili tramite i numeri di sequenza della carta); vale solo per le nuove sessioni.',
|
|
71
|
+
'sediment.enabled': 'Sedimentazione di fine turno',
|
|
72
|
+
'sediment.enabled.on': 'Attiva',
|
|
73
|
+
'sediment.enabled.off': 'Disattiva (predefinito)',
|
|
69
74
|
'intentSummary.title': 'Riepilogo di intento a fine turno',
|
|
70
75
|
'intentSummary.description': 'Quando attivo, il postflight di fine turno piega l\'incremento consumato in blocchi di riepilogo di intento per ruolo semantico: i risultati degli strumenti di lettura diventano record a riga singola obiettivo/scala, quelli di scrittura mantengono la testa dello scheletro più le righe di errore testuali; atterra al prossimo round di pressione tramite la pipeline di piegatura ordinaria. Si attiva solo se la soglia di crescita passa (superficie attiva >45% e >50K token dall\'ultima piegatura). Vale per le nuove sessioni; quella corrente si governa con /ctx-summary off|on|status.',
|
|
71
76
|
'intentSummary.enabled': 'Riepilogo di intento a fine turno',
|
|
@@ -97,6 +102,8 @@ export const it = {
|
|
|
97
102
|
'monitor.panel.stateOff': 'off',
|
|
98
103
|
'monitor.panel.gateUnknown': 'non ancora valutato',
|
|
99
104
|
'monitor.panel.lastFold': 'Ultima piegatura',
|
|
105
|
+
'monitor.panel.sedimentCuts': 'Tagli di sedimentazione',
|
|
106
|
+
'monitor.panel.sedimentConservative': 'Sedimentazione: modalità conservativa (feedback su risparmio netto)',
|
|
100
107
|
'monitor.panel.stale': 'Snapshot non raggiungibile — ultimi dati',
|
|
101
108
|
'monitorPanel.title': 'Pannello di monitoraggio compressione',
|
|
102
109
|
'monitorPanel.description': 'Quando attivo, accanto all\'area di input appare una bolla flottante trascinabile — aprila per osservare lo stato di compressione in tempo reale: risparmio netto (base esatta), tasso di hit della cache, stima dei costi, la soglia del riepilogo di intento del turno e le compensazioni recenti. Il pannello può ignorare temporaneamente l\'interruttore del riepilogo di intento della sessione corrente. Le statistiche sono persistite in SQLite e sopravvivono al riavvio dell\'host.',
|
|
@@ -66,6 +66,11 @@ export const ja = {
|
|
|
66
66
|
'codeSkeleton.enabled': 'コードスケルトン圧縮',
|
|
67
67
|
'codeSkeleton.enabled.on': 'オン',
|
|
68
68
|
'codeSkeleton.enabled.off': 'オフ(既定)',
|
|
69
|
+
'sediment.title': 'ターン末尾沈降(実験的)',
|
|
70
|
+
'sediment.description': '有効にすると、正常終了した各ターンでそのツール呼び出し区間が永続的な沈降カード(エラー原文の逐語引用 + ファイル一覧/コードスケルトン + 省略統計)に置き換わり、ウィンドウ占有を抑え公式圧縮を遅らせます。注意:置き換えられた元メッセージは会話ビューから消えます(原文はセッションログに残り、カード内の番号でリトリーバルツールにより復元可能)。新規セッションのみに適用。',
|
|
71
|
+
'sediment.enabled': 'ターン末尾沈降',
|
|
72
|
+
'sediment.enabled.on': 'オン',
|
|
73
|
+
'sediment.enabled.off': 'オフ(デフォルト)',
|
|
69
74
|
'intentSummary.title': 'ターン末尾インテント要約',
|
|
70
75
|
'intentSummary.description': '有効にすると、ターン境界のポストフライトが消費済み増分を意味役割ごとにインテント要約ブロックへ折り畳みます。読み系ツール結果は目標/規模の 1 行レコードに、書き系は骨格ヘッダーと逐語エラー行を保持し、次の圧力ラウンドで通常の折り畳みパイプラインを通じて着地します。成長ゲート(ライブ表面 >45%、前回の折り畳みから >50K トークン増)を通過したときだけ発火します。変更は新セッションに適用され、現セッションは /ctx-summary off|on|status で上書きできます。',
|
|
71
76
|
'intentSummary.enabled': 'ターン末尾インテント要約',
|
|
@@ -97,6 +102,8 @@ export const ja = {
|
|
|
97
102
|
'monitor.panel.stateOff': 'オフ',
|
|
98
103
|
'monitor.panel.gateUnknown': '未評価',
|
|
99
104
|
'monitor.panel.lastFold': '最後の折り畳み',
|
|
105
|
+
'monitor.panel.sedimentCuts': '沈降カット数',
|
|
106
|
+
'monitor.panel.sedimentConservative': '沈降:保守モード(正味節約の負帰還)',
|
|
100
107
|
'monitor.panel.stale': 'スナップショット到達不能——前回データを表示',
|
|
101
108
|
'monitorPanel.title': '圧縮モニター パネル',
|
|
102
109
|
'monitorPanel.description': '有効にすると、入力欄のそばにドラッグできるフローティング バブルが現れます。開くとライブの圧縮状態を監視できます。正味節約(正確 basis)、キャッシュ ヒット率、コスト概算、ターン末尾インテント要約ゲート、最近の相殺。パネルから現セッションのインテント要約スイッチを一時的に上書きできます。統計は SQLite に永続化され、ホスト再起動後も保持されます。',
|
|
@@ -66,6 +66,11 @@ export const ko = {
|
|
|
66
66
|
'codeSkeleton.enabled': '코드 스켈레톤 압축',
|
|
67
67
|
'codeSkeleton.enabled.on': '켬',
|
|
68
68
|
'codeSkeleton.enabled.off': '끔(기본값)',
|
|
69
|
+
'sediment.title': '턴 끝 침전(실험)',
|
|
70
|
+
'sediment.description': '켜면 완료된 각 턴에서 도구 호출 구간이 영구 침전 카드(오류 원문 그대로 + 파일 목록/코드 골격 + 생략 통계)로 교체되어 창 사용을 줄이고 공식 압축을 미룹니다. 주의: 교체된 원본 메시지는 대화 뷰에서 사라집니다(원문은 세션 로그에 남으며 카드의 순번으로 리트리브 도구로 복원 가능). 새로 관찰되는 세션에만 적용됩니다.',
|
|
71
|
+
'sediment.enabled': '턴 끝 침전',
|
|
72
|
+
'sediment.enabled.on': '켜기',
|
|
73
|
+
'sediment.enabled.off': '끄기(기본)',
|
|
69
74
|
'intentSummary.title': '턴 말머리 인텐트 요약',
|
|
70
75
|
'intentSummary.description': '켜면 턴 경계 포스트플라이트가 소비된 증분을 의미 역할별 인텐트 요약 블록으로 접습니다. 읽기 도구 결과는 목표/규모 한 줄 레코드가 되고 쓰기는 골격 헤더와 원문 오류 줄을 유지하며, 다음 압력 라운드에서 기존 접기 파이프라인을 통해 착지합니다. 성장 게이트(라이브 표면 >45%, 마지막 접기 이후 >50K 토큰 증가)를 통과할 때만 발동합니다. 새 세션에 적용되며, 현재 세션은 /ctx-summary off|on|status 로 임시 전환할 수 있습니다.',
|
|
71
76
|
'intentSummary.enabled': '턴 말머리 인텐트 요약',
|
|
@@ -97,6 +102,8 @@ export const ko = {
|
|
|
97
102
|
'monitor.panel.stateOff': '끔',
|
|
98
103
|
'monitor.panel.gateUnknown': '아직 평가 안 됨',
|
|
99
104
|
'monitor.panel.lastFold': '마지막 접기',
|
|
105
|
+
'monitor.panel.sedimentCuts': '침전 컷 수',
|
|
106
|
+
'monitor.panel.sedimentConservative': '침전: 보수 모드(순 절약 피드백)',
|
|
100
107
|
'monitor.panel.stale': '스냅샷 도달 불가——이전 데이터 표시',
|
|
101
108
|
'monitorPanel.title': '압축 모니터 패널',
|
|
102
109
|
'monitorPanel.description': '켜면 입력 영역 옆에 드래그 가능한 플로팅 버블이 나타납니다. 열면 라이브 압축 상태를 볼 수 있습니다. 순 절감(정확 기준), 캐시 적중률, 비용 추정, 턴 말머리 인텐트 요약 게이트, 최근 상쇄. 패널에서 현재 세션의 인텐트 요약 스위치를 임시로 전환할 수 있습니다. 통계는 SQLite에 영속화되어 호스트 재시작 후에도 유지됩니다.',
|
|
@@ -66,6 +66,11 @@ export const ru = {
|
|
|
66
66
|
'codeSkeleton.enabled': 'Скелетное сжатие кода',
|
|
67
67
|
'codeSkeleton.enabled.on': 'Вкл',
|
|
68
68
|
'codeSkeleton.enabled.off': 'Выкл (по умолчанию)',
|
|
69
|
+
'sediment.title': 'Оседание конца хода (экспериментально)',
|
|
70
|
+
'sediment.description': 'Если включено, каждый завершённый ход заменяет свой интервал вызовов инструментов устойчивой карточкой оседания (дословные строки ошибок + списки файлов/скелеты кода + статистика пропусков), уменьшая окно и откладывая официальную компактацию. Примечание: заменённые сообщения исчезают из представления транскрипта (оригиналы остаются в журнале сессии и восстанавливаются по номерам последовательности карточки); действует только на новые сессии.',
|
|
71
|
+
'sediment.enabled': 'Оседание конца хода',
|
|
72
|
+
'sediment.enabled.on': 'Вкл',
|
|
73
|
+
'sediment.enabled.off': 'Выкл (по умолчанию)',
|
|
69
74
|
'intentSummary.title': 'Итог намерения в конце хода',
|
|
70
75
|
'intentSummary.description': 'При включении постфлайт на границе хода сворачивает потреблённый прирост в блоки итогов намерения по семантическим ролям: результаты читающих инструментов становятся однострочными записями цель/масштаб, пишущие сохраняют заголовок скелета и дословные строки ошибок; приземляется в следующем раунде давления через обычный конвейер свёртки. Срабатывает только при прохождении шлюза роста (активная поверхность >45% и >50K токенов с последней свёртки). Действует на новые сессии; текущую можно переключить командой /ctx-summary off|on|status.',
|
|
71
76
|
'intentSummary.enabled': 'Итог намерения в конце хода',
|
|
@@ -97,6 +102,8 @@ export const ru = {
|
|
|
97
102
|
'monitor.panel.stateOff': 'выкл',
|
|
98
103
|
'monitor.panel.gateUnknown': 'ещё не оценено',
|
|
99
104
|
'monitor.panel.lastFold': 'Последняя свёртка',
|
|
105
|
+
'monitor.panel.sedimentCuts': 'Осадочных вырезов',
|
|
106
|
+
'monitor.panel.sedimentConservative': 'Оседание: консервативный режим (обратная связь по чистой экономии)',
|
|
100
107
|
'monitor.panel.stale': 'Снимок недоступен — показаны последние данные',
|
|
101
108
|
'monitorPanel.title': 'Панель мониторинга сжатия',
|
|
102
109
|
'monitorPanel.description': 'При включении рядом с областью ввода появляется перетаскиваемый плавающий шарик — откройте его, чтобы следить за состоянием сжатия в реальном времени: чистая экономия (точная база), процент попаданий кэша, оценка стоимости, шлюз итогов намерения хода и последние компенсации. Панель может временно переключить тумблер итогов намерения текущей сессии. Статистика персистентна в SQLite и переживает перезапуск хоста.',
|
|
@@ -64,6 +64,11 @@ export const zh = {
|
|
|
64
64
|
'codeSkeleton.enabled': '代码骨架压缩',
|
|
65
65
|
'codeSkeleton.enabled.on': '开',
|
|
66
66
|
'codeSkeleton.enabled.off': '关(默认)',
|
|
67
|
+
'sediment.title': '轮尾沉降(实验)',
|
|
68
|
+
'sediment.description': '开启后,每个正常收尾的回合结束时,该轮的工具调用区间会被一张沉降卡(错误原文逐字摘录 + 文件清单/代码骨架 + 省略统计)持久替换,压低窗口占用、推迟官方大压缩。注意:被替换的原消息将从对话视图撤出(原文仍在会话日志,可按卡片里的序号用回捞工具找回);仅对新观察会话生效。',
|
|
69
|
+
'sediment.enabled': '轮尾沉降',
|
|
70
|
+
'sediment.enabled.on': '开',
|
|
71
|
+
'sediment.enabled.off': '关(默认)',
|
|
67
72
|
'intentSummary.title': '回合末意图摘要(转向尾部压缩)',
|
|
68
73
|
'intentSummary.description': '开启后,回合收尾阶段把本次消费的增量按语义角色折叠为意图摘要块:读类工具结果压成单行目标/规模记录,写类保留骨架头与逐字错误行,于下一次压力回合经既有折叠管线落地;仅当增长门控通过(活跃表面 >45% 且距上次折叠增长 >50K token)才触发。修改只影响新会话;当前会话可用 /ctx-summary off|on|status 临时覆盖。',
|
|
69
74
|
'intentSummary.enabled': '回合末意图摘要',
|
|
@@ -95,6 +100,8 @@ export const zh = {
|
|
|
95
100
|
'monitor.panel.stateOff': '关',
|
|
96
101
|
'monitor.panel.gateUnknown': '未评估',
|
|
97
102
|
'monitor.panel.lastFold': '最近折叠',
|
|
103
|
+
'monitor.panel.sedimentCuts': '沉降刀数',
|
|
104
|
+
'monitor.panel.sedimentConservative': '沉降:保守模式(净节省负反馈)',
|
|
98
105
|
'monitor.panel.stale': '快照不可达——显示上次数据',
|
|
99
106
|
'monitorPanel.title': '压缩监控悬浮面板',
|
|
100
107
|
'monitorPanel.description': '开启后,输入区旁出现可拖拽的悬浮球,点开即监控当前压缩状态:净节省(精确口径)、缓存命中率、成本估算、回合末意图摘要门控与最近抵消;面板内可临时覆盖当前会话的意图摘要开关。统计经 SQLite 持久化,跨宿主重启保留。',
|
|
@@ -227,6 +234,11 @@ export const en = {
|
|
|
227
234
|
'codeSkeleton.enabled': 'Code skeleton compression',
|
|
228
235
|
'codeSkeleton.enabled.on': 'On',
|
|
229
236
|
'codeSkeleton.enabled.off': 'Off (default)',
|
|
237
|
+
'sediment.title': 'Turn-tail sedimentation (experimental)',
|
|
238
|
+
'sediment.description': 'When on, each completed turn replaces its tool-call span with one durable sediment card (verbatim error lines + file manifests / code skeletons + omission stats), shrinking the live window and deferring the official compaction. Note: replaced messages leave the transcript view (originals stay in the session log and can be retrieved by the card\'s sequence numbers); applies to newly observed sessions only.',
|
|
239
|
+
'sediment.enabled': 'Turn-tail sedimentation',
|
|
240
|
+
'sediment.enabled.on': 'On',
|
|
241
|
+
'sediment.enabled.off': 'Off (default)',
|
|
230
242
|
'intentSummary.title': 'Turn-tail intent summary',
|
|
231
243
|
'intentSummary.description': 'When on, the turn-boundary postflight folds the consumed increment into intent-summary blocks by semantic role: read-class tool results become one-line target/scale records and write-class keep skeleton heads plus verbatim error lines, landing on the next pressure round through the ordinary fold pipeline. Only fires when the growth gate passes (live surface >45% and >50K tokens grown since the last fold). Applies to new sessions; override the current one with /ctx-summary off|on|status.',
|
|
232
244
|
'intentSummary.enabled': 'Turn-tail intent summary',
|
|
@@ -258,6 +270,8 @@ export const en = {
|
|
|
258
270
|
'monitor.panel.stateOff': 'off',
|
|
259
271
|
'monitor.panel.gateUnknown': 'not evaluated yet',
|
|
260
272
|
'monitor.panel.lastFold': 'Last fold',
|
|
273
|
+
'monitor.panel.sedimentCuts': 'Sediment cuts',
|
|
274
|
+
'monitor.panel.sedimentConservative': 'Sediment: conservative mode (net-savings feedback)',
|
|
261
275
|
'monitor.panel.stale': 'Snapshot unreachable — showing last data',
|
|
262
276
|
'monitorPanel.title': 'Compression monitor panel',
|
|
263
277
|
'monitorPanel.description': 'When on, a draggable floating bubble appears next to the input area — open it to watch live compression state: net savings (exact basis), cache hit rate, cost estimate, the turn-tail intent-summary gate and recent offsets. The panel can temporarily override the current session\'s intent-summary switch. Stats persist in SQLite and survive host restarts.',
|