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
@@ -8,13 +8,15 @@
8
8
 
9
9
  `PluginEntryId` 标识一个 Loader 条目;调用方从 `listPlugins` 获取,不自行拼接 patch id。
10
10
 
11
- `PluginInfo` 包含模块标识、实际启停状态和 fiber 阶段,以及唯一的 `patchId` 或 `readOnlyReason`。
11
+ `PluginInfo` 包含模块标识、实际启停状态、fiber 阶段和可选的展示 `meta`,以及唯一的 `patchId` 或 `readOnlyReason`。
12
12
 
13
- `BundleInfo` 包含包名、可选的安装版本、组合层选择状态、删除可用性及可选的解析错误。
13
+ `BundleInfo` 包含包名、可选的安装版本、组合层选择状态、删除可用性、可选的解析错误;由 profile 自身依赖提供、且安装不提供的组合包还带有 `source`,即该依赖在 `pnpm add` 中可用的 spec。它的可选 `meta` 与各行的 `BundleRowInfo.meta` 包含展示文本或元信息诊断;Client 在渲染时选择语言。
14
14
 
15
- `InstallBundleOptions.enabled` 默认为 true,false 表示安装但不选择组合包层。`approvedBuilds` 在安装前向指定的待审批包名授予持久脚本权限。
15
+ `InstallBundleOptions.enabled` 默认为 true,false 表示安装但不选择组合包层。`approvedBuilds` 在安装前向指定的待审批包名授予持久脚本权限。`registry` 指定首先询问的注册表;缺省为配置的那个。
16
16
 
17
- `ChangeResult.changed` 报告磁盘修改,独立于 `application`:`applied`、`restart-required`、`overridden` 或 `failed`。可选的 `error` 包含可本地化的错误码和外部诊断。`packageResult` 记录 pnpm 退出码、有界输出、截断标志及完整诊断日志路径。`pendingBuilds` 列出整个 profile 尚未决定的包;`approvedBuilds` 记录本次操作授予权限的包名。
17
+ `PluginRegistries` 携带配置的第一个注册表(`null` 即 pnpm 自身配置指定的那个)、随后依次询问的备选注册表,以及 `resolved`——pnpm 自身配置指向的 URL,未读到时为 `null`。`InspectOptions.registry` 指定一次查询首先询问的注册表。
18
+
19
+ `ChangeResult.changed` 报告磁盘修改,独立于 `application`:`applied`、`restart-required`、`overridden` 或 `failed`。可选的 `error` 包含可本地化的错误码和外部诊断。`packageResult` 记录 pnpm 退出码、有界输出、截断标志及完整诊断日志路径;当管理器终止了一个停止打印的运行,还记录 `timedOut`。被终止的运行不论信号留下什么退出状态都归类为 `timeout`,因此安装与删除都报告失败而非成功,也不会再询问下一个注册表。`pendingBuilds` 列出整个 profile 尚未决定的包;`approvedBuilds` 记录本次操作授予权限的包名;`registries` 按顺序列出一次安装问过的注册表;`bundle` 与 `version` 给出完成的安装新增的包及其清单版本;`failedAt` 说明最后一次失败的运行连不上的是所问的注册表,还是 git 或 tarball spec 自身拉取的主机。
18
20
 
19
21
  <!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
20
22
 
@@ -24,6 +26,33 @@
24
26
 
25
27
  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).
26
28
 
29
+ <a id="ctxconfigeditor--configeditor"></a>
30
+
31
+ ### `ctx.configEditor` — `ConfigEditor`
32
+
33
+ Persist complete raw configs and apply them through the normal Loader path.
34
+
35
+ ```ts cordis-catalog
36
+ /** Addressable profile rows; nested Includes have independent configuration ownership.
37
+ * @returns Active entries with unique profile patch ids.
38
+ */
39
+ entries(): Entry[]
40
+
41
+ /** Read inherited and explicit profile values for the active entries.
42
+ * @returns Detached layer values alongside their Loader entries.
43
+ */
44
+ configuration(): Array<{ entry: Entry; inherited: Record<string, unknown>; override: Record<string, unknown> }>
45
+
46
+ /** Validate, persist, and reconcile a plugin's next config; ordinary fields keep normal lifecycle rules.
47
+ * @param entry Current Loader entry, also used to detect replacement during the write.
48
+ * @param change Derive a raw config from the current entry and its inherited layer.
49
+ * @returns Fulfillment after Loader reconciliation completes.
50
+ */
51
+ async edit( entry: Entry, change: (current: Record<string, unknown>, inherited: Record<string, unknown>) => Record<string, unknown>, ): Promise<void>
52
+ ```
53
+
54
+ Source: [`packages/boot/config-editor/src/index.ts`](../../packages/boot/config-editor/src/index.ts)
55
+
27
56
  <a id="ctxhmr--hmr"></a>
28
57
 
29
58
  ### `ctx.hmr` — `Hmr`
@@ -60,6 +89,21 @@ Source: [`packages/boot/hmr/src/index.ts`](../../packages/boot/hmr/src/index.ts)
60
89
  Manage profile files and apply their declared reload lifecycle.
61
90
 
