dsh-plugin-dev-kb 1.1.0 → 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 (370) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.en.md +14 -8
  3. package/README.md +15 -9
  4. package/docs/banner.svg +25 -0
  5. package/kb/INDEX.md +23 -19
  6. package/kb/README.md +8 -6
  7. package/kb/extra/AGENTS.md +11 -10
  8. package/kb/extra/cookbook/adding-a-remote-api.md +2 -2
  9. package/kb/extra/cookbook/adding-a-remote-api.zh.md +2 -2
  10. package/kb/extra/cookbook/adding-a-session-format-version.md +151 -0
  11. package/kb/extra/cookbook/adding-a-session-format-version.zh.md +151 -0
  12. package/kb/extra/cookbook/adding-a-vendored-package.md +1 -1
  13. package/kb/extra/cookbook/adding-a-vendored-package.zh.md +1 -1
  14. package/kb/extra/cookbook/responding-to-pr-review-on-a-stack.md +1 -1
  15. package/kb/extra/cookbook/responding-to-pr-review-on-a-stack.zh.md +1 -1
  16. package/kb/extra/cookbook/reviewing-persistence-type-changes.md +120 -0
  17. package/kb/extra/cookbook/reviewing-persistence-type-changes.zh.md +120 -0
  18. package/kb/extra/deepseek-llm-api-wire-extensions.md +19 -20
  19. package/kb/extra/deepseek-llm-api-wire-extensions.zh.md +18 -19
  20. package/kb/extra/development.md +37 -10
  21. package/kb/extra/development.zh.md +37 -10
  22. package/kb/extra/event-producer-consumer.md +90 -67
  23. package/kb/extra/event-producer-consumer.zh.md +91 -68
  24. package/kb/extra/glossary.md +1 -1
  25. package/kb/extra/glossary.zh.md +1 -1
  26. package/kb/extra/i18n/README.md +16 -7
  27. package/kb/extra/i18n/README.zh.md +17 -8
  28. package/kb/extra/i18n/terminology.md +4 -4
  29. package/kb/extra/i18n/translation-prompt.md +3 -3
  30. package/kb/extra/module-graph.md +621 -335
  31. package/kb/extra/module-graph.zh.md +621 -335
  32. package/kb/extra/persistence-changes/2026-09-11-initial.md +280 -0
  33. package/kb/extra/persistence-changes/2026-09-11-initial.zh.md +280 -0
  34. package/kb/extra/persistence-changes/2026-09-12-auto-review-error-metadata.md +52 -0
  35. package/kb/extra/persistence-changes/2026-09-12-auto-review-error-metadata.zh.md +52 -0
  36. package/kb/extra/persistence-changes/2026-09-14-image-offload.md +96 -0
  37. package/kb/extra/persistence-changes/2026-09-14-image-offload.zh.md +96 -0
  38. package/kb/extra/persistence-changes/2026-09-14-workspace-changes-event.md +48 -0
  39. package/kb/extra/persistence-changes/2026-09-14-workspace-changes-event.zh.md +48 -0
  40. package/kb/extra/persistence-changes/2026-09-16-session-format-v4.md +120 -0
  41. package/kb/extra/persistence-changes/2026-09-16-session-format-v4.zh.md +120 -0
  42. package/kb/extra/persistence-changes/2026-09-18-schedule-optional-title.md +48 -0
  43. package/kb/extra/persistence-changes/2026-09-18-schedule-optional-title.zh.md +48 -0
  44. package/kb/extra/persistence-changes/2026-09-20-unknown-child-catalog.md +48 -0
  45. package/kb/extra/persistence-changes/2026-09-20-unknown-child-catalog.zh.md +48 -0
  46. package/kb/extra/persistence-changes/2026-09-21-user-question-reply.md +60 -0
  47. package/kb/extra/persistence-changes/2026-09-21-user-question-reply.zh.md +60 -0
  48. package/kb/extra/persistence-changes/README.md +88 -0
  49. package/kb/extra/persistence-changes/README.zh.md +88 -0
  50. package/kb/extra/persistence-changes/historical-formats/README.md +75 -0
  51. package/kb/extra/persistence-changes/historical-formats/README.zh.md +75 -0
  52. package/kb/extra/persistence-changes/historical-formats/v0.md +5105 -0
  53. package/kb/extra/persistence-changes/historical-formats/v0.zh.md +5105 -0
  54. package/kb/extra/persistence-changes/historical-formats/v1.md +5107 -0
  55. package/kb/extra/persistence-changes/historical-formats/v1.zh.md +5107 -0
  56. package/kb/extra/persistence-changes/historical-formats/v2.md +5362 -0
  57. package/kb/extra/persistence-changes/historical-formats/v2.zh.md +5362 -0
  58. package/kb/extra/persistence-changes/historical-formats/v3.md +5634 -0
  59. package/kb/extra/persistence-changes/historical-formats/v3.zh.md +5634 -0
  60. package/kb/extra/persistence-changes/releases/README.md +103 -0
  61. package/kb/extra/persistence-changes/releases/README.zh.md +103 -0
  62. package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.1.md +201 -0
  63. package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.1.zh.md +201 -0
  64. package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.2.md +261 -0
  65. package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.2.zh.md +261 -0
  66. package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.3.md +126 -0
  67. package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.3.zh.md +126 -0
  68. package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.4.md +75 -0
  69. package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.4.zh.md +75 -0
  70. package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.5.md +75 -0
  71. package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.5.zh.md +75 -0
  72. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.1.md +75 -0
  73. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.1.zh.md +75 -0
  74. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.2.md +75 -0
  75. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.2.zh.md +75 -0
  76. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.3.md +75 -0
  77. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.3.zh.md +75 -0
  78. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.5.md +75 -0
  79. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.5.zh.md +75 -0
  80. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.6.md +75 -0
  81. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.6.zh.md +75 -0
  82. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.7.md +82 -0
  83. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.7.zh.md +82 -0
  84. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.8.md +110 -0
  85. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.8.zh.md +110 -0
  86. package/kb/extra/persistence-changes/releases/dsh-v0.1.1-rc.1.md +82 -0
  87. package/kb/extra/persistence-changes/releases/dsh-v0.1.1-rc.1.zh.md +82 -0
  88. package/kb/extra/persistence-changes/releases/dsh-v0.1.1-rc.2.md +119 -0
  89. package/kb/extra/persistence-changes/releases/dsh-v0.1.1-rc.2.zh.md +119 -0
  90. package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.1.md +295 -0
  91. package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.1.zh.md +295 -0
  92. package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.2.md +286 -0
  93. package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.2.zh.md +286 -0
  94. package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.3.md +75 -0
  95. package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.3.zh.md +75 -0
  96. package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.4.md +95 -0
  97. package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.4.zh.md +95 -0
  98. package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.5.md +75 -0
  99. package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.5.zh.md +75 -0
  100. package/kb/extra/persistence-changes/releases/dsh-v0.1.2-rc.1.md +75 -0
  101. package/kb/extra/persistence-changes/releases/dsh-v0.1.2-rc.1.zh.md +75 -0
  102. package/kb/extra/persistence-changes/releases/dsh-v0.1.3-alpha.1.md +154 -0
  103. package/kb/extra/persistence-changes/releases/dsh-v0.1.3-alpha.1.zh.md +154 -0
  104. package/kb/extra/persistence-changes/releases/dsh-v0.1.3-alpha.2.md +86 -0
  105. package/kb/extra/persistence-changes/releases/dsh-v0.1.3-alpha.2.zh.md +86 -0
  106. package/kb/extra/persistence-changes/releases/dsh-v0.1.5-alpha.1.md +139 -0
  107. package/kb/extra/persistence-changes/releases/dsh-v0.1.5-alpha.1.zh.md +139 -0
  108. package/kb/extra/persistence-changes/releases/dsh-v0.1.5-alpha.2.md +95 -0
  109. package/kb/extra/persistence-changes/releases/dsh-v0.1.5-alpha.2.zh.md +95 -0
  110. package/kb/extra/persistence-changes/releases/dsh-v0.1.5-rc.1.md +75 -0
  111. package/kb/extra/persistence-changes/releases/dsh-v0.1.5-rc.1.zh.md +75 -0
  112. package/kb/extra/persistence-changes/releases/dsh-v0.1.5-rc.2.md +75 -0
  113. package/kb/extra/persistence-changes/releases/dsh-v0.1.5-rc.2.zh.md +75 -0
  114. package/kb/extra/rescope.md +2 -2
  115. package/kb/extra/rescope.zh.md +2 -2
  116. package/kb/extra/session-format-status.md +63 -0
  117. package/kb/extra/session-format-status.zh.md +63 -0
  118. package/kb/extra/subsystems/agent-team.md +52 -28
  119. package/kb/extra/subsystems/agent-team.zh.md +52 -28
  120. package/kb/extra/subsystems/attachment.md +19 -9
  121. package/kb/extra/subsystems/attachment.zh.md +19 -9
  122. package/kb/extra/subsystems/boot.md +323 -0
  123. package/kb/extra/subsystems/boot.zh.md +323 -0
  124. package/kb/extra/subsystems/browser-use.md +67 -0
  125. package/kb/extra/subsystems/browser-use.zh.md +67 -0
  126. package/kb/extra/subsystems/claude-code-mods.md +146 -0
  127. package/kb/extra/subsystems/claude-code-mods.zh.md +146 -0
  128. package/kb/extra/subsystems/computer-use.md +56 -0
  129. package/kb/extra/subsystems/computer-use.zh.md +56 -0
  130. package/kb/extra/subsystems/deliverables.md +178 -0
  131. package/kb/extra/subsystems/deliverables.zh.md +178 -0
  132. package/kb/extra/subsystems/extensions.md +6 -4
  133. package/kb/extra/subsystems/extensions.zh.md +6 -4
  134. package/kb/extra/subsystems/feedback.md +165 -31
  135. package/kb/extra/subsystems/feedback.zh.md +165 -31
  136. package/kb/extra/subsystems/mcp.md +139 -0
  137. package/kb/extra/subsystems/mcp.zh.md +139 -0
  138. package/kb/extra/subsystems/office-to-pdf.md +87 -0
  139. package/kb/extra/subsystems/office-to-pdf.zh.md +87 -0
  140. package/kb/extra/subsystems/otel.md +44 -0
  141. package/kb/extra/subsystems/otel.zh.md +44 -0
  142. package/kb/extra/subsystems/product-telemetry.md +79 -0
  143. package/kb/extra/subsystems/product-telemetry.zh.md +79 -0
  144. package/kb/extra/subsystems/ssh.md +135 -0
  145. package/kb/extra/subsystems/ssh.zh.md +135 -0
  146. package/kb/extra/subsystems/todo.md +3 -3
  147. package/kb/extra/subsystems/todo.zh.md +3 -3
  148. package/kb/extra/subsystems/voice-input.md +164 -0
  149. package/kb/extra/subsystems/voice-input.zh.md +164 -0
  150. package/kb/extra/subsystems/webhook.md +3 -3
  151. package/kb/extra/subsystems/webhook.zh.md +1 -1
  152. package/kb/extra/testing.md +5 -4
  153. package/kb/extra/testing.zh.md +5 -4
  154. package/kb/extra/ui-radius.md +115 -0
  155. package/kb/extra/ui-radius.zh.md +115 -0
  156. package/kb/extra/upgrade-guide/v0.1.7-rc.2/schedule-optional-bundle/guide.md +22 -0
  157. package/kb/extra/upgrade-guide/v0.1.7-rc.2/schedule-optional-bundle/guide.zh.md +22 -0
  158. package/kb/extra/upgrade-guide/v0.1.7-rc.2/transcript-view-legacy-normal/guide.md +25 -0
  159. package/kb/extra/upgrade-guide/v0.1.7-rc.2/transcript-view-legacy-normal/guide.zh.md +25 -0
  160. package/kb/extra/upgrade-guide/v0.2.0-rc.2/account-sign-in-errors/guide.md +18 -0
  161. package/kb/extra/upgrade-guide/v0.2.0-rc.2/account-sign-in-errors/guide.zh.md +18 -0
  162. package/kb/extra/upgrade-guide/v0.2.0-rc.2/remove-runtime-invariants/guide.md +23 -0
  163. package/kb/extra/upgrade-guide/v0.2.0-rc.2/remove-runtime-invariants/guide.zh.md +23 -0
  164. package/kb/extra/upgrade-guide/v0.2.0-rc.2/schedule-bundle-retired/guide.md +22 -0
  165. package/kb/extra/upgrade-guide/v0.2.0-rc.2/schedule-bundle-retired/guide.zh.md +22 -0
  166. package/kb/extra/upgrade-guide/v0.2.0-rc.2/subpath-plugin-display-manifest/guide.md +27 -0
  167. package/kb/extra/upgrade-guide/v0.2.0-rc.2/subpath-plugin-display-manifest/guide.zh.md +27 -0
  168. package/kb/extra/web-styling.md +12 -2
  169. package/kb/extra/web-styling.zh.md +12 -2
  170. package/kb/meta/search-index.json +1019 -251
  171. package/kb/meta/site-pages.txt +187 -183
  172. package/kb/meta/source.json +8 -8
  173. package/kb/meta/topics.md +11 -7
  174. package/kb/site/develop/basic/config.md +1 -0
  175. package/kb/site/develop/basic/index.md +1 -0
  176. package/kb/site/develop/basic/publish.md +10 -3
  177. package/kb/site/develop/basic/tool.md +1 -0
  178. package/kb/site/develop/cordis-tutorial/01-first-plugin.md +1 -0
  179. package/kb/site/develop/cordis-tutorial/02-lifecycle-and-effects.md +1 -0
  180. package/kb/site/develop/cordis-tutorial/03-services.md +1 -0
  181. package/kb/site/develop/cordis-tutorial/04-events.md +1 -0
  182. package/kb/site/develop/cordis-tutorial/05-config.md +28 -0
  183. package/kb/site/develop/cordis-tutorial/06-composition-and-hmr.md +3 -2
  184. package/kb/site/develop/cordis-tutorial/07-into-the-harness.md +1 -0
  185. package/kb/site/develop/cordis-tutorial/index.md +1 -0
  186. package/kb/site/develop/framework/events.md +1 -0
  187. package/kb/site/develop/framework/index.md +2 -1
  188. package/kb/site/develop/framework/service.md +1 -0
  189. package/kb/site/develop/practice/dynamic-cordis.md +9 -8
  190. package/kb/site/develop/practice/index.md +1 -0
  191. package/kb/site/develop/practice/llm-adapter.md +2 -1
  192. package/kb/site/en/develop/basic/config.md +1 -0
  193. package/kb/site/en/develop/basic/index.md +1 -0
  194. package/kb/site/en/develop/basic/publish.md +10 -3
  195. package/kb/site/en/develop/basic/tool.md +1 -0
  196. package/kb/site/en/develop/cordis-tutorial/01-first-plugin.md +1 -0
  197. package/kb/site/en/develop/cordis-tutorial/02-lifecycle-and-effects.md +1 -0
  198. package/kb/site/en/develop/cordis-tutorial/03-services.md +1 -0
  199. package/kb/site/en/develop/cordis-tutorial/04-events.md +1 -0
  200. package/kb/site/en/develop/cordis-tutorial/05-config.md +28 -0
  201. package/kb/site/en/develop/cordis-tutorial/06-composition-and-hmr.md +3 -2
  202. package/kb/site/en/develop/cordis-tutorial/07-into-the-harness.md +1 -0
  203. package/kb/site/en/develop/cordis-tutorial/index.md +1 -0
  204. package/kb/site/en/develop/framework/events.md +1 -0
  205. package/kb/site/en/develop/framework/index.md +2 -1
  206. package/kb/site/en/develop/framework/service.md +1 -0
  207. package/kb/site/en/develop/practice/dynamic-cordis.md +9 -8
  208. package/kb/site/en/develop/practice/index.md +1 -0
  209. package/kb/site/en/develop/practice/llm-adapter.md +2 -1
  210. package/kb/site/en/guide/github-review.md +1 -0
  211. package/kb/site/en/guide/mcp-memory.md +1 -0
  212. package/kb/site/en/guide/network-proxy.md +2 -1
  213. package/kb/site/en/guide/providers-custom-form.png +0 -0
  214. package/kb/site/en/guide/providers-models-page.png +0 -0
  215. package/kb/site/en/guide/providers.md +98 -83
  216. package/kb/site/en/guide/public-deployments.md +36 -0
  217. package/kb/site/en/guide/python-sdk.md +60 -23
  218. package/kb/site/en/guide/quickstart.md +2 -0
  219. package/kb/site/en/guide/schedule.md +70 -11
  220. package/kb/site/en/reference/agent-lifecycle.md +13 -5
  221. package/kb/site/en/reference/api-gateway.md +13 -11
  222. package/kb/site/en/reference/capability-seams.md +187 -62
  223. package/kb/site/en/reference/config-catalog.md +1887 -819
  224. package/kb/site/en/reference/cookbook/adding-a-package.md +57 -3
  225. package/kb/site/en/reference/cookbook/adding-a-settings-card.md +35 -64
  226. package/kb/site/en/reference/cookbook/adding-a-tool.md +5 -4
  227. package/kb/site/en/reference/cookbook/adding-an-llm-adapter.md +1 -0
  228. package/kb/site/en/reference/cookbook/extension-cookbook.md +7 -6
  229. package/kb/site/en/reference/cordis-api/context.md +1 -0
  230. package/kb/site/en/reference/cordis-api/events.md +1 -0
  231. package/kb/site/en/reference/cordis-api/fiber.md +4 -3
  232. package/kb/site/en/reference/cordis-api/inherited.md +16 -16
  233. package/kb/site/en/reference/cordis-api/registry.md +1 -0
  234. package/kb/site/en/reference/cordis-api/service.md +1 -0
  235. package/kb/site/en/reference/cordis-primer.md +1 -0
  236. package/kb/site/en/reference/index.md +32 -15
  237. package/kb/site/en/reference/persistence-catalog.md +7787 -81
  238. package/kb/site/en/reference/subsystems/approval.md +3 -2
  239. package/kb/site/en/reference/subsystems/client-modules.md +30 -13
  240. package/kb/site/en/reference/subsystems/client-resources.md +96 -0
  241. package/kb/site/en/reference/subsystems/commands.md +6 -1
  242. package/kb/site/en/reference/subsystems/compaction.md +50 -3
  243. package/kb/site/en/reference/subsystems/conversation.md +36 -6
  244. package/kb/site/en/reference/subsystems/core.md +174 -271
  245. package/kb/site/en/reference/subsystems/credentials.md +169 -5
  246. package/kb/site/en/reference/subsystems/filesystem.md +26 -0
  247. package/kb/site/en/reference/subsystems/goal.md +39 -2
  248. package/kb/site/en/reference/subsystems/index.md +18 -5
  249. package/kb/site/en/reference/subsystems/jobs.md +337 -127
  250. package/kb/site/en/reference/subsystems/llm-streaming.md +93 -43
  251. package/kb/site/en/reference/subsystems/lsp.md +2 -1
  252. package/kb/site/en/reference/subsystems/permission-presets.md +66 -29
  253. package/kb/site/en/reference/subsystems/persistence.md +40 -18
  254. package/kb/site/en/reference/subsystems/plan.md +2 -1
  255. package/kb/site/en/reference/subsystems/ptc-runtime.md +236 -0
  256. package/kb/site/en/reference/subsystems/sandbox.md +7 -5
  257. package/kb/site/en/reference/subsystems/schedule.md +392 -33
  258. package/kb/site/en/reference/subsystems/scope.md +2 -1
  259. package/kb/site/en/reference/subsystems/session-projection.md +22 -19
  260. package/kb/site/en/reference/subsystems/session-query.md +1 -0
  261. package/kb/site/en/reference/subsystems/session-reference.md +12 -6
  262. package/kb/site/en/reference/subsystems/session-telemetry.md +27 -8
  263. package/kb/site/en/reference/subsystems/session-title.md +6 -5
  264. package/kb/site/en/reference/subsystems/session.md +258 -118
  265. package/kb/site/en/reference/subsystems/settings.md +43 -292
  266. package/kb/site/en/reference/subsystems/shell.md +44 -32
  267. package/kb/site/en/reference/subsystems/sidebar-right.md +162 -0
  268. package/kb/site/en/reference/subsystems/skills.md +5 -6
  269. package/kb/site/en/reference/subsystems/slots.md +68 -39
  270. package/kb/site/en/reference/subsystems/spill.md +15 -7
  271. package/kb/site/en/reference/subsystems/storage.md +2 -2
  272. package/kb/site/en/reference/subsystems/subagent.md +65 -72
  273. package/kb/site/en/reference/subsystems/subprocess.md +42 -44
  274. package/kb/site/en/reference/subsystems/system-prompt.md +7 -2
  275. package/kb/site/en/reference/subsystems/terminal.md +1 -0
  276. package/kb/site/en/reference/subsystems/token-meter.md +3 -1
  277. package/kb/site/en/reference/subsystems/tools.md +44 -16
  278. package/kb/site/en/reference/subsystems/typert.md +153 -10
  279. package/kb/site/en/reference/subsystems/user-questions.md +131 -1
  280. package/kb/site/en/reference/subsystems/web-client.md +15 -9
  281. package/kb/site/en/reference/subsystems/web-server.md +74 -1
  282. package/kb/site/en/reference/subsystems/web.md +1 -0
  283. package/kb/site/en/reference/subsystems/workflow.md +10 -9
  284. package/kb/site/en/reference/subsystems/workspace.md +343 -4
  285. package/kb/site/en/reference/tool-catalog.md +806 -311
  286. package/kb/site/en/reference/tool-execution-pipeline.md +9 -5
  287. package/kb/site/guide/github-review.md +1 -0
  288. package/kb/site/guide/mcp-memory.md +1 -0
  289. package/kb/site/guide/network-proxy.md +2 -1
  290. package/kb/site/guide/providers-custom-form.zh.png +0 -0
  291. package/kb/site/guide/providers-models-page.zh.png +0 -0
  292. package/kb/site/guide/providers.md +109 -94
  293. package/kb/site/guide/public-deployments.md +36 -0
  294. package/kb/site/guide/python-sdk.md +60 -23
  295. package/kb/site/guide/quickstart.md +2 -0
  296. package/kb/site/guide/schedule.md +70 -11
  297. package/kb/site/reference/agent-lifecycle.md +13 -5
  298. package/kb/site/reference/api-gateway.md +13 -11
  299. package/kb/site/reference/capability-seams.md +187 -62
  300. package/kb/site/reference/config-catalog.md +1889 -820
  301. package/kb/site/reference/cookbook/adding-a-package.md +55 -3
  302. package/kb/site/reference/cookbook/adding-a-settings-card.md +35 -64
  303. package/kb/site/reference/cookbook/adding-a-tool.md +5 -4
  304. package/kb/site/reference/cookbook/adding-an-llm-adapter.md +1 -0
  305. package/kb/site/reference/cookbook/extension-cookbook.md +7 -6
  306. package/kb/site/reference/cordis-api/context.md +1 -0
  307. package/kb/site/reference/cordis-api/events.md +1 -0
  308. package/kb/site/reference/cordis-api/fiber.md +4 -3
  309. package/kb/site/reference/cordis-api/inherited.md +16 -16
  310. package/kb/site/reference/cordis-api/registry.md +1 -0
  311. package/kb/site/reference/cordis-api/service.md +1 -0
  312. package/kb/site/reference/cordis-primer.md +1 -0
  313. package/kb/site/reference/index.md +32 -15
  314. package/kb/site/reference/persistence-catalog.md +7791 -85
  315. package/kb/site/reference/subsystems/approval.md +3 -2
  316. package/kb/site/reference/subsystems/client-modules.md +30 -13
  317. package/kb/site/reference/subsystems/client-resources.md +96 -0
  318. package/kb/site/reference/subsystems/commands.md +6 -1
  319. package/kb/site/reference/subsystems/compaction.md +50 -3
  320. package/kb/site/reference/subsystems/conversation.md +35 -5
  321. package/kb/site/reference/subsystems/core.md +174 -271
  322. package/kb/site/reference/subsystems/credentials.md +169 -5
  323. package/kb/site/reference/subsystems/filesystem.md +26 -0
  324. package/kb/site/reference/subsystems/goal.md +39 -2
  325. package/kb/site/reference/subsystems/index.md +28 -15
  326. package/kb/site/reference/subsystems/jobs.md +336 -126
  327. package/kb/site/reference/subsystems/llm-streaming.md +93 -43
  328. package/kb/site/reference/subsystems/lsp.md +2 -1
  329. package/kb/site/reference/subsystems/permission-presets.md +66 -29
  330. package/kb/site/reference/subsystems/persistence.md +40 -18
  331. package/kb/site/reference/subsystems/plan.md +2 -1
  332. package/kb/site/reference/subsystems/ptc-runtime.md +236 -0
  333. package/kb/site/reference/subsystems/sandbox.md +7 -5
  334. package/kb/site/reference/subsystems/schedule.md +392 -33
  335. package/kb/site/reference/subsystems/scope.md +2 -1
  336. package/kb/site/reference/subsystems/session-projection.md +22 -19
  337. package/kb/site/reference/subsystems/session-query.md +1 -0
  338. package/kb/site/reference/subsystems/session-reference.md +12 -6
  339. package/kb/site/reference/subsystems/session-telemetry.md +27 -8
  340. package/kb/site/reference/subsystems/session-title.md +6 -5
  341. package/kb/site/reference/subsystems/session.md +258 -118
  342. package/kb/site/reference/subsystems/settings.md +43 -292
  343. package/kb/site/reference/subsystems/shell.md +44 -32
  344. package/kb/site/reference/subsystems/sidebar-right.md +162 -0
  345. package/kb/site/reference/subsystems/skills.md +5 -6
  346. package/kb/site/reference/subsystems/slots.md +68 -39
  347. package/kb/site/reference/subsystems/spill.md +15 -7
  348. package/kb/site/reference/subsystems/storage.md +2 -2
  349. package/kb/site/reference/subsystems/subagent.md +64 -71
  350. package/kb/site/reference/subsystems/subprocess.md +42 -44
  351. package/kb/site/reference/subsystems/system-prompt.md +7 -2
  352. package/kb/site/reference/subsystems/terminal.md +1 -0
  353. package/kb/site/reference/subsystems/token-meter.md +3 -1
  354. package/kb/site/reference/subsystems/tools.md +44 -16
  355. package/kb/site/reference/subsystems/typert.md +153 -10
  356. package/kb/site/reference/subsystems/user-questions.md +132 -2
  357. package/kb/site/reference/subsystems/web-client.md +15 -9
  358. package/kb/site/reference/subsystems/web-server.md +74 -1
  359. package/kb/site/reference/subsystems/web.md +1 -0
  360. package/kb/site/reference/subsystems/workflow.md +10 -9
  361. package/kb/site/reference/subsystems/workspace.md +343 -4
  362. package/kb/site/reference/tool-catalog.md +810 -315
  363. package/kb/site/reference/tool-execution-pipeline.md +9 -5
  364. package/lib/index.js +25 -44
  365. package/package.json +3 -2
  366. package/skills/dsh-plugin-dev-kb.md +6 -5
  367. package/kb/site/en/reference/subsystems/code-runtime.md +0 -198
  368. package/kb/site/en/reference/subsystems/invariants.md +0 -91
  369. package/kb/site/reference/subsystems/code-runtime.md +0 -198
  370. package/kb/site/reference/subsystems/invariants.md +0 -91
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  editSource: "docs/subsystems/core.md"
3
+ rawMarkdownPath: "en/reference/subsystems/core.md"
3
4
  outline: [2,3]
