@plurnk/plurnk-service 1.10.1 → 1.12.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 (314) hide show
  1. package/.env.defaults +41 -17
  2. package/INSTALL.md +4 -4
  3. package/README.md +2 -2
  4. package/SPEC.md +573 -273
  5. package/digest-sql/curation/curation.sql +1 -0
  6. package/dist/Paths.d.ts +3 -3
  7. package/dist/Paths.d.ts.map +1 -1
  8. package/dist/Paths.js +9 -9
  9. package/dist/Paths.js.map +1 -1
  10. package/dist/build-info.json +1 -1
  11. package/dist/content/edit-collision.d.ts +1 -1
  12. package/dist/content/edit-collision.d.ts.map +1 -1
  13. package/dist/content/edit-collision.js +5 -4
  14. package/dist/content/edit-collision.js.map +1 -1
  15. package/dist/content/edit-receipt.d.ts +6 -5
  16. package/dist/content/edit-receipt.d.ts.map +1 -1
  17. package/dist/content/edit-receipt.js +28 -8
  18. package/dist/content/edit-receipt.js.map +1 -1
  19. package/dist/content/index.d.ts +2 -2
  20. package/dist/content/index.d.ts.map +1 -1
  21. package/dist/content/index.js +1 -1
  22. package/dist/content/index.js.map +1 -1
  23. package/dist/content/line-anchors.d.ts +2 -0
  24. package/dist/content/line-anchors.d.ts.map +1 -1
  25. package/dist/content/line-anchors.js +15 -6
  26. package/dist/content/line-anchors.js.map +1 -1
  27. package/dist/content/line-marker.d.ts +0 -1
  28. package/dist/content/line-marker.d.ts.map +1 -1
  29. package/dist/content/line-marker.js.map +1 -1
  30. package/dist/content/matcher.d.ts.map +1 -1
  31. package/dist/content/matcher.js +3 -2
  32. package/dist/content/matcher.js.map +1 -1
  33. package/dist/content/read-projector.js +3 -3
  34. package/dist/content/read-projector.js.map +1 -1
  35. package/dist/core/BudgetReadout.d.ts +6 -1
  36. package/dist/core/BudgetReadout.d.ts.map +1 -1
  37. package/dist/core/BudgetReadout.js +38 -2
  38. package/dist/core/BudgetReadout.js.map +1 -1
  39. package/dist/core/CapabilityPolicies.d.ts +15 -0
  40. package/dist/core/CapabilityPolicies.d.ts.map +1 -0
  41. package/dist/core/CapabilityPolicies.js +60 -0
  42. package/dist/core/CapabilityPolicies.js.map +1 -0
  43. package/dist/core/CapabilityResolver.d.ts +24 -0
  44. package/dist/core/CapabilityResolver.d.ts.map +1 -0
  45. package/dist/core/CapabilityResolver.js +180 -0
  46. package/dist/core/CapabilityResolver.js.map +1 -0
  47. package/dist/core/ChannelWrite.d.ts +4 -3
  48. package/dist/core/ChannelWrite.d.ts.map +1 -1
  49. package/dist/core/CoreSchemeServices.d.ts +2 -2
  50. package/dist/core/CoreSchemeServices.d.ts.map +1 -1
  51. package/dist/core/CoreSchemeServices.js +2 -2
  52. package/dist/core/CoreSchemeServices.js.map +1 -1
  53. package/dist/core/Dispatcher.d.ts +5 -2
  54. package/dist/core/Dispatcher.d.ts.map +1 -1
  55. package/dist/core/Dispatcher.js +157 -165
  56. package/dist/core/Dispatcher.js.map +1 -1
  57. package/dist/core/DurableStatement.d.ts.map +1 -1
  58. package/dist/core/DurableStatement.js +19 -15
  59. package/dist/core/DurableStatement.js.map +1 -1
  60. package/dist/core/EmbeddingCall.d.ts +23 -0
  61. package/dist/core/EmbeddingCall.d.ts.map +1 -0
  62. package/dist/core/EmbeddingCall.js +149 -0
  63. package/dist/core/EmbeddingCall.js.map +1 -0
  64. package/dist/core/Engine.d.ts +6 -4
  65. package/dist/core/Engine.d.ts.map +1 -1
  66. package/dist/core/Engine.js +20 -9
  67. package/dist/core/Engine.js.map +1 -1
  68. package/dist/core/Engine.sql +119 -56
  69. package/dist/core/ExecutorRegistry.d.ts +3 -3
  70. package/dist/core/ExecutorRegistry.d.ts.map +1 -1
  71. package/dist/core/ExecutorRegistry.js +10 -6
  72. package/dist/core/ExecutorRegistry.js.map +1 -1
  73. package/dist/core/GitBranch.d.ts +4 -1
  74. package/dist/core/GitBranch.d.ts.map +1 -1
  75. package/dist/core/GitBranch.js +12 -2
  76. package/dist/core/GitBranch.js.map +1 -1
  77. package/dist/core/InferenceCall.d.ts +18 -0
  78. package/dist/core/InferenceCall.d.ts.map +1 -0
  79. package/dist/core/InferenceCall.js +86 -0
  80. package/dist/core/InferenceCall.js.map +1 -0
  81. package/dist/core/LogEntryProjection.d.ts +1 -0
  82. package/dist/core/LogEntryProjection.d.ts.map +1 -1
  83. package/dist/core/LogEntryProjection.js +12 -4
  84. package/dist/core/LogEntryProjection.js.map +1 -1
  85. package/dist/core/LoopPolicyReader.d.ts +7 -0
  86. package/dist/core/LoopPolicyReader.d.ts.map +1 -0
  87. package/dist/core/LoopPolicyReader.js +33 -0
  88. package/dist/core/LoopPolicyReader.js.map +1 -0
  89. package/dist/core/ModelCall.d.ts +4 -12
  90. package/dist/core/ModelCall.d.ts.map +1 -1
  91. package/dist/core/ModelCall.js +10 -74
  92. package/dist/core/ModelCall.js.map +1 -1
  93. package/dist/core/NoticeChannel.d.ts +2 -2
  94. package/dist/core/NoticeChannel.d.ts.map +1 -1
  95. package/dist/core/NoticeChannel.js +18 -9
  96. package/dist/core/NoticeChannel.js.map +1 -1
  97. package/dist/core/OperatorConfig.d.ts.map +1 -1
  98. package/dist/core/OperatorConfig.js +4 -0
  99. package/dist/core/OperatorConfig.js.map +1 -1
  100. package/dist/core/OverflowTurn.d.ts.map +1 -1
  101. package/dist/core/OverflowTurn.js +4 -3
  102. package/dist/core/OverflowTurn.js.map +1 -1
  103. package/dist/core/Owner.js +5 -5
  104. package/dist/core/Owner.js.map +1 -1
  105. package/dist/core/PacketBuilder.d.ts +2 -2
  106. package/dist/core/PacketBuilder.d.ts.map +1 -1
  107. package/dist/core/PacketBuilder.js +55 -35
  108. package/dist/core/PacketBuilder.js.map +1 -1
  109. package/dist/core/ProblemLog.d.ts.map +1 -1
  110. package/dist/core/ProblemLog.js +1 -0
  111. package/dist/core/ProblemLog.js.map +1 -1
  112. package/dist/core/ProposalLifecycle.d.ts.map +1 -1
  113. package/dist/core/ProposalLifecycle.js +16 -13
  114. package/dist/core/ProposalLifecycle.js.map +1 -1
  115. package/dist/core/ReasoningEvent.d.ts +1 -0
  116. package/dist/core/ReasoningEvent.d.ts.map +1 -1
  117. package/dist/core/ResourceMutations.d.ts +6 -4
  118. package/dist/core/ResourceMutations.d.ts.map +1 -1
  119. package/dist/core/ResourceMutations.js +209 -63
  120. package/dist/core/ResourceMutations.js.map +1 -1
  121. package/dist/core/SchemeRegistry.d.ts +6 -3
  122. package/dist/core/SchemeRegistry.d.ts.map +1 -1
  123. package/dist/core/SchemeRegistry.js +14 -17
  124. package/dist/core/SchemeRegistry.js.map +1 -1
  125. package/dist/core/ServiceTeardown.d.ts +1 -1
  126. package/dist/core/ServiceTeardown.d.ts.map +1 -1
  127. package/dist/core/ServiceTeardown.js +4 -8
  128. package/dist/core/ServiceTeardown.js.map +1 -1
  129. package/dist/core/StrikeRail.d.ts +1 -0
  130. package/dist/core/StrikeRail.d.ts.map +1 -1
  131. package/dist/core/StrikeRail.js +12 -3
  132. package/dist/core/StrikeRail.js.map +1 -1
  133. package/dist/core/ToolResources.d.ts +2 -2
  134. package/dist/core/ToolResources.d.ts.map +1 -1
  135. package/dist/core/ToolResources.js +18 -8
  136. package/dist/core/ToolResources.js.map +1 -1
  137. package/dist/core/Turn.sql +6 -3
  138. package/dist/core/TurnOps.d.ts.map +1 -1
  139. package/dist/core/TurnOps.js +22 -8
  140. package/dist/core/TurnOps.js.map +1 -1
  141. package/dist/core/TurnRunner.d.ts +7 -4
  142. package/dist/core/TurnRunner.d.ts.map +1 -1
  143. package/dist/core/TurnRunner.js +345 -83
  144. package/dist/core/TurnRunner.js.map +1 -1
  145. package/dist/core/WorkerControlAddress.d.ts.map +1 -1
  146. package/dist/core/WorkerControlAddress.js +1 -2
  147. package/dist/core/WorkerControlAddress.js.map +1 -1
  148. package/dist/core/WorkerName.d.ts +2 -0
  149. package/dist/core/WorkerName.d.ts.map +1 -1
  150. package/dist/core/WorkerName.js +3 -2
  151. package/dist/core/WorkerName.js.map +1 -1
  152. package/dist/core/WorkerName.sql +2 -1
  153. package/dist/core/caps/DbProjectionCaps.d.ts +2 -1
  154. package/dist/core/caps/DbProjectionCaps.d.ts.map +1 -1
  155. package/dist/core/caps/DbProjectionCaps.js +12 -1
  156. package/dist/core/caps/DbProjectionCaps.js.map +1 -1
  157. package/dist/core/file-materialization.d.ts +22 -0
  158. package/dist/core/file-materialization.d.ts.map +1 -0
  159. package/dist/core/file-materialization.js +77 -0
  160. package/dist/core/file-materialization.js.map +1 -0
  161. package/dist/core/fork.d.ts +2 -1
  162. package/dist/core/fork.d.ts.map +1 -1
  163. package/dist/core/fork.js +13 -4
  164. package/dist/core/fork.js.map +1 -1
  165. package/dist/core/fork.sql +27 -11
  166. package/dist/core/git-membership.d.ts +25 -14
  167. package/dist/core/git-membership.d.ts.map +1 -1
  168. package/dist/core/git-membership.js +260 -164
  169. package/dist/core/git-membership.js.map +1 -1
  170. package/dist/core/git-state.d.ts +2 -0
  171. package/dist/core/git-state.d.ts.map +1 -1
  172. package/dist/core/git-state.js +27 -1
  173. package/dist/core/git-state.js.map +1 -1
  174. package/dist/core/operation-target-groups.d.ts.map +1 -1
  175. package/dist/core/operation-target-groups.js +8 -7
  176. package/dist/core/operation-target-groups.js.map +1 -1
  177. package/dist/core/owner.sql +7 -10
  178. package/dist/core/packet-wire.d.ts +11 -0
  179. package/dist/core/packet-wire.d.ts.map +1 -1
  180. package/dist/core/packet-wire.js +98 -34
  181. package/dist/core/packet-wire.js.map +1 -1
  182. package/dist/core/scheme-types.d.ts +2 -2
  183. package/dist/core/scheme-types.d.ts.map +1 -1
  184. package/dist/core/scheme-types.js +1 -1
  185. package/dist/core/scheme-types.js.map +1 -1
  186. package/dist/core/types.d.ts +3 -2
  187. package/dist/core/types.d.ts.map +1 -1
  188. package/dist/core/types.js +1 -1
  189. package/dist/core/types.js.map +1 -1
  190. package/dist/core/worker-settings.d.ts +4 -3
  191. package/dist/core/worker-settings.d.ts.map +1 -1
  192. package/dist/core/worker-settings.js +40 -19
  193. package/dist/core/worker-settings.js.map +1 -1
  194. package/dist/core/workspace-settings.d.ts +3 -1
  195. package/dist/core/workspace-settings.d.ts.map +1 -1
  196. package/dist/core/workspace-settings.js +6 -2
  197. package/dist/core/workspace-settings.js.map +1 -1
  198. package/dist/digest/Digest.d.ts.map +1 -1
  199. package/dist/digest/Digest.js +151 -42
  200. package/dist/digest/Digest.js.map +1 -1
  201. package/dist/digest/digest.sql +48 -20
  202. package/dist/index.js +1 -1
  203. package/dist/index.js.map +1 -1
  204. package/dist/schemes/Exec.d.ts +4 -5
  205. package/dist/schemes/Exec.d.ts.map +1 -1
  206. package/dist/schemes/Exec.js +111 -94
  207. package/dist/schemes/Exec.js.map +1 -1
  208. package/dist/schemes/ExecOutputScheme.d.ts.map +1 -1
  209. package/dist/schemes/ExecOutputScheme.js +24 -6
  210. package/dist/schemes/ExecOutputScheme.js.map +1 -1
  211. package/dist/schemes/ExecScheduler.d.ts +15 -0
  212. package/dist/schemes/ExecScheduler.d.ts.map +1 -0
  213. package/dist/schemes/ExecScheduler.js +95 -0
  214. package/dist/schemes/ExecScheduler.js.map +1 -0
  215. package/dist/schemes/File.d.ts.map +1 -1
  216. package/dist/schemes/File.js +26 -19
  217. package/dist/schemes/File.js.map +1 -1
  218. package/dist/schemes/Log.d.ts +6 -4
  219. package/dist/schemes/Log.d.ts.map +1 -1
  220. package/dist/schemes/Log.js +132 -39
  221. package/dist/schemes/Log.js.map +1 -1
  222. package/dist/schemes/Log.sql +23 -18
  223. package/dist/schemes/QuestionTool.d.ts +17 -4
  224. package/dist/schemes/QuestionTool.d.ts.map +1 -1
  225. package/dist/schemes/QuestionTool.js +2 -4
  226. package/dist/schemes/QuestionTool.js.map +1 -1
  227. package/dist/schemes/Worker.d.ts.map +1 -1
  228. package/dist/schemes/Worker.js +20 -20
  229. package/dist/schemes/Worker.js.map +1 -1
  230. package/dist/schemes/_entry-chunk.d.ts.map +1 -1
  231. package/dist/schemes/_entry-chunk.js +6 -2
  232. package/dist/schemes/_entry-chunk.js.map +1 -1
  233. package/dist/schemes/_entry-crud.sql +18 -17
  234. package/dist/schemes/_entry-find.d.ts.map +1 -1
  235. package/dist/schemes/_entry-find.js +9 -14
  236. package/dist/schemes/_entry-find.js.map +1 -1
  237. package/dist/schemes/_entry-graph.js +12 -12
  238. package/dist/schemes/_entry-graph.js.map +1 -1
  239. package/dist/schemes/_entry-graph.sql +5 -5
  240. package/dist/schemes/_entry-ops.d.ts.map +1 -1
  241. package/dist/schemes/_entry-ops.js +15 -5
  242. package/dist/schemes/_entry-ops.js.map +1 -1
  243. package/dist/schemes/_entry-semantic.d.ts +5 -3
  244. package/dist/schemes/_entry-semantic.d.ts.map +1 -1
  245. package/dist/schemes/_entry-semantic.js +21 -9
  246. package/dist/schemes/_entry-semantic.js.map +1 -1
  247. package/dist/schemes/_path-scope.d.ts.map +1 -1
  248. package/dist/schemes/_path-scope.js +6 -1
  249. package/dist/schemes/_path-scope.js.map +1 -1
  250. package/dist/schemes/_search-index.d.ts.map +1 -1
  251. package/dist/schemes/_search-index.js +14 -2
  252. package/dist/schemes/_search-index.js.map +1 -1
  253. package/dist/server/BranchBatches.d.ts +3 -3
  254. package/dist/server/BranchBatches.d.ts.map +1 -1
  255. package/dist/server/BranchBatches.js +9 -2
  256. package/dist/server/BranchBatches.js.map +1 -1
  257. package/dist/server/Daemon.d.ts +12 -41
  258. package/dist/server/Daemon.d.ts.map +1 -1
  259. package/dist/server/Daemon.js +60 -93
  260. package/dist/server/Daemon.js.map +1 -1
  261. package/dist/server/DaemonModule.d.ts +10 -1
  262. package/dist/server/DaemonModule.d.ts.map +1 -1
  263. package/dist/server/DrainSupervisor.d.ts +6 -5
  264. package/dist/server/DrainSupervisor.d.ts.map +1 -1
  265. package/dist/server/DrainSupervisor.js +14 -11
  266. package/dist/server/DrainSupervisor.js.map +1 -1
  267. package/dist/server/Functionality.d.ts +2 -2
  268. package/dist/server/Functionality.d.ts.map +1 -1
  269. package/dist/server/Functionality.js +8 -5
  270. package/dist/server/Functionality.js.map +1 -1
  271. package/dist/server/FunctionalityManager.d.ts +13 -1
  272. package/dist/server/FunctionalityManager.d.ts.map +1 -1
  273. package/dist/server/FunctionalityManager.js +82 -17
  274. package/dist/server/FunctionalityManager.js.map +1 -1
  275. package/dist/server/MembersFunctionality.d.ts +56 -0
  276. package/dist/server/MembersFunctionality.d.ts.map +1 -0
  277. package/dist/server/MembersFunctionality.js +350 -0
  278. package/dist/server/MembersFunctionality.js.map +1 -0
  279. package/dist/server/SkillsFunctionality.d.ts +12 -1
  280. package/dist/server/SkillsFunctionality.d.ts.map +1 -1
  281. package/dist/server/SkillsFunctionality.js +6 -1
  282. package/dist/server/SkillsFunctionality.js.map +1 -1
  283. package/dist/server/client-input.d.ts +5 -8
  284. package/dist/server/client-input.d.ts.map +1 -1
  285. package/dist/server/client-input.js +49 -108
  286. package/dist/server/client-input.js.map +1 -1
  287. package/dist/server/dispatch-as-plurnk.d.ts.map +1 -1
  288. package/dist/server/dispatch-as-plurnk.js +3 -0
  289. package/dist/server/dispatch-as-plurnk.js.map +1 -1
  290. package/dist/server/drain.sql +4 -4
  291. package/dist/server/envelope.d.ts +1 -1
  292. package/dist/server/envelope.d.ts.map +1 -1
  293. package/dist/server/envelope.js +11 -10
  294. package/dist/server/envelope.js.map +1 -1
  295. package/dist/server/envelope.sql +1 -1
  296. package/dist/server/lifecycle-recovery.sql +14 -20
  297. package/dist/server/loopDocs.d.ts.map +1 -1
  298. package/dist/server/loopDocs.js +12 -5
  299. package/dist/server/loopDocs.js.map +1 -1
  300. package/dist/server/seam-proposal-list.sql +2 -2
  301. package/dist/server/worker-capabilities.sql +9 -0
  302. package/dist/service.d.ts.map +1 -1
  303. package/dist/service.js +18 -23
  304. package/dist/service.js.map +1 -1
  305. package/migrations/001_schema.sql +477 -131
  306. package/package.json +31 -33
  307. package/dist/core/LoopFlagsReader.d.ts +0 -7
  308. package/dist/core/LoopFlagsReader.d.ts.map +0 -1
  309. package/dist/core/LoopFlagsReader.js +0 -33
  310. package/dist/core/LoopFlagsReader.js.map +0 -1
  311. package/dist/core/resolveForLoop.d.ts +0 -5
  312. package/dist/core/resolveForLoop.d.ts.map +0 -1
  313. package/dist/core/resolveForLoop.js +0 -12
  314. package/dist/core/resolveForLoop.js.map +0 -1
