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.zh.md"
3
+ rawMarkdownPath: "reference/subsystems/core.md"
3
4
  outline: [2,3]
4
5
  ---
5
6
 
@@ -51,9 +52,9 @@ interface AgentHandle {
51
52
  }
52
53
  ```
53
54
 
54
- `CreateAgentOptions` 携带共享标识以及新 agent 发布前所需的一切:会话元数据(`meta`——已校验的 `cwd`、fork 谱系、`isSeeded` 标记、来源分类、委派深度与 `agentPreset`)、同级字段 `inheritedEventCount` 所表示的精确 fork cut、可选的 `seed` 回放前缀、按 agent 的 `AgentOptions`、仅创建期有效的取消 `signal`,以及 `setup`。`ResumeAgentOptions` 是持久标识的对应项:`resumeSessionId`、`agentOptions`、`signal` 与 `setup`。`setup` 回调(`AgentSetup`)在两个 id 都尚未发布时组装 agent 的作用域世界——凡经 `agentCtx` 注册的内容都先于 `agent/created` 与第一次提示词组装存在——并可返回一个在发布前一刻调用的同步 commit;setup 拒绝、commit 抛出或所有者 dispose(资源释放)都会回滚事务,两个 id 均不发布。
55
+ `CreateAgentOptions` 携带共享标识以及新 agent 发布前所需的一切:可选的存活 `parentAgent`、会话元数据(`meta`——已校验的 `cwd`、fork 谱系、`isSeeded` 标记、来源分类、委派深度与 `agentPreset`)、同级字段 `inheritedEventCount` 所表示的精确 fork cut、可选的 `seed` 回放前缀、按 agent 的 `AgentOptions`、仅创建期有效的取消 `signal`,以及 `setup`。`ResumeAgentOptions` 是持久标识的对应项:`resumeSessionId`、`parentAgent`、`agentOptions`、`signal` 与 `setup`。`setup` 回调(`AgentSetup`)在两个 id 均未发布时接收 `(agentCtx, agent)`:上下文拥有作用域注册,显式 Agent 提供确切的子 Session,Context 无需反向属性。凡经 `agentCtx` 注册的内容都先于 `agent/created` 与第一次提示词组装存在。Setup 可以返回在发布前一刻调用的同步 commit;setup 拒绝、commit 抛出或所有者 dispose(资源释放)都会回滚事务,两个 id 均不发布。
55
56
 
56
- `AgentFactory` 是注册表背后的创建接口:循环经 `ctx.agents.setFactory()` 注册其工厂,因此消费方使用 `ctx.agents` 时无需依赖具体循环包。确切的 `create`/`resume` 签名及回滚约定见下方[生成区块](#ctxagents--agentregistry)。
57
+ `AgentFactory` 是注册表背后的创建接口:循环经 `ctx.agents.setFactory()` 注册其工厂,因此消费方使用 `ctx.agents` 时无需依赖具体循环包。运行时子 Agent 的创建方设置 `options.parentAgent`;注册表把 options 与调用方 Context 传给工厂,不从其中一项推导另一项。确切的 `create`/`resume` 签名及回滚约定见下方[生成区块](#ctxagents--agentregistry)。
57
58
 
58
59
  <a id="the-agent-handle"></a>
59
60
 
@@ -72,7 +73,7 @@ interface Agent {
72
73
  readonly options: AgentOptions
73
74
  /** The live session this agent drives; its log is the durable source of truth. */
74
75
  readonly session: Session
75
- /** The agent-owned projection of durable pending work. */
76
+ /** Agent-owned access to durable pending work. */
76
77
  readonly inbox: Inbox
77
78
  /** The current lifecycle state, mirrored on every `agent/status` transition. */
78
79
  readonly status: AgentStatus
@@ -113,7 +114,7 @@ interface Agent {
113
114
  * turn and runs when the aborted activity converges to idle; a `disposed`
114
115
  * cancel leaves it parked. A wake submitted while already idle always opens
115
116
  * its turn boundary, even when its message is cleared before the driver
116
- * claims ([cancel-convergence wake latch](../../../../.agents/notes/implemented/bug-fix/2026-08-07-cancel-convergence-wake-latch.md)).
117
+ * claims ([driver wake convergence](../../agent-loop/src/agent.ts)).
117
118
  * @param message - identified content and the source that supplied it.
118
119
  * @param target - the preferred next-turn or next-step inbox boundary.
119
120
  * @param wakeup - whether delivery may wake the driver.
@@ -213,16 +214,73 @@ interface AgentOptions {
213
214
  }
214
215
  ```
215
216
 
216
- 在 `agent/request` 之后,分发要求 `provider` 与 `model` 都存在。显式 `reasoningEffort` 会为该路由的首次请求提供初始值;确切模型解析会校验该值,省略时则允许填入适配器默认值。提供 `maxTokens` 时,它必须是正安全整数,并限制每次对话模型请求的输出;省略时,系统会在写入请求 header 前填入确切模型的适配器默认值,否则提供方行为保持不变。agent 作用域的 `deployment:persona` 提示词段落可以遮蔽全局默认 persona。
217
+ 在 `agent/request` 之后,分发要求 `provider` 与 `model` 都存在。显式 `reasoningEffort` 会为该路由的首次请求提供初始值;确切模型解析会校验该值,省略时则允许填入适配器默认值。提供 `maxTokens` 时,它必须是正安全整数,并限制每次对话模型请求的输出;省略时,系统会在写入请求 header 前填入确切模型的适配器默认值,否则提供方行为保持不变。agent 作用域的 `deployment:persona-prefix` 提示词段落可以遮蔽全局默认 persona。
217
218
 
