@plurnk/plurnk-service 3.0.0 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (280) hide show
  1. package/.env.defaults +38 -21
  2. package/INSTALL.md +38 -1
  3. package/README.md +3 -0
  4. package/SPEC.md +681 -268
  5. package/dist/build-info.json +1 -1
  6. package/dist/completions/_plurnk-service +13 -0
  7. package/dist/completions/plurnk-service.bash +19 -0
  8. package/dist/completions/plurnk-service.fish +94 -0
  9. package/dist/content/path-mimetype.d.ts.map +1 -1
  10. package/dist/content/path-mimetype.js +2 -8
  11. package/dist/content/path-mimetype.js.map +1 -1
  12. package/dist/core/AdmittedTurnExecutor.d.ts +2 -2
  13. package/dist/core/AdmittedTurnExecutor.d.ts.map +1 -1
  14. package/dist/core/AdmittedTurnExecutor.js +36 -32
  15. package/dist/core/AdmittedTurnExecutor.js.map +1 -1
  16. package/dist/core/BudgetReadout.d.ts +7 -2
  17. package/dist/core/BudgetReadout.d.ts.map +1 -1
  18. package/dist/core/BudgetReadout.js +36 -5
  19. package/dist/core/BudgetReadout.js.map +1 -1
  20. package/dist/{schemes/_derivation-use.d.ts → core/ContentUse.d.ts} +3 -3
  21. package/dist/core/ContentUse.d.ts.map +1 -0
  22. package/dist/{schemes/_derivation-use.js → core/ContentUse.js} +8 -7
  23. package/dist/core/ContentUse.js.map +1 -0
  24. package/dist/core/DataStatementRunner.d.ts.map +1 -1
  25. package/dist/core/DataStatementRunner.js +8 -20
  26. package/dist/core/DataStatementRunner.js.map +1 -1
  27. package/dist/core/Dispatcher.d.ts +11 -3
  28. package/dist/core/Dispatcher.d.ts.map +1 -1
  29. package/dist/core/Dispatcher.js +186 -109
  30. package/dist/core/Dispatcher.js.map +1 -1
  31. package/dist/core/EditMutations.js +1 -1
  32. package/dist/core/EditMutations.js.map +1 -1
  33. package/dist/core/Engine.d.ts +1 -1
  34. package/dist/core/Engine.d.ts.map +1 -1
  35. package/dist/core/Engine.js +4 -7
  36. package/dist/core/Engine.js.map +1 -1
  37. package/dist/core/EnvFlags.js +1 -1
  38. package/dist/core/EnvFlags.js.map +1 -1
  39. package/dist/core/FabricatedLog.d.ts +1 -0
  40. package/dist/core/FabricatedLog.d.ts.map +1 -1
  41. package/dist/core/FabricatedLog.js +8 -0
  42. package/dist/core/FabricatedLog.js.map +1 -1
  43. package/dist/core/FileAddress.d.ts +12 -0
  44. package/dist/core/FileAddress.d.ts.map +1 -0
  45. package/dist/core/FileAddress.js +73 -0
  46. package/dist/core/FileAddress.js.map +1 -0
  47. package/dist/core/FilePublication.d.ts +15 -0
  48. package/dist/core/FilePublication.d.ts.map +1 -0
  49. package/dist/core/FilePublication.js +143 -0
  50. package/dist/core/FilePublication.js.map +1 -0
  51. package/dist/core/FileSnapshot.d.ts +26 -0
  52. package/dist/core/FileSnapshot.d.ts.map +1 -0
  53. package/dist/core/FileSnapshot.js +179 -0
  54. package/dist/core/FileSnapshot.js.map +1 -0
  55. package/dist/core/KillHandler.d.ts.map +1 -1
  56. package/dist/core/KillHandler.js +4 -1
  57. package/dist/core/KillHandler.js.map +1 -1
  58. package/dist/core/LiveSubscription.d.ts.map +1 -1
  59. package/dist/core/LiveSubscription.js +14 -2
  60. package/dist/core/LiveSubscription.js.map +1 -1
  61. package/dist/core/LiveSubscriptions.d.ts +3 -1
  62. package/dist/core/LiveSubscriptions.d.ts.map +1 -1
  63. package/dist/core/LiveSubscriptions.js +16 -1
  64. package/dist/core/LiveSubscriptions.js.map +1 -1
  65. package/dist/core/LogBody.d.ts.map +1 -1
  66. package/dist/core/LogBody.js +3 -1
  67. package/dist/core/LogBody.js.map +1 -1
  68. package/dist/core/LoopDriver.d.ts.map +1 -1
  69. package/dist/core/LoopDriver.js +3 -0
  70. package/dist/core/LoopDriver.js.map +1 -1
  71. package/dist/core/LoopLifecycle.sql +1 -0
  72. package/dist/core/MembershipMaterialization.d.ts.map +1 -1
  73. package/dist/core/MembershipMaterialization.js +87 -143
  74. package/dist/core/MembershipMaterialization.js.map +1 -1
  75. package/dist/core/MessageResources.sql +31 -0
  76. package/dist/core/MutationEffects.d.ts +2 -1
  77. package/dist/core/MutationEffects.d.ts.map +1 -1
  78. package/dist/core/MutationEffects.js +14 -1
  79. package/dist/core/MutationEffects.js.map +1 -1
  80. package/dist/core/PacketBuilder.d.ts +2 -2
  81. package/dist/core/PacketBuilder.d.ts.map +1 -1
  82. package/dist/core/PacketBuilder.js +123 -51
  83. package/dist/core/PacketBuilder.js.map +1 -1
  84. package/dist/core/PacketBuilder.sql +21 -14
  85. package/dist/core/PathGlob.d.ts +6 -0
  86. package/dist/core/PathGlob.d.ts.map +1 -0
  87. package/dist/core/PathGlob.js +24 -0
  88. package/dist/core/PathGlob.js.map +1 -0
  89. package/dist/core/ProposalLifecycle.d.ts +2 -1
  90. package/dist/core/ProposalLifecycle.d.ts.map +1 -1
  91. package/dist/core/ProposalLifecycle.js +45 -33
  92. package/dist/core/ProposalLifecycle.js.map +1 -1
  93. package/dist/core/ProposalLifecycle.sql +4 -0
  94. package/dist/core/ReplyMetadata.d.ts +10 -0
  95. package/dist/core/ReplyMetadata.d.ts.map +1 -0
  96. package/dist/core/ReplyMetadata.js +20 -0
  97. package/dist/core/ReplyMetadata.js.map +1 -0
  98. package/dist/core/ResourceBindings.d.ts.map +1 -1
  99. package/dist/core/ResourceBindings.js +4 -3
  100. package/dist/core/ResourceBindings.js.map +1 -1
  101. package/dist/core/ResourceSelector.d.ts +1 -2
  102. package/dist/core/ResourceSelector.d.ts.map +1 -1
  103. package/dist/core/ResourceSelector.js +30 -9
  104. package/dist/core/ResourceSelector.js.map +1 -1
  105. package/dist/core/ResourceTransfers.d.ts +1 -1
  106. package/dist/core/ResourceTransfers.d.ts.map +1 -1
  107. package/dist/core/ResourceTransfers.js +26 -11
  108. package/dist/core/ResourceTransfers.js.map +1 -1
  109. package/dist/core/ServiceHelp.d.ts +6 -0
  110. package/dist/core/ServiceHelp.d.ts.map +1 -0
  111. package/dist/core/ServiceHelp.js +35 -0
  112. package/dist/core/ServiceHelp.js.map +1 -0
  113. package/dist/core/StoredPacket.d.ts +1 -0
  114. package/dist/core/StoredPacket.d.ts.map +1 -1
  115. package/dist/core/StoredPacket.js +4 -1
  116. package/dist/core/StoredPacket.js.map +1 -1
  117. package/dist/core/StrikeRail.d.ts.map +1 -1
  118. package/dist/core/StrikeRail.js +2 -2
  119. package/dist/core/StrikeRail.js.map +1 -1
  120. package/dist/core/TokenCalibration.d.ts +2 -2
  121. package/dist/core/TokenCalibration.d.ts.map +1 -1
  122. package/dist/core/TokenCalibration.js +12 -16
  123. package/dist/core/TokenCalibration.js.map +1 -1
  124. package/dist/core/TokenCalibration.sql +29 -6
  125. package/dist/core/TurnDispositionHandler.d.ts +1 -2
  126. package/dist/core/TurnDispositionHandler.d.ts.map +1 -1
  127. package/dist/core/TurnDispositionHandler.js +30 -26
  128. package/dist/core/TurnDispositionHandler.js.map +1 -1
  129. package/dist/core/TurnMaterialization.d.ts.map +1 -1
  130. package/dist/core/TurnMaterialization.js +11 -1
  131. package/dist/core/TurnMaterialization.js.map +1 -1
  132. package/dist/core/TurnOps.d.ts +5 -1
  133. package/dist/core/TurnOps.d.ts.map +1 -1
  134. package/dist/core/TurnOps.js +29 -2
  135. package/dist/core/TurnOps.js.map +1 -1
  136. package/dist/core/TurnRunner.d.ts.map +1 -1
  137. package/dist/core/TurnRunner.js +122 -56
  138. package/dist/core/TurnRunner.js.map +1 -1
  139. package/dist/core/TurnSources.sql +2 -2
  140. package/dist/core/caps/SchemeCtxImpl.d.ts +1 -0
  141. package/dist/core/caps/SchemeCtxImpl.d.ts.map +1 -1
  142. package/dist/core/caps/SchemeCtxImpl.js +5 -0
  143. package/dist/core/caps/SchemeCtxImpl.js.map +1 -1
  144. package/dist/core/git-membership.d.ts +1 -0
  145. package/dist/core/git-membership.d.ts.map +1 -1
  146. package/dist/core/git-membership.js +9 -11
  147. package/dist/core/git-membership.js.map +1 -1
  148. package/dist/core/glob_match.js +3 -3
  149. package/dist/core/glob_match.js.map +1 -1
  150. package/dist/core/mutation-types.d.ts +3 -0
  151. package/dist/core/mutation-types.d.ts.map +1 -1
  152. package/dist/core/namespace.d.ts +4 -1
  153. package/dist/core/namespace.d.ts.map +1 -1
  154. package/dist/core/namespace.js +14 -3
  155. package/dist/core/namespace.js.map +1 -1
  156. package/dist/core/packet-wire.d.ts +7 -1
  157. package/dist/core/packet-wire.d.ts.map +1 -1
  158. package/dist/core/packet-wire.js +98 -36
  159. package/dist/core/packet-wire.js.map +1 -1
  160. package/dist/core/plurnk-uri.d.ts +3 -2
  161. package/dist/core/plurnk-uri.d.ts.map +1 -1
  162. package/dist/core/plurnk-uri.js +23 -11
  163. package/dist/core/plurnk-uri.js.map +1 -1
  164. package/dist/core/recap-lines.d.ts +4 -0
  165. package/dist/core/recap-lines.d.ts.map +1 -0
  166. package/dist/core/recap-lines.js +11 -0
  167. package/dist/core/recap-lines.js.map +1 -0
  168. package/dist/core/scheme-types.d.ts +1 -0
  169. package/dist/core/scheme-types.d.ts.map +1 -1
  170. package/dist/core/sql-functions.d.ts +2 -0
  171. package/dist/core/sql-functions.d.ts.map +1 -0
  172. package/dist/core/sql-functions.js +5 -0
  173. package/dist/core/sql-functions.js.map +1 -0
  174. package/dist/core/sqlite-synchronous.d.ts +2 -0
  175. package/dist/core/sqlite-synchronous.d.ts.map +1 -0
  176. package/dist/core/sqlite-synchronous.js +4 -0
  177. package/dist/core/sqlite-synchronous.js.map +1 -0
  178. package/dist/core/turn-scheduler.d.ts.map +1 -1
  179. package/dist/core/turn-scheduler.js +1 -1
  180. package/dist/core/turn-scheduler.js.map +1 -1
  181. package/dist/evidence/EvidenceReader.d.ts.map +1 -1
  182. package/dist/evidence/EvidenceReader.js +23 -3
  183. package/dist/evidence/EvidenceReader.js.map +1 -1
  184. package/dist/evidence/digest.sql +7 -1
  185. package/dist/man/plurnk-service.1 +499 -0
  186. package/dist/schemes/Env.d.ts +26 -0
  187. package/dist/schemes/Env.d.ts.map +1 -0
  188. package/dist/schemes/Env.js +133 -0
  189. package/dist/schemes/Env.js.map +1 -0
  190. package/dist/schemes/Exec.d.ts.map +1 -1
  191. package/dist/schemes/Exec.js +15 -15
  192. package/dist/schemes/Exec.js.map +1 -1
  193. package/dist/schemes/ExecOutputScheme.d.ts +3 -2
  194. package/dist/schemes/ExecOutputScheme.d.ts.map +1 -1
  195. package/dist/schemes/ExecOutputScheme.js +9 -0
  196. package/dist/schemes/ExecOutputScheme.js.map +1 -1
  197. package/dist/schemes/File.d.ts +1 -0
  198. package/dist/schemes/File.d.ts.map +1 -1
  199. package/dist/schemes/File.js +233 -268
  200. package/dist/schemes/File.js.map +1 -1
  201. package/dist/schemes/Log.d.ts.map +1 -1
  202. package/dist/schemes/Log.js +97 -17
  203. package/dist/schemes/Log.js.map +1 -1
  204. package/dist/schemes/Log.sql +9 -0
  205. package/dist/schemes/Worker.js +1 -1
  206. package/dist/schemes/Worker.js.map +1 -1
  207. package/dist/schemes/_entry-crud.d.ts +2 -0
  208. package/dist/schemes/_entry-crud.d.ts.map +1 -1
  209. package/dist/schemes/_entry-crud.js +8 -5
  210. package/dist/schemes/_entry-crud.js.map +1 -1
  211. package/dist/schemes/_entry-crud.sql +15 -15
  212. package/dist/schemes/_entry-find.d.ts +2 -1
  213. package/dist/schemes/_entry-find.d.ts.map +1 -1
  214. package/dist/schemes/_entry-find.js +31 -19
  215. package/dist/schemes/_entry-find.js.map +1 -1
  216. package/dist/schemes/_entry-manifest.d.ts +2 -2
  217. package/dist/schemes/_entry-manifest.d.ts.map +1 -1
  218. package/dist/schemes/_entry-manifest.js +10 -8
  219. package/dist/schemes/_entry-manifest.js.map +1 -1
  220. package/dist/schemes/_entry-ops.d.ts.map +1 -1
  221. package/dist/schemes/_entry-ops.js +9 -7
  222. package/dist/schemes/_entry-ops.js.map +1 -1
  223. package/dist/schemes/_path-scope.d.ts.map +1 -1
  224. package/dist/schemes/_path-scope.js +12 -4
  225. package/dist/schemes/_path-scope.js.map +1 -1
  226. package/dist/schemes/_search-index.js +3 -3
  227. package/dist/schemes/_search-index.js.map +1 -1
  228. package/dist/schemes/exec-abort.js +2 -2
  229. package/dist/schemes/exec-abort.js.map +1 -1
  230. package/dist/schemes/exec-env.d.ts.map +1 -1
  231. package/dist/schemes/exec-env.js +7 -22
  232. package/dist/schemes/exec-env.js.map +1 -1
  233. package/dist/server/Daemon.d.ts +1 -0
  234. package/dist/server/Daemon.d.ts.map +1 -1
  235. package/dist/server/Daemon.js +45 -68
  236. package/dist/server/Daemon.js.map +1 -1
  237. package/dist/server/DrainSupervisor.d.ts +2 -3
  238. package/dist/server/DrainSupervisor.d.ts.map +1 -1
  239. package/dist/server/DrainSupervisor.js +34 -6
  240. package/dist/server/DrainSupervisor.js.map +1 -1
  241. package/dist/server/EnvFunctionality.d.ts +4 -2
  242. package/dist/server/EnvFunctionality.d.ts.map +1 -1
  243. package/dist/server/EnvFunctionality.js +23 -12
  244. package/dist/server/EnvFunctionality.js.map +1 -1
  245. package/dist/server/Functionality.d.ts.map +1 -1
  246. package/dist/server/Functionality.js +15 -8
  247. package/dist/server/Functionality.js.map +1 -1
  248. package/dist/server/FunctionalityManager.d.ts +1 -1
  249. package/dist/server/FunctionalityManager.d.ts.map +1 -1
  250. package/dist/server/FunctionalityManager.js +5 -1
  251. package/dist/server/FunctionalityManager.js.map +1 -1
  252. package/dist/server/MembersFunctionality.d.ts.map +1 -1
  253. package/dist/server/MembersFunctionality.js +12 -12
  254. package/dist/server/MembersFunctionality.js.map +1 -1
  255. package/dist/server/Retention.d.ts.map +1 -1
  256. package/dist/server/Retention.js +5 -5
  257. package/dist/server/Retention.js.map +1 -1
  258. package/dist/server/Retention.sql +49 -23
  259. package/dist/server/client-input.d.ts.map +1 -1
  260. package/dist/server/client-input.js +12 -3
  261. package/dist/server/client-input.js.map +1 -1
  262. package/dist/server/drain.sql +10 -9
  263. package/dist/server/lifecycle-recovery.sql +4 -1
  264. package/dist/service.d.ts.map +1 -1
  265. package/dist/service.js +9 -31
  266. package/dist/service.js.map +1 -1
  267. package/docs/copy-move.md +3 -0
  268. package/docs/env.md +32 -4
  269. package/docs/members.md +16 -1
  270. package/migrations/018_worker_owners.sql +1 -0
  271. package/migrations/019_interactive_owners.sql +1 -0
  272. package/migrations/020_log_projection.sql +1 -0
  273. package/migrations/021_packet_roles.sql +86 -0
  274. package/migrations/022_message_completion.sql +24 -0
  275. package/migrations/023_file_revisions.sql +54 -0
  276. package/migrations/024_proposal_decisions.sql +34 -0
  277. package/migrations/025_response_retention.sql +30 -0
  278. package/package.json +38 -34
  279. package/dist/schemes/_derivation-use.d.ts.map +0 -1
  280. package/dist/schemes/_derivation-use.js.map +0 -1
