@plurnk/plurnk-service 1.26.0 → 1.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (293) hide show
  1. package/.env.defaults +16 -25
  2. package/SPEC.md +338 -263
  3. package/dist/build-info.json +1 -1
  4. package/dist/content/body-preview.d.ts +1 -0
  5. package/dist/content/body-preview.d.ts.map +1 -1
  6. package/dist/content/body-preview.js +7 -0
  7. package/dist/content/body-preview.js.map +1 -1
  8. package/dist/content/byte-view.d.ts +19 -2
  9. package/dist/content/byte-view.d.ts.map +1 -1
  10. package/dist/content/byte-view.js +67 -14
  11. package/dist/content/byte-view.js.map +1 -1
  12. package/dist/content/edit-receipt.js +1 -1
  13. package/dist/content/edit-receipt.js.map +1 -1
  14. package/dist/content/line-marker.d.ts +1 -0
  15. package/dist/content/line-marker.d.ts.map +1 -1
  16. package/dist/content/line-marker.js +6 -1
  17. package/dist/content/line-marker.js.map +1 -1
  18. package/dist/content/line-selection.d.ts +3 -1
  19. package/dist/content/line-selection.d.ts.map +1 -1
  20. package/dist/content/line-selection.js +27 -3
  21. package/dist/content/line-selection.js.map +1 -1
  22. package/dist/content/matcher.d.ts +9 -14
  23. package/dist/content/matcher.d.ts.map +1 -1
  24. package/dist/content/matcher.js +51 -45
  25. package/dist/content/matcher.js.map +1 -1
  26. package/dist/content/pattern-edits.d.ts +7 -26
  27. package/dist/content/pattern-edits.d.ts.map +1 -1
  28. package/dist/content/pattern-edits.js +54 -91
  29. package/dist/content/pattern-edits.js.map +1 -1
  30. package/dist/content/read-projector.d.ts +2 -1
  31. package/dist/content/read-projector.d.ts.map +1 -1
  32. package/dist/content/read-projector.js +42 -10
  33. package/dist/content/read-projector.js.map +1 -1
  34. package/dist/content/read-resolve.d.ts.map +1 -1
  35. package/dist/content/read-resolve.js +7 -4
  36. package/dist/content/read-resolve.js.map +1 -1
  37. package/dist/core/AdmittedTurnExecutor.d.ts +3 -1
  38. package/dist/core/AdmittedTurnExecutor.d.ts.map +1 -1
  39. package/dist/core/AdmittedTurnExecutor.js +22 -7
  40. package/dist/core/AdmittedTurnExecutor.js.map +1 -1
  41. package/dist/core/BudgetReadout.d.ts +4 -4
  42. package/dist/core/BudgetReadout.d.ts.map +1 -1
  43. package/dist/core/BudgetReadout.js +26 -41
  44. package/dist/core/BudgetReadout.js.map +1 -1
  45. package/dist/core/ChannelWrite.d.ts +2 -3
  46. package/dist/core/ChannelWrite.d.ts.map +1 -1
  47. package/dist/core/ChannelWrite.js +21 -22
  48. package/dist/core/ChannelWrite.js.map +1 -1
  49. package/dist/core/ChannelWrite.sql +26 -0
  50. package/dist/core/ContextFit.d.ts +26 -0
  51. package/dist/core/ContextFit.d.ts.map +1 -0
  52. package/dist/core/ContextFit.js +56 -0
  53. package/dist/core/ContextFit.js.map +1 -0
  54. package/dist/core/DataStatementRunner.d.ts.map +1 -1
  55. package/dist/core/DataStatementRunner.js +1 -0
  56. package/dist/core/DataStatementRunner.js.map +1 -1
  57. package/dist/core/Dispatcher.d.ts +15 -2
  58. package/dist/core/Dispatcher.d.ts.map +1 -1
  59. package/dist/core/Dispatcher.js +148 -16
  60. package/dist/core/Dispatcher.js.map +1 -1
  61. package/dist/core/EditMutations.d.ts +5 -5
  62. package/dist/core/EditMutations.d.ts.map +1 -1
  63. package/dist/core/EditMutations.js +44 -50
  64. package/dist/core/EditMutations.js.map +1 -1
  65. package/dist/core/EditSequence.js +2 -2
  66. package/dist/core/EditSequence.js.map +1 -1
  67. package/dist/core/EmissionHead.d.ts +8 -0
  68. package/dist/core/EmissionHead.d.ts.map +1 -0
  69. package/dist/core/EmissionHead.js +29 -0
  70. package/dist/core/EmissionHead.js.map +1 -0
  71. package/dist/core/Engine.d.ts +1 -0
  72. package/dist/core/Engine.d.ts.map +1 -1
  73. package/dist/core/Engine.js +3 -0
  74. package/dist/core/Engine.js.map +1 -1
  75. package/dist/core/InferenceCall.js +2 -2
  76. package/dist/core/InferenceCall.js.map +1 -1
  77. package/dist/core/InferenceCall.sql +1 -0
  78. package/dist/core/LiveSubscription.d.ts +20 -0
  79. package/dist/core/LiveSubscription.d.ts.map +1 -0
  80. package/dist/core/LiveSubscription.js +68 -0
  81. package/dist/core/LiveSubscription.js.map +1 -0
  82. package/dist/core/LiveSubscriptions.d.ts +1 -0
  83. package/dist/core/LiveSubscriptions.d.ts.map +1 -1
  84. package/dist/core/LiveSubscriptions.js +8 -0
  85. package/dist/core/LiveSubscriptions.js.map +1 -1
  86. package/dist/core/LogBody.js +1 -1
  87. package/dist/core/LogBody.js.map +1 -1
  88. package/dist/core/LogEntryProjection.d.ts +1 -0
  89. package/dist/core/LogEntryProjection.d.ts.map +1 -1
  90. package/dist/core/LogEntryProjection.js +9 -0
  91. package/dist/core/LogEntryProjection.js.map +1 -1
  92. package/dist/core/LogWriter.d.ts +42 -0
  93. package/dist/core/LogWriter.d.ts.map +1 -1
  94. package/dist/core/LogWriter.js +11 -5
  95. package/dist/core/LogWriter.js.map +1 -1
  96. package/dist/core/LoopDriver.js +2 -1
  97. package/dist/core/LoopDriver.js.map +1 -1
  98. package/dist/core/LoopLifecycle.d.ts +2 -2
  99. package/dist/core/LoopLifecycle.d.ts.map +1 -1
  100. package/dist/core/LoopLifecycle.js +2 -4
  101. package/dist/core/LoopLifecycle.js.map +1 -1
  102. package/dist/core/LoopLifecycle.sql +1 -6
  103. package/dist/core/MutationEffects.d.ts +1 -3
  104. package/dist/core/MutationEffects.d.ts.map +1 -1
  105. package/dist/core/MutationEffects.js +2 -1
  106. package/dist/core/MutationEffects.js.map +1 -1
  107. package/dist/core/PacketBuilder.d.ts +17 -4
  108. package/dist/core/PacketBuilder.d.ts.map +1 -1
  109. package/dist/core/PacketBuilder.js +80 -120
  110. package/dist/core/PacketBuilder.js.map +1 -1
  111. package/dist/core/PacketBuilder.sql +4 -12
  112. package/dist/core/PatternSelection.d.ts +5 -10
  113. package/dist/core/PatternSelection.d.ts.map +1 -1
  114. package/dist/core/PatternSelection.js +9 -16
  115. package/dist/core/PatternSelection.js.map +1 -1
  116. package/dist/core/ResourceMutations.d.ts +2 -4
  117. package/dist/core/ResourceMutations.d.ts.map +1 -1
  118. package/dist/core/ResourceMutations.js +2 -5
  119. package/dist/core/ResourceMutations.js.map +1 -1
  120. package/dist/core/ResourceSelector.d.ts +2 -2
  121. package/dist/core/ResourceSelector.d.ts.map +1 -1
  122. package/dist/core/ResourceSelector.js +64 -33
  123. package/dist/core/ResourceSelector.js.map +1 -1
  124. package/dist/core/ResourceTransfers.d.ts +2 -4
  125. package/dist/core/ResourceTransfers.d.ts.map +1 -1
  126. package/dist/core/ResourceTransfers.js +74 -50
  127. package/dist/core/ResourceTransfers.js.map +1 -1
  128. package/dist/core/SchemeRegistry.d.ts +1 -0
  129. package/dist/core/SchemeRegistry.d.ts.map +1 -1
  130. package/dist/core/SchemeRegistry.js +11 -9
  131. package/dist/core/SchemeRegistry.js.map +1 -1
  132. package/dist/core/ServiceTeardown.d.ts +3 -2
  133. package/dist/core/ServiceTeardown.d.ts.map +1 -1
  134. package/dist/core/ServiceTeardown.js +17 -8
  135. package/dist/core/ServiceTeardown.js.map +1 -1
  136. package/dist/core/StopDeadline.d.ts +5 -0
  137. package/dist/core/StopDeadline.d.ts.map +1 -0
  138. package/dist/core/StopDeadline.js +20 -0
  139. package/dist/core/StopDeadline.js.map +1 -0
  140. package/dist/core/StrikeRail.d.ts.map +1 -1
  141. package/dist/core/StrikeRail.js +5 -1
  142. package/dist/core/StrikeRail.js.map +1 -1
  143. package/dist/core/ToolResources.d.ts.map +1 -1
  144. package/dist/core/ToolResources.js +11 -2
  145. package/dist/core/ToolResources.js.map +1 -1
  146. package/dist/core/TurnDispositionHandler.d.ts +4 -2
  147. package/dist/core/TurnDispositionHandler.d.ts.map +1 -1
  148. package/dist/core/TurnDispositionHandler.js +24 -6
  149. package/dist/core/TurnDispositionHandler.js.map +1 -1
  150. package/dist/core/TurnMaterialization.d.ts +6 -2
  151. package/dist/core/TurnMaterialization.d.ts.map +1 -1
  152. package/dist/core/TurnMaterialization.js +64 -16
  153. package/dist/core/TurnMaterialization.js.map +1 -1
  154. package/dist/core/TurnOps.js +7 -7
  155. package/dist/core/TurnOps.js.map +1 -1
  156. package/dist/core/TurnRunner.d.ts +1 -0
  157. package/dist/core/TurnRunner.d.ts.map +1 -1
  158. package/dist/core/TurnRunner.js +155 -160
  159. package/dist/core/TurnRunner.js.map +1 -1
  160. package/dist/core/TurnRunner.sql +2 -2
  161. package/dist/core/caps/DbSubscriptionCaps.d.ts.map +1 -1
  162. package/dist/core/caps/DbSubscriptionCaps.js +13 -19
  163. package/dist/core/caps/DbSubscriptionCaps.js.map +1 -1
  164. package/dist/core/content-hash.d.ts +1 -1
  165. package/dist/core/content-hash.d.ts.map +1 -1
  166. package/dist/core/content-hash.js.map +1 -1
  167. package/dist/core/env-catalog.js +2 -2
  168. package/dist/core/env-catalog.js.map +1 -1
  169. package/dist/core/fork.sql +4 -10
  170. package/dist/core/git-env.d.ts +1 -1
  171. package/dist/core/git-env.d.ts.map +1 -1
  172. package/dist/core/git-env.js +19 -12
  173. package/dist/core/git-env.js.map +1 -1
  174. package/dist/core/git-membership.d.ts.map +1 -1
  175. package/dist/core/git-membership.js +11 -5
  176. package/dist/core/git-membership.js.map +1 -1
  177. package/dist/core/git-state.js +1 -1
  178. package/dist/core/git-state.js.map +1 -1
  179. package/dist/core/mutation-types.d.ts +6 -4
  180. package/dist/core/mutation-types.d.ts.map +1 -1
  181. package/dist/core/operation-target-groups.d.ts +1 -1
  182. package/dist/core/operation-target-groups.d.ts.map +1 -1
  183. package/dist/core/operation-target-groups.js +27 -5
  184. package/dist/core/operation-target-groups.js.map +1 -1
  185. package/dist/core/packet-wire.d.ts +80 -10
  186. package/dist/core/packet-wire.d.ts.map +1 -1
  187. package/dist/core/packet-wire.js +211 -227
  188. package/dist/core/packet-wire.js.map +1 -1
  189. package/dist/core/provider-accounting.d.ts +1 -1
  190. package/dist/core/provider-accounting.d.ts.map +1 -1
  191. package/dist/core/provider-accounting.js +2 -1
  192. package/dist/core/provider-accounting.js.map +1 -1
  193. package/dist/digest/Digest.d.ts.map +1 -1
  194. package/dist/digest/Digest.js +3 -2
  195. package/dist/digest/Digest.js.map +1 -1
  196. package/dist/digest/DigestEvidence.d.ts +1 -0
  197. package/dist/digest/DigestEvidence.d.ts.map +1 -1
  198. package/dist/digest/DigestEvidence.js +6 -0
  199. package/dist/digest/DigestEvidence.js.map +1 -1
  200. package/dist/digest/DigestRender.d.ts +1 -0
  201. package/dist/digest/DigestRender.d.ts.map +1 -1
  202. package/dist/digest/DigestRender.js +107 -48
  203. package/dist/digest/DigestRender.js.map +1 -1
  204. package/dist/digest/DigestRequiem.js +4 -4
  205. package/dist/digest/DigestRequiem.js.map +1 -1
  206. package/dist/digest/digest-rows.d.ts +8 -0
  207. package/dist/digest/digest-rows.d.ts.map +1 -1
  208. package/dist/digest/digest-rows.js.map +1 -1
  209. package/dist/digest/digest.sql +20 -2
  210. package/dist/schemes/Exec.d.ts.map +1 -1
  211. package/dist/schemes/Exec.js +28 -27
  212. package/dist/schemes/Exec.js.map +1 -1
  213. package/dist/schemes/File.d.ts.map +1 -1
  214. package/dist/schemes/File.js +1 -2
  215. package/dist/schemes/File.js.map +1 -1
  216. package/dist/schemes/Log.d.ts.map +1 -1
  217. package/dist/schemes/Log.js +4 -17
  218. package/dist/schemes/Log.js.map +1 -1
  219. package/dist/schemes/TurnSource.js +2 -2
  220. package/dist/schemes/TurnSource.js.map +1 -1
  221. package/dist/schemes/_derivation-use.d.ts +7 -0
  222. package/dist/schemes/_derivation-use.d.ts.map +1 -0
  223. package/dist/schemes/_derivation-use.js +40 -0
  224. package/dist/schemes/_derivation-use.js.map +1 -0
  225. package/dist/schemes/_entry-crud.d.ts +6 -1
  226. package/dist/schemes/_entry-crud.d.ts.map +1 -1
  227. package/dist/schemes/_entry-crud.js.map +1 -1
  228. package/dist/schemes/_entry-find.d.ts.map +1 -1
  229. package/dist/schemes/_entry-find.js +15 -49
  230. package/dist/schemes/_entry-find.js.map +1 -1
  231. package/dist/schemes/_entry-find.sql +0 -11
  232. package/dist/schemes/_entry-fts.d.ts.map +1 -1
  233. package/dist/schemes/_entry-fts.js +9 -3
  234. package/dist/schemes/_entry-fts.js.map +1 -1
  235. package/dist/schemes/_entry-fts.sql +14 -8
  236. package/dist/schemes/_entry-graph.d.ts +5 -8
  237. package/dist/schemes/_entry-graph.d.ts.map +1 -1
  238. package/dist/schemes/_entry-graph.js +33 -72
  239. package/dist/schemes/_entry-graph.js.map +1 -1
  240. package/dist/schemes/_entry-graph.sql +30 -48
  241. package/dist/schemes/_entry-manifest.d.ts +5 -0
  242. package/dist/schemes/_entry-manifest.d.ts.map +1 -1
  243. package/dist/schemes/_entry-manifest.js +5 -0
  244. package/dist/schemes/_entry-manifest.js.map +1 -1
  245. package/dist/schemes/_entry-ops.d.ts +1 -1
  246. package/dist/schemes/_entry-ops.d.ts.map +1 -1
  247. package/dist/schemes/_entry-ops.js +4 -11
  248. package/dist/schemes/_entry-ops.js.map +1 -1
  249. package/dist/schemes/_search-index.d.ts +10 -0
  250. package/dist/schemes/_search-index.d.ts.map +1 -1
  251. package/dist/schemes/_search-index.js +33 -1
  252. package/dist/schemes/_search-index.js.map +1 -1
  253. package/dist/schemes/exec-lifetime.d.ts.map +1 -1
  254. package/dist/schemes/exec-lifetime.js +1 -2
  255. package/dist/schemes/exec-lifetime.js.map +1 -1
  256. package/dist/server/Daemon.d.ts +2 -1
  257. package/dist/server/Daemon.d.ts.map +1 -1
  258. package/dist/server/Daemon.js +31 -35
  259. package/dist/server/Daemon.js.map +1 -1
  260. package/dist/server/DrainSupervisor.d.ts +2 -1
  261. package/dist/server/DrainSupervisor.d.ts.map +1 -1
  262. package/dist/server/DrainSupervisor.js +37 -56
  263. package/dist/server/DrainSupervisor.js.map +1 -1
  264. package/dist/server/Functionality.d.ts +1 -1
  265. package/dist/server/Functionality.d.ts.map +1 -1
  266. package/dist/server/Functionality.js +24 -11
  267. package/dist/server/Functionality.js.map +1 -1
  268. package/dist/server/FunctionalityManager.js +2 -2
  269. package/dist/server/FunctionalityManager.js.map +1 -1
  270. package/dist/server/Retention.d.ts.map +1 -1
  271. package/dist/server/Retention.js +7 -3
  272. package/dist/server/Retention.js.map +1 -1
  273. package/dist/server/drain.sql +0 -6
  274. package/dist/server/seam-loop.sql +1 -1
  275. package/dist/service.js +1 -1
  276. package/dist/service.js.map +1 -1
  277. package/docs/env.md +4 -3
  278. package/migrations/013_graph_regions.sql +32 -0
  279. package/migrations/014_stream_timing.sql +4 -0
  280. package/migrations/015_request_evidence.sql +4 -0
  281. package/package.json +34 -34
  282. package/dist/core/KnownToxins.d.ts +0 -4
  283. package/dist/core/KnownToxins.d.ts.map +0 -1
  284. package/dist/core/KnownToxins.js +0 -22
  285. package/dist/core/KnownToxins.js.map +0 -1
  286. package/dist/core/ReasoningView.d.ts +0 -12
  287. package/dist/core/ReasoningView.d.ts.map +0 -1
  288. package/dist/core/ReasoningView.js +0 -40
  289. package/dist/core/ReasoningView.js.map +0 -1
  290. package/dist/server/exec-poll-backoff.d.ts +0 -2
  291. package/dist/server/exec-poll-backoff.d.ts.map +0 -1
  292. package/dist/server/exec-poll-backoff.js +0 -6
  293. package/dist/server/exec-poll-backoff.js.map +0 -1
package/SPEC.md CHANGED
@@ -143,7 +143,7 @@ which depends on core semantic conventions v1.44.0: a CLIENT-kind
143
143
  spelling, never its tuning alias; unmatched IDs are preserved, `other` for an
144
144
  unregistered handle), and `gen_ai.request.model`;
145
145
  on settlement it gains `gen_ai.usage.input_tokens` and
146
- `gen_ai.usage.output_tokens` by aggregating every reported request quantity in
146
+ `gen_ai.usage.output_tokens` for quantities reported by every physical request in
147
147
  validated accounting ({§tokenomics-provider-usage}), plus
148
148
  `gen_ai.response.finish_reasons`; failures carry `error.type` as the class
149
149
  name only. Plurnk custom attributes (attempt, kind, status, loop/turn ids)
@@ -363,6 +363,7 @@ narrow or omit the reference catalogs under {§capability-admission}.
363
363
  | Project filesystem | `*` | File cap below; `project root member files` |