218
219
  inbox 即投递词汇——agent 以持久投影形式拥有的两条有序待处理消息列表:
219
220
 
221
+ ```ts type-equiv
222
+ /** Agent-owned access to pending work; concrete storage belongs to the driver. */
223
+ interface Inbox {
224
+ /** Prompts awaiting individual turns. */
225
+ readonly nextTurn: readonly UserMessage[]
226
+ /** Input awaiting the next step boundary. */
227
+ readonly nextStep: readonly UserMessage[]
228
+
229
+ /** Durably cancel all pending input, clearing next-step before next-turn. */
230
+ clear(): void
231
+
232
+ /**
233
+ * Append one message to a pending list.
234
+ * @param target - pending list to extend.
235
+ * @param message - message to append.
236
+ */
237
+ append(target: InboxTarget, message: UserMessage): void
238
+
239
+ /**
240
+ * Prepend one message to a pending list.
241
+ * @param target - pending list to extend.
242
+ * @param message - message to prepend.
243
+ */
244
+ prepend(target: InboxTarget, message: UserMessage): void
245
+
246
+ /**
247
+ * Replace one pending message in place.
248
+ * @param messageId - identity of the pending message to replace.
249
+ * @param newMessage - replacement message.
250
+ * @returns whether the message was still pending.
251
+ */
252
+ replace(messageId: MessageId, newMessage: UserMessage): boolean
253
+
254
+ /**
255
+ * Remove one pending message.
256
+ * @param messageId - identity of the pending message to remove.
257
+ * @returns whether the message was still pending.
258
+ */
259
+ remove(messageId: MessageId): boolean
260
+
261
+ /**
262
+ * Apply standard splice semantics and durably record the normalized result.
263
+ * @param target - pending list to mutate.
264
+ * @param start - splice position.
265
+ * @param deleteCount - maximum number of messages to remove.
266
+ * @param inserted - messages to insert at the resolved position.
267
+ * @returns messages removed by the splice.
268
+ */
269
+ splice(
270
+ target: InboxTarget,
271
+ start: number,
272
+ deleteCount: number,
273
+ inserted: UserMessage[],
274
+ ): UserMessage[]
275
+ }
276
+ ```
277
+
220
278
  ```ts type-equiv
221
279
  /** One of the two ordered pending-message lists owned by an agent. */
222
280
  type InboxTarget = 'next-turn' | 'next-step'
223
281
  ```
224
282
 
225
- 每个待处理入队项就是其 `UserMessage`;`MessageId` 是唯一标识。`Inbox.append`、`prepend`、`replace`、`remove`、`clear`、`splice` 与 `claim` 会记录规范化的持久 `agent/inbox/spliced` 变更,并拒绝重复的待处理 id。`replace(messageId, newMessage)` 与 `remove(messageId)` 通过 `MessageId` 跨两份列表定位待处理消息;替换可以改变标识,并先将旧消息作为 discarded 发布,再将新消息作为 inserted 发布。普通删除和 `clear()` 都表示取消。`claim(target)` 通过纯删除 splice 移除拟进入步骤的批次——全部 `next-step` 输入,外加轮次边界上的一条 `next-turn` 消息——且不发出 discarded 通知;循环另行逐条发出 claimed 通知。UI 投影等整体队列消费方通过持久 splice 重建 `nextTurn` 与 `nextStep`,而跟踪单条消息的消费方使用精确的 `agent/inbox/inserted`、`claimed` 与 `discarded` 通知。
283
+ 每个待处理入队项就是其 `UserMessage`;`MessageId` 是唯一标识。结构化 `Inbox` 方法会记录规范化的持久 `agent/inbox/spliced` 变更,并拒绝重复的待处理 id。`replace(messageId, newMessage)` 与 `remove(messageId)` 通过 `MessageId` 跨两份列表定位待处理消息;替换可以改变标识,并先将旧消息作为 discarded 发布,再将新消息作为 inserted 发布。普通删除和 `clear()` 都表示取消。在步骤边界,dsh-agent-loop 包内部的 `ReactLoopInbox` 会通过纯删除 splice 移除拟进入步骤的批次——全部 `next-step` 输入,外加轮次边界上的一条 `next-turn` 消息——且不发出 discarded 通知,随后逐条发出 claimed 通知。仅供循环使用的待处理检测与领取操作不属于 `Agent.inbox`。`AgentLoop` 服务在发布工厂之前注册标准 `inbox` 投影;其 cell 是唯一 live 状态,同一份折叠在没有 Agent 时也服务于冷消费方。该 fold 会拒绝不安全或越界的 splice 坐标,以及跨两份列表重复的标识,并通过事件 seq 指出格式错误的持久历史。跟踪单条消息的消费方使用精确的 `agent/inbox/inserted`、`claimed` 与 `discarded` 通知。
226
284
 
227
285
  取消:
228
286
 
@@ -247,7 +305,7 @@ type AgentCancelCause =
247
305
  | { readonly kind: 'disposed' }
