@plurnk/plurnk-service 1.3.12 → 1.5.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 (488) hide show
  1. package/.env.defaults +95 -91
  2. package/INSTALL.md +54 -28
  3. package/README.md +25 -10
  4. package/SPEC.md +2426 -942
  5. package/dist/Paths.d.ts +4 -1
  6. package/dist/Paths.d.ts.map +1 -1
  7. package/dist/Paths.js +24 -23
  8. package/dist/Paths.js.map +1 -1
  9. package/dist/build-info.json +1 -1
  10. package/dist/content/edit-receipt.d.ts +13 -28
  11. package/dist/content/edit-receipt.d.ts.map +1 -1
  12. package/dist/content/edit-receipt.js +285 -104
  13. package/dist/content/edit-receipt.js.map +1 -1
  14. package/dist/content/edited-span.d.ts.map +1 -1
  15. package/dist/content/edited-span.js +2 -5
  16. package/dist/content/edited-span.js.map +1 -1
  17. package/dist/content/index.d.ts +4 -3
  18. package/dist/content/index.d.ts.map +1 -1
  19. package/dist/content/index.js +2 -1
  20. package/dist/content/index.js.map +1 -1
  21. package/dist/content/line-marker.d.ts +10 -9
  22. package/dist/content/line-marker.d.ts.map +1 -1
  23. package/dist/content/line-marker.js +8 -11
  24. package/dist/content/line-marker.js.map +1 -1
  25. package/dist/content/matcher.d.ts +15 -26
  26. package/dist/content/matcher.d.ts.map +1 -1
  27. package/dist/content/matcher.js +77 -107
  28. package/dist/content/matcher.js.map +1 -1
  29. package/dist/content/mimetype-binary.d.ts +2 -2
  30. package/dist/content/mimetype-binary.d.ts.map +1 -1
  31. package/dist/content/mimetype-binary.js +10 -10
  32. package/dist/content/mimetype-binary.js.map +1 -1
  33. package/dist/content/path-mimetype.js +3 -3
  34. package/dist/content/path-mimetype.js.map +1 -1
  35. package/dist/content/read-projector.d.ts +14 -0
  36. package/dist/content/read-projector.d.ts.map +1 -0
  37. package/dist/content/read-projector.js +86 -0
  38. package/dist/content/read-projector.js.map +1 -0
  39. package/dist/content/read-resolve.d.ts +6 -7
  40. package/dist/content/read-resolve.d.ts.map +1 -1
  41. package/dist/content/read-resolve.js +36 -59
  42. package/dist/content/read-resolve.js.map +1 -1
  43. package/dist/core/BranchReceipt.d.ts +6 -0
  44. package/dist/core/BranchReceipt.d.ts.map +1 -0
  45. package/dist/core/BranchReceipt.js +24 -0
  46. package/dist/core/BranchReceipt.js.map +1 -0
  47. package/dist/core/BudgetOverflow.d.ts +20 -0
  48. package/dist/core/BudgetOverflow.d.ts.map +1 -0
  49. package/dist/core/BudgetOverflow.js +49 -0
  50. package/dist/core/BudgetOverflow.js.map +1 -0
  51. package/dist/core/BudgetReadout.d.ts +8 -0
  52. package/dist/core/BudgetReadout.d.ts.map +1 -0
  53. package/dist/core/BudgetReadout.js +79 -0
  54. package/dist/core/BudgetReadout.js.map +1 -0
  55. package/dist/core/ChannelWrite.d.ts +31 -9
  56. package/dist/core/ChannelWrite.d.ts.map +1 -1
  57. package/dist/core/ChannelWrite.js +30 -23
  58. package/dist/core/ChannelWrite.js.map +1 -1
  59. package/dist/core/ChannelWrite.sql +14 -12
  60. package/dist/core/CoreSchemeServices.d.ts +18 -4
  61. package/dist/core/CoreSchemeServices.d.ts.map +1 -1
  62. package/dist/core/CoreSchemeServices.js +7 -1
  63. package/dist/core/CoreSchemeServices.js.map +1 -1
  64. package/dist/core/Dispatcher.d.ts +26 -21
  65. package/dist/core/Dispatcher.d.ts.map +1 -1
  66. package/dist/core/Dispatcher.js +1626 -671
  67. package/dist/core/Dispatcher.js.map +1 -1
  68. package/dist/core/DurableStatement.d.ts +6 -0
  69. package/dist/core/DurableStatement.d.ts.map +1 -0
  70. package/dist/core/DurableStatement.js +51 -0
  71. package/dist/core/DurableStatement.js.map +1 -0
  72. package/dist/core/Engine.d.ts +64 -29
  73. package/dist/core/Engine.d.ts.map +1 -1
  74. package/dist/core/Engine.js +1348 -835
  75. package/dist/core/Engine.js.map +1 -1
  76. package/dist/core/Engine.sql +329 -234
  77. package/dist/core/EnvFlags.js +1 -1
  78. package/dist/core/EnvFlags.js.map +1 -1
  79. package/dist/core/ErrorDetail.d.ts +6 -0
  80. package/dist/core/ErrorDetail.d.ts.map +1 -0
  81. package/dist/core/ErrorDetail.js +20 -0
  82. package/dist/core/ErrorDetail.js.map +1 -0
  83. package/dist/core/ExecutorRegistry.d.ts +14 -3
  84. package/dist/core/ExecutorRegistry.d.ts.map +1 -1
  85. package/dist/core/ExecutorRegistry.js +56 -30
  86. package/dist/core/ExecutorRegistry.js.map +1 -1
  87. package/dist/core/GitBranch.d.ts +20 -0
  88. package/dist/core/GitBranch.d.ts.map +1 -0
  89. package/dist/core/GitBranch.js +110 -0
  90. package/dist/core/GitBranch.js.map +1 -0
  91. package/dist/core/JournalTurn.d.ts +9 -0
  92. package/dist/core/JournalTurn.d.ts.map +1 -0
  93. package/dist/core/JournalTurn.js +14 -0
  94. package/dist/core/JournalTurn.js.map +1 -0
  95. package/dist/core/JournalTurn.sql +10 -0
  96. package/dist/core/LogBody.d.ts +18 -0
  97. package/dist/core/LogBody.d.ts.map +1 -0
  98. package/dist/core/LogBody.js +180 -0
  99. package/dist/core/LogBody.js.map +1 -0
  100. package/dist/core/LoopFlagsReader.d.ts +7 -0
  101. package/dist/core/LoopFlagsReader.d.ts.map +1 -0
  102. package/dist/core/LoopFlagsReader.js +33 -0
  103. package/dist/core/LoopFlagsReader.js.map +1 -0
  104. package/dist/core/LoopLifecycle.d.ts +8 -2
  105. package/dist/core/LoopLifecycle.d.ts.map +1 -1
  106. package/dist/core/LoopLifecycle.js +54 -11
  107. package/dist/core/LoopLifecycle.js.map +1 -1
  108. package/dist/core/LoopLifecycle.sql +10 -7
  109. package/dist/core/NoticeChannel.d.ts +13 -0
  110. package/dist/core/NoticeChannel.d.ts.map +1 -0
  111. package/dist/core/NoticeChannel.js +40 -0
  112. package/dist/core/NoticeChannel.js.map +1 -0
  113. package/dist/core/Owner.d.ts +0 -1
  114. package/dist/core/Owner.d.ts.map +1 -1
  115. package/dist/core/Owner.js +2 -5
  116. package/dist/core/Owner.js.map +1 -1
  117. package/dist/core/PacketBuilder.d.ts +27 -25
  118. package/dist/core/PacketBuilder.d.ts.map +1 -1
  119. package/dist/core/PacketBuilder.js +321 -383
  120. package/dist/core/PacketBuilder.js.map +1 -1
  121. package/dist/core/ProblemLog.d.ts +26 -0
  122. package/dist/core/ProblemLog.d.ts.map +1 -0
  123. package/dist/core/ProblemLog.js +58 -0
  124. package/dist/core/ProblemLog.js.map +1 -0
  125. package/dist/core/ProposalLifecycle.d.ts +15 -21
  126. package/dist/core/ProposalLifecycle.d.ts.map +1 -1
  127. package/dist/core/ProposalLifecycle.js +291 -78
  128. package/dist/core/ProposalLifecycle.js.map +1 -1
  129. package/dist/core/ProviderInstantiate.d.ts.map +1 -1
  130. package/dist/core/ProviderInstantiate.js +51 -48
  131. package/dist/core/ProviderInstantiate.js.map +1 -1
  132. package/dist/core/SchemeRegistry.d.ts +14 -8
  133. package/dist/core/SchemeRegistry.d.ts.map +1 -1
  134. package/dist/core/SchemeRegistry.js +189 -114
  135. package/dist/core/SchemeRegistry.js.map +1 -1
  136. package/dist/core/ServiceTeardown.d.ts +11 -0
  137. package/dist/core/ServiceTeardown.d.ts.map +1 -0
  138. package/dist/core/ServiceTeardown.js +70 -0
  139. package/dist/core/ServiceTeardown.js.map +1 -0
  140. package/dist/core/StoredPacket.d.ts +29 -0
  141. package/dist/core/StoredPacket.d.ts.map +1 -0
  142. package/dist/core/StoredPacket.js +147 -0
  143. package/dist/core/StoredPacket.js.map +1 -0
  144. package/dist/core/StrikeRail.d.ts +6 -3
  145. package/dist/core/StrikeRail.d.ts.map +1 -1
  146. package/dist/core/StrikeRail.js +27 -56
  147. package/dist/core/StrikeRail.js.map +1 -1
  148. package/dist/core/TerminalResult.d.ts +16 -0
  149. package/dist/core/TerminalResult.d.ts.map +1 -0
  150. package/dist/core/TerminalResult.js +49 -0
  151. package/dist/core/TerminalResult.js.map +1 -0
  152. package/dist/core/WorkerControlAddress.d.ts +17 -0
  153. package/dist/core/WorkerControlAddress.d.ts.map +1 -0
  154. package/dist/core/WorkerControlAddress.js +44 -0
  155. package/dist/core/WorkerControlAddress.js.map +1 -0
  156. package/dist/core/WorkerName.d.ts +31 -0
  157. package/dist/core/WorkerName.d.ts.map +1 -0
  158. package/dist/core/WorkerName.js +95 -0
  159. package/dist/core/WorkerName.js.map +1 -0
  160. package/dist/core/WorkerName.sql +36 -0
  161. package/dist/core/WorkspaceGate.d.ts +14 -0
  162. package/dist/core/WorkspaceGate.d.ts.map +1 -0
  163. package/dist/core/WorkspaceGate.js +155 -0
  164. package/dist/core/WorkspaceGate.js.map +1 -0
  165. package/dist/core/caps/CapsResolve.d.ts +5 -1
  166. package/dist/core/caps/CapsResolve.d.ts.map +1 -1
  167. package/dist/core/caps/CapsResolve.js +8 -4
  168. package/dist/core/caps/CapsResolve.js.map +1 -1
  169. package/dist/core/caps/DbChannelCaps.d.ts +5 -11
  170. package/dist/core/caps/DbChannelCaps.d.ts.map +1 -1
  171. package/dist/core/caps/DbChannelCaps.js +30 -12
  172. package/dist/core/caps/DbChannelCaps.js.map +1 -1
  173. package/dist/core/caps/DbEntryCaps.d.ts +5 -14
  174. package/dist/core/caps/DbEntryCaps.d.ts.map +1 -1
  175. package/dist/core/caps/DbEntryCaps.js +27 -8
  176. package/dist/core/caps/DbEntryCaps.js.map +1 -1
  177. package/dist/core/caps/DbNotifyCaps.d.ts +1 -1
  178. package/dist/core/caps/DbNotifyCaps.d.ts.map +1 -1
  179. package/dist/core/caps/DbNotifyCaps.js +18 -15
  180. package/dist/core/caps/DbNotifyCaps.js.map +1 -1
  181. package/dist/core/caps/DbProjectionCaps.d.ts +5 -5
  182. package/dist/core/caps/DbProjectionCaps.d.ts.map +1 -1
  183. package/dist/core/caps/DbProjectionCaps.js +21 -4
  184. package/dist/core/caps/DbProjectionCaps.js.map +1 -1
  185. package/dist/core/caps/DbSubscriptionCaps.d.ts +4 -6
  186. package/dist/core/caps/DbSubscriptionCaps.d.ts.map +1 -1
  187. package/dist/core/caps/DbSubscriptionCaps.js +75 -66
  188. package/dist/core/caps/DbSubscriptionCaps.js.map +1 -1
  189. package/dist/core/caps/DbTagCaps.d.ts +5 -12
  190. package/dist/core/caps/DbTagCaps.d.ts.map +1 -1
  191. package/dist/core/caps/DbTagCaps.js +20 -11
  192. package/dist/core/caps/DbTagCaps.js.map +1 -1
  193. package/dist/core/caps/SchemeCtxImpl.d.ts +6 -1
  194. package/dist/core/caps/SchemeCtxImpl.d.ts.map +1 -1
  195. package/dist/core/caps/SchemeCtxImpl.js +6 -6
  196. package/dist/core/caps/SchemeCtxImpl.js.map +1 -1
  197. package/dist/core/content-hash.js +1 -1
  198. package/dist/core/content-hash.js.map +1 -1
  199. package/dist/core/env-defaults.d.ts.map +1 -1
  200. package/dist/core/env-defaults.js.map +1 -1
  201. package/dist/core/fork.d.ts.map +1 -1
  202. package/dist/core/fork.js +55 -30
  203. package/dist/core/fork.js.map +1 -1
  204. package/dist/core/fork.sql +43 -29
  205. package/dist/core/git-env.d.ts +2 -0
  206. package/dist/core/git-env.d.ts.map +1 -1
  207. package/dist/core/git-env.js +13 -18
  208. package/dist/core/git-env.js.map +1 -1
  209. package/dist/core/git-iso.d.ts +3 -2
  210. package/dist/core/git-iso.d.ts.map +1 -1
  211. package/dist/core/git-iso.js +36 -27
  212. package/dist/core/git-iso.js.map +1 -1
  213. package/dist/core/git-membership.d.ts +2 -1
  214. package/dist/core/git-membership.d.ts.map +1 -1
  215. package/dist/core/git-membership.js +276 -162
  216. package/dist/core/git-membership.js.map +1 -1
  217. package/dist/core/git-state.d.ts +8 -1
  218. package/dist/core/git-state.d.ts.map +1 -1
  219. package/dist/core/git-state.js +44 -26
  220. package/dist/core/git-state.js.map +1 -1
  221. package/dist/core/namespace.d.ts +1 -0
  222. package/dist/core/namespace.d.ts.map +1 -1
  223. package/dist/core/namespace.js +20 -0
  224. package/dist/core/namespace.js.map +1 -1
  225. package/dist/core/optimistic-settlement.d.ts +2 -0
  226. package/dist/core/optimistic-settlement.d.ts.map +1 -0
  227. package/dist/core/optimistic-settlement.js +14 -0
  228. package/dist/core/optimistic-settlement.js.map +1 -0
  229. package/dist/core/owner.sql +1 -1
  230. package/dist/core/packet-inject.d.ts.map +1 -1
  231. package/dist/core/packet-inject.js +7 -11
  232. package/dist/core/packet-inject.js.map +1 -1
  233. package/dist/core/packet-wire.d.ts +3 -21
  234. package/dist/core/packet-wire.d.ts.map +1 -1
  235. package/dist/core/packet-wire.js +305 -385
  236. package/dist/core/packet-wire.js.map +1 -1
  237. package/dist/core/plurnk-uri.d.ts +12 -1
  238. package/dist/core/plurnk-uri.d.ts.map +1 -1
  239. package/dist/core/plurnk-uri.js +49 -29
  240. package/dist/core/plurnk-uri.js.map +1 -1
  241. package/dist/core/results.d.ts +18 -5
  242. package/dist/core/results.d.ts.map +1 -1
  243. package/dist/core/results.js +33 -18
  244. package/dist/core/results.js.map +1 -1
  245. package/dist/core/ruler_count.d.ts +4 -0
  246. package/dist/core/ruler_count.d.ts.map +1 -0
  247. package/dist/core/ruler_count.js +7 -0
  248. package/dist/core/ruler_count.js.map +1 -0
  249. package/dist/core/scheme-types.d.ts +3 -17
  250. package/dist/core/scheme-types.d.ts.map +1 -1
  251. package/dist/core/scheme-types.js.map +1 -1
  252. package/dist/core/search-gate.d.ts.map +1 -1
  253. package/dist/core/search-gate.js +3 -11
  254. package/dist/core/search-gate.js.map +1 -1
  255. package/dist/core/teaching-corpus.d.ts +6 -0
  256. package/dist/core/teaching-corpus.d.ts.map +1 -0
  257. package/dist/core/teaching-corpus.js +23 -0
  258. package/dist/core/teaching-corpus.js.map +1 -0
  259. package/dist/core/teaching.d.ts +0 -1
  260. package/dist/core/teaching.d.ts.map +1 -1
  261. package/dist/core/teaching.js +2 -8
  262. package/dist/core/teaching.js.map +1 -1
  263. package/dist/core/token-ruler.d.ts.map +1 -1
  264. package/dist/core/token-ruler.js +3 -16
  265. package/dist/core/token-ruler.js.map +1 -1
  266. package/dist/core/turn-scheduler.d.ts +1 -1
  267. package/dist/core/turn-scheduler.d.ts.map +1 -1
  268. package/dist/core/turn-scheduler.js +1 -1
  269. package/dist/core/turn-scheduler.js.map +1 -1
  270. package/dist/core/worker-cap.d.ts +2 -4
  271. package/dist/core/worker-cap.d.ts.map +1 -1
  272. package/dist/core/worker-cap.js +13 -4
  273. package/dist/core/worker-cap.js.map +1 -1
  274. package/dist/core/{run-ops.sql → worker-ops.sql} +14 -14
  275. package/dist/core/workspace-settings.d.ts.map +1 -1
  276. package/dist/core/workspace-settings.js +17 -9
  277. package/dist/core/workspace-settings.js.map +1 -1
  278. package/dist/digest/Digest.d.ts +2 -1
  279. package/dist/digest/Digest.d.ts.map +1 -1
  280. package/dist/digest/Digest.js +510 -149
  281. package/dist/digest/Digest.js.map +1 -1
  282. package/dist/digest/digest.sql +23 -10
  283. package/dist/index.d.ts.map +1 -1
  284. package/dist/index.js +3 -5
  285. package/dist/index.js.map +1 -1
  286. package/dist/observe/api.d.ts +6 -0
  287. package/dist/observe/api.d.ts.map +1 -0
  288. package/dist/observe/api.js +11 -0
  289. package/dist/observe/api.js.map +1 -0
  290. package/dist/observe/init.d.ts +7 -0
  291. package/dist/observe/init.d.ts.map +1 -0
  292. package/dist/observe/init.js +159 -0
  293. package/dist/observe/init.js.map +1 -0
  294. package/dist/observe/metrics.d.ts +6 -0
  295. package/dist/observe/metrics.d.ts.map +1 -0
  296. package/dist/observe/metrics.js +15 -0
  297. package/dist/observe/metrics.js.map +1 -0
  298. package/dist/observe/spans.d.ts +4 -0
  299. package/dist/observe/spans.d.ts.map +1 -0
  300. package/dist/observe/spans.js +51 -0
  301. package/dist/observe/spans.js.map +1 -0
  302. package/dist/schemes/EffectPolicy.d.ts +1 -0
  303. package/dist/schemes/EffectPolicy.d.ts.map +1 -1
  304. package/dist/schemes/EffectPolicy.js +5 -2
  305. package/dist/schemes/EffectPolicy.js.map +1 -1
  306. package/dist/schemes/Exec.d.ts +9 -14
  307. package/dist/schemes/Exec.d.ts.map +1 -1
  308. package/dist/schemes/Exec.js +402 -262
  309. package/dist/schemes/Exec.js.map +1 -1
  310. package/dist/schemes/ExecOutputScheme.d.ts +9 -9
  311. package/dist/schemes/ExecOutputScheme.d.ts.map +1 -1
  312. package/dist/schemes/ExecOutputScheme.js +49 -18
  313. package/dist/schemes/ExecOutputScheme.js.map +1 -1
  314. package/dist/schemes/File.d.ts +7 -13
  315. package/dist/schemes/File.d.ts.map +1 -1
  316. package/dist/schemes/File.js +280 -151
  317. package/dist/schemes/File.js.map +1 -1
  318. package/dist/schemes/Log.d.ts +8 -12
  319. package/dist/schemes/Log.d.ts.map +1 -1
  320. package/dist/schemes/Log.js +402 -233
  321. package/dist/schemes/Log.js.map +1 -1
  322. package/dist/schemes/Log.sql +71 -32
  323. package/dist/schemes/Prompt.d.ts +3 -3
  324. package/dist/schemes/Prompt.d.ts.map +1 -1
  325. package/dist/schemes/Prompt.js +10 -10
  326. package/dist/schemes/Prompt.js.map +1 -1
  327. package/dist/schemes/Skill.d.ts +2 -3
  328. package/dist/schemes/Skill.d.ts.map +1 -1
  329. package/dist/schemes/Skill.js +2 -6
  330. package/dist/schemes/Skill.js.map +1 -1
  331. package/dist/schemes/Worker.d.ts +11 -19
  332. package/dist/schemes/Worker.d.ts.map +1 -1
  333. package/dist/schemes/Worker.js +210 -89
  334. package/dist/schemes/Worker.js.map +1 -1
  335. package/dist/schemes/_entry-chunk.d.ts.map +1 -1
  336. package/dist/schemes/_entry-chunk.js +12 -5
  337. package/dist/schemes/_entry-chunk.js.map +1 -1
  338. package/dist/schemes/_entry-crud.d.ts +11 -9
  339. package/dist/schemes/_entry-crud.d.ts.map +1 -1
  340. package/dist/schemes/_entry-crud.js +72 -13
  341. package/dist/schemes/_entry-crud.js.map +1 -1
  342. package/dist/schemes/_entry-crud.sql +28 -10
  343. package/dist/schemes/_entry-find.d.ts +49 -18
  344. package/dist/schemes/_entry-find.d.ts.map +1 -1
  345. package/dist/schemes/_entry-find.js +348 -195
  346. package/dist/schemes/_entry-find.js.map +1 -1
  347. package/dist/schemes/_entry-find.sql +20 -8
  348. package/dist/schemes/_entry-graph.d.ts +4 -2
  349. package/dist/schemes/_entry-graph.d.ts.map +1 -1
  350. package/dist/schemes/_entry-graph.js +55 -31
  351. package/dist/schemes/_entry-graph.js.map +1 -1
  352. package/dist/schemes/_entry-graph.sql +37 -22
  353. package/dist/schemes/_entry-manifest.d.ts +10 -15
  354. package/dist/schemes/_entry-manifest.d.ts.map +1 -1
  355. package/dist/schemes/_entry-manifest.js +50 -268
  356. package/dist/schemes/_entry-manifest.js.map +1 -1
  357. package/dist/schemes/_entry-ops.d.ts +14 -15
  358. package/dist/schemes/_entry-ops.d.ts.map +1 -1
  359. package/dist/schemes/_entry-ops.js +121 -110
  360. package/dist/schemes/_entry-ops.js.map +1 -1
  361. package/dist/schemes/_entry-ops.sql +2 -3
  362. package/dist/schemes/_entry-semantic.d.ts +22 -9
  363. package/dist/schemes/_entry-semantic.d.ts.map +1 -1
  364. package/dist/schemes/_entry-semantic.js +127 -67
  365. package/dist/schemes/_entry-semantic.js.map +1 -1
  366. package/dist/schemes/_entry-semantic.sql +63 -45
  367. package/dist/schemes/_entry-send.d.ts +3 -4
  368. package/dist/schemes/_entry-send.d.ts.map +1 -1
  369. package/dist/schemes/_entry-send.js +48 -23
  370. package/dist/schemes/_entry-send.js.map +1 -1
  371. package/dist/schemes/_path-scope.d.ts +23 -0
  372. package/dist/schemes/_path-scope.d.ts.map +1 -0
  373. package/dist/schemes/_path-scope.js +61 -0
  374. package/dist/schemes/_path-scope.js.map +1 -0
  375. package/dist/schemes/_search-candidate.d.ts +20 -0
  376. package/dist/schemes/_search-candidate.d.ts.map +1 -0
  377. package/dist/schemes/_search-candidate.js +19 -0
  378. package/dist/schemes/_search-candidate.js.map +1 -0
  379. package/dist/schemes/_search-exclusion.d.ts +7 -0
  380. package/dist/schemes/_search-exclusion.d.ts.map +1 -0
  381. package/dist/schemes/_search-exclusion.js +23 -0
  382. package/dist/schemes/_search-exclusion.js.map +1 -0
  383. package/dist/schemes/_search-index.d.ts +6 -0
  384. package/dist/schemes/_search-index.d.ts.map +1 -0
  385. package/dist/schemes/_search-index.js +328 -0
  386. package/dist/schemes/_search-index.js.map +1 -0
  387. package/dist/schemes/cosine.js +1 -1
  388. package/dist/schemes/cosine.js.map +1 -1
  389. package/dist/schemes/exec-abort.js +3 -3
  390. package/dist/schemes/exec-abort.js.map +1 -1
  391. package/dist/schemes/exec-env.js +3 -3
  392. package/dist/schemes/exec-env.js.map +1 -1
  393. package/dist/server/BranchBatches.d.ts +49 -0
  394. package/dist/server/BranchBatches.d.ts.map +1 -0
  395. package/dist/server/BranchBatches.js +592 -0
  396. package/dist/server/BranchBatches.js.map +1 -0
  397. package/dist/server/Daemon.d.ts +39 -71
  398. package/dist/server/Daemon.d.ts.map +1 -1
  399. package/dist/server/Daemon.js +1133 -491
  400. package/dist/server/Daemon.js.map +1 -1
  401. package/dist/server/DaemonModule.d.ts +31 -0
  402. package/dist/server/DaemonModule.d.ts.map +1 -0
  403. package/dist/server/DaemonModule.js +2 -0
  404. package/dist/server/DaemonModule.js.map +1 -0
  405. package/dist/server/branch-batch.sql +154 -0
  406. package/dist/server/client-input.d.ts +13 -0
  407. package/dist/server/client-input.d.ts.map +1 -1
  408. package/dist/server/client-input.js +268 -57
  409. package/dist/server/client-input.js.map +1 -1
  410. package/dist/server/dispatch-as-plurnk.d.ts +1 -1
  411. package/dist/server/dispatch-as-plurnk.d.ts.map +1 -1
  412. package/dist/server/dispatch-as-plurnk.js +15 -7
  413. package/dist/server/dispatch-as-plurnk.js.map +1 -1
  414. package/dist/server/drain.sql +96 -65
  415. package/dist/server/envelope.d.ts +4 -7
  416. package/dist/server/envelope.d.ts.map +1 -1
  417. package/dist/server/envelope.js +118 -95
  418. package/dist/server/envelope.js.map +1 -1
  419. package/dist/server/envelope.sql +18 -23
  420. package/dist/server/exec-poll-backoff.js +1 -1
  421. package/dist/server/exec-poll-backoff.js.map +1 -1
  422. package/dist/server/lifecycle-recovery.sql +112 -2
  423. package/dist/server/logEntry.d.ts +4 -2
  424. package/dist/server/logEntry.d.ts.map +1 -1
  425. package/dist/server/logEntry.js +6 -3
  426. package/dist/server/logEntry.js.map +1 -1
  427. package/dist/server/logEntry.sql +1 -1
  428. package/dist/server/loop-model.d.ts.map +1 -1
  429. package/dist/server/loop-model.js +22 -9
  430. package/dist/server/loop-model.js.map +1 -1
  431. package/dist/server/loopDocs.d.ts.map +1 -1
  432. package/dist/server/loopDocs.js +5 -4
  433. package/dist/server/loopDocs.js.map +1 -1
  434. package/dist/server/seam-entry-read.sql +15 -10
  435. package/dist/server/seam-log-read.sql +2 -2
  436. package/dist/server/seam-loop.sql +1 -1
  437. package/dist/server/seam-proposal-list.sql +17 -7
  438. package/dist/service.d.ts.map +1 -1
  439. package/dist/service.js +79 -61
  440. package/dist/service.js.map +1 -1
  441. package/migrations/001_schema.sql +1010 -0
  442. package/package.json +65 -32
  443. package/dist/core/PluginLoader.d.ts +0 -20
  444. package/dist/core/PluginLoader.d.ts.map +0 -1
  445. package/dist/core/PluginLoader.js +0 -142
  446. package/dist/core/PluginLoader.js.map +0 -1
  447. package/dist/core/TelemetryChannel.d.ts +0 -37
  448. package/dist/core/TelemetryChannel.d.ts.map +0 -1
  449. package/dist/core/TelemetryChannel.js +0 -80
  450. package/dist/core/TelemetryChannel.js.map +0 -1
  451. package/dist/core/path-decode.d.ts +0 -3
  452. package/dist/core/path-decode.d.ts.map +0 -1
  453. package/dist/core/path-decode.js +0 -9
  454. package/dist/core/path-decode.js.map +0 -1
  455. package/dist/core/plugin-attribution.d.ts +0 -5
  456. package/dist/core/plugin-attribution.d.ts.map +0 -1
  457. package/dist/core/plugin-attribution.js +0 -39
  458. package/dist/core/plugin-attribution.js.map +0 -1
  459. package/dist/core/world-state.d.ts +0 -10
  460. package/dist/core/world-state.d.ts.map +0 -1
  461. package/dist/core/world-state.js +0 -35
  462. package/dist/core/world-state.js.map +0 -1
  463. package/dist/core/world-state.sql +0 -35
  464. package/dist/core/zero-pin.d.ts +0 -3
  465. package/dist/core/zero-pin.d.ts.map +0 -1
  466. package/dist/core/zero-pin.js +0 -16
  467. package/dist/core/zero-pin.js.map +0 -1
  468. package/dist/server/auto.d.ts +0 -6
  469. package/dist/server/auto.d.ts.map +0 -1
  470. package/dist/server/auto.js +0 -63
  471. package/dist/server/auto.js.map +0 -1
  472. package/dist/server/clientTurn.d.ts +0 -6
  473. package/dist/server/clientTurn.d.ts.map +0 -1
  474. package/dist/server/clientTurn.js +0 -22
  475. package/dist/server/clientTurn.js.map +0 -1
  476. package/dist/server/clientTurn.sql +0 -10
  477. package/dist/server/noProposals.d.ts +0 -6
  478. package/dist/server/noProposals.d.ts.map +0 -1
  479. package/dist/server/noProposals.js +0 -37
  480. package/dist/server/noProposals.js.map +0 -1
  481. package/dist/server/version-info.d.ts +0 -14
  482. package/dist/server/version-info.d.ts.map +0 -1
  483. package/dist/server/version-info.js +0 -69
  484. package/dist/server/version-info.js.map +0 -1
  485. package/migrations/0000-00-00.01_schema.sql +0 -536
  486. package/migrations/0004_loop-provider.sql +0 -3
  487. package/migrations/0005_subscription-published-channel.sql +0 -3
  488. package/migrations/0006_loop-max-turns.sql +0 -3
