@dipoleml/dcode-cli 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (447) hide show
  1. package/dist/THIRD-PARTY-NOTICES.md +1081 -12
  2. package/dist/dcode.cjs +59253 -45604
  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
@@ -1,4 +1,5 @@
1
- // ConversationDelta:七个操作,封闭集合。
1
+ import { mcpAppInstanceSchema } from "../mcp-apps/instance.js";
2
+ // ConversationDelta:快照增量与插件 UI 的 live-only 通知,操作集合封闭(10-protocol-spec §4.5)。
2
3
  // 没有 row.inserted(中间插入)、没有 row.moved、没有字段级 JSON patch——
3
4
  // 凡此模型表达不了的结构变化,服务端一律发 snapshot resync,刻意压缩客户端错误面。
4
5
  //
@@ -36,10 +37,18 @@ export const statePatchSchema = z.object({
36
37
  // 软门禁:null = pending 清零(提示条消失);对象 = 待审核状态更新。
37
38
  workspaceHookAdmission: workspaceHookAdmissionStateSchema.nullable().optional(),
38
39
  });
40
+ export const pluginUiResourceSubscriberSchema = z
41
+ .object({
42
+ scopeId: z.string(),
43
+ generation: z.number().int().nonnegative(),
44
+ instance: mcpAppInstanceSchema,
45
+ })
46
+ .strict();
39
47
  /**
40
48
  * run 的 **header** = `workflowRunSchema` 减去 actors / nodes 两张按实例增量同步的表。
41
49
  *
42
- * 使用 `.omit` 从同一 schema 派生,避免独立维护的字段表不一致导致订阅解析失败。小集合(reports / artifacts / phases / pendingQuestions…)留在 header 里整键替换——
50
+ * `.omit` 派生而不是手抄一份字段表:2026-09-04 的那次订阅永久失效就是「两处各写一份 run 词汇表」
51
+ * 的后果。小集合(reports / artifacts / phases / pendingQuestions…)留在 header 里整键替换——
43
52
  * 它们的上界都是几十条,为它们再开一套增量语法只会多一套能写错的东西。
44
53
  */
45
54
  export const workflowRunHeaderSchema = workflowRunSchema.omit({ actors: true, nodes: true });
@@ -73,6 +82,40 @@ export const conversationDeltaSchema = z.discriminatedUnion("op", [
73
82
  append: z.string(),
74
83
  }),
75
84
  z.object({ op: z.literal("state.updated"), patch: statePatchSchema }),
