@dipoleml/dcode-cli 1.0.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 +59155 -45279
  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 +6544 -183
  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 +759 -11
  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 +378 -74
  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 +3215 -1800
  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 +388 -57
  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 +208 -103
  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 +7728 -1585
  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 +22 -1
  230. package/node_modules/@dcode/shared/dist/dcodeEndpoint.js +102 -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 +46 -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 +1542 -166
  367. package/node_modules/@dcode/shared/dist/validation.js +423 -14
  368. package/node_modules/@dcode/shared/dist/validationAppSettings.d.ts +70 -14
  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 +5117 -2578
  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
@@ -285,12 +285,12 @@ export declare const workspaceHookBundleSnapshotSchema: z.ZodObject<{
285
285
  timeoutMs: z.ZodOptional<z.ZodNumber>;
286
286
  maxOutputBytes: z.ZodOptional<z.ZodNumber>;
287
287
  }, "strict", z.ZodTypeAny, {
288
- timeoutMs?: number | undefined;
289
288
  enabled?: boolean | undefined;
289
+ timeoutMs?: number | undefined;
290
290
  maxOutputBytes?: number | undefined;
291
291
  }, {
292
- timeoutMs?: number | undefined;
293
292
  enabled?: boolean | undefined;
293
+ timeoutMs?: number | undefined;
294
294
  maxOutputBytes?: number | undefined;
295
295
  }>;
