@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
@@ -1,3 +1,5 @@
1
+ import { type DCodeProtocolTrace } from "./dcode-protocol/trace.js";
2
+ import { type ChannelContentPart } from "./channel-mention.js";
1
3
  import { z } from "zod";
2
4
  import { type ModelSelection } from "./model-selection.js";
3
5
  import type { DCodeConfigOption, DCodeElicitationRequest, DCodeElicitationQuestion, DCodePermissionRequest, DCodePromptAttachment, DCodeProvider, DCodeStreamEvent, DCodeTaskMeta, DCodeTaskRuntimeStatus } from "./dcode-task-types-core.js";
@@ -22,6 +24,8 @@ export declare const dcodeAutomationBotDeliveryTargetSchema: z.ZodObject<{
22
24
  private: "private";
23
25
  group: "group";
24
26
  }>;
27
+ threadId: z.ZodOptional<z.ZodString>;
28
+ rootMessageId: z.ZodOptional<z.ZodString>;
25
29
  }, z.core.$strict>;
26
30
  export type DCodeAutomationBotDeliveryTarget = z.infer<typeof dcodeAutomationBotDeliveryTargetSchema>;
27
31
  export declare function isFeishuBotProvider(provider: BotProvider): provider is FeishuBotProvider;
@@ -123,6 +127,7 @@ export interface BotsConfigFile {
123
127
  }
