dsh-plugin-dev-kb 1.6.0 → 1.8.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 (500) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/README.en.md +23 -6
  3. package/README.md +28 -8
  4. package/kb/INDEX.md +3 -3
  5. package/kb/README.md +9 -4
  6. package/kb/extra/AGENTS.md +1 -1
  7. package/kb/extra/cli-help.md +15 -7
  8. package/kb/extra/cli-help.zh.md +15 -7
  9. package/kb/extra/cookbook/adding-a-plugin-preview.md +18 -25
  10. package/kb/extra/cookbook/adding-a-plugin-preview.zh.md +18 -25
  11. package/kb/extra/cookbook/reviewing-persistence-type-changes.md +1 -1
  12. package/kb/extra/cookbook/reviewing-persistence-type-changes.zh.md +1 -1
  13. package/kb/extra/cookbook/reviewing-ui-design.md +166 -0
  14. package/kb/extra/cookbook/reviewing-ui-design.zh.md +166 -0
  15. package/kb/extra/deepseek-llm-api-wire-extensions.md +2 -2
  16. package/kb/extra/deepseek-llm-api-wire-extensions.zh.md +2 -2
  17. package/kb/extra/defensive-patterns/conversation-and-session.md +2 -2
  18. package/kb/extra/defensive-patterns/conversation-and-session.zh.md +2 -2
  19. package/kb/extra/defensive-patterns/general.md +2 -0
  20. package/kb/extra/defensive-patterns/general.zh.md +2 -0
  21. package/kb/extra/defensive-patterns/package-surface.md +1 -0
  22. package/kb/extra/defensive-patterns/package-surface.zh.md +1 -0
  23. package/kb/extra/defensive-patterns/remote-and-api.md +5 -3
  24. package/kb/extra/defensive-patterns/remote-and-api.zh.md +5 -3
  25. package/kb/extra/development.md +16 -9
  26. package/kb/extra/development.zh.md +16 -9
  27. package/kb/extra/event-producer-consumer.md +64 -51
  28. package/kb/extra/event-producer-consumer.zh.md +64 -51
  29. package/kb/extra/i18n/README.md +2 -0
  30. package/kb/extra/i18n/README.zh.md +2 -0
  31. package/kb/extra/module-graph.md +204 -92
  32. package/kb/extra/module-graph.zh.md +204 -92
  33. package/kb/extra/persistence-changes/2026-10-13-liveshare-share-viewer-principal.md +60 -0
  34. package/kb/extra/persistence-changes/2026-10-13-liveshare-share-viewer-principal.zh.md +60 -0
  35. package/kb/extra/persistence-changes/2026-10-19-session-team-mode.md +48 -0
  36. package/kb/extra/persistence-changes/2026-10-19-session-team-mode.zh.md +48 -0
  37. package/kb/extra/persistence-changes/2026-10-22-action-card-status.md +60 -0
  38. package/kb/extra/persistence-changes/2026-10-22-action-card-status.zh.md +60 -0
  39. package/kb/extra/persistence-changes/2026-10-25-skill-catalog-incomplete.md +60 -0
  40. package/kb/extra/persistence-changes/2026-10-25-skill-catalog-incomplete.zh.md +60 -0
  41. package/kb/extra/persistence-changes/2026-10-27-retry-control-input.md +60 -0
  42. package/kb/extra/persistence-changes/2026-10-27-retry-control-input.zh.md +60 -0
  43. package/kb/extra/persistence-changes/2026-10-27-subagent-settlement-attribution.md +60 -0
  44. package/kb/extra/persistence-changes/2026-10-27-subagent-settlement-attribution.zh.md +60 -0
  45. package/kb/extra/persistence-changes/2026-11-02-subagent-catalog-names.md +48 -0
  46. package/kb/extra/persistence-changes/2026-11-02-subagent-catalog-names.zh.md +48 -0
  47. package/kb/extra/persistence-changes/2026-11-02-team-task-owner-names.md +48 -0
  48. package/kb/extra/persistence-changes/2026-11-02-team-task-owner-names.zh.md +48 -0
  49. package/kb/extra/persistence-changes/README.md +2 -0
  50. package/kb/extra/persistence-changes/README.zh.md +2 -0
  51. package/kb/extra/persistence-changes/historical-formats/README.md +1 -1
  52. package/kb/extra/persistence-changes/historical-formats/README.zh.md +1 -1
  53. package/kb/extra/rescope.md +7 -5
  54. package/kb/extra/rescope.zh.md +7 -5
  55. package/kb/extra/subsystems/agent-team.md +38 -75
  56. package/kb/extra/subsystems/agent-team.zh.md +38 -75
  57. package/kb/extra/subsystems/attachment.md +36 -13
  58. package/kb/extra/subsystems/attachment.zh.md +36 -13
  59. package/kb/extra/subsystems/boot.md +179 -5
  60. package/kb/extra/subsystems/boot.zh.md +179 -5
  61. package/kb/extra/subsystems/computer-use.md +78 -0
  62. package/kb/extra/subsystems/computer-use.zh.md +78 -0
  63. package/kb/extra/subsystems/deliverables.md +2 -0
  64. package/kb/extra/subsystems/deliverables.zh.md +2 -0
  65. package/kb/extra/subsystems/forge.md +1226 -0
  66. package/kb/extra/subsystems/forge.zh.md +1226 -0
  67. package/kb/extra/subsystems/liveshare.md +158 -0
  68. package/kb/extra/subsystems/liveshare.zh.md +158 -0
  69. package/kb/extra/subsystems/mcp.md +96 -1
  70. package/kb/extra/subsystems/mcp.zh.md +96 -1
  71. package/kb/extra/subsystems/worktrees.md +54 -3
  72. package/kb/extra/subsystems/worktrees.zh.md +54 -3
  73. package/kb/extra/testing.md +1 -1
  74. package/kb/extra/testing.zh.md +1 -1
  75. package/kb/extra/ui-design-review-cases.md +445 -0
  76. package/kb/extra/ui-design-review-cases.zh.md +445 -0
  77. package/kb/extra/ui-radius.md +3 -1
  78. package/kb/extra/ui-radius.zh.md +3 -1
  79. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/team-direct-inbox/guide.md +1 -1
  80. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/team-direct-inbox/guide.zh.md +1 -1
  81. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/cordis-timer-wrappers/guide.md +24 -0
  82. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/cordis-timer-wrappers/guide.zh.md +24 -0
  83. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/plugin-manager-view-fields/guide.md +25 -0
  84. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/plugin-manager-view-fields/guide.zh.md +25 -0
  85. package/kb/extra/upgrade-guide/v0.2.1-alpha.4/model-switch-compaction/guide.md +30 -0
  86. package/kb/extra/upgrade-guide/v0.2.1-alpha.4/model-switch-compaction/guide.zh.md +30 -0
  87. package/kb/extra/upgrade-guide/v0.2.1-alpha.4/session-model-selection/guide.md +28 -0
  88. package/kb/extra/upgrade-guide/v0.2.1-alpha.4/session-model-selection/guide.zh.md +28 -0
  89. package/kb/extra/upgrade-guide/v0.2.1-rc.1/agent-instructions-chain-budgets/guide.md +24 -0
  90. package/kb/extra/upgrade-guide/v0.2.1-rc.1/agent-instructions-chain-budgets/guide.zh.md +24 -0
  91. package/kb/extra/upgrade-guide/v0.2.1-rc.1/subagent-control-tools/guide.md +23 -0
  92. package/kb/extra/upgrade-guide/v0.2.1-rc.1/subagent-control-tools/guide.zh.md +23 -0
  93. package/kb/extra/upgrade-guide/v0.2.1-rc.2/agent-runtime-owner/guide.md +20 -0
  94. package/kb/extra/upgrade-guide/v0.2.1-rc.2/agent-runtime-owner/guide.zh.md +20 -0
  95. package/kb/extra/upgrade-guide/v0.2.1-rc.2/agent-team-subagents/guide.md +31 -0
  96. package/kb/extra/upgrade-guide/v0.2.1-rc.2/agent-team-subagents/guide.zh.md +31 -0
  97. package/kb/extra/upgrade-guide/v0.2.1-rc.2/approval-projection-dependency/guide.md +34 -0
  98. package/kb/extra/upgrade-guide/v0.2.1-rc.2/approval-projection-dependency/guide.zh.md +34 -0
  99. package/kb/extra/upgrade-guide/v0.2.1-rc.2/auto-review-shutdown/guide.md +20 -0
  100. package/kb/extra/upgrade-guide/v0.2.1-rc.2/auto-review-shutdown/guide.zh.md +20 -0
  101. package/kb/extra/upgrade-guide/v0.2.1-rc.2/auto-review-user-sources/guide.md +18 -0
  102. package/kb/extra/upgrade-guide/v0.2.1-rc.2/auto-review-user-sources/guide.zh.md +18 -0
  103. package/kb/extra/upgrade-guide/v0.2.1-rc.2/built-in-japanese/guide.md +18 -0
  104. package/kb/extra/upgrade-guide/v0.2.1-rc.2/built-in-japanese/guide.zh.md +18 -0
  105. package/kb/extra/upgrade-guide/v0.2.1-rc.2/conditional-tools/guide.md +25 -0
  106. package/kb/extra/upgrade-guide/v0.2.1-rc.2/conditional-tools/guide.zh.md +25 -0
  107. package/kb/extra/upgrade-guide/v0.2.1-rc.2/context-menu-services/guide.md +23 -0
  108. package/kb/extra/upgrade-guide/v0.2.1-rc.2/context-menu-services/guide.zh.md +23 -0
  109. package/kb/extra/upgrade-guide/v0.2.1-rc.2/cua-consent-storage/guide.md +22 -0
  110. package/kb/extra/upgrade-guide/v0.2.1-rc.2/cua-consent-storage/guide.zh.md +22 -0
  111. package/kb/extra/upgrade-guide/v0.2.1-rc.2/cua-preset-scope/guide.md +18 -0
  112. package/kb/extra/upgrade-guide/v0.2.1-rc.2/cua-preset-scope/guide.zh.md +18 -0
  113. package/kb/extra/upgrade-guide/v0.2.1-rc.2/cua-relative-coordinates/guide.md +17 -0
  114. package/kb/extra/upgrade-guide/v0.2.1-rc.2/cua-relative-coordinates/guide.zh.md +17 -0
  115. package/kb/extra/upgrade-guide/v0.2.1-rc.2/file-drag-callbacks/guide.md +19 -0
  116. package/kb/extra/upgrade-guide/v0.2.1-rc.2/file-drag-callbacks/guide.zh.md +19 -0
  117. package/kb/extra/upgrade-guide/v0.2.1-rc.2/headless-policy-composition/guide.md +27 -0
  118. package/kb/extra/upgrade-guide/v0.2.1-rc.2/headless-policy-composition/guide.zh.md +27 -0
  119. package/kb/extra/upgrade-guide/v0.2.1-rc.2/model-badge-package-removal/guide.md +18 -0
  120. package/kb/extra/upgrade-guide/v0.2.1-rc.2/model-badge-package-removal/guide.zh.md +18 -0
  121. package/kb/extra/upgrade-guide/v0.2.1-rc.2/new-session-blank-reuse/guide.md +22 -0
  122. package/kb/extra/upgrade-guide/v0.2.1-rc.2/new-session-blank-reuse/guide.zh.md +22 -0
  123. package/kb/extra/upgrade-guide/v0.2.1-rc.2/node-24/guide.md +17 -0
  124. package/kb/extra/upgrade-guide/v0.2.1-rc.2/node-24/guide.zh.md +17 -0
  125. package/kb/extra/upgrade-guide/v0.2.1-rc.2/official-bundle-lists/guide.md +18 -0
  126. package/kb/extra/upgrade-guide/v0.2.1-rc.2/official-bundle-lists/guide.zh.md +18 -0
  127. package/kb/extra/upgrade-guide/v0.2.1-rc.2/persistent-terminal-controls/guide.md +18 -0
  128. package/kb/extra/upgrade-guide/v0.2.1-rc.2/persistent-terminal-controls/guide.zh.md +18 -0
  129. package/kb/extra/upgrade-guide/v0.2.1-rc.2/pi-ai-default-capacities/guide.md +18 -0
  130. package/kb/extra/upgrade-guide/v0.2.1-rc.2/pi-ai-default-capacities/guide.zh.md +18 -0
  131. package/kb/extra/upgrade-guide/v0.2.1-rc.2/pi-ai-model-catalog/guide.md +53 -0
  132. package/kb/extra/upgrade-guide/v0.2.1-rc.2/pi-ai-model-catalog/guide.zh.md +53 -0
  133. package/kb/extra/upgrade-guide/v0.2.1-rc.2/pi-ai-protocol-replay/guide.md +30 -0
  134. package/kb/extra/upgrade-guide/v0.2.1-rc.2/pi-ai-protocol-replay/guide.zh.md +30 -0
  135. package/kb/extra/upgrade-guide/v0.2.1-rc.2/ptc-script-format/guide.md +20 -0
  136. package/kb/extra/upgrade-guide/v0.2.1-rc.2/ptc-script-format/guide.zh.md +20 -0
  137. package/kb/extra/upgrade-guide/v0.2.1-rc.2/sdk-desktop-context/guide.md +18 -0
  138. package/kb/extra/upgrade-guide/v0.2.1-rc.2/sdk-desktop-context/guide.zh.md +18 -0
  139. package/kb/extra/upgrade-guide/v0.2.1-rc.2/sdk-minimal-checkpoints/guide.md +18 -0
  140. package/kb/extra/upgrade-guide/v0.2.1-rc.2/sdk-minimal-checkpoints/guide.zh.md +18 -0
  141. package/kb/extra/upgrade-guide/v0.2.1-rc.2/session-projection-handles/guide.md +24 -0
  142. package/kb/extra/upgrade-guide/v0.2.1-rc.2/session-projection-handles/guide.zh.md +24 -0
  143. package/kb/extra/upgrade-guide/v0.2.1-rc.2/session-store-writes/guide.md +25 -0
  144. package/kb/extra/upgrade-guide/v0.2.1-rc.2/session-store-writes/guide.zh.md +25 -0
  145. package/kb/extra/upgrade-guide/v0.2.1-rc.2/session-team-mode/guide.md +22 -0
  146. package/kb/extra/upgrade-guide/v0.2.1-rc.2/session-team-mode/guide.zh.md +22 -0
  147. package/kb/extra/upgrade-guide/v0.2.1-rc.2/subagent-activation-options/guide.md +18 -0
  148. package/kb/extra/upgrade-guide/v0.2.1-rc.2/subagent-activation-options/guide.zh.md +18 -0
  149. package/kb/extra/upgrade-guide/v0.2.1-rc.2/subagent-service-methods/guide.md +19 -0
  150. package/kb/extra/upgrade-guide/v0.2.1-rc.2/subagent-service-methods/guide.zh.md +19 -0
  151. package/kb/extra/upgrade-guide/v0.2.1-rc.2/subagent-user-controls/guide.md +26 -0
  152. package/kb/extra/upgrade-guide/v0.2.1-rc.2/subagent-user-controls/guide.zh.md +26 -0
  153. package/kb/extra/upgrade-guide/v0.2.1-rc.2/tool-executor-plugins/guide.md +35 -0
  154. package/kb/extra/upgrade-guide/v0.2.1-rc.2/tool-executor-plugins/guide.zh.md +35 -0
  155. package/kb/extra/upgrade-guide/v0.2.1-rc.2/web-fetch-private-destinations/guide.md +21 -0
  156. package/kb/extra/upgrade-guide/v0.2.1-rc.2/web-fetch-private-destinations/guide.zh.md +21 -0
  157. package/kb/extra/upgrade-guide/v0.2.1-rc.2/webserver-index-peer/guide.md +17 -0
  158. package/kb/extra/upgrade-guide/v0.2.1-rc.2/webserver-index-peer/guide.zh.md +17 -0
  159. package/kb/extra/upgrade-guide/v0.2.1-rc.3/attachment-read-access/guide.md +23 -0
  160. package/kb/extra/upgrade-guide/v0.2.1-rc.3/attachment-read-access/guide.zh.md +23 -0
  161. package/kb/extra/upgrade-guide/v0.2.1-rc.3/computer-use-helper-permissions/guide.md +21 -0
  162. package/kb/extra/upgrade-guide/v0.2.1-rc.3/computer-use-helper-permissions/guide.zh.md +21 -0
  163. package/kb/extra/upgrade-guide/v0.2.1-rc.3/cua-bundle-id-consent/guide.md +20 -0
  164. package/kb/extra/upgrade-guide/v0.2.1-rc.3/cua-bundle-id-consent/guide.zh.md +20 -0
  165. package/kb/extra/upgrade-guide/v0.2.1-rc.3/generated-worktree-names/guide.md +20 -0
  166. package/kb/extra/upgrade-guide/v0.2.1-rc.3/generated-worktree-names/guide.zh.md +20 -0
  167. package/kb/extra/upgrade-guide/v0.2.1-rc.3/inbox-only-agent-wait/guide.md +19 -0
  168. package/kb/extra/upgrade-guide/v0.2.1-rc.3/inbox-only-agent-wait/guide.zh.md +19 -0
  169. package/kb/extra/upgrade-guide/v0.2.1-rc.3/independent-session-forks/guide.md +23 -0
  170. package/kb/extra/upgrade-guide/v0.2.1-rc.3/independent-session-forks/guide.zh.md +23 -0
  171. package/kb/extra/upgrade-guide/v0.2.1-rc.3/ptc-caller-cancellation/guide.md +20 -0
  172. package/kb/extra/upgrade-guide/v0.2.1-rc.3/ptc-caller-cancellation/guide.zh.md +20 -0
  173. package/kb/extra/upgrade-guide/v0.2.1-rc.3/session-follow-activation/guide.md +21 -0
  174. package/kb/extra/upgrade-guide/v0.2.1-rc.3/session-follow-activation/guide.zh.md +21 -0
  175. package/kb/extra/upgrade-guide/v0.2.1-rc.3/subagent-runtime-ownership/guide.md +21 -0
  176. package/kb/extra/upgrade-guide/v0.2.1-rc.3/subagent-runtime-ownership/guide.zh.md +21 -0
  177. package/kb/extra/upgrade-guide/v0.2.1-rc.3/team-mode-menu/guide.md +18 -0
  178. package/kb/extra/upgrade-guide/v0.2.1-rc.3/team-mode-menu/guide.zh.md +18 -0
  179. package/kb/extra/upgrade-guide/v0.2.1-rc.3/team-projection/guide.md +20 -0
  180. package/kb/extra/upgrade-guide/v0.2.1-rc.3/team-projection/guide.zh.md +20 -0
  181. package/kb/extra/upgrade-guide/v0.2.1-rc.3/web-file-downloads/guide.md +19 -0
  182. package/kb/extra/upgrade-guide/v0.2.1-rc.3/web-file-downloads/guide.zh.md +19 -0
  183. package/kb/extra/upgrade-guide/v0.2.1-rc.3/web-search-defaults/guide.md +18 -0
  184. package/kb/extra/upgrade-guide/v0.2.1-rc.3/web-search-defaults/guide.zh.md +18 -0
  185. package/kb/extra/upgrade-guide/v0.2.1-rc.4/model-listing-refresh/guide.md +22 -0
  186. package/kb/extra/upgrade-guide/v0.2.1-rc.4/model-listing-refresh/guide.zh.md +22 -0
  187. package/kb/extra/upgrade-guide/v0.2.1-rc.4/reasoning-body-props/guide.md +20 -0
  188. package/kb/extra/upgrade-guide/v0.2.1-rc.4/reasoning-body-props/guide.zh.md +20 -0
  189. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/context-menu-target/guide.md +19 -0
  190. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/context-menu-target/guide.zh.md +19 -0
  191. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/cordis-loader-entry-trees/guide.md +24 -0
  192. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/cordis-loader-entry-trees/guide.zh.md +24 -0
  193. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/css-anchored-menus/guide.md +21 -0
  194. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/css-anchored-menus/guide.zh.md +21 -0
  195. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/cua-source-dev-helper/guide.md +19 -0
  196. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/cua-source-dev-helper/guide.zh.md +19 -0
  197. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/desktop-stable-channel/guide.md +18 -0
  198. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/desktop-stable-channel/guide.zh.md +18 -0
  199. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/forge-git-permissions/guide.md +21 -0
  200. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/forge-git-permissions/guide.zh.md +21 -0
  201. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/forge-worktree-entry/guide.md +29 -0
  202. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/forge-worktree-entry/guide.zh.md +29 -0
  203. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/fs-observation-policy-default-off/guide.md +29 -0
  204. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/fs-observation-policy-default-off/guide.zh.md +29 -0
  205. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/llm-request-purpose-declarations/guide.md +29 -0
  206. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/llm-request-purpose-declarations/guide.zh.md +29 -0
  207. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/pi-ai-request-image-count/guide.md +18 -0
  208. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/pi-ai-request-image-count/guide.zh.md +18 -0
  209. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/projection-event-frames/guide.md +32 -0
  210. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/projection-event-frames/guide.zh.md +32 -0
  211. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/projection-released-checkpoint/guide.md +30 -0
  212. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/projection-released-checkpoint/guide.zh.md +30 -0
  213. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/projection-snapshot-scope/guide.md +19 -0
  214. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/projection-snapshot-scope/guide.zh.md +19 -0
  215. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/retained-ptc-timeout/guide.md +21 -0
  216. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/retained-ptc-timeout/guide.zh.md +21 -0
  217. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/schedule-agent-tools/guide.md +37 -0
  218. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/schedule-agent-tools/guide.zh.md +37 -0
  219. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/schedule-remote-host-tasks/guide.md +22 -0
  220. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/schedule-remote-host-tasks/guide.zh.md +22 -0
  221. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/sdk-run-commands/guide.md +24 -0
  222. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/sdk-run-commands/guide.zh.md +24 -0
  223. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/session-header-menu/guide.md +20 -0
  224. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/session-header-menu/guide.zh.md +20 -0
  225. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/subagent-explicit-reasoning/guide.md +20 -0
  226. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/subagent-explicit-reasoning/guide.zh.md +20 -0
  227. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/web-search-credential-modes/guide.md +17 -0
  228. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/web-search-credential-modes/guide.zh.md +17 -0
  229. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/web-search-default-provider/guide.md +19 -0
  230. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/web-search-default-provider/guide.zh.md +19 -0
  231. package/kb/extra/upgrade-guide/v0.2.2-alpha.3/chat-process-activity-context/guide.md +18 -0
  232. package/kb/extra/upgrade-guide/v0.2.2-alpha.3/chat-process-activity-context/guide.zh.md +18 -0
  233. package/kb/extra/upgrade-guide/v0.2.2-alpha.3/subagent-names/guide.md +29 -0
  234. package/kb/extra/upgrade-guide/v0.2.2-alpha.3/subagent-names/guide.zh.md +29 -0
  235. package/kb/extra/web-styling.md +19 -1
  236. package/kb/extra/web-styling.zh.md +19 -1
  237. package/kb/meta/search-index.json +1272 -1098
  238. package/kb/meta/source.json +8 -4
  239. package/kb/site/develop/cordis-tutorial/04-events.md +1 -1
  240. package/kb/site/develop/cordis-tutorial/07-into-the-harness.md +5 -4
  241. package/kb/site/develop/framework/events.md +1 -1
  242. package/kb/site/develop/practice/dynamic-cordis.md +1 -1
  243. package/kb/site/en/develop/cordis-tutorial/04-events.md +1 -1
  244. package/kb/site/en/develop/cordis-tutorial/07-into-the-harness.md +5 -4
  245. package/kb/site/en/develop/framework/events.md +1 -1
  246. package/kb/site/en/develop/practice/dynamic-cordis.md +1 -1
  247. package/kb/site/en/guide/network-proxy.md +1 -1
  248. package/kb/site/en/guide/plugin-market.md +10 -10
  249. package/kb/site/en/guide/providers.md +5 -1
  250. package/kb/site/en/guide/python-sdk.md +17 -2
  251. package/kb/site/en/guide/schedule.md +45 -26
  252. package/kb/site/en/reference/agent-lifecycle.md +3 -1
  253. package/kb/site/en/reference/api-gateway.md +4 -4
  254. package/kb/site/en/reference/capability-seams.md +65 -17
  255. package/kb/site/en/reference/config-catalog.md +560 -238
  256. package/kb/site/en/reference/cookbook/adding-a-package.md +4 -2
  257. package/kb/site/en/reference/cookbook/extension-cookbook.md +1 -1
  258. package/kb/site/en/reference/cordis-api/context.md +1 -1
  259. package/kb/site/en/reference/cordis-api/events.md +9 -9
  260. package/kb/site/en/reference/cordis-api/fiber.md +85 -32
  261. package/kb/site/en/reference/cordis-api/inherited.md +10 -9
  262. package/kb/site/en/reference/experimental-persistence-catalog.md +3 -0
  263. package/kb/site/en/reference/index.md +14 -8
  264. package/kb/site/en/reference/persistence-catalog.md +532 -246
  265. package/kb/site/en/reference/subsystems/client-modules.md +19 -11
  266. package/kb/site/en/reference/subsystems/compaction.md +1 -1
  267. package/kb/site/en/reference/subsystems/conversation.md +2 -0
  268. package/kb/site/en/reference/subsystems/core.md +119 -65
  269. package/kb/site/en/reference/subsystems/filesystem.md +202 -28
  270. package/kb/site/en/reference/subsystems/index.md +3 -1
  271. package/kb/site/en/reference/subsystems/llm-streaming.md +92 -4
  272. package/kb/site/en/reference/subsystems/persistence.md +17 -7
  273. package/kb/site/en/reference/subsystems/plan.md +4 -4
  274. package/kb/site/en/reference/subsystems/ptc-runtime.md +12 -5
  275. package/kb/site/en/reference/subsystems/sandbox.md +11 -4
  276. package/kb/site/en/reference/subsystems/schedule.md +194 -430
  277. package/kb/site/en/reference/subsystems/session-projection.md +186 -44
  278. package/kb/site/en/reference/subsystems/session-reference.md +4 -3
  279. package/kb/site/en/reference/subsystems/session.md +119 -31
  280. package/kb/site/en/reference/subsystems/sidebar-right.md +12 -11
  281. package/kb/site/en/reference/subsystems/skills.md +4 -4
  282. package/kb/site/en/reference/subsystems/slots.md +30 -3
  283. package/kb/site/en/reference/subsystems/storage.md +26 -9
  284. package/kb/site/en/reference/subsystems/subagent.md +119 -102
  285. package/kb/site/en/reference/subsystems/system-prompt.md +13 -11
  286. package/kb/site/en/reference/subsystems/token-meter.md +45 -0
  287. package/kb/site/en/reference/subsystems/tools.md +222 -82
  288. package/kb/site/en/reference/subsystems/typert.md +21 -11
  289. package/kb/site/en/reference/subsystems/user-questions.md +22 -6
  290. package/kb/site/en/reference/subsystems/web-client.md +1 -1
  291. package/kb/site/en/reference/subsystems/web-server.md +68 -23
  292. package/kb/site/en/reference/subsystems/web.md +79 -21
  293. package/kb/site/en/reference/tool-catalog.md +270 -395
  294. package/kb/site/en/reference/tool-execution-pipeline.md +5 -4
  295. package/kb/site/guide/network-proxy.md +1 -1
  296. package/kb/site/guide/plugin-market.md +10 -10
  297. package/kb/site/guide/providers.md +5 -1
  298. package/kb/site/guide/python-sdk.md +17 -2
  299. package/kb/site/guide/schedule.md +45 -26
  300. package/kb/site/reference/agent-lifecycle.md +3 -1
  301. package/kb/site/reference/api-gateway.md +4 -4
  302. package/kb/site/reference/capability-seams.md +65 -17
  303. package/kb/site/reference/config-catalog.md +560 -238
  304. package/kb/site/reference/cookbook/adding-a-package.md +4 -2
  305. package/kb/site/reference/cookbook/extension-cookbook.md +1 -1
  306. package/kb/site/reference/cordis-api/context.md +1 -1
  307. package/kb/site/reference/cordis-api/events.md +9 -9
  308. package/kb/site/reference/cordis-api/fiber.md +87 -32
  309. package/kb/site/reference/cordis-api/inherited.md +10 -9
  310. package/kb/site/reference/experimental-persistence-catalog.md +3 -0
  311. package/kb/site/reference/index.md +14 -8
  312. package/kb/site/reference/persistence-catalog.md +532 -246
  313. package/kb/site/reference/subsystems/client-modules.md +19 -11
  314. package/kb/site/reference/subsystems/compaction.md +1 -1
  315. package/kb/site/reference/subsystems/conversation.md +4 -0
  316. package/kb/site/reference/subsystems/core.md +119 -65
  317. package/kb/site/reference/subsystems/filesystem.md +202 -28
  318. package/kb/site/reference/subsystems/index.md +3 -1
  319. package/kb/site/reference/subsystems/llm-streaming.md +92 -4
  320. package/kb/site/reference/subsystems/persistence.md +17 -7
  321. package/kb/site/reference/subsystems/plan.md +4 -4
  322. package/kb/site/reference/subsystems/ptc-runtime.md +12 -5
  323. package/kb/site/reference/subsystems/sandbox.md +11 -4
  324. package/kb/site/reference/subsystems/schedule.md +197 -433
  325. package/kb/site/reference/subsystems/session-projection.md +186 -44
  326. package/kb/site/reference/subsystems/session-reference.md +4 -3
  327. package/kb/site/reference/subsystems/session.md +119 -31
  328. package/kb/site/reference/subsystems/sidebar-right.md +12 -11
  329. package/kb/site/reference/subsystems/skills.md +4 -4
  330. package/kb/site/reference/subsystems/slots.md +30 -3
  331. package/kb/site/reference/subsystems/storage.md +26 -9
  332. package/kb/site/reference/subsystems/subagent.md +119 -102
  333. package/kb/site/reference/subsystems/system-prompt.md +13 -11
  334. package/kb/site/reference/subsystems/token-meter.md +45 -0
  335. package/kb/site/reference/subsystems/tools.md +222 -82
  336. package/kb/site/reference/subsystems/typert.md +21 -11
  337. package/kb/site/reference/subsystems/user-questions.md +22 -6
  338. package/kb/site/reference/subsystems/web-client.md +1 -1
  339. package/kb/site/reference/subsystems/web-server.md +68 -23
  340. package/kb/site/reference/subsystems/web.md +79 -21
  341. package/kb/site/reference/tool-catalog.md +273 -399
  342. package/kb/site/reference/tool-execution-pipeline.md +4 -3
  343. package/lib/index.js +123 -8
  344. package/lib/kb-version.js +118 -0
  345. package/package.json +4 -2
  346. package/scripts/refresh-kb.mjs +153 -0
  347. package/scripts/selfcheck.mjs +18 -0
  348. package/scripts/smoke.mjs +77 -0
  349. package/skills/dsh-plugin-dev-kb.md +7 -6
  350. package/skills/dsh-plugin-starter.md +65 -0
  351. package/skills/dsh-upgrade-assistant.md +62 -0
  352. package/kb/extra/agent-lifecycle.md +0 -91
  353. package/kb/extra/agent-lifecycle.zh.md +0 -93
  354. package/kb/extra/api-gateway.md +0 -172
  355. package/kb/extra/api-gateway.zh.md +0 -178
  356. package/kb/extra/architecture.md +0 -165
  357. package/kb/extra/architecture.zh.md +0 -169
  358. package/kb/extra/capability-seams.md +0 -714
  359. package/kb/extra/capability-seams.zh.md +0 -716
  360. package/kb/extra/config-catalog.md +0 -4801
  361. package/kb/extra/config-catalog.zh.md +0 -4803
  362. package/kb/extra/cookbook/adding-a-package.md +0 -170
  363. package/kb/extra/cookbook/adding-a-package.zh.md +0 -170
  364. package/kb/extra/cookbook/adding-a-settings-card.md +0 -72
  365. package/kb/extra/cookbook/adding-a-settings-card.zh.md +0 -72
  366. package/kb/extra/cookbook/adding-a-tool.md +0 -101
  367. package/kb/extra/cookbook/adding-a-tool.zh.md +0 -103
  368. package/kb/extra/cookbook/adding-an-llm-adapter.md +0 -43
  369. package/kb/extra/cookbook/adding-an-llm-adapter.zh.md +0 -43
  370. package/kb/extra/cookbook/extension-cookbook.md +0 -132
  371. package/kb/extra/cookbook/extension-cookbook.zh.md +0 -136
  372. package/kb/extra/cordis-api/context.md +0 -364
  373. package/kb/extra/cordis-api/context.zh.md +0 -366
  374. package/kb/extra/cordis-api/events.md +0 -207
  375. package/kb/extra/cordis-api/events.zh.md +0 -209
  376. package/kb/extra/cordis-api/fiber.md +0 -375
  377. package/kb/extra/cordis-api/fiber.zh.md +0 -377
  378. package/kb/extra/cordis-api/inherited.md +0 -38
  379. package/kb/extra/cordis-api/registry.md +0 -152
  380. package/kb/extra/cordis-api/registry.zh.md +0 -154
  381. package/kb/extra/cordis-api/service.md +0 -102
  382. package/kb/extra/cordis-api/service.zh.md +0 -104
  383. package/kb/extra/cordis-tutorial/01-first-plugin.md +0 -95
  384. package/kb/extra/cordis-tutorial/01-first-plugin.zh.md +0 -95
  385. package/kb/extra/cordis-tutorial/02-lifecycle-and-effects.md +0 -98
  386. package/kb/extra/cordis-tutorial/02-lifecycle-and-effects.zh.md +0 -98
  387. package/kb/extra/cordis-tutorial/03-services.md +0 -98
  388. package/kb/extra/cordis-tutorial/03-services.zh.md +0 -98
  389. package/kb/extra/cordis-tutorial/04-events.md +0 -144
  390. package/kb/extra/cordis-tutorial/04-events.zh.md +0 -144
  391. package/kb/extra/cordis-tutorial/05-config.md +0 -111
  392. package/kb/extra/cordis-tutorial/05-config.zh.md +0 -111
  393. package/kb/extra/cordis-tutorial/06-composition-and-hmr.md +0 -113
  394. package/kb/extra/cordis-tutorial/06-composition-and-hmr.zh.md +0 -113
  395. package/kb/extra/cordis-tutorial/07-into-the-harness.md +0 -108
  396. package/kb/extra/cordis-tutorial/07-into-the-harness.zh.md +0 -108
  397. package/kb/extra/cordis-tutorial/index.md +0 -60
  398. package/kb/extra/cordis-tutorial/index.zh.md +0 -62
  399. package/kb/extra/experimental-persistence-catalog.md +0 -17
  400. package/kb/extra/experimental-persistence-catalog.zh.md +0 -17
  401. package/kb/extra/persistence-catalog.md +0 -9140
  402. package/kb/extra/persistence-catalog.zh.md +0 -9142
  403. package/kb/extra/subsystems/README.md +0 -76
  404. package/kb/extra/subsystems/README.zh.md +0 -76
  405. package/kb/extra/subsystems/approval.md +0 -170
  406. package/kb/extra/subsystems/approval.zh.md +0 -170
  407. package/kb/extra/subsystems/client-modules.md +0 -198
  408. package/kb/extra/subsystems/client-modules.zh.md +0 -198
  409. package/kb/extra/subsystems/client-resources.md +0 -92
  410. package/kb/extra/subsystems/client-resources.zh.md +0 -92
  411. package/kb/extra/subsystems/commands.md +0 -223
  412. package/kb/extra/subsystems/commands.zh.md +0 -223
  413. package/kb/extra/subsystems/compaction.md +0 -284
  414. package/kb/extra/subsystems/compaction.zh.md +0 -284
  415. package/kb/extra/subsystems/conversation.md +0 -301
  416. package/kb/extra/subsystems/conversation.zh.md +0 -303
  417. package/kb/extra/subsystems/core.md +0 -1113
  418. package/kb/extra/subsystems/core.zh.md +0 -1125
  419. package/kb/extra/subsystems/credentials.md +0 -493
  420. package/kb/extra/subsystems/credentials.zh.md +0 -493
  421. package/kb/extra/subsystems/filesystem.md +0 -530
  422. package/kb/extra/subsystems/filesystem.zh.md +0 -530
  423. package/kb/extra/subsystems/goal.md +0 -313
  424. package/kb/extra/subsystems/goal.zh.md +0 -313
  425. package/kb/extra/subsystems/jobs.md +0 -554
  426. package/kb/extra/subsystems/jobs.zh.md +0 -554
  427. package/kb/extra/subsystems/llm-streaming.md +0 -1196
  428. package/kb/extra/subsystems/llm-streaming.zh.md +0 -1202
  429. package/kb/extra/subsystems/lsp.md +0 -202
  430. package/kb/extra/subsystems/lsp.zh.md +0 -202
  431. package/kb/extra/subsystems/permission-presets.md +0 -167
  432. package/kb/extra/subsystems/permission-presets.zh.md +0 -167
  433. package/kb/extra/subsystems/persistence.md +0 -418
  434. package/kb/extra/subsystems/persistence.zh.md +0 -418
  435. package/kb/extra/subsystems/plan.md +0 -87
  436. package/kb/extra/subsystems/plan.zh.md +0 -87
  437. package/kb/extra/subsystems/ptc-runtime.md +0 -250
  438. package/kb/extra/subsystems/ptc-runtime.zh.md +0 -250
  439. package/kb/extra/subsystems/sandbox.md +0 -221
  440. package/kb/extra/subsystems/sandbox.zh.md +0 -221
  441. package/kb/extra/subsystems/schedule.md +0 -550
  442. package/kb/extra/subsystems/schedule.zh.md +0 -550
  443. package/kb/extra/subsystems/scope.md +0 -59
  444. package/kb/extra/subsystems/scope.zh.md +0 -61
  445. package/kb/extra/subsystems/session-projection.md +0 -356
  446. package/kb/extra/subsystems/session-projection.zh.md +0 -356
  447. package/kb/extra/subsystems/session-query.md +0 -511
  448. package/kb/extra/subsystems/session-query.zh.md +0 -511
  449. package/kb/extra/subsystems/session-reference.md +0 -224
  450. package/kb/extra/subsystems/session-reference.zh.md +0 -224
  451. package/kb/extra/subsystems/session-telemetry.md +0 -212
  452. package/kb/extra/subsystems/session-telemetry.zh.md +0 -212
  453. package/kb/extra/subsystems/session-title.md +0 -213
  454. package/kb/extra/subsystems/session-title.zh.md +0 -213
  455. package/kb/extra/subsystems/session.md +0 -1339
  456. package/kb/extra/subsystems/session.zh.md +0 -1343
  457. package/kb/extra/subsystems/settings.md +0 -155
  458. package/kb/extra/subsystems/settings.zh.md +0 -155
  459. package/kb/extra/subsystems/shell.md +0 -314
  460. package/kb/extra/subsystems/shell.zh.md +0 -314
  461. package/kb/extra/subsystems/sidebar-right.md +0 -160
  462. package/kb/extra/subsystems/sidebar-right.zh.md +0 -160
  463. package/kb/extra/subsystems/skills.md +0 -352
  464. package/kb/extra/subsystems/skills.zh.md +0 -352
  465. package/kb/extra/subsystems/slots.md +0 -200
  466. package/kb/extra/subsystems/slots.zh.md +0 -204
  467. package/kb/extra/subsystems/spill.md +0 -124
  468. package/kb/extra/subsystems/spill.zh.md +0 -124
  469. package/kb/extra/subsystems/storage.md +0 -259
  470. package/kb/extra/subsystems/storage.zh.md +0 -259
  471. package/kb/extra/subsystems/subagent.md +0 -686
  472. package/kb/extra/subsystems/subagent.zh.md +0 -688
  473. package/kb/extra/subsystems/subprocess.md +0 -321
  474. package/kb/extra/subsystems/subprocess.zh.md +0 -321
  475. package/kb/extra/subsystems/system-prompt.md +0 -254
  476. package/kb/extra/subsystems/system-prompt.zh.md +0 -254
  477. package/kb/extra/subsystems/terminal.md +0 -184
  478. package/kb/extra/subsystems/terminal.zh.md +0 -184
  479. package/kb/extra/subsystems/token-meter.md +0 -106
  480. package/kb/extra/subsystems/token-meter.zh.md +0 -106
  481. package/kb/extra/subsystems/tools.md +0 -747
  482. package/kb/extra/subsystems/tools.zh.md +0 -747
  483. package/kb/extra/subsystems/typert.md +0 -690
  484. package/kb/extra/subsystems/typert.zh.md +0 -690
  485. package/kb/extra/subsystems/user-questions.md +0 -307
  486. package/kb/extra/subsystems/user-questions.zh.md +0 -307
  487. package/kb/extra/subsystems/web-client.md +0 -100
  488. package/kb/extra/subsystems/web-client.zh.md +0 -100
  489. package/kb/extra/subsystems/web-server.md +0 -302
  490. package/kb/extra/subsystems/web-server.zh.md +0 -302
  491. package/kb/extra/subsystems/web.md +0 -206
  492. package/kb/extra/subsystems/web.zh.md +0 -206
  493. package/kb/extra/subsystems/workflow.md +0 -278
  494. package/kb/extra/subsystems/workflow.zh.md +0 -278
  495. package/kb/extra/subsystems/workspace.md +0 -647
  496. package/kb/extra/subsystems/workspace.zh.md +0 -647
  497. package/kb/extra/tool-catalog.md +0 -2824
  498. package/kb/extra/tool-catalog.zh.md +0 -2832
  499. package/kb/extra/tool-execution-pipeline.md +0 -65
  500. package/kb/extra/tool-execution-pipeline.zh.md +0 -67
