dsh-plugin-guide 0.3.21 → 0.3.23

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 (438) hide show
  1. package/README-es.md +15 -12
  2. package/README-hi.md +15 -12
  3. package/README-pt.md +15 -12
  4. package/README-zh.md +15 -12
  5. package/README.md +290 -280
  6. package/SKILL.md +36 -19
  7. package/dist/dsh-plugin-dev.js +113 -9
  8. package/guide/choosing-a-plugin.md +412 -0
  9. package/guide/choosing-a-plugin.zh-CN.md +414 -0
  10. package/guide/links.md +20 -2
  11. package/guide/migration-0.2.md +219 -0
  12. package/guide/plugin-dev-guide.md +99 -24
  13. package/guide/quick-reference.es.md +14 -8
  14. package/guide/quick-reference.hi.md +15 -9
  15. package/guide/quick-reference.md +18 -10
  16. package/guide/quick-reference.pt.md +15 -9
  17. package/guide/quick-reference.zh-CN.md +19 -11
  18. package/guide/release-engineering.md +2 -2
  19. package/guide/release-engineering.zh-CN.md +2 -2
  20. package/guide/unfixed-issues.md +117 -82
  21. package/guide/when-to-retire-a-plugin.md +127 -0
  22. package/guide/when-to-retire-a-plugin.zh-CN.md +127 -0
  23. package/icon.svg +5 -0
  24. package/locale/en.json +6 -0
  25. package/locale/zh.json +6 -0
  26. package/package.json +8 -4
  27. package/references/official-docs/AGENTS.md +8 -5
  28. package/references/official-docs/CONTRIBUTING.i18n.yaml +6 -5
  29. package/references/official-docs/README.i18n.yaml +33 -5
  30. package/references/official-docs/README.zh.md +3 -3
  31. package/references/official-docs/SNAPSHOT.md +3 -3
  32. package/references/official-docs/THIRD_PARTY_NOTICES.md +34 -6
  33. package/references/official-docs/docs/AGENTS.md +4 -4
  34. package/references/official-docs/docs/agent-lifecycle.i18n.yaml +9 -5
  35. package/references/official-docs/docs/api-gateway.i18n.yaml +27 -5
  36. package/references/official-docs/docs/api-gateway.md +10 -9
  37. package/references/official-docs/docs/api-gateway.zh.md +10 -9
  38. package/references/official-docs/docs/architecture.i18n.yaml +36 -5
  39. package/references/official-docs/docs/architecture.md +10 -8
  40. package/references/official-docs/docs/architecture.zh.md +10 -8
  41. package/references/official-docs/docs/capability-seams.i18n.yaml +9 -5
  42. package/references/official-docs/docs/capability-seams.md +76 -32
  43. package/references/official-docs/docs/capability-seams.zh.md +76 -32
  44. package/references/official-docs/docs/config-catalog.i18n.yaml +18 -5
  45. package/references/official-docs/docs/config-catalog.md +1360 -765
  46. package/references/official-docs/docs/config-catalog.zh.md +1363 -767
  47. package/references/official-docs/docs/cookbook/adding-a-package.i18n.yaml +27 -5
  48. package/references/official-docs/docs/cookbook/adding-a-package.md +56 -3
  49. package/references/official-docs/docs/cookbook/adding-a-package.zh.md +54 -3
  50. package/references/official-docs/docs/cookbook/adding-a-remote-api.i18n.yaml +24 -5
  51. package/references/official-docs/docs/cookbook/adding-a-remote-api.md +2 -2
  52. package/references/official-docs/docs/cookbook/adding-a-remote-api.zh.md +2 -2
  53. package/references/official-docs/docs/cookbook/adding-a-session-format-version.i18n.yaml +39 -5
  54. package/references/official-docs/docs/cookbook/adding-a-session-format-version.md +46 -6
  55. package/references/official-docs/docs/cookbook/adding-a-session-format-version.zh.md +46 -6
  56. package/references/official-docs/docs/cookbook/adding-a-settings-card.i18n.yaml +21 -5
  57. package/references/official-docs/docs/cookbook/adding-a-settings-card.md +34 -64
  58. package/references/official-docs/docs/cookbook/adding-a-settings-card.zh.md +34 -64
  59. package/references/official-docs/docs/cookbook/adding-a-tool.i18n.yaml +30 -5
  60. package/references/official-docs/docs/cookbook/adding-a-tool.md +2 -2
  61. package/references/official-docs/docs/cookbook/adding-a-tool.zh.md +2 -2
  62. package/references/official-docs/docs/cookbook/adding-a-vendored-package.i18n.yaml +18 -5
  63. package/references/official-docs/docs/cookbook/adding-an-llm-adapter.i18n.yaml +18 -5
  64. package/references/official-docs/docs/cookbook/extension-cookbook.i18n.yaml +24 -5
  65. package/references/official-docs/docs/cookbook/extension-cookbook.md +3 -3
  66. package/references/official-docs/docs/cookbook/extension-cookbook.zh.md +3 -3
  67. package/references/official-docs/docs/cookbook/maintaining-dsh-code-review.i18n.yaml +21 -5
  68. package/references/official-docs/docs/cookbook/responding-to-pr-review-on-a-stack.i18n.yaml +15 -5
  69. package/references/official-docs/docs/cookbook/reviewing-persistence-type-changes.i18n.yaml +30 -5
  70. package/references/official-docs/docs/cookbook/reviewing-persistence-type-changes.md +13 -1
  71. package/references/official-docs/docs/cookbook/reviewing-persistence-type-changes.zh.md +13 -1
  72. package/references/official-docs/docs/cordis-api/context.i18n.yaml +72 -5
  73. package/references/official-docs/docs/cordis-api/events.i18n.yaml +36 -5
  74. package/references/official-docs/docs/cordis-api/fiber.i18n.yaml +75 -5
  75. package/references/official-docs/docs/cordis-api/inherited.md +15 -13
  76. package/references/official-docs/docs/cordis-api/registry.i18n.yaml +21 -5
  77. package/references/official-docs/docs/cordis-api/service.i18n.yaml +36 -5
  78. package/references/official-docs/docs/cordis-primer.i18n.yaml +21 -5
  79. package/references/official-docs/docs/cordis-tutorial/01-first-plugin.i18n.yaml +21 -5
  80. package/references/official-docs/docs/cordis-tutorial/02-lifecycle-and-effects.i18n.yaml +15 -5
  81. package/references/official-docs/docs/cordis-tutorial/03-services.i18n.yaml +21 -5
  82. package/references/official-docs/docs/cordis-tutorial/04-events.i18n.yaml +15 -5
  83. package/references/official-docs/docs/cordis-tutorial/05-config.i18n.yaml +18 -5
  84. package/references/official-docs/docs/cordis-tutorial/05-config.md +27 -0
  85. package/references/official-docs/docs/cordis-tutorial/05-config.zh.md +27 -0
  86. package/references/official-docs/docs/cordis-tutorial/06-composition-and-hmr.i18n.yaml +15 -5
  87. package/references/official-docs/docs/cordis-tutorial/07-into-the-harness.i18n.yaml +18 -5
  88. package/references/official-docs/docs/cordis-tutorial/index.i18n.yaml +15 -5
  89. package/references/official-docs/docs/deepseek-llm-api-wire-extensions.i18n.yaml +33 -5
  90. package/references/official-docs/docs/deepseek-llm-api-wire-extensions.md +7 -7
  91. package/references/official-docs/docs/deepseek-llm-api-wire-extensions.zh.md +7 -7
  92. package/references/official-docs/docs/defensive-patterns.i18n.yaml +27 -5
  93. package/references/official-docs/docs/dependency-catalog.json +2 -2
  94. package/references/official-docs/docs/development.i18n.yaml +48 -5
  95. package/references/official-docs/docs/development.md +27 -10
  96. package/references/official-docs/docs/development.zh.md +27 -10
  97. package/references/official-docs/docs/event-producer-consumer.i18n.yaml +12 -5
  98. package/references/official-docs/docs/event-producer-consumer.md +78 -66
  99. package/references/official-docs/docs/event-producer-consumer.zh.md +78 -66
  100. package/references/official-docs/docs/glossary.i18n.yaml +24 -5
  101. package/references/official-docs/docs/graph-atlas.i18n.yaml +9 -5
  102. package/references/official-docs/docs/i18n/README.i18n.yaml +18 -5
  103. package/references/official-docs/docs/i18n/README.md +12 -8
  104. package/references/official-docs/docs/i18n/README.zh.md +12 -8
  105. package/references/official-docs/docs/i18n/terminology.md +4 -4
  106. package/references/official-docs/docs/i18n/translation-prompt.md +2 -2
  107. package/references/official-docs/docs/i18n/translation-rules.i18n.yaml +27 -5
  108. package/references/official-docs/docs/module-graph.i18n.yaml +9 -5
  109. package/references/official-docs/docs/module-graph.md +348 -245
  110. package/references/official-docs/docs/module-graph.zh.md +348 -245
  111. package/references/official-docs/docs/persistence-catalog.i18n.yaml +2064 -5
  112. package/references/official-docs/docs/persistence-catalog.md +5275 -3205
  113. package/references/official-docs/docs/persistence-catalog.zh.md +5275 -3205
  114. package/references/official-docs/docs/persistence-changes/2026-09-11-initial.i18n.yaml +27 -5
  115. package/references/official-docs/docs/persistence-changes/2026-09-12-auto-review-error-metadata.i18n.yaml +27 -5
  116. package/references/official-docs/docs/persistence-changes/2026-09-14-image-offload.i18n.yaml +27 -5
  117. package/references/official-docs/docs/persistence-changes/2026-09-14-workspace-changes-event.i18n.yaml +27 -5
  118. package/references/official-docs/docs/persistence-changes/2026-09-16-session-format-v4.i18n.yaml +28 -0
  119. package/references/official-docs/docs/persistence-changes/2026-09-16-session-format-v4.md +120 -0
  120. package/references/official-docs/docs/persistence-changes/2026-09-16-session-format-v4.schema.json +16212 -0
  121. package/references/official-docs/docs/persistence-changes/2026-09-16-session-format-v4.zh.md +120 -0
  122. package/references/official-docs/docs/persistence-changes/2026-09-18-schedule-optional-title.i18n.yaml +28 -0
  123. package/references/official-docs/docs/persistence-changes/2026-09-18-schedule-optional-title.md +48 -0
  124. package/references/official-docs/docs/persistence-changes/2026-09-18-schedule-optional-title.schema.json +302 -0
  125. package/references/official-docs/docs/persistence-changes/2026-09-18-schedule-optional-title.zh.md +48 -0
  126. package/references/official-docs/docs/persistence-changes/2026-09-20-unknown-child-catalog.i18n.yaml +28 -0
  127. package/references/official-docs/docs/persistence-changes/2026-09-20-unknown-child-catalog.md +48 -0
  128. package/references/official-docs/docs/persistence-changes/2026-09-20-unknown-child-catalog.schema.json +250 -0
  129. package/references/official-docs/docs/persistence-changes/2026-09-20-unknown-child-catalog.zh.md +48 -0
  130. package/references/official-docs/docs/persistence-changes/2026-09-21-user-question-reply.i18n.yaml +28 -0
  131. package/references/official-docs/docs/persistence-changes/2026-09-21-user-question-reply.md +60 -0
  132. package/references/official-docs/docs/persistence-changes/2026-09-21-user-question-reply.schema.json +11405 -0
  133. package/references/official-docs/docs/persistence-changes/2026-09-21-user-question-reply.zh.md +60 -0
  134. package/references/official-docs/docs/persistence-changes/README.i18n.yaml +27 -5
  135. package/references/official-docs/docs/persistence-changes/README.md +17 -3
  136. package/references/official-docs/docs/persistence-changes/README.zh.md +17 -3
  137. package/references/official-docs/docs/persistence-changes/finalized/v4.json +379 -0
  138. package/references/official-docs/docs/persistence-changes/historical-formats/README.i18n.yaml +27 -5
  139. package/references/official-docs/docs/persistence-changes/historical-formats/README.md +3 -2
  140. package/references/official-docs/docs/persistence-changes/historical-formats/README.zh.md +3 -2
  141. package/references/official-docs/docs/persistence-changes/historical-formats/v0.i18n.yaml +1284 -5
  142. package/references/official-docs/docs/persistence-changes/historical-formats/v1.i18n.yaml +1284 -5
  143. package/references/official-docs/docs/persistence-changes/historical-formats/v2.i18n.yaml +1344 -5
  144. package/references/official-docs/docs/persistence-changes/historical-formats/v3.i18n.yaml +1441 -0
  145. package/references/official-docs/docs/persistence-changes/historical-formats/v3.md +5634 -0
  146. package/references/official-docs/docs/persistence-changes/historical-formats/v3.schema.json +61307 -0
  147. package/references/official-docs/docs/persistence-changes/historical-formats/v3.zh.md +5634 -0
  148. package/references/official-docs/docs/persistence-changes/releases/README.i18n.yaml +30 -5
  149. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.1.i18n.yaml +30 -5
  150. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.2.i18n.yaml +30 -5
  151. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.3.i18n.yaml +30 -5
  152. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.4.i18n.yaml +30 -5
  153. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.5.i18n.yaml +30 -5
  154. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.1.i18n.yaml +30 -5
  155. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.2.i18n.yaml +30 -5
  156. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.3.i18n.yaml +30 -5
  157. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.5.i18n.yaml +30 -5
  158. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.6.i18n.yaml +30 -5
  159. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.7.i18n.yaml +30 -5
  160. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.8.i18n.yaml +30 -5
  161. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.1.i18n.yaml +30 -5
  162. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.2.i18n.yaml +30 -5
  163. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.1.i18n.yaml +30 -5
  164. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.2.i18n.yaml +30 -5
  165. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.3.i18n.yaml +30 -5
  166. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.4.i18n.yaml +30 -5
  167. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.5.i18n.yaml +30 -5
  168. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-rc.1.i18n.yaml +30 -5
  169. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.1.i18n.yaml +30 -5
  170. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.2.i18n.yaml +30 -5
  171. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.1.i18n.yaml +30 -5
  172. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.2.i18n.yaml +30 -5
  173. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.2.schema.json +3 -3
  174. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-rc.1.i18n.yaml +30 -5
  175. package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-rc.2.i18n.yaml +30 -5
  176. package/references/official-docs/docs/persistence-schema.json +12692 -48753
  177. package/references/official-docs/docs/postmortem/0001-acp-default-export-drops-inject.i18n.yaml +33 -5
  178. package/references/official-docs/docs/postmortem/0002-js-expression-disabled-filesystem-tools.i18n.yaml +27 -5
  179. package/references/official-docs/docs/postmortem/0003-web-agent-gui-feedback-loop.i18n.yaml +27 -5
  180. package/references/official-docs/docs/postmortem/0004-landlock-partial-notice-misclassified-child-failures.i18n.yaml +27 -5
  181. package/references/official-docs/docs/postmortem/README.i18n.yaml +6 -5
  182. package/references/official-docs/docs/rescope.i18n.yaml +18 -5
  183. package/references/official-docs/docs/rescope.md +1 -1
  184. package/references/official-docs/docs/rescope.zh.md +1 -1
  185. package/references/official-docs/docs/session-format-status.i18n.yaml +27 -5
  186. package/references/official-docs/docs/session-format-status.md +17 -3
  187. package/references/official-docs/docs/session-format-status.zh.md +17 -3
  188. package/references/official-docs/docs/subsystems/README.i18n.yaml +6 -5
  189. package/references/official-docs/docs/subsystems/README.md +6 -3
  190. package/references/official-docs/docs/subsystems/README.zh.md +6 -3
  191. package/references/official-docs/docs/subsystems/agent-team.i18n.yaml +21 -5
  192. package/references/official-docs/docs/subsystems/agent-team.md +52 -28
  193. package/references/official-docs/docs/subsystems/agent-team.zh.md +52 -28
  194. package/references/official-docs/docs/subsystems/approval.i18n.yaml +18 -5
  195. package/references/official-docs/docs/subsystems/approval.md +1 -1
  196. package/references/official-docs/docs/subsystems/approval.zh.md +1 -1
  197. package/references/official-docs/docs/subsystems/attachment.i18n.yaml +12 -5
  198. package/references/official-docs/docs/subsystems/attachment.md +2 -2
  199. package/references/official-docs/docs/subsystems/attachment.zh.md +2 -2
  200. package/references/official-docs/docs/subsystems/boot.i18n.yaml +9 -5
  201. package/references/official-docs/docs/subsystems/boot.md +117 -17
  202. package/references/official-docs/docs/subsystems/boot.zh.md +117 -17
  203. package/references/official-docs/docs/subsystems/browser-use.i18n.yaml +18 -5
  204. package/references/official-docs/docs/subsystems/claude-code-mods.i18n.yaml +28 -0
  205. package/references/official-docs/docs/subsystems/claude-code-mods.md +146 -0
  206. package/references/official-docs/docs/subsystems/claude-code-mods.zh.md +146 -0
  207. package/references/official-docs/docs/subsystems/client-modules.i18n.yaml +18 -5
  208. package/references/official-docs/docs/subsystems/client-modules.md +13 -7
  209. package/references/official-docs/docs/subsystems/client-modules.zh.md +13 -7
  210. package/references/official-docs/docs/subsystems/client-resources.i18n.yaml +21 -5
  211. package/references/official-docs/docs/subsystems/commands.i18n.yaml +18 -5
  212. package/references/official-docs/docs/subsystems/commands.md +1 -1
  213. package/references/official-docs/docs/subsystems/commands.zh.md +1 -1
  214. package/references/official-docs/docs/subsystems/compaction.i18n.yaml +21 -5
  215. package/references/official-docs/docs/subsystems/compaction.md +2 -2
  216. package/references/official-docs/docs/subsystems/compaction.zh.md +2 -2
  217. package/references/official-docs/docs/subsystems/computer-use.i18n.yaml +15 -5
  218. package/references/official-docs/docs/subsystems/conversation.i18n.yaml +30 -5
  219. package/references/official-docs/docs/subsystems/conversation.md +35 -6
  220. package/references/official-docs/docs/subsystems/conversation.zh.md +34 -5
  221. package/references/official-docs/docs/subsystems/core.i18n.yaml +36 -5
  222. package/references/official-docs/docs/subsystems/core.md +70 -214
  223. package/references/official-docs/docs/subsystems/core.zh.md +70 -214
  224. package/references/official-docs/docs/subsystems/credentials.i18n.yaml +24 -5
  225. package/references/official-docs/docs/subsystems/credentials.md +168 -5
  226. package/references/official-docs/docs/subsystems/credentials.zh.md +168 -5
  227. package/references/official-docs/docs/subsystems/deliverables.i18n.yaml +27 -5
  228. package/references/official-docs/docs/subsystems/extensions.i18n.yaml +6 -5
  229. package/references/official-docs/docs/subsystems/extensions.md +6 -4
  230. package/references/official-docs/docs/subsystems/extensions.zh.md +6 -4
  231. package/references/official-docs/docs/subsystems/feedback.i18n.yaml +27 -5
  232. package/references/official-docs/docs/subsystems/filesystem.i18n.yaml +33 -5
  233. package/references/official-docs/docs/subsystems/filesystem.md +10 -0
  234. package/references/official-docs/docs/subsystems/filesystem.zh.md +10 -0
  235. package/references/official-docs/docs/subsystems/goal.i18n.yaml +18 -5
  236. package/references/official-docs/docs/subsystems/goal.md +1 -1
  237. package/references/official-docs/docs/subsystems/goal.zh.md +1 -1
  238. package/references/official-docs/docs/subsystems/jobs.i18n.yaml +24 -5
  239. package/references/official-docs/docs/subsystems/jobs.md +335 -126
  240. package/references/official-docs/docs/subsystems/jobs.zh.md +335 -126
  241. package/references/official-docs/docs/subsystems/llm-streaming.i18n.yaml +48 -5
  242. package/references/official-docs/docs/subsystems/llm-streaming.md +60 -31
  243. package/references/official-docs/docs/subsystems/llm-streaming.zh.md +60 -31
  244. package/references/official-docs/docs/subsystems/lsp.i18n.yaml +18 -5
  245. package/references/official-docs/docs/subsystems/mcp.i18n.yaml +33 -5
  246. package/references/official-docs/docs/subsystems/mcp.md +2 -2
  247. package/references/official-docs/docs/subsystems/mcp.zh.md +2 -2
  248. package/references/official-docs/docs/subsystems/office-to-pdf.i18n.yaml +18 -5
  249. package/references/official-docs/docs/subsystems/office-to-pdf.md +4 -4
  250. package/references/official-docs/docs/subsystems/office-to-pdf.zh.md +4 -4
  251. package/references/official-docs/docs/subsystems/otel.i18n.yaml +7 -0
  252. package/references/official-docs/docs/subsystems/otel.md +44 -0
  253. package/references/official-docs/docs/subsystems/otel.zh.md +44 -0
  254. package/references/official-docs/docs/subsystems/permission-presets.i18n.yaml +18 -5
  255. package/references/official-docs/docs/subsystems/permission-presets.md +7 -6
  256. package/references/official-docs/docs/subsystems/permission-presets.zh.md +7 -6
  257. package/references/official-docs/docs/subsystems/persistence.i18n.yaml +36 -5
  258. package/references/official-docs/docs/subsystems/persistence.md +3 -3
  259. package/references/official-docs/docs/subsystems/persistence.zh.md +3 -3
  260. package/references/official-docs/docs/subsystems/plan.i18n.yaml +21 -5
  261. package/references/official-docs/docs/subsystems/plan.md +1 -1
  262. package/references/official-docs/docs/subsystems/plan.zh.md +1 -1
  263. package/references/official-docs/docs/subsystems/product-telemetry.i18n.yaml +10 -0
  264. package/references/official-docs/docs/subsystems/product-telemetry.md +79 -0
  265. package/references/official-docs/docs/subsystems/product-telemetry.zh.md +79 -0
  266. package/references/official-docs/docs/subsystems/ptc-runtime.i18n.yaml +18 -5
  267. package/references/official-docs/docs/subsystems/sandbox.i18n.yaml +18 -5
  268. package/references/official-docs/docs/subsystems/sandbox.md +1 -1
  269. package/references/official-docs/docs/subsystems/sandbox.zh.md +1 -1
  270. package/references/official-docs/docs/subsystems/schedule.i18n.yaml +39 -5
  271. package/references/official-docs/docs/subsystems/schedule.md +391 -33
  272. package/references/official-docs/docs/subsystems/schedule.zh.md +391 -33
  273. package/references/official-docs/docs/subsystems/scope.i18n.yaml +15 -5
  274. package/references/official-docs/docs/subsystems/scope.md +1 -1
  275. package/references/official-docs/docs/subsystems/scope.zh.md +1 -1
  276. package/references/official-docs/docs/subsystems/session-projection.i18n.yaml +15 -5
  277. package/references/official-docs/docs/subsystems/session-projection.md +20 -18
  278. package/references/official-docs/docs/subsystems/session-projection.zh.md +20 -18
  279. package/references/official-docs/docs/subsystems/session-query.i18n.yaml +27 -5
  280. package/references/official-docs/docs/subsystems/session-reference.i18n.yaml +18 -5
  281. package/references/official-docs/docs/subsystems/session-telemetry.i18n.yaml +21 -5
  282. package/references/official-docs/docs/subsystems/session-telemetry.md +6 -4
  283. package/references/official-docs/docs/subsystems/session-telemetry.zh.md +6 -4
  284. package/references/official-docs/docs/subsystems/session-title.i18n.yaml +15 -5
  285. package/references/official-docs/docs/subsystems/session.i18n.yaml +66 -5
  286. package/references/official-docs/docs/subsystems/session.md +113 -62
  287. package/references/official-docs/docs/subsystems/session.zh.md +113 -62
  288. package/references/official-docs/docs/subsystems/settings.i18n.yaml +12 -5
  289. package/references/official-docs/docs/subsystems/settings.md +42 -292
  290. package/references/official-docs/docs/subsystems/settings.zh.md +42 -292
  291. package/references/official-docs/docs/subsystems/shell.i18n.yaml +24 -5
  292. package/references/official-docs/docs/subsystems/shell.md +29 -22
  293. package/references/official-docs/docs/subsystems/shell.zh.md +29 -22
  294. package/references/official-docs/docs/subsystems/sidebar-right.i18n.yaml +36 -5
  295. package/references/official-docs/docs/subsystems/sidebar-right.md +14 -9
  296. package/references/official-docs/docs/subsystems/sidebar-right.zh.md +14 -9
  297. package/references/official-docs/docs/subsystems/skills.i18n.yaml +27 -5
  298. package/references/official-docs/docs/subsystems/skills.md +2 -2
  299. package/references/official-docs/docs/subsystems/skills.zh.md +2 -2
  300. package/references/official-docs/docs/subsystems/slots.i18n.yaml +27 -5
  301. package/references/official-docs/docs/subsystems/slots.md +21 -7
  302. package/references/official-docs/docs/subsystems/slots.zh.md +21 -7
  303. package/references/official-docs/docs/subsystems/spill.i18n.yaml +15 -5
  304. package/references/official-docs/docs/subsystems/spill.md +1 -1
  305. package/references/official-docs/docs/subsystems/spill.zh.md +1 -1
  306. package/references/official-docs/docs/subsystems/ssh.i18n.yaml +21 -5
  307. package/references/official-docs/docs/subsystems/storage.i18n.yaml +24 -5
  308. package/references/official-docs/docs/subsystems/storage.md +1 -2
  309. package/references/official-docs/docs/subsystems/storage.zh.md +1 -2
  310. package/references/official-docs/docs/subsystems/subagent.i18n.yaml +30 -5
  311. package/references/official-docs/docs/subsystems/subagent.md +35 -60
  312. package/references/official-docs/docs/subsystems/subagent.zh.md +35 -60
  313. package/references/official-docs/docs/subsystems/subprocess.i18n.yaml +30 -5
  314. package/references/official-docs/docs/subsystems/system-prompt.i18n.yaml +18 -5
  315. package/references/official-docs/docs/subsystems/terminal.i18n.yaml +18 -5
  316. package/references/official-docs/docs/subsystems/todo.i18n.yaml +12 -5
  317. package/references/official-docs/docs/subsystems/todo.md +3 -3
  318. package/references/official-docs/docs/subsystems/todo.zh.md +3 -3
  319. package/references/official-docs/docs/subsystems/token-meter.i18n.yaml +12 -5
  320. package/references/official-docs/docs/subsystems/tools.i18n.yaml +24 -5
  321. package/references/official-docs/docs/subsystems/tools.md +15 -4
  322. package/references/official-docs/docs/subsystems/tools.zh.md +15 -4
  323. package/references/official-docs/docs/subsystems/typert.i18n.yaml +21 -5
  324. package/references/official-docs/docs/subsystems/typert.md +147 -6
  325. package/references/official-docs/docs/subsystems/typert.zh.md +147 -6
  326. package/references/official-docs/docs/subsystems/user-questions.i18n.yaml +27 -5
  327. package/references/official-docs/docs/subsystems/user-questions.md +128 -1
  328. package/references/official-docs/docs/subsystems/user-questions.zh.md +129 -2
  329. package/references/official-docs/docs/subsystems/voice-input.i18n.yaml +19 -0
  330. package/references/official-docs/docs/subsystems/voice-input.md +164 -0
  331. package/references/official-docs/docs/subsystems/voice-input.zh.md +164 -0
  332. package/references/official-docs/docs/subsystems/web-client.i18n.yaml +36 -5
  333. package/references/official-docs/docs/subsystems/web-client.md +10 -5
  334. package/references/official-docs/docs/subsystems/web-client.zh.md +10 -5
  335. package/references/official-docs/docs/subsystems/web-server.i18n.yaml +15 -5
  336. package/references/official-docs/docs/subsystems/web-server.md +12 -4
  337. package/references/official-docs/docs/subsystems/web-server.zh.md +12 -4
  338. package/references/official-docs/docs/subsystems/web.i18n.yaml +27 -5
  339. package/references/official-docs/docs/subsystems/webhook.i18n.yaml +18 -5
  340. package/references/official-docs/docs/subsystems/webhook.md +1 -1
  341. package/references/official-docs/docs/subsystems/webhook.zh.md +1 -1
  342. package/references/official-docs/docs/subsystems/workflow.i18n.yaml +27 -5
  343. package/references/official-docs/docs/subsystems/workflow.md +2 -2
  344. package/references/official-docs/docs/subsystems/workflow.zh.md +2 -2
  345. package/references/official-docs/docs/subsystems/workspace.i18n.yaml +27 -5
  346. package/references/official-docs/docs/subsystems/workspace.md +175 -35
  347. package/references/official-docs/docs/subsystems/workspace.zh.md +175 -35
  348. package/references/official-docs/docs/testing.i18n.yaml +33 -5
  349. package/references/official-docs/docs/testing.md +2 -2
  350. package/references/official-docs/docs/testing.zh.md +2 -2
  351. package/references/official-docs/docs/tool-catalog.i18n.yaml +312 -5
  352. package/references/official-docs/docs/tool-catalog.md +321 -92
  353. package/references/official-docs/docs/tool-catalog.zh.md +321 -92
  354. package/references/official-docs/docs/tool-execution-pipeline.i18n.yaml +9 -5
  355. package/references/official-docs/docs/tool-execution-pipeline.md +6 -3
  356. package/references/official-docs/docs/tool-execution-pipeline.zh.md +6 -3
  357. package/references/official-docs/docs/ui-radius.i18n.yaml +31 -0
  358. package/references/official-docs/docs/ui-radius.md +115 -0
  359. package/references/official-docs/docs/ui-radius.zh.md +115 -0
  360. package/references/official-docs/docs/upgrade-guide/v0.1.7-rc.2/schedule-optional-bundle/guide.i18n.yaml +16 -0
  361. package/references/official-docs/docs/upgrade-guide/v0.1.7-rc.2/schedule-optional-bundle/guide.md +22 -0
  362. package/references/official-docs/docs/upgrade-guide/v0.1.7-rc.2/schedule-optional-bundle/guide.zh.md +22 -0
  363. package/references/official-docs/docs/upgrade-guide/v0.1.7-rc.2/transcript-view-legacy-normal/guide.i18n.yaml +16 -0
  364. package/references/official-docs/docs/upgrade-guide/v0.1.7-rc.2/transcript-view-legacy-normal/guide.md +25 -0
  365. package/references/official-docs/docs/upgrade-guide/v0.1.7-rc.2/transcript-view-legacy-normal/guide.zh.md +25 -0
  366. package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/account-sign-in-errors/guide.i18n.yaml +16 -0
  367. package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/account-sign-in-errors/guide.md +18 -0
  368. package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/account-sign-in-errors/guide.zh.md +18 -0
  369. package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/remove-runtime-invariants/guide.i18n.yaml +16 -0
  370. package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/remove-runtime-invariants/guide.md +23 -0
  371. package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/remove-runtime-invariants/guide.zh.md +23 -0
  372. package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/schedule-bundle-retired/guide.i18n.yaml +16 -0
  373. package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/schedule-bundle-retired/guide.md +22 -0
  374. package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/schedule-bundle-retired/guide.zh.md +22 -0
  375. package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/subpath-plugin-display-manifest/guide.i18n.yaml +16 -0
  376. package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/subpath-plugin-display-manifest/guide.md +27 -0
  377. package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/subpath-plugin-display-manifest/guide.zh.md +27 -0
  378. package/references/official-docs/docs/user/develop/basic/config.i18n.yaml +27 -5
  379. package/references/official-docs/docs/user/develop/basic/index.i18n.yaml +36 -5
  380. package/references/official-docs/docs/user/develop/basic/publish.i18n.yaml +30 -5
  381. package/references/official-docs/docs/user/develop/basic/publish.md +7 -1
  382. package/references/official-docs/docs/user/develop/basic/publish.zh.md +7 -1
  383. package/references/official-docs/docs/user/develop/basic/tool.i18n.yaml +15 -5
  384. package/references/official-docs/docs/user/develop/framework/events.i18n.yaml +45 -5
  385. package/references/official-docs/docs/user/develop/framework/index.i18n.yaml +30 -5
  386. package/references/official-docs/docs/user/develop/framework/service.i18n.yaml +39 -5
  387. package/references/official-docs/docs/user/develop/practice/dynamic-cordis.i18n.yaml +9 -5
  388. package/references/official-docs/docs/user/develop/practice/index.i18n.yaml +45 -5
  389. package/references/official-docs/docs/user/develop/practice/llm-adapter.i18n.yaml +33 -5
  390. package/references/official-docs/docs/user/develop/practice/llm-adapter.md +1 -1
  391. package/references/official-docs/docs/user/develop/practice/llm-adapter.zh.md +1 -1
  392. package/references/official-docs/docs/user/guide/github-review.i18n.yaml +24 -5
  393. package/references/official-docs/docs/user/guide/index.i18n.yaml +18 -5
  394. package/references/official-docs/docs/user/guide/index.md +1 -0
  395. package/references/official-docs/docs/user/guide/index.zh.md +1 -0
  396. package/references/official-docs/docs/user/guide/mcp-memory.i18n.yaml +36 -5
  397. package/references/official-docs/docs/user/guide/network-proxy.i18n.yaml +24 -5
  398. package/references/official-docs/docs/user/guide/providers-custom-form.png +0 -0
  399. package/references/official-docs/docs/user/guide/providers-custom-form.zh.png +0 -0
  400. package/references/official-docs/docs/user/guide/providers-models-page.png +0 -0
  401. package/references/official-docs/docs/user/guide/providers-models-page.zh.png +0 -0
  402. package/references/official-docs/docs/user/guide/providers.i18n.yaml +36 -5
  403. package/references/official-docs/docs/user/guide/providers.md +88 -78
  404. package/references/official-docs/docs/user/guide/providers.zh.md +102 -92
  405. package/references/official-docs/docs/user/guide/public-deployments.i18n.yaml +19 -0
  406. package/references/official-docs/docs/user/guide/public-deployments.md +33 -0
  407. package/references/official-docs/docs/user/guide/public-deployments.zh.md +33 -0
  408. package/references/official-docs/docs/user/guide/python-sdk.i18n.yaml +27 -5
  409. package/references/official-docs/docs/user/guide/python-sdk.md +1 -1
  410. package/references/official-docs/docs/user/guide/python-sdk.zh.md +1 -1
  411. package/references/official-docs/docs/user/guide/schedule.i18n.yaml +30 -5
  412. package/references/official-docs/docs/user/guide/schedule.md +69 -11
  413. package/references/official-docs/docs/user/guide/schedule.zh.md +69 -11
  414. package/references/official-docs/docs/user/index.i18n.yaml +9 -5
  415. package/references/official-docs/docs/web-styling.i18n.yaml +18 -5
  416. package/references/official-docs/docs/web-styling.md +12 -3
  417. package/references/official-docs/docs/web-styling.zh.md +12 -3
  418. package/references/official-docs/packages/AGENTS.md +1 -2
  419. package/references/official-docs/packages/README.md +5 -5
  420. package/references/official-docs/vendor/README.md +6 -2
  421. package/references/official-docs/website-docs.ts +10 -3
  422. package/references/official-plugin-dev-skill.md +124 -0
  423. package/references/sources.md +10 -5
  424. package/scripts/archive-discussions.ps1 +9 -1
  425. package/scripts/build-llms-full.mjs +64 -0
  426. package/scripts/check-docs-drift.ps1 +1 -1
  427. package/scripts/sync-official-docs.ps1 +1 -1
  428. package/templates/js/icon.svg +4 -0
  429. package/templates/js/locale/en.json +6 -0
  430. package/templates/js/locale/zh.json +6 -0
  431. package/templates/js/package.json +9 -1
  432. package/templates/ts/icon.svg +4 -0
  433. package/templates/ts/locale/en.json +6 -0
  434. package/templates/ts/locale/zh.json +6 -0
  435. package/templates/ts/package.json +9 -1
  436. package/references/official-docs/docs/subsystems/invariants.i18n.yaml +0 -6
  437. package/references/official-docs/docs/subsystems/invariants.md +0 -88
  438. package/references/official-docs/docs/subsystems/invariants.zh.md +0 -88