4
5
  ---
5
6
 
@@ -49,9 +50,9 @@ interface AgentHandle {
49
50
  }
50
51
  ```
51
52
 
52
- `CreateAgentOptions` carries the shared identity and everything a fresh agent needs before publication: session metadata (`meta` — validated `cwd`, fork lineage, the `isSeeded` marker, origin classification, delegation depth, and `agentPreset`), the exact fork cut in sibling field `inheritedEventCount`, an optional `seed` replay prefix, per-agent `AgentOptions`, a creation-only cancellation `signal`, and `setup`. `ResumeAgentOptions` is the persisted-identity counterpart: `resumeSessionId`, `agentOptions`, `signal`, and `setup`. The `setup` callback (`AgentSetup`) composes the agent's scoped world while both ids are still unpublished — everything registered through `agentCtx` exists before `agent/created` and the first prompt assembly — and may return a synchronous commit invoked immediately before publication; a setup rejection, commit throw, or owner disposal rolls the transaction back without publishing either id.
53
+ `CreateAgentOptions` carries the shared identity and everything a fresh agent needs before publication: an optional live `parentAgent`, session metadata (`meta` — validated `cwd`, fork lineage, the `isSeeded` marker, origin classification, delegation depth, and `agentPreset`), the exact fork cut in sibling field `inheritedEventCount`, an optional `seed` replay prefix, per-agent `AgentOptions`, a creation-only cancellation `signal`, and `setup`. `ResumeAgentOptions` is the persisted-identity counterpart: `resumeSessionId`, `parentAgent`, `agentOptions`, `signal`, and `setup`. The `setup` callback (`AgentSetup`) receives `(agentCtx, agent)` while both ids are still unpublished: the context owns scoped registrations, while the explicit Agent supplies the exact child Session without a reverse property on the Context. Everything registered through `agentCtx` exists before `agent/created` and the first prompt assembly. Setup may return a synchronous commit invoked immediately before publication; a setup rejection, commit throw, or owner disposal rolls the transaction back without publishing either id.
53
54
 
54
- `AgentFactory` is the creation interface behind the registry: the loop registers its factory via `ctx.agents.setFactory()`, so consumers use `ctx.agents` without depending on the concrete loop package. The exact `create`/`resume` signatures and rollback contracts are in the [generated section](#ctxagents--agentregistry) below.
55
+ `AgentFactory` is the creation interface behind the registry: the loop registers its factory via `ctx.agents.setFactory()`, so consumers use `ctx.agents` without depending on the concrete loop package. A runtime child creator sets `options.parentAgent`; the registry passes the options and caller Context to the factory without deriving one from the other. The exact `create`/`resume` signatures and rollback contracts are in the [generated section](#ctxagents--agentregistry) below.
55
56
 
56
57
  ## The agent handle
57
58
 
@@ -68,7 +69,7 @@ interface Agent {
68
69
  readonly options: AgentOptions
69
70
  /** The live session this agent drives; its log is the durable source of truth. */
70
71
  readonly session: Session
71
- /** The agent-owned projection of durable pending work. */
72
+ /** Agent-owned access to durable pending work. */
72
73
  readonly inbox: Inbox
73
74
  /** The current lifecycle state, mirrored on every `agent/status` transition. */
74
75
  readonly status: AgentStatus
@@ -109,7 +110,7 @@ interface Agent {
109
110
  * turn and runs when the aborted activity converges to idle; a `disposed`
110
111
  * cancel leaves it parked. A wake submitted while already idle always opens
111
112
  * its turn boundary, even when its message is cleared before the driver
112
- * claims ([cancel-convergence wake latch](../../../../.agents/notes/implemented/bug-fix/2026-08-07-cancel-convergence-wake-latch.md)).
113
+ * claims ([driver wake convergence](../../agent-loop/src/agent.ts)).
113
114
  * @param message - identified content and the source that supplied it.
114
115
  * @param target - the preferred next-turn or next-step inbox boundary.
115
116
  * @param wakeup - whether delivery may wake the driver.
@@ -209,16 +210,73 @@ interface AgentOptions {
209
210
  }
210
211
  ```
