pi-smart-compact 9.2.1 → 9.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/ARCHITECTURE.md CHANGED
@@ -87,7 +87,7 @@ as a **state machine of branded intersection types**. Each step accepts the
87
87
  previous stage type and returns the next, so reordering or skipping a step is a
88
88
  **compile-time error**, not a runtime crash:
89
89
 
90
- ```
90
+ ```text
91
91
  RcBase
92
92
  → PreparedRc (after prepare)
93
93
  → WindowedRc (after window)
@@ -537,7 +537,7 @@ The architecture intentionally biases toward safety:
537
537
  - hallucinated file-reference detection
538
538
  - stateful tracking of open loops and cross-compaction deltas
539
539
  - tool-driven compaction never compacts mid-turn
540
- - summaries preserve exact file paths and identifiers where possible
540
+ - summaries preserve exact file paths and identifiers where possible; saturated file lists use budgeted path tails plus collision-checked digests while scoped state retains full paths
541
541
  - the recent tail stays live outside the compacted region
542
542
 
543
543
  ## Extending the system
package/CHANGELOG.md CHANGED
@@ -1,5 +1,36 @@
1
1
  # Changelog
2
2
 
3
+ ## [9.3.1] - 2026-08-15
4
+
5
+ ### Fixed
6
+
7
+ - **Windows / GUI launches resolve `~/.pi/agent` correctly.** `home()` fell back to `"/tmp"` whenever `HOME` was unset — which is every Windows launch (Windows uses `USERPROFILE`, not `HOME`) and GUI launches that strip the environment. Settings, caches, run-locks, and backups were silently routed to `C:\tmp\.pi\agent`, so `settings.json` configuration (mode, models, thresholds, everything under `smartCompact`) was invisible to the extension. The fallback is now `os.homedir()`, matching how the pi host itself resolves its agent directory. The duplicated pattern in the session-log reader was unified onto the same helper (also fixing its path cache key).
8
+
9
+ ## [9.3.0] - 2026-08-15
10
+
11
+ ### Added
12
+
13
+ - Release gate now verifies host compatibility (`compat:pi latest`) as part of `release:check`, so upstream format changes surface before shipping instead of failing silently in the field.
14
+ - Backup transparency: when a conversation backup is written with redactions, a notice lists what was redacted (kind and count) so users know a restore will lack that data.
15
+ - Coarse Turkish suffix stemming in the semantic verifier: inflected restatements (`tabloları` → `tablolar`) now count as constraint/decision evidence, ending per-compaction duplicate re-injection of Turkish constraints. The stem guard protects short English words from two-letter suffixes.
16
+
17
+ ### Fixed
18
+
19
+ - **Zombie open loops**: a bugfix loop is now retired when its source error later appears in `resolvedErrors` (prefix-safe match over normalized truncated summaries, minimum-length guarded). Previously a resolved error's loop contradicted every subsequent summary ("no unresolved errors" + stale loop) until manually overridden, permanently consuming the bounded loop budget.
20
+ - **Goal breadcrumb accumulation**: `Previous goal:` lines are transient — at most the latest goal shift survives a compaction cycle, instead of accumulating up to 20 stale lines that starved real critical context under the 20-item budget.
21
+ - **Secret redaction false positives** no longer corrupt ground truth or backups: key-based redaction requires string values of at least 8 characters (numbers, booleans and nested objects are configuration shapes such as map pins or parser options); the `pin` key no longer counts as secret-bearing; the credential pattern spares dotted environment references (`token: process.env.API_KEY`); payment-card detection requires Luhn validity so epoch timestamps and long numeric IDs survive PII scrubbing. Rejected candidates are no longer counted as redactions.
22
+ - Unreachable retry-loop extraction branch removed: every unresolved error already produced a bugfix loop, so the former "retry" branch could never add anything.
23
+ - Follow-up and blocked-loop deduplication now requires content kinship in addition to message proximity, so a genuine new task phrased within five messages of an error loop is no longer silently dropped.
24
+ - Completion scanning sees past ack-only user nudges ("devam et", "ok", "go ahead"), retiring loops whose completion lands one user turn later.
25
+ - Topic segmentation ignores generic basenames (`index.ts` and friends) as file-shift signals, preventing monorepo churn from shredding the conversation into micro-segments.
26
+ - Provider watchdog scales by the provider's timeout profile (`getProviderCaps().timeoutMultiplier`): slow providers are no longer cut at the raw 15–90s window and silently degraded to deterministic fallback summaries. Explicitly configured watchdog values are never scaled.
27
+ - Flaky lifecycle e2e timeout raised 5s → 20s (actual runtime ~6.5s on slower agents).
28
+
29
+ ### Changed
30
+
31
+ - Repo-wide formatter pass (arrow parameter parentheses, multiline signature expansion, trailing comma normalization) with verified zero semantic changes.
32
+ - Internal hygiene: `summaryPathLine`/`renderBatchMessage` are module-private again, dead damage-window constants removed.
33
+
3
34
  ## [9.2.1] - 2026-08-11
4
35
 
5
36
  ### Fixed
@@ -233,11 +264,13 @@
233
264
  ## [7.22.0] - 2026-07-15
234
265
 
235
266
  ### Added
267
+
236
268
  - Independent `summaryThinkingLevel` and `segmentationThinkingLevel` settings control per-phase reasoning, including `max`, while preserving provider defaults when unset.
237
269
 
238
270
  ## [7.21.0] - 2026-07-15
239
271
 
240
272
  ### Fixed
273
+
241
274
  - Canonical summary parsing now recognizes canonical H3 headings, merges duplicate sections, and preserves H3-only summaries during state injection.
242
275
  - File verification uses collision-aware path needles; one monorepo basename can no longer satisfy multiple modified files.
243
276
  - Every deterministic verification gap is repaired regardless of scalar score; typed gaps and repair provenance replace string-prefix policy.
@@ -248,6 +281,7 @@
248
281
  - LLM call counts now come from the run-scoped metrics sink, including probes, retries, failures and patches.
249
282
 
250
283
  ### Added
284
+
251
285
  - High-confidence secret scrubbing at provider, extraction-cache, backup, state and pending-summary boundaries; optional PII scrubbing.
252
286
  - Optional fail-closed manual Apply/Cancel approval gate with verification provenance.
253
287
  - Exact max-call and max-latency budgets with deterministic degradation, plus `--focus` budget weighting.
@@ -256,6 +290,7 @@
256
290
  - Deterministic adversarial EESV release gate (`bun run gate`) covering parser, verification, tools, cache, budgets, scrubbing and damage.
