@plurnk/plurnk-digest 3.2.3 → 3.2.5

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 CHANGED
@@ -7,7 +7,7 @@ Start at `digest.md`: its turn tables link input, output, reasoning and every ph
7
7
  Request pages link to adjacent turns and expose failures, admission and native attachment
8
8
  descriptors; `requests/<id>.md` shows the available provider evidence and accounting.
9
9
 
10
- Read `<worker>-<loop>-<turn>.request.md` for the model's ordered text input, with each message's
10
+ Read `<session>-<loop>-<turn>.request.md` for the model's ordered text input, with each message's
11
11
  role and complete body. The digest names its role sequence beside each turn. `.assistant.md`
12
12
  is that turn's **output**, not its input history; `.system.md` and `.user.md` are role-filtered
13
13
  extracts. `.wire.json` contains the same ordered text input, not an HTTP capture.
@@ -32,7 +32,7 @@ Neither path overwrites existing reports. An interview additionally requires an
32
32
  `provider`: `Digest.requiem({ dbPath, digestDir, openEvidence, provider })`; `Share.write`
33
33
  accepts that provider as `requiem`. No route is selected and no inference occurs implicitly.
34
34
 
35
- The service CLI is `plurnk-service share [database] [folder] [--requiem]`; database and
35
+ The service CLI is `plurnk-service share [database] [folder] [--workspace=<id>] [--requiem]`; database and
36
36
  share-directory selection are service-owned. See [SPEC.md](./SPEC.md) for evidence ownership,
37
37
  artifact fidelity and reader lifetime. [.env.defaults](./.env.defaults) owns the interview
38
38
  allowances, `PLURNK_DIGEST_REQUIEM_MAX_TOKENS` and `PLURNK_DIGEST_REQUIEM_RETRY_MAX_TOKENS`.
package/SPEC.md CHANGED
@@ -1,228 +1,50 @@
1
1
  # Forensic reports
2
2
 
3
- The report package owns artifact generation, SQLite snapshots and requested model interviews.
4
- The host supplies the evidence reader and selects any interview provider; the package never boots
5
- or imports the daemon.
3
+ The report package (`@plurnk/plurnk-digest`) owns artifact generation, SQLite snapshots, and requested model interviews. The host supplies the evidence reader and selects any interview provider; the package never boots or imports the daemon.
6
4
 
7
- ## Evidence boundary
8
-
9
- §digest-evidence-reader **Interpret once, render independently.**
5
+ ## §digest-evidence-reader 1. Evidence Boundary
10
6
 
11
7
  | Owner | Responsibility |
12
- |---|---|
13
- | Core `EvidenceReader`, exported at `@plurnk/plurnk-service/evidence` | Package-owned SQL, stored-packet validation, canonical wire and address projection, canonical request accounting, packet-echo classification and text weight. |
14
- | `@plurnk/plurnk-digest` | Typed read interface, report selection/grouping, Markdown/JSON/artifacts, consistent snapshots and out-of-band interviews. No dependency on core or its private types. |
15
- | Composition (CLI, daemon, harness) | Database/output paths and an explicit provider when an interview is requested. |
16
-
17
- `openEvidence(path)` returns a disposable reader. `rows()` supplies the relational census and
18
- durable source rows; packet, response and transport bodies are fetched individually. A packet view exposes canonical
19
- text slots and messages without publishing the stored packet algebra. The reader caches at most
20
- one packet. No connection or stored statement escapes it. Report failure closes the reader;
21
- interviews close it before awaiting their provider. Neither migration nor deletion is a read effect.
22
-
23
- §digest-proposal-decisions Operation rows retain the original approval decision
24
- separately from their applied result ({§proposal-decision-evidence}). Markdown
25
- names its decision, resolver and time, and indicates a body override; JSON retains
26
- the complete submitted decision. Missing historical decisions remain absent,
27
- never inferred from success, failure, or current ownership.
28
-
29
- Physical-request reports preserve identity and accounting after payload retention
30
- ({§retention-policy}), displaying the logical call's retirement timestamp. Expiry
31
- does not turn a failed or unpriced request into a free or absent request.
32
-
33
- ## Artifacts and reports
34
-
35
- <!-- map -->
36
- | Tag | Promise |
37
8
  | --- | --- |
38
- | {§digest-storage} | The digest states the file's health. |
39
- | {§digest-turn-artifact-identity} | Digest packet artifacts project durable turns. |
40
- | {§share-packet-names} | Packet artifacts carry the coordinate the log uses. |
41
- | {§digest-navigation} | The main Markdown report links each turn's available input, output, reasoning and physical requests outside… |
42
- | {§share-snapshot} | A database is copied by SQLite, never by the filesystem. |
43
- | {§digest-programmatic-surface} | The digest is an importable forensic surface. |
44
- | {§digest-cost-kind} | Cost basis named. |
45
- | {§digest-wire-line} | Wire health aggregated. |
46
- | {§digest-room-line} | The room in provider tokens. |
47
- | {§digest-cache-ledger} | Measured cache reuse and estimated prompt overlap are separate. |
48
- | {§digest-edit-census} | Every model EDIT by the form it authored, how it landed, and whether it came back. |
49
- | {§digest-forensic-fidelity} | Forensic fidelity and cardinality. |
50
- | {§digest-executor-evidence} | A red command is work, not a defect. |
51
- | {§digest-capacity-evidence} | A 413 is the contract working, not a defect. |
52
- | {§digest-requiem} | A requiem is an out-of-band forensic interview, not a worker turn. |
53
- | {§digest-requiem-evidence-budget} | Quoted evidence fits the witness. |
54
- <!-- /map -->
9
+ | Core `EvidenceReader` (`@plurnk/plurnk-service/evidence`) | Package-owned SQL, stored-packet validation, canonical wire and address projection, canonical request accounting, packet-echo classification, and text weight. |
10
+ | `@plurnk/plurnk-digest` | Typed read interface, report selection/grouping, Markdown/JSON/artifacts, consistent snapshots, and out-of-band interviews. No dependency on core or its private types. |
11
+ | Composition (CLI, daemon, harness) | Database/output paths and an explicit provider when an interview is requested. |
55
12
 