package/.env.defaults CHANGED
@@ -45,9 +45,13 @@ PLURNK_SERVICE_FILE_CREATE_SCOPE=root
45
45
  PLURNK_HOST=127.0.0.1
46
46
  # THE client surface — the AG-UI+ listener (the plurnk-agui daughter module binds it at boot).
47
47
  # Production is single-listener: every first-party client rides this surface.
48
- PLURNK_PORT=3044
48
+ PLURNK_PORT=1066
49
49
 
50
50
  # --- Loop control ---
51
+ # Service-wide capability ceiling as a CapabilityPolicy JSON object. `deny`
52
+ # removes matching demands; an optional `only` admits only matching demands.
53
+ # Workspace, Worker, and loop policies may narrow this ceiling, never widen it.
54
+ PLURNK_SERVICE_CAPABILITIES={}
51
55
  # Optional default child-model selector (declared alias or provider/model route).
52
56
  # Unset = each WORK/FORK child inherits its spawning loop's model. Clients may
53
57
  # override this per top-level loop.
@@ -83,6 +87,9 @@ PLURNK_SERVICE_PROPOSAL_TIMEOUT_MS=
83
87
  # runtimes explicitly.
84
88
  PLURNK_SERVICE_EXEC_HOLD=
85
89
  PLURNK_SERVICE_EXEC_HOLD_MS=300000
