@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,27 +1,30 @@
|
|
|
1
1
|
import { databaseStartupControlSchema, databaseStartupStateSchema } from "./database-startup.js";
|
|
2
|
-
import {
|
|
2
|
+
import { mcpAppInstanceSchema } from "./mcp-apps/instance.js";
|
|
3
|
+
import { automationSessionCreateTelemetrySchema, sessionCreateTelemetrySchema, } from "./sessionCreateTelemetry.js";
|
|
3
4
|
/* eslint-disable max-lines -- 运行时 schema 当前集中在共享包入口,外部 relay payload 校验加入后先保持单一导出面。 */
|
|
4
5
|
import { z } from "zod";
|
|
5
|
-
import {
|
|
6
|
+
import { networkCaptureControlSchema, networkCaptureBatchSchema } from "./networkCapture.js";
|
|
6
7
|
import { browserCommandSchema } from "./browser-use/commands.js";
|
|
7
8
|
import { browserCommandResultSchema } from "./browser-use/result.js";
|
|
8
|
-
import {
|
|
9
|
+
import { modelSelectionSchema } from "./model-selection.js";
|
|
10
|
+
import { dcodeProcessDiagnosticSchema } from "./process-diagnostic.js";
|
|
9
11
|
import { PROCESS_RESOURCE_CLI_LANES } from "./processResourceTelemetry.js";
|
|
10
|
-
import {
|
|
12
|
+
import { providerProvisioningErrorCodeSchema, providerProvisioningTriggerSchema, } from "./provider-provisioning.js";
|
|
11
13
|
import { dcodeProviderSchema } from "./providers.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { providerProvisioningTriggerSchema } from "./provider-provisioning.js";
|
|
15
|
-
import { dcodeMcpTelemetryEventSchema, dcodeMcpResourceSamplesSchema, dcodeToolExecResourceSchema, dcodeProcessResourceSampleSchema, } from "./dcode-protocol/index.js";
|
|
16
|
-
import { dcodeTaskModeSchema } from "./dcode-task-mode-schema.js";
|
|
14
|
+
import { REMOTE_ASSET_INSTALL_MODES } from "./remoteAssetInstallMode.js";
|
|
15
|
+
import { isKnownRemoteResourcePackageId } from "./remoteResourcePackages.js";
|
|
17
16
|
import { PROTOCOL_V4_LIMITS } from "./dcode-protocol-v4/core.js";
|
|
18
|
-
import { errorAttributionSchema } from "./dcode-protocol-v4/snapshot.js";
|
|
19
17
|
import { sessionWorkflowActivitySchema } from "./dcode-protocol-v4/sessions-index-workflow-activity.js";
|
|
18
|
+
import { webRemoteControlRpcTransportAckSchema, webRemoteControlRpcTransportFrameSchema, } from "./web-remote-control-rpc-transport.js";
|
|
20
19
|
import { taskOwnerCommandDeliverySchema, taskOwnerCommandRequestSchema, taskOwnerCommandResultSchema, taskRealtimeDeliveredEventSchema, taskRealtimeEventSchema, taskRealtimeHostDeliveryKindSchema, taskRunLeaseAcquireRequestSchema, taskRunLeaseResultSchema, taskRunLeaseTargetSchema, taskStreamMirrorPublishOpSchema, taskStreamMirrorTargetSchema, } from "./task-realtime-core.js";
|
|
21
|
-
export { WSL_USER_MAX_LENGTH, isValidWslUser, wslUserSchema } from "./wslUserValidation.js";
|
|
22
|
-
export { dcodeTaskModeSchema } from "./dcode-task-mode-schema.js";
|
|
23
20
|
import { wslUserSchema } from "./wslUserValidation.js";
|
|
21
|
+
import { legacyDCodeProviderSchema } from "./dcode-agent-policy.js";
|
|
22
|
+
import { errorAttributionSchema } from "./dcode-protocol-v4/snapshot.js";
|
|
23
|
+
import { dcodeMcpResourceSamplesSchema, dcodeMcpTelemetryEventSchema, dcodeProcessResourceSampleSchema, dcodeToolExecResourceSchema, } from "./dcode-protocol/index.js";
|
|
24
|
+
import { dcodeTaskModeSchema } from "./dcode-task-mode-schema.js";
|
|
24
25
|
export { appSettingsOccupationEnum, appSettingsPatchSchema, appSettingsSchema, localeSchema, postUpdateReleaseNotesPayloadSchema, } from "./validationAppSettings.js";
|
|
26
|
+
export { isValidWslUser, WSL_USER_MAX_LENGTH, wslUserSchema } from "./wslUserValidation.js";
|
|
27
|
+
export { dcodeTaskModeSchema } from "./dcode-task-mode-schema.js";
|
|
25
28
|
export function formatZodError(error) {
|
|
26
29
|
return error.issues
|
|
27
30
|
.map((issue) => {
|
|
@@ -32,6 +35,299 @@ export function formatZodError(error) {
|
|
|
32
35
|
}
|
|
33
36
|
export const nonEmptyStringSchema = z.string().trim().min(1);
|
|
34
37
|
export const stringArraySchema = z.array(z.string());
|
|
38
|
+
// Task04B:topic physical-frame 计量器按 bridge/recovery id 的协议最大长度计算
|
|
39
|
+
// mobile relay 外壳;不在不可信 payload 入口机械限长,1MiB 上限就只是估算。
|
|
40
|
+
const webRemoteControlTransportIdSchema = nonEmptyStringSchema
|
|
41
|
+
.max(PROTOCOL_V4_LIMITS.transportEnvelopeIdMaxChars)
|
|
42
|
+
.regex(/^[A-Za-z0-9._~-]+$/u);
|
|
43
|
+
export const webRemoteControlWorkspaceTargetSchema = z.object({
|
|
44
|
+
workspacePath: nonEmptyStringSchema,
|
|
45
|
+
workspaceIdentity: nonEmptyStringSchema.optional(),
|
|
46
|
+
remoteSessionId: nonEmptyStringSchema.optional(),
|
|
47
|
+
label: nonEmptyStringSchema,
|
|
48
|
+
workspacePurpose: z.enum(["project", "conversation"]).optional(),
|
|
49
|
+
kind: z.enum(["local", "remote"]),
|
|
50
|
+
connectionState: z.enum(["connected", "disconnected", "reconnecting"]).optional(),
|
|
51
|
+
lastConnectionError: z.string().optional(),
|
|
52
|
+
});
|
|
53
|
+
export const webRemoteControlWorkspaceTargetsSchema = z.array(webRemoteControlWorkspaceTargetSchema);
|
|
54
|
+
export const webRemoteControlReconnectWorkspaceRequestSchema = z.object({
|
|
55
|
+
requestId: nonEmptyStringSchema,
|
|
56
|
+
workspaceKey: nonEmptyStringSchema,
|
|
57
|
+
});
|
|
58
|
+
export const webRemoteControlReconnectWorkspaceResultSchema = z.union([
|
|
59
|
+
z.object({
|
|
60
|
+
requestId: nonEmptyStringSchema,
|
|
61
|
+
workspaceKey: nonEmptyStringSchema,
|
|
62
|
+
success: z.literal(true),
|
|
63
|
+
}),
|
|
64
|
+
z.object({
|
|
65
|
+
requestId: nonEmptyStringSchema,
|
|
66
|
+
workspaceKey: nonEmptyStringSchema,
|
|
67
|
+
success: z.literal(false),
|
|
68
|
+
error: z.string(),
|
|
69
|
+
}),
|
|
70
|
+
]);
|
|
71
|
+
export const webRemoteControlTaskTargetSchema = z.object({
|
|
72
|
+
taskId: nonEmptyStringSchema,
|
|
73
|
+
title: z.string(),
|
|
74
|
+
workspacePath: nonEmptyStringSchema,
|
|
75
|
+
workspaceIdentity: nonEmptyStringSchema.optional(),
|
|
76
|
+
remoteSessionId: nonEmptyStringSchema.optional(),
|
|
77
|
+
workspaceLabel: nonEmptyStringSchema,
|
|
78
|
+
workspaceKind: z.enum(["local", "remote"]),
|
|
79
|
+
createdAt: z.number().finite(),
|
|
80
|
+
updatedAt: z.number().finite(),
|
|
81
|
+
provider: dcodeProviderSchema.optional(),
|
|
82
|
+
unreadAt: z.number().finite().optional(),
|
|
83
|
+
displayStatus: z.enum(["idle", "running", "completed", "error"]).optional(),
|
|
84
|
+
hasBackgroundWork: z.boolean().optional(),
|
|
85
|
+
workflowActivity: sessionWorkflowActivitySchema.optional(),
|
|
86
|
+
pinned: z.boolean().optional(),
|
|
87
|
+
archived: z.boolean().optional(),
|
|
88
|
+
});
|
|
89
|
+
export const webRemoteControlTaskTargetsSchema = z.array(webRemoteControlTaskTargetSchema);
|
|
90
|
+
export const webRemoteControlFailureReasonSchema = z.enum([
|
|
91
|
+
"session-not-found",
|
|
92
|
+
"session-expired",
|
|
93
|
+
"session-conflict",
|
|
94
|
+
"workspace-closed",
|
|
95
|
+
"desktop-disconnected",
|
|
96
|
+
"invalid-mobile-connection",
|
|
97
|
+
"desktop-bootstrap-timeout",
|
|
98
|
+
"connection-recovery-timeout",
|
|
99
|
+
"relay-unavailable",
|
|
100
|
+
"unsupported-action",
|
|
101
|
+
"unexpected-error",
|
|
102
|
+
]);
|
|
103
|
+
export const webRemoteControlExternalWorkspaceBridgeSchema = z.discriminatedUnion("kind", [
|
|
104
|
+
z.object({
|
|
105
|
+
bridgeSessionId: webRemoteControlTransportIdSchema,
|
|
106
|
+
bridgeGeneration: z.number().int().nonnegative().optional(),
|
|
107
|
+
recoveryId: webRemoteControlTransportIdSchema.optional(),
|
|
108
|
+
kind: z.literal("local"),
|
|
109
|
+
workspaceKey: nonEmptyStringSchema,
|
|
110
|
+
workspacePath: nonEmptyStringSchema,
|
|
111
|
+
initialTaskId: nonEmptyStringSchema.optional(),
|
|
112
|
+
}),
|
|
113
|
+
z.object({
|
|
114
|
+
bridgeSessionId: webRemoteControlTransportIdSchema,
|
|
115
|
+
bridgeGeneration: z.number().int().nonnegative().optional(),
|
|
116
|
+
recoveryId: webRemoteControlTransportIdSchema.optional(),
|
|
117
|
+
kind: z.literal("remote"),
|
|
118
|
+
workspaceKey: nonEmptyStringSchema,
|
|
119
|
+
workspacePath: nonEmptyStringSchema,
|
|
120
|
+
workspaceIdentity: nonEmptyStringSchema,
|
|
121
|
+
remoteSessionId: nonEmptyStringSchema,
|
|
122
|
+
initialTaskId: nonEmptyStringSchema.optional(),
|
|
123
|
+
}),
|
|
124
|
+
]);
|
|
125
|
+
export const webRemoteControlMobileViewStateSchema = z.object({
|
|
126
|
+
activeWorkspaceKey: nonEmptyStringSchema.optional(),
|
|
127
|
+
activeTaskId: nonEmptyStringSchema.optional(),
|
|
128
|
+
updatedAt: z.number().finite(),
|
|
129
|
+
});
|
|
130
|
+
export const webRemoteControlMobileDeviceInfoSchema = z.object({
|
|
131
|
+
platform: nonEmptyStringSchema,
|
|
132
|
+
version: nonEmptyStringSchema,
|
|
133
|
+
name: nonEmptyStringSchema,
|
|
134
|
+
userAgent: z.string().optional(),
|
|
135
|
+
language: z.string().optional(),
|
|
136
|
+
languages: z.array(z.string()).optional(),
|
|
137
|
+
browserPlatform: z.string().optional(),
|
|
138
|
+
viewport: z
|
|
139
|
+
.object({
|
|
140
|
+
width: z.number().finite(),
|
|
141
|
+
height: z.number().finite(),
|
|
142
|
+
devicePixelRatio: z.number().finite(),
|
|
143
|
+
})
|
|
144
|
+
.optional(),
|
|
145
|
+
screen: z
|
|
146
|
+
.object({
|
|
147
|
+
width: z.number().finite(),
|
|
148
|
+
height: z.number().finite(),
|
|
149
|
+
})
|
|
150
|
+
.optional(),
|
|
151
|
+
timezone: z.string().optional(),
|
|
152
|
+
online: z.boolean().optional(),
|
|
153
|
+
updatedAt: z.number().finite(),
|
|
154
|
+
});
|
|
155
|
+
export const webRemoteControlWindowBootstrapResultSchema = z.object({
|
|
156
|
+
windowControlSessionId: nonEmptyStringSchema,
|
|
157
|
+
desktopAppVersion: nonEmptyStringSchema.optional(),
|
|
158
|
+
workspaces: webRemoteControlWorkspaceTargetsSchema,
|
|
159
|
+
tasks: webRemoteControlTaskTargetsSchema,
|
|
160
|
+
initialViewState: webRemoteControlMobileViewStateSchema.optional(),
|
|
161
|
+
mobileViewState: webRemoteControlMobileViewStateSchema.optional(),
|
|
162
|
+
});
|
|
163
|
+
export const webRemoteControlWorkspaceListResultSchema = z.object({
|
|
164
|
+
workspaces: webRemoteControlWorkspaceTargetsSchema,
|
|
165
|
+
tasks: webRemoteControlTaskTargetsSchema.optional(),
|
|
166
|
+
activeWorkspaceKey: nonEmptyStringSchema.optional(),
|
|
167
|
+
activeTaskId: nonEmptyStringSchema.optional(),
|
|
168
|
+
});
|
|
169
|
+
export const webRemoteControlPlatformMethodSchema = z.enum([
|
|
170
|
+
"isDockerAvailable",
|
|
171
|
+
"listWSLDistros",
|
|
172
|
+
"listDockerContainers",
|
|
173
|
+
"listSSHConfigAliases",
|
|
174
|
+
"loadMcpFromUserDirectory",
|
|
175
|
+
"saveMcpToUserDirectory",
|
|
176
|
+
"migrateLegacyCommonMcp",
|
|
177
|
+
]);
|
|
178
|
+
const webRemoteControlAppPayloadSchemas = [
|
|
179
|
+
z
|
|
180
|
+
.object({ dcode_type: z.literal("telemetry-report"), event: sessionCreateTelemetrySchema })
|
|
181
|
+
.strict(),
|
|
182
|
+
z.object({
|
|
183
|
+
dcode_type: z.literal("bootstrap-request"),
|
|
184
|
+
requestId: nonEmptyStringSchema,
|
|
185
|
+
}),
|
|
186
|
+
z.object({
|
|
187
|
+
dcode_type: z.literal("bootstrap-response"),
|
|
188
|
+
requestId: nonEmptyStringSchema,
|
|
189
|
+
success: z.literal(true),
|
|
190
|
+
result: webRemoteControlWindowBootstrapResultSchema,
|
|
191
|
+
}),
|
|
192
|
+
z.object({
|
|
193
|
+
dcode_type: z.literal("workspace-list-request"),
|
|
194
|
+
requestId: nonEmptyStringSchema,
|
|
195
|
+
}),
|
|
196
|
+
z.object({
|
|
197
|
+
dcode_type: z.literal("workspace-list-response"),
|
|
198
|
+
requestId: nonEmptyStringSchema,
|
|
199
|
+
success: z.literal(true),
|
|
200
|
+
result: webRemoteControlWorkspaceListResultSchema,
|
|
201
|
+
}),
|
|
202
|
+
z.object({
|
|
203
|
+
dcode_type: z.literal("workspace-list-updated"),
|
|
204
|
+
result: webRemoteControlWorkspaceListResultSchema,
|
|
205
|
+
}),
|
|
206
|
+
z.object({
|
|
207
|
+
dcode_type: z.literal("workspace-bridge-open"),
|
|
208
|
+
requestId: nonEmptyStringSchema,
|
|
209
|
+
bridgeSessionId: webRemoteControlTransportIdSchema,
|
|
210
|
+
bridgeGeneration: z.number().int().nonnegative().optional(),
|
|
211
|
+
recoveryId: webRemoteControlTransportIdSchema.optional(),
|
|
212
|
+
workspaceKey: nonEmptyStringSchema,
|
|
213
|
+
taskId: nonEmptyStringSchema.optional(),
|
|
214
|
+
}),
|
|
215
|
+
z.object({
|
|
216
|
+
dcode_type: z.literal("workspace-bridge-ready"),
|
|
217
|
+
requestId: nonEmptyStringSchema,
|
|
218
|
+
bridgeSessionId: webRemoteControlTransportIdSchema,
|
|
219
|
+
bridgeGeneration: z.number().int().nonnegative().optional(),
|
|
220
|
+
recoveryId: webRemoteControlTransportIdSchema.optional(),
|
|
221
|
+
bridge: webRemoteControlExternalWorkspaceBridgeSchema,
|
|
222
|
+
}),
|
|
223
|
+
z.object({
|
|
224
|
+
dcode_type: z.literal("workspace-bridge-error"),
|
|
225
|
+
requestId: nonEmptyStringSchema,
|
|
226
|
+
bridgeSessionId: webRemoteControlTransportIdSchema.optional(),
|
|
227
|
+
bridgeGeneration: z.number().int().nonnegative().optional(),
|
|
228
|
+
recoveryId: webRemoteControlTransportIdSchema.optional(),
|
|
229
|
+
reason: webRemoteControlFailureReasonSchema,
|
|
230
|
+
error: z.string(),
|
|
231
|
+
}),
|
|
232
|
+
z.object({
|
|
233
|
+
dcode_type: z.literal("workspace-reconnect-request"),
|
|
234
|
+
requestId: nonEmptyStringSchema,
|
|
235
|
+
workspaceKey: nonEmptyStringSchema,
|
|
236
|
+
}),
|
|
237
|
+
z.object({
|
|
238
|
+
dcode_type: z.literal("workspace-reconnect-response"),
|
|
239
|
+
requestId: nonEmptyStringSchema,
|
|
240
|
+
workspaceKey: nonEmptyStringSchema,
|
|
241
|
+
success: z.literal(true),
|
|
242
|
+
}),
|
|
243
|
+
z.object({
|
|
244
|
+
dcode_type: z.literal("workspace-reconnect-response"),
|
|
245
|
+
requestId: nonEmptyStringSchema,
|
|
246
|
+
workspaceKey: nonEmptyStringSchema,
|
|
247
|
+
success: z.literal(false),
|
|
248
|
+
error: z.string(),
|
|
249
|
+
}),
|
|
250
|
+
z.object({
|
|
251
|
+
dcode_type: z.literal("mobile-view-state-update"),
|
|
252
|
+
viewState: webRemoteControlMobileViewStateSchema,
|
|
253
|
+
deviceInfo: webRemoteControlMobileDeviceInfoSchema.optional(),
|
|
254
|
+
}),
|
|
255
|
+
z.object({
|
|
256
|
+
dcode_type: z.literal("platform-request"),
|
|
257
|
+
requestId: nonEmptyStringSchema,
|
|
258
|
+
method: webRemoteControlPlatformMethodSchema,
|
|
259
|
+
args: z.unknown().optional(),
|
|
260
|
+
}),
|
|
261
|
+
z.object({
|
|
262
|
+
dcode_type: z.literal("platform-response"),
|
|
263
|
+
requestId: nonEmptyStringSchema,
|
|
264
|
+
method: webRemoteControlPlatformMethodSchema,
|
|
265
|
+
success: z.literal(true),
|
|
266
|
+
result: z.unknown(),
|
|
267
|
+
}),
|
|
268
|
+
z.object({
|
|
269
|
+
dcode_type: z.literal("platform-response"),
|
|
270
|
+
requestId: nonEmptyStringSchema,
|
|
271
|
+
method: webRemoteControlPlatformMethodSchema,
|
|
272
|
+
success: z.literal(false),
|
|
273
|
+
error: z.string(),
|
|
274
|
+
}),
|
|
275
|
+
// Bugfix:04D-3 必须让 fragment/ACK 与 acknowledged adapter 原子切换。
|
|
276
|
+
// 继续接受 legacy 单片会让 raw bytes 绕过 ACK/replay owner 和 1MiB 外壳硬边界。
|
|
277
|
+
webRemoteControlRpcTransportFrameSchema,
|
|
278
|
+
webRemoteControlRpcTransportAckSchema,
|
|
279
|
+
z.object({
|
|
280
|
+
dcode_type: z.literal("bridge-degraded"),
|
|
281
|
+
bridgeSessionId: webRemoteControlTransportIdSchema,
|
|
282
|
+
bridgeGeneration: z.number().int().nonnegative().optional(),
|
|
283
|
+
recoveryId: webRemoteControlTransportIdSchema.optional(),
|
|
284
|
+
reason: z.enum(["rpc-transport-fault", "rpc-frame-gap", "buffer-overflow", "buffer-timeout"]),
|
|
285
|
+
seq: z.number().int().nonnegative().optional(),
|
|
286
|
+
expectedSeq: z.number().int().nonnegative().optional(),
|
|
287
|
+
droppedCount: z.number().int().nonnegative().optional(),
|
|
288
|
+
}),
|
|
289
|
+
z.object({
|
|
290
|
+
dcode_type: z.literal("app-error"),
|
|
291
|
+
requestId: nonEmptyStringSchema.optional(),
|
|
292
|
+
bridgeSessionId: webRemoteControlTransportIdSchema.optional(),
|
|
293
|
+
reason: webRemoteControlFailureReasonSchema,
|
|
294
|
+
error: z.string(),
|
|
295
|
+
}),
|
|
296
|
+
z.object({
|
|
297
|
+
dcode_type: z.literal("mobile-diagnostic"),
|
|
298
|
+
event: z.enum([
|
|
299
|
+
"state-transition",
|
|
300
|
+
"socket-close",
|
|
301
|
+
"socket-error",
|
|
302
|
+
"recover-start",
|
|
303
|
+
"recover-scheduled",
|
|
304
|
+
"pair-status",
|
|
305
|
+
"failure",
|
|
306
|
+
]),
|
|
307
|
+
timestamp: z.number().int().nonnegative(),
|
|
308
|
+
state: z.string().optional(),
|
|
309
|
+
previousState: z.string().optional(),
|
|
310
|
+
pairStatus: z.enum(["waiting", "matched"]).optional(),
|
|
311
|
+
closeCode: z.number().int().optional(),
|
|
312
|
+
closeReason: z.string().optional(),
|
|
313
|
+
wasClean: z.boolean().optional(),
|
|
314
|
+
wasPaired: z.boolean().optional(),
|
|
315
|
+
failureReason: webRemoteControlFailureReasonSchema.optional(),
|
|
316
|
+
failureMessage: z.string().optional(),
|
|
317
|
+
visibilityState: z.string().optional(),
|
|
318
|
+
online: z.boolean().optional(),
|
|
319
|
+
hiddenDurationMs: z.number().int().nonnegative().optional(),
|
|
320
|
+
}),
|
|
321
|
+
];
|
|
322
|
+
// Bugfix: app payload 里多个消息共享 dcode_type(例如 platform-response),
|
|
323
|
+
// 不能直接用 z.discriminatedUnion("dcode_type"),否则 schema 初始化会因重复值失败。
|
|
324
|
+
// 这里保留同一批运行时约束,改用普通 union,让外部 relay 的不可信 payload
|
|
325
|
+
// 在进入 desktop/web 路由前仍然先被机械校验。
|
|
326
|
+
export const webRemoteControlAppPayloadSchema = z.union(webRemoteControlAppPayloadSchemas);
|
|
327
|
+
export function parseWebRemoteControlAppPayload(payload) {
|
|
328
|
+
const result = webRemoteControlAppPayloadSchema.safeParse(payload);
|
|
329
|
+
return result.success ? result.data : null;
|
|
330
|
+
}
|
|
35
331
|
export const credentialRecordSchema = z.record(z.string(), z.string());
|
|
36
332
|
export const credentialKeySchema = nonEmptyStringSchema;
|
|
37
333
|
export const credentialValueSchema = z.string();
|
|
@@ -60,10 +356,19 @@ export const dockerConnectOptionsSchema = z.object({
|
|
|
60
356
|
kind: z.literal("docker"),
|
|
61
357
|
container: nonEmptyStringSchema,
|
|
62
358
|
});
|
|
359
|
+
export const serverConnectOptionsSchema = z.object({
|
|
360
|
+
kind: z.literal("server"),
|
|
361
|
+
url: z.string().url(),
|
|
362
|
+
name: nonEmptyStringSchema.optional(),
|
|
363
|
+
token: z.string().optional(),
|
|
364
|
+
workspacePath: z.string().optional(),
|
|
365
|
+
serverId: nonEmptyStringSchema.optional(),
|
|
366
|
+
});
|
|
63
367
|
export const remoteTargetSchema = z.discriminatedUnion("kind", [
|
|
64
368
|
sshConnectOptionsSchema,
|
|
65
369
|
wslConnectOptionsSchema,
|
|
66
370
|
dockerConnectOptionsSchema,
|
|
371
|
+
serverConnectOptionsSchema,
|
|
67
372
|
]);
|
|
68
373
|
export const helloMessageSchema = z.object({
|
|
69
374
|
type: z.literal("dcode-hello"),
|
|
@@ -142,7 +447,8 @@ export const hostInitLocalMessageSchema = z.object({
|
|
|
142
447
|
feedbackApiBase: z.string().url().optional(),
|
|
143
448
|
workspacePath: nonEmptyStringSchema.optional(),
|
|
144
449
|
workspaceIdentity: nonEmptyStringSchema.optional(),
|
|
145
|
-
|
|
450
|
+
// 启动只预热 active workspace(desktop STARTUP_AGENT_WARMUP_LIMIT = 1),协议层同步收紧上限。
|
|
451
|
+
agentWarmupTargets: z.array(hostAgentWarmupTargetSchema).max(1).optional(),
|
|
146
452
|
agentSpawnFallbackCwd: nonEmptyStringSchema.optional(),
|
|
147
453
|
dcodeBuiltinProviderConfigFilePath: nonEmptyStringSchema,
|
|
148
454
|
runtimeProcessEnvPatch: z
|
|
@@ -356,6 +662,36 @@ export const hostLocalMediaPreviewPathAuthorizeResultMessageSchema = z
|
|
|
356
662
|
error: z.string().optional(),
|
|
357
663
|
})
|
|
358
664
|
.strict();
|
|
665
|
+
/** main → host:插件 UI 沙箱登记结果(PluginSandboxRegisterResultPayload)。 */
|
|
666
|
+
export const hostPluginSandboxRegisterResultMessageSchema = z
|
|
667
|
+
.object({
|
|
668
|
+
type: z.literal("plugin-sandbox-register-result"),
|
|
669
|
+
requestId: nonEmptyStringSchema,
|
|
670
|
+
ok: z.boolean(),
|
|
671
|
+
instance: mcpAppInstanceSchema.optional(),
|
|
672
|
+
sandboxId: nonEmptyStringSchema.optional(),
|
|
673
|
+
initId: z.number().int().nonnegative().optional(),
|
|
674
|
+
shellUrl: nonEmptyStringSchema.optional(),
|
|
675
|
+
partition: nonEmptyStringSchema.optional(),
|
|
676
|
+
// 登记时生效的呈现字段(资源级优先合并后的值),回 renderer 定初始高度 / 边框。
|
|
677
|
+
// Bugfix:这条 schema 是 strict 的——句柄多带一个未声明字段,整条回包会被 host 拒收,桥永远等不到句柄,
|
|
678
|
+
// 卡片卡在 preparing(2026-09-12 inline e2e 复现)。改 PluginSandboxHandle 必须同步这里。
|
|
679
|
+
resourceMeta: z
|
|
680
|
+
.object({
|
|
681
|
+
prefersBorder: z.boolean().optional(),
|
|
682
|
+
heightHint: z.number().int().positive().optional(),
|
|
683
|
+
minFrameHeight: z.number().int().positive().optional(),
|
|
684
|
+
showInline: z.boolean().optional(),
|
|
685
|
+
// 资源声明的浏览器权限随句柄回 renderer(进 hostContext.permissions);与登记请求的 permissions 同一枚举。
|
|
686
|
+
permissions: z
|
|
687
|
+
.array(z.enum(["camera", "microphone", "geolocation", "clipboardWrite"]))
|
|
688
|
+
.optional(),
|
|
689
|
+
})
|
|
690
|
+
.strict()
|
|
691
|
+
.optional(),
|
|
692
|
+
error: z.string().optional(),
|
|
693
|
+
})
|
|
694
|
+
.strict();
|
|
359
695
|
export const hostCuaPipFocusChangedMessageSchema = z
|
|
360
696
|
.object({
|
|
361
697
|
type: z.literal("cua-pip-focus-changed"),
|
|
@@ -385,6 +721,7 @@ export const hostResourceUsageSnapshotRequestMessageSchema = z
|
|
|
385
721
|
})
|
|
386
722
|
.strict();
|
|
387
723
|
export const hostIncomingMessageSchema = z.discriminatedUnion("type", [
|
|
724
|
+
z.object({ type: z.literal("network-capture"), control: networkCaptureControlSchema }).strict(),
|
|
388
725
|
z
|
|
389
726
|
.object({ type: z.literal("database-startup-control"), control: databaseStartupControlSchema })
|
|
390
727
|
.strict(),
|
|
@@ -416,6 +753,7 @@ export const hostIncomingMessageSchema = z.discriminatedUnion("type", [
|
|
|
416
753
|
hostOffPeakRunMessageSchema,
|
|
417
754
|
hostBrowserExecuteResultMessageSchema,
|
|
418
755
|
hostLocalMediaPreviewPathAuthorizeResultMessageSchema,
|
|
756
|
+
hostPluginSandboxRegisterResultMessageSchema,
|
|
419
757
|
hostCuaPipFocusChangedMessageSchema,
|
|
420
758
|
hostProviderProvisioningExecuteMessageSchema,
|
|
421
759
|
]);
|
|
@@ -768,6 +1106,52 @@ export const hostLocalMediaPreviewPathAuthorizeRequestResponseSchema = z
|
|
|
768
1106
|
path: nonEmptyStringSchema,
|
|
769
1107
|
})
|
|
770
1108
|
.strict();
|
|
1109
|
+
/** host → main:登记已校验的插件 UI HTML。 */
|
|
1110
|
+
export const hostPluginSandboxRegisterRequestResponseSchema = z
|
|
1111
|
+
.object({
|
|
1112
|
+
type: z.literal("plugin-sandbox-register-request"),
|
|
1113
|
+
instance: mcpAppInstanceSchema,
|
|
1114
|
+
requestId: nonEmptyStringSchema,
|
|
1115
|
+
workspacePath: z.string().optional(),
|
|
1116
|
+
workspaceIdentity: z.string().optional(),
|
|
1117
|
+
ownerWebContentsId: z.number().int().nonnegative(),
|
|
1118
|
+
sessionId: nonEmptyStringSchema,
|
|
1119
|
+
contentKind: z.literal("gen-ui").optional(),
|
|
1120
|
+
pluginId: nonEmptyStringSchema.optional(),
|
|
1121
|
+
// 资源所属 MCP server 运行时名:沙箱 partition 按它派生。
|
|
1122
|
+
serverName: nonEmptyStringSchema.optional(),
|
|
1123
|
+
// 沙箱作用域 id(`tool:<toolCallId>` / `surface:<surfaceId>`),main 只当不透明字符串。
|
|
1124
|
+
scopeId: nonEmptyStringSchema,
|
|
1125
|
+
html: z.string(),
|
|
1126
|
+
// MCP Apps 资源级 CSP 的四类域;与 mcp-apps 的 mcpToolUiCspSchema 同步。
|
|
1127
|
+
csp: z
|
|
1128
|
+
.object({
|
|
1129
|
+
connectDomains: z.array(z.string()).optional(),
|
|
1130
|
+
resourceDomains: z.array(z.string()).optional(),
|
|
1131
|
+
frameDomains: z.array(z.string()).optional(),
|
|
1132
|
+
baseUriDomains: z.array(z.string()).optional(),
|
|
1133
|
+
})
|
|
1134
|
+
.strict()
|
|
1135
|
+
.optional(),
|
|
1136
|
+
// 资源级 `_meta["dcode/csp"]` 放宽项;与 mcp-apps 的 mcpAppCspRelaxationsSchema 同步。
|
|
1137
|
+
cspRelaxations: z
|
|
1138
|
+
.object({ unsafeEval: z.boolean().optional(), wasmUnsafeEval: z.boolean().optional() })
|
|
1139
|
+
.strict()
|
|
1140
|
+
.optional(),
|
|
1141
|
+
// 资源级 `_meta.ui.permissions`(规范四键);与 mcp-apps 的 MCP_APPS_RESOURCE_PERMISSIONS 同步。
|
|
1142
|
+
permissions: z
|
|
1143
|
+
.array(z.enum(["camera", "microphone", "geolocation", "clipboardWrite"]))
|
|
1144
|
+
.optional(),
|
|
1145
|
+
prefersBorder: z.boolean().optional(),
|
|
1146
|
+
// 资源级尺寸提示,main 原样放进句柄的 resourceMeta。strict schema:改 PluginSandboxRegisterRequestPayload 必须同步这里。
|
|
1147
|
+
heightHint: z.number().int().positive().optional(),
|
|
1148
|
+
minFrameHeight: z.number().int().positive().optional(),
|
|
1149
|
+
showInline: z.boolean().optional(),
|
|
1150
|
+
})
|
|
1151
|
+
.strict()
|
|
1152
|
+
.refine((value) => value.contentKind === "gen-ui"
|
|
1153
|
+
? !value.pluginId && !value.serverName && !value.permissions?.length
|
|
1154
|
+
: Boolean(value.pluginId && value.serverName), "Invalid sandbox provenance");
|
|
771
1155
|
export const networkObservationSchema = z.object({
|
|
772
1156
|
transport: z.enum(["http", "websocket", "rpc"]),
|
|
773
1157
|
interface: z.string(),
|
|
@@ -799,6 +1183,7 @@ export const hostProviderProvisioningExecutionResultResponseSchema = z
|
|
|
799
1183
|
environmentKey: nonEmptyStringSchema,
|
|
800
1184
|
status: z.enum(["applied", "already-applied", "unsupported", "failed", "rollback_failed"]),
|
|
801
1185
|
error: z.string().optional(),
|
|
1186
|
+
errorCode: providerProvisioningErrorCodeSchema.optional(),
|
|
802
1187
|
})
|
|
803
1188
|
.strict();
|
|
804
1189
|
export const hostResourceUsageProcessSchema = z
|
|
@@ -821,6 +1206,7 @@ export const hostResourceUsageSnapshotResultResponseSchema = z
|
|
|
821
1206
|
})
|
|
822
1207
|
.strict();
|
|
823
1208
|
export const hostResponseMessageSchema = z.discriminatedUnion("type", [
|
|
1209
|
+
z.object({ type: z.literal("network-capture-batch"), batch: networkCaptureBatchSchema }).strict(),
|
|
824
1210
|
z
|
|
825
1211
|
.object({ type: z.literal("database-startup-state"), state: databaseStartupStateSchema })
|
|
826
1212
|
.strict(),
|
|
@@ -863,6 +1249,7 @@ export const hostResponseMessageSchema = z.discriminatedUnion("type", [
|
|
|
863
1249
|
hostFeedbackLogArchiveRequestResponseSchema,
|
|
864
1250
|
hostBrowserExecuteRequestResponseSchema,
|
|
865
1251
|
hostLocalMediaPreviewPathAuthorizeRequestResponseSchema,
|
|
1252
|
+
hostPluginSandboxRegisterRequestResponseSchema,
|
|
866
1253
|
hostNetworkTelemetryBatchResponseSchema,
|
|
867
1254
|
hostProviderProvisioningSourceChangedResponseSchema,
|
|
868
1255
|
hostProviderProvisioningExecutionResultResponseSchema,
|
|
@@ -1034,7 +1421,8 @@ export const dcodeTaskMetaSchema = z.object({
|
|
|
1034
1421
|
model: z.string().optional(),
|
|
1035
1422
|
thoughtLevel: nonEmptyStringSchema.optional(),
|
|
1036
1423
|
runtimeEpoch: z.number().int().nonnegative().optional(),
|
|
1037
|
-
provider
|
|
1424
|
+
// meta 直接解析自 tasks-index/旧 session 文件;历史 provider 值在此归一为 glm。
|
|
1425
|
+
provider: legacyDCodeProviderSchema.optional(),
|
|
1038
1426
|
migrationSource: dcodeTaskMigrationSourceSchema.optional(),
|
|
1039
1427
|
forkedFromTaskId: nonEmptyStringSchema.optional(),
|
|
1040
1428
|
// cron automation 身份:随 meta_json 一起持久化(单一来源),同时在写入时投影到 tasks 表
|
|
@@ -1056,6 +1444,12 @@ export const dcodeTaskMetaSchema = z.object({
|
|
|
1056
1444
|
attribution: errorAttributionSchema.optional(),
|
|
1057
1445
|
})
|
|
1058
1446
|
.optional(),
|
|
1447
|
+
repairState: z
|
|
1448
|
+
.object({
|
|
1449
|
+
claudeNativeSnapshotAssistantContentVersion: z.number().int().nonnegative().optional(),
|
|
1450
|
+
codexNativeSnapshotSubagentToolsVersion: z.number().int().nonnegative().optional(),
|
|
1451
|
+
})
|
|
1452
|
+
.optional(),
|
|
1059
1453
|
changeSummary: z
|
|
1060
1454
|
.object({
|
|
1061
1455
|
fileCount: z.number().int().nonnegative(),
|
|
@@ -1072,6 +1466,21 @@ export const dcodeTaskMetaSchema = z.object({
|
|
|
1072
1466
|
.optional(),
|
|
1073
1467
|
target: dcodeTaskGoalSchema.nullable().optional(),
|
|
1074
1468
|
});
|
|
1469
|
+
export const dcodeTaskSessionBindingStateSchema = z.enum([
|
|
1470
|
+
"idle",
|
|
1471
|
+
"syncing",
|
|
1472
|
+
"ready",
|
|
1473
|
+
"stale",
|
|
1474
|
+
"failed",
|
|
1475
|
+
]);
|
|
1476
|
+
export const dcodeTaskSessionBindingSchema = z.object({
|
|
1477
|
+
// 绑定状态由 services 从持久化数据投影;旧绑定残留的历史 provider 值在此归一为 glm。
|
|
1478
|
+
provider: legacyDCodeProviderSchema,
|
|
1479
|
+
sessionId: nonEmptyStringSchema,
|
|
1480
|
+
// 绑定锚点需要支持空 task 的 -1,所以这里不能套 nonnegative。
|
|
1481
|
+
lastSyncedTurnIndex: z.number().int(),
|
|
1482
|
+
state: dcodeTaskSessionBindingStateSchema,
|
|
1483
|
+
});
|
|
1075
1484
|
export const dcodeTaskIndexEntrySchema = z.object({
|
|
1076
1485
|
workspaceHash: nonEmptyStringSchema,
|
|
1077
1486
|
taskId: nonEmptyStringSchema,
|