85
+ // 插件 UI 订阅的 MCP 资源通知。live-only:不改快照(apply 为 no-op)、不进冷恢复;
86
+ // renderer 按 subscribers 派发给对应沙箱实例。
87
+ z.object({
88
+ op: z.literal("pluginUi.resourceUpdated"),
89
+ pluginId: z.string(),
90
+ serverName: z.string(),
91
+ uri: z.string(),
92
+ subscribers: z.array(pluginUiResourceSubscriberSchema),
93
+ }),
94
+ z.object({
95
+ op: z.literal("pluginUi.resourceListChanged"),
96
+ pluginId: z.string(),
97
+ serverName: z.string(),
98
+ subscribers: z.array(pluginUiResourceSubscriberSchema),
99
+ }),
100
+ z.object({
101
+ op: z.literal("pluginUi.instanceClosed"),
102
+ pluginId: z.string(),
103
+ serverName: z.string(),
104
+ subscribers: z.array(pluginUiResourceSubscriberSchema),
105
+ }),
106
+ // App-Provided Tools 的"实例信箱":模型发起的页面工具调用,live-only 投递给唯一实例(subscribers 恰一项);
107
+ // 渲染端认领后页面 tools/call,结果经 mcp/uiResolveAppToolCall 回传。不改快照、不进冷恢复。
108
+ z.object({
109
+ op: z.literal("pluginUi.appToolCall"),
110
+ activity: z.boolean().optional(),
111
+ cancelled: z.boolean().optional(),
112
+ pluginId: z.string(),
113
+ serverName: z.string(),
114
+ subscribers: z.array(pluginUiResourceSubscriberSchema),
115
+ callId: z.string(),
116
+ toolName: z.string(),
117
+ arguments: z.record(z.string(), z.unknown()),
118
+ }),
76
119
  /**
77
120
  * 一条 dwf run 的键级增量。`revision` 是**这次变化之后**的 `workflowRuns.revision`(绝对值);
78
121
  * 一条引擎事件最多产生一条本 op(节点相位、派生的 actor 状态、用量、水位一起落地,原子)。
@@ -7,6 +7,7 @@ export * from "./workflow-observation-display.js";
7
7
  export * from "./snapshot.js";
8
8
  export * from "./workflow-runs.js";
9
9
  export * from "./workflow-runs-reducer.js";
10
+ export * from "./workflow-runs-holes.js";
10
11
  export * from "./workflow-runs-delta.js";
11
12
  export * from "./workflow-runs-caps.js";
12
13
  export * from "./workflow-runs-eviction.js";
@@ -12,6 +12,7 @@ export * from "./workflow-observation-display.js";
12
12
  export * from "./snapshot.js";
13
13
  export * from "./workflow-runs.js";
14
14
  export * from "./workflow-runs-reducer.js";
15
+ export * from "./workflow-runs-holes.js";
15
16
  // workflowRuns 的键级增量(diff / apply / 规范键序);op 本身在 delta.js。
16
17
  export * from "./workflow-runs-delta.js";
17
18
  // 界留下的痕迹:被拒实例计数、条目预算、步数读法;表满时的腾位;以及给旧消费者的裁剪。
@@ -1,15 +1,25 @@
1
1
  import { z } from "zod";
2
+ export declare const conversationInputSourceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3
+ kind: z.ZodLiteral<"pluginUi">;
4
+ pluginId: z.ZodString;
5
+ toolCallId: z.ZodString;
6
+ }, z.core.$strict>, z.ZodObject<{
7
+ kind: z.ZodLiteral<"genUi">;
8
+ path: z.ZodString;
9
+ title: z.ZodOptional<z.ZodString>;
10
+ }, z.core.$strict>], "kind">;
11
+ export type ConversationInputSource = z.infer<typeof conversationInputSourceSchema>;
2
12
  export declare const conversationInputDeliverySchema: z.ZodObject<{
3
13
  requested: z.ZodEnum<{
4
14
  auto: "auto";
5
- startNow: "startNow";
6
15
  queue: "queue";
7
16
  guide: "guide";
17
+ startNow: "startNow";
8
18
  }>;
9
19
  admitted: z.ZodEnum<{
10
- startNow: "startNow";
11
20
  queue: "queue";
12
21
  guide: "guide";
22
+ startNow: "startNow";
13
23
  }>;
14
24
  fallbackReasonCode: z.ZodOptional<z.ZodString>;
15
25
  }, z.core.$strict>;
@@ -29,8 +39,8 @@ export declare const conversationInputSteerSchema: z.ZodObject<{
29
39
  }, z.core.$strict>;
30
40
  export declare const conversationInputDispatchSchema: z.ZodObject<{
31
41
  state: z.ZodEnum<{
32
- queued: "queued";
33
42
  reserved: "reserved";
43
+ queued: "queued";
34
44
  admitted: "admitted";
35
45
  promoting: "promoting";
36
46
  drained: "drained";
@@ -38,6 +48,126 @@ export declare const conversationInputDispatchSchema: z.ZodObject<{
38
48
  reservationId: z.ZodOptional<z.ZodString>;
39
49
  }, z.core.$strict>;
40
50
  export declare const conversationInputIntentSchema: z.ZodObject<{
51
+ inputOrigin: z.ZodOptional<z.ZodEnum<{
52
+ desktop: "desktop";
53
+ mobile: "mobile";
54
+ }>>;
55
+ botGroupSource: z.ZodOptional<z.ZodObject<{
56
+ botIdentity: z.ZodOptional<z.ZodObject<{
57
+ name: z.ZodString;
58
+ openId: z.ZodOptional<z.ZodString>;
59
+ }, z.core.$strict>>;
60
+ appId: z.ZodOptional<z.ZodString>;
61
+ contentParts: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
62
+ type: z.ZodLiteral<"text">;
63
+ text: z.ZodString;
64
+ }, z.core.$strict>, z.ZodObject<{
65
+ type: z.ZodLiteral<"channelMention">;
66
+ refId: z.ZodString;
67
+ name: z.ZodString;
68
+ channel: z.ZodEnum<{
69
+ feishu: "feishu";
70
+ lark: "lark";
71
+ }>;
72
+ targetId: z.ZodString;
73
+ idType: z.ZodLiteral<"open_id">;
74
+ entityType: z.ZodEnum<{
75
+ unknown: "unknown";
76
+ user: "user";
77
+ bot: "bot";
78
+ }>;
79
+ }, z.core.$strict>]>>>;
80
+ authorizationId: z.ZodOptional<z.ZodString>;
81
+ botId: z.ZodString;
82
+ provider: z.ZodEnum<{
83
+ feishu: "feishu";
84
+ lark: "lark";
85
+ }>;
86
+ chatId: z.ZodString;
87
+ threadId: z.ZodOptional<z.ZodString>;
88
+ rootMessageId: z.ZodOptional<z.ZodString>;
89
+ senderId: z.ZodString;
90
+ senderName: z.ZodString;
91
+ mentionedBot: z.ZodOptional<z.ZodBoolean>;
92
+ messageId: z.ZodString;
93
+ messages: z.ZodOptional<z.ZodArray<z.ZodObject<{
94
+ contentParts: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
95
+ type: z.ZodLiteral<"text">;
96
+ text: z.ZodString;
97
+ }, z.core.$strict>, z.ZodObject<{
98
+ type: z.ZodLiteral<"channelMention">;
99
+ refId: z.ZodString;
100
+ name: z.ZodString;
101
+ channel: z.ZodEnum<{
102
+ feishu: "feishu";
103
+ lark: "lark";
104
+ }>;
105
+ targetId: z.ZodString;
106
+ idType: z.ZodLiteral<"open_id">;
107
+ entityType: z.ZodEnum<{
108
+ unknown: "unknown";
109
+ user: "user";
110
+ bot: "bot";
111
+ }>;
112
+ }, z.core.$strict>]>>>;
113
+ messageId: z.ZodString;
114
+ senderId: z.ZodString;
115
+ senderName: z.ZodString;
116
+ mentionedBot: z.ZodOptional<z.ZodBoolean>;
117
+ text: z.ZodString;
118
+ conversationQuotes: z.ZodOptional<z.ZodArray<z.ZodObject<{
119
+ text: z.ZodString;
120
+ path: z.ZodOptional<z.ZodString>;
121
+ senderName: z.ZodOptional<z.ZodString>;
122
+ senderId: z.ZodOptional<z.ZodString>;
123
+ messageId: z.ZodOptional<z.ZodString>;
124
+ sentAt: z.ZodOptional<z.ZodString>;
125
+ }, z.core.$strip>>>;
126
+ attachmentIndexes: z.ZodArray<z.ZodNumber>;
127
+ }, z.core.$strict>>>;
128
+ topicContext: z.ZodOptional<z.ZodObject<{
129
+ messages: z.ZodArray<z.ZodObject<{
130
+ id: z.ZodString;
131
+ chatId: z.ZodString;
132
+ threadId: z.ZodString;
133
+ senderId: z.ZodString;
134
+ senderName: z.ZodOptional<z.ZodString>;
135
+ parentId: z.ZodOptional<z.ZodString>;
136
+ attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
137
+ name: z.ZodString;
138
+ kind: z.ZodString;
139
+ }, z.core.$strict>>>;
140
+ senderType: z.ZodEnum<{
141
+ user: "user";
142
+ app: "app";
143
+ }>;
144
+ text: z.ZodString;
145
+ createdAt: z.ZodNumber;
146
+ kind: z.ZodString;
147
+ controlCard: z.ZodOptional<z.ZodBoolean>;
148
+ deleted: z.ZodOptional<z.ZodBoolean>;
149
+ }, z.core.$strict>>;
150
+ checkpoint: z.ZodString;
151
+ hasGap: z.ZodBoolean;
152
+ }, z.core.$strict>>;
153
+ topicHistory: z.ZodOptional<z.ZodObject<{
154
+ checkpoint: z.ZodString;
155
+ hasGap: z.ZodBoolean;
156
+ messageCount: z.ZodNumber;
157
+ resourceMessages: z.ZodArray<z.ZodObject<{
158
+ messageId: z.ZodString;
159
+ count: z.ZodNumber;
160
+ }, z.core.$strict>>;
161
+ }, z.core.$strict>>;
162
+ }, z.core.$strict>>;
163
+ conversationQuotes: z.ZodOptional<z.ZodArray<z.ZodObject<{
164
+ text: z.ZodString;
165
+ path: z.ZodOptional<z.ZodString>;
166
+ senderName: z.ZodOptional<z.ZodString>;
167
+ senderId: z.ZodOptional<z.ZodString>;
168
+ messageId: z.ZodOptional<z.ZodString>;
169
+ sentAt: z.ZodOptional<z.ZodString>;
170
+ }, z.core.$strip>>>;
41
171
  sourceCommandId: z.ZodString;
42
172
  queueItemId: z.ZodString;
43
173
  clientId: z.ZodString;
@@ -52,6 +182,11 @@ export declare const conversationInputIntentSchema: z.ZodObject<{
52
182
  fileName: z.ZodString;
53
183
  mime: z.ZodString;
54
184
  bytes: z.ZodNumber;
185
+ sourceKind: z.ZodOptional<z.ZodEnum<{
186
+ "clipboard-text": "clipboard-text";
187
+ "topic-history": "topic-history";
188
+ }>>;
189
+ messageCount: z.ZodOptional<z.ZodNumber>;
55
190
  previewRef: z.ZodOptional<z.ZodString>;
56
191
  }, z.core.$strict>>>;
57
192
  modelSelection: z.ZodOptional<z.ZodObject<{
@@ -66,6 +201,7 @@ export declare const conversationInputIntentSchema: z.ZodObject<{
66
201
  build: "build";
67
202
  edit: "edit";
68
203
  yolo: "yolo";
204
+ guarded: "guarded";
69
205
  }>>;
70
206
  planEnabled: z.ZodOptional<z.ZodBoolean>;
71
207
  sharedContextRefs: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -75,14 +211,14 @@ export declare const conversationInputIntentSchema: z.ZodObject<{
75
211
  delivery: z.ZodObject<{
76
212
  requested: z.ZodEnum<{
77
213
  auto: "auto";
78
- startNow: "startNow";
79
214
  queue: "queue";
80
215
  guide: "guide";
216
+ startNow: "startNow";
81
217
  }>;
82
218
  admitted: z.ZodEnum<{
83
- startNow: "startNow";
84
219
  queue: "queue";
85
220
  guide: "guide";
221
+ startNow: "startNow";
86
222
  }>;
87
223
  fallbackReasonCode: z.ZodOptional<z.ZodString>;
88
224
  }, z.core.$strict>;
@@ -102,8 +238,8 @@ export declare const conversationInputIntentSchema: z.ZodObject<{
102
238
  }, z.core.$strict>;
103
239
  dispatch: z.ZodObject<{
104
240
  state: z.ZodEnum<{
105
- queued: "queued";
106
241
  reserved: "reserved";
242
+ queued: "queued";
107
243
  admitted: "admitted";
108
244
  promoting: "promoting";
109
245
  drained: "drained";
@@ -111,11 +247,42 @@ export declare const conversationInputIntentSchema: z.ZodObject<{
111
247
  reservationId: z.ZodOptional<z.ZodString>;
112
248
  }, z.core.$strict>;
113
249
  admittedAt: z.ZodNumber;
250
+ highspeed: z.ZodOptional<z.ZodObject<{
251
+ schemaVersion: z.ZodLiteral<1>;
252
+ cardId: z.ZodString;
253
+ taskId: z.ZodString;
254
+ provider: z.ZodString;
255
+ model: z.ZodString;
256
+ issuedAt: z.ZodNumber;
257
+ expiresAt: z.ZodNumber;
258
+ regularTps: z.ZodOptional<z.ZodNumber>;
259
+ outputTokens: z.ZodOptional<z.ZodNumber>;
260
+ durationMs: z.ZodOptional<z.ZodNumber>;
261
+ highspeedTps: z.ZodOptional<z.ZodNumber>;
262
+ savedDurationMs: z.ZodOptional<z.ZodNumber>;
263
+ modelDurationMs: z.ZodOptional<z.ZodNumber>;
264
+ toolDurationMs: z.ZodOptional<z.ZodNumber>;
265
+ otherDurationMs: z.ZodOptional<z.ZodNumber>;
266
+ fallbackAt: z.ZodOptional<z.ZodNumber>;
267
+ fallbackReason: z.ZodOptional<z.ZodEnum<{
268
+ highspeed_card_expired: "highspeed_card_expired";
269
+ highspeed_request_failed: "highspeed_request_failed";
270
+ }>>;
271
+ }, z.core.$strict>>;
114
272
  provenance: z.ZodOptional<z.ZodObject<{
115
273
  sourceCommandId: z.ZodString;
116
274
  queueItemId: z.ZodOptional<z.ZodString>;
117
275
  clientId: z.ZodOptional<z.ZodString>;
118
276
  }, z.core.$strict>>;
277
+ source: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
278
+ kind: z.ZodLiteral<"pluginUi">;
279
+ pluginId: z.ZodString;
280
+ toolCallId: z.ZodString;
281
+ }, z.core.$strict>, z.ZodObject<{
282
+ kind: z.ZodLiteral<"genUi">;
283
+ path: z.ZodString;
284
+ title: z.ZodOptional<z.ZodString>;
285
+ }, z.core.$strict>], "kind">>;
119
286
  }, z.core.$strict>;
120
287
  export type ConversationInputIntent = z.infer<typeof conversationInputIntentSchema>;
121
288
  //# sourceMappingURL=input-intent.d.ts.map
@@ -1,11 +1,35 @@
1
+ import { conversationQuotesSchema } from "../conversationSelection.js";
2
+ import { botGroupInputSourceSchema } from "../bots.js";
1
3
  // CLI admission 后的自包含输入事实。
2
4
  // queue / guide / runtime / transcript 只能携带同一个 intent,不允许各层重建字段。
3
5
  import { z } from "zod";
4
6
  import { timestampSchema } from "./core.js";
5
7
  import { attachmentRefSchema } from "./attachment-ref.js";
8
+ import { highspeedMessageMetaSchema } from "../highspeed.js";
6
9
  import { modelSelectionSchema } from "../model-selection.js";
7
10
  import { submissionModeSchema } from "./submission.js";
8
11
  import { sharedContextRefSchema } from "./shared-context-ref.js";
12
+ /**
13
+ * 用户输入的结构化来源:插件 UI 经 `ui/message`
14
+ * 代用户发送时带上,落库后卡片显示"来自插件 X"。缺省即用户亲自输入。
15
+ */
16
+ const pluginUiInputSourceSchema = z
17
+ .object({
18
+ kind: z.literal("pluginUi"),
19
+ pluginId: z.string().min(1),
20
+ toolCallId: z.string().min(1),
21
+ })
22
+ .strict();
23
+ export const conversationInputSourceSchema = z.discriminatedUnion("kind", [
24
+ pluginUiInputSourceSchema,
25
+ z
26
+ .object({
27
+ kind: z.literal("genUi"),
28
+ path: z.string().min(1).max(4096),
29
+ title: z.string().max(250).optional(),
30
+ })
31
+ .strict(),
32
+ ]);
9
33
  export const conversationInputDeliverySchema = z