90
+ # Maximum EXEC producers admitted concurrently in one workspace. Additional
91
+ # executions retain their durable streams and wait FIFO; -1 removes the bound.
92
+ PLURNK_SERVICE_EXEC_CONCURRENCY=12
86
93
  # Effect admission overrides ({§effect-policy-tunable}): comma-separated
87
94
  # <effect>:<policy> entries (host/read/pure → propose/auto). Unlisted effects
88
95
  # keep the default map (host proposes; read/pure auto-run). Empty = defaults.
@@ -105,15 +112,14 @@ PLURNK_SERVICE_EXEC_POLL_TURNS=8
105
112
  # signal-ignoring child. plurnk-execs refuses to bake this number; the consumer owns it.
106
113
  PLURNK_SERVICE_EXEC_KILL_GRACE_MS=2000
107
114
  PLURNK_SERVICE_LOOP_TIMEOUT=86400000
108
-
109
- # Operator questions (SEND[300] ask-the-user multiple choice / open question). Three states:
110
- # unset (shipped) = ALLOWED but not enabled a client must affirmatively pass its own
111
- # PLURNK_QUESTIONS=1 (rides workspace.create settings.questions) to enable its workspaces;
112
- # uncomment =0 to DENY servicewide (a ceiling the client cannot override). Enabled workspaces
113
- # get the questions.md teaching injected automatically (the same conditional-doc mechanism as
114
- # the EXEC plugin docs) — an un-enabled workspace is never taught the op it can't use, and an
115
- # emitted [300] is refused with a self-decide steer instead of parking into the void.
116
- # PLURNK_QUESTIONS=0
115
+ # {§provider-recovery} A recoverable provider failure (network failure, rate limit, deadline,
116
+ # interrupted resource) never ends a loop. After the provider's own retries the turn records the
117
+ # failure, waits with exponential backoff, and re-issues the same call for up to RECOVERY ms
118
+ # (0 parks at once); past that the loop parks like a `## SEND0 [202]` wait and resumes on the
119
+ # next prompt or wake. BACKOFF is the first delay (ms); it doubles per failure, capped at twelve
120
+ # times itself.
121
+ PLURNK_SERVICE_PROVIDER_RECOVERY=900000
122
+ PLURNK_SERVICE_PROVIDER_RECOVERY_BACKOFF=5000
117
123
 