package/.env.defaults CHANGED
@@ -10,13 +10,14 @@
10
10
  # two packages crashes boot naming both. Reader declares: every knob your code reads appears in
11
11
  # your file — the floor guarantees it set, so code carries no inline fallback.
12
12
  #
13
- # Cascade (low → high precedence last writer wins):
13
+ # Source classes (low → high precedence; higher classes win):
14
14
  # assembled .env.defaults floor (this file + every installed member's, uniqueness-checked)
15
15
  # < ~/.plurnk/.env (your home config — seeded once, yours to keep)
16
16
  # < ./.env (per-project, current directory)
17
17
  # < --env-file=… / --config=…
18
18
  # < shell environment
19
19
  # < --<knob> CLI flags (the 1:1 mirror: --service-max-turns <-> PLURNK_SERVICE_MAX_TURNS)
20
+ # Ordering among repeated explicit files is currently unspecified (#84).
20
21
  # Feature-flag bools use `=== "1"` exactly, never `=== "true"`. `~/` expands to your home.
21
22
 
22
23
  # --- Storage ---
@@ -41,31 +42,36 @@ PLURNK_HOST=127.0.0.1
41
42
  PLURNK_PORT=3044
42
43
 
43
44
  # --- Loop control ---
45
+ # Optional default child-provider alias. Unset = each WORK/FORK child inherits
46
+ # its spawning loop's provider. Clients may override this per top-level loop.
47
+ # PLURNK_MODEL_CHILD=fast
44
48
  # Operator turn ceiling. -1 (default) = no cap (loops end via SEND, budget,
