dsh-plugin-guide 0.1.0

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 (374) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE.md +26 -0
  3. package/README.es.md +139 -0
  4. package/README.hi.md +138 -0
  5. package/README.md +165 -0
  6. package/README.pt.md +139 -0
  7. package/README.zh-CN.md +164 -0
  8. package/SKILL.md +69 -0
  9. package/cordis.patch.yml +4 -0
  10. package/guide/links.md +92 -0
  11. package/guide/plugin-dev-guide.md +429 -0
  12. package/guide/quick-reference.es.md +176 -0
  13. package/guide/quick-reference.hi.md +176 -0
  14. package/guide/quick-reference.md +176 -0
  15. package/guide/quick-reference.pt.md +176 -0
  16. package/guide/quick-reference.zh-CN.md +175 -0
  17. package/index.js +58 -0
  18. package/package.json +83 -0
  19. package/references/community-ecosystem.md +201 -0
  20. package/references/community-repo-deep-dive.md +695 -0
  21. package/references/cordis-paper-and-community.md +326 -0
  22. package/references/harness-repo.md +654 -0
  23. package/references/official-docs/AGENTS.md +149 -0
  24. package/references/official-docs/BENCHMARK.md +3 -0
  25. package/references/official-docs/CLAUDE.md +1 -0
  26. package/references/official-docs/CONTRIBUTING.i18n.yaml +6 -0
  27. package/references/official-docs/CONTRIBUTING.md +23 -0
  28. package/references/official-docs/CONTRIBUTING.zh.md +23 -0
  29. package/references/official-docs/LICENSE +21 -0
  30. package/references/official-docs/README.i18n.yaml +6 -0
  31. package/references/official-docs/README.md +35 -0
  32. package/references/official-docs/README.zh.md +74 -0
  33. package/references/official-docs/SNAPSHOT.md +16 -0
  34. package/references/official-docs/THIRD_PARTY_NOTICES.md +192 -0
  35. package/references/official-docs/docs/AGENTS.md +75 -0
  36. package/references/official-docs/docs/agent-lifecycle.i18n.yaml +6 -0
  37. package/references/official-docs/docs/agent-lifecycle.md +82 -0
  38. package/references/official-docs/docs/agent-lifecycle.zh.md +84 -0
  39. package/references/official-docs/docs/api-gateway.i18n.yaml +6 -0
  40. package/references/official-docs/docs/api-gateway.md +164 -0
  41. package/references/official-docs/docs/api-gateway.zh.md +164 -0
  42. package/references/official-docs/docs/architecture.i18n.yaml +6 -0
  43. package/references/official-docs/docs/architecture.md +129 -0
  44. package/references/official-docs/docs/architecture.zh.md +133 -0
  45. package/references/official-docs/docs/capability-seams.i18n.yaml +6 -0
  46. package/references/official-docs/docs/capability-seams.md +471 -0
  47. package/references/official-docs/docs/capability-seams.zh.md +473 -0
  48. package/references/official-docs/docs/config-catalog.i18n.yaml +6 -0
  49. package/references/official-docs/docs/config-catalog.md +3151 -0
  50. package/references/official-docs/docs/config-catalog.zh.md +3152 -0
  51. package/references/official-docs/docs/cookbook/adding-a-conversation-node.i18n.yaml +6 -0
  52. package/references/official-docs/docs/cookbook/adding-a-conversation-node.md +233 -0
  53. package/references/official-docs/docs/cookbook/adding-a-conversation-node.zh.md +233 -0
  54. package/references/official-docs/docs/cookbook/adding-a-package.i18n.yaml +6 -0
  55. package/references/official-docs/docs/cookbook/adding-a-package.md +118 -0
  56. package/references/official-docs/docs/cookbook/adding-a-package.zh.md +118 -0
  57. package/references/official-docs/docs/cookbook/adding-a-tool.i18n.yaml +6 -0
  58. package/references/official-docs/docs/cookbook/adding-a-tool.md +94 -0
  59. package/references/official-docs/docs/cookbook/adding-a-tool.zh.md +96 -0
  60. package/references/official-docs/docs/cookbook/adding-a-vendored-package.i18n.yaml +6 -0
  61. package/references/official-docs/docs/cookbook/adding-a-vendored-package.md +59 -0
  62. package/references/official-docs/docs/cookbook/adding-a-vendored-package.zh.md +59 -0
  63. package/references/official-docs/docs/cookbook/adding-an-llm-adapter.i18n.yaml +6 -0
  64. package/references/official-docs/docs/cookbook/adding-an-llm-adapter.md +43 -0
  65. package/references/official-docs/docs/cookbook/adding-an-llm-adapter.zh.md +43 -0
  66. package/references/official-docs/docs/cookbook/extension-cookbook.i18n.yaml +6 -0
  67. package/references/official-docs/docs/cookbook/extension-cookbook.md +129 -0
  68. package/references/official-docs/docs/cookbook/extension-cookbook.zh.md +131 -0
  69. package/references/official-docs/docs/cookbook/maintaining-dsh-code-review.i18n.yaml +6 -0
  70. package/references/official-docs/docs/cookbook/maintaining-dsh-code-review.md +64 -0
  71. package/references/official-docs/docs/cookbook/maintaining-dsh-code-review.zh.md +64 -0
  72. package/references/official-docs/docs/cookbook/responding-to-pr-review-on-a-stack.i18n.yaml +6 -0
  73. package/references/official-docs/docs/cookbook/responding-to-pr-review-on-a-stack.md +32 -0
  74. package/references/official-docs/docs/cookbook/responding-to-pr-review-on-a-stack.zh.md +32 -0
  75. package/references/official-docs/docs/cordis-api/context.i18n.yaml +6 -0
  76. package/references/official-docs/docs/cordis-api/context.md +364 -0
  77. package/references/official-docs/docs/cordis-api/context.zh.md +366 -0
  78. package/references/official-docs/docs/cordis-api/events.i18n.yaml +6 -0
  79. package/references/official-docs/docs/cordis-api/events.md +207 -0
  80. package/references/official-docs/docs/cordis-api/events.zh.md +209 -0
  81. package/references/official-docs/docs/cordis-api/fiber.i18n.yaml +6 -0
  82. package/references/official-docs/docs/cordis-api/fiber.md +375 -0
  83. package/references/official-docs/docs/cordis-api/fiber.zh.md +377 -0
  84. package/references/official-docs/docs/cordis-api/inherited.md +39 -0
  85. package/references/official-docs/docs/cordis-api/registry.i18n.yaml +6 -0
  86. package/references/official-docs/docs/cordis-api/registry.md +152 -0
  87. package/references/official-docs/docs/cordis-api/registry.zh.md +154 -0
  88. package/references/official-docs/docs/cordis-api/service.i18n.yaml +6 -0
  89. package/references/official-docs/docs/cordis-api/service.md +102 -0
  90. package/references/official-docs/docs/cordis-api/service.zh.md +104 -0
  91. package/references/official-docs/docs/cordis-primer.i18n.yaml +6 -0
  92. package/references/official-docs/docs/cordis-primer.md +44 -0
  93. package/references/official-docs/docs/cordis-primer.zh.md +50 -0
  94. package/references/official-docs/docs/cordis-tutorial/01-first-plugin.i18n.yaml +6 -0
  95. package/references/official-docs/docs/cordis-tutorial/01-first-plugin.md +95 -0
  96. package/references/official-docs/docs/cordis-tutorial/01-first-plugin.zh.md +95 -0
  97. package/references/official-docs/docs/cordis-tutorial/02-lifecycle-and-effects.i18n.yaml +6 -0
  98. package/references/official-docs/docs/cordis-tutorial/02-lifecycle-and-effects.md +98 -0
  99. package/references/official-docs/docs/cordis-tutorial/02-lifecycle-and-effects.zh.md +98 -0
  100. package/references/official-docs/docs/cordis-tutorial/03-services.i18n.yaml +6 -0
  101. package/references/official-docs/docs/cordis-tutorial/03-services.md +98 -0
  102. package/references/official-docs/docs/cordis-tutorial/03-services.zh.md +98 -0
  103. package/references/official-docs/docs/cordis-tutorial/04-events.i18n.yaml +6 -0
  104. package/references/official-docs/docs/cordis-tutorial/04-events.md +144 -0
  105. package/references/official-docs/docs/cordis-tutorial/04-events.zh.md +144 -0
  106. package/references/official-docs/docs/cordis-tutorial/05-config.i18n.yaml +6 -0
  107. package/references/official-docs/docs/cordis-tutorial/05-config.md +84 -0
  108. package/references/official-docs/docs/cordis-tutorial/05-config.zh.md +84 -0
  109. package/references/official-docs/docs/cordis-tutorial/06-composition-and-hmr.i18n.yaml +6 -0
  110. package/references/official-docs/docs/cordis-tutorial/06-composition-and-hmr.md +113 -0
  111. package/references/official-docs/docs/cordis-tutorial/06-composition-and-hmr.zh.md +113 -0
  112. package/references/official-docs/docs/cordis-tutorial/07-into-the-harness.i18n.yaml +6 -0
  113. package/references/official-docs/docs/cordis-tutorial/07-into-the-harness.md +107 -0
  114. package/references/official-docs/docs/cordis-tutorial/07-into-the-harness.zh.md +107 -0
  115. package/references/official-docs/docs/cordis-tutorial/index.i18n.yaml +6 -0
  116. package/references/official-docs/docs/cordis-tutorial/index.md +60 -0
  117. package/references/official-docs/docs/cordis-tutorial/index.zh.md +62 -0
  118. package/references/official-docs/docs/defensive-patterns.i18n.yaml +6 -0
  119. package/references/official-docs/docs/defensive-patterns.md +33 -0
  120. package/references/official-docs/docs/defensive-patterns.zh.md +33 -0
  121. package/references/official-docs/docs/development.i18n.yaml +6 -0
  122. package/references/official-docs/docs/development.md +171 -0
  123. package/references/official-docs/docs/development.zh.md +171 -0
  124. package/references/official-docs/docs/event-producer-consumer.i18n.yaml +6 -0
  125. package/references/official-docs/docs/event-producer-consumer.md +76 -0
  126. package/references/official-docs/docs/event-producer-consumer.zh.md +78 -0
  127. package/references/official-docs/docs/glossary.i18n.yaml +6 -0
  128. package/references/official-docs/docs/glossary.md +45 -0
  129. package/references/official-docs/docs/glossary.zh.md +45 -0
  130. package/references/official-docs/docs/graph-atlas.i18n.yaml +6 -0
  131. package/references/official-docs/docs/graph-atlas.md +24 -0
  132. package/references/official-docs/docs/graph-atlas.zh.md +26 -0
  133. package/references/official-docs/docs/i18n/README.i18n.yaml +6 -0
  134. package/references/official-docs/docs/i18n/README.md +60 -0
  135. package/references/official-docs/docs/i18n/README.zh.md +60 -0
  136. package/references/official-docs/docs/i18n/style-samples.md +87 -0
  137. package/references/official-docs/docs/i18n/terminology.md +214 -0
  138. package/references/official-docs/docs/i18n/translation-prompt.md +263 -0
  139. package/references/official-docs/docs/i18n/translation-rules.i18n.yaml +6 -0
  140. package/references/official-docs/docs/i18n/translation-rules.md +69 -0
  141. package/references/official-docs/docs/i18n/translation-rules.zh.md +69 -0
  142. package/references/official-docs/docs/module-graph.i18n.yaml +6 -0
  143. package/references/official-docs/docs/module-graph.md +1638 -0
  144. package/references/official-docs/docs/module-graph.zh.md +1640 -0
  145. package/references/official-docs/docs/persistence-catalog.i18n.yaml +6 -0
  146. package/references/official-docs/docs/persistence-catalog.md +944 -0
  147. package/references/official-docs/docs/persistence-catalog.zh.md +946 -0
  148. package/references/official-docs/docs/postmortem/0001-acp-default-export-drops-inject.i18n.yaml +6 -0
  149. package/references/official-docs/docs/postmortem/0001-acp-default-export-drops-inject.md +113 -0
  150. package/references/official-docs/docs/postmortem/0001-acp-default-export-drops-inject.zh.md +113 -0
  151. package/references/official-docs/docs/postmortem/0002-js-expression-disabled-filesystem-tools.i18n.yaml +6 -0
  152. package/references/official-docs/docs/postmortem/0002-js-expression-disabled-filesystem-tools.md +47 -0
  153. package/references/official-docs/docs/postmortem/0002-js-expression-disabled-filesystem-tools.zh.md +47 -0
  154. package/references/official-docs/docs/postmortem/0003-web-agent-gui-feedback-loop.i18n.yaml +6 -0
  155. package/references/official-docs/docs/postmortem/0003-web-agent-gui-feedback-loop.md +53 -0
  156. package/references/official-docs/docs/postmortem/0003-web-agent-gui-feedback-loop.zh.md +53 -0
  157. package/references/official-docs/docs/postmortem/0004-landlock-partial-notice-misclassified-child-failures.i18n.yaml +6 -0
  158. package/references/official-docs/docs/postmortem/0004-landlock-partial-notice-misclassified-child-failures.md +55 -0
  159. package/references/official-docs/docs/postmortem/0004-landlock-partial-notice-misclassified-child-failures.zh.md +55 -0
  160. package/references/official-docs/docs/postmortem/README.i18n.yaml +6 -0
  161. package/references/official-docs/docs/postmortem/README.md +18 -0
  162. package/references/official-docs/docs/postmortem/README.zh.md +18 -0
  163. package/references/official-docs/docs/rescope.i18n.yaml +6 -0
  164. package/references/official-docs/docs/rescope.md +53 -0
  165. package/references/official-docs/docs/rescope.zh.md +53 -0
  166. package/references/official-docs/docs/subsystems/README.i18n.yaml +6 -0
  167. package/references/official-docs/docs/subsystems/README.md +55 -0
  168. package/references/official-docs/docs/subsystems/README.zh.md +55 -0
  169. package/references/official-docs/docs/subsystems/approval.i18n.yaml +6 -0
  170. package/references/official-docs/docs/subsystems/approval.md +170 -0
  171. package/references/official-docs/docs/subsystems/approval.zh.md +170 -0
  172. package/references/official-docs/docs/subsystems/attachment.i18n.yaml +6 -0
  173. package/references/official-docs/docs/subsystems/attachment.md +115 -0
  174. package/references/official-docs/docs/subsystems/attachment.zh.md +115 -0
  175. package/references/official-docs/docs/subsystems/client-modules.i18n.yaml +6 -0
  176. package/references/official-docs/docs/subsystems/client-modules.md +118 -0
  177. package/references/official-docs/docs/subsystems/client-modules.zh.md +118 -0
  178. package/references/official-docs/docs/subsystems/code-runtime.i18n.yaml +6 -0
  179. package/references/official-docs/docs/subsystems/code-runtime.md +191 -0
  180. package/references/official-docs/docs/subsystems/code-runtime.zh.md +191 -0
  181. package/references/official-docs/docs/subsystems/commands.i18n.yaml +6 -0
  182. package/references/official-docs/docs/subsystems/commands.md +187 -0
  183. package/references/official-docs/docs/subsystems/commands.zh.md +187 -0
  184. package/references/official-docs/docs/subsystems/compaction.i18n.yaml +6 -0
  185. package/references/official-docs/docs/subsystems/compaction.md +238 -0
  186. package/references/official-docs/docs/subsystems/compaction.zh.md +238 -0
  187. package/references/official-docs/docs/subsystems/core.i18n.yaml +6 -0
  188. package/references/official-docs/docs/subsystems/core.md +1070 -0
  189. package/references/official-docs/docs/subsystems/core.zh.md +1078 -0
  190. package/references/official-docs/docs/subsystems/credentials.i18n.yaml +6 -0
  191. package/references/official-docs/docs/subsystems/credentials.md +133 -0
  192. package/references/official-docs/docs/subsystems/credentials.zh.md +133 -0
  193. package/references/official-docs/docs/subsystems/extensions.i18n.yaml +6 -0
  194. package/references/official-docs/docs/subsystems/extensions.md +364 -0
  195. package/references/official-docs/docs/subsystems/extensions.zh.md +364 -0
  196. package/references/official-docs/docs/subsystems/feedback.i18n.yaml +6 -0
  197. package/references/official-docs/docs/subsystems/feedback.md +266 -0
  198. package/references/official-docs/docs/subsystems/feedback.zh.md +266 -0
  199. package/references/official-docs/docs/subsystems/filesystem.i18n.yaml +6 -0
  200. package/references/official-docs/docs/subsystems/filesystem.md +495 -0
  201. package/references/official-docs/docs/subsystems/filesystem.zh.md +495 -0
  202. package/references/official-docs/docs/subsystems/goal.i18n.yaml +6 -0
  203. package/references/official-docs/docs/subsystems/goal.md +277 -0
  204. package/references/official-docs/docs/subsystems/goal.zh.md +277 -0
  205. package/references/official-docs/docs/subsystems/invariants.i18n.yaml +6 -0
  206. package/references/official-docs/docs/subsystems/invariants.md +88 -0
  207. package/references/official-docs/docs/subsystems/invariants.zh.md +88 -0
  208. package/references/official-docs/docs/subsystems/jobs.i18n.yaml +6 -0
  209. package/references/official-docs/docs/subsystems/jobs.md +290 -0
  210. package/references/official-docs/docs/subsystems/jobs.zh.md +290 -0
  211. package/references/official-docs/docs/subsystems/llm-streaming.i18n.yaml +6 -0
  212. package/references/official-docs/docs/subsystems/llm-streaming.md +888 -0
  213. package/references/official-docs/docs/subsystems/llm-streaming.zh.md +894 -0
  214. package/references/official-docs/docs/subsystems/lsp.i18n.yaml +6 -0
  215. package/references/official-docs/docs/subsystems/lsp.md +202 -0
  216. package/references/official-docs/docs/subsystems/lsp.zh.md +202 -0
  217. package/references/official-docs/docs/subsystems/permission-presets.i18n.yaml +6 -0
  218. package/references/official-docs/docs/subsystems/permission-presets.md +131 -0
  219. package/references/official-docs/docs/subsystems/permission-presets.zh.md +131 -0
  220. package/references/official-docs/docs/subsystems/persistence.i18n.yaml +6 -0
  221. package/references/official-docs/docs/subsystems/persistence.md +385 -0
  222. package/references/official-docs/docs/subsystems/persistence.zh.md +385 -0
  223. package/references/official-docs/docs/subsystems/plan.i18n.yaml +6 -0
  224. package/references/official-docs/docs/subsystems/plan.md +87 -0
  225. package/references/official-docs/docs/subsystems/plan.zh.md +87 -0
  226. package/references/official-docs/docs/subsystems/sandbox.i18n.yaml +6 -0
  227. package/references/official-docs/docs/subsystems/sandbox.md +218 -0
  228. package/references/official-docs/docs/subsystems/sandbox.zh.md +218 -0
  229. package/references/official-docs/docs/subsystems/schedule.i18n.yaml +6 -0
  230. package/references/official-docs/docs/subsystems/schedule.md +186 -0
  231. package/references/official-docs/docs/subsystems/schedule.zh.md +186 -0
  232. package/references/official-docs/docs/subsystems/scope.i18n.yaml +6 -0
  233. package/references/official-docs/docs/subsystems/scope.md +59 -0
  234. package/references/official-docs/docs/subsystems/scope.zh.md +59 -0
  235. package/references/official-docs/docs/subsystems/session-projection.i18n.yaml +6 -0
  236. package/references/official-docs/docs/subsystems/session-projection.md +262 -0
  237. package/references/official-docs/docs/subsystems/session-projection.zh.md +262 -0
  238. package/references/official-docs/docs/subsystems/session-query.i18n.yaml +6 -0
  239. package/references/official-docs/docs/subsystems/session-query.md +495 -0
  240. package/references/official-docs/docs/subsystems/session-query.zh.md +495 -0
  241. package/references/official-docs/docs/subsystems/session-reference.i18n.yaml +6 -0
  242. package/references/official-docs/docs/subsystems/session-reference.md +108 -0
  243. package/references/official-docs/docs/subsystems/session-reference.zh.md +108 -0
  244. package/references/official-docs/docs/subsystems/session-telemetry.i18n.yaml +6 -0
  245. package/references/official-docs/docs/subsystems/session-telemetry.md +194 -0
  246. package/references/official-docs/docs/subsystems/session-telemetry.zh.md +194 -0
  247. package/references/official-docs/docs/subsystems/session-title.i18n.yaml +6 -0
  248. package/references/official-docs/docs/subsystems/session-title.md +204 -0
  249. package/references/official-docs/docs/subsystems/session-title.zh.md +204 -0
  250. package/references/official-docs/docs/subsystems/session.i18n.yaml +6 -0
  251. package/references/official-docs/docs/subsystems/session.md +849 -0
  252. package/references/official-docs/docs/subsystems/session.zh.md +851 -0
  253. package/references/official-docs/docs/subsystems/settings.i18n.yaml +6 -0
  254. package/references/official-docs/docs/subsystems/settings.md +310 -0
  255. package/references/official-docs/docs/subsystems/settings.zh.md +310 -0
  256. package/references/official-docs/docs/subsystems/shell.i18n.yaml +6 -0
  257. package/references/official-docs/docs/subsystems/shell.md +303 -0
  258. package/references/official-docs/docs/subsystems/shell.zh.md +303 -0
  259. package/references/official-docs/docs/subsystems/skills.i18n.yaml +6 -0
  260. package/references/official-docs/docs/subsystems/skills.md +331 -0
  261. package/references/official-docs/docs/subsystems/skills.zh.md +331 -0
  262. package/references/official-docs/docs/subsystems/spill.i18n.yaml +6 -0
  263. package/references/official-docs/docs/subsystems/spill.md +117 -0
  264. package/references/official-docs/docs/subsystems/spill.zh.md +117 -0
  265. package/references/official-docs/docs/subsystems/storage.i18n.yaml +6 -0
  266. package/references/official-docs/docs/subsystems/storage.md +229 -0
  267. package/references/official-docs/docs/subsystems/storage.zh.md +229 -0
  268. package/references/official-docs/docs/subsystems/subagent.i18n.yaml +6 -0
  269. package/references/official-docs/docs/subsystems/subagent.md +734 -0
  270. package/references/official-docs/docs/subsystems/subagent.zh.md +736 -0
  271. package/references/official-docs/docs/subsystems/subprocess.i18n.yaml +6 -0
  272. package/references/official-docs/docs/subsystems/subprocess.md +324 -0
  273. package/references/official-docs/docs/subsystems/subprocess.zh.md +324 -0
  274. package/references/official-docs/docs/subsystems/system-prompt.i18n.yaml +6 -0
  275. package/references/official-docs/docs/subsystems/system-prompt.md +207 -0
  276. package/references/official-docs/docs/subsystems/system-prompt.zh.md +207 -0
  277. package/references/official-docs/docs/subsystems/terminal.i18n.yaml +6 -0
  278. package/references/official-docs/docs/subsystems/terminal.md +184 -0
  279. package/references/official-docs/docs/subsystems/terminal.zh.md +184 -0
  280. package/references/official-docs/docs/subsystems/token-meter.i18n.yaml +6 -0
  281. package/references/official-docs/docs/subsystems/token-meter.md +90 -0
  282. package/references/official-docs/docs/subsystems/token-meter.zh.md +90 -0
  283. package/references/official-docs/docs/subsystems/tools.i18n.yaml +6 -0
  284. package/references/official-docs/docs/subsystems/tools.md +720 -0
  285. package/references/official-docs/docs/subsystems/tools.zh.md +720 -0
  286. package/references/official-docs/docs/subsystems/typert.i18n.yaml +6 -0
  287. package/references/official-docs/docs/subsystems/typert.md +336 -0
  288. package/references/official-docs/docs/subsystems/typert.zh.md +336 -0
  289. package/references/official-docs/docs/subsystems/user-questions.i18n.yaml +6 -0
  290. package/references/official-docs/docs/subsystems/user-questions.md +178 -0
  291. package/references/official-docs/docs/subsystems/user-questions.zh.md +178 -0
  292. package/references/official-docs/docs/subsystems/web-server.i18n.yaml +6 -0
  293. package/references/official-docs/docs/subsystems/web-server.md +108 -0
  294. package/references/official-docs/docs/subsystems/web-server.zh.md +108 -0
  295. package/references/official-docs/docs/subsystems/web.i18n.yaml +6 -0
  296. package/references/official-docs/docs/subsystems/web.md +199 -0
  297. package/references/official-docs/docs/subsystems/web.zh.md +199 -0
  298. package/references/official-docs/docs/subsystems/workflow.i18n.yaml +6 -0
  299. package/references/official-docs/docs/subsystems/workflow.md +278 -0
  300. package/references/official-docs/docs/subsystems/workflow.zh.md +278 -0
  301. package/references/official-docs/docs/subsystems/workspace.i18n.yaml +6 -0
  302. package/references/official-docs/docs/subsystems/workspace.md +228 -0
  303. package/references/official-docs/docs/subsystems/workspace.zh.md +228 -0
  304. package/references/official-docs/docs/testing.i18n.yaml +6 -0
  305. package/references/official-docs/docs/testing.md +49 -0
  306. package/references/official-docs/docs/testing.zh.md +49 -0
  307. package/references/official-docs/docs/tool-catalog.i18n.yaml +6 -0
  308. package/references/official-docs/docs/tool-catalog.md +1873 -0
  309. package/references/official-docs/docs/tool-catalog.zh.md +1878 -0
  310. package/references/official-docs/docs/tool-execution-pipeline.i18n.yaml +6 -0
  311. package/references/official-docs/docs/tool-execution-pipeline.md +62 -0
  312. package/references/official-docs/docs/tool-execution-pipeline.zh.md +64 -0
  313. package/references/official-docs/docs/user/develop/basic/config.i18n.yaml +6 -0
  314. package/references/official-docs/docs/user/develop/basic/config.md +106 -0
  315. package/references/official-docs/docs/user/develop/basic/config.zh.md +106 -0
  316. package/references/official-docs/docs/user/develop/basic/index.i18n.yaml +6 -0
  317. package/references/official-docs/docs/user/develop/basic/index.md +144 -0
  318. package/references/official-docs/docs/user/develop/basic/index.zh.md +144 -0
  319. package/references/official-docs/docs/user/develop/basic/publish.i18n.yaml +6 -0
  320. package/references/official-docs/docs/user/develop/basic/publish.md +183 -0
  321. package/references/official-docs/docs/user/develop/basic/publish.zh.md +183 -0
  322. package/references/official-docs/docs/user/develop/basic/tool.i18n.yaml +6 -0
  323. package/references/official-docs/docs/user/develop/basic/tool.md +52 -0
  324. package/references/official-docs/docs/user/develop/basic/tool.zh.md +52 -0
  325. package/references/official-docs/docs/user/develop/framework/events.i18n.yaml +6 -0
  326. package/references/official-docs/docs/user/develop/framework/events.md +143 -0
  327. package/references/official-docs/docs/user/develop/framework/events.zh.md +143 -0
  328. package/references/official-docs/docs/user/develop/framework/index.i18n.yaml +6 -0
  329. package/references/official-docs/docs/user/develop/framework/index.md +137 -0
  330. package/references/official-docs/docs/user/develop/framework/index.zh.md +137 -0
  331. package/references/official-docs/docs/user/develop/framework/service.i18n.yaml +6 -0
  332. package/references/official-docs/docs/user/develop/framework/service.md +148 -0
  333. package/references/official-docs/docs/user/develop/framework/service.zh.md +150 -0
  334. package/references/official-docs/docs/user/develop/practice/index.i18n.yaml +6 -0
  335. package/references/official-docs/docs/user/develop/practice/index.md +155 -0
  336. package/references/official-docs/docs/user/develop/practice/index.zh.md +155 -0
  337. package/references/official-docs/docs/user/develop/practice/llm-adapter.i18n.yaml +6 -0
  338. package/references/official-docs/docs/user/develop/practice/llm-adapter.md +188 -0
  339. package/references/official-docs/docs/user/develop/practice/llm-adapter.zh.md +188 -0
  340. package/references/official-docs/docs/user/guide/index.i18n.yaml +6 -0
  341. package/references/official-docs/docs/user/guide/index.md +30 -0
  342. package/references/official-docs/docs/user/guide/index.zh.md +30 -0
  343. package/references/official-docs/docs/user/guide/providers-custom-form.png +0 -0
  344. package/references/official-docs/docs/user/guide/providers-custom-form.zh.png +0 -0
  345. package/references/official-docs/docs/user/guide/providers-models-page.png +0 -0
  346. package/references/official-docs/docs/user/guide/providers-models-page.zh.png +0 -0
  347. package/references/official-docs/docs/user/guide/providers.i18n.yaml +6 -0
  348. package/references/official-docs/docs/user/guide/providers.md +98 -0
  349. package/references/official-docs/docs/user/guide/providers.zh.md +98 -0
  350. package/references/official-docs/docs/user/guide/python-sdk.i18n.yaml +6 -0
  351. package/references/official-docs/docs/user/guide/python-sdk.md +104 -0
  352. package/references/official-docs/docs/user/guide/python-sdk.zh.md +104 -0
  353. package/references/official-docs/docs/user/index.i18n.yaml +6 -0
  354. package/references/official-docs/docs/user/index.md +11 -0
  355. package/references/official-docs/docs/user/index.zh.md +11 -0
  356. package/references/official-docs/docs/web-styling.i18n.yaml +6 -0
  357. package/references/official-docs/docs/web-styling.md +25 -0
  358. package/references/official-docs/docs/web-styling.zh.md +25 -0
  359. package/references/official-docs/examples/AGENTS.md +20 -0
  360. package/references/official-docs/packages/AGENTS.md +27 -0
  361. package/references/official-docs/packages/README.md +69 -0
  362. package/references/official-docs/vendor/README.md +60 -0
  363. package/references/official-docs/website-docs.ts +524 -0
  364. package/references/sources.md +137 -0
  365. package/references/upstream-cordis.md +594 -0
  366. package/references/website-pages.md +668 -0
  367. package/scripts/archive-discussions.ps1 +154 -0
  368. package/scripts/download-community-articles.ps1 +188 -0
  369. package/scripts/download-community-repos.ps1 +232 -0
  370. package/scripts/download-sources.ps1 +195 -0
  371. package/scripts/gen-topic-snapshot.ps1 +91 -0
  372. package/scripts/install-skill.ps1 +63 -0
  373. package/scripts/sync-official-docs.ps1 +130 -0
  374. package/scripts/verify-kit.ps1 +191 -0
