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
@@ -1,85 +1,63 @@
1
- # Cookbook: adding a settings card
1
+ # Cookbook: live configuration forms
2
2
 
3
3
  English | [中文](adding-a-settings-card.zh.md)
4
4
 
5
- How a plugin puts its own configuration on the web settings page. Nothing in this path needs a change inside this repository: the Host serves every registered settings namespace, and the **Plugins** section keys its cards on the namespace they edit, so a plugin that registers both halves is paired up automatically.
5
+ Declare live fields in the plugin Config schema and expose them through a product-owned settings card. The exported `Config` interface describes the values received by the plugin, including each `Volatile<T>` reference.
6
6
 
7
- The two halves live in one package — the Host half under `src/`, the browser half under `src/client/`, exported as `./client` and declared with `dsh.client`. [`packages/client/ui-theme`](../../packages/client/ui-theme) is a worked example of that packaging; the cards this section ships live in [`packages/client/ui-settings-plugins`](../../packages/client/ui-settings-plugins).
8
-
9
- ## 1. Register the namespace (Host half)
10
-
11
- The namespace is the join key, so pick it once and spell it in both halves. A consumer that already has a `cordis.yml` entry should register through `ctx.settings.installSection()`, which layers the entry under the user document and keeps working when no settings provider is mounted:
7
+ ## 1. Declare live fields
12
8
 
13
9
  ```ts
14
- import type { Context } from '@deepseek-ai/cordis'
15
- import type {} from '@deepseek-ai/dsh-settings'
10
+ import type { Context, Volatile } from '@deepseek-ai/cordis'
16
11
  import z from '@deepseek-ai/schemastery'
17
12
 
18
- declare function assertReachable(endpoint: string | undefined): void
19
- declare function rebuildFromSettings(config: Config): void
20
-
21
- export const MY_PLUGIN_NS = 'my-plugin'
22
-
23
13
  export interface Config {
24
- endpoint?: string
25
- retries?: number
14
+ endpoint: Volatile<string | undefined>
15
+ retries: Volatile<number>
26
16
  }
27
17
 
28
- export const Config: z<Config> = z.object({
29
- endpoint: z.string(),
30
- retries: z.number().step(1).min(0).default(3),
18
+ export const Config = z.object({
19
+ endpoint: z.string().volatile(),
20
+ retries: z.number().step(1).min(0).default(3).volatile(),
31
21
  })
32
22
 
33
- export function apply(ctx: Context, config: Config) {
34
- let source = () => config
35
- ctx.inject(['settings'], (settingsCtx) => {
36
- settingsCtx.settings.installSection(ctx, MY_PLUGIN_NS, Config, config, {
37
- // Constraints the schema cannot express refuse the write, not the next use.
38
- validate: value => void assertReachable(value.endpoint),
39
- setSource: (current) => { source = current },
40
- onChange: () => { rebuildFromSettings(source()) },
41
- })
23
+ export function apply(ctx: Context, config: Config): void {
24
+ ctx.on('loader/volatile-update', () => {
25
+ ctx.logger.info('Retry limit: %d', config.retries.get())
42
26
  })
43
27
  }
44
28
  ```
45
29
 
46
- `role('secret')` on a field keeps its value off every response; the card writes such a field into an `update`/`mutate` payload, or addresses a credential reference through the `credentials` domain instead. `applies: 'restart'` tells a configuration surface the owner acts on a change only at the next start.
30
+ Read `.get()` when starting an operation. A request that needs a consistent snapshot captures its values once. Use `.check()` for cross-field Config validation; these checks run on the Host before persistence and are omitted from serialized form schemas.
47
31
 
48
- ## 2. Register the card (browser half)
32
+ ## 2. Compose the plugin
49
33
 
50
- The card registers into the `plugins.item` list slot under its namespace and owns everything inside it — chrome, controls, and copy. The list slot takes `id`, `order`, and `label`, and hands the component a `props` object with `view: 'summary' | 'page'` (render the compact summary on the Plugins page and the full form on its own page). It reads and writes through `ctx.settingsScope`, which fences each write with the revision it read:
34
+ Give each instance a unique profile entry id. The base bundle mounts settings and config-editor. For custom profiles, see their package READMEs before mounting the same services.
51
35
 
52
- ```ts ignore-check
53
- import type { Context as ClientContext } from '@deepseek-ai/cordis'
54
- // Type-only: the list slot's declaration. Cross-plugin collaboration goes
55
- // through cordis services; a value import fails the client bundle-purity gate.
56
- import type {} from '@deepseek-ai/dsh-client-ui-plugin-manager/client'
36
+ `role('secret')` keeps a value out of form responses. Use credential references for values managed by the credentials domain. Ordinary fields stay out of the settings schema.
57
37
 
58
- export const inject = ['slots', 'locale', 'connection', 'remote', 'settingsScope']
38
+ ## 3. Verify editing
59
39
 
60
- export function apply(ctx: ClientContext): void {
61
- const card = new MyPluginCardController(ctx.settingsScope.bind({ namespace: 'my-plugin' }))
62
- ctx.slots.inject('plugins.item', () => ctx.slots.register({
63
- id: 'my-plugin',
64
- order: 100,
65
- label: 'settings.myPlugin',
66
- inject: () => card.inject(),
67
- }, MyPluginCard),
68
- )
69
- }
70
- ```
40
+ Change a field in Plugins and save. Verify the profile patch, the next consumer operation, unchanged plugin instance identity, and restoration after restart. Reject an invalid value and verify that neither the file nor the live value changed.
71
41
 