257
291
 
258
292
  ### Changed
293
+
259
294
  - Public README redesigned for npm, GitHub and Pi package surfaces with install-first quick start, progressive EESV documentation, complete configuration, safety/privacy guidance and current recovery/observability flows.
260
295
  - Extraction and exploration share one deduplicated fact context; runtime call accounting now comes from the metrics sink instead of inferred round counts.
261
296
  - CI and the release checklist now run the adversarial EESV gate.
@@ -263,26 +298,31 @@
263
298
  ## [7.20.0] - 2026-07-14
264
299
 
265
300
  ### Fixed
301
+
266
302
  - **Mixed parallel tool calls could lose unrelated edits** — redundant-read and failed-chain pruning deleted an entire assistant message when only one nested tool call was redundant. Pruning now removes individual direct or `multi_tool_use.parallel` blocks while preserving sibling calls, text, and tool-result pairing.
267
303
  - **`smart_compact` ignored host cancellation** — the tool now links Pi's `AbortSignal` to the pipeline controller, handles already-aborted calls before authentication, removes listeners in `finally`, and prevents stale pending summaries.
268
304
  - **Cross-compaction delta omissions** — removed decisions and resolved errors now count as meaningful changes and render correctly through one shared delta predicate.
269
305
 
270
306
  ### Added
307
+
271
308
  - **Pi version compatibility runner** — `bun run compat:pi [version]` validates an exact or latest Pi release in an isolated temporary workspace without changing the checkout. Daily CI exercises the latest host packages; a package-boundary regression test prevents accidental bundling or version pinning.
272
309
  - **Repeatable hot-path benchmark** — `bun run bench` reports median/p95 performance for incremental extraction and pruning.
273
310
 
274
311
  ### Changed
312
+
275
313
  - **Pi core dependency boundary** — `@earendil-works/pi-*` and `typebox` are host-provided wildcard peers only; duplicated versioned development dependencies were removed. The lockfile remains the reproducible local baseline.
276
314
  - **Bounded runtime logs** — metrics and damage JSONL logs retain complete trailing records under a 5 MiB cap using the same lock as concurrent appenders.
277
315
  - **Metrics UI separation** — text/HTML reporting moved from `utils/cache.ts` to `ui/metrics-report.ts`, reusing shared dashboard formatters; legacy service lifecycle comments now match production's run-scoped DI.
278
316
  - **Deferred filesystem maintenance** — extraction-cache cleanup now runs on a later event-loop turn rather than in the microtask queue.
279
317
 
280
318
  ### Performance
319
+
281
320
  - **Incremental extraction** — cache hits no longer build an unused full-history tool-call index. The 5,000-message benchmark reduced the measured median from about 0.133 ms to 0.035 ms on the development machine (~74%).
282
321
 
283
322
  ## [7.19.0] - 2026-07-10
284
323
 
285
324
  ### Fixed
325
+
286
326
  - **Durable state never persisted on auto/tool paths (C1)** — `persistDurableState` only ran from `applyCompaction`'s `onComplete`, which auto-trigger and tool runs never reach (early return on `skipCompact || autoTriggered`). Project fingerprint, compaction state, and the whole cross-compaction delta/damage-baseline chain silently never ran on the most common path. `PendingCompaction` now carries `projectId` + `extraction`, and the new `persistConsumedState` persists exactly once at the `session_before_compact` consume point — the single apply moment shared by all three run types.
287
327
  - **UTF-8 corruption in session-log streaming (C2)** — `streamJsonlLines` decoded each 64KB chunk with a bare `toString("utf-8")`; a multi-byte character split across the chunk boundary became U+FFFD and silently failed that line's `JSON.parse`, dropping the message to its truncated branch copy. Now uses `StringDecoder`.
288
328
  - **Lock stale-reclaim race (M3)** — two waiters both observing a stale `.lock` could end up co-holding it (`rmdir` of a freshly reclaimed lock). Reclaim now goes through an atomic rename-steal; exactly one thief wins, and a stolen-but-live lock is restored.
@@ -294,6 +334,7 @@
294
334
  - **`createServices` captured the LLM client eagerly** — a `setLlmClient` installed after the bag was created was ignored, breaking the seam's call-time-resolution contract; the bag now holds a lazy delegate.
295
335
 
296
336
  ### Changed
337
+
297
338
  - **Metrics surface migrated to explicit DI** — removed the module-level compatibility shims (`resetMetrics`, `getMetrics`, `resetExtractionCacheStats`) and the hidden `getDefaultServices()` fallbacks on `recordMetric`/`getMetricsSummary`/`appendMetricsLog`/`getExtractionCacheStats`/`cacheOpts`. All consumers pass the run-scoped services bag; the single sanctioned fallback lives at the top of `trackedComplete`.
298
339
  - **Backup prune deferral is a real macrotask** — `queueMicrotask` ran before control returned to the event loop, so the readdir+stat scan still blocked the triggering turn; now `setTimeout(0)`.
299
340
  - **Perf** — dropped the write-only `prunedToolCallIndex` from `RunContext`; capped `estimateTokens`' Turkish-character scan to the same 8KB sample as the JSON-density check; removed a per-ref Set re-materialization in `verifySummary`.
@@ -301,20 +342,24 @@
301
342
  ## [7.18.2] - 2026-07-09
302
343
 
303
344
  ### Fixed
345
+
304
346
  - **Extension load failure after 7.18.1** — 7.18.1 imported `complete` from the `@earendil-works/pi-ai/compat` subpath statically, which is not aliased by some host builds and crashed the extension at load time (`Cannot find module .../dist/index.js/compat`). `complete` is now resolved with a dynamic `import("@earendil-works/pi-ai/compat")` on first use, which is aliased by the host loader and resolves directly in raw node — works in both host and test contexts, and can never break extension loading.
305
347
 
306
348
  ## [7.18.1] - 2026-07-09
307
349
 
308
350
  ### Fixed
351
+
309
352
  - **TUI model selection override** — when `summaryModel` was set in config, picking a different model in the compact picker still ran the configured default; explicit selections (TUI picker / CLI model arg) now win over `config.summaryModel`. Auto-trigger and tool paths still fall back to the configured default.
310
353
 
311
354
  ### Changed
355
+
312
356
  - **Dependencies** — bumped `@earendil-works/*` 0.79.6 → 0.80.3, `typebox` 1.2.16 → 1.3.6, `@types/node` 26.0.1 → 26.1.1, `typescript` 6.0.3 → 7.0.2.