package/.env.defaults CHANGED
@@ -20,8 +20,11 @@ PLURNK_SERVICE_SHARE_FOLDER=
20
20
  # The listener's address, PLURNK_HOST and PLURNK_PORT, is shared with every client and so is
21
21
  # declared by @plurnk/plurnk-contracts; --host and --port still spell it for one invocation.
22
22
 
23
- # --- SQLite (optional sqlrite overrides) ---
24
- # Lock wait, ms; 0 = immediate failure. sqlrite defaults to 5000, WAL, synchronous=NORMAL.
23
+ # --- SQLite ---
24
+ # WAL durability ({§db-durability}): FULL syncs every commit; NORMAL may lose recent commits
25
+ # on power loss; OFF may corrupt the database; EXTRA equals FULL in WAL. Applied before migration.
26
+ PLURNK_SERVICE_SQLITE_SYNCHRONOUS=FULL
27
+ # Lock wait, ms; 0 = immediate failure. Unset = sqlrite's default.
25
28
  # PLURNK_SERVICE_SQLITE_TIMEOUT=5000
26
29
  # Page cache: positive = pages; negative = KiB. Unset = SQLite default.
27
30
  # PLURNK_SERVICE_SQLITE_CACHE_SIZE=-16000
@@ -69,7 +72,7 @@ PLURNK_SERVICE_FILE_MATERIALIZE_MAX_BYTES=104857600
69
72
  # Opt-in model-call ceiling shared by the worker tree, including BARE and resumes; -1 = uncapped.
