@plurnk/plurnk-service 1.16.2 → 1.16.3
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 +1 -1
- package/SPEC.md +89 -76
- package/dist/build-info.json +1 -1
- package/dist/core/AdmittedTurnExecutor.d.ts.map +1 -1
- package/dist/core/AdmittedTurnExecutor.js +7 -0
- package/dist/core/AdmittedTurnExecutor.js.map +1 -1
- package/dist/core/ChannelWrite.sql +1 -1
- package/dist/core/Dispatcher.d.ts +1 -0
- package/dist/core/Dispatcher.d.ts.map +1 -1
- package/dist/core/Dispatcher.js +14 -8
- package/dist/core/Dispatcher.js.map +1 -1
- package/dist/core/Engine.d.ts.map +1 -1
- package/dist/core/Engine.js +3 -4
- package/dist/core/Engine.js.map +1 -1
- package/dist/core/Engine.sql +20 -8
- package/dist/core/LogVisibility.d.ts +0 -2
- package/dist/core/LogVisibility.d.ts.map +1 -1
- package/dist/core/LogVisibility.js +4 -29
- package/dist/core/LogVisibility.js.map +1 -1
- package/dist/core/ModelCall.d.ts +1 -1
- package/dist/core/ModelCall.d.ts.map +1 -1
- package/dist/core/ModelCall.js +6 -1
- package/dist/core/ModelCall.js.map +1 -1
- package/dist/core/MutationEffects.d.ts +0 -3
- package/dist/core/MutationEffects.d.ts.map +1 -1
- package/dist/core/MutationEffects.js +0 -16
- package/dist/core/MutationEffects.js.map +1 -1
- package/dist/core/OverflowTurn.js +2 -2
- package/dist/core/PacketBuilder.d.ts +1 -3
- package/dist/core/PacketBuilder.d.ts.map +1 -1
- package/dist/core/PacketBuilder.js +8 -12
- package/dist/core/PacketBuilder.js.map +1 -1
- package/dist/core/ResourceTransfers.d.ts.map +1 -1
- package/dist/core/ResourceTransfers.js +27 -21
- package/dist/core/ResourceTransfers.js.map +1 -1
- package/dist/core/SendBroadcastHandler.d.ts +1 -1
- package/dist/core/SendBroadcastHandler.d.ts.map +1 -1
- package/dist/core/SendBroadcastHandler.js +1 -1
- package/dist/core/SendBroadcastHandler.js.map +1 -1
- package/dist/core/StoredPacket.d.ts +2 -0
- package/dist/core/StoredPacket.d.ts.map +1 -1
- package/dist/core/StoredPacket.js +12 -3
- package/dist/core/StoredPacket.js.map +1 -1
- package/dist/core/TurnMaterialization.js +2 -2
- package/dist/core/TurnMaterialization.js.map +1 -1
- package/dist/core/TurnRunner.d.ts.map +1 -1
- package/dist/core/TurnRunner.js +35 -24
- package/dist/core/TurnRunner.js.map +1 -1
- package/dist/core/attachments.d.ts +0 -3
- package/dist/core/attachments.d.ts.map +1 -1
- package/dist/core/attachments.js +2 -8
- package/dist/core/attachments.js.map +1 -1
- package/dist/core/fork.d.ts.map +1 -1
- package/dist/core/fork.js +7 -1
- package/dist/core/fork.js.map +1 -1
- package/dist/core/fork.sql +10 -2
- package/dist/core/packet-wire.d.ts +1 -0
- package/dist/core/packet-wire.d.ts.map +1 -1
- package/dist/core/packet-wire.js +25 -16
- package/dist/core/packet-wire.js.map +1 -1
- package/dist/digest/Digest.js +1 -1
- package/dist/digest/Digest.js.map +1 -1
- package/dist/digest/DigestRender.d.ts.map +1 -1
- package/dist/digest/DigestRender.js +1 -0
- package/dist/digest/DigestRender.js.map +1 -1
- package/dist/schemes/Exec.js +3 -3
- package/dist/schemes/Exec.js.map +1 -1
- package/dist/schemes/Log.d.ts +1 -1
- package/dist/schemes/Log.d.ts.map +1 -1
- package/dist/schemes/Log.js +42 -25
- package/dist/schemes/Log.js.map +1 -1
- package/dist/schemes/Log.sql +8 -2
- package/dist/schemes/_entry-find.sql +1 -1
- package/dist/schemes/_entry-manifest.d.ts.map +1 -1
- package/dist/schemes/_entry-manifest.js +6 -0
- package/dist/schemes/_entry-manifest.js.map +1 -1
- package/dist/server/Daemon.js +1 -1
- package/dist/server/Daemon.js.map +1 -1
- package/dist/server/dispatch-as-plurnk.d.ts.map +1 -1
- package/dist/server/dispatch-as-plurnk.js +2 -29
- package/dist/server/dispatch-as-plurnk.js.map +1 -1
- package/migrations/001_schema.sql +76 -6
- package/package.json +31 -31
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ The exact model-facing language and operation set are owned by
|
|
|
14
14
|
- search lexical, structural, graph, and embedding-derived indexes;
|
|
15
15
|
- run registered executors and observe their runtime-named streams;
|
|
16
16
|
- delegate to workers, communicate, and collect their results; and
|
|
17
|
-
- curate its addressable log with
|
|
17
|
+
- curate its addressable log with scoped or whole-item `KILL` operations.
|
|
18
18
|
|
|
19
19
|
## Lifecycle model
|
|
20
20
|
|
package/SPEC.md
CHANGED
|
@@ -71,6 +71,17 @@ Provider attempts, grammar recovery, reasoning, and accounting end before this
|
|
|
71
71
|
shared seam. A programmatic operation batch that supplied no Plurnk source does
|
|
72
72
|
not fabricate verbatim source.
|
|
73
73
|
|
|
74
|
+
§turn-ops-selection-snapshot **An admitted program cannot select log rows it emits while executing.**
|
|
75
|
+
Immediately before statement dispatch, the shared executor captures that worker's
|
|
76
|
+
append-only log high-water mark. Every log-targeted KILL in the program resolves
|
|
77
|
+
row membership at or below that same boundary, while prior curation effects still
|
|
78
|
+
compose normally. Prompt and other pre-program rows already present in the turn
|
|
79
|
+
remain selectable; PLAN, preceding operation rows, later operation rows, and the
|
|
80
|
+
terminal `turnOps` cannot be captured by their own program. A directly dispatched
|
|
81
|
+
single operation captures the equivalent boundary before dispatch. This limits
|
|
82
|
+
only log-row selection: operation phasing and same-turn resource effects retain
|
|
83
|
+
their ordinary contracts.
|
|
84
|
+
|
|
74
85
|
### §storage-terms Storage terms
|
|
75
86
|
|
|
76
87
|
| Term | Meaning |
|
|
@@ -354,7 +365,7 @@ preserving the originating failure: daemon, observability, database, listener.
|
|
|
354
365
|
flowchart LR
|
|
355
366
|
child["Child worker"] -->|"durable activity<br/>environment door"| parent["Direct parent log"]
|
|
356
367
|
actor["Any worker"] -->|"mutate worker:/// commons"| commons["Workspace commons"]
|
|
357
|
-
commons -->|"one
|
|
368
|
+
commons -->|"one body-suppressed broadcast occurrence"| logs["Every existing worker log"]
|
|
358
369
|
actor -->|"SEND to named worker<br/>voice door"| log["Addressed worker log"]
|
|
359
370
|
client["User / client"] -->|"loop.inject<br/>voice door"| log
|
|
360
371
|
```
|
|
@@ -491,7 +502,7 @@ direct-entry-plus-directory count; `-1` enables the ordinary markerless page;
|
|
|
491
502
|
unset / `0` disables previews. `log://` is absent because the current worker's
|
|
492
503
|
log already renders in present mode.
|
|
493
504
|
|
|
494
|
-
§worker-initialization-entry **Model-worker initialization is a real `_plurnk` turn.** A model worker's first loop begins with one packetless `{ producer="_plurnk", kind="initialization" }` turn submitted through {§turn-ops-admission-path}. It preserves one visible exact `turnOps` item and dispatches the same source into ordinary PLAN, one archiving COPY, orienting READ/FIND, and terminal `SEND0 (NEXT)` rows (authored in their {§op-mode-phases} execution order). Every orienting row is structurally classified `_plurnk` and `init`; the archiving `COPY (prompt:///<loop>/1)` onto `worker://~/prompts.md <-1>` is classified `_plurnk` and `backup` — the worked COPY specimen, showing the private space as scratch, emitted whenever the loop publishes a prompt ({§prompt-entry}).
|
|
505
|
+
§worker-initialization-entry **Model-worker initialization is a real `_plurnk` turn.** A model worker's first loop begins with one packetless `{ producer="_plurnk", kind="initialization" }` turn submitted through {§turn-ops-admission-path}. It preserves one visible exact `turnOps` item and dispatches the same source into ordinary PLAN, one archiving COPY, orienting READ/FIND, and terminal `SEND0 (NEXT)` rows (authored in their {§op-mode-phases} execution order). Every orienting row is structurally classified `_plurnk` and `init`; the archiving `COPY (prompt:///<loop>/1)` onto `worker://~/prompts.md <-1>` is classified `_plurnk` and `backup` — the worked COPY specimen, showing the private space as scratch, emitted whenever the loop publishes a prompt ({§prompt-entry}). PLAN's heading annotation reads "Determinations and Decisions must be persisted as `memory` items."; its canonical {§plan-value} body contains one `in_progress` entry: `Discover the tooling available and survey the workspace file root.` The instruction is guidance, not a seeded memory. SEND hands off with `Next: Address the prompt.` The first model request occupies the following turn and therefore begins at database/log turn sequence 2; “turn zero” is the initialization phase's model-facing label, not a zero-based database coordinate. Client and `_plurnk` administrative workers execute operation turns and do not receive model initialization.
|
|
495
506
|
|
|
496
507
|
### §machine-processes The machine and its processes: workspace, worker, fork
|
|
497
508
|
|
|
@@ -508,7 +519,7 @@ flowchart TB
|
|
|
508
519
|
parent --> parentEntries["Private worker entries<br/>worker://~/..."]
|
|
509
520
|
parent --> parentWork["Loops, turns, cancellation scope"]
|
|
510
521
|
parent -->|FORK| child["Worker B"]
|
|
511
|
-
parentLog -.->|"copy rows, tags,
|
|
522
|
+
parentLog -.->|"copy rows, tags, visibility state"| childLog["Private log copy"]
|
|
512
523
|
parentEntries -.->|"copy; remap owner"| childEntries["Private worker entries copy"]
|
|
513
524
|
files -->|"shared live"| child
|
|
514
525
|
commons -->|"shared live"| child
|
|
@@ -527,14 +538,14 @@ terminal history.**
|
|
|
527
538
|
| Project files ({§machine-processes-one-filesystem}) | Workspace | Shared live; a fork does not create another checkout. |
|
|
528
539
|
| Shared worker entries (`worker:///...`) | Workspace commons | Shared live. |
|
|
529
540
|
| Membership overlay ({§machine-processes-one-overlay}) | Workspace | Shared unchanged; divergent membership requires another workspace. |
|
|
530
|
-
| Log items ({§machine-processes-fork-copies-the-log}) | Worker | Durable events, curation effects, tags, current active/
|
|
541
|
+
| Log items ({§machine-processes-fork-copies-the-log}) | Worker | Durable events, curation effects, tags, current active/body-suppression projection, and the matching observation cursor are copied as terminal history. Parent-audience occurrences still pending at the fork boundary belong to the snapshot; later sibling activity does not. |
|
|
531
542
|
| §machine-processes-fork-cost **Provider evidence and accounting** | Worker | Turns and their model-facing log history are copied, but turn-attached inference calls, their specializations, admission rows, and physical provider requests are not: one issued call or request has one causal branch. Parent and fork accounting therefore includes only work issued in that branch, while workspace accounting never double-counts copied history. |
|
|
532
543
|
| §machine-processes-entry-inheritance **Worker-owned entries** | Worker | The scheme's mandatory `{§manifest-entry-inheritance}` decides: `snapshot` copies only entries whose channels are all quiescent and remaps ownership; `rederive` copies no bytes and lets the child materializer rebuild them from inherited Functionality; `none` carries nothing. Within a `snapshot` scheme the Worker scheme's generated subtree is always rederived ({§worker-generated-subtree}). Parent and child then diverge. |
|
|
533
544
|
| Active loops, turns, and cancellation | Worker | Never copied as live work; inherited structure is terminal history, then a new loop starts. |
|
|
534
545
|
|
|
535
546
|
§machine-processes-worker-is-its-log **A worker's conversational memory of
|
|
536
547
|
the shared world is its log, with no hidden per-worker snapshot beside it.**
|
|
537
|
-
A scoped KILL
|
|
548
|
+
A scoped KILL suppresses canonical body intervals on that worker's rows ({§log-kill-scope});
|
|
538
549
|
lineage activity and explicit commons broadcasts arrive as attributed log
|
|
539
550
|
entries ({§env-delta}). Worker-owned entries include deliberate scratch and
|
|
540
551
|
other private resources; their manifest declares whether a FORK snapshots,
|
|
@@ -594,7 +605,7 @@ continues to decompose other authorities without treating them as mintable.
|
|
|
594
605
|
|
|
595
606
|
§worker-write-scoping **Writes are own-space-and-commons only**: a model writes `worker://~/` and `worker:///` — every ancestry-readable named authority is read-only to it (403), while an unreadable name remains 404 under {§worker-read-scope}. `owner_id` is engine-stamped from the dispatch context, never model-set. Nothing worker-authored can land under another principal. The entry-copy seam (COPY/MOVE) is pathname-keyed and addresses the commons; a space's content moves via READ + EDIT. The one exception inside a writable space is the generated subtree below.
|
|
596
607
|
|
|
597
|
-
§worker-generated-subtree **`_plurnk/` is Plurnk's generated subtree in every worker space.** Every Plurnk-generated per-Worker document lives under `worker://~/_plurnk/`: the project instructions (`_plurnk/agents.md`, with nested AGENTS.md files under `_plurnk/instructions/**` preserving their subtree paths — the standard's closest-file scope, materialized without any foisted READ or teaching), standard Agent Skills and Plurnk-generated references (`_plurnk/skills/**`), executable families (`_plurnk/tools/**`), and future family catalogs. The subtree is readable exactly like the rest of the space ({§worker-read-scope}) and writable only by the `_plurnk` writer tier: a model, client, or plugin EDIT, KILL, SEND 410, or COPY/MOVE destination whose pathname begins `/_plurnk/` is refused 403 `worker-generated-read-only`, in the commons as well as in own and named spaces. Its documents are materialized through ordinary `_plurnk` **maintenance** turns ({§actor-boundary-doc-injection}), so provenance is legible at the address and durable in the log — but a receipt answers an asker, and maintenance turns have none: their successful rows never render in the packet (failures remain visible), while READ over `log:///` recovers them exactly
|
|
608
|
+
§worker-generated-subtree **`_plurnk/` is Plurnk's generated subtree in every worker space.** Every Plurnk-generated per-Worker document lives under `worker://~/_plurnk/`: the project instructions (`_plurnk/agents.md`, with nested AGENTS.md files under `_plurnk/instructions/**` preserving their subtree paths — the standard's closest-file scope, materialized without any foisted READ or teaching), standard Agent Skills and Plurnk-generated references (`_plurnk/skills/**`), executable families (`_plurnk/tools/**`), and future family catalogs. The subtree is readable exactly like the rest of the space ({§worker-read-scope}) and writable only by the `_plurnk` writer tier: a model, client, or plugin EDIT, KILL, SEND 410, or COPY/MOVE destination whose pathname begins `/_plurnk/` is refused 403 `worker-generated-read-only`, in the commons as well as in own and named spaces. Its documents are materialized through ordinary `_plurnk` **maintenance** turns ({§actor-boundary-doc-injection}), so provenance is legible at the address and durable in the log — but a receipt answers an asker, and maintenance turns have none: their successful rows never render in the packet (failures remain visible), while READ over `log:///` recovers them exactly. On FORK the subtree is never byte-copied; the child rederives it from its inherited Functionality ({§machine-processes-entry-inheritance}). A runtime's `resourcesPath` is relative to this root ({§tools-resource-materialization}). No world-readable kernel authority exists; there is no `worker://plurnk/`.
|
|
598
609
|
|
|
599
610
|
§worker-control-addressing **Only an exact authority-only address selects worker
|
|
600
611
|
control.** Control is same-workspace only ({§actor-boundary}). Generic URI
|
|
@@ -649,9 +660,9 @@ EXEC git, taught by the git skill — never engine machinery.
|
|
|
649
660
|
surfaces to its direct parent as an ambient delta ({§env-delta}): a `SEND` from
|
|
650
661
|
`worker://<name>` carrying the loop's exact terminal operation result. A
|
|
651
662
|
**2xx deliverable is born visible** (its body
|
|
652
|
-
materialized into the parent's packet, not
|
|
653
|
-
success must reach the parent
|
|
654
|
-
non-2xx result surfaces
|
|
663
|
+
materialized into the parent's packet, not body-suppressed): a child's
|
|
664
|
+
success must reach the parent visible and awakening, never a bodyless row. An
|
|
665
|
+
non-2xx result surfaces body-suppressed; a failure retains its exact status and Problem. Every death-path is stamped uniformly —
|
|
655
666
|
including a spawn that dies before its first turn — so no child termination is
|
|
656
667
|
silent to its owner; collection is lineage
|
|
657
668
|
supervision, never a
|
|
@@ -667,7 +678,7 @@ EXEC git, taught by the git skill — never engine machinery.
|
|
|
667
678
|
turn the packet's status clump surfaces the live things this worker currently
|
|
668
679
|
holds — open streams (`## Child Streams`) and unconcluded child workers
|
|
669
680
|
(`## Active Child Workers`) — as `{status, path}` JSON pointers (the same
|
|
670
|
-
shape as the errors section), just above it.
|
|
681
|
+
shape as the errors section), just above it. Body-suppressed child activity is durable
|
|
671
682
|
history; this clump is the current inventory that keeps an active obligation
|
|
672
683
|
visible even when no new activity arrived. Each open stream pointer carries
|
|
673
684
|
its channels' sizes and growth since the last packet (`* active
|
|
@@ -879,7 +890,7 @@ A completed provider exchange is an **emission attempt**, not necessarily an eng
|
|
|
879
890
|
|
|
880
891
|
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 `packetNNN.attemptNNN.rejected.*` and every physical request in its machine-readable ledger.
|
|
881
892
|
|
|
882
|
-
The first exhaustion in a consecutive sequence closes that unadmitted turn as a continue and opens exactly one ordinary recovery turn. Its packet projects the latest rejected response visibly from a durably
|
|
893
|
+
The first exhaustion in a consecutive sequence closes that unadmitted turn as a continue and opens exactly one ordinary recovery turn. Its packet projects the latest rejected response visibly from a durably body-suppressed emission-attempt item under {§rejected-emission-entry} and carries one transient `invalid_emission` Notice: `Response rejected before dispatch; no operations were performed.` followed by `Parser: <the latest attempt's first diagnostic>` with its `content-offset` position — the model sees why, at which line, against its own projected text. The Notice states only observed admission facts; it does not classify the response as unrecoverable, infer why generation ended, or prescribe intent beyond the parser-owned diagnostic. Attempt count and rail state never become model-facing. The recovery turn has its own honestly stored packet and its configured private same-packet attempts. The packet-local projection never changes the row's curation state, so no later packet repeats the malformed body unless the model explicitly READs its exact address. Admission clears the recovery state; exhausting the informed turn terminates instead of opening another.
|
|
883
894
|
|
|
884
895
|
An admitted program may contain bounded malformed statements or recovered
|
|
885
896
|
envelope defaults. Parsed operations still dispatch; each hard parser diagnostic
|
|
@@ -1080,7 +1091,7 @@ render-time filtering.
|
|
|
1080
1091
|
|
|
1081
1092
|
§fs-visibility-grantors **File visibility has two represented grantors; Plurnk never invents a private third one.** A file member is admitted by the active Git substrate or by an ordinary `include` row of the overlay. An `include` is either a projected `members` definition ({§members-projection}) or the exact, inspectable record of an accepted creation ({§fs-create-record}); both resolve to `constraint` membership. AGENTS.md remains auto-pulled as POLICY ({§policy-sections}), deliberately not a file member. A physically existing path that neither Git nor an `include` admits does not exist for the model and cannot be overwritten.
|
|
1082
1093
|
|
|
1083
|
-
§fs-write-surface **The write surface — one admission and incorporation path.** Existing writes remain membership-gated. An absent path additionally crosses the effective creation scope and the complete constraint/Git policy before a proposal is issued. EDIT, COPY destinations, and MOVE destinations use this same path regardless of whether the producer is a model, client, plugin, or `_plurnk`. A COPY or MOVE destination
|
|
1094
|
+
§fs-write-surface **The write surface — one admission and incorporation path.** Existing writes remain membership-gated. An absent path additionally crosses the effective creation scope and the complete constraint/Git policy before a proposal is issued. EDIT, COPY destinations, and MOVE destinations use this same path regardless of whether the producer is a model, client, plugin, or `_plurnk`. A COPY or MOVE destination scope on an absent channel resolves against its empty pre-mutation value under {§empty-mutation-scope}; a valid scope creates the channel with the selected source as its complete value. A coordinate outside that empty value is 416. Binary scopes remain numeric byte positions or ranges under {§binary-parity}.
|
|
1084
1095
|
|
|
1085
1096
|
| Case | Required admission | Accepted result |
|
|
1086
1097
|
|------|--------------------|-----------------|
|
|
@@ -1214,7 +1225,7 @@ turn ({§send}). Cancelling a stream and deleting an entry are KILL ({§stream},
|
|
|
1214
1225
|
- §log-uniform-query **Log speaks the universal query contract** — `### FIND0 (log://…)` works like every scheme's FIND. Candidates are worker rows scoped by the coordinate hierarchy ({§log-coordinate-hierarchy}) and projected exactly as READ shows them. Content dialects use `Matcher.matchCandidates`; `~semantic` and `&graph` use the same persistent derivation artifacts and candidate rankers as entries. Broad results are one-channel catalog groups whose `[0].path` is `log:///loop/turn/seq/OP`; exact matcher results are flat locations ({§find-result-projection}). Log remains the core event ledger rather than duplicating rows into `entries`; its core-private storage adapter supplies one complete channel representation to the same READ projector. That adapter is not a plugin seam and grants no protocol scheme an alternate READ path.
|
|
1215
1226
|
- §find-source-agnostic **The content matcher is source-agnostic** — `Matcher.matchCandidates(body, candidates, mimetypes)` applies a content matcher (regex/jsonpath/xpath/glob) to candidates from ANY source, keyed by the caller's own identity (a pathname for entries, a `loop/turn/seq` coordinate for log). The matcher never cares what table the content came from, so FIND works uniformly across schemes by construction: `EntryFind` and `Log.find` run the one shared primitive rather than re-implementing it per scheme. Log stays its own event stream, but its rows are candidates the shared matcher covers like any entry's content.
|
|
1216
1227
|
- §find-candidate-containment **One candidate's crash is that candidate's problem** — arbitrary member content can crash a mimetype handler mid-match (an unbalanced template partial crashed Readability and killed a 1,916-file FIND as a blank 500, #449). `Matcher.matchCandidates` contains a per-candidate handler throw: the candidate drops out exactly like unsupported content, the cause goes to daemon stderr, and only a FIND whose every candidate crashed reports a 415 whose Problem names the first crashing member and handler. The operation's other candidates always answer.
|
|
1217
|
-
- §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, mimetype
|
|
1228
|
+
- §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. 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 {§overflow-turn} — this is information, not a second guard.
|
|
1218
1229
|
|
|
1219
1230
|
- §matcher-selection-signal **Matching carries navigation evidence** - a matcher is a boolean resource predicate. Internally, each selected resource carries `matches: MatchEvidence[]`, where `MatchEvidence` is `{channel?,locator?,region?}`; `channel` names the entry channel the finding was located in and is absent for channel-less resources such as log rows, so line coordinates cannot be mis-attributed across channels of the same resource ({§channel-selection-visibility}). `locator` preserves a structural address without overloading the resource row's `path`; `region` is a complete four-coordinate `TextRegion` only when the finding maps honestly into the exact text the model can READ. Exact duplicate evidence deduplicates. Relation findings map their indexed source spans through the same readable text coordinate index. FIND alone decides whether that grouped selection projects as resource rows or flat locations ({§find-result-projection}); the engine never fabricates a region or guesses which surgical READ the model wants.
|
|
1220
1231
|
|
|
@@ -1456,7 +1467,7 @@ A published default channel renders under the entry's ordinary fragmentless addr
|
|
|
1456
1467
|
|
|
1457
1468
|
### §no-visibility Entries carry no visibility
|
|
1458
1469
|
|
|
1459
|
-
Every entry is uniformly listed in the catalog (`### FIND0 (scheme:///**)`, {§packet}) and READable — entries have no per-worker
|
|
1470
|
+
Every entry is uniformly listed in the catalog (`### FIND0 (scheme:///**)`, {§packet}) and READable — entries have no per-worker visible/body-suppressed state. Context curation is the model's, on the **log** (via KILL, {§log-kill-scope}), never on entries.
|
|
1460
1471
|
|
|
1461
1472
|
### §channel-mimetype Mimetype is a (scheme, channel) property — never a default
|
|
1462
1473
|
|
|
@@ -1627,7 +1638,8 @@ selection or fan-out path.
|
|
|
1627
1638
|
resource fails 413 `bytes-too-large` by name rather than being skipped.
|
|
1628
1639
|
- §binary-parity A binary member is not a second-class resource. It behaves exactly as a text
|
|
1629
1640
|
member does for existence, FIND by path, KILL/delete, mimetype, weight, and membership; it
|
|
1630
|
-
READs whole as its byte projection ({§read-bytes})
|
|
1641
|
+
READs whole as its byte projection ({§read-bytes}) and, on a supporting route, contributes native
|
|
1642
|
+
content to the next model request ({§packet-attachment-parts}),
|
|
1631
1643
|
READs and FINDs by byte range and byte pattern ({§read-bytes}/{§find-bytes}); and COPY or MOVE transfers
|
|
1632
1644
|
its bytes exactly, between file members and into or out of a DB-backed `worker://` entry alike. A
|
|
1633
1645
|
whole-resource transfer writes the source's bytes ({§read-bytes} `ByteSource`) verbatim to the
|
|
@@ -1666,7 +1678,7 @@ resource or process semantics; this projection contract is specific to
|
|
|
1666
1678
|
|
|
1667
1679
|
AST: `{ op: "KILL", target, body: MatcherBody | null, lineMarker: TextLineMarker | null }` ({§kill-scope} in the contracts SPEC owns the grammar).
|
|
1668
1680
|
|
|
1669
|
-
KILL is the model's one context-curation verb on 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
|
|
1681
|
+
KILL is the model's one context-curation verb on 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 suppresses only that body's intersecting body-relative physical lines from the packet projection, and the row stays active. An anchor may be one already published on that immutable body or one returned by READing its `log:///` coordinate ({§line-anchors}); a stale anchor is 412 and an unrelated one is 422. Scoped KILL is one-way: intervals accumulate under the one-way interval algebra — the durable body is untouched, and an exact READ returns the canonical body as a new retrieval occurrence without changing the old projection. A scoped KILL on a bodyless row is a friendly 200 no-op with `matched` reported. 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 matcher body ({§log-curation-set-selection}); a targetless KILL is 400.
|
|
1670
1682
|
|
|
1671
1683
|
### §log-wire-format The Log's wire format
|
|
1672
1684
|
|
|
@@ -1675,34 +1687,33 @@ The `## Log` section is a sequence of ordinary Markdown records separated by one
|
|
|
1675
1687
|
```text
|
|
1676
1688
|
### log:///<loop>/<turn>/<item>/<leaf>
|
|
1677
1689
|
{"oneLine":"strict JSON metadata"}
|
|
1678
|
-
<coordinate-prefixed body lines when
|
|
1690
|
+
<coordinate-prefixed body lines when visible>
|
|
1679
1691
|
```
|
|
1680
1692
|
|
|
1681
1693
|
The H3 is the row's complete model-facing identity and canonical READ target; metadata never duplicates `path` or `op`. The following line is one strict JSON object whose members use stable alphabetical order. Every physical body line retains its canonical numeric `N:` or anchored `@hash N:` coordinate, so source text cannot create a record boundary. The section contains records only, with no leading prose or enclosing fence.
|
|
1682
1694
|
|
|
1683
|
-
The three body states are self-describing: coordinate lines mean
|
|
1695
|
+
The three body states are self-describing: coordinate lines mean visible, `tokensBody` without coordinate lines means fully suppressed, and neither means no canonical body. A partially suppressed row carries `"folded":["<scope>",...]`; coordinate gaps expose the omissions without renumbering. A bounded projection carries `"chunk":"showing <selected> of <complete>"` in metadata. Complete-line extents use inclusive two-coordinate regions; a cut inside a line uses four-coordinate, start-inclusive and end-exclusive regions with 1-based Unicode code-point columns.
|
|
1684
1696
|
|
|
1685
1697
|
Field absence carries defaults: `origin` is omitted for the owning model, `source` for the owning worker, and `status` for a routine 200. SEND always carries its submit code, KILL keeps an explicit 200, and every non-200 stays explicit. A present authored annotation appears as `annotation`. Every row's accounting follows {§packet-token-accounting}.
|
|
1686
1698
|
|
|
1687
|
-
- §packet-attachment-parts A READ of an attachable member carries
|
|
1688
|
-
({§mimetype-projection-facts}): an image ({§mimetype-image}) as
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
- §packet-token-accounting Every row reports its real weight so the packet self-reconciles against the budget: `tokensBody` is the projected body's nonzero weight whenever a canonical body would render (never `0` — a priceless visible body is field absence), and `tokensActive` is the complete row's weight in the packet right now. The metadata share is derivable (`tokensActive − tokensBody` when open; `tokensActive` otherwise) and is never serialized — it feeds no curation decision. Thus a scoped KILL removes the rendered body's weight while a whole KILL removes `tokensActive`; on a folded row `tokensBody` previews the body share the fold reclaimed. The completed record, including its H3, metadata, and body, is measured to a fixed point. A FIND's nonzero `itemsTokenTotal` weighs the complete matched set; a nonzero `returnedItemsTokenTotal` appears only when the returned page has a different weight. These are curation weights, not dollars. The invariants bind regardless of shape ({§packet}): addressability (record H3/`target`/`#channel`/coordinate-prefixed bodies), weighability (per-item `tokens`), honesty (every 4xx/5xx row and the exact body state). {§log-wire-format} {§packet-log-records}
|
|
1699
|
+
- §packet-attachment-parts A successful READ of an attachable member carries projection facts with its
|
|
1700
|
+
result ({§mimetype-projection-facts}): an image ({§mimetype-image}) as
|
|
1701
|
+
`image: { mimetype, width, height, bytes }`, a PDF ({§mimetype-pdf-facts}) as
|
|
1702
|
+
`document: { mimetype, pages, bytes }`. If the next model request's route declares that kind's modality
|
|
1703
|
+
({§provider-input-modalities}), the READ contributes one native file part read from the scheme's bytes at
|
|
1704
|
+
request time. The ordered user content is the packet text followed by each native part and then the exact
|
|
1705
|
+
reactive sentence `<path> has been ejected from context. It must be READ again to retain it in context.`
|
|
1706
|
+
That request weighs each contributed part inside `tokensAttachment` and `tokensActive` at
|
|
1707
|
+
`ceil(width × height / 750)` for a picture and `pages × 1500` for a document. A route that does not accept
|
|
1708
|
+
the kind, or a source whose bytes are no longer available, receives the ordinary text projection and no
|
|
1709
|
+
ejection sentence. A byte range selects the hexadecimal body while the native part remains the complete
|
|
1710
|
+
source resource. A response-less provider failure leaves the delivery available; retries and invalid-
|
|
1711
|
+
emission attempts reuse their already materialized request. The model-call response and its exact READ
|
|
1712
|
+
delivery coordinates commit together; after that completed response, those READs do not contribute native
|
|
1713
|
+
content to later requests. A new READ is a new delivery. Native delivery has no permanent system teaching;
|
|
1714
|
+
the durable textual READ result remains an ordinary log record. The weights are estimates; the provider's
|
|
1715
|
+
reported usage corrects the readout as it does for text.
|
|
1716
|
+
- §packet-token-accounting Every row reports its real weight so the packet self-reconciles against the budget: `tokensBody` is the projected body's nonzero weight whenever a canonical body would render (never `0` — a priceless visible body is field absence), and `tokensActive` is the complete row's weight in the packet right now. The metadata share is derivable (`tokensActive − tokensBody` when visible; `tokensActive` otherwise) and is never serialized — it feeds no curation decision. Thus a scoped KILL removes the rendered body's weight while a whole KILL removes `tokensActive`; on a fully suppressed row `tokensBody` previews the body share that suppression reclaimed. The completed record, including its H3, metadata, and body, is measured to a fixed point. A FIND's nonzero `itemsTokenTotal` weighs the complete matched set; a nonzero `returnedItemsTokenTotal` appears only when the returned page has a different weight. These are curation weights, not dollars. The invariants bind regardless of shape ({§packet}): addressability (record H3/`target`/`#channel`/coordinate-prefixed bodies), weighability (per-item `tokens`), honesty (every 4xx/5xx row and the exact body state). {§log-wire-format} {§packet-log-records}
|
|
1706
1717
|
|
|
1707
1718
|
### §retrieval-packet-metadata READ/FIND packet metadata
|
|
1708
1719
|
|
|
@@ -1734,17 +1745,17 @@ ordinary bounded bodies expose their displayed and complete chunk extents there.
|
|
|
1734
1745
|
|
|
1735
1746
|
### §turn-ops-entry The admitted turn program
|
|
1736
1747
|
|
|
1737
|
-
§turn-ops-log-curation A source-backed turn preserves its **exact admitted Plurnk program** as an actionless log item in addition to the ordinary result row for every dispatched statement. `op` is null, `attrs.kind="turnOps"` identifies the durable type, `origin` is the turn producer, no target exists, `tx` is empty, and the source lives in `rx.content`, typed `text/vnd.plurnk`. Its canonical model-facing address appends the lowercase `/ops` leaf to its three-part coordinate. The packet does not duplicate that identity as `kind` metadata. It is line-numbered and READ/FIND/KILL-able like any active log body. The worker-initialization `turnOps` is born visible because it is the worked orientation example; every other `turnOps`, including model inference and overflow recovery, is born
|
|
1748
|
+
§turn-ops-log-curation A source-backed turn preserves its **exact admitted Plurnk program** as an actionless log item in addition to the ordinary result row for every dispatched statement. `op` is null, `attrs.kind="turnOps"` identifies the durable type, `origin` is the turn producer, no target exists, `tx` is empty, and the source lives in `rx.content`, typed `text/vnd.plurnk`. Its canonical model-facing address appends the lowercase `/ops` leaf to its three-part coordinate. The packet does not duplicate that identity as `kind` metadata. It is line-numbered and READ/FIND/KILL-able like any active log body. The worker-initialization `turnOps` is born visible because it is the worked orientation example; every other `turnOps`, including model inference and overflow recovery, is born body-suppressed and remains exactly READable. Log-KILL clears the `writableBy` gate for a model-authored item and retires only its active projection under {§log-history-projection}; the exact program remains forensic history. Log's handler surface keeps every other mutating op at 501. The shared executor writes exactly one after every admitted source-backed turn.
|
|
1738
1749
|
|
|
1739
|
-
§rejected-emission-entry A rejected provider response is not `turnOps`: it never became an admitted turn program. The one bounded invalid-emission recovery item under {§emission-admission} has `attrs.kind="emissionAttempt"`, `origin="model"`, the canonical model-facing `/attempt` leaf, and the exact latest rejected response. The packet does not duplicate that identity as `kind` metadata. It is born durably
|
|
1750
|
+
§rejected-emission-entry A rejected provider response is not `turnOps`: it never became an admitted turn program. The one bounded invalid-emission recovery item under {§emission-admission} has `attrs.kind="emissionAttempt"`, `origin="model"`, the canonical model-facing `/attempt` leaf, and the exact latest rejected response. The packet does not duplicate that identity as `kind` metadata. It is born durably body-suppressed and projected visibly only in the informed recovery packet; every other rejected attempt remains forensic-only.
|
|
1740
1751
|
|
|
1741
1752
|
- §log-coordinate-hierarchy **Log coordinates are a hierarchical prefix; the trailing slash is optional** — a coordinate is `loop/turn/sequence`, and a PARTIAL coordinate selects its descendants: `log:///1` = loop 1's rows, `log:///1/2` = turn 1/2's rows, `log:///1/2/3` = the one row. A full coordinate is always three parts, so a one- or two-part path is unambiguously a prefix — the trailing slash is an optional alias (`log:///1/2` ≡ `log:///1/2/`), uniform with `### READ0 (worker:///docs/)`. A complete `[start-end]` segment in any numeric coordinate slot selects that inclusive decimal interval; brackets elsewhere retain ordinary path-glob meaning. Every rendered row appends one canonical model-facing leaf: `/OP` for an operation, `/ops` for an admitted turn program, or `/attempt` for a rejected emission. The leaf names identity rather than adding a resource level. Exact consumers tolerate the unsuffixed three-part shorthand; when supplied, the case-insensitive leaf is authoritative and a disagreement resolves 404. Typed entry materialization therefore resolves as `/READ` while retaining its durable `EDIT` event ({§exec-entry-sink}). `log:///1/2/*` still selects the turn's item rows, while `log:///**/READ`, `log:///**/ops`, and `log:///**/attempt` deliberately filter canonical leaves. An EXEC's output stream lives at that same item address under its runtime tag — `sh:///1/2/3/EXEC#stdout` — so one `loop/turn/item/OP` schema addresses every item, log rows and streams alike.
|
|
1742
|
-
- §log-curation-folder-idiom **Log curation speaks the folder idiom; a zero-match sweep is a no-op success** — KILL takes a concrete coordinate or a path-glob, and a **trailing slash or a partial coordinate means "the contents"** ({§log-coordinate-hierarchy}), like a folder-scoped FIND: `### KILL0 (log:///1/2) <1,-1>`
|
|
1753
|
+
- §log-curation-folder-idiom **Log curation speaks the folder idiom; a zero-match sweep is a no-op success** — KILL takes a concrete coordinate or a path-glob, and a **trailing slash or a partial coordinate means "the contents"** ({§log-coordinate-hierarchy}), like a folder-scoped FIND: `### KILL0 (log:///1/2) <1,-1>` suppresses turn 1/2's bodies. A **well-formed selection that matches nothing is 204 with `matched: 0`**; a successful sweep's rx carries `matched: N`. A targetless KILL is 400.
|
|
1743
1754
|
- §log-curation-set-selection **Row selection and body scope are independent** — target/glob and an optional body matcher compose by intersection into the affected row set. An optional `<L>` or `<SL,EL>` then intersects each selected canonical body; it never paginates or changes the selected set. Thus `### KILL0 (log:///**/READ) <17,-1>` may change long READs and no-op on short ones while reporting every selected row in `matched`.
|
|
1744
1755
|
|
|
1745
|
-
§log-kill-meta-operation **A log KILL is a meta-operation — a log-curation directive, not a world action.** It changes log visibility, never the underlying resources. A **successful** log KILL **is recorded in the log** and **renders exactly once** — in the packet after its turn, as its path, target, and status — then dissolves from the projection ({§curation-receipt-dissolves}): the actor sees its `200` or `204` at the one moment it decides whether to conclude or repeat, and the row exists for forensics (a curation act with NO trace is how a weak model
|
|
1756
|
+
§log-kill-meta-operation **A log KILL is a meta-operation — a log-curation directive, not a world action.** It changes log visibility, never the underlying resources. A **successful** log KILL **is recorded in the log** and **renders exactly once** — in the packet after its turn, as its path, target, and status — then dissolves from the projection ({§curation-receipt-dissolves}): the actor sees its `200` or `204` at the one moment it decides whether to conclude or repeat, and the row exists for forensics (a curation act with NO trace is how a weak model suppressing its own task frame stayed invisible until a database dig).
|
|
1746
1757
|
|
|
1747
|
-
§curation-receipt-dissolves **Successful log-curation receipts dissolve.** A model-authored KILL of a log item, whole or scoped, renders in exactly the packet immediately after its turn — path, target, and status, no body — and leaves the active projection once a later model turn has rows; history keeps the row, the exact active/
|
|
1758
|
+
§curation-receipt-dissolves **Successful log-curation receipts dissolve.** A model-authored KILL of a log item, whole or scoped, renders in exactly the packet immediately after its turn — path, target, and status, no body — and leaves the active projection once a later model turn has rows; history keeps the row, the exact active/body-suppression transition for every target, and the authored `turnOps`. Nothing is left to curate: a receipt that dissolves is not a log item to sweep. A KILL of a log item retires the selected rows from the worker's active projection under {§log-history-projection}; it does not delete their execution history. The dissolving is **scoped to log targets**: a `KILL` of a `worker://` note, an `sh://` stream, or another stored artifact retains its scheme-owned world or process semantics and stays visible. A killed exact coordinate resolves 404 in ordinary log operations; a well-formed broad selection with no active matches remains the 204 no-op of {§log-curation-folder-idiom}, and that 204 renders once like any dissolving receipt. Failed KILLs render like every operation error and persist.
|
|
1748
1759
|
|
|
1749
1760
|
### §log-sensitive-request-evidence Durable request evidence
|
|
1750
1761
|
|
|
@@ -1775,9 +1786,10 @@ body: ResourceSelection (destination), signal: tags | null }`.
|
|
|
1775
1786
|
2. Resolve destination path, channel, and optional text scope. Source and
|
|
1776
1787
|
destination mimetypes must agree or the result is 415. Destination anchors
|
|
1777
1788
|
resolve independently under {§line-anchors}.
|
|
1778
|
-
3. A
|
|
1779
|
-
|
|
1780
|
-
|
|
1789
|
+
3. A scoped destination resolves against either its existing content or the
|
|
1790
|
+
absent channel's empty pre-mutation value. A valid scope on that empty value
|
|
1791
|
+
is creation under {§fs-write-surface}; an existing destination is mutated
|
|
1792
|
+
through its scheme's `editBatch`.
|
|
1781
1793
|
4. An unscoped destination writes only its selected channel. Existing other
|
|
1782
1794
|
channels survive.
|
|
1783
1795
|
- §copy-conflict-409 Different content in that channel is 409.
|
|
@@ -2209,7 +2221,7 @@ stream cannot fall through an internal `exec`-only query. {§stream-control}
|
|
|
2209
2221
|
§exec-env-scoped **Scoped environment.** An EXEC subprocess inherits the *project's* environment — its `.env`, the standard shell vars — so the model's commands run as the project expects; but never plurnk's own secrets: the provider API keys and `PLURNK_*` config are stripped before the spawn, so a model-executed command can't `printenv` the engine's keys. The service owns the scoping policy (the denylist); the executor spawns with the env it is handed.
|
|
2210
2222
|
|
|
2211
2223
|
- §exec-hold-until-concluded **The turn-hold exception** — for runtimes in `PLURNK_SERVICE_EXEC_HOLD` (a decision-table env, shipped listing the search family), an in-flight stream **pauses the cycle**: the next packet does not assemble until the stream concludes, so the model never burns a turn asking "are we there yet" about a result the engine controls end-to-end. This exception is limited to seconds-bounded runtimes whose final result the engine controls end-to-end. Bounded by `PLURNK_SERVICE_EXEC_HOLD_MS` and **fail-open**: at the cap the standard cycle resumes untouched (waits, wakes, polls). Zero grammar or teaching surface — the model emits EXEC followed by SEND signal `102` as ever; the wake-shaped world simply arrives one packet sooner. It extends selected runtimes beyond the ordinary {§worker-optimistic-settlement} cap before the next packet assembles. A bare entry holds ALL of a runtime's spawns; a `<runtime>:<effect>` suffix (`github:read`) holds only that effect-class — an MCP server is one runtime whose tools split (a `read` `get_issue` is instant; a `host` `run_migration` is a slow mutation), so an operator opts the known-fast read-class in without parking on the mutation. Conservative stays default: an arbitrary third-party server's latency never parks the engine unless a suffix opts a class in.
|
|
2212
|
-
- §exec-entry-sink **The entry() sink** — an executor may *request* entry materialization (execs SPEC §2.6: every sink is a consumer-implemented callback; the executor owns zero substrate). The service implements it in exec dispatch: `entry(path, content: string | null, {mimetype?})` upserts the entry, then records ONE typed `EDIT` row in the reserved `plurnk` worker's log — the fs-fiction pattern, `source` = the calling worker, `weight` = the canonical resulting span's curation weight, and `attrs.kind="entry_materialized"`. Durable replay and clients retain that exact creation event. The model packet projects the typed event as a
|
|
2224
|
+
- §exec-entry-sink **The entry() sink** — an executor may *request* entry materialization (execs SPEC §2.6: every sink is a consumer-implemented callback; the executor owns zero substrate). The service implements it in exec dispatch: `entry(path, content: string | null, {mimetype?})` upserts the entry, then records ONE typed `EDIT` row in the reserved `plurnk` worker's log — the fs-fiction pattern, `source` = the calling worker, `weight` = the canonical resulting span's curation weight, and `attrs.kind="entry_materialized"`. Durable replay and clients retain that exact creation event. The model packet projects the typed event as a body-suppressed system `READ` of the resulting ordinary resource: its relevant truth is readable state now available in the environment, not an agent-authored mutation. **The executor owns no fetcher:** a `content: null` is a *declaration* — the service acquires the page through schemes-http's checked WebFetcher and accepts its model-facing body and available source/evidence channels {§html-materialization}. Generic public HTML follows the same origin-Markdown, configured materializer, and local-projection routes as exact HTTP acquisition ({§http-materializer-plugins}). A failed acquisition, body-production failure, materialization exception, or absent final projection rejects the sink and produces no HTTP entry, but does not invalidate a search runtime's upstream discovery row; materialization exceptions retain their cause in daemon diagnostics. A non-null `content` is the materialize-given-body path (the caller already holds the bytes and states their mimetype) and grants no provider authority. **No page body ever rides a packet**; the announcement is the body-suppressed row's path and weight, and the model READs/~queries what it chooses. Parallel `entry()` calls serialize on a per-spawn chain; a rejected call leaves the chain healthy. The spawn tail settles that complete chain before unregistering, so executor idleness and shutdown are barriers over its materialization writes. The narration context (one plurnk-worker turn) is lazy per spawn, not per entry.
|
|
2213
2225
|
|
|
2214
2226
|
### §proposal The proposal lifecycle
|
|
2215
2227
|
|
|
@@ -2294,7 +2306,7 @@ settles it as interruption (`500`) and errors active channels before evaluating
|
|
|
2294
2306
|
loops ({§worker-lifecycle-restart-recovery}); it never reports cancellation (`499`) or
|
|
2295
2307
|
pretends to reconstruct an opaque plugin connection.
|
|
2296
2308
|
|
|
2297
|
-
§subscriptions-fold-keeps-subscription A scoped KILL changes a log row's
|
|
2309
|
+
§subscriptions-fold-keeps-subscription A scoped KILL changes a log row's suppressed body intervals ({§log-kill-scope}), never the subscription registry. Curation of a streaming entry's log body leaves the live stream running: visibility is render-only, never cancellation.
|
|
2298
2310
|
|
|
2299
2311
|
### §chunk-accumulation Chunk accumulation
|
|
2300
2312
|
|
|
@@ -3292,7 +3304,7 @@ sections. It receives no separate engine, database, actor, or request context.
|
|
|
3292
3304
|
This is strictly a trusted in-process seam, admitted through the common plugin
|
|
3293
3305
|
trust gate; an external client action cannot invoke it. Whole-list transformation is
|
|
3294
3306
|
the fork-avoidance valve for alternate packet shapes ({§ecosystem}), while
|
|
3295
|
-
overflow recovery and
|
|
3307
|
+
overflow recovery and packet projection remain closed engine concerns.
|
|
3296
3308
|
|
|
3297
3309
|
### §tokenomics Tokenomics: four facts, one curation ruler
|
|
3298
3310
|
|
|
@@ -3325,7 +3337,7 @@ time of measurement.
|
|
|
3325
3337
|
- §membership-binary-sniff **Binary truth beats the label; no entry dominates the corpus.** A tracked member whose HEAD bytes contain NUL enters {§membership-source-projection} as `application/octet-stream` **regardless of what extension-based detection claims**; byte-level evidence outranks a default label. Every eligible text is tiled losslessly to the embedder window and every tile is embedded before its derivation attaches; semantic ranking max-pools the best chunk per candidate.
|
|
3326
3338
|
- §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.
|
|
3327
3339
|
- §tokenomics-neutral-telemetry **Curation telemetry is state, not response allowance.** The model-facing `Context Token Budget` section is one JSON object carrying `tokensActiveTotal` and `tokensActiveMax` (and `tokensResponseMax` when an output floor is disclosed), so the block opens as a JSON payload like `## PLAN0`. 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.
|
|
3328
|
-
- §tokenomics-pressure-inventory **Pressure identifies its reclaimable concentration.** When the ordinary two-field packet measurement reaches 80% of `tokensActiveMax`, the JSON object gains a `tokensActiveLargest` array — at most five currently visible, addressed log bodies, each a flat `{path, tokensBody, tokensActive}` object ordered by `tokensActive` descending and then `log:///` path — and the `YOU MUST KILL superseded, stale, or irrelevant log items and ranges.` mandate follows the object, naming the targets it lists.
|
|
3340
|
+
- §tokenomics-pressure-inventory **Pressure identifies its reclaimable concentration.** When the ordinary two-field packet measurement reaches 80% of `tokensActiveMax`, the JSON object gains a `tokensActiveLargest` array — at most five currently visible, addressed log bodies, each a flat `{path, tokensBody, tokensActive}` object ordered by `tokensActive` descending and then `log:///` path — and the `YOU MUST KILL superseded, stale, or irrelevant log items and ranges.` mandate follows the object, naming the targets it lists. Body-suppressed and bodyless rows cannot enter the list because a scoped KILL would reclaim no body from them. The largest prefix that fits may be shown; this conditional block never pushes an otherwise admissible packet over its maximum. Its own weight participates in the final fixed-point `tokensActiveTotal`.
|
|
3329
3341
|
- §tokenomics-content-hash-identity **Content identity, not per-tokenizer counts.** Static channel writes stamp `content_hash` (SHA-256) as stable content identity. `weight` is stored beside that content and is never keyed or recomputed by model.
|
|
3330
3342
|
- §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` and `embedding_calls` own domain response/failure evidence, `turn_attempts` specialize emission admission, and `provider_requests` are the sole durable accounting representation. Emissions, BARE calls, embeddings, 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`. Derived `costUsd` sums every USD-expressible request and is `null` only when no request is expressible; a response-less failure or an uncataloged model is skipped, never allowed to erase the expressible evidence. Each derived aggregate usage field independently sums its reported quantity, so heterogeneous detail coverage remains partial rather than becoming fictitiously complete. 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.
|
|
3331
3343
|
- §tokenomics-negative-pressure **Negative curation pressure is honest but never submitted.** The provisional readout may report `tokensActiveTotal` above `tokensActiveMax`. Crossing the maximum diverts that would-be model turn into {§overflow-turn}; no over-ceiling packet reaches `provider.generate`. Automatic recovery does not create a strike or consume a model-turn allowance.
|
|
@@ -3516,8 +3528,8 @@ flowchart TD
|
|
|
3516
3528
|
assemble["Assemble and measure<br/>candidate request"] --> budget{"Weight ≤ curation ceiling?"}
|
|
3517
3529
|
budget -->|yes| generate["Provider generate"]
|
|
3518
3530
|
budget -->|no| recover["Keep turn packetless<br/>reclassify as `_plurnk` overflow"]
|
|
3519
|
-
recover -->
|
|
3520
|
-
|
|
3531
|
+
recover --> curate["Dispatch PLAN, whole-body scoped KILL ops,<br/>and SEND through ordinary dispatch"]
|
|
3532
|
+
curate --> verify{"Rebuilt request fits?"}
|
|
3521
3533
|
verify -->|yes| next["Next model turn"]
|
|
3522
3534
|
verify -->|no| stop["Terminal 413"]
|
|
3523
3535
|
next --> assemble
|
|
@@ -3542,23 +3554,23 @@ at its first overflow because four embedding calls were counted as history). Pac
|
|
|
3542
3554
|
remain ordinary turn chronology but do not consume `maxTurns`, model-call,
|
|
3543
3555
|
emission-attempt, usage, or cost accounting.
|
|
3544
3556
|
|
|
3545
|
-
- §overflow-turn-script **Recovery is one ordinary admitted `_plurnk` program.** Its canonical {§plan-value} has one `medium`, `in_progress` entry whose content is `Automatically KILL log bodies newly active at token-budget overflow.`, followed by every causal whole-body scoped KILL and terminal `### SEND0 (NEXT)` with body `Next: YOU MUST ONLY KILL superseded, stale, or irrelevant log content in bulk.` The final sentence requires the successor's substantive operations to be one dedicated, comprehensive bulk-curation program. Core authors this internal program with canonical PLAN and SEND framing. Its exact `turnOps` is born
|
|
3546
|
-
- §overflow-turn-curation **The preceding turn owns the pressure it introduced.** Core deterministically selects every body already created in the packetless candidate turn
|
|
3547
|
-
- §overflow-turn-hard-413 **Recovery fails hard when
|
|
3557
|
+
- §overflow-turn-script **Recovery is one ordinary admitted `_plurnk` program.** Its canonical {§plan-value} has one `medium`, `in_progress` entry whose content is `Automatically KILL log bodies newly active at token-budget overflow.`, followed by every causal whole-body scoped KILL and terminal `### SEND0 (NEXT)` with body `Next: YOU MUST ONLY KILL superseded, stale, or irrelevant log content in bulk.` The final sentence requires the successor's substantive operations to be one dedicated, comprehensive bulk-curation program. Core authors this internal program with canonical PLAN and SEND framing. Its exact `turnOps` is born body-suppressed; successful KILL rows follow {§log-kill-meta-operation} and therefore remain durable but packet-suppressed. Every recovery row carries `_plurnk` and `overflow`; no model call, synthetic receipt, or parallel explanation exists.
|
|
3558
|
+
- §overflow-turn-curation **The preceding turn owns the pressure it introduced.** Core deterministically selects every nonempty body already created in the packetless candidate turn and every nonempty body created by the immediately preceding completed turn in that worker's chronology. Each selected body is KILLed whole (`<1,-1>`) through ordinary dispatch. Already-fully-suppressed and bodyless rows require no operation. Core performs no relevance judgment, exempts no operation or resource kind, reconstructs no interval delta, re-runs no authored selector, and chooses no unrelated older history.
|
|
3559
|
+
- §overflow-turn-hard-413 **Recovery fails hard when causal suppression cannot fit.** After the ordinary scoped KILLs land, Core rebuilds and remeasures once. If the plan changes no visibility or the rebuilt request still exceeds the ceiling, the loop terminalizes with an exact `engine/context/token-budget-overflow` 413 Problem; Core neither submits excess bytes nor chooses unrelated older history. Separately, every `provider.generate` assesses physical capacity under {§provider-surface-capacity}. Core may retry a provider capacity rejection only after withholding automatic prompt-body projection when that changes the request. If it cannot produce changed bytes or the changed request is still rejected, the request-only model turn and provider-owned Problem terminalize at **413 Content Too Large**.
|
|
3548
3560
|
|
|
3549
|
-
- §tokenomics-fetch-fits-free **A retrieval larger than the available packet room remains addressable.** Its complete row lands in the model turn that requested it. If the following candidate packet exceeds the curation ceiling, {§overflow-turn-curation}
|
|
3561
|
+
- §tokenomics-fetch-fits-free **A retrieval larger than the available packet room remains addressable.** Its complete row lands in the model turn that requested it. If the following candidate packet exceeds the curation ceiling, {§overflow-turn-curation} suppresses that body's packet projection in a real `_plurnk` overflow turn; an exact READ still returns its complete canonical body as a new retrieval occurrence.
|
|
3550
3562
|
|
|
3551
3563
|
- §loop-terminals **Engine-imposed terminals are HTTP-precise** — the loop-status vocabulary, one meaning each: `200` concluded (the model's SEND signal `200`) · `499` model-abandoned (signal `499`, or a cancel) · `429` maxTurns exhausted · `413` token-ceiling recovery failure or provider input-capacity failure after changed-request recovery · `500` strike threshold or invalid-emission exhaustion (distinct Problem types; `508` when the crossing strike was a detected cycle) · `504` loop timeout / exec-timeout restamp · `202` the bounded wait — a loop blocked on a live obligation (the model's `### SEND0 (WAIT) <T,P>`, {§wait-obligation-matrix}); a wait on nothing resolves to `200` unless a successful same-turn scoped KILL requires the curated next packet · `100`/`102` queued/running. Never a catch-all, never a new value without changing the owning schema.
|
|
3552
3564
|
|
|
3553
3565
|
§overflow-turn-surface **The packet is the resulting state, not an account of it.**
|
|
3554
3566
|
The first request after recovery is assembled by the ordinary packet path from
|
|
3555
3567
|
the actual durable log after the recovery turn. It therefore carries the prior
|
|
3556
|
-
causal rows genuinely
|
|
3557
|
-
the recovery `turnOps` genuinely
|
|
3558
|
-
absent under the universal curation rule.
|
|
3559
|
-
or overflow-specific projection simulates what
|
|
3560
|
-
`
|
|
3561
|
-
|
|
3568
|
+
causal rows with their bodies genuinely suppressed, the recovery PLAN and SEND
|
|
3569
|
+
genuinely visible, and the recovery `turnOps` body genuinely suppressed.
|
|
3570
|
+
Successful recovery KILL receipts are absent under the universal curation rule.
|
|
3571
|
+
No notice, reconstruction, or overflow-specific projection simulates what
|
|
3572
|
+
`_plurnk` did; exact READs recover canonical bodies as new retrieval occurrences,
|
|
3573
|
+
and ordinary KILL can further curate the active projection.
|
|
3562
3574
|
|
|
3563
3575
|
### §env-delta The environment delta: what changed since the model last looked
|
|
3564
3576
|
|
|
@@ -3608,9 +3620,9 @@ ordinary operation evidence still reaches that child's direct parent.
|
|
|
3608
3620
|
|
|
3609
3621
|
| Producer / event | Durable occurrence | Observer projection |
|
|
3610
3622
|
| ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------- |
|
|
3611
|
-
| §env-delta-child-activity Direct-child activity | Every final op-bearing child log row except the runtime's own rows — `_plurnk` initialization, maintenance, and operation turns are private to the child: prompt, PLAN, operation result, or actionless error. | Direct parent only; one exact attributed row born
|
|
3612
|
-
| §env-delta-child-termination Direct-child termination | The child's exact terminal loop result when the loop contains at least one non-maintenance turn. | Direct parent only; a 2xx deliverable is born
|
|
3613
|
-
| §env-delta-commons-mutation Commons mutation | One successful resolved operation whose landed effects touch `worker:///...`. | Every existing worker; one
|
|
3623
|
+
| §env-delta-child-activity Direct-child activity | Every final op-bearing child log row except the runtime's own rows — `_plurnk` initialization, maintenance, and operation turns are private to the child: prompt, PLAN, operation result, or actionless error. | Direct parent only; one exact attributed row born body-suppressed. Provider reasoning, calls, rejected emissions, turnOps, and harness maintenance do not cross. |
|
|
3624
|
+
| §env-delta-child-termination Direct-child termination | The child's exact terminal loop result when the loop contains at least one non-maintenance turn. | Direct parent only; a 2xx deliverable is born visible and every failure is body-suppressed ({§worker-scheme-collect}). |
|
|
3625
|
+
| §env-delta-commons-mutation Commons mutation | One successful resolved operation whose landed effects touch `worker:///...`. | Every existing worker; one body-suppressed row per observer, deduplicated with any lineage audience. |
|
|
3614
3626
|
| §env-delta-filesystem-narration Project-file divergence | Runtime-owned reconciliation evidence remains in the runtime actor's own log. | No ambient observer row. Current content remains addressable and stale hash edits reject at their owned boundary. |
|
|
3615
3627
|
| §env-delta-entry-materialization Executor `entry()` sink | The runtime records typed materialization evidence under its owning actor. | No ambient observer row unless the resulting operation itself is direct-child activity or a commons mutation ({§exec-entry-sink}). |
|
|
3616
3628
|
|
|
@@ -3801,7 +3813,8 @@ producer does not affect projection.
|
|
|
3801
3813
|
| Artifact | Present when | Authority |
|
|
3802
3814
|
|----------|--------------|-----------|
|
|
3803
3815
|
| `packetNNN.assistant.md` | The turn has `turnOps` | Exact persisted `turnOps` source |
|
|
3804
|
-
| `packetNNN.system.md`, `packetNNN.user.md` | The turn stored a provider request | Stored
|
|
3816
|
+
| `packetNNN.system.md`, `packetNNN.user.md` | The turn stored a provider request | Stored text sections projected through `PacketWire`; native parts are not Markdown |
|
|
3817
|
+
| `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. |
|
|
3805
3818
|
| `packetNNN.assistantRaw.json` | The request has an admitted provider response | Stored opaque provider response |
|
|
3806
3819
|
| `packetNNN.response.md`, attempt artifacts | The request received no admitted response | Stored request and attempt state |
|
|
3807
3820
|
| `packetNNN.packet.raw.txt` | The stored packet fails typed validation | Exact stored packet text |
|
|
@@ -3859,9 +3872,9 @@ evidence when a downstream standard cannot represent the complete list.
|
|
|
3859
3872
|
| every other nonempty body | head bounded independently by `PLURNK_SERVICE_PREVIEW_LINES` and `PLURNK_SERVICE_PREVIEW_CHARS` |
|
|
3860
3873
|
| bodyless row | metadata only; no coordinate lines or `tokensBody` |
|
|
3861
3874
|
|
|
3862
|
-
READ and FIND own their range or pagination before packet rendering; the packet never applies a second hidden substring bound to their selected result. PLAN is likewise complete while visible: it is the model's explicit persistent reasoning inventory, serialized once as compact JSON rather than clipped or reparsed from source text. Prompt rows follow their separate adaptive projection contract. Structured mutation contexts already carry the receipt-owned bound in {§edit-result-receipt-truth}, so packet rendering does not preview them again. Actionless source artifacts, SEND/WORK/FORK bodies, EXEC commands, environment-delta EDIT spans, and extension-produced bodies use the ordinary fixed bound. When a visible projection differs from its canonical body, metadata carries `chunk` with the exact selected and complete extents defined by {§log-wire-format}; complete and
|
|
3875
|
+
READ and FIND own their range or pagination before packet rendering; the packet never applies a second hidden substring bound to their selected result. PLAN is likewise complete while visible: it is the model's explicit persistent reasoning inventory, serialized once as compact JSON rather than clipped or reparsed from source text. Prompt rows follow their separate adaptive projection contract. Structured mutation contexts already carry the receipt-owned bound in {§edit-result-receipt-truth}, so packet rendering does not preview them again. Actionless source artifacts, SEND/WORK/FORK bodies, EXEC commands, environment-delta EDIT spans, and extension-produced bodies use the ordinary fixed bound. When a visible projection differs from its canonical body, metadata carries `chunk` with the exact selected and complete extents defined by {§log-wire-format}; complete and fully suppressed bodies omit it. `### READ0 (log:///<coordinate>/<OP>)` applies its default or explicit text range to the canonical body; the unsuffixed exact shorthand and authoritative suffix behavior are defined by {§log-coordinate-hierarchy}. `### FIND0 (log:///...)` and search match that same full body. A scoped KILL hides the ordinary projection without changing its bound. 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.
|
|
3863
3876
|
|
|
3864
|
-
§prompt-entry **Prompt as a first-class entry and log row.** Each prompt is stored once at `prompt:///<loop>/<N>` as an owner-keyed text/markdown entry — written before any turn of its loop executes, so the initialization COPY ({§worker-initialization-entry}) archives a real source — then published to its first model turn as one actionless lowercase `prompt` log row; that row, not the entry, records publication. No synthetic EDIT or READ operation is invented. The row is born visible and obeys {§body-projection}. The **Active User Prompts** section closes the user-slot status clump as a paths-only list (`* prompt:///<loop>/<N>`), so every frame remains directly READable
|
|
3877
|
+
§prompt-entry **Prompt as a first-class entry and log row.** Each prompt is stored once at `prompt:///<loop>/<N>` as an owner-keyed text/markdown entry — written before any turn of its loop executes, so the initialization COPY ({§worker-initialization-entry}) archives a real source — then published to its first model turn as one actionless lowercase `prompt` log row; that row, not the entry, records publication. No synthetic EDIT or READ operation is invented. The row is born visible and obeys {§body-projection}. The **Active User Prompts** section closes the user-slot status clump as a paths-only list (`* prompt:///<loop>/<N>`), so every frame remains directly READable after its log row's body is suppressed or its active projection is retired.
|
|
3865
3878
|
|
|
3866
3879
|
§prompt-causal-source **Prompt authorship and delivery are distinct facts.** The harness publishes every prompt row with `origin="_plurnk"`; the row's existing `source` carries the canonical address of a different causal actor. Native WORK, FORK, and directed worker SEND derive `worker://<sender>` from the authenticated sender worker ID. A trusted exterior adapter may supply its own canonical actor address through {§methods-loop-run}. An absent source means the owning worker itself. Attribution persists with the prompt frame through active delivery, parking, orphan recovery, restart, and later log projection; model syntax cannot author it.
|
|
3867
3880
|
|
|
@@ -3879,8 +3892,8 @@ that loop has no `op='prompt'` row, oldest first. Every still-undelivered frame
|
|
|
3879
3892
|
at conclusion is re-ordinalized into one source-keyed recovery loop; that loop's
|
|
3880
3893
|
first turn publishes the complete ordered set exactly once. Recovery retries
|
|
3881
3894
|
complete the same queued loop and never mint duplicate work. The automatic
|
|
3882
|
-
overflow turn preserves prompt rows; explicit
|
|
3883
|
-
|
|
3895
|
+
overflow turn preserves prompt rows; explicit KILL follows the ordinary log
|
|
3896
|
+
contract.
|
|
3884
3897
|
|
|
3885
3898
|
§packet-catalog **Catalogs are query results, not packet state.** The packet
|
|
3886
3899
|
stores no materialized manifest. Complete and one-level entry directories,
|
|
@@ -3891,7 +3904,7 @@ their row shape, and their ordering are ordinary FIND projections owned by
|
|
|
3891
3904
|
|
|
3892
3905
|
The model's runtime alert surface has two distinct kinds of information:
|
|
3893
3906
|
|
|
3894
|
-
- **Turn failures are log items.** A failed action and an engine-rail failure are durable `log_entries` rows whose `rx` is an RFC 9457 operation result. They
|
|
3907
|
+
- **Turn failures are log items.** A failed action and an engine-rail failure are durable `log_entries` rows whose `rx` is an RFC 9457 operation result. They can be scoped-KILLed, retired, and budgeted like every other row. The `errors` section is a derived pointer index over recent `status_rx ≥ 400` rows; it owns no bodies or failure state. Rejected emissions never become accepted turn content; their private response and admission evidence remains in `model_calls` and `turn_attempts`, apart from the bounded recovery `emissionAttempt` under {§invalid-emission-attempts}.
|
|
3895
3908
|
- **Notices are transient observations.** Progress and non-fatal diagnostics such as `turn_awaiting_model`, `embed_progress`, and `grammar_unenforced` may appear once in the packet and broadcast live. They neither substitute for a failure result nor influence scheduling or recovery.
|
|
3896
3909
|
|
|
3897
3910
|
The `log` is durable product truth. The `errors` section points at its failures
|
|
@@ -3905,12 +3918,12 @@ retain distinct contracts and lifetimes.
|
|
|
3905
3918
|
There is no per-category handling or bespoke ephemeral relationship. The
|
|
3906
3919
|
`errors` section is a derived index over those rows from the current and
|
|
3907
3920
|
immediately prior turn: one `{status, path}` JSON object per row,
|
|
3908
|
-
nothing else. The Problem lives on the
|
|
3921
|
+
nothing else. The Problem lives on the curatable row and is READ via the path.
|
|
3909
3922
|
- §log-row-self-explains **Every ≥400 pointer names a record that states its
|
|
3910
3923
|
why.** A model-operation failure is the model's own operation result; its
|
|
3911
3924
|
Problem Details `instance` is that row's `log:///` URI and packet wire renders
|
|
3912
3925
|
the contracts-owned compact `{§problem-projection}` on its meta line whether
|
|
3913
|
-
|
|
3926
|
+
its body is visible or suppressed. The enclosing row owns status, model-facing path, source, and target;
|
|
3914
3927
|
an identical extension is not repeated inside the projection. No
|
|
3915
3928
|
separate item is minted for operation failures. Actionless engine rails mint
|
|
3916
3929
|
`op='error'` items because no authored operation row exists. Invalid provider
|
|
@@ -3942,7 +3955,7 @@ retain distinct contracts and lifetimes.
|
|
|
3942
3955
|
|
|
3943
3956
|
§notice-level **Severity on the wire (`level`, required).** Every `Notice` carries `level: "error" | "warn" | "info"`, set by the **producer** at the emit site. The level is client presentation, not operation status: even an `error` notice cannot terminalize work or substitute for a durable Problem. A forwarded `grammar_unenforced` is `warn`; ordinary lifecycle and progress notices are `info`. Clients color straight off `level` without interpreting the open `kind` vocabulary.
|
|
3944
3957
|
|
|
3945
|
-
§operation-result-no-error-scheme Private strike and cycle accounting stays engine-internal ({§rail-accounting-private}). Every failure within an accepted turn - a bounded parse error, failed action, or engine rail - is a LOG ITEM (`log:///<coord>`, `status_rx ≥ 400`) with Problem Details,
|
|
3958
|
+
§operation-result-no-error-scheme Private strike and cycle accounting stays engine-internal ({§rail-accounting-private}). Every failure within an accepted turn - a bounded parse error, failed action, or engine rail - is a LOG ITEM (`log:///<coord>`, `status_rx ≥ 400`) with Problem Details, independently curatable and exactly READable while active. The `errors` section surfaces a derived pointer to each. Rejected emissions stay in the forensic model-call and admission relations. There is **no bespoke `error://` scheme** and no ephemeral per-category failure buffer.
|
|
3946
3959
|
|
|
3947
3960
|
§notice-event-notify **Client surface.** Engine Notices broadcast live via the `notice/event` notification — `{ workerId, loopId, notice: { source, kind, level, message?, position?, …kind-specific } }` per the grammar's `Notice` schema — the moment they land. A loop Notice names its owning Worker; workspace derivation progress alone carries `workerId=null, loopId=0`. AG-UI projects the same observation as the custom `plurnk.notice` event. Failures do not broadcast on this surface: they are log rows, and the client reads them through `log.read` / the `log/entry` notification, the durable log.
|
|
3948
3961
|
|
|
@@ -4001,7 +4014,7 @@ USD, and token totals across every physical exchange the turn paid for, failed
|
|
|
4001
4014
|
calls included. It is the shared exact derivation from the ledger, never a second
|
|
4002
4015
|
stored fact, so a live watcher accrues running loop cost per turn (#465).
|
|
4003
4016
|
|
|
4004
|
-
§notice-content-offset-pointer **Content-offset position.** A non-fatal diagnosis on an accepted emission (for example `grammar_unenforced` or `parse_advisory`) carries `position: { type: "content-offset", line, column }` into the model's own
|
|
4017
|
+
§notice-content-offset-pointer **Content-offset position.** A non-fatal diagnosis on an accepted emission (for example `grammar_unenforced` or `parse_advisory`) carries `position: { type: "content-offset", line, column }` into the model's own body-suppressed `turnOps`. A bounded hard parse error becomes a durable failed operation whose Problem Details preserve its line, column, source, and parser-owned diagnostic. Hard errors that make the frame untrustworthy remain only with their rejected forensic attempt.
|
|
4005
4018
|
|
|
4006
4019
|
### §tools Executable tool resources
|
|
4007
4020
|
|
|
@@ -4198,7 +4211,7 @@ section because they are language extensions rather than executable tools.
|
|
|
4198
4211
|
|
|
4199
4212
|
### §policy system.policy — the client's policy injection
|
|
4200
4213
|
|
|
4201
|
-
§policy-sections One section rides the system slot **after the definition and before capability teaching**: `## Policy` from `PLURNK_SERVICE_POLICY` (default `$XDG_CONFIG_HOME/plurnk/AGENTS.md`, {§host-path-layout}). Policy is the client's authoritative rules promoted into the privileged zone — NOT a
|
|
4214
|
+
§policy-sections One section rides the system slot **after the definition and before capability teaching**: `## Policy` from `PLURNK_SERVICE_POLICY` (default `$XDG_CONFIG_HOME/plurnk/AGENTS.md`, {§host-path-layout}). Policy is the client's authoritative rules promoted into the privileged zone — NOT a log entry; the model cannot READ or KILL it. A default-absent path is silent (the section is omitted); an explicit override (env set) that fails to read fails the turn hard — a deliberate setting with a broken path is a misconfig, surfaced not hidden. Read per-turn so edits take effect live. The PROJECT `AGENTS.md` is local guidance, not policy: it rides turn 0 as the foisted `worker://~/_plurnk/agents.md` entry ({§turn0-agents-stunt}); all other reference material is skills under the worker's private skills tree ({§skills-functionality}).
|
|
4202
4215
|
|
|
4203
4216
|
On first run, and only when `$XDG_CONFIG_HOME/plurnk` itself is absent, the service seeds
|
|
4204
4217
|
`AGENTS.md` from `@plurnk/plurnk-meta/POLICY.md` ({§teaching-corpus}).
|
|
@@ -4453,7 +4466,7 @@ Carried from the contract walk; durable.
|
|
|
4453
4466
|
- **READ rx** prefixes every textual line under {§render-rule}; eligible
|
|
4454
4467
|
editable resources carry `@hash N:`, and all others carry `N:`.
|
|
4455
4468
|
- **FIND body matcher** applies to the addressed entry channel (all dialects), per-candidate via the in-tree `Matcher.matchAgainstContent` ({§matcher-dispatch}; status 200 = content hit → entry selected). The target scope and channel select candidates; the path-glob is the (target).
|
|
4456
|
-
- **Scoped KILL** on the **log** (`log:///`)
|
|
4469
|
+
- **Scoped KILL** on the **log** (`log:///`) suppresses a body span from its packet projection ({§log-kill-scope}); on an entry it deletes that span through the EDIT path ({§kill-scope-entry}). A whole-entry KILL deletes the entry, or one `#fragment` channel.
|
|
4457
4470
|
- **File scheme** detects with `Mimetypes.detect({ path })` and classifies with the same configured service ({§mimetype-classification-consumption}). Handler-declared binary sources materialize through {§membership-source-projection}; projected bodies are READ-able, while source-aware EDIT remains 415.
|
|
4458
4471
|
|
|
4459
4472
|
### §kill-scope-entry Scoped KILL on an entry
|
package/dist/build-info.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"package":"@plurnk/plurnk-service","version":"1.16.
|
|
1
|
+
{"package":"@plurnk/plurnk-service","version":"1.16.3","revision":"2dab0e830bb3d401ccdea2c605c7bb1e4677692f","dirty":false}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdmittedTurnExecutor.d.ts","sourceRoot":"","sources":["../../src/core/AdmittedTurnExecutor.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAiB,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC/E,OAAO,KAAK,cAAc,MAAM,qBAAqB,CAAC;AACtD,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAC/C,OAAO,UAAU,MAAM,iBAAiB,CAAC;AAEzC,OAAO,UAAU,MAAM,iBAAiB,CAAC;AAOzC,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,0BAA0B,CAAC;AAC/E,OAAO,eAAe,MAAM,sBAAsB,CAAC;AAEnD,OAAO,KAAK,EAAE,cAAc,EAAsC,aAAa,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAE7H,MAAM,CAAC,OAAO,OAAO,oBAAoB;;IAQrC,YAAY,EAAE,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,EAAE;QACnE,EAAE,EAAE,EAAE,CAAC;QACP,OAAO,EAAE,cAAc,CAAC;QACxB,OAAO,EAAE,aAAa,CAAC;QACvB,QAAQ,EAAE,UAAU,CAAC;QACrB,UAAU,EAAE,UAAU,CAAC;QACvB,SAAS,EAAE,eAAe,CAAC;KAC9B,EAOA;IAMK,mBAAmB,CAAC,EACtB,UAAU,EACV,MAAM,EACN,YAAY,EACZ,iBAAwB,EACxB,oBAAoB,EACpB,MAAM,EACN,WAAW,EACX,QAAQ,EACR,MAAM,EACN,MAAM,EACN,YAAY,EACZ,WAAsC,EACtC,WAAmB,EACnB,oBAA4B,EAC5B,sBAA2B,EAC3B,IAAI,EACJ,MAAM,EACN,UAAU,EACV,SAAS,GACZ,EAAE;QACC,UAAU,EAAE,SAAS,eAAe,EAAE,CAAC;QACvC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;QACtB,YAAY,EAAE,OAAO,CAAC;QACtB,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAClC,oBAAoB,CAAC,EAAE,aAAa,CAAC,8BAA8B,CAAC,CAAC;QACrE,MAAM,EAAE,UAAU,CAAC;QACnB,WAAW,EAAE,MAAM,CAAC;QACpB,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,MAAM,CAAC;QACf,YAAY,EAAE,MAAM,CAAC;QACrB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,oBAAoB,CAAC,EAAE,OAAO,CAAC;QAC/B,sBAAsB,CAAC,EAAE,SAAS,cAAc,EAAE,CAAC;QACnD,IAAI,CAAC,EAAE,aAAa,CAAC;QACrB,MAAM,CAAC,EAAE,WAAW,CAAC;QACrB,UAAU,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;QAC1C,SAAS,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;KAC5D,GAAG,OAAO,CAAC,kBAAkB,CAAC,
|
|
1
|
+
{"version":3,"file":"AdmittedTurnExecutor.d.ts","sourceRoot":"","sources":["../../src/core/AdmittedTurnExecutor.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAiB,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC/E,OAAO,KAAK,cAAc,MAAM,qBAAqB,CAAC;AACtD,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAC/C,OAAO,UAAU,MAAM,iBAAiB,CAAC;AAEzC,OAAO,UAAU,MAAM,iBAAiB,CAAC;AAOzC,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,0BAA0B,CAAC;AAC/E,OAAO,eAAe,MAAM,sBAAsB,CAAC;AAEnD,OAAO,KAAK,EAAE,cAAc,EAAsC,aAAa,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAE7H,MAAM,CAAC,OAAO,OAAO,oBAAoB;;IAQrC,YAAY,EAAE,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,EAAE;QACnE,EAAE,EAAE,EAAE,CAAC;QACP,OAAO,EAAE,cAAc,CAAC;QACxB,OAAO,EAAE,aAAa,CAAC;QACvB,QAAQ,EAAE,UAAU,CAAC;QACrB,UAAU,EAAE,UAAU,CAAC;QACvB,SAAS,EAAE,eAAe,CAAC;KAC9B,EAOA;IAMK,mBAAmB,CAAC,EACtB,UAAU,EACV,MAAM,EACN,YAAY,EACZ,iBAAwB,EACxB,oBAAoB,EACpB,MAAM,EACN,WAAW,EACX,QAAQ,EACR,MAAM,EACN,MAAM,EACN,YAAY,EACZ,WAAsC,EACtC,WAAmB,EACnB,oBAA4B,EAC5B,sBAA2B,EAC3B,IAAI,EACJ,MAAM,EACN,UAAU,EACV,SAAS,GACZ,EAAE;QACC,UAAU,EAAE,SAAS,eAAe,EAAE,CAAC;QACvC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;QACtB,YAAY,EAAE,OAAO,CAAC;QACtB,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAClC,oBAAoB,CAAC,EAAE,aAAa,CAAC,8BAA8B,CAAC,CAAC;QACrE,MAAM,EAAE,UAAU,CAAC;QACnB,WAAW,EAAE,MAAM,CAAC;QACpB,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,MAAM,CAAC;QACf,YAAY,EAAE,MAAM,CAAC;QACrB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,oBAAoB,CAAC,EAAE,OAAO,CAAC;QAC/B,sBAAsB,CAAC,EAAE,SAAS,cAAc,EAAE,CAAC;QACnD,IAAI,CAAC,EAAE,aAAa,CAAC;QACrB,MAAM,CAAC,EAAE,WAAW,CAAC;QACrB,UAAU,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;QAC1C,SAAS,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;KAC5D,GAAG,OAAO,CAAC,kBAAkB,CAAC,CA6P9B;CAGJ"}
|