313
357
  - **`complete` import** — pi-ai 0.80 removed the standalone `complete()`/`stream()` from the package root; now imported from `@earendil-works/pi-ai/compat` (the host's `ModelRegistry` is itself compat-backed, so this is the extension-correct path until the host's ModelManager migration lands).
314
358
 
315
359
  ## [7.18.0] - 2026-06-26
316
360
 
317
361
  ### Fixed
362
+
318
363
  - **`mergeExtractions` mainGoal corruption** — incremental extraction replaced the original goal with a delta-suffix message; now prefers `base.mainGoal`.
319
364
  - **`mergeExtractions` boundary gap** — `lastUserMessages`/`lastErrors` now span the cache boundary instead of dropping base's tail.
320
365
  - **`catalogErrors` id-less retry** — retry resolution falls back to tool-name match when the retry call lacks an id.
@@ -328,10 +373,12 @@
328
373
  - **`estimateTokens` JSON** — density fallback for non-brace-first JSON (capped at 8KB).
329
374
 
330
375
  ### Added
376
+
331
377
  - **`domain/keywords.ts`** — `extractCheckKeywords` (shared by verify + damage).
332
378
  - **Centralized constants** — `TRUNC` (truncation budgets), `ID_PREFIX`, `TUNING` (EMA/clamp/confidence), shared durations, `EXTRACTION_CACHE_PREFIX`, `LIKELY_ERROR_RE`.
333
379
 
334
380
  ### Changed
381
+
335
382
  - **Zero inline magic values** — ~70 truncation literals, ID prefixes, confidence scores, TTL duplications (7d×3, 1h×2), and tuning factors centralized into named constants.
336
383
  - **`makeCompactSessionId`** — single source (services.ts); cache.ts fallback deduped.
337
384
  - **`damage.ts` re-question** — shared `extractCheckKeywords` (threshold relaxed for high-precision salient tokens).
@@ -339,30 +386,36 @@
339
386
  ## [7.17.0] - 2026-06-26
340
387
 
341
388
  ### Added
389
+
342
390
  - **Name-agnostic tool classification** (`src/domain/tool-semantics.ts`) — a pure `classifyTool(args)` that classifies a tool call by its argument shape (`mutates` / `accesses` / `executes` / `other`) plus `extractToolPath(args)`. A tool is a write because its arguments carry a content payload, not because its name contains "write" — so this auto-adapts to tools the code has never seen (`hypa_*`, MCP servers, custom extensions) with no name list to maintain.
343
391
 
344
392
  ### Changed
393
+
345
394
  - **Extraction is now name-agnostic.** `trackFileOps`, `catalogErrors`, `segmentTopicsHeuristic` (`utils/extraction.ts`), `get_file_changes` (`phases/explore.ts`), and re-read detection (`utils/damage.ts`) all classify via `classifyTool` instead of substring name matching. Removes the `WRITE/DELETE/READ_TOOL_HINTS` lists, `hasToolHint`, and the hardcoded `=== "bash"` gate. Shell-like tools (`hypa_shell`, …) and path-bearing readers (`hypa_grep`/`find`/`ls`) are now detected correctly by argument shape.
346
395
  - **Model resolution deduplicated** (`index.ts`) — the `provider/id` split + `modelRegistry.find` pattern (duplicated three times) is now a single `findModelById` helper; `resolveModelArg` removed.
347
396
  - **`SHIFT_RE` Turkish coverage** — the topic-shift cue regex was ASCII-only and silently missed natural Turkish spellings (`şimdi`, `geçelim`, `bakalım`, `yapalım`, `başka`); both spellings now match, consistent with `FOLLOWUP_RE`'s dual-spelling convention.
348
397
  - **`CONSTRAINT_PATTERNS` readability** — the Turkish regexes use raw UTF-8 characters instead of `\u00f6`/`\u015f` escapes (the source is UTF-8; the escapes added no value and hurt readability).
349
398
 
350
399
  ### Fixed
400
+
351
401
  - **`trackFileOps` duplicated branch** — the `isTruncated` and `!NO_OP_RE` arms had identical bodies; collapsed into one condition (`isTruncated(resultText) || !NO_OP_RE.test(resultText)`).
352
402
  - **Dead locals in `segmentTopicsHeuristic`** — `type` and `primaryFile` were assigned every iteration but never read (the topic push uses `currentType`/`currentPrimaryFile`); removed. Path lookup now uses `extractToolPath`, matching the other consumers.
353
403
 
354
404
  ### Tests
405
+
355
406
  - New `test/tool-semantics.test.ts` covering all four tool classes, the path-only delete/read ambiguity, and `extractToolPath` across key variants. Extraction fixtures updated to realistic content payloads; a regression case proves an unknown tool name (`totally_unknown_mcp_tool`) is still classified correctly. Suite: 501 tests across 43 files.
356
407
 
357
408
  ## [7.16.0] - 2026-06-18
358
409
 
359
410
  ### Added
411
+
360
412
  - **Pinned never-compact context** (`smartCompact.pinPaths`) — file paths that must always survive compaction regardless of what the LLM summary includes. Surfaced in the summary's Files Read via a deterministic, LLM-free `ensurePinnedPaths` step in `buildState`.
361
413
  - **Damage auto-remediation** — `detectDamage` now collects the files the agent re-reads after a compaction (`reReadFiles`), persists them as remediation hints, and the *next* compaction re-preserves them (merged with `pinPaths`) so lost context stops being lost twice. Closes the detect → remediate loop.
362
414
  - **`/smart-compact restore`** — list, view, and restore backups. `listBackups`/`readBackupContent` make the previously write-only backups browsable; `showRestorePicker` + `showRestoreAction` + `showBackupViewer` provide a TUI; and a true restore forks from the current leaf and re-injects the pre-compaction content as context via `sendMessage` (graceful fallback to view on any failure).
363
415
  - `asBranchMessage` / `asSerializableMessages` boundary adapters in `src/infra/ai-messages.ts`, documenting why each cross-package upcast is sound.
364
416
 
365
417
  ### Fixed
418
+
366
419
  - **session-log timestamp** — `normalizeLogMessage` stamped `Date.now()` (the recovery wall-clock) gated on a nonsensical content-shape condition, and dropped `toolName`. Now parses the log entry's real timestamp and preserves `toolName`.
367
420
  - **`synthesize` empty-batch guard** — `batches[0]` could be dereferenced when the chunk list was empty; now guarded with a deterministic fallback.
368
421
  - **`backupDir` config validation** — the one config key without type validation now rejects non-string values.
