@hypercarrier/rarebit 0.1.0-alpha.5 → 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 +14 -2
- package/README.md +34 -11
- package/RUNBOOK.md +23 -7
- package/bin/piq.mjs +14 -0
- package/package.json +22 -3
- package/scripts/e2e-fork-pi.mjs +824 -0
- package/scripts/verify-package.mjs +9 -7
- 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-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-fork.test.mjs +124 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
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
|
+
|
|
3
14
|
## 0.1.0-alpha.5 — 2026-08-16
|
|
4
15
|
|
|
5
16
|
- Repair Pi 0.84.2 Summary calls to use the active Pi model runtime. The
|
|
@@ -7,8 +18,9 @@
|
|
|
7
18
|
- Declare the unbounded Pi AI peer range from Pi 0.83.0. The release gate runs
|
|
8
19
|
Recall against Pi 0.83.0 and Pi 0.84.2.
|
|
9
20
|
|
|
10
|
-
|
|
11
|
-
|
|
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).
|
|
12
24
|
|
|
13
25
|
## 0.1.0-alpha.4 — 2026-08-02
|
|
14
26
|
|
package/README.md
CHANGED
|
@@ -10,15 +10,16 @@ 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
|
-
|
|
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).
|
|
17
19
|
|
|
18
20
|
The old alpha.1, alpha.2, and alpha.3 tag graphs remain public and are not
|
|
19
|
-
privacy-clean. Existing
|
|
20
|
-
|
|
21
|
-
vendored-scanner binding is
|
|
21
|
+
privacy-clean. Existing package versions, tags, and releases remain immutable.
|
|
22
|
+
The source-only candidate derivation and vendored-scanner binding is
|
|
22
23
|
[`release/privacy-lineage.v1.json`](release/privacy-lineage.v1.json). It is
|
|
23
24
|
excluded from npm and does not claim publication completion.
|
|
24
25
|
|
|
@@ -27,7 +28,7 @@ excluded from npm and does not claim publication completion.
|
|
|
27
28
|
Use Node 22 or later and Pi 0.83 or later. Install it in Pi from npm:
|
|
28
29
|
|
|
29
30
|
```sh
|
|
30
|
-
pi install npm:@hypercarrier/rarebit@0.1.0-alpha.
|
|
31
|
+
pi install npm:@hypercarrier/rarebit@0.1.0-alpha.6
|
|
31
32
|
pi list
|
|
32
33
|
```
|
|
33
34
|
|
|
@@ -46,7 +47,7 @@ To use the CLI in a normal Node project, install it and invoke the local bin
|
|
|
46
47
|
with npm:
|
|
47
48
|
|
|
48
49
|
```sh
|
|
49
|
-
npm install @hypercarrier/rarebit@0.1.0-alpha.
|
|
50
|
+
npm install @hypercarrier/rarebit@0.1.0-alpha.6
|
|
50
51
|
npm exec -- rarebit --help
|
|
51
52
|
```
|
|
52
53
|
|
|
@@ -61,7 +62,29 @@ npm exec -- rarebit extract --session /absolute/path/to/session.jsonl --json
|
|
|
61
62
|
```
|
|
62
63
|
|
|
63
64
|
The Pi extension adds `/rarebit` controls after installation. It has `status`,
|
|
64
|
-
`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.
|
|
65
88
|
|
|
66
89
|
## Model setup and optional derivations
|
|
67
90
|
|
|
@@ -130,7 +153,7 @@ sensitive. Do not put their paths or content in a ticket.
|
|
|
130
153
|
Pin alpha versions for reproducible installs:
|
|
131
154
|
|
|
132
155
|
```sh
|
|
133
|
-
pi install npm:@hypercarrier/rarebit@0.1.0-alpha.
|
|
156
|
+
pi install npm:@hypercarrier/rarebit@0.1.0-alpha.6
|
|
134
157
|
pi remove npm:@hypercarrier/rarebit
|
|
135
158
|
```
|
|
136
159
|
|
package/RUNBOOK.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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
6
|
[CHANGELOG.md](CHANGELOG.md) for release details.
|
|
7
7
|
|
|
8
8
|
Set `rarebit.model` in global Pi settings or in a trusted Project's
|
|
@@ -10,11 +10,11 @@ Set `rarebit.model` in global Pi settings or in a trusted Project's
|
|
|
10
10
|
and `id`. Rarebit fails closed when it is missing or invalid. It does not use
|
|
11
11
|
Pi's interactive `defaultModel`.
|
|
12
12
|
|
|
13
|
-
Install or move this package to the alpha.
|
|
14
|
-
`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
|
|
15
15
|
sources as pinned, so package update commands skip it. Do not use an unpinned
|
|
16
|
-
source for alpha.
|
|
17
|
-
|
|
16
|
+
source for alpha.6 recovery: unpinned npm resolution follows `latest`, which
|
|
17
|
+
remains alpha.4. Run `pi remove npm:@hypercarrier/rarebit` to
|
|
18
18
|
stop loading it. These commands do not modify native Sessions or remove Rarebit
|
|
19
19
|
retained data.
|
|
20
20
|
|
|
@@ -25,6 +25,22 @@ npm exec -- rarebit query --session <exact-session.jsonl> --json
|
|
|
25
25
|
npm exec -- rarebit extract --session <exact-session.jsonl> --json
|
|
26
26
|
```
|
|
27
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
|
+
|
|
28
44
|
The current protocol reads only `materializations-v4`. A `rarebit_head` is the
|
|
29
45
|
fenced semantic-current pointer. Do not select the physical last JSONL line.
|
|
30
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,7 +24,8 @@
|
|
|
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",
|
|
@@ -34,7 +35,16 @@
|
|
|
34
35
|
"verify:package": "node scripts/verify-package.mjs"
|
|
35
36
|
},
|
|
36
37
|
"peerDependencies": {
|
|
37
|
-
"@earendil-works/pi-ai": ">=0.83.0"
|
|
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
|
+
}
|
|
38
48
|
},
|
|
39
49
|
"devDependencies": {
|
|
40
50
|
"@earendil-works/pi-coding-agent": "0.84.2",
|
|
@@ -67,6 +77,14 @@
|
|
|
67
77
|
"types": "./src/types.d.ts",
|
|
68
78
|
"import": "./src/rarebit-artifact-state.mjs"
|
|
69
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
|
+
},
|
|
70
88
|
"./visual-language": {
|
|
71
89
|
"types": "./src/types.d.ts",
|
|
72
90
|
"import": "./src/rarebit-visual-language.mjs"
|
|
@@ -83,6 +101,7 @@
|
|
|
83
101
|
},
|
|
84
102
|
"files": [
|
|
85
103
|
"bin/rarebit.mjs",
|
|
104
|
+
"bin/piq.mjs",
|
|
86
105
|
"src",
|
|
87
106
|
"schemas",
|
|
88
107
|
"scripts",
|