72
- The scope snapshot carries what a form needs: the resolved `value`, the composition `base`, and the raw `user` layer, whose key **presence** — not its value — is what marks a field overridden. `scope.set(field, value)` stores one field and `scope.unset(field)` clears it back to the composition layer.
42
+ Custom plugin pages receive `form.state` and `form.mutate(operations, expectedRevision)` from the Plugins page owner. The Host validates full Config and applies edits through ConfigEditor and volatile HMR. The [plugin settings package](../../packages/client/ui-settings-plugins/README.md) owns the existing card examples.
73
43
 
74
- ## 3. What the tab does with it
44
+ ## 4. Contribute to another plugin's page
75
45
 
76
- The **Plugin configuration** tab reads which namespaces the Host serves and dispatches one slot key per namespace. A card is rendered when the Host serves its key and skipped when it does not, so a deployment that never composed the Host half shows no trace of the card. A served namespace no card claims renders nothing — that is how the namespaces owned by other pages (`ui-theme`, `permission`, `llm-*`) stay off this tab.
46
+ A plugin with something to say about a bundle, a row, or an official plugin it does not own registers into `plugins.detail.actions` (a control at the head of the page), `plugins.detail.badge` (a tag beside the title), or `plugins.detail.section` (a section under the page's own content). Every entry is rendered with the page's `subject` — `{ kind: 'bundle', pkg }`, `{ kind: 'row', pkg, row }`, or `{ kind: 'item', id }` — and returns null for a subject it has nothing for:
77
47
 
78
- Cards appear sorted by the `order` each entry declares in the `plugins.item` list slot.
48
+ ```tsx ignore-check
49
+ ctx.slots.inject('plugins.detail.badge', () => ctx.slots.register({
50
+ name: 'plugins.detail.badge',
51
+ id: 'acme-update',
52
+ locale: 'acmeUpdate',
53
+ }, ({ t, subject }) => subject.kind === 'bundle' && hasUpdate(subject.pkg) ? <Tag tone="info">{t('update')}</Tag> : null))
54
+ ```
55
+
56
+ ## 5. Where the browser half rides
79
57
 
80
- ## Packaging
58
+ The browser half is served to the page by the [client module system](../../packages/client/modules), which scans the enabled Loader entries for packages declaring `dsh.client` and serves each one's built `./client` export — but it attaches a package's half to the Loader row whose specifier is the bare package name. A row mounted from a subpath export never carries a half, so a bundle that splits one package into several rows keeps its half on the root row, and every page it registers goes away when that row is switched off. A sub-plugin whose page must outlive the other rows ships as its own package.
81
59
 
82
- The browser half is served to the page by the [client module system](../../packages/client/modules), which scans the enabled Loader entries for packages declaring `dsh.client` and serves each one's built `./client` export. So the plugin appears on the page as soon as a `cordis.yml` mounts it — no rebuild of the web application.
60
+ The built `./client` file must be in the client module system's lazy-CJS factory format: one script that registers the package name and a `factory(require)` with the page's module loader, described in the [client module system's README](../../packages/client/modules/README.md). The `clientBundle` tsdown preset that emits it lives in `packages/client/tsdown.client.ts` rather than in a published package, so a package outside this repository reproduces that build itself.
83
61
 
84
62
  ```jsonc
85
63
  {
@@ -87,16 +65,8 @@ The browser half is served to the page by the [client module system](../../packa
87
65
  ".": { "types": "./lib/types/index.d.ts", "default": "./lib/index.js" },
88
66
  "./client": { "types": "./lib/types/client/index.d.ts", "default": "./lib/client.js" }
89
67
  },
90
- "dsh": { "client": { "platform": "web", "inject": ["@deepseek-ai/dsh-client-ui-settings-plugins"] } }
68
+ "dsh": { "client": { "platform": "web", "inject": ["@deepseek-ai/dsh-client-ui-settings"] } }
91
69
  }
92
70
  ```
93
71
 
94
- The bundle must be the loader's lazy-CJS factory artifact. Inside this repository `tsdown.config.ts` is three lines over the shared preset:
95
-
96
- ```ts ignore-check
97
- import { clientBundle } from '../tsdown.client.ts'
98
-
99
- export default clientBundle('@deepseek-ai/dsh-client-my-plugin', ['lib/types/index.js', 'lib/types/invariant.js'])
100
- ```
101
-
102
- No published preset exposes this package, so a package outside this repository has to reproduce the same output format itself. The bundle-purity gate also rejects value imports across plugins, so a card cannot import this section's card chrome or its staged-form model — it renders its own, and owns its own staging and revision fencing. Both limits are recorded under [the section's known limitations](../../packages/client/ui-settings-plugins/README.md#known-limitations-and-deferred-work).
72
+ A companion package for a built-in namespace is the same browser half in a client-only package with an empty Host `apply`, listed in the web composition's plugin roster ([`packages/bundle/web-app/cordis.patch.yml`](../../packages/bundle/web-app/cordis.patch.yml)) and registering into `plugins.item` through `ctx.configForms.whileServed`, so the page exists exactly while the Host serves the namespace.
@@ -1,85 +1,63 @@
1
- # Cookbook: 新增设置卡片
1
+ # 实践指南:即时配置表单
2
2
 
3
3
  [English](adding-a-settings-card.md) | 中文
4
4
 
5
- 插件如何把自己的配置放上 Web 设置页。这条路径上没有任何一步需要改动本仓库:Host 服务每一个已注册的 settings 命名空间,而**插件配置**分区以卡片所编辑的命名空间为键,因此同时注册了两个半侧的插件会被自动配对。
5
+ 在插件 Config schema 中声明即时字段,并通过产品所属的设置卡片提供编辑入口。导出的 `Config` 接口描述插件收到的值,包括每个 `Volatile<T>` 引用。
6
6
 
7
- 两个半侧住在同一个包里——Host 半侧在 `src/`,浏览器半侧在 `src/client/`,以 `./client` 导出并用 `dsh.client` 声明。[`packages/client/ui-theme`](../../packages/client/ui-theme) 是这种打包方式的现成例子;本分区自带的卡片在 [`packages/client/ui-settings-plugins`](../../packages/client/ui-settings-plugins)。
8
-
9
- ## 1. 注册命名空间(Host 半侧)
10
-
11
- 命名空间就是配对用的键,所以只挑一次,并在两个半侧都写出它。已经有 `cordis.yml` entry 的消费方应通过 `ctx.settings.installSection()` 注册——它把 entry 层叠在用户文档之下,并在没有挂载 settings provider 时照常工作:
7
+ ## 1. 声明即时字段
12
8
 
13
9
  ```ts
14
- import type { Context } from '@deepseek-ai/cordis'
15
- import type {} from '@deepseek-ai/dsh-settings'
10
+ import type { Context, Volatile } from '@deepseek-ai/cordis'
16
11
  import z from '@deepseek-ai/schemastery'
17
12
 
18
- declare function assertReachable(endpoint: string | undefined): void
19
- declare function rebuildFromSettings(config: Config): void
20
-
21
- export const MY_PLUGIN_NS = 'my-plugin'
22
-
23
13
  export interface Config {
24
- endpoint?: string
25
- retries?: number
14
+ endpoint: Volatile<string | undefined>
15
+ retries: Volatile<number>
26
16
  }
27
17
 
28
- export const Config: z<Config> = z.object({
29
- endpoint: z.string(),
30
- retries: z.number().step(1).min(0).default(3),
18
+ export const Config = z.object({
19
+ endpoint: z.string().volatile(),
20
+ retries: z.number().step(1).min(0).default(3).volatile(),
31
21
  })
32
22
 
33
- export function apply(ctx: Context, config: Config) {
34
- let source = () => config
35
- ctx.inject(['settings'], (settingsCtx) => {
36
- settingsCtx.settings.installSection(ctx, MY_PLUGIN_NS, Config, config, {
37
- // Constraints the schema cannot express refuse the write, not the next use.
38
- validate: value => void assertReachable(value.endpoint),
39
- setSource: (current) => { source = current },
40
- onChange: () => { rebuildFromSettings(source()) },
41
- })
23
+ export function apply(ctx: Context, config: Config): void {
24
+ ctx.on('loader/volatile-update', () => {
25
+ ctx.logger.info('Retry limit: %d', config.retries.get())
42
26
  })
43
27
  }
44
28
  ```
45
29
 
46
- 字段上的 `role('secret')` 让它的值不出现在任何响应里;卡片把这类字段写进 `update`/`mutate` 载荷,或改为经 `credentials` 领域寻址一个凭据引用。`applies: 'restart'` 告诉配置表层:拥有方要到下次启动才会对变更生效。
30
+ 在操作开始时读取 `.get()`。需要一致快照的请求一次性捕获所需值。使用 `.check()` 进行跨字段 Config 验证;这些检查在持久化前由 Host 执行,不进入序列化的表单 schema。
47
31
 
48
- ## 2. 注册卡片(浏览器半侧)
32
+ ## 2. 组合插件
49
33
 
50
- 卡片以自己的命名空间为键注册进 `plugins.item` 列表槽,并拥有其中的一切——外观、控件与文案。列表槽接受 `id`、`order`、`label`,并给组件传 `props` 对象,其中 `view: 'summary' | 'page'`(在 Plugins 页渲染紧凑摘要、在专属页渲染完整表单)。它通过 `ctx.settingsScope` 读写,后者用读取时的 revision 为每次写入设栅:
34
+ 为每个实例分配唯一的 profile 条目 id。基础组合包挂载 settings 和 config-editor。自定义 profile 挂载这些服务前,请阅读相应包的 README。
51
35
 
52
- ```ts ignore-check
53
- import type { Context as ClientContext } from '@deepseek-ai/cordis'
54
- // Type-only: the list slot's declaration. Cross-plugin collaboration goes
55
- // through cordis services; a value import fails the client bundle-purity gate.
56
- import type {} from '@deepseek-ai/dsh-client-ui-plugin-manager/client'
36
+ `role('secret')` 阻止值进入表单响应。对于凭据域管理的值,使用凭据引用。普通字段不进入设置 schema。
57
37
 
58
- export const inject = ['slots', 'locale', 'connection', 'remote', 'settingsScope']
38
+ ## 3. 验证编辑
59
39
 
60
- export function apply(ctx: ClientContext): void {
61
- const card = new MyPluginCardController(ctx.settingsScope.bind({ namespace: 'my-plugin' }))
62
- ctx.slots.inject('plugins.item', () => ctx.slots.register({
63
- id: 'my-plugin',
64
- order: 100,
65
- label: 'settings.myPlugin',
66
- inject: () => card.inject(),
67
- }, MyPluginCard),
68
- )
69
- }
70
- ```
40
+ 在插件页面修改字段并保存。验证 profile patch、消费者下一次操作、插件实例标识不变,以及重启后的恢复。提交无效值,并确认文件和即时值均未改变。
71
41
 
72
- scope 快照携带表单所需的一切:解析后的 `value`、组装层 `base`,以及原始的 `user` 层——字段是否被覆盖,取决于它在 `user` 层中是否**出现**,而非它的值。`scope.set(field, value)` 存一个字段,`scope.unset(field)` 把它清回组装层。
42
+ 自定义插件页面从 Plugins 页面所有者接收 `form.state` 和 `form.mutate(operations, expectedRevision)`。Host 校验完整 Config,并通过 ConfigEditor 和 volatile HMR 应用修改。[插件设置包](../../packages/client/ui-settings-plugins/README.zh.md) 提供现有卡片示例。
73
43
 
74
- ## 3. 标签页拿它做什么
44
+ ## 4. 向其他插件的页面贡献内容
75
45
 
76
- **插件配置**标签页读取 Host 服务了哪些命名空间,并为每个命名空间派发一个 slot 键。当 Host 服务了某卡片的键时它被渲染,否则被跳过,因此从未组装过 Host 半侧的部署不会留下这张卡片的任何痕迹。被服务却无人认领的命名空间什么都不渲染——归其他页面所有的那些命名空间(`ui-theme`、`permission`、`llm-*`)正是这样留在本标签页之外的。
46
+ 对某个不属于自己的组合包、行或官方插件有话要说的插件,注册进 `plugins.detail.actions`(页头的控件)、`plugins.detail.badge`(标题旁的标签)或 `plugins.detail.section`(页面自身内容之下的区块)。每个条目都以页面的 `subject` 渲染——`{ kind: 'bundle', pkg }`、`{ kind: 'row', pkg, row }` 或 `{ kind: 'item', id }`——对无话可说的 subject 返回 null:
77
47
 
78
- 卡片按各自在 `plugins.item` 列表槽中声明的 `order` 排序显示。
48
+ ```tsx ignore-check
49
+ ctx.slots.inject('plugins.detail.badge', () => ctx.slots.register({
50
+ name: 'plugins.detail.badge',
51
+ id: 'acme-update',
52
+ locale: 'acmeUpdate',
53
+ }, ({ t, subject }) => subject.kind === 'bundle' && hasUpdate(subject.pkg) ? <Tag tone="info">{t('update')}</Tag> : null))
54
+ ```
55
+
56
+ ## 5. 浏览器半侧挂在哪里
79
57
 
80
- ## 打包
58
+ 浏览器半侧由[客户端模块系统](../../packages/client/modules)送到页面:它扫描已启用的 Loader 条目,找出声明了 `dsh.client` 的包,送出每个包构建好的 `./client` 导出——但它只把一个包的半侧挂在说明符恰为裸包名的那一行上。从子路径导出挂载的行永远不带半侧,因此把一个包拆成多行的组合包,其半侧留在根行上,它注册的每个页面都随根行关闭而消失。需要在其他行关闭时仍保留页面的子插件,应作为独立的包发布。
81
59
 
82
- 浏览器半侧由[客户端模块系统](../../packages/client/modules)提供给页面:它扫描已启用的 Loader entries 中声明了 `dsh.client` 的包,并提供每个包构建出的 `./client` 导出。因此只要 `cordis.yml` 挂载了该插件,它就会出现在页面上——无需重新构建 Web 应用。
60
+ 构建出的 `./client` 文件必须是客户端模块系统的 lazy-CJS factory 格式:一段脚本,向页面的模块加载器登记包名和一个 `factory(require)`,见[客户端模块系统的 README](../../packages/client/modules/README.zh.md)。生成它的 `clientBundle` tsdown 预设位于 `packages/client/tsdown.client.ts`,而不在任何已发布的包里,因此仓库之外的包要自己复刻这一步构建。
83
61
 
84
62
  ```jsonc
85
63
  {
@@ -87,16 +65,8 @@ scope 快照携带表单所需的一切:解析后的 `value`、组装层 `base
87
65
  ".": { "types": "./lib/types/index.d.ts", "default": "./lib/index.js" },
88
66
  "./client": { "types": "./lib/types/client/index.d.ts", "default": "./lib/client.js" }
89
67
  },
90
- "dsh": { "client": { "platform": "web", "inject": ["@deepseek-ai/dsh-client-ui-settings-plugins"] } }
68
+ "dsh": { "client": { "platform": "web", "inject": ["@deepseek-ai/dsh-client-ui-settings"] } }
91
69
  }