56
- §digest-storage **The digest states the file's health.** Beside the database path it
57
- reports the file size, the free pages it holds, its `auto_vacuum` mode, and the six
58
- largest tables and indexes by allocated bytes (`dbstat`), so growth is a number in
59
- every digest (#764). The digest reads loops as stored, so it tolerates databases
60
- missing later lifecycle columns.
13
+ - **Reader lifecycle**: `openEvidence(path)` returns a disposable reader (`rows()` supplies the relational census and durable source rows; packet, response, and transport bodies are fetched individually, caching at most one packet). No connection or prepared statement escapes it. Report failure closes the reader; interviews close it before awaiting their provider. Neither migration nor deletion is a read effect.
14
+ - **Proposal decisions & expired payloads**: Operation rows retain the original approval decision separately from their applied result ({§proposal}): Markdown names decision, resolver, time, and body override; JSON retains the complete submitted decision (missing historical decisions remain absent). Physical-request reports preserve identity, retirement timestamp, and accounting after payload retention ({§content-store}) without turning expired failed/unpriced requests into free or absent ones.
61
15
 
62
- §digest-turn-artifact-identity **Digest packet artifacts project durable turns.**
63
- After selectors are applied, digest retains every turn with exact content or reasoning source, a
64
- valid stored provider request, or malformed stored packet evidence; orders those
65
- turns by durable chronology; and names each by its log coordinate ({§share-packet-names}). The
66
- producer does not affect projection.
16
+ ## §share-packet-names 2. Artifacts, Snapshots, and Programmatic Surface
67
17
 
68
- §share-packet-names **Packet artifacts carry the coordinate the log uses.** A turn's files are named
69
- `<worker>-<loop>-<turn>`, the worker's name and the loop and turn sequences that `log:///<loop>/<turn>/…`
70
- addresses: the model's first turn in its first loop is `<worker>-1-2`, because the initialization
71
- survey is turn 1 and writes no packet. A digest spanning several workspaces nests each workspace's
72
- files in a folder named for it; a name that cannot name a file (a workspace named by its path,
73
- `~/ptl/x`) is slugged for the folder, `ptl-x`, while the digest text keeps the name verbatim, and
74
- two names that slug alike are told apart by the row's id. `digest.json` records each turn's stem as `artifact`, so no
75
- consumer reconstructs a name. A name that cannot be a file name, or two turns sharing one, fails.
18
+ - **Database health**: Beside the database path, the digest reports file size, free pages, `auto_vacuum` mode, and the six largest tables and indexes by allocated bytes (`dbstat`), tolerating databases missing later loop lifecycle columns.
19
+ - **Turn coordinates & workspace folders**: Digest retains every selected turn with exact `ops`/`reasoning` source, a valid stored provider request, or malformed stored packet evidence in durable chronological order. Files are named `<session>-<loop>-<turn>` matching `log:///<loop>/<turn>/…` (the model's first turn in loop 1 is `<session>-1-2` because turn 1 is the initialization survey). Multi-workspace digests nest files in slugged workspace folders (e.g. `~/ptl/x` $\to$ `ptl-x`, disambiguating collisions by row id); `digest.json` records each turn's stem as `artifact`.
20
+ - **Navigation & quoting**: The main Markdown report links each turn's input, output, reasoning, and physical requests outside code fences using relative links. Request pages link back to the digest, previous/next session requests, and exact channel files, distinguishing physical outcomes from emission admission and BARE calls. When no message sections remain, the reader returns no messages and the request page names that absence without synthetic empty files. Forensic Markdown quotes bodies with a longer fence so embedded headings/fences cannot conceal later records.
21
+ - **Snapshots & programmatic surface**: `Share.snapshot(dbPath, copy)` copies a database via SQLite (never filesystem byte copy, which drops WAL pages; refuses existing `copy`), paired with `Share.write({ openEvidence, dbPath, folder, workspaceId?, requiem? })`. Importing `@plurnk/plurnk-digest` (`Digest`, `Share`) performs no I/O. `run({ dbPath, openEvidence, digestDir?, sessionId?, workspaceId? })` writes to `./test/digest` by default, refusing non-empty `digestDir` (and `requiem` refuses existing `requiem.json`/`requiem.md`) before I/O ({§share}). `digest.json` is promoted from a partial file only after every artifact is written. `sessionId` and `workspaceId` narrow all dependent records (intersecting when both are supplied).
76
22
 
77
23
  | Artifact | Present when | Authority |
78
- |----------|--------------|-----------|
79
- | `<stem>.request.md` | The turn stored a provider request | Ordered text-message envelope from `EvidencePacket.messages()`, with numbered role headings and full, literal bodies; not a transport capture. Invalid input instead names its validation/projection failure without inventing messages. |
80
- | `<stem>.assistant.md` | The turn has an `ops` source | This turn's output: exact `turn_sources.content`, independent of log rows; not assistant history in the request |
81
- | `<stem>.reasoning.md` | The turn has a `reasoning` source | Exact `turn_sources.content`, without relabeling it as content |
82
- | `<stem>.system.md`, `<stem>.user.md` | The request's message sections are retained | Role-filtered text projections for extraction; not the complete request or its message boundaries. Native parts are not Markdown. |
83
- | `<stem>.wire.json` | The request's message sections are retained | The same ordered text-message envelope as `.request.md` ({§packet-wire-envelope}), in JSON; not dispatched HTTP bytes. Both exclude native payloads, provider controls, and SDK/transport transformations; `<stem>.wire.invalid.json` names a stored log that cannot be projected. |
84
- | `digest.json` turn `attachments` | Every turn | Stored native attachment descriptors; `[]` means a request without attachments, `null` means no valid stored request. Selection is not proof of provider acceptance. |
85
- | `<stem>.assistantRaw.json` | The request has an admitted provider response | Stored opaque provider response |
86
- | `<stem>.response.md`, attempt artifacts | The request received no admitted response | Stored request and attempt state |
87
- | `<stem>.packet.raw.txt` | The stored packet fails typed validation | Exact stored packet text |
88
- | `<stem>.packet.invalid.json` | The stored packet fails typed validation | Turn identity and complete validation error chain |
89
- | `requests/<id>.md`, `.json` | Every physical provider request | Request identity, disposition, accounting and available response/failure evidence; Markdown links the originating turn and complete JSON. A captured dispatched body follows {§provider-dispatched-request}; absent capture is explicit. |
90
-
91
- A source-backed turn without provider participation produces only its source-channel
92
- artifacts; a request-only turn produces no fabricated assistant. A
93
- source-less programmatic turn with no provider request has no forensic payload
94
- to project and writes no files.
95
-
96
- §digest-navigation The main Markdown report links each turn's available input,
97
- output, reasoning and physical requests outside code fences. Request pages
98
- link back to the digest, to previous/next stored requests of the same worker,
99
- and to exact channel files. Their attempt table distinguishes physical outcomes
100
- from emission admission and BARE calls; native attachment descriptors are
101
- visible but are not presented as proof of dispatch or provider acceptance.
102
- Links are relative to their containing file, including nested workspaces.
103
- Rejected attempts link their retained exact output and show admission errors;
104
- pending admission is not rejection, and a retired response produces no empty
105
- output artifact.
106
- When no message sections remain, the reader returns no messages and the request
107
- page names that absence. It produces no synthetic empty input, role files, wire
108
- envelope or prompt-overlap estimate; retained outputs and accounting still render.
109
-
110
- Forensic Markdown quotes message, response and reasoning bodies with a longer
111
- fence so embedded headings/fences cannot conceal later records. Raw channel
112
- files remain byte-identical. Failed partial output, rejected emissions,
113
- pending requests and missing/retired evidence remain distinct; none implies an
114
- accepted response, an empty response, or free inference.
115
-
116
- §share-snapshot **A database is copied by SQLite, never by the filesystem.** `Share.snapshot(dbPath, copy)`, exported as `@plurnk/plurnk-digest` with `Share.write({ openEvidence, dbPath, folder, workspaceId?, requiem? })` (`requiem` is an explicitly supplied provider), is the one consistent copy: a byte copy of a WAL-mode database drops every committed page still in its `-wal` file. A harness that keeps the database beside its digest takes it through `snapshot`; an existing `copy` is refused.
117
-
118
- §digest-programmatic-surface **The digest is an importable forensic surface.**
119
-
120
- | Surface | Contract |
121
- | -------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
122
- | Import `@plurnk/plurnk-digest` | Ships `Digest`, `Share` and typed evidence inputs; importing performs no I/O or process action. Callers invoke it explicitly. |
123
- | `run({ dbPath, openEvidence })` | Reads the required database and writes a complete digest to `./test/digest` relative to the caller's working directory. |
124
- | `digestDir` | Selects a nonempty output path. `run` refuses a folder that exists and is not empty, and `requiem` refuses an existing `requiem.json` or `requiem.md`, before database or provider I/O; neither deletes ({§share}). Concurrent callers use distinct folders. |
125
- | Reader lifetime | `run` reads heavy evidence on demand while rendering, then closes its reader on success or failure. `requiem` closes its reader before awaiting witness inference. |
126
- | Export completion | Packet and response bodies are read and serialized one record at a time, without discarding evidence. `digest.json` is promoted from a partial file only after every artifact is written; its absence identifies an incomplete export. |
127
- | `workerId` | Narrows workers and every dependent loop, turn, turn-attached logical inference, specialization, physical request, and log row to that one worker. |
128
- | `workspaceId` | Narrows workers plus every logical inference and dependent evidence owned by one workspace, when both selectors are present they intersect. A workspace selected alone is the digest's workspace even when it holds no worker. |
129
-
130
- §digest-cost-kind **Cost basis named.** A rendered Cost line carries the basis of its dollar figure: `(charged)` only when every settled request's cost is provider-charged; `(estimated — catalog rates)` when any settled request's cost is an estimate, because a mixed sum is no more trustworthy than its weakest term. A dollar figure without its basis reads as billed truth, and an estimate must never impersonate a charge.
131
-
132
- §digest-wire-line **Wire health aggregated.** Each worker summary renders a `Wire:` line — total physical provider requests, error-outcome count, and the error percentage when nonzero. Provider-level failures are absorbed by retries below the packet stream, so without this aggregate a rate-limit storm is invisible in every summary while the model's experience stays clean.
133
-
134
- §digest-room-line **The room in provider tokens.** Each worker summary renders a `Room:` line over its packet-bearing inference requests that record a known input capacity and wall and a provider count: the exact preflight measurement, else the reported input. It names the largest budget the model was shown, converted at that request's own ratio (`count ÷ weight`), as a share of the capacity; the range of the wall's estimate as the packet's conversion reconstructs it (`weight × capacity ÷ budget`) against the count; and, marked ⚠, the requests the estimate put under the wall while the count was over it ({§context-wall-measure}). A worker without such requests reads `(no measured requests)`. Every run checks the ruler, pass or fail.
135
-
136
- §digest-cache-ledger **Measured cache reuse and estimated prompt overlap are separate.**
137
-
138
- | Projection | Meaning |
139
- |---|---|
140
- | `digest.json` provider-request `cachedTokens`, `inputTokens` | Exact provider-reported cache reads and input tokens; absent quantities remain `null`, reported zero remains zero. Every physical request counts, including retries and first requests of new loops. Stored packet availability is irrelevant to these counters. |
141
- | Turn `cache=<cached>/<input>` | Sum each measured quantity over that turn's requests. If any request omits a quantity, that sum is `?`. |
142
- | Workspace `Cache: <cached> of <input> reported input tokens read from cache (<pct>%) over <n> requests` | Sum only requests reporting both counters. Percentage is cache reads / input, rounded to one decimal; zero input is `n/a`. Requests missing either counter are counted separately as `missing input or cache usage (excluded)`. |
143
- | `digest.json` provider-request `adjacentPrefixTokensEstimate` | Optional loop-local diagnostic: the longest common character prefix with the preceding request, weighted under {§tokenomics-agnostic-ruler} as a share of the current stored prompt, multiplied by reported input tokens. First request: `0`; missing current/preceding packet or current input: `null`. Empty prompts have zero overlap. |
144
-
145
- The prefix estimate uses the stored emission packet's wire message order, roles
146
- and content. A BARE request's input is not that packet; its prefix estimate and
147
- the following request's comparison are unknown. The estimate is
148
- neither provider tokenization nor a cache ceiling, and never supplies a cache-ratio
149
- denominator. Caching across loops or against other provider-resident prefixes
150
- does not make the measured counters inconsistent.
151
-
152
- §digest-edit-census **Every model EDIT by the form it authored, how it landed, and whether it came back.** For each worker the digest reads every model-authored EDIT row and classifies the form from the row's stored marker and the durable statement's pattern. It counts the EDITs, those refused (status ≥ 400), and the *revisits*: an EDIT of a path the same worker had edited within its previous two model turns — the shape of a repair without the claim of one. Each worker summary renders `EDITs: <n> · <form>=<count>… · refused=<k> · revisits=<r>` (`(no edits)` for none); `digest.json` carries the census as `edit_census` on every worker and stamps every EDIT log entry with its `edit_form` and `edit_revisit`. A form is a fact about what was written, never about intent; the bench sheet reads the counts as friction and leaves the judgement to the reader.
153
-
154
- | Form | Marker |
155
- | --- | --- |
156
- | `hash` | one anchor |
157
- | `line` | one line number |
158
- | `range` | two marks |
159
- | `insert` | the zero-width `<L,1,L,1>` form ({§zero-width-column-one-insert}) |
160
- | `column` | any other four-mark region |
161
- | `prepend` / `append` | `<0>` / `<-1>` |
162
- | `offset` | a tolerated anchor offset ({§anchor-offset}) |
163
- | `pattern` | a selection matcher |
164
- | `whole` | no marker: a creation when it lands 201 |
165
-
166
- §digest-forensic-fidelity **Forensic fidelity and cardinality.** The digest's machine-readable JSON is the machine record; the human Markdown waterfall is a triage projection, showing a present causal source and previewing only the Problem detail. Valid packet files remain byte-identical records of what the model saw.
167
-
168
- | The JSON preserves | Rule |
169
- | --- | --- |
170
- | Every log event | with its initial and current projection, causal `source`, and structured `attrs`; every exact log-KILL target effect; the exact Problem on every failed row |
171
- | Every loop | its exact terminal result, settlement time, scheduled due time, recurring interval, and recurrence lineage |
172
- | Every ordered physical provider request | accounting on broader rows is the shared exact derivation from that ledger, never a second stored fact |
173
- | Programs | chronological `assistant.md` artifacts after every READ receipt is KILLed; source is independent of log curation |
174
- | Each stored packet | validates independently: one malformed historical packet remains exact raw evidence with its complete validation error chain and never prevents healthy turns from being projected |
175
- | Targets | reconstruct the model-visible address, including hostname, port, serialized query, and fragment; an authority-bearing URL must never degrade from `https://host/path` to `https:///path`, and durable resource coordinates render back to their authority form |
176
-
177
- | Each worker summary | Counts |
24
+ | --- | --- | --- |
25
+ | `<stem>.request.md` / `<stem>.wire.json` | Turn stored a provider request / message sections retained | Ordered text-message envelope from `EvidencePacket.messages()` ({§packet-assembly}), excluding native payloads, provider controls, and transport transforms (`<stem>.wire.invalid.json` when log projection fails). |
26
+ | `<stem>.assistant.md` / `<stem>.reasoning.md` | Turn has `ops` / `reasoning` source | Exact `turn_sources.content`, independent of log curation. |
27
+ | `<stem>.system.md`, `<stem>.user.md` | Request message sections retained | Role-filtered text projections for extraction. |
28
+ | `digest.json` turn `attachments` | Every turn | Stored native attachment descriptors (`[]` = no attachments, `null` = no valid stored request). |
29
+ | `<stem>.assistantRaw.json` / `<stem>.response.md` | Admitted provider response / no admitted response | Stored opaque provider response, or stored request and attempt state. |
30
+ | `<stem>.packet.raw.txt` / `<stem>.packet.invalid.json` | Stored packet fails typed validation | Exact stored packet text and turn identity + validation error chain. |
31
+ | `requests/<id>.md`, `.json` | Every physical provider request | Request identity, disposition, accounting, and response/failure evidence ({§provider-interface}). |
32
+
33
+ ## §digest-forensic-fidelity 3. Metrics, Cache Ledger, Edit Census, and Fidelity
34
+
35
+ | Metric / Surface | Contract |
178
36
  | --- | --- |
179
- | `Emissions:` | its announced emission rows, those the worker KILLed, and the headings it echoed ({§emission-row}) |
180
- | `Reasonings:` | its landed reasoning rows, those the worker KILLed, and the turns that reasoned ({§reasoning-row}); the op mix leaves both harness rows out |
181
- | Cost | how many settled requests carry no usage at all (errored or aborted exchanges) — their server-side spend is unrecorded rather than silently priced as zero |
182
- | The reasoning chronology | distinguishes readable reasoning content from provider-reported reasoning usage: when tokens were reported but no readable content was returned, it states both facts instead of implying that no reasoning occurred |
183
-
184
- The Markdown waterfall groups consecutive identical per-turn op outcomes and typed `entry_materialized` narrations, reporting the exact count and sequence span (`xN (seq A-B)`). Grouping keys include source and the complete target, so distinct causes, authorities, or channels never collapse, and non-consecutive events preserve their chronological order. Thus amplification is conspicuous without making the diagnostic artifact itself pathological.
185
-
186
- Unrecognized actionless log rows are retained and labelled as such, not
187
- interpreted as executable turnOps or allowed to prevent the remaining digest.
188
-
189
- Log JSON preserves `inherited_history` and `ambient_event_id` when the evidence
190
- reader supplies them. A copied model-origin row is history, not a new authored
191
- operation; multiple observers may retain the same ambient occurrence. An absent
192
- field in an older export or reader means unknown, not `false` or `null`.
193
-
194
- §digest-executor-evidence **A red command is work, not a defect.** Engine-materialized
195
- completion rows for a failed command carry the executor's problem identity
196
- (`https://problems.plurnk.xyz/executor/*`), and the digest classifies them as
197
- evidence: they render like any row but never count toward a loop's error total,
198
- its health verdict, or the per-turn `errs=` badge — a loop that concluded green
199
- over red test runs is CLEAN, not DEGENERATE-WIN. This is the digest mirror of the
200
- strike rail's exemption ({§engine-rails}, #425 F1): structural violations count,
201
- executor evidence never does.
202
-
203
- §digest-capacity-evidence **A 413 is the contract working, not a defect.** The
204
- capacity contract's rows, a result that did not fit ({§context-fit}), the
205
- over-budget mandate ({§context-over-budget-row}) and any other 413, render like
206
- any row but never count toward a loop's error total, its error-item count, its
207
- health verdict, or the per-turn `errs=` badge: a loop that concluded green under
208
- a binding budget is CLEAN. Refusals of the model's own statements still count.
37
+ | Cost line (`Cost:`) | Labels basis `(charged)` only when every settled request is provider-charged, or `(estimated — catalog rates)` when any is estimated; counts settled requests with no usage (errored/aborted) so unrecorded spend is never silently priced as zero. |
38
+ | Wire line (`Wire:`) | Renders total physical provider requests, error-outcome count, and error percentage when nonzero. |
39
+ | Room line (`Room:`) | Over packet-bearing requests with known input capacity, wall, and provider count (preflight measurement, else reported input): names largest budget shown converted at `count ÷ weight` as a share of capacity, wall estimate range (`weight × capacity ÷ budget`) against count, and marks with `⚠` requests estimated under the wall while count was over it ({§tokenomics}); `(no measured requests)` when none. |
40
+ | Cache ledger (`Cache:`) | `digest.json` records exact `cachedTokens` and `inputTokens` (`null` when absent) plus loop-local `adjacentPrefixTokensEstimate` (weighted longest common character prefix with preceding emission packet $\times$ `inputTokens`; `0` on first request, `null` on BARE or missing packet/input). Turn renders `cache=<cached>/<input>` (`?` if any omitted); workspace sums requests reporting both counters (`<pct>%`, or `n/a` on zero input) and counts excluded requests separately. |
41
+ | Edit census (`EDITs:`) | Classifies every model-authored EDIT row into `hash` (1 anchor), `line` (1 line number), `range` (2 marks), `insert` (`<L,1,L,1>`, {§zero-width-column-one-insert}), `column` (other 4-mark), `prepend` (`<0>`), `append` (`<-1>`), `offset` (anchor offset, {§op-methods-op-dispatch}), `pattern` (selection matcher), or `whole` (no marker; creation on 201), counting total, `refused` (status $\ge 400$), and `revisits` (same path edited within previous 2 model turns); stamps `edit_census` on sessions and `edit_form`/`edit_revisit` on EDIT log entries. |
42
+ | Session summaries & waterfall | Counts `Emissions:` (announced, KILLed, echoed headings) and `Reasonings:` (landed, KILLed, turns that reasoned; distinguishes readable content from token-only reasoning usage) ({§turn-source-resources}). JSON preserves every log event (initial/current projection, `source`, `attrs`, log-KILL target effects, exact Problem, optional `inherited_history` and `ambient_event_id`), loop lineage, request ledger, and full target authority (`https://host/path`). Markdown waterfall groups consecutive identical per-turn op outcomes and `entry_materialized` narrations by `(source, target)` as `xN (seq A-B)`. |
43
+ | Executor & capacity evidence | Failed command completion rows (`https://problems.plurnk.xyz/executor/*`, {§engine-rails}) and capacity contract `413` rows ({§tokenomics}) render in the waterfall but never count toward a loop's error total, error-item count, health verdict (`CLEAN`), or per-turn `errs=` badge. |
209
44
 
210
- §digest-requiem **A requiem is an out-of-band forensic interview, not a worker
211
- turn.** It cannot execute operations or alter the audited history.
45
+ ## §digest-requiem 4. Requiem Interviews
212
46
 
213
- | Aspect | Contract |
214
- |-----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|
215
- | Scope | One interview for each worker with model-bearing inference turns; workers without inference evidence are omitted. |
216
- | Evidence | The worker's final packet plus every attempt's exact normalized response and admission evidence; opaque raw transport remains in durable forensic artifacts. Quoted evidence is budgeted to the witness window ({§digest-requiem-evidence-budget}). |
217
- | Witness | An explicitly supplied provider; CLI composition may resolve the active configured provider. Absence fails hard; the report package never selects a route. |
218
- | Identity | The worker's durable provider identity ({§worker-provider-identity}) is sent as the `workerId`, without asserting a live worker topology. |
219
- | Attempts | One call at `PLURNK_DIGEST_REQUIEM_MAX_TOKENS`; only an empty length-limited response receives one retry at `PLURNK_DIGEST_REQUIEM_RETRY_MAX_TOKENS`. |
220
- | Artifacts | `requiem.md` carries testimony and exact nullable USD accounting. `requiem.json` is durably materialized before each call and preserves logical call state, messages, normalized responses, every physical request's state and accounting, and their shared aggregate projection. |
47
+ A requiem is an out-of-band forensic interview over each session with model-bearing inference turns, using an explicitly supplied witness provider and the session's durable provider identity ({§machine-processes}) as `sessionId`.
221
48
 
222
- §digest-requiem-evidence-budget **Quoted evidence fits the witness.** The
223
- interview's user message is budgeted against the witness provider's context
224
- window minus the retry output allowance and system framing (chars/2, the
225
- capacity gate's own estimator). Overflow elides the oldest provider attempts
226
- behind an explicit `elidedOldestAttempts` count marker, never silently; the
227
- final packet and the newest attempts always testify. A windowless witness
228
- (`contextWindow` null) quotes unbudgeted.
49
+ - **Evidence budget**: Quotes the session's final packet plus every attempt's normalized response and admission evidence, budgeted against the witness's `contextWindow` minus retry output allowance and system framing (`chars / 2`); overflow elides oldest attempts behind an explicit `elidedOldestAttempts` marker (unbudgeted when `contextWindow` is `null`).
50
+ - **Execution & artifacts**: Makes one call at `PLURNK_DIGEST_REQUIEM_MAX_TOKENS`, retrying once at `PLURNK_DIGEST_REQUIEM_RETRY_MAX_TOKENS` only on an empty length-limited response. Materializes `requiem.json` (logical call state, messages, normalized responses, physical request accounting) before each call and `requiem.md` (testimony and nullable USD accounting) on completion.
package/dist/Digest.js CHANGED
@@ -17,7 +17,7 @@ export default class Digest {
17
17
  observedSync(trace.getTracer("@plurnk/plurnk-digest"), "digest.write", {}, () => { Digest.#runSettled(opts); });
18
18
  }
19
19
  static #runSettled(opts) {
20
- // {§digest-programmatic-surface}: refuse the destination before opening evidence.
20
+ // {§share-packet-names}: refuse the destination before opening evidence.
21
21
  const { dbPath, digestDir } = digestPaths(opts);
22
22
  // {§share}: the digest never deletes; a caller reusing a folder removes it first.
23
23
  if (existsSync(digestDir) && (!statSync(digestDir).isDirectory() || readdirSync(digestDir).length > 0)) {
@@ -28,7 +28,7 @@ export default class Digest {
28
28
  }
29
29
  static #write(evidence, dbPath, digestDir, opts) {
30
30
  const rows = evidence.rows();
31
- let { workspaces, workers, inferenceCalls, modelCalls, turnAttempts, providerRequests, logEntries, editRows, curationEffects, workerRollupRows, opMixRows } = rows;
31
+ let { workspaces, sessions, inferenceCalls, modelCalls, turnAttempts, providerRequests, logEntries, editRows, curationEffects, sessionRollupRows, opMixRows } = rows;
32
32
  const { environmentRows, searchState, derivationState, dispositionCounts, dispositions, storageTables, emissionRows, reasoningRows } = rows;
33
33
  let loops = rows.loops.map((loop) => ({ ...loop, claimed_at: loop.claimed_at ?? null }));
34
34
  if (rows.storage === undefined)
@@ -48,19 +48,19 @@ export default class Digest {
48
48
  derivation_artifacts_complete: derivationState.complete,
49
49
  derivation_artifacts_building: derivationState.building,
50
50
  };
51
- // {§digest-programmatic-surface} — optional worker/workspace selectors narrow the
52
- // kept worker graph and its dependent evidence rather than emitting the whole DB.
53
- if (opts.workerId !== undefined)
54
- workers = workers.filter((r) => r.id === opts.workerId);
51
+ // {§share-packet-names} — optional session/workspace selectors narrow the
52
+ // kept session graph and its dependent evidence rather than emitting the whole DB.
53
+ if (opts.sessionId !== undefined)
54
+ sessions = sessions.filter((r) => r.id === opts.sessionId);
55
55
  if (opts.workspaceId !== undefined)
56
- workers = workers.filter((r) => r.workspace_id === opts.workspaceId);
57
- if (opts.workerId !== undefined || opts.workspaceId !== undefined) {
58
- const keptWorkerIds = new Set(workers.map((r) => r.id));
59
- // A workspace selected alone stays the digest's though it holds no worker; a worker selector keeps the
60
- // workspaces of the workers it kept.
61
- const keptWorkspaceIds = new Set(opts.workerId === undefined ? [opts.workspaceId] : workers.map((r) => r.workspace_id));
56
+ sessions = sessions.filter((r) => r.workspace_id === opts.workspaceId);
57
+ if (opts.sessionId !== undefined || opts.workspaceId !== undefined) {
58
+ const keptSessionIds = new Set(sessions.map((r) => r.id));
59
+ // A workspace selected alone stays the digest's though it holds no session; a session selector keeps the
60
+ // workspaces of the sessions it kept.
61
+ const keptWorkspaceIds = new Set(opts.sessionId === undefined ? [opts.workspaceId] : sessions.map((r) => r.workspace_id));
62
62
  workspaces = workspaces.filter((s) => keptWorkspaceIds.has(s.id));
63
- loops = loops.filter((l) => keptWorkerIds.has(l.worker_id));
63
+ loops = loops.filter((l) => keptSessionIds.has(l.session_id));
64
64
  const keptLoopIds = new Set(loops.map((l) => l.id));
65
65
  turns = turns.filter((t) => keptLoopIds.has(t.loop_id));
66
66
  const keptTurnIds = new Set(turns.map((t) => t.id));
@@ -74,21 +74,21 @@ export default class Digest {
74
74
  const keptLogEntryIds = new Set(logEntries.map((entry) => entry.id));
75
75
  curationEffects = curationEffects.filter((effect) => keptLogEntryIds.has(effect.operation_log_entry_id)
76
76
  && keptLogEntryIds.has(effect.target_log_entry_id));
77
- workerRollupRows = workerRollupRows.filter((r) => keptWorkerIds.has(r.worker_id));
78
- opMixRows = opMixRows.filter((o) => keptWorkerIds.has(o.worker_id));
77
+ sessionRollupRows = sessionRollupRows.filter((r) => keptSessionIds.has(r.session_id));
78
+ opMixRows = opMixRows.filter((o) => keptSessionIds.has(o.session_id));
79
79
  }
80
80
  mkdirSync(digestDir, { recursive: true });
81
- const workersByWorkspace = new Map();
82
- for (const r of workers) {
83
- const arr = workersByWorkspace.get(r.workspace_id) ?? [];
81
+ const sessionsByWorkspace = new Map();
82
+ for (const r of sessions) {
83
+ const arr = sessionsByWorkspace.get(r.workspace_id) ?? [];
84
84
  arr.push(r);
85
- workersByWorkspace.set(r.workspace_id, arr);
85
+ sessionsByWorkspace.set(r.workspace_id, arr);
86
86
  }
87
- const loopsByWorker = new Map();
87
+ const loopsBySession = new Map();
88
88
  for (const l of loops) {
89
- const arr = loopsByWorker.get(l.worker_id) ?? [];
89
+ const arr = loopsBySession.get(l.session_id) ?? [];
90
90
  arr.push(l);
91
- loopsByWorker.set(l.worker_id, arr);
91
+ loopsBySession.set(l.session_id, arr);
92
92
  }
93
93
  const turnsByLoop = new Map();
94
94
  for (const t of turns) {
@@ -106,7 +106,7 @@ export default class Digest {
106
106
  const requestsByAttempt = new Map();
107
107
  const requestsByTurn = new Map();
108
108
  const requestsByLoop = new Map();
109
- const requestsByWorker = new Map();
109
+ const requestsBySession = new Map();
110
110
  const requestsByWorkspace = new Map();
111
111
  const appendRequest = (map, id, request) => {
112
112
  const bucket = map.get(id) ?? [];
@@ -122,15 +122,15 @@ export default class Digest {
122
122
  appendRequest(requestsByTurn, request.turn_id, request);
123
123
  if (request.loop_id !== null)
124
124
  appendRequest(requestsByLoop, request.loop_id, request);
125
- if (request.worker_id !== null)
126
- appendRequest(requestsByWorker, request.worker_id, request);
125
+ if (request.session_id !== null)
126
+ appendRequest(requestsBySession, request.session_id, request);
127
127
  appendRequest(requestsByWorkspace, request.workspace_id, request);
128
128
  }
129
- const editRowsByWorker = new Map();
129
+ const editRowsBySession = new Map();
130
130
  for (const row of editRows) {
131
- const arr = editRowsByWorker.get(row.worker_id) ?? [];
131
+ const arr = editRowsBySession.get(row.session_id) ?? [];
132
132
  arr.push(row);
133
- editRowsByWorker.set(row.worker_id, arr);
133
+ editRowsBySession.set(row.session_id, arr);
134
134
  }
135
135
  const logEntriesByTurn = new Map();
136
136
  for (const le of logEntries) {
@@ -139,25 +139,25 @@ export default class Digest {
139
139
  logEntriesByTurn.set(le.turn_id, arr);
140
140
  }
141
141
  const loopsById = new Map(loops.map((l) => [l.id, l]));
142
- const workersById = new Map(workers.map((r) => [r.id, r]));
143
- const workerRollups = new Map(workerRollupRows.map((r) => [r.worker_id, r]));
142
+ const sessionsById = new Map(sessions.map((r) => [r.id, r]));
143
+ const sessionRollups = new Map(sessionRollupRows.map((r) => [r.session_id, r]));
144
144
  const environments = new Map(environmentRows.map((row) => {
145
145
  const env = JSON.parse(row.env);
146
146
  return [`${row.workspace_id}:${row.stream}`, isRecord(env) ? env : {}];
147
147
  }));
148
- const opMixByWorker = new Map();
148
+ const opMixBySession = new Map();
149
149
  for (const o of opMixRows) {
150
- const arr = opMixByWorker.get(o.worker_id) ?? [];
150
+ const arr = opMixBySession.get(o.session_id) ?? [];
151
151
  arr.push(o);
152
- opMixByWorker.set(o.worker_id, arr);
152
+ opMixBySession.set(o.session_id, arr);
153
153
  }
154
154
  const m = {
155
155
  evidence,
156
- dbPath, storage, digestDir, workspaces, workers, loops, turns, inferenceCalls, modelCalls, turnAttempts, providerRequests, logEntries, curationEffects,
157
- workersByWorkspace, loopsByWorker, turnsByLoop, attemptsByTurn,
158
- requestsByInferenceCall, requestsByAttempt, requestsByTurn, requestsByLoop, requestsByWorker, requestsByWorkspace,
159
- logEntriesByTurn, emissionRows, reasoningRows, editRows, editRowsByWorker, environments, loopsById, workersById,
160
- workerRollups, opMixByWorker, search,
156
+ dbPath, storage, digestDir, workspaces, sessions, loops, turns, inferenceCalls, modelCalls, turnAttempts, providerRequests, logEntries, curationEffects,
157
+ sessionsByWorkspace, loopsBySession, turnsByLoop, attemptsByTurn,
158
+ requestsByInferenceCall, requestsByAttempt, requestsByTurn, requestsByLoop, requestsBySession, requestsByWorkspace,
159
+ logEntriesByTurn, emissionRows, reasoningRows, editRows, editRowsBySession, environments, loopsById, sessionsById,
160
+ sessionRollups, opMixBySession, search,
161
161
  };
162
162
  writeFileSync(join(digestDir, "digest.md"), DigestRender.waterfall(m));
163
163
  const pending = join(digestDir, "digest.json.partial");
@@ -175,7 +175,7 @@ export default class Digest {
175
175
  renameSync(pending, join(digestDir, "digest.json"));
176
176
  console.log(`digest: wrote ${digestDir}/{digest.md,digest.json,reasoning.md} + ${packetFiles.length} packet artifact files (${packetIds.join(", ") || "none"})`);
177
177
  console.log(` source: ${dbPath}`);
178
- console.log(` workspaces=${workspaces.length} workers=${workers.length} loops=${loops.length} turns=${turns.length} inference_calls=${inferenceCalls.length} model_calls=${modelCalls.length} turn_attempts=${turnAttempts.length} provider_requests=${providerRequests.length} log_entries=${logEntries.length} log_curation_effects=${curationEffects.length}`);
178
+ console.log(` workspaces=${workspaces.length} sessions=${sessions.length} loops=${loops.length} turns=${turns.length} inference_calls=${inferenceCalls.length} model_calls=${modelCalls.length} turn_attempts=${turnAttempts.length} provider_requests=${providerRequests.length} log_entries=${logEntries.length} log_curation_effects=${curationEffects.length}`);
179
179
  }
180
180
  }
181
181
  //# sourceMappingURL=Digest.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Digest.js","sourceRoot":"","sources":["../src/Digest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACvH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,KAAK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igestModel, TurnRow } from "./digest-rows.ts";
3
+ export declare const packetStems: (m: DigestModel) => Map<number, string>;
4
+ export declare const turnLinks: (m: DigestModel, turn: TurnRow, from: string) => string[];
5
+ export declare const request: (messages: ReadonlyArray<ChatMessage & {
6
+ content: string;
7
+ }>, preamble?: readonly string[]) => string;
8
+ export declare const packetFiles: (m: DigestModel) => string[];
9
+ export declare function json(m: DigestModel): Generator<string>;
10
+ //# sourceMappingURL=DigestArtifacts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DigestArtifacts.d.ts","sourceRoot":"","sources":["../src/DigestArtifacts.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAc5D,OAAO,KAAK,EAAE,WAAW,EAAsB,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAWjF,eAAO,MAAM,WAAW,MAAO,WAAW,KAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CA6B9D,CAAC;AAEF,eAAO,MAAM,SAAS,MAAO,WAAW,QAAQ,OAAO,QAAQ,MAAM,KAAG,MAAM,EAQ7E,CAAC;AAGF,eAAO,MAAM,OAAO,aAAc,aAAa,CAAC,WAAW,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,aAAY,SAAS,MAAM,EAAE,KAAQ,MAQtH,CAAC;AAiGF,eAAO,MAAM,WAAW,MAAO,WAAW,KAAG,MAAM,EAwHlD,CAAC;AAEF,wBAAiB,IAAI,CAAC,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC,MAAM,CAAC,CAuKvD"}