@@ -2,7 +2,7 @@
2
2
 
3
3
  [English](jobs.md) | 中文
4
4
 
5
- 长时间运行的生产方、`ctx.jobs` 与任务控制命令共用的类型。[运行时 Agent Note](../../.agents/notes/implemented/architecture/2026-06-20-generic-long-running-tool-runtime.zh.md) 负责设计;本页记录 [`packages/jobs/jobs/src/types.ts`](../../packages/jobs/jobs/src/types.ts) 中的确切字段和变体。
5
+ 长时间运行的生产方、`ctx.jobs` 与任务控制命令共用的类型。[seam 收敛 Agent Note](../../.agents/notes/implemented/architecture/2026-09-03-jobs-seam-consolidation.zh.md) 负责当前设计,[运行时 reference](../../packages/jobs/jobs/README.zh.md) 记录其起源;本页记录 [`packages/jobs/jobs/src/types.ts`](../../packages/jobs/jobs/src/types.ts) 与客户端安全叶子 [`view.ts`](../../packages/jobs/jobs/src/view.ts) 中的确切字段与变体。
6
6
 
7
7
  ## ID 与状态
8
8
 
@@ -19,45 +19,83 @@ interface JobKindMap {
19
19
  }
20
20
  ```
21
21
 
22
- `JobStatus` 为 `'running' | 'stopping' | 'completed' | 'killed' | 'failed'`;生产方特有的事实归入 `JobSnapshot.detail`。
22
+ `JobStatus` 为 `'running' | 'stopping' | 'completed' | 'killed' | 'failed'`;生产方特有的事实在运行期间归入 `JobView.progress`,结算后归入 `JobView.detail`。
23
23
 
24
24
  ## 生产方约定
25
25
 
26
- `JobStart` 声明身份和启动器。运行时会在调用 `run()` 前完成预检,随后提交注册,不再执行可能失败的步骤。生产方拥有执行资源;运行时拥有身份、访问权限和生命周期状态。
26
+ `JobSpec` 声明身份、拥有者会话、可选的拉取式 `output` 源与启动器。运行时会在完成预检后携带该 job 的 `JobHandle` 调用 `run()`,随后提交注册,不再执行可能失败的步骤。生产方拥有执行资源;运行时拥有身份、访问、生命周期状态与输出环。
27
27
 
28
28
  ```ts type-equiv