211
212
 
212
- Dispatch requires `provider` and `model` after `agent/request`. An explicit `reasoningEffort` seeds the first request on that route; exact-model resolution validates it, while omission allows the adapter default to materialize. When present, `maxTokens` must be a positive safe integer and caps every conversation-model request; omission allows the exact-model adapter default to materialize before the request header, or otherwise leaves provider behavior unchanged. An agent-scoped `deployment:persona` prompt section may shadow the global default persona.
213
+ Dispatch requires `provider` and `model` after `agent/request`. An explicit `reasoningEffort` seeds the first request on that route; exact-model resolution validates it, while omission allows the adapter default to materialize. When present, `maxTokens` must be a positive safe integer and caps every conversation-model request; omission allows the exact-model adapter default to materialize before the request header, or otherwise leaves provider behavior unchanged. An agent-scoped `deployment:persona-prefix` prompt section may shadow the global default persona.
213
214
 
214
215
  The inbox is the delivery vocabulary — two ordered pending-message lists the agent owns as a durable projection:
215
216
 
217
+ ```ts type-equiv
218
+ /** Agent-owned access to pending work; concrete storage belongs to the driver. */
219
+ interface Inbox {
220
+ /** Prompts awaiting individual turns. */
221
+ readonly nextTurn: readonly UserMessage[]
222
+ /** Input awaiting the next step boundary. */
223
+ readonly nextStep: readonly UserMessage[]
224
+
225
+ /** Durably cancel all pending input, clearing next-step before next-turn. */
226
+ clear(): void
227
+
228
+ /**
229
+ * Append one message to a pending list.
230
+ * @param target - pending list to extend.
231
+ * @param message - message to append.
232
+ */
233
+ append(target: InboxTarget, message: UserMessage): void
234
+
235
+ /**
236
+ * Prepend one message to a pending list.
237
+ * @param target - pending list to extend.
238
+ * @param message - message to prepend.
239
+ */
240
+ prepend(target: InboxTarget, message: UserMessage): void
241
+
242
+ /**
243
+ * Replace one pending message in place.
244
+ * @param messageId - identity of the pending message to replace.
245
+ * @param newMessage - replacement message.
246
+ * @returns whether the message was still pending.
247
+ */
248
+ replace(messageId: MessageId, newMessage: UserMessage): boolean
249
+
250
+ /**
251
+ * Remove one pending message.
252
+ * @param messageId - identity of the pending message to remove.
253
+ * @returns whether the message was still pending.
254
+ */
255
+ remove(messageId: MessageId): boolean
256
+
257
+ /**
258
+ * Apply standard splice semantics and durably record the normalized result.
259
+ * @param target - pending list to mutate.
260
+ * @param start - splice position.
261
+ * @param deleteCount - maximum number of messages to remove.
262
+ * @param inserted - messages to insert at the resolved position.
263
+ * @returns messages removed by the splice.
264
+ */
265
+ splice(
266
+ target: InboxTarget,
267
+ start: number,
268
+ deleteCount: number,
269
+ inserted: UserMessage[],
270
+ ): UserMessage[]
271
+ }
272
+ ```
273
+
216
274
  ```ts type-equiv
217
275
  /** One of the two ordered pending-message lists owned by an agent. */
218
276
  type InboxTarget = 'next-turn' | 'next-step'
219
277
  ```
