@plurnk/plurnk-service 1.3.12 → 1.4.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 (469) hide show
  1. package/.env.defaults +84 -77
  2. package/INSTALL.md +50 -25
  3. package/README.md +24 -10
  4. package/SPEC.md +2311 -928
  5. package/dist/Paths.d.ts +4 -1
  6. package/dist/Paths.d.ts.map +1 -1
  7. package/dist/Paths.js +23 -21
  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 +3 -3
  18. package/dist/content/index.d.ts.map +1 -1
  19. package/dist/content/index.js +1 -1
  20. package/dist/content/index.js.map +1 -1
  21. package/dist/content/line-marker.d.ts +6 -9
  22. package/dist/content/line-marker.d.ts.map +1 -1
  23. package/dist/content/line-marker.js +7 -11
  24. package/dist/content/line-marker.js.map +1 -1
  25. package/dist/content/matcher.d.ts +14 -25
  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-resolve.d.ts +8 -4
  36. package/dist/content/read-resolve.d.ts.map +1 -1
  37. package/dist/content/read-resolve.js +101 -49
  38. package/dist/content/read-resolve.js.map +1 -1
  39. package/dist/core/BranchReceipt.d.ts +7 -0
  40. package/dist/core/BranchReceipt.d.ts.map +1 -0
  41. package/dist/core/BranchReceipt.js +27 -0
  42. package/dist/core/BranchReceipt.js.map +1 -0
  43. package/dist/core/BudgetOverflow.d.ts +23 -0
  44. package/dist/core/BudgetOverflow.d.ts.map +1 -0
  45. package/dist/core/BudgetOverflow.js +61 -0
  46. package/dist/core/BudgetOverflow.js.map +1 -0
  47. package/dist/core/BudgetReadout.d.ts +8 -0
  48. package/dist/core/BudgetReadout.d.ts.map +1 -0
  49. package/dist/core/BudgetReadout.js +79 -0
  50. package/dist/core/BudgetReadout.js.map +1 -0
  51. package/dist/core/ChannelWrite.d.ts +28 -9
  52. package/dist/core/ChannelWrite.d.ts.map +1 -1
  53. package/dist/core/ChannelWrite.js +28 -21
  54. package/dist/core/ChannelWrite.js.map +1 -1
  55. package/dist/core/ChannelWrite.sql +11 -10
  56. package/dist/core/CoreSchemeServices.d.ts +10 -4
  57. package/dist/core/CoreSchemeServices.d.ts.map +1 -1
  58. package/dist/core/CoreSchemeServices.js +7 -1
  59. package/dist/core/CoreSchemeServices.js.map +1 -1
  60. package/dist/core/Dispatcher.d.ts +29 -20
  61. package/dist/core/Dispatcher.d.ts.map +1 -1
  62. package/dist/core/Dispatcher.js +1488 -599
  63. package/dist/core/Dispatcher.js.map +1 -1
  64. package/dist/core/DurableStatement.d.ts +6 -0
  65. package/dist/core/DurableStatement.d.ts.map +1 -0
  66. package/dist/core/DurableStatement.js +51 -0
  67. package/dist/core/DurableStatement.js.map +1 -0
  68. package/dist/core/Engine.d.ts +48 -20
  69. package/dist/core/Engine.d.ts.map +1 -1
  70. package/dist/core/Engine.js +1208 -789
  71. package/dist/core/Engine.js.map +1 -1
  72. package/dist/core/Engine.sql +309 -217
  73. package/dist/core/EnvFlags.js +1 -1
  74. package/dist/core/EnvFlags.js.map +1 -1
  75. package/dist/core/ErrorDetail.d.ts +6 -0
  76. package/dist/core/ErrorDetail.d.ts.map +1 -0
  77. package/dist/core/ErrorDetail.js +20 -0
  78. package/dist/core/ErrorDetail.js.map +1 -0
  79. package/dist/core/ExecutorRegistry.d.ts +14 -3
  80. package/dist/core/ExecutorRegistry.d.ts.map +1 -1
  81. package/dist/core/ExecutorRegistry.js +56 -30
  82. package/dist/core/ExecutorRegistry.js.map +1 -1
  83. package/dist/core/GitBranch.d.ts +20 -0
  84. package/dist/core/GitBranch.d.ts.map +1 -0
  85. package/dist/core/GitBranch.js +110 -0
  86. package/dist/core/GitBranch.js.map +1 -0
  87. package/dist/core/JournalTurn.d.ts +9 -0
  88. package/dist/core/JournalTurn.d.ts.map +1 -0
  89. package/dist/core/JournalTurn.js +14 -0
  90. package/dist/core/JournalTurn.js.map +1 -0
  91. package/dist/core/JournalTurn.sql +10 -0
  92. package/dist/core/LogBody.d.ts +17 -0
  93. package/dist/core/LogBody.d.ts.map +1 -0
  94. package/dist/core/LogBody.js +148 -0
  95. package/dist/core/LogBody.js.map +1 -0
  96. package/dist/core/LoopFlagsReader.d.ts +7 -0
  97. package/dist/core/LoopFlagsReader.d.ts.map +1 -0
  98. package/dist/core/LoopFlagsReader.js +33 -0
  99. package/dist/core/LoopFlagsReader.js.map +1 -0
  100. package/dist/core/LoopLifecycle.d.ts +8 -1
  101. package/dist/core/LoopLifecycle.d.ts.map +1 -1
  102. package/dist/core/LoopLifecycle.js +55 -9
  103. package/dist/core/LoopLifecycle.js.map +1 -1
  104. package/dist/core/LoopLifecycle.sql +9 -3
  105. package/dist/core/NoticeChannel.d.ts +13 -0
  106. package/dist/core/NoticeChannel.d.ts.map +1 -0
  107. package/dist/core/NoticeChannel.js +40 -0
  108. package/dist/core/NoticeChannel.js.map +1 -0
  109. package/dist/core/Owner.d.ts +0 -1
  110. package/dist/core/Owner.d.ts.map +1 -1
  111. package/dist/core/Owner.js +2 -5
  112. package/dist/core/Owner.js.map +1 -1
  113. package/dist/core/PacketBuilder.d.ts +25 -24
  114. package/dist/core/PacketBuilder.d.ts.map +1 -1
  115. package/dist/core/PacketBuilder.js +313 -375
  116. package/dist/core/PacketBuilder.js.map +1 -1
  117. package/dist/core/ProblemLog.d.ts +26 -0
  118. package/dist/core/ProblemLog.d.ts.map +1 -0
  119. package/dist/core/ProblemLog.js +58 -0
  120. package/dist/core/ProblemLog.js.map +1 -0
  121. package/dist/core/ProposalLifecycle.d.ts +15 -21
  122. package/dist/core/ProposalLifecycle.d.ts.map +1 -1
  123. package/dist/core/ProposalLifecycle.js +291 -78
  124. package/dist/core/ProposalLifecycle.js.map +1 -1
  125. package/dist/core/ProviderInstantiate.d.ts.map +1 -1
  126. package/dist/core/ProviderInstantiate.js +51 -48
  127. package/dist/core/ProviderInstantiate.js.map +1 -1
  128. package/dist/core/SchemeRegistry.d.ts +14 -8
  129. package/dist/core/SchemeRegistry.d.ts.map +1 -1
  130. package/dist/core/SchemeRegistry.js +189 -114
  131. package/dist/core/SchemeRegistry.js.map +1 -1
  132. package/dist/core/ServiceTeardown.d.ts +11 -0
  133. package/dist/core/ServiceTeardown.d.ts.map +1 -0
  134. package/dist/core/ServiceTeardown.js +70 -0
  135. package/dist/core/ServiceTeardown.js.map +1 -0
  136. package/dist/core/StoredPacket.d.ts +29 -0
  137. package/dist/core/StoredPacket.d.ts.map +1 -0
  138. package/dist/core/StoredPacket.js +147 -0
  139. package/dist/core/StoredPacket.js.map +1 -0
  140. package/dist/core/StrikeRail.d.ts +1 -2
  141. package/dist/core/StrikeRail.d.ts.map +1 -1
  142. package/dist/core/StrikeRail.js +25 -55
  143. package/dist/core/StrikeRail.js.map +1 -1
  144. package/dist/core/WorkerControlAddress.d.ts +17 -0
  145. package/dist/core/WorkerControlAddress.d.ts.map +1 -0
  146. package/dist/core/WorkerControlAddress.js +44 -0
  147. package/dist/core/WorkerControlAddress.js.map +1 -0
  148. package/dist/core/WorkerName.d.ts +31 -0
  149. package/dist/core/WorkerName.d.ts.map +1 -0
  150. package/dist/core/WorkerName.js +95 -0
  151. package/dist/core/WorkerName.js.map +1 -0
  152. package/dist/core/WorkerName.sql +36 -0
  153. package/dist/core/WorkspaceGate.d.ts +14 -0
  154. package/dist/core/WorkspaceGate.d.ts.map +1 -0
  155. package/dist/core/WorkspaceGate.js +155 -0
  156. package/dist/core/WorkspaceGate.js.map +1 -0
  157. package/dist/core/caps/CapsResolve.d.ts +1 -1
  158. package/dist/core/caps/CapsResolve.d.ts.map +1 -1
  159. package/dist/core/caps/CapsResolve.js.map +1 -1
  160. package/dist/core/caps/DbChannelCaps.d.ts +5 -11
  161. package/dist/core/caps/DbChannelCaps.d.ts.map +1 -1
  162. package/dist/core/caps/DbChannelCaps.js +24 -8
  163. package/dist/core/caps/DbChannelCaps.js.map +1 -1
  164. package/dist/core/caps/DbEntryCaps.d.ts +4 -13
  165. package/dist/core/caps/DbEntryCaps.d.ts.map +1 -1
  166. package/dist/core/caps/DbEntryCaps.js +15 -6
  167. package/dist/core/caps/DbEntryCaps.js.map +1 -1
  168. package/dist/core/caps/DbNotifyCaps.d.ts +1 -1
  169. package/dist/core/caps/DbNotifyCaps.d.ts.map +1 -1
  170. package/dist/core/caps/DbNotifyCaps.js +12 -11
  171. package/dist/core/caps/DbNotifyCaps.js.map +1 -1
  172. package/dist/core/caps/DbProjectionCaps.d.ts +5 -5
  173. package/dist/core/caps/DbProjectionCaps.d.ts.map +1 -1
  174. package/dist/core/caps/DbProjectionCaps.js +21 -4
  175. package/dist/core/caps/DbProjectionCaps.js.map +1 -1
  176. package/dist/core/caps/DbSubscriptionCaps.d.ts +4 -4
  177. package/dist/core/caps/DbSubscriptionCaps.d.ts.map +1 -1
  178. package/dist/core/caps/DbSubscriptionCaps.js +57 -62
  179. package/dist/core/caps/DbSubscriptionCaps.js.map +1 -1
  180. package/dist/core/caps/DbTagCaps.d.ts +5 -12
  181. package/dist/core/caps/DbTagCaps.d.ts.map +1 -1
  182. package/dist/core/caps/DbTagCaps.js +14 -7
  183. package/dist/core/caps/DbTagCaps.js.map +1 -1
  184. package/dist/core/content-hash.js +1 -1
  185. package/dist/core/content-hash.js.map +1 -1
  186. package/dist/core/env-defaults.d.ts.map +1 -1
  187. package/dist/core/env-defaults.js.map +1 -1
  188. package/dist/core/fork.d.ts.map +1 -1
  189. package/dist/core/fork.js +55 -30
  190. package/dist/core/fork.js.map +1 -1
  191. package/dist/core/fork.sql +41 -27
  192. package/dist/core/git-env.d.ts +2 -0
  193. package/dist/core/git-env.d.ts.map +1 -1
  194. package/dist/core/git-env.js +13 -18
  195. package/dist/core/git-env.js.map +1 -1
  196. package/dist/core/git-iso.d.ts.map +1 -1
  197. package/dist/core/git-iso.js +9 -15
  198. package/dist/core/git-iso.js.map +1 -1
  199. package/dist/core/git-membership.d.ts +1 -1
  200. package/dist/core/git-membership.d.ts.map +1 -1
  201. package/dist/core/git-membership.js +198 -146
  202. package/dist/core/git-membership.js.map +1 -1
  203. package/dist/core/git-state.d.ts.map +1 -1
  204. package/dist/core/git-state.js +10 -11
  205. package/dist/core/git-state.js.map +1 -1
  206. package/dist/core/owner.sql +1 -1
  207. package/dist/core/packet-inject.d.ts.map +1 -1
  208. package/dist/core/packet-inject.js +7 -11
  209. package/dist/core/packet-inject.js.map +1 -1
  210. package/dist/core/packet-wire.d.ts +2 -20
  211. package/dist/core/packet-wire.d.ts.map +1 -1
  212. package/dist/core/packet-wire.js +242 -368
  213. package/dist/core/packet-wire.js.map +1 -1
  214. package/dist/core/plurnk-uri.d.ts +12 -1
  215. package/dist/core/plurnk-uri.d.ts.map +1 -1
  216. package/dist/core/plurnk-uri.js +49 -29
  217. package/dist/core/plurnk-uri.js.map +1 -1
  218. package/dist/core/results.d.ts +16 -5
  219. package/dist/core/results.d.ts.map +1 -1
  220. package/dist/core/results.js +27 -18
  221. package/dist/core/results.js.map +1 -1
  222. package/dist/core/ruler_count.d.ts +4 -0
  223. package/dist/core/ruler_count.d.ts.map +1 -0
  224. package/dist/core/ruler_count.js +7 -0
  225. package/dist/core/ruler_count.js.map +1 -0
  226. package/dist/core/scheme-types.d.ts +9 -11
  227. package/dist/core/scheme-types.d.ts.map +1 -1
  228. package/dist/core/scheme-types.js.map +1 -1
  229. package/dist/core/search-gate.d.ts.map +1 -1
  230. package/dist/core/search-gate.js +3 -11
  231. package/dist/core/search-gate.js.map +1 -1
  232. package/dist/core/teaching-corpus.d.ts +6 -0
  233. package/dist/core/teaching-corpus.d.ts.map +1 -0
  234. package/dist/core/teaching-corpus.js +23 -0
  235. package/dist/core/teaching-corpus.js.map +1 -0
  236. package/dist/core/teaching.d.ts +0 -1
  237. package/dist/core/teaching.d.ts.map +1 -1
  238. package/dist/core/teaching.js +2 -8
  239. package/dist/core/teaching.js.map +1 -1
  240. package/dist/core/token-ruler.d.ts.map +1 -1
  241. package/dist/core/token-ruler.js +3 -16
  242. package/dist/core/token-ruler.js.map +1 -1
  243. package/dist/core/turn-scheduler.d.ts +1 -1
  244. package/dist/core/turn-scheduler.d.ts.map +1 -1
  245. package/dist/core/turn-scheduler.js +1 -1
  246. package/dist/core/turn-scheduler.js.map +1 -1
  247. package/dist/core/worker-cap.d.ts +2 -4
  248. package/dist/core/worker-cap.d.ts.map +1 -1
  249. package/dist/core/worker-cap.js +13 -4
  250. package/dist/core/worker-cap.js.map +1 -1
  251. package/dist/core/{run-ops.sql → worker-ops.sql} +11 -11
  252. package/dist/core/workspace-settings.d.ts.map +1 -1
  253. package/dist/core/workspace-settings.js +17 -9
  254. package/dist/core/workspace-settings.js.map +1 -1
  255. package/dist/digest/Digest.d.ts +2 -1
  256. package/dist/digest/Digest.d.ts.map +1 -1
  257. package/dist/digest/Digest.js +337 -138
  258. package/dist/digest/Digest.js.map +1 -1
  259. package/dist/digest/digest.sql +19 -10
  260. package/dist/index.d.ts.map +1 -1
  261. package/dist/index.js +3 -5
  262. package/dist/index.js.map +1 -1
  263. package/dist/matrix/live-specimen.d.ts +9 -0
  264. package/dist/matrix/live-specimen.d.ts.map +1 -0
  265. package/dist/matrix/live-specimen.js +37 -0
  266. package/dist/matrix/live-specimen.js.map +1 -0
  267. package/dist/observe/api.d.ts +6 -0
  268. package/dist/observe/api.d.ts.map +1 -0
  269. package/dist/observe/api.js +11 -0
  270. package/dist/observe/api.js.map +1 -0
  271. package/dist/observe/init.d.ts +7 -0
  272. package/dist/observe/init.d.ts.map +1 -0
  273. package/dist/observe/init.js +159 -0
  274. package/dist/observe/init.js.map +1 -0
  275. package/dist/observe/metrics.d.ts +6 -0
  276. package/dist/observe/metrics.d.ts.map +1 -0
  277. package/dist/observe/metrics.js +15 -0
  278. package/dist/observe/metrics.js.map +1 -0
  279. package/dist/observe/spans.d.ts +4 -0
  280. package/dist/observe/spans.d.ts.map +1 -0
  281. package/dist/observe/spans.js +51 -0
  282. package/dist/observe/spans.js.map +1 -0
  283. package/dist/schemes/EffectPolicy.d.ts +1 -0
  284. package/dist/schemes/EffectPolicy.d.ts.map +1 -1
  285. package/dist/schemes/EffectPolicy.js +5 -2
  286. package/dist/schemes/EffectPolicy.js.map +1 -1
  287. package/dist/schemes/Exec.d.ts +6 -11
  288. package/dist/schemes/Exec.d.ts.map +1 -1
  289. package/dist/schemes/Exec.js +364 -247
  290. package/dist/schemes/Exec.js.map +1 -1
  291. package/dist/schemes/ExecOutputScheme.d.ts +8 -7
  292. package/dist/schemes/ExecOutputScheme.d.ts.map +1 -1
  293. package/dist/schemes/ExecOutputScheme.js +48 -9
  294. package/dist/schemes/ExecOutputScheme.js.map +1 -1
  295. package/dist/schemes/File.d.ts +7 -11
  296. package/dist/schemes/File.d.ts.map +1 -1
  297. package/dist/schemes/File.js +279 -142
  298. package/dist/schemes/File.js.map +1 -1
  299. package/dist/schemes/Log.d.ts +4 -8
  300. package/dist/schemes/Log.d.ts.map +1 -1
  301. package/dist/schemes/Log.js +475 -208
  302. package/dist/schemes/Log.js.map +1 -1
  303. package/dist/schemes/Log.sql +62 -30
  304. package/dist/schemes/Prompt.d.ts +3 -2
  305. package/dist/schemes/Prompt.d.ts.map +1 -1
  306. package/dist/schemes/Prompt.js +9 -6
  307. package/dist/schemes/Prompt.js.map +1 -1
  308. package/dist/schemes/Skill.d.ts +1 -1
  309. package/dist/schemes/Skill.d.ts.map +1 -1
  310. package/dist/schemes/Skill.js +2 -3
  311. package/dist/schemes/Skill.js.map +1 -1
  312. package/dist/schemes/Worker.d.ts +8 -16
  313. package/dist/schemes/Worker.d.ts.map +1 -1
  314. package/dist/schemes/Worker.js +179 -69
  315. package/dist/schemes/Worker.js.map +1 -1
  316. package/dist/schemes/_entry-chunk.d.ts.map +1 -1
  317. package/dist/schemes/_entry-chunk.js +12 -5
  318. package/dist/schemes/_entry-chunk.js.map +1 -1
  319. package/dist/schemes/_entry-crud.d.ts +10 -9
  320. package/dist/schemes/_entry-crud.d.ts.map +1 -1
  321. package/dist/schemes/_entry-crud.js +59 -13
  322. package/dist/schemes/_entry-crud.js.map +1 -1
  323. package/dist/schemes/_entry-crud.sql +20 -8
  324. package/dist/schemes/_entry-find.d.ts +20 -15
  325. package/dist/schemes/_entry-find.d.ts.map +1 -1
  326. package/dist/schemes/_entry-find.js +339 -174
  327. package/dist/schemes/_entry-find.js.map +1 -1
  328. package/dist/schemes/_entry-find.sql +20 -8
  329. package/dist/schemes/_entry-graph.d.ts +4 -2
  330. package/dist/schemes/_entry-graph.d.ts.map +1 -1
  331. package/dist/schemes/_entry-graph.js +55 -31
  332. package/dist/schemes/_entry-graph.js.map +1 -1
  333. package/dist/schemes/_entry-graph.sql +37 -22
  334. package/dist/schemes/_entry-manifest.d.ts +10 -15
  335. package/dist/schemes/_entry-manifest.d.ts.map +1 -1
  336. package/dist/schemes/_entry-manifest.js +50 -268
  337. package/dist/schemes/_entry-manifest.js.map +1 -1
  338. package/dist/schemes/_entry-ops.d.ts +9 -14
  339. package/dist/schemes/_entry-ops.d.ts.map +1 -1
  340. package/dist/schemes/_entry-ops.js +149 -77
  341. package/dist/schemes/_entry-ops.js.map +1 -1
  342. package/dist/schemes/_entry-ops.sql +1 -1
  343. package/dist/schemes/_entry-semantic.d.ts +23 -8
  344. package/dist/schemes/_entry-semantic.d.ts.map +1 -1
  345. package/dist/schemes/_entry-semantic.js +141 -60
  346. package/dist/schemes/_entry-semantic.js.map +1 -1
  347. package/dist/schemes/_entry-semantic.sql +63 -45
  348. package/dist/schemes/_entry-send.d.ts +3 -4
  349. package/dist/schemes/_entry-send.d.ts.map +1 -1
  350. package/dist/schemes/_entry-send.js +48 -23
  351. package/dist/schemes/_entry-send.js.map +1 -1
  352. package/dist/schemes/_path-scope.d.ts +23 -0
  353. package/dist/schemes/_path-scope.d.ts.map +1 -0
  354. package/dist/schemes/_path-scope.js +61 -0
  355. package/dist/schemes/_path-scope.js.map +1 -0
  356. package/dist/schemes/_search-candidate.d.ts +20 -0
  357. package/dist/schemes/_search-candidate.d.ts.map +1 -0
  358. package/dist/schemes/_search-candidate.js +19 -0
  359. package/dist/schemes/_search-candidate.js.map +1 -0
  360. package/dist/schemes/_search-exclusion.d.ts +7 -0
  361. package/dist/schemes/_search-exclusion.d.ts.map +1 -0
  362. package/dist/schemes/_search-exclusion.js +23 -0
  363. package/dist/schemes/_search-exclusion.js.map +1 -0
  364. package/dist/schemes/_search-index.d.ts +6 -0
  365. package/dist/schemes/_search-index.d.ts.map +1 -0
  366. package/dist/schemes/_search-index.js +326 -0
  367. package/dist/schemes/_search-index.js.map +1 -0
  368. package/dist/schemes/cosine.js +1 -1
  369. package/dist/schemes/cosine.js.map +1 -1
  370. package/dist/schemes/exec-abort.js +3 -3
  371. package/dist/schemes/exec-abort.js.map +1 -1
  372. package/dist/schemes/exec-env.js +3 -3
  373. package/dist/schemes/exec-env.js.map +1 -1
  374. package/dist/server/BranchBatches.d.ts +48 -0
  375. package/dist/server/BranchBatches.d.ts.map +1 -0
  376. package/dist/server/BranchBatches.js +591 -0
  377. package/dist/server/BranchBatches.js.map +1 -0
  378. package/dist/server/Daemon.d.ts +36 -66
  379. package/dist/server/Daemon.d.ts.map +1 -1
  380. package/dist/server/Daemon.js +920 -446
  381. package/dist/server/Daemon.js.map +1 -1
  382. package/dist/server/DaemonModule.d.ts +31 -0
  383. package/dist/server/DaemonModule.d.ts.map +1 -0
  384. package/dist/server/DaemonModule.js +2 -0
  385. package/dist/server/DaemonModule.js.map +1 -0
  386. package/dist/server/branch-batch.sql +152 -0
  387. package/dist/server/client-input.d.ts +12 -0
  388. package/dist/server/client-input.d.ts.map +1 -1
  389. package/dist/server/client-input.js +262 -57
  390. package/dist/server/client-input.js.map +1 -1
  391. package/dist/server/dispatch-as-plurnk.d.ts +1 -1
  392. package/dist/server/dispatch-as-plurnk.d.ts.map +1 -1
  393. package/dist/server/dispatch-as-plurnk.js +15 -7
  394. package/dist/server/dispatch-as-plurnk.js.map +1 -1
  395. package/dist/server/drain.sql +92 -62
  396. package/dist/server/envelope.d.ts +2 -5
  397. package/dist/server/envelope.d.ts.map +1 -1
  398. package/dist/server/envelope.js +119 -95
  399. package/dist/server/envelope.js.map +1 -1
  400. package/dist/server/envelope.sql +19 -23
  401. package/dist/server/exec-poll-backoff.js +1 -1
  402. package/dist/server/exec-poll-backoff.js.map +1 -1
  403. package/dist/server/lifecycle-recovery.sql +79 -2
  404. package/dist/server/logEntry.d.ts +3 -1
  405. package/dist/server/logEntry.d.ts.map +1 -1
  406. package/dist/server/logEntry.js +4 -2
  407. package/dist/server/logEntry.js.map +1 -1
  408. package/dist/server/logEntry.sql +1 -1
  409. package/dist/server/loop-model.d.ts.map +1 -1
  410. package/dist/server/loop-model.js +22 -9
  411. package/dist/server/loop-model.js.map +1 -1
  412. package/dist/server/loopDocs.d.ts.map +1 -1
  413. package/dist/server/loopDocs.js +5 -4
  414. package/dist/server/loopDocs.js.map +1 -1
  415. package/dist/server/seam-entry-read.sql +15 -10
  416. package/dist/server/seam-log-read.sql +2 -2
  417. package/dist/server/seam-loop.sql +1 -1
  418. package/dist/server/seam-proposal-list.sql +17 -7
  419. package/dist/service.d.ts.map +1 -1
  420. package/dist/service.js +66 -60
  421. package/dist/service.js.map +1 -1
  422. package/migrations/001_schema.sql +897 -0
  423. package/package.json +57 -26
  424. package/dist/core/PluginLoader.d.ts +0 -20
  425. package/dist/core/PluginLoader.d.ts.map +0 -1
  426. package/dist/core/PluginLoader.js +0 -142
  427. package/dist/core/PluginLoader.js.map +0 -1
  428. package/dist/core/TelemetryChannel.d.ts +0 -37
  429. package/dist/core/TelemetryChannel.d.ts.map +0 -1
  430. package/dist/core/TelemetryChannel.js +0 -80
  431. package/dist/core/TelemetryChannel.js.map +0 -1
  432. package/dist/core/path-decode.d.ts +0 -3
  433. package/dist/core/path-decode.d.ts.map +0 -1
  434. package/dist/core/path-decode.js +0 -9
  435. package/dist/core/path-decode.js.map +0 -1
  436. package/dist/core/plugin-attribution.d.ts +0 -5
  437. package/dist/core/plugin-attribution.d.ts.map +0 -1
  438. package/dist/core/plugin-attribution.js +0 -39
  439. package/dist/core/plugin-attribution.js.map +0 -1
  440. package/dist/core/world-state.d.ts +0 -10
  441. package/dist/core/world-state.d.ts.map +0 -1
  442. package/dist/core/world-state.js +0 -35
  443. package/dist/core/world-state.js.map +0 -1
  444. package/dist/core/world-state.sql +0 -35
  445. package/dist/core/zero-pin.d.ts +0 -3
  446. package/dist/core/zero-pin.d.ts.map +0 -1
  447. package/dist/core/zero-pin.js +0 -16
  448. package/dist/core/zero-pin.js.map +0 -1
  449. package/dist/server/auto.d.ts +0 -6
  450. package/dist/server/auto.d.ts.map +0 -1
  451. package/dist/server/auto.js +0 -63
  452. package/dist/server/auto.js.map +0 -1
  453. package/dist/server/clientTurn.d.ts +0 -6
  454. package/dist/server/clientTurn.d.ts.map +0 -1
  455. package/dist/server/clientTurn.js +0 -22
  456. package/dist/server/clientTurn.js.map +0 -1
  457. package/dist/server/clientTurn.sql +0 -10
  458. package/dist/server/noProposals.d.ts +0 -6
  459. package/dist/server/noProposals.d.ts.map +0 -1
  460. package/dist/server/noProposals.js +0 -37
  461. package/dist/server/noProposals.js.map +0 -1
  462. package/dist/server/version-info.d.ts +0 -14
  463. package/dist/server/version-info.d.ts.map +0 -1
  464. package/dist/server/version-info.js +0 -69
  465. package/dist/server/version-info.js.map +0 -1
  466. package/migrations/0000-00-00.01_schema.sql +0 -536
  467. package/migrations/0004_loop-provider.sql +0 -3
  468. package/migrations/0005_subscription-published-channel.sql +0 -3
  469. 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 ---