70
73
  # Runtime (_plurnk) ancestry supplies no ceiling. Clients may tighten the model tree's limit.
71
74
  PLURNK_SERVICE_MAX_TURNS=-1
72
- # Actions per emission; -1 = unlimited. Final disposition remains; excess actions report an error.
75
+ # Resolved actions per emission, including glob targets; -1 = unlimited. WAIT remains exempt.
73
76
  PLURNK_SERVICE_MAX_COMMANDS=-1
74
77
  # Concurrent live workers per workspace; -1 = unlimited. Excess spawns return 508, not a queue.
75
78
  PLURNK_SERVICE_WORKSPACE_WORKERS_MAX_ACTIVE=-1
@@ -128,14 +131,14 @@ PLURNK_SERVICE_EFFECT_READ=auto
128
131
  PLURNK_SERVICE_EFFECT_PURE=auto
129
132
  # Brief settlement wait for new streams/completing siblings, ms; 0 = off; quiescence ends it early.
130
133
  PLURNK_SERVICE_OPTIMISTIC_WAIT_MS=5000
131
- # Maximum park before reassessing live work, positive seconds; WAIT <seconds> overrides one park.
134
+ # Maximum park before reassessing live work, positive seconds; WAIT [seconds] overrides one park.
132
135
  PLURNK_SERVICE_WAIT_SEC=300