45
49
  # strikes, or cycle detection). A positive value is an inviolable hard cap a
46
- # per-call loop.run({maxTurns}) cannot exceed (min wins).
50
+ # CoreSeam runLoop({maxTurns}) request cannot exceed (min wins).
47
51
  PLURNK_SERVICE_MAX_TURNS=-1
48
52
  # Per-emission op ceiling. -1 (default) = no cap: every generated op dispatches (a runaway
49
53
  # op-loop is a sampler concern, not grounds to drop already-generated work). A positive value
50
54
  # is an operator ceiling a client may tighten per workspace via workspace.create settings.maxCommands
51
55
  # (min wins), never raise past (#232).
52
56
  PLURNK_SERVICE_MAX_COMMANDS=-1
57
+ # Live & demo test harness story timeout (ms) — 10 minutes (600000ms).
58
+ PLURNK_SERVICE_LIVE_TIMEOUT=600000
53
59
  # Proposal resolution bound (ms). Empty = a stopped world waits for its human indefinitely;
54
- # set to auto-cancel unattended (resolves cancel, outcome=timeout).
60
+ # a finite positive value auto-cancels unattended (outcome=timeout). Every other explicit
61
+ # value is invalid and fails at the proposal lifecycle owner.
55
62
  PLURNK_SERVICE_PROPOSAL_TIMEOUT_MS=