220
278
 
221
- Every pending occurrence is its `UserMessage`; `MessageId` is the sole identity. `Inbox.append`, `prepend`, `replace`, `remove`, `clear`, `splice`, and `claim` record normalized durable `agent/inbox/spliced` mutations and reject duplicate pending ids. `replace(messageId, newMessage)` and `remove(messageId)` locate the pending message across both lists; replacement may change identity and emits the old message as discarded followed by the new message as inserted. Ordinary removals and `clear()` are cancellations. `claim(target)` removes the proposed step batch — all `next-step` input plus, at a turn boundary, one `next-turn` message — through pure deletion splices without emitting discarded notifications, and the loop separately emits per-message claimed notifications. Whole-queue consumers such as UI projections reconstruct `nextTurn` and `nextStep` from the durable splices, while consumers following one message use the exact `agent/inbox/inserted`, `claimed`, and `discarded` notifications.
279
+ Every pending occurrence is its `UserMessage`; `MessageId` is the sole identity. The structural `Inbox` methods record normalized durable `agent/inbox/spliced` mutations and reject duplicate pending ids. `replace(messageId, newMessage)` and `remove(messageId)` locate the pending message across both lists; replacement may change identity and emits the old message as discarded followed by the new message as inserted. Ordinary removals and `clear()` are cancellations. At a step boundary, dsh-agent-loop's package-internal `ReactLoopInbox` removes the proposed batch — all `next-step` input plus, at a turn boundary, one `next-turn` message — through pure deletion splices without discarded notifications, then emits per-message claimed notifications. Loop-only pending detection and claiming are not part of `Agent.inbox`. The `AgentLoop` service registers the standard `inbox` projection before publishing its factory; its cell is the sole live state, and the same fold serves cold consumers even when no Agent exists. The fold rejects unsafe or out-of-range splice coordinates and duplicate identities across both lists, identifying malformed durable history by event seq. Consumers following one message use the exact `agent/inbox/inserted`, `claimed`, and `discarded` notifications.
222
280
 