@@ -43,7 +44,7 @@ PLURNK_PORT=3044
43
44
  # --- Loop control ---
44
45
  # Operator turn ceiling. -1 (default) = no cap (loops end via SEND, budget,
45
46
  # strikes, or cycle detection). A positive value is an inviolable hard cap a
46
- # per-call loop.run({maxTurns}) cannot exceed (min wins).
47
+ # CoreSeam runLoop({maxTurns}) request cannot exceed (min wins).
47
48
  PLURNK_SERVICE_MAX_TURNS=-1
48
49
  # Per-emission op ceiling. -1 (default) = no cap: every generated op dispatches (a runaway
49
50
  # op-loop is a sampler concern, not grounds to drop already-generated work). A positive value
@@ -51,12 +52,13 @@ PLURNK_SERVICE_MAX_TURNS=-1
51
52
  # (min wins), never raise past (#232).
52
53
  PLURNK_SERVICE_MAX_COMMANDS=-1
53
54
  # Proposal resolution bound (ms). Empty = a stopped world waits for its human indefinitely;
54
- # set to auto-cancel unattended (resolves cancel, outcome=timeout).
55
+ # a finite positive value auto-cancels unattended (outcome=timeout). Every other explicit
56
+ # value is invalid and fails at the proposal lifecycle owner.
55
57
  PLURNK_SERVICE_PROPOSAL_TIMEOUT_MS=