56
63
  # Turn-hold runtimes: while a listed runtime's stream is in flight the cycle pauses (no next
57
64
  # turn) until it concludes. Bounded by _HOLD_MS, fail-open at the cap. Empty = no holds.
58
- # A bare name holds ALL of that runtime's spawns; `<runtime>:<effect>` (e.g. github:read) holds
59
- # only that effect-class — an MCP server's read tools opt in while its host mutations background (#485).
65
+ # A bare name holds all of that runtime's spawns; `<runtime>:<effect>` holds only
66
+ # that effect class.
60
67
  PLURNK_SERVICE_EXEC_HOLD=search,images,videos,news,map,music,it,science,social,downloadable
61
68
  PLURNK_SERVICE_EXEC_HOLD_MS=300000
62
- # Post-EXEC breath: after a turn fires a non-inline EXEC whose spawn is still in
63
- # flight at the turn boundary, wait this many ms before assembling the next packet
64
- # so a fast exec's output can land in it instead of a turn later. A fixed grace
65
- # beat, NOT a wait-for-completion (slow execs proceed + surface via the wake path).
66
- # 0 = off (the model sees fast-exec output a turn late, as today).
67
- PLURNK_SERVICE_EXEC_WAIT_MS=1000
68
- # Exec poll backoff (#521, §exec-poll): a parked exec with NO explicit `<,P>` cadence is no longer
69
+ # Optimistic worker settlement: before model dispatch, allow newly started
70
+ # streams or a completion wake with live siblings this many ms to quiesce.
71
+ # Settlement ends immediately at quiescence and never extends its first
72
+ # deadline; survivors follow the monitored lifecycle. 0 = off.
73
+ PLURNK_SERVICE_OPTIMISTIC_WAIT_MS=5000
74
+ # Exec poll backoff (#521, {§exec-poll}): a parked exec with NO explicit `<,P>` cadence is no longer
69
75
  # park-blind-forever — the loop wakes on an exponential backoff so the model regains a turn to read
70
76
  # partial output and re-park a slow long-runner or KILL a stuck one. Wake N fires at BASE·2^min(N,TURNS-1)
71
77
  # seconds (60,120,240,…,7680), then holds at the cap. An explicit `<,P>` wins; `<,0>` opts out (blind).
@@ -88,9 +94,20 @@ PLURNK_SERVICE_LOOP_TIMEOUT=86400000
88
94
  # PLURNK_QUESTIONS=0
89
95
 
90
96
  # --- Engine rails ---
97
+ # Maximum characters retained from caught runtime diagnostics in a model-facing
98
+ # Problem detail. Complete errors remain in daemon diagnostics.
99
+ PLURNK_SERVICE_ERROR_DETAIL_LIMIT=512
91
100
  PLURNK_SERVICE_MAX_STRIKES=3
101
+ # Completed responses that do not form a valid PLAN...SEND turn are retried
102
+ # beneath the same engine turn and against the identical packet.
103
+ PLURNK_SERVICE_EMISSION_ATTEMPTS=3
92
104
  PLURNK_SERVICE_MIN_CYCLES=3
93
105
  PLURNK_SERVICE_MAX_CYCLE_PERIOD=4
106
+ # Requiem is an out-of-band forensic interview. Reasoning-heavy witnesses may
107
+ # consume most of the first budget before emitting testimony; an empty
108
+ # length-limited response receives the retry budget.
109
+ PLURNK_SERVICE_REQUIEM_MAX_TOKENS=16384
110
+ PLURNK_SERVICE_REQUIEM_RETRY_MAX_TOKENS=32768
94
111
 
95
112
  # --- Schemes ---
96
113
  # (Workspace root for file ops is per-workspace — supplied at
@@ -98,47 +115,46 @@ PLURNK_SERVICE_MAX_CYCLE_PERIOD=4
98
115
  # stored on workspaces.project_root. No env-level default.)
99
116
 
100
117
  # --- Git integration ---
101
- # PLURNK_SERVICE_GIT_ALLOWED — hard ceiling for git membership + integration (repo telemetry,
102
- # EXEC[git]). =1 permits it (then declared repos + per-workspace config decide; a client
118
+ # PLURNK_SERVICE_GIT_ALLOWED — hard ceiling for Git membership + integration (repository
119
+ # telemetry, EXEC[git]). =1 permits it (then project repository + workspace config decide; a client
103
120
  # may deny its own workspace via workspace.create settings.git:false, #232); =0 flatly
104
121
  # denies it service-wide, un-re-enableable (the sandbox/benchmark lockout).
105
122
  PLURNK_SERVICE_GIT_ALLOWED=1
106
- # PLURNK_SERVICE_GIT_AUTO — default repo declaration. =1 auto-declares an implicit `repo` at
107
- # project_root (no-op when it isn't a git tree); =0 declares nothing clients add
108
- # repos explicitly via the `repo` overlay. SPEC §membership forest.
123
+ # PLURNK_SERVICE_GIT_AUTO — automatic project-repository membership. =1 includes the Git
124
+ # repository containing project_root; =0 leaves `pick` as the only membership source.
109
125
  PLURNK_SERVICE_GIT_AUTO=1
110
- # PLURNK_SERVICE_GIT_NATIVE git READ backend. Default (0) = in-process isomorphic-git:
111
- # portable, sandbox-safe, no subprocess, hermetic by construction. =1 routes membership +
112
- # status to the system git binary in-process membership measures ~8x native (~130ms at
113
- # 20k files) and the status read ~55x. Native is also the explicit remedy when
114
- # isomorphic-git cannot read a repository shape; it requires the git binary.
115
- PLURNK_SERVICE_GIT_NATIVE=0
126
+ # PLURNK_SERVICE_GIT_ISO - git READ backend. Default (0) uses the native Git
127
+ # binary. =1 explicitly selects the slower, in-process isomorphic-git backend
128
+ # for a deployment that cannot spawn Git. The two backends never fail over.
129
+ PLURNK_SERVICE_GIT_ISO=0
130
+ # Maximum stdout/stderr payload accepted from one native Git subprocess. The
131
+ # optional in-process reader does not use this bound.
132
+ PLURNK_SERVICE_GIT_OUTPUT_MAX_BYTES=67108864
116
133
 
117
- # PLURNK_SERVICE_ARRIVAL_PREVIEW_LINES the arrival law (§arrival-law, #499): content another
118
- # actor pushes at a worker (a prompt, a child's deliverable, terminal stream output) rides OPEN only up to this many
119
- # lines AND 80×N chars (the char cap guards single-line bombs); over, a bounded head + the
120
- # address + the full price ride instead. Self-invited content (a worker's own READ/FIND) is
121
- # budget-bounded, never previewed. 16 = generous but not dangerous.
122
- PLURNK_SERVICE_ARRIVAL_PREVIEW_LINES=16
134
+ # Ordinary bounded OPEN-body projection. READ/FIND results render their selected
135
+ # operation result complete; every other log body renders at most these
136
+ # independent line and character bounds. A truncated body carries its canonical
137
+ # log URI.
138
+ PLURNK_SERVICE_PREVIEW_LINES=16
139
+ PLURNK_SERVICE_PREVIEW_CHARS=2560
123
140
 
124
- # --- Reference docs (auto-READ at turn 1) ---
125
- # PLURNK_SERVICE_MD_<ALIAS>=<path> materializes <path>'s markdown as a plurnk://<ALIAS>.md
141
+ # --- Reference docs (auto-READ at turn 0) ---
142
+ # PLURNK_SERVICE_MD_<ALIAS>=<path> materializes <path>'s markdown as a
143
+ # worker://plurnk/<ALIAS>.md
126
144
  # entry the model READs at turn 0 — an idiomatic way to inject standing context