62
91
  ```ts cordis-catalog
92
+ /** Read exact plugin-version exemptions saved in this profile.
93
+ * @returns Accepted package-name@version keys with the runtime versions they may run on, and any
94
+ * record or file problem the reader rejected, which the caller reports instead of failing.
95
+ */
96
+ @Remote listVersionExemptions(): { exemptions: Record<string, string[]>; warnings: string[] }
97
+
98
+ /** Grant or revoke one exact plugin/runtime exemption and reevaluate live plugins.
99
+ * @param packageVersion Exact manifest package name followed by @ and its version; never an installation spec or alias.
100
+ * @param runtimeVersion Exact current DSH version for grants; revocation may name a previous runtime.
101
+ * @param enabled Whether to grant rather than revoke the exemption.
102
+ * @param acceptRisk Required true for grants after the user accepts possible crashes and data loss.
103
+ * @returns Saved and runtime outcomes. Startup-only profiles require restart.
104
+ */
105
+ @Remote setVersionExemption(packageVersion: string, runtimeVersion: string, enabled: boolean, acceptRisk?: boolean): Promise<ChangeResult>
106
+
63
107
  /** Read current plugins, including why a row cannot be changed through the profile patch.
64
108
  * @returns Current runtime entries with persistent patch targets.
65
109
  */
@@ -67,17 +111,23 @@ Manage profile files and apply their declared reload lifecycle.
67
111
 
68
112
  /** Read the profile's installed bundles, the bundles this dsh installation supplies, and the selected names that are not bundles.
69
113
  * A dependency without a bundle patch is listed, as a `not-bundle` problem, only while it is selected.
70
- * @returns Package versions, one-liners, rows, activation selections, whether the installation offers the
71
- * bundle, and removal availability.
114
+ * @returns Package versions, manifest descriptions, the installable spec of profile dependencies, rows, optional
115
+ * display metadata, activation selections, whether the installation offers the bundle, and removal availability.
72
116
  */
73
117
  @Remote listBundles(): Promise<BundleInfo[]>
74
118
 
119
+ /** Read the registries this manager asks: the configured first one, its fallbacks in order, and what pnpm's own configuration names.
120
+ * @returns The registries in pnpm's comparison form; null is the one pnpm's own configuration names, `resolved` as pnpm reads it now.
121
+ */
122
+ @Remote async registries(): Promise<PluginRegistries>
123
+
75
124
  /** Read what a spec names before installing it.
76
125
  * @param spec One package spec: a registry name, an absolute path, a git address, or a tarball.
126
+ * @param options The registry asked first.
77
127
  * @param signal Ends a registry lookup early.
78
128
  * @returns The package the spec names, or why it is refused.
79
129
  */
80
- @Remote async inspect(spec: string, signal?: AbortSignal): Promise<PluginSpecInspection>
130
+ @Remote async inspect(spec: string, options?: InspectOptions, signal?: AbortSignal): Promise<PluginSpecInspection>
81
131
 
82
132
  /** Persist a plugin entry's desired enablement and apply it on live profiles.
83
133
  * @param id Loader entry identity returned by listPlugins.
@@ -94,25 +144,35 @@ Manage profile files and apply their declared reload lifecycle.
94
144
  @Remote setBundleEnabled(name: string, enabled: boolean): Promise<ChangeResult>
95
145
 
96
146
  /**
97
- * Install a package using the same pnpm implementation as dsh plugin. A run
147
+ * Install a package using the same pnpm implementation as dsh plugin. GitHub
148
+ * repositories get a connection check bounded by githubConnectionTimeoutMs before pnpm starts;
149
+ * only network failures or timeouts stop installation, while pnpm owns authentication and transport fallback. A run
98
150
  * that fails, is cancelled, or adds a package without a bundle patch restores
99
151
  * `package.json` and `pnpm-lock.yaml` as they were; downloaded files can stay.
100
152
  * @param spec One package spec, including local paths relative to the invocation directory.
101
- * @param options Whether to activate the installed bundle (defaults to true), the request id a cancellation names, and
102
- * the pending build scripts to allow for this profile before pnpm runs.
103
- * @returns Package-manager diagnostics and observed activation outcome.
153
+ * @param options Whether to activate the installed bundle (defaults to true), the request id a cancellation names,
154
+ * the pending build scripts to allow for this profile before pnpm runs, and the registry asked first.
155
+ * @returns Package-manager diagnostics, the registries asked, and the observed activation outcome.
104
156
  */
105
157
  @Remote installBundle(spec: string, options?: InstallBundleOptions): Promise<ChangeResult>
106
158
 
159
+ /** Recover the result of an active installation without cancelling it.
160
+ * @param requestId The id supplied when installation started.
161
+ * @returns The installation's outcome after it settles, or null if no active request has that id.
162
+ * Completed results are not retained; null establishes neither success nor cancellation.
163
+ */
164
+ @Remote async waitForInstall(requestId: PluginInstallRequestId): Promise<ChangeResult | null>
165
+
107
166
  /** Stop an installation this manager owns and wait until its files are back.
108
167
  * @param requestId The id the installation was started with.
109
- * @returns `cancelled` once pnpm exited and the files are restored, `too-late` once the bundle is being
168
+ * @returns `cancelled` once the Git check or pnpm exited and the files are restored, `too-late` once the bundle is being
110
169
  * applied, `not-running` for any other id.
111
170
  */
112
171
  @Remote async cancelInstall(requestId: PluginInstallRequestId): Promise<PluginInstallCancellation>
113
172
 
114
- /** Unload and remove a profile-owned bundle dependency through dsh plugin's pnpm path.
115
- * @param name Installed dependency name.
173
+ /** Unload and remove a profile-owned bundle dependency through dsh plugin's pnpm path; a selected name no
174
+ * dependency holds is only deselected.
175
+ * @param name Installed dependency or selected bundle name.
116
176
  * @returns Removal diagnostics and the remaining profile state.
117
177
  */
118
178
  @Remote removeBundle(name: string): Promise<ChangeResult>
@@ -120,6 +180,24 @@ Manage profile files and apply their declared reload lifecycle.
120
180
 
121
181
  Source: [`packages/boot/plugin-manager/src/index.ts`](../../packages/boot/plugin-manager/src/index.ts)
122
182
 
183
+ <a id="ctxpluginregistryprobe--pluginregistryprobe"></a>
184
+
185
+ ### `ctx.pluginRegistryProbe` — `PluginRegistryProbe`
186
+
187
+ Compares public registry responses on the Host; the Client owns the initial selection.
188
+
189
+ ```ts cordis-catalog
190
+ /**
191
+ * Race npm and npmmirror HTTPS ping responses through the Host's fetch proxy.
192
+ * Concurrent readers share a probe; a winner cancels and awaits the other request.
193
+ * @returns the first registry with a successful response, or null when disabled or neither responds successfully; results are cached.
194
+ * @throws rejects when the service has been unloaded.
195
+ */
196
+ @Remote async fastest(): Promise<string | null>
197
+ ```
198
+
199
+ Source: [`packages/client/ui-plugin-manager/src/index.ts`](../../packages/client/ui-plugin-manager/src/index.ts)
200
+
123
201
  <a id="ctxprofilecontext--profilecontext"></a>
124
202
 
125
203
  ### `ctx.profileContext` — `ProfileContext`
@@ -128,6 +206,27 @@ Current profile facts; scheduling and mutation belong to their callers.
128
206
 
129
207
  Source: [`packages/boot/app-boot/src/profile-context.ts`](../../packages/boot/app-boot/src/profile-context.ts)
130
208
 
209
+ <a id="app-boot-events"></a>
210
+
211
+ ### `app-boot/*` events
212
+
213
+ <a id="app-bootconfig-reload--emit"></a>
214
+
215
+ #### `app-boot/config-reload` — emit
216
+
217
+ Profile patches were reconciled into the running Loader tree: every entry update settled and no new inactive entry was introduced. Carries no diff; listeners re-read Loader entries.
218
+
219
+ ```ts cordis-catalog
220
+ /**
221
+ * Profile patches were reconciled into the running Loader tree: every entry update settled and no new
222
+ * inactive entry was introduced. Carries no diff; listeners re-read Loader entries.
223
+ * @mode emit
224
+ */
225
+ 'app-boot/config-reload'(): void
226
+ ```
227
+
228
+ Source: [`packages/boot/app-boot/src/index.ts`](../../packages/boot/app-boot/src/index.ts)
229
+
131
230
  <a id="hmr-events"></a>
132
231
 
133
232
  ### `hmr/*` events
@@ -208,13 +307,14 @@ Source: [`packages/boot/plugin-manager/src/types.ts`](../../packages/boot/plugin
208
307
 
209
308
  #### `plugin-manager/install-state` — emit
210
309
 
211
- An installation moved between its Host phases.
310
+ An installation moved between its Host phases. `installing` is announced once per registry the installation asks, with the attempt's registry and position; `cancelling` and `applying` once.
212
311
 
213
312
  ```ts cordis-catalog
214
313
  /**
215
- * An installation moved between its Host phases.
314
+ * An installation moved between its Host phases. `installing` is announced once per registry the
315
+ * installation asks, with the attempt's registry and position; `cancelling` and `applying` once.
216
316
  * @mode emit
217
- * @param progress - the installation's request id and phase.
317
+ * @param progress - the installation's request id and phase, with the attempt while installing.
218
318
  */