118
124
  # --- Engine rails ---
119
125
  # Maximum characters retained from caught runtime diagnostics in a model-facing
@@ -143,11 +149,29 @@ PLURNK_SERVICE_REQUIEM_RETRY_MAX_TOKENS=32768
143
149
  # denies it service-wide, un-re-enableable (the sandbox/benchmark lockout).
144
150
  PLURNK_SERVICE_GIT_ALLOWED=1
145
151
  # PLURNK_SERVICE_GIT_AUTO — automatic project-repository membership. =1 includes the Git
146
- # repository containing project_root; =0 leaves `pick` as the only membership source.
152
+ # repository containing project_root; =0 leaves member definitions as the only membership source.
147
153
  PLURNK_SERVICE_GIT_AUTO=1
154
+ # PLURNK_SERVICE_BRANCH_DELEGATION — branch-tagged WORK/FORK ({§worker-branch-batch}). =0 refuses a
155
+ # WORK/FORK signal up front as 501 branch-delegation-disabled: the form is off the model-facing
156
+ # surface until it is specified and witnessed end to end (#396). =1 enables the serialized
157
+ # branch batches for development and their witnesses.
158
+ PLURNK_SERVICE_BRANCH_DELEGATION=0
148
159
  # Maximum stdout/stderr payload accepted from one native Git subprocess.
