@dipoleml/dcode-cli 1.1.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/THIRD-PARTY-NOTICES.md +1081 -12
- package/dist/dcode.cjs +59368 -45608
- package/dist/packages/browser-use-plugin/README.md +12 -12
- package/dist/packages/browser-use-plugin/docs/api.json +1 -1
- package/dist/packages/browser-use-plugin/docs/overview.md +5 -4
- package/dist/packages/browser-use-plugin/docs/workflow.md +1 -1
- package/dist/packages/browser-use-plugin/scripts/build.mjs +1 -0
- package/dist/packages/browser-use-plugin/skills/control-browser/SKILL.md +10 -7
- package/dist/packages/bundled-skills/skills/dynamic-workflows/SKILL.md +760 -687
- package/dist/packages/bundled-skills/skills/dynamic-workflows/examples.md +310 -1
- package/dist/packages/bundled-skills/skills/dynamic-workflows/patterns.md +336 -4
- package/dist/packages/node-repl-host/.dcode-plugin/plugin.json +1 -1
- package/dist/packages/node-repl-host/dist/mcp/server.js +9 -14
- package/dist/packages/node-repl-host/scripts/build.mjs +1 -0
- package/dist/provider/dcode-builtin.json +6612 -202
- package/node_modules/@dcode/contracts/dist/compact/index.d.ts +7 -7
- package/node_modules/@dcode/contracts/dist/config/index.d.ts +1 -1
- package/node_modules/@dcode/contracts/dist/events/event-reducer.js +1 -0
- package/node_modules/@dcode/contracts/dist/events/in-memory-session-event-store.js +3 -2
- package/node_modules/@dcode/contracts/dist/events/session-event-retention.d.ts +8 -0
- package/node_modules/@dcode/contracts/dist/events/session-event-retention.js +18 -0
- package/node_modules/@dcode/contracts/dist/events/session.events.d.ts +94 -16
- package/node_modules/@dcode/contracts/dist/events/session.events.js +10 -0
- package/node_modules/@dcode/contracts/dist/hooks/index.d.ts +134 -134
- package/node_modules/@dcode/contracts/dist/hooks/workspace-hook-trust.d.ts +14 -14
- package/node_modules/@dcode/contracts/dist/index.d.ts +2 -0
- package/node_modules/@dcode/contracts/dist/index.js +2 -0
- package/node_modules/@dcode/contracts/dist/interfaces/browser-control.port.d.ts +22 -0
- package/node_modules/@dcode/contracts/dist/interfaces/dynamic-workflow-run-hole.port.d.ts +92 -0
- package/node_modules/@dcode/contracts/dist/interfaces/dynamic-workflow-run-hole.port.js +9 -0
- package/node_modules/@dcode/contracts/dist/interfaces/dynamic-workflow-run-retune.port.d.ts +4 -4
- package/node_modules/@dcode/contracts/dist/interfaces/dynamic-workflow-run-retune.port.js +7 -3
- package/node_modules/@dcode/contracts/dist/interfaces/dynamic-workflow-run-workspace.port.js +8 -3
- package/node_modules/@dcode/contracts/dist/interfaces/dynamic-workflow-run.port.d.ts +119 -18
- package/node_modules/@dcode/contracts/dist/interfaces/dynamic-workflow-run.port.js +13 -0
- package/node_modules/@dcode/contracts/dist/interfaces/index.d.ts +1 -0
- package/node_modules/@dcode/contracts/dist/interfaces/index.js +1 -0
- package/node_modules/@dcode/contracts/dist/interfaces/mcp.port.d.ts +161 -1
- package/node_modules/@dcode/contracts/dist/interfaces/mcp.port.js +17 -0
- package/node_modules/@dcode/contracts/dist/interfaces/permission-full-access.d.ts +15 -15
- package/node_modules/@dcode/contracts/dist/interfaces/permission-full-access.js +1 -1
- package/node_modules/@dcode/contracts/dist/interfaces/permission.port.d.ts +15 -1
- package/node_modules/@dcode/contracts/dist/interfaces/provider-endpoint-routing.port.d.ts +19 -0
- package/node_modules/@dcode/contracts/dist/interfaces/provider-endpoint-routing.port.js +1 -0
- package/node_modules/@dcode/contracts/dist/interfaces/session-store.port.d.ts +4 -2
- package/node_modules/@dcode/contracts/dist/interfaces/session-store.port.js +5 -0
- package/node_modules/@dcode/contracts/dist/interfaces/session.port.d.ts +92 -3
- package/node_modules/@dcode/contracts/dist/interfaces/session.port.js +4 -1
- package/node_modules/@dcode/contracts/dist/interfaces/topic-resource.port.d.ts +25 -0
- package/node_modules/@dcode/contracts/dist/interfaces/topic-resource.port.js +1 -0
- package/node_modules/@dcode/contracts/dist/model/index.d.ts +15 -1
- package/node_modules/@dcode/contracts/dist/model/index.js +5 -0
- package/node_modules/@dcode/contracts/dist/model/invocation-context.d.ts +6 -1
- package/node_modules/@dcode/contracts/dist/plugins/index.d.ts +23 -0
- package/node_modules/@dcode/contracts/dist/plugins/index.js +2 -1
- package/node_modules/@dcode/contracts/dist/telemetry/agent-execution.d.ts +2 -0
- package/node_modules/@dcode/contracts/dist/telemetry/agent-execution.js +2 -0
- package/node_modules/@dcode/contracts/dist/telemetry/index.d.ts +5 -1
- package/node_modules/@dcode/contracts/dist/telemetry/index.js +12 -0
- package/node_modules/@dcode/contracts/dist/tools/agent.d.ts +12 -12
- package/node_modules/@dcode/contracts/dist/tools/amend-workflow.d.ts +39 -15
- package/node_modules/@dcode/contracts/dist/tools/amend-workflow.js +12 -6
- package/node_modules/@dcode/contracts/dist/tools/automation.d.ts +32 -32
- package/node_modules/@dcode/contracts/dist/tools/automation.js +1 -1
- package/node_modules/@dcode/contracts/dist/tools/bash.d.ts +16 -16
- package/node_modules/@dcode/contracts/dist/tools/bash.js +1 -1
- package/node_modules/@dcode/contracts/dist/tools/create-workflow.d.ts +365 -66
- package/node_modules/@dcode/contracts/dist/tools/create-workflow.js +92 -11
- package/node_modules/@dcode/contracts/dist/tools/edit.d.ts +16 -16
- package/node_modules/@dcode/contracts/dist/tools/eval-workflow-snippet.d.ts +6 -6
- package/node_modules/@dcode/contracts/dist/tools/eval-workflow-snippet.js +5 -1
- package/node_modules/@dcode/contracts/dist/tools/fill-workflow-hole.d.ts +729 -0
- package/node_modules/@dcode/contracts/dist/tools/fill-workflow-hole.js +102 -0
- package/node_modules/@dcode/contracts/dist/tools/get-workflow-run.d.ts +136 -28
- package/node_modules/@dcode/contracts/dist/tools/get-workflow-run.js +36 -0
- package/node_modules/@dcode/contracts/dist/tools/grep.d.ts +4 -4
- package/node_modules/@dcode/contracts/dist/tools/grep.js +4 -0
- package/node_modules/@dcode/contracts/dist/tools/index.d.ts +2 -0
- package/node_modules/@dcode/contracts/dist/tools/index.js +4 -0
- package/node_modules/@dcode/contracts/dist/tools/list-saved-workflows.d.ts +8 -8
- package/node_modules/@dcode/contracts/dist/tools/list-workflow-runs.d.ts +8 -8
- package/node_modules/@dcode/contracts/dist/tools/node-repl.d.ts +2 -2
- package/node_modules/@dcode/contracts/dist/tools/off-peak.d.ts +3 -3
- package/node_modules/@dcode/contracts/dist/tools/off-peak.js +2 -2
- package/node_modules/@dcode/contracts/dist/tools/performance.d.ts +22 -22
- package/node_modules/@dcode/contracts/dist/tools/plan-mode.d.ts +12 -12
- package/node_modules/@dcode/contracts/dist/tools/plan-mode.js +6 -4
- package/node_modules/@dcode/contracts/dist/tools/read-session-context.d.ts +86 -13
- package/node_modules/@dcode/contracts/dist/tools/read-session-context.js +37 -6
- package/node_modules/@dcode/contracts/dist/tools/read.d.ts +38 -38
- package/node_modules/@dcode/contracts/dist/tools/save-workflow.d.ts +21 -10
- package/node_modules/@dcode/contracts/dist/tools/save-workflow.js +22 -2
- package/node_modules/@dcode/contracts/dist/tools/saved-workflow.d.ts +4 -4
- package/node_modules/@dcode/contracts/dist/tools/send-message.d.ts +2 -2
- package/node_modules/@dcode/contracts/dist/tools/skill.js +1 -0
- package/node_modules/@dcode/contracts/dist/tools/task-output.d.ts +6 -6
- package/node_modules/@dcode/contracts/dist/tools/tool-result-metadata.d.ts +1228 -259
- package/node_modules/@dcode/contracts/dist/tools/tool-result-metadata.js +41 -0
- package/node_modules/@dcode/contracts/dist/tools/webfetch.d.ts +2 -2
- package/node_modules/@dcode/contracts/dist/tools/workflow-observation-display.d.ts +20 -20
- package/node_modules/@dcode/contracts/dist/tools/workflow-settings.d.ts +55 -0
- package/node_modules/@dcode/contracts/dist/tools/workflow-settings.js +86 -0
- package/node_modules/@dcode/contracts/dist/tools/workflow.d.ts +8 -8
- package/node_modules/@dcode/contracts/dist/tools/write.d.ts +18 -18
- package/node_modules/@dcode/contracts/dist/workflow/index.d.ts +98 -98
- package/node_modules/@dcode/contracts/dist/workflow/script.d.ts +12 -12
- package/node_modules/@dcode/i18n/dist/index.js +2 -2
- package/node_modules/@dcode/i18n/dist/locale.d.ts +1 -1
- package/node_modules/@dcode/i18n/dist/locale.js +4 -4
- package/node_modules/@dcode/i18n/dist/locales/en-US.js +5 -5
- package/node_modules/@dcode/i18n/dist/locales/fr-CA.d.ts +3 -0
- package/node_modules/@dcode/i18n/dist/locales/fr-CA.js +354 -0
- package/node_modules/@dcode/model-option-map/package.json +1 -1
- package/node_modules/@dcode/shared/dist/api-key-usage-scene.d.ts +7 -0
- package/node_modules/@dcode/shared/dist/api-key-usage-scene.js +6 -0
- package/node_modules/@dcode/shared/dist/attachment-source.d.ts +8 -0
- package/node_modules/@dcode/shared/dist/attachment-source.js +4 -0
- package/node_modules/@dcode/shared/dist/background-bash-output.d.ts +4 -4
- package/node_modules/@dcode/shared/dist/bots.d.ts +763 -15
- package/node_modules/@dcode/shared/dist/bots.js +236 -2
- package/node_modules/@dcode/shared/dist/browser-use/command-metadata.d.ts +2 -2
- package/node_modules/@dcode/shared/dist/browser-use/commands.d.ts +4 -3
- package/node_modules/@dcode/shared/dist/browser-use/commands.js +3 -1
- package/node_modules/@dcode/shared/dist/browser-use/nodeReplBroker.d.ts +5 -4
- package/node_modules/@dcode/shared/dist/browser-use/result.d.ts +6 -6
- package/node_modules/@dcode/shared/dist/channel-mention.d.ts +173 -0
- package/node_modules/@dcode/shared/dist/channel-mention.js +120 -0
- package/node_modules/@dcode/shared/dist/channels.d.ts +128 -1
- package/node_modules/@dcode/shared/dist/channels.js +66 -0
- package/node_modules/@dcode/shared/dist/clientConfig.d.ts +1 -0
- package/node_modules/@dcode/shared/dist/clientConfig.js +18 -2
- package/node_modules/@dcode/shared/dist/cloudContent.d.ts +160 -0
- package/node_modules/@dcode/shared/dist/cloudContent.js +116 -0
- package/node_modules/@dcode/shared/dist/coding-plan-subscription.d.ts +59 -0
- package/node_modules/@dcode/shared/dist/conversation-message-projection-policy.js +2 -0
- package/node_modules/@dcode/shared/dist/conversation-share.d.ts +351 -47
- package/node_modules/@dcode/shared/dist/conversation-share.js +8 -6
- package/node_modules/@dcode/shared/dist/conversationSelection.d.ts +23 -0
- package/node_modules/@dcode/shared/dist/conversationSelection.js +30 -0
- package/node_modules/@dcode/shared/dist/database-startup.d.ts +5 -5
- package/node_modules/@dcode/shared/dist/dcode-agent-model-state.js +14 -6
- package/node_modules/@dcode/shared/dist/dcode-agent-policy.d.ts +16 -1
- package/node_modules/@dcode/shared/dist/dcode-agent-policy.js +17 -1
- package/node_modules/@dcode/shared/dist/dcode-agent-runtime.js +1 -1
- package/node_modules/@dcode/shared/dist/dcode-protocol/index.d.ts +1733 -318
- package/node_modules/@dcode/shared/dist/dcode-protocol/index.js +555 -24
- package/node_modules/@dcode/shared/dist/dcode-protocol/trace.d.ts +9 -0
- package/node_modules/@dcode/shared/dist/dcode-protocol/trace.js +10 -0
- package/node_modules/@dcode/shared/dist/dcode-protocol-legacy-types.d.ts +30 -20
- package/node_modules/@dcode/shared/dist/dcode-protocol-legacy-types.js +3 -1
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/apply.js +12 -3
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/attachment-ref.d.ts +5 -0
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/attachment-ref.js +3 -0
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/coalesce.d.ts +3 -1
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/coalesce.js +3 -1
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/command.d.ts +359 -28
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/command.js +67 -45
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/controller.d.ts +170 -65
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/create-session-config.d.ts +20 -0
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/create-session-config.js +15 -0
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/create-workflow-display.d.ts +34 -0
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/create-workflow-display.js +45 -1
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/delta.d.ts +1453 -278
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/delta.js +45 -2
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/index.d.ts +1 -0
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/index.js +1 -0
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/input-intent.d.ts +173 -6
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/input-intent.js +29 -0
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/rows.d.ts +731 -125
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/rows.js +23 -11
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/sessions-index-workflow-activity.d.ts +30 -11
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/sessions-index-workflow-activity.js +35 -3
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/sessions-index.d.ts +40 -25
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/snapshot.d.ts +1444 -216
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/snapshot.js +3 -0
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/submission.d.ts +1 -0
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/submission.js +1 -1
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/telemetry.d.ts +62 -58
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/toolDisplay.d.ts +185 -50
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/toolDisplay.js +31 -3
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/transport.d.ts +7145 -1002
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/transport.js +18 -5
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/wire-assembler.js +2 -1
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/wire-fault.js +4 -1
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/wire-reassembly.js +5 -3
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-artifacts.d.ts +29 -1
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-artifacts.js +64 -4
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-command-rejections.d.ts +13 -0
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-command-rejections.js +23 -0
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-observation-display.d.ts +14 -14
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-row-meta.d.ts +52 -8
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-row-meta.js +22 -3
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-run-settings-command.d.ts +4 -4
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-run-settings-command.js +2 -2
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-runs-actor-session.d.ts +21 -0
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-runs-actor-session.js +44 -0
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-runs-actor-status.d.ts +1 -1
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-runs-actor-status.js +3 -2
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-runs-caps.js +5 -4
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-runs-concurrency.d.ts +26 -19
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-runs-concurrency.js +40 -32
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-runs-delta.d.ts +4 -3
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-runs-delta.js +4 -3
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-runs-entries.d.ts +12 -2
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-runs-entries.js +44 -6
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-runs-eviction.d.ts +2 -2
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-runs-eviction.js +17 -10
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-runs-holes.d.ts +33 -0
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-runs-holes.js +202 -0
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-runs-legacy.d.ts +1 -1
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-runs-legacy.js +1 -1
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-runs-phases.js +10 -1
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-runs-reducer.d.ts +1 -1
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-runs-reducer.js +29 -22
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-runs-started.js +5 -2
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-runs-tables.js +2 -1
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-runs-unlisted.js +6 -3
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-runs.d.ts +125 -40
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-runs.js +101 -26
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-workspace.d.ts +4 -4
- package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workspace-hook-review.d.ts +1 -1
- package/node_modules/@dcode/shared/dist/dcode-session-content-profile.d.ts +5 -0
- package/node_modules/@dcode/shared/dist/dcode-session-content-profile.js +49 -0
- package/node_modules/@dcode/shared/dist/dcode-slash-command-help.js +4 -4
- package/node_modules/@dcode/shared/dist/dcode-task-mode-schema.d.ts +6 -1
- package/node_modules/@dcode/shared/dist/dcode-task-mode-schema.js +13 -1
- package/node_modules/@dcode/shared/dist/dcode-task-types-core.d.ts +12 -2
- package/node_modules/@dcode/shared/dist/dcode-task-types.d.ts +23 -0
- package/node_modules/@dcode/shared/dist/dcodeEndpoint.d.ts +20 -1
- package/node_modules/@dcode/shared/dist/dcodeEndpoint.js +98 -17
- package/node_modules/@dcode/shared/dist/desktopMenu.js +48 -48
- package/node_modules/@dcode/shared/dist/dynamic-workflow-feature.d.ts +35 -6
- package/node_modules/@dcode/shared/dist/dynamic-workflow-feature.js +45 -6
- package/node_modules/@dcode/shared/dist/env.d.ts +5 -4
- package/node_modules/@dcode/shared/dist/env.js +9 -9
- package/node_modules/@dcode/shared/dist/errors.d.ts +24 -0
- package/node_modules/@dcode/shared/dist/errors.js +54 -0
- package/node_modules/@dcode/shared/dist/execution-state.d.ts +4 -2
- package/node_modules/@dcode/shared/dist/execution-state.js +1 -1
- package/node_modules/@dcode/shared/dist/feedback.d.ts +1 -1
- package/node_modules/@dcode/shared/dist/gen-ui/contract.d.ts +140 -0
- package/node_modules/@dcode/shared/dist/gen-ui/contract.example.d.ts +5 -0
- package/node_modules/@dcode/shared/dist/gen-ui/contract.example.js +36 -0
- package/node_modules/@dcode/shared/dist/gen-ui/contract.js +196 -0
- package/node_modules/@dcode/shared/dist/gen-ui/contract.test.d.ts +2 -0
- package/node_modules/@dcode/shared/dist/gen-ui/contract.test.js +75 -0
- package/node_modules/@dcode/shared/dist/gen-ui/index.d.ts +2 -0
- package/node_modules/@dcode/shared/dist/gen-ui/index.js +2 -0
- package/node_modules/@dcode/shared/dist/gen-ui/module.d.ts +7 -0
- package/node_modules/@dcode/shared/dist/gen-ui/module.js +7 -0
- package/node_modules/@dcode/shared/dist/gen-ui/tweakProtocol.d.ts +202 -0
- package/node_modules/@dcode/shared/dist/gen-ui/tweakProtocol.js +126 -0
- package/node_modules/@dcode/shared/dist/helpAppConfig.d.ts +1 -1
- package/node_modules/@dcode/shared/dist/helpAppConfig.js +2 -2
- package/node_modules/@dcode/shared/dist/highspeed.d.ts +181 -0
- package/node_modules/@dcode/shared/dist/highspeed.js +112 -0
- package/node_modules/@dcode/shared/dist/index.d.ts +27 -5
- package/node_modules/@dcode/shared/dist/index.js +24 -2
- package/node_modules/@dcode/shared/dist/localTtft.d.ts +27 -27
- package/node_modules/@dcode/shared/dist/marketingTouch.d.ts +930 -0
- package/node_modules/@dcode/shared/dist/marketingTouch.js +170 -0
- package/node_modules/@dcode/shared/dist/mcp-apps/appTools.d.ts +83 -0
- package/node_modules/@dcode/shared/dist/mcp-apps/appTools.js +124 -0
- package/node_modules/@dcode/shared/dist/mcp-apps/content.d.ts +4 -0
- package/node_modules/@dcode/shared/dist/mcp-apps/content.js +8 -0
- package/node_modules/@dcode/shared/dist/mcp-apps/contract.d.ts +241 -0
- package/node_modules/@dcode/shared/dist/mcp-apps/contract.example.d.ts +31 -0
- package/node_modules/@dcode/shared/dist/mcp-apps/contract.example.js +42 -0
- package/node_modules/@dcode/shared/dist/mcp-apps/contract.js +101 -0
- package/node_modules/@dcode/shared/dist/mcp-apps/contract.test.d.ts +2 -0
- package/node_modules/@dcode/shared/dist/mcp-apps/contract.test.js +64 -0
- package/node_modules/@dcode/shared/dist/mcp-apps/hostContract.d.ts +47 -0
- package/node_modules/@dcode/shared/dist/mcp-apps/hostContract.js +8 -0
- package/node_modules/@dcode/shared/dist/mcp-apps/index.d.ts +9 -0
- package/node_modules/@dcode/shared/dist/mcp-apps/index.js +9 -0
- package/node_modules/@dcode/shared/dist/mcp-apps/instance.d.ts +10 -0
- package/node_modules/@dcode/shared/dist/mcp-apps/instance.js +11 -0
- package/node_modules/@dcode/shared/dist/mcp-apps/module.d.ts +12 -0
- package/node_modules/@dcode/shared/dist/mcp-apps/module.js +12 -0
- package/node_modules/@dcode/shared/dist/mcp-apps/resourceMime.d.ts +8 -0
- package/node_modules/@dcode/shared/dist/mcp-apps/resourceMime.js +73 -0
- package/node_modules/@dcode/shared/dist/mcp-apps/sampling.d.ts +101 -0
- package/node_modules/@dcode/shared/dist/mcp-apps/sampling.js +107 -0
- package/node_modules/@dcode/shared/dist/mcp-apps/sampling.test.d.ts +2 -0
- package/node_modules/@dcode/shared/dist/mcp-apps/sampling.test.js +55 -0
- package/node_modules/@dcode/shared/dist/mcp-apps/schemas.d.ts +78 -0
- package/node_modules/@dcode/shared/dist/mcp-apps/schemas.js +65 -0
- package/node_modules/@dcode/shared/dist/mcp-apps/toolMeta.d.ts +39 -0
- package/node_modules/@dcode/shared/dist/mcp-apps/toolMeta.js +199 -0
- package/node_modules/@dcode/shared/dist/mcp.d.ts +6 -2
- package/node_modules/@dcode/shared/dist/memory.d.ts +9 -0
- package/node_modules/@dcode/shared/dist/memory.js +2 -0
- package/node_modules/@dcode/shared/dist/model-execution.d.ts +31 -0
- package/node_modules/@dcode/shared/dist/model-execution.js +38 -0
- package/node_modules/@dcode/shared/dist/networkCapture.d.ts +49 -0
- package/node_modules/@dcode/shared/dist/networkCapture.js +41 -0
- package/node_modules/@dcode/shared/dist/node/genUiPaths.d.ts +6 -0
- package/node_modules/@dcode/shared/dist/node/genUiPaths.js +16 -0
- package/node_modules/@dcode/shared/dist/node/genUiPaths.test.d.ts +2 -0
- package/node_modules/@dcode/shared/dist/node/genUiPaths.test.js +30 -0
- package/node_modules/@dcode/shared/dist/node/networkCapture.d.ts +8 -0
- package/node_modules/@dcode/shared/dist/node/networkCapture.js +96 -0
- package/node_modules/@dcode/shared/dist/node/officialPluginCache.d.ts +1 -2
- package/node_modules/@dcode/shared/dist/node/subagentMarkdownMigration.d.ts +1 -2
- package/node_modules/@dcode/shared/dist/node.d.ts +2 -0
- package/node_modules/@dcode/shared/dist/node.js +2 -0
- package/node_modules/@dcode/shared/dist/output-style.d.ts +17 -0
- package/node_modules/@dcode/shared/dist/output-style.js +2 -0
- package/node_modules/@dcode/shared/dist/platform.d.ts +149 -1
- package/node_modules/@dcode/shared/dist/platform.js +2 -0
- package/node_modules/@dcode/shared/dist/platformUpdate.d.ts +61 -0
- package/node_modules/@dcode/shared/dist/platformUpdate.js +2 -0
- package/node_modules/@dcode/shared/dist/plugin-marketplaces.d.ts +5 -0
- package/node_modules/@dcode/shared/dist/plugin-marketplaces.js +20 -14
- package/node_modules/@dcode/shared/dist/project-access-token-client.d.ts +42 -0
- package/node_modules/@dcode/shared/dist/project-access-token-client.js +260 -0
- package/node_modules/@dcode/shared/dist/project-access-token-response.d.ts +4 -0
- package/node_modules/@dcode/shared/dist/project-access-token-response.js +9 -0
- package/node_modules/@dcode/shared/dist/project-access-token.d.ts +45 -0
- package/node_modules/@dcode/shared/dist/project-access-token.js +164 -0
- package/node_modules/@dcode/shared/dist/protocol.d.ts +41 -4
- package/node_modules/@dcode/shared/dist/protocol.js +1 -1
- package/node_modules/@dcode/shared/dist/provider-provisioning.d.ts +26 -2
- package/node_modules/@dcode/shared/dist/provider-provisioning.js +19 -3
- package/node_modules/@dcode/shared/dist/providers.d.ts +1 -2
- package/node_modules/@dcode/shared/dist/providers.js +1 -1
- package/node_modules/@dcode/shared/dist/remote-workspace-identity.d.ts +6 -1
- package/node_modules/@dcode/shared/dist/remote-workspace-identity.js +35 -1
- package/node_modules/@dcode/shared/dist/remoteAppConfig.js +1 -1
- package/node_modules/@dcode/shared/dist/remoteEnvironmentKey.js +19 -0
- package/node_modules/@dcode/shared/dist/remoteTarget.d.ts +14 -1
- package/node_modules/@dcode/shared/dist/remoteTarget.js +4 -0
- package/node_modules/@dcode/shared/dist/remoteUsageTelemetry.d.ts +27 -0
- package/node_modules/@dcode/shared/dist/remoteUsageTelemetry.js +43 -0
- package/node_modules/@dcode/shared/dist/rendererActionTrace.d.ts +35 -35
- package/node_modules/@dcode/shared/dist/request-security-edition/index.d.ts +3 -0
- package/node_modules/@dcode/shared/dist/request-security-edition/index.js +3 -0
- package/node_modules/@dcode/shared/dist/request-security-edition/policy.d.ts +3 -0
- package/node_modules/@dcode/shared/dist/request-security-edition/policy.js +5 -0
- package/node_modules/@dcode/shared/dist/request-security-edition/verification-policy.d.ts +19 -0
- package/node_modules/@dcode/shared/dist/request-security-edition/verification-policy.js +29 -0
- package/node_modules/@dcode/shared/dist/rewardsBridge.d.ts +8 -0
- package/node_modules/@dcode/shared/dist/rewardsBridge.js +80 -0
- package/node_modules/@dcode/shared/dist/rewardsEmbedded.d.ts +37 -0
- package/node_modules/@dcode/shared/dist/rewardsEmbedded.js +50 -0
- package/node_modules/@dcode/shared/dist/sessionCreateTelemetry.d.ts +3 -3
- package/node_modules/@dcode/shared/dist/subagent-profile-frontmatter.d.ts +10 -0
- package/node_modules/@dcode/shared/dist/subagent-profile-frontmatter.js +212 -0
- package/node_modules/@dcode/shared/dist/subagent-profile-parser.d.ts +10 -0
- package/node_modules/@dcode/shared/dist/subagent-profile-parser.js +200 -0
- package/node_modules/@dcode/shared/dist/subagent-profile.d.ts +82 -0
- package/node_modules/@dcode/shared/dist/subagent-profile.js +28 -0
- package/node_modules/@dcode/shared/dist/subagent-runtime-config.d.ts +135 -0
- package/node_modules/@dcode/shared/dist/subagent-runtime-config.js +39 -0
- package/node_modules/@dcode/shared/dist/subagents-types.d.ts +1 -1
- package/node_modules/@dcode/shared/dist/task-realtime-core.d.ts +57 -24
- package/node_modules/@dcode/shared/dist/task-realtime-core.js +8 -2
- package/node_modules/@dcode/shared/dist/test-ids-workflow.d.ts +4 -0
- package/node_modules/@dcode/shared/dist/test-ids-workflow.js +5 -0
- package/node_modules/@dcode/shared/dist/test-ids.d.ts +25 -0
- package/node_modules/@dcode/shared/dist/test-ids.js +25 -0
- package/node_modules/@dcode/shared/dist/tool-identity.d.ts +1 -1
- package/node_modules/@dcode/shared/dist/tool-identity.js +4 -0
- package/node_modules/@dcode/shared/dist/tool-plan-adapter.js +14 -1
- package/node_modules/@dcode/shared/dist/usage-stats.d.ts +13 -0
- package/node_modules/@dcode/shared/dist/validation.d.ts +1461 -85
- package/node_modules/@dcode/shared/dist/validation.js +423 -14
- package/node_modules/@dcode/shared/dist/validationAppSettings.d.ts +71 -15
- package/node_modules/@dcode/shared/dist/validationAppSettings.js +74 -12
- package/node_modules/@dcode/shared/dist/web-remote-control-heartbeat.d.ts +8 -0
- package/node_modules/@dcode/shared/dist/web-remote-control-heartbeat.js +40 -0
- package/node_modules/@dcode/shared/dist/web-remote-control-rpc-transport.d.ts +183 -0
- package/node_modules/@dcode/shared/dist/web-remote-control-rpc-transport.js +562 -0
- package/node_modules/@dcode/shared/dist/web-remote-control.d.ts +645 -0
- package/node_modules/@dcode/shared/dist/web-remote-control.js +174 -0
- package/node_modules/@dcode/shared/package.json +5 -2
- package/node_modules/@dcode/tui/dist/app-approval-panel.js +3 -2
- package/node_modules/@dcode/tui/dist/app-approval.d.ts +3 -1
- package/node_modules/@dcode/tui/dist/app-approval.js +9 -5
- package/node_modules/@dcode/tui/dist/app-compact-timeline.d.ts +3 -0
- package/node_modules/@dcode/tui/dist/app-compact-timeline.js +5 -2
- package/node_modules/@dcode/tui/dist/app-empty-transcript.d.ts +1 -0
- package/node_modules/@dcode/tui/dist/app-empty-transcript.js +1 -1
- package/node_modules/@dcode/tui/dist/app-file-mentions.d.ts +2 -0
- package/node_modules/@dcode/tui/dist/app-file-mentions.js +2 -2
- package/node_modules/@dcode/tui/dist/app-input-pane.d.ts +38 -0
- package/node_modules/@dcode/tui/dist/app-input-pane.js +19 -19
- package/node_modules/@dcode/tui/dist/app-input-status.d.ts +17 -0
- package/node_modules/@dcode/tui/dist/app-input-status.js +4 -4
- package/node_modules/@dcode/tui/dist/app-input.d.ts +1 -0
- package/node_modules/@dcode/tui/dist/app-input.js +1 -1
- package/node_modules/@dcode/tui/dist/app-markdown-theme.d.ts +2 -1
- package/node_modules/@dcode/tui/dist/app-markdown-theme.js +1 -1
- package/node_modules/@dcode/tui/dist/app-markdown.d.ts +1 -0
- package/node_modules/@dcode/tui/dist/app-markdown.js +1 -1
- package/node_modules/@dcode/tui/dist/app-mode-command.d.ts +3 -0
- package/node_modules/@dcode/tui/dist/app-mode-command.js +4 -4
- package/node_modules/@dcode/tui/dist/app-mode-suggestion-panel.d.ts +5 -0
- package/node_modules/@dcode/tui/dist/app-mode-suggestion-panel.js +1 -1
- package/node_modules/@dcode/tui/dist/app-mode.d.ts +1 -1
- package/node_modules/@dcode/tui/dist/app-mode.js +1 -1
- package/node_modules/@dcode/tui/dist/app-model-ref.d.ts +1 -0
- package/node_modules/@dcode/tui/dist/app-model-ref.js +1 -1
- package/node_modules/@dcode/tui/dist/app-motion.d.ts +13 -0
- package/node_modules/@dcode/tui/dist/app-motion.js +17 -7
- package/node_modules/@dcode/tui/dist/app-session-event-handler.d.ts +33 -0
- package/node_modules/@dcode/tui/dist/app-session-event-handler.js +4 -4
- package/node_modules/@dcode/tui/dist/app-shiki-diff-view.d.ts +18 -1
- package/node_modules/@dcode/tui/dist/app-shiki-diff-view.js +3 -3
- package/node_modules/@dcode/tui/dist/app-shiki-highlighter.d.ts +3 -0
- package/node_modules/@dcode/tui/dist/app-shiki-highlighter.js +7 -2
- package/node_modules/@dcode/tui/dist/app-sidebar-layout.d.ts +10 -0
- package/node_modules/@dcode/tui/dist/app-sidebar-layout.js +4 -4
- package/node_modules/@dcode/tui/dist/app-submit.d.ts +1 -0
- package/node_modules/@dcode/tui/dist/app-submit.js +1 -1
- package/node_modules/@dcode/tui/dist/app-thought-components.d.ts +7 -0
- package/node_modules/@dcode/tui/dist/app-thought-components.js +2 -2
- package/node_modules/@dcode/tui/dist/app-tool-transcript.d.ts +1 -0
- package/node_modules/@dcode/tui/dist/app-tool-transcript.js +3 -0
- package/node_modules/@dcode/tui/dist/app-view.d.ts +27 -0
- package/node_modules/@dcode/tui/dist/app-view.js +1 -1
- package/node_modules/@dcode/tui/dist/app-workflow-card.js +1 -1
- package/node_modules/@dcode/tui/dist/app-workflow-seed.d.ts +18 -1
- package/node_modules/@dcode/tui/dist/app-workflow-seed.js +4 -4
- package/node_modules/@dcode/tui/dist/index.js +5118 -2579
- package/node_modules/@dcode/tui/dist/tui.d.ts +3 -0
- package/node_modules/@dcode/tui/dist/tui.js +1 -1
- package/node_modules/@dcode/tui/dist/types.d.ts +1 -1
- package/node_modules/oniguruma-parser/LICENSE +1 -1
- package/node_modules/oniguruma-parser/README.md +15 -61
- package/node_modules/oniguruma-parser/dist/oniguruma-parser.min.js +4 -4
- package/node_modules/oniguruma-parser/dist/parser/parse.js +1 -1
- package/node_modules/oniguruma-parser/dist/traverser/traverse.js +1 -1
- package/node_modules/oniguruma-parser/package.json +5 -5
- package/node_modules/oniguruma-to-es/dist/cjs/generate.d.ts +1 -1
- package/node_modules/oniguruma-to-es/dist/cjs/index.js +121 -120
- package/node_modules/oniguruma-to-es/dist/cjs/subclass.d.ts +2 -2
- package/node_modules/oniguruma-to-es/dist/cjs/transform.d.ts +3 -5
- package/node_modules/oniguruma-to-es/dist/cjs/unicode.d.ts +1 -1
- package/node_modules/oniguruma-to-es/dist/esm/generate.d.ts +1 -1
- package/node_modules/oniguruma-to-es/dist/esm/index.js +1 -3
- package/node_modules/oniguruma-to-es/dist/esm/subclass.d.ts +2 -2
- package/node_modules/oniguruma-to-es/dist/esm/transform.d.ts +3 -5
- package/node_modules/oniguruma-to-es/dist/esm/unicode.d.ts +1 -1
- package/node_modules/oniguruma-to-es/dist/index.min.js +6 -6
- package/node_modules/oniguruma-to-es/package.json +5 -5
- package/package.json +5 -5
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { dcodeProtocolTraceSchema } from "./dcode-protocol/trace.js";
|
|
2
|
+
import { channelContentPartsSchema } from "./channel-mention.js";
|
|
1
3
|
/* oxlint-disable eslint(max-lines) -- Bot 共享合约集中维护 provider、状态和 schema,保持类型与校验就近。 */
|
|
2
4
|
import { z } from "zod";
|
|
3
5
|
import { modelSelectionSchema } from "./model-selection.js";
|
|
6
|
+
import { conversationQuotesSchema } from "./conversationSelection.js";
|
|
4
7
|
import { DCODE_AGENT_PROVIDER, DCODE_AGENT_PROVIDER_LABEL } from "./dcode-agent-policy.js";
|
|
5
8
|
import { dcodeInteractionRequestOriginSchema, dcodePermissionResponseSchema, } from "./dcode-protocol-legacy-types.js";
|
|
6
9
|
export const botProviders = [
|
|
@@ -22,6 +25,8 @@ export const dcodeAutomationBotDeliveryTargetSchema = z
|
|
|
22
25
|
botId: z.string().trim().min(1),
|
|
23
26
|
providerUserId: z.string().trim().min(1),
|
|
24
27
|
chatType: z.enum(["private", "group"]),
|
|
28
|
+
threadId: z.string().min(1).optional(),
|
|
29
|
+
rootMessageId: z.string().min(1).optional(),
|
|
25
30
|
})
|
|
26
31
|
.strict();
|
|
27
32
|
export function isFeishuBotProvider(provider) {
|
|
@@ -35,6 +40,182 @@ export const BOT_REPLY_GRANULARITIES = [
|
|
|
35
40
|
];
|
|
36
41
|
export const ALL_BOT_WORKSPACES = "*";
|
|
37
42
|
export const BOT_BIND_CODE_TTL_MS = 30_000;
|
|
43
|
+
export const botGroupDeliverySchema = z
|
|
44
|
+
.object({
|
|
45
|
+
/** 名字解析前的请求指纹;重复调用只读原回执,不因目录变化改发给其他人。 */
|
|
46
|
+
channelReplyRequestHash: z
|
|
47
|
+
.string()
|
|
48
|
+
.regex(/^[a-f0-9]{64}$/u)
|
|
49
|
+
.optional(),
|
|
50
|
+
appId: z.string().optional(),
|
|
51
|
+
trace: dcodeProtocolTraceSchema.optional(),
|
|
52
|
+
authorizationId: z.string().optional(),
|
|
53
|
+
id: z.string().min(1),
|
|
54
|
+
taskId: z.string().min(1),
|
|
55
|
+
sourceCommandId: z.string().min(1).optional(),
|
|
56
|
+
text: z.string(),
|
|
57
|
+
replyToMessageId: z.string().optional(),
|
|
58
|
+
mentionedUserIds: z.array(z.string().min(1)).max(200).optional(),
|
|
59
|
+
contentParts: channelContentPartsSchema.optional(),
|
|
60
|
+
providerMessageId: z.string().optional(),
|
|
61
|
+
threadId: z.string().min(1).optional(),
|
|
62
|
+
rootMessageId: z.string().optional(),
|
|
63
|
+
status: z.enum(["pending", "sent", "failed", "unknown", "invalidated"]),
|
|
64
|
+
lastError: z.string().optional(),
|
|
65
|
+
updatedAt: z.number(),
|
|
66
|
+
})
|
|
67
|
+
.strict();
|
|
68
|
+
export const botGroupCardSchema = z
|
|
69
|
+
.object({
|
|
70
|
+
chatId: z.string().min(1),
|
|
71
|
+
threadId: z.string().min(1).optional(),
|
|
72
|
+
conversationThreadId: z.string().min(1).nullable().optional(),
|
|
73
|
+
taskId: z.string().nullable(),
|
|
74
|
+
authorizationId: z.string().min(1),
|
|
75
|
+
})
|
|
76
|
+
.strict();
|
|
77
|
+
export const botTopicMessageSchema = z
|
|
78
|
+
.object({
|
|
79
|
+
id: z.string().min(1),
|
|
80
|
+
chatId: z.string().min(1),
|
|
81
|
+
threadId: z.string().min(1),
|
|
82
|
+
senderId: z.string(),
|
|
83
|
+
senderName: z.string().optional(),
|
|
84
|
+
parentId: z.string().optional(),
|
|
85
|
+
attachments: z.array(z.object({ name: z.string(), kind: z.string() }).strict()).optional(),
|
|
86
|
+
senderType: z.enum(["user", "app"]),
|
|
87
|
+
text: z.string(),
|
|
88
|
+
createdAt: z.number(),
|
|
89
|
+
kind: z.string(),
|
|
90
|
+
controlCard: z.boolean().optional(),
|
|
91
|
+
deleted: z.boolean().optional(),
|
|
92
|
+
})
|
|
93
|
+
.strict();
|
|
94
|
+
export const botTopicContextSchema = z
|
|
95
|
+
.object({
|
|
96
|
+
messages: z.array(botTopicMessageSchema).max(201),
|
|
97
|
+
checkpoint: z.string().min(1),
|
|
98
|
+
hasGap: z.boolean(),
|
|
99
|
+
})
|
|
100
|
+
.strict();
|
|
101
|
+
export const botIdentitySchema = z
|
|
102
|
+
.object({ name: z.string().min(1), openId: z.string().min(1).optional() })
|
|
103
|
+
.strict();
|
|
104
|
+
export const botBackgroundHistorySchema = z
|
|
105
|
+
.object({ revision: z.string().min(1), checkpoint: z.string().min(1).optional() })
|
|
106
|
+
.strict();
|
|
107
|
+
export const botAutoReplyGuardSchema = z
|
|
108
|
+
.object({
|
|
109
|
+
consecutive: z.number().int().min(0).max(5),
|
|
110
|
+
messageIds: z.array(z.string().min(1)),
|
|
111
|
+
})
|
|
112
|
+
.strict();
|
|
113
|
+
export const botGroupInputStatusSchema = z.enum([
|
|
114
|
+
"waiting",
|
|
115
|
+
"working",
|
|
116
|
+
"done",
|
|
117
|
+
"failed",
|
|
118
|
+
"stopped",
|
|
119
|
+
"cancelled",
|
|
120
|
+
"discarded",
|
|
121
|
+
]);
|
|
122
|
+
export const botTopicPreparationSchema = z
|
|
123
|
+
.object({
|
|
124
|
+
contentParts: channelContentPartsSchema.optional(),
|
|
125
|
+
messageId: z.string().min(1),
|
|
126
|
+
senderName: z.string(),
|
|
127
|
+
text: z.string(),
|
|
128
|
+
status: z.enum(["preparing", "waitingStop", "failed"]),
|
|
129
|
+
error: z.string().optional(),
|
|
130
|
+
})
|
|
131
|
+
.strict();
|
|
132
|
+
export const botGroupInputProgressSchema = z
|
|
133
|
+
.object({
|
|
134
|
+
status: botGroupInputStatusSchema,
|
|
135
|
+
interruptionReason: z.literal("newMessage").optional(),
|
|
136
|
+
cardMessageId: z.string().min(1).optional(),
|
|
137
|
+
cardStatus: botGroupInputStatusSchema.optional(),
|
|
138
|
+
})
|
|
139
|
+
.strict();
|
|
140
|
+
/** CLI 只接收轻量材料索引;原文留在 Host 归档及文本附件。 */
|
|
141
|
+
export const botTopicHistorySourceSchema = z
|
|
142
|
+
.object({
|
|
143
|
+
checkpoint: z.string().min(1).max(256),
|
|
144
|
+
hasGap: z.boolean(),
|
|
145
|
+
messageCount: z.number().int().min(0).max(201),
|
|
146
|
+
resourceMessages: z
|
|
147
|
+
.array(z
|
|
148
|
+
.object({
|
|
149
|
+
messageId: z.string().min(1).max(256),
|
|
150
|
+
count: z.number().int().min(1).max(1000),
|
|
151
|
+
})
|
|
152
|
+
.strict())
|
|
153
|
+
.max(201),
|
|
154
|
+
})
|
|
155
|
+
.strict();
|
|
156
|
+
export const botTopicInputMessageSchema = z
|
|
157
|
+
.object({
|
|
158
|
+
contentParts: channelContentPartsSchema.optional(),
|
|
159
|
+
messageId: z.string().min(1),
|
|
160
|
+
senderId: z.string().min(1),
|
|
161
|
+
senderName: z.string(),
|
|
162
|
+
mentionedBot: z.boolean().optional(),
|
|
163
|
+
text: z.string(),
|
|
164
|
+
conversationQuotes: conversationQuotesSchema.optional(),
|
|
165
|
+
attachmentIndexes: z.array(z.number().int().nonnegative()),
|
|
166
|
+
})
|
|
167
|
+
.strict();
|
|
168
|
+
/** 可信 Host 注入的输入来源;身份展示不能反向授予执行权限。 */
|
|
169
|
+
export const botGroupInputSourceSchema = z
|
|
170
|
+
.object({
|
|
171
|
+
botIdentity: botIdentitySchema.optional(),
|
|
172
|
+
appId: z.string().min(1).optional(),
|
|
173
|
+
contentParts: channelContentPartsSchema.optional(),
|
|
174
|
+
authorizationId: z.string().min(1).optional(),
|
|
175
|
+
botId: z.string().min(1),
|
|
176
|
+
provider: z.enum(["feishu", "lark"]),
|
|
177
|
+
chatId: z.string().min(1),
|
|
178
|
+
threadId: z.string().min(1).optional(),
|
|
179
|
+
rootMessageId: z.string().optional(),
|
|
180
|
+
senderId: z.string().min(1),
|
|
181
|
+
senderName: z.string(),
|
|
182
|
+
mentionedBot: z.boolean().optional(),
|
|
183
|
+
messageId: z.string().min(1),
|
|
184
|
+
messages: z.array(botTopicInputMessageSchema).min(1).max(200).optional(),
|
|
185
|
+
topicContext: botTopicContextSchema.optional(),
|
|
186
|
+
topicHistory: botTopicHistorySourceSchema.optional(),
|
|
187
|
+
})
|
|
188
|
+
.strict()
|
|
189
|
+
.superRefine((source, ctx) => {
|
|
190
|
+
if (source.messages &&
|
|
191
|
+
(!source.threadId ||
|
|
192
|
+
source.messages.at(-1)?.messageId !== source.messageId ||
|
|
193
|
+
new Set(source.messages.map((message) => message.messageId)).size !==
|
|
194
|
+
source.messages.length)) {
|
|
195
|
+
ctx.addIssue({
|
|
196
|
+
code: "custom",
|
|
197
|
+
path: ["messages"],
|
|
198
|
+
message: "Topic batch boundary mismatch",
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
if (source.topicHistory &&
|
|
202
|
+
(!source.threadId || source.topicHistory.checkpoint !== source.messageId)) {
|
|
203
|
+
ctx.addIssue({
|
|
204
|
+
code: "custom",
|
|
205
|
+
path: ["topicHistory"],
|
|
206
|
+
message: "Topic history scope mismatch",
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
if (source.topicContext &&
|
|
210
|
+
(!source.threadId ||
|
|
211
|
+
source.topicContext.checkpoint !== source.messageId ||
|
|
212
|
+
source.topicContext.messages.some((m) => m.chatId !== source.chatId || m.threadId !== source.threadId)))
|
|
213
|
+
ctx.addIssue({
|
|
214
|
+
code: "custom",
|
|
215
|
+
path: ["topicContext"],
|
|
216
|
+
message: "Topic context scope mismatch",
|
|
217
|
+
});
|
|
218
|
+
});
|
|
38
219
|
export const BOT_TASK_BROADCAST_CHANNEL = "bots:task";
|
|
39
220
|
export const BOT_TASK_STREAM_BROADCAST_CHANNEL = "bots:task-stream";
|
|
40
221
|
export const botAllowedCommandsSchema = z
|
|
@@ -53,6 +234,12 @@ export const botAllowedCommandsSchema = z
|
|
|
53
234
|
})
|
|
54
235
|
.strict();
|
|
55
236
|
export const botCommandPolicySchema = botAllowedCommandsSchema;
|
|
237
|
+
// 修复原因:第三方 CLI provider 已移除,DCodeProvider 只剩 glm,但旧 bot 配置与状态文件里可能仍存有
|
|
238
|
+
// 已移除 provider 的历史值。改成严格 literal 会让整份文件 parse 失败、Bot 全部不可用;
|
|
239
|
+
// 因此解析时继续接受这些历史值,并统一归一到当前唯一的 agent provider。
|
|
240
|
+
const legacyBotAgentProviderSchema = z
|
|
241
|
+
.enum(["codex", "claude", "opencode", "gemini", "glm"])
|
|
242
|
+
.transform(() => DCODE_AGENT_PROVIDER);
|
|
56
243
|
export const botCurrentOptionsSchema = z
|
|
57
244
|
.object({
|
|
58
245
|
modelSelection: modelSelectionSchema.optional(),
|
|
@@ -60,12 +247,12 @@ export const botCurrentOptionsSchema = z
|
|
|
60
247
|
sandboxMode: z.string().min(1).optional(),
|
|
61
248
|
approvalPolicy: z.string().min(1).optional(),
|
|
62
249
|
// 兼容旧 bot-config.json;CLI provider 现在统一由 DCode Protocol 侧配置决定。
|
|
63
|
-
cli:
|
|
250
|
+
cli: legacyBotAgentProviderSchema.optional(),
|
|
64
251
|
})
|
|
65
252
|
.strict();
|
|
66
253
|
export const botDraftOptionsSchema = z
|
|
67
254
|
.object({
|
|
68
|
-
provider:
|
|
255
|
+
provider: legacyBotAgentProviderSchema,
|
|
69
256
|
modelSelection: modelSelectionSchema.optional(),
|
|
70
257
|
mode: z.string().min(1).optional(),
|
|
71
258
|
})
|
|
@@ -141,6 +328,51 @@ export const botsStateFileSchema = z
|
|
|
141
328
|
version: z.literal(3),
|
|
142
329
|
bots: z.record(z.string(), z.object({
|
|
143
330
|
botId: z.string().min(1),
|
|
331
|
+
group: z
|
|
332
|
+
.object({
|
|
333
|
+
chatId: z.string().trim().min(1),
|
|
334
|
+
chatMode: z.enum(["group", "topic"]).optional(),
|
|
335
|
+
threadId: z.string().trim().min(1).optional(),
|
|
336
|
+
rootMessageId: z.string().min(1).optional(),
|
|
337
|
+
topicTitle: z.string().optional(),
|
|
338
|
+
topicUrl: z.string().url().optional(),
|
|
339
|
+
historyEnabled: z.boolean().optional(),
|
|
340
|
+
topicActive: z.boolean().optional(),
|
|
341
|
+
preparation: z.array(botTopicPreparationSchema).optional(),
|
|
342
|
+
topicAliases: z
|
|
343
|
+
.record(z.string(), z.object({ taskId: z.string().min(1), rootMessageId: z.string().min(1) }).strict())
|
|
344
|
+
.optional(),
|
|
345
|
+
name: z.string(),
|
|
346
|
+
ownerId: z.string().min(1),
|
|
347
|
+
enabled: z.boolean(),
|
|
348
|
+
taskIds: z.array(z.string().min(1)),
|
|
349
|
+
taskWorkspaces: z
|
|
350
|
+
.record(z.string(), z
|
|
351
|
+
.object({
|
|
352
|
+
workspacePath: z.string().min(1),
|
|
353
|
+
workspaceIdentity: z.string().optional(),
|
|
354
|
+
})
|
|
355
|
+
.strict())
|
|
356
|
+
.optional(),
|
|
357
|
+
currentOptions: botCurrentOptionsSchema,
|
|
358
|
+
initiatorId: z.string().optional(),
|
|
359
|
+
authorizationId: z.string().optional(),
|
|
360
|
+
deliveries: z.record(z.string(), botGroupDeliverySchema).optional(),
|
|
361
|
+
autoReplyGuard: botAutoReplyGuardSchema.optional(),
|
|
362
|
+
backgroundHistory: botBackgroundHistorySchema.optional(),
|
|
363
|
+
inputs: z
|
|
364
|
+
.record(z.string(), z
|
|
365
|
+
.object({
|
|
366
|
+
taskId: z.string().min(1),
|
|
367
|
+
source: botGroupInputSourceSchema,
|
|
368
|
+
admission: z.enum(["pending", "accepted", "rejected"]).optional(),
|
|
369
|
+
progress: botGroupInputProgressSchema.optional(),
|
|
370
|
+
})
|
|
371
|
+
.strict())
|
|
372
|
+
.optional(),
|
|
373
|
+
})
|
|
374
|
+
.strict()
|
|
375
|
+
.optional(),
|
|
144
376
|
workspacePath: z.string().min(1),
|
|
145
377
|
workspaceIdentity: z.string().min(1).optional(),
|
|
146
378
|
workspaceId: z.string().min(1).optional(),
|
|
@@ -161,6 +393,8 @@ export const botsStateFileSchema = z
|
|
|
161
393
|
telegramOffset: z.number().optional(),
|
|
162
394
|
weixinGetUpdatesBuf: z.string().optional(),
|
|
163
395
|
weixinActivatedAt: z.number().optional(),
|
|
396
|
+
privateBindingId: z.string().min(1).optional(),
|
|
397
|
+
privateRecipientId: z.string().min(1).optional(),
|
|
164
398
|
updatedAt: z.number(),
|
|
165
399
|
})),
|
|
166
400
|
})
|
|
@@ -57,12 +57,11 @@ export type EmbeddedBrowserViewportPreference = z.infer<typeof embeddedBrowserVi
|
|
|
57
57
|
export declare const DEFAULT_EMBEDDED_BROWSER_VIEWPORT_PREFERENCE: EmbeddedBrowserViewportPreference;
|
|
58
58
|
/** browser-use 的统一命令方法集,各分支由 BrowserCommand 的 method 判别。 */
|
|
59
59
|
export declare const browserCommandMethodSchema: z.ZodEnum<{
|
|
60
|
-
fill: "fill";
|
|
61
60
|
type: "type";
|
|
62
61
|
check: "check";
|
|
62
|
+
fill: "fill";
|
|
63
63
|
back: "back";
|
|
64
64
|
snapshot: "snapshot";
|
|
65
|
-
select: "select";
|
|
66
65
|
navigate: "navigate";
|
|
67
66
|
forward: "forward";
|
|
68
67
|
reload: "reload";
|
|
@@ -73,6 +72,7 @@ export declare const browserCommandMethodSchema: z.ZodEnum<{
|
|
|
73
72
|
cuaScroll: "cuaScroll";
|
|
74
73
|
domCuaScroll: "domCuaScroll";
|
|
75
74
|
hover: "hover";
|
|
75
|
+
select: "select";
|
|
76
76
|
drag: "drag";
|
|
77
77
|
cuaDrag: "cuaDrag";
|
|
78
78
|
screenshot: "screenshot";
|
|
@@ -185,11 +185,11 @@ export type BrowserRecordingOptions = z.infer<typeof browserRecordingOptionsSche
|
|
|
185
185
|
/** Playwright locator 的可跨进程终结操作。builder 本身只在 agent 内组合 selector。 */
|
|
186
186
|
export declare const browserPlaywrightLocatorOperationSchema: z.ZodEnum<{
|
|
187
187
|
fill: "fill";
|
|
188
|
-
count: "count";
|
|
189
188
|
click: "click";
|
|
190
189
|
press: "press";
|
|
191
190
|
evaluate: "evaluate";
|
|
192
191
|
waitFor: "waitFor";
|
|
192
|
+
count: "count";
|
|
193
193
|
allTextContents: "allTextContents";
|
|
194
194
|
dblclick: "dblclick";
|
|
195
195
|
downloadMedia: "downloadMedia";
|
|
@@ -274,11 +274,11 @@ export declare const browserPlaywrightActionSchema: z.ZodDiscriminatedUnion<[z.Z
|
|
|
274
274
|
selector: z.ZodString;
|
|
275
275
|
operation: z.ZodEnum<{
|
|
276
276
|
fill: "fill";
|
|
277
|
-
count: "count";
|
|
278
277
|
click: "click";
|
|
279
278
|
press: "press";
|
|
280
279
|
evaluate: "evaluate";
|
|
281
280
|
waitFor: "waitFor";
|
|
281
|
+
count: "count";
|
|
282
282
|
allTextContents: "allTextContents";
|
|
283
283
|
dblclick: "dblclick";
|
|
284
284
|
downloadMedia: "downloadMedia";
|
|
@@ -583,11 +583,11 @@ export declare const browserCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
583
583
|
selector: z.ZodString;
|
|
584
584
|
operation: z.ZodEnum<{
|
|
585
585
|
fill: "fill";
|
|
586
|
-
count: "count";
|
|
587
586
|
click: "click";
|
|
588
587
|
press: "press";
|
|
589
588
|
evaluate: "evaluate";
|
|
590
589
|
waitFor: "waitFor";
|
|
590
|
+
count: "count";
|
|
591
591
|
allTextContents: "allTextContents";
|
|
592
592
|
dblclick: "dblclick";
|
|
593
593
|
downloadMedia: "downloadMedia";
|
|
@@ -785,6 +785,7 @@ export declare const browserCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
785
785
|
turnId: z.ZodOptional<z.ZodString>;
|
|
786
786
|
}, z.core.$strict>, z.ZodObject<{
|
|
787
787
|
method: z.ZodLiteral<"closeSession">;
|
|
788
|
+
closeTabs: z.ZodOptional<z.ZodBoolean>;
|
|
788
789
|
}, z.core.$strict>, z.ZodObject<{
|
|
789
790
|
method: z.ZodLiteral<"cancelRequest">;
|
|
790
791
|
requestId: z.ZodString;
|
|
@@ -532,7 +532,9 @@ export const browserCommandSchema = z.discriminatedUnion("method", [
|
|
|
532
532
|
})
|
|
533
533
|
.strict(),
|
|
534
534
|
z.object({ method: z.literal("turnEnded"), turnId: z.string().min(1).optional() }).strict(),
|
|
535
|
-
|
|
535
|
+
// closeTabs:连同该 session 名下的 tab 一起关(含已释放回该 session 的)。只给永不回来认领的
|
|
536
|
+
// session 用——dwf 子代理(docs/browser-use/2026-07-14-browser-tab-conversation-isolation-spec.md §2.3)。
|
|
537
|
+
z.object({ method: z.literal("closeSession"), closeTabs: z.boolean().optional() }).strict(),
|
|
536
538
|
z.object({ method: z.literal("cancelRequest"), requestId: z.string().min(1) }).strict(),
|
|
537
539
|
// close:关闭指定受控 tab(tabId 缺省=当前 tab)。manager 层处理:detach + 通知 renderer 卸载 webview。
|
|
538
540
|
z.object({ method: z.literal("close"), tabId: z.string().optional() }).strict(),
|
|
@@ -283,11 +283,11 @@ export declare const nodeReplBrowserBrokerRequestSchema: z.ZodDiscriminatedUnion
|
|
|
283
283
|
selector: z.ZodString;
|
|
284
284
|
operation: z.ZodEnum<{
|
|
285
285
|
fill: "fill";
|
|
286
|
-
count: "count";
|
|
287
286
|
click: "click";
|
|
288
287
|
press: "press";
|
|
289
288
|
evaluate: "evaluate";
|
|
290
289
|
waitFor: "waitFor";
|
|
290
|
+
count: "count";
|
|
291
291
|
allTextContents: "allTextContents";
|
|
292
292
|
dblclick: "dblclick";
|
|
293
293
|
downloadMedia: "downloadMedia";
|
|
@@ -485,6 +485,7 @@ export declare const nodeReplBrowserBrokerRequestSchema: z.ZodDiscriminatedUnion
|
|
|
485
485
|
turnId: z.ZodOptional<z.ZodString>;
|
|
486
486
|
}, z.core.$strict>, z.ZodObject<{
|
|
487
487
|
method: z.ZodLiteral<"closeSession">;
|
|
488
|
+
closeTabs: z.ZodOptional<z.ZodBoolean>;
|
|
488
489
|
}, z.core.$strict>, z.ZodObject<{
|
|
489
490
|
method: z.ZodLiteral<"cancelRequest">;
|
|
490
491
|
requestId: z.ZodString;
|
|
@@ -648,15 +649,15 @@ export declare const nodeReplBrowserBrokerResponseSchema: z.ZodDiscriminatedUnio
|
|
|
648
649
|
recording: z.ZodOptional<z.ZodObject<{
|
|
649
650
|
id: z.ZodString;
|
|
650
651
|
status: z.ZodEnum<{
|
|
651
|
-
running: "running";
|
|
652
|
-
completed: "completed";
|
|
653
652
|
failed: "failed";
|
|
653
|
+
running: "running";
|
|
654
654
|
cancelled: "cancelled";
|
|
655
|
+
completed: "completed";
|
|
655
656
|
}>;
|
|
656
657
|
phase: z.ZodEnum<{
|
|
657
|
-
completed: "completed";
|
|
658
658
|
failed: "failed";
|
|
659
659
|
cancelled: "cancelled";
|
|
660
|
+
completed: "completed";
|
|
660
661
|
preparing: "preparing";
|
|
661
662
|
capturing: "capturing";
|
|
662
663
|
finalizing: "finalizing";
|
|
@@ -73,15 +73,15 @@ export type BrowserRecordingArtifact = z.infer<typeof browserRecordingArtifactSc
|
|
|
73
73
|
export declare const browserRecordingJobSchema: z.ZodObject<{
|
|
74
74
|
id: z.ZodString;
|
|
75
75
|
status: z.ZodEnum<{
|
|
76
|
-
running: "running";
|
|
77
|
-
completed: "completed";
|
|
78
76
|
failed: "failed";
|
|
77
|
+
running: "running";
|
|
79
78
|
cancelled: "cancelled";
|
|
79
|
+
completed: "completed";
|
|
80
80
|
}>;
|
|
81
81
|
phase: z.ZodEnum<{
|
|
82
|
-
completed: "completed";
|
|
83
82
|
failed: "failed";
|
|
84
83
|
cancelled: "cancelled";
|
|
84
|
+
completed: "completed";
|
|
85
85
|
preparing: "preparing";
|
|
86
86
|
capturing: "capturing";
|
|
87
87
|
finalizing: "finalizing";
|
|
@@ -232,15 +232,15 @@ export declare const browserCommandResultSchema: z.ZodObject<{
|
|
|
232
232
|
recording: z.ZodOptional<z.ZodObject<{
|
|
233
233
|
id: z.ZodString;
|
|
234
234
|
status: z.ZodEnum<{
|
|
235
|
-
running: "running";
|
|
236
|
-
completed: "completed";
|
|
237
235
|
failed: "failed";
|
|
236
|
+
running: "running";
|
|
238
237
|
cancelled: "cancelled";
|
|
238
|
+
completed: "completed";
|
|
239
239
|
}>;
|
|
240
240
|
phase: z.ZodEnum<{
|
|
241
|
-
completed: "completed";
|
|
242
241
|
failed: "failed";
|
|
243
242
|
cancelled: "cancelled";
|
|
243
|
+
completed: "completed";
|
|
244
244
|
preparing: "preparing";
|
|
245
245
|
capturing: "capturing";
|
|
246
246
|
finalizing: "finalizing";
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const channelMentionSchema: z.ZodObject<{
|
|
3
|
+
type: z.ZodLiteral<"channelMention">;
|
|
4
|
+
refId: z.ZodString;
|
|
5
|
+
name: z.ZodString;
|
|
6
|
+
channel: z.ZodEnum<{
|
|
7
|
+
feishu: "feishu";
|
|
8
|
+
lark: "lark";
|
|
9
|
+
}>;
|
|
10
|
+
targetId: z.ZodString;
|
|
11
|
+
idType: z.ZodLiteral<"open_id">;
|
|
12
|
+
entityType: z.ZodEnum<{
|
|
13
|
+
unknown: "unknown";
|
|
14
|
+
user: "user";
|
|
15
|
+
bot: "bot";
|
|
16
|
+
}>;
|
|
17
|
+
}, z.core.$strict>;
|
|
18
|
+
export declare const channelContentPartSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
19
|
+
type: z.ZodLiteral<"text">;
|
|
20
|
+
text: z.ZodString;
|
|
21
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
22
|
+
type: z.ZodLiteral<"channelMention">;
|
|
23
|
+
refId: z.ZodString;
|
|
24
|
+
name: z.ZodString;
|
|
25
|
+
channel: z.ZodEnum<{
|
|
26
|
+
feishu: "feishu";
|
|
27
|
+
lark: "lark";
|
|
28
|
+
}>;
|
|
29
|
+
targetId: z.ZodString;
|
|
30
|
+
idType: z.ZodLiteral<"open_id">;
|
|
31
|
+
entityType: z.ZodEnum<{
|
|
32
|
+
unknown: "unknown";
|
|
33
|
+
user: "user";
|
|
34
|
+
bot: "bot";
|
|
35
|
+
}>;
|
|
36
|
+
}, z.core.$strict>]>;
|
|
37
|
+
export declare const channelContentPartsSchema: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
38
|
+
type: z.ZodLiteral<"text">;
|
|
39
|
+
text: z.ZodString;
|
|
40
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
41
|
+
type: z.ZodLiteral<"channelMention">;
|
|
42
|
+
refId: z.ZodString;
|
|
43
|
+
name: z.ZodString;
|
|
44
|
+
channel: z.ZodEnum<{
|
|
45
|
+
feishu: "feishu";
|
|
46
|
+
lark: "lark";
|
|
47
|
+
}>;
|
|
48
|
+
targetId: z.ZodString;
|
|
49
|
+
idType: z.ZodLiteral<"open_id">;
|
|
50
|
+
entityType: z.ZodEnum<{
|
|
51
|
+
unknown: "unknown";
|
|
52
|
+
user: "user";
|
|
53
|
+
bot: "bot";
|
|
54
|
+
}>;
|
|
55
|
+
}, z.core.$strict>]>>;
|
|
56
|
+
export type ChannelContentPart = z.infer<typeof channelContentPartSchema>;
|
|
57
|
+
export declare const channelReplyPartsSchema: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
58
|
+
type: z.ZodLiteral<"text">;
|
|
59
|
+
text: z.ZodString;
|
|
60
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
61
|
+
type: z.ZodLiteral<"mention">;
|
|
62
|
+
refId: z.ZodString;
|
|
63
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
64
|
+
type: z.ZodLiteral<"mentionName">;
|
|
65
|
+
name: z.ZodString;
|
|
66
|
+
candidateRef: z.ZodOptional<z.ZodString>;
|
|
67
|
+
}, z.core.$strict>]>>;
|
|
68
|
+
export declare const channelReplyRequestSchema: z.ZodObject<{
|
|
69
|
+
taskId: z.ZodString;
|
|
70
|
+
inputId: z.ZodString;
|
|
71
|
+
authorizationId: z.ZodOptional<z.ZodString>;
|
|
72
|
+
toolCallId: z.ZodString;
|
|
73
|
+
parts: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
74
|
+
type: z.ZodLiteral<"text">;
|
|
75
|
+
text: z.ZodString;
|
|
76
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
77
|
+
type: z.ZodLiteral<"mention">;
|
|
78
|
+
refId: z.ZodString;
|
|
79
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
80
|
+
type: z.ZodLiteral<"mentionName">;
|
|
81
|
+
name: z.ZodString;
|
|
82
|
+
candidateRef: z.ZodOptional<z.ZodString>;
|
|
83
|
+
}, z.core.$strict>]>>;
|
|
84
|
+
}, z.core.$strict>;
|
|
85
|
+
export declare const channelMentionClarificationSchema: z.ZodObject<{
|
|
86
|
+
status: z.ZodLiteral<"needs_clarification">;
|
|
87
|
+
unresolved: z.ZodArray<z.ZodObject<{
|
|
88
|
+
name: z.ZodString;
|
|
89
|
+
reason: z.ZodEnum<{
|
|
90
|
+
unavailable: "unavailable";
|
|
91
|
+
ambiguous: "ambiguous";
|
|
92
|
+
not_found: "not_found";
|
|
93
|
+
selection_expired: "selection_expired";
|
|
94
|
+
}>;
|
|
95
|
+
candidates: z.ZodArray<z.ZodObject<{
|
|
96
|
+
ref: z.ZodString;
|
|
97
|
+
name: z.ZodString;
|
|
98
|
+
label: z.ZodString;
|
|
99
|
+
kind: z.ZodEnum<{
|
|
100
|
+
unknown: "unknown";
|
|
101
|
+
user: "user";
|
|
102
|
+
bot: "bot";
|
|
103
|
+
}>;
|
|
104
|
+
}, z.core.$strict>>;
|
|
105
|
+
truncated: z.ZodBoolean;
|
|
106
|
+
}, z.core.$strict>>;
|
|
107
|
+
}, z.core.$strict>;
|
|
108
|
+
export declare const channelReplyResultSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
109
|
+
status: z.ZodEnum<{
|
|
110
|
+
unknown: "unknown";
|
|
111
|
+
failed: "failed";
|
|
112
|
+
sent: "sent";
|
|
113
|
+
invalidated: "invalidated";
|
|
114
|
+
}>;
|
|
115
|
+
deliveryId: z.ZodString;
|
|
116
|
+
providerMessageId: z.ZodOptional<z.ZodString>;
|
|
117
|
+
error: z.ZodOptional<z.ZodString>;
|
|
118
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
119
|
+
status: z.ZodLiteral<"needs_clarification">;
|
|
120
|
+
unresolved: z.ZodArray<z.ZodObject<{
|
|
121
|
+
name: z.ZodString;
|
|
122
|
+
reason: z.ZodEnum<{
|
|
123
|
+
unavailable: "unavailable";
|
|
124
|
+
ambiguous: "ambiguous";
|
|
125
|
+
not_found: "not_found";
|
|
126
|
+
selection_expired: "selection_expired";
|
|
127
|
+
}>;
|
|
128
|
+
candidates: z.ZodArray<z.ZodObject<{
|
|
129
|
+
ref: z.ZodString;
|
|
130
|
+
name: z.ZodString;
|
|
131
|
+
label: z.ZodString;
|
|
132
|
+
kind: z.ZodEnum<{
|
|
133
|
+
unknown: "unknown";
|
|
134
|
+
user: "user";
|
|
135
|
+
bot: "bot";
|
|
136
|
+
}>;
|
|
137
|
+
}, z.core.$strict>>;
|
|
138
|
+
truncated: z.ZodBoolean;
|
|
139
|
+
}, z.core.$strict>>;
|
|
140
|
+
}, z.core.$strict>]>;
|
|
141
|
+
export type ChannelReplyRequest = z.infer<typeof channelReplyRequestSchema>;
|
|
142
|
+
export type ChannelReplyResult = z.infer<typeof channelReplyResultSchema>;
|
|
143
|
+
export declare function channelContentText(parts: readonly ChannelContentPart[]): string;
|
|
144
|
+
/** 只从 Host 已验证的会话输入解析 ref;模型不得直接提供平台 ID。 */
|
|
145
|
+
export declare function resolveChannelReplyParts(parts: z.infer<typeof channelReplyPartsSchema>, source: readonly ChannelContentPart[]): ChannelContentPart[];
|
|
146
|
+
export declare const channelReplyHostRequestSchema: z.ZodObject<{
|
|
147
|
+
taskId: z.ZodString;
|
|
148
|
+
inputId: z.ZodString;
|
|
149
|
+
authorizationId: z.ZodOptional<z.ZodString>;
|
|
150
|
+
toolCallId: z.ZodString;
|
|
151
|
+
parts: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
152
|
+
type: z.ZodLiteral<"text">;
|
|
153
|
+
text: z.ZodString;
|
|
154
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
155
|
+
type: z.ZodLiteral<"mention">;
|
|
156
|
+
refId: z.ZodString;
|
|
157
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
158
|
+
type: z.ZodLiteral<"mentionName">;
|
|
159
|
+
name: z.ZodString;
|
|
160
|
+
candidateRef: z.ZodOptional<z.ZodString>;
|
|
161
|
+
}, z.core.$strict>]>>;
|
|
162
|
+
trace: z.ZodOptional<z.ZodObject<{
|
|
163
|
+
traceId: z.ZodOptional<z.ZodString>;
|
|
164
|
+
parentId: z.ZodOptional<z.ZodString>;
|
|
165
|
+
spanId: z.ZodOptional<z.ZodString>;
|
|
166
|
+
traceparent: z.ZodOptional<z.ZodString>;
|
|
167
|
+
}, z.core.$strict>>;
|
|
168
|
+
workspacePath: z.ZodString;
|
|
169
|
+
workspaceIdentity: z.ZodOptional<z.ZodString>;
|
|
170
|
+
remoteSessionId: z.ZodOptional<z.ZodString>;
|
|
171
|
+
}, z.core.$strict>;
|
|
172
|
+
export type ChannelReplyHostRequest = z.infer<typeof channelReplyHostRequestSchema>;
|
|
173
|
+
//# sourceMappingURL=channel-mention.d.ts.map
|