133
136
  # Ambient environment an EXEC subprocess may inherit from the host: exact names, or one
134
- # trailing-* prefix glob. This is a CEILING — a worker or a heading modifier narrows it,
135
- # nothing widens it. plurnk's own secrets (PLURNK_* and every provider credential name) are
136
- # stripped beneath it unconditionally and are not governed by this knob.
137
+ # trailing-* prefix glob. This bounds inherited host values, not explicit non-reserved values.
138
+ # PLURNK_* and provider credential names remain excluded regardless of these selectors.
139
+ # Module-owned launches and explicit MCP bindings follow their own launch contract.
137
140
  # The shipped list is what a shell, git, node and python need to run at all. An operator
138
- # who wants a tool's credential reachable by model-written commands adds it by name.
141
+ # who wants a non-reserved tool credential inherited by commands adds its name.
139
142
  PLURNK_SERVICE_EXEC_ENV_INHERIT=PATH,HOME,USER,LOGNAME,SHELL,PWD,TMPDIR,TERM,TZ,LANG,LC_*,PAGER,GIT_PAGER,NO_COLOR,CI
140
143
  # Names removed after INHERIT, same shapes; narrows without rewriting the list above.
141
144
  PLURNK_SERVICE_EXEC_ENV_EXCLUDE=