149
160
  PLURNK_SERVICE_GIT_OUTPUT_MAX_BYTES=67108864
150
161
 
162
+ # --- Membership ({§membership-baseline}) ---
163
+ # PLURNK_SERVICE_MEMBERS_MODEL_SCOPE — the ceiling a MODEL's `## EXEC0 [members] (add)` is admitted
164
+ # against, in the file-creation lattice none < root < namespace: `none` refuses every model
165
+ # definition (the model widens visibility only through `git add`); `root` admits globs inside the
166
+ # project root; `namespace` admits `../` too. A workspace narrows it with settings.membersModelScope.
167
+ # The operator's own definitions are PLURNK_MEMBERS_<ALIAS>=<glob> (`!glob` excludes) and
168
+ # PLURNK_MEMBERS_ENABLED=[…] in the operator env.
169
+ PLURNK_SERVICE_MEMBERS_MODEL_SCOPE=none
170
+ # Maximum bytes admitted into one materialized workspace-file snapshot (1..100 MiB,
171
+ # matching the storage ceiling). A larger member remains addressable, but READ/EDIT
172
+ # return its durable 413 size result.
173
+ PLURNK_SERVICE_FILE_MATERIALIZE_MAX_BYTES=104857600
174
+
151
175
  # Ordinary bounded OPEN-body projection. READ/FIND results and PLAN working