248
306
  ```
249
307
 
250
- cause 是由 TypeScript 强制约束的同进程输入。活跃的取消持有者会将它复制到仅运行时的 `AbortSignal.reason`;signal 不授予协作监听器任何分类权限。持久 `turn/end` 以 `{ kind: 'aborted', reason: TurnEndCancelCause }` 记录结果,取消原因随终态结果一起持久化。
308
+ cause 是由 TypeScript 强制约束的同进程输入。活跃的取消持有者把同一个对象暴露为仅运行时的 `AbortSignal.reason`;signal 不授予协作监听器任何分类权限。持久 `turn/end` 以 `{ kind: 'aborted', reason: TurnEndCancelCause }` 记录结果,取消原因随终态结果一起持久化。
251
309
 
252
310
  [事件分类](../index.md#events)负责 `agent/*` 生命周期、检查点与 waterfall(瀑布式事件)约定。轮次和步骤边界是持久会话事件,而不是 agent emit。
253
311
 
@@ -290,7 +348,7 @@ type RequestErrorAction = { kind: 'retry' } | undefined
290
348
 
291
349
  `agent/pre-step` 是请求推导前唯一的 waterfall(瀑布式)监听器链。`agent/turn-stopping` 在轮次没有工具或 steering(中途引导)后续时运行,先于最后一次 steering 排空。
292
350
 
293
- `agent/session-start` 携带 `SessionStartSource`(会话生命周期为何开始;桥接层据此匹配其 SessionStart):
351
+ `agent/created` 携带 `SessionStartSource`(会话生命周期为何开始;桥接层据此匹配其 SessionStart):
294
352
 
295
353
  ```ts type-equiv
296
354
  /** Why a session lifecycle began; seeded creates are `startup`, while persisted loads are `resume`. */
@@ -301,7 +359,7 @@ type SessionStartSource = 'startup' | 'resume' | 'clear' | 'compact'
301
359
 
302
360
  `Session` 是一份类型化 `SessionEvent` 的**仅追加日志**——唯一的真源。LLM 消息历史从日志*派生*(`deriveMessages()`),而非单独存储。每个条目携带单调的 `seq`、`time` 与按 `type` 判别的 `data` payload;surface 变体还可以在 `sourceEventSeqs` 中列出被引用的较早事件,并携带 `surfaceOp`。
303
361
 
304
- `SessionEvent` 信封的确切条件字段、十二种核心事件变体(`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`)、`deriveMessages()` 投影规则、`TurnEndReason` 原因以及执行封闭和独立事件规则都在 **[session.md](./session.md)** 中。日志如何持久化——`SessionPersistence` 接口、JSONL provider、`session/flush` 检查点、崩溃恢复与 `SessionHeader`——则在 **[persistence.md](./persistence.md)** 中。
362
+ `SessionEvent` 信封的确切条件字段、十三种核心事件变体(`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`)、`deriveMessages()` 投影规则、`TurnEndReason` 原因以及执行封闭和独立事件规则都在 **[session.md](./session.md)** 中。日志如何持久化——`SessionPersistence` 接口、JSONL provider、`session/flush` 检查点、崩溃恢复与 `SessionHeader`——则在 **[persistence.md](./persistence.md)** 中。
305
363
 
306
364
  ## `ToolDefinition`
307
365
 
@@ -377,7 +435,7 @@ Generated from source by `scripts/gen-cordis-catalog.ts` (verified fresh by `pnp
377
435
 
378
436
  ### `ctx.agentDefaultModel` — `AgentDefaultModelConfig`
379
437
 
380
- 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.
438
+ Owns the default model selection independently of any Host or transport. Each operation reads the owning Config references.
381
439
 
382
440
  ```ts cordis-catalog
383
441
  /**
@@ -387,10 +445,11 @@ Owns the default model selection independently of any Host or transport. The com
387
445
  currentSelection(): ModelSelection
388
446
 
389
447
  /**
390
- * Save the complete default model selection. A deployment without a settings
391
- * provider keeps its composition entry.
448
+ * Save the complete default model selection. A deployment without a configuration
449
+ * editor keeps its composition entry. Saves commit in submission order; a failed
450
+ * save rejects its caller without blocking later saves.
392
451
  * @param next - resolved selection accepted by an entry point.
393
- * @returns fulfillment after the optional settings write settles.
452
+ * @returns fulfillment after the optional profile write settles.
394
453
  */
395
454
  async saveSelection(next: ModelSelection): Promise<void>
396
455
  ```
@@ -419,7 +478,7 @@ async create(id: SessionId, options: AgentOptions = {}, meta: Pick<SessionHeader
419
478
  /**
420
479
  * Create an owned agent on a caller-supplied session id.
421
480
  * @param ownerCtx - caller context that structurally owns the lifecycle.
422
- * @param options - identities, session seed/metadata, loop options, setup, and cancellation.
481
+ * @param options - identities, optional live parent, session seed/metadata, loop options, setup, and cancellation.
423
482
  * @returns the published handle.
424
483
  */
425
484
  async createAgent(ownerCtx: Context, options: CreateAgentOptions): Promise<AgentHandle>
@@ -427,7 +486,7 @@ async createAgent(ownerCtx: Context, options: CreateAgentOptions): Promise<Agent
427
486
  /**
428
487
  * Resume an owned agent from the configured persistence service.
429
488
  * @param ownerCtx - caller context that owns load, setup, and the live lifecycle.
430
- * @param options - persisted identity, loop options, setup, and cancellation.
489
+ * @param options - persisted identity, optional live parent, loop options, setup, and cancellation.
431
490
  * @returns the published handle.
432
491
  */
433
492
  async resume(ownerCtx: Context, options: ResumeAgentOptions): Promise<AgentHandle>
@@ -437,247 +496,103 @@ Types: [SessionHeader](./persistence.md)
437
496
 
438
497
  Source: [`packages/core/agent-loop/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/agent-loop/src/index.ts)