124
128
  export interface BotState {
125
129
  botId: string;
130
+ group?: BotGroupSession;
126
131
  workspacePath: string;
127
132
  workspaceIdentity?: string;
128
133
  workspaceId?: string;
@@ -134,9 +139,393 @@ export interface BotState {
134
139
  telegramOffset?: number;
135
140
  weixinGetUpdatesBuf?: string;
136
141
  weixinActivatedAt?: number;
142
+ /** 单聊绑定代际,阻止换绑后迟到事件恢复旧关联。 */
143
+ privateBindingId?: string;
144
+ /** iLink 登录返回机器人身份,单聊接收人来自已授权入站消息。 */
145
+ privateRecipientId?: string;
137
146
  updatedAt: number;
138
147
  }
139
148
  export type BotContextState = BotState;
149
+ export declare const botGroupDeliverySchema: z.ZodObject<{
150
+ channelReplyRequestHash: z.ZodOptional<z.ZodString>;
151
+ appId: z.ZodOptional<z.ZodString>;
152
+ trace: z.ZodOptional<z.ZodObject<{
153
+ traceId: z.ZodOptional<z.ZodString>;
154
+ parentId: z.ZodOptional<z.ZodString>;
155
+ spanId: z.ZodOptional<z.ZodString>;
156
+ traceparent: z.ZodOptional<z.ZodString>;
157
+ }, z.core.$strict>>;
158
+ authorizationId: z.ZodOptional<z.ZodString>;
159
+ id: z.ZodString;
160
+ taskId: z.ZodString;
161
+ sourceCommandId: z.ZodOptional<z.ZodString>;
162
+ text: z.ZodString;
163
+ replyToMessageId: z.ZodOptional<z.ZodString>;
164
+ mentionedUserIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
165
+ contentParts: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
166
+ type: z.ZodLiteral<"text">;
167
+ text: z.ZodString;
168
+ }, z.core.$strict>, z.ZodObject<{
169
+ type: z.ZodLiteral<"channelMention">;
170
+ refId: z.ZodString;
171
+ name: z.ZodString;
172
+ channel: z.ZodEnum<{
173
+ feishu: "feishu";
174
+ lark: "lark";
175
+ }>;
176
+ targetId: z.ZodString;
177
+ idType: z.ZodLiteral<"open_id">;
178
+ entityType: z.ZodEnum<{
179
+ unknown: "unknown";
180
+ user: "user";
181
+ bot: "bot";
182
+ }>;
183
+ }, z.core.$strict>]>>>;
184
+ providerMessageId: z.ZodOptional<z.ZodString>;
185
+ threadId: z.ZodOptional<z.ZodString>;
186
+ rootMessageId: z.ZodOptional<z.ZodString>;
187
+ status: z.ZodEnum<{
188
+ unknown: "unknown";
189
+ failed: "failed";
190
+ pending: "pending";
191
+ sent: "sent";
192
+ invalidated: "invalidated";
193
+ }>;
194
+ lastError: z.ZodOptional<z.ZodString>;
195
+ updatedAt: z.ZodNumber;
196
+ }, z.core.$strict>;
197
+ export type BotGroupDelivery = z.infer<typeof botGroupDeliverySchema>;
198
+ export declare const botGroupCardSchema: z.ZodObject<{
199
+ chatId: z.ZodString;
200
+ threadId: z.ZodOptional<z.ZodString>;
201
+ conversationThreadId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
202
+ taskId: z.ZodNullable<z.ZodString>;
203
+ authorizationId: z.ZodString;
204
+ }, z.core.$strict>;
205
+ export type BotGroupCard = z.infer<typeof botGroupCardSchema>;
206
+ export declare const botTopicMessageSchema: z.ZodObject<{
207
+ id: z.ZodString;
208
+ chatId: z.ZodString;
209
+ threadId: z.ZodString;
210
+ senderId: z.ZodString;
211
+ senderName: z.ZodOptional<z.ZodString>;
212
+ parentId: z.ZodOptional<z.ZodString>;
213
+ attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
214
+ name: z.ZodString;
215
+ kind: z.ZodString;
216
+ }, z.core.$strict>>>;
217
+ senderType: z.ZodEnum<{
218
+ user: "user";
219
+ app: "app";
220
+ }>;
221
+ text: z.ZodString;
222
+ createdAt: z.ZodNumber;
223
+ kind: z.ZodString;
224
+ controlCard: z.ZodOptional<z.ZodBoolean>;
225
+ deleted: z.ZodOptional<z.ZodBoolean>;
226
+ }, z.core.$strict>;
227
+ export type BotTopicMessage = z.infer<typeof botTopicMessageSchema>;
228
+ export interface BotTopicHistoryRequest {
229
+ chatId: string;
230
+ threadId: string;
231
+ rootMessageId: string;
232
+ messageId: string;
233
+ checkpoint?: string;
234
+ }
235
+ export declare const botTopicContextSchema: z.ZodObject<{
236
+ messages: z.ZodArray<z.ZodObject<{
237
+ id: z.ZodString;
238
+ chatId: z.ZodString;
239
+ threadId: z.ZodString;
240
+ senderId: z.ZodString;
241
+ senderName: z.ZodOptional<z.ZodString>;
242
+ parentId: z.ZodOptional<z.ZodString>;
243
+ attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
244
+ name: z.ZodString;
245
+ kind: z.ZodString;
246
+ }, z.core.$strict>>>;
247
+ senderType: z.ZodEnum<{
248
+ user: "user";
249
+ app: "app";
250
+ }>;
251
+ text: z.ZodString;
252
+ createdAt: z.ZodNumber;
253
+ kind: z.ZodString;
254
+ controlCard: z.ZodOptional<z.ZodBoolean>;
255
+ deleted: z.ZodOptional<z.ZodBoolean>;
256
+ }, z.core.$strict>>;
257
+ checkpoint: z.ZodString;
258
+ hasGap: z.ZodBoolean;
259
+ }, z.core.$strict>;
260
+ export type BotTopicHistoryBatch = z.infer<typeof botTopicContextSchema>;
261
+ export declare const botIdentitySchema: z.ZodObject<{
262
+ name: z.ZodString;
263
+ openId: z.ZodOptional<z.ZodString>;
264
+ }, z.core.$strict>;
265
+ export declare const botBackgroundHistorySchema: z.ZodObject<{
266
+ revision: z.ZodString;
267
+ checkpoint: z.ZodOptional<z.ZodString>;
268
+ }, z.core.$strict>;
269
+ export declare const botAutoReplyGuardSchema: z.ZodObject<{
270
+ consecutive: z.ZodNumber;
271
+ messageIds: z.ZodArray<z.ZodString>;
272
+ }, z.core.$strict>;
273
+ export interface BotGroupSession {
274
+ preparation?: BotTopicPreparation[];
275
+ chatId: string;
276
+ chatMode?: "group" | "topic";
277
+ threadId?: string;
278
+ rootMessageId?: string;
279
+ topicTitle?: string;
280
+ topicUrl?: string;
281
+ /** 仅群默认记录拥有此配置;话题按群授权检查读取。 */
282
+ historyEnabled?: boolean;
283
+ /** 仅成功接收首次输入后接入;leave 后保留任务但停止普通消息触发。 */
284
+ topicActive?: boolean;
285
+ topicAliases?: Record<string, {
286
+ taskId: string;
287
+ rootMessageId: string;
288
+ }>;
289
+ name: string;
290
+ ownerId: string;
291
+ enabled: boolean;
292
+ taskIds: string[];
293
+ taskWorkspaces?: Record<string, {
294
+ workspacePath: string;
295
+ workspaceIdentity?: string;
296
+ }>;
297
+ currentOptions: BotCurrentOptions;
298
+ initiatorId?: string;
299
+ authorizationId?: string;
300
+ deliveries?: Record<string, BotGroupDelivery>;
301
+ autoReplyGuard?: z.infer<typeof botAutoReplyGuardSchema>;
302
+ backgroundHistory?: z.infer<typeof botBackgroundHistorySchema>;
303
+ inputs?: Record<string, {
304
+ taskId: string;
305
+ source: BotGroupInputSource;
306
+ admission?: "pending" | "accepted" | "rejected";
307
+ progress?: BotGroupInputProgress;
308
+ }>;
309
+ }
310
+ export declare const botGroupInputStatusSchema: z.ZodEnum<{
311
+ cancelled: "cancelled";
312
+ failed: "failed";
313
+ discarded: "discarded";
314
+ waiting: "waiting";
315
+ done: "done";
316
+ stopped: "stopped";
317
+ working: "working";
318
+ }>;
319
+ export type BotGroupInputStatus = z.infer<typeof botGroupInputStatusSchema>;
320
+ export declare const botTopicPreparationSchema: z.ZodObject<{
321
+ contentParts: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
322
+ type: z.ZodLiteral<"text">;
323
+ text: z.ZodString;
324
+ }, z.core.$strict>, z.ZodObject<{
325
+ type: z.ZodLiteral<"channelMention">;
326
+ refId: z.ZodString;
327
+ name: z.ZodString;
328
+ channel: z.ZodEnum<{
329
+ feishu: "feishu";
330
+ lark: "lark";
331
+ }>;
332
+ targetId: z.ZodString;
333
+ idType: z.ZodLiteral<"open_id">;
334
+ entityType: z.ZodEnum<{
335
+ unknown: "unknown";
336
+ user: "user";
337
+ bot: "bot";
338
+ }>;
339
+ }, z.core.$strict>]>>>;
340
+ messageId: z.ZodString;
341
+ senderName: z.ZodString;
342
+ text: z.ZodString;
343
+ status: z.ZodEnum<{
344
+ failed: "failed";
345
+ preparing: "preparing";
346
+ waitingStop: "waitingStop";
347
+ }>;
348
+ error: z.ZodOptional<z.ZodString>;
349
+ }, z.core.$strict>;
350
+ export type BotTopicPreparation = z.infer<typeof botTopicPreparationSchema>;
351
+ export declare const botGroupInputProgressSchema: z.ZodObject<{
352
+ status: z.ZodEnum<{
353
+ cancelled: "cancelled";
354
+ failed: "failed";
355
+ discarded: "discarded";
356
+ waiting: "waiting";
357
+ done: "done";
358
+ stopped: "stopped";
359
+ working: "working";
360
+ }>;
361
+ interruptionReason: z.ZodOptional<z.ZodLiteral<"newMessage">>;
362
+ cardMessageId: z.ZodOptional<z.ZodString>;
363
+ cardStatus: z.ZodOptional<z.ZodEnum<{
364
+ cancelled: "cancelled";
365
+ failed: "failed";
366
+ discarded: "discarded";
367
+ waiting: "waiting";
368
+ done: "done";
369
+ stopped: "stopped";
370
+ working: "working";
371
+ }>>;
372
+ }, z.core.$strict>;
373
+ export type BotGroupInputProgress = z.infer<typeof botGroupInputProgressSchema>;
374
+ /** CLI 只接收轻量材料索引;原文留在 Host 归档及文本附件。 */
375
+ export declare const botTopicHistorySourceSchema: z.ZodObject<{
376
+ checkpoint: z.ZodString;
377
+ hasGap: z.ZodBoolean;
378
+ messageCount: z.ZodNumber;
379
+ resourceMessages: z.ZodArray<z.ZodObject<{
380
+ messageId: z.ZodString;
381
+ count: z.ZodNumber;
382
+ }, z.core.$strict>>;
383
+ }, z.core.$strict>;
384
+ export declare const botTopicInputMessageSchema: z.ZodObject<{
385
+ contentParts: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
386
+ type: z.ZodLiteral<"text">;
387
+ text: z.ZodString;
388
+ }, z.core.$strict>, z.ZodObject<{
389
+ type: z.ZodLiteral<"channelMention">;
390
+ refId: z.ZodString;
391
+ name: z.ZodString;
392
+ channel: z.ZodEnum<{
393
+ feishu: "feishu";
394
+ lark: "lark";
395
+ }>;
396
+ targetId: z.ZodString;
397
+ idType: z.ZodLiteral<"open_id">;
398
+ entityType: z.ZodEnum<{
399
+ unknown: "unknown";
400
+ user: "user";
401
+ bot: "bot";
402
+ }>;
403
+ }, z.core.$strict>]>>>;
404
+ messageId: z.ZodString;
405
+ senderId: z.ZodString;
406
+ senderName: z.ZodString;
407
+ mentionedBot: z.ZodOptional<z.ZodBoolean>;
408
+ text: z.ZodString;
409
+ conversationQuotes: z.ZodOptional<z.ZodArray<z.ZodObject<{
410
+ text: z.ZodString;
411
+ path: z.ZodOptional<z.ZodString>;
412
+ senderName: z.ZodOptional<z.ZodString>;
413
+ senderId: z.ZodOptional<z.ZodString>;
414
+ messageId: z.ZodOptional<z.ZodString>;
415
+ sentAt: z.ZodOptional<z.ZodString>;
416
+ }, z.core.$strip>>>;
417
+ attachmentIndexes: z.ZodArray<z.ZodNumber>;
418
+ }, z.core.$strict>;
419
+ /** 可信 Host 注入的输入来源;身份展示不能反向授予执行权限。 */
420
+ export declare const botGroupInputSourceSchema: z.ZodObject<{
421
+ botIdentity: z.ZodOptional<z.ZodObject<{
422
+ name: z.ZodString;
423
+ openId: z.ZodOptional<z.ZodString>;
424
+ }, z.core.$strict>>;
425
+ appId: z.ZodOptional<z.ZodString>;
426
+ contentParts: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
427
+ type: z.ZodLiteral<"text">;
428
+ text: z.ZodString;
429
+ }, z.core.$strict>, z.ZodObject<{
430
+ type: z.ZodLiteral<"channelMention">;
431
+ refId: z.ZodString;
432
+ name: z.ZodString;
433
+ channel: z.ZodEnum<{
434
+ feishu: "feishu";
435
+ lark: "lark";
436
+ }>;
437
+ targetId: z.ZodString;
438
+ idType: z.ZodLiteral<"open_id">;
439
+ entityType: z.ZodEnum<{
440
+ unknown: "unknown";
441
+ user: "user";
442
+ bot: "bot";
443
+ }>;
444
+ }, z.core.$strict>]>>>;
445
+ authorizationId: z.ZodOptional<z.ZodString>;
446
+ botId: z.ZodString;
447
+ provider: z.ZodEnum<{
448
+ feishu: "feishu";
449
+ lark: "lark";
450
+ }>;
451
+ chatId: z.ZodString;
452
+ threadId: z.ZodOptional<z.ZodString>;
453
+ rootMessageId: z.ZodOptional<z.ZodString>;
454
+ senderId: z.ZodString;
455
+ senderName: z.ZodString;
456
+ mentionedBot: z.ZodOptional<z.ZodBoolean>;
457
+ messageId: z.ZodString;
458
+ messages: z.ZodOptional<z.ZodArray<z.ZodObject<{
459
+ contentParts: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
460
+ type: z.ZodLiteral<"text">;
461
+ text: z.ZodString;
462
+ }, z.core.$strict>, z.ZodObject<{
463
+ type: z.ZodLiteral<"channelMention">;
464
+ refId: z.ZodString;
465
+ name: z.ZodString;
466
+ channel: z.ZodEnum<{
467
+ feishu: "feishu";
468
+ lark: "lark";
469
+ }>;
470
+ targetId: z.ZodString;
471
+ idType: z.ZodLiteral<"open_id">;
472
+ entityType: z.ZodEnum<{
473
+ unknown: "unknown";
474
+ user: "user";
475
+ bot: "bot";
476
+ }>;
477
+ }, z.core.$strict>]>>>;
478
+ messageId: z.ZodString;
479
+ senderId: z.ZodString;
480
+ senderName: z.ZodString;
481
+ mentionedBot: z.ZodOptional<z.ZodBoolean>;
482
+ text: z.ZodString;
483
+ conversationQuotes: z.ZodOptional<z.ZodArray<z.ZodObject<{
484
+ text: z.ZodString;
485
+ path: z.ZodOptional<z.ZodString>;
486
+ senderName: z.ZodOptional<z.ZodString>;
487
+ senderId: z.ZodOptional<z.ZodString>;
488
+ messageId: z.ZodOptional<z.ZodString>;
489
+ sentAt: z.ZodOptional<z.ZodString>;
490
+ }, z.core.$strip>>>;
491
+ attachmentIndexes: z.ZodArray<z.ZodNumber>;
492
+ }, z.core.$strict>>>;
493
+ topicContext: z.ZodOptional<z.ZodObject<{
494
+ messages: z.ZodArray<z.ZodObject<{
495
+ id: z.ZodString;
496
+ chatId: z.ZodString;
497
+ threadId: z.ZodString;
498
+ senderId: z.ZodString;
499
+ senderName: z.ZodOptional<z.ZodString>;
500
+ parentId: z.ZodOptional<z.ZodString>;
501
+ attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
502
+ name: z.ZodString;
503
+ kind: z.ZodString;
504
+ }, z.core.$strict>>>;
505
+ senderType: z.ZodEnum<{
506
+ user: "user";
507
+ app: "app";
508
+ }>;
509
+ text: z.ZodString;
510
+ createdAt: z.ZodNumber;
511
+ kind: z.ZodString;
512
+ controlCard: z.ZodOptional<z.ZodBoolean>;
513
+ deleted: z.ZodOptional<z.ZodBoolean>;
514
+ }, z.core.$strict>>;
515
+ checkpoint: z.ZodString;
516
+ hasGap: z.ZodBoolean;
517
+ }, z.core.$strict>>;
518
+ topicHistory: z.ZodOptional<z.ZodObject<{
519
+ checkpoint: z.ZodString;
520
+ hasGap: z.ZodBoolean;
521
+ messageCount: z.ZodNumber;
522
+ resourceMessages: z.ZodArray<z.ZodObject<{
523
+ messageId: z.ZodString;
524
+ count: z.ZodNumber;
525
+ }, z.core.$strict>>;
526
+ }, z.core.$strict>>;
527
+ }, z.core.$strict>;
528
+ export type BotGroupInputSource = z.infer<typeof botGroupInputSourceSchema>;
140
529
  export interface BotsStateFile {
141
530
  version: 3;
142
531
  bots: Record<string, BotState>;
@@ -144,6 +533,8 @@ export interface BotsStateFile {
144
533
  export interface BotRuntimeInfo {
145
534
  /** 最近一次消息投递错误;独立于长连接状态,成功投递后清除。 */
146
535
  deliveryError?: string;
536
+ /** 当前进程保留的失败单聊回复;显式重试可能重复此前已收到的内容。 */
537
+ deliveryRetryId?: string;
147
538
  botId: string;
148
539
  provider: BotProvider;
149
540
  status: "disabled" | "idle" | "polling" | "connected" | "error";
@@ -153,12 +544,20 @@ export interface BotRuntimeInfo {
153
544
  offset?: number;
154
545
  }
155
546
  export interface BotActor {
547
+ /** 本次可信输入是否明确提及机器人;用于话题回复提醒。 */
548
+ mentionedBot?: boolean;
156
549
  provider: BotProvider;
157
550
  botId: string;
158
551
  providerUserId: string;
159
552
  displayName?: string;
160
553
  chatType: "private" | "group";
161
554
  chatId?: string;
555
+ threadId?: string;
556
+ /** 仅服务根据已保存的结果关联设置;null 表示原群默认任务。 */
557
+ conversationThreadId?: string | null;
558
+ rootMessageId?: string;
559
+ topicTitle?: string;
560
+ topicUrl?: string;
162
561
  providerMessageId?: string;
163
562
  providerContextToken?: string;
164
563
  }
@@ -176,6 +575,16 @@ export interface BotInboundAttachment {
176
575
  providerMetadata?: Record<string, string>;
177
576
  }
178
577
  export type BotCommand = {
578
+ type: "group.history";
579
+ enabled?: boolean;
580
+ } | {
581
+ type: "queue.cancel";
582
+ commandId: string;
583
+ } | {
584
+ type: "group.enable";
585
+ } | {
586
+ type: "group.disable";
587
+ } | {
179
588
  type: "bind";
180
589
  code: string;
181
590
  } | {
@@ -221,6 +630,8 @@ export type BotCommand = {
221
630
  value: string;
222
631
  } | {
223
632
  type: "stop";
633
+ } | {
634
+ type: "topic.leave";
224
635
  } | {
225
636
  type: "permission.respond";
226
637
  value: string;
@@ -253,7 +664,7 @@ export interface SelectionPrompt {
253
664
  currentId?: string;
254
665
  cancelLabel?: string;
255
666
  showCancel?: boolean;
256
- action: "workspace.set" | "model.provider.set" | "model.set" | "mode.set" | "thoughtLevel.set" | "task.set" | "reply.set" | "permission.respond" | "elicitation.respond";
667
+ action: "queue.cancel" | "workspace.set" | "model.provider.set" | "model.set" | "mode.set" | "thoughtLevel.set" | "task.set" | "reply.set" | "permission.respond" | "elicitation.respond";
257
668
  options: Array<{
258
669
  id: string;
259
670
  label: string;
@@ -261,6 +672,23 @@ export interface SelectionPrompt {
261
672
  }>;
262
673
  }
263
674
  export interface BotInboundMessage {
675
+ /** 仅供命令/纯唤醒识别;原文 text 和 contentParts 保持完整。 */
676
+ commandText?: string;
677
+ /** Provider 核验的当前机器人身份,不从正文推断。 */
678
+ botOpenId?: string;
679
+ /** Provider 校验的发送者类型;机器人正文不具有控制命令权限。 */
680
+ senderType?: "user" | "app";
681
+ contentParts?: ChannelContentPart[];
682
+ /** 由 Provider 根据真实 mention 身份设置;不是正文解析结果。 */
683
+ mentionedBot?: boolean;
684
+ /** 原生根消息经 Provider 核验确为当前机器人发送。 */
685
+ topicRootIsCurrentBot?: boolean;
686
+ /** 可信 Provider 校验后的明确引用,不参与控制命令解析。 */
687
+ referencedMessage?: import("./conversationSelection.js").ConversationSelectionText & {
688
+ messageId: string;
689
+ };
690
+ groupCard?: BotGroupCard;
691
+ groupCardAction?: boolean;
264
692
  botId: string;
265
693
  actor: BotActor;
266
694
  text: string;
@@ -269,6 +697,12 @@ export interface BotInboundMessage {
269
697
  receivedAt?: number;
270
698
  }
271
699
  export interface BotOutboundMessage {
700
+ trace?: DCodeProtocolTrace;
701
+ contentParts?: ChannelContentPart[];
702
+ groupCard?: BotGroupCard;
703
+ threadId?: string;
704
+ conversationThreadId?: string | null;
705
+ rootMessageId?: string;
272
706
  botId: string;
273
707
  provider: BotProvider;
274
708
  providerUserId: string;
@@ -277,6 +711,18 @@ export interface BotOutboundMessage {
277
711
  selection?: SelectionPrompt;
278
712
  elicitation?: BotOutboundElicitationRequest;
279
713
  providerContextToken?: string;
714
+ /** 无权限/过期回调只能提示操作者,不能覆盖群共享卡片。 */
715
+ callbackToastOnly?: boolean;
716
+ /** 管理员待办独立通知,不允许用拒绝提示覆盖共享卡片。 */
717
+ administratorAttention?: boolean;
718
+ replyToMessageId?: string;
719
+ /** 可信输入决定的提醒对象;只作展示,不授予群操作权限。 */
720
+ mentionedUserIds?: string[];
721
+ deliveryId?: string;
722
+ /** 任务回推需在实际发送前重新验证群当前关联。控制命令回复不携带。 */
723
+ groupTaskId?: string;
724
+ /** 可信任务事件中的输入命令,用于将投递状态定位到对应回复。 */
725
+ groupSourceCommandId?: string;
280
726
  }
281
727
  export interface BotTaskSummary {
282
728
  taskId: string;
@@ -364,10 +810,22 @@ export declare const botCurrentOptionsSchema: z.ZodObject<{
364
810
  mode: z.ZodOptional<z.ZodString>;
365
811
  sandboxMode: z.ZodOptional<z.ZodString>;
366
812
  approvalPolicy: z.ZodOptional<z.ZodString>;
367
- cli: z.ZodOptional<z.ZodLiteral<"glm">>;
813
+ cli: z.ZodOptional<z.ZodPipe<z.ZodEnum<{
814
+ glm: "glm";
815
+ claude: "claude";
816
+ opencode: "opencode";
817
+ gemini: "gemini";
818
+ codex: "codex";
819
+ }>, z.ZodTransform<"glm", "glm" | "claude" | "opencode" | "gemini" | "codex">>>;
368
820
  }, z.core.$strict>;
369
821
  export declare const botDraftOptionsSchema: z.ZodObject<{
370
- provider: z.ZodLiteral<"glm">;
822
+ provider: z.ZodPipe<z.ZodEnum<{
823
+ glm: "glm";
824
+ claude: "claude";
825
+ opencode: "opencode";
826
+ gemini: "gemini";
827
+ codex: "codex";
828
+ }>, z.ZodTransform<"glm", "glm" | "claude" | "opencode" | "gemini" | "codex">>;
371
829
  modelSelection: z.ZodOptional<z.ZodObject<{
372
830
  providerId: z.ZodString;
373
831
  modelId: z.ZodString;
@@ -421,7 +879,13 @@ export declare const botConfigSchema: z.ZodObject<{
421
879
  mode: z.ZodOptional<z.ZodString>;
422
880
  sandboxMode: z.ZodOptional<z.ZodString>;
423
881
  approvalPolicy: z.ZodOptional<z.ZodString>;
424
- cli: z.ZodOptional<z.ZodLiteral<"glm">>;
882
+ cli: z.ZodOptional<z.ZodPipe<z.ZodEnum<{
883
+ glm: "glm";
884
+ claude: "claude";
885
+ opencode: "opencode";
886
+ gemini: "gemini";
887
+ codex: "codex";
888
+ }>, z.ZodTransform<"glm", "glm" | "claude" | "opencode" | "gemini" | "codex">>>;
425
889
  }, z.core.$strict>;
426
890
  replyMode: z.ZodEnum<{
427
891
  assistant_changes: "assistant_changes";
@@ -476,7 +940,13 @@ export declare const botsConfigFileSchema: z.ZodObject<{
476
940
  mode: z.ZodOptional<z.ZodString>;
477
941
  sandboxMode: z.ZodOptional<z.ZodString>;
478
942
  approvalPolicy: z.ZodOptional<z.ZodString>;
479
- cli: z.ZodOptional<z.ZodLiteral<"glm">>;
943
+ cli: z.ZodOptional<z.ZodPipe<z.ZodEnum<{
944
+ glm: "glm";
945
+ claude: "claude";
946
+ opencode: "opencode";
947
+ gemini: "gemini";
948
+ codex: "codex";
949
+ }>, z.ZodTransform<"glm", "glm" | "claude" | "opencode" | "gemini" | "codex">>>;
480
950
  }, z.core.$strict>;
481
951
  replyMode: z.ZodEnum<{
482
952
  assistant_changes: "assistant_changes";
@@ -490,16 +960,292 @@ export declare const botsStateFileSchema: z.ZodObject<{
490
960
  version: z.ZodLiteral<3>;
491
961
  bots: z.ZodRecord<z.ZodString, z.ZodObject<{
492
962
  botId: z.ZodString;
963
+ group: z.ZodOptional<z.ZodObject<{
964
+ chatId: z.ZodString;
965
+ chatMode: z.ZodOptional<z.ZodEnum<{
966
+ group: "group";
967
+ topic: "topic";
968
+ }>>;
969
+ threadId: z.ZodOptional<z.ZodString>;
970
+ rootMessageId: z.ZodOptional<z.ZodString>;
971
+ topicTitle: z.ZodOptional<z.ZodString>;
972
+ topicUrl: z.ZodOptional<z.ZodString>;
973
+ historyEnabled: z.ZodOptional<z.ZodBoolean>;
974
+ topicActive: z.ZodOptional<z.ZodBoolean>;
975
+ preparation: z.ZodOptional<z.ZodArray<z.ZodObject<{
976
+ contentParts: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
977
+ type: z.ZodLiteral<"text">;
978
+ text: z.ZodString;
979
+ }, z.core.$strict>, z.ZodObject<{
980
+ type: z.ZodLiteral<"channelMention">;
981
+ refId: z.ZodString;
982
+ name: z.ZodString;
983
+ channel: z.ZodEnum<{
984
+ feishu: "feishu";
985
+ lark: "lark";
986
+ }>;
987
+ targetId: z.ZodString;
988
+ idType: z.ZodLiteral<"open_id">;
989
+ entityType: z.ZodEnum<{
990
+ unknown: "unknown";
991
+ user: "user";
992
+ bot: "bot";
993
+ }>;
994
+ }, z.core.$strict>]>>>;
995
+ messageId: z.ZodString;
996
+ senderName: z.ZodString;
997
+ text: z.ZodString;
998
+ status: z.ZodEnum<{
999
+ failed: "failed";
1000
+ preparing: "preparing";
1001
+ waitingStop: "waitingStop";
1002
+ }>;
1003
+ error: z.ZodOptional<z.ZodString>;
1004
+ }, z.core.$strict>>>;
1005
+ topicAliases: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1006
+ taskId: z.ZodString;
1007
+ rootMessageId: z.ZodString;
1008
+ }, z.core.$strict>>>;
1009
+ name: z.ZodString;
1010
+ ownerId: z.ZodString;
1011
+ enabled: z.ZodBoolean;
1012
+ taskIds: z.ZodArray<z.ZodString>;
1013
+ taskWorkspaces: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1014
+ workspacePath: z.ZodString;
1015
+ workspaceIdentity: z.ZodOptional<z.ZodString>;
1016
+ }, z.core.$strict>>>;
1017
+ currentOptions: z.ZodObject<{
1018
+ modelSelection: z.ZodOptional<z.ZodObject<{
1019
+ providerId: z.ZodString;
1020
+ modelId: z.ZodString;
1021
+ options: z.ZodOptional<z.ZodObject<{
1022
+ reasoningLevel: z.ZodOptional<z.ZodString>;
1023
+ }, z.core.$strict>>;
1024
+ }, z.core.$strict>>;
1025
+ mode: z.ZodOptional<z.ZodString>;
1026
+ sandboxMode: z.ZodOptional<z.ZodString>;
1027
+ approvalPolicy: z.ZodOptional<z.ZodString>;
1028
+ cli: z.ZodOptional<z.ZodPipe<z.ZodEnum<{
1029
+ glm: "glm";
1030
+ claude: "claude";
1031
+ opencode: "opencode";
1032
+ gemini: "gemini";
1033
+ codex: "codex";
1034
+ }>, z.ZodTransform<"glm", "glm" | "claude" | "opencode" | "gemini" | "codex">>>;
1035
+ }, z.core.$strict>;
1036
+ initiatorId: z.ZodOptional<z.ZodString>;
1037
+ authorizationId: z.ZodOptional<z.ZodString>;
1038
+ deliveries: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1039
+ channelReplyRequestHash: z.ZodOptional<z.ZodString>;
1040
+ appId: z.ZodOptional<z.ZodString>;
1041
+ trace: z.ZodOptional<z.ZodObject<{
1042
+ traceId: z.ZodOptional<z.ZodString>;
1043
+ parentId: z.ZodOptional<z.ZodString>;
1044
+ spanId: z.ZodOptional<z.ZodString>;
1045
+ traceparent: z.ZodOptional<z.ZodString>;
1046
+ }, z.core.$strict>>;
1047
+ authorizationId: z.ZodOptional<z.ZodString>;
1048
+ id: z.ZodString;
1049
+ taskId: z.ZodString;
1050
+ sourceCommandId: z.ZodOptional<z.ZodString>;
1051
+ text: z.ZodString;
1052
+ replyToMessageId: z.ZodOptional<z.ZodString>;
1053
+ mentionedUserIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1054
+ contentParts: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1055
+ type: z.ZodLiteral<"text">;
1056
+ text: z.ZodString;
1057
+ }, z.core.$strict>, z.ZodObject<{
1058
+ type: z.ZodLiteral<"channelMention">;
1059
+ refId: z.ZodString;
1060
+ name: z.ZodString;
1061
+ channel: z.ZodEnum<{
1062
+ feishu: "feishu";
1063
+ lark: "lark";
1064
+ }>;
1065
+ targetId: z.ZodString;
1066
+ idType: z.ZodLiteral<"open_id">;
1067
+ entityType: z.ZodEnum<{
1068
+ unknown: "unknown";
1069
+ user: "user";
1070
+ bot: "bot";
1071
+ }>;
1072
+ }, z.core.$strict>]>>>;
1073
+ providerMessageId: z.ZodOptional<z.ZodString>;
1074
+ threadId: z.ZodOptional<z.ZodString>;
1075
+ rootMessageId: z.ZodOptional<z.ZodString>;
1076
+ status: z.ZodEnum<{
1077
+ unknown: "unknown";
1078
+ failed: "failed";
1079
+ pending: "pending";
1080
+ sent: "sent";
1081
+ invalidated: "invalidated";
1082
+ }>;
1083
+ lastError: z.ZodOptional<z.ZodString>;
1084
+ updatedAt: z.ZodNumber;
1085
+ }, z.core.$strict>>>;
1086
+ autoReplyGuard: z.ZodOptional<z.ZodObject<{
1087
+ consecutive: z.ZodNumber;
1088
+ messageIds: z.ZodArray<z.ZodString>;
1089
+ }, z.core.$strict>>;
1090
+ backgroundHistory: z.ZodOptional<z.ZodObject<{
1091
+ revision: z.ZodString;
1092
+ checkpoint: z.ZodOptional<z.ZodString>;
1093
+ }, z.core.$strict>>;
1094
+ inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1095
+ taskId: z.ZodString;
1096
+ source: z.ZodObject<{
1097
+ botIdentity: z.ZodOptional<z.ZodObject<{
1098
+ name: z.ZodString;
1099
+ openId: z.ZodOptional<z.ZodString>;
1100
+ }, z.core.$strict>>;
1101
+ appId: z.ZodOptional<z.ZodString>;
1102
+ contentParts: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1103
+ type: z.ZodLiteral<"text">;
1104
+ text: z.ZodString;
1105
+ }, z.core.$strict>, z.ZodObject<{
1106
+ type: z.ZodLiteral<"channelMention">;
1107
+ refId: z.ZodString;
1108
+ name: z.ZodString;
1109
+ channel: z.ZodEnum<{
1110
+ feishu: "feishu";
1111
+ lark: "lark";
1112
+ }>;
1113
+ targetId: z.ZodString;
1114
+ idType: z.ZodLiteral<"open_id">;
1115
+ entityType: z.ZodEnum<{
1116
+ unknown: "unknown";
1117
+ user: "user";
1118
+ bot: "bot";
1119
+ }>;
1120
+ }, z.core.$strict>]>>>;
1121
+ authorizationId: z.ZodOptional<z.ZodString>;
1122
+ botId: z.ZodString;
1123
+ provider: z.ZodEnum<{
1124
+ feishu: "feishu";
1125
+ lark: "lark";
1126
+ }>;
1127
+ chatId: z.ZodString;
1128
+ threadId: z.ZodOptional<z.ZodString>;
1129
+ rootMessageId: z.ZodOptional<z.ZodString>;
1130
+ senderId: z.ZodString;
1131
+ senderName: z.ZodString;
1132
+ mentionedBot: z.ZodOptional<z.ZodBoolean>;
1133
+ messageId: z.ZodString;
1134
+ messages: z.ZodOptional<z.ZodArray<z.ZodObject<{
1135
+ contentParts: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1136
+ type: z.ZodLiteral<"text">;
1137
+ text: z.ZodString;
1138
+ }, z.core.$strict>, z.ZodObject<{
1139
+ type: z.ZodLiteral<"channelMention">;
1140
+ refId: z.ZodString;
1141
+ name: z.ZodString;
1142
+ channel: z.ZodEnum<{
1143
+ feishu: "feishu";
1144
+ lark: "lark";
1145
+ }>;
1146
+ targetId: z.ZodString;
1147
+ idType: z.ZodLiteral<"open_id">;
1148
+ entityType: z.ZodEnum<{
1149
+ unknown: "unknown";
1150
+ user: "user";
1151
+ bot: "bot";
1152
+ }>;
1153
+ }, z.core.$strict>]>>>;
1154
+ messageId: z.ZodString;
1155
+ senderId: z.ZodString;
1156
+ senderName: z.ZodString;
1157
+ mentionedBot: z.ZodOptional<z.ZodBoolean>;
1158
+ text: z.ZodString;
1159
+ conversationQuotes: z.ZodOptional<z.ZodArray<z.ZodObject<{
1160
+ text: z.ZodString;
1161
+ path: z.ZodOptional<z.ZodString>;
1162
+ senderName: z.ZodOptional<z.ZodString>;
1163
+ senderId: z.ZodOptional<z.ZodString>;
1164
+ messageId: z.ZodOptional<z.ZodString>;
1165
+ sentAt: z.ZodOptional<z.ZodString>;
1166
+ }, z.core.$strip>>>;
1167
+ attachmentIndexes: z.ZodArray<z.ZodNumber>;
1168
+ }, z.core.$strict>>>;
1169
+ topicContext: z.ZodOptional<z.ZodObject<{
1170
+ messages: z.ZodArray<z.ZodObject<{
1171
+ id: z.ZodString;
1172
+ chatId: z.ZodString;
1173
+ threadId: z.ZodString;
1174
+ senderId: z.ZodString;
1175
+ senderName: z.ZodOptional<z.ZodString>;
1176
+ parentId: z.ZodOptional<z.ZodString>;
1177
+ attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
1178
+ name: z.ZodString;
1179
+ kind: z.ZodString;
1180
+ }, z.core.$strict>>>;
1181
+ senderType: z.ZodEnum<{
1182
+ user: "user";
1183
+ app: "app";
1184
+ }>;
1185
+ text: z.ZodString;
1186
+ createdAt: z.ZodNumber;
1187
+ kind: z.ZodString;
1188
+ controlCard: z.ZodOptional<z.ZodBoolean>;
1189
+ deleted: z.ZodOptional<z.ZodBoolean>;
1190
+ }, z.core.$strict>>;
1191
+ checkpoint: z.ZodString;
1192
+ hasGap: z.ZodBoolean;
1193
+ }, z.core.$strict>>;
1194
+ topicHistory: z.ZodOptional<z.ZodObject<{
1195
+ checkpoint: z.ZodString;
1196
+ hasGap: z.ZodBoolean;
1197
+ messageCount: z.ZodNumber;
1198
+ resourceMessages: z.ZodArray<z.ZodObject<{
1199
+ messageId: z.ZodString;
1200
+ count: z.ZodNumber;
1201
+ }, z.core.$strict>>;
1202
+ }, z.core.$strict>>;
1203
+ }, z.core.$strict>;
1204
+ admission: z.ZodOptional<z.ZodEnum<{
1205
+ accepted: "accepted";
1206
+ pending: "pending";
1207
+ rejected: "rejected";
1208
+ }>>;
1209
+ progress: z.ZodOptional<z.ZodObject<{
1210
+ status: z.ZodEnum<{
1211
+ cancelled: "cancelled";
1212
+ failed: "failed";
1213
+ discarded: "discarded";
1214
+ waiting: "waiting";
1215
+ done: "done";
1216
+ stopped: "stopped";
1217
+ working: "working";
1218
+ }>;
1219
+ interruptionReason: z.ZodOptional<z.ZodLiteral<"newMessage">>;
1220
+ cardMessageId: z.ZodOptional<z.ZodString>;
1221
+ cardStatus: z.ZodOptional<z.ZodEnum<{
1222
+ cancelled: "cancelled";
1223
+ failed: "failed";
1224
+ discarded: "discarded";
1225
+ waiting: "waiting";
1226
+ done: "done";
1227
+ stopped: "stopped";
1228
+ working: "working";
1229
+ }>>;
1230
+ }, z.core.$strict>>;
1231
+ }, z.core.$strict>>>;
1232
+ }, z.core.$strict>>;
493
1233
  workspacePath: z.ZodString;
494
1234
  workspaceIdentity: z.ZodOptional<z.ZodString>;
495
1235
  workspaceId: z.ZodOptional<z.ZodString>;
496
1236
  mode: z.ZodEnum<{
497
- draft: "draft";
498
1237
  task: "task";
1238
+ draft: "draft";
499
1239
  }>;
500
1240
  activeTaskId: z.ZodNullable<z.ZodString>;
501
1241
  draftOptions: z.ZodOptional<z.ZodObject<{
502
- provider: z.ZodLiteral<"glm">;
1242
+ provider: z.ZodPipe<z.ZodEnum<{
1243
+ glm: "glm";
1244
+ claude: "claude";
1245
+ opencode: "opencode";
1246
+ gemini: "gemini";
1247
+ codex: "codex";
1248
+ }>, z.ZodTransform<"glm", "glm" | "claude" | "opencode" | "gemini" | "codex">>;
503
1249
  modelSelection: z.ZodOptional<z.ZodObject<{
504
1250
  providerId: z.ZodString;
505
1251
  modelId: z.ZodString;
@@ -513,14 +1259,14 @@ export declare const botsStateFileSchema: z.ZodObject<{
513
1259
  requestId: z.ZodString;
514
1260
  optionId: z.ZodString;
515
1261
  command: z.ZodEnum<{
516
- approve: "approve";
517
1262
  deny: "deny";
1263
+ approve: "approve";
518
1264
  }>;
519
1265
  label: z.ZodString;
520
1266
  response: z.ZodObject<{
521
1267
  decision: z.ZodEnum<{
522
- deny: "deny";
523
1268
  allow: "allow";
1269
+ deny: "deny";
524
1270
  escalate: "escalate";
525
1271
  modify: "modify";
526
1272
  }>;
@@ -529,9 +1275,9 @@ export declare const botsStateFileSchema: z.ZodObject<{
529
1275
  permissionUpdates: z.ZodOptional<z.ZodArray<z.ZodObject<{
530
1276
  type: z.ZodLiteral<"addRules">;
531
1277
  behavior: z.ZodEnum<{
532
- deny: "deny";
533
- allow: "allow";
534
1278
  ask: "ask";
1279
+ allow: "allow";
1280
+ deny: "deny";
535
1281
  }>;
536
1282
  rules: z.ZodArray<z.ZodObject<{
537
1283
  toolName: z.ZodString;
@@ -579,6 +1325,8 @@ export declare const botsStateFileSchema: z.ZodObject<{
579
1325
  telegramOffset: z.ZodOptional<z.ZodNumber>;
580
1326
  weixinGetUpdatesBuf: z.ZodOptional<z.ZodString>;
581
1327
  weixinActivatedAt: z.ZodOptional<z.ZodNumber>;
1328
+ privateBindingId: z.ZodOptional<z.ZodString>;
1329
+ privateRecipientId: z.ZodOptional<z.ZodString>;
582
1330
  updatedAt: z.ZodNumber;
583
1331
  }, z.core.$strip>>;
584
1332
  }, z.core.$strict>;