56
58
  # Turn-hold runtimes: while a listed runtime's stream is in flight the cycle pauses (no next
57
59
  # 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).
60
+ # A bare name holds all of that runtime's spawns; `<runtime>:<effect>` holds only
61
+ # that effect class.
60
62
  PLURNK_SERVICE_EXEC_HOLD=search,images,videos,news,map,music,it,science,social,downloadable
61
63
  PLURNK_SERVICE_EXEC_HOLD_MS=300000
62
64
  # Post-EXEC breath: after a turn fires a non-inline EXEC whose spawn is still in
@@ -65,7 +67,7 @@ PLURNK_SERVICE_EXEC_HOLD_MS=300000
65
67
  # beat, NOT a wait-for-completion (slow execs proceed + surface via the wake path).
66
68
  # 0 = off (the model sees fast-exec output a turn late, as today).
67
69
  PLURNK_SERVICE_EXEC_WAIT_MS=1000
68
- # Exec poll backoff (#521, §exec-poll): a parked exec with NO explicit `<,P>` cadence is no longer
70
+ # Exec poll backoff (#521, {§exec-poll}): a parked exec with NO explicit `<,P>` cadence is no longer
69
71
  # park-blind-forever — the loop wakes on an exponential backoff so the model regains a turn to read
70
72
  # 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