439
498
 
440
- <a id="ctxagentpresets--agentpresets"></a>
499
+ <a id="ctxagentpresets--agentpresetregistry"></a>
441
500
 
442
- ### `ctx.agentPresets` — `AgentPresets`
501
+ ### `ctx.agentPresets` — `AgentPresetRegistry`
443
502
 
444
- Registry over the deployment's agent presets.
445
-
446
- 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.
503
+ Registry of YAML-declared presets and the revisions live Agents retain.
447
504
 
448
505
  ```ts cordis-catalog
449
- /**
450
- * Every preset the configured roots currently supply.
451
- * @returns the presets, first-root-wins per id.
506
+ /** Register and eagerly load a definition; activation failure remains visible in the roster.
507
+ * @param definition Parsed configuration supplied by the declaring plugin.
508
+ * @returns Definition disposer after activation or its diagnostic settles; the declaring plugin owns it.
452
509
  */
453
- async list(): Promise<AgentPreset[]>
510
+ async register(definition: PresetDefinition): Promise<() => Promise<void>>
454
511
 
455
- /**
456
- * The roster off the Host: {@link list} projected to path-free rows, with
457
- * the default marked and this deployment's authoring capability beside it.
458
- *
459
- * Whether a client can open a preset's directory is the Host's own opener
460
- * capability, not a roster property — a caller needing both joins them.
461
- * @returns the rows and the authoring capability.
512
+ /** Inspect retained revisions, or the exact revision an Agent joined.
513
+ * @param ctx - optional Agent context; omission includes all retained revisions.
514
+ * @returns detached module references and isolation diagnostics; no match returns an empty list.
462
515
  */
463
- @Remote('list') async remoteExportList(): Promise<AgentPresetRoster>
516
+ inspectCompositions(ctx?: Context): AgentPresetInspection[]
464
517
 
465
- /**
466
- * Every preset's composition as flattened plugin rows, for plugin-listing
467
- * surfaces beside the roster's own picker.
468
- *
469
- * A preset with a live standing mount answers from its newest generation's
470
- * Loader entries — the composition new sessions join — even when the file
471
- * behind it has since been edited into an unreadable state: the mount is
472
- * what sessions actually run, so the broken verdict only applies to a
473
- * preset nothing composed. One never composed since boot answers from its
474
- * file, with `!!js` disabled gates evaluated against the Loader context so
475
- * both answers reflect the same host. Reading never mounts: an unmounted
476
- * preset is parsed, not composed, so listing a preset's plugins cannot
477
- * activate them early. A composition that stopped reading between
478
- * discovery's health verdict and this read is reported broken with the
479
- * raced reason rather than dropped.
480
- * @returns one composition per roster preset, in roster order.
481
- */
482
- async compositionInventory(): Promise<AgentPresetComposition[]>
483
-
484
- /**
485
- * Resolve one preset by id.
486
- *
487
- * A broken preset resolves — deleting one, reading one, and reporting one
488
- * all need the row — and the mounting paths refuse it AFTER resolution
489
- * through {@link resolveMountable}.
490
- * @param id - the preset id, or `undefined` for {@link defaultId}.
491
- * @returns the resolved preset.
492
- * @throws when no configured root supplies that id.
493
- */
494
- async resolve(id?: string): Promise<AgentPreset>
495
-
496
- /**
497
- * Compose one agent from a preset: ensure the preset's standing mount, then
498
- * parent the agent's scope key to it so the mount's registrations and
499
- * listeners cover this agent.
500
- *
501
- * Call from the agent factory's `setup(agentCtx)`; a rejection there rolls
502
- * the agent creation back, so a broken preset never yields a half-composed
503
- * session.
504
- * @param agentCtx - the agent's scope context.
505
- * @param id - the preset id, or `undefined` for {@link defaultId}.
506
- * @returns the preset that was composed, for the caller to record.
507
- * @throws when the preset is unknown or its composition is unusable.
508
- */
509
- async mount(agentCtx: Context, id?: string): Promise<AgentPreset>
510
-
511
- /**
512
- * Join one agent to the SAME standing composition another already runs on.
513
- *
514
- * This is how a child agent inherits its parent's capabilities. It is a bind,
515
- * not a mount: the parent's generation is already composed, so the child gets
516
- * that exact instance — the same plugin objects, the same tool registrations,
517
- * the same prompt sections. Re-resolving the parent's preset by id instead
518
- * would re-read the roster, and a composition file edited since the parent
519
- * started would hand the child a DIFFERENT generation than the one its
520
- * parent's history was produced under (and a preset deleted since would fail
521
- * the child outright while its parent keeps running).
522
- *
523
- * Synchronous, and with no composition failure mode of its own — it reads no
524
- * roster, mounts nothing, and touches no file — which is what lets a child
525
- * creation window use it: the two in-process subagent drivers compose their
526
- * children inside a synchronous `setup`. It still rejects a caller error, as
527
- * the `@throws` below record.
528
- *
529
- * A parent that joined no preset — a rosterless deployment — yields no join
530
- * and no error: there, the model-facing rows sit in the host composition and
531
- * the child already sees them through the global layer.
532
- * @param agentCtx - the joining agent's scope context.
533
- * @param parentCtx - the scope context of the agent whose composition to join.
534
- * @returns the preset id joined, or undefined when the parent joined none.
535
- * @throws when `agentCtx` carries no scope, or has already joined a preset.
518
+ /** Read every declared preset, including activation failures.
519
+ * @returns Display metadata and loading diagnostics.
536
520
  */
537
- composeFrom(agentCtx: Context, parentCtx: Context): string | undefined
521
+ async list(): Promise<AgentPreset[]>
538
522
 
539
- /**
540
- * The preset one live agent runs on.
541
- *
542
- * Read from the live scope chain rather than from the session, so it answers
543
- * for an agent whose session has not recorded a preset yet — a child agent
544
- * whose durable header is being built from its parent's composition.
545
- * @param agentCtx - the agent's scope context.
546
- * @returns the preset id, or undefined when the agent joined none.
523
+ /** Read the selection roster.
524
+ * @returns Current presets, each marked when it is the default.
547
525
  */
548
- composedPreset(agentCtx: Context): string | undefined
526
+ @Remote('list') async remoteExportList(): Promise<AgentPresetRoster>
549
527
 
550
- /**
551
- * Read one preset's composition text.
552
- * @param id - the preset id.
553
- * @returns the composition exactly as stored.
554
- * @throws when no configured root supplies that id.
528
+ /** Resolve an identity without starting an Agent.
529
+ * @param id Explicit preset or the current default.
530
+ * @returns Current metadata, including failure when activation failed.
555
531
  */
556
- async read(id: string): Promise<string>
532
+ async resolve(id?: string): Promise<AgentPreset>
557
533
 
558
- /**
559
- * One preset's composition text with the roster row it belongs to.
560
- * @param agentPreset - the preset id.
561
- * @returns the composition beside its trust and published metadata.
562
- * @throws {RemoteError} `gateway/bad-request` for an empty id, or
563
- * `agent-preset/not-found` when no configured root supplies it.
534
+ /** Read one declaration's child plugin list as YAML, for viewing only.
535
+ * @param agentPreset Preset identity.
536
+ * @returns The declared composition beside its published metadata.
564
537
  */
565
- @Remote('read') async readDocument(agentPreset: string): Promise<AgentPresetDocument>
538
+ @Remote('read') readDocument(agentPreset: string): Promise<AgentPresetDocument>
566
539
 
567
- /**
568
- * Create a locally authored preset by copying an existing one whole.
569
- *
570
- * Copy is the only authoring write. Composition text never crosses this
571
- * seam: the source is named by id and its directory is copied as it stands,
572
- * so the copy is exactly as loadable as its source and authoring grants no
573
- * capability the roster did not already carry. The copy is NOT mounted to
574
- * validate — a source that mounts today yields a copy that mounts today.
575
- * @param from - the preset the copy starts from; shipped presets are the
576
- * primary source, so any trust is accepted.
577
- * @param id - the new preset's id, which becomes its directory name.
578
- * @param name - display name for the copy; absent falls back to the id.
579
- * @throws when the source is unknown, the id is unusable or already taken,
580
- * or the deployment configures no writable root.
540
+ /** Bind an unpublished Agent to the current preset revision.
541
+ * @param ctx Agent context from its setup callback.
542
+ * @param id Requested preset, or the default.
543
+ * @returns Bound preset identity.
581
544
  */
582
- async copy(from: string, id: string, name?: string): Promise<void>
545
+ async mount(ctx: Context, id?: string): Promise<AgentPreset>
583
546
 
584
- /**
585
- * Copy one preset through the Remote API.
586
- * @param from - the source preset id.
587
- * @param id - the new preset id.
588
- * @param name - the copy's optional display name.
589
- * @returns once the copy is stored.
590
- * @throws {RemoteError} with the corresponding stable preset code and
591
- * details when the copy is refused.
547
+ /** Join a child to the exact revision retained by its parent.
548
+ * @param ctx Child Agent context.
549
+ * @param parent Parent Agent context.
550
+ * @returns Inherited preset id, or undefined in a preset-free composition.
592
551
  */
593
- @Remote('copy') async remoteExportCopy(from: string, id: string, name?: string): Promise<void>
552
+ composeFrom(ctx: Context, parent: Context): string | undefined
594
553
 
595
- /**
596
- * Delete a locally authored preset.
597
- *
598
- * @param id - the preset id.
599
- * @throws when the preset is unknown or ships with the deployment.
554
+ /** Read the preset a live Agent uses.
555
+ * @param ctx Agent context.
556
+ * @returns Its preset id, if bound.
600
557
  */
601
- async remove(id: string): Promise<void>
558
+ composedPreset(ctx: Context): string | undefined
602
559
 
603
- /**
604
- * Delete one preset through the Remote API.
605
- * @param id - the preset id.
606
- * @returns once the preset is deleted.
607
- * @throws {RemoteError} with the corresponding stable preset code and
608
- * details when deletion is refused.
609
- */
610
- @Remote('deletePreset') async remoteExportDelete(id: string): Promise<void>
611
-
612
- /**
613
- * One agent's instance of a service its preset mounted.
614
- *
615
- * A preset publishes services behind `isolate` realms, which are invisible
616
- * outside the group that declares them — including to the host. This is how a
617
- * caller holding the agent reads one anyway: a request that is ABOUT a
618
- * session but arrives from outside it, which is every browser RPC.
619
- *
620
- * Read addressing only. A host row that `inject`s a service cannot use this,
621
- * because injection resolves before any session exists and has no agent to
622
- * key by; such a service belongs on the host plane instead.
623
- * @param agent - the agent whose composition to look inside.
624
- * @param name - the service name as the preset's rows resolve it.
625
- * @returns the agent's instance, or undefined when its preset mounts none.
560
+ /** Read a service supplied inside an Agent's isolated preset group.
561
+ * @param agent Agent whose composition is queried.
562
+ * @param name Cordis service name.
563
+ * @returns The service, or undefined.
626
564
  */
627
565
  serviceFor<K extends string & keyof Context>(agent: { ctx: Context }, name: K): Context[K] | undefined
628
566
 
629
- /**
630
- * Re-link one agent to a different preset's standing composition.
631
- *
632
- * Only valid while the agent has produced nothing: swapping tools mid
633
- * conversation would leave logged tool calls the new composition cannot
634
- * make. The CALLER owns that check — this method does not read session
635
- * history.
636
- *
637
- * The swap is a parent re-link, not an unmount: standing mounts are shared
638
- * and permanent, so the old composition stays for its other agents and the
639
- * new one is ensured BEFORE the link moves. An unknown or unusable preset
640
- * therefore throws with the agent exactly as it was — there is no torn-down
641
- * state to restore. The re-link runs through the binding this roster kept
642
- * from the agent's mount — dsh-scope's only re-link authority. An agent
643
- * that never composed one has nothing to re-link: the switch is then the
644
- * agent's first bind, exactly a mount. A committed re-link emits
645
- * `tools/change` because changing the parent scope changes the Agent's
646
- * resolved tool set without adding or removing registry entries.
647
- * @param agentCtx - the agent's scope context.
648
- * @param id - the preset to compose the agent from instead.
649
- * @returns the preset now installed.
650
- * @throws when the preset is unknown or its composition is unusable.
567
+ /** Rebind a blank Agent; the caller owns the blank-session check.
568
+ * @param ctx Agent context.
569
+ * @param id Requested preset.
570
+ * @returns The bound identity.
651
571
  */
652
- async recompose(agentCtx: Context, id: string): Promise<AgentPreset>
572
+ async recompose(ctx: Context, id: string): Promise<AgentPreset>
653
573
 
654
- /**
655
- * Compose a blank session's agent from a different preset and record it.
656
- * @param agent - the session's live agent, resolved from the wire identity.
657
- * @param agentPreset - the preset to compose the agent from instead.
658
- * @returns the preset id that was recorded.
659
- * @throws {RemoteError} with `gateway/bad-request`, `agent-preset/locked`,
660
- * `agent-preset/not-found`, or `agent-preset/invalid` when refused.
574
+ /** Select a preset before a session starts its first turn.
575
+ * @param agent Target Agent.
576
+ * @param agentPreset Requested identity.
577
+ * @returns Committed preset identity.
661
578
  */
662
579
  @Remote('select') async select(agent: Agent, agentPreset: string): Promise<string>
663
580
 
664
- /**
665
- * The standing scope key of one preset, for a host reader with no agent.
666
- *
667
- * A cold transcript read resolves tool presenters against the composition
668
- * the session recorded, and the standing mount makes that possible without
669
- * resuming anything: ensuring the mount composes plugins but starts no
670
- * agent, no session, and no turn.
671
- * @param id - the preset id, or `undefined` for {@link defaultId}.
672
- * @returns the standing scope key readers pass as a registry view scope.
673
- * @throws when the preset is unknown or its composition is unusable.
581
+ /** Read current registrations for cold transcript presentation.
582
+ * @param id Preset identity or the default.
583
+ * @returns A revision lease; dispose it after the scoped read completes.
674
584
  */
675
- async standingKeyFor(id?: string): Promise<ScopeKey>
585
+ async acquireScope(id?: string): Promise<{ key: ScopeKey } & AsyncDisposable>
586
+
587
+ /** Read plugin rows without creating an Agent.
588
+ * @returns Current declaration metadata and activation states.
589
+ */
590
+ compositionInventory(): Promise<AgentPresetComposition[]>
676
591
  ```
