@dipoleml/dcode-cli 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/THIRD-PARTY-NOTICES.md +1081 -12
- package/dist/dcode.cjs +59155 -45279
- 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 +6544 -183
- 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 +759 -11
- 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 +378 -74
- 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 +3215 -1800
- 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 +388 -57
- 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 +208 -103
- 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 +7728 -1585
- 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 +22 -1
- package/node_modules/@dcode/shared/dist/dcodeEndpoint.js +102 -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 +46 -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 +1542 -166
- package/node_modules/@dcode/shared/dist/validation.js +423 -14
- package/node_modules/@dcode/shared/dist/validationAppSettings.d.ts +70 -14
- 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 +5117 -2578
- package/node_modules/@dcode/tui/dist/tui.d.ts +3 -0
- package/node_modules/@dcode/tui/dist/tui.js +1 -1
- package/node_modules/@dcode/tui/dist/types.d.ts +1 -1
- package/node_modules/oniguruma-parser/LICENSE +1 -1
- package/node_modules/oniguruma-parser/README.md +15 -61
- package/node_modules/oniguruma-parser/dist/oniguruma-parser.min.js +4 -4
- package/node_modules/oniguruma-parser/dist/parser/parse.js +1 -1
- package/node_modules/oniguruma-parser/dist/traverser/traverse.js +1 -1
- package/node_modules/oniguruma-parser/package.json +5 -5
- package/node_modules/oniguruma-to-es/dist/cjs/generate.d.ts +1 -1
- package/node_modules/oniguruma-to-es/dist/cjs/index.js +121 -120
- package/node_modules/oniguruma-to-es/dist/cjs/subclass.d.ts +2 -2
- package/node_modules/oniguruma-to-es/dist/cjs/transform.d.ts +3 -5
- package/node_modules/oniguruma-to-es/dist/cjs/unicode.d.ts +1 -1
- package/node_modules/oniguruma-to-es/dist/esm/generate.d.ts +1 -1
- package/node_modules/oniguruma-to-es/dist/esm/index.js +1 -3
- package/node_modules/oniguruma-to-es/dist/esm/subclass.d.ts +2 -2
- package/node_modules/oniguruma-to-es/dist/esm/transform.d.ts +3 -5
- package/node_modules/oniguruma-to-es/dist/esm/unicode.d.ts +1 -1
- package/node_modules/oniguruma-to-es/dist/index.min.js +6 -6
- package/node_modules/oniguruma-to-es/package.json +5 -5
- package/package.json +5 -5
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import type { McpServerFailureKind, OfficialMcpAuthPortFailureReason } from "@dcode/shared";
|
|
2
|
+
import type { McpAppsToolVisibility, McpToolUiDescriptor } from "@dcode/shared/mcp-apps";
|
|
1
3
|
import type { JsonSchema } from "../model/index.js";
|
|
2
4
|
import type { TraceContext } from "../tracing/tracer.js";
|
|
3
|
-
import type { McpServerFailureKind, OfficialMcpAuthPortFailureReason } from "@dcode/shared";
|
|
4
5
|
export type McpServerTransportType = "stdio" | "http" | "sse";
|
|
5
6
|
export type McpProtocolVersion = "legacy" | "auto" | "2026-07-28";
|
|
6
7
|
export type McpServerIsolation = "session" | "workspace";
|
|
@@ -156,7 +157,20 @@ export interface McpToolDescriptor {
|
|
|
156
157
|
* `isOfficialMcpOriginTrusted`。
|
|
157
158
|
*/
|
|
158
159
|
official?: boolean;
|
|
160
|
+
/**
|
|
161
|
+
* 工具对谁开放(`_meta.ui.visibility`,缺省 `["model", "app"]`),与是否带 UI 资源无关。
|
|
162
|
+
* 不含 "model" 的工具不进 provider contracts;不含 "app" 的工具拒绝 `mcp/uiCallTool`。
|
|
163
|
+
* 由 adapter 归一化写入;缺省(旧 descriptor)时以 `ui.visibility` 兜底,再缺省视为两者都可见。
|
|
164
|
+
*/
|
|
165
|
+
visibility?: McpAppsToolVisibility[];
|
|
166
|
+
/**
|
|
167
|
+
* 工具 `_meta` 归一化后的插件 UI 呈现描述。
|
|
168
|
+
* 只有声明了合法 `ui://` resourceUri 的工具才有;其中的 visibility 与上面的字段同源。
|
|
169
|
+
*/
|
|
170
|
+
ui?: McpToolUiDescriptor;
|
|
159
171
|
}
|
|
172
|
+
/** 可见性判定的唯一实现:descriptor.visibility → ui.visibility → 两者都可见。 */
|
|
173
|
+
export declare function resolveMcpToolVisibility(descriptor: Pick<McpToolDescriptor, "visibility" | "ui">): McpAppsToolVisibility[];
|
|
160
174
|
export type McpContentBlock = Record<string, unknown>;
|
|
161
175
|
export interface McpToolCallResult {
|
|
162
176
|
content: McpContentBlock[];
|
|
@@ -164,6 +178,90 @@ export interface McpToolCallResult {
|
|
|
164
178
|
isError?: boolean;
|
|
165
179
|
_meta?: Record<string, unknown>;
|
|
166
180
|
}
|
|
181
|
+
export interface McpReadResourceRequest {
|
|
182
|
+
serverName: string;
|
|
183
|
+
uri: string;
|
|
184
|
+
trace?: TraceContext;
|
|
185
|
+
}
|
|
186
|
+
export interface McpResourceContent {
|
|
187
|
+
uri: string;
|
|
188
|
+
mimeType?: string;
|
|
189
|
+
text?: string;
|
|
190
|
+
blob?: string;
|
|
191
|
+
_meta?: Record<string, unknown>;
|
|
192
|
+
}
|
|
193
|
+
export interface McpReadResourceResult {
|
|
194
|
+
contents: McpResourceContent[];
|
|
195
|
+
}
|
|
196
|
+
/** `resources/list` / `resources/templates/list`(分页游标原样透传)。 */
|
|
197
|
+
export interface McpListResourcesRequest {
|
|
198
|
+
serverName: string;
|
|
199
|
+
cursor?: string;
|
|
200
|
+
trace?: TraceContext;
|
|
201
|
+
}
|
|
202
|
+
export interface McpResourceDescriptor {
|
|
203
|
+
uri: string;
|
|
204
|
+
name?: string;
|
|
205
|
+
title?: string;
|
|
206
|
+
description?: string;
|
|
207
|
+
mimeType?: string;
|
|
208
|
+
_meta?: Record<string, unknown>;
|
|
209
|
+
}
|
|
210
|
+
export interface McpListResourcesResult {
|
|
211
|
+
resources: McpResourceDescriptor[];
|
|
212
|
+
nextCursor?: string;
|
|
213
|
+
}
|
|
214
|
+
export interface McpResourceTemplateDescriptor {
|
|
215
|
+
uriTemplate: string;
|
|
216
|
+
name?: string;
|
|
217
|
+
title?: string;
|
|
218
|
+
description?: string;
|
|
219
|
+
mimeType?: string;
|
|
220
|
+
_meta?: Record<string, unknown>;
|
|
221
|
+
}
|
|
222
|
+
export interface McpListResourceTemplatesResult {
|
|
223
|
+
resourceTemplates: McpResourceTemplateDescriptor[];
|
|
224
|
+
nextCursor?: string;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* 资源订阅。`subscriberKey` 由调用方给出(bootstrap 用 sessionId|scopeId|generation),
|
|
228
|
+
* 登记表在连接层按 (serverName, uri) 计数:0→1 才真调 SDK subscribe,1→0 才 unsubscribe;断连重连后按登记表重放。
|
|
229
|
+
*/
|
|
230
|
+
export interface McpResourceSubscriptionRequest {
|
|
231
|
+
serverName: string;
|
|
232
|
+
uri: string;
|
|
233
|
+
subscriberKey: string;
|
|
234
|
+
trace?: TraceContext;
|
|
235
|
+
}
|
|
236
|
+
/** server 没有声明 `capabilities.resources.subscribe` 时抛出(协议层映射为 -32001 not_supported)。 */
|
|
237
|
+
export declare class McpResourceSubscribeUnsupportedError extends Error {
|
|
238
|
+
readonly serverName: string;
|
|
239
|
+
readonly code: "not_supported";
|
|
240
|
+
constructor(serverName: string);
|
|
241
|
+
}
|
|
242
|
+
/** server → client 通知,adapter 转成宿主可消费的形状;订阅类通知带当前登记的 subscriberKey。 */
|
|
243
|
+
export type McpServerNotification = {
|
|
244
|
+
kind: "resourceUpdated";
|
|
245
|
+
serverName: string;
|
|
246
|
+
uri: string;
|
|
247
|
+
subscribers: string[];
|
|
248
|
+
} | {
|
|
249
|
+
kind: "resourceListChanged";
|
|
250
|
+
serverName: string;
|
|
251
|
+
subscribers: string[];
|
|
252
|
+
} | {
|
|
253
|
+
kind: "toolListChanged";
|
|
254
|
+
serverName: string;
|
|
255
|
+
} | {
|
|
256
|
+
kind: "loggingMessage";
|
|
257
|
+
serverName: string;
|
|
258
|
+
level: string;
|
|
259
|
+
logger?: string;
|
|
260
|
+
data: unknown;
|
|
261
|
+
};
|
|
262
|
+
export interface McpNotificationPort {
|
|
263
|
+
onNotification(notification: McpServerNotification): void;
|
|
264
|
+
}
|
|
167
265
|
export interface McpConnectionSnapshot {
|
|
168
266
|
statuses: Record<string, McpServerStatus>;
|
|
169
267
|
tools: McpToolDescriptor[];
|
|
@@ -202,10 +300,26 @@ export interface McpCallToolRequest {
|
|
|
202
300
|
deliveryKind?: string;
|
|
203
301
|
turnId?: string;
|
|
204
302
|
}
|
|
303
|
+
/** MCP `notifications/progress`(A8):progress 单调递增,total 可缺省;adapter 原样转发,不做节流。 */
|
|
304
|
+
export interface McpToolCallProgress {
|
|
305
|
+
progress: number;
|
|
306
|
+
total?: number;
|
|
307
|
+
message?: string;
|
|
308
|
+
}
|
|
205
309
|
export interface McpCallToolOptions {
|
|
310
|
+
/** 页面写操作固定此连接;禁止恢复或重新授权后自动重放。 */
|
|
311
|
+
appConnection?: {
|
|
312
|
+
identity: string;
|
|
313
|
+
generation: number;
|
|
314
|
+
};
|
|
206
315
|
signal?: AbortSignal;
|
|
207
316
|
timeoutMs?: number;
|
|
317
|
+
/** 收到服务端进度通知时回调;SDK 侧同时以 resetTimeoutOnProgress 让每次进度重置超时。 */
|
|
318
|
+
onProgress?: (progress: McpToolCallProgress) => void;
|
|
208
319
|
}
|
|
320
|
+
/** 工具级 `_meta.timeoutMs` 的允许区间:低于下限视为非法丢弃,高于上限截到上限。 */
|
|
321
|
+
export declare const MCP_TOOL_META_TIMEOUT_MIN_MS = 1000;
|
|
322
|
+
export declare const MCP_TOOL_META_TIMEOUT_MAX_MS: number;
|
|
209
323
|
/**
|
|
210
324
|
* 端口层失败分类("不发任何请求"的几类)。
|
|
211
325
|
* `official_mcp_origin_untrusted` 可能来自 adapter 本地校验,也可能来自 host 侧二次校验。
|
|
@@ -258,7 +372,36 @@ export interface OfficialMcpTrustedOriginRegistry {
|
|
|
258
372
|
trusted: boolean;
|
|
259
373
|
}>;
|
|
260
374
|
}
|
|
375
|
+
/** MCP elicitation(server → client `elicitation/create`)交给宿主提问的端口。 */
|
|
376
|
+
export interface McpElicitationTrace {
|
|
377
|
+
sessionId?: string;
|
|
378
|
+
turnId?: string;
|
|
379
|
+
toolCallId?: string;
|
|
380
|
+
traceId?: string;
|
|
381
|
+
}
|
|
382
|
+
export interface McpElicitationRequest {
|
|
383
|
+
serverName: string;
|
|
384
|
+
message: string;
|
|
385
|
+
requestedSchema: unknown;
|
|
386
|
+
/** 发起 elicitation 时该 server 正在执行的工具调用;没有则无法归属会话,端口应拒绝。 */
|
|
387
|
+
trace?: McpElicitationTrace;
|
|
388
|
+
}
|
|
389
|
+
export interface McpElicitationResult {
|
|
390
|
+
action: "accept" | "decline" | "cancel";
|
|
391
|
+
content?: Record<string, unknown>;
|
|
392
|
+
}
|
|
393
|
+
export interface McpElicitationPort {
|
|
394
|
+
requestElicitation(request: McpElicitationRequest, options?: {
|
|
395
|
+
signal?: AbortSignal;
|
|
396
|
+
}): Promise<McpElicitationResult>;
|
|
397
|
+
}
|
|
261
398
|
export interface McpPort {
|
|
399
|
+
/** 可信配置派生的稳定来源与现有连接代际。断线时不签发新页面凭证。 */
|
|
400
|
+
onAppConnectionInvalidated?(serverName: string, listener: () => void): () => void;
|
|
401
|
+
appConnectionSnapshot?(serverName: string): {
|
|
402
|
+
identity: string;
|
|
403
|
+
generation: number;
|
|
404
|
+
} | null;
|
|
262
405
|
connectConfiguredServers(servers: Record<string, McpServerConfig>, options?: McpConnectOptions): Promise<McpConnectionSnapshot>;
|
|
263
406
|
connectServer(name: string, config: McpServerConfig, options?: McpConnectOptions): Promise<McpServerStatus>;
|
|
264
407
|
disconnectServer(name: string): Promise<McpServerStatus | undefined>;
|
|
@@ -272,7 +415,24 @@ export interface McpPort {
|
|
|
272
415
|
}): Promise<boolean>;
|
|
273
416
|
status(): Promise<Record<string, McpServerStatus>>;
|
|
274
417
|
listTools(): Promise<McpToolDescriptor[]>;
|
|
418
|
+
/**
|
|
419
|
+
* 自端口创建以来收到 `notifications/tools/list_changed` 的累计次数。
|
|
420
|
+
* runtime 在回合开始前比较该值,变了才重新 listTools 并重注册;未实现表示端口不会主动变化。
|
|
421
|
+
*/
|
|
422
|
+
toolListRevision?(): number;
|
|
275
423
|
callTool(request: McpCallToolRequest, options?: McpCallToolOptions): Promise<McpToolCallResult>;
|
|
424
|
+
/**
|
|
425
|
+
* 读取 MCP 资源(插件 UI 的 `ui://` HTML)。与 pingServer 同样可选:mock port 不必实现,
|
|
426
|
+
* 调用方缺失时按"不支持资源"处理。实现必须与 callTool 共用同一连接与重连路径。
|
|
427
|
+
*/
|
|
428
|
+
readResource?(request: McpReadResourceRequest, options?: McpCallToolOptions): Promise<McpReadResourceResult>;
|
|
429
|
+
/** 资源列表与订阅;缺省表示该端口不支持(协议层回 -32001)。 */
|
|
430
|
+
listResources?(request: McpListResourcesRequest, options?: McpCallToolOptions): Promise<McpListResourcesResult>;
|
|
431
|
+
listResourceTemplates?(request: McpListResourcesRequest, options?: McpCallToolOptions): Promise<McpListResourceTemplatesResult>;
|
|
432
|
+
subscribeResource?(request: McpResourceSubscriptionRequest, options?: McpCallToolOptions): Promise<void>;
|
|
433
|
+
unsubscribeResource?(request: McpResourceSubscriptionRequest, options?: McpCallToolOptions): Promise<void>;
|
|
434
|
+
/** 删除 subscriberKey 以 prefix 开头的全部登记(会话关闭);返回真正向 server 退订的 uri 数。 */
|
|
435
|
+
unsubscribeResourcesBySubscriber?(subscriberKeyPrefix: string): Promise<number>;
|
|
276
436
|
close(): Promise<void>;
|
|
277
437
|
}
|
|
278
438
|
//# sourceMappingURL=mcp.port.d.ts.map
|
|
@@ -23,3 +23,20 @@ export const DCODE_MCP_NODE_REPL_CUA_APP_META_KEY = "dcode/nodeReplCuaApp";
|
|
|
23
23
|
* 只在 `isError` 时附加:这是给人看的排障线索(拿它去查服务端日志),成功路径上是纯噪声。
|
|
24
24
|
*/
|
|
25
25
|
export const DCODE_MCP_SERVER_REQUEST_ID_META_KEY = "dcode/officialMcpServerRequestId";
|
|
26
|
+
/** 可见性判定的唯一实现:descriptor.visibility → ui.visibility → 两者都可见。 */
|
|
27
|
+
export function resolveMcpToolVisibility(descriptor) {
|
|
28
|
+
return descriptor.visibility ?? descriptor.ui?.visibility ?? ["model", "app"];
|
|
29
|
+
}
|
|
30
|
+
/** server 没有声明 `capabilities.resources.subscribe` 时抛出(协议层映射为 -32001 not_supported)。 */
|
|
31
|
+
export class McpResourceSubscribeUnsupportedError extends Error {
|
|
32
|
+
serverName;
|
|
33
|
+
code = "not_supported";
|
|
34
|
+
constructor(serverName) {
|
|
35
|
+
super(`MCP server ${serverName} does not support resource subscriptions`);
|
|
36
|
+
this.serverName = serverName;
|
|
37
|
+
this.name = "McpResourceSubscribeUnsupportedError";
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
/** 工具级 `_meta.timeoutMs` 的允许区间:低于下限视为非法丢弃,高于上限截到上限。 */
|
|
41
|
+
export const MCP_TOOL_META_TIMEOUT_MIN_MS = 1_000;
|
|
42
|
+
export const MCP_TOOL_META_TIMEOUT_MAX_MS = 30 * 60 * 1_000;
|
|
@@ -14,7 +14,7 @@ export declare const permissionFullAccessReceiptSchema: z.ZodEffects<z.ZodObject
|
|
|
14
14
|
payload: z.ZodObject<{
|
|
15
15
|
mode: z.ZodLiteral<"yolo">;
|
|
16
16
|
planEnabled: z.ZodBoolean;
|
|
17
|
-
previousMode: z.ZodEnum<["build", "edit", "yolo", "auto", "plan"]>;
|
|
17
|
+
previousMode: z.ZodEnum<["build", "edit", "yolo", "guarded", "auto", "plan"]>;
|
|
18
18
|
previousPlanEnabled: z.ZodBoolean;
|
|
19
19
|
source: z.ZodLiteral<"command">;
|
|
20
20
|
permissionGrant: z.ZodObject<{
|
|
@@ -35,7 +35,7 @@ export declare const permissionFullAccessReceiptSchema: z.ZodEffects<z.ZodObject
|
|
|
35
35
|
interactionId: string;
|
|
36
36
|
queueItemIds: string[];
|
|
37
37
|
};
|
|
38
|
-
previousMode: "plan" | "build" | "edit" | "yolo" | "auto";
|
|
38
|
+
previousMode: "plan" | "build" | "edit" | "yolo" | "guarded" | "auto";
|
|
39
39
|
previousPlanEnabled: boolean;
|
|
40
40
|
}, {
|
|
41
41
|
source: "command";
|
|
@@ -45,12 +45,13 @@ export declare const permissionFullAccessReceiptSchema: z.ZodEffects<z.ZodObject
|
|
|
45
45
|
interactionId: string;
|
|
46
46
|
queueItemIds: string[];
|
|
47
47
|
};
|
|
48
|
-
previousMode: "plan" | "build" | "edit" | "yolo" | "auto";
|
|
48
|
+
previousMode: "plan" | "build" | "edit" | "yolo" | "guarded" | "auto";
|
|
49
49
|
previousPlanEnabled: boolean;
|
|
50
50
|
}>;
|
|
51
51
|
}, "strict", z.ZodTypeAny, {
|
|
52
52
|
type: "session_mode_changed";
|
|
53
53
|
id: string;
|
|
54
|
+
timestamp: Date;
|
|
54
55
|
sessionId: string;
|
|
55
56
|
traceId: string;
|
|
56
57
|
payload: {
|
|
@@ -61,15 +62,15 @@ export declare const permissionFullAccessReceiptSchema: z.ZodEffects<z.ZodObject
|
|
|
61
62
|
interactionId: string;
|
|
62
63
|
queueItemIds: string[];
|
|
63
64
|
};
|
|
64
|
-
previousMode: "plan" | "build" | "edit" | "yolo" | "auto";
|
|
65
|
+
previousMode: "plan" | "build" | "edit" | "yolo" | "guarded" | "auto";
|
|
65
66
|
previousPlanEnabled: boolean;
|
|
66
67
|
};
|
|
67
|
-
timestamp: Date;
|
|
68
68
|
sequenceNumber: number;
|
|
69
69
|
turnId?: string | undefined;
|
|
70
70
|
}, {
|
|
71
71
|
type: "session_mode_changed";
|
|
72
72
|
id: string;
|
|
73
|
+
timestamp: Date;
|
|
73
74
|
sessionId: string;
|
|
74
75
|
traceId: string;
|
|
75
76
|
payload: {
|
|
@@ -80,10 +81,9 @@ export declare const permissionFullAccessReceiptSchema: z.ZodEffects<z.ZodObject
|
|
|
80
81
|
interactionId: string;
|
|
81
82
|
queueItemIds: string[];
|
|
82
83
|
};
|
|
83
|
-
previousMode: "plan" | "build" | "edit" | "yolo" | "auto";
|
|
84
|
+
previousMode: "plan" | "build" | "edit" | "yolo" | "guarded" | "auto";
|
|
84
85
|
previousPlanEnabled: boolean;
|
|
85
86
|
};
|
|
86
|
-
timestamp: Date;
|
|
87
87
|
sequenceNumber: number;
|
|
88
88
|
turnId?: string | undefined;
|
|
89
89
|
}>;
|
|
@@ -92,6 +92,7 @@ export declare const permissionFullAccessReceiptSchema: z.ZodEffects<z.ZodObject
|
|
|
92
92
|
event: {
|
|
93
93
|
type: "session_mode_changed";
|
|
94
94
|
id: string;
|
|
95
|
+
timestamp: Date;
|
|
95
96
|
sessionId: string;
|
|
96
97
|
traceId: string;
|
|
97
98
|
payload: {
|
|
@@ -102,10 +103,9 @@ export declare const permissionFullAccessReceiptSchema: z.ZodEffects<z.ZodObject
|
|
|
102
103
|
interactionId: string;
|
|
103
104
|
queueItemIds: string[];
|
|
104
105
|
};
|
|
105
|
-
previousMode: "plan" | "build" | "edit" | "yolo" | "auto";
|
|
106
|
+
previousMode: "plan" | "build" | "edit" | "yolo" | "guarded" | "auto";
|
|
106
107
|
previousPlanEnabled: boolean;
|
|
107
108
|
};
|
|
108
|
-
timestamp: Date;
|
|
109
109
|
sequenceNumber: number;
|
|
110
110
|
turnId?: string | undefined;
|
|
111
111
|
};
|
|
@@ -114,6 +114,7 @@ export declare const permissionFullAccessReceiptSchema: z.ZodEffects<z.ZodObject
|
|
|
114
114
|
event: {
|
|
115
115
|
type: "session_mode_changed";
|
|
116
116
|
id: string;
|
|
117
|
+
timestamp: Date;
|
|
117
118
|
sessionId: string;
|
|
118
119
|
traceId: string;
|
|
119
120
|
payload: {
|
|
@@ -124,10 +125,9 @@ export declare const permissionFullAccessReceiptSchema: z.ZodEffects<z.ZodObject
|
|
|
124
125
|
interactionId: string;
|
|
125
126
|
queueItemIds: string[];
|
|
126
127
|
};
|
|
127
|
-
previousMode: "plan" | "build" | "edit" | "yolo" | "auto";
|
|
128
|
+
previousMode: "plan" | "build" | "edit" | "yolo" | "guarded" | "auto";
|
|
128
129
|
previousPlanEnabled: boolean;
|
|
129
130
|
};
|
|
130
|
-
timestamp: Date;
|
|
131
131
|
sequenceNumber: number;
|
|
132
132
|
turnId?: string | undefined;
|
|
133
133
|
};
|
|
@@ -136,6 +136,7 @@ export declare const permissionFullAccessReceiptSchema: z.ZodEffects<z.ZodObject
|
|
|
136
136
|
event: {
|
|
137
137
|
type: "session_mode_changed";
|
|
138
138
|
id: string;
|
|
139
|
+
timestamp: Date;
|
|
139
140
|
sessionId: string;
|
|
140
141
|
traceId: string;
|
|
141
142
|
payload: {
|
|
@@ -146,10 +147,9 @@ export declare const permissionFullAccessReceiptSchema: z.ZodEffects<z.ZodObject
|
|
|
146
147
|
interactionId: string;
|
|
147
148
|
queueItemIds: string[];
|
|
148
149
|
};
|
|
149
|
-
previousMode: "plan" | "build" | "edit" | "yolo" | "auto";
|
|
150
|
+
previousMode: "plan" | "build" | "edit" | "yolo" | "guarded" | "auto";
|
|
150
151
|
previousPlanEnabled: boolean;
|
|
151
152
|
};
|
|
152
|
-
timestamp: Date;
|
|
153
153
|
sequenceNumber: number;
|
|
154
154
|
turnId?: string | undefined;
|
|
155
155
|
};
|
|
@@ -158,6 +158,7 @@ export declare const permissionFullAccessReceiptSchema: z.ZodEffects<z.ZodObject
|
|
|
158
158
|
event: {
|
|
159
159
|
type: "session_mode_changed";
|
|
160
160
|
id: string;
|
|
161
|
+
timestamp: Date;
|
|
161
162
|
sessionId: string;
|
|
162
163
|
traceId: string;
|
|
163
164
|
payload: {
|
|
@@ -168,10 +169,9 @@ export declare const permissionFullAccessReceiptSchema: z.ZodEffects<z.ZodObject
|
|
|
168
169
|
interactionId: string;
|
|
169
170
|
queueItemIds: string[];
|
|
170
171
|
};
|
|
171
|
-
previousMode: "plan" | "build" | "edit" | "yolo" | "auto";
|
|
172
|
+
previousMode: "plan" | "build" | "edit" | "yolo" | "guarded" | "auto";
|
|
172
173
|
previousPlanEnabled: boolean;
|
|
173
174
|
};
|
|
174
|
-
timestamp: Date;
|
|
175
175
|
sequenceNumber: number;
|
|
176
176
|
turnId?: string | undefined;
|
|
177
177
|
};
|
|
@@ -17,7 +17,7 @@ export const permissionFullAccessReceiptSchema = z
|
|
|
17
17
|
.object({
|
|
18
18
|
mode: z.literal("yolo"),
|
|
19
19
|
planEnabled: z.boolean(),
|
|
20
|
-
previousMode: z.enum(["build", "edit", "yolo", "auto", "plan"]),
|
|
20
|
+
previousMode: z.enum(["build", "edit", "yolo", "guarded", "auto", "plan"]),
|
|
21
21
|
previousPlanEnabled: z.boolean(),
|
|
22
22
|
source: z.literal("command"),
|
|
23
23
|
permissionGrant: z
|
|
@@ -12,6 +12,8 @@ export interface PermissionRuleValue {
|
|
|
12
12
|
ruleContent?: string;
|
|
13
13
|
}
|
|
14
14
|
export interface PermissionRuleset {
|
|
15
|
+
/** 群协作任务的记忆授权仅在当前 session 内生效。 */
|
|
16
|
+
scope?: "session";
|
|
15
17
|
version?: 1;
|
|
16
18
|
allow?: PermissionRuleValue[];
|
|
17
19
|
deny?: PermissionRuleValue[];
|
|
@@ -34,6 +36,7 @@ export type PermissionBrokerReasonSource = "plan_approval_feedback" | "workflow_
|
|
|
34
36
|
*/
|
|
35
37
|
export type PermissionOptionsPolicy = "no-always-allow" | "session-always-allow";
|
|
36
38
|
export interface PermissionBrokerRequest {
|
|
39
|
+
approvalMode?: "user-once";
|
|
37
40
|
requestId: string;
|
|
38
41
|
sessionId: SessionId;
|
|
39
42
|
turnId?: TurnId;
|
|
@@ -65,6 +68,14 @@ export interface PermissionBrokerResult {
|
|
|
65
68
|
* by the broker on the answer side because the wire option schema is strict.
|
|
66
69
|
*/
|
|
67
70
|
sessionPermissionUpdates?: PermissionUpdate[];
|
|
71
|
+
/**
|
|
72
|
+
* Fields the user changed in the confirmation window before approving, keyed by the tool's own
|
|
73
|
+
* input field names; `null` means "back to the field's default". Carried only on an allow and
|
|
74
|
+
* applied only by a tool that declares `applyInputAdjustments` (CreateWorkflow and
|
|
75
|
+
* AmendWorkflow: docs/dynamic-workflow/launch.md「Adjusting the settings in the window」).
|
|
76
|
+
* Synthesized by the broker from the v4 answer's `content`.
|
|
77
|
+
*/
|
|
78
|
+
inputAdjustments?: Readonly<Record<string, unknown>>;
|
|
68
79
|
resolvedAt?: Date;
|
|
69
80
|
}
|
|
70
81
|
export interface PermissionBrokerRequestOptions {
|
|
@@ -74,6 +85,9 @@ export interface PermissionBrokerRequestOptions {
|
|
|
74
85
|
timeoutMs?: number;
|
|
75
86
|
}
|
|
76
87
|
export interface PermissionBrokerPort {
|
|
77
|
-
requestPermission(request: PermissionBrokerRequest, options?: PermissionBrokerRequestOptions): Promise<PermissionBrokerResult
|
|
88
|
+
requestPermission(request: PermissionBrokerRequest, options?: PermissionBrokerRequestOptions): Promise<PermissionBrokerResult> & {
|
|
89
|
+
/** 异步登记时必须提供;缺省表示调用内同步登记。仅表示可响应,不持有授权状态。 */
|
|
90
|
+
readonly registered?: Promise<void>;
|
|
91
|
+
};
|
|
78
92
|
}
|
|
79
93
|
//# sourceMappingURL=permission.port.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { TraceContext } from "../tracing/tracer.js";
|
|
2
|
+
export interface ProviderEndpointRoutingDecision {
|
|
3
|
+
routed: boolean;
|
|
4
|
+
url: string;
|
|
5
|
+
}
|
|
6
|
+
export interface ProviderEndpointRoutingResolveOptions {
|
|
7
|
+
apiKeyId?: string;
|
|
8
|
+
signal?: AbortSignal;
|
|
9
|
+
trace?: TraceContext;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* 模型 provider transport 的动态 endpoint 决策边界。
|
|
13
|
+
*
|
|
14
|
+
* 实现可以按需刷新远端配置,但不得修改或持久化 provider baseURL。
|
|
15
|
+
*/
|
|
16
|
+
export interface ProviderEndpointRoutingPort {
|
|
17
|
+
resolve(requestUrl: string, options?: ProviderEndpointRoutingResolveOptions): Promise<ProviderEndpointRoutingDecision>;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=provider-endpoint-routing.port.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -12,7 +12,7 @@ export declare const SESSION_TITLE_SOURCES: readonly ["default", "first_input",
|
|
|
12
12
|
export type SessionTitleSource = (typeof SESSION_TITLE_SOURCES)[number];
|
|
13
13
|
export declare const MESSAGE_VISIBILITIES: readonly ["user-visible", "model-only"];
|
|
14
14
|
export type MessageVisibility = (typeof MESSAGE_VISIBILITIES)[number];
|
|
15
|
-
export declare const SYNTHETIC_USER_MESSAGE_SOURCES: readonly ["background_task", "fork", "goal_state_change", "goal-continuation", "plugin_reference", "rewind", "selection_side_chat", "subagent", "subagent_message", "todo_reminder", "workflow_launch", "shared_context"];
|
|
15
|
+
export declare const SYNTHETIC_USER_MESSAGE_SOURCES: readonly ["agent_listing_delta", "background_task", "fork", "goal_state_change", "goal-continuation", "plugin_reference", "bot_topic_context", "rewind", "selection_side_chat", "subagent", "subagent_message", "todo_reminder", "workflow_launch", "shared_context"];
|
|
16
16
|
export type SyntheticUserMessageSource = (typeof SYNTHETIC_USER_MESSAGE_SOURCES)[number];
|
|
17
17
|
export type MessageSemanticsOrigin = "real_user" | "agent_runtime" | "system" | "migration" | "import";
|
|
18
18
|
export type MessageSemanticsKind = "user_prompt" | "slash_command" | "system_reminder" | "background_notification" | "subagent_notification" | "todo_reminder" | "rewind_notice" | "fork_notice" | "timeline_event" | "compact_summary" | "shared_context" | "assistant_response";
|
|
@@ -670,7 +670,9 @@ export declare const SESSION_ENTRY_EXECUTION_STATE: "runtime/execution_state";
|
|
|
670
670
|
export declare const SESSION_ENTRY_USER_INPUT_AUTO_RESOLUTION: "runtime/user_input_auto_resolution";
|
|
671
671
|
export declare const SESSION_ENTRY_WORKSPACE_CHECKPOINT: "runtime/workspace_checkpoint";
|
|
672
672
|
export declare const SESSION_ENTRY_WORKSPACE_FILE_REWIND: "runtime/workspace_file_rewind";
|
|
673
|
-
|
|
673
|
+
/** 动态工作流工具面已在本会话激活(docs/dynamic-workflow/launch.md「On demand: activation」)。 */
|
|
674
|
+
export declare const SESSION_ENTRY_DYNAMIC_WORKFLOW_ACTIVATION: "runtime/dynamic_workflow_activation";
|
|
675
|
+
export declare const SESSION_ENTRY_TYPES: readonly ["target_completion_verification", "runtime/bash_shell_selection", "runtime/model_selection", "runtime/execution_state", "runtime/user_input_auto_resolution", "runtime/workspace_checkpoint", "runtime/workspace_file_rewind", "runtime/dynamic_workflow_activation"];
|
|
674
676
|
export type SessionEntryType = (typeof SESSION_ENTRY_TYPES)[number];
|
|
675
677
|
export interface SessionEntryInfo {
|
|
676
678
|
id: string;
|
|
@@ -12,11 +12,13 @@ export const SESSION_TASK_TYPES = [
|
|
|
12
12
|
export const SESSION_TITLE_SOURCES = ["default", "first_input", "generated", "custom"];
|
|
13
13
|
export const MESSAGE_VISIBILITIES = ["user-visible", "model-only"];
|
|
14
14
|
export const SYNTHETIC_USER_MESSAGE_SOURCES = [
|
|
15
|
+
"agent_listing_delta",
|
|
15
16
|
"background_task",
|
|
16
17
|
"fork",
|
|
17
18
|
"goal_state_change",
|
|
18
19
|
"goal-continuation",
|
|
19
20
|
"plugin_reference",
|
|
21
|
+
"bot_topic_context",
|
|
20
22
|
"rewind",
|
|
21
23
|
"selection_side_chat",
|
|
22
24
|
"subagent",
|
|
@@ -45,6 +47,8 @@ export const SESSION_ENTRY_EXECUTION_STATE = "runtime/execution_state";
|
|
|
45
47
|
export const SESSION_ENTRY_USER_INPUT_AUTO_RESOLUTION = "runtime/user_input_auto_resolution";
|
|
46
48
|
export const SESSION_ENTRY_WORKSPACE_CHECKPOINT = "runtime/workspace_checkpoint";
|
|
47
49
|
export const SESSION_ENTRY_WORKSPACE_FILE_REWIND = "runtime/workspace_file_rewind";
|
|
50
|
+
/** 动态工作流工具面已在本会话激活(docs/dynamic-workflow/launch.md「On demand: activation」)。 */
|
|
51
|
+
export const SESSION_ENTRY_DYNAMIC_WORKFLOW_ACTIVATION = "runtime/dynamic_workflow_activation";
|
|
48
52
|
export const SESSION_ENTRY_TYPES = [
|
|
49
53
|
SESSION_ENTRY_TARGET_COMPLETION_VERIFICATION,
|
|
50
54
|
SESSION_ENTRY_BASH_SHELL_SELECTION,
|
|
@@ -53,4 +57,5 @@ export const SESSION_ENTRY_TYPES = [
|
|
|
53
57
|
SESSION_ENTRY_USER_INPUT_AUTO_RESOLUTION,
|
|
54
58
|
SESSION_ENTRY_WORKSPACE_CHECKPOINT,
|
|
55
59
|
SESSION_ENTRY_WORKSPACE_FILE_REWIND,
|
|
60
|
+
SESSION_ENTRY_DYNAMIC_WORKFLOW_ACTIVATION,
|
|
56
61
|
];
|
|
@@ -10,7 +10,9 @@ import type { GoalCompletionVerificationOutput } from "../tools/target.js";
|
|
|
10
10
|
import type { PermissionOptionsPolicy, PermissionUpdate } from "./permission.port.js";
|
|
11
11
|
import type { ToolResultDisplayPayload } from "../tools/tool-result-metadata.js";
|
|
12
12
|
import type { ModelSelection } from "../model/model.js";
|
|
13
|
-
export type CollaborationMode = "plan" | "build" | "edit" | "yolo" | "auto";
|
|
13
|
+
export type CollaborationMode = "plan" | "build" | "edit" | "yolo" | "guarded" | "auto";
|
|
14
|
+
/** 父 guarded 只收紧内部 YOLO 派生;显式的其它子模式保留各自策略。 */
|
|
15
|
+
export declare function inheritPermissionMode<T extends CollaborationMode | undefined>(parent: CollaborationMode | undefined, resolved: T): T | "guarded";
|
|
14
16
|
export type SessionStatus = "idle" | "running" | "waiting" | "paused" | "completed" | "error";
|
|
15
17
|
export type RiskLevel = "low" | "medium" | "high" | "critical";
|
|
16
18
|
export type InputDelivery = "auto" | "start_turn" | "steer_active_turn";
|
|
@@ -79,6 +81,7 @@ export interface TargetCompletionVerificationProjectionInfo {
|
|
|
79
81
|
updatedAt: Date;
|
|
80
82
|
}
|
|
81
83
|
export interface PendingPermission {
|
|
84
|
+
approvalMode?: "user-once";
|
|
82
85
|
requestId?: string;
|
|
83
86
|
toolCallId: string;
|
|
84
87
|
toolName: string;
|
|
@@ -205,9 +208,89 @@ export type TurnSteerSource = "plan_approval_feedback" | "workflow_refine_feedba
|
|
|
205
208
|
* runtime 注入机制两者相同(boundary 注入),差异只在产品呈现与账本语义。
|
|
206
209
|
*/
|
|
207
210
|
export type TurnSteerDeliveryMode = "guide" | "queue";
|
|
211
|
+
/** message.data metadata.highspeed 的持久化契约;不包含运行时凭据。 */
|
|
212
|
+
export interface HighspeedMessageMetadata {
|
|
213
|
+
schemaVersion: 1;
|
|
214
|
+
cardId: string;
|
|
215
|
+
taskId: string;
|
|
216
|
+
provider: string;
|
|
217
|
+
model: string;
|
|
218
|
+
issuedAt: number;
|
|
219
|
+
expiresAt: number;
|
|
220
|
+
regularTps?: number;
|
|
221
|
+
outputTokens?: number;
|
|
222
|
+
durationMs?: number;
|
|
223
|
+
savedDurationMs?: number;
|
|
224
|
+
modelDurationMs?: number;
|
|
225
|
+
toolDurationMs?: number;
|
|
226
|
+
otherDurationMs?: number;
|
|
227
|
+
fallbackAt?: number;
|
|
228
|
+
fallbackReason?: "highspeed_card_expired" | "highspeed_request_failed";
|
|
229
|
+
}
|
|
208
230
|
/** 协议无关的输入 intent metadata;bootstrap v4 在事件边界组装为 ConversationInputIntent。 */
|
|
231
|
+
export type TurnInputSourceMetadata = {
|
|
232
|
+
kind: "pluginUi";
|
|
233
|
+
pluginId: string;
|
|
234
|
+
toolCallId: string;
|
|
235
|
+
} | {
|
|
236
|
+
kind: "genUi";
|
|
237
|
+
path: string;
|
|
238
|
+
title?: string;
|
|
239
|
+
};
|
|
209
240
|
export interface TurnInputIntentMetadata {
|
|
210
241
|
planEnabled?: boolean;
|
|
242
|
+
conversationQuotes?: Array<{
|
|
243
|
+
text: string;
|
|
244
|
+
path?: string;
|
|
245
|
+
senderName?: string;
|
|
246
|
+
senderId?: string;
|
|
247
|
+
messageId?: string;
|
|
248
|
+
sentAt?: string;
|
|
249
|
+
}>;
|
|
250
|
+
inputOrigin?: "desktop" | "mobile";
|
|
251
|
+
botGroupSource?: {
|
|
252
|
+
botIdentity?: {
|
|
253
|
+
name: string;
|
|
254
|
+
openId?: string;
|
|
255
|
+
};
|
|
256
|
+
mentionedBot?: boolean;
|
|
257
|
+
appId?: string;
|
|
258
|
+
contentParts?: import("@dcode/shared").ChannelContentPart[];
|
|
259
|
+
messages?: Array<{
|
|
260
|
+
mentionedBot?: boolean;
|
|
261
|
+
messageId: string;
|
|
262
|
+
senderId: string;
|
|
263
|
+
senderName: string;
|
|
264
|
+
text: string;
|
|
265
|
+
attachmentIndexes: number[];
|
|
266
|
+
contentParts?: import("@dcode/shared").ChannelContentPart[];
|
|
267
|
+
}>;
|
|
268
|
+
/** 入队时由 Host 注入,历史资源请求不能借用后续重新授权的版本。 */
|
|
269
|
+
authorizationId?: string;
|
|
270
|
+
botId: string;
|
|
271
|
+
provider: "feishu" | "lark";
|
|
272
|
+
chatId: string;
|
|
273
|
+
threadId?: string;
|
|
274
|
+
rootMessageId?: string;
|
|
275
|
+
topicContext?: {
|
|
276
|
+
checkpoint: string;
|
|
277
|
+
hasGap: boolean;
|
|
278
|
+
messages: Array<{
|
|
279
|
+
id: string;
|
|
280
|
+
chatId: string;
|
|
281
|
+
threadId: string;
|
|
282
|
+
senderId: string;
|
|
283
|
+
senderType: "user" | "app";
|
|
284
|
+
text: string;
|
|
285
|
+
createdAt: number;
|
|
286
|
+
kind: string;
|
|
287
|
+
deleted?: boolean;
|
|
288
|
+
}>;
|
|
289
|
+
};
|
|
290
|
+
senderId: string;
|
|
291
|
+
senderName: string;
|
|
292
|
+
messageId: string;
|
|
293
|
+
};
|
|
211
294
|
sourceCommandId: string;
|
|
212
295
|
queueItemId: string;
|
|
213
296
|
clientId: string;
|
|
@@ -217,7 +300,7 @@ export interface TurnInputIntentMetadata {
|
|
|
217
300
|
/** Admission 时固定;Queue/Guide 后续不得重新读取 Composer 或 Session 最新选择。 */
|
|
218
301
|
modelSelection?: ModelSelection;
|
|
219
302
|
/** 与本次用户 Submission 一起固定的协作模式。 */
|
|
220
|
-
mode?: "build" | "edit" | "plan" | "yolo";
|
|
303
|
+
mode?: "build" | "edit" | "plan" | "yolo" | "guarded";
|
|
221
304
|
admissionSeq: number;
|
|
222
305
|
admittedAt: number;
|
|
223
306
|
requestedDelivery: "auto" | "startNow" | "queue" | "guide";
|
|
@@ -230,7 +313,10 @@ export interface TurnInputIntentMetadata {
|
|
|
230
313
|
mime: string;
|
|
231
314
|
bytes: number;
|
|
232
315
|
previewRef?: string;
|
|
316
|
+
sourceKind?: "clipboard-text" | "topic-history";
|
|
317
|
+
messageCount?: number;
|
|
233
318
|
}>;
|
|
319
|
+
highspeed?: HighspeedMessageMetadata;
|
|
234
320
|
sharedContextRefs?: Array<{
|
|
235
321
|
kind: "shared_context_import";
|
|
236
322
|
context_id: string;
|
|
@@ -241,13 +327,16 @@ export interface TurnInputIntentMetadata {
|
|
|
241
327
|
queueItemId?: string;
|
|
242
328
|
clientId?: string;
|
|
243
329
|
};
|
|
330
|
+
/** 插件 UI 代发(MCP Apps ui/message)的来源;用户亲自输入时缺省。 */
|
|
331
|
+
source?: TurnInputSourceMetadata;
|
|
244
332
|
}
|
|
245
333
|
/** queue 内保留尚未 resolve 的附件描述;消费时与普通 turn 使用同一 resolver。 */
|
|
246
334
|
export interface PendingTurnAttachment {
|
|
247
335
|
type: "file" | "image" | "video" | "pdf" | "url";
|
|
248
336
|
path?: string;
|
|
249
337
|
content?: string;
|
|
250
|
-
sourceKind?: "clipboard-text";
|
|
338
|
+
sourceKind?: "clipboard-text" | "topic-history";
|
|
339
|
+
messageCount?: number;
|
|
251
340
|
filename?: string;
|
|
252
341
|
mimeType?: string;
|
|
253
342
|
sizeBytes?: number;
|