@@ -151,20 +154,29 @@ PLURNK_SERVICE_EDIT_RECEIPT_CONTEXT_LINES=4
151
154
  PLURNK_SERVICE_EDIT_RECEIPT_REMOVED_LINES=40
152
155
  # Paths named per class in the packet's git status; the rest are counted.
153
156
  PLURNK_SERVICE_GIT_STATUS_PATHS=8
154
- # Heaviest retained log rows the Context gauge names, as {path, tokens}; 0 names none.
157
+ # Above this share of the budget, measured before adding either, the Context gauge names its largest rows
158
+ # and a packet within its budget carries the budget_pressure notice ({§context-pressure-notice}).
159
+ PLURNK_SERVICE_BUDGET_PRESSURE=80%
160
+ # Heaviest retained log rows the pressured Context gauge names, as {path, tokens}; 0 names none.
155
161
  PLURNK_SERVICE_BUDGET_LARGEST_ITEMS=5
156
162
  # First page of everything that comes back unasked in size: a READ or FIND without a scope, a stream's
157
163
  # delivery, a peer worker's message, a receipt the model did not author ({§markerless-first-page}).
158
- # Lines of text, bytes of a byte view, results of a FIND; explicit scopes stay exact.
164
+ # Lines of text, bytes of a byte view, results of a FIND; explicit scopes stay exact. 100 is a page for
165
+ # the million-token windows hosted models have; a deployment with a small room tunes it down.
159
166
  PLURNK_SERVICE_PREVIEW_LINES=100