677
592
 
678
593
  Types: [ScopeKey](./scope.md)
679
594
 
680
- Source: [`packages/preset/agent-presets/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/preset/agent-presets/src/index.ts)
595
+ 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)
681
596
 
682
597
  <a id="ctxagents--agentregistry"></a>
683
598
 
@@ -692,7 +607,8 @@ Initiator methods provide same-process causal attribution only. Ambient presence
692
607
  * Read the Agent that initiated the inherited asynchronous driver chain.
693
608
  * Use this optional form for logging, tracing, metrics, or host attribution
694
609
  * that also supports agentless calls. When a parent creates a child, setup
695
- * reports the causal parent while `agentCtx.agent` identifies the child.
610
+ * reports the causal parent while the setup callback's Agent parameter
611
+ * identifies the child.
696
612
  * @returns the inherited Agent, or `undefined` outside an initiator boundary
697
613
  * and inside an explicit clearing boundary.
698
614
  * @throws when this service instance has been disposed.
@@ -757,7 +673,7 @@ setFactory(factory: AgentFactory): () => void
757
673
  * agent): this constructs the agent and its session. Rejects if no factory is
758
674
  * registered or creation/setup fails. The resolved {@link AgentHandle} lets
759
675
  * the owner tear down exactly this agent.
760
- * @param options - shared identity, session seed/metadata, and agent options.
676
+ * @param options - shared identity, optional live parent, session seed/metadata, and agent options.
761
677
  * @returns the handle after setup, rollback-covered publication, and loop start complete.
762
678
  */
763
679
  async create(options: CreateAgentOptions): Promise<AgentHandle>
@@ -766,21 +682,22 @@ async create(options: CreateAgentOptions): Promise<AgentHandle>
766
682
  * Load a persisted session and resume an agent on it through the registered
767
683
  * factory. Rejects if no factory is registered; the factory rejects if
768
684
  * session persistence is not configured or persistence/setup fails.
769
- * @param options - persisted identity, configuration, and optional setup.
685
+ * @param options - persisted identity, optional live parent, configuration, and setup.
770
686
  * @returns the handle after setup, rollback-covered publication, and loop start complete.
771
687
  */
772
688
  async resume(options: ResumeAgentOptions): Promise<AgentHandle>
773
689
 
774
690
  /**
775
- * Register a live agent. Throws if an agent with the same id is already
776
- * registered. Emits `agent/created` on registration and `agent/disposed`
691
+ * Register a live agent with source `startup`. Rejects if the id is already registered or a
692
+ * serial `agent/created` listener fails. Emits `agent/disposed`
777
693
  * when the calling fiber is disposed — both with the agent's scope carrier
778
694
  * (`scopeTarget(agent, agent)`): the subject is the agent in hand, so the
779
695
  * emits are scope-filtered regardless of which context invoked `register`
780
696
  * (calling through `agent.ctx` scopes EFFECTS; dispatch scoping always
781
- * requires passing the carrier). Returns the disposer.
697
+ * requires passing the carrier). The entry is a runtime root; factory-backed
698
+ * creation uses `options.parentAgent` for child ownership. Await the registration before using the agent.
782
699
  * @param agent - the already-constructed agent to record in the store.
783
- * @returns the EXACT Cordis effect disposer (single-shot; a repeat call
700
+ * @returns the awaitable Cordis effect disposer (single-shot; a repeat call
784
701
  * returns undefined without awaiting an in-flight teardown). Exact
785
702
  * identity is load-bearing: a composite (generator) effect that owns a
786
703
  * teardown ORDER — the agent factory's lifecycle chain — must yield THIS
@@ -789,7 +706,7 @@ async resume(options: ResumeAgentOptions): Promise<AgentHandle>
789
706
  * owner unload, unregistering the agent (and emitting `agent/disposed`)
790
707
  * while its final turn is still draining.
791
708
  */
792
- register(agent: Agent): () => void
709
+ register(agent: Agent): ReturnType<Context['effect']>
793
710
 
794
711
  /**
795
712
  * Insert an already-constructed agent without announcing it. This is the
@@ -798,24 +715,27 @@ register(agent: Agent): () => void
798
715
  * returned detach closure into its pre-installed composite teardown before
799
716
  * calling {@link announce}. Ordinary callers use {@link register}.
800
717
  * @param agent - the prepared, unpublished agent.
801
- * @param owner - live agent whose scoped context created this agent, or
718
+ * @param owner - explicitly supplied live runtime owner, or
802
719
  * undefined for a top-level runtime root. This is runtime ownership, not
803
720
  * the resumed session's durable parent lineage.
804
721
  * @returns an idempotent closure that removes this exact entry and emits
805
722
  * `agent/disposed` with listener failures contained. When called from a
806
- * synchronous `agent/created` listener, removal and disposal wait until
807
- * that creation dispatch unwinds.
723
+ * `agent/created` listener, removal and disposal wait until the serial
724
+ * creation dispatch settles.
808
725
  */
809
726
  enter(agent: Agent, owner: Agent | undefined): () => void
810
727
 
811
728
  /**
812
729
  * Announce an agent previously inserted with {@link enter}.
813
730
  * @param agent - the live inserted agent to announce.
731
+ * @param source - fresh creation, resume, clear, or compaction source.
732
+ * @param signal - optional factory initialization cancellation signal passed to listeners.
733
+ * @returns completion of the serial creation listeners; a listener failure rejects.
814
734
  * @throws if `agent` is not the exact live registry entry for its id, or its
815
735
  * creation announcement already began (including a reentrant call from a
816
736
  * creation listener).
817
737
  */
818
- announce(agent: Agent): void
738
+ async announce(agent: Agent, source: SessionStartSource, signal?: AbortSignal): Promise<void>
819
739
 
820
740
  /**
821
741
  * Look up a live agent.
@@ -878,24 +798,27 @@ Types: [Scoped](./scope.md)
878
798
 
879
799
  Source: [`packages/core/agent/src/runtime-types.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/agent/src/runtime-types.ts)