152
176
  # memory render complete; prompt initialization uses its separate budget share.
153
177
  # Every remaining log body renders at most these independent line and character
@@ -224,9 +248,9 @@ PLURNK_SERVICE_SKILLS_REGISTRY_URL=https://skills.sh
224
248
  # section. Unset = the seeded $XDG_CONFIG_HOME/plurnk/AGENTS.md; a path = that file;
225
249
  # EXPLICITLY empty = policy off.
226
250
  # PLURNK_SERVICE_POLICY=
227
- # PLURNK_SERVICE_REQUIREMENTS — Recap source override (relative to the package root).
228
- # Unset = the packaged requirements.md.
229
- # PLURNK_SERVICE_REQUIREMENTS=
251
+ # PLURNK_SERVICE_RECAP — Recap source override (relative to the package root).
252
+ # Unset = the packaged recap.md; empty content omits the Recap section.
253
+ # PLURNK_SERVICE_RECAP=
230
254
 
231
255
  # --- Semantic search (~query chunking) ---
232
256
  # Project Semantics tiles each vector-eligible entry into <=window chunks so a large
@@ -241,9 +265,9 @@ PLURNK_SERVICE_SEMANTIC_CHUNK_TOKENS=
241
265
  # Overlap fraction [0,1): trailing context re-covered at each chunk boundary so a
