pi-smart-compact 7.13.2 → 7.14.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.
Files changed (36) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/dist/app/pending-slot.d.ts +88 -0
  3. package/dist/app/pending-slot.d.ts.map +1 -0
  4. package/dist/app/run-context.d.ts +12 -10
  5. package/dist/app/run-context.d.ts.map +1 -1
  6. package/dist/app/run-smart-compact.d.ts +13 -8
  7. package/dist/app/run-smart-compact.d.ts.map +1 -1
  8. package/dist/app/steps/persist.d.ts.map +1 -1
  9. package/dist/app/steps/window.d.ts.map +1 -1
  10. package/dist/constants.d.ts +7 -1
  11. package/dist/constants.d.ts.map +1 -1
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +291 -150
  14. package/dist/infra/session-identity.d.ts +54 -0
  15. package/dist/infra/session-identity.d.ts.map +1 -0
  16. package/dist/phases/verify.d.ts.map +1 -1
  17. package/dist/types.d.ts +22 -0
  18. package/dist/types.d.ts.map +1 -1
  19. package/dist/ui/overlays.d.ts +3 -3
  20. package/dist/ui/overlays.d.ts.map +1 -1
  21. package/dist/utils/cache.d.ts +0 -2
  22. package/dist/utils/cache.d.ts.map +1 -1
  23. package/dist/utils/extraction.d.ts +22 -0
  24. package/dist/utils/extraction.d.ts.map +1 -1
  25. package/dist/utils/file-needles.d.ts +44 -0
  26. package/dist/utils/file-needles.d.ts.map +1 -0
  27. package/dist/utils/file-ref-detect.d.ts +50 -0
  28. package/dist/utils/file-ref-detect.d.ts.map +1 -0
  29. package/dist/utils/helpers.d.ts +1 -15
  30. package/dist/utils/helpers.d.ts.map +1 -1
  31. package/dist/utils/lru.d.ts +31 -0
  32. package/dist/utils/lru.d.ts.map +1 -0
  33. package/dist/utils/pruning.d.ts.map +1 -1
  34. package/dist/utils/session-log.d.ts +31 -0
  35. package/dist/utils/session-log.d.ts.map +1 -1
  36. package/package.json +9 -7
package/CHANGELOG.md CHANGED
@@ -1,5 +1,40 @@
1
1
  # Changelog
2
2
 