364
364
  | Workspace entries | `worker:///*` | Markerless; `workspace knowledgebase entries` |
365
365
  | Named scratch entries | `worker://<worker>/*` | Markerless; `worker knowledgebase entries` |
366
+ | The worker's own reasoning | `reasoning://<worker>/**` | Markerless; `this worker's reasoning, by loop and turn` |
366
367
 
367
368
  Only the three namespace surveys carry asides; the other targets name
368
369
  their surface. The word `skills` names Agent Skills and nothing else.
@@ -371,8 +372,8 @@ supplies examples and complete instructions on demand. A shallow
371
372
  result renders direct entries normally and every deeper first-segment directory
372
373
  as an actionable `dir/**` summary with its recursive `items` and `tokens`;
373
374
  tool-family rows also carry the concise `{§scheme-catalog-aside}` that drives
374
- on-demand capability discovery. Ordinary surveys use FIND's markerless first
375
- page ({§markerless-first-page}), whose range metadata reports the requested and returned page against the
375
+ on-demand capability discovery. Ordinary surveys use FIND without a scope
376
+ ({§markerless-first-page}), whose range metadata reports the returned set against the
376
377
  complete result total; only the small capability-reference surfaces
377
378
  explicitly select all. The opening survey demonstrates both `*` and `**` without
378
379
  normalizing an all-results override. Every survey executes even when empty
@@ -382,7 +383,7 @@ direct-entry-plus-directory count; `-1` enables the ordinary markerless page;
382
383
  unset / `0` disables previews. `log://` is absent because the current worker's
383
384
  log already renders in present mode.
384
385
 
385
- §worker-initialization-entry **Model-worker initialization is a real reasoning-only `_plurnk` turn.** A model worker's first loop begins with one packetless `{ producer="_plurnk", kind="initialization" }` turn submitted through {§turn-ops-admission-path}. Its authored reasoning contains the orientation NOTE, READ/FIND surveys and its own reasoning READ ({§reasoning-initial-read}); it is stored before those operations execute through {§reasoning-operations} and {§op-execution-order}. No content program or emission row is fabricated ({§emission-row}). The first request sees ordinary results and the reasoning READ, not an assistant-content copy of the surveys. Every orienting row is structurally classified `_plurnk` and `init`. The namespace surveys and their asides follow {§actor-boundary-catalog-preview}.
386
+ §worker-initialization-entry **Model-worker initialization is a real `_plurnk` operation turn.** A model worker's first loop begins with one packetless `{ producer="_plurnk", kind="initialization" }` turn submitted through {§turn-ops-admission-path}. Its program — the READ/FIND surveys, nothing else — is recorded as the turn's `ops://` source and executed through {§op-execution-order} exactly as a model's program is; it authors no reasoning and reads none back. No emission row is fabricated ({§emission-row}): the first request sees the surveys' ordinary results, never an assistant-content copy of the program. The initial message arrives as an inbound SEND in the first model turn ({§message-arrival}); initialization never READs it, and neither initialization nor later turns manufacture a task inventory. Every orienting row is structurally classified `_plurnk` and `init`. The namespace surveys and their asides follow {§actor-boundary-catalog-preview}.
386
387
 
387
388
  Incoming messages publish once as inbound SEND rows in the first model turn
388
389
  ({§message-arrival}); initialization neither READs nor archives them. The turn
@@ -586,9 +587,17 @@ Every admitted authority is a literal `workers.name`; self-addressing uses the c
586
587
  the errors section), just above it. Body-suppressed child activity is durable
587
588
  history; this section is the current inventory that keeps an active obligation
588
589
  visible even when no new activity arrived. Each open stream pointer carries
589
- its channels' sizes and growth since the last packet in `detail`
590
- (`{"status":"active","path":"sh:///ab3d5678","detail":"stdout 340 lines (+2048 bytes)"}`)
591
- — the only thing the model learns about a stream before it closes
590
+ elapsed runtime, output inactivity, and its channels' sizes and growth since
591
+ the last packet in `detail`
592
+ (`{"status":"active","path":"sh:///ab3d5678","detail":"elapsed 300s; output unchanged 120s; stdout 340 lines (+2048 bytes)"}`).
593
+ Both durations are whole seconds at packet assembly, floored and bounded
594
+ below by zero. Runtime starts at subscription opening. Output inactivity
595
+ starts there too, then resets atomically when any published channel's content
596
+ changes, including replacement or clearing. Identical writes, empty appends,
597
+ READs, publication acknowledgements, metadata, and channel-state changes do
598
+ not reset it. The clock is durable; an upgraded stream lacking that evidence
599
+ reports `output timing unknown` until its next content change, never a guessed
600
+ timestamp. These are observations, not new timeouts or wake conditions
592
601
  ({§exec-stream}). It is orienting state, never advice: the model sees its live
593
602
  subtree (`{"status":102,"path":"worker://worker-x"}`) and reasons for itself —
594
603
  READ, SEND, or KILL via the path.
@@ -736,7 +745,8 @@ identity, and terminal disposition without exposing raw bytes or a base64 lane.
736
745
  | ---------------------------------- | ---------------------------------------------------- | -------------------------------------------------------------------------------- |
737
746
  | Text | Verbatim Unicode under the detected textual mimetype | READ and EDIT use the snapshot. |
738
747
  | Binary with readable projection | Derived Unicode as `text/markdown` | READ uses the projection; source-aware EDIT remains 415. |
739
- | Binary without projection/over cap | Empty marker under the source binary mimetype | READ and EDIT return 415; private metadata distinguishes unavailable from limit. |
748
+ | Binary without projection | Empty marker under the source binary mimetype | READ uses source bytes under {§read-bytes}; text EDIT remains 415. |
749
+ | Failed or oversized acquisition | Empty marker carrying the producer failure | The operation preserves that failure under {§membership-materialization-limit}. |
740
750
 
741
751
  §membership-materialization-limit **A pathological member degrades, never the
742
752
  workspace.** `PLURNK_SERVICE_FILE_MATERIALIZE_MAX_BYTES` is a required positive
@@ -836,19 +846,38 @@ all use that one definition.
836
846
 
837
847
  ### §worker-wait-timing Durable waits and wake ownership
838
848
 
839
- WAIT has no timing operand; its optional path is a label ({§send-wait-scope}).
840
- With live work—an open stream or a live child worker—the loop parks durably
841
- and wakes on settlement, on a
842
- message, or on the inherited observation cadence of its open streams
843
- ({§exec-lifetime}); without live work it continues at once, told so. A wake
844
- continues the same loop with the same messages, generation policy, and
845
- cumulative turn ceiling; it never creates another assignment. Scheduled messages
846
- exist independently of a loop's optional attachment to one occurrence.
849
+ With live work—an open stream or a live child worker—the loop parks until an
850
+ ordinary wake or its maximum wait elapses. `PLURNK_SERVICE_WAIT_SEC` supplies the
851
+ bound; `WAIT <seconds>` overrides that one park ({§send-wait-scope}). The wake time
852
+ commits atomically with the wait revision, rounded up to the next millisecond.
853
+ Expiry queues the same loop through normal worker/provider admission; it never
854
+ cancels work or fabricates a result.
855
+
856
+ With live work, each WAIT receipt exposes `waitSeconds`, the maximum accepted
857
+ for that operation. It is not elapsed time or a promised sleep: an ordinary wake
858
+ or a shorter sibling WAIT can resume the loop sooner. An idle WAIT has no bound.
859
+ Historical unbounded receipts do not acquire one during projection.
860
+
861
+ | Boundary | Outcome |
862
+ |---|---|
863
+ | Message or work settlement before expiry | Wake normally; retire the old timer. |
864
+ | Several WAITs | One park at the earliest requested bound; a bare WAIT requests the configured bound. |
865
+ | Zero bound | Continue at 102 without parking, a timer, cancellation, or a warning; a later WAIT chooses its own bound. |
866
+ | Eligible completion joining live work | Use the configured bound. |
867
+ | No live work | Continue immediately; do not arm a timer. |
868
+ | Later WAIT after any wake | New wait identity and bound; no inherited override or backoff. |
869
+ | Restart | Restore the durable due time; an overdue wait becomes runnable. |
870
+ | Cancellation or terminal loop | Late timers are inert. |
871
+ | Provider-recovery or client-review wait | Keep its owning recovery/admission semantics, not this observation bound. |
872
+
873
+ A wake preserves the loop's messages, generation policy, cumulative turn ceiling,
874
+ and execution allowance. Parked time does not consume that allowance. Scheduled
875
+ messages remain independent; WAIT neither creates one nor selects its waker.
847
876
 
848
877
  ```mermaid
849
878
  stateDiagram-v2
850
879
  Running --> Parked: atomically persist the wait identity
851
- Parked --> Queued: arrival / completion / inherited observation, guarded by wait identity
880
+ Parked --> Queued: arrival / completion / wait expiry, guarded by wait identity
852
881
  Parked --> Terminal: cancellation
853
882
  Queued --> Running: same loop claimed by its worker's drain
854
883
  ```
@@ -964,7 +993,7 @@ completion. Closure is always a wake edge.
964
993
 
965
994
  | §worker-lifecycle-poll-matrix stream | While open | On closure |
966
995
  |------------------------------------------------|---|---|
967
- | any lifetime but `turn` | the daemon's exponential-backoff observation wakes ({§exec-lifetime}) | resume once with terminal observation |
996
+ | any lifetime but `turn` | bounded wait expiry permits inspection ({§worker-wait-timing}) | resume once with terminal observation |
968
997
  | `[{"lifetime":"turn"}]` | reap at the next pre-turn boundary | surface the terminal outcome |
969
998
 
970
999
  The structured-concurrency sequence is identical whether a child performs an
@@ -980,7 +1009,7 @@ sequenceDiagram
980
1009
  P->>P: WAIT parks on live child
981
1010
  C->>S: execution opens subscription
982
1011
  C->>C: WAIT parks on live stream
983
- loop backoff, fixed cadence, or explicit arrival
1012
+ loop wait expiry or explicit arrival
984
1013
  S-->>C: optional progress observation
985
1014
  C->>C: continue or park
986
1015
  end
@@ -1132,7 +1161,7 @@ These are the complete strike sources:
1132
1161
  |---------------------|------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------|
1133
1162
  | Hard result | An admitted non-execution operation or bounded parse-error status is `>= 400`, except the soft set `404`, `409`, `416`, `425`, `501`, in a turn where no operation succeeded ({§strike-progress-immunity}). | The originating failure row. |
1134
1163
  | Cycle | The executed operations and their observed results repeat under {§engine-cycle-evidence}. | None; cycle detection itself is private engine accounting. |
1135
- | Empty turn | An admitted turn with no authored response operation ({§empty-turn}). | The turn's `422` error row, and its reasoning read back ({§reasoning-empty-turn-read}). |
1164
+ | Empty turn | An admitted turn with no authored response operation ({§empty-turn}). | The turn's `422` error row. |
1136
1165
 
1137
1166
  Execution results remain exact model-visible evidence but are always soft: an
1138
1167
  executor error is not a PLURNK contract violation. Cycle detection remains an
@@ -1204,7 +1233,7 @@ The contracts, and the violation of each that strikes:
1204
1233
 
1205
1234
  | Contract | Violation that strikes |
1206
1235
  |---|---|
1207
- | operation contract | a hard operation failure (status ≥ 400) in an admitted turn where no operation succeeded ({§strike-progress-immunity}) — soft statuses below excluded |
1236
+ | operation contract | a hard operation failure (status ≥ 400) in an admitted turn where no operation succeeded ({§strike-progress-immunity}) — soft statuses below excluded, and a matcher the parser could not read ({§matcher-refusal}, `grammar/matcher/unreadable-pattern`) is soft: it refuses its one operation and never strikes |
1208
1237
  | review contract | none: an eligible final response joins live obligations ({§completion-joins-live-work}) or continues to observe results ({§completion-defers-to-results}) |
1209
1238
  | progress contract | a detected operation cycle (`MIN_CYCLES` × period), or an admitted turn with no operation ({§empty-turn}) |
1210
1239
  | frame contract | emission attempts exhausted with no admissible turn |
@@ -1212,7 +1241,8 @@ The contracts, and the violation of each that strikes:
1212
1241
 
1213
1242
  Errors and issues are NOT contract violations. Each keeps its own disposition
1214
1243
  and never strikes: exploration misses (404, 416) and unsupported capability
1215
- (501) are how discovery works; raw 409 outcomes are soft; execution outcomes and `executor/*` problem rows are world evidence;
1244
+ (501) are how discovery works; raw 409 outcomes are soft; a fumbled pattern is the operation's
1245
+ own `400` with the parser's working form ({§matcher-refusal}); execution outcomes and `executor/*` problem rows are world evidence;
1216
1246
  provider weather (rate limit, network failure, deadline, interruption) recovers
1217
1247
  ({§provider-recovery}); provider capacity has its own packet recovery and
1218
1248
  terminal ({§provider-capacity-failure}); request rejection
@@ -1292,9 +1322,8 @@ The parser owns its boundaries; core admits determinate work and exposes its fai
1292
1322
  | Bounded program, including malformed operations | Admit valid operations and record parser failures; with no authored operation, apply {§empty-turn}. |
1293
1323
  | Outside response text | Store it as the turn's `outside` source under {§outside-text}; never a row, never delivered, never completion. |
1294
1324
  | Lost boundary after a closed operation | Admit the closed operations and record the boundary diagnostic under {§unparsed-tail-boundary}. |
1295
- | Lost boundary before any closed operation | Reject the attempt; neither outside text nor a reasoning NOTE substitutes for a closed operational statement. Reasoning FIND/READ count as such statements ({§reasoning-operations}). |
1325
+ | Lost boundary before any closed operation | Reject the attempt; outside text is no substitute for a closed operational statement. An admitted reasoning operation is one ({§reasoning-operations}). |
1296
1326
  | Outside text carrying a log-entry heading, other than an emission row's | Reject the attempt ({§fabricated-log-entry}). |
1297
- | A response the provider stopped at a repeated line | Reject the attempt with the provider's sentence as its diagnostic ({§repetition-stop}); no provider recovery, notice, or problem row. |
1298
1327
 
1299
1328
  §fabricated-log-entry **Only the harness writes the log.** A line of outside response text that begins with a log-entry heading, `### log:///<loop>/<turn>/<sequence>/` ({§log-wire-format}), is the model continuing the packet's transcript instead of answering it: it writes the receipts it expects and then acts on them. The attempt is rejected under {§invalid-emission-attempts}, so neither that text nor any operation beside it runs or is stored as outside text ({§outside-text}), and its one diagnostic, at the heading's line, reads `` `### log:///2/1/5/READ` is a log entry, and only the harness writes the log. Write the operation, then wait for its receipt. `` Text inside an operation body is not examined, so a SEND or KILL may quote a receipt. A heading whose leaf is `emission` is exempt: the transcript shows it before each of the worker's own emissions ({§emission-row}), and repeating it invents no receipt, so the attempt is admitted and the heading stays outside text, counted by the digest as an echo. In 10,486 recorded emissions, 101 carried such a heading in outside text, every one a fabrication: 85 of 1,675 from deepseek-flash, 81 of them opening with one, and 16 from glm-5.3-flash, deepseek-v4-pro and qwen3.8-flash, which appended an invented `## Log` after their own operations.
1300
1329
 
@@ -1304,7 +1333,7 @@ Provider interruption is owned by {§provider-interrupted-attempt}. Accepted sou
1304
1333
  and positions remain exact; execution follows {§op-execution-order}. WAIT remains
1305
1334
  optional, with no omission warning or invented operation ({§turn-shape}).
1306
1335
 
1307
- §safe-uri-target-groups After source and authored-command admission, Core tolerates one target group on READ or KILL only when splitting its raw target at top-level comma or whitespace separators produces at least two members and every member independently parses as an explicit `scheme://` URI. Request-metadata blocks are opaque to this split. Each member becomes one ordinary statement with an independent dispatch outcome and log row, in authored member order at that operation's position under {§op-execution-order}. Otherwise the target remains exactly singular, including local filenames containing spaces or commas. The stored `turnOps` and authored command count remain unexpanded, and no other operation admits target groups.
1336
+ §safe-uri-target-groups After source and authored-command admission, Core expands one target group on READ or KILL into one ordinary statement per member, each with an independent dispatch outcome and log row, in authored member order at that operation's position under {§op-execution-order}. A group is either the heading's slot group ({§target-group}) — any target kind, each member with the scope, metadata and matcher its own slot carried, the heading's naked pattern every member's, and a distilling body landing once with the first member — or one slot whose raw target splits at top-level comma or whitespace separators into at least two members that each independently parse as an explicit `scheme://` URI, the selection shared; request-metadata blocks are opaque to that split, and otherwise the slot's target remains exactly singular, including local filenames containing spaces or commas. The same expansion meets a client-authored group at the client seam. The stored `turnOps` and authored command count remain unexpanded, a group never reaches dispatch unexpanded, and no other operation admits target groups.
1308
1337
 
1309
1338
  Core retries a rejected emission against the exact same packet beneath the same engine turn, up to `PLURNK_SERVICE_EMISSION_ATTEMPTS`. Rejected bytes never dispatch or reach the engine strike rail. Before each `generate`, Core opens one durable logical `inference_calls` row with its `model_calls` specialization and emission-specific `turn_attempts` admission row. A call that ends without response evidence leaves that admission row unclassified (`accepted IS NULL`) and does not consume the emission-attempt ceiling. Beneath the logical call, every provider observer invocation opens one cardinal `provider_requests` occurrence immediately before physical I/O and settles it as response or error. Adapter retries and capacity failover append requests in issue order; a response-less failure therefore remains an accounted occurrence rather than disappearing. Normalized response evidence is durable before parser classification and does not duplicate the separately owned accounting. The accepted exchange alone extends `turns.packet` with response evidence; every physical request remains in turn and loop accounting, while the context gauge reads the latest settled emission request on the latest turn. Digest exposes rejected response evidence as `<stem>.attemptNNN.rejected.*` and every physical request in its machine-readable ledger.
1310
1339
 
@@ -1613,7 +1642,7 @@ Registration precedes loop affinity:
1613
1642
  - §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.
1614
1643
  - §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.
1615
1644
  - §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.
1616
- - §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. No teaching text, scope table or receipt mentions offsets; `plurnk.md` keeps its two anchor forms. A bare `+N` with no anchor before it is refused as before.
1645
+ - §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.
1617
1646
  - §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.
1618
1647
  - §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`.
1619
1648
  - §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.
@@ -1893,7 +1922,7 @@ Client-interface target parameters carry fragments inline (`{ target: "sh:///a3b
1893
1922
  MOVE out of it are 400 `channel-derived`; COPY from it is an ordinary read. Binary sources
1894
1923
  keep {§membership-source-projection}, where the source is not text and the projection is the
1895
1924
  body; a fetched web page keeps its scheme's own two channels ({§html-materialization}).
1896
- - §channel-selection-visibility **Channel selection is decision-time information, not a guess** — every multi-channel resource presents its channels with extents wherever FIND presents the resource: broad results list each channel's path, projection `mimetype`, tokens, and lines (default channel first), and matcher locations name the channel their line coordinates address. A READ of a multi-channel resource names its other channels with their tokens in `channels`, keyed by the fragment the model appends (`{"#readable": 812}`), so first contact — a fetched page, a stream's stdout — carries the same choice without a listing; a single-channel resource names none. When the default channel is a readable projection of a differently typed source, it also names `sourceMimetype` once; this is representation evidence, not a different READ workflow. The packet never presents channels as equal and indistinguishable; extents derive from the stored channels by construction. Budget enforcement stays with {§context-output-admission} — this is information, not a second guard.
1925
+ - §channel-selection-visibility **Channel selection is decision-time information, not a guess** — every multi-channel resource presents its channels with extents wherever FIND presents the resource: broad results list each channel's path, projection `mimetype`, tokens, and lines (default channel first), and matcher locations name the channel their line coordinates address. A READ of a multi-channel resource names its other channels with their tokens in `channels`, keyed by the fragment the model appends (`{"#readable": 812}`), so first contact — a fetched page, a stream's stdout — carries the same choice without a listing; a single-channel resource names none. When the default channel is a readable projection of a differently typed source, it also names `sourceMimetype` once; this is representation evidence, not a different READ workflow. The packet never presents channels as equal and indistinguishable; extents derive from the stored channels by construction. Budget enforcement stays with {§context-fit} — this is information, not a second guard.
1897
1926
 
1898
1927
  ### §channel-state Channel state — metadata, not gating
1899
1928
 
@@ -2035,24 +2064,24 @@ AST: `{ op: "EDIT", target, body: string | null, signal: tags | null, lineMarker
2035
2064
  ```` ```EDIT (path) [{"pattern": "/foo/"}] ```` reads the resource once under
2036
2065
  the channel's own mimetype, matches, and expands into one atomic batch
2037
2066
  ({§edit-batch}) of four-coordinate splices, all relative to the same original
2038
- content: a regex span is its evidence region; a literal (a glob without
2039
- metacharacters) is each of its occurrences on every matched line; a glob with
2040
- metacharacters is the whole matched line; a node dialect's span (`//` xpath,
2041
- `$` jsonpath) is the node's whole region as its handler reports it, across as
2067
+ content under {§slice-semantics-compose-pattern}: a regex span is its match;
2068
+ a literal is each substring occurrence; a glob selects matching line content;
2069
+ a node dialect's span (`//` xpath, `$` jsonpath) is the selected node's source
2070
+ region, not its enclosing context, across as
2042
2071
  many lines as the node spans, so ```` ```EDIT (books.xml) [{"pattern":
2043
2072
  "//book[price > 35]"}] ```` replaces each such element and an empty body
2044
- removes it. The body is literal replacement text, never a template; an absent
2045
- body deletes the spans and leaves their lines. A regex anchors each line (`^`,
2046
- `$`) and a regex span never crosses a line break — a match that would is
2047
- refused before any change (400 `pattern-span-invalid`). A numeric scope bounds the lines
2048
- a pattern may touch; `<0>` and `<-1>` name positions, not lines, and are refused
2073
+ removes it. FTS uses its located token/phrase occurrences; graph uses the
2074
+ definitions or references selected under {§graph-relations}. The body is
2075
+ literal replacement text, never a template; an absent body deletes only the
2076
+ spans. Regex anchors apply per line (`^`, `$`); matches may cross line breaks.
2077
+ A numeric scope admits only complete matches inside its resolved source
2078
+ region, including columns; `<0>` and `<-1>` name insertion positions and are refused
2049
2079
  (400 `pattern-scope-invalid`). Every touched line's anchor guards the batch as a
2050
2080
  precondition, so a same-turn change to one of them is the ordinary
2051
2081
  {§edit-collision}. Zero matches change nothing: 204 with `matched: 0`, never a
2052
2082
  clobber. The result is one operation receipt: `matched` spans, `receipt` for the
2053
2083
  first splice ({§edit-result-receipt-projection}), and `last` beside it for the
2054
- final one when there were several. Resource-selecting dialects (`~`, `&`)
2055
- name no spans: 400 `pattern-dialect-unsupported`. A scheme without textual EDIT scopes refuses the
2084
+ final one when there were several. A scheme without textual EDIT scopes refuses the
2056
2085
  pattern before any read (400 `pattern-unsupported`). Same-turn anchor continuity
2057
2086
  ({§edit-anchor-continuity}) does not carry through a pattern batch; the next
2058
2087
  anchored EDIT validates against current state.
@@ -2083,25 +2112,20 @@ READ is the one fan-out core performs ({§read-fan-out}).
2083
2112
  - §log-range-miss-names-stream A 416 on a log execution item is the range twin of its channel miss ({§log-channel-miss-names-stream}): the coordinate addresses the row's invocation (its authored call body, often empty or one line) while the execution's output stays readable at the stream address the row records. When that stream link exists, the 416 gains it as `stream`, the detail appends where the command's streams live, and `recovery` is `READ <stream> for the command's stream`, whether the invocation's extent is empty or merely shorter than the range (#759). A 416 on a row with no recorded stream stays byte-identical to the generic slicer's.
2084
2113
  - §read-pattern **A pattern selects the lines a READ renders.** With a heading
2085
2114
  matcher ({§matcher-option} in the contracts SPEC) an exact-target READ stays a
2086
- READ: the matcher runs over the channel's text line by line — a regex anchors
2087
- each line, so `^` and `$` are the line's ends — and every line a match touches,
2115
+ READ: the matcher runs over the channel's complete text — a regex anchors
2116
+ each line, so `^` and `$` are the line's ends, while matches may span lines — and every line a match touches,
2088
2117
  in source order, is the visible selection. The scope still bounds it: a scoped
2089
2118
  READ renders exactly the selected lines the scope holds; a whole-resource one
2090
2119
  pages through the selected lines under the ordinary preview bound, never showing
2091
2120
  an unselected line. Selected lines keep their physical ordinals and their
2092
2121
  ordinary anchors, so a pattern READ is a coordinate source for EDIT and KILL. The
2093
2122
  result carries `matched`, the count of selected lines inside the scope. Zero
2094
- matches is an empty read (204, `matched: 0`), never a failure. A full-text
2095
- (`~`) or graph (`&`) pattern selects resources, not lines: 400
2096
- `pattern-dialect-unsupported` ({§pattern-dialect-find-only}); a matcher its mimetype cannot run answers the
2097
- matcher's own 415/400 ({§matcher-dispatch}).
2098
- - §pattern-dialect-find-only **A `~` or `&` matcher outside FIND is refused as FIND's alone.** Every
2099
- 400 `pattern-dialect-unsupported` — READ, EDIT, KILL, COPY, MOVE, SEND — names the model's
2100
- matcher and says only FIND takes it, and its recovery gives both working forms with the
2101
- model's own target: the FIND carrying that matcher, and the same operation with a text
2102
- pattern built from the symbol or words it named (regex metacharacters escaped, words joined
2103
- by `|`): `` Locate it with `FIND (django/urls/resolvers.py) &RoutePattern`, or select lines
2104
- with a text pattern: `READ (django/urls/resolvers.py) /RoutePattern/`. ``
2123
+ matches is an empty read (204, `matched: 0`), never a failure. Full-text and
2124
+ graph matches project their located occurrences through the same line
2125
+ presentation. A matcher its mimetype cannot run answers the
2126
+ matcher's own 415/400 ({§matcher-dispatch}). A selected value with neither
2127
+ exact nor enclosing source coordinates answers 422 `pattern-source-unlocated`;
2128
+ READ does not substitute an unrelated ancestor or the whole resource.
2105
2129
  - §read-fan-out **A READ over a glob reads every matching path.** `READ (pets_*.md)`
2106
2130
  and `READ (pets_*.md) /dogs/i` keep their glob ({§read-find-normalization} in the
2107
2131
  contracts SPEC) and dispatch fans them out: the ordinary FIND over the same
@@ -2120,8 +2144,24 @@ READ is the one fan-out core performs ({§read-fan-out}).
2120
2144
  receipt on the authored glob (`matched: 0` when a pattern selected nothing); a
2121
2145
  FIND failure is that failure on the authored glob. The FIND's resource page bounds
2122
2146
  the fan-out: when more paths matched than were read, one `read_fanout_bounded`
2123
- notice names both counts. A full-text (`~`) or graph (`&`) matcher selects
2124
- resources, not lines, so that READ dispatches as the FIND survey.
2147
+ notice names both counts. Every dialect follows this same READ fan-out;
2148
+ none substitutes a FIND receipt for the requested content.
2149
+
2150
+ §read-pattern-evidence **Match regions survive line-oriented presentation.** A patterned
2151
+ READ retains `matches` ({§matcher-selection-signal}) for findings intersecting its
2152
+ returned text, in physical source coordinates. The body shows matching lines;
2153
+ its `range` describes that presentation, not the match boundaries. A match's
2154
+ region is never clipped into a different selection when a preview or authored
2155
+ READ scope shows only part of it. An empty read carries an empty match array.
2156
+
2157
+ The packet projects each visible match's `locator`, exact `region`, or
2158
+ explicitly enclosing `enclosingRegion`
2159
+ using {§packet-extent-metadata}, without duplicating matched body text. Log
2160
+ curation removes metadata for matches outside the retained body. Match metadata
2161
+ lands with the result it describes under {§context-fit}, complete or as the
2162
+ receipt; `matchLocationCount` appears when the result is a receipt. Exact
2163
+ FIND pages the complete location set ({§find-result-projection}).
2164
+
2125
2165
  - §read-bytes A binary channel, and the `#bytes` view of
2126
2166
  any resource whose scheme supplies bytes, reads as the source bytes one hexadecimal
2127
2167
  octet per line: coordinate = line = byte, so `<a,b>` selects bytes, the markerless
@@ -2141,34 +2181,24 @@ READ is the one fan-out core performs ({§read-fan-out}).
2141
2181
  into a byte READ (`region` spans the hexadecimal lines of the matched bytes; `matched`
2142
2182
  is their hex). The load is bounded by the mimetypes binary input ceiling; a larger
2143
2183
  resource fails 413 `bytes-too-large` by name rather than being skipped.
2144
- - §binary-parity A binary member is not a second-class resource. It behaves exactly as a text
2145
- member does for existence, FIND by path, KILL/delete, mimetype, weight, and membership; it
2146
- READs whole as its byte projection ({§read-bytes}) and, on a supporting route, contributes native
2147
- content to the next model request ({§packet-attachment-parts}),
2148
- READs and FINDs by byte range and byte pattern ({§read-bytes}/{§find-bytes}); and COPY or MOVE transfers
2149
- its bytes exactly, between file members and into or out of a DB-backed `worker://` entry alike. A
2150
- whole-resource transfer writes the source's bytes ({§read-bytes} `ByteSource`) verbatim to the
2151
- destination through the ordinary proposal gate, the receipt reporting the byte count rather than a text
2152
- line diff; "whole-resource" is the markerless selection or `<1,-1>` ({§move-canonical-whole-source}),
2153
- and a MOVE deletes the source after the destination lands. A **byte range** `<a,b>` transfers exactly
2154
- those source bytes (coordinate = byte, 1-indexed inclusive). A transfer **into** a destination byte
2155
- range is a splice: `<c,d>` replaces exactly the destination bytes c..d with the source bytes and a
2156
- single position `<c>` inserts the source bytes before byte c (`<-1>` appends); every byte outside the
2157
- window is preserved, and the whole spliced result is re-written through the proposal gate. A binary
2158
- **lives in a DB entry** as its bytes base64 in the channel's TEXT content; the same READ, byte range,
2159
- and COPY/MOVE recover them through a byte source synthesized from that content, so a File member and a
2160
- `worker://` entry hold and yield a binary identically. An empty binary channel represents
2161
- zero bytes, not an unsupported format; whole COPY/MOVE preserves it. Failed acquisition
2162
- is not an empty success: its producer outcome remains authoritative for READ and transfer.
2163
- This supersedes the older blanket refusal (#140)
2164
- for both the file and the entry case. Native image/PDF/audio attachment facts come from the configured
2165
- mimetype handler over original bytes, whether supplied by a file or stored channel
2166
- ({§packet-attachment-parts}); the hexadecimal view remains available. The exceptions are narrow and
2167
- defined, each a clear receipt rather than a dead end: a binary region addressed by a **textual anchor**
2168
- rather than a numeric byte coordinate has no meaning (416 — bytes are not lines), **authoring** binary
2169
- content from a text EDIT body is impossible (a text emission cannot type bytes), and a scheme that keeps
2170
- no bytes for a binary channel — no disk file, no stored content — has nothing to transfer and says so
2171
- (415). None is the entry-storage dead end the older text named; that cell is filled.
2184
+ - §binary-parity Binary resources share ordinary existence, membership, FIND-by-path,
2185
+ deletion, and proposal rules. Files supply native bytes; DB-backed channels store
2186
+ them as base64 and recover the same bytes through their byte source. Empty binary
2187
+ content is zero bytes, never an unsupported format. Acquisition failure preserves
2188
+ its producer result and cannot become a successful empty transfer.
2189
+
2190
+ | Binary operation | Contract |
2191
+ | --- | --- |
2192
+ | READ / FIND | Hexadecimal byte projection and byte-pattern coordinates under {§read-bytes}/{§find-bytes}. Eligible image/PDF/audio attachments use original bytes independently ({§packet-attachment-parts}). |
2193
+ | Whole COPY / MOVE | Markerless or `<1,-1>` transfers the original bytes verbatim ({§move-canonical-whole-source}); MOVE deletes its source after the destination lands. |
2194
+ | Source range or pattern | `<a,b>` selects 1-indexed inclusive bytes. Patterns use {§find-bytes}; a source scope admits complete matches. Fragments concatenate without separators. MOVE removes exactly those bytes after destination success. |
2195
+ | Destination range | `<c,d>` replaces bytes c..d; `<c>` inserts before byte c, `<0>` prepends, and `<-1>` appends. All coordinates name the pre-mutation source. Other bytes remain unchanged. |
2196
+ | Same-channel MOVE | Destination insertion and source removal use one pre-mutation snapshot and one proposal-gated write. Overlapping selections refuse with 409 before writing. |
2197
+ | Deferred MOVE | The source byte snapshot is retained as a content-hash precondition; changed bytes refuse removal with 409 `edit-collision`. A landed destination remains reported under {§copy-move-observation}. |
2198
+ | Mutation result | Ordinary proposal gate and byte count; no fabricated text diff. |
2199
+ | Text anchor on a transfer | 416: native byte coordinates are numeric. |
2200
+ | Text EDIT of native bytes | 415: an EDIT body authors text, not native bytes. |
2201
+ | Binary channel without a byte source | 415, not an empty success. |
2172
2202
 
2173
2203
  ### §log-history-projection Durable history and active projection
2174
2204
 
@@ -2195,41 +2225,16 @@ same transitions the dispatcher's atomic curation event makes, without the row.
2195
2225
  |---|---|
2196
2226
  | Evidence | Original provider reasoning remains verbatim in immutable model-call responses and admitted packets. Resource and log operations never rewrite it. Only an admitted response, or the final exhausted emission attempt, produces a model reasoning source; missing provider reasoning creates no substitute. A non-model producer may record its own authored rationale under {§turn-source-resources}. |
2197
2227
  | Resource | `reasoning://<worker>/<loop>/<turn>` is immutable text/plain source belonging to the named workspace worker's turn under {§turn-source-resources}. Every workspace actor may READ, FIND, search and COPY from it; none may EDIT, KILL, COPY into or MOVE it. |
2198
- | Delivery | Initialization READs its own authored rationale under {§reasoning-initial-read}, and an empty turn's reasoning is read back under {§reasoning-empty-turn-read}. Further observations require deliberate READs. The selected model reasoning source is stored before its OPs execute, so an ordinary READ of the current turn resolves immediately and is visible in subsequent packets. Every READ retains its authored scope and ordinary range metadata, without edit anchors. |
2228
+ | Delivery | Initialization authors no reasoning ({§worker-initialization-entry}); every observation of reasoning is a deliberate READ: the model's own, or the harness's row before the emission row under {§reasoning-row}. The selected model reasoning source is stored before its OPs execute, so an ordinary READ of the current turn resolves immediately and is visible in subsequent packets. Every READ retains its authored scope and ordinary range metadata, without edit anchors. |
2199
2229
  | Curation | Scoped log KILL suppresses receipt lines; whole log KILL retires the receipt. Neither affects the source. Explicit log READs retain ordinary curation anchors. A mutable working copy requires ordinary COPY into an editable resource. |
2200
2230
  | Lifecycle | Restart retains sources and observations. FORK snapshots sources under the child's name at the same loop/turn coordinates and receipts with independent curation. No curation or lifecycle event automatically READs model reasoning. A turn the provider left without reasoning reads empty; absent workers and turns return the ordinary missing result ({§turn-source-resources}). |
2201
2231
  | Client | Standard live reasoning events and replay retain original provider reasoning; working resources and READ receipts never substitute for or replay that stream. |
2202
2232
 
2203
- ### §reasoning-initial-read Initial reasoning observation
2204
-
2205
- The initialization turn records its `_plurnk`-authored rationale and complete
2206
- NOTE/FIND/READ program as one reasoning source before dispatch. The shared
2207
- reasoning extractor ({§reasoning-operations}) admits every operation once, in
2208
- source order. Its final READ observes that same reasoning source, including
2209
- the READ itself; this is an ordinary read of already stored text, not recursion
2210
- or a future-source subscription. The initial message arrives separately as an
2211
- inbound SEND ({§message-arrival}). Neither initialization nor later turns
2212
- manufacture a task inventory.
2213
- `PLURNK_REASONING_VIEW_LINES` (alias-scoped, default in `.env.defaults`) selects this one READ's
2214
- scope: `0` omits it, `-1` reads the complete rationale, and a positive integer
2215
- bounds it to the first N lines. Source retention, deliberate READs, and client
2216
- streaming are independent. The only other automatic reasoning READ follows an empty
2217
- turn ({§reasoning-empty-turn-read}).
2218
-
2219
- §reasoning-empty-turn-read **Operation-free reasoning is read back for recovery.** After a
2220
- turn admitted under {§empty-turn} with no admitted reasoning operations, one runtime turn of the same loop
2221
- (`{ producer="_plurnk", kind="operation" }`) dispatches
2222
- `READ (reasoning://<worker>/<loop>/<turn>) <!-- turn N emitted no OP -->` over that turn's stored
2223
- reasoning source; its receipt renders in the next packet like any other log row.
2224
- `PLURNK_REASONING_EMPTY_TURN_LINES` (alias-scoped, default in `.env.defaults`) selects the scope on the same
2225
- scale as `PLURNK_REASONING_VIEW_LINES`. Any admitted reasoning NOTE, FIND or READ suppresses
2226
- this recovery readback. No read follows a turn without reasoning, and none follows
2227
- a turn whose emission or reasoning carries a foreign tool-call grammar or leaked template token
2228
- (`KnownToxins` names them); the strike and its error row are unchanged.
2229
-
2230
2233
  ### §log-kill-scope KILL on the log: whole items and scoped bodies
2231
2234
 
2232
- AST: `{ op: "KILL", target, matcher: MatcherBody | null, lineMarker: TextLineMarker | null, body: null }` ({§kill-scope} and {§matcher-option} in the contracts SPEC own the grammar).
2235
+ AST: `{ op: "KILL", target, matcher: MatcherBody | null, lineMarker: TextLineMarker | null, body: string | null }` ({§kill-scope} and {§matcher-option} in the contracts SPEC own the grammar); the body is a log target's distillation ({§log-kill-distillation}) and null otherwise.
2236
+
2237
+ §log-kill-distillation **A log KILL may say what it keeps.** A body on a `log:///` KILL is the model's distillation of what the KILL retires. Whatever the kill's outcome, the body lands as the model's own NOTE row at the next sequence of the same turn — written after the kill's receipt, so it never falls inside the kill's own selection — carrying `attrs.distilled` with the KILL's target as written, so a distillation is distinguishable from a free NOTE while it renders, weighs and curates exactly as one; the dispatch reports two rows written. A kill that misses keeps its distillation beside its visible receipt: what the model wrote about its environment is recorded for the model to possess and retire, never dropped for where the kill aimed. A whitespace-only body is a plain KILL. The kill's own receipt stays hidden as any successful log KILL's does ({§context-verbs}).
2233
2238
 
2234
2239
  KILL deletes context from the **log** (`log:///`, {§packet}). Without a scope it retires the selected rows from the active projection ({§log-history-projection}). With a one-line or inclusive two-line scope it removes only that body's intersecting body-relative physical lines from the readable projection, and the row stays active. An anchor may be one published on that body or one returned by READing its `log:///` coordinate ({§line-anchors}); an anchor absent from the current body selects no line, as with an out-of-bounds numeric line. Scoped KILL is one-way: intervals accumulate, the durable body is untouched, and subsequent access follows {§log-readable-projection}. A scoped KILL on a bodyless row is a friendly 200 no-op with `matched` reported. An emission row is curated whole ({§emission-row}): a scope covering every line retires it like an unscoped KILL; on its exact coordinate a narrower scope is 422 `emission-curated-whole`, whose recovery names both forms that retire it; a sweep leaves it intact. A KILL that addresses no row is 404 on an exact coordinate and 204 on a sweep ({§log-curation-folder-idiom}). Selection composes target/glob with an optional heading pattern ({§log-curation-set-selection}). Parameterless KILL instead requests completion ({§kill-conclusion}).
2235
2240
 
@@ -2245,12 +2250,16 @@ A READ carrying active native media is atomic: any KILL scope is ignored and the
2245
2250
  | Deliberate scoped KILL | Current projection `folded`, initially empty | Packet, READ, FIND, COPY, and search omit those lines; later retrieval cannot undo trimming. |
2246
2251
 
2247
2252
  Packet display combines both masks. Other consumers use only deliberate trimming.
2248
- `logTokens` prices the materialized observation, never absent body content.
2253
+ `tokens` prices the materialized observation, never absent body content.
2249
2254
  Coordinates and anchors retain the original body's physical lines; selection occurs
2250
2255
  before omitted lines are removed, and sparse receipts retain their original line
2251
2256
  ordinals. Automatic previews remain retrieval bounds, not deletions. COPY can read
2252
2257
  an active log source under ordinary read authority, without minting log history;
2253
- destinations and MOVE sources still require independently writable entry storage.
2258
+ entry destinations require independently writable storage; MOVE retires its
2259
+ source under {§move-decomposition}. A pattern spanning retained lines on either
2260
+ side of a curated gap maps to separate exact source regions, never to a bounding
2261
+ region that restores hidden lines. Concatenating those fragments reproduces only
2262
+ the matched readable text.
2254
2263
  Trimming invalidates derived search attachments; an in-flight derivation attaches
2255
2264
  only if its source projection is still current. Forks copy both projection facts;
2256
2265
  forensics always retain the complete immutable body and curation history.
@@ -2264,14 +2273,14 @@ type and projection facts under {§read-bytes}.
2264
2273
  The `## Log` section is a sequence of ordinary Markdown records separated by one blank line:
2265
2274
 
2266
2275
  ```text
2267
- ### log:///<loop>/<turn>/<item>/<leaf> → path pattern · <logTokens>
2276
+ ### log:///<loop>/<turn>/<item>/<leaf> → path pattern · <tokens>
2268
2277
  {"oneLine":"strict JSON facts"}
2269
2278
  <coordinate-prefixed body lines when visible>
2270
2279
  ```
2271
2280
 
2272
2281
  | Line | Content | Rule |
2273
2282
  |---|---|---|
2274
- | H3 | Only the row's complete READ address, addressed resource(s), selection pattern(s), and ` · ` followed by its `logTokens` charge ({§packet-token-accounting}). | Always present. Canonical operands follow arrows ({§log-address-metadata}); each pattern follows its operand. No invocation parentheses, scope, aside or metadata block. The operation appears only in the URI leaf. |
2283
+ | H3 | Only the row's complete READ address, addressed resource(s), selection pattern(s), and ` · ` followed by its `tokens` charge ({§packet-token-accounting}). | Always present. Canonical operands follow arrows ({§log-address-metadata}); each pattern follows its operand. No invocation parentheses, scope, aside or metadata block. The operation appears only in the URI leaf. |
2275
2284
  | facts | One strict JSON object in stable alphabetical order. | Present only when a fact exists. Asides, scopes, opaque invocation metadata and result facts belong here, not on the H3. |
2276
2285
  | body | Coordinate-prefixed lines. | Present when the row is visible. |
2277
2286
 
@@ -2348,16 +2357,16 @@ Authored `metadata` retains its opaque ordered block strings under {§scheme-met
2348
2357
  until its row is KILLed: an uncaptioned native part on the user turn reads as a fresh arrival (#899).
2349
2358
  Model-response settlement never consumes an observation. KILL follows
2350
2359
  {§log-kill-scope}; forks inherit the snapshot and ordinary projection state independently. Output withholding
2351
- suppresses the complete native part under {§context-output-admission}. Unsupported routes receive only the
2360
+ suppresses the complete native part under {§context-fit}. Unsupported routes receive only the
2352
2361
  text projection and no native charge; switching back to a compatible route exposes still-retained media.
2353
- Each included part contributes `tokensAttachment` within `logTokens`: `ceil(width × height / 750)` for an
2362
+ Each included part contributes `tokensAttachment` within `tokens`: `ceil(width × height / 750)` for an
2354
2363
  image, `pages × 1500` for a document, `ceil(duration × 32)` for audio, or `ceil(bytes / 4)` when page count
2355
2364
  or duration is unknown. Byte ranges select
2356
2365
  hexadecimal text, never crop the native resource. Retries reuse the frozen request; model-call evidence
2357
2366
  records the exact READ coordinates sent without controlling retention. Missing immutable bytes are an
2358
2367
  internal integrity failure, never silently dropped content. No ejection message or permanent teaching is
2359
2368
  added. These stable curation weights are not provider-token measurements ({§tokenomics-render-weight-budget}).
2360
- - §packet-token-accounting Every row reports one `logTokens` charge on its H3 ({§log-wire-format}): its complete materialized H3, facts, visible body, selected native attachment, and the emission it delivers outside its record ({§emission-row}). The completed record is measured to a fixed point, including the accounting field itself. No `tokensBody`, `tokensMetadata`, or `tokensActive` field is serialized. Hidden text is not charged; metadata-only rows still have a reclaimable charge. Source/FIND-item `tokens` measure source content, not the observation's context footprint. A FIND's nonzero `itemsTokenTotal` weighs the complete matched set; a nonzero `returnedItemsTokenTotal` appears only when the returned page differs. All use stable curation weights, not provider tokens or dollars. Native component accounting follows {§packet-attachment-parts}; ordinary addressability and truthful errors follow {§log-wire-format}.
2369
+ - §packet-token-accounting Every row reports one `tokens` charge on its H3 ({§log-wire-format}): its complete materialized H3, facts, visible body, selected native attachment, and the emission it delivers outside its record ({§emission-row}). The completed record is measured to a fixed point, including the accounting field itself. No `tokensBody`, `tokensMetadata`, or `tokensActive` field is serialized. Hidden text is not charged; metadata-only rows still have a reclaimable charge. Source/FIND-item `tokens` measure source content, not the observation's context footprint. A FIND's nonzero `itemsTokenTotal` weighs the complete matched set; a nonzero `returnedItemsTokenTotal` appears only when the returned page differs. All use stable curation weights, not provider tokens or dollars. Native component accounting follows {§packet-attachment-parts}; ordinary addressability and truthful errors follow {§log-wire-format}.
2361
2370
 
2362
2371
  ### §retrieval-packet-metadata READ/FIND packet metadata
2363
2372
 
@@ -2371,7 +2380,7 @@ The packet projects one actionable owner for each retrieval fact:
2371
2380
  | catalog/path FIND | `range` in resources | none | none |
2372
2381
  | broad matcher FIND | `range` in resources | per-resource match-location counts; a resource with exactly one match also carries that match's `locator`/`region` | nonzero complete `matchLocationCount` |
2373
2382
  | exact matcher FIND | `range` in match locations | each row's locator/region; a regex or glob row also carries `matched`, the matched text | none |
2374
- | pattern READ ({§read-pattern}) | `range` over the physical lines | the selected lines with their ordinals and anchors | the heading's pattern and `matched`, the selected line count |
2383
+ | pattern READ ({§read-pattern}) | `range` over the physical lines | selected lines with ordinals and anchors; precise `matches` under {§read-pattern-evidence} | heading pattern and selected-line `matched`; `matchLocationCount` only when the metadata preview omits locations |
2375
2384
 
2376
2385
  Any row whose statement carried a heading pattern ({§matcher-option}) retains it
2377
2386
  in its H3, and a pattern mutation ({§edit-pattern}, {§kill-pattern},
@@ -2389,7 +2398,7 @@ or `all`. FIND range cardinality replaces top-level `items`, `lines`, and
2389
2398
  `matchingPathCount`; line READ likewise omits the rendered-body `lines` count
2390
2399
  and its internally resolved whole-line region. Exact READ formats its region
2391
2400
  as `range`. A failed retrieval's Problem owns its range extension rather than
2392
- repeating it at top level. `logTokens` weighs the complete rendered record
2401
+ repeating it at top level. `tokens` weighs the complete rendered record
2393
2402
  under {§packet-token-accounting};
2394
2403
  generic body `lines` remains available on READ-shaped materialization notices
2395
2404
  that have no retrieval extent. FIND content weights follow {§log-wire-format};
@@ -2416,15 +2425,32 @@ like any other row.
2416
2425
  | When | An inference turn that admitted at least one content statement. Reasoning-only turns, including initialization ({§worker-initialization-entry}), a programmatic batch, an empty turn ({§empty-turn}), a client operation and a rejected attempt ({§rejected-emission-entry}) announce nothing. |
2417
2426
  | Place | After the turn's inputs (arrivals, deltas, open-path READs) and before its reasoning NOTEs and operations, written after the selection snapshot ({§turn-ops-selection-snapshot}): the emission sits between what the worker had seen and what it caused. |
2418
2427
  | Row | A `_plurnk` READ of the turn's own source, `ops://<worker>/L/T`, with `attrs.kind="emission"` and the canonical leaf `/emission`: `### log:///L/T/S/emission → ops://<worker>/L/T · N`. It renders its author, the turn's producer, as `origin`, so a model's row carries none. It is no operation: no receipt, tool call or strike, and outside the op mix. |
2419
- | Body | Frozen at announcement: the canonical rendering ({§statement-rendering}) of admitted content statements, each in a closed fence. Each body appears within the shared preview bound ({§body-projection}), `PLURNK_SERVICE_PREVIEW_LINES` and `PLURNK_SERVICE_PREVIEW_CHARS`. A longer body keeps its head, and its closing fence carries `<!-- Automatically truncated op body: READ (ops://<worker>/L/T) to retrieve in full -->`; nothing the harness writes enters a fence. Absent and empty bodies remain empty. All heading operands, scopes, metadata, patterns and asides remain. Free text and unadmitted forms are absent; a recovered native call ({§native-tool-calls}) appears as the operation it was read as; an operation whose receipt failed stays. Reasoning operations retain their own source and normal receipts, never an assistant-content copy. No body text is inspected for nested operations. |
2428
+ | Body | Frozen at announcement: the canonical rendering ({§statement-rendering}) of admitted content statements, each in a closed fence. Each body appears as its head, about a hundred tokens of curation weight — enough to recognise the turn, never enough to matter to the budget ({§context-fit}) — and a longer body ends in an ellipsis (`…`) with its closing fence carrying `<!-- … READ (ops://<worker>/L/T) -->`; nothing the harness writes enters a fence. Absent and empty bodies remain empty. All heading operands, scopes, metadata, patterns and asides remain. Free text and unadmitted forms are absent; a recovered native call ({§native-tool-calls}) appears as the operation it was read as; an operation whose receipt failed stays. Reasoning operations retain their own source and normal receipts, never an assistant-content copy. No body text is inspected for nested operations. |
2420
2429
  | Sources and memory | Dispatch and immutable `ops://` sources retain complete bodies ({§turn-source-resources}); an explicit source READ returns them normally. The wire omits NOTE and WAIT blocks, whose own rows show them whole ({§body-projection}), so curating a NOTE row removes its text; an emission of only NOTE and WAIT delivers nothing, its row stands, and no assistant message follows it ({§packet-wire-envelope}); reasoning-only NOTEs never enter this projection. |
2421
2430
  | Stability | The projection is fixed from its first appearance, never aged or resized under budget pressure. Already frozen announcements and historical request captures are not rewritten. |
2422
2431
  | Presentation | Born folded: the record shows its header, and its body follows the record as the worker's assistant message. |
2423
- | Accounting | `logTokens` charges the record and the emission the wire delivers, truncation asides included, never the omitted NOTE and WAIT blocks or the cut remainder ({§packet-token-accounting}). An explicit source READ has its own ordinary charge. |
2432
+ | Accounting | `tokens` charges the record and the emission the wire delivers, truncation asides included, never the omitted NOTE and WAIT blocks or the cut remainder ({§packet-token-accounting}). An explicit source READ has its own ordinary charge. |
2424
2433
  | Curation | Curated whole ({§log-kill-scope}): KILL retires it, and so does a scope covering every line (`<1,-1>`); on its exact coordinate a narrower scope is 422 `emission-curated-whole`, and a sweep whose scope would only trim it leaves it intact. |
2425
2434
  | Schema | Migration 12 admits `kind="emission"` only on this shape: one per turn, the turn's newest row when written, frozen, and curated whole. A database from before version 12 keeps its rows and gains no announcement. FORK copies it with the inherited turns, still naming its writer. |
2426
2435
  | Echoes | A worker that repeats the heading in its own text is tolerated ({§fabricated-log-entry}); the digest counts the echoes. A worker that copies the truncation aside onto its own closer keeps its body intact; the aside is outside text ({§outside-text}). |
2427
2436
 
2437
+ ### §reasoning-row The reasoning row
2438
+
2439
+ The model's memory of its own reasoning, behind `PLURNK_SERVICE_REASONING_ROWS` (default `1`):
2440
+ when it is `1`, every model turn that reasoned lands its reasoning as one row of its
2441
+ own, `log:///<loop>/<turn>/<sequence>/reasoning → reasoning://<worker>/<loop>/<turn>`, the harness's
2442
+ READ of the turn's reasoning source, immediately before the turn's emission row, so the transcript
2443
+ reads what the model thought and then what it emitted, and the assistant message that follows stays
2444
+ the canonical program ({§emission-row}, {§packet-wire-envelope}).
2445
+
2446
+ | Concern | Rule |
2447
+ |---|---|
2448
+ | Room | The row lands whole only when the packet has room for it after everything else the turn lands, one receipt's reserve kept for the emission row's head ({§context-fit}); without room, no row lands and nothing else in the turn changes: no prefix, no receipt, no other row touched. |
2449
+ | Body | The model's own text, complete ({§markerless-first-page}); the complete reasoning stays readable at its address by any scope ({§turn-source-resources}). |
2450
+ | Weight | Charged like any row, visible in the gauge and its `largest` ({§context-gauge}). |
2451
+ | Curation | The verbs alone: a KILL retires it like any row ({§context-verbs}); the daemon reorders nothing and un-bodies nothing on its account. |
2452
+ | Absence | Means no room or no reasoning; the model tells them apart by reading `reasoning://` for the turn. |
2453
+
2428
2454
  ### §turn-source-resources Immutable turn-source resources
2429
2455
 
2430
2456
  | Surface | Contract |
@@ -2588,24 +2614,23 @@ Operand syntax: {§transfer-resource-selections}. Result projection: {§copy-mov
2588
2614
  channel is 404. Entry sources follow {§membership-source-projection}; active
2589
2615
  log sources follow {§log-readable-projection}. Binary sources transfer bytes
2590
2616
  under {§binary-parity}; text anchors resolve under {§line-anchors}.
2591
- - §copy-move-pattern **A source pattern selects whole matching lines; a
2617
+ - §copy-move-pattern **A source pattern selects exact source spans; a
2592
2618
  destination is a place.** A source operand's heading pattern
2593
2619
  (```` ```COPY (notes.md) [{"pattern": "TODO"}] (todos.md) <-1> ````) runs
2594
- over the source text line by line, bounded by the source scope and by what
2595
- the source shows ({§log-readable-projection}); the selection is every line a
2596
- match touches, in source order, each with its own line separator exactly as
2597
- a scoped whole-line selection carries it. The result reports `matched`. Zero
2620
+ over the addressed source channel, bounded by the source scope and by what
2621
+ the source shows ({§log-readable-projection}). The selected fragments are
2622
+ concatenated verbatim in source order, without invented separators or
2623
+ enclosing line context ({§slice-semantics-compose-pattern}). The result
2624
+ reports `matched` spans. Zero
2598
2625
  matches transfer nothing: 204 with `matched: 0`, and no destination is
2599
- created. A MOVE retires exactly the selected lines through the source's EDIT
2600
- path, one empty-body line splice per line in one batch guarded by their
2601
- anchors ({§edit-pattern}); within one channel the insertion and the removals
2626
+ created. A textual MOVE removes exactly those spans through the source's EDIT
2627
+ path, one empty-body exact splice per span in one batch guarded by their
2628
+ anchors ({§edit-pattern}); byte selections use {§binary-parity}. Within one channel the insertion and the removals
2602
2629
  are one atomic batch, and a deferred MOVE ({§proposal}) retires the same
2603
- lines after acceptance. A curated source retires rows, not lines of its
2630
+ spans after acceptance. A curated source retires rows, not arbitrary text of its
2604
2631
  projection, so a pattern MOVE from `log:///` is 400 `pattern-unsupported`
2605
- (COPY the lines, then KILL its rows by pattern); a pattern on a binary
2606
- channel is 400 `pattern-unsupported` (bytes have no lines); a pattern on
2607
- the destination is 400 `pattern-destination-unsupported`; resource-selecting
2608
- dialects (`~`, `&`) are 400 `pattern-dialect-unsupported`.
2632
+ (COPY its selected text, then KILL its rows by pattern). A pattern on
2633
+ the destination is 400 `pattern-destination-unsupported`.
2609
2634
  2. Resolve destination path, channel, and optional text scope. Source and
2610
2635
  destination mimetypes must be compatible under {§mimetype-verbatim-transfer}
2611
2636
  or the result is 415. Destination anchors
@@ -2768,7 +2793,7 @@ same durable liveness.
2768
2793
  | New unpublished message | Continue; publish it in the next packet. |
2769
2794
  | Fresh operation/parser failure, without an authored WAIT | Continue before any automatic parking. |
2770
2795
  | Neither an authored WAIT nor an eligible completion request ({§kill-conclusion}) | Continue, regardless of earlier replies or live work. |
2771
- | Live work and either WAIT or an eligible completion request | Park the same loop; message arrival, child or stream settlement, or stream cadence wakes it. No final-answer body is delivered while joining. |
2796
+ | Live work and either WAIT or an eligible completion request | Park the same loop; message arrival, child or stream settlement, or wait expiry wakes it ({§worker-wait-timing}). No final-answer body is delivered while joining. |
2772
2797
  | WAIT without live work | Continue; never invent a future wake. Its row says only `Nothing is in flight. Continuing.`, however often the loop yields this way. |
2773
2798
  | Unobserved operation results, failures, child results or stream conclusions | Continue; the next packet presents them. |
2774
2799
  | Eligible completion request with no unpublished arrivals, live work or unobserved results | Conclude successfully, whether or not it delivers an answer. |
@@ -2844,11 +2869,10 @@ accounting and model-visible failure evidence remain separately owned by
2844
2869
  filters what is stored. The model hears only the weight: the next packet's Notices section
2845
2870
  carries `outside_text: N tokens emitted outside OPs. Discarded.`, N by {§tokenomics-agnostic-ruler};
2846
2871
  the text itself never enters a packet, not even inside its turn's emission ({§emission-row}), is never delivered and never concludes.
2847
- {§empty-turn} still strikes a turn that holds only text, with unchanged reasoning recovery
2848
- ({§reasoning-empty-turn-read}), reply accounting and completion rules. A log-entry heading in
2872
+ {§empty-turn} still strikes a turn that holds only text, with unchanged
2873
+ reply accounting and completion rules. A log-entry heading in
2849
2874
  outside text still rejects the attempt unless it echoes an emission row ({§fabricated-log-entry}); an unfenced operation line is
2850
- not response text ({§unfenced-operation}) and so never reaches the source; `KnownToxins` guards
2851
- only the read-back ({§reasoning-empty-turn-read}). Clients receive the text once through
2875
+ not response text ({§unfenced-operation}) and so never reaches the source. Clients receive the text once through
2852
2876
  `outside/event` ({§notifications-outside-event}, {§agui-outside-text}); FORK snapshots the
2853
2877
  source with the turn's others; the digest names its weight. It has no address: there is no
2854
2878
  `outside://` scheme, and exact emissions remain at `ops://`. This is evidence, not an alternate
@@ -2864,12 +2888,11 @@ accounting and model-visible failure evidence remain separately owned by
2864
2888
  remains that turn's emission. A concluded child's `loop_termination` row to its parent
2865
2889
  READs this same loop resource. Witness: `test/intg/loop-answer.test.ts`.
2866
2890
  - §empty-turn **No authored response operation is a recoverable turn, never completion.**
2867
- Count parsed content operations and reasoning FIND/READs ({§reasoning-operations}); neither
2868
- reasoning NOTEs nor outside text ({§outside-text}) enter the count. When none exist and no boundary was lost, retain the turn
2891
+ Count parsed content operations and admitted reasoning operations ({§reasoning-operations}), a NOTE in
2892
+ either channel among them; outside text ({§outside-text}) never enters the count. When none exist and no boundary was lost, retain the turn
2869
2893
  and its raw sources and count one progress-contract strike, whether or not the turn carried text. The strike sends no notice of its own: the turn records one `_plurnk`
2870
2894
  error row, `422` `The turn performed no operation.`, which rides the next packet's errors like
2871
- any failure ({§operation-result-uniform-error-channel}), and its reasoning is read back to the
2872
- model under {§reasoning-empty-turn-read}; the threshold terminal still says why ({§engine-rails}).
2895
+ any failure ({§operation-result-uniform-error-channel}); the threshold terminal still says why ({§engine-rails}).
2873
2896
  An empty turn uses its exact text as the cycle fingerprint ({§engine-cycle-evidence});
2874
2897
  different empty programs are not a repeated cycle merely because neither contained
2875
2898
  operations. Lost-boundary handling remains {§unparsed-tail-boundary}; no confirmation
@@ -3115,14 +3138,10 @@ executor target is refused `scope-unsupported` (400), naming the field.
3115
3138
  | `turn` | Reaped at the worker's next pre-turn via the registry abort, before the turn's own spawns, so it never survives into the subsequent turn; its terminal output surfaces born visible like any close ({§exec-stream}). |
3116
3139
  | `detached` | Outlives its loop's terminal, 200 included. It never binds to the loop's teardown and is nobody's obligation — completion is not gated by it, WAIT does not park on it, optimistic settlement looks past it — and it ends only by KILL, the worker's total reap, or daemon shutdown; its late conclusion surfaces without opening a loop. |
3117
3140
 
3118
- **Cadence is the daemon's, never the model's.** While a loop is parked on an open
3119
- stream the daemon wakes it on the worker's exponential backoff
3120
- (`PLURNK_SERVICE_EXEC_POLL_SEC`, `PLURNK_SERVICE_EXEC_POLL_TURNS`, floored by
3121
- `PLURNK_SERVICE_OPTIMISTIC_WAIT_MS`) to inspect progress; it does nothing while
3122
- the loop is active, because ambient stream deltas already surface progress.
3123
- Closure is a wake edge regardless. Child-only joins never use this timer: child
3124
- settlement is their durable wake edge. A recurring check on the calendar is a
3125
- schedule targeting yourself ({§schedule-delivery}), not a loop that polls.
3141
+ Observation timing belongs to the bounded wait ({§worker-wait-timing}), separately
3142
+ from execution lifetime. Wait expiry permits inspection of still-running work;
3143
+ closure remains an independent wake edge. Active loops already receive ambient
3144
+ stream deltas. Calendar recurrence remains a schedule ({§schedule-delivery}).
3126
3145
 
3127
3146
  §exec-host-proposes **Effect-gating.** Each executor — and each scheme operation that mutates something outside this process — declares an `effect` (`pure` | `read` | `host`); the service maps it to policy (`EffectPolicy`). The declarer states the FACT, the panel decides the POLICY, and one rule covers every operation: nothing that changes the world runs on nobody's authority. A `host` runtime (subprocess; file-backed sqlite) proposes under {§proposal}, and so does an outbound request that mutates a remote resource ({§http-outbound-proposes}). Once accepted, it spawns and writes channels at its workspace execution address ({§execution-output-identity}), returning `102 Processing`. Channel state transitions (`active` → `closed`/`errored`) drive subsequent observations ({§channel-state}).
3128
3147
 
@@ -3188,7 +3207,7 @@ two states and no others:
3188
3207
 
3189
3208
  | state | what the model receives |
3190
3209
  |---|---|
3191
- | active | nothing in the Log. The `## Delegation` stream pointer names the stream with each channel's size and its growth since the last packet ({§child-orientation}); the model READs any range it wants, and every READ of a stream channel carries `terminal: false` while it runs and `terminal: true` once it has concluded, so an empty page is never mistaken for a finished command that printed nothing. |
3210
+ | active | nothing in the Log. The `## Delegation` stream pointer reports timing and channel activity ({§child-orientation}); the model READs any range it wants, and every READ of a stream channel carries `terminal: false` while it runs and `terminal: true` once it has concluded, so an empty page is never mistaken for a finished command that printed nothing. |
3192
3211
  | terminal | ONE `origin=_plurnk` READ at the execution's channel address, born visible, that is exactly a markerless READ of the channel — its bounded first page ({§read-selection-projection}, the whole channel when it fits, the channel's own mimetype), the `range` or `region`, terminal status and Problem, `terminal: true`, and any producer-supplied integer `exitCode`. The packet writes the read resource as its operand, exactly as an explicit READ does ({§log-address-metadata}). |
3193
3212
 
3194
3213
  §stream-observation-result **One liveness fact.** The durable READ result owns
@@ -3517,6 +3536,20 @@ Capability admission precedes this decision, so proposal disposition cannot gran
3517
3536
 
3518
3537
  The durable row is lifecycle evidence and the lookup key, not a serialized callback. `subscriptions.open()` establishes both halves before yielding a composed `StreamSubscription`: an `AbortSignal` whose fused `notifyChunk` and terminal `close` methods are safe to retain without the operation's general `SchemeCtx`. `close(result, summary?, channelResults?)` validates one universal terminal producer result plus exact named channel overrides. One SQLite transition closes the subscription and installs each channel's terminal `producerResult`; its lifecycle state derives from that result. The transition then wakes the worker when appropriate and unregisters the live handle. `close_status` is a constrained relational projection of `close_result.status`, never an independent result, while `channel_results` preserves historical overrides after a later subscription replaces the channel's current evidence. A durable open row without a live handle is an explicit lifecycle failure, never a fabricated cancellation success. Channel state ({§channel-state}) + log entries ({§no-chunk-rows}) carry lifecycle.
3519
3538
 
3539
+ §subscription-finalization Executors and scheme subscriptions share the durable
3540
+ close boundary. Concurrent closes join one attempt; a committed close is
3541
+ idempotent, including its completion wake.
3542
+
3543
+ | Boundary | Ownership and recovery |
3544
+ | --- | --- |
3545
+ | Persistence fails | Surface the cause, retain the terminal result and callable owner, and emit no completion wake. Another close or cancellation retries settlement, not execution. |
3546
+ | Persistence commits | Release ownership before observational delivery. Attempt channel notifications and the completion wake even if another observer throws. |
3547
+ | Observer fails after commit | Surface the cause without reverting terminal state, retaining a false live owner, or repeating delivery on another close. |
3548
+
3549
+ Cancellation remains coalesced while work is live. Failed cancellation or
3550
+ failed settlement permits a subsequent cancellation attempt; it never converts
3551
+ the producer's already obtained outcome into a fictitious cancellation result.
3552
+
3520
3553
  At process restart every still-open row is necessarily missing its callable owner. Boot
3521
3554
  settles it as interruption (`500`) and errors active channels before evaluating parked
3522
3555
  loops ({§worker-lifecycle-restart-recovery}); it never reports cancellation (`499`) or
@@ -3866,9 +3899,7 @@ Each knob's value lives on its panel and nowhere else (`plurnk-service config de
3866
3899
  | `PLURNK_SERVICE_PROVIDER_RECOVERY_BACKOFF` | First recovery delay (ms); doubles per failure up to `PLURNK_SERVICE_PROVIDER_RECOVERY_BACKOFF_MAX` ({§provider-recovery}). |
3867
3900
  | `PLURNK_SERVICE_MAX_STRIKES` | Consecutive turn-contract strike threshold ({§engine-rails}). |
3868
3901
  | `PLURNK_SERVICE_EMISSION_ATTEMPTS` | Completed provider responses allowed beneath one engine turn before frame admission is exhausted. Bounded interior operation errors are admitted without spending this budget. Exhaustion contributes one frame-contract strike under {§invalid-emission-attempts}. |
3869
- | `PLURNK_SERVICE_PREVIEW_LINES` | First page of every markerless retrieval, in the projection's own units, and the head bound of an automatic preview ({§markerless-first-page}, {§body-projection}). |
3870
- | `PLURNK_SERVICE_PREVIEW_CHARS` | Independent Unicode code-point bound on the same previews, with CRLF treated as one indivisible separator ({§body-projection}). |
3871
- | `PLURNK_SERVICE_PROMPT_PROJECTION` | Aggregate curation-weight share of the provider-derived input capacity available to the automatic projection of arrivals from outside the workspace ({§message-projection}); alias-scoped overrides are supported. |
3902
+ | `PLURNK_SERVICE_BUDGET_LARGEST_ITEMS` | How many of the heaviest retained log rows the gauge names ({§context-gauge}). |
3872
3903
  | `PLURNK_SERVICE_LINE_ANCHOR_CONTEXT_LINES` | Minimum neighboring lines hashed on each side; repeated handles expand their context ({§line-anchor-disambiguation}). |
3873
3904
  | `PLURNK_SERVICE_EDIT_RECEIPT_CONTEXT_LINES` | Surrounding and landed lines shown at each EDIT result boundary ({§edit-result-receipt-projection}). |
3874
3905
  | `PLURNK_SERVICE_MIN_CYCLES` | Min repetitions before cycle detection fires ({§engine-rails}). |
@@ -4101,10 +4132,13 @@ The shared deadline bounds every phase, including observer delivery; forced
4101
4132
  shutdown may therefore lose notifications and reports the unfinished phase.
4102
4133
 
4103
4134
  §crash-only-stop The settle sequence is deadline-bounded
4104
- (`PLURNK_SERVICE_STOP_TIMEOUT_MS`, default 30000): past the deadline each wait
4135
+ (`PLURNK_SERVICE_STOP_TIMEOUT_MS`): one absolute deadline spans daemon drains
4136
+ and the enclosing observability, database, and HTTP-listener cleanup. No phase
4137
+ renews the budget. The service joins core's bounded producer/observer drain
4138
+ before releasing enclosing resources, including on timeout. Past the deadline each wait
4105
4139
  is abandoned with a named error instead of hanging the daemon on a child that
4106
4140
  never closes. A wedged child costs a forced shutdown; it must never cost an
4107
- unbounded one. When the teardown settles, success or failure, the process ends
4141
+ unbounded one. Later cleanup phases are still attempted. When the teardown settles, success or failure, the process ends
4108
4142
  itself: `0` after a clean teardown, `1` after a reported one. A handle an abandoned
4109
4143
  wait left alive never keeps a stopped daemon running; the supervisor's kill is a
4110
4144
  backstop, not the exit.
@@ -4162,8 +4196,13 @@ transfer, or remove ownership of workspace tools or shared resources.
4162
4196
 
4163
4197
  §module-workspace-quiescence **A Functionality snapshot changes between
4164
4198
  workspace operations.** Mutation admission, external installation/removal,
4165
- preparation, and publication hold the same exclusive gate. Explicit client
4166
- mutations use `try` and fail 409 before effects while the workspace is held.
4199
+ preparation, and publication hold the same exclusive gate. Every mutation or
4200
+ background refresh acquires that gate before the family's serialization lane;
4201
+ turn-admission refresh uses its already-held gate. A queued background refresh
4202
+ cannot own the family lane while waiting for a turn that needs that lane.
4203
+ Settling the coordinator includes accepted refreshes waiting for that gate,
4204
+ not only work already inside a family lane.
4205
+ Explicit client mutations use `try` and fail 409 before effects while the workspace is held.
4167
4206
  Refused mutations reserve no queue position; a client retry is a new admission.
4168
4207
  An accepted model mutation uses `wait`, proceeding after its originating turn. Activation and turn-admission refresh use `none` inside
4169
4208
  their already-held demand boundary. Providers reject replacement while active
@@ -4518,7 +4557,9 @@ execution stream.** Preparation and publication share the family's serialized
4518
4557
  lane. Publication acquires workspace exclusivity after current turns release
4519
4558
  their leases; the invoking stream remains pending until publication completes.
4520
4559
  It then reports `active`, `unavailable`, or `authorization-required`, or the exact
4521
- publication failure. A preparation failure may publish enabled-but-unavailable
4560
+ publication failure. Resource readiness is not execution liveness: a mutation's
4561
+ `202 authorization-required` body remains exact, while the finished manager
4562
+ execution closes with `200`. It does not wait for sign-in. A preparation failure may publish enabled-but-unavailable
4522
4563
  state; a publication failure never reports a successful mutation. Stream polling,
4523
4564
  waiting, and result observation use the ordinary execution lifecycle, without a
4524
4565
  separate deferred-commit queue. An explicit client action publishes now, rejects
@@ -4857,7 +4898,7 @@ without an origin filter ({§actor-boundary-isolation}).
4857
4898
 
4858
4899
  `PacketBuilder.buildRequestPacket` owns the engine's default ordered section
4859
4900
  list. Trusted scheme plugins may transform that first-class list before it is
4860
- rendered or measured; {§context-output-admission} remains an engine-owned post-build rail.
4901
+ rendered or measured; {§context-fit} remains an engine-owned post-build rail.
4861
4902
 
4862
4903
  ```mermaid
4863
4904
  flowchart LR
@@ -4934,82 +4975,46 @@ trust gate; an external client action cannot invoke it. Whole-list transformatio
4934
4975
  the fork-avoidance valve for alternate packet shapes, while
4935
4976
  overflow recovery and packet projection remain closed engine concerns.
4936
4977
 
4937
- ### §tokenomics Tokenomics: four facts, one curation ruler
4978
+ ### §tokenomics The context budget: one room, one gauge, one rule
4938
4979
 
4939
4980
  Token accounting distinguishes the artifact being measured, the unit, and the
4940
4981
  time of measurement.
4941
4982
 
4942
4983
  | Fact | Owner and unit | Time | Contract |
4943
4984
  |:-----|:---------------|:-----|:---------|
4944
- | Core curation weight | `contentWeight = ceil(chars/2)` over channel content, canonical log bodies, rendered packet slots, and placed emissions | Write/build | Stable, model-independent pressure and curation savings; never a tokenizer claim. |
4945
- | §tokenomics-context-envelope-admission Provider input capacity | Provider model limits and configured output reservation, in provider tokens | Before every logical request | `min(maxInputTokens, contextWindow - outputBudget)` over the known terms. The provider alone measures the complete request and admits, defers, or rejects it. |
4985
+ | Core curation weight | `contentWeight = ceil(chars/2)` over channel content, canonical log bodies, rendered packet slots, and placed emissions | Write/build | Stable, model-independent measure; never a tokenizer claim. The model meets it as `tokens`. |
4986
+ | §tokenomics-context-envelope-admission Provider input capacity | Provider model limits, the configured output reservation and the output floor, in provider tokens | Before every logical request | The reservation `min(maxInputTokens, contextWindow − outputBudget)` sizes the room; the wall `min(maxInputTokens, contextWindow − outputFloor)` decides admission ({§provider-capacity-admission}). The provider alone measures the complete request and admits it — with the grant flexed when the prompt is over the reservation — defers it, or rejects it at the wall. |
4946
4987
  | Provider generation envelope | Provider response grant and optional reasoning subset, in provider tokens | Before every logical request | The reservation includes hidden reasoning; its strict reasoning subset is never additive. The response grant follows {§provider-flexed-allowance}. |
4947
4988
  | Provider usage and cost | Provider-reported input/output/cache/reasoning tokens and monetary evidence | After every physical request | Durable physical-request forensics under {§provider-usage}; never curation state or a preflight estimate. |
4948
4989
 
4990
+ - §context-budget **One room.** The budget is the provider's input capacity converted to curation weight under {§tokenomics-calibrated-readout}, and it bounds the whole packet — teaching, catalog, log and gauge together. Nothing on the service panel sizes a part of it: no projection share, no preview page, no pressure threshold. Within a loop the room never shrinks: a packet's budget is the greater of the calibrated capacity and the loop's high-water budget for that input capacity, so a refined conversion can enlarge the room but never turns a packet the model already answered into an overflow.
4991
+ - §context-gauge **One gauge.** Every packet carries one `## Context` section holding one JSON object: `tokens`, the packet's weight as rendered; `budget`, the room; and `largest`, the `PLURNK_SERVICE_BUDGET_LARGEST_ITEMS` heaviest retained log rows as `{path, tokens}` ranked by weight then path. Each log row heading carries its own `tokens`. The gauge is state: it never presents `budget − tokens` as response allowance, it carries no mandate, and it reads the same at one percent as at ninety-nine; over budget, `largest` is as complete as under it, since those rows are the handles the row asks the model to use ({§context-over-budget-row}).
4992
+ - §context-fit **One rule: whole if it fits, otherwise as much as fits, then its size and address.** A result the model asked for — a READ without a scope, a FIND, an exec result delivered on close — arrives complete when its weight fits within `budget − tokens` as of that turn, less the room the turn still owes — one receipt's measured weight for each result still to land in it and the head of the emission that answers it, so that the receipts of a batch and the answer always fit. Otherwise the complete result stays where it was read from and the row is a `413` receipt naming the result's size, its weight, the remaining budget, and the two verbs: `READ` a range, or `KILL` first. A READ of lines carries, above its receipt, the longest prefix of those lines whose row fits that room — the lines with their anchors, the returned range closed on the last line delivered, and the receipt naming the lines delivered; a result whose first line does not fit, a FIND, a stream page and a byte view are bodiless receipts. An arrival the model did not ask for — an inbound `SEND`, a child's conclusion — takes the same bodiless receipt as a fact, not an error: its size and its address. Explicit scopes (`<a,b>`, a pattern, `<1,-1>`) are exact and take the same test. Three cuts are automatic and each is named where it happens: the first page of what came back unasked in size ({§markerless-first-page}), the cut at the room in the receipt, and an emission row's head ({§emission-row}); nothing else is previewed, projected, withheld or paged on the model's behalf.
4993
+ - §context-verbs **The verbs are the curation.** `READ` with a range takes a piece of what did not fit ({§read-selection-projection}); `NOTE` keeps what the model learned; `KILL` retires rows, ranges and bodies ({§log-kill-scope}) and may carry what it keeps of them as its own NOTE ({§log-kill-distillation}). The daemon adds no other mechanism.
4994
+ - §context-over-budget-row **Over budget is a row and a request, not an ending.** A packet whose weight exceeds `budget` is still submitted when it fits the window ({§context-wall}), and it carries one `_plurnk` error row at the head of its turn, `engine/context/packet-exceeds-budget` 413: "Context exceeds budget. YOU MUST ONLY KILL, MOVE or NOTE this turn." The row is the mandate and carries no figure: the gauge is the one home for `tokens` and `budget` ({§context-gauge}), and it shows the packet over with the row in it. The row recurs on every packet that is over, and nothing is hidden to make the packet smaller; the response grant is the window's remainder above the provider's output floor ({§provider-output-floor}). The limit protects a loop; it never ends one.
4995
+ - §context-wall **Only the window ends a loop.** The wall is the provider's physical input limit: `maxInputTokens`, and the context window less the output floor ({§provider-output-floor}); the packet's tokens are its weight through the calibration factor ({§tokenomics-calibrated-readout}), so an uncalibrated ruler only overestimates. A packet over the wall first lands its newest rows bodiless ({§context-own-rows-fit}); a packet that cannot fit the wall even as receipts terminalizes with the exact `engine/context/window-overflow` 413 Problem without provider I/O. An unknown window has no wall ({§tokenomics-window-unpollable-deliberate}).
4996
+ - §context-own-rows-fit **The model's own rows take the same receipt.** When a packet would exceed the wall, its newest rows that still carry a body or a native part — NOTEs, receipts, delivered results, pictures — render bodiless in the fit rule's receipt shape, newest first and only as many as it takes for the packet to fit: the heading, the facts, and `size`, the lines and tokens of what the row stood for. An emission row is never taken, so its head-cut program keeps the turn legible, and a row whose receipt would weigh no less than its body stays whole. Every body stays stored and readable at its address, the verbs restore the room ({§context-verbs}), and each packet decides afresh from its own newest rows. The daemon chooses nothing to summarize and hides nothing silently.
4997
+ - §context-output-selection **Retired, column kept.** Migration 6's `output_admission_turn_id` recorded first-presentation admission under the former withholding rule; the rule is gone and the column stays in the schema unread, as released migrations are frozen ({§db-migrations}).
4949
4998
  - §tokenomics-weight-stored-at-write **Curation weight, stored at write.** `entry_channels.weight` weighs the complete channel content. `log_entries.weight` weighs the complete canonical `LogBody` content before coordinate and packet presentation; persistence `tx`/`rx` envelopes contribute nothing merely by existing, and proposal settlement recomputes the value when the canonical result changes. Bodyless rows therefore weigh zero. The stored number is a stable content-depth measurement, not a provider-token prediction. `entry_channels.lines` is the channel's line count beside it, a stored generated column SQLite keeps on every write as the persisted mirror of {§logical-line-count} (a trailing newline terminates the last line; empty content has none), so a catalog lists extent without reading bodies.
4950
- - §tokenomics-render-weight-budget **Packet curation budget.** `logTokensTotal` measures the *complete assembled packet* after section transforms and readout substitution, its rendered slots and the emissions it places ({§emission-row}); it is not a sum of log-row `logTokens` fields. Core measures minimum-width probes, monotonically expands fields that do not fit, then right-aligns final values into those widths; final substitution is length-invariant and the displayed total equals the stored request weight. Receipt, FIND-item, pressure-inventory, total, and ceiling figures all use the same curation ruler. A `SUM` of stored content weights measures a different artifact and cannot substitute for packet render weight.
4951
- - §tokenomics-calibrated-readout **Convert capacity, never content costs.** Before packet assembly, Core obtains the answering model's last five settled emission responses pairing a measured packet weight with a provider-reported prompt count. The conversion factor is `sum(reported) / sum(weight)`; fewer than three samples use 1. `logTokensMax = floor(inputCapacity / factor)` converts provider capacity into curation units. Zero means no whole curation unit fits; unknown input capacity remains `null`. The built packet captures this allowance once for its readout, pressure inventory, overflow admission, and persisted client gauge. Later responses cannot change that packet's allowance. Samples are model-keyed, not worker-local; a model with no samples starts at 1. Calibration never changes stored weights, rendered receipt costs, or the immutable request history ({§tokenomics-agnostic-ruler}).
4999
+ - §tokenomics-render-weight-budget **Packet curation budget.** `tokens` measures the *complete assembled packet* after section transforms and readout substitution, its rendered slots and the emissions it places ({§emission-row}); it is not a sum of stored row weights ({§tokenomics-weight-stored-at-write}). Core measures minimum-width probes, monotonically expands fields that do not fit, then right-aligns final values into those widths; final substitution is length-invariant and the displayed total equals the stored request weight. Receipt, FIND-item, pressure-inventory, total, and ceiling figures all use the same curation ruler. A `SUM` of stored content weights measures a different artifact and cannot substitute for packet render weight.
5000
+ - §tokenomics-calibrated-readout **Convert capacity, never content costs.** Before packet assembly, Core obtains the answering model's last five settled emission responses pairing a measured packet weight with a provider-reported prompt count. The conversion factor is `sum(reported) / sum(weight)`; fewer than three samples use 1. `floor(inputCapacity / factor)` converts provider capacity into curation units; a loop's budget is that figure or its high-water for the same capacity, whichever is greater ({§context-budget}). Zero means no whole curation unit fits; unknown input capacity remains `null`. The built packet captures this allowance once for its readout, pressure inventory, overflow admission, and persisted client gauge. Later responses cannot change that packet's allowance. Samples are model-keyed, not worker-local; a model with no samples starts at 1. Calibration never changes stored weights, rendered receipt costs, or the immutable request history ({§tokenomics-agnostic-ruler}).
4952
5001
  - §tokenomics-window-partition **One capacity derivation; no service-side token budget.** The provider owns model limits, the configured output reservation, and each call's response grant. Its resolved `inputCapacity` supplies the physical denominator exposed to clients and the boundary conversion into curation units ({§tokenomics-calibrated-readout}). Core shapes context in curation units; provider request-shaped evidence alone admits or rejects physical I/O. `PLURNK_SERVICE_PROMPT_BUDGET`, `PLURNK_SERVICE_SAFETY`, and the additive reasoning/completion reserve knobs are retired; local and custom deployments tune context window, total output budget, optional reasoning subset, and prompt-projection percentage at their owning layers.
4953
- - §tokenomics-prompt-projection-share **Prompt projection is stable packet policy.**
4954
- `PLURNK_SERVICE_PROMPT_PROJECTION` is a required alias-scoped percentage in
4955
- `(0, 100)`. It allocates that share of the cold-start curation allowance
4956
- (the capacity conversion with factor 1) to the aggregate automatic prompt-body
4957
- projection. Rolling calibration does not resize existing prompt bodies; only
4958
- the overall curation ceiling adapts. This does not bound stored prompt
4959
- size, provider capacity, an explicit READ/FIND result, or the complete packet.
4960
- Basing the share on configured capacity rather than current free weight or
4961
- sampled conversion keeps one prompt's projection byte-stable as the log and
4962
- calibration samples evolve.
4963
- - §tokenomics-window-unpollable-deliberate **Unknown provider capacity stays unknown.** When the provider cannot derive `inputCapacity`, Core omits denominator-dependent curation telemetry and uses the ordinary bounded prompt projection. The provider still sends requests whose measurement or limits are estimates or unavailable: ambiguity defers to the upstream capacity oracle rather than becoming a local rejection.
5002
+ - §tokenomics-window-unpollable-deliberate **Unknown provider capacity stays unknown.** When the provider cannot derive `inputCapacity`, there is no budget: the gauge carries `tokens` alone, every result arrives whole, and the provider remains the capacity oracle ({§provider-capacity-admission}). Core never invents a stand-in.
4964
5003
 
4965
5004
  §tokenomics-client-gauge **Clients receive curation and physical occupancy as separate pairs.** `loop/terminated.usage` carries latest packet-bearing model-turn `curationWeight`/`curationBudget` and latest-emission-call `contextTokens`/`contextCapacity`; each unknown fact is `null`. The curation pair is the packet's measured weight and captured allowance, exactly as displayed to the model, not a recalculation using newer usage evidence. Packetless chronology cannot erase an assembled-request gauge. Both physical facts bind to that same call: a preflight rejection may report capacity while its absent physical request leaves `contextTokens=null`, never borrowed from an earlier call. Clients never divide provider-reported physical tokens by Core curation weight. `providers.list` exposes each instantiated alias's `inputCapacity`. A model switch replaces the latest-turn facts together; aggregate provider accounting remains cardinal monetary evidence, not a gauge input.
4966
5005
 
4967
5006
  - **Derivation is exhaustive and demand-led.** Explicit searchable-resource changes may start one coalesced warm. Passive creation and attachment do not. The first model turn starts or joins that warm; later turns derive intervening changes before dispatch. No model operation observes partial graph or full-text coverage. Progress notices make the wait visible. {§derivation-exhaustive}
4968
5007
  - §membership-binary-sniff **Binary truth beats a text label.** Filesystem source acquisition, including tracked members and installed skill resources, inspects up to the first 8192 bytes when extension detection does not identify a binary type. NUL marks `application/octet-stream`; existing binary types retain their declared type. Member projections follow {§membership-source-projection}; installed skill projections follow {§skills-resources}.
4969
5008
  - §tokenomics-agnostic-ruler **One model-agnostic curation ruler.** The daemon runs workers on different models in one workspace concurrently, while catalog and log accounting are workspace-wide. `contentWeight = ceil(chars/2)` therefore gives one content one stable number without per-model workspace state or recount passes. It controls curation only; every provider call independently measures the complete request as well as it can.
4970
- - §tokenomics-neutral-telemetry **Curation telemetry is state, not response allowance.** The model-facing `Context Curation` section is one JSON object carrying `logTokensTotal` and `logTokensMax`. It never presents their difference as free response tokens. The protocol definition directly requires KILL of irrelevant log items and ranges to keep the next packet within the maximum. Per-entry weights remain on log rows where they describe visible cost and curation savings. Generic packet composition and physical-token speculation are absent.
4971
- - §tokenomics-pressure-inventory **Pressure identifies its reclaimable concentration.** At `PLURNK_SERVICE_BUDGET_PRESSURE` of `logTokensMax`, a Markdown `> [!WARNING]` block follows the JSON with `> YOU MUST KILL superseded, stale, or irrelevant log items and ranges.` New output withholding replaces that mandate under {§context-output-warning}. The JSON may include `logTokensLargest`: at most `PLURNK_SERVICE_BUDGET_LARGEST_ITEMS` retained log items, each `{path, logTokens}`, ranked by that charge descending and then path. Native-only, suppressed, and metadata-only items remain eligible: whole-item KILL can reclaim their actual contribution. Include the largest prefix that fits; drop the optional list before the warning. Both participate in the final fixed-point total and complete request admission check.
4972
5009
  - §tokenomics-content-hash-identity **Content identity, not per-tokenizer counts.** A settled channel's `content_hash` (SHA-256) is its body's identity in the content store ({§content-store}); a writer may bind it, a bound hash must match the content, and an active stream has none until it settles. `weight` is stored beside that content and is never keyed or recomputed by model.
4973
- - §tokenomics-provider-usage **Provider accounting is physical-request evidence, not curation state.** Every issued physical request has one durable pre-I/O `provider_requests` identity beneath the normalized {§inference-ledger} and settles once as response or error. Each record preserves conventional {§provider-usage} quantities and required {§provider-cost} evidence; an unreported quantity remains absent, including on response-less failures, and is never replaced by zero. `model_calls` own response/failure evidence, `turn_attempts` specialize emission admission, and `provider_requests` are the sole durable accounting representation. Emissions, BARE calls, rejected responses, retries, failovers, and errors therefore remain cardinal and ordered. Turn, loop, worker, workspace, digest, and protocol accounting are derived from those records through the shared {§provider-accounting} projection; only emission calls contribute the latest-packet context gauge. The baseline stores no floating-point money, denormalized totals, or rollup triggers. A documented direct charge becomes `charged`; otherwise the provider may compute an exact-decimal USD `estimated` amount from complete usage and the exact model's Models.dev rates; insufficient evidence becomes `unknown`. Derived `costUsd` sums every USD-expressible request and is `null` only when no request is expressible; a response-less failure or an uncataloged model is skipped, never allowed to erase the expressible evidence. Each derived aggregate usage field independently sums its reported quantity, so heterogeneous detail coverage remains partial rather than becoming fictitiously complete. This is operational request accounting, not invoice reconciliation. Output and reasoning are quantities the model cannot KILL, so they never alter the model-facing Budget ledger.
4974
- - §tokenomics-negative-pressure **Negative curation pressure is honest but never submitted.** The provisional readout may report `logTokensTotal` above `logTokensMax`. Crossing the maximum withholds new returned output under {§context-output-admission}; no over-ceiling packet reaches `provider.generate`. Output admission creates neither a strike nor another turn.
5010
+ - §tokenomics-provider-usage **Provider accounting is physical-request evidence, not curation state.** Every issued physical request has one durable pre-I/O `provider_requests` identity beneath the normalized {§inference-ledger} and settles once as response or error. Each record preserves conventional {§provider-usage} quantities and required {§provider-cost} evidence; an unreported quantity remains absent, including on response-less failures, and is never replaced by zero. `model_calls` own response/failure evidence, `turn_attempts` specialize emission admission, and `provider_requests` are the sole durable accounting representation. Emissions, BARE calls, rejected responses, retries, failovers, and errors therefore remain cardinal and ordered. Turn, loop, worker, workspace, digest, and protocol accounting are derived from those records through the shared {§provider-accounting} projection; only emission calls contribute the latest-packet context gauge. The baseline stores no floating-point money, denormalized totals, or rollup triggers. A documented direct charge becomes `charged`; otherwise the provider may compute an exact-decimal USD `estimated` amount from complete usage and the exact model's Models.dev rates; insufficient evidence becomes `unknown`. Complete totals and known subtotals remain distinct under {§provider-accounting}; unknown requests cannot impersonate free requests, and missing usage never becomes zero. This is operational request accounting, not invoice reconciliation. Output and reasoning are quantities the model cannot KILL, so they never alter the model-facing Budget ledger.
4975
5011
 
4976
- ### §context-output-admission Budget enforcement: returned-output admission
4977
-
4978
- Operations and their results are execution history. Packet admission controls
4979
- only whether newly presented returned output fits, never what executed or what
4980
- the model's lifecycle declaration means.
4981
-
4982
- ```mermaid
4983
- flowchart TD
4984
- assemble["Assemble and measure<br/>candidate request"] --> budget{"Weight ≤ curation ceiling?"}
4985
- budget -->|yes| generate["Provider generate"]
4986
- budget -->|no| withhold["Withhold new returned output<br/>retain receipts and add overflow metadata"]
4987
- withhold --> verify{"Request with warning fits?"}
4988
- verify -->|yes| generate
4989
- verify -->|no| stop["Terminal 413"]
4990
- generate --> capacity{"Provider capacity failure?"}
4991
- capacity -->|no| response["Classify completed response"]
4992
- capacity -->|yes| prompt{"Withholding automatic<br/>prompt bodies changes request?"}
4993
- prompt -->|yes| retry["Persist failure;<br/>rebuild and retry"]
4994
- retry --> generate
4995
- prompt -->|no| stop
4996
- ```
4997
-
4998
- §context-output-selection **First presentation, not a turn-number heuristic, owns admission.** Canonical log-body resolution distinguishes authored input from returned output. Before provider I/O, the run boundary records the first admission turn of each newly visible returned body. On measured overflow, that batch's returned bodies and native parts are withheld together. Already-admitted output, authored NOTE/lifecycle/program/message bodies, actual statuses and Problems, effects, child state, and immutable evidence remain unchanged. Bodyless and initially suppressed rows require no admission. Packet assembly is pure. No recovery turn, generated lifecycle declaration, KILL operation, strike, or extra model attempt is manufactured.
4999
-
5000
- | Projection fact | Meaning |
5001
- |---|---|
5002
- | No output admission | Not yet presented as returned output; eligible on its first visible request. |
5003
- | Admitted | Normal projection, thereafter controlled only by deliberate curation and existing delivery rules. |
5004
- | Withheld | Body/native parts stay absent in the original receipt; freeing space does not silently restore them. |
5005
-
5006
- §context-output-receipt A withheld receipt adds `overflow: "N output lines not shown; the log exceeded logTokensMax when this row was withheld"`, counting the output lines its normal current projection would show, not unrelated source lines. Withheld native media is named as `"N output lines and native content not shown; ..."` or, without a text body, `"native content not shown; ..."`. Its original result status and Problem are unchanged. FORK inherits admission state with the copied log. Explicit KILL still controls readable/active content independently.
5007
-
5008
- §context-output-warning **New omission escalates the one curation warning.** The admitting request renders `> [!WARNING]` followed by `> YOU MUST ONLY KILL superseded, stale, or irrelevant log content in bulk.` beneath its JSON readout, replacing the ordinary pressure mandate even when withholding brings usage below 80%. Historical omission alone does not retrigger it. The warning participates in exact packet measurement; optional largest-items entries yield space first.
5009
-
5010
- §context-output-hard-413 **Unfittable retained context fails honestly.** If the request still exceeds the ceiling after withholding newly presented output, it terminalizes with an exact `engine/context/token-budget-overflow` 413 Problem without provider I/O. No unrelated older history or authored memory is pruned. Separately, provider capacity failures follow {§provider-surface-capacity}: withholding automatic prompt-body projection permits a retry only when it changes the request; otherwise the exact provider-owned 413 terminates the request-only model turn.
5011
-
5012
- - §tokenomics-fetch-fits-free **Withholding is not deletion.** The complete result lands once. READ/FIND of its original log address retain the readable body and original coordinates; scoped READ creates a fresh output occurrence subject to the same admission rule. Source resources and forensic evidence remain unchanged. Deliberate scoped KILL, unlike withholding, removes lines from subsequent readable projections ({§log-readable-projection}).
5012
+ Each physical request also retains {§provider-request-evidence}, atomically
5013
+ with its accounting settlement. Failure does not discard received fragments.
5014
+ The digest emits one linked `requests/<id>.json` artifact per physical request,
5015
+ including unavailable evidence as `null`, reading heavy records one at a time.
5016
+ Failed partial operations and reasoning remain forensic data only; they never
5017
+ execute, enter model history, or become a later request's successful output.
5013
5018
 
5014
5019
  - §loop-terminals **Lifecycle outcomes are HTTP-precise.**
5015
5020
 
@@ -5020,7 +5025,7 @@ flowchart TD
5020
5025
  | 200 | Messages answered, results observed, held work settled |
5021
5026
  | 499 | Worker-scope or client cancellation |
5022
5027
  | 429 | Turn allowance exhausted |
5023
- | 413 | Token-ceiling recovery failure or provider input-capacity failure after changed-request recovery |
5028
+ | 413 | A result that does not fit ({§context-fit}), a packet over the budget ({§context-over-budget-row}: a row; the request still goes), a packet over the window ({§context-wall}), or the provider's own rejection of an exact prompt over its wall |
5024
5029
  | 500 / 508 | Strike threshold or invalid-emission exhaustion / crossing strike caused by a cycle |
5025
5030
  | 504 | Loop timeout or exec-timeout restamp |
5026
5031
 
@@ -5138,7 +5143,7 @@ their boundaries ({§log-wire-format}).
5138
5143
  | `errors` | user | JSON status/log-path pointers | {§operation-results} |
5139
5144
  | `notices` | user | Terse observation bullets | {§notice-drain-on-read} |
5140
5145
  | `git` | user | Working-tree state in a NOTE blockquote | {§packet-cache-monotone} |
5141
- | `budget` | user | JSON curation usage and ceiling; pressure guidance when needed | {§tokenomics-neutral-telemetry} |
5146
+ | `budget` | user | JSON curation usage and ceiling; pressure guidance when needed | {§context-gauge} |
5142
5147
  | `messages` | user | JSON pointers to the loop's unanswered immutable messages, path and source | {§message-arrival} |
5143
5148
  | `recap` | user | Optional authored operational recap | {§recap} |
5144
5149
 
@@ -5251,25 +5256,18 @@ Retired terms stay retired: the lexicon guard rejects `thinking`, the unqualifie
5251
5256
 
5252
5257
  | row producer | ordinary visible projection |
5253
5258
  |---|---|
5254
- | any `READ` or `FIND` | complete selected operation result |
5259
+ | any `READ` or `FIND` | the result as its own page ({§markerless-first-page}), complete when it fit; otherwise the `413` receipt, above the longest prefix of a READ's lines that fit ({§context-fit}) |
5255
5260
  | `NOTE`, `WAIT` | complete literal authored text |
5256
- | inbound `SEND` from outside the workspace | budgeted head under {§message-projection} |
5261
+ | inbound `SEND` from outside the workspace | the operator's: complete when it fit, otherwise its size and address ({§context-fit}, {§message-projection}); a peer worker's: its first page ({§markerless-first-page}) |
5257
5262
  | structured `EDIT` receipt or textual `COPY`/`MOVE` effects | complete receipt-owned join context |
5258
- | every other nonempty body | head bounded independently by `PLURNK_SERVICE_PREVIEW_LINES` and `PLURNK_SERVICE_PREVIEW_CHARS` |
5259
- | bodyless row | heading and any facts; no coordinate lines; `logTokens` includes any selected native part |
5263
+ | every other nonempty body | the model's own: complete; what it did not author: its first page ({§markerless-first-page}); then {§context-fit} |
5264
+ | the `reasoning` row | the model's own reasoning, complete, or no row at all ({§reasoning-row}) |
5265
+ | a row the wall took | its size and address, no body and no native part ({§context-own-rows-fit}) |
5266
+ | bodyless row | heading and any facts; no coordinate lines; `tokens` includes any selected native part |
5260
5267
 
5261
- §markerless-first-page **Every markerless retrieval takes the same implicit marker.** A marker's
5262
- unit is whatever its projection counts, so `PLURNK_SERVICE_PREVIEW_LINES` is the first page of
5263
- all of them: lines of text, bytes of a byte view ({§read-bytes}), positions of a FIND. It is one
5264
- choice with one home; no operation carries a page size of its own.
5268
+ §markerless-first-page **What the model did not ask for in size arrives as its first page.** A READ or FIND without a scope, a stream delivered when a command closes, a peer worker's message, an environment delta, an extension's body and a rejected emission shown back all arrive as their first page: `PLURNK_SERVICE_PREVIEW_LINES` lines and at most `PLURNK_SERVICE_PREVIEW_CHARS` characters, in the projection's own units — lines of text, bytes of a byte view ({§read-bytes}), results of a FIND — with one fact in one notation stating the page and the whole, `<1,100> of 4812 lines` (`range` on a retrieval, `preview` on a stored body, {§packet-extent-metadata}). What the model authored stands whole: a NOTE, a WAIT, the body of its SEND, the prompt of its WORK or FORK, the command it handed an executor, and its own reasoning when it lands as a row ({§reasoning-row}). What it asked for exactly stands whole: an explicit scope — `<a,b>`, `<1,-1>`, a pattern — and an EDIT receipt, bounded by its own rule ({§edit-result-receipt-truth}). The operator's message keeps its own rule ({§message-projection}) and an emission row its head ({§emission-row}); those are the only exceptions, so the model can reason about every page the same way. A page lands under {§context-fit} like any result: whole when it fits the remaining budget, otherwise the prefix and receipt. Retrievals take their page at the source, before storage, and the packet applies no second cut to a stored result; a stored body takes its page in the packet, and the rest stays readable at the row's address. No operation carries a page size of its own.
5265
5269
 
5266
- Markerless text READs select their page with the same line/character bound as
5267
- ordinary previews, before result storage and packet rendering. Explicit scopes
5268
- remain exact. Automatic stream delivery uses that markerless selector too;
5269
- its range or region describes the selected content and the complete stream
5270
- remains addressable. This selection is not a second rendering-time cut.
5271
-
5272
- READ and FIND own their range or pagination before packet rendering; the packet never applies a second hidden substring bound to their selected result. NOTE and lifecycle bodies are complete literal text while visible, never preview-clipped. Reasoning arrives through ordinary scoped READs ({§reasoning-history}). Arrivals from outside the workspace follow their separate adaptive projection contract ({§message-projection}). Structured mutation contexts already carry the receipt-owned bound in {§edit-result-receipt-truth}, so packet rendering does not preview them again. Rejected-emission artifacts, SEND/WORK/FORK bodies, execution commands, environment-delta EDIT spans, and extension-produced bodies use the ordinary fixed bound. When a visible projection differs from its canonical body, metadata carries `preview` under {§packet-extent-metadata}; complete and fully suppressed bodies omit it. ```` ```READ (log:///<coordinate>/<OP>) ```` selects untrimmed lines in original coordinates under {§log-readable-projection}; the unsuffixed exact shorthand and authoritative suffix behavior are defined by {§log-coordinate-hierarchy}. ```` ```FIND (log:///...) ```` and search match that same readable view. System/policy sections are not log bodies. Notices are transient non-log observations; they share the ordinary line/character bounds but have no durable body or recovery URI.
5270
+ READ and FIND own their range or pagination before packet rendering; the packet never applies a second hidden substring bound to their selected result. Reasoning arrives through ordinary scoped READs ({§reasoning-history}). When a visible projection differs from its canonical body, metadata carries `preview` under {§packet-extent-metadata}; complete and fully suppressed bodies omit it. ```` ```READ (log:///<coordinate>/<OP>) ```` selects untrimmed lines in original coordinates under {§log-readable-projection}; the unsuffixed exact shorthand and authoritative suffix behavior are defined by {§log-coordinate-hierarchy}. ```` ```FIND (log:///...) ```` and search match that same readable view. System/policy sections are not log bodies. Notices are transient non-log observations; they share the ordinary line/character bounds but have no durable body or recovery URI.
5273
5271
 
5274
5272
  §message-arrival **A message source, its log observations and its reply state are distinct.**
5275
5273
 
@@ -5320,7 +5318,7 @@ additional alias. Answering either reaches the same message.
5320
5318
 
5321
5319
  §message-causal-source **Message authorship and delivery are distinct facts.** The harness publishes every arrival row; the row's `source` carries the canonical address of the causal actor. Native WORK, FORK, and directed worker SEND derive `worker://<sender>` from the authenticated sender worker ID. A trusted exterior adapter supplies its own canonical actor address through {§methods-loop-run}: the AG-UI bridge names the client's message under `agui://` ({§agui-run-source}), the inbound A2A adapter under `a2a://`. An absent source is the operator. Attribution persists with the message through the inbox, parking, orphan recovery, restart, and later log projection; model syntax cannot author it. The wire renders the row's `source` in place of its `origin`, which is constant for every arrival, except where the source is the transport that minted this very message, which says nothing the address does not ({§message-short-identity}). The operator's message is then the one arrival with no sender to show, so it renders `"origin": "user"`; a bare arrival would read as the model's own SEND and hide the request it answers. The Open Messages pointer carries the same attribution ({§message-arrival}).
5322
5320
 
5323
- §message-projection **Message storage is unbounded by model context; automatic materialization is not.** Core persists every accepted message completely before packet assembly. The selected provider's derived `inputCapacity` and the alias-resolved percentage from `PLURNK_SERVICE_PROMPT_PROJECTION` derive one aggregate curation-weight allowance for the visible bodies of arrivals other than a peer worker's — every `source` that is not a `worker://` address, the loop's own assignment included. Complete bodies render when their aggregate weight fits. Otherwise all such visible rows share the allowance: full bodies consume only their required share, unused shares are redistributed, and partial bodies render the largest leading complete-line region that fits their share or an exact character-bound prefix when the first physical line alone is larger. The sum of their rendered body weights never exceeds the allowance. Every partial body carries `preview` under {§packet-extent-metadata}. The row remains complete and READable by coordinate; its `log:///` body additionally obeys deliberate curation under {§log-readable-projection}. A peer worker's message takes the ordinary bounds. When provider input capacity is unknown the percentage is underivable, so arrival rows retain the ordinary bounded projection rather than inventing capacity. This policy never rejects, summarizes, or discards a message because it exceeds a context window.
5321
+ §message-projection **Message storage is unbounded by model context; its arrival in the packet is not.** Core persists every accepted message completely before packet assembly. An arrival renders complete when it fits the remaining budget ({§context-fit}) and otherwise as its size and address, where a READ of the message's log body, scoped or whole, retrieves it. A peer worker's message is received text and arrives as its first page ({§markerless-first-page}). No share of the capacity is set aside for arrivals, and no knob sizes one.
5324
5322
 
5325
5323
  §message-loop-containment A loop contains every message that arrives before it
5326
5324
  concludes; the next turn boundary publishes every inbox row the loop has not yet
@@ -5358,8 +5356,8 @@ retain distinct contracts and lifetimes.
5358
5356
  `errors` section is a derived index over those rows from the current and
5359
5357
  immediately prior turn: one `{status, path}` JSON object per row,
5360
5358
  nothing else. The Problem lives on the curatable row and is READ via the path.
5361
- Withheld output preserves its original result ({§context-output-receipt});
5362
- an unfittable retained context fails before inference ({§context-output-hard-413}).
5359
+ Withheld output preserves its original result ({§context-fit});
5360
+ a packet past the window fails before inference ({§context-wall}).
5363
5361
  - §log-row-self-explains **Every ≥400 pointer names a record that states its
5364
5362
  why.** A model-operation failure is the model's own operation result; its
5365
5363
  Problem Details `instance` retains the originating occurrence URI; when absent,
@@ -5377,7 +5375,7 @@ retain distinct contracts and lifetimes.
5377
5375
  - **Self-explaining rows.** A problem `title` names the stable class and `detail` states the occurrence-specific cause. Producer-known operands belong in factual extensions. `stage` appears only when neighboring stages imply different recovery; `recovery` states one generally valid next action; `retryable` is true only when the producer recommends automatically retrying the identical request. Unknown recovery or retryability is omitted rather than guessed. General workflow teaching stays in the packet rather than being duplicated into every failure. The runtime-neutral writing contract is owned by `@plurnk/plurnk-contracts`.
5378
5376
  - **Exact Problems cross durable and external boundaries.** Scheme capabilities, proposal application, subscription conclusion, loop settlement, AG-UI, clients, digests, and benchmark records preserve the originating Problem object. The model packet alone derives `{§problem-projection}` without mutating that object. An adapter may add a missing durable `instance`, never replace an existing one; it must not rebuild failure truth from `status`, `detail`, `RUN_ERROR`, a scheduler projection, or a legacy string. A failed boundary without a valid Problem is a contract violation and fails hard.
5379
5377
  - **Caught diagnostics are bounded.** Core-owned Problems may include a bounded preview of a caught runtime diagnostic when it states the occurrence-specific cause. `PLURNK_SERVICE_ERROR_DETAIL_LIMIT` owns that model-facing character bound; complete errors remain in daemon diagnostics. Input validation and stable contract failures do not spend this allowance on implementation text.
5380
- - §notice-drain-on-read **Notices** - the few observations that are not log rows render one terse line under their distinct `## Notices` section, never a JSON dump. Packet rendering normalizes whitespace, bounds the producer message with the shared preview limits, and appends any typed position. The notice buffer drains on read; event Notices appear on at most one packet. Stateful derivation progress and provider availability coalesce in the buffer, so clients observe every checkpoint live while a later model packet receives only the current state under ordinary level filtering.
5378
+ - §notice-drain-on-read **Notices** - the few observations that are not log rows render one terse line under their distinct `## Notices` section, never a JSON dump. Packet rendering normalizes whitespace, bounds the producer message with the shared preview limits, and appends any typed position. The notice buffer drains on read; event Notices appear on at most one packet. Parking preserves pending notices for that loop's next packet; another loop cannot consume them. Terminal cleanup, including cancellation while parked, discards undelivered notices. This buffer is process-local, not restart-persistent. Stateful derivation progress and provider availability coalesce in the buffer, so clients observe every checkpoint live while a later model packet receives only the current state under ordinary level filtering.
5381
5379
  - §rail-accounting-private **Rail accounting is private.** Visibility is owned by {§engine-rails}: the model sees concrete failures from admitted turns, never rejected emissions, attempt counts, the strike streak, or cycle detection. Surfacing internal state creates a gamification surface where the model optimizes for engine metrics instead of the task.
5382
5380
 
5383
5381
  **The error rows (one channel) + the only non-log notices:**
@@ -5401,7 +5399,20 @@ retain distinct contracts and lifetimes.
5401
5399
 
5402
5400
  §notice-event-notify **Client surface.** Engine Notices broadcast live via the `notice/event` notification — `{ workerId, loopId, notice: { source, kind, level, message?, position?, …kind-specific } }` per the grammar's `Notice` schema — the moment they land. A loop Notice names its owning Worker; workspace derivation progress alone carries `workerId=null, loopId=0`. AG-UI projects the same observation as the custom `plurnk.notice` event. Failures do not broadcast on this surface: they are log rows, and the client reads them through `log.read` / the `log/entry` notification, the durable log.
5403
5401
 
5404
- §loop-status-notice **The drain beats the loop's lifecycle on the notice channel.** When the drain claims a loop to run it broadcasts `notice/event` `{ workerId, loopId, notice: { source: "engine:lifecycle", kind: "loop_status", level: "info", status: 102 } }`, and when it leaves a loop parked ({§loop-wake-identity}) the same with `status: 202`; a wake that the drain claims again is another `102`. The beat is transient: broadcast to the workspace like any notice ({§notice-event-notify}), never a log row, never in a packet. Terminals stay `loop/terminated`'s; a client that reads the beat has the running/parked edges a parked delegation otherwise never publishes.
5402
+ §loop-status-notice **The drain publishes lifecycle and its observation deadline together.**
5403
+ `notice/event` carries `{ workerId, loopId, notice: { source: "engine:lifecycle", kind: "loop_status", level: "info", status, waitUntil } }`.
5404
+
5405
+ | Edge | `status` | `waitUntil` |
5406
+ |---|---|---|
5407
+ | Claimed to run | 102 | `null` |
5408
+ | Parked | 202 | Persisted Unix-millisecond observation deadline, or `null` for an untimed park |
5409
+ | Woken, awaiting dispatch | 100 | `null` |
5410
+
5411
+ Park observations and wakes use the worker's existing drain serialization, so
5412
+ an earlier park cannot overwrite a later wake's cleared countdown.
5413
+ The beat is transient: broadcast to the workspace ({§notice-event-notify}), never
5414
+ a log row or packet. Terminals remain `loop/terminated`'s. Reattachment obtains
5415
+ the same deadline through {§application-loop-observation}, not a restarted clock.
5405
5416
 
5406
5417
  §share **A share is the database's record, ready to send.** `plurnk-service share [<file.db>] [<folder>]`, and `npm run share` from a checkout, take a consistent copy of the database (`VACUUM INTO`; a live database is never read in place), and write its digest into `<folder>`, an ordinary folder the user archives or attaches however they like. Without a database the service's own is shared. Nothing is overwritten: a folder that exists and is not empty is refused, and a caller reusing a place removes it first. The share is the user's bug report and our dogfood, benchmark and forensics artifact alike.
5407
5418
 
@@ -5448,7 +5459,7 @@ does not make the measured counters inconsistent.
5448
5459
 
5449
5460
  §digest-edit-census **Every model EDIT by the form it authored, how it landed, and whether it came back.** For each worker the digest reads every model-authored EDIT row and classifies the form from the row's stored marker and the durable statement's pattern: `hash` (one anchor), `line` (one line number), `range` (two marks), `insert` (the zero-width `<L,1,L,1>` form, {§zero-width-column-one-insert}), `column` (any other four-mark region), `prepend` / `append` (`<0>` / `<-1>`), `offset` (a tolerated anchor offset, {§anchor-offset}), `pattern` (a selection matcher), `whole` (no marker: a creation when it lands 201). It counts the EDITs, those refused (status ≥ 400), and the *revisits*: an EDIT of a path the same worker had edited within its previous two model turns — the shape of a repair without the claim of one. Each worker summary renders `EDITs: <n> · <form>=<count>… · refused=<k> · revisits=<r>` (`(no edits)` for none); `digest.json` carries the census as `edit_census` on every worker and stamps every EDIT log entry with its `edit_form` and `edit_revisit`. A form is a fact about what was written, never about intent; the bench sheet reads the counts as friction and leaves the judgement to the reader.
5450
5461
 
5451
- §digest-forensic-fidelity **Forensic fidelity and cardinality.** The digest's machine-readable JSON preserves every log event with its initial and current projection, causal `source`, and structured `attrs`; every exact log-KILL target effect; the exact Problem on every failed row; each loop's exact terminal result, settlement time, scheduled due time, recurring interval, and recurrence lineage; and every ordered physical provider request. Programs still produce chronological `assistant.md` artifacts after every READ receipt is KILLed; source is independent of log curation. Each worker summary's `Emissions:` line counts its announced emission rows, those the worker KILLed, and the headings it echoed ({§emission-row}); the op mix leaves the announcements out. Each stored packet validates independently: one malformed historical packet remains exact raw evidence with its complete validation error chain and never prevents healthy turns from being projected. Accounting on broader rows is the shared exact derivation from that ledger, never a second stored fact. A worker's Cost line names how many settled requests carry no usage at all (errored or aborted exchanges) — their server-side spend is unrecorded rather than silently priced as zero. The reasoning chronology distinguishes readable reasoning content from provider-reported reasoning usage: when tokens were reported but no readable content was returned, it states both facts instead of implying that no reasoning occurred. The human Markdown waterfall shows a present causal source and may preview only the Problem detail because it remains a triage projection, not the machine record. Targets reconstruct the model-visible address, including hostname, port, serialized query, and fragment; an authority-bearing URL must never degrade from `https://host/path` to `https:///path`, and durable resource coordinates render back to their authority form. Its human Markdown waterfall groups identical per-turn op outcomes and typed `entry_materialized` narrations, reporting the exact count and sequence span (`xN (seq A-B)`). Grouping keys include source and the complete target, so distinct causes, authorities, or channels never collapse. Thus amplification is conspicuous without making the diagnostic artifact itself pathological; valid packet files remain byte-identical records of what the model saw.
5462
+ §digest-forensic-fidelity **Forensic fidelity and cardinality.** The digest's machine-readable JSON preserves every log event with its initial and current projection, causal `source`, and structured `attrs`; every exact log-KILL target effect; the exact Problem on every failed row; each loop's exact terminal result, settlement time, scheduled due time, recurring interval, and recurrence lineage; and every ordered physical provider request. Programs still produce chronological `assistant.md` artifacts after every READ receipt is KILLed; source is independent of log curation. Each worker summary's `Emissions:` line counts its announced emission rows, those the worker KILLed, and the headings it echoed ({§emission-row}); its `Reasonings:` line counts its landed reasoning rows, those the worker KILLed, and the turns that reasoned ({§reasoning-row}); the op mix leaves both harness rows out. Each stored packet validates independently: one malformed historical packet remains exact raw evidence with its complete validation error chain and never prevents healthy turns from being projected. Accounting on broader rows is the shared exact derivation from that ledger, never a second stored fact. A worker's Cost line names how many settled requests carry no usage at all (errored or aborted exchanges) — their server-side spend is unrecorded rather than silently priced as zero. The reasoning chronology distinguishes readable reasoning content from provider-reported reasoning usage: when tokens were reported but no readable content was returned, it states both facts instead of implying that no reasoning occurred. The human Markdown waterfall shows a present causal source and may preview only the Problem detail because it remains a triage projection, not the machine record. Targets reconstruct the model-visible address, including hostname, port, serialized query, and fragment; an authority-bearing URL must never degrade from `https://host/path` to `https:///path`, and durable resource coordinates render back to their authority form. Its human Markdown waterfall groups consecutive identical per-turn op outcomes and typed `entry_materialized` narrations, reporting the exact count and sequence span (`xN (seq A-B)`). Grouping keys include source and the complete target, so distinct causes, authorities, or channels never collapse, and non-consecutive events preserve their chronological order. Thus amplification is conspicuous without making the diagnostic artifact itself pathological; valid packet files remain byte-identical records of what the model saw.
5452
5463
 
5453
5464
  Unrecognized actionless log rows are retained and labelled as such, not
5454
5465
  interpreted as executable turnOps or allowed to prevent the remaining digest.
@@ -5486,11 +5497,13 @@ final packet and the newest attempts always testify. A windowless witness
5486
5497
 
5487
5498
  §turn-accounting-notice **The completion beat carries the spend.** `turn_generated`
5488
5499
  carries the turn's exact settled wire accounting — request count, exact nullable
5489
- USD, and token totals across every physical exchange the turn paid for, failed
5500
+ USD and token totals with separately named known subtotals across every physical exchange the turn paid for, failed
5490
5501
  calls included. It is the shared exact derivation from the ledger, never a second
5491
5502
  stored fact, so a live watcher accrues running loop cost per turn (#465).
5492
5503
 
5493
5504
  §notice-content-offset-pointer **Content-offset position.** A non-fatal diagnosis on an accepted emission (for example `grammar_unenforced` or `parse_advisory`) carries `position: { type: "content-offset", line, column }` into the model's exact `ops://<worker>/<loop>/<turn>` source; the transcript shows that turn's canonical emission instead ({§emission-row}), so the position names a line of the source, which READ of its address shows. A bounded hard parse error becomes a durable failed operation whose Problem Details preserve its line, column, source, and parser-owned diagnostic. Hard errors that make the frame untrustworthy remain only with their rejected forensic attempt.
5505
+ Reasoning normalization notices use source `grammar:reasoning` and omit the
5506
+ content-offset position: reasoning coordinates do not address the content source.
5494
5507
 
5495
5508
  ### Executable tool resources
5496
5509
 
@@ -5543,6 +5556,12 @@ with a multiline regex over matching fences), so turn 0 names every tool with it
5543
5556
  signature — one row per tool, paged like every survey. Capability attenuation
5544
5557
  restricts that matcher to the admitted exact tools. No document is delivered
5545
5558
  unasked.
5559
+ When the registry supplies {§executor-tool-catalog} definitions, the family
5560
+ document links to its sibling `<runtime>.json`. The catalog contains exactly
5561
+ the effective tools and is an ordinary `application/json` resource for READ,
5562
+ FIND, and JSONPath selection. It follows the same reconciliation as the family
5563
+ document and per-tool schemas; neither the catalog nor its definitions are
5564
+ automatically included in turn 0 or expanded-tool surveys.
5546
5565
  Attached tools are capabilities like every other runtime; the model never
5547
5566
  learns an origin.
5548
5567
 
@@ -5873,7 +5892,17 @@ container identity.
5873
5892
  | ------------ | -------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
5874
5893
  | `&<symbol` | In-scope resources that reference `symbol` | Each matching reference's source span |
5875
5894
  | `&>symbol` | In-scope resources defining names referenced by each definition of `symbol` | Each referenced symbol's definition span |
5876
- | `&symbol` | Union of definitions of `symbol`, referrers, and definitions of referenced names | Corresponding definition/reference spans, deduplicated by resource + span |
5895
+ | `&symbol` | In-scope resources defining `symbol` | Each definition's source span |
5896
+
5897
+ Graph storage preserves the handler's complete text coordinates, including
5898
+ reference columns and end positions. Match evidence and source text come from
5899
+ the same immutable derivation. A definition without handler-supplied columns
5900
+ selects its declared whole-line extent; a reference always retains its exact
5901
+ region. Matches are deduplicated by resource and complete region, not line.
5902
+ READ presents whole lines with that evidence ({§read-pattern-evidence}); EDIT
5903
+ replaces the selected region literally, not a semantic rename of the symbol.
5904
+ Upgrades invalidate obsolete derived indexes, never their source content or
5905
+ retained history ({§db-migrations}).
5877
5906
 
5878
5907
  | Result | HTTP status |
5879
5908
  |---|---|
@@ -5901,16 +5930,32 @@ one binary marker to fail a repository-wide text search.
5901
5930
  Glob anchoring (`TODO*` starts-with, `*TODO*` contains, `*.log` ends-with,
5902
5931
  `[Tt]odo*` character class) lives in the mimetypes framework.
5903
5932
 
5933
+ §derivation-in-flight **In-flight derivation and query are live uses.** An exact
5934
+ indexed operation holds its content-addressed artifact from derivation through
5935
+ the completed query. Producers hold artifacts while building and attaching
5936
+ them. Derivation and content collection share one per-database exclusion boundary:
5937
+ parallel uses remain parallel, a collection pass skips these two collectors
5938
+ while a use is active, and a new use waits for an already-running collection.
5939
+ Successful, failed, and cancelled uses release in `finally`; no durable pin or
5940
+ additional retention setting is introduced. The ordinary later pass or drained
5941
+ shutdown collects unattached artifacts under {§retention-policy}.
5942
+
5904
5943
  ### Matcher selection and evidence
5905
5944
 
5906
- - §matcher-selection-signal **Matching carries navigation evidence** - a matcher is a boolean resource predicate. Internally, each selected resource carries `matches: MatchEvidence[]`, where `MatchEvidence` is `{channel?,locator?,region?}`; `channel` names the entry channel the finding was located in and is absent for channel-less resources such as log rows, so line coordinates cannot be mis-attributed across channels of the same resource ({§channel-selection-visibility}). `locator` preserves a structural address without overloading the resource row's `path`; `region` is a complete four-coordinate `TextRegion` only when the finding maps honestly into the exact text the model can READ. Exact duplicate evidence deduplicates. Relation findings map their indexed source spans through the same readable text coordinate index. FIND alone decides whether that grouped selection projects as resource rows or flat locations ({§find-result-projection}); the engine never fabricates a region or guesses which surgical READ the model wants.
5945
+ - §matcher-selection-signal **Matching carries navigation evidence** - each selected resource carries `matches: MatchEvidence[]`, where `MatchEvidence` is `{channel?,locator?,region?,enclosingRegion?}`. `channel` identifies the entry channel and is absent for channel-less resources such as log rows ({§channel-selection-visibility}); `locator` preserves the structural address. `region` is the exact selection; `enclosingRegion` is presentation context only. Both use complete four-coordinate `TextRegion`s in the readable source. Exact duplicate evidence deduplicates. FIND projects this evidence as resource rows or flat locations ({§find-result-projection}); consumers never invent missing precision. An operation requiring exact source fragments refuses a selection containing unlocated or enclosing-only findings with 422 `pattern-source-unlocated`, before any mutation.
5946
+
5947
+ §matcher-index-readiness **Indexed patterns require complete evidence.** A held
5948
+ resource snapshot whose search derivation is excluded or failed answers 422
5949
+ `search-unavailable`, preserving the reason. Graph selection requiring an
5950
+ unsettled relationship universe answers retryable 503 `search-index-incomplete`.
5951
+ Neither condition is a successful empty match.
5907
5952
 
5908
5953
  §matcher-result-resource-selection **A matcher selects resources; it never extracts a value or chooses a retrieval
5909
5954
  window.** Every dialect answers whether a resource matches and may return
5910
- `MatchEvidence { locator?, region? }` ({§matcher-selection-signal}). `locator` is a
5911
- canonical structural locator. `region` is a complete `TextRegion` in the exact
5912
- text the model can READ and may be exact or the smallest honest enclosing
5913
- region. A matcher miss is 204. FIND's target shape projects the selected
5955
+ `MatchEvidence { locator?, region?, enclosingRegion? }` ({§matcher-selection-signal}).
5956
+ `locator` is a canonical structural locator. `region` is an exact selected
5957
+ `TextRegion`; `enclosingRegion` identifies presentation context, not a selection.
5958
+ Both address the physical text the model can READ. A matcher miss is 204. FIND's target shape projects the selected
5914
5959
  resources according to {§find-result-projection}.
5915
5960
 
5916
5961
  | Dialect | Selects | Natural use |
@@ -5946,16 +5991,17 @@ One/two-coordinate line shorthand is newline-aware so deleting a line does not
5946
5991
  leave an empty line. A terminal position after a final newline is an exact
5947
5992
  insertion anchor, not an additional whole line. `<1,-1>` selects all content.
5948
5993
 
5949
- §zero-width-column-one-insert **A zero-width region at column 1 inserts whole lines.** The
5950
- schemes region algebra ({§slicer-text-algebra}) inserts every body verbatim; the missing
5951
- newline is a fence artifact, so core repairs it where a fenced EDIT body becomes inserted
5952
- content, through the one schemes helper `wholeLineBody`, at the mutation and again in the
5953
- receipt and anchor-continuity recomputation so every site sees one body. At `<L,1,L,1>`,
5994
+ §zero-width-column-one-insert **An authored zero-width column-1 scope inserts whole lines.**
5995
+ Core prepares that fenced EDIT body once, using `wholeLineBody`, before handing
5996
+ literal replacements to the scheme. Mutation, receipt, and anchor-continuity
5997
+ calculation all consume that same prepared body. At `<L,1,L,1>`,
5954
5998
  an anchored `<@hash,1,@hash,1>`, or `L` = final line + 1 when the content ends with a
5955
5999
  newline, a non-empty body that does not end in a newline is inserted with the content's
5956
6000
  line separator appended, so `X` at `<2,1,2,1>` into `a\nb` yields `a\nX\nb`. An empty
5957
6001
  body inserts nothing. A zero-width region at any other column stays a byte-exact insert with
5958
- nothing appended. COPY and MOVE transfer source bytes, not a fenced body, and are untouched.
6002
+ nothing appended. A pattern's generated coordinates select exact matches, not
6003
+ authored line-insertion syntax: `/^/` inserts a literal prefix without adding
6004
+ a newline. COPY and MOVE transfer source bytes and are likewise untouched.
5959
6005
  The runtime also tolerates an authored three-coordinate
5960
6006
  `<startLine,startColumn,endLine>` scope, immediately lowers it to the complete
5961
6007
  four-coordinate region ending after the final code point of `endLine`, and
@@ -5974,10 +6020,31 @@ down; overlaps and duplicate insertion boundaries are 409. This is the adopted
5974
6020
  SARIF region/replacement algebra for exact spans and same-snapshot ordering, not
5975
6021
  adoption of the SARIF interchange envelope.
5976
6022
 
5977
- §slice-semantics-compose-pattern **Compose from evidence.** A match region already uses the four-coordinate
5978
- scope shape. A follow-up ```` ```READ (resource) <SL,SC,EL,EC> ```` retrieves that exact
5979
- region. JSONPath/XPath remain locators and matchers; they do not introduce a
5980
- second structural scope or structural EDIT language.
6023
+ §slice-semantics-compose-pattern **One selection, independent of operation.**
6024
+ A pattern runs over the canonical source channel, never a READ receipt's
6025
+ line-ending normalization, preview, coordinate prefixes, or other presentation.
6026
+ A match region uses the four-coordinate source scope. FIND reports it, READ
6027
+ shows its lines with that evidence, EDIT replaces it, COPY transfers it, MOVE
6028
+ transfers then removes it, and a textual KILL removes it. Enclosing display
6029
+ context never enlarges the selected span. Multiple fragments retain source
6030
+ order and literal text; COPY/MOVE insert no separators between them. Scope
6031
+ composition admits complete matches, never clipped fragments or other matches
6032
+ on the same line. Mutation batches retain {§edit-batch-merges} and collision
6033
+ handling; a pattern does not create another overlap-recovery algorithm.
6034
+
6035
+ FIND retains locators even without source coordinates. READ may display
6036
+ `enclosingRegion` as context, but a selected value with neither kind of location
6037
+ returns `422 pattern-source-unlocated`. EDIT, COPY, MOVE,
6038
+ and textual KILL require exact `region` evidence for every selected match;
6039
+ enclosing or unlocated values return that same Problem without changing any
6040
+ source or destination. Absence of matches remains an ordinary empty selection.
6041
+
6042
+ A follow-up ```` ```READ (resource) <SL,SC,EL,EC> ```` retrieves the exact
6043
+ region. JSONPath/XPath remain locators and matchers, not a structural update
6044
+ language: `//item` selects the element, `//item/text()` its direct text nodes,
6045
+ and `$.host` the JSON value including its lexical quotes/escapes, never the
6046
+ property name or colon. Literal replacement does not serialize a value or
6047
+ repair neighboring punctuation. Readable projections have their own coordinates.
5981
6048
 
5982
6049
  ### §ext-mimetype Path-extension declares mimetype
5983
6050
 
@@ -6038,7 +6105,7 @@ Auto-derived text mimetypes anywhere in plurnk-service normalize to `text/markdo
6038
6105
  Carried from the contract walk; durable.
6039
6106
 
6040
6107
  - **Dialect/mimetype mismatch** → 415 (xpath on text/plain → 415; jsonpath on JSON-shapeless mimetypes → 204 because outline is empty, not 415).
6041
- - **Binary markers** → 415 for text operations. A readable binary source is durably represented as projected `text/markdown` under {§membership-source-projection}; source-aware File EDIT remains 415.
6108
+ - **Binary coordinates** are numeric byte positions for READ and transfer; text EDIT does not author native bytes ({§binary-parity}). Readable projections retain their own textual coordinates ({§membership-source-projection}).
6042
6109
  - **EDIT `<L>` on non-existent entry** → body becomes content; `<L>` is positional-only on existing content.
6043
6110
  - §copy-l-source-range **COPY/MOVE source scope** selects only the addressed source channel and
6044
6111
  first resolves and, when required, prepares the same canonical
@@ -6059,7 +6126,7 @@ Carried from the contract walk; durable.
6059
6126
  {§copy-move-observation}.
6060
6127
  - **READ rx** prefixes every textual line under {§render-rule-line-navigable-prefix}; eligible
6061
6128
  editable resources carry `@hash N:`, and all others carry `N:`.
6062
- - **FIND pattern** (`[{"pattern": …}]` in the heading, {§matcher-option}) applies to the addressed entry channel (all dialects), per-candidate via the in-tree `Matcher.matchAgainstContent` ({§matcher-dispatch}; status 200 = content hit → entry selected). The target scope and channel select candidates; the path-glob is the (target). On READ, EDIT, KILL, COPY and MOVE the same heading pattern selects lines within one resource ({§read-pattern}, {§edit-pattern}, {§kill-pattern}, {§copy-move-pattern}).
6129
+ - **Pattern selection** applies to the addressed source channel under {§slice-semantics-compose-pattern}. The path and channel select resources; FIND reports matches and READ displays their lines. EDIT, textual KILL, COPY, and MOVE act on exact selected spans, not their enclosing lines ({§read-pattern}, {§edit-pattern}, {§kill-pattern}, {§copy-move-pattern}).
6063
6130
  - **Scoped KILL** on the **log** (`log:///`) removes a body span from its readable projection ({§log-kill-scope}); on an entry it deletes that span through the EDIT path ({§kill-scope-entry}). A whole-entry KILL deletes the entry, or one `#fragment` channel.
6064
6131
  - **File scheme** detects with `Mimetypes.detect({ path })` and classifies with the same configured service ({§mimetype-classification-consumption}). Handler-declared binary sources materialize through {§membership-source-projection}; projected bodies are READ-able, while source-aware EDIT remains 415.
6065
6132
 
@@ -6067,7 +6134,14 @@ Carried from the contract walk; durable.
6067
6134
 
6068
6135
  A KILL with a text-coordinate scope aimed at an entry-bearing scheme deletes exactly that span: core prepares and dispatches it as an EDIT with an empty body over the same marker, so anchors resolve, proposals gate it, and the merge facts and receipt are the EDIT path's — while the log row records the model's KILL. Its packet metadata and canonical log body use {§edit-result-receipt-projection}. ```` ```EDIT (path) <scope> ```` with an empty body remains the same act spelled the other way; the teaching names KILL.
6069
6136
 
6070
- §kill-pattern **A pattern on an entry KILL deletes each matching line.** ```` ```KILL (path) [{"pattern": "beta"}] ```` takes the same EDIT path as a scoped KILL, expanded under {§edit-pattern} in whole lines: the resource is read once, the matcher runs line by line, and every line a match touches becomes one empty-body line splice in one atomic batch guarded by those lines' anchors. A numeric scope bounds the lines the pattern may touch. Zero matches change nothing (204, `matched: 0`); a whole-entry KILL never widens from a pattern that selected nothing. The receipt is the EDIT path's, compacted the same way: `matched` lines, the first deletion's `receipt` with its `removedText` ({§edit-receipt-removed-text}), and `last` for the final one. Node-selecting patterns (`//`, `$`) select whole lines here, as they name nodes with line extents; resource-selecting ones (`~`, `&`) are refused (400 `pattern-dialect-unsupported`, {§pattern-dialect-find-only}). The log stays the exception: a pattern on `log:///` selects rows ({§log-curation-set-selection}), and a stream scheme's KILL is process control, so a pattern there is 400 `kill-pattern-unsupported`.
6137
+ §kill-pattern **A pattern on a textual entry KILL removes exactly its matches.**
6138
+ It is the same empty-body EDIT under {§edit-pattern}, including exact column
6139
+ and multiline regions, scope, preconditions, proposals, and receipt. It has no
6140
+ separate line-deletion mode. Zero matches leave the resource unchanged (204,
6141
+ `matched: 0`); a pattern never becomes whole-resource deletion. The receipt
6142
+ counts selected spans and retains the first and last applied effects.
6143
+ Log KILL still selects retirement rows ({§log-curation-set-selection}); stream
6144
+ KILL controls a process and refuses a content pattern (`kill-pattern-unsupported`).
6071
6145
 
6072
6146
  ---
6073
6147
 
@@ -6087,7 +6161,7 @@ teardown. The runner joins the test body's cleanup before starting the next
6087
6161
  specimen. The shared workspace and story helpers cover setup, inference and
6088
6162
  oracle failures, preserve the primary failure when their cleanup also fails,
6089
6163
  and attempt every registered disposal.
6090
- Provider attempt/recovery limits remain independent; a harness cancellation is
6164
+ The provider whole-call deadline and recovery policy remain independent; a harness cancellation is
6091
6165
  not evidence that the provider's own deadline expired.
6092
6166
 
6093
6167
  §provider-conformance-matrix **Every configured model alias is exercised through a
@@ -6258,7 +6332,8 @@ Every Problem code core mints is named here under its family ({§problem-error-c
6258
6332
  |---|---|
6259
6333
  | Nothing is in flight. Continuing. | a WAIT (or a premature terminal) with no live work ({§wait-obligation-matrix}) |
6260
6334
  | Completion deferred. Conclude with KILL alone. | a concluding KILL that carries other operations ({§kill-conclusion}) |
6261
- | Context Token Budget Overflow: logTokensTotal exceeds logTokensMax; retained context cannot be admitted. | output admission over the retained-context ceiling |
6335
+ | Context exceeds budget. YOU MUST ONLY KILL, MOVE or NOTE this turn. | the over-budget row ({§context-over-budget-row}) |
6336
+ | Context window overflow: the packet cannot fit the model's window even as receipts. | the wall ({§context-wall}) |
6262
6337
  | This run is unattended: nobody is present to answer. | a capability that needs a present operator in an unattended loop ({§loop-attendance}) |
6263
6338
  | Worker name '*name*' must match `[A-Za-z0-9][A-Za-z0-9_-]{0,62}`. Recovery: Use 1–63 ASCII letters, digits, '_' or '-', starting with a letter or digit. | an invalid worker name |
6264
6339
  | Provide the client identifier. / Provide an absolute project path. / Use a positive integer limit. / prompt is not a non-empty string. | client input validation on the daemon's methods |