242
266
  # concept split across a cut still matches in both. ~0.15 is a standard RAG default.
243
267
  PLURNK_SERVICE_SEMANTIC_CHUNK_OVERLAP=0.15
244
- # Optional maximum UTF-8 body size eligible for vectors. Oversized entries remain
245
- # readable, graph-derived, and FTS-indexed. 0 = unlimited (the shipped default).
246
- PLURNK_SERVICE_MAX_EMBED_SIZE=0
268
+ # Maximum UTF-8 body size eligible for vectors. Oversized entries remain readable,
269
+ # graph-derived, and FTS-indexed. 0 explicitly opts into unlimited vector eligibility.
270
+ PLURNK_SERVICE_MAX_EMBED_SIZE=262144
247
271
  # =1 forces the FTS-only path even with the embeddings package installed — the ~query
248
272
  # degrades to keyword ranking and no vectors are derived (no MiniLM pool spun up). For
249
273
  # hosts/runs that don't want vector search; the Mock bootstrap and constrained benchmarks set it.
package/INSTALL.md CHANGED
@@ -23,7 +23,7 @@ edit`, `config defaults`, and `config check` to inspect and maintain the one
23
23
  environment cascade. A pre-XDG `~/.plurnk` is never read implicitly; stop the
24
24
  old daemon and run `plurnk-service paths migrate` once.
25
25
 
26
- 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.
26
+ The default service embedding artifact includes its local model and the exact counters required by supported hosted profiles. An explicitly disabled or unavailable embedder makes `~query` fall back to FTS keyword ranking. Set `PLURNK_EMBEDDING_MODEL` to a standard provider/model route or declared model alias to use a hosted or operator-run embedding endpoint instead; provider endpoints and credentials use the same provider configuration as generation. A custom profile whose counter is not built in may add the optional `@plurnk/plurnk-mimetypes-tokenizers` catalog.
27
27
 
28
28
  ## The cascade (where a value actually comes from)
29
29
 
@@ -107,7 +107,7 @@ These are relationships *between* flags. Set them as a unit.
107
107
  - **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.qwen.gbnf` for Qwen's template-prefilled `<think>` protocol (or `plurnk.gemma.gbnf` when Gemma generates a complete Harmony channel). The provider detects llama-server, verifies its GBNF transport, and derives input capacity from the detected window and configured output envelope. Add `PLURNK_PROVIDERS_LLAMA_SERVER_local=1` only when the endpoint cannot be fingerprinted reliably.
108
108
  - **Cloud, bring-your-own-key.** `PLURNK_MODEL_cloud="openrouter/<model>"`, `OPENROUTER_API_KEY=…`, `PLURNK_MODEL=cloud`. No local GBNF or `LLAMA_SERVER` pin.
109
109
  - **plurnk.ai endpoint.** `PLURNK_MODEL_plurnk="plurnk/plurnk"`, `PLURNK_API_KEY=…`, `PLURNK_MODEL=plurnk`.
110
- - **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.
110
+ - **Headless / CI / constrained container.** A CPU-only box should NOT disable semantic search — it should select a hosted embedder with `PLURNK_EMBEDDING_MODEL=<provider>/<model>` or an embedding alias. The route inherits the standard provider endpoint and credential contract; a local OpenAI-compatible GPU endpoint uses the same alias and `PLURNK_BASEURL_<alias>` convention as generation. 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.
111
111
 
112
112
  ## Flag sections (breakdown of the service's `.env.defaults`)
113
113
 
@@ -118,7 +118,7 @@ Each mirrors a `# --- section ---` in the floor; consult the floor for exact def
118
118
  - **Model selection** — bare `PLURNK_MODEL` selects a declared alias or exact provider/model route; `PLURNK_MODEL_<alias>` defines an optional friendly route and tuning scope; `PLURNK_BASEURL_<alias>` overrides that alias's endpoint. `PLURNK_MODEL_CHILD` accepts the same selector vocabulary for WORK/FORK descendants; unset inherits the spawning loop's provider.
