pi-smart-compact 10.0.0 → 10.0.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 +4 -10
- package/CHANGELOG.md +15 -4
- package/README.md +1 -3
- package/dist/constants.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -80
- package/dist/rtk.js +1 -1
- package/docs/RELEASE.md +1 -2
- package/docs/configuration.md +1 -1
- package/docs/evaluation.md +0 -1
- package/docs/guide.md +10 -29
- package/package.json +1 -1
- package/dist/app/extension-conflicts.d.ts +0 -15
- package/dist/app/extension-conflicts.d.ts.map +0 -1
package/ARCHITECTURE.md
CHANGED
|
@@ -104,9 +104,8 @@ Registered in [`src/index.ts`](https://github.com/alpertarhan/pi-smart-compact/b
|
|
|
104
104
|
|
|
105
105
|
The table lists the owning surfaces. Other host events support them:
|
|
106
106
|
session switch/fork/tree and `model_select` cancel speculative
|
|
107
|
-
preparation and queued edits; `session_start`
|
|
108
|
-
|
|
109
|
-
name-based evidence from the live command/tool registry, one notice);
|
|
107
|
+
preparation and queued edits; `session_start` initializes replay, cache,
|
|
108
|
+
tool exposure, policy and navigation state;
|
|
110
109
|
`before_agent_start` injects the one-shot native continuity bridge;
|
|
111
110
|
`message_end` feeds damage monitoring and the host prompt-cache ledger;
|
|
112
111
|
`context_with_system` and `cache_warming_decision` serve held automatic trims
|
|
@@ -338,14 +337,10 @@ bytes, and hold the per-origin caps without losing earlier evidence.
|
|
|
338
337
|
### Session navigation and apply-time validation
|
|
339
338
|
|
|
340
339
|
`app/register-navigation.ts` owns anchors, cross-session recall, pivots, the
|
|
341
|
-
anchor footer and the Anthropic anchor cache marker (`app/anchor-cache.ts
|
|
342
|
-
semantics adapted from pi-toolkit's auto-context under its MIT license).
|
|
340
|
+
anchor footer and the Anthropic anchor cache marker (`app/anchor-cache.ts`).
|
|
343
341
|
`app/navigation-data.ts` reads both owned anchors (`custom_message` entries of
|
|
344
342
|
type `smart-context-anchor`, plus `smart_navigation` tool results) and legacy
|
|
345
|
-
`context` tool anchors
|
|
346
|
-
JSONL read-only. pi-toolkit's auto-context extension is not a supported
|
|
347
|
-
co-resident: two anchor and pruning owners are unsafe in any load order, and
|
|
348
|
-
`piToolkit.context.thinningEnabled` is no longer read.
|
|
343
|
+
`context` tool anchors; recall scans other sessions' JSONL read-only.
|
|
349
344
|
|
|
350
345
|
A human anchor is a `sendMessage` custom message followed by a native label on
|
|
351
346
|
that entry; a human pivot navigates to the label so Pi's `custom_message`
|
|
@@ -1039,7 +1034,6 @@ stores by default.
|
|
|
1039
1034
|
| `app/session-lineage.ts` | read-only in-memory load of `parentSession` ancestors (depth, size and cycle bounds) |
|
|
1040
1035
|
| `app/session-handoff.ts` | handoff seed from recorded state only; preview and `ctx.newSession` seeding |
|
|
1041
1036
|
| `app/host-cache-ledger.ts` | session-local ledger of Pi's own requests: rebuild detection, cause attribution, cache lifetime |
|
|
1042
|
-
| `app/extension-conflicts.ts` | startup detection of known conflicting compaction/context-editing extensions; name-based, one notice |
|
|
1043
1037
|
| `app/artifact-storage.ts` | read-only storage inventory and lineage classification |
|
|
1044
1038
|
| `app/visual-archive.ts` | bounded evidence selection, persisted archive validation, request-local image rehydration |
|
|
1045
1039
|
| `app/native-compaction.ts` | native engine: nested-request compaction, clean-turn cut, route/size checks, replay |
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [10.0.1] - 2026-09-28
|
|
6
|
+
|
|
7
|
+
### Removed
|
|
8
|
+
|
|
9
|
+
- Name-based startup scanning of unrelated extensions and instructions to
|
|
10
|
+
disable or uninstall them. An unrelated command name no longer produces a
|
|
11
|
+
guessed extension-conflict warning. Actual compaction lifecycle and
|
|
12
|
+
continuity-state checks remain in place.
|
|
13
|
+
- Unrelated extension lists and compatibility-policing guidance from current
|
|
14
|
+
product documentation and release notes. Required and optional dependency
|
|
15
|
+
instructions, legacy session-data support and license attribution remain.
|
|
16
|
+
|
|
5
17
|
## [10.0.0] - 2026-09-28
|
|
6
18
|
|
|
7
19
|
**Pi Continuity**: the stable release of the context-hygiene and session-continuity
|
|
@@ -22,10 +34,9 @@ rework. This release includes the work recorded in the unpublished
|
|
|
22
34
|
- Mnemopi, its optional Bun runtime and image rendering are separate optional
|
|
23
35
|
components, not automatic downloads. Readiness shows the correct install
|
|
24
36
|
command. The default local graph does not require these components.
|
|
25
|
-
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
`0.2.2` alone does not cover nested calls (upstream PR #10).
|
|
37
|
+
- Claude subscription requests require the separate adapter with final-payload
|
|
38
|
+
normalization; the published adapter `0.2.2` alone does not cover nested calls
|
|
39
|
+
(upstream PR #10).
|
|
29
40
|
|
|
30
41
|
### Added
|
|
31
42
|
|
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@ this extension adds context hygiene and continuity policies around it.
|
|
|
19
19
|
> The TUI still says **Smart Compact**. No data or configuration migration is
|
|
20
20
|
> needed. [Identity and naming](./docs/identity.md).
|
|
21
21
|
>
|
|
22
|
-
> **Pi Continuity 10.0.
|
|
22
|
+
> **Pi Continuity 10.0.1:** upgrading from 9.x? Update Pi to 0.87.1 or newer
|
|
23
23
|
> and read the [upgrade notes](./docs/guide.md#upgrade-from-9x). Optional memory
|
|
24
24
|
> engines and image rendering are installed separately. The
|
|
25
25
|
> [changelog](./CHANGELOG.md) records the full release and its evidence limits.
|
|
@@ -149,8 +149,6 @@ session backups or archived tool output.
|
|
|
149
149
|
model-runtime calls. Full coverage needs final-payload normalization
|
|
150
150
|
([upstream PR #10](https://github.com/minzique/pi-claude-oauth-adapter/pull/10)).
|
|
151
151
|
[Compatibility details](./docs/guide.md#summary-format-provider-compaction-and-images).
|
|
152
|
-
- **Use one context-editing owner.** Do not load pi-toolkit's auto-context
|
|
153
|
-
alongside session navigation. See [extension compatibility](./docs/guide.md#working-with-other-extensions-and-features).
|
|
154
152
|
- **Cost and quality need live evidence.** Cancelled or discarded preparation
|
|
155
153
|
still costs. Offline pilots do not establish billed savings, model fidelity
|
|
156
154
|
or production readiness. [Evaluation limits](./docs/evaluation.md).
|
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 = "10.0.
|
|
11
|
+
export declare const VERSION = "10.0.1";
|
|
12
12
|
/**
|
|
13
13
|
* Opt-in components that are not installed with the extension: optional peer
|
|
14
14
|
* dependencies in package.json, pinned to the versions the release audit
|
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,EAEN,KAAK,YAAY,EAEjB,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAEN,KAAK,YAAY,EAEjB,MAAM,iCAAiC,CAAC;AAmEzC,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAyDtE,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,EAAE,EAAE,YAAY,QA8lB7D"}
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from "@earendil-works/pi-coding-agent";
|
|
6
6
|
|
|
7
7
|
// src/constants.ts
|
|
8
|
-
var VERSION = "10.0.
|
|
8
|
+
var VERSION = "10.0.1";
|
|
9
9
|
var OPTIONAL_COMPONENTS = {
|
|
10
10
|
mnemopi: { name: "@oh-my-pi/pi-mnemopi", version: "18.3.1", enables: "Mnemopi memory store" },
|
|
11
11
|
bun: { name: "bun", version: "1.4.2", enables: "Mnemopi worker runtime when no Bun 1.3.14+ is on PATH" },
|
|
@@ -15807,72 +15807,6 @@ function createCompactionCommitStore(options = {}) {
|
|
|
15807
15807
|
};
|
|
15808
15808
|
}
|
|
15809
15809
|
|
|
15810
|
-
// src/app/extension-conflicts.ts
|
|
15811
|
-
var KIND = {
|
|
15812
|
-
"context-fold": "compaction",
|
|
15813
|
-
"pi-context-prune": "context-editing",
|
|
15814
|
-
"pi-dcp": "context-editing",
|
|
15815
|
-
"pi-fold": "context-editing",
|
|
15816
|
-
"pi-openai-toolkit": "compaction",
|
|
15817
|
-
"pi-toolkit": "context-editing"
|
|
15818
|
-
};
|
|
15819
|
-
var SEGMENT_OWNER = {
|
|
15820
|
-
"context-fold": "context-fold",
|
|
15821
|
-
dcp: "pi-dcp",
|
|
15822
|
-
"pi-context-prune": "pi-context-prune",
|
|
15823
|
-
"pi-dcp": "pi-dcp",
|
|
15824
|
-
"pi-fold": "pi-fold",
|
|
15825
|
-
"pi-openai-toolkit": "pi-openai-toolkit"
|
|
15826
|
-
};
|
|
15827
|
-
function segments(info) {
|
|
15828
|
-
const out = new Set;
|
|
15829
|
-
if (!info)
|
|
15830
|
-
return out;
|
|
15831
|
-
for (const text of [info.path ?? "", info.source ?? "", info.baseDir ?? ""]) {
|
|
15832
|
-
for (const raw of text.toLowerCase().split(/[\\/:]+/)) {
|
|
15833
|
-
const segment = raw.replace(/(.)@.*$/, "$1").replace(/\.(?:[cm]?[jt]s|git)$/, "");
|
|
15834
|
-
if (segment)
|
|
15835
|
-
out.add(segment);
|
|
15836
|
-
}
|
|
15837
|
-
}
|
|
15838
|
-
return out;
|
|
15839
|
-
}
|
|
15840
|
-
function detectExtensionConflicts(registry) {
|
|
15841
|
-
const entries = [
|
|
15842
|
-
...registry.commands.filter((command) => command.source === "extension").map((command) => ({ name: command.name.toLowerCase(), label: `/${command.name} command`, segments: segments(command.sourceInfo) })),
|
|
15843
|
-
...registry.tools.map((tool) => ({ name: tool.name.toLowerCase(), label: `${tool.name} tool`, segments: segments(tool.sourceInfo) }))
|
|
15844
|
-
].filter((entry) => !(entry.segments.has("pi-smart-compact") || entry.name.startsWith("smart_") || entry.name === "smart-compact"));
|
|
15845
|
-
const found = new Map;
|
|
15846
|
-
const add = (name, evidence) => {
|
|
15847
|
-
if (!found.has(name))
|
|
15848
|
-
found.set(name, evidence);
|
|
15849
|
-
};
|
|
15850
|
-
const bareFold = [];
|
|
15851
|
-
for (const entry of entries) {
|
|
15852
|
-
const owner = [...entry.segments].map((segment) => SEGMENT_OWNER[segment]).find(Boolean);
|
|
15853
|
-
if (owner)
|
|
15854
|
-
add(owner, `${entry.label} from ${owner}`);
|
|
15855
|
-
else if (entry.segments.has("pi-toolkit") && entry.name === "context")
|
|
15856
|
-
add("pi-toolkit", `${entry.label} from pi-toolkit`);
|
|
15857
|
-
else if (entry.name === "fold-handoff")
|
|
15858
|
-
add("context-fold", entry.label);
|
|
15859
|
-
else if (entry.name === "prune")
|
|
15860
|
-
add("pi-context-prune", entry.label);
|
|
15861
|
-
else if (entry.name === "fold")
|
|
15862
|
-
bareFold.push(entry);
|
|
15863
|
-
}
|
|
15864
|
-
for (const entry of bareFold)
|
|
15865
|
-
add(found.has("context-fold") ? "context-fold" : "pi-fold", entry.label);
|
|
15866
|
-
return [...found].map(([name, evidence]) => ({ name, kind: KIND[name], evidence })).sort((a, b) => a.name.localeCompare(b.name));
|
|
15867
|
-
}
|
|
15868
|
-
function conflictNotice(conflicts) {
|
|
15869
|
-
const names = conflicts.map((conflict) => conflict.name);
|
|
15870
|
-
const list = names.length === 1 ? names[0] : `${names.slice(0, -1).join(", ")} and ${names.at(-1)}`;
|
|
15871
|
-
const verb = names.length === 1 ? "also compacts or edits" : "also compact or edit";
|
|
15872
|
-
const evidence = conflicts.map((conflict) => `${conflict.name}: ${conflict.evidence}`).join("; ");
|
|
15873
|
-
return `${list} ${verb} this conversation (${evidence}). Two owners of the same history are not safe in any load order: summaries can be discarded and cache prefixes rewritten twice. Keep only one loaded (Pi: /settings \u203A packages, or the extensions list).`;
|
|
15874
|
-
}
|
|
15875
|
-
|
|
15876
15810
|
// src/app/native-continuity-bridge.ts
|
|
15877
15811
|
import crypto6 from "crypto";
|
|
15878
15812
|
import fs13 from "fs";
|
|
@@ -23888,7 +23822,7 @@ function smartCompactExtension(pi) {
|
|
|
23888
23822
|
const calls = displaced.reduce((sum, pending) => sum + (pending.metricsSnapshot?.totalCalls ?? 0), 0);
|
|
23889
23823
|
reportIssue({
|
|
23890
23824
|
key: "compact.foreign-displaced",
|
|
23891
|
-
message: actor + " was applied instead of Continuity's prepared summary; that summary (" + calls + " model call" + (calls === 1 ? "" : "s") + ") was discarded and its continuity state was not saved.
|
|
23825
|
+
message: actor + " was applied instead of Continuity's prepared summary; that summary (" + calls + " model call" + (calls === 1 ? "" : "s") + ") was discarded and its continuity state was not saved."
|
|
23892
23826
|
}, ctx);
|
|
23893
23827
|
await Promise.all(displaced.flatMap((pending) => applyFailureWrites.get(pending.runId) ?? []));
|
|
23894
23828
|
return;
|
|
@@ -23896,7 +23830,7 @@ function smartCompactExtension(pi) {
|
|
|
23896
23830
|
if (source === "extension") {
|
|
23897
23831
|
reportIssue({
|
|
23898
23832
|
key: "compact.foreign-extension",
|
|
23899
|
-
message: actor + " was applied; Continuity did not summarize it and recorded no continuity state or metrics for it.
|
|
23833
|
+
message: actor + " was applied; Continuity did not summarize it and recorded no continuity state or metrics for it."
|
|
23900
23834
|
}, ctx);
|
|
23901
23835
|
} else if (automaticConfig().autoTrigger) {
|
|
23902
23836
|
reportIssue({
|
|
@@ -24007,17 +23941,6 @@ function smartCompactExtension(pi) {
|
|
|
24007
23941
|
pi.on("session_start", (_event, ctx) => {
|
|
24008
23942
|
nativeReplay.refresh(ctx);
|
|
24009
23943
|
flushIssues(ctx);
|
|
24010
|
-
try {
|
|
24011
|
-
const conflicts = detectExtensionConflicts({ commands: typeof pi.getCommands === "function" ? pi.getCommands() : [], tools: pi.getAllTools() });
|
|
24012
|
-
if (conflicts.length > 0)
|
|
24013
|
-
reportIssue({ key: "interop.conflicts", message: conflictNotice(conflicts) }, ctx);
|
|
24014
|
-
} catch (error) {
|
|
24015
|
-
reportIssue({
|
|
24016
|
-
key: "interop.detect",
|
|
24017
|
-
message: "Could not check loaded extensions for conflicts (" + errorDetail(error) + "). Other compaction extensions are not detected at startup. Please report this if it repeats.",
|
|
24018
|
-
error
|
|
24019
|
-
}, ctx);
|
|
24020
|
-
}
|
|
24021
23944
|
invalidatePreparation(ctx);
|
|
24022
23945
|
hostCache.reset(resolveSessionId(ctx));
|
|
24023
23946
|
toolExposure.atBoundary();
|
package/dist/rtk.js
CHANGED
|
@@ -198,7 +198,7 @@ class SecretScrubber {
|
|
|
198
198
|
}
|
|
199
199
|
|
|
200
200
|
// src/constants.ts
|
|
201
|
-
var VERSION = "10.0.
|
|
201
|
+
var VERSION = "10.0.1";
|
|
202
202
|
var OPTIONAL_COMPONENTS = {
|
|
203
203
|
mnemopi: { name: "@oh-my-pi/pi-mnemopi", version: "18.3.1", enables: "Mnemopi memory store" },
|
|
204
204
|
bun: { name: "bun", version: "1.4.2", enables: "Mnemopi worker runtime when no Bun 1.3.14+ is on PATH" },
|
package/docs/RELEASE.md
CHANGED
|
@@ -38,8 +38,7 @@ package installation.
|
|
|
38
38
|
plus the final-payload patch, [upstream PR #10](https://github.com/minzique/pi-claude-oauth-adapter/pull/10),
|
|
39
39
|
until it is released) and record
|
|
40
40
|
the paired archive paths and hashes at final packaging — do not
|
|
41
|
-
reconstruct them from memory.
|
|
42
|
-
loaded with the candidate.
|
|
41
|
+
reconstruct them from memory.
|
|
43
42
|
- [ ] Confirm Pi remains a host peer (`">=0.87.1"`) and TypeBox a wildcard peer (`"*"`); neither is bundled.
|
|
44
43
|
- [ ] Confirm the visual renderer remains optional/external and the font plus its license ship in `assets/`, together with the on-demand context guide `assets/skills/context-management/SKILL.md`. Verify default Node loading without the optional addon and a real PNG render where supported.
|
|
45
44
|
- [ ] Confirm Mnemopi stays an optional external engine with TypeBox external in its worker, and that `bun`, `@oh-my-pi/pi-mnemopi` and `@resvg/resvg-js` remain optional peers pinned to `OPTIONAL_COMPONENTS` (never `optionalDependencies`). Verify a plain install pulls none of them in, the failure names the install command for the install root, the installed Node-host worker runs on the user-installed `bun` component under a Pi-style npm root with no Bun on `PATH`, and the fail-closed missing-engine and missing-Bun failures submit no memory request and create no store.
|
package/docs/configuration.md
CHANGED
|
@@ -7,7 +7,7 @@ Pi Continuity is the product name only. Settings keep their technical names:
|
|
|
7
7
|
everything lives under the `smartCompact` key, and the settings screen is opened
|
|
8
8
|
with `/smart-compact settings`.
|
|
9
9
|
|
|
10
|
-
Defaults on this page were checked against Pi Continuity `10.0.
|
|
10
|
+
Defaults on this page were checked against Pi Continuity `10.0.1`. For an older
|
|
11
11
|
installation, use [the changelog](../CHANGELOG.md) and the
|
|
12
12
|
[upgrade notes](./guide.md#upgrade-from-9x) before adopting these settings.
|
|
13
13
|
|
package/docs/evaluation.md
CHANGED
|
@@ -381,7 +381,6 @@ no provider request.
|
|
|
381
381
|
| Command | Default | Purpose |
|
|
382
382
|
| --- | --- | --- |
|
|
383
383
|
| `bun scripts/session-pilot.ts` | Offline | Real `AgentSession` with scripted model transport, Pi Continuity only: tools, anchor and pivot with carryover, trimming/retrieval, rewind, compaction and reopen |
|
|
384
|
-
| `NODE_PATH="$PWD/node_modules" bun scripts/context-compat-pilot.ts /path/to/pi-lens` | Offline | Real Pi dispatch with an explicit local pi-lens path in both load orders: read-guard coverage and the anchor cached prefix across trim |
|
|
385
384
|
| `PSC_CLAUDE_OAUTH_EXTENSION=<pi-claude-oauth-adapter>/extensions/index.ts bun scripts/native-host-pilot.ts` | Offline fake provider | Provider-native compaction on stock Pi; the Anthropic OAuth route needs the standalone adapter (patched final-payload build for billing on nested requests). `PSC_NATIVE_ROUTES=codex-oauth,openai-api-key` runs without it and `PSC_PILOT_SHORT=1` shortens each route. `PSC_NATIVE_LIVE=1` sends real, ledger-capped requests and needs explicit approval |
|
|
386
385
|
| `bun run scripts/rtk-pilot.ts /absolute/path/to/rtk` | Local only | Synthetic RTK rewrite contract; characters, not provider tokens |
|
|
387
386
|
| `bun run scripts/visual-pilot.ts --model=provider/id` | Offline planning | Bitmap versus text evidence; `--live` authorizes at most 9 sequential requests and needs explicit approval |
|
package/docs/guide.md
CHANGED
|
@@ -15,7 +15,7 @@ This guide is task oriented. For every setting, default and range, see the
|
|
|
15
15
|
release evidence, see [evaluation](./evaluation.md).
|
|
16
16
|
|
|
17
17
|
> [!NOTE]
|
|
18
|
-
> **Which version this describes.** This guide targets Pi Continuity `10.0.
|
|
18
|
+
> **Which version this describes.** This guide targets Pi Continuity `10.0.1`,
|
|
19
19
|
> the stable release of the context-hygiene and continuity rework. The earlier
|
|
20
20
|
> `9.8.0-canary.*` entries in the changelog are historical local candidates,
|
|
21
21
|
> not npm releases. See [upgrade notes](#upgrade-from-9x) when coming from 9.x
|
|
@@ -35,7 +35,7 @@ release evidence, see [evaluation](./evaluation.md).
|
|
|
35
35
|
- [Session navigation](#session-navigation)
|
|
36
36
|
- [Agent tools](#agent-tools)
|
|
37
37
|
- [Memory: what is stored where](#memory-what-is-stored-where)
|
|
38
|
-
- [
|
|
38
|
+
- [Pi host integration](#pi-host-integration)
|
|
39
39
|
- [Experimental features](#experimental-features)
|
|
40
40
|
- [Recovery](#recovery)
|
|
41
41
|
- [Storage and privacy](#storage-and-privacy)
|
|
@@ -97,17 +97,14 @@ speculative background preparation are off until selected.
|
|
|
97
97
|
and stored paths keep their names; do not rename existing data directories.
|
|
98
98
|
|
|
99
99
|
1. Update Pi to **0.87.1+** and use **Node.js 22.19+**. Install the release with
|
|
100
|
-
`pi install npm:pi-smart-compact@10.0.
|
|
100
|
+
`pi install npm:pi-smart-compact@10.0.1`, then reload or restart Pi.
|
|
101
101
|
2. Open `/smart-compact` in the TUI. The bare command now opens Home; **Compact
|
|
102
102
|
now** starts the interactive compaction flow. Print/RPC/SDK use still runs
|
|
103
103
|
compaction directly. Review requires **A** to apply, not Enter.
|
|
104
104
|
3. Expect the agent to see `smart_tools` first. It loads navigation, history,
|
|
105
105
|
memory and compaction tools on demand. Choose **Always available** only if
|
|
106
106
|
you want all permitted tools exposed from the start.
|
|
107
|
-
4.
|
|
108
|
-
overlapping cleanup/compaction extension before using these features; see
|
|
109
|
-
[extension compatibility](#working-with-other-extensions-and-features).
|
|
110
|
-
5. Review **Memory store** if you use project memory. Exactly one backend is
|
|
107
|
+
4. Review **Memory store** if you use project memory. Exactly one backend is
|
|
111
108
|
used, with no silent fallback. Mnemopi and image snapshots now require
|
|
112
109
|
[separately installed optional components](../README.md#optional-components);
|
|
113
110
|
the default local memory store does not.
|
|
@@ -374,7 +371,7 @@ size, an `artifact-<hash>` ID and short first/last excerpts.
|
|
|
374
371
|
- Not offloaded: errors, images, shell commands, writes, unknown tools,
|
|
375
372
|
`read`/`read_symbol`/`read_enclosing` deliveries, instruction/skill-file
|
|
376
373
|
reads and `smart_context` itself. File reads stay inline on first delivery,
|
|
377
|
-
so read-before-edit guards
|
|
374
|
+
so read-before-edit guards see what was actually read.
|
|
378
375
|
- This is not a summary. The agent has to search or read the omitted parts
|
|
379
376
|
when it needs them. Total savings depend on how much it reads back.
|
|
380
377
|
- Each file is at most 2 MiB. A session holds at most 256 files or 32 MiB; at
|
|
@@ -449,8 +446,8 @@ other switches are kept), **Search other sessions**, **Return to an anchor**,
|
|
|
449
446
|
newest anchor, so the context before it is read from cache while later turns
|
|
450
447
|
change), **Anchor status** (footer, display only) and **Navigation guide**.
|
|
451
448
|
|
|
452
|
-
|
|
453
|
-
|
|
449
|
+
Legacy `context` tool anchors recorded in earlier sessions stay readable in
|
|
450
|
+
browse and search.
|
|
454
451
|
|
|
455
452
|
### Hand off to a new session
|
|
456
453
|
|
|
@@ -595,25 +592,9 @@ memory**) needs the TUI and applies only to the local store. It offers:
|
|
|
595
592
|
It shows counts and asks for confirmation. Mnemopi, Hindsight, continuity
|
|
596
593
|
state, backups and artifacts are not affected.
|
|
597
594
|
|
|
598
|
-
##
|
|
595
|
+
## Pi host integration
|
|
599
596
|
|
|
600
|
-
|
|
601
|
-
compaction or context-editing extensions (pi-openai-toolkit, context-fold,
|
|
602
|
-
pi-fold, pi-context-prune, pi-dcp, pi-toolkit's `context` tool) and shows one
|
|
603
|
-
notice naming them. The check is name-based evidence, not proof, and finds
|
|
604
|
-
nothing for unknown extensions; the runtime notices below (foreign compaction
|
|
605
|
-
applied, foreign cache rebuilds) still cover those.
|
|
606
|
-
|
|
607
|
-
### pi-toolkit
|
|
608
|
-
|
|
609
|
-
Session navigation replaces the anchor, recall and pivot features of
|
|
610
|
-
pi-toolkit's `context` tool, and Pi Continuity is the only owner of trimming.
|
|
611
|
-
Do not load pi-toolkit's context-management extension together with Pi
|
|
612
|
-
Continuity: two extensions recording anchors and pruning the same branch are
|
|
613
|
-
not safe in any load order. The `piToolkit.context.thinningEnabled` key is not
|
|
614
|
-
read by Pi Continuity. Anchors recorded earlier by pi-toolkit stay readable.
|
|
615
|
-
|
|
616
|
-
### Other compaction extensions and Pi's built-in compaction
|
|
597
|
+
### Pi compaction lifecycle
|
|
617
598
|
|
|
618
599
|
Pi applies one compaction per request: the last extension to answer
|
|
619
600
|
`session_before_compact` wins, and with no answer Pi's built-in summarizer
|
|
@@ -625,7 +606,7 @@ runs. When something other than Pi Continuity applies the compaction:
|
|
|
625
606
|
the winner and the model calls that were wasted.
|
|
626
607
|
- Another extension's compaction shows a once-per-session notice even when
|
|
627
608
|
nothing was prepared, because Pi Continuity recorded no state or metrics
|
|
628
|
-
for it.
|
|
609
|
+
for it.
|
|
629
610
|
- Pi's built-in compaction shows a notice only while automatic compaction is
|
|
630
611
|
on (nothing was ready when Pi asked); earlier continuity state still carries
|
|
631
612
|
over through the capsule.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-smart-compact",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.1",
|
|
4
4
|
"description": "Pi Continuity — context hygiene and session continuity for Pi Coding Agent: recoverable cleanup, checkpoints, memory and verified compaction.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"packageManager": "bun@1.4.2",
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { SlashCommandInfo, ToolInfo } from "@earendil-works/pi-coding-agent";
|
|
2
|
-
export interface ConflictingExtension {
|
|
3
|
-
name: string;
|
|
4
|
-
kind: "compaction" | "context-editing";
|
|
5
|
-
evidence: string;
|
|
6
|
-
}
|
|
7
|
-
export interface ExtensionRegistry {
|
|
8
|
-
commands: SlashCommandInfo[];
|
|
9
|
-
tools: ToolInfo[];
|
|
10
|
-
}
|
|
11
|
-
/** Known compaction or context-editing extensions visible in the live command/tool registry. Name-based evidence, not proof. */
|
|
12
|
-
export declare function detectExtensionConflicts(registry: ExtensionRegistry): ConflictingExtension[];
|
|
13
|
-
/** One notice naming every conflicting extension. */
|
|
14
|
-
export declare function conflictNotice(conflicts: ConflictingExtension[]): string;
|
|
15
|
-
//# sourceMappingURL=extension-conflicts.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"extension-conflicts.d.ts","sourceRoot":"","sources":["../../src/app/extension-conflicts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAElF,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,YAAY,GAAG,iBAAiB,CAAC;IACvC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,gBAAgB,EAAE,CAAC;IAC7B,KAAK,EAAE,QAAQ,EAAE,CAAC;CACnB;AAmCD,gIAAgI;AAChI,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,iBAAiB,GAAG,oBAAoB,EAAE,CA0B5F;AAED,qDAAqD;AACrD,wBAAgB,cAAc,CAAC,SAAS,EAAE,oBAAoB,EAAE,GAAG,MAAM,CAMxE"}
|