dsh-plugin-dev-kb 1.3.0 → 1.5.1

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 (631) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/README.en.md +6 -6
  3. package/README.md +13 -8
  4. package/kb/INDEX.md +25 -21
  5. package/kb/README.md +6 -4
  6. package/kb/extra/AGENTS.md +14 -12
  7. package/kb/extra/agent-lifecycle.md +91 -0
  8. package/kb/extra/agent-lifecycle.zh.md +93 -0
  9. package/kb/extra/api-gateway.md +172 -0
  10. package/kb/extra/api-gateway.zh.md +178 -0
  11. package/kb/extra/architecture.md +165 -0
  12. package/kb/extra/architecture.zh.md +169 -0
  13. package/kb/extra/capability-seams.md +714 -0
  14. package/kb/extra/capability-seams.zh.md +716 -0
  15. package/kb/extra/cli-help.md +203 -0
  16. package/kb/extra/cli-help.zh.md +205 -0
  17. package/kb/extra/config-catalog.md +4801 -0
  18. package/kb/extra/config-catalog.zh.md +4803 -0
  19. package/kb/extra/cookbook/adding-a-package.md +170 -0
  20. package/kb/extra/cookbook/adding-a-package.zh.md +170 -0
  21. package/kb/extra/cookbook/adding-a-plugin-preview.md +52 -0
  22. package/kb/extra/cookbook/adding-a-plugin-preview.zh.md +52 -0
  23. package/kb/extra/cookbook/adding-a-remote-api.md +2 -2
  24. package/kb/extra/cookbook/adding-a-remote-api.zh.md +2 -2
  25. package/kb/extra/cookbook/adding-a-session-format-version.md +51 -7
  26. package/kb/extra/cookbook/adding-a-session-format-version.zh.md +51 -7
  27. package/kb/extra/cookbook/adding-a-settings-card.md +72 -0
  28. package/kb/extra/cookbook/adding-a-settings-card.zh.md +72 -0
  29. package/kb/extra/cookbook/adding-a-tool.md +101 -0
  30. package/kb/extra/cookbook/adding-a-tool.zh.md +103 -0
  31. package/kb/extra/cookbook/adding-an-llm-adapter.md +43 -0
  32. package/kb/extra/cookbook/adding-an-llm-adapter.zh.md +43 -0
  33. package/kb/extra/cookbook/extension-cookbook.md +132 -0
  34. package/kb/extra/cookbook/extension-cookbook.zh.md +136 -0
  35. package/kb/extra/cookbook/reviewing-persistence-type-changes.md +122 -0
  36. package/kb/extra/cookbook/reviewing-persistence-type-changes.zh.md +122 -0
  37. package/kb/extra/cordis-api/context.md +364 -0
  38. package/kb/extra/cordis-api/context.zh.md +366 -0
  39. package/kb/extra/cordis-api/events.md +207 -0
  40. package/kb/extra/cordis-api/events.zh.md +209 -0
  41. package/kb/extra/cordis-api/fiber.md +375 -0
  42. package/kb/extra/cordis-api/fiber.zh.md +377 -0
  43. package/kb/extra/cordis-api/inherited.md +38 -0
  44. package/kb/extra/cordis-api/registry.md +152 -0
  45. package/kb/extra/cordis-api/registry.zh.md +154 -0
  46. package/kb/extra/cordis-api/service.md +102 -0
  47. package/kb/extra/cordis-api/service.zh.md +104 -0
  48. package/kb/extra/cordis-tutorial/01-first-plugin.md +95 -0
  49. package/kb/extra/cordis-tutorial/01-first-plugin.zh.md +95 -0
  50. package/kb/extra/cordis-tutorial/02-lifecycle-and-effects.md +98 -0
  51. package/kb/extra/cordis-tutorial/02-lifecycle-and-effects.zh.md +98 -0
  52. package/kb/extra/cordis-tutorial/03-services.md +98 -0
  53. package/kb/extra/cordis-tutorial/03-services.zh.md +98 -0
  54. package/kb/extra/cordis-tutorial/04-events.md +144 -0
  55. package/kb/extra/cordis-tutorial/04-events.zh.md +144 -0
  56. package/kb/extra/cordis-tutorial/05-config.md +111 -0
  57. package/kb/extra/cordis-tutorial/05-config.zh.md +111 -0
  58. package/kb/extra/cordis-tutorial/06-composition-and-hmr.md +113 -0
  59. package/kb/extra/cordis-tutorial/06-composition-and-hmr.zh.md +113 -0
  60. package/kb/extra/cordis-tutorial/07-into-the-harness.md +108 -0
  61. package/kb/extra/cordis-tutorial/07-into-the-harness.zh.md +108 -0
  62. package/kb/extra/cordis-tutorial/index.md +60 -0
  63. package/kb/extra/cordis-tutorial/index.zh.md +62 -0
  64. package/kb/extra/deepseek-llm-api-wire-extensions.md +22 -23
  65. package/kb/extra/deepseek-llm-api-wire-extensions.zh.md +21 -22
  66. package/kb/extra/defensive-patterns/README.md +25 -0
  67. package/kb/extra/defensive-patterns/README.zh.md +27 -0
  68. package/kb/extra/defensive-patterns/client-components.md +493 -0
  69. package/kb/extra/defensive-patterns/client-components.zh.md +495 -0
  70. package/kb/extra/defensive-patterns/conversation-and-session.md +316 -0
  71. package/kb/extra/defensive-patterns/conversation-and-session.zh.md +316 -0
  72. package/kb/extra/defensive-patterns/general.md +222 -0
  73. package/kb/extra/defensive-patterns/general.zh.md +252 -0
  74. package/kb/extra/defensive-patterns/package-surface.md +231 -0
  75. package/kb/extra/defensive-patterns/package-surface.zh.md +231 -0
  76. package/kb/extra/defensive-patterns/remote-and-api.md +115 -0
  77. package/kb/extra/defensive-patterns/remote-and-api.zh.md +115 -0
  78. package/kb/extra/development.md +55 -18
  79. package/kb/extra/development.zh.md +56 -18
  80. package/kb/extra/event-producer-consumer.md +90 -68
  81. package/kb/extra/event-producer-consumer.zh.md +91 -69
  82. package/kb/extra/experimental-persistence-catalog.md +17 -0
  83. package/kb/extra/experimental-persistence-catalog.zh.md +17 -0
  84. package/kb/extra/glossary.md +2 -1
  85. package/kb/extra/glossary.zh.md +2 -1
  86. package/kb/extra/i18n/README.md +15 -7
  87. package/kb/extra/i18n/README.zh.md +15 -7
  88. package/kb/extra/i18n/style-samples.md +2 -2
  89. package/kb/extra/i18n/terminology.md +5 -4
  90. package/kb/extra/i18n/translation-prompt.md +2 -2
  91. package/kb/extra/module-graph.md +759 -432
  92. package/kb/extra/module-graph.zh.md +759 -432
  93. package/kb/extra/persistence-catalog.md +9140 -0
  94. package/kb/extra/persistence-catalog.zh.md +9142 -0
  95. package/kb/extra/persistence-changes/2026-09-11-initial.md +280 -0
  96. package/kb/extra/persistence-changes/2026-09-11-initial.zh.md +280 -0
  97. package/kb/extra/persistence-changes/2026-09-12-auto-review-error-metadata.md +52 -0
  98. package/kb/extra/persistence-changes/2026-09-12-auto-review-error-metadata.zh.md +52 -0
  99. package/kb/extra/persistence-changes/2026-09-13-working-directory.md +48 -0
  100. package/kb/extra/persistence-changes/2026-09-13-working-directory.zh.md +48 -0
  101. package/kb/extra/persistence-changes/2026-09-14-image-offload.md +96 -0
  102. package/kb/extra/persistence-changes/2026-09-14-image-offload.zh.md +96 -0
  103. package/kb/extra/persistence-changes/2026-09-14-workspace-changes-event.md +48 -0
  104. package/kb/extra/persistence-changes/2026-09-14-workspace-changes-event.zh.md +48 -0
  105. package/kb/extra/persistence-changes/2026-09-16-session-format-v4.md +120 -0
  106. package/kb/extra/persistence-changes/2026-09-16-session-format-v4.zh.md +120 -0
  107. package/kb/extra/persistence-changes/2026-09-18-schedule-optional-title.md +48 -0
  108. package/kb/extra/persistence-changes/2026-09-18-schedule-optional-title.zh.md +48 -0
  109. package/kb/extra/persistence-changes/2026-09-19-external-subagent-catalog.md +48 -0
  110. package/kb/extra/persistence-changes/2026-09-19-external-subagent-catalog.zh.md +48 -0
  111. package/kb/extra/persistence-changes/2026-09-20-unknown-child-catalog.md +48 -0
  112. package/kb/extra/persistence-changes/2026-09-20-unknown-child-catalog.zh.md +48 -0
  113. package/kb/extra/persistence-changes/2026-09-21-user-question-reply.md +60 -0
  114. package/kb/extra/persistence-changes/2026-09-21-user-question-reply.zh.md +60 -0
  115. package/kb/extra/persistence-changes/2026-09-30-job-session-lifecycle.md +52 -0
  116. package/kb/extra/persistence-changes/2026-09-30-job-session-lifecycle.zh.md +52 -0
  117. package/kb/extra/persistence-changes/2026-10-05-ptc-operation-metadata.md +48 -0
  118. package/kb/extra/persistence-changes/2026-10-05-ptc-operation-metadata.zh.md +48 -0
  119. package/kb/extra/persistence-changes/2026-10-05-working-directory-attribution.md +60 -0
  120. package/kb/extra/persistence-changes/2026-10-05-working-directory-attribution.zh.md +60 -0
  121. package/kb/extra/persistence-changes/2026-10-07-title-reasoning-effort.md +48 -0
  122. package/kb/extra/persistence-changes/2026-10-07-title-reasoning-effort.zh.md +48 -0
  123. package/kb/extra/persistence-changes/2026-10-13-deepseek-search-thinking.md +48 -0
  124. package/kb/extra/persistence-changes/2026-10-13-deepseek-search-thinking.zh.md +48 -0
  125. package/kb/extra/persistence-changes/2026-10-13-user-rpc-principal.md +60 -0
  126. package/kb/extra/persistence-changes/2026-10-13-user-rpc-principal.zh.md +60 -0
  127. package/kb/extra/persistence-changes/README.md +90 -0
  128. package/kb/extra/persistence-changes/README.zh.md +90 -0
  129. package/kb/extra/persistence-changes/historical-formats/README.md +75 -0
  130. package/kb/extra/persistence-changes/historical-formats/README.zh.md +75 -0
  131. package/kb/extra/persistence-changes/historical-formats/v0.md +5105 -0
  132. package/kb/extra/persistence-changes/historical-formats/v0.zh.md +5105 -0
  133. package/kb/extra/persistence-changes/historical-formats/v1.md +5107 -0
  134. package/kb/extra/persistence-changes/historical-formats/v1.zh.md +5107 -0
  135. package/kb/extra/persistence-changes/historical-formats/v2.md +5362 -0
  136. package/kb/extra/persistence-changes/historical-formats/v2.zh.md +5362 -0
  137. package/kb/extra/persistence-changes/historical-formats/v3.md +5634 -0
  138. package/kb/extra/persistence-changes/historical-formats/v3.zh.md +5634 -0
  139. package/kb/extra/persistence-changes/releases/README.md +103 -0
  140. package/kb/extra/persistence-changes/releases/README.zh.md +103 -0
  141. package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.1.md +201 -0
  142. package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.1.zh.md +201 -0
  143. package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.2.md +261 -0
  144. package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.2.zh.md +261 -0
  145. package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.3.md +126 -0
  146. package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.3.zh.md +126 -0
  147. package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.4.md +75 -0
  148. package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.4.zh.md +75 -0
  149. package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.5.md +75 -0
  150. package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.5.zh.md +75 -0
  151. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.1.md +75 -0
  152. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.1.zh.md +75 -0
  153. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.2.md +75 -0
  154. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.2.zh.md +75 -0
  155. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.3.md +75 -0
  156. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.3.zh.md +75 -0
  157. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.5.md +75 -0
  158. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.5.zh.md +75 -0
  159. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.6.md +75 -0
  160. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.6.zh.md +75 -0
  161. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.7.md +82 -0
  162. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.7.zh.md +82 -0
  163. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.8.md +110 -0
  164. package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.8.zh.md +110 -0
  165. package/kb/extra/persistence-changes/releases/dsh-v0.1.1-rc.1.md +82 -0
  166. package/kb/extra/persistence-changes/releases/dsh-v0.1.1-rc.1.zh.md +82 -0
  167. package/kb/extra/persistence-changes/releases/dsh-v0.1.1-rc.2.md +119 -0
  168. package/kb/extra/persistence-changes/releases/dsh-v0.1.1-rc.2.zh.md +119 -0
  169. package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.1.md +295 -0
  170. package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.1.zh.md +295 -0
  171. package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.2.md +286 -0
  172. package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.2.zh.md +286 -0
  173. package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.3.md +75 -0
  174. package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.3.zh.md +75 -0
  175. package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.4.md +95 -0
  176. package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.4.zh.md +95 -0
  177. package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.5.md +75 -0
  178. package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.5.zh.md +75 -0
  179. package/kb/extra/persistence-changes/releases/dsh-v0.1.2-rc.1.md +75 -0
  180. package/kb/extra/persistence-changes/releases/dsh-v0.1.2-rc.1.zh.md +75 -0
  181. package/kb/extra/persistence-changes/releases/dsh-v0.1.3-alpha.1.md +154 -0
  182. package/kb/extra/persistence-changes/releases/dsh-v0.1.3-alpha.1.zh.md +154 -0
  183. package/kb/extra/persistence-changes/releases/dsh-v0.1.3-alpha.2.md +86 -0
  184. package/kb/extra/persistence-changes/releases/dsh-v0.1.3-alpha.2.zh.md +86 -0
  185. package/kb/extra/persistence-changes/releases/dsh-v0.1.5-alpha.1.md +139 -0
  186. package/kb/extra/persistence-changes/releases/dsh-v0.1.5-alpha.1.zh.md +139 -0
  187. package/kb/extra/persistence-changes/releases/dsh-v0.1.5-alpha.2.md +95 -0
  188. package/kb/extra/persistence-changes/releases/dsh-v0.1.5-alpha.2.zh.md +95 -0
  189. package/kb/extra/persistence-changes/releases/dsh-v0.1.5-rc.1.md +75 -0
  190. package/kb/extra/persistence-changes/releases/dsh-v0.1.5-rc.1.zh.md +75 -0
  191. package/kb/extra/persistence-changes/releases/dsh-v0.1.5-rc.2.md +75 -0
  192. package/kb/extra/persistence-changes/releases/dsh-v0.1.5-rc.2.zh.md +75 -0
  193. package/kb/extra/rescope.md +1 -1
  194. package/kb/extra/rescope.zh.md +1 -1
  195. package/kb/extra/session-format-status.md +24 -8
  196. package/kb/extra/session-format-status.zh.md +24 -8
  197. package/kb/extra/subsystems/README.md +76 -0
  198. package/kb/extra/subsystems/README.zh.md +76 -0
  199. package/kb/extra/subsystems/agent-team.md +61 -37
  200. package/kb/extra/subsystems/agent-team.zh.md +61 -37
  201. package/kb/extra/subsystems/approval.md +170 -0
  202. package/kb/extra/subsystems/approval.zh.md +170 -0
  203. package/kb/extra/subsystems/attachment.md +19 -9
  204. package/kb/extra/subsystems/attachment.zh.md +19 -9
  205. package/kb/extra/subsystems/boot.md +447 -0
  206. package/kb/extra/subsystems/boot.zh.md +447 -0
  207. package/kb/extra/subsystems/browser-use.md +67 -0
  208. package/kb/extra/subsystems/browser-use.zh.md +67 -0
  209. package/kb/extra/subsystems/claude-code-mods.md +146 -0
  210. package/kb/extra/subsystems/claude-code-mods.zh.md +146 -0
  211. package/kb/extra/subsystems/client-modules.md +198 -0
  212. package/kb/extra/subsystems/client-modules.zh.md +198 -0
  213. package/kb/extra/subsystems/client-resources.md +92 -0
  214. package/kb/extra/subsystems/client-resources.zh.md +92 -0
  215. package/kb/extra/subsystems/commands.md +223 -0
  216. package/kb/extra/subsystems/commands.zh.md +223 -0
  217. package/kb/extra/subsystems/compaction.md +284 -0
  218. package/kb/extra/subsystems/compaction.zh.md +284 -0
  219. package/kb/extra/subsystems/computer-use.md +59 -0
  220. package/kb/extra/subsystems/computer-use.zh.md +59 -0
  221. package/kb/extra/subsystems/conversation.md +301 -0
  222. package/kb/extra/subsystems/conversation.zh.md +303 -0
  223. package/kb/extra/subsystems/core.md +1113 -0
  224. package/kb/extra/subsystems/core.zh.md +1125 -0
  225. package/kb/extra/subsystems/credentials.md +493 -0
  226. package/kb/extra/subsystems/credentials.zh.md +493 -0
  227. package/kb/extra/subsystems/deliverables.md +178 -0
  228. package/kb/extra/subsystems/deliverables.zh.md +178 -0
  229. package/kb/extra/subsystems/extensions.md +6 -4
  230. package/kb/extra/subsystems/extensions.zh.md +6 -4
  231. package/kb/extra/subsystems/feedback.md +4 -4
  232. package/kb/extra/subsystems/feedback.zh.md +4 -4
  233. package/kb/extra/subsystems/filesystem.md +530 -0
  234. package/kb/extra/subsystems/filesystem.zh.md +530 -0
  235. package/kb/extra/subsystems/goal.md +313 -0
  236. package/kb/extra/subsystems/goal.zh.md +313 -0
  237. package/kb/extra/subsystems/jobs.md +554 -0
  238. package/kb/extra/subsystems/jobs.zh.md +554 -0
  239. package/kb/extra/subsystems/llm-streaming.md +1196 -0
  240. package/kb/extra/subsystems/llm-streaming.zh.md +1202 -0
  241. package/kb/extra/subsystems/lsp.md +202 -0
  242. package/kb/extra/subsystems/lsp.zh.md +202 -0
  243. package/kb/extra/subsystems/mcp.md +139 -0
  244. package/kb/extra/subsystems/mcp.zh.md +139 -0
  245. package/kb/extra/subsystems/office-to-pdf.md +87 -0
  246. package/kb/extra/subsystems/office-to-pdf.zh.md +87 -0
  247. package/kb/extra/subsystems/otel.md +44 -0
  248. package/kb/extra/subsystems/otel.zh.md +44 -0
  249. package/kb/extra/subsystems/permission-presets.md +167 -0
  250. package/kb/extra/subsystems/permission-presets.zh.md +167 -0
  251. package/kb/extra/subsystems/persistence.md +418 -0
  252. package/kb/extra/subsystems/persistence.zh.md +418 -0
  253. package/kb/extra/subsystems/plan.md +87 -0
  254. package/kb/extra/subsystems/plan.zh.md +87 -0
  255. package/kb/extra/subsystems/product-telemetry.md +81 -0
  256. package/kb/extra/subsystems/product-telemetry.zh.md +81 -0
  257. package/kb/extra/subsystems/ptc-runtime.md +250 -0
  258. package/kb/extra/subsystems/ptc-runtime.zh.md +250 -0
  259. package/kb/extra/subsystems/sandbox.md +221 -0
  260. package/kb/extra/subsystems/sandbox.zh.md +221 -0
  261. package/kb/extra/subsystems/schedule.md +550 -0
  262. package/kb/extra/subsystems/schedule.zh.md +550 -0
  263. package/kb/extra/subsystems/scope.md +59 -0
  264. package/kb/extra/subsystems/scope.zh.md +61 -0
  265. package/kb/extra/subsystems/session-projection.md +356 -0
  266. package/kb/extra/subsystems/session-projection.zh.md +356 -0
  267. package/kb/extra/subsystems/session-query.md +511 -0
  268. package/kb/extra/subsystems/session-query.zh.md +511 -0
  269. package/kb/extra/subsystems/session-reference.md +224 -0
  270. package/kb/extra/subsystems/session-reference.zh.md +224 -0
  271. package/kb/extra/subsystems/session-telemetry.md +212 -0
  272. package/kb/extra/subsystems/session-telemetry.zh.md +212 -0
  273. package/kb/extra/subsystems/session-title.md +213 -0
  274. package/kb/extra/subsystems/session-title.zh.md +213 -0
  275. package/kb/extra/subsystems/session.md +1339 -0
  276. package/kb/extra/subsystems/session.zh.md +1343 -0
  277. package/kb/extra/subsystems/settings.md +155 -0
  278. package/kb/extra/subsystems/settings.zh.md +155 -0
  279. package/kb/extra/subsystems/shell.md +314 -0
  280. package/kb/extra/subsystems/shell.zh.md +314 -0
  281. package/kb/extra/subsystems/sidebar-right.md +160 -0
  282. package/kb/extra/subsystems/sidebar-right.zh.md +160 -0
  283. package/kb/extra/subsystems/skills.md +352 -0
  284. package/kb/extra/subsystems/skills.zh.md +352 -0
  285. package/kb/extra/subsystems/slots.md +200 -0
  286. package/kb/extra/subsystems/slots.zh.md +204 -0
  287. package/kb/extra/subsystems/spill.md +124 -0
  288. package/kb/extra/subsystems/spill.zh.md +124 -0
  289. package/kb/extra/subsystems/ssh.md +146 -0
  290. package/kb/extra/subsystems/ssh.zh.md +146 -0
  291. package/kb/extra/subsystems/storage.md +259 -0
  292. package/kb/extra/subsystems/storage.zh.md +259 -0
  293. package/kb/extra/subsystems/subagent.md +686 -0
  294. package/kb/extra/subsystems/subagent.zh.md +688 -0
  295. package/kb/extra/subsystems/subprocess.md +321 -0
  296. package/kb/extra/subsystems/subprocess.zh.md +321 -0
  297. package/kb/extra/subsystems/system-prompt.md +254 -0
  298. package/kb/extra/subsystems/system-prompt.zh.md +254 -0
  299. package/kb/extra/subsystems/terminal.md +184 -0
  300. package/kb/extra/subsystems/terminal.zh.md +184 -0
  301. package/kb/extra/subsystems/todo.md +3 -3
  302. package/kb/extra/subsystems/todo.zh.md +3 -3
  303. package/kb/extra/subsystems/token-meter.md +106 -0
  304. package/kb/extra/subsystems/token-meter.zh.md +106 -0
  305. package/kb/extra/subsystems/tools.md +747 -0
  306. package/kb/extra/subsystems/tools.zh.md +747 -0
  307. package/kb/extra/subsystems/translation.md +103 -0
  308. package/kb/extra/subsystems/translation.zh.md +103 -0
  309. package/kb/extra/subsystems/typert.md +690 -0
  310. package/kb/extra/subsystems/typert.zh.md +690 -0
  311. package/kb/extra/subsystems/user-questions.md +307 -0
  312. package/kb/extra/subsystems/user-questions.zh.md +307 -0
  313. package/kb/extra/subsystems/voice-input.md +164 -0
  314. package/kb/extra/subsystems/voice-input.zh.md +164 -0
  315. package/kb/extra/subsystems/web-client.md +100 -0
  316. package/kb/extra/subsystems/web-client.zh.md +100 -0
  317. package/kb/extra/subsystems/web-server.md +302 -0
  318. package/kb/extra/subsystems/web-server.zh.md +302 -0
  319. package/kb/extra/subsystems/web.md +206 -0
  320. package/kb/extra/subsystems/web.zh.md +206 -0
  321. package/kb/extra/subsystems/webhook.md +4 -4
  322. package/kb/extra/subsystems/webhook.zh.md +2 -2
  323. package/kb/extra/subsystems/workflow.md +278 -0
  324. package/kb/extra/subsystems/workflow.zh.md +278 -0
  325. package/kb/extra/subsystems/working-directory.md +64 -0
  326. package/kb/extra/subsystems/working-directory.zh.md +64 -0
  327. package/kb/extra/subsystems/workspace.md +647 -0
  328. package/kb/extra/subsystems/workspace.zh.md +647 -0
  329. package/kb/extra/subsystems/worktrees.md +76 -0
  330. package/kb/extra/subsystems/worktrees.zh.md +76 -0
  331. package/kb/extra/testing.md +4 -4
  332. package/kb/extra/testing.zh.md +4 -4
  333. package/kb/extra/tool-catalog.md +2824 -0
  334. package/kb/extra/tool-catalog.zh.md +2832 -0
  335. package/kb/extra/tool-execution-pipeline.md +65 -0
  336. package/kb/extra/tool-execution-pipeline.zh.md +67 -0
  337. package/kb/extra/ui-radius.md +117 -0
  338. package/kb/extra/ui-radius.zh.md +117 -0
  339. package/kb/extra/upgrade-guide/v0.1.7-rc.2/schedule-optional-bundle/guide.md +22 -0
  340. package/kb/extra/upgrade-guide/v0.1.7-rc.2/schedule-optional-bundle/guide.zh.md +22 -0
  341. package/kb/extra/upgrade-guide/v0.1.7-rc.2/transcript-view-legacy-normal/guide.md +25 -0
  342. package/kb/extra/upgrade-guide/v0.1.7-rc.2/transcript-view-legacy-normal/guide.zh.md +25 -0
  343. package/kb/extra/upgrade-guide/v0.2.0-rc.2/account-sign-in-errors/guide.md +18 -0
  344. package/kb/extra/upgrade-guide/v0.2.0-rc.2/account-sign-in-errors/guide.zh.md +18 -0
  345. package/kb/extra/upgrade-guide/v0.2.0-rc.2/bundled-python-tests/guide.md +18 -0
  346. package/kb/extra/upgrade-guide/v0.2.0-rc.2/bundled-python-tests/guide.zh.md +18 -0
  347. package/kb/extra/upgrade-guide/v0.2.0-rc.2/primary-runtime-python-aliases/guide.md +18 -0
  348. package/kb/extra/upgrade-guide/v0.2.0-rc.2/primary-runtime-python-aliases/guide.zh.md +18 -0
  349. package/kb/extra/upgrade-guide/v0.2.0-rc.2/remove-runtime-invariants/guide.md +23 -0
  350. package/kb/extra/upgrade-guide/v0.2.0-rc.2/remove-runtime-invariants/guide.zh.md +23 -0
  351. package/kb/extra/upgrade-guide/v0.2.0-rc.2/schedule-bundle-retired/guide.md +22 -0
  352. package/kb/extra/upgrade-guide/v0.2.0-rc.2/schedule-bundle-retired/guide.zh.md +22 -0
  353. package/kb/extra/upgrade-guide/v0.2.0-rc.2/subpath-plugin-display-manifest/guide.md +27 -0
  354. package/kb/extra/upgrade-guide/v0.2.0-rc.2/subpath-plugin-display-manifest/guide.zh.md +27 -0
  355. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/deepseek-model-discovery/guide.md +17 -0
  356. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/deepseek-model-discovery/guide.zh.md +17 -0
  357. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/desktop-test-auth-popup/guide.md +18 -0
  358. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/desktop-test-auth-popup/guide.zh.md +18 -0
  359. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/experimental-package-composition/guide.md +28 -0
  360. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/experimental-package-composition/guide.zh.md +28 -0
  361. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/instruction-home-override/guide.md +20 -0
  362. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/instruction-home-override/guide.zh.md +20 -0
  363. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/job-id-identity/guide.md +18 -0
  364. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/job-id-identity/guide.zh.md +18 -0
  365. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/jsonl-persistence-plugin/guide.md +18 -0
  366. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/jsonl-persistence-plugin/guide.zh.md +18 -0
  367. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/mock-messages-events/guide.md +17 -0
  368. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/mock-messages-events/guide.zh.md +17 -0
  369. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/native-subagent-bundle-tools/guide.md +31 -0
  370. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/native-subagent-bundle-tools/guide.zh.md +31 -0
  371. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/new-session-generations/guide.md +20 -0
  372. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/new-session-generations/guide.zh.md +20 -0
  373. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/plugin-option-placement/guide.md +20 -0
  374. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/plugin-option-placement/guide.zh.md +20 -0
  375. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/python-optional-resources/guide.md +18 -0
  376. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/python-optional-resources/guide.zh.md +18 -0
  377. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/python-ptc-sandbox/guide.md +21 -0
  378. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/python-ptc-sandbox/guide.zh.md +21 -0
  379. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/session-title-adapters/guide.md +18 -0
  380. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/session-title-adapters/guide.zh.md +18 -0
  381. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/session-title-provider-strategy/guide.md +20 -0
  382. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/session-title-provider-strategy/guide.zh.md +20 -0
  383. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/ssh-helper-launch/guide.md +19 -0
  384. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/ssh-helper-launch/guide.zh.md +19 -0
  385. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/subagent-activations/guide.md +59 -0
  386. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/subagent-activations/guide.zh.md +59 -0
  387. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/subagent-preset-composition/guide.md +21 -0
  388. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/subagent-preset-composition/guide.zh.md +21 -0
  389. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/team-direct-inbox/guide.md +21 -0
  390. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/team-direct-inbox/guide.zh.md +21 -0
  391. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/terminal-command-labels/guide.md +18 -0
  392. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/terminal-command-labels/guide.zh.md +18 -0
  393. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/tool-presentation-mode/guide.md +21 -0
  394. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/tool-presentation-mode/guide.zh.md +21 -0
  395. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/web-listener-trust-config/guide.md +36 -0
  396. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/web-listener-trust-config/guide.zh.md +36 -0
  397. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/working-directory/guide.md +25 -0
  398. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/working-directory/guide.zh.md +25 -0
  399. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/deepseek-account-identity-watch/guide.md +18 -0
  400. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/deepseek-account-identity-watch/guide.zh.md +18 -0
  401. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/deepseek-account-model-catalog/guide.md +27 -0
  402. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/deepseek-account-model-catalog/guide.zh.md +27 -0
  403. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/desktop-font-size-shortcuts/guide.md +18 -0
  404. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/desktop-font-size-shortcuts/guide.zh.md +18 -0
  405. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/from-default-profile-replaces-target/guide.md +20 -0
  406. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/from-default-profile-replaces-target/guide.zh.md +20 -0
  407. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/operator-connect/guide.md +18 -0
  408. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/operator-connect/guide.zh.md +18 -0
  409. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/pi-ai-azure-provider/guide.md +19 -0
  410. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/pi-ai-azure-provider/guide.zh.md +19 -0
  411. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/pi-ai-model-discovery/guide.md +17 -0
  412. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/pi-ai-model-discovery/guide.zh.md +17 -0
  413. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/plugin-install-over-installed/guide.md +20 -0
  414. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/plugin-install-over-installed/guide.zh.md +20 -0
  415. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/sdk-minimal-image-compaction/guide.md +32 -0
  416. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/sdk-minimal-image-compaction/guide.zh.md +32 -0
  417. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/stored-credentials-precedence/guide.md +25 -0
  418. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/stored-credentials-precedence/guide.zh.md +25 -0
  419. package/kb/extra/upgrade-guide/v0.2.1-alpha.3/plugin-engines-dsh/guide.md +21 -0
  420. package/kb/extra/upgrade-guide/v0.2.1-alpha.3/plugin-engines-dsh/guide.zh.md +21 -0
  421. package/kb/extra/upgrade-guide/v0.2.1-alpha.4/account-notification-fields/guide.md +18 -0
  422. package/kb/extra/upgrade-guide/v0.2.1-alpha.4/account-notification-fields/guide.zh.md +18 -0
  423. package/kb/extra/web-styling.md +12 -3
  424. package/kb/extra/web-styling.zh.md +12 -3
  425. package/kb/meta/search-index.json +2690 -404
  426. package/kb/meta/site-pages.txt +188 -188
  427. package/kb/meta/source.json +7 -6
  428. package/kb/meta/topics.md +10 -6
  429. package/kb/site/develop/basic/config.md +1 -0
  430. package/kb/site/develop/basic/index.md +1 -0
  431. package/kb/site/develop/basic/publish.md +12 -3
  432. package/kb/site/develop/basic/tool.md +1 -0
  433. package/kb/site/develop/cordis-tutorial/01-first-plugin.md +1 -0
  434. package/kb/site/develop/cordis-tutorial/02-lifecycle-and-effects.md +1 -0
  435. package/kb/site/develop/cordis-tutorial/03-services.md +1 -0
  436. package/kb/site/develop/cordis-tutorial/04-events.md +1 -0
  437. package/kb/site/develop/cordis-tutorial/05-config.md +28 -0
  438. package/kb/site/develop/cordis-tutorial/06-composition-and-hmr.md +3 -2
  439. package/kb/site/develop/cordis-tutorial/07-into-the-harness.md +1 -0
  440. package/kb/site/develop/cordis-tutorial/index.md +1 -0
  441. package/kb/site/develop/framework/events.md +1 -0
  442. package/kb/site/develop/framework/index.md +2 -1
  443. package/kb/site/develop/framework/service.md +1 -0
  444. package/kb/site/develop/practice/dynamic-cordis.md +9 -8
  445. package/kb/site/develop/practice/index.md +1 -0
  446. package/kb/site/develop/practice/llm-adapter.md +2 -1
  447. package/kb/site/en/develop/basic/config.md +1 -0
  448. package/kb/site/en/develop/basic/index.md +1 -0
  449. package/kb/site/en/develop/basic/publish.md +12 -3
  450. package/kb/site/en/develop/basic/tool.md +1 -0
  451. package/kb/site/en/develop/cordis-tutorial/01-first-plugin.md +1 -0
  452. package/kb/site/en/develop/cordis-tutorial/02-lifecycle-and-effects.md +1 -0
  453. package/kb/site/en/develop/cordis-tutorial/03-services.md +1 -0
  454. package/kb/site/en/develop/cordis-tutorial/04-events.md +1 -0
  455. package/kb/site/en/develop/cordis-tutorial/05-config.md +28 -0
  456. package/kb/site/en/develop/cordis-tutorial/06-composition-and-hmr.md +3 -2
  457. package/kb/site/en/develop/cordis-tutorial/07-into-the-harness.md +1 -0
  458. package/kb/site/en/develop/cordis-tutorial/index.md +1 -0
  459. package/kb/site/en/develop/framework/events.md +1 -0
  460. package/kb/site/en/develop/framework/index.md +2 -1
  461. package/kb/site/en/develop/framework/service.md +1 -0
  462. package/kb/site/en/develop/practice/dynamic-cordis.md +9 -8
  463. package/kb/site/en/develop/practice/index.md +1 -0
  464. package/kb/site/en/develop/practice/llm-adapter.md +2 -1
  465. package/kb/site/en/guide/github-review.md +8 -10
  466. package/kb/site/en/guide/mcp-memory.md +1 -0
  467. package/kb/site/en/guide/network-proxy.md +2 -1
  468. package/kb/site/en/guide/plugin-market.md +151 -0
  469. package/kb/site/en/guide/providers-custom-form.png +0 -0
  470. package/kb/site/en/guide/providers-models-page.png +0 -0
  471. package/kb/site/en/guide/providers.md +121 -83
  472. package/kb/site/en/guide/public-deployments.md +40 -0
  473. package/kb/site/en/guide/python-sdk.md +49 -29
  474. package/kb/site/en/guide/quickstart.md +2 -0
  475. package/kb/site/en/guide/schedule.md +70 -11
  476. package/kb/site/en/reference/agent-lifecycle.md +1 -0
  477. package/kb/site/en/reference/api-gateway.md +22 -13
  478. package/kb/site/en/reference/capability-seams.md +242 -77
  479. package/kb/site/en/reference/config-catalog.md +2102 -904
  480. package/kb/site/en/reference/cookbook/adding-a-package.md +57 -3
  481. package/kb/site/en/reference/cookbook/adding-a-settings-card.md +35 -64
  482. package/kb/site/en/reference/cookbook/adding-a-tool.md +4 -3
  483. package/kb/site/en/reference/cookbook/adding-an-llm-adapter.md +1 -0
  484. package/kb/site/en/reference/cookbook/extension-cookbook.md +6 -5
  485. package/kb/site/en/reference/cordis-api/context.md +1 -0
  486. package/kb/site/en/reference/cordis-api/events.md +1 -0
  487. package/kb/site/en/reference/cordis-api/fiber.md +4 -3
  488. package/kb/site/en/reference/cordis-api/inherited.md +16 -16
  489. package/kb/site/en/reference/cordis-api/registry.md +1 -0
  490. package/kb/site/en/reference/cordis-api/service.md +1 -0
  491. package/kb/site/en/reference/cordis-primer.md +1 -0
  492. package/kb/site/en/reference/experimental-persistence-catalog.md +20 -0
  493. package/kb/site/en/reference/index.md +27 -21
  494. package/kb/site/en/reference/persistence-catalog.md +8055 -62
  495. package/kb/site/en/reference/subsystems/approval.md +2 -1
  496. package/kb/site/en/reference/subsystems/client-modules.md +37 -15
  497. package/kb/site/en/reference/subsystems/client-resources.md +3 -1
  498. package/kb/site/en/reference/subsystems/commands.md +6 -1
  499. package/kb/site/en/reference/subsystems/compaction.md +50 -3
  500. package/kb/site/en/reference/subsystems/conversation.md +50 -6
  501. package/kb/site/en/reference/subsystems/core.md +100 -258
  502. package/kb/site/en/reference/subsystems/credentials.md +178 -13
  503. package/kb/site/en/reference/subsystems/filesystem.md +11 -0
  504. package/kb/site/en/reference/subsystems/goal.md +2 -1
  505. package/kb/site/en/reference/subsystems/index.md +20 -6
  506. package/kb/site/en/reference/subsystems/jobs.md +397 -132
  507. package/kb/site/en/reference/subsystems/llm-streaming.md +157 -50
  508. package/kb/site/en/reference/subsystems/lsp.md +1 -0
  509. package/kb/site/en/reference/subsystems/permission-presets.md +66 -29
  510. package/kb/site/en/reference/subsystems/persistence.md +6 -3
  511. package/kb/site/en/reference/subsystems/plan.md +3 -2
  512. package/kb/site/en/reference/subsystems/ptc-runtime.md +254 -0
  513. package/kb/site/en/reference/subsystems/sandbox.md +7 -5
  514. package/kb/site/en/reference/subsystems/schedule.md +392 -33
  515. package/kb/site/en/reference/subsystems/scope.md +2 -1
  516. package/kb/site/en/reference/subsystems/session-projection.md +22 -19
  517. package/kb/site/en/reference/subsystems/session-query.md +3 -0
  518. package/kb/site/en/reference/subsystems/session-reference.md +8 -6
  519. package/kb/site/en/reference/subsystems/session-telemetry.md +7 -4
  520. package/kb/site/en/reference/subsystems/session-title.md +20 -10
  521. package/kb/site/en/reference/subsystems/session.md +254 -91
  522. package/kb/site/en/reference/subsystems/settings.md +43 -292
  523. package/kb/site/en/reference/subsystems/shell.md +37 -28
  524. package/kb/site/en/reference/subsystems/sidebar-right.md +25 -12
  525. package/kb/site/en/reference/subsystems/skills.md +5 -6
  526. package/kb/site/en/reference/subsystems/slots.md +88 -70
  527. package/kb/site/en/reference/subsystems/spill.md +4 -3
  528. package/kb/site/en/reference/subsystems/storage.md +2 -2
  529. package/kb/site/en/reference/subsystems/subagent.md +207 -293
  530. package/kb/site/en/reference/subsystems/subprocess.md +17 -18
  531. package/kb/site/en/reference/subsystems/system-prompt.md +36 -3
  532. package/kb/site/en/reference/subsystems/terminal.md +1 -0
  533. package/kb/site/en/reference/subsystems/token-meter.md +1 -0
  534. package/kb/site/en/reference/subsystems/tools.md +42 -14
  535. package/kb/site/en/reference/subsystems/typert.md +362 -14
  536. package/kb/site/en/reference/subsystems/user-questions.md +131 -1
  537. package/kb/site/en/reference/subsystems/web-client.md +15 -9
  538. package/kb/site/en/reference/subsystems/web-server.md +157 -8
  539. package/kb/site/en/reference/subsystems/web.md +3 -2
  540. package/kb/site/en/reference/subsystems/workflow.md +10 -9
  541. package/kb/site/en/reference/subsystems/workspace.md +290 -42
  542. package/kb/site/en/reference/tool-catalog.md +908 -352
  543. package/kb/site/en/reference/tool-execution-pipeline.md +7 -3
  544. package/kb/site/guide/github-review.md +8 -10
  545. package/kb/site/guide/mcp-memory.md +1 -0
  546. package/kb/site/guide/network-proxy.md +2 -1
  547. package/kb/site/guide/plugin-market.md +151 -0
  548. package/kb/site/guide/providers-custom-form.zh.png +0 -0
  549. package/kb/site/guide/providers-models-page.zh.png +0 -0
  550. package/kb/site/guide/providers.md +132 -94
  551. package/kb/site/guide/public-deployments.md +40 -0
  552. package/kb/site/guide/python-sdk.md +49 -29
  553. package/kb/site/guide/quickstart.md +2 -0
  554. package/kb/site/guide/schedule.md +70 -11
  555. package/kb/site/reference/agent-lifecycle.md +1 -0
  556. package/kb/site/reference/api-gateway.md +28 -13
  557. package/kb/site/reference/capability-seams.md +242 -77
  558. package/kb/site/reference/config-catalog.md +2105 -906
  559. package/kb/site/reference/cookbook/adding-a-package.md +55 -3
  560. package/kb/site/reference/cookbook/adding-a-settings-card.md +35 -64
  561. package/kb/site/reference/cookbook/adding-a-tool.md +4 -3
  562. package/kb/site/reference/cookbook/adding-an-llm-adapter.md +1 -0
  563. package/kb/site/reference/cookbook/extension-cookbook.md +6 -5
  564. package/kb/site/reference/cordis-api/context.md +1 -0
  565. package/kb/site/reference/cordis-api/events.md +1 -0
  566. package/kb/site/reference/cordis-api/fiber.md +4 -3
  567. package/kb/site/reference/cordis-api/inherited.md +16 -16
  568. package/kb/site/reference/cordis-api/registry.md +1 -0
  569. package/kb/site/reference/cordis-api/service.md +1 -0
  570. package/kb/site/reference/cordis-primer.md +1 -0
  571. package/kb/site/reference/experimental-persistence-catalog.md +20 -0
  572. package/kb/site/reference/index.md +27 -21
  573. package/kb/site/reference/persistence-catalog.md +8061 -68
  574. package/kb/site/reference/subsystems/approval.md +2 -1
  575. package/kb/site/reference/subsystems/client-modules.md +37 -15
  576. package/kb/site/reference/subsystems/client-resources.md +3 -1
  577. package/kb/site/reference/subsystems/commands.md +6 -1
  578. package/kb/site/reference/subsystems/compaction.md +50 -3
  579. package/kb/site/reference/subsystems/conversation.md +51 -5
  580. package/kb/site/reference/subsystems/core.md +102 -258
  581. package/kb/site/reference/subsystems/credentials.md +178 -13
  582. package/kb/site/reference/subsystems/filesystem.md +11 -0
  583. package/kb/site/reference/subsystems/goal.md +2 -1
  584. package/kb/site/reference/subsystems/index.md +20 -6
  585. package/kb/site/reference/subsystems/jobs.md +396 -131
  586. package/kb/site/reference/subsystems/llm-streaming.md +157 -50
  587. package/kb/site/reference/subsystems/lsp.md +1 -0
  588. package/kb/site/reference/subsystems/permission-presets.md +66 -29
  589. package/kb/site/reference/subsystems/persistence.md +6 -3
  590. package/kb/site/reference/subsystems/plan.md +3 -2
  591. package/kb/site/reference/subsystems/ptc-runtime.md +254 -0
  592. package/kb/site/reference/subsystems/sandbox.md +7 -5
  593. package/kb/site/reference/subsystems/schedule.md +392 -33
  594. package/kb/site/reference/subsystems/scope.md +4 -1
  595. package/kb/site/reference/subsystems/session-projection.md +22 -19
  596. package/kb/site/reference/subsystems/session-query.md +3 -0
  597. package/kb/site/reference/subsystems/session-reference.md +8 -6
  598. package/kb/site/reference/subsystems/session-telemetry.md +7 -4
  599. package/kb/site/reference/subsystems/session-title.md +20 -10
  600. package/kb/site/reference/subsystems/session.md +254 -91
  601. package/kb/site/reference/subsystems/settings.md +43 -292
  602. package/kb/site/reference/subsystems/shell.md +37 -28
  603. package/kb/site/reference/subsystems/sidebar-right.md +25 -12
  604. package/kb/site/reference/subsystems/skills.md +5 -6
  605. package/kb/site/reference/subsystems/slots.md +92 -70
  606. package/kb/site/reference/subsystems/spill.md +3 -2
  607. package/kb/site/reference/subsystems/storage.md +2 -2
  608. package/kb/site/reference/subsystems/subagent.md +208 -296
  609. package/kb/site/reference/subsystems/subprocess.md +17 -18
  610. package/kb/site/reference/subsystems/system-prompt.md +36 -3
  611. package/kb/site/reference/subsystems/terminal.md +1 -0
  612. package/kb/site/reference/subsystems/token-meter.md +1 -0
  613. package/kb/site/reference/subsystems/tools.md +42 -14
  614. package/kb/site/reference/subsystems/typert.md +362 -14
  615. package/kb/site/reference/subsystems/user-questions.md +132 -2
  616. package/kb/site/reference/subsystems/web-client.md +15 -9
  617. package/kb/site/reference/subsystems/web-server.md +157 -8
  618. package/kb/site/reference/subsystems/web.md +3 -2
  619. package/kb/site/reference/subsystems/workflow.md +10 -9
  620. package/kb/site/reference/subsystems/workspace.md +290 -42
  621. package/kb/site/reference/tool-catalog.md +862 -306
  622. package/kb/site/reference/tool-execution-pipeline.md +7 -3
  623. package/package.json +2 -2
  624. package/skills/dsh-dev-sandbox.md +67 -0
  625. package/skills/dsh-plugin-dev-kb.md +5 -4
  626. package/kb/extra/defensive-patterns.md +0 -33
  627. package/kb/extra/defensive-patterns.zh.md +0 -35
  628. package/kb/site/en/reference/subsystems/code-runtime.md +0 -198
  629. package/kb/site/en/reference/subsystems/invariants.md +0 -91
  630. package/kb/site/reference/subsystems/code-runtime.md +0 -198
  631. package/kb/site/reference/subsystems/invariants.md +0 -91
