pi-smart-compact 8.0.6 → 8.0.7
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 +513 -0
- package/CHANGELOG.md +19 -0
- package/README.md +70 -51
- package/SECURITY.md +8 -3
- package/dist/app/mode-policy.d.ts +0 -1
- package/dist/app/mode-policy.d.ts.map +1 -1
- package/dist/app/preflight.d.ts +16 -2
- package/dist/app/preflight.d.ts.map +1 -1
- package/dist/app/steps/extract.d.ts.map +1 -1
- package/dist/app/steps/state.d.ts.map +1 -1
- package/dist/app/steps/synthesize.d.ts.map +1 -1
- package/dist/app/steps/window.d.ts +3 -1
- package/dist/app/steps/window.d.ts.map +1 -1
- package/dist/constants.d.ts +18 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/domain/telemetry.d.ts +3 -0
- package/dist/domain/telemetry.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +759 -548
- package/dist/infra/context-graph.d.ts.map +1 -1
- package/dist/infra/fs.d.ts +1 -1
- package/dist/infra/fs.d.ts.map +1 -1
- package/dist/infra/git.d.ts.map +1 -1
- package/dist/infra/session-identity.d.ts +4 -0
- package/dist/infra/session-identity.d.ts.map +1 -1
- package/dist/phases/verify.d.ts.map +1 -1
- package/dist/provider-eval.js +113 -22
- package/dist/provider-scenario-eval.js +150 -110
- package/dist/telemetry-report.js +138 -41
- package/dist/ui/dashboard-insights.d.ts.map +1 -1
- package/dist/ui/overlays.d.ts.map +1 -1
- package/dist/utils/cache.d.ts.map +1 -1
- package/dist/utils/extraction.d.ts +5 -0
- package/dist/utils/extraction.d.ts.map +1 -1
- package/dist/utils/fingerprint.d.ts +1 -1
- package/dist/utils/fingerprint.d.ts.map +1 -1
- package/dist/utils/pruning.d.ts.map +1 -1
- package/dist/utils/state.d.ts +4 -3
- package/dist/utils/state.d.ts.map +1 -1
- package/dist/utils/tokens.d.ts.map +1 -1
- package/docs/MIGRATING_TO_V8.md +30 -13
- package/docs/RELEASE.md +13 -10
- package/package.json +2 -1
- package/dist/app/explore-wrap.d.ts +0 -8
- package/dist/app/explore-wrap.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -14,39 +14,44 @@
|
|
|
14
14
|
Preserve the agent's **working state**—goals, files, decisions, errors,
|
|
15
15
|
constraints, and open loops—not just a vague recap of the conversation.
|
|
16
16
|
|
|
17
|
+
**Deterministic facts · fail-closed verification · branch-safe continuity · local-first privacy**
|
|
18
|
+
|
|
19
|
+
[Install](#install) · [Why](#why-smart-compaction) · [Pipeline](#eesv-pipeline) · [Safety](#safety-and-privacy) · [Configuration](#configuration) · [Development](#development)
|
|
20
|
+
|
|
17
21
|
</div>
|
|
18
22
|
|
|
19
23
|
## Install
|
|
20
24
|
|
|
25
|
+
Requires the Pi Coding Agent on Node.js 22.19 or newer. The published extension
|
|
26
|
+
uses Pi's host packages and does not bundle a second Pi runtime.
|
|
27
|
+
|
|
21
28
|
```bash
|
|
22
29
|
pi install npm:pi-smart-compact
|
|
23
30
|
```
|
|
24
31
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
pi install git:github.com/alpertarhan/pi-smart-compact
|
|
29
|
-
```
|
|
32
|
+
Then run `/smart-compact` for an explainable preflight before anything changes.
|
|
30
33
|
|
|
31
34
|
## Quick start
|
|
32
35
|
|
|
33
36
|
```bash
|
|
34
|
-
/smart-compact
|
|
35
|
-
/smart-compact auto
|
|
36
|
-
/smart-compact anthropic/claude-sonnet-4 fast
|
|
37
|
-
/smart-compact balanced --focus=auth
|
|
38
|
-
/smart-compact metrics
|
|
39
|
-
/smart-compact dashboard
|
|
40
|
-
/smart-compact restore
|
|
41
|
-
/smart-compact loops
|
|
37
|
+
/smart-compact # interactive preflight
|
|
38
|
+
/smart-compact auto # adaptive mode selection
|
|
39
|
+
/smart-compact anthropic/claude-sonnet-4 fast # explicit model + mode
|
|
40
|
+
/smart-compact balanced --focus=auth # preserve extra auth detail
|
|
41
|
+
/smart-compact metrics # text metrics report
|
|
42
|
+
/smart-compact dashboard # interactive dashboard
|
|
43
|
+
/smart-compact restore # browse and restore backups
|
|
44
|
+
/smart-compact loops # manage persisted open loops
|
|
42
45
|
```
|
|
43
46
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
and
|
|
47
|
+
At 60% context usage by default, the extension also participates in Pi's native
|
|
48
|
+
compaction flow. Long-running agents can call `smart_compact`, `smart_recall`,
|
|
49
|
+
and `smart_save_memory` directly.
|
|
47
50
|
|
|
48
|
-
>
|
|
49
|
-
>
|
|
51
|
+
> [!IMPORTANT]
|
|
52
|
+
> The tool path only stages a verified pending summary for Pi's next natural
|
|
53
|
+
> compact. It never compacts the active conversation in the middle of an agent
|
|
54
|
+
> turn.
|
|
50
55
|
|
|
51
56
|
## Why smart compaction?
|
|
52
57
|
|
|
@@ -92,12 +97,12 @@ Pi conversation
|
|
|
92
97
|
|
|
93
98
|
- The current goal and user constraints
|
|
94
99
|
- Modified, read, and deleted files
|
|
95
|
-
- Unresolved **and** resolved error history
|
|
100
|
+
- Unresolved **and** resolved error history; free-form goal changes never claim an unfixed error was resolved
|
|
96
101
|
- Explicit and implicit decisions
|
|
97
102
|
- Open follow-ups, blockers, priorities, and pinned loops
|
|
98
103
|
- Next actions and critical continuation context
|
|
99
104
|
- Changes since the previous compaction
|
|
100
|
-
- A bounded **Continuity Ledger** carrying prior decisions, constraints, unresolved errors, and open loops
|
|
105
|
+
- A bounded **Continuity Ledger** carrying prior decisions, constraints, unresolved errors, and open loops across follow-ups and goal wording changes. Goal shifts are recorded as context; facts retire only through positive resolution evidence or an explicit override.
|
|
101
106
|
|
|
102
107
|
Summaries use a canonical H1/H2/H3-aware structure, collision-safe file
|
|
103
108
|
matching, typed verification gaps, and persisted repair provenance.
|
|
@@ -107,15 +112,19 @@ matching, typed verification gaps, and persisted repair provenance.
|
|
|
107
112
|
Applied compactions also index their verified scoped state into a bounded,
|
|
108
113
|
project-isolated SQLite FTS5 context graph. `smart_recall` searches goals,
|
|
109
114
|
decisions, constraints, unresolved errors, open loops, files, and critical
|
|
110
|
-
context across this project's sessions;
|
|
111
|
-
|
|
112
|
-
service or extra LLM call.
|
|
115
|
+
context across this project's sessions; recall and resolution use the complete
|
|
116
|
+
visible branch ancestry, never sibling-branch state. File relationships add
|
|
117
|
+
one-hop graph recall without an embedding service or extra LLM call.
|
|
113
118
|
|
|
114
119
|
`smart_save_memory` persists or explicitly resolves one user-confirmed decision,
|
|
115
|
-
constraint, preference, warning, procedure, or context fact. It
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
120
|
+
constraint, preference, warning, procedure, or context fact. It fails closed
|
|
121
|
+
when the working directory is exactly `HOME` or the filesystem root, and
|
|
122
|
+
requires an interactive confirmation showing the complete scrubbed title,
|
|
123
|
+
content, and paths. Each project may have at most 500 active manual memories.
|
|
124
|
+
It rejects empty inputs, scrubs configured secrets/PII, deduplicates exact facts,
|
|
125
|
+
and must not be used for guesses, transient progress, secrets, or code that is
|
|
126
|
+
cheap to re-read. Set `contextGraphEnabled` to `false` to disable indexing and
|
|
127
|
+
both tools.
|
|
119
128
|
|
|
120
129
|
## Usage surfaces
|
|
121
130
|
|
|
@@ -132,8 +141,9 @@ The interactive command uses the configured summary route and exact execution
|
|
|
132
141
|
planner before spending LLM tokens. Its compact decision card compares the
|
|
133
142
|
three modes by estimated after-size and saving, highlights the recommendation,
|
|
134
143
|
and keeps only the selected plan plus hard tool-pair/zero-gap guarantees in the
|
|
135
|
-
primary view.
|
|
136
|
-
|
|
144
|
+
primary view. The plan reserves 25% of the LLM summary allowance for verified
|
|
145
|
+
state/delta/continuity sections added after synthesis. Technical estimator,
|
|
146
|
+
target, route, and boundary data stays under `D` instead of crowding the decision.
|
|
137
147
|
|
|
138
148
|
- `↑` / `↓` changes `Fast`, `Balanced`, or `Thorough` and recalculates the plan.
|
|
139
149
|
- `Enter` runs only a viable plan; `Esc` cancels without mutation.
|
|
@@ -148,7 +158,10 @@ boundary: its older prefix is verified into the summary while the budgeted
|
|
|
148
158
|
working tail stays raw. Tool exchanges are summarized or retained as complete
|
|
149
159
|
call/result pairs, never split. If Verify, yield, provider, or native apply
|
|
150
160
|
fails, the UI shows one bounded actionable line without evidence text or a
|
|
151
|
-
JavaScript stack.
|
|
161
|
+
JavaScript stack. A successful `100/100` is labeled **verification coverage**;
|
|
162
|
+
the source score and deterministic/LLM/fallback provenance remain visible so
|
|
163
|
+
repaired coverage is never presented as raw synthesis quality. Stack diagnostics
|
|
164
|
+
are opt-in with `DEBUG=smart-compact`.
|
|
152
165
|
During execution a two-line live brief shows the EESV phase chain and the
|
|
153
166
|
meaningful current action; it states that the conversation remains unchanged
|
|
154
167
|
until verified Apply. Routine phase toasts and raw per-batch watchdog/provider
|
|
@@ -169,7 +182,7 @@ brief. `verbose` restores routine phase notices; full stack diagnostics require
|
|
|
169
182
|
does **not** attempt unsupported non-contiguous compaction.
|
|
170
183
|
- `--max-calls` accepts `1–100`.
|
|
171
184
|
- `--max-input-tokens` accepts `10000–1000000` aggregate prompt tokens.
|
|
172
|
-
- `--max-latency` accepts `5000–600000` milliseconds as
|
|
185
|
+
- `--max-latency` accepts `5000–600000` milliseconds as a cancellation deadline; cancellation waits for safe pipeline unwind before returning.
|
|
173
186
|
- Budget exhaustion degrades to deterministic summaries instead of dropping context.
|
|
174
187
|
|
|
175
188
|
The tool exposes equivalent `focus`, `max_calls`, `max_input_tokens`, and
|
|
@@ -189,7 +202,9 @@ not a fourth execution policy. Fast can use a zero-call deterministic summary
|
|
|
189
202
|
when extraction confidence is high; otherwise it keeps the bounded LLM path.
|
|
190
203
|
The mode token target is binding: recent user turns, pi-toolkit checkpoints,
|
|
191
204
|
and topical grouping remain raw only when they fit the planned tail; otherwise
|
|
192
|
-
the verified summary carries them forward.
|
|
205
|
+
the verified summary carries them forward. Automatic risk refinement may deepen
|
|
206
|
+
analysis/repair strategy after extraction, but it does not mutate the profile
|
|
207
|
+
allowance or retention window that was already used to prove the target.
|
|
193
208
|
|
|
194
209
|
Output caps stop subsequent calls after observed usage reaches the threshold.
|
|
195
210
|
The ChatGPT Codex subscription endpoint rejects `max_output_tokens`,
|
|
@@ -238,15 +253,17 @@ Raw local JSONL remains available to the interactive dashboard, while
|
|
|
238
253
|
`bun run telemetry-report` emits aggregate-only telemetry: no session/project
|
|
239
254
|
IDs, prompts, summaries, paths, or error text. Failures use a stable taxonomy
|
|
240
255
|
(cancelled, timeout, rate limit, authentication, budget, output limit,
|
|
241
|
-
provider, persistence, validation, verification, internal).
|
|
242
|
-
retain only content-free
|
|
256
|
+
provider, persistence, validation, verification, **yield**, internal).
|
|
257
|
+
Verification and yield failures retain only content-free diagnostics.
|
|
243
258
|
|
|
244
259
|
Set `telemetryChannel` to `canary` only on the externally selected canary
|
|
245
|
-
cohort. The report
|
|
246
|
-
|
|
260
|
+
cohort. The report shows total/applied counts, but only non-dry, host-confirmed
|
|
261
|
+
applied runs satisfy promotion evidence. A deterministic green check never
|
|
262
|
+
implies `PROMOTE`; the report compares schema-v2 canary runs with the stable
|
|
263
|
+
baseline and returns `HOLD`, `ROLLBACK`, or `PROMOTE`. Rollback triggers are: failure rate
|
|
247
264
|
+5pp and ≥10%, verifier quality −5 points, p95 latency +50%, tokens +50%,
|
|
248
265
|
heuristic fallback +10pp, or post-compaction damage +10pp. Promotion requires
|
|
249
|
-
|
|
266
|
+
20 non-dry applied canary runs, a stable baseline, ≥70% verifier-quality coverage,
|
|
250
267
|
≥70% run-correlated damage-observation coverage in both cohorts, ≥85 absolute
|
|
251
268
|
canary quality, and ≥95% success. The extension reports the decision; it never
|
|
252
269
|
edits config or deploys automatically.
|
|
@@ -271,8 +288,9 @@ guidance for reaching the target.
|
|
|
271
288
|
- Bounded fixed-point repair for patchable verification gaps, followed by a zero-gap deterministic quality floor
|
|
272
289
|
- Cross-session guard and five-minute TTL for pending summaries
|
|
273
290
|
- Session-log recovery for older, truncated tool results
|
|
274
|
-
-
|
|
275
|
-
custom
|
|
291
|
+
- Full selected pre-prune conversation backups, scrubbed before a 0600 write;
|
|
292
|
+
marker-owned retention leaves foreign files in custom directories untouched
|
|
293
|
+
- Private artifact directories are enforced as 0700 and files as 0600
|
|
276
294
|
|
|
277
295
|
### Secrets and PII
|
|
278
296
|
|
|
@@ -408,7 +426,7 @@ the run fails closed before staging or apply.
|
|
|
408
426
|
| `summaryThinkingLevel` | `minimal \| low \| medium \| high \| xhigh \| max \| null` | `minimal` | Reasoning level for synthesis and repair; provider default when null |
|
|
409
427
|
| `segmentationThinkingLevel` | `minimal \| low \| medium \| high \| xhigh \| max \| null` | `minimal` | Reasoning level for exploration; provider default when null |
|
|
410
428
|
| `autoTrigger` | `boolean` | `true` | Participate in Pi's native compact hook |
|
|
411
|
-
| `autoTriggerTimeoutMs` | `number` | `120000` |
|
|
429
|
+
| `autoTriggerTimeoutMs` | `number` | `120000` | Auto cancellation deadline; waits for safe pipeline unwind, never an unsafe hard return |
|
|
412
430
|
| `minContextPercent` | `number` | `60` | Auto/tool context gate; manual `/smart-compact` warns and bypasses it |
|
|
413
431
|
| `backupEnabled` | `boolean` | `true` | Write a pre-compaction backup |
|
|
414
432
|
| `backupDir` | `string` | `~/.pi/agent/compact-backups` | Empty config value uses this path |
|
|
@@ -420,7 +438,7 @@ the run fails closed before staging or apply.
|
|
|
420
438
|
| `maxLlmCalls` | integer `0–100` | `8` | Global ceiling combined with the selected mode |
|
|
421
439
|
| `maxLlmInputTokens` | integer `0–1000000` | `0` | `0` uses the selected mode's aggregate prompt-token cap |
|
|
422
440
|
| `codexMaxCallMs` | integer `0` or `5000–300000` | `0` | ChatGPT Codex per-call watchdog; `0` derives 15–90s from requested output tokens |
|
|
423
|
-
| `maxLatencyMs` | `0` or `5000–600000` | `0` | `0` means unlimited |
|
|
441
|
+
| `maxLatencyMs` | `0` or `5000–600000` | `0` | Pipeline cancellation deadline; `0` means unlimited |
|
|
424
442
|
| `focusWeighting` | `boolean` | `true` | Weight focused topics/paths higher |
|
|
425
443
|
| `zeroCallEnabled` | `boolean` | `true` | Use deterministic synthesis for high-confidence Fast runs |
|
|
426
444
|
| `contextGraphEnabled` | `boolean` | `true` | Index verified state and enable project-scoped recall/save tools |
|
|
@@ -489,12 +507,15 @@ cancelled runs.
|
|
|
489
507
|
<details>
|
|
490
508
|
<summary><strong>Runtime artifacts</strong></summary>
|
|
491
509
|
|
|
492
|
-
|
|
510
|
+
Default artifacts live under `~/.pi/agent/`. Smart Compact normalizes the
|
|
511
|
+
private directories it creates to `0700` and its files to `0600`; a custom
|
|
512
|
+
`backupDir` receives the same protection. `settings.json` remains host-owned
|
|
513
|
+
and read-only to the extension.
|
|
493
514
|
|
|
494
515
|
| Path | Purpose |
|
|
495
516
|
| --- | --- |
|
|
496
517
|
| `settings.json` | Configuration (read only) |
|
|
497
|
-
| `compact-backups/` |
|
|
518
|
+
| `compact-backups/` | Full selected pre-prune conversation backups, scrubbed before write and retention-pruned |
|
|
498
519
|
| `.cache/compact-extraction-<session>.json` | Incremental extraction cache |
|
|
499
520
|
| `.cache/compact-metrics.jsonl` | Tail-retained metrics log; 5 MiB cap |
|
|
500
521
|
| `.cache/smart-compact-report.html` | Local HTML dashboard |
|
|
@@ -524,17 +545,15 @@ coordinate hook order or prefer a single automatic compaction owner.
|
|
|
524
545
|
## Development
|
|
525
546
|
|
|
526
547
|
```bash
|
|
527
|
-
bun install
|
|
528
|
-
bun run typecheck
|
|
529
|
-
bun test
|
|
530
|
-
bun run gate # deterministic adversarial EESV release gate
|
|
548
|
+
bun install --frozen-lockfile
|
|
549
|
+
bun run release:check # typecheck + tests + adversarial gate + build + package audit
|
|
531
550
|
bun run bench
|
|
532
|
-
bun run
|
|
533
|
-
bun run compat:pi # isolated latest-Pi compatibility check
|
|
551
|
+
bun run compat:pi # isolated latest-Pi compatibility check
|
|
534
552
|
```
|
|
535
553
|
|
|
536
|
-
Pull requests run
|
|
537
|
-
|
|
554
|
+
Pull requests run the same deterministic checks in GitHub Actions. See
|
|
555
|
+
[CONTRIBUTING.md](./CONTRIBUTING.md) for focused test commands and
|
|
556
|
+
[docs/RELEASE.md](./docs/RELEASE.md) for publication and canary gates.
|
|
538
557
|
|
|
539
558
|
## Project documentation
|
|
540
559
|
|
package/SECURITY.md
CHANGED
|
@@ -6,7 +6,7 @@ Security fixes target the latest published version of `pi-smart-compact`.
|
|
|
6
6
|
|
|
7
7
|
| Version | Supported |
|
|
8
8
|
| --- | --- |
|
|
9
|
-
| Latest `
|
|
9
|
+
| Latest `8.x` | ✅ |
|
|
10
10
|
| Older | ❌ |
|
|
11
11
|
|
|
12
12
|
## Reporting a vulnerability
|
|
@@ -33,5 +33,10 @@ Operational guidance:
|
|
|
33
33
|
- Treat generated compaction summaries as potentially sensitive project context.
|
|
34
34
|
- Review provider / model configuration before enabling auto-triggered compaction.
|
|
35
35
|
|
|
36
|
-
Runtime artifacts are written under `~/.pi/agent/`;
|
|
37
|
-
|
|
36
|
+
Runtime artifacts are written under `~/.pi/agent/`; private artifact
|
|
37
|
+
directories are enforced as `0700` and files as `0600`. Pre-compaction backups
|
|
38
|
+
contain the complete selected pre-prune conversation after configured
|
|
39
|
+
secret/PII scrubbing. Project-memory writes fail closed when the working
|
|
40
|
+
directory is exactly `HOME` or the filesystem root, require interactive
|
|
41
|
+
confirmation of the complete scrubbed content, and are capped at 500 active manual facts per
|
|
42
|
+
project. See the [runtime artifacts table](./README.md#runtime-artifacts).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mode-policy.d.ts","sourceRoot":"","sources":["../../src/app/mode-policy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EAAE,eAAe,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,oBAAoB,EACnG,MAAM,aAAa,CAAC;AAErB,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,kBAAkB,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;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E,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAO,GAClE,MAAM,CAeR;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI,GAAG,MAAM,CAOpE;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,uBAAuB,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CAG3G;AAED,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CAG/E"}
|
package/dist/app/preflight.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ExtensionContext } from "@earendil-works/pi-coding-agent";
|
|
2
2
|
import type { Api, Model } from "@earendil-works/pi-ai";
|
|
3
|
-
import type { CompactConfig, EffectiveCompactionMode, ProfileConfig } from "../types.ts";
|
|
3
|
+
import type { CompactConfig, EffectiveCompactionMode, ProfileConfig, SessionMessageEntry } from "../types.ts";
|
|
4
4
|
import { type TokenCalibrationStore, type TokenEstimator } from "../utils/tokens.ts";
|
|
5
5
|
import type { CompactionWindowPlan } from "./run-context.ts";
|
|
6
6
|
export declare function preflightDamageMedian(cwd: string, config: CompactConfig): number;
|
|
@@ -34,5 +34,19 @@ export interface ManualPreflight {
|
|
|
34
34
|
toolPercent: number;
|
|
35
35
|
overflowedContext: boolean;
|
|
36
36
|
}
|
|
37
|
-
export
|
|
37
|
+
export interface ManualPreflightContext {
|
|
38
|
+
branch: unknown[];
|
|
39
|
+
msgs: SessionMessageEntry[];
|
|
40
|
+
messageTokens: number[];
|
|
41
|
+
totalTokens: number;
|
|
42
|
+
rawEstimatedMessageTokens: number;
|
|
43
|
+
modelContextWindow?: number;
|
|
44
|
+
contextWindowTokens: number;
|
|
45
|
+
contextPercent: number;
|
|
46
|
+
toolPercent: number;
|
|
47
|
+
overflowedContext: boolean;
|
|
48
|
+
}
|
|
49
|
+
/** Mode-independent session scan shared by all three preview plans. */
|
|
50
|
+
export declare function prepareManualPreflightContext(ctx: ExtensionContext, summaryModel: Model<Api>, tokenCalibration: TokenCalibrationStore): ManualPreflightContext;
|
|
51
|
+
export declare function planManualPreflight(ctx: ExtensionContext, summaryModel: Model<Api>, mode: EffectiveCompactionMode, tokenCalibration: TokenCalibrationStore, config: CompactConfig, damageMedian?: number, shared?: ManualPreflightContext): ManualPreflight;
|
|
38
52
|
//# sourceMappingURL=preflight.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preflight.d.ts","sourceRoot":"","sources":["../../src/app/preflight.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,KAAK,EAAE,aAAa,EAAE,uBAAuB,EAAc,aAAa,
|
|
1
|
+
{"version":3,"file":"preflight.d.ts","sourceRoot":"","sources":["../../src/app/preflight.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,KAAK,EAAE,aAAa,EAAE,uBAAuB,EAAc,aAAa,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAI1H,OAAO,EAAsB,KAAK,qBAAqB,EAAE,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzG,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAG7D,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,GAAG,MAAM,CAMhF;AAED,MAAM,WAAW,wBAAwB;IACvC,UAAU,EAAE,aAAa,CAAC;IAC1B,SAAS,EAAE,cAAc,CAAC;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB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GAAG,EAAE,gBAAgB,EACrB,YAAY,EAAE,KAAK,CAAC,GAAG,CAAC,EACxB,gBAAgB,EAAE,qBAAqB,GACtC,sBAAsB,CAqBxB;AAED,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,gBAAgB,EACrB,YAAY,EAAE,KAAK,CAAC,GAAG,CAAC,EACxB,IAAI,EAAE,uBAAuB,EAC7B,gBAAgB,EAAE,qBAAqB,EACvC,MAAM,EAAE,aAAa,EACrB,YAAY,CAAC,EAAE,MAAM,EACrB,MAAM,GAAE,sBAA2F,GAClG,eAAe,CAoCjB"}
|
|
@@ -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;
|
|
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;AAmB/D,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,QAAQ,GAAG,WAAW,CAoL1D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../src/app/steps/state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;
|
|
1
|
+
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../src/app/steps/state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAkB9D,wBAAgB,UAAU,CAAC,EAAE,EAAE,UAAU,GAAG,QAAQ,CAyJnD"}
|
|
@@ -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,
|
|
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,CA8UnF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Step 2: select and validate the active-context prefix to summarize. */
|
|
2
|
-
import type { CompactionWindowPlan, PreparedRc, WindowedRc } from "../run-context.ts";
|
|
2
|
+
import type { CompactionPlanReason, CompactionWindowPlan, PreparedRc, WindowedRc } from "../run-context.ts";
|
|
3
3
|
import type { EffectiveCompactionMode, ProfileConfig, SessionMessageEntry } from "../../types.ts";
|
|
4
4
|
export type { CompactionWindowPlan } from "../run-context.ts";
|
|
5
5
|
export interface CompactionWindowPlanInput {
|
|
@@ -13,6 +13,8 @@ export interface CompactionWindowPlanInput {
|
|
|
13
13
|
force: boolean;
|
|
14
14
|
overflowedContext: boolean;
|
|
15
15
|
}
|
|
16
|
+
/** Canonical user-facing wording for every planner outcome. */
|
|
17
|
+
export declare function compactionPlanReasonText(reason: CompactionPlanReason): string;
|
|
16
18
|
/** Pure, content-free result suitable for both execution and a later UI preview. */
|
|
17
19
|
export declare function planCompactionWindow(input: CompactionWindowPlanInput): CompactionWindowPlan;
|
|
18
20
|
export declare function resolveCompactionWindow(rc: PreparedRc): WindowedRc | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"window.d.ts","sourceRoot":"","sources":["../../../src/app/steps/window.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAE1E,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"window.d.ts","sourceRoot":"","sources":["../../../src/app/steps/window.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAE1E,OAAO,KAAK,EACV,oBAAoB,EAAE,oBAAoB,EAAE,UAAU,EAAuB,UAAU,EACxF,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAAE,uBAAuB,EAAc,aAAa,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAM9G,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE9D,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,mBAAmB,EAAE,CAAC;IAC5B,MAAM,EAAE,OAAO,EAAE,CAAC;IAClB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,IAAI,EAAE,uBAAuB,CAAC;IAC9B,UAAU,EAAE,aAAa,CAAC;IAC1B,KAAK,EAAE,OAAO,CAAC;IACf,iBAAiB,EAAE,OAAO,CAAC;CAC5B;AAED,+DAA+D;AAC/D,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,oBAAoB,GAAG,MAAM,CAS7E;AAED,oFAAoF;AACpF,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,GAAG,oBAAoB,CAuG3F;AAED,wBAAgB,uBAAuB,CAAC,EAAE,EAAE,UAAU,GAAG,UAAU,GAAG,IAAI,CAkEzE"}
|
package/dist/constants.d.ts
CHANGED
|
@@ -8,10 +8,27 @@ 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 = "8.0.
|
|
11
|
+
export declare const VERSION = "8.0.7";
|
|
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;
|
|
15
|
+
/** Space reserved in the window plan for deterministic verification/state sections added after LLM synthesis. */
|
|
16
|
+
export declare const POST_SUMMARY_RESERVE_RATIO = 0.25;
|
|
17
|
+
/** Positive per-run bounds shared by CLI and tool arguments; config separately allows 0 as a mode-derived sentinel. */
|
|
18
|
+
export declare const BUDGET_LIMITS: {
|
|
19
|
+
readonly CALLS: {
|
|
20
|
+
readonly min: 1;
|
|
21
|
+
readonly max: 100;
|
|
22
|
+
};
|
|
23
|
+
readonly INPUT_TOKENS: {
|
|
24
|
+
readonly min: 10000;
|
|
25
|
+
readonly max: 1000000;
|
|
26
|
+
};
|
|
27
|
+
readonly LATENCY_MS: {
|
|
28
|
+
readonly min: 5000;
|
|
29
|
+
readonly max: 600000;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
15
32
|
export declare const COMPACT_SYSTEM_PREFIX: string;
|
|
16
33
|
export declare const PROFILES: Record<CompressionProfile, ProfileConfig>;
|
|
17
34
|
export declare const DEFAULT_CONFIG: {
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -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;;;;;GAKG;AACH,eAAO,MAAM,OAAO,UAAU,CAAC;AAC/B,eAAO,MAAM,eAAe,MAAM,CAAC;AACnC,eAAO,MAAM,2BAA2B,MAAO,CAAC;AAChD,eAAO,MAAM,mCAAmC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"constants.d.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O,MAAM,qBAAqB,MAAM,CAAC;AAGzC,sFAAsF;AACtF,eAAO,MAAM,eAAe,QAA8J,CAAC;AAC3L,+FAA+F;AAC/F,eAAO,MAAM,kBAAkB,OAAO,CAAC;AACvC,2EAA2E;AAC3E,eAAO,MAAM,kBAAkB,IAAI,CAAC;AACpC,6EAA6E;AAC7E,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAOvC,eAAO,MAAM,kBAAkB,MAAM,CAAC;AAGtC,eAAO,MAAM,qBAAqB,QAAkB,CAAC;AAGrD,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAGvC,eAAO,MAAM,4BAA4B,KAAK,CAAC;AAG/C,eAAO,MAAM,UAAU,iBAAiB,CAAC;AACzC,eAAO,MAAM,cAAc,oBAAoB,CAAC;AAEhD,eAAO,MAAM,sBAAsB,QAU6T,CAAC"}
|
|
@@ -10,6 +10,7 @@ export interface DamageTelemetryEntry {
|
|
|
10
10
|
}
|
|
11
11
|
export interface TelemetryWindowStats {
|
|
12
12
|
runs: number;
|
|
13
|
+
appliedRuns: number;
|
|
13
14
|
successRate: number;
|
|
14
15
|
avgQuality: number | null;
|
|
15
16
|
qualityCoverage: number;
|
|
@@ -61,6 +62,8 @@ export declare function assessCanary(entries: readonly CompactMetricsEntry[], da
|
|
|
61
62
|
minCanaryRuns?: number;
|
|
62
63
|
baselineRuns?: number;
|
|
63
64
|
}): CanaryAssessment;
|
|
65
|
+
export declare const TELEMETRY_FAILURE_KINDS: ReadonlySet<TelemetryFailureKind>;
|
|
66
|
+
export declare function isTelemetryFailureKind(value: unknown): value is TelemetryFailureKind;
|
|
64
67
|
export declare function buildPrivacySafeTelemetry(entries: readonly CompactMetricsEntry[], damageEntries: readonly DamageTelemetryEntry[], options: {
|
|
65
68
|
version: string;
|
|
66
69
|
minCanaryRuns?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../../src/domain/telemetry.ts"],"names":[],"mappings":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