3
+ ## [7.14.0] - 2026-05-30
4
+
5
+ ### Fixed
6
+ - **Cross-session leak guard** — The pending compaction payload now carries the originating pi session id and is refused if the consuming session does not match. Two pi sessions sharing the same Node process (a common sub-agent setup) can no longer apply each other's prepared summaries. The fallback identifier for sessions that the host cannot resolve is per-call unique (`unresolved:<uuid>`) so two unresolved sessions never collide.
7
+ - **`patchSummary` provider cap** — The verifier's repair LLM call now clamps `maxTokens` to the active provider's true output ceiling instead of a hard-coded 8192, preventing provider-side errors on DeepSeek/MiniMax (cap 4096) and wasted budget elsewhere.
8
+ - **File-reference heuristic** — Verification no longer flags version strings (`v7.13.2`, `0.78.0`), runtime versions (`node 22.19.19`), or package identifiers as "potentially fabricated files". The classifier now rejects SemVer-shaped tokens, requires the last path segment to be a non-version when a slash is present, and otherwise requires a known source/config extension.
9
+ - **Bugfix-loop file attribution** — Unresolved errors are no longer attached to every file in the tree whose basename happens to appear in the error message. Attribution now uses progressively-longer path-suffix needles and skips generic basenames (`index.ts`, `types.ts`, ...) unless the error mentions the full `dir/<basename>` segment.
10
+ - **Auto-trigger notification wording** — The post-pipeline toast no longer claims "Compaction completed" when only the smart summary has been staged (the native compact has not yet run). The wording now reflects whether a payload is pending ("Smart compact prepared in ... — awaiting native /compact") or no payload was produced ("run finished").
11
+ - **LRU promotion correctness** — The session-log cache promotion check now gates on `Map.has`, not `value !== undefined`, so future cache value types that legitimately include `undefined` are still promoted to the most-recent slot.
12
+
13
+ ### Added
14
+ - **Encapsulated `PendingSlot` API** — The pending compaction payload now lives in a closure-based factory (`src/app/pending-slot.ts`) with a discriminated `ConsumeResult` (`ok` | `empty` | `expired` | `mismatch`). The slot owns its entire lifecycle (set / consume / clear / expire / mismatch) inside a single file, exposes a side-effect-free `peek()` for read-only display paths, accepts an injectable clock for deterministic tests, and is fully host-agnostic.
15
+ - **Bounded session-log caches with env override** — Both `logPathCache` and `messageMapCache` are now LRU-bounded (default 8 entries). The cap is tunable via the `SMART_COMPACT_LOG_CACHE_MAX` environment variable; invalid values silently fall back to the default so a `.env` typo never disables the cache. LRU helpers extracted to `src/utils/lru.ts` for isolation and reuse.
16
+ - **Single-source-of-truth `VERSION`** — The version literal in `src/constants.ts` is regenerated from `package.json` at `prebuild` time by `scripts/sync-version.ts`. The validator refuses any non-SemVer value, defending the generated source line against an attacker-controlled or merge-corrupted `package.json`. Pure validation/rewrite logic lives in `scripts/sync-version-lib.ts` and is unit-tested without filesystem access.
17
+ - **Test-only resets** — `__resetSessionLogCachesForTests` and `_getMaxEntriesForTests` allow deterministic test setup of the session-log module.
18
+
19
+ ### Changed
20
+ - **Pipeline narrowed to `ExtensionContext`** — The smart-compact orchestrator no longer requires `ExtensionCommandContext`; the same code path now serves both interactive commands and the `session_before_compact` event handler with zero `as unknown as` casts. The narrower type makes "the pipeline only touches the shared host surface" a compile-time invariant.
21
+ - **Module-level singletons removed** — The historical `_compactSessionId` cache singleton was redundant with the per-run `services.compactSessionId` and has been deleted. Production callers always flow through the services container; a private `fallbackSessionId()` is retained only for callers that omit `services` entirely.
22
+ - **`extractText` / `flattenToolCallBlock` deduplicated** — The `multi_tool_use.parallel` flatten logic that was previously inlined in three places is now a single module-level helper with a typed `FlatToolCall` interface. `extractText` uses the shared `isTextBlock` type guard rather than inline structural casts.
23
+ - **`Cell<T>` type alias** — Shared mutable single-slot ref cells (`isRunning`, `cancellationOut`) are now typed as `Cell<T>` instead of `{ value: T }` inline literals.
24
+
25
+ ### Performance
26
+ - **Pruning single-pass walk** — `pruneRedundant` previously walked the message list up to four times (build kept list, build final list, two `estimateTokens(map+join)` calls) for ~40-60ms of overhead on 5k-message sessions. Now folded into a single forward pass. As a side effect the rewrite **fixes a latent token-accuracy bug**: `estimateTokens` only applies the JSON-shape penalty when the input *starts* with `{`/`[`, so the previous global-string concatenation under-counted JSON-heavy tool outputs. Per-message estimation now reflects the true token count.
27
+ - **Open-loop attribution** — File-needle generation is hoisted out of the inner error loop, eliminating the prior N(errors) × M(files) re-computation.
28
+
29
+ ### Tests
30
+ - **115 new test cases (289 → 404)** across seven new files covering `resolveSessionId` (1000-iteration uniqueness loop), `PendingSlot` lifecycle (15 cases including TTL boundary, set overwrite, cross-session mismatch), `lruGet`/`lruSet` (undefined/null value regressions), `getMaxEntries` env override, file-reference heuristic (SemVer rejection integration), file-needle generator (generic-basename gate, length threshold), and `sync-version` SemVer validation (injection vector).
31
+
32
+ ### Build
33
+ - **TypeScript 6.0** — Upgraded from 5.9 with no source changes required; the project's `tsconfig.json` was already aligned with every 6.0 mandatory default.
34
+ - **`@earendil-works/pi-*` 0.78.0** — Pi runtime peers upgraded from 0.75.5. Peer dependency ranges remain wide (`*`).
35
+ - **`@types/node` 24 LTS** — Upgraded from 22. Node 25 deliberately skipped (not LTS).
36
+ - **`typebox` 1.1.39** — Patch upgrade.
37
+
3
38
  ## [7.13.2] - 2026-05-26