92
70
  ```
93
71
 
94
- bundle 必须是 loader 的 lazy-CJS factory 产物。在本仓库内,`tsdown.config.ts` 就是基于共享预设的三行:
95
-
96
- ```ts ignore-check
97
- import { clientBundle } from '../tsdown.client.ts'
98
-
99
- export default clientBundle('@deepseek-ai/dsh-client-my-plugin', ['lib/types/index.js', 'lib/types/invariant.js'])
100
- ```
101
-
102
- 没有已发布的预设暴露该包,因此本仓库之外的包得自行复刻同样的输出格式。bundle 纯净度门禁同时拒绝跨插件的值导入,所以卡片无法导入本分区的卡片外观或其暂存表单模型——它渲染自己的那一份,并自行拥有暂存与 revision 设栅。这两条限制都记在[本分区的已知限制](../../packages/client/ui-settings-plugins/README.zh.md#known-limitations-and-deferred-work)里。
72
+ 内置命名空间的伴生包就是同样的浏览器半侧放在一个纯客户端包里,宿主 `apply` 为空,列入 Web 组合的插件花名册([`packages/bundle/web-app/cordis.patch.yml`](../../packages/bundle/web-app/cordis.patch.yml)),并通过 `ctx.configForms.whileServed` 注册进 `plugins.item`,页面因此恰好在 Host 服务该命名空间期间存在。
@@ -1,6 +1,31 @@
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 adding-a-tool.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/cookbook/adding-a-tool.md
5
- adding-a-tool.md: 659f87bf88ac7fc4b8bc7dd65672c86e6b4326f6
6
- adding-a-tool.zh.md: 4804c22b22e5761e27c59392d76a322a7407af99
5
+ /tool-authoring-reference:
6
+ en: 97ed54443f2a4464
7
+ zh: 09c294f281c0de75
8
+ /tool-authoring-reference/the-minimal-shape:
9
+ en: 2cc80a2a79e23005
10
+ zh: 87e43383055890ce
11
+ /tool-authoring-reference/rules-of-the-execute-contract:
12
+ en: 0b85f46f6a5bd8af
13
+ zh: 56eb8d05198333dc
14
+ /tool-authoring-reference/long-running-work:
15
+ en: 5f6b0c15cb91e21b
16
+ zh: 633a2192df186ac3
17
+ /tool-authoring-reference/execution-policy-and-observation:
18
+ en: 9f894e50199d7ec5
19
+ zh: 934e4526f34c27fe
20
+ /tool-authoring-reference/ptc-mode-reaches-your-tool-for-free:
21
+ en: b1c249d7dde7fbad
22
+ zh: ff183efd4871340a
23
+ /tool-authoring-reference/how-your-tool-renders-in-a-ui:
24
+ en: e4520ce47c43ef22
25
+ zh: 13971ee10f90d30b
26
+ /tool-authoring-reference/web-client-presentation:
27
+ en: 4a8bc6993ec4dcc1
28
+ zh: 9cf5f5cb2bf1d08a
29
+ /tool-authoring-reference/verification:
30
+ en: 834e4936552af0a7
31
+ zh: ece3d791dc1e2a26
@@ -46,13 +46,13 @@ Registration is effect-based: disposing the plugin fiber unregisters the tool. S
46
46
  - **Throwing or returning an invalid value means `isError`.** The registry catches throws and contains schema, renderer, metadata-projector, and lossless-JSON failures before observers run. Throw for infrastructure failures. Represent a successful domain outcome in the canonical value even when its Native renderer explains a non-ideal state, such as a non-zero process exit.
47
47
  - **Honor `exec.signal`.** Cancel in-flight work when it fires.
48
48
  - **Project durable card data with `presentationMeta` (optional).** `output.presentationMeta(args, value)` derives replayable JSON from the same canonical value. The core persists it on `tool/result` and hands it to `presentResult`, so a card that needs result-time facts—such as `write`/`edit` applied hunks—survives replay without persisting the canonical value. The projector is skipped for nested Code dispatches because they have no cards.
49
- - **Use `exec.agent` for async notifications.** `agent.inject({ content, source: { kind: 'plugin', plugin: '<name>' } })` appends durable context the NEXT model request sees — it is not a wake-up (an idle agent stays idle). Guard against disposed agents (try/catch).
49
+ - **Use `exec.agent` for async notifications.** `agent.inject({ content, source: { kind: 'my-plugin' } })` appends durable context the NEXT model request sees — it is not a wake-up (an idle agent stays idle). Declare that `kind` through [`MessageSourceMap`](../subsystems/llm-streaming.md#content-blocks-and-messages) in your plugin: session format V4 rejects the retired `{ kind: 'plugin', plugin: '<name>' }` wrapper at message admission. Guard against disposed agents (try/catch).
50
50
 
51
51
  ## Long-running work
52
52
 
53
53
  Gate `run_in_background` with producer config, then register through `ctx.jobs.start({ kind, label, owner: exec.agent, run })`. The registry rejects a pre-aborted invocation before the producer body; the runtime validates ownership and task-controller availability before `run()` starts work, then supplies the id, session fence, generic control tools, notices, and owner cleanup. A successful background branch returns a typed canonical handle such as `{ kind: 'background', jobId }`; its Native renderer may keep human prose such as `started background job bash-1`, but PTC mode must never parse that prose to recover the id.
54
54
 
55
- The producer supplies synchronous `cancel`, non-rejecting `done` that settles after resource cleanup, and optional consuming `readOutput` with bounded-output formatting. A pre-aborted call is a failure because no task exists whose id could satisfy the successful output schema. Once `ctx.jobs.start()` publishes the id, use a task-owned cancellation signal rather than `exec.signal`: later outer-call cancellation stops waiting for the call but does not kill published work; `job_kill`, owner disposal, and service teardown own that lifetime. Foreground work remains coupled to `exec.signal`. See the [background job runtime Agent Note](../../.agents/notes/implemented/architecture/2026-06-20-generic-long-running-tool-runtime.md) and `dsh-tool-bash` for a stream producer.
55
+ The spec supplies synchronous `cancel`, a non-rejecting `done` that settles after resource cleanup, and either pull `output` sources the registry pumps into the job's output ring or pushes through the `JobHandle` its starter receives; `dsh-tool-jobs` renders the model's consuming read from that ring. A pre-aborted call is a failure because no task exists whose id could satisfy the successful output schema. Once `ctx.jobs.start()` publishes the id, use a task-owned cancellation signal rather than `exec.signal`: later outer-call cancellation stops waiting for the call but does not kill published work; `job_kill`, owner disposal, and service teardown own that lifetime. Foreground work remains coupled to `exec.signal`. See the [background job runtime reference](../../packages/jobs/jobs/README.md) and `dsh-tool-bash` for a stream producer.
56
56
 
57
57
  ## Execution policy and observation
58
58
 
@@ -46,13 +46,13 @@ export function apply(ctx: Context) {
46
46
  - **抛出异常或返回无效值意味着 `isError`。** 注册表会捕获异常,并在观察者运行前收敛 schema、渲染器、元数据投影器和无损 JSON 失败。基础设施故障请抛异常。成功的领域结果即使表示不理想的状态,也应写入规范值;其 Native 渲染器可以解释该状态,例如进程以非零状态退出。
47
47
  - **遵守 `exec.signal`。** 信号触发时取消进行中的工作。
48
48
  - **使用 `presentationMeta` 投影持久化的卡片数据(可选)。** `output.presentationMeta(args, value)` 从同一个规范值派生可回放的 JSON。核心将其持久化在 `tool/result` 上并传给 `presentResult`,因此需要结果期事实的卡片——例如 `write`/`edit` 的已应用 hunk——无需持久化规范值也能在回放中重现。嵌套 Code 分发没有卡片,因此会跳过该投影器。
49
- - **使用 `exec.agent` 发送异步通知。** `agent.inject({ content, source: { kind: 'plugin', plugin: '<name>' } })` 追加持久化上下文,下一次模型请求会看到它——这不是唤醒(空闲的 agent(智能体)保持空闲)。请防范已 dispose 的 agent(try/catch)。
49
+ - **使用 `exec.agent` 发送异步通知。** `agent.inject({ content, source: { kind: 'my-plugin' } })` 追加持久化上下文,下一次模型请求会看到它——这不是唤醒(空闲的 agent(智能体)保持空闲)。在插件里通过 [`MessageSourceMap`](../subsystems/llm-streaming.zh.md#content-blocks-and-messages) 声明该 `kind`:session format V4 在消息准入处拒绝退役的 `{ kind: 'plugin', plugin: '<name>' }` 包装。请防范已 dispose 的 agent(try/catch)。
50
50
 
51
51
  ## 长时间运行的工作
52
52
 
53
53
  通过 producer 配置控制 `run_in_background`,然后使用 `ctx.jobs.start({ kind, label, owner: exec.agent, run })` 注册任务。注册表会在进入 producer 主体前将已预先中止的调用判为失败;运行时会在 `run()` 启动工作前校验 owner 和任务控制器是否可用,随后提供 id、会话围栏、通用控制工具、通知和 owner cleanup。成功的后台分支会返回类型化的规范句柄,如 `{ kind: 'background', jobId }`;其 Native 渲染器可以保留 `started background job bash-1` 这类供人阅读的自然语言,但 PTC mode 绝不能通过解析该文本取得 id。
54
54
 
55
- producer 提供同步的 `cancel`、在资源清理后 settle 且不 reject 的 `done`,以及可选的消费式 `readOutput`(负责有界输出的格式化)。预先中止的调用属于失败,因为此时没有任务,其 id 无法满足成功输出 schema。`ctx.jobs.start()` 发布 id 后,应使用任务自有的取消信号,而不是 `exec.signal`:之后取消外层调用只会停止等待本次调用,不会终止已经发布的工作;该生命周期归 `job_kill`、owner dispose 和服务 teardown 所有。前台工作仍与 `exec.signal` 耦合。流式 producer 的示例和完整约定见[后台任务运行时 Agent Note](../../.agents/notes/implemented/architecture/2026-06-20-generic-long-running-tool-runtime.zh.md)与 `dsh-tool-bash`。
55
+ spec 提供同步的 `cancel`、在资源清理后 settle 且不 reject 的 `done`,以及由注册表泵入 job 输出环的拉取式 `output` 源或经 starter 收到的 `JobHandle` 推送的追加;模型的消费式读取由 `dsh-tool-jobs` 从该环渲染。预先中止的调用属于失败,因为此时没有任务,其 id 无法满足成功输出 schema。`ctx.jobs.start()` 发布 id 后,应使用任务自有的取消信号,而不是 `exec.signal`:之后取消外层调用只会停止等待本次调用,不会终止已经发布的工作;该生命周期归 `job_kill`、owner dispose 和服务 teardown 所有。前台工作仍与 `exec.signal` 耦合。流式 producer 的示例和完整约定见[后台任务运行时 reference](../../packages/jobs/jobs/README.zh.md)与 `dsh-tool-bash`。
56
56
 
57
57
  <a id="execution-policy-and-observation"></a>
58
58
 
@@ -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 adding-a-vendored-package.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/cookbook/adding-a-vendored-package.md
5
- adding-a-vendored-package.md: 0f8b9f38de8f0d2ae19f40b339529afbb40d90ed
6
- adding-a-vendored-package.zh.md: 2668b874eee845f6a505ae2e7d2ead5e63642ce2
5
+ /cookbook-adding-a-vendored-package:
6
+ en: f4eda20eb37f2d46
7
+ zh: ecf2b59d40f63275
8
+ /cookbook-adding-a-vendored-package/1-copy-the-source-in:
9
+ en: 4cde59b8108d03e2
10
+ zh: 39b842dcdc678a45
11
+ /cookbook-adding-a-vendored-package/2-register-it-in-the-root-configs:
12
+ en: 5c29db234af3eb3b
13
+ zh: 7cea907bf30e2043
14
+ /cookbook-adding-a-vendored-package/3-mind-the-manifest-guard:
15
+ en: 04f0b9d516b61910
16
+ zh: 919a32ce8cb5536a
17
+ /cookbook-adding-a-vendored-package/4-verify:
18
+ en: d73b1b6a5aa6353f
19
+ zh: 15b3a4241e3b65ff
@@ -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 adding-an-llm-adapter.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/cookbook/adding-an-llm-adapter.md
5
- adding-an-llm-adapter.md: bbe4428155f2b2ed5279c5a159e9446f28068a5c
6
- adding-an-llm-adapter.zh.md: 114745b7e07e807cbdd894ed69014455914ca68f
5
+ /cookbook-adding-an-llm-adapter:
6
+ en: 27a78fc5fb65725b
7
+ zh: c40c4f5848ef0f92
8
+ /cookbook-adding-an-llm-adapter/the-shape:
9
+ en: 52a0bbb65eaadf28
10
+ zh: 106021dc36e12533
11
+ /cookbook-adding-an-llm-adapter/protocol-obligations-the-contract-two-implementations-verified:
12
+ en: 2702a60f5670dd27
13
+ zh: 5ac992d0a8a61818
14
+ /cookbook-adding-an-llm-adapter/implementation-structure:
15
+ en: 00c0560e1cef749b
16
+ zh: 86af574891125d83
17
+ /cookbook-adding-an-llm-adapter/verification:
18
+ en: 104cc3ad431dc19d
19
+ zh: cfa5cb6ef7152912
@@ -1,6 +1,25 @@
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 extension-cookbook.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/cookbook/extension-cookbook.md
5
- extension-cookbook.md: b54f0191b48c109b21e111cac27020efcb37174a
6
- extension-cookbook.zh.md: c03e92b21e156a82d51d2afd742f1dd880e32a47
5
+ /cookbook-extension-plugin-shapes:
6
+ en: 1d31f2923d4b4e42
7
+ zh: 194aaeceaa020e8e
8
+ /cookbook-extension-plugin-shapes/a-tool-plugin:
9
+ en: 39704ef102f2f2f7
10
+ zh: 8771f9c19450b347
11
+ /cookbook-extension-plugin-shapes/a-hook-plugin-permission-gate-example:
12
+ en: 9e67a75370812101
13
+ zh: e8a77dd7bd758ea8
14
+ /cookbook-extension-plugin-shapes/a-ui-plugin:
15
+ en: 0084c11d8d57beba
16
+ zh: ba867efbd90908d3
17
+ /cookbook-extension-plugin-shapes/an-external-protocol-driver:
18
+ en: fc5e0d074214eaaf
19
+ zh: aac2bf67d6e7b30a
20
+ /cookbook-extension-plugin-shapes/runnable-wirings:
21
+ en: f0a28d07c0bb4d1b
22
+ zh: 840962f512cb4031
23
+ /cookbook-extension-plugin-shapes/the-feature-mechanism-map:
24
+ en: fa917d46c071fad2
25
+ zh: 4062805237e2c847
@@ -97,7 +97,7 @@ Shipped applications contribute profile layers through `packages/bundle/*/cordis
97
97
 
98
98
  ## The feature → mechanism map
99
99
 
100
- Every product feature maps to a listener on a documented extension point — the microkernel claim made checkable ([microkernel Agent Note](../../.agents/notes/implemented/architecture/2026-06-11-microkernel-event-taxonomy.md)). No row modifies the loop.
100
+ Every product feature maps to a listener on a documented extension point — the microkernel claim made checkable ([microkernel reference](../architecture.md)). No row modifies the loop.
101
101
 
102
102
  `system-prompt/assemble` is an expert cooperative whole-assembly transform: its returned assembly is authoritative, so listener authors own preserving active PTC mode and structured-output protocol contributions. Prefer `ctx.tools.restrict()` for tool filtering that must stay aligned across presentation, lookup, and execution.
103
103
 
@@ -108,7 +108,7 @@ Every product feature maps to a listener on a documented extension point — the
108
108
  | `/loop` | on the `turn/end` session event, `followup()` the next iteration; or force-continue |
109
109
  | Dynamic workflow | `ctx.workflowEngine` + the PTC workflow engine + the `workflow` tool; structured in-process children enforce output with scoped prompt/tool registrations, a monotonic tool guard, final `tools/result` commit (including enclosing `run_code`), and the structured-output execution's monotonic `concludeTurn()` marker |
110
110
  | Queued + steering messages | core `Agent.followup()` / `Agent.steer()` |
111
- | Context compaction (auto + manual) | the `ctx.compaction` seam + `dsh-compaction-basic`; automatic pressure runs on serial `agent/pre-step`, canonical overflow recovery runs on `agent/request-error`, and manual callers use the same compact service ([compaction Agent Note](../../.agents/notes/implemented/feature/2026-06-18-compaction-capability-seam.md)) |
111
+ | Context compaction (auto + manual) | the `ctx.compaction` seam + `dsh-compaction-basic`; automatic pressure runs on serial `agent/pre-step`, canonical overflow recovery runs on `agent/request-error`, and manual callers use the same compact service ([compaction reference](../../packages/compaction/compaction/README.md)) |
112
112
  | System prompt configurability | `ctx.systemPrompt.section()` with ordering and scope-local shadowing |
113
113
  | AGENTS.md (root) | a section provider reading the file |
114
114
  | AGENTS.md (subdir, on-touch) + file-change notices | `agent.inject()` from a watcher / tool-result listener |
@@ -124,7 +124,7 @@ Every product feature maps to a listener on a documented extension point — the
124
124
  | MCP | one plugin per server: discover tools → `ctx.tools.register()` |
125
125
  | Skills | section + tool registration; `inject()` skill content on invocation |
126
126
  | Memory | section provider + tool |
127
- | Scheduled tasks (cron) | a plugin registers model-callable scheduling tools; timer fires → `followup(…, {source: {kind: 'plugin', plugin: 'schedule'}})` when idle / `inject()` notification when busy |
127
+ | Scheduled tasks (cron) | a plugin registers model-callable scheduling tools; a due timer delivers through `followup(…, {source: {kind: 'schedule'}})` |
128
128
  | UI (GUI; CLI emits JSONL) | listen to `agent/assistant-stream` for live chunks and `session/event` for durable settlements, boundaries, and tool activity; input → `followup()` |
129
129
  | Web Client Chat business node | register a `ConversationNodeDefinition` and `conversation.chat.node` keyed renderer |
130
130
  | SessionTelemetryBackend / replayable trace | `session/event` → JSONL; replay = `sessions.create(id, { seed })` |
@@ -101,7 +101,7 @@ export function apply(ctx: Context) {
101
101
 
102
102
  ## 功能→机制映射
103
103
 
104
- 每个产品功能都映射到一个文档化扩展点上的监听器——微内核声明由此可验证([微内核 Agent Note](../../.agents/notes/implemented/architecture/2026-06-11-microkernel-event-taxonomy.zh.md))。没有任何一行修改循环本身。
104
+ 每个产品功能都映射到一个文档化扩展点上的监听器——微内核声明由此可验证([微内核 reference](../architecture.zh.md))。没有任何一行修改循环本身。
105
105
 
106
106
  `system-prompt/assemble` 是一个专家协作式的整体装配变换:其返回的装配结果具有权威性,因此监听器作者有责任保留活跃的 PTC mode 和结构化输出协议的贡献。对于需要在展示、查找和执行之间保持对齐的工具过滤,优先使用 `ctx.tools.restrict()`。
107
107
 
@@ -112,7 +112,7 @@ export function apply(ctx: Context) {
112
112
  | `/loop` | 在 `turn/end` 会话事件上 `followup()` 下一次迭代;或强制继续 |
113
113
  | 动态工作流 | `ctx.workflowEngine` + PTC 工作流引擎 + `workflow` 工具;结构化的进程内子任务通过作用域化的提示词/工具注册、单调工具守卫、最终 `tools/result` 提交(包括外层 `run_code`)和结构化输出执行的单调 `concludeTurn()` 标记来强制输出 |
114
114
  | 排队消息 + steering | 核心 `Agent.followup()` / `Agent.steer()` |
115
- | 上下文压缩(context compaction)(自动 + 手动) | `ctx.compaction` seam + `dsh-compaction-basic`;自动压力检查运行在串行 `agent/pre-step`,标准的溢出恢复机制运行在 `agent/request-error`,手动调用方使用同一个压缩服务([压缩 Agent Note](../../.agents/notes/implemented/feature/2026-06-18-compaction-capability-seam.zh.md)) |
115
+ | 上下文压缩(context compaction)(自动 + 手动) | `ctx.compaction` seam + `dsh-compaction-basic`;自动压力检查运行在串行 `agent/pre-step`,标准的溢出恢复机制运行在 `agent/request-error`,手动调用方使用同一个压缩服务([压缩 参考](../../packages/compaction/compaction/README.zh.md)) |
116
116
  | 系统提示词可配置性 | `ctx.systemPrompt.section()`,支持排序与作用域局部覆盖 |
117
117
  | AGENTS.md(根目录) | 一个读取该文件的 section 提供方 |
118
118
  | AGENTS.md(子目录,按需触发)+ 文件变更通知 | 从 watcher / 工具结果监听器调用 `agent.inject()` |
@@ -128,7 +128,7 @@ export function apply(ctx: Context) {
128
128
  | MCP | 每个服务器一个插件:发现工具 → `ctx.tools.register()` |
129
129
  | skill(技能) | section + 工具注册;调用时通过 `inject()` 注入 skill 内容 |
130
130
  | 记忆 | section 提供方 + 工具 |
131
- | 定时任务(cron) | 插件注册面向模型的调度工具;定时器触发 → 空闲时 `followup(…, {source: {kind: 'plugin', plugin: 'schedule'}})`/忙碌时 `inject()` 通知 |
131
+ | 定时任务(cron) | 插件注册面向模型的调度工具;定时器到期后通过 `followup(…, {source: {kind: 'schedule'}})` 投递 |
132
132
  | UI(GUI;CLI(命令行界面)输出 JSONL) | 监听 `agent/assistant-stream` 的实时 chunk,并监听 `session/event` 的持久 settlement、边界与工具活动;输入 → `followup()` |
133
133
  | Web Client Chat 业务节点 | 注册 `ConversationNodeDefinition` 与 `conversation.chat.node` keyed renderer |
134
134
  | 遥测 / 可回放 trace | `session/event` → JSONL;回放 = `sessions.create(id, { seed })` |
@@ -1,6 +1,22 @@
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 maintaining-dsh-code-review.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/cookbook/maintaining-dsh-code-review.md
5
- maintaining-dsh-code-review.md: a8c2a66c065aaec5c03f0ab6965377d1d1eb14bd
6
- maintaining-dsh-code-review.zh.md: fca56ffeb35309660ac5284cb8e877eb8648405a
5
+ /maintaining-the-dsh-code-review-skill:
6
+ en: 7356eb0a9cc41144
7
+ zh: 3194fbcf27f4fac1
8
+ /maintaining-the-dsh-code-review-skill/what-the-maintainer-receives:
9
+ en: 1c4d0f340591ca39
10
+ zh: 81bd728a7c2296cb
11
+ /maintaining-the-dsh-code-review-skill/what-the-operator-does-with-a-candidate-diff:
12
+ en: 1423d67e7c440cc6
13
+ zh: bc6d30d6615377f5
14
+ /maintaining-the-dsh-code-review-skill/when-a-run-produces-no-candidate:
15
+ en: feb6d261939d6c19
16
+ zh: 044d8238cd6537d3
17
+ /maintaining-the-dsh-code-review-skill/interruptions-and-handoff:
18
+ en: f6e8cab2266e6a3e
19
+ zh: e6e950fa8807bfb4
20
+ /maintaining-the-dsh-code-review-skill/where-the-operator-s-private-setup-lives:
21
+ en: ae06145764738c16
22
+ zh: d527b944db8c52be
@@ -1,6 +1,16 @@
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 responding-to-pr-review-on-a-stack.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/cookbook/responding-to-pr-review-on-a-stack.md
5
- responding-to-pr-review-on-a-stack.md: 61b15fd5e7b3a528957ef3c9e958aac0e11eb43b
6
- responding-to-pr-review-on-a-stack.zh.md: a33418d342e57dd3c920008a4b12b2f33d6f31da
5
+ /responding-to-review-across-a-stacked-pr-chain:
6
+ en: f41561de1c6dbfef
7
+ zh: 83b863e1ac91d913
8
+ /responding-to-review-across-a-stacked-pr-chain/ground-rules:
9
+ en: 5545e41aea74b5d6
10
+ zh: 7105f51939753a1a
11
+ /responding-to-review-across-a-stacked-pr-chain/resolve-comments-through-the-stack:
12
+ en: 4d58b207c8ecbcaa
13
+ zh: 38673a460674b8d6
14
+ /responding-to-review-across-a-stacked-pr-chain/verify:
15
+ en: 07cfbae7602fc30e
16
+ zh: 19782f06ee3c4a74