@@ -373,51 +426,63 @@
373
426
  - **state.ts basename recompute** — the per-error file-attribution basename is now precomputed once instead of recomputed for every (error × file) pair.
374
427
 
375
428
  ### Changed
429
+
376
430
  - **Message cast normalization** — the explore feedback loop now builds native `Message[]` (assistant turns are the real `AssistantMessage` from `trackedComplete`, no longer downcast to `LlmMessage`); `recover`/`persist`/`extract` route through the documented `asBranchMessage`/`asSerializableMessages` adapters. Removes the lossy `as unknown as Message[]` casts and the silent dropping of `usage`/`api`/`provider`/`model`/`stopReason`.
377
431
  - **Tools cast normalization** — `EXPLORATION_TOOLS` is now declared as native `Tool[]` using typebox schemas, removing both `as unknown as Parameters<...>["tools"]` casts. Behavior-preserving: every pi-ai provider only serializes the schema, so real typebox schemas are wire-identical to the previous plain JSON-schema objects.
378
432
  - `failedChunkSummary` co-located with `assembleFallback` in `phases/synthesize.ts` and exported (was an untested module-private in the step module).
379
433
  - `buildExplorationReportFromParsed` parameter narrowed `any` → `unknown` with proper field validation.
380
434
 
381
435
  ### Build
436
+
382
437
  - **pi runtime peers resolved 0.79.4 → 0.79.6** and **typebox 1.2.11 → 1.2.16** in the lockfile. `peerDependencies`/`devDependencies` keep their `*` wildcard ranges per the forward-compatibility policy from 7.15.0.
383
438
 
384
439
  ### Tests
440
+
385
441
  - **+79 tests (414 → 493):** type-guards validators (`isValidSmartCompactDetails`/`sanitizeSmartCompactDetails`), synthesize fallback contracts (`assembleFallback`/`failedChunkSummary`), `ai-messages` adapters, pinned-paths injection, remediation-hints round-trip, backup restore (list/read/build-restore-message), and exploration boundary normalization (negative clamp, confidence guard, non-string mainGoal).
386
442
 
387
443
  ### Docs
444
+
388
445
  - README, ARCHITECTURE, CONTRIBUTING, SECURITY, SUPPORT, RELEASE, and CODE_OF_CONDUCT redesigned; new `docs/assets/banner.svg` hero. CONTRIBUTING drift fixed (`core.ts`/`DEVPLAN.md`/`ROADMAP.md` references removed; repo map updated to the layered architecture).
389
446
 
390
447
  ## [7.15.1] - 2026-06-15
391
448
 
392
449
  ### Fixed
450
+
393
451
  - **Delta section placement** — `injectDeltaSection` contained a dead ternary (`hasOpenLoops ? "next-steps" : "next-steps"`) that made the `hasOpenLoops` computation unreachable, so the "Changes Since Last Compaction" section always anchored before `Next Steps` regardless of whether `Open Loops` was present. The domain layer (`summary-parse.ts`) now supports a structured `SectionPlacement` hint with both `before` and `after` semantics; the delta injector anchors *after* `Open Loops` when present, otherwise *before* `Next Steps`. The new object form is additive — the legacy positional `before` argument remains backward-compatible.
394
452
  - **Shadowed catch binding in exploration parser** — `parseExplorationReport` used `e` for both `lastIndexOf("}")` and the per-`catch` error, which compiled but was a confusing trap for future edits. Renamed the loop bounds to `startIdx`/`endIdx` and the catch bindings to `err`.
395
453
  - **Defensive guards in LLM-output parsing** — `buildExplorationReportFromParsed` now validates `typeof parsed === "object"` before touching it, so a model that returns a primitive JSON value (`42`, `"ok"`, `true`, `null`) falls back to heuristic boundaries instead of risking a `TypeError`.
396
454
  - **Non-negative index guard** — `branchIndexToMsgIndex` (used by anchor-aware keep-boundary resolution) now clamps to `Math.max(0, ...)`, so a future code path that reaches it without a prior message entry can never produce a negative index.
397
455
 
398
456
  ### Changed
457
+
399
458
  - **Typed theme in TUI overlays** — `renderContextBar` and `renderTokenBar` no longer take `theme: any`; they now use the real `Theme` class exported from `@earendil-works/pi-coding-agent`, restoring compile-time type safety over `.fg()` / `.bold()` calls without inventing a parallel local interface.
400
459
 
401
460
  ### Build
461
+
402
462
  - **Pi runtime peers 0.79.4** — `@earendil-works/pi-ai`, `@earendil-works/pi-coding-agent`, and `@earendil-works/pi-tui` resolved from 0.79.0 → 0.79.4. Peer dependency ranges remain wide (`*`).
403
463
  - **`typebox` 1.2.11** — Patch upgrade from 1.2.3.
404
464
  - **`@types/node` 25.9.3** — Patch upgrade from 25.9.2.
405
465
 
406
466
  ### Docs
467
+
407
468
  - **Architecture tables synchronized** — `ARCHITECTURE.md`'s layer tables now list every `src` module, including previously missing `pending-slot.ts`, `explore-wrap.ts`, `infra/session-identity.ts`, `utils/file-needles.ts`, `utils/file-ref-detect.ts`, and `utils/lru.ts`. README repository-layout tree and module counts updated to match (15 utility modules; 414 tests across 36 files).
408
469
 
409
470
  ### Tests
471
+
410
472
  - **7 new test cases (407 → 414)** covering `upsertSection` before/after placement and legacy back-compat, plus `buildExplorationReportFromParsed` primitive/null guards.
411
473
 
412
474
  ### Chore
475
+
413
476
  - **Ignore npm lockfile** — `.gitignore` now excludes `package-lock.json`; this project uses `bun` and the stray lockfile created by incidental `npm` commands should not be committed.
414
477
 
415
478
  ## [7.15.0] - 2026-06-08
416
479
 
417
480
  ### Changed
481
+
418
482
  - **Wildcard peer/dev dependencies for Pi packages** — `@earendil-works/pi-ai`, `@earendil-works/pi-coding-agent`, `@earendil-works/pi-tui`, and `typebox` now use `*` version ranges in both `peerDependencies` and `devDependencies`, ensuring forward compatibility with all future Pi runtime versions without extension-level pinning. Resolved to 0.79.0 (pi-*) and 1.2.3 (typebox) at install time.
419
483
 
420
484
  ### Fixed
485
+
421
486
  - **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.