223
281
  Cancellation:
224
282
 
@@ -243,7 +301,7 @@ type AgentCancelCause =
243
301
  | { readonly kind: 'disposed' }
244
302
  ```
245
303
 
246
- The cause is a TypeScript-enforced same-process input. An active cancellation holder copies it into the runtime-only `AbortSignal.reason`; a signal grants cooperating listeners no classification authority. Durable `turn/end` records the outcome as `{ kind: 'aborted', reason: TurnEndCancelCause }`, so the cancel cause lands in the terminal result.
304
+ The cause is a TypeScript-enforced same-process input. An active cancellation holder exposes that same object as the runtime-only `AbortSignal.reason`; a signal grants cooperating listeners no classification authority. Durable `turn/end` records the outcome as `{ kind: 'aborted', reason: TurnEndCancelCause }`, so the cancel cause lands in the terminal result.
247
305
 
248
306
  The [event taxonomy](../index.md#events) owns the `agent/*` lifecycle, checkpoint, and waterfall contracts. Turn and step boundaries are durable session events rather than agent emits.
249
307
 
@@ -282,7 +340,7 @@ type RequestErrorAction = { kind: 'retry' } | undefined
282
340
 
283
341
  `agent/pre-step` is the only waterfall listener chain before request derivation. `agent/turn-stopping` runs when a turn has no tool or steering continuation, before one final steering drain.
284
342
 
285
- `agent/session-start` carries a `SessionStartSource` (why the session lifecycle began; a bridge keys its SessionStart matcher on it):
343
+ `agent/created` carries a `SessionStartSource` (why the session lifecycle began; a bridge keys its SessionStart matcher on it):
286
344
 
287
345
  ```ts type-equiv
288
346
  /** Why a session lifecycle began; seeded creates are `startup`, while persisted loads are `resume`. */
@@ -293,7 +351,7 @@ type SessionStartSource = 'startup' | 'resume' | 'clear' | 'compact'
293
351
 
294
352
  A `Session` is an **append-only log** of typed `SessionEvent`s — the single source of truth. The LLM message history is *derived* from the log (`deriveMessages()`), not stored separately. Every entry carries a monotonic `seq`, a `time`, and a `type`-discriminated `data` payload; surface variants may also list cited earlier events in `sourceEventSeqs` and carry a `surfaceOp`.
295
353
 
296
- The `SessionEvent` envelope's exact conditional fields, the twelve core event variants (`turn/start`, `turn/end`, `step/start`, `step/end`, `user/message`, `assistant/message`, `assistant/attempt`, `tool/call`, `tool/result`, `request/header`, `request/context`, `session/end-seed`), the `deriveMessages()` projection rules, the `TurnEndReason` reasons, and the execution-enclosure and standalone-event rules are on **[session.md](./session.md)**. How the log is made durable — the `SessionPersistence` interface, JSONL provider, `session/flush` checkpoint, crash recovery, and `SessionHeader` — is on **[persistence.md](./persistence.md)**.
354
+ The `SessionEvent` envelope's exact conditional fields, the thirteen core event variants (`turn/start`, `turn/end`, `step/start`, `step/end`, `user/message`, `system/message`, `assistant/message`, `assistant/attempt`, `tool/call`, `tool/result`, `request/header`, `request/context`, `session/end-seed`), the `deriveMessages()` projection rules, the `TurnEndReason` reasons, and the execution-enclosure and standalone-event rules are on **[session.md](./session.md)**. How the log is made durable — the `SessionPersistence` interface, JSONL provider, `session/flush` checkpoint, crash recovery, and `SessionHeader` — is on **[persistence.md](./persistence.md)**.
297
355
 
298
356
  ## `ToolDefinition`
299
357
 
@@ -367,7 +425,7 @@ Generated from source by `scripts/gen-cordis-catalog.ts` (verified fresh by `pnp
367
425
 
368
426
  ### `ctx.agentDefaultModel` — `AgentDefaultModelConfig`
369
427
 
370
- Owns the default model selection independently of any Host or transport. The composition entry remains usable without a settings provider; when one is mounted, its user layer is read live.
428
+ Owns the default model selection independently of any Host or transport. Each operation reads the owning Config references.
371
429
 
372
430
  ```ts cordis-catalog
373
431
  /**
@@ -377,10 +435,11 @@ Owns the default model selection independently of any Host or transport. The com
377
435
  currentSelection(): ModelSelection
378
436
 
379
437
  /**
380
- * Save the complete default model selection. A deployment without a settings
381
- * provider keeps its composition entry.
438
+ * Save the complete default model selection. A deployment without a configuration
439
+ * editor keeps its composition entry. Saves commit in submission order; a failed
440
+ * save rejects its caller without blocking later saves.
382
441
  * @param next - resolved selection accepted by an entry point.
383
- * @returns fulfillment after the optional settings write settles.
442
+ * @returns fulfillment after the optional profile write settles.
384
443
  */
385
444
  async saveSelection(next: ModelSelection): Promise<void>
386
445
  ```
@@ -409,7 +468,7 @@ async create(id: SessionId, options: AgentOptions = {}, meta: Pick<SessionHeader
409
468
  /**
410
469
  * Create an owned agent on a caller-supplied session id.
411
470
  * @param ownerCtx - caller context that structurally owns the lifecycle.
412
- * @param options - identities, session seed/metadata, loop options, setup, and cancellation.
471
+ * @param options - identities, optional live parent, session seed/metadata, loop options, setup, and cancellation.
413
472
  * @returns the published handle.
414
473
  */
415
474
  async createAgent(ownerCtx: Context, options: CreateAgentOptions): Promise<AgentHandle>
@@ -417,7 +476,7 @@ async createAgent(ownerCtx: Context, options: CreateAgentOptions): Promise<Agent
417
476
  /**
418
477
  * Resume an owned agent from the configured persistence service.
419
478
  * @param ownerCtx - caller context that owns load, setup, and the live lifecycle.
420
- * @param options - persisted identity, loop options, setup, and cancellation.
479
+ * @param options - persisted identity, optional live parent, loop options, setup, and cancellation.
421
480
  * @returns the published handle.
422
481
  */
423
482
  async resume(ownerCtx: Context, options: ResumeAgentOptions): Promise<AgentHandle>
@@ -427,247 +486,103 @@ Types: [SessionHeader](./persistence.md)
427
486
 
428
487
  Source: [`packages/core/agent-loop/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/agent-loop/src/index.ts)
429
488
 
430
- <a id="ctxagentpresets--agentpresets"></a>
489
+ <a id="ctxagentpresets--agentpresetregistry"></a>
431
490
 
432
- ### `ctx.agentPresets` — `AgentPresets`
491
+ ### `ctx.agentPresets` — `AgentPresetRegistry`
433
492
 
434
- Registry over the deployment's agent presets.
435
-
436
- Discovery is unmemoized: `list()` and `resolve()` re-read the roots on every call so a preset authored while the process runs is visible immediately, and a preset deleted underneath a picker disappears from the next read.
493
+ Registry of YAML-declared presets and the revisions live Agents retain.
437
494
 