10
34
  .object({
11
35
  requested: z.enum(["auto", "startNow", "queue", "guide"]),
@@ -33,6 +57,9 @@ export const conversationInputDispatchSchema = z
33
57
  .strict();
34
58
  export const conversationInputIntentSchema = z
35
59
  .object({
60
+ inputOrigin: z.enum(["desktop", "mobile"]).optional(),
61
+ botGroupSource: botGroupInputSourceSchema.optional(),
62
+ conversationQuotes: conversationQuotesSchema.optional(),
36
63
  sourceCommandId: z.string().min(1),
37
64
  queueItemId: z.string().min(1),
38
65
  clientId: z.string().min(1),
@@ -50,6 +77,7 @@ export const conversationInputIntentSchema = z
50
77
  steer: conversationInputSteerSchema,
51
78
  dispatch: conversationInputDispatchSchema,
52
79
  admittedAt: timestampSchema,
80
+ highspeed: highspeedMessageMetaSchema.optional(),
53
81
  provenance: z
54
82
  .object({
55
83
  sourceCommandId: z.string().min(1),
@@ -58,6 +86,7 @@ export const conversationInputIntentSchema = z
58
86
  })
59
87
  .strict()
60
88
  .optional(),
89
+ source: conversationInputSourceSchema.optional(),
61
90
  })
62
91
  .strict();
63
92
  //# sourceMappingURL=input-intent.js.map