880
800
 
881
- <a id="agentcreated--emit"></a>
801
+ <a id="agentcreated--serial"></a>
882
802
 
883
- #### `agent/created` — emit
803
+ #### `agent/created` — serial
884
804
 
885
- 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.
805
+ 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.
886
806
 
887
807
  ```ts cordis-catalog
888
808
  /**
889
- * A fully configured agent and live session were published. Setup is
890
- * composition-only; `agent/session-start` is the first startup-driving extension point.
891
- * Synchronous listener failure vetoes publication, while returned-promise
892
- * rejection is reported. Detach requested during dispatch waits until every
893
- * creation listener has observed the stable entry.
809
+ * An entered agent is ready for per-agent initialization after factory setup.
810
+ * Listeners run in order and are awaited before creation resolves. AgentLoop
811
+ * holds queued input until all listeners finish. A throw or rejection fails
812
+ * creation and skips later listeners. Disposal retains the scope and session
813
+ * until dispatch settles; listeners must not await agent.whenIdle() or their
814
+ * own owner's disposal.
894
815
  * @param payload.agent - the newly registered agent with its live session and completed setup.
816
+ * @param payload.source - fresh creation, resume, clear, or compaction source.
817
+ * @param payload.signal - factory initialization cancellation signal, when provided.
895
818
  * Scope-filtered dispatch (`@deepseek-ai/dsh-scope`): agent-scoped listeners receive only that agent.
896
- * @mode emit
819
+ * @mode serial
897
820
  */
898
- 'agent/created'(this: Scoped<Agent>, payload: { agent: Agent }): void
821
+ 'agent/created'(this: Scoped<Agent>, payload: { agent: Agent; source: SessionStartSource; signal?: AbortSignal }): undefined | Promise<undefined>
899
822
  ```
