better-dsh 0.2.3 → 0.2.4

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 (385) hide show
  1. package/cordis.patch.yml +1 -1
  2. package/docs/50_test-reports/2026-09-06-write/345/267/245/345/205/267sandbox/345/215/207/347/272/247/351/200/217/344/274/240bug/345/244/215/345/217/221/345/217/212/346/214/202/350/265/267-/344/272/213/344/273/266/346/212/245/345/221/212.md +176 -0
  3. package/docs/50_test-reports/2026-09-08-hashline-edit-E_RANGE_UNVERIFIED/350/267/250/350/275/256/344/274/232/350/257/235/351/224/256/345/244/261/346/225/210-/350/257/212/346/226/255/346/212/245/345/221/212.md +226 -0
  4. package/docs/50_test-reports/2026-09-11-control-prompt-into-eval-description/345/256/236/346/265/213/346/212/245/345/221/212.md +222 -0
  5. package/docs/50_test-reports/2026-09-12-fs-scheme-resolution-/345/256/236/346/265/213/346/212/245/345/221/212.md +81 -0
  6. package/docs/50_test-reports/2026-09-12-url-schemes-grammar-matrix/344/270/216catalog-centralize-/345/256/236/346/265/213/346/212/245/345/221/212.md +234 -0
  7. package/docs/50_test-reports/2026-09-12-url-schemes-recallable-context-design/351/252/214/350/257/201/346/212/245/345/221/212.md +160 -0
  8. package/docs/50_test-reports/2026-09-12-url-schemes-recallable-context-/345/256/236/346/265/213/345/211/247/346/234/254.md +44 -0
  9. package/docs/50_test-reports/2026-09-12-url-schemes-recallable-context-/345/256/236/346/265/213/346/212/245/345/221/212.md +89 -0
  10. package/docs/50_test-reports/2026-09-12-url-schemes-/345/205/255scheme/345/206/222/347/203/237/344/270/216/350/276/271/347/225/214/345/256/236/346/265/213/346/212/245/345/221/212.md +198 -0
  11. package/docs/50_test-reports/2026-09-13-hashline-off/344/270/213scheme/345/217/257/350/276/276/346/200/247/345/267/245/345/205/267/351/235/242/344/270/215/345/257/271/347/247/260-/345/256/236/346/265/213/346/212/245/345/221/212.md +246 -0
  12. package/docs/50_test-reports/2026-09-13-preact-ui-shell/345/256/236/346/265/213/346/212/245/345/221/212.md +50 -0
  13. package/docs/50_test-reports/2026-09-14-4999-skill/346/270/205/345/215/225/344/270/216lsp-gate/345/256/236/346/265/213/346/212/245/345/221/212.md +63 -0
  14. package/docs/50_test-reports/upstream-dsh-0.1.3-alpha.2-local-test-report.md +44 -0
  15. package/docs/50_test-reports/upstream-dsh-0.1.3-alpha.2-report.md +110 -0
  16. package/docs/50_test-reports/upstream-dsh-0.1.5-rc.2-local-test-report.md +79 -0
  17. package/docs/50_test-reports/v0.2.3b-hashline-content-locator/345/256/236/346/265/213/346/212/245/345/221/212.md +73 -0
  18. package/docs/50_test-reports/v0.2.3c-mobile-wave/345/256/236/346/265/213/346/212/245/345/221/212.md +47 -0
  19. package/docs/50_test-reports/v0.2.4-ios-focus-zoom-suppression/345/256/236/346/265/213/346/212/245/345/221/212.md +158 -0
  20. package/docs/specs/agent/spec.md +54 -0
  21. package/docs/specs/ast/spec.md +34 -0
  22. package/docs/specs/compaction-recall/spec.md +46 -0
  23. package/docs/specs/ctx/spec.md +107 -0
  24. package/docs/specs/dsh/spec.md +47 -0
  25. package/docs/specs/dvc/spec.md +87 -0
  26. package/docs/specs/escalation-guidance/spec.md +44 -0
  27. package/docs/specs/fs-scheme-resolution/spec.md +37 -0
  28. package/docs/specs/hash-edit/spec.md +41 -0
  29. package/docs/specs/http-read/spec.md +73 -0
  30. package/docs/specs/kernel-provisioning/spec.md +53 -0
  31. package/docs/specs/lsp/spec.md +121 -0
  32. package/docs/specs/mobile-layout/spec.md +108 -0
  33. package/docs/specs/model-failover/spec.md +20 -0
  34. package/docs/specs/preact-ui-shell/spec.md +22 -0
  35. package/docs/specs/repl-dispatch-resilience/spec.md +21 -0
  36. package/docs/specs/skill/spec.md +58 -0
  37. package/docs/specs/tool-surface/spec.md +222 -0
  38. package/docs/specs/url-schema/spec.md +148 -0
  39. package/docs/specs/web-trust-fence/spec.md +43 -0
  40. package/docs/upstream-dsh-0.1.5-rc.2-report.md +156 -0
  41. package/dsh-docs/AGENTS.md +75 -0
  42. package/dsh-docs/agent-lifecycle.md +84 -0
  43. package/dsh-docs/agent-lifecycle.zh.md +86 -0
  44. package/dsh-docs/api-gateway.md +164 -0
  45. package/dsh-docs/api-gateway.zh.md +164 -0
  46. package/dsh-docs/architecture.md +150 -0
  47. package/dsh-docs/architecture.zh.md +154 -0
  48. package/dsh-docs/capability-seams.md +543 -0
  49. package/dsh-docs/capability-seams.zh.md +545 -0
  50. package/dsh-docs/config-catalog.md +3473 -0
  51. package/dsh-docs/config-catalog.zh.md +3474 -0
  52. package/dsh-docs/cookbook/adding-a-package.md +117 -0
  53. package/dsh-docs/cookbook/adding-a-package.zh.md +119 -0
  54. package/dsh-docs/cookbook/adding-a-remote-api.md +197 -0
  55. package/dsh-docs/cookbook/adding-a-remote-api.zh.md +197 -0
  56. package/dsh-docs/cookbook/adding-a-session-format-version.md +109 -0
  57. package/dsh-docs/cookbook/adding-a-session-format-version.zh.md +109 -0
  58. package/dsh-docs/cookbook/adding-a-settings-card.md +102 -0
  59. package/dsh-docs/cookbook/adding-a-settings-card.zh.md +102 -0
  60. package/dsh-docs/cookbook/adding-a-tool.md +101 -0
  61. package/dsh-docs/cookbook/adding-a-tool.zh.md +103 -0
  62. package/dsh-docs/cookbook/adding-a-vendored-package.md +59 -0
  63. package/dsh-docs/cookbook/adding-a-vendored-package.zh.md +59 -0
  64. package/dsh-docs/cookbook/adding-an-llm-adapter.md +43 -0
  65. package/dsh-docs/cookbook/adding-an-llm-adapter.zh.md +43 -0
  66. package/dsh-docs/cookbook/extension-cookbook.md +132 -0
  67. package/dsh-docs/cookbook/extension-cookbook.zh.md +136 -0
  68. package/dsh-docs/cookbook/maintaining-dsh-code-review.md +64 -0
  69. package/dsh-docs/cookbook/maintaining-dsh-code-review.zh.md +64 -0
  70. package/dsh-docs/cookbook/responding-to-pr-review-on-a-stack.md +32 -0
  71. package/dsh-docs/cookbook/responding-to-pr-review-on-a-stack.zh.md +32 -0
  72. package/dsh-docs/cordis-api/context.md +364 -0
  73. package/dsh-docs/cordis-api/context.zh.md +366 -0
  74. package/dsh-docs/cordis-api/events.md +207 -0
  75. package/dsh-docs/cordis-api/events.zh.md +209 -0
  76. package/dsh-docs/cordis-api/fiber.md +375 -0
  77. package/dsh-docs/cordis-api/fiber.zh.md +377 -0
  78. package/dsh-docs/cordis-api/inherited.md +39 -0
  79. package/dsh-docs/cordis-api/registry.md +152 -0
  80. package/dsh-docs/cordis-api/registry.zh.md +154 -0
  81. package/dsh-docs/cordis-api/service.md +102 -0
  82. package/dsh-docs/cordis-api/service.zh.md +104 -0
  83. package/dsh-docs/cordis-primer.md +45 -0
  84. package/dsh-docs/cordis-primer.zh.md +51 -0
  85. package/dsh-docs/cordis-tutorial/01-first-plugin.md +95 -0
  86. package/dsh-docs/cordis-tutorial/01-first-plugin.zh.md +95 -0
  87. package/dsh-docs/cordis-tutorial/02-lifecycle-and-effects.md +98 -0
  88. package/dsh-docs/cordis-tutorial/02-lifecycle-and-effects.zh.md +98 -0
  89. package/dsh-docs/cordis-tutorial/03-services.md +98 -0
  90. package/dsh-docs/cordis-tutorial/03-services.zh.md +98 -0
  91. package/dsh-docs/cordis-tutorial/04-events.md +144 -0
  92. package/dsh-docs/cordis-tutorial/04-events.zh.md +144 -0
  93. package/dsh-docs/cordis-tutorial/05-config.md +84 -0
  94. package/dsh-docs/cordis-tutorial/05-config.zh.md +84 -0
  95. package/dsh-docs/cordis-tutorial/06-composition-and-hmr.md +113 -0
  96. package/dsh-docs/cordis-tutorial/06-composition-and-hmr.zh.md +113 -0
  97. package/dsh-docs/cordis-tutorial/07-into-the-harness.md +108 -0
  98. package/dsh-docs/cordis-tutorial/07-into-the-harness.zh.md +108 -0
  99. package/dsh-docs/cordis-tutorial/index.md +60 -0
  100. package/dsh-docs/cordis-tutorial/index.zh.md +62 -0
  101. package/dsh-docs/deepseek-llm-api-wire-extensions.md +163 -0
  102. package/dsh-docs/deepseek-llm-api-wire-extensions.zh.md +163 -0
  103. package/dsh-docs/defensive-patterns.md +33 -0
  104. package/dsh-docs/defensive-patterns.zh.md +35 -0
  105. package/dsh-docs/development.md +167 -0
  106. package/dsh-docs/development.zh.md +173 -0
  107. package/dsh-docs/event-producer-consumer.md +86 -0
  108. package/dsh-docs/event-producer-consumer.zh.md +88 -0
  109. package/dsh-docs/glossary.md +45 -0
  110. package/dsh-docs/glossary.zh.md +45 -0
  111. package/dsh-docs/graph-atlas.md +22 -0
  112. package/dsh-docs/graph-atlas.zh.md +24 -0
  113. package/dsh-docs/i18n/README.md +60 -0
  114. package/dsh-docs/i18n/README.zh.md +62 -0
  115. package/dsh-docs/i18n/style-samples.md +87 -0
  116. package/dsh-docs/i18n/terminology.md +214 -0
  117. package/dsh-docs/i18n/translation-prompt.md +263 -0
  118. package/dsh-docs/i18n/translation-rules.md +69 -0
  119. package/dsh-docs/i18n/translation-rules.zh.md +69 -0
  120. package/dsh-docs/module-graph.md +1411 -0
  121. package/dsh-docs/module-graph.zh.md +1413 -0
  122. package/dsh-docs/persistence-catalog.md +1075 -0
  123. package/dsh-docs/persistence-catalog.zh.md +1077 -0
  124. package/dsh-docs/postmortem/0001-acp-default-export-drops-inject.md +113 -0
  125. package/dsh-docs/postmortem/0001-acp-default-export-drops-inject.zh.md +113 -0
  126. package/dsh-docs/postmortem/0002-js-expression-disabled-filesystem-tools.md +47 -0
  127. package/dsh-docs/postmortem/0002-js-expression-disabled-filesystem-tools.zh.md +47 -0
  128. package/dsh-docs/postmortem/0003-web-agent-gui-feedback-loop.md +53 -0
  129. package/dsh-docs/postmortem/0003-web-agent-gui-feedback-loop.zh.md +53 -0
  130. package/dsh-docs/postmortem/0004-landlock-partial-notice-misclassified-child-failures.md +55 -0
  131. package/dsh-docs/postmortem/0004-landlock-partial-notice-misclassified-child-failures.zh.md +55 -0
  132. package/dsh-docs/postmortem/README.md +18 -0
  133. package/dsh-docs/postmortem/README.zh.md +18 -0
  134. package/dsh-docs/rescope.md +53 -0
  135. package/dsh-docs/rescope.zh.md +53 -0
  136. package/dsh-docs/session-format-status.md +47 -0
  137. package/dsh-docs/session-format-status.zh.md +47 -0
  138. package/dsh-docs/subsystems/README.md +61 -0
  139. package/dsh-docs/subsystems/README.zh.md +61 -0
  140. package/dsh-docs/subsystems/agent-team.md +207 -0
  141. package/dsh-docs/subsystems/agent-team.zh.md +207 -0
  142. package/dsh-docs/subsystems/approval.md +170 -0
  143. package/dsh-docs/subsystems/approval.zh.md +170 -0
  144. package/dsh-docs/subsystems/attachment.md +351 -0
  145. package/dsh-docs/subsystems/attachment.zh.md +351 -0
  146. package/dsh-docs/subsystems/client-modules.md +168 -0
  147. package/dsh-docs/subsystems/client-modules.zh.md +168 -0
  148. package/dsh-docs/subsystems/client-resources.md +91 -0
  149. package/dsh-docs/subsystems/client-resources.zh.md +91 -0
  150. package/dsh-docs/subsystems/code-runtime.md +195 -0
  151. package/dsh-docs/subsystems/code-runtime.zh.md +195 -0
  152. package/dsh-docs/subsystems/commands.md +219 -0
  153. package/dsh-docs/subsystems/commands.zh.md +219 -0
  154. package/dsh-docs/subsystems/compaction.md +238 -0
  155. package/dsh-docs/subsystems/compaction.zh.md +238 -0
  156. package/dsh-docs/subsystems/conversation.md +258 -0
  157. package/dsh-docs/subsystems/conversation.zh.md +258 -0
  158. package/dsh-docs/subsystems/core.md +1209 -0
  159. package/dsh-docs/subsystems/core.zh.md +1219 -0
  160. package/dsh-docs/subsystems/credentials.md +329 -0
  161. package/dsh-docs/subsystems/credentials.zh.md +329 -0
  162. package/dsh-docs/subsystems/extensions.md +382 -0
  163. package/dsh-docs/subsystems/extensions.zh.md +382 -0
  164. package/dsh-docs/subsystems/feedback.md +266 -0
  165. package/dsh-docs/subsystems/feedback.zh.md +266 -0
  166. package/dsh-docs/subsystems/filesystem.md +505 -0
  167. package/dsh-docs/subsystems/filesystem.zh.md +505 -0
  168. package/dsh-docs/subsystems/goal.md +277 -0
  169. package/dsh-docs/subsystems/goal.zh.md +277 -0
  170. package/dsh-docs/subsystems/invariants.md +88 -0
  171. package/dsh-docs/subsystems/invariants.zh.md +88 -0
  172. package/dsh-docs/subsystems/jobs.md +290 -0
  173. package/dsh-docs/subsystems/jobs.zh.md +290 -0
  174. package/dsh-docs/subsystems/llm-streaming.md +1080 -0
  175. package/dsh-docs/subsystems/llm-streaming.zh.md +1086 -0
  176. package/dsh-docs/subsystems/lsp.md +202 -0
  177. package/dsh-docs/subsystems/lsp.zh.md +202 -0
  178. package/dsh-docs/subsystems/permission-presets.md +131 -0
  179. package/dsh-docs/subsystems/permission-presets.zh.md +131 -0
  180. package/dsh-docs/subsystems/persistence.md +395 -0
  181. package/dsh-docs/subsystems/persistence.zh.md +395 -0
  182. package/dsh-docs/subsystems/plan.md +87 -0
  183. package/dsh-docs/subsystems/plan.zh.md +87 -0
  184. package/dsh-docs/subsystems/sandbox.md +220 -0
  185. package/dsh-docs/subsystems/sandbox.zh.md +220 -0
  186. package/dsh-docs/subsystems/schedule.md +192 -0
  187. package/dsh-docs/subsystems/schedule.zh.md +192 -0
  188. package/dsh-docs/subsystems/scope.md +59 -0
  189. package/dsh-docs/subsystems/scope.zh.md +59 -0
  190. package/dsh-docs/subsystems/session-projection.md +354 -0
  191. package/dsh-docs/subsystems/session-projection.zh.md +354 -0
  192. package/dsh-docs/subsystems/session-query.md +509 -0
  193. package/dsh-docs/subsystems/session-query.zh.md +509 -0
  194. package/dsh-docs/subsystems/session-reference.md +219 -0
  195. package/dsh-docs/subsystems/session-reference.zh.md +219 -0
  196. package/dsh-docs/subsystems/session-telemetry.md +194 -0
  197. package/dsh-docs/subsystems/session-telemetry.zh.md +194 -0
  198. package/dsh-docs/subsystems/session-title.md +204 -0
  199. package/dsh-docs/subsystems/session-title.zh.md +204 -0
  200. package/dsh-docs/subsystems/session.md +1155 -0
  201. package/dsh-docs/subsystems/session.zh.md +1159 -0
  202. package/dsh-docs/subsystems/settings.md +405 -0
  203. package/dsh-docs/subsystems/settings.zh.md +405 -0
  204. package/dsh-docs/subsystems/shell.md +303 -0
  205. package/dsh-docs/subsystems/shell.zh.md +303 -0
  206. package/dsh-docs/subsystems/sidebar-right.md +148 -0
  207. package/dsh-docs/subsystems/sidebar-right.zh.md +148 -0
  208. package/dsh-docs/subsystems/skills.md +354 -0
  209. package/dsh-docs/subsystems/skills.zh.md +354 -0
  210. package/dsh-docs/subsystems/slots.md +175 -0
  211. package/dsh-docs/subsystems/slots.zh.md +175 -0
  212. package/dsh-docs/subsystems/spill.md +117 -0
  213. package/dsh-docs/subsystems/spill.zh.md +117 -0
  214. package/dsh-docs/subsystems/storage.md +260 -0
  215. package/dsh-docs/subsystems/storage.zh.md +260 -0
  216. package/dsh-docs/subsystems/subagent.md +766 -0
  217. package/dsh-docs/subsystems/subagent.zh.md +770 -0
  218. package/dsh-docs/subsystems/subprocess.md +324 -0
  219. package/dsh-docs/subsystems/subprocess.zh.md +324 -0
  220. package/dsh-docs/subsystems/system-prompt.md +220 -0
  221. package/dsh-docs/subsystems/system-prompt.zh.md +220 -0
  222. package/dsh-docs/subsystems/terminal.md +184 -0
  223. package/dsh-docs/subsystems/terminal.zh.md +184 -0
  224. package/dsh-docs/subsystems/todo.md +32 -0
  225. package/dsh-docs/subsystems/todo.zh.md +32 -0
  226. package/dsh-docs/subsystems/token-meter.md +105 -0
  227. package/dsh-docs/subsystems/token-meter.zh.md +105 -0
  228. package/dsh-docs/subsystems/tools.md +720 -0
  229. package/dsh-docs/subsystems/tools.zh.md +720 -0
  230. package/dsh-docs/subsystems/typert.md +343 -0
  231. package/dsh-docs/subsystems/typert.zh.md +343 -0
  232. package/dsh-docs/subsystems/user-questions.md +178 -0
  233. package/dsh-docs/subsystems/user-questions.zh.md +178 -0
  234. package/dsh-docs/subsystems/web-client.md +95 -0
  235. package/dsh-docs/subsystems/web-client.zh.md +95 -0
  236. package/dsh-docs/subsystems/web-server.md +154 -0
  237. package/dsh-docs/subsystems/web-server.zh.md +154 -0
  238. package/dsh-docs/subsystems/web.md +206 -0
  239. package/dsh-docs/subsystems/web.zh.md +206 -0
  240. package/dsh-docs/subsystems/webhook.md +70 -0
  241. package/dsh-docs/subsystems/webhook.zh.md +70 -0
  242. package/dsh-docs/subsystems/workflow.md +278 -0
  243. package/dsh-docs/subsystems/workflow.zh.md +278 -0
  244. package/dsh-docs/subsystems/workspace.md +321 -0
  245. package/dsh-docs/subsystems/workspace.zh.md +321 -0
  246. package/dsh-docs/testing.md +54 -0
  247. package/dsh-docs/testing.zh.md +54 -0
  248. package/dsh-docs/tool-catalog.md +2225 -0
  249. package/dsh-docs/tool-catalog.zh.md +2233 -0
  250. package/dsh-docs/tool-execution-pipeline.md +62 -0
  251. package/dsh-docs/tool-execution-pipeline.zh.md +64 -0
  252. package/dsh-docs/user/develop/basic/config.md +106 -0
  253. package/dsh-docs/user/develop/basic/config.zh.md +106 -0
  254. package/dsh-docs/user/develop/basic/index.md +144 -0
  255. package/dsh-docs/user/develop/basic/index.zh.md +144 -0
  256. package/dsh-docs/user/develop/basic/publish.md +183 -0
  257. package/dsh-docs/user/develop/basic/publish.zh.md +183 -0
  258. package/dsh-docs/user/develop/basic/tool.md +52 -0
  259. package/dsh-docs/user/develop/basic/tool.zh.md +52 -0
  260. package/dsh-docs/user/develop/framework/events.md +143 -0
  261. package/dsh-docs/user/develop/framework/events.zh.md +143 -0
  262. package/dsh-docs/user/develop/framework/index.md +137 -0
  263. package/dsh-docs/user/develop/framework/index.zh.md +137 -0
  264. package/dsh-docs/user/develop/framework/service.md +148 -0
  265. package/dsh-docs/user/develop/framework/service.zh.md +150 -0
  266. package/dsh-docs/user/develop/practice/dynamic-cordis.md +15 -0
  267. package/dsh-docs/user/develop/practice/dynamic-cordis.zh.md +15 -0
  268. package/dsh-docs/user/develop/practice/index.md +155 -0
  269. package/dsh-docs/user/develop/practice/index.zh.md +155 -0
  270. package/dsh-docs/user/develop/practice/llm-adapter.md +189 -0
  271. package/dsh-docs/user/develop/practice/llm-adapter.zh.md +189 -0
  272. package/dsh-docs/user/guide/github-review.md +102 -0
  273. package/dsh-docs/user/guide/github-review.zh.md +102 -0
  274. package/dsh-docs/user/guide/index.md +30 -0
  275. package/dsh-docs/user/guide/index.zh.md +30 -0
  276. package/dsh-docs/user/guide/mcp-memory.md +101 -0
  277. package/dsh-docs/user/guide/mcp-memory.zh.md +101 -0
  278. package/dsh-docs/user/guide/network-proxy.md +85 -0
  279. package/dsh-docs/user/guide/network-proxy.zh.md +85 -0
  280. package/dsh-docs/user/guide/providers.md +190 -0
  281. package/dsh-docs/user/guide/providers.zh.md +190 -0
  282. package/dsh-docs/user/guide/python-sdk.md +150 -0
  283. package/dsh-docs/user/guide/python-sdk.zh.md +150 -0
  284. package/dsh-docs/user/guide/schedule.md +21 -0
  285. package/dsh-docs/user/guide/schedule.zh.md +21 -0
  286. package/dsh-docs/user/index.md +11 -0
  287. package/dsh-docs/user/index.zh.md +11 -0
  288. package/dsh-docs/web-styling.md +29 -0
  289. package/dsh-docs/web-styling.zh.md +29 -0
  290. package/eval-description.md +33 -0
  291. package/lib/client/index.js +327 -88
  292. package/lib/fs-aware/sandbox-plugin.d.ts +71 -0
  293. package/lib/fs-aware/sandbox-plugin.js +249 -0
  294. package/lib/index.d.ts +22 -22
  295. package/lib/index.js +3095 -3204
  296. package/lib/lsp-server-registry-DkaYmTwt.js +972 -0
  297. package/lib/lsp-server-registry-_hk-Wcia.js +3 -0
  298. package/lib/py-sdk-Chvy92MB.js +178 -0
  299. package/lib/py-sdk.d.ts +19 -2
  300. package/lib/py-sdk.js +2 -2
  301. package/lib/wrap-JFjcWwZf.js +747 -0
  302. package/package.json +9 -3
  303. package/url-schemes-instruction.md +22 -0
  304. package/control-prompt.md +0 -37
  305. package/docs/50_test-reports/v0.1.8d_artifacts/README.md +0 -138
  306. package/docs/50_test-reports/v0.1.8d_artifacts/code-mode-repl-only.observation.md +0 -74
  307. package/docs/50_test-reports/v0.1.8d_artifacts/dsh-session-session-4a293388-9ae1-474b-87a0-9e17bb556d94.jsonl +0 -3890
  308. package/docs/50_test-reports/v0.1.8d_artifacts/dsh-session-session-4a293388-9ae1-474b-87a0-9e17bb556d94.w-sample-0435.jsonl +0 -544
  309. package/docs/50_test-reports/v0.1.8d_artifacts/functions.json +0 -592
  310. package/docs/50_test-reports/v0.1.8d_artifacts/skills-catalog.snapshot.md +0 -30
  311. package/docs/50_test-reports/v0.1.8d_artifacts/tools-sdk.output-schemas.json +0 -1236
  312. package/docs/50_test-reports/v0.1.8d_artifacts/tools-sdk.python.txt +0 -592
  313. package/docs/50_test-reports/v0.1.8d_artifacts/tools-sdk.typescript.txt +0 -516
  314. package/docs/50_test-reports/v0.1.8d_artifacts/wire-vs-transcription.diff.md +0 -54
  315. package/docs/50_test-reports/v0.2.0b_artifacts/f2probe/Cargo.lock +0 -7
  316. package/docs/50_test-reports/v0.2.0b_artifacts/f2probe/Cargo.toml +0 -6
  317. package/docs/50_test-reports/v0.2.0b_artifacts/f2probe/src/bin/messy.rs +0 -8
  318. package/docs/50_test-reports/v0.2.0b_artifacts/f2probe/src/main.rs +0 -4
  319. package/docs/50_test-reports/v0.2.0b_artifacts/hashline-probe.md +0 -5
  320. package/docs/50_test-reports/v0.2.0b_artifacts/slowprobe/Cargo.lock +0 -7
  321. package/docs/50_test-reports/v0.2.0b_artifacts/slowprobe/Cargo.toml +0 -7
  322. package/docs/50_test-reports/v0.2.0b_artifacts/slowprobe/build.rs +0 -4
  323. package/docs/50_test-reports/v0.2.0b_artifacts/slowprobe/src/main.rs +0 -13
  324. package/docs/60_exploration-and-research/cordis-research.md +0 -350
  325. package/docs/60_exploration-and-research/dsh-web-profile-package-map.md +0 -186
  326. package/docs/60_exploration-and-research/dsh-web-ui-slot-system-research.md +0 -310
  327. package/docs/60_exploration-and-research/dsh-webui-strip-boundary-research.md +0 -300
  328. package/docs/60_exploration-and-research/ios-chat-app-bridge-research.md +0 -324
  329. package/docs/60_exploration-and-research/web-frontend-composability-research.md +0 -191
  330. package/docs/REPL-/345/267/245/345/205/267/350/260/203/347/224/250-/346/210/252/346/226/255/350/257/212/346/226/255.md +0 -110
  331. package/docs/adr/0001-bridge-tool-layer-not-service-layer.md +0 -14
  332. package/docs/adr/0002-masking-is-presentation-only.md +0 -15
  333. package/docs/plans/A2A-messaging-channel-test-archive.md +0 -256
  334. package/docs/plans/code-mode-vs-rlm-ipython-comparison.md +0 -137
  335. package/docs/plans/dashr-blueprint-review.md +0 -201
  336. package/docs/plans/dashr-blueprint.md +0 -561
  337. package/docs/plans/dashr-compaction-window-and-archive.md +0 -307
  338. package/docs/plans/dashr-profile-layer-feasibility.md +0 -367
  339. package/docs/plans/dashr-sandbox-escalation-semantics-gap.md +0 -171
  340. package/docs/plans/dashr-security-sandbox-analysis.md +0 -187
  341. package/docs/plans/dashr-surface-invariant-and-omp-imports.md +0 -97
  342. package/docs/plans/ipython-kernel-interactive-interface-test-report.md +0 -152
  343. package/docs/plans/kernel-refactoring/Dash-IPython-Control-Prompt-draft.md +0 -146
  344. package/docs/plans/kernel-refactoring/Dash-IPython-Control-Prompt-draft_v3.md +0 -50
  345. package/docs/plans/kernel-refactoring/Dash-IPython-Control-Prompt-draft_v4.md +0 -79
  346. package/docs/plans/kernel-refactoring/Dash-vs-PrimeAgent-systemprompt-toolcatalog-comparison.md +0 -138
  347. package/docs/plans/kernel-refactoring/RLM-system-prompt-injection-gap-report.md +0 -161
  348. package/docs/plans/kernel-refactoring/V0.1.5-development-plan.md +0 -109
  349. package/docs/plans/kernel-refactoring/actinoable-surface-to-llm-in-agent-runtime_dsh.md +0 -50
  350. package/docs/plans/kernel-refactoring/actinoable-surface-to-llm-in-agent-runtime_prime.md +0 -113
  351. package/docs/plans/recallable-compaction.md +0 -147
  352. package/docs/plans/spike-tag-repro.mjs +0 -102
  353. package/docs/plans/upstream-analysis.md +0 -128
  354. package/docs/v0.1.8-improved-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -142
  355. package/docs/v0.1.8-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -193
  356. package/docs/v0.1.8b-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -96
  357. package/docs/v0.1.8c-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -127
  358. package/docs/v0.1.8d-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -150
  359. package/docs/v0.1.8d_artifacts/README.md +0 -138
  360. package/docs/v0.1.8d_artifacts/code-mode-repl-only.observation.md +0 -74
  361. package/docs/v0.1.8d_artifacts/dsh-session-session-4a293388-9ae1-474b-87a0-9e17bb556d94.jsonl +0 -3890
  362. package/docs/v0.1.8d_artifacts/dsh-session-session-4a293388-9ae1-474b-87a0-9e17bb556d94.w-sample-0435.jsonl +0 -544
  363. package/docs/v0.1.8d_artifacts/functions.json +0 -592
  364. package/docs/v0.1.8d_artifacts/skills-catalog.snapshot.md +0 -30
  365. package/docs/v0.1.8d_artifacts/tools-sdk.output-schemas.json +0 -1236
  366. package/docs/v0.1.8d_artifacts/tools-sdk.python.txt +0 -592
  367. package/docs/v0.1.8d_artifacts/tools-sdk.typescript.txt +0 -516
  368. package/docs/v0.1.8d_artifacts/wire-vs-transcription.diff.md +0 -54
  369. package/docs/v0.1.8e-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -224
  370. package/docs/v0.1.9a-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -168
  371. package/docs/v0.2.0b-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -123
  372. package/docs/v0.2.0b_artifacts/f2probe/Cargo.lock +0 -7
  373. package/docs/v0.2.0b_artifacts/f2probe/Cargo.toml +0 -6
  374. package/docs/v0.2.0b_artifacts/f2probe/src/bin/messy.rs +0 -8
  375. package/docs/v0.2.0b_artifacts/f2probe/src/main.rs +0 -4
  376. package/docs/v0.2.0b_artifacts/hashline-probe.md +0 -5
  377. package/docs/v0.2.0b_artifacts/slowprobe/Cargo.lock +0 -7
  378. package/docs/v0.2.0b_artifacts/slowprobe/Cargo.toml +0 -7
  379. package/docs/v0.2.0b_artifacts/slowprobe/build.rs +0 -4
  380. package/docs/v0.2.0b_artifacts/slowprobe/src/main.rs +0 -13
  381. package/docs/v0.2.1-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -110
  382. package/docs/v0.2.1b-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -86
  383. package/docs/v0.2.1c-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -66
  384. package/lib/py-sdk-BCaOGYz7.d.ts +0 -125
  385. package/lib/py-sdk-CbgYiX8O.js +0 -691