296
296
  }, "strict", z.ZodTypeAny, {
@@ -301,8 +301,8 @@ export declare const workspaceHookBundleSnapshotSchema: z.ZodObject<{
301
301
  configFileKind: "dcode.json" | ".dcode/config.json" | "explicit";
302
302
  explicitProjectConfig: boolean;
303
303
  hooksRoot: {
304
- timeoutMs?: number | undefined;
305
304
  enabled?: boolean | undefined;
305
+ timeoutMs?: number | undefined;
306
306
  maxOutputBytes?: number | undefined;
307
307
  };
308
308
  }, {
@@ -313,8 +313,8 @@ export declare const workspaceHookBundleSnapshotSchema: z.ZodObject<{
313
313
  configFileKind: "dcode.json" | ".dcode/config.json" | "explicit";
314
314
  explicitProjectConfig: boolean;
315
315
  hooksRoot: {
316
- timeoutMs?: number | undefined;
317
316
  enabled?: boolean | undefined;
317
+ timeoutMs?: number | undefined;
318
318
  maxOutputBytes?: number | undefined;
319
319
  };
320
320
  }>, "many">;
@@ -462,8 +462,8 @@ export declare const workspaceHookBundleSnapshotSchema: z.ZodObject<{
462
462
  configFileKind: "dcode.json" | ".dcode/config.json" | "explicit";
463
463
  explicitProjectConfig: boolean;
464
464
  hooksRoot: {
465
- timeoutMs?: number | undefined;
466
465
  enabled?: boolean | undefined;
466
+ timeoutMs?: number | undefined;
467
467
  maxOutputBytes?: number | undefined;
468
468
  };
469
469
  }[];
@@ -525,8 +525,8 @@ export declare const workspaceHookBundleSnapshotSchema: z.ZodObject<{
525
525
  configFileKind: "dcode.json" | ".dcode/config.json" | "explicit";
526
526
  explicitProjectConfig: boolean;
527
527
  hooksRoot: {
528
- timeoutMs?: number | undefined;
529
528
  enabled?: boolean | undefined;
529
+ timeoutMs?: number | undefined;
530
530
  maxOutputBytes?: number | undefined;
531
531
  };
532
532
  }[];
@@ -593,44 +593,44 @@ export declare const workspaceHookReviewFlowStateSchema: z.ZodEffects<z.ZodObjec
593
593
  }, "strict", z.ZodTypeAny, {
594
594
  state: "pending" | "cancelled" | "timed_out" | "superseded" | "resolved";
595
595
  sessionId: string;
596
- createdAt: number;
596
+ generation: number;
597
597
  workspaceIdentity: string;
598
+ createdAt: number;
598
599
  bundleDigest: string;
599
600
  reviewFlowId: string;
600
- generation: number;
601
601
  interactionId: string;
602
602
  deadlineAt: number;
603
603
  supersededByInteractionId?: string | undefined;
604
604
  }, {
605
605
  state: "pending" | "cancelled" | "timed_out" | "superseded" | "resolved";
606
606
  sessionId: string;
607
- createdAt: number;
607
+ generation: number;
608
608
  workspaceIdentity: string;
609
+ createdAt: number;
609
610
  bundleDigest: string;
610
611
  reviewFlowId: string;
611
- generation: number;
612
612
  interactionId: string;
613
613
  deadlineAt: number;
614
614
  supersededByInteractionId?: string | undefined;
615
615
  }>, {
616
616
  state: "pending" | "cancelled" | "timed_out" | "superseded" | "resolved";
617
617
  sessionId: string;
618
- createdAt: number;
618
+ generation: number;
619
619
  workspaceIdentity: string;
620
+ createdAt: number;
620
621
  bundleDigest: string;
621
622
  reviewFlowId: string;
622
- generation: number;
623
623
  interactionId: string;
624
624
  deadlineAt: number;
625
625
  supersededByInteractionId?: string | undefined;
626
626
  }, {
627
627
  state: "pending" | "cancelled" | "timed_out" | "superseded" | "resolved";
628
628
  sessionId: string;
629
- createdAt: number;
629
+ generation: number;
630
630
  workspaceIdentity: string;
631
+ createdAt: number;
631
632
  bundleDigest: string;
632
633
  reviewFlowId: string;
633
- generation: number;
634
634
  interactionId: string;
635
635
  deadlineAt: number;
636
636
  supersededByInteractionId?: string | undefined;
@@ -3,6 +3,7 @@ export * from "./interfaces/execution.port.js";
3
3
  export * from "./interfaces/browser-control.port.js";
4
4
  export * from "./interfaces/file-system.port.js";
5
5
  export * from "./interfaces/context-source.port.js";
6
+ export * from "./interfaces/provider-endpoint-routing.port.js";
6
7
  export * from "./interfaces/http-client.port.js";
7
8
  export * from "./interfaces/image-processor.port.js";
8
9
  export * from "./interfaces/pdf-document.port.js";
@@ -22,6 +23,7 @@ export * from "./interfaces/dynamic-workflow-snippet.port.js";
22
23
  export * from "./interfaces/model-catalog.port.js";
23
24
  export * from "./interfaces/automation.port.js";
24
25
  export * from "./interfaces/off-peak.port.js";
26
+ export * from "./interfaces/topic-resource.port.js";
25
27
  export * from "./interfaces/mcp.port.js";
26
28
  export * from "./interfaces/runtime-input-presentation.js";
27
29
  export * from "./events/session.events.js";
@@ -7,6 +7,7 @@ export * from "./interfaces/execution.port.js";
7
7
  export * from "./interfaces/browser-control.port.js";
8
8
  export * from "./interfaces/file-system.port.js";
9
9
  export * from "./interfaces/context-source.port.js";
10
+ export * from "./interfaces/provider-endpoint-routing.port.js";
10
11
  export * from "./interfaces/http-client.port.js";
11
12
  export * from "./interfaces/image-processor.port.js";
12
13
  export * from "./interfaces/pdf-document.port.js";
@@ -26,6 +27,7 @@ export * from "./interfaces/dynamic-workflow-snippet.port.js";
26
27
  export * from "./interfaces/model-catalog.port.js";
27
28
  export * from "./interfaces/automation.port.js";
28
29
  export * from "./interfaces/off-peak.port.js";
30
+ export * from "./interfaces/topic-resource.port.js";
29
31
  export * from "./interfaces/mcp.port.js";
30
32
  export * from "./interfaces/runtime-input-presentation.js";
31
33
  // Events
@@ -412,6 +412,7 @@ export type BrowserCommand = {
412
412
  turnId?: string;
413
413
  } | {
414
414
  method: "closeSession";
415
+ closeTabs?: boolean;
415
416
  } | {
416
417
  method: "cancelRequest";
417
418
  requestId: string;
@@ -568,6 +569,8 @@ export interface BrowserControlListInput {
568
569
  traceContext?: TraceContext;
569
570
  signal?: AbortSignal;
570
571
  }
572
+ /** 子会话 Browser 请求的 tab 归属:子会话自己(dwf 子代理)或父会话(core Agent 子代理)。 */
573
+ export type BrowserChildSessionTabOwner = "child" | "parent";
571
574
  export interface BrowserControlPort {
572
575
  /** 只返回完成握手且当前 context 可达的 backend,不允许伪造 stub。 */
573
576
  list(input: BrowserControlListInput): Promise<BrowserBackendDescriptor[]>;
@@ -576,5 +579,24 @@ export interface BrowserControlPort {
576
579
  turnEnded?(input: BrowserControlListInput): Promise<void>;
577
580
  /** session 关闭时释放 browser guest、pending request 与 lease。 */
578
581
  closeSession?(input: BrowserControlListInput): Promise<void>;
582
+ /**
583
+ * 为一个客户端不认识的子会话派生端口:workspace / clientMode 按 parentSessionId 的会话解析。
584
+ *
585
+ * - `tabOwner: "child"`(默认,dwf 子代理):tab 归属是子会话自己的 sessionId;派生端口的
586
+ * closeSession 连 tab 一起关,并结束这份登记。
587
+ * - `tabOwner: "parent"`(core Agent 子代理):下发的 sessionId 换成父会话,子代理与当前对话共用同一组
588
+ * tab(桌面据此展开面板、tabs.list 列出对话全部 tab);派生端口的 turnEnded / closeSession 不向
589
+ * 桌面发生命周期,tab 交给父会话自己的生命周期管理,closeSession 只结束登记。
590
+ *
591
+ * 登记结束后该子会话的请求与从未登记的一样被拒。
592
+ *
593
+ * 缺席表示实现不按客户端会话校验 sessionId(如 CLI headless CDP),子会话直接用本端口。
594
+ * 见 apps/dcode-cli/packages/dynamic-workflow/docs/execution-engine.md「Subagent sessions」。
595
+ */
596
+ forChildSession?(input: {
597
+ childSessionId: string;
598
+ parentSessionId: string;
599
+ tabOwner?: BrowserChildSessionTabOwner;
600
+ }): BrowserControlPort;
579
601
  }
580
602
  //# sourceMappingURL=browser-control.port.d.ts.map
@@ -0,0 +1,92 @@
1
+ import type { SessionId, ToolCallId } from "./shared.js";
2
+ import type { TraceContext } from "../tracing/tracer.js";
3
+ /**
4
+ * 一处留白在快照上的投影(apps/dcode-cli/packages/dynamic-workflow/docs/execution-engine.md「The run snapshot」):
5
+ * 由 `hole-reached` / `hole-filled` 事件加引擎内存里的停驻表投影——**`waiting` 只在引擎说它在等时**
6
+ * 成立(进程亡故后没有 promise 在等,单靠事件会把一个没人问的留白报成在等),`filled` 来自事件。
7
+ * 零条时整字段缺席,≤32。
8
+ *
9
+ * `line` / `before` / `after` 是留白通知(core 的进度发射器)要念的三样:留白调用在草稿里的行、
10
+ * 它前后的阶段名,都来自编译产物;读不到时缺席,通知随之省略那一句。草稿路径不在这里——它就是
11
+ * 快照的 `scriptPath`。
12
+ */
13
+ export interface DynamicWorkflowRunHole {
14
+ /** 留白的站点 id(`hole#21b40fca`,名字键);`fillHole` 只认它。 */
15
+ siteId: string;
16
+ /** 这一处的序号(同一站点在循环里可以到达多次)。 */
17
+ ordinal: number;
18
+ /** 留白的字面名。 */
19
+ name: string;
20
+ /** 类型实参原文(`Verdict`),照脚本写法。 */
21
+ type: string;
22
+ state: "waiting" | "filled";
23
+ /** 到达时刻(epoch ms);`waiting` 时在场。 */
24
+ since?: number;
25
+ /** 补全时刻(epoch ms);`filled` 时在场。 */
26
+ filledAt?: number;
27
+ /** 补全它的会话(`fillHole` 请求的 `parentSessionId`)。 */
28
+ filledBy?: string;
29
+ /** 留白调用在 run 草稿里的行号(1 起)。 */
30
+ line?: number;
31
+ /** 留白之前的阶段名。 */
32
+ before?: string;
33
+ /** 留白之后的阶段名。 */
34
+ after?: string;
35
+ }
36
+ /**
37
+ * {@link DynamicWorkflowRunPort.fillHole} 的请求(docs/dynamic-workflow/launch.md「The `FillWorkflowHole`
38
+ * tool」;引擎文档「The fill service's checks」)。`body` 是留白函数体的**语句**,逐字节;拼接、编译、
39
+ * 站点稳定性检查与草稿改写都在端口实现侧。
40
+ */
41
+ export interface DynamicWorkflowRunFillHoleRequest {
42
+ runId: string;
43
+ /** 留白的站点 id(`hole#21b40fca`,名字键)。 */
44
+ holeId: string;
45
+ body: string;
46
+ /** 补全的会话,落进 `hole-filled.filledBy`。 */
47
+ parentSessionId?: SessionId | string;
48
+ /** 发起这次补全的 FillWorkflowHole 工具调用。 */
49
+ toolCallId?: ToolCallId | string;
50
+ trace: TraceContext;
51
+ }
52
+ /**
53
+ * 补全被拒的结构化理由。四者对模型是四个不同的下一步:换 run id / 看 run 的状态(停了就先
54
+ * ResumeWorkflowRun)/ 改 fill 文件再交 `path` / 什么都别改,这是宿主的故障。
55
+ */
56
+ export type DynamicWorkflowRunFillHoleRefusalReason =
57
+ /** journal 里没有这个 run。 */
58
+ "run_not_found"
59
+ /** run 不在飞,或这个留白不是它正在等的(已补过、还没到、未知 id);message 说明是哪一种。 */
60
+ | "hole_not_waiting"
61
+ /** 有效脚本编不过;`diagnostics` 在场。什么都没拼、没记、留白照旧在等。 */
62
+ | "compile_failed"
63
+ /** 编好的有效脚本给某个既有站点换了号:分析器的编号规则被打破,是宿主故障而非模型的错;留白照旧在等。 */
64
+ | "fill_ids_unstable";
65
+ /**
66
+ * 一条补全诊断。`inFill` 为真时 `line` / `column` 是**函数体内**的坐标(拼进去的那一段),否则是
67
+ * 脚本坐标——工具层据此把它锚到 fill 文件或 run 的草稿。
68
+ */
69
+ export interface DynamicWorkflowRunFillHoleDiagnostic {
70
+ line: number;
71
+ column: number;
72
+ message: string;
73
+ code: number;
74
+ inFill: boolean;
75
+ }
76
+ /**
77
+ * `fillHole` 的结构化结果。成功时 `scriptText` 是**有效脚本**(已拼入函数体、已落库的那一份),
78
+ * 工具层据它铸 display;`scriptPath` 是 run 的草稿(已被就地改写成有效脚本;run 原本没有草稿时
79
+ * 由实现侧铸一份);`phasesAdded` 是函数体带来的阶段名。
80
+ */
81
+ export type FillWorkflowHoleResult = {
82
+ ok: true;
83
+ phasesAdded: string[];
84
+ scriptPath?: string;
85
+ scriptText: string;
86
+ } | {
87
+ ok: false;
88
+ reason: DynamicWorkflowRunFillHoleRefusalReason;
89
+ message: string;
90
+ diagnostics?: DynamicWorkflowRunFillHoleDiagnostic[];
91
+ };
92
+ //# sourceMappingURL=dynamic-workflow-run-hole.port.d.ts.map
@@ -0,0 +1,9 @@
1
+ // ============================================================
2
+ // Dynamic Workflow Run Port - 留白(hole)的读面与补全面
3
+ // ============================================================
4
+ // 从 dynamic-workflow-run.port.ts 拆出(oxlint max-lines 400 行门),照 retune 的先例
5
+ // (dynamic-workflow-run-retune.port.ts):快照上的留白条目、`fillHole` 的请求与结果住在这里,端口
6
+ // 方法本身仍在 DynamicWorkflowRunPort 上;公开名一个不改,主端口文件 `export type *` 再导出。
7
+ // spec:docs/dynamic-workflow/launch.md「The `FillWorkflowHole` tool」;
8
+ // apps/dcode-cli/packages/dynamic-workflow/docs/execution-engine.md「Holes」。
9
+ export {};
@@ -25,15 +25,15 @@ export type DynamicWorkflowRunRetuneRefusalReason = "not_live" | "unchanged";
25
25
  * {@link import("./dynamic-workflow-run.port.js").DynamicWorkflowRunAmendResult} 同一条论证:
26
26
  * 两种理由都是调用方可预期的业务分支。
27
27
  *
28
- * `ceiling` 与 `previous` 不是锦上添花:模型面的回话要说「至多 n 个子代理同时运行」,而 n 等于
29
- * 天花板时该说的是「限制已解除」(与 `CreateWorkflow` 的回话同一条判据);事件日志要说「8 → 2」,
30
- * 从单个新值推不出前一个。两者都只有端口这一侧知道,留给调用方重算就是第二份天花板实现。
28
+ * `defaultConcurrency` 与 `previous` 不是锦上添花:模型面的回话要说「至多 n 个子代理同时运行」,而
29
+ * n 等于默认并发时要注明「(默认)」(与 `CreateWorkflow` 的回话同一条判据);事件日志要说「8 → 2」,
30
+ * 从单个新值推不出前一个。两者都只有端口这一侧知道,留给调用方重算就是第二份默认并发实现。
31
31
  */
32
32
  export type DynamicWorkflowRunRetuneResult = {
33
33
  ok: true;
34
34
  maxConcurrency: number;
35
35
  previous: number;
36
- ceiling: number;
36
+ defaultConcurrency: number;
37
37
  } | {
38
38
  ok: false;
39
39
  reason: DynamicWorkflowRunRetuneRefusalReason;
@@ -1,4 +1,8 @@
1
- // Dynamic Workflow Run Port:调整运行中的并发上限。
2
- // 定义请求、结果与能力边界,由 dynamic-workflow-run.port.ts 统一再导出,
3
- // 调用方通过 `@dcode/contracts` 使用。
1
+ // ============================================================
2
+ // Dynamic Workflow Run Port:就地改一个在飞 run 的并发上界
3
+ // ============================================================
4
+ // docs/dynamic-workflow/concurrency.md「Retuning a live run」。与情势截面
5
+ // (dynamic-workflow-run-roster.port.ts)同一条拆分理由:dynamic-workflow-run.port.ts 顶到
6
+ // oxlint max-lines 上限(400 行),而这三个类型自成一组。公开面不变——那边原样再导出,
7
+ // `@dcode/contracts` 的导入路径一字不改。
4
8
  export {};
@@ -1,4 +1,9 @@
1
- // Dynamic Workflow Run Port:工作区操作记录的读取类型。
2
- // 包含 `files.*`、`git.*` 和 `world.run` 调用的清单行与正文,
3
- // 由 dynamic-workflow-run.port.ts 统一再导出,调用方通过 `@dcode/contracts` 使用。
1
+ // ============================================================
2
+ // Dynamic Workflow Run Port:工作区 transcript 的读面类型
3
+ // ============================================================
4
+ // docs/dynamic-workflow/transcript-and-notifications.md。与情势截面
5
+ // (dynamic-workflow-run-roster.port.ts)、retune(dynamic-workflow-run-retune.port.ts)同一条
6
+ // 拆分理由:dynamic-workflow-run.port.ts 顶到 oxlint max-lines 上限(400 行),而这六个类型
7
+ // 自成一组(一次 `files.*` / `git.*` / `world.run` 调用的清单行与正文)。公开面不变——那边
8
+ // 原样再导出,`@dcode/contracts` 的导入路径一字不改。
4
9
  export {};
@@ -1,5 +1,6 @@
1
1
  import type { DynamicWorkflowRunHealth, DynamicWorkflowRunPhaseView, DynamicWorkflowRunSubagentView } from "./dynamic-workflow-run-roster.port.js";
2
2
  import type { DynamicWorkflowRunRetuneRequest, DynamicWorkflowRunRetuneResult } from "./dynamic-workflow-run-retune.port.js";
3
+ import type { DynamicWorkflowRunFillHoleRequest, DynamicWorkflowRunHole, FillWorkflowHoleResult } from "./dynamic-workflow-run-hole.port.js";
3
4
  import type { DynamicWorkflowRunWorkspaceNode, DynamicWorkflowRunWorkspaceNodeResult, DynamicWorkflowRunWorkspaceNodeResultQuery } from "./dynamic-workflow-run-workspace.port.js";
4
5
  import type { DynamicWorkflowRunProgressPayload } from "../events/session.events.js";
5
6
  import type { ModelSelection } from "../model/model.js";
@@ -46,10 +47,10 @@ export interface DynamicWorkflowRunSubmitRequest {
46
47
  */
47
48
  phaseNames?: string[];
48
49
  /**
49
- * 本 run 自己的并发上界:同时在飞的
50
- * ask 数,落 `dwf_run.caps_max_concurrency`、resume 照用。**缺席即天花板**(机器推导值,
51
- * `resolveWorkflowConcurrencyCeiling`);给了就钳到 `[1, 天花板]`——它只能压低并发,永不抬高。
52
- * 工具层在 `resolveInput` 里已经钳过一次(确认窗要显示实际生效的值),这里再钳是端口自己的契约。
50
+ * 本 run 自己的并发上界(docs/dynamic-workflow/concurrency.md「Two bounds on a run」):同时在飞的
51
+ * ask 数,落 `dwf_run.caps_max_concurrency`、resume 照用。**缺席即默认并发**(机器推导值,
52
+ * `resolveWorkflowDefaultConcurrency`);给了就向下取整、至少 1,**没有上限**——高于或低于默认都行。
53
+ * 工具层在 `resolveInput` 里已经取整过一次(确认窗要显示实际生效的值),这里再取整是端口自己的契约。
53
54
  */
54
55
  maxConcurrency?: number;
55
56
  /**
@@ -61,6 +62,13 @@ export interface DynamicWorkflowRunSubmitRequest {
61
62
  * 发生」有两个答案。主代理自己不受影响:它恒留在会话模型上。
62
63
  */
63
64
  subagentModel?: ModelSelection;
65
+ /**
66
+ * 脚本里点名的模型(docs/dynamic-workflow/launch.md「Models the script names」):键是脚本逐字
67
+ * 写下的名字(运行期 persona 里带的就是它),值是工具层已经对着模型目录解析好的选择。与
68
+ * {@link subagentModel} 同一条路、同一个理由收结构化选择:随 `run-launched` 记一次(规范串)、
69
+ * 引擎从不读,宿主建子代理会话时按 persona 的名字查它。脚本没点名任何模型时缺席。
70
+ */
71
+ modelBindings?: Record<string, ModelSelection>;
64
72
  /**
65
73
  * 本 run 的脚本**来自哪个文件**的绝对路径。与 {@link subagentModel} 走同一条路:随 `run-launched` 记一次、引擎从不读、
66
74
  * 零 SQL(`dwf_run` 上没有这一列),两条读面再从事件读回。
@@ -127,6 +135,12 @@ export interface DynamicWorkflowRunAmendRequest {
127
135
  * `resolveInput` 里连同一次重新解析归一成这里的一个选择或缺席。
128
136
  */
129
137
  subagentModel?: ModelSelection;
138
+ /**
139
+ * **新脚本**点名的模型;语义同 {@link DynamicWorkflowRunSubmitRequest.modelBindings}。「同名沿用
140
+ * 前驱的绑定」是**工具面**的规则,在 `AmendWorkflow` 的 `resolveInput` 里连同重新解析归一成这里
141
+ * 的一张表;端口不从前驱继承任何绑定。
142
+ */
143
+ modelBindings?: Record<string, ModelSelection>;
130
144
  /**
131
145
  * **新脚本**来自哪个文件的绝对路径;语义同 {@link DynamicWorkflowRunSubmitRequest.scriptPath}。
132
146
  *
@@ -179,6 +193,19 @@ export type DynamicWorkflowRunAmendResult = {
179
193
  export type DynamicWorkflowRunCancelInitiator = "user" | "model" | {
180
194
  superseded: string;
181
195
  };
196
+ /**
197
+ * 终态快照带的 report item 上限(`reports` 的长度上界)。取 256——report 条数上限从 256 提到
198
+ * 65,536 之前的值:报告条数不超过它的 run,快照与通知逐字节不变;更大的 run 由 `reportCount`
199
+ * 说出真实总数。完成通知那一节的字符预算(8000)本来也容不下更多条。
200
+ */
201
+ export declare const DYNAMIC_WORKFLOW_SNAPSHOT_MAX_REPORTS = 256;
202
+ /**
203
+ * 终态快照带的 report item 的字节上界(按 journal 里 `result_json` 的字节计)。取 8 MiB——
204
+ * 单条上限 32 KiB 时 256 条的最坏情形,所以单条上限提到 1 MiB 之后快照的内存不涨。快照只喂
205
+ * 完成通知,而通知每条最多展示 2,000 字符、整节 8,000 字符,8 MiB 远超它能用上的部分。
206
+ * 第一条总是带上,所以一条 1 MiB 的报告不会让快照一条都不带。
207
+ */
208
+ export declare const DYNAMIC_WORKFLOW_SNAPSHOT_MAX_REPORT_BYTES: number;
182
209
  /**
183
210
  * run 快照:沿用 {@link WorkflowTaskSnapshot} 的形状(后台任务追踪器与通知管线按它读),
184
211
  * 只把 `output` 放宽——workflow run 的产物是脚本的顶层返回值,形状由脚本决定,不是 legacy
@@ -188,6 +215,9 @@ export type DynamicWorkflowRunCancelInitiator = "user" | "model" | {
188
215
  * `kind = "report"` 节点行——那是这些条目的持久家(`workflowRuns.reports` 只是有界的
189
216
  * memory-only 展示面)。完成通知据此在 completed / failed / cancelled 三态下一律回投:
190
217
  * 一个死在第 12 个 ask 上的 run 仍然做完了 11 个 ask 的活,捞回它正是 `report` 存在的理由。
218
+ * 它只带**前** {@link DYNAMIC_WORKFLOW_SNAPSHOT_MAX_REPORTS} 条、且至多
219
+ * {@link DYNAMIC_WORKFLOW_SNAPSHOT_MAX_REPORT_BYTES} 字节;真实总数在 `reportCount`
220
+ * (docs/execution-engine.md「Reading the journal」)。
191
221
  */
192
222
  export type DynamicWorkflowRunSnapshot = Omit<WorkflowTaskSnapshot, "output"> & {
193
223
  output?: unknown;
@@ -217,6 +247,12 @@ export type DynamicWorkflowRunSnapshot = Omit<WorkflowTaskSnapshot, "output"> &
217
247
  * 这里是字符串而不是 {@link ModelSelection}:读面只用来显示与原样回填,没有人按字段取值。
218
248
  */
219
249
  subagentModel?: string;
250
+ /**
251
+ * 本 run 的脚本点名的模型(journal 事件 `run-launched` 上的那张表):脚本逐字写下的名字 →
252
+ * 规范串。**只在脚本点名过模型时在场**。`AmendWorkflow` 的 `resolveInput` 与 GUI「配置」据它让
253
+ * 同名的绑定沿用下去(docs/dynamic-workflow/launch.md「Models the script names」)。
254
+ */
255
+ modelBindings?: Record<string, string>;
220
256
  /**
221
257
  * 本 run 的脚本文件(绝对路径,journal 事件 `run-launched` 上的那一个)。**只在这个 run 记下过文件时在场**。
222
258
  *
@@ -228,14 +264,21 @@ export type DynamicWorkflowRunSnapshot = Omit<WorkflowTaskSnapshot, "output"> &
228
264
  failure?: DynamicWorkflowRunError;
229
265
  /**
230
266
  * 本 run 及其 lineage 的**活动**时长(毫秒):本 run 的每一世加上每个前驱的每一世,世与世
231
- * 之间的空档不计。完成卡的「时间」格报的就是它。
267
+ * 之间的空档不计(口径与理由见 docs/dynamic-workflow/transcript-and-notifications.md
268
+ * 「How long it took」)。完成卡的「时间」格报的就是它。
232
269
  *
233
270
  * 与 `reports` / `artifacts` 同规**只在终态在场**(`getTask` 被反复轮询,而消费者只有终态
234
271
  * 通知),且 journal 说不出话时整字段缺席——不是 0。缺席即读侧退回 `completedAt − startedAt`:
235
272
  * 那是结算它的那个进程自己看到的一世,一个更保守但永不虚报的答案。
236
273
  */
237
274
  activeDurationMs?: number;
275
+ /** 前 {@link DYNAMIC_WORKFLOW_SNAPSHOT_MAX_REPORTS} 条 report item,按报告顺序;零条时缺席。 */
238
276
  reports?: readonly unknown[];
277
+ /**
278
+ * 本 run 的 report 真实总条数(`count(*)`),与 `reports` 同在同缺。通知与 manifest 的
279
+ * `count` 读它:`reports` 被截在上限处时,`count ≠ shown` 就是「还有更多」的信号。
280
+ */
281
+ reportCount?: number;
239
282
  /**
240
283
  * 此刻停驻在这个 run 上、等主代理作答的升级问题。
241
284
  *
@@ -248,6 +291,12 @@ export type DynamicWorkflowRunSnapshot = Omit<WorkflowTaskSnapshot, "output"> &
248
291
  * 时候都能经既有观察面重新发现待答问题。零条时整字段缺席(不发空数组)。
249
292
  */
250
293
  pendingQuestions?: readonly DynamicWorkflowRunPendingQuestion[];
294
+ /**
295
+ * 本 run 的留白({@link DynamicWorkflowRunHole}):到达过的每一处,等着的与补过的。与
296
+ * `pendingQuestions` 同规——零条整字段缺席、`waiting` 从引擎的停驻表投影而不是单靠事件重放;
297
+ * 留白通知的发射器与 `FillWorkflowHole` 的 resolveInput 都读它。
298
+ */
299
+ holes?: readonly DynamicWorkflowRunHole[];
251
300
  /**
252
301
  * 本 run 发布的**用户面产物**,按首次出现顺序,来自
253
302
  * journal 的 `kind = "artifact"` 行——那是版本历史的持久家(`workflowRuns.artifacts` 只带
@@ -310,13 +359,30 @@ export interface DynamicWorkflowRunArtifactItem {
310
359
  sequence: number;
311
360
  siteId: string;
312
361
  ordinal: number;
313
- item: unknown;
362
+ /** 整条 item;请求点名了 `fields` 时缺席。 */
363
+ item?: unknown;
364
+ /** 请求点名了 `fields` 时:路径 → 值,走不通的路径不在表里。 */
365
+ fields?: Record<string, unknown>;
314
366
  }
315
- /** {@link DynamicWorkflowRunPort.listArtifactItems} 的分页袋(cursor = journal sequence,严格大于)。 */
367
+ /**
368
+ * {@link DynamicWorkflowRunPort.listArtifactItems} 的分页袋(cursor = journal sequence,严格大于)。
369
+ * 两道界的语义同 {@link DynamicWorkflowRunEventPage}:条数到 `limit`、或再加一条就超过
370
+ * `maxBytes` 时收尾,第一条总是带上。两者都由调用方(网关)给定,实现方精确兑现、不再钳。
371
+ */
316
372
  export interface DynamicWorkflowRunArtifactItemPage {
317
373
  afterSequence?: number;
318
- /** 必填;调用方可传「上限 + 1」探测 hasMore,实现方不得再钳。 */
319
374
  limit: number;
375
+ maxBytes: number;
376
+ /**
377
+ * 只取这些字段路径(`readWorkflowArtifactField` 的规则,由 SQLite 取出),结果每条带 `fields`
378
+ * 而不带 `item`,`maxBytes` 按取出的字段值计。缺省 = 整条 item。
379
+ */
380
+ fields?: readonly string[];
381
+ }
382
+ /** 看板条目的一页。`hasMore` 由存储层判定:页之后是否还有条目。 */
383
+ export interface DynamicWorkflowRunArtifactItemsResult {
384
+ items: readonly DynamicWorkflowRunArtifactItem[];
385
+ hasMore: boolean;
320
386
  }
321
387
  /** {@link DynamicWorkflowRunPort.readArtifact} 的返回:某个版本的全部字节。 */
322
388
  export interface DynamicWorkflowRunArtifactBytes {
@@ -372,11 +438,23 @@ export type DynamicWorkflowResolveQuestionResult = {
372
438
  export interface DynamicWorkflowRunWaitOptions {
373
439
  signal?: AbortSignal;
374
440
  }
375
- /** 事件日志的分页参数;cursor = journal sequence(appendEvent 单调分配)。 */
441
+ /**
442
+ * 事件日志的分页参数;cursor = journal sequence(appendEvent 单调分配)。
443
+ *
444
+ * 两道界同时生效(docs/execution-engine.md「Reading the journal」):页在条数到 `limit`、或
445
+ * 再加一条就会让存储里的序列化字节超过 `maxBytes` 时收尾;第一条总是带上,所以一条超过
446
+ * `maxBytes` 的事件自成一页。实现方缺省两者时各取一个有界的默认值——事件日志一页永远有界。
447
+ */
376
448
  export interface DynamicWorkflowRunEventPage {
377
449
  /** 只取 sequence 严格大于该值的事件;缺省从头取。 */
378
450
  afterSequence?: number;
379
451
  limit?: number;
452
+ maxBytes?: number;
453
+ }
454
+ /** 事件日志的一页。`hasMore` 由存储层判定:页之后是否还有事件。 */
455
+ export interface DynamicWorkflowRunEventsResult {
456
+ events: DynamicWorkflowRunEvent[];
457
+ hasMore: boolean;
380
458
  }
381
459
  /**
382
460
  * 一条 run 事件的**协议形态**:sequence + 事件种类 + JSON 载荷。
@@ -449,16 +527,18 @@ export interface DynamicWorkflowRunPort {
449
527
  */
450
528
  amend?(request: DynamicWorkflowRunAmendRequest, options?: DynamicWorkflowRunSubmitOptions): Promise<DynamicWorkflowRunAmendResult>;
451
529
  /**
452
- * run 自己并发上界的天花板(`max(1, min(16, availableParallelism() − 2))`,每进程一个值)。同步、无副作用。
530
+ * 默认并发 D(docs/dynamic-workflow/concurrency.md「Two bounds on a run」:
531
+ * `max(4, min(16, availableParallelism() − 2))`,每进程一个值)。同步、无副作用。它是**起点**
532
+ * 不是上限:没设 `max_concurrency` 的 run 跑在它上面,设了的高于低于都行。
453
533
  *
454
- * 工具层的两个读者:`CreateWorkflow` / `AmendWorkflow` 的 `resolveInput` 把模型给的
455
- * `max_concurrency` 钳到它之下(确认窗显示的必须是将要生效的值),`GetWorkflowRun` 据它决定
456
- * 一个 run 的上界是否值得一提。**可选成员**(消费方 `typeof` 探测):端口 stub 不必为它陪跑,
457
- * 缺席时工具层不钳、原样下传(端口实现自己还会钳一次)。
534
+ * 工具层的读者:确认窗与回话(「(默认)」「默认 N」)、`AmendWorkflow` 的同值判定(`null` 要
535
+ * 折算成数才比得了),以及 `GetWorkflowRun` 据它决定一个 run 的上界是否值得一提(≠ 默认才提)。
536
+ * **可选成员**(消费方 `typeof` 探测):端口 stub 不必为它陪跑,缺席时工具层只是不知道默认是几。
458
537
  */
459
- concurrencyCeiling?(): number;
538
+ defaultConcurrency?(): number;
460
539
  /**
461
- * 就地改一个**在飞** run 自己的并发上界:同一个 runId、不铸后继、不 supersede、不导入缓存、在飞 ask 一个不丢。
540
+ * 就地改一个**在飞** run 自己的并发上界(docs/dynamic-workflow/concurrency.md「Retuning a live
541
+ * run」):同一个 runId、不铸后继、不 supersede、不导入缓存、在飞 ask 一个不丢。
462
542
  *
463
543
  * 与 {@link amend} 并列而非合并:修订换的是**脚本**,代价是停下前驱、铸新 run、从缓存重放;
464
544
  * 而「只把这个 run 调慢一点」不该付那笔账。两个调用方(`AmendWorkflow` 的 handler 与 GUI 的
@@ -481,7 +561,7 @@ export interface DynamicWorkflowRunPort {
481
561
  */
482
562
  cancel(runId: string, initiator?: DynamicWorkflowRunCancelInitiator): Promise<boolean>;
483
563
  /** 按 cursor 翻取事件日志;越界 cursor 返回空页而非报错。 */
484
- listEvents(runId: string, options: DynamicWorkflowRunEventPage): Promise<DynamicWorkflowRunEvent[]>;
564
+ listEvents(runId: string, options: DynamicWorkflowRunEventPage): Promise<DynamicWorkflowRunEventsResult>;
485
565
  /**
486
566
  * 按项目(cwd)枚举 run,最近更新的在前。服务 `ListWorkflowRuns` 工具。
487
567
  *
@@ -554,6 +634,19 @@ export interface DynamicWorkflowRunPort {
554
634
  * 应答面全员陪跑;对消费方「端口缺席」与「方法缺席」是同一个业务失败。
555
635
  */
556
636
  resolveQuestion?(qid: string, answer: string): Promise<DynamicWorkflowResolveQuestionResult>;
637
+ /**
638
+ * 给一个正在等的留白补上函数体(docs/dynamic-workflow/launch.md「The `FillWorkflowHole` tool」;
639
+ * 引擎文档「The fill service's checks」)。服务 `FillWorkflowHole` 工具。
640
+ *
641
+ * 实现侧一条龙:读 run 存档的脚本 → 按站点 id 找到留白调用、把函数体拼成它的最后一个实参 →
642
+ * 整体编译(诊断 → `compile_failed`,坐标按 `inFill` 分到函数体内 / 脚本)→ 站点稳定性检查
643
+ * (→ `fill_ids_unstable`)→ 引擎 `fillHole`(→ `hole_not_waiting`)→ 把 run 的草稿就地改写成
644
+ * 有效脚本。**拒绝即零副作用**:留白照旧在等。
645
+ *
646
+ * **可选成员**(消费方 `typeof` 探测),理由同 {@link resolveQuestion}:端口 stub 不必为它陪跑;
647
+ * 对消费方「端口缺席」与「方法缺席」是同一个业务失败(本会话不能补全留白)。
648
+ */
649
+ fillHole?(request: DynamicWorkflowRunFillHoleRequest): Promise<FillWorkflowHoleResult>;
557
650
  /**
558
651
  * 本 run 的用户面产物清单(journal `kind = "artifact"` 行按 id 分组、版本升序)。UI 冷恢复与中枢详情的 durable 读法。
559
652
  * 未知 runId 返回 `undefined`。**可选成员**,理由同 {@link listRuns}(journal 带产物
@@ -564,7 +657,7 @@ export interface DynamicWorkflowRunPort {
564
657
  * 喂给某个预置产物的 `report` 条目,按 journal sequence 升序分页(看板的取数面)。
565
658
  * 越界 cursor 返回空页而非报错。可选成员,理由同 {@link listArtifacts}。
566
659
  */
567
- listArtifactItems?(runId: string, artifactId: string, page: DynamicWorkflowRunArtifactItemPage): Promise<readonly DynamicWorkflowRunArtifactItem[]>;
660
+ listArtifactItems?(runId: string, artifactId: string, page: DynamicWorkflowRunArtifactItemPage): Promise<DynamicWorkflowRunArtifactItemsResult>;
568
661
  /**
569
662
  * 读某个产物版本的字节:**先**在 journal 里确认 `(runId, artifactId, version)` 有一行
570
663
  * `completed` 记录,再按行上的 `uri` 经 tool-artifact store 取——调用方传来的任何 id 都
@@ -726,6 +819,7 @@ export interface DynamicWorkflowRunProviderStop {
726
819
  }
727
820
  export type * from "./dynamic-workflow-run-roster.port.js";
728
821
  export type * from "./dynamic-workflow-run-retune.port.js";
822
+ export type * from "./dynamic-workflow-run-hole.port.js";
729
823
  export type * from "./dynamic-workflow-run-workspace.port.js";
730
824
  /** 单 run 详情:共同截面 + 进度 + 情势截面 + 按终态分叉的产物 / 失败。 */
731
825
  export interface DynamicWorkflowRunDetail extends DynamicWorkflowRunSummary {
@@ -741,6 +835,8 @@ export interface DynamicWorkflowRunDetail extends DynamicWorkflowRunSummary {
741
835
  * 很少设置的字段加宽。
742
836
  */
743
837
  subagentModel?: string;
838
+ /** 本 run 的脚本点名的模型,语义同 {@link DynamicWorkflowRunSnapshot.modelBindings}。 */
839
+ modelBindings?: Record<string, string>;
744
840
  /**
745
841
  * 本 run 的脚本文件,语义同 {@link DynamicWorkflowRunSnapshot.scriptPath}:只在记下过文件时
746
842
  * 在场。`GetWorkflowRun` 据它在 `<amendable>` 里把下一步说成「就地编辑这个文件」。
@@ -788,6 +884,11 @@ export interface DynamicWorkflowRunDetail extends DynamicWorkflowRunSummary {
788
884
  * 缺了它,那两处承诺都会指向一个什么都不返回的工具。
789
885
  */
790
886
  pendingQuestions?: readonly DynamicWorkflowRunPendingQuestion[];
887
+ /**
888
+ * 本 run 的留白,与 {@link DynamicWorkflowRunSnapshot.holes} **同源同投影**(零条整字段缺席),
889
+ * 只是换了一条读面:本字段服务 `GetWorkflowRun`——留白通知丢失后模型侧唯一的发现面。
890
+ */
891
+ holes?: readonly DynamicWorkflowRunHole[];
791
892
  /**
792
893
  * 本 run 的用户面产物(任意状态都附;journal-backed,与 {@link DynamicWorkflowRunSnapshot.artifacts}
793
894
  * 同源)。`GetWorkflowRun` 据此告诉模型「这些已经以卡片呈现给用户了,按标题引用即可」。
@@ -1,6 +1,19 @@
1
1
  // ============================================================
2
2
  // Dynamic Workflow Run Port - dwf 引擎 run 的提交 / 观察 / 取消边界
3
3
  // ============================================================
4
+ /**
5
+ * 终态快照带的 report item 上限(`reports` 的长度上界)。取 256——report 条数上限从 256 提到
6
+ * 65,536 之前的值:报告条数不超过它的 run,快照与通知逐字节不变;更大的 run 由 `reportCount`
7
+ * 说出真实总数。完成通知那一节的字符预算(8000)本来也容不下更多条。
8
+ */
9
+ export const DYNAMIC_WORKFLOW_SNAPSHOT_MAX_REPORTS = 256;
10
+ /**
11
+ * 终态快照带的 report item 的字节上界(按 journal 里 `result_json` 的字节计)。取 8 MiB——
12
+ * 单条上限 32 KiB 时 256 条的最坏情形,所以单条上限提到 1 MiB 之后快照的内存不涨。快照只喂
13
+ * 完成通知,而通知每条最多展示 2,000 字符、整节 8,000 字符,8 MiB 远超它能用上的部分。
14
+ * 第一条总是带上,所以一条 1 MiB 的报告不会让快照一条都不带。
15
+ */
16
+ export const DYNAMIC_WORKFLOW_SNAPSHOT_MAX_REPORT_BYTES = 8 * 1024 * 1024;
4
17
  /**
5
18
  * run 事件载荷的界。**协议边界上的所有载荷有界**,而引擎的事件
6
19
  * 里有两个天然无界的字段:`actor-created` 的 `persona.system`(整段 system prompt)与
@@ -1,3 +1,4 @@
1
+ export * from "./provider-endpoint-routing.port.js";
1
2
  export * from "./execution.port.js";
2
3
  export * from "./file-system.port.js";
3
4
  export * from "./context-source.port.js";
@@ -1,4 +1,5 @@
1
1
  // Ports - interface definitions for adapters
2
+ export * from "./provider-endpoint-routing.port.js";
2
3
  export * from "./execution.port.js";
3
4
  export * from "./file-system.port.js";
4
5
  export * from "./context-source.port.js";