@plurnk/plurnk-service 3.1.0 → 3.2.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.
Files changed (184) hide show
  1. package/.env.defaults +22 -17
  2. package/INSTALL.md +20 -1
  3. package/SPEC.md +333 -88
  4. package/dist/build-info.json +1 -1
  5. package/dist/completions/_plurnk-service +1 -1
  6. package/dist/completions/plurnk-service.bash +1 -1
  7. package/dist/completions/plurnk-service.fish +1 -0
  8. package/dist/content/path-mimetype.d.ts.map +1 -1
  9. package/dist/content/path-mimetype.js +2 -8
  10. package/dist/content/path-mimetype.js.map +1 -1
  11. package/dist/core/AdmittedTurnExecutor.d.ts.map +1 -1
  12. package/dist/core/AdmittedTurnExecutor.js +22 -10
  13. package/dist/core/AdmittedTurnExecutor.js.map +1 -1
  14. package/dist/{schemes/_derivation-use.d.ts → core/ContentUse.d.ts} +3 -3
  15. package/dist/core/ContentUse.d.ts.map +1 -0
  16. package/dist/{schemes/_derivation-use.js → core/ContentUse.js} +8 -7
  17. package/dist/core/ContentUse.js.map +1 -0
  18. package/dist/core/DataStatementRunner.d.ts.map +1 -1
  19. package/dist/core/DataStatementRunner.js +8 -20
  20. package/dist/core/DataStatementRunner.js.map +1 -1
  21. package/dist/core/Dispatcher.d.ts +9 -1
  22. package/dist/core/Dispatcher.d.ts.map +1 -1
  23. package/dist/core/Dispatcher.js +144 -71
  24. package/dist/core/Dispatcher.js.map +1 -1
  25. package/dist/core/EditMutations.js +1 -1
  26. package/dist/core/EditMutations.js.map +1 -1
  27. package/dist/core/Engine.d.ts +1 -1
  28. package/dist/core/Engine.d.ts.map +1 -1
  29. package/dist/core/Engine.js +3 -3
  30. package/dist/core/Engine.js.map +1 -1
  31. package/dist/core/FileAddress.d.ts +12 -0
  32. package/dist/core/FileAddress.d.ts.map +1 -0
  33. package/dist/core/FileAddress.js +73 -0
  34. package/dist/core/FileAddress.js.map +1 -0
  35. package/dist/core/FilePublication.d.ts +15 -0
  36. package/dist/core/FilePublication.d.ts.map +1 -0
  37. package/dist/core/FilePublication.js +143 -0
  38. package/dist/core/FilePublication.js.map +1 -0
  39. package/dist/core/FileSnapshot.d.ts +26 -0
  40. package/dist/core/FileSnapshot.d.ts.map +1 -0
  41. package/dist/core/FileSnapshot.js +179 -0
  42. package/dist/core/FileSnapshot.js.map +1 -0
  43. package/dist/core/KillHandler.d.ts.map +1 -1
  44. package/dist/core/KillHandler.js +2 -1
  45. package/dist/core/KillHandler.js.map +1 -1
  46. package/dist/core/MembershipMaterialization.d.ts.map +1 -1
  47. package/dist/core/MembershipMaterialization.js +87 -143
  48. package/dist/core/MembershipMaterialization.js.map +1 -1
  49. package/dist/core/MutationEffects.d.ts +2 -1
  50. package/dist/core/MutationEffects.d.ts.map +1 -1
  51. package/dist/core/MutationEffects.js +14 -1
  52. package/dist/core/MutationEffects.js.map +1 -1
  53. package/dist/core/PacketBuilder.sql +8 -0
  54. package/dist/core/PathGlob.d.ts +6 -0
  55. package/dist/core/PathGlob.d.ts.map +1 -0
  56. package/dist/core/PathGlob.js +24 -0
  57. package/dist/core/PathGlob.js.map +1 -0
  58. package/dist/core/ProposalLifecycle.d.ts +2 -1
  59. package/dist/core/ProposalLifecycle.d.ts.map +1 -1
  60. package/dist/core/ProposalLifecycle.js +45 -33
  61. package/dist/core/ProposalLifecycle.js.map +1 -1
  62. package/dist/core/ProposalLifecycle.sql +4 -0
  63. package/dist/core/ResourceBindings.d.ts.map +1 -1
  64. package/dist/core/ResourceBindings.js +4 -3
  65. package/dist/core/ResourceBindings.js.map +1 -1
  66. package/dist/core/ResourceSelector.d.ts +1 -2
  67. package/dist/core/ResourceSelector.d.ts.map +1 -1
  68. package/dist/core/ResourceSelector.js +30 -9
  69. package/dist/core/ResourceSelector.js.map +1 -1
  70. package/dist/core/ResourceTransfers.d.ts +1 -1
  71. package/dist/core/ResourceTransfers.d.ts.map +1 -1
  72. package/dist/core/ResourceTransfers.js +26 -11
  73. package/dist/core/ResourceTransfers.js.map +1 -1
  74. package/dist/core/TurnRunner.d.ts.map +1 -1
  75. package/dist/core/TurnRunner.js +6 -4
  76. package/dist/core/TurnRunner.js.map +1 -1
  77. package/dist/core/caps/SchemeCtxImpl.d.ts +1 -0
  78. package/dist/core/caps/SchemeCtxImpl.d.ts.map +1 -1
  79. package/dist/core/caps/SchemeCtxImpl.js +5 -0
  80. package/dist/core/caps/SchemeCtxImpl.js.map +1 -1
  81. package/dist/core/git-membership.d.ts +1 -0
  82. package/dist/core/git-membership.d.ts.map +1 -1
  83. package/dist/core/git-membership.js +9 -11
  84. package/dist/core/git-membership.js.map +1 -1
  85. package/dist/core/glob_match.js +3 -3
  86. package/dist/core/glob_match.js.map +1 -1
  87. package/dist/core/mutation-types.d.ts +3 -0
  88. package/dist/core/mutation-types.d.ts.map +1 -1
  89. package/dist/core/namespace.d.ts +4 -1
  90. package/dist/core/namespace.d.ts.map +1 -1
  91. package/dist/core/namespace.js +14 -3
  92. package/dist/core/namespace.js.map +1 -1
  93. package/dist/core/packet-wire.d.ts.map +1 -1
  94. package/dist/core/packet-wire.js +11 -9
  95. package/dist/core/packet-wire.js.map +1 -1
  96. package/dist/core/plurnk-uri.d.ts +3 -2
  97. package/dist/core/plurnk-uri.d.ts.map +1 -1
  98. package/dist/core/plurnk-uri.js +23 -11
  99. package/dist/core/plurnk-uri.js.map +1 -1
  100. package/dist/core/scheme-types.d.ts +1 -0
  101. package/dist/core/scheme-types.d.ts.map +1 -1
  102. package/dist/core/sqlite-synchronous.d.ts +2 -0
  103. package/dist/core/sqlite-synchronous.d.ts.map +1 -0
  104. package/dist/core/sqlite-synchronous.js +4 -0
  105. package/dist/core/sqlite-synchronous.js.map +1 -0
  106. package/dist/evidence/EvidenceReader.d.ts.map +1 -1
  107. package/dist/evidence/EvidenceReader.js +8 -1
  108. package/dist/evidence/EvidenceReader.js.map +1 -1
  109. package/dist/evidence/digest.sql +6 -1
  110. package/dist/man/plurnk-service.1 +32 -21
  111. package/dist/schemes/Env.d.ts +1 -1
  112. package/dist/schemes/Env.d.ts.map +1 -1
  113. package/dist/schemes/Env.js +2 -2
  114. package/dist/schemes/Env.js.map +1 -1
  115. package/dist/schemes/File.d.ts +1 -0
  116. package/dist/schemes/File.d.ts.map +1 -1
  117. package/dist/schemes/File.js +233 -268
  118. package/dist/schemes/File.js.map +1 -1
  119. package/dist/schemes/Log.d.ts.map +1 -1
  120. package/dist/schemes/Log.js +64 -7
  121. package/dist/schemes/Log.js.map +1 -1
  122. package/dist/schemes/Worker.js +1 -1
  123. package/dist/schemes/Worker.js.map +1 -1
  124. package/dist/schemes/_entry-crud.d.ts +2 -0
  125. package/dist/schemes/_entry-crud.d.ts.map +1 -1
  126. package/dist/schemes/_entry-crud.js +8 -5
  127. package/dist/schemes/_entry-crud.js.map +1 -1
  128. package/dist/schemes/_entry-crud.sql +15 -15
  129. package/dist/schemes/_entry-find.d.ts +1 -0
  130. package/dist/schemes/_entry-find.d.ts.map +1 -1
  131. package/dist/schemes/_entry-find.js +15 -10
  132. package/dist/schemes/_entry-find.js.map +1 -1
  133. package/dist/schemes/_entry-manifest.d.ts +2 -2
  134. package/dist/schemes/_entry-manifest.d.ts.map +1 -1
  135. package/dist/schemes/_entry-manifest.js +7 -5
  136. package/dist/schemes/_entry-manifest.js.map +1 -1
  137. package/dist/schemes/_entry-ops.d.ts.map +1 -1
  138. package/dist/schemes/_entry-ops.js +9 -7
  139. package/dist/schemes/_entry-ops.js.map +1 -1
  140. package/dist/schemes/_path-scope.d.ts.map +1 -1
  141. package/dist/schemes/_path-scope.js +12 -4
  142. package/dist/schemes/_path-scope.js.map +1 -1
  143. package/dist/schemes/_search-index.js +3 -3
  144. package/dist/schemes/_search-index.js.map +1 -1
  145. package/dist/schemes/exec-env.d.ts.map +1 -1
  146. package/dist/schemes/exec-env.js +7 -22
  147. package/dist/schemes/exec-env.js.map +1 -1
  148. package/dist/server/Daemon.d.ts.map +1 -1
  149. package/dist/server/Daemon.js +40 -68
  150. package/dist/server/Daemon.js.map +1 -1
  151. package/dist/server/DrainSupervisor.d.ts +1 -3
  152. package/dist/server/DrainSupervisor.d.ts.map +1 -1
  153. package/dist/server/DrainSupervisor.js +30 -5
  154. package/dist/server/DrainSupervisor.js.map +1 -1
  155. package/dist/server/EnvFunctionality.d.ts.map +1 -1
  156. package/dist/server/EnvFunctionality.js +19 -11
  157. package/dist/server/EnvFunctionality.js.map +1 -1
  158. package/dist/server/Functionality.d.ts.map +1 -1
  159. package/dist/server/Functionality.js +15 -8
  160. package/dist/server/Functionality.js.map +1 -1
  161. package/dist/server/FunctionalityManager.d.ts +1 -1
  162. package/dist/server/FunctionalityManager.d.ts.map +1 -1
  163. package/dist/server/FunctionalityManager.js +5 -1
  164. package/dist/server/FunctionalityManager.js.map +1 -1
  165. package/dist/server/MembersFunctionality.d.ts.map +1 -1
  166. package/dist/server/MembersFunctionality.js +12 -12
  167. package/dist/server/MembersFunctionality.js.map +1 -1
  168. package/dist/server/Retention.d.ts.map +1 -1
  169. package/dist/server/Retention.js +5 -5
  170. package/dist/server/Retention.js.map +1 -1
  171. package/dist/server/Retention.sql +49 -23
  172. package/dist/server/lifecycle-recovery.sql +4 -1
  173. package/dist/service.d.ts.map +1 -1
  174. package/dist/service.js +4 -0
  175. package/dist/service.js.map +1 -1
  176. package/docs/copy-move.md +3 -0
  177. package/docs/env.md +12 -6
  178. package/docs/members.md +16 -1
  179. package/migrations/023_file_revisions.sql +54 -0
  180. package/migrations/024_proposal_decisions.sql +34 -0
  181. package/migrations/025_response_retention.sql +30 -0
  182. package/package.json +33 -31
  183. package/dist/schemes/_derivation-use.d.ts.map +0 -1
  184. package/dist/schemes/_derivation-use.js.map +0 -1
