@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
|
@@ -5,16 +5,16 @@ const MODE_COMMAND_NAME = "/mode";
|
|
|
5
5
|
const MODE_COMMAND_WITH_SPACE = `${MODE_COMMAND_NAME} `;
|
|
6
6
|
const MODE_DESCRIPTIONS = {
|
|
7
7
|
build: "Ask before each file changes.",
|
|
8
|
-
edit: "Edit selected files or relevant workspace files automatically.",
|
|
9
8
|
plan: "Inspect the code and present a plan before editing.",
|
|
10
9
|
yolo: "Edit and run commands with fewer confirmations.",
|
|
10
|
+
guarded: "Full access with single-use confirmation for explicit dangerous commands.",
|
|
11
11
|
};
|
|
12
12
|
const TUI_MODE_OPTIONS = TUI_SWITCHABLE_MODES.map((mode) => ({
|
|
13
13
|
description: MODE_DESCRIPTIONS[mode],
|
|
14
14
|
id: mode,
|
|
15
15
|
label: formatModeLabel(mode),
|
|
16
16
|
}));
|
|
17
|
-
function modeCommandQuery(draft) {
|
|
17
|
+
export function modeCommandQuery(draft) {
|
|
18
18
|
if (draft === MODE_COMMAND_NAME)
|
|
19
19
|
return "";
|
|
20
20
|
if (draft.startsWith(MODE_COMMAND_WITH_SPACE)) {
|
|
@@ -26,7 +26,7 @@ function modeCommandQuery(draft) {
|
|
|
26
26
|
}
|
|
27
27
|
return undefined;
|
|
28
28
|
}
|
|
29
|
-
function filterModeOptions(draft) {
|
|
29
|
+
export function filterModeOptions(draft) {
|
|
30
30
|
const query = modeCommandQuery(draft);
|
|
31
31
|
if (query === undefined)
|
|
32
32
|
return [];
|
|
@@ -40,7 +40,7 @@ function filterModeOptions(draft) {
|
|
|
40
40
|
function reconcileModeCommandSelection(draft) {
|
|
41
41
|
return modeCommandQuery(draft) !== undefined ? { selectedIndex: 0 } : undefined;
|
|
42
42
|
}
|
|
43
|
-
function selectedModeOption(submittedValue, modeSelection, modes) {
|
|
43
|
+
export function selectedModeOption(submittedValue, modeSelection, modes) {
|
|
44
44
|
if (!modeSelection || modeCommandQuery(submittedValue) === undefined || modes.length === 0) {
|
|
45
45
|
return undefined;
|
|
46
46
|
}
|
|
@@ -6,4 +6,9 @@ export declare function ModeSuggestionPanel({ contentWidth, currentMode, modes,
|
|
|
6
6
|
modes: readonly TuiModeOption[];
|
|
7
7
|
selectedIndex: number;
|
|
8
8
|
}): React.ReactElement | null;
|
|
9
|
+
export declare function visibleModeOptionWindow(modes: readonly TuiModeOption[], selectedIndex: number, maxVisible: number): {
|
|
10
|
+
modes: readonly TuiModeOption[];
|
|
11
|
+
selectedIndex: number;
|
|
12
|
+
startIndex: number;
|
|
13
|
+
};
|
|
9
14
|
//# sourceMappingURL=app-mode-suggestion-panel.d.ts.map
|
|
@@ -53,7 +53,7 @@ export function ModeSuggestionPanel({ contentWidth, currentMode, modes, selected
|
|
|
53
53
|
},
|
|
54
54
|
}, "No matching modes."));
|
|
55
55
|
}
|
|
56
|
-
function visibleModeOptionWindow(modes, selectedIndex, maxVisible) {
|
|
56
|
+
export function visibleModeOptionWindow(modes, selectedIndex, maxVisible) {
|
|
57
57
|
if (modes.length === 0 || maxVisible <= 0) {
|
|
58
58
|
return {
|
|
59
59
|
modes: [],
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { CollaborationMode } from "@dcode/contracts";
|
|
2
2
|
import { type Dispatch, type SetStateAction } from "react";
|
|
3
3
|
import type { TuiSetMode } from "./types.js";
|
|
4
|
-
export declare const TUI_SWITCHABLE_MODES: readonly ["plan", "build", "
|
|
4
|
+
export declare const TUI_SWITCHABLE_MODES: readonly ["plan", "build", "guarded", "yolo"];
|
|
5
5
|
export type TuiSwitchableMode = (typeof TUI_SWITCHABLE_MODES)[number];
|
|
6
6
|
export declare function useTuiModeSwitcher({ mode, setMode, setModeHandler, setStatus, }: {
|
|
7
7
|
mode: CollaborationMode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useCallback } from "react";
|
|
2
|
-
export const TUI_SWITCHABLE_MODES = ["plan", "build", "
|
|
2
|
+
export const TUI_SWITCHABLE_MODES = ["plan", "build", "guarded", "yolo"];
|
|
3
3
|
function nextTuiSwitchableMode(currentMode) {
|
|
4
4
|
const currentIndex = TUI_SWITCHABLE_MODES.findIndex((mode) => mode === currentMode);
|
|
5
5
|
const nextIndex = currentIndex < 0 ? 0 : (currentIndex + 1) % TUI_SWITCHABLE_MODES.length;
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
export declare const SHIMMER_SWEEP_PERIOD_MS = 1800;
|
|
3
|
+
export declare const SPINNER_FRAME_INTERVAL_MS = 80;
|
|
4
|
+
export declare const SPINNER_WIDTH = 1;
|
|
5
|
+
type ShimmerTextSegment = {
|
|
6
|
+
color: string;
|
|
7
|
+
highlighted: boolean;
|
|
8
|
+
text: string;
|
|
9
|
+
};
|
|
2
10
|
export declare function ShimmerText({ animated, baseColor, frameMs, highlightColor, text, }: {
|
|
3
11
|
animated: boolean;
|
|
4
12
|
baseColor?: string;
|
|
@@ -6,7 +14,12 @@ export declare function ShimmerText({ animated, baseColor, frameMs, highlightCol
|
|
|
6
14
|
highlightColor?: string;
|
|
7
15
|
text: string;
|
|
8
16
|
}): React.ReactElement;
|
|
17
|
+
export declare function shimmerTextSegments(text: string, frameMs: number, options?: {
|
|
18
|
+
baseColor?: string;
|
|
19
|
+
highlightColor?: string;
|
|
20
|
+
}): ShimmerTextSegment[];
|
|
9
21
|
export declare function useShimmerFrame(animated: boolean): number;
|
|
10
22
|
export declare function useSpinnerFrame(animated: boolean): string;
|
|
11
23
|
export declare function spinnerFrame(frameMs: number): string;
|
|
24
|
+
export {};
|
|
12
25
|
//# sourceMappingURL=app-motion.d.ts.map
|
|
@@ -2,9 +2,21 @@ import React, { useEffect, useMemo, useState } from "react";
|
|
|
2
2
|
import { palette } from "./app-model.js";
|
|
3
3
|
const h = React.createElement;
|
|
4
4
|
const SHIMMER_FRAME_INTERVAL_MS = 80;
|
|
5
|
-
const SHIMMER_SWEEP_PERIOD_MS = 1_800;
|
|
6
|
-
const SPINNER_FRAME_INTERVAL_MS = 80;
|
|
7
|
-
const
|
|
5
|
+
export const SHIMMER_SWEEP_PERIOD_MS = 1_800;
|
|
6
|
+
export const SPINNER_FRAME_INTERVAL_MS = 80;
|
|
7
|
+
export const SPINNER_WIDTH = 1;
|
|
8
|
+
const SPINNER_FRAMES = [
|
|
9
|
+
"⠋",
|
|
10
|
+
"⠙",
|
|
11
|
+
"⠹",
|
|
12
|
+
"⠸",
|
|
13
|
+
"⠼",
|
|
14
|
+
"⠴",
|
|
15
|
+
"⠦",
|
|
16
|
+
"⠧",
|
|
17
|
+
"⠇",
|
|
18
|
+
"⠏",
|
|
19
|
+
];
|
|
8
20
|
const SHIMMER_PADDING_COLUMNS = 10;
|
|
9
21
|
const SHIMMER_BAND_HALF_WIDTH = 5;
|
|
10
22
|
const SHIMMER_HIGHLIGHT_STRENGTH = 0.9;
|
|
@@ -30,7 +42,7 @@ export function ShimmerText({ animated, baseColor = palette.accent, frameMs, hig
|
|
|
30
42
|
style: { fg: segment.color },
|
|
31
43
|
}, segment.text)));
|
|
32
44
|
}
|
|
33
|
-
function shimmerTextSegments(text, frameMs, options = {}) {
|
|
45
|
+
export function shimmerTextSegments(text, frameMs, options = {}) {
|
|
34
46
|
const chars = Array.from(text);
|
|
35
47
|
if (chars.length === 0)
|
|
36
48
|
return [];
|
|
@@ -116,9 +128,7 @@ function rgbToHex(color) {
|
|
|
116
128
|
return `#${hexChannel(color.r)}${hexChannel(color.g)}${hexChannel(color.b)}`;
|
|
117
129
|
}
|
|
118
130
|
function hexChannel(value) {
|
|
119
|
-
return Math.round(clamp(value, 0, RGB_MAX))
|
|
120
|
-
.toString(HEX_RADIX)
|
|
121
|
-
.padStart(2, "0");
|
|
131
|
+
return Math.round(clamp(value, 0, RGB_MAX)).toString(HEX_RADIX).padStart(2, "0");
|
|
122
132
|
}
|
|
123
133
|
function blendChannel(base, highlight, amount) {
|
|
124
134
|
const clampedAmount = clamp(amount, 0, 1);
|
|
@@ -2,6 +2,20 @@ import type { SessionEvent } from "@dcode/contracts";
|
|
|
2
2
|
import type { TuiCopy } from "@dcode/i18n";
|
|
3
3
|
import { applySessionEventToState } from "./app-events.js";
|
|
4
4
|
type SessionEventHandlers = Parameters<typeof applySessionEventToState>[1];
|
|
5
|
+
/**
|
|
6
|
+
* 只让**主会话**的事件进转写。
|
|
7
|
+
*
|
|
8
|
+
* 为什么必须过滤:actor / 子会话的原始事件会经 `notifyExternalChildSessionEvent` 投进
|
|
9
|
+
* **父 runtime 的同一个外部 sink 集**,并且**保留子自己的 sessionId**(协议层据此按
|
|
10
|
+
* detached live session 路由给桌面)。TUI 的 sink 就挂在那个集合上,per-turn onEvent 也一样,
|
|
11
|
+
* 所以不过滤的话 actor 的流式增量、工具调用、submit_result、turn_complete 会全部画进主转写。
|
|
12
|
+
*
|
|
13
|
+
* dwf 进度事件本身是**父会话**事件(`session.events.ts:134`「追加到父会话」),所以工具卡
|
|
14
|
+
* 与结算后的完成回合不受影响——它们仍是工作流在 TUI 上的唯一两个表面。
|
|
15
|
+
*
|
|
16
|
+
* 拿不到主 sessionId 时放行:宁可多渲染一点,也不要因为缺一个 id 就让转写整片空白。
|
|
17
|
+
*/
|
|
18
|
+
export declare function isMainSessionEvent(event: SessionEvent, mainSessionId: string | undefined): boolean;
|
|
5
19
|
type SessionEventApplierInput = SessionEventHandlers & {
|
|
6
20
|
subscribeSessionEvents?: (sink: (event: SessionEvent) => void) => () => void;
|
|
7
21
|
observeSessionEvent?: (event: SessionEvent) => void;
|
|
@@ -9,6 +23,25 @@ type SessionEventApplierInput = SessionEventHandlers & {
|
|
|
9
23
|
getMainSessionId?: () => string | undefined;
|
|
10
24
|
setLastEvent: (event: string) => void;
|
|
11
25
|
};
|
|
26
|
+
/**
|
|
27
|
+
* 完整的入口流水线:会话闸门 → 去重 → 应用到状态。
|
|
28
|
+
*
|
|
29
|
+
* 导出成纯函数(seen-set 由调用方持有)而不是只留在 hook 里,是为了让**效果**可测:
|
|
30
|
+
* 「actor 的 turn_complete 不会经兜底追加进主转写」这种回归只能在流水线层面证明,
|
|
31
|
+
* 在谓词层面证明不了。返回是否真的应用了。
|
|
32
|
+
*
|
|
33
|
+
* 闸门排在去重之前:外来事件不该占用去重窗口的名额(窗口有界,被 actor 事件挤掉
|
|
34
|
+
* 会让主会话的重复投递漏过去)。
|
|
35
|
+
*/
|
|
36
|
+
export declare function applyMainSessionEvent(event: SessionEvent, applied: Set<string>, input: SessionEventApplierInput): boolean;
|
|
12
37
|
export declare function useSessionEventApplier(input: SessionEventApplierInput): (event: SessionEvent) => void;
|
|
38
|
+
/** A stable subscription survives renders; both event sources share the applier. */
|
|
39
|
+
export declare function useSessionEventSubscription(subscribe: ((sink: (event: SessionEvent) => void) => () => void) | undefined, applyEvent: (event: SessionEvent) => void): void;
|
|
40
|
+
/**
|
|
41
|
+
* 记下这条事件;返回 false 表示它已经被应用过(调用方应整条跳过)。
|
|
42
|
+
*
|
|
43
|
+
* 没有 id 的事件一律放行:宁可重复渲染一次,也不要因为缺一个 key 就把事件整条吞掉。
|
|
44
|
+
*/
|
|
45
|
+
export declare function rememberSessionEvent(applied: Set<string>, event: SessionEvent): boolean;
|
|
13
46
|
export {};
|
|
14
47
|
//# sourceMappingURL=app-session-event-handler.d.ts.map
|
|
@@ -25,7 +25,7 @@ const MAX_REMEMBERED_EVENT_IDS = 2_048;
|
|
|
25
25
|
*
|
|
26
26
|
* 拿不到主 sessionId 时放行:宁可多渲染一点,也不要因为缺一个 id 就让转写整片空白。
|
|
27
27
|
*/
|
|
28
|
-
function isMainSessionEvent(event, mainSessionId) {
|
|
28
|
+
export function isMainSessionEvent(event, mainSessionId) {
|
|
29
29
|
// Tool mirrors deliberately carry the parent's sessionId. They are activity
|
|
30
30
|
// metadata, not parent transcript/tool/usage facts.
|
|
31
31
|
if (isSubagentToolMirror(event))
|
|
@@ -47,7 +47,7 @@ function isMainSessionEvent(event, mainSessionId) {
|
|
|
47
47
|
* 闸门排在去重之前:外来事件不该占用去重窗口的名额(窗口有界,被 actor 事件挤掉
|
|
48
48
|
* 会让主会话的重复投递漏过去)。
|
|
49
49
|
*/
|
|
50
|
-
function applyMainSessionEvent(event, applied, input) {
|
|
50
|
+
export function applyMainSessionEvent(event, applied, input) {
|
|
51
51
|
if (!isMainSessionEvent(event, input.getMainSessionId?.()))
|
|
52
52
|
return false;
|
|
53
53
|
if (!rememberSessionEvent(applied, event))
|
|
@@ -66,7 +66,7 @@ export function useSessionEventApplier(input) {
|
|
|
66
66
|
return applyEvent;
|
|
67
67
|
}
|
|
68
68
|
/** A stable subscription survives renders; both event sources share the applier. */
|
|
69
|
-
function useSessionEventSubscription(subscribe, applyEvent) {
|
|
69
|
+
export function useSessionEventSubscription(subscribe, applyEvent) {
|
|
70
70
|
const latest = React.useRef(applyEvent);
|
|
71
71
|
latest.current = applyEvent;
|
|
72
72
|
React.useEffect(() => subscribe?.((event) => latest.current(event)), [subscribe]);
|
|
@@ -76,7 +76,7 @@ function useSessionEventSubscription(subscribe, applyEvent) {
|
|
|
76
76
|
*
|
|
77
77
|
* 没有 id 的事件一律放行:宁可重复渲染一次,也不要因为缺一个 key 就把事件整条吞掉。
|
|
78
78
|
*/
|
|
79
|
-
function rememberSessionEvent(applied, event) {
|
|
79
|
+
export function rememberSessionEvent(applied, event) {
|
|
80
80
|
const eventId = typeof event.id === "string" && event.id.length > 0 ? event.id : undefined;
|
|
81
81
|
if (eventId === undefined)
|
|
82
82
|
return true;
|
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import type { ToolResultDisplayHunk } from "./app-model.js";
|
|
2
|
+
import type { ToolResultDisplayHunk, ToolResultDisplayLine } from "./app-model.js";
|
|
3
|
+
type DiffMarker = "+" | "-" | " ";
|
|
4
|
+
type DiffTone = ToolResultDisplayLine["tone"];
|
|
3
5
|
type ShikiDiffViewMode = "split" | "unified";
|
|
6
|
+
type DiffDisplayRow = {
|
|
7
|
+
content: string;
|
|
8
|
+
id: string;
|
|
9
|
+
marker: DiffMarker;
|
|
10
|
+
newLine?: number;
|
|
11
|
+
oldLine?: number;
|
|
12
|
+
tone: DiffTone;
|
|
13
|
+
};
|
|
14
|
+
type SplitDiffRow = {
|
|
15
|
+
id: string;
|
|
16
|
+
left?: DiffDisplayRow;
|
|
17
|
+
right?: DiffDisplayRow;
|
|
18
|
+
};
|
|
4
19
|
export declare function ShikiDiffView(props: {
|
|
5
20
|
filePath?: string;
|
|
6
21
|
structuredPatch: ToolResultDisplayHunk[];
|
|
@@ -9,5 +24,7 @@ export declare function ShikiDiffView(props: {
|
|
|
9
24
|
view?: ShikiDiffViewMode;
|
|
10
25
|
}): React.ReactElement;
|
|
11
26
|
export declare function diffViewForWidth(terminalWidth: number): ShikiDiffViewMode;
|
|
27
|
+
export declare function buildDiffRows(hunks: ToolResultDisplayHunk[]): DiffDisplayRow[];
|
|
28
|
+
export declare function buildSplitDiffRows(rows: DiffDisplayRow[]): SplitDiffRow[];
|
|
12
29
|
export {};
|
|
13
30
|
//# sourceMappingURL=app-shiki-diff-view.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RGBA, StyledText } from "@mbears/opentui-core";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { highlightShikiCodeLines } from "./app-shiki-highlighter.js";
|
|
3
|
+
import { highlightShikiCodeLines, } from "./app-shiki-highlighter.js";
|
|
4
4
|
import { activeTuiTheme } from "./theme/index.js";
|
|
5
5
|
const SPLIT_DIFF_WIDTH_BREAKPOINT = 120;
|
|
6
6
|
const LINE_NUMBER_WIDTH = 4;
|
|
@@ -52,7 +52,7 @@ export function ShikiDiffView(props) {
|
|
|
52
52
|
export function diffViewForWidth(terminalWidth) {
|
|
53
53
|
return terminalWidth > SPLIT_DIFF_WIDTH_BREAKPOINT ? "split" : "unified";
|
|
54
54
|
}
|
|
55
|
-
function buildDiffRows(hunks) {
|
|
55
|
+
export function buildDiffRows(hunks) {
|
|
56
56
|
const rows = [];
|
|
57
57
|
hunks.forEach((hunk, hunkIndex) => {
|
|
58
58
|
let oldLine = hunk.oldStart;
|
|
@@ -75,7 +75,7 @@ function buildDiffRows(hunks) {
|
|
|
75
75
|
});
|
|
76
76
|
return rows;
|
|
77
77
|
}
|
|
78
|
-
function buildSplitDiffRows(rows) {
|
|
78
|
+
export function buildSplitDiffRows(rows) {
|
|
79
79
|
const splitRows = [];
|
|
80
80
|
let index = 0;
|
|
81
81
|
while (index < rows.length) {
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
+
import { type BundledLanguage } from "shiki";
|
|
1
2
|
import type { TuiThemeMode } from "./theme/index.js";
|
|
2
3
|
export type ShikiHighlightSegment = {
|
|
3
4
|
color?: string;
|
|
4
5
|
fontStyle?: number;
|
|
5
6
|
text: string;
|
|
6
7
|
};
|
|
8
|
+
export declare function inferShikiLanguage(filePath: string | undefined): BundledLanguage | undefined;
|
|
7
9
|
export declare function highlightShikiCodeLines(input: {
|
|
8
10
|
filePath: string | undefined;
|
|
9
11
|
lines: string[];
|
|
10
12
|
mode: TuiThemeMode;
|
|
11
13
|
}): Promise<ShikiHighlightSegment[][] | undefined>;
|
|
14
|
+
export declare function resetShikiHighlighterForTest(): void;
|
|
12
15
|
//# sourceMappingURL=app-shiki-highlighter.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
|
-
import { bundledLanguages, createHighlighter
|
|
2
|
+
import { bundledLanguages, createHighlighter } from "shiki";
|
|
3
3
|
const SHIKI_DARK_THEME = "github-dark";
|
|
4
4
|
const SHIKI_LIGHT_THEME = "github-light";
|
|
5
5
|
const SHIKI_THEMES = [SHIKI_DARK_THEME, SHIKI_LIGHT_THEME];
|
|
@@ -24,7 +24,7 @@ const LANGUAGE_BY_EXTENSION = {
|
|
|
24
24
|
let highlighterPromise;
|
|
25
25
|
const loadedLanguages = new Set();
|
|
26
26
|
const highlightCache = new Map();
|
|
27
|
-
function inferShikiLanguage(filePath) {
|
|
27
|
+
export function inferShikiLanguage(filePath) {
|
|
28
28
|
if (!filePath)
|
|
29
29
|
return undefined;
|
|
30
30
|
const basename = path.basename(filePath).toLowerCase();
|
|
@@ -53,6 +53,11 @@ export async function highlightShikiCodeLines(input) {
|
|
|
53
53
|
highlightCache.set(cacheKey, highlighted);
|
|
54
54
|
return highlighted;
|
|
55
55
|
}
|
|
56
|
+
export function resetShikiHighlighterForTest() {
|
|
57
|
+
highlighterPromise = undefined;
|
|
58
|
+
loadedLanguages.clear();
|
|
59
|
+
highlightCache.clear();
|
|
60
|
+
}
|
|
56
61
|
async function tokenizeLines(input) {
|
|
57
62
|
try {
|
|
58
63
|
const highlighter = await getHighlighter();
|
|
@@ -3,8 +3,14 @@ export declare const SIDEBAR_WIDTH = 42;
|
|
|
3
3
|
export declare const SIDEBAR_HORIZONTAL_PADDING_COLUMNS = 1;
|
|
4
4
|
export declare const SIDEBAR_CONTENT_WIDTH: number;
|
|
5
5
|
export declare const SIDEBAR_OVERLAY_BACKGROUND: RGBA;
|
|
6
|
+
type SidebarPreference = "auto" | "hidden";
|
|
6
7
|
export type SidebarSectionId = "apis" | "mcp" | "modifiedFiles" | "todos" | "subagents";
|
|
7
8
|
export type SidebarSectionExpansion = Record<SidebarSectionId, boolean>;
|
|
9
|
+
type SidebarControllerState = {
|
|
10
|
+
narrowOverlayOpen: boolean;
|
|
11
|
+
preference: SidebarPreference;
|
|
12
|
+
sections: SidebarSectionExpansion;
|
|
13
|
+
};
|
|
8
14
|
export type SidebarLayout = {
|
|
9
15
|
overlay: boolean;
|
|
10
16
|
reservedWidth: number;
|
|
@@ -18,6 +24,10 @@ type SidebarController = {
|
|
|
18
24
|
toggleSidebarSection: (section: SidebarSectionId) => boolean;
|
|
19
25
|
toggleSidebar: () => boolean;
|
|
20
26
|
};
|
|
27
|
+
export declare const DEFAULT_SIDEBAR_STATE: SidebarControllerState;
|
|
21
28
|
export declare function useSidebarController(): SidebarController;
|
|
29
|
+
export declare function sidebarLayoutForTerminal(terminalWidth: number, state: SidebarControllerState): SidebarLayout;
|
|
30
|
+
export declare function toggleSidebarState(state: SidebarControllerState, terminalWidth: number): SidebarControllerState;
|
|
31
|
+
export declare function toggleSidebarSectionState(sections: SidebarSectionExpansion, section: SidebarSectionId): SidebarSectionExpansion;
|
|
22
32
|
export {};
|
|
23
33
|
//# sourceMappingURL=app-sidebar-layout.d.ts.map
|
|
@@ -6,7 +6,7 @@ export const SIDEBAR_HORIZONTAL_PADDING_COLUMNS = 1;
|
|
|
6
6
|
export const SIDEBAR_CONTENT_WIDTH = SIDEBAR_WIDTH - SIDEBAR_HORIZONTAL_PADDING_COLUMNS * 2;
|
|
7
7
|
const SIDEBAR_AUTO_VISIBLE_BREAKPOINT = 120;
|
|
8
8
|
export const SIDEBAR_OVERLAY_BACKGROUND = RGBA.fromInts(0, 0, 0, 70);
|
|
9
|
-
const DEFAULT_SIDEBAR_STATE = {
|
|
9
|
+
export const DEFAULT_SIDEBAR_STATE = {
|
|
10
10
|
narrowOverlayOpen: false,
|
|
11
11
|
preference: "auto",
|
|
12
12
|
sections: {
|
|
@@ -41,7 +41,7 @@ export function useSidebarController() {
|
|
|
41
41
|
toggleSidebar,
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
|
-
function sidebarLayoutForTerminal(terminalWidth, state) {
|
|
44
|
+
export function sidebarLayoutForTerminal(terminalWidth, state) {
|
|
45
45
|
const wide = isWideSidebarTerminal(terminalWidth);
|
|
46
46
|
const visible = state.narrowOverlayOpen || (state.preference === "auto" && wide);
|
|
47
47
|
const overlay = visible && !wide;
|
|
@@ -52,7 +52,7 @@ function sidebarLayoutForTerminal(terminalWidth, state) {
|
|
|
52
52
|
wide,
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
|
-
function toggleSidebarState(state, terminalWidth) {
|
|
55
|
+
export function toggleSidebarState(state, terminalWidth) {
|
|
56
56
|
const layout = sidebarLayoutForTerminal(terminalWidth, state);
|
|
57
57
|
if (layout.visible) {
|
|
58
58
|
return {
|
|
@@ -70,7 +70,7 @@ function toggleSidebarState(state, terminalWidth) {
|
|
|
70
70
|
function isWideSidebarTerminal(terminalWidth) {
|
|
71
71
|
return Math.floor(terminalWidth) > SIDEBAR_AUTO_VISIBLE_BREAKPOINT;
|
|
72
72
|
}
|
|
73
|
-
function toggleSidebarSectionState(sections, section) {
|
|
73
|
+
export function toggleSidebarSectionState(sections, section) {
|
|
74
74
|
return {
|
|
75
75
|
...sections,
|
|
76
76
|
[section]: !sections[section],
|
|
@@ -44,4 +44,5 @@ export declare function submitIdleTurn(input: {
|
|
|
44
44
|
modelSelection?: ModelSelection;
|
|
45
45
|
turnRef: React.MutableRefObject<AbortController | undefined>;
|
|
46
46
|
}): Promise<void>;
|
|
47
|
+
export declare function redactSensitivePromptForTranscript(text: string): string;
|
|
47
48
|
//# sourceMappingURL=app-submit.d.ts.map
|
|
@@ -187,7 +187,7 @@ function createLocalUserMessage(content) {
|
|
|
187
187
|
role: "user",
|
|
188
188
|
};
|
|
189
189
|
}
|
|
190
|
-
function redactSensitivePromptForTranscript(text) {
|
|
190
|
+
export function redactSensitivePromptForTranscript(text) {
|
|
191
191
|
const trimmed = text.trim();
|
|
192
192
|
const match = /^\/login\s+(dcode-coding-plan-api-key|bigmodel-coding-plan-api-key)(?:\s+([\s\S]+))?$/u.exec(trimmed);
|
|
193
193
|
if (!match?.[2]?.trim())
|
|
@@ -5,4 +5,11 @@ export declare function ThoughtTranscriptPartView({ copy, part, }: {
|
|
|
5
5
|
copy?: TuiCopy;
|
|
6
6
|
part: ThoughtTranscriptPart;
|
|
7
7
|
}): React.ReactElement;
|
|
8
|
+
export declare function ThoughtTranscriptPartFrame({ copy, expanded, onToggle, part, }: {
|
|
9
|
+
copy?: TuiCopy;
|
|
10
|
+
expanded: boolean;
|
|
11
|
+
onToggle: () => void;
|
|
12
|
+
part: ThoughtTranscriptPart;
|
|
13
|
+
}): React.ReactElement;
|
|
14
|
+
export declare function thoughtPlaceholderLabel(part: ThoughtTranscriptPart, copy: TuiCopy): string;
|
|
8
15
|
//# sourceMappingURL=app-thought-components.d.ts.map
|
|
@@ -13,7 +13,7 @@ export function ThoughtTranscriptPartView({ copy = DEFAULT_TUI_COPY, part, }) {
|
|
|
13
13
|
part,
|
|
14
14
|
});
|
|
15
15
|
}
|
|
16
|
-
function ThoughtTranscriptPartFrame({ copy = DEFAULT_TUI_COPY, expanded, onToggle, part, }) {
|
|
16
|
+
export function ThoughtTranscriptPartFrame({ copy = DEFAULT_TUI_COPY, expanded, onToggle, part, }) {
|
|
17
17
|
const label = thoughtPlaceholderLabel(part, copy);
|
|
18
18
|
const marker = expanded ? EXPANDED_MARKER : COLLAPSED_MARKER;
|
|
19
19
|
return h("box", {
|
|
@@ -37,7 +37,7 @@ function ThoughtTranscriptPartFrame({ copy = DEFAULT_TUI_COPY, expanded, onToggl
|
|
|
37
37
|
]
|
|
38
38
|
: []));
|
|
39
39
|
}
|
|
40
|
-
function thoughtPlaceholderLabel(part, copy) {
|
|
40
|
+
export function thoughtPlaceholderLabel(part, copy) {
|
|
41
41
|
return part.status === "thinking"
|
|
42
42
|
? copy.transcript.thought.thinking
|
|
43
43
|
: copy.transcript.thought.complete;
|
|
@@ -13,5 +13,6 @@ type ToolTranscriptInputProjection = {
|
|
|
13
13
|
title?: string;
|
|
14
14
|
};
|
|
15
15
|
export declare function applyToolTranscriptEvent(event: SessionEvent, handlers: ToolTranscriptHandlers): void;
|
|
16
|
+
export declare function summarizeToolInput(toolName: string, input: unknown): string[];
|
|
16
17
|
export declare function buildToolTranscriptProjection(toolName: string, input: unknown, workspaceDirectory?: string): ToolTranscriptInputProjection;
|
|
17
18
|
//# sourceMappingURL=app-tool-transcript.d.ts.map
|
|
@@ -49,6 +49,9 @@ export function applyToolTranscriptEvent(event, handlers) {
|
|
|
49
49
|
}, assistantMessageId));
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
+
export function summarizeToolInput(toolName, input) {
|
|
53
|
+
return buildToolTranscriptProjection(toolName, input).detailLines;
|
|
54
|
+
}
|
|
52
55
|
export function buildToolTranscriptProjection(toolName, input, workspaceDirectory) {
|
|
53
56
|
const record = asRecord(input);
|
|
54
57
|
const normalized = toolName.toLowerCase();
|
|
@@ -56,4 +56,31 @@ export declare function AppView(props: {
|
|
|
56
56
|
workflowCardsByToolCallId?: ReadonlyMap<string, TuiWorkflowCard>;
|
|
57
57
|
expandedWorkflowRunIds?: ReadonlySet<string>;
|
|
58
58
|
}): React.ReactElement;
|
|
59
|
+
export declare function ComposerInputArea(props: {
|
|
60
|
+
focused?: boolean;
|
|
61
|
+
busy: boolean;
|
|
62
|
+
contentWidth: number;
|
|
63
|
+
contextUsage: ContextUsage;
|
|
64
|
+
copy: ReturnType<typeof import("@dcode/i18n").getDCodeCopy>["tui"];
|
|
65
|
+
draft: string;
|
|
66
|
+
editorRef: React.MutableRefObject<PromptInputEditor | null>;
|
|
67
|
+
effortOptions: readonly TuiEffortOption[];
|
|
68
|
+
effortSelection?: EffortCommandSelectionState;
|
|
69
|
+
fileMention?: FileMentionState;
|
|
70
|
+
inputCursorToEndVersion: number;
|
|
71
|
+
loginRequired: boolean;
|
|
72
|
+
mode: string;
|
|
73
|
+
modeOptions: readonly TuiModeOption[];
|
|
74
|
+
modeSelection?: ModeCommandSelectionState;
|
|
75
|
+
model: string;
|
|
76
|
+
modelOptions: readonly NonNullable<TuiOptions["modelOptions"]>[number][];
|
|
77
|
+
modelSelection?: ModelCommandSelectionState;
|
|
78
|
+
queuedInputs: QueuedInput[];
|
|
79
|
+
selection?: SelectionState;
|
|
80
|
+
setDraftValue: (value: string) => void;
|
|
81
|
+
slashCommands: readonly NonNullable<TuiOptions["slashCommands"]>[number][];
|
|
82
|
+
slashSelection?: SlashSelectionState;
|
|
83
|
+
submitValue: (value: string) => void;
|
|
84
|
+
thoughtLevel: string;
|
|
85
|
+
}): React.ReactElement;
|
|
59
86
|
//# sourceMappingURL=app-view.d.ts.map
|
|
@@ -132,7 +132,7 @@ export function AppView(props) {
|
|
|
132
132
|
thoughtLevel: props.thoughtLevel,
|
|
133
133
|
})));
|
|
134
134
|
}
|
|
135
|
-
function ComposerInputArea(props) {
|
|
135
|
+
export function ComposerInputArea(props) {
|
|
136
136
|
return h(React.Fragment, null, props.loginRequired ? h(LoginRequiredPanel, { copy: props.copy }) : null, props.fileMention
|
|
137
137
|
? h(FileMentionPanel, {
|
|
138
138
|
contentWidth: props.contentWidth,
|
|
@@ -13,7 +13,7 @@ const CARD_DETAIL_INDENT = " ";
|
|
|
13
13
|
const CARD_LOG_INDENT = " ";
|
|
14
14
|
export const MAX_ACTOR_ROWS = 6;
|
|
15
15
|
const MAX_RESULT_PREVIEW_WIDTH = 200;
|
|
16
|
-
/**
|
|
16
|
+
/** 六行位置按状态分桶(docs/dynamic-workflow/launch.md「The inline card」):跑着的排前面。 */
|
|
17
17
|
const ACTOR_ROW_RANK = {
|
|
18
18
|
running: 0,
|
|
19
19
|
waiting: 1,
|
|
@@ -2,8 +2,25 @@ import React from "react";
|
|
|
2
2
|
import type { TuiCopy } from "@dcode/i18n";
|
|
3
3
|
import type { WorkflowRunProgressEnvelope } from "@dcode/shared/dcode-protocol-v4";
|
|
4
4
|
import type { Message } from "./app-model.js";
|
|
5
|
-
import type { TuiListWorkflowRuns, TuiReplayWorkflowRuns } from "./types.js";
|
|
5
|
+
import type { TuiListWorkflowRuns, TuiReplayWorkflowRuns, TuiWorkflowRunSummary } from "./types.js";
|
|
6
6
|
import type { TuiWorkflowRunSeed } from "./app-workflow-mirror.js";
|
|
7
|
+
/** 摘要 → 补种条目。只搬服务端给的展示事实,缺省一律保持缺省(不造 label)。 */
|
|
8
|
+
export declare function workflowRunSeedFromSummary(summary: TuiWorkflowRunSummary): TuiWorkflowRunSeed;
|
|
9
|
+
/** 一条 notice 文本。label 缺省时退回 runId——列表少一个标签是退化,不是错误。 */
|
|
10
|
+
export declare function workflowInterruptedNoticeText(seed: TuiWorkflowRunSeed, copy: TuiCopy): string;
|
|
11
|
+
/**
|
|
12
|
+
* 把 resumable run 的提示行追加进转写。无 run 时零输出(spec 的 Excludes)。
|
|
13
|
+
*
|
|
14
|
+
* 用 system 行而不是伪造 user 行:这不是用户说的话。
|
|
15
|
+
*/
|
|
16
|
+
export declare function appendWorkflowInterruptedNotices(messages: Message[], seeds: readonly TuiWorkflowRunSeed[], copy: TuiCopy): Message[];
|
|
17
|
+
/**
|
|
18
|
+
* 启动 / `/resume` 后要提示的 run:服务端说 `resumable` 的那些。
|
|
19
|
+
*
|
|
20
|
+
* **刻意不排序**:`updatedAt` 是纯展示字段,端口注释明确禁止读侧拿它重排——排序是存储层的职责
|
|
21
|
+
* (最近更新在前),读侧再排一次就会与服务端的 tie-break 漂移。
|
|
22
|
+
*/
|
|
23
|
+
export declare function interruptedWorkflowNotices(summaries: readonly TuiWorkflowRunSummary[]): readonly TuiWorkflowRunSeed[];
|
|
7
24
|
/**
|
|
8
25
|
* 挂载时先回放、再补种一次。
|
|
9
26
|
*
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
// 3. 没有第二时钟:只在挂载与 app 更换时各查一次,不轮询、不 setInterval。
|
|
9
9
|
import React from "react";
|
|
10
10
|
/** 摘要 → 补种条目。只搬服务端给的展示事实,缺省一律保持缺省(不造 label)。 */
|
|
11
|
-
function workflowRunSeedFromSummary(summary) {
|
|
11
|
+
export function workflowRunSeedFromSummary(summary) {
|
|
12
12
|
return {
|
|
13
13
|
runId: summary.runId,
|
|
14
14
|
...(summary.label === undefined ? {} : { label: summary.label }),
|
|
@@ -16,7 +16,7 @@ function workflowRunSeedFromSummary(summary) {
|
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
18
|
/** 一条 notice 文本。label 缺省时退回 runId——列表少一个标签是退化,不是错误。 */
|
|
19
|
-
function workflowInterruptedNoticeText(seed, copy) {
|
|
19
|
+
export function workflowInterruptedNoticeText(seed, copy) {
|
|
20
20
|
return copy.transcript.workflow.interruptedNotice({
|
|
21
21
|
label: seed.label ?? seed.runId,
|
|
22
22
|
runId: seed.runId,
|
|
@@ -27,7 +27,7 @@ function workflowInterruptedNoticeText(seed, copy) {
|
|
|
27
27
|
*
|
|
28
28
|
* 用 system 行而不是伪造 user 行:这不是用户说的话。
|
|
29
29
|
*/
|
|
30
|
-
function appendWorkflowInterruptedNotices(messages, seeds, copy) {
|
|
30
|
+
export function appendWorkflowInterruptedNotices(messages, seeds, copy) {
|
|
31
31
|
if (seeds.length === 0)
|
|
32
32
|
return messages;
|
|
33
33
|
return [
|
|
@@ -44,7 +44,7 @@ function appendWorkflowInterruptedNotices(messages, seeds, copy) {
|
|
|
44
44
|
* **刻意不排序**:`updatedAt` 是纯展示字段,端口注释明确禁止读侧拿它重排——排序是存储层的职责
|
|
45
45
|
* (最近更新在前),读侧再排一次就会与服务端的 tie-break 漂移。
|
|
46
46
|
*/
|
|
47
|
-
function interruptedWorkflowNotices(summaries) {
|
|
47
|
+
export function interruptedWorkflowNotices(summaries) {
|
|
48
48
|
return summaries.filter((summary) => summary.resumable === true).map(workflowRunSeedFromSummary);
|
|
49
49
|
}
|
|
50
50
|
/**
|