pi-smart-compact 9.7.1 → 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 +973 -372
- package/CHANGELOG.md +721 -0
- package/LICENSE +8 -0
- package/README.md +128 -640
- package/SECURITY.md +34 -12
- package/SUPPORT.md +26 -9
- package/assets/DejaVu-LICENSE.txt +187 -0
- package/assets/DejaVuSansMono.ttf +0 -0
- package/assets/README.md +26 -0
- package/assets/skills/context-management/SKILL.md +34 -0
- package/dist/app/anchor-cache.d.ts +36 -0
- package/dist/app/anchor-cache.d.ts.map +1 -0
- package/dist/app/artifact-storage.d.ts +47 -0
- package/dist/app/artifact-storage.d.ts.map +1 -0
- package/dist/app/background-preparation.d.ts +39 -0
- package/dist/app/background-preparation.d.ts.map +1 -0
- package/dist/app/compaction-commit-store.d.ts +5 -1
- package/dist/app/compaction-commit-store.d.ts.map +1 -1
- package/dist/app/context-evidence.d.ts +57 -0
- package/dist/app/context-evidence.d.ts.map +1 -0
- package/dist/app/context-guide.d.ts +3 -0
- package/dist/app/context-guide.d.ts.map +1 -0
- package/dist/app/context-operations.d.ts +106 -0
- package/dist/app/context-operations.d.ts.map +1 -0
- package/dist/app/effective-state.d.ts +23 -0
- package/dist/app/effective-state.d.ts.map +1 -0
- package/dist/app/global-settings-runtime.d.ts +3 -3
- package/dist/app/global-settings-runtime.d.ts.map +1 -1
- package/dist/app/hindsight-memory.d.ts +100 -0
- package/dist/app/hindsight-memory.d.ts.map +1 -0
- package/dist/app/host-cache-ledger.d.ts +68 -0
- package/dist/app/host-cache-ledger.d.ts.map +1 -0
- package/dist/app/lazy-tools.d.ts +36 -0
- package/dist/app/lazy-tools.d.ts.map +1 -0
- package/dist/app/memory-backend.d.ts +58 -0
- package/dist/app/memory-backend.d.ts.map +1 -0
- package/dist/app/mnemopi-memory.d.ts +13 -0
- package/dist/app/mnemopi-memory.d.ts.map +1 -0
- package/dist/app/mnemopi-protocol.d.ts +78 -0
- package/dist/app/mnemopi-protocol.d.ts.map +1 -0
- package/dist/app/mnemopi-worker.d.ts +2 -0
- package/dist/app/mnemopi-worker.d.ts.map +1 -0
- package/dist/app/model-feasibility.d.ts +20 -0
- package/dist/app/model-feasibility.d.ts.map +1 -0
- package/dist/app/native-compaction.d.ts +88 -0
- package/dist/app/native-compaction.d.ts.map +1 -0
- package/dist/app/native-continuity-bridge.d.ts.map +1 -1
- package/dist/app/navigation-data.d.ts +28 -0
- package/dist/app/navigation-data.d.ts.map +1 -0
- package/dist/app/navigation-types.d.ts +60 -0
- package/dist/app/navigation-types.d.ts.map +1 -0
- package/dist/app/pending-slot.d.ts +11 -1
- package/dist/app/pending-slot.d.ts.map +1 -1
- package/dist/app/preflight.d.ts.map +1 -1
- package/dist/app/register-context-tools.d.ts +16 -3
- package/dist/app/register-context-tools.d.ts.map +1 -1
- package/dist/app/register-navigation.d.ts +20 -0
- package/dist/app/register-navigation.d.ts.map +1 -0
- package/dist/app/register-smart-compact-command.d.ts +17 -2
- package/dist/app/register-smart-compact-command.d.ts.map +1 -1
- package/dist/app/register-smart-compact-tool.d.ts.map +1 -1
- package/dist/app/register-smart-context-tool.d.ts +55 -0
- package/dist/app/register-smart-context-tool.d.ts.map +1 -0
- package/dist/app/run-context.d.ts +1 -0
- package/dist/app/run-context.d.ts.map +1 -1
- package/dist/app/run-smart-compact.d.ts +3 -3
- package/dist/app/run-smart-compact.d.ts.map +1 -1
- package/dist/app/session-handoff.d.ts +64 -0
- package/dist/app/session-handoff.d.ts.map +1 -0
- package/dist/app/session-lineage.d.ts +17 -0
- package/dist/app/session-lineage.d.ts.map +1 -0
- package/dist/app/session-run-lock.d.ts +0 -2
- package/dist/app/session-run-lock.d.ts.map +1 -1
- package/dist/app/settled-auto-trigger.d.ts +2 -0
- package/dist/app/settled-auto-trigger.d.ts.map +1 -1
- 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 +1 -1
- package/dist/app/smart-compact-policy.d.ts.map +1 -1
- package/dist/app/steps/extract.d.ts +45 -1
- package/dist/app/steps/extract.d.ts.map +1 -1
- package/dist/app/steps/metrics.d.ts +1 -0
- 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/recover.d.ts +9 -0
- package/dist/app/steps/recover.d.ts.map +1 -1
- package/dist/app/steps/synthesize.d.ts.map +1 -1
- package/dist/app/steps/tier.d.ts.map +1 -1
- package/dist/app/steps/verify.d.ts.map +1 -1
- package/dist/app/steps/visual.d.ts +4 -0
- package/dist/app/steps/visual.d.ts.map +1 -0
- package/dist/app/steps/window.d.ts.map +1 -1
- package/dist/app/tool-artifacts.d.ts +27 -0
- package/dist/app/tool-artifacts.d.ts.map +1 -0
- package/dist/app/visual-archive.d.ts +29 -0
- package/dist/app/visual-archive.d.ts.map +1 -0
- package/dist/constants.d.ts +96 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/domain/compaction-usage.d.ts +16 -0
- package/dist/domain/compaction-usage.d.ts.map +1 -0
- package/dist/domain/model-capacity.d.ts +12 -0
- package/dist/domain/model-capacity.d.ts.map +1 -0
- package/dist/domain/provider-evaluation.d.ts +7 -0
- package/dist/domain/provider-evaluation.d.ts.map +1 -1
- package/dist/domain/telemetry.d.ts +43 -2
- package/dist/domain/telemetry.d.ts.map +1 -1
- package/dist/domain/tool-semantics.d.ts +23 -0
- package/dist/domain/tool-semantics.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15757 -6942
- package/dist/infra/ai-messages.d.ts +1 -1
- package/dist/infra/ai-messages.d.ts.map +1 -1
- package/dist/infra/context-graph.d.ts +38 -7
- package/dist/infra/context-graph.d.ts.map +1 -1
- package/dist/infra/fs.d.ts.map +1 -1
- package/dist/infra/hindsight-client.d.ts +73 -0
- package/dist/infra/hindsight-client.d.ts.map +1 -0
- package/dist/infra/hindsight-receipts.d.ts +68 -0
- package/dist/infra/hindsight-receipts.d.ts.map +1 -0
- package/dist/infra/llm-client.d.ts +26 -23
- package/dist/infra/llm-client.d.ts.map +1 -1
- package/dist/infra/memory-ref.d.ts +27 -0
- package/dist/infra/memory-ref.d.ts.map +1 -0
- package/dist/infra/native-protocol.d.ts +54 -0
- package/dist/infra/native-protocol.d.ts.map +1 -0
- package/dist/infra/optional-components.d.ts +15 -0
- package/dist/infra/optional-components.d.ts.map +1 -0
- package/dist/infra/paths.d.ts +2 -0
- package/dist/infra/paths.d.ts.map +1 -1
- package/dist/infra/services.d.ts +15 -5
- package/dist/infra/services.d.ts.map +1 -1
- package/dist/infra/visual-renderer.d.ts +16 -0
- package/dist/infra/visual-renderer.d.ts.map +1 -0
- package/dist/mnemopi-worker.js +213 -0
- package/dist/phases/explore.d.ts +12 -9
- package/dist/phases/explore.d.ts.map +1 -1
- package/dist/phases/synthesize.d.ts +18 -3
- package/dist/phases/synthesize.d.ts.map +1 -1
- package/dist/phases/verify.d.ts +5 -1
- package/dist/phases/verify.d.ts.map +1 -1
- package/dist/rtk.d.ts +7 -0
- package/dist/rtk.d.ts.map +1 -0
- package/dist/rtk.js +767 -0
- package/dist/types.d.ts +128 -4
- package/dist/types.d.ts.map +1 -1
- package/dist/ui/dashboard-format.d.ts +2 -1
- package/dist/ui/dashboard-format.d.ts.map +1 -1
- package/dist/ui/dashboard-insights.d.ts +9 -1
- package/dist/ui/dashboard-insights.d.ts.map +1 -1
- package/dist/ui/error-format.d.ts +7 -2
- package/dist/ui/error-format.d.ts.map +1 -1
- package/dist/ui/handoff-overlay.d.ts +26 -0
- package/dist/ui/handoff-overlay.d.ts.map +1 -0
- package/dist/ui/home-overlay.d.ts +54 -0
- package/dist/ui/home-overlay.d.ts.map +1 -0
- package/dist/ui/metrics-dashboard-overlay.d.ts.map +1 -1
- package/dist/ui/metrics-report.d.ts.map +1 -1
- package/dist/ui/navigation-overlay.d.ts +92 -0
- package/dist/ui/navigation-overlay.d.ts.map +1 -0
- package/dist/ui/overlays.d.ts +12 -2
- package/dist/ui/overlays.d.ts.map +1 -1
- package/dist/ui/profiles.d.ts +51 -0
- package/dist/ui/profiles.d.ts.map +1 -0
- package/dist/ui/settings-complex.d.ts +49 -3
- package/dist/ui/settings-complex.d.ts.map +1 -1
- package/dist/ui/settings-list.d.ts +28 -0
- package/dist/ui/settings-list.d.ts.map +1 -0
- package/dist/ui/settings-overlay.d.ts +13 -6
- package/dist/ui/settings-overlay.d.ts.map +1 -1
- package/dist/ui/storage-report.d.ts +4 -0
- package/dist/ui/storage-report.d.ts.map +1 -0
- package/dist/utils/backups.d.ts.map +1 -1
- package/dist/utils/cache.d.ts +6 -2
- package/dist/utils/cache.d.ts.map +1 -1
- package/dist/utils/config.d.ts +12 -0
- package/dist/utils/config.d.ts.map +1 -1
- package/dist/utils/helpers.d.ts.map +1 -1
- package/dist/utils/id-fingerprint.d.ts +3 -1
- package/dist/utils/id-fingerprint.d.ts.map +1 -1
- package/dist/utils/issues.d.ts +61 -0
- package/dist/utils/issues.d.ts.map +1 -0
- package/dist/utils/pruning.d.ts.map +1 -1
- package/dist/utils/session-log.d.ts +0 -2
- package/dist/utils/session-log.d.ts.map +1 -1
- package/dist/utils/state.d.ts +3 -1
- package/dist/utils/state.d.ts.map +1 -1
- package/dist/utils/tokens.d.ts +10 -2
- package/dist/utils/tokens.d.ts.map +1 -1
- package/docs/MIGRATING_TO_V8.md +7 -1
- package/docs/README.md +69 -0
- package/docs/RELEASE.md +173 -56
- package/docs/assets/banner.png +0 -0
- package/docs/assets/banner.svg +1158 -70
- package/docs/assets/pi-smart-compact.png +0 -0
- package/docs/assets/pi-smart-compact.svg +24 -0
- package/docs/configuration.md +637 -0
- package/docs/evaluation.md +408 -0
- package/docs/guide.md +860 -0
- package/docs/hindsight-memory.md +314 -0
- package/docs/identity.md +124 -0
- package/package.json +44 -11
- package/dist/provider-eval.js +0 -2122
- package/dist/provider-scenario-eval.js +0 -2900
- package/dist/telemetry-report.js +0 -1973
- package/docs/provider-evaluation-2026-08-06.md +0 -63
package/docs/README.md
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Pi Continuity documentation
|
|
2
|
+
|
|
3
|
+
[Project overview](../README.md) · [User guide](./guide.md) · [Configuration](./configuration.md)
|
|
4
|
+
|
|
5
|
+
Pi Continuity is the product name; `pi-smart-compact` remains the package,
|
|
6
|
+
command family and repository. [Identity and naming](./identity.md).
|
|
7
|
+
|
|
8
|
+
These guides follow the **current source checkout**, including unreleased work.
|
|
9
|
+
Compare your installed version with the [changelog](../CHANGELOG.md). Dated
|
|
10
|
+
reports describe their own revisions, not necessarily today's behavior.
|
|
11
|
+
|
|
12
|
+
## Start with your task
|
|
13
|
+
|
|
14
|
+
| I want to… | Read |
|
|
15
|
+
| --- | --- |
|
|
16
|
+
| Install and choose how the extension runs | [Get started](../README.md#get-started) |
|
|
17
|
+
| Clean up output, compact or recover evidence | [User guide](./guide.md) |
|
|
18
|
+
| Use anchors or move work to a fresh session | [Session navigation and handoff](./guide.md#session-navigation) |
|
|
19
|
+
| Understand a setting, trigger, model route or budget | [Configuration reference](./configuration.md) |
|
|
20
|
+
| Choose where project memory lives | [Memory stores](./guide.md#memory-store-memorybackend) |
|
|
21
|
+
| Connect an existing Hindsight server | [Hindsight setup and privacy](./hindsight-memory.md) |
|
|
22
|
+
| Diagnose unexpected behavior | [Troubleshooting](./guide.md#troubleshooting) · [Support](../SUPPORT.md) |
|
|
23
|
+
| Report sensitive information privately | [Security policy](../SECURITY.md) |
|
|
24
|
+
|
|
25
|
+
## Understand or contribute
|
|
26
|
+
|
|
27
|
+
| Document | Scope |
|
|
28
|
+
| --- | --- |
|
|
29
|
+
| [Architecture](../ARCHITECTURE.md) | Ownership, preservation rules, apply boundaries and module responsibilities. |
|
|
30
|
+
| [Evaluation](./evaluation.md) | Available checks and experiments; what quality, cost and timing evidence can establish. |
|
|
31
|
+
| [Contributing](https://github.com/alpertarhan/pi-smart-compact/blob/main/CONTRIBUTING.md) | Development setup, repository map and pull-request expectations. |
|
|
32
|
+
| [Release checklist](./RELEASE.md) | Package validation, compatibility and publication gates. |
|
|
33
|
+
| [Identity and assets](./identity.md) | Product naming, logo sources, palette and reproducible image exports. |
|
|
34
|
+
| [Changelog](../CHANGELOG.md) | Versioned changes and unpublished work. |
|
|
35
|
+
|
|
36
|
+
## Keep these concepts separate
|
|
37
|
+
|
|
38
|
+
| Concept | Purpose | Not a substitute for… |
|
|
39
|
+
| --- | --- | --- |
|
|
40
|
+
| **Context hygiene** | Reduce active tool-output noise while keeping eligible evidence retrievable. Local cleanup needs no summary-model call. | A new conversation summary. |
|
|
41
|
+
| **Session continuity** | Carry constraints, decisions, failures and next steps through research, compaction and reload. | Filesystem rollback or a complete copy of the original history. |
|
|
42
|
+
| **Project memory** | Recall scoped facts through one selected backend; explicit saves require confirmation. The local graph can also index derived compaction state. | Backups, output archives or automatic transcript upload. |
|
|
43
|
+
|
|
44
|
+
The [storage guide](./guide.md#storage-and-privacy) explains where each kind of
|
|
45
|
+
state lives and how long it is retained.
|
|
46
|
+
|
|
47
|
+
## Historical evidence
|
|
48
|
+
|
|
49
|
+
Reports are preserved as dated evidence. Their measurements, revision limits and
|
|
50
|
+
warnings remain part of the record; they are not current setup instructions.
|
|
51
|
+
|
|
52
|
+
- [Pilot and research reports on GitHub](https://github.com/alpertarhan/pi-smart-compact/tree/main/docs/reports):
|
|
53
|
+
context hygiene, AgentSession lifecycle, visual evidence, Hindsight/native
|
|
54
|
+
compaction research and the earlier provider baseline. The
|
|
55
|
+
[evaluation guide](./evaluation.md#pilots-and-dated-reports) explains each scope.
|
|
56
|
+
- [Review findings on GitHub](https://github.com/alpertarhan/pi-smart-compact/blob/main/docs/findings/README.md):
|
|
57
|
+
the index of external-model and agent-harness audits, organized by reviewer
|
|
58
|
+
and date. Findings are advisory, not a release gate or product guarantee.
|
|
59
|
+
- [v7 → v8 migration](./MIGRATING_TO_V8.md): instructions for that historical
|
|
60
|
+
transition, **not** the current installation baseline.
|
|
61
|
+
|
|
62
|
+
`docs/reports/` and `docs/findings/` are repository-only and excluded from npm.
|
|
63
|
+
Links to those archives deliberately open GitHub, so this index also works from
|
|
64
|
+
an installed package. User guides and brand assets ship with the package;
|
|
65
|
+
developer source, tests and evaluation scripts do not.
|
|
66
|
+
|
|
67
|
+
A green scripted pilot does not establish live-model fidelity, billed savings
|
|
68
|
+
or production readiness. Use the [evaluation limits](./evaluation.md) and
|
|
69
|
+
[release checklist](./RELEASE.md) before making those claims.
|
package/docs/RELEASE.md
CHANGED
|
@@ -1,21 +1,47 @@
|
|
|
1
1
|
# Release checklist
|
|
2
2
|
|
|
3
|
-
Use this checklist before publishing
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
>
|
|
3
|
+
Use this checklist before publishing Pi Continuity as the npm package
|
|
4
|
+
`pi-smart-compact`. The package name, command, tool names and configuration
|
|
5
|
+
key do not change with the documentation brand.
|
|
6
|
+
|
|
7
|
+
> **Approval boundary:** validation, packing and isolated installation do not
|
|
8
|
+
> publish anything. Creating a published GitHub release is the explicit
|
|
9
|
+
> approval that starts npm publication through Trusted Publishing. Use a draft
|
|
10
|
+
> release for preparation; ordinary commits, tags and pull-request CI do not
|
|
11
|
+
> publish packages.
|
|
12
|
+
|
|
13
|
+
Evidence classes and their limits are defined in
|
|
14
|
+
[evaluation](./evaluation.md#offline-and-live-evidence). Keep the unpublished
|
|
15
|
+
checkout version and the version currently on npm distinct in every note.
|
|
16
|
+
Toolchain prerequisites (Bun pin, Node with npm, ripgrep) are listed at the top
|
|
17
|
+
of [evaluation](./evaluation.md); `release:audit` also needs network access for
|
|
18
|
+
package installation.
|
|
8
19
|
|
|
9
20
|
## 1. Prepare the candidate
|
|
10
21
|
|
|
11
|
-
- [ ]
|
|
12
|
-
stable
|
|
13
|
-
|
|
22
|
+
- [ ] Use a distinct prerelease until the stable/canary gates pass, unless the
|
|
23
|
+
release owner explicitly approves a version-specific stable exception.
|
|
24
|
+
Record any exception and missing evidence in the release notes; it is
|
|
25
|
+
not a `PROMOTE` result. Stamp `package.json` and run
|
|
26
|
+
`bun run sync-version` before packing.
|
|
14
27
|
- [ ] Move shipped notes from `[Unreleased]` into the dated version in
|
|
15
|
-
`CHANGELOG.md
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
28
|
+
`CHANGELOG.md`; never word a candidate entry as if the final release
|
|
29
|
+
check or canary promotion already passed.
|
|
30
|
+
- [ ] Update the guide, configuration, evaluation, architecture and migration
|
|
31
|
+
notes for behavior/config changes. Dated reports (`docs/reports/`) stay
|
|
32
|
+
historical and are not packed; add a new report or addendum instead of
|
|
33
|
+
rewriting them.
|
|
34
|
+
- [ ] On a major version change, update the supported-versions row in
|
|
35
|
+
`SECURITY.md`; `release:audit` requires it to read ``Latest `<major>.x` ``.
|
|
36
|
+
- [ ] For Claude subscription routes, pair the fresh candidate with the exact
|
|
37
|
+
`pi-claude-oauth-adapter` build used in the proofs (published `0.2.2`
|
|
38
|
+
plus the final-payload patch, [upstream PR #10](https://github.com/minzique/pi-claude-oauth-adapter/pull/10),
|
|
39
|
+
until it is released) and record
|
|
40
|
+
the paired archive paths and hashes at final packaging — do not
|
|
41
|
+
reconstruct them from memory.
|
|
42
|
+
- [ ] Confirm Pi remains a host peer (`">=0.87.1"`) and TypeBox a wildcard peer (`"*"`); neither is bundled.
|
|
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.
|
|
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.
|
|
19
45
|
- [ ] Confirm no secrets, local JSONL, SQLite data, backups, or generated
|
|
20
46
|
credentials are tracked or packed.
|
|
21
47
|
|
|
@@ -26,22 +52,40 @@ bun install --frozen-lockfile
|
|
|
26
52
|
bun run release:check
|
|
27
53
|
```
|
|
28
54
|
|
|
29
|
-
`release:check` runs the
|
|
30
|
-
all tests
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
55
|
+
`release:check` runs the full local chain: source, scripts, test and bench
|
|
56
|
+
typechecking; all tests; the adversarial `gate`; the hot-path `bench`; build;
|
|
57
|
+
`release:audit`; and `compat:pi latest`. The audit verifies the packed
|
|
58
|
+
manifest/version/peers, supported SECURITY major, package contents
|
|
59
|
+
(runtime-only `dist`: exactly `index.js`, `rtk.js`, and `mnemopi-worker.js` plus
|
|
60
|
+
declarations), isolated and frozen installs, extension/tool registration, Node
|
|
61
|
+
SQLite, and the optional Mnemopi worker through real Node-host tools. It also
|
|
62
|
+
runs the installed worker under a Bun-free `PATH` on the user-installed
|
|
63
|
+
pinned `bun` component (installed with the command Readiness shows into a
|
|
64
|
+
Pi-style npm root, then kept across a Pi update) and checks the
|
|
65
|
+
install-command, missing-engine and missing-Bun negatives (no store, no
|
|
66
|
+
model/network request). Evaluation and report CLIs are source-checkout tools,
|
|
67
|
+
not packed: the audit runs `scripts/provider-eval.ts`,
|
|
68
|
+
`scripts/telemetry-report.ts`, and all four offline continuation/memory arms of
|
|
69
|
+
`scripts/task-eval.ts` under its isolated HOME; scripted transport is not
|
|
70
|
+
live quality evidence. The test suite covers storage durability with real
|
|
71
|
+
`SessionManager` artifacts aged past 20 days by timestamps — deterministic
|
|
72
|
+
aging, not a wall-clock soak — through actual reload and fork.
|
|
73
|
+
|
|
74
|
+
Run the full chain on the exact candidate. A green result from before any
|
|
75
|
+
later change, including UI or documentation edits, does not count. Pull-request
|
|
76
|
+
CI includes the adversarial gate, but latest-Pi compatibility runs only on a
|
|
77
|
+
schedule or manual dispatch, so a green CI badge does not replace this step.
|
|
34
78
|
|
|
35
79
|
Then validate the host boundary in an isolated workspace:
|
|
36
80
|
|
|
37
81
|
```bash
|
|
38
|
-
bun run compat:pi 0.
|
|
82
|
+
bun run compat:pi 0.87.1
|
|
39
83
|
bun run compat:pi latest
|
|
40
84
|
bun audit
|
|
41
85
|
```
|
|
42
86
|
|
|
43
|
-
The compatibility runner temporarily pins only its copied workspace;
|
|
44
|
-
|
|
87
|
+
The compatibility runner temporarily pins only its copied workspace; source
|
|
88
|
+
peer ranges and minimum-version development pins must remain unchanged.
|
|
45
89
|
|
|
46
90
|
## 3. Inspect artifacts
|
|
47
91
|
|
|
@@ -49,18 +93,32 @@ manifest must remain wildcard-only.
|
|
|
49
93
|
npm pack --dry-run
|
|
50
94
|
bun run provider-eval --min-samples=5
|
|
51
95
|
bun run telemetry-report --min-canary-runs=20
|
|
96
|
+
bun run task-eval --out=/tmp/psc-task-eval-new
|
|
52
97
|
```
|
|
53
98
|
|
|
54
99
|
Check that:
|
|
55
100
|
|
|
56
|
-
- [ ] packed files are limited to `dist`, `docs
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
101
|
+
- [ ] packed files are limited to `dist`, `docs` (without `docs/reports/` and
|
|
102
|
+
`docs/findings/`), `assets`, README, LICENSE, CHANGELOG, SECURITY,
|
|
103
|
+
SUPPORT, ARCHITECTURE, and package metadata; `release:audit` requires
|
|
104
|
+
`ARCHITECTURE.md`, `docs/RELEASE.md` and `docs/MIGRATING_TO_V8.md` and
|
|
105
|
+
rejects reports and findings;
|
|
106
|
+
- [ ] `dist` holds only `index.js`, `rtk.js`, `mnemopi-worker.js`, and
|
|
107
|
+
declarations — no evaluation/report CLI bundles;
|
|
108
|
+
- [ ] the extension registers `smart_compact`, `smart_context`,
|
|
109
|
+
`smart_recall`, and `smart_save_memory` from the packed install;
|
|
61
110
|
- [ ] no provider route was selected automatically;
|
|
62
111
|
- [ ] Data Confidence is honest (legacy evidence may keep it below 85).
|
|
63
112
|
|
|
113
|
+
The task evaluator defaults to real stock Pi sessions with offline scripted
|
|
114
|
+
transport and temporary memory stores. Live mode needs a fresh explicit
|
|
115
|
+
request/input/output budget and selected-provider credentials; it is not part
|
|
116
|
+
of `release:check`. Input estimates and output reservations are not invoices.
|
|
117
|
+
The SDK fetch guard is not a subprocess network/filesystem sandbox. Codex is
|
|
118
|
+
rejected unless explicitly selected as unbounded output; that exception never
|
|
119
|
+
satisfies a hard output-token budget. No provider-quality or savings claim
|
|
120
|
+
follows from a passing offline report.
|
|
121
|
+
|
|
64
122
|
## 4. Canary the RC
|
|
65
123
|
|
|
66
124
|
After explicit approval to publish an RC, use the npm `next` tag rather than
|
|
@@ -75,51 +133,110 @@ After explicit approval to publish an RC, use the npm `next` tag rather than
|
|
|
75
133
|
```
|
|
76
134
|
|
|
77
135
|
Keep all stage model routes null unless a separate routing decision is approved.
|
|
78
|
-
Collect at least 20 non-dry, host-confirmed **applied** schema-v2 canary runs
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
136
|
+
Collect at least 20 non-dry, host-confirmed **applied** schema-v2 canary runs
|
|
137
|
+
of the candidate version, a stable baseline of at least 20 applied runs,
|
|
138
|
+
≥70% verifier-quality coverage and ≥70% run-correlated damage-observation
|
|
139
|
+
coverage **in both stable and canary cohorts**, and canary data confidence ≥85.
|
|
140
|
+
Inspect the report's total/attempted/applied counts: dry runs, staged-but-
|
|
141
|
+
unapplied runs, voluntary user cancellations, and discarded speculative
|
|
142
|
+
preparations are not promotion evidence (cancellations are neutral — real
|
|
143
|
+
timeouts and provider failures still count). Every metrics entry must carry an
|
|
144
|
+
explicit `releaseChannel`; entries without one are excluded from both cohorts
|
|
145
|
+
and surfaced in the report, never silently pooled as stable. Missing
|
|
146
|
+
observations are missing evidence, never clean runs. A deterministic green
|
|
147
|
+
release check never implies `PROMOTE`. Promotion requires:
|
|
84
148
|
|
|
85
149
|
- [ ] `telemetry-report` says `PROMOTE`;
|
|
150
|
+
- [ ] canary data confidence is ≥85 (report `HOLD` at 82 is a hold, not a pass);
|
|
86
151
|
- [ ] dashboard Data Confidence is ≥85;
|
|
87
152
|
- [ ] canary success is ≥95% and absolute verifier quality is ≥85;
|
|
88
|
-
- [ ]
|
|
89
|
-
- [ ]
|
|
90
|
-
- [ ]
|
|
91
|
-
- [ ]
|
|
153
|
+
- [ ] both cohorts have ≥70% quality and damage-observation coverage;
|
|
154
|
+
- [ ] canary failure rate is at most 5% and not 5pp or more above stable;
|
|
155
|
+
- [ ] verifier quality did not fall by 5 points or more;
|
|
156
|
+
- [ ] p95 duration and average tokens did not rise by 50% or more;
|
|
157
|
+
- [ ] fallback and damage rates did not rise by 10pp or more;
|
|
92
158
|
- [ ] no unresolved security, data-loss, cross-session, or cancellation issue.
|
|
93
159
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
## 5. Publish — explicit approval required
|
|
160
|
+
The report evaluates rollback triggers once the canary has at least three
|
|
161
|
+
attempted runs; exact rules are in
|
|
162
|
+
[evaluation](./evaluation.md#decision-rules).
|
|
98
163
|
|
|
99
|
-
|
|
164
|
+
The preparation-policy block (prepared/used/discarded, discard reasons,
|
|
165
|
+
time-to-ready, reuse rate, discarded spend) is measurement only: thresholds,
|
|
166
|
+
TTLs, and cooldowns stay manual policy decisions. Route reports keep the
|
|
167
|
+
input/cache-read/cache-write/output split, mark estimated usage, and label
|
|
168
|
+
subscription (OAuth) routes — never price subscription usage at API rates or
|
|
169
|
+
strip cached tokens from quota.
|
|
100
170
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
171
|
+
A `ROLLBACK` result blocks promotion. `HOLD` means collect evidence or fix data
|
|
172
|
+
coverage; it is not a pass. Promotion authority remains manual. A release-owner
|
|
173
|
+
exception must name its version and evidence limits; it does not turn missing
|
|
174
|
+
evidence into a passing gate.
|
|
104
175
|
|
|
105
|
-
|
|
106
|
-
npm publish
|
|
107
|
-
```
|
|
176
|
+
## 5. Publish — explicit approval required
|
|
108
177
|
|
|
109
|
-
|
|
178
|
+
### One-time npm Trusted Publisher setup
|
|
179
|
+
|
|
180
|
+
In the npm package settings for `pi-smart-compact`, add a **GitHub Actions**
|
|
181
|
+
trusted publisher with these exact values:
|
|
182
|
+
|
|
183
|
+
| Field | Value |
|
|
184
|
+
| --- | --- |
|
|
185
|
+
| Organization or user | `alpertarhan` |
|
|
186
|
+
| Repository | `pi-smart-compact` |
|
|
187
|
+
| Workflow filename | `publish.yml` (not `.github/workflows/publish.yml`) |
|
|
188
|
+
| Environment | Leave empty; the workflow does not use an environment |
|
|
189
|
+
| Publish permission | Allow direct `npm publish`, not only `npm stage publish` |
|
|
190
|
+
|
|
191
|
+
The current npm default can permit staging only. Direct publication must be
|
|
192
|
+
enabled to avoid a manual approval for every package. npm does not verify these
|
|
193
|
+
fields when saving; the first successful workflow publication proves the link.
|
|
194
|
+
See [npm Trusted Publishing](https://docs.npmjs.com/trusted-publishers/).
|
|
195
|
+
|
|
196
|
+
No `NPM_TOKEN` or `NODE_AUTH_TOKEN` secret is needed.
|
|
197
|
+
[`publish.yml`](https://github.com/alpertarhan/pi-smart-compact/blob/main/.github/workflows/publish.yml)
|
|
198
|
+
uses a GitHub-hosted runner, `id-token: write`, Node 26.10.0, npm 11.19.1 and
|
|
199
|
+
the Bun version pinned in `package.json`. npm obtains short-lived OIDC
|
|
200
|
+
credentials and automatically attaches provenance for this public repository.
|
|
201
|
+
Keep these versions and the workflow filename aligned when changing tooling.
|
|
202
|
+
|
|
203
|
+
### Release an approved version
|
|
204
|
+
|
|
205
|
+
1. Merge the version, generated `VERSION`, changelog and release documentation
|
|
206
|
+
through a PR into `main`, with required CI passing. Complete the checks above.
|
|
207
|
+
2. Create a GitHub release at that exact `main` commit with tag `v<version>`,
|
|
208
|
+
matching `package.json`. Include upgrade notes and the actual validation
|
|
209
|
+
evidence; document any explicitly approved canary exception.
|
|
210
|
+
3. For a SemVer prerelease, mark the GitHub release **pre-release**. For a stable
|
|
211
|
+
version, leave that flag off. Publish the release, not just its tag.
|
|
212
|
+
4. Follow **Actions → Publish to npm**. The workflow rejects tags that do not
|
|
213
|
+
match the package version, mismatched prerelease flags and commits outside
|
|
214
|
+
`main`. Prereleases publish to npm `next`; stable versions publish to `latest`.
|
|
215
|
+
|
|
216
|
+
The workflow checks minimum-Pi compatibility and dependency advisories, then
|
|
217
|
+
calls `npm publish`. Its existing `prepublishOnly` hook runs the full
|
|
218
|
+
`release:check`, including the packed install audit and latest-Pi compatibility,
|
|
219
|
+
before uploading. It never uses `--ignore-scripts` to bypass these gates.
|
|
220
|
+
|
|
221
|
+
If the first run fails authentication, check the exact owner/repository/workflow
|
|
222
|
+
fields, the empty environment and direct-publish permission on npm. After fixing
|
|
223
|
+
the configuration, rerun the failed Actions job; do not publish manually to
|
|
224
|
+
mask a broken OIDC setup. Once a version is published, it is immutable: a new
|
|
225
|
+
package change needs a new version, not a republish or a moved release tag.
|
|
110
226
|
|
|
111
227
|
## 6. After publishing
|
|
112
228
|
|
|
113
|
-
1.
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
3. Install through Pi in a clean profile:
|
|
229
|
+
1. Confirm **Publish to npm** completed successfully. A published GitHub release
|
|
230
|
+
alone does not prove the package reached npm.
|
|
231
|
+
2. Check the registry version, dist-tag, integrity and provenance:
|
|
117
232
|
|
|
118
233
|
```bash
|
|
119
|
-
|
|
120
|
-
|
|
234
|
+
VERSION=$(node -p 'require("./package.json").version')
|
|
235
|
+
npm view "pi-smart-compact@$VERSION" version dist.integrity dist.attestations --json
|
|
236
|
+
npm view pi-smart-compact dist-tags --json
|
|
121
237
|
```
|
|
122
238
|
|
|
123
|
-
|
|
124
|
-
dashboard.
|
|
125
|
-
|
|
239
|
+
3. Install the exact version through Pi in a clean profile, then re-run tool
|
|
240
|
+
registration, one manual compaction, Smart Recall and the local dashboard.
|
|
241
|
+
4. Keep canary monitoring active through the agreed observation window;
|
|
242
|
+
successful publication is not production-quality evidence.
|
|
Binary file
|