dsh-boost 0.0.0-stage → 0.1.0
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/LICENSE +202 -0
- package/NOTICE +29 -0
- package/README.en.md +476 -0
- package/README.md +408 -2
- package/cordis.patch.yml +40 -0
- package/dist/admission/fixed-cost.d.ts +23 -0
- package/dist/admission/fixed-cost.js +61 -0
- package/dist/admission/fixed-cost.js.map +1 -0
- package/dist/admission/ledger.d.ts +113 -0
- package/dist/admission/ledger.js +176 -0
- package/dist/admission/ledger.js.map +1 -0
- package/dist/admission/retrieval.d.ts +65 -0
- package/dist/admission/retrieval.js +162 -0
- package/dist/admission/retrieval.js.map +1 -0
- package/dist/admission/usage.d.ts +75 -0
- package/dist/admission/usage.js +124 -0
- package/dist/admission/usage.js.map +1 -0
- package/dist/config.d.ts +43 -0
- package/dist/config.js +103 -0
- package/dist/config.js.map +1 -0
- package/dist/gate/binding.d.ts +113 -0
- package/dist/gate/binding.js +297 -0
- package/dist/gate/binding.js.map +1 -0
- package/dist/gate/decide.d.ts +82 -0
- package/dist/gate/decide.js +163 -0
- package/dist/gate/decide.js.map +1 -0
- package/dist/gate/guard.d.ts +69 -0
- package/dist/gate/guard.js +195 -0
- package/dist/gate/guard.js.map +1 -0
- package/dist/gate/invalidate.d.ts +112 -0
- package/dist/gate/invalidate.js +111 -0
- package/dist/gate/invalidate.js.map +1 -0
- package/dist/gate/plan.d.ts +86 -0
- package/dist/gate/plan.js +222 -0
- package/dist/gate/plan.js.map +1 -0
- package/dist/hooks/clock.d.ts +68 -0
- package/dist/hooks/clock.js +82 -0
- package/dist/hooks/clock.js.map +1 -0
- package/dist/hooks/execute.d.ts +79 -0
- package/dist/hooks/execute.js +128 -0
- package/dist/hooks/execute.js.map +1 -0
- package/dist/hooks/llm-stream.d.ts +276 -0
- package/dist/hooks/llm-stream.js +1008 -0
- package/dist/hooks/llm-stream.js.map +1 -0
- package/dist/hooks/pending.d.ts +89 -0
- package/dist/hooks/pending.js +115 -0
- package/dist/hooks/pending.js.map +1 -0
- package/dist/hooks/post-execute.d.ts +247 -0
- package/dist/hooks/post-execute.js +1776 -0
- package/dist/hooks/post-execute.js.map +1 -0
- package/dist/hooks/session-state.d.ts +158 -0
- package/dist/hooks/session-state.js +168 -0
- package/dist/hooks/session-state.js.map +1 -0
- package/dist/hooks/synthesize.d.ts +74 -0
- package/dist/hooks/synthesize.js +100 -0
- package/dist/hooks/synthesize.js.map +1 -0
- package/dist/host/loader.d.ts +23 -0
- package/dist/host/loader.js +31 -0
- package/dist/host/loader.js.map +1 -0
- package/dist/host/platform.d.ts +18 -0
- package/dist/host/platform.js +19 -0
- package/dist/host/platform.js.map +1 -0
- package/dist/host/root.d.ts +18 -0
- package/dist/host/root.js +43 -0
- package/dist/host/root.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +866 -0
- package/dist/index.js.map +1 -0
- package/dist/projection/apply.d.ts +174 -0
- package/dist/projection/apply.js +137 -0
- package/dist/projection/apply.js.map +1 -0
- package/dist/projection/canonicalise.d.ts +43 -0
- package/dist/projection/canonicalise.js +43 -0
- package/dist/projection/canonicalise.js.map +1 -0
- package/dist/projection/counters.d.ts +65 -0
- package/dist/projection/counters.js +88 -0
- package/dist/projection/counters.js.map +1 -0
- package/dist/projection/truncate.d.ts +47 -0
- package/dist/projection/truncate.js +57 -0
- package/dist/projection/truncate.js.map +1 -0
- package/dist/prompt/protocol.d.ts +45 -0
- package/dist/prompt/protocol.js +56 -0
- package/dist/prompt/protocol.js.map +1 -0
- package/dist/receipts/store.d.ts +198 -0
- package/dist/receipts/store.js +734 -0
- package/dist/receipts/store.js.map +1 -0
- package/dist/scope/doc.d.ts +117 -0
- package/dist/scope/doc.js +158 -0
- package/dist/scope/doc.js.map +1 -0
- package/dist/scope/resolve.d.ts +91 -0
- package/dist/scope/resolve.js +146 -0
- package/dist/scope/resolve.js.map +1 -0
- package/dist/scope/store.d.ts +135 -0
- package/dist/scope/store.js +573 -0
- package/dist/scope/store.js.map +1 -0
- package/dist/selector/jev.d.ts +93 -0
- package/dist/selector/jev.js +171 -0
- package/dist/selector/jev.js.map +1 -0
- package/dist/tools/boost.d.ts +367 -0
- package/dist/tools/boost.js +768 -0
- package/dist/tools/boost.js.map +1 -0
- package/dist/tools/family.d.ts +26 -0
- package/dist/tools/family.js +26 -0
- package/dist/tools/family.js.map +1 -0
- package/dist/types.d.ts +113 -0
- package/dist/types.js +21 -0
- package/dist/types.js.map +1 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +75 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boost.js","sourceRoot":"","sources":["../../src/tools/boost.ts"],"names":[],"mappings":"AA2DA,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AAEjE,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAEjD,OAAO,EACL,iBAAiB,EACjB,wBAAwB,EACxB,gBAAgB,EAChB,sBAAsB,EACtB,qBAAqB,EACrB,2BAA2B,EAC3B,yBAAyB,GAC1B,MAAM,iBAAiB,CAAA;AAKxB,2EAA2E;AAC3E,MAAM,qBAAqB,GAAG,uBAAuB,CAAA;AAErD,yFAAyF;AACzF,MAAM,sBAAsB,GAAG,wBAAwB,CAAA;AAEvD,wEAAwE;AACxE,MAAM,sBAAsB,GAAG,wBAAwB,CAAA;AAEvD,sFAAsF;AACtF,MAAM,kBAAkB,GAAG,oBAAoB,CAAA;AAE/C,iFAAiF;AACjF,MAAM,WAAW,GAAwB,IAAI,GAAG,CAAC;IAC/C,yBAAyB;IACzB,wBAAwB;IACxB,sBAAsB;IACtB,qBAAqB;IACrB,2BAA2B;IAC3B,gBAAgB;IAChB,iBAAiB;CAClB,CAAC,CAAA;AAEF,kFAAkF;AAClF,MAAM,iBAAiB,GAAG,mBAAmB,CAAA;AAC7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WAAW,EAAE,CAAC,CAAA;AACvE,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,SAAS,CAAC,IAAe;IAUvC,OAAO;QACL,IAAI,EAAE,OAAO;QACb,WAAW,EAAE,WAAW;QACxB,UAAU,EAAE,UAAU;QACtB,MAAM,EAAE,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,YAAY,EAAE;QACvD,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,IAAiB,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;KAChG,CAAA;AACH,CAAC","sourcesContent":["/**\n * The `boost` control tool: the user's only way to see or change what the\n * plugin is doing.\n *\n * The plugin itself is invisible — it rewrites what the model sees and never\n * speaks — so this tool's output is part of the product, not a debugging aid.\n * `status` reports what the plugin has actually recorded: the scope document's\n * exposure surface, both switches (`shadow` and `projection`; \"recording but\n * not replacing\" is not \"replacing\"), per-code receipt counts over **every**\n * shard, the substitution and projection ledgers, and the stable degraded\n * codes observed. `scope-get` reads `scope.json`; `scope-set` and `shadow`\n * write it; both writes are compare-and-swap through `ScopeStore.write`, so a\n * stale caller gets `ERR_SCOPE_REVISION_CONFLICT` rather than silently\n * overwriting a concurrent change.\n *\n * ## Contracts this module keeps\n *\n * - Every failure is a stable code in a returned value; nothing throws out of\n * `runBoost`. The store's own codes are passed through unchanged.\n * - `scope-set` never lets a caller set `version` or `revision`: `revision` is\n * the store's, `version` is fixed at 2, and a body carrying either reserved\n * field is rejected **before** the mutation runs. The store persists whatever\n * `mutate` returns, so this rejection is what stops a v1-shaped document.\n * - Both ledger sides come from the receipts. This module never estimates a\n * retrieval cost: an unpriced retrieval makes the net `'unknown'` rather\n * than free, and `projection_unpriced_retrievals` says how many there were.\n * A retrieval's own projection is excluded from gross because its visible\n * window is already charged as retrieval content. The projection saving is\n * read from `saved_projection_tokens` (the design §5.3 name T23b/T26 write),\n * falling back to `saved`; a producer must write one of them, while a\n * meterless projection has neither and makes gross/net `'unknown'`. The\n * substitution saving is read only from the settled line, because the\n * synth-time line predates any measurement.\n * - `status.degraded` is a list of **stable codes only** (`ERR_HOST_*` /\n * `ERR_SCOPE_*`). The scope store's internal `scope-degraded` label and the\n * receipt stream's `projection-skipped:*` are inputs, not output: a receipt\n * code is mapped to `ERR_HOST_NO_SPILL` (no spill backend) or\n * `ERR_HOST_NO_SPILL_NOTICE` (backend present, notice module cannot render\n * the footer), and a degraded scope read passes its `ERR_SCOPE_*` code\n * through. The two estimator absences are separate codes:\n * `ERR_HOST_NO_TOKENMETER` is the host service probe (`apply` records whether\n * the synchronous token meter exists), while `ERR_HOST_NO_ESTIMATOR` is the\n * pure fixed-cost package being unreachable. One can exist without the other,\n * and merging them sent the operator to the wrong host.\n * `ERR_HOST_PLATFORM_UNSUPPORTED` is `isPosixOnly()` being false.\n * - The fixed overhead is measured **once at startup**\n * (`measureBoostFixedOverhead`: protocol section + tool schema) and awaited\n * by `status`; it is never on a request path (design §6.1).\n * - `runBoost` is pure orchestration over the two stores plus the host facts\n * `apply` hands it: no `ctx`, no host calls beyond the one measurement. The\n * tool definition is therefore testable without a host, and the host probe\n * lives in `src/index.ts`.\n *\n * The command table is deliberately a plain record, one handler per\n * subcommand, so an unknown `cmd` is a lookup miss rather than a fallthrough.\n *\n * @module dsh-boost/tools/boost\n */\nimport type { JsonSchemaNode } from '@deepseek-ai/dsh-tools'\nimport { measureFixedOverhead } from '../admission/fixed-cost.js'\nimport type { FixedOverheadMeasurement } from '../admission/fixed-cost.js'\nimport { DEFAULT_CONFIG } from '../config.js'\nimport { isPosixOnly } from '../host/platform.js'\nimport type { ProjectionMode } from '../projection/apply.js'\nimport {\n ERR_SCOPE_ABORTED,\n ERR_SCOPE_FUTURE_VERSION,\n ERR_SCOPE_LOCKED,\n ERR_SCOPE_PARSE_FAILED,\n ERR_SCOPE_READ_FAILED,\n ERR_SCOPE_REVISION_CONFLICT,\n ERR_SCOPE_UNKNOWN_VERSION,\n} from '../scope/doc.js'\nimport type { ScopeCode, ScopeDoc } from '../scope/doc.js'\nimport type { ScopeStore } from '../scope/store.js'\nimport type { Receipt, ReceiptStore } from '../receipts/store.js'\n\n/** Stable failure code: `cmd` names no subcommand this tool implements. */\nconst ERR_BOOST_UNKNOWN_CMD = 'ERR_BOOST_UNKNOWN_CMD'\n\n/** Stable failure code: a required argument (`baseRevision`) is missing or malformed. */\nconst ERR_BOOST_INVALID_ARGS = 'ERR_BOOST_INVALID_ARGS'\n\n/** Stable failure code: `body` is not a valid, writable scope patch. */\nconst ERR_BOOST_INVALID_BODY = 'ERR_BOOST_INVALID_BODY'\n\n/** Stable failure code: an unexpected internal failure, so the tool still answers. */\nconst ERR_BOOST_INTERNAL = 'ERR_BOOST_INTERNAL'\n\n/** Every scope failure code, for passing the store's codes through unchanged. */\nconst SCOPE_CODES: ReadonlySet<string> = new Set([\n ERR_SCOPE_UNKNOWN_VERSION,\n ERR_SCOPE_FUTURE_VERSION,\n ERR_SCOPE_PARSE_FAILED,\n ERR_SCOPE_READ_FAILED,\n ERR_SCOPE_REVISION_CONFLICT,\n ERR_SCOPE_LOCKED,\n ERR_SCOPE_ABORTED,\n])\n\n/** Stable host degradation codes (design §9; the frozen set `status` reports). */\nconst ERR_HOST_NO_SPILL = 'ERR_HOST_NO_SPILL'\n/**\n * Stable degradation code: the host spill-notice module has no footer renderer.\n *\n * Apply-mode projection cannot compose its footer without `formatSpillNotice`,\n * so every receipt is left intact and recorded as\n * `projection-skipped:no-footer`. That is a host-level absence, not an ordinary\n * \"not worth it\" skip: without this code `status` reported a healthy spill path\n * while projection silently never ran. Its producer is the receipt stream\n * (there is no service probe — the module is reached by `import()` only).\n */\nconst ERR_HOST_NO_SPILL_NOTICE = 'ERR_HOST_NO_SPILL_NOTICE'\nconst ERR_HOST_NO_TOKENMETER = 'ERR_HOST_NO_TOKENMETER'\nconst ERR_HOST_NO_ESTIMATOR = 'ERR_HOST_NO_ESTIMATOR'\nconst ERR_HOST_PLATFORM_UNSUPPORTED = 'ERR_HOST_PLATFORM_UNSUPPORTED'\nconst ERR_HOST_NO_WORKSPACE_REGISTRY = 'ERR_HOST_NO_WORKSPACE_REGISTRY'\n\n/**\n * Stable degradation code: at least one receipt shard could not be read.\n *\n * `status` scans every shard; a single unreadable file (EACCES, or a directory\n * named `x.jsonl`) must leave the healthy shards readable and the tool\n * answering. `ReceiptStore.readErrors()` is the one live source: the store\n * contains the failure per shard and the count describes its last whole-store\n * scan, so repairing the shard and re-running `status` drops the code.\n */\nconst ERR_RECEIPTS_UNREADABLE = 'ERR_RECEIPTS_UNREADABLE'\n\n/**\n * Stable degradation code: the whole-store scan hit the 256-shard cap.\n *\n * The totals then cover only the first 256 sorted shards: under-counting is\n * the safe direction, but presenting that as a total is not. The code marks\n * the figures as a lower bound; `ReceiptStore.scanTruncated()` is its source.\n */\nconst ERR_RECEIPTS_TRUNCATED = 'ERR_RECEIPTS_TRUNCATED'\n\n/**\n * Stable degradation code: the final system prompt did not carry the protocol\n * section because a `complete: true` section replaced the assembly.\n *\n * Detected on the outgoing request (`llm/stream`), not at assembly time: the\n * host restores the complete section after the waterfall, so only the request\n * shows the loss. Substitution is refused for the affected request because the\n * model was never taught the plan grammar (review row 12).\n */\nconst ERR_HOST_COMPLETE_SECTION = 'ERR_HOST_COMPLETE_SECTION'\n\n/**\n * Receipt codes that mean the host is degraded, mapped to the stable code\n * `status` reports.\n *\n * `projection-skipped:no-spill` is the code the projection path records when\n * the spill backend is absent (design §5.4), so it is the real producer behind\n * `ERR_HOST_NO_SPILL`. The same code is also derived from the host probe when\n * `projection: 'on'`; the two channels are deduplicated, not mutually exclusive.\n *\n * `projection-skipped:no-footer` is a different absence with a different fix:\n * the spill backend exists but the host spill-notice module does not render a\n * footer, so `projectApply` refuses to replace anything. Mapping it to\n * `ERR_HOST_NO_SPILL_NOTICE` is what keeps the plugin's headline feature from\n * being silently off while `status` calls the spill path healthy.\n */\nconst RECEIPT_DEGRADATION: ReadonlyArray<{ readonly code: string; readonly degraded: string }> = [\n { code: 'projection-skipped:no-spill', degraded: ERR_HOST_NO_SPILL },\n { code: 'projection-skipped:no-footer', degraded: ERR_HOST_NO_SPILL_NOTICE },\n // The substitution refusal writes the stable code itself, so a status built\n // without host facts still reports the reason the decision path recorded.\n { code: ERR_HOST_NO_TOKENMETER, degraded: ERR_HOST_NO_TOKENMETER },\n]\n\n/**\n * Host capabilities `apply` probes once and hands `status`.\n *\n * Every field is optional because `runBoost` is also usable without a host\n * (unit tests, and the control tool built before `apply` wires the probe). An\n * absent fact means \"not probed\", never \"supported\": the status code list then\n * simply omits the corresponding code rather than guessing.\n */\nexport interface BoostHostFacts {\n /** Whether `ctx.get('tokenMeter')` exposed the synchronous message estimator. */\n hasTokenMeter?: boolean\n /** Whether `ctx.get('spillStore')` exposed the projection backend. */\n hasSpill?: boolean\n /**\n * Whether `ctx.get('workspaceRegistry')` ever became available.\n *\n * A missing registry makes every session invisible, which presents to the\n * operator as \"nothing ever happens\" with no error anywhere. It is a host\n * fact rather than an assembly detail because that failure mode has to be\n * diagnosable from inside the product.\n */\n hasWorkspaceRegistry?: boolean\n}\n\n/** The two stores `runBoost` orchestrates, plus the host facts it reports. */\nexport interface BoostDeps {\n scope: ScopeStore\n receipts: ReceiptStore\n /** Host capabilities measured by `apply`; absent when no host was probed. */\n host?: BoostHostFacts\n /**\n * The one fixed-overhead measurement, started at plugin load.\n *\n * A function rather than a promise so `status` can await it lazily; the\n * default reuses the module-level memoised measurement.\n */\n fixedOverhead?: () => Promise<FixedOverheadMeasurement | 'unknown'>\n /**\n * Which estimator priced this assembly's figures.\n *\n * `host` means the synchronous host meter; `unknown` means no token meter,\n * so no number is fabricated (design §9). There is deliberately no\n * `chars/4` arm: a characters-over-four guess is not a measurement, and a\n * receipt that says `unknown` is more useful than one that is wrong.\n */\n estimateKind?: 'host' | 'unknown'\n /**\n * The current replay horizon; defaults to the design's 20.\n *\n * Receipts carry their own `horizon_steps`, so this is only the fallback for\n * receipts written before that field existed (counted in\n * `projection_horizon_reestimated`) — not a factor applied to the whole\n * ledger.\n */\n horizonSteps?: number\n /** Locators evicted by the per-session cap; status-time read. */\n locatorEvictions?: () => number\n /**\n * Receipt shards whole-store scans had to skip since the last scan that read\n * every shard; status-time read.\n *\n * This is the **only** source of `ERR_RECEIPTS_UNREADABLE`: the store skips\n * an unreadable shard per shard and reports the count, so `status` has one\n * mechanism rather than a status-side scan flag that no production store can\n * raise. Absent means the store has no such counter (or none was skipped);\n * the count clears when a scan reads every shard.\n */\n receiptReadErrors?: () => number\n /**\n * Whether the status scan stopped at the store's 256-shard cap; status-time\n * read.\n *\n * True means every total in the answer covers only the first 256 sorted\n * shards: the figures are a lower bound, not the whole ledger. Absent means\n * the store has no such flag (or the last scan fitted), which is the\n * pre-existing \"totals are complete\" reading.\n */\n receiptsTruncated?: () => boolean\n /** Calls skipped because no family matched; status-time read. */\n unknownFamilies?: () => number\n /** Retained unmapped tool names; status-time read. */\n unknownTools?: () => Record<string, number>\n /**\n * Prompt assemblies whose protocol section was suppressed; status-time read.\n *\n * The prompt path is the one mount that acts on every request, so design\n * §5.5:378 makes it a count rather than a receipt. It is exposed because the\n * shipped default scope is *correctly* inert: with no counter, \"nothing\n * configured\" and \"assembly failed\" look identical from `status`.\n */\n protocolSuppressed?: () => number\n /** Requests whose final prompt lost the protocol to a complete section; status-time read. */\n completeSectionSuppressions?: () => number\n /**\n * Cancellation for this invocation only.\n *\n * `runBoost` is also callable directly (tests, future hosts), so this is\n * optional; `boostTool.execute` fills it from the host's `exec.signal` and a\n * cancelled call leaves `scope.json` untouched.\n */\n signal?: AbortSignal\n}\n\n/** The scope document's caller-writable fields. Everything else is store-owned. */\nconst PATCH_FIELDS = ['mode', 'workspaceIds', 'shadow', 'projection'] as const\n\n/** Fields a caller must never set: the store owns one, the format fixes the other. */\nconst RESERVED_FIELDS = ['version', 'revision'] as const\n\n/** The four subcommands. */\ntype BoostCmd = 'status' | 'scope-get' | 'scope-set' | 'shadow'\n\n/** Raw tool arguments, after the model (or a test) produced them. */\ntype BoostArgs = { cmd: BoostCmd; body?: unknown; baseRevision?: number }\n\n/** Successful report or a stable failure code — never a thrown error. */\ntype BoostResult = { ok: true; data: unknown } | { ok: false; code: string }\n\n/** What `status` reports. Both switches are top-level on purpose: they differ. */\nexport interface BoostStatus {\n scope: { mode: ScopeDoc['mode']; workspaceIds: string[]; revision: number }\n shadow: boolean\n projection: ProjectionMode\n saved: {\n /**\n * Σ numeric `saved_input_tokens` over settled substitutions only. The\n * synth-time `substitute` line predates any measurement (design §5.3 says\n * the field is measured), so its value is `'unknown'` or absent and never\n * contributes; `counts` keeps the event count.\n */\n substitution: number\n /**\n * Σ `saved_projection_tokens` over non-retrieval projections, **replayed**\n * by each receipt's own `horizon_steps`.\n *\n * Replay-aware so this legacy object no longer mixes a one-time gross with\n * a replay net (review R2). The one-time figure is the top-level\n * `projection_gross_tokens`. A receipt that predates `horizon_steps` is\n * replayed at the current horizon; `projection_horizon_reestimated` counts\n * those, so a re-estimated figure is never mistaken for a measured one.\n */\n projectionGross: number | 'unknown'\n /**\n * Σ saved × (1 + that receipt's horizon) − Σ content × (1 + its horizon)\n * − Σ call blocks − legacy replay-aware costs.\n *\n * `'unknown'` when any retrieval in the ledger is unpriced: an unmeasured\n * cost must never silently become zero (review R3).\n */\n projectionNet: number | 'unknown'\n /** Number of `kind:'projection'` receipts marked `retrieved: true`. */\n retrievals: number\n }\n /** Receipt count per `code`, over every shard (including the empty session id). */\n counts: Record<string, number>\n /** Stable degradation codes actually observed. */\n degraded: string[]\n /**\n * Whether the host ever exposed a workspace registry.\n *\n * Reported separately from {@link degraded} because it is the single fact\n * that explains \"the plugin is installed and nothing ever happens\": with no\n * registry, no session resolves to a workspace and every path is inert.\n * Absent when no host was probed.\n */\n hasWorkspaceRegistry?: boolean\n /**\n * The measured per-request fixed cost: protocol section + tool schema.\n *\n * `'unknown'` when the host estimator is unreachable: the measurement is\n * never fabricated (design §9). Status-time only; see\n * `src/admission/fixed-cost.ts`.\n */\n fixedOverheadTokens: number | 'unknown'\n /** The two components behind {@link fixedOverheadTokens}. */\n fixedOverhead: FixedOverheadMeasurement | 'unknown'\n /**\n * Whether the ledger figures are provider-metered or estimates.\n *\n * `unknown` means no token meter: projection still clips, but its receipts\n * carry `'unknown'` rather than invented numbers, and substitution is\n * refused (design §9).\n */\n estimate_kind: 'host' | 'unknown'\n /** The current `(1 + horizon)` replay factor; the fallback for old receipts. */\n projection_horizon_steps: number\n /**\n * Projection receipts replayed at {@link projection_horizon_steps} because\n * they predate the per-receipt `horizon_steps` field.\n *\n * `0` means every replay figure in this report is the horizon its own\n * decision was made under. A non-zero value marks that part of the net is\n * re-estimated, not measured: an operator reading the shadow-week go/no-go\n * must be able to tell the two apart.\n */\n projection_horizon_reestimated: number\n /**\n * Σ one-time `saved_projection_tokens` over applied projections whose call\n * was **not** itself a retrieval.\n *\n * A retrieval's own projection is excluded: crediting it here while also\n * charging its visible window as retrieval cost would count the same tokens\n * from both sides (review I3).\n */\n projection_gross_tokens: number | 'unknown'\n /** {@link projection_gross_tokens} replayed at each receipt's own horizon. */\n projection_gross_replay_tokens: number | 'unknown'\n /** Σ one-time retrieval totals (call + content); `0` for unpriced receipts. */\n projection_retrieval_tokens: number\n /** Σ one-time retrieval content, the side that replays with the gross. */\n projection_retrieval_content_tokens: number\n /** Σ one-time retrieval call blocks; replay does not apply to these. */\n projection_retrieval_call_tokens: number\n /** Projections with no measured saving; the gross/net become `'unknown'`. */\n projection_unpriced_projections: number\n /** Retrievals with no usable token fields; their cost makes the net unknown. */\n projection_unpriced_retrievals: number\n /** Pre-schema retrievals priced through the old `retrievalCost` field. */\n projection_legacy_retrievals: number\n /**\n * The design's receipt-field spelling of `saved.retrievals`.\n *\n * Kept at the top level because the shadow-week operator reads the two\n * ledgers by the names §5.3 gives them; `saved` keeps the original camelCase\n * shape so existing consumers keep working. Both are derived from one\n * aggregation, so they cannot drift.\n */\n projection_retrievals: number\n /**\n * Σ saved × (1 + receipt horizon) − Σ retrieval content × (1 + its horizon)\n * − Σ retrieval call blocks.\n *\n * The retrieval's own projection is not in the gross, the content it made\n * visible replays at the horizon in effect when the retrieval happened, and\n * its call block is charged once. `'unknown'` when a retrieval is unpriced or\n * a meterless projection was clipped: a lower bound cannot be computed from a\n * missing measurement.\n */\n projection_net_tokens: number | 'unknown'\n /** Locators dropped by the per-session cap; a lossy ledger is visible. */\n projection_locator_evictions: number\n /** Calls skipped because no projection family matched. */\n projection_unknown_families: number\n /** Retained unmapped tool names (at most 32), for mapper-gap diagnosis. */\n projection_unknown_tools: Record<string, number>\n /**\n * Prompt assemblies whose protocol section was suppressed.\n *\n * Counted, never receipted, because assembly runs on every request (design\n * §5.5:378). A live, monotonically increasing number is the only evidence\n * that the inert-looking default is \"no workspace configured\" rather than a\n * section that failed to inject.\n */\n protocol_suppressed: number\n /**\n * Whether the receipt store stopped accepting writes (fail-closed).\n *\n * Once true, substitution is refused outright (design §5.2-3) and every\n * figure above is a stale snapshot. Reported because the alternative is an\n * operator reading frozen numbers with no warning that they froze.\n */\n receipts_stopped: boolean\n}\n\n/** A validated scope patch: only the caller-writable fields survive. */\ntype ScopePatch = Partial<Pick<ScopeDoc, (typeof PATCH_FIELDS)[number]>>\n\n/**\n * The replay horizon one projection receipt was measured under.\n *\n * The decision path writes `horizon_steps` on every projection receipt it\n * produces. A receipt from before that field existed is replayed at the\n * current horizon and flagged as re-estimated, so `status` can tell the\n * operator how much of the net is measured rather than re-valued. A malformed\n * value is treated as absent, never trusted.\n */\nfunction replayOf(\n receipt: Receipt,\n fallback: number,\n): { horizon: number; reestimated: boolean } {\n const raw = receipt.horizon_steps\n if (typeof raw === 'number' && Number.isFinite(raw) && raw >= 0) {\n return { horizon: Math.floor(raw), reestimated: false }\n }\n return { horizon: fallback, reestimated: true }\n}\n\n/**\n * The receipt aggregation behind `status`, kept separate from the document\n * read so the accounting has one home and one test surface.\n *\n * `scan()` is called with no session id on purpose: `skip:no-scope` receipts\n * are not owned by one shard. The no-agent case writes the empty session id;\n * the cold-judgement path writes the real session id, once per tool call by\n * design (design §5.5:377), which is expected in unscoped workspaces and will\n * dominate their shards — not a leak. Only a whole-store scan sees both.\n *\n * Unreadable shards are the store's concern: `scan()` skips them and\n * `readErrors()` reports the count, so `status` has exactly one source for\n * `ERR_RECEIPTS_UNREADABLE` and a throwing store is an internal failure, not a\n * second degradation channel.\n *\n * The replay sums are computed here, per receipt, from each receipt's own\n * `horizon_steps`. A receipt written before that field existed is replayed at\n * `fallbackHorizon` (the current horizon) and counted in\n * `horizonReestimated`, so the report can say how much of the net is measured\n * rather than re-estimated.\n */\nasync function aggregate(\n receipts: ReceiptStore,\n fallbackHorizon: number,\n): Promise<{\n counts: Record<string, number>\n substitution: number\n projectionGross: number\n projectionGrossReplay: number\n retrievalContentReplay: number\n horizonReestimated: number\n unpricedProjections: number\n retrievalTokens: number\n retrievalContentTokens: number\n retrievalCallTokens: number\n retrievals: number\n unpricedRetrievals: number\n legacyRetrievals: number\n legacyRetrievalCost: number\n degraded: string[]\n}> {\n const counts: Record<string, number> = Object.create(null)\n let substitution = 0\n let projectionGross = 0\n let projectionGrossReplay = 0\n let retrievalContentReplay = 0\n let horizonReestimated = 0\n let unpricedProjections = 0\n let retrievalTokens = 0\n let retrievalContentTokens = 0\n let retrievalCallTokens = 0\n let retrievals = 0\n let unpricedRetrievals = 0\n let legacyRetrievals = 0\n let legacyRetrievalCost = 0\n\n for await (const receipt of receipts.scan()) {\n // A receipt is untrusted text from a file: `counts` has no prototype so a\n // code of `toString` or `__proto__` is an ordinary numeric key, never a\n // string concatenation and never a dropped assignment.\n if (typeof receipt.code === 'string') {\n counts[receipt.code] = (counts[receipt.code] ?? 0) + 1\n }\n\n // Only the settled line carries a measured saving; the synth-time line is\n // an event and is already visible in `counts`.\n if (receipt.kind === 'substitute-settled') {\n const saved = receipt.saved_input_tokens\n if (typeof saved === 'number' && Number.isFinite(saved)) substitution += saved\n }\n\n if (receipt.kind !== 'projection') continue\n\n const replay = replayOf(receipt, fallbackHorizon)\n\n if (receipt.unit === 'raw' && receipt.call_was_retrieval !== true && receipt.retrieved !== true) {\n // T23b/T26 write `saved_projection_tokens`; `saved` is the pre-T23b\n // spelling this consumer accepted first. Never estimate a value here.\n // A retrieval's own projection is excluded from gross: its visible\n // window is charged as retrieval content instead (review I3).\n const saved = receipt.saved_projection_tokens ?? receipt.saved\n if (typeof saved === 'number' && Number.isFinite(saved)) {\n projectionGross += saved\n projectionGrossReplay += saved * (1 + replay.horizon)\n if (replay.reestimated) horizonReestimated += 1\n }\n // A meterless projection carries `estimate:'unknown'` and no saved\n // figure. Reporting the remaining numeric sum as the gross would present\n // an unmeasured effect as zero (review R4).\n else unpricedProjections += 1\n }\n\n if (receipt.retrieved !== true) continue\n retrievals += 1\n\n const total = receipt.retrieval_tokens\n const call = receipt.retrieval_call_tokens\n const content = receipt.retrieval_content_tokens\n if (\n typeof total === 'number' &&\n Number.isFinite(total) &&\n total >= 0 &&\n typeof call === 'number' &&\n Number.isFinite(call) &&\n call >= 0 &&\n typeof content === 'number' &&\n Number.isFinite(content) &&\n content >= 0 &&\n total === call + content\n ) {\n retrievalTokens += total\n retrievalCallTokens += call\n retrievalContentTokens += content\n retrievalContentReplay += content * (1 + replay.horizon)\n if (replay.reestimated) horizonReestimated += 1\n continue\n }\n\n // Pre-schema receipts (written before the split) carry only the old\n // already-replayed `retrievalCost` total. Subtracting it directly from the\n // replayed net avoids counting it as free (review R6). Its own projection,\n // if any, predates the `call_was_retrieval` marker and cannot be identified\n // from the file; that is documented in the report.\n const legacy = receipt.retrievalCost\n if (typeof legacy === 'number' && Number.isFinite(legacy) && legacy >= 0) {\n legacyRetrievals += 1\n legacyRetrievalCost += legacy\n retrievalTokens += legacy\n continue\n }\n\n // Neither schema: the cost is unknown, not zero. The net is reported as\n // `'unknown'` rather than silently treating the retrieval as free.\n unpricedRetrievals += 1\n }\n\n const degraded = RECEIPT_DEGRADATION.filter(entry => counts[entry.code] !== undefined).map(\n entry => entry.degraded,\n )\n return {\n counts,\n substitution,\n projectionGross,\n projectionGrossReplay,\n retrievalContentReplay,\n horizonReestimated,\n unpricedProjections,\n retrievalTokens,\n retrievalContentTokens,\n retrievalCallTokens,\n retrievals,\n unpricedRetrievals,\n legacyRetrievals,\n legacyRetrievalCost,\n degraded,\n }\n}\n\n/**\n * The fixed overhead measurement, never a thrown status.\n *\n * The production deps carry the promise `apply` started at load; the default\n * is the same memoised measurement, so a direct `runBoost` (a unit test or a\n * host that built the tool itself) still reports a real number. A rejection or\n * an invalid breakdown is `'unknown'`, for the same reason the estimator's own\n * failure is.\n */\nasync function fixedOverheadOf(deps: BoostDeps): Promise<FixedOverheadMeasurement | 'unknown'> {\n try {\n const value = await (deps.fixedOverhead ?? measureBoostFixedOverhead)()\n if (value === 'unknown') return 'unknown'\n const { protocolTokens, toolSchemaTokens, totalTokens } = value\n if (\n !Number.isFinite(protocolTokens) ||\n !Number.isFinite(toolSchemaTokens) ||\n !Number.isFinite(totalTokens) ||\n protocolTokens < 0 ||\n toolSchemaTokens < 0 ||\n totalTokens !== protocolTokens + toolSchemaTokens\n ) {\n return 'unknown'\n }\n return value\n } catch {\n return 'unknown'\n }\n}\n\n/** The configured replay horizon, or the design default when absent/malformed. */\nfunction horizonOf(deps: BoostDeps): number {\n const raw = deps.horizonSteps\n return typeof raw === 'number' && Number.isFinite(raw) && raw >= 0\n ? Math.floor(raw)\n : DEFAULT_CONFIG.horizonSteps\n}\n\n/** The label for the assembly's estimator; unprobed is honestly `unknown`. */\nfunction estimateKindOf(deps: BoostDeps): BoostStatus['estimate_kind'] {\n const kind = deps.estimateKind\n return kind === 'host' || kind === 'unknown' ? kind : 'unknown'\n}\n\n/**\n * Whether the receipt store has stopped writing, fail-closed.\n *\n * Mirrors `receiptsStopped` in `src/hooks/llm-stream.ts` for the control tool's\n * own store reference: a partial store is \"not stopped\", and a store that\n * throws cannot record evidence, which is what stopped means.\n */\nfunction receiptsStopped(store: BoostDeps['receipts']): boolean {\n try {\n if (store == null || typeof store.stopped !== 'function') return false\n return store.stopped() === true\n } catch {\n return true\n }\n}\n\n/** Whether the last whole-store scan stopped at the shard cap, never thrown. */\nfunction receiptsTruncatedOf(deps: BoostDeps): boolean {\n try {\n if (deps.receiptsTruncated !== undefined) return deps.receiptsTruncated() === true\n // The store owns the fact; the override exists for a fake counter. Reading\n // the store directly keeps a hand-built `runBoost` (no measured deps) from\n // silently losing the code.\n return deps.receipts.scanTruncated() === true\n } catch {\n return false\n }\n}\n\n/** Skipped shard reads, from the override or the store's own reading. */\nfunction receiptReadErrorsOf(deps: BoostDeps): number {\n if (deps.receiptReadErrors !== undefined) return counterOf(deps.receiptReadErrors)\n try {\n return counterOf(() => deps.receipts.readErrors())\n } catch {\n return 0\n }\n}\n\n/** A monotonic status counter, never a thrown status. */\nfunction counterOf(read: (() => number) | undefined): number {\n try {\n const value = read?.()\n return typeof value === 'number' && Number.isFinite(value) && value >= 0\n ? Math.floor(value)\n : 0\n } catch {\n return 0\n }\n}\n\n/** A bounded unmapped-tool map, never a thrown status. */\nfunction toolCountsOf(read: (() => Record<string, number>) | undefined): Record<string, number> {\n // Build through a Map: `counts['__proto__'] = n` on a plain object would\n // mutate its prototype, and tool names come from the host. `fromEntries` is\n // an own-property copy, so the returned object has the normal prototype and\n // deep-equality consumers see a plain record.\n const counts = new Map<string, number>()\n try {\n const value = read?.()\n if (value === null || typeof value !== 'object') return {}\n for (const [name, count] of Object.entries(value)) {\n if (typeof count === 'number' && Number.isFinite(count) && count >= 0) counts.set(name, count)\n }\n } catch {\n // A foreign counter is evidence, not a failure.\n }\n return Object.fromEntries(counts)\n}\n\n/**\n * The stable degradation codes for one status call.\n *\n * Inputs are the receipt-observed codes, the scope read's stable code, and the\n * host facts. Receipt codes are already mapped; the scope store's internal\n * `scope-degraded` label is deliberately **not** copied — the report's contract\n * is stable codes only. Order is deterministic (receipts, scope, host) and the\n * result is deduplicated, so one condition observed through two channels\n * appears once.\n *\n * Two different absences stay distinct: `ERR_HOST_NO_TOKENMETER` is the\n * **service** (`ctx.get('tokenMeter')`) being absent, which refuses\n * substitution; `ERR_HOST_NO_ESTIMATOR` is the pure estimate package being\n * unreachable, which makes the fixed-overhead figure `'unknown'`. A host with\n * the package but no service reports the latter only.\n *\n * `when` on `tools.register` has been part of `ToolRegistrationOptions` since\n * the oldest host line this plugin declares, so there is no \"host without\n * step-level `when`\" to report: probing it would evaluate every other plugin's\n * predicate against a fabricated `Agent`, and a fact that can never be true is\n * a claim, not a measurement. `apply` registers unconditionally instead.\n */\nfunction degradationCodes(\n observed: readonly string[],\n read: Awaited<ReturnType<ScopeStore['read']>>,\n host: BoostHostFacts | undefined,\n fixedOverhead: FixedOverheadMeasurement | 'unknown',\n): string[] {\n const codes: string[] = [...observed]\n if (read.degraded !== undefined) codes.push(read.code ?? ERR_SCOPE_READ_FAILED)\n\n if (!isPosixOnly()) codes.push(ERR_HOST_PLATFORM_UNSUPPORTED)\n if (host?.hasTokenMeter === false) codes.push(ERR_HOST_NO_TOKENMETER)\n if (fixedOverhead === 'unknown') codes.push(ERR_HOST_NO_ESTIMATOR)\n // `spillStore` matters only in apply mode; shadow mode never touches it\n // (design §5.4), so reporting it while projection is `shadow` would be noise.\n if (host?.hasSpill === false && read.doc.projection === 'on') codes.push(ERR_HOST_NO_SPILL)\n if (host?.hasWorkspaceRegistry === false) codes.push(ERR_HOST_NO_WORKSPACE_REGISTRY)\n\n return [...new Set(codes)]\n}\n\n/** `status`: the scope document plus the receipt ledgers, never a failure. */\nasync function statusCommand(deps: BoostDeps): Promise<BoostResult> {\n const read = await deps.scope.read()\n const horizon = horizonOf(deps)\n // Each receipt replays at its own horizon; `horizon` is only the fallback for\n // receipts that predate the field, and `horizonReestimated` counts them.\n const totals = await aggregate(deps.receipts, horizon)\n const fixedOverhead = await fixedOverheadOf(deps)\n const degraded = degradationCodes(totals.degraded, read, deps.host, fixedOverhead)\n // A shard the scan could not read is evidence, not a status failure: the\n // healthy shards were counted and the operator gets a stable code saying the\n // ledger is incomplete. `readErrors()` is the only producer; it counts skips\n // since the last fully readable whole-store scan, so a repaired shard clears\n // the code.\n if (receiptReadErrorsOf(deps) > 0 && !degraded.includes(ERR_RECEIPTS_UNREADABLE)) {\n degraded.push(ERR_RECEIPTS_UNREADABLE)\n }\n // The scan cap makes every figure a lower bound over the first 256 sorted\n // shards. Under-counting is safe, but it must not be presented as a total.\n if (receiptsTruncatedOf(deps) && !degraded.includes(ERR_RECEIPTS_TRUNCATED)) {\n degraded.push(ERR_RECEIPTS_TRUNCATED)\n }\n // A complete prompt section silently removed the protocol from the request:\n // the workspace is visible but substitution cannot be taught, so the operator\n // must see why the plugin is inert.\n if (counterOf(deps.completeSectionSuppressions) > 0) degraded.push(ERR_HOST_COMPLETE_SECTION)\n const estimateKind = estimateKindOf(deps)\n\n // Meterless projections have `estimate:'unknown'` receipts with no saved\n // figure. Reporting the numeric sum of the rest as 0/0 would be\n // indistinguishable from \"projection had no effect\" (review R4).\n const meterlessEvidence = totals.unpricedProjections > 0\n const grossOneTime = meterlessEvidence ? 'unknown' : totals.projectionGross\n const grossReplay = grossOneTime === 'unknown' ? 'unknown' : totals.projectionGrossReplay\n\n // A retrieval's own projection is excluded from gross; its content replays\n // with the gross, its call block is charged once, and a legacy cost was\n // already replay-aware (review I3/R6). An unpriced retrieval makes the whole\n // net unknown rather than free (review R3).\n const netUnknown = meterlessEvidence || totals.unpricedRetrievals > 0\n const projectionNet =\n netUnknown\n ? 'unknown'\n : totals.projectionGrossReplay -\n totals.retrievalContentReplay -\n totals.retrievalCallTokens -\n totals.legacyRetrievalCost\n\n const saved: BoostStatus['saved'] = {\n substitution: totals.substitution,\n projectionGross: grossReplay,\n projectionNet,\n retrievals: totals.retrievals,\n }\n const data: BoostStatus = {\n scope: {\n mode: read.doc.mode,\n workspaceIds: read.doc.workspaceIds,\n revision: read.doc.revision,\n },\n shadow: read.doc.shadow,\n projection: read.doc.projection,\n saved,\n counts: totals.counts,\n degraded,\n fixedOverheadTokens: fixedOverhead === 'unknown' ? 'unknown' : fixedOverhead.totalTokens,\n fixedOverhead,\n estimate_kind: estimateKind,\n projection_horizon_steps: horizon,\n projection_horizon_reestimated: totals.horizonReestimated,\n projection_gross_tokens: grossOneTime,\n projection_gross_replay_tokens: grossReplay,\n projection_retrieval_tokens: totals.retrievalTokens,\n projection_retrieval_content_tokens: totals.retrievalContentTokens,\n projection_retrieval_call_tokens: totals.retrievalCallTokens,\n projection_unpriced_projections: totals.unpricedProjections,\n projection_unpriced_retrievals: totals.unpricedRetrievals,\n projection_legacy_retrievals: totals.legacyRetrievals,\n projection_retrievals: totals.retrievals,\n projection_net_tokens: projectionNet,\n projection_locator_evictions: counterOf(deps.locatorEvictions),\n projection_unknown_families: counterOf(deps.unknownFamilies),\n projection_unknown_tools: toolCountsOf(deps.unknownTools),\n protocol_suppressed: counterOf(deps.protocolSuppressed),\n receipts_stopped: receiptsStopped(deps.receipts),\n // An absent host fact is \"not probed\", not `false`: `undefined` is not a\n // legal JSON value, so the key is omitted rather than handed to the host\n // boundary (review row 35).\n ...(deps.host?.hasWorkspaceRegistry === undefined\n ? {}\n : { hasWorkspaceRegistry: deps.host.hasWorkspaceRegistry }),\n }\n return { ok: true, data }\n}\n\n/** `scope-get`: a faithful read; a degraded read is a stable tool failure. */\nasync function scopeGetCommand(deps: BoostDeps): Promise<BoostResult> {\n const read = await deps.scope.read()\n if (read.degraded !== undefined) return { ok: false, code: read.code ?? ERR_SCOPE_READ_FAILED }\n return { ok: true, data: read.doc }\n}\n\n/** Whether a value can be a caller-supplied base revision. */\nfunction isRevision(value: unknown): value is number {\n return typeof value === 'number' && Number.isInteger(value) && value >= 0\n}\n\n/** Whether `value` is one of the three projection modes. */\nfunction isProjectionMode(value: unknown): value is ProjectionMode {\n return value === 'off' || value === 'shadow' || value === 'on'\n}\n\n/**\n * Validate a `scope-set` body and prune it to the writable fields.\n *\n * Reserved fields are checked **first**: the store persists whatever `mutate`\n * returns, so a body carrying `version` or `revision` must be refused before a\n * patch is built, not stripped and written as if the caller's intent were\n * merely advisory. Unknown keys are pruned; a known key with a wrong type is\n * rejected, never coerced.\n */\nfunction scopePatchOf(body: unknown): { ok: true; patch: ScopePatch } | { ok: false; code: string } {\n if (body === null || typeof body !== 'object' || Array.isArray(body)) {\n return { ok: false, code: ERR_BOOST_INVALID_BODY }\n }\n const source = body as Record<string, unknown>\n const has = (key: string): boolean => Object.prototype.hasOwnProperty.call(source, key)\n if (RESERVED_FIELDS.some(has)) return { ok: false, code: ERR_BOOST_INVALID_BODY }\n\n const patch: ScopePatch = {}\n if (has('mode')) {\n if (source.mode !== 'selected' && source.mode !== 'global') {\n return { ok: false, code: ERR_BOOST_INVALID_BODY }\n }\n patch.mode = source.mode\n }\n if (has('workspaceIds')) {\n const ids = source.workspaceIds\n if (!Array.isArray(ids) || !ids.every(id => typeof id === 'string')) {\n return { ok: false, code: ERR_BOOST_INVALID_BODY }\n }\n patch.workspaceIds = [...ids]\n }\n if (has('shadow')) {\n if (typeof source.shadow !== 'boolean') return { ok: false, code: ERR_BOOST_INVALID_BODY }\n patch.shadow = source.shadow\n }\n if (has('projection')) {\n if (!isProjectionMode(source.projection)) return { ok: false, code: ERR_BOOST_INVALID_BODY }\n patch.projection = source.projection\n }\n return { ok: true, patch }\n}\n\n/** The store's stable code, or undefined for anything else (which never escapes). */\nfunction scopeCodeOf(error: unknown): ScopeCode | undefined {\n if (typeof error !== 'object' || error === null || !('code' in error)) return undefined\n const code = (error as { code?: unknown }).code\n return typeof code === 'string' && SCOPE_CODES.has(code) ? (code as ScopeCode) : undefined\n}\n\n/**\n * One compare-and-swap write shared by `scope-set` and `shadow`.\n *\n * `version: 2` is forced even though `ScopeStore.write` bases a corrupt or\n * v1 file on `DEFAULT_SCOPE`: the invariant must hold at the mutation boundary,\n * where the store's \"persist whatever `mutate` returns\" contract makes it\n * binding. `revision` is deliberately absent — the store owns it.\n */\nasync function writeScope(\n scope: ScopeStore,\n mutate: (doc: ScopeDoc) => ScopeDoc,\n baseRevision: number,\n signal?: AbortSignal,\n): Promise<BoostResult> {\n try {\n const doc = await scope.write(mutate, baseRevision, { signal })\n return { ok: true, data: doc }\n } catch (error) {\n const code = scopeCodeOf(error)\n if (code !== undefined) return { ok: false, code }\n throw error\n }\n}\n\n/** `scope-set`: validate, prune, then write with compare-and-swap. */\nasync function scopeSetCommand(deps: BoostDeps, args: BoostArgs): Promise<BoostResult> {\n const parsed = scopePatchOf(args.body)\n if (!parsed.ok) return parsed\n if (!isRevision(args.baseRevision)) return { ok: false, code: ERR_BOOST_INVALID_ARGS }\n const patch = parsed.patch\n return writeScope(\n deps.scope,\n doc => ({ ...doc, ...patch, version: 2 }),\n args.baseRevision,\n deps.signal,\n )\n}\n\n/**\n * `shadow`: the shadow-week switch, independent of `projection`.\n *\n * A version 1 document is **not** upgraded here. The store can carry a v1\n * document through a write, but design §5.5 makes `scope-set` the explicit\n * upgrade path: the other write refuses with the degraded read's stable code so\n * the operator performs the documented upgrade instead of a blind rewrite.\n */\nasync function shadowCommand(deps: BoostDeps, args: BoostArgs): Promise<BoostResult> {\n if (typeof args.body !== 'boolean') return { ok: false, code: ERR_BOOST_INVALID_BODY }\n if (!isRevision(args.baseRevision)) return { ok: false, code: ERR_BOOST_INVALID_ARGS }\n const current = await deps.scope.read()\n if (current.code === ERR_SCOPE_UNKNOWN_VERSION) {\n return { ok: false, code: ERR_SCOPE_UNKNOWN_VERSION }\n }\n const shadow = args.body\n return writeScope(deps.scope, doc => ({ ...doc, shadow }), args.baseRevision, deps.signal)\n}\n\n/** One handler per subcommand; the table is the dispatch and the documentation. */\nconst COMMANDS: Record<BoostCmd, (deps: BoostDeps, args: BoostArgs) => Promise<BoostResult>> = {\n status: statusCommand,\n 'scope-get': scopeGetCommand,\n 'scope-set': scopeSetCommand,\n shadow: shadowCommand,\n}\n\n/**\n * Run one `boost` invocation. Pure orchestration over the two stores.\n *\n * Failures are values: an unknown command, an invalid body or a store code all\n * come back as `{ ok: false, code }`. The `try` covers the argument read as\n * well as the handler, so a null call or an argument object with a throwing\n * getter answers a stable code instead of throwing. The catch exists only so\n * an unexpected store failure cannot turn the user's only control surface into\n * a thrown tool error; it is not an expected path.\n */\nexport async function runBoost(\n input: BoostDeps & {\n args: { cmd: BoostCmd; body?: unknown; baseRevision?: number }\n },\n): Promise<{ ok: true; data: unknown } | { ok: false; code: string }> {\n try {\n const signal = (input as { signal?: AbortSignal } | null | undefined)?.signal\n if (signal?.aborted === true) return { ok: false, code: ERR_SCOPE_ABORTED }\n const args = (input as { args?: unknown } | null | undefined)?.args\n const cmd = (args as { cmd?: unknown } | null | undefined)?.cmd\n const handler =\n typeof cmd === 'string' && Object.prototype.hasOwnProperty.call(COMMANDS, cmd)\n ? COMMANDS[cmd as BoostCmd]\n : undefined\n if (handler === undefined) return { ok: false, code: ERR_BOOST_UNKNOWN_CMD }\n return await handler(input as BoostDeps, args as BoostArgs)\n } catch {\n return { ok: false, code: ERR_BOOST_INTERNAL }\n }\n}\n\n/**\n * The host's cancellation signal, or `undefined` for any other shape.\n *\n * `exec` crosses the host boundary and is untrusted here: a plain object with\n * an `aborted` boolean and an `addEventListener` function is the documented\n * `AbortSignal` contract this code relies on, and anything else is ignored\n * rather than dereferenced (a foreign host must not make `boost` throw).\n */\nfunction signalOf(exec: unknown): AbortSignal | undefined {\n const candidate = (exec as { signal?: unknown } | null | undefined)?.signal\n if (typeof candidate !== 'object' || candidate === null) return undefined\n const signal = candidate as { aborted?: unknown; addEventListener?: unknown }\n if (typeof signal.aborted !== 'boolean' || typeof signal.addEventListener !== 'function') {\n return undefined\n }\n return candidate as AbortSignal\n}\n\n/** Model-facing description: what each command does and what it returns. */\nconst DESCRIPTION = [\n 'Inspect or change dsh-boost state. Commands:',\n 'status reports the scope document, both switches, receipt counts per code, both ledgers (substitution; projection net with its retrieval count), the measured fixed overhead, and the degraded codes;',\n 'scope-get reads the full scope document;',\n 'scope-set replaces the given fields with compare-and-swap; body = { mode?, workspaceIds?, shadow?, projection? }; version and revision are store-owned and rejected;',\n 'shadow persists the shadow-week switch; body = boolean; it refuses a version 1 document with ERR_SCOPE_UNKNOWN_VERSION — run scope-set once to upgrade it.',\n 'scope-set and shadow require the baseRevision last seen via status or scope-get; a stale one fails with ERR_SCOPE_REVISION_CONFLICT. Failures are { ok:false, code } values, never thrown.',\n].join(' ')\n\n/** The argument schema shown to the model; `status`/`scope-get` need only `cmd`. */\nconst PARAMETERS: Record<string, unknown> = {\n type: 'object',\n properties: {\n cmd: {\n type: 'string',\n enum: ['status', 'scope-get', 'scope-set', 'shadow'],\n description: 'Which boost operation to run.',\n },\n body: {\n description:\n 'scope-set: the desired scope fields (unknown keys are pruned, version/revision rejected). shadow: the desired boolean.',\n oneOf: [\n {\n type: 'object',\n properties: {\n mode: { type: 'string', enum: ['selected', 'global'] },\n workspaceIds: { type: 'array', items: { type: 'string' } },\n shadow: { type: 'boolean' },\n projection: { type: 'string', enum: ['off', 'shadow', 'on'] },\n },\n },\n { type: 'boolean' },\n ],\n },\n baseRevision: {\n // `minimum` is outside the host's enforced JSON-Schema subset; the\n // runtime check in `isRevision` is the authority for `>= 0` (row 45).\n type: 'integer',\n description: 'Required by scope-set and shadow: the revision last seen (a non-negative integer).',\n },\n },\n required: ['cmd'],\n additionalProperties: false,\n}\n\n/**\n * The model-visible part of the `boost` tool definition.\n *\n * This is the second half of the fixed-overhead budget: `estimateToolsTokens`\n * prices the schema the model receives every request. `output` is a host-side\n * envelope and is not part of the request's tool list, so it is excluded.\n */\nfunction boostSchema(): { name: 'boost'; description: string; parameters: Record<string, unknown> } {\n return { name: 'boost', description: DESCRIPTION, parameters: PARAMETERS }\n}\n\n/** The one memoised protocol + schema measurement, shared by startup and status. */\nlet boostFixedOverhead: Promise<FixedOverheadMeasurement | 'unknown'> | undefined\n\n/**\n * The startup probe `apply` fires once and `status` awaits.\n *\n * Memoised per process: a status call must report the same number the startup\n * measured, and must not re-import or re-price the schema.\n */\nexport function measureBoostFixedOverhead(): Promise<FixedOverheadMeasurement | 'unknown'> {\n boostFixedOverhead ??= measureFixedOverhead(boostSchema())\n return boostFixedOverhead\n}\n\n/**\n * The canonical output envelope. The host validates every successful return\n * against this schema, and a failure is a successful call whose value is\n * `{ ok: false, code }` (the tool never throws its stable codes), so both\n * branches are declared.\n */\nconst OUTPUT_SCHEMA: JsonSchemaNode = {\n oneOf: [\n {\n type: 'object',\n properties: {\n ok: { type: 'boolean', const: true },\n data: {},\n },\n required: ['ok', 'data'],\n additionalProperties: false,\n },\n {\n type: 'object',\n properties: {\n ok: { type: 'boolean', const: false },\n code: { type: 'string' },\n },\n required: ['ok', 'code'],\n additionalProperties: false,\n },\n ],\n}\n\n/** Render the canonical envelope as one text block; `JSON.stringify` is the format. */\nfunction renderResult(_args: unknown, value: unknown): { type: 'text'; text: string }[] {\n return [{ type: 'text', text: JSON.stringify(value) ?? 'undefined' }]\n}\n\n/**\n * Build the host tool definition.\n *\n * `output: { schema, render }` is mandatory in the host's `ToolDefinition`;\n * a definition missing it is rejected at registration. `execute` reuses\n * `runBoost`, so the tool and the pure orchestration cannot drift.\n */\nexport function boostTool(deps: BoostDeps): {\n name: 'boost'\n description: string\n parameters: Record<string, unknown>\n output: {\n schema: JsonSchemaNode\n render: (args: unknown, value: unknown) => { type: 'text'; text: string }[]\n }\n execute: (args: unknown, exec: unknown) => Promise<unknown>\n} {\n return {\n name: 'boost',\n description: DESCRIPTION,\n parameters: PARAMETERS,\n output: { schema: OUTPUT_SCHEMA, render: renderResult },\n execute: (args, exec) => runBoost({ args: args as BoostArgs, ...deps, signal: signalOf(exec) }),\n }\n}"]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Host tool name → projection family.
|
|
3
|
+
*
|
|
4
|
+
* The projection windows are keyed by family (`read`/`grep`/`glob`/`bash`/
|
|
5
|
+
* `ssh`), but the host names MCP-backed tools with a decoration:
|
|
6
|
+
* `mcp__ssh__execute-command`. A miss here is silent — `projectDecision`
|
|
7
|
+
* simply returns the receipt unchanged — so this mapping is the only thing
|
|
8
|
+
* that keeps projection enabled for the ssh family.
|
|
9
|
+
*
|
|
10
|
+
* The rule is deliberately narrow. A bare family name maps to itself; an MCP
|
|
11
|
+
* name maps only when the **server** segment is itself a family. `web_fetch`,
|
|
12
|
+
* `edit`, `mcp__filesystem__read_file` and every future tool have no window
|
|
13
|
+
* (design §5.3), and the last one must not be mistaken for `read` just because
|
|
14
|
+
* its method is named `read_file`.
|
|
15
|
+
*
|
|
16
|
+
* @module dsh-boost/tools/family
|
|
17
|
+
*/
|
|
18
|
+
import type { ToolFamily } from '../types.js';
|
|
19
|
+
/**
|
|
20
|
+
* The projection family for a host tool name, or `undefined` when it has none.
|
|
21
|
+
*
|
|
22
|
+
* `undefined` is the design's "pass through unchanged" case, not an error.
|
|
23
|
+
* The name is validated defensively because `exec.name` crosses the host
|
|
24
|
+
* boundary and is typed loosely at the hook.
|
|
25
|
+
*/
|
|
26
|
+
export declare function familyOf(name: string): ToolFamily | undefined;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/** The families configured in `BoostConfig.projection`. */
|
|
2
|
+
const FAMILIES = new Set(['read', 'grep', 'glob', 'bash', 'ssh']);
|
|
3
|
+
/** The host's MCP decoration: `mcp__<server>__<tool>`. */
|
|
4
|
+
const MCP_PREFIX = 'mcp__';
|
|
5
|
+
/**
|
|
6
|
+
* The projection family for a host tool name, or `undefined` when it has none.
|
|
7
|
+
*
|
|
8
|
+
* `undefined` is the design's "pass through unchanged" case, not an error.
|
|
9
|
+
* The name is validated defensively because `exec.name` crosses the host
|
|
10
|
+
* boundary and is typed loosely at the hook.
|
|
11
|
+
*/
|
|
12
|
+
export function familyOf(name) {
|
|
13
|
+
if (typeof name !== 'string' || name === '')
|
|
14
|
+
return undefined;
|
|
15
|
+
if (FAMILIES.has(name))
|
|
16
|
+
return name;
|
|
17
|
+
if (!name.startsWith(MCP_PREFIX))
|
|
18
|
+
return undefined;
|
|
19
|
+
const rest = name.slice(MCP_PREFIX.length);
|
|
20
|
+
const separator = rest.indexOf('__');
|
|
21
|
+
if (separator <= 0)
|
|
22
|
+
return undefined;
|
|
23
|
+
const server = rest.slice(0, separator);
|
|
24
|
+
return FAMILIES.has(server) ? server : undefined;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=family.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"family.js","sourceRoot":"","sources":["../../src/tools/family.ts"],"names":[],"mappings":"AAmBA,2DAA2D;AAC3D,MAAM,QAAQ,GAAwB,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC,CAAA;AAEtF,0DAA0D;AAC1D,MAAM,UAAU,GAAG,OAAO,CAAA;AAE1B;;;;;;GAMG;AACH,MAAM,UAAU,QAAQ,CAAC,IAAY;IACnC,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,EAAE;QAAE,OAAO,SAAS,CAAA;IAC7D,IAAI,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC;QAAE,OAAO,IAAkB,CAAA;IACjD,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC;QAAE,OAAO,SAAS,CAAA;IAElD,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,CAAA;IAC1C,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IACpC,IAAI,SAAS,IAAI,CAAC;QAAE,OAAO,SAAS,CAAA;IACpC,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,CAAA;IACvC,OAAO,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAE,MAAqB,CAAC,CAAC,CAAC,SAAS,CAAA;AAClE,CAAC","sourcesContent":["/**\n * Host tool name → projection family.\n *\n * The projection windows are keyed by family (`read`/`grep`/`glob`/`bash`/\n * `ssh`), but the host names MCP-backed tools with a decoration:\n * `mcp__ssh__execute-command`. A miss here is silent — `projectDecision`\n * simply returns the receipt unchanged — so this mapping is the only thing\n * that keeps projection enabled for the ssh family.\n *\n * The rule is deliberately narrow. A bare family name maps to itself; an MCP\n * name maps only when the **server** segment is itself a family. `web_fetch`,\n * `edit`, `mcp__filesystem__read_file` and every future tool have no window\n * (design §5.3), and the last one must not be mistaken for `read` just because\n * its method is named `read_file`.\n *\n * @module dsh-boost/tools/family\n */\nimport type { ToolFamily } from '../types.js'\n\n/** The families configured in `BoostConfig.projection`. */\nconst FAMILIES: ReadonlySet<string> = new Set(['read', 'grep', 'glob', 'bash', 'ssh'])\n\n/** The host's MCP decoration: `mcp__<server>__<tool>`. */\nconst MCP_PREFIX = 'mcp__'\n\n/**\n * The projection family for a host tool name, or `undefined` when it has none.\n *\n * `undefined` is the design's \"pass through unchanged\" case, not an error.\n * The name is validated defensively because `exec.name` crosses the host\n * boundary and is typed loosely at the hook.\n */\nexport function familyOf(name: string): ToolFamily | undefined {\n if (typeof name !== 'string' || name === '') return undefined\n if (FAMILIES.has(name)) return name as ToolFamily\n if (!name.startsWith(MCP_PREFIX)) return undefined\n\n const rest = name.slice(MCP_PREFIX.length)\n const separator = rest.indexOf('__')\n if (separator <= 0) return undefined\n const server = rest.slice(0, separator)\n return FAMILIES.has(server) ? (server as ToolFamily) : undefined\n}\n"]}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared types for dsh-boost.
|
|
3
|
+
*
|
|
4
|
+
* `PluginContext` is the minimal projection of the host services this plugin
|
|
5
|
+
* uses (`tools` and `systemPrompt` are required; `llm` is a soft service the
|
|
6
|
+
* selector resolves lazily); it is deliberately narrower than the full cordis
|
|
7
|
+
* `Context` so the behaviour modules can be tested against a fake host.
|
|
8
|
+
* `BoostConfig` mirrors the config surface published in `cordis.patch.yml`
|
|
9
|
+
* (design §5.3).
|
|
10
|
+
*
|
|
11
|
+
* Every shape here is structural. This module is reachable from the published
|
|
12
|
+
* `dist/index.d.ts`, and the package deliberately declares no host
|
|
13
|
+
* dependencies, so importing a host type here would make a consumer's
|
|
14
|
+
* `skipLibCheck: false` typecheck fail without the host tree. The one host
|
|
15
|
+
* augmentation the selector needs lives in `host-augment.d.ts`, which `tsc`
|
|
16
|
+
* consumes but never emits.
|
|
17
|
+
*
|
|
18
|
+
* @module dsh-boost/types
|
|
19
|
+
*/
|
|
20
|
+
/** Minimal projection of the host `Agent`: only session identity and cwd are read. */
|
|
21
|
+
export interface AgentLike {
|
|
22
|
+
session: {
|
|
23
|
+
header: {
|
|
24
|
+
id: string;
|
|
25
|
+
cwd?: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* The host's activation context for a step-time tool condition.
|
|
31
|
+
*
|
|
32
|
+
* Mirrors `dsh-tools`' `ToolActivationContext`; the plugin only passes it
|
|
33
|
+
* through, so the shape stays structural.
|
|
34
|
+
*/
|
|
35
|
+
export interface ToolActivationContext {
|
|
36
|
+
readonly agent: AgentLike;
|
|
37
|
+
readonly modelSelection: Readonly<Record<string, unknown>>;
|
|
38
|
+
readonly signal: AbortSignal;
|
|
39
|
+
}
|
|
40
|
+
/** The host's step-admitted tool set (`dsh-tools`' `ResolvedToolSet`). */
|
|
41
|
+
export interface ResolvedToolSet {
|
|
42
|
+
dispose(): void;
|
|
43
|
+
view(scope: unknown): ReadonlyMap<string, unknown>;
|
|
44
|
+
}
|
|
45
|
+
/** A model request as the selector builds it (structural; no host import). */
|
|
46
|
+
export interface GenerateOptions {
|
|
47
|
+
readonly [key: string]: unknown;
|
|
48
|
+
}
|
|
49
|
+
/** One streamed chunk as the selector consumes it (structural). */
|
|
50
|
+
export interface StreamChunk {
|
|
51
|
+
readonly [key: string]: unknown;
|
|
52
|
+
}
|
|
53
|
+
/** Host services and helpers used by the plugin. */
|
|
54
|
+
export interface PluginContext {
|
|
55
|
+
logger: {
|
|
56
|
+
info(msg: string): void;
|
|
57
|
+
warn(msg: string): void;
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Register a waterfall listener.
|
|
61
|
+
*
|
|
62
|
+
* `prepend` is cordis's ordering option: a prepended listener is unshifted,
|
|
63
|
+
* and cordis runs the first-registered listener outermost.
|
|
64
|
+
*/
|
|
65
|
+
on(event: string, handler: (...args: any[]) => unknown, options?: {
|
|
66
|
+
prepend?: boolean;
|
|
67
|
+
}): void;
|
|
68
|
+
tools: {
|
|
69
|
+
register(def: unknown, opts?: {
|
|
70
|
+
when?: (c: ToolActivationContext) => boolean | Promise<boolean>;
|
|
71
|
+
}): void;
|
|
72
|
+
resolve(context: ToolActivationContext): Promise<ResolvedToolSet>;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* The host LLM service. Soft: projection and admission never touch it, and
|
|
76
|
+
* the selector fails closed with `selector-unavailable` when it is absent.
|
|
77
|
+
*/
|
|
78
|
+
llm?: {
|
|
79
|
+
stream(opts: GenerateOptions): AsyncIterable<StreamChunk>;
|
|
80
|
+
};
|
|
81
|
+
systemPrompt: {
|
|
82
|
+
section(s: {
|
|
83
|
+
name: string;
|
|
84
|
+
order: number;
|
|
85
|
+
text: string | ((c: {
|
|
86
|
+
scope?: unknown;
|
|
87
|
+
}) => string);
|
|
88
|
+
interpolate?: boolean;
|
|
89
|
+
}): void;
|
|
90
|
+
};
|
|
91
|
+
get<T = unknown>(name: string): T | undefined;
|
|
92
|
+
}
|
|
93
|
+
/** Tool families that have projection parameters; every other tool is passed through. */
|
|
94
|
+
export type ToolFamily = 'read' | 'grep' | 'glob' | 'bash' | 'ssh';
|
|
95
|
+
/** Per-family receipt projection window, in characters (design §5.3). */
|
|
96
|
+
export interface ProjectionParams {
|
|
97
|
+
triggerChars: number;
|
|
98
|
+
headChars: number;
|
|
99
|
+
tailChars: number;
|
|
100
|
+
}
|
|
101
|
+
/** Plugin configuration surface; every key falls back to its design default when absent. */
|
|
102
|
+
export interface BoostConfig {
|
|
103
|
+
projection: Record<ToolFamily, ProjectionParams>;
|
|
104
|
+
admission: {
|
|
105
|
+
thresholdTokens: number;
|
|
106
|
+
};
|
|
107
|
+
selector: {
|
|
108
|
+
maxTokens: number;
|
|
109
|
+
};
|
|
110
|
+
stepsPerTurn: number;
|
|
111
|
+
horizonSteps: number;
|
|
112
|
+
historyTurns: number;
|
|
113
|
+
}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared types for dsh-boost.
|
|
3
|
+
*
|
|
4
|
+
* `PluginContext` is the minimal projection of the host services this plugin
|
|
5
|
+
* uses (`tools` and `systemPrompt` are required; `llm` is a soft service the
|
|
6
|
+
* selector resolves lazily); it is deliberately narrower than the full cordis
|
|
7
|
+
* `Context` so the behaviour modules can be tested against a fake host.
|
|
8
|
+
* `BoostConfig` mirrors the config surface published in `cordis.patch.yml`
|
|
9
|
+
* (design §5.3).
|
|
10
|
+
*
|
|
11
|
+
* Every shape here is structural. This module is reachable from the published
|
|
12
|
+
* `dist/index.d.ts`, and the package deliberately declares no host
|
|
13
|
+
* dependencies, so importing a host type here would make a consumer's
|
|
14
|
+
* `skipLibCheck: false` typecheck fail without the host tree. The one host
|
|
15
|
+
* augmentation the selector needs lives in `host-augment.d.ts`, which `tsc`
|
|
16
|
+
* consumes but never emits.
|
|
17
|
+
*
|
|
18
|
+
* @module dsh-boost/types
|
|
19
|
+
*/
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG","sourcesContent":["/**\n * Shared types for dsh-boost.\n *\n * `PluginContext` is the minimal projection of the host services this plugin\n * uses (`tools` and `systemPrompt` are required; `llm` is a soft service the\n * selector resolves lazily); it is deliberately narrower than the full cordis\n * `Context` so the behaviour modules can be tested against a fake host.\n * `BoostConfig` mirrors the config surface published in `cordis.patch.yml`\n * (design §5.3).\n *\n * Every shape here is structural. This module is reachable from the published\n * `dist/index.d.ts`, and the package deliberately declares no host\n * dependencies, so importing a host type here would make a consumer's\n * `skipLibCheck: false` typecheck fail without the host tree. The one host\n * augmentation the selector needs lives in `host-augment.d.ts`, which `tsc`\n * consumes but never emits.\n *\n * @module dsh-boost/types\n */\n\n/** Minimal projection of the host `Agent`: only session identity and cwd are read. */\nexport interface AgentLike {\n session: { header: { id: string; cwd?: string } }\n}\n\n/**\n * The host's activation context for a step-time tool condition.\n *\n * Mirrors `dsh-tools`' `ToolActivationContext`; the plugin only passes it\n * through, so the shape stays structural.\n */\nexport interface ToolActivationContext {\n readonly agent: AgentLike\n readonly modelSelection: Readonly<Record<string, unknown>>\n readonly signal: AbortSignal\n}\n\n/** The host's step-admitted tool set (`dsh-tools`' `ResolvedToolSet`). */\nexport interface ResolvedToolSet {\n dispose(): void\n view(scope: unknown): ReadonlyMap<string, unknown>\n}\n\n/** A model request as the selector builds it (structural; no host import). */\nexport interface GenerateOptions {\n readonly [key: string]: unknown\n}\n\n/** One streamed chunk as the selector consumes it (structural). */\nexport interface StreamChunk {\n readonly [key: string]: unknown\n}\n\n/** Host services and helpers used by the plugin. */\nexport interface PluginContext {\n logger: {\n info(msg: string): void\n warn(msg: string): void\n }\n /**\n * Register a waterfall listener.\n *\n * `prepend` is cordis's ordering option: a prepended listener is unshifted,\n * and cordis runs the first-registered listener outermost.\n */\n on(\n event: string,\n handler: (...args: any[]) => unknown,\n options?: { prepend?: boolean },\n ): void\n tools: {\n register(\n def: unknown,\n opts?: { when?: (c: ToolActivationContext) => boolean | Promise<boolean> },\n ): void\n resolve(context: ToolActivationContext): Promise<ResolvedToolSet>\n }\n /**\n * The host LLM service. Soft: projection and admission never touch it, and\n * the selector fails closed with `selector-unavailable` when it is absent.\n */\n llm?: {\n stream(opts: GenerateOptions): AsyncIterable<StreamChunk>\n }\n systemPrompt: {\n section(s: {\n name: string\n order: number\n text: string | ((c: { scope?: unknown }) => string)\n interpolate?: boolean\n }): void\n }\n get<T = unknown>(name: string): T | undefined\n}\n\n/** Tool families that have projection parameters; every other tool is passed through. */\nexport type ToolFamily = 'read' | 'grep' | 'glob' | 'bash' | 'ssh'\n\n/** Per-family receipt projection window, in characters (design §5.3). */\nexport interface ProjectionParams {\n triggerChars: number\n headChars: number\n tailChars: number\n}\n\n/** Plugin configuration surface; every key falls back to its design default when absent. */\nexport interface BoostConfig {\n projection: Record<ToolFamily, ProjectionParams>\n admission: { thresholdTokens: number }\n selector: { maxTokens: number }\n stepsPerTurn: number\n horizonSteps: number\n historyTurns: number\n}\n"]}
|
package/locale/en.json
ADDED
package/locale/zh.json
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,77 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-boost",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Cut DSH token usage by projecting tool receipts and skipping deterministic read-only calls.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/SAXEM1997/dsh-boost.git"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/SAXEM1997/dsh-boost",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/SAXEM1997/dsh-boost/issues"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"dsh",
|
|
17
|
+
"dsh-plugin",
|
|
18
|
+
"token-efficiency",
|
|
19
|
+
"prompt-cache",
|
|
20
|
+
"tool-receipt",
|
|
21
|
+
"delegation"
|
|
22
|
+
],
|
|
23
|
+
"main": "./dist/index.js",
|
|
24
|
+
"types": "./dist/index.d.ts",
|
|
25
|
+
"exports": {
|
|
26
|
+
".": {
|
|
27
|
+
"types": "./dist/index.d.ts",
|
|
28
|
+
"import": "./dist/index.js",
|
|
29
|
+
"require": "./dist/index.js",
|
|
30
|
+
"default": "./dist/index.js"
|
|
31
|
+
},
|
|
32
|
+
"./package.json": "./package.json",
|
|
33
|
+
"./locale/*.json": "./locale/*.json"
|
|
34
|
+
},
|
|
35
|
+
"scripts": {
|
|
36
|
+
"clean": "node scripts/clean.mjs",
|
|
37
|
+
"build": "node scripts/clean.mjs && tsc -p tsconfig.json",
|
|
38
|
+
"typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.test.json",
|
|
39
|
+
"test": "node --import tsx --test \"test/**/*.test.ts\"",
|
|
40
|
+
"stats": "node scripts/session-stats.mjs",
|
|
41
|
+
"ci": "npm run typecheck && npm test && npm run build",
|
|
42
|
+
"verify:package": "node scripts/verify-package.mjs",
|
|
43
|
+
"prepare": "npm run build",
|
|
44
|
+
"prepublishOnly": "npm run ci && npm run verify:package"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@deepseek-ai/dsh-llm": "0.2.2-rc.4",
|
|
48
|
+
"@deepseek-ai/dsh-tools": "0.2.2-rc.4",
|
|
49
|
+
"@deepseek-ai/dsh-spill-policy": "0.2.2-rc.4",
|
|
50
|
+
"@deepseek-ai/dsh-token-meter": "0.2.2-rc.4",
|
|
51
|
+
"@types/node": "^22.10.0",
|
|
52
|
+
"tsx": "^4.19.0",
|
|
53
|
+
"typescript": "^5.6.0"
|
|
54
|
+
},
|
|
55
|
+
"publishConfig": {
|
|
56
|
+
"registry": "https://registry.npmjs.org/",
|
|
57
|
+
"access": "public"
|
|
58
|
+
},
|
|
59
|
+
"engines": {
|
|
60
|
+
"node": ">=24.9.0",
|
|
61
|
+
"dsh": "0.2.2-rc.4"
|
|
62
|
+
},
|
|
63
|
+
"dsh": {
|
|
64
|
+
"bundle": {
|
|
65
|
+
"patch": "./cordis.patch.yml"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"files": [
|
|
69
|
+
"dist",
|
|
70
|
+
"locale",
|
|
71
|
+
"cordis.patch.yml",
|
|
72
|
+
"README.md",
|
|
73
|
+
"README.en.md",
|
|
74
|
+
"LICENSE",
|
|
75
|
+
"NOTICE"
|
|
76
|
+
]
|
|
77
|
+
}
|