127
145
  # (an ordinary entry + READ op, not a bespoke packet section). ~ expands to home;
128
146
  # relative paths resolve against the package root. A client may add its own docs
129
147
  # per workspace via workspace.create settings.mdDocs (content, not a path); those UNION
130
148
  # with these env docs, keyed by alias — the client wins a collision (#231).
131
149
  # Commented out = no docs by default. (The operating policy is NOT a doc: readSystemPolicy
132
- # already renders ~/.plurnk/AGENTS.md as the ## Plurnk Service Policy section — pointing a
150
+ # already renders ~/.plurnk/AGENTS.md as the ## Policy section — pointing a
133
151
  # PLURNK_SERVICE_MD_* alias at it injects the same file twice.)
134
- # Turn-0 catalog preview, FIND-served (foisted as FIND(<scheme>:///**) per scheme) so a run
135
- # opens oriented, not blank. The model's OWN surface known/unknown (memory), run (scratch),
136
- # plurnk (docs) always foists FULL when the preview is on, never truncated: a partial view of
137
- # the model's own memory reads as withheld. This knob's first-N cap applies ONLY to the FILE list
138
- # (FIND(file:///**)), the one catalog that's external and arbitrarily large: -1 = the whole tree
139
- # (everything full); N = the first N files (memory still full); 0 = preview off entirely (the model
140
- # FINDs on demand). Servicewide default; a client overrides per workspace via workspace.create
141
- # settings.filesItems (#231).
152
+ # Turn-0 catalog preview so a run opens oriented, not blank. Folder-capable schemes use
153
+ # FIND(<scheme>:///*): direct entries plus exact dir/** summaries carrying each subtree's
154
+ # recursive item and token counts. Curated kernel docs remain recursive, demonstrating both
155
+ # navigation forms. -1 = each ordinary FIND's markerless first page; N = an explicit first-N
156
+ # project-file page (other schemes remain markerless); 0 = preview off. Service-wide default;
157
+ # a client overrides per workspace through workspace.create settings.filesItems (#231).
142
158
  PLURNK_SERVICE_FILES_ITEMS=-1
143
159
 
144
160
  # Number of full SHA-256 revision characters rendered on each model-facing
@@ -146,6 +162,10 @@ PLURNK_SERVICE_FILES_ITEMS=-1
146
162
  # abbreviation is display correlation only, never identity or comparison.
147
163
  PLURNK_SERVICE_EDIT_RECEIPT_REVISION_CHARS=8
148
164
 
165
+ # Number of Git commit characters rendered in model-facing branch receipts.
166
+ # The durable batch retains complete commit ids; this is display-only.
167
+ PLURNK_SERVICE_BRANCH_RECEIPT_REVISION_CHARS=8
168
+
149
169
  # Number of neighboring lines (or top-level JSON items) rendered on each side
150
170
  # of an EDIT's resulting range. The model can READ for arbitrary final content.
151
171
  PLURNK_SERVICE_EDIT_RECEIPT_CONTEXT_LINES=2
@@ -156,54 +176,34 @@ PLURNK_SERVICE_EDIT_RECEIPT_CONTEXT_LINES=2
156
176
  # the ceiling fails hard (508 — no queue, no retry); the acting run counts itself.
157
177
  PLURNK_SERVICE_WORKSPACE_WORKERS_MAX_ACTIVE=-1
158
178
 
159
- # --- The window partition (§tokenomics-window-partition) — PER ALIAS (#352) ---
160
- # The window splits WITHOUT remainder: promptBudget = min(CONTEXT_WINDOW, real window) REASONING
161
- # COMPLETION SAFETY is what the service may send; REASONING+COMPLETION is the generation
162
- # envelope (max_tokens on every call — no decode is unbounded); SAFETY covers chat-template
163
- # overhead. The prompt ceiling is DERIVED, never set directly.
179
+ # --- Prompt budget and packing safety — PER ALIAS (#352) ---
180
+ # Providers report physical context and response capacity. Core's natural prompt budget is the
181
+ # remaining physical input room after the response envelope and SAFETY margin.
164
182
  #
165
- # #507 (owner-ruled): the generation envelope is PROVIDER-owned window + reserves live in the
166
- # provider tier (`PLURNK_PROVIDERS_CONTEXT_WINDOW` / `PLURNK_PROVIDERS_REASONING_RESERVE` /
167
- # `PLURNK_PROVIDERS_COMPLETION_RESERVE`, ingested from the backend or pinned there; percent or
168
- # absolute forms see plurnk-providers/.env.defaults). Core keeps ONE knob: SAFETY, the ruler's
169
- # own packing margin (a service fact, not a model fact). Resolves per alias: _<alias> wins over bare.
183
+ # PROMPT_BUDGET is optional virtual pressure: it makes the model-facing gauge and grinder enforce
184
+ # a smaller input budget without changing provider context or generation settings. Unset uses the
185
+ # natural physical prompt budget; a set value can only tighten it. Both core knobs resolve per
186
+ # alias: _<alias> wins over bare.
170
187
  # The retired PLURNK_SERVICE_{CONTEXT_WINDOW,REASONING,COMPLETION} names FAIL HARD at boot naming
171
188
  # their successors — a stale .env never silently loses its envelope.
189
+ # PLURNK_SERVICE_PROMPT_BUDGET=128000
172
190
  PLURNK_SERVICE_SAFETY=1024
173
191
  #
174
- # PLURNK_SERVICE_BUDGET_MERMAID — the Budget section as visual mermaid (#440, §budget-mermaid). Default
175
- # `on`: the ceiling/usage/free headline PLUS three budget-scaled diagrams (turn-composition treemap,
176
- # heaviest-items xychart, used/free pie) — budget-awareness at a glance, and the pie doubles as a
177
- # training exemplar for the model's own user-facing SENDs. Validated to render on GitHub. Set `off` to
178
- # A/B against the tabular baseline (#440's before/after measurement).
179
- PLURNK_SERVICE_BUDGET_MERMAID=on
180
- #
181
192
  # LOCAL aliases (llama-server): the window is PROBED and the reserves DERIVE from it in the
182
193
  # provider tier (percent defaults) — zero-config. Absolute pins, when wanted, are provider-tier:
183
194
  # PLURNK_PROVIDERS_{REASONING,COMPLETION}_RESERVE_<alias> (see plurnk-providers/.env.defaults).
184
- # COUPLING (F7): per-request numeric reasoning budgets are IGNORED by llama-server — a local
185
- # thinking model's serving box MUST clamp via --reasoning-budget = the alias's resolved reasoning
186
- # reserve, or the reserve is fiction. The service warns at boot. Pinned absolutes exceeding the
187
- # detected window fail HARD at build time, naming the provider-tier knobs.
188
-
189
- # PLURNK_SERVICE_VERSION_POLL_TTL — how long (ms) discover caches its npm-registry version poll
190
- # (service + client `latest`) before a background refresh. Best-effort; the poll never
191
- # blocks discover, and offline/registry-down omits `latest`. ~hourly is plenty. #235
192
- PLURNK_SERVICE_VERSION_POLL_TTL=3600000
193
- # Grammar-constrained sampling: SELECTS the GBNF variant the provider constrains every
194
- # generate() to, so capable backends can only sample valid plurnk DSL. A bare name
195
- # (plurnk.gbnf) is a variant shipped by @plurnk/plurnk-grammar; a path is your own; =0
196
- # (or empty) disables.
197
- #
198
-
195
+ # The provider sends the resolved reasoning allowance per request; no llama-server launch-flag
196
+ # synchronization is required. Pinned absolutes exceeding the detected window fail HARD at build
197
+ # time, naming the provider-tier knobs.
199
198
 
200
199
  # --- Plugins (third-party trust) ---
201
- # (PLURNK_PLUGINS_TRUSTED_ONLY moved to @plurnk/plurnk-plugins — reader-declares: the
200
+ # (PLURNK_PLUGINS_TRUSTED_ONLY lives in @plurnk/plurnk-meta — reader-declares: the
202
201
  # trust rule's one implementation lives there and so does its knob.)
203
202
 
204
203
  # PLURNK_SERVICE_DOCS_EXCLUDE — comma list of scheme/exec names dropped from BOTH the teaching oneliner
205
- # and the materialized pull-doc on load. The self-evident (plurnk/file) + retired (exec) names the
206
- # model needs no doc for. Empty → exclude nothing. Unknown names are inert (a filter, not a contract).
204
+ # and the materialized pull-doc on load. The default names are omitted from this generic
205
+ # catalogue because their teaching is owned elsewhere. Empty → exclude nothing. Unknown names
206
+ # are inert (a filter, not a contract).
207
207
  PLURNK_SERVICE_DOCS_EXCLUDE="plurnk,file,exec"
208
208
 
209
209
  # PLURNK_SERVICE_PACKET_INJECT — an operator markdown file injected as a section right after the teaching
@@ -211,23 +211,20 @@ PLURNK_SERVICE_DOCS_EXCLUDE="plurnk,file,exec"
211
211
  # `~/` expands to home. Unset → no section. The pressure valve for "improve the packet" without a fork.
212
212
  # PLURNK_SERVICE_PACKET_INJECT="~/injection.md"
213
213
 
214
- # PLURNK_SERVICE_POLICY — the operating-policy markdown, rendered as the ## Plurnk Service Policy
214
+ # PLURNK_SERVICE_POLICY — the operating-policy markdown, rendered as the ## Policy
215
215
  # section. Unset = the seeded ~/.plurnk/AGENTS.md; a path = that file; EXPLICITLY empty = policy off.
216
216
  # PLURNK_SERVICE_POLICY=
217
217
  # PLURNK_SERVICE_PROJECT — a per-project policy markdown (relative to projectRoot). Unset = <root>/AGENTS.md.
218
218
  # PLURNK_SERVICE_PROJECT=
219
- # PLURNK_SERVICE_REQUIREMENTS — override the requirements.md recency-footer path (relative to the package
220
- # root). Unset = the packaged requirements.md.
219
+ # PLURNK_SERVICE_REQUIREMENTS — Recap source override (relative to the package root).
220
+ # Unset = the packaged requirements.md.
221
221
  # PLURNK_SERVICE_REQUIREMENTS=
222
222
 
223
223
  # --- Semantic search (~query chunking) ---