160
167
  # Independent bound on the same page, Unicode code points; CRLF counts as one separator.
161
168
  PLURNK_SERVICE_PREVIEW_CHARS=16000
169
+ # Assistant replay ({§emission-history}): none, latest, or all eligible turns from this loop, each as the
170
+ # NOTEs it wrote, in the model's voice; every other operation is omitted. The context wall may omit
171
+ # the whole section; source evidence never changes.
172
+ PLURNK_SERVICE_EMISSION_HISTORY=all
162
173
  # Optional reasoning memory ({§reasoning-row}): 1 adds the turn's preview before its emission or results,
163
174
  # only when room remains after all requested results and diagnostics. Otherwise omit it silently. 0 disables it.
164
- PLURNK_SERVICE_REASONING_ROWS=1
175
+ PLURNK_SERVICE_REASONING_ROWS=0
165
176
  # The row's page ({§reasoning-row}): reasoning that fits it lands whole; longer reasoning lands as its last page,
166
177
  # this many lines within PLURNK_SERVICE_PREVIEW_CHARS, because a turn's conclusions and plan sit at its end; the
167
- # rest stays readable at reasoning://. Unset/empty = the shared page, PLURNK_SERVICE_PREVIEW_LINES.
178
+ # rest stays readable at reasoning://. -1 returns the complete reasoning without either preview bound,
179
+ # still only if it fits. Unset/empty = the shared page, PLURNK_SERVICE_PREVIEW_LINES; 0 is invalid.
168
180
  # PLURNK_SERVICE_REASONING_TRAILING_LINES=40
169
181
  # Code points of an entry's prose summary the catalog shows whole.
170
182
  PLURNK_SERVICE_CATALOG_SUMMARY_CHARS=256
@@ -193,6 +205,10 @@ PLURNK_SERVICE_ROOTS=project,plurnk,global
193
205
  # PLURNK_SERVICE_POLICY=
194
206
  # Recap file, relative to the package root; unset = packaged recap.md; empty file omits the section.
