@dipoleml/dcode-cli 1.1.0 → 1.2.1

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 (447) hide show
  1. package/dist/THIRD-PARTY-NOTICES.md +1081 -12
  2. package/dist/dcode.cjs +59368 -45608
  3. package/dist/packages/browser-use-plugin/README.md +12 -12
  4. package/dist/packages/browser-use-plugin/docs/api.json +1 -1
  5. package/dist/packages/browser-use-plugin/docs/overview.md +5 -4
  6. package/dist/packages/browser-use-plugin/docs/workflow.md +1 -1
  7. package/dist/packages/browser-use-plugin/scripts/build.mjs +1 -0
  8. package/dist/packages/browser-use-plugin/skills/control-browser/SKILL.md +10 -7
  9. package/dist/packages/bundled-skills/skills/dynamic-workflows/SKILL.md +760 -687
  10. package/dist/packages/bundled-skills/skills/dynamic-workflows/examples.md +310 -1
  11. package/dist/packages/bundled-skills/skills/dynamic-workflows/patterns.md +336 -4
  12. package/dist/packages/node-repl-host/.dcode-plugin/plugin.json +1 -1
  13. package/dist/packages/node-repl-host/dist/mcp/server.js +9 -14
  14. package/dist/packages/node-repl-host/scripts/build.mjs +1 -0
  15. package/dist/provider/dcode-builtin.json +6612 -202
  16. package/node_modules/@dcode/contracts/dist/compact/index.d.ts +7 -7
  17. package/node_modules/@dcode/contracts/dist/config/index.d.ts +1 -1
  18. package/node_modules/@dcode/contracts/dist/events/event-reducer.js +1 -0
  19. package/node_modules/@dcode/contracts/dist/events/in-memory-session-event-store.js +3 -2
  20. package/node_modules/@dcode/contracts/dist/events/session-event-retention.d.ts +8 -0
  21. package/node_modules/@dcode/contracts/dist/events/session-event-retention.js +18 -0
  22. package/node_modules/@dcode/contracts/dist/events/session.events.d.ts +94 -16
  23. package/node_modules/@dcode/contracts/dist/events/session.events.js +10 -0
  24. package/node_modules/@dcode/contracts/dist/hooks/index.d.ts +134 -134
  25. package/node_modules/@dcode/contracts/dist/hooks/workspace-hook-trust.d.ts +14 -14
  26. package/node_modules/@dcode/contracts/dist/index.d.ts +2 -0
  27. package/node_modules/@dcode/contracts/dist/index.js +2 -0
  28. package/node_modules/@dcode/contracts/dist/interfaces/browser-control.port.d.ts +22 -0
  29. package/node_modules/@dcode/contracts/dist/interfaces/dynamic-workflow-run-hole.port.d.ts +92 -0
  30. package/node_modules/@dcode/contracts/dist/interfaces/dynamic-workflow-run-hole.port.js +9 -0
  31. package/node_modules/@dcode/contracts/dist/interfaces/dynamic-workflow-run-retune.port.d.ts +4 -4
  32. package/node_modules/@dcode/contracts/dist/interfaces/dynamic-workflow-run-retune.port.js +7 -3
  33. package/node_modules/@dcode/contracts/dist/interfaces/dynamic-workflow-run-workspace.port.js +8 -3
  34. package/node_modules/@dcode/contracts/dist/interfaces/dynamic-workflow-run.port.d.ts +119 -18
  35. package/node_modules/@dcode/contracts/dist/interfaces/dynamic-workflow-run.port.js +13 -0
  36. package/node_modules/@dcode/contracts/dist/interfaces/index.d.ts +1 -0
  37. package/node_modules/@dcode/contracts/dist/interfaces/index.js +1 -0
  38. package/node_modules/@dcode/contracts/dist/interfaces/mcp.port.d.ts +161 -1
  39. package/node_modules/@dcode/contracts/dist/interfaces/mcp.port.js +17 -0
  40. package/node_modules/@dcode/contracts/dist/interfaces/permission-full-access.d.ts +15 -15
  41. package/node_modules/@dcode/contracts/dist/interfaces/permission-full-access.js +1 -1
  42. package/node_modules/@dcode/contracts/dist/interfaces/permission.port.d.ts +15 -1
  43. package/node_modules/@dcode/contracts/dist/interfaces/provider-endpoint-routing.port.d.ts +19 -0
  44. package/node_modules/@dcode/contracts/dist/interfaces/provider-endpoint-routing.port.js +1 -0
  45. package/node_modules/@dcode/contracts/dist/interfaces/session-store.port.d.ts +4 -2
  46. package/node_modules/@dcode/contracts/dist/interfaces/session-store.port.js +5 -0
  47. package/node_modules/@dcode/contracts/dist/interfaces/session.port.d.ts +92 -3
  48. package/node_modules/@dcode/contracts/dist/interfaces/session.port.js +4 -1
  49. package/node_modules/@dcode/contracts/dist/interfaces/topic-resource.port.d.ts +25 -0
  50. package/node_modules/@dcode/contracts/dist/interfaces/topic-resource.port.js +1 -0
  51. package/node_modules/@dcode/contracts/dist/model/index.d.ts +15 -1
  52. package/node_modules/@dcode/contracts/dist/model/index.js +5 -0
  53. package/node_modules/@dcode/contracts/dist/model/invocation-context.d.ts +6 -1
  54. package/node_modules/@dcode/contracts/dist/plugins/index.d.ts +23 -0
  55. package/node_modules/@dcode/contracts/dist/plugins/index.js +2 -1
  56. package/node_modules/@dcode/contracts/dist/telemetry/agent-execution.d.ts +2 -0
  57. package/node_modules/@dcode/contracts/dist/telemetry/agent-execution.js +2 -0
  58. package/node_modules/@dcode/contracts/dist/telemetry/index.d.ts +5 -1
  59. package/node_modules/@dcode/contracts/dist/telemetry/index.js +12 -0
  60. package/node_modules/@dcode/contracts/dist/tools/agent.d.ts +12 -12
  61. package/node_modules/@dcode/contracts/dist/tools/amend-workflow.d.ts +39 -15
  62. package/node_modules/@dcode/contracts/dist/tools/amend-workflow.js +12 -6
  63. package/node_modules/@dcode/contracts/dist/tools/automation.d.ts +32 -32
  64. package/node_modules/@dcode/contracts/dist/tools/automation.js +1 -1
  65. package/node_modules/@dcode/contracts/dist/tools/bash.d.ts +16 -16
  66. package/node_modules/@dcode/contracts/dist/tools/bash.js +1 -1
  67. package/node_modules/@dcode/contracts/dist/tools/create-workflow.d.ts +365 -66
  68. package/node_modules/@dcode/contracts/dist/tools/create-workflow.js +92 -11
  69. package/node_modules/@dcode/contracts/dist/tools/edit.d.ts +16 -16
  70. package/node_modules/@dcode/contracts/dist/tools/eval-workflow-snippet.d.ts +6 -6
  71. package/node_modules/@dcode/contracts/dist/tools/eval-workflow-snippet.js +5 -1
  72. package/node_modules/@dcode/contracts/dist/tools/fill-workflow-hole.d.ts +729 -0
  73. package/node_modules/@dcode/contracts/dist/tools/fill-workflow-hole.js +102 -0
  74. package/node_modules/@dcode/contracts/dist/tools/get-workflow-run.d.ts +136 -28
  75. package/node_modules/@dcode/contracts/dist/tools/get-workflow-run.js +36 -0
  76. package/node_modules/@dcode/contracts/dist/tools/grep.d.ts +4 -4
  77. package/node_modules/@dcode/contracts/dist/tools/grep.js +4 -0
  78. package/node_modules/@dcode/contracts/dist/tools/index.d.ts +2 -0
  79. package/node_modules/@dcode/contracts/dist/tools/index.js +4 -0
  80. package/node_modules/@dcode/contracts/dist/tools/list-saved-workflows.d.ts +8 -8
  81. package/node_modules/@dcode/contracts/dist/tools/list-workflow-runs.d.ts +8 -8
  82. package/node_modules/@dcode/contracts/dist/tools/node-repl.d.ts +2 -2
  83. package/node_modules/@dcode/contracts/dist/tools/off-peak.d.ts +3 -3
  84. package/node_modules/@dcode/contracts/dist/tools/off-peak.js +2 -2
  85. package/node_modules/@dcode/contracts/dist/tools/performance.d.ts +22 -22
  86. package/node_modules/@dcode/contracts/dist/tools/plan-mode.d.ts +12 -12
  87. package/node_modules/@dcode/contracts/dist/tools/plan-mode.js +6 -4
  88. package/node_modules/@dcode/contracts/dist/tools/read-session-context.d.ts +86 -13
  89. package/node_modules/@dcode/contracts/dist/tools/read-session-context.js +37 -6
  90. package/node_modules/@dcode/contracts/dist/tools/read.d.ts +38 -38
  91. package/node_modules/@dcode/contracts/dist/tools/save-workflow.d.ts +21 -10
  92. package/node_modules/@dcode/contracts/dist/tools/save-workflow.js +22 -2
  93. package/node_modules/@dcode/contracts/dist/tools/saved-workflow.d.ts +4 -4
  94. package/node_modules/@dcode/contracts/dist/tools/send-message.d.ts +2 -2
  95. package/node_modules/@dcode/contracts/dist/tools/skill.js +1 -0
  96. package/node_modules/@dcode/contracts/dist/tools/task-output.d.ts +6 -6
  97. package/node_modules/@dcode/contracts/dist/tools/tool-result-metadata.d.ts +1228 -259
  98. package/node_modules/@dcode/contracts/dist/tools/tool-result-metadata.js +41 -0
  99. package/node_modules/@dcode/contracts/dist/tools/webfetch.d.ts +2 -2
  100. package/node_modules/@dcode/contracts/dist/tools/workflow-observation-display.d.ts +20 -20
  101. package/node_modules/@dcode/contracts/dist/tools/workflow-settings.d.ts +55 -0
  102. package/node_modules/@dcode/contracts/dist/tools/workflow-settings.js +86 -0
  103. package/node_modules/@dcode/contracts/dist/tools/workflow.d.ts +8 -8
  104. package/node_modules/@dcode/contracts/dist/tools/write.d.ts +18 -18
  105. package/node_modules/@dcode/contracts/dist/workflow/index.d.ts +98 -98
  106. package/node_modules/@dcode/contracts/dist/workflow/script.d.ts +12 -12
  107. package/node_modules/@dcode/i18n/dist/index.js +2 -2
  108. package/node_modules/@dcode/i18n/dist/locale.d.ts +1 -1
  109. package/node_modules/@dcode/i18n/dist/locale.js +4 -4
  110. package/node_modules/@dcode/i18n/dist/locales/en-US.js +5 -5
  111. package/node_modules/@dcode/i18n/dist/locales/fr-CA.d.ts +3 -0
  112. package/node_modules/@dcode/i18n/dist/locales/fr-CA.js +354 -0
  113. package/node_modules/@dcode/model-option-map/package.json +1 -1
  114. package/node_modules/@dcode/shared/dist/api-key-usage-scene.d.ts +7 -0
  115. package/node_modules/@dcode/shared/dist/api-key-usage-scene.js +6 -0
  116. package/node_modules/@dcode/shared/dist/attachment-source.d.ts +8 -0
  117. package/node_modules/@dcode/shared/dist/attachment-source.js +4 -0
  118. package/node_modules/@dcode/shared/dist/background-bash-output.d.ts +4 -4
  119. package/node_modules/@dcode/shared/dist/bots.d.ts +763 -15
  120. package/node_modules/@dcode/shared/dist/bots.js +236 -2
  121. package/node_modules/@dcode/shared/dist/browser-use/command-metadata.d.ts +2 -2
  122. package/node_modules/@dcode/shared/dist/browser-use/commands.d.ts +4 -3
  123. package/node_modules/@dcode/shared/dist/browser-use/commands.js +3 -1
  124. package/node_modules/@dcode/shared/dist/browser-use/nodeReplBroker.d.ts +5 -4
  125. package/node_modules/@dcode/shared/dist/browser-use/result.d.ts +6 -6
  126. package/node_modules/@dcode/shared/dist/channel-mention.d.ts +173 -0
  127. package/node_modules/@dcode/shared/dist/channel-mention.js +120 -0
  128. package/node_modules/@dcode/shared/dist/channels.d.ts +128 -1
  129. package/node_modules/@dcode/shared/dist/channels.js +66 -0
  130. package/node_modules/@dcode/shared/dist/clientConfig.d.ts +1 -0
  131. package/node_modules/@dcode/shared/dist/clientConfig.js +18 -2
  132. package/node_modules/@dcode/shared/dist/cloudContent.d.ts +160 -0
  133. package/node_modules/@dcode/shared/dist/cloudContent.js +116 -0
  134. package/node_modules/@dcode/shared/dist/coding-plan-subscription.d.ts +59 -0
  135. package/node_modules/@dcode/shared/dist/conversation-message-projection-policy.js +2 -0
  136. package/node_modules/@dcode/shared/dist/conversation-share.d.ts +351 -47
  137. package/node_modules/@dcode/shared/dist/conversation-share.js +8 -6
  138. package/node_modules/@dcode/shared/dist/conversationSelection.d.ts +23 -0
  139. package/node_modules/@dcode/shared/dist/conversationSelection.js +30 -0
  140. package/node_modules/@dcode/shared/dist/database-startup.d.ts +5 -5
  141. package/node_modules/@dcode/shared/dist/dcode-agent-model-state.js +14 -6
  142. package/node_modules/@dcode/shared/dist/dcode-agent-policy.d.ts +16 -1
  143. package/node_modules/@dcode/shared/dist/dcode-agent-policy.js +17 -1
  144. package/node_modules/@dcode/shared/dist/dcode-agent-runtime.js +1 -1
  145. package/node_modules/@dcode/shared/dist/dcode-protocol/index.d.ts +1733 -318
  146. package/node_modules/@dcode/shared/dist/dcode-protocol/index.js +555 -24
  147. package/node_modules/@dcode/shared/dist/dcode-protocol/trace.d.ts +9 -0
  148. package/node_modules/@dcode/shared/dist/dcode-protocol/trace.js +10 -0
  149. package/node_modules/@dcode/shared/dist/dcode-protocol-legacy-types.d.ts +30 -20
  150. package/node_modules/@dcode/shared/dist/dcode-protocol-legacy-types.js +3 -1
  151. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/apply.js +12 -3
  152. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/attachment-ref.d.ts +5 -0
  153. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/attachment-ref.js +3 -0
  154. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/coalesce.d.ts +3 -1
  155. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/coalesce.js +3 -1
  156. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/command.d.ts +359 -28
  157. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/command.js +67 -45
  158. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/controller.d.ts +170 -65
  159. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/create-session-config.d.ts +20 -0
  160. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/create-session-config.js +15 -0
  161. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/create-workflow-display.d.ts +34 -0
  162. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/create-workflow-display.js +45 -1
  163. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/delta.d.ts +1453 -278
  164. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/delta.js +45 -2
  165. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/index.d.ts +1 -0
  166. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/index.js +1 -0
  167. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/input-intent.d.ts +173 -6
  168. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/input-intent.js +29 -0
  169. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/rows.d.ts +731 -125
  170. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/rows.js +23 -11
  171. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/sessions-index-workflow-activity.d.ts +30 -11
  172. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/sessions-index-workflow-activity.js +35 -3
  173. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/sessions-index.d.ts +40 -25
  174. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/snapshot.d.ts +1444 -216
  175. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/snapshot.js +3 -0
  176. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/submission.d.ts +1 -0
  177. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/submission.js +1 -1
  178. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/telemetry.d.ts +62 -58
  179. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/toolDisplay.d.ts +185 -50
  180. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/toolDisplay.js +31 -3
  181. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/transport.d.ts +7145 -1002
  182. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/transport.js +18 -5
  183. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/wire-assembler.js +2 -1
  184. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/wire-fault.js +4 -1
  185. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/wire-reassembly.js +5 -3
  186. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-artifacts.d.ts +29 -1
  187. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-artifacts.js +64 -4
  188. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-command-rejections.d.ts +13 -0
  189. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-command-rejections.js +23 -0
  190. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-observation-display.d.ts +14 -14
  191. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-row-meta.d.ts +52 -8
  192. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-row-meta.js +22 -3
  193. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-run-settings-command.d.ts +4 -4
  194. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-run-settings-command.js +2 -2
  195. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-runs-actor-session.d.ts +21 -0
  196. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-runs-actor-session.js +44 -0
  197. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-runs-actor-status.d.ts +1 -1
  198. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-runs-actor-status.js +3 -2
  199. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-runs-caps.js +5 -4
  200. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-runs-concurrency.d.ts +26 -19
  201. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-runs-concurrency.js +40 -32
  202. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-runs-delta.d.ts +4 -3
  203. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-runs-delta.js +4 -3
  204. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-runs-entries.d.ts +12 -2
  205. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-runs-entries.js +44 -6
  206. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-runs-eviction.d.ts +2 -2
  207. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-runs-eviction.js +17 -10
  208. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-runs-holes.d.ts +33 -0
  209. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-runs-holes.js +202 -0
  210. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-runs-legacy.d.ts +1 -1
  211. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-runs-legacy.js +1 -1
  212. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-runs-phases.js +10 -1
  213. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-runs-reducer.d.ts +1 -1
  214. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-runs-reducer.js +29 -22
  215. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-runs-started.js +5 -2
  216. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-runs-tables.js +2 -1
  217. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-runs-unlisted.js +6 -3
  218. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-runs.d.ts +125 -40
  219. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-runs.js +101 -26
  220. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-workspace.d.ts +4 -4
  221. package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workspace-hook-review.d.ts +1 -1
  222. package/node_modules/@dcode/shared/dist/dcode-session-content-profile.d.ts +5 -0
  223. package/node_modules/@dcode/shared/dist/dcode-session-content-profile.js +49 -0
  224. package/node_modules/@dcode/shared/dist/dcode-slash-command-help.js +4 -4
  225. package/node_modules/@dcode/shared/dist/dcode-task-mode-schema.d.ts +6 -1
  226. package/node_modules/@dcode/shared/dist/dcode-task-mode-schema.js +13 -1
  227. package/node_modules/@dcode/shared/dist/dcode-task-types-core.d.ts +12 -2
  228. package/node_modules/@dcode/shared/dist/dcode-task-types.d.ts +23 -0
  229. package/node_modules/@dcode/shared/dist/dcodeEndpoint.d.ts +20 -1
  230. package/node_modules/@dcode/shared/dist/dcodeEndpoint.js +98 -17
  231. package/node_modules/@dcode/shared/dist/desktopMenu.js +48 -48
  232. package/node_modules/@dcode/shared/dist/dynamic-workflow-feature.d.ts +35 -6
  233. package/node_modules/@dcode/shared/dist/dynamic-workflow-feature.js +45 -6
  234. package/node_modules/@dcode/shared/dist/env.d.ts +5 -4
  235. package/node_modules/@dcode/shared/dist/env.js +9 -9
  236. package/node_modules/@dcode/shared/dist/errors.d.ts +24 -0
  237. package/node_modules/@dcode/shared/dist/errors.js +54 -0
  238. package/node_modules/@dcode/shared/dist/execution-state.d.ts +4 -2
  239. package/node_modules/@dcode/shared/dist/execution-state.js +1 -1
  240. package/node_modules/@dcode/shared/dist/feedback.d.ts +1 -1
  241. package/node_modules/@dcode/shared/dist/gen-ui/contract.d.ts +140 -0
  242. package/node_modules/@dcode/shared/dist/gen-ui/contract.example.d.ts +5 -0
  243. package/node_modules/@dcode/shared/dist/gen-ui/contract.example.js +36 -0
  244. package/node_modules/@dcode/shared/dist/gen-ui/contract.js +196 -0
  245. package/node_modules/@dcode/shared/dist/gen-ui/contract.test.d.ts +2 -0
  246. package/node_modules/@dcode/shared/dist/gen-ui/contract.test.js +75 -0
  247. package/node_modules/@dcode/shared/dist/gen-ui/index.d.ts +2 -0
  248. package/node_modules/@dcode/shared/dist/gen-ui/index.js +2 -0
  249. package/node_modules/@dcode/shared/dist/gen-ui/module.d.ts +7 -0
  250. package/node_modules/@dcode/shared/dist/gen-ui/module.js +7 -0
  251. package/node_modules/@dcode/shared/dist/gen-ui/tweakProtocol.d.ts +202 -0
  252. package/node_modules/@dcode/shared/dist/gen-ui/tweakProtocol.js +126 -0
  253. package/node_modules/@dcode/shared/dist/helpAppConfig.d.ts +1 -1
  254. package/node_modules/@dcode/shared/dist/helpAppConfig.js +2 -2
  255. package/node_modules/@dcode/shared/dist/highspeed.d.ts +181 -0
  256. package/node_modules/@dcode/shared/dist/highspeed.js +112 -0
  257. package/node_modules/@dcode/shared/dist/index.d.ts +27 -5
  258. package/node_modules/@dcode/shared/dist/index.js +24 -2
  259. package/node_modules/@dcode/shared/dist/localTtft.d.ts +27 -27
  260. package/node_modules/@dcode/shared/dist/marketingTouch.d.ts +930 -0
  261. package/node_modules/@dcode/shared/dist/marketingTouch.js +170 -0
  262. package/node_modules/@dcode/shared/dist/mcp-apps/appTools.d.ts +83 -0
  263. package/node_modules/@dcode/shared/dist/mcp-apps/appTools.js +124 -0
  264. package/node_modules/@dcode/shared/dist/mcp-apps/content.d.ts +4 -0
  265. package/node_modules/@dcode/shared/dist/mcp-apps/content.js +8 -0
  266. package/node_modules/@dcode/shared/dist/mcp-apps/contract.d.ts +241 -0
  267. package/node_modules/@dcode/shared/dist/mcp-apps/contract.example.d.ts +31 -0
  268. package/node_modules/@dcode/shared/dist/mcp-apps/contract.example.js +42 -0
  269. package/node_modules/@dcode/shared/dist/mcp-apps/contract.js +101 -0
  270. package/node_modules/@dcode/shared/dist/mcp-apps/contract.test.d.ts +2 -0
  271. package/node_modules/@dcode/shared/dist/mcp-apps/contract.test.js +64 -0
  272. package/node_modules/@dcode/shared/dist/mcp-apps/hostContract.d.ts +47 -0
  273. package/node_modules/@dcode/shared/dist/mcp-apps/hostContract.js +8 -0
  274. package/node_modules/@dcode/shared/dist/mcp-apps/index.d.ts +9 -0
  275. package/node_modules/@dcode/shared/dist/mcp-apps/index.js +9 -0
  276. package/node_modules/@dcode/shared/dist/mcp-apps/instance.d.ts +10 -0
  277. package/node_modules/@dcode/shared/dist/mcp-apps/instance.js +11 -0
  278. package/node_modules/@dcode/shared/dist/mcp-apps/module.d.ts +12 -0
  279. package/node_modules/@dcode/shared/dist/mcp-apps/module.js +12 -0
  280. package/node_modules/@dcode/shared/dist/mcp-apps/resourceMime.d.ts +8 -0
  281. package/node_modules/@dcode/shared/dist/mcp-apps/resourceMime.js +73 -0
  282. package/node_modules/@dcode/shared/dist/mcp-apps/sampling.d.ts +101 -0
  283. package/node_modules/@dcode/shared/dist/mcp-apps/sampling.js +107 -0
  284. package/node_modules/@dcode/shared/dist/mcp-apps/sampling.test.d.ts +2 -0
  285. package/node_modules/@dcode/shared/dist/mcp-apps/sampling.test.js +55 -0
  286. package/node_modules/@dcode/shared/dist/mcp-apps/schemas.d.ts +78 -0
  287. package/node_modules/@dcode/shared/dist/mcp-apps/schemas.js +65 -0
  288. package/node_modules/@dcode/shared/dist/mcp-apps/toolMeta.d.ts +39 -0
  289. package/node_modules/@dcode/shared/dist/mcp-apps/toolMeta.js +199 -0
  290. package/node_modules/@dcode/shared/dist/mcp.d.ts +6 -2
  291. package/node_modules/@dcode/shared/dist/memory.d.ts +9 -0
  292. package/node_modules/@dcode/shared/dist/memory.js +2 -0
  293. package/node_modules/@dcode/shared/dist/model-execution.d.ts +31 -0
  294. package/node_modules/@dcode/shared/dist/model-execution.js +38 -0
  295. package/node_modules/@dcode/shared/dist/networkCapture.d.ts +49 -0
  296. package/node_modules/@dcode/shared/dist/networkCapture.js +41 -0
  297. package/node_modules/@dcode/shared/dist/node/genUiPaths.d.ts +6 -0
  298. package/node_modules/@dcode/shared/dist/node/genUiPaths.js +16 -0
  299. package/node_modules/@dcode/shared/dist/node/genUiPaths.test.d.ts +2 -0
  300. package/node_modules/@dcode/shared/dist/node/genUiPaths.test.js +30 -0
  301. package/node_modules/@dcode/shared/dist/node/networkCapture.d.ts +8 -0
  302. package/node_modules/@dcode/shared/dist/node/networkCapture.js +96 -0
  303. package/node_modules/@dcode/shared/dist/node/officialPluginCache.d.ts +1 -2
  304. package/node_modules/@dcode/shared/dist/node/subagentMarkdownMigration.d.ts +1 -2
  305. package/node_modules/@dcode/shared/dist/node.d.ts +2 -0
  306. package/node_modules/@dcode/shared/dist/node.js +2 -0
  307. package/node_modules/@dcode/shared/dist/output-style.d.ts +17 -0
  308. package/node_modules/@dcode/shared/dist/output-style.js +2 -0
  309. package/node_modules/@dcode/shared/dist/platform.d.ts +149 -1
  310. package/node_modules/@dcode/shared/dist/platform.js +2 -0
  311. package/node_modules/@dcode/shared/dist/platformUpdate.d.ts +61 -0
  312. package/node_modules/@dcode/shared/dist/platformUpdate.js +2 -0
  313. package/node_modules/@dcode/shared/dist/plugin-marketplaces.d.ts +5 -0
  314. package/node_modules/@dcode/shared/dist/plugin-marketplaces.js +20 -14
  315. package/node_modules/@dcode/shared/dist/project-access-token-client.d.ts +42 -0
  316. package/node_modules/@dcode/shared/dist/project-access-token-client.js +260 -0
  317. package/node_modules/@dcode/shared/dist/project-access-token-response.d.ts +4 -0
  318. package/node_modules/@dcode/shared/dist/project-access-token-response.js +9 -0
  319. package/node_modules/@dcode/shared/dist/project-access-token.d.ts +45 -0
  320. package/node_modules/@dcode/shared/dist/project-access-token.js +164 -0
  321. package/node_modules/@dcode/shared/dist/protocol.d.ts +41 -4
  322. package/node_modules/@dcode/shared/dist/protocol.js +1 -1
  323. package/node_modules/@dcode/shared/dist/provider-provisioning.d.ts +26 -2
  324. package/node_modules/@dcode/shared/dist/provider-provisioning.js +19 -3
  325. package/node_modules/@dcode/shared/dist/providers.d.ts +1 -2
  326. package/node_modules/@dcode/shared/dist/providers.js +1 -1
  327. package/node_modules/@dcode/shared/dist/remote-workspace-identity.d.ts +6 -1
  328. package/node_modules/@dcode/shared/dist/remote-workspace-identity.js +35 -1
  329. package/node_modules/@dcode/shared/dist/remoteAppConfig.js +1 -1
  330. package/node_modules/@dcode/shared/dist/remoteEnvironmentKey.js +19 -0
  331. package/node_modules/@dcode/shared/dist/remoteTarget.d.ts +14 -1
  332. package/node_modules/@dcode/shared/dist/remoteTarget.js +4 -0
  333. package/node_modules/@dcode/shared/dist/remoteUsageTelemetry.d.ts +27 -0
  334. package/node_modules/@dcode/shared/dist/remoteUsageTelemetry.js +43 -0
  335. package/node_modules/@dcode/shared/dist/rendererActionTrace.d.ts +35 -35
  336. package/node_modules/@dcode/shared/dist/request-security-edition/index.d.ts +3 -0
  337. package/node_modules/@dcode/shared/dist/request-security-edition/index.js +3 -0
  338. package/node_modules/@dcode/shared/dist/request-security-edition/policy.d.ts +3 -0
  339. package/node_modules/@dcode/shared/dist/request-security-edition/policy.js +5 -0
  340. package/node_modules/@dcode/shared/dist/request-security-edition/verification-policy.d.ts +19 -0
  341. package/node_modules/@dcode/shared/dist/request-security-edition/verification-policy.js +29 -0
  342. package/node_modules/@dcode/shared/dist/rewardsBridge.d.ts +8 -0
  343. package/node_modules/@dcode/shared/dist/rewardsBridge.js +80 -0
  344. package/node_modules/@dcode/shared/dist/rewardsEmbedded.d.ts +37 -0
  345. package/node_modules/@dcode/shared/dist/rewardsEmbedded.js +50 -0
  346. package/node_modules/@dcode/shared/dist/sessionCreateTelemetry.d.ts +3 -3
  347. package/node_modules/@dcode/shared/dist/subagent-profile-frontmatter.d.ts +10 -0
  348. package/node_modules/@dcode/shared/dist/subagent-profile-frontmatter.js +212 -0
  349. package/node_modules/@dcode/shared/dist/subagent-profile-parser.d.ts +10 -0
  350. package/node_modules/@dcode/shared/dist/subagent-profile-parser.js +200 -0
  351. package/node_modules/@dcode/shared/dist/subagent-profile.d.ts +82 -0
  352. package/node_modules/@dcode/shared/dist/subagent-profile.js +28 -0
  353. package/node_modules/@dcode/shared/dist/subagent-runtime-config.d.ts +135 -0
  354. package/node_modules/@dcode/shared/dist/subagent-runtime-config.js +39 -0
  355. package/node_modules/@dcode/shared/dist/subagents-types.d.ts +1 -1
  356. package/node_modules/@dcode/shared/dist/task-realtime-core.d.ts +57 -24
  357. package/node_modules/@dcode/shared/dist/task-realtime-core.js +8 -2
  358. package/node_modules/@dcode/shared/dist/test-ids-workflow.d.ts +4 -0
  359. package/node_modules/@dcode/shared/dist/test-ids-workflow.js +5 -0
  360. package/node_modules/@dcode/shared/dist/test-ids.d.ts +25 -0
  361. package/node_modules/@dcode/shared/dist/test-ids.js +25 -0
  362. package/node_modules/@dcode/shared/dist/tool-identity.d.ts +1 -1
  363. package/node_modules/@dcode/shared/dist/tool-identity.js +4 -0
  364. package/node_modules/@dcode/shared/dist/tool-plan-adapter.js +14 -1
  365. package/node_modules/@dcode/shared/dist/usage-stats.d.ts +13 -0
  366. package/node_modules/@dcode/shared/dist/validation.d.ts +1461 -85
  367. package/node_modules/@dcode/shared/dist/validation.js +423 -14
  368. package/node_modules/@dcode/shared/dist/validationAppSettings.d.ts +71 -15
  369. package/node_modules/@dcode/shared/dist/validationAppSettings.js +74 -12
  370. package/node_modules/@dcode/shared/dist/web-remote-control-heartbeat.d.ts +8 -0
  371. package/node_modules/@dcode/shared/dist/web-remote-control-heartbeat.js +40 -0
  372. package/node_modules/@dcode/shared/dist/web-remote-control-rpc-transport.d.ts +183 -0
  373. package/node_modules/@dcode/shared/dist/web-remote-control-rpc-transport.js +562 -0
  374. package/node_modules/@dcode/shared/dist/web-remote-control.d.ts +645 -0
  375. package/node_modules/@dcode/shared/dist/web-remote-control.js +174 -0
  376. package/node_modules/@dcode/shared/package.json +5 -2
  377. package/node_modules/@dcode/tui/dist/app-approval-panel.js +3 -2
  378. package/node_modules/@dcode/tui/dist/app-approval.d.ts +3 -1
  379. package/node_modules/@dcode/tui/dist/app-approval.js +9 -5
  380. package/node_modules/@dcode/tui/dist/app-compact-timeline.d.ts +3 -0
  381. package/node_modules/@dcode/tui/dist/app-compact-timeline.js +5 -2
  382. package/node_modules/@dcode/tui/dist/app-empty-transcript.d.ts +1 -0
  383. package/node_modules/@dcode/tui/dist/app-empty-transcript.js +1 -1
  384. package/node_modules/@dcode/tui/dist/app-file-mentions.d.ts +2 -0
  385. package/node_modules/@dcode/tui/dist/app-file-mentions.js +2 -2
  386. package/node_modules/@dcode/tui/dist/app-input-pane.d.ts +38 -0
  387. package/node_modules/@dcode/tui/dist/app-input-pane.js +19 -19
  388. package/node_modules/@dcode/tui/dist/app-input-status.d.ts +17 -0
  389. package/node_modules/@dcode/tui/dist/app-input-status.js +4 -4
  390. package/node_modules/@dcode/tui/dist/app-input.d.ts +1 -0
  391. package/node_modules/@dcode/tui/dist/app-input.js +1 -1
  392. package/node_modules/@dcode/tui/dist/app-markdown-theme.d.ts +2 -1
  393. package/node_modules/@dcode/tui/dist/app-markdown-theme.js +1 -1
  394. package/node_modules/@dcode/tui/dist/app-markdown.d.ts +1 -0
  395. package/node_modules/@dcode/tui/dist/app-markdown.js +1 -1
  396. package/node_modules/@dcode/tui/dist/app-mode-command.d.ts +3 -0
  397. package/node_modules/@dcode/tui/dist/app-mode-command.js +4 -4
  398. package/node_modules/@dcode/tui/dist/app-mode-suggestion-panel.d.ts +5 -0
  399. package/node_modules/@dcode/tui/dist/app-mode-suggestion-panel.js +1 -1
  400. package/node_modules/@dcode/tui/dist/app-mode.d.ts +1 -1
  401. package/node_modules/@dcode/tui/dist/app-mode.js +1 -1
  402. package/node_modules/@dcode/tui/dist/app-model-ref.d.ts +1 -0
  403. package/node_modules/@dcode/tui/dist/app-model-ref.js +1 -1
  404. package/node_modules/@dcode/tui/dist/app-motion.d.ts +13 -0
  405. package/node_modules/@dcode/tui/dist/app-motion.js +17 -7
  406. package/node_modules/@dcode/tui/dist/app-session-event-handler.d.ts +33 -0
  407. package/node_modules/@dcode/tui/dist/app-session-event-handler.js +4 -4
  408. package/node_modules/@dcode/tui/dist/app-shiki-diff-view.d.ts +18 -1
  409. package/node_modules/@dcode/tui/dist/app-shiki-diff-view.js +3 -3
  410. package/node_modules/@dcode/tui/dist/app-shiki-highlighter.d.ts +3 -0
  411. package/node_modules/@dcode/tui/dist/app-shiki-highlighter.js +7 -2
  412. package/node_modules/@dcode/tui/dist/app-sidebar-layout.d.ts +10 -0
  413. package/node_modules/@dcode/tui/dist/app-sidebar-layout.js +4 -4
  414. package/node_modules/@dcode/tui/dist/app-submit.d.ts +1 -0
  415. package/node_modules/@dcode/tui/dist/app-submit.js +1 -1
  416. package/node_modules/@dcode/tui/dist/app-thought-components.d.ts +7 -0
  417. package/node_modules/@dcode/tui/dist/app-thought-components.js +2 -2
  418. package/node_modules/@dcode/tui/dist/app-tool-transcript.d.ts +1 -0
  419. package/node_modules/@dcode/tui/dist/app-tool-transcript.js +3 -0
  420. package/node_modules/@dcode/tui/dist/app-view.d.ts +27 -0
  421. package/node_modules/@dcode/tui/dist/app-view.js +1 -1
  422. package/node_modules/@dcode/tui/dist/app-workflow-card.js +1 -1
  423. package/node_modules/@dcode/tui/dist/app-workflow-seed.d.ts +18 -1
  424. package/node_modules/@dcode/tui/dist/app-workflow-seed.js +4 -4
  425. package/node_modules/@dcode/tui/dist/index.js +5118 -2579
  426. package/node_modules/@dcode/tui/dist/tui.d.ts +3 -0
  427. package/node_modules/@dcode/tui/dist/tui.js +1 -1
  428. package/node_modules/@dcode/tui/dist/types.d.ts +1 -1
  429. package/node_modules/oniguruma-parser/LICENSE +1 -1
  430. package/node_modules/oniguruma-parser/README.md +15 -61
  431. package/node_modules/oniguruma-parser/dist/oniguruma-parser.min.js +4 -4
  432. package/node_modules/oniguruma-parser/dist/parser/parse.js +1 -1
  433. package/node_modules/oniguruma-parser/dist/traverser/traverse.js +1 -1
  434. package/node_modules/oniguruma-parser/package.json +5 -5
  435. package/node_modules/oniguruma-to-es/dist/cjs/generate.d.ts +1 -1
  436. package/node_modules/oniguruma-to-es/dist/cjs/index.js +121 -120
  437. package/node_modules/oniguruma-to-es/dist/cjs/subclass.d.ts +2 -2
  438. package/node_modules/oniguruma-to-es/dist/cjs/transform.d.ts +3 -5
  439. package/node_modules/oniguruma-to-es/dist/cjs/unicode.d.ts +1 -1
  440. package/node_modules/oniguruma-to-es/dist/esm/generate.d.ts +1 -1
  441. package/node_modules/oniguruma-to-es/dist/esm/index.js +1 -3
  442. package/node_modules/oniguruma-to-es/dist/esm/subclass.d.ts +2 -2
  443. package/node_modules/oniguruma-to-es/dist/esm/transform.d.ts +3 -5
  444. package/node_modules/oniguruma-to-es/dist/esm/unicode.d.ts +1 -1
  445. package/node_modules/oniguruma-to-es/dist/index.min.js +6 -6
  446. package/node_modules/oniguruma-to-es/package.json +5 -5
  447. package/package.json +5 -5
