@hypercarrier/rarebit 0.1.0-alpha.6 → 0.2.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/CHANGELOG.md +13 -3
- package/README.md +72 -19
- package/RUNBOOK.md +16 -9
- package/docs/examples/rarebit.settings.json +19 -0
- package/package.json +9 -2
- package/scripts/e2e-recap-pi.mjs +456 -0
- package/scripts/e2e-settings-pi.mjs +267 -0
- package/scripts/e2e-v020-pi.mjs +269 -0
- package/scripts/verify-package.mjs +14 -8
- package/src/extension.mjs +183 -13
- package/src/lifecycle.mjs +32 -7
- package/src/rarebit-cli.mjs +2 -0
- package/src/rarebit-command.mjs +21 -1
- package/src/rarebit-core.mjs +87 -9
- package/src/rarebit-recap.mjs +422 -0
- package/src/rarebit-service.mjs +60 -7
- package/src/rarebit-settings-ui.mjs +479 -0
- package/src/rarebit-settings.mjs +90 -7
- package/src/types.d.ts +60 -3
- package/test/lifecycle-contract-independent.test.mjs +2 -0
- package/test/package-artifact-identity.test.mjs +54 -0
- package/test/rarebit-command.test.mjs +8 -4
- package/test/rarebit-recap.test.mjs +513 -0
- package/test/rarebit-settings-ui.test.mjs +388 -0
- package/test/rarebit-v020.test.mjs +294 -0
- package/test/summary-attention-independent.test.mjs +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.0 — 2026-09-27
|
|
4
|
+
|
|
5
|
+
- Add the `/rarebit` action palette and tabbed `/rarebit settings` editor.
|
|
6
|
+
- Add a configurable `summary_prompt` for Summary format and length. Preserve
|
|
7
|
+
paragraphs and bullets; reject oversized output instead of silently cutting it.
|
|
8
|
+
- Show the complete Recap in a muted, labelled TUI section. Remove
|
|
9
|
+
`/rarebit recap expand`.
|
|
10
|
+
- Keep Recap outside Session messages and model context. Typing preserves it;
|
|
11
|
+
submitted input, new turns, and Session or branch changes clear it.
|
|
12
|
+
- Default Summary diagnostics to off, support host or explicit IANA timezones,
|
|
13
|
+
and expose the estimated Summary input budget in settings.
|
|
14
|
+
- Include a complete example config in `docs/examples/rarebit.settings.json`.
|
|
15
|
+
|
|
3
16
|
## 0.1.0-alpha.6 — 2026-09-21
|
|
4
17
|
|
|
5
18
|
- Add bounded `/rarebit fork` and CLI fork flows with native Pi headroom checks.
|
|
@@ -8,9 +21,6 @@
|
|
|
8
21
|
- Keep read-only package commands usable without optional Pi host peers; fork
|
|
9
22
|
runtime loads the Pi adapter only when needed.
|
|
10
23
|
|
|
11
|
-
This is an unpublished release candidate. Intended npm routing after
|
|
12
|
-
publication is `next=alpha.6`; `latest` remains `alpha.4`.
|
|
13
|
-
|
|
14
24
|
## 0.1.0-alpha.5 — 2026-08-16
|
|
15
25
|
|
|
16
26
|
- Repair Pi 0.84.2 Summary calls to use the active Pi model runtime. The
|
package/README.md
CHANGED
|
@@ -10,12 +10,11 @@ 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
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
[alpha.5 release receipt](release/v0.1.0-alpha.5-release-receipt.md).
|
|
13
|
+
Rarebit is released from an immutable version tag by
|
|
14
|
+
[`.github/workflows/publish.yml`](.github/workflows/publish.yml). The workflow
|
|
15
|
+
runs the package gates, verifies one packed artifact, scans that artifact, and
|
|
16
|
+
publishes it with npm provenance. Install the exact version required by your
|
|
17
|
+
Pi host.
|
|
19
18
|
|
|
20
19
|
The old alpha.1, alpha.2, and alpha.3 tag graphs remain public and are not
|
|
21
20
|
privacy-clean. Existing package versions, tags, and releases remain immutable.
|
|
@@ -28,7 +27,7 @@ excluded from npm and does not claim publication completion.
|
|
|
28
27
|
Use Node 22 or later and Pi 0.83 or later. Install it in Pi from npm:
|
|
29
28
|
|
|
30
29
|
```sh
|
|
31
|
-
pi install npm:@hypercarrier/rarebit@0.
|
|
30
|
+
pi install npm:@hypercarrier/rarebit@0.2.0
|
|
32
31
|
pi list
|
|
33
32
|
```
|
|
34
33
|
|
|
@@ -47,7 +46,7 @@ To use the CLI in a normal Node project, install it and invoke the local bin
|
|
|
47
46
|
with npm:
|
|
48
47
|
|
|
49
48
|
```sh
|
|
50
|
-
npm install @hypercarrier/rarebit@0.
|
|
49
|
+
npm install @hypercarrier/rarebit@0.2.0
|
|
51
50
|
npm exec -- rarebit --help
|
|
52
51
|
```
|
|
53
52
|
|
|
@@ -61,8 +60,19 @@ npm exec -- rarebit query --session /absolute/path/to/session.jsonl --json
|
|
|
61
60
|
npm exec -- rarebit extract --session /absolute/path/to/session.jsonl --json
|
|
62
61
|
```
|
|
63
62
|
|
|
64
|
-
The Pi extension adds `/rarebit`
|
|
65
|
-
|
|
63
|
+
The Pi extension adds one `/rarebit` parent command. In the TUI, the bare
|
|
64
|
+
command opens an action palette. `/rarebit settings` opens a tabbed editor
|
|
65
|
+
with Actions, Summary, Recap, and Session sections. Choose global settings or
|
|
66
|
+
a trusted Project override; each field shows its effective value and source.
|
|
67
|
+
Edits require Save confirmation. Blank input or Remove override restores
|
|
68
|
+
inheritance. Settings apply to future operations; disabling automatic Recap
|
|
69
|
+
also clears its pending or visible widget.
|
|
70
|
+
|
|
71
|
+
Direct `help`, `status`, `settings`, `config`, `auto-title`, `title`, `recap`,
|
|
72
|
+
`summarize`, `recall`, and `fork` subcommands remain available. Use
|
|
73
|
+
`/rarebit settings global` or `/rarebit settings project` to choose the editing
|
|
74
|
+
scope directly. `recap` reads the current Summary receipt and renders the
|
|
75
|
+
complete multiline Summary in the TUI. It never starts synthesis.
|
|
66
76
|
|
|
67
77
|
`/rarebit fork` validates the newest contiguous Rarebit suffix, writes a new
|
|
68
78
|
Session in Pi's Session store for the current working directory, and switches
|
|
@@ -89,8 +99,15 @@ the source.
|
|
|
89
99
|
## Model setup and optional derivations
|
|
90
100
|
|
|
91
101
|
Summary and Title use a dedicated configured model. They never inherit Pi's
|
|
92
|
-
interactive `defaultModel`.
|
|
93
|
-
|
|
102
|
+
interactive `defaultModel`. Start with
|
|
103
|
+
[the example config](docs/examples/rarebit.settings.json). Merge its `rarebit`
|
|
104
|
+
object into global Pi settings (`~/.pi/agent/settings.json`, or
|
|
105
|
+
`$PI_CODING_AGENT_DIR/settings.json` when set), or a trusted project's
|
|
106
|
+
`.pi/settings.json`. Preserve other settings and select a model available
|
|
107
|
+
through your authenticated provider. The example includes all Pi extension
|
|
108
|
+
settings with their defaults; its model is an example choice.
|
|
109
|
+
|
|
110
|
+
The configuration shape is:
|
|
94
111
|
|
|
95
112
|
```json
|
|
96
113
|
{
|
|
@@ -98,11 +115,48 @@ project's `.pi/settings.json`:
|
|
|
98
115
|
"model": "provider/model",
|
|
99
116
|
"min_total_length": 80000,
|
|
100
117
|
"max_rarebit_ratio": 0.4,
|
|
101
|
-
"auto_title": true
|
|
118
|
+
"auto_title": true,
|
|
119
|
+
"max_input_tokens": 64000,
|
|
120
|
+
"summary_prompt": "The summary is free-form prose. State when evidence is uncertain, confusing, contradictory, or importantly missing instead of inventing a coherent account.",
|
|
121
|
+
"diagnostics": {
|
|
122
|
+
"summary_triggered": false,
|
|
123
|
+
"summary_updated": false
|
|
124
|
+
},
|
|
125
|
+
"recap": {
|
|
126
|
+
"enabled": true,
|
|
127
|
+
"delay_ms": 60000,
|
|
128
|
+
"timezone": "host"
|
|
129
|
+
}
|
|
102
130
|
}
|
|
103
131
|
}
|
|
104
132
|
```
|
|
105
133
|
|
|
134
|
+
After a successful automatic or explicit Summary materialization, the Pi TUI
|
|
135
|
+
offers the current Summary above the editor after one minute. The offer stays
|
|
136
|
+
visible while you type and clears when Pi sends input, starts a new turn,
|
|
137
|
+
changes Session or branch, or shuts down. Set `rarebit.recap.enabled` to
|
|
138
|
+
`false` to disable the offer, or change `rarebit.recap.delay_ms` to adjust the
|
|
139
|
+
delay. Set `rarebit.recap.timezone` to `host` or an IANA time zone such as
|
|
140
|
+
`Asia/Hong_Kong` to format the Recap header. The header identifies the host
|
|
141
|
+
zone or selected IANA zone and its offset at the observation time. The widget
|
|
142
|
+
reads an existing receipt and never adds a Session message. In the Pi extension,
|
|
143
|
+
`max_input_tokens` limits the Summary prompt by the existing
|
|
144
|
+
`ceil(prompt characters / 4)` estimate. It
|
|
145
|
+
defaults to 64,000 estimated input tokens and is not a provider output limit.
|
|
146
|
+
Summary trigger and update notifications stay off unless
|
|
147
|
+
`rarebit.diagnostics.summary_triggered` or
|
|
148
|
+
`rarebit.diagnostics.summary_updated` is enabled.
|
|
149
|
+
|
|
150
|
+
`rarebit.summary_prompt` is one scalar guidance string. It uses the default
|
|
151
|
+
guidance shown in the example when omitted. The editor accepts multiline text,
|
|
152
|
+
preserves its line breaks, and trims only outer whitespace. A blank value
|
|
153
|
+
removes the override. The fixed evidence and JSON status contract remains
|
|
154
|
+
owned by Rarebit. Keep custom guidance to a few short bullets so it leaves room
|
|
155
|
+
for evidence in the configured Summary input budget. The editor rejects unsafe
|
|
156
|
+
control characters and guidance longer than 64,000 UTF-16 characters. This
|
|
157
|
+
guidance bound is separate from the 8,000-character Summary output safety
|
|
158
|
+
limit.
|
|
159
|
+
|
|
106
160
|
Then request explicit model work when you want it:
|
|
107
161
|
|
|
108
162
|
```sh
|
|
@@ -150,17 +204,16 @@ sensitive. Do not put their paths or content in a ticket.
|
|
|
150
204
|
|
|
151
205
|
## Update, uninstall, and rollback
|
|
152
206
|
|
|
153
|
-
Pin
|
|
207
|
+
Pin a version for reproducible installs:
|
|
154
208
|
|
|
155
209
|
```sh
|
|
156
|
-
pi install npm:@hypercarrier/rarebit@0.
|
|
210
|
+
pi install npm:@hypercarrier/rarebit@0.2.0
|
|
157
211
|
pi remove npm:@hypercarrier/rarebit
|
|
158
212
|
```
|
|
159
213
|
|
|
160
214
|
The exact-version install also moves an existing Rarebit npm installation to
|
|
161
|
-
that pin. Pi skips versioned npm sources during package updates.
|
|
162
|
-
|
|
163
|
-
retained `latest`, which remains alpha.4.
|
|
215
|
+
that pin. Pi skips versioned npm sources during package updates. Restart Pi
|
|
216
|
+
after installation to load the new extension code.
|
|
164
217
|
|
|
165
218
|
To roll back, reinstall a known version with `pi install npm:@hypercarrier/rarebit@<version>`.
|
|
166
219
|
Removal stops package loading. It does not alter Pi Session JSONL or delete
|
|
@@ -169,7 +222,7 @@ only after you review it.
|
|
|
169
222
|
|
|
170
223
|
## Compatibility and support
|
|
171
224
|
|
|
172
|
-
|
|
225
|
+
Rarebit supports Node 22+ and Pi 0.83.0 or later. Its Pi AI peer has no
|
|
173
226
|
upper bound. The release gate runs Recall against Pi 0.83.0 and Pi 0.84.2. It
|
|
174
227
|
works as a deterministic CLI without a model. Summary, Title, and the Pi
|
|
175
228
|
extension require a compatible Pi installation and configured provider
|
package/RUNBOOK.md
CHANGED
|
@@ -1,20 +1,27 @@
|
|
|
1
1
|
# Rarebit runbook
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
[CHANGELOG.md](CHANGELOG.md)
|
|
3
|
+
Rarebit release automation lives in
|
|
4
|
+
[`.github/workflows/publish.yml`](.github/workflows/publish.yml). It validates
|
|
5
|
+
an immutable version tag, runs the package gates, verifies one packed artifact,
|
|
6
|
+
and publishes that artifact with npm provenance. See [CHANGELOG.md](CHANGELOG.md)
|
|
7
|
+
for product changes.
|
|
7
8
|
|
|
8
9
|
Set `rarebit.model` in global Pi settings or in a trusted Project's
|
|
9
10
|
`.pi/settings.json`. It must be `provider/model` or an object with `provider`
|
|
10
11
|
and `id`. Rarebit fails closed when it is missing or invalid. It does not use
|
|
11
12
|
Pi's interactive `defaultModel`.
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
Use `/rarebit settings` to edit the dedicated namespace. `summary_prompt`
|
|
15
|
+
changes the Summary text's format and length; the evidence and structured
|
|
16
|
+
status rules remain fixed. Remove the override to restore the built-in prompt.
|
|
17
|
+
If a response exceeds the 8,000-character safety limit, request a shorter
|
|
18
|
+
Summary in the prompt and run `/rarebit summarize` again. Oversized output
|
|
19
|
+
fails explicitly instead of producing a cut-off Recap.
|
|
20
|
+
|
|
21
|
+
Install or move this package to an exact version with
|
|
22
|
+
`pi install npm:@hypercarrier/rarebit@<version>`. Pi treats versioned npm
|
|
23
|
+
sources as pinned, so package update commands skip it. Run `pi remove
|
|
24
|
+
npm:@hypercarrier/rarebit` to
|
|
18
25
|
stop loading it. These commands do not modify native Sessions or remove Rarebit
|
|
19
26
|
retained data.
|
|
20
27
|
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"rarebit": {
|
|
3
|
+
"model": "openai-codex/gpt-5.6-luna",
|
|
4
|
+
"min_total_length": 80000,
|
|
5
|
+
"max_rarebit_ratio": 0.4,
|
|
6
|
+
"auto_title": true,
|
|
7
|
+
"max_input_tokens": 64000,
|
|
8
|
+
"summary_prompt": "The summary is free-form prose. State when evidence is uncertain, confusing, contradictory, or importantly missing instead of inventing a coherent account.",
|
|
9
|
+
"diagnostics": {
|
|
10
|
+
"summary_triggered": false,
|
|
11
|
+
"summary_updated": false
|
|
12
|
+
},
|
|
13
|
+
"recap": {
|
|
14
|
+
"enabled": true,
|
|
15
|
+
"delay_ms": 60000,
|
|
16
|
+
"timezone": "host"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hypercarrier/rarebit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Sparse, provenance-bearing conversational evidence recovery for Pi sessions.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "HyperCarrier contributors",
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"scripts": {
|
|
31
31
|
"test": "node --test test/*.test.mjs",
|
|
32
|
+
"test:e2e:tui": "node scripts/e2e-v020-pi.mjs",
|
|
32
33
|
"test:e2e:summary-cache": "node scripts/e2e-summary-cache.mjs",
|
|
33
34
|
"test:e2e:recall": "node scripts/e2e-recall-pi0842.mjs",
|
|
34
35
|
"test:e2e:recall:pi083": "node scripts/e2e-recall-pi083.mjs",
|
|
@@ -36,7 +37,8 @@
|
|
|
36
37
|
},
|
|
37
38
|
"peerDependencies": {
|
|
38
39
|
"@earendil-works/pi-ai": ">=0.83.0",
|
|
39
|
-
"@earendil-works/pi-coding-agent": ">=0.83.0"
|
|
40
|
+
"@earendil-works/pi-coding-agent": ">=0.83.0",
|
|
41
|
+
"@earendil-works/pi-tui": ">=0.83.0"
|
|
40
42
|
},
|
|
41
43
|
"peerDependenciesMeta": {
|
|
42
44
|
"@earendil-works/pi-ai": {
|
|
@@ -44,10 +46,14 @@
|
|
|
44
46
|
},
|
|
45
47
|
"@earendil-works/pi-coding-agent": {
|
|
46
48
|
"optional": true
|
|
49
|
+
},
|
|
50
|
+
"@earendil-works/pi-tui": {
|
|
51
|
+
"optional": true
|
|
47
52
|
}
|
|
48
53
|
},
|
|
49
54
|
"devDependencies": {
|
|
50
55
|
"@earendil-works/pi-coding-agent": "0.84.2",
|
|
56
|
+
"@earendil-works/pi-tui": "0.84.2",
|
|
51
57
|
"ajv": "^6.15.0",
|
|
52
58
|
"typescript": "^5.9.3"
|
|
53
59
|
},
|
|
@@ -104,6 +110,7 @@
|
|
|
104
110
|
"bin/piq.mjs",
|
|
105
111
|
"src",
|
|
106
112
|
"schemas",
|
|
113
|
+
"docs/examples/rarebit.settings.json",
|
|
107
114
|
"scripts",
|
|
108
115
|
"test",
|
|
109
116
|
"README.md",
|