@ftrdotdev/pi-tracker 0.7.0 → 0.9.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 +369 -0
- package/README.md +88 -9
- package/package.json +27 -16
- package/src/compaction/candidate.test.ts +66 -125
- package/src/compaction/classifier.test.ts +22 -2
- package/src/compaction/classifier.ts +35 -22
- package/src/compaction/completion.test.ts +24 -16
- package/src/compaction/completion.ts +1 -1
- package/src/compaction/decision-record.test.ts +1 -1
- package/src/compaction/decision-record.ts +1 -1
- package/src/compaction/digest.test.ts +34 -34
- package/src/compaction/footprint.ts +2 -4
- package/src/compaction/settings.test.ts +5 -1
- package/src/compaction/settings.ts +1 -1
- package/src/compaction/settle.test.ts +50 -10
- package/src/compaction/settle.ts +5 -5
- package/src/core/deps.test.ts +128 -109
- package/src/core/deps.ts +3 -2
- package/src/core/domain.test.ts +99 -68
- package/src/core/domain.ts +16 -10
- package/src/core/persistence.test.ts +18 -19
- package/src/core/persistence.ts +4 -3
- package/src/core/store.test.ts +129 -167
- package/src/core/store.ts +77 -57
- package/src/harness-collection.test.ts +75 -0
- package/src/index.test.ts +59 -17
- package/src/index.ts +63 -64
- package/src/layers.test.ts +101 -0
- package/src/layers.ts +46 -0
- package/src/presentation/tool-metadata.test.ts +36 -38
- package/src/presentation/tool-metadata.ts +127 -130
- package/src/presentation/ui.test.ts +128 -67
- package/src/presentation/ui.ts +68 -20
- package/src/presentation/vim-settings.test.ts +101 -0
- package/src/presentation/vim-settings.ts +59 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,369 @@
|
|
|
1
|
+
# @ftrdotdev/pi-tracker
|
|
2
|
+
|
|
3
|
+
## 0.9.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 9b1fcd6: Standardize the `@effect/tsgo` setup and clear every lint finding.
|
|
8
|
+
|
|
9
|
+
- The toolchain moves to `@effect/tsgo` 0.73.4, `oxlint` 1.94.0, and
|
|
10
|
+
`oxlint-tsgolint` 7.0.2008.
|
|
11
|
+
- The root `tsconfig.json` now carries the compiler options and the
|
|
12
|
+
`@effect/language-service` plugin, and every package extends it. Stricter
|
|
13
|
+
flags join it: `noUnusedLocals`, `noUnusedParameters`, `noImplicitReturns`,
|
|
14
|
+
`noUncheckedSideEffectImports`, and `exactOptionalPropertyTypes`. Effect
|
|
15
|
+
diagnostics come from oxlint alone: the 13 `recommended` errors fail the
|
|
16
|
+
lint run, and the remaining rules report as warnings.
|
|
17
|
+
- `oxlint` is the only owner of the Effect diagnostics. `tsconfig.json` sets
|
|
18
|
+
the language-service plugin's `diagnostics` to `false`, so `tsc` no longer
|
|
19
|
+
repeats what oxlint reports. The root `oxlint.config.ts` extends the Effect
|
|
20
|
+
`style`, `correctness`, `antipattern` and `recommended` presets in that order;
|
|
21
|
+
oxlint finds it by walking up from each package, so the per-package configs
|
|
22
|
+
are gone.
|
|
23
|
+
- `Schema.Class`, `Schema.TaggedClass`, and `Schema.TaggedError` declarations
|
|
24
|
+
now carry the nominal brand type argument. **Type-level breaking change** for
|
|
25
|
+
code that assigned plain object literals to these types; construct them with
|
|
26
|
+
`.make()` or `new`.
|
|
27
|
+
- `@ftrdotdev/pi-inquiry`: `Keyboard`'s `nextKey` is
|
|
28
|
+
`readonly nextKey: Effect.Effect<KeyEvent>` instead of a zero-argument
|
|
29
|
+
method. **Breaking for code that implements `Keyboard["Service"]`**; callers
|
|
30
|
+
drop the `()`.
|
|
31
|
+
- `@ftrdotdev/pi-tui`: new `withStatus` and `withCounts` helpers replace
|
|
32
|
+
class-instance spreads when a status or count record needs one field
|
|
33
|
+
replaced. The config schema now uses `Schema.Finite` where `Schema.Number`
|
|
34
|
+
accepted `NaN` and infinities.
|
|
35
|
+
- `@ftrdotdev/pi-qrspi`: `readGitMetadata` omits unknown frontmatter fields
|
|
36
|
+
instead of setting them to `undefined`.
|
|
37
|
+
|
|
38
|
+
- 5f4dbba: Add a second smart-compaction eval corpus for declared-format items. The new
|
|
39
|
+
pipeline harvests only cases whose snapshot carries a `description`, `refs`, or
|
|
40
|
+
`produces` key, freezes the resolved facts for each declared head, draws a
|
|
41
|
+
seeded quota sample in two explicit passes, audits ten replays per row, and
|
|
42
|
+
gates the declared rows against the control base rate.
|
|
43
|
+
|
|
44
|
+
- `eval:harvest:v2`, `eval:facts`, `eval:sample`, `eval:audit`, `eval:answers`,
|
|
45
|
+
`eval:score`, and `eval:freeze` are new. `eval:rules` and `eval:promote`
|
|
46
|
+
learn the declared corpus and its `v2-a`/`v2-b` pass list.
|
|
47
|
+
- `eval:facts` stops before labeling when no behavior-changing row can reach
|
|
48
|
+
10 firings per pass.
|
|
49
|
+
- Promotion is additive and runs on the declared corpus only: it writes the
|
|
50
|
+
union of the frozen old floor and the v2 accepted set. Removal needs
|
|
51
|
+
`--remove`, and an abstain row is never promoted.
|
|
52
|
+
- The label card hides the replayed row and its provenance until the answer
|
|
53
|
+
locks, then reveals both and offers a surprise flag. `--suggest` is refused
|
|
54
|
+
for the declared corpus.
|
|
55
|
+
- `evals/data` keeps the legacy corpus frozen. The declared corpus and its
|
|
56
|
+
evidence live under `evals/data/v2/` and `evals/data/v2-evidence/`. Both are
|
|
57
|
+
git-ignored and local-only; only the hand-written `evals/data/synthetic/`
|
|
58
|
+
fixture is tracked. Evidence copies replace session file names with stable
|
|
59
|
+
hashes and drop real list names, and `evals/privacy.test.ts` guards the
|
|
60
|
+
ignore rules.
|
|
61
|
+
|
|
62
|
+
### Patch Changes
|
|
63
|
+
|
|
64
|
+
- 891568b: Ship `CHANGELOG.md` in the package tarballs.
|
|
65
|
+
|
|
66
|
+
- Pi reads a package changelog after an update and lists the new entries under
|
|
67
|
+
"Extension Updates" on the next fresh launch. It reads the file from the
|
|
68
|
+
installed package.
|
|
69
|
+
- The `files` whitelist in each `package.json` left the changelog out, so the
|
|
70
|
+
published tarballs carried no release notes.
|
|
71
|
+
- The README release section now records the requirement.
|
|
72
|
+
|
|
73
|
+
- cd27584: Keep compaction while a run streams.
|
|
74
|
+
|
|
75
|
+
`@ftrdotdev/pi-tracker`: the classifier gateway tested
|
|
76
|
+
`signal?.aborted !== undefined`, which is true for every live signal. While the
|
|
77
|
+
agent streamed, `ctx.signal` was set, so `shouldCompact` answered `disabled`
|
|
78
|
+
and compaction never ran. The check now reads `signal?.aborted ?? false`, so
|
|
79
|
+
only an aborted run disables it. A session that compacts now does so at the
|
|
80
|
+
configured threshold instead of growing without bound.
|
|
81
|
+
|
|
82
|
+
- 81c4a61: Move the Pi packages to `1.5.0` and build tool parameter schemas with
|
|
83
|
+
`@earendil-works/pi-schema`.
|
|
84
|
+
|
|
85
|
+
- `@earendil-works/pi-ai`, `@earendil-works/pi-coding-agent`, and
|
|
86
|
+
`@earendil-works/pi-tui` move from `1.4.0` to `1.5.0`. Pi 1.5.0 validates
|
|
87
|
+
tool arguments with `@earendil-works/pi-schema`.
|
|
88
|
+
- `pi-tracker` and `pi-tui` build `parameters` with pi-schema builders and
|
|
89
|
+
derive the parameter types from pi-schema's `Static`. The `typebox` peer
|
|
90
|
+
dependency is removed.
|
|
91
|
+
- `pi-inquiry` drops its TypeBox type import. Its Effect-generated JSON Schema
|
|
92
|
+
passes to Pi unchanged.
|
|
93
|
+
- Tool validation errors now use pi-schema messages, such as
|
|
94
|
+
`recommended: expected boolean, got string`.
|
|
95
|
+
|
|
96
|
+
- f8094f4: Show the interface in each package README, and point `homepage` at that package
|
|
97
|
+
README instead of the monorepo root.
|
|
98
|
+
- 305cdb7: Move the tui session state behind Effect services and one composition layer.
|
|
99
|
+
|
|
100
|
+
- Add `SessionLifecycleService`, `ActivityService`, `TurnTelemetryService`,
|
|
101
|
+
`UsageTotalsService` and `RuntimeInfoService`. The chrome port builder, the
|
|
102
|
+
extension entry and the tracker widget read them instead of module-level
|
|
103
|
+
cells, so a session start resets every store from one counter.
|
|
104
|
+
- Build the per-program graph in `src/layers.ts`. The runtime probe goes through
|
|
105
|
+
`FileSystem`, `Path` and `ChildProcessSpawner`, with the home directory and a
|
|
106
|
+
live environment read injected at the entry point.
|
|
107
|
+
- Compose the tracker's tool graph in `makeTrackerRuntime`, leaving `src/index.ts`
|
|
108
|
+
as the bridge that injects `appendEntry`.
|
|
109
|
+
- Guard the inquiry core: no `@earendil-works`, `@effect/platform` or `node:`
|
|
110
|
+
import outside the box-frame carve-out, and no `Layer` construction.
|
|
111
|
+
|
|
112
|
+
Rendered output is unchanged: the frozen footer and header frames stay
|
|
113
|
+
byte-identical at 30/40/60/80/100/120.
|
|
114
|
+
|
|
115
|
+
- Updated dependencies [891568b]
|
|
116
|
+
- Updated dependencies [9b1fcd6]
|
|
117
|
+
- Updated dependencies [eeb018a]
|
|
118
|
+
- Updated dependencies [81c4a61]
|
|
119
|
+
- Updated dependencies [f8094f4]
|
|
120
|
+
- Updated dependencies [305cdb7]
|
|
121
|
+
- Updated dependencies [36e53c0]
|
|
122
|
+
- @ftrdotdev/pi-tui@0.9.0
|
|
123
|
+
|
|
124
|
+
## 0.8.0
|
|
125
|
+
|
|
126
|
+
### Minor Changes
|
|
127
|
+
|
|
128
|
+
- d136652: Add h/j/k/l navigation to the `/tracker` overlay, gated on the TUI `vim` toggle.
|
|
129
|
+
|
|
130
|
+
- `j`/`k` move the cursor and `h`/`l` switch panes, in both the lists pane and
|
|
131
|
+
the items pane.
|
|
132
|
+
- Arrow keys always work. Arrow left and right now switch panes as well.
|
|
133
|
+
- The vim keys are live only when `vim` is on in the shared `tui.json`. The
|
|
134
|
+
overlay reads that toggle when it opens and shows the vim keys in its help
|
|
135
|
+
line only when they are active.
|
|
136
|
+
|
|
137
|
+
### Patch Changes
|
|
138
|
+
|
|
139
|
+
- c294fe5: Bump the Effect packages to `4.1.1`, `@effect/tsgo` to `0.63.0`, `vitest` to
|
|
140
|
+
`5.0.5`, and the Pi packages to `1.4.0`.
|
|
141
|
+
|
|
142
|
+
- `effect`, `@effect/platform-node`, `@effect/platform-node-shared`, and
|
|
143
|
+
`@effect/vitest` move from `4.0.0` to `4.1.1`; `@effect/tsgo` moves from
|
|
144
|
+
`0.47.2` to `0.63.0`.
|
|
145
|
+
- `@earendil-works/pi-ai`, `@earendil-works/pi-coding-agent`, and
|
|
146
|
+
`@earendil-works/pi-tui` move from `1.1.0` to `1.4.0`. No extension API
|
|
147
|
+
changes were needed.
|
|
148
|
+
- `vitest` moves from the 4.1 line to `5.0.5`, the range that
|
|
149
|
+
`@effect/vitest` declares as its peer. `oxlint` moves to `1.90.0` and
|
|
150
|
+
`oxlint-tsgolint` to `7.0.2005`, the pair that `@effect/tsgo` 0.63.0 supports.
|
|
151
|
+
- Effect 4.1.1 marks `effect/FileSystem`, `effect/Path`, `effect/PlatformError`,
|
|
152
|
+
`effect/Graph`, `@effect/platform-node*`, and `@effect/vitest` as unstable.
|
|
153
|
+
Each package `tsconfig.json` now lists them in the language-service plugin
|
|
154
|
+
option `allowedUnstableApis`, so typecheck stays green without per-file
|
|
155
|
+
`@effect-diagnostics` directives.
|
|
156
|
+
- The internal `TuiConfig` schema in `pi-tui` is now a `Schema.Struct` with a type
|
|
157
|
+
alias instead of a `Schema.Class`. The class was only ever used as plain data,
|
|
158
|
+
and the 4.1.1 `schemaClassObjectLiteral` rule flagged every literal and spread.
|
|
159
|
+
`TuiConfig` is not part of the package exports, so no consumer code changes.
|
|
160
|
+
|
|
161
|
+
- 454ca8b: Stop the observe-only rule report from writing to the console.
|
|
162
|
+
|
|
163
|
+
The settle decider logged the fired rule with `Effect.logInfo` before asking the
|
|
164
|
+
classifier. Effect's default logger writes to stdout; pi's TUI redirects that to
|
|
165
|
+
stderr, which bypasses the differential renderer, so the line stuck in the
|
|
166
|
+
editor area. The fired rule and its verdict stay available in the
|
|
167
|
+
`tracker/reliance-decision` session entry.
|
|
168
|
+
|
|
169
|
+
- Updated dependencies [c294fe5]
|
|
170
|
+
- @ftrdotdev/pi-tui@0.8.0
|
|
171
|
+
|
|
172
|
+
## 0.7.0
|
|
173
|
+
|
|
174
|
+
### Minor Changes
|
|
175
|
+
|
|
176
|
+
- 5ede9f6: Author items with a title, a description, and declarations, and let a measured
|
|
177
|
+
rule decide a compaction before the classifier.
|
|
178
|
+
|
|
179
|
+
- `add_item` becomes `add_items` and takes `items`, a non-empty array of item
|
|
180
|
+
objects. Every item is declared the same way, as
|
|
181
|
+
`{title, description?, refs?, produces?, deps?}`. `create_list`'s
|
|
182
|
+
`initial_items` takes the same objects. The old `text` field and the `title`
|
|
183
|
+
container are rejected, so a field can never nest as `title.title`.
|
|
184
|
+
- `update_items` keeps its scalar form (`item_id` plus fields) and its batch form
|
|
185
|
+
(`list_id` + `items` patches, each with an `item_id`).
|
|
186
|
+
- A legacy item with one `text` string still loads: the first line becomes the
|
|
187
|
+
title and the rest becomes the description.
|
|
188
|
+
- The widget shows the title, with the description dimmed on the line below. The
|
|
189
|
+
`/tracker` overlay shows the full description.
|
|
190
|
+
- The extension records what each batch wrote, read, and ran, and resolves an
|
|
191
|
+
item's declared references and products against disk at the settle boundary. A
|
|
192
|
+
rule row that cleared the eval gate compacts the ready frontier on its own.
|
|
193
|
+
Every other row reports its name and hands the frontier to the classifier.
|
|
194
|
+
- An item with a declaration records the fired row and the resolved states as a
|
|
195
|
+
compact `tracker/reliance-decision` session entry. The entry feeds the rule
|
|
196
|
+
eval, so a declared row's live coverage is measurable.
|
|
197
|
+
- `update_items` now rejects a top-level `refs` or `produces` alongside `items`.
|
|
198
|
+
The call was accepted before, and the declarations were dropped.
|
|
199
|
+
|
|
200
|
+
### Patch Changes
|
|
201
|
+
|
|
202
|
+
- f4213db: Rename the two smart-compaction confidence knobs so each name states what it measures.
|
|
203
|
+
|
|
204
|
+
- `smartCompaction.keepContextThreshold` becomes `smartCompaction.needsContextProbabilityThreshold`. It cuts on the classifier's `needs-context` probability. Raise it to compact more often.
|
|
205
|
+
- `smartCompaction.keepContextMinConfidence` becomes `smartCompaction.minAnswerConfidence`. It floors the answer's self-reported confidence. Raise it to keep context more often.
|
|
206
|
+
- Both old keys still resolve as aliases, so an existing `tui.json` keeps working. The new key wins when both are present.
|
|
207
|
+
- The `/tui` Compaction tab labels become `Needs-context probability` and `Answer confidence floor`.
|
|
208
|
+
- The tracker README no longer states the inverted direction for the probability knob.
|
|
209
|
+
|
|
210
|
+
- Updated dependencies [edb419d]
|
|
211
|
+
- Updated dependencies [f4213db]
|
|
212
|
+
- @ftrdotdev/pi-tui@0.7.0
|
|
213
|
+
|
|
214
|
+
## 0.6.0
|
|
215
|
+
|
|
216
|
+
### Minor Changes
|
|
217
|
+
|
|
218
|
+
- 3803293: Add mouse-wheel navigation, clipboard copy, and new theme helpers.
|
|
219
|
+
|
|
220
|
+
- The footer lists every runtime that matches the working directory, in table order, and joins them with a dim `·`. Previously it showed the first match only. An empty result stays an empty segment.
|
|
221
|
+
- The editor's top border shows pi's working status indicator during a run: spinner and message when they fit, spinner alone on narrow widths. The mode glyph and the scroll hint move behind it in the label slot.
|
|
222
|
+
- `makeBorderedBox` takes a theme background token for `bg` instead of a caller-supplied function. Pass `"customMessageBg"` where the code passed `(s) => theme.bg("customMessageBg", s)`. The border, the embedded label, and the body now paint the same background.
|
|
223
|
+
- `@ftrdotdev/pi-tui` exports derived theme colors: `mixThemeTokens`, `recede`, `emphasize`, and `isDark`. Use them for shades that are not theme tokens, such as a dimmed border or a selected row. `recede` and `emphasize` follow `theme.appearance`, so a light theme needs no special case.
|
|
224
|
+
- The `/tracker` overlay moves the cursor with the mouse wheel and wraps at either end. `[c]` copies the selected list or item and reports `Copied ...` in the overlay.
|
|
225
|
+
- The selected row in the `/tracker` overlay uses the `selectedBg` token.
|
|
226
|
+
- The inquiry questionnaire moves the cursor with the mouse wheel and copies the open question and its options with `ctrl+y`.
|
|
227
|
+
- The header clears the visible screen once per process, on the first regular-mode mount, and never again. Fullscreen owns the alternate screen, where the clear only flickered. A re-mount (`reload`, `new`, `fork`, `/resume`, settings toggle) no longer clears: that write went outside pi-tui and desynced its differential redraw, which left the space for an extension widget blank until the next full repaint.
|
|
228
|
+
|
|
229
|
+
- 56780b8: Start smart compaction when a tracker item completes.
|
|
230
|
+
|
|
231
|
+
- Completing an item in the active list starts one classifier call at the settle boundary. The call asks one two-label choice question per judged item: `needs-context` or `stands-alone`. It judges the whole ready frontier, dependents first, up to `smartCompaction.maxCandidates` items. It keeps the context when any item needs the completed work. When no item needs it, the extension starts Pi's own compaction. It then resumes the session with a pointer that names the next ready item.
|
|
232
|
+
- Classification reads five keys from `tui.json`: `smartCompaction.enabled`, `smartCompaction.classifier`, `smartCompaction.keepContextThreshold`, `smartCompaction.keepContextMinConfidence`, and `smartCompaction.maxCandidates`. It fails open. A disabled feature, no credential-available classifier, an error, a timeout, an aborted run, or an unready list keeps the full context.
|
|
233
|
+
- `smartCompaction.keepContextThreshold` sets the probability of `needs-context` at or above which the context is kept. The default is `0.5`. A value outside `(0, 1)` falls back to the default.
|
|
234
|
+
- `smartCompaction.keepContextMinConfidence` sets the answer confidence below which the context is kept. The default is `0.5`. A value outside `(0, 1)` falls back to the default. The floor only adds keeping, so an unsure answer cannot cause a premature compaction.
|
|
235
|
+
- `smartCompaction.maxCandidates` caps how many ready items one classification judges. The default is `8`. An integer outside `1..20` falls back to the default.
|
|
236
|
+
- The preference order is Cloudflare Clef Flash, then TypeSafe Jev, then OpenCode's Jev. The OpenCode entries are the fallback when only OpenCode credentials are configured. `smartCompaction.classifier` overrides the order. The shared config keys are pinned by `test-fixtures/tui-config.contract.json`.
|
|
237
|
+
|
|
238
|
+
### Patch Changes
|
|
239
|
+
|
|
240
|
+
- Updated dependencies [3803293]
|
|
241
|
+
- Updated dependencies [6876f36]
|
|
242
|
+
- @ftrdotdev/pi-tui@0.6.0
|
|
243
|
+
|
|
244
|
+
## 0.5.2
|
|
245
|
+
|
|
246
|
+
### Patch Changes
|
|
247
|
+
|
|
248
|
+
- a860f5b: Move the Effect packages to the stable `4.0.0` release and the Pi packages to `1.0.0`.
|
|
249
|
+
|
|
250
|
+
- Bump `effect`, `@effect/platform-node`, `@effect/platform-node-shared`, and `@effect/vitest` to `4.0.0`, and `@effect/tsgo` to `0.47.2`.
|
|
251
|
+
- Bump `@earendil-works/pi-ai`, `@earendil-works/pi-coding-agent`, and `@earendil-works/pi-tui` to `1.0.0`.
|
|
252
|
+
- Follow the rc.118 module move: `effect/unstable/process` becomes `effect/process`.
|
|
253
|
+
- Follow the Pi 0.99.0 tool API: tool execution contexts are now `ExtensionToolContext`.
|
|
254
|
+
- `pi-inquiry` gains a `typecheck` script; its two latent type errors are fixed.
|
|
255
|
+
|
|
256
|
+
- Updated dependencies [a860f5b]
|
|
257
|
+
- @ftrdotdev/pi-tui@0.5.2
|
|
258
|
+
|
|
259
|
+
## 0.5.1
|
|
260
|
+
|
|
261
|
+
### Patch Changes
|
|
262
|
+
|
|
263
|
+
- 4e101f0: Pin `@effect/platform-node-shared` and move the Effect packages to `4.0.0-rc.116`.
|
|
264
|
+
|
|
265
|
+
The 0.5.0 packages pinned `effect` and `@effect/platform-node` to `4.0.0-rc.108`. `@effect/platform-node` depends on `@effect/platform-node-shared` with a caret range. Every `4.0.0-rc.*` release shares the `4.0.0` base, so that range resolved to a newer `@effect/platform-node-shared` that imports `effect/ByteSize`. The pinned `effect` has no `ByteSize` module, so loading an extension failed with `Cannot find module '.../effect/dist/ByteSize.js'`.
|
|
266
|
+
|
|
267
|
+
- Move `effect`, `@effect/platform-node`, and `@effect/vitest` to `4.0.0-rc.116`.
|
|
268
|
+
- Add `@effect/platform-node-shared` to the `effect` catalog at an exact version, and depend on it directly from `pi-tui` and `pi-tracker`. This stops the transitive range from floating to a release that needs a newer `effect`.
|
|
269
|
+
|
|
270
|
+
- Updated dependencies [4e101f0]
|
|
271
|
+
- @ftrdotdev/pi-tui@0.5.1
|
|
272
|
+
|
|
273
|
+
## 0.5.0
|
|
274
|
+
|
|
275
|
+
### Minor Changes
|
|
276
|
+
|
|
277
|
+
- 8b7b62b: Add item dependencies as a DAG, with readiness gates and a derived display order.
|
|
278
|
+
|
|
279
|
+
- Every item carries a permanent id, unique within its list and never reused.
|
|
280
|
+
Removing an item leaves a gap in the numbering instead of renumbering the
|
|
281
|
+
items after it, so a reference you already hold stays valid.
|
|
282
|
+
- The `update_item` batch form now takes `item_id` per patch. It replaced the
|
|
283
|
+
positional `index` field, so callers that used positions must switch. A batch
|
|
284
|
+
applies its patches in order, so one call can complete a chain; a completion
|
|
285
|
+
that comes before its blocker in the array is refused.
|
|
286
|
+
- Declare dependencies with `deps`: same-list `listName:id` references, either
|
|
287
|
+
on the item object or through `update_item`. `deps` replaces the set, so pass
|
|
288
|
+
`[]` to clear it. A dependency that would close a cycle is rejected, and the
|
|
289
|
+
error names the cycle.
|
|
290
|
+
- Completing a blocked item fails and the error names the blockers. Removing an
|
|
291
|
+
item that other items depend on fails and the error names the dependents.
|
|
292
|
+
Reopening never fails and does not cascade: the result notes any dependents
|
|
293
|
+
that are now done but blocked, and a `deps` edit that leaves a done item
|
|
294
|
+
waiting is reported the same way.
|
|
295
|
+
- The `deps` report names the set before and after whenever the two differ, so a
|
|
296
|
+
dependency that a call dropped is visible.
|
|
297
|
+
- The `list` action marks blocked items with `(blocked by ...)` and done items
|
|
298
|
+
whose dependency is open with `(waiting on ...)`. It ends every list that has
|
|
299
|
+
dependencies with a `Ready now` line; a list with no `blocked by` marker has
|
|
300
|
+
nothing blocked, and an edge-free list keeps the output it had before.
|
|
301
|
+
- The widget marks the current (first ready) item with `●`, other ready items
|
|
302
|
+
with `○`, blocked items with `⊘`, and done items with `✓`.
|
|
303
|
+
- The widget, the `list` action, and the `/tracker` items pane render items in
|
|
304
|
+
a stable dependency order. A list with no dependencies keeps its stored
|
|
305
|
+
order, and its output is byte-identical to before.
|
|
306
|
+
- A session saved before this change loads with each item id equal to its
|
|
307
|
+
position, so its references still resolve.
|
|
308
|
+
|
|
309
|
+
### Patch Changes
|
|
310
|
+
|
|
311
|
+
- 964a496: Collapse long lists in the widget and fix the scalar `update_item` crash.
|
|
312
|
+
|
|
313
|
+
- Keep the first item, the current item (the first item still open), and the last item visible when the active list has more items than the widget can show. Collapse the items outside that window into a `⋮` row, and show the row only when items are hidden between the visible rows.
|
|
314
|
+
- Mark the current item with a filled `●` in the accent color, so the item being worked on stands out from the other open items.
|
|
315
|
+
- Fix `update_item` with `item_id`, which failed with `items.map is not a function`. Both `update_item` forms now return an affected-items array.
|
|
316
|
+
|
|
317
|
+
- @ftrdotdev/pi-tui@0.5.0
|
|
318
|
+
|
|
319
|
+
## 0.4.0
|
|
320
|
+
|
|
321
|
+
### Patch Changes
|
|
322
|
+
|
|
323
|
+
- 483f6f4: Tighten the agent-facing tool guidance.
|
|
324
|
+
|
|
325
|
+
- Rewrite the `question` tool description and prompt guidelines: split long sentences, use the imperative, and make the "cancelled question" guidance concrete.
|
|
326
|
+
- Update the `tracker` tool description so the working-state claim is concrete instead of "live".
|
|
327
|
+
|
|
328
|
+
- Updated dependencies [c89b1a6]
|
|
329
|
+
- Updated dependencies [2d3c636]
|
|
330
|
+
- Updated dependencies [a113d38]
|
|
331
|
+
- @ftrdotdev/pi-tui@0.4.0
|
|
332
|
+
|
|
333
|
+
## 0.3.0
|
|
334
|
+
|
|
335
|
+
### Minor Changes
|
|
336
|
+
|
|
337
|
+
- Make `update_item` batching per-list and mirror `add_item`.
|
|
338
|
+
|
|
339
|
+
- `update_item`'s batch form changed from `items=[{item_id, text?, done?}, ...]`
|
|
340
|
+
(each id naming its own list) to `list_id` (required) plus
|
|
341
|
+
`items=[{index, text?, done?}, ...]`, where `index` is the item's 1-based
|
|
342
|
+
position in that list.
|
|
343
|
+
This mirrors `add_item`'s `list_id + text[]` shape, so one batch stays within
|
|
344
|
+
a single list.
|
|
345
|
+
- The scalar `item_id` + `text`/`done` form is unchanged.
|
|
346
|
+
- `doneMarkReminder` now fires only on the terminal batch — two or more items
|
|
347
|
+
marked done with no open items left behind — instead of any multi-done call.
|
|
348
|
+
|
|
349
|
+
### Patch Changes
|
|
350
|
+
|
|
351
|
+
- @ftrdotdev/pi-tui@0.3.0
|
|
352
|
+
|
|
353
|
+
## 0.2.1
|
|
354
|
+
|
|
355
|
+
### Patch Changes
|
|
356
|
+
|
|
357
|
+
- Updated dependencies
|
|
358
|
+
- @ftrdotdev/pi-tui@0.2.1
|
|
359
|
+
|
|
360
|
+
## 0.2.0
|
|
361
|
+
|
|
362
|
+
### Minor Changes
|
|
363
|
+
|
|
364
|
+
- fe0ac01: Solidify initial tooling, visuals, and configurability between packages
|
|
365
|
+
|
|
366
|
+
### Patch Changes
|
|
367
|
+
|
|
368
|
+
- Updated dependencies [fe0ac01]
|
|
369
|
+
- @ftrdotdev/pi-tui@0.2.0
|
package/README.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
pi-tracker is an extension for Pi. It manages todolists in your session.
|
|
4
4
|
|
|
5
|
+
<img src="https://raw.githubusercontent.com/felixnorden/pi-mono/main/docs/images/pi-tracker.png" width="880" alt="The tracker widget above the editor: a bordered box titled TrackerWidgetFix (0/3) with three items, two of them blocked, then the editor and the pi footer">
|
|
6
|
+
|
|
7
|
+
The widget above the editor shows the active list: counts in the border, one
|
|
8
|
+
line per item, and a dimmed description line when the item carries one.
|
|
9
|
+
|
|
5
10
|
## Features
|
|
6
11
|
|
|
7
12
|
- Create and delete todolists.
|
|
@@ -160,6 +165,9 @@ pane for editing.
|
|
|
160
165
|
| ------- | -------------------------------------- |
|
|
161
166
|
| `tab` | Switch between the lists and the items |
|
|
162
167
|
| `↑` `↓` | Move the cursor |
|
|
168
|
+
| `←` `→` | Switch panes |
|
|
169
|
+
| `j` `k` | Move the cursor (vim on) |
|
|
170
|
+
| `h` `l` | Switch panes (vim on) |
|
|
163
171
|
| `enter` | Select a list and open its items |
|
|
164
172
|
| `space` | Toggle the active list |
|
|
165
173
|
| `n` | Create a list |
|
|
@@ -170,6 +178,11 @@ pane for editing.
|
|
|
170
178
|
| `r` | Remove an item |
|
|
171
179
|
| `esc` | Close the view |
|
|
172
180
|
|
|
181
|
+
The `j` `k` `h` `l` keys are the vim navigation motions, and they are live
|
|
182
|
+
only when `vim` is on in the shared `tui.json`. The overlay reads that toggle
|
|
183
|
+
when it opens and shows the vim keys in its help line only when they are
|
|
184
|
+
active. Arrows always work.
|
|
185
|
+
|
|
173
186
|
### The widget
|
|
174
187
|
|
|
175
188
|
The widget shows the active list above the editor. It appears when a list is
|
|
@@ -296,15 +309,81 @@ Registration lives in `package.json` under the `pi` field:
|
|
|
296
309
|
|
|
297
310
|
## Development
|
|
298
311
|
|
|
299
|
-
| Command
|
|
300
|
-
|
|
|
301
|
-
| `bun run test`
|
|
302
|
-
| `bun run test:watch`
|
|
303
|
-
| `bun run typecheck`
|
|
304
|
-
| `bun run lint`
|
|
305
|
-
| `bun run eval:harvest`
|
|
306
|
-
| `bun run eval:
|
|
307
|
-
| `bun run eval:
|
|
312
|
+
| Command | Purpose |
|
|
313
|
+
| ------------------------- | ---------------------------------------------------------- |
|
|
314
|
+
| `bun run test` | Run the test suite (vitest + @effect/vitest) |
|
|
315
|
+
| `bun run test:watch` | Run the test suite in watch mode |
|
|
316
|
+
| `bun run typecheck` | Type check with `tsc --noEmit` |
|
|
317
|
+
| `bun run lint` | Lint with oxlint |
|
|
318
|
+
| `bun run eval:harvest` | Harvest the frozen legacy corpus from local sessions |
|
|
319
|
+
| `bun run eval:harvest:v2` | Harvest only declared-format cases into `evals/data/v2` |
|
|
320
|
+
| `bun run eval:facts` | Freeze the declared facts and print the pre-flight verdict |
|
|
321
|
+
| `bun run eval:sample` | Draw the seeded, quota-based label sample |
|
|
322
|
+
| `bun run eval:review` | Render the corpus as a markdown review pack |
|
|
323
|
+
| `bun run eval:label` | Label the sample in a terminal |
|
|
324
|
+
| `bun run eval:audit` | Replay sampled facts against today's disk |
|
|
325
|
+
| `bun run eval:rules` | Print the rule tables and the promotion gate |
|
|
326
|
+
| `bun run eval:promote` | Add a measured row to `ACCEPTED_RULES` (v2 only) |
|
|
327
|
+
| `bun run eval:answers` | Freeze classifier answers for the sampled heads |
|
|
328
|
+
| `bun run eval:score` | Score a frozen answer file against the labels |
|
|
329
|
+
| `bun run eval:freeze` | Freeze the labeled corpus and write `report.md` |
|
|
330
|
+
|
|
331
|
+
### Eval corpora
|
|
332
|
+
|
|
333
|
+
There are two corpora, and they measure different populations.
|
|
334
|
+
|
|
335
|
+
- `evals/data` is frozen. It holds 1,446 legacy cases and 1,385 labels in three
|
|
336
|
+
timestamp passes (`pass1`, `pass2`, `pass3`). It never measured a declared
|
|
337
|
+
row, so `eval:rules --out evals/data` checks only that the frozen floor
|
|
338
|
+
(`names-batch-output`, `no-visible-link`) is still accepted and names any rule
|
|
339
|
+
this corpus never measured. Do not re-harvest it.
|
|
340
|
+
- `evals/data/v2` is the declared corpus. A case is declared when its raw
|
|
341
|
+
snapshot holds any item with a `description`, `refs`, or `produces` key. The
|
|
342
|
+
gate scores one candidate per decision: the **declared head**, the head
|
|
343
|
+
candidate that carries at least one `refs` or `produces` entry. A head with a
|
|
344
|
+
description only is a control. The gate measures each row against the control
|
|
345
|
+
subset, in two explicit passes (`v2-a`, `v2-b`), and prints `base: thin (n)`
|
|
346
|
+
below 30 controls.
|
|
347
|
+
|
|
348
|
+
Run the declared pipeline in order:
|
|
349
|
+
|
|
350
|
+
```bash
|
|
351
|
+
bun run eval:harvest:v2 --out evals/data/v2 --evidence evals/data/v2-evidence
|
|
352
|
+
bun run eval:facts --out evals/data/v2 --evidence evals/data/v2-evidence
|
|
353
|
+
bun run eval:sample --out evals/data/v2 --seed 7 --evidence evals/data/v2-evidence
|
|
354
|
+
bun run eval:label --out evals/data/v2 --pilot
|
|
355
|
+
bun run eval:label --out evals/data/v2 --pass v2-a
|
|
356
|
+
bun run eval:label --out evals/data/v2 --pass v2-b
|
|
357
|
+
bun run eval:audit --out evals/data/v2 --seed 7 --evidence evals/data/v2-evidence
|
|
358
|
+
bun run eval:rules --out evals/data/v2 --evidence evals/data/v2-evidence
|
|
359
|
+
bun run eval:freeze --out evals/data/v2 --evidence evals/data/v2-evidence
|
|
360
|
+
bun run eval:freeze --out evals/data/v2 --evidence evals/data/v2-evidence --report
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
The pilot sitting labels the 20 pilot cases as ordinary `pilot`-pass labels.
|
|
364
|
+
Each later sitting opens with ten blind repeats of them, written with
|
|
365
|
+
`pilot: true` and excluded from the gate; self-agreement below 90% discards the
|
|
366
|
+
sitting. The pilot never enters the gate.
|
|
367
|
+
|
|
368
|
+
`eval:facts` ends with the pre-flight verdict. When no behavior-changing row can
|
|
369
|
+
reach 10 firings per pass it prints `STOP:` and exits non-zero, so the label run
|
|
370
|
+
never starts against a corpus that cannot promote.
|
|
371
|
+
|
|
372
|
+
`eval:promote --out evals/data/v2` is additive: it writes the union of the
|
|
373
|
+
frozen old floor and the v2 accepted set, minus any row named by an explicit
|
|
374
|
+
`--remove`, minus any row two audit mismatches block. It refuses any corpus whose
|
|
375
|
+
manifest is not the declared format. An abstain row is reported, never promoted.
|
|
376
|
+
|
|
377
|
+
`evals/data/v2-evidence/` is a local audit trail, ignored by git: the manifest,
|
|
378
|
+
the sample ids, the gate cells, the audit rows, and `report.md`. The harvest,
|
|
379
|
+
sample, and audit steps replace each session file name with a stable
|
|
380
|
+
`session-<hash>` alias before they write there, the manifest keeps only list-name
|
|
381
|
+
counts, and the session root becomes `<SESSION-ROOT>`. `evals/data/v2/cases.jsonl`,
|
|
382
|
+
`facts.jsonl`, and `answers.*` stay local because they hold session text.
|
|
383
|
+
|
|
384
|
+
`evals/.gitignore` ignores all of `evals/data/` except `evals/data/synthetic/`.
|
|
385
|
+
`evals/privacy.test.ts` fails when git tracks any other file under `evals/data/`,
|
|
386
|
+
or a legacy `data-v2/` or `v2-evidence/` path.
|
|
308
387
|
|
|
309
388
|
## Project structure
|
|
310
389
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ftrdotdev/pi-tracker",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Session-persistent todolist extension for Pi",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"effect",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"todolist",
|
|
14
14
|
"tracker"
|
|
15
15
|
],
|
|
16
|
-
"homepage": "https://github.com/felixnorden/pi-mono
|
|
16
|
+
"homepage": "https://github.com/felixnorden/pi-mono/blob/main/packages/tracker/README.md",
|
|
17
17
|
"bugs": {
|
|
18
18
|
"url": "https://github.com/felixnorden/pi-mono/issues"
|
|
19
19
|
},
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"directory": "packages/tracker"
|
|
26
26
|
},
|
|
27
27
|
"files": [
|
|
28
|
+
"CHANGELOG.md",
|
|
28
29
|
"index.ts",
|
|
29
30
|
"src",
|
|
30
31
|
"README.md",
|
|
@@ -37,38 +38,48 @@
|
|
|
37
38
|
"scripts": {
|
|
38
39
|
"test": "vitest run",
|
|
39
40
|
"test:watch": "vitest",
|
|
41
|
+
"test:evals": "vitest run --config evals/vitest.config.ts",
|
|
40
42
|
"eval:harvest": "bun evals/harvest.ts",
|
|
43
|
+
"eval:harvest:v2": "bun evals/harvest.ts --format declared",
|
|
44
|
+
"eval:facts": "bun evals/facts.ts",
|
|
45
|
+
"eval:sample": "bun evals/sample.ts",
|
|
46
|
+
"eval:audit": "bun evals/audit.ts",
|
|
47
|
+
"eval:answers": "bun evals/answers.ts",
|
|
48
|
+
"eval:score": "bun evals/score.ts",
|
|
49
|
+
"eval:freeze": "bun evals/freeze.ts",
|
|
41
50
|
"eval:review": "bun evals/review.ts",
|
|
42
51
|
"eval:label": "bun evals/label.ts",
|
|
43
52
|
"eval:rules": "bun evals/rules.ts",
|
|
44
53
|
"eval:promote": "bun evals/promote.ts",
|
|
45
|
-
"lint": "oxlint
|
|
54
|
+
"lint": "oxlint",
|
|
46
55
|
"lint:fix": "oxlint --fix",
|
|
47
56
|
"fmt": "oxfmt",
|
|
57
|
+
"fmt:check": "oxfmt --check",
|
|
48
58
|
"typecheck": "tsc --noEmit"
|
|
49
59
|
},
|
|
50
60
|
"dependencies": {
|
|
51
|
-
"@
|
|
52
|
-
"@effect/platform-node
|
|
53
|
-
"@
|
|
54
|
-
"
|
|
61
|
+
"@earendil-works/pi-schema": "1.6.0",
|
|
62
|
+
"@effect/platform-node": "4.1.5",
|
|
63
|
+
"@effect/platform-node-shared": "4.1.5",
|
|
64
|
+
"@ftrdotdev/pi-tui": "^0.9.0",
|
|
65
|
+
"effect": "4.1.5"
|
|
55
66
|
},
|
|
56
67
|
"devDependencies": {
|
|
57
|
-
"@earendil-works/pi-tui": "1.
|
|
58
|
-
"@effect/tsgo": "0.
|
|
59
|
-
"@effect/vitest": "4.
|
|
68
|
+
"@earendil-works/pi-tui": "1.6.0",
|
|
69
|
+
"@effect/tsgo": "0.73.4",
|
|
70
|
+
"@effect/vitest": "4.1.5",
|
|
71
|
+
"@ftrdotdev/pi-test-kit": "0.0.0",
|
|
60
72
|
"@types/bun": "latest",
|
|
61
|
-
"oxfmt": "
|
|
62
|
-
"oxlint": "1.
|
|
63
|
-
"oxlint-tsgolint": "7.0.
|
|
73
|
+
"oxfmt": "0.80.0",
|
|
74
|
+
"oxlint": "1.94.0",
|
|
75
|
+
"oxlint-tsgolint": "7.0.2008",
|
|
64
76
|
"typescript": "7.0.2",
|
|
65
|
-
"vitest": "^
|
|
77
|
+
"vitest": "^5.1.0"
|
|
66
78
|
},
|
|
67
79
|
"peerDependencies": {
|
|
68
80
|
"@earendil-works/pi-ai": "*",
|
|
69
81
|
"@earendil-works/pi-coding-agent": "*",
|
|
70
|
-
"@earendil-works/pi-tui": "*"
|
|
71
|
-
"typebox": "*"
|
|
82
|
+
"@earendil-works/pi-tui": "*"
|
|
72
83
|
},
|
|
73
84
|
"pi": {
|
|
74
85
|
"extensions": [
|