@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,41 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const NETWORK_CAPTURE_LIMIT = 1_000;
|
|
3
|
+
export const networkCaptureControlSchema = z
|
|
4
|
+
.object({
|
|
5
|
+
captureId: z.string().min(1).max(100).nullable(),
|
|
6
|
+
})
|
|
7
|
+
.strict();
|
|
8
|
+
export const networkRequestRecordSchema = z
|
|
9
|
+
.object({
|
|
10
|
+
timestamp: z.number().int().nonnegative(),
|
|
11
|
+
processType: z.enum(["main", "host", "renderer", "cli"]),
|
|
12
|
+
pid: z.number().int().nonnegative(),
|
|
13
|
+
method: z.string().min(1).max(32),
|
|
14
|
+
url: z.string().max(2_048),
|
|
15
|
+
})
|
|
16
|
+
.strict();
|
|
17
|
+
export const networkCaptureBatchSchema = z
|
|
18
|
+
.object({
|
|
19
|
+
captureId: z.string().min(1).max(100),
|
|
20
|
+
records: z.array(networkRequestRecordSchema).max(100),
|
|
21
|
+
dropped: z.number().int().nonnegative(),
|
|
22
|
+
})
|
|
23
|
+
.strict();
|
|
24
|
+
/** 不保留凭据、fragment 或查询值;仍保留路径和查询键用于辨认请求。 */
|
|
25
|
+
export function sanitizeNetworkCaptureUrl(value) {
|
|
26
|
+
try {
|
|
27
|
+
const url = new URL(value);
|
|
28
|
+
if (!["http:", "https:", "ws:", "wss:"].includes(url.protocol))
|
|
29
|
+
return;
|
|
30
|
+
url.username = "";
|
|
31
|
+
url.password = "";
|
|
32
|
+
url.hash = "";
|
|
33
|
+
for (const key of new Set(url.searchParams.keys()))
|
|
34
|
+
url.searchParams.set(key, "[redacted]");
|
|
35
|
+
return url.href.slice(0, 2_048);
|
|
36
|
+
}
|
|
37
|
+
catch {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=networkCapture.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type GenUiScope } from "../gen-ui/index.js";
|
|
2
|
+
/** Execution Host supplies this process-scoped root; models never choose it. */
|
|
3
|
+
export declare const GEN_UI_OUTPUT_ROOT_ENV = "DCODE_GEN_UI_OUTPUT_ROOT";
|
|
4
|
+
export declare const GEN_UI_OUTPUT_DIRECTORY = "visualizations";
|
|
5
|
+
export declare function getGenUiOutputDirectory(outputRoot: string, scope: GenUiScope): string;
|
|
6
|
+
//# sourceMappingURL=genUiPaths.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { isAbsolute, join, resolve } from "node:path";
|
|
3
|
+
import { buildGenUiScopeKey, genUiScopeSchema } from "../gen-ui/index.js";
|
|
4
|
+
/** Execution Host supplies this process-scoped root; models never choose it. */
|
|
5
|
+
export const GEN_UI_OUTPUT_ROOT_ENV = "DCODE_GEN_UI_OUTPUT_ROOT";
|
|
6
|
+
export const GEN_UI_OUTPUT_DIRECTORY = "visualizations";
|
|
7
|
+
export function getGenUiOutputDirectory(outputRoot, scope) {
|
|
8
|
+
genUiScopeSchema.parse(scope);
|
|
9
|
+
if (!isAbsolute(outputRoot) || !isAbsolute(scope.workspacePath))
|
|
10
|
+
throw new Error("Gen UI output root and workspace must be absolute");
|
|
11
|
+
const root = resolve(outputRoot);
|
|
12
|
+
// 根因:固定输出目录被误当成工作区外限制,打开 Home 时会阻断上下文初始化。
|
|
13
|
+
// 目录由 Host 决定;工作区可以包含它,workspace/session 子目录只负责组织生成文件。
|
|
14
|
+
return join(root, createHash("sha256").update(buildGenUiScopeKey(scope)).digest("hex"));
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=genUiPaths.js.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
import { dirname, join, parse, resolve } from "node:path";
|
|
3
|
+
import { getGenUiOutputDirectory } from "./genUiPaths.js";
|
|
4
|
+
const scope = { workspacePath: resolve("workspace"), sessionId: "session" };
|
|
5
|
+
const root = resolve("user-data", "visualizations");
|
|
6
|
+
describe("Gen UI output directory", () => {
|
|
7
|
+
it("isolates sessions and workspace identities with a stable safe path", () => {
|
|
8
|
+
const directory = getGenUiOutputDirectory(root, scope);
|
|
9
|
+
expect(directory).toMatch(/[a-f0-9]{64}$/u);
|
|
10
|
+
expect(getGenUiOutputDirectory(root, { ...scope })).toBe(directory);
|
|
11
|
+
expect(getGenUiOutputDirectory(root, { ...scope, sessionId: "../other" })).not.toBe(directory);
|
|
12
|
+
expect(getGenUiOutputDirectory(root, { ...scope, workspaceIdentity: "ssh:first:/workspace" })).not.toBe(directory);
|
|
13
|
+
const remote = { ...scope, workspaceIdentity: "ssh:first:/workspace" };
|
|
14
|
+
expect(getGenUiOutputDirectory(root, { ...remote, workspacePath: resolve("other-path") })).toBe(getGenUiOutputDirectory(root, remote));
|
|
15
|
+
expect(getGenUiOutputDirectory(root, { ...remote, workspaceIdentity: "ssh:second:/workspace" })).not.toBe(getGenUiOutputDirectory(root, remote));
|
|
16
|
+
});
|
|
17
|
+
it.each([undefined, "ssh:executor:/home/dev"])("allows the fixed output root within or equal to the workspace (%s)", (workspaceIdentity) => {
|
|
18
|
+
for (const outputRoot of [scope.workspacePath, join(scope.workspacePath, ".dcode")]) {
|
|
19
|
+
const directory = getGenUiOutputDirectory(outputRoot, { ...scope, workspaceIdentity });
|
|
20
|
+
expect(dirname(directory)).toBe(outputRoot);
|
|
21
|
+
expect(directory).not.toBe(outputRoot);
|
|
22
|
+
}
|
|
23
|
+
expect(dirname(getGenUiOutputDirectory(root, { ...scope, workspacePath: parse(root).root }))).toBe(root);
|
|
24
|
+
});
|
|
25
|
+
it("rejects relative roots and workspace paths", () => {
|
|
26
|
+
expect(() => getGenUiOutputDirectory("relative", scope)).toThrow();
|
|
27
|
+
expect(() => getGenUiOutputDirectory(root, { ...scope, workspacePath: "relative" })).toThrow();
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
//# sourceMappingURL=genUiPaths.test.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type NetworkCaptureBatch, type NetworkRequestRecord } from "../networkCapture.js";
|
|
2
|
+
/** MCP 的 HTTP/SSE/OAuth 共用此异步上下文,不影响原 fetch 的代理与证书策略。 */
|
|
3
|
+
export declare function withoutNetworkCapture<T>(operation: () => T): T;
|
|
4
|
+
/** 仅订阅请求创建事件;不开启时不持有监听器或定时器,不读取流。 */
|
|
5
|
+
export declare function createNodeNetworkCapture(processType: NetworkRequestRecord["processType"], onBatch: (batch: NetworkCaptureBatch) => void): {
|
|
6
|
+
setCaptureId(captureId: string | null): void;
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=networkCapture.d.ts.map
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { AsyncLocalStorage } from "node:async_hooks";
|
|
2
|
+
import { channel } from "node:diagnostics_channel";
|
|
3
|
+
import { sanitizeNetworkCaptureUrl, } from "../networkCapture.js";
|
|
4
|
+
const excluded = new AsyncLocalStorage();
|
|
5
|
+
/** MCP 的 HTTP/SSE/OAuth 共用此异步上下文,不影响原 fetch 的代理与证书策略。 */
|
|
6
|
+
export function withoutNetworkCapture(operation) {
|
|
7
|
+
return excluded.run(true, operation);
|
|
8
|
+
}
|
|
9
|
+
/** 仅订阅请求创建事件;不开启时不持有监听器或定时器,不读取流。 */
|
|
10
|
+
export function createNodeNetworkCapture(processType, onBatch) {
|
|
11
|
+
let captureId = null;
|
|
12
|
+
let records = [];
|
|
13
|
+
let dropped = 0;
|
|
14
|
+
let timer;
|
|
15
|
+
const flush = () => {
|
|
16
|
+
timer = undefined;
|
|
17
|
+
if (!captureId)
|
|
18
|
+
return;
|
|
19
|
+
const batch = { captureId, records, dropped };
|
|
20
|
+
records = [];
|
|
21
|
+
dropped = 0;
|
|
22
|
+
// 诊断消费者退出或抛错不能破坏业务请求。
|
|
23
|
+
try {
|
|
24
|
+
onBatch(batch);
|
|
25
|
+
}
|
|
26
|
+
catch {
|
|
27
|
+
/* 仅丢弃观测 */
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
const record = (method, rawUrl) => {
|
|
31
|
+
if (!captureId || excluded.getStore() || method === "CONNECT")
|
|
32
|
+
return;
|
|
33
|
+
if (records.length >= 100) {
|
|
34
|
+
dropped++;
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
const url = sanitizeNetworkCaptureUrl(rawUrl);
|
|
38
|
+
if (!url)
|
|
39
|
+
return;
|
|
40
|
+
records.push({
|
|
41
|
+
timestamp: Date.now(),
|
|
42
|
+
processType,
|
|
43
|
+
pid: process.pid,
|
|
44
|
+
method: method.slice(0, 32),
|
|
45
|
+
url,
|
|
46
|
+
});
|
|
47
|
+
timer ??= setTimeout(flush, 250);
|
|
48
|
+
timer.unref();
|
|
49
|
+
};
|
|
50
|
+
const undici = (message) => {
|
|
51
|
+
try {
|
|
52
|
+
const { request } = message;
|
|
53
|
+
const url = new URL(request.path, request.origin);
|
|
54
|
+
if (request.upgrade?.toLowerCase() === "websocket")
|
|
55
|
+
url.protocol = url.protocol === "https:" ? "wss:" : "ws:";
|
|
56
|
+
record(request.method, url.href);
|
|
57
|
+
}
|
|
58
|
+
catch {
|
|
59
|
+
/* 非标准客户端的诊断事件不影响请求 */
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
const http = (message) => {
|
|
63
|
+
try {
|
|
64
|
+
const { request } = message;
|
|
65
|
+
// forward proxy 的 path 已是绝对 URL;不可把代理地址当作目标地址。
|
|
66
|
+
const url = new URL(request.path, `${request.protocol}//${String(request.getHeader("host") ?? request.host)}`);
|
|
67
|
+
if (String(request.getHeader("upgrade")).toLowerCase() === "websocket")
|
|
68
|
+
url.protocol = url.protocol === "https:" ? "wss:" : "ws:";
|
|
69
|
+
record(request.method, url.href);
|
|
70
|
+
}
|
|
71
|
+
catch {
|
|
72
|
+
/* 仅忽略不可识别的元数据 */
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
return {
|
|
76
|
+
setCaptureId(next) {
|
|
77
|
+
if (captureId === next)
|
|
78
|
+
return;
|
|
79
|
+
if (captureId) {
|
|
80
|
+
channel("undici:request:create").unsubscribe(undici);
|
|
81
|
+
channel("http.client.request.start").unsubscribe(http);
|
|
82
|
+
}
|
|
83
|
+
if (timer)
|
|
84
|
+
clearTimeout(timer);
|
|
85
|
+
timer = undefined;
|
|
86
|
+
records = [];
|
|
87
|
+
dropped = 0;
|
|
88
|
+
captureId = next;
|
|
89
|
+
if (captureId) {
|
|
90
|
+
channel("undici:request:create").subscribe(undici);
|
|
91
|
+
channel("http.client.request.start").subscribe(http);
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=networkCapture.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
interface OfficialPluginCacheRoot {
|
|
1
|
+
export interface OfficialPluginCacheRoot {
|
|
2
2
|
/** 缓存目录名,即官方插件 name。 */
|
|
3
3
|
name: string;
|
|
4
4
|
/** 数字感知降序后的可用版本目录,首项为最新版本。 */
|
|
@@ -10,5 +10,4 @@ interface OfficialPluginCacheRoot {
|
|
|
10
10
|
* 版本目录跳过 CLI 的备份 / seed 锁 / 临时目录,并按数字感知降序排序,与 CLI 回退选取一致。
|
|
11
11
|
*/
|
|
12
12
|
export declare function scanOfficialPluginCacheRoots(pluginStorageRoot: string): Promise<OfficialPluginCacheRoot[]>;
|
|
13
|
-
export {};
|
|
14
13
|
//# sourceMappingURL=officialPluginCache.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
interface SubagentMarkdownMigrationResult {
|
|
1
|
+
export interface SubagentMarkdownMigrationResult {
|
|
2
2
|
migrated: string[];
|
|
3
3
|
failures: Array<{
|
|
4
4
|
path: string;
|
|
@@ -9,5 +9,4 @@ interface SubagentMarkdownMigrationResult {
|
|
|
9
9
|
export declare function migrateSubagentStateFile(path: string): Promise<void>;
|
|
10
10
|
/** 调用方只传所属环境的用户 agents 根目录;项目/插件不得进入自动写入入口。 */
|
|
11
11
|
export declare function migrateUserSubagentMarkdown(userRoot: string): Promise<SubagentMarkdownMigrationResult>;
|
|
12
|
-
export {};
|
|
13
12
|
//# sourceMappingURL=subagentMarkdownMigration.d.ts.map
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
* This subpath must not be imported by renderer/browser bundles.
|
|
5
5
|
*/
|
|
6
6
|
export { acquireFileLock } from "./node/atomicFileLock.js";
|
|
7
|
+
export { createNodeNetworkCapture, withoutNetworkCapture } from "./node/networkCapture.js";
|
|
8
|
+
export { GEN_UI_OUTPUT_ROOT_ENV, GEN_UI_OUTPUT_DIRECTORY, getGenUiOutputDirectory, } from "./node/genUiPaths.js";
|
|
7
9
|
export { scanOfficialPluginCacheRoots } from "./node/officialPluginCache.js";
|
|
8
10
|
export { migrateUserSubagentMarkdown, migrateSubagentStateFile, } from "./node/subagentMarkdownMigration.js";
|
|
9
11
|
export { atomicWritePrivateTextFile, backupCorruptFile, withFileLock, type SharedFileLockOptions, } from "./node/privateFilePersistence.js";
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
* This subpath must not be imported by renderer/browser bundles.
|
|
5
5
|
*/
|
|
6
6
|
export { acquireFileLock } from "./node/atomicFileLock.js";
|
|
7
|
+
export { createNodeNetworkCapture, withoutNetworkCapture } from "./node/networkCapture.js";
|
|
8
|
+
export { GEN_UI_OUTPUT_ROOT_ENV, GEN_UI_OUTPUT_DIRECTORY, getGenUiOutputDirectory, } from "./node/genUiPaths.js";
|
|
7
9
|
export { scanOfficialPluginCacheRoots } from "./node/officialPluginCache.js";
|
|
8
10
|
export { migrateUserSubagentMarkdown, migrateSubagentStateFile, } from "./node/subagentMarkdownMigration.js";
|
|
9
11
|
export { atomicWritePrivateTextFile, backupCorruptFile, withFileLock, } from "./node/privateFilePersistence.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface OutputStyle {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
content: string;
|
|
6
|
+
isBuiltIn: boolean;
|
|
7
|
+
enabled: boolean;
|
|
8
|
+
filePath?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface OutputStyleConfig {
|
|
11
|
+
name: string;
|
|
12
|
+
description: string;
|
|
13
|
+
content: string;
|
|
14
|
+
enabled?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export type OutputStyleGenerationStatus = 'idle' | 'generating' | 'completed' | 'error';
|
|
17
|
+
//# sourceMappingURL=output-style.d.ts.map
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { DockerConnectOptions, RemoteTarget, SSHConnectOptions, WSLConnectOptions } from "./remoteTarget.js";
|
|
2
|
+
import type { PluginSandboxPlatformPort } from "./mcp-apps/contract.js";
|
|
2
3
|
import type { LoadCliMcpFromUserDirectoryRequest, LoadCliMcpFromUserDirectoryResult, MigrateLegacyCommonMcpRequest, MigrateLegacyCommonMcpResult, SaveCliMcpToUserDirectoryRequest } from "./mcp.js";
|
|
3
4
|
import type { OAuthStateRegistration } from "./oauth.js";
|
|
5
|
+
import type { WebRemoteControlContext, WebRemoteControlReconnectWorkspaceResult, WebRemoteControlStartOperationResult, WebRemoteControlStatus, WebRemoteControlTaskTarget, WebRemoteControlReconnectWorkspaceRequest, WebRemoteControlWorkspaceTarget } from "./web-remote-control.js";
|
|
4
6
|
import type { AppSettings, Locale } from "./protocol.js";
|
|
5
7
|
import type { ArmsCustomEventPayload, RendererTelemetryEventPayload } from "./telemetry.js";
|
|
6
8
|
import type { RendererActionTraceBatchV1, RendererActionTraceConfigV1 } from "./rendererActionTrace.js";
|
|
@@ -173,6 +175,25 @@ export interface CreateTempTextAttachmentResult {
|
|
|
173
175
|
mimeType: "text/plain";
|
|
174
176
|
sizeBytes: number;
|
|
175
177
|
}
|
|
178
|
+
/**
|
|
179
|
+
* dwf 产物「作为文件打开」:把某一版产物的字节落成宿主本机上的一份副本
|
|
180
|
+
* (docs/dynamic-workflow/authoring.md「How the user sees them」)。
|
|
181
|
+
*
|
|
182
|
+
* ⚠ 术语:artifact = 脚本经 `artifact.*` 发布给用户看的产出,不是引擎的 `RunSettlement.artifact`。
|
|
183
|
+
*/
|
|
184
|
+
export interface MaterializeWorkflowArtifactFileRequest {
|
|
185
|
+
runId: string;
|
|
186
|
+
artifactId: string;
|
|
187
|
+
/** 这份字节属于哪一版;副本按版本分目录,一版一份。 */
|
|
188
|
+
version: number;
|
|
189
|
+
/** 期望的文件名(含扩展名,扩展名决定系统用哪个 App 打开);宿主会再清洗一次。 */
|
|
190
|
+
fileName: string;
|
|
191
|
+
bytes: Uint8Array;
|
|
192
|
+
}
|
|
193
|
+
export interface MaterializeWorkflowArtifactFileResult {
|
|
194
|
+
/** 副本在宿主本机上的绝对路径。 */
|
|
195
|
+
localPath: string;
|
|
196
|
+
}
|
|
176
197
|
export type SaveFileRequest = {
|
|
177
198
|
data: ArrayBuffer;
|
|
178
199
|
sourceUrl?: never;
|
|
@@ -195,7 +216,7 @@ export interface PrintPageToPdfResult {
|
|
|
195
216
|
/** "print_in_progress" | "print_failed" */
|
|
196
217
|
error?: string;
|
|
197
218
|
}
|
|
198
|
-
export declare function createOpenInEditorRemoteTarget(target: RemoteTarget): OpenInEditorRemoteTarget;
|
|
219
|
+
export declare function createOpenInEditorRemoteTarget(target: RemoteTarget): OpenInEditorRemoteTarget | undefined;
|
|
199
220
|
export interface WSLDistro {
|
|
200
221
|
name: string;
|
|
201
222
|
isDefault: boolean;
|
|
@@ -270,6 +291,17 @@ export interface WindowControlsOverlayReadyPayload {
|
|
|
270
291
|
export interface DesktopZoomState {
|
|
271
292
|
zoomLevel: number;
|
|
272
293
|
}
|
|
294
|
+
/**
|
|
295
|
+
* 桌面端"关闭驻留托盘"能力(spec:docs/desktop/linux-close-to-tray.md)。
|
|
296
|
+
* Linux 上取决于 session DBus 是否有 StatusNotifierWatcher(KDE/XFCE 原生有,
|
|
297
|
+
* GNOME 需 AppIndicator 扩展);Windows 固定 supported=true;macOS/Web 不查询。
|
|
298
|
+
*/
|
|
299
|
+
export interface DesktopCloseToTrayCapability {
|
|
300
|
+
/** 关闭驻留托盘是否可用 */
|
|
301
|
+
supported: boolean;
|
|
302
|
+
/** 是否为 GNOME 系桌面且无托盘;设置页据此追加"安装 AppIndicator 扩展"提示 */
|
|
303
|
+
gnomeLikeWithoutTray: boolean;
|
|
304
|
+
}
|
|
273
305
|
export interface DesktopWindowChromeState {
|
|
274
306
|
isMaximized: boolean;
|
|
275
307
|
/** 本机 macOS 主版本;非 macOS 或无法解析时为 null。 */
|
|
@@ -305,6 +337,79 @@ export interface EmbeddedBrowserOpenUrlRequest {
|
|
|
305
337
|
browserGeneration?: number;
|
|
306
338
|
sourceTabId?: string;
|
|
307
339
|
}
|
|
340
|
+
export interface EmbeddedBrowserPermissionDeviceOption {
|
|
341
|
+
deviceId: string;
|
|
342
|
+
name?: string;
|
|
343
|
+
vendorId?: number;
|
|
344
|
+
productId?: number;
|
|
345
|
+
serialNumber?: string;
|
|
346
|
+
}
|
|
347
|
+
export interface EmbeddedBrowserPermissionScreenOption {
|
|
348
|
+
sourceId: string;
|
|
349
|
+
name: string;
|
|
350
|
+
/** 源类型:整个屏幕 / 窗口,由 main 按 desktopCapturer source id 前缀判定。 */
|
|
351
|
+
kind: "screen" | "window";
|
|
352
|
+
thumbnailDataUrl?: string;
|
|
353
|
+
}
|
|
354
|
+
/** Main → Renderer 的内置浏览器权限弹窗请求;kind 决定 renderer 渲染哪类弹窗。 */
|
|
355
|
+
export type EmbeddedBrowserPermissionPromptEvent = {
|
|
356
|
+
requestId: string;
|
|
357
|
+
kind: "permission";
|
|
358
|
+
origin: string;
|
|
359
|
+
permission: string;
|
|
360
|
+
mediaTypes?: string[];
|
|
361
|
+
/** 发起请求的 guest webContents id;renderer 据此只在归属 tab 渲染,
|
|
362
|
+
* 避免后台 tab 的请求显示在当前 tab 造成误批准。 */
|
|
363
|
+
guestWebContentsId?: number;
|
|
364
|
+
} | {
|
|
365
|
+
requestId: string;
|
|
366
|
+
kind: "screen-share";
|
|
367
|
+
origin: string;
|
|
368
|
+
screens: EmbeddedBrowserPermissionScreenOption[];
|
|
369
|
+
/** 屏幕共享无 tab 锚定语义,恒缺省(兜底渲染)。 */
|
|
370
|
+
guestWebContentsId?: number;
|
|
371
|
+
} | {
|
|
372
|
+
requestId: string;
|
|
373
|
+
kind: "device";
|
|
374
|
+
origin: string;
|
|
375
|
+
/** select-hid-device / select-usb-device / select-serial-port / select-bluetooth-device */
|
|
376
|
+
permission: string;
|
|
377
|
+
devices: EmbeddedBrowserPermissionDeviceOption[];
|
|
378
|
+
/** 发起请求的 guest webContents id(serial/蓝牙可取到;hid/usb 受 frame 限制
|
|
379
|
+
* 缺省,renderer 兜底渲染)。 */
|
|
380
|
+
guestWebContentsId?: number;
|
|
381
|
+
};
|
|
382
|
+
export type EmbeddedBrowserPermissionResolution = {
|
|
383
|
+
action: "allow-always";
|
|
384
|
+
} | {
|
|
385
|
+
action: "allow-session";
|
|
386
|
+
} | {
|
|
387
|
+
action: "block-always";
|
|
388
|
+
} | {
|
|
389
|
+
action: "dismiss";
|
|
390
|
+
} | {
|
|
391
|
+
action: "share-screen";
|
|
392
|
+
sourceId: string;
|
|
393
|
+
} | {
|
|
394
|
+
action: "select-device";
|
|
395
|
+
deviceId: string;
|
|
396
|
+
} | {
|
|
397
|
+
action: "cancel";
|
|
398
|
+
};
|
|
399
|
+
export interface EmbeddedBrowserPermissionResolveRequest {
|
|
400
|
+
requestId: string;
|
|
401
|
+
resolution: EmbeddedBrowserPermissionResolution;
|
|
402
|
+
}
|
|
403
|
+
export type EmbeddedBrowserSitePermissionsSnapshot = Record<string, Record<string, "allow" | "deny">>;
|
|
404
|
+
export interface EmbeddedBrowserSitePermissionUpdateRequest {
|
|
405
|
+
origin: string;
|
|
406
|
+
permission: string;
|
|
407
|
+
/** "ask" 表示删除该条记录,回到每次询问。 */
|
|
408
|
+
state: "allow" | "deny" | "ask";
|
|
409
|
+
}
|
|
410
|
+
export interface EmbeddedBrowserSitePermissionResetRequest {
|
|
411
|
+
origin: string;
|
|
412
|
+
}
|
|
308
413
|
export interface BotRemoteWorkspaceReconnectedEvent {
|
|
309
414
|
sessionId: string;
|
|
310
415
|
workspacePath: string;
|
|
@@ -387,6 +492,11 @@ export type CuaOsSupport = {
|
|
|
387
492
|
export interface IPlatformService {
|
|
388
493
|
/** 当前平台的文件选择框是否能返回 agent 可访问的本地绝对路径 */
|
|
389
494
|
canSelectFilePath?: boolean;
|
|
495
|
+
/**
|
|
496
|
+
* 插件 UI 沙箱平台端口。只有桌面端实现;
|
|
497
|
+
* web / 手机远控为 undefined,plugin-ui 据此回退到普通 MCP 工具卡片。
|
|
498
|
+
*/
|
|
499
|
+
pluginSandbox?: PluginSandboxPlatformPort;
|
|
390
500
|
/** 打开系统目录选择框,返回选中路径或 null */
|
|
391
501
|
selectDirectory(): Promise<string | null>;
|
|
392
502
|
/** 打开系统文件选择框,返回选中文件路径或 null */
|
|
@@ -412,6 +522,11 @@ export interface IPlatformService {
|
|
|
412
522
|
* 手机远控必须通过 shared-host/platform proxy 写到桌面宿主,避免大文本进入 prompt payload。
|
|
413
523
|
*/
|
|
414
524
|
createTempTextAttachment?(payload: CreateTempTextAttachmentRequest): Promise<CreateTempTextAttachmentResult>;
|
|
525
|
+
/**
|
|
526
|
+
* 把 dwf 产物某一版的字节写成宿主本机上的一份副本(只在路径为空时写),返回其路径。
|
|
527
|
+
* 仅 Desktop 实现:手机远控与普通 Web 端没有「用本机 App 打开文件」的能力,缺席即不出入口。
|
|
528
|
+
*/
|
|
529
|
+
materializeWorkflowArtifactFile?(payload: MaterializeWorkflowArtifactFileRequest): Promise<MaterializeWorkflowArtifactFileResult>;
|
|
415
530
|
/** 订阅当前窗口内远程连接过程日志,返回 disposer */
|
|
416
531
|
onRemoteConnectionLog(handler: (entry: RemoteConnectionRuntimeLog) => void): () => void;
|
|
417
532
|
/** 订阅远程 workspace session 关闭事件,返回 disposer */
|
|
@@ -436,6 +551,16 @@ export interface IPlatformService {
|
|
|
436
551
|
cancelPendingRemoteConnection?(requestId?: string): Promise<void>;
|
|
437
552
|
/** 将 canonical workspace 身份绑定到已创建的远程 logical session。 */
|
|
438
553
|
bindRemoteWorkspaceSessionContext?(context: BindRemoteWorkspaceSessionContextRequest): Promise<void>;
|
|
554
|
+
/** 为当前 workspace 开启 Web 远程控制能力 */
|
|
555
|
+
startWebRemoteControl(context: WebRemoteControlContext): Promise<WebRemoteControlStartOperationResult>;
|
|
556
|
+
/** 清除旧配对材料并重新生成 Web 远程控制二维码 */
|
|
557
|
+
refreshWebRemoteControlPairing(context: WebRemoteControlContext): Promise<WebRemoteControlStartOperationResult>;
|
|
558
|
+
/** 关闭当前窗口已开启的 Web 远程控制能力 */
|
|
559
|
+
stopWebRemoteControl(): Promise<void>;
|
|
560
|
+
/** 查询当前窗口 Web 远程控制状态 */
|
|
561
|
+
getWebRemoteControlStatus(): Promise<WebRemoteControlStatus>;
|
|
562
|
+
/** 订阅当前窗口 Web 远程控制状态变化;旧平台可不实现,UI 会保留轮询兜底 */
|
|
563
|
+
onWebRemoteControlStatusChanged?(handler: (status: WebRemoteControlStatus) => void): () => void;
|
|
439
564
|
/** 释放当前窗口里已创建的远程 session */
|
|
440
565
|
disposeRemoteSession(sessionId: string): Promise<void>;
|
|
441
566
|
/** 检查本机 Docker daemon 是否可用 */
|
|
@@ -529,12 +654,23 @@ export interface IPlatformService {
|
|
|
529
654
|
reportRendererHeapSample?(sample: RendererHeapSample): void;
|
|
530
655
|
/** 同步当前窗口所有 tab 的 workspace 路径到 main 进程(用于跨窗口去重) */
|
|
531
656
|
syncWindowTabs(paths: string[]): void;
|
|
657
|
+
/** 同步当前窗口里 Web 远程控制允许切换的 workspace;Web fallback 可忽略 */
|
|
658
|
+
syncWebRemoteControlWorkspaces?(workspaces: WebRemoteControlWorkspaceTarget[]): void;
|
|
659
|
+
/** 同步当前窗口里 Web 远程控制可展示的 task 快照;Web fallback 可忽略 */
|
|
660
|
+
syncWebRemoteControlTasks?(tasks: WebRemoteControlTaskTarget[]): void;
|
|
661
|
+
/** 注册 Web 远程控制手机端请求重连 workspace 的回调,返回 disposer */
|
|
662
|
+
onWebRemoteControlReconnectWorkspace?(handler: (request: WebRemoteControlReconnectWorkspaceRequest) => Promise<WebRemoteControlReconnectWorkspaceResult>): () => void;
|
|
532
663
|
/** 同步当前窗口的未读 task 数给宿主环境,用于 Dock / 任务栏徽标聚合 */
|
|
533
664
|
syncWindowUnreadCount(count: number): void;
|
|
534
665
|
/** 当前窗口 active task 变化;Main 只在该窗口前台时发布全局 PiP focus。 */
|
|
535
666
|
syncActiveTaskSession(sessionId: string | null): void;
|
|
536
667
|
/** 同步需要 main 进程即时感知的应用设置;Web fallback 可忽略 */
|
|
537
668
|
syncAppSettings?(patch: Partial<AppSettings>): void;
|
|
669
|
+
/**
|
|
670
|
+
* 查询"关闭驻留托盘"能力;桌面端 main 进程探测后返回,Web/手机远控无桥不实现。
|
|
671
|
+
* 设置页据此决定 Linux 上的开关是否置灰。
|
|
672
|
+
*/
|
|
673
|
+
getCloseToTrayCapability?(): Promise<DesktopCloseToTrayCapability>;
|
|
538
674
|
/** 快捷键设置页录制态开关;桌面端 main 据此暂时摘除可配置菜单 accelerator,Web 可忽略 */
|
|
539
675
|
setShortcutRecordingActive?(active: boolean): void;
|
|
540
676
|
/** 注册 main 进程要求聚焦某个 workspace tab 的回调,返回 disposer */
|
|
@@ -545,6 +681,18 @@ export interface IPlatformService {
|
|
|
545
681
|
onCloseActiveContextRequest?(handler: () => void): () => void;
|
|
546
682
|
/** 注册内置浏览器 webview 请求打开新页面的回调,返回 disposer */
|
|
547
683
|
onOpenBrowserUrl?(handler: (request: EmbeddedBrowserOpenUrlRequest) => void): () => void;
|
|
684
|
+
/** 注册内置浏览器网页权限弹窗请求(main → renderer),返回 disposer */
|
|
685
|
+
onEmbeddedBrowserPermissionPrompt?(handler: (event: EmbeddedBrowserPermissionPromptEvent) => void): () => void;
|
|
686
|
+
/** 回传用户对内置浏览器权限弹窗的决策(renderer → main) */
|
|
687
|
+
resolveEmbeddedBrowserPermissionPrompt?(request: EmbeddedBrowserPermissionResolveRequest): void;
|
|
688
|
+
/** 读取内置浏览器站点权限记录(设置页「网站权限」) */
|
|
689
|
+
getEmbeddedBrowserSitePermissions?(): Promise<EmbeddedBrowserSitePermissionsSnapshot>;
|
|
690
|
+
/** 修改/删除单条站点权限;返回更新后的快照 */
|
|
691
|
+
setEmbeddedBrowserSitePermission?(request: EmbeddedBrowserSitePermissionUpdateRequest): Promise<EmbeddedBrowserSitePermissionsSnapshot>;
|
|
692
|
+
/** 清空全部站点权限记录 */
|
|
693
|
+
clearEmbeddedBrowserSitePermissions?(): Promise<EmbeddedBrowserSitePermissionsSnapshot>;
|
|
694
|
+
/** 重置单个站点的全部权限记录(删除该 origin 下所有持久决定);返回更新后的快照 */
|
|
695
|
+
resetEmbeddedBrowserSitePermission?(request: EmbeddedBrowserSitePermissionResetRequest): Promise<EmbeddedBrowserSitePermissionsSnapshot>;
|
|
548
696
|
/** 注册 agent 首次 browser 命令建好受控 view 的回调(自动开 browser-use tab),返回 disposer */
|
|
549
697
|
onBrowserViewReady?(handler: (payload: {
|
|
550
698
|
workspaceKey: string;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { Locale } from "./protocol.js";
|
|
2
|
+
export interface PostUpdateReleaseNotesPayload {
|
|
3
|
+
version: string;
|
|
4
|
+
title: string;
|
|
5
|
+
markdown: string;
|
|
6
|
+
releaseDate?: string;
|
|
7
|
+
releaseNotesByLocale?: Partial<Record<Locale, {
|
|
8
|
+
title: string;
|
|
9
|
+
markdown: string;
|
|
10
|
+
}>>;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* 用户从菜单手动点击"检查更新"后,main 进程回传给 renderer 的结果。
|
|
14
|
+
* Renderer 根据 kind 展示对应的 toast;不要与启动时的自动 check 混用。
|
|
15
|
+
*/
|
|
16
|
+
export type UpdateCheckResultPayload = {
|
|
17
|
+
kind: "up-to-date";
|
|
18
|
+
currentVersion: string;
|
|
19
|
+
} | {
|
|
20
|
+
kind: "downloading";
|
|
21
|
+
version: string;
|
|
22
|
+
} | {
|
|
23
|
+
kind: "already-downloading";
|
|
24
|
+
version: string;
|
|
25
|
+
progress: string;
|
|
26
|
+
} | {
|
|
27
|
+
kind: "ready";
|
|
28
|
+
version: string;
|
|
29
|
+
} | {
|
|
30
|
+
kind: "dev-skipped";
|
|
31
|
+
} | {
|
|
32
|
+
kind: "error";
|
|
33
|
+
message: string;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* 桌面自动更新器的持续状态,用于同步原生菜单和 Windows 自绘标题栏菜单。
|
|
37
|
+
*/
|
|
38
|
+
export type UpdateStatePayload = {
|
|
39
|
+
kind: "idle";
|
|
40
|
+
enabled: boolean;
|
|
41
|
+
} | {
|
|
42
|
+
kind: "checking";
|
|
43
|
+
enabled: boolean;
|
|
44
|
+
} | {
|
|
45
|
+
kind: "update-available";
|
|
46
|
+
enabled: boolean;
|
|
47
|
+
version: string;
|
|
48
|
+
releaseNotes?: PostUpdateReleaseNotesPayload;
|
|
49
|
+
} | {
|
|
50
|
+
kind: "download-progress";
|
|
51
|
+
enabled: boolean;
|
|
52
|
+
progress: string;
|
|
53
|
+
version?: string;
|
|
54
|
+
releaseNotes?: PostUpdateReleaseNotesPayload;
|
|
55
|
+
} | {
|
|
56
|
+
kind: "update-downloaded";
|
|
57
|
+
enabled: boolean;
|
|
58
|
+
version: string;
|
|
59
|
+
releaseNotes?: PostUpdateReleaseNotesPayload;
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=platformUpdate.d.ts.map
|
|
@@ -7,6 +7,11 @@ export interface DefaultPluginMarketplace {
|
|
|
7
7
|
lastUpdated?: string;
|
|
8
8
|
}
|
|
9
9
|
export declare const DCODE_OFFICIAL_PLUGIN_MARKETPLACE_ID = "dcode-plugins-official";
|
|
10
|
+
/**
|
|
11
|
+
* Claude Code 官方市场(GitHub git 源)。它不是 DCode 的强依赖:GitHub 不可达时刷新必然失败,
|
|
12
|
+
* 该失败不应作为错误提示打扰用户,UI 侧按此 id 静默处理其刷新失败(任何原因)。
|
|
13
|
+
*/
|
|
14
|
+
export declare const CLAUDE_OFFICIAL_PLUGIN_MARKETPLACE_ID = "claude-plugins-official";
|
|
10
15
|
/** Settings 三类资源发现共用;Bootstrap 单测与官方 definition 的 defaultEnabled 机械对照。 */
|
|
11
16
|
export declare const DEFAULT_ENABLED_OFFICIAL_PLUGIN_IDS: ReadonlySet<string>;
|
|
12
17
|
export declare const DEFAULT_PLUGIN_MARKETPLACES: DefaultPluginMarketplace[];
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
export const DCODE_OFFICIAL_PLUGIN_MARKETPLACE_ID = "dcode-plugins-official";
|
|
2
|
+
/**
|
|
3
|
+
* Claude Code 官方市场(GitHub git 源)。它不是 DCode 的强依赖:GitHub 不可达时刷新必然失败,
|
|
4
|
+
* 该失败不应作为错误提示打扰用户,UI 侧按此 id 静默处理其刷新失败(任何原因)。
|
|
5
|
+
*/
|
|
6
|
+
export const CLAUDE_OFFICIAL_PLUGIN_MARKETPLACE_ID = "claude-plugins-official";
|
|
2
7
|
/** Settings 三类资源发现共用;Bootstrap 单测与官方 definition 的 defaultEnabled 机械对照。 */
|
|
3
8
|
export const DEFAULT_ENABLED_OFFICIAL_PLUGIN_IDS = new Set([
|
|
4
9
|
"browser-use@dcode-plugins-official",
|
|
@@ -14,30 +19,31 @@ export const DEFAULT_ENABLED_OFFICIAL_PLUGIN_IDS = new Set([
|
|
|
14
19
|
"skill-creator@dcode-plugins-official",
|
|
15
20
|
"plugin-creator@dcode-plugins-official",
|
|
16
21
|
"dcode-guide@dcode-plugins-official",
|
|
17
|
-
//
|
|
18
|
-
//
|
|
19
|
-
"
|
|
22
|
+
// visualize(交互视图)随 UI 插件合入时 CLI 定义已标 defaultEnabled,但这里漏加,
|
|
23
|
+
// Settings 会把它当成默认关闭,与 CLI 实际启用状态不一致。
|
|
24
|
+
"visualize@dcode-plugins-official",
|
|
25
|
+
// 电脑控制回退为默认关闭,故 computer-use 不在此名单内。
|
|
26
|
+
// 该集合必须与 official-plugin-definitions.ts 里标了 defaultEnabled 的插件逐一对应,
|
|
27
|
+
// bootstrap 的「Settings 默认启用集合与 CLI 的官方插件声明一致」单测机械对照两者。
|
|
20
28
|
]);
|
|
21
|
-
// 官方市场 source 解析:beta 期间 CDN(cdn-dcode.dipoleml.com)尚未上线,
|
|
22
|
-
// 可用 DCODE_OFFICIAL_MARKETPLACE_URL 指向本地 marketplace.json 或任意 http(s)/git 源;
|
|
23
|
-
// 未设置时回落到占位 CDN(上线后无需改代码,删除该 env 即可)。
|
|
24
|
-
function resolveOfficialMarketplaceSource() {
|
|
25
|
-
const override = typeof process !== "undefined" ? process.env.DCODE_OFFICIAL_MARKETPLACE_URL?.trim() : "";
|
|
26
|
-
return override || "https://cdn-dcode.dipoleml.com/dcode/official-plugin/marketplace.json";
|
|
27
|
-
}
|
|
28
29
|
export const DEFAULT_PLUGIN_MARKETPLACES = [
|
|
29
30
|
{
|
|
30
31
|
// DCode 官方唯一市场:本地 seed 分片与 CDN 分片在 Agent storage 内合并。
|
|
31
32
|
// CDN manifest 的 name 必须与该 canonical id 一致。
|
|
32
33
|
id: DCODE_OFFICIAL_PLUGIN_MARKETPLACE_ID,
|
|
33
|
-
|
|
34
|
-
get source() {
|
|
35
|
-
return resolveOfficialMarketplaceSource();
|
|
36
|
-
},
|
|
34
|
+
source: "https://cdn-dcode.dipoleml.com/dcode/official-plugin/marketplace.json",
|
|
37
35
|
name: DCODE_OFFICIAL_PLUGIN_MARKETPLACE_ID,
|
|
38
36
|
description: "Official DCode plugins marketplace: built-in and community plugins for DCode.",
|
|
39
37
|
pluginCount: 0,
|
|
40
38
|
},
|
|
39
|
+
{
|
|
40
|
+
id: CLAUDE_OFFICIAL_PLUGIN_MARKETPLACE_ID,
|
|
41
|
+
source: "anthropics/claude-plugins-official",
|
|
42
|
+
name: CLAUDE_OFFICIAL_PLUGIN_MARKETPLACE_ID,
|
|
43
|
+
description: "Directory of popular Claude Code extensions including development tools, productivity plugins, and MCP integrations",
|
|
44
|
+
// 只内置官方 catalog 来源,不把远端 manifest 快照打包进仓库;首次刷新前数量未知。
|
|
45
|
+
pluginCount: 0,
|
|
46
|
+
},
|
|
41
47
|
];
|
|
42
48
|
// 商店「公开」分段只有一个 DCode 官方市场 id,内置与 CDN 不再拆分身份。
|
|
43
49
|
export const PUBLIC_STORE_MARKETPLACE_IDS = [DCODE_OFFICIAL_PLUGIN_MARKETPLACE_ID];
|