195
207
  # PLURNK_SERVICE_RECAP=
208
+ # Recap lines, one per key: PLURNK_SERVICE_RECAP_LINE_<alias>=<line> ({§recap-lines}). Each opens with YOU MUST,
209
+ # YOU MUST NOT, YOU MUST ONLY, YOU SHOULD, YOU SHOULD NOT or YOU MAY and renders as one callout, in alias order,
210
+ # ahead of the Recap source. An empty value turns a shipped line off.
211
+ # PLURNK_SERVICE_RECAP_LINE_<alias>=
196
212
 
197
213
  # --- Search indexing ---
198
214
  # Comma-separated globs excluded from derivation, not READ. No slash = basename; slash = pathname.
@@ -207,23 +223,24 @@ PLURNK_SERVICE_DERIVE_STORE_BATCH=1024
207
223
  # Progress heartbeat, ms; starts, failures, and completion are immediate; no-op passes stay silent.
208
224
  PLURNK_SERVICE_DERIVE_PROGRESS_HEARTBEAT_MS=15000
209
225
 
210
- # --- Retention: information is kept; transient data is collected ({§retention-policy}) ---
211
- # Packet compositions kept per loop, newest first; -1 = every packet, forever.
226
+ # --- Retention: packet/response bodies and unreferenced content ({§retention-policy}) ---
227
+ # Packet compositions kept per loop, newest first; -1 disables the count limit, not the age limit.
212
228
  PLURNK_SERVICE_RETAIN_PACKET_TURNS=-1
213
- # Packet compositions kept by age, ms since the turn completed; -1 = no age limit. Thirty days:
214
- # no worker reads its own packets back that late, and a daemon left running for months stops growing.
229
+ # Packet compositions kept by age, ms since the turn completed; -1 disables the age limit.
215
230
  PLURNK_SERVICE_RETAIN_PACKET_MS=2592000000
216
- # Model response bodies kept per loop, newest first; -1 = every body, forever. The call's
217
- # evidence, admission and accounting always stay.
231
+ # Calls with captured payloads kept per loop, newest first; -1 disables the count limit.
232
+ # These controls do not retire messages, turn sources, operations, approval decisions or accounting.
218
233
  PLURNK_SERVICE_RETAIN_RESPONSE_TURNS=-1
219
- # Model response bodies kept by age, ms since the turn completed; -1 = no age limit. Thirty days, as above.
234
+ # Call payloads kept by age, ms since the turn completed; -1 disables the age limit.
235
+ # Covers normalized responses and all physical-request payloads, including failed retries.
236
+ # Identities, status, usage and cost remain; retirement is timestamped on the logical call.
220
237
  PLURNK_SERVICE_RETAIN_RESPONSE_MS=2592000000
221
238
  # Collect packet items no turn's composition references (1), or keep them (0).
222
239
  PLURNK_SERVICE_COLLECT_PACKET_ITEMS=1
223
240
  # Collect derivations no channel, turn source, or log row cites (1), or keep them (0).
224
241
  PLURNK_SERVICE_COLLECT_DERIVATIONS=1
225
- # Collect stored bodies no channel holds and no derivation indexes (1), or keep them (0)
226
- # ({§content-store}).
242
+ # Collect unreferenced text and native bodies (1), or keep them (0).
243
+ # Retained messages, operations and packet attachments pin native bytes ({§native-content-lifetime}).
227
244
  PLURNK_SERVICE_COLLECT_CONTENTS=1
228
245
  # Retention cadence while the daemon runs, ms; 0 = at shutdown only.
229
246
  PLURNK_SERVICE_RETENTION_INTERVAL_MS=3600000
package/INSTALL.md CHANGED
@@ -79,6 +79,25 @@ sidecars together. Copy the backup to a fresh working path, select that path wit
79
79
  `PLURNK_SERVICE_DB_PATH`, and start the same or a newer compatible service version.
80
80
  Do not overwrite a live database or pair a restored file with old sidecars.
81
81
 