73
  # seconds (60,120,240,…,7680), then holds at the cap. An explicit `<,P>` wins; `<,0>` opts out (blind).
@@ -88,9 +90,20 @@ PLURNK_SERVICE_LOOP_TIMEOUT=86400000
88
90
  # PLURNK_QUESTIONS=0
89
91
 
90
92
  # --- Engine rails ---
93
+ # Maximum characters retained from caught runtime diagnostics in a model-facing
94
+ # Problem detail. Complete errors remain in daemon diagnostics.
95
+ PLURNK_SERVICE_ERROR_DETAIL_LIMIT=512
91
96
  PLURNK_SERVICE_MAX_STRIKES=3
97
+ # Completed responses that do not form a valid PLAN...SEND turn are retried
98
+ # beneath the same engine turn and against the identical packet.
99
+ PLURNK_SERVICE_EMISSION_ATTEMPTS=3
92
100
  PLURNK_SERVICE_MIN_CYCLES=3
93
101
  PLURNK_SERVICE_MAX_CYCLE_PERIOD=4
102
+ # Requiem is an out-of-band forensic interview. Reasoning-heavy witnesses may
103
+ # consume most of the first budget before emitting testimony; an empty
104
+ # length-limited response receives the retry budget.
105
+ PLURNK_SERVICE_REQUIEM_MAX_TOKENS=16384
106
+ PLURNK_SERVICE_REQUIEM_RETRY_MAX_TOKENS=32768
94
107
 