119
119
  - **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`.
120
120
  - **Files and Git** — `PLURNK_SERVICE_FILE_CREATE_SCOPE=none|root|namespace` bounds new filesystem files (`root` by default); `PLURNK_SERVICE_GIT_ALLOWED` (0 = hard sandbox lockout) and `_GIT_AUTO` govern Git participation. A workspace may narrow creation with `settings.fileCreateScope`.
121
- - **Packet / reference docs** — `PLURNK_SERVICE_FILES_ITEMS` (turn-0 shallow file-map cap), `_PREVIEW_LINES`/`_PREVIEW_CHARS`, `_LINE_ANCHOR_CONTEXT_LINES`, `_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).
121
+ - **Packet / reference docs** — `PLURNK_SERVICE_FILES_ITEMS` (turn-0 shallow file-map cap), `_PREVIEW_LINES`/`_PREVIEW_CHARS`, `_LINE_ANCHOR_CONTEXT_LINES`, `_EDIT_RECEIPT_REVISION_CHARS`/`_CONTEXT_LINES`, `_BRANCH_RECEIPT_REVISION_CHARS`, `_DOCS_EXCLUDE`, `_PACKET_INJECT` (operator markdown section), `_POLICY`/`_PROJECT` (policy overrides), `_RECAP` (Recap-source override), `_MD_<alias>` (materialized reference entry).
122
122
  - **Providers** — the portable provider knobs and defaults are defined by
123
123
  `@plurnk/plurnk-providers/.env.defaults`; any provider knob may take an alias
124
124
  suffix that wins over the bare fallback.
@@ -128,7 +128,7 @@ Each mirrors a `# --- section ---` in the floor; consult the floor for exact def
128
128
  `PLURNK_SERVICE_PROMPT_PROJECTION` assigns the automatic prompt-body share
129
129
  of that provider-derived curation gauge.
130
130
  - **Plugins** — bare `PLURNK_PLUGINS_TRUSTED_ONLY` (0/unset = load all installed; a value = `@plurnk/*` plus an allowlist).
131
- - **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).
131
+ - **Semantic search** — `PLURNK_SERVICE_SEMANTIC_CHUNK_TOKENS`/`_CHUNK_OVERLAP` (service-side chunking), `PLURNK_SERVICE_EMBED_DISABLE` (FTS-only), `PLURNK_EMBEDDING_MODEL` (optional provider route/alias), and `PLURNK_EMBEDDING_WORKERS` (the local embedder pool — mimetypes-owned).
132
132
  - **Schemes: http** — `PLURNK_SCHEMES_HTTP_FETCH_TIMEOUT`, `_TTL_MS`, optional `# PLURNK_SCHEMES_HTTP_MATERIALIZER=` (a materializer plugin id).
133
133
  - **Execs** — `PLURNK_EXECS_<runtime>=0` disables a runtime; web discovery is an MCP attachment (`PLURNK_MCP_<server>`), not an executor.
134
134
  - **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`.
package/README.md CHANGED
@@ -65,11 +65,11 @@ The daemon can emit OpenTelemetry traces and low-cardinality metrics through the
65
65
 
66
66
  ## Semantic search
67
67
 
68
- 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).
68
+ The default service installation includes `@plurnk/plurnk-mimetypes-embeddings`, whose local model and built-in hosted profiles carry their own exact counters, 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 embedding artifact is a broken installation and refuses startup. A standard provider route can replace the included local model through the same provider configuration used for generation; custom profiles may add the optional general tokenizer catalog. See [`INSTALL.md`](./INSTALL.md).
69
69
 
70
70
  ## The file sandbox
71
71
 
72
- Plurnk sees what Git or an ordinary `pick` admits. The AGENTS.md policy path is injected separately as privileged policy, not as a file entry. A path admitted by neither source does not exist to the model and cannot be overwritten. Accepted creation is exclusive and never orphaned: it is Git-added or receives an inspectable exact pick. Creation defaults to `project_root`, can be disabled or expanded to the canonical namespace by operator policy, and only an explicit pick overrides Git ignore. Member edits remain proposal-gated; an outside-root member is read-only unless a pick grants 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}).
72
+ Plurnk sees what Git tracks or a `members` definition includes. The AGENTS.md policy path is injected separately as privileged policy, not as a file entry. A path admitted by neither source does not exist to the model and cannot be overwritten. Accepted creation is exclusive and never orphaned: it is Git-added or receives an inspectable exact pick. Creation defaults to `project_root`, can be disabled or expanded to the canonical namespace by operator policy, and only an explicit pick overrides Git ignore. Member edits remain proposal-gated; an outside-root member is read-only unless a pick grants 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}).
73
73
 
74
74
  ## Tests
75
75