@plurnk/plurnk-service 1.28.0 → 2.0.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 (253) hide show
  1. package/.env.defaults +7 -18
  2. package/INSTALL.md +65 -15
  3. package/README.md +8 -5
  4. package/SPEC.md +217 -449
  5. package/dist/build-info.json +1 -1
  6. package/dist/content/body-preview.d.ts +5 -0
  7. package/dist/content/body-preview.d.ts.map +1 -1
  8. package/dist/content/body-preview.js +25 -0
  9. package/dist/content/body-preview.js.map +1 -1
  10. package/dist/content/line-marker.js +1 -1
  11. package/dist/content/line-marker.js.map +1 -1
  12. package/dist/content/path-mimetype.js +1 -1
  13. package/dist/content/path-mimetype.js.map +1 -1
  14. package/dist/core/AdmittedTurnExecutor.d.ts +4 -3
  15. package/dist/core/AdmittedTurnExecutor.d.ts.map +1 -1
  16. package/dist/core/AdmittedTurnExecutor.js +19 -17
  17. package/dist/core/AdmittedTurnExecutor.js.map +1 -1
  18. package/dist/core/BareBatchRunner.d.ts +2 -2
  19. package/dist/core/BareBatchRunner.d.ts.map +1 -1
  20. package/dist/core/BareBatchRunner.js.map +1 -1
  21. package/dist/core/ChannelWrite.d.ts +5 -0
  22. package/dist/core/ChannelWrite.d.ts.map +1 -1
  23. package/dist/core/ChannelWrite.js +5 -0
  24. package/dist/core/ChannelWrite.js.map +1 -1
  25. package/dist/core/ChannelWrite.sql +10 -0
  26. package/dist/core/DataStatementRunner.d.ts.map +1 -1
  27. package/dist/core/DataStatementRunner.js +8 -3
  28. package/dist/core/DataStatementRunner.js.map +1 -1
  29. package/dist/core/Dispatcher.d.ts +2 -2
  30. package/dist/core/Dispatcher.d.ts.map +1 -1
  31. package/dist/core/Dispatcher.js +21 -15
  32. package/dist/core/Dispatcher.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 +1 -1
  36. package/dist/core/Engine.js.map +1 -1
  37. package/dist/core/ExecutorRegistry.d.ts +3 -17
  38. package/dist/core/ExecutorRegistry.d.ts.map +1 -1
  39. package/dist/core/ExecutorRegistry.js +6 -6
  40. package/dist/core/ExecutorRegistry.js.map +1 -1
  41. package/dist/core/HostPaths.d.ts +2 -0
  42. package/dist/core/HostPaths.d.ts.map +1 -1
  43. package/dist/core/HostPaths.js +14 -0
  44. package/dist/core/HostPaths.js.map +1 -1
  45. package/dist/core/KillHandler.d.ts.map +1 -1
  46. package/dist/core/KillHandler.js +9 -3
  47. package/dist/core/KillHandler.js.map +1 -1
  48. package/dist/core/PacketBuilder.d.ts.map +1 -1
  49. package/dist/core/PacketBuilder.js +8 -2
  50. package/dist/core/PacketBuilder.js.map +1 -1
  51. package/dist/core/ResourceSelector.d.ts.map +1 -1
  52. package/dist/core/ResourceSelector.js +4 -2
  53. package/dist/core/ResourceSelector.js.map +1 -1
  54. package/dist/core/ResourceTransfers.d.ts.map +1 -1
  55. package/dist/core/ResourceTransfers.js +2 -2
  56. package/dist/core/ResourceTransfers.js.map +1 -1
  57. package/dist/core/SchemeRegistry.d.ts +5 -4
  58. package/dist/core/SchemeRegistry.d.ts.map +1 -1
  59. package/dist/core/SchemeRegistry.js +9 -9
  60. package/dist/core/SchemeRegistry.js.map +1 -1
  61. package/dist/core/ToolResources.js +5 -5
  62. package/dist/core/ToolResources.js.map +1 -1
  63. package/dist/core/Turn.js +1 -1
  64. package/dist/core/Turn.js.map +1 -1
  65. package/dist/core/TurnOps.d.ts +1 -1
  66. package/dist/core/TurnOps.d.ts.map +1 -1
  67. package/dist/core/TurnOps.js +4 -12
  68. package/dist/core/TurnOps.js.map +1 -1
  69. package/dist/core/TurnRunner.d.ts +1 -2
  70. package/dist/core/TurnRunner.d.ts.map +1 -1
  71. package/dist/core/TurnRunner.js +11 -24
  72. package/dist/core/TurnRunner.js.map +1 -1
  73. package/dist/core/WorkerControlHandler.d.ts.map +1 -1
  74. package/dist/core/WorkerControlHandler.js +5 -1
  75. package/dist/core/WorkerControlHandler.js.map +1 -1
  76. package/dist/core/caps/DbNotifyCaps.js +2 -2
  77. package/dist/core/caps/DbNotifyCaps.js.map +1 -1
  78. package/dist/core/caps/DbProjectionCaps.js +1 -1
  79. package/dist/core/caps/DbProjectionCaps.js.map +1 -1
  80. package/dist/core/env-defaults.d.ts +2 -1
  81. package/dist/core/env-defaults.d.ts.map +1 -1
  82. package/dist/core/env-defaults.js +17 -9
  83. package/dist/core/env-defaults.js.map +1 -1
  84. package/dist/core/packet-wire.d.ts +1 -2
  85. package/dist/core/packet-wire.d.ts.map +1 -1
  86. package/dist/core/packet-wire.js +9 -6
  87. package/dist/core/packet-wire.js.map +1 -1
  88. package/dist/core/plurnk-uri.d.ts +7 -0
  89. package/dist/core/plurnk-uri.d.ts.map +1 -1
  90. package/dist/core/plurnk-uri.js +21 -0
  91. package/dist/core/plurnk-uri.js.map +1 -1
  92. package/dist/core/unregistered-scheme.d.ts +4 -0
  93. package/dist/core/unregistered-scheme.d.ts.map +1 -0
  94. package/dist/core/unregistered-scheme.js +14 -0
  95. package/dist/core/unregistered-scheme.js.map +1 -0
  96. package/dist/evidence/EvidenceReader.d.ts +14 -0
  97. package/dist/evidence/EvidenceReader.d.ts.map +1 -0
  98. package/dist/evidence/EvidenceReader.js +134 -0
  99. package/dist/evidence/EvidenceReader.js.map +1 -0
  100. package/dist/index.d.ts +0 -1
  101. package/dist/index.d.ts.map +1 -1
  102. package/dist/index.js +2 -4
  103. package/dist/index.js.map +1 -1
  104. package/dist/schemes/Exec.d.ts.map +1 -1
  105. package/dist/schemes/Exec.js +17 -6
  106. package/dist/schemes/Exec.js.map +1 -1
  107. package/dist/schemes/ExecOutputScheme.d.ts +1 -1
  108. package/dist/schemes/ExecOutputScheme.d.ts.map +1 -1
  109. package/dist/schemes/File.d.ts.map +1 -1
  110. package/dist/schemes/File.js +11 -6
  111. package/dist/schemes/File.js.map +1 -1
  112. package/dist/schemes/Log.d.ts.map +1 -1
  113. package/dist/schemes/Log.js +49 -5
  114. package/dist/schemes/Log.js.map +1 -1
  115. package/dist/schemes/{Skill.d.ts → ResourceTreeScheme.d.ts} +5 -6
  116. package/dist/schemes/ResourceTreeScheme.d.ts.map +1 -0
  117. package/dist/schemes/{Skill.js → ResourceTreeScheme.js} +63 -43
  118. package/dist/schemes/ResourceTreeScheme.js.map +1 -0
  119. package/dist/schemes/Worker.js +1 -1
  120. package/dist/schemes/Worker.js.map +1 -1
  121. package/dist/schemes/_entry-crud.js +9 -9
  122. package/dist/schemes/_entry-crud.js.map +1 -1
  123. package/dist/schemes/_entry-crud.sql +1 -1
  124. package/dist/schemes/_entry-find.js +5 -5
  125. package/dist/schemes/_entry-find.js.map +1 -1
  126. package/dist/schemes/_entry-find.sql +1 -1
  127. package/dist/schemes/_entry-fts.d.ts.map +1 -1
  128. package/dist/schemes/_entry-fts.js +7 -3
  129. package/dist/schemes/_entry-fts.js.map +1 -1
  130. package/dist/schemes/_entry-manifest.d.ts.map +1 -1
  131. package/dist/schemes/_entry-manifest.js +3 -5
  132. package/dist/schemes/_entry-manifest.js.map +1 -1
  133. package/dist/schemes/_entry-ops.js +4 -4
  134. package/dist/schemes/_entry-ops.js.map +1 -1
  135. package/dist/server/AgentRoots.d.ts +2 -1
  136. package/dist/server/AgentRoots.d.ts.map +1 -1
  137. package/dist/server/AgentRoots.js +13 -10
  138. package/dist/server/AgentRoots.js.map +1 -1
  139. package/dist/server/ConfigurationDiagnostics.d.ts +4 -3
  140. package/dist/server/ConfigurationDiagnostics.d.ts.map +1 -1
  141. package/dist/server/ConfigurationDiagnostics.js +15 -8
  142. package/dist/server/ConfigurationDiagnostics.js.map +1 -1
  143. package/dist/server/Daemon.d.ts +13 -8
  144. package/dist/server/Daemon.d.ts.map +1 -1
  145. package/dist/server/Daemon.js +91 -49
  146. package/dist/server/Daemon.js.map +1 -1
  147. package/dist/server/EnvFunctionality.d.ts +2 -2
  148. package/dist/server/EnvFunctionality.d.ts.map +1 -1
  149. package/dist/server/EnvFunctionality.js +2 -2
  150. package/dist/server/EnvFunctionality.js.map +1 -1
  151. package/dist/server/Functionality.d.ts +3 -2
  152. package/dist/server/Functionality.d.ts.map +1 -1
  153. package/dist/server/Functionality.js +1 -1
  154. package/dist/server/Functionality.js.map +1 -1
  155. package/dist/server/HttpListener.d.ts +2 -0
  156. package/dist/server/HttpListener.d.ts.map +1 -1
  157. package/dist/server/HttpListener.js +17 -9
  158. package/dist/server/HttpListener.js.map +1 -1
  159. package/dist/server/MembersFunctionality.d.ts +1 -1
  160. package/dist/server/MembersFunctionality.d.ts.map +1 -1
  161. package/dist/server/MembersFunctionality.js.map +1 -1
  162. package/dist/server/ModuleHost.d.ts +33 -0
  163. package/dist/server/ModuleHost.d.ts.map +1 -0
  164. package/dist/server/ModuleHost.js +2 -0
  165. package/dist/server/ModuleHost.js.map +1 -0
  166. package/dist/server/PlurnkSkill.d.ts.map +1 -1
  167. package/dist/server/PlurnkSkill.js +54 -6
  168. package/dist/server/PlurnkSkill.js.map +1 -1
  169. package/dist/server/ServiceModules.d.ts +0 -2
  170. package/dist/server/ServiceModules.d.ts.map +1 -1
  171. package/dist/server/ServiceModules.js +5 -9
  172. package/dist/server/ServiceModules.js.map +1 -1
  173. package/dist/server/WorkspacePlugins.d.ts +2 -11
  174. package/dist/server/WorkspacePlugins.d.ts.map +1 -1
  175. package/dist/server/WorkspacePlugins.js.map +1 -1
  176. package/dist/server/WorkspaceResidency.d.ts +2 -1
  177. package/dist/server/WorkspaceResidency.d.ts.map +1 -1
  178. package/dist/server/WorkspaceStorage.d.ts +1 -0
  179. package/dist/server/WorkspaceStorage.d.ts.map +1 -1
  180. package/dist/server/WorkspaceStorage.js +31 -5
  181. package/dist/server/WorkspaceStorage.js.map +1 -1
  182. package/dist/server/module-discovery.d.ts +11 -3
  183. package/dist/server/module-discovery.d.ts.map +1 -1
  184. package/dist/server/module-discovery.js +32 -18
  185. package/dist/server/module-discovery.js.map +1 -1
  186. package/dist/server/workspace-storage.sql +5 -0
  187. package/dist/service.d.ts.map +1 -1
  188. package/dist/service.js +37 -34
  189. package/dist/service.js.map +1 -1
  190. package/migrations/016_selection_statements.sql +43 -0
  191. package/migrations/017_skills_module.sql +5 -0
  192. package/package.json +71 -72
  193. package/dist/core/EmissionHead.d.ts +0 -8
  194. package/dist/core/EmissionHead.d.ts.map +0 -1
  195. package/dist/core/EmissionHead.js +0 -29
  196. package/dist/core/EmissionHead.js.map +0 -1
  197. package/dist/core/operation-target-groups.d.ts +0 -3
  198. package/dist/core/operation-target-groups.d.ts.map +0 -1
  199. package/dist/core/operation-target-groups.js +0 -77
  200. package/dist/core/operation-target-groups.js.map +0 -1
  201. package/dist/digest/Digest.d.ts +0 -10
  202. package/dist/digest/Digest.d.ts.map +0 -1
  203. package/dist/digest/Digest.js +0 -252
  204. package/dist/digest/Digest.js.map +0 -1
  205. package/dist/digest/DigestEvidence.d.ts +0 -11
  206. package/dist/digest/DigestEvidence.d.ts.map +0 -1
  207. package/dist/digest/DigestEvidence.js +0 -66
  208. package/dist/digest/DigestEvidence.js.map +0 -1
  209. package/dist/digest/DigestRender.d.ts +0 -18
  210. package/dist/digest/DigestRender.d.ts.map +0 -1
  211. package/dist/digest/DigestRender.js +0 -1035
  212. package/dist/digest/DigestRender.js.map +0 -1
  213. package/dist/digest/DigestRequiem.d.ts +0 -13
  214. package/dist/digest/DigestRequiem.d.ts.map +0 -1
  215. package/dist/digest/DigestRequiem.js +0 -337
  216. package/dist/digest/DigestRequiem.js.map +0 -1
  217. package/dist/digest/digest-db.d.ts +0 -3
  218. package/dist/digest/digest-db.d.ts.map +0 -1
  219. package/dist/digest/digest-db.js +0 -68
  220. package/dist/digest/digest-db.js.map +0 -1
  221. package/dist/digest/digest-paths.d.ts +0 -6
  222. package/dist/digest/digest-paths.d.ts.map +0 -1
  223. package/dist/digest/digest-paths.js +0 -14
  224. package/dist/digest/digest-paths.js.map +0 -1
  225. package/dist/digest/digest-rows.d.ts +0 -346
  226. package/dist/digest/digest-rows.d.ts.map +0 -1
  227. package/dist/digest/digest-rows.js +0 -2
  228. package/dist/digest/digest-rows.js.map +0 -1
  229. package/dist/schemes/Skill.d.ts.map +0 -1
  230. package/dist/schemes/Skill.js.map +0 -1
  231. package/dist/server/DaemonModule.d.ts +0 -101
  232. package/dist/server/DaemonModule.d.ts.map +0 -1
  233. package/dist/server/DaemonModule.js +0 -2
  234. package/dist/server/DaemonModule.js.map +0 -1
  235. package/dist/server/SkillSource.d.ts +0 -37
  236. package/dist/server/SkillSource.d.ts.map +0 -1
  237. package/dist/server/SkillSource.js +0 -267
  238. package/dist/server/SkillSource.js.map +0 -1
  239. package/dist/server/SkillsFunctionality.d.ts +0 -45
  240. package/dist/server/SkillsFunctionality.d.ts.map +0 -1
  241. package/dist/server/SkillsFunctionality.js +0 -405
  242. package/dist/server/SkillsFunctionality.js.map +0 -1
  243. package/dist/server/skills-problems.d.ts +0 -8
  244. package/dist/server/skills-problems.d.ts.map +0 -1
  245. package/dist/server/skills-problems.js +0 -18
  246. package/dist/server/skills-problems.js.map +0 -1
  247. package/dist/share/Share.d.ts +0 -15
  248. package/dist/share/Share.d.ts.map +0 -1
  249. package/dist/share/Share.js +0 -106
  250. package/dist/share/Share.js.map +0 -1
  251. package/dist/share/share.sql +0 -6
  252. package/docs/skills.md +0 -73
  253. /package/dist/{digest → evidence}/digest.sql +0 -0
