pi-smart-compact 9.3.1 → 9.4.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ARCHITECTURE.md +47 -10
- package/CHANGELOG.md +12 -0
- package/README.md +18 -2
- package/dist/app/model-routing.d.ts +12 -0
- package/dist/app/model-routing.d.ts.map +1 -0
- package/dist/app/preflight.d.ts.map +1 -1
- package/dist/app/register-context-tools.d.ts +5 -0
- package/dist/app/register-context-tools.d.ts.map +1 -0
- package/dist/app/register-smart-compact-command.d.ts +13 -0
- package/dist/app/register-smart-compact-command.d.ts.map +1 -0
- package/dist/app/register-smart-compact-tool.d.ts +13 -0
- package/dist/app/register-smart-compact-tool.d.ts.map +1 -0
- package/dist/app/smart-compact-input.d.ts +1 -1
- package/dist/app/smart-compact-input.d.ts.map +1 -1
- package/dist/app/smart-compact-policy.d.ts +31 -0
- package/dist/app/smart-compact-policy.d.ts.map +1 -0
- package/dist/app/steps/extract.d.ts.map +1 -1
- package/dist/app/steps/metrics.d.ts.map +1 -1
- package/dist/app/steps/persist.d.ts.map +1 -1
- package/dist/app/steps/prepare.d.ts.map +1 -1
- package/dist/app/steps/tier.d.ts.map +1 -1
- package/dist/app/steps/window.d.ts +0 -1
- package/dist/app/steps/window.d.ts.map +1 -1
- package/dist/constants.d.ts +2 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/index.d.ts +2 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6353 -5565
- package/dist/infra/context-graph.d.ts +7 -3
- package/dist/infra/context-graph.d.ts.map +1 -1
- package/dist/infra/fs.d.ts +0 -1
- package/dist/infra/fs.d.ts.map +1 -1
- package/dist/infra/llm-client.d.ts +2 -1
- package/dist/infra/llm-client.d.ts.map +1 -1
- package/dist/infra/paths.d.ts +3 -14
- package/dist/infra/paths.d.ts.map +1 -1
- package/dist/phases/explore.d.ts +0 -8
- package/dist/phases/explore.d.ts.map +1 -1
- package/dist/phases/synthesize.d.ts.map +1 -1
- package/dist/phases/verify.d.ts.map +1 -1
- package/dist/provider-eval.js +38 -34
- package/dist/provider-scenario-eval.js +330 -215
- package/dist/telemetry-report.js +11 -7
- package/dist/types.d.ts +4 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/ui/backup-overlays.d.ts +9 -0
- package/dist/ui/backup-overlays.d.ts.map +1 -0
- package/dist/ui/metrics-dashboard-overlay.d.ts +12 -0
- package/dist/ui/metrics-dashboard-overlay.d.ts.map +1 -0
- package/dist/ui/open-loops-overlay.d.ts +4 -0
- package/dist/ui/open-loops-overlay.d.ts.map +1 -0
- package/dist/ui/overlays.d.ts +3 -28
- package/dist/ui/overlays.d.ts.map +1 -1
- package/dist/ui/settings-overlay.d.ts +5 -0
- package/dist/ui/settings-overlay.d.ts.map +1 -0
- package/dist/utils/backups.d.ts.map +1 -1
- package/dist/utils/cache.d.ts +2 -18
- package/dist/utils/cache.d.ts.map +1 -1
- package/dist/utils/config.d.ts +7 -0
- package/dist/utils/config.d.ts.map +1 -0
- package/dist/utils/damage.d.ts +4 -0
- package/dist/utils/damage.d.ts.map +1 -1
- package/dist/utils/extraction.d.ts +0 -2
- package/dist/utils/extraction.d.ts.map +1 -1
- package/dist/utils/fingerprint.d.ts.map +1 -1
- package/dist/utils/helpers.d.ts +3 -13
- package/dist/utils/helpers.d.ts.map +1 -1
- package/dist/utils/logger.d.ts +0 -1
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/state.d.ts +1 -2
- package/dist/utils/state.d.ts.map +1 -1
- package/package.json +7 -4
package/ARCHITECTURE.md
CHANGED
|
@@ -112,7 +112,9 @@ assertions: the type system proves `buildState` has run.
|
|
|
112
112
|
|
|
113
113
|
### Entry and context gate
|
|
114
114
|
|
|
115
|
-
`src/index.ts`
|
|
115
|
+
`src/index.ts` owns host lifecycle wiring. Cohesive adapters in
|
|
116
|
+
`src/app/register-smart-compact-command.ts`, `register-smart-compact-tool.ts`,
|
|
117
|
+
and `model-routing.ts` validate input, resolve models, and route work into
|
|
116
118
|
`runSmartCompact()`. Before any expensive work, the system checks context size
|
|
117
119
|
against the threshold in `src/constants.ts`. Auto / tool runs are skipped while
|
|
118
120
|
context is small; manual `/smart-compact` uses an absolute adaptive safety tail
|
|
@@ -126,6 +128,15 @@ pending summary for the same session is reused instead of invoking the pipeline
|
|
|
126
128
|
again. `auto` is not a fourth policy: it selects one of the three from context
|
|
127
129
|
pressure and deterministic extraction risk.
|
|
128
130
|
|
|
131
|
+
`app/smart-compact-policy.ts` keeps agent-tool visibility separate from
|
|
132
|
+
automatic compaction. The tool remains registered for immediate re-enable, but
|
|
133
|
+
Pi's active-tool set controls whether its schema and prompt guidance reach the
|
|
134
|
+
agent. Agent access is tri-state: `inherit` leaves host `/tools` and allowlists
|
|
135
|
+
in control, while explicit `enabled`/`disabled` choices mutate only
|
|
136
|
+
`smart_compact` and then report the effective host state. Full policy snapshots
|
|
137
|
+
are custom branch entries restored on `session_start` and `session_tree`; the
|
|
138
|
+
manual command is never gated.
|
|
139
|
+
|
|
129
140
|
Model routes are stage-specific but never inferred from mode. With no explicit
|
|
130
141
|
configuration, Explore, Synthesize, and Verify all use the selected Pi model.
|
|
131
142
|
`segmentationModel`, `summaryModel`, and `verificationModel` can independently
|
|
@@ -276,14 +287,20 @@ leaving one content-free safe-fallback notice in the UI.
|
|
|
276
287
|
Apply-confirmed verified state is queued and duplicate updates coalesce only
|
|
277
288
|
for the exact project/session/branch head. Replacing an existing key refreshes
|
|
278
289
|
that pending value even at capacity; a divergent 65th key is rejected rather
|
|
279
|
-
than evicting accepted work.
|
|
280
|
-
|
|
281
|
-
|
|
290
|
+
than evicting accepted work. A microtask drains the accepted batch through one
|
|
291
|
+
reused SQLite connection. Every caller awaits the transaction result, so
|
|
292
|
+
persistence telemetry is complete only after indexing succeeds; permanent
|
|
293
|
+
open/write failures settle once as `context graph` failures and are never
|
|
294
|
+
zero-delay retried. All graph surfaces
|
|
295
|
+
(recall, manual memory, stats, indexing) share one process-wide, path-keyed
|
|
296
|
+
cached connection, so connection setup, schema checks, and migration probes
|
|
297
|
+
are paid once per process instead of per call; the cache is keyed by database
|
|
298
|
+
path so environments that relocate the cache directory (tests swapping HOME)
|
|
299
|
+
reopen cleanly.
|
|
282
300
|
`infra/context-graph.ts` adapts the same fail-closed transaction contract to
|
|
283
301
|
`bun:sqlite` in Bun tests and `node:sqlite` `DatabaseSync` in Pi's Node runtime;
|
|
284
|
-
the packed release audit exercises both.
|
|
285
|
-
|
|
286
|
-
state safely supersedes a missed update after a hard process kill. Fact
|
|
302
|
+
the packed release audit exercises both. Graph data is derived and a later
|
|
303
|
+
cumulative state safely supersedes a failed update. Fact
|
|
287
304
|
occurrences are branch-head scoped; state, recall, and resolution use the
|
|
288
305
|
complete host-visible branch ancestry before equivalent facts are deduplicated.
|
|
289
306
|
Schema v1 preserves user-confirmed manual memory but resets older derived
|
|
@@ -348,6 +365,15 @@ steal a live successor's lock. SQLite supplies its own WAL durability. Native
|
|
|
348
365
|
continuity handoffs are one-shot, bounded, and keyed by project + session +
|
|
349
366
|
branch head.
|
|
350
367
|
|
|
368
|
+
The session run lock uses file leases reclaimed when the owning PID dies.
|
|
369
|
+
Reclaim has a deliberate, documented TOCTOU window: two processes reclaiming
|
|
370
|
+
the same stale lease within milliseconds can, in one interleaving, unlink the
|
|
371
|
+
other's freshly created lease. The double re-read (token + inode metadata)
|
|
372
|
+
narrows but cannot atomically close this without an O_EXCL rename protocol;
|
|
373
|
+
the lock is best-effort serialization of a normally single-writer flow, not a
|
|
374
|
+
mutual-exclusion guarantee, and the surrounding pipeline remains fail-closed
|
|
375
|
+
when the lock cannot be acquired.
|
|
376
|
+
|
|
351
377
|
## Provider awareness
|
|
352
378
|
|
|
353
379
|
[`src/utils/tokens.ts`](./src/utils/tokens.ts) keeps a per-provider capability
|
|
@@ -437,7 +463,7 @@ The code is organized into six layers, each with a single responsibility.
|
|
|
437
463
|
|
|
438
464
|
| File | Responsibility |
|
|
439
465
|
| --- | --- |
|
|
440
|
-
| `src/index.ts` | extension
|
|
466
|
+
| `src/index.ts` | extension composition root and host lifecycle hooks |
|
|
441
467
|
| `src/constants.ts` | version, thresholds, prompts, config keys |
|
|
442
468
|
| `src/types.ts` | shared types and discriminated unions |
|
|
443
469
|
| `domain/provider-evaluation.ts` | advisory provider scenario matrix and route telemetry aggregation |
|
|
@@ -448,6 +474,11 @@ The code is organized into six layers, each with a single responsibility.
|
|
|
448
474
|
| File | Responsibility |
|
|
449
475
|
| --- | --- |
|
|
450
476
|
| `app/run-smart-compact.ts` | top-level pipeline orchestrator |
|
|
477
|
+
| `app/register-smart-compact-command.ts` | manual command adapter and restore/loop actions |
|
|
478
|
+
| `app/register-smart-compact-tool.ts` | bounded agent-tool adapter |
|
|
479
|
+
| `app/register-context-tools.ts` | project-scoped recall/save-memory adapters |
|
|
480
|
+
| `app/model-routing.ts` | stage model resolution and explicit-model precedence |
|
|
481
|
+
| `app/smart-compact-policy.ts` | branch-scoped agent visibility and auto-trigger policy; owns active-tool updates |
|
|
451
482
|
| `app/run-context.ts` | typed stage chain (`RcBase → … → StatedRc`) |
|
|
452
483
|
| `app/mode-policy.ts` | Auto selector and finite Fast/Balanced/Thorough policies; legacy Aggressive maps to Fast |
|
|
453
484
|
| `app/pending-slot.ts` | encapsulated pending-compaction state cell |
|
|
@@ -504,7 +535,9 @@ All external-world interaction.
|
|
|
504
535
|
| `utils/extraction.ts` | deterministic fact extraction (files, errors, decisions) |
|
|
505
536
|
| `utils/pruning.ts` | redundancy removal on the message list |
|
|
506
537
|
| `utils/state.ts` | structured state, open loops, delta, pinned-path preservation |
|
|
507
|
-
| `utils/
|
|
538
|
+
| `utils/config.ts` | validated config loading and mtime-keyed cache |
|
|
539
|
+
| `utils/helpers.ts` | batching, compaction boundaries, and extraction rendering helpers |
|
|
540
|
+
| `utils/backups.ts` | backup persistence, listing, and restore message construction |
|
|
508
541
|
| `utils/cache.ts` | metrics log + extraction prefix cache |
|
|
509
542
|
| `utils/fingerprint.ts` | project fingerprinting (language, framework, deps) |
|
|
510
543
|
| `utils/damage.ts` | post-compaction regression signals + remediation hints |
|
|
@@ -521,7 +554,11 @@ All external-world interaction.
|
|
|
521
554
|
|
|
522
555
|
| File | Responsibility |
|
|
523
556
|
| --- | --- |
|
|
524
|
-
| `ui/overlays.ts` | progressive preflight, semantic phase progress, approval review
|
|
557
|
+
| `ui/overlays.ts` | progressive preflight, semantic phase progress, and approval review |
|
|
558
|
+
| `ui/metrics-dashboard-overlay.ts` | interactive metrics dashboard screen |
|
|
559
|
+
| `ui/backup-overlays.ts` | backup picker, viewer, and restore action screen |
|
|
560
|
+
| `ui/open-loops-overlay.ts` | persisted open-loop manager |
|
|
561
|
+
| `ui/settings-overlay.ts` | session/branch policy editor for agent access and automatic compaction |
|
|
525
562
|
| `ui/dashboard-format.ts` | shared pure formatters for metrics surfaces |
|
|
526
563
|
| `ui/dashboard-insights.ts` | Data Confidence, quality/provider drilldowns, and canary trust views |
|
|
527
564
|
| `ui/metrics-report.ts` | text report + local HTML metrics dashboard |
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [9.4.0-rc.0] - 2026-08-20
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- `/smart-compact settings` provides branch-scoped TUI controls for agent access and automatic compaction. Agent access defaults to `inherit`, respecting Pi's host tool selection; explicit enable/disable remains available. Hiding agent access removes the `smart_compact` schema and prompt guidance while preserving the manual command, and disabling both controls creates a manual-only session. `agentToolAccess` supplies the permanent global default.
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- Context-graph indexing now resolves an awaitable transaction result. Permanent SQLite open/write failures settle once, cannot enter a zero-delay retry storm, and appear as partial persistence in telemetry.
|
|
12
|
+
- Session policy writes roll back runtime tool/status changes when the host cannot append branch state. Tool pipeline and durable-memory failures now throw so Pi records an error result instead of a successful text result.
|
|
13
|
+
- Compaction file evidence uses locale-independent code-point ordering for reproducible prompts across hosts.
|
|
14
|
+
|
|
3
15
|
## [9.3.1] - 2026-08-15
|
|
4
16
|
|
|
5
17
|
### Fixed
|
package/README.md
CHANGED
|
@@ -44,6 +44,7 @@ Then run `/smart-compact` for an explainable preflight before anything changes.
|
|
|
44
44
|
/smart-compact dashboard # interactive dashboard
|
|
45
45
|
/smart-compact restore # browse and restore backups
|
|
46
46
|
/smart-compact loops # manage persisted open loops
|
|
47
|
+
/smart-compact settings # agent visibility + automatic mode
|
|
47
48
|
```
|
|
48
49
|
|
|
49
50
|
Command controls are consumed only from the left edge. Once note text starts,
|
|
@@ -141,8 +142,9 @@ both tools.
|
|
|
141
142
|
| --- | --- |
|
|
142
143
|
| `/smart-compact` | Explicit manual run. Opens a target-first preflight or accepts direct args, dry-run, focus, and budgets. |
|
|
143
144
|
| `session_before_compact` | Auto path. Returns/stages a verification-scored summary under pressure; durable state waits for matching `session_compact`. |
|
|
144
|
-
| `smart_compact` tool | Agent path. Produces a pending summary for Pi's next natural compact; does not compact mid-turn. |
|
|
145
|
+
| `smart_compact` tool | Agent path. Produces a pending summary for Pi's next natural compact; does not compact mid-turn. Can be hidden from the agent. |
|
|
145
146
|
| `/smart-compact loops` | Project-level open-loop manager: resolve/reopen, priority, pin/unpin. |
|
|
147
|
+
| `/smart-compact settings` | TUI policy editor for agent access and automatic compaction. Manual `/smart-compact` always remains available. |
|
|
146
148
|
|
|
147
149
|
### Manual preflight
|
|
148
150
|
|
|
@@ -240,7 +242,7 @@ All stages use the selected Pi model by default. Routing is explicit and
|
|
|
240
242
|
independent of modes:
|
|
241
243
|
|
|
242
244
|
| Stage | Config key | Default |
|
|
243
|
-
|
|
245
|
+
| --- | --- | --- |
|
|
244
246
|
| Explore / segmentation | `segmentationModel` | selected model |
|
|
245
247
|
| Synthesis / assembly | `summaryModel` | selected model |
|
|
246
248
|
| Verification repair | `verificationModel` | summary/selected model |
|
|
@@ -380,6 +382,7 @@ Add `smartCompact` to `~/.pi/agent/settings.json`:
|
|
|
380
382
|
"verificationModel": null,
|
|
381
383
|
"summaryThinkingLevel": "minimal",
|
|
382
384
|
"segmentationThinkingLevel": "minimal",
|
|
385
|
+
"agentToolAccess": "inherit",
|
|
383
386
|
"autoTrigger": true,
|
|
384
387
|
"autoTriggerStrategy": "native-hook",
|
|
385
388
|
"minContextPercent": 60,
|
|
@@ -402,6 +405,18 @@ Add `smartCompact` to `~/.pi/agent/settings.json`:
|
|
|
402
405
|
}
|
|
403
406
|
```
|
|
404
407
|
|
|
408
|
+
`/smart-compact settings` can hide `smart_compact` from the agent and disable
|
|
409
|
+
automatic compaction independently. Changes apply immediately and are stored in
|
|
410
|
+
the current session branch; navigating the session tree restores that branch's
|
|
411
|
+
last policy. They do not edit `settings.json`. Set `agentToolAccess` to
|
|
412
|
+
`"disabled"` and `autoTrigger` to `false` below for a permanent Smart Compact
|
|
413
|
+
manual-only default. `"inherit"` (the default) respects Pi's `/tools`, host
|
|
414
|
+
allowlists, and other extensions instead of forcing the tool back on. This
|
|
415
|
+
disables Smart Compact's hook participation, not Pi's built-in native compactor.
|
|
416
|
+
Registering the tool internally does not expose it: Pi's active-tool list
|
|
417
|
+
controls the schema
|
|
418
|
+
and prompt guidance visible on the next agent turn.
|
|
419
|
+
|
|
405
420
|
`native-hook` preserves the existing passive behavior. The opt-in proactive
|
|
406
421
|
strategy is:
|
|
407
422
|
|
|
@@ -476,6 +491,7 @@ the run fails closed before staging or apply.
|
|
|
476
491
|
| `verificationModel` | `string \| null` | `null` | Optional explicit model for LLM verification repair |
|
|
477
492
|
| `summaryThinkingLevel` | `minimal \| low \| medium \| high \| xhigh \| max \| null` | `minimal` | Reasoning level for synthesis and repair; provider default when null |
|
|
478
493
|
| `segmentationThinkingLevel` | `minimal \| low \| medium \| high \| xhigh \| max \| null` | `minimal` | Reasoning level for exploration; provider default when null |
|
|
494
|
+
| `agentToolAccess` | `"inherit" \| "enabled" \| "disabled"` | `"inherit"` | Respect Pi's active tools by default, or explicitly expose/hide `smart_compact`; manual command is unaffected |
|
|
479
495
|
| `autoTrigger` | `boolean` | `true` | Allow smart compaction in Pi's native hook and the selected trigger strategy |
|
|
480
496
|
| `autoTriggerStrategy` | `native-hook \| settled` | `native-hook` | `settled` additionally requests Pi's normal compact flow after an idle high-pressure agent run; verified with Pi 0.84.0+ |
|
|
481
497
|
| `autoTriggerTimeoutMs` | `number` | `120000` | Requested auto cancellation deadline; the host hook clamps it to 60s and four LLM calls, shows live phase progress, then safely unwinds to native recovery |
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Api, Model } from "@earendil-works/pi-ai";
|
|
2
|
+
import type { ExtensionContext } from "@earendil-works/pi-coding-agent";
|
|
3
|
+
import type { CompactConfig } from "../types.ts";
|
|
4
|
+
/** Resolve a provider/id string through the host model registry. */
|
|
5
|
+
export declare function findModelById(ctx: ExtensionContext, modelId: string): Model<Api> | undefined;
|
|
6
|
+
/** Resolve per-stage routes while preserving explicit user model precedence. */
|
|
7
|
+
export declare function resolveModels(ctx: ExtensionContext, primary: Model<Api> | undefined, config: CompactConfig, explicit?: boolean): {
|
|
8
|
+
segModel: Model<Api> | undefined;
|
|
9
|
+
sumModel: Model<Api> | undefined;
|
|
10
|
+
verifyModel: Model<Api> | undefined;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=model-routing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-routing.d.ts","sourceRoot":"","sources":["../../src/app/model-routing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,oEAAoE;AACpE,wBAAgB,aAAa,CAC3B,GAAG,EAAE,gBAAgB,EACrB,OAAO,EAAE,MAAM,GACd,KAAK,CAAC,GAAG,CAAC,GAAG,SAAS,CAGxB;AAED,gFAAgF;AAChF,wBAAgB,aAAa,CAC3B,GAAG,EAAE,gBAAgB,EACrB,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,SAAS,EAC/B,MAAM,EAAE,aAAa,EACrB,QAAQ,UAAQ,GACf;IACD,QAAQ,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC;IACjC,QAAQ,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC;IACjC,WAAW,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC;CACrC,CAkBA"}
|
|
@@ -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,
|
|
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,EACV,aAAa,EACb,uBAAuB,EAEvB,aAAa,EACb,oBAAoB,EACpB,mBAAmB,EACpB,MAAM,aAAa,CAAC;AAIrB,OAAO,EAIL,KAAK,qBAAqB,EAC1B,KAAK,cAAc,EACpB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAM7D,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,aAAa,GACpB,MAAM,CAQR;AAED,MAAM,WAAW,wB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AAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,EAAE,OAAO,CAAC;CAC5B;AAED,uEAAuE;AACvE,wBAAgB,6BAA6B,CAC3C,GAAG,EAAE,gBAAgB,EACrB,YAAY,EAAE,KAAK,CAAC,GAAG,CAAC,EACxB,gBAAgB,EAAE,qBAAqB,GACtC,sBAAsB,CA4CxB;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,sBAIP,GACA,eAAe,CAwEjB"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
|
|
2
|
+
import { type ContextGraphScope } from "../infra/context-graph.ts";
|
|
3
|
+
export declare function resolveGraphScope(ctx: ExtensionContext): ContextGraphScope | null;
|
|
4
|
+
export declare function registerContextTools(pi: ExtensionAPI): void;
|
|
5
|
+
//# sourceMappingURL=register-context-tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register-context-tools.d.ts","sourceRoot":"","sources":["../../src/app/register-context-tools.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,YAAY,EACZ,gBAAgB,EACjB,MAAM,iCAAiC,CAAC;AAGzC,OAAO,EAKL,KAAK,iBAAiB,EAEvB,MAAM,2BAA2B,CAAC;AA0BnC,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,gBAAgB,GACpB,iBAAiB,GAAG,IAAI,CAiB1B;AAED,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,YAAY,GAAG,IAAI,CA6P3D"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
2
|
+
import type { PendingSlot } from "./pending-slot.ts";
|
|
3
|
+
import type { SessionRunLock } from "./session-run-lock.ts";
|
|
4
|
+
import type { SmartCompactPolicy } from "./smart-compact-policy.ts";
|
|
5
|
+
interface SmartCompactCommandDependencies {
|
|
6
|
+
pendingRef: PendingSlot;
|
|
7
|
+
runLock: SessionRunLock;
|
|
8
|
+
onNativeApplyError: (runId: string) => boolean;
|
|
9
|
+
policy: SmartCompactPolicy;
|
|
10
|
+
}
|
|
11
|
+
export declare function registerSmartCompactCommand(pi: ExtensionAPI, dependencies: SmartCompactCommandDependencies): void;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=register-smart-compact-command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register-smart-compact-command.d.ts","sourceRoot":"","sources":["../../src/app/register-smart-compact-command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EAEb,MAAM,iCAAiC,CAAC;AAwCzC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,UAAU,+BAA+B;IACvC,UAAU,EAAE,WAAW,CAAC;IACxB,OAAO,EAAE,cAAc,CAAC;IACxB,kBAAkB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;IAC/C,MAAM,EAAE,kBAAkB,CAAC;CAC5B;AA6OD,wBAAgB,2BAA2B,CACzC,EAAE,EAAE,YAAY,EAChB,YAAY,EAAE,+BAA+B,GAC5C,IAAI,CAwHN"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
2
|
+
import type { PendingSlot } from "./pending-slot.ts";
|
|
3
|
+
import type { SessionRunLock } from "./session-run-lock.ts";
|
|
4
|
+
import type { SmartCompactPolicy } from "./smart-compact-policy.ts";
|
|
5
|
+
interface SmartCompactToolDependencies {
|
|
6
|
+
pendingRef: PendingSlot;
|
|
7
|
+
runLock: SessionRunLock;
|
|
8
|
+
onNativeApplyError: (runId: string) => boolean;
|
|
9
|
+
policy: SmartCompactPolicy;
|
|
10
|
+
}
|
|
11
|
+
export declare function registerSmartCompactTool(pi: ExtensionAPI, dependencies: SmartCompactToolDependencies): void;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=register-smart-compact-tool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register-smart-compact-tool.d.ts","sourceRoot":"","sources":["../../src/app/register-smart-compact-tool.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAiBpE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,UAAU,4BAA4B;IACpC,UAAU,EAAE,WAAW,CAAC;IACxB,OAAO,EAAE,cAAc,CAAC;IACxB,kBAAkB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;IAC/C,MAAM,EAAE,kBAAkB,CAAC;CAC5B;AAED,wBAAgB,wBAAwB,CACtC,EAAE,EAAE,YAAY,EAChB,YAAY,EAAE,4BAA4B,GACzC,IAAI,CAmON"}
|
|
@@ -4,7 +4,7 @@ export interface SmartCompactInput {
|
|
|
4
4
|
mode?: CompactionMode;
|
|
5
5
|
verbose: boolean;
|
|
6
6
|
dryRun: boolean;
|
|
7
|
-
action?: "metrics" | "dashboard" | "restore" | "loops";
|
|
7
|
+
action?: "metrics" | "dashboard" | "restore" | "loops" | "settings";
|
|
8
8
|
focus?: string;
|
|
9
9
|
note?: string;
|
|
10
10
|
maxLlmCalls?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smart-compact-input.d.ts","sourceRoot":"","sources":["../../src/app/smart-compact-input.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAsB,MAAM,aAAa,CAAC;AAItE,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"smart-compact-input.d.ts","sourceRoot":"","sources":["../../src/app/smart-compact-input.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAsB,MAAM,aAAa,CAAC;AAItE,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,OAAO,GAAG,UAAU,CAAC;IACpE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,uBAAuB,GAC/B;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,iBAAiB,CAAA;CAAE,GACtC;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAwHjC,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,GACvC,uBAAuB,CAqEzB;AAED,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC9B,uBAAuB,CA+CzB"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
|
|
2
|
+
import type { CompactConfig } from "../types.ts";
|
|
3
|
+
type AgentToolAccess = CompactConfig["agentToolAccess"];
|
|
4
|
+
export interface SmartCompactPolicySnapshot {
|
|
5
|
+
agentToolAccess: AgentToolAccess;
|
|
6
|
+
/** Effective host state after allowlists and other tool controls are applied. */
|
|
7
|
+
agentToolEnabled: boolean;
|
|
8
|
+
autoTrigger: boolean;
|
|
9
|
+
}
|
|
10
|
+
interface DesiredSmartCompactPolicy {
|
|
11
|
+
agentToolAccess: AgentToolAccess;
|
|
12
|
+
autoTrigger: boolean;
|
|
13
|
+
}
|
|
14
|
+
type SmartCompactPolicyUpdate = {
|
|
15
|
+
ok: true;
|
|
16
|
+
policy: SmartCompactPolicySnapshot;
|
|
17
|
+
} | {
|
|
18
|
+
ok: false;
|
|
19
|
+
policy: SmartCompactPolicySnapshot;
|
|
20
|
+
error: string;
|
|
21
|
+
};
|
|
22
|
+
export interface SmartCompactPolicy {
|
|
23
|
+
snapshot(): SmartCompactPolicySnapshot;
|
|
24
|
+
isAgentToolEnabled(): boolean;
|
|
25
|
+
isAutoTriggerEnabled(): boolean;
|
|
26
|
+
restore(ctx: ExtensionContext): void;
|
|
27
|
+
update(patch: Partial<DesiredSmartCompactPolicy>, ctx: ExtensionContext): SmartCompactPolicyUpdate;
|
|
28
|
+
}
|
|
29
|
+
export declare function createSmartCompactPolicy(pi: ExtensionAPI): SmartCompactPolicy;
|
|
30
|
+
export {};
|
|
31
|
+
//# sourceMappingURL=smart-compact-policy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smart-compact-policy.d.ts","sourceRoot":"","sources":["../../src/app/smart-compact-policy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,gBAAgB,EACjB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AASjD,KAAK,eAAe,GAAG,aAAa,CAAC,iBAAiB,CAAC,CAAC;AAExD,MAAM,WAAW,0BAA0B;IACzC,eAAe,EAAE,eAAe,CAAC;IACjC,iFAAiF;IACjF,gBAAgB,EAAE,OAAO,CAAC;IAC1B,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,UAAU,yBAAyB;IACjC,eAAe,EAAE,eAAe,CAAC;IACjC,WAAW,EAAE,OAAO,CAAC;CACtB;AAMD,KAAK,wBAAwB,GACzB;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,0BAA0B,CAAA;CAAE,GAChD;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,0BAA0B,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAErE,MAAM,WAAW,kBAAkB;IACjC,QAAQ,IAAI,0BAA0B,CAAC;IACvC,kBAAkB,IAAI,OAAO,CAAC;IAC9B,oBAAoB,IAAI,OAAO,CAAC;IAChC,OAAO,CAAC,GAAG,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACrC,MAAM,CACJ,KAAK,EAAE,OAAO,CAAC,yBAAyB,CAAC,EACzC,GAAG,EAAE,gBAAgB,GACpB,wBAAwB,CAAC;CAC7B;AAqDD,wBAAgB,wBAAwB,CAAC,EAAE,EAAE,YAAY,GAAG,kBAAkB,CAyE7E"}
|
|
@@ -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;AA2C/D,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,QAAQ,GAAG,WAAW,CA2T1D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metrics.d.ts","sourceRoot":"","sources":["../../../src/app/steps/metrics.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"metrics.d.ts","sourceRoot":"","sources":["../../../src/app/steps/metrics.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EAGhB,MAAM,gBAAgB,CAAC;AA2DxB,wBAAgB,mBAAmB,CACjC,EAAE,EAAE,QAAQ,EACZ,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,WAAW,GAC1C,eAAe,CAsEjB;AAED,wBAAsB,oBAAoB,CACxC,EAAE,EAAE,QAAQ,EACZ,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,WAAW,GAC1C,OAAO,CAAC,IAAI,CAAC,CAsCf;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,cAAc,CAAC;CACvB;AAED,wBAAsB,oBAAoB,CACxC,EAAE,EAAE,MAAM,GAAG,QAAQ,EACrB,GAAG,EAAE,OAAO,EACZ,MAAM,EAAE,oBAAoB,GAC3B,OAAO,CAAC,IAAI,CAAC,CA+Gf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"persist.d.ts","sourceRoot":"","sources":["../../../src/app/steps/persist.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"persist.d.ts","sourceRoot":"","sources":["../../../src/app/steps/persist.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EACV,eAAe,EACf,iBAAiB,EAElB,MAAM,gBAAgB,CAAC;AAcxB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AASlD;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,MAAM,EAAE,CAAC,CA8BnB;AAED,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,MAAM,EAAE,CAAC,CAoBnB;AAED,wEAAwE;AACxE,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,UAAU,GAAG,IAAI,CA0CvD;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,EAAE,EAAE,UAAU,EACd,eAAe,CAAC,EAAE,eAAe,GAChC,iBAAiB,CAyBnB;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,EAAE,EAAE,QAAQ,GAAG,IAAI,CA2BlD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prepare.d.ts","sourceRoot":"","sources":["../../../src/app/steps/prepare.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAgB,MAAM,mBAAmB,CAAC;AAW1E,wBAAsB,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,
|
|
1
|
+
{"version":3,"file":"prepare.d.ts","sourceRoot":"","sources":["../../../src/app/steps/prepare.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAgB,MAAM,mBAAmB,CAAC;AAW1E,wBAAsB,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAmFhE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tier.d.ts","sourceRoot":"","sources":["../../../src/app/steps/tier.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAc,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"tier.d.ts","sourceRoot":"","sources":["../../../src/app/steps/tier.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAc,MAAM,mBAAmB,CAAC;AAQ3E,wBAAgB,UAAU,CAAC,EAAE,EAAE,WAAW,GAAG,QAAQ,GAAG,IAAI,CA+B3D"}
|
|
@@ -12,7 +12,6 @@ export interface CompactionWindowPlanInput {
|
|
|
12
12
|
mode: EffectiveCompactionMode;
|
|
13
13
|
profileCfg: ProfileConfig;
|
|
14
14
|
force: boolean;
|
|
15
|
-
overflowedContext: boolean;
|
|
16
15
|
/** Estimated final summary size in the same local units as messageTokens. */
|
|
17
16
|
finalSummaryAllowanceTokens?: number;
|
|
18
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"window.d.ts","sourceRoot":"","sources":["../../../src/app/steps/window.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAE1E,OAAO,KAAK,EACV,oBAAoB,
|
|
1
|
+
{"version":3,"file":"window.d.ts","sourceRoot":"","sources":["../../../src/app/steps/window.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAE1E,OAAO,KAAK,EACV,oBAAoB,EACpB,oBAAoB,EACpB,UAAU,EAEV,UAAU,EACX,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EACV,uBAAuB,EAEvB,aAAa,EACb,oBAAoB,EACpB,mBAAmB,EACpB,MAAM,gBAAgB,CAAC;AAexB,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAGhF,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,6EAA6E;IAC7E,2BAA2B,CAAC,EAAE,MAAM,CAAC;CACtC;AAED,+DAA+D;AAC/D,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,oBAAoB,GAAG,MAAM,CAe7E;AAED,oFAAoF;AACpF,wBAAgB,6BAA6B,CAC3C,UAAU,EAAE,aAAa,EACzB,SAAS,EAAE,cAAc,EACzB,YAAY,EAAE,oBAAoB,GAAG,SAAS,GAC7C,MAAM,CAkBR;AAyDD,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,yBAAyB,GAC/B,oBAAoB,CA0LtB;AAED,wBAAgB,uBAAuB,CAAC,EAAE,EAAE,UAAU,GAAG,UAAU,GAAG,IAAI,CAwGzE"}
|
package/dist/constants.d.ts
CHANGED
|
@@ -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.
|
|
11
|
+
export declare const VERSION = "9.4.0-rc.0";
|
|
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;
|
|
@@ -48,6 +48,7 @@ export declare const DEFAULT_CONFIG: {
|
|
|
48
48
|
verificationModel: string | null;
|
|
49
49
|
summaryThinkingLevel: "minimal";
|
|
50
50
|
segmentationThinkingLevel: "minimal";
|
|
51
|
+
agentToolAccess: "inherit";
|
|
51
52
|
autoTrigger: boolean;
|
|
52
53
|
autoTriggerStrategy: "native-hook";
|
|
53
54
|
autoTriggerTimeoutMs: number;
|
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,
|
|
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,eAAe,CAAC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E,GAAG;aACX,YAAY,EAAE,GAAG;aACjB,UAAU,EAAE,GAAG;aACf,gBAAgB,EAAE,KAAM;aACxB,kBAAkB,EAAE,IAAK;aACzB,cAAc,EAAE,GAAG;aACnB,eAAe,EAAE,EAAE;aACnB,WAAW,EAAE,GAAG;aAEhB,YAAY,EAAE,EAAE;aAChB,SAAS,EAAE,CAAC;aACZ,WAAW,EAAE,CAAC;aACd,kBAAkB,EAAE,EAAE;aACtB,aAAa,EAAE,EAAE;aACjB,gBAAgB,EAAE,EAAE;aACpB,eAAe,EAAE,EAAE;aACnB,oBAAoB,EAAE,CAAC;aACvB,eAAe,EAAE,CAAC;CACT,CAAC;AAGX,eAAO,MAAM,qBAAqB,MAAM,CAAC;AACzC,oEAAoE;AACpE,eAAO,MAAM,yBAAyB,QAAS,CAAC;AAGhD,sFAAsF;AACtF,eAAO,MAAM,eAAe,QACgI,CAAC;AAC7J,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,UAAU,iBAAiB,CAAC;AACzC,eAAO,MAAM,cAAc,oBAAoB,CAAC;AAEhD,eAAO,MAAM,sBAAsB,QAU4T,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -3,15 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Architecture: Extract -> Explore -> Synthesize -> Verify
|
|
5
5
|
*/
|
|
6
|
-
import { type ExtensionAPI
|
|
7
|
-
|
|
8
|
-
import { loadConfig } from "./utils/helpers.ts";
|
|
9
|
-
/** Resolve a "provider/id" string through the model registry. */
|
|
10
|
-
export declare function findModelById(ctx: ExtensionContext, modelId: string): Model<Api> | undefined;
|
|
11
|
-
export declare function resolveModels(ctx: ExtensionContext, primary: Model<Api> | undefined, config: ReturnType<typeof loadConfig>, explicit?: boolean): {
|
|
12
|
-
segModel: Model<Api> | undefined;
|
|
13
|
-
sumModel: Model<Api> | undefined;
|
|
14
|
-
verifyModel: Model<Api> | undefined;
|
|
15
|
-
};
|
|
6
|
+
import { type ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
7
|
+
export { findModelById, resolveModels } from "./app/model-routing.ts";
|
|
16
8
|
export default function smartCompactExtension(pi: ExtensionAPI): void;
|
|
17
9
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAEL,KAAK,YAAY,EAElB,MAAM,iCAAiC,CAAC;AAsDzC,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAgEtE,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,EAAE,EAAE,YAAY,QAoV7D"}
|