95
108
  # --- Schemes ---
96
109
  # (Workspace root for file ops is per-workspace — supplied at
@@ -98,47 +111,46 @@ PLURNK_SERVICE_MAX_CYCLE_PERIOD=4
98
111
  # stored on workspaces.project_root. No env-level default.)
99
112
 
100
113
  # --- 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
114
+ # PLURNK_SERVICE_GIT_ALLOWED — hard ceiling for Git membership + integration (repository
115
+ # telemetry, EXEC[git]). =1 permits it (then project repository + workspace config decide; a client
103
116
  # may deny its own workspace via workspace.create settings.git:false, #232); =0 flatly
104
117
  # denies it service-wide, un-re-enableable (the sandbox/benchmark lockout).
105
118
  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.
119
+ # PLURNK_SERVICE_GIT_AUTO — automatic project-repository membership. =1 includes the Git
120
+ # repository containing project_root; =0 leaves `pick` as the only membership source.
109
121
  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
122
+ # PLURNK_SERVICE_GIT_ISO - git READ backend. Default (0) uses the native Git
123
+ # binary. =1 explicitly selects the slower, in-process isomorphic-git backend
124
+ # for a deployment that cannot spawn Git. The two backends never fail over.
125
+ PLURNK_SERVICE_GIT_ISO=0
126
+ # Maximum stdout/stderr payload accepted from one native Git subprocess. The
127
+ # optional in-process reader does not use this bound.
128
+ PLURNK_SERVICE_GIT_OUTPUT_MAX_BYTES=67108864
116
129
 
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
130
+ # Universal OPEN-body preview bounds. Only model-origin READ/FIND results render
131
+ # complete; every other log body renders at most this many lines and characters.
132
+ # A truncated body carries the log URI for a deliberate full READ. Separate
133
+ # bounds prevent both multiline floods and single-line bombs.
134
+ PLURNK_SERVICE_PREVIEW_LINES=16
135
+ PLURNK_SERVICE_PREVIEW_CHARS=1280
123
136
 