package/.env.defaults CHANGED
@@ -163,10 +163,13 @@ PLURNK_SERVICE_BUDGET_LARGEST_ITEMS=5
163
163
  PLURNK_SERVICE_PREVIEW_LINES=100
164
164
  # Independent bound on the same page, Unicode code points; CRLF counts as one separator.
165
165
  PLURNK_SERVICE_PREVIEW_CHARS=16000
166
- # The model's memory of its own thinking ({§reasoning-row}): 1 lands each model turn's reasoning as a row of its
167
- # own, immediately before the turn's emission row, whole, when the packet has room for it after everything else;
168
- # without room no row lands and nothing else changes. 0 lands nothing.
166
+ # Optional reasoning memory ({§reasoning-row}): 1 adds the turn's preview before its emission or results,
167
+ # only when room remains after all requested results and diagnostics. Otherwise omit it silently. 0 disables it.
169
168
  PLURNK_SERVICE_REASONING_ROWS=1
169
+ # The row's page ({§reasoning-row}): reasoning that fits it lands whole; longer reasoning lands as its last page,
170
+ # this many lines within PLURNK_SERVICE_PREVIEW_CHARS, because a turn's conclusions and plan sit at its end; the
171
+ # rest stays readable at reasoning://. Unset/empty = the shared page, PLURNK_SERVICE_PREVIEW_LINES.
172
+ # PLURNK_SERVICE_REASONING_TRAILING_LINES=40
170
173
  # Code points of an entry's prose summary the catalog shows whole.