4
39
 
5
40
  ### Changed
@@ -0,0 +1,88 @@
1
+ /**
2
+ * Pending-compaction slot.
3
+ *
4
+ * A single-element, owner-private state cell that holds the *most recently
5
+ * prepared* `PendingCompaction` until the next `session_before_compact`
6
+ * event consumes it. Concurrency model:
7
+ *
8
+ * - One producer (`runSmartCompact` → `stagePendingCompaction`).
9
+ * - One consumer (`session_before_compact` event handler).
10
+ * - Single-threaded JS event loop; no atomic primitives needed.
11
+ *
12
+ * Design rationale — why an encapsulated factory instead of a mutable
13
+ * `{ value, createdAt }` ref-cell:
14
+ *
15
+ * 1. **Invariant centralization.** The "set → consume → clear" lifecycle
16
+ * lives in one file. Callers cannot accidentally null `value` without
17
+ * also resetting `createdAt`, nor can they read a `value` snapshot
18
+ * against a freshly-overwritten `createdAt` (the original bare-ref
19
+ * shape allowed this race; see B3 in code-review #3).
20
+ *
21
+ * 2. **Observable consume result.** `consume()` returns a discriminated
22
+ * union that records *why* a payload was rejected (empty / expired /
23
+ * session-mismatch). The previous helper folded all three into
24
+ * `null`, which hid information the caller might want to surface as
25
+ * metrics or differentiated notifications.
26
+ *
27
+ * 3. **Atomic snapshot.** Every consume path destructures a single
28
+ * `{ value, createdAt }` snapshot up front so the TTL and id checks
29
+ * operate on a coherent view, even if a future maintainer threads an
30
+ * `await` into the middle of the function.
31
+ *
32
+ * 4. **No host-context coupling.** The slot does NOT call
33
+ * `ctx.ui.notify` itself — the caller decides the UX (silent metric,
34
+ * toast, log line). This keeps the module pure / fully unit-testable
35
+ * without a fake host context.
36
+ */
37
+ import type { PendingCompaction } from "../types.ts";
38
+ import { type SessionIdentityContext } from "../infra/session-identity.ts";
39
+ /**
40
+ * Outcome of `PendingSlot.consume()`. Discriminated union so callers can
41
+ * react differently to each rejection reason (e.g. log a stale payload at
42
+ * `warn`, but a cross-session mismatch at `error`).
43
+ */
44
+ export type ConsumeResult = {
45
+ kind: "ok";
46
+ pending: PendingCompaction;
47
+ } | {
48
+ kind: "empty";
49
+ } | {
50
+ kind: "expired";
51
+ ageMs: number;
52
+ } | {
53
+ kind: "mismatch";
54
+ expected: string;
55
+ actual: string;
56
+ };
57
+ /**
58
+ * Public surface of an owned pending-compaction slot. Producers call
59
+ * `set()` once they have a finished summary; consumers call `consume()` at
60
+ * the next compact boundary. `isPresent()` is a non-mutating peek used by
61
+ * the orchestrator for UI wording ("prepared, awaiting native /compact"
62
+ * vs. "run finished").
63
+ */
64
+ export interface PendingSlot {
65
+ set(pending: PendingCompaction): void;
66
+ consume(ctx: SessionIdentityContext): ConsumeResult;
67
+ clear(): void;
68
+ isPresent(): boolean;
69
+ /**
70
+ * Side-effect-free read. Returns the staged payload without consuming it
71
+ * or running any guard checks. Intended for *display* paths (e.g. a tool
72
+ * response that wants to surface `tokensBefore` after a prepare-only run).
73
+ * Callers must NOT pass the returned payload to the host — only `consume`
74
+ * enforces the freshness + session-match invariants.
75
+ */
76
+ peek(): Readonly<PendingCompaction> | null;
77
+ }
78
+ /**
79
+ * Optional injection seam for `Date.now`. Tests pass a fake clock so they
80
+ * can advance time without `await new Promise(setTimeout)`. Production
81
+ * callers omit this and get real wall-clock time.
82
+ */
83
+ export interface PendingSlotOptions {
84
+ ttlMs: number;
85
+ now?: () => number;
86
+ }
87
+ export declare function createPendingSlot(opts: PendingSlotOptions): PendingSlot;
88
+ //# sourceMappingURL=pending-slot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pending-slot.d.ts","sourceRoot":"","sources":["../../src/app/pending-slot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAoB,KAAK,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAE7F;;;;GAIG;AACH,MAAM,MAAM,aAAa,GACrB;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,OAAO,EAAE,iBAAiB,CAAA;CAAE,GAC1C;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,GACjB;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAClC;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAE3D;;;;;;GAMG;AACH,MAAM,WAAW,WAAW;IAC1B,GAAG,CAAC,OAAO,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACtC,OAAO,CAAC,GAAG,EAAE,sBAAsB,GAAG,aAAa,CAAC;IACpD,KAAK,IAAI,IAAI,CAAC;IACd,SAAS,IAAI,OAAO,CAAC;IACrB;;;;;;OAMG;IACH,IAAI,IAAI,QAAQ,CAAC,iBAAiB,CAAC,GAAG,IAAI,CAAC;CAC5C;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;CACpB;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,kBAAkB,GAAG,WAAW,CAoEvE"}
@@ -32,9 +32,10 @@
32
32
  * The final `RunContext = StatedRc` alias keeps backwards-compatible imports