@@ -92,9 +92,9 @@ export declare const compactTimelinePayloadSchema: z.ZodEffects<z.ZodObject<{
92
92
  messageId: string;
93
93
  operationId: string;
94
94
  trigger: "auto" | "manual" | "partial" | "reactive" | "session_memory";
95
+ text?: string | undefined;
95
96
  startedAt?: number | undefined;
96
97
  phase?: "reactive" | "standalone_turn" | "pre_request" | "mid_turn" | undefined;
97
- text?: string | undefined;
98
98
  reason?: string | undefined;
99
99
  partId?: string | undefined;
100
100
  compactReason?: "user_requested" | "context_limit" | "model_downshift" | "provider_overflow" | undefined;
@@ -106,17 +106,17 @@ export declare const compactTimelinePayloadSchema: z.ZodEffects<z.ZodObject<{
106
106
  attempt?: number | undefined;
107
107
  maxAttempts?: number | undefined;
108
108
  sourceCommandId?: string | undefined;
109
- replace?: boolean | undefined;
110
109
  endedAt?: number | undefined;
110
+ replace?: boolean | undefined;
111
111
  tailStartMessageId?: string | undefined;
112
112
  }, {
113
113
  status: "completed" | "failed" | "started" | "interrupted" | "retrying" | "skipped";
114
114
  messageId: string;
115
115
  operationId: string;
116
116
  trigger: "auto" | "manual" | "partial" | "reactive" | "session_memory";
117
+ text?: string | undefined;
117
118
  startedAt?: number | undefined;
118
119
  phase?: "reactive" | "standalone_turn" | "pre_request" | "mid_turn" | undefined;
119
- text?: string | undefined;
120
120
  reason?: string | undefined;
121
121
  display?: "separator" | undefined;
122
122
  partId?: string | undefined;
@@ -129,8 +129,8 @@ export declare const compactTimelinePayloadSchema: z.ZodEffects<z.ZodObject<{
129
129
  attempt?: number | undefined;
130
130
  maxAttempts?: number | undefined;
131
131
  sourceCommandId?: string | undefined;
132
- replace?: boolean | undefined;
133
132
  endedAt?: number | undefined;
133
+ replace?: boolean | undefined;
134
134
  tailStartMessageId?: string | undefined;
135
135
  }>, {
136
136
  status: "completed" | "failed" | "started" | "interrupted" | "retrying" | "skipped";
@@ -151,17 +151,17 @@ export declare const compactTimelinePayloadSchema: z.ZodEffects<z.ZodObject<{
151
151
  attempt?: number | undefined;
152
152
  maxAttempts?: number | undefined;
153
153
  sourceCommandId?: string | undefined;
154
- replace?: boolean | undefined;
155
154
  endedAt?: number | undefined;
155
+ replace?: boolean | undefined;
156
156
  tailStartMessageId?: string | undefined;
157
157
  }, {
158
158
  status: "completed" | "failed" | "started" | "interrupted" | "retrying" | "skipped";
159
159
  messageId: string;
160
160
  operationId: string;
161
161
  trigger: "auto" | "manual" | "partial" | "reactive" | "session_memory";
162
+ text?: string | undefined;
162
163
  startedAt?: number | undefined;
163
164
  phase?: "reactive" | "standalone_turn" | "pre_request" | "mid_turn" | undefined;
164
- text?: string | undefined;
165
165
  reason?: string | undefined;
166
166
  display?: "separator" | undefined;
167
167
  partId?: string | undefined;
@@ -174,8 +174,8 @@ export declare const compactTimelinePayloadSchema: z.ZodEffects<z.ZodObject<{
174
174
  attempt?: number | undefined;
175
175
  maxAttempts?: number | undefined;
176
176
  sourceCommandId?: string | undefined;
177
- replace?: boolean | undefined;
178
177
  endedAt?: number | undefined;
178
+ replace?: boolean | undefined;
179
179
  tailStartMessageId?: string | undefined;
180
180
  }>;
181
181
  export type CompactTimelinePayload = Omit<z.infer<typeof compactTimelinePayloadSchema>, "messageId" | "partId" | "summaryMessageId" | "tailStartMessageId"> & {
@@ -139,7 +139,7 @@ export interface RuntimeConfigPatch {
139
139
  hooks?: HooksRuntimeConfigPatch;
140
140
  ui?: Partial<RuntimeConfig["ui"]>;
141
141
  }
142
- export type SupportedLocale = "en-US" | "zh-CN";
142
+ export type SupportedLocale = "en-US" | "fr-CA";
143
143
  export type UiLocale = SupportedLocale | "auto";
144
144
  export type UiThemeMode = "dark" | "light";
145
145
  export type UiThemePreference = UiThemeMode | "auto";
@@ -396,6 +396,7 @@ export class EventReducer {
396
396
  requestId: payload.requestId,
397
397
  toolCallId: payload.toolCallId,
398
398
  toolName: payload.toolName,
399
+ ...(payload.approvalMode ? { approvalMode: payload.approvalMode } : {}),
399
400
  ...(payload.suggestedPermissionUpdates
400
401
  ? { suggestedPermissionUpdates: payload.suggestedPermissionUpdates }
401
402
  : {}),
@@ -1,4 +1,4 @@
1
- import { createSessionEventRetentionPolicy, isTransientSessionEvent, SEALED_TURN_TRANSIENT_GRACE_MS, } from "./session-event-retention.js";
1
+ import { createSessionEventRetentionPolicy, isTransientSessionEvent, SEALED_TURN_TRANSIENT_GRACE_MS, slimRetainedModelRequest, } from "./session-event-retention.js";
2
2
  /**
3
3
  * 进程内 session event store。
4
4
  *
@@ -68,7 +68,8 @@ export class InMemorySessionEventStore {
68
68
  state.evictedEvents += 1;
69
69
  continue;
70
70
  }
71
- retained.push(event);
71
+ // 同一淘汰节拍:已 sealed 且已持久化的 turn,其 model_request 只需保留元数据。
72
+ retained.push(event.turnId && turnIds.has(event.turnId) ? slimRetainedModelRequest(event) : event);
72
73
  }
73
74
  state.events = retained;
74
75
  }
@@ -14,6 +14,14 @@ export declare const TRANSIENT_SESSION_EVENT_TYPES: ReadonlySet<SessionEventType
14
14
  */
15
15
  export declare const SEALED_TURN_TRANSIENT_GRACE_MS = 120000;
16
16
  export declare function isTransientSessionEvent(event: Pick<SessionEvent, "type">): boolean;
17
+ /**
18
+ * sealed turn 淘汰时 `model_request` 驻留副本的元数据瘦身(spec 同上"model_request 元数据瘦身")。
19
+ * Bug 根因:`messages` 是每次模型请求的完整上下文,每个工具迭代一条且作为非瞬态永久驻留;
20
+ * compact 只截断后续请求,不回收已驻留事件,长会话实测 event store 驻留随轮次线性涨约 150MB。
21
+ * 内存 store 的读者只用 `messages.length`,live sink(debug JSONL)拿的是 append 返回的完整对象,
22
+ * 因此只把驻留副本换成 `messageCount`,事件 id / seq / 其它 payload 字段保持不变。
23
+ */
24
+ export declare function slimRetainedModelRequest(event: SessionEvent): SessionEvent;
17
25
  export type SessionEventRetentionMode = "unbounded" | "turn-window";
18
26
  export interface SessionEventRetentionPolicy {
19
27
  /**
@@ -20,6 +20,24 @@ export const SEALED_TURN_TRANSIENT_GRACE_MS = 120_000;
20
20
  export function isTransientSessionEvent(event) {
21
21
  return TRANSIENT_SESSION_EVENT_TYPES.has(event.type);
22
22
  }
23
+ /**
24
+ * sealed turn 淘汰时 `model_request` 驻留副本的元数据瘦身(spec 同上"model_request 元数据瘦身")。
25
+ * Bug 根因:`messages` 是每次模型请求的完整上下文,每个工具迭代一条且作为非瞬态永久驻留;
26
+ * compact 只截断后续请求,不回收已驻留事件,长会话实测 event store 驻留随轮次线性涨约 150MB。
27
+ * 内存 store 的读者只用 `messages.length`,live sink(debug JSONL)拿的是 append 返回的完整对象,
28
+ * 因此只把驻留副本换成 `messageCount`,事件 id / seq / 其它 payload 字段保持不变。
29
+ */
30
+ export function slimRetainedModelRequest(event) {
31
+ if (event.type !== SessionEventType.ModelRequest) {
32
+ return event;
33
+ }
34
+ const payload = event.payload;
35
+ if (!payload || !Array.isArray(payload.messages)) {
36
+ return event;
37
+ }
38
+ const { messages, ...metadata } = payload;
39
+ return { ...event, payload: { ...metadata, messageCount: messages.length } };
40
+ }
23
41
  const NO_EVICTION = [];
24
42
  function createUnboundedRetention() {
25
43
  return { onAppend: () => NO_EVICTION, collectExpired: () => NO_EVICTION };
@@ -1,20 +1,20 @@
1
1
  import type { ExecutionOutputPreview } from "../interfaces/execution.port.js";
2
2
  import type { RuntimeInputPresentation } from "../interfaces/runtime-input-presentation.js";
3
- import type { EventId, InteractionRequestOrigin, MessageId, PartId, QueryId, SessionId, TraceId, ToolCallId, TurnId } from "../interfaces/shared.js";
4
- import type { CollaborationMode, RiskLevel, TurnSteerCommandKind, TurnSteerDeliveryMode, TurnSteerRejectReason, TurnSteerSource, TurnInputIntentMetadata } from "../interfaces/session.port.js";
5
- import type { ModelNetworkStatusEvent, ModelSelection, ModelUsage, ModelUsageSummary } from "../model/index.js";
6
- import type { HttpClientEgressInfo } from "../interfaces/http-client.port.js";
7
- import type { ModelApiErrorPhase, ModelFailureExceptionKind } from "../telemetry/index.js";
8
3
  import type { CompactBoundaryPayload, CompactTimelinePayload, MicrocompactBoundaryPayload } from "../compact/index.js";
9
4
  import type { HookRunLifecyclePayload } from "../hooks/index.js";
5
+ import type { HttpClientEgressInfo } from "../interfaces/http-client.port.js";
6
+ import type { PermissionOptionsPolicy, PermissionUpdate } from "../interfaces/permission.port.js";
7
+ import type { MessageVisibility, SessionTitleSource, SyntheticUserMessageSource } from "../interfaces/session-store.port.js";
8
+ import type { CollaborationMode, HighspeedMessageMetadata, RiskLevel, TurnInputIntentMetadata, TurnSteerCommandKind, TurnSteerDeliveryMode, TurnSteerRejectReason, TurnSteerSource } from "../interfaces/session.port.js";
9
+ import type { EventId, InteractionRequestOrigin, MessageId, PartId, QueryId, SessionId, ToolCallId, TraceId, TurnId } from "../interfaces/shared.js";
10
+ import type { ModelNetworkStatusEvent, ModelSelection, ModelUsage, ModelUsageSummary } from "../model/index.js";
10
11
  import type { CheckpointCreatedPayload, RewindTriggeredPayload } from "../rewind/index.js";
11
- import type { GoalCompletionVerificationOutput, SessionGoal } from "../tools/target.js";
12
- import type { ToolSideEffectScope } from "../tools/contract.js";
13
- import type { ToolResultDisplayPayload } from "../tools/tool-result-metadata.js";
14
12
  import type { SkillTelemetryMetadata } from "../skills/index.js";
15
- import type { MessageVisibility, SessionTitleSource, SyntheticUserMessageSource } from "../interfaces/session-store.port.js";
13
+ import type { ModelApiErrorPhase, ModelFailureExceptionKind } from "../telemetry/index.js";
14
+ import type { ToolSideEffectScope } from "../tools/contract.js";
16
15
  import type { SavedWorkflowScope } from "../tools/saved-workflow.js";
17
- import type { PermissionOptionsPolicy, PermissionUpdate } from "../interfaces/permission.port.js";
16
+ import type { GoalCompletionVerificationOutput, SessionGoal } from "../tools/target.js";
17
+ import type { ToolResultDisplayPayload } from "../tools/tool-result-metadata.js";
18
18
  import type { StreamRecoveryAnchorPayload, StreamRecoveryAnchorSelectedPayload, StreamRecoveryBlockedPayload, StreamRecoveryRetryStartedPayload, StreamRecoveryStartedPayload, StreamRecoveryTailDiscardedPayload, StreamingToolLedgerPayload } from "./stream-recovery.events.js";
19
19
  export type { CollaborationMode, RiskLevel } from "../interfaces/session.port.js";
20
20
  export type { ModelToolCall as ToolCall } from "../model/index.js";
@@ -53,9 +53,11 @@ export declare const SessionEventType: {
53
53
  readonly UserMessage: "user_message";
54
54
  readonly AssistantMessage: "assistant_message";
55
55
  readonly AssistantFeedbackUpdated: "assistant_feedback_updated";
56
+ readonly HighspeedMetricsUpdated: "highspeed_metrics_updated";
56
57
  readonly SystemMessage: "system_message";
57
58
  readonly ModelRequest: "model_request";
58
59
  readonly ModelSelected: "model_selected";
60
+ readonly TurnExecutionModelFallback: "turn_execution_model_fallback";
59
61
  readonly ModelStreaming: "model_streaming";
60
62
  readonly StreamingToolLedgerUpdated: "streaming_tool_ledger_updated";
61
63
  readonly StreamRecoveryAnchorCreated: "stream_recovery_anchor_created";
@@ -82,6 +84,11 @@ export declare const SessionEventType: {
82
84
  readonly PermissionRequested: "permission_requested";
83
85
  readonly PermissionResolved: "permission_resolved";
84
86
  readonly PermissionDenied: "permission_denied";
87
+ readonly PluginUiResourceUpdated: "plugin_ui_resource_updated";
88
+ readonly PluginUiResourceListChanged: "plugin_ui_resource_list_changed";
89
+ /** App-Provided Tools:模型发起的页面工具调用,只进 live 投影(实例信箱),不落盘。 */
90
+ readonly PluginUiInstanceClosed: "plugin_ui_instance_closed";
91
+ readonly PluginUiAppToolCallRequested: "plugin_ui_app_tool_call_requested";
85
92
  readonly UserInputAutoResolutionUpdated: "user_input_auto_resolution_updated";
86
93
  readonly WorkspaceHookReviewRequested: "workspace_hook_review_requested";
87
94
  readonly WorkspaceHookReviewSettled: "workspace_hook_review_settled";
@@ -204,6 +211,24 @@ export type WorkflowNotificationMeta = {
204
211
  context?: string;
205
212
  askedAt?: number;
206
213
  }
214
+ /**
215
+ * 脚本到达一处留白(docs/dynamic-workflow/transcript-and-notifications.md 的 `hole` 载荷):
216
+ * 主代理欠这个 run 一段代码。`prompt` ≤4000(与升级问题同界);`before` / `after` 是留白前后
217
+ * 的阶段名,`draftPath` / `line` 指向 run 草稿里的那一行。每个 `hole-reached` 恰好一条。
218
+ */
219
+ | {
220
+ kind: "hole";
221
+ siteId: string;
222
+ ordinal: number;
223
+ name: string;
224
+ type: string;
225
+ prompt?: string;
226
+ draftPath?: string;
227
+ line?: number;
228
+ before?: string;
229
+ after?: string;
230
+ reachedAt?: number;
231
+ }
207
232
  /** run 级停滞:每个 stall 段一条,不是终态。 */
208
233
  | {
209
234
  kind: "stall";
@@ -248,15 +273,16 @@ export type WorkflowLaunchDisplay = Extract<ToolResultDisplayPayload, {
248
273
  kind: "create_workflow";
249
274
  }>;
250
275
  /**
251
- * 设置轮的「改了什么」:只有改动过的设置在场,
252
- * 每项 from / to 缺一端即那一端是默认(模型 = 会话模型,上限 = 本机上限)。`ceiling` 是本机上限,
253
- * 供「13 → 4」这种读法。与 shared 的 `workflowSettingsAmendMetaSchema` 同形。
276
+ * 设置轮(docs/dynamic-workflow/launch.md「The settings turn」)的「改了什么」:只有改动过的设置在场,
277
+ * 每项 from / to 缺一端即那一端是默认(模型 = 会话模型,上限 = 默认并发)。`ceiling` 是默认并发 D
278
+ * (线上键名早于「默认并发」这个概念,为兼容旧端保留),供「默认 13 → 4」这种读法。与 shared 的 `workflowSettingsAmendMetaSchema` 同形。
254
279
  */
255
280
  export interface WorkflowSettingsAmendMeta {
256
281
  /**
257
- * 被这次调整替代(或接着跑)的那个 run。**缺席即就地生效**:只改并发上界、run 又还在飞时,
282
+ * 被这次调整替代(或接着跑)的那个 run。**缺席即就地生效**
283
+ * (docs/dynamic-workflow/launch.md「The settings turn」):只改并发上界、run 又还在飞时,
258
284
  * 那次「配置」既不停这次 run 也不另起一次,于是没有前驱可指——`runId` 指的就是被调整的那一个。
259
- * 与 shared 的 `workflowSettingsAmendMetaSchema` 同形。
285
+ * 与 shared 的 `workflowSettingsAmendMetaSchema` 同形(那边记着老桌面上的偏斜)。
260
286
  */
261
287
  predecessorRunId?: string;
262
288
  subagentModel?: {
@@ -491,6 +517,10 @@ export interface AssistantFeedbackUpdatedPayload {
491
517
  entityId: string;
492
518
  feedback: "like" | "dislike" | null;
493
519
  }
520
+ export interface HighspeedMetricsUpdatedPayload {
521
+ entityId: string;
522
+ highspeed: HighspeedMessageMetadata;
523
+ }
494
524
  export interface SystemMessagePayload {
495
525
  type: "init" | "compact_boundary" | "interrupted";
496
526
  content: string;
@@ -550,6 +580,21 @@ export interface ModelSelectedPayload {
550
580
  /** 当前 selection 在 runtime 实际应用的上下文窗口;null 表示显式清除,字段缺失兼容旧事件。 */
551
581
  contextWindow?: number | null;
552
582
  }
583
+ /**
584
+ * 执行 Selection 退回会话 Selection 的原因,与 @dcode/shared 的 selectionFallback 规则同值域:
585
+ * 卡过期由声明的 provider 错误码命中,其余任何加速请求失败归为 request_failed。
586
+ */
587
+ export type TurnExecutionModelFallbackReason = "highspeed_card_expired" | "highspeed_request_failed";
588
+ export interface TurnExecutionModelFallbackPayload {
589
+ inputId?: string;
590
+ reason: TurnExecutionModelFallbackReason;
591
+ /**
592
+ * Provider 重构后单轮执行模型统一用稀疏 Selection 表达(旧的 ModelRef 已删除):
593
+ * from 是本轮 execution 作用域的加速 Selection,to 是会话常驻 Selection。
594
+ */
595
+ fromModelSelection: ModelSelection;
596
+ toModelSelection: ModelSelection;
597
+ }
553
598
  export type ModelStreamingKind = "start" | "text_start" | "text_delta" | "text_end" | "reasoning_start" | "reasoning_delta" | "reasoning_end" | "tool_input_start" | "tool_input_delta" | "tool_input_end" | "tool_call" | "finish" | "error";
554
599
  export interface ModelStreamingPayload {
555
600
  delta: string;
@@ -665,6 +710,10 @@ export interface ToolCallProgressPayload {
665
710
  toolCallId: ToolCallId;
666
711
  toolName?: string;
667
712
  elapsedMs?: number;
713
+ /** MCP `notifications/progress`(A8):progress / total / message 原样转发。 */
714
+ progress?: number;
715
+ total?: number;
716
+ message?: string;
668
717
  pid?: number;
669
718
  stdoutBytes?: number;
670
719
  stderrBytes?: number;
@@ -751,6 +800,7 @@ export interface DynamicWorkflowRunProgressPayload {
751
800
  launchInputId?: string;
752
801
  }
753
802
  export interface PermissionRequestedPayload {
803
+ approvalMode?: "user-once";
754
804
  requestId?: string;
755
805
  toolCallId: ToolCallId;
756
806
  toolName: string;
@@ -767,6 +817,34 @@ export interface PermissionRequestedPayload {
767
817
  fullAccessSupported?: boolean;
768
818
  optionsPolicy?: PermissionOptionsPolicy;
769
819
  }
820
+ /** 订阅者以 (scopeId, generation) 标识沙箱实例;renderer 只投递给 generation 一致的实例。 */
821
+ export interface PluginUiResourceSubscriberRef {
822
+ instance: import("@dcode/shared/mcp-apps").McpAppInstance;
823
+ scopeId: string;
824
+ generation: number;
825
+ }
826
+ export interface PluginUiResourceUpdatedPayload {
827
+ pluginId: string;
828
+ serverName: string;
829
+ uri: string;
830
+ subscribers: PluginUiResourceSubscriberRef[];
831
+ }
832
+ export interface PluginUiResourceListChangedPayload {
833
+ pluginId: string;
834
+ serverName: string;
835
+ subscribers: PluginUiResourceSubscriberRef[];
836
+ }
837
+ /** App-Provided Tools:一次待执行的页面工具调用,投递给 subscribers 里唯一的实例。 */
838
+ export interface PluginUiAppToolCallRequestedPayload {
839
+ activity?: boolean;
840
+ cancelled?: boolean;
841
+ pluginId: string;
842
+ serverName: string;
843
+ subscribers: PluginUiResourceSubscriberRef[];
844
+ callId: string;
845
+ toolName: string;
846
+ arguments: Record<string, unknown>;
847
+ }
770
848
  export interface PermissionResolvedPayload {
771
849
  requestId?: string;
772
850
  toolCallId: ToolCallId;
@@ -894,5 +972,5 @@ export declare function createSessionEvent<T>(type: SessionEventType, sessionId:
894
972
  sequenceNumber?: number;
895
973
  }): SessionEvent;
896
974
  export declare function createModelUsageSummaryFromEvents(events: readonly SessionEvent[]): ModelUsageSummary | undefined;
897
- export type SessionEventPayload = SessionCreatedPayload | SessionResumedPayload | SessionForkedPayload | SessionCompactedPayload | SessionTitleUpdatedPayload | SessionModeChangedPayload | TurnStartedPayload | TurnInputReceivedPayload | TurnSteerQueuedPayload | TurnSteerDeliveryChangedPayload | TurnSteerDispatchChangedPayload | TurnSteerDrainedPayload | TurnSteerReorderedPayload | QueueAutoDrainChangedPayload | FollowupModeChangedPayload | TurnSteerRejectedPayload | TurnSteerDiscardedPayload | SessionInputPromotedPayload | TurnCompletePayload | TurnErrorPayload | UserMessagePayload | AssistantMessagePayload | SystemMessagePayload | ModelRequestPayload | ModelSelectedPayload | ModelStreamingPayload | StreamingToolLedgerPayload | StreamRecoveryAnchorPayload | StreamRecoveryStartedPayload | StreamRecoveryAnchorSelectedPayload | StreamRecoveryTailDiscardedPayload | StreamRecoveryRetryStartedPayload | StreamRecoveryBlockedPayload | ModelNetworkStatusPayload | ModelAnomalyWarningPayload | NetworkRequestStatusPayload | ModelCompletePayload | TargetCompletionVerificationPayload | ModelErrorPayload | ToolCallScheduledPayload | ToolCallStartedPayload | ToolCallProgressPayload | ToolCallResultPayload | ToolCallErrorPayload | ToolBatchCompletePayload | BackgroundTaskStartedPayload | BackgroundTaskUpdatedPayload | BackgroundTaskCompletedPayload | DynamicWorkflowRunProgressPayload | PermissionRequestedPayload | PermissionResolvedPayload | PermissionDeniedPayload | UserInputAutoResolutionUpdatedPayload | WorkspaceHookReviewRequestedPayload | WorkspaceHookReviewSettledPayload | WorkspaceHookReviewSupersededPayload | WorkspaceHookAdmissionUpdatedPayload | HookRunLifecyclePayload | CompactLifecyclePayload | MicrocompactBoundaryEventPayload | CheckpointCreatedPayload | RewindTriggeredPayload | CompactBoundaryPayload;
975
+ export type SessionEventPayload = SessionCreatedPayload | SessionResumedPayload | SessionForkedPayload | SessionCompactedPayload | SessionTitleUpdatedPayload | SessionModeChangedPayload | TurnStartedPayload | TurnInputReceivedPayload | TurnSteerQueuedPayload | TurnSteerDeliveryChangedPayload | TurnSteerDispatchChangedPayload | TurnSteerDrainedPayload | TurnSteerReorderedPayload | QueueAutoDrainChangedPayload | FollowupModeChangedPayload | TurnSteerRejectedPayload | TurnSteerDiscardedPayload | SessionInputPromotedPayload | TurnCompletePayload | TurnErrorPayload | UserMessagePayload | AssistantMessagePayload | SystemMessagePayload | ModelRequestPayload | ModelSelectedPayload | TurnExecutionModelFallbackPayload | ModelStreamingPayload | StreamingToolLedgerPayload | StreamRecoveryAnchorPayload | StreamRecoveryStartedPayload | StreamRecoveryAnchorSelectedPayload | StreamRecoveryTailDiscardedPayload | StreamRecoveryRetryStartedPayload | StreamRecoveryBlockedPayload | ModelNetworkStatusPayload | ModelAnomalyWarningPayload | NetworkRequestStatusPayload | ModelCompletePayload | TargetCompletionVerificationPayload | ModelErrorPayload | ToolCallScheduledPayload | ToolCallStartedPayload | ToolCallProgressPayload | ToolCallResultPayload | ToolCallErrorPayload | ToolBatchCompletePayload | BackgroundTaskStartedPayload | BackgroundTaskUpdatedPayload | BackgroundTaskCompletedPayload | DynamicWorkflowRunProgressPayload | PermissionRequestedPayload | PermissionResolvedPayload | PermissionDeniedPayload | PluginUiResourceUpdatedPayload | PluginUiResourceListChangedPayload | PluginUiAppToolCallRequestedPayload | UserInputAutoResolutionUpdatedPayload | WorkspaceHookReviewRequestedPayload | WorkspaceHookReviewSettledPayload | WorkspaceHookReviewSupersededPayload | WorkspaceHookAdmissionUpdatedPayload | HookRunLifecyclePayload | CompactLifecyclePayload | MicrocompactBoundaryEventPayload | CheckpointCreatedPayload | RewindTriggeredPayload | CompactBoundaryPayload;
898
976
  //# sourceMappingURL=session.events.d.ts.map
@@ -30,9 +30,13 @@ export const SessionEventType = {
30
30
  UserMessage: "user_message",
31
31
  AssistantMessage: "assistant_message",
32
32
  AssistantFeedbackUpdated: "assistant_feedback_updated",
33
+ HighspeedMetricsUpdated: "highspeed_metrics_updated",
34
+ // (2026-09-12):原 ToolWidgetStateUpdated / SessionPluginUiStateUpdated 已删除,
35
+ // 插件 UI widgetState 回退 renderer 内存,不再经 CLI 事件流。
33
36
  SystemMessage: "system_message",
34
37
  ModelRequest: "model_request",
35
38
  ModelSelected: "model_selected",
39
+ TurnExecutionModelFallback: "turn_execution_model_fallback",
36
40
  ModelStreaming: "model_streaming",
37
41
  StreamingToolLedgerUpdated: "streaming_tool_ledger_updated",
38
42
  StreamRecoveryAnchorCreated: "stream_recovery_anchor_created",
@@ -63,6 +67,12 @@ export const SessionEventType = {
63
67
  PermissionRequested: "permission_requested",
64
68
  PermissionResolved: "permission_resolved",
65
69
  PermissionDenied: "permission_denied",
70
+ // 插件 UI 订阅的 MCP 资源变化。只进 live 投影(v4Gateway.ingest,seq 0),不落盘、不进冷恢复。
71
+ PluginUiResourceUpdated: "plugin_ui_resource_updated",
72
+ PluginUiResourceListChanged: "plugin_ui_resource_list_changed",
73
+ /** App-Provided Tools:模型发起的页面工具调用,只进 live 投影(实例信箱),不落盘。 */
74
+ PluginUiInstanceClosed: "plugin_ui_instance_closed",
75
+ PluginUiAppToolCallRequested: "plugin_ui_app_tool_call_requested",
66
76
  UserInputAutoResolutionUpdated: "user_input_auto_resolution_updated",
67
77
  WorkspaceHookReviewRequested: "workspace_hook_review_requested",
68
78
  WorkspaceHookReviewSettled: "workspace_hook_review_settled",