@hypercarrier/rarebit 0.1.0-alpha.4 → 0.1.0-alpha.6
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/CHANGELOG.md +23 -1
- package/README.md +45 -18
- package/RUNBOOK.md +24 -7
- package/bin/piq.mjs +14 -0
- package/package.json +25 -4
- package/scripts/e2e-fork-pi.mjs +824 -0
- package/scripts/e2e-recall-pi083.mjs +49 -247
- package/scripts/e2e-recall-pi0842.mjs +259 -0
- package/scripts/verify-package.mjs +11 -8
- package/src/extension.mjs +97 -8
- package/src/index.mjs +1 -0
- package/src/pi-session.mjs +237 -0
- package/src/piq-cli.mjs +96 -0
- package/src/piq.mjs +265 -0
- package/src/rarebit-activity.mjs +8 -2
- package/src/rarebit-cli.mjs +101 -5
- package/src/rarebit-command.mjs +8 -0
- package/src/rarebit-fork-lineage.mjs +69 -0
- package/src/rarebit-fork.mjs +241 -0
- package/src/rarebit-model.mjs +12 -4
- package/src/rarebit-session.mjs +12 -160
- package/src/types.d.ts +31 -0
- package/test/piq.test.mjs +212 -0
- package/test/rarebit-command.test.mjs +5 -2
- package/test/rarebit-core.test.mjs +35 -1
- package/test/rarebit-fork.test.mjs +124 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.6 — 2026-09-21
|
|
4
|
+
|
|
5
|
+
- Add bounded `/rarebit fork` and CLI fork flows with native Pi headroom checks.
|
|
6
|
+
- Add PiQ read-only recovery, machine-only lineage, repeat-fork ancestry, and
|
|
7
|
+
activity exclusion for imported entries.
|
|
8
|
+
- Keep read-only package commands usable without optional Pi host peers; fork
|
|
9
|
+
runtime loads the Pi adapter only when needed.
|
|
10
|
+
|
|
11
|
+
This is an unpublished release candidate. Intended npm routing after
|
|
12
|
+
publication is `next=alpha.6`; `latest` remains `alpha.4`.
|
|
13
|
+
|
|
14
|
+
## 0.1.0-alpha.5 — 2026-08-16
|
|
15
|
+
|
|
16
|
+
- Repair Pi 0.84.2 Summary calls to use the active Pi model runtime. The
|
|
17
|
+
injected Pi AI completion path remains the Pi 0.83.0 fallback.
|
|
18
|
+
- Declare the unbounded Pi AI peer range from Pi 0.83.0. The release gate runs
|
|
19
|
+
Recall against Pi 0.83.0 and Pi 0.84.2.
|
|
20
|
+
|
|
21
|
+
Published through GitHub Actions OIDC to npm `next`; `latest` remains alpha.4.
|
|
22
|
+
The exact source, package, registry, provenance, and GitHub prerelease evidence
|
|
23
|
+
is in the [alpha.5 release receipt](release/v0.1.0-alpha.5-release-receipt.md).
|
|
24
|
+
|
|
3
25
|
## 0.1.0-alpha.4 — 2026-08-02
|
|
4
26
|
|
|
5
27
|
Alpha.4 is a new artifact with a sanitized current source lineage and unchanged
|
|
@@ -7,7 +29,7 @@ product capability from the alpha.3 cutoff tree `db7d388`. The old tag graphs
|
|
|
7
29
|
remain public and are not privacy-clean. All existing alpha.1, alpha.2, and
|
|
8
30
|
alpha.3 tags, releases, and npm artifacts remain immutable (there is no alpha.1
|
|
9
31
|
GitHub Release). Alpha.3 remains the original readable-Recall release. Intended
|
|
10
|
-
npm routing after publication is `next=alpha.4` and `latest=alpha.
|
|
32
|
+
npm routing after publication is `next=alpha.4` and `latest=alpha.4`.
|
|
11
33
|
The source-only machine-readable candidate derivation and vendored-scanner
|
|
12
34
|
binding is [`release/privacy-lineage.v1.json`](release/privacy-lineage.v1.json).
|
|
13
35
|
It is excluded from npm and does not claim publication completion.
|
package/README.md
CHANGED
|
@@ -10,22 +10,25 @@ and visual language can change. It is not a Task, Project, runtime, priority,
|
|
|
10
10
|
attention, or delivery authority. Native Pi Session JSONL remains the evidence
|
|
11
11
|
authority.
|
|
12
12
|
|
|
13
|
-
Alpha.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
13
|
+
Alpha.6 is an unpublished release candidate. It adds bounded Rarebit fork
|
|
14
|
+
flows, PiQ recovery, machine-only lineage, and Pi-native headroom checks.
|
|
15
|
+
Intended npm routing after publication is `next=alpha.6`; `latest` remains
|
|
16
|
+
`alpha.4`. Published alpha.5 repairs Pi 0.84.2 Summary calls by using the
|
|
17
|
+
active Pi model runtime. Its durable publication evidence is the
|
|
18
|
+
[alpha.5 release receipt](release/v0.1.0-alpha.5-release-receipt.md).
|
|
19
|
+
|
|
20
|
+
The old alpha.1, alpha.2, and alpha.3 tag graphs remain public and are not
|
|
21
|
+
privacy-clean. Existing package versions, tags, and releases remain immutable.
|
|
22
|
+
The source-only candidate derivation and vendored-scanner binding is
|
|
23
|
+
[`release/privacy-lineage.v1.json`](release/privacy-lineage.v1.json). It is
|
|
24
|
+
excluded from npm and does not claim publication completion.
|
|
22
25
|
|
|
23
26
|
## Install
|
|
24
27
|
|
|
25
28
|
Use Node 22 or later and Pi 0.83 or later. Install it in Pi from npm:
|
|
26
29
|
|
|
27
30
|
```sh
|
|
28
|
-
pi install npm:@hypercarrier/rarebit@0.1.0-alpha.
|
|
31
|
+
pi install npm:@hypercarrier/rarebit@0.1.0-alpha.6
|
|
29
32
|
pi list
|
|
30
33
|
```
|
|
31
34
|
|
|
@@ -44,7 +47,7 @@ To use the CLI in a normal Node project, install it and invoke the local bin
|
|
|
44
47
|
with npm:
|
|
45
48
|
|
|
46
49
|
```sh
|
|
47
|
-
npm install @hypercarrier/rarebit@0.1.0-alpha.
|
|
50
|
+
npm install @hypercarrier/rarebit@0.1.0-alpha.6
|
|
48
51
|
npm exec -- rarebit --help
|
|
49
52
|
```
|
|
50
53
|
|
|
@@ -59,7 +62,29 @@ npm exec -- rarebit extract --session /absolute/path/to/session.jsonl --json
|
|
|
59
62
|
```
|
|
60
63
|
|
|
61
64
|
The Pi extension adds `/rarebit` controls after installation. It has `status`,
|
|
62
|
-
`config`, `auto-title`, `title`, `summarize`, and `
|
|
65
|
+
`config`, `auto-title`, `title`, `summarize`, `recall`, and `fork` subcommands.
|
|
66
|
+
|
|
67
|
+
`/rarebit fork` validates the newest contiguous Rarebit suffix, writes a new
|
|
68
|
+
Session in Pi's Session store for the current working directory, and switches
|
|
69
|
+
to it without starting a model turn. Use `/rarebit fork --max-token-length 64000` to set the
|
|
70
|
+
imported prose budget. Imported messages keep their roles and source outcomes,
|
|
71
|
+
use zero usage, and carry machine-only lineage. The generated opening message
|
|
72
|
+
records source ID/path/leaf, target directory, coverage, and the read-only PiQ
|
|
73
|
+
recovery command. Legacy source entries retain `(sessionId, sourceOrder)` when
|
|
74
|
+
native entry IDs are absent; Rarebit does not migrate those sources.
|
|
75
|
+
|
|
76
|
+
The CLI performs the same operation without changing the caller's Session:
|
|
77
|
+
|
|
78
|
+
```sh
|
|
79
|
+
rarebit fork /absolute/source.jsonl
|
|
80
|
+
rarebit fork /absolute/source.jsonl --max-token-length 64000 --no-launch
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
The first form launches Pi in the invocation working directory. The second
|
|
84
|
+
returns JSON for automation. Fork mode requires an installed Pi coding-agent
|
|
85
|
+
peer; read-only query, extract, and PiQ commands do not. Use `piq entries
|
|
86
|
+
--session <path>` to read omitted native evidence without writing or migrating
|
|
87
|
+
the source.
|
|
63
88
|
|
|
64
89
|
## Model setup and optional derivations
|
|
65
90
|
|
|
@@ -128,14 +153,14 @@ sensitive. Do not put their paths or content in a ticket.
|
|
|
128
153
|
Pin alpha versions for reproducible installs:
|
|
129
154
|
|
|
130
155
|
```sh
|
|
131
|
-
pi install npm:@hypercarrier/rarebit@0.1.0-alpha.
|
|
156
|
+
pi install npm:@hypercarrier/rarebit@0.1.0-alpha.6
|
|
132
157
|
pi remove npm:@hypercarrier/rarebit
|
|
133
158
|
```
|
|
134
159
|
|
|
135
160
|
The exact-version install also moves an existing Rarebit npm installation to
|
|
136
161
|
that pin. Pi skips versioned npm sources during package updates. Do not use an
|
|
137
|
-
unpinned source for alpha.
|
|
138
|
-
retained `latest`, which remains alpha.
|
|
162
|
+
unpinned source for alpha.5 recovery: unpinned npm resolution follows the
|
|
163
|
+
retained `latest`, which remains alpha.4.
|
|
139
164
|
|
|
140
165
|
To roll back, reinstall a known version with `pi install npm:@hypercarrier/rarebit@<version>`.
|
|
141
166
|
Removal stops package loading. It does not alter Pi Session JSONL or delete
|
|
@@ -144,9 +169,11 @@ only after you review it.
|
|
|
144
169
|
|
|
145
170
|
## Compatibility and support
|
|
146
171
|
|
|
147
|
-
This alpha supports Node 22+ and Pi 0.83
|
|
148
|
-
|
|
149
|
-
|
|
172
|
+
This alpha supports Node 22+ and Pi 0.83.0 or later. Its Pi AI peer has no
|
|
173
|
+
upper bound. The release gate runs Recall against Pi 0.83.0 and Pi 0.84.2. It
|
|
174
|
+
works as a deterministic CLI without a model. Summary, Title, and the Pi
|
|
175
|
+
extension require a compatible Pi installation and configured provider
|
|
176
|
+
credentials.
|
|
150
177
|
|
|
151
178
|
Report security issues privately as described in [SECURITY.md](SECURITY.md).
|
|
152
179
|
Use https://github.com/deephbz/rarebit/issues for normal support. Include no
|
package/RUNBOOK.md
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
# Rarebit runbook
|
|
2
2
|
|
|
3
|
-
This runbook applies to `0.1.0-alpha.
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
This runbook applies to `0.1.0-alpha.6`. This candidate adds bounded fork
|
|
4
|
+
flows, PiQ recovery, machine-only lineage, and Pi-native headroom checks. The
|
|
5
|
+
published alpha.5 release repaired Pi 0.84.2 Summary calls. See
|
|
6
|
+
[CHANGELOG.md](CHANGELOG.md) for release details.
|
|
6
7
|
|
|
7
8
|
Set `rarebit.model` in global Pi settings or in a trusted Project's
|
|
8
9
|
`.pi/settings.json`. It must be `provider/model` or an object with `provider`
|
|
9
10
|
and `id`. Rarebit fails closed when it is missing or invalid. It does not use
|
|
10
11
|
Pi's interactive `defaultModel`.
|
|
11
12
|
|
|
12
|
-
Install or move this package to the alpha.
|
|
13
|
-
`pi install npm:@hypercarrier/rarebit@0.1.0-alpha.
|
|
13
|
+
Install or move this package to the alpha.6 pin with
|
|
14
|
+
`pi install npm:@hypercarrier/rarebit@0.1.0-alpha.6`. Pi treats versioned npm
|
|
14
15
|
sources as pinned, so package update commands skip it. Do not use an unpinned
|
|
15
|
-
source for alpha.
|
|
16
|
-
|
|
16
|
+
source for alpha.6 recovery: unpinned npm resolution follows `latest`, which
|
|
17
|
+
remains alpha.4. Run `pi remove npm:@hypercarrier/rarebit` to
|
|
17
18
|
stop loading it. These commands do not modify native Sessions or remove Rarebit
|
|
18
19
|
retained data.
|
|
19
20
|
|
|
@@ -24,6 +25,22 @@ npm exec -- rarebit query --session <exact-session.jsonl> --json
|
|
|
24
25
|
npm exec -- rarebit extract --session <exact-session.jsonl> --json
|
|
25
26
|
```
|
|
26
27
|
|
|
28
|
+
To recover omitted source evidence, use the read-only PiQ binary:
|
|
29
|
+
|
|
30
|
+
```sh
|
|
31
|
+
node ./bin/piq.mjs entries --session <exact-session.jsonl>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
`rarebit fork <source-path>` uses the invocation directory and Pi's normal
|
|
35
|
+
Session store, then launches Pi in the new Session. Add `--no-launch` for JSON
|
|
36
|
+
automation. Fork admission uses the target model's native
|
|
37
|
+
`contextWindow - reserveTokens` threshold plus prompt, tool, and per-message
|
|
38
|
+
rounding overhead. It refuses before switching when the seed lacks headroom.
|
|
39
|
+
The aggregate imported-prose budget remains `ceil(total UTF-16 characters / 4)`.
|
|
40
|
+
Imported entries have fork-time timestamps. Original timestamps and source model
|
|
41
|
+
identity remain in machine-only lineage. Legacy entries without native IDs use
|
|
42
|
+
`(source Session ID, sourceOrder)` and remain unmigrated.
|
|
43
|
+
|
|
27
44
|
The current protocol reads only `materializations-v4`. A `rarebit_head` is the
|
|
28
45
|
fenced semantic-current pointer. Do not select the physical last JSONL line.
|
|
29
46
|
|
package/bin/piq.mjs
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { PIQ_CLI_USAGE, parsePiQCliArgs, runPiQCli } from "../src/piq-cli.mjs";
|
|
3
|
+
|
|
4
|
+
try {
|
|
5
|
+
const options = parsePiQCliArgs(process.argv.slice(2));
|
|
6
|
+
if (options.help) process.stdout.write(`${PIQ_CLI_USAGE}\n`);
|
|
7
|
+
else {
|
|
8
|
+
const records = await runPiQCli(options);
|
|
9
|
+
for (const record of records) process.stdout.write(`${JSON.stringify(record)}\n`);
|
|
10
|
+
}
|
|
11
|
+
} catch (error) {
|
|
12
|
+
process.stderr.write(`${error?.message ?? String(error)}\n${PIQ_CLI_USAGE}\n`);
|
|
13
|
+
process.exitCode = 1;
|
|
14
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hypercarrier/rarebit",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.6",
|
|
4
4
|
"description": "Sparse, provenance-bearing conversational evidence recovery for Pi sessions.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "HyperCarrier contributors",
|
|
@@ -24,18 +24,30 @@
|
|
|
24
24
|
},
|
|
25
25
|
"types": "./src/types.d.ts",
|
|
26
26
|
"bin": {
|
|
27
|
-
"rarebit": "./bin/rarebit.mjs"
|
|
27
|
+
"rarebit": "./bin/rarebit.mjs",
|
|
28
|
+
"piq": "./bin/piq.mjs"
|
|
28
29
|
},
|
|
29
30
|
"scripts": {
|
|
30
31
|
"test": "node --test test/*.test.mjs",
|
|
31
32
|
"test:e2e:summary-cache": "node scripts/e2e-summary-cache.mjs",
|
|
32
|
-
"test:e2e:recall": "node scripts/e2e-recall-
|
|
33
|
+
"test:e2e:recall": "node scripts/e2e-recall-pi0842.mjs",
|
|
34
|
+
"test:e2e:recall:pi083": "node scripts/e2e-recall-pi083.mjs",
|
|
33
35
|
"verify:package": "node scripts/verify-package.mjs"
|
|
34
36
|
},
|
|
35
37
|
"peerDependencies": {
|
|
36
|
-
"@earendil-works/pi-ai": "
|
|
38
|
+
"@earendil-works/pi-ai": ">=0.83.0",
|
|
39
|
+
"@earendil-works/pi-coding-agent": ">=0.83.0"
|
|
40
|
+
},
|
|
41
|
+
"peerDependenciesMeta": {
|
|
42
|
+
"@earendil-works/pi-ai": {
|
|
43
|
+
"optional": true
|
|
44
|
+
},
|
|
45
|
+
"@earendil-works/pi-coding-agent": {
|
|
46
|
+
"optional": true
|
|
47
|
+
}
|
|
37
48
|
},
|
|
38
49
|
"devDependencies": {
|
|
50
|
+
"@earendil-works/pi-coding-agent": "0.84.2",
|
|
39
51
|
"ajv": "^6.15.0",
|
|
40
52
|
"typescript": "^5.9.3"
|
|
41
53
|
},
|
|
@@ -65,6 +77,14 @@
|
|
|
65
77
|
"types": "./src/types.d.ts",
|
|
66
78
|
"import": "./src/rarebit-artifact-state.mjs"
|
|
67
79
|
},
|
|
80
|
+
"./fork": {
|
|
81
|
+
"types": "./src/types.d.ts",
|
|
82
|
+
"import": "./src/rarebit-fork.mjs"
|
|
83
|
+
},
|
|
84
|
+
"./fork-lineage": {
|
|
85
|
+
"types": "./src/types.d.ts",
|
|
86
|
+
"import": "./src/rarebit-fork-lineage.mjs"
|
|
87
|
+
},
|
|
68
88
|
"./visual-language": {
|
|
69
89
|
"types": "./src/types.d.ts",
|
|
70
90
|
"import": "./src/rarebit-visual-language.mjs"
|
|
@@ -81,6 +101,7 @@
|
|
|
81
101
|
},
|
|
82
102
|
"files": [
|
|
83
103
|
"bin/rarebit.mjs",
|
|
104
|
+
"bin/piq.mjs",
|
|
84
105
|
"src",
|
|
85
106
|
"schemas",
|
|
86
107
|
"scripts",
|