438
495
  ```ts cordis-catalog
439
- /**
440
- * Every preset the configured roots currently supply.
441
- * @returns the presets, first-root-wins per id.
496
+ /** Register and eagerly load a definition; activation failure remains visible in the roster.
497
+ * @param definition Parsed configuration supplied by the declaring plugin.
498
+ * @returns Definition disposer after activation or its diagnostic settles; the declaring plugin owns it.
442
499
  */
443
- async list(): Promise<AgentPreset[]>
500
+ async register(definition: PresetDefinition): Promise<() => Promise<void>>
444
501
 
445
- /**
446
- * The roster off the Host: {@link list} projected to path-free rows, with
447
- * the default marked and this deployment's authoring capability beside it.
448
- *
449
- * Whether a client can open a preset's directory is the Host's own opener
450
- * capability, not a roster property — a caller needing both joins them.
451
- * @returns the rows and the authoring capability.
502
+ /** Inspect retained revisions, or the exact revision an Agent joined.
503
+ * @param ctx - optional Agent context; omission includes all retained revisions.
504
+ * @returns detached module references and isolation diagnostics; no match returns an empty list.
452
505
  */
453
- @Remote('list') async remoteExportList(): Promise<AgentPresetRoster>
506
+ inspectCompositions(ctx?: Context): AgentPresetInspection[]
454
507
 
455
- /**
456
- * Every preset's composition as flattened plugin rows, for plugin-listing
457
- * surfaces beside the roster's own picker.
458
- *
459
- * A preset with a live standing mount answers from its newest generation's
460
- * Loader entries — the composition new sessions join — even when the file
461
- * behind it has since been edited into an unreadable state: the mount is
462
- * what sessions actually run, so the broken verdict only applies to a
463
- * preset nothing composed. One never composed since boot answers from its
464
- * file, with `!!js` disabled gates evaluated against the Loader context so
465
- * both answers reflect the same host. Reading never mounts: an unmounted
466
- * preset is parsed, not composed, so listing a preset's plugins cannot
467
- * activate them early. A composition that stopped reading between
468
- * discovery's health verdict and this read is reported broken with the
469
- * raced reason rather than dropped.
470
- * @returns one composition per roster preset, in roster order.
471
- */
472
- async compositionInventory(): Promise<AgentPresetComposition[]>
473
-
474
- /**
475
- * Resolve one preset by id.
476
- *
477
- * A broken preset resolves — deleting one, reading one, and reporting one
478
- * all need the row — and the mounting paths refuse it AFTER resolution
479
- * through {@link resolveMountable}.
480
- * @param id - the preset id, or `undefined` for {@link defaultId}.
481
- * @returns the resolved preset.
482
- * @throws when no configured root supplies that id.
483
- */
484
- async resolve(id?: string): Promise<AgentPreset>
485
-
486
- /**
487
- * Compose one agent from a preset: ensure the preset's standing mount, then
488
- * parent the agent's scope key to it so the mount's registrations and
489
- * listeners cover this agent.
490
- *
491
- * Call from the agent factory's `setup(agentCtx)`; a rejection there rolls
492
- * the agent creation back, so a broken preset never yields a half-composed
493
- * session.
494
- * @param agentCtx - the agent's scope context.
495
- * @param id - the preset id, or `undefined` for {@link defaultId}.
496
- * @returns the preset that was composed, for the caller to record.
497
- * @throws when the preset is unknown or its composition is unusable.
498
- */
499
- async mount(agentCtx: Context, id?: string): Promise<AgentPreset>
500
-
501
- /**
502
- * Join one agent to the SAME standing composition another already runs on.
503
- *
504
- * This is how a child agent inherits its parent's capabilities. It is a bind,
505
- * not a mount: the parent's generation is already composed, so the child gets
506
- * that exact instance — the same plugin objects, the same tool registrations,
507
- * the same prompt sections. Re-resolving the parent's preset by id instead
508
- * would re-read the roster, and a composition file edited since the parent
509
- * started would hand the child a DIFFERENT generation than the one its
510
- * parent's history was produced under (and a preset deleted since would fail
511
- * the child outright while its parent keeps running).
512
- *
513
- * Synchronous, and with no composition failure mode of its own — it reads no
514
- * roster, mounts nothing, and touches no file — which is what lets a child
515
- * creation window use it: the two in-process subagent drivers compose their
516
- * children inside a synchronous `setup`. It still rejects a caller error, as
517
- * the `@throws` below record.
518
- *
519
- * A parent that joined no preset — a rosterless deployment — yields no join
520
- * and no error: there, the model-facing rows sit in the host composition and
521
- * the child already sees them through the global layer.
522
- * @param agentCtx - the joining agent's scope context.
523
- * @param parentCtx - the scope context of the agent whose composition to join.
524
- * @returns the preset id joined, or undefined when the parent joined none.
525
- * @throws when `agentCtx` carries no scope, or has already joined a preset.
508
+ /** Read every declared preset, including activation failures.
509
+ * @returns Display metadata and loading diagnostics.
526
510
  */
527
- composeFrom(agentCtx: Context, parentCtx: Context): string | undefined
511
+ async list(): Promise<AgentPreset[]>
528
512
 
529
- /**
530
- * The preset one live agent runs on.
531
- *
532
- * Read from the live scope chain rather than from the session, so it answers
533
- * for an agent whose session has not recorded a preset yet — a child agent
534
- * whose durable header is being built from its parent's composition.
535
- * @param agentCtx - the agent's scope context.
536
- * @returns the preset id, or undefined when the agent joined none.
513
+ /** Read the selection roster.
514
+ * @returns Current presets, each marked when it is the default.
537
515
  */
538
- composedPreset(agentCtx: Context): string | undefined
516
+ @Remote('list') async remoteExportList(): Promise<AgentPresetRoster>
539
517
 
540
- /**
541
- * Read one preset's composition text.
542
- * @param id - the preset id.
543
- * @returns the composition exactly as stored.
544
- * @throws when no configured root supplies that id.
518
+ /** Resolve an identity without starting an Agent.
519
+ * @param id Explicit preset or the current default.
520
+ * @returns Current metadata, including failure when activation failed.
545
521
  */
546
- async read(id: string): Promise<string>
522
+ async resolve(id?: string): Promise<AgentPreset>
547
523
 
548
- /**
549
- * One preset's composition text with the roster row it belongs to.
550
- * @param agentPreset - the preset id.
551
- * @returns the composition beside its trust and published metadata.
552
- * @throws {RemoteError} `gateway/bad-request` for an empty id, or
553
- * `agent-preset/not-found` when no configured root supplies it.
524
+ /** Read one declaration's child plugin list as YAML, for viewing only.
525
+ * @param agentPreset Preset identity.
526
+ * @returns The declared composition beside its published metadata.
554
527
  */
555
- @Remote('read') async readDocument(agentPreset: string): Promise<AgentPresetDocument>
528
+ @Remote('read') readDocument(agentPreset: string): Promise<AgentPresetDocument>
556
529
 
557
- /**
558
- * Create a locally authored preset by copying an existing one whole.
559
- *
560
- * Copy is the only authoring write. Composition text never crosses this
561
- * seam: the source is named by id and its directory is copied as it stands,
562
- * so the copy is exactly as loadable as its source and authoring grants no
563
- * capability the roster did not already carry. The copy is NOT mounted to
564
- * validate — a source that mounts today yields a copy that mounts today.
565
- * @param from - the preset the copy starts from; shipped presets are the
566
- * primary source, so any trust is accepted.
567
- * @param id - the new preset's id, which becomes its directory name.
568
- * @param name - display name for the copy; absent falls back to the id.
569
- * @throws when the source is unknown, the id is unusable or already taken,
570
- * or the deployment configures no writable root.
530
+ /** Bind an unpublished Agent to the current preset revision.
531
+ * @param ctx Agent context from its setup callback.
532
+ * @param id Requested preset, or the default.
533
+ * @returns Bound preset identity.
571
534
  */
572
- async copy(from: string, id: string, name?: string): Promise<void>
535
+ async mount(ctx: Context, id?: string): Promise<AgentPreset>
573
536
 
574
- /**
575
- * Copy one preset through the Remote API.
576
- * @param from - the source preset id.
577
- * @param id - the new preset id.
578
- * @param name - the copy's optional display name.
579
- * @returns once the copy is stored.
580
- * @throws {RemoteError} with the corresponding stable preset code and
581
- * details when the copy is refused.
537
+ /** Join a child to the exact revision retained by its parent.
538
+ * @param ctx Child Agent context.
539
+ * @param parent Parent Agent context.
540
+ * @returns Inherited preset id, or undefined in a preset-free composition.
582
541
  */
583
- @Remote('copy') async remoteExportCopy(from: string, id: string, name?: string): Promise<void>
542
+ composeFrom(ctx: Context, parent: Context): string | undefined
584
543
 
585
- /**
586
- * Delete a locally authored preset.
587
- *
588
- * @param id - the preset id.
589
- * @throws when the preset is unknown or ships with the deployment.
544
+ /** Read the preset a live Agent uses.
545
+ * @param ctx Agent context.
546
+ * @returns Its preset id, if bound.
590
547
  */
591
- async remove(id: string): Promise<void>
548
+ composedPreset(ctx: Context): string | undefined
592
549
 
593
- /**
594
- * Delete one preset through the Remote API.
595
- * @param id - the preset id.
596
- * @returns once the preset is deleted.
597
- * @throws {RemoteError} with the corresponding stable preset code and
598
- * details when deletion is refused.
599
- */
600
- @Remote('deletePreset') async remoteExportDelete(id: string): Promise<void>
601
-
602
- /**
603
- * One agent's instance of a service its preset mounted.
604
- *
605
- * A preset publishes services behind `isolate` realms, which are invisible
606
- * outside the group that declares them — including to the host. This is how a
607
- * caller holding the agent reads one anyway: a request that is ABOUT a
608
- * session but arrives from outside it, which is every browser RPC.
609
- *
610
- * Read addressing only. A host row that `inject`s a service cannot use this,
611
- * because injection resolves before any session exists and has no agent to
612
- * key by; such a service belongs on the host plane instead.
613
- * @param agent - the agent whose composition to look inside.
614
- * @param name - the service name as the preset's rows resolve it.
615
- * @returns the agent's instance, or undefined when its preset mounts none.
550
+ /** Read a service supplied inside an Agent's isolated preset group.
551
+ * @param agent Agent whose composition is queried.
552
+ * @param name Cordis service name.
553
+ * @returns The service, or undefined.
616
554
  */
617
555
  serviceFor<K extends string & keyof Context>(agent: { ctx: Context }, name: K): Context[K] | undefined
618
556
 
619
- /**
620
- * Re-link one agent to a different preset's standing composition.
621
- *
622
- * Only valid while the agent has produced nothing: swapping tools mid
623
- * conversation would leave logged tool calls the new composition cannot
624
- * make. The CALLER owns that check — this method does not read session
625
- * history.
626
- *
627
- * The swap is a parent re-link, not an unmount: standing mounts are shared
628
- * and permanent, so the old composition stays for its other agents and the
629
- * new one is ensured BEFORE the link moves. An unknown or unusable preset
630
- * therefore throws with the agent exactly as it was — there is no torn-down
631
- * state to restore. The re-link runs through the binding this roster kept
632
- * from the agent's mount — dsh-scope's only re-link authority. An agent
633
- * that never composed one has nothing to re-link: the switch is then the
634
- * agent's first bind, exactly a mount. A committed re-link emits
635
- * `tools/change` because changing the parent scope changes the Agent's
636
- * resolved tool set without adding or removing registry entries.
637
- * @param agentCtx - the agent's scope context.
638
- * @param id - the preset to compose the agent from instead.
639
- * @returns the preset now installed.
640
- * @throws when the preset is unknown or its composition is unusable.
557
+ /** Rebind a blank Agent; the caller owns the blank-session check.
558
+ * @param ctx Agent context.
559
+ * @param id Requested preset.
560
+ * @returns The bound identity.
641
561
  */
642
- async recompose(agentCtx: Context, id: string): Promise<AgentPreset>
562
+ async recompose(ctx: Context, id: string): Promise<AgentPreset>
643
563
 
644
- /**
645
- * Compose a blank session's agent from a different preset and record it.
646
- * @param agent - the session's live agent, resolved from the wire identity.
647
- * @param agentPreset - the preset to compose the agent from instead.
648
- * @returns the preset id that was recorded.
649
- * @throws {RemoteError} with `gateway/bad-request`, `agent-preset/locked`,
650
- * `agent-preset/not-found`, or `agent-preset/invalid` when refused.
564
+ /** Select a preset before a session starts its first turn.
565
+ * @param agent Target Agent.
566
+ * @param agentPreset Requested identity.
567
+ * @returns Committed preset identity.
651
568
  */
652
569
  @Remote('select') async select(agent: Agent, agentPreset: string): Promise<string>
653
570
 
654
- /**
655
- * The standing scope key of one preset, for a host reader with no agent.
656
- *
657
- * A cold transcript read resolves tool presenters against the composition
658
- * the session recorded, and the standing mount makes that possible without
659
- * resuming anything: ensuring the mount composes plugins but starts no
660
- * agent, no session, and no turn.
661
- * @param id - the preset id, or `undefined` for {@link defaultId}.
662
- * @returns the standing scope key readers pass as a registry view scope.
663
- * @throws when the preset is unknown or its composition is unusable.
571
+ /** Read current registrations for cold transcript presentation.
572
+ * @param id Preset identity or the default.
573
+ * @returns A revision lease; dispose it after the scoped read completes.
664
574
  */
665
- async standingKeyFor(id?: string): Promise<ScopeKey>
575
+ async acquireScope(id?: string): Promise<{ key: ScopeKey } & AsyncDisposable>
576
+
577
+ /** Read plugin rows without creating an Agent.
578
+ * @returns Current declaration metadata and activation states.
579
+ */
580
+ compositionInventory(): Promise<AgentPresetComposition[]>
666
581
  ```