33
33
  * working for the `applyCompaction` / metrics paths that ran post-`buildState`.
34
34
  */
35
- import type { ExtensionCommandContext } from "@earendil-works/pi-coding-agent";
35
+ import type { ExtensionContext } from "@earendil-works/pi-coding-agent";
36
36
  import type { Model, Api } from "@earendil-works/pi-ai";
37
- import type { CompressionProfile, PendingCompaction, LlmMessage, StructuredExtraction, ExplorationReport, ChunkSummary, SessionMessageEntry, PipelinePhaseTiming, CompactConfig, ProfileConfig, ProviderCapabilities, SmartCompactDetails, CompactionState, OpenLoop } from "../types.ts";
37
+ import type { CompressionProfile, LlmMessage, StructuredExtraction, ExplorationReport, ChunkSummary, SessionMessageEntry, PipelinePhaseTiming, CompactConfig, ProfileConfig, ProviderCapabilities, SmartCompactDetails, CompactionState, OpenLoop, Cell } from "../types.ts";
38
+ import type { PendingSlot } from "./pending-slot.ts";
38
39
  import type { PruningResult } from "../utils/pruning.ts";
39
40
  import type { CompactionTier } from "../utils/helpers.ts";
40
41
  import type { SmartCompactServices } from "../infra/services.ts";
@@ -47,10 +48,13 @@ export interface CancellationToken {
47
48
  /** Active setTimeout handle. Cleared in finally so we never leak timers. */
48
49
  timeoutId: ReturnType<typeof setTimeout> | null;
49
50
  }