@@ -1,15 +1,16 @@
1
1
  ---
2
2
  editSource: "docs/subsystems/jobs.zh.md"
3
+ rawMarkdownPath: "reference/subsystems/jobs.md"
3
4
  outline: [2,3]
4
5
  ---
5
6
 
6
7
  # 后台任务运行时
7
8
 
8
- 长时间运行的生产方、`ctx.jobs` 与任务控制命令共用的类型。[运行时 Agent Note](https://github.com/deepseek-ai/deepseek-harness/blob/master/.agents/notes/implemented/architecture/2026-06-20-generic-long-running-tool-runtime.zh.md) 负责设计;本页记录 [`packages/jobs/jobs/src/types.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/jobs/jobs/src/types.ts) 中的确切字段和变体。
9
+ 长时间运行的生产方、`ctx.jobs` 与任务控制命令共用的类型。[seam 收敛 Agent Note](https://github.com/deepseek-ai/deepseek-harness/blob/master/.agents/notes/implemented/architecture/2026-09-03-jobs-seam-consolidation.zh.md) 负责当前设计,[运行时 reference](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/jobs/jobs/README.zh.md) 记录其起源;本页记录 [`packages/jobs/jobs/src/types.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/jobs/jobs/src/types.ts) 与客户端安全叶子 [`view.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/jobs/jobs/src/view.ts) 中的确切字段与变体。
9
10
 
10
11
  ## ID 与状态
11
12
 
12
- `JobId` 是按 `<kind>-N` 生成的[品牌化 id](./core.md#branded-ids)。访问控制依赖拥有者授权,而非 id 的保密性。`JobKind` 派生自可合并扩展的 map;注册表将各个 kind 视为不透明的 id 命名空间。
13
+ `JobId` 是按 `<kind>-<short-uuid>` 生成的[品牌化 id](./core.md#branded-ids),kind 后是 UUID 的 16 位小写十六进制字符。访问控制依赖拥有者授权,而非 id 的保密性。`JobKind` 派生自可合并扩展的 map;注册表将各个 kind 视为不透明的 id 命名空间。
13
14
 
14
15
  ```ts type-equiv
15
16
  /**
@@ -18,49 +19,142 @@ outline: [2,3]
18
19
  */
19
20
  interface JobKindMap {
20
21
  bash: 'bash'
21
- subagent: 'subagent'
22
22
  }
23
23
  ```
24
24
 
25
- `JobStatus` 为 `'running' | 'stopping' | 'completed' | 'killed' | 'failed'`;生产方特有的事实归入 `JobSnapshot.detail`。
25
+ `JobStatus` 为 `'running' | 'stopping' | 'completed' | 'killed' | 'failed'`;生产方特有的事实在运行期间归入 `JobView.progress`,结算后归入 `JobView.detail`。
26
+
27
+ <a id="session-lifecycle-records"></a>
28
+
29
+ ## Session 生命周期记录
30
+
31
+ 有所有者的 job 在原始所有者 Session 中发布 `job/registered` 与 `job/settled`。全局唯一的 `jobId` 同时配对这两条记录并控制运行中的 job。SDK 通过 `session.event` 转发这些仅日志记录,不依赖输出读取。时间戳描述注册表提交时刻,不是 CPU 时间或精确的 OS 进程边界;缺少结算时保持不完整。`producerReported` 表示生产方通过兑现 `done` 报告了终态;强制销毁或 promise 拒绝时为 false,不独立确认资源已释放。
32
+
33
+ `job/settled` 可能出现在 `turn/end` 之后。SDK run 结果只覆盖自身观测窗口;需要较晚结算的消费方应保留 Session 订阅或读取持久化历史。轮次完成不表示所有有主 job 都已停止。
34
+
35
+ 应用销毁可能在有主 job 的最后一条结算写入存储前停止 Session 事件路由或关闭写句柄。正常的一次性运行结束、信号关停和进程硬退出都可能出现这种情况。即使运行期注册表报告了终止,缺少 `job/settled` 的区间仍不完整;消费方不得虚构结束时间戳。
36
+
37
+ ```ts type-equiv
38
+ /** Durable identity and registration time of one owned job execution. */
39
+ interface JobRegisteredData {
40
+ /** Unique execution id accepted by job controls and retained in Session history. */
41
+ readonly jobId: JobId
42
+ /** Original owner; copied history does not transfer execution ownership. */
43
+ readonly owner: SessionId
44
+ /** Producer kind. */
45
+ readonly kind: string
46
+ /** Producer-supplied label. */
47
+ readonly label: string
48
+ /** Unix epoch milliseconds when registration committed. */
49
+ readonly startedAt: number
50
+ /** Creating tool invocation, when the producer was called through a tool. */
51
+ readonly toolCall?: JobToolCall
52
+ }
53
+ ```
54
+
55
+ ```ts type-equiv
56
+ /** Registry settlement, including whether the producer reported a terminal outcome. */
57
+ interface JobSettledData extends JobRegisteredData {
58
+ /** Unix epoch milliseconds when the registry committed the terminal record. */
59
+ readonly finishedAt: number
60
+ /** Recorded terminal outcome. */
61
+ readonly status: JobOutcome['status']
62
+ /** Source of the termination request, or producer completion. */
63
+ readonly cause: JobSettleCause
64
+ /** True when done fulfilled; false for rejection or forced failure. Does not certify resource release. */
65
+ readonly producerReported: boolean
66
+ /** Terminal reason, including a recorded kill reason when applicable. */
67
+ readonly detail?: string
68
+ }
69
+ ```
26
70
 
27
71
  ## 生产方约定
28
72
 
29
- `JobStart` 声明身份和启动器。运行时会在调用 `run()` 前完成预检,随后提交注册,不再执行可能失败的步骤。生产方拥有执行资源;运行时拥有身份、访问权限和生命周期状态。
73
+ `JobSpec` 声明身份、拥有者会话、可选的拉取式 `output` 源与启动器。运行时会在完成预检后携带该 job 的 `JobHandle` 调用 `run()`,随后提交注册,不再执行可能失败的步骤。生产方拥有执行资源;运行时拥有身份、访问、生命周期状态与输出环。
74
+
75
+ ```ts type-equiv
76
+ /** Tool dispatch that created a job; nested calls retain their root invocation. */
77
+ interface JobToolCall {
78
+ /** Exact invocation, including a PTC sub-call when applicable. */
79
+ readonly callId: SessionEventMap['tool/call']['callId']
80
+ /** Root model-requested invocation owning this execution. */
81
+ readonly rootCallId: SessionEventMap['tool/call']['callId']
82
+ }
83
+ ```
30
84
 
31
85
  ```ts type-equiv
32
86
  /**
33
87
  * Producer declaration passed to {@link JobRegistry.start}. The runtime
34
88
  * preflights access and cleanup before invoking {@link run}; the producer owns
35
- * execution resources while the runtime owns identity and lifecycle state.
89
+ * execution resources while the runtime owns identity, lifecycle state, and
90
+ * the output ring.
36
91
  */
37
- interface JobStart {
38
- /** Producer kind — also the id prefix (`bash`, `subagent`, …). */
92
+ interface JobSpec {
93
+ /** Producer kind — also the id prefix (`bash`, …). */
39
94
  kind: JobKind
40
95
  /** One-line model-facing label (the command; the delegation description). */
41
96
  label: string
97
+ /**
98
+ * Owning session. Access is fenced by it, and the owner's live Agent must be
99
+ * the one currently registered under that id: its disposal cancels and
100
+ * awaits the job. Omitting the owner creates an unowned job, open to any
101
+ * caller until service disposal.
102
+ */
103
+ owner?: SessionId
104
+ /** Creating tool invocation, retained in the durable lifecycle records. */
105
+ toolCall?: JobToolCall
42
106
  /**
43
107
  * Optional UTF-8 byte cap for each complete model-facing completion notice or
44
- * output read, including controller status metadata.
108
+ * output read, including controller status metadata. Independent of ring
109
+ * retention: it bounds the consuming model surface, never observers.
45
110
  */
46
111
  outputLimitBytes?: number
47
112
  /**
48
- * Owning live agent. Access is fenced by its session id, and agent disposal
49
- * cancels and awaits the job. The instance must be the one currently
50
- * registered under its agent id. Omitting the owner creates an unowned job,
51
- * open to any caller until service disposal.
113
+ * Pull sources the registry pumps into the ring at its own cadence.
114
+ * Producers that narrate their own progress use {@link JobHandle.append}
115
+ * instead; a job may use both.
52
116
  */
53
- owner?: Agent
117
+ output?: readonly JobOutputSource[]
54
118
  /**
55
119
  * Start the work after preflight and synchronously return its hooks. Called
56
- * once; a throw leaves nothing registered, and the producer must clean up any
57
- * partially started resources.
120
+ * once with the job's producer face; a throw leaves nothing registered (the
121
+ * spent ordinal is skipped), and the producer must clean up any partially
122
+ * started resources.
123
+ * @param job - the issued id plus the ring append and progress writers.
124
+ */
125
+ run(job: JobHandle): JobHooks
126
+ }
127
+ ```
128
+
129
+ ```ts type-equiv
130
+ /**
131
+ * Producer face of one registered job, handed to {@link JobSpec.run} and
132
+ * valid for the job's whole life. All methods are synchronous. Writes staged
133
+ * inside the starter call are retained and become visible with the
134
+ * registration commit; after settlement — the producer's own outcome, a kill,
135
+ * or a registry-forced teardown end — writes log and drop instead of
136
+ * throwing, so a producer's trailing flush cannot break its own teardown path.
137
+ */
138
+ interface JobHandle {
139
+ /** The registry-issued id (`<kind>-<short-uuid>`). */
140
+ readonly id: JobId
141
+ /**
142
+ * Append one chunk to the output ring. Offsets advance by the chunk's UTF-8
143
+ * byte length; an empty chunk is dropped without waking observers.
144
+ * @param text - the chunk text, exactly as produced.
145
+ * @param options - stream label and gap marker.
146
+ */
147
+ append(text: string, options?: JobAppendOptions): void
148
+ /**
149
+ * Replace the live progress line (`3/10`, the current phase). Settlement
150
+ * clears it; the terminal reason travels in {@link JobOutcome.detail}.
151
+ * @param line - the new progress line.
58
152
  */
59
- run(): JobHooks
153
+ updateProgress(line: string): void
60
154
  }
61
155
  ```
62
156
 
63
- `JobHooks.done` 会在生产方释放其资源后 resolve,而不是仅在工作完成时 resolve。可选的 `readOutput` 用来区分会消费输出的流式任务和仅有最终输出的任务。
157
+ `JobHooks.done` 会在生产方释放其资源后 resolve,而不是仅在工作完成时 resolve。结果是一个值而非流的 job——workflow 渲染出的结果——把它作为 `JobOutcome.result` 返回;模型在结算后的第一次读取携带它一次。
64
158
 
65
159
  ```ts type-equiv
66
160
  /** Hooks through which the runtime controls and observes producer work. */
@@ -77,12 +171,6 @@ interface JobHooks {
77
171
  * registry record without claiming that the work stopped.
78
172
  */
79
173
  done: Promise<JobOutcome>
80
- /**
81
- * Consume output produced since the previous call. The producer formats
82
- * truncation and spill notices. Absence marks a final-output-only job; each
83
- * job has one consuming cursor.
84
- */
85
- readOutput?(): string
86
174
  }
87
175
  ```
88
176
 
@@ -91,73 +179,215 @@ interface JobHooks {
91
179
  interface JobOutcome {
92
180
  /** How the job ended: finished (`completed`), cancelled (`killed`), or broke (`failed`). */
93
181
  status: 'completed' | 'killed' | 'failed'
94
- /** Kind-specific detail rendered into status lines ('exit code: 3', 'max-tokens'). */
182
+ /**
183
+ * Terminal reason rendered into status lines (`exit code: 3`, `max-tokens`).
184
+ * When the job settles `killed` after a {@link JobRegistry.kill} with a
185
+ * reason, the registry appends that reason.
186
+ */
95
187
  detail?: string
96
- /** Final output for jobs without `readOutput`; stream jobs leave it unset. */
97
- output?: string
188
+ /**
189
+ * Return value for jobs whose result is a value rather than a stream (a
190
+ * workflow's rendered result, a subagent's report). The output ring carries
191
+ * the stream; this is handed out once by the model's next {@link JobRegistry.read}.
192
+ */
193
+ result?: string
194
+ }
195
+ ```
196
+
197
+ 拉取源把一个非消耗的偏移读取器——子进程的 `readFrom` 家族——交给注册表。注册表按自己的节奏(`dsh-jobs-local` 的 `pumpPollMs`)泵送每个源,并在结算封环之前再排干一次,因此生产方不需要把任何东西折进 `done`。
198
+
199
+ ```ts type-equiv
200
+ /**
201
+ * A pull source the registry pumps into the job's output ring — the subprocess
202
+ * `readFrom` family. The registry owns the cadence and drains every source one
203
+ * last time before settlement closes the ring, so a producer folds nothing
204
+ * into its `done`.
205
+ */
206
+ interface JobOutputSource {
207
+ /** Stream label attached to every chunk this source yields. */
208
+ channel?: JobChannel
209
+ /**
210
+ * Read everything captured since `fromByte` without consuming it.
211
+ * @param fromByte - whole-stream offset to resume from (a prior read's `nextOffset`; 0 first).
212
+ * @returns the delta text, the next offset, the lossy flag, and the spill path the source currently keeps.
213
+ */
214
+ read(fromByte: number): JobSourceRead
215
+ }
216
+ ```
217
+
218
+ ```ts type-equiv
219
+ /** One incremental read from a {@link JobOutputSource}. */
220
+ interface JobSourceRead {
221
+ /** Text captured since the requested offset (the whole retained tail when lossy). */
222
+ text: string
223
+ /** Whole-stream offset to resume from on the next read. */
224
+ nextOffset: number
225
+ /** True when the requested offset slid out of the source's retained window. */
226
+ lossy: boolean
227
+ /**
228
+ * Host path of a file holding the complete stream, when the source
229
+ * currently keeps an intact one. Reported on every read, so the registry
230
+ * tracks it as source metadata: a later read without it withdraws the file.
231
+ */
232
+ spillPath?: string
233
+ }
234
+ ```
235
+
236
+ ## 输出环
237
+
238
+ 每个 job 拥有一个有界的环。拉取源被泵入其中,`JobHandle.append` 的推送整块落地;模型通过注册表保管的游标(`JobRegistry.read`)消耗该环,任意数量的观察者按绝对字节偏移读取它(`JobRegistry.readAt`),二者互不干扰。`JobChannel` 标记 `stdout`、`stderr` 与 `log`;`log` 是只到达观察者、从不进入模型消耗式读取的生产方叙述。结算即封流并把保留量裁剪到结算上限——环没有独立的生命周期。拉取源保留的 spill 文件是 job 元数据(`JobView.output.spillPaths`,每次泵读取都会刷新),不是逐块元数据,所以环淘汰了字节之后、甚至缺口 chunk 本身也被淘汰之后,模型的丢失输出提示仍能点名该文件。浏览器通过 [`dsh-api-job-controller`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/api/job-controller/README.zh.md) 的 Remote 流 `job.list` 与 `job.follow` 触达名册与环,其帧列于下文的 Cordis API 一节。
239
+
240
+ ```ts type-equiv
241
+ /** One chunk of a job's output ring: absolute offset, text, channel, and loss marker. */
242
+ interface JobChunk {
243
+ /** Absolute offset of the chunk's first byte; offsets never move once assigned. */
244
+ readonly at: number
245
+ /** Chunk text exactly as appended (possibly tail-trimmed by retention). */
246
+ readonly text: string
247
+ /** Stream label, when the producer supplied one. */
248
+ readonly channel?: JobChannel
249
+ /** Bytes immediately before this chunk were lost, at the producer or to retention. */
250
+ readonly gapBefore?: true
251
+ }
252
+ ```
253
+
254
+ ```ts type-equiv
255
+ /** Result of one non-consuming {@link JobRegistry.readAt}. */
256
+ interface JobOutputRead {
257
+ /** Retained chunks overlapping `[from, total)`, in offset order. */
258
+ chunks: readonly JobChunk[]
259
+ /**
260
+ * Offset to resume from — the ring's current `total`. Always a chunk
261
+ * boundary: appends land whole and trimming only advances chunk starts, and
262
+ * consumers concatenate `chunks` under that assumption, so a provider
263
+ * serving partial chunks would silently duplicate text.
264
+ */
265
+ next: number
266
+ /** True when `from` fell below the oldest retained byte, so bytes are missing before `chunks`. */
267
+ lossy: boolean
98
268
  }
99
269
  ```
100
270
 
101
271
  ## 消费方视图
102
272
 
103
- 快照是每次新建的只读投影。`ownerSession` 携带用于授权的共享 `SessionId`;完成监听器则会另行收到用于生命周期清理的确切拥有者对象。另一个接口已经交付终止状态或承诺交付时,`reported` 会抑制完成通知;排空 owner 或服务的 teardown 取消同样计入。
273
+ `JobView` 是每个读者都消费的唯一投影:模型工具、浏览器名册与观测流。`owner` 携带划定访问边界的会话 id;注册表为生命周期清理解析其背后的活体 `Agent`,从不把该对象交出去。`progress` 是生产方的实时行,结算时清除;`detail` 是终态原因,合并了记录下来的 kill 原因。
104
274
 
105
275
  ```ts type-equiv
106
276
  /**
107
- * A read-only projection of one job, safe to hand to listeners and tools —
108
- * a fresh object per call, never live registry state.
277
+ * Read-only projection of one job — a fresh object per call, never live
278
+ * registry state. The model tools, the browser roster, and the observation
279
+ * stream all consume this one shape.
109
280
  */
110
- interface JobSnapshot {
111
- /** The registry-issued id (`<kind>-N`). */
112
- id: JobId
113
- /** The producer kind the job was registered with. */
114
- kind: JobKind
115
- /** The producer-supplied one-line label. */
116
- label: string
117
- /** Producer-owned cap for complete model-facing notices and output reads. */
118
- outputLimitBytes?: number
281
+ interface JobView {
282
+ /** The registry-issued id (`<kind>-<short-uuid>`). */
283
+ readonly id: JobId
119
284
  /**
120
- * Owner session id used for authorization and correlation; absent for
121
- * unowned jobs. Completion listeners receive the exact {@link Agent}
122
- * separately through {@link JobDoneListener}.
285
+ * The producer kind the job was registered with: a Host-registered
286
+ * `JobKind`, carried as an open string because a browser bundle or a Remote
287
+ * codec sees only the `JobKindMap` merges its own program compiles.
123
288
  */
124
- ownerSession?: SessionId
289
+ readonly kind: string
290
+ /** The producer-supplied one-line label. */
291
+ readonly label: string
292
+ /** Owning session; absent for an unowned job, which every caller can see. */
293
+ readonly owner?: SessionId
294
+ /** Producer-owned cap for complete model-facing notices and reads, in UTF-8 bytes. */
295
+ readonly outputLimitBytes?: number
125
296
  /** Current lifecycle state. */
126
- status: JobStatus
127
- /** Kind-specific status detail, present once the producer supplied one (usually terminal). */
128
- detail?: string
297
+ readonly status: JobStatus
298
+ /** The producer's live progress line (`3/10`, the current phase); cleared at settlement. */
299
+ readonly progress?: string
300
+ /** Terminal reason (`exit code: 3`); a recorded kill reason is merged in. */
301
+ readonly detail?: string
129
302
  /** Epoch ms when the job was registered. */
130
- startedAt: number
131
- /** Epoch ms when the job settled; absent while `running`/`stopping`. */
132
- finishedAt?: number
303
+ readonly startedAt: number
304
+ /** Epoch ms when the job settled; absent while live. */
305
+ readonly finishedAt?: number
133
306
  /**
134
- * True when a kill, read, wait, or teardown cancel has reported or committed
135
- * to report the terminal state. Completion reporters suppress redundant
136
- * notices when set. Teardown claims it because the owner or service being
137
- * destroyed leaves no reader: a reporter that opens a turn on notice would
138
- * otherwise spend a model request per teardown layer.
307
+ * The output ring's absolute coordinates and the complete-stream files
308
+ * behind it. `total` is the offset the next chunk starts at (0 while
309
+ * nothing was written); `earliest` is the oldest retained byte, greater
310
+ * than zero exactly when retention dropped the head. `spillPaths` lists the
311
+ * spill files the job's pull sources currently keep, in source order and
312
+ * deduplicated, and is absent while no source keeps one: it outlives any
313
+ * chunk, so a reader below `earliest` can still name where the bytes went.
139
314
  */
140
- reported: boolean
315
+ readonly output: { readonly total: number; readonly earliest: number; readonly spillPaths?: readonly string[] }
141
316
  }
142
317
  ```
143
318
 
319
+ `JobRegistry` 的 `list`、`get`、`read`、`readAt`、`kill` 和 `wait` 各自接收调用方的 `SessionId`;省略调用方时仅可访问无主 job,传入会话时还可访问该会话拥有的 job。
320
+
144
321
  ```ts type-equiv
145
- /** Output and post-read state returned by {@link JobRegistry.read}. */
322
+ /** Output and post-read state returned by the consuming {@link JobRegistry.read}. */
146
323
  interface JobRead {
147
- /**
148
- * Stream kinds: the consuming delta since the previous read. Final-output
149
- * kinds: empty while live, the terminal {@link JobOutcome.output} (or
150
- * empty) once settled — idempotent, never consumed.
151
- */
152
- text: string
324
+ /** Ring chunks appended since the model cursor, in offset order; every channel included. */
325
+ chunks: readonly JobChunk[]
326
+ /** True when the cursor fell below the oldest retained byte, so bytes are missing before `chunks`. */
327
+ lossy: boolean
328
+ /** The producer's {@link JobOutcome.result}, handed out by the first read after settlement only. */
329
+ result?: string
153
330
  /** The job's state at read time. */
154
- snapshot: JobSnapshot
331
+ job: JobView
155
332
  }
156
333
  ```
157
334
 
335
+ ## 事件
336
+
337
+ 注册表通过一条带过滤的流宣布每次提交。生命周期事件携带其所宣布的提交之后的投影;`settled` 标出原因,完成播报方据此跳过 teardown;`output` 只携带 id 与新的 total,观察者从自己的游标读取,注册表从不推送负载。
338
+
339
+ ```ts type-equiv
340
+ /**
341
+ * One lifecycle or output event. Lifecycle events carry the job's projection
342
+ * after the commit they announce; `output` carries only the id and the new
343
+ * total, so an observer schedules a {@link JobRegistry.readAt} from its own
344
+ * cursor and the registry never pushes payloads.
345
+ */
346
+ type JobEvent =
347
+ | {
348
+ /** Registration commit, progress line change, stopping transition, or removal from the visible set. */
349
+ readonly type: 'registered' | 'progress' | 'stopping' | 'removed'
350
+ readonly job: JobView
351
+ }
352
+ | {
353
+ readonly type: 'settled'
354
+ readonly job: JobView
355
+ readonly cause: JobSettleCause
356
+ /**
357
+ * Whether this settlement released a live {@link JobRegistry.wait}. That
358
+ * waiter's caller receives the terminal projection as its own result, so
359
+ * a completion reporter treats an awaited settlement as already delivered
360
+ * and reports only the unawaited ones. A wait that timed out or was
361
+ * aborted before the settlement does not count.
362
+ */
363
+ readonly awaited: boolean
364
+ }
365
+ | {
366
+ readonly type: 'output'
367
+ readonly id: JobId
368
+ /** Owning session, absent for an unowned job. */
369
+ readonly owner?: SessionId
370
+ /** The ring's total after the append (or at settlement, which ends the stream). */
371
+ readonly total: number
372
+ }
373
+ ```
374
+
375
+ ```ts type-equiv
376
+ /**
377
+ * Who a subscription hears about. `{ owner }` delivers that session's jobs
378
+ * plus every unowned job (the set that session can see). `{ owners: 'scope' }`
379
+ * delivers the owners composed under the subscribing context — one registry
380
+ * serves every composition in the process, and a mount under one preset must
381
+ * not hear another preset's agents. `{ owners: 'all' }` delivers everything.
382
+ */
383
+ type JobEventFilter =
384
+ | { readonly owner: SessionId }
385
+ | { readonly owners: 'all' | 'scope' }
386
+ ```
387
+
158
388
  ## 服务行为
159
389
 
160
- 抽象的 [`JobRegistry`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/jobs/jobs/src/index.ts) Service Definition 规定原子 `start`、限定调用方作用域的 `get` 和 `list`、`read`、`kill`、有界 `wait`、故障隔离的 `onJobDone` 与 `onJobsChanged` 监听器,以及 `attachController`;[`LocalJobRegistry`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/jobs/jobs-local/src/index.ts) 是其进程局部 Service Provider。授权会比较拥有者会话;拥有者清理与准入会使用确切的已注册 `Agent` 实例。本地 Service Provider 的 `maxConcurrentJobsPerOwner` 配置必须是正的安全整数,默认值为 `10`;它按确切 owner 统计 `running` 与 `stopping` 记录,所有无 owner 任务共享一个服务级桶,并在生产方终止结算后释放容量。Service Definition 约定见 [`dsh-jobs`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/jobs/jobs/README.zh.md),注册表生命周期与准入策略见 [`dsh-jobs-local`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/jobs/jobs-local/README.zh.md),面向模型的 Consumer 见 [`dsh-tool-jobs`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/jobs/tool-jobs/README.zh.md)。
390
+ 抽象的 [`JobRegistry`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/jobs/jobs/src/index.ts) Service Definition 规定了原子化的 `start`、各自接收调用方的 `list`、`get`、消耗式 `read`、非消耗的 `readAt`、`kill` 与有界的 `wait`、带过滤的 `events` 流,以及 `attachController`;[`LocalJobRegistry`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/jobs/jobs-local/src/index.ts) 是进程本地的 Service Provider。授权比较拥有者会话;拥有者清理与准入使用 job 启动时登记在该拥有者会话下的活体 `Agent`。本地提供方的正安全整数配置 `maxConcurrentJobsPerOwner` 默认为 `10`,按精确拥有者统计 `running` 加 `stopping` 记录,无主任务共享一个桶;生产方的终态结算释放容量;`retainBytes`(默认 262144)与 `settledRetainBytes`(默认 16384)约束每个环的运行期与结算后保留量,`pumpPollMs`(默认 150)是拉取节奏。参见 [`dsh-jobs`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/jobs/jobs/README.zh.md) 了解 Service Definition 约定,[`dsh-jobs-local`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/jobs/jobs-local/README.zh.md) 了解注册表生命周期与准入策略,[`dsh-tool-jobs`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/jobs/tool-jobs/README.zh.md) 了解面向模型的 Consumer。
161
391
 
162
392
  <!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
163
393
 
@@ -167,18 +397,66 @@ interface JobRead {
167
397
 
168
398
  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.md#dispatch-modes), and the framework-inherited `ctx` API lives in [cordis-api/inherited.md](../cordis-api/inherited.md).
169
399
 
400
+ <a id="ctxjobcontroller--jobcontroller"></a>
401
+
402
+ ### `ctx.jobController` — `JobController`
403
+
404
+ Host service backing the generated `ctx.remote.job` namespace.
405
+
406
+ ```ts cordis-catalog
407
+ /**
408
+ * Stream the jobs one session can see — its own plus every unowned job —
409
+ * as whole-set frames: one on open, then one after each coalesced burst of
410
+ * lifecycle commits. The stream has no natural end; the carrier closes it.
411
+ * @param request - the session whose visible set to mirror.
412
+ * @param signal - cancellation owned by the Remote stream carrier.
413
+ * @returns the roster frames.
414
+ */
415
+ @Remote({ mode: 'stream' }) list(request: JobListRequest, signal: AbortSignal): AsyncIterable<JobListFrame>
416
+
417
+ /**
418
+ * Stream one job's retained output from an absolute byte offset, then its
419
+ * terminal projection once settled and drained. Non-consuming: the
420
+ * model-facing cursor and notice state never observe these reads. The
421
+ * request's session is the fenced read's caller; the registry rejects a
422
+ * job the session cannot see and an unknown job.
423
+ * @param request - target job, owning session, and optional resume offset.
424
+ * @param signal - cancellation owned by the Remote stream carrier.
425
+ * @returns anchor, coalesced output frames, and the terminal status.
426
+ */
427
+ @Remote({ mode: 'stream' }) follow(request: JobFollowRequest, signal: AbortSignal): AsyncIterable<JobFollowFrame>
428
+
429
+ /**
430
+ * Kill one background job on a human's behalf. The request's session is
431
+ * the fenced read's caller, so the job must be one that session can see:
432
+ * the registry's owner fence is the only access rule, and a child session's
433
+ * own jobs are killable from its list like any other. The kill records
434
+ * `cancelled by the user` as its reason; it is not one the model requested,
435
+ * so the owning agent still receives the completion notice, and a shell
436
+ * tool waiting on that job reads the reason in its own result.
437
+ * @param request - Session whose job list carries the job, and the job id.
438
+ * @returns the registry's admission of the kill request.
439
+ */
440
+ @Remote('kill') kill(request: JobKillRequest): JobKillValue
441
+ ```
442
+
443
+ Source: [`packages/api/job-controller/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/api/job-controller/src/index.ts)
444
+
170
445
  <a id="ctxjobs--jobregistry-abstract-seam"></a>
171
446
 
172
447
  ### `ctx.jobs` — `JobRegistry` (abstract seam)
173
448
 
174
- 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).
449
+ 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).
175
450
 
176
451
  Implementations must honor these semantics:
177
452
 
178
- - 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.
453
+ - 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.
179
454
  - Owned-job access is fenced by the owner's session id. Ids are predictable, so authorization — not secrecy — is the boundary.
180
- - 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.
181
- - 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.
455
+ - 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.
456
+ - 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.
457
+ - 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.
458
+ - 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.
459
+ - 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.
182
460
 
183
461
  ```ts cordis-catalog
184
462
  /**
@@ -186,96 +464,83 @@ Implementations must honor these semantics:
186
464
  * admission before starting and atomically registering work. Any preflight
187
465
  * rejection leaves no job id or execution resource. A throwing starter
188
466
  * leaves nothing registered; after it returns, registration cannot fail.
189
- * Settlement records the outcome, notifies listeners, and releases waiters.
190
- * @param spec - job identity, owner, and synchronous starter.
191
- * @returns the registry-issued `<kind>-N` id.
467
+ * @param spec - job identity, owner, output sources, and synchronous starter.
468
+ * @returns the registry-issued `<kind>-<short-uuid>` id.
192
469
  */
193
- abstract start(spec: JobStart): JobId
470
+ abstract start(spec: JobSpec): JobId
194
471
 
195
472
  /**
196
- * List caller-owned and unowned jobs in registration order without exposing
197
- * another session's labels.
198
- * @param caller - reading agent; a non-agent caller sees only unowned jobs.
199
- * @returns fresh snapshots.
473
+ * List caller-owned and unowned jobs in registration order.
474
+ * @param caller - reading session; omission sees only unowned jobs.
475
+ * @returns fresh projections.
200
476
  */
201
- abstract list(caller?: Agent): JobSnapshot[]
477
+ abstract list(caller?: SessionId): JobView[]
202
478
 
203
479
  /**
204
- * Return a non-consuming snapshot without changing its read cursor or notice
205
- * state. Throws for an unknown or foreign job.
480
+ * Project one job without changing its cursor. Throws for an unknown or
481
+ * foreign job.
206
482
  * @param id - job to look up.
207
- * @param caller - reading agent checked against the owner.
208
- * @returns a fresh snapshot.
483
+ * @param caller - reading session checked against the owner.
484
+ * @returns a fresh projection.
209
485
  */
210
- abstract get(id: JobId, caller?: Agent): JobSnapshot
486
+ abstract get(id: JobId, caller?: SessionId): JobView
211
487
 
212
488
  /**
213
- * Read the next stream delta, or the idempotent final output after settlement.
214
- * A terminal read marks the job reported. Throws for an unknown or foreign
215
- * job.
489
+ * Consume the ring from the model cursor and advance it to the current
490
+ * total. After settlement the first read also carries the producer's
491
+ * result. Throws for an unknown or foreign job.
216
492
  * @param id - job to read.
217
- * @param caller - reading agent checked against the owner.
218
- * @returns output text and the post-read snapshot.
493
+ * @param caller - reading session checked against the owner.
494
+ * @returns the chunks since the cursor, the lossy flag, the result once, and the post-read projection.
219
495
  */
220
- abstract read(id: JobId, caller?: Agent): JobRead
496
+ abstract read(id: JobId, caller?: SessionId): JobRead
221
497
 
222
498
  /**
223
- * Request cancellation, then mark the job stopping and reported. A producer
224
- * throw propagates without changing job state. Throws for an unknown or
225
- * foreign job.
499
+ * Read retained ring output without moving the model cursor. Resume with
500
+ * a previous read's `next`; an offset inside a retained chunk returns the
501
+ * whole chunk (its `at` may precede `from`). Throws for a negative or
502
+ * non-integer offset, or an unknown or foreign job.
503
+ * @param id - job to read.
504
+ * @param from - absolute byte offset to read from (0 for the retained head).
505
+ * @param caller - reading session checked against the owner.
506
+ * @returns retained chunks overlapping `[from, total)`, the resume offset, and the lossy flag.
507
+ */
508
+ abstract readAt(id: JobId, from: number, caller?: SessionId): JobOutputRead
509
+
510
+ /**
511
+ * Request cancellation, then mark the job stopping. A producer throw
512
+ * propagates without changing job state. A supplied reason is merged into
513
+ * terminal `detail` when the job settles `killed`. Throws for an unknown
514
+ * or foreign job.
226
515
  * @param id - job to cancel.
227
- * @param caller - killing agent checked against the owner.
228
- * @param reason - logged reason forwarded to the producer.
516
+ * @param caller - killing session checked against the owner.
517
+ * @param reason - cancellation reason forwarded verbatim to the producer.
229
518
  * @returns `requested` for live work, otherwise `already-finished`.
230
519
  */
231
- abstract kill(id: JobId, caller?: Agent, reason?: string): 'requested' | 'already-finished'
520
+ abstract kill(id: JobId, caller?: SessionId, reason?: string): 'requested' | 'already-finished'
232
521
 
233
522
  /**
234
523
  * Wait for settlement or timeout without cancelling the job. Caller abort
235
524
  * rejects only while the job is live; after settlement the terminal
236
- * snapshot wins so a notice suppressed for this waiter is still delivered.
237
- * Throws for invalid, unknown, or foreign input.
525
+ * projection wins. Rejects for an invalid timeout or an unknown or foreign
526
+ * job.
238
527
  * @param id - job to wait for.
239
528
  * @param timeoutMs - positive finite wait bound in milliseconds.
240
- * @param caller - waiting agent checked against the owner.
529
+ * @param caller - waiting session checked against the owner.
241
530
  * @param signal - optional cancellation of the wait itself.
242
- * @returns snapshot at settlement or timeout.
531
+ * @returns projection at settlement or timeout.
243
532
  */
244
- abstract wait(id: JobId, timeoutMs: number, caller?: Agent, signal?: AbortSignal): Promise<JobSnapshot>
533
+ abstract wait(id: JobId, timeoutMs: number, caller?: SessionId, signal?: AbortSignal): Promise<JobView>
245
534
 
246
535
  /**
247
- * Register an effect-scoped completion listener. It receives the settlements
248
- * of the owners its registering context's scope covers; each listener is
249
- * contained; returned promises are observed but not awaited. No listener runs
250
- * after service disposal.
251
- * @param listener - receives each terminal snapshot and its exact owner.
252
- * @returns disposer that unregisters the listener.
253
- */
254
- abstract onJobDone(listener: JobDoneListener): () => void
255
-
256
- /**
257
- /**
258
- * Register an effect-scoped observer of visible-set changes. It fires after
259
- * every commit that changes what {@link list} returns for that owner —
260
- * registration, every stopping transition (including the one teardown
261
- * performs before it awaits a slow producer), settlement, owner-disposal
262
- * removal, and the emptying that service disposal commits — so an observer
263
- * re-reads rather than accumulating deltas.
264
- *
265
- * Delivery is owner-relative on the same terms as {@link onJobDone}: an
266
- * observer registered from an unscoped context — a host composition's own
267
- * carrier — sees every owner, while one registered under an agent
268
- * composition's scope sees exactly the agents composed under it.
269
- *
270
- * This is not a superset of {@link onJobDone}: that one delivers the terminal
271
- * record under first-wins semantics a job controller couples to notice
272
- * delivery, while this one carries no delivery meaning and marks nothing
273
- * reported. Listeners are contained and never awaited.
274
- * @param listener - receives the owner whose visible set changed, or
275
- * `undefined` when an unowned job changed and every caller's set did.
276
- * @returns disposer that unregisters the listener.
536
+ * Drop one settled job's record from the visible set and announce
537
+ * `removed`. For a caller that collected the terminal state through its own
538
+ * {@link wait} and never handed the id to the model, such as a shell tool's
539
+ * foreground call. Throws for a job that is still live, unknown, or foreign.
540
+ * @param id - settled job to drop.
541
+ * @param caller - removing session checked against the owner.
277
542
  */
278
- abstract onJobsChanged(listener: JobsChangedListener): () => void
543
+ abstract remove(id: JobId, caller?: SessionId): void
279
544
 
280
545
  /**
281
546
  * Attach an effect-scoped controller that can read and stop jobs. It serves the
@@ -287,7 +552,7 @@ abstract onJobsChanged(listener: JobsChangedListener): () => void
287
552
  abstract attachController(name: string): () => void
288
553
  ```
289
554
 
290
- Types: [Agent](./core.md)
555
+ Types: [SessionId](./core.md)
291
556
 
292
557
  Source: [`packages/jobs/jobs/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/jobs/jobs/src/index.ts)
293
558
  <!-- END GENERATED cordis-surface -->