667
582
 
668
583
  Types: [ScopeKey](./scope.md)
669
584
 
670
- Source: [`packages/preset/agent-presets/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/preset/agent-presets/src/index.ts)
585
+ Source: [`packages/preset/agent-preset-registry/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/preset/agent-preset-registry/src/index.ts)
671
586
 
672
587
  <a id="ctxagents--agentregistry"></a>
673
588
 
@@ -682,7 +597,8 @@ Initiator methods provide same-process causal attribution only. Ambient presence
682
597
  * Read the Agent that initiated the inherited asynchronous driver chain.
683
598
  * Use this optional form for logging, tracing, metrics, or host attribution
684
599
  * that also supports agentless calls. When a parent creates a child, setup
685
- * reports the causal parent while `agentCtx.agent` identifies the child.
600
+ * reports the causal parent while the setup callback's Agent parameter
601
+ * identifies the child.
686
602
  * @returns the inherited Agent, or `undefined` outside an initiator boundary
687
603
  * and inside an explicit clearing boundary.
688
604
  * @throws when this service instance has been disposed.
@@ -747,7 +663,7 @@ setFactory(factory: AgentFactory): () => void
747
663
  * agent): this constructs the agent and its session. Rejects if no factory is
748
664
  * registered or creation/setup fails. The resolved {@link AgentHandle} lets
749
665
  * the owner tear down exactly this agent.
750
- * @param options - shared identity, session seed/metadata, and agent options.
666
+ * @param options - shared identity, optional live parent, session seed/metadata, and agent options.
751
667
  * @returns the handle after setup, rollback-covered publication, and loop start complete.
752
668
  */
753
669
  async create(options: CreateAgentOptions): Promise<AgentHandle>
@@ -756,21 +672,22 @@ async create(options: CreateAgentOptions): Promise<AgentHandle>
756
672
  * Load a persisted session and resume an agent on it through the registered
757
673
  * factory. Rejects if no factory is registered; the factory rejects if
758
674
  * session persistence is not configured or persistence/setup fails.
759
- * @param options - persisted identity, configuration, and optional setup.
675
+ * @param options - persisted identity, optional live parent, configuration, and setup.
760
676
  * @returns the handle after setup, rollback-covered publication, and loop start complete.
761
677
  */
762
678
  async resume(options: ResumeAgentOptions): Promise<AgentHandle>
763
679
 
764
680
  /**
765
- * Register a live agent. Throws if an agent with the same id is already
766
- * registered. Emits `agent/created` on registration and `agent/disposed`
681
+ * Register a live agent with source `startup`. Rejects if the id is already registered or a
682
+ * serial `agent/created` listener fails. Emits `agent/disposed`
767
683
  * when the calling fiber is disposed — both with the agent's scope carrier
768
684
  * (`scopeTarget(agent, agent)`): the subject is the agent in hand, so the
769
685
  * emits are scope-filtered regardless of which context invoked `register`
770
686
  * (calling through `agent.ctx` scopes EFFECTS; dispatch scoping always
771
- * requires passing the carrier). Returns the disposer.
687
+ * requires passing the carrier). The entry is a runtime root; factory-backed
688
+ * creation uses `options.parentAgent` for child ownership. Await the registration before using the agent.
772
689
  * @param agent - the already-constructed agent to record in the store.
773
- * @returns the EXACT Cordis effect disposer (single-shot; a repeat call
690
+ * @returns the awaitable Cordis effect disposer (single-shot; a repeat call
774
691
  * returns undefined without awaiting an in-flight teardown). Exact
775
692
  * identity is load-bearing: a composite (generator) effect that owns a
776
693
  * teardown ORDER — the agent factory's lifecycle chain — must yield THIS
@@ -779,7 +696,7 @@ async resume(options: ResumeAgentOptions): Promise<AgentHandle>
779
696
  * owner unload, unregistering the agent (and emitting `agent/disposed`)
780
697
  * while its final turn is still draining.
781
698
  */