package/SPEC.md CHANGED
@@ -349,7 +349,7 @@ plus a broadcast duplicate. Runtime maintenance turns produce no broadcast ({§a
349
349
  and remote resources do not acquire ambient attention merely because they are
350
350
  workspace-addressable.
351
351
 
352
- §actor-boundary-no-mutex **Wild west, no exceptions.** Workers share workspace state without locks. Coordination is cooperative and softly fenced (the {§membership} overlay, a workspace policy, bounds every worker's visible surface uniformly — {§machine-processes}); stale writes reject at their anchor or compare-and-swap boundary rather than being prevented by a lock ({§line-anchors}, {§membership-edit-write-cas}).
352
+ §actor-boundary-no-mutex Workers share workspace state without worker-owned locks or reservations. Coordination is cooperative; membership bounds their visible surface uniformly ({§machine-processes}). Stale writes reject at their anchor or commit boundary ({§line-anchors}, {§membership-edit-write-revision}). Internal storage serialization does not confer ownership: {§file-commit-serialization} holds no file across reasoning, operation selection, or approval.
353
353
 
354
354
  §actor-boundary-passive-wake **Passive wake follows ownership.** A directed
355
355
  voice wakes an idle worker. A parked continuation resumes when an obligation it
@@ -422,7 +422,7 @@ direct-entry-plus-directory count; `-1` enables the ordinary markerless page;
422
422
  unset / `0` disables previews. `log://` is absent because the current worker's
423
423
  log already renders in present mode.
424
424
 
425
- §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, led by one NOTE when the surveys run — 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. The NOTE keeps the example turn within the card's NOTE-per-turn teaching and reads, exactly, `Surveyed tooling, documentation, extended context, and project root.` No emission row is fabricated ({§emission-row}): the first request sees the NOTE and 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}.
425
+ §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, led by one NOTE when the surveys run — 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. The NOTE keeps the example turn within the card's NOTE-per-turn teaching: it carries the aside of the card's first NOTE example, `<!-- summary -->`, and reads, exactly, `Surveyed tooling, documentation, extended context, and project root.` No emission row is fabricated ({§emission-row}): the first request sees the NOTE and 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}.
426
426
 
427
427
  Incoming messages publish once as inbound SEND rows in the first model turn
428
428
  ({§message-arrival}); initialization neither READs nor archives them. The turn
@@ -677,7 +677,7 @@ flowchart LR
677
677
  materialize --> read["READ snapshot"]
678
678
  materialize --> edit["EDIT against snapshot"]
679
679
  edit --> proposal["Proposal"]
680
- proposal -->|"client accepts or loop auto"| cas["synced_sig compare-and-swap"]
680
+ proposal -->|"client accepts or loop auto"| cas["Validate captured file revision"]
681
681
  cas -->|"file snapshot → disk"| project["Project file"]
682
682
  project --> materialize
683
683
  ```
@@ -761,18 +761,18 @@ and never re-fetch a match.
761
761
  `engine:membership` / `git_inspection_refused` notice names the key, once per
762
762
  workspace until it changes or clears. User- and model-requested Git commands
763
763
  stay on their explicit execution path.
764
- - §membership-edit-membership-gate **Membership-gated edits.** EDIT is bounded by membership exactly as READ is. An existing **member**'s baseline is its entry snapshot — the body channel the model READ, not a fresh disk read — so the diff is naive against the view the model saw, never empty (the write-side CAS, {§membership-edit-write-cas}, prevents the silent overwrite of out-of-band drift). An existing **non-member** is refused (403) *before* any read or write: the model never reads a file it can't see (no leak into the proposal) and never overwrites one (no wiping a gitignored `.env` it never added). A **new path** crosses the creation matrix in {§fs-write-surface}; proposal acceptance cannot bypass its scope, exclusion, or incorporation rules. Shell execution reaches beyond file membership; the file scheme does not.
764
+ - §membership-edit-membership-gate **Membership-gated edits.** EDIT is bounded by membership exactly as READ is. An existing **member**'s baseline is its materialized entry snapshot, not an empty body or a fresh disk read at approval ({§membership-edit-write-revision}). An existing **non-member** is refused (403) *before* any content read or write: its bytes never leak into the proposal. A **new path** crosses the creation matrix in {§fs-write-surface}; proposal acceptance cannot bypass its scope, exclusion, or incorporation rules. Shell execution reaches beyond file membership; the file scheme does not.
765
765
  - §membership-create-parents **Parent-complete creation.** An accepted File creation—whether authored as EDIT or as a COPY/MOVE destination—recursively creates missing parent directories before writing and registering the new member.
766
766
 
767
767
  **The overlay — `include | exclude`.** `workspace_constraints` holds the `members` family's projected definitions and the engine's creation records ({§members-projection}). Resolved membership is `(project repository files ∪ include) − exclude`.
768
768
 
769
769
  - §membership-auto-add **Auto-add** — the project repository's ambient membership is its tracked `ls-files`, with `git` origin; an untracked file is never an ambient member ({§membership-baseline}). An accepted creation is incorporated by an exact creation record, never by `git add` ({§membership-model-universe}); a record that cannot be written fails the creation transaction, never an orphan ({§file-create-no-orphans}).
770
770
  - §membership-overlay-include **`include`** — admit a file Git misses through a targeted pattern scan (files only), with `constraint` origin. `source: "members"` is a projected human definition, `source: "model"` a projected model definition, `source: "create"` the exact durable record of an accepted creation. Only `members` inclusions override active Git ignore. In a Git-absent root, inclusions are the sole file-membership source.
771
- - §membership-overlay-exclude **`exclude`** — a `!glob` definition removes a tracked or included file: resolution drops matches (`node:path.matchesGlob`) and reconciles so the entry set *equals* the member set. The lever to exclude a committed-but-oversized or sensitive tracked file; exclusions mask creation records without deleting their provenance ({§fs-create-masked}).
771
+ - §membership-overlay-exclude **`exclude`** — a `!glob` definition removes a tracked or included file: resolution drops matches ({§path-glob-matching}) and reconciles so the entry set *equals* the member set. The lever to exclude a committed-but-oversized or sensitive tracked file; exclusions mask creation records without deleting their provenance ({§fs-create-masked}).
772
772
  - §membership-reconcile-sets **Reconciliation is two set statements.** Once the desired set is composed — `(git ls-files ∪ include) − exclude`, glob evaluation and Git shell-outs being the process's own — it lands as one `INSERT … SELECT FROM json_each` with the same idempotent provenance update as a single registration, and every overlay-owned member outside it leaves in one `DELETE … WHERE pathname NOT IN (json_each) RETURNING`, its prior body riding out of the statement. A path that also left disk truth (no longer a candidate at all) becomes a divergence from that prior content; an exclusion is silent. No per-path statement, no set difference outside the database.
773
- - §membership-glob-in-sql **A constraint is evaluated where it lives.** `glob_match(pathname, glob)` is `node:path.matchesGlob` registered into SQLite (`src/core/glob_match.ts`, deterministic), the one matcher every overlay decision uses, so a lookup that asks the constraints table a question — which exclusion covers this key, whether a members definition includes it, which inclusion owns each untracked path — is one statement over `workspace_constraints`, never a listing filtered in the process. Transient inputs the process already holds (a `git ls-files` listing against the exclude globs) stay filtered in the process; the function exists so the database's own rows can be asked, not so process data makes a round trip.
773
+ - §membership-glob-in-sql **A constraint is evaluated where it lives.** `glob_match(pathname, glob)` exposes {§path-glob-matching} to SQLite (`src/core/glob_match.ts`, deterministic), the same matcher every overlay decision uses, so a lookup that asks the constraints table a question — which exclusion covers this key, whether a members definition includes it, which inclusion owns each untracked path — is one statement over `workspace_constraints`, never a listing filtered in the process. Transient inputs the process already holds (a `git ls-files` listing against the exclude globs) stay filtered in the process; the function exists so the database's own rows can be asked, not so process data makes a round trip.
774
774
 
775
- **File ops act on the entry, not the disk; the two reconcile only at gates.** A `file:///` member is a row whose body channel holds its *materialized model-readable snapshot*. READ returns that channel; EDIT diffs against editable text snapshots — neither reaches the filesystem directly. Entry and disk reconcile at exactly two gates: the **pre-turn materialize** (disk → entry, below) and the **accept-time write-back** (entry → disk, {§proposal}). Between the gates the entry is the truth the model curates against, and `synced_sig` — the member's last-synced disk stat (`mtime:size`) — is the version token both gates compare on.
775
+ **File ops act on the entry, not the disk; the two reconcile at gates.** A `file:///` member's body is its materialized model-readable snapshot. READ returns that channel; EDIT computes against it, not a newly read replacement. Pre-turn materialization acquires disk state; accepted write-back validates the captured revision before changing disk ({§proposal}, {§membership-edit-write-revision}).
776
776
 
777
777
  §membership-source-projection Binary acquisition is transient and bounded by
778
778
  {§mimetype-binary-input}; durable entry channels remain Unicode text. Core-private
@@ -795,10 +795,12 @@ with an empty body channel carrying a durable 413 producer result; no diagnostic
795
795
  sentinel impersonates file content. READ therefore names the path, observed bytes,
796
796
  ceiling, and recovery through the ordinary result contract, while EDIT returns the
797
797
  same 413 instead of diffing against a fictitious empty baseline. Core records the
798
- materialization disposition and ceiling privately, so an unchanged disk member is
799
- reconsidered when the operator changes the policy and otherwise remains a stat-only
800
- no-op. The file write gate independently stats the source against the same ceiling,
798
+ materialization disposition and ceiling privately; an unchanged oversized marker
799
+ is reconsidered when the policy changes and otherwise remains stat-gated.
800
+ Ordinary members follow {§membership-change-gated-sync}.
801
+ The file write gate independently stats the source against the same ceiling,
801
802
  so safety does not depend on a background warm winning a client-operation race.
803
+ Whole-file deletion does not need a materialized body ({§file-delete-revision}).
802
804
 
803
805
  §derivation-dedup-parallel **The index dedups then parallelizes.** The derivation identity hashes the exact READ channel representation, mimetype, reader behavior, and applicable search exclusion. A channel or log projection attaches the immutable artifact only after it is complete; identical projections therefore share one FTS row and one symbol graph without copying, and the FTS index reads its text from the content store ({§content-store}) instead of keeping a copy. The identity hashes the representation's own SHA-256 ({§tokenomics-content-hash-identity}), never its body, so a maintenance pass judges an entry channel from its stored `content_hash` without the body crossing into the process; a body is acquired only for a derivation that runs, under that same identity (a representation that moved on since it was judged returns nothing and is judged again next pass), or for a channel with no stored identity, an open or streamed channel, which must be read to be judged. Log rows and turn sources still arrive whole. The pass reports the bytes it acquired beside the derivations it ran, and an unchanged workspace acquires none of its channel bodies at any concurrency. Distinct artifacts run with bounded producer concurrency (`PLURNK_SERVICE_DERIVE_CONCURRENCY`). Pending artifacts sort by readable content length before entering that pool, so small resources start first while every outlier still derives fully. Unset uses a host-relative square-root fan-out; a positive integer is an exact operator budget and `-1` claims every core. Graph persistence writes at most `PLURNK_SERVICE_DERIVE_STORE_BATCH` definitions or references per SQLite statement. Every launched worker settles before the maintenance pass reports success or failure, so one failed artifact cannot orphan sibling derivations. Every representation completed by a successful pass attaches a terminal classified artifact, identically at concurrency 1 and N. A changed pass emits one immediate `preparing` state, intermediate `indexing` heartbeats at `PLURNK_SERVICE_DERIVE_PROGRESS_HEARTBEAT_MS`, and one immediate `complete` or `failed` state. A no-op pass emits no lifecycle, an indexing heartbeat never claims 100%, and the model-facing Notice buffer retains only the current derivation state while live clients observe each heartbeat.
804
806
 
@@ -836,15 +838,29 @@ with their reasons. Successful optional projection degradations continue indexin
836
838
  and surface their framework Notice once per identical observation in a maintenance
837
839
  pass.
838
840
 
839
- §membership-change-gated-sync **Sync is idempotent and change-gated.** Per turn, membership materializes every member's model-readable snapshot into its entry. Text with an unchanged disk signature and materialization policy is a stat-only no-op. The version token is either the observed `mtime:size` or the explicit `absent` state; an observed deletion removes the stale readable channels, and a later reappearance is therefore a new divergence rather than a first-sight materialization. Binary sources additionally compare the cached per-mimetype projection identity; unchanged bytes are never reacquired, while changed reader behavior rematerializes without fabricating a filesystem-divergence event. Coverage is exhaustive across the project repository while work is proportional to source or projection change. After a pass every member carries the current representation defined by {§membership-source-projection} and {§membership-materialization-limit}.
841
+ §membership-change-gated-sync **Projection is idempotent and change-gated.** Membership checks every member's physical identity and raw-byte digest within the materialization ceiling; timestamps alone never establish content identity. Unchanged source revision and policy avoid projection and database publication. Binary projections also compare their reader identity. Input-limited markers remain stat-gated because they expose no acquired body. An acquisition whose observed file identity or metadata changes is discarded and retried on the next pass. An observed absence removes stale channels and records `absent`; reappearance is a divergence, not first sight. This is observed state subject to {§file-external-race}, not an instantaneous snapshot of a concurrently changing project.
840
842
 
841
- §membership-emi-divergence-signal **EMI divergence evidence.** The detector that gates the work *is* the one that records this — one mechanism, not a second full read. When change detection finds a member moved out-of-band, the runtime actor records an `EDIT`-shaped row naming the file with `source="file"`; it does not broadcast that workspace change into unrelated workers' logs ({§env-delta-filesystem-narration}). The model's own edits are write-through (the entry equals disk after a File write), so the scan never mis-attributes them as external divergence. The current file remains ordinarily addressable. A stale anchored edit rejects under {§line-anchors}; a disk race after proposal rejects under {§membership-edit-write-cas}.
843
+ §membership-emi-divergence-signal **EMI divergence evidence.** The materialization pass records observed source changes as an `EDIT`-shaped row naming the file with `source="file"`; it does not broadcast them into unrelated workers' logs ({§env-delta-filesystem-narration}). A native write publishes its own projection and revision, so unchanged landed bytes are not narrated as external divergence. Later external changes remain independently detectable. A stale anchored edit rejects under {§line-anchors}; write-back protection and its external race limit are defined by {§membership-edit-write-revision} and {§file-external-race}.
842
844
 
843
- §membership-edit-write-cas **The write-back is a compare-and-swap — never a clobber, never a clever merge.** EDIT is *naive against the editable text snapshot*: it diffs the model's change onto the entry's body channel — the exact Unicode the model READ — and the proposal carries the `synced_sig` that snapshot was taken at. Binary sources are refused before this path ({§membership-source-projection}). At accept, `applyResolution` re-stats disk and lands the proposed content only if that signature still matches. If disk moved out-of-band in the propose→accept window — a sibling worker, the user's editor, a build step — the write is **refused** with the same neutral `edit-collision` as {§edit-collision}, and **nothing is written**. The engine neither blind-writes over the ambient change (a *clobber*) nor silently re-diffs the model's edit against a state it never saw (getting *clever*) — both would bury a stale-view contract violation under a fallback. The collision surfaces instead: a ≥400 apply downgrades to a reject ({§proposal}), so the model sees that EDIT **did not occur** (400; the `edit_collision` outcome is forensics-only). Reconciliation aligns the current file projection and records the `source=file` evidence in the runtime log ({§membership-emi-divergence-signal}); the model re-reads and re-proposes against the fresh snapshot.
845
+ §membership-edit-write-revision **File write-back is conditional on its captured revision.** EDIT computes against the materialized text; COPY/MOVE mutations retain the revision of the state they selected. Approval never substitutes a newer baseline. Immediately before publication, physical identity and exact content must still match; otherwise the operation returns `edit-collision` (409) without changing the target. A member without a recorded source revision must be materialized before mutation, not treated as permission to overwrite. New-path publication is exclusive. Anchors separately protect the addressed text neighborhood before proposal ({§line-anchors}); an unanchored edit does not claim to preserve an earlier READ's view.
844
846
 
845
- The version travels *with the proposal*, never re-read from the entry at accept: a sibling worker in the same workspace may reconcile while this proposal sits paused, advancing the entry's `synced_sig` to the drifted disk — comparing against the *current* entry sig would wave that clobber through, so the comparison is always against the sig the proposal was computed at. A proposal that assumed an **absent** path (a create) conflicts only if a file has since appeared; a member with **no recorded snapshot** (an un-materialized entry, null `synced_sig`) has no baseline to guard and writes through — the two are told apart by the proposal's `existed` flag, not by a null sig alone. On a clean landing the entry refreshes to the written content and `synced_sig` is **restamped** to it, so the next reconcile recognizes the model's own write (not an external divergence) and a second same-turn edit bases on the landed bytes, not a stale sig. This is the write-side twin of the read-side change-gate ({§membership-change-gated-sync}): one `synced_sig`, gating both the re-read and the write.
847
+ §file-snapshot-revision A materialized source revision records its physical path, filesystem identity/change fingerprint and raw-byte digest, distinct from the derived readable body. Its revision and channels publish in one database statement. An input-limited marker has no acquired digest; it cannot authorize a content replacement. Successful writes stamp the revision acquired from their own bytes, never a later pathname stat. Unversioned projections are rematerialized, including those retained through an upgrade.
846
848
 
847
- The CAS is the **hard backstop**, at the moment of writing, on every accept path. It composes with the model-facing {§line-anchors}: an anchor rejects a target whose relevant neighborhood changed before dispatch, while the CAS refuses to write against a snapshot disk left after proposal. An unanchored edit deliberately claims no pre-dispatch stale-view guarantee.
849
+ §file-commit-serialization Final validation, publication/deletion, and projection settlement are serialized per physical path within one daemon, across workers and workspaces. Unrelated paths remain concurrent. No reservation survives a commit, and no lock is held awaiting model inference, approval, or MIME projection. Membership acquires and projects outside this boundary, then revalidates its source inside it before publishing; an older projection cannot overwrite a newer daemon write.
850
+
851
+ §file-publication A native file write stages complete bytes beside the target, then publishes them atomically; failures before publication leave the original intact. Creation never replaces an occupied name. Existing-file replacement preserves permission bits and ownership, but replaces the inode: other hard-link names and already-open descriptors retain their previous file. Inode-specific extended attributes are not a promised projection. The file/directory operations and SQLite commit are not one transaction or a filesystem power-loss durability guarantee. If publication succeeds but incorporation/projection fails, the result identifies that partial effect; it never claims nothing happened.
852
+
853
+ §file-delete-revision KILL and MOVE source removal validate the captured source revision immediately before unlinking or editing. Whole-file KILL of an input-limited member acquires a streaming digest before proposal without materializing its body. Deferred MOVE retains its original source selection through destination approval. A changed source is preserved; a destination already written remains reported under {§move-cross-scheme-move}. Creation rollback may remove only the unchanged file that creation published; a changed or replaced path is retained and reported as incomplete rollback.
854
+
855
+ §file-external-race The file boundary is optimistic with respect to external programs, executors and other daemons. Portable filesystem APIs provide no atomic expected-content-and-replace/unlink primitive. Plurnk detects drift through its final validation, but cannot exclude a writer racing after that check. It neither advertises such exclusion nor silently merges changed files. Physical-path revalidation prevents a changed symlink from redirecting an approved operation to a different target, subject to the same external race limit.
856
+
857
+ | Commit boundary | Filesystem effect | Result and settlement |
858
+ | --- | --- | --- |
859
+ | Unknown baseline or observed drift | No mutation | 409; refresh and prepare again ({§membership-edit-write-revision}). |
860
+ | Staging or prepublication I/O failure | Original target remains intact | Failure; retain cleanup failures too ({§file-publication}). |
861
+ | Existing file published; projection fails | Complete replacement remains | Failure identifies the update; ordinary reconciliation reads disk truth ({§file-publication}). |
862
+ | New file published; incorporation fails | Remove only the unchanged creation | Report rollback, or partial failure if another writer changed it or cleanup fails ({§file-delete-revision}). |
863
+ | MOVE destination published; source changed | Keep destination and changed source | Conflict identifies the completed destination effect ({§move-cross-scheme-move}). |
848
864
 
849
865
  §membership-git-flags **Permission flags.** Service-wide Git admission comes from {§operator-config-git-ceiling}. `PLURNK_SERVICE_GIT_AUTO=1` includes the repository containing `project_root`; `=0` disables automatic Git membership, leaving member definitions as the only membership source. `ALLOWED` gates `AUTO`.
850
866
 
@@ -1555,16 +1571,30 @@ historical execution. No address grants ownership or access restrictions.
1555
1571
  | `src/x.md`, `./src/x.md`, `/work/project/src/x.md` | `src/x.md` |
1556
1572
  | `/src/x.md` | `../../src/x.md` |
1557
1573
  | `../policy.md`, `/work/policy.md` | `../policy.md` |
1574
+ | `~/x.md` (daemon home `/home/user`) | `../../home/user/x.md` |
1575
+ | `./~/x.md` | Key `~/x.md`, addressed as `./~/x.md` |
1558
1576
  | `.`, `/work/project/` | The project collection, not a file entry |
1559
1577
  | `/` | `../../`, the operating-system root collection |
1560
1578
 
1561
- At `project_root=/`, `/src/x.md` and `src/x.md` resolve to the same key. Without a project root, absolute paths cannot be translated; no process CWD or home directory is substituted.
1579
+ At `project_root=/`, `/src/x.md` and `src/x.md` resolve to the same key. Without a project root, absolute and home-relative spellings cannot be translated; no implicit filesystem base is supplied.
1580
+
1581
+ §fs-home **Home expansion belongs to authored file spellings, not resource identities.** A leading `~` or `~/` resolves from the daemon user's home (`os.homedir()`) before project-relative translation. Bare `~` names that directory. Other tilde-prefixed names, `./~` and embedded tilde segments are literal. This applies to file operations and client attachments regardless of producer; pattern-slot `~` remains full-text search. Bound entry addresses, Git paths, stored keys and membership patterns remain literal. Expansion grants neither membership nor write authority. A literal key `~` or `~/…` is rendered with a leading `./`, so resolving the displayed address recovers the same key without expanding it again. Existing identities and historical evidence are unchanged.
1582
+
1583
+ §file-url **Explicit file URLs have native URL meaning; stored keys stay literal.** Reads, mutations, client attachments and rendered addresses share this boundary:
1584
+
1585
+ | Surface | Contract |
1586
+ |---|---|
1587
+ | `file://` input | Native `fileURLToPath` interpretation, once, before {§fs-namei}; `%2528` names literal `%28`, not `(`. Query does not change the native filename; fragment selects a channel, while `%23` names a literal `#`. |
1588
+ | Invalid URL | Invalid encoding, host-unsupported authorities or encoded separators, and NUL refuse the operation with 400. |
1589
+ | Bare input / bound key | Bare spelling retains {§path-parentheses}, not general URI decoding. Bound keys are never decoded or home-expanded again. |
1590
+ | Resource rendering | Ordinary names stay project-relative. Names that bare target syntax would reinterpret use absolute native file URLs from `project_root`; no identity or membership changes. |
1591
+ | Selectors | Encoded metacharacters are filename data, separate from authored glob syntax ({§path-glob-matching}). URL selector receipts preserve that distinction; generated folder links quote the literal folder before appending `/**`. Literal backslashes remain within their filename segment, including beside glob syntax. |
1562
1592
 
1563
- Folders and globs select members in those same filesystem coordinates. Parent-directory selectors may include in-root and outside-root members; they never scan or admit unrelated disk contents. Catalog paths and grouped subtree selectors remain project-relative.
1593
+ Folders and globs select members in those same filesystem coordinates. Parent-directory selectors may include in-root and outside-root members; they never scan or admit unrelated disk contents. Catalog paths and grouped subtree selectors use the reusable spelling in {§file-url}.
1564
1594
 
1565
- §file-path-normalization An authored model file operation using an absolute path receives a `scheme:file/path_normalized` warning Notice naming its project-relative address. COPY/MOVE cover each absolute operand. The Notice neither changes the operation result nor causes a strike, and does not repeat for automatic observations or already-relative paths. Root-mounted workspaces need no such notice. It never suggests that an unadmitted path has become a member.
1595
+ §file-path-normalization An authored model file operation using an absolute or home-relative path receives a `scheme:file/path_normalized` warning Notice naming its project-relative address. COPY/MOVE cover each such operand. The Notice neither changes the operation result nor causes a strike, and does not repeat for automatic observations or already-relative paths. Root-mounted workspaces and spellings that must remain file URLs ({§file-url}) need no such notice. It never suggests that an unadmitted path has become a member.
1566
1596
 
1567
- §fs-canonical-name **One canonical name, storage ≡ wire: the git pathspec.** Member keys follow gitformat-index(5) verbatim (reference edition: git 2.47.3): relative to the workspace `project_root`, without leading slash, `/`-separated, no trailing slash or NUL. Directories are never entries and the root needs no name. When `project_root` is below the containing repository's top level, Git members above it naturally use the same `../`-prefixed CWD-relative names that `git ls-files` emits without `--full-name`; these are not outside-repository mounts. The database stores that root-relative key directly because workspace identity is rooted at the access point. Every model spelling canonicalizes before storage or comparison.
1597
+ §fs-canonical-name **One canonical identity: the literal Git-relative key.** Member keys follow gitformat-index(5) verbatim (reference edition: git 2.47.3): relative to the workspace `project_root`, without leading slash, `/`-separated, no trailing slash or NUL. Directories are never entries and the root needs no name. When `project_root` is below the containing repository's top level, Git members above it naturally use the same `../`-prefixed CWD-relative names that `git ls-files` emits without `--full-name`; these are not outside-repository mounts. The database stores that root-relative key directly because workspace identity is rooted at the access point. Authored spellings resolve before storage or comparison; stored keys are lexical fixpoints, never reinterpreted as authored input. Rendering quotes target-slot syntax ({§path-parentheses}) and home-like literal names ({§fs-home}), using a file URL where necessary ({§file-url}); resolving the rendered spelling returns the same key.
1568
1598
 
1569
1599
  §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.
1570
1600
 
@@ -1605,12 +1635,12 @@ where the invariant closes an architectural failure mode:
1605
1635
  - §file-create-scope The effective creation scope is the minimum of the service ceiling and workspace setting; no call site or producer may widen it.
1606
1636
  - §file-create-producer-neutral The file contract depends on the operation and target, never the producer identity.
1607
1637
  - §file-create-single-owner File membership owns prospective admission, incorporation choice, and creation-record lifecycle; file operations consume that decision rather than re-deriving Git and constraint policy.
1608
- - §file-create-transaction Success requires both exclusive disk creation and durable incorporation. Approval re-resolves physical containment and policy, so a proposal-time parent cannot be swapped for an outside-pointing symlink. Incorporation failure removes the created entry and file; incomplete rollback is an explicit partial-failure Problem.
1638
+ - §file-create-transaction Success requires both exclusive disk creation and durable incorporation. Approval re-resolves physical containment and policy. Incorporation failure rolls back only the unchanged creation ({§file-delete-revision}); incomplete rollback is an explicit partial-failure Problem. Publication and its filesystem limits are defined by {§file-publication} and {§file-external-race}.
1609
1639
 
1610
1640
  Refusing an occupied non-member follows the POSIX exclusive-create precedent:
1611
1641
  namespace occupancy is not secret, but content remains dark.
1612
1642
 
1613
- §fs-answer-in-canon **The engine answers in canon.** Every engine-authored address — log-row pathname columns, rx spans and error facts, FIND results, the catalog, the foists — renders the one canonical form: exactly what `git ls-files --full-name` prints, byte-for-byte on the git-membership subset. A miss names the RESOLVED form, never an echo of the model's spelling. The single verbatim survivor is the model's own emission text — history is never rewritten. There is no shadow universe of model-preferred addressing.
1643
+ §fs-answer-in-canon **The engine answers with the resolved identity.** Log-row pathname columns retain literal canonical keys. Model-facing addresses in receipts, FIND results, the catalog and recovery use their round-trippable spelling ({§fs-canonical-name}); filename facts and native diffs may name the literal key. A miss names the resolved identity, never an echo of the model's spelling. The model's own emission text remains verbatim — history is never rewritten. Rendering does not create another resource identity.
1614
1644
 
1615
1645
  §fs-errno **errno discipline — one error, one meaning, each with its fact.** Error facts speak wire canon and state the occurrence, never a tutorial.
1616
1646
 
@@ -1625,7 +1655,7 @@ Every fact names the canonical key, never the host root or an echo of the
1625
1655
  model's spelling. These classes let a caller distinguish a wrong address, an
1626
1656
  invalid range, read-only authority, and occupied hidden state without guessing.
1627
1657
 
1628
- §membership-read-refusal **A file miss speaks of membership, never of the disk.** A file is read only as a member, so every `file` miss — READ, FIND of an exact path, KILL, a pattern EDIT's source, a COPY or MOVE source — is 404 `entry-not-found`, `No member of this workspace is at '<key>'.`, its target rendered as the member key, never a `file://` URI. Recovery offers listing with FIND, creation with EDIT, and admission with `members (add)` as alternatives and presumes none ({§diagnostic-observation}): `` FIND lists paths. EDIT creates files; `members (add)` admits existing files with a `{"glob": "<path>"}` body. `` Admission takes a `{"glob": "<path>"}` body. The sentence is about the address and is true whether or not a file is there: it neither claims absence nor hints at presence. Beyond the root the engine does not look at the disk at all, so two reads of `../` paths differ only in the name they echo, and their recovery speaks of the address too, true under every members scope: `'<key>' is outside the project root: only a members definition under the operator's namespace scope admits it.` Inside the root occupancy is not secret ({§fs-write-nonmember}), so an exact-path READ of a path that exists on disk but is not a member says so instead — 404 `entry-not-member`, `'<key>' exists on disk but is not a member of this workspace.`, with admission-only recovery; a path the repository ignores, which no model definition admits, carries the members discovery verdict instead: `The repository ignores it: a client or operator members definition can include it, a model definition cannot.` Occupancy may surface there; content never does ({§membership}).
1658
+ §membership-read-refusal **A file miss speaks of membership, never of the disk.** A file is read only as a member, so every `file` miss — READ, FIND of an exact path, KILL, a pattern EDIT's source, a COPY or MOVE source — is 404 `entry-not-found`, `No member of this workspace is at '<key>'.`, its target rendered as the reusable member address ({§fs-answer-in-canon}, {§file-url}). Recovery offers listing with FIND, creation with EDIT, and admission with `members (add)` as alternatives and presumes none ({§diagnostic-observation}): `` FIND lists paths. EDIT creates files; `members (add)` admits existing files with a `{"glob": "<path>"}` body. `` The sentence is about the address and is true whether or not a file is there: it neither claims absence nor hints at presence. Beyond the root the engine does not look at the disk at all, so two reads of `../` paths differ only in the name they echo, and their recovery speaks of the address too, true under every members scope: `'<key>' is outside the project root: only a members definition under the operator's namespace scope admits it.` Inside the root occupancy is not secret ({§fs-write-nonmember}), so an exact-path READ of a path that exists on disk but is not a member says so instead — 404 `entry-not-member`, `'<key>' exists on disk but is not a member of this workspace.`, with admission-only recovery; a path the repository ignores, which no model definition admits, carries the members discovery verdict instead: `The repository ignores it: a client or operator members definition can include it, a model definition cannot.` Occupancy may surface there; content never does ({§membership}).
1629
1659
 
1630
1660
  §file-directory-target **A directory is named as a directory.** Inside the root, a READ (or other exact-path read), KILL or EDIT whose target is a directory on disk — with or without a trailing slash — is refused `path-is-directory`, never as a missing or non-member file: READ and KILL answer 404, EDIT 403. The detail is `'<key>' is a directory, not a file; <OP> reads/removes/writes one file.`; a READ or KILL carries the listing as its recovery, `` `FIND (<key>/)` lists its files. ``, and an EDIT carries none. Beyond the root the disk stays dark and {§membership-read-refusal} holds unchanged.
1631
1661
 
@@ -1654,7 +1684,7 @@ metadata or channels.
1654
1684
 
1655
1685
  §op-methods-op-dispatch Engine operation ownership follows the public scheme contract:
1656
1686
 
1657
- - Each authored EDIT dispatches through `editBatch` with one resolved statement.
1687
+ - Each resolved EDIT target dispatches through `editBatch` with one statement.
1658
1688
  - A log KILL dispatches only to the core-owned log curation handler ({§log-kill-scope}); an entry scheme's `kill` method never sees a `log:///` target.
1659
1689
  - Other delegated operations use the corresponding lowercase `SchemeHandler` method, with standard FIND supplied for a data scheme that omits a custom implementation.
1660
1690
  - COPY and MOVE are engine-owned compositions over CRUD primitives ({§copy}/{§move}).
@@ -1682,10 +1712,10 @@ Registration precedes loop affinity:
1682
1712
  | Observation | Responses are unseen retrieval work; completion follows {§send-premature-terminate}. |
1683
1713
 
1684
1714
  - §op-synchronous **Decisive operations settle before the next operation.** The dispatcher awaits each operation and its proposal resolution. Work remains in flight only when the operation's contract deliberately creates concurrency: FORK, WORK, a stream-producing execution, and streaming READ after acquisition. Such a READ first establishes its durable subscription and returns `102`; a later operation may address that live owner. Dispatching an execution before KILL does not wait for the process to finish using a resource. KILL of a worker synchronously ends its live loops before disposition checks the pending set; physical scope cleanup remains asynchronous.
1685
- - §edit-execution **One authored EDIT is one mutation.** Each EDIT resolves against current resource state when dispatch reaches it, owns its proposal when gated, and records its own resulting revision. No later EDIT is prepared or applied in advance. Numeric scopes address current coordinates; an earlier EDIT may change what those numbers select. Rejection applies only to that operation, not its successful siblings.
1715
+ - §edit-execution **One resolved EDIT target is one mutation.** Each EDIT resolves against current resource state when dispatch reaches it, owns its proposal when gated, and records its own resulting revision. No later EDIT is prepared or applied in advance. Numeric scopes address current coordinates; an earlier EDIT may change what those numbers select. Rejection applies only to that operation, not its successful siblings.
1686
1716
  - §edit-anchor-continuity **Own EDITs preserve untouched hash targets within one program.** Core carries an anchor through exact, successfully applied EDIT splices when its line survives unchanged, even if its ordinal or neighborhood changes. Scoped entry KILL uses the same deletion path. Target-line replacement or deletion invalidates that binding. Continuity is private to the admitted program and canonical resource/channel; it is not a new published anchor format. The complete normalized line content must match the expected result of the preceding recorded EDIT, otherwise retained bindings are discarded and ordinary current-state validation applies. Reviewer replacement and results without an applied EDIT receipt do not carry bindings forward. A retained binding resolves alone: a twin neighbourhood this program's own splice created elsewhere does not make the carried anchor ambiguous, and an anchor the program never bound resolves against current state. Normalization is the same line-content representation used by READ and line hashing; file-write revision checks remain independent. No approximate text matching is used. Lowered coordinates retain a current-anchor precondition at the mutation owner; ambiguous matches and concurrent changes remain collisions.
1687
1717
  - §anchor-offset **An anchor offset is tolerated, never taught (#749).** A line mark may carry an offset from its anchor (`@abcde+1`, `@abcde-2`), and a bare `+N` after an anchor counts from that anchor (`<@abcde,+1>`). The anchor resolves as usual and the offset is added; a result before line 1 is an invalid mark, and past the end is the ordinary range refusal. Continuity and current-anchor preconditions check the anchor's own line. `plurnk.md` keeps its two anchor forms. Numeric relative endpoints normalize under {§scope-range-recovery}; a reversed range produced by anchor resolution is never reinterpreted as a count.
1688
- - §edit-batch **One compound operation may require atomic splices.** The scheme's `editBatch` primitive validates all supplied numeric edits against one snapshot and commits one revision or none. Core supplies one statement for an authored EDIT; same-resource MOVE can supply multiple splices as one operation. This primitive does not group separate authored operations. Its replacement, insertion, conflict, and receipt rules remain owned by the shared Slicer.
1718
+ - §edit-batch **One compound operation may require atomic splices.** The scheme's `editBatch` primitive validates all supplied numeric edits against one snapshot and commits one revision or none. Core supplies one statement per resolved EDIT target; same-resource MOVE can supply multiple splices as one operation. This primitive does not group separate targets or authored operations. Its replacement, insertion, conflict, and receipt rules remain owned by the shared Slicer.
1689
1719
  - §edit-batch-receipt **A refusal describes its own unapplied work.** An anchor collision lists every distinct unresolved anchor in that EDIT, including both range endpoints, in `unresolvedAnchors` (`anchor`, `kind: missing | ambiguous`, and matching `lines` when ambiguous). Missing is not proof of earlier validity or subsequent change. It carries `editCount: 1`, `applied: 0`, and recovery directing a READ for current coordinates; it makes no claim about other operations. A refused compound splice batch lists all conflicting pairs in `conflicts`, non-conflicting regions in `cleanRegions`, its first pair in `conflictingRegions`, and its own `editCount` and `applied: 0`.
1690
1720
  - §edit-batch-merges **Normalizations require evidence and a receipt.** An EDIT body carrying only this resource's published `L<@xxxxx>` prefixes (the number right-aligned) is stripped when those prefixes verify against current anchors or this worker's preserved READ receipts (`rendered-prefix-stripped`); otherwise it remains literal content (`rendered-prefix-unverified`). Within a single atomic splice batch, the Slicer can deduplicate identical regions/bodies, concatenate same-boundary insertions, assign a shared endpoint to the sole body reproducing that line, or relocate an inner change when its original content occurs exactly once in the outer body. An already-applied inner body can be dropped. Unevidenced overlap remains a collision. These batch resolutions never reinterpret separate authored EDITs. Applied normalizations carry their exact merge facts and a notice; receipts describe only the applied effects.
1691
1721
 
@@ -1697,6 +1727,34 @@ a resource, channel, and optional text scope ({§transfer-resource-selections}).
1697
1727
  Source acquisition follows {§universal-read-composition}; landed mutation
1698
1728
  effects follow {§edit-result-copy-move-effects}.
1699
1729
 
1730
+ §bulk-resource-targeting **Path selectors resolve before resource operations.** Core
1731
+ uses ordinary FIND selection, without a FIND receipt, to resolve glob/extglob
1732
+ operands ({§path-glob-matching}). Resolution occurs when dispatch reaches the
1733
+ operation, not when the turn is parsed. Each selected address retains the
1734
+ authored channel; scopes and content matchers belong to the selected resource.
1735
+
1736
+ | Operation | Selection and execution |
1737
+ |---|---|
1738
+ | READ | The ordinary FIND resource page, optionally filtered by the content matcher; each target receives an exact READ ({§read-fan-out}). |
1739
+ | EDIT, resource KILL | The complete matching path set, not the FIND preview page. Content matchers do not filter this set: each target independently validates and applies its scope, matcher and body through the ordinary mutation owner. No paths means one 204 receipt and no mutation. |
1740
+ | COPY, MOVE | Each glob operand must resolve to exactly one resource. Zero or multiple matches refuse the pair with `target-cardinality` before either side changes. Exact destinations retain ordinary creation semantics. Explicit pairs express bulk transfers; no implicit concatenation, folder mapping or positional pairing. |
1741
+ | Log KILL | The existing curation selector owns the complete operation ({§log-kill-scope}), including its snapshot and distillation. |
1742
+
1743
+ Fan-out resolves the address set once and executes in FIND order. Each target
1744
+ has its own admission, current-state validation, proposal and durable receipt;
1745
+ successful siblings survive a later refusal. Fail-on-error stops before the
1746
+ next target ({§op-execution-order}). No cross-resource transaction is implied.
1747
+ Per-target rows carry `attrs.fanout` (`target`, the authored selector; `matched`,
1748
+ the selected resource count; zero-based `index`; `count`, the admitted target
1749
+ count). One authored operation still produces one lifecycle notification pair.
1750
+ The configured command ceiling counts each admitted concrete operation; WAIT
1751
+ remains exempt ({§operator-config-workspace-max-commands}). It never counts an
1752
+ internal survey or a distillation as another command. An entirely omitted
1753
+ statement is not surveyed just to count its possible targets.
1754
+ Dispatch returns core-owned `commandsExecuted` and `commandsOmitted` totals to
1755
+ the turn executor outside operation results, receipts and lifecycle events;
1756
+ scheme result extensions cannot supply these counts.
1757
+
1700
1758
  ### SEND dispatch (a message to a recipient)
1701
1759
 
1702
1760
  Targetless and exact-message SENDs follow the reply accounting at
@@ -1913,7 +1971,7 @@ Every entry is uniformly listed in the catalog (```` ```FIND (scheme:///**) ````
1913
1971
 
1914
1972
  Mimetype is declared by scheme manifest ({§scheme-manifest}) or supplied per-call for dynamic schemes. Writing a channel without a declared mimetype throws. No default mimetype anywhere.
1915
1973
 
1916
- - §channel-mimetype-cross-mimetype-415 COPY/MOVE compatibility follows {§mimetype-verbatim-transfer}; incompatible pairs return 415. Transfers preserve content verbatim and retain the destination's declared type, resolving it through {§ext-mimetype} only for an absent channel ({§copy}).
1974
+ - §channel-mimetype-cross-mimetype-415 COPY/MOVE compatibility follows {§mimetype-verbatim-transfer}; incompatible pairs return 415. Transfers preserve content verbatim and retain the destination's declared type, resolving an absent channel under {§copy-destination-mimetype}.
1917
1975
 
1918
1976
  ### §channel-selection Channel selection in the DSL
1919
1977
 
@@ -2126,14 +2184,14 @@ AST: `{ op: "EDIT", target, body: string | null, signal: tags | null, lineMarker
2126
2184
  ({§edit-anchor-continuity}) does not carry through a pattern batch; the next
2127
2185
  anchored EDIT validates against current state.
2128
2186
 
2129
- A `file:///` member EDIT diverges from this immediate-write contract: it diffs against the entry snapshot (the body channel, never a fresh disk read) and **proposes** (202) a disk write that lands via a compare-and-swap on accept. See {§membership-edit-write-cas} and the proposal lifecycle {§proposal}. The marker-required rule above applies identically here — an existing file is never markerlessly replaced.
2187
+ A `file:///` member EDIT computes against its materialized body and **proposes** (202) conditional file publication under {§membership-edit-write-revision}, {§file-external-race}, and {§proposal}. The marker-required rule applies identically: an existing file is never markerlessly replaced.
2130
2188
 
2131
2189
  ### §read READ
2132
2190
 
2133
2191
  AST: `{ op: "READ", target, body: null, signal: tags | null, lineMarker? }`.
2134
2192
 
2135
2193
  A READ is never rewritten into a FIND ({§read-find-normalization}); a path-glob
2136
- READ is the one fan-out core performs ({§read-fan-out}).
2194
+ READ uses the common resource selector ({§bulk-resource-targeting}, {§read-fan-out}).
2137
2195
 
2138
2196
  - §read-read-content Returns channel content and mimetype.
2139
2197
  - §read-read-404 Returns 404 when the channel is absent.
@@ -2175,16 +2233,16 @@ READ is the one fan-out core performs ({§read-fan-out}).
2175
2233
  scope, matcher and aside ({§read-selection-projection}, {§read-pattern}), one
2176
2234
  receipt row per path in the FIND's order, so every rendered line keeps its path,
2177
2235
  physical ordinal and anchor and remains a coordinate source for EDIT and KILL.
2178
- Each such row carries `attrs.fanout` (`target`, the authored glob; `matched`, the
2179
- survey's matching path count; `index`; `count`), so a client presents the authored
2180
- statement once and folds the paths beneath it without inferring the group.
2236
+ Rows use the shared `attrs.fanout` identity ({§bulk-resource-targeting}), so a
2237
+ client can group the exact receipts under the authored statement.
2181
2238
  Without a scope each path uses {§markerless-first-page}; with a pattern
2182
2239
  only the matching lines, `grep -n` style. The authored statement contributes
2183
2240
  `rowsWritten`, the receipt count, to its turn's sequence. No path is one 204
2184
2241
  receipt on the authored glob (`matched: 0` when a pattern selected nothing); a
2185
2242
  FIND failure is that failure on the authored glob. The FIND's resource page bounds
2186
- the fan-out: when more paths matched than were read, one `read_fanout_bounded`
2187
- notice names both counts. Every dialect follows this same READ fan-out;
2243
+ the fan-out: when more paths matched than its page selected, one
2244
+ `read_fanout_bounded` notice names both counts. A separate command ceiling may
2245
+ further limit dispatch ({§bulk-resource-targeting}). Every dialect follows this same READ fan-out;
2188
2246
  none substitutes a FIND receipt for the requested content.
2189
2247
 
2190
2248
  §read-pattern-evidence **Match regions survive line-oriented presentation.** A patterned
@@ -2278,6 +2336,10 @@ AST: `{ op: "KILL", target, matcher: MatcherBody | null, lineMarker: TextLineMar
2278
2336
 
2279
2337
  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}): the unscoped KILL retires it; a line scope on its exact coordinate addresses its legend and retires the NOTEs on the lines it selects, the row staying; on a row with no legend lines the scope is 422 `emission-curated-whole`, whose recovery names the unscoped KILL; 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}).
2280
2338
 
2339
+ §log-target-tolerances **The log target reader accepts four near-misses of the taught form and reads each as the one target it can only have meant.** The card teaches `KILL (log:///1/[1-7]/*/{READ,emission})`; none of the following is taught, and no diagnostic text accompanies any of them. A `|` between complete KILL targets, each a coordinate, prefix or glob ({§log-coordinate-hierarchy}) written bare or as a full `log:///` address, is their union: `log:///1/25/2/EDIT|log:///1/24/3/EDIT` retires both rows; a piece that is none of those refuses the whole target, 400 `kill-failed`, naming the piece; a list that selects nothing is the sweep's 204 unless every piece is an exact coordinate, when it is the exact miss's 404. `|` is not a character of a coordinate, and file paths, where it is one, are untouched. For KILL and FIND alike: a bracketed comma list in a numeric slot is a set, `log:///1/[19,24]/**/sh` reading as `log:///1/{19,24}/**/sh`, since a character class can never match a turn number; a non-numeric literal in a numeric slot, after at least one numeric slot, is the leaf with the missing slots `*`, `log:///1/*/READ` reading as `log:///1/*/*/READ`; and `*` segments between the sequence and the leaf are dropped, `log:///1/3/3/*/READ` reading as `log:///1/3/3/READ`, since no coordinate holds a segment there.
2340
+
2341
+ §log-target-shape **The refusal of a log target nothing can read shows the working form.** A malformed KILL or FIND target, 400, carries as its recovery the one sentence `` A log target is `log:///<loop>/<turn>/<sequence>` with an optional `/<op>` leaf; a shorter path is a prefix, and `*`, `**`, `[1-7]` or `{a,b}` may stand in any segment. `` It names the shape and presumes nothing about what the author meant ({§diagnostic-observation}). A sweep that matches nothing stays the bare 204 of {§log-curation-folder-idiom} and an exact miss beside rows that exist names them ({§log-near-miss}); neither carries the sentence, so no text rides the packet for the ordinary case.
2342
+
2281
2343
  §log-scope-recovery A log-body scope follows the file slicer's range rule ({§range-starts-at-one} in the schemes SPEC): a range starting at 0 — `<0,-1>` included — is refused 416 `range-not-satisfiable` on every body, empty ones too, and never clamped; its detail is the slicer's own sentence, `Range <0,-1> starts at 0, which is not a line; lines are numbered from 1.`, and its recovery names the forms a log body takes — `Trim one line with <L> or lines L through M with <L,M>; KILL (log:///1/9/2/READ) with no scope retires the whole row.` — never the insert and append positions a body cannot take. Every other scope that names no line is 400 `curation-scope-invalid` with the same recovery: the forms that work on that row, never a rebuild of the written scope ({§diagnostic-observation}).
2282
2344
 
2283
2345
  A READ carrying active native media is atomic: any KILL scope is ignored and the entire observation is retired, including its native context contribution ({§packet-attachment-parts}). For a model turn, native activity is the attachment selection in its actual input packet; without a model packet, a native observation is atomic by default. Text-only observations in the same selection retain ordinary scoped behavior. Neither form deletes source data or forensic evidence.
@@ -2524,6 +2586,7 @@ reads what the model thought and where its content program can be found
2524
2586
  | A curation that matched nothing (204) | Shown once, in the packet of the very next turn, then retired like any other row. A success and a mismatch are not both silent: the model cannot otherwise tell that its earlier KILL is what emptied the selection (#779). |
2525
2587
  | Failed log curation | Visible with its ordinary Problem. |
2526
2588
  | Non-log target: file, worker, stream, or other resource | Ordinary scheme-owned receipt. |
2589
+ | The over-budget mandate row ({§context-over-budget-row}) | The same once-shown lifetime: the packet it describes, then retired from the projection, durable and readable at its coordinate. |
2527
2590
 
2528
2591
  This packet filter does not retire the receipt: the operation, result, authored
2529
2592
  `turnOps`, and each target's curation effects remain durable under
@@ -2694,6 +2757,23 @@ Operand syntax: {§transfer-resource-selections}. Result projection: {§copy-mov
2694
2757
  202 when the owning scheme requires proposal review. Same- and cross-scheme
2695
2758
  COPY use this one orchestrator.
2696
2759
 
2760
+ §copy-destination-mimetype **A transfer carries a type into an untyped destination.**
2761
+ Resolve the destination channel's type in this order, then apply
2762
+ {§mimetype-verbatim-transfer}; a refusal leaves both operands unchanged.
2763
+
2764
+ | Destination evidence | Type |
2765
+ | --- | --- |
2766
+ | Existing channel | Its stored source type, not a derived readable projection. |
2767
+ | Absent channel with a recognized pathname extension | The extension's type under {§ext-mimetype}. |
2768
+ | Absent channel without a recognized extension, with a declared manifest type | The declared channel type, including explicit `text/plain`. |
2769
+ | Absent channel without either declaration | The source's declared type, with automatic `text/plain` normalization under {§markdown-primitive}. |
2770
+
2771
+ The admitted type accompanies the content through proposal review and publication.
2772
+ This rule applies to whole and scoped transfers across entry-bearing schemes;
2773
+ the scheme's text-creation fallback does not override a transfer's supplied type.
2774
+ Filesystem reconciliation retains that type while the verified source revision is
2775
+ unchanged, including readable reprojection; a changed disk source is detected afresh.
2776
+
2697
2777
  ### §move MOVE (engine-orchestrated)
2698
2778
 
2699
2779
  - §move-relocation-deletes-source MOVE first performs the destination mutation under {§copy}, then removes only
@@ -2721,7 +2801,10 @@ COPY use this one orchestrator.
2721
2801
  - A cross-resource destination failure leaves the source untouched. A source
2722
2802
  failure after destination success is an explicit partial failure with
2723
2803
  `destinationWritten: true` and the destination's identity. Proposal
2724
- acceptance/rejection follows the same ordered rule.
2804
+ acceptance/rejection follows the same ordered rule. Each approval uses the
2805
+ operand whose effect is pending: its target, metadata, authority and manifest.
2806
+ Source removal retains this binding whether the destination wrote immediately
2807
+ or required its own approval.
2725
2808
  - §move-cross-scheme-move Same- and cross-scheme resources use the same
2726
2809
  contract; there is no global cross-scheme transaction.
2727
2810
  - §move-missing-source-404 A missing source is 404.
@@ -2737,7 +2820,7 @@ Log history preserved — `log_entries` stores path tuple as text, not FK to `en
2737
2820
  - §find-line-anchors **A FIND regex anchors each line**, as READ, EDIT and KILL do ({§read-pattern}, {§edit-pattern}): `^` and `$` are a line's ends in every FIND content match — over entries, log rows, turn sources and a binary channel's bytes — so ```` ```FIND (django/urls/resolvers.py) /^from|^import/ ```` locates the same import lines a READ with that pattern shows, never a false 204.
2738
2821
  - §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.
2739
2822
 
2740
- - §find-scope-prefix-filter Filters entries within scope. A **bare** path is the exact entry unless the file scheme resolves a directory under {§file-find-directory}; an explicit **shell glob**, classified once by {§path-glob}, expands to a scope. Path globs use segment semantics: `*` and `?` never cross `/`; `**` does — in every spelling: a `**` glued to a name (`**.go`, `src/**.ts`) is matched as `**/*.go` / `src/**/*.ts`, never demoted to a one-level `*` the way a native matcher reads it. Terminal `*` and `**` are structural catalog selectors and include dot-prefixed entries, so a complete map does not hide `.env.defaults` or `.github`; richer patterns retain native shell behavior. SQLite prefix queries may reduce the candidate set but never decide the match. A trailing slash is a recursive FIND scope only for a scheme whose manifest declares `folderScopes: true`; otherwise it is ordinary resource syntax. This is an explicit extension contract, never inferred from URL punctuation.
2823
+ - §find-scope-prefix-filter Filters entries within scope. A **bare** path is the exact entry unless the file scheme resolves a directory under {§file-find-directory}; an explicit **shell glob**, classified once by {§path-glob}, expands to a scope. Path globs use segment semantics: `*` and `?` never cross `/`; `**` does — in every spelling: a `**` glued to a name (`**.go`, `src/**.ts`) is matched as `**/*.go` / `src/**/*.ts`, never demoted to a one-level `*` the way a standard matcher reads it. Terminal `*` and `**` are structural catalog selectors and include dot-prefixed entries, so a complete map does not hide `.env.defaults` or `.github`; richer patterns use {§path-glob-matching}. SQLite prefix queries may reduce the candidate set but never decide the match. A trailing slash is a recursive FIND scope only for a scheme whose manifest declares `folderScopes: true`; otherwise it is ordinary resource syntax. This is an explicit extension contract, never inferred from URL punctuation.
2741
2824
 
2742
2825
  Resource-authority globs select authorities independently of the path scope.
2743
2826
  Matching resources retain their full addresses through pattern matching,
@@ -2824,6 +2907,23 @@ Log history preserved — `log_entries` stores path tuple as text, not FK to `en
2824
2907
  hidden complete row or location collection is retained behind the public
2825
2908
  projection.
2826
2909
 
2910
+ §path-glob-matching Core's `PathGlob` owns shell-path matching and targeted disk
2911
+ traversal through the public `minimatch` and `glob` packages. Resource selection,
2912
+ membership scans, inspection and the membership SQL predicate share this dialect.
2913
+
2914
+ | Input | Meaning |
2915
+ | --- | --- |
2916
+ | `/` | Segment separator; `*` and `?` do not cross it. |
2917
+ | `\*`, `\?`, `\[`, `\\` | Literal wildcard, bracket or backslash, after target-slot decoding ({§path-parentheses}). A backslash is never a pattern's directory separator. |
2918
+ | Braces, character classes, extglobs, `**` | Standard matcher semantics; operation catalogs additionally apply {§find-scope-prefix-filter}. |
2919
+ | Leading `#` or `!` | Filename syntax, not matcher-level comment or negation. The members family owns its leading `!` exclusion marker. |
2920
+ | Dot-prefixed entries | Require an explicit dot except in the complete structural catalogs above. |
2921
+ | Filesystem base | Literal, outside the pattern; its metacharacters and backslashes never become selector syntax. |
2922
+
2923
+ Matching retains the host's conventional case behavior (case-insensitive on
2924
+ Windows/macOS, case-sensitive otherwise). Membership traversal remains
2925
+ pattern-bounded and admits files only; it does not become an unrestricted walk.
2926
+
2827
2927
  ### §send Messaging and turn disposition
2828
2928
 
2829
2929
  SEND AST: `{ op: "SEND", target: ParsedPath | null, body: SendBody | null, metadata, lineMarker }`.
@@ -3363,7 +3463,7 @@ The runtime scheme participates in the durable lookup; a completed `sh:///`
3363
3463
  stream cannot fall through an internal `exec`-only query. {§stream-control}
3364
3464
 
3365
3465
  §workspace-env **Workspace environment.** The `env` family has workspace defaults and
3366
- worker overrides. Its six verbs accept `scope: "workspace" | "worker"`; model calls
3466
+ worker overrides. Its management verbs accept `scope: "workspace" | "worker"`; model calls
3367
3467
  default to `worker`. Client actions bind the scope in `workspace.env.*` or
3368
3468
  `worker.env.*`. An explicit scope must agree with that action's context.
3369
3469
 
@@ -3381,35 +3481,26 @@ lower entry and its enabledness ({§configuration-definition-resolution}). Forki
3381
3481
  affect subsequent launches, not existing processes or other workspaces. A shared
3382
3482
  capability never acquires an invoking worker's overrides or ownership.
3383
3483
 
3384
- §exec-env-scoped **Scoped environment.** An execution subprocess receives a composed
3385
- environment, never the host's. Two mechanisms apply in order, and they are different kinds
3386
- of thing. First the **ambient policy**, a ceiling: `PLURNK_SERVICE_EXEC_ENV_INHERIT` names
3387
- what the host's environment may contribute at all and `_EXCLUDE` narrows that, both taking
3388
- exact names or one trailing-`*` prefix glob, both ordinary operator knobs under
3389
- {§operator-config-env-defaults}. A worker document or a heading modifier narrows the ceiling
3390
- further; nothing downstream widens ambient admission. Explicit entries may supply their
3391
- own non-reserved values. Workspace defaults precede the Worker's `env` state
3392
- ({§env-functionality}), read at the spawn: an enabled worker entry sets its own value, a disabled
3393
- entry of either origin withholds the name, and what `list` projects is what the command
3394
- receives. Then the **invariant**, which is not a knob:
3395
- `PLURNK_*` config and every provider credential name are stripped last and unconditionally,
3396
- so no policy, document or modifier can readmit plurnk's own secrets. The service composes;
3397
- the executor spawns with the environment it is handed. Each spawn records the environment it
3398
- received on the output it produces — every name with its provenance: the host through the
3399
- ceiling, this Worker, an ancestor by name, or masked — and the digest renders it beside the
3400
- operation, which closes the host-versus-container confound where it starts.
3401
-
3402
- The ceiling exists because the invariant protects the wrong secrets. It knows plurnk's
3403
- credentials and nothing about the operator's, so a denylist alone hands `SSH_AUTH_SOCK` and
3404
- `NPM_TOKEN` to every command a model writes. Membership is an allowlist: the shipped
3405
- `INHERIT` is what a shell, git, node and python need to run, and an operator who wants a
3406
- tool's credential reachable by model-written commands adds it by name. An empty policy admits
3407
- nothing ambient — the allowlist is declared in `.env.defaults`, so an empty one is a cleared
3408
- policy rather than an unconfigured install.
3409
-
3410
- The full composition for one spawn, nearest setter winning for defaults and ceilings immune,
3411
- is package floors → operator cascade → ambient policy → workspace entries → worker entries → the op's modifier →
3412
- body prefixes.
3484
+ §exec-env-scoped **Command environment admission.** Core composes an ordinary executor's
3485
+ environment; the executor spawns with the environment it is handed ({§workspace-env}).
3486
+
3487
+ | Input | Admission |
3488
+ |---|---|
3489
+ | Ambient host values | `PLURNK_SERVICE_EXEC_ENV_INHERIT` admits exact names or one trailing-`*` prefix glob; `_EXCLUDE` removes names with the same syntax. An empty inherit list admits nothing. |
3490
+ | Reserved names | `PLURNK_*` and provider credential names from the model catalog or `PLURNK_PROVIDERS_PROVIDER_<ID>_API_KEY_ENV` are excluded from the ambient base regardless of those selectors. |
3491
+ | Workspace and worker entries | Explicit non-reserved values and masks compose at spawn under {§env-functionality}. Reserved names are refused at admission. |
3492
+ | Invocation `env` | Explicit non-reserved values override the composed environment under {§env-option}; the same reserved-name refusal applies. |
3493
+
3494
+ Explicit values do not widen ambient inheritance. The allowlist is declared under
3495
+ {§operator-config-env-defaults}; it limits other host credentials too, not only provider keys.
3496
+ Each spawn records admitted values and their provenance (host, workspace, worker, inherited
3497
+ worker, modifier, or masked); the digest renders that record beside the operation.
3498
+
3499
+ This is environment admission, not process containment or a prohibition on an approved
3500
+ program setting its own variables. Module-owned launches use the owning module's contract:
3501
+ the host supplies a filtered ambient base through {§module-seam-slices}, while explicit
3502
+ MCP bindings resolve under {§mcp-launch-environment}. The env family's reservation does not
3503
+ filter those explicit bindings or create a second approval path.
3413
3504
 
3414
3505
  - §env-option **The op's environment.** `env` is the service's key in the heading's `[metadata]`
3415
3506
  ({§scheme-metadata-modifier}): `[{"env": {"NAME": "value"}}]`, an object of string values.
@@ -3419,7 +3510,8 @@ body prefixes.
3419
3510
  retain explicit launch overrides when adding a process-backed definition; it never
3420
3511
  persists the composed ambient environment. On
3421
3512
  WORK and FORK it is the child's starting environment: after the copy the child inherits
3422
- ({§functionality-scope}), each name lands as the child's own entry through the family's `add`,
3513
+ ({§functionality-scope}), each supplied name replaces its copied definition as an enabled child-owned entry
3514
+ through the family's `replace` and `enable`,
3423
3515
  so a parent hands down its registry and overrides specific names for one child in one heading.
3424
3516
  Names follow the family's admission — a name a shell can export, never plurnk's own — and a
3425
3517
  refusal names the key and the reason at the operation, before anything runs or is created; a
@@ -3451,7 +3543,21 @@ body prefixes.
3451
3543
  - **Loop disposition** ({§proposal-disposition}) — core applies the exact automatic accept/reject before observational subscribers run; automatic policy is not an event listener or client fallback.
3452
3544
  - §proposal-timeout-cancels **Timeout is OPT-IN; an empty deadline WAITS** - an empty `PLURNK_SERVICE_PROPOSAL_TIMEOUT_MS` means a pending proposal - a file edit awaiting review - waits indefinitely for its human: absence is not an answer, so the service does not synthesize a cancellation. A finite positive millisecond value establishes the bound; then elapsing synthesizes `cancel` (outcome `timeout`), server-side, needing no client. Every other explicit value fails at the proposal lifecycle owner and terminalizes an already-written proposal rather than silently choosing an indefinite wait. Indefinite is with respect to the clock alone: the wait ends with its loop. A loop whose signal aborts — its own timeout, `loop.cancel`, worker `KILL` — settles every proposal it is holding through {§proposal-cancel-aborts}, carrying the abort's reason as the outcome, because a cancelled loop is not a loop awaiting a decision.
3453
3545
 
3454
- **The decision drives a one-way state transition** on `log_entries.state` (resolution is idempotent — `WHERE state='proposed'`, so a second resolution 404s):
3546
+ §proposal-decision-evidence Each proposal has at most one immutable decision record,
3547
+ committed before application. It contains the original accept/reject/cancel,
3548
+ resolver identity, decision time, and any submitted body override and outcome.
3549
+ Client decisions name the authenticated worker owner; automatic policy, timeout,
3550
+ abort, and shutdown decisions name `_plurnk`. This records the resolving authority,
3551
+ not an assertion that a human reviewed the operation. A failed decision write
3552
+ prevents application and surfaces its cause. The applied result is separate:
3553
+ acceptance followed by failure remains acceptance. Restart preserves recorded
3554
+ decisions, marks interrupted application uncertain, and never replays it
3555
+ ({§worker-lifecycle-restart-recovery}). Decision evidence follows its operation's
3556
+ history lifetime, survives log curation, and appears in forensic output, not in
3557
+ the model packet. Historical rows receive no invented decisions.
3558
+
3559
+ **The decision drives a one-way state transition** on `log_entries.state`.
3560
+ A second resolution is refused with `409 proposal-not-pending`:
3455
3561
 
3456
3562
  | decision | state | `status_rx` | default outcome | effect |
3457
3563
  |---------------------------------|---|---|---|---|
@@ -3624,6 +3730,26 @@ The model is NOT a stream/event consumer — turn-based only; sees whatever's in
3624
3730
 
3625
3731
  SQLite (`node:sqlite`) with WAL mode and STRICT tables. Hand-written DDL; CI-aligned against grammar schemas.
3626
3732
 
3733
+ ### §db-durability Connection durability
3734
+
3735
+ The service launcher applies `PLURNK_SERVICE_SQLITE_SYNCHRONOUS` through SqlRite's
3736
+ connection options before migrations or `INIT` write anything. The same policy
3737
+ reaches the writer and read pool on every open, including `migrate` and reopening
3738
+ an existing database. Its default lives in `.env.defaults`; an invalid value is
3739
+ diagnosed by `config check` and refuses database admission, never silently choosing
3740
+ a weaker mode. Configuration inspection and editing remain available.
3741
+
3742
+ | Mode | WAL guarantee |
3743
+ | --- | --- |
3744
+ | `FULL` | Each committed transaction is synchronized to storage, surviving application/OS crashes and power loss when the filesystem and device honor synchronization. |
3745
+ | `EXTRA` | Same guarantee as `FULL` in WAL mode. |
3746
+ | `NORMAL` | Consistent after a crash, but recent commits may be lost after an OS crash or power loss. |
3747
+ | `OFF` | Unsynchronized writes; a crash may corrupt the database. |
3748
+
3749
+ These are [SQLite's guarantees](https://www.sqlite.org/pragma.html#pragma_synchronous),
3750
+ not filesystem-write atomicity, external-effect rollback, a backup, or protection
3751
+ against storage hardware that fails to honor synchronization.
3752
+
3627
3753
  ### DDL strategy
3628
3754
 
3629
3755
  No generator. SQLite-optimal: STRICT (3.37+), `INTEGER PRIMARY KEY` aliasing, explicit `NOT NULL`, indexed query paths, deliberate FK `ON DELETE`/`ON UPDATE`, `WITHOUT ROWID` where access pattern warrants, generated columns, FTS5.
@@ -3640,7 +3766,19 @@ No generator. SQLite-optimal: STRICT (3.37+), `INTEGER PRIMARY KEY` aliasing, ex
3640
3766
  | §db-maintenance-optimize Statistics at shutdown | The daemon's last database step before the caller closes SQLite is `PRAGMA optimize` on the writer (`maintenance_optimize`), so `sqlite_stat1` reflects tables the connection planned against, bounded by SQLite's own analysis limit; a failure there is a reported shutdown error, never silent. Retention runs before it under the operator's policy ({§retention-policy}) and ends with a WAL truncation ({§db-space-reclamation}); no periodic `ANALYZE` runs. |
3641
3767
  | §db-space-reclamation The daemon keeps its own file healthy | `PLURNK_SERVICE_AUTO_VACUUM` (`incremental` or `none`) names the mode the daemon keeps its file in. At start, before any drain, a database in another mode is converted (set the mode, one `VACUUM`, which rewrites the file and needs free disk about its size) and the journal says so with page counts before and after. Under `incremental`, every retention pass ends by stepping `PRAGMA incremental_vacuum` to completion once free pages reach `PLURNK_SERVICE_RECLAIM_MIN_FREE_BYTES` (0 = every pass), and reports `reclaimedPages`; below the floor, free pages stay for SQLite to reuse. Under `none` the file never shrinks and freed pages are reused. No operator step is involved beyond the knobs. The WAL stays bounded by SQLite's automatic checkpoint (#764). |
3642
3768
  | §content-store Every body is stored once | `contents` holds each settled body once, addressed by its SHA-256, however many channels, workspaces, forks or derivations carry it; rows are immutable. `entry_channel_rows` points a settled channel at its body and keeps an active stream's body as a private buffer until it settles, when it is interned. Every reader and writer uses the `entry_channels` view, whose `INSTEAD OF` triggers intern bodies, refuse a bound `content_hash` that is not the content's, and write each column group only when it changed, so a search attachment is never a representation write. SQLite counts no changes for a view, so a write that must know whether its channel exists returns the channel's name; an outer join cannot flatten the view, so the two statements that need one read `entry_channel_rows` and `contents` directly. `derivation_fts` is an external-content index over `derivation_texts` (a derivation joined to its body); `derivations.content_id` names the indexed text, and the triggers in `_entry-fts.sql` move the index with it and forget it on delete. A body no channel holds and no derivation indexes is collected by retention under `PLURNK_SERVICE_COLLECT_CONTENTS`. Witnesses: `test/intg/retention.test.ts`, `test/intg/entries.test.ts`, `test/intg/fulltext-index.test.ts`. |
3643
- | §retention-policy Retention is the operator's policy; information is kept by default | `Retention` (`src/server/Retention.ts`, statements in `Retention.sql`) reads ten knobs from `.env.defaults` once at daemon start (the two storage knobs are {§db-space-reclamation}) and runs four set statements in dependency order — on `PLURNK_SERVICE_RETENTION_INTERVAL_MS` cadence while the daemon runs (0 = shutdown only) and once more at shutdown before `PRAGMA optimize`. `PLURNK_SERVICE_RETAIN_PACKET_TURNS` (-1 = every packet) and `PLURNK_SERVICE_RETAIN_PACKET_MS` (-1 = no age limit) retire a completed turn's packet composition (`turn_sections`, {§packet-items}) once it is beyond the newest N packet-bearing turns of its loop or older than the age; the turn, its bag, its log rows and its accounting stay, and an open turn is never retired. `PLURNK_SERVICE_COLLECT_PACKET_ITEMS` collects items no composition references. `PLURNK_SERVICE_COLLECT_CONTENTS` collects stored bodies nothing holds ({§content-store}), after the collectors that release them. `PLURNK_SERVICE_COLLECT_DERIVATIONS` collects derivations no channel, turn source, or log row cites — superseded editions — with their symbols (cascade) and their full-text shadow (`derivations_delete_fts`, a process trigger beside the FTS statements, on every delete path). `PLURNK_SERVICE_RETAIN_RESPONSE_TURNS` and `PLURNK_SERVICE_RETAIN_RESPONSE_MS` retire a settled call's response body (`model_call_responses`) once it is beyond the newest N body-bearing calls of its loop or its turn is older than the age; the call's identity, failure, capacity, admission and accounting stay, and the digest renders such a call request-only. The durable record is kept; packets and response bodies — transient evidence — age out, so a daemon left running for months stops growing (#788). An invalid policy withholds retention, including storage conversion and shutdown collection, and reports its configuration diagnostic without blocking the client ({§configuration-repair-path}). Storage I/O failures remain ordinary startup or shutdown failures. Witness: `test/intg/retention.test.ts`. |
3769
+ | §retention-policy Retention separates evidence classes | `Retention` reads the owning `.env.defaults` policy at daemon start and runs on its configured cadence and at shutdown. Packet count/age controls retire completed turns' `turn_sections`. Response controls atomically retire a logical call's normalized response and every physical-request payload, including failed retries; its immutable retirement timestamp remains. Count means the newest payload-bearing logical calls per loop, not individual retries, and retired calls retain their chronological place. Either bound can expire an item; `-1` disables only that bound. Open turns, calls and requests are excluded. Messages, log rows, turn sources, approval decisions, request identities, status, admission, failure, capacity and accounting follow their containing history's lifetime. Collectors remove unreferenced packet items, derivations, text and native contents ({§native-content-lifetime}); derivation deletion removes its search projections. These controls are not a whole-database size bound or content-erasure policy: canonical history can retain text also captured in a retired payload. Invalid policy withholds retention and storage conversion, reports a configuration diagnostic and leaves the repair environment available ({§configuration-repair-path}); storage I/O failures remain failures. Reclamation follows {§db-space-reclamation}. |
3770
+
3771
+ §native-content-lifetime Native snapshots remain while any retained READ result,
3772
+ message attachment (inbound or outbound), or stored packet references their hash.
3773
+ Log curation, reply completion, source replacement and source deletion do not
3774
+ release those historical references. `COLLECT_CONTENTS` removes only unreferenced
3775
+ native bytes, alongside unreferenced text. Resource operations and message
3776
+ admission share the in-flight content-use boundary with derivation work
3777
+ ({§derivation-in-flight}): collection skips a busy boundary, new producers wait
3778
+ for an active collection, and success or failure releases the use. Operations
3779
+ remain concurrent; this boundary grants neither file ownership nor reservation.
3780
+ Interrupted, unpublished snapshots become collectible after restart. Containing
3781
+ history deletion releases its references normally.
3644
3782
 
3645
3783
  - DDL = storage truth; JSON Schemas = wire truth. They are allowed to differ where ergonomics demand.
3646
3784
  - §entry-identity-no-null **Identity components are never NULL.** `(workspace_id, scheme, authority, pathname)` is a unique key. `workspace_id` references the workspace directly with cascading deletion. Namespace schemes use empty authority; resource schemes retain their canonical authority. File members use nonempty `scheme="file"` and render as bare paths. Registration refuses `storedScheme: null`.
@@ -3952,13 +4090,14 @@ Each knob's value lives on its panel and nowhere else (`plurnk-service config de
3952
4090
  | Var | Purpose |
3953
4091
  |---|---|
3954
4092
  | `PLURNK_SERVICE_DB_PATH` | SQLite file path; an explicit non-empty value overrides the derived default. |
4093
+ | `PLURNK_SERVICE_SQLITE_SYNCHRONOUS` | Connection-time WAL durability: `OFF`, `NORMAL`, `FULL` or `EXTRA` ({§db-durability}). |
3955
4094
  | `PLURNK_SERVICE_SHARE_FOLDER` | Parent of the shares written when no folder is named ({§share-folder}); empty is `$XDG_STATE_HOME/plurnk/shares`. |
3956
4095
  | §operator-config-shared-keys `PLURNK_HOST`, `PLURNK_PORT` | The daemon-owned listener's bind address and TCP port; modules mount their paths on that one listener ({§http-host}). **A key the daemon and its clients both read has a shared owner**: `@plurnk/plurnk-contracts` declares these two and the optional `PLURNK_AGUI_URL` on its own panel, the one package every side depends on. The daemon folds it like any installed member's, a client folds it beneath its own, and so neither holds the other's default. The service's `--host` and `--port` flags are generated from that panel. |
3957
4096
  | §operator-config-git-ceiling `PLURNK_SERVICE_GIT_ALLOWED` | Hard service ceiling: only `1` admits Git membership and status; every other value denies them. |
3958
4097
  | §operator-config-file-create-scope `PLURNK_SERVICE_FILE_CREATE_SCOPE` | Hard file-creation ceiling: `none < root < namespace`. `none` denies new filesystem files, `root` admits only paths inside `project_root`, and `namespace` also admits canonical outside-root paths. Existing-member writes are unaffected. |
3959
4098
  | `PLURNK_SERVICE_FILE_MATERIALIZE_MAX_BYTES` | Byte ceiling in `1..104857600` for one workspace-file snapshot ({§membership-materialization-limit}). |
3960
4099
  | `PLURNK_SERVICE_MAX_TURNS` | Operator model-call **ceiling** — `-1` = no cap; a positive value clamps `runLoop({maxTurns})`. The durable worker-tree budget includes descendant calls, BARE, and park/resume under {§turn-cap-counts-the-tree}; non-model chronology consumes none. |
3961
- | `PLURNK_SERVICE_MAX_COMMANDS` | Per-emission action ceiling; `-1` = no cap — every compiled op dispatches. Each resolved target statement counts once, whether authored separately or in a group ({§target-group}). Overflow ops drop with one durable `max-commands-exceeded` error row on the next packet. Lifecycle operations remain exempt ({§operator-config-workspace-max-commands-floor}). Tightened per workspace via `settings.maxCommands` (min wins). |
4100
+ | `PLURNK_SERVICE_MAX_COMMANDS` | Per-emission action ceiling; `-1` = no cap — every resolved op dispatches. Each concrete operation counts once, whether authored separately, in a group ({§target-group}), or selected by a glob ({§bulk-resource-targeting}). Overflow ops drop with one durable `max-commands-exceeded` error row on the next packet. Lifecycle operations remain exempt ({§operator-config-workspace-max-commands-floor}). Tightened per workspace via `settings.maxCommands` (min wins). |
3962
4101
  | §operator-config-loop-timeout `PLURNK_SERVICE_LOOP_TIMEOUT` | Positive ms of cumulative active execution per loop ({§loop-execution-allowance}); excludes parked/queued time. Snapshotted on first execution, retained across wakes. Exhaustion aborts in-flight work and terminates `504 loop_timeout`, including a stuck provider call. |
3963
4102
  | `PLURNK_SERVICE_PROVIDER_RECOVERY` | ms of recovery after the first recoverable provider failure; `0` disables reissue. Expiry parks workers with a reviewer, otherwise concludes their loop, or returns BARE's failure under {§provider-recovery}. |
3964
4103
  | `PLURNK_SERVICE_PROVIDER_RECOVERY_BACKOFF` | First recovery delay (ms); doubles per failure up to `PLURNK_SERVICE_PROVIDER_RECOVERY_BACKOFF_MAX` ({§provider-recovery}). |
@@ -4332,7 +4471,7 @@ registry. Deleting the workspace cascades its state; worker lifecycle does not.
4332
4471
 
4333
4472
  §functionality-coordinator **One coordinator owns the common lifecycle.**
4334
4473
  Functionality families are adapters beneath
4335
- `list | discover | add | enable | disable | remove`. State and mutations
4474
+ `list | discover | add | replace | enable | disable | remove`. State and mutations
4336
4475
  serialize per workspace and family. Scope-bound client actions
4337
4476
  `workspace.<family>.<verb>` / `worker.<family>.<verb>` and model manager executors invoke the same
4338
4477
  coordinator. Families do not invent another management grammar, proposal
@@ -4345,10 +4484,38 @@ Retryability describes the actual failed condition, not its numeric status.
4345
4484
  | `list` | Project definitions, ownership (`origin`), winning configuration source (`provenance`), enabledness, and published preparation outcome: disabled, dormant, active, unavailable with its Problem, or authorization-required. No credential values. |
4346
4485
  | `discover` | Return inert candidates for the inputs the family serves ({§functionality-discover-advertisement}). Never install, persist, enable, or execute them. |
4347
4486
  | `add` | Admit and persist a local definition, prepare it, and enable it atomically. It may override an inherited definition. Reapplying the same local definition enables it idempotently (200); a different local definition for that alias fails 409 without replacing it. |
4487
+ | `replace` | Assign a complete definition to an explicit alias through {§functionality-replacement}. Preserve existing enabledness; a new alias is enabled. |
4348
4488
  | `enable` | Publish an available definition; retry preparation if unavailable. |
4349
4489
  | `disable` | Withdraw live capability; retain its definition and saved results. |
4350
4490
  | `remove` | Forget the locally owned definition and its enabledness override. Restore any inherited definition with its inherited enabledness. Inherited definitions cannot be removed at this scope. Saved results remain. |
4351
4491
 
4492
+ §functionality-replacement **Replacement is a named whole-definition assignment.**
4493
+ The shared coordinator admits it through the family's existing schema and adapter,
4494
+ then uses the same serialized preparation and publication path as other mutations.
4495
+ It neither removes the old definition first nor merges omitted fields.
4496
+
4497
+ | Boundary | Outcome |
4498
+ |---|---|
4499
+ | Existing local or inherited alias | Persist the complete admitted definition in the selected scope, retaining the alias's effective enabledness. A local override replaces inherited interpretation context and provenance. |
4500
+ | Absent alias | Create the named local definition, enabled. The alias is required; replacement never derives one. |
4501
+ | Disabled candidate | Persist without preparing that alias. Editing a definition does not enable it. |
4502
+ | Admission, preparation, or publication refuses | Keep the preceding definition, enabledness, attachment and documents. Return the exact failure to either client or model caller. External effects of preparation retain the limits of {§functionality-publication}. |
4503
+ | Authorization required | Publish the existing authorization-required handoff; this is not a failed preparation. |
4504
+ | Identical definition | Retain enabledness and normal attachment reuse; this is not an explicit enable/restart. |
4505
+
4506
+ §functionality-mutation-status **Mutation status describes the committed resource
4507
+ outcome, not the management invocation's stream lifetime.** Apply these rows in
4508
+ order; refusals retain their own Problems and do not commit a replacement.
4509
+
4510
+ | Outcome | Status |
4511
+ |---|---:|
4512
+ | The resulting definition requires authorization | 202 |
4513
+ | `add` or `replace` creates a local definition, including an override of an inherited definition | 201 |
4514
+ | `add` reapplies the identical local definition; `replace` assigns an existing local definition; `enable`, `disable`, or `remove` settles | 200 |
4515
+
4516
+ `add` of a different local definition remains `alias-exists` (409); `replace` is explicit.
4517
+ Model invocation settlement follows {§functionality-model-mutation} independently.
4518
+
4352
4519
  §functionality-discover-advertisement **A family's `discover` advertises exactly the inputs it
4353
4520
  serves.** The coordinator builds the family's discover input schema from its declared discovery
4354
4521
  ({§functionality-discovery-inputs}): the declared inputs with their shared
@@ -4542,8 +4709,11 @@ set any name it lists or none of them — it answers which names have a **consum
4542
4709
  a Worker learns the name of a value only the operator can supply. The catalog projects
4543
4710
  declarations, never the host environment, so a credential the operator has filled in appears by
4544
4711
  name with its documentation and an empty value ({§exec-env-scoped}: referred to by name, never
4545
- read). `source` selects one declaring package, and a request naming neither input is the whole
4546
- catalog. A client's own environment is no input: contributing candidates, it would be a second
4712
+ read). `source` selects one declaring package; an unknown source is `source-unknown`
4713
+ (400), not an empty catalog. A known source with no matching settable declarations
4714
+ returns an empty candidate list. A request naming neither input is the whole
4715
+ catalog. Files are read with READ; variables are set with `add` or `EDIT (env:///NAME)`.
4716
+ A client's own environment is no input: contributing candidates, it would be a second
4547
4717
  door past the ceiling.
4548
4718
 
4549
4719
  The family publishes no process runtimes. Its values are read at the spawn that uses them,
@@ -4557,7 +4727,7 @@ reserved or masked name is no resource. The family's manager exposes it as the f
4557
4727
  the value its commands receive now, FIND lists the names in effect and a pattern on it matches
4558
4728
  values, COPY carries a value out. The manager's own output streams, eight hexadecimal characters
4559
4729
  ({§execution-output-identity}), stay the executor's. A write is the Worker's own layer, never the
4560
- workspace's or the operator's: EDIT sets the whole value through the family's `add` for the
4730
+ workspace's or the operator's: EDIT sets the whole value through the family's `replace` for the
4561
4731
  Worker, and KILL retires the name from the Worker's commands — `remove` for an entry the Worker
4562
4732
  owns, which restores an inherited value, `disable` for an inherited one, which keeps its
4563
4733
  definition. Admission is the family's ({§env-functionality}) and its refusal is the operation's
@@ -4594,7 +4764,7 @@ reach the other, and depth is transitive with no further rule. Each copied entry
4594
4764
  `inherited`, the Worker that set it, preserved across generations until the child changes that
4595
4765
  entry, so `list` never claims the child set what it inherited; a parent's masking of an
4596
4766
  ambient name travels the same way. WORK and FORK may hand the child more: the heading's `env`
4597
- option lands as the child's own entries through `add`, after the copy ({§env-option}).
4767
+ option replaces and enables the child's own entries after the copy ({§env-option}).
4598
4768
 
4599
4769
  §functionality-state **One durable value per workspace and family.**
4600
4770
  `{ version: 1, definitions: { [alias]: { origin, enabled, definition? } } }`
@@ -4664,7 +4834,7 @@ It then reports `active`, `unavailable`, or `authorization-required`, or the exa
4664
4834
  publication failure. Resource readiness is not execution liveness: a mutation's
4665
4835
  `202 authorization-required` body remains exact, while the finished manager
4666
4836
  execution closes with `200`. It does not wait for sign-in. A preparation failure may publish enabled-but-unavailable
4667
- state; a publication failure never reports a successful mutation. Stream polling,
4837
+ state for other mutations, but `replace` rejects it ({§functionality-replacement}); a publication failure never reports a successful mutation. Stream polling,
4668
4838
  waiting, and result observation use the ordinary execution lifecycle, without a
4669
4839
  separate deferred-commit queue. An explicit client action publishes now, rejects
4670
4840
  a failed preparation, and fails 409 while the workspace is held
@@ -4972,7 +5142,7 @@ adding a loop to it. LOOK text anchors resolve through the same
4972
5142
 
4973
5143
  | Event | Payload | When fired |
4974
5144
  |--------------------------------------------------------------|---------|------------|
4975
- | §notifications-operation-event `operation/event` | `ApplicationOperationEvent`: `{ workerId, loopId, turnId, sequence, origin, projectRoot, statement, phase, result? }` | One admitted dispatch starts before capability/proposal admission and settles after its durable receipt(s). Only the settled phase has `result`, the exact returned operation result. READ fan-out is one dispatch; BARE starts before prompt preparation and settles after ordered receipt persistence. Automatic stream observations and log writes are not dispatches. An asynchronous executor's successful dispatch does not assert process exit. An internal exception that prevents settlement has no invented result event. |
5145
+ | §notifications-operation-event `operation/event` | `ApplicationOperationEvent`: `{ workerId, loopId, turnId, sequence, origin, projectRoot, statement, phase, result? }` | One admitted dispatch starts before capability/proposal admission and settles after its durable receipt(s). Only the settled phase has `result`, the exact returned operation result. Resource fan-out is one dispatch ({§bulk-resource-targeting}); BARE starts before prompt preparation and settles after ordered receipt persistence. Automatic stream observations and log writes are not dispatches. An asynchronous executor's successful dispatch does not assert process exit. An internal exception that prevents settlement has no invented result event. |
4976
5146
  | §notifications-log-entry-notify `log/entry` | `{ entry: LogEntry }` | A non-proposed `log_entries` row is committed, or a proposed row reaches terminal settlement under {§proposal-proposed-hidden}. Delivery completes before a later event may terminate the owning Loop. |
4977
5147
  | §notifications-loop-terminated `loop/terminated` | `{ workerId, loopId, result, hitMaxTurns, turnIds, usage: { accounting, curationWeight, curationBudget, contextTokens, contextCapacity, meta }, attributions }` | One loop reaches a terminal state. `result` is the exact universal operation result, including its RFC 9457 Problem Details on failure. `accounting` is the loop's contracts-owned {§provider-accounting}; the two curation facts and two physical-context facts follow {§tokenomics-client-gauge}; `meta` is that turn's opaque provider bag. `attributions` is the sorted union of exact provider-request evidence ({§attribution}), separate from accounting. Worker and loop are an inseparable owning coordinate. |
4978
5148
  | §notifications-loop-packet `loop/packet` | `{ workerId, loopId, packetCount }` | One provider packet becomes durable. `packetCount` is the exact count of packet-bearing turns in that Loop; packetless producer turns and physical provider retries never contribute. |
@@ -5166,7 +5336,7 @@ flowchart TD
5166
5336
  - §context-pressure-notice **Pressure is one notice.** When the gauge names its inventory ({§context-gauge}) and the packet, with the notice in it, stays within its budget, the packet's notices section carries one `engine:context` notice `budget_pressure`, `level: warn`, whose directive is "YOU MUST NOT exceed budget." and whose message is "Context is at *N*% of budget." *N* is `floor(100 × tokens / budget)` over the gauge's final figures, so the share never disagrees with the gauge, and the notice carries no count of its own. It is decided and rendered with the packet it describes, recurs on every such packet, and is never buffered or sent to clients, which read their own pair ({§tokenomics-client-gauge}). An over-budget packet carries the row instead ({§context-over-budget-row}).
5167
5337
  - §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 emission record 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. Result cuts are named where they happen: the first page of what came back unasked in size ({§markerless-first-page}) and the cut at the room in the receipt. The optional emission history is whole or absent ({§emission-history}), never a cut.
5168
5338
  - §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.
5169
- - §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.
5339
+ - §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 is shown once, in the packet it describes, then retired from the projection as a no-match KILL receipt is ({§log-kill-meta-operation}): it stays durable and readable at its coordinate, and a later packet that is over carries its own row. 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.
5170
5340
  - §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}). A request over the wall sheds ({§context-own-rows-fit}) and is measured again ({§context-wall-measure}); a packet that cannot fit even as receipts ends its loop with the exact `engine/context/window-overflow` 413 Problem, and no inference request is made. An unknown window has no wall ({§tokenomics-window-unpollable-deliberate}).
5171
5341
  - §context-wall-measure **The wall measures the request that will be sent.** The estimate is the packet's weight through its calibration factor ({§tokenomics-calibrated-readout}) and is never assumed to overestimate. A packet that fits by the estimate is assessed by the provider as the exact wire request ({§provider-capacity-admission}): an admission sends it; an exact refusal is the wall's verdict, and the request sheds by the refusal's excess and is assessed again. A provider that can only estimate defers, and the upstream provider is then the capacity oracle: its refusal ends the loop with the provider's own 413.
5172
5342
  - §context-own-rows-fit **The model's own rows take the same receipt.** When a request is over the wall by either measure ({§context-wall-measure}), 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 request to fit: the heading, the facts, and `size`, the lines and tokens of what the row stood for. The optional emission history has already been omitted whole ({§emission-history}); an emission record has no body to take. 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.
@@ -5520,7 +5690,7 @@ retain distinct contracts and lifetimes.
5520
5690
  | `parse_advisory` | grammar parser — recoverable near-miss which did not invalidate the parsed statements | YOU SHOULD write the canonical form. | content-offset into the model's emission |
5521
5691
  | `search_progress` | repository materialization/indexing lifecycle ({§persistent-search-index}); structured phase, count, and percent; `level: info`, `warn` when a completed pass carries failed members ({§derivation-member-failure}), `error` on terminal failure | none | none |
5522
5692
  | `git_inspection_refused` | engine membership — automatic Git inspection refused a supplied repository whose config declares a `filter.*` program ({§membership-git-hermetic}); names the key; `level: warn`, once per workspace until the key changes or clears | none | none |
5523
- | `continued_without_note` | engine turn — a continuing or parked model turn that admitted no NOTE ({§continued-without-note}); `level: warn` | YOU MUST use at least one NOTE per continuing turn. | none |
5693
+ | `continued_without_note` | engine turn — a continuing or parked model turn that admitted no NOTE ({§continued-without-note}); `level: warn` | YOU MUST record at least one NOTE along with other operations. | none |
5524
5694
  | `budget_pressure` | engine context — a packet within its budget whose gauge is under pressure ({§context-pressure-notice}); `level: warn`; rendered with that packet, never buffered | YOU MUST NOT exceed budget. | none |
5525
5695
  | `outside_text` | engine turn — text the emission carried outside its operations, discarded ({§outside-text}); `level: warn` | YOU MUST NOT emit anything except whitespace between fenced operations. | none |
5526
5696
  | `invalid_emission` | engine grammar — a response rejected before dispatch; `level: error` | YOU MUST ONLY emit fenced operations; with the parameters, pattern, and terse aside on the fenced Operation line. | content-offset of the parser diagnostic, when it has one |
@@ -5529,19 +5699,19 @@ retain distinct contracts and lifetimes.
5529
5699
  | `provider_retry` | a provider stream that failed after output began and was answered by a complete retry; `level: warn` | none | none |
5530
5700
  | `provider_unavailable` | engine provider — a provider failure retried within its recovery budget | none | none |
5531
5701
  | `path_normalized` | file scheme — a path resolved to its canonical spelling; `level: warn` | YOU SHOULD address the resolved path. | none |
5532
- | `read_fanout_bounded` | engine dispatcher — a READ whose glob matched more paths than it read; `level: warn` | YOU SHOULD narrow the glob, or FIND first. | none |
5702
+ | `read_fanout_bounded` | engine dispatcher — a READ whose glob matched more paths than its resource page selected; `level: warn` | YOU SHOULD narrow the glob, or FIND first. | none |
5533
5703
  | `parse_issues_unavailable` | engine mimetype — parser recovery evidence unavailable for a mimetype; `level: warn` | none | none |
5534
5704
  | `metadata_ignored` | engine dispatcher — `[metadata]` on an operation whose scheme takes none, run without it; `level: warn` | YOU SHOULD NOT write [metadata] on an operation that takes none. | none |
5535
5705
  | `scope_normalized` | engine slicer — a scope normalized to its canonical form; `level: warn` | YOU SHOULD write the normalized scope. | none |
5536
5706
  | `edit_merged` | engine slicer — an EDIT resolution rule applied to a batch ({§edit-batch-merges}); `level: warn` | YOU SHOULD verify the merged EDIT before building on it. | none |
5537
5707
 
5538
- §continued-without-note **A continuing turn that lapsed from the per-turn rule is told so.** The card's rule is one line, `YOU MUST emit at least one NOTE operation with a complete status summary and at least one other operation per turn.`, and the daemon's directive quotes it. When a model turn settles at 102 or 202, so the loop continues past it or parks on it, and it admitted no NOTE in its program or from its reasoning ({§reasoning-operations}), the next packet carries one `engine:turn` notice, `continued_without_note`, `level: warn`, with that directive and the message `The turn continued without a NOTE.`; when its program was NOTEs and nothing else, the next packet carries `noted_without_operation`, the same directive and the message `The turn carried NOTEs and no other operation.` Each is a notice, never a failure: it mints no row, never counts toward the strike rail, and never ends or alters a loop. A turn that concludes its loop, an empty turn, which carries its own no-operation row, and every non-model turn take none.
5708
+ §continued-without-note **A continuing turn that lapsed from the per-turn rule is told so.** The card's rule is one line, `YOU MUST record at least one NOTE along with other operations.`, and the daemon's directive quotes it. When a model turn settles at 102 or 202, so the loop continues past it or parks on it, and it admitted no NOTE in its program or from its reasoning ({§reasoning-operations}), the next packet carries one `engine:turn` notice, `continued_without_note`, `level: warn`, with that directive and the message `The turn continued without a NOTE.`; when its program was NOTEs and nothing else, the next packet carries `noted_without_operation`, the same directive and the message `The turn carried NOTEs and no other operation.` Each is a notice, never a failure: it mints no row, never counts toward the strike rail, and never ends or alters a loop. A turn that concludes its loop, an empty turn, which carries its own no-operation row, and every non-model turn take none.
5539
5709
 
5540
5710
  §notice-callout **A notice speaks in the card's callout form.** Each renders as one alert callout, its level choosing the callout: `> [!CAUTION]` for `error`, `> [!WARNING]` for `warn`, and `> [!NOTE]` for `info`, which no model packet carries. Inside it stand the directive ({§notice-directive}), then the message, any typed position as `@ line:column`, and the kind in brackets; a blank line separates consecutive callouts:
5541
5711
 
5542
5712
  ```text
5543
5713
  > [!WARNING]
5544
- > YOU MUST use at least one NOTE per continuing turn. The turn continued without a NOTE. [continued_without_note]
5714
+ > YOU MUST record at least one NOTE along with other operations. The turn continued without a NOTE. [continued_without_note]
5545
5715
  ```
5546
5716
 
5547
5717
  §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 `output_unaccounted` is `warn`; ordinary lifecycle and progress notices are `info`. Clients color straight off `level` without interpreting the open `kind` vocabulary.
@@ -5661,10 +5831,10 @@ remain one compact orientation line, not an expansion of every tool's signature.
5661
5831
 
5662
5832
  §members-functionality **File membership is one workspace Functionality family.**
5663
5833
  Core registers the `members` family with the coordinator ({§functionality-coordinator}):
5664
- the model, the client, and the operator learn one surface — `list | discover | add |
5834
+ the model, the client, and the operator learn one surface — `list | discover | add | replace |
5665
5835
  enable | disable | remove`, `workspace.members.<verb>` for the client,
5666
5836
  ```` ```members (<verb>) ```` for the model — for what the model may see, exactly as they do for skills and
5667
- MCP servers. A definition is one gitignore-style glob, `{ glob }`, relative to the project
5837
+ MCP servers. A definition is one shell-path glob ({§path-glob-matching}), `{ glob }`, relative to the project
5668
5838
  root; a leading `!` excludes matching members, and an exclusion wins over every inclusion.
5669
5839
  Admission provenance (`service-configuration`, `client-action`, `model-proposal`)
5670
5840
  rides the definition to enforce {§members-model-scope}; configuration-source
@@ -5998,12 +6168,12 @@ repair neighboring punctuation. Readable projections have their own coordinates.
5998
6168
 
5999
6169
  ### §ext-mimetype Path-extension declares mimetype
6000
6170
 
6001
- `resolveEntryMimetype` (exported from `@plurnk/plurnk-schemes`): pathname extension → `Mimetypes.detect({ ext })` (with `text/plain` normalized to `text/markdown` per the text-primitive rule {§markdown-primitive}); falls back to scheme manifest channel default when no extension.
6171
+ `PathMimetype.resolve` (exported from `@plurnk/plurnk-schemes`): pathname extension → `Mimetypes.detect({ ext })` (with `text/plain` normalized to `text/markdown` per {§markdown-primitive}); an unrecognized or absent extension uses the caller's supplied type. Text EDIT creation supplies the scheme's declared channel type or the Markdown primitive for a dynamically typed channel. Transfers follow {§copy-destination-mimetype}.
6002
6172
 
6003
6173
  - `worker:///users.json` → `application/json` (extension wins)
6004
6174
  - `worker:///notes.md` → `text/markdown` (extension; matches default)
6005
6175
  - `worker:///config.yaml` → `application/yaml`
6006
- - `worker:///users` (no suffix) → `text/markdown` (worker manifest default)
6176
+ - Text EDIT of `worker:///users` (no suffix) → `text/markdown` (text primitive)
6007
6177
 
6008
6178
  §ext-mimetype-extension-mimetype The same rule applies to every entry-bearing scheme when
6009
6179
  creating a channel without a per-call type declaration. EDIT and COPY/MOVE into
@@ -6150,6 +6320,7 @@ Every Problem code core mints is named here under its family ({§problem-error-c
6150
6320
  | code | status | contract |
6151
6321
  |---|---:|---|
6152
6322
  | `target-required` | 400 | *OP* requires a target path. Recovery: Write the target in parentheses on the opening fence line: `OP (path)`. |
6323
+ | `target-cardinality` | 400 | *OP* *operand* matched *n* resources; expected one. Recovery: Name one source and one destination per pair. |
6153
6324
  | `scheme-not-found` | 501 | Scheme '*name*' is not registered. Recovery: ({§unregistered-scheme-recovery}) `Registered schemes: *names*.` |
6154
6325
  | `scheme-metadata-unsupported` | 400 | *OP* on '*scheme*' does not accept the [metadata] modifier. |
6155
6326
  | `operation-not-implemented` | 501 | Scheme '*name*' does not implement *OP* (or exec). |
@@ -6177,6 +6348,26 @@ Every Problem code core mints is named here under its family ({§problem-error-c
6177
6348
  | `worker-name-conflict` | 409 | Worker '*name*' already exists in this workspace. |
6178
6349
  | `no-operation` | 422 | The turn performed no operation ({§empty-turn}). |
6179
6350
  | `send-target-not-a-recipient` | 400 | The addressed scheme is not a SEND recipient. Recovery: Name a message address or a recipient that implements SEND. |
6351
+ | `invalid-operation-syntax` | 400 | The parser's diagnostic for an invalid operation in an admitted turn. |
6352
+ | `unreadable-pattern` | 400 | The pattern reader's diagnostic for an unreadable matcher. |
6353
+ | `completion-invalid` | 400 | A reply accepts one completion code: 200 or 499. |
6354
+ | `attachment-address-invalid` | 400 | An attachment selects one exact resource address. |
6355
+
6356
+ §problems-loop **Loop and context Problems.** These codes identify the failed boundary; lifecycle and recovery remain governed by their owning contracts.
6357
+
6358
+ | code | status | condition |
6359
+ |---|---:|---|
6360
+ | `result-exceeds-budget` | 413 | A result exceeds the remaining log budget; detail names its size, delivered portion, and a smaller selection or curation ({§context-fit}). |
6361
+ | `window-overflow` | 413 | The packet cannot fit the model's window even as receipts ({§context-wall}). |
6362
+ | `packet-exceeds-budget` | 413 | Context exceeds budget; the curation mandate is the pinned sentence below ({§context-over-budget-row}). |
6363
+ | `loop-timeout` | 504 | The loop exhausted its active execution allowance. |
6364
+ | `strike-threshold` | 508 / 500 | Repetition crossed the strike threshold (508), or another strike source crossed it (500), under {§engine-rails}. |
6365
+ | `loop-running` | 425 | The addressed execution has not concluded. |
6366
+ | `loop-cancelled` | 499 | The loop was cancelled; detail preserves the cancellation reason. |
6367
+ | `loop-threw` | 500 | The loop failed outside its operation result contract. |
6368
+ | `narration-failed` | 500 | Filesystem divergence narration failed before its operation turn settled. |
6369
+ | `provider-contract-violation` | 502 | The provider failed without returning its required Problem Details. |
6370
+ | `active-worker-limit-reached` | 508 | The workspace's active workers reach its configured limit. |
6180
6371
 
6181
6372
  §unregistered-scheme-recovery **An unregistered scheme's refusal names what does exist.** Its recovery
6182
6373
  lists the schemes the workspace registers, and rebuilds the address into nothing else
@@ -6203,6 +6394,7 @@ lists the schemes the workspace registers, and rebuilds the address into nothing
6203
6394
 
6204
6395
  | code | status | contract |
6205
6396
  |---|---:|---|
6397
+ | `invalid-file-url` | 400 | The native file-URL diagnostic, or `File URL path must not include NUL characters.` ({§file-url}). |
6206
6398
  | `edit-empty` | 400 | EDIT requires at least one statement. Recovery: Provide an EDIT statement. |
6207
6399
  | `edit-batch-mismatch` | 400 | The EDIT batch spans multiple resources. Recovery: Submit a separate EDIT batch for each resource. |
6208
6400
  | `line-marker-required` | 400 | EDIT of an existing file requires a line marker ({§edit-marker-required-on-existing}). Recovery: Name the lines to replace with `<@hash>` or `<@start,@end>` from a READ of the file; `<L,1,L,1>` inserts before line L, and `<1,-1>` replaces the whole file. |
@@ -6217,6 +6409,12 @@ lists the schemes the workspace registers, and rebuilds the address into nothing
6217
6409
  | `file-create-gitignored` | 403 | Active Git policy ignores '*path*', and no members definition includes it. Recovery: Choose a Git-admitted path or add a members definition that includes it. |
6218
6410
  | `file-materialization-limit` | 413 | The file exceeds the materialization byte limit and is not read into the workspace. |
6219
6411
  | `entry-not-found` | 404 | No member of this workspace is at '*path*'. Recovery: FIND lists paths. EDIT creates files; `members (add)` admits existing files with a `{"glob": "<path>"}` body. A path beyond the root recovers instead to: '*path*' is outside the project root: only a members definition under the operator's namespace scope admits it. |
6412
+ | `body-channel-required` | 400 | A file write requires a body channel. |
6413
+ | `write-failed` | 500 | Publication or its settlement failed; the result distinguishes an unpublished write from an already-published one. |
6414
+ | `creation-rollback-failed` | 500 | Incorporating a newly created file failed, and rollback was incomplete. |
6415
+ | `creation-incorporation-failed` | 500 | Incorporating a newly created file failed; its exclusive creation was rolled back. |
6416
+ | `materialization-failed` | 500 | The file was written to disk but could not be registered. |
6417
+ | `delete-failed` | 500 | Deletion or projection settlement failed; the result distinguishes an undeleted file from an already-deleted one. |
6220
6418
 
6221
6419
  §problems-exec **Execution Problems.** Every code minted here, its status, and the sentence that is its contract (placeholders in *italics* are filled at emission; a fixed recovery follows its detail).
6222
6420
 
@@ -6226,6 +6424,19 @@ lists the schemes the workspace registers, and rebuilds the address into nothing
6226
6424
  | `input-unavailable` | 409 | This execution's input receiver is no longer enabled. |
6227
6425
  | `stream-not-found` | 404 | No execution exists at the requested address. Recovery, when the id holds an execution under another runtime ({§exec-near-miss}): The execution at /*id* is `*runtime*:///*id*`. |
6228
6426
  | `input-closed` | 410 | Execution input is closed. |
6427
+ | `executor-not-registered` | 400 | No executor or MCP service named '*runtime*' is registered for this worker. |
6428
+ | `runtime-unavailable` | 501 | Executable tool '*runtime*' is unavailable; detail includes the availability diagnostic. |
6429
+ | `lifetime-invalid` | 400 | The execution lifetime directive is invalid; detail identifies the invalid form. |
6430
+ | `target-classification-failed` | 500 | The execution target could not be inspected; detail includes a bounded cause. |
6431
+ | `source-content-unavailable` | 422 | The source scheme did not supply execution content. |
6432
+ | `stream-entry-write-failed` | 500 | The execution's stream entry could not be created. |
6433
+ | `program-is-a-tool` | 404 | The command exited 127 and names a registered tool of another runtime ({§exec-tool-fall-through}). |
6434
+ | `executor-did-not-conclude` | 500 | The executor did not produce a terminal result. |
6435
+ | `execution-cancelled` | 499 | Execution was cancelled by the service. |
6436
+ | `executor-invalid-result` | 500 | The executor returned an invalid operation result. |
6437
+ | `executor-threw` | 500 | The executor failed outside its operation result contract. |
6438
+ | `entry-narration-failed` | 500 | An executor entry could not be materialized or narrated. |
6439
+ | `input-receiver-failed` | 500 | The input receiver failed outside its result contract; delivery may be partial. |
6229
6440
 
6230
6441
  §problems-entries **Entry scheme Problems (log, worker, entries).** Every code minted here, its status, and the sentence that is its contract (placeholders in *italics* are filled at emission; a fixed recovery follows its detail).
6231
6442
 
@@ -6233,12 +6444,36 @@ lists the schemes the workspace registers, and rebuilds the address into nothing
6233
6444
  |---|---:|---|
6234
6445
  | `read-target-required` | 400 | READ requires a log coordinate. Recovery: Provide one exact log coordinate. |
6235
6446
  | `coordinate-malformed` | 400 | The log coordinate '*path*' is malformed. Recovery: Use one exact loop/turn/sequence coordinate. |
6447
+ | `kill-failed` | 400 | The log target '*path*' is malformed. (A glob the matcher cannot read: The log glob '*glob*' is malformed.) Recovery: the {§log-target-shape} sentence. |
6448
+ | `curation-failed` | 400 | A scoped KILL's selection could not be read: the same sentences and recovery as `kill-failed`. |
6236
6449
  | `worker-target-required` | 400 | EDIT requires a worker:// target. Recovery: Provide the worker target. |
6237
6450
  | `binary-edit-unsupported` | 415 | The #*channel* channel is binary and cannot be edited. |
6238
6451
  | `message-not-implemented` | 501 | SEND does not deliver messages to *scheme* entries. Recovery: To reply, SEND to an Open Message address or omit the target. `SEND (worker://<name>)` sends a new message. |
6239
6452
  | `worker-entity-not-editable` | 400 | A worker entity is not an editable entry. Recovery: EDIT requires an entry path, such as worker:///example.md. |
6240
6453
  | `message-empty` | 400 | SEND has no message text or attachments. |
6241
6454
  | `scope-unsupported` | 400 | A worker SEND takes no scope. |
6455
+ | `control-address-invalid` | 400 | The operation requires an authority-only worker control address. |
6456
+ | `named-worker-required` | 400 | A worker deliverable READ requires a named worker. |
6457
+ | `emission-curated-whole` | 422 | An emission has no legend lines, so a line scope selects nothing on it. |
6458
+ | `entry-exists` | 409 | An entry already exists at the addressed resource. |
6459
+ | `invalid-expression` | 400 | The full-text or graph matcher expression is invalid. |
6460
+ | `delete-target-required` | 400 | KILL requires a target path. |
6461
+
6462
+ §problems-client **Client interactions and message admission Problems.** Refused admission creates no replacement message or interaction.
6463
+
6464
+ | code | status | condition |
6465
+ |---|---:|---|
6466
+ | `interaction-not-pending` | 409 | The requested client interaction is not pending. |
6467
+ | `interaction-unsupported` | 501 | No recipient implements the requested tool for this conversation. |
6468
+ | `recipient-mismatch` | 403 | Only the interaction's recipient may answer it. |
6469
+ | `interaction-response-invalid` | 400 | The response does not satisfy the pending interaction's schema. |
6470
+ | `invalid-body` | 400 | A question body is not JSON, or lacks its nonempty message or requested schema. |
6471
+ | `offset-invalid` | 400 | An entry offset is not a nonnegative safe integer. |
6472
+ | `userinfo-not-allowed` | 400 | An entry target URL contains userinfo. |
6473
+ | `action-threw` | 500 | The client action failed outside its operation result contract. |
6474
+ | `message-already-accepted` | 409 | The message address was already accepted in this workspace. |
6475
+ | `source-not-running` | 409 | The originating task is not running; no message was admitted. |
6476
+ | `loop-not-open` | 409 | The named loop is not an unfinished recipient of the worker; no message was admitted. |
6242
6477
 
6243
6478
  §problems-functionality **Server and Functionality Problems.** Every code minted here, its status, and the sentence that is its contract (placeholders in *italics* are filled at emission; a fixed recovery follows its detail).
6244
6479
 
@@ -6247,12 +6482,13 @@ lists the schemes the workspace registers, and rebuilds the address into nothing
6247
6482
  | `service-starting` | 503 | The PLURNK service owns this listener but has not admitted its client interface yet. |
6248
6483
  | `route-not-found` | 404 | The requested HTTP route does not exist. |
6249
6484
  | `configuration-invalid` | 503 | The owning configuration reader's diagnostic, naming the invalid key. Recovery: Correct the named configuration input. Other capabilities remain available. |
6250
- | `name-reserved` | 400 | '*alias*' is plurnk's own: PLURNK_* configuration and provider credential names never reach a subprocess. |
6485
+ | `name-reserved` | 400 | '*alias*' is reserved in env entries and invocation overrides. Recovery: READ worker:///_plurnk/plurnk/env.md for supported configuration paths. |
6251
6486
  | `value-invalid` | 400 | '*alias*' needs a string value. |
6252
6487
  | `env-invalid` | 400 | `env` must be an object of string values; '*name*' is not a name a shell can export. |
6488
+ | `source-unknown` | 400 | '*source*' is not a package in the configuration catalog. Recovery: Omit source to list the catalog. READ files; set variables with add or EDIT (env:///NAME). |
6253
6489
  | `query-invalid` | 400 | '*query*' names no path or pattern. Recovery: Supply a path such as `docs/guide.md` or a pattern such as `docs/**`. |
6254
6490
  | `headless` | 409 | The workspace has no project root, so there are no file members. Recovery: Open the workspace on a project root. |
6255
- | `definition-invalid` | 400 | A members definition is { glob }: a gitignore-style pattern, `!glob` to exclude. |
6491
+ | `definition-invalid` | 400 | A members definition is { glob }: a shell-path pattern, `!glob` to exclude. |
6256
6492
  | `model-scope` | 403 | The model may not change membership here: the members scope is none. Recovery: `git add` the file so git tracks it, or ask the operator to add it (/members add) or raise PLURNK_SERVICE_MEMBERS_MODEL_SCOPE. |
6257
6493
  | `workspace-not-found` | 404 | Workspace *id* does not exist. |
6258
6494
  | `state-not-json` | 400 | Worker module state is not JSON-serializable. |
@@ -6263,8 +6499,17 @@ lists the schemes the workspace registers, and rebuilds the address into nothing
6263
6499
  | `offset-channel-required` | 400 | Recovery: Select the channel to read from the offset. |
6264
6500
  | `target-invalid` | 400 | Recovery: Use a scheme://path target. |
6265
6501
  | `proposal-not-pending` | 409 | Recovery: Refresh pending proposals before resolving one. |
6502
+ | `proposal-decision-unrecorded` | 500 | The approval decision could not be saved; the operation was not applied. |
6266
6503
  | `scope-cancelled` | 499 | The worker scope was cancelled: *reason*. |
6267
6504
  | `range-not-satisfiable` | 416 | `Range <0,-1>` starts at 0, which is not a line; lines are numbered from 1. Recovery: Trim one line with `<L>` or lines L through M with `<L,M>`; `KILL (log:///…/READ)` with no scope retires the whole row. |
6505
+ | `runtime-owner-reserved` | 409 | The runtime owner cannot be registered by a client. |
6506
+ | `owner-not-found` | 404 | The owner address is not registered in the workspace. |
6507
+ | `proposal-policy-failed` | 500 | Core could not establish the proposal's settlement policy. |
6508
+ | `handler-unavailable` | 410 | The proposed scheme handler is no longer available. |
6509
+ | `proposal-apply-threw` | 500 | The scheme failed outside its proposal application contract. |
6510
+ | `verb-unknown` | 400 | The requested verb is not a lifecycle verb of the addressed family. |
6511
+ | `arguments-not-json` | 400 | The lifecycle verb's body must be a JSON object. |
6512
+ | `dispatch-threw` | 500 | The Plurnk actor failed outside its operation result contract. |
6268
6513
 
6269
6514
  §pinned-wording-core **Pinned wording.** Verbatim sentences tests pin: each is contract, and a change here is a change of contract.
6270
6515
 
@@ -6274,7 +6519,7 @@ lists the schemes the workspace registers, and rebuilds the address into nothing
6274
6519
  | All Open Messages resolved. Review new results; emit no OPs if finished. | resolved messages with unobserved results ({§loop-completion}) |
6275
6520
  | Context exceeds budget. YOU MUST ONLY KILL, MOVE or NOTE this turn. | the over-budget row ({§context-over-budget-row}) |
6276
6521
  | YOU MUST NOT exceed budget. Context is at *N*% of budget. | a packet within its budget under pressure ({§context-pressure-notice}) |
6277
- | YOU MUST use at least one NOTE per continuing turn. The turn continued without a NOTE. | a continuing or parked model turn without a NOTE ({§continued-without-note}) |
6522
+ | YOU MUST record at least one NOTE along with other operations. The turn continued without a NOTE. | a continuing or parked model turn without a NOTE ({§continued-without-note}) |
6278
6523
  | Each directive in the notice table | a notice of the model's own output ({§notice-directive}) |
6279
6524
  | Context window overflow: the packet cannot fit the model's window even as receipts. | the wall ({§context-wall}) |
6280
6525
  | No recipient implements the requested interaction. | The worker's owner is not interactive or does not declare the required client tool ({§client-interaction-routing}). |