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,946 @@
1
+ <!-- 英文源文件由 scripts/gen-persistence-catalog.ts 生成;本中文文件是通过双语配对维护的经评审对侧。
2
+ 更新时先运行 `pnpm run gen-persistence-catalog` 更新英文,再更新本文件并运行 `pnpm run verify-translation-pairing --write docs/persistence-catalog.md` 重新记录配对。 -->
3
+
4
+ # 会话持久化事件目录
5
+
6
+ [English](persistence-catalog.md) | 中文
7
+
8
+ 会话持久事件日志中可能出现的所有事件类型:完整持久化的 `SessionEvent` 信封,以及可通过合并扩展的 `SessionEventMap` 中的每个成员,包括 `@deepseek-ai/dsh-session` 所属的词汇和本仓库中每个插件对 `@deepseek-ai/dsh-session/types` 的声明合并,并附有源 JSDoc、完整 payload 声明、surface 标记和声明位置。本文档是 [session.md](subsystems/session.md)(surface 排序与 `deriveMessages()` 投影)、[persistence.md](subsystems/persistence.md)(如何让日志持久化)和 [session.md](subsystems/session.md#cordis-surface) 中生成区域(实时总线接线;日志事件**不是** cordis 事件,它通过唯一的 `session/event` emit 到达监听器)的补充。
9
+
10
+ 英文源文件根据源码生成(`scripts/gen-persistence-catalog.ts`),并由 `pnpm run verify-persistence-catalog`(`doc-sync`(文档同步门禁)的一部分)验证新鲜度;本中文文件作为经评审对侧通过双语配对维护。声明块保留源码声明和嵌套属性的 JSDoc,只移除其所在接口/模块带来的缩进,并使用 `ts persistence-catalog` 围栏(doc-typecheck 会跳过这些围栏,因为声明引用了其所属模块中的类型)。payload 中的类型名称会链接到记录该类型的页面。参见 [persistence-log-catalog Agent Note](../.agents/notes/archived/process/2026-07-04-persistence-log-catalog.md)。
11
+
12
+ 以下信封声明组合了每个事件的 `type`、单调递增的 `seq`、以 epoch 毫秒表示的 `time`、`data`、可选的未知类型跳过标记 `ignorable`,以及条件字段 `surfaceOp`/`sourceEventSeqs`。**surface** 表示 `SurfaceEventType` 成员:它会生成一条 LLM(大语言模型)消息,并声明该事件如何加入 surface 列表。**log-only** 表示其他所有事件:这类记录可持久化、可回放,但不参与派生历史。每个 payload 均可进行 JSON 序列化(在 `Session.append` 处强制执行),整个格式固定为 `SESSION_FORMAT_VERSION = 0`:这是预发布格式,不暗示任何兼容性(参见[版本立场](subsystems/persistence.md))。范围仅限本仓库中的包;下游插件可以继续合并其他事件类型,而这些类型按设计不属于本目录。
13
+
14
+ ## 事件信封
15
+
16
+ ```ts persistence-catalog
17
+ /** The appendable event-type keys of {@link SessionEventMap}, plugin-merged extensions included. */
18
+ export type SessionEventType = keyof SessionEventMap
19
+
20
+ /**
21
+ * The subset of {@link SessionEventType} values whose events produce LLM
22
+ * messages and are eligible to appear on the ordered surface. Only these
23
+ * event types may carry {@link SurfaceOp} and {@link SessionEvent.sourceEventSeqs}.
24
+ */
25
+ export type SurfaceEventType =
26
+ | 'user/message'
27
+ | 'assistant/message'
28
+ | 'tool/result'
29
+
30
+ /**
31
+ * How a session event entered the ordered surface. Only valid on
32
+ * {@link SurfaceEventType} events.
33
+ *
34
+ * - `'append'`: added to the tail — normal path for user/assistant/tool
35
+ * messages.
36
+ * - `{ op: 'replace', start, end }`: replaces surface nodes from `start`
37
+ * (inclusive) through `end` (inclusive) with this node. Both must exist as
38
+ * surface nodes in the current surface. `start === end` replaces a single
39
+ * node. The node's {@link SessionEvent.sourceEventSeqs} must include every
40
+ * shadowed surface node. Used by compaction; any surface-replacing producer
41
+ * may use it.
42
+ */
43
+ export type SurfaceOp =
44
+ | 'append'
45
+ | { op: 'replace'; start: number; end: number }
46
+
47
+ /**
48
+ * One immutable entry in the session log.
49
+ *
50
+ * A proper discriminated union over `type` (not independent `type`/`data`
51
+ * unions), so `switch (event.type)` narrows `event.data` without casts.
52
+ *
53
+ * The {@link sourceEventSeqs} and {@link surfaceOp} fields are conditional:
54
+ * they only exist on {@link SurfaceEventType} variants (`user/message`,
55
+ * `assistant/message`, `tool/result`).
56
+ * Non-surface events (boundary markers, chunks, usage, errors) never carry
57
+ * surface metadata — the compiler enforces this at `Session.append()`
58
+ * call sites.
59
+ */
60
+ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
61
+ [K in SessionEventType]: {
62
+ type: K
63
+ /** Monotonic sequence number within the session. */
64
+ seq: number
65
+ /** Unix epoch milliseconds. */
66
+ time: number
67
+ data: SessionEventMap[K]
68
+ /**
69
+ * Marks an event a reader may safely skip when it does not recognize
70
+ * `type`. Absent means required: a reader meeting an unrecognized type
71
+ * without this marker MUST refuse to reconstruct the session instead of
72
+ * silently dropping the event, because an unrecognized required event may
73
+ * change how the rest of the log is interpreted. A writer sets `true` only
74
+ * on purely informational records whose loss cannot affect reconstruction;
75
+ * defaulting to required means a forgotten marker over-refuses (an
76
+ * inconvenience) rather than silently resuming a gutted session.
77
+ */
78
+ ignorable?: true
79
+ } & (K extends SurfaceEventType ? {
80
+ /**
81
+ * Seq numbers of earlier events that this event cites as sources
82
+ * (e.g. the `assistant/chunk` seqs that built an `assistant/message`,
83
+ * or the surface nodes shadowed by a compaction replace node). An
84
+ * `assistant/message` may carry a present empty array for a known empty
85
+ * provider stream; when the field is absent, the event does not record which
86
+ * earlier events produced the message.
87
+ */
88
+ sourceEventSeqs?: number[]
89
+ /** How this event entered the surface; absent for non-surface events. */
90
+ surfaceOp?: SurfaceOp
91
+ } : object)
92
+ }[T]
93
+ ```
94
+
95
+ 来源:[`packages/core/session/src/types.ts:336`](../packages/core/session/src/types.ts) · [`packages/core/session/src/types.ts:343`](../packages/core/session/src/types.ts) · [`packages/core/session/src/types.ts:372`](../packages/core/session/src/types.ts) · [`packages/core/session/src/types.ts:404`](../packages/core/session/src/types.ts)
96
+
97
+ ## 事件
98
+
99
+ ### `agent/*`
100
+
101
+ <a id="agentinboxspliced--log-only"></a>
102
+
103
+ #### `agent/inbox/spliced` — log-only
104
+
105
+ ```ts persistence-catalog
106
+ /**
107
+ * One normalized mutation of an agent's durable pending-message lists.
108
+ * Live dispatch precedes projection mutation, so synchronous observers may
109
+ * read the pre-splice inbox to recover the removed messages.
110
+ */
111
+ 'agent/inbox/spliced': {
112
+ target: InboxTarget
113
+ start: number
114
+ removedCount?: number
115
+ inserted: UserMessage[]
116
+ outcome?: 'canceled'
117
+ }
118
+ ```
119
+
120
+ 来源:[`packages/core/agent/src/types.ts:19`](../packages/core/agent/src/types.ts)
121
+
122
+ ### `agent-preset/*`
123
+
124
+ <a id="agent-presetselected--log-only"></a>
125
+
126
+ #### `agent-preset/selected` — log-only
127
+
128
+ ```ts persistence-catalog
129
+ /**
130
+ * The session's agent preset was chosen after creation, while the session
131
+ * was still blank. Log-only: it records the composition later turns ran
132
+ * under, so a resumed or forked session rebuilds the same one instead of
133
+ * the header's creation-time value.
134
+ */
135
+ 'agent-preset/selected': { agentPreset: string }
136
+ ```
137
+
138
+ 来源:[`packages/preset/agent-presets/src/session.ts:26`](../packages/preset/agent-presets/src/session.ts)
139
+
140
+ ### `approval/*`
141
+
142
+ <a id="approvalasked--log-only"></a>
143
+
144
+ #### `approval/asked` — log-only
145
+
146
+ ```ts persistence-catalog
147
+ /**
148
+ * An approval question was put to the answerer chain — log-only audit
149
+ * (like `hook/*`; NOT a surface event, carries no `surfaceOp`). `id` pairs
150
+ * it with the `approval/decided` that always follows; `toolName` is the
151
+ * tool the question is about, `callId` the exact tool call when the asker
152
+ * had one, `reason` the asker's human-readable explanation (e.g. a hook's
153
+ * permission-decision reason).
154
+ */
155
+ 'approval/asked': {
156
+ id: ApprovalRequestId
157
+ toolName: string
158
+ callId?: CallId
159
+ reason?: string
160
+ }
161
+ ```
162
+
163
+ 类型:[CallId](subsystems/core.md)
164
+
165
+ 来源:[`packages/interaction/user-approval/src/index.ts:44`](../packages/interaction/user-approval/src/index.ts)
166
+
167
+ <a id="approvaldecided--log-only"></a>
168
+
169
+ #### `approval/decided` — log-only
170
+
171
+ ```ts persistence-catalog
172
+ /**
173
+ * The outcome of a prior `approval/asked` (same `id`) — log-only audit.
174
+ * Exactly one per ask, appended when the outcome is known: a decision, a
175
+ * cancellation, or the fail-closed `'unavailable'`.
176
+ */
177
+ 'approval/decided': {
178
+ id: ApprovalRequestId
179
+ outcome: ApprovalOutcome
180
+ }
181
+ ```
182
+
183
+ 来源:[`packages/interaction/user-approval/src/index.ts:55`](../packages/interaction/user-approval/src/index.ts)
184
+
185
+ <a id="approvalpolicy--log-only"></a>
186
+
187
+ #### `approval/policy` — log-only
188
+
189
+ ```ts persistence-catalog
190
+ /**
191
+ * The session's approval policy was switched — log-only, durable,
192
+ * replayable, never in the model transcript (the model learns the policy
193
+ * from the runtime-context snapshot and live switch notices). The LAST
194
+ * such event is the session's override ({@link effectiveApprovalPolicy}).
195
+ * `source: 'delegation'` marks an override seeded into a child; an absent
196
+ * source is a runtime switch.
197
+ */
198
+ 'approval/policy': {
199
+ policy: ApprovalPolicy
200
+ /** Marks an override seeded into a child at delegation. */
201
+ source?: 'delegation'
202
+ }
203
+ ```
204
+
205
+ 来源:[`packages/interaction/user-approval/src/index.ts:67`](../packages/interaction/user-approval/src/index.ts)
206
+
207
+ ### `assistant/*`
208
+
209
+ <a id="assistantchunk--log-only"></a>
210
+
211
+ #### `assistant/chunk` — log-only
212
+
213
+ ```ts persistence-catalog
214
+ /** Raw stream chunk — token-level replay fidelity. */
215
+ 'assistant/chunk': { turn: number; step: number; chunk: StreamChunk }
216
+ ```
217
+
218
+ 类型:[StreamChunk](subsystems/llm-streaming.md)
219
+
220
+ 来源:[`packages/core/session/src/types.ts:266`](../packages/core/session/src/types.ts)
221
+
222
+ <a id="assistantmessage--surface"></a>
223
+
224
+ #### `assistant/message` — surface
225
+
226
+ ```ts persistence-catalog
227
+ /**
228
+ * Assembled assistant message for one step (derived history uses this).
229
+ * Carries the step's `usage` when the adapter reported token accounting, so
230
+ * the model output and its accounting travel together (there is no separate
231
+ * usage record). `usage` is absent when the adapter reported none.
232
+ */
233
+ 'assistant/message': { turn: number; step: number; message: AssistantMessage; usage?: TokenUsage }
234
+ ```
235
+
236
+ 类型:[TokenUsage](subsystems/llm-streaming.md)
237
+
238
+ 来源:[`packages/core/session/src/types.ts:273`](../packages/core/session/src/types.ts)
239
+
240
+ ### `command/*`
241
+
242
+ <a id="commanddone--log-only"></a>
243
+
244
+ #### `command/done` — log-only
245
+
246
+ ```ts persistence-catalog
247
+ /**
248
+ * The paired command settled. `kind`/`text` carry the handler's verbatim
249
+ * outcome (a thrown/aborted handler settles as `kind: 'error'` with the
250
+ * rendered failure). A successful command may identify the earlier
251
+ * authoritative domain event for a richer client-computed presentation.
252
+ */
253
+ 'command/done': {
254
+ commandId: CommandId
255
+ kind: 'success' | 'error'
256
+ text?: string
257
+ sourceEventSeq?: number
258
+ }
259
+ ```
260
+
261
+ 来源:[`packages/interaction/commands/src/types.ts:95`](../packages/interaction/commands/src/types.ts)
262
+
263
+ <a id="commandrun--log-only"></a>
264
+
265
+ #### `command/run` — log-only
266
+
267
+ ```ts persistence-catalog
268
+ /**
269
+ * A resolved slash command entered its handler. Log-only (never model
270
+ * surface); paired with `command/done` by `commandId`, mirroring the
271
+ * `tool/call`↔`tool/result` pairing. The payload is structured — `name`
272
+ * and `args` are `parseCommand`'s own split (name and verbatim rawInput,
273
+ * separator whitespace included), so a consumer (a projection unit
274
+ * folding its own command records, a rich command card) never re-parses
275
+ * a line. `args` is absent when the definition sets `recordInput: false`
276
+ * because an authoritative domain event owns the input payload.
277
+ */
278
+ 'command/run': { commandId: CommandId; name: string; args?: string; source: CommandSource }
279
+ ```
280
+
281
+ 来源:[`packages/interaction/commands/src/types.ts:88`](../packages/interaction/commands/src/types.ts)
282
+
283
+ ### `compaction/*`
284
+
285
+ <a id="compactionend--log-only"></a>
286
+
287
+ #### `compaction/end` — log-only
288
+
289
+ ```ts persistence-catalog
290
+ /**
291
+ * Marks the end of a compaction — log-only, releases the lock. Its owner
292
+ * matches `compaction/start`; `error` records an unsuccessful attempt.
293
+ */
294
+ 'compaction/end': { compactionId: CompactionId; sourceCommandId?: CommandId; turn: number | null; error?: string }
295
+ ```
296
+
297
+ 来源:[`packages/compaction/compaction/src/types.ts:71`](../packages/compaction/compaction/src/types.ts)
298
+
299
+ <a id="compactionprune--log-only"></a>
300
+
301
+ #### `compaction/prune` — log-only
302
+
303
+ ```ts persistence-catalog
304
+ /**
305
+ * Shadow price of one model-free prune replacement — log-only, no
306
+ * surfaceOp. The shared shadow-price protocol: a surface `replace` event
307
+ * is priced by the metering event immediately before it (`compaction/summary`
308
+ * for a summarizing compaction, this event for a prune), which states the
309
+ * heuristic token price of the exact replaced range so a pure consumer
310
+ * can subtract it without retaining per-node prices. The replacement MUST
311
+ * be appended synchronously right after this event.
312
+ */
313
+ 'compaction/prune': {
314
+ /** The replaced range's first and last surface-node seqs (a surface-position span, like {@link CompactionResult.shadowedRange}). */
315
+ shadowedRange: { start: number; end: number }
316
+ /** The seqs of all shadowed surface nodes, in surface order. */
317
+ shadowedSeqs: number[]
318
+ /** Heuristic price of the shadowed content under the token-meter's fixed estimator. */
319
+ shadowedTokenCount: number
320
+ }
321
+ ```
322
+
323
+ 来源:[`packages/compaction/compaction/src/types.ts:81`](../packages/compaction/compaction/src/types.ts)
324
+
325
+ <a id="compactionstart--log-only"></a>
326
+
327
+ #### `compaction/start` — log-only
328
+
329
+ ```ts persistence-catalog
330
+ /**
331
+ * Marks the start of a compaction — log-only, holds the lock until
332
+ * `compaction/end`. A numbered owner is strictly enclosed by that open turn;
333
+ * `null` identifies a standalone manual transaction between turns.
334
+ */
335
+ 'compaction/start': { compactionId: CompactionId; sourceCommandId?: CommandId; turn: number | null }
336
+ ```
337
+
338
+ 来源:[`packages/compaction/compaction/src/types.ts:23`](../packages/compaction/compaction/src/types.ts)
339
+
340
+ <a id="compactionsummary--log-only"></a>
341
+
342
+ #### `compaction/summary` — log-only
343
+
344
+ ```ts persistence-catalog
345
+ /**
346
+ * Completed summary, its inputs, and its model call facts — log-only, no surfaceOp.
347
+ * The summary content is in `data.summary`; the actual surface replacement
348
+ * is performed by the immediately following `user/message` event that
349
+ * shadows the compacted range. That adjacency is contractual — the
350
+ * shadowed pricing fields are the replacement's shadow price, so a
351
+ * consumer may pair a replacement with the metering event directly
352
+ * before it (`compaction/prune` documents the shared protocol).
353
+ */
354
+ 'compaction/summary': {
355
+ compactionId: CompactionId
356
+ sourceCommandId?: CommandId
357
+ summary: ContentBlock[]
358
+ shadowedRange: { start: number; end: number }
359
+ shadowedSeqs: number[]
360
+ shadowedTokenCount: number
361
+ /** The provider route that wrote the summary. */
362
+ provider: string
363
+ /**
364
+ * The model that wrote the summary — the summarize call's envelope,
365
+ * reported by the backend that made the call, logged so the one-shot
366
+ * request is reconstructable from log + code and "which model wrote
367
+ * this summary" has a durable answer (the reconstructability Agent Note).
368
+ */
369
+ model: string
370
+ /** The generation cap the summarize call sent, when one applied. */
371
+ maxTokens?: number
372
+ /** Provider-reported token usage for the summarization request, when emitted. */
373
+ usage?: TokenUsage
374
+ } & (
375
+ | {
376
+ /** Complete provider output before the backend's safe summary projection. */
377
+ rawOutput: ContentBlock[]
378
+ /** Identifies exactly one call through this context's `ctx.llm.stream()`. */
379
+ llmStreamCall: true
380
+ }
381
+ | {
382
+ /** Optional complete output from an unmarked template, remote, or other summarizer. */
383
+ rawOutput?: ContentBlock[]
384
+ /** An unmarked summary does not identify a call through this context's LLM seam. */
385
+ llmStreamCall?: never
386
+ }
387
+ )
388
+ ```
389
+
390
+ 类型:[ContentBlock](subsystems/core.md) · [TokenUsage](subsystems/llm-streaming.md)
391
+
392
+ 来源:[`packages/compaction/compaction/src/types.ts:33`](../packages/compaction/compaction/src/types.ts)
393
+
394
+ ### `feedback/*`
395
+
396
+ <a id="feedbackrecord--log-only"></a>
397
+
398
+ #### `feedback/record` — log-only
399
+
400
+ ```ts persistence-catalog
401
+ /**
402
+ * One recorded human remark about this session. Log-only and independent
403
+ * of its trigger; it never enters model context or derived history.
404
+ */
405
+ 'feedback/record': { text: string }
406
+ ```
407
+
408
+ 来源:[`packages/feedback/command-feedback/src/index.ts:62`](../packages/feedback/command-feedback/src/index.ts)
409
+
410
+ ### `goal/*`
411
+
412
+ <a id="goalchange--log-only"></a>
413
+
414
+ #### `goal/change` — log-only
415
+
416
+ ```ts persistence-catalog
417
+ /**
418
+ * Complete post-mutation goal state or clear tombstone.
419
+ */
420
+ 'goal/change': GoalChangeMeta
421
+ ```
422
+
423
+ 来源:[`packages/goal/goal/src/domain.ts:66`](../packages/goal/goal/src/domain.ts)
424
+
425
+ ### `hook/*`
426
+
427
+ <a id="hookinvoked--log-only"></a>
428
+
429
+ #### `hook/invoked` — log-only
430
+
431
+ ```ts persistence-catalog
432
+ /**
433
+ * A hook command was invoked at a hook point — a log-only record (like
434
+ * `compaction/*`; NOT a {@link SurfaceEventType}, carries no `surfaceOp`).
435
+ * `dialect` is the bridge that ran it (`claude`/`codex`), `point`
436
+ * the hook point (`PreToolUse`, `Stop`, …), `matcher` the matcher-group
437
+ * pattern that selected it (absent for match-all), `handlerId` a stable id
438
+ * for the command (so an invoked/result pair correlates). `turn` is the open
439
+ * turn the invocation lives inside.
440
+ */
441
+ 'hook/invoked': {
442
+ turn: number
443
+ point: string
444
+ dialect: HookDialect
445
+ matcher?: string
446
+ handlerId: string
447
+ }
448
+ ```
449
+
450
+ 来源:[`packages/hooks/hook-protocol/src/types.ts:19`](../packages/hooks/hook-protocol/src/types.ts)
451
+
452
+ <a id="hookresult--log-only"></a>
453
+
454
+ #### `hook/result` — log-only
455
+
456
+ ```ts persistence-catalog
457
+ /**
458
+ * Log-only outcome paired to `hook/invoked` by `handlerId`. Decision is the
459
+ * parsed permission result, `stop` for `continue:false`, or `pass`; exit code
460
+ * may be absent, stderr is bounded, and duration is wall-clock runtime.
461
+ */
462
+ 'hook/result': {
463
+ turn: number
464
+ point: string
465
+ handlerId: string
466
+ decision: string
467
+ exitCode?: number
468
+ stderrSummary?: string
469
+ durationMs: number
470
+ }
471
+ ```
472
+
473
+ 来源:[`packages/hooks/hook-protocol/src/types.ts:31`](../packages/hooks/hook-protocol/src/types.ts)
474
+
475
+ ### `llm/*`
476
+
477
+ <a id="llmretry--log-only"></a>
478
+
479
+ #### `llm/retry` — log-only
480
+
481
+ ```ts persistence-catalog
482
+ /** Durable, non-surface record of one provider-routed retry scheduled after a failed request attempt. */
483
+ 'llm/retry': LlmRetryEventData
484
+ ```
485
+
486
+ 来源:[`packages/llm/llm-retry/src/types.ts:9`](../packages/llm/llm-retry/src/types.ts)
487
+
488
+ <a id="llmretry-started--log-only"></a>
489
+
490
+ #### `llm/retry-started` — log-only
491
+
492
+ ```ts persistence-catalog
493
+ /** Durable transition written after a retry wait succeeds and before the next request attempt starts. */
494
+ 'llm/retry-started': LlmRetryStartedEventData
495
+ ```
496
+
497
+ 来源:[`packages/llm/llm-retry/src/types.ts:11`](../packages/llm/llm-retry/src/types.ts)
498
+
499
+ ### `permission/*`
500
+
501
+ <a id="permissionpreset--log-only"></a>
502
+
503
+ #### `permission/preset` — log-only
504
+
505
+ ```ts persistence-catalog
506
+ /**
507
+ * Records the selected preset as durable, log-only user intent. The knob
508
+ * events follow in the same turn and control execution; this event stays
509
+ * out of the model transcript and lets {@link effectivePermissionPreset}
510
+ * preserve a selection when bundles match.
511
+ */
512
+ 'permission/preset': { preset: string }
513
+ ```
514
+
515
+ 来源:[`packages/interaction/permission-presets/src/index.ts:50`](../packages/interaction/permission-presets/src/index.ts)
516
+
517
+ ### `plan/*`
518
+
519
+ <a id="planmode--log-only"></a>
520
+
521
+ #### `plan/mode` — log-only
522
+
523
+ ```ts persistence-catalog
524
+ /**
525
+ * Whether plan mode is in force from this point on: log-only, non-surface,
526
+ * whole-value replace. The last `plan/mode` wins; a log with none folds to
527
+ * inactive through {@link foldPlanMode}.
528
+ */
529
+ 'plan/mode': { active: boolean }
530
+ ```
531
+
532
+ 来源:[`packages/plan/plan-mode/src/index.ts:53`](../packages/plan/plan-mode/src/index.ts)
533
+
534
+ ### `request/*`
535
+
536
+ <a id="requestcontext--log-only"></a>
537
+
538
+ #### `request/context` — log-only
539
+
540
+ ```ts persistence-catalog
541
+ /**
542
+ * Route metadata for the next request, logged only when the route or capacity
543
+ * changes. It does not participate in request reconstruction or header equality.
544
+ */
545
+ 'request/context': RequestContext
546
+ ```
547
+
548
+ 来源:[`packages/core/session/src/types.ts:309`](../packages/core/session/src/types.ts)
549
+
550
+ <a id="requestheader--log-only"></a>
551
+
552
+ #### `request/header` — log-only
553
+
554
+ ```ts persistence-catalog
555
+ /**
556
+ * Full header for the next request, appended inside its step before dispatch.
557
+ * It is log-only; the latest snapshot reconstructs the request header.
558
+ */
559
+ 'request/header': { header: EpochHeader; reason: RequestHeaderReason }
560
+ ```
561
+
562
+ 来源:[`packages/core/session/src/types.ts:304`](../packages/core/session/src/types.ts)
563
+
564
+ ### `sandbox/*`
565
+
566
+ <a id="sandboxmode--log-only"></a>
567
+
568
+ #### `sandbox/mode` — log-only
569
+
570
+ ```ts persistence-catalog
571
+ /**
572
+ * The session's sandbox mode was switched — log-only (like `approval/*`;
573
+ * NOT a surface event, carries no `surfaceOp`): durable and replayable,
574
+ * never in the model transcript. The LAST such event is the session's
575
+ * override ({@link effectiveSandboxMode}). `source: 'delegation'` marks
576
+ * an override seeded into a child; an absent source is a runtime switch.
577
+ */
578
+ 'sandbox/mode': {
579
+ mode: SandboxMode
580
+ /** Marks an override seeded into a child at delegation. */
581
+ source?: 'delegation'
582
+ }
583
+ ```
584
+
585
+ 来源:[`packages/sandbox/sandbox-policy/src/session-mode.ts:33`](../packages/sandbox/sandbox-policy/src/session-mode.ts)
586
+
587
+ ### `schedule/*`
588
+
589
+ <a id="schedulechange--log-only"></a>
590
+
591
+ #### `schedule/change` — log-only
592
+
593
+ ```ts persistence-catalog
594
+ /**
595
+ * Versioned Schedule mutation. The owning package validates the complete
596
+ * session-local transition stream before accepting a candidate event.
597
+ */
598
+ 'schedule/change': ScheduleChange
599
+ ```
600
+
601
+ 类型:[ScheduleChange](subsystems/schedule.md)
602
+
603
+ 来源:[`packages/schedule/schedule/src/types.ts:219`](../packages/schedule/schedule/src/types.ts)
604
+
605
+ ### `session/*`
606
+
607
+ <a id="sessionend-seed--log-only"></a>
608
+
609
+ #### `session/end-seed` — log-only
610
+
611
+ ```ts persistence-catalog
612
+ /**
613
+ * Marks the end of a constructor seed. Events before it have smaller seq
614
+ * values and came from the seed (resume, fork, or replay); this lifecycle
615
+ * produced none of them. This log-only event is the durable projection of
616
+ * {@link Session.firstLiveSeq}. Its payload is empty — position and `time`
617
+ * carry the meaning.
618
+ *
619
+ * Locate the LAST one in stored history. A seed already ending in one is not
620
+ * re-marked, so reopening an untouched session does not grow its log per
621
+ * pickup and the event need not be at the current `firstLiveSeq`.
622
+ *
623
+ * `Session`'s constructor is the only legitimate writer. The invariant
624
+ * companion deliberately constrains nothing here, so a plugin appending one
625
+ * would silently classify every live bracket before it as seed history.
626
+ *
627
+ * An owner of a standalone open/close bracket (`compaction/start` …
628
+ * `compaction/end`) reads it because seed history and live work are otherwise
629
+ * byte-identical: an unmatched opening marker before this event belongs to
630
+ * an ended lifecycle, whatever ended it. NOT a liveness signal about other
631
+ * writers — a concurrently live session holds its own boundary elsewhere,
632
+ * so tolerating concurrent writers needs a signal beyond the log.
633
+ */
634
+ 'session/end-seed': Record<string, never>
635
+ ```
636
+
637
+ 来源:[`packages/core/session/src/types.ts:332`](../packages/core/session/src/types.ts)
638
+
639
+ <a id="sessiontitle--log-only"></a>
640
+
641
+ #### `session/title` — log-only
642
+
643
+ ```ts persistence-catalog
644
+ /**
645
+ * Latest-wins session title snapshot. Log-only: it never enters the model
646
+ * surface or derived history.
647
+ */
648
+ 'session/title': SessionTitleEventData
649
+ ```
650
+
651
+ 类型:[SessionTitleEventData](subsystems/session-title.md)
652
+
653
+ 来源:[`packages/session/session-title/src/index.ts:100`](../packages/session/session-title/src/index.ts)
654
+
655
+ <a id="sessiontitle-llm-request--log-only"></a>
656
+
657
+ #### `session/title-llm-request` — log-only
658
+
659
+ ```ts persistence-catalog
660
+ /** Log-only pre-dispatch record of one session-title model request. */
661
+ 'session/title-llm-request': SessionTitleLlmRequestEventData
662
+ ```
663
+
664
+ 类型:[SessionTitleLlmRequestEventData](subsystems/session-title.md)
665
+
666
+ 来源:[`packages/session/session-title-llm/src/index.ts:43`](../packages/session/session-title-llm/src/index.ts)
667
+
668
+ ### `step/*`
669
+
670
+ <a id="stepend--log-only"></a>
671
+
672
+ #### `step/end` — log-only
673
+
674
+ ```ts persistence-catalog
675
+ /** Closes step `step` of turn `turn`. */
676
+ 'step/end': { turn: number; step: number }
677
+ ```
678
+
679
+ 来源:[`packages/core/session/src/types.ts:256`](../packages/core/session/src/types.ts)
680
+
681
+ <a id="stepstart--log-only"></a>
682
+
683
+ #### `step/start` — log-only
684
+
685
+ ```ts persistence-catalog
686
+ /** Opens step `step` of turn `turn` — one model call plus the tool executions it requested. */
687
+ 'step/start': { turn: number; step: number }
688
+ ```
689
+
690
+ 来源:[`packages/core/session/src/types.ts:254`](../packages/core/session/src/types.ts)
691
+
692
+ ### `subagent/*`
693
+
694
+ <a id="subagentdescriptor--log-only"></a>
695
+
696
+ #### `subagent/descriptor` — log-only
697
+
698
+ ```ts persistence-catalog
699
+ /**
700
+ * Durable identity and lifecycle mode of a session-backed subagent child,
701
+ * appended once by the establishing provider inside the child's initial
702
+ * turn, before its first request. Continuable records also carry their
703
+ * resumable composition. Log-only: it carries no `surfaceOp`, never enters
704
+ * model history, and survives compaction.
705
+ */
706
+ 'subagent/descriptor': SubagentDescriptorData
707
+ ```
708
+
709
+ 来源:[`packages/subagent/subagent/src/descriptor.ts:37`](../packages/subagent/subagent/src/descriptor.ts)
710
+
711
+ ### `todo/*`
712
+
713
+ <a id="todowrite--log-only"></a>
714
+
715
+ #### `todo/write` — log-only
716
+
717
+ ```ts persistence-catalog
718
+ /** Whole-list snapshot; latest write wins on replay. Log-only UI state; never derived history. */
719
+ 'todo/write': { todos: TodoItem[] }
720
+ ```
721
+
722
+ 类型:[TodoItem](subsystems/session.md)
723
+
724
+ 来源:[`packages/core/session/src/types.ts:299`](../packages/core/session/src/types.ts)
725
+
726
+ ### `tool/*`
727
+
728
+ <a id="toolcall--log-only"></a>
729
+
730
+ #### `tool/call` — log-only
731
+
732
+ ```ts persistence-catalog
733
+ /**
734
+ * The model requested one tool invocation: `name` with the raw `arguments`
735
+ * JSON string exactly as the model produced it (unparsed). `callId` pairs the
736
+ * call with its `tool/result`.
737
+ */
738
+ 'tool/call': { turn: number; step: number; callId: CallId; name: string; arguments: string }
739
+ ```
740
+
741
+ 类型:[CallId](subsystems/core.md)
742
+
743
+ 来源:[`packages/core/session/src/types.ts:279`](../packages/core/session/src/types.ts)
744
+
745
+ <a id="toolcode-dispatch--log-only"></a>
746
+
747
+ #### `tool/code-dispatch` — log-only
748
+
749
+ ```ts persistence-catalog
750
+ /**
751
+ * One bridged sub-dispatch SETTLING: the pairing ids (matching the
752
+ * `tool/code-dispatch-start` with the same `subCallId`), the tool `name`
753
+ * with the same JSON-normalized `arguments`, and the sub-call's complete
754
+ * model-facing outcome in `tool/result`'s own vocabulary
755
+ * (`content` + `isError`), so UIs render a sub-call through the exact
756
+ * code path that renders a native call. Every started sub-call settles
757
+ * with exactly one of these (abort included: the aborted pipeline result
758
+ * is an `isError` outcome).
759
+ * Log-only: `deriveMessages()` ignores it, so sub-calls never re-enter
760
+ * model context; persistence and UIs get every call. Appended inside the
761
+ * parent `run_code`'s execution (the bridge drains in-flight dispatches
762
+ * before returning), so its execution-enclosure relation holds by
763
+ * construction.
764
+ */
765
+ 'tool/code-dispatch': CodeDispatchEventData
766
+ ```
767
+
768
+ 来源:[`packages/core/tools/src/types.ts:56`](../packages/core/tools/src/types.ts)
769
+
770
+ <a id="toolcode-dispatch-start--log-only"></a>
771
+
772
+ #### `tool/code-dispatch-start` — log-only
773
+
774
+ ```ts persistence-catalog
775
+ /**
776
+ * One sub-dispatch STARTING inside a `run_code` program: the parent
777
+ * `run_code` call id, the deterministic sub-call id (`<parent>:code:<n>`,
778
+ * numbered in submission order), and the tool `name` with its
779
+ * JSON-normalized `arguments` — the exact value dispatched, normalized
780
+ * BEFORE dispatch, so this append can never fail on payload shape.
781
+ * Appended when the scheduler actually starts the call (not at
782
+ * submission), so a start means the tool body pipeline was entered; a
783
+ * call abandoned in the queue logs nothing. Log-only: `deriveMessages()`
784
+ * ignores it; UIs use it for live per-sub-call running state and pair it
785
+ * with `tool/code-dispatch` by `subCallId` (timing = the two events'
786
+ * `time` fields).
787
+ */
788
+ 'tool/code-dispatch-start': CodeDispatchStartEventData
789
+ ```
790
+
791
+ 来源:[`packages/core/tools/src/types.ts:40`](../packages/core/tools/src/types.ts)
792
+
793
+ <a id="toolresult--surface"></a>
794
+
795
+ #### `tool/result` — surface
796
+
797
+ ```ts persistence-catalog
798
+ /**
799
+ * A completed tool call's model-facing result, optional internal failure
800
+ * identity, and optional tool-private `meta` presentation payload. `meta` is
801
+ * opaque to the core (the producing tool owns its shape and reads it back in
802
+ * `presentResult`) but MUST be JSON-serializable: `Session.append`
803
+ * runtime-validates all event data with `isJsonValue`, so a non-serializable
804
+ * `meta` is rejected at the source, and the durable log reproduces the
805
+ * identical card on replay. Absent
806
+ * unless the tool attaches one (e.g. `dsh-tool-fs` carries its result-time
807
+ * contextual diff here).
808
+ */
809
+ 'tool/result': {
810
+ turn: number
811
+ step: number
812
+ message: ToolResultMessage
813
+ error?: { name: string; code: string }
814
+ meta?: JsonValue
815
+ }
816
+ ```
817
+
818
+ 来源:[`packages/core/session/src/types.ts:291`](../packages/core/session/src/types.ts)
819
+
820
+ ### `tool-workflow/*`
821
+
822
+ <a id="tool-workflowagent-end--log-only"></a>
823
+
824
+ #### `tool-workflow/agent-end` — log-only
825
+
826
+ ```ts persistence-catalog
827
+ /**
828
+ * Records one member settlement.
829
+ * @param data - run identity, paired member sequence, and outcome.
830
+ */
831
+ 'tool-workflow/agent-end': ToolWorkflowAgentEndData
832
+ ```
833
+
834
+ 来源:[`packages/workflow/tool-workflow/src/types.ts:57`](../packages/workflow/tool-workflow/src/types.ts)
835
+
836
+ <a id="tool-workflowagent-start--log-only"></a>
837
+
838
+ #### `tool-workflow/agent-start` — log-only
839
+
840
+ ```ts persistence-catalog
841
+ /**
842
+ * Records one published workflow member.
843
+ * @param data - run identity, member sequence, display identity, and child Session.
844
+ */
845
+ 'tool-workflow/agent-start': ToolWorkflowAgentStartData
846
+ ```
847
+
848
+ 来源:[`packages/workflow/tool-workflow/src/types.ts:52`](../packages/workflow/tool-workflow/src/types.ts)
849
+
850
+ <a id="tool-workflowrun-end--log-only"></a>
851
+
852
+ #### `tool-workflow/run-end` — log-only
853
+
854
+ ```ts persistence-catalog
855
+ /**
856
+ * Closes one workflow record after cleanup.
857
+ * @param data - stable run identity and terminal reason.
858
+ */
859
+ 'tool-workflow/run-end': ToolWorkflowRunEndData
860
+ ```
861
+
862
+ 来源:[`packages/workflow/tool-workflow/src/types.ts:62`](../packages/workflow/tool-workflow/src/types.ts)
863
+
864
+ <a id="tool-workflowrun-start--log-only"></a>
865
+
866
+ #### `tool-workflow/run-start` — log-only
867
+
868
+ ```ts persistence-catalog
869
+ /**
870
+ * Opens one top-level workflow record.
871
+ * @param data - stable run identity and display name.
872
+ */
873
+ 'tool-workflow/run-start': ToolWorkflowRunStartData
874
+ ```
875
+
876
+ 来源:[`packages/workflow/tool-workflow/src/types.ts:47`](../packages/workflow/tool-workflow/src/types.ts)
877
+
878
+ ### `turn/*`
879
+
880
+ <a id="turnend--log-only"></a>
881
+
882
+ #### `turn/end` — log-only
883
+
884
+ ```ts persistence-catalog
885
+ /**
886
+ * Closes turn `turn` with the {@link TurnEndReason} that ended it. A turn
887
+ * with no entered step has no `step/start` or `step/end`. The loop does not await a
888
+ * flush at turn boundaries: `dsh-session-checkpoint-policy` owns the
889
+ * per-request durability checkpoint, and consumers that read storage after
890
+ * `whenIdle()` flush themselves. Success commits the turn; rejection is
891
+ * reported live and does not prevent later work.
892
+ */
893
+ 'turn/end': { turn: number; reason: TurnEndReason }
894
+ ```
895
+
896
+ 类型:[TurnEndReason](subsystems/session.md)
897
+
898
+ 来源:[`packages/core/session/src/types.ts:252`](../packages/core/session/src/types.ts)
899
+
900
+ <a id="turnstart--log-only"></a>
901
+
902
+ #### `turn/start` — log-only
903
+
904
+ ```ts persistence-catalog
905
+ /**
906
+ * Opens turn `turn` before the loop claims queued input or runs pre-step.
907
+ * Rejection, empty input, cancellation, or failure may close it with no
908
+ * step; otherwise the following identified `user/message` event or batch
909
+ * records the messages entering the step.
910
+ */
911
+ 'turn/start': { turn: number }
912
+ ```
913
+
914
+ 来源:[`packages/core/session/src/types.ts:243`](../packages/core/session/src/types.ts)
915
+
916
+ ### `user/*`
917
+
918
+ <a id="usermessage--surface"></a>
919
+
920
+ #### `user/message` — surface
921
+
922
+ ```ts persistence-catalog
923
+ /**
924
+ * A user-role message on the model-visible surface: a direct human prompt
925
+ * (the queued message claimed for this turn), a synthetic `agent.inject()`
926
+ * context (file-change notices, subdir AGENTS.md, skill content, cron
927
+ * notifications, …), or an entered goal continuation round. All three
928
+ * project their `content` verbatim; `source` tells them apart.
929
+ */
930
+ 'user/message': UserMessage
931
+ ```
932
+
933
+ 来源:[`packages/core/session/src/types.ts:264`](../packages/core/session/src/types.ts)
934
+
935
+ ### `web/*`
936
+
937
+ <a id="webdeepseek-search-llm-request--log-only"></a>
938
+
939
+ #### `web/deepseek-search-llm-request` — log-only
940
+
941
+ ```ts persistence-catalog
942
+ /** Secret-free auxiliary DeepSeek search request recorded before dispatch. */
943
+ 'web/deepseek-search-llm-request': DeepSeekSearchLlmRequest
944
+ ```
945
+
946
+ 来源:[`packages/web/web-search-deepseek/src/provider.ts:83`](../packages/web/web-search-deepseek/src/provider.ts)