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,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/subsystems/typert.md
5
+ typert.md: 863ab9821bbf3681ae43df817cc04018e275390c
6
+ typert.zh.md: 4883b4be51a09d8e63001284e42bd7e60497bf1d
@@ -0,0 +1,336 @@
1
+ # Typert remote calls
2
+
3
+ English | [中文](typert.zh.md)
4
+
5
+ Types shared by generated Remote artifacts, the Host Gateway, and consumer API assemblies. The [Typert Gateway Agent Note](../../.agents/notes/implemented/architecture/2026-08-02-typert-remote-method-calls.md) owns the architecture and transport decisions; this page records the literal public contracts from [`dsh-typert-protocol`](../../packages/typert/protocol/src/types.ts) and [`dsh-api-gateway`](../../packages/api/gateway/src/types.ts).
6
+
7
+ ## Lookup and Context declarations
8
+
9
+ Business-object packages extend two empty maps through declaration merging. A lookup associates one Host object type with its wire identity; a Context declaration associates one scoped Context kind with its wire identity. Generated descriptors name these keys, while runtime providers supply the live resolution behavior.
10
+
11
+ ```ts type-equiv
12
+ /** Merge-extensible Host object lookup declarations. */
13
+ interface TypertLookupMap {}
14
+ ```
15
+
16
+ ```ts type-equiv
17
+ /** Merge-extensible scoped Context declarations. */
18
+ interface TypertContextMap {}
19
+ ```
20
+
21
+ The registry retains a lookup's wire declaration after its resolver unloads. SRC discovery therefore continues to classify the parameter as a lookup and fails unavailable instead of accepting the wire value as an ordinary business object.
22
+
23
+ ```ts type-equiv
24
+ /** Stable wire declaration retained after a lookup provider unloads. */
25
+ interface TypertLookupDefinition {
26
+ /** Merge-declared lookup key. */
27
+ readonly key: string
28
+ /** Source parameter name recognized by the SRC weak parser. */
29
+ readonly parameter: string
30
+ /** Wire field replacing the Host object parameter. */
31
+ readonly wire: string
32
+ /** Canonical Host type symbol used by strict generation. */
33
+ readonly hostTypeSymbol: string
34
+ /** Canonical wire type symbol used by strict generation. */
35
+ readonly wireTypeSymbol: string
36
+ }
37
+ ```
38
+
39
+ ## Invocation descriptors
40
+
41
+ An `InvocationDescriptor` is local reflection, not a wire message. Host and consumer builds generate corresponding descriptors; the request sends only the endpoint and named `args`. Strict codecs carry generated schemas, while SRC codecs enforce JSON-safe values without structural type recovery. Cancellation is an out-of-band carrier signal injected after business parameters and never enters `args`.
42
+
43
+ ```ts type-equiv
44
+ /** Codec attached to one invocation parameter or result. */
45
+ type TypertCodec =
46
+ | {
47
+ readonly mode: 'strict'
48
+ readonly typeSymbol: string
49
+ readonly schema: TypertSchema
50
+ }
51
+ | {
52
+ readonly mode: 'src-json'
53
+ }
54
+ ```
55
+
56
+ ```ts type-equiv
57
+ /** One ordered business parameter in a Remote invocation. */
58
+ interface InvocationParameterDescriptor {
59
+ /** Source-level parameter name. */
60
+ readonly name: string
61
+ /** Required key in the wire `args` object. */
62
+ readonly wire: string
63
+ /** Whether the value is JSON or requires a registered Host lookup. */
64
+ readonly source: 'json' | 'lookup'
65
+ /** Lookup key when `source` is `lookup`. */
66
+ readonly lookup?: string
67
+ /** Boundary codec for the wire representation. */
68
+ readonly codec: TypertCodec
69
+ /** Missing wire fields decode to `undefined` only for an explicitly declared `T | undefined`. */
70
+ readonly acceptsUndefined?: true
71
+ }
72
+ ```
73
+
74
+ ```ts type-equiv
75
+ /** Carrier-independent description of one exported method invocation. */
76
+ interface InvocationDescriptor {
77
+ /** Globally stable generated identity. */
78
+ readonly id: string
79
+ /** Cordis service key owning the method. */
80
+ readonly service: string
81
+ /** Wire namespace, defaulting to the service key. */
82
+ readonly namespace: string
83
+ /** Public instance method name. */
84
+ readonly method: string
85
+ /** Service member invoked when the exported method name is an alias. */
86
+ readonly implementation?: string
87
+ /** Receiver selection mode. */
88
+ readonly invocation:
89
+ | { readonly kind: 'direct' }
90
+ | {
91
+ readonly kind: 'context'
92
+ readonly context: string
93
+ readonly wire: string
94
+ readonly codec: TypertCodec
95
+ }
96
+ /** Optional consuming-Context projection for one direct lookup parameter. */
97
+ readonly scope?: {
98
+ /** Context kind whose Client binder supplies the identity. */
99
+ readonly context: string
100
+ /** Lookup parameter wire field replaced by the Context identity. */
101
+ readonly wire: string
102
+ }
103
+ /** Ordered business parameters. */
104
+ readonly parameters: readonly InvocationParameterDescriptor[]
105
+ /** Transport cancellation injected after business parameters instead of entering wire args. */
106
+ readonly cancellation?: {
107
+ /** Reserved final Host method parameter. */
108
+ readonly parameter: 'signal'
109
+ }
110
+ /** Codec for the resolved method result. */
111
+ readonly result: TypertCodec
112
+ /** Source declaration used only for diagnostics. */
113
+ readonly sourceLocation?: InvocationSourceLocation
114
+ }
115
+ ```
116
+
117
+ ## Typert registry
118
+
119
+ `ctx.typert` separates current-environment descriptors, explicitly selected Remote contributions, lookup providers, and scoped Context providers. A lookup provider owns the stable wire declaration and default resolver; Host composition can configure an effect-scoped synchronous or asynchronous resolver for the same key, and unloading that configuration restores the default policy. Registrations are Cordis-owned effects and return awaitable disposers.
120
+
121
+ ```ts type-equiv
122
+ /** Minimal Typert runtime consumed through dependency inversion. */
123
+ interface TypertRegistryContract {
124
+ readonly local: TypertLocalRegistry
125
+ readonly remotes: TypertRemoteRegistry
126
+ readonly lookups: TypertLookupRegistry
127
+ readonly contexts: TypertContextRegistry
128
+ }
129
+ ```
130
+
131
+ Generated consumer declarations merge direct namespaces into the map inherited by `TypertClientRemote`.
132
+
133
+ ```ts type-equiv
134
+ /** Merge-extensible direct namespace surface generated for Client Remote services. */
135
+ interface TypertRemoteNamespaceMap {}
136
+ ```
137
+
138
+ ## Host Gateway
139
+
140
+ Connection decodes its carrier envelope before calling `ctx.typertGateway`. The request carries exact named wire fields and the carrier's cancellation signal separately; infrastructure and boundary failures use the Gateway's in-process error taxonomy, ordinary exceptions are folded by the RPC adapter into the transport's `internal` error code, and existing RPC errors carried by lookup policy through `TypertLookupFailure` are returned unchanged.
141
+
142
+ ```ts type-equiv
143
+ /** One Remote method request after a carrier has decoded its envelope. */
144
+ interface InvokeRemoteRequest {
145
+ /** Remote namespace selected by the generated descriptor. */
146
+ readonly namespace: string
147
+ /** Exported Service method name. */
148
+ readonly method: string
149
+ /** Named wire values; fields must exactly match the descriptor. */
150
+ readonly args: Readonly<Record<string, unknown>>
151
+ /** Carrier or direct-caller cancellation injected only into cancellation-aware methods. */
152
+ readonly signal?: AbortSignal
153
+ }
154
+ ```
155
+
156
+ ```ts type-equiv
157
+ /** Stable infrastructure and boundary failures emitted before or after business execution. */
158
+ type TypertGatewayErrorCode =
159
+ | 'ambiguous-endpoint'
160
+ | 'arguments-invalid'
161
+ | 'binding-invalid'
162
+ | 'context-failed'
163
+ | 'context-not-found'
164
+ | 'context-unavailable'
165
+ | 'definition-unavailable'
166
+ | 'input-invalid'
167
+ | 'invocation-unavailable'
168
+ | 'lookup-failed'
169
+ | 'lookup-not-found'
170
+ | 'lookup-unavailable'
171
+ | 'method-unavailable'
172
+ | 'provider-mismatch'
173
+ | 'result-invalid'
174
+ | 'service-unavailable'
175
+ | 'signature-invalid'
176
+ ```
177
+
178
+ ```ts type-equiv
179
+ /** Host dispatcher consumed by Connection adapters. */
180
+ interface TypertGateway {
181
+ /**
182
+ * Invoke one live Remote method without assuming a carrier or response envelope.
183
+ * @param request - decoded endpoint and named wire arguments.
184
+ * @returns the validated business result.
185
+ * @throws {@link TypertGatewayError} for dispatch, provider, or boundary failures; lookup-policy and business errors retain identity.
186
+ */
187
+ invoke(request: InvokeRemoteRequest): Promise<unknown>
188
+ }
189
+ ```
190
+
191
+ ## Consumer Remote
192
+
193
+ `ctx.remote` exposes only namespaces contributed by imported `/remote` artifacts. `$mount()` installs generated descriptors and concrete methods as one fiber-owned operation. Each namespace is a traced `remote.<namespace>` Cordis child Service whose lifetime spans its mounted methods; no JavaScript Proxy or Host business Service type enters the consumer.
194
+
195
+ ```ts type-equiv
196
+ /** Client Remote capability implemented by the Gateway and consumed by Remote assemblies. */
197
+ interface TypertClientRemote extends TypertRemoteNamespaceMap {
198
+ /**
199
+ * Mount one generated Host-for-Client contribution in the caller's fiber.
200
+ * @param contribution - explicitly selected Remote package artifact.
201
+ * @returns disposer after namespace services and concrete methods are ready.
202
+ */
203
+ $mount(contribution: TypertRemoteContribution): Promise<TypertDisposer>
204
+ /**
205
+ * Subscribe to one forwarded Host event; delivery is one-way, in registration
206
+ * order, and isolates a throwing listener from the rest.
207
+ * @template Event - forwarded event name selected by the Host assembly.
208
+ * @param event - forwarded Host event name, unchanged on the wire.
209
+ * @param listener - receives the Host's argument list as declared by Cordis `Events`.
210
+ * @returns disposer owned by the calling fiber.
211
+ */
212
+ $on<Event extends TypertRemoteEvent>(event: Event, listener: Events[Event]): () => void
213
+ /**
214
+ * Hand one decoded forwarded frame to the subscription table. The carrier
215
+ * owning the Host frame sink calls this; a consumer subscribes with
216
+ * {@link TypertClientRemote.$on} and never calls it.
217
+ *
218
+ * `event` is a plain string because this is the wire boundary: the name is
219
+ * whatever the Host assembly's allowlist selected, and one nobody subscribed
220
+ * to is dropped silently.
221
+ * @param event - forwarded Host event name, exactly as the Host emitted it.
222
+ * @param args - the Host argument list, already JSON-decoded.
223
+ */
224
+ $dispatch(event: string, args: readonly unknown[]): void
225
+ }
226
+ ```
227
+
228
+ <!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
229
+
230
+ <a id="cordis-surface"></a>
231
+
232
+ ## Cordis API
233
+
234
+ 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).
235
+
236
+ <a id="ctxapiproxy--apiproxy"></a>
237
+
238
+ ### `ctx.apiProxy` — `ApiProxy`
239
+
240
+ Root interface of the unified API. New client-request domain = one new file pair + one field here + one map row.
241
+
242
+ ```ts cordis-catalog
243
+ /**
244
+ * Response entry for server requests; not a domain method.
245
+ * @param message - Client response carrying the server request's rpcId.
246
+ * @returns Transport receipt for the response delivery.
247
+ */
248
+ respond(message: ClientResponse): Promise<RpcReceipt>
249
+ ```
250
+
251
+ Source: [`packages/host/apiproxy/src/api/index.ts:22`](../../packages/host/apiproxy/src/api/index.ts)
252
+
253
+ <a id="ctxtypert--typertregistry"></a>
254
+
255
+ ### `ctx.typert` — `TypertRegistry`
256
+
257
+ Registry of generated schemas, package reflection, invocations, and Remote dependency providers.
258
+
259
+ ```ts cordis-catalog
260
+ /**
261
+ * Register one generated contribution atomically for the calling fiber.
262
+ * Duplicate package-face identities, schemas, invocation ids, or endpoints
263
+ * reject the whole batch.
264
+ * @param contribution - generated schemas, reflection, and Host invocations.
265
+ * @returns the exact effect disposer that removes this contribution.
266
+ */
267
+ register(contribution: TypertContribution): TypertDisposer
268
+
269
+ /**
270
+ * Look up one schema by `<package>#<name>`.
271
+ * @param key - global schema key.
272
+ * @returns the live schema record, or `undefined` when absent.
273
+ */
274
+ get(key: string): TypertSchemaRecord | undefined
275
+
276
+ /**
277
+ * Resolve one required schema.
278
+ * @param key - global schema key.
279
+ * @returns the live schema record.
280
+ * @throws when the key is malformed, the package face is absent, or the schema is not contributed.
281
+ */
282
+ resolve(key: string): TypertSchemaRecord
283
+
284
+ /**
285
+ * Enumerate live schemas in registration order.
286
+ * @param filter - optional package and face restriction.
287
+ * @returns matching schema records.
288
+ */
289
+ list(filter: TypertSchemaFilter = {}): TypertSchemaRecord[]
290
+
291
+ /**
292
+ * Look up generated reflection for one package face.
293
+ * @param packageName - exact npm package name.
294
+ * @param face - face to query; defaults to the host runtime.
295
+ * @returns the live package record, or `undefined` when absent.
296
+ */
297
+ getPackage(packageName: string, face: TypertFace = 'host'): TypertPackageRecord | undefined
298
+
299
+ /**
300
+ * Enumerate generated package reflection in registration order.
301
+ * @param filter - optional package and face restriction.
302
+ * @returns matching package records.
303
+ */
304
+ listPackages(filter: TypertPackageFilter = {}): TypertPackageRecord[]
305
+
306
+ /**
307
+ * Project a live Zod schema to JSON Schema without caching the result.
308
+ * @param key - global schema key.
309
+ * @param params - Zod projection parameters.
310
+ * @returns a fresh JSON Schema document.
311
+ */
312
+ toJSONSchema(key: string, params?: z.core.ToJSONSchemaParams): z.core.JSONSchema.BaseSchema
313
+ ```
314
+
315
+ Types: [TypertContribution](invariants.md) · [TypertFace](invariants.md) · [TypertPackageFilter](invariants.md) · [TypertPackageRecord](invariants.md) · [TypertSchemaFilter](invariants.md) · [TypertSchemaRecord](invariants.md)
316
+
317
+ Source: [`packages/typert/registry/src/service.ts:446`](../../packages/typert/registry/src/service.ts)
318
+
319
+ <a id="ctxtypertgateway--typertgatewayservice"></a>
320
+
321
+ ### `ctx.typertGateway` — `TypertGatewayService`
322
+
323
+ Resolve strict generated definitions or conservative SRC markers against current Cordis Services and Typert providers.
324
+
325
+ ```ts cordis-catalog
326
+ /**
327
+ * Invoke one live Remote method through strict generated reflection or SRC markers.
328
+ * @param request - decoded endpoint and exact named wire arguments.
329
+ * @returns the validated business result.
330
+ * @throws {@link TypertGatewayError} for dispatch, provider, or boundary failures; lookup-policy and business errors retain identity.
331
+ */
332
+ async invoke(request: InvokeRemoteRequest): Promise<unknown>
333
+ ```
334
+
335
+ Source: [`packages/api/gateway/src/index.ts:90`](../../packages/api/gateway/src/index.ts)
336
+ <!-- END GENERATED cordis-surface -->
@@ -0,0 +1,336 @@
1
+ # Typert 远程调用
2
+
3
+ [English](typert.md) | 中文
4
+
5
+ 以下类型由生成的 Remote 产物、Host Gateway 与消费方 API assembly 共用。[Typert Gateway Agent Note](../../.agents/notes/implemented/architecture/2026-08-02-typert-remote-method-calls.md) 负责架构与传输决策;本页记录 [`dsh-typert-protocol`](../../packages/typert/protocol/src/types.ts) 和 [`dsh-api-gateway`](../../packages/api/gateway/src/types.ts) 中公共约定的字面定义。
6
+
7
+ ## Lookup 与上下文声明
8
+
9
+ 业务对象包通过声明合并扩展两个空 map。lookup 将一种 Host 对象类型与其 wire identity 关联;上下文声明将一种作用域上下文类别与其 wire identity 关联。生成的 descriptor 引用这些 key,运行时提供方则提供活对象解析行为。
10
+
11
+ ```ts type-equiv
12
+ /** Merge-extensible Host object lookup declarations. */
13
+ interface TypertLookupMap {}
14
+ ```
15
+
16
+ ```ts type-equiv
17
+ /** Merge-extensible scoped Context declarations. */
18
+ interface TypertContextMap {}
19
+ ```
20
+
21
+ lookup 的 resolver 卸载后,注册表仍会保留其 wire 声明。因此 SRC 发现过程会继续把该参数归类为 lookup,并因不可用而失败,而不会把 wire 值当作普通业务对象接受。
22
+
23
+ ```ts type-equiv
24
+ /** Stable wire declaration retained after a lookup provider unloads. */
25
+ interface TypertLookupDefinition {
26
+ /** Merge-declared lookup key. */
27
+ readonly key: string
28
+ /** Source parameter name recognized by the SRC weak parser. */
29
+ readonly parameter: string
30
+ /** Wire field replacing the Host object parameter. */
31
+ readonly wire: string
32
+ /** Canonical Host type symbol used by strict generation. */
33
+ readonly hostTypeSymbol: string
34
+ /** Canonical wire type symbol used by strict generation. */
35
+ readonly wireTypeSymbol: string
36
+ }
37
+ ```
38
+
39
+ ## 调用 descriptor
40
+
41
+ `InvocationDescriptor` 是本地反射信息,不是 wire message。Host 与消费方构建会生成彼此对应的 descriptor;请求只发送 endpoint 与具名 `args`。strict codec 携带生成的 schema,SRC codec 则在不恢复结构类型的前提下强制要求 JSON 安全值。取消通过带外 carrier signal 表达:它在业务参数之后注入,绝不进入 `args`。
42
+
43
+ ```ts type-equiv
44
+ /** Codec attached to one invocation parameter or result. */
45
+ type TypertCodec =
46
+ | {
47
+ readonly mode: 'strict'
48
+ readonly typeSymbol: string
49
+ readonly schema: TypertSchema
50
+ }
51
+ | {
52
+ readonly mode: 'src-json'
53
+ }
54
+ ```
55
+
56
+ ```ts type-equiv
57
+ /** One ordered business parameter in a Remote invocation. */
58
+ interface InvocationParameterDescriptor {
59
+ /** Source-level parameter name. */
60
+ readonly name: string
61
+ /** Required key in the wire `args` object. */
62
+ readonly wire: string
63
+ /** Whether the value is JSON or requires a registered Host lookup. */
64
+ readonly source: 'json' | 'lookup'
65
+ /** Lookup key when `source` is `lookup`. */
66
+ readonly lookup?: string
67
+ /** Boundary codec for the wire representation. */
68
+ readonly codec: TypertCodec
69
+ /** Missing wire fields decode to `undefined` only for an explicitly declared `T | undefined`. */
70
+ readonly acceptsUndefined?: true
71
+ }
72
+ ```
73
+
74
+ ```ts type-equiv
75
+ /** Carrier-independent description of one exported method invocation. */
76
+ interface InvocationDescriptor {
77
+ /** Globally stable generated identity. */
78
+ readonly id: string
79
+ /** Cordis service key owning the method. */
80
+ readonly service: string
81
+ /** Wire namespace, defaulting to the service key. */
82
+ readonly namespace: string
83
+ /** Public instance method name. */
84
+ readonly method: string
85
+ /** Service member invoked when the exported method name is an alias. */
86
+ readonly implementation?: string
87
+ /** Receiver selection mode. */
88
+ readonly invocation:
89
+ | { readonly kind: 'direct' }
90
+ | {
91
+ readonly kind: 'context'
92
+ readonly context: string
93
+ readonly wire: string
94
+ readonly codec: TypertCodec
95
+ }
96
+ /** Optional consuming-Context projection for one direct lookup parameter. */
97
+ readonly scope?: {
98
+ /** Context kind whose Client binder supplies the identity. */
99
+ readonly context: string
100
+ /** Lookup parameter wire field replaced by the Context identity. */
101
+ readonly wire: string
102
+ }
103
+ /** Ordered business parameters. */
104
+ readonly parameters: readonly InvocationParameterDescriptor[]
105
+ /** Transport cancellation injected after business parameters instead of entering wire args. */
106
+ readonly cancellation?: {
107
+ /** Reserved final Host method parameter. */
108
+ readonly parameter: 'signal'
109
+ }
110
+ /** Codec for the resolved method result. */
111
+ readonly result: TypertCodec
112
+ /** Source declaration used only for diagnostics. */
113
+ readonly sourceLocation?: InvocationSourceLocation
114
+ }
115
+ ```
116
+
117
+ ## Typert 注册表
118
+
119
+ `ctx.typert` 分开保存当前环境的 descriptor、显式选择的 Remote contribution、lookup 提供方与作用域上下文提供方。lookup 提供方拥有稳定 wire 声明和默认 resolver;Host 组合可以为同一个 key 配置 effect-scoped 同步或异步 resolver,配置卸载后恢复默认策略。各项注册都是由 Cordis 持有的 effect,并返回可等待的 disposer。
120
+
121
+ ```ts type-equiv
122
+ /** Minimal Typert runtime consumed through dependency inversion. */
123
+ interface TypertRegistryContract {
124
+ readonly local: TypertLocalRegistry
125
+ readonly remotes: TypertRemoteRegistry
126
+ readonly lookups: TypertLookupRegistry
127
+ readonly contexts: TypertContextRegistry
128
+ }
129
+ ```
130
+
131
+ 生成的消费方声明会把 direct namespace 合并到 `TypertClientRemote` 继承的 map 中。
132
+
133
+ ```ts type-equiv
134
+ /** Merge-extensible direct namespace surface generated for Client Remote services. */
135
+ interface TypertRemoteNamespaceMap {}
136
+ ```
137
+
138
+ ## Host Gateway
139
+
140
+ Connection 会先解码 carrier envelope,再调用 `ctx.typertGateway`。请求将精确的具名 wire 字段与 carrier 的取消 signal 分开携带;基础设施与边界失败使用 Gateway 的进程内错误分类体系,普通异常由 RPC 适配器归并为传输层的 `internal` 错误码,lookup 策略通过 `TypertLookupFailure` 携带的既有 RPC error 则原样返回。
141
+
142
+ ```ts type-equiv
143
+ /** One Remote method request after a carrier has decoded its envelope. */
144
+ interface InvokeRemoteRequest {
145
+ /** Remote namespace selected by the generated descriptor. */
146
+ readonly namespace: string
147
+ /** Exported Service method name. */
148
+ readonly method: string
149
+ /** Named wire values; fields must exactly match the descriptor. */
150
+ readonly args: Readonly<Record<string, unknown>>
151
+ /** Carrier or direct-caller cancellation injected only into cancellation-aware methods. */
152
+ readonly signal?: AbortSignal
153
+ }
154
+ ```
155
+
156
+ ```ts type-equiv
157
+ /** Stable infrastructure and boundary failures emitted before or after business execution. */
158
+ type TypertGatewayErrorCode =
159
+ | 'ambiguous-endpoint'
160
+ | 'arguments-invalid'
161
+ | 'binding-invalid'
162
+ | 'context-failed'
163
+ | 'context-not-found'
164
+ | 'context-unavailable'
165
+ | 'definition-unavailable'
166
+ | 'input-invalid'
167
+ | 'invocation-unavailable'
168
+ | 'lookup-failed'
169
+ | 'lookup-not-found'
170
+ | 'lookup-unavailable'
171
+ | 'method-unavailable'
172
+ | 'provider-mismatch'
173
+ | 'result-invalid'
174
+ | 'service-unavailable'
175
+ | 'signature-invalid'
176
+ ```
177
+
178
+ ```ts type-equiv
179
+ /** Host dispatcher consumed by Connection adapters. */
180
+ interface TypertGateway {
181
+ /**
182
+ * Invoke one live Remote method without assuming a carrier or response envelope.
183
+ * @param request - decoded endpoint and named wire arguments.
184
+ * @returns the validated business result.
185
+ * @throws {@link TypertGatewayError} for dispatch, provider, or boundary failures; lookup-policy and business errors retain identity.
186
+ */
187
+ invoke(request: InvokeRemoteRequest): Promise<unknown>
188
+ }
189
+ ```
190
+
191
+ ## 消费方 Remote
192
+
193
+ `ctx.remote` 只暴露由已导入 `/remote` 产物贡献的 namespace。`$mount()` 会把生成的 descriptor 与具体方法作为一项由 fiber 持有的操作统一注册。每个 namespace 都是可追踪的 `remote.<namespace>` Cordis 子服务,其生命周期覆盖已挂载的方法;JavaScript Proxy 与 Host 业务服务类型都不会进入消费方。
194
+
195
+ ```ts type-equiv
196
+ /** Client Remote capability implemented by the Gateway and consumed by Remote assemblies. */
197
+ interface TypertClientRemote extends TypertRemoteNamespaceMap {
198
+ /**
199
+ * Mount one generated Host-for-Client contribution in the caller's fiber.
200
+ * @param contribution - explicitly selected Remote package artifact.
201
+ * @returns disposer after namespace services and concrete methods are ready.
202
+ */
203
+ $mount(contribution: TypertRemoteContribution): Promise<TypertDisposer>
204
+ /**
205
+ * Subscribe to one forwarded Host event; delivery is one-way, in registration
206
+ * order, and isolates a throwing listener from the rest.
207
+ * @template Event - forwarded event name selected by the Host assembly.
208
+ * @param event - forwarded Host event name, unchanged on the wire.
209
+ * @param listener - receives the Host's argument list as declared by Cordis `Events`.
210
+ * @returns disposer owned by the calling fiber.
211
+ */
212
+ $on<Event extends TypertRemoteEvent>(event: Event, listener: Events[Event]): () => void
213
+ /**
214
+ * Hand one decoded forwarded frame to the subscription table. The carrier
215
+ * owning the Host frame sink calls this; a consumer subscribes with
216
+ * {@link TypertClientRemote.$on} and never calls it.
217
+ *
218
+ * `event` is a plain string because this is the wire boundary: the name is
219
+ * whatever the Host assembly's allowlist selected, and one nobody subscribed
220
+ * to is dropped silently.
221
+ * @param event - forwarded Host event name, exactly as the Host emitted it.
222
+ * @param args - the Host argument list, already JSON-decoded.
223
+ */
224
+ $dispatch(event: string, args: readonly unknown[]): void
225
+ }
226
+ ```
227
+
228
+ <!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
229
+
230
+ <a id="cordis-surface"></a>
231
+
232
+ ## Cordis API
233
+
234
+ 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).
235
+
236
+ <a id="ctxapiproxy--apiproxy"></a>
237
+
238
+ ### `ctx.apiProxy` — `ApiProxy`
239
+
240
+ Root interface of the unified API. New client-request domain = one new file pair + one field here + one map row.
241
+
242
+ ```ts cordis-catalog
243
+ /**
244
+ * Response entry for server requests; not a domain method.
245
+ * @param message - Client response carrying the server request's rpcId.
246
+ * @returns Transport receipt for the response delivery.
247
+ */
248
+ respond(message: ClientResponse): Promise<RpcReceipt>
249
+ ```
250
+
251
+ Source: [`packages/host/apiproxy/src/api/index.ts:22`](../../packages/host/apiproxy/src/api/index.ts)
252
+
253
+ <a id="ctxtypert--typertregistry"></a>
254
+
255
+ ### `ctx.typert` — `TypertRegistry`
256
+
257
+ Registry of generated schemas, package reflection, invocations, and Remote dependency providers.
258
+
259
+ ```ts cordis-catalog
260
+ /**
261
+ * Register one generated contribution atomically for the calling fiber.
262
+ * Duplicate package-face identities, schemas, invocation ids, or endpoints
263
+ * reject the whole batch.
264
+ * @param contribution - generated schemas, reflection, and Host invocations.
265
+ * @returns the exact effect disposer that removes this contribution.
266
+ */
267
+ register(contribution: TypertContribution): TypertDisposer
268
+
269
+ /**
270
+ * Look up one schema by `<package>#<name>`.
271
+ * @param key - global schema key.
272
+ * @returns the live schema record, or `undefined` when absent.
273
+ */
274
+ get(key: string): TypertSchemaRecord | undefined
275
+
276
+ /**
277
+ * Resolve one required schema.
278
+ * @param key - global schema key.
279
+ * @returns the live schema record.
280
+ * @throws when the key is malformed, the package face is absent, or the schema is not contributed.
281
+ */
282
+ resolve(key: string): TypertSchemaRecord
283
+
284
+ /**
285
+ * Enumerate live schemas in registration order.
286
+ * @param filter - optional package and face restriction.
287
+ * @returns matching schema records.
288
+ */
289
+ list(filter: TypertSchemaFilter = {}): TypertSchemaRecord[]
290
+
291
+ /**
292
+ * Look up generated reflection for one package face.
293
+ * @param packageName - exact npm package name.
294
+ * @param face - face to query; defaults to the host runtime.
295
+ * @returns the live package record, or `undefined` when absent.
296
+ */
297
+ getPackage(packageName: string, face: TypertFace = 'host'): TypertPackageRecord | undefined
298
+
299
+ /**
300
+ * Enumerate generated package reflection in registration order.
301
+ * @param filter - optional package and face restriction.
302
+ * @returns matching package records.
303
+ */
304
+ listPackages(filter: TypertPackageFilter = {}): TypertPackageRecord[]
305
+
306
+ /**
307
+ * Project a live Zod schema to JSON Schema without caching the result.
308
+ * @param key - global schema key.
309
+ * @param params - Zod projection parameters.
310
+ * @returns a fresh JSON Schema document.
311
+ */
312
+ toJSONSchema(key: string, params?: z.core.ToJSONSchemaParams): z.core.JSONSchema.BaseSchema
313
+ ```
314
+
315
+ Types: [TypertContribution](invariants.md) · [TypertFace](invariants.md) · [TypertPackageFilter](invariants.md) · [TypertPackageRecord](invariants.md) · [TypertSchemaFilter](invariants.md) · [TypertSchemaRecord](invariants.md)
316
+
317
+ Source: [`packages/typert/registry/src/service.ts:446`](../../packages/typert/registry/src/service.ts)
318
+
319
+ <a id="ctxtypertgateway--typertgatewayservice"></a>
320
+
321
+ ### `ctx.typertGateway` — `TypertGatewayService`
322
+
323
+ Resolve strict generated definitions or conservative SRC markers against current Cordis Services and Typert providers.
324
+
325
+ ```ts cordis-catalog
326
+ /**
327
+ * Invoke one live Remote method through strict generated reflection or SRC markers.
328
+ * @param request - decoded endpoint and exact named wire arguments.
329
+ * @returns the validated business result.
330
+ * @throws {@link TypertGatewayError} for dispatch, provider, or boundary failures; lookup-policy and business errors retain identity.
331
+ */
332
+ async invoke(request: InvokeRemoteRequest): Promise<unknown>
333
+ ```
334
+
335
+ Source: [`packages/api/gateway/src/index.ts:90`](../../packages/api/gateway/src/index.ts)
336
+ <!-- END GENERATED cordis-surface -->
@@ -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/subsystems/user-questions.md
5
+ user-questions.md: 65bf9b9bbfb3f1e1e1ebb2c2854a6b986057dd40
6
+ user-questions.zh.md: ed5aa122322a5b87ec93227bfae2df524e4d8bad