219
319
  'plugin-manager/install-state'(progress: PluginInstallProgress): void
220
320
  ```
@@ -1,6 +1,19 @@
1
- # Bilingual-pair consistency record (docs/i18n/README.md): the git blob hash of each
2
- # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
- # after editing either side, bring the other along and re-record with:
1
+ # Bilingual-pair consistency record for browser-use.md (docs/i18n/README.md): per heading
2
+ # section, a hash of its English and Chinese blocks outside code blocks and generated regions.
3
+ # After editing either side, bring the other along and re-record with:
4
4
  # pnpm run verify-translation-pairing --write docs/subsystems/browser-use.md
5
- browser-use.md: 73cedae85752b296c3f85e53d40448e25a711685
6
- browser-use.zh.md: 573b15962eddab154947a33e9bebe2303cb24fea
5
+ /browser-use:
6
+ en: c4c91e07977a0d7b
7
+ zh: ae7bf1da6f4019a5
8
+ /browser-use/choose-a-provider:
9
+ en: 1e8ff2e03064fcff
10
+ zh: d7164f738e5b4c5c
11
+ /browser-use/session-ownership:
12
+ en: a6cd1aa7ea518c3f
13
+ zh: 44d2b40a15f81ce9
14
+ /browser-use/mcp-initialization:
15
+ en: ac4bcaf872ec5ed8
16
+ zh: 57d699d1b6e07caf
17
+ /browser-use/tools-and-recorded-results:
18
+ en: 968055589fb64b35
19
+ zh: d549a52809ddcf58
@@ -0,0 +1,28 @@
1
+ # Bilingual-pair consistency record for claude-code-mods.md (docs/i18n/README.md): per heading
2
+ # section, a hash of its English and Chinese blocks outside code blocks and generated regions.
3
+ # After editing either side, bring the other along and re-record with:
4
+ # pnpm run verify-translation-pairing --write docs/subsystems/claude-code-mods.md
5
+ /claude-code-mods-compatibility:
6
+ en: e520df3bf44e1160
7
+ zh: 557956eaf6faf4a7
8
+ /claude-code-mods-compatibility/packaging-and-loading:
9
+ en: 75cf021ce8babaab
10
+ zh: caa20540f8bce11a
11
+ /claude-code-mods-compatibility/events:
12
+ en: cea776ec0063c311
13
+ zh: 6b8c8b32f2f7ede9
14
+ /claude-code-mods-compatibility/the-chain:
15
+ en: 111c186536345342
16
+ zh: 8ddc81c78c05a840
17
+ /claude-code-mods-compatibility/members:
18
+ en: 1f1d39f01937b39c
19
+ zh: 6365f4d47ea0ba8f
20
+ /claude-code-mods-compatibility/drawing:
21
+ en: 1bd1a60970fcf426
22
+ zh: 8f6a8e069f742fb7
23
+ /claude-code-mods-compatibility/testing:
24
+ en: 8b3530b79e09a067
25
+ zh: c041e63f7fd8de5a
26
+ /claude-code-mods-compatibility/the-example-mods:
27
+ en: b3ef5ea831c5c48f
28
+ zh: fa64186430e7c772
@@ -0,0 +1,146 @@
1
+ # Claude Code mods: compatibility
2
+
3
+ English | [中文](claude-code-mods.zh.md)
4
+
5
+ Every way a mod behaves differently through this bridge than under Claude Code, as of Claude Code 2.1.287 ([mods reference](https://code.claude.com/docs/en/plugins/mods/reference), its `claude-code.d.ts`) and the [Getting started with Claude Code mods](https://claude.dev/blog/getting-started-with-claude-code-mods/) post of 2026-10-01. A row names the Claude Code behavior, what this bridge does, and the reason or the follow-up. Anything not listed here behaves as the reference describes; a hook on an event this host never raises is named in a warning when the mod loads, and a `$` call outside the served table rejects with `no implementation for <namespace>.<method>`.
6
+
7
+ ## Packaging and loading
8
+
9
+ | Claude Code | This bridge | Reason or follow-up |
10
+ |---|---|---|
11
+ | A plugin directory with `.claude-plugin/plugin.json` and `hooks/hooks.json` naming one hooks module; `claude --plugin-dir`, marketplaces, `/plugin install` | A mod is a plugin: `defineMod({ name, version, root, userConfig, register })` wraps the hooks module and mounts through cordis.yml after the bridge; `plugin.json` and `hooks.json` are not read | Mods join the one composition mechanism every DSH plugin uses; the example directories keep their manifests so they also run under `claude --plugin-dir` |
12
+ | `userConfig` schema in `plugin.json` with typed defaults; options validated at load | `userConfig` is the defaults object of the `defineMod` spec; the plugin's cordis.yml `config` overlays it and is validated as a record of strings, numbers, booleans, and string lists | No manifest is read |
13
+ | Tiers (`user`, `project`, `managed`) and `next.to(e, tier)` | Every mod loads as `user`; `tier()` in a test is accepted and ignored; `next.to` rejects | Managed settings are not a DSH concept |
14
+ | Hot reload of the hooks module on edit; `claude plugin validate`, `claude plugin test`, types generation from `types/index.d.ts` | None of these commands; a remount re-runs `register` on the same evaluated module, so module-level variables keep their values | Follow-up only on demand; the test kit's `createModTestKit` replaces `claude plugin test` inside Vitest |
15
+ | A hooks module may be TypeScript | A `.ts` hooks module loads only where the launcher transpiles (the source launch does; a built install does not) | DSH ships plain Node |
16
+ | Mods run in-process with `$` as their only access to the host | The hooks module runs in-process with Node's globals, no access rule, and the process's full authority: `$.env` reads and writes the harness environment, `$.http.fetch` reaches any URL, `$.fs` and `$.tool.call` act as the session | No sandbox is applied to mods; mount only mods you would run as a plugin |
17
+ | `import type { … } from 'claude-code'`, `declare module 'claude-code' { interface PluginState }` | The `claude-code` module name resolves only inside this repository's test setup, to the bridge's types; a mod outside it imports `@deepseek-ai/dsh-experimental-claude-code-mods` | The type names are the bridge's own |
18
+ | `settings hooks` in `hooks.json` run beside mod hooks | Not run; mount `@deepseek-ai/dsh-hooks-claude-code` for them | Different bridge |
19
+
20
+ ## Events
21
+
22
+ | Event | Claude Code | This bridge |
23
+ |---|---|---|
24
+ | `session.start` | Raised once per session, before the first prompt | Raised for a root agent from `agent/created`, awaited before its first turn; not raised for subagents |
25
+ | `session.end` | Raised once per session | Raised for a root agent from `agent/disposed`; `$.state` is readable until the hooks settle |
26
+ | `prompt.submit` | `e.text` is the typed prompt; `context` entries become one block each after the prompt as typed; a prompt a plugin submitted carries `origin: { kind: 'plugin', name }` | Same; `e.text` joins the text blocks of the human's own (`user`-sourced) messages in the claimed batch, a batch of injected context alone raises nothing, and a prompt `$.prompt.submit` queued carries the submitting mod as its origin |
27
+ | `turn.start`, `turn.complete` | Per turn; subagent turns carry `agentId` | Same; `turn.complete`'s `{ text }` reaches the host log, not a line under the answer; `durationMs` counts from `turn/start` |
28
+ | `tool.call` | Runs before Claude Code's permission check; `next({ ...e, command })` rewrites the arguments the tool runs with, and `next({ ...e, tool })` reroutes the call | Runs around `tools/execute`, after the harness permission decision; a hook (or `.catch` handler) that rewrites arguments or names another tool is skipped with a report — the argument case names the [pre-tool input rewrite proposal](../../.agents/notes/proposed/feature/2026-06-30-pre-tool-input-rewrite.md) — because the logged call runs as logged. `{ deny }`, `{ result }`, observing, and rewriting the result or `isError` after `next` work as described |
29
+ | `command.run` | Runs for a command the mod registered | Same |
30
+ | `ui.render` | Raised for every render site (`AbovePrompt`, `Pane`, `ToolUse`, `AssistantMessage`, `Spinner`, …) | Raised for `AbovePrompt` only, once per redraw of a session's band; `Pane` hooks run only through the test kit's `$.ui.mount({ component: 'Pane' })` |
31
+ | `tool.check`, `tool.describe`, `tool.list`, `tool.register` | Shape the tool list and permissions | Not raised; `$.tool.register` and `$.tool.list` are served as `$` calls |
32
+ | `turn.step` | Per model step | Not raised |
33
+ | Every other reference event: the other `prompt.*` events, `skill.prompt`, `attribution.text`, `command.describe`, `config.*`, the other `session.*` events, `agent.*`, `plugin.register`, `engine.create`, `telemetry.*`, `ui.resolve`, `ui.press`, `ui.input`, `ui.select`, `ui.focus`, `ui.scroll`, `ui.close`, `ui.message` | Raised by the engine | Registered, never raised, named in a warning at load |
34
+ | `classic.*` | Classic settings hooks as events | Refused at `register`, like any unknown event name |
35
+ | `<namespace>.<method>` op events (`fs.read`, `store.set`, …) | A later-loaded mod's `$` call reaches the mods loaded before it | Same; `tool.call` arrives through the tool pipeline instead |
36
+
37
+ ## The chain
38
+
39
+ | Claude Code | This bridge | Reason |
40
+ |---|---|---|
41
+ | A hook may call `next` more than once; each call runs the chain beneath again | `next` runs once: a second call returns the first run's result | One tool execution per logged call |
42
+ | A hook that answers while its `next` is still running | The run beneath is awaited before the hook's answer settles; a failure beneath after the answer is reported | The event settles only when nothing it started is running |
43
+ | 10 s own-time budget, 1 s for `.catch`, time inside `next` and `$` calls excluded except `$.clock.sleep` | Same, configurable (`hookTimeoutMs`, `catchTimeoutMs`) | — |
44
+ | Not returning a result object is a failure | Same; `null` is accepted as an answer (a surface drawn empty) | `ui.render` with nothing to draw |
45
+ | A result's unknown fields are dropped and wrong types fail the hook | A `prompt.submit` result with wrong types keeps the original text and only the string context lines | Lenient on the one event where partial results are common |
46
+
47
+ ## `$` members
48
+
49
+ | Namespace | Claude Code | This bridge |
50
+ |---|---|---|
51
+ | `$.plugin` | `name`, `root`, `tier` | `name`, `root` from the `defineMod` spec |
52
+ | `$.ui` | `resolve`, `invalidate`, `open`, `close`, `panes`, `focus`, `log`, `toast`, `status`, `notice`, `ask`, `blit`, `copy`, `press`, `input`, `select` | `resolve`, `invalidate`, `open`, `close`, `panes`, `log`, `toast`, `status`, `ask`; `open` answers `{ isPlaced: false }` with a reason and redraws the band; `log`, `toast`, `status` reach the host log; the rest reject |
53
+ | `$.command` | `register`, `run`, `list` | Same; `run` of a command nobody answers rejects with the registering mod named |
54
+ | `$.tool` | `register`, `call`, `list` | Same; a registered tool is `mcp__<plugin>__<tool>`; `call` runs the harness pipeline and injects a tool's deferred contexts into the session |
55
+ | `$.prompt` | `submit`, `compose` | `submit`; the message is `user`-sourced, framed `Message from the "<plugin>" mod:` unless `asUser`, and the `prompt.submit` it raises names the mod as origin |
56
+ | `$.session` | `id`, `cwd`, `root`, `repo`, `model`, `turns`, `messages`, `usage`, `version`, `send`, `append`, `authorize`, `compact`, `surfaces` | `id`, `cwd`, `root`, `model`, `turns`, `messages`, `usage`, `version`; `cwd` and `root` both report the session workspace; `usage.context.window` is `0` and `percent` absent until the token meter knows the route's window; `rateLimits` is empty; `version` names this bridge |
57
+ | `$.state` | Per session, survives hot reload | Per session, in memory; a read during `ui.render` subscribes the band to the slot |
58
+ | `$.store` | Per plugin, durable | Same, in the `claude_code_mods` storage domain, 4 MiB per plugin |
59
+ | `$.clock` | `now`, `sleep`, `after`, `every`; timers die with the plugin | Same; a timer also dies with the session whose event scheduled it, and `sleep` rejects when the event is cancelled |
60
+ | `$.fs` | `read`, `write`, `list`, `exists`, `stat`, `ancestors` | All but `ancestors`; 4 MiB per file; `stat.mtimeMs` is `0` |
61
+ | `$.process` | `run`, `spawn` | `run` only, argv without a shell, `processTimeoutMs` default |
62
+ | `$.http` | `fetch` | Same, bodies up to 4 MiB |
63
+ | `$.env` | `get`, `set` | Same; the process environment is shared by every session and plugin |
64
+ | `$.model`, `$.agent`, `$.config`, `$.settings`, `$.mcp`, `$.audio`, `$.telemetry`, `$.turn` | Served | Reject with `no implementation`; `$.model.complete` waits on a logged side-request event |
65
+
66
+ ## Drawing
67
+
68
+ | Claude Code | This bridge |
69
+ |---|---|
70
+ | `Box`, `Text`, `Button`, `Input`, `Spacer`, and the host's own element kinds | `Box`, `Text`, `Button` from `$.ui.resolve(e)`; the tree is validated, and a `Button`'s `onPress` stays in the host behind a per-drawing action id |
71
+ | `Box` props: `flexDirection`, `padding*`, `gap`, `border*`, `width`, `height`, `overflow`, `scroll` | `flexDirection`, `padding`, `paddingX`, `paddingY`, `gap`, `border`, `borderColor`; the others serialize and the Web band ignores them |
72
+ | `Text` props: `color`, `bold`, `dimColor`, `italic`, `underline`, `wrap`, `truncate` | `color` (the terminal palette names), `bold`, `dimColor`, `italic`, `underline`; the Web band wraps |
73
+ | `Button` props: `label`, `hotkey`, `disabled`, `onPress`; a bare digit arms the hotkey | `label`, `hotkey` (shown as a hint), `disabled`, `onPress` (a click) |
74
+ | The band is one instance; `hasSurvey`, `isWorking`, `maxRows`, `bodyColumns` reflect the terminal | One instance per session, consulted in mod load order; `bodyColumns` and `viewport.columns` are the bridge's `bandColumns` (default `120`), `maxRows` its `bandRows` (default `10`), `hasSurvey` and `isWorking` are `false`; the Web band wraps instead of scrolling |
75
+ | The band redraws on the host's frame and when a `$.state` value a render read changes | Redraws after `session.start`, when a `$.state` value the last drawing read is written, after `$.ui.open`, `$.ui.close`, `$.ui.invalidate`, after each `tool.call` chain and `turn.complete` settle, and after a press; a mod that changes module-level state at other times draws it at the next trigger. A press runs `onPress` without a time limit |
76
+ | `Pane` with `focus`, `scroll`, docked beside the transcript | No pane: `$.ui.open` answers `{ isPlaced: false }` so a mod falls back to the band; the test kit mounts `Pane` hooks directly |
77
+ | Hotkeys, `TextInput`, focus, scrolling, `ui.press`, `ui.input`, `ui.select` | Not served; follow-up |
78
+
79
+ ## Testing
80
+
81
+ | `claude-code/testing` | This bridge |
82
+ |---|---|
83
+ | `describe`, `test(name, ($, on) => …)`, `expect`, `mock`, `tier` | Inside this repository the same module name provides them over Vitest; `test` infers the mod from the test file's location (`<mod>/tests/*.test.ts` → `<mod>/index.ts`) and `defineModTests` overrides it. Outside, `createModTestKit` and `mock` come from `@deepseek-ai/dsh-experimental-claude-code-mods/testing` |
84
+ | `on` stubs the engine's answers; the kit answers `ui.*` itself | Same; `ui.open` answers `{ isPlaced: false }`, `ui.invalidate` and `ui.close` succeed; `session.cwd`, `process.run`, `fs.*`, `store.*`, `env.*` need a stub (`mock.store`, `mock.env`, `mock.clock` answer whole namespaces) |
85
+ | `$.ui.mount({ plugin, surface, component, props })` → `find`, `findAll`, `press`, `unmount` | Same, plus `tree()` and `text()`; every read renders afresh through every loaded mod's hooks; `plugin` and `surface` are accepted for source compatibility |
86
+ | 5 s hook budget in tests | Same (`budgetMs`) |
87
+
88
+ ## The example mods
89
+
90
+ | Mod | Source | Through this bridge |
91
+ |---|---|---|
92
+ | Token Weather | The post's module, type contract, and test, unchanged | Runs as published; the test's three `as any` casts are dropped because the kit is typed. Draws in the band from `$.session.usage` through the token meter |
93
+ | Blast Radius | The post's `tool.call` hook unchanged; `classify`, `measure`, and the trees completed to the post's description | Holds the command with real `sleep` polls, draws the report in the band (`isPlaced: false`), and Proceed or Cancel decides; load it before Token Weather |
94
+ | Replay Theater | The post's five hooks unchanged; `stepsFor`, the diff, `openReplay`, the pane and the hint completed | Records Edit and Write calls, hints in the band after the turn, and steps through the diffs in the band because no pane is placed |
95
+ | `diff` ([anthropics/claude-code](https://github.com/anthropics/claude-code/tree/main/mods/diff), read at `52c7644`) | TypeScript, ~570 files, hooks `command.run`, `prompt.submit`, `session.start`, `tool.call`, `ui.close`, `ui.focus`, `ui.render`, `ui.scroll` | Not runnable: needs `$.settings.read`, `$.telemetry.*`, `$.session.messages` over a pane, `ui.focus` and `ui.scroll` events, and a placed `Pane`. Assessed by reading; the repository's terms do not allow a fixture copy |
96
+ | `agents-md` (same repository) | Hooks `agent.spawn`, `prompt.context`, `session.start`, `tool.call` | Not runnable: `prompt.context` and `agent.spawn` are not raised and `$.fs.ancestors`, `$.telemetry.*` are not served |
97
+ | `sec-default` (same repository) | Hooks `tool.check`, `prompt.compose`, `settings.read`, `classic.*`, `plugin.register`, … | Not runnable: managed-tier policy over events this host does not raise |
98
+ | `telemetry` (same repository) | Hooks `engine.create`, `telemetry.*`, `session.start`, `session.end`; calls `$.session.repo`, `$.settings.read` | Not runnable: `telemetry.*` and `engine.create` are not raised and the two `$` members are not served |
99
+
100
+ <!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
101
+
102
+ <a id="cordis-surface"></a>
103
+
104
+ ## Cordis API
105
+
106
+ 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).
107
+
108
+ <a id="ctxclaudecodemods--claudecodemods"></a>
109
+
110
+ ### `ctx.claudeCodeMods` — `ClaudeCodeMods`
111
+
112
+ The bridge service: loaded mods, their hooks, and the harness listeners that raise their events. Mods join through ClaudeCodeMods.add, which defineMod calls when a mod plugin mounts. The Remote methods let a Client draw each session's band above the prompt and press its buttons.
113
+
114
+ ```ts cordis-catalog
115
+ /**
116
+ * Watch the band above the prompt of one session: the current drawing, then
117
+ * every redraw, until the Client stops watching.
118
+ * @param agent - the session's agent, resolved by the Gateway.
119
+ * @param signal - carrier cancellation.
120
+ * @returns the band's snapshots.
121
+ */
122
+ @Remote({ mode: 'stream' }) watchBand(agent: Agent, signal: AbortSignal): AsyncIterable<SurfaceSnapshot>
123
+
124
+ /**
125
+ * Press a button of the band's current drawing: runs the mod's `onPress` and redraws.
126
+ * @param agent - the session's agent, resolved by the Gateway.
127
+ * @param generation - the drawing the Client saw.
128
+ * @param actionId - the button's action id in that drawing.
129
+ * @returns the snapshot after the press.
130
+ */
131
+ @Remote pressBand(agent: Agent, generation: number, actionId: string): Promise<SurfaceSnapshot>
132
+
133
+ /**
134
+ * Load one mod beneath every mod loaded before it: run its `register`,
135
+ * keep its hooks, and report which of its events this host never raises.
136
+ * @param definition - the mod as its plugin defined it.
137
+ * @returns the disposer that removes the mod's hooks, closes its timers, and releases its registrations.
138
+ * @throws Error when the name is invalid or taken, or when `register` throws (Claude Code's `hooks module did not load` wording).
139
+ */
140
+ async add(definition: ModDefinition): Promise<() => Promise<void>>
141
+ ```
142
+
143
+ Types: [Agent](core.md)
144
+
145
+ Source: [`packages/experimental/claude-code-mods/src/index.ts`](../../packages/experimental/claude-code-mods/src/index.ts)
146
+ <!-- END GENERATED cordis-surface -->
@@ -0,0 +1,146 @@
1
+ # Claude Code 模组:兼容性
2
+
3
+ [English](claude-code-mods.md) | 中文
4
+
5
+ 模组经本桥接运行时与在 Claude Code 下行为不同的每一处,基准为 Claude Code 2.1.287([模组参考](https://code.claude.com/docs/en/plugins/mods/reference)及其 `claude-code.d.ts`)与 2026-10-01 的 [Getting started with Claude Code mods](https://claude.dev/blog/getting-started-with-claude-code-mods/) 一文。每行给出 Claude Code 的行为、本桥接的做法,以及原因或后续工作。未列出的一切均按参考文档描述的方式运行;对本宿主永不触发的事件注册钩子会在模组加载时以警告点名,服务表之外的 `$` 调用以 `no implementation for <namespace>.<method>` 拒绝。
6
+
7
+ ## 打包与加载
8
+
9
+ | Claude Code | 本桥接 | 原因或后续 |
10
+ |---|---|---|
11
+ | 一个插件目录,含 `.claude-plugin/plugin.json` 与指定一个钩子模块的 `hooks/hooks.json`;`claude --plugin-dir`、市场、`/plugin install` | 模组就是插件:`defineMod({ name, version, root, userConfig, register })` 包装钩子模块,并在桥接之后经 cordis.yml 挂载;不读取 `plugin.json` 与 `hooks.json` | 模组加入每个 DSH 插件都使用的同一组合机制;示例目录保留其清单,因此也能在 `claude --plugin-dir` 下运行 |
12
+ | `plugin.json` 中带类型默认值的 `userConfig` schema;选项在加载时校验 | `userConfig` 是 `defineMod` 规格的默认值对象;插件的 cordis.yml `config` 覆盖其上,并按字符串、数字、布尔与字符串列表的记录校验 | 不读取清单 |
13
+ | 层级(`user`、`project`、`managed`)与 `next.to(e, tier)` | 每个模组都以 `user` 加载;测试中的 `tier()` 被接受并忽略;`next.to` 拒绝 | 托管设置不是 DSH 的概念 |
14
+ | 编辑时热重载钩子模块;`claude plugin validate`、`claude plugin test`、由 `types/index.d.ts` 生成类型 | 这些命令都没有;重新挂载会在同一已求值模块上重新运行 `register`,模块级变量保留其值 | 仅按需跟进;测试工具包的 `createModTestKit` 在 Vitest 中替代 `claude plugin test` |
15
+ | 钩子模块可以是 TypeScript | `.ts` 钩子模块只在启动器转译时可加载(源码启动可以;构建后的安装不行) | DSH 交付的是纯 Node |
16
+ | 模组在进程内运行,`$` 是其访问宿主的唯一途径 | 钩子模块以 Node 全局对象在进程内运行,没有访问规则,并拥有进程的全部权限:`$.env` 读写 harness 环境变量,`$.http.fetch` 可访问任意 URL,`$.fs` 与 `$.tool.call` 以会话的身份行动 | 不对模组施加沙箱;只挂载你愿意作为插件运行的模组 |
17
+ | `import type { … } from 'claude-code'`、`declare module 'claude-code' { interface PluginState }` | `claude-code` 模块名只在本仓库的测试设置中解析到桥接的类型;仓库外的模组导入 `@deepseek-ai/dsh-experimental-claude-code-mods` | 类型名是桥接自己的 |
18
+ | `hooks.json` 中的设置钩子与模组钩子并行运行 | 不运行;为它们挂载 `@deepseek-ai/dsh-hooks-claude-code` | 不同的桥接 |
19
+
20
+ ## 事件
21
+
22
+ | 事件 | Claude Code | 本桥接 |
23
+ |---|---|---|
24
+ | `session.start` | 每会话触发一次,在首个提示词之前 | 由根智能体的 `agent/created` 触发,在其首轮之前等待完成;不为子智能体触发 |
25
+ | `session.end` | 每会话触发一次 | 由根智能体的 `agent/disposed` 触发;钩子结束前 `$.state` 可读 |
26
+ | `prompt.submit` | `e.text` 是输入的提示词;`context` 条目各成一块跟在输入的提示词之后;插件提交的提示词带 `origin: { kind: 'plugin', name }` | 相同;`e.text` 拼接已认领批次中人类自己(`user` 来源)消息的文本块,仅含注入上下文的批次不触发,`$.prompt.submit` 排入的提示词以提交的模组为来源 |
27
+ | `turn.start`、`turn.complete` | 每轮触发;子智能体的轮带 `agentId` | 相同;`turn.complete` 的 `{ text }` 到达宿主日志,而非答案下方的一行;`durationMs` 从 `turn/start` 起算 |
28
+ | `tool.call` | 在 Claude Code 的权限检查之前运行;`next({ ...e, command })` 改写工具实际运行的参数,`next({ ...e, tool })` 把调用改派给另一工具 | 包裹 `tools/execute` 运行,在 harness 权限决定之后;改写参数或改名工具的钩子(或 `.catch` 处理器)会被跳过并报告——参数情形指向[工具前输入改写提案](../../.agents/notes/proposed/feature/2026-06-30-pre-tool-input-rewrite.zh.md)——因为已写入日志的调用按原样运行。`{ deny }`、`{ result }`、观察以及在 `next` 之后改写结果或 `isError` 均按描述工作 |
29
+ | `command.run` | 为模组注册的命令运行 | 相同 |
30
+ | `ui.render` | 为每个渲染位点触发(`AbovePrompt`、`Pane`、`ToolUse`、`AssistantMessage`、`Spinner`……) | 只为 `AbovePrompt` 触发,每次会话横幅重绘一次;`Pane` 钩子只经测试工具包的 `$.ui.mount({ component: 'Pane' })` 运行 |
31
+ | `tool.check`、`tool.describe`、`tool.list`、`tool.register` | 塑造工具列表与权限 | 不触发;`$.tool.register` 与 `$.tool.list` 作为 `$` 调用服务 |
32
+ | `turn.step` | 每个模型步骤 | 不触发 |
33
+ | 参考中的其他所有事件:其他 `prompt.*` 事件、`skill.prompt`、`attribution.text`、`command.describe`、`config.*`、其他 `session.*` 事件、`agent.*`、`plugin.register`、`engine.create`、`telemetry.*`、`ui.resolve`、`ui.press`、`ui.input`、`ui.select`、`ui.focus`、`ui.scroll`、`ui.close`、`ui.message` | 由引擎触发 | 可注册,永不触发,在加载时以警告点名 |
34
+ | `classic.*` | 经典设置钩子作为事件 | 在 `register` 时拒绝,与任何未知事件名相同 |
35
+ | `<namespace>.<method>` 操作事件(`fs.read`、`store.set`……) | 更晚加载的模组的 `$` 调用到达在它之前加载的模组 | 相同;`tool.call` 则经由工具流水线到达 |
36
+
37
+ ## 链
38
+
39
+ | Claude Code | 本桥接 | 原因 |
40
+ |---|---|---|
41
+ | 钩子可多次调用 `next`;每次调用都再次运行下层链 | `next` 只运行一次:第二次调用返回第一次运行的结果 | 每条写入日志的调用只执行一次工具 |
42
+ | 钩子在其 `next` 仍在运行时作答 | 下层运行会在钩子答案落定前被等待;答案之后的下层失败会被报告 | 事件只在其启动的一切都结束后落定 |
43
+ | 自身时间预算 10 秒,`.catch` 为 1 秒,`next` 与 `$` 调用内的时间不计,`$.clock.sleep` 除外 | 相同,可配置(`hookTimeoutMs`、`catchTimeoutMs`) | — |
44
+ | 不返回结果对象视为失败 | 相同;`null` 被接受为答案(绘制为空的表面) | 无可绘制内容的 `ui.render` |
45
+ | 结果中的未知字段被丢弃,类型错误使钩子失败 | 类型错误的 `prompt.submit` 结果保留原文本,并只取字符串形式的 context 行 | 对这一常见部分结果的事件从宽处理 |
46
+
47
+ ## `$` 成员
48
+
49
+ | 命名空间 | Claude Code | 本桥接 |
50
+ |---|---|---|
51
+ | `$.plugin` | `name`、`root`、`tier` | 来自 `defineMod` 规格的 `name`、`root` |
52
+ | `$.ui` | `resolve`、`invalidate`、`open`、`close`、`panes`、`focus`、`log`、`toast`、`status`、`notice`、`ask`、`blit`、`copy`、`press`、`input`、`select` | `resolve`、`invalidate`、`open`、`close`、`panes`、`log`、`toast`、`status`、`ask`;`open` 带原因回答 `{ isPlaced: false }` 并重绘横幅;`log`、`toast`、`status` 到达宿主日志;其余拒绝 |
53
+ | `$.command` | `register`、`run`、`list` | 相同;`run` 一个无人回答的命令时拒绝,并点名注册它的模组 |
54
+ | `$.tool` | `register`、`call`、`list` | 相同;注册的工具为 `mcp__<plugin>__<tool>`;`call` 运行 harness 流水线,并把工具推迟的上下文注入会话 |
55
+ | `$.prompt` | `submit`、`compose` | `submit`;消息为 `user` 来源,除非 `asUser` 否则套上 `Message from the "<plugin>" mod:` 框架,它触发的 `prompt.submit` 以该模组为来源 |
56
+ | `$.session` | `id`、`cwd`、`root`、`repo`、`model`、`turns`、`messages`、`usage`、`version`、`send`、`append`、`authorize`、`compact`、`surfaces` | `id`、`cwd`、`root`、`model`、`turns`、`messages`、`usage`、`version`;`cwd` 与 `root` 都报告会话工作区;在 token 计量器得知路由窗口前 `usage.context.window` 为 `0` 且无 `percent`;`rateLimits` 为空;`version` 指明本桥接 |
57
+ | `$.state` | 按会话,热重载后保留 | 按会话,内存中;`ui.render` 期间的读取让横幅订阅该槽位 |
58
+ | `$.store` | 按插件,持久 | 相同,在 `claude_code_mods` 存储域中,每插件 4 MiB |
59
+ | `$.clock` | `now`、`sleep`、`after`、`every`;定时器随插件消亡 | 相同;定时器还随安排它的事件所属会话消亡,事件取消时 `sleep` 拒绝 |
60
+ | `$.fs` | `read`、`write`、`list`、`exists`、`stat`、`ancestors` | 除 `ancestors` 外全部;每文件 4 MiB;`stat.mtimeMs` 为 `0` |
61
+ | `$.process` | `run`、`spawn` | 仅 `run`,不经 shell 的 argv,默认 `processTimeoutMs` |
62
+ | `$.http` | `fetch` | 相同,正文最多 4 MiB |
63
+ | `$.env` | `get`、`set` | 相同;进程环境由所有会话与插件共享 |
64
+ | `$.model`、`$.agent`、`$.config`、`$.settings`、`$.mcp`、`$.audio`、`$.telemetry`、`$.turn` | 已服务 | 以 `no implementation` 拒绝;`$.model.complete` 等待一个写入日志的副请求事件 |
65
+
66
+ ## 绘制
67
+
68
+ | Claude Code | 本桥接 |
69
+ |---|---|
70
+ | `Box`、`Text`、`Button`、`Input`、`Spacer` 以及宿主自己的元素种类 | 来自 `$.ui.resolve(e)` 的 `Box`、`Text`、`Button`;树经校验,`Button` 的 `onPress` 留在宿主中,位于按绘制分配的动作 id 之后 |
71
+ | `Box` 属性:`flexDirection`、`padding*`、`gap`、`border*`、`width`、`height`、`overflow`、`scroll` | `flexDirection`、`padding`、`paddingX`、`paddingY`、`gap`、`border`、`borderColor`;其余会序列化,Web 横幅忽略 |
72
+ | `Text` 属性:`color`、`bold`、`dimColor`、`italic`、`underline`、`wrap`、`truncate` | `color`(终端调色板名)、`bold`、`dimColor`、`italic`、`underline`;Web 横幅会换行 |
73
+ | `Button` 属性:`label`、`hotkey`、`disabled`、`onPress`;单个数字键触发热键 | `label`、`hotkey`(显示为提示)、`disabled`、`onPress`(点击) |
74
+ | 横幅是一个实例;`hasSurvey`、`isWorking`、`maxRows`、`bodyColumns` 反映终端 | 每会话一个实例,按模组加载顺序咨询;`bodyColumns` 与 `viewport.columns` 取桥接的 `bandColumns`(默认 `120`),`maxRows` 取 `bandRows`(默认 `10`),`hasSurvey` 与 `isWorking` 为 `false`;Web 横幅换行而非滚动 |
75
+ | 横幅随宿主帧重绘,并在渲染读取过的 `$.state` 值变化时重绘 | 在 `session.start` 之后、上次绘制读取过的 `$.state` 值被写入时、在 `$.ui.open`、`$.ui.close`、`$.ui.invalidate` 之后、在每条 `tool.call` 链与 `turn.complete` 结束后以及按下之后重绘;在其他时刻改变模块级状态的模组在下一次触发时绘出。按下运行 `onPress` 时没有时间限制 |
76
+ | 带 `focus`、`scroll`、停靠在对话旁的 `Pane` | 没有面板:`$.ui.open` 回答 `{ isPlaced: false }`,模组回退到横幅;测试工具包直接挂载 `Pane` 钩子 |
77
+ | 热键、`TextInput`、焦点、滚动、`ui.press`、`ui.input`、`ui.select` | 不服务;后续工作 |
78
+
79
+ ## 测试
80
+
81
+ | `claude-code/testing` | 本桥接 |
82
+ |---|---|
83
+ | `describe`、`test(name, ($, on) => …)`、`expect`、`mock`、`tier` | 在本仓库内同一模块名基于 Vitest 提供它们;`test` 从测试文件位置推断模组(`<mod>/tests/*.test.ts` → `<mod>/index.ts`),`defineModTests` 可覆盖。仓库外则从 `@deepseek-ai/dsh-experimental-claude-code-mods/testing` 获取 `createModTestKit` 与 `mock` |
84
+ | `on` 为引擎的答案打桩;工具包自行回答 `ui.*` | 相同;`ui.open` 回答 `{ isPlaced: false }`,`ui.invalidate` 与 `ui.close` 成功;`session.cwd`、`process.run`、`fs.*`、`store.*`、`env.*` 需要桩(`mock.store`、`mock.env`、`mock.clock` 回答整个命名空间) |
85
+ | `$.ui.mount({ plugin, surface, component, props })` → `find`、`findAll`、`press`、`unmount` | 相同,另有 `tree()` 与 `text()`;每次读取都经所有已加载模组的钩子重新渲染;`plugin` 与 `surface` 为源码兼容而接受 |
86
+ | 测试中钩子预算 5 秒 | 相同(`budgetMs`) |
87
+
88
+ ## 示例模组
89
+
90
+ | 模组 | 来源 | 经本桥接 |
91
+ |---|---|---|
92
+ | Token Weather | 文中的模块、类型契约与测试,原样 | 按发布原样运行;测试中的三处 `as any` 转换因工具包带类型而去掉。通过 token 计量器从 `$.session.usage` 在横幅中绘制 |
93
+ | Blast Radius | 文中的 `tool.call` 钩子原样;`classify`、`measure` 与树按文中描述补全 | 以真实的 `sleep` 轮询持有命令,在横幅中绘制报告(`isPlaced: false`),由 Proceed 或 Cancel 决定;请加载在 Token Weather 之前 |
94
+ | Replay Theater | 文中的五个钩子原样;`stepsFor`、差异、`openReplay`、面板与提示补全 | 记录 Edit 与 Write 调用,轮结束后在横幅中提示,并因无面板放置而在横幅中逐步浏览差异 |
95
+ | `diff`([anthropics/claude-code](https://github.com/anthropics/claude-code/tree/main/mods/diff),于 `52c7644` 阅读) | TypeScript,约 570 个文件,钩住 `command.run`、`prompt.submit`、`session.start`、`tool.call`、`ui.close`、`ui.focus`、`ui.render`、`ui.scroll` | 不可运行:需要 `$.settings.read`、`$.telemetry.*`、面板上的 `$.session.messages`、`ui.focus` 与 `ui.scroll` 事件以及已放置的 `Pane`。以阅读方式评估;该仓库的条款不允许复制夹具 |
96
+ | `agents-md`(同一仓库) | 钩住 `agent.spawn`、`prompt.context`、`session.start`、`tool.call` | 不可运行:`prompt.context` 与 `agent.spawn` 不触发,`$.fs.ancestors`、`$.telemetry.*` 不服务 |
97
+ | `sec-default`(同一仓库) | 钩住 `tool.check`、`prompt.compose`、`settings.read`、`classic.*`、`plugin.register`…… | 不可运行:基于本宿主不触发的事件的托管层策略 |
98
+ | `telemetry`(同一仓库) | 钩住 `engine.create`、`telemetry.*`、`session.start`、`session.end`;调用 `$.session.repo`、`$.settings.read` | 不可运行:`telemetry.*` 与 `engine.create` 不触发,两个 `$` 成员不服务 |
99
+
100
+ <!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
101
+
102
+ <a id="cordis-surface"></a>
103
+
104
+ ## Cordis API
105
+
106
+ 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).
107
+
108
+ <a id="ctxclaudecodemods--claudecodemods"></a>
109
+
110
+ ### `ctx.claudeCodeMods` — `ClaudeCodeMods`
111
+
112
+ The bridge service: loaded mods, their hooks, and the harness listeners that raise their events. Mods join through ClaudeCodeMods.add, which defineMod calls when a mod plugin mounts. The Remote methods let a Client draw each session's band above the prompt and press its buttons.
113
+
114
+ ```ts cordis-catalog
115
+ /**
116
+ * Watch the band above the prompt of one session: the current drawing, then
117
+ * every redraw, until the Client stops watching.
118
+ * @param agent - the session's agent, resolved by the Gateway.
119
+ * @param signal - carrier cancellation.
120
+ * @returns the band's snapshots.
121
+ */
122
+ @Remote({ mode: 'stream' }) watchBand(agent: Agent, signal: AbortSignal): AsyncIterable<SurfaceSnapshot>
123
+
124
+ /**
125
+ * Press a button of the band's current drawing: runs the mod's `onPress` and redraws.
126
+ * @param agent - the session's agent, resolved by the Gateway.
127
+ * @param generation - the drawing the Client saw.
128
+ * @param actionId - the button's action id in that drawing.
129
+ * @returns the snapshot after the press.
130
+ */
131
+ @Remote pressBand(agent: Agent, generation: number, actionId: string): Promise<SurfaceSnapshot>
132
+
133
+ /**
134
+ * Load one mod beneath every mod loaded before it: run its `register`,
135
+ * keep its hooks, and report which of its events this host never raises.
136
+ * @param definition - the mod as its plugin defined it.
137
+ * @returns the disposer that removes the mod's hooks, closes its timers, and releases its registrations.
138
+ * @throws Error when the name is invalid or taken, or when `register` throws (Claude Code's `hooks module did not load` wording).
139
+ */
140
+ async add(definition: ModDefinition): Promise<() => Promise<void>>
141
+ ```
142
+
143
+ Types: [Agent](core.zh.md)
144
+
145
+ Source: [`packages/experimental/claude-code-mods/src/index.ts`](../../packages/experimental/claude-code-mods/src/index.ts)
146
+ <!-- END GENERATED cordis-surface -->
@@ -1,6 +1,19 @@
1
- # Bilingual-pair consistency record (docs/i18n/README.md): the git blob hash of each
2
- # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
- # after editing either side, bring the other along and re-record with:
1
+ # Bilingual-pair consistency record for client-modules.md (docs/i18n/README.md): per heading
2
+ # section, a hash of its English and Chinese blocks outside code blocks and generated regions.
3
+ # After editing either side, bring the other along and re-record with:
4
4
  # pnpm run verify-translation-pairing --write docs/subsystems/client-modules.md
5
- client-modules.md: 89f3e675628bca71f001170b5efabb241134dfb0
6
- client-modules.zh.md: 1a41b4bd061ebf83f80c6f7c1633932da13b5942
5
+ /client-modules:
6
+ en: e256a29cc5bc2726
7
+ zh: e181d6b1a6e5c647
8
+ /client-modules/the-wire:
9
+ en: 5734d296e8ea39d1
10
+ zh: 27bedf34fc90d892
11
+ /client-modules/the-scan:
12
+ en: 91ce66fab388a8a2
13
+ zh: 77428943582ae3f6
14
+ /client-modules/the-bundle-route-and-index-injection:
15
+ en: d653be500d3a0d67
16
+ zh: fffb1901ce8ba7d9
17
+ /client-modules/the-service:
18
+ en: 000882ed7f09ad3f
19
+ zh: c17c05f087d9574d