dsh-plugin-guide 0.2.0 → 0.3.2

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 (373) hide show
  1. package/README.es.md +36 -18
  2. package/README.hi.md +36 -18
  3. package/README.md +38 -18
  4. package/README.pt.md +36 -18
  5. package/README.zh.md +38 -18
  6. package/SKILL.md +1 -1
  7. package/dist/dsh-plugin-dev.js +5 -5
  8. package/guide/links.md +1 -1
  9. package/guide/plugin-dev-guide.md +1 -1
  10. package/guide/quick-reference.es.md +2 -2
  11. package/guide/quick-reference.hi.md +2 -2
  12. package/guide/quick-reference.md +2 -2
  13. package/guide/quick-reference.pt.md +2 -2
  14. package/guide/quick-reference.zh-CN.md +3 -3
  15. package/package.json +13 -4
  16. package/references/cordis-paper-and-community.md +1 -1
  17. package/references/harness-repo.md +1 -1
  18. package/references/official-docs/AGENTS.md +27 -22
  19. package/references/official-docs/README.i18n.yaml +2 -2
  20. package/references/official-docs/README.md +1 -1
  21. package/references/official-docs/README.zh.md +19 -9
  22. package/references/official-docs/SNAPSHOT.md +5 -5
  23. package/references/official-docs/THIRD_PARTY_NOTICES.md +36 -13
  24. package/references/official-docs/docs/AGENTS.md +4 -4
  25. package/references/official-docs/docs/agent-lifecycle.i18n.yaml +2 -2
  26. package/references/official-docs/docs/agent-lifecycle.md +1 -1
  27. package/references/official-docs/docs/agent-lifecycle.zh.md +2 -2
  28. package/references/official-docs/docs/api-gateway.i18n.yaml +2 -2
  29. package/references/official-docs/docs/api-gateway.md +8 -8
  30. package/references/official-docs/docs/api-gateway.zh.md +8 -8
  31. package/references/official-docs/docs/architecture.i18n.yaml +2 -2
  32. package/references/official-docs/docs/architecture.md +23 -7
  33. package/references/official-docs/docs/architecture.zh.md +36 -20
  34. package/references/official-docs/docs/capability-seams.i18n.yaml +2 -2
  35. package/references/official-docs/docs/capability-seams.md +132 -67
  36. package/references/official-docs/docs/capability-seams.zh.md +132 -67
  37. package/references/official-docs/docs/config-catalog.i18n.yaml +2 -2
  38. package/references/official-docs/docs/config-catalog.md +659 -373
  39. package/references/official-docs/docs/config-catalog.zh.md +677 -391
  40. package/references/official-docs/docs/cookbook/adding-a-package.i18n.yaml +2 -2
  41. package/references/official-docs/docs/cookbook/adding-a-package.md +2 -3
  42. package/references/official-docs/docs/cookbook/adding-a-package.zh.md +8 -7
  43. package/references/official-docs/docs/cookbook/{adding-a-conversation-node.i18n.yaml → adding-a-remote-api.i18n.yaml} +3 -3
  44. package/references/official-docs/docs/cookbook/adding-a-remote-api.md +197 -0
  45. package/references/official-docs/docs/cookbook/adding-a-remote-api.zh.md +197 -0
  46. package/references/official-docs/docs/cookbook/adding-a-settings-card.i18n.yaml +6 -0
  47. package/references/official-docs/docs/cookbook/adding-a-settings-card.md +102 -0
  48. package/references/official-docs/docs/cookbook/adding-a-settings-card.zh.md +102 -0
  49. package/references/official-docs/docs/cookbook/adding-a-tool.i18n.yaml +2 -2
  50. package/references/official-docs/docs/cookbook/adding-a-tool.md +11 -4
  51. package/references/official-docs/docs/cookbook/adding-a-tool.zh.md +16 -9
  52. package/references/official-docs/docs/cookbook/adding-a-vendored-package.i18n.yaml +2 -2
  53. package/references/official-docs/docs/cookbook/adding-a-vendored-package.md +2 -2
  54. package/references/official-docs/docs/cookbook/adding-a-vendored-package.zh.md +4 -4
  55. package/references/official-docs/docs/cookbook/adding-an-llm-adapter.i18n.yaml +2 -2
  56. package/references/official-docs/docs/cookbook/adding-an-llm-adapter.md +1 -1
  57. package/references/official-docs/docs/cookbook/adding-an-llm-adapter.zh.md +3 -3
  58. package/references/official-docs/docs/cookbook/extension-cookbook.i18n.yaml +2 -2
  59. package/references/official-docs/docs/cookbook/extension-cookbook.md +9 -8
  60. package/references/official-docs/docs/cookbook/extension-cookbook.zh.md +17 -14
  61. package/references/official-docs/docs/cookbook/maintaining-dsh-code-review.i18n.yaml +1 -1
  62. package/references/official-docs/docs/cookbook/maintaining-dsh-code-review.zh.md +1 -1
  63. package/references/official-docs/docs/cookbook/responding-to-pr-review-on-a-stack.i18n.yaml +1 -1
  64. package/references/official-docs/docs/cookbook/responding-to-pr-review-on-a-stack.zh.md +1 -1
  65. package/references/official-docs/docs/cordis-api/context.i18n.yaml +1 -1
  66. package/references/official-docs/docs/cordis-api/context.zh.md +1 -1
  67. package/references/official-docs/docs/cordis-api/events.i18n.yaml +1 -1
  68. package/references/official-docs/docs/cordis-api/events.zh.md +1 -1
  69. package/references/official-docs/docs/cordis-api/inherited.md +1 -1
  70. package/references/official-docs/docs/cordis-primer.i18n.yaml +2 -2
  71. package/references/official-docs/docs/cordis-primer.md +2 -1
  72. package/references/official-docs/docs/cordis-primer.zh.md +3 -2
  73. package/references/official-docs/docs/cordis-tutorial/01-first-plugin.i18n.yaml +1 -1
  74. package/references/official-docs/docs/cordis-tutorial/01-first-plugin.zh.md +4 -4
  75. package/references/official-docs/docs/cordis-tutorial/02-lifecycle-and-effects.i18n.yaml +1 -1
  76. package/references/official-docs/docs/cordis-tutorial/02-lifecycle-and-effects.zh.md +4 -4
  77. package/references/official-docs/docs/cordis-tutorial/03-services.i18n.yaml +1 -1
  78. package/references/official-docs/docs/cordis-tutorial/03-services.zh.md +4 -4
  79. package/references/official-docs/docs/cordis-tutorial/04-events.i18n.yaml +1 -1
  80. package/references/official-docs/docs/cordis-tutorial/04-events.zh.md +4 -4
  81. package/references/official-docs/docs/cordis-tutorial/05-config.i18n.yaml +1 -1
  82. package/references/official-docs/docs/cordis-tutorial/05-config.zh.md +2 -2
  83. package/references/official-docs/docs/cordis-tutorial/06-composition-and-hmr.i18n.yaml +1 -1
  84. package/references/official-docs/docs/cordis-tutorial/06-composition-and-hmr.zh.md +3 -3
  85. package/references/official-docs/docs/cordis-tutorial/07-into-the-harness.i18n.yaml +2 -2
  86. package/references/official-docs/docs/cordis-tutorial/07-into-the-harness.md +5 -4
  87. package/references/official-docs/docs/cordis-tutorial/07-into-the-harness.zh.md +11 -10
  88. package/references/official-docs/docs/cordis-tutorial/index.i18n.yaml +1 -1
  89. package/references/official-docs/docs/cordis-tutorial/index.zh.md +10 -10
  90. package/references/official-docs/docs/deepseek-llm-api-wire-extensions.i18n.yaml +6 -0
  91. package/references/official-docs/docs/deepseek-llm-api-wire-extensions.md +159 -0
  92. package/references/official-docs/docs/deepseek-llm-api-wire-extensions.zh.md +159 -0
  93. package/references/official-docs/docs/defensive-patterns.i18n.yaml +1 -1
  94. package/references/official-docs/docs/defensive-patterns.zh.md +3 -1
  95. package/references/official-docs/docs/development.i18n.yaml +2 -2
  96. package/references/official-docs/docs/development.md +9 -13
  97. package/references/official-docs/docs/development.zh.md +23 -21
  98. package/references/official-docs/docs/event-producer-consumer.i18n.yaml +2 -2
  99. package/references/official-docs/docs/event-producer-consumer.md +55 -46
  100. package/references/official-docs/docs/event-producer-consumer.zh.md +55 -46
  101. package/references/official-docs/docs/glossary.i18n.yaml +2 -2
  102. package/references/official-docs/docs/glossary.md +1 -1
  103. package/references/official-docs/docs/glossary.zh.md +1 -1
  104. package/references/official-docs/docs/graph-atlas.i18n.yaml +2 -2
  105. package/references/official-docs/docs/graph-atlas.md +0 -2
  106. package/references/official-docs/docs/graph-atlas.zh.md +7 -9
  107. package/references/official-docs/docs/i18n/README.i18n.yaml +2 -2
  108. package/references/official-docs/docs/i18n/README.md +7 -7
  109. package/references/official-docs/docs/i18n/README.zh.md +11 -9
  110. package/references/official-docs/docs/i18n/style-samples.md +3 -3
  111. package/references/official-docs/docs/i18n/translation-prompt.md +3 -3
  112. package/references/official-docs/docs/i18n/translation-rules.i18n.yaml +2 -2
  113. package/references/official-docs/docs/i18n/translation-rules.md +2 -2
  114. package/references/official-docs/docs/i18n/translation-rules.zh.md +3 -3
  115. package/references/official-docs/docs/module-graph.i18n.yaml +2 -2
  116. package/references/official-docs/docs/module-graph.md +666 -747
  117. package/references/official-docs/docs/module-graph.zh.md +668 -749
  118. package/references/official-docs/docs/persistence-catalog.i18n.yaml +2 -2
  119. package/references/official-docs/docs/persistence-catalog.md +160 -39
  120. package/references/official-docs/docs/persistence-catalog.zh.md +169 -48
  121. package/references/official-docs/docs/postmortem/0001-acp-default-export-drops-inject.i18n.yaml +2 -2
  122. package/references/official-docs/docs/postmortem/0001-acp-default-export-drops-inject.md +2 -2
  123. package/references/official-docs/docs/postmortem/0001-acp-default-export-drops-inject.zh.md +3 -3
  124. package/references/official-docs/docs/postmortem/0002-js-expression-disabled-filesystem-tools.i18n.yaml +2 -2
  125. package/references/official-docs/docs/postmortem/0002-js-expression-disabled-filesystem-tools.md +2 -2
  126. package/references/official-docs/docs/postmortem/0002-js-expression-disabled-filesystem-tools.zh.md +2 -2
  127. package/references/official-docs/docs/postmortem/0003-web-agent-gui-feedback-loop.i18n.yaml +2 -2
  128. package/references/official-docs/docs/postmortem/0003-web-agent-gui-feedback-loop.md +2 -2
  129. package/references/official-docs/docs/postmortem/0003-web-agent-gui-feedback-loop.zh.md +2 -2
  130. package/references/official-docs/docs/postmortem/0004-landlock-partial-notice-misclassified-child-failures.i18n.yaml +2 -2
  131. package/references/official-docs/docs/postmortem/0004-landlock-partial-notice-misclassified-child-failures.md +1 -1
  132. package/references/official-docs/docs/postmortem/0004-landlock-partial-notice-misclassified-child-failures.zh.md +2 -2
  133. package/references/official-docs/docs/postmortem/README.i18n.yaml +1 -1
  134. package/references/official-docs/docs/postmortem/README.zh.md +5 -5
  135. package/references/official-docs/docs/rescope.i18n.yaml +2 -2
  136. package/references/official-docs/docs/rescope.md +2 -2
  137. package/references/official-docs/docs/rescope.zh.md +3 -3
  138. package/references/official-docs/docs/subsystems/README.i18n.yaml +2 -2
  139. package/references/official-docs/docs/subsystems/README.md +8 -2
  140. package/references/official-docs/docs/subsystems/README.zh.md +53 -47
  141. package/references/official-docs/docs/subsystems/agent-team.i18n.yaml +6 -0
  142. package/references/official-docs/docs/subsystems/agent-team.md +206 -0
  143. package/references/official-docs/docs/subsystems/agent-team.zh.md +206 -0
  144. package/references/official-docs/docs/subsystems/approval.i18n.yaml +2 -2
  145. package/references/official-docs/docs/subsystems/approval.md +12 -12
  146. package/references/official-docs/docs/subsystems/approval.zh.md +13 -13
  147. package/references/official-docs/docs/subsystems/attachment.i18n.yaml +2 -2
  148. package/references/official-docs/docs/subsystems/attachment.md +90 -7
  149. package/references/official-docs/docs/subsystems/attachment.zh.md +90 -7
  150. package/references/official-docs/docs/subsystems/client-modules.i18n.yaml +2 -2
  151. package/references/official-docs/docs/subsystems/client-modules.md +69 -19
  152. package/references/official-docs/docs/subsystems/client-modules.zh.md +69 -19
  153. package/references/official-docs/docs/subsystems/code-runtime.i18n.yaml +2 -2
  154. package/references/official-docs/docs/subsystems/code-runtime.md +5 -5
  155. package/references/official-docs/docs/subsystems/code-runtime.zh.md +6 -6
  156. package/references/official-docs/docs/subsystems/commands.i18n.yaml +2 -2
  157. package/references/official-docs/docs/subsystems/commands.md +29 -6
  158. package/references/official-docs/docs/subsystems/commands.zh.md +30 -7
  159. package/references/official-docs/docs/subsystems/compaction.i18n.yaml +2 -2
  160. package/references/official-docs/docs/subsystems/compaction.md +5 -5
  161. package/references/official-docs/docs/subsystems/compaction.zh.md +11 -11
  162. package/references/official-docs/docs/subsystems/conversation.i18n.yaml +6 -0
  163. package/references/official-docs/docs/{cookbook/adding-a-conversation-node.md → subsystems/conversation.md} +49 -24
  164. package/references/official-docs/docs/{cookbook/adding-a-conversation-node.zh.md → subsystems/conversation.zh.md} +49 -24
  165. package/references/official-docs/docs/subsystems/core.i18n.yaml +2 -2
  166. package/references/official-docs/docs/subsystems/core.md +110 -33
  167. package/references/official-docs/docs/subsystems/core.zh.md +141 -62
  168. package/references/official-docs/docs/subsystems/credentials.i18n.yaml +2 -2
  169. package/references/official-docs/docs/subsystems/credentials.md +207 -11
  170. package/references/official-docs/docs/subsystems/credentials.zh.md +207 -11
  171. package/references/official-docs/docs/subsystems/extensions.i18n.yaml +2 -2
  172. package/references/official-docs/docs/subsystems/extensions.md +27 -9
  173. package/references/official-docs/docs/subsystems/extensions.zh.md +30 -12
  174. package/references/official-docs/docs/subsystems/feedback.i18n.yaml +2 -2
  175. package/references/official-docs/docs/subsystems/feedback.md +4 -4
  176. package/references/official-docs/docs/subsystems/feedback.zh.md +4 -4
  177. package/references/official-docs/docs/subsystems/filesystem.i18n.yaml +2 -2
  178. package/references/official-docs/docs/subsystems/filesystem.md +17 -7
  179. package/references/official-docs/docs/subsystems/filesystem.zh.md +19 -9
  180. package/references/official-docs/docs/subsystems/goal.i18n.yaml +2 -2
  181. package/references/official-docs/docs/subsystems/goal.md +4 -4
  182. package/references/official-docs/docs/subsystems/goal.zh.md +8 -8
  183. package/references/official-docs/docs/subsystems/invariants.i18n.yaml +2 -2
  184. package/references/official-docs/docs/subsystems/invariants.md +2 -2
  185. package/references/official-docs/docs/subsystems/invariants.zh.md +5 -5
  186. package/references/official-docs/docs/subsystems/jobs.i18n.yaml +2 -2
  187. package/references/official-docs/docs/subsystems/jobs.md +3 -3
  188. package/references/official-docs/docs/subsystems/jobs.zh.md +6 -6
  189. package/references/official-docs/docs/subsystems/llm-streaming.i18n.yaml +2 -2
  190. package/references/official-docs/docs/subsystems/llm-streaming.md +193 -22
  191. package/references/official-docs/docs/subsystems/llm-streaming.zh.md +199 -28
  192. package/references/official-docs/docs/subsystems/lsp.i18n.yaml +2 -2
  193. package/references/official-docs/docs/subsystems/lsp.md +2 -2
  194. package/references/official-docs/docs/subsystems/lsp.zh.md +3 -3
  195. package/references/official-docs/docs/subsystems/permission-presets.i18n.yaml +2 -2
  196. package/references/official-docs/docs/subsystems/permission-presets.md +8 -8
  197. package/references/official-docs/docs/subsystems/permission-presets.zh.md +8 -8
  198. package/references/official-docs/docs/subsystems/persistence.i18n.yaml +2 -2
  199. package/references/official-docs/docs/subsystems/persistence.md +35 -17
  200. package/references/official-docs/docs/subsystems/persistence.zh.md +38 -20
  201. package/references/official-docs/docs/subsystems/plan.i18n.yaml +2 -2
  202. package/references/official-docs/docs/subsystems/plan.md +4 -4
  203. package/references/official-docs/docs/subsystems/plan.zh.md +10 -10
  204. package/references/official-docs/docs/subsystems/sandbox.i18n.yaml +2 -2
  205. package/references/official-docs/docs/subsystems/sandbox.md +5 -3
  206. package/references/official-docs/docs/subsystems/sandbox.zh.md +8 -6
  207. package/references/official-docs/docs/subsystems/schedule.i18n.yaml +2 -2
  208. package/references/official-docs/docs/subsystems/schedule.md +9 -3
  209. package/references/official-docs/docs/subsystems/schedule.zh.md +11 -5
  210. package/references/official-docs/docs/subsystems/scope.i18n.yaml +1 -1
  211. package/references/official-docs/docs/subsystems/scope.zh.md +1 -1
  212. package/references/official-docs/docs/subsystems/session-projection.i18n.yaml +2 -2
  213. package/references/official-docs/docs/subsystems/session-projection.md +136 -67
  214. package/references/official-docs/docs/subsystems/session-projection.zh.md +136 -67
  215. package/references/official-docs/docs/subsystems/session-query.i18n.yaml +2 -2
  216. package/references/official-docs/docs/subsystems/session-query.md +11 -3
  217. package/references/official-docs/docs/subsystems/session-query.zh.md +12 -4
  218. package/references/official-docs/docs/subsystems/session-reference.i18n.yaml +2 -2
  219. package/references/official-docs/docs/subsystems/session-reference.md +94 -7
  220. package/references/official-docs/docs/subsystems/session-reference.zh.md +95 -8
  221. package/references/official-docs/docs/subsystems/session-telemetry.i18n.yaml +2 -2
  222. package/references/official-docs/docs/subsystems/session-telemetry.md +5 -6
  223. package/references/official-docs/docs/subsystems/session-telemetry.zh.md +9 -10
  224. package/references/official-docs/docs/subsystems/session-title.i18n.yaml +2 -2
  225. package/references/official-docs/docs/subsystems/session-title.md +3 -3
  226. package/references/official-docs/docs/subsystems/session-title.zh.md +5 -5
  227. package/references/official-docs/docs/subsystems/session.i18n.yaml +2 -2
  228. package/references/official-docs/docs/subsystems/session.md +273 -39
  229. package/references/official-docs/docs/subsystems/session.zh.md +290 -54
  230. package/references/official-docs/docs/subsystems/settings.i18n.yaml +2 -2
  231. package/references/official-docs/docs/subsystems/settings.md +105 -10
  232. package/references/official-docs/docs/subsystems/settings.zh.md +105 -10
  233. package/references/official-docs/docs/subsystems/shell.i18n.yaml +2 -2
  234. package/references/official-docs/docs/subsystems/shell.md +3 -3
  235. package/references/official-docs/docs/subsystems/shell.zh.md +11 -11
  236. package/references/official-docs/docs/subsystems/skills.i18n.yaml +2 -2
  237. package/references/official-docs/docs/subsystems/skills.md +26 -3
  238. package/references/official-docs/docs/subsystems/skills.zh.md +29 -6
  239. package/references/official-docs/docs/subsystems/slots.i18n.yaml +6 -0
  240. package/references/official-docs/docs/subsystems/slots.md +174 -0
  241. package/references/official-docs/docs/subsystems/slots.zh.md +174 -0
  242. package/references/official-docs/docs/subsystems/spill.i18n.yaml +2 -2
  243. package/references/official-docs/docs/subsystems/spill.md +4 -4
  244. package/references/official-docs/docs/subsystems/spill.zh.md +6 -6
  245. package/references/official-docs/docs/subsystems/storage.i18n.yaml +2 -2
  246. package/references/official-docs/docs/subsystems/storage.md +13 -5
  247. package/references/official-docs/docs/subsystems/storage.zh.md +16 -8
  248. package/references/official-docs/docs/subsystems/subagent.i18n.yaml +2 -2
  249. package/references/official-docs/docs/subsystems/subagent.md +120 -32
  250. package/references/official-docs/docs/subsystems/subagent.zh.md +131 -41
  251. package/references/official-docs/docs/subsystems/subprocess.i18n.yaml +2 -2
  252. package/references/official-docs/docs/subsystems/subprocess.md +3 -3
  253. package/references/official-docs/docs/subsystems/subprocess.zh.md +5 -5
  254. package/references/official-docs/docs/subsystems/system-prompt.i18n.yaml +2 -2
  255. package/references/official-docs/docs/subsystems/system-prompt.md +21 -8
  256. package/references/official-docs/docs/subsystems/system-prompt.zh.md +23 -10
  257. package/references/official-docs/docs/subsystems/terminal.i18n.yaml +2 -2
  258. package/references/official-docs/docs/subsystems/terminal.md +2 -2
  259. package/references/official-docs/docs/subsystems/terminal.zh.md +4 -4
  260. package/references/official-docs/docs/subsystems/todo.i18n.yaml +6 -0
  261. package/references/official-docs/docs/subsystems/todo.md +32 -0
  262. package/references/official-docs/docs/subsystems/todo.zh.md +32 -0
  263. package/references/official-docs/docs/subsystems/token-meter.i18n.yaml +2 -2
  264. package/references/official-docs/docs/subsystems/token-meter.md +27 -12
  265. package/references/official-docs/docs/subsystems/token-meter.zh.md +28 -13
  266. package/references/official-docs/docs/subsystems/tools.i18n.yaml +2 -2
  267. package/references/official-docs/docs/subsystems/tools.md +46 -46
  268. package/references/official-docs/docs/subsystems/tools.zh.md +54 -54
  269. package/references/official-docs/docs/subsystems/typert.i18n.yaml +2 -2
  270. package/references/official-docs/docs/subsystems/typert.md +65 -58
  271. package/references/official-docs/docs/subsystems/typert.zh.md +67 -60
  272. package/references/official-docs/docs/subsystems/user-questions.i18n.yaml +2 -2
  273. package/references/official-docs/docs/subsystems/user-questions.md +35 -35
  274. package/references/official-docs/docs/subsystems/user-questions.zh.md +35 -35
  275. package/references/official-docs/docs/subsystems/web-client.i18n.yaml +6 -0
  276. package/references/official-docs/docs/subsystems/web-client.md +95 -0
  277. package/references/official-docs/docs/subsystems/web-client.zh.md +95 -0
  278. package/references/official-docs/docs/subsystems/web-server.i18n.yaml +2 -2
  279. package/references/official-docs/docs/subsystems/web-server.md +55 -9
  280. package/references/official-docs/docs/subsystems/web-server.zh.md +56 -10
  281. package/references/official-docs/docs/subsystems/web.i18n.yaml +2 -2
  282. package/references/official-docs/docs/subsystems/web.md +14 -7
  283. package/references/official-docs/docs/subsystems/web.zh.md +16 -9
  284. package/references/official-docs/docs/subsystems/webhook.i18n.yaml +6 -0
  285. package/references/official-docs/docs/subsystems/webhook.md +70 -0
  286. package/references/official-docs/docs/subsystems/webhook.zh.md +70 -0
  287. package/references/official-docs/docs/subsystems/workflow.i18n.yaml +2 -2
  288. package/references/official-docs/docs/subsystems/workflow.md +8 -8
  289. package/references/official-docs/docs/subsystems/workflow.zh.md +13 -13
  290. package/references/official-docs/docs/subsystems/workspace.i18n.yaml +2 -2
  291. package/references/official-docs/docs/subsystems/workspace.md +98 -5
  292. package/references/official-docs/docs/subsystems/workspace.zh.md +102 -9
  293. package/references/official-docs/docs/testing.i18n.yaml +2 -2
  294. package/references/official-docs/docs/testing.md +15 -10
  295. package/references/official-docs/docs/testing.zh.md +15 -10
  296. package/references/official-docs/docs/tool-catalog.i18n.yaml +2 -2
  297. package/references/official-docs/docs/tool-catalog.md +433 -27
  298. package/references/official-docs/docs/tool-catalog.zh.md +438 -29
  299. package/references/official-docs/docs/tool-execution-pipeline.i18n.yaml +2 -2
  300. package/references/official-docs/docs/tool-execution-pipeline.md +1 -1
  301. package/references/official-docs/docs/tool-execution-pipeline.zh.md +1 -1
  302. package/references/official-docs/docs/user/develop/basic/config.i18n.yaml +2 -2
  303. package/references/official-docs/docs/user/develop/basic/config.md +1 -1
  304. package/references/official-docs/docs/user/develop/basic/config.zh.md +4 -4
  305. package/references/official-docs/docs/user/develop/basic/index.i18n.yaml +1 -1
  306. package/references/official-docs/docs/user/develop/basic/index.zh.md +5 -5
  307. package/references/official-docs/docs/user/develop/basic/publish.i18n.yaml +2 -2
  308. package/references/official-docs/docs/user/develop/basic/publish.md +3 -3
  309. package/references/official-docs/docs/user/develop/basic/publish.zh.md +7 -7
  310. package/references/official-docs/docs/user/develop/basic/tool.i18n.yaml +2 -2
  311. package/references/official-docs/docs/user/develop/basic/tool.md +3 -3
  312. package/references/official-docs/docs/user/develop/basic/tool.zh.md +4 -4
  313. package/references/official-docs/docs/user/develop/framework/events.i18n.yaml +2 -2
  314. package/references/official-docs/docs/user/develop/framework/events.md +2 -2
  315. package/references/official-docs/docs/user/develop/framework/events.zh.md +3 -3
  316. package/references/official-docs/docs/user/develop/framework/index.i18n.yaml +1 -1
  317. package/references/official-docs/docs/user/develop/framework/index.zh.md +3 -3
  318. package/references/official-docs/docs/user/develop/framework/service.i18n.yaml +2 -2
  319. package/references/official-docs/docs/user/develop/framework/service.md +1 -1
  320. package/references/official-docs/docs/user/develop/framework/service.zh.md +3 -3
  321. package/references/official-docs/docs/user/develop/practice/dynamic-cordis.i18n.yaml +6 -0
  322. package/references/official-docs/docs/user/develop/practice/dynamic-cordis.md +15 -0
  323. package/references/official-docs/docs/user/develop/practice/dynamic-cordis.zh.md +15 -0
  324. package/references/official-docs/docs/user/develop/practice/index.i18n.yaml +2 -2
  325. package/references/official-docs/docs/user/develop/practice/index.md +1 -1
  326. package/references/official-docs/docs/user/develop/practice/index.zh.md +3 -3
  327. package/references/official-docs/docs/user/develop/practice/llm-adapter.i18n.yaml +2 -2
  328. package/references/official-docs/docs/user/develop/practice/llm-adapter.md +4 -3
  329. package/references/official-docs/docs/user/develop/practice/llm-adapter.zh.md +4 -3
  330. package/references/official-docs/docs/user/guide/github-review.i18n.yaml +6 -0
  331. package/references/official-docs/docs/user/guide/github-review.md +102 -0
  332. package/references/official-docs/docs/user/guide/github-review.zh.md +102 -0
  333. package/references/official-docs/docs/user/guide/index.i18n.yaml +2 -2
  334. package/references/official-docs/docs/user/guide/index.md +2 -2
  335. package/references/official-docs/docs/user/guide/index.zh.md +8 -8
  336. package/references/official-docs/docs/user/guide/mcp-memory.i18n.yaml +6 -0
  337. package/references/official-docs/docs/user/guide/mcp-memory.md +101 -0
  338. package/references/official-docs/docs/user/guide/mcp-memory.zh.md +101 -0
  339. package/references/official-docs/docs/user/guide/providers.i18n.yaml +2 -2
  340. package/references/official-docs/docs/user/guide/providers.md +40 -1
  341. package/references/official-docs/docs/user/guide/providers.zh.md +41 -2
  342. package/references/official-docs/docs/user/guide/python-sdk.i18n.yaml +2 -2
  343. package/references/official-docs/docs/user/guide/python-sdk.md +80 -34
  344. package/references/official-docs/docs/user/guide/python-sdk.zh.md +87 -41
  345. package/references/official-docs/docs/user/guide/schedule.i18n.yaml +6 -0
  346. package/references/official-docs/docs/user/guide/schedule.md +21 -0
  347. package/references/official-docs/docs/user/guide/schedule.zh.md +21 -0
  348. package/references/official-docs/docs/web-styling.i18n.yaml +1 -1
  349. package/references/official-docs/docs/web-styling.zh.md +2 -2
  350. package/references/official-docs/packages/AGENTS.md +3 -2
  351. package/references/official-docs/packages/README.md +104 -59
  352. package/references/official-docs/vendor/README.md +1 -0
  353. package/references/official-docs/website-docs.ts +52 -11
  354. package/references/sources.md +2 -2
  355. package/references/website-pages.md +3 -3
  356. package/scripts/check-docs-drift.ps1 +55 -0
  357. package/scripts/check-readme-sync.mjs +91 -0
  358. package/scripts/download-sources.ps1 +1 -1
  359. package/scripts/sync-official-docs.ps1 +19 -11
  360. package/scripts/verify-kit.ps1 +0 -4
  361. package/templates/js/README.es.md +1 -1
  362. package/templates/js/README.hi.md +1 -1
  363. package/templates/js/README.md +1 -1
  364. package/templates/js/README.pt.md +1 -1
  365. package/templates/js/README.zh.md +1 -1
  366. package/templates/js/package.json +4 -4
  367. package/templates/ts/README.es.md +1 -1
  368. package/templates/ts/README.hi.md +1 -1
  369. package/templates/ts/README.md +1 -1
  370. package/templates/ts/README.pt.md +1 -1
  371. package/templates/ts/README.zh.md +1 -1
  372. package/templates/ts/package.json +4 -4
  373. package/references/official-docs/examples/AGENTS.md +0 -20