50
- export interface PendingRef {
51
- value: PendingCompaction | null;
52
- createdAt: number;
53
- }
51
+ /**
52
+ * Backward-compat alias. The pipeline previously juggled a raw
53
+ * `{ value, createdAt }` ref-cell; the encapsulated `PendingSlot` API
54
+ * supersedes it. We keep the name in the run-context so existing wiring
55
+ * stays readable while every mutation goes through the slot's invariants.
56
+ */
57
+ export type PendingRef = PendingSlot;
54
58
  export interface RunFlags {
55
59
  verbose: boolean;
56
60
  dryRun: boolean;
@@ -63,15 +67,13 @@ export interface ResolvedAuth {
63
67
  headers?: Record<string, string>;
64
68
  }
65
69
  export interface RcBase {
66
- ctx: ExtensionCommandContext;
70
+ ctx: ExtensionContext;
67
71
  notify: Notifier;
68
72
  vlog: (msg: string) => void;
69
73
  services: SmartCompactServices;
70
74
  cancellation: CancellationToken;
71
75
  pendingRef: PendingRef;
72
- isRunning: {
73
- value: boolean;
74
- };
76
+ isRunning: Cell<boolean>;
75
77
  flags: RunFlags;
76
78
  userNote?: string;
77
79
  timeoutMs: number;
@@ -1 +1 @@
1
- {"version":3,"file":"run-context.d.ts","sourceRoot":"","sources":["../../src/app/run-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC/E,OAAO,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EACV,kBAAkB,EAAE,iBAAiB,EAAE,UAAU,EAAE,oBAAoB,EACvE,iBAAiB,EAAE,YAAY,EAAE,mBAAmB,EAAE,mBAAmB,EACzE,aAAa,EAAE,aAAa,EAAE,oBAAoB,EAAE,mBAAmB,EACvE,eAAe,EAAE,QAAQ,EAC1B,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAIjE,MAAM,MAAM,QAAQ,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,KAAK,IAAI,CAAC;AAE9F,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,eAAe,CAAC;IAC5B,MAAM,EAAE,WAAW,CAAC;IACpB,oDAAoD;IACpD,QAAQ,EAAE,OAAO,CAAC;IAClB,4EAA4E;IAC5E,SAAS,EAAE,UAAU,CAAC,OAAO,U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1B,UAAU,EAAE,MAAM,CAAC;CACpB;AACD,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,cAAc,CAAC;AAIpD,MAAM,WAAW,WAAY,SAAQ,cAAc;IACjD,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC;IACzB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,QAAQ,EAAE,OAAO,CAAC;CACnB;AACD,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,WAAW,CAAC;AAQ9C,MAAM,WAAW,SAAU,SAAQ,WAAW;IAC5C,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC;IACvB,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,eAAe,EAAE,eAAe,CAAC;IACjC,OAAO,EAAE,mBAAmB,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;CACrB;AACD,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC;AAE1C;;;;;;GAMG;AACH,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC;AAElC,uEAAuE;AACvE,wBAAgB,iBAAiB,CAC/B,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,mBAAmB,CAAC,OAAO,CAAC,EACnC,OAAO,EAAE,MAAM,EACf,KAAK,SAAa,GACjB,IAAI,CAGN;AAED,yEAAyE;AACzE,wBAAgB,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,mBAAmB,CAAC,OAAO,CAAC,GAAG,IAAI,CAE/E;AAED;;;;;;;GAOG;AACH,wBAAgB,OAAO,CAAC,GAAG,SAAS,MAAM,EAAE,IAAI,SAAS,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,IAAI,GAAG,IAAI,CAE/F"}
@@ -16,7 +16,8 @@
16
16
  * The function intentionally has no clever control flow: every cross-step
17
17
  * dependency is data on the stage type, every conditional is a boolean flag.
18
18
  */
19
- import type { ExtensionCommandContext } from "@earendil-works/pi-coding-agent";
19
+ import type { ExtensionContext } from "@earendil-works/pi-coding-agent";
20
+ import type { Cell } from "../types.ts";
20
21
  import type { Model, Api } from "@earendil-works/pi-ai";
21
22
  import type { CompressionProfile } from "../types.ts";
22
23
  import type { PendingRef } from "./run-context.ts";
@@ -38,16 +39,22 @@ export interface ExternalCancellation {
38
39
  }
39
40
  /** Options for runSmartCompact — avoids 10-parameter positional calls. */
40
41
  export interface SmartCompactOptions {
41
- ctx: ExtensionCommandContext;
42
+ /**
43
+ * The pipeline only touches members shared by `ExtensionContext` and
44
+ * `ExtensionCommandContext` (ui, cwd, sessionManager, modelRegistry,
45
+ * model, getContextUsage, compact). Using the narrower base type lets
46
+ * the `session_before_compact` event handler pass its context in without
47
+ * any cast, and makes the contract "what does the pipeline actually
48
+ * need?" explicit at the type level.
49
+ */
50
+ ctx: ExtensionContext;
42
51
  summaryModel: Model<Api>;
43
52
  segModel: Model<Api>;
44
53
  profile: CompressionProfile;
45
54
  verbose?: boolean;
46
55
  dryRun?: boolean;
47
56
  pendingRef: PendingRef;
48
- isRunning: {
49
- value: boolean;
50
- };
57
+ isRunning: Cell<boolean>;
51
58
  autoTriggered?: boolean;
52
59
  userNote?: string;
53
60
  skipCompact?: boolean;
@@ -61,9 +68,7 @@ export interface SmartCompactOptions {
61
68
  * its own hard timeout in addition to the in-pipeline one (some providers
62
69
  * ignore AbortSignal entirely).
63
70
  */
64
- cancellationOut?: {
65
- value: ExternalCancellation | null;
66
- };
71
+ cancellationOut?: Cell<ExternalCancellation | null>;
67
72
  }
68
73
  export declare function runSmartCompact(opts: SmartCompactOptions): Promise<void>;
69
74
  //# sourceMappingURL=run-smart-compact.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"run-smart-compact.d.ts","sourceRoot":"","sources":["../../src/app/run-smart-compact.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iCAAiC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"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAc,MAAM,gBAAgB,CAAC;AASpE;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,UAAU,GAAG,IAAI,CAGxD;AAED,wEAAwE;AACxE,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,UAAU,GAAG,IAAI,CA6BvD;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,EAAE,EAAE,UAAU,GAAG,iBAAiB,CAcxE;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,EAAE,EAAE,UAAU,GAAG,IAAI,CAoBpD"}
1
+ {"version":3,"file":"persist.d.ts","sourceRoot":"","sources":["../../../src/app/steps/persist.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAc,MAAM,gBAAgB,CAAC;AASpE;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,UAAU,GAAG,IAAI,CAGxD;AAED,wEAAwE;AACxE,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,UAAU,GAAG,IAAI,CA6BvD;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,EAAE,EAAE,UAAU,GAAG,iBAAiB,CAcxE;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,EAAE,EAAE,UAAU,GAAG,IAAI,CAmBpD"}
@@ -1 +1 @@
1
- {"version":3,"file":"window.d.ts","sourceRoot":"","sources":["../../../src/app/steps/window.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAOhE,wBAAgB,uBAAuB,CAAC,EAAE,EAAE,UAAU,GAAG,UAAU,GAAG,IAAI,CAkDzE"}
1
+ {"version":3,"file":"window.d.ts","sourceRoot":"","sources":["../../../src/app/steps/window.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAQhE,wBAAgB,uBAAuB,CAAC,EAAE,EAAE,UAAU,GAAG,UAAU,GAAG,IAAI,CAqDzE"}
@@ -2,7 +2,13 @@
2
2
  * Constants, prompts, and profile defaults.
3
3
  */
4
4
  import type { CompressionProfile, ProfileConfig } from "./types.ts";
5
- export declare const VERSION = "7.13.2";
5
+ /**
6
+ * Single-source-of-truth note: this literal is rewritten in place by
7
+ * `scripts/sync-version.ts` (wired to `prebuild`/`prepublishOnly`) from
8
+ * `package.json#version`. Do not hand-edit this line for releases; bump
9
+ * package.json and run `bun run sync-version`.
10
+ */
11
+ export declare const VERSION = "7.14.0";
6
12
  export declare const CHARS_PER_TOKEN = 3.8;
7
13
  export declare const COMPACT_SYSTEM_PREFIX: string;
8
14
  export declare const PROFILES: Record<CompressionProfile, ProfileConfig>;
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEpE,eAAO,MAAM,OAAO,WAAW,CAAC;AAChC,eAAO,MAAM,eAAe,MAAM,CAAC;AAEnC,eAAO,MAAM,qBAAqB,QAKqB,CAAC;AAExD,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,kBAAkB,EAAE,aAAa,CAyB9D,CAAC;AAEF,eAAO,MAAM,cAAc;aACF,kBAAkB;;kBAEnB,MAAM,GAAG,IAAI;uBACR,MAAM,GAAG,IAAI;;;;;;CAMzC,CAAC;AAEF,eAAO,MAAM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YAAY,QA8N7D"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAoB,MAAM,iCAAiC,CAAC;AA4EtF,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,EAAE,EAAE,YAAY,QAiO7D"}