@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
|
@@ -3,10 +3,15 @@ export declare const WORKFLOW_RUNS_LIMITS: {
|
|
|
3
3
|
/** 最近若干个 run;超出按最旧淘汰。 */
|
|
4
4
|
readonly maxRuns: 8;
|
|
5
5
|
/**
|
|
6
|
-
* actors 与 nodes
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
6
|
+
* actors 与 nodes **同界**。每个节点都属于某个 actor,所以 nodes 的界已经隐含了 actor
|
|
7
|
+
* 数的量级;把 actors 压得更低(曾是 32)只会让一个平常的 50 路 fan-out 在检视器里
|
|
8
|
+
* 静默少掉 18 个子代理,而节点表、引擎、图三层都装得下。
|
|
9
|
+
*
|
|
10
|
+
* 2026-09-20 从 256 抬到 1024:原来那条界的理由是「状态键按事件整体重发,无界即 O(N²)
|
|
11
|
+
* 字节」,而键级增量(workflow-runs-delta.ts)落地后每条事件只发改动量,那条理由没了。
|
|
12
|
+
* 剩下的两条理由都还在,而且都不需要 256 这么紧:挡住「疯掉的脚本在循环里 `agent()`」,
|
|
13
|
+
* 以及让单条 run 的字节数有个上界。**跨 run** 的总量另有 {@link maxTotalEntries} 管。
|
|
14
|
+
* 它仍然不是产品意义上的子代理上限。
|
|
10
15
|
*/
|
|
11
16
|
readonly maxActors: 1024;
|
|
12
17
|
readonly maxNodes: 1024;
|
|
@@ -20,7 +25,7 @@ export declare const WORKFLOW_RUNS_LIMITS: {
|
|
|
20
25
|
*/
|
|
21
26
|
readonly maxTotalEntries: 6144;
|
|
22
27
|
/**
|
|
23
|
-
* 详情页 Results 区的**展示**预算,刻意远小于引擎的 run 级 report
|
|
28
|
+
* 详情页 Results 区的**展示**预算,刻意远小于引擎的 run 级 report 上限(`REPORT_CAPS.maxItemsPerRun`):
|
|
24
29
|
* 协议线上的界是展示预算,引擎的界才是契约,两者不必相等。超出这个界的条目仍在
|
|
25
30
|
* journal 里(`dwf_node.kind = "report"`),只是不进这条高频状态键。
|
|
26
31
|
*/
|
|
@@ -44,7 +49,12 @@ export declare const WORKFLOW_RUNS_LIMITS: {
|
|
|
44
49
|
*/
|
|
45
50
|
readonly maxSubagentModelLength: 256;
|
|
46
51
|
/**
|
|
47
|
-
* `
|
|
52
|
+
* actor `sessionId` 的线上上界。会话 id 是铸出来或读出来的标识,不是展示文本:超界的值
|
|
53
|
+
* 整条丢弃而不是截断——一个被砍短的会话 id 指向的是另一条(或不存在的)会话。
|
|
54
|
+
*/
|
|
55
|
+
readonly maxSessionIdLength: 256;
|
|
56
|
+
/**
|
|
57
|
+
* `run.concurrencyCeiling`(默认并发 D)的上界。D 按 `max(4, min(16, cores − 2))` 推导,这条界只挡坏载荷
|
|
48
58
|
* (reducer 读到界外的值当作读不出,沿用已知值)。
|
|
49
59
|
*/
|
|
50
60
|
readonly maxConcurrencyCeiling: 1024;
|
|
@@ -68,6 +78,16 @@ export declare const WORKFLOW_RUNS_LIMITS: {
|
|
|
68
78
|
readonly maxPhases: 32;
|
|
69
79
|
/** 阶段名的线上上界,与 display 的 `CREATE_WORKFLOW_GRAPH_MAX_NAME_CHARS` 同值(UI 按名字关联两边)。 */
|
|
70
80
|
readonly maxPhaseNameLength: 128;
|
|
81
|
+
/**
|
|
82
|
+
* 一条 run 记得的留白条数(docs/dynamic-workflow/presentation.md「Holes on the timeline」)。与 display
|
|
83
|
+
* 载荷的 `holes` 同界:时间线上画不出的留白,投影里也不必记。一个留白就是一个阶段,所以它天然
|
|
84
|
+
* 不会多过 `maxPhases`。
|
|
85
|
+
*/
|
|
86
|
+
readonly maxHoles: 32;
|
|
87
|
+
/** 留白类型原文(`Plan`)的线上上界,与 display 的同名字段同值。 */
|
|
88
|
+
readonly maxHoleTypeLength: 128;
|
|
89
|
+
/** 留白的提示语在 run 状态里的上限(侧板等待体要画它);超长时截到 499 字加 `…`。 */
|
|
90
|
+
readonly maxHolePromptLength: 500;
|
|
71
91
|
/**
|
|
72
92
|
* 一次 ask 的**任务摘要**上界(`node-queued` 的 `instructionsHead`)。与引擎侧的
|
|
73
93
|
* `INSTRUCTIONS_HEAD_MAX_CHARS` 同值:那一头已经按这条界切好,这里是线上的第二道闸。
|
|
@@ -88,7 +108,8 @@ export declare const WORKFLOW_RUNS_LIMITS: {
|
|
|
88
108
|
* **旧消费者**(没有 `workflowRunDeltas` 能力的那一代)编译进去的 actors / nodes 界。
|
|
89
109
|
*
|
|
90
110
|
* ⚠ 这两个数**永远不能改**:它们不是我们的界,是别人二进制里的校验界。超界的载荷不会被
|
|
91
|
-
* 剥掉一个键——它会让整个 `state.updated` patch
|
|
111
|
+
* 剥掉一个键——它会让整个 `state.updated` patch 解析失败、整帧被丢,那条订阅从此静默
|
|
112
|
+
* (2026-09-04 的那次 `fault.subscription.recoveryFailed` 就是这个形状)。所以给这类订阅者
|
|
92
113
|
* 发帧前必须先过 `clampWorkflowRunsForLegacy`。
|
|
93
114
|
*
|
|
94
115
|
* 「前 256 条」不是随手取的:旧归约触界时是**拒新**,它产出的恰好就是最早的那 256 条。
|
|
@@ -98,7 +119,8 @@ export declare const WORKFLOW_RUNS_LEGACY_LIMITS: {
|
|
|
98
119
|
readonly maxNodes: 256;
|
|
99
120
|
};
|
|
100
121
|
/**
|
|
101
|
-
* 一个被控制流进入过的阶段(`phase("…")`
|
|
122
|
+
* 一个被控制流进入过的阶段(`phase("…")` 标记;docs/dynamic-workflow/presentation.md
|
|
123
|
+
* 2026-09-05)。`name` 是作者原词(时间线按它关联 display 的 `phases[].name`);`rounds` 是进入
|
|
102
124
|
* 次数——单调(reducer 取 max),所以 resume 重放的前缀不会把它加倍。
|
|
103
125
|
*/
|
|
104
126
|
export declare const workflowRunPhaseSchema: z.ZodObject<{
|
|
@@ -107,7 +129,7 @@ export declare const workflowRunPhaseSchema: z.ZodObject<{
|
|
|
107
129
|
}, z.core.$strip>;
|
|
108
130
|
export type WorkflowRunPhase = z.infer<typeof workflowRunPhaseSchema>;
|
|
109
131
|
/**
|
|
110
|
-
*
|
|
132
|
+
* 界在某个**出生阶段**上花掉了多少(docs/dynamic-workflow/presentation.md「Reduction」)。
|
|
111
133
|
*
|
|
112
134
|
* 两个计数器({@link workflowRunUsageSchema} 的 `nodesUnlisted` / `nodesUnlistedSettled`)说得出
|
|
113
135
|
* 一条 run 总共少列了多少,说不出少在**哪一站**——而读面是按站画的:一个站点的花名册、计数环和
|
|
@@ -128,7 +150,7 @@ export declare const workflowRunUnlistedPhaseSchema: z.ZodObject<{
|
|
|
128
150
|
}, z.core.$strip>;
|
|
129
151
|
export type WorkflowRunUnlistedPhase = z.infer<typeof workflowRunUnlistedPhaseSchema>;
|
|
130
152
|
/**
|
|
131
|
-
* run
|
|
153
|
+
* run 级用量:观察面,不是控制面(docs/dynamic-workflow/authoring.md)。`spentTokens` 直接取
|
|
132
154
|
* 引擎 `usage-updated` 事件携带的已花总量(与 `dwf_run.spent_tokens` 同一同步步骤写入,
|
|
133
155
|
* 二者永远相等);`nodesUsed` 是本 run 已派发(dispatched)的节点数,由节点事件计数——
|
|
134
156
|
* 没有任何上限可以拿来反算,也不需要。
|
|
@@ -150,8 +172,11 @@ export type WorkflowRunUsage = z.infer<typeof workflowRunUsageSchema>;
|
|
|
150
172
|
* - `completed`:其余(全部节点已结算,或 run 已终态)。
|
|
151
173
|
* 不存在可观察的 actor 级 failed:某次 ask 失败仍是「它的活干完了」,结果在节点上。
|
|
152
174
|
*
|
|
153
|
-
* `sessionId`
|
|
154
|
-
*
|
|
175
|
+
* `sessionId` 是**持有这个子代理转录的那条会话**(transcript 下钻直接读它,
|
|
176
|
+
* docs/dynamic-workflow/presentation.md「Subagent transcripts」)。通常是 run service 按
|
|
177
|
+
* `(runId, actorRef)` 确定性铸造的本 run 会话;修订 run 里一个到目前为止全部答案都来自导入
|
|
178
|
+
* 命中的子代理没有自己的会话(命中不建会话),这时它是前驱里被读取的那条会话,由缓存结算的
|
|
179
|
+
* `sourceSessionId` 带来,第一次 live 派发之后换回本 run 的会话(种子已抄入前缀)。
|
|
155
180
|
*/
|
|
156
181
|
export declare const workflowRunActorSchema: z.ZodObject<{
|
|
157
182
|
siteId: z.ZodString;
|
|
@@ -160,10 +185,11 @@ export declare const workflowRunActorSchema: z.ZodObject<{
|
|
|
160
185
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
161
186
|
status: z.ZodEnum<{
|
|
162
187
|
running: "running";
|
|
163
|
-
completed: "completed";
|
|
164
188
|
waiting: "waiting";
|
|
189
|
+
completed: "completed";
|
|
165
190
|
}>;
|
|
166
191
|
phaseName: z.ZodOptional<z.ZodString>;
|
|
192
|
+
model: z.ZodOptional<z.ZodString>;
|
|
167
193
|
}, z.core.$strip>;
|
|
168
194
|
export type WorkflowRunActor = z.infer<typeof workflowRunActorSchema>;
|
|
169
195
|
/**
|
|
@@ -197,13 +223,13 @@ export declare const workflowRunNodeSchema: z.ZodObject<{
|
|
|
197
223
|
"world-read": "world-read";
|
|
198
224
|
}>>;
|
|
199
225
|
phase: z.ZodEnum<{
|
|
200
|
-
queued: "queued";
|
|
201
|
-
executing: "executing";
|
|
202
226
|
waiting: "waiting";
|
|
203
|
-
|
|
227
|
+
queued: "queued";
|
|
204
228
|
dispatched: "dispatched";
|
|
229
|
+
executing: "executing";
|
|
205
230
|
repairing: "repairing";
|
|
206
231
|
nudged: "nudged";
|
|
232
|
+
settled: "settled";
|
|
207
233
|
}>;
|
|
208
234
|
outcome: z.ZodOptional<z.ZodEnum<{
|
|
209
235
|
failed: "failed";
|
|
@@ -228,16 +254,17 @@ export type WorkflowRunNode = z.infer<typeof workflowRunNodeSchema>;
|
|
|
228
254
|
* 实际并发是**两者取小**:
|
|
229
255
|
*
|
|
230
256
|
* - `cap`:本 run 所在 provider key 的**共享**闸门现状(治理器按 key 分桶、按 run 扇出,
|
|
231
|
-
* 随 `concurrency-changed`
|
|
232
|
-
*
|
|
233
|
-
* `
|
|
257
|
+
* 随 `concurrency-changed` 移动)。
|
|
258
|
+
* - `ceiling`:默认并发 D(线上键名早于「默认并发」,旧端还在读它,故保留)。它是参照线不是上限:
|
|
259
|
+
* 共享 cap 可以自动长到 2D,用户也可以把本 run 调到 D 之上。已知 `run.concurrencyCeiling` 时就取
|
|
260
|
+
* 它;只有老 CLI(不发 D)才退回「见过的最大 `previous` / `next`」。
|
|
234
261
|
* - `limit`:本 run **自己的**界(`CreateWorkflow` / `AmendWorkflow` 的 `max_concurrency`
|
|
235
|
-
* 落到 `caps.maxConcurrency`),随 `run-started`
|
|
236
|
-
*
|
|
262
|
+
* 落到 `caps.maxConcurrency`),随 `run-started` 到达、就地 retune 时随 `run-caps-changed` 移动。
|
|
263
|
+
* **只在 ≠ D 时在场**(高于低于都算):跑在默认上的 run 与从前一模一样,一个键都不多。
|
|
237
264
|
* - `cooldownMs`:带 Retry-After 的限流冻结新派发的时长,**相对量**(同 `retryInMs` 的理由);
|
|
238
265
|
* `idle_reset` 与 run 终态清掉它。
|
|
239
266
|
*
|
|
240
|
-
* UI
|
|
267
|
+
* UI 的读数规则见 workflowRunConcurrencyView(docs/dynamic-workflow/concurrency.md「What the user sees」)。
|
|
241
268
|
*/
|
|
242
269
|
export declare const workflowRunConcurrencySchema: z.ZodObject<{
|
|
243
270
|
key: z.ZodOptional<z.ZodString>;
|
|
@@ -294,21 +321,47 @@ export declare const workflowRunPendingQuestionSchema: z.ZodObject<{
|
|
|
294
321
|
askedAt: z.ZodOptional<z.ZodNumber>;
|
|
295
322
|
}, z.core.$strip>;
|
|
296
323
|
export type WorkflowRunPendingQuestion = z.infer<typeof workflowRunPendingQuestionSchema>;
|
|
324
|
+
/**
|
|
325
|
+
* 一个留白(docs/dynamic-workflow/authoring.md「Holes」;投影侧见 docs/dynamic-workflow/presentation.md
|
|
326
|
+
* 「Holes on the timeline」):脚本里一处 `hole<T>("名字")`,run 走到它就停驻那条分支、等主代理用
|
|
327
|
+
* `FillWorkflowHole` 补上代码。身份是**站点 id**(名字键 `hole#<8 位十六进制>`):同一站点在循环里可以停驻多个 ordinal,
|
|
328
|
+
* 表里只留最新的那一个——补全是按站点一次性的,读面要说的也只是「这个留白等着 / 补上了」。
|
|
329
|
+
*
|
|
330
|
+
* `state`:`waiting` = 引擎里有停驻的 deferred(真相在 CLI 进程内,与 pendingQuestions 同族,所以新的
|
|
331
|
+
* 一世与终态都把它剥掉);`filled` = 补全已接进 run(事实在 journal 的 `hole-filled` 事件里,跨世保留)。
|
|
332
|
+
* `type` 是作者写的类型原文;载荷不带它时缺席,读面退回 display 载荷的 `holes[].type` 按站点 id 取。
|
|
333
|
+
* `since` 是到达时刻(epoch 毫秒,由事件携带——本模块无时钟),`filledAt` / `filledBy` 随 `hole-filled` 到达。
|
|
334
|
+
*/
|
|
335
|
+
export declare const workflowRunHoleSchema: z.ZodObject<{
|
|
336
|
+
siteId: z.ZodString;
|
|
337
|
+
ordinal: z.ZodNumber;
|
|
338
|
+
name: z.ZodString;
|
|
339
|
+
type: z.ZodOptional<z.ZodString>;
|
|
340
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
341
|
+
state: z.ZodEnum<{
|
|
342
|
+
waiting: "waiting";
|
|
343
|
+
filled: "filled";
|
|
344
|
+
}>;
|
|
345
|
+
since: z.ZodOptional<z.ZodNumber>;
|
|
346
|
+
filledAt: z.ZodOptional<z.ZodNumber>;
|
|
347
|
+
filledBy: z.ZodOptional<z.ZodString>;
|
|
348
|
+
}, z.core.$strip>;
|
|
349
|
+
export type WorkflowRunHole = z.infer<typeof workflowRunHoleSchema>;
|
|
297
350
|
export declare const workflowRunSchema: z.ZodObject<{
|
|
298
351
|
runId: z.ZodString;
|
|
299
352
|
toolCallId: z.ZodOptional<z.ZodString>;
|
|
300
353
|
status: z.ZodEnum<{
|
|
301
|
-
pending: "pending";
|
|
302
354
|
running: "running";
|
|
303
355
|
completed: "completed";
|
|
304
|
-
|
|
356
|
+
pending: "pending";
|
|
305
357
|
errored: "errored";
|
|
358
|
+
stopped: "stopped";
|
|
306
359
|
}>;
|
|
307
360
|
stopReason: z.ZodOptional<z.ZodEnum<{
|
|
308
|
-
interrupted: "interrupted";
|
|
309
|
-
user: "user";
|
|
310
|
-
model: "model";
|
|
311
361
|
provider: "provider";
|
|
362
|
+
model: "model";
|
|
363
|
+
user: "user";
|
|
364
|
+
interrupted: "interrupted";
|
|
312
365
|
superseded: "superseded";
|
|
313
366
|
}>>;
|
|
314
367
|
resumedFrom: z.ZodOptional<z.ZodString>;
|
|
@@ -329,10 +382,11 @@ export declare const workflowRunSchema: z.ZodObject<{
|
|
|
329
382
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
330
383
|
status: z.ZodEnum<{
|
|
331
384
|
running: "running";
|
|
332
|
-
completed: "completed";
|
|
333
385
|
waiting: "waiting";
|
|
386
|
+
completed: "completed";
|
|
334
387
|
}>;
|
|
335
388
|
phaseName: z.ZodOptional<z.ZodString>;
|
|
389
|
+
model: z.ZodOptional<z.ZodString>;
|
|
336
390
|
}, z.core.$strip>>;
|
|
337
391
|
nodes: z.ZodArray<z.ZodObject<{
|
|
338
392
|
siteId: z.ZodString;
|
|
@@ -342,13 +396,13 @@ export declare const workflowRunSchema: z.ZodObject<{
|
|
|
342
396
|
"world-read": "world-read";
|
|
343
397
|
}>>;
|
|
344
398
|
phase: z.ZodEnum<{
|
|
345
|
-
queued: "queued";
|
|
346
|
-
executing: "executing";
|
|
347
399
|
waiting: "waiting";
|
|
348
|
-
|
|
400
|
+
queued: "queued";
|
|
349
401
|
dispatched: "dispatched";
|
|
402
|
+
executing: "executing";
|
|
350
403
|
repairing: "repairing";
|
|
351
404
|
nudged: "nudged";
|
|
405
|
+
settled: "settled";
|
|
352
406
|
}>;
|
|
353
407
|
outcome: z.ZodOptional<z.ZodEnum<{
|
|
354
408
|
failed: "failed";
|
|
@@ -415,6 +469,21 @@ export declare const workflowRunSchema: z.ZodObject<{
|
|
|
415
469
|
currentPhase: z.ZodOptional<z.ZodString>;
|
|
416
470
|
phaseNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
417
471
|
phaseAlongside: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodNumber>>>;
|
|
472
|
+
phaseHoles: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
473
|
+
holes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
474
|
+
siteId: z.ZodString;
|
|
475
|
+
ordinal: z.ZodNumber;
|
|
476
|
+
name: z.ZodString;
|
|
477
|
+
type: z.ZodOptional<z.ZodString>;
|
|
478
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
479
|
+
state: z.ZodEnum<{
|
|
480
|
+
waiting: "waiting";
|
|
481
|
+
filled: "filled";
|
|
482
|
+
}>;
|
|
483
|
+
since: z.ZodOptional<z.ZodNumber>;
|
|
484
|
+
filledAt: z.ZodOptional<z.ZodNumber>;
|
|
485
|
+
filledBy: z.ZodOptional<z.ZodString>;
|
|
486
|
+
}, z.core.$strip>>>;
|
|
418
487
|
unlistedByPhase: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
419
488
|
phaseName: z.ZodOptional<z.ZodString>;
|
|
420
489
|
actors: z.ZodNumber;
|
|
@@ -432,17 +501,17 @@ export declare const workflowRunsStateSchema: z.ZodObject<{
|
|
|
432
501
|
runId: z.ZodString;
|
|
433
502
|
toolCallId: z.ZodOptional<z.ZodString>;
|
|
434
503
|
status: z.ZodEnum<{
|
|
435
|
-
pending: "pending";
|
|
436
504
|
running: "running";
|
|
437
505
|
completed: "completed";
|
|
438
|
-
|
|
506
|
+
pending: "pending";
|
|
439
507
|
errored: "errored";
|
|
508
|
+
stopped: "stopped";
|
|
440
509
|
}>;
|
|
441
510
|
stopReason: z.ZodOptional<z.ZodEnum<{
|
|
442
|
-
interrupted: "interrupted";
|
|
443
|
-
user: "user";
|
|
444
|
-
model: "model";
|
|
445
511
|
provider: "provider";
|
|
512
|
+
model: "model";
|
|
513
|
+
user: "user";
|
|
514
|
+
interrupted: "interrupted";
|
|
446
515
|
superseded: "superseded";
|
|
447
516
|
}>>;
|
|
448
517
|
resumedFrom: z.ZodOptional<z.ZodString>;
|
|
@@ -463,10 +532,11 @@ export declare const workflowRunsStateSchema: z.ZodObject<{
|
|
|
463
532
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
464
533
|
status: z.ZodEnum<{
|
|
465
534
|
running: "running";
|
|
466
|
-
completed: "completed";
|
|
467
535
|
waiting: "waiting";
|
|
536
|
+
completed: "completed";
|
|
468
537
|
}>;
|
|
469
538
|
phaseName: z.ZodOptional<z.ZodString>;
|
|
539
|
+
model: z.ZodOptional<z.ZodString>;
|
|
470
540
|
}, z.core.$strip>>;
|
|
471
541
|
nodes: z.ZodArray<z.ZodObject<{
|
|
472
542
|
siteId: z.ZodString;
|
|
@@ -476,13 +546,13 @@ export declare const workflowRunsStateSchema: z.ZodObject<{
|
|
|
476
546
|
"world-read": "world-read";
|
|
477
547
|
}>>;
|
|
478
548
|
phase: z.ZodEnum<{
|
|
479
|
-
queued: "queued";
|
|
480
|
-
executing: "executing";
|
|
481
549
|
waiting: "waiting";
|
|
482
|
-
|
|
550
|
+
queued: "queued";
|
|
483
551
|
dispatched: "dispatched";
|
|
552
|
+
executing: "executing";
|
|
484
553
|
repairing: "repairing";
|
|
485
554
|
nudged: "nudged";
|
|
555
|
+
settled: "settled";
|
|
486
556
|
}>;
|
|
487
557
|
outcome: z.ZodOptional<z.ZodEnum<{
|
|
488
558
|
failed: "failed";
|
|
@@ -549,6 +619,21 @@ export declare const workflowRunsStateSchema: z.ZodObject<{
|
|
|
549
619
|
currentPhase: z.ZodOptional<z.ZodString>;
|
|
550
620
|
phaseNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
551
621
|
phaseAlongside: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodNumber>>>;
|
|
622
|
+
phaseHoles: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
623
|
+
holes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
624
|
+
siteId: z.ZodString;
|
|
625
|
+
ordinal: z.ZodNumber;
|
|
626
|
+
name: z.ZodString;
|
|
627
|
+
type: z.ZodOptional<z.ZodString>;
|
|
628
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
629
|
+
state: z.ZodEnum<{
|
|
630
|
+
waiting: "waiting";
|
|
631
|
+
filled: "filled";
|
|
632
|
+
}>;
|
|
633
|
+
since: z.ZodOptional<z.ZodNumber>;
|
|
634
|
+
filledAt: z.ZodOptional<z.ZodNumber>;
|
|
635
|
+
filledBy: z.ZodOptional<z.ZodString>;
|
|
636
|
+
}, z.core.$strip>>>;
|
|
552
637
|
unlistedByPhase: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
553
638
|
phaseName: z.ZodOptional<z.ZodString>;
|
|
554
639
|
actors: z.ZodNumber;
|
|
@@ -12,10 +12,15 @@ export const WORKFLOW_RUNS_LIMITS = {
|
|
|
12
12
|
/** 最近若干个 run;超出按最旧淘汰。 */
|
|
13
13
|
maxRuns: 8,
|
|
14
14
|
/**
|
|
15
|
-
* actors 与 nodes
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
15
|
+
* actors 与 nodes **同界**。每个节点都属于某个 actor,所以 nodes 的界已经隐含了 actor
|
|
16
|
+
* 数的量级;把 actors 压得更低(曾是 32)只会让一个平常的 50 路 fan-out 在检视器里
|
|
17
|
+
* 静默少掉 18 个子代理,而节点表、引擎、图三层都装得下。
|
|
18
|
+
*
|
|
19
|
+
* 2026-09-20 从 256 抬到 1024:原来那条界的理由是「状态键按事件整体重发,无界即 O(N²)
|
|
20
|
+
* 字节」,而键级增量(workflow-runs-delta.ts)落地后每条事件只发改动量,那条理由没了。
|
|
21
|
+
* 剩下的两条理由都还在,而且都不需要 256 这么紧:挡住「疯掉的脚本在循环里 `agent()`」,
|
|
22
|
+
* 以及让单条 run 的字节数有个上界。**跨 run** 的总量另有 {@link maxTotalEntries} 管。
|
|
23
|
+
* 它仍然不是产品意义上的子代理上限。
|
|
19
24
|
*/
|
|
20
25
|
maxActors: 1_024,
|
|
21
26
|
maxNodes: 1_024,
|
|
@@ -29,7 +34,7 @@ export const WORKFLOW_RUNS_LIMITS = {
|
|
|
29
34
|
*/
|
|
30
35
|
maxTotalEntries: 6_144,
|
|
31
36
|
/**
|
|
32
|
-
* 详情页 Results 区的**展示**预算,刻意远小于引擎的 run 级 report
|
|
37
|
+
* 详情页 Results 区的**展示**预算,刻意远小于引擎的 run 级 report 上限(`REPORT_CAPS.maxItemsPerRun`):
|
|
33
38
|
* 协议线上的界是展示预算,引擎的界才是契约,两者不必相等。超出这个界的条目仍在
|
|
34
39
|
* journal 里(`dwf_node.kind = "report"`),只是不进这条高频状态键。
|
|
35
40
|
*/
|
|
@@ -53,7 +58,12 @@ export const WORKFLOW_RUNS_LIMITS = {
|
|
|
53
58
|
*/
|
|
54
59
|
maxSubagentModelLength: 256,
|
|
55
60
|
/**
|
|
56
|
-
* `
|
|
61
|
+
* actor `sessionId` 的线上上界。会话 id 是铸出来或读出来的标识,不是展示文本:超界的值
|
|
62
|
+
* 整条丢弃而不是截断——一个被砍短的会话 id 指向的是另一条(或不存在的)会话。
|
|
63
|
+
*/
|
|
64
|
+
maxSessionIdLength: 256,
|
|
65
|
+
/**
|
|
66
|
+
* `run.concurrencyCeiling`(默认并发 D)的上界。D 按 `max(4, min(16, cores − 2))` 推导,这条界只挡坏载荷
|
|
57
67
|
* (reducer 读到界外的值当作读不出,沿用已知值)。
|
|
58
68
|
*/
|
|
59
69
|
maxConcurrencyCeiling: 1_024,
|
|
@@ -77,6 +87,16 @@ export const WORKFLOW_RUNS_LIMITS = {
|
|
|
77
87
|
maxPhases: 32,
|
|
78
88
|
/** 阶段名的线上上界,与 display 的 `CREATE_WORKFLOW_GRAPH_MAX_NAME_CHARS` 同值(UI 按名字关联两边)。 */
|
|
79
89
|
maxPhaseNameLength: 128,
|
|
90
|
+
/**
|
|
91
|
+
* 一条 run 记得的留白条数(docs/dynamic-workflow/presentation.md「Holes on the timeline」)。与 display
|
|
92
|
+
* 载荷的 `holes` 同界:时间线上画不出的留白,投影里也不必记。一个留白就是一个阶段,所以它天然
|
|
93
|
+
* 不会多过 `maxPhases`。
|
|
94
|
+
*/
|
|
95
|
+
maxHoles: 32,
|
|
96
|
+
/** 留白类型原文(`Plan`)的线上上界,与 display 的同名字段同值。 */
|
|
97
|
+
maxHoleTypeLength: 128,
|
|
98
|
+
/** 留白的提示语在 run 状态里的上限(侧板等待体要画它);超长时截到 499 字加 `…`。 */
|
|
99
|
+
maxHolePromptLength: 500,
|
|
80
100
|
/**
|
|
81
101
|
* 一次 ask 的**任务摘要**上界(`node-queued` 的 `instructionsHead`)。与引擎侧的
|
|
82
102
|
* `INSTRUCTIONS_HEAD_MAX_CHARS` 同值:那一头已经按这条界切好,这里是线上的第二道闸。
|
|
@@ -97,7 +117,8 @@ export const WORKFLOW_RUNS_LIMITS = {
|
|
|
97
117
|
* **旧消费者**(没有 `workflowRunDeltas` 能力的那一代)编译进去的 actors / nodes 界。
|
|
98
118
|
*
|
|
99
119
|
* ⚠ 这两个数**永远不能改**:它们不是我们的界,是别人二进制里的校验界。超界的载荷不会被
|
|
100
|
-
* 剥掉一个键——它会让整个 `state.updated` patch
|
|
120
|
+
* 剥掉一个键——它会让整个 `state.updated` patch 解析失败、整帧被丢,那条订阅从此静默
|
|
121
|
+
* (2026-09-04 的那次 `fault.subscription.recoveryFailed` 就是这个形状)。所以给这类订阅者
|
|
101
122
|
* 发帧前必须先过 `clampWorkflowRunsForLegacy`。
|
|
102
123
|
*
|
|
103
124
|
* 「前 256 条」不是随手取的:旧归约触界时是**拒新**,它产出的恰好就是最早的那 256 条。
|
|
@@ -107,7 +128,8 @@ export const WORKFLOW_RUNS_LEGACY_LIMITS = {
|
|
|
107
128
|
maxNodes: 256,
|
|
108
129
|
};
|
|
109
130
|
/**
|
|
110
|
-
* 一个被控制流进入过的阶段(`phase("…")`
|
|
131
|
+
* 一个被控制流进入过的阶段(`phase("…")` 标记;docs/dynamic-workflow/presentation.md
|
|
132
|
+
* 2026-09-05)。`name` 是作者原词(时间线按它关联 display 的 `phases[].name`);`rounds` 是进入
|
|
111
133
|
* 次数——单调(reducer 取 max),所以 resume 重放的前缀不会把它加倍。
|
|
112
134
|
*/
|
|
113
135
|
export const workflowRunPhaseSchema = z.object({
|
|
@@ -115,7 +137,7 @@ export const workflowRunPhaseSchema = z.object({
|
|
|
115
137
|
rounds: z.number().int().positive(),
|
|
116
138
|
});
|
|
117
139
|
/**
|
|
118
|
-
*
|
|
140
|
+
* 界在某个**出生阶段**上花掉了多少(docs/dynamic-workflow/presentation.md「Reduction」)。
|
|
119
141
|
*
|
|
120
142
|
* 两个计数器({@link workflowRunUsageSchema} 的 `nodesUnlisted` / `nodesUnlistedSettled`)说得出
|
|
121
143
|
* 一条 run 总共少列了多少,说不出少在**哪一站**——而读面是按站画的:一个站点的花名册、计数环和
|
|
@@ -135,7 +157,7 @@ export const workflowRunUnlistedPhaseSchema = z.object({
|
|
|
135
157
|
settled: z.number().int().nonnegative(),
|
|
136
158
|
});
|
|
137
159
|
/**
|
|
138
|
-
* run
|
|
160
|
+
* run 级用量:观察面,不是控制面(docs/dynamic-workflow/authoring.md)。`spentTokens` 直接取
|
|
139
161
|
* 引擎 `usage-updated` 事件携带的已花总量(与 `dwf_run.spent_tokens` 同一同步步骤写入,
|
|
140
162
|
* 二者永远相等);`nodesUsed` 是本 run 已派发(dispatched)的节点数,由节点事件计数——
|
|
141
163
|
* 没有任何上限可以拿来反算,也不需要。
|
|
@@ -144,7 +166,8 @@ export const workflowRunUsageSchema = z.object({
|
|
|
144
166
|
spentTokens: z.number().int().nonnegative(),
|
|
145
167
|
nodesUsed: z.number().int().nonnegative(),
|
|
146
168
|
/**
|
|
147
|
-
* 撞上 {@link WORKFLOW_RUNS_LIMITS.maxNodes}
|
|
169
|
+
* 撞上 {@link WORKFLOW_RUNS_LIMITS.maxNodes} 被**拒之表外**的实例数,以及其中已结算的条数
|
|
170
|
+
* (docs/dynamic-workflow/presentation.md)。`truncated` 只说得出「有东西没进来」,说不出
|
|
148
171
|
* 有多少——于是一个 3000 路 fan-out 的 run 在读面上会显示成「1024 步」,那是一句假话。
|
|
149
172
|
*
|
|
150
173
|
* 两条都是**加出来**的计数(被拒实例根本不在表里,没有可去重的身份),所以归约只在事件
|
|
@@ -164,14 +187,17 @@ export const workflowRunUsageSchema = z.object({
|
|
|
164
187
|
* - `completed`:其余(全部节点已结算,或 run 已终态)。
|
|
165
188
|
* 不存在可观察的 actor 级 failed:某次 ask 失败仍是「它的活干完了」,结果在节点上。
|
|
166
189
|
*
|
|
167
|
-
* `sessionId`
|
|
168
|
-
*
|
|
190
|
+
* `sessionId` 是**持有这个子代理转录的那条会话**(transcript 下钻直接读它,
|
|
191
|
+
* docs/dynamic-workflow/presentation.md「Subagent transcripts」)。通常是 run service 按
|
|
192
|
+
* `(runId, actorRef)` 确定性铸造的本 run 会话;修订 run 里一个到目前为止全部答案都来自导入
|
|
193
|
+
* 命中的子代理没有自己的会话(命中不建会话),这时它是前驱里被读取的那条会话,由缓存结算的
|
|
194
|
+
* `sourceSessionId` 带来,第一次 live 派发之后换回本 run 的会话(种子已抄入前缀)。
|
|
169
195
|
*/
|
|
170
196
|
export const workflowRunActorSchema = z.object({
|
|
171
197
|
siteId: z.string().min(1).max(64),
|
|
172
198
|
ordinal: z.number().int().nonnegative(),
|
|
173
199
|
name: z.string().min(1).max(WORKFLOW_RUNS_LIMITS.maxActorNameLength).optional(),
|
|
174
|
-
sessionId: z.string().min(1).max(
|
|
200
|
+
sessionId: z.string().min(1).max(WORKFLOW_RUNS_LIMITS.maxSessionIdLength).optional(),
|
|
175
201
|
status: z.enum(["waiting", "running", "completed"]),
|
|
176
202
|
/**
|
|
177
203
|
* 这个实例**出生**在哪个阶段:它的 ordinal 被铸造的那一刻,控制流所在的 `phase("…")` 标记名。UI 按**名字**与 `phases[].name`
|
|
@@ -181,6 +207,12 @@ export const workflowRunActorSchema = z.object({
|
|
|
181
207
|
* 或者发事件的是不带这个键的旧 CLI。
|
|
182
208
|
*/
|
|
183
209
|
phaseName: z.string().min(1).max(WORKFLOW_RUNS_LIMITS.maxPhaseNameLength).optional(),
|
|
210
|
+
/**
|
|
211
|
+
* 这个子代理的模型:persona 点名了模型时,宿主按本 run 的绑定表解析出的规范串
|
|
212
|
+
* `providerId/modelId[$level]`(docs/dynamic-workflow/presentation.md「Reduction」)。缺席即它跑在
|
|
213
|
+
* run 的子代理模型上(或发事件的是不带这个键的旧 CLI)。与 `subagentModel` 同界。
|
|
214
|
+
*/
|
|
215
|
+
model: z.string().min(1).max(WORKFLOW_RUNS_LIMITS.maxSubagentModelLength).optional(),
|
|
184
216
|
});
|
|
185
217
|
/**
|
|
186
218
|
* 一次 ask 里**最近一次**工具调用(`node-progress` 携带)。`name` 是工具名;`target` 是一个
|
|
@@ -258,16 +290,17 @@ export const workflowRunNodeSchema = z.object({
|
|
|
258
290
|
* 实际并发是**两者取小**:
|
|
259
291
|
*
|
|
260
292
|
* - `cap`:本 run 所在 provider key 的**共享**闸门现状(治理器按 key 分桶、按 run 扇出,
|
|
261
|
-
* 随 `concurrency-changed`
|
|
262
|
-
*
|
|
263
|
-
* `
|
|
293
|
+
* 随 `concurrency-changed` 移动)。
|
|
294
|
+
* - `ceiling`:默认并发 D(线上键名早于「默认并发」,旧端还在读它,故保留)。它是参照线不是上限:
|
|
295
|
+
* 共享 cap 可以自动长到 2D,用户也可以把本 run 调到 D 之上。已知 `run.concurrencyCeiling` 时就取
|
|
296
|
+
* 它;只有老 CLI(不发 D)才退回「见过的最大 `previous` / `next`」。
|
|
264
297
|
* - `limit`:本 run **自己的**界(`CreateWorkflow` / `AmendWorkflow` 的 `max_concurrency`
|
|
265
|
-
* 落到 `caps.maxConcurrency`),随 `run-started`
|
|
266
|
-
*
|
|
298
|
+
* 落到 `caps.maxConcurrency`),随 `run-started` 到达、就地 retune 时随 `run-caps-changed` 移动。
|
|
299
|
+
* **只在 ≠ D 时在场**(高于低于都算):跑在默认上的 run 与从前一模一样,一个键都不多。
|
|
267
300
|
* - `cooldownMs`:带 Retry-After 的限流冻结新派发的时长,**相对量**(同 `retryInMs` 的理由);
|
|
268
301
|
* `idle_reset` 与 run 终态清掉它。
|
|
269
302
|
*
|
|
270
|
-
* UI
|
|
303
|
+
* UI 的读数规则见 workflowRunConcurrencyView(docs/dynamic-workflow/concurrency.md「What the user sees」)。
|
|
271
304
|
*/
|
|
272
305
|
export const workflowRunConcurrencySchema = z.object({
|
|
273
306
|
key: z.string().min(1).max(WORKFLOW_RUNS_LIMITS.maxConcurrencyKeyLength).optional(),
|
|
@@ -335,6 +368,29 @@ export const workflowRunPendingQuestionSchema = z.object({
|
|
|
335
368
|
*/
|
|
336
369
|
askedAt: z.number().int().nonnegative().optional(),
|
|
337
370
|
});
|
|
371
|
+
/**
|
|
372
|
+
* 一个留白(docs/dynamic-workflow/authoring.md「Holes」;投影侧见 docs/dynamic-workflow/presentation.md
|
|
373
|
+
* 「Holes on the timeline」):脚本里一处 `hole<T>("名字")`,run 走到它就停驻那条分支、等主代理用
|
|
374
|
+
* `FillWorkflowHole` 补上代码。身份是**站点 id**(名字键 `hole#<8 位十六进制>`):同一站点在循环里可以停驻多个 ordinal,
|
|
375
|
+
* 表里只留最新的那一个——补全是按站点一次性的,读面要说的也只是「这个留白等着 / 补上了」。
|
|
376
|
+
*
|
|
377
|
+
* `state`:`waiting` = 引擎里有停驻的 deferred(真相在 CLI 进程内,与 pendingQuestions 同族,所以新的
|
|
378
|
+
* 一世与终态都把它剥掉);`filled` = 补全已接进 run(事实在 journal 的 `hole-filled` 事件里,跨世保留)。
|
|
379
|
+
* `type` 是作者写的类型原文;载荷不带它时缺席,读面退回 display 载荷的 `holes[].type` 按站点 id 取。
|
|
380
|
+
* `since` 是到达时刻(epoch 毫秒,由事件携带——本模块无时钟),`filledAt` / `filledBy` 随 `hole-filled` 到达。
|
|
381
|
+
*/
|
|
382
|
+
export const workflowRunHoleSchema = z.object({
|
|
383
|
+
siteId: z.string().min(1).max(64),
|
|
384
|
+
ordinal: z.number().int().nonnegative(),
|
|
385
|
+
name: z.string().min(1).max(WORKFLOW_RUNS_LIMITS.maxPhaseNameLength),
|
|
386
|
+
type: z.string().min(1).max(WORKFLOW_RUNS_LIMITS.maxHoleTypeLength).optional(),
|
|
387
|
+
/** 主代理收到的提示语(`hole-reached` 载荷的 `prompt`),已按 {@link WORKFLOW_RUNS_LIMITS.maxHolePromptLength} 截断。 */
|
|
388
|
+
prompt: z.string().min(1).max(WORKFLOW_RUNS_LIMITS.maxHolePromptLength).optional(),
|
|
389
|
+
state: z.enum(["waiting", "filled"]),
|
|
390
|
+
since: z.number().int().nonnegative().optional(),
|
|
391
|
+
filledAt: z.number().int().nonnegative().optional(),
|
|
392
|
+
filledBy: z.string().min(1).max(128).optional(),
|
|
393
|
+
});
|
|
338
394
|
export const workflowRunSchema = z.object({
|
|
339
395
|
runId: z.string().min(1).max(128),
|
|
340
396
|
/** 发起该 run 的 CreateWorkflow 工具调用(工具卡 → 详情页的关联键)。 */
|
|
@@ -388,16 +444,18 @@ export const workflowRunSchema = z.object({
|
|
|
388
444
|
.max(WORKFLOW_RUNS_LIMITS.maxPendingQuestions)
|
|
389
445
|
.optional(),
|
|
390
446
|
/**
|
|
391
|
-
* 并发现状(见 {@link workflowRunConcurrencySchema}
|
|
392
|
-
*
|
|
393
|
-
*
|
|
447
|
+
* 并发现状(见 {@link workflowRunConcurrencySchema})。收到过 `concurrency-changed`(共享桶动过),
|
|
448
|
+
* 或 `run-started` / `run-caps-changed` 带来一个 ≠ 默认并发的 `limit`(用户给这次 run 定了界)时
|
|
449
|
+
* 在场。两者都没有的 run 一直跑在默认上,没有可说的。
|
|
394
450
|
* optional 的理由与 `reports` / `pendingQuestions` 同。
|
|
395
451
|
*/
|
|
396
452
|
concurrency: workflowRunConcurrencySchema.optional(),
|
|
397
453
|
/**
|
|
398
|
-
*
|
|
399
|
-
*
|
|
400
|
-
*
|
|
454
|
+
* 默认并发 D(`run-started` 载荷的 `concurrencyCeiling`,CLI 铸载荷时拼进去的进程事实;键名早于
|
|
455
|
+
* 「默认并发」这个概念,为兼容旧端保留)。它是起点不是上限。与 `concurrency` 不同,它**只要读得到
|
|
456
|
+
* 就在**,不论本 run 有没有自己的界——「配置」弹层据它写「默认 N」、判「等于默认 = 不设自己的界」
|
|
457
|
+
* (docs/dynamic-workflow/concurrency.md「Protocol state」)。optional 的理由与 `concurrency` 同:
|
|
458
|
+
* 老 CLI 不发,少一个键是退化。
|
|
401
459
|
*/
|
|
402
460
|
concurrencyCeiling: z
|
|
403
461
|
.number()
|
|
@@ -460,6 +518,23 @@ export const workflowRunSchema = z.object({
|
|
|
460
518
|
.array(z.array(z.number().int().nonnegative()).max(WORKFLOW_RUNS_LIMITS.maxPhases))
|
|
461
519
|
.max(WORKFLOW_RUNS_LIMITS.maxPhases)
|
|
462
520
|
.optional(),
|
|
521
|
+
/**
|
|
522
|
+
* `phaseNames` 里哪几站是**还开着的留白**(下标表,`run-launched.holes` / `hole-filled.holes`;
|
|
523
|
+
* docs/dynamic-workflow/presentation.md「Holes on the timeline」的「The model」)。侧栏只从 `phaseNames`
|
|
524
|
+
* 画迷你轨道,没有 display 载荷可查,所以这张表是它把留白画成虚线灯的唯一依据。补全之后那一站
|
|
525
|
+
* 不再是留白,表随 `hole-filled` 整张换新。依附 `phaseNames`:后者不在场时它一定不在场;一个都没有
|
|
526
|
+
* 时同样缺席。
|
|
527
|
+
*/
|
|
528
|
+
phaseHoles: z
|
|
529
|
+
.array(z.number().int().nonnegative())
|
|
530
|
+
.max(WORKFLOW_RUNS_LIMITS.maxPhases)
|
|
531
|
+
.optional(),
|
|
532
|
+
/**
|
|
533
|
+
* 这条 run 的留白(见 {@link workflowRunHoleSchema}),按首次到达顺序。**零条时整个键缺席**,与
|
|
534
|
+
* `pendingQuestions` 同规。optional 的理由与 `reports` 逐字相同:往已有状态键追加字段,旧 CLI 不发它
|
|
535
|
+
* 时少一个键是退化,不是整帧被丢。
|
|
536
|
+
*/
|
|
537
|
+
holes: z.array(workflowRunHoleSchema).max(WORKFLOW_RUNS_LIMITS.maxHoles).optional(),
|
|
463
538
|
/**
|
|
464
539
|
* 界在各个出生阶段上花掉了多少(见 {@link workflowRunUnlistedPhaseSchema})。**一格都没有时
|
|
465
540
|
* 整个键缺席**。表长比 `maxPhases` 多一格:那一格是「无阶段」,它与具名阶段共用同一张表。
|
|
@@ -19,9 +19,9 @@ export declare const workflowRunWorkspaceNodeKindSchema: z.ZodEnum<{
|
|
|
19
19
|
export type WorkflowRunWorkspaceNodeKind = z.infer<typeof workflowRunWorkspaceNodeKindSchema>;
|
|
20
20
|
/** journal 行的状态(`NodeRecordStatus` 的线上镜像)。 */
|
|
21
21
|
export declare const workflowRunWorkspaceNodeStatusSchema: z.ZodEnum<{
|
|
22
|
+
failed: "failed";
|
|
22
23
|
running: "running";
|
|
23
24
|
completed: "completed";
|
|
24
|
-
failed: "failed";
|
|
25
25
|
}>;
|
|
26
26
|
export type WorkflowRunWorkspaceNodeStatus = z.infer<typeof workflowRunWorkspaceNodeStatusSchema>;
|
|
27
27
|
/** 结构化失败:journal `error_json` 的 code + message(其余字段不出协议)。 */
|
|
@@ -58,9 +58,9 @@ export declare const workflowRunWorkspaceNodeSchema: z.ZodObject<{
|
|
|
58
58
|
args: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
59
59
|
inputTruncated: z.ZodOptional<z.ZodLiteral<true>>;
|
|
60
60
|
status: z.ZodEnum<{
|
|
61
|
+
failed: "failed";
|
|
61
62
|
running: "running";
|
|
62
63
|
completed: "completed";
|
|
63
|
-
failed: "failed";
|
|
64
64
|
}>;
|
|
65
65
|
error: z.ZodOptional<z.ZodObject<{
|
|
66
66
|
code: z.ZodString;
|
|
@@ -94,9 +94,9 @@ export declare const v4ConversationWorkflowRunWorkspaceResultSchema: z.ZodObject
|
|
|
94
94
|
args: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
95
95
|
inputTruncated: z.ZodOptional<z.ZodLiteral<true>>;
|
|
96
96
|
status: z.ZodEnum<{
|
|
97
|
+
failed: "failed";
|
|
97
98
|
running: "running";
|
|
98
99
|
completed: "completed";
|
|
99
|
-
failed: "failed";
|
|
100
100
|
}>;
|
|
101
101
|
error: z.ZodOptional<z.ZodObject<{
|
|
102
102
|
code: z.ZodString;
|
|
@@ -125,9 +125,9 @@ export declare const v4ConversationWorkflowRunNodeResultParamsSchema: z.ZodObjec
|
|
|
125
125
|
export type V4ConversationWorkflowRunNodeResultParams = z.infer<typeof v4ConversationWorkflowRunNodeResultParamsSchema>;
|
|
126
126
|
export declare const v4ConversationWorkflowRunNodeResultResultSchema: z.ZodObject<{
|
|
127
127
|
status: z.ZodEnum<{
|
|
128
|
+
failed: "failed";
|
|
128
129
|
running: "running";
|
|
129
130
|
completed: "completed";
|
|
130
|
-
failed: "failed";
|
|
131
131
|
}>;
|
|
132
132
|
result: z.ZodOptional<z.ZodUnknown>;
|
|
133
133
|
error: z.ZodOptional<z.ZodObject<{
|
|
@@ -87,8 +87,8 @@ export declare const workspaceHookReviewRequestPayloadSchema: z.ZodObject<{
|
|
|
87
87
|
resolvedTimeoutMs: z.ZodNumber;
|
|
88
88
|
resolvedMaxOutputBytes: z.ZodNumber;
|
|
89
89
|
executionMode: z.ZodEnum<{
|
|
90
|
-
foreground: "foreground";
|
|
91
90
|
background: "background";
|
|
91
|
+
foreground: "foreground";
|
|
92
92
|
}>;
|
|
93
93
|
configuredEnabled: z.ZodBoolean;
|
|
94
94
|
editable: z.ZodBoolean;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { DCodeSessionStateSnapshot } from "./dcode-protocol/index.js";
|
|
2
|
+
export type DCodeSessionContentProfile = "full" | "index";
|
|
3
|
+
/** 生成 task index 专用的轻量 snapshot;不修改入参(CLI 侧 messages 可能来自共享缓存)。 */
|
|
4
|
+
export declare function elideSessionSnapshotForIndex<T extends DCodeSessionStateSnapshot>(snapshot: T): T;
|
|
5
|
+
//# sourceMappingURL=dcode-session-content-profile.d.ts.map
|