422
487
  - **`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.
423
488
  - **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.
@@ -426,25 +491,30 @@
426
491
  - **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.
427
492
 
428
493
  ### Added
494
+
429
495
  - **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.
430
496
  - **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.
431
497
  - **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.
432
498
  - **Test-only resets** — `__resetSessionLogCachesForTests` and `_getMaxEntriesForTests` allow deterministic test setup of the session-log module.
433
499
 
434
500
  ### Changed
501
+
435
502
  - **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.
436
503
  - **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.
437
504
  - **`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.
438
505
  - **`Cell<T>` type alias** — Shared mutable single-slot ref cells (`isRunning`, `cancellationOut`) are now typed as `Cell<T>` instead of `{ value: T }` inline literals.
439
506
 
440
507
  ### Performance
508
+
441
509
  - **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.
442
510
  - **Open-loop attribution** — File-needle generation is hoisted out of the inner error loop, eliminating the prior N(errors) × M(files) re-computation.
443
511
 
444
512
  ### Tests
513
+
445
514
  - **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).
446
515
 
447
516
  ### Build
517
+
448
518
  - **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.
449
519
  - **`@earendil-works/pi-*` 0.78.0** — Pi runtime peers upgraded from 0.75.5. Peer dependency ranges remain wide (`*`).
450
520
  - **`@types/node` 24 LTS** — Upgraded from 22. Node 25 deliberately skipped (not LTS).
@@ -453,6 +523,7 @@
453
523
  ## [7.13.2] - 2026-05-26
454
524
 
455
525
  ### Changed
526
+
456
527
  - **Package gallery presentation** — Replaced README badge images with plain text links so Pi package pages do not render badges as extra image cards.
457
528
  - **Logo asset cleanup** — Replaced the oversized logo with a square transparent icon-only PNG and reduced README display size.
458
529
  - **Repository hygiene** — Removed stale audit and archived planning markdown files from the tracked repository.
@@ -461,32 +532,38 @@
461
532
  ## [7.13.1] - 2026-05-26
462
533
 
463
534
  ### Fixed
535
+
464
536
  - **Run-scoped service isolation** — Smart compaction runs now create isolated service containers for LLM calls, metrics, extraction-cache stats, token calibration, and provider prompt-cache session ids, reducing cross-run state pollution in concurrent Pi sessions.
465
537
  - **Phase timing accuracy** — Prune, extract, explore, and synthesize timings are now measured at their actual phase boundaries instead of adjacent marker calls that could report near-zero durations.
466
538
  - **Tool/noise accounting** — Tool character percentages now count only text blocks, avoiding accidental inclusion of provider tool-call fields with text-like payloads.
467
539
  - **File operation extraction coverage** — File-change detection now recognizes common patch/create/append/update/apply-style tool names in addition to write/edit/delete/read variants.
468
540
 
469
541
  ### Tests
542
+
470
543
  - Added regression coverage for run-scoped LLM metrics isolation, text-only tool character accounting, and broader file-operation tool matching.
471
544
 
472
545
  ## [7.13.0] - 2026-05-25
473
546
 
474
547
  ### Added
548
+
475
549
  - **Interactive metrics dashboard TUI** — `/smart-compact dashboard` now opens an in-terminal dashboard with overview, latest-run details, current-session runs, recent runs, and an explicit HTML export action.
476
550
  - **Dashboard run detail formatting** — Added tested formatter helpers for legacy metrics, empty states, phase timings, compact run descriptions, and bounded percentage display.
477
551
 
478
552
  ### Fixed
553
+
479
554
  - **Provider cache percentage accounting** — Provider prompt-cache hit rates now use an effective prompt-token denominator and are capped at 100%, preventing impossible values such as `572610%` when providers report cached tokens separately from new input tokens.
480
555
  - **Verification repair for malformed summaries** — Missing canonical sections are now reported as verification gaps and deterministic repair can create sections such as `## Goal`, `## Progress`, `## Critical Context`, and `## Files Modified` before injecting required facts.
481
556
  - **Dashboard comparison noise** — Legacy metrics entries without profile/provider metadata are omitted from profile/provider comparison groups instead of appearing as misleading `unknown` rows.
482
557
 
483
558
  ### Changed
559
+
484
560
  - **Metrics readability** — Result overlays and notifications distinguish prompt, new, and cached input tokens when provider cache reads are present.
485
561
  - **Dashboard navigation** — The TUI supports keybinding-aware navigation plus page-up/page-down and home/end scrolling.
486
562
 
487
563
  ## [7.12.5] - 2026-05-23
488
564
 
489
565
  ### Fixed
566
+
490
567
  - **Extraction cache safety** — Incremental extraction now reuses cache only when both the original entry prefix and the pruned-message prefix still match, preventing corrupted merges when pruning changes or when legacy cache entries lack pruning metadata.
491
568
  - **Chunk synthesis robustness** — Batch summarization now emits stable `CHUNK N` ids, includes tool-call context in segment text, parses returned sections by chunk id instead of raw position, and falls back to section/chunk previews when the model omits a clean summary line.
492
569
  - **Verification result accuracy** — Metrics and result details now use the post-patch verification result after deterministic/LLM repair instead of the pre-patch score.
@@ -494,22 +571,26 @@
494
571
  - **Nested parallel tool boundaries** — Keep-boundary protection now understands nested `multi_tool_use.parallel` tool call ids so compaction does not split wrapper calls from kept tool results.
495
572
 
496
573
  ### Changed
574
+
497
575
  - **Extraction-cache observability** — Metrics, dashboard/report rows, notifications, and result overlays now distinguish provider prompt-cache hit rate from deterministic extraction-cache hit rate and record extraction-cache miss reasons.
498
576
  - **Pending summary visibility** — Expired pending smart summaries now raise a user-visible warning when discarded.
499
577
 
500
578
  ## [7.12.4] - 2026-05-20
501
579
 
502
580
  ### Fixed
581
+
503
582
  - **Manual command override** — Explicit user-run `/smart-compact` commands now bypass the adaptive `minContextPercent` tier gate, while auto-trigger and agent tool calls still respect it. This keeps cache-protective behavior for agents but preserves user control.
504
583
 
505
584
  ## [7.12.3] - 2026-05-20
506
585
 
507
586
  ### Changed
587
+
508
588
  - **Safer pi-toolkit threshold** — Raised the default `minContextPercent` from 30 to 60 so high `tool=XX%` ratios from pi-auto-context do not trigger smart compaction while actual context usage is still moderate.
509
589
  - **Agent guidance** — Updated the `smart_compact` tool description and guidelines to explicitly ignore pi-auto-context `tool=XX%` as a compaction signal and use actual `context=XX%` instead.