171
174
  PLURNK_SERVICE_CATALOG_SUMMARY_CHARS=256
172
175
  # Log entries one client read returns when it names no limit.
@@ -183,19 +186,11 @@ PLURNK_SERVICE_FILES_ITEMS=-1
183
186
 
184
187
  # --- Teaching and skills ---
185
188
  # Scheme names omitted from discoverable references, comma-separated; empty = none.
186
- # Executable docs instead follow tool enablement. Plugin trust lives in plurnk-meta's defaults.
189
+ # Executable docs instead follow tool enablement. Extension trust lives in plurnk-meta's defaults.
187
190
  PLURNK_SERVICE_DOCS_EXCLUDE="plurnk,file,exec"
188
191
  # Skills, plugin and standalone MCP configuration roots, comma-separated, nearest first: project
189
192
  # (the workspace project's .agents), plurnk ($XDG_CONFIG_HOME/plurnk), global (~/.agents).
190
193
  PLURNK_SERVICE_ROOTS=project,plurnk,global
191
- # Agent Skills: whole source definitions override discovered skills by their exact standard name.
192
- # `_` in a key represents `-`; Unicode names work in .env or via `env 'KEY=value' command`.
193
- # PLURNK_SKILLS_code_review={"name":"code-review","source":"/srv/skills/code-review"}
194
- # Declared and discovered skills default enabled; per-name controls override this default.
195
- PLURNK_SKILLS_ENABLED=1
196
- # PLURNK_SKILLS_code_review_ENABLED=0
197
- # Deadline for one skills source fetch (git ls-remote, git clone, tar, unzip), positive ms.
198
- PLURNK_SERVICE_SKILLS_FETCH_TIMEOUT_MS=120000
199
194
  # Extra Markdown after language teaching, reread each turn; unreadable explicit paths fail.
