@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
|
@@ -464,13 +464,22 @@ export const v4ConversationFileChangesResultSchema = z
|
|
|
464
464
|
// (`appendEvent` 单调分配),在 workflowRuns[].lastEventSequence 抬升时重取。
|
|
465
465
|
// 刻意**不是** v4 command:command 的 ACK 结果是 commandResultSchema 那个封闭的「变更结果」
|
|
466
466
|
// 判别联合,把一页只读事件塞进去等于把读放进写的词汇表,还要白背 baseRevision/幂等那套机制。
|
|
467
|
+
/**
|
|
468
|
+
* 事件日志一页的两道界,网关按它们取数(apps/dcode-cli/packages/dynamic-workflow/docs/execution-engine.md
|
|
469
|
+
* 「Reading the journal」)。字节按存储里的序列化字节计、取协议单帧上限的四分之一:条数单独
|
|
470
|
+
* 管不住字节,500 条带着大 report item 的事件足以顶到单帧上限。
|
|
471
|
+
*/
|
|
472
|
+
export const WORKFLOW_RUN_EVENTS_PAGE_LIMITS = {
|
|
473
|
+
maxEvents: 500,
|
|
474
|
+
maxBytes: PROTOCOL_V4_LIMITS.logicalFrameAssemblyMaxBytes / 4,
|
|
475
|
+
};
|
|
467
476
|
export const v4ConversationWorkflowRunEventsParamsSchema = z
|
|
468
477
|
.object({
|
|
469
478
|
sessionId: z.string().min(1),
|
|
470
479
|
runId: z.string().min(1),
|
|
471
480
|
/** 只取 sequence 严格大于该值的事件;缺省从头取。 */
|
|
472
481
|
afterSequence: z.number().int().nonnegative().optional(),
|
|
473
|
-
limit: z.number().int().positive().max(
|
|
482
|
+
limit: z.number().int().positive().max(WORKFLOW_RUN_EVENTS_PAGE_LIMITS.maxEvents).optional(),
|
|
474
483
|
})
|
|
475
484
|
.strict();
|
|
476
485
|
export const v4ConversationWorkflowRunEventsResultSchema = z
|
|
@@ -485,7 +494,7 @@ export const v4ConversationWorkflowRunEventsResultSchema = z
|
|
|
485
494
|
truncated: z.boolean().optional(),
|
|
486
495
|
})
|
|
487
496
|
.strict()),
|
|
488
|
-
/**
|
|
497
|
+
/** 本页之后仍有事件(页可能因条数或字节上界提前收尾)。 */
|
|
489
498
|
hasMore: z.boolean(),
|
|
490
499
|
})
|
|
491
500
|
.strict();
|
|
@@ -811,20 +820,24 @@ export const v4AttachmentReadResultSchema = z
|
|
|
811
820
|
.string()
|
|
812
821
|
.refine((value) => value.startsWith("image/") ||
|
|
813
822
|
value.startsWith("video/") ||
|
|
814
|
-
value.split(";", 1)[0]?.trim().toLowerCase() === "application/pdf"
|
|
823
|
+
value.split(";", 1)[0]?.trim().toLowerCase() === "application/pdf" ||
|
|
824
|
+
value.split(";", 1)[0]?.trim().toLowerCase() === "text/plain", "attachment preview only supports image/video/pdf/plain text types"),
|
|
815
825
|
totalBytes: z.number().int().nonnegative().max(PROTOCOL_V4_LIMITS.attachmentPreviewMaxBytes),
|
|
816
826
|
nextOffset: z.number().int().positive().nullable(),
|
|
817
827
|
})
|
|
818
828
|
.strict()
|
|
819
829
|
.superRefine((value, context) => {
|
|
820
|
-
if (
|
|
830
|
+
if (
|
|
831
|
+
// 根因:运行时已支持材料文本,响应 schema 仍只接受媒体,导致跨进程预览失败。
|
|
832
|
+
(value.mediaType.startsWith("image/") ||
|
|
833
|
+
value.mediaType.split(";", 1)[0]?.trim().toLowerCase() === "text/plain") &&
|
|
821
834
|
value.totalBytes > PROTOCOL_V4_LIMITS.attachmentMaxBytes) {
|
|
822
835
|
context.addIssue({
|
|
823
836
|
code: "too_big",
|
|
824
837
|
maximum: PROTOCOL_V4_LIMITS.attachmentMaxBytes,
|
|
825
838
|
origin: "number",
|
|
826
839
|
inclusive: true,
|
|
827
|
-
message: "image preview exceeds total byte limit",
|
|
840
|
+
message: "image/text preview exceeds total byte limit",
|
|
828
841
|
path: ["totalBytes"],
|
|
829
842
|
});
|
|
830
843
|
}
|
|
@@ -101,7 +101,8 @@ export class TopicWireFrameAssembler {
|
|
|
101
101
|
accept(wire, now = Date.now()) {
|
|
102
102
|
const events = this.expire(now);
|
|
103
103
|
const key = routeKey(wire.topic, wire.subscriptionId);
|
|
104
|
-
if (!Number.isSafeInteger(wire.logicalFrameOrdinal) ||
|
|
104
|
+
if (!Number.isSafeInteger(wire.logicalFrameOrdinal) ||
|
|
105
|
+
wire.logicalFrameOrdinal < 1) {
|
|
105
106
|
events.push(this.fault(wire, "proto.frameAssemblyMetadataMismatch"));
|
|
106
107
|
return events;
|
|
107
108
|
}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
// V4 physical assembly fault 的分类:**内容确定性失败** vs 瞬态失败。
|
|
2
|
+
// spec:docs/v4-refactor/04-sync-and-recovery.md 封闭规则 11、
|
|
3
|
+
// docs/v4-refactor/05-transport-and-backpressure.md「客户端规则」。
|
|
2
4
|
//
|
|
3
5
|
// 恢复阶梯默认把 fault 当瞬态处理:先 same-sub resync(服务端可能回 resume),再断档则升级
|
|
4
6
|
// forceSnapshot,仍不成则 fail closed。这套升级对丢片、超时、校验和不符是对的——重投一次很可能
|
|
5
7
|
// 就好了。对 **schema 拒收** 却是错的:字节已经过了 length/checksum/UTF-8/JSON 四道关,被拒说明
|
|
6
8
|
// 本端读不懂对端发来的**内容**,而 resume 档只会把同一批 delta 再投一遍,必然同样被拒。
|
|
7
9
|
//
|
|
8
|
-
//
|
|
10
|
+
// 2026-09-21(sess_4142de31)的事故就是这条:一个工具卡载荷多带两个键,恢复阶梯在同一份内容上
|
|
11
|
+
// 烧掉三帧后 fail closed,用户手动「重新连接」两次、每次再烧三帧,会话再也打不开。
|
|
9
12
|
//
|
|
10
13
|
// 本模块只回答「这个 reason code 是不是确定性内容失败」,不决定怎么处置——处置在两个 store 里
|
|
11
14
|
// (conversationProjectionStore / sessionsIndexStore)。
|
|
@@ -11,7 +11,8 @@ function frameMatchesEnvelope(frame, wire) {
|
|
|
11
11
|
if (typeof frame !== "object" || frame === null)
|
|
12
12
|
return false;
|
|
13
13
|
const record = frame;
|
|
14
|
-
return record.topic === wire.topic &&
|
|
14
|
+
return (record.topic === wire.topic &&
|
|
15
|
+
record.subscriptionId === wire.subscriptionId);
|
|
15
16
|
}
|
|
16
17
|
export function reassembleTopicWireFrames(wires, frameSchema, options = {}) {
|
|
17
18
|
if (wires.length === 0) {
|
|
@@ -43,8 +44,9 @@ export function reassembleTopicWireFrames(wires, frameSchema, options = {}) {
|
|
|
43
44
|
? { kind: "complete", frame: parsed.data, deliveryKind: first.deliveryKind }
|
|
44
45
|
: { kind: "rejected", reasonCode: WIRE_FAULT_INVALID_PAYLOAD };
|
|
45
46
|
}
|
|
46
|
-
if (first.fragmentCount >
|
|
47
|
-
|
|
47
|
+
if (first.fragmentCount >
|
|
48
|
+
PROTOCOL_V4_LIMITS.logicalFrameAssemblyMaxFragments) {
|
|
49
|
+
// 修复原因:fragmentCount 曾只受 logicalBytes 约束,恶意元数据可在
|
|
48
50
|
// 缺片路径制造千万级 missingIndexes,先用协议硬上限阻断无界分配。
|
|
49
51
|
return {
|
|
50
52
|
kind: "rejected",
|
|
@@ -28,7 +28,33 @@ export declare const WORKFLOW_ARTIFACT_LIMITS: {
|
|
|
28
28
|
readonly maxItemsPerPage: 500;
|
|
29
29
|
/** 一页的缺省条数(调用方不传 limit 时网关用它)。 */
|
|
30
30
|
readonly defaultItemsPerPage: 200;
|
|
31
|
+
/**
|
|
32
|
+
* `workflowRunArtifactData` 一页的字节上界(按存储里的序列化字节计),由网关传给存储层。
|
|
33
|
+
* 取协议单帧上限(16 MiB)的四分之一:条数上界单独管不住字节——500 条 × 32 KiB 就顶到了
|
|
34
|
+
* 单帧上限,于是一页可能根本发不出去。一页至少带一条,所以单条的上限(`REPORT_CAPS`)
|
|
35
|
+
* 必须远小于单帧上限。
|
|
36
|
+
*/
|
|
37
|
+
readonly maxPageBytes: number;
|
|
38
|
+
/** `workflowRunArtifactData` 一次最多点名几个字段路径(一张看板的 spec 用不到这么多)。 */
|
|
39
|
+
readonly maxFieldsPerRequest: 32;
|
|
40
|
+
/** 一个字段路径的最大长度。 */
|
|
41
|
+
readonly maxFieldPathLength: 256;
|
|
42
|
+
/**
|
|
43
|
+
* 一个字段值的序列化字节上界。超过的值回成一段截短的字符串(前 1,000 个字符加「…」):
|
|
44
|
+
* 图表只用数值,表格与看板的格子本来就只显示短文本。
|
|
45
|
+
*/
|
|
46
|
+
readonly maxFieldValueBytes: 4096;
|
|
31
47
|
};
|
|
48
|
+
/**
|
|
49
|
+
* 按点路径从一条 report item 里取值:"timing.after"、"rounds.0.ms"(docs/execution-engine.md
|
|
50
|
+
* 「Reading the journal」)。
|
|
51
|
+
*
|
|
52
|
+
* 这是**协议上的契约**,不只是渲染器的工具函数:看板取数时 CLI 在 SQLite 里按同一套规则把
|
|
53
|
+
* 字段取出来(adapters 的 dwf-journal-fields.ts),渲染器拿到的值必须与它自己从整条 item 里
|
|
54
|
+
* 取出来的逐字相同。规则:按 `.` 切段;当前值是数组时,段按 `Number(段)` 当下标(非负整数且
|
|
55
|
+
* 在界内才算);是对象时按键取;走不通(null、标量、越界、缺键)得 `undefined`。
|
|
56
|
+
*/
|
|
57
|
+
export declare function readWorkflowArtifactField(item: unknown, path: string): unknown;
|
|
32
58
|
/**
|
|
33
59
|
* 一个产物版本的**元数据**(journal `dwf_node.result_json` 上 `ArtifactVersionRecord` 的
|
|
34
60
|
* zod 镜像)。字节不在这里——`uri` 指向 tool-artifact store,取字节走
|
|
@@ -100,7 +126,7 @@ export type WorkflowRunArtifact = z.infer<typeof workflowRunArtifactSchema>;
|
|
|
100
126
|
* `workflowRunArtifactRead` 取字节)按需拉——权威始终在 journal。
|
|
101
127
|
*
|
|
102
128
|
* `itemCount` 在这里的职责是**刷新信号**:看板 hook 见它变化就带 `afterSequence` 增量取数。
|
|
103
|
-
* 把标签 report
|
|
129
|
+
* 把标签 report 的原值放进这个高频状态键,一个 run 的条目有多少字节,每一帧就要搬多少字节。
|
|
104
130
|
*/
|
|
105
131
|
export declare const workflowRunArtifactSummarySchema: z.ZodObject<{
|
|
106
132
|
id: z.ZodString;
|
|
@@ -165,6 +191,7 @@ export declare const v4ConversationWorkflowRunArtifactDataParamsSchema: z.ZodObj
|
|
|
165
191
|
artifactId: z.ZodString;
|
|
166
192
|
afterSequence: z.ZodOptional<z.ZodNumber>;
|
|
167
193
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
194
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
168
195
|
}, z.core.$strict>;
|
|
169
196
|
export type V4ConversationWorkflowRunArtifactDataParams = z.infer<typeof v4ConversationWorkflowRunArtifactDataParamsSchema>;
|
|
170
197
|
export declare const v4ConversationWorkflowRunArtifactDataResultSchema: z.ZodObject<{
|
|
@@ -173,6 +200,7 @@ export declare const v4ConversationWorkflowRunArtifactDataResultSchema: z.ZodObj
|
|
|
173
200
|
siteId: z.ZodString;
|
|
174
201
|
ordinal: z.ZodNumber;
|
|
175
202
|
item: z.ZodUnknown;
|
|
203
|
+
fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
176
204
|
}, z.core.$strict>>;
|
|
177
205
|
hasMore: z.ZodBoolean;
|
|
178
206
|
}, z.core.$strict>;
|
|
@@ -44,7 +44,50 @@ export const WORKFLOW_ARTIFACT_LIMITS = {
|
|
|
44
44
|
maxItemsPerPage: 500,
|
|
45
45
|
/** 一页的缺省条数(调用方不传 limit 时网关用它)。 */
|
|
46
46
|
defaultItemsPerPage: 200,
|
|
47
|
+
/**
|
|
48
|
+
* `workflowRunArtifactData` 一页的字节上界(按存储里的序列化字节计),由网关传给存储层。
|
|
49
|
+
* 取协议单帧上限(16 MiB)的四分之一:条数上界单独管不住字节——500 条 × 32 KiB 就顶到了
|
|
50
|
+
* 单帧上限,于是一页可能根本发不出去。一页至少带一条,所以单条的上限(`REPORT_CAPS`)
|
|
51
|
+
* 必须远小于单帧上限。
|
|
52
|
+
*/
|
|
53
|
+
maxPageBytes: PROTOCOL_V4_LIMITS.logicalFrameAssemblyMaxBytes / 4,
|
|
54
|
+
/** `workflowRunArtifactData` 一次最多点名几个字段路径(一张看板的 spec 用不到这么多)。 */
|
|
55
|
+
maxFieldsPerRequest: 32,
|
|
56
|
+
/** 一个字段路径的最大长度。 */
|
|
57
|
+
maxFieldPathLength: 256,
|
|
58
|
+
/**
|
|
59
|
+
* 一个字段值的序列化字节上界。超过的值回成一段截短的字符串(前 1,000 个字符加「…」):
|
|
60
|
+
* 图表只用数值,表格与看板的格子本来就只显示短文本。
|
|
61
|
+
*/
|
|
62
|
+
maxFieldValueBytes: 4096,
|
|
47
63
|
};
|
|
64
|
+
/**
|
|
65
|
+
* 按点路径从一条 report item 里取值:"timing.after"、"rounds.0.ms"(docs/execution-engine.md
|
|
66
|
+
* 「Reading the journal」)。
|
|
67
|
+
*
|
|
68
|
+
* 这是**协议上的契约**,不只是渲染器的工具函数:看板取数时 CLI 在 SQLite 里按同一套规则把
|
|
69
|
+
* 字段取出来(adapters 的 dwf-journal-fields.ts),渲染器拿到的值必须与它自己从整条 item 里
|
|
70
|
+
* 取出来的逐字相同。规则:按 `.` 切段;当前值是数组时,段按 `Number(段)` 当下标(非负整数且
|
|
71
|
+
* 在界内才算);是对象时按键取;走不通(null、标量、越界、缺键)得 `undefined`。
|
|
72
|
+
*/
|
|
73
|
+
export function readWorkflowArtifactField(item, path) {
|
|
74
|
+
let cursor = item;
|
|
75
|
+
for (const segment of path.split(".")) {
|
|
76
|
+
if (cursor === null || cursor === undefined)
|
|
77
|
+
return undefined;
|
|
78
|
+
if (Array.isArray(cursor)) {
|
|
79
|
+
const index = Number(segment);
|
|
80
|
+
if (!Number.isInteger(index) || index < 0 || index >= cursor.length)
|
|
81
|
+
return undefined;
|
|
82
|
+
cursor = cursor[index];
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
if (typeof cursor !== "object")
|
|
86
|
+
return undefined;
|
|
87
|
+
cursor = cursor[segment];
|
|
88
|
+
}
|
|
89
|
+
return cursor;
|
|
90
|
+
}
|
|
48
91
|
/**
|
|
49
92
|
* 一个产物版本的**元数据**(journal `dwf_node.result_json` 上 `ArtifactVersionRecord` 的
|
|
50
93
|
* zod 镜像)。字节不在这里——`uri` 指向 tool-artifact store,取字节走
|
|
@@ -110,7 +153,7 @@ export const workflowRunArtifactSchema = z
|
|
|
110
153
|
* `workflowRunArtifactRead` 取字节)按需拉——权威始终在 journal。
|
|
111
154
|
*
|
|
112
155
|
* `itemCount` 在这里的职责是**刷新信号**:看板 hook 见它变化就带 `afterSequence` 增量取数。
|
|
113
|
-
* 把标签 report
|
|
156
|
+
* 把标签 report 的原值放进这个高频状态键,一个 run 的条目有多少字节,每一帧就要搬多少字节。
|
|
114
157
|
*/
|
|
115
158
|
export const workflowRunArtifactSummarySchema = z
|
|
116
159
|
.object({
|
|
@@ -154,6 +197,18 @@ export const v4ConversationWorkflowRunArtifactDataParamsSchema = z
|
|
|
154
197
|
afterSequence: z.number().int().nonnegative().optional(),
|
|
155
198
|
/** 缺省 200、钳 [1, 500]——两者都在网关侧执行(存储层不得自造页大小,也不得再钳)。 */
|
|
156
199
|
limit: z.number().int().positive().max(WORKFLOW_ARTIFACT_LIMITS.maxItemsPerPage).optional(),
|
|
200
|
+
/**
|
|
201
|
+
* 只取这些字段路径({@link readWorkflowArtifactField} 的规则),而不是整条 item:看板只读
|
|
202
|
+
* spec 里点名的字段,一条 1 MiB 的 item 不该为了一个数被整条搬进渲染器。给了它,结果每条
|
|
203
|
+
* 带 `fields` 而不带 `item`。缺省 = 整条 item(老渲染器的形状)。
|
|
204
|
+
*
|
|
205
|
+
* 偏斜:老 CLI 的 strict schema 不认这个键、整条请求被拒;渲染器据此退回不带它重试。
|
|
206
|
+
*/
|
|
207
|
+
fields: z
|
|
208
|
+
.array(z.string().min(1).max(WORKFLOW_ARTIFACT_LIMITS.maxFieldPathLength))
|
|
209
|
+
.min(1)
|
|
210
|
+
.max(WORKFLOW_ARTIFACT_LIMITS.maxFieldsPerRequest)
|
|
211
|
+
.optional(),
|
|
157
212
|
})
|
|
158
213
|
.strict();
|
|
159
214
|
export const v4ConversationWorkflowRunArtifactDataResultSchema = z
|
|
@@ -168,13 +223,18 @@ export const v4ConversationWorkflowRunArtifactDataResultSchema = z
|
|
|
168
223
|
/**
|
|
169
224
|
* 条目原值,**不做预览序列化**:看板的纯函数要按字段路径取数
|
|
170
225
|
* (`ChartSpec.x.field` 形如 "timing.after"),拿到一段 pretty JSON 文本就没法取了。
|
|
171
|
-
*
|
|
172
|
-
*
|
|
226
|
+
* 单条由写入侧的 `REPORT_CAPS.maxItemSerializedBytes` 有界,一页由
|
|
227
|
+
* `WORKFLOW_ARTIFACT_LIMITS.maxPageBytes` 有界。请求带 `fields` 时缺席。
|
|
173
228
|
*/
|
|
174
229
|
item: z.unknown(),
|
|
230
|
+
/**
|
|
231
|
+
* 请求带 `fields` 时:路径 → 值。走不通的路径不在表里(= `undefined`);超过
|
|
232
|
+
* `maxFieldValueBytes` 的值是一段截短的字符串。
|
|
233
|
+
*/
|
|
234
|
+
fields: z.record(z.string(), z.unknown()).optional(),
|
|
175
235
|
})
|
|
176
236
|
.strict()),
|
|
177
|
-
/**
|
|
237
|
+
/** 本页之后仍有条目(页可能因条数或字节上界提前收尾;由存储层判定)。 */
|
|
178
238
|
hasMore: z.boolean(),
|
|
179
239
|
})
|
|
180
240
|
.strict();
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const savedWorkflowStartRejectionReasonSchema: z.ZodEnum<{
|
|
3
|
+
not_found: "not_found";
|
|
4
|
+
invalid_name: "invalid_name";
|
|
5
|
+
compile_failed: "compile_failed";
|
|
6
|
+
start_failed: "start_failed";
|
|
7
|
+
invalid_args: "invalid_args";
|
|
8
|
+
session_busy: "session_busy";
|
|
9
|
+
}>;
|
|
10
|
+
export type SavedWorkflowStartRejectionReason = z.infer<typeof savedWorkflowStartRejectionReasonSchema>;
|
|
11
|
+
export declare const SAVED_WORKFLOW_START_REJECTED_FAULT_PREFIX: "fault.command.savedWorkflowStartRejected.";
|
|
12
|
+
export declare const WORKFLOW_RUN_RESUME_REJECTED_FAULT_PREFIX: "fault.command.workflowRunResumeRejected.";
|
|
13
|
+
//# sourceMappingURL=workflow-command-rejections.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// 动态工作流命令的拒绝词表与 fault 前缀:从 command.ts 拆出(该文件在 max-lines 上限),
|
|
2
|
+
// 由 command.ts 再导出,既有导入路径不变。
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
// startSavedWorkflow 拒绝词表(docs/dynamic-workflow/launch.md「On the agent」):
|
|
5
|
+
// bootstrap handler 铸造 fault code,ui launcher 反查 i18n 文案,两侧共享此枚举避免漂移。
|
|
6
|
+
// invalid_name / not_found:解析阶段;invalid_args:实参校验;compile_failed:analyzeScript 诊断;
|
|
7
|
+
// session_busy:会话有活动 turn;start_failed:port.submit 之前的其它启动失败。
|
|
8
|
+
export const savedWorkflowStartRejectionReasonSchema = z.enum([
|
|
9
|
+
"invalid_name",
|
|
10
|
+
"not_found",
|
|
11
|
+
"invalid_args",
|
|
12
|
+
"compile_failed",
|
|
13
|
+
"session_busy",
|
|
14
|
+
"start_failed",
|
|
15
|
+
]);
|
|
16
|
+
// 完整 fault code = 前缀 + reason(如 fault.command.savedWorkflowStartRejected.not_found)。
|
|
17
|
+
// 与 workflowRunResumeRejected 命名空间同族;导出常量供 bootstrap 拼接、ui 前缀匹配。
|
|
18
|
+
export const SAVED_WORKFLOW_START_REJECTED_FAULT_PREFIX = "fault.command.savedWorkflowStartRejected.";
|
|
19
|
+
// resumeWorkflowRun 的拒绝:前缀 + 端口 reason(not_found / not_resumable / superseded /
|
|
20
|
+
// already_running / script_missing / script_mismatch / compile_failed);`ack.message` 携带
|
|
21
|
+
// compile_failed 的有界诊断(docs/dynamic-workflow/presentation.md「The run pane」)。
|
|
22
|
+
export const WORKFLOW_RUN_RESUME_REJECTED_FAULT_PREFIX = "fault.command.workflowRunResumeRejected.";
|
|
23
|
+
//# sourceMappingURL=workflow-command-rejections.js.map
|
|
@@ -7,17 +7,17 @@ export declare const toolCallGetWorkflowRunDisplaySchema: z.ZodObject<{
|
|
|
7
7
|
runId: z.ZodString;
|
|
8
8
|
label: z.ZodString;
|
|
9
9
|
status: z.ZodEnum<{
|
|
10
|
-
pending: "pending";
|
|
11
10
|
running: "running";
|
|
12
11
|
completed: "completed";
|
|
13
|
-
|
|
12
|
+
pending: "pending";
|
|
14
13
|
errored: "errored";
|
|
14
|
+
stopped: "stopped";
|
|
15
15
|
}>;
|
|
16
16
|
stopReason: z.ZodOptional<z.ZodEnum<{
|
|
17
|
-
interrupted: "interrupted";
|
|
18
|
-
user: "user";
|
|
19
|
-
model: "model";
|
|
20
17
|
provider: "provider";
|
|
18
|
+
model: "model";
|
|
19
|
+
user: "user";
|
|
20
|
+
interrupted: "interrupted";
|
|
21
21
|
superseded: "superseded";
|
|
22
22
|
}>>;
|
|
23
23
|
possiblyInterrupted: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -50,11 +50,11 @@ export declare const toolCallGetWorkflowRunDisplaySchema: z.ZodObject<{
|
|
|
50
50
|
name: z.ZodOptional<z.ZodString>;
|
|
51
51
|
state: z.ZodEnum<{
|
|
52
52
|
failed: "failed";
|
|
53
|
-
done: "done";
|
|
54
|
-
unfinished: "unfinished";
|
|
55
53
|
idle: "idle";
|
|
56
|
-
executing: "executing";
|
|
57
54
|
waiting: "waiting";
|
|
55
|
+
executing: "executing";
|
|
56
|
+
done: "done";
|
|
57
|
+
unfinished: "unfinished";
|
|
58
58
|
parked: "parked";
|
|
59
59
|
}>;
|
|
60
60
|
phaseName: z.ZodOptional<z.ZodString>;
|
|
@@ -117,21 +117,21 @@ export declare const toolCallListWorkflowRunsDisplaySchema: z.ZodObject<{
|
|
|
117
117
|
runId: z.ZodString;
|
|
118
118
|
label: z.ZodString;
|
|
119
119
|
labelSource: z.ZodEnum<{
|
|
120
|
-
script: "script";
|
|
121
120
|
name: "name";
|
|
121
|
+
script: "script";
|
|
122
122
|
}>;
|
|
123
123
|
status: z.ZodEnum<{
|
|
124
|
-
pending: "pending";
|
|
125
124
|
running: "running";
|
|
126
125
|
completed: "completed";
|
|
127
|
-
|
|
126
|
+
pending: "pending";
|
|
128
127
|
errored: "errored";
|
|
128
|
+
stopped: "stopped";
|
|
129
129
|
}>;
|
|
130
130
|
stopReason: z.ZodOptional<z.ZodEnum<{
|
|
131
|
-
interrupted: "interrupted";
|
|
132
|
-
user: "user";
|
|
133
|
-
model: "model";
|
|
134
131
|
provider: "provider";
|
|
132
|
+
model: "model";
|
|
133
|
+
user: "user";
|
|
134
|
+
interrupted: "interrupted";
|
|
135
135
|
superseded: "superseded";
|
|
136
136
|
}>>;
|
|
137
137
|
ownedByThisSession: z.ZodBoolean;
|
|
@@ -3,14 +3,14 @@ export declare const workflowNotificationMetaSchema: z.ZodDiscriminatedUnion<[z.
|
|
|
3
3
|
kind: z.ZodLiteral<"terminal">;
|
|
4
4
|
status: z.ZodEnum<{
|
|
5
5
|
completed: "completed";
|
|
6
|
-
stopped: "stopped";
|
|
7
6
|
errored: "errored";
|
|
7
|
+
stopped: "stopped";
|
|
8
8
|
}>;
|
|
9
9
|
stopReason: z.ZodOptional<z.ZodEnum<{
|
|
10
|
-
interrupted: "interrupted";
|
|
11
|
-
user: "user";
|
|
12
|
-
model: "model";
|
|
13
10
|
provider: "provider";
|
|
11
|
+
model: "model";
|
|
12
|
+
user: "user";
|
|
13
|
+
interrupted: "interrupted";
|
|
14
14
|
superseded: "superseded";
|
|
15
15
|
}>>;
|
|
16
16
|
summary: z.ZodString;
|
|
@@ -51,6 +51,18 @@ export declare const workflowNotificationMetaSchema: z.ZodDiscriminatedUnion<[z.
|
|
|
51
51
|
question: z.ZodString;
|
|
52
52
|
context: z.ZodOptional<z.ZodString>;
|
|
53
53
|
askedAt: z.ZodOptional<z.ZodNumber>;
|
|
54
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
55
|
+
kind: z.ZodLiteral<"hole">;
|
|
56
|
+
siteId: z.ZodString;
|
|
57
|
+
ordinal: z.ZodNumber;
|
|
58
|
+
name: z.ZodString;
|
|
59
|
+
type: z.ZodString;
|
|
60
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
61
|
+
draftPath: z.ZodOptional<z.ZodString>;
|
|
62
|
+
line: z.ZodOptional<z.ZodNumber>;
|
|
63
|
+
before: z.ZodOptional<z.ZodString>;
|
|
64
|
+
after: z.ZodOptional<z.ZodString>;
|
|
65
|
+
reachedAt: z.ZodOptional<z.ZodNumber>;
|
|
54
66
|
}, z.core.$strip>, z.ZodObject<{
|
|
55
67
|
kind: z.ZodLiteral<"stall">;
|
|
56
68
|
sinceMs: z.ZodNumber;
|
|
@@ -70,14 +82,14 @@ export declare const backgroundResultOriginMetaSchema: z.ZodObject<{
|
|
|
70
82
|
kind: z.ZodLiteral<"terminal">;
|
|
71
83
|
status: z.ZodEnum<{
|
|
72
84
|
completed: "completed";
|
|
73
|
-
stopped: "stopped";
|
|
74
85
|
errored: "errored";
|
|
86
|
+
stopped: "stopped";
|
|
75
87
|
}>;
|
|
76
88
|
stopReason: z.ZodOptional<z.ZodEnum<{
|
|
77
|
-
interrupted: "interrupted";
|
|
78
|
-
user: "user";
|
|
79
|
-
model: "model";
|
|
80
89
|
provider: "provider";
|
|
90
|
+
model: "model";
|
|
91
|
+
user: "user";
|
|
92
|
+
interrupted: "interrupted";
|
|
81
93
|
superseded: "superseded";
|
|
82
94
|
}>>;
|
|
83
95
|
summary: z.ZodString;
|
|
@@ -118,6 +130,18 @@ export declare const backgroundResultOriginMetaSchema: z.ZodObject<{
|
|
|
118
130
|
question: z.ZodString;
|
|
119
131
|
context: z.ZodOptional<z.ZodString>;
|
|
120
132
|
askedAt: z.ZodOptional<z.ZodNumber>;
|
|
133
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
134
|
+
kind: z.ZodLiteral<"hole">;
|
|
135
|
+
siteId: z.ZodString;
|
|
136
|
+
ordinal: z.ZodNumber;
|
|
137
|
+
name: z.ZodString;
|
|
138
|
+
type: z.ZodString;
|
|
139
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
140
|
+
draftPath: z.ZodOptional<z.ZodString>;
|
|
141
|
+
line: z.ZodOptional<z.ZodNumber>;
|
|
142
|
+
before: z.ZodOptional<z.ZodString>;
|
|
143
|
+
after: z.ZodOptional<z.ZodString>;
|
|
144
|
+
reachedAt: z.ZodOptional<z.ZodNumber>;
|
|
121
145
|
}, z.core.$strip>, z.ZodObject<{
|
|
122
146
|
kind: z.ZodLiteral<"stall">;
|
|
123
147
|
sinceMs: z.ZodNumber;
|
|
@@ -166,6 +190,7 @@ export declare const workflowLaunchMetaSchema: z.ZodObject<{
|
|
|
166
190
|
kind: z.ZodEnum<{
|
|
167
191
|
ask: "ask";
|
|
168
192
|
"world-read": "world-read";
|
|
193
|
+
hole: "hole";
|
|
169
194
|
}>;
|
|
170
195
|
label: z.ZodString;
|
|
171
196
|
labelPattern: z.ZodOptional<z.ZodObject<{
|
|
@@ -182,6 +207,7 @@ export declare const workflowLaunchMetaSchema: z.ZodObject<{
|
|
|
182
207
|
stack: "stack";
|
|
183
208
|
serial: "serial";
|
|
184
209
|
}>>;
|
|
210
|
+
fill: z.ZodOptional<z.ZodString>;
|
|
185
211
|
}, z.core.$strict>>;
|
|
186
212
|
lanes: z.ZodArray<z.ZodObject<{
|
|
187
213
|
id: z.ZodString;
|
|
@@ -216,17 +242,35 @@ export declare const workflowLaunchMetaSchema: z.ZodObject<{
|
|
|
216
242
|
line: z.ZodOptional<z.ZodNumber>;
|
|
217
243
|
column: z.ZodOptional<z.ZodNumber>;
|
|
218
244
|
alongside: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
245
|
+
fill: z.ZodOptional<z.ZodString>;
|
|
219
246
|
}, z.core.$strict>>>;
|
|
220
247
|
phaseEdges: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
221
248
|
from: z.ZodString;
|
|
222
249
|
to: z.ZodString;
|
|
223
250
|
back: z.ZodOptional<z.ZodLiteral<true>>;
|
|
224
251
|
}, z.core.$strict>>>;
|
|
252
|
+
phaseStreams: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
253
|
+
from: z.ZodString;
|
|
254
|
+
to: z.ZodString;
|
|
255
|
+
}, z.core.$strict>>>;
|
|
256
|
+
holes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
257
|
+
siteId: z.ZodString;
|
|
258
|
+
name: z.ZodString;
|
|
259
|
+
type: z.ZodString;
|
|
260
|
+
phase: z.ZodOptional<z.ZodString>;
|
|
261
|
+
tail: z.ZodOptional<z.ZodBoolean>;
|
|
262
|
+
}, z.core.$strict>>>;
|
|
225
263
|
exits: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
226
264
|
sink: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
227
265
|
truncated: z.ZodOptional<z.ZodBoolean>;
|
|
228
266
|
}, z.core.$strict>>;
|
|
229
267
|
truncated: z.ZodOptional<z.ZodBoolean>;
|
|
268
|
+
fill: z.ZodOptional<z.ZodObject<{
|
|
269
|
+
siteId: z.ZodString;
|
|
270
|
+
name: z.ZodString;
|
|
271
|
+
draftPath: z.ZodOptional<z.ZodString>;
|
|
272
|
+
line: z.ZodOptional<z.ZodNumber>;
|
|
273
|
+
}, z.core.$strict>>;
|
|
230
274
|
}, z.core.$strict>>>;
|
|
231
275
|
script: z.ZodOptional<z.ZodString>;
|
|
232
276
|
amend: z.ZodOptional<z.ZodObject<{
|
|
@@ -60,6 +60,23 @@ export const workflowNotificationMetaSchema = z.discriminatedUnion("kind", [
|
|
|
60
60
|
context: z.string().max(4000).optional(),
|
|
61
61
|
askedAt: z.number().optional(),
|
|
62
62
|
}),
|
|
63
|
+
// 留白(docs/dynamic-workflow/transcript-and-notifications.md「The payload」的 `hole` 种类):run 走到一个
|
|
64
|
+
// 开着的 `hole<T>()`,那条分支停驻、主代理欠一段代码。`type` 是作者写的类型原文(`Plan`);`before` /
|
|
65
|
+
// `after` 是留白两侧的阶段名;`draftPath` / `line` 指向草稿文件里留白所在的那一行。prompt 与升级问题
|
|
66
|
+
// 同一条 4000 上界,发射侧先截。与契约同名(apps/dcode-cli contracts 侧手工镜像)。
|
|
67
|
+
z.object({
|
|
68
|
+
kind: z.literal("hole"),
|
|
69
|
+
siteId: z.string().min(1).max(64),
|
|
70
|
+
ordinal: z.number().int().nonnegative(),
|
|
71
|
+
name: z.string().min(1).max(128),
|
|
72
|
+
type: z.string().min(1).max(128),
|
|
73
|
+
prompt: z.string().max(4000).optional(),
|
|
74
|
+
draftPath: z.string().max(1024).optional(),
|
|
75
|
+
line: z.number().int().positive().optional(),
|
|
76
|
+
before: z.string().max(128).optional(),
|
|
77
|
+
after: z.string().max(128).optional(),
|
|
78
|
+
reachedAt: z.number().optional(),
|
|
79
|
+
}),
|
|
63
80
|
// run 级停滞:每个 stall 段一条,不是终态。
|
|
64
81
|
z.object({
|
|
65
82
|
kind: z.literal("stall"),
|
|
@@ -93,12 +110,14 @@ const workflowSubagentModelTextSchema = z
|
|
|
93
110
|
// 设置轮:用户在 run 卡 / 详情页的「配置」里
|
|
94
111
|
// 改了设置,agent 以同一份脚本修订出新 run,并用一条与直接启动同形的 controlOnly 轮记下这件事。
|
|
95
112
|
// 这一块说**改了什么**:只有改动过的设置在场;每一项的 from / to 缺一端即那一端是默认
|
|
96
|
-
// (模型 = 会话模型,上限 =
|
|
113
|
+
// (模型 = 会话模型,上限 = 默认并发)。`ceiling` 是默认并发 D(键名早于「默认并发」,为兼容旧端保留),
|
|
114
|
+
// 供「默认 13 → 4」这种读法。
|
|
97
115
|
export const workflowSettingsAmendMetaSchema = z.object({
|
|
98
|
-
// 修订自哪个 run。**缺席 =
|
|
116
|
+
// 修订自哪个 run。**缺席 = 就地生效**(docs/dynamic-workflow/concurrency.md):只改并发上限、run
|
|
99
117
|
// 又在飞时,那次「配置」不停这次 run、也不另起一次,于是没有前驱可指——`runId` 指的就是被调整的
|
|
100
118
|
// 那一个。渲染端据此只出那一行、不再出卡(同一条 run 画两张卡会读成两次运行)。
|
|
101
|
-
//
|
|
119
|
+
// 记录在案的偏斜(与下方 scope / path 同一档):旧桌面上它是必填,就地生效的设置轮在那里 parse
|
|
120
|
+
// 失败、整行被丢——丢的是一行记录,run 卡与运行本身不受影响。
|
|
102
121
|
predecessorRunId: z.string().min(1).max(128).optional(),
|
|
103
122
|
subagentModel: z
|
|
104
123
|
.object({
|
package/node_modules/@dcode/shared/dist/dcode-protocol-v4/workflow-run-settings-command.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
/**
|
|
3
|
-
* 命令载荷。两项设置守工具的同一条三态规则:省略 = 沿用,`null` = 回到默认(会话模型 /
|
|
3
|
+
* 命令载荷。两项设置守工具的同一条三态规则:省略 = 沿用,`null` = 回到默认(会话模型 / 默认并发),
|
|
4
4
|
* 值 = 设定。GUI 只发用户改过的那几项。刻意不携 baseRevision:与 cancelBackgroundWork /
|
|
5
5
|
* resumeWorkflowRun 同类(workflowRuns 面免 revision)。
|
|
6
6
|
*/
|
|
@@ -26,12 +26,12 @@ export declare const amendWorkflowRunSettingsResultSchema: z.ZodObject<{
|
|
|
26
26
|
* 是命令自己的检查,missing_boundaries 是端口预检,start_failed 是端口缺席或抛错。
|
|
27
27
|
*/
|
|
28
28
|
export declare const workflowRunSettingsRejectionReasonSchema: z.ZodEnum<{
|
|
29
|
-
unchanged: "unchanged";
|
|
30
29
|
not_found: "not_found";
|
|
31
|
-
|
|
30
|
+
unchanged: "unchanged";
|
|
32
31
|
script_missing: "script_missing";
|
|
33
|
-
model_unavailable: "model_unavailable";
|
|
34
32
|
compile_failed: "compile_failed";
|
|
33
|
+
not_configurable: "not_configurable";
|
|
34
|
+
model_unavailable: "model_unavailable";
|
|
35
35
|
missing_boundaries: "missing_boundaries";
|
|
36
36
|
start_failed: "start_failed";
|
|
37
37
|
}>;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
import { WORKFLOW_RUNS_LIMITS } from "./workflow-runs.js";
|
|
8
8
|
/**
|
|
9
|
-
* 命令载荷。两项设置守工具的同一条三态规则:省略 = 沿用,`null` = 回到默认(会话模型 /
|
|
9
|
+
* 命令载荷。两项设置守工具的同一条三态规则:省略 = 沿用,`null` = 回到默认(会话模型 / 默认并发),
|
|
10
10
|
* 值 = 设定。GUI 只发用户改过的那几项。刻意不携 baseRevision:与 cancelBackgroundWork /
|
|
11
11
|
* resumeWorkflowRun 同类(workflowRuns 面免 revision)。
|
|
12
12
|
*/
|
|
@@ -20,7 +20,7 @@ export const amendWorkflowRunSettingsPayloadSchema = z.object({
|
|
|
20
20
|
.max(WORKFLOW_RUNS_LIMITS.maxSubagentModelLength)
|
|
21
21
|
.nullable()
|
|
22
22
|
.optional(),
|
|
23
|
-
/** 同时运行的子代理上限;`null` = 解除本 run
|
|
23
|
+
/** 同时运行的子代理上限;`null` = 解除本 run 自己的界(回到默认并发)。没有上限:高于默认也行。 */
|
|
24
24
|
maxConcurrency: z.number().int().min(1).nullable().optional(),
|
|
25
25
|
});
|
|
26
26
|
/**
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { WorkflowRunActor } from "./workflow-runs.js";
|
|
2
|
+
interface ActorRef {
|
|
3
|
+
siteId: string;
|
|
4
|
+
ordinal: number;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* 一条节点事件之后,它点名的子代理的 actor 表(没变即原引用)。
|
|
8
|
+
*
|
|
9
|
+
* 只有两种 ask 事件说「这个子代理的转录在哪条会话里」:
|
|
10
|
+
* - **缓存命中的结算**:载荷带 `sourceSessionId` 即答案读自前驱的那条会话(导入命中,或修订
|
|
11
|
+
* run resume 时对一条导入行的重放);不带即答案在本 run 里产生过,信封上的 `actorSessionId`
|
|
12
|
+
* (本 run 的会话)就是它;
|
|
13
|
+
* - **派发**:子代理开始 live 跑,本 run 的会话此刻已经建好——导入过前缀的已经播了种。
|
|
14
|
+
*
|
|
15
|
+
* 最后一条说了算。同一个子代理的 ask 按序结算,而导入分歧是单调的:导入命中在前、指向前驱的
|
|
16
|
+
* 会话;从第一次 live 派发起,本 run 的会话持有全部,抄进来的前缀也在里面。其余事件、没有
|
|
17
|
+
* actor ref 的事件(world-read)、两个 id 都读不出的老载荷、以及不在表上的子代理:一律不动。
|
|
18
|
+
*/
|
|
19
|
+
export declare function actorsWithTranscriptSession(actors: WorkflowRunActor[], eventType: string, payload: Record<string, unknown>, actorRef: ActorRef | null, envelopeSessionId: string | undefined): WorkflowRunActor[];
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=workflow-runs-actor-session.d.ts.map
|