900
823
 
901
824
  Types: [Scoped](./scope.md)
@@ -1043,14 +966,18 @@ Source: [`packages/core/agent/src/runtime-types.ts`](https://github.com/deepseek
1043
966
 
1044
967
  #### `agent/request` — waterfall
1045
968
 
1046
- 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.
969
+ 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.
1047
970
 
1048
971
  ```ts cordis-catalog
1049
972
  /**
1050
973
  * Replace the frozen call configuration. `await next()` yields the config
1051
974
  * the machine would use (agent options on the first request, the logged
1052
- * header afterwards); return a replacement to switch. Model-visible
1053
- * content must use logged channels; this waterfall cannot mutate messages.
975
+ * header afterwards); return a replacement to switch. On step admission,
976
+ * this runs after assembly and `step/start`, before the system prompt and
977
+ * accepted user batch are committed. Cancellation here or during subsequent
978
+ * `prepareCall()` resolution commits neither. The prepared call capability
979
+ * governs prompt admission. Model-visible content must use logged channels;
980
+ * this waterfall cannot mutate messages.
1054
981
  * @param payload.agent - the agent making the model call.
1055
982
  * @param payload.turn - the open turn number.
1056
983
  * @param payload.step - the step whose request this is.
@@ -1094,30 +1021,6 @@ Types: [LlmFailure](./llm-streaming.md) · [ResolvedRetryPolicy](./llm-streaming
1094
1021
 
1095
1022
  Source: [`packages/core/agent/src/runtime-types.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/agent/src/runtime-types.ts)