@@ -6,13 +6,13 @@ outline: [2,3]
6
6
 
7
7
  # Subagents
8
8
 
9
- The unified activation API manages local conversations and external executions.
9
+ The unified activation API manages local conversations and external executions. Creation ancestry, runtime ownership, and communication belong to the subagent tree. [Subagent controls](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/subagent/tool-subagent-control/README.md) own agent identity and exact-caller inbox waiting; Team tools add shared tasks and task policy.
10
10
 
11
11
  ## Capabilities and activation requests
12
12
 
13
13
  Every backend uses startActivation. Capability flags validate request options; prepareContinuable selects local Agent creation, while start selects one external execution. The model-facing tool uses parent delivery. Workflow and code mode consumers can await caller results without injecting another parent message. Historical children with unavailable descriptors remain discoverable as `mode: 'unknown'` without granting continuation capabilities; the [package README](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/subagent/subagent/README.md) defines catalog persistence.
14
14
 
15
- Optional `request.cwd` selects the child's initial directory; relative paths resolve against the parent's current effective directory. Omitting it captures that directory at admission. Local child Sessions retain the parent's original project, and cold resume retains their logged directory state.
15
+ Optional `cwd` selects the child's initial directory; relative paths resolve against the parent's current effective directory. Omitting it captures that directory at admission. Local child Sessions retain the parent's original project, and cold resume retains their logged directory state.
16
16
 