@@ -0,0 +1,366 @@
1
+ <!-- 英文源文件由 scripts/gen-cordis-catalog.ts 生成;本中文文件是通过双语配对维护的经评审对侧。
2
+ 更新时先运行 `pnpm run gen-cordis-catalog` 更新英文,再更新本文件并运行 `pnpm run verify-translation-pairing --write docs/cordis-api/context.md` 重新记录配对。 -->
3
+
4
+ # 上下文
5
+
6
+ [English](context.md) | 中文
7
+
8
+ 上下文是 Cordis 的核心对象:所有服务、事件和生命周期 API 都通过 `ctx` 访问。事件方法见[事件](events.md),副作用与当前 fiber 见 [Fiber](fiber.md),插件加载见[注册表](registry.md)。
9
+
10
+ Cordis 插件的根依赖容器和子依赖容器。
11
+
12
+ 上下文是一个代理:普通属性读取通过服务解析器进行,而 `extend()`、`isolate()` 和 `intercept()` 会创建有作用域的子上下文,且不修改其父上下文。
13
+
14
+ [源码](../../vendor/cordis/src/context.ts#L42)
15
+
16
+ ### ctx.extend(meta?)
17
+
18
+ ```ts cordis-catalog
19
+ /**
20
+ * Create a child context with extra metadata on top of the current scope.
21
+ *
22
+ * The child prototypally inherits every property of this context; own
23
+ * properties of `meta` shadow the inherited ones. The parent is not mutated.
24
+ *
25
+ * @param meta — own properties (including symbol keys) to define on the child.
26
+ * @returns a child context inheriting from this one.
27
+ */
28
+ extend(meta = {}): this
29
+ ```
30
+
31
+ 在当前作用域之上创建一个带有额外元数据的子上下文。
32
+
33
+ 子上下文通过原型继承当前上下文的所有属性;`meta` 的自有属性会遮蔽继承的同名属性。父上下文不会被修改。
34
+
35
+ - `meta`:要在子上下文上定义的自有属性,包括以 symbol 为键的属性。
36
+
37
+ **返回**继承自当前上下文的子上下文。
38
+
39
+ [源码](../../vendor/cordis/src/context.ts#L99)
40
+
41
+ ### ctx.isolate(name, label?)
42
+
43
+ ```ts cordis-catalog
44
+ /**
45
+ * Create a child context with an independent service scope for `name`.
46
+ *
47
+ * Below the returned context, reads and writes of the service `name`
48
+ * resolve against the new label instead of the parent's, so a different
49
+ * implementation can be provided without affecting the parent scope.
50
+ * Passing the same `label` to two `isolate()` calls joins their scopes.
51
+ *
52
+ * @param name — the service name to isolate.
53
+ * @param label — scope label to join; defaults to a fresh unique symbol.
54
+ * @returns a child context whose `name` service resolves in the new scope.
55
+ */
56
+ isolate(name: string, label?: symbol)
57
+ ```
58
+
59
+ 创建一个子上下文,使 `name` 拥有独立的服务作用域。
60
+
61
+ 在返回的上下文之下,对服务 `name` 的读写会根据新标签解析,而不再根据父上下文的标签解析,因此可以提供不同的实现而不影响父作用域。将同一个 `label` 传给两次 `isolate()` 调用,可使二者加入同一作用域。
62
+
63
+ - `name`:要隔离的服务名称。
64
+ - `label`:要加入的作用域标签;默认为一个新建的唯一 symbol。
65
+
66
+ **返回**一个子上下文,其 `name` 服务在新作用域中解析。
67
+
68
+ [源码](../../vendor/cordis/src/context.ts#L121)
69
+
70
+ ### ctx.intercept(name, config)
71
+
72
+ ```ts cordis-catalog
73
+ /**
74
+ * Add service-specific intercept config for plugins started below this
75
+ * context.
76
+ *
77
+ * Plugins loaded under the returned context see `config` merged into the
78
+ * service's resolved config (ancestor entries first; see
79
+ * `Service[symbols.resolveConfig]`). The parent context is not affected.
80
+ *
81
+ * @param name — the service name whose config to intercept.
82
+ * @param config — the intercept config to merge for that service.
83
+ * @returns a child context carrying the additional intercept entry.
84
+ */
85
+ intercept<K extends InjectKey>(name: K, config: Context[K] extends { [symbols.config]: infer T } ? T : never): this
86
+ intercept(name: string, config: any): this
87
+ ```
88
+
89
+ 为在此上下文之下启动的插件添加服务专属的拦截配置。
90
+
91
+ 在返回的上下文下加载的插件会看到 `config` 已合并到服务解析后的配置中(祖先条目在前;见 `Service[symbols.resolveConfig]`)。父上下文不受影响。
92
+
93
+ - `name`:要拦截其配置的服务名称。
94
+ - `config`:要为该服务合并的拦截配置。
95
+
96
+ **返回**一个携带额外拦截条目的子上下文。
97
+
98
+ [源码](../../vendor/cordis/src/context.ts#L139)
99
+
100
+ ### ctx.root
101
+
102
+ ```ts cordis-catalog
103
+ /** The root context of the application (every child context shares it). @experimental */
104
+ root: this
105
+ ```
106
+
107
+ 应用的根上下文,所有子上下文均共享它。@experimental
108
+
109
+ [源码](../../vendor/cordis/src/context.ts#L22)
110
+
111
+ ### ctx.baseUrl
112
+
113
+ ```ts cordis-catalog
114
+ /** Base URL used to resolve relative plugin/module specifiers, if the runtime sets one. */
115
+ baseUrl?: string
116
+ ```
117
+
118
+ 用于解析相对插件/模块说明符的基础 URL,前提是运行时设置了该值。
119
+
120
+ [源码](../../vendor/cordis/src/context.ts#L24)
121
+
122
+ ### ctx.events
123
+
124
+ ```ts cordis-catalog
125
+ /** The event bus. Its methods are also mixed onto `ctx` (`ctx.on`, `ctx.emit`, ...). */
126
+ events: EventsService
127
+ ```
128
+
129
+ 事件总线。它的方法也会混入 `ctx`(`ctx.on`、`ctx.emit` 等)。
130
+
131
+ [源码](../../vendor/cordis/src/context.ts#L26)
132
+
133
+ ### ctx.logger
134
+
135
+ ```ts cordis-catalog
136
+ /** The logging service. Call `ctx.logger(name)` for a named logger. */
137
+ logger: LoggerService
138
+ ```
139
+
140
+ 日志服务。调用 `ctx.logger(name)` 可获取具名 logger。
141
+
142
+ [源码](../../vendor/cordis/src/context.ts#L28)
143
+
144
+ ### ctx.reflect
145
+
146
+ ```ts cordis-catalog
147
+ /** The reflection layer backing the context proxy (`ctx.get`, `ctx.provide`, ...). */
148
+ reflect: ReflectService
149
+ ```
150
+
151
+ 为上下文代理提供支持的反射层(`ctx.get`、`ctx.provide` 等)。
152
+
153
+ [源码](../../vendor/cordis/src/context.ts#L30)
154
+
155
+ ### ctx.registry
156
+
157
+ ```ts cordis-catalog
158
+ /** The plugin registry. Its methods are mixed onto `ctx` (`ctx.plugin`, `ctx.inject`). */
159
+ registry: RegistryService
160
+ ```
161
+
162
+ 插件注册表。它的方法会混入 `ctx`(`ctx.plugin`、`ctx.inject`)。
163
+
164
+ [源码](../../vendor/cordis/src/context.ts#L32)
165
+
166
+ ## 静态成员
167
+
168
+ ### Context.effect
169
+
170
+ ```ts cordis-catalog
171
+ /** Symbol key under which a disposer exposes its {@link EffectMeta} diagnostics tree. */
172
+ static readonly effect: unique symbol
173
+ ```
174
+
175
+ 资源释放函数用于公开其 EffectMeta 诊断树的 symbol 键。
176
+
177
+ [源码](../../vendor/cordis/src/context.ts#L44)
178
+
179
+ ### Context.filter
180
+
181
+ ```ts cordis-catalog
182
+ /** Symbol key for a context's listener filter, consulted on every event dispatch. */
183
+ static readonly filter: unique symbol
184
+ ```
185
+
186
+ 上下文监听器过滤器的 symbol 键,每次分派事件时都会查询该过滤器。
187
+
188
+ [源码](../../vendor/cordis/src/context.ts#L46)
189
+
190
+ ### Context.isolate
191
+
192
+ ```ts cordis-catalog
193
+ /** Symbol key of the isolation map (see the `Context[symbols.isolate]` property). */
194
+ static readonly isolate: unique symbol
195
+ ```
196
+
197
+ 隔离映射的 symbol 键(见 `Context[symbols.isolate]` 属性)。
198
+
199
+ [源码](../../vendor/cordis/src/context.ts#L48)
200
+
201
+ ### Context.intercept
202
+
203
+ ```ts cordis-catalog
204
+ /** Symbol key of the intercept map (see the `Context[symbols.intercept]` property). */
205
+ static readonly intercept: unique symbol
206
+ ```
207
+
208
+ 拦截映射的 symbol 键(见 `Context[symbols.intercept]` 属性)。
209
+
210
+ [源码](../../vendor/cordis/src/context.ts#L50)
211
+
212
+ ### Context.is(value)
213
+
214
+ ```ts cordis-catalog
215
+ /**
216
+ * Returns true for Cordis context proxies and context prototypes.
217
+ *
218
+ * Works across realms and across multiple copies of cordis, because the
219
+ * brand is keyed by a global symbol rather than by `instanceof`.
220
+ *
221
+ * @param value — the value to test.
222
+ * @returns `true` if `value` is a Cordis context, narrowing its type.
223
+ */
224
+ static is(value: any): value is Context
225
+ ```
226
+
227
+ 对于 Cordis 上下文代理和上下文原型,返回 true。
228
+
229
+ 此方法可跨 realm 和多个 cordis 副本工作,因为其品牌标识以全局 symbol 为键,而不是通过 `instanceof` 判断。
230
+
231
+ - `value`:要测试的值。
232
+
233
+ **返回** `true` 时,`value` 是 Cordis 上下文,并会收窄其类型。
234
+
235
+ [源码](../../vendor/cordis/src/context.ts#L61)
236
+
237
+ ## 服务存储与混入
238
+
239
+ ### ctx.get(name, strict?)
240
+
241
+ ```ts cordis-catalog
242
+ /**
243
+ * Read a service from the store without the inject requirement.
244
+ *
245
+ * @param name — the service name.
246
+ * @param strict — when `true` (default), only return implementations
247
+ * whose providing fiber is currently active.
248
+ * @returns the service value, or `undefined` when not (yet) provided.
249
+ */
250
+ get<K extends string & keyof this>(name: K, strict?: boolean): undefined | this[K]
251
+ get(name: string, strict?: boolean): any
252
+ ```
253
+
254
+ 从存储中读取服务,无需满足注入要求。
255
+
256
+ - `name`:服务名称。
257
+ - `strict`:设为 `true`(默认值)时,仅返回其提供方 fiber 当前处于活动状态的实现。
258
+
259
+ **返回**服务值;如果尚未提供,则返回 `undefined`。
260
+
261
+ [源码](../../vendor/cordis/src/reflect.ts#L17)
262
+
263
+ ### ctx.set(name, value)
264
+
265
+ ```ts cordis-catalog
266
+ /**
267
+ * Overwrite a provided service's value.
268
+ *
269
+ * Only the fiber that provided the service may set it; setting an
270
+ * unprovided name throws.
271
+ *
272
+ * @param name — the service name.
273
+ * @param value — the new service value.
274
+ */
275
+ set<K extends string & keyof this>(name: K, value: undefined | this[K]): void
276
+ set(name: string, value: any): void
277
+ ```
278
+
279
+ 覆盖已提供服务的值。
280
+
281
+ 只有提供该服务的 fiber 才能设置它;设置尚未提供的名称会抛出异常。
282
+
283
+ - `name`:服务名称。
284
+ - `value`:新的服务值。
285
+
286
+ [源码](../../vendor/cordis/src/reflect.ts#L29)
287
+
288
+ ### ctx.provide(name, value)
289
+
290
+ ```ts cordis-catalog
291
+ /**
292
+ * Register a service implementation owned by the current fiber.
293
+ *
294
+ * The service becomes visible to dependents in the same isolation scope
295
+ * once the fiber is active; it is unregistered (waking dependents) when
296
+ * the returned disposer runs or the fiber unloads. Throws if the name is
297
+ * already provided in this scope or declared as an accessor.
298
+ *
299
+ * @param name — the service name.
300
+ * @param value — the service value.
301
+ * @returns a disposer that unregisters the service.
302
+ */
303
+ provide<K extends string & keyof this>(name: K, value: undefined | this[K]): () => void
304
+ provide(name: string, value?: any): () => void
305
+ ```
306
+
307
+ 注册一个归当前 fiber 所有的服务实现。
308
+
309
+ fiber 激活后,该服务对同一隔离作用域内的依赖方可见;当返回的资源释放函数运行或 fiber 卸载时,该服务会被取消注册,并唤醒依赖方。如果该名称已在此作用域中被提供,或已声明为访问器,则抛出异常。
310
+
311
+ - `name`:服务名称。
312
+ - `value`:服务值。
313
+
314
+ **返回**一个用于取消注册该服务的资源释放函数。
315
+
316
+ [源码](../../vendor/cordis/src/reflect.ts#L44)
317
+
318
+ ### ctx.accessor(name, options)
319
+
320
+ ```ts cordis-catalog
321
+ /**
322
+ * Define a computed context property backed by get/set hooks.
323
+ *
324
+ * The accessor is removed when the current fiber unloads. Throws if the
325
+ * name is already declared.
326
+ *
327
+ * @param name — the context property name.
328
+ * @param options — the `get` hook and optional `set` hook.
329
+ */
330
+ accessor(name: string, options: Omit<Property.Accessor, 'type'>): void
331
+ ```
332
+
333
+ 定义一个由 get/set 钩子支持的计算型上下文属性。
334
+
335
+ 当前 fiber 卸载时会移除该访问器。如果该名称已被声明,则抛出异常。
336
+
337
+ - `name`:上下文属性名称。
338
+ - `options`:`get` 钩子和可选的 `set` 钩子。
339
+
340
+ [源码](../../vendor/cordis/src/reflect.ts#L56)
341
+
342
+ ### ctx.mixin(name, mixins)
343
+
344
+ ```ts cordis-catalog
345
+ /**
346
+ * Expose selected members of a service directly on `ctx`.
347
+ *
348
+ * Each mixed-in key becomes an accessor that forwards to the service
349
+ * (binding methods to it), so e.g. `ctx.on` forwards to `ctx.events.on`.
350
+ * Mixins are removed when the current fiber unloads.
351
+ *
352
+ * @param name — the context property holding the source service.
353
+ * @param mixins — keys to forward, or a source-key → ctx-key map.
354
+ */
355
+ mixin<K extends string & keyof this>(name: K, mixins: (keyof this & keyof this[K])[] | Dict<string>): void
356
+ mixin<T extends {}>(source: T, mixins: (keyof this & keyof T)[] | Dict<string>): void
357
+ ```
358
+
359
+ 直接在 `ctx` 上公开服务的指定成员。
360
+
361
+ 每个混入的键都会成为一个转发到该服务的访问器,并将方法绑定到该服务。例如,`ctx.on` 会转发到 `ctx.events.on`。当前 fiber 卸载时会移除这些混入。
362
+
363
+ - `name`:存放源服务的上下文属性。
364
+ - `mixins`:要转发的键,或从源键到 ctx 键的映射。
365
+
366
+ [源码](../../vendor/cordis/src/reflect.ts#L67)
@@ -0,0 +1,6 @@
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:
4
+ # pnpm run verify-translation-pairing --write docs/cordis-api/events.md
5
+ events.md: 8b8eb2358e10a250f581aecc725ba32360d338d3
6
+ events.zh.md: 366f78fbe5d9bb5ff6f95c79c307237aaa97967a
@@ -0,0 +1,207 @@
1
+ <!-- Generated by scripts/gen-cordis-catalog.ts — do not edit by hand.
2
+ Run `pnpm run gen-cordis-catalog` to regenerate. -->
3
+
4
+ # Events
5
+
6
+ The event-dispatch API mixed into every context. Harness event declarations and their dispatch modes are generated into each owning [subsystem page](../subsystems/core.md).
7
+
8
+ ### ctx.parallel(name, ...args)
9
+
10
+ ```ts cordis-catalog
11
+ /**
12
+ * Dispatch an event, running all listeners concurrently.
13
+ *
14
+ * @param name — the event name.
15
+ * @param args — arguments passed to every listener.
16
+ * @returns a promise resolving once every listener has settled.
17
+ */
18
+ parallel<K extends keyof Events>(name: K, ...args: Parameters<Events[K]>): Promise<void>
19
+ parallel<K extends keyof Events>(thisArg: NoInfer<ThisType<Events[K]>>, name: K, ...args: Parameters<Events[K]>): Promise<void>
20
+ ```
21
+
22
+ Dispatch an event, running all listeners concurrently.
23
+
24
+ - `name` — the event name.
25
+ - `args` — arguments passed to every listener.
26
+
27
+ **Returns** a promise resolving once every listener has settled.
28
+
29
+ [Source](../../vendor/cordis/src/events.ts#L44)
30
+
31
+ ### ctx.emit(name, ...args)
32
+
33
+ ```ts cordis-catalog
34
+ /**
35
+ * Dispatch an event synchronously, ignoring listener return values.
36
+ *
37
+ * @param name — the event name.
38
+ * @param args — arguments passed to every listener.
39
+ */
40
+ emit<K extends keyof Events>(name: K, ...args: Parameters<Events[K]>): void
41
+ emit<K extends keyof Events>(thisArg: NoInfer<ThisType<Events[K]>>, name: K, ...args: Parameters<Events[K]>): void
42
+ ```
43
+
44
+ Dispatch an event synchronously, ignoring listener return values.
45
+
46
+ - `name` — the event name.
47
+ - `args` — arguments passed to every listener.
48
+
49
+ [Source](../../vendor/cordis/src/events.ts#L53)
50
+
51
+ ### ctx.serial(name, ...args)
52
+
53
+ ```ts cordis-catalog
54
+ /**
55
+ * Dispatch an event, awaiting listeners in order until one bails.
56
+ *
57
+ * @param name — the event name.
58
+ * @param args — arguments passed to each listener.
59
+ * @returns the first bail value (non-null, non-false, non-undefined), if any.
60
+ */
61
+ serial<K extends keyof Events>(name: K, ...args: Parameters<Events[K]>): Promisify<ReturnType<Events[K]>>
62
+ serial<K extends keyof Events>(thisArg: NoInfer<ThisType<Events[K]>>, name: K, ...args: Parameters<Events[K]>): Promisify<ReturnType<Events[K]>>
63
+ ```
64
+
65
+ Dispatch an event, awaiting listeners in order until one bails.
66
+
67
+ - `name` — the event name.
68
+ - `args` — arguments passed to each listener.
69
+
70
+ **Returns** the first bail value (non-null, non-false, non-undefined), if any.
71
+
72
+ [Source](../../vendor/cordis/src/events.ts#L63)
73
+
74
+ ### ctx.bail(name, ...args)
75
+
76
+ ```ts cordis-catalog
77
+ /**
78
+ * Dispatch an event, calling listeners in order until one bails.
79
+ *
80
+ * @param name — the event name.
81
+ * @param args — arguments passed to each listener.
82
+ * @returns the first bail value (non-null, non-false, non-undefined), if any.
83
+ */
84
+ bail<K extends keyof Events>(name: K, ...args: Parameters<Events[K]>): ReturnType<Events[K]>
85
+ bail<K extends keyof Events>(thisArg: NoInfer<ThisType<Events[K]>>, name: K, ...args: Parameters<Events[K]>): ReturnType<Events[K]>
86
+ ```
87
+
88
+ Dispatch an event, calling listeners in order until one bails.
89
+
90
+ - `name` — the event name.
91
+ - `args` — arguments passed to each listener.
92
+
93
+ **Returns** the first bail value (non-null, non-false, non-undefined), if any.
94
+
95
+ [Source](../../vendor/cordis/src/events.ts#L73)
96
+
97
+ ### ctx.waterfall(name, ...args)
98
+
99
+ ```ts cordis-catalog
100
+ /**
101
+ * Dispatch an event whose last argument is a `next` continuation.
102
+ *
103
+ * Each listener wraps the rest of the chain: calling `next()` invokes the
104
+ * next listener (finally the built-in behavior); not calling it vetoes.
105
+ *
106
+ * @param name — the event name.
107
+ * @param args — listener arguments; the final one is the innermost `next`.
108
+ * @returns the outermost listener's return value.
109
+ */
110
+ waterfall<K extends keyof Events>(name: K, ...args: Parameters<Events[K]>): ReturnType<Events[K]>
111
+ waterfall<K extends keyof Events>(thisArg: NoInfer<ThisType<Events[K]>>, name: K, ...args: Parameters<Events[K]>): ReturnType<Events[K]>
112
+ ```
113
+
114
+ Dispatch an event whose last argument is a `next` continuation.
115
+
116
+ Each listener wraps the rest of the chain: calling `next()` invokes the next listener (finally the built-in behavior); not calling it vetoes.
117
+
118
+ - `name` — the event name.
119
+ - `args` — listener arguments; the final one is the innermost `next`.
120
+
121
+ **Returns** the outermost listener's return value.
122
+
123
+ [Source](../../vendor/cordis/src/events.ts#L86)
124
+
125
+ ### ctx.on(name, listener, options?)
126
+
127
+ ```ts cordis-catalog
128
+ /**
129
+ * Register an event listener owned by the current fiber.
130
+ *
131
+ * @param name — the event name to listen for.
132
+ * @param listener — called with the dispatch arguments.
133
+ * @param options — listener options; a boolean is shorthand for `prepend`.
134
+ * @returns a disposer removing the listener; `true` if it was still registered.
135
+ */
136
+ on<K extends keyof Events>(name: K, listener: Events[K], options?: boolean | EventOptions): () => boolean
137
+ ```
138
+
139
+ Register an event listener owned by the current fiber.
140
+
141
+ - `name` — the event name to listen for.
142
+ - `listener` — called with the dispatch arguments.
143
+ - `options` — listener options; a boolean is shorthand for `prepend`.
144
+
145
+ **Returns** a disposer removing the listener; `true` if it was still registered.
146
+
147
+ [Source](../../vendor/cordis/src/events.ts#L97)
148
+
149
+ ### ctx.once(name, listener, options?)
150
+
151
+ ```ts cordis-catalog
152
+ /**
153
+ * Same as `on()`, but the listener disposes itself after its first call.
154
+ *
155
+ * @param name — the event name to listen for.
156
+ * @param listener — called at most once with the dispatch arguments.
157
+ * @param options — listener options; a boolean is shorthand for `prepend`.
158
+ * @returns a disposer removing the listener; `true` if it was still registered.
159
+ */
160
+ once<K extends keyof Events>(name: K, listener: Events[K], options?: boolean | EventOptions): () => boolean
161
+ ```
162
+
163
+ Same as `on()`, but the listener disposes itself after its first call.
164
+
165
+ - `name` — the event name to listen for.
166
+ - `listener` — called at most once with the dispatch arguments.
167
+ - `options` — listener options; a boolean is shorthand for `prepend`.
168
+
169
+ **Returns** a disposer removing the listener; `true` if it was still registered.
170
+
171
+ [Source](../../vendor/cordis/src/events.ts#L106)
172
+
173
+ ## EventOptions
174
+
175
+ Options accepted by `ctx.on()` and `ctx.once()`.
176
+
177
+ ```ts cordis-catalog
178
+ /** Options accepted by `ctx.on()` and `ctx.once()`. */
179
+ interface EventOptions {
180
+ /** Add the listener before existing listeners for the same event. */
181
+ prepend?: boolean
182
+ /** Receive the event regardless of context filter checks. */
183
+ global?: boolean
184
+ }
185
+ ```
186
+
187
+ [Source](../../vendor/cordis/src/events.ts#L112)
188
+
189
+ ## DispatchMode
190
+
191
+ Event dispatch strategy used by the event service.
192
+
193
+ `emit` runs synchronous listeners without awaiting them, `parallel` awaits all listeners together, `serial` awaits them in order until one bails, `bail` stops on the first synchronous bail value, and `waterfall` composes listeners around a final `next` callback.
194
+
195
+ ```ts cordis-catalog
196
+ /**
197
+ * Event dispatch strategy used by the event service.
198
+ *
199
+ * `emit` runs synchronous listeners without awaiting them, `parallel` awaits
200
+ * all listeners together, `serial` awaits them in order until one bails,
201
+ * `bail` stops on the first synchronous bail value, and `waterfall` composes
202
+ * listeners around a final `next` callback.
203
+ */
204
+ type DispatchMode = 'emit' | 'parallel' | 'serial' | 'bail' | 'waterfall'
205
+ ```
206
+
207
+ [Source](../../vendor/cordis/src/events.ts#L32)