510
590
  - **Package image metadata** — Switched the package gallery image URL to the stable `main` asset path to avoid version-tag drift.
511
591
 
512
592
  ### Fixed
593
+
513
594
  - **Provider capability mapping** — Added explicit pi-toolkit provider entries for `kimi-coding`, `xiaomi-mimo`, and `crofai` so timeout/concurrency/cache metadata does not fall through to generic defaults.
514
595
  - **Open-loop indexing** — Replaced `msgs.indexOf(msg)` with indexed loops in open-loop extraction to avoid O(n²) scans and incorrect source indexes for repeated message references.
515
596
  - **Batch summary fallback** — Hardened `summarizeBatch()` so a missing or merged LLM section falls back to the original chunk preview instead of producing an empty segment summary.
@@ -518,23 +599,27 @@
518
599
  ## [7.12.2] - 2026-05-20
519
600
 
520
601
  ### Fixed
602
+
521
603
  - **Context threshold guard completion** — Completed the `minContextPercent` guard across config, types, tier selection, core pipeline, tool handler, and tests.
522
604
  - **Precise threshold comparison** — `smart_compact` now compares raw context percentage for the guard and uses rounded percentage only for user-facing text.
523
605
 
524
606
  ## [7.12.1] - 2026-05-19
525
607
 
526
608
  ### Fixed
609
+
527
610
  - **Pi package gallery preview** — Added `pi.image` metadata pointing to the packaged logo asset so pi.dev/package listings can render the package image.
528
611
 
529
612
  ## [7.12.0] - 2026-05-19
530
613
 
531
614
  ### Added
615
+
532
616
  - **Performance monitoring report** — Metrics now include run status, method, provider/model, run type, total duration, verification gaps, and phase timings. `/smart-compact metrics` and the `smart_compact` tool's `report` parameter return a profile/provider comparison report for A/B-style evaluation.
533
617
  - **Professional local HTML dashboard** — `/smart-compact dashboard` and `smart_compact({ dashboard: true })` write `.cache/smart-compact-report.html` with KPI cards, reliability badges, duration trends, profile/provider comparison tables, phase timing bars, recent-run diagnostics, responsive dark/light styling, and aggregate metrics.
534
618
  - **Provider strategy fields** — Provider capabilities now include timeout multipliers, single-pass threshold multipliers, and multimodal support mode. Auto-trigger timeout and single-pass selection adapt to the selected provider.
535
619
  - **Multimodal metadata extraction** — The deterministic extractor now preserves image/file/audio/video attachment metadata without embedding binary/base64 payloads in summaries.
536
620
 
537
621
  ### Fixed
622
+
538
623
  - **Manual tool timeout warning** — `smart_compact` tool calls no longer inherit the native auto-trigger timeout. The timeout guard now only applies when Pi's `session_before_compact` hook is trying to prepare a summary before native compaction.
539
624
  - **Auto-trigger robustness** — Increased the default `autoTriggerTimeoutMs` from 45s to 120s, cleared the hook timeout timer deterministically, and kept the native fallback warning specific to auto-trigger runs.
540
625
  - **Single-pass output budget** — Single-pass compaction now caps `maxTokens` to the selected profile's `summaryBudgetTokens` instead of the provider's maximum output size.
@@ -544,16 +629,19 @@
544
629
  - **Dashboard hardening** — The local HTML dashboard escapes metric values and the metrics reader skips corrupt JSONL rows instead of dropping the whole report.
545
630
 
546
631
  ### Performance
632
+
547
633
  - **Session log recovery cache** — Session log path lookup and parsed message maps are cached with mtime/size invalidation to avoid repeatedly scanning `~/.pi/agent/sessions` during recovery.
548
634
 
549
635
  ## [7.11.0] - 2026-05-19
550
636
 
551
637
  ### Changed
638
+
552
639
  - **README compatibility guidance** — Added a prominent note documenting conflict-prone extension behavior around compaction hooks, session/branch history, message and tool metadata, tool output rewriting, compaction boundaries, and session log storage. Also clarified that `pi-smart-compact` is recommended alongside `pi-toolkit` for complementary context hygiene and verified compaction.
553
640
 
554
641
  ## [7.10.0] - 2026-05-19
555
642
 
556
643
  ### Added
644
+
557
645
  - **`multi_tool_use.parallel` support** — `buildToolCallIndex()` now flattens nested `tool_uses` from `multi_tool_use.parallel` into synthetic tool-call entries. Reads real `use.id` when present (matching downstream `toolResult.toolCallId`), falls back to deterministic synthetic id. `trackFileOps`, `catalogErrors`, `segmentTopicsHeuristic`, and retry/resolution detection all support nested calls. 6 new tests.
558
646
  - **Entry-id cache invalidation** — `CachedExtraction` now stores `firstEntryId` and `lastEntryId`. Cache check in `core.ts` validates `firstEntryId === currentFirstId && lastEntryId === cachedLastMsgId`, so appended-message sessions preserve incremental extraction while pivot/branch changes auto-invalidate. 2 new tests.
559
647
  - **Auto-trigger hard timeout** — `index.ts` `session_before_compact` hook now wraps `runSmartCompact` in `Promise.race` with `config.autoTriggerTimeoutMs` (default 45s). If provider ignores `AbortSignal`, hook still returns to native compact on time. `core.ts` guards all side-effects (`pendingRef`, fingerprint, state, metrics) if `timedOut`.
@@ -565,6 +653,7 @@
565
653
  - **Prepublish guard** — `package.json` `prepublishOnly`: `bun run typecheck && bun test && bun run build`.
566
654
 
567
655
  ### Fixed
656
+
568
657
  - **Cache incremental check** — `lastEntryId` now compares against `toCompact[cachedExt.lastMessageIndex]?.id` instead of `toCompact[toCompact.length - 1]?.id`, so appended messages don't falsely invalidate the cache.
569
658
  - **catalogErrors retry flatten** — Retry/resolution scan now uses `flattenToolCallBlock()` to detect retries inside `multi_tool_use.parallel`. Previously only flat tool calls were matched.
570
659
  - **Segment topic type persistence** — `segmentTopicsHeuristic` now carries the most significant type (`implementation` > `debugging` > `review` > `exploration`) into the final trailing topic instead of defaulting to `exploration`.
@@ -598,12 +687,14 @@
598
687
  ## [7.9.4] - 2026-05-18
599
688
 
600
689
  ### Changed