124
- # --- Reference docs (auto-READ at turn 1) ---
125
- # PLURNK_SERVICE_MD_<ALIAS>=<path> materializes <path>'s markdown as a plurnk://<ALIAS>.md
137
+ # --- Reference docs (auto-READ at turn 0) ---
138
+ # PLURNK_SERVICE_MD_<ALIAS>=<path> materializes <path>'s markdown as a
139
+ # worker://plurnk/<ALIAS>.md
126
140
  # entry the model READs at turn 0 — an idiomatic way to inject standing context
127
141
  # (an ordinary entry + READ op, not a bespoke packet section). ~ expands to home;
128
142
  # relative paths resolve against the package root. A client may add its own docs
129
143
  # per workspace via workspace.create settings.mdDocs (content, not a path); those UNION
130
144
  # with these env docs, keyed by alias — the client wins a collision (#231).
131
145
  # 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
146
+ # already renders ~/.plurnk/AGENTS.md as the ## Policy section — pointing a
133
147
  # 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).
148
+ # Turn-0 catalog preview so a run opens oriented, not blank. Folder-capable schemes use
149
+ # FIND(<scheme>:///*): direct entries plus exact dir/** summaries carrying each subtree's
150
+ # recursive item and token counts. Curated kernel docs remain recursive, demonstrating both
151
+ # navigation forms. -1 = complete shallow maps; N = first N file-map rows (other schemes remain
152
+ # complete); 0 = preview off. Service-wide default; a client overrides per workspace through
153
+ # workspace.create settings.filesItems (#231).
142
154
  PLURNK_SERVICE_FILES_ITEMS=-1