782
- register(agent: Agent): () => void
699
+ register(agent: Agent): ReturnType<Context['effect']>
783
700
 
784
701
  /**
785
702
  * Insert an already-constructed agent without announcing it. This is the
@@ -788,24 +705,27 @@ register(agent: Agent): () => void
788
705
  * returned detach closure into its pre-installed composite teardown before
789
706
  * calling {@link announce}. Ordinary callers use {@link register}.
790
707
  * @param agent - the prepared, unpublished agent.
791
- * @param owner - live agent whose scoped context created this agent, or
708
+ * @param owner - explicitly supplied live runtime owner, or
792
709
  * undefined for a top-level runtime root. This is runtime ownership, not
793
710
  * the resumed session's durable parent lineage.
794
711
  * @returns an idempotent closure that removes this exact entry and emits
795
712
  * `agent/disposed` with listener failures contained. When called from a
796
- * synchronous `agent/created` listener, removal and disposal wait until
797
- * that creation dispatch unwinds.
713
+ * `agent/created` listener, removal and disposal wait until the serial
714
+ * creation dispatch settles.
798
715
  */
799
716
  enter(agent: Agent, owner: Agent | undefined): () => void
800
717
 
801
718
  /**
802
719
  * Announce an agent previously inserted with {@link enter}.
803
720
  * @param agent - the live inserted agent to announce.
721
+ * @param source - fresh creation, resume, clear, or compaction source.
722
+ * @param signal - optional factory initialization cancellation signal passed to listeners.
723
+ * @returns completion of the serial creation listeners; a listener failure rejects.
804
724
  * @throws if `agent` is not the exact live registry entry for its id, or its
805
725
  * creation announcement already began (including a reentrant call from a
806
726
  * creation listener).
807
727
  */
808
- announce(agent: Agent): void
728
+ async announce(agent: Agent, source: SessionStartSource, signal?: AbortSignal): Promise<void>
809
729
 
810
730
  /**
811
731
  * Look up a live agent.
@@ -868,24 +788,27 @@ Types: [Scoped](./scope.md)
868
788
 
869
789
  Source: [`packages/core/agent/src/runtime-types.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/agent/src/runtime-types.ts)
870
790
 
871
- <a id="agentcreated--emit"></a>
791
+ <a id="agentcreated--serial"></a>
872
792
 
873
- #### `agent/created` — emit
793
+ #### `agent/created` — serial
874
794
 
875
- A fully configured agent and live session were published. Setup is composition-only; `agent/session-start` is the first startup-driving extension point. Synchronous listener failure vetoes publication, while returned-promise rejection is reported. Detach requested during dispatch waits until every creation listener has observed the stable entry.
795
+ An entered agent is ready for per-agent initialization after factory setup. Listeners run in order and are awaited before creation resolves. AgentLoop holds queued input until all listeners finish. A throw or rejection fails creation and skips later listeners. Disposal retains the scope and session until dispatch settles; listeners must not await agent.whenIdle() or their own owner's disposal.
876
796
 
877
797
  ```ts cordis-catalog
878
798
  /**
879
- * A fully configured agent and live session were published. Setup is
880
- * composition-only; `agent/session-start` is the first startup-driving extension point.
881
- * Synchronous listener failure vetoes publication, while returned-promise
882
- * rejection is reported. Detach requested during dispatch waits until every
883
- * creation listener has observed the stable entry.
799
+ * An entered agent is ready for per-agent initialization after factory setup.
800
+ * Listeners run in order and are awaited before creation resolves. AgentLoop
801
+ * holds queued input until all listeners finish. A throw or rejection fails
802
+ * creation and skips later listeners. Disposal retains the scope and session
803
+ * until dispatch settles; listeners must not await agent.whenIdle() or their
804
+ * own owner's disposal.
884
805
  * @param payload.agent - the newly registered agent with its live session and completed setup.
806
+ * @param payload.source - fresh creation, resume, clear, or compaction source.
807
+ * @param payload.signal - factory initialization cancellation signal, when provided.
885
808
  * Scope-filtered dispatch (`@deepseek-ai/dsh-scope`): agent-scoped listeners receive only that agent.
886
- * @mode emit
809
+ * @mode serial
887
810
  */
888
- 'agent/created'(this: Scoped<Agent>, payload: { agent: Agent }): void
811
+ 'agent/created'(this: Scoped<Agent>, payload: { agent: Agent; source: SessionStartSource; signal?: AbortSignal }): undefined | Promise<undefined>
889
812
  ```
890
813
 
891
814
  Types: [Scoped](./scope.md)
@@ -1033,14 +956,18 @@ Source: [`packages/core/agent/src/runtime-types.ts`](https://github.com/deepseek
1033
956
 
1034
957
  #### `agent/request` — waterfall
1035
958
 
1036
- Replace the frozen call configuration. `await next()` yields the config the machine would use (agent options on the first request, the logged header afterwards); return a replacement to switch. Model-visible content must use logged channels; this waterfall cannot mutate messages.
959
+ Replace the frozen call configuration. `await next()` yields the config the machine would use (agent options on the first request, the logged header afterwards); return a replacement to switch. On step admission, this runs after assembly and `step/start`, before the system prompt and accepted user batch are committed. Cancellation here or during subsequent `prepareCall()` resolution commits neither. The prepared call capability governs prompt admission. Model-visible content must use logged channels; this waterfall cannot mutate messages.
1037
960
 
1038
961
  ```ts cordis-catalog
1039
962
  /**
1040
963
  * Replace the frozen call configuration. `await next()` yields the config
1041
964
  * the machine would use (agent options on the first request, the logged
1042
- * header afterwards); return a replacement to switch. Model-visible
1043
- * content must use logged channels; this waterfall cannot mutate messages.
965
+ * header afterwards); return a replacement to switch. On step admission,
966
+ * this runs after assembly and `step/start`, before the system prompt and
967
+ * accepted user batch are committed. Cancellation here or during subsequent
968
+ * `prepareCall()` resolution commits neither. The prepared call capability
969
+ * governs prompt admission. Model-visible content must use logged channels;
970
+ * this waterfall cannot mutate messages.
1044
971
  * @param payload.agent - the agent making the model call.
1045
972
  * @param payload.turn - the open turn number.
1046
973
  * @param payload.step - the step whose request this is.
@@ -1084,30 +1011,6 @@ Types: [LlmFailure](./llm-streaming.md) · [ResolvedRetryPolicy](./llm-streaming
1084
1011
 
1085
1012
  Source: [`packages/core/agent/src/runtime-types.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/agent/src/runtime-types.ts)
1086
1013
 
1087
- <a id="agentsession-start--emit"></a>
1088
-
1089
- #### `agent/session-start` — emit
1090
-
1091
- The session lifecycle began, once before the first turn. Use `agent.inject()` to seed model-facing context. This is a notification, not a veto; disposal requested by a lifecycle owner is rechecked before the driver starts.
1092
-
1093
- ```ts cordis-catalog
1094
- /**
1095
- * The session lifecycle began, once before the first turn. Use
1096
- * `agent.inject()` to seed model-facing context. This is a notification, not
1097
- * a veto; disposal requested by a lifecycle owner is rechecked before the
1098
- * driver starts.
1099
- * @param payload.agent - the agent whose session lifecycle began.
1100
- * @param payload.source - why the session started (fresh startup, resume, …).
1101
- * Scope-filtered dispatch (`@deepseek-ai/dsh-scope`): agent-scoped listeners receive only that agent.
1102
- * @mode emit
1103
- */
1104
- 'agent/session-start'(this: Scoped<Agent>, payload: { agent: Agent; source: SessionStartSource }): void
1105
- ```
1106
-
1107
- Types: [Scoped](./scope.md)
1108
-
1109
- Source: [`packages/core/agent/src/runtime-types.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/agent/src/runtime-types.ts)
1110
-
1111
1014
  <a id="agentstatus--emit"></a>
1112
1015
 
1113
1016
  #### `agent/status` — emit
@@ -1208,5 +1111,5 @@ One session committed a different agent preset to its durable log. Consumers inv
1208
1111
  'agent-preset/selected'(sessionId: SessionId, agentPreset: string): void
1209
1112
  ```
1210
1113
 
1211
- Source: [`packages/preset/agent-presets/src/types.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/preset/agent-presets/src/types.ts)
1114
+ Source: [`packages/preset/agent-preset-registry/src/types.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/preset/agent-preset-registry/src/types.ts)
1212
1115
  <!-- END GENERATED cordis-surface -->