1096
1023
 
1097
- <a id="agentsession-start--emit"></a>
1098
-
1099
- #### `agent/session-start` — emit
1100
-
1101
- 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.
1102
-
1103
- ```ts cordis-catalog
1104
- /**
1105
- * The session lifecycle began, once before the first turn. Use
1106
- * `agent.inject()` to seed model-facing context. This is a notification, not
1107
- * a veto; disposal requested by a lifecycle owner is rechecked before the
1108
- * driver starts.
1109
- * @param payload.agent - the agent whose session lifecycle began.
1110
- * @param payload.source - why the session started (fresh startup, resume, …).
1111
- * Scope-filtered dispatch (`@deepseek-ai/dsh-scope`): agent-scoped listeners receive only that agent.
1112
- * @mode emit
1113
- */
1114
- 'agent/session-start'(this: Scoped<Agent>, payload: { agent: Agent; source: SessionStartSource }): void
1115
- ```
1116
-
1117
- Types: [Scoped](./scope.md)
1118
-
1119
- Source: [`packages/core/agent/src/runtime-types.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/agent/src/runtime-types.ts)
1120
-
1121
1024
  <a id="agentstatus--emit"></a>
1122
1025
 
1123
1026
  #### `agent/status` — emit
@@ -1218,5 +1121,5 @@ One session committed a different agent preset to its durable log. Consumers inv
1218
1121
  'agent-preset/selected'(sessionId: SessionId, agentPreset: string): void
1219
1122
  ```
1220
1123
 
1221
- Source: [`packages/preset/agent-presets/src/types.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/preset/agent-presets/src/types.ts)
1124
+ 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)
1222
1125
  <!-- END GENERATED cordis-surface -->