143
155
 
144
156
  # Number of full SHA-256 revision characters rendered on each model-facing
@@ -146,6 +158,10 @@ PLURNK_SERVICE_FILES_ITEMS=-1
146
158
  # abbreviation is display correlation only, never identity or comparison.
147
159
  PLURNK_SERVICE_EDIT_RECEIPT_REVISION_CHARS=8
148
160
 
161
+ # Number of Git commit characters rendered in model-facing branch receipts.
162
+ # The durable batch retains complete commit ids; this is display-only.
163
+ PLURNK_SERVICE_BRANCH_RECEIPT_REVISION_CHARS=8
164
+
149
165
  # Number of neighboring lines (or top-level JSON items) rendered on each side
150
166
  # of an EDIT's resulting range. The model can READ for arbitrary final content.
151
167
  PLURNK_SERVICE_EDIT_RECEIPT_CONTEXT_LINES=2
@@ -156,54 +172,34 @@ PLURNK_SERVICE_EDIT_RECEIPT_CONTEXT_LINES=2
156
172
  # the ceiling fails hard (508 — no queue, no retry); the acting run counts itself.
157
173
  PLURNK_SERVICE_WORKSPACE_WORKERS_MAX_ACTIVE=-1
158
174
 
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.
175
+ # --- Prompt budget and packing safety — PER ALIAS (#352) ---
176
+ # Providers report physical context and response capacity. Core's natural prompt budget is the
177
+ # remaining physical input room after the response envelope and SAFETY margin.
164
178
  #
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.
179
+ # PROMPT_BUDGET is optional virtual pressure: it makes the model-facing gauge and grinder enforce
180
+ # a smaller input budget without changing provider context or generation settings. Unset uses the
181
+ # natural physical prompt budget; a set value can only tighten it. Both core knobs resolve per
182
+ # alias: _<alias> wins over bare.
170
183
  # The retired PLURNK_SERVICE_{CONTEXT_WINDOW,REASONING,COMPLETION} names FAIL HARD at boot naming
171
184
  # their successors — a stale .env never silently loses its envelope.
185
+ # PLURNK_SERVICE_PROMPT_BUDGET=128000
172
186
  PLURNK_SERVICE_SAFETY=1024
173
187
  #
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
188
  # LOCAL aliases (llama-server): the window is PROBED and the reserves DERIVE from it in the
182
189
  # provider tier (percent defaults) — zero-config. Absolute pins, when wanted, are provider-tier:
183
190
  # 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
-
191
+ # The provider sends the resolved reasoning allowance per request; no llama-server launch-flag
192
+ # synchronization is required. Pinned absolutes exceeding the detected window fail HARD at build
193
+ # time, naming the provider-tier knobs.
199
194
 
200
195
  # --- Plugins (third-party trust) ---
201
- # (PLURNK_PLUGINS_TRUSTED_ONLY moved to @plurnk/plurnk-plugins — reader-declares: the
196
+ # (PLURNK_PLUGINS_TRUSTED_ONLY lives in @plurnk/plurnk-meta — reader-declares: the
202
197
  # trust rule's one implementation lives there and so does its knob.)
203
198
 
204
199
  # 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).
200
+ # and the materialized pull-doc on load. The default names are omitted from this generic
201
+ # catalogue because their teaching is owned elsewhere. Empty → exclude nothing. Unknown names
202
+ # are inert (a filter, not a contract).
207
203
  PLURNK_SERVICE_DOCS_EXCLUDE="plurnk,file,exec"
208
204
 
209
205
  # PLURNK_SERVICE_PACKET_INJECT — an operator markdown file injected as a section right after the teaching