690
+
601
691
  - **Fingerprint fixture sanitization** — Removed personal absolute paths from `test/fingerprint.test.ts` and replaced them with neutral helper-generated fixture paths while preserving the absolute-path regression coverage.
602
692
  - **No runtime behavior changes** — This is a test-only/docs hygiene patch intended to keep the repository and GitHub source free of personal machine paths.
603
693
 
604
694
  ## [7.9.3] - 2026-05-18
605
695
 
606
696
  ### Changed
697
+
607
698
  - **README refocused** — Rewrote `README.md` as a concise, user-facing overview. It now explains the package in terms of agentic compaction, Kamradt-style chunking, and the EESV pipeline without repo-audit noise or drift-prone implementation snapshots.
608
699
  - **Docs cleanup** — `DEVPLAN.md` is now positioned as an archived implementation record, `ROADMAP.md` serves as the live planning document, and new `CONTRIBUTING.md` / `ARCHITECTURE.md` files document contributor workflow and system design.
609
700
  - **Version metadata synchronized** — `package.json`, runtime version constants, and generated `dist/` metadata now align on `7.9.3`.
@@ -612,6 +703,7 @@
612
703
  ## [7.9.1] - 2026-05-17
613
704
 
614
705
  ### Fixed
706
+
615
707
  - **`/smart-compact` race condition** — Added `waitForIdle()` to slash command handler. Previously the command could execute concurrently with agent streaming since extension commands bypass the input queue.
616
708
  - **Tool `skipCompact` safety** — `ctx.compact()` internally calls `this.abort()`, which would kill the running agent loop if called from within a tool. Tool path now correctly keeps `skipCompact: true` and caches summary in `pendingRef` for the next natural compact.
617
709
  - **Tool context-usage guard** — Tool now checks `getContextUsage()` before running and returns early with token info if context is too small.
@@ -620,6 +712,7 @@
620
712
  ## [7.9.0] - 2026-05-17
621
713
 
622
714
  ### Fixed
715
+
623
716
  - **40 TypeScript strict-mode errors resolved** — `bunx tsc --noEmit` now passes cleanly with zero errors against latest `@earendil-works/pi-ai`, `pi-coding-agent`, `pi-tui` peer types.
624
717
  - **`notify()` level mismatch** — `"success"` is not a valid level in `ExtensionUIContext.notify()`. All instances mapped to `"info"`.
625
718
  - **`UserMessage.timestamp` mandatory** — 10 inline message objects across `explore.ts`, `synthesize.ts`, `verify.ts` were missing the required `timestamp: Date.now()` field.
@@ -633,6 +726,7 @@
633
726
  - **`pendingRef.value` type narrowed to `never`** — TypeScript control flow after `pendingRef.value = null` prevented re-reading after `runSmartCompact`. Fixed with explicit cast.
634
727
 
635
728
  ### Changed
729
+
636
730
  - **`/smart-compact` command now uses `waitForIdle()`** — Prevents race condition when slash command is entered while agent is streaming. Agent finishes current turn before compaction starts.
637
731
  - **Tool (`smart_compact`) keeps `skipCompact: true`** — Mid-turn compaction via `ctx.compact()` would abort the running agent loop (`this.abort()` internally). Tool prepares summary in `pendingRef` for the next natural compact to apply.
638
732
  - **Tool description enriched** — Better description, parameter descriptions, and context-usage guard help the agent decide when to call smart_compact.
@@ -641,6 +735,7 @@
641
735
  ## [7.8.0] - 2026-05-17
642
736
 
643
737
  ### Fixed
738
+
644
739
  - **TTL bug in loadCompactionState** — `Date.now() - 0` was always true, making state files live forever. Now uses `updatedAt` field with `fs.statSync(fp).mtimeMs` fallback for pre-7.8.0 backward compat.
645
740
  - **mergeExtractions duplicate modifiedFiles** — same file could appear multiple times after incremental cache merge. Now deduped via `Map<path, entry>`.
646
741
  - **deriveProjectId weak hash** — DJB2 hash with 32-bit truncation had collision risk across projects. Replaced with `crypto.createHash('sha256')`.
@@ -648,6 +743,7 @@
648
743
  - **Removed all `(m: any)` type casts** — 3 instances in core.ts replaced with proper type inference.
649
744
 
650
745
  ### Removed
746
+
651
747
  - **`src/utils/message-blocks.ts`** — 4 functions (`getBlocks`, `isTextBlock`, `isToolCallBlock`, `getToolArgumentString`) never imported anywhere. Entire file deleted.
652
748
  - **`extractTextSafe` and `getMessageText`** from `types.ts` — unused dead code chain.
653
749
  - **`ToolCallBlock` and `TextBlock` interfaces** from `types.ts` — superseded by `LlmToolCallBlock` and `LlmTextBlock`.
@@ -656,6 +752,7 @@
656
752
  - **Unused imports** across 4 files (`isTextBlock`, `isToolCallBlock`, `extractTextSafe`, `buildToolCallIndex`, `CompressionProfile`, `ProfileConfig`, `LlmMessage`).
657
753
 
658
754
  ### Changed
755
+
659
756
  - **`runSmartCompact` signature** — 10 positional parameters replaced with `SmartCompactOptions` interface. All 4 call sites in `index.ts` updated.
660
757
  - **Silent catch → `console.error(LOG_PREFIX + ...)`** — all 11 I/O catch blocks now log errors with the shared `LOG_PREFIX` constant.
661
758
  - **`buildToolCallIndex` called once** — was called 4× per extraction (`trackFileOps`, `catalogErrors`, `extractDecisions`, `segmentTopicsHeuristic`). Now built once in `extractStructured` and passed via optional `_tcIdx` parameter.
@@ -663,6 +760,7 @@
663
760
  - **`loadConfig` stale cache fix** — catch block now sets `_cfg = fallback` so deleted config files don't serve stale cached values.
664
761
 
665
762
  ### Added
763
+
666
764
  - **`SessionType`** type alias — replaces inline `"implementation" | "review" | "debugging" | "discussion"` union across 5+ files.
667
765
  - **`SessionMessageEntry`** in `types.ts` — was duplicated inline in `core.ts` and `helpers.ts`.
668
766
  - **Constants**: `LOG_PREFIX`, `MIN_TOKEN_THRESHOLD`, `MAX_EXPLORATION_ROUNDS`, `CONFIG_KEY`, `CONFIG_KEY_ALT`, 11 section name constants (`SECTION_GOAL` etc.).
@@ -719,6 +817,7 @@
719
817
  ## [7.3.1] - 2025-05-16
720
818
 
721
819
  ### Added