@@ -34,20 +34,24 @@ interface ResolvedCredential {
34
34
  `describe(ref)` answers configuration surfaces without ever exposing a value: whether the reference resolves, from which layer, and whether `set` would currently succeed. The local provider reports a reference supplied by the live process environment as `writable: false` — a write would appear to succeed while resolution kept returning the shadowing value, so the seam rejects it and the UI can render the reference read-only up front.
35
35
 
36
36
  ```ts type-equiv
37
- /** Source and writability facts for one reference, safe for configuration UIs — never the value. */
37
+ /**
38
+ * Source and writability facts for one reference, safe for configuration UIs —
39
+ * never the value. The view has no slot a value could ride in, which is what
40
+ * lets the whole read half cross the Remote wire.
41
+ */
38
42
  interface CredentialInfo {
39
- /** Whether {@link CredentialProvider.resolve} would currently return a value. */
43
+ /** Whether resolving the reference would currently return a value. */
40
44
  configured: boolean
41
45
  /** Source layer currently supplying the value; absent while unconfigured. */
42
46
  source?: string
43
- /** Whether {@link CredentialProvider.set} would currently succeed for this reference. */
47
+ /** Whether the active provider can write this reference. */
44
48
  writable: boolean
45
49
  }
46
50
  ```
47
51
 
48
52
  ## Change commits
49
53
 
50
- `credentials/updated (ref)` fires after a committed change to a provider-managed source — a `set`, an `unset`, or an external edit observed in storage. Ambient process-environment changes are not observable and never emit. Consumers do not need the event (they re-resolve per operation); it exists for configuration surfaces refreshing a "configured" badge.
54
+ `credentials/reference-updated (ref)` fires after a committed change to a provider-managed source — a `set`, an `unset`, or an external edit observed in storage. Ambient process-environment changes are not observable and never emit. Consumers do not need the event (they re-resolve per operation); it exists for configuration surfaces refreshing a "configured" badge.
51
55
 
52
56
  <!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
53
57
 
@@ -55,13 +59,78 @@ interface CredentialInfo {
55
59
 
56
60
  ## Cordis API
57
61
 
58
- 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`) — this section is byte-identical in both language sides of the page. 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).
62
+ 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).
63
+
64
+ <a id="ctxauthorization--authorizationservice"></a>
65
+
66
+ ### `ctx.authorization` — `AuthorizationService`
67
+
68
+ `ctx.authorization`: a registry of credential-obtaining flows, one attempt at a time per key.
69
+
70
+ ```ts cordis-catalog
71
+ /**
72
+ * Offer a way to obtain one credential. One flow per key: two plugins
73
+ * claiming the same key would each write a record in their own format, and
74
+ * whichever ran last would leave the other reading a payload it cannot parse.
75
+ *
76
+ * @param flow - the key it writes, its label, its methods, and its runner.
77
+ * @returns Disposer that withdraws this flow.
78
+ * @throws {AuthorizationError} code `DUPLICATE_FLOW` when the key is already claimed.
79
+ */
80
+ registerFlow(flow: AuthorizationFlow): () => void
81
+
82
+ /**
83
+ * Every registered flow, for a surface listing what can be authorized.
84
+ * @returns one entry per flow, in registration order.
85
+ */
86
+ list(): readonly AuthorizationEntry[]
87
+
88
+ /**
89
+ * One registered flow.
90
+ * @param key - the credential record to ask about.
91
+ * @returns the entry, or undefined when no flow claims that key.
92
+ */
93
+ describe(key: CredentialKey): AuthorizationEntry | undefined
94
+
95
+ /**
96
+ * Withdraw the attempt running for a key, if any. Separate from the
97
+ * request's own signal because a request/response transport answers a Cancel
98
+ * button on a second call, with no handle on the first one's signal.
99
+ * @param key - the credential record whose attempt should stop.
100
+ */
101
+ cancel(key: CredentialKey): void
102
+
103
+ /**
104
+ * Run one attempt to authorize a key, and report how it ended.
105
+ *
106
+ * One attempt per key at a time. A second caller is refused rather than
107
+ * joined: the two would be prompting different humans through the same flow,
108
+ * and the second would answer questions the first was asked.
109
+ *
110
+ * @param request - the key, the method, the surface, and the cancel signal.
111
+ * @returns `authorized` once the flow's record is committed during this
112
+ * attempt and observed, or `cancelled` when the human declined or the
113
+ * caller withdrew.
114
+ * @throws {AuthorizationError} code `NO_FLOW` when nothing claims the key,
115
+ * `UNKNOWN_METHOD` when the named method is not one the flow offers,
116
+ * `ALREADY_IN_FLIGHT` when an attempt is already running for the key, or
117
+ * `NOT_COMMITTED` when the flow resolved without committing a record
118
+ * during the attempt.
119
+ */
120
+ async begin(request: AuthorizationRequest): Promise<AuthorizationOutcome>
121
+ ```
122
+
123
+ Source: [`packages/credentials/authorization/src/index.ts`](../../packages/credentials/authorization/src/index.ts)
59
124
 
60
125
  <a id="ctxcredentials--credentialprovider-abstract-seam"></a>
61
126
 
62
127
  ### `ctx.credentials` — `CredentialProvider` (abstract seam)
63
128
 
64
- Abstract credential service. Providers implement the four operations over their source layers; one seam-wide rule binds them all: an empty stored value is absent everywhere — `resolve` skips it, `describe` reports it unconfigured — so a blank never masquerades as a configured secret.
129
+ Abstract credential service over two key spaces that answer two questions.
130
+
131
+ A CredentialRef answers "what is behind this environment-variable name", layered over the process environment, the provider-managed store, and `.env` files. One seam-wide rule binds that half: an empty stored value is absent everywhere — `resolve` skips it, `describe` reports it unconfigured — so a blank never masquerades as a configured secret.
132
+
133
+ A CredentialKey answers "what credential does this plugin hold for this id". Nothing can layer here — an authorization grant has no environment to be read from — so presence of the record is the whole fact, and modifyRecord is the only write path because a correct write depends on the current value (a token refresh is read-decide-replace under one lock).
65
134
 
66
135
  ```ts cordis-catalog
67
136
  /**
@@ -99,17 +168,144 @@ abstract set(ref: CredentialRef, value: string): Promise<void>
99
168
  * @param ref - the reference to remove.
100
169
  */
101
170
  abstract unset(ref: CredentialRef): Promise<void>
171
+
172
+ /**
173
+ * Read one stored record. The value is returned as its owner wrote it; a
174
+ * {@link GrantRecord} payload is not interpreted on the way out.
175
+ * @param key - the record to read.
176
+ * @returns the record, or `undefined` while none is stored.
177
+ */
178
+ abstract readRecord(key: CredentialKey): Promise<CredentialRecord | undefined>
179
+
180
+ /**
181
+ * Describe one record for configuration surfaces without exposing its value.
182
+ * @param key - the record to describe.
183
+ * @returns presence, discriminant, and writability.
184
+ */
185
+ abstract describeRecord(key: CredentialKey): Promise<CredentialRecordInfo>
186
+
187
+ /**
188
+ * Enumerate every stored record's address and tag. Unlike the reference
189
+ * half, which has no enumeration because configuration surfaces learn which
190
+ * references exist from settings schemas, records have no such discovery
191
+ * path: a surface that cannot list them cannot show what a user is
192
+ * authorized for, nor find an orphan left by an uninstalled plugin.
193
+ * @returns every stored record, values excluded.
194
+ */
195
+ abstract listRecords(): Promise<readonly CredentialRecordEntry[]>
196
+
197
+ /**
198
+ * Serialized read-modify-write over one record — the only write path.
199
+ * `mutate` sees the record as it stands at the moment the write is
200
+ * exclusive, and returning `undefined` leaves the entry untouched. Exclusion
201
+ * holds across processes where the backing store supports it, which is what
202
+ * makes a token refresh safe: two processes rotating one refresh token
203
+ * concurrently would otherwise lose whichever wrote first.
204
+ * @param key - the record to modify.
205
+ * @param mutate - receives the current record and returns its replacement, or `undefined` to leave it.
206
+ * @returns the record after the write, or the current one when `mutate` declined.
207
+ */
208
+ abstract modifyRecord( key: CredentialKey, mutate: (current: CredentialRecord | undefined) => Promise<CredentialRecord | undefined>, ): Promise<CredentialRecord | undefined>
209
+
210
+ /**
211
+ * Remove one record; removing an absent record is a no-op.
212
+ * @param key - the record to remove.
213
+ */
214
+ abstract deleteRecord(key: CredentialKey): Promise<void>
102
215
  ```
103
216
 
104
- Source: [`packages/credentials/credentials/src/index.ts:60`](../../packages/credentials/credentials/src/index.ts)
217
+ Source: [`packages/credentials/credentials/src/index.ts`](../../packages/credentials/credentials/src/index.ts)
218
+
219
+ <a id="ctxcredentialscontroller--credentialscontroller"></a>
220
+
221
+ ### `ctx.credentialsController` — `CredentialsController`
222
+
223
+ Host service backing the generated `ctx.remote.credentials` namespace. It carries every wire obligation the credential seam itself does not: the batch fan-out bound, the field-by-field view projection, the reference-grammar guard, and the refusal mapping. Secret values cross in one direction only — no method here returns one.
224
+
225
+ ```ts cordis-catalog
226
+ /**
227
+ * Describe several references for one configuration surface. Batched because
228
+ * a settings page describes every reference its rows name at once, and one
229
+ * round trip keeps those rows from settling separately.
230
+ * @param refs - reference names, at most {@link MAX_DESCRIBE_REFS}; a name outside the grammar
231
+ * rejects the whole call as `gateway/bad-request`.
232
+ * @returns one view per requested name, keyed by that name.
233
+ * @throws RemoteError when the request is invalid or no credential provider is mounted.
234
+ */
235
+ @Remote async describe(refs: string[]): Promise<Record<string, CredentialInfo>>
236
+
237
+ /**
238
+ * Store one value from a configuration surface. The value crosses the wire in
239
+ * this direction only: no read path returns it.
240
+ * @param ref - reference name to store under.
241
+ * @param value - the non-empty secret value.
242
+ * @throws RemoteError when the request is invalid, no provider is mounted, or the provider refuses the write.
243
+ */
244
+ @Remote async set(ref: string, value: string): Promise<void>
245
+
246
+ /**
247
+ * Remove one reference from a configuration surface.
248
+ * @param ref - reference name to remove.
249
+ * @throws RemoteError when the request is invalid, no provider is mounted, or the provider refuses the write.
250
+ */
251
+ @Remote async unset(ref: string): Promise<void>
252
+ ```
253
+
254
+ Source: [`packages/api/settings-controller/src/credentials.ts`](../../packages/api/settings-controller/src/credentials.ts)
255
+
256
+ <a id="authorization-events"></a>
257
+
258
+ ### `authorization/*` events
259
+
260
+ <a id="authorizationsettled--emit"></a>
261
+
262
+ #### `authorization/settled` — emit
263
+
264
+ One authorization attempt has finished and released its key. Fires for every terminal outcome, failures included, so a surface watching a key it did not start (a second browser tab) learns the attempt is over.
265
+
266
+ ```ts cordis-catalog
267
+ /**
268
+ * One authorization attempt has finished and released its key. Fires for
269
+ * every terminal outcome, failures included, so a surface watching a key it
270
+ * did not start (a second browser tab) learns the attempt is over.
271
+ * @mode emit
272
+ * @param key - the credential record the finished attempt was authorizing.
273
+ * @param settlement - how it ended, including the `failed` case its caller sees as a thrown error.
274
+ */
275
+ 'authorization/settled'(key: CredentialKey, settlement: AuthorizationSettlement): void
276
+ ```
277
+
278
+ Source: [`packages/credentials/authorization/src/index.ts`](../../packages/credentials/authorization/src/index.ts)
105
279
 
106
280
  <a id="credentials-events"></a>
107
281
 
108
282
  ### `credentials/*` events
109
283
 
110
- <a id="credentialsupdated--emit"></a>
284
+ <a id="credentialsrecord-updated--emit"></a>
285
+
286
+ #### `credentials/record-updated` — emit
287
+
288
+ Committed change to a stored credential record: a `modifyRecord` that wrote, a `deleteRecord` that removed, or an external edit observed in storage. Separate from `credentials/reference-updated` because the two key grammars are disjoint — a listener that received both on one event could not tell which space a subject belongs to. Listener failures are contained on the same terms as `credentials/reference-updated`.
289
+
290
+ ```ts cordis-catalog
291
+ /**
292
+ * Committed change to a stored credential record: a `modifyRecord` that
293
+ * wrote, a `deleteRecord` that removed, or an external edit observed in
294
+ * storage. Separate from `credentials/reference-updated` because the two key
295
+ * grammars are disjoint — a listener that received both on one event could
296
+ * not tell which space a subject belongs to. Listener failures are
297
+ * contained on the same terms as `credentials/reference-updated`.
298
+ * @param key - the record whose stored value changed.
299
+ * @mode emit
300
+ */
301
+ 'credentials/record-updated'(key: CredentialKey): void
302
+ ```
303
+
304
+ Source: [`packages/credentials/credentials/src/types.ts`](../../packages/credentials/credentials/src/types.ts)
305
+
306
+ <a id="credentialsreference-updated--emit"></a>
111
307
 
112
- #### `credentials/updated` — emit
308
+ #### `credentials/reference-updated` — emit
113
309
 
114
310
  Committed change to a provider-managed credential source: a `set`, an `unset`, or an external edit observed in storage. Ambient process-environment changes are not observable and never emit. Listener failures are contained and logged — a sync throw and an async rejection alike — without changing the committed operation's outcome, except `INVARIANT`-coded failures, which rethrow after every listener ran; that rethrow reaches the emitter only from synchronous listeners, so invariant checks on this event must not be async functions.
115
311
 
@@ -126,8 +322,8 @@ Committed change to a provider-managed credential source: a `set`, an `unset`, o
126
322
  * @param ref - the reference whose stored value changed.
127
323
  * @mode emit
128
324
  */
129
- 'credentials/updated'(ref: CredentialRef): void
325
+ 'credentials/reference-updated'(ref: CredentialRef): void
130
326
  ```
131
327
 
132
- Source: [`packages/credentials/credentials/src/types.ts:29`](../../packages/credentials/credentials/src/types.ts)
328
+ Source: [`packages/credentials/credentials/src/types.ts`](../../packages/credentials/credentials/src/types.ts)
133
329
  <!-- END GENERATED cordis-surface -->
@@ -34,20 +34,24 @@ interface ResolvedCredential {
34
34
  `describe(ref)` 在绝不暴露值的前提下回应配置界面:引用当前是否可解析、来自哪一层、`set` 当前能否成功。本地提供方把由当前进程环境供值的引用报告为 `writable: false`——那样的写入会表面成功而解析持续返回遮蔽值,因此 seam 直接拒绝,界面也得以提前把该引用渲染为只读。
35
35
 
36
36
  ```ts type-equiv
37
- /** Source and writability facts for one reference, safe for configuration UIs — never the value. */
37
+ /**
38
+ * Source and writability facts for one reference, safe for configuration UIs —
39
+ * never the value. The view has no slot a value could ride in, which is what
40
+ * lets the whole read half cross the Remote wire.
41
+ */
38
42
  interface CredentialInfo {
39
- /** Whether {@link CredentialProvider.resolve} would currently return a value. */
43
+ /** Whether resolving the reference would currently return a value. */
40
44
  configured: boolean
41
45
  /** Source layer currently supplying the value; absent while unconfigured. */
42
46
  source?: string
43
- /** Whether {@link CredentialProvider.set} would currently succeed for this reference. */
47
+ /** Whether the active provider can write this reference. */
44
48
  writable: boolean
45
49
  }
46
50
  ```
47
51
 
48
52
  ## 已提交的变更
49
53
 
50
- `credentials/updated (ref)` 在提供方管理的来源发生已提交变更后发出——`set`、`unset` 或在存储中观察到的外部编辑。进程环境自身的变化不可观测,永不发出事件。消费方不需要该事件(它们按操作重新解析);它服务于配置界面刷新「已配置」徽标。
54
+ `credentials/reference-updated (ref)` 在提供方管理的来源发生已提交变更后发出——`set`、`unset` 或在存储中观察到的外部编辑。进程环境自身的变化不可观测,永不发出事件。消费方不需要该事件(它们按操作重新解析);它服务于配置界面刷新「已配置」徽标。
51
55
 
52
56
  <!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
53
57
 
@@ -55,13 +59,78 @@ interface CredentialInfo {
55
59
 
56
60
  ## Cordis API
57
61
 
58
- 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`) — this section is byte-identical in both language sides of the page. 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).
62
+ 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).
63
+
64
+ <a id="ctxauthorization--authorizationservice"></a>
65
+
66
+ ### `ctx.authorization` — `AuthorizationService`
67
+
68
+ `ctx.authorization`: a registry of credential-obtaining flows, one attempt at a time per key.
69
+
70
+ ```ts cordis-catalog
71
+ /**
72
+ * Offer a way to obtain one credential. One flow per key: two plugins
73
+ * claiming the same key would each write a record in their own format, and
74
+ * whichever ran last would leave the other reading a payload it cannot parse.
75
+ *
76
+ * @param flow - the key it writes, its label, its methods, and its runner.
77
+ * @returns Disposer that withdraws this flow.
78
+ * @throws {AuthorizationError} code `DUPLICATE_FLOW` when the key is already claimed.
79
+ */
80
+ registerFlow(flow: AuthorizationFlow): () => void
81
+
82
+ /**
83
+ * Every registered flow, for a surface listing what can be authorized.
84
+ * @returns one entry per flow, in registration order.
85
+ */
86
+ list(): readonly AuthorizationEntry[]
87
+
88
+ /**
89
+ * One registered flow.
90
+ * @param key - the credential record to ask about.
91
+ * @returns the entry, or undefined when no flow claims that key.
92
+ */
93
+ describe(key: CredentialKey): AuthorizationEntry | undefined
94
+
95
+ /**
96
+ * Withdraw the attempt running for a key, if any. Separate from the
97
+ * request's own signal because a request/response transport answers a Cancel
98
+ * button on a second call, with no handle on the first one's signal.
99
+ * @param key - the credential record whose attempt should stop.
100
+ */
101
+ cancel(key: CredentialKey): void
102
+
103
+ /**
104
+ * Run one attempt to authorize a key, and report how it ended.
105
+ *
106
+ * One attempt per key at a time. A second caller is refused rather than
107
+ * joined: the two would be prompting different humans through the same flow,
108
+ * and the second would answer questions the first was asked.
109
+ *
110
+ * @param request - the key, the method, the surface, and the cancel signal.
111
+ * @returns `authorized` once the flow's record is committed during this
112
+ * attempt and observed, or `cancelled` when the human declined or the
113
+ * caller withdrew.
114
+ * @throws {AuthorizationError} code `NO_FLOW` when nothing claims the key,
115
+ * `UNKNOWN_METHOD` when the named method is not one the flow offers,
116
+ * `ALREADY_IN_FLIGHT` when an attempt is already running for the key, or
117
+ * `NOT_COMMITTED` when the flow resolved without committing a record
118
+ * during the attempt.
119
+ */
120
+ async begin(request: AuthorizationRequest): Promise<AuthorizationOutcome>
121
+ ```
122
+
123
+ Source: [`packages/credentials/authorization/src/index.ts`](../../packages/credentials/authorization/src/index.ts)
59
124
 
60
125
  <a id="ctxcredentials--credentialprovider-abstract-seam"></a>
61
126
 
62
127
  ### `ctx.credentials` — `CredentialProvider` (abstract seam)
63
128
 
64
- Abstract credential service. Providers implement the four operations over their source layers; one seam-wide rule binds them all: an empty stored value is absent everywhere — `resolve` skips it, `describe` reports it unconfigured — so a blank never masquerades as a configured secret.
129
+ Abstract credential service over two key spaces that answer two questions.
130
+
131
+ A CredentialRef answers "what is behind this environment-variable name", layered over the process environment, the provider-managed store, and `.env` files. One seam-wide rule binds that half: an empty stored value is absent everywhere — `resolve` skips it, `describe` reports it unconfigured — so a blank never masquerades as a configured secret.
132
+
133
+ A CredentialKey answers "what credential does this plugin hold for this id". Nothing can layer here — an authorization grant has no environment to be read from — so presence of the record is the whole fact, and modifyRecord is the only write path because a correct write depends on the current value (a token refresh is read-decide-replace under one lock).
65
134
 
66
135
  ```ts cordis-catalog
67
136
  /**
@@ -99,17 +168,144 @@ abstract set(ref: CredentialRef, value: string): Promise<void>
99
168
  * @param ref - the reference to remove.
100
169
  */
101
170
  abstract unset(ref: CredentialRef): Promise<void>
171
+
172
+ /**
173
+ * Read one stored record. The value is returned as its owner wrote it; a
174
+ * {@link GrantRecord} payload is not interpreted on the way out.
175
+ * @param key - the record to read.
176
+ * @returns the record, or `undefined` while none is stored.
177
+ */
178
+ abstract readRecord(key: CredentialKey): Promise<CredentialRecord | undefined>
179
+
180
+ /**
181
+ * Describe one record for configuration surfaces without exposing its value.
182
+ * @param key - the record to describe.
183
+ * @returns presence, discriminant, and writability.
184
+ */
185
+ abstract describeRecord(key: CredentialKey): Promise<CredentialRecordInfo>
186
+
187
+ /**
188
+ * Enumerate every stored record's address and tag. Unlike the reference
189
+ * half, which has no enumeration because configuration surfaces learn which
190
+ * references exist from settings schemas, records have no such discovery
191
+ * path: a surface that cannot list them cannot show what a user is
192
+ * authorized for, nor find an orphan left by an uninstalled plugin.
193
+ * @returns every stored record, values excluded.
194
+ */
195
+ abstract listRecords(): Promise<readonly CredentialRecordEntry[]>
196
+
197
+ /**
198
+ * Serialized read-modify-write over one record — the only write path.
199
+ * `mutate` sees the record as it stands at the moment the write is
200
+ * exclusive, and returning `undefined` leaves the entry untouched. Exclusion
201
+ * holds across processes where the backing store supports it, which is what
202
+ * makes a token refresh safe: two processes rotating one refresh token
203
+ * concurrently would otherwise lose whichever wrote first.
204
+ * @param key - the record to modify.
205
+ * @param mutate - receives the current record and returns its replacement, or `undefined` to leave it.
206
+ * @returns the record after the write, or the current one when `mutate` declined.
207
+ */
208
+ abstract modifyRecord( key: CredentialKey, mutate: (current: CredentialRecord | undefined) => Promise<CredentialRecord | undefined>, ): Promise<CredentialRecord | undefined>
209
+
210
+ /**
211
+ * Remove one record; removing an absent record is a no-op.
212
+ * @param key - the record to remove.
213
+ */
214
+ abstract deleteRecord(key: CredentialKey): Promise<void>
215
+ ```
216
+
217
+ Source: [`packages/credentials/credentials/src/index.ts`](../../packages/credentials/credentials/src/index.ts)
218
+
219
+ <a id="ctxcredentialscontroller--credentialscontroller"></a>
220
+
221
+ ### `ctx.credentialsController` — `CredentialsController`
222
+
223
+ Host service backing the generated `ctx.remote.credentials` namespace. It carries every wire obligation the credential seam itself does not: the batch fan-out bound, the field-by-field view projection, the reference-grammar guard, and the refusal mapping. Secret values cross in one direction only — no method here returns one.
224
+
225
+ ```ts cordis-catalog
226
+ /**
227
+ * Describe several references for one configuration surface. Batched because
228
+ * a settings page describes every reference its rows name at once, and one
229
+ * round trip keeps those rows from settling separately.
230
+ * @param refs - reference names, at most {@link MAX_DESCRIBE_REFS}; a name outside the grammar
231
+ * rejects the whole call as `gateway/bad-request`.
232
+ * @returns one view per requested name, keyed by that name.
233
+ * @throws RemoteError when the request is invalid or no credential provider is mounted.
234
+ */
235
+ @Remote async describe(refs: string[]): Promise<Record<string, CredentialInfo>>
236
+
237
+ /**
238
+ * Store one value from a configuration surface. The value crosses the wire in
239
+ * this direction only: no read path returns it.
240
+ * @param ref - reference name to store under.
241
+ * @param value - the non-empty secret value.
242
+ * @throws RemoteError when the request is invalid, no provider is mounted, or the provider refuses the write.
243
+ */
244
+ @Remote async set(ref: string, value: string): Promise<void>
245
+
246
+ /**
247
+ * Remove one reference from a configuration surface.
248
+ * @param ref - reference name to remove.
249
+ * @throws RemoteError when the request is invalid, no provider is mounted, or the provider refuses the write.
250
+ */
251
+ @Remote async unset(ref: string): Promise<void>
102
252
  ```
103
253
 
104
- Source: [`packages/credentials/credentials/src/index.ts:60`](../../packages/credentials/credentials/src/index.ts)
254
+ Source: [`packages/api/settings-controller/src/credentials.ts`](../../packages/api/settings-controller/src/credentials.ts)
255
+
256
+ <a id="authorization-events"></a>
257
+
258
+ ### `authorization/*` events
259
+
260
+ <a id="authorizationsettled--emit"></a>
261
+
262
+ #### `authorization/settled` — emit
263
+
264
+ One authorization attempt has finished and released its key. Fires for every terminal outcome, failures included, so a surface watching a key it did not start (a second browser tab) learns the attempt is over.
265
+
266
+ ```ts cordis-catalog
267
+ /**
268
+ * One authorization attempt has finished and released its key. Fires for
269
+ * every terminal outcome, failures included, so a surface watching a key it
270
+ * did not start (a second browser tab) learns the attempt is over.
271
+ * @mode emit
272
+ * @param key - the credential record the finished attempt was authorizing.
273
+ * @param settlement - how it ended, including the `failed` case its caller sees as a thrown error.
274
+ */
275
+ 'authorization/settled'(key: CredentialKey, settlement: AuthorizationSettlement): void
276
+ ```
277
+
278
+ Source: [`packages/credentials/authorization/src/index.ts`](../../packages/credentials/authorization/src/index.ts)
105
279
 
106
280
  <a id="credentials-events"></a>
107
281
 
108
282
  ### `credentials/*` events
109
283
 
110
- <a id="credentialsupdated--emit"></a>
284
+ <a id="credentialsrecord-updated--emit"></a>
285
+
286
+ #### `credentials/record-updated` — emit
287
+
288
+ Committed change to a stored credential record: a `modifyRecord` that wrote, a `deleteRecord` that removed, or an external edit observed in storage. Separate from `credentials/reference-updated` because the two key grammars are disjoint — a listener that received both on one event could not tell which space a subject belongs to. Listener failures are contained on the same terms as `credentials/reference-updated`.
289
+
290
+ ```ts cordis-catalog
291
+ /**
292
+ * Committed change to a stored credential record: a `modifyRecord` that
293
+ * wrote, a `deleteRecord` that removed, or an external edit observed in
294
+ * storage. Separate from `credentials/reference-updated` because the two key
295
+ * grammars are disjoint — a listener that received both on one event could
296
+ * not tell which space a subject belongs to. Listener failures are
297
+ * contained on the same terms as `credentials/reference-updated`.
298
+ * @param key - the record whose stored value changed.
299
+ * @mode emit
300
+ */
301
+ 'credentials/record-updated'(key: CredentialKey): void
302
+ ```
303
+
304
+ Source: [`packages/credentials/credentials/src/types.ts`](../../packages/credentials/credentials/src/types.ts)
305
+
306
+ <a id="credentialsreference-updated--emit"></a>
111
307
 
112
- #### `credentials/updated` — emit
308
+ #### `credentials/reference-updated` — emit
113
309
 
114
310
  Committed change to a provider-managed credential source: a `set`, an `unset`, or an external edit observed in storage. Ambient process-environment changes are not observable and never emit. Listener failures are contained and logged — a sync throw and an async rejection alike — without changing the committed operation's outcome, except `INVARIANT`-coded failures, which rethrow after every listener ran; that rethrow reaches the emitter only from synchronous listeners, so invariant checks on this event must not be async functions.
115
311
 
@@ -126,8 +322,8 @@ Committed change to a provider-managed credential source: a `set`, an `unset`, o
126
322
  * @param ref - the reference whose stored value changed.
127
323
  * @mode emit
128
324
  */
129
- 'credentials/updated'(ref: CredentialRef): void
325
+ 'credentials/reference-updated'(ref: CredentialRef): void
130
326
  ```
131
327
 
132
- Source: [`packages/credentials/credentials/src/types.ts:29`](../../packages/credentials/credentials/src/types.ts)
328
+ Source: [`packages/credentials/credentials/src/types.ts`](../../packages/credentials/credentials/src/types.ts)
133
329
  <!-- END GENERATED cordis-surface -->
@@ -2,5 +2,5 @@
2
2
  # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
3
  # after editing either side, bring the other along and re-record with:
4
4
  # pnpm run verify-translation-pairing --write docs/subsystems/extensions.md
5
- extensions.md: f212f99704cb1cc871a77ee6cc10188746771958
6
- extensions.zh.md: 717b14951dd262213cfc42a380777d233fb6eea5
5
+ extensions.md: 540f3c477b4e128b0c1062192185e6276c9e9263
6
+ extensions.zh.md: ebfe7827484cea2cf8c6d77ca26796f7751d203a
@@ -10,7 +10,7 @@ The extensions subsystem lets an agent define versioned Cordis packages, run the
10
10
 
11
11
  ## Cordis API
12
12
 
13
- 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`) — this section is byte-identical in both language sides of the page. 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).
13
+ 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).
14
14
 
15
15
  <a id="ctxcordisinspect--cordisinspectregistryservice"></a>
16
16
 
@@ -62,7 +62,7 @@ resolveClientQuery( agent: Agent, requestId: CordisInspectRequestId, resolution:
62
62
 
63
63
  Types: [Agent](core.md)
64
64
 
65
- Source: [`packages/extensions/cordis-host-runner/src/inspect-registry.ts:46`](../../packages/extensions/cordis-host-runner/src/inspect-registry.ts)
65
+ Source: [`packages/extensions/cordis-host-runner/src/inspect-registry.ts`](../../packages/extensions/cordis-host-runner/src/inspect-registry.ts)
66
66
 
67
67
  <a id="ctxdynamiccordisrunner--dynamiccordisrunnerservice"></a>
68
68
 
@@ -254,7 +254,25 @@ inspectPackage( agent: Agent, pluginId: CordisDynamicPluginId, packageId: Cordis
254
254
 
255
255
  Types: [Agent](core.md)
256
256
 
257
- Source: [`packages/extensions/cordis-host-runner/src/index.ts:124`](../../packages/extensions/cordis-host-runner/src/index.ts)
257
+ Source: [`packages/extensions/cordis-host-runner/src/index.ts`](../../packages/extensions/cordis-host-runner/src/index.ts)
258
+
259
+ <a id="ctxinspector--inspectorservice"></a>
260
+
261
+ ### `ctx.inspector` — `InspectorService`
262
+
263
+ Shared Host/Client service façade over the realm's source publisher.
264
+
265
+ ```ts cordis-catalog
266
+ /**
267
+ * Publish one JSON observation without waiting for Worker delivery.
268
+ * @param topic - Domain-owned topic name.
269
+ * @param payload - JSON value validated before it reaches the carrier.
270
+ * @param monotonicMs - Source-clock timestamp; defaults to `performance.now()`.
271
+ */
272
+ publish(topic: string, payload: InspectorJsonValue, monotonicMs?: number): void
273
+ ```
274
+
275
+ Source: [`packages/experimental/inspector/src/index.ts`](../../packages/experimental/inspector/src/index.ts)
258
276
 
259
277
  <a id="cordis-events"></a>
260
278
 
@@ -275,7 +293,7 @@ One exact Plugin/Package activation is now live in the Host.
275
293
  'cordis/dynamic-package'(pkg: DynamicCordisPackage): void
276
294
  ```
277
295
 
278
- Source: [`packages/extensions/cordis-host-runner/src/types.ts:379`](../../packages/extensions/cordis-host-runner/src/types.ts)
296
+ Source: [`packages/extensions/cordis-host-runner/src/types.ts`](../../packages/extensions/cordis-host-runner/src/types.ts)
279
297
 
280
298
  <a id="cordisdynamic-retract--emit"></a>
281
299
 
@@ -292,7 +310,7 @@ One exact activation was withdrawn.
292
310
  'cordis/dynamic-retract'(retracted: DynamicCordisRetracted): void
293
311
  ```
294
312
 
295
- Source: [`packages/extensions/cordis-host-runner/src/types.ts:385`](../../packages/extensions/cordis-host-runner/src/types.ts)
313
+ Source: [`packages/extensions/cordis-host-runner/src/types.ts`](../../packages/extensions/cordis-host-runner/src/types.ts)
296
314
 
297
315
  <a id="cordisinspect-query--emit"></a>
298
316
 
@@ -309,7 +327,7 @@ Request a live read-only query from the Client inspect registry.
309
327
  'cordis/inspect-query'(request: CordisInspectQueryRequest): void
310
328
  ```
311
329
 
312
- Source: [`packages/extensions/cordis-host-runner/src/types.ts:391`](../../packages/extensions/cordis-host-runner/src/types.ts)
330
+ Source: [`packages/extensions/cordis-host-runner/src/types.ts`](../../packages/extensions/cordis-host-runner/src/types.ts)
313
331
 
314
332
  <a id="cordisinspect-query-resolved--emit"></a>
315
333
 
@@ -326,7 +344,7 @@ Notify every Client that an inspect query has settled or been cancelled.
326
344
  'cordis/inspect-query-resolved'(resolved: CordisInspectQueryResolved): void
327
345
  ```
328
346
 
329
- Source: [`packages/extensions/cordis-host-runner/src/types.ts:397`](../../packages/extensions/cordis-host-runner/src/types.ts)
347
+ Source: [`packages/extensions/cordis-host-runner/src/types.ts`](../../packages/extensions/cordis-host-runner/src/types.ts)
330
348
 
331
349
  <a id="cordisrequest-run--emit"></a>
332
350
 
@@ -343,7 +361,7 @@ A Client-bearing activation needs a browser page, and may require a user decisio
343
361
  'cordis/request-run'(request: DynamicCordisRunRequest): void
344
362
  ```
345
363
 
346
- Source: [`packages/extensions/cordis-host-runner/src/types.ts:367`](../../packages/extensions/cordis-host-runner/src/types.ts)
364
+ Source: [`packages/extensions/cordis-host-runner/src/types.ts`](../../packages/extensions/cordis-host-runner/src/types.ts)
347
365
 
348
366
  <a id="cordisrequest-run-resolved--emit"></a>
349
367
 
@@ -360,5 +378,5 @@ A pending Client activation request left the answerable state.
360
378
  'cordis/request-run-resolved'(resolved: DynamicCordisRequestResolved): void
361
379
  ```
362
380
 
363
- Source: [`packages/extensions/cordis-host-runner/src/types.ts:373`](../../packages/extensions/cordis-host-runner/src/types.ts)
381
+ Source: [`packages/extensions/cordis-host-runner/src/types.ts`](../../packages/extensions/cordis-host-runner/src/types.ts)
364
382
  <!-- END GENERATED cordis-surface -->