@@ -0,0 +1,1075 @@
1
+ <!-- Generated by scripts/gen-persistence-catalog.ts — do not edit by hand.
2
+ Run `pnpm run gen-persistence-catalog` to regenerate. -->
3
+
4
+ # Session Persistence Event Catalog
5
+
6
+ Every event type that can appear in a session's durable event log: the complete persisted `SessionEvent` envelope and each member of the merge-extensible `SessionEventMap` — the owning vocabulary in `@deepseek-ai/dsh-session` plus every plugin declaration merge into `@deepseek-ai/dsh-session/types` in this repo — with source JSDoc, full payload declaration, surface badge, and declaration site. It complements [session.md](subsystems/session.md) (surface ordering and the `deriveMessages()` projection), [persistence.md](subsystems/persistence.md) (how the log is made durable), and the generated region of [session.md](subsystems/session.md#cordis-surface) (the live bus wiring — a log event is NOT a cordis event; it reaches listeners via the single `session/event` emit).
7
+
8
+ This file is GENERATED from source (`scripts/gen-persistence-catalog.ts`) and verified fresh by `pnpm run verify-persistence-catalog` (part of `doc-sync`) — do not edit it by hand. Declaration blocks retain the source declaration and nested property JSDoc, removing only the indentation imposed by a containing interface/module, and use a `ts persistence-catalog` fence (skipped by doc-typecheck because declarations reference types from their owning modules). Type names in a payload link to the page that documents them. See [the persistence-log-catalog Agent Note](../.agents/notes/archived/process/2026-07-04-persistence-log-catalog.md).
9
+
10
+ The envelope declarations below compose each event's `type`, monotonic `seq`, epoch-ms `time`, `data`, the optional `ignorable` unknown-type skip marker, and the conditional `surfaceOp`/`sourceEventSeqs` fields. **surface** marks a `SurfaceEventType` member: it produces an LLM message and declares how it joins the surface list. **log-only** marks everything else: a durable, replayable record with no derived-history contribution. Every payload is JSON-serializable (enforced at `Session.append`). Current writers stamp `SESSION_FORMAT_VERSION`; supported historical artifacts reach this current vocabulary through the build-static adjacent migration catalog ([the version lifecycle](subsystems/persistence.md)). Scope: the packages in this repo; a downstream plugin can merge further current-version event types, which are outside this catalog by construction and require an explicit disposition at a later format edge.
11
+
12
+ ## Event envelope
13
+
14
+ ```ts persistence-catalog
15
+ /** The appendable event-type keys of {@link SessionEventMap}, plugin-merged extensions included. */
16
+ export type SessionEventType = keyof SessionEventMap
17
+
18
+ /**
19
+ * The subset of {@link SessionEventType} values whose events produce LLM
20
+ * messages and are eligible to appear on the ordered surface. Only these
21
+ * event types may carry {@link SurfaceOp}; user and tool events may also cite
22
+ * earlier sources through {@link SessionEvent.sourceEventSeqs}.
23
+ */
24
+ export type SurfaceEventType =
25
+ | 'user/message'
26
+ | 'assistant/message'
27
+ | 'tool/result'
28
+
29
+ /**
30
+ * How a session event entered the ordered surface. Only valid on
31
+ * {@link SurfaceEventType} events.
32
+ *
33
+ * - `'append'`: added to the tail — normal path for user/assistant/tool
34
+ * messages.
35
+ * - `{ op: 'replace', start, end }`: replaces surface nodes from `start`
36
+ * (inclusive) through `end` (inclusive) with this node. Both must exist as
37
+ * surface nodes in the current surface. `start === end` replaces a single
38
+ * node. The node's {@link SessionEvent.sourceEventSeqs} must include every
39
+ * shadowed surface node. Used by compaction; any surface-replacing producer
40
+ * may use it.
41
+ */
42
+ export type SurfaceOp =
43
+ | 'append'
44
+ | { op: 'replace'; start: SessionSeq; end: SessionSeq }
45
+
46
+ /**
47
+ * One immutable entry in the session log.
48
+ *
49
+ * A proper discriminated union over `type` (not independent `type`/`data`
50
+ * unions), so `switch (event.type)` narrows `event.data` without casts.
51
+ *
52
+ * The {@link sourceEventSeqs} and {@link surfaceOp} fields are conditional:
53
+ * they only exist on {@link SurfaceEventType} variants (`user/message`,
54
+ * `assistant/message`, `tool/result`).
55
+ * Non-surface events (boundary markers, attempts, errors) never carry
56
+ * surface metadata — the compiler enforces this at `Session.append()`
57
+ * call sites.
58
+ */
59
+ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
60
+ [K in SessionEventType]: {
61
+ type: K
62
+ /** Monotonic sequence number within the session. */
63
+ seq: SessionSeq
64
+ /** Unix epoch milliseconds. */
65
+ time: number
66
+ data: SessionEventMap[K]
67
+ /**
68
+ * Marks an event a reader may safely skip when it does not recognize
69
+ * `type`. Absent means required: a reader meeting an unrecognized type
70
+ * without this marker MUST refuse to reconstruct the session instead of
71
+ * silently dropping the event, because an unrecognized required event may
72
+ * change how the rest of the log is interpreted. A writer sets `true` only
73
+ * on purely informational records whose loss cannot affect reconstruction;
74
+ * defaulting to required means a forgotten marker over-refuses (an
75
+ * inconvenience) rather than silently resuming a gutted session.
76
+ */
77
+ ignorable?: true
78
+ } & (K extends SurfaceEventType ? {
79
+ /**
80
+ * Seq numbers of earlier events that this event cites as sources, such as
81
+ * the surface nodes shadowed by a compaction replacement. A v2
82
+ * `assistant/message` embeds its provider stream and cannot carry this field.
83
+ */
84
+ sourceEventSeqs?: SessionSeq[]
85
+ /** How this event entered the surface; absent for non-surface events. */
86
+ surfaceOp?: SurfaceOp
87
+ } : object)
88
+ }[T]
89
+ ```
90
+
91
+ Sources: [`packages/core/session/src/types.ts:379`](../packages/core/session/src/types.ts) · [`packages/core/session/src/types.ts:387`](../packages/core/session/src/types.ts) · [`packages/core/session/src/types.ts:416`](../packages/core/session/src/types.ts) · [`packages/core/session/src/types.ts:447`](../packages/core/session/src/types.ts)
92
+
93
+ ## Events
94
+
95
+ ### `agent/*`
96
+
97
+ <a id="agentinboxspliced--log-only"></a>
98
+
99
+ #### `agent/inbox/spliced` — log-only
100
+
101
+ ```ts persistence-catalog
102
+ /**
103
+ * One normalized mutation of an agent's durable pending-message lists.
104
+ * Live dispatch precedes projection mutation, so synchronous observers may
105
+ * read the pre-splice inbox to recover the removed messages.
106
+ */
107
+ 'agent/inbox/spliced': {
108
+ target: InboxTarget
109
+ start: number
110
+ removedCount?: number
111
+ inserted: UserMessage[]
112
+ outcome?: 'canceled'
113
+ }
114
+ ```
115
+
116
+ Source: [`packages/core/agent/src/types.ts:58`](../packages/core/agent/src/types.ts)
117
+
118
+ ### `agent-preset/*`
119
+
120
+ <a id="agent-presetselected--log-only"></a>
121
+
122
+ #### `agent-preset/selected` — log-only
123
+
124
+ ```ts persistence-catalog
125
+ /**
126
+ * The session's agent preset was chosen after creation, while the session
127
+ * was still blank. Log-only: it records the composition later turns ran
128
+ * under, so a resumed or forked session rebuilds the same one instead of
129
+ * the header's creation-time value.
130
+ */
131
+ 'agent-preset/selected': { agentPreset: string }
132
+ ```
133
+
134
+ Source: [`packages/preset/agent-presets/src/session.ts:28`](../packages/preset/agent-presets/src/session.ts)
135
+
136
+ ### `approval/*`
137
+
138
+ <a id="approvalasked--log-only"></a>
139
+
140
+ #### `approval/asked` — log-only
141
+
142
+ ```ts persistence-catalog
143
+ /**
144
+ * An approval question was put to the answerer chain — log-only audit
145
+ * (like `hook/*`; NOT a surface event, carries no `surfaceOp`). `id` pairs
146
+ * it with the `approval/decided` that always follows; `toolName` is the
147
+ * tool the question is about, `callId` the exact tool call when the asker
148
+ * had one, `reason` the asker's human-readable explanation (e.g. a hook's
149
+ * permission-decision reason).
150
+ */
151
+ 'approval/asked': {
152
+ id: ApprovalRequestId
153
+ toolName: string
154
+ callId?: ToolCallId
155
+ reason?: string
156
+ }
157
+ ```
158
+
159
+ Types: [ToolCallId](subsystems/core.md)
160
+
161
+ Source: [`packages/interaction/user-approval/src/types.ts:44`](../packages/interaction/user-approval/src/types.ts)
162
+
163
+ <a id="approvaldecided--log-only"></a>
164
+
165
+ #### `approval/decided` — log-only
166
+
167
+ ```ts persistence-catalog
168
+ /**
169
+ * The outcome of a prior `approval/asked` (same `id`) — log-only audit.
170
+ * Exactly one per ask, appended when the outcome is known: a decision, a
171
+ * cancellation, or the fail-closed `'unavailable'`.
172
+ */
173
+ 'approval/decided': {
174
+ id: ApprovalRequestId
175
+ outcome: ApprovalOutcome
176
+ }
177
+ ```
178
+
179
+ Source: [`packages/interaction/user-approval/src/types.ts:55`](../packages/interaction/user-approval/src/types.ts)
180
+
181
+ <a id="approvalpolicy--log-only"></a>
182
+
183
+ #### `approval/policy` — log-only
184
+
185
+ ```ts persistence-catalog
186
+ /**
187
+ * The session's approval policy was switched — log-only, durable,
188
+ * replayable, never in the model transcript (the model learns the policy
189
+ * from the runtime-context snapshot and live switch notices). The LAST
190
+ * such event is the session's override.
191
+ * `source: 'delegation'` marks an override seeded into a child; an absent
192
+ * source is a runtime switch.
193
+ */
194
+ 'approval/policy': {
195
+ policy: ApprovalPolicy
196
+ /** Marks an override seeded into a child at delegation. */
197
+ source?: 'delegation'
198
+ }
199
+ ```
200
+
201
+ Source: [`packages/interaction/user-approval/src/index.ts:33`](../packages/interaction/user-approval/src/index.ts)
202
+
203
+ ### `assistant/*`
204
+
205
+ <a id="assistantattempt--log-only"></a>
206
+
207
+ #### `assistant/attempt` — log-only
208
+
209
+ ```ts persistence-catalog
210
+ /**
211
+ * One model attempt that committed no surface message. The embedded stream
212
+ * preserves a failed, retried, cancelled, or stream-error attempt that
213
+ * reached settlement without fabricating model-visible history.
214
+ */
215
+ 'assistant/attempt': { turn: number; step: number; stream: AssistantStreamRecord[] }
216
+ ```
217
+
218
+ Source: [`packages/core/session/src/types.ts:313`](../packages/core/session/src/types.ts)
219
+
220
+ <a id="assistantmessage--surface"></a>
221
+
222
+ #### `assistant/message` — surface
223
+
224
+ ```ts persistence-catalog
225
+ /**
226
+ * Assembled assistant message for one step (derived history uses this).
227
+ * Carries the step's `usage` when the adapter reported token accounting, so
228
+ * the model output and its accounting travel together (there is no separate
229
+ * usage record). `usage` is absent when the adapter reported none. A turn
230
+ * cancelled mid-stream finalizes its delivered text/reasoning prefix as this
231
+ * event with `interrupted: true`; undispatched tool calls are absent. The
232
+ * marker distinguishes that prefix without re-deriving interruption from turn
233
+ * boundaries. An aborted turn with no such event streamed no visible content.
234
+ */
235
+ 'assistant/message': {
236
+ turn: number
237
+ step: number
238
+ message: AssistantMessage
239
+ /** Exact timed model stream, compacted without joining delta boundaries. */
240
+ stream: AssistantStreamRecord[]
241
+ usage?: TokenUsage
242
+ interrupted?: true
243
+ }
244
+ ```
245
+
246
+ Types: [TokenUsage](subsystems/llm-streaming.md)
247
+
248
+ Source: [`packages/core/session/src/types.ts:299`](../packages/core/session/src/types.ts)
249
+
250
+ ### `command/*`
251
+
252
+ <a id="commanddone--log-only"></a>
253
+
254
+ #### `command/done` — log-only
255
+
256
+ ```ts persistence-catalog
257
+ /**
258
+ * The paired command settled. `kind`/`text` carry the handler's verbatim
259
+ * outcome (a thrown/aborted handler settles as `kind: 'error'` with the
260
+ * rendered failure). A successful command may identify the earlier
261
+ * authoritative domain event for a richer client-computed presentation.
262
+ */
263
+ 'command/done': {
264
+ commandId: CommandId
265
+ kind: 'success' | 'error'
266
+ text?: string
267
+ sourceEventSeq?: import('@deepseek-ai/dsh-session/types').SessionSeq
268
+ }
269
+ ```
270
+
271
+ Source: [`packages/interaction/commands/src/types.ts:110`](../packages/interaction/commands/src/types.ts)
272
+
273
+ <a id="commandrun--log-only"></a>
274
+
275
+ #### `command/run` — log-only
276
+
277
+ ```ts persistence-catalog
278
+ /**
279
+ * A resolved slash command entered its handler. Log-only (never model
280
+ * surface); paired with `command/done` by `commandId`, mirroring the
281
+ * `tool/call`↔`tool/result` pairing. The payload is structured — `name`
282
+ * and `args` are `parseCommand`'s own split (name and verbatim rawInput,
283
+ * separator whitespace included), so a consumer (a projection unit
284
+ * folding its own command records, a rich command card) never re-parses
285
+ * a line. `args` is absent when the definition sets `recordInput: false`
286
+ * because an authoritative domain event owns the input payload.
287
+ */
288
+ 'command/run': { commandId: CommandId; name: string; args?: string; source: CommandSource }
289
+ ```
290
+
291
+ Source: [`packages/interaction/commands/src/types.ts:103`](../packages/interaction/commands/src/types.ts)
292
+
293
+ ### `compaction/*`
294
+
295
+ <a id="compactionend--log-only"></a>
296
+
297
+ #### `compaction/end` — log-only
298
+
299
+ ```ts persistence-catalog
300
+ /**
301
+ * Marks the end of a compaction — log-only, releases the lock. Its owner
302
+ * matches `compaction/start`; `error` records an unsuccessful attempt.
303
+ */
304
+ 'compaction/end': { compactionId: CompactionId; sourceCommandId?: CommandId; turn: number | null; error?: string }
305
+ ```
306
+
307
+ Source: [`packages/compaction/compaction/src/types.ts:72`](../packages/compaction/compaction/src/types.ts)
308
+
309
+ <a id="compactionprune--log-only"></a>
310
+
311
+ #### `compaction/prune` — log-only
312
+
313
+ ```ts persistence-catalog
314
+ /**
315
+ * Shadow price of one model-free prune replacement — log-only, no
316
+ * surfaceOp. The shared shadow-price protocol: a surface `replace` event
317
+ * is priced by the metering event immediately before it (`compaction/summary`
318
+ * for a summarizing compaction, this event for a prune), which states the
319
+ * heuristic token price of the exact replaced range so a pure consumer
320
+ * can subtract it without retaining per-node prices. The replacement MUST
321
+ * be appended synchronously right after this event.
322
+ */
323
+ 'compaction/prune': {
324
+ /** The replaced range's first and last surface-node seqs (a surface-position span, like {@link CompactionResult.shadowedRange}). */
325
+ shadowedRange: { start: SessionSeq; end: SessionSeq }
326
+ /** The seqs of all shadowed surface nodes, in surface order. */
327
+ shadowedSeqs: SessionSeq[]
328
+ /** Heuristic price of the shadowed content under the token-meter's fixed estimator. */
329
+ shadowedTokenCount: number
330
+ }
331
+ ```
332
+
333
+ Source: [`packages/compaction/compaction/src/types.ts:82`](../packages/compaction/compaction/src/types.ts)
334
+
335
+ <a id="compactionstart--log-only"></a>
336
+
337
+ #### `compaction/start` — log-only
338
+
339
+ ```ts persistence-catalog
340
+ /**
341
+ * Marks the start of a compaction — log-only, holds the lock until
342
+ * `compaction/end`. A numbered owner is strictly enclosed by that open turn;
343
+ * `null` identifies a standalone manual transaction between turns.
344
+ */
345
+ 'compaction/start': { compactionId: CompactionId; sourceCommandId?: CommandId; turn: number | null }
346
+ ```
347
+
348
+ Source: [`packages/compaction/compaction/src/types.ts:24`](../packages/compaction/compaction/src/types.ts)
349
+
350
+ <a id="compactionsummary--log-only"></a>
351
+
352
+ #### `compaction/summary` — log-only
353
+
354
+ ```ts persistence-catalog
355
+ /**
356
+ * Completed summary, its inputs, and its model call facts — log-only, no surfaceOp.
357
+ * The summary content is in `data.summary`; the actual surface replacement
358
+ * is performed by the immediately following `user/message` event that
359
+ * shadows the compacted range. That adjacency is contractual — the
360
+ * shadowed pricing fields are the replacement's shadow price, so a
361
+ * consumer may pair a replacement with the metering event directly
362
+ * before it (`compaction/prune` documents the shared protocol).
363
+ */
364
+ 'compaction/summary': {
365
+ compactionId: CompactionId
366
+ sourceCommandId?: CommandId
367
+ summary: ContentBlock[]
368
+ shadowedRange: { start: SessionSeq; end: SessionSeq }
369
+ shadowedSeqs: SessionSeq[]
370
+ shadowedTokenCount: number
371
+ /** The provider route that wrote the summary. */
372
+ provider: string
373
+ /**
374
+ * The model that wrote the summary — the summarize call's envelope,
375
+ * reported by the backend that made the call, logged so the one-shot
376
+ * request is reconstructable from log + code and "which model wrote
377
+ * this summary" has a durable answer (the reconstructability Agent Note).
378
+ */
379
+ model: string
380
+ /** The generation cap the summarize call sent, when one applied. */
381
+ maxTokens?: number
382
+ /** Provider-reported token usage for the summarization request, when emitted. */
383
+ usage?: TokenUsage
384
+ } & (
385
+ | {
386
+ /** Complete provider output before the backend's safe summary projection. */
387
+ rawOutput: ContentBlock[]
388
+ /** Identifies exactly one call through this context's `ctx.llm.stream()`. */
389
+ llmStreamCall: true
390
+ }
391
+ | {
392
+ /** Optional complete output from an unmarked template, remote, or other summarizer. */
393
+ rawOutput?: ContentBlock[]
394
+ /** An unmarked summary does not identify a call through this context's LLM seam. */
395
+ llmStreamCall?: never
396
+ }
397
+ )
398
+ ```
399
+
400
+ Types: [ContentBlock](subsystems/core.md) · [TokenUsage](subsystems/llm-streaming.md)
401
+
402
+ Source: [`packages/compaction/compaction/src/types.ts:34`](../packages/compaction/compaction/src/types.ts)
403
+
404
+ ### `feedback/*`
405
+
406
+ <a id="feedbackrecord--log-only"></a>
407
+
408
+ #### `feedback/record` — log-only
409
+
410
+ ```ts persistence-catalog
411
+ /**
412
+ * One recorded human remark about this session. Log-only and independent
413
+ * of its trigger; it never enters model context or derived history.
414
+ */
415
+ 'feedback/record': { text: string }
416
+ ```
417
+
418
+ Source: [`packages/feedback/command-feedback/src/index.ts:62`](../packages/feedback/command-feedback/src/index.ts)
419
+
420
+ ### `goal/*`
421
+
422
+ <a id="goalchange--log-only"></a>
423
+
424
+ #### `goal/change` — log-only
425
+
426
+ ```ts persistence-catalog
427
+ /**
428
+ * Complete post-mutation goal state or clear tombstone.
429
+ */
430
+ 'goal/change': GoalChangeMeta
431
+ ```
432
+
433
+ Source: [`packages/goal/goal/src/domain.ts:66`](../packages/goal/goal/src/domain.ts)
434
+
435
+ ### `hook/*`
436
+
437
+ <a id="hookinvoked--log-only"></a>
438
+
439
+ #### `hook/invoked` — log-only
440
+
441
+ ```ts persistence-catalog
442
+ /**
443
+ * A hook command was invoked at a hook point — a log-only record (like
444
+ * `compaction/*`; NOT a {@link SurfaceEventType}, carries no `surfaceOp`).
445
+ * `dialect` is the bridge that ran it (`claude`/`codex`), `point`
446
+ * the hook point (`PreToolUse`, `Stop`, …), `matcher` the matcher-group
447
+ * pattern that selected it (absent for match-all), `handlerId` a stable id
448
+ * for the command (so an invoked/result pair correlates). `turn` is the open
449
+ * turn the invocation lives inside.
450
+ */
451
+ 'hook/invoked': {
452
+ turn: number
453
+ point: string
454
+ dialect: HookDialect
455
+ matcher?: string
456
+ handlerId: string
457
+ }
458
+ ```
459
+
460
+ Source: [`packages/hooks/hook-protocol/src/types.ts:19`](../packages/hooks/hook-protocol/src/types.ts)
461
+
462
+ <a id="hookresult--log-only"></a>
463
+
464
+ #### `hook/result` — log-only
465
+
466
+ ```ts persistence-catalog
467
+ /**
468
+ * Log-only outcome paired to `hook/invoked` by `handlerId`. Decision is the
469
+ * parsed permission result, `stop` for `continue:false`, or `pass`; exit code
470
+ * may be absent, stderr is bounded, and duration is wall-clock runtime.
471
+ */
472
+ 'hook/result': {
473
+ turn: number
474
+ point: string
475
+ handlerId: string
476
+ decision: string
477
+ exitCode?: number
478
+ stderrSummary?: string
479
+ durationMs: number
480
+ }
481
+ ```
482
+
483
+ Source: [`packages/hooks/hook-protocol/src/types.ts:31`](../packages/hooks/hook-protocol/src/types.ts)
484
+
485
+ ### `llm/*`
486
+
487
+ <a id="llmretry--log-only"></a>
488
+
489
+ #### `llm/retry` — log-only
490
+
491
+ ```ts persistence-catalog
492
+ /** Durable, non-surface record of one provider-routed retry scheduled after a failed request attempt. */
493
+ 'llm/retry': LlmRetryEventData
494
+ ```
495
+
496
+ Source: [`packages/llm/llm-retry/src/types.ts:9`](../packages/llm/llm-retry/src/types.ts)
497
+
498
+ <a id="llmretry-started--log-only"></a>
499
+
500
+ #### `llm/retry-started` — log-only
501
+
502
+ ```ts persistence-catalog
503
+ /** Durable transition written after a retry wait succeeds and before the next request attempt starts. */
504
+ 'llm/retry-started': LlmRetryStartedEventData
505
+ ```
506
+
507
+ Source: [`packages/llm/llm-retry/src/types.ts:11`](../packages/llm/llm-retry/src/types.ts)
508
+
509
+ ### `model/*`
510
+
511
+ <a id="modelselection--log-only"></a>
512
+
513
+ #### `model/selection` — log-only
514
+
515
+ ```ts persistence-catalog
516
+ /**
517
+ * Complete validated model selection requested for subsequent prompt
518
+ * assembly. Log-only: it never enters derived model history.
519
+ */
520
+ 'model/selection': ModelSelection
521
+ ```
522
+
523
+ Source: [`packages/api/session-controller/src/types.ts:40`](../packages/api/session-controller/src/types.ts)
524
+
525
+ ### `permission/*`
526
+
527
+ <a id="permissionpreset--log-only"></a>
528
+
529
+ #### `permission/preset` — log-only
530
+
531
+ ```ts persistence-catalog
532
+ /**
533
+ * Records the selected preset as durable, log-only user intent. The knob
534
+ * events follow in the same turn and control execution; this event stays
535
+ * out of the model transcript and lets the permission projection unit
536
+ * preserve a selection when bundles match.
537
+ */
538
+ 'permission/preset': { preset: string }
539
+ ```
540
+
541
+ Source: [`packages/interaction/permission-presets/src/index.ts:53`](../packages/interaction/permission-presets/src/index.ts)
542
+
543
+ ### `plan/*`
544
+
545
+ <a id="planmode--log-only"></a>
546
+
547
+ #### `plan/mode` — log-only
548
+
549
+ ```ts persistence-catalog
550
+ /**
551
+ * Whether plan mode is in force from this point on: log-only, non-surface,
552
+ * whole-value replace. The last `plan/mode` wins; a log with none folds to
553
+ * inactive through the projection unit's fold.
554
+ */
555
+ 'plan/mode': { active: boolean }
556
+ ```
557
+
558
+ Source: [`packages/plan/plan-mode/src/index.ts:46`](../packages/plan/plan-mode/src/index.ts)
559
+
560
+ ### `request/*`
561
+
562
+ <a id="requestcontext--log-only"></a>
563
+
564
+ #### `request/context` — log-only
565
+
566
+ ```ts persistence-catalog
567
+ /**
568
+ * Route metadata for the next request, logged only when the route or capacity
569
+ * changes. It does not participate in request reconstruction or header equality.
570
+ */
571
+ 'request/context': RequestContext
572
+ ```
573
+
574
+ Source: [`packages/core/session/src/types.ts:352`](../packages/core/session/src/types.ts)
575
+
576
+ <a id="requestheader--log-only"></a>
577
+
578
+ #### `request/header` — log-only
579
+
580
+ ```ts persistence-catalog
581
+ /**
582
+ * Full header for the next request, appended inside its step before dispatch.
583
+ * It is log-only; the latest snapshot reconstructs the request header.
584
+ */
585
+ 'request/header': {
586
+ header: EpochHeader
587
+ reason: RequestHeaderReason
588
+ /** A changed header also begins a distinct model-message series. */
589
+ startsSeries?: true
590
+ }
591
+ ```
592
+
593
+ Source: [`packages/core/session/src/types.ts:342`](../packages/core/session/src/types.ts)
594
+
595
+ ### `sandbox/*`
596
+
597
+ <a id="sandboxmode--log-only"></a>
598
+
599
+ #### `sandbox/mode` — log-only
600
+
601
+ ```ts persistence-catalog
602
+ /**
603
+ * The session's sandbox mode was switched — log-only (like `approval/*`;
604
+ * NOT a surface event, carries no `surfaceOp`): durable and replayable,
605
+ * never in the model transcript. The LAST such event is the session's
606
+ * override (folded by the sandboxMode projection unit). `source: 'delegation'` marks
607
+ * an override seeded into a child; an absent source is a runtime switch.
608
+ */
609
+ 'sandbox/mode': {
610
+ mode: SandboxMode
611
+ /** Marks an override seeded into a child at delegation. */
612
+ source?: 'delegation'
613
+ }
614
+ ```
615
+
616
+ Source: [`packages/sandbox/sandbox-policy/src/session-mode.ts:33`](../packages/sandbox/sandbox-policy/src/session-mode.ts)
617
+
618
+ ### `schedule/*`
619
+
620
+ <a id="schedulechange--log-only"></a>
621
+
622
+ #### `schedule/change` — log-only
623
+
624
+ ```ts persistence-catalog
625
+ /**
626
+ * Versioned Schedule mutation. The owning package validates the complete
627
+ * session-local transition stream before accepting a candidate event.
628
+ */
629
+ 'schedule/change': ScheduleChange
630
+ ```
631
+
632
+ Types: [ScheduleChange](subsystems/schedule.md)
633
+
634
+ Source: [`packages/schedule/schedule/src/types.ts:219`](../packages/schedule/schedule/src/types.ts)
635
+
636
+ ### `session/*`
637
+
638
+ <a id="sessionend-seed--log-only"></a>
639
+
640
+ #### `session/end-seed` — log-only
641
+
642
+ ```ts persistence-catalog
643
+ /**
644
+ * Marks the end of a constructor seed. Events before it have smaller seq
645
+ * values and came from the seed (resume, fork, or replay); this lifecycle
646
+ * produced none of them. This log-only event is the durable projection of
647
+ * {@link Session.firstLiveSeq}.
648
+ *
649
+ * A fresh fork child owns one `{ inherited: true }` marker at its exact
650
+ * inherited-prefix cut, even when that prefix ends in an ancestor marker.
651
+ * The last tagged marker is the current Session's cut; untagged markers keep
652
+ * ordinary restore and replay lifecycle boundaries.
653
+ *
654
+ * `Session`'s constructor is the only legitimate writer. The invariant
655
+ * companion deliberately constrains nothing here, so a plugin appending one
656
+ * would silently classify every live bracket before it as seed history.
657
+ *
658
+ * An owner of a standalone open/close bracket (`compaction/start` …
659
+ * `compaction/end`) reads it because seed history and live work are otherwise
660
+ * byte-identical: an unmatched opening marker before this event belongs to
661
+ * an ended lifecycle, whatever ended it. NOT a liveness signal about other
662
+ * writers — a concurrently live session holds its own boundary elsewhere,
663
+ * so tolerating concurrent writers needs a signal beyond the log.
664
+ */
665
+ 'session/end-seed': { inherited?: true }
666
+ ```
667
+
668
+ Source: [`packages/core/session/src/types.ts:375`](../packages/core/session/src/types.ts)
669
+
670
+ <a id="sessiontitle--log-only"></a>
671
+
672
+ #### `session/title` — log-only
673
+
674
+ ```ts persistence-catalog
675
+ /**
676
+ * Latest-wins session title snapshot. Log-only: it never enters the model
677
+ * surface or derived history.
678
+ */
679
+ 'session/title': SessionTitleEventData
680
+ ```
681
+
682
+ Types: [SessionTitleEventData](subsystems/session-title.md)
683
+
684
+ Source: [`packages/session/session-title/src/index.ts:77`](../packages/session/session-title/src/index.ts)
685
+
686
+ <a id="sessiontitle-llm-request--log-only"></a>
687
+
688
+ #### `session/title-llm-request` — log-only
689
+
690
+ ```ts persistence-catalog
691
+ /** Log-only pre-dispatch record of one session-title model request. */
692
+ 'session/title-llm-request': SessionTitleLlmRequestEventData
693
+ ```
694
+
695
+ Types: [SessionTitleLlmRequestEventData](subsystems/session-title.md)
696
+
697
+ Source: [`packages/session/session-title-llm/src/index.ts:45`](../packages/session/session-title-llm/src/index.ts)
698
+
699
+ ### `session-log-deepseek/*`
700
+
701
+ <a id="session-log-deepseekdelivery-accepted--log-only"></a>
702
+
703
+ #### `session-log-deepseek/delivery-accepted` — log-only
704
+
705
+ ```ts persistence-catalog
706
+ /** Records that the configured endpoint accepted one delivery through `throughSeq`. */
707
+ 'session-log-deepseek/delivery-accepted': {
708
+ /** Session identity the accepted delivery carried; inherited fork markers retain the parent's id. */
709
+ sessionId: import('@deepseek-ai/dsh-session/types').SessionId
710
+ /** Accepted Session format generation; absence identifies version 0. */
711
+ sessionFormatVersion?: number
712
+ /** Last canonical event included in the accepted request. */
713
+ throughSeq: import('@deepseek-ai/dsh-session/types').SessionSeq
714
+ }
715
+ ```
716
+
717
+ Source: [`packages/session/session-log-deepseek/src/types.ts:59`](../packages/session/session-log-deepseek/src/types.ts)
718
+
719
+ ### `step/*`
720
+
721
+ <a id="stepend--log-only"></a>
722
+
723
+ #### `step/end` — log-only
724
+
725
+ ```ts persistence-catalog
726
+ /** Closes step `step` of turn `turn`. */
727
+ 'step/end': { turn: number; step: number }
728
+ ```
729
+
730
+ Source: [`packages/core/session/src/types.ts:280`](../packages/core/session/src/types.ts)
731
+
732
+ <a id="stepstart--log-only"></a>
733
+
734
+ #### `step/start` — log-only
735
+
736
+ ```ts persistence-catalog
737
+ /** Opens step `step` of turn `turn` — one model call plus the tool executions it requested. */
738
+ 'step/start': { turn: number; step: number }
739
+ ```
740
+
741
+ Source: [`packages/core/session/src/types.ts:278`](../packages/core/session/src/types.ts)
742
+
743
+ ### `subagent/*`
744
+
745
+ <a id="subagentdescriptor--log-only"></a>
746
+
747
+ #### `subagent/descriptor` — log-only
748
+
749
+ ```ts persistence-catalog
750
+ /**
751
+ * Durable identity and lifecycle mode of a session-backed subagent child,
752
+ * appended once by the establishing provider inside the child's initial
753
+ * turn, before its first request. Continuable records also carry their
754
+ * resumable composition. Log-only: it carries no `surfaceOp`, never enters
755
+ * model history, and survives compaction.
756
+ */
757
+ 'subagent/descriptor': SubagentDescriptorData
758
+ ```
759
+
760
+ Source: [`packages/subagent/subagent/src/descriptor.ts:38`](../packages/subagent/subagent/src/descriptor.ts)
761
+
762
+ <a id="subagentmodel-selection-policy--log-only"></a>
763
+
764
+ #### `subagent/model-selection-policy` — log-only
765
+
766
+ ```ts persistence-catalog
767
+ /**
768
+ * Records that this session's delegation tool exposes child provider,
769
+ * model, and reasoning-effort selection. Appended before the first model
770
+ * request; absence means the fixed-route definition. Log-only: it carries
771
+ * no `surfaceOp` and never enters model history.
772
+ */
773
+ 'subagent/model-selection-policy': {
774
+ /** Exact routes this Session may select explicitly for a child. */
775
+ allowedModels: AllowedModelRoute[]
776
+ }
777
+ ```
778
+
779
+ Source: [`packages/subagent/tool-subagent/src/model-selection-state.ts:17`](../packages/subagent/tool-subagent/src/model-selection-state.ts)
780
+
781
+ ### `team/*`
782
+
783
+ <a id="teammember--log-only"></a>
784
+
785
+ #### `team/member` — log-only
786
+
787
+ ```ts persistence-catalog
788
+ /** Whole teammate lifecycle value, stored only in the Team Lead Session. */
789
+ 'team/member': { version: 2; teamId: TeamId; member: TeamMemberSnapshot }
790
+ ```
791
+
792
+ Types: [TeamId](subsystems/agent-team.md) · [TeamMemberSnapshot](subsystems/agent-team.md)
793
+
794
+ Source: [`packages/experimental/agent-team/src/types.ts:221`](../packages/experimental/agent-team/src/types.ts)
795
+
796
+ <a id="teammessagedelivered--log-only"></a>
797
+
798
+ #### `team/message/delivered` — log-only
799
+
800
+ ```ts persistence-catalog
801
+ /** Durable acknowledgement that the target Session recorded the message. */
802
+ 'team/message/delivered': {
803
+ version: 2
804
+ teamId: TeamId
805
+ messageId: TeamMessageId
806
+ targetId: SessionId
807
+ }
808
+ ```
809
+
810
+ Types: [TeamId](subsystems/agent-team.md) · [TeamMessageId](subsystems/agent-team.md)
811
+
812
+ Source: [`packages/experimental/agent-team/src/types.ts:227`](../packages/experimental/agent-team/src/types.ts)
813
+
814
+ <a id="teammessagequeued--log-only"></a>
815
+
816
+ #### `team/message/queued` — log-only
817
+
818
+ ```ts persistence-catalog
819
+ /** Durable mailbox enqueue, stored before delivery is attempted. */
820
+ 'team/message/queued': { version: 2; teamId: TeamId; message: TeamMessageSnapshot }
821
+ ```
822
+
823
+ Types: [TeamId](subsystems/agent-team.md) · [TeamMessageSnapshot](subsystems/agent-team.md)
824
+
825
+ Source: [`packages/experimental/agent-team/src/types.ts:225`](../packages/experimental/agent-team/src/types.ts)
826
+
827
+ <a id="teamtask--log-only"></a>
828
+
829
+ #### `team/task` — log-only
830
+
831
+ ```ts persistence-catalog
832
+ /** Whole shared-task value, stored only in the Team Lead Session. */
833
+ 'team/task': { version: 2; teamId: TeamId; task: TeamTaskSnapshot }
834
+ ```
835
+
836
+ Types: [TeamId](subsystems/agent-team.md) · [TeamTaskSnapshot](subsystems/agent-team.md)
837
+
838
+ Source: [`packages/experimental/agent-team/src/types.ts:223`](../packages/experimental/agent-team/src/types.ts)
839
+
840
+ ### `todo/*`
841
+
842
+ <a id="todowrite--log-only"></a>
843
+
844
+ #### `todo/write` — log-only
845
+
846
+ ```ts persistence-catalog
847
+ /** Whole-list snapshot; latest write wins on replay. Log-only UI state; never derived history. */
848
+ 'todo/write': { todos: TodoItem[] }
849
+ ```
850
+
851
+ Types: [TodoItem](subsystems/todo.md)
852
+
853
+ Source: [`packages/todo/tool-todo/src/types.ts:31`](../packages/todo/tool-todo/src/types.ts)
854
+
855
+ ### `tool/*`
856
+
857
+ <a id="toolcall--log-only"></a>
858
+
859
+ #### `tool/call` — log-only
860
+
861
+ ```ts persistence-catalog
862
+ /**
863
+ * The model requested one tool invocation: `name` with the raw `arguments`
864
+ * JSON string exactly as the model produced it (unparsed). `callId` pairs the
865
+ * call with its `tool/result`.
866
+ */
867
+ 'tool/call': { turn: number; step: number; callId: ToolCallId; name: string; arguments: string }
868
+ ```
869
+
870
+ Types: [ToolCallId](subsystems/core.md)
871
+
872
+ Source: [`packages/core/session/src/types.ts:319`](../packages/core/session/src/types.ts)
873
+
874
+ <a id="toolcode-dispatch--log-only"></a>
875
+
876
+ #### `tool/code-dispatch` — log-only
877
+
878
+ ```ts persistence-catalog
879
+ /**
880
+ * One bridged sub-dispatch SETTLING: the pairing ids (matching the
881
+ * `tool/code-dispatch-start` with the same `subCallId`), the tool `name`
882
+ * with the same JSON-normalized `arguments`, and the sub-call's complete
883
+ * model-facing outcome in `tool/result`'s own vocabulary
884
+ * (`content` + `isError`), so UIs render a sub-call through the exact
885
+ * code path that renders a native call. Every started sub-call settles
886
+ * with exactly one of these (abort included: the aborted pipeline result
887
+ * is an `isError` outcome).
888
+ * Log-only: `deriveMessages()` ignores it, so sub-calls never re-enter
889
+ * model context; persistence and UIs get every call. Appended inside the
890
+ * parent `run_code`'s execution (the bridge drains in-flight dispatches
891
+ * before returning), so its execution-enclosure relation holds by
892
+ * construction.
893
+ */
894
+ 'tool/code-dispatch': PtcDispatchEventData
895
+ ```
896
+
897
+ Source: [`packages/core/tools/src/types.ts:56`](../packages/core/tools/src/types.ts)
898
+
899
+ <a id="toolcode-dispatch-start--log-only"></a>
900
+
901
+ #### `tool/code-dispatch-start` — log-only
902
+
903
+ ```ts persistence-catalog
904
+ /**
905
+ * One sub-dispatch STARTING inside a `run_code` program: the parent
906
+ * `run_code` call id, the deterministic sub-call id (`<parent>:code:<n>`,
907
+ * numbered in submission order), and the tool `name` with its
908
+ * JSON-normalized `arguments` — the exact value dispatched, normalized
909
+ * BEFORE dispatch, so this append can never fail on payload shape.
910
+ * Appended when the scheduler actually starts the call (not at
911
+ * submission), so a start means the tool body pipeline was entered; a
912
+ * call abandoned in the queue logs nothing. Log-only: `deriveMessages()`
913
+ * ignores it; UIs use it for live per-sub-call running state and pair it
914
+ * with `tool/code-dispatch` by `subCallId` (timing = the two events'
915
+ * `time` fields).
916
+ */
917
+ 'tool/code-dispatch-start': PtcDispatchStartEventData
918
+ ```
919
+
920
+ Source: [`packages/core/tools/src/types.ts:40`](../packages/core/tools/src/types.ts)
921
+
922
+ <a id="toolresult--surface"></a>
923
+
924
+ #### `tool/result` — surface
925
+
926
+ ```ts persistence-catalog
927
+ /**
928
+ * A completed tool call's model-facing result, optional internal failure
929
+ * identity, and optional tool-private `meta` presentation payload. `meta` is
930
+ * opaque to the core (the producing tool owns its shape and reads it back in
931
+ * `presentResult`) but MUST be JSON-serializable: `Session.append`
932
+ * runtime-validates all event data with `isJsonValue`, so a non-serializable
933
+ * `meta` is rejected at the source, and the durable log reproduces the
934
+ * identical card on replay. Absent
935
+ * unless the tool attaches one (e.g. `dsh-tool-fs` carries its result-time
936
+ * contextual diff here).
937
+ */
938
+ 'tool/result': {
939
+ turn: number
940
+ step: number
941
+ message: ToolResultMessage
942
+ error?: { name: string; code: string }
943
+ meta?: JsonValue
944
+ }
945
+ ```
946
+
947
+ Source: [`packages/core/session/src/types.ts:331`](../packages/core/session/src/types.ts)
948
+
949
+ ### `tool-workflow/*`
950
+
951
+ <a id="tool-workflowagent-end--log-only"></a>
952
+
953
+ #### `tool-workflow/agent-end` — log-only
954
+
955
+ ```ts persistence-catalog
956
+ /**
957
+ * Records one member settlement.
958
+ * @param data - run identity, paired member sequence, and outcome.
959
+ */
960
+ 'tool-workflow/agent-end': ToolWorkflowAgentEndData
961
+ ```
962
+
963
+ Source: [`packages/workflow/tool-workflow/src/types.ts:57`](../packages/workflow/tool-workflow/src/types.ts)
964
+
965
+ <a id="tool-workflowagent-start--log-only"></a>
966
+
967
+ #### `tool-workflow/agent-start` — log-only
968
+
969
+ ```ts persistence-catalog
970
+ /**
971
+ * Records one published workflow member.
972
+ * @param data - run identity, member sequence, display identity, and child Session.
973
+ */
974
+ 'tool-workflow/agent-start': ToolWorkflowAgentStartData
975
+ ```
976
+
977
+ Source: [`packages/workflow/tool-workflow/src/types.ts:52`](../packages/workflow/tool-workflow/src/types.ts)
978
+
979
+ <a id="tool-workflowrun-end--log-only"></a>
980
+
981
+ #### `tool-workflow/run-end` — log-only
982
+
983
+ ```ts persistence-catalog
984
+ /**
985
+ * Closes one workflow record after cleanup.
986
+ * @param data - stable run identity and terminal reason.
987
+ */
988
+ 'tool-workflow/run-end': ToolWorkflowRunEndData
989
+ ```
990
+
991
+ Source: [`packages/workflow/tool-workflow/src/types.ts:62`](../packages/workflow/tool-workflow/src/types.ts)
992
+
993
+ <a id="tool-workflowrun-start--log-only"></a>
994
+
995
+ #### `tool-workflow/run-start` — log-only
996
+
997
+ ```ts persistence-catalog
998
+ /**
999
+ * Opens one top-level workflow record.
1000
+ * @param data - stable run identity and display name.
1001
+ */
1002
+ 'tool-workflow/run-start': ToolWorkflowRunStartData
1003
+ ```
1004
+
1005
+ Source: [`packages/workflow/tool-workflow/src/types.ts:47`](../packages/workflow/tool-workflow/src/types.ts)
1006
+
1007
+ ### `turn/*`
1008
+
1009
+ <a id="turnend--log-only"></a>
1010
+
1011
+ #### `turn/end` — log-only
1012
+
1013
+ ```ts persistence-catalog
1014
+ /**
1015
+ * Closes turn `turn` with the {@link TurnEndReason} that ended it. A turn
1016
+ * with no entered step has no `step/start` or `step/end`. The loop does not await a
1017
+ * flush at turn boundaries: `dsh-session-checkpoint-policy` owns the
1018
+ * per-request durability checkpoint, and consumers that read storage after
1019
+ * `whenIdle()` flush themselves. Success commits the turn; rejection is
1020
+ * reported live and does not prevent later work.
1021
+ */
1022
+ 'turn/end': { turn: number; reason: TurnEndReason }
1023
+ ```
1024
+
1025
+ Types: [TurnEndReason](subsystems/session.md)
1026
+
1027
+ Source: [`packages/core/session/src/types.ts:276`](../packages/core/session/src/types.ts)
1028
+
1029
+ <a id="turnstart--log-only"></a>
1030
+
1031
+ #### `turn/start` — log-only
1032
+
1033
+ ```ts persistence-catalog
1034
+ /**
1035
+ * Opens turn `turn` before the loop claims queued input or runs pre-step.
1036
+ * Rejection, empty input, cancellation, or failure may close it with no
1037
+ * step; otherwise the following identified `user/message` event or batch
1038
+ * records the messages entering the step.
1039
+ */
1040
+ 'turn/start': { turn: number }
1041
+ ```
1042
+
1043
+ Source: [`packages/core/session/src/types.ts:267`](../packages/core/session/src/types.ts)
1044
+
1045
+ ### `user/*`
1046
+
1047
+ <a id="usermessage--surface"></a>
1048
+
1049
+ #### `user/message` — surface
1050
+
1051
+ ```ts persistence-catalog
1052
+ /**
1053
+ * A user-role message on the model-visible surface: a direct human prompt
1054
+ * (the queued message claimed for this turn), a synthetic `agent.inject()`
1055
+ * context (file-change notices, subdir AGENTS.md, skill content, cron
1056
+ * notifications, …), or an entered goal continuation round. All three
1057
+ * project their `content` verbatim; `source` tells them apart.
1058
+ */
1059
+ 'user/message': UserMessage
1060
+ ```
1061
+
1062
+ Source: [`packages/core/session/src/types.ts:288`](../packages/core/session/src/types.ts)
1063
+
1064
+ ### `web/*`
1065
+
1066
+ <a id="webdeepseek-search-llm-request--log-only"></a>
1067
+
1068
+ #### `web/deepseek-search-llm-request` — log-only
1069
+
1070
+ ```ts persistence-catalog
1071
+ /** Secret-free auxiliary DeepSeek search request recorded before dispatch. */
1072
+ 'web/deepseek-search-llm-request': DeepSeekSearchLlmRequest
1073
+ ```
1074
+
1075
+ Source: [`packages/web/web-search-deepseek/src/provider.ts:83`](../packages/web/web-search-deepseek/src/provider.ts)