200
195
  # PLURNK_SERVICE_PACKET_INJECT="~/injection.md"
201
196
  # Policy Markdown: unset = $XDG_CONFIG_HOME/plurnk/AGENTS.md; empty = off; otherwise that path.
@@ -216,12 +211,6 @@ PLURNK_SERVICE_DERIVE_STORE_BATCH=1024
216
211
  # Progress heartbeat, ms; starts, failures, and completion are immediate; no-op passes stay silent.
217
212
  PLURNK_SERVICE_DERIVE_PROGRESS_HEARTBEAT_MS=15000
218
213
 
219
- # --- Forensic interviews ---
220
- # Initial requiem output allowance, tokens; used only for requested out-of-band interviews.
221
- PLURNK_SERVICE_REQUIEM_MAX_TOKENS=16384
222
- # Retry allowance for empty length-limited testimony; must be at least the initial allowance.
223
- PLURNK_SERVICE_REQUIEM_RETRY_MAX_TOKENS=32768
224
-
225
214
  # --- Retention: information is kept; transient data is collected ({§retention-policy}) ---
226
215
  # Packet compositions kept per loop, newest first; -1 = every packet, forever.
227
216
  PLURNK_SERVICE_RETAIN_PACKET_TURNS=-1
package/INSTALL.md CHANGED
@@ -42,6 +42,42 @@ inspection available. Model providers are constructed and verified on selection
42
42
  first use, not on startup. An invalid default never selects a different model:
43
43
  choose a valid model in the client or correct the daemon's configuration.
44
44
 
45
+ ## Backup and restore
46
+
47
+ The database holds worker history and workspace state. Its default path is in
48
+ the table above; `PLURNK_SERVICE_DB_PATH` overrides it, and
49
+ `PLURNK_SERVICE_STATE_ROOT` relocates the default. Back up the actual daemon's
50
+ database, not a different client's default.
51
+
52
+ Use SQLite's consistent-copy operation while the daemon is running **or** stopped
53
+ ({§share-snapshot}). Copying only a live `.db` can omit committed data still in
54
+ its `-wal` file; copying those files separately is not a consistent snapshot.
55
+ This example uses Node, already required by Plurnk, and the default XDG path.
56
+ Choose a new destination for each backup:
57
+
58
+ ```sh
59
+ (
60
+ umask 077
61
+ node --input-type=module -e '
62
+ import { DatabaseSync } from "node:sqlite";
63
+ const db = new DatabaseSync(process.argv[1], { readOnly: true });
64
+ try { db.prepare("VACUUM INTO ?").run(process.argv[2]); }
65
+ finally { db.close(); }
66
+ ' "${XDG_DATA_HOME:-$HOME/.local/share}/plurnk/plurnk.db" "$HOME/plurnk-backup.db"
67
+ )
68
+ ```
69
+
70
+ Keep backups private: they include prompts, reasoning, and recorded tool output.
71
+ Back up project files, configuration, and extension-owned files separately; a
72
+ database snapshot does not copy them. `plurnk-service share` produces diagnostic
73
+ artifacts from a temporary snapshot and then removes that snapshot; it is not
74
+ a substitute for this backup.
75
+
76
+ To restore, stop the daemon and retain its old database and any `-wal`/`-shm`
77
+ sidecars together. Copy the backup to a fresh working path, select that path with
78
+ `PLURNK_SERVICE_DB_PATH`, and start the same or a newer compatible service version.
79
+ Do not overwrite a live database or pair a restored file with old sidecars.
80
+
45
81
  ## Precedence
