@plurnk/plurnk-service 1.27.0 → 1.28.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/.env.defaults +13 -19
- package/SPEC.md +81 -140
- package/dist/build-info.json +1 -1
- package/dist/content/line-marker.d.ts +1 -0
- package/dist/content/line-marker.d.ts.map +1 -1
- package/dist/content/line-marker.js +5 -0
- package/dist/content/line-marker.js.map +1 -1
- package/dist/content/read-projector.js +3 -3
- package/dist/content/read-projector.js.map +1 -1
- package/dist/content/read-resolve.d.ts.map +1 -1
- package/dist/content/read-resolve.js +7 -4
- package/dist/content/read-resolve.js.map +1 -1
- package/dist/core/AdmittedTurnExecutor.d.ts +3 -1
- package/dist/core/AdmittedTurnExecutor.d.ts.map +1 -1
- package/dist/core/AdmittedTurnExecutor.js +19 -4
- package/dist/core/AdmittedTurnExecutor.js.map +1 -1
- package/dist/core/BudgetReadout.d.ts +4 -4
- package/dist/core/BudgetReadout.d.ts.map +1 -1
- package/dist/core/BudgetReadout.js +26 -41
- package/dist/core/BudgetReadout.js.map +1 -1
- package/dist/core/ContextFit.d.ts +26 -0
- package/dist/core/ContextFit.d.ts.map +1 -0
- package/dist/core/ContextFit.js +56 -0
- package/dist/core/ContextFit.js.map +1 -0
- package/dist/core/Dispatcher.d.ts +13 -0
- package/dist/core/Dispatcher.d.ts.map +1 -1
- package/dist/core/Dispatcher.js +142 -3
- package/dist/core/Dispatcher.js.map +1 -1
- package/dist/core/EmissionHead.d.ts +8 -0
- package/dist/core/EmissionHead.d.ts.map +1 -0
- package/dist/core/EmissionHead.js +29 -0
- package/dist/core/EmissionHead.js.map +1 -0
- package/dist/core/LogEntryProjection.d.ts +1 -0
- package/dist/core/LogEntryProjection.d.ts.map +1 -1
- package/dist/core/LogEntryProjection.js +9 -0
- package/dist/core/LogEntryProjection.js.map +1 -1
- package/dist/core/LogWriter.d.ts +42 -0
- package/dist/core/LogWriter.d.ts.map +1 -1
- package/dist/core/LogWriter.js +11 -5
- package/dist/core/LogWriter.js.map +1 -1
- package/dist/core/PacketBuilder.d.ts +17 -4
- package/dist/core/PacketBuilder.d.ts.map +1 -1
- package/dist/core/PacketBuilder.js +70 -117
- package/dist/core/PacketBuilder.js.map +1 -1
- package/dist/core/PacketBuilder.sql +0 -7
- package/dist/core/StrikeRail.d.ts.map +1 -1
- package/dist/core/StrikeRail.js +5 -1
- package/dist/core/StrikeRail.js.map +1 -1
- package/dist/core/TurnMaterialization.d.ts +6 -2
- package/dist/core/TurnMaterialization.d.ts.map +1 -1
- package/dist/core/TurnMaterialization.js +64 -16
- package/dist/core/TurnMaterialization.js.map +1 -1
- package/dist/core/TurnOps.js +7 -7
- package/dist/core/TurnOps.js.map +1 -1
- package/dist/core/TurnRunner.d.ts +1 -0
- package/dist/core/TurnRunner.d.ts.map +1 -1
- package/dist/core/TurnRunner.js +141 -139
- package/dist/core/TurnRunner.js.map +1 -1
- package/dist/core/TurnRunner.sql +2 -2
- package/dist/core/env-catalog.js +2 -2
- package/dist/core/env-catalog.js.map +1 -1
- package/dist/core/fork.sql +4 -10
- package/dist/core/git-env.d.ts +1 -1
- package/dist/core/git-env.d.ts.map +1 -1
- package/dist/core/git-env.js +19 -12
- package/dist/core/git-env.js.map +1 -1
- package/dist/core/git-membership.d.ts.map +1 -1
- package/dist/core/git-membership.js +11 -5
- package/dist/core/git-membership.js.map +1 -1
- package/dist/core/git-state.js +1 -1
- package/dist/core/git-state.js.map +1 -1
- package/dist/core/operation-target-groups.d.ts +1 -1
- package/dist/core/operation-target-groups.d.ts.map +1 -1
- package/dist/core/operation-target-groups.js +27 -5
- package/dist/core/operation-target-groups.js.map +1 -1
- package/dist/core/packet-wire.d.ts +80 -10
- package/dist/core/packet-wire.d.ts.map +1 -1
- package/dist/core/packet-wire.js +181 -226
- package/dist/core/packet-wire.js.map +1 -1
- package/dist/digest/Digest.d.ts.map +1 -1
- package/dist/digest/Digest.js +3 -2
- package/dist/digest/Digest.js.map +1 -1
- package/dist/digest/DigestRender.d.ts.map +1 -1
- package/dist/digest/DigestRender.js +74 -37
- package/dist/digest/DigestRender.js.map +1 -1
- package/dist/digest/digest-rows.d.ts +7 -0
- package/dist/digest/digest-rows.d.ts.map +1 -1
- package/dist/digest/digest-rows.js.map +1 -1
- package/dist/digest/digest.sql +15 -2
- package/dist/schemes/_entry-find.d.ts.map +1 -1
- package/dist/schemes/_entry-find.js +2 -0
- package/dist/schemes/_entry-find.js.map +1 -1
- package/dist/server/Daemon.d.ts.map +1 -1
- package/dist/server/Daemon.js +11 -2
- package/dist/server/Daemon.js.map +1 -1
- package/migrations/013_graph_regions.sql +1 -0
- package/migrations/014_stream_timing.sql +1 -0
- package/migrations/015_request_evidence.sql +1 -0
- package/package.json +34 -34
- package/dist/core/KnownToxins.d.ts +0 -4
- package/dist/core/KnownToxins.d.ts.map +0 -1
- package/dist/core/KnownToxins.js +0 -22
- package/dist/core/KnownToxins.js.map +0 -1
- package/dist/core/ReasoningView.d.ts +0 -12
- package/dist/core/ReasoningView.d.ts.map +0 -1
- package/dist/core/ReasoningView.js +0 -40
- package/dist/core/ReasoningView.js.map +0 -1
package/SPEC.md
CHANGED
|
@@ -363,6 +363,7 @@ narrow or omit the reference catalogs under {§capability-admission}.
|
|
|
363
363
|
| Project filesystem | `*` | File cap below; `project root member files` |
|
|
364
364
|
| Workspace entries | `worker:///*` | Markerless; `workspace knowledgebase entries` |
|
|
365
365
|
| Named scratch entries | `worker://<worker>/*` | Markerless; `worker knowledgebase entries` |
|
|
366
|
+
| The worker's own reasoning | `reasoning://<worker>/**` | Markerless; `this worker's reasoning, by loop and turn` |
|
|
366
367
|
|
|
367
368
|
Only the three namespace surveys carry asides; the other targets name
|
|
368
369
|
their surface. The word `skills` names Agent Skills and nothing else.
|
|
@@ -371,8 +372,8 @@ supplies examples and complete instructions on demand. A shallow
|
|
|
371
372
|
result renders direct entries normally and every deeper first-segment directory
|
|
372
373
|
as an actionable `dir/**` summary with its recursive `items` and `tokens`;
|
|
373
374
|
tool-family rows also carry the concise `{§scheme-catalog-aside}` that drives
|
|
374
|
-
on-demand capability discovery. Ordinary surveys use FIND
|
|
375
|
-
|
|
375
|
+
on-demand capability discovery. Ordinary surveys use FIND without a scope
|
|
376
|
+
({§markerless-first-page}), whose range metadata reports the returned set against the
|
|
376
377
|
complete result total; only the small capability-reference surfaces
|
|
377
378
|
explicitly select all. The opening survey demonstrates both `*` and `**` without
|
|
378
379
|
normalizing an all-results override. Every survey executes even when empty
|
|
@@ -382,7 +383,7 @@ direct-entry-plus-directory count; `-1` enables the ordinary markerless page;
|
|
|
382
383
|
unset / `0` disables previews. `log://` is absent because the current worker's
|
|
383
384
|
log already renders in present mode.
|
|
384
385
|
|
|
385
|
-
§worker-initialization-entry **Model-worker initialization is a real
|
|
386
|
+
§worker-initialization-entry **Model-worker initialization is a real `_plurnk` operation turn.** A model worker's first loop begins with one packetless `{ producer="_plurnk", kind="initialization" }` turn submitted through {§turn-ops-admission-path}. Its program — the READ/FIND surveys, nothing else — is recorded as the turn's `ops://` source and executed through {§op-execution-order} exactly as a model's program is; it authors no reasoning and reads none back. No emission row is fabricated ({§emission-row}): the first request sees the surveys' ordinary results, never an assistant-content copy of the program. The initial message arrives as an inbound SEND in the first model turn ({§message-arrival}); initialization never READs it, and neither initialization nor later turns manufacture a task inventory. Every orienting row is structurally classified `_plurnk` and `init`. The namespace surveys and their asides follow {§actor-boundary-catalog-preview}.
|
|
386
387
|
|
|
387
388
|
Incoming messages publish once as inbound SEND rows in the first model turn
|
|
388
389
|
({§message-arrival}); initialization neither READs nor archives them. The turn
|
|
@@ -1160,7 +1161,7 @@ These are the complete strike sources:
|
|
|
1160
1161
|
|---------------------|------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------|
|
|
1161
1162
|
| Hard result | An admitted non-execution operation or bounded parse-error status is `>= 400`, except the soft set `404`, `409`, `416`, `425`, `501`, in a turn where no operation succeeded ({§strike-progress-immunity}). | The originating failure row. |
|
|
1162
1163
|
| Cycle | The executed operations and their observed results repeat under {§engine-cycle-evidence}. | None; cycle detection itself is private engine accounting. |
|
|
1163
|
-
| Empty turn | An admitted turn with no authored response operation ({§empty-turn}). | The turn's `422` error row
|
|
1164
|
+
| Empty turn | An admitted turn with no authored response operation ({§empty-turn}). | The turn's `422` error row. |
|
|
1164
1165
|
|
|
1165
1166
|
Execution results remain exact model-visible evidence but are always soft: an
|
|
1166
1167
|
executor error is not a PLURNK contract violation. Cycle detection remains an
|
|
@@ -1232,7 +1233,7 @@ The contracts, and the violation of each that strikes:
|
|
|
1232
1233
|
|
|
1233
1234
|
| Contract | Violation that strikes |
|
|
1234
1235
|
|---|---|
|
|
1235
|
-
| operation contract | a hard operation failure (status ≥ 400) in an admitted turn where no operation succeeded ({§strike-progress-immunity}) — soft statuses below excluded |
|
|
1236
|
+
| operation contract | a hard operation failure (status ≥ 400) in an admitted turn where no operation succeeded ({§strike-progress-immunity}) — soft statuses below excluded, and a matcher the parser could not read ({§matcher-refusal}, `grammar/matcher/unreadable-pattern`) is soft: it refuses its one operation and never strikes |
|
|
1236
1237
|
| review contract | none: an eligible final response joins live obligations ({§completion-joins-live-work}) or continues to observe results ({§completion-defers-to-results}) |
|
|
1237
1238
|
| progress contract | a detected operation cycle (`MIN_CYCLES` × period), or an admitted turn with no operation ({§empty-turn}) |
|
|
1238
1239
|
| frame contract | emission attempts exhausted with no admissible turn |
|
|
@@ -1240,7 +1241,8 @@ The contracts, and the violation of each that strikes:
|
|
|
1240
1241
|
|
|
1241
1242
|
Errors and issues are NOT contract violations. Each keeps its own disposition
|
|
1242
1243
|
and never strikes: exploration misses (404, 416) and unsupported capability
|
|
1243
|
-
(501) are how discovery works; raw 409 outcomes are soft;
|
|
1244
|
+
(501) are how discovery works; raw 409 outcomes are soft; a fumbled pattern is the operation's
|
|
1245
|
+
own `400` with the parser's working form ({§matcher-refusal}); execution outcomes and `executor/*` problem rows are world evidence;
|
|
1244
1246
|
provider weather (rate limit, network failure, deadline, interruption) recovers
|
|
1245
1247
|
({§provider-recovery}); provider capacity has its own packet recovery and
|
|
1246
1248
|
terminal ({§provider-capacity-failure}); request rejection
|
|
@@ -1320,7 +1322,7 @@ The parser owns its boundaries; core admits determinate work and exposes its fai
|
|
|
1320
1322
|
| Bounded program, including malformed operations | Admit valid operations and record parser failures; with no authored operation, apply {§empty-turn}. |
|
|
1321
1323
|
| Outside response text | Store it as the turn's `outside` source under {§outside-text}; never a row, never delivered, never completion. |
|
|
1322
1324
|
| Lost boundary after a closed operation | Admit the closed operations and record the boundary diagnostic under {§unparsed-tail-boundary}. |
|
|
1323
|
-
| Lost boundary before any closed operation | Reject the attempt;
|
|
1325
|
+
| Lost boundary before any closed operation | Reject the attempt; outside text is no substitute for a closed operational statement. An admitted reasoning operation is one ({§reasoning-operations}). |
|
|
1324
1326
|
| Outside text carrying a log-entry heading, other than an emission row's | Reject the attempt ({§fabricated-log-entry}). |
|
|
1325
1327
|
|
|
1326
1328
|
§fabricated-log-entry **Only the harness writes the log.** A line of outside response text that begins with a log-entry heading, `### log:///<loop>/<turn>/<sequence>/` ({§log-wire-format}), is the model continuing the packet's transcript instead of answering it: it writes the receipts it expects and then acts on them. The attempt is rejected under {§invalid-emission-attempts}, so neither that text nor any operation beside it runs or is stored as outside text ({§outside-text}), and its one diagnostic, at the heading's line, reads `` `### log:///2/1/5/READ` is a log entry, and only the harness writes the log. Write the operation, then wait for its receipt. `` Text inside an operation body is not examined, so a SEND or KILL may quote a receipt. A heading whose leaf is `emission` is exempt: the transcript shows it before each of the worker's own emissions ({§emission-row}), and repeating it invents no receipt, so the attempt is admitted and the heading stays outside text, counted by the digest as an echo. In 10,486 recorded emissions, 101 carried such a heading in outside text, every one a fabrication: 85 of 1,675 from deepseek-flash, 81 of them opening with one, and 16 from glm-5.3-flash, deepseek-v4-pro and qwen3.8-flash, which appended an invented `## Log` after their own operations.
|
|
@@ -1331,7 +1333,7 @@ Provider interruption is owned by {§provider-interrupted-attempt}. Accepted sou
|
|
|
1331
1333
|
and positions remain exact; execution follows {§op-execution-order}. WAIT remains
|
|
1332
1334
|
optional, with no omission warning or invented operation ({§turn-shape}).
|
|
1333
1335
|
|
|
1334
|
-
§safe-uri-target-groups After source and authored-command admission, Core
|
|
1336
|
+
§safe-uri-target-groups After source and authored-command admission, Core expands one target group on READ or KILL into one ordinary statement per member, each with an independent dispatch outcome and log row, in authored member order at that operation's position under {§op-execution-order}. A group is either the heading's slot group ({§target-group}) — any target kind, each member with the scope, metadata and matcher its own slot carried, the heading's naked pattern every member's, and a distilling body landing once with the first member — or one slot whose raw target splits at top-level comma or whitespace separators into at least two members that each independently parse as an explicit `scheme://` URI, the selection shared; request-metadata blocks are opaque to that split, and otherwise the slot's target remains exactly singular, including local filenames containing spaces or commas. The same expansion meets a client-authored group at the client seam. The stored `turnOps` and authored command count remain unexpanded, a group never reaches dispatch unexpanded, and no other operation admits target groups.
|
|
1335
1337
|
|
|
1336
1338
|
Core retries a rejected emission against the exact same packet beneath the same engine turn, up to `PLURNK_SERVICE_EMISSION_ATTEMPTS`. Rejected bytes never dispatch or reach the engine strike rail. Before each `generate`, Core opens one durable logical `inference_calls` row with its `model_calls` specialization and emission-specific `turn_attempts` admission row. A call that ends without response evidence leaves that admission row unclassified (`accepted IS NULL`) and does not consume the emission-attempt ceiling. Beneath the logical call, every provider observer invocation opens one cardinal `provider_requests` occurrence immediately before physical I/O and settles it as response or error. Adapter retries and capacity failover append requests in issue order; a response-less failure therefore remains an accounted occurrence rather than disappearing. Normalized response evidence is durable before parser classification and does not duplicate the separately owned accounting. The accepted exchange alone extends `turns.packet` with response evidence; every physical request remains in turn and loop accounting, while the context gauge reads the latest settled emission request on the latest turn. Digest exposes rejected response evidence as `<stem>.attemptNNN.rejected.*` and every physical request in its machine-readable ledger.
|
|
1337
1339
|
|
|
@@ -1920,7 +1922,7 @@ Client-interface target parameters carry fragments inline (`{ target: "sh:///a3b
|
|
|
1920
1922
|
MOVE out of it are 400 `channel-derived`; COPY from it is an ordinary read. Binary sources
|
|
1921
1923
|
keep {§membership-source-projection}, where the source is not text and the projection is the
|
|
1922
1924
|
body; a fetched web page keeps its scheme's own two channels ({§html-materialization}).
|
|
1923
|
-
- §channel-selection-visibility **Channel selection is decision-time information, not a guess** — every multi-channel resource presents its channels with extents wherever FIND presents the resource: broad results list each channel's path, projection `mimetype`, tokens, and lines (default channel first), and matcher locations name the channel their line coordinates address. A READ of a multi-channel resource names its other channels with their tokens in `channels`, keyed by the fragment the model appends (`{"#readable": 812}`), so first contact — a fetched page, a stream's stdout — carries the same choice without a listing; a single-channel resource names none. When the default channel is a readable projection of a differently typed source, it also names `sourceMimetype` once; this is representation evidence, not a different READ workflow. The packet never presents channels as equal and indistinguishable; extents derive from the stored channels by construction. Budget enforcement stays with {§context-
|
|
1925
|
+
- §channel-selection-visibility **Channel selection is decision-time information, not a guess** — every multi-channel resource presents its channels with extents wherever FIND presents the resource: broad results list each channel's path, projection `mimetype`, tokens, and lines (default channel first), and matcher locations name the channel their line coordinates address. A READ of a multi-channel resource names its other channels with their tokens in `channels`, keyed by the fragment the model appends (`{"#readable": 812}`), so first contact — a fetched page, a stream's stdout — carries the same choice without a listing; a single-channel resource names none. When the default channel is a readable projection of a differently typed source, it also names `sourceMimetype` once; this is representation evidence, not a different READ workflow. The packet never presents channels as equal and indistinguishable; extents derive from the stored channels by construction. Budget enforcement stays with {§context-fit} — this is information, not a second guard.
|
|
1924
1926
|
|
|
1925
1927
|
### §channel-state Channel state — metadata, not gating
|
|
1926
1928
|
|
|
@@ -2156,8 +2158,8 @@ The packet projects each visible match's `locator`, exact `region`, or
|
|
|
2156
2158
|
explicitly enclosing `enclosingRegion`
|
|
2157
2159
|
using {§packet-extent-metadata}, without duplicating matched body text. Log
|
|
2158
2160
|
curation removes metadata for matches outside the retained body. Match metadata
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
+
lands with the result it describes under {§context-fit}, complete or as the
|
|
2162
|
+
receipt; `matchLocationCount` appears when the result is a receipt. Exact
|
|
2161
2163
|
FIND pages the complete location set ({§find-result-projection}).
|
|
2162
2164
|
|
|
2163
2165
|
- §read-bytes A binary channel, and the `#bytes` view of
|
|
@@ -2223,41 +2225,16 @@ same transitions the dispatcher's atomic curation event makes, without the row.
|
|
|
2223
2225
|
|---|---|
|
|
2224
2226
|
| Evidence | Original provider reasoning remains verbatim in immutable model-call responses and admitted packets. Resource and log operations never rewrite it. Only an admitted response, or the final exhausted emission attempt, produces a model reasoning source; missing provider reasoning creates no substitute. A non-model producer may record its own authored rationale under {§turn-source-resources}. |
|
|
2225
2227
|
| Resource | `reasoning://<worker>/<loop>/<turn>` is immutable text/plain source belonging to the named workspace worker's turn under {§turn-source-resources}. Every workspace actor may READ, FIND, search and COPY from it; none may EDIT, KILL, COPY into or MOVE it. |
|
|
2226
|
-
| Delivery | Initialization
|
|
2228
|
+
| Delivery | Initialization authors no reasoning ({§worker-initialization-entry}); every observation of reasoning is a deliberate READ: the model's own, or the harness's row before the emission row under {§reasoning-row}. The selected model reasoning source is stored before its OPs execute, so an ordinary READ of the current turn resolves immediately and is visible in subsequent packets. Every READ retains its authored scope and ordinary range metadata, without edit anchors. |
|
|
2227
2229
|
| Curation | Scoped log KILL suppresses receipt lines; whole log KILL retires the receipt. Neither affects the source. Explicit log READs retain ordinary curation anchors. A mutable working copy requires ordinary COPY into an editable resource. |
|
|
2228
2230
|
| Lifecycle | Restart retains sources and observations. FORK snapshots sources under the child's name at the same loop/turn coordinates and receipts with independent curation. No curation or lifecycle event automatically READs model reasoning. A turn the provider left without reasoning reads empty; absent workers and turns return the ordinary missing result ({§turn-source-resources}). |
|
|
2229
2231
|
| Client | Standard live reasoning events and replay retain original provider reasoning; working resources and READ receipts never substitute for or replay that stream. |
|
|
2230
2232
|
|
|
2231
|
-
### §reasoning-initial-read Initial reasoning observation
|
|
2232
|
-
|
|
2233
|
-
The initialization turn records its `_plurnk`-authored rationale and complete
|
|
2234
|
-
NOTE/FIND/READ program as one reasoning source before dispatch. The shared
|
|
2235
|
-
reasoning extractor ({§reasoning-operations}) admits every operation once, in
|
|
2236
|
-
source order. Its final READ observes that same reasoning source, including
|
|
2237
|
-
the READ itself; this is an ordinary read of already stored text, not recursion
|
|
2238
|
-
or a future-source subscription. The initial message arrives separately as an
|
|
2239
|
-
inbound SEND ({§message-arrival}). Neither initialization nor later turns
|
|
2240
|
-
manufacture a task inventory.
|
|
2241
|
-
`PLURNK_REASONING_VIEW_LINES` (alias-scoped, default in `.env.defaults`) selects this one READ's
|
|
2242
|
-
scope: `0` omits it, `-1` reads the complete rationale, and a positive integer
|
|
2243
|
-
bounds it to the first N lines. Source retention, deliberate READs, and client
|
|
2244
|
-
streaming are independent. The only other automatic reasoning READ follows an empty
|
|
2245
|
-
turn ({§reasoning-empty-turn-read}).
|
|
2246
|
-
|
|
2247
|
-
§reasoning-empty-turn-read **Operation-free reasoning is read back for recovery.** After a
|
|
2248
|
-
turn admitted under {§empty-turn} with no admitted reasoning operations, one runtime turn of the same loop
|
|
2249
|
-
(`{ producer="_plurnk", kind="operation" }`) dispatches
|
|
2250
|
-
`READ (reasoning://<worker>/<loop>/<turn>) <!-- turn N emitted no OP -->` over that turn's stored
|
|
2251
|
-
reasoning source; its receipt renders in the next packet like any other log row.
|
|
2252
|
-
`PLURNK_REASONING_EMPTY_TURN_LINES` (alias-scoped, default in `.env.defaults`) selects the scope on the same
|
|
2253
|
-
scale as `PLURNK_REASONING_VIEW_LINES`. Any admitted reasoning NOTE, FIND or READ suppresses
|
|
2254
|
-
this recovery readback. No read follows a turn without reasoning, and none follows
|
|
2255
|
-
a turn whose emission or reasoning carries a foreign tool-call grammar or leaked template token
|
|
2256
|
-
(`KnownToxins` names them); the strike and its error row are unchanged.
|
|
2257
|
-
|
|
2258
2233
|
### §log-kill-scope KILL on the log: whole items and scoped bodies
|
|
2259
2234
|
|
|
2260
|
-
AST: `{ op: "KILL", target, matcher: MatcherBody | null, lineMarker: TextLineMarker | null, body: null }` ({§kill-scope} and {§matcher-option} in the contracts SPEC own the grammar).
|
|
2235
|
+
AST: `{ op: "KILL", target, matcher: MatcherBody | null, lineMarker: TextLineMarker | null, body: string | null }` ({§kill-scope} and {§matcher-option} in the contracts SPEC own the grammar); the body is a log target's distillation ({§log-kill-distillation}) and null otherwise.
|
|
2236
|
+
|
|
2237
|
+
§log-kill-distillation **A log KILL may say what it keeps.** A body on a `log:///` KILL is the model's distillation of what the KILL retires. Whatever the kill's outcome, the body lands as the model's own NOTE row at the next sequence of the same turn — written after the kill's receipt, so it never falls inside the kill's own selection — carrying `attrs.distilled` with the KILL's target as written, so a distillation is distinguishable from a free NOTE while it renders, weighs and curates exactly as one; the dispatch reports two rows written. A kill that misses keeps its distillation beside its visible receipt: what the model wrote about its environment is recorded for the model to possess and retire, never dropped for where the kill aimed. A whitespace-only body is a plain KILL. The kill's own receipt stays hidden as any successful log KILL's does ({§context-verbs}).
|
|
2261
2238
|
|
|
2262
2239
|
KILL deletes context from the **log** (`log:///`, {§packet}). Without a scope it retires the selected rows from the active projection ({§log-history-projection}). With a one-line or inclusive two-line scope it removes only that body's intersecting body-relative physical lines from the readable projection, and the row stays active. An anchor may be one published on that body or one returned by READing its `log:///` coordinate ({§line-anchors}); an anchor absent from the current body selects no line, as with an out-of-bounds numeric line. Scoped KILL is one-way: intervals accumulate, the durable body is untouched, and subsequent access follows {§log-readable-projection}. A scoped KILL on a bodyless row is a friendly 200 no-op with `matched` reported. An emission row is curated whole ({§emission-row}): a scope covering every line retires it like an unscoped KILL; on its exact coordinate a narrower scope is 422 `emission-curated-whole`, whose recovery names both forms that retire it; a sweep leaves it intact. A KILL that addresses no row is 404 on an exact coordinate and 204 on a sweep ({§log-curation-folder-idiom}). Selection composes target/glob with an optional heading pattern ({§log-curation-set-selection}). Parameterless KILL instead requests completion ({§kill-conclusion}).
|
|
2263
2240
|
|
|
@@ -2273,7 +2250,7 @@ A READ carrying active native media is atomic: any KILL scope is ignored and the
|
|
|
2273
2250
|
| Deliberate scoped KILL | Current projection `folded`, initially empty | Packet, READ, FIND, COPY, and search omit those lines; later retrieval cannot undo trimming. |
|
|
2274
2251
|
|
|
2275
2252
|
Packet display combines both masks. Other consumers use only deliberate trimming.
|
|
2276
|
-
`
|
|
2253
|
+
`tokens` prices the materialized observation, never absent body content.
|
|
2277
2254
|
Coordinates and anchors retain the original body's physical lines; selection occurs
|
|
2278
2255
|
before omitted lines are removed, and sparse receipts retain their original line
|
|
2279
2256
|
ordinals. Automatic previews remain retrieval bounds, not deletions. COPY can read
|
|
@@ -2296,14 +2273,14 @@ type and projection facts under {§read-bytes}.
|
|
|
2296
2273
|
The `## Log` section is a sequence of ordinary Markdown records separated by one blank line:
|
|
2297
2274
|
|
|
2298
2275
|
```text
|
|
2299
|
-
### log:///<loop>/<turn>/<item>/<leaf> → path pattern · <
|
|
2276
|
+
### log:///<loop>/<turn>/<item>/<leaf> → path pattern · <tokens>
|
|
2300
2277
|
{"oneLine":"strict JSON facts"}
|
|
2301
2278
|
<coordinate-prefixed body lines when visible>
|
|
2302
2279
|
```
|
|
2303
2280
|
|
|
2304
2281
|
| Line | Content | Rule |
|
|
2305
2282
|
|---|---|---|
|
|
2306
|
-
| H3 | Only the row's complete READ address, addressed resource(s), selection pattern(s), and ` · ` followed by its `
|
|
2283
|
+
| H3 | Only the row's complete READ address, addressed resource(s), selection pattern(s), and ` · ` followed by its `tokens` charge ({§packet-token-accounting}). | Always present. Canonical operands follow arrows ({§log-address-metadata}); each pattern follows its operand. No invocation parentheses, scope, aside or metadata block. The operation appears only in the URI leaf. |
|
|
2307
2284
|
| facts | One strict JSON object in stable alphabetical order. | Present only when a fact exists. Asides, scopes, opaque invocation metadata and result facts belong here, not on the H3. |
|
|
2308
2285
|
| body | Coordinate-prefixed lines. | Present when the row is visible. |
|
|
2309
2286
|
|
|
@@ -2380,16 +2357,16 @@ Authored `metadata` retains its opaque ordered block strings under {§scheme-met
|
|
|
2380
2357
|
until its row is KILLed: an uncaptioned native part on the user turn reads as a fresh arrival (#899).
|
|
2381
2358
|
Model-response settlement never consumes an observation. KILL follows
|
|
2382
2359
|
{§log-kill-scope}; forks inherit the snapshot and ordinary projection state independently. Output withholding
|
|
2383
|
-
suppresses the complete native part under {§context-
|
|
2360
|
+
suppresses the complete native part under {§context-fit}. Unsupported routes receive only the
|
|
2384
2361
|
text projection and no native charge; switching back to a compatible route exposes still-retained media.
|
|
2385
|
-
Each included part contributes `tokensAttachment` within `
|
|
2362
|
+
Each included part contributes `tokensAttachment` within `tokens`: `ceil(width × height / 750)` for an
|
|
2386
2363
|
image, `pages × 1500` for a document, `ceil(duration × 32)` for audio, or `ceil(bytes / 4)` when page count
|
|
2387
2364
|
or duration is unknown. Byte ranges select
|
|
2388
2365
|
hexadecimal text, never crop the native resource. Retries reuse the frozen request; model-call evidence
|
|
2389
2366
|
records the exact READ coordinates sent without controlling retention. Missing immutable bytes are an
|
|
2390
2367
|
internal integrity failure, never silently dropped content. No ejection message or permanent teaching is
|
|
2391
2368
|
added. These stable curation weights are not provider-token measurements ({§tokenomics-render-weight-budget}).
|
|
2392
|
-
- §packet-token-accounting Every row reports one `
|
|
2369
|
+
- §packet-token-accounting Every row reports one `tokens` charge on its H3 ({§log-wire-format}): its complete materialized H3, facts, visible body, selected native attachment, and the emission it delivers outside its record ({§emission-row}). The completed record is measured to a fixed point, including the accounting field itself. No `tokensBody`, `tokensMetadata`, or `tokensActive` field is serialized. Hidden text is not charged; metadata-only rows still have a reclaimable charge. Source/FIND-item `tokens` measure source content, not the observation's context footprint. A FIND's nonzero `itemsTokenTotal` weighs the complete matched set; a nonzero `returnedItemsTokenTotal` appears only when the returned page differs. All use stable curation weights, not provider tokens or dollars. Native component accounting follows {§packet-attachment-parts}; ordinary addressability and truthful errors follow {§log-wire-format}.
|
|
2393
2370
|
|
|
2394
2371
|
### §retrieval-packet-metadata READ/FIND packet metadata
|
|
2395
2372
|
|
|
@@ -2421,7 +2398,7 @@ or `all`. FIND range cardinality replaces top-level `items`, `lines`, and
|
|
|
2421
2398
|
`matchingPathCount`; line READ likewise omits the rendered-body `lines` count
|
|
2422
2399
|
and its internally resolved whole-line region. Exact READ formats its region
|
|
2423
2400
|
as `range`. A failed retrieval's Problem owns its range extension rather than
|
|
2424
|
-
repeating it at top level. `
|
|
2401
|
+
repeating it at top level. `tokens` weighs the complete rendered record
|
|
2425
2402
|
under {§packet-token-accounting};
|
|
2426
2403
|
generic body `lines` remains available on READ-shaped materialization notices
|
|
2427
2404
|
that have no retrieval extent. FIND content weights follow {§log-wire-format};
|
|
@@ -2448,15 +2425,32 @@ like any other row.
|
|
|
2448
2425
|
| When | An inference turn that admitted at least one content statement. Reasoning-only turns, including initialization ({§worker-initialization-entry}), a programmatic batch, an empty turn ({§empty-turn}), a client operation and a rejected attempt ({§rejected-emission-entry}) announce nothing. |
|
|
2449
2426
|
| Place | After the turn's inputs (arrivals, deltas, open-path READs) and before its reasoning NOTEs and operations, written after the selection snapshot ({§turn-ops-selection-snapshot}): the emission sits between what the worker had seen and what it caused. |
|
|
2450
2427
|
| Row | A `_plurnk` READ of the turn's own source, `ops://<worker>/L/T`, with `attrs.kind="emission"` and the canonical leaf `/emission`: `### log:///L/T/S/emission → ops://<worker>/L/T · N`. It renders its author, the turn's producer, as `origin`, so a model's row carries none. It is no operation: no receipt, tool call or strike, and outside the op mix. |
|
|
2451
|
-
| Body | Frozen at announcement: the canonical rendering ({§statement-rendering}) of admitted content statements, each in a closed fence. Each body appears
|
|
2428
|
+
| Body | Frozen at announcement: the canonical rendering ({§statement-rendering}) of admitted content statements, each in a closed fence. Each body appears as its head, about a hundred tokens of curation weight — enough to recognise the turn, never enough to matter to the budget ({§context-fit}) — and a longer body ends in an ellipsis (`…`) with its closing fence carrying `<!-- … READ (ops://<worker>/L/T) -->`; nothing the harness writes enters a fence. Absent and empty bodies remain empty. All heading operands, scopes, metadata, patterns and asides remain. Free text and unadmitted forms are absent; a recovered native call ({§native-tool-calls}) appears as the operation it was read as; an operation whose receipt failed stays. Reasoning operations retain their own source and normal receipts, never an assistant-content copy. No body text is inspected for nested operations. |
|
|
2452
2429
|
| Sources and memory | Dispatch and immutable `ops://` sources retain complete bodies ({§turn-source-resources}); an explicit source READ returns them normally. The wire omits NOTE and WAIT blocks, whose own rows show them whole ({§body-projection}), so curating a NOTE row removes its text; an emission of only NOTE and WAIT delivers nothing, its row stands, and no assistant message follows it ({§packet-wire-envelope}); reasoning-only NOTEs never enter this projection. |
|
|
2453
2430
|
| Stability | The projection is fixed from its first appearance, never aged or resized under budget pressure. Already frozen announcements and historical request captures are not rewritten. |
|
|
2454
2431
|
| Presentation | Born folded: the record shows its header, and its body follows the record as the worker's assistant message. |
|
|
2455
|
-
| Accounting | `
|
|
2432
|
+
| Accounting | `tokens` charges the record and the emission the wire delivers, truncation asides included, never the omitted NOTE and WAIT blocks or the cut remainder ({§packet-token-accounting}). An explicit source READ has its own ordinary charge. |
|
|
2456
2433
|
| Curation | Curated whole ({§log-kill-scope}): KILL retires it, and so does a scope covering every line (`<1,-1>`); on its exact coordinate a narrower scope is 422 `emission-curated-whole`, and a sweep whose scope would only trim it leaves it intact. |
|
|
2457
2434
|
| Schema | Migration 12 admits `kind="emission"` only on this shape: one per turn, the turn's newest row when written, frozen, and curated whole. A database from before version 12 keeps its rows and gains no announcement. FORK copies it with the inherited turns, still naming its writer. |
|
|
2458
2435
|
| Echoes | A worker that repeats the heading in its own text is tolerated ({§fabricated-log-entry}); the digest counts the echoes. A worker that copies the truncation aside onto its own closer keeps its body intact; the aside is outside text ({§outside-text}). |
|
|
2459
2436
|
|
|
2437
|
+
### §reasoning-row The reasoning row
|
|
2438
|
+
|
|
2439
|
+
The model's memory of its own reasoning, behind `PLURNK_SERVICE_REASONING_ROWS` (default `1`):
|
|
2440
|
+
when it is `1`, every model turn that reasoned lands its reasoning as one row of its
|
|
2441
|
+
own, `log:///<loop>/<turn>/<sequence>/reasoning → reasoning://<worker>/<loop>/<turn>`, the harness's
|
|
2442
|
+
READ of the turn's reasoning source, immediately before the turn's emission row, so the transcript
|
|
2443
|
+
reads what the model thought and then what it emitted, and the assistant message that follows stays
|
|
2444
|
+
the canonical program ({§emission-row}, {§packet-wire-envelope}).
|
|
2445
|
+
|
|
2446
|
+
| Concern | Rule |
|
|
2447
|
+
|---|---|
|
|
2448
|
+
| Room | The row lands whole only when the packet has room for it after everything else the turn lands, one receipt's reserve kept for the emission row's head ({§context-fit}); without room, no row lands and nothing else in the turn changes: no prefix, no receipt, no other row touched. |
|
|
2449
|
+
| Body | The model's own text, complete ({§markerless-first-page}); the complete reasoning stays readable at its address by any scope ({§turn-source-resources}). |
|
|
2450
|
+
| Weight | Charged like any row, visible in the gauge and its `largest` ({§context-gauge}). |
|
|
2451
|
+
| Curation | The verbs alone: a KILL retires it like any row ({§context-verbs}); the daemon reorders nothing and un-bodies nothing on its account. |
|
|
2452
|
+
| Absence | Means no room or no reasoning; the model tells them apart by reading `reasoning://` for the turn. |
|
|
2453
|
+
|
|
2460
2454
|
### §turn-source-resources Immutable turn-source resources
|
|
2461
2455
|
|
|
2462
2456
|
| Surface | Contract |
|
|
@@ -2875,11 +2869,10 @@ accounting and model-visible failure evidence remain separately owned by
|
|
|
2875
2869
|
filters what is stored. The model hears only the weight: the next packet's Notices section
|
|
2876
2870
|
carries `outside_text: N tokens emitted outside OPs. Discarded.`, N by {§tokenomics-agnostic-ruler};
|
|
2877
2871
|
the text itself never enters a packet, not even inside its turn's emission ({§emission-row}), is never delivered and never concludes.
|
|
2878
|
-
{§empty-turn} still strikes a turn that holds only text, with unchanged
|
|
2879
|
-
|
|
2872
|
+
{§empty-turn} still strikes a turn that holds only text, with unchanged
|
|
2873
|
+
reply accounting and completion rules. A log-entry heading in
|
|
2880
2874
|
outside text still rejects the attempt unless it echoes an emission row ({§fabricated-log-entry}); an unfenced operation line is
|
|
2881
|
-
not response text ({§unfenced-operation}) and so never reaches the source
|
|
2882
|
-
only the read-back ({§reasoning-empty-turn-read}). Clients receive the text once through
|
|
2875
|
+
not response text ({§unfenced-operation}) and so never reaches the source. Clients receive the text once through
|
|
2883
2876
|
`outside/event` ({§notifications-outside-event}, {§agui-outside-text}); FORK snapshots the
|
|
2884
2877
|
source with the turn's others; the digest names its weight. It has no address: there is no
|
|
2885
2878
|
`outside://` scheme, and exact emissions remain at `ops://`. This is evidence, not an alternate
|
|
@@ -2895,12 +2888,11 @@ accounting and model-visible failure evidence remain separately owned by
|
|
|
2895
2888
|
remains that turn's emission. A concluded child's `loop_termination` row to its parent
|
|
2896
2889
|
READs this same loop resource. Witness: `test/intg/loop-answer.test.ts`.
|
|
2897
2890
|
- §empty-turn **No authored response operation is a recoverable turn, never completion.**
|
|
2898
|
-
Count parsed content operations and reasoning
|
|
2899
|
-
|
|
2891
|
+
Count parsed content operations and admitted reasoning operations ({§reasoning-operations}), a NOTE in
|
|
2892
|
+
either channel among them; outside text ({§outside-text}) never enters the count. When none exist and no boundary was lost, retain the turn
|
|
2900
2893
|
and its raw sources and count one progress-contract strike, whether or not the turn carried text. The strike sends no notice of its own: the turn records one `_plurnk`
|
|
2901
2894
|
error row, `422` `The turn performed no operation.`, which rides the next packet's errors like
|
|
2902
|
-
any failure ({§operation-result-uniform-error-channel})
|
|
2903
|
-
model under {§reasoning-empty-turn-read}; the threshold terminal still says why ({§engine-rails}).
|
|
2895
|
+
any failure ({§operation-result-uniform-error-channel}); the threshold terminal still says why ({§engine-rails}).
|
|
2904
2896
|
An empty turn uses its exact text as the cycle fingerprint ({§engine-cycle-evidence});
|
|
2905
2897
|
different empty programs are not a repeated cycle merely because neither contained
|
|
2906
2898
|
operations. Lost-boundary handling remains {§unparsed-tail-boundary}; no confirmation
|
|
@@ -3907,9 +3899,7 @@ Each knob's value lives on its panel and nowhere else (`plurnk-service config de
|
|
|
3907
3899
|
| `PLURNK_SERVICE_PROVIDER_RECOVERY_BACKOFF` | First recovery delay (ms); doubles per failure up to `PLURNK_SERVICE_PROVIDER_RECOVERY_BACKOFF_MAX` ({§provider-recovery}). |
|
|
3908
3900
|
| `PLURNK_SERVICE_MAX_STRIKES` | Consecutive turn-contract strike threshold ({§engine-rails}). |
|
|
3909
3901
|
| `PLURNK_SERVICE_EMISSION_ATTEMPTS` | Completed provider responses allowed beneath one engine turn before frame admission is exhausted. Bounded interior operation errors are admitted without spending this budget. Exhaustion contributes one frame-contract strike under {§invalid-emission-attempts}. |
|
|
3910
|
-
| `
|
|
3911
|
-
| `PLURNK_SERVICE_PREVIEW_CHARS` | Independent Unicode code-point bound on the same previews, with CRLF treated as one indivisible separator ({§body-projection}). |
|
|
3912
|
-
| `PLURNK_SERVICE_PROMPT_PROJECTION` | Aggregate curation-weight share of the provider-derived input capacity available to the automatic projection of arrivals from outside the workspace ({§message-projection}); alias-scoped overrides are supported. |
|
|
3902
|
+
| `PLURNK_SERVICE_BUDGET_LARGEST_ITEMS` | How many of the heaviest retained log rows the gauge names ({§context-gauge}). |
|
|
3913
3903
|
| `PLURNK_SERVICE_LINE_ANCHOR_CONTEXT_LINES` | Minimum neighboring lines hashed on each side; repeated handles expand their context ({§line-anchor-disambiguation}). |
|
|
3914
3904
|
| `PLURNK_SERVICE_EDIT_RECEIPT_CONTEXT_LINES` | Surrounding and landed lines shown at each EDIT result boundary ({§edit-result-receipt-projection}). |
|
|
3915
3905
|
| `PLURNK_SERVICE_MIN_CYCLES` | Min repetitions before cycle detection fires ({§engine-rails}). |
|
|
@@ -4908,7 +4898,7 @@ without an origin filter ({§actor-boundary-isolation}).
|
|
|
4908
4898
|
|
|
4909
4899
|
`PacketBuilder.buildRequestPacket` owns the engine's default ordered section
|
|
4910
4900
|
list. Trusted scheme plugins may transform that first-class list before it is
|
|
4911
|
-
rendered or measured; {§context-
|
|
4901
|
+
rendered or measured; {§context-fit} remains an engine-owned post-build rail.
|
|
4912
4902
|
|
|
4913
4903
|
```mermaid
|
|
4914
4904
|
flowchart LR
|
|
@@ -4985,44 +4975,39 @@ trust gate; an external client action cannot invoke it. Whole-list transformatio
|
|
|
4985
4975
|
the fork-avoidance valve for alternate packet shapes, while
|
|
4986
4976
|
overflow recovery and packet projection remain closed engine concerns.
|
|
4987
4977
|
|
|
4988
|
-
### §tokenomics
|
|
4978
|
+
### §tokenomics The context budget: one room, one gauge, one rule
|
|
4989
4979
|
|
|
4990
4980
|
Token accounting distinguishes the artifact being measured, the unit, and the
|
|
4991
4981
|
time of measurement.
|
|
4992
4982
|
|
|
4993
4983
|
| Fact | Owner and unit | Time | Contract |
|
|
4994
4984
|
|:-----|:---------------|:-----|:---------|
|
|
4995
|
-
| Core curation weight | `contentWeight = ceil(chars/2)` over channel content, canonical log bodies, rendered packet slots, and placed emissions | Write/build | Stable, model-independent
|
|
4996
|
-
| §tokenomics-context-envelope-admission Provider input capacity | Provider model limits
|
|
4985
|
+
| Core curation weight | `contentWeight = ceil(chars/2)` over channel content, canonical log bodies, rendered packet slots, and placed emissions | Write/build | Stable, model-independent measure; never a tokenizer claim. The model meets it as `tokens`. |
|
|
4986
|
+
| §tokenomics-context-envelope-admission Provider input capacity | Provider model limits, the configured output reservation and the output floor, in provider tokens | Before every logical request | The reservation `min(maxInputTokens, contextWindow − outputBudget)` sizes the room; the wall `min(maxInputTokens, contextWindow − outputFloor)` decides admission ({§provider-capacity-admission}). The provider alone measures the complete request and admits it — with the grant flexed when the prompt is over the reservation — defers it, or rejects it at the wall. |
|
|
4997
4987
|
| Provider generation envelope | Provider response grant and optional reasoning subset, in provider tokens | Before every logical request | The reservation includes hidden reasoning; its strict reasoning subset is never additive. The response grant follows {§provider-flexed-allowance}. |
|
|
4998
4988
|
| Provider usage and cost | Provider-reported input/output/cache/reasoning tokens and monetary evidence | After every physical request | Durable physical-request forensics under {§provider-usage}; never curation state or a preflight estimate. |
|
|
4999
4989
|
|
|
4990
|
+
- §context-budget **One room.** The budget is the provider's input capacity converted to curation weight under {§tokenomics-calibrated-readout}, and it bounds the whole packet — teaching, catalog, log and gauge together. Nothing on the service panel sizes a part of it: no projection share, no preview page, no pressure threshold. Within a loop the room never shrinks: a packet's budget is the greater of the calibrated capacity and the loop's high-water budget for that input capacity, so a refined conversion can enlarge the room but never turns a packet the model already answered into an overflow.
|
|
4991
|
+
- §context-gauge **One gauge.** Every packet carries one `## Context` section holding one JSON object: `tokens`, the packet's weight as rendered; `budget`, the room; and `largest`, the `PLURNK_SERVICE_BUDGET_LARGEST_ITEMS` heaviest retained log rows as `{path, tokens}` ranked by weight then path. Each log row heading carries its own `tokens`. The gauge is state: it never presents `budget − tokens` as response allowance, it carries no mandate, and it reads the same at one percent as at ninety-nine; over budget, `largest` is as complete as under it, since those rows are the handles the row asks the model to use ({§context-over-budget-row}).
|
|
4992
|
+
- §context-fit **One rule: whole if it fits, otherwise as much as fits, then its size and address.** A result the model asked for — a READ without a scope, a FIND, an exec result delivered on close — arrives complete when its weight fits within `budget − tokens` as of that turn, less the room the turn still owes — one receipt's measured weight for each result still to land in it and the head of the emission that answers it, so that the receipts of a batch and the answer always fit. Otherwise the complete result stays where it was read from and the row is a `413` receipt naming the result's size, its weight, the remaining budget, and the two verbs: `READ` a range, or `KILL` first. A READ of lines carries, above its receipt, the longest prefix of those lines whose row fits that room — the lines with their anchors, the returned range closed on the last line delivered, and the receipt naming the lines delivered; a result whose first line does not fit, a FIND, a stream page and a byte view are bodiless receipts. An arrival the model did not ask for — an inbound `SEND`, a child's conclusion — takes the same bodiless receipt as a fact, not an error: its size and its address. Explicit scopes (`<a,b>`, a pattern, `<1,-1>`) are exact and take the same test. Three cuts are automatic and each is named where it happens: the first page of what came back unasked in size ({§markerless-first-page}), the cut at the room in the receipt, and an emission row's head ({§emission-row}); nothing else is previewed, projected, withheld or paged on the model's behalf.
|
|
4993
|
+
- §context-verbs **The verbs are the curation.** `READ` with a range takes a piece of what did not fit ({§read-selection-projection}); `NOTE` keeps what the model learned; `KILL` retires rows, ranges and bodies ({§log-kill-scope}) and may carry what it keeps of them as its own NOTE ({§log-kill-distillation}). The daemon adds no other mechanism.
|
|
4994
|
+
- §context-over-budget-row **Over budget is a row and a request, not an ending.** A packet whose weight exceeds `budget` is still submitted when it fits the window ({§context-wall}), and it carries one `_plurnk` error row at the head of its turn, `engine/context/packet-exceeds-budget` 413: "Context exceeds budget. YOU MUST ONLY KILL, MOVE or NOTE this turn." The row is the mandate and carries no figure: the gauge is the one home for `tokens` and `budget` ({§context-gauge}), and it shows the packet over with the row in it. The row recurs on every packet that is over, and nothing is hidden to make the packet smaller; the response grant is the window's remainder above the provider's output floor ({§provider-output-floor}). The limit protects a loop; it never ends one.
|
|
4995
|
+
- §context-wall **Only the window ends a loop.** The wall is the provider's physical input limit: `maxInputTokens`, and the context window less the output floor ({§provider-output-floor}); the packet's tokens are its weight through the calibration factor ({§tokenomics-calibrated-readout}), so an uncalibrated ruler only overestimates. A packet over the wall first lands its newest rows bodiless ({§context-own-rows-fit}); a packet that cannot fit the wall even as receipts terminalizes with the exact `engine/context/window-overflow` 413 Problem without provider I/O. An unknown window has no wall ({§tokenomics-window-unpollable-deliberate}).
|
|
4996
|
+
- §context-own-rows-fit **The model's own rows take the same receipt.** When a packet would exceed the wall, its newest rows that still carry a body or a native part — NOTEs, receipts, delivered results, pictures — render bodiless in the fit rule's receipt shape, newest first and only as many as it takes for the packet to fit: the heading, the facts, and `size`, the lines and tokens of what the row stood for. An emission row is never taken, so its head-cut program keeps the turn legible, and a row whose receipt would weigh no less than its body stays whole. Every body stays stored and readable at its address, the verbs restore the room ({§context-verbs}), and each packet decides afresh from its own newest rows. The daemon chooses nothing to summarize and hides nothing silently.
|
|
4997
|
+
- §context-output-selection **Retired, column kept.** Migration 6's `output_admission_turn_id` recorded first-presentation admission under the former withholding rule; the rule is gone and the column stays in the schema unread, as released migrations are frozen ({§db-migrations}).
|
|
5000
4998
|
- §tokenomics-weight-stored-at-write **Curation weight, stored at write.** `entry_channels.weight` weighs the complete channel content. `log_entries.weight` weighs the complete canonical `LogBody` content before coordinate and packet presentation; persistence `tx`/`rx` envelopes contribute nothing merely by existing, and proposal settlement recomputes the value when the canonical result changes. Bodyless rows therefore weigh zero. The stored number is a stable content-depth measurement, not a provider-token prediction. `entry_channels.lines` is the channel's line count beside it, a stored generated column SQLite keeps on every write as the persisted mirror of {§logical-line-count} (a trailing newline terminates the last line; empty content has none), so a catalog lists extent without reading bodies.
|
|
5001
|
-
- §tokenomics-render-weight-budget **Packet curation budget.** `
|
|
5002
|
-
- §tokenomics-calibrated-readout **Convert capacity, never content costs.** Before packet assembly, Core obtains the answering model's last five settled emission responses pairing a measured packet weight with a provider-reported prompt count. The conversion factor is `sum(reported) / sum(weight)`; fewer than three samples use 1. `
|
|
4999
|
+
- §tokenomics-render-weight-budget **Packet curation budget.** `tokens` measures the *complete assembled packet* after section transforms and readout substitution, its rendered slots and the emissions it places ({§emission-row}); it is not a sum of stored row weights ({§tokenomics-weight-stored-at-write}). Core measures minimum-width probes, monotonically expands fields that do not fit, then right-aligns final values into those widths; final substitution is length-invariant and the displayed total equals the stored request weight. Receipt, FIND-item, pressure-inventory, total, and ceiling figures all use the same curation ruler. A `SUM` of stored content weights measures a different artifact and cannot substitute for packet render weight.
|
|
5000
|
+
- §tokenomics-calibrated-readout **Convert capacity, never content costs.** Before packet assembly, Core obtains the answering model's last five settled emission responses pairing a measured packet weight with a provider-reported prompt count. The conversion factor is `sum(reported) / sum(weight)`; fewer than three samples use 1. `floor(inputCapacity / factor)` converts provider capacity into curation units; a loop's budget is that figure or its high-water for the same capacity, whichever is greater ({§context-budget}). Zero means no whole curation unit fits; unknown input capacity remains `null`. The built packet captures this allowance once for its readout, pressure inventory, overflow admission, and persisted client gauge. Later responses cannot change that packet's allowance. Samples are model-keyed, not worker-local; a model with no samples starts at 1. Calibration never changes stored weights, rendered receipt costs, or the immutable request history ({§tokenomics-agnostic-ruler}).
|
|
5003
5001
|
- §tokenomics-window-partition **One capacity derivation; no service-side token budget.** The provider owns model limits, the configured output reservation, and each call's response grant. Its resolved `inputCapacity` supplies the physical denominator exposed to clients and the boundary conversion into curation units ({§tokenomics-calibrated-readout}). Core shapes context in curation units; provider request-shaped evidence alone admits or rejects physical I/O. `PLURNK_SERVICE_PROMPT_BUDGET`, `PLURNK_SERVICE_SAFETY`, and the additive reasoning/completion reserve knobs are retired; local and custom deployments tune context window, total output budget, optional reasoning subset, and prompt-projection percentage at their owning layers.
|
|
5004
|
-
- §tokenomics-
|
|
5005
|
-
`PLURNK_SERVICE_PROMPT_PROJECTION` is a required alias-scoped percentage in
|
|
5006
|
-
`(0, 100)`. It allocates that share of the cold-start curation allowance
|
|
5007
|
-
(the capacity conversion with factor 1) to the aggregate automatic prompt-body
|
|
5008
|
-
projection. Rolling calibration does not resize existing prompt bodies; only
|
|
5009
|
-
the overall curation ceiling adapts. This does not bound stored prompt
|
|
5010
|
-
size, provider capacity, an explicit READ/FIND result, or the complete packet.
|
|
5011
|
-
Basing the share on configured capacity rather than current free weight or
|
|
5012
|
-
sampled conversion keeps one prompt's projection byte-stable as the log and
|
|
5013
|
-
calibration samples evolve.
|
|
5014
|
-
- §tokenomics-window-unpollable-deliberate **Unknown provider capacity stays unknown.** When the provider cannot derive `inputCapacity`, Core omits denominator-dependent curation telemetry and uses the ordinary bounded prompt projection. The provider still sends requests whose measurement or limits are estimates or unavailable: ambiguity defers to the upstream capacity oracle rather than becoming a local rejection.
|
|
5002
|
+
- §tokenomics-window-unpollable-deliberate **Unknown provider capacity stays unknown.** When the provider cannot derive `inputCapacity`, there is no budget: the gauge carries `tokens` alone, every result arrives whole, and the provider remains the capacity oracle ({§provider-capacity-admission}). Core never invents a stand-in.
|
|
5015
5003
|
|
|
5016
5004
|
§tokenomics-client-gauge **Clients receive curation and physical occupancy as separate pairs.** `loop/terminated.usage` carries latest packet-bearing model-turn `curationWeight`/`curationBudget` and latest-emission-call `contextTokens`/`contextCapacity`; each unknown fact is `null`. The curation pair is the packet's measured weight and captured allowance, exactly as displayed to the model, not a recalculation using newer usage evidence. Packetless chronology cannot erase an assembled-request gauge. Both physical facts bind to that same call: a preflight rejection may report capacity while its absent physical request leaves `contextTokens=null`, never borrowed from an earlier call. Clients never divide provider-reported physical tokens by Core curation weight. `providers.list` exposes each instantiated alias's `inputCapacity`. A model switch replaces the latest-turn facts together; aggregate provider accounting remains cardinal monetary evidence, not a gauge input.
|
|
5017
5005
|
|
|
5018
5006
|
- **Derivation is exhaustive and demand-led.** Explicit searchable-resource changes may start one coalesced warm. Passive creation and attachment do not. The first model turn starts or joins that warm; later turns derive intervening changes before dispatch. No model operation observes partial graph or full-text coverage. Progress notices make the wait visible. {§derivation-exhaustive}
|
|
5019
5007
|
- §membership-binary-sniff **Binary truth beats a text label.** Filesystem source acquisition, including tracked members and installed skill resources, inspects up to the first 8192 bytes when extension detection does not identify a binary type. NUL marks `application/octet-stream`; existing binary types retain their declared type. Member projections follow {§membership-source-projection}; installed skill projections follow {§skills-resources}.
|
|
5020
5008
|
- §tokenomics-agnostic-ruler **One model-agnostic curation ruler.** The daemon runs workers on different models in one workspace concurrently, while catalog and log accounting are workspace-wide. `contentWeight = ceil(chars/2)` therefore gives one content one stable number without per-model workspace state or recount passes. It controls curation only; every provider call independently measures the complete request as well as it can.
|
|
5021
|
-
- §tokenomics-neutral-telemetry **Curation telemetry is state, not response allowance.** The model-facing `Context Curation` section is one JSON object carrying `logTokensTotal` and `logTokensMax`. It never presents their difference as free response tokens. The protocol definition directly requires KILL of irrelevant log items and ranges to keep the next packet within the maximum. Per-entry weights remain on log rows where they describe visible cost and curation savings. Generic packet composition and physical-token speculation are absent.
|
|
5022
|
-
- §tokenomics-pressure-inventory **Pressure identifies its reclaimable concentration.** At `PLURNK_SERVICE_BUDGET_PRESSURE` of `logTokensMax`, a Markdown `> [!WARNING]` block follows the JSON with `> YOU MUST KILL superseded, stale, or irrelevant log items and ranges.` New output withholding replaces that mandate under {§context-output-warning}. The JSON may include `logTokensLargest`: at most `PLURNK_SERVICE_BUDGET_LARGEST_ITEMS` retained log items, each `{path, logTokens}`, ranked by that charge descending and then path. Native-only, suppressed, and metadata-only items remain eligible: whole-item KILL can reclaim their actual contribution. Include the largest prefix that fits; drop the optional list before the warning. Both participate in the final fixed-point total and complete request admission check.
|
|
5023
5009
|
- §tokenomics-content-hash-identity **Content identity, not per-tokenizer counts.** A settled channel's `content_hash` (SHA-256) is its body's identity in the content store ({§content-store}); a writer may bind it, a bound hash must match the content, and an active stream has none until it settles. `weight` is stored beside that content and is never keyed or recomputed by model.
|
|
5024
5010
|
- §tokenomics-provider-usage **Provider accounting is physical-request evidence, not curation state.** Every issued physical request has one durable pre-I/O `provider_requests` identity beneath the normalized {§inference-ledger} and settles once as response or error. Each record preserves conventional {§provider-usage} quantities and required {§provider-cost} evidence; an unreported quantity remains absent, including on response-less failures, and is never replaced by zero. `model_calls` own response/failure evidence, `turn_attempts` specialize emission admission, and `provider_requests` are the sole durable accounting representation. Emissions, BARE calls, rejected responses, retries, failovers, and errors therefore remain cardinal and ordered. Turn, loop, worker, workspace, digest, and protocol accounting are derived from those records through the shared {§provider-accounting} projection; only emission calls contribute the latest-packet context gauge. The baseline stores no floating-point money, denormalized totals, or rollup triggers. A documented direct charge becomes `charged`; otherwise the provider may compute an exact-decimal USD `estimated` amount from complete usage and the exact model's Models.dev rates; insufficient evidence becomes `unknown`. Complete totals and known subtotals remain distinct under {§provider-accounting}; unknown requests cannot impersonate free requests, and missing usage never becomes zero. This is operational request accounting, not invoice reconciliation. Output and reasoning are quantities the model cannot KILL, so they never alter the model-facing Budget ledger.
|
|
5025
|
-
- §tokenomics-negative-pressure **Negative curation pressure is honest but never submitted.** The provisional readout may report `logTokensTotal` above `logTokensMax`. Crossing the maximum withholds new returned output under {§context-output-admission}; no over-ceiling packet reaches `provider.generate`. Output admission creates neither a strike nor another turn.
|
|
5026
5011
|
|
|
5027
5012
|
Each physical request also retains {§provider-request-evidence}, atomically
|
|
5028
5013
|
with its accounting settlement. Failure does not discard received fragments.
|
|
@@ -5031,44 +5016,6 @@ including unavailable evidence as `null`, reading heavy records one at a time.
|
|
|
5031
5016
|
Failed partial operations and reasoning remain forensic data only; they never
|
|
5032
5017
|
execute, enter model history, or become a later request's successful output.
|
|
5033
5018
|
|
|
5034
|
-
### §context-output-admission Budget enforcement: returned-output admission
|
|
5035
|
-
|
|
5036
|
-
Operations and their results are execution history. Packet admission controls
|
|
5037
|
-
only whether newly presented returned output fits, never what executed or what
|
|
5038
|
-
the model's lifecycle declaration means.
|
|
5039
|
-
|
|
5040
|
-
```mermaid
|
|
5041
|
-
flowchart TD
|
|
5042
|
-
assemble["Assemble and measure<br/>candidate request"] --> budget{"Weight ≤ curation ceiling?"}
|
|
5043
|
-
budget -->|yes| generate["Provider generate"]
|
|
5044
|
-
budget -->|no| withhold["Withhold new returned output<br/>retain receipts and add overflow metadata"]
|
|
5045
|
-
withhold --> verify{"Request with warning fits?"}
|
|
5046
|
-
verify -->|yes| generate
|
|
5047
|
-
verify -->|no| stop["Terminal 413"]
|
|
5048
|
-
generate --> capacity{"Provider capacity failure?"}
|
|
5049
|
-
capacity -->|no| response["Classify completed response"]
|
|
5050
|
-
capacity -->|yes| prompt{"Withholding automatic<br/>prompt bodies changes request?"}
|
|
5051
|
-
prompt -->|yes| retry["Persist failure;<br/>rebuild and retry"]
|
|
5052
|
-
retry --> generate
|
|
5053
|
-
prompt -->|no| stop
|
|
5054
|
-
```
|
|
5055
|
-
|
|
5056
|
-
§context-output-selection **First presentation, not a turn-number heuristic, owns admission.** Canonical log-body resolution distinguishes authored input from returned output. Before provider I/O, the run boundary records the first admission turn of each newly visible returned body. On measured overflow, that batch's returned bodies and native parts are withheld together. Already-admitted output, authored NOTE/lifecycle/program/message bodies, actual statuses and Problems, effects, child state, and immutable evidence remain unchanged. Bodyless and initially suppressed rows require no admission. Packet assembly is pure. No recovery turn, generated lifecycle declaration, KILL operation, strike, or extra model attempt is manufactured.
|
|
5057
|
-
|
|
5058
|
-
| Projection fact | Meaning |
|
|
5059
|
-
|---|---|
|
|
5060
|
-
| No output admission | Not yet presented as returned output; eligible on its first visible request. |
|
|
5061
|
-
| Admitted | Normal projection, thereafter controlled only by deliberate curation and existing delivery rules. |
|
|
5062
|
-
| Withheld | Body/native parts stay absent in the original receipt; freeing space does not silently restore them. |
|
|
5063
|
-
|
|
5064
|
-
§context-output-receipt A withheld receipt adds `overflow: "N output lines not shown; the log exceeded logTokensMax when this row was withheld"`, counting the output lines its normal current projection would show, not unrelated source lines. Withheld native media is named as `"N output lines and native content not shown; ..."` or, without a text body, `"native content not shown; ..."`. Its original result status and Problem are unchanged. FORK inherits admission state with the copied log. Explicit KILL still controls readable/active content independently.
|
|
5065
|
-
|
|
5066
|
-
§context-output-warning **New omission escalates the one curation warning.** The admitting request renders `> [!WARNING]` followed by `> YOU MUST ONLY KILL superseded, stale, or irrelevant log content in bulk.` beneath its JSON readout, replacing the ordinary pressure mandate even when withholding brings usage below 80%. Historical omission alone does not retrigger it. The warning participates in exact packet measurement; optional largest-items entries yield space first.
|
|
5067
|
-
|
|
5068
|
-
§context-output-hard-413 **Unfittable retained context fails honestly.** If the request still exceeds the ceiling after withholding newly presented output, it terminalizes with an exact `engine/context/token-budget-overflow` 413 Problem without provider I/O. No unrelated older history or authored memory is pruned. Separately, provider capacity failures follow {§provider-surface-capacity}: withholding automatic prompt-body projection permits a retry only when it changes the request; otherwise the exact provider-owned 413 terminates the request-only model turn.
|
|
5069
|
-
|
|
5070
|
-
- §tokenomics-fetch-fits-free **Withholding is not deletion.** The complete result lands once. READ/FIND of its original log address retain the readable body and original coordinates; scoped READ creates a fresh output occurrence subject to the same admission rule. Source resources and forensic evidence remain unchanged. Deliberate scoped KILL, unlike withholding, removes lines from subsequent readable projections ({§log-readable-projection}).
|
|
5071
|
-
|
|
5072
5019
|
- §loop-terminals **Lifecycle outcomes are HTTP-precise.**
|
|
5073
5020
|
|
|
5074
5021
|
| Status | Outcome |
|
|
@@ -5078,7 +5025,7 @@ flowchart TD
|
|
|
5078
5025
|
| 200 | Messages answered, results observed, held work settled |
|
|
5079
5026
|
| 499 | Worker-scope or client cancellation |
|
|
5080
5027
|
| 429 | Turn allowance exhausted |
|
|
5081
|
-
| 413 |
|
|
5028
|
+
| 413 | A result that does not fit ({§context-fit}), a packet over the budget ({§context-over-budget-row}: a row; the request still goes), a packet over the window ({§context-wall}), or the provider's own rejection of an exact prompt over its wall |
|
|
5082
5029
|
| 500 / 508 | Strike threshold or invalid-emission exhaustion / crossing strike caused by a cycle |
|
|
5083
5030
|
| 504 | Loop timeout or exec-timeout restamp |
|
|
5084
5031
|
|
|
@@ -5196,7 +5143,7 @@ their boundaries ({§log-wire-format}).
|
|
|
5196
5143
|
| `errors` | user | JSON status/log-path pointers | {§operation-results} |
|
|
5197
5144
|
| `notices` | user | Terse observation bullets | {§notice-drain-on-read} |
|
|
5198
5145
|
| `git` | user | Working-tree state in a NOTE blockquote | {§packet-cache-monotone} |
|
|
5199
|
-
| `budget` | user | JSON curation usage and ceiling; pressure guidance when needed | {§
|
|
5146
|
+
| `budget` | user | JSON curation usage and ceiling; pressure guidance when needed | {§context-gauge} |
|
|
5200
5147
|
| `messages` | user | JSON pointers to the loop's unanswered immutable messages, path and source | {§message-arrival} |
|
|
5201
5148
|
| `recap` | user | Optional authored operational recap | {§recap} |
|
|
5202
5149
|
|
|
@@ -5309,25 +5256,18 @@ Retired terms stay retired: the lexicon guard rejects `thinking`, the unqualifie
|
|
|
5309
5256
|
|
|
5310
5257
|
| row producer | ordinary visible projection |
|
|
5311
5258
|
|---|---|
|
|
5312
|
-
| any `READ` or `FIND` | complete
|
|
5259
|
+
| any `READ` or `FIND` | the result as its own page ({§markerless-first-page}), complete when it fit; otherwise the `413` receipt, above the longest prefix of a READ's lines that fit ({§context-fit}) |
|
|
5313
5260
|
| `NOTE`, `WAIT` | complete literal authored text |
|
|
5314
|
-
| inbound `SEND` from outside the workspace |
|
|
5261
|
+
| inbound `SEND` from outside the workspace | the operator's: complete when it fit, otherwise its size and address ({§context-fit}, {§message-projection}); a peer worker's: its first page ({§markerless-first-page}) |
|
|
5315
5262
|
| structured `EDIT` receipt or textual `COPY`/`MOVE` effects | complete receipt-owned join context |
|
|
5316
|
-
| every other nonempty body |
|
|
5317
|
-
|
|
|
5318
|
-
|
|
5319
|
-
|
|
5320
|
-
unit is whatever its projection counts, so `PLURNK_SERVICE_PREVIEW_LINES` is the first page of
|
|
5321
|
-
all of them: lines of text, bytes of a byte view ({§read-bytes}), positions of a FIND. It is one
|
|
5322
|
-
choice with one home; no operation carries a page size of its own.
|
|
5263
|
+
| every other nonempty body | the model's own: complete; what it did not author: its first page ({§markerless-first-page}); then {§context-fit} |
|
|
5264
|
+
| the `reasoning` row | the model's own reasoning, complete, or no row at all ({§reasoning-row}) |
|
|
5265
|
+
| a row the wall took | its size and address, no body and no native part ({§context-own-rows-fit}) |
|
|
5266
|
+
| bodyless row | heading and any facts; no coordinate lines; `tokens` includes any selected native part |
|
|
5323
5267
|
|
|
5324
|
-
|
|
5325
|
-
ordinary previews, before result storage and packet rendering. Explicit scopes
|
|
5326
|
-
remain exact. Automatic stream delivery uses that markerless selector too;
|
|
5327
|
-
its range or region describes the selected content and the complete stream
|
|
5328
|
-
remains addressable. This selection is not a second rendering-time cut.
|
|
5268
|
+
§markerless-first-page **What the model did not ask for in size arrives as its first page.** A READ or FIND without a scope, a stream delivered when a command closes, a peer worker's message, an environment delta, an extension's body and a rejected emission shown back all arrive as their first page: `PLURNK_SERVICE_PREVIEW_LINES` lines and at most `PLURNK_SERVICE_PREVIEW_CHARS` characters, in the projection's own units — lines of text, bytes of a byte view ({§read-bytes}), results of a FIND — with one fact in one notation stating the page and the whole, `<1,100> of 4812 lines` (`range` on a retrieval, `preview` on a stored body, {§packet-extent-metadata}). What the model authored stands whole: a NOTE, a WAIT, the body of its SEND, the prompt of its WORK or FORK, the command it handed an executor, and its own reasoning when it lands as a row ({§reasoning-row}). What it asked for exactly stands whole: an explicit scope — `<a,b>`, `<1,-1>`, a pattern — and an EDIT receipt, bounded by its own rule ({§edit-result-receipt-truth}). The operator's message keeps its own rule ({§message-projection}) and an emission row its head ({§emission-row}); those are the only exceptions, so the model can reason about every page the same way. A page lands under {§context-fit} like any result: whole when it fits the remaining budget, otherwise the prefix and receipt. Retrievals take their page at the source, before storage, and the packet applies no second cut to a stored result; a stored body takes its page in the packet, and the rest stays readable at the row's address. No operation carries a page size of its own.
|
|
5329
5269
|
|
|
5330
|
-
READ and FIND own their range or pagination before packet rendering; the packet never applies a second hidden substring bound to their selected result.
|
|
5270
|
+
READ and FIND own their range or pagination before packet rendering; the packet never applies a second hidden substring bound to their selected result. Reasoning arrives through ordinary scoped READs ({§reasoning-history}). When a visible projection differs from its canonical body, metadata carries `preview` under {§packet-extent-metadata}; complete and fully suppressed bodies omit it. ```` ```READ (log:///<coordinate>/<OP>) ```` selects untrimmed lines in original coordinates under {§log-readable-projection}; the unsuffixed exact shorthand and authoritative suffix behavior are defined by {§log-coordinate-hierarchy}. ```` ```FIND (log:///...) ```` and search match that same readable view. System/policy sections are not log bodies. Notices are transient non-log observations; they share the ordinary line/character bounds but have no durable body or recovery URI.
|
|
5331
5271
|
|
|
5332
5272
|
§message-arrival **A message source, its log observations and its reply state are distinct.**
|
|
5333
5273
|
|
|
@@ -5378,7 +5318,7 @@ additional alias. Answering either reaches the same message.
|
|
|
5378
5318
|
|
|
5379
5319
|
§message-causal-source **Message authorship and delivery are distinct facts.** The harness publishes every arrival row; the row's `source` carries the canonical address of the causal actor. Native WORK, FORK, and directed worker SEND derive `worker://<sender>` from the authenticated sender worker ID. A trusted exterior adapter supplies its own canonical actor address through {§methods-loop-run}: the AG-UI bridge names the client's message under `agui://` ({§agui-run-source}), the inbound A2A adapter under `a2a://`. An absent source is the operator. Attribution persists with the message through the inbox, parking, orphan recovery, restart, and later log projection; model syntax cannot author it. The wire renders the row's `source` in place of its `origin`, which is constant for every arrival, except where the source is the transport that minted this very message, which says nothing the address does not ({§message-short-identity}). The operator's message is then the one arrival with no sender to show, so it renders `"origin": "user"`; a bare arrival would read as the model's own SEND and hide the request it answers. The Open Messages pointer carries the same attribution ({§message-arrival}).
|
|
5380
5320
|
|
|
5381
|
-
§message-projection **Message storage is unbounded by model context;
|
|
5321
|
+
§message-projection **Message storage is unbounded by model context; its arrival in the packet is not.** Core persists every accepted message completely before packet assembly. An arrival renders complete when it fits the remaining budget ({§context-fit}) and otherwise as its size and address, where a READ of the message's log body, scoped or whole, retrieves it. A peer worker's message is received text and arrives as its first page ({§markerless-first-page}). No share of the capacity is set aside for arrivals, and no knob sizes one.
|
|
5382
5322
|
|
|
5383
5323
|
§message-loop-containment A loop contains every message that arrives before it
|
|
5384
5324
|
concludes; the next turn boundary publishes every inbox row the loop has not yet
|
|
@@ -5416,8 +5356,8 @@ retain distinct contracts and lifetimes.
|
|
|
5416
5356
|
`errors` section is a derived index over those rows from the current and
|
|
5417
5357
|
immediately prior turn: one `{status, path}` JSON object per row,
|
|
5418
5358
|
nothing else. The Problem lives on the curatable row and is READ via the path.
|
|
5419
|
-
Withheld output preserves its original result ({§context-
|
|
5420
|
-
|
|
5359
|
+
Withheld output preserves its original result ({§context-fit});
|
|
5360
|
+
a packet past the window fails before inference ({§context-wall}).
|
|
5421
5361
|
- §log-row-self-explains **Every ≥400 pointer names a record that states its
|
|
5422
5362
|
why.** A model-operation failure is the model's own operation result; its
|
|
5423
5363
|
Problem Details `instance` retains the originating occurrence URI; when absent,
|
|
@@ -5519,7 +5459,7 @@ does not make the measured counters inconsistent.
|
|
|
5519
5459
|
|
|
5520
5460
|
§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: `hash` (one anchor), `line` (one line number), `range` (two marks), `insert` (the zero-width `<L,1,L,1>` form, {§zero-width-column-one-insert}), `column` (any other four-mark region), `prepend` / `append` (`<0>` / `<-1>`), `offset` (a tolerated anchor offset, {§anchor-offset}), `pattern` (a selection matcher), `whole` (no marker: a creation when it lands 201). 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.
|
|
5521
5461
|
|
|
5522
|
-
§digest-forensic-fidelity **Forensic fidelity and cardinality.** The digest's machine-readable JSON preserves 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; each loop's exact terminal result, settlement time, scheduled due time, recurring interval, and recurrence lineage; and every ordered physical provider request. Programs still produce chronological `assistant.md` artifacts after every READ receipt is KILLed; source is independent of log curation. Each worker summary's `Emissions:` line counts its announced emission rows, those the worker KILLed, and the headings it echoed ({§emission-row}); the op mix leaves
|
|
5462
|
+
§digest-forensic-fidelity **Forensic fidelity and cardinality.** The digest's machine-readable JSON preserves 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; each loop's exact terminal result, settlement time, scheduled due time, recurring interval, and recurrence lineage; and every ordered physical provider request. Programs still produce chronological `assistant.md` artifacts after every READ receipt is KILLed; source is independent of log curation. Each worker summary's `Emissions:` line counts its announced emission rows, those the worker KILLed, and the headings it echoed ({§emission-row}); its `Reasonings:` line counts its landed reasoning rows, those the worker KILLed, and the turns that reasoned ({§reasoning-row}); the op mix leaves both harness rows out. 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. Accounting on broader rows is the shared exact derivation from that ledger, never a second stored fact. A worker's Cost line names 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. 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. The human Markdown waterfall shows a present causal source and may preview only the Problem detail because it remains a triage projection, not the machine record. 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. Its human 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; valid packet files remain byte-identical records of what the model saw.
|
|
5523
5463
|
|
|
5524
5464
|
Unrecognized actionless log rows are retained and labelled as such, not
|
|
5525
5465
|
interpreted as executable turnOps or allowed to prevent the remaining digest.
|
|
@@ -6392,7 +6332,8 @@ Every Problem code core mints is named here under its family ({§problem-error-c
|
|
|
6392
6332
|
|---|---|
|
|
6393
6333
|
| Nothing is in flight. Continuing. | a WAIT (or a premature terminal) with no live work ({§wait-obligation-matrix}) |
|
|
6394
6334
|
| Completion deferred. Conclude with KILL alone. | a concluding KILL that carries other operations ({§kill-conclusion}) |
|
|
6395
|
-
| Context
|
|
6335
|
+
| Context exceeds budget. YOU MUST ONLY KILL, MOVE or NOTE this turn. | the over-budget row ({§context-over-budget-row}) |
|
|
6336
|
+
| Context window overflow: the packet cannot fit the model's window even as receipts. | the wall ({§context-wall}) |
|
|
6396
6337
|
| This run is unattended: nobody is present to answer. | a capability that needs a present operator in an unattended loop ({§loop-attendance}) |
|
|
6397
6338
|
| Worker name '*name*' must match `[A-Za-z0-9][A-Za-z0-9_-]{0,62}`. Recovery: Use 1–63 ASCII letters, digits, '_' or '-', starting with a letter or digit. | an invalid worker name |
|
|
6398
6339
|
| Provide the client identifier. / Provide an absolute project path. / Use a positive integer limit. / prompt is not a non-empty string. | client input validation on the daemon's methods |
|
package/dist/build-info.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"package":"@plurnk/plurnk-service","version":"1.
|
|
1
|
+
{"package":"@plurnk/plurnk-service","version":"1.28.0","revision":"68b0e2627cee5c43a37292ca1fb256eebc945b30","dirty":false}
|
|
@@ -2,6 +2,7 @@ import type { SliceResult, LineEditResult as EditResult, BatchEdit, PageResult,
|
|
|
2
2
|
import type { LineMarker, RangeExtent } from "@plurnk/plurnk-contracts";
|
|
3
3
|
export type { SliceResult, EditResult };
|
|
4
4
|
export default class LineMarkerOps {
|
|
5
|
+
static whole(): LineMarker;
|
|
5
6
|
static sliceLines(content: string, marker: LineMarker): SliceResult;
|
|
6
7
|
static sliceLinesRaw(content: string, marker: LineMarker): SliceResult;
|
|
7
8
|
static applyLineMarkerEdit(content: string, marker: LineMarker, body: string): EditResult;
|