@@ -211,7 +207,7 @@ PLURNK_SERVICE_DOCS_EXCLUDE="plurnk,file,exec"
211
207
  # `~/` expands to home. Unset → no section. The pressure valve for "improve the packet" without a fork.
212
208
  # PLURNK_SERVICE_PACKET_INJECT="~/injection.md"
213
209
 
214
- # PLURNK_SERVICE_POLICY — the operating-policy markdown, rendered as the ## Plurnk Service Policy
210
+ # PLURNK_SERVICE_POLICY — the operating-policy markdown, rendered as the ## Policy
215
211
  # section. Unset = the seeded ~/.plurnk/AGENTS.md; a path = that file; EXPLICITLY empty = policy off.
216
212
  # PLURNK_SERVICE_POLICY=
217
213
  # PLURNK_SERVICE_PROJECT — a per-project policy markdown (relative to projectRoot). Unset = <root>/AGENTS.md.
@@ -221,10 +217,10 @@ PLURNK_SERVICE_DOCS_EXCLUDE="plurnk,file,exec"
221
217
  # PLURNK_SERVICE_REQUIREMENTS=
222
218
 
223
219
  # --- 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.
220
+ # Project Semantics tiles each vector-eligible entry into <=window chunks so a large
221
+ # body is fully searchable, not truncated. Chunking requires the embedder's exact
222
+ # counter or an exact fallback tokenizer; an estimate refuses semantic derivation.
223
+ # The chunk knobs are read only when an embedder declares its input window.
228
224
  # Ranked results returned by a markerless `FIND(...):~query:FIND`. A positive
229
225
  # integer `<K>` overrides this count; a decimal marker selects by similarity.
230
226
  PLURNK_SERVICE_SEMANTIC_TOP_K=10
@@ -241,20 +237,31 @@ PLURNK_SERVICE_SEMANTIC_CHUNK_OVERLAP=0.15
241
237
  PLURNK_SERVICE_MAX_EMBED_SIZE=0
242
238
  # =1 forces the FTS-only path even with the embeddings package installed — the ~query
243
239
  # 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.
240
+ # hosts/runs that don't want vector search; the Mock bootstrap and constrained benchmarks set it.
245
241
  PLURNK_SERVICE_EMBED_DISABLE=0
246
242
 
247
243
  # 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).
244
+ # dedup apply to these (the search family delegates page fetches to the entry() sink; {§exec-entry-sink}).
249
245
  PLURNK_SERVICE_SEARCH_RUNTIMES=search
250
246
  # Per-turn search flood cap: the (N+1)th search EXEC in one turn is refused 429 (dedup of
251
247
  # identical queries is unconditional and separate — it strikes and serves the prior results).
252
248
  PLURNK_SERVICE_SEARCH_MAX_PER_TURN=3
253
249
  # 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
250
+ # steer instead of enumerating every match ({§find-count-not-contents}) — a repo-scale FIND(**) over
255
251
  # a 19k-entry workspace grinds clean instead of overflowing the window. 0/unset = no gate.
256
252
  PLURNK_SERVICE_FIND_MAX_MATCHES=500
253
+ # Comma-separated file pathname patterns omitted from search derivations. Content remains directly
254
+ # readable. Patterns without `/` match the basename; patterns with `/` match the full pathname.
255
+ # Uses body-matcher glob syntax; the first match is the observable exclusion reason. Empty = none.
256
+ 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
257
  # Derivation producer concurrency: how many entries may materialize graphs/chunk plans at once.
258
258
  # Unset uses a host-relative square-root fan-out; the separate embedding pool uses the available
259
259
  # cores. A positive integer is an exact operator budget; -1 explicitly claims every available core.
260
260
  PLURNK_SERVICE_DERIVE_CONCURRENCY=
261
+ # Maximum symbol or reference rows written by one search-index SQLite statement.
262
+ PLURNK_SERVICE_DERIVE_STORE_BATCH=1024
263
+ # Approximate number of aggregate progress milestones emitted during a multi-item
264
+ # indexing pass. This also controls per-item embedding milestones.
265
+ PLURNK_SERVICE_DERIVE_PROGRESS_STEPS=10
266
+ # Minimum interval between progress notices from a long-running individual item.
267
+ 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.
@@ -60,16 +75,26 @@ Each mirrors a `# --- section ---` in the floor; consult the floor for exact def
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
77
  - **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.
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`, `_EXEC_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`/`_REQUIREMENTS` (policy + footer overrides), `_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
89
  - **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
90
  - **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).
91
+ - **Execs** - `PLURNK_EXECS_<runtime>=0` disables a runtime; `PLURNK_EXECS_SEARCH_SEARXNG_URL` enables web search (unset = search off).
92
+ - **Observability** — standard `OTEL_*` env ({§observability-boundary}):
93
+ `OTEL_TRACES_EXPORTER`/`OTEL_METRICS_EXPORTER` (`otlp` or `console`; unset
94
+ keeps the signal off), `OTEL_SERVICE_NAME` (default `plurnk-service`),
95
+ `OTEL_SDK_DISABLED` (opt out), and the OTLP exporters' own
96
+ `OTEL_EXPORTER_OTLP_*` settings. An unconfigured daemon never loads the OTel
97
+ SDK. Prompts, reasoning, file bodies, URLs, secrets, and plugin payloads are
98
+ never exported.
74
99
 
75
100
  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
 
@@ -38,13 +48,17 @@ Config + state live in `~/.plurnk/` (created on first run): put your config in `
38
48
  - `@plurnk/plurnk-mimetypes` — content handling contract.
39
49
  - `@plurnk/plurnk-execs` — executable capability contract.
40
50
 
51
+ ## Observability
52
+
53
+ 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.
54
+
41
55
  ## Semantic search
42
56
 
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`.
57
+ 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
58
 
45
59
  ## The file sandbox
46
60
 
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}).
61
+ 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
62
 
49
63
  ## Tests
50
64