82
+ | Restored input | Startup behaviour |
83
+ | --- | --- |
84
+ | Database | Retained history, approval decisions, attachments and workspace/worker configuration return. Interrupted work is settled without replaying uncertain effects ({§worker-lifecycle-restart-recovery}). |
85
+ | Project files and service configuration | Restore separately. Current files remain authoritative; startup reads the current configuration, not an earlier ambient environment captured in history. |
86
+ | Schedules | Enabled definitions rearm from the present; missed occurrences are not replayed ({§schedule-residency}, {§schedule-first-arming}). |
87
+ | Interactive MCP authorization | Reauthorize. Tokens and pending sign-ins are process-local, not part of the database backup ({§oauth-lifetime}). |
88
+
89
+ Retention controls expire packet compositions and call payloads, including physical-request
90
+ captures. Messages, turn sources, operation receipts, approval decisions and request accounting
91
+ remain with their containing history ({§retention-policy}); referenced attachment bytes remain
92
+ too ({§native-content-lifetime}). This is not content erasure. A share contains only what remains
93
+ when it is taken.
94
+
95
+ `PLURNK_SERVICE_SQLITE_SYNCHRONOUS` selects the database's WAL durability before migrations
96
+ or startup writes. Its shipped setting is in `.env.defaults`. `FULL` synchronizes every commit
97
+ to storage; selecting `NORMAL` explicitly trades power-loss durability for fewer synchronizations.
98
+ The guarantees and storage assumptions are defined in {§db-durability}. Neither setting makes
99
+ project-file writes transactional or replaces backups.
100
+
82
101
  ## Precedence
83
102
 
84
103
  Highest priority first ({§operator-config-precedence}):
@@ -101,13 +120,31 @@ Extension settings remain environment/configuration values; they do not extend t
101
120
  service CLI. Boolean flags use `1` and `0`. An empty value is not an unset value;
102
121
  the owning declaration specifies its meaning.
103
122
 
123
+ ## Manual and shell completions
124
+
125
+ The installed package includes a generated manual and static completions. They
126
+ require no running daemon. Find the global npm package at
127
+ `$(npm root -g)/@plurnk/plurnk-service`; the paths below are relative to it.
128
+
129
+ | Artifact | Use |
130
+ | --- | --- |
131
+ | `dist/man/plurnk-service.1` | Open with `man /path/to/plurnk-service.1`, or copy into a directory on `MANPATH` (commonly `~/.local/share/man/man1/`). |
132
+ | `dist/completions/plurnk-service.bash` | Source from your Bash configuration. |
133
+ | `dist/completions/_plurnk-service` | Copy into a directory on Zsh's `fpath` before `compinit`. |
134
+ | `dist/completions/plurnk-service.fish` | Copy into `~/.config/fish/completions/`, or the corresponding `XDG_CONFIG_HOME` location. |
135
+
136
+ Completion offers command names, long options and filenames. Configuration
137
+ values remain in `plurnk-service config defaults`, not a separate static catalog.
138
+ Package installation does not edit shell configuration or install these files
139
+ outside the package.
140
+
104
141
  ## Choose the right scope
105
142
 
106
143
  | Change | Owner and effect |
107
144
  | --- | --- |
108
145
  | Startup defaults or installed extension configuration | The daemon's environment cascade. A remote client's shell does not change it. |
109
146
  | Model, reasoning, child model | Worker selections persist. Set them through client controls; changing a startup default does not retarget an existing Worker. |
110
- | MCPs, skills, outbound agents, schedules, membership | Workspace Functionality: list, discover, add, enable, disable, remove. Workers share the workspace's current selection. |
147
+ | MCPs, skills, outbound agents, schedules, membership | Workspace Functionality: list, discover, add, replace, enable, disable, remove. Workers share the workspace's current selection. |
111
148
  | Command environment | `env` manages worker overrides or workspace defaults. It does not reconfigure the daemon; running processes keep their launch environment. |
112
149
  | External capabilities | Service policy is a ceiling; workspace policy can narrow it for every worker. Hiding a doc does not grant or revoke authority. |
113
150
  | Proposal review / YOLO | Decides who accepts or rejects an admitted operation. Automatic acceptance never overrides capability or resource permissions. |
package/README.md CHANGED
@@ -5,6 +5,9 @@ operation dispatch. Its client surface is AG-UI over HTTP/SSE through
5
5
  `@plurnk/plurnk-agui`. The user-facing CLI lives in
6
6
  [plurnk](https://github.com/plurnk/plurnk).
7
7
 
8
+ See [installation and configuration](INSTALL.md), including the packaged
9
+ [manual and shell completions](INSTALL.md#manual-and-shell-completions).
10
+
8
11
  ## What an agent can do
9
12
 
10
13
  The exact model-facing language and operation set are owned by