224
- # Project Semantics tiles each entry into <=window chunks so a large body is fully
225
- # searchable, not truncated. ACTIVE only when the installed embedder reports its
226
- # tokenizer; otherwise one whole-entry chunk (today's behavior). The chunk knobs are read
227
- # only when chunking is active.
228
- # Ranked results returned by a markerless `FIND(...):~query:FIND`. A positive
229
- # integer `<K>` overrides this count; a decimal marker selects by similarity.
230
- PLURNK_SERVICE_SEMANTIC_TOP_K=10
224
+ # Project Semantics tiles each vector-eligible entry into <=window chunks so a large
225
+ # body is fully searchable, not truncated. Chunking requires the embedder's exact
226
+ # counter or an exact fallback tokenizer; an estimate refuses semantic derivation.
227
+ # The chunk knobs are read only when an embedder declares its input window.
231
228
  # Chunk budget in TOKENS. EMPTY (the default) = the installed embedder's reported
232
229
  # window — NO model-specific number is assumed, so it scales to whatever embedder you
233
230
  # install. Set a positive value ONLY to cap below the window (e.g. to sweep
@@ -241,20 +238,27 @@ PLURNK_SERVICE_SEMANTIC_CHUNK_OVERLAP=0.15
241
238
  PLURNK_SERVICE_MAX_EMBED_SIZE=0
242
239
  # =1 forces the FTS-only path even with the embeddings package installed — the ~query
243
240
  # degrades to keyword ranking and no vectors are derived (no MiniLM pool spun up). For
244
- # hosts/runs that don't want vector search; the fast test lane sets it in .env.test.
241
+ # hosts/runs that don't want vector search; the Mock bootstrap and constrained benchmarks set it.
245
242
  PLURNK_SERVICE_EMBED_DISABLE=0
246
243
 
247
244
  # Which exec runtimes the search gate treats as searches — the per-turn cap and identical-query
248
- # dedup apply to these (the search family delegates page fetches to the entry() sink; §exec-entry-sink).
245
+ # dedup apply to these (the search family delegates page fetches to the entry() sink; {§exec-entry-sink}).
249
246
  PLURNK_SERVICE_SEARCH_RUNTIMES=search
250
247
  # Per-turn search flood cap: the (N+1)th search EXEC in one turn is refused 429 (dedup of
251
248
  # identical queries is unconditional and separate — it strikes and serves the prior results).
252
249
  PLURNK_SERVICE_SEARCH_MAX_PER_TURN=3