820
+
722
821
  - Full EESV pipeline: Extract → Explore → Synthesize → Verify
723
822
  - Deterministic extraction of files, errors, decisions, constraints, topics
724
823
  - LLM tool-calling exploration with 6 exploration tools
@@ -732,11 +831,13 @@
732
831
  - Three compression profiles: light, balanced, aggressive
733
832
 
734
833
  ### Changed
834
+
735
835
  - Refactored from single 2200-line file to modular `src/` architecture
736
836
  - Improved token estimation with provider-specific ratios and EMA calibration
737
837
  - Added `LlmMessage` and `StructuredExtraction` types replacing `any`
738
838
 
739
839
  ### Fixed
840
+
740
841
  - Tool loop safety (prevents orphaned tool result errors)
741
842
  - No-op edit detection
742
843
  - Graceful fallback when models don't support tool calling
@@ -1 +1 @@
1
- {"version":3,"file":"extract.d.ts","sourceRoot":"","sources":["../../../src/app/steps/extract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAoB/D,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,QAAQ,GAAG,WAAW,CA4N1D"}
1
+ {"version":3,"file":"extract.d.ts","sourceRoot":"","sources":["../../../src/app/steps/extract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AA4C/D,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,QAAQ,GAAG,WAAW,CA+T1D"}
@@ -1 +1 @@
1
- {"version":3,"file":"synthesize.d.ts","sourceRoot":"","sources":["../../../src/app/steps/synthesize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAcH,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAKpE,wBAAsB,qBAAqB,CAAC,EAAE,EAAE,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC,CAiXnF"}
1
+ {"version":3,"file":"synthesize.d.ts","sourceRoot":"","sources":["../../../src/app/steps/synthesize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAyBH,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AASpE,wBAAsB,qBAAqB,CAC1C,EAAE,EAAE,WAAW,GACb,OAAO,CAAC,aAAa,CAAC,CAolBxB"}
@@ -1 +1 @@
1
- {"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../../../src/app/steps/verify.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAYnE,wBAAsB,cAAc,CAAC,EAAE,EAAE,aAAa,GAAG,OAAO,CAAC,UAAU,CAAC,CA8G3E"}
1
+ {"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../../../src/app/steps/verify.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAiBnE,wBAAsB,cAAc,CAAC,EAAE,EAAE,aAAa,GAAG,OAAO,CAAC,UAAU,CAAC,CAkN3E"}
@@ -8,7 +8,7 @@ import type { CompressionProfile, ProfileConfig } from "./types.ts";
8
8
  * `package.json#version`. Do not hand-edit this line for releases; bump
9
9
  * package.json and run `bun run sync-version`.
10
10
  */
11
- export declare const VERSION = "9.2.1";
11
+ export declare const VERSION = "9.3.1";
12
12
  export declare const CHARS_PER_TOKEN = 3.8;
13
13
  export declare const MIN_COMPACTION_SAVING_RATIO = 0.1;
14
14
  export declare const ESTIMATOR_ROUNDING_TOLERANCE_TOKENS = 1;
@@ -162,7 +162,6 @@ export declare const TRUNC: {
162
162
  readonly BACKUP_PREVIEW_LINES: 5;
163
163
  readonly FINGERPRINT_SEG: 2;
164
164
  };
165
- export declare const DAMAGE_RECENT_MSG_WINDOW = 15;
166
165
  export declare const MAX_TOOL_OUTPUT_CHARS = 800;
167
166
  /** Provider-visible output from one exploration tool invocation. */
168
167
  export declare const MAX_EXPLORER_OUTPUT_CHARS = 12000;
@@ -174,8 +173,6 @@ export declare const ERROR_RETRY_WINDOW = 6;
174
173
  export declare const ERROR_RESOLVE_WINDOW = 10;
175
174
  export declare const METRICS_BUFFER_MAX = 200;
176
175
  export declare const RUNTIME_LOG_MAX_BYTES: number;
177
- export declare const DAMAGE_LOOKBACK_MSGS = 15;
178
- export declare const VERIFICATION_GAP_SNIPPET_LEN = 80;
179
176
  export declare const CONFIG_KEY = "smartCompact";
180
177
  export declare const CONFIG_KEY_ALT = "semanticCompact";
181
178
  export declare const EXPLORER_SYSTEM_PROMPT: string;
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;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Aa,cAAc;IAGb,OAAO,CAAC,QAAQ,CAAC,cAAc;IAAS,OAAO,CAAC,QAAQ,CAAC,UAAU;IAF/E,OAAO,CAAC,KAAK,CAAK;IAElB,YAA6B,cAAc,UAAO,EAAmB,UAAU,UAAQ,EAAI;IAE3F,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,CAgB3C;IAED,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAqCtC;IAED,KAAK,IAAI,MAAM,CAAuB;CACvC"}
1
+ {"version":3,"file":"scrub.d.ts","sourceRoot":"","sources":["../../src/domain/scrub.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,WAAW,CAAC,CAAC,GAAG,MAAM;IACrC,KAAK,EAAE,CAAC,CAAC;IACT,QAAQ,EAAE,gBAAgB,EAAE,CAAC;CAC9B;AA8JD,iFAAiF;AACjF,qBAAa,cAAc;IAIvB,OAAO,CAAC,QAAQ,CAAC,cAAc;IAC/B,OAAO,CAAC,QAAQ,CAAC,UAAU;IAJ7B,OAAO,CAAC,KAAK,CAAK;IAElB,YACmB,cAAc,UAAO,EACrB,UAAU,UAAQ,EACjC;IAEJ,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,CAgB3C;IAED,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CA6CtC;IAED,KAAK,IAAI,MAAM,CAEd;CACF"}
@@ -20,6 +20,11 @@
20
20
  import type { CanonicalSummary, Section, SectionKind } from "./summary-schema.ts";
21
21
  /** Collapse untrusted extracted evidence to one Markdown-safe line. */
22
22
  export declare function summaryEvidenceLine(value: string, maxLength: number): string;
23
+ /**
24
+ * Build stable, collision-resistant path evidence within one aggregate budget.
25
+ * Small sets remain lossless; large sets retain a readable tail plus a digest.
26
+ */
27
+ export declare function buildSummaryPathEvidence(paths: readonly string[], budgetTokens?: number): Map<string, string>;
23
28
  export declare function parseSummary(markdown: string): CanonicalSummary;
24
29
  /** Find the first section matching the requested kind. */
25
30
  export declare function findSection(summary: CanonicalSummary | string, kind: SectionKind): Section | undefined;