17
17
  ```ts type-equiv
18
18
  /**
@@ -32,15 +32,19 @@ interface SubagentCapabilities {
32
32
 
33
33
  ```ts type-equiv
34
34
  /** One managed child execution and its result delivery policy. */
35
- interface SubagentActivationSpec {
35
+ interface SubagentActivationSpec extends Omit<SubagentStartRequest, 'label' | 'signal'> {
36
36
  /** Registered backend to use. */
37
37
  readonly provider: string
38
38
  /** Short task label retained in cataloged child membership. */
39
39
  readonly label: string
40
+ /**
41
+ * Requested name, unique among the parent's children: 1–32 lower-case
42
+ * letters, digits, or hyphens starting with a letter, other than `lead`.
43
+ * Omission selects the first free `agent-N`.
44
+ */
45
+ readonly name?: string
40
46
  /** Optional reserved identity for a local child; external backends allocate their own ids. */
41
47
  readonly childId?: SessionId
42
- /** Task, parent, and backend-supported execution options. */
43
- readonly request: Omit<SubagentStartRequest, 'label' | 'signal'>
44
48
  /** Cancellation before publication; callers own later cancellation through dispose. */
45
49
  readonly signal: AbortSignal
46
50
  /** Parent delivery notifies the model; caller delivery only returns the result. Local children always enter the parent catalog. */
@@ -53,6 +57,11 @@ interface SubagentActivationSpec {
53
57
  interface SubagentActivation {
54
58
  /** Stable identity of the child. */
55
59
  readonly childId: SessionId
60
+ /**
61
+ * Model-facing name: slash-separated names from the root when every creator
62
+ * below the root is named, otherwise the child Session id.
63
+ */
64
+ readonly name: string
56
65
  /** Accepted inbox message, when the backend has a local inbox. */
57
66
  readonly messageId?: MessageId
58
67
  /**
@@ -60,16 +69,15 @@ interface SubagentActivation {
60
69
  * Teardown failures are reported by dispose() without replacing a captured result.
61
70
  */
62
71
  readonly result: Promise<SubagentResult>
63
- /** Stop and release this activation and its owned descendants; rejects on teardown failure. */
72
+ /** Stop and release only this activation; rejects on teardown failure. */
64
73
  dispose(): Promise<void>
65
74
  }
66
75
  ```
67
76
 
68
77
  ```ts type-equiv
69
78
  /**
70
- * Task and optional capabilities supplied to a backend. startActivation carries
71
- * these fields in request while owning its label, cancellation, and delivery
72
- * policy separately.
79
+ * Task and optional capabilities supplied to a backend. The activation spec
80
+ * shares these task options and defines its own label and cancellation policy.
73
81
  */
74
82
  interface SubagentStartRequest {
75
83
  /** Initial child directory; relative paths resolve against the parent's current directory. Omitted inherits that directory at start. */
@@ -175,9 +183,23 @@ interface ContinuableCreateSpec {
175
183
  }
176
184
  ```
177
185
 
186
+ ## Agent names
187
+
188
+ Session ids remain the only execution identity for routing, authorization, persistence, and task ownership; names are model-facing references. `SubagentActivation.name` is the child's full name, and `listDescendants()` rows carry it as `path` when every link from the root is named. `namesOf(agent)` reports the names of a live member and its direct creator; the root is `lead`. `resolveName(caller, name, signal)` returns the Session id for `lead` or a full name; any other text that names no member is returned unchanged as a Session id, while a slash-separated address that names no member fails with `AGENT_NAME_NOT_FOUND`. Callers authorize the result; resolution grants no authority. The [package README](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/subagent/subagent/README.md#agent-names) defines the name rule, defaults, failures, and catalog persistence.
189
+
190
+ ```ts type-equiv
191
+ /** Model-facing names of one live tree member and its direct creator. */
192
+ interface SubagentMemberNames {
193
+ /** `lead` for the root, the slash-separated path for a named descendant, otherwise the Session id. */
194
+ readonly self: string
195
+ /** The direct creator's name by the same rule; absent for the root. */
196
+ readonly parent?: string
197
+ }
198
+ ```
199
+
178
200
  ## Messages and interruption
179
201
 
180
- sendMessage authorizes the exact live sender and permits only adjacent local agents. Running children receive steering input; absent continuable children resume from persistence. External executions reject follow-ups. Both local and external executions automatically report their final text, structured result, diagnostic, and status in the parent settlement notice. Local children can also send messages through send_message. caller delivery suppresses settlement notices. drainDescendants and drainChildren await owned work teardown for local and external activations.
202
+ `sendMessage` requires the exact live sender and a target Session id in the same root tree. Root and continuable members can message across branches; admission revalidates the sender and root. Running targets receive Steer; only an absent target cold-resumes, while its creation ancestors may remain offline. External executions reject follow-ups. Local and external executions report final text, structured output, diagnostics, and status to their direct creator only while it is online; caller delivery suppresses those notices. `drainDescendants` awaits whole-tree teardown; an activation receipt’s `dispose()` releases only that execution.
181
203
 
182
204
  ```ts type-equiv
183
205
  /** Durable attribution for one model-authored message between Agents. */
@@ -204,13 +226,15 @@ interface SubagentSettledMessageSource {
204
226
  readonly form: 'notice'
205
227
  /** One-line account of how the child ended. */
206
228
  readonly summary: string
229
+ /** Exact execution stop reason; absent on historical notices. Writers always include it. */
230
+ readonly stopReason?: SubagentResult['stopReason']
207
231
  /** Session id of the child that settled. */
208
232
  readonly senderSessionId: SessionId
209
233
  }
210
234
  ```
211
235
 
212
236
  ```ts type-equiv
213
- /** Options for one model-authored message between adjacent Agents. */
237
+ /** Options for one model-authored message within a subagent tree. */
214
238
  interface SubagentSendMessageOptions {
215
239
  /** Caller cancellation, owning the operation only until inbox acceptance. */
216
240
  readonly signal: AbortSignal
@@ -219,18 +243,18 @@ interface SubagentSendMessageOptions {
219
243
 
220
244
  ```ts type-equiv
221
245
  /**
222
- * Authority under which one interrupt request is admitted. `user` carries the
223
- * durable direct-parent address a human client presented; `ancestor` carries
224
- * the exact live Agent object whose recorded lineage must contain the caller.
246
+ * Authority under which one interrupt request is admitted. `user` is a trusted
247
+ * host operation; Remote callers need permission on the target Session before
248
+ * invoking it. `ancestor` carries an exact live Agent in the target's creation ancestry.
225
249
  */
226
250
  type SubagentInterruptAuthority =
227
- | { readonly kind: 'user'; readonly parentSessionId: SessionId }
251
+ | { readonly kind: 'user' }
228
252
  | { readonly kind: 'ancestor'; readonly agent: Agent }
229
253
  ```
230
254
 
231
255
  ## Durable enumeration
232
256
 
233
- `listChildren` reads the parent-owned catalog of all local children and parent-delivery external children. Caller-delivery external executions leave membership and result collection to their caller; local workflow children remain discoverable after completion. External entries carry `mode: 'external'` and cannot open a child Session or accept follow-ups. Catalog entries record membership at creation without execution status. `list_agents` exposes direct continuable children with `running` or `inactive` activity; see the [control tool](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/subagent/tool-subagent-control/README.md#list_agents).
257
+ The parent-owned `subagentCatalog` projection lists all local children and parent-delivery external children. Caller-delivery external executions leave membership and result collection to their caller; local workflow children remain discoverable after completion. External entries carry `mode: 'external'` and cannot open a child Session or accept follow-ups. Catalog entries record membership at creation without execution status. `list_agents` exposes the root and reachable continuable descendants with `running` or `inactive` activity; see the [control tool](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/subagent/tool-subagent-control/README.md#list_agents).
234
258
 
235
259
  ## Results and backend handles
236
260
 
@@ -376,13 +400,13 @@ interface SubagentProvider {
376
400
  }
377
401
  ```
378
402
 
379
- ## Durable enumeration: `listChildren()`, `listDescendants()`, and their entries
403
+ ## Durable enumeration: `listDescendants()` and catalog entries
380
404
 
381
405
  The model-facing `list_agents` adapter reports current activity as `running` or `inactive`. These values do not describe task completion or guarantee that `send_message` will succeed.
382
406
 
383
- `SubagentRuntime.listChildren(parentSessionId, signal?)` reads the parent's `subagentCatalog` view through a live-preferred Session observation and releases that observation on success or failure. It returns direct-child entries in parent event order without reading child logs or enumerating the Session corpus. Query failures propagate; a missing catalog projection fails explicitly. Browser rows derive membership from the shared projection store and add activity from Session status; the control stream pushes complete catalog updates. `listDescendants()` recursively reads those catalogs and derives `hasChildren` from each child catalog. [The parent-catalog Agent Note](https://github.com/deepseek-ai/deepseek-harness/blob/master/.agents/notes/implemented/architecture/2026-09-01-parent-owned-subagent-catalog.md) owns creation, fork isolation, ordering, and persistence costs.
407
+ Direct-child entries are available as `observation.projections?.values.subagentCatalog` through `ctx.sessionQuery.observeSession(parentSessionId, { signal })`; callers release the observation with `using`. Entries follow parent event order without reading child logs or enumerating the Session corpus. Query failures propagate; a missing catalog projection means discovery is unavailable. Browser rows derive membership from the shared projection store and add activity from Session status; the control stream pushes complete catalog updates. `listDescendants()` recursively reads those catalogs and derives `hasChildren` from each child catalog. [The parent-catalog Agent Note](https://github.com/deepseek-ai/deepseek-harness/blob/master/.agents/notes/implemented/architecture/2026-09-01-parent-owned-subagent-catalog.md) owns creation, fork isolation, ordering, and persistence costs.
384
408
 
385
- `SubagentRuntime.listDescendants(rootSessionId)` recursively calls the same catalog reader in stable pre-order, preserving each parent's event order. External entries are leaves without local Sessions. One-shot and unknown-mode entries remain traversal nodes; unknown modes produce `unsupported` diagnostics. An unreadable child catalog produces `corrupt` or `unavailable` and stops only that branch. Root read failures, missing services or projections, and cancellation reject the listing. Each reachable catalog is observed once and released before the next read; repeated ids and cycles are skipped. Sessions absent from reachable catalogs are not discovered, including ordinary Session forks and any subagents below those forks. Each row carries its catalog parent and root-relative depth:
409
+ `SubagentRuntime.listDescendants(rootSessionId)` recursively calls the same catalog reader in stable pre-order, preserving each parent's event order. External entries are leaves without local Sessions. One-shot and unknown-mode entries remain traversal nodes; unknown modes produce `unsupported` diagnostics. An unreadable child catalog produces `corrupt` or `unavailable` and stops only that branch. Root read failures, missing services or projections, and cancellation reject the listing. Each reachable catalog is observed once and released before the next read; repeated ids and cycles are skipped. Sessions absent from reachable catalogs are not discovered, including ordinary Session forks and any subagents below those forks. Each row carries its catalog parent, root-relative depth, and, when every link from the root is named, its full name as `path`:
386
410
 
387
411
  ```ts type-equiv
388
412
  /** One catalog descendant with its direct parent and edge distance from the requested root. */
@@ -391,6 +415,8 @@ type SubagentDescendantListEntry = SubagentListEntry & {
391
415
  readonly parentId: SessionId
392
416
  /** Edge distance from the requested root; direct children are `1`. */
393
417
  readonly depth: number
418
+ /** Slash-separated names from the requested root; absent when this child or an ancestor below the root has no name. */
419
+ readonly path?: string
394
420
  }
395
421
  ```
396
422
 
@@ -408,15 +434,7 @@ Generated from source by `scripts/gen-cordis-catalog.ts` (verified fresh by `pnp
408
434
 
409
435
  ### `ctx.subagentModelSelection` — `SubagentModelSelectionConfig`
410
436
 
411
- Singleton settings owner read when delegation tools are composed for a Session.
412
-
413
- ```ts cordis-catalog
414
- /**
415
- * Read a detached selection preference for the next eligible Session composition.
416
- * @returns the enabled state and exact allowed routes.
417
- */
418
- current(): SubagentModelSelectionSettings
419
- ```
437
+ Host settings owner that records Session authorization before the first model request.
420
438
 
421
439
  Source: [`packages/subagent/tool-subagent/src/model-selection-settings.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/subagent/tool-subagent/src/model-selection-settings.ts)
422
440
 
@@ -449,32 +467,66 @@ startActivation(spec: SubagentActivationSpec & { readonly childId: SessionId }):
449
467
  startActivation(spec: SubagentActivationSpec): Promise<SubagentActivation>
450
468
 
451
469
  /**
452
- * Join progressing descendants without cancelling them. Idle descendants whose
453
- * inboxes require a later wake stay resident and do not delay host completion.
454
- * @param parent - the exact parent whose descendant work is observed.
455
- * @returns whether work was joined; hosts recheck parent idle after true.
470
+ * Resolve the root shared by an Agent and its other agents in its subagent tree.
471
+ * @param caller - exact live Agent whose subagent ancestry selects the tree.
472
+ * @returns the live root; ordinary Session forks lead independent trees.
473
+ * @throws when the caller or its runtime owner is unavailable.
474
+ */
475
+ rootOf(caller: Agent): Agent
476
+
477
+ /**
478
+ * Report the model-facing names of a live tree member and its direct creator.
479
+ * The root is `lead`; a descendant is the slash-separated path of names from
480
+ * the root, or its Session id when it or a creator below the root has no name.
481
+ * @param agent - exact live root or resident tree member.
482
+ * @returns the member's name and, for a descendant, its creator's name.
483
+ * @throws when the caller or its runtime owner is unavailable.
484
+ */
485
+ namesOf(agent: Agent): SubagentMemberNames
486
+
487
+ /**
488
+ * Resolve a model-supplied agent reference within the caller's tree. `lead`
489
+ * selects the root and a slash-separated path is looked up through the
490
+ * catalogs along it. Any other text that is not a name in the tree is
491
+ * returned as a Session id, because a single token can be one; a
492
+ * slash-separated address never is, so an unmatched path fails instead of
493
+ * reaching a member lookup as an unknown id. Resolution grants no authority:
494
+ * messaging, interruption, and assignment authorize the result.
495
+ * @param caller - exact live Agent whose tree root anchors the lookup.
496
+ * @param name - `lead`, a full name from the root, or a Session id.
497
+ * @param signal - cancellation forwarded to each catalog read.
498
+ * @returns the referenced Session id.
499
+ * @throws {@link SubagentError} `AGENT_NAME_NOT_FOUND` when a path names no member;
500
+ * when the caller's root is unavailable; or when a catalog along the path cannot be read.
456
501
  */
457
- async waitForChildren(parent: Agent): Promise<boolean>
502
+ async resolveName(caller: Agent, name: string, signal: AbortSignal): Promise<SessionId>
458
503
 
459
504
  /**
460
- * Steer one model-authored message to the sender's direct parent or direct
461
- * continuable child. A running target admits it at the nearest step boundary;
462
- * an idle target starts a turn, and an absent direct child cold-resumes from
463
- * persistence. The service derives durable sender attribution from the exact
464
- * live sender. Caller cancellation stops only pre-acceptance work.
465
- * @param sender - exact live Agent authorizing and originating the message.
466
- * @param targetId - durable direct-parent or direct-child session id.
505
+ * Join progressing subagent tree work for its root. Idle members with parked input
506
+ * stay resident without delaying host completion. Ordinary members return false.
507
+ * @param root - exact live subagent tree root whose member work is awaited.
508
+ * @returns whether work was joined; hosts recheck root idle after true.
509
+ */
510
+ async waitForTreeWork(root: Agent): Promise<boolean>
511
+
512
+ /**
513
+ * Steer one model-authored message to another member of the same subagent tree.
514
+ * A running target receives it at its next step; an idle target starts a turn.
515
+ * A cold target resumes under its runtime subagent tree root without restoring
516
+ * its creation ancestors. Sender identity is rechecked before inbox acceptance; cancellation
517
+ * stops only pre-acceptance work and never retracts an accepted message.
518
+ * @param sender - exact live root or resident continuable Agent originating the message.
519
+ * @param targetId - another root or continuable member's durable Session id.
467
520
  * @param content - model-authored content to deliver.
468
521
  * @param options - caller cancellation before inbox acceptance.
469
522
  * @returns the accepted message's inbox id.
470
- * @throws when continuation services are unavailable, adjacency is rejected,
471
- * or the message was not admitted.
523
+ * @throws when the target is outside the tree, cannot resume, or rejects input.
472
524
  */
473
525
  async sendMessage( sender: Agent, targetId: SessionId, content: ContentBlock[], options: SubagentSendMessageOptions, ): Promise<MessageId>
474
526
 
475
527
  /**
476
- * Interrupt one live child's current execution under a human parent
477
- * address or an exact live ancestor Agent. Fire-and-return: the cancel
528
+ * Interrupt one live child's current execution under a trusted user
529
+ * operation or an exact live ancestor Agent. Fire-and-return: the cancel
478
530
  * signal is issued before this returns, but the target may keep running
479
531
  * until it observes the signal. Unclaimed pending inbox work, the Activation,
480
532
  * and published descendants are preserved; claimed work is not requeued.
@@ -483,47 +535,22 @@ async sendMessage( sender: Agent, targetId: SessionId, content: ContentBlock[],
483
535
  * is an accepted no-op, as is a manager-less composition, which cannot own a
484
536
  * live Activation.
485
537
  * @param targetSessionId - the durable child session id to interrupt.
486
- * @param authority - the human parent address or exact live ancestor Agent.
538
+ * @param authority - a trusted user operation or exact live ancestor Agent.
487
539
  * @throws {SubagentError} `UNAUTHORIZED` when the authority does not own the
488
540
  * live target.
489
541
  */
490
542
  interrupt(targetSessionId: SessionId, authority: SubagentInterruptAuthority): void
491
543
 
492
544
  /**
493
- * Close subagent admission below exact live parent Agents, stop only their
494
- * visible descendant Activations synchronously, then await admitted scoped
495
- * materializations and release those forests child-first. The scoped cutoff
496
- * lasts until each exact parent leaves the registry; unrelated parent trees
497
- * remain live.
498
- * @param parents - exact host-owned parent Agents entering teardown.
499
- * @returns once every retained descendant activation released its execution handle.
545
+ * Close admission and stop all instances in the selected subagent trees, then await
546
+ * pending startup and cleanup. Ordinary members are ignored. The cutoff lasts
547
+ * until each exact root leaves the registry; unrelated subagent trees remain live.
548
+ * @param parents - exact live subagent tree roots entering teardown.
549
+ * @returns once all admitted startup and member cleanup have settled.
500
550
  * @throws an aggregate error after all branches settle when any failed.
501
551
  */
502
552
  async drainDescendants(parents: readonly Agent[]): Promise<void>
503
553
 
504
- /**
505
- * Release selected resident direct children of one exact live
506
- * parent. Other children of the same parent remain admitted and resident.
507
- * Absent targets and a manager-less composition are accepted no-ops.
508
- * @param parent - exact live direct parent authorizing the selected release.
509
- * @param childIds - durable direct-child ids to release when resident.
510
- * @returns once every selected activation released its execution handle.
511
- * @throws {SubagentError} `UNAUTHORIZED` when a resident target belongs to a
512
- * different parent or the supplied parent identity is stale.
513
- */
514
- async drainChildren(parent: Agent, childIds: readonly SessionId[]): Promise<void>
515
-
516
- /**
517
- * Read the parent's durable direct-child catalog without loading or resuming an Agent.
518
- * The service owns and releases the live-preferred Session observation.
519
- * @param parentSessionId - parent whose direct children are requested.
520
- * @param signal - cancellation forwarded to the Session query.
521
- * @returns catalog children in parent event order.
522
- * @throws {@link SubagentError} when query or catalog projection is unavailable.
523
- * @throws SessionQueryError when the parent cannot be read or the query is cancelled.
524
- */
525
- listChildren(parentSessionId: SessionId, signal?: AbortSignal): Promise<SubagentCatalogEntry[]>
526
-
527
554
  /**
528
555
  * Recursively list reachable parent catalogs in stable pre-order, preserving
529
556
  * each catalog's event order. Each row carries its catalog parent and depth;
@@ -543,8 +570,8 @@ listChildren(parentSessionId: SessionId, signal?: AbortSignal): Promise<Subagent
543
570
  listDescendants(rootSessionId: SessionId, signal?: AbortSignal): Promise<SubagentDescendantListEntry[]>
544
571
 
545
572
  /**
546
- * Deliver one browser-authored message to a continuable child through the
547
- * exact live direct parent, retaining the caller-minted request identity and
573
+ * Deliver one browser-authored message to a continuable child through its
574
+ * live subagent tree root, retaining the caller-minted request identity and
548
575
  * validated browser zone on the accepted message. Success identifies the
549
576
  * message the child's inbox accepted; later execution is independent of this
550
577
  * call. Queue delivery targets a later turn; steer delivery targets the
@@ -552,31 +579,27 @@ listDescendants(rootSessionId: SessionId, signal?: AbortSignal): Promise<Subagen
552
579
  * Image parts are admitted and persisted through the attachment store
553
580
  * before delivery, and the child's model must accept image input.
554
581
  * Cold resume at capacity rejects with `subagent/delivery-unavailable`.
555
- * @param request - durable address, delivery, minted identity, content, and optional browser zone.
582
+ * Access is checked on the target Session before attachment admission or restoration.
583
+ * @param request - target id, delivery, minted identity, content, and optional browser zone.
556
584
  * @param signal - carrier cancellation, owning the call until inbox acceptance.
557
585
  * @returns the accepted message's inbox identity.
558
586
  * @throws {RemoteError} `gateway/bad-request`, `subagent/attachment-invalid`,
559
- * `subagent/invalid-time-zone`, `subagent/parent-unavailable`,
587
+ * `subagent/invalid-time-zone`,
560
588
  * `subagent/not-resumable`, `subagent/unauthorized`,
561
589
  * `subagent/delivery-unavailable`, `gateway/cancelled`, or `gateway/internal`.
562
590
  */
563
- @Remote('prompt') async prompt(request: SubagentPromptRequest, signal: AbortSignal): Promise<SubagentPromptReceipt>
591
+ @Remote({ name: 'prompt', resources: { session: request => request.childSessionId } }) async prompt(request: SubagentPromptRequest, signal: AbortSignal): Promise<SubagentPromptReceipt>
564
592
 
565
593
  /**
566
- * Remote face of {@link interrupt} under one durable parent address. No
567
- * catalog, history, persistence, or parent Agent lookup runs: the core
568
- * primitive alone authorizes the address against the live Activation, which
569
- * is what keeps a live child interruptible while its parent Agent is offline.
594
+ * Remote face of {@link interrupt}, authorized on the target Session by the Gateway.
595
+ * No catalog, history, persistence, or parent Agent lookup runs.
570
596
  * Absent, idle, and already-completed targets are accepted no-ops there.
571
597
  * @param childSessionId - durable child session id to interrupt.
572
- * @param parentSessionId - durable direct parent whose authority is claimed.
573
- * @param mode - required continuable-address discriminator.
574
598
  * @returns acknowledgement that the cancel signal was admitted, not that the target is quiescent.
575
599
  * @throws {RemoteError} `gateway/bad-request` for an empty id,
576
- * `subagent/unauthorized` when the address does not own the live target,
577
600
  * otherwise `gateway/internal`.
578
601
  */
579
- @Remote('interruptByParent') interruptByParent( childSessionId: SessionId, parentSessionId: SessionId, mode: 'continuable', ): SubagentInterruptReceipt
602
+ @Remote({ name: 'interruptByUser', resources: { session: childSessionId => childSessionId } }) interruptByUser(childSessionId: SessionId): SubagentInterruptReceipt
580
603
 
581
604
  /**
582
605
  * Register a provider under its name. Registration is effect-scoped and HMR
@@ -594,12 +617,6 @@ registerProvider(provider: SubagentProvider): () => void
594
617
  * @returns the provider, or undefined when absent.
595
618
  */
596
619
  getProvider(name: string): SubagentProvider | undefined
597
-
598
- /**
599
- * List registered provider names in insertion order.
600
- * @returns the registered names.
601
- */
602
- list(): string[]
603
620
  ```
604
621
 
605
622
  Types: [Agent](./core.md) · [ContentBlock](./llm-streaming.md) · [MessageId](./llm-streaming.md) · [SessionId](./core.md)
@@ -614,14 +631,14 @@ Source: [`packages/subagent/subagent/src/index.ts`](https://github.com/deepseek-
614
631
 
615
632
  #### `subagent/end` — emit
616
633
 
617
- A published child settled. Scope-filtered dispatch uses the same delegating parent carrier as `subagent/start`, so the lifecycle pair reaches the same scoped audience.
634
+ A published child settled. Scope-filtered dispatch uses the same subagent tree-root carrier as `subagent/start`, so the lifecycle pair reaches the same scoped audience.
618
635
 
619
636
  ```ts cordis-catalog
620
637
  /**
621
- * A published child settled. Scope-filtered dispatch uses the same delegating
622
- * parent carrier as `subagent/start`, so the lifecycle pair reaches the
638
+ * A published child settled. Scope-filtered dispatch uses the same subagent tree-root
639
+ * carrier as `subagent/start`, so the lifecycle pair reaches the
623
640
  * same scoped audience.
624
- * @param info - the run identity and terminal outcome.
641
+ * @param info - run identity, durable direct creator `parentSessionId`, and terminal outcome.
625
642
  * @mode emit
626
643
  */
627
644
  'subagent/end'(this: Scoped<SubagentRuntime>, info: SubagentRunEndInfo): void
@@ -669,16 +686,16 @@ Source: [`packages/subagent/subagent/src/index.ts`](https://github.com/deepseek-
669
686
 
670
687
  #### `subagent/start` — emit
671
688
 
672
- A provider established a published child. For in-process providers, `ctx.agents.get(info.id)` resolves during this notification. Scope-filtered dispatch keys the carrier by the delegating parent, so a parent-scoped listener observes only its own delegations. Paired with `subagent/end`.
689
+ A provider established a published child. For in-process providers, `ctx.agents.get(info.id)` resolves during this notification. Scope-filtered dispatch keys the carrier by the subagent tree root, so a root-scoped listener observes all subagent tree activations. Paired with `subagent/end`.
673
690
 
674
691
  ```ts cordis-catalog
675
692
  /**
676
693
  * A provider established a published child. For in-process providers,
677
694
  * `ctx.agents.get(info.id)` resolves during this notification.
678
- * Scope-filtered dispatch keys the carrier by the delegating parent, so a
679
- * parent-scoped listener observes only its own delegations. Paired with
695
+ * Scope-filtered dispatch keys the carrier by the subagent tree root, so a
696
+ * root-scoped listener observes all subagent tree activations. Paired with
680
697
  * `subagent/end`.
681
- * @param info - the provider and published child identity.
698
+ * @param info - provider, child identity, and durable direct creator `parentSessionId`.
682
699
  * @mode emit
683
700
  */
684
701
  'subagent/start'(this: Scoped<SubagentRuntime>, info: SubagentRunInfo): void
@@ -12,7 +12,7 @@ Source: [`packages/core/system-prompt/src/index.ts`](https://github.com/deepseek
12
12
 
13
13
  ## Assembly context
14
14
 
15
- `AssembleContext` identifies the scope layer one assembly resolves and may carry the explicit control signal for that request. It is merge-extensible: `dsh-agent` adds the optional live `agent` field, and `assembleContextFor(agent, signal)` sets the explicit fields together. A bare assembly has neither scope nor signal.
15
+ `AssembleContext` identifies the scope layer one assembly resolves and may carry the explicit control signal for that request. It is merge-extensible: `dsh-agent` adds optional `agent` and `modelSelection` fields. `assembleContextFor(agent, signal)` sets the agent, scope, and signal; the loop supplies the model selection captured for the step and retained across retries, with omitted reasoning effort using adapter defaults. A bare assembly has neither scope nor signal.
16
16
 
17
17
  ```ts type-equiv
18
18
  /** Merge-extensible context for one prompt assembly. */
@@ -27,6 +27,8 @@ interface AssembleContext {
27
27
  }
28
28
  ```
29
29
 
30
+ `TOOL_APPLY_PATCH` takes order 1350 between `TOOL_EDIT` (1300) and `TOOL_GLOB` (1400).
31
+
30
32
  ## Tool-provider result
31
33
 
32
34
  `ToolProviderResult.schemas` is the model-visible set for the current assembly. `knownNames` is the provider's pre-restriction name universe used to distinguish a configured-name typo from a known tool that is deliberately hidden in this scope.
@@ -197,12 +199,12 @@ refreshContext(assembly: PromptAssembly, context: AssembleContext = {}): PromptA
197
199
 
198
200
  /**
199
201
  * Assemble global and scoped providers, detach tool parameters, apply
200
- * canonical ordering, then run the assembly waterfall. Scoped sections and
201
- * variables shadow globals. The returned waterfall value is authoritative
202
- * except that an effective complete section is restored afterwards as the
203
- * sole prompt section.
204
- * @param context - the optional scope and plugin-defined assembly fields.
205
- * @returns the post-waterfall assembly with any complete prompt enforced.
202
+ * canonical ordering, then run the presentation waterfall. Scoped sections
203
+ * and variables shadow globals. The waterfall's text is authoritative except
204
+ * that an effective complete section is restored afterwards as the sole
205
+ * prompt section; tool declarations stay provider-owned.
206
+ * @param context - the optional scope, step tool set, and plugin-defined assembly fields.
207
+ * @returns the post-waterfall assembly with ordered tool declarations and any complete prompt enforced.
206
208
  */
207
209
  async assemble(context: AssembleContext = {}): Promise<PromptAssembly>
208
210
  ```
@@ -217,13 +219,13 @@ Source: [`packages/core/system-prompt/src/index.ts`](https://github.com/deepseek
217
219
 
218
220
  #### `system-prompt/assemble` — waterfall
219
221
 
220
- Expert waterfall over the assembled sections, contexts, tools, and variables. Scope-filtered dispatch (`@deepseek-ai/dsh-scope`): scoped listeners receive only that scope's assemblies. The returned value is authoritative. A supplied signal controls only this explicit assembly request and must not be retained to control later turns. A registered complete section is restored after this waterfall, so listeners cannot add to or replace that scope's system prompt.
222
+ Presentation waterfall over assembled sections, contexts, and variables. Scope-filtered dispatch (`@deepseek-ai/dsh-scope`): scoped listeners receive only that scope's assemblies. The returned text is authoritative; tool declarations remain provider-owned. A supplied signal controls only this explicit assembly request and must not be retained to control later turns. A registered complete section is restored after this waterfall, so listeners cannot add to or replace that scope's system prompt.
221
223
 
222
224
  ```ts cordis-catalog
223
225
  /**
224
- * Expert waterfall over the assembled sections, contexts, tools, and variables.
226
+ * Presentation waterfall over assembled sections, contexts, and variables.
225
227
  * Scope-filtered dispatch (`@deepseek-ai/dsh-scope`): scoped listeners
226
- * receive only that scope's assemblies. The returned value is authoritative.
228
+ * receive only that scope's assemblies. The returned text is authoritative; tool declarations remain provider-owned.
227
229
  * A supplied signal controls only this explicit assembly request and must not
228
230
  * be retained to control later turns. A registered complete section is
229
231
  * restored after this waterfall, so listeners cannot add to or replace
@@ -232,7 +234,7 @@ Expert waterfall over the assembled sections, contexts, tools, and variables. Sc
232
234
  * @param context - the caller's per-assembly context.
233
235
  * @mode waterfall
234
236
  */
235
- 'system-prompt/assemble'(this: Scoped<SystemPrompt>, assembly: PromptAssembly, context: AssembleContext, next: () => Promise<PromptAssembly>): Promise<PromptAssembly>
237
+ 'system-prompt/assemble'(this: Scoped<SystemPrompt>, assembly: PromptPresentation, context: AssembleContext, next: () => Promise<PromptPresentation>): Promise<PromptPresentation>
236
238
  ```
237
239
 
238
240
  Types: [Scoped](./scope.md)
@@ -57,6 +57,44 @@ interface TokenSurfaceNode {
57
57
 
58
58
  Surface order is authoritative; replacement nodes can have higher durable seqs than later positional nodes. The snapshot is immutable and does not grow when the underlying replay fold advances.
59
59
 
60
+ ## `ContextPressureProjection`
61
+
62
+ `ctx.tokenMeter.contextPressure(session)` synchronously reads the latest logged `pressureTokens` and `contextWindow`; the client projection also derives `projectedTokens` from surface changes. These display values do not price a new request; use `measure()` for request pricing.
63
+
64
+ Source: [`packages/llm/token-meter/src/projection.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/llm/token-meter/src/projection.ts)
65
+
66
+ ```ts type-equiv
67
+ /**
68
+ * Approximate context occupancy for a status display.
69
+ *
70
+ * The fields, when present, are deliberately NOT one atomic request
71
+ * observation: each is a last-wins record of a different moment. Switching
72
+ * models can therefore pair a fresh capacity with the previous route's
73
+ * pressure until the next request reports usage. This is an intentional trade
74
+ * — the value is a user-facing reference, not a billing or gating input. See
75
+ * the token-meter README for the full rationale.
76
+ */
77
+ interface ContextPressureProjection {
78
+ /**
79
+ * Provider-reported prompt size of the most recent request: uncached input
80
+ * plus cache reads and writes. Response output is excluded, so this does not
81
+ * grow as the current turn streams. Absent until a provider reports usage.
82
+ */
83
+ pressureTokens?: number
84
+ /**
85
+ * What the NEXT request's prompt would cost: {@link pressureTokens} plus the
86
+ * heuristic repricing of everything the surface gained or lost since that
87
+ * sample. Only the delta is estimated, so the figure stays anchored to the
88
+ * provider while still reacting the moment a compaction shadows a span —
89
+ * which `pressureTokens` alone cannot do, since compaction reports no usage
90
+ * of its own. Absent until a provider reports usage.
91
+ */
92
+ projectedTokens?: number
93
+ /** Newest recorded route capacity; absent when no adapter advertised one. */
94
+ contextWindow?: number
95
+ }
96
+ ```
97
+
60
98
  <!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
61
99
 
62
100
  <a id="cordis-surface"></a>
@@ -72,6 +110,13 @@ Generated from source by `scripts/gen-cordis-catalog.ts` (verified fresh by `pnp
72
110
  Replay owner for one service-wide estimator and isolated per-session folds.
73
111
 
74
112
  ```ts cordis-catalog
113
+ /**
114
+ * Read the latest logged provider prompt size and route capacity.
115
+ * @param session - Session whose committed usage and request capacity are read.
116
+ * @returns context pressure; fields remain absent until their source events are recorded.
117
+ */
118
+ contextPressure(session: Session): Pick<ContextPressureProjection, 'pressureTokens' | 'contextWindow'>
119
+
75
120
  /**
76
121
  * Measure current request pressure and surface through the durable tail.
77
122
  *