253
- # FIND match-render budget: a FIND whose match set exceeds this returns a COUNT + narrow-your-query
254
- # steer instead of enumerating every match (§find-count-not-contents) a repo-scale FIND(**) over
255
- # a 19k-entry workspace grinds clean instead of overflowing the window. 0/unset = no gate.
256
- PLURNK_SERVICE_FIND_MAX_MATCHES=500
250
+ # Comma-separated file pathname patterns omitted from search derivations. Content remains directly
251
+ # readable. Patterns without `/` match the basename; patterns with `/` match the full pathname.
252
+ # Uses body-matcher glob syntax; the first match is the observable exclusion reason. Empty = none.
253
+ PLURNK_SERVICE_SEARCH_EXCLUDE=*.min.*,*.map,package-lock.json,npm-shrinkwrap.json,packages.lock.json,yarn.lock,pnpm-lock.yaml,bun.lockb,Cargo.lock,poetry.lock,uv.lock,Pipfile.lock,Gemfile.lock,composer.lock,go.sum,flake.lock,gradle.lockfile,*/dist/*,dist/*,*/build/*,build/*,*/.next/*,.next/*,*/node_modules/*,node_modules/*,*/vendor/*,vendor/*,*/coverage/*,coverage/*,*/.vuepress/*,.vuepress/*,*/.nuxt/*,.nuxt/*
257
254
  # Derivation producer concurrency: how many entries may materialize graphs/chunk plans at once.
258
255
  # Unset uses a host-relative square-root fan-out; the separate embedding pool uses the available
259
256
  # cores. A positive integer is an exact operator budget; -1 explicitly claims every available core.
260
257
  PLURNK_SERVICE_DERIVE_CONCURRENCY=
258
+ # Maximum symbol or reference rows written by one search-index SQLite statement.
259
+ PLURNK_SERVICE_DERIVE_STORE_BATCH=1024
260
+ # Approximate number of aggregate progress milestones emitted during a multi-item
261
+ # indexing pass. This also controls per-item embedding milestones.
262
+ PLURNK_SERVICE_DERIVE_PROGRESS_STEPS=10
263
+ # Minimum interval between progress notices from a long-running individual item.
264
+ PLURNK_SERVICE_DERIVE_PROGRESS_HEARTBEAT_MS=5000
package/INSTALL.md CHANGED
@@ -1,54 +1,69 @@
1
1
  # Configuring plurnk-service
2
2
 
3
- Agent guide. Read this, then generate a `~/.plurnk/.env` fit to the user's box and intent. `.env.defaults` is the terse machine floor the authoritative flag list and defaults (the ASSEMBLED catalog of every installed package's file lands at `~/.plurnk/.env.defaults`); this is its reasoning layer. Every claimed coupling below is enforced by a `test/intg` check, so it is current with the installed version.
3
+ Operator guide. Put machine-specific choices in `~/.plurnk/.env`. Each installed package's `.env.defaults` is the authoritative list and floor for the knobs that package owns; the daemon assembles those files into the read-only `~/.plurnk/.env.defaults` catalog on every boot.
4
4
 
5
5
  ## Install
6
6
 
7
7
  ```
8
8
  npm install -g @plurnk/plurnk-service
9
- plurnk-service start # `migrate` first if the DB is uninitialized
9
+ plurnk-service migrate # apply the disposable version-1 schema baseline
10
+ plurnk-service start
10
11
  ```
11
12
 
12
- First run creates `~/.plurnk/`: `.env` (yours, seeded once with a model picker — **edit this**), `AGENTS.md` (the operating policy, yours), `.env.defaults` + `INSTALL.md` (package-owned references, **refreshed every boot** — never edit them). No model ships active; a fresh daemon runs until `PLURNK_MODEL` is set.
13
+ First start creates `~/.plurnk/`: `.env` (yours, seeded once with a model picker — **edit this**), `AGENTS.md` (the operating policy, yours), `.env.defaults` + `INSTALL.md` (package-owned references, **refreshed every boot** — never edit them). No model ships active; the daemon can boot without one, but model loops fail until `PLURNK_MODEL` selects a declared alias.
13
14
 
14
- Optional vector search: `npm i @plurnk/plurnk-mimetypes-embeddings` (heavy native deps). Absent `~query` degrades to FTS keyword ranking.
15
+ The default service includes local embeddings. An explicitly disabled or unavailable embedder makes `~query` fall back to FTS keyword ranking. Set `PLURNK_MIMETYPES_EMBED_BASE_URL` to use a remote OpenAI-compatible embedding endpoint instead.
15
16
 
16
17
  ## The cascade (where a value actually comes from)
17
18
 
18
- Lowest precedence first; the last writer wins:
19
+ Higher-priority source classes override lower ones ({§operator-config-precedence}):
19
20
 
20
- 1. **the assembled `.env.defaults` floor** — every installed package's shipped file, one owner per key (a collision crashes boot naming both), evolves with the installed versions.
21
- 2. **`~/.plurnk/.env.defaults`** — the readable assembled legend, regenerated each boot (a reference, not a place to edit).
22
- 3. **`~/.plurnk/.env`** the user's home config, seeded once, theirs to keep. **Write generated config here.**
23
- 4. **`./.env`** per-project, current working directory.
24
- 5. **`--env-file=<path>` / `--config=<path>`** explicit layers.
25
- 6. **shell environment** beats every file.
26
- 7. **`--<flag>` CLI args** top layer, overrides all.
21
+ | Priority | Source | Role |
22
+ |---------:|----------------------------------------|--------------------------------------------------------------------------------------------|
23
+ | 1 | Installed packages' assembled defaults | Versioned floor; one owner per key. A collision fails boot naming both owners. |
24
+ | 2 | `~/.plurnk/.env` | User configuration, seeded once and never overwritten. **Write generated config here.** |
25
+ | 3 | `./.env` | Configuration for the current working directory. |
26
+ | 4 | `--config=<path>` | One explicit service configuration file. |
27
+ | 5 | `--env-file*` | Repeatable explicit files; later files win. The `-if-exists` form skips absent files. |
28
+ | 6 | Shell environment | Process-level operator values. |
29
+ | 7 | `--<flag>` | Highest-priority service CLI value. |
27
30
 
28
- CLI flags are the **1:1 mirror** of the env vars: strip `PLURNK_`, lowercase, `_`→`-`. `PLURNK_SERVICE_MAX_TURNS` ↔ `--service-max-turns`; `PLURNK_MODEL` `--model`. The flag surface and `--help` are generated from the service's `.env.defaults`, so a var and its flag never diverge. Feature-flag bools are `=== "1"` exactly (never `"true"`); `~/` expands to home.
31
+ `~/.plurnk/.env.defaults` is the regenerated assembled catalog, not another input layer. The service CLI mirrors only the `PLURNK_*` variables declared by the service package's own `.env.defaults`: strip `PLURNK_`, lowercase, and replace `_` with `-` (`PLURNK_SERVICE_MAX_TURNS` ↔ `--service-max-turns`). Installed plugin knobs remain available through env/config files and the assembled catalog without implicitly expanding the service executable's CLI ({§operator-config-cli-flags}). Feature-flag booleans use `1`, not `true`; `~/` expands to home.
29
32
 
30
33
  ## The prefix law (who owns a flag)
31
34
 
32
- The prefix is the **owning package**: `PLURNK_SERVICE_*` (this daemon), `PLURNK_PROVIDERS_*`, `PLURNK_MIMETYPES_*`, `PLURNK_EXECS_*`, `PLURNK_SCHEMES_HTTP_*`, `PLURNK_AGUI_*` (the AG-UI module's own knobs), `PLURNK_CLIENT_*` (the CLI). **Bare `PLURNK_*` is reserved** for the front-door + cross-package set no single package owns: `PLURNK_MODEL[_*]`, `PLURNK_BASEURL_*`, `PLURNK_HOST`/`PLURNK_PORT` (the connection rendezvous), and `PLURNK_PLUGINS_TRUSTED_ONLY` (the cross-family plugin gate). Vendor keys (`OPENAI_API_KEY`, `FIREWORKS_API_KEY`…) are vendor conventions — untouched.
35
+ Family prefixes identify the semantic owner: `PLURNK_SERVICE_*` (this daemon), `PLURNK_PROVIDERS_*`, `PLURNK_MIMETYPES_*`, `PLURNK_EXECS_*`, `PLURNK_SCHEMES_HTTP_*`, `PLURNK_AGUI_*` (the AG-UI module), and `PLURNK_CLIENT_*` (the CLI). Bare `PLURNK_*` names are reserved for front-door or cross-family concepts such as model aliases, endpoint binding, and plugin trust. Even a cross-family key has one physical reader and one `.env.defaults` owner; “shared” never means duplicate implementations. Vendor keys (`OPENAI_API_KEY`, `FIREWORKS_API_KEY`, and peers) retain their vendor conventions.
33
36
 
34
- A bare flag is a signal: more than one component depends on it. A prefixed one is single-owner. When a flag is `REQUIRED`, an unset or old-named value **fails the boot loudly** naming the var never a silent default.
37
+ When a value is required, an unset or retired name fails boot naming the violated key rather than selecting a silent default.
35
38
 
36
39
  ## Couplings (the edges an agent gets wrong)
37
40
 
38
41
  These are relationships *between* flags. Set them as a unit.
39
42
 
40
- - **The window partition is exact.** `promptBudget = min(PLURNK_SERVICE_CONTEXT_WINDOW, real window) − REASONING − COMPLETION − SAFETY`; `REASONING + COMPLETION` is the per-call `max_tokens`. Shipped invariant: any window ≥ 77Ki partitions to **exactly 65536** prompt tokens (`78848 − 4096 − 8192 − 1024`). Reserves exceeding the window fail the boot. *(Pinned: `Engine.budget` / `shipped-defaults`.)*
41
- - **Reasoning capacity is one number in three places.** `PLURNK_SERVICE_REASONING` (the partition's reserve) **must equal** `PLURNK_PROVIDERS_THINKING_CAPACITY` (the provider's thinking cap) **must equal** the serving box's `--reasoning-budget` launch flag. llama-server ignores per-request numeric budgets, so only the launch flag clamps it; a mismatch makes the reserve fiction. The daemon warns at boot when thinking is on. *(Pinned: `shipped-defaults` asserts the first equality.)*
43
+ - **Provider capacity and PLURNK pressure are separate.** Providers report
44
+ physical context and response capacity. Core derives the natural input
45
+ budget from those facts. Optional `PLURNK_SERVICE_PROMPT_BUDGET_<alias>`
46
+ only tightens the model-facing gauge and grinder; it is never sent to the
47
+ provider and never changes generation settings.
48
+ - **Reasoning capacity is request-scoped on llama-server.**
49
+ `PLURNK_PROVIDERS_REASONING_RESERVE_<alias>` is the adaptive cumulative
50
+ response allowance. An explicit `PLURNK_PROVIDERS_REASONING_BUDGET_<alias>`
51
+ may tighten but cannot exceed it. The provider sends the allowance on every
52
+ request; no serving-box flag synchronization is required.
42
53
  - **Local GBNF is optional.** The PLURNK language is always parsed normally.
43
54
  Local llama-server users may set `PLURNK_PROVIDERS_GBNF_<alias>`; transport
44
55
  and enforcement are verified at boot. Cloud and endpoint-managed aliases
45
- leave it unset. Pin `PLURNK_PROVIDERS_LLAMA_SERVER_<alias>=1` only when a
46
- llama-server cannot be fingerprinted reliably.
47
- - **A think-trained model must think somewhere.** `PLURNK_PROVIDERS_THINKING=off` reroutes a reasoning model's thought into the grammar's legal free zone as prose. Keep it `on` with a capacity; providers auto-clamp thinking on in-band grammar backends, so one setting is right everywhere.
56
+ leave it unset. A configured PLURNK rail requires reasoning `adaptive` or
57
+ `on`; pairing it with `off` is invalid. Pin
58
+ `PLURNK_PROVIDERS_LLAMA_SERVER_<alias>=1` only when a llama-server cannot be
59
+ fingerprinted reliably.
60
+ - **A reasoning model must reason somewhere.**
61
+ `PLURNK_PROVIDERS_REASONING_<alias>` selects `off`, `adaptive`, or `on`.
62
+ An explicit `on` also requires a positive provider reasoning budget.
48
63
 
49
64
  ## Profiles (examples, not a decision tree — adapt to the real box)
50
65
 
51
- - **Local GPU (llama-server).** `PLURNK_MODEL_local="openai/<name>"`, `OPENAI_BASE_URL=http://127.0.0.1:<port>`, `PLURNK_MODEL=local`, `PLURNK_PROVIDERS_LLAMA_SERVER_local=1`, thinking `on`/`4096` **with the box launched `--reasoning-budget 4096`**. Full rails, exact tokenization.
66
+ - **Local GPU (llama-server).** `PLURNK_MODEL_local="openai/<name>"`, `OPENAI_BASE_URL=http://127.0.0.1:<port>`, `PLURNK_MODEL=local`, `PLURNK_PROVIDERS_GBNF_local=plurnk.gbnf`. The provider detects llama-server, verifies its GBNF transport, and derives a request-scoped reasoning allowance from the detected window. Add `PLURNK_PROVIDERS_LLAMA_SERVER_local=1` only when the endpoint cannot be fingerprinted reliably.
52
67
  - **Cloud, bring-your-own-key.** `PLURNK_MODEL_cloud="openrouter/<model>"`, `OPENROUTER_API_KEY=…`, `PLURNK_MODEL=cloud`. No local GBNF or `LLAMA_SERVER` pin.
53
68
  - **plurnk.ai endpoint.** `PLURNK_MODEL_plurnk="plurnk/plurnk"`, `PLURNK_API_KEY=…`, `PLURNK_MODEL=plurnk`.
54
69
  - **Headless / CI / constrained container.** A CPU-only box should NOT disable semantic search — it should point derivation at a real embedder: `PLURNK_MIMETYPES_EMBED_BASE_URL` (any OpenAI-compatible `/v1/embeddings` — a host GPU turns a CPU-hours corpus grind into seconds). Weak hardware is the target workload, not a reason to shed capability; `PLURNK_SERVICE_EMBED_DISABLE=1` exists for test lanes that deterministically assert non-semantic behavior, nothing else. Consider `PLURNK_SERVICE_MAX_TURNS=<n>` as a cost cap, `PLURNK_SERVICE_GIT_ALLOWED=0` to lock out git in a sandbox.
@@ -59,17 +74,28 @@ Each mirrors a `# --- section ---` in the floor; consult the floor for exact def
59
74
 
60
75
  - **Storage** — `PLURNK_SERVICE_DB_PATH`, and the optional `PLURNK_SERVICE_SQLITE_*` passthroughs (sqlrite already sets a safe WAL posture; tune only for a hot/large DB).
61
76
  - **Daemon transport** — bare `PLURNK_HOST`/`PLURNK_PORT`: THE client surface (the AG-UI+ listener, bound by the plurnk-agui module at boot). Production is single-listener; every first-party client rides it.
62
- - **Model aliases** — bare `PLURNK_MODEL` selects the active provider; `PLURNK_MODEL_<alias>` defines one; `PLURNK_BASEURL_<alias>` overrides its endpoint. The front door — keep these bare and short.
63
- - **Loop control / Engine rails** — `PLURNK_SERVICE_MAX_TURNS` (−1 = uncapped), `_MAX_COMMANDS`, `_MAX_STRIKES`, `_MIN_CYCLES`, `_MAX_CYCLE_PERIOD`, `_RPC_TIMEOUT`, `_LOOP_TIMEOUT`, `_PROPOSAL_TIMEOUT_MS`, `_EXEC_WAIT_MS`, `_EXEC_KILL_GRACE_MS`, `_SESSION_RUNS_MAX_ACTIVE`. Guardrails; the shipped values are sane.
77
+ - **Model aliases** — bare `PLURNK_MODEL` selects the active provider; `PLURNK_MODEL_<alias>` defines one; `PLURNK_BASEURL_<alias>` overrides its endpoint. Optional `PLURNK_MODEL_CHILD=<alias>` selects WORK/FORK descendants; unset inherits the spawning loop's provider. The front door — keep these bare and short.
78
+ - **Loop control / engine rails** — `PLURNK_SERVICE_MAX_TURNS` (−1 = uncapped), `_MAX_COMMANDS`, `_MAX_STRIKES`, `_EMISSION_ATTEMPTS`, `_MIN_CYCLES`, `_MAX_CYCLE_PERIOD`, `_LOOP_TIMEOUT`, `_PROPOSAL_TIMEOUT_MS`, `_EXEC_HOLD`, `_OPTIMISTIC_WAIT_MS`, `_EXEC_POLL_SEC`/`_TURNS`, `_EXEC_KILL_GRACE_MS`, `_WORKSPACE_WORKERS_MAX_ACTIVE`.
64
79
  - **Git** — `PLURNK_SERVICE_GIT_ALLOWED` (0 = hard sandbox lockout), `_GIT_AUTO`.
65
- - **Packet / reference docs** — `PLURNK_SERVICE_FILES_ITEMS` (turn-1 file catalog cap), `_PROMPT_PREVIEW_CHARS`, `_DOCS_EXCLUDE`, `_PACKET_INJECT` (operator markdown section), `_POLICY`/`_PROJECT`/`_REQUIREMENTS` (policy + footer overrides; unset = the seeded/packaged defaults), `_MD_<alias>` (inject a markdown doc as a turn-0 entry).
80
+ - **Packet / reference docs** — `PLURNK_SERVICE_FILES_ITEMS` (turn-0 shallow file-map cap), `_PREVIEW_LINES`/`_PREVIEW_CHARS`, `_EDIT_RECEIPT_REVISION_CHARS`/`_CONTEXT_LINES`, `_BRANCH_RECEIPT_REVISION_CHARS`, `_DOCS_EXCLUDE`, `_PACKET_INJECT` (operator markdown section), `_POLICY`/`_PROJECT` (policy overrides), `_REQUIREMENTS` (Recap-source override), `_MD_<alias>` (materialized reference entry).
66
81
  - **Providers** — the portable provider knobs and defaults are defined by
67
82
  `@plurnk/plurnk-providers/.env.defaults`; any provider knob may take an alias
68
83
  suffix that wins over the bare fallback.
69
- - **The window partition** — `PLURNK_SERVICE_CONTEXT_WINDOW`/`_REASONING`/`_ASSISTANT`/`_SAFETY` (see Couplings).
84
+ - **Provider capacity and prompt budget** —
85
+ `PLURNK_PROVIDERS_CONTEXT_WINDOW`/`_REASONING_RESERVE`/`_COMPLETION_RESERVE`
86
+ describe provider capacity. `PLURNK_SERVICE_PROMPT_BUDGET` applies optional
87
+ virtual pressure; `PLURNK_SERVICE_SAFETY` is the packing margin.
70
88
  - **Plugins** — bare `PLURNK_PLUGINS_TRUSTED_ONLY` (0/unset = load all installed; a value = `@plurnk/*` plus an allowlist).
71
- - **Semantic search** — `PLURNK_SERVICE_SEMANTIC_TOP_K` (markerless result count), `_SEMANTIC_CHUNK_TOKENS`/`_CHUNK_OVERLAP` (service-side chunking), `PLURNK_SERVICE_EMBED_DISABLE` (FTS-only), `PLURNK_MIMETYPES_EMBED_WORKERS` (the embedder's pool — mimetypes-owned).
72
- - **Schemes: http** — `PLURNK_SCHEMES_HTTP_FETCH_TIMEOUT`/`_SALVAGE_MIN_BODY_CHARS`/`_IDLE_TIMEOUT` (required on the HTML render path), optional Playwright/Chromium knobs.
73
- - **Execs** `PLURNK_EXECS_<runtime>=0` disables a runtime; `PLURNK_EXECS_MCP_<server>` bridges an MCP server; `PLURNK_EXECS_SEARCH_SEARXNG_URL` enables web search (unset = search off).
89
+ - **Semantic search** — `PLURNK_SERVICE_SEMANTIC_CHUNK_TOKENS`/`_CHUNK_OVERLAP` (service-side chunking), `PLURNK_SERVICE_EMBED_DISABLE` (FTS-only), `PLURNK_MIMETYPES_EMBED_WORKERS` (the embedder's pool — mimetypes-owned).
90
+ - **Schemes: http** — `PLURNK_SCHEMES_HTTP_FETCH_TIMEOUT`, `_TTL_MS`, optional `# TAVILY_API_KEY=`, and `PLURNK_SCHEMES_HTTP_TAVILY_DEPTH`/`_TAVILY_TIMEOUT_MS`.
91
+ - **Execs** - `PLURNK_EXECS_<runtime>=0` disables a runtime; `PLURNK_EXECS_SEARCH_SEARXNG_URL` enables web search (unset = search off).
92
+ - **Hooks** — `PLURNK_HOOKS_COMMAND` plus JSON `PLURNK_HOOKS_ARGS` invokes one exact no-shell command for the core events selected by `PLURNK_HOOKS_EVENTS`; see `@plurnk/plurnk-hooks/README.md`.
93
+ - **Observability** — standard `OTEL_*` env ({§observability-boundary}):
94
+ `OTEL_TRACES_EXPORTER`/`OTEL_METRICS_EXPORTER` (`otlp` or `console`; unset
95
+ keeps the signal off), `OTEL_SERVICE_NAME` (default `plurnk-service`),
96
+ `OTEL_SDK_DISABLED` (opt out), and the OTLP exporters' own
97
+ `OTEL_EXPORTER_OTLP_*` settings. An unconfigured daemon never loads the OTel
98
+ SDK. Prompts, reasoning, file bodies, URLs, secrets, and plugin payloads are
99
+ never exported.
74
100
 
75
101
  The client's own knobs live under `PLURNK_CLIENT_*` (`--workspace`, `--run`, `--yolo`, `--json`…) — see `plurnk --help`.
package/README.md CHANGED
@@ -7,28 +7,38 @@ operation dispatch. Its client surface is AG-UI over HTTP/SSE through
7
7
 
8
8
  ## What an agent can do
9
9
 
10
- Grammar ops: `PLAN` reason · `READ`/`EDIT` files · `FIND` search · `EXEC` run shell/code · `SEND` message or conclude · `COPY`/`MOVE`/`KILL` manage · `OPEN`/`FOLD` curate its own context.
10
+ The exact model-facing language and operation set are owned by
11
+ [`plurnk.md`](https://github.com/plurnk/plurnk-service/blob/main/plurnk-contracts/plurnk.md). In brief, an agent can:
11
12
 
12
- Over schemes: `file://` project files · `exec://` command output · `http(s)://` web fetch · `worker://` scratch + sibling agent runs (commons/own-space/spawn/fork/message) · `prompt://` the task frame · `skill://` bundled reference · `log://` own history.
13
+ - inspect and modify admitted project files and durable worker entries;
14
+ - search lexical, structural, graph, and embedding-derived indexes;
15
+ - run registered executors and observe their runtime-named streams;
16
+ - delegate to workers, communicate, and collect their results; and
17
+ - curate its addressable log with tagged `FOLD`, `OPEN`, and `KILL` operations.
13
18
 
14
- ## Loop model
19
+ ## Lifecycle model
15
20
 
16
- Workspace = the shared world (one filesystem + membership overlay). Run = one agent's private log. Loop = one `prompt ops SEND[terminal]` cycle; every turn leads with `PLAN`. Runs fork and message each other — many clients, many runs, one workspace.
21
+ Workspace = the shared world (one filesystem + membership overlay). Worker = one actor and its private history over that world. Loop = one queued-to-terminal unit of work within a worker; each loop contains turns, and every model turn leads with `PLAN`. Workers fork and message each other — many clients, many workers, one workspace.
17
22
 
18
23
  ## Integration
19
24
 
20
- Clients use AG-UI management actions and run streams exposed by
25
+ Clients use AG-UI management actions and AG-UI Run streams exposed by
21
26
  `@plurnk/plurnk-agui`. Core supplies an in-process daemon seam; it does not open
22
27
  a second client transport.
23
28
 
24
- ## Run
29
+ ## Start
25
30
 
26
31
  ```
27
32
  npm install -g @plurnk/plurnk-service
28
- plurnk-service start # daemon (`migrate` initializes the DB)
33
+ plurnk-service migrate # apply the disposable version-1 schema baseline
34
+ plurnk-service start # daemon
29
35
  ```
30
36
 
31
- Config + state live in `~/.plurnk/` (created on first run): put your config in `~/.plurnk/.env` (yours, seeded once); the DB defaults to `~/.plurnk/plurnk.db`. Provider-agnostic point `PLURNK_MODEL` at any vendor. **[`INSTALL.md`](./INSTALL.md) is the config guide** — the cascade, the prefix taxonomy, the coupling matrix, and profiles for common deployments; `.env.defaults` is the terse machine floor it breaks down (per-package, assembled at boot). Also exports `{ Engine, Daemon, SchemeRegistry }` for in-process embedding.
37
+ Config + state live in `~/.plurnk/` (created on first start): put your config in `~/.plurnk/.env` (yours, seeded once); the DB defaults to `~/.plurnk/plurnk.db`. Declare a provider/model as `PLURNK_MODEL_<alias>=<provider>/<model-id>`, then select that alias with `PLURNK_MODEL=<alias>`. **[`INSTALL.md`](./INSTALL.md) is the config guide** — the cascade, prefix ownership, coupled settings, and profiles; each installed package's `.env.defaults` supplies its exact machine floor.
38
+
39
+ The 1.x package retains its frozen root library barrel for SemVer compatibility;
40
+ it is not the client boundary and gains no new APIs. Programmatic forensic use
41
+ imports `@plurnk/plurnk-service/digest`.
32
42
 
33
43
  ## Contract & siblings
34
44
 
@@ -37,14 +47,19 @@ Config + state live in `~/.plurnk/` (created on first run): put your config in `
37
47
  - `@plurnk/plurnk-schemes` — addressable resource contract.
38
48
  - `@plurnk/plurnk-mimetypes` — content handling contract.
39
49
  - `@plurnk/plurnk-execs` — executable capability contract.
50
+ - `@plurnk/plurnk-hooks` — selected lifecycle events delivered to exact commands.
51
+
52
+ ## Observability
53
+
54
+ The daemon can emit OpenTelemetry traces and low-cardinality metrics through the standard `OTEL_*` environment ({§observability-boundary}): `OTEL_TRACES_EXPORTER` / `OTEL_METRICS_EXPORTER` select `otlp` or `console` per signal, `OTEL_SERVICE_NAME` names the service, and `OTEL_SDK_DISABLED` opts out. Unconfigured, the daemon never loads the SDK. The boundary observes lifecycle (workspace, loop, turn, provider, parse, dispatch, proposal, stream, digest) without ever recording prompts, reasoning, file bodies, URLs, secrets, or plugin payloads.
40
55
 
41
56
  ## Semantic search
42
57
 
43
- `FIND`'s `~query` ranks semantically via an optional embedder peer, `@plurnk/plurnk-mimetypes-embeddings` (heavy native deps; not installed by default). Absent `~query` falls back to FTS keyword ranking and `start` prints an `embedder inactive` notice. Enable vector search: `npm i @plurnk/plurnk-mimetypes-embeddings`.
58
+ The default service installation includes `@plurnk/plurnk-mimetypes-embeddings`, so `FIND`'s `~query` uses embedding cosine ranking without a separate package install. `PLURNK_SERVICE_EMBED_DISABLE=1` explicitly selects FTS keyword ranking; a missing required artifact is a broken installation and refuses startup. A remote OpenAI-compatible embedder can replace the included local path; see [`INSTALL.md`](./INSTALL.md).
44
59
 
45
60
  ## The file sandbox
46
61
 
47
- Plurnk sees what git sees. The model's file surface is defined by three external grantors your explicit client adds, your git's own inclusion rules (tracked plus untracked-not-ignored, minus ignored), and the AGENTS.md policy knob and by nothing else: a file inside the project that none of these admit does not exist for the model, and your gitignored secrets can be neither read nor overwritten. Writes are narrower still: create-only inside the project (and only where the result will be visible), proposal-gated edits on members, read-only beyond the root unless you explicitly grant otherwise. The shell (EXEC) deliberately reaches beyond this sandbox gate it accordingly; it is your machine's perimeter, not the grammar's. Details: SPEC §scheme-address ({§fs-namespace} through {§fs-world-state}).
62
+ Plurnk sees what Git or the client explicitly admits. The AGENTS.md policy path is injected separately as privileged policy, not as a file entry. A project file admitted by neither Git nor the client does not exist to the model, and an ignored secret can be neither read nor overwritten. New files can be created only inside the project and only where the result will remain visible; member edits are proposal-gated; an outside-root member is read-only unless the client explicitly granted it. `EXEC` deliberately reaches beyond this file sandbox, so its proposal policy is the machine perimeter. Details: SPEC {§scheme-address} ({§fs-namespace} through {§fs-world-state}).
48
63
 
49
64
  ## Tests
50
65