pi-web-ui 0.116.0 → 0.118.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/CHANGELOG.md +83 -3
- package/README.md +69 -138
- package/README.zh-CN.md +70 -179
- package/README.zh-TW.md +3 -1
- package/bin/device-hub-cli.mjs +163 -36
- package/bin/frp-manager.mjs +4 -80
- package/bin/hub-upgrade.mjs +561 -0
- package/bin/pi-device-hub.mjs +0 -1
- package/bin/pi-web-ui.mjs +184 -504
- package/deploy/nginx-subpath.conf +0 -33
- package/deploy/pi-web-ui.service +0 -20
- package/dist/server/agent-formatters.js +4 -38
- package/dist/server/agent-service-daemon.js +203 -371
- package/dist/server/agent-service.js +1281 -3030
- package/dist/server/approval-audit.js +2 -23
- package/dist/server/approval-default-rules.js +0 -6
- package/dist/server/approval-rules.js +7 -105
- package/dist/server/ask-user-question-tool.js +1 -12
- package/dist/server/atomic-file.js +33 -5
- package/dist/server/attachment-store.js +0 -36
- package/dist/server/attachments.js +3 -112
- package/dist/server/auth-cookie.js +0 -21
- package/dist/server/bash-tool.js +1 -32
- package/dist/server/bg-servers.js +0 -96
- package/dist/server/browser-page-tool.js +11 -62
- package/dist/server/builtin-modules.js +7 -0
- package/dist/server/canvas/canvas-agent-tool.js +58 -47
- package/dist/server/canvas/canvas-cards.js +0 -14
- package/dist/server/canvas/canvas-dispatch.js +7 -4
- package/dist/server/canvas/canvas-orchestrator.js +167 -181
- package/dist/server/canvas/canvas-runtime-messages.js +30 -0
- package/dist/server/canvas/canvas-scheduled-task.js +0 -3
- package/dist/server/canvas/canvas-scheduler.js +5 -7
- package/dist/server/canvas/canvas-store.js +24 -35
- package/dist/server/canvas/canvas-validation.js +17 -14
- package/dist/server/canvas/canvas-workspace.js +42 -114
- package/dist/server/canvas/pstack-skills-data.js +0 -5
- package/dist/server/claim-files-tool.js +1 -15
- package/dist/server/claim-store.js +5 -49
- package/dist/server/client-id-utils.js +0 -16
- package/dist/server/client-state.js +36 -214
- package/dist/server/communicate-tool.js +0 -3
- package/dist/server/compact-context-tool.js +0 -30
- package/dist/server/compacted-history.js +0 -35
- package/dist/server/compaction-instructions.js +0 -13
- package/dist/server/compaction-markers.js +38 -92
- package/dist/server/compaction-state.js +0 -21
- package/dist/server/composer-drafts.js +0 -34
- package/dist/server/context-budget-runner.js +0 -11
- package/dist/server/context-budget.js +1 -70
- package/dist/server/context-evidence.js +0 -14
- package/dist/server/context-usage.js +0 -12
- package/dist/server/control-socket.js +4 -48
- package/dist/server/conversation-communication.js +0 -10
- package/dist/server/conversation-identity.js +0 -1
- package/dist/server/conversation-read-tool.js +0 -58
- package/dist/server/conversation-tool-names.js +0 -1
- package/dist/server/conversation-tool.js +0 -1
- package/dist/server/conversation-touches.js +4 -75
- package/dist/server/dangling-tools.js +142 -68
- package/dist/server/delegate-mode.js +0 -36
- package/dist/server/delegate-task.js +2 -28
- package/dist/server/device-center/approval-summary.js +0 -1
- package/dist/server/device-center/bot-catalog.js +0 -3
- package/dist/server/device-center/bot-execution.js +48 -9
- package/dist/server/device-center/bot-presets.js +0 -1
- package/dist/server/device-center/bots.js +0 -1
- package/dist/server/device-center/collab-service.js +27 -11
- package/dist/server/device-center/collab-tool.js +393 -27
- package/dist/server/device-center/connector.js +128 -48
- package/dist/server/device-center/delivery-authority.js +95 -0
- package/dist/server/device-center/delivery-subject.js +29 -0
- package/dist/server/device-center/desktop-linux.js +3 -15
- package/dist/server/device-center/desktop-native.js +1 -10
- package/dist/server/device-center/desktop-page.js +2 -3
- package/dist/server/device-center/desktop-setup.js +1 -3
- package/dist/server/device-center/desktop.js +1 -7
- package/dist/server/device-center/device-integration.js +452 -208
- package/dist/server/device-center/device-lan-access.js +403 -0
- package/dist/server/device-center/device-lan.js +484 -0
- package/dist/server/device-center/device-portals.js +0 -3
- package/dist/server/device-center/execution-failure.js +0 -2
- package/dist/server/device-center/execution-guides.js +15 -6
- package/dist/server/device-center/execution-instructions.js +0 -1
- package/dist/server/device-center/execution-settings.js +0 -1
- package/dist/server/device-center/execution-system-prompt.js +0 -3
- package/dist/server/device-center/execution-workspace.js +1 -4
- package/dist/server/device-center/executor.js +46 -31
- package/dist/server/device-center/file-sync-paths.js +0 -5
- package/dist/server/device-center/file-sync.js +0 -10
- package/dist/server/device-center/group-context-delta.js +0 -8
- package/dist/server/device-center/group-context-message.js +0 -14
- package/dist/server/device-center/group-context.js +0 -19
- package/dist/server/device-center/group-events.js +0 -2
- package/dist/server/device-center/group-plan-guard.js +1 -35
- package/dist/server/device-center/group-router-runtime.js +182 -0
- package/dist/server/device-center/group-router-worker.js +178 -0
- package/dist/server/device-center/group-router.js +359 -0
- package/dist/server/device-center/hub-auth.js +24 -2
- package/dist/server/device-center/hub-conversations.js +13 -15
- package/dist/server/device-center/hub-deliveries.js +119 -15
- package/dist/server/device-center/hub-integration.js +647 -334
- package/dist/server/device-center/hub-locks.js +1 -5
- package/dist/server/device-center/hub-mobile.js +147 -0
- package/dist/server/device-center/hub-orchestration.js +400 -0
- package/dist/server/device-center/hub-page.js +28 -9
- package/dist/server/device-center/hub-setup.js +23 -7
- package/dist/server/device-center/hub-transaction-log.js +175 -0
- package/dist/server/device-center/hub-upgrade.js +162 -0
- package/dist/server/device-center/hub-webhooks.js +1 -3
- package/dist/server/device-center/hub.js +946 -404
- package/dist/server/device-center/human-interaction.js +1 -4
- package/dist/server/device-center/integration-errors.js +0 -2
- package/dist/server/device-center/integration-verification.js +111 -0
- package/dist/server/device-center/local-hub.js +6 -4
- package/dist/server/device-center/local-publication.js +416 -0
- package/dist/server/device-center/local-verification-job.js +95 -0
- package/dist/server/device-center/local-verification.js +273 -0
- package/dist/server/device-center/local.js +341 -18
- package/dist/server/device-center/main.js +18 -2
- package/dist/server/device-center/mobile-notification-forwarder.js +292 -0
- package/dist/server/device-center/native-desktop/macos.js +0 -1
- package/dist/server/device-center/native-desktop/windows.js +0 -1
- package/dist/server/device-center/partition-log.js +52 -46
- package/dist/server/device-center/path-portal.js +42 -12
- package/dist/server/device-center/publication-journal.js +305 -0
- package/dist/server/device-center/publish-intent.js +374 -0
- package/dist/server/device-center/relay.js +217 -52
- package/dist/server/device-center/report-upload.js +0 -1
- package/dist/server/device-center/runtime.js +419 -52
- package/dist/server/device-center/store.js +223 -65
- package/dist/server/device-center/task-context-budget.js +0 -3
- package/dist/server/device-center/task-error.js +0 -1
- package/dist/server/device-center/task-journal.js +6 -23
- package/dist/server/device-center/task-outcome.js +68 -0
- package/dist/server/device-center/task-plan.js +0 -1
- package/dist/server/device-center/task-progress.js +0 -16
- package/dist/server/device-center/task-recovery.js +569 -227
- package/dist/server/device-center/task-report-outbox.js +0 -4
- package/dist/server/device-center/task-report.js +2 -10
- package/dist/server/device-center/task-scheduler.js +1 -35
- package/dist/server/device-center/task-settlement.js +335 -0
- package/dist/server/device-center/task-state.js +0 -12
- package/dist/server/device-center/task-workspace.js +393 -0
- package/dist/server/device-center/transfer-stream.js +5 -45
- package/dist/server/device-center/transfers.js +2 -10
- package/dist/server/device-center/verification-limits.js +9 -0
- package/dist/server/device-center/work-contract.js +923 -0
- package/dist/server/device-center/work-items.js +317 -0
- package/dist/server/device-center/workspaces.js +0 -1
- package/dist/server/dispatch-domain-handlers.js +202 -29
- package/dist/server/dispatch-plugin-handlers.js +2 -19
- package/dist/server/dsh/dsh-agent-service.js +78 -601
- package/dist/server/dsh/dsh-client.js +7 -111
- package/dist/server/dsh/dsh-market-service.js +4 -25
- package/dist/server/dsh/dsh-serialize.js +0 -49
- package/dist/server/dsh/dsh-sessions.js +0 -37
- package/dist/server/dsh/dsh-usage.js +0 -37
- package/dist/server/dsh/preset-clones.js +1 -65
- package/dist/server/dsh/runtime/custom-prompt.mjs +0 -14
- package/dist/server/dsh/runtime/goal-rpc.mjs +7 -176
- package/dist/server/dsh/runtime/launcher.mjs +2 -53
- package/dist/server/dsh/runtime/override.patch.yml +0 -29
- package/dist/server/dsh/runtime/runtime-root.mjs +0 -54
- package/dist/server/durable/durable-agent-service.js +5 -23
- package/dist/server/durable/durable-driver.js +12 -73
- package/dist/server/durable/durable-event-projector.js +1 -50
- package/dist/server/durable/durable-loader.js +0 -12
- package/dist/server/durable/durable-models.js +11 -80
- package/dist/server/durable/durable-storage.js +1 -17
- package/dist/server/durable/durable-tools.js +2 -20
- package/dist/server/durable/index.js +0 -3
- package/dist/server/edit-soft-tool.js +2 -81
- package/dist/server/engine-capabilities.js +0 -13
- package/dist/server/engine-catalog.js +74 -0
- package/dist/server/engine-cli.js +89 -0
- package/dist/server/engine-probe.js +35 -217
- package/dist/server/ensure-bash.js +2 -28
- package/dist/server/eval-tool.js +1 -50
- package/dist/server/evidence-tool-hooks.js +0 -2
- package/dist/server/file-archives.js +0 -10
- package/dist/server/file-save.js +1 -12
- package/dist/server/file-transfer-routes.js +0 -11
- package/dist/server/files-service.js +18 -271
- package/dist/server/global-loader.js +9 -89
- package/dist/server/goal-evidence.js +1 -35
- package/dist/server/goal-review-gate.js +0 -58
- package/dist/server/goal-service.js +19 -422
- package/dist/server/hashline-engine.js +8 -112
- package/dist/server/host-guard.js +0 -24
- package/dist/server/host-metrics.js +0 -6
- package/dist/server/http-proxy.js +1 -7
- package/dist/server/i18n.js +5 -72
- package/dist/server/icon-svg.js +0 -15
- package/dist/server/index.js +199 -677
- package/dist/server/json-utils.js +0 -12
- package/dist/server/launch-origin.js +0 -44
- package/dist/server/left-panel-running.js +0 -9
- package/dist/server/load-timing.js +1 -4
- package/dist/server/load-tools-tool.js +0 -20
- package/dist/server/locales.js +1 -46
- package/dist/server/lsp-tool.js +13 -126
- package/dist/server/managed.js +0 -48
- package/dist/server/marker-service.js +1 -22
- package/dist/server/markers/builtins/action.js +0 -19
- package/dist/server/markers/builtins/notify.js +1 -9
- package/dist/server/markers/builtins/rename.js +0 -13
- package/dist/server/markers/index.js +0 -3
- package/dist/server/markers/marker.js +0 -13
- package/dist/server/markers/registry.js +0 -3
- package/dist/server/markers/store.js +1 -12
- package/dist/server/market-service.js +7 -43
- package/dist/server/mcp-agent-tool.js +0 -10
- package/dist/server/mcp-bridge.js +6 -138
- package/dist/server/mcp-hot-reload.js +0 -25
- package/dist/server/mcp-manager.js +2 -44
- package/dist/server/mcp-oauth-login.js +0 -2
- package/dist/server/mcp-oauth-ui.js +1 -4
- package/dist/server/mcp-oauth.js +5 -79
- package/dist/server/mcp-project-runtime.js +0 -4
- package/dist/server/message-deletion.js +0 -2
- package/dist/server/message-entry-resolver.js +0 -8
- package/dist/server/message-window.js +0 -71
- package/dist/server/mobile-notification-events.js +16 -0
- package/dist/server/mobile-origin.js +79 -0
- package/dist/server/mobile-push.js +523 -0
- package/dist/server/model-admin.js +19 -358
- package/dist/server/model-enrich.js +0 -19
- package/dist/server/model-resolver.js +2 -61
- package/dist/server/native-cli-discovery.js +115 -0
- package/dist/server/native-cli-model.js +71 -0
- package/dist/server/native-cli-references.js +214 -0
- package/dist/server/native-cli-remote-cleanup.js +58 -0
- package/dist/server/native-cli-remote-files.js +282 -0
- package/dist/server/native-cli-routes.js +68 -0
- package/dist/server/native-cli-runtime.js +1 -0
- package/dist/server/native-cli-session-hooks.js +170 -0
- package/dist/server/native-cli-session.js +585 -0
- package/dist/server/native-cli-state.js +82 -0
- package/dist/server/native-cli.js +210 -0
- package/dist/server/net-guard.js +9 -71
- package/dist/server/office-parse.js +0 -50
- package/dist/server/orphan-manager.js +0 -18
- package/dist/server/patch-bash-process.js +0 -4
- package/dist/server/patch-executable-lookup.js +0 -77
- package/dist/server/patch-node-pty.js +6 -45
- package/dist/server/patch-remote-catalog.js +4 -34
- package/dist/server/patch-tool.js +0 -15
- package/dist/server/payload-limits.js +0 -5
- package/dist/server/pending-question.js +0 -5
- package/dist/server/permission-preset.js +4 -33
- package/dist/server/persona-chain.js +0 -26
- package/dist/server/pkg-info.js +1 -17
- package/dist/server/plan-manager.js +2 -49
- package/dist/server/plan-mode.js +0 -97
- package/dist/server/plan-update-tool.js +1 -15
- package/dist/server/plugin-api-catalog.js +6 -4
- package/dist/server/plugin-assets.js +1 -35
- package/dist/server/plugin-bundled.js +68 -0
- package/dist/server/plugin-catalog-sync.js +0 -37
- package/dist/server/plugin-catalog.js +13 -67
- package/dist/server/plugin-chat-attachments.js +0 -1
- package/dist/server/plugin-conversation-view.js +0 -20
- package/dist/server/plugin-dom.js +1 -23
- package/dist/server/plugin-facilities.js +4 -115
- package/dist/server/plugin-grants.js +2 -90
- package/dist/server/plugin-install-spec.js +0 -43
- package/dist/server/plugin-installer.js +34 -75
- package/dist/server/plugin-llm.js +4 -38
- package/dist/server/plugin-manifest-validate.js +0 -31
- package/dist/server/plugin-permissions.js +1 -24
- package/dist/server/plugin-project.js +7 -129
- package/dist/server/plugin-removal.js +1 -8
- package/dist/server/plugin-schedule.js +1 -38
- package/dist/server/plugin-secrets.js +3 -16
- package/dist/server/plugin-tool-guard.js +1 -28
- package/dist/server/plugin-ui-slots.js +0 -4
- package/dist/server/plugin-updater.js +15 -90
- package/dist/server/plugins.js +71 -619
- package/dist/server/present-files-tool.js +0 -57
- package/dist/server/preset-fields.js +24 -61
- package/dist/server/preset-plugin-dependencies.js +0 -2
- package/dist/server/preset-share.js +4 -172
- package/dist/server/process-utils.js +4 -80
- package/dist/server/prompt-assembler.js +2 -30
- package/dist/server/prompt-base-store.js +0 -47
- package/dist/server/prompt-composer.js +21 -98
- package/dist/server/prompt-templates.js +0 -2
- package/dist/server/protocol-version.js +1 -11
- package/dist/server/protocol.js +0 -5
- package/dist/server/queue-modes.js +0 -3
- package/dist/server/queue-utils.js +0 -40
- package/dist/server/quick-ask-context.js +384 -0
- package/dist/server/quick-ask-settings.js +61 -0
- package/dist/server/quick-ask.js +260 -0
- package/dist/server/read-tool.js +0 -65
- package/dist/server/reasoning-registry.js +1 -29
- package/dist/server/remote-cli-persistence.js +373 -0
- package/dist/server/remote-native-cli.js +78 -0
- package/dist/server/remote-ssh-service.js +481 -190
- package/dist/server/request-context.js +0 -9
- package/dist/server/resolve-global-sdk.js +55 -31
- package/dist/server/sandbox-data.js +0 -1
- package/dist/server/sandbox-engines.js +0 -1
- package/dist/server/sandbox-runtime-gate.js +0 -3
- package/dist/server/sandbox-service.js +0 -41
- package/dist/server/sandbox-tool.js +0 -20
- package/dist/server/schedule-agent-tool.js +2 -31
- package/dist/server/scheduler-tasks.js +32 -56
- package/dist/server/scm-commitmsg.js +0 -53
- package/dist/server/scm.js +3 -48
- package/dist/server/sdk-builtin-extensions.js +2 -29
- package/dist/server/sdk-origin.js +0 -45
- package/dist/server/serialize.js +2 -92
- package/dist/server/server-config.js +0 -11
- package/dist/server/session-branch.js +1 -87
- package/dist/server/session-list-scan.js +215 -0
- package/dist/server/session-open.js +69 -0
- package/dist/server/session-parser.js +4 -54
- package/dist/server/session-scan.js +81 -45
- package/dist/server/session-search.js +0 -56
- package/dist/server/settings-service.js +19 -126
- package/dist/server/setup-config.js +0 -2
- package/dist/server/setup-page.js +0 -9
- package/dist/server/skill-content-filler.js +0 -17
- package/dist/server/skill-discovery.js +5 -92
- package/dist/server/skill-maintenance.js +1 -28
- package/dist/server/skill-tool.js +0 -30
- package/dist/server/slash-commands.js +5 -50
- package/dist/server/soft-cap.js +3 -40
- package/dist/server/startup-banner.js +0 -8
- package/dist/server/subagent-handoff.js +0 -11
- package/dist/server/subagent-helpers.js +2 -17
- package/dist/server/subagent-notify.js +0 -19
- package/dist/server/subagent-security-gate.js +0 -50
- package/dist/server/subagent-task.js +0 -9
- package/dist/server/subagent-templates-hant.js +0 -10
- package/dist/server/subagent-templates.js +3 -103
- package/dist/server/subagents.js +1 -87
- package/dist/server/system-screenshot-windows.js +259 -0
- package/dist/server/system-screenshot.js +77 -0
- package/dist/server/tabs.js +3 -48
- package/dist/server/terminals.js +559 -586
- package/dist/server/text-quote.js +0 -12
- package/dist/server/text-sniff.js +2 -52
- package/dist/server/themes.js +2 -41
- package/dist/server/tool-approval.js +0 -47
- package/dist/server/tool-guards.js +0 -90
- package/dist/server/tool-host-factories.js +1 -16
- package/dist/server/tool-info.js +0 -13
- package/dist/server/tool-manager.js +1 -229
- package/dist/server/tool-overrides.js +1 -46
- package/dist/server/tool-prompt-overrides.js +1 -30
- package/dist/server/tool-prompts.js +0 -14
- package/dist/server/tool-signature.js +0 -25
- package/dist/server/transcript-prepare.js +55 -0
- package/dist/server/tts-routes.js +58 -0
- package/dist/server/tts-service.js +106 -0
- package/dist/server/tts-system.js +160 -0
- package/dist/server/turn-timing.js +0 -1
- package/dist/server/unauthorized-page.js +0 -8
- package/dist/server/universal/driver-base.js +2 -31
- package/dist/server/universal/drivers/claude-code.js +98 -194
- package/dist/server/universal/drivers/codex.js +12 -35
- package/dist/server/universal/drivers/mock-driver.js +1 -11
- package/dist/server/universal/index.js +0 -3
- package/dist/server/universal/session-store.js +4 -21
- package/dist/server/universal/universal-attachments.js +2 -36
- package/dist/server/universal/universal-service.js +5 -24
- package/dist/server/universal/universal-session.js +30 -148
- package/dist/server/universal/universal-types.js +0 -3
- package/dist/server/update-check.js +6 -182
- package/dist/server/uploads.js +4 -43
- package/dist/server/virtual-tui.js +2 -27
- package/dist/server/vision-bridge.js +0 -27
- package/dist/server/wait-subscription-scan.js +13 -115
- package/dist/server/webui-context.js +2 -87
- package/dist/server/workspace-handle.js +373 -0
- package/dist/server/workspace-snapshot.js +7 -113
- package/dist/server/worktree-service.js +2 -53
- package/dist/server/worktree-tool.js +0 -11
- package/dist/server/ws-client-id.js +0 -18
- package/dist/server/ws-pending-queue.js +0 -7
- package/dist/server/ws-unknown-types.js +0 -17
- package/docs/README.md +24 -17
- package/docs/architecture-plugins.md +55 -6
- package/docs/device-center.md +57 -23
- package/docs/device-desktop.md +3 -3
- package/docs/group-orchestration.md +142 -0
- package/docs/hub-upgrade-release-testing.md +46 -0
- package/extensions/webui.ts +3 -74
- package/package.json +9 -6
- package/plugin-sdk/README.md +22 -8
- package/plugin-sdk/client-utils.mjs +0 -7
- package/plugin-sdk/client.d.ts +26 -0
- package/plugin-sdk/client.mjs +52 -0
- package/plugin-sdk/import-check.mjs +4 -51
- package/plugin-sdk/index.d.ts +128 -117
- package/plugin-sdk/index.mjs +2 -687
- package/plugin-sdk/package.json +15 -4
- package/plugin-sdk/ssh-host-trust.mjs +0 -12
- package/plugin-sdk/testing.d.ts +9 -0
- package/plugin-sdk/testing.mjs +511 -0
- package/plugins/catalog.json +52 -4
- package/plugins/superagent/README.md +110 -0
- package/plugins/superagent/client/entry.mjs +21 -0
- package/plugins/superagent/index.mjs +8 -0
- package/plugins/superagent/main.mjs +218 -0
- package/plugins/superagent/manifest.json +15 -0
- package/plugins/superagent/server.mjs +572 -0
- package/plugins/superagent/style.css +167 -0
- package/themes/aetheris.css +1 -31
- package/themes/ayu-light.css +0 -1
- package/themes/bases/flow-base.css +2 -83
- package/themes/bases/obsidian-base.css +2 -37
- package/themes/bases/statusbar-flat-base.css +0 -1
- package/themes/bases/zhujian-base.css +0 -63
- package/themes/bases/zhupi-base.css +0 -64
- package/themes/catppuccin-latte.css +0 -1
- package/themes/catppuccin.css +0 -1
- package/themes/claude-code-dark.css +0 -1
- package/themes/codex.css +0 -1
- package/themes/dark-teal.css +22 -54
- package/themes/everforest-light.css +0 -1
- package/themes/flow-cristallo.css +160 -0
- package/themes/flow-ink.css +160 -0
- package/themes/flow-light.css +1 -10
- package/themes/flow-obsidian.css +160 -0
- package/themes/flow-zurich.css +160 -0
- package/themes/flow.css +1 -9
- package/themes/geist.css +0 -1
- package/themes/gruvbox-light.css +0 -1
- package/themes/kanagawa-lotus.css +0 -1
- package/themes/md-preview.css +1 -2
- package/themes/mist.css +0 -1
- package/themes/nord.css +0 -1
- package/themes/one-dark.css +0 -1
- package/themes/paper.css +0 -1
- package/themes/rose-pine-dawn.css +0 -1
- package/themes/sakura.css +0 -1
- package/themes/solarized-light.css +0 -1
- package/themes/tokyo-night.css +0 -1
- package/themes/translucent.css +4 -35
- package/themes/transparent.css +4 -41
- package/themes/vs-code-dark.css +0 -1
- package/themes/wallpaper-flow.css +3 -17
- package/themes/wallpaper-obsidian.css +1 -4
- package/themes/white.css +0 -1
- package/web/dist/.build-assets.json +1 -1
- package/web/dist/assets/{BgTasksModal-BDoOpj-F.js → BgTasksModal-D-x7kA63.js} +1 -1
- package/web/dist/assets/CanvasStudio-CAWcs9tm.js +1579 -0
- package/web/dist/assets/DeviceCenter-Dc0whRcu.js +3 -0
- package/web/dist/assets/DeviceExecutionSettings-BoX7-0h7.js +1 -0
- package/web/dist/assets/DeviceGroups-C_fZMNeK.js +1 -0
- package/web/dist/assets/{Dropdown-C4LIhshN.js → Dropdown-CTgVLUbp.js} +1 -1
- package/web/dist/assets/FilePreview-C6W0PvaK.js +2 -0
- package/web/dist/assets/GlobalSearchModal-HR9LSspC.js +1 -0
- package/web/dist/assets/GroupConversation-C81YjF2C.js +61 -0
- package/web/dist/assets/GroupWorkItems-BIvZtr10.js +1 -0
- package/web/dist/assets/{HintTip-c6d0TJoh.js → HintTip-Da6qc566.js} +1 -1
- package/web/dist/assets/ModelConfigModal-DhSyuIuV.js +2 -0
- package/web/dist/assets/NativeCliPanel-CU1rZmyu.js +5 -0
- package/web/dist/assets/{PiSetupModal-BmMrrgB9.js → PiSetupModal-DZKY5Wiw.js} +1 -1
- package/web/dist/assets/ProviderOAuthControls-CIL85nA7.js +1 -0
- package/web/dist/assets/SCMPanel-CuEgzAlO.js +2 -0
- package/web/dist/assets/SettingsModal-Cdu5h29p.js +33 -0
- package/web/dist/assets/TermXterm-Bt5WKAxP.js +3 -0
- package/web/dist/assets/TerminalPanel-BCIBV8se.js +1 -0
- package/web/dist/assets/TuiOverlayModal-3NDd9T97.js +1 -0
- package/web/dist/assets/app-globals-CZjFtI4F.js +129 -0
- package/web/dist/assets/canvas-client-WkhM55mR.js +1 -0
- package/web/dist/assets/composer-bridge-CImnjDHq.js +1 -0
- package/web/dist/assets/desktop-B8NZ3KW-.js +1 -0
- package/web/dist/assets/index-CQc3VrWa.css +1 -0
- package/web/dist/assets/index-D_AGu4Zv.js +404 -0
- package/web/dist/assets/plugin-host-uqZGpvCs.js +1 -0
- package/web/dist/assets/{remote-ssh-client-CfYSMEZg.js → remote-ssh-client-Cdf-cTUe.js} +1 -1
- package/web/dist/assets/theme-DGL7hLUs.js +1 -0
- package/web/dist/index.html +12 -11
- package/web/dist/sw.js +15 -61
- package/web/public/sw.js +14 -60
- package/dist/gh-comment-781.md +0 -5
- package/dist/server/device-center/local-page.js +0 -17
- package/dist/server/device-center/smoke-preview.js +0 -3
- package/dist/server/durable/durable-capabilities.js +0 -11
- package/dist/server/markers/builtins/services.js +0 -123
- package/dist/server/markers/builtins/todo.js +0 -189
- package/dist/server/markers-list-tool.js +0 -34
- package/dist/server/orchestrator.js +0 -109
- package/dist/server/patch-turn-end-boundary.js +0 -77
- package/dist/server/system-prompt-soul.js +0 -41
- package/dist/server/univer-service.js +0 -448
- package/dist/server/universal/drivers/dsh-driver.js +0 -379
- package/dist/test-artifact.md +0 -9
- package/dist/test-preview-modal.md +0 -11
- package/dist/test-report.html +0 -20
- package/web/dist/assets/BgTasksModal-C0i3O1FT.js +0 -1
- package/web/dist/assets/CanvasStudio-B8thymBN.js +0 -1579
- package/web/dist/assets/CanvasStudio-zSxyIx1R.js +0 -1579
- package/web/dist/assets/DeviceCenter-DfAHKcid.js +0 -3
- package/web/dist/assets/DeviceCenter-ydvOTlzE.js +0 -3
- package/web/dist/assets/DeviceExecutionSettings-q5Ik8oXg.js +0 -1
- package/web/dist/assets/DeviceGroups-CI14_SRb.js +0 -1
- package/web/dist/assets/DeviceGroups-DvsB5IEU.js +0 -1
- package/web/dist/assets/FilePreview-BgGongmv.js +0 -2
- package/web/dist/assets/FilePreview-D4NrhF-U.js +0 -2
- package/web/dist/assets/GlobalSearchModal-BWgU8yPd.js +0 -1
- package/web/dist/assets/GlobalSearchModal-F7fNimKk.js +0 -1
- package/web/dist/assets/GroupConversation-Dh71Pdb-.js +0 -17
- package/web/dist/assets/GroupConversation-ZK3nRmNm.js +0 -17
- package/web/dist/assets/ModelConfigModal-YVEgyy34.js +0 -2
- package/web/dist/assets/ModelConfigModal-vWtg3srp.js +0 -2
- package/web/dist/assets/ProviderOAuthControls-BGSBIKD7.js +0 -1
- package/web/dist/assets/SCMPanel-B8_EDxNr.js +0 -2
- package/web/dist/assets/SCMPanel-BU58qk3T.js +0 -2
- package/web/dist/assets/SettingsModal-CMUybq3J.js +0 -32
- package/web/dist/assets/SettingsModal-OBmGTh-5.js +0 -32
- package/web/dist/assets/TerminalPanel-0CYvD72B.js +0 -3
- package/web/dist/assets/TerminalPanel-DDavKvFr.js +0 -3
- package/web/dist/assets/TuiOverlayModal-BsA-QTvN.js +0 -1
- package/web/dist/assets/TuiOverlayModal-DzoVQBuG.js +0 -1
- package/web/dist/assets/app-globals-CZxzGvIo.js +0 -123
- package/web/dist/assets/canvas-client-CUnXlQYX.js +0 -1
- package/web/dist/assets/desktop-aAKpvKJV.js +0 -1
- package/web/dist/assets/index-C6DwztqE.css +0 -1
- package/web/dist/assets/index-CuN802Sj.js +0 -93
- package/web/dist/assets/index-EH5Fw9fa.js +0 -93
- package/web/dist/assets/plugin-host-BRWib9DF.js +0 -1
- package/web/dist/assets/theme-D2l_mLNo.js +0 -1
|
@@ -54,11 +54,9 @@ function validEntry(value) {
|
|
|
54
54
|
(!e.uploadPending || (!e.rejected && !!e.sha256 && e.totalBytes <= MAX_TASK_FULL_REPORT_BYTES)) &&
|
|
55
55
|
(e.rejected || e.missing || (!!e.sha256 && !!e.reportRef)));
|
|
56
56
|
}
|
|
57
|
-
/** Separate from terminal-result ACKs: a result never acknowledges report bytes. */
|
|
58
57
|
export function createTaskReportOutbox(dataDir, deviceId, hubUrl = "") {
|
|
59
58
|
const scope = { deviceId, hubUrl: hubUrl ? checkedUrl(hubUrl).href.replace(/\/$/, "") : "" };
|
|
60
59
|
const scopeKey = createHash("sha256").update(JSON.stringify(scope)).digest("hex").slice(0, 32);
|
|
61
|
-
// Scope both the queue and report bytes, so rebinding never replays another Hub's reports.
|
|
62
60
|
const scopedDir = dataDir ? join(dataDir, "task-report-outboxes", scopeKey) : undefined;
|
|
63
61
|
const store = scopedDir ? createTaskReportStore(scopedDir, "device") : undefined;
|
|
64
62
|
const file = scopedDir ? join(scopedDir, "outbox.json") : undefined;
|
|
@@ -101,7 +99,6 @@ export function createTaskReportOutbox(dataDir, deviceId, hubUrl = "") {
|
|
|
101
99
|
}
|
|
102
100
|
if (next.length > REPORT_OUTBOX_MAX_ENTRIES || bytes(next) > REPORT_OUTBOX_MAX_BYTES)
|
|
103
101
|
throw new Error("Report outbox capacity exceeded; pending reports retained");
|
|
104
|
-
// Delete bytes before dropping their registry entry; a failed cleanup stays discoverable.
|
|
105
102
|
for (const old of removed) {
|
|
106
103
|
store?.removeReport(old.id, old.attemptId, deviceId, old.roomId);
|
|
107
104
|
memory.delete(key(old));
|
|
@@ -136,7 +133,6 @@ export function createTaskReportOutbox(dataDir, deviceId, hubUrl = "") {
|
|
|
136
133
|
rejected: true,
|
|
137
134
|
lastError: "Report exceeds 4 MiB quota",
|
|
138
135
|
});
|
|
139
|
-
// Commit intent first; recovery can read the store if interrupted after its atomic write.
|
|
140
136
|
update({
|
|
141
137
|
...task,
|
|
142
138
|
reportRef: store
|
|
@@ -3,9 +3,8 @@ import { join } from "node:path";
|
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
4
|
import { writeAtomicSync, writeJsonAtomicSync } from "../atomic-file.js";
|
|
5
5
|
export const TASK_REPORT_BYTES = 16 * 1024;
|
|
6
|
-
export const MAX_TASK_FULL_REPORT_BYTES = 4 * 1024 * 1024;
|
|
7
|
-
export const MAX_TASK_REPORT_CHUNK_BYTES = 64 * 1024;
|
|
8
|
-
/** Keep the opening context and final conclusions within the wire report budget. */
|
|
6
|
+
export const MAX_TASK_FULL_REPORT_BYTES = 4 * 1024 * 1024;
|
|
7
|
+
export const MAX_TASK_REPORT_CHUNK_BYTES = 64 * 1024;
|
|
9
8
|
export function boundTaskReport(text, limit = TASK_REPORT_BYTES) {
|
|
10
9
|
const bytes = Buffer.from(text, "utf8");
|
|
11
10
|
if (bytes.length <= limit)
|
|
@@ -16,7 +15,6 @@ export function boundTaskReport(text, limit = TASK_REPORT_BYTES) {
|
|
|
16
15
|
const budget = limit - Buffer.byteLength(marker);
|
|
17
16
|
let start = Math.floor(budget / 2);
|
|
18
17
|
let end = bytes.length - (budget - start);
|
|
19
|
-
// UTF-8 continuation bytes cannot begin either retained boundary.
|
|
20
18
|
while (start > 0 && (bytes[start] & 0xc0) === 0x80)
|
|
21
19
|
start--;
|
|
22
20
|
while (end < bytes.length && (bytes[end] & 0xc0) === 0x80)
|
|
@@ -87,7 +85,6 @@ export function createTaskReportStore(baseDir, role = "hub") {
|
|
|
87
85
|
return existing;
|
|
88
86
|
throw new TaskReportConflictError("Completed task report cannot be overwritten");
|
|
89
87
|
}
|
|
90
|
-
// Pre-flight quota check before writing any bytes to disk
|
|
91
88
|
if (bytes > quotaLimit) {
|
|
92
89
|
mkdirSync(dir, { recursive: true });
|
|
93
90
|
const meta = {
|
|
@@ -161,7 +158,6 @@ export function createTaskReportStore(baseDir, role = "hub") {
|
|
|
161
158
|
throw new Error("Account or room mismatch for report binding");
|
|
162
159
|
}
|
|
163
160
|
if (existing.complete) {
|
|
164
|
-
// Check idempotence
|
|
165
161
|
const chunkFile = join(chunksDir, `chunk-${String(chunkIndex).padStart(4, "0")}.txt`);
|
|
166
162
|
if (existsSync(chunkFile)) {
|
|
167
163
|
const prev = readFileSync(chunkFile, "utf8");
|
|
@@ -174,14 +170,12 @@ export function createTaskReportStore(baseDir, role = "hub") {
|
|
|
174
170
|
throw new TaskReportQuotaError("Task report was already rejected due to quota overflow", existing.totalBytes, quotaLimit);
|
|
175
171
|
}
|
|
176
172
|
}
|
|
177
|
-
// Pre-flight check cumulative bytes with new chunk before disk write
|
|
178
173
|
mkdirSync(chunksDir, { recursive: true });
|
|
179
174
|
const chunkFile = join(chunksDir, `chunk-${String(chunkIndex).padStart(4, "0")}.txt`);
|
|
180
175
|
if (existsSync(chunkFile)) {
|
|
181
176
|
const existingText = readFileSync(chunkFile, "utf8");
|
|
182
177
|
if (sha256Hex(existingText) !== chunkHash)
|
|
183
178
|
throw new TaskReportConflictError(`Conflicting content for chunk ${chunkIndex}`);
|
|
184
|
-
// Rebuild metadata below: a process may have stopped after writing the chunk.
|
|
185
179
|
}
|
|
186
180
|
let currentAccumulated = 0;
|
|
187
181
|
const chunkFiles = readdirSync(chunksDir).filter((f) => f.startsWith("chunk-") && f.endsWith(".txt"));
|
|
@@ -209,9 +203,7 @@ export function createTaskReportStore(baseDir, role = "hub") {
|
|
|
209
203
|
writeJsonAtomicSync(join(dir, "report-meta.json"), meta);
|
|
210
204
|
throw new TaskReportQuotaError(`Accumulated report chunks exceed quota (${currentAccumulated + chunkBytes} > ${quotaLimit})`, currentAccumulated + chunkBytes, quotaLimit);
|
|
211
205
|
}
|
|
212
|
-
// Safe atomic write chunk
|
|
213
206
|
writeAtomicSync(chunkFile, text);
|
|
214
|
-
// Count all chunks
|
|
215
207
|
const allChunkFiles = readdirSync(chunksDir)
|
|
216
208
|
.filter((f) => f.startsWith("chunk-") && f.endsWith(".txt"))
|
|
217
209
|
.sort();
|
|
@@ -18,7 +18,6 @@ export class DeviceTaskScheduler {
|
|
|
18
18
|
this.onChange = options?.onChange;
|
|
19
19
|
this.restoreState(options?.persistedState);
|
|
20
20
|
}
|
|
21
|
-
/** Fairness history is in-memory scheduling state; persist it so a restart cannot reset room fairness. */
|
|
22
21
|
snapshotState() {
|
|
23
22
|
return {
|
|
24
23
|
version: 1,
|
|
@@ -52,9 +51,7 @@ export class DeviceTaskScheduler {
|
|
|
52
51
|
try {
|
|
53
52
|
this.onChange?.();
|
|
54
53
|
}
|
|
55
|
-
catch {
|
|
56
|
-
/* persistence scheduling must never break dispatch */
|
|
57
|
-
}
|
|
54
|
+
catch { }
|
|
58
55
|
}
|
|
59
56
|
getSettings() {
|
|
60
57
|
return { ...this.settings };
|
|
@@ -94,7 +91,6 @@ export class DeviceTaskScheduler {
|
|
|
94
91
|
recordRoomDispatch(roomId) {
|
|
95
92
|
let history = this.roomDispatchHistory.get(roomId);
|
|
96
93
|
if (!history) {
|
|
97
|
-
// Bounded LRU eviction
|
|
98
94
|
if (this.roomDispatchHistory.size >= DeviceTaskScheduler.MAX_ROOM_HISTORY) {
|
|
99
95
|
let oldestKey;
|
|
100
96
|
let oldestTime = Infinity;
|
|
@@ -121,13 +117,10 @@ export class DeviceTaskScheduler {
|
|
|
121
117
|
enqueue(task, callbacks, signal) {
|
|
122
118
|
const canonicalRoot = executionRoot(task.root);
|
|
123
119
|
const candidate = { botId: task.botId, root: canonicalRoot };
|
|
124
|
-
// Check if active items have unconfirmed stop blocks
|
|
125
120
|
const blockedBlocker = [...this.active].find((owner) => owner.blocked && this.checkConflict(candidate, owner));
|
|
126
121
|
if (blockedBlocker) {
|
|
127
122
|
throw new DeviceTaskError("Task stop unconfirmed; workspace blocked until service restart");
|
|
128
123
|
}
|
|
129
|
-
// If queue is empty, slots available, and no conflict with active tasks,
|
|
130
|
-
// task can start immediately even if maxWaitingTasks is 0.
|
|
131
124
|
const canStartImmediately = this.queue.length === 0 &&
|
|
132
125
|
this.active.size < this.settings.maxActiveTasks &&
|
|
133
126
|
![...this.active].some((owner) => this.checkConflict(candidate, owner));
|
|
@@ -141,7 +134,6 @@ export class DeviceTaskScheduler {
|
|
|
141
134
|
}
|
|
142
135
|
return null;
|
|
143
136
|
}
|
|
144
|
-
// Needs to queue, check queue capacity
|
|
145
137
|
if (this.queue.length >= this.settings.maxWaitingTasks) {
|
|
146
138
|
throw new DeviceTaskError("Local task queue full");
|
|
147
139
|
}
|
|
@@ -173,7 +165,6 @@ export class DeviceTaskScheduler {
|
|
|
173
165
|
return false;
|
|
174
166
|
}
|
|
175
167
|
cancelTask(taskId, attemptId) {
|
|
176
|
-
// 1. Check waiting queue
|
|
177
168
|
const waitingIndex = this.queue.findIndex((q) => q.taskId === taskId && (!attemptId || q.attemptId === attemptId));
|
|
178
169
|
if (waitingIndex >= 0) {
|
|
179
170
|
const [item] = this.queue.splice(waitingIndex, 1);
|
|
@@ -181,7 +172,6 @@ export class DeviceTaskScheduler {
|
|
|
181
172
|
this.drain();
|
|
182
173
|
return true;
|
|
183
174
|
}
|
|
184
|
-
// 2. Check active running tasks
|
|
185
175
|
const activeItem = [...this.active].find((a) => a.taskId === taskId && (!attemptId || a.attemptId === attemptId));
|
|
186
176
|
if (activeItem && activeItem.controller && !activeItem.controller.signal.aborted) {
|
|
187
177
|
activeItem.controller.abort(new DeviceTaskError("Task cancelled by user"));
|
|
@@ -191,17 +181,14 @@ export class DeviceTaskScheduler {
|
|
|
191
181
|
}
|
|
192
182
|
registerActive(task, controller) {
|
|
193
183
|
const canonicalRoot = executionRoot(task.root);
|
|
194
|
-
// Guard against duplicate task ID
|
|
195
184
|
const duplicate = [...this.active].find((item) => item.taskId === task.id);
|
|
196
185
|
if (duplicate) {
|
|
197
186
|
throw new DeviceTaskError("Task is already running");
|
|
198
187
|
}
|
|
199
188
|
const candidate = { botId: task.botId, root: canonicalRoot };
|
|
200
|
-
// Guard against capacity breach
|
|
201
189
|
if (this.active.size >= this.settings.maxActiveTasks) {
|
|
202
190
|
throw new DeviceTaskError("Active task capacity exceeded");
|
|
203
191
|
}
|
|
204
|
-
// Guard against active conflict
|
|
205
192
|
const conflict = [...this.active].find((item) => this.checkConflict(candidate, item));
|
|
206
193
|
if (conflict) {
|
|
207
194
|
throw new DeviceTaskError(conflict.blocked
|
|
@@ -236,7 +223,6 @@ export class DeviceTaskScheduler {
|
|
|
236
223
|
if (this.queue.length === 0)
|
|
237
224
|
return;
|
|
238
225
|
const now = Date.now();
|
|
239
|
-
// Reject tasks blocked by unconfirmed stops
|
|
240
226
|
const toReject = [];
|
|
241
227
|
for (let i = this.queue.length - 1; i >= 0; i--) {
|
|
242
228
|
const entry = this.queue[i];
|
|
@@ -257,10 +243,6 @@ export class DeviceTaskScheduler {
|
|
|
257
243
|
let availableSlots = this.settings.maxActiveTasks - this.active.size;
|
|
258
244
|
if (availableSlots <= 0)
|
|
259
245
|
return;
|
|
260
|
-
// Identify schedulable candidates
|
|
261
|
-
// A candidate can physically start if:
|
|
262
|
-
// 1. No active task conflicts with it.
|
|
263
|
-
// 2. No earlier queued task conflicts with it (strict FIFO for the same bot/workspace).
|
|
264
246
|
const schedulable = [];
|
|
265
247
|
for (let i = 0; i < this.queue.length; i++) {
|
|
266
248
|
const entry = this.queue[i];
|
|
@@ -275,10 +257,6 @@ export class DeviceTaskScheduler {
|
|
|
275
257
|
}
|
|
276
258
|
if (schedulable.length === 0)
|
|
277
259
|
return;
|
|
278
|
-
// Sort schedulable candidates:
|
|
279
|
-
// 1. Starved tasks come first (anti-starvation guarantee, oldest starved first).
|
|
280
|
-
// 2. For non-starved tasks: Room fair share (fewer active tasks in room first, then room last dispatched).
|
|
281
|
-
// 3. FIFO within same priority.
|
|
282
260
|
schedulable.sort((a, b) => {
|
|
283
261
|
if (a.isStarved && !b.isStarved)
|
|
284
262
|
return -1;
|
|
@@ -287,12 +265,10 @@ export class DeviceTaskScheduler {
|
|
|
287
265
|
if (a.isStarved && b.isStarved) {
|
|
288
266
|
return a.entry.queuedAt - b.entry.queuedAt;
|
|
289
267
|
}
|
|
290
|
-
// Room active task count
|
|
291
268
|
const activeA = [...this.active].filter((item) => item.roomId === a.entry.roomId).length;
|
|
292
269
|
const activeB = [...this.active].filter((item) => item.roomId === b.entry.roomId).length;
|
|
293
270
|
if (activeA !== activeB)
|
|
294
271
|
return activeA - activeB;
|
|
295
|
-
// Room dispatch history
|
|
296
272
|
const histA = this.roomDispatchHistory.get(a.entry.roomId);
|
|
297
273
|
const histB = this.roomDispatchHistory.get(b.entry.roomId);
|
|
298
274
|
const countA = histA?.count ?? 0;
|
|
@@ -305,25 +281,21 @@ export class DeviceTaskScheduler {
|
|
|
305
281
|
return lastA - lastB;
|
|
306
282
|
return a.entry.queuedAt - b.entry.queuedAt;
|
|
307
283
|
});
|
|
308
|
-
// Select up to availableSlots
|
|
309
284
|
const toDispatch = [];
|
|
310
285
|
for (const cand of schedulable) {
|
|
311
286
|
if (availableSlots <= 0)
|
|
312
287
|
break;
|
|
313
|
-
// Ensure candidates chosen in this batch do not conflict with each other
|
|
314
288
|
const conflictsWithSelected = toDispatch.some((selected) => this.checkConflict(cand.entry, selected));
|
|
315
289
|
if (conflictsWithSelected)
|
|
316
290
|
continue;
|
|
317
291
|
toDispatch.push(cand.entry);
|
|
318
292
|
availableSlots--;
|
|
319
293
|
}
|
|
320
|
-
// Update skip counts for schedulable candidates that were passed over
|
|
321
294
|
for (const cand of schedulable) {
|
|
322
295
|
if (!toDispatch.includes(cand.entry)) {
|
|
323
296
|
cand.entry.skipCount++;
|
|
324
297
|
}
|
|
325
298
|
}
|
|
326
|
-
// Dispatch selected entries with try/catch error isolation
|
|
327
299
|
for (const entry of toDispatch) {
|
|
328
300
|
const index = this.queue.indexOf(entry);
|
|
329
301
|
if (index >= 0) {
|
|
@@ -340,7 +312,6 @@ export class DeviceTaskScheduler {
|
|
|
340
312
|
}
|
|
341
313
|
}
|
|
342
314
|
analyzeBlockReason(entry, queueIndex) {
|
|
343
|
-
// Check workspace blocked by unconfirmed stop
|
|
344
315
|
const blockedBlocker = [...this.active].find((owner) => owner.blocked && this.checkConflict(entry, owner));
|
|
345
316
|
if (blockedBlocker) {
|
|
346
317
|
return {
|
|
@@ -348,7 +319,6 @@ export class DeviceTaskScheduler {
|
|
|
348
319
|
detail: "Workspace is locked due to an unconfirmed task stop",
|
|
349
320
|
};
|
|
350
321
|
}
|
|
351
|
-
// Check bot busy in active
|
|
352
322
|
const botActive = [...this.active].find((owner) => owner.botId === entry.botId);
|
|
353
323
|
if (botActive) {
|
|
354
324
|
return {
|
|
@@ -356,7 +326,6 @@ export class DeviceTaskScheduler {
|
|
|
356
326
|
detail: "Target bot is currently running another task",
|
|
357
327
|
};
|
|
358
328
|
}
|
|
359
|
-
// Check workspace conflict in active
|
|
360
329
|
const workspaceActive = [...this.active].find((owner) => executionRootsOverlap(entry.root, owner.root));
|
|
361
330
|
if (workspaceActive) {
|
|
362
331
|
return {
|
|
@@ -364,7 +333,6 @@ export class DeviceTaskScheduler {
|
|
|
364
333
|
detail: "Workspace is currently in use by an active task",
|
|
365
334
|
};
|
|
366
335
|
}
|
|
367
|
-
// Check prior queue item conflicts (FIFO constraint)
|
|
368
336
|
const priorBotQueue = this.queue.slice(0, queueIndex).find((prior) => prior.botId === entry.botId);
|
|
369
337
|
if (priorBotQueue) {
|
|
370
338
|
return {
|
|
@@ -381,14 +349,12 @@ export class DeviceTaskScheduler {
|
|
|
381
349
|
detail: "Workspace has an earlier queued task waiting",
|
|
382
350
|
};
|
|
383
351
|
}
|
|
384
|
-
// Check concurrency limit
|
|
385
352
|
if (this.active.size >= this.settings.maxActiveTasks) {
|
|
386
353
|
return {
|
|
387
354
|
reason: "max_concurrency_reached",
|
|
388
355
|
detail: "Device concurrent task limit reached",
|
|
389
356
|
};
|
|
390
357
|
}
|
|
391
|
-
// Otherwise waiting for room fairness round
|
|
392
358
|
return {
|
|
393
359
|
reason: "room_fairness_yield",
|
|
394
360
|
detail: "Waiting for fair scheduling turn across rooms",
|
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
import { randomUUID } from "node:crypto";
|
|
2
|
+
import { isTerminal } from "./store.js";
|
|
3
|
+
import { groupTaskContext } from "./group-context.js";
|
|
4
|
+
import { queueParentResult, trimConversationHistory, trimRoomReceipts } from "./hub-conversations.js";
|
|
5
|
+
import { computeOutcomeFingerprint, computeLegacyOutcomeFingerprint, deepFreeze } from "./task-outcome.js";
|
|
6
|
+
import { validateCodeArtifactOutcome, validateDeviceArtifact } from "./work-contract.js";
|
|
7
|
+
export const hasTaskLease = (task) => !!task.leaseToken || task.leaseGeneration !== undefined;
|
|
8
|
+
export const isRecoveringTask = (task, now) => !task.outcomeFingerprint && typeof task.recoveryUntil === "number" && now <= task.recoveryUntil;
|
|
9
|
+
function effects() {
|
|
10
|
+
return { settledWakes: [], readyTaskIds: [], cascadedFailedTaskIds: [] };
|
|
11
|
+
}
|
|
12
|
+
export function recordTaskOutcome(draft, task, outcome, ctx, now = Date.now()) {
|
|
13
|
+
if (task.outcomeFingerprint)
|
|
14
|
+
return;
|
|
15
|
+
if (outcome.artifact !== undefined) {
|
|
16
|
+
task.artifact = deepFreeze(structuredClone(outcome.artifact));
|
|
17
|
+
}
|
|
18
|
+
if (outcome.executionCompleted !== undefined)
|
|
19
|
+
task.executionCompleted = outcome.executionCompleted;
|
|
20
|
+
if (outcome.artifactProduced !== undefined)
|
|
21
|
+
task.artifactProduced = outcome.artifactProduced;
|
|
22
|
+
task.outcomeFingerprint =
|
|
23
|
+
outcome.fingerprint ??
|
|
24
|
+
computeOutcomeFingerprint(task.id, task.attemptId, outcome.status, outcome.report, outcome.error, outcome.reportMetadata, outcome.artifact?.digest, outcome.executionCompleted, outcome.artifactProduced);
|
|
25
|
+
task.outcomeCanonicalFingerprint = computeOutcomeFingerprint(task.id, task.attemptId, outcome.status, outcome.report, outcome.error, outcome.reportMetadata, outcome.artifact?.digest, outcome.executionCompleted, outcome.artifactProduced);
|
|
26
|
+
task.terminalAcceptedLeaseGeneration = task.leaseGeneration;
|
|
27
|
+
task.status = outcome.status;
|
|
28
|
+
task.updatedAt = now;
|
|
29
|
+
delete task.recoveryUntil;
|
|
30
|
+
task.report =
|
|
31
|
+
outcome.report ||
|
|
32
|
+
outcome.error ||
|
|
33
|
+
(outcome.status === "failed"
|
|
34
|
+
? "Task execution failed without a report."
|
|
35
|
+
: "Task execution was interrupted without a report.");
|
|
36
|
+
if (outcome.error)
|
|
37
|
+
task.error = outcome.error;
|
|
38
|
+
else
|
|
39
|
+
delete task.error;
|
|
40
|
+
task.reportMetadata = outcome.reportMetadata;
|
|
41
|
+
const bot = draft.bots.find((entry) => entry.id === task.botId && entry.accountId === task.accountId);
|
|
42
|
+
draft.messages.push({
|
|
43
|
+
id: randomUUID(),
|
|
44
|
+
roomId: task.roomId,
|
|
45
|
+
accountId: task.accountId,
|
|
46
|
+
text: task.report,
|
|
47
|
+
sender: { type: "bot", id: task.botId, name: bot?.name ?? task.botId, sourceDeviceId: task.deviceId },
|
|
48
|
+
createdAt: now,
|
|
49
|
+
taskIds: [task.id],
|
|
50
|
+
conversationId: task.conversationId,
|
|
51
|
+
});
|
|
52
|
+
if (task.conversationId)
|
|
53
|
+
draft.conversationMessages.push({
|
|
54
|
+
id: randomUUID(),
|
|
55
|
+
conversationId: task.conversationId,
|
|
56
|
+
taskId: task.id,
|
|
57
|
+
kind: "result",
|
|
58
|
+
text: task.report,
|
|
59
|
+
sourceBotId: task.botId,
|
|
60
|
+
requestId: task.requestId,
|
|
61
|
+
createdAt: now,
|
|
62
|
+
});
|
|
63
|
+
const removed = new Set(draft.messages
|
|
64
|
+
.filter((m) => m.roomId === task.roomId)
|
|
65
|
+
.slice(0, -ctx.getHistoryLimit())
|
|
66
|
+
.map((m) => m.id));
|
|
67
|
+
draft.messages = draft.messages.filter((m) => !removed.has(m.id));
|
|
68
|
+
trimRoomReceipts(draft, task.roomId);
|
|
69
|
+
const room = draft.rooms.find((entry) => entry.id === task.roomId);
|
|
70
|
+
const context = room ? groupTaskContext(room, draft.bots, draft.messages, ctx.settings.groupContextBytes) : undefined;
|
|
71
|
+
const wake = queueParentResult(draft, task, ctx.settings);
|
|
72
|
+
trimConversationHistory(draft, task.roomId);
|
|
73
|
+
return { taskId: task.id, roomId: task.roomId, conversationId: task.conversationId, wake, context };
|
|
74
|
+
}
|
|
75
|
+
export function settleTaskDependencies(draft, ctx, now = Date.now()) {
|
|
76
|
+
const result = effects();
|
|
77
|
+
let changed;
|
|
78
|
+
do {
|
|
79
|
+
changed = false;
|
|
80
|
+
for (const task of draft.tasks) {
|
|
81
|
+
if (!task.dependsOnTaskId ||
|
|
82
|
+
!["waiting", "queued"].includes(task.status) ||
|
|
83
|
+
hasTaskLease(task) ||
|
|
84
|
+
task.outcomeFingerprint)
|
|
85
|
+
continue;
|
|
86
|
+
const pred = draft.tasks.find((p) => p.id === task.dependsOnTaskId && p.roomId === task.roomId && p.accountId === task.accountId);
|
|
87
|
+
if (pred &&
|
|
88
|
+
task.contract?.id &&
|
|
89
|
+
pred.contract?.id &&
|
|
90
|
+
task.contract.id === pred.contract.id &&
|
|
91
|
+
task.contract.revision !== pred.contract.revision) {
|
|
92
|
+
const report = `[契约版本冲突] 后继任务与依赖前置任务属于相同契约 (${task.contract.id}) 但版本不同 (后继 rev=${task.contract.revision}, 前置 rev=${pred.contract.revision}),跨版本依赖已终止。`;
|
|
93
|
+
const notice = recordTaskOutcome(draft, task, { status: "failed", report }, ctx, now);
|
|
94
|
+
delete task.blockReason;
|
|
95
|
+
delete task.blockReasonDetail;
|
|
96
|
+
if (notice)
|
|
97
|
+
result.settledWakes.push(notice);
|
|
98
|
+
result.cascadedFailedTaskIds.push(task.id);
|
|
99
|
+
changed = true;
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
if (pred &&
|
|
103
|
+
!pred.cancelRequested &&
|
|
104
|
+
!pred.stopConfirmed &&
|
|
105
|
+
(isRecoveringTask(pred, now) || !isTerminal(pred.status))) {
|
|
106
|
+
if (task.status === "queued") {
|
|
107
|
+
task.status = "waiting";
|
|
108
|
+
task.blockReason = "dependency_waiting";
|
|
109
|
+
task.blockReasonDetail = `Waiting for dependency task ${pred.id}`;
|
|
110
|
+
task.updatedAt = now;
|
|
111
|
+
changed = true;
|
|
112
|
+
}
|
|
113
|
+
continue;
|
|
114
|
+
}
|
|
115
|
+
if (pred?.status === "completed" && !pred.cancelRequested && !pred.stopConfirmed) {
|
|
116
|
+
if (task.status !== "waiting" || task.blockReason === "resource_locked")
|
|
117
|
+
continue;
|
|
118
|
+
task.status = "queued";
|
|
119
|
+
delete task.blockReason;
|
|
120
|
+
delete task.blockReasonDetail;
|
|
121
|
+
task.updatedAt = now;
|
|
122
|
+
if (pred.report)
|
|
123
|
+
task.text = `[前序任务输出:\n${pred.report.slice(0, 2000)}${pred.report.length > 2000 ? "..." : ""}\n]\n\n${task.text}`;
|
|
124
|
+
result.readyTaskIds.push(task.id);
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
const report = `[前序任务未成功] 依赖的前置任务 ${task.dependsOnTaskId} 未成功,后继任务终止。`;
|
|
128
|
+
const notice = recordTaskOutcome(draft, task, { status: "failed", report }, ctx, now);
|
|
129
|
+
delete task.blockReason;
|
|
130
|
+
delete task.blockReasonDetail;
|
|
131
|
+
if (notice)
|
|
132
|
+
result.settledWakes.push(notice);
|
|
133
|
+
result.cascadedFailedTaskIds.push(task.id);
|
|
134
|
+
}
|
|
135
|
+
changed = true;
|
|
136
|
+
}
|
|
137
|
+
} while (changed);
|
|
138
|
+
return result;
|
|
139
|
+
}
|
|
140
|
+
export function settleTaskTerminalOutcome(draft, deviceId, event, ctx) {
|
|
141
|
+
const reject = (reason, statusCode = 409) => ({
|
|
142
|
+
accepted: false,
|
|
143
|
+
duplicate: false,
|
|
144
|
+
reason,
|
|
145
|
+
statusCode,
|
|
146
|
+
});
|
|
147
|
+
const device = draft.devices.find((entry) => entry.id === deviceId);
|
|
148
|
+
const task = draft.tasks.find((entry) => entry.id === event.taskId &&
|
|
149
|
+
entry.deviceId === deviceId &&
|
|
150
|
+
entry.botId === event.botId &&
|
|
151
|
+
entry.accountId === device?.accountId);
|
|
152
|
+
const bot = draft.bots.find((entry) => entry.id === event.botId && entry.deviceId === deviceId && entry.accountId === device?.accountId);
|
|
153
|
+
if (!task) {
|
|
154
|
+
if (device && bot && isTerminal(event.status) && !draft.tasks.some((entry) => entry.id === event.taskId))
|
|
155
|
+
return { ...reject("Task attempt no longer exists", 404), permanent: true, reasonCode: "attempt_expired" };
|
|
156
|
+
return reject("Task missing", 404);
|
|
157
|
+
}
|
|
158
|
+
if (!device || !bot || !draft.rooms.some((room) => room.id === task.roomId && room.botIds.includes(bot.id)))
|
|
159
|
+
return reject("Task missing", 404);
|
|
160
|
+
if (task.attemptId !== event.attemptId)
|
|
161
|
+
return { ...reject("Attempt mismatch"), permanent: true, reasonCode: "attempt_expired" };
|
|
162
|
+
if (!isTerminal(event.status))
|
|
163
|
+
return reject("Terminal outcome required", 400);
|
|
164
|
+
const legacyLeaseMissing = event.leaseToken === undefined &&
|
|
165
|
+
event.leaseGeneration === undefined &&
|
|
166
|
+
event.artifact === undefined &&
|
|
167
|
+
event.executionCompleted === undefined &&
|
|
168
|
+
event.artifactProduced === undefined &&
|
|
169
|
+
event.fingerprint ===
|
|
170
|
+
computeLegacyOutcomeFingerprint(task.id, task.attemptId, event.status, event.report, event.error, event.reportMetadata);
|
|
171
|
+
if (legacyLeaseMissing && (hasTaskLease(task) || isTerminal(task.status))) {
|
|
172
|
+
if (!isTerminal(task.status) || (!task.outcomeFingerprint && task.recoveryUntil !== undefined))
|
|
173
|
+
return {
|
|
174
|
+
...reject("Legacy outcome has no recoverable lease proof; retain evidence for manual recovery"),
|
|
175
|
+
permanent: true,
|
|
176
|
+
reasonCode: "legacy_lease_missing",
|
|
177
|
+
};
|
|
178
|
+
const displayReport = event.report ||
|
|
179
|
+
event.error ||
|
|
180
|
+
(event.status === "failed"
|
|
181
|
+
? "Task execution failed without a report."
|
|
182
|
+
: "Task execution was interrupted without a report.");
|
|
183
|
+
if (task.status !== event.status ||
|
|
184
|
+
task.report !== displayReport ||
|
|
185
|
+
task.error !== event.error ||
|
|
186
|
+
JSON.stringify(task.reportMetadata) !== JSON.stringify(event.reportMetadata) ||
|
|
187
|
+
task.artifact !== undefined ||
|
|
188
|
+
task.executionCompleted !== undefined ||
|
|
189
|
+
task.artifactProduced !== undefined ||
|
|
190
|
+
task.executionMode === "code" ||
|
|
191
|
+
task.contract?.executionMode === "code")
|
|
192
|
+
return { ...reject("Conflicting duplicate terminal outcome"), permanent: true, reasonCode: "terminal_conflict" };
|
|
193
|
+
return { accepted: true, duplicate: true, fingerprint: event.fingerprint, task };
|
|
194
|
+
}
|
|
195
|
+
if (task.leaseToken !== event.leaseToken || task.leaseGeneration !== event.leaseGeneration)
|
|
196
|
+
return reject("Lease token or generation mismatch");
|
|
197
|
+
if (event.status === "completed" && (task.cancelRequested || task.stopConfirmed) && !task.outcomeFingerprint)
|
|
198
|
+
return reject("Task stop requested");
|
|
199
|
+
if (event.status === "completed" && !event.report)
|
|
200
|
+
return reject("Completed task requires agent report", 400);
|
|
201
|
+
if (event.executionCompleted !== undefined && typeof event.executionCompleted !== "boolean") {
|
|
202
|
+
return reject("Execution proof 'executionCompleted' must be a boolean when present", 400);
|
|
203
|
+
}
|
|
204
|
+
if (event.artifactProduced !== undefined && typeof event.artifactProduced !== "boolean") {
|
|
205
|
+
return reject("Artifact proof 'artifactProduced' must be a boolean when present", 400);
|
|
206
|
+
}
|
|
207
|
+
if (event.artifact !== undefined) {
|
|
208
|
+
const checked = validateDeviceArtifact(event.artifact);
|
|
209
|
+
if (!checked.valid)
|
|
210
|
+
return reject(`Artifact validation failed: ${checked.reason}`, 400);
|
|
211
|
+
event = { ...event, artifact: checked.artifact };
|
|
212
|
+
}
|
|
213
|
+
const isCode = task.executionMode === "code" || task.contract?.executionMode === "code";
|
|
214
|
+
if (isCode) {
|
|
215
|
+
const codeRes = validateCodeArtifactOutcome({
|
|
216
|
+
task,
|
|
217
|
+
artifact: event.artifact,
|
|
218
|
+
executionCompleted: event.executionCompleted,
|
|
219
|
+
artifactProduced: event.artifactProduced,
|
|
220
|
+
});
|
|
221
|
+
if (!codeRes.valid)
|
|
222
|
+
return reject(`Code artifact validation failed: ${codeRes.reason}`);
|
|
223
|
+
if (event.status === "completed" && (event.artifactProduced !== true || !event.artifact)) {
|
|
224
|
+
return reject("Completed code task requires verified artifactProduced proof and artifact", 400);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
const hasProofOrArtifact = event.artifact !== undefined || event.executionCompleted !== undefined || event.artifactProduced !== undefined;
|
|
228
|
+
const canonical = computeOutcomeFingerprint(task.id, task.attemptId, event.status, event.report, event.error, event.reportMetadata, event.artifact?.digest, event.executionCompleted, event.artifactProduced);
|
|
229
|
+
if (hasProofOrArtifact) {
|
|
230
|
+
if (event.fingerprint !== undefined && event.fingerprint !== canonical) {
|
|
231
|
+
return reject("Outcome fingerprint mismatch (v46 artifact proof must match canonical digest)");
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
else {
|
|
235
|
+
const legacy = computeLegacyOutcomeFingerprint(task.id, task.attemptId, event.status, event.report, event.error, event.reportMetadata);
|
|
236
|
+
if (event.fingerprint !== undefined && event.fingerprint !== canonical && event.fingerprint !== legacy)
|
|
237
|
+
return reject("Outcome fingerprint mismatch");
|
|
238
|
+
}
|
|
239
|
+
const fingerprint = event.fingerprint ?? canonical;
|
|
240
|
+
if (task.recoveryUntil !== undefined && !task.outcomeFingerprint && !isRecoveringTask(task, Date.now()))
|
|
241
|
+
return reject("Recovery window expired");
|
|
242
|
+
if (isTerminal(task.status) && !isRecoveringTask(task, Date.now())) {
|
|
243
|
+
const taskHasProofOrArtifact = task.artifact !== undefined || task.executionCompleted !== undefined || task.artifactProduced !== undefined;
|
|
244
|
+
const existing = task.outcomeFingerprint ??
|
|
245
|
+
computeOutcomeFingerprint(task.id, task.attemptId, task.status, task.report, typeof task.error === "string" ? task.error : undefined, task.reportMetadata, task.artifact?.digest, task.executionCompleted, task.artifactProduced);
|
|
246
|
+
const displayReport = event.report ||
|
|
247
|
+
event.error ||
|
|
248
|
+
(event.status === "failed"
|
|
249
|
+
? "Task execution failed without a report."
|
|
250
|
+
: "Task execution was interrupted without a report.");
|
|
251
|
+
const artifactMatches = task.artifact?.digest === event.artifact?.digest;
|
|
252
|
+
const proofMatches = task.executionCompleted === event.executionCompleted && task.artifactProduced === event.artifactProduced;
|
|
253
|
+
let sameContent = false;
|
|
254
|
+
if (taskHasProofOrArtifact || hasProofOrArtifact) {
|
|
255
|
+
sameContent =
|
|
256
|
+
task.outcomeCanonicalFingerprint === canonical &&
|
|
257
|
+
task.status === event.status &&
|
|
258
|
+
artifactMatches &&
|
|
259
|
+
proofMatches;
|
|
260
|
+
}
|
|
261
|
+
else {
|
|
262
|
+
const legacy = computeLegacyOutcomeFingerprint(task.id, task.attemptId, event.status, event.report, event.error, event.reportMetadata);
|
|
263
|
+
sameContent = task.outcomeCanonicalFingerprint
|
|
264
|
+
? task.outcomeCanonicalFingerprint === canonical
|
|
265
|
+
: (existing === canonical || existing === legacy) &&
|
|
266
|
+
task.report === displayReport &&
|
|
267
|
+
task.error === event.error &&
|
|
268
|
+
JSON.stringify(task.reportMetadata) === JSON.stringify(event.reportMetadata);
|
|
269
|
+
}
|
|
270
|
+
if (!sameContent || task.status !== event.status)
|
|
271
|
+
return { ...reject("Conflicting duplicate terminal outcome"), permanent: true, reasonCode: "terminal_conflict" };
|
|
272
|
+
if (!task.outcomeFingerprint) {
|
|
273
|
+
task.outcomeFingerprint = existing;
|
|
274
|
+
task.terminalAcceptedLeaseGeneration = task.leaseGeneration;
|
|
275
|
+
}
|
|
276
|
+
if (!task.outcomeCanonicalFingerprint)
|
|
277
|
+
task.outcomeCanonicalFingerprint = canonical;
|
|
278
|
+
return { accepted: true, duplicate: true, fingerprint: existing, task };
|
|
279
|
+
}
|
|
280
|
+
if (event.status !== "interrupted" && (!bot.enabled || bot.revision !== task.botRevision))
|
|
281
|
+
return reject("Bot configuration changed");
|
|
282
|
+
if (task.status !== "running" &&
|
|
283
|
+
!(task.status === "queued" && hasTaskLease(task)) &&
|
|
284
|
+
!isRecoveringTask(task, Date.now()) &&
|
|
285
|
+
!(task.status === "queued" && event.status === "interrupted"))
|
|
286
|
+
return reject("Invalid task transition");
|
|
287
|
+
const notice = recordTaskOutcome(draft, task, { ...event, fingerprint }, ctx);
|
|
288
|
+
const result = settleTaskDependencies(draft, ctx);
|
|
289
|
+
if (notice)
|
|
290
|
+
result.settledWakes.unshift(notice);
|
|
291
|
+
return { accepted: true, duplicate: false, fingerprint, task, ...result };
|
|
292
|
+
}
|
|
293
|
+
export function rescanReadyTasksOnRecovery(draft, now, recoveryGraceMs, ctx) {
|
|
294
|
+
for (const task of draft.tasks) {
|
|
295
|
+
if ((task.status === "running" || (task.status === "queued" && hasTaskLease(task))) &&
|
|
296
|
+
!task.outcomeFingerprint &&
|
|
297
|
+
task.recoveryUntil === undefined)
|
|
298
|
+
task.recoveryUntil = now + recoveryGraceMs;
|
|
299
|
+
}
|
|
300
|
+
const result = sweepExpiredRecoveryLeases(draft, now, ctx);
|
|
301
|
+
for (const task of [...draft.tasks]) {
|
|
302
|
+
if (!isTerminal(task.status) || isRecoveringTask(task, now))
|
|
303
|
+
continue;
|
|
304
|
+
const wake = queueParentResult(draft, task, ctx.settings);
|
|
305
|
+
if (wake)
|
|
306
|
+
result.settledWakes.push({ taskId: task.id, roomId: task.roomId, conversationId: task.conversationId, wake });
|
|
307
|
+
}
|
|
308
|
+
return result;
|
|
309
|
+
}
|
|
310
|
+
export function sweepExpiredRecoveryLeases(draft, now, ctx) {
|
|
311
|
+
const result = effects();
|
|
312
|
+
for (const task of [...draft.tasks]) {
|
|
313
|
+
if (task.outcomeFingerprint)
|
|
314
|
+
continue;
|
|
315
|
+
const windowExpired = typeof task.recoveryUntil === "number" && now > task.recoveryUntil;
|
|
316
|
+
const leaseExpired = (task.status === "running" || (task.status === "queued" && hasTaskLease(task))) &&
|
|
317
|
+
task.lastHeartbeatAt !== undefined &&
|
|
318
|
+
now - task.lastHeartbeatAt > 30 * 60_000;
|
|
319
|
+
if (!windowExpired && !leaseExpired)
|
|
320
|
+
continue;
|
|
321
|
+
const notice = recordTaskOutcome(draft, task, {
|
|
322
|
+
status: "interrupted",
|
|
323
|
+
report: windowExpired
|
|
324
|
+
? "Hub restarted; recovery window expired without reconnect claim."
|
|
325
|
+
: "Task lease expired due to prolonged inactivity.",
|
|
326
|
+
}, ctx, now);
|
|
327
|
+
if (notice)
|
|
328
|
+
result.settledWakes.push(notice);
|
|
329
|
+
}
|
|
330
|
+
const dependencies = settleTaskDependencies(draft, ctx, now);
|
|
331
|
+
result.settledWakes.push(...dependencies.settledWakes);
|
|
332
|
+
result.readyTaskIds.push(...dependencies.readyTaskIds);
|
|
333
|
+
result.cascadedFailedTaskIds.push(...dependencies.cascadedFailedTaskIds);
|
|
334
|
+
return result;
|
|
335
|
+
}
|