worktrust 0.10.35 → 0.10.37

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/AGENTS.md CHANGED
@@ -7,7 +7,7 @@ the rules of this package.
7
7
 
8
8
  ## Do not run it for the person
9
9
 
10
- The bare `worktrust` command, `connect`, `update`, `history` (and `--rebuild`), `disconnect`, `protect-key`, `preserve`, `codex`, `antigravity` and the
10
+ The bare `worktrust` command, `connect`, `update`, `self-update`, `history` (and `--rebuild`), `disconnect`, `protect-key`, `preserve`, `codex`, `antigravity` and the
11
11
  import commands change what this computer sends or couples. **Only the person runs them, in their own terminal.** In an
12
12
  agent's shell the CLI refuses these actions, `--yes` included. Version 0.10.12 adds the missing default-command
13
13
  guard and tests both fresh and coupled synthetic homes. Do not work around the policy: do not unset
package/README.md CHANGED
@@ -1,5 +1,35 @@
1
1
  # worktrust
2
2
 
3
+ ## 0.10.37: an export arrives whole; progress, Ctrl+C and the reason in WorkTrust's words; CLI active and updating itself
4
+
5
+ An export send no longer stops at WorkTrust's upload budget per minute: the person's own send waits it out (at most 90
6
+ seconds a wait) and goes on, and a batch WorkTrust stored in part is sent again at once until it holds every line; a line
7
+ already received is kept once. Every long step shows how far it is, and Ctrl+C stops cleanly, keeping what has not arrived
8
+ for the next run. A batch that did not arrive is said in WorkTrust's own words instead of "Not all of it arrived". The
9
+ receipt after an export names its hours as reconstructed by WorkTrust, beside the measured ones, never as measured.
10
+ CLI active per computer: a pause set in Sources › Devices is kept by the computer at its next session, and turning it back
11
+ on lets the computer update itself, verified (SECURITY.md, "Updating itself when you turn it on"). A computer on 0.10.36
12
+ or older updates once by hand: `npx worktrust@latest update`. What is measured is unchanged: the measure rules stay 3.
13
+
14
+ ## 0.10.36: large and cut-off ChatGPT exports; hours only with `mcp off`; a re-measure reported whole or not at all
15
+
16
+ `npx worktrust history --export` now reads a ChatGPT export of any size: a zip64 archive (an export over 4 GB), and a
17
+ download that stopped part way, which is read up to the last whole `conversations-NNN.json` part and said as such ("The
18
+ archive was cut off after conversations-NNN.json; this is not the whole export"), so you decide whether to send what was
19
+ read before the cut. ChatGPT's loose `conversations-NNN.json` parts, a folder of them or one part beside its siblings, are
20
+ read as one export in part order; a missing part is refused by its name. An empty element in an export is counted and
21
+ left out instead of refusing the whole export. What is sent from an export is unchanged: hours and tokens per day, never
22
+ text. (The reader can also count an export's file kinds, searches and model switches between model families, but nothing
23
+ asks for them and nothing of them is sent.)
24
+
25
+ `npx worktrust mcp off` keeps the hours and takes the WorkTrust door out of every AI app here; `mcp on` puts it back (see
26
+ "Hours only, or also work lines" below). A choice made for this computer in Sources › Devices is done by the computer
27
+ at its next session. `update` no longer takes Codex's door out on every second run at the same version.
28
+
29
+ A re-measure says "Re-measured" only when WorkTrust holds every batch of the run; otherwise it says how many it holds and
30
+ gives WorkTrust's own reason for a refused batch, and the session hook exits with an error. What is measured is
31
+ unchanged, so the measure rules stay 3 and no re-measure is offered.
32
+
3
33
  ## 0.10.35: Gemini CLI read; every earlier line can name its AI app
4
34
 
5
35
  Gemini CLI's sessions are read in place, as Copilot's are: the files Gemini CLI records itself under
@@ -287,9 +317,23 @@ npx worktrust@latest history --from-folder <dir> your own copy of an AI app's
287
317
  npx worktrust codex let Codex wake the session hook (asks first)
288
318
  npx worktrust antigravity let Antigravity wake the session hook (asks first)
289
319
  npx worktrust@latest status what is coupled here
320
+ npx worktrust mcp off hours only: the WorkTrust door out of every AI app here, so nothing of WorkTrust loads into
321
+ your sessions; the session hook keeps measuring your hours, and update leaves the door out
322
+ npx worktrust mcp on the door back in: your AI may also log finished work (about 40 tokens per session); nothing
323
+ from the time it was off is sent
324
+ npx worktrust mcp which of the two this computer is in (and whether a claude.ai WorkTrust connector also loads)
290
325
  npx worktrust@latest disconnect take it out again (shows the plan, asks first)
291
326
  ```
292
327
 
328
+ **Hours only, or also work lines.** Your passport's hours come from the session hook, which reads your AI apps' own
329
+ session files; it needs no WorkTrust door in the apps. The door adds one thing: your AI's own `log_work` line at the end
330
+ of a piece of work, and for that its short instruction (and, in apps that load every tool up front, its tool
331
+ definitions) is loaded into every session. `connect` asks which you want (Enter keeps the door, as before); an update
332
+ asks once on a computer coupled before. The choice lives in `~/.worktrust/door.json` (0600). The hook tells WorkTrust
333
+ the mode beside the CLI version, one word, so Sources › Devices can show "work lines off" instead of an unexplained gap.
334
+ If Claude Code has also been connected to a WorkTrust connector of your claude.ai account, the CLI says so once: keep
335
+ the local door (it carries this computer's key) and remove the other at claude.ai/customize/connectors.
336
+
293
337
  ## Keep your history
294
338
 
295
339
  **Why.** Your AI apps decide how long your history lives, and several delete it on their own schedule:
@@ -326,7 +370,9 @@ agent runs it makes no difference: `preserve` writes to your own user's places (
326
370
  `~/AI-Evidence`), so every terminal and agent on this computer under your user reaches the same archive, and lines
327
371
  from different versions sit side by side, each naming the version that measured it. Another user on the same computer
328
372
  gets an archive of their own. A coupled computer's session hook runs from its own copy in `~/.worktrust` and changes
329
- only with `npx worktrust@latest update`; the WorkTrust app says when a newer version is out.
373
+ with `npx worktrust@latest update`, or (from 0.10.37, installed from npm) when you turn CLI active back on for that
374
+ computer in WorkTrust › Sources: it then updates itself, verified, the next time WorkTrust runs there (SECURITY.md,
375
+ "Updating itself when you turn it on"). The WorkTrust app says when a newer version is out.
330
376
 
331
377
  **One command walks it all.** `npx worktrust@latest preserve` shows the report, asks `Keep these settings? [y/N]`
332
378
  (then does what `--apply` does), asks `Keep a local archive in ~/AI-Evidence? [y/N]` (then does what `--archive`
package/SECURITY.md CHANGED
@@ -12,7 +12,8 @@ private transcripts or account data in a public issue.
12
12
  The complete official release is required. Individual script download fallbacks are removed;
13
13
  interactive commands may check for a newer release.
14
14
  - Submissions go to the configured WorkTrust MCP endpoint. Interactive commands can also contact
15
- the npm registry for a version notice. Release notices never execute a different version. The npm package bundles its runtime
15
+ the npm registry for a version notice. Release notices never execute a different version; the one exception is the verified update when
16
+ you turn the CLI back on in Sources (below). The npm package bundles its runtime
16
17
  modules, but package-manager installation and explicit upgrades still use the network. `preserve` itself is local.
17
18
  A custom `--origin`, URL or registry override changes whom you trust.
18
19
  - The key it receives is a WorkTrust coupling for this computer: it can submit work metadata to your
@@ -132,6 +133,67 @@ artifact was built from reviewed source. `npm audit signatures` can inspect an i
132
133
  tree; verification coverage and failures must be reported for that actual installation.
133
134
 
134
135
 
136
+ ## Updating itself when you turn it on (0.10.37)
137
+
138
+ This is the one place the CLI installs and runs a newer version without you typing a command. It exists because you
139
+ asked for it in the app: when you switch **CLI active** back on for a computer in WorkTrust › Sources, that computer
140
+ brings itself to the newest published CLI. A registry version string alone never starts it (the interactive notice
141
+ above still only tells you), and `npx worktrust update` is unchanged.
142
+
143
+ - **When.** WorkTrust asks for it only after your own act: turning CLI active on, under your signed-in session (with
144
+ your second factor when your account has one), for a computer whose CLI had confirmed it was paused. WorkTrust then
145
+ records one instruction for that computer; a pause clears it, a computer that never paused gets none. The hook reads it
146
+ with the computer's own signed key (`api/cli/door`) as `update: { version, at }`; `at`, the moment you turned it on,
147
+ is its id. The CLI takes an id once (`~/.worktrust/update.json`, 0600), never while paused, never one dated more than
148
+ five minutes past the door's own clock (its `Date` header), and, after an attempt that did not install, none for 24
149
+ hours. The "only after your turn-on" rule is WorkTrust's server's: the computer cannot see your act, so it does not
150
+ rely on it (next point).
151
+ - **Which version, decided on the computer.** It installs only a version that is newer than itself (`current`
152
+ otherwise: no downgrade) AND that npm's own registry record lists as `dist-tags.latest` and does not deprecate,
153
+ whatever version the door names. A version the console classes critical is deprecated on npm as well
154
+ (tools/worktrust-release/README.md), so a computer refuses it even if a server named it.
155
+ - **npm 11.12.0 or later.** `npm audit signatures --include-attestations` first appears there. The CLI uses the npm beside
156
+ the running Node (its own installation), else the first one on PATH, asks `npm --version` first, and with an older
157
+ npm, or none, reports `unsupported` before anything is fetched: update npm, or run the command.
158
+ - **What runs, implicitly.** Detached from the hook (which returns at once and prints nothing), under a lock:
159
+ 1. `npm --version` and `npm view worktrust@<version> --json --registry=https://registry.npmjs.org/` (the policy above);
160
+ 2. `npm install --ignore-scripts --registry=https://registry.npmjs.org/ worktrust@<version>` into a new staging folder
161
+ under `~/.worktrust/update-stage` (no lifecycle script of the package runs);
162
+ 3. `npm audit signatures --json --include-attestations` in that folder;
163
+ 4. after all checks below hold: the package is copied into `~/.worktrust/verified/<identity>` (as every update does)
164
+ and that new launcher, which verifies itself before importing anything, runs `update --yes`. That command may renew
165
+ this computer's key (the weekly signed renewal), takes WorkTrust's door out of and back into each app you agreed to
166
+ (Claude Code through `claude mcp remove` and `claude mcp add`; the other apps' config files rewritten; if the add
167
+ does not finish, the files it took out are written back as they were and Claude Code's entry is put back), refreshes
168
+ the session hook and the Codex and Antigravity wake lines you agreed to, reports its version to WorkTrust, and, when
169
+ the measure rules changed, counts this computer's sessions for the re-measure offer and sends none of them (the
170
+ offer's default is No). Nothing new is coupled and no history is sent.
171
+ The staging folder is removed afterwards (a folder that cannot be removed is logged, never a failure). Agent-shell
172
+ markers are left out of these processes' environment because the act is yours from Sources; `self-update` typed in
173
+ an agent's shell is refused like every person-only command.
174
+ - **The trust root, none of it WorkTrust's server.** (a) npm's registry signature for that exact version and integrity,
175
+ and (b) the npm provenance attestation: both VERIFIED BY NPM (registry keys; Sigstore's root, certificate chain and
176
+ transparency log) and relayed to the CLI by `npm audit signatures`; the CLI then binds what npm verified: the
177
+ certificate must name `https://github.com/fhomey/worktrust-cli/.github/workflows/publish.yml@refs/tags/v<version>`, its
178
+ Fulcio extension 1.3.6.1.4.1.57264.1.8 must hold GitHub Actions' OIDC issuer exactly, its DSSE signature must verify
179
+ under that certificate, its subject must be this tarball's sha512, and its workflow, repository and tag must match.
180
+ (c) WorkTrust's own release signature (`package-release.json`) under the key pinned in the CLI already installed is
181
+ the binding root: it does not depend on npm's word or on WorkTrust's server. The registry is forced to
182
+ registry.npmjs.org for every npm call, so a configured mirror cannot supply its own keys or record. A compromised
183
+ WorkTrust server can still send an instruction at a moment of its choosing; what a computer then installs is only the
184
+ release npm currently lists as latest and does not deprecate, newer than its own, with that provenance and that
185
+ release signature.
186
+ - **What falls back to the command.** A Python installation (pip, pipx, uv, uvx) does not update itself (`python`), and
187
+ neither does a computer without npm 11.12 or later, or a CLI not started from its verified npm copy (`unsupported`).
188
+ Sources then says what to do, with the command. A computer on 0.10.36 or older has no updater: update it once by hand.
189
+ - **When something fails.** Nothing new runs and the running CLI stays as it was. The next door call reports a code
190
+ beside the version, `worktrust-update/<installed|current|python|unsupported|unverified|failed>.<id>`, never content;
191
+ the reason stays in `~/.worktrust/update.log` on this computer (versions, codes, a short npm message; no key). An
192
+ outcome is written only for the instruction that started it. An attempt that has not finished in half an hour is
193
+ reported `failed`, once. `worktrust status` names the outcome.
194
+ - **What it does not establish.** As above: signatures and provenance tie the bytes to the reviewed publish workflow;
195
+ they do not prove truthful activity, and a process running as you can still change files after a check.
196
+
135
197
  ## The WorkTrust mod for Claude Code (0.10.15, opt-in)
136
198
 
137
199
  `worktrust mod install` asks, then writes a Claude Code plugin to `~/.worktrust/claude-mod` and names