46
82
 
47
83
  Highest priority first ({§operator-config-precedence}):
@@ -60,7 +96,7 @@ variables reach its commands through the workspace environment (`/env import .en
60
96
 
61
97
  For a service-owned variable, strip `PLURNK_`, lowercase, and replace `_` with
62
98
  `-` to obtain its CLI flag: `PLURNK_SERVICE_MAX_TURNS` → `--service-max-turns`.
63
- Plugin settings remain environment/configuration values; they do not extend the
99
+ Extension settings remain environment/configuration values; they do not extend the
64
100
  service CLI. Boolean flags use `1` and `0`. An empty value is not an unset value;
65
101
  the owning declaration specifies its meaning.
66
102
 
@@ -68,7 +104,7 @@ the owning declaration specifies its meaning.
68
104
 
69
105
  | Change | Owner and effect |
70
106
  | --- | --- |
71
- | Startup defaults or installed plugin configuration | The daemon's environment cascade. A remote client's shell does not change it. |
107
+ | Startup defaults or installed extension configuration | The daemon's environment cascade. A remote client's shell does not change it. |
72
108
  | Model, reasoning, child model | Worker selections persist. Set them through client controls; changing a startup default does not retarget an existing Worker. |
73
109
  | MCPs, skills, outbound agents, schedules, membership | Workspace Functionality: list, discover, add, enable, disable, remove. Workers share the workspace's current selection. |
74
110
  | Command environment | `env` manages worker overrides or workspace defaults. It does not reconfigure the daemon; running processes keep their launch environment. |
@@ -141,12 +177,13 @@ Configuration provenance names the definition's environment key, discovered
141
177
  `SKILL.md` path, or MCP JSON file and JSON Pointer, not a dotenv file or shadowed history. Local overrides are
142
178
  workspace-owned; removing one exposes its current inherited source again.
143
179
 
144
- ## Native extensions
180
+ ## Extensions
145
181
 
146
- Standard [Agent Plugins](https://agent-plugins.org/specification) keep their portable
147
- skills and MCP servers and may add one native capability under `extensions.ai.plurnk`.
148
- That declaration uses the family's existing loader and lifetime. For daemon lifecycle
149
- hooks, declare a module:
182
+ An extension is native Plurnk code of one kind, declared once: under `plurnk` in an npm
183
+ package's `package.json`, or under `extensions.ai.plurnk` in a standard
184
+ [Agent Plugin](https://agent-plugins.org/specification)'s `plugin.json`, beside the plugin's
185
+ portable skills and MCP servers. Its kind's framework loads it with that kind's lifetime. A
186
+ module joins the daemon lifecycle:
150
187
 
151
188
  ```json
152
189
  {
@@ -156,15 +193,28 @@ hooks, declare a module:
156
193
  }
157
194
  ```
158
195
 
159
- Daemon modules load at startup from installed npm packages and selected user roots:
196
+ An npm package declares the same module in its own manifest, naming an export subpath so the
197
+ package's export conditions select its entry:
198
+
199
+ ```json
200
+ {
201
+ "name": "@example/plurnk-module",
202
+ "exports": { "./module": "./dist/module.js" },
203
+ "plurnk": { "kind": "module", "module": "./module" }
204
+ }
205
+ ```
206
+
207
+ Modules load at startup from installed npm packages and selected user roots:
160
208
  `$XDG_CONFIG_HOME/plurnk/plugins/` before `~/.agents/plugins/`, then npm. The manifest name
161
209
  identifies a plugin across those sources. Project plugins never load native code into the daemon.
162
- `PLURNK_SERVICE_ROOTS` selects the directory roots; `PLURNK_PLUGINS_TRUSTED_ONLY` governs native
163
- imports, using the npm package name when present or the plugin name otherwise.
164
- Other native families (executors, schemes, providers, mimetypes and HTTP materializers)
210
+ `PLURNK_SERVICE_ROOTS` selects the directory roots; `PLURNK_EXTENSIONS_TRUSTED_ONLY` governs
211
+ extension imports, using the npm package name when present or the plugin name otherwise.
212
+ Other extension kinds (executors, schemes, providers, mimetypes and HTTP materializers)
165
213
  require npm installation and retain their own loading behavior.
166
214
 
167
- The module exports a lifecycle object or a no-argument factory. `setup` registers capabilities;
168
- `stop` drains producers; `close` releases registrations and observers. See {§module-lifecycle}.
169
- Native files and the optional configuration panel live under `ai.plurnk/`; its `.env.defaults`
170
- joins the ordinary floor. npm owns dependencies and delivery, not a second native declaration.
215
+ A module exports a lifecycle object or a no-argument factory: `setup` registers what it
216
+ contributes, `start` opens its ingress, `stop` drains its producers, and `close` releases its
217
+ registrations and observers. Extension files and the optional configuration panel live under
218
+ `ai.plurnk/`; its `.env.defaults` joins the ordinary floor. npm owns dependencies and delivery,
219
+ not a second extension declaration. [Extending Plurnk](skill://plurnk/references/extensibility.md)
220
+ covers every integration surface and links each kind's contract.
package/README.md CHANGED
@@ -34,7 +34,7 @@ reports the choices shared by a worker's selected model and spawn override.
34
34
 
35
35
  ```sh
36
36
  npm install -g @plurnk/plurnk-service
37
- plurnk-service migrate # apply the disposable schema baseline (its chapters, in order)
37
+ plurnk-service migrate # apply pending database upgrades, preserving existing data
38
38
  plurnk-service start # daemon
39
39
  ```
40
40
 
@@ -50,9 +50,12 @@ validate without contacting a provider. **[`INSTALL.md`](./INSTALL.md) is the
50
50
  configuration guide.** A legacy mixed `~/.plurnk` is moved only by the explicit
51
51
  `plurnk-service paths migrate` command.
52
52
 
53
- The 1.x package retains its frozen root library barrel for SemVer compatibility;
54
- it is not the client boundary and gains no new APIs. Programmatic forensic use
55
- imports `@plurnk/plurnk-service/digest`.
53
+ Protect durable history with a [consistent database backup](./INSTALL.md#backup-and-restore).
54
+ The `share` command exports diagnostic reports, not a restorable database.
55
+
56
+ Clients use AG-UI; extension authors use the owning framework packages.
57
+ Programmatic forensic use imports [`@plurnk/plurnk-digest`](../plurnk-digest/README.md)
58
+ with the canonical reader from `@plurnk/plurnk-service/evidence`.
56
59
  The digest requires a new or empty output directory, separate from its input
57
60
  database. Existing output and overlapping input/output paths are refused.
58
61
 
@@ -67,7 +70,7 @@ database. Existing output and overlapping input/output paths are refused.
67
70
 
68
71
  ## Observability
69
72
 
70
- 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.
73
+ 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 extension payloads.
71
74
 
72
75
  ## Full-text search
73
76