@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
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { dcodeProtocolTraceSchema } from "./dcode-protocol/trace.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
export const channelMentionSchema = z
|
|
4
|
+
.object({
|
|
5
|
+
type: z.literal("channelMention"),
|
|
6
|
+
refId: z.string().min(1).max(200),
|
|
7
|
+
name: z.string().min(1).max(200),
|
|
8
|
+
channel: z.enum(["feishu", "lark"]),
|
|
9
|
+
targetId: z
|
|
10
|
+
.string()
|
|
11
|
+
.max(128)
|
|
12
|
+
.regex(/^ou_[a-zA-Z0-9_-]+$/u),
|
|
13
|
+
idType: z.literal("open_id"),
|
|
14
|
+
entityType: z.enum(["user", "bot", "unknown"]),
|
|
15
|
+
})
|
|
16
|
+
.strict();
|
|
17
|
+
export const channelContentPartSchema = z.union([
|
|
18
|
+
z.object({ type: z.literal("text"), text: z.string().max(100_000) }).strict(),
|
|
19
|
+
channelMentionSchema,
|
|
20
|
+
]);
|
|
21
|
+
export const channelContentPartsSchema = z.array(channelContentPartSchema).max(200);
|
|
22
|
+
export const channelReplyPartsSchema = z
|
|
23
|
+
.array(z.union([
|
|
24
|
+
z.object({ type: z.literal("text"), text: z.string().max(2000) }).strict(),
|
|
25
|
+
z.object({ type: z.literal("mention"), refId: z.string().min(1).max(200) }).strict(),
|
|
26
|
+
z
|
|
27
|
+
.object({
|
|
28
|
+
type: z.literal("mentionName"),
|
|
29
|
+
name: z.string().trim().min(1).max(200),
|
|
30
|
+
candidateRef: z.string().min(1).max(200).optional(),
|
|
31
|
+
})
|
|
32
|
+
.strict(),
|
|
33
|
+
]))
|
|
34
|
+
.min(1)
|
|
35
|
+
.max(50);
|
|
36
|
+
export const channelReplyRequestSchema = z
|
|
37
|
+
.object({
|
|
38
|
+
taskId: z.string().min(1),
|
|
39
|
+
inputId: z.string().min(1),
|
|
40
|
+
authorizationId: z.string().min(1).optional(),
|
|
41
|
+
toolCallId: z.string().min(1),
|
|
42
|
+
parts: channelReplyPartsSchema,
|
|
43
|
+
})
|
|
44
|
+
.strict();
|
|
45
|
+
const channelDeliveryResultSchema = z
|
|
46
|
+
.object({
|
|
47
|
+
status: z.enum(["sent", "failed", "unknown", "invalidated"]),
|
|
48
|
+
deliveryId: z.string(),
|
|
49
|
+
providerMessageId: z.string().optional(),
|
|
50
|
+
error: z.string().optional(),
|
|
51
|
+
})
|
|
52
|
+
.strict();
|
|
53
|
+
export const channelMentionClarificationSchema = z
|
|
54
|
+
.object({
|
|
55
|
+
status: z.literal("needs_clarification"),
|
|
56
|
+
unresolved: z
|
|
57
|
+
.array(z
|
|
58
|
+
.object({
|
|
59
|
+
name: z.string().max(200),
|
|
60
|
+
reason: z.enum(["ambiguous", "not_found", "unavailable", "selection_expired"]),
|
|
61
|
+
candidates: z
|
|
62
|
+
.array(z
|
|
63
|
+
.object({
|
|
64
|
+
ref: z.string().max(200),
|
|
65
|
+
name: z.string().max(200),
|
|
66
|
+
label: z.string().max(250),
|
|
67
|
+
kind: z.enum(["user", "bot", "unknown"]),
|
|
68
|
+
})
|
|
69
|
+
.strict())
|
|
70
|
+
.max(10),
|
|
71
|
+
truncated: z.boolean(),
|
|
72
|
+
})
|
|
73
|
+
.strict())
|
|
74
|
+
.min(1)
|
|
75
|
+
.max(50),
|
|
76
|
+
})
|
|
77
|
+
.strict();
|
|
78
|
+
export const channelReplyResultSchema = z.union([
|
|
79
|
+
channelDeliveryResultSchema,
|
|
80
|
+
channelMentionClarificationSchema,
|
|
81
|
+
]);
|
|
82
|
+
export function channelContentText(parts) {
|
|
83
|
+
return parts.map((part) => (part.type === "text" ? part.text : `@${part.name}`)).join("");
|
|
84
|
+
}
|
|
85
|
+
/** 只从 Host 已验证的会话输入解析 ref;模型不得直接提供平台 ID。 */
|
|
86
|
+
export function resolveChannelReplyParts(parts, source) {
|
|
87
|
+
const targets = new Map();
|
|
88
|
+
for (const part of source) {
|
|
89
|
+
if (part.type !== "channelMention")
|
|
90
|
+
continue;
|
|
91
|
+
const target = channelMentionSchema.parse(part);
|
|
92
|
+
const previous = targets.get(target.refId);
|
|
93
|
+
if (previous && JSON.stringify(previous) !== JSON.stringify(target))
|
|
94
|
+
throw new Error("Conflicting channel mention reference");
|
|
95
|
+
targets.set(target.refId, target);
|
|
96
|
+
}
|
|
97
|
+
channelReplyPartsSchema.parse(parts);
|
|
98
|
+
const resolved = parts.map((part) => {
|
|
99
|
+
if (part.type === "text")
|
|
100
|
+
return part;
|
|
101
|
+
if (part.type === "mentionName")
|
|
102
|
+
throw new Error("Channel mention name must be resolved by Host");
|
|
103
|
+
const target = targets.get(part.refId);
|
|
104
|
+
if (!target)
|
|
105
|
+
throw new Error("Unknown channel mention reference");
|
|
106
|
+
return target;
|
|
107
|
+
});
|
|
108
|
+
if (!channelContentText(resolved).trim() || channelContentText(resolved).length > 2000)
|
|
109
|
+
throw new Error("Channel reply must contain 1–2000 characters");
|
|
110
|
+
return resolved;
|
|
111
|
+
}
|
|
112
|
+
export const channelReplyHostRequestSchema = channelReplyRequestSchema
|
|
113
|
+
.extend({
|
|
114
|
+
trace: dcodeProtocolTraceSchema.optional(),
|
|
115
|
+
workspacePath: z.string().min(1),
|
|
116
|
+
workspaceIdentity: z.string().optional(),
|
|
117
|
+
remoteSessionId: z.string().optional(),
|
|
118
|
+
})
|
|
119
|
+
.strict();
|
|
120
|
+
//# sourceMappingURL=channel-mention.js.map
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { ResourceUsageSnapshot, LoadCliMcpFromUserDirectoryRequest, LoadCliMcpFromUserDirectoryResult, MigrateLegacyCommonMcpRequest, MigrateLegacyCommonMcpResult, SaveCliMcpToUserDirectoryRequest } from "./index.js";
|
|
2
2
|
import type { OAuthStateRegistration } from "./oauth.js";
|
|
3
|
+
import type { WebRemoteControlContext, WebRemoteControlReconnectWorkspaceRequest, WebRemoteControlReconnectWorkspaceResult, WebRemoteControlStartOperationResult, WebRemoteControlStatus, WebRemoteControlTaskTarget, WebRemoteControlWorkspaceTarget } from "./web-remote-control.js";
|
|
3
4
|
import type { AppSettings, Locale } from "./protocol.js";
|
|
4
5
|
import type { StorageCleanRequest, StorageCleanResult, StorageUsageSnapshot } from "./storage.js";
|
|
5
6
|
import type { ArmsCustomEventPayload, ConfigureFinalArmsCustomEventE2ERequest, FinalArmsCustomEventE2EEntry, RendererTelemetryEventPayload, TelemetryRendererContext } from "./telemetry.js";
|
|
6
7
|
import type { RendererActionTraceBatchV1, RendererActionTraceConfigV1 } from "./rendererActionTrace.js";
|
|
7
8
|
import type { RendererHeapSample } from "./validation.js";
|
|
8
|
-
import type { CancelPendingRemoteConnectionRequest, BindRemoteWorkspaceSessionContextRequest, BotRemoteWorkspaceReconnectedEvent, BrowserViewScreenshotSurfacePreparePayload, BrowserViewScreenshotSurfaceReadyPayload, BrowserViewScreenshotSurfaceReleasePayload, BrowserViewCloseTabNotification, BrowserViewCloseTabRequest, BrowserViewResidencyReportPayload, BrowserViewResidencyTransitionPayload, BrowserViewRestoredTabShell, BrowserViewRestoreTabsRequest, BrowserViewViewportChangedPayload, ConnectRemoteRequest, DesktopCommandId, DesktopTitleBarTheme, DockerContainerInfo, EmbeddedBrowserOpenUrlRequest, EditorInfo, CreateTempTextAttachmentRequest, CreateTempTextAttachmentResult, SaveFileRequest, SaveFileResult, PrintPageToPdfResult, OpenInEditorOptions, PostUpdateReleaseNotesPayload, RemoteSessionClosedEvent, SSHConfigAliasOption, TaskNotificationPayload, WSLDistro, UpdateCheckResultPayload, UpdateStatePayload, DesktopZoomState, DesktopWindowChromeState, WindowControlsOverlayMetrics, WindowControlsOverlayReadyPayload } from "./platform.js";
|
|
9
|
+
import type { CancelPendingRemoteConnectionRequest, BindRemoteWorkspaceSessionContextRequest, BotRemoteWorkspaceReconnectedEvent, BrowserViewScreenshotSurfacePreparePayload, BrowserViewScreenshotSurfaceReadyPayload, BrowserViewScreenshotSurfaceReleasePayload, BrowserViewCloseTabNotification, BrowserViewCloseTabRequest, BrowserViewResidencyReportPayload, BrowserViewResidencyTransitionPayload, BrowserViewRestoredTabShell, BrowserViewRestoreTabsRequest, BrowserViewViewportChangedPayload, ConnectRemoteRequest, DesktopCommandId, DesktopTitleBarTheme, DockerContainerInfo, EmbeddedBrowserOpenUrlRequest, EmbeddedBrowserPermissionPromptEvent, EmbeddedBrowserPermissionResolveRequest, EmbeddedBrowserSitePermissionUpdateRequest, EmbeddedBrowserSitePermissionResetRequest, EmbeddedBrowserSitePermissionsSnapshot, EditorInfo, CreateTempTextAttachmentRequest, CreateTempTextAttachmentResult, MaterializeWorkflowArtifactFileRequest, MaterializeWorkflowArtifactFileResult, SaveFileRequest, SaveFileResult, PrintPageToPdfResult, OpenInEditorOptions, PostUpdateReleaseNotesPayload, RemoteSessionClosedEvent, SSHConfigAliasOption, TaskNotificationPayload, WSLDistro, UpdateCheckResultPayload, UpdateStatePayload, DesktopZoomState, DesktopWindowChromeState, WindowControlsOverlayMetrics, WindowControlsOverlayReadyPayload } from "./platform.js";
|
|
9
10
|
import type { BrowserViewportSize } from "./browser-use/command-metadata.js";
|
|
10
11
|
import type { CuaAccessibilitySettingsResult, OpenCuaPermissionOnboardingOptions, PrepareCuaHelperPermissionDragResult } from "./cuaAccessibilitySettings.js";
|
|
11
12
|
/** RPC 服务频道名。与 ServiceDescriptor.channelName 对应。 */
|
|
@@ -54,6 +55,8 @@ export declare const ServiceChannels: {
|
|
|
54
55
|
readonly ClientConfig: "client-config";
|
|
55
56
|
/** DCode 客户端场景配置服务 */
|
|
56
57
|
readonly ClientScenes: "client-scenes";
|
|
58
|
+
readonly CloudContent: "cloud-content";
|
|
59
|
+
readonly MarketingTouch: "marketing-touch";
|
|
57
60
|
/** Skills 管理服务 */
|
|
58
61
|
readonly Skills: "skills";
|
|
59
62
|
/** SSH 远程 skills 同步服务 */
|
|
@@ -66,6 +69,10 @@ export declare const ServiceChannels: {
|
|
|
66
69
|
readonly Plugins: "plugins";
|
|
67
70
|
/** 设置页插件管理服务(UI 平台能力面收敛,不再直触 dcodeAgentService) */
|
|
68
71
|
readonly PluginManagement: "plugin-management";
|
|
72
|
+
/** 插件 UI 沙箱桥:host 读取 ui:// 资源并向 main 登记、代理 UI 发起的工具调用 */
|
|
73
|
+
readonly PluginUiBridge: "plugin-ui-bridge";
|
|
74
|
+
readonly PluginUiSampling: "plugin-ui-sampling";
|
|
75
|
+
readonly PluginUiAppTools: "plugin-ui-app-tools";
|
|
69
76
|
/** Subagents 管理服务 */
|
|
70
77
|
readonly Subagents: "subagents";
|
|
71
78
|
/** Commands 管理服务 */
|
|
@@ -74,6 +81,8 @@ export declare const ServiceChannels: {
|
|
|
74
81
|
readonly Hooks: "hooks";
|
|
75
82
|
/** Memory 管理服务 */
|
|
76
83
|
readonly Memory: "memory";
|
|
84
|
+
/** OutputStyle 管理服务 */
|
|
85
|
+
readonly OutputStyle: "output-style";
|
|
77
86
|
/** 首次启动设置同步服务 */
|
|
78
87
|
readonly SettingsSync: "settings-sync";
|
|
79
88
|
/** Bots 远程聊天控制服务 */
|
|
@@ -84,12 +93,21 @@ export declare const ServiceChannels: {
|
|
|
84
93
|
readonly PromptAttachmentTransfer: "prompt-attachment-transfer";
|
|
85
94
|
/** 闲时任务管理服务(与 automation 服务面独立) */
|
|
86
95
|
readonly OffPeakTask: "off-peak-task";
|
|
96
|
+
/** Highspeed 加速卡抽取与分享服务 */
|
|
97
|
+
readonly HighspeedCard: "highspeed-card";
|
|
87
98
|
/** Onboarding 完成记录服务(本地持久化,后续上传服务器) */
|
|
88
99
|
readonly OnboardingRecord: "onboarding-record";
|
|
89
100
|
};
|
|
90
101
|
export type ServiceChannelName = (typeof ServiceChannels)[keyof typeof ServiceChannels];
|
|
91
102
|
/** Electron IPC 频道名。仅在 preload ↔ main 之间使用。 */
|
|
92
103
|
export declare const PlatformChannels: {
|
|
104
|
+
/** renderer → main:释放插件 UI 沙箱(关闭 ports、撤 protocol handler、清 partition) */
|
|
105
|
+
readonly PluginSandboxDispose: "dcode:plugin-sandbox-dispose";
|
|
106
|
+
readonly PluginSandboxCopyImage: "dcode:plugin-sandbox-copy-image";
|
|
107
|
+
/** renderer → main:一次性消费插件 UI 沙箱 guest 的用户手势 token */
|
|
108
|
+
readonly PluginSandboxConsumeUserGesture: "dcode:plugin-sandbox-consume-user-gesture";
|
|
109
|
+
/** renderer → main:查询自身 webContents id,作为沙箱登记的 owner */
|
|
110
|
+
readonly PluginSandboxOwnerWebContentsId: "dcode:plugin-sandbox-owner-web-contents-id";
|
|
93
111
|
/** 打开系统目录选择框 */
|
|
94
112
|
readonly SelectDirectory: "dcode:select-directory";
|
|
95
113
|
/** 打开系统文件选择框 */
|
|
@@ -98,6 +116,8 @@ export declare const PlatformChannels: {
|
|
|
98
116
|
readonly SelectFiles: "dcode:select-files";
|
|
99
117
|
/** Renderer → Main:写入宿主 ~/.dcode 临时文本附件 */
|
|
100
118
|
readonly CreateTempTextAttachment: "dcode:create-temp-text-attachment";
|
|
119
|
+
/** Renderer → Main:把 dwf 产物某一版的字节落成本机副本(「作为文件打开」) */
|
|
120
|
+
readonly MaterializeWorkflowArtifactFile: "dcode:materialize-workflow-artifact-file";
|
|
101
121
|
/** Renderer → Main:通过原生另存为对话框保存文件 */
|
|
102
122
|
readonly SaveFile: "dcode:save-file";
|
|
103
123
|
/** Renderer → Main:用 Chromium 打印引擎把当前页面 print 媒体版面导出为 PDF */
|
|
@@ -116,6 +136,15 @@ export declare const PlatformChannels: {
|
|
|
116
136
|
readonly CancelPendingRemoteConnection: "dcode:cancel-pending-remote-connection";
|
|
117
137
|
/** Renderer → Main:绑定远程 logical session 的 canonical workspace context */
|
|
118
138
|
readonly BindRemoteWorkspaceSessionContext: "dcode:bind-remote-workspace-session-context";
|
|
139
|
+
/** 为当前 workspace 开启 Web 远程控制 */
|
|
140
|
+
readonly StartWebRemoteControl: "dcode:start-web-remote-control";
|
|
141
|
+
readonly ResetWebRemoteControlPairing: "dcode:reset-web-remote-control-pairing";
|
|
142
|
+
/** 关闭当前窗口的 Web 远程控制 */
|
|
143
|
+
readonly StopWebRemoteControl: "dcode:stop-web-remote-control";
|
|
144
|
+
/** 查询当前窗口的 Web 远程控制状态 */
|
|
145
|
+
readonly GetWebRemoteControlStatus: "dcode:get-web-remote-control-status";
|
|
146
|
+
/** Main → Renderer:当前窗口 Web 远程控制状态变化 */
|
|
147
|
+
readonly WebRemoteControlStatusChanged: "dcode:web-remote-control-status-changed";
|
|
119
148
|
/** 释放当前窗口里的远程 session */
|
|
120
149
|
readonly DisposeRemoteSession: "dcode:dispose-remote-session";
|
|
121
150
|
/** Renderer → Main:检查本机 Docker daemon 是否可用 */
|
|
@@ -130,10 +159,18 @@ export declare const PlatformChannels: {
|
|
|
130
159
|
readonly LoadMcpFromUserDirectory: "dcode:load-mcp-from-user-directory";
|
|
131
160
|
/** Renderer → Main:保存 CLI MCP 配置到用户目录 */
|
|
132
161
|
readonly SaveMcpToUserDirectory: "dcode:save-mcp-to-user-directory";
|
|
162
|
+
/** Renderer → Main:查询"关闭驻留托盘"能力(Linux 置灰判断;spec:docs/desktop/linux-close-to-tray.md) */
|
|
163
|
+
readonly GetCloseToTrayCapability: "dcode:get-close-to-tray-capability";
|
|
133
164
|
/** Renderer 日志转发到 main 进程统一存储 */
|
|
134
165
|
readonly Log: "dcode:log";
|
|
135
166
|
/** Renderer → Main:同步当前窗口所有 tab 的 workspace 路径 */
|
|
136
167
|
readonly SyncWindowTabs: "dcode:sync-window-tabs";
|
|
168
|
+
/** Renderer → Main:同步当前窗口可供 Web 远程控制切换的 workspace */
|
|
169
|
+
readonly SyncWebRemoteControlWorkspaces: "dcode:sync-web-remote-control-workspaces";
|
|
170
|
+
/** Renderer → Main:同步当前窗口可供 Web 远程控制展示的 task 快照 */
|
|
171
|
+
readonly SyncWebRemoteControlTasks: "dcode:sync-web-remote-control-tasks";
|
|
172
|
+
/** Main → Renderer:手机端请求重连当前窗口里的远程 workspace */
|
|
173
|
+
readonly WebRemoteControlReconnectWorkspace: "dcode:web-remote-control-reconnect-workspace";
|
|
137
174
|
/** Renderer → Main:同步当前窗口的未读 task 数 */
|
|
138
175
|
readonly SyncWindowUnreadCount: "dcode:sync-window-unread-count";
|
|
139
176
|
/** Renderer → Main:当前窗口 active task,只更新 Main 的临时焦点映射。 */
|
|
@@ -150,6 +187,10 @@ export declare const PlatformChannels: {
|
|
|
150
187
|
readonly CloseActiveContextRequest: "dcode:close-active-context-request";
|
|
151
188
|
/** Main → Renderer:内置 webview 请求打开新的浏览器 tab */
|
|
152
189
|
readonly OpenBrowserUrl: "dcode:open-browser-url";
|
|
190
|
+
/** Main → Renderer:内置浏览器网页权限/屏幕共享源/设备选择弹窗请求 */
|
|
191
|
+
readonly EmbeddedBrowserPermissionPrompt: "dcode:embedded-browser-permission-prompt";
|
|
192
|
+
/** Renderer → Main:用户对内置浏览器权限弹窗的决策回传 */
|
|
193
|
+
readonly EmbeddedBrowserPermissionResolve: "dcode:embedded-browser-permission-resolve";
|
|
153
194
|
/** Main → Renderer:agent 首次 browser 命令建好受控 view,通知 renderer 自动开 browser-use tab */
|
|
154
195
|
readonly BrowserViewReady: "dcode:browser-view-ready";
|
|
155
196
|
/** Main → Renderer:agent 正在操作某个 browser-use tab,renderer 临时显示状态图标 */
|
|
@@ -193,6 +234,8 @@ export declare const PlatformChannels: {
|
|
|
193
234
|
/** 获取资源管理器快照(CPU / 内存,按基础服务、内置插件、社区插件归类) */
|
|
194
235
|
readonly GetResourceUsageSnapshot: "dcode:get-resource-usage-snapshot";
|
|
195
236
|
readonly SetResourceUsageSamplingActive: "dcode:set-resource-usage-sampling-active";
|
|
237
|
+
readonly GetNetworkCaptureSnapshot: "dcode:get-network-capture-snapshot";
|
|
238
|
+
readonly ClearNetworkCapture: "dcode:clear-network-capture";
|
|
196
239
|
/** 打开资源管理器窗口(其他窗口触发) */
|
|
197
240
|
readonly OpenResourceManager: "dcode:open-resource-manager";
|
|
198
241
|
/** 资源管理器「存储」tab:开始扫描本机 .dcode 占用(main 持有 StorageService,Worker 线程遍历) */
|
|
@@ -301,6 +344,14 @@ export declare const PlatformChannels: {
|
|
|
301
344
|
readonly ImportChromeBrowserData: "dcode:import-chrome-browser-data";
|
|
302
345
|
/** Renderer → Main:清理内置浏览器缓存或全部站点数据。 */
|
|
303
346
|
readonly ClearEmbeddedBrowserData: "dcode:clear-embedded-browser-data";
|
|
347
|
+
/** Renderer → Main:读取内置浏览器站点权限记录(设置页「网站权限」) */
|
|
348
|
+
readonly GetEmbeddedBrowserSitePermissions: "dcode:get-embedded-browser-site-permissions";
|
|
349
|
+
/** Renderer → Main:修改/删除单条站点权限(state="ask" 表示删除) */
|
|
350
|
+
readonly SetEmbeddedBrowserSitePermission: "dcode:set-embedded-browser-site-permission";
|
|
351
|
+
/** Renderer → Main:清空全部站点权限记录 */
|
|
352
|
+
readonly ClearEmbeddedBrowserSitePermissions: "dcode:clear-embedded-browser-site-permissions";
|
|
353
|
+
/** Renderer → Main:重置单个站点的全部权限记录(站点权限设置标签页「重置」) */
|
|
354
|
+
readonly ResetEmbeddedBrowserSitePermission: "dcode:reset-embedded-browser-site-permission";
|
|
304
355
|
/** Main → Renderer:通知有新版本已下载完毕,可以重启安装 */
|
|
305
356
|
readonly UpdateReady: "dcode:update-ready";
|
|
306
357
|
/** Main → Renderer:用户手动点击"检查更新"后的结果反馈(toast 用) */
|
|
@@ -376,6 +427,14 @@ export declare const CodingPlanWebviewChannels: {
|
|
|
376
427
|
/** 官网页购买成功后通知 App 刷新 entitlements 并关闭 webview。 */
|
|
377
428
|
readonly PurchaseComplete: "dcode:coding-plan-purchase-complete";
|
|
378
429
|
};
|
|
430
|
+
/**
|
|
431
|
+
* 插件 UI 沙箱 guest(partition=plugin-sandbox:<id>)的 main → guest preload 频道。
|
|
432
|
+
* preload 只把 MessagePort 组经 window.postMessage 转交给受信 shell,不暴露任何 contextBridge API。
|
|
433
|
+
*/
|
|
434
|
+
export declare const PluginSandboxChannels: {
|
|
435
|
+
/** main → guest:{ sandboxId, initId, names } + port1[],shell 据此建立宿主端口 */
|
|
436
|
+
readonly Init: "dcode:plugin-sandbox-init";
|
|
437
|
+
};
|
|
379
438
|
/** 购买完成回传 payload。provider 与官网 CodingPlanProvider / auth-ready 事件 detail.provider 同构。 */
|
|
380
439
|
export interface CodingPlanPurchaseCompletePayload {
|
|
381
440
|
provider: "dcode" | "bigmodel";
|
|
@@ -407,6 +466,8 @@ export declare const InternalChannels: {
|
|
|
407
466
|
readonly ScopedServicePortReady: "dcode:scoped-service-port-ready";
|
|
408
467
|
/** preload → renderer:主进程已确认系统通知展示,renderer 可播放提示音 */
|
|
409
468
|
readonly TaskNotificationSound: "dcode:task-notification-sound";
|
|
469
|
+
/** main → 宿主 renderer:插件 UI 沙箱的 MessagePort 组(port2[]),payload { sandboxId, initId, names } */
|
|
470
|
+
readonly PluginSandboxPorts: "dcode:plugin-sandbox-ports";
|
|
410
471
|
};
|
|
411
472
|
/** @deprecated `/ws` 已忽略该头;保留常量仅供旧客户端兼容。 */
|
|
412
473
|
export declare const DCODE_RPC_CLIENT_MODE_HEADER = "x-dcode-rpc-client-mode";
|
|
@@ -463,6 +524,8 @@ export declare const HostMessageTypes: {
|
|
|
463
524
|
readonly BrowserExecuteResult: "browser-execute-result";
|
|
464
525
|
/** main → host:本地视频 canonical path 授权结果 */
|
|
465
526
|
readonly LocalMediaPreviewPathAuthorizeResult: "local-media-preview-path-authorize-result";
|
|
527
|
+
/** main → host:插件 UI 沙箱登记结果(PluginSandboxRegisterResultPayload) */
|
|
528
|
+
readonly PluginSandboxRegisterResult: "plugin-sandbox-register-result";
|
|
466
529
|
/** Main → Host:全局前台 DCode 窗口派生的 producer focus fact。 */
|
|
467
530
|
readonly CuaPipFocusChanged: "cua-pip-focus-changed";
|
|
468
531
|
/** main → host:要求 Host 现读本地 Source,并同步指定 Remote Environment。 */
|
|
@@ -470,6 +533,7 @@ export declare const HostMessageTypes: {
|
|
|
470
533
|
/** main → host:资源管理器请求 Host 采样其后代进程(Agent / MCP / 终端)的 CPU 与内存 */
|
|
471
534
|
readonly ResourceUsageSnapshotRequest: "resource-usage-snapshot-request";
|
|
472
535
|
readonly ResourceUsageSnapshotCancel: "resource-usage-snapshot-cancel";
|
|
536
|
+
readonly NetworkCapture: "network-capture";
|
|
473
537
|
};
|
|
474
538
|
/** host process → main process 的反馈消息类型 */
|
|
475
539
|
export declare const HostResponseTypes: {
|
|
@@ -505,6 +569,7 @@ export declare const HostResponseTypes: {
|
|
|
505
569
|
readonly SessionCreateTelemetry: "session-create-telemetry";
|
|
506
570
|
/** host → main:资源管理器采样结果(按 requestId 关联) */
|
|
507
571
|
readonly ResourceUsageSnapshotResult: "resource-usage-snapshot-result";
|
|
572
|
+
readonly NetworkCaptureBatch: "network-capture-batch";
|
|
508
573
|
/** host 内当前正在执行 prompt 的 agent session 数量变化 */
|
|
509
574
|
readonly AgentRunningTaskCountChanged: "agent-running-task-count-changed";
|
|
510
575
|
/** host 内指定 workspace 当前仍未 terminal 的 task 数量变化 */
|
|
@@ -559,6 +624,8 @@ export declare const HostResponseTypes: {
|
|
|
559
624
|
readonly BrowserExecuteRequest: "browser-execute-request";
|
|
560
625
|
/** host → main:请求授权 Agent 已精确校验的本地视频路径 */
|
|
561
626
|
readonly LocalMediaPreviewPathAuthorizeRequest: "local-media-preview-path-authorize-request";
|
|
627
|
+
/** host → main:登记已校验的插件 UI HTML 与 CSP,换取 sandbox 句柄(PluginSandboxRegisterRequestPayload) */
|
|
628
|
+
readonly PluginSandboxRegisterRequest: "plugin-sandbox-register-request";
|
|
562
629
|
/** host → main:RPC 网络遥测批次(channel.command 成功率/耗时) */
|
|
563
630
|
readonly NetworkTelemetryBatch: "network-telemetry-batch";
|
|
564
631
|
/** host → main:本地 Provisioning Source 成功持久化。 */
|
|
@@ -584,6 +651,10 @@ export interface PlatformChannelMap {
|
|
|
584
651
|
request: CreateTempTextAttachmentRequest;
|
|
585
652
|
response: CreateTempTextAttachmentResult;
|
|
586
653
|
};
|
|
654
|
+
[PlatformChannels.MaterializeWorkflowArtifactFile]: {
|
|
655
|
+
request: MaterializeWorkflowArtifactFileRequest;
|
|
656
|
+
response: MaterializeWorkflowArtifactFileResult;
|
|
657
|
+
};
|
|
587
658
|
[PlatformChannels.SaveFile]: {
|
|
588
659
|
request: SaveFileRequest;
|
|
589
660
|
response: SaveFileResult;
|
|
@@ -638,6 +709,26 @@ export interface PlatformChannelMap {
|
|
|
638
709
|
request: BindRemoteWorkspaceSessionContextRequest;
|
|
639
710
|
response: void;
|
|
640
711
|
};
|
|
712
|
+
[PlatformChannels.StartWebRemoteControl]: {
|
|
713
|
+
request: WebRemoteControlContext;
|
|
714
|
+
response: WebRemoteControlStartOperationResult;
|
|
715
|
+
};
|
|
716
|
+
[PlatformChannels.ResetWebRemoteControlPairing]: {
|
|
717
|
+
request: WebRemoteControlContext;
|
|
718
|
+
response: WebRemoteControlStartOperationResult;
|
|
719
|
+
};
|
|
720
|
+
[PlatformChannels.StopWebRemoteControl]: {
|
|
721
|
+
request: void;
|
|
722
|
+
response: void;
|
|
723
|
+
};
|
|
724
|
+
[PlatformChannels.GetWebRemoteControlStatus]: {
|
|
725
|
+
request: void;
|
|
726
|
+
response: WebRemoteControlStatus;
|
|
727
|
+
};
|
|
728
|
+
[PlatformChannels.WebRemoteControlStatusChanged]: {
|
|
729
|
+
request: WebRemoteControlStatus;
|
|
730
|
+
response: void;
|
|
731
|
+
};
|
|
641
732
|
[PlatformChannels.DisposeRemoteSession]: {
|
|
642
733
|
request: string;
|
|
643
734
|
response: void;
|
|
@@ -680,6 +771,18 @@ export interface PlatformChannelMap {
|
|
|
680
771
|
};
|
|
681
772
|
response: void;
|
|
682
773
|
};
|
|
774
|
+
[PlatformChannels.SyncWebRemoteControlWorkspaces]: {
|
|
775
|
+
request: WebRemoteControlWorkspaceTarget[];
|
|
776
|
+
response: void;
|
|
777
|
+
};
|
|
778
|
+
[PlatformChannels.SyncWebRemoteControlTasks]: {
|
|
779
|
+
request: WebRemoteControlTaskTarget[];
|
|
780
|
+
response: void;
|
|
781
|
+
};
|
|
782
|
+
[PlatformChannels.WebRemoteControlReconnectWorkspace]: {
|
|
783
|
+
request: WebRemoteControlReconnectWorkspaceRequest;
|
|
784
|
+
response: WebRemoteControlReconnectWorkspaceResult;
|
|
785
|
+
};
|
|
683
786
|
[PlatformChannels.SyncWindowUnreadCount]: {
|
|
684
787
|
request: number;
|
|
685
788
|
response: void;
|
|
@@ -726,6 +829,30 @@ export interface PlatformChannelMap {
|
|
|
726
829
|
request: EmbeddedBrowserOpenUrlRequest;
|
|
727
830
|
response: void;
|
|
728
831
|
};
|
|
832
|
+
[PlatformChannels.EmbeddedBrowserPermissionPrompt]: {
|
|
833
|
+
request: EmbeddedBrowserPermissionPromptEvent;
|
|
834
|
+
response: void;
|
|
835
|
+
};
|
|
836
|
+
[PlatformChannels.EmbeddedBrowserPermissionResolve]: {
|
|
837
|
+
request: EmbeddedBrowserPermissionResolveRequest;
|
|
838
|
+
response: void;
|
|
839
|
+
};
|
|
840
|
+
[PlatformChannels.GetEmbeddedBrowserSitePermissions]: {
|
|
841
|
+
request: void;
|
|
842
|
+
response: EmbeddedBrowserSitePermissionsSnapshot;
|
|
843
|
+
};
|
|
844
|
+
[PlatformChannels.SetEmbeddedBrowserSitePermission]: {
|
|
845
|
+
request: EmbeddedBrowserSitePermissionUpdateRequest;
|
|
846
|
+
response: EmbeddedBrowserSitePermissionsSnapshot;
|
|
847
|
+
};
|
|
848
|
+
[PlatformChannels.ClearEmbeddedBrowserSitePermissions]: {
|
|
849
|
+
request: void;
|
|
850
|
+
response: EmbeddedBrowserSitePermissionsSnapshot;
|
|
851
|
+
};
|
|
852
|
+
[PlatformChannels.ResetEmbeddedBrowserSitePermission]: {
|
|
853
|
+
request: EmbeddedBrowserSitePermissionResetRequest;
|
|
854
|
+
response: EmbeddedBrowserSitePermissionsSnapshot;
|
|
855
|
+
};
|
|
729
856
|
[PlatformChannels.BrowserViewReady]: {
|
|
730
857
|
request: {
|
|
731
858
|
workspaceKey: string;
|
|
@@ -47,6 +47,8 @@ export const ServiceChannels = {
|
|
|
47
47
|
ClientConfig: "client-config",
|
|
48
48
|
/** DCode 客户端场景配置服务 */
|
|
49
49
|
ClientScenes: "client-scenes",
|
|
50
|
+
CloudContent: "cloud-content",
|
|
51
|
+
MarketingTouch: "marketing-touch",
|
|
50
52
|
/** Skills 管理服务 */
|
|
51
53
|
Skills: "skills",
|
|
52
54
|
/** SSH 远程 skills 同步服务 */
|
|
@@ -59,6 +61,10 @@ export const ServiceChannels = {
|
|
|
59
61
|
Plugins: "plugins",
|
|
60
62
|
/** 设置页插件管理服务(UI 平台能力面收敛,不再直触 dcodeAgentService) */
|
|
61
63
|
PluginManagement: "plugin-management",
|
|
64
|
+
/** 插件 UI 沙箱桥:host 读取 ui:// 资源并向 main 登记、代理 UI 发起的工具调用 */
|
|
65
|
+
PluginUiBridge: "plugin-ui-bridge",
|
|
66
|
+
PluginUiSampling: "plugin-ui-sampling",
|
|
67
|
+
PluginUiAppTools: "plugin-ui-app-tools",
|
|
62
68
|
/** Subagents 管理服务 */
|
|
63
69
|
Subagents: "subagents",
|
|
64
70
|
/** Commands 管理服务 */
|
|
@@ -67,6 +73,8 @@ export const ServiceChannels = {
|
|
|
67
73
|
Hooks: "hooks",
|
|
68
74
|
/** Memory 管理服务 */
|
|
69
75
|
Memory: "memory",
|
|
76
|
+
/** OutputStyle 管理服务 */
|
|
77
|
+
OutputStyle: "output-style",
|
|
70
78
|
/** 首次启动设置同步服务 */
|
|
71
79
|
SettingsSync: "settings-sync",
|
|
72
80
|
/** Bots 远程聊天控制服务 */
|
|
@@ -77,6 +85,8 @@ export const ServiceChannels = {
|
|
|
77
85
|
PromptAttachmentTransfer: "prompt-attachment-transfer",
|
|
78
86
|
/** 闲时任务管理服务(与 automation 服务面独立) */
|
|
79
87
|
OffPeakTask: "off-peak-task",
|
|
88
|
+
/** Highspeed 加速卡抽取与分享服务 */
|
|
89
|
+
HighspeedCard: "highspeed-card",
|
|
80
90
|
/** Onboarding 完成记录服务(本地持久化,后续上传服务器) */
|
|
81
91
|
OnboardingRecord: "onboarding-record",
|
|
82
92
|
};
|
|
@@ -85,6 +95,13 @@ export const ServiceChannels = {
|
|
|
85
95
|
// ============================================================================
|
|
86
96
|
/** Electron IPC 频道名。仅在 preload ↔ main 之间使用。 */
|
|
87
97
|
export const PlatformChannels = {
|
|
98
|
+
/** renderer → main:释放插件 UI 沙箱(关闭 ports、撤 protocol handler、清 partition) */
|
|
99
|
+
PluginSandboxDispose: "dcode:plugin-sandbox-dispose",
|
|
100
|
+
PluginSandboxCopyImage: "dcode:plugin-sandbox-copy-image",
|
|
101
|
+
/** renderer → main:一次性消费插件 UI 沙箱 guest 的用户手势 token */
|
|
102
|
+
PluginSandboxConsumeUserGesture: "dcode:plugin-sandbox-consume-user-gesture",
|
|
103
|
+
/** renderer → main:查询自身 webContents id,作为沙箱登记的 owner */
|
|
104
|
+
PluginSandboxOwnerWebContentsId: "dcode:plugin-sandbox-owner-web-contents-id",
|
|
88
105
|
/** 打开系统目录选择框 */
|
|
89
106
|
SelectDirectory: "dcode:select-directory",
|
|
90
107
|
/** 打开系统文件选择框 */
|
|
@@ -93,6 +110,8 @@ export const PlatformChannels = {
|
|
|
93
110
|
SelectFiles: "dcode:select-files",
|
|
94
111
|
/** Renderer → Main:写入宿主 ~/.dcode 临时文本附件 */
|
|
95
112
|
CreateTempTextAttachment: "dcode:create-temp-text-attachment",
|
|
113
|
+
/** Renderer → Main:把 dwf 产物某一版的字节落成本机副本(「作为文件打开」) */
|
|
114
|
+
MaterializeWorkflowArtifactFile: "dcode:materialize-workflow-artifact-file",
|
|
96
115
|
/** Renderer → Main:通过原生另存为对话框保存文件 */
|
|
97
116
|
SaveFile: "dcode:save-file",
|
|
98
117
|
/** Renderer → Main:用 Chromium 打印引擎把当前页面 print 媒体版面导出为 PDF */
|
|
@@ -111,6 +130,15 @@ export const PlatformChannels = {
|
|
|
111
130
|
CancelPendingRemoteConnection: "dcode:cancel-pending-remote-connection",
|
|
112
131
|
/** Renderer → Main:绑定远程 logical session 的 canonical workspace context */
|
|
113
132
|
BindRemoteWorkspaceSessionContext: "dcode:bind-remote-workspace-session-context",
|
|
133
|
+
/** 为当前 workspace 开启 Web 远程控制 */
|
|
134
|
+
StartWebRemoteControl: "dcode:start-web-remote-control",
|
|
135
|
+
ResetWebRemoteControlPairing: "dcode:reset-web-remote-control-pairing",
|
|
136
|
+
/** 关闭当前窗口的 Web 远程控制 */
|
|
137
|
+
StopWebRemoteControl: "dcode:stop-web-remote-control",
|
|
138
|
+
/** 查询当前窗口的 Web 远程控制状态 */
|
|
139
|
+
GetWebRemoteControlStatus: "dcode:get-web-remote-control-status",
|
|
140
|
+
/** Main → Renderer:当前窗口 Web 远程控制状态变化 */
|
|
141
|
+
WebRemoteControlStatusChanged: "dcode:web-remote-control-status-changed",
|
|
114
142
|
/** 释放当前窗口里的远程 session */
|
|
115
143
|
DisposeRemoteSession: "dcode:dispose-remote-session",
|
|
116
144
|
/** Renderer → Main:检查本机 Docker daemon 是否可用 */
|
|
@@ -125,10 +153,18 @@ export const PlatformChannels = {
|
|
|
125
153
|
LoadMcpFromUserDirectory: "dcode:load-mcp-from-user-directory",
|
|
126
154
|
/** Renderer → Main:保存 CLI MCP 配置到用户目录 */
|
|
127
155
|
SaveMcpToUserDirectory: "dcode:save-mcp-to-user-directory",
|
|
156
|
+
/** Renderer → Main:查询"关闭驻留托盘"能力(Linux 置灰判断;spec:docs/desktop/linux-close-to-tray.md) */
|
|
157
|
+
GetCloseToTrayCapability: "dcode:get-close-to-tray-capability",
|
|
128
158
|
/** Renderer 日志转发到 main 进程统一存储 */
|
|
129
159
|
Log: "dcode:log",
|
|
130
160
|
/** Renderer → Main:同步当前窗口所有 tab 的 workspace 路径 */
|
|
131
161
|
SyncWindowTabs: "dcode:sync-window-tabs",
|
|
162
|
+
/** Renderer → Main:同步当前窗口可供 Web 远程控制切换的 workspace */
|
|
163
|
+
SyncWebRemoteControlWorkspaces: "dcode:sync-web-remote-control-workspaces",
|
|
164
|
+
/** Renderer → Main:同步当前窗口可供 Web 远程控制展示的 task 快照 */
|
|
165
|
+
SyncWebRemoteControlTasks: "dcode:sync-web-remote-control-tasks",
|
|
166
|
+
/** Main → Renderer:手机端请求重连当前窗口里的远程 workspace */
|
|
167
|
+
WebRemoteControlReconnectWorkspace: "dcode:web-remote-control-reconnect-workspace",
|
|
132
168
|
/** Renderer → Main:同步当前窗口的未读 task 数 */
|
|
133
169
|
SyncWindowUnreadCount: "dcode:sync-window-unread-count",
|
|
134
170
|
/** Renderer → Main:当前窗口 active task,只更新 Main 的临时焦点映射。 */
|
|
@@ -145,6 +181,10 @@ export const PlatformChannels = {
|
|
|
145
181
|
CloseActiveContextRequest: "dcode:close-active-context-request",
|
|
146
182
|
/** Main → Renderer:内置 webview 请求打开新的浏览器 tab */
|
|
147
183
|
OpenBrowserUrl: "dcode:open-browser-url",
|
|
184
|
+
/** Main → Renderer:内置浏览器网页权限/屏幕共享源/设备选择弹窗请求 */
|
|
185
|
+
EmbeddedBrowserPermissionPrompt: "dcode:embedded-browser-permission-prompt",
|
|
186
|
+
/** Renderer → Main:用户对内置浏览器权限弹窗的决策回传 */
|
|
187
|
+
EmbeddedBrowserPermissionResolve: "dcode:embedded-browser-permission-resolve",
|
|
148
188
|
/** Main → Renderer:agent 首次 browser 命令建好受控 view,通知 renderer 自动开 browser-use tab */
|
|
149
189
|
BrowserViewReady: "dcode:browser-view-ready",
|
|
150
190
|
/** Main → Renderer:agent 正在操作某个 browser-use tab,renderer 临时显示状态图标 */
|
|
@@ -188,6 +228,8 @@ export const PlatformChannels = {
|
|
|
188
228
|
/** 获取资源管理器快照(CPU / 内存,按基础服务、内置插件、社区插件归类) */
|
|
189
229
|
GetResourceUsageSnapshot: "dcode:get-resource-usage-snapshot",
|
|
190
230
|
SetResourceUsageSamplingActive: "dcode:set-resource-usage-sampling-active",
|
|
231
|
+
GetNetworkCaptureSnapshot: "dcode:get-network-capture-snapshot",
|
|
232
|
+
ClearNetworkCapture: "dcode:clear-network-capture",
|
|
191
233
|
/** 打开资源管理器窗口(其他窗口触发) */
|
|
192
234
|
OpenResourceManager: "dcode:open-resource-manager",
|
|
193
235
|
/** 资源管理器「存储」tab:开始扫描本机 .dcode 占用(main 持有 StorageService,Worker 线程遍历) */
|
|
@@ -296,6 +338,14 @@ export const PlatformChannels = {
|
|
|
296
338
|
ImportChromeBrowserData: "dcode:import-chrome-browser-data",
|
|
297
339
|
/** Renderer → Main:清理内置浏览器缓存或全部站点数据。 */
|
|
298
340
|
ClearEmbeddedBrowserData: "dcode:clear-embedded-browser-data",
|
|
341
|
+
/** Renderer → Main:读取内置浏览器站点权限记录(设置页「网站权限」) */
|
|
342
|
+
GetEmbeddedBrowserSitePermissions: "dcode:get-embedded-browser-site-permissions",
|
|
343
|
+
/** Renderer → Main:修改/删除单条站点权限(state="ask" 表示删除) */
|
|
344
|
+
SetEmbeddedBrowserSitePermission: "dcode:set-embedded-browser-site-permission",
|
|
345
|
+
/** Renderer → Main:清空全部站点权限记录 */
|
|
346
|
+
ClearEmbeddedBrowserSitePermissions: "dcode:clear-embedded-browser-site-permissions",
|
|
347
|
+
/** Renderer → Main:重置单个站点的全部权限记录(站点权限设置标签页「重置」) */
|
|
348
|
+
ResetEmbeddedBrowserSitePermission: "dcode:reset-embedded-browser-site-permission",
|
|
299
349
|
/** Main → Renderer:通知有新版本已下载完毕,可以重启安装 */
|
|
300
350
|
UpdateReady: "dcode:update-ready",
|
|
301
351
|
/** Main → Renderer:用户手动点击"检查更新"后的结果反馈(toast 用) */
|
|
@@ -372,6 +422,14 @@ export const CodingPlanWebviewChannels = {
|
|
|
372
422
|
/** 官网页购买成功后通知 App 刷新 entitlements 并关闭 webview。 */
|
|
373
423
|
PurchaseComplete: "dcode:coding-plan-purchase-complete",
|
|
374
424
|
};
|
|
425
|
+
/**
|
|
426
|
+
* 插件 UI 沙箱 guest(partition=plugin-sandbox:<id>)的 main → guest preload 频道。
|
|
427
|
+
* preload 只把 MessagePort 组经 window.postMessage 转交给受信 shell,不暴露任何 contextBridge API。
|
|
428
|
+
*/
|
|
429
|
+
export const PluginSandboxChannels = {
|
|
430
|
+
/** main → guest:{ sandboxId, initId, names } + port1[],shell 据此建立宿主端口 */
|
|
431
|
+
Init: "dcode:plugin-sandbox-init",
|
|
432
|
+
};
|
|
375
433
|
// ============================================================================
|
|
376
434
|
// 内部传输频道 —— 框架级别的通信
|
|
377
435
|
// ============================================================================
|
|
@@ -387,6 +445,8 @@ export const InternalChannels = {
|
|
|
387
445
|
ScopedServicePortReady: "dcode:scoped-service-port-ready",
|
|
388
446
|
/** preload → renderer:主进程已确认系统通知展示,renderer 可播放提示音 */
|
|
389
447
|
TaskNotificationSound: "dcode:task-notification-sound",
|
|
448
|
+
/** main → 宿主 renderer:插件 UI 沙箱的 MessagePort 组(port2[]),payload { sandboxId, initId, names } */
|
|
449
|
+
PluginSandboxPorts: "dcode:plugin-sandbox-ports",
|
|
390
450
|
};
|
|
391
451
|
/** @deprecated `/ws` 已忽略该头;保留常量仅供旧客户端兼容。 */
|
|
392
452
|
export const DCODE_RPC_CLIENT_MODE_HEADER = "x-dcode-rpc-client-mode";
|
|
@@ -446,6 +506,8 @@ export const HostMessageTypes = {
|
|
|
446
506
|
BrowserExecuteResult: "browser-execute-result",
|
|
447
507
|
/** main → host:本地视频 canonical path 授权结果 */
|
|
448
508
|
LocalMediaPreviewPathAuthorizeResult: "local-media-preview-path-authorize-result",
|
|
509
|
+
/** main → host:插件 UI 沙箱登记结果(PluginSandboxRegisterResultPayload) */
|
|
510
|
+
PluginSandboxRegisterResult: "plugin-sandbox-register-result",
|
|
449
511
|
/** Main → Host:全局前台 DCode 窗口派生的 producer focus fact。 */
|
|
450
512
|
CuaPipFocusChanged: "cua-pip-focus-changed",
|
|
451
513
|
/** main → host:要求 Host 现读本地 Source,并同步指定 Remote Environment。 */
|
|
@@ -453,6 +515,7 @@ export const HostMessageTypes = {
|
|
|
453
515
|
/** main → host:资源管理器请求 Host 采样其后代进程(Agent / MCP / 终端)的 CPU 与内存 */
|
|
454
516
|
ResourceUsageSnapshotRequest: "resource-usage-snapshot-request",
|
|
455
517
|
ResourceUsageSnapshotCancel: "resource-usage-snapshot-cancel",
|
|
518
|
+
NetworkCapture: "network-capture",
|
|
456
519
|
};
|
|
457
520
|
/** host process → main process 的反馈消息类型 */
|
|
458
521
|
export const HostResponseTypes = {
|
|
@@ -488,6 +551,7 @@ export const HostResponseTypes = {
|
|
|
488
551
|
SessionCreateTelemetry: "session-create-telemetry",
|
|
489
552
|
/** host → main:资源管理器采样结果(按 requestId 关联) */
|
|
490
553
|
ResourceUsageSnapshotResult: "resource-usage-snapshot-result",
|
|
554
|
+
NetworkCaptureBatch: "network-capture-batch",
|
|
491
555
|
/** host 内当前正在执行 prompt 的 agent session 数量变化 */
|
|
492
556
|
AgentRunningTaskCountChanged: "agent-running-task-count-changed",
|
|
493
557
|
/** host 内指定 workspace 当前仍未 terminal 的 task 数量变化 */
|
|
@@ -542,6 +606,8 @@ export const HostResponseTypes = {
|
|
|
542
606
|
BrowserExecuteRequest: "browser-execute-request",
|
|
543
607
|
/** host → main:请求授权 Agent 已精确校验的本地视频路径 */
|
|
544
608
|
LocalMediaPreviewPathAuthorizeRequest: "local-media-preview-path-authorize-request",
|
|
609
|
+
/** host → main:登记已校验的插件 UI HTML 与 CSP,换取 sandbox 句柄(PluginSandboxRegisterRequestPayload) */
|
|
610
|
+
PluginSandboxRegisterRequest: "plugin-sandbox-register-request",
|
|
545
611
|
/** host → main:RPC 网络遥测批次(channel.command 成功率/耗时) */
|
|
546
612
|
NetworkTelemetryBatch: "network-telemetry-batch",
|
|
547
613
|
/** host → main:本地 Provisioning Source 成功持久化。 */
|
|
@@ -3,6 +3,7 @@ import { type PluginStoreOrder } from "./pluginStoreOrder.js";
|
|
|
3
3
|
/** 只允许显式接入的公开字段进入服务快照,不透传账户或 Provider 配置。 */
|
|
4
4
|
export interface ClientConfigSnapshot {
|
|
5
5
|
pluginStoreOrder: PluginStoreOrder | null;
|
|
6
|
+
zsrcUrl: string | null;
|
|
6
7
|
}
|
|
7
8
|
export declare const clientConfigReadOptionsSchema: z.ZodObject<{
|
|
8
9
|
forceRefresh: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { parsePluginStoreOrder } from "./pluginStoreOrder.js";
|
|
3
|
+
const zsrcSchema = z.object({
|
|
4
|
+
url: z
|
|
5
|
+
.string()
|
|
6
|
+
.trim()
|
|
7
|
+
.url()
|
|
8
|
+
.refine((value) => /^https?:\/\//i.test(value)),
|
|
9
|
+
});
|
|
3
10
|
export const clientConfigReadOptionsSchema = z.object({
|
|
4
11
|
forceRefresh: z.boolean().optional(),
|
|
5
12
|
});
|
|
@@ -7,7 +14,12 @@ const envelopeSchema = z.object({
|
|
|
7
14
|
code: z.literal(0),
|
|
8
15
|
data: z
|
|
9
16
|
.object({
|
|
10
|
-
configs: z
|
|
17
|
+
configs: z
|
|
18
|
+
.object({
|
|
19
|
+
pluginStoreOrder: z.unknown().optional(),
|
|
20
|
+
zsrc: z.unknown().optional(),
|
|
21
|
+
})
|
|
22
|
+
.nullish(),
|
|
11
23
|
})
|
|
12
24
|
.nullish(),
|
|
13
25
|
});
|
|
@@ -15,6 +27,10 @@ export function parseClientConfigSnapshot(payload) {
|
|
|
15
27
|
const parsed = envelopeSchema.safeParse(payload);
|
|
16
28
|
if (!parsed.success)
|
|
17
29
|
throw new Error("Invalid public client config response");
|
|
18
|
-
|
|
30
|
+
const configs = parsed.data.data?.configs;
|
|
31
|
+
return {
|
|
32
|
+
pluginStoreOrder: parsePluginStoreOrder(configs?.pluginStoreOrder),
|
|
33
|
+
zsrcUrl: zsrcSchema.safeParse(configs?.zsrc).data?.url ?? null,
|
|
34
|
+
};
|
|
19
35
|
}
|
|
20
36
|
//# sourceMappingURL=clientConfig.js.map
|