29
29
  /**
30
30
  * Producer declaration passed to {@link JobRegistry.start}. The runtime
31
31
  * preflights access and cleanup before invoking {@link run}; the producer owns
32
- * execution resources while the runtime owns identity and lifecycle state.
32
+ * execution resources while the runtime owns identity, lifecycle state, and
33
+ * the output ring.
33
34
  */
34
- interface JobStart {
35
+ interface JobSpec {
35
36
  /** Producer kind — also the id prefix (`bash`, `subagent`, …). */
36
37
  kind: JobKind
37
38
  /** One-line model-facing label (the command; the delegation description). */
38
39
  label: string
40
+ /**
41
+ * Owning session. Access is fenced by it, and the owner's live Agent must be
42
+ * the one currently registered under that id: its disposal cancels and
43
+ * awaits the job. Omitting the owner creates an unowned job, open to any
44
+ * caller until service disposal.
45
+ */
46
+ owner?: SessionId
39
47
  /**
40
48
  * Optional UTF-8 byte cap for each complete model-facing completion notice or
41
- * output read, including controller status metadata.
49
+ * output read, including controller status metadata. Independent of ring
50
+ * retention: it bounds the consuming model surface, never observers.
42
51
  */
43
52
  outputLimitBytes?: number
44
53
  /**
45
- * Owning live agent. Access is fenced by its session id, and agent disposal
46
- * cancels and awaits the job. The instance must be the one currently
47
- * registered under its agent id. Omitting the owner creates an unowned job,
48
- * open to any caller until service disposal.
54
+ * Pull sources the registry pumps into the ring at its own cadence.
55
+ * Producers that narrate their own progress use {@link JobHandle.append}
56
+ * instead; a job may use both.
49
57
  */
50
- owner?: Agent
58
+ output?: readonly JobOutputSource[]
51
59
  /**
52
60
  * Start the work after preflight and synchronously return its hooks. Called
53
- * once; a throw leaves nothing registered, and the producer must clean up any
54
- * partially started resources.
61
+ * once with the job's producer face; a throw leaves nothing registered (the
62
+ * spent ordinal is skipped), and the producer must clean up any partially
63
+ * started resources.
64
+ * @param job - the issued id plus the ring append and progress writers.
65
+ */
66
+ run(job: JobHandle): JobHooks
67
+ }
68
+ ```
69
+
70
+ ```ts type-equiv
71
+ /**
72
+ * Producer face of one registered job, handed to {@link JobSpec.run} and
73
+ * valid for the job's whole life. All methods are synchronous. Writes staged
74
+ * inside the starter call are retained and become visible with the
75
+ * registration commit; after settlement — the producer's own outcome, a kill,
76
+ * or a registry-forced teardown end — writes log and drop instead of
77
+ * throwing, so a producer's trailing flush cannot break its own teardown path.
78
+ */
79
+ interface JobHandle {
80
+ /** The registry-issued id (`<kind>-N`). */
81
+ readonly id: JobId
82
+ /**
83
+ * Append one chunk to the output ring. Offsets advance by the chunk's UTF-8
84
+ * byte length; an empty chunk is dropped without waking observers.
85
+ * @param text - the chunk text, exactly as produced.
86
+ * @param options - stream label and gap marker.
87
+ */
88
+ append(text: string, options?: JobAppendOptions): void
89
+ /**
90
+ * Replace the live progress line (`3/10`, the current phase). Settlement
91
+ * clears it; the terminal reason travels in {@link JobOutcome.detail}.
92
+ * @param line - the new progress line.
55
93
  */
56
- run(): JobHooks
94
+ updateProgress(line: string): void
57
95
  }
58
96
  ```
59
97
 
60
- `JobHooks.done` 会在生产方释放其资源后 resolve,而不是仅在工作完成时 resolve。可选的 `readOutput` 用来区分会消费输出的流式任务和仅有最终输出的任务。
98
+ `JobHooks.done` 会在生产方释放其资源后 resolve,而不是仅在工作完成时 resolve。结果是一个值而非流的 job——subagent 的报告、workflow 渲染出的结果——把它作为 `JobOutcome.result` 返回;模型在结算后的第一次读取携带它一次。
61
99
 
62
100
  ```ts type-equiv
63
101
  /** Hooks through which the runtime controls and observes producer work. */
@@ -74,12 +112,6 @@ interface JobHooks {
74
112
  * registry record without claiming that the work stopped.
75
113
  */
76
114
  done: Promise<JobOutcome>
77
- /**
78
- * Consume output produced since the previous call. The producer formats
79
- * truncation and spill notices. Absence marks a final-output-only job; each
80
- * job has one consuming cursor.
81
- */
82
- readOutput?(): string
83
115
  }
84
116
  ```
85
117
 
@@ -88,73 +120,215 @@ interface JobHooks {
88
120
  interface JobOutcome {
89
121
  /** How the job ended: finished (`completed`), cancelled (`killed`), or broke (`failed`). */
90
122
  status: 'completed' | 'killed' | 'failed'
91
- /** Kind-specific detail rendered into status lines ('exit code: 3', 'max-tokens'). */
123
+ /**
124
+ * Terminal reason rendered into status lines (`exit code: 3`, `max-tokens`).
125
+ * When the job settles `killed` after a {@link JobRegistry.kill} with a
126
+ * reason, the registry appends that reason.
127
+ */
92
128
  detail?: string
93
- /** Final output for jobs without `readOutput`; stream jobs leave it unset. */
94
- output?: string
129
+ /**
130
+ * Return value for jobs whose result is a value rather than a stream (a
131
+ * workflow's rendered result, a subagent's report). The output ring carries
132
+ * the stream; this is handed out once by the model's next {@link JobRegistry.read}.
133
+ */
134
+ result?: string
135
+ }
136
+ ```
137
+
138
+ 拉取源把一个非消耗的偏移读取器——子进程的 `readFrom` 家族——交给注册表。注册表按自己的节奏(`dsh-jobs-local` 的 `pumpPollMs`)泵送每个源,并在结算封环之前再排干一次,因此生产方不需要把任何东西折进 `done`。
139
+
140
+ ```ts type-equiv
141
+ /**
142
+ * A pull source the registry pumps into the job's output ring — the subprocess
143
+ * `readFrom` family. The registry owns the cadence and drains every source one
144
+ * last time before settlement closes the ring, so a producer folds nothing
145
+ * into its `done`.
146
+ */
147
+ interface JobOutputSource {
148
+ /** Stream label attached to every chunk this source yields. */
149
+ channel?: JobChannel
150
+ /**
151
+ * Read everything captured since `fromByte` without consuming it.
152
+ * @param fromByte - whole-stream offset to resume from (a prior read's `nextOffset`; 0 first).
153
+ * @returns the delta text, the next offset, the lossy flag, and the spill path the source currently keeps.
154
+ */
155
+ read(fromByte: number): JobSourceRead
156
+ }
157
+ ```
158
+
159
+ ```ts type-equiv
160
+ /** One incremental read from a {@link JobOutputSource}. */
161
+ interface JobSourceRead {
162
+ /** Text captured since the requested offset (the whole retained tail when lossy). */
163
+ text: string
164
+ /** Whole-stream offset to resume from on the next read. */
165
+ nextOffset: number
166
+ /** True when the requested offset slid out of the source's retained window. */
167
+ lossy: boolean
168
+ /**
169
+ * Host path of a file holding the complete stream, when the source
170
+ * currently keeps an intact one. Reported on every read, so the registry
171
+ * tracks it as source metadata: a later read without it withdraws the file.
172
+ */
173
+ spillPath?: string
174
+ }
175
+ ```
176
+
177
+ ## 输出环
178
+
179
+ 每个 job 拥有一个有界的环。拉取源被泵入其中,`JobHandle.append` 的推送整块落地;模型通过注册表保管的游标(`JobRegistry.read`)消耗该环,任意数量的观察者按绝对字节偏移读取它(`JobRegistry.readAt`),二者互不干扰。`JobChannel` 标记 `stdout`、`stderr` 与 `log`;`log` 是只到达观察者、从不进入模型消耗式读取的生产方叙述。结算即封流并把保留量裁剪到结算上限——环没有独立的生命周期。拉取源保留的 spill 文件是 job 元数据(`JobView.output.spillPaths`,每次泵读取都会刷新),不是逐块元数据,所以环淘汰了字节之后、甚至缺口 chunk 本身也被淘汰之后,模型的丢失输出提示仍能点名该文件。浏览器通过 [`dsh-api-job-controller`](../../packages/api/job-controller/README.zh.md) 的 Remote 流 `job.list` 与 `job.follow` 触达名册与环,其帧列于下文的 Cordis API 一节。
180
+
181
+ ```ts type-equiv
182
+ /** One chunk of a job's output ring: absolute offset, text, channel, and loss marker. */
183
+ interface JobChunk {
184
+ /** Absolute offset of the chunk's first byte; offsets never move once assigned. */
185
+ readonly at: number
186
+ /** Chunk text exactly as appended (possibly tail-trimmed by retention). */
187
+ readonly text: string
188
+ /** Stream label, when the producer supplied one. */
189
+ readonly channel?: JobChannel
190
+ /** Bytes immediately before this chunk were lost, at the producer or to retention. */
191
+ readonly gapBefore?: true
192
+ }
193
+ ```
194
+
195
+ ```ts type-equiv
196
+ /** Result of one non-consuming {@link JobRegistry.readAt}. */
197
+ interface JobOutputRead {
198
+ /** Retained chunks overlapping `[from, total)`, in offset order. */
199
+ chunks: readonly JobChunk[]
200
+ /**
201
+ * Offset to resume from — the ring's current `total`. Always a chunk
202
+ * boundary: appends land whole and trimming only advances chunk starts, and
203
+ * consumers concatenate `chunks` under that assumption, so a provider
204
+ * serving partial chunks would silently duplicate text.
205
+ */
206
+ next: number
207
+ /** True when `from` fell below the oldest retained byte, so bytes are missing before `chunks`. */
208
+ lossy: boolean
95
209
  }
96
210
  ```
97
211
 
98
212
  ## 消费方视图
99
213
 
100
- 快照是每次新建的只读投影。`ownerSession` 携带用于授权的共享 `SessionId`;完成监听器则会另行收到用于生命周期清理的确切拥有者对象。另一个接口已经交付终止状态或承诺交付时,`reported` 会抑制完成通知;排空 owner 或服务的 teardown 取消同样计入。
214
+ `JobView` 是每个读者都消费的唯一投影:模型工具、浏览器名册与观测流。`owner` 携带划定访问边界的会话 id;注册表为生命周期清理解析其背后的活体 `Agent`,从不把该对象交出去。`progress` 是生产方的实时行,结算时清除;`detail` 是终态原因,合并了记录下来的 kill 原因。
101
215
 
102
216
  ```ts type-equiv
103
217
  /**
104
- * A read-only projection of one job, safe to hand to listeners and tools —
105
- * a fresh object per call, never live registry state.
218
+ * Read-only projection of one job — a fresh object per call, never live
219
+ * registry state. The model tools, the browser roster, and the observation
220
+ * stream all consume this one shape.
106
221
  */
107
- interface JobSnapshot {
222
+ interface JobView {
108
223
  /** The registry-issued id (`<kind>-N`). */
109
- id: JobId
110
- /** The producer kind the job was registered with. */
111
- kind: JobKind
112
- /** The producer-supplied one-line label. */
113
- label: string
114
- /** Producer-owned cap for complete model-facing notices and output reads. */
115
- outputLimitBytes?: number
224
+ readonly id: JobId
116
225
  /**
117
- * Owner session id used for authorization and correlation; absent for
118
- * unowned jobs. Completion listeners receive the exact {@link Agent}
119
- * separately through {@link JobDoneListener}.
226
+ * The producer kind the job was registered with: a Host-registered
227
+ * `JobKind`, carried as an open string because a browser bundle or a Remote
228
+ * codec sees only the `JobKindMap` merges its own program compiles.
120
229
  */
121
- ownerSession?: SessionId
230
+ readonly kind: string
231
+ /** The producer-supplied one-line label. */
232
+ readonly label: string
233
+ /** Owning session; absent for an unowned job, which every caller can see. */
234
+ readonly owner?: SessionId
235
+ /** Producer-owned cap for complete model-facing notices and reads, in UTF-8 bytes. */
236
+ readonly outputLimitBytes?: number
122
237
  /** Current lifecycle state. */
123
- status: JobStatus
124
- /** Kind-specific status detail, present once the producer supplied one (usually terminal). */
125
- detail?: string
238
+ readonly status: JobStatus
239
+ /** The producer's live progress line (`3/10`, the current phase); cleared at settlement. */
240
+ readonly progress?: string
241
+ /** Terminal reason (`exit code: 3`); a recorded kill reason is merged in. */
242
+ readonly detail?: string
126
243
  /** Epoch ms when the job was registered. */
127
- startedAt: number
128
- /** Epoch ms when the job settled; absent while `running`/`stopping`. */
129
- finishedAt?: number
244
+ readonly startedAt: number
245
+ /** Epoch ms when the job settled; absent while live. */
246
+ readonly finishedAt?: number
130
247
  /**
131
- * True when a kill, read, wait, or teardown cancel has reported or committed
132
- * to report the terminal state. Completion reporters suppress redundant
133
- * notices when set. Teardown claims it because the owner or service being
134
- * destroyed leaves no reader: a reporter that opens a turn on notice would
135
- * otherwise spend a model request per teardown layer.
248
+ * The output ring's absolute coordinates and the complete-stream files
249
+ * behind it. `total` is the offset the next chunk starts at (0 while
250
+ * nothing was written); `earliest` is the oldest retained byte, greater
251
+ * than zero exactly when retention dropped the head. `spillPaths` lists the
252
+ * spill files the job's pull sources currently keep, in source order and
253
+ * deduplicated, and is absent while no source keeps one: it outlives any
254
+ * chunk, so a reader below `earliest` can still name where the bytes went.
136
255
  */
137
- reported: boolean
256
+ readonly output: { readonly total: number; readonly earliest: number; readonly spillPaths?: readonly string[] }
138
257
  }
139
258
  ```
140
259
 
260
+ `JobRegistry` 的 `list`、`get`、`read`、`readAt`、`kill` 和 `wait` 各自接收调用方的 `SessionId`;省略调用方时仅可访问无主 job,传入会话时还可访问该会话拥有的 job。
261
+
141
262
  ```ts type-equiv
142
- /** Output and post-read state returned by {@link JobRegistry.read}. */
263
+ /** Output and post-read state returned by the consuming {@link JobRegistry.read}. */
143
264
  interface JobRead {
144
- /**
145
- * Stream kinds: the consuming delta since the previous read. Final-output
146
- * kinds: empty while live, the terminal {@link JobOutcome.output} (or
147
- * empty) once settled — idempotent, never consumed.
148
- */
149
- text: string
265
+ /** Ring chunks appended since the model cursor, in offset order; every channel included. */
266
+ chunks: readonly JobChunk[]
267
+ /** True when the cursor fell below the oldest retained byte, so bytes are missing before `chunks`. */
268
+ lossy: boolean
269
+ /** The producer's {@link JobOutcome.result}, handed out by the first read after settlement only. */
270
+ result?: string
150
271
  /** The job's state at read time. */
151
- snapshot: JobSnapshot
272
+ job: JobView
152
273
  }
153
274
  ```
154
275
 
276
+ ## 事件
277
+
278
+ 注册表通过一条带过滤的流宣布每次提交。生命周期事件携带其所宣布的提交之后的投影;`settled` 标出原因,完成播报方据此跳过 teardown;`output` 只携带 id 与新的 total,观察者从自己的游标读取,注册表从不推送负载。
279
+
280
+ ```ts type-equiv
281
+ /**
282
+ * One lifecycle or output event. Lifecycle events carry the job's projection
283
+ * after the commit they announce; `output` carries only the id and the new
284
+ * total, so an observer schedules a {@link JobRegistry.readAt} from its own
285
+ * cursor and the registry never pushes payloads.
286
+ */
287
+ type JobEvent =
288
+ | {
289
+ /** Registration commit, progress line change, stopping transition, or removal from the visible set. */
290
+ readonly type: 'registered' | 'progress' | 'stopping' | 'removed'
291
+ readonly job: JobView
292
+ }
293
+ | {
294
+ readonly type: 'settled'
295
+ readonly job: JobView
296
+ readonly cause: JobSettleCause
297
+ /**
298
+ * Whether this settlement released a live {@link JobRegistry.wait}. That
299
+ * waiter's caller receives the terminal projection as its own result, so
300
+ * a completion reporter treats an awaited settlement as already delivered
301
+ * and reports only the unawaited ones. A wait that timed out or was
302
+ * aborted before the settlement does not count.
303
+ */
304
+ readonly awaited: boolean
305
+ }
306
+ | {
307
+ readonly type: 'output'
308
+ readonly id: JobId
309
+ /** Owning session, absent for an unowned job. */
310
+ readonly owner?: SessionId
311
+ /** The ring's total after the append (or at settlement, which ends the stream). */
312
+ readonly total: number
313
+ }
314
+ ```
315
+
316
+ ```ts type-equiv
317
+ /**
318
+ * Who a subscription hears about. `{ owner }` delivers that session's jobs
319
+ * plus every unowned job (the set that session can see). `{ owners: 'scope' }`
320
+ * delivers the owners composed under the subscribing context — one registry
321
+ * serves every composition in the process, and a mount under one preset must
322
+ * not hear another preset's agents. `{ owners: 'all' }` delivers everything.
323
+ */
324
+ type JobEventFilter =
325
+ | { readonly owner: SessionId }
326
+ | { readonly owners: 'all' | 'scope' }
327
+ ```
328
+
155
329
  ## 服务行为
156
330
 
157
- 抽象的 [`JobRegistry`](../../packages/jobs/jobs/src/index.ts) Service Definition 规定原子 `start`、限定调用方作用域的 `get` 和 `list`、`read`、`kill`、有界 `wait`、故障隔离的 `onJobDone` 与 `onJobsChanged` 监听器,以及 `attachController`;[`LocalJobRegistry`](../../packages/jobs/jobs-local/src/index.ts) 是其进程局部 Service Provider。授权会比较拥有者会话;拥有者清理与准入会使用确切的已注册 `Agent` 实例。本地 Service Provider 的 `maxConcurrentJobsPerOwner` 配置必须是正的安全整数,默认值为 `10`;它按确切 owner 统计 `running` 与 `stopping` 记录,所有无 owner 任务共享一个服务级桶,并在生产方终止结算后释放容量。Service Definition 约定见 [`dsh-jobs`](../../packages/jobs/jobs/README.zh.md),注册表生命周期与准入策略见 [`dsh-jobs-local`](../../packages/jobs/jobs-local/README.zh.md),面向模型的 Consumer 见 [`dsh-tool-jobs`](../../packages/jobs/tool-jobs/README.zh.md)。
331
+ 抽象的 [`JobRegistry`](../../packages/jobs/jobs/src/index.ts) Service Definition 规定了原子化的 `start`、各自接收调用方的 `list`、`get`、消耗式 `read`、非消耗的 `readAt`、`kill` 与有界的 `wait`、带过滤的 `events` 流,以及 `attachController`;[`LocalJobRegistry`](../../packages/jobs/jobs-local/src/index.ts) 是进程本地的 Service Provider。授权比较拥有者会话;拥有者清理与准入使用 job 启动时登记在该拥有者会话下的活体 `Agent`。本地提供方的正安全整数配置 `maxConcurrentJobsPerOwner` 默认为 `10`,按精确拥有者统计 `running` 加 `stopping` 记录,无主任务共享一个桶;生产方的终态结算释放容量;`retainBytes`(默认 262144)与 `settledRetainBytes`(默认 16384)约束每个环的运行期与结算后保留量,`pumpPollMs`(默认 150)是拉取节奏。参见 [`dsh-jobs`](../../packages/jobs/jobs/README.zh.md) 了解 Service Definition 约定,[`dsh-jobs-local`](../../packages/jobs/jobs-local/README.zh.md) 了解注册表生命周期与准入策略,[`dsh-tool-jobs`](../../packages/jobs/tool-jobs/README.zh.md) 了解面向模型的 Consumer。
158
332
 
159
333
  <!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
160
334
 
@@ -164,18 +338,66 @@ interface JobRead {
164
338
 
165
339
  Generated from source by `scripts/gen-cordis-catalog.ts` (verified fresh by `pnpm run verify-cordis-catalog` in doc-sync; regenerate with `pnpm run gen-cordis-catalog`) — the language sides differ only in locale-specific paired document paths. Signature blocks use a `ts cordis-catalog` fence and keep the original source JSDoc; dispatch modes are defined in the [primer](../cordis-primer.zh.md#dispatch-modes), and the framework-inherited `ctx` API lives in [cordis-api/inherited.md](../cordis-api/inherited.md).
166
340
 
341
+ <a id="ctxjobcontroller--jobcontroller"></a>
342
+
343
+ ### `ctx.jobController` — `JobController`
344
+
345
+ Host service backing the generated `ctx.remote.job` namespace.
346
+
347
+ ```ts cordis-catalog
348
+ /**
349
+ * Stream the jobs one session can see — its own plus every unowned job —
350
+ * as whole-set frames: one on open, then one after each coalesced burst of
351
+ * lifecycle commits. The stream has no natural end; the carrier closes it.
352
+ * @param request - the session whose visible set to mirror.
353
+ * @param signal - cancellation owned by the Remote stream carrier.
354
+ * @returns the roster frames.
355
+ */
356
+ @Remote({ mode: 'stream' }) list(request: JobListRequest, signal: AbortSignal): AsyncIterable<JobListFrame>
357
+
358
+ /**
359
+ * Stream one job's retained output from an absolute byte offset, then its
360
+ * terminal projection once settled and drained. Non-consuming: the
361
+ * model-facing cursor and notice state never observe these reads. The
362
+ * request's session is the fenced read's caller; the registry rejects a
363
+ * job the session cannot see and an unknown job.
364
+ * @param request - target job, owning session, and optional resume offset.
365
+ * @param signal - cancellation owned by the Remote stream carrier.
366
+ * @returns anchor, coalesced output frames, and the terminal status.
367
+ */
368
+ @Remote({ mode: 'stream' }) follow(request: JobFollowRequest, signal: AbortSignal): AsyncIterable<JobFollowFrame>
369
+
370
+ /**
371
+ * Kill one background job on a human's behalf. The request's session is
372
+ * the fenced read's caller, so the job must be one that session can see:
373
+ * the registry's owner fence is the only access rule, and a child session's
374
+ * own jobs are killable from its list like any other. The kill records
375
+ * `cancelled by the user` as its reason; it is not one the model requested,
376
+ * so the owning agent still receives the completion notice, and a shell
377
+ * tool waiting on that job reads the reason in its own result.
378
+ * @param request - Session whose job list carries the job, and the job id.
379
+ * @returns the registry's admission of the kill request.
380
+ */
381
+ @Remote('kill') kill(request: JobKillRequest): JobKillValue
382
+ ```
383
+
384
+ Source: [`packages/api/job-controller/src/index.ts`](../../packages/api/job-controller/src/index.ts)
385
+
167
386
  <a id="ctxjobs--jobregistry-abstract-seam"></a>
168
387
 
169
388
  ### `ctx.jobs` — `JobRegistry` (abstract seam)
170
389
 
171
- Abstract background job registry. Subclass, implement the abstract methods, and load the subclass as a plugin — it registers as `ctx.jobs` (one implementation per context; loading a second throws, which is cordis' standard duplicate-service behavior).
390
+ Abstract background job registry. Subclass, implement the abstract members, and load the subclass as a plugin — it registers as `ctx.jobs` (one implementation per context; loading a second throws, which is cordis' standard duplicate-service behavior).
172
391
 
173
392
  Implementations must honor these semantics:
174
393
 
175
- - Registrations outlive producer and controller fibers. Owner and service disposal cancel live work and await compliant producers; a throwing teardown cancel force-fails only the record. Teardown cancellation also marks the record reported, because a record its owner is being destroyed for has no reader left.
394
+ - Registrations outlive producer and controller fibers. Owner and service disposal cancel live work and await compliant producers; a throwing teardown cancel force-fails only the record. Such settlements announce `cause: 'teardown'`, because a job whose owner is being destroyed has no reader left.
176
395
  - Owned-job access is fenced by the owner's session id. Ids are predictable, so authorization — not secrecy — is the boundary.
177
- - Settlement is first-wins: one terminal record, released waiters, and one round of contained listener notification, even against a late producer outcome. Completion is announced last, after the record is committed and every other observer of the settlement has seen it, because a reporter may open a model turn synchronously.
178
- - start refuses work while no attached job controller serves the spec's owner, so a producer cannot start work that owner cannot collect or stop. One registry serves every composition in the process, so this question — and completion-listener delivery — is owner-relative rather than process-wide: registrations made from an unscoped context serve every owner, and registrations made under an agent composition's scope serve exactly the agents composed under it.
396
+ - Settlement is first-wins: one terminal record, released waiters, then one round of contained event delivery, even against a late producer outcome. The `settled` event follows every released waiter and reports whether it released one (`awaited`), so a completion reporter can skip settlements a waiting caller already collected.
397
+ - A settled record stays listed until its owner's disposal, service disposal, or an explicit remove by a caller that collected the terminal state itself and never handed the id out.
398
+ - start refuses work while no attached job controller serves the spec's owner, so a producer cannot start work that owner cannot collect or stop. One registry serves every composition in the process, so this question — and event delivery under `{ owners: 'scope' }` — is owner-relative rather than process-wide: registrations made from an unscoped context serve every owner, and registrations made under an agent composition's scope serve exactly the agents composed under it.
399
+ - Every job owns one output ring. Pull sources named by the spec are pumped by the registry and drained once more before settlement; pushed appends land whole. The model's consuming cursor and observers' absolute offsets read the same bytes and never disturb each other.
400
+ - Ring retention is bounded. Appends past the live cap drop the oldest retained bytes; a reader below the retained window gets a lossy read, never an error. Settlement trims retention to the settled cap and ends the stream; the ring has no separate lifecycle.
179
401
 
180
402
  ```ts cordis-catalog
181
403
  /**
@@ -183,96 +405,83 @@ Implementations must honor these semantics:
183
405
  * admission before starting and atomically registering work. Any preflight
184
406
  * rejection leaves no job id or execution resource. A throwing starter
185
407
  * leaves nothing registered; after it returns, registration cannot fail.
186
- * Settlement records the outcome, notifies listeners, and releases waiters.
187
- * @param spec - job identity, owner, and synchronous starter.
408
+ * @param spec - job identity, owner, output sources, and synchronous starter.
188
409
  * @returns the registry-issued `<kind>-N` id.
189
410
  */
190
- abstract start(spec: JobStart): JobId
411
+ abstract start(spec: JobSpec): JobId
191
412
 
192
413
  /**
193
- * List caller-owned and unowned jobs in registration order without exposing
194
- * another session's labels.
195
- * @param caller - reading agent; a non-agent caller sees only unowned jobs.
196
- * @returns fresh snapshots.
414
+ * List caller-owned and unowned jobs in registration order.
415
+ * @param caller - reading session; omission sees only unowned jobs.
416
+ * @returns fresh projections.
197
417
  */
198
- abstract list(caller?: Agent): JobSnapshot[]
418
+ abstract list(caller?: SessionId): JobView[]
199
419
 
200
420
  /**
201
- * Return a non-consuming snapshot without changing its read cursor or notice
202
- * state. Throws for an unknown or foreign job.
421
+ * Project one job without changing its cursor. Throws for an unknown or
422
+ * foreign job.
203
423
  * @param id - job to look up.
204
- * @param caller - reading agent checked against the owner.
205
- * @returns a fresh snapshot.
424
+ * @param caller - reading session checked against the owner.
425
+ * @returns a fresh projection.
206
426
  */
207
- abstract get(id: JobId, caller?: Agent): JobSnapshot
427
+ abstract get(id: JobId, caller?: SessionId): JobView
208
428
 
209
429
  /**
210
- * Read the next stream delta, or the idempotent final output after settlement.
211
- * A terminal read marks the job reported. Throws for an unknown or foreign
212
- * job.
430
+ * Consume the ring from the model cursor and advance it to the current
431
+ * total. After settlement the first read also carries the producer's
432
+ * result. Throws for an unknown or foreign job.
213
433
  * @param id - job to read.
214
- * @param caller - reading agent checked against the owner.
215
- * @returns output text and the post-read snapshot.
434
+ * @param caller - reading session checked against the owner.
435
+ * @returns the chunks since the cursor, the lossy flag, the result once, and the post-read projection.
216
436
  */
217
- abstract read(id: JobId, caller?: Agent): JobRead
437
+ abstract read(id: JobId, caller?: SessionId): JobRead
218
438
 
219
439
  /**
220
- * Request cancellation, then mark the job stopping and reported. A producer
221
- * throw propagates without changing job state. Throws for an unknown or
222
- * foreign job.
440
+ * Read retained ring output without moving the model cursor. Resume with
441
+ * a previous read's `next`; an offset inside a retained chunk returns the
442
+ * whole chunk (its `at` may precede `from`). Throws for a negative or
443
+ * non-integer offset, or an unknown or foreign job.
444
+ * @param id - job to read.
445
+ * @param from - absolute byte offset to read from (0 for the retained head).
446
+ * @param caller - reading session checked against the owner.
447
+ * @returns retained chunks overlapping `[from, total)`, the resume offset, and the lossy flag.
448
+ */
449
+ abstract readAt(id: JobId, from: number, caller?: SessionId): JobOutputRead
450
+
451
+ /**
452
+ * Request cancellation, then mark the job stopping. A producer throw
453
+ * propagates without changing job state. A supplied reason is merged into
454
+ * terminal `detail` when the job settles `killed`. Throws for an unknown
455
+ * or foreign job.
223
456
  * @param id - job to cancel.
224
- * @param caller - killing agent checked against the owner.
225
- * @param reason - logged reason forwarded to the producer.
457
+ * @param caller - killing session checked against the owner.
458
+ * @param reason - cancellation reason forwarded verbatim to the producer.
226
459
  * @returns `requested` for live work, otherwise `already-finished`.
227
460
  */
228
- abstract kill(id: JobId, caller?: Agent, reason?: string): 'requested' | 'already-finished'
461
+ abstract kill(id: JobId, caller?: SessionId, reason?: string): 'requested' | 'already-finished'
229
462
 
230
463
  /**
231
464
  * Wait for settlement or timeout without cancelling the job. Caller abort
232
465
  * rejects only while the job is live; after settlement the terminal
233
- * snapshot wins so a notice suppressed for this waiter is still delivered.
234
- * Throws for invalid, unknown, or foreign input.
466
+ * projection wins. Rejects for an invalid timeout or an unknown or foreign
467
+ * job.
235
468
  * @param id - job to wait for.
236
469
  * @param timeoutMs - positive finite wait bound in milliseconds.
237
- * @param caller - waiting agent checked against the owner.
470
+ * @param caller - waiting session checked against the owner.
238
471
  * @param signal - optional cancellation of the wait itself.
239
- * @returns snapshot at settlement or timeout.
240
- */
241
- abstract wait(id: JobId, timeoutMs: number, caller?: Agent, signal?: AbortSignal): Promise<JobSnapshot>
242
-
243
- /**
244
- * Register an effect-scoped completion listener. It receives the settlements
245
- * of the owners its registering context's scope covers; each listener is
246
- * contained; returned promises are observed but not awaited. No listener runs
247
- * after service disposal.
248
- * @param listener - receives each terminal snapshot and its exact owner.
249
- * @returns disposer that unregisters the listener.
472
+ * @returns projection at settlement or timeout.
250
473
  */
251
- abstract onJobDone(listener: JobDoneListener): () => void
474
+ abstract wait(id: JobId, timeoutMs: number, caller?: SessionId, signal?: AbortSignal): Promise<JobView>
252
475
 
253
476
  /**
254
- /**
255
- * Register an effect-scoped observer of visible-set changes. It fires after
256
- * every commit that changes what {@link list} returns for that owner —
257
- * registration, every stopping transition (including the one teardown
258
- * performs before it awaits a slow producer), settlement, owner-disposal
259
- * removal, and the emptying that service disposal commits — so an observer
260
- * re-reads rather than accumulating deltas.
261
- *
262
- * Delivery is owner-relative on the same terms as {@link onJobDone}: an
263
- * observer registered from an unscoped context — a host composition's own
264
- * carrier — sees every owner, while one registered under an agent
265
- * composition's scope sees exactly the agents composed under it.
266
- *
267
- * This is not a superset of {@link onJobDone}: that one delivers the terminal
268
- * record under first-wins semantics a job controller couples to notice
269
- * delivery, while this one carries no delivery meaning and marks nothing
270
- * reported. Listeners are contained and never awaited.
271
- * @param listener - receives the owner whose visible set changed, or
272
- * `undefined` when an unowned job changed and every caller's set did.
273
- * @returns disposer that unregisters the listener.
477
+ * Drop one settled job's record from the visible set and announce
478
+ * `removed`. For a caller that collected the terminal state through its own
479
+ * {@link wait} and never handed the id to the model, such as a shell tool's
480
+ * foreground call. Throws for a job that is still live, unknown, or foreign.
481
+ * @param id - settled job to drop.
482
+ * @param caller - removing session checked against the owner.
274
483
  */
275
- abstract onJobsChanged(listener: JobsChangedListener): () => void
484
+ abstract remove(id: JobId, caller?: SessionId): void
276
485
 
277
486
  /**
278
487
  * Attach an effect-scoped controller that can read and stop jobs. It serves the
@@ -284,7 +493,7 @@ abstract onJobsChanged(listener: JobsChangedListener): () => void
284
493
  abstract attachController(name: string): () => void
285
494
  ```
286
495
 
287
- Types: [Agent](core.zh.md)
496
+ Types: [SessionId](core.zh.md)
288
497
 
289
498
  Source: [`packages/jobs/jobs/src/index.ts`](../../packages/jobs/jobs/src/index.ts)
290
499
  <!-- END GENERATED cordis-surface -->