worktrust 0.10.30 → 0.10.32
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/README.md +55 -6
- package/SECURITY.md +13 -0
- package/engine-release.json +1 -1
- package/log-session.mjs +428 -55
- package/package-release.json +1 -1
- package/package.json +1 -1
- package/stretch-evidence.mjs +1 -1
- package/transcript-readers.mjs +125 -5
- package/worktrust.mjs +73 -24
package/README.md
CHANGED
|
@@ -1,5 +1,53 @@
|
|
|
1
1
|
# worktrust
|
|
2
2
|
|
|
3
|
+
## 0.10.32: a re-measure sends only the days that changed; which subagents were active at once; each call's outcome
|
|
4
|
+
|
|
5
|
+
Before a re-measure sends anything, the CLI asks WorkTrust, once per AI app, which of this computer's days it holds as
|
|
6
|
+
current. The question carries nothing but the question (`import_history` with `rebuild` and `fingerprint`, no line).
|
|
7
|
+
The answer is the digest this computer sent with each such day, its own submission and never the record: no hours, no
|
|
8
|
+
lines, no figure. A day whose digest on this computer is the same is not sent, so a re-run with nothing new sends
|
|
9
|
+
nothing and says so; one changed day sends that day alone. If the answer is not one (an older WorkTrust, an error, no
|
|
10
|
+
network), every day is sent as before. The digest covers each line as it is sent, without the CLI's own version, so
|
|
11
|
+
an update that measures the same sends nothing. When WorkTrust names where the run waits, the command prints
|
|
12
|
+
`queued, position N, about M min`.
|
|
13
|
+
|
|
14
|
+
A Claude Code session's subagents (the transcripts Claude Code keeps in `<session>/subagents/`) now travel with the day's
|
|
15
|
+
stretch as `agents`: per run, by position only, its kind (`builtin`, `own` for an agent type of your own, `background`,
|
|
16
|
+
`fork`, read from the run's `.meta.json`), when it started in whole seconds from the stretch's start, the stretches of time
|
|
17
|
+
it was active (a gap over five minutes ends one) and how many of its tool steps failed and how many of those a later step
|
|
18
|
+
of the same kind recovered. Never a name, a prompt, a path, a tool or an id. At most 64 runs a stretch, 12 active stretches
|
|
19
|
+
a run and 256 in all; the longest are kept. WorkTrust counts a run only while the session it belongs to is steered by you
|
|
20
|
+
(within 8 hours of your last input), and shows how many agents were active at once beside the sessions at once; it is never
|
|
21
|
+
added to your hours.
|
|
22
|
+
|
|
23
|
+
Beside the timeline, each model answer's outcome travels as one character (`call_outcomes`: completed, failed or not
|
|
24
|
+
known), and in a run no person started (headless or scheduled) the length of each of your own turns as a bucket
|
|
25
|
+
(`input_lengths`: short, medium or long) and, when a timer started the run, its cadence word with an opaque reference
|
|
26
|
+
(`schedule_cadence`, `schedule_ref`). Never a word, a command, a path or the timer's name. WorkTrust credits Agentic Hours
|
|
27
|
+
only for calls recorded as completed.
|
|
28
|
+
|
|
29
|
+
The measure rules go to 2, so `update` offers a re-measure once, naming these changes.
|
|
30
|
+
|
|
31
|
+
The session hook no longer reads a Claude Code transcript from its first byte on every run. Beside each session's
|
|
32
|
+
watermark in `~/.worktrust/sessions.json` it keeps where its last read ended: the file's identity (device and inode), the
|
|
33
|
+
offset, a hash of eight 4 KB samples before it, the offset of the first message not yet sent, and what a full read would
|
|
34
|
+
know at that point (the session's working folder, how it was started, a subagent's first moment). That stays on this
|
|
35
|
+
computer and is never sent. The next run reads from the first unsent message, so a day that spans the offset is read
|
|
36
|
+
again from its start, and gives exactly what a full read gives. A file that was truncated, rewritten, replaced or
|
|
37
|
+
compacted, a new CLI version, other measure rules, or a state without positions is read whole, as before. A re-measure
|
|
38
|
+
(`history`, `history --rebuild`, the offer after an update) always reads everything. Measured: 1 MB appended to a 600 MB
|
|
39
|
+
transcript reads about 1 MB.
|
|
40
|
+
|
|
41
|
+
## 0.10.31: a re-measure is offered only when measuring changed
|
|
42
|
+
|
|
43
|
+
`update` offers to re-measure this computer's sessions only when the new version MEASURES differently from the one it
|
|
44
|
+
replaces: a different timeline, seconds, tokens, steering, session kinds or readers. A release that changes something
|
|
45
|
+
else (consent, coupling, words) offers nothing. The offer lists what changed, one line each. The CLI carries the
|
|
46
|
+
version of its measuring rules beside its own version and records it in `~/.worktrust/installed-release.json` and
|
|
47
|
+
`~/.worktrust/history.json`; an install from before 0.10.31, which did not record it, counts as measuring by 0.10.29's
|
|
48
|
+
rules, so 0.10.29 or 0.10.30 updated to 0.10.31 is offered nothing. A history sent completely by a version with the
|
|
49
|
+
same rules counts as done, so the bare `npx worktrust` does not offer it again either.
|
|
50
|
+
|
|
3
51
|
## 0.10.30: an update asks only what is new
|
|
4
52
|
|
|
5
53
|
`update` remembers what you said yes to. Each AI app's WorkTrust door, the session hook, Codex's `notify` line and
|
|
@@ -363,10 +411,11 @@ sends them with one difference: WorkTrust **replaces** this computer's earlier l
|
|
|
363
411
|
token counts, model names, a layer keyword, counts; never text.
|
|
364
412
|
- **Only from this computer's own key.** A connector (an AI signed in on the web) cannot ask for a rebuild; WorkTrust
|
|
365
413
|
refuses it at the door.
|
|
366
|
-
- **Offered once by `update`.** When this computer's earlier lines were
|
|
367
|
-
`~/.worktrust` says which), `npx worktrust@latest update` says so in
|
|
368
|
-
(0.10.30); Enter and `--yes` are No, `--rebuild`
|
|
369
|
-
|
|
414
|
+
- **Offered once by `update`.** When this computer's earlier lines were measured by other rules (the copy in
|
|
415
|
+
`~/.worktrust` says which; 0.10.31: the measuring rules, not the version), `npx worktrust@latest update` says so in
|
|
416
|
+
plain words, lists what changed, shows the plan and asks once (0.10.30); Enter and `--yes` are No, `--rebuild`
|
|
417
|
+
agrees in advance, and a version that measures as the one before offers nothing. The command cannot read your
|
|
418
|
+
record, so it is an offer, not a finding.
|
|
370
419
|
|
|
371
420
|
## A web chat's data export
|
|
372
421
|
|
|
@@ -489,9 +538,9 @@ retried safely. A row kept pending on WorkTrust remains excluded from counted ac
|
|
|
489
538
|
| | |
|
|
490
539
|
|---|---|
|
|
491
540
|
| **Reads** | Which AI apps are installed (the settings folders of Claude Code, Codex, Cursor, Gemini CLI, Antigravity, VS Code, Windsurf, Hermes Agent, Goose, OpenCode, OpenClaw), and the chats Cursor and Copilot keep (clocks, models and token counts only). Afterwards, the session hook reads Claude Code's, Codex's and Antigravity's session files, the session databases of Hermes, Goose, OpenCode and OpenClaw, and the chats Cursor and Copilot keep, on this computer to measure durations and token counts. |
|
|
492
|
-
| **Writes** | The key file (above). In each AI app's MCP settings (`~/.claude.json` through `claude mcp`, `~/.cursor/mcp.json`, `~/.codex/config.toml`, `~/.gemini/settings.json`, `~/.gemini/config/mcp_config.json` (Antigravity), VS Code's `mcp.json`, Windsurf's `mcp_config.json`, Hermes's and Goose's `config.yaml`, OpenCode's `opencode.json`, OpenClaw through `openclaw mcp set`) a WorkTrust entry that runs the local bridge, with no key in it;
|
|
541
|
+
| **Writes** | The key file (above). In each AI app's MCP settings (`~/.claude.json` through `claude mcp`, `~/.cursor/mcp.json`, `~/.codex/config.toml`, `~/.gemini/settings.json`, `~/.gemini/config/mcp_config.json` (Antigravity), VS Code's `mcp.json`, Windsurf's `mcp_config.json`, Hermes's and Goose's `config.yaml`, OpenCode's `opencode.json`, OpenClaw through `openclaw mcp set`) a WorkTrust entry that runs the local bridge, with no key in it; four hooks in `~/.claude/settings.json` (SessionStart, SessionEnd, PreCompact and, since 0.10.32, Stop, which sweeps at most once an hour); the bridge, the hook and the counter in `~/.worktrust/`; and `~/.worktrust/consent.json`, what you agreed to (names and days only, 0.10.30). |
|
|
493
542
|
| **Sends, to pair** | This computer's system (macOS, Windows, Linux) and host name. WorkTrust also records the network address the request arrives from, as a security record kept 90 days and seen only by WorkTrust staff (to answer a theft or fraud report). |
|
|
494
|
-
| **Sends, afterwards** | Per measured stretch of work, and nothing else: its timeline and basis (`timeline`, `duration_basis`: since 0.10.20 the CLI sends no duration and no hours in layers of its own; WorkTrust computes them from the timeline), token counts (`tokens_in`, `tokens_out`, `tokens_cache_read`, `tokens_cache_write`, `token_basis`), the model's name (`model`), the kind of work and one layer keyword such as frontend or backend (`title`, `kind`, `layer`, `layers`), closed technology keys (`stack`) and separate display-only tool keys (`tools_seen`), how the turns are counted (`turn_basis`; the counts themselves WorkTrust reads from the timeline
|
|
543
|
+
| **Sends, afterwards** | Per measured stretch of work, and nothing else: its timeline and basis (`timeline`, `duration_basis`: since 0.10.20 the CLI sends no duration and no hours in layers of its own; WorkTrust computes them from the timeline), token counts (`tokens_in`, `tokens_out`, `tokens_cache_read`, `tokens_cache_write`, `token_basis`), the model's name (`model`), the kind of work and one layer keyword such as frontend or backend (`title`, `kind`, `layer`, `layers`), closed technology keys (`stack`) and separate display-only tool keys (`tools_seen`), how the turns are counted (`turn_basis`; the counts themselves WorkTrust reads from the timeline), the subagent runs that started in the stretch, by position only (`agents`, since 0.10.32: per run its kind, builtin, own, background or fork, its start and active intervals in whole seconds from the stretch's start, and its tool failures and recoveries as counts; never a name, a prompt, a path or an id; at most 64 runs, 12 intervals a run, 256 in all), when it began and ended and your computer's offset from UTC (`started_at`, `at`, `utc_offset`), what the CLI derived from the stretch as kinds and counts (`evidence`: checks run and failed, delivery steps and whether a check passed first, recoveries, delegation, context, routing, steering, refusals, planning, files and test files changed, the complexity class; with the WorkTrust mod on, its `live` counts from inside Claude Code: permission answers, effort levels, context and plan-limit peaks, subagents and setup; never a word, a command or a path; since 0.8.3, `live` since 0.10.15), a hash of the session and the day (`stretch_ref`), `steered_from` when it ran over SSH, the stretch's clock as step kinds and whole seconds so WorkTrust computes the figures itself (`timeline`, since 0.10.20: never a word, a tool name or a path), how the session was started as the AI app recorded it, beside the timeline (`session_kind`: interactive, headless or scheduled, since 0.10.29; left out when the app did not say), each model answer's outcome as one character, completed, failed or not known (`call_outcomes`, since 0.10.32), and in a run no person started the length of each of your turns as a bucket (`input_lengths`) and a timer's cadence word with an opaque reference (`schedule_cadence`, `schedule_ref`), the CLI's version and a digest of its own files as signals (`cli_version`, `cli_digest`), and, so the work can be matched to GitHub, the repository as its remote's owner/name (`repo`, only for a repository on GitHub, GitLab or Bitbucket, the hosts WorkTrust can couple; never one on your own or a client's server), for any other git repository a code in its place (`repo_code`: 16 hex of an HMAC of its remote, or its root, keyed with this computer's own secret in `~/.worktrust/archive-salt`, which is never sent, so WorkTrust can group its lines but cannot tell which repository it is) and the hashes of the commits made in the stretch (`commits`, never their messages). With a re-measure (0.10.32), each batch also carries a digest of each day it holds as this computer computed it (`days`: a date and 64 hex, never a line), the question before it asks only for the digests this computer sent before, and a count of transcripts this computer could not read rides beside that question (`unreadable`: a number, never which file). |
|
|
495
544
|
| **Never sends** | Prompts, answers, code, file names or paths, commit messages, branch names, or the name of your local folder (a repository is named only as its remote's owner/name, above). The door has no field for them and refuses a submission that carries them. |
|
|
496
545
|
|
|
497
546
|
**The clock is WorkTrust's, not this computer's (0.10.20).** A measured stretch travels as its timeline: one step per
|
package/SECURITY.md
CHANGED
|
@@ -73,6 +73,19 @@ private transcripts or account data in a public issue.
|
|
|
73
73
|
here, a wake hook); it cannot widen what is written, sent or read. An unreadable or unsafe file counts as no agreement.
|
|
74
74
|
- A No drops the entry it answered; `disconnect` deletes the file; a coupling to another account starts it empty.
|
|
75
75
|
|
|
76
|
+
## The question before a re-measure (0.10.32)
|
|
77
|
+
|
|
78
|
+
Before a re-measure, the hook asks the door, per AI app, which days of this computer WorkTrust holds as current. The
|
|
79
|
+
request is `import_history` with `rebuild: true, fingerprint: true` and nothing else: no line, no hours, no path. It
|
|
80
|
+
goes under the computer's own key and, on a bound computer, with its device proof, like every history batch. The
|
|
81
|
+
answer is a list of UTC days and, for each, the 64-hex digest this computer sent with that day: digests of its own
|
|
82
|
+
submissions, never a line, a figure or anything of the record. A digest is computed here from what this computer would
|
|
83
|
+
send; a day that matches is not sent again. An answer that cannot be read means not known, and every day is sent.
|
|
84
|
+
|
|
85
|
+
When a transcript on this computer exists but cannot be read (permissions, a disk error), the hook counts it, keeps the
|
|
86
|
+
count in `~/.worktrust/sessions.json`, shows it in `npx worktrust status`, and at most once a day asks the same question
|
|
87
|
+
with the count beside it (`unreadable: N`): a number, never which file, its path or anything in it.
|
|
88
|
+
|
|
76
89
|
## What measurement signatures establish
|
|
77
90
|
|
|
78
91
|
The metadata journal introduced in the 0.10.21 candidate preserves observations, not their
|
package/engine-release.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"keyId":"608168ccdef72562fc91f9c0f9f2c2d6876bece7f7362cb545b818f7947da6b5","payload":{"files":{"chat-exports.mjs":"04eafe333940ec03d5058d8d51062124aa12ab882bf04db03bcda5613ec69298","claude-mod.mjs":"02d86b0cdddf39879efc5194c0a5be6b41456faedec28963dc123a4e88dc3942","config-edits.mjs":"0eba2f176ef6f7afba071d6e00de0ff19ba2b283180a801dfd957aa38c1edd94","count-behaviour.mjs":"1beaec2a4d0aead76d166f89cc52441a9cf48f2e69da9888ca2091dd3a10a37b","credential-store.mjs":"a4b3540a61f4ce19e535c7f1d260c0d817686cd066d559a76db2ab108144abba","credential-vault-scripts.mjs":"7e42fe1db3885c2dec6f1de87bebfbefe2292d29179a68f3da87d19eb6c7704b","credential-vault.mjs":"279baabb217e2a3f170e8d7f2b271a88484531f9031c441360ea91561a70da99","history-outbox.mjs":"b84e22542bb2d8195a469ee5f4116356ae9eac4a53ff2d40f0268b5b1de99dc5","log-session.mjs":"
|
|
1
|
+
{"keyId":"608168ccdef72562fc91f9c0f9f2c2d6876bece7f7362cb545b818f7947da6b5","payload":{"files":{"chat-exports.mjs":"04eafe333940ec03d5058d8d51062124aa12ab882bf04db03bcda5613ec69298","claude-mod.mjs":"02d86b0cdddf39879efc5194c0a5be6b41456faedec28963dc123a4e88dc3942","config-edits.mjs":"0eba2f176ef6f7afba071d6e00de0ff19ba2b283180a801dfd957aa38c1edd94","count-behaviour.mjs":"1beaec2a4d0aead76d166f89cc52441a9cf48f2e69da9888ca2091dd3a10a37b","credential-store.mjs":"a4b3540a61f4ce19e535c7f1d260c0d817686cd066d559a76db2ab108144abba","credential-vault-scripts.mjs":"7e42fe1db3885c2dec6f1de87bebfbefe2292d29179a68f3da87d19eb6c7704b","credential-vault.mjs":"279baabb217e2a3f170e8d7f2b271a88484531f9031c441360ea91561a70da99","history-outbox.mjs":"b84e22542bb2d8195a469ee5f4116356ae9eac4a53ff2d40f0268b5b1de99dc5","log-session.mjs":"35d01fb00a472c022560a880c0863b57f24cb8311040bba21c3f0cf903b9074c","orchestration-contract.mjs":"ec08f303a166365b99e70b675de4cfe76c6156c2567e14b5569f6d992f0231b7","orchestration-evidence.mjs":"d0d06cecf0eb08e5c6e653c62a4f45b1eddf2119c2acb8341056b34f488d214a","orchestration-report.mjs":"d4e0a9ad8e4a01b462d22c6b1866aac291565c533ff476085d3367cb6d59bc1b","package-integrity.mjs":"a8210c9494a56bfb9a5ea3d10064c7a269f0b6330c0af7c0700e706c3c0224e3","preserve-lines.mjs":"2df64a69687aa51219bf7b86b88d175cc50990fa29574b31897e41a9ebeecf43","preserve-summary.mjs":"137f781ed7021596a3f0ea67afcf2ab8616ac293f833dbb8f176e838e0ed8321","preserve.mjs":"3e369083ba43bcda2fa0622fd526aa64fcf8ad66e7b6e8f23821752c4d47ad27","runtime-install.mjs":"aab47b52c79d726ef428a24f982c648fa3f1c2dc2b574f633611d02924864e5f","session-databases.mjs":"543fd3b82d28d96d789be0a1dc9186c5fafa783e98b87e5b3b17b211542e2b4d","setup-mcp.mjs":"0c29113179561af1c1e9ff8b7a786e7240edf48a2244993e12335e5ee362c812","stack-rules.mjs":"b23c56e72ec56ba02b17ed895f869172d988c468a697e8d6026b0e268f61e489","stretch-evidence.mjs":"5f5667b92adf11b1a5a6330a0f26dd6db73d56fe60823d9a5246dab71d27d380","transcript-readers.mjs":"ed6fef364aa28f39361d8f627abcda2162498cbaa13e90cc5860a768cb355fa2","worktrust-launch.mjs":"84801bd29d472d48188c126b9ebe3989a3132b54e13cc4fe534ff7c383a294ee","worktrust.mjs":"0e481fde109620dd23f750d7b9b0741c0ea831c45961a176164ef2a74f3dd7c0"},"format":"worktrust-package/1","kind":"engine","version":"0.10.32"},"signature":"j7kCqXaW7lS8jyExo_Ag4eCHLtVYFSMIOJY745sZrrFyRTOfOc59k8kYFKCST-KMkQQctNK9QuLZAox_1UzwDQ"}
|