@bastani/atomic 0.9.89 → 0.9.90-alpha.1
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 +113 -0
- package/dist/builtin/intercom/CHANGELOG.md +13 -0
- package/dist/builtin/intercom/README.md +3 -1
- package/dist/builtin/intercom/broker/broker.ts +35 -10
- package/dist/builtin/intercom/broker/client.ts +42 -1
- package/dist/builtin/intercom/index.bundle.mjs +400 -67
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/intercom/skills/intercom/SKILL.md +24 -5
- package/dist/builtin/intercom/types.ts +5 -0
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/CHANGELOG.md +27 -0
- package/dist/builtin/subagents/README.md +18 -20
- package/dist/builtin/subagents/agents/worker.md +1 -1
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/subagents/skills/feedback/SKILL.md +2 -2
- package/dist/builtin/subagents/skills/qlty/SKILL.md +2 -2
- package/dist/builtin/subagents/skills/qlty/references/commands.md +45 -12
- package/dist/builtin/subagents/skills/qlty/references/quickstart.md +102 -21
- package/dist/builtin/subagents/skills/subagent/SKILL.md +18 -17
- package/dist/builtin/subagents/skills/tdd/LICENSE.txt +50 -0
- package/dist/builtin/subagents/skills/tdd/SKILL.md +10 -0
- package/dist/builtin/subagents/skills/tdd/tests.md +16 -0
- package/dist/builtin/subagents/skills/tmux/LICENSE.txt +24 -0
- package/dist/builtin/subagents/skills/tmux/SKILL.md +20 -1
- package/dist/builtin/subagents/skills/tmux/scripts/find-sessions.sh +19 -10
- package/dist/builtin/subagents/skills/tmux/scripts/wait-for-text.sh +231 -19
- package/dist/builtin/subagents/src/extension/index.bundle.mjs +1911 -845
- package/dist/builtin/web-access/CHANGELOG.md +6 -0
- package/dist/builtin/web-access/index.bundle.mjs +158 -34
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/builtin/workflows/CHANGELOG.md +36 -0
- package/dist/builtin/workflows/builtin/{chunk-tjk7jp9a.js → chunk-akmcsx14.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-913nwrzq.js → chunk-erpybg3c.js} +109 -30
- package/dist/builtin/workflows/builtin/{chunk-e07n7en6.js → chunk-wpgpr31s.js} +1 -1
- package/dist/builtin/workflows/builtin/goal.js +2 -2
- package/dist/builtin/workflows/builtin/index.js +3 -3
- package/dist/builtin/workflows/builtin/ralph.js +2 -2
- package/dist/builtin/workflows/package.json +1 -1
- package/dist/builtin/workflows/skills/bro/SKILL.md +1 -1
- package/dist/builtin/workflows/skills/prompt-engineer/references/claude_fable_5_2.md +19 -19
- package/dist/builtin/workflows/skills/prompt-engineer/references/claude_haiku_5_5.md +2 -2
- package/dist/builtin/workflows/skills/prompt-engineer/references/claude_opus_5_5.md +3 -3
- package/dist/builtin/workflows/skills/prompt-engineer/references/gpt_6.md +2 -2
- package/dist/builtin/workflows/skills/prompt-engineer/references/gpt_6_1_sol.md +2 -2
- package/dist/builtin/workflows/skills/prompt-engineer/references/gpt_6_1_terra.md +3 -3
- package/dist/builtin/workflows/skills/prompt-engineer/references/gpt_6_2.md +3 -2
- package/dist/builtin/workflows/skills/show-me/SKILL.md +2 -2
- package/dist/builtin/workflows/skills/skill-creator/scripts/run_eval.py +29 -24
- package/dist/builtin/workflows/skills/teach/SKILL.md +8 -8
- package/dist/builtin/workflows/skills/unslop/SKILL.md +29 -51
- package/dist/builtin/workflows/src/durable/journal/internal.d.ts +10 -5
- package/dist/builtin/workflows/src/durable/journal/sharded-run-journal.d.ts +6 -3
- package/dist/builtin/workflows/src/durable/journal/sql-run-journal.d.ts +25 -3
- package/dist/builtin/workflows/src/extension/index.bundle.mjs +4444 -1356
- package/dist/builtin/workflows/src/extension/local-worker-entry.mjs +2544 -568
- package/dist/builtin/workflows/src/index.js +2467 -549
- package/dist/builtin/workflows/src/local-worker-entry.mjs +2544 -568
- package/dist/cli/storage-command.d.ts +6 -0
- package/dist/cli/storage-command.d.ts.map +1 -1
- package/dist/cli/storage-command.js +11 -0
- package/dist/cli/storage-command.js.map +1 -1
- package/dist/cli/storage-search-database.d.ts +18 -0
- package/dist/cli/storage-search-database.d.ts.map +1 -0
- package/dist/cli/storage-search-database.js +90 -0
- package/dist/cli/storage-search-database.js.map +1 -0
- package/dist/cli/storage-search-session.d.ts +5 -0
- package/dist/cli/storage-search-session.d.ts.map +1 -0
- package/dist/cli/storage-search-session.js +133 -0
- package/dist/cli/storage-search-session.js.map +1 -0
- package/dist/core/agent-session-accessors.d.ts.map +1 -1
- package/dist/core/agent-session-accessors.js +107 -1
- package/dist/core/agent-session-accessors.js.map +1 -1
- package/dist/core/agent-session-bash.d.ts.map +1 -1
- package/dist/core/agent-session-bash.js +2 -0
- package/dist/core/agent-session-bash.js.map +1 -1
- package/dist/core/agent-session-boundaries.d.ts +2 -0
- package/dist/core/agent-session-boundaries.d.ts.map +1 -1
- package/dist/core/agent-session-boundaries.js +9 -4
- package/dist/core/agent-session-boundaries.js.map +1 -1
- package/dist/core/agent-session-custom-message-commit.d.ts.map +1 -1
- package/dist/core/agent-session-custom-message-commit.js +2 -1
- package/dist/core/agent-session-custom-message-commit.js.map +1 -1
- package/dist/core/agent-session-detached-tools.d.ts +3 -2
- package/dist/core/agent-session-detached-tools.d.ts.map +1 -1
- package/dist/core/agent-session-detached-tools.js +156 -41
- package/dist/core/agent-session-detached-tools.js.map +1 -1
- package/dist/core/agent-session-events.d.ts +2 -1
- package/dist/core/agent-session-events.d.ts.map +1 -1
- package/dist/core/agent-session-events.js +59 -23
- package/dist/core/agent-session-events.js.map +1 -1
- package/dist/core/agent-session-extension-bindings.d.ts.map +1 -1
- package/dist/core/agent-session-extension-bindings.js +53 -4
- package/dist/core/agent-session-extension-bindings.js.map +1 -1
- package/dist/core/agent-session-message-queue.d.ts.map +1 -1
- package/dist/core/agent-session-message-queue.js +2 -1
- package/dist/core/agent-session-message-queue.js.map +1 -1
- package/dist/core/agent-session-methods.d.ts +23 -3
- package/dist/core/agent-session-methods.d.ts.map +1 -1
- package/dist/core/agent-session-methods.js.map +1 -1
- package/dist/core/agent-session-models.d.ts.map +1 -1
- package/dist/core/agent-session-models.js +2 -0
- package/dist/core/agent-session-models.js.map +1 -1
- package/dist/core/agent-session-prompt.d.ts +1 -1
- package/dist/core/agent-session-prompt.d.ts.map +1 -1
- package/dist/core/agent-session-prompt.js +14 -3
- package/dist/core/agent-session-prompt.js.map +1 -1
- package/dist/core/agent-session-queue-pause.d.ts +2 -1
- package/dist/core/agent-session-queue-pause.d.ts.map +1 -1
- package/dist/core/agent-session-queue-pause.js +8 -4
- package/dist/core/agent-session-queue-pause.js.map +1 -1
- package/dist/core/agent-session-retry.d.ts +7 -3
- package/dist/core/agent-session-retry.d.ts.map +1 -1
- package/dist/core/agent-session-retry.js +113 -112
- package/dist/core/agent-session-retry.js.map +1 -1
- package/dist/core/agent-session-runtime.d.ts +15 -0
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +26 -0
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session-services.d.ts +5 -2
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +6 -6
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session-tasks.js.map +1 -1
- package/dist/core/agent-session-tool-registry.d.ts.map +1 -1
- package/dist/core/agent-session-tool-registry.js +4 -2
- package/dist/core/agent-session-tool-registry.js.map +1 -1
- package/dist/core/agent-session-types.d.ts +19 -1
- package/dist/core/agent-session-types.d.ts.map +1 -1
- package/dist/core/agent-session-types.js.map +1 -1
- package/dist/core/agent-session.d.ts +11 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +8 -0
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/anthropic-thinking-guard.d.ts +16 -1
- package/dist/core/anthropic-thinking-guard.d.ts.map +1 -1
- package/dist/core/anthropic-thinking-guard.js +124 -7
- package/dist/core/anthropic-thinking-guard.js.map +1 -1
- package/dist/core/auth-storage.d.ts +3 -0
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +10 -0
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/detached-tool-output.d.ts +4 -0
- package/dist/core/detached-tool-output.d.ts.map +1 -0
- package/dist/core/detached-tool-output.js +48 -0
- package/dist/core/detached-tool-output.js.map +1 -0
- package/dist/core/event-loop-monitor.d.ts +4 -1
- package/dist/core/event-loop-monitor.d.ts.map +1 -1
- package/dist/core/event-loop-monitor.js +84 -159
- package/dist/core/event-loop-monitor.js.map +1 -1
- package/dist/core/export-html/index.d.ts.map +1 -1
- package/dist/core/export-html/index.js +26 -4
- package/dist/core/export-html/index.js.map +1 -1
- package/dist/core/export-html/saved-agent-cards.d.ts +15 -0
- package/dist/core/export-html/saved-agent-cards.d.ts.map +1 -0
- package/dist/core/export-html/saved-agent-cards.js +255 -0
- package/dist/core/export-html/saved-agent-cards.js.map +1 -0
- package/dist/core/export-html/saved-agent-viewer.js +101 -0
- package/dist/core/extensions/builtin-subagent-record-writer.d.ts +11 -0
- package/dist/core/extensions/builtin-subagent-record-writer.d.ts.map +1 -0
- package/dist/core/extensions/builtin-subagent-record-writer.js +33 -0
- package/dist/core/extensions/builtin-subagent-record-writer.js.map +1 -0
- package/dist/core/extensions/loader-api.d.ts +1 -1
- package/dist/core/extensions/loader-api.d.ts.map +1 -1
- package/dist/core/extensions/loader-api.js +9 -2
- package/dist/core/extensions/loader-api.js.map +1 -1
- package/dist/core/extensions/loader-bindings.d.ts +7 -0
- package/dist/core/extensions/loader-bindings.d.ts.map +1 -1
- package/dist/core/extensions/loader-bindings.js +42 -1
- package/dist/core/extensions/loader-bindings.js.map +1 -1
- package/dist/core/extensions/loader-core.d.ts.map +1 -1
- package/dist/core/extensions/loader-core.js +33 -12
- package/dist/core/extensions/loader-core.js.map +1 -1
- package/dist/core/extensions/runner-events.d.ts +2 -0
- package/dist/core/extensions/runner-events.d.ts.map +1 -1
- package/dist/core/extensions/runner-events.js +17 -7
- package/dist/core/extensions/runner-events.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +6 -2
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +5 -2
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/ui-types.d.ts +4 -0
- package/dist/core/extensions/ui-types.d.ts.map +1 -1
- package/dist/core/extensions/ui-types.js.map +1 -1
- package/dist/core/extensions/workflow-run-control-hub.d.ts +2 -2
- package/dist/core/extensions/workflow-run-control-hub.d.ts.map +1 -1
- package/dist/core/extensions/workflow-run-control-hub.js +2 -2
- package/dist/core/extensions/workflow-run-control-hub.js.map +1 -1
- package/dist/core/extensions/workflow-run-control.d.ts +10 -3
- package/dist/core/extensions/workflow-run-control.d.ts.map +1 -1
- package/dist/core/extensions/workflow-run-control.js.map +1 -1
- package/dist/core/first-prompt-model.d.ts +22 -0
- package/dist/core/first-prompt-model.d.ts.map +1 -0
- package/dist/core/first-prompt-model.js +84 -0
- package/dist/core/first-prompt-model.js.map +1 -0
- package/dist/core/footer-data-provider.d.ts.map +1 -1
- package/dist/core/footer-data-provider.js +11 -7
- package/dist/core/footer-data-provider.js.map +1 -1
- package/dist/core/fork-replay-pair.d.ts +22 -0
- package/dist/core/fork-replay-pair.d.ts.map +1 -0
- package/dist/core/fork-replay-pair.js +174 -0
- package/dist/core/fork-replay-pair.js.map +1 -0
- package/dist/core/fork-replay-wire.d.ts +11 -0
- package/dist/core/fork-replay-wire.d.ts.map +1 -0
- package/dist/core/fork-replay-wire.js +116 -0
- package/dist/core/fork-replay-wire.js.map +1 -0
- package/dist/core/messages.d.ts +2 -0
- package/dist/core/messages.d.ts.map +1 -1
- package/dist/core/messages.js +8 -4
- package/dist/core/messages.js.map +1 -1
- package/dist/core/model-runtime.d.ts +10 -1
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +76 -11
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/package-manager-auto-resources.d.ts.map +1 -1
- package/dist/core/package-manager-auto-resources.js +3 -2
- package/dist/core/package-manager-auto-resources.js.map +1 -1
- package/dist/core/package-manager-resource-files.js +7 -8
- package/dist/core/package-manager-resource-files.js.map +1 -1
- package/dist/core/project-trust-state.d.ts +90 -0
- package/dist/core/project-trust-state.d.ts.map +1 -0
- package/dist/core/project-trust-state.js +65 -0
- package/dist/core/project-trust-state.js.map +1 -0
- package/dist/core/provider-rate-limits.d.ts +6 -0
- package/dist/core/provider-rate-limits.d.ts.map +1 -1
- package/dist/core/provider-rate-limits.js +43 -0
- package/dist/core/provider-rate-limits.js.map +1 -1
- package/dist/core/provider-request-admission.d.ts.map +1 -1
- package/dist/core/provider-request-admission.js +10 -1
- package/dist/core/provider-request-admission.js.map +1 -1
- package/dist/core/remote-catalog-provider.d.ts +6 -1
- package/dist/core/remote-catalog-provider.d.ts.map +1 -1
- package/dist/core/remote-catalog-provider.js +22 -1
- package/dist/core/remote-catalog-provider.js.map +1 -1
- package/dist/core/resolve-config-value.d.ts.map +1 -1
- package/dist/core/resolve-config-value.js +5 -2
- package/dist/core/resolve-config-value.js.map +1 -1
- package/dist/core/resource-loader-core.d.ts.map +1 -1
- package/dist/core/resource-loader-core.js +3 -0
- package/dist/core/resource-loader-core.js.map +1 -1
- package/dist/core/resource-loader-extensions.d.ts +2 -2
- package/dist/core/resource-loader-extensions.d.ts.map +1 -1
- package/dist/core/resource-loader-extensions.js +6 -4
- package/dist/core/resource-loader-extensions.js.map +1 -1
- package/dist/core/resource-loader-package-resources.d.ts +1 -0
- package/dist/core/resource-loader-package-resources.d.ts.map +1 -1
- package/dist/core/resource-loader-package-resources.js +2 -1
- package/dist/core/resource-loader-package-resources.js.map +1 -1
- package/dist/core/resource-loader-reload.d.ts +1 -1
- package/dist/core/resource-loader-reload.d.ts.map +1 -1
- package/dist/core/resource-loader-reload.js +3 -2
- package/dist/core/resource-loader-reload.js.map +1 -1
- package/dist/core/resource-loader-types.d.ts +2 -0
- package/dist/core/resource-loader-types.d.ts.map +1 -1
- package/dist/core/resource-loader-types.js.map +1 -1
- package/dist/core/resume/blueprint/actions.d.ts.map +1 -1
- package/dist/core/resume/blueprint/actions.js +15 -15
- package/dist/core/resume/blueprint/actions.js.map +1 -1
- package/dist/core/resume/blueprint/process.d.ts +6 -1
- package/dist/core/resume/blueprint/process.d.ts.map +1 -1
- package/dist/core/resume/blueprint/process.js +132 -21
- package/dist/core/resume/blueprint/process.js.map +1 -1
- package/dist/core/runtime-credentials.d.ts +5 -0
- package/dist/core/runtime-credentials.d.ts.map +1 -1
- package/dist/core/runtime-credentials.js +34 -0
- package/dist/core/runtime-credentials.js.map +1 -1
- package/dist/core/sdk-types.d.ts +2 -0
- package/dist/core/sdk-types.d.ts.map +1 -1
- package/dist/core/sdk-types.js.map +1 -1
- package/dist/core/sdk.d.ts +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +187 -32
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-account-model.d.ts +15 -0
- package/dist/core/session-account-model.d.ts.map +1 -0
- package/dist/core/session-account-model.js +105 -0
- package/dist/core/session-account-model.js.map +1 -0
- package/dist/core/session-lifecycle-scope.d.ts +5 -0
- package/dist/core/session-lifecycle-scope.d.ts.map +1 -1
- package/dist/core/session-lifecycle-scope.js.map +1 -1
- package/dist/core/session-manager-core.d.ts +21 -2
- package/dist/core/session-manager-core.d.ts.map +1 -1
- package/dist/core/session-manager-core.js +64 -8
- package/dist/core/session-manager-core.js.map +1 -1
- package/dist/core/session-manager-history.d.ts +3 -1
- package/dist/core/session-manager-history.d.ts.map +1 -1
- package/dist/core/session-manager-history.js +19 -5
- package/dist/core/session-manager-history.js.map +1 -1
- package/dist/core/session-manager-types.d.ts +2 -0
- package/dist/core/session-manager-types.d.ts.map +1 -1
- package/dist/core/session-manager-types.js.map +1 -1
- package/dist/core/session-retry-status.d.ts +22 -0
- package/dist/core/session-retry-status.d.ts.map +1 -0
- package/dist/core/session-retry-status.js +25 -0
- package/dist/core/session-retry-status.js.map +1 -0
- package/dist/core/session-worktree-snapshots.d.ts +4 -2
- package/dist/core/session-worktree-snapshots.d.ts.map +1 -1
- package/dist/core/session-worktree-snapshots.js +8 -4
- package/dist/core/session-worktree-snapshots.js.map +1 -1
- package/dist/core/settings-manager-core.d.ts +4 -0
- package/dist/core/settings-manager-core.d.ts.map +1 -1
- package/dist/core/settings-manager-core.js +73 -1
- package/dist/core/settings-manager-core.js.map +1 -1
- package/dist/core/settings-schema.js +1 -1
- package/dist/core/settings-schema.js.map +1 -1
- package/dist/core/slash-commands.d.ts +2 -2
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +15 -4
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/storage/database.d.ts +14 -2
- package/dist/core/storage/database.d.ts.map +1 -1
- package/dist/core/storage/database.js.map +1 -1
- package/dist/core/storage/dialect.d.ts +13 -0
- package/dist/core/storage/dialect.d.ts.map +1 -1
- package/dist/core/storage/dialect.js +9 -1
- package/dist/core/storage/dialect.js.map +1 -1
- package/dist/core/storage/errors.d.ts +23 -1
- package/dist/core/storage/errors.d.ts.map +1 -1
- package/dist/core/storage/errors.js +28 -5
- package/dist/core/storage/errors.js.map +1 -1
- package/dist/core/storage/journal-transfer.d.ts.map +1 -1
- package/dist/core/storage/journal-transfer.js +90 -5
- package/dist/core/storage/journal-transfer.js.map +1 -1
- package/dist/core/storage/node-sqlite.d.ts.map +1 -1
- package/dist/core/storage/node-sqlite.js +61 -1
- package/dist/core/storage/node-sqlite.js.map +1 -1
- package/dist/core/storage/session/chunked-resume-projection.d.ts +4 -0
- package/dist/core/storage/session/chunked-resume-projection.d.ts.map +1 -0
- package/dist/core/storage/session/chunked-resume-projection.js +369 -0
- package/dist/core/storage/session/chunked-resume-projection.js.map +1 -0
- package/dist/core/storage/session/legacy-session-store.d.ts +5 -0
- package/dist/core/storage/session/legacy-session-store.d.ts.map +1 -1
- package/dist/core/storage/session/legacy-session-store.js +10 -2
- package/dist/core/storage/session/legacy-session-store.js.map +1 -1
- package/dist/core/storage/session/memory-session-store.d.ts.map +1 -1
- package/dist/core/storage/session/memory-session-store.js +6 -1
- package/dist/core/storage/session/memory-session-store.js.map +1 -1
- package/dist/core/storage/session/snapshot-generation.d.ts +8 -0
- package/dist/core/storage/session/snapshot-generation.d.ts.map +1 -0
- package/dist/core/storage/session/snapshot-generation.js +17 -0
- package/dist/core/storage/session/snapshot-generation.js.map +1 -0
- package/dist/core/storage/session/sql-session-store.d.ts +12 -0
- package/dist/core/storage/session/sql-session-store.d.ts.map +1 -1
- package/dist/core/storage/session/sql-session-store.js +243 -46
- package/dist/core/storage/session/sql-session-store.js.map +1 -1
- package/dist/core/storage/sqlite-facade.d.ts +17 -2
- package/dist/core/storage/sqlite-facade.d.ts.map +1 -1
- package/dist/core/storage/sqlite-facade.js +17 -1
- package/dist/core/storage/sqlite-facade.js.map +1 -1
- package/dist/core/tasks/agent-adapter.d.ts +13 -2
- package/dist/core/tasks/agent-adapter.d.ts.map +1 -1
- package/dist/core/tasks/agent-adapter.js +25 -8
- package/dist/core/tasks/agent-adapter.js.map +1 -1
- package/dist/core/tasks/agent-panel-rules.d.ts +77 -0
- package/dist/core/tasks/agent-panel-rules.d.ts.map +1 -0
- package/dist/core/tasks/agent-panel-rules.js +88 -0
- package/dist/core/tasks/agent-panel-rules.js.map +1 -0
- package/dist/core/tasks/agent-panel-source.d.ts +19 -0
- package/dist/core/tasks/agent-panel-source.d.ts.map +1 -1
- package/dist/core/tasks/agent-panel-source.js +50 -9
- package/dist/core/tasks/agent-panel-source.js.map +1 -1
- package/dist/core/tasks/command-output.d.ts +17 -2
- package/dist/core/tasks/command-output.d.ts.map +1 -1
- package/dist/core/tasks/command-output.js +59 -3
- package/dist/core/tasks/command-output.js.map +1 -1
- package/dist/core/tasks/completion-message.d.ts +8 -3
- package/dist/core/tasks/completion-message.d.ts.map +1 -1
- package/dist/core/tasks/completion-message.js +14 -10
- package/dist/core/tasks/completion-message.js.map +1 -1
- package/dist/core/tasks/completion.d.ts +14 -4
- package/dist/core/tasks/completion.d.ts.map +1 -1
- package/dist/core/tasks/completion.js +58 -17
- package/dist/core/tasks/completion.js.map +1 -1
- package/dist/core/tasks/contracts.d.ts +10 -1
- package/dist/core/tasks/contracts.d.ts.map +1 -1
- package/dist/core/tasks/contracts.js +3 -1
- package/dist/core/tasks/contracts.js.map +1 -1
- package/dist/core/tasks/heartbeat.js +2 -1
- package/dist/core/tasks/heartbeat.js.map +1 -1
- package/dist/core/tasks/live-elapsed.d.ts +16 -1
- package/dist/core/tasks/live-elapsed.d.ts.map +1 -1
- package/dist/core/tasks/live-elapsed.js +43 -4
- package/dist/core/tasks/live-elapsed.js.map +1 -1
- package/dist/core/tasks/owner-store.d.ts +8 -0
- package/dist/core/tasks/owner-store.d.ts.map +1 -1
- package/dist/core/tasks/owner-store.js +34 -4
- package/dist/core/tasks/owner-store.js.map +1 -1
- package/dist/core/tasks/session-scope.d.ts +7 -0
- package/dist/core/tasks/session-scope.d.ts.map +1 -1
- package/dist/core/tasks/session-scope.js +15 -9
- package/dist/core/tasks/session-scope.js.map +1 -1
- package/dist/core/tasks/supervisor.d.ts +7 -3
- package/dist/core/tasks/supervisor.d.ts.map +1 -1
- package/dist/core/tasks/supervisor.js +92 -17
- package/dist/core/tasks/supervisor.js.map +1 -1
- package/dist/core/tasks/task-archive-snapshot.d.ts +7 -0
- package/dist/core/tasks/task-archive-snapshot.d.ts.map +1 -0
- package/dist/core/tasks/task-archive-snapshot.js +33 -0
- package/dist/core/tasks/task-archive-snapshot.js.map +1 -0
- package/dist/core/tasks/task-resumer.d.ts +5 -3
- package/dist/core/tasks/task-resumer.d.ts.map +1 -1
- package/dist/core/tasks/task-resumer.js +37 -13
- package/dist/core/tasks/task-resumer.js.map +1 -1
- package/dist/core/tasks/task-view-source.d.ts +25 -3
- package/dist/core/tasks/task-view-source.d.ts.map +1 -1
- package/dist/core/tasks/task-view-source.js +144 -44
- package/dist/core/tasks/task-view-source.js.map +1 -1
- package/dist/core/tasks/transcript.d.ts +3 -1
- package/dist/core/tasks/transcript.d.ts.map +1 -1
- package/dist/core/tasks/transcript.js +27 -0
- package/dist/core/tasks/transcript.js.map +1 -1
- package/dist/core/tools/ask-user-question/view/dialog-builder.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/view/dialog-builder.js +2 -1
- package/dist/core/tools/ask-user-question/view/dialog-builder.js.map +1 -1
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +2 -1
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/history-protocol.d.ts.map +1 -1
- package/dist/core/tools/history-protocol.js +130 -29
- package/dist/core/tools/history-protocol.js.map +1 -1
- package/dist/core/tools/history-search-position.d.ts +30 -0
- package/dist/core/tools/history-search-position.d.ts.map +1 -0
- package/dist/core/tools/history-search-position.js +161 -0
- package/dist/core/tools/history-search-position.js.map +1 -0
- package/dist/core/tools/history-search-wire.d.ts +25 -0
- package/dist/core/tools/history-search-wire.d.ts.map +1 -0
- package/dist/core/tools/history-search-wire.js +210 -0
- package/dist/core/tools/history-search-wire.js.map +1 -0
- package/dist/core/tools/resource-selectors.d.ts +7 -1
- package/dist/core/tools/resource-selectors.d.ts.map +1 -1
- package/dist/core/tools/resource-selectors.js +18 -11
- package/dist/core/tools/resource-selectors.js.map +1 -1
- package/dist/core/tools/search.d.ts.map +1 -1
- package/dist/core/tools/search.js +24 -3
- package/dist/core/tools/search.js.map +1 -1
- package/dist/core/tools/sqlite-selector-connection.d.ts +3 -0
- package/dist/core/tools/sqlite-selector-connection.d.ts.map +1 -1
- package/dist/core/tools/sqlite-selector-connection.js +4 -0
- package/dist/core/tools/sqlite-selector-connection.js.map +1 -1
- package/dist/core/tools/tool-abort-grace.d.ts +13 -0
- package/dist/core/tools/tool-abort-grace.d.ts.map +1 -0
- package/dist/core/tools/tool-abort-grace.js +72 -0
- package/dist/core/tools/tool-abort-grace.js.map +1 -0
- package/dist/core/tools/tool-concurrency.d.ts +5 -1
- package/dist/core/tools/tool-concurrency.d.ts.map +1 -1
- package/dist/core/tools/tool-concurrency.js +36 -6
- package/dist/core/tools/tool-concurrency.js.map +1 -1
- package/dist/core/workflow-resume.d.ts +1 -1
- package/dist/core/workflow-resume.d.ts.map +1 -1
- package/dist/core/workflow-resume.js +13 -3
- package/dist/core/workflow-resume.js.map +1 -1
- package/dist/core/workflow-summary-lifecycle.d.ts.map +1 -1
- package/dist/core/workflow-summary-lifecycle.js +8 -2
- package/dist/core/workflow-summary-lifecycle.js.map +1 -1
- package/dist/core/workspace/errors.d.ts +5 -2
- package/dist/core/workspace/errors.d.ts.map +1 -1
- package/dist/core/workspace/errors.js +59 -5
- package/dist/core/workspace/errors.js.map +1 -1
- package/dist/core/worktree-snapshot/blob-store.d.ts +138 -17
- package/dist/core/worktree-snapshot/blob-store.d.ts.map +1 -1
- package/dist/core/worktree-snapshot/blob-store.js +788 -82
- package/dist/core/worktree-snapshot/blob-store.js.map +1 -1
- package/dist/core/worktree-snapshot/garbage.d.ts +17 -2
- package/dist/core/worktree-snapshot/garbage.d.ts.map +1 -1
- package/dist/core/worktree-snapshot/garbage.js +20 -4
- package/dist/core/worktree-snapshot/garbage.js.map +1 -1
- package/dist/core/worktree-snapshot/index.d.ts +1 -1
- package/dist/core/worktree-snapshot/index.d.ts.map +1 -1
- package/dist/core/worktree-snapshot/index.js +1 -1
- package/dist/core/worktree-snapshot/index.js.map +1 -1
- package/dist/core/worktree-snapshot/pool.d.ts.map +1 -1
- package/dist/core/worktree-snapshot/pool.js +38 -6
- package/dist/core/worktree-snapshot/pool.js.map +1 -1
- package/dist/core/worktree-snapshot/shared-clock.d.ts +3 -1
- package/dist/core/worktree-snapshot/shared-clock.d.ts.map +1 -1
- package/dist/core/worktree-snapshot/shared-clock.js +116 -26
- package/dist/core/worktree-snapshot/shared-clock.js.map +1 -1
- package/dist/core/worktree-snapshot/types.d.ts +4 -1
- package/dist/core/worktree-snapshot/types.d.ts.map +1 -1
- package/dist/core/worktree-snapshot/types.js.map +1 -1
- package/dist/extensions/llama/huggingface-ui.d.ts.map +1 -1
- package/dist/extensions/llama/huggingface-ui.js +2 -2
- package/dist/extensions/llama/huggingface-ui.js.map +1 -1
- package/dist/extensions/llama/index.d.ts +2 -0
- package/dist/extensions/llama/index.d.ts.map +1 -1
- package/dist/extensions/llama/index.js +19 -2
- package/dist/extensions/llama/index.js.map +1 -1
- package/dist/index.d.ts +9 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -4
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +74 -15
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/agent-panel.d.ts +22 -6
- package/dist/modes/interactive/components/agent-panel.d.ts.map +1 -1
- package/dist/modes/interactive/components/agent-panel.js +80 -23
- package/dist/modes/interactive/components/agent-panel.js.map +1 -1
- package/dist/modes/interactive/components/assistant-message.d.ts +2 -0
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js +11 -0
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/atomic-working-status.d.ts.map +1 -1
- package/dist/modes/interactive/components/atomic-working-status.js +10 -3
- package/dist/modes/interactive/components/atomic-working-status.js.map +1 -1
- package/dist/modes/interactive/components/bash-execution.d.ts +3 -2
- package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/bash-execution.js +7 -7
- package/dist/modes/interactive/components/bash-execution.js.map +1 -1
- package/dist/modes/interactive/components/branch-summary-message.d.ts +6 -0
- package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/branch-summary-message.js +12 -7
- package/dist/modes/interactive/components/branch-summary-message.js.map +1 -1
- package/dist/modes/interactive/components/chat-message-renderer.d.ts +2 -0
- package/dist/modes/interactive/components/chat-message-renderer.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-message-renderer.js +24 -3
- package/dist/modes/interactive/components/chat-message-renderer.js.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-actions.d.ts +1 -1
- package/dist/modes/interactive/components/chat-session-host-actions.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-actions.js +16 -10
- package/dist/modes/interactive/components/chat-session-host-actions.js.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-events.d.ts +10 -0
- package/dist/modes/interactive/components/chat-session-host-events.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-events.js +76 -31
- package/dist/modes/interactive/components/chat-session-host-events.js.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-rendering.d.ts +17 -5
- package/dist/modes/interactive/components/chat-session-host-rendering.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-rendering.js +79 -24
- package/dist/modes/interactive/components/chat-session-host-rendering.js.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-runtime.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-runtime.js +5 -4
- package/dist/modes/interactive/components/chat-session-host-runtime.js.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-state.d.ts +16 -1
- package/dist/modes/interactive/components/chat-session-host-state.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-state.js +22 -0
- package/dist/modes/interactive/components/chat-session-host-state.js.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-types.d.ts +8 -2
- package/dist/modes/interactive/components/chat-session-host-types.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-types.js.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-utils.d.ts +1 -0
- package/dist/modes/interactive/components/chat-session-host-utils.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-utils.js +2 -1
- package/dist/modes/interactive/components/chat-session-host-utils.js.map +1 -1
- package/dist/modes/interactive/components/chat-session-host.d.ts +35 -9
- package/dist/modes/interactive/components/chat-session-host.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-session-host.js +129 -35
- package/dist/modes/interactive/components/chat-session-host.js.map +1 -1
- package/dist/modes/interactive/components/chat-transcript.d.ts +13 -2
- package/dist/modes/interactive/components/chat-transcript.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-transcript.js +24 -4
- package/dist/modes/interactive/components/chat-transcript.js.map +1 -1
- package/dist/modes/interactive/components/compaction-boundary-message.d.ts +6 -0
- package/dist/modes/interactive/components/compaction-boundary-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/compaction-boundary-message.js +12 -7
- package/dist/modes/interactive/components/compaction-boundary-message.js.map +1 -1
- package/dist/modes/interactive/components/composer-rule.d.ts +0 -2
- package/dist/modes/interactive/components/composer-rule.d.ts.map +1 -1
- package/dist/modes/interactive/components/composer-rule.js +4 -6
- package/dist/modes/interactive/components/composer-rule.js.map +1 -1
- package/dist/modes/interactive/components/countdown-timer.d.ts +5 -9
- package/dist/modes/interactive/components/countdown-timer.d.ts.map +1 -1
- package/dist/modes/interactive/components/countdown-timer.js +32 -23
- package/dist/modes/interactive/components/countdown-timer.js.map +1 -1
- package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-editor.js +4 -3
- package/dist/modes/interactive/components/custom-editor.js.map +1 -1
- package/dist/modes/interactive/components/custom-entry.d.ts +6 -0
- package/dist/modes/interactive/components/custom-entry.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-entry.js +15 -0
- package/dist/modes/interactive/components/custom-entry.js.map +1 -1
- package/dist/modes/interactive/components/custom-message.d.ts +7 -3
- package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-message.js +17 -15
- package/dist/modes/interactive/components/custom-message.js.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts +10 -3
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +37 -45
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/heartbeat-block.d.ts.map +1 -1
- package/dist/modes/interactive/components/heartbeat-block.js +3 -1
- package/dist/modes/interactive/components/heartbeat-block.js.map +1 -1
- package/dist/modes/interactive/components/host-input-form.d.ts.map +1 -1
- package/dist/modes/interactive/components/host-input-form.js +3 -3
- package/dist/modes/interactive/components/host-input-form.js.map +1 -1
- package/dist/modes/interactive/components/index.d.ts +1 -1
- package/dist/modes/interactive/components/index.d.ts.map +1 -1
- package/dist/modes/interactive/components/index.js.map +1 -1
- package/dist/modes/interactive/components/input-label.d.ts.map +1 -1
- package/dist/modes/interactive/components/input-label.js +4 -5
- package/dist/modes/interactive/components/input-label.js.map +1 -1
- package/dist/modes/interactive/components/keybinding-hints.d.ts +7 -0
- package/dist/modes/interactive/components/keybinding-hints.d.ts.map +1 -1
- package/dist/modes/interactive/components/keybinding-hints.js +27 -6
- package/dist/modes/interactive/components/keybinding-hints.js.map +1 -1
- package/dist/modes/interactive/components/main-composer-keys.d.ts +17 -2
- package/dist/modes/interactive/components/main-composer-keys.d.ts.map +1 -1
- package/dist/modes/interactive/components/main-composer-keys.js +44 -27
- package/dist/modes/interactive/components/main-composer-keys.js.map +1 -1
- package/dist/modes/interactive/components/model-selector.d.ts +6 -1
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +13 -7
- package/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/dist/modes/interactive/components/nav-keys.d.ts +7 -2
- package/dist/modes/interactive/components/nav-keys.d.ts.map +1 -1
- package/dist/modes/interactive/components/nav-keys.js +51 -17
- package/dist/modes/interactive/components/nav-keys.js.map +1 -1
- package/dist/modes/interactive/components/notice-line.d.ts +8 -0
- package/dist/modes/interactive/components/notice-line.d.ts.map +1 -1
- package/dist/modes/interactive/components/notice-line.js +6 -1
- package/dist/modes/interactive/components/notice-line.js.map +1 -1
- package/dist/modes/interactive/components/selector.d.ts +3 -0
- package/dist/modes/interactive/components/selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/selector.js +30 -7
- package/dist/modes/interactive/components/selector.js.map +1 -1
- package/dist/modes/interactive/components/session-selector-list.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector-list.js +11 -11
- package/dist/modes/interactive/components/session-selector-list.js.map +1 -1
- package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector.js +2 -2
- package/dist/modes/interactive/components/session-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-picker.d.ts +5 -0
- package/dist/modes/interactive/components/settings-picker.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-picker.js +36 -2
- package/dist/modes/interactive/components/settings-picker.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector-submenus.d.ts +10 -0
- package/dist/modes/interactive/components/settings-selector-submenus.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector-submenus.js +89 -19
- package/dist/modes/interactive/components/settings-selector-submenus.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector-types.d.ts +6 -0
- package/dist/modes/interactive/components/settings-selector-types.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector-types.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +7 -0
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +12 -0
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.d.ts +6 -0
- package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.js +12 -7
- package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
- package/dist/modes/interactive/components/task-board.d.ts.map +1 -1
- package/dist/modes/interactive/components/task-board.js +9 -2
- package/dist/modes/interactive/components/task-board.js.map +1 -1
- package/dist/modes/interactive/components/task-completion-message.d.ts +10 -3
- package/dist/modes/interactive/components/task-completion-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/task-completion-message.js +173 -19
- package/dist/modes/interactive/components/task-completion-message.js.map +1 -1
- package/dist/modes/interactive/components/task-inspector.d.ts +1 -1
- package/dist/modes/interactive/components/task-inspector.d.ts.map +1 -1
- package/dist/modes/interactive/components/task-inspector.js +28 -19
- package/dist/modes/interactive/components/task-inspector.js.map +1 -1
- package/dist/modes/interactive/components/task-list.d.ts +7 -3
- package/dist/modes/interactive/components/task-list.d.ts.map +1 -1
- package/dist/modes/interactive/components/task-list.js +60 -33
- package/dist/modes/interactive/components/task-list.js.map +1 -1
- package/dist/modes/interactive/components/task-row.d.ts +7 -0
- package/dist/modes/interactive/components/task-row.d.ts.map +1 -1
- package/dist/modes/interactive/components/task-row.js +25 -11
- package/dist/modes/interactive/components/task-row.js.map +1 -1
- package/dist/modes/interactive/components/task-transcript-notices.d.ts +16 -0
- package/dist/modes/interactive/components/task-transcript-notices.d.ts.map +1 -0
- package/dist/modes/interactive/components/task-transcript-notices.js +74 -0
- package/dist/modes/interactive/components/task-transcript-notices.js.map +1 -0
- package/dist/modes/interactive/components/task-transcript-page.d.ts +11 -6
- package/dist/modes/interactive/components/task-transcript-page.d.ts.map +1 -1
- package/dist/modes/interactive/components/task-transcript-page.js +48 -21
- package/dist/modes/interactive/components/task-transcript-page.js.map +1 -1
- package/dist/modes/interactive/components/tool-block-families.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-block-families.js +2 -1
- package/dist/modes/interactive/components/tool-block-families.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts +3 -2
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +23 -9
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/components/transcript-block-clicks.d.ts +54 -14
- package/dist/modes/interactive/components/transcript-block-clicks.d.ts.map +1 -1
- package/dist/modes/interactive/components/transcript-block-clicks.js +151 -16
- package/dist/modes/interactive/components/transcript-block-clicks.js.map +1 -1
- package/dist/modes/interactive/components/tree-selector-help.d.ts.map +1 -1
- package/dist/modes/interactive/components/tree-selector-help.js +25 -30
- package/dist/modes/interactive/components/tree-selector-help.js.map +1 -1
- package/dist/modes/interactive/components/tree-selector-list.d.ts +4 -0
- package/dist/modes/interactive/components/tree-selector-list.d.ts.map +1 -1
- package/dist/modes/interactive/components/tree-selector-list.js +21 -21
- package/dist/modes/interactive/components/tree-selector-list.js.map +1 -1
- package/dist/modes/interactive/components/working-run-meter.d.ts +31 -2
- package/dist/modes/interactive/components/working-run-meter.d.ts.map +1 -1
- package/dist/modes/interactive/components/working-run-meter.js +81 -10
- package/dist/modes/interactive/components/working-run-meter.js.map +1 -1
- package/dist/modes/interactive/interactive-agent-events.js +67 -14
- package/dist/modes/interactive/interactive-agent-events.js.map +1 -1
- package/dist/modes/interactive/interactive-autocomplete.js +2 -2
- package/dist/modes/interactive/interactive-autocomplete.js.map +1 -1
- package/dist/modes/interactive/interactive-deferred-startup.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-deferred-startup.js +10 -4
- package/dist/modes/interactive/interactive-deferred-startup.js.map +1 -1
- package/dist/modes/interactive/interactive-editor-actions.js +4 -1
- package/dist/modes/interactive/interactive-editor-actions.js.map +1 -1
- package/dist/modes/interactive/interactive-extension-custom-ui.js +13 -3
- package/dist/modes/interactive/interactive-extension-custom-ui.js.map +1 -1
- package/dist/modes/interactive/interactive-extension-runtime.js +4 -2
- package/dist/modes/interactive/interactive-extension-runtime.js.map +1 -1
- package/dist/modes/interactive/interactive-extension-widgets.js +6 -8
- package/dist/modes/interactive/interactive-extension-widgets.js.map +1 -1
- package/dist/modes/interactive/interactive-input-handling.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-input-handling.js +43 -3
- package/dist/modes/interactive/interactive-input-handling.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-base.d.ts +7 -0
- package/dist/modes/interactive/interactive-mode-base.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-base.js +9 -2
- package/dist/modes/interactive/interactive-mode-base.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-deps.d.ts +1 -1
- package/dist/modes/interactive/interactive-mode-deps.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-deps.js +1 -1
- package/dist/modes/interactive/interactive-mode-deps.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-helpers.d.ts +5 -0
- package/dist/modes/interactive/interactive-mode-helpers.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-helpers.js +9 -0
- package/dist/modes/interactive/interactive-mode-helpers.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-surface.d.ts +10 -2
- package/dist/modes/interactive/interactive-mode-surface.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-surface.js.map +1 -1
- package/dist/modes/interactive/interactive-model-routing.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-model-routing.js +63 -21
- package/dist/modes/interactive/interactive-model-routing.js.map +1 -1
- package/dist/modes/interactive/interactive-prompt-turn.js +1 -1
- package/dist/modes/interactive/interactive-prompt-turn.js.map +1 -1
- package/dist/modes/interactive/interactive-render-chat.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-render-chat.js +71 -10
- package/dist/modes/interactive/interactive-render-chat.js.map +1 -1
- package/dist/modes/interactive/interactive-resource-rendering.js +9 -18
- package/dist/modes/interactive/interactive-resource-rendering.js.map +1 -1
- package/dist/modes/interactive/interactive-selectors.js +106 -57
- package/dist/modes/interactive/interactive-selectors.js.map +1 -1
- package/dist/modes/interactive/interactive-session-routing.js +10 -5
- package/dist/modes/interactive/interactive-session-routing.js.map +1 -1
- package/dist/modes/interactive/interactive-session-runtime.d.ts +3 -0
- package/dist/modes/interactive/interactive-session-runtime.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-session-runtime.js +11 -0
- package/dist/modes/interactive/interactive-session-runtime.js.map +1 -1
- package/dist/modes/interactive/interactive-slash-commands.js +3 -0
- package/dist/modes/interactive/interactive-slash-commands.js.map +1 -1
- package/dist/modes/interactive/interactive-startup-chat-container.d.ts +5 -1
- package/dist/modes/interactive/interactive-startup-chat-container.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-startup-chat-container.js +8 -3
- package/dist/modes/interactive/interactive-startup-chat-container.js.map +1 -1
- package/dist/modes/interactive/interactive-startup-trust.d.ts +2 -0
- package/dist/modes/interactive/interactive-startup-trust.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-startup-trust.js +21 -0
- package/dist/modes/interactive/interactive-startup-trust.js.map +1 -1
- package/dist/modes/interactive/interactive-startup.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-startup.js +39 -17
- package/dist/modes/interactive/interactive-startup.js.map +1 -1
- package/dist/modes/interactive/interactive-task-projection.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-task-projection.js +11 -1
- package/dist/modes/interactive/interactive-task-projection.js.map +1 -1
- package/dist/modes/interactive/resume-catalog.d.ts.map +1 -1
- package/dist/modes/interactive/resume-catalog.js +1 -0
- package/dist/modes/interactive/resume-catalog.js.map +1 -1
- package/dist/modes/interactive/theme/theme-controller.d.ts +6 -1
- package/dist/modes/interactive/theme/theme-controller.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme-controller.js +19 -1
- package/dist/modes/interactive/theme/theme-controller.js.map +1 -1
- package/dist/modes/interactive-engine/engine-child-liveness.d.ts +2 -0
- package/dist/modes/interactive-engine/engine-child-liveness.d.ts.map +1 -1
- package/dist/modes/interactive-engine/engine-child-liveness.js +2 -0
- package/dist/modes/interactive-engine/engine-child-liveness.js.map +1 -1
- package/dist/modes/interactive-engine/engine-custom-ui.d.ts.map +1 -1
- package/dist/modes/interactive-engine/engine-custom-ui.js +54 -4
- package/dist/modes/interactive-engine/engine-custom-ui.js.map +1 -1
- package/dist/modes/interactive-engine/engine-render-service.d.ts.map +1 -1
- package/dist/modes/interactive-engine/engine-render-service.js +21 -2
- package/dist/modes/interactive-engine/engine-render-service.js.map +1 -1
- package/dist/modes/interactive-engine/extension-ui-bridge.d.ts +4 -2
- package/dist/modes/interactive-engine/extension-ui-bridge.d.ts.map +1 -1
- package/dist/modes/interactive-engine/extension-ui-bridge.js +4 -0
- package/dist/modes/interactive-engine/extension-ui-bridge.js.map +1 -1
- package/dist/modes/interactive-engine/isolated-runtime.d.ts +39 -3
- package/dist/modes/interactive-engine/isolated-runtime.d.ts.map +1 -1
- package/dist/modes/interactive-engine/isolated-runtime.js +219 -29
- package/dist/modes/interactive-engine/isolated-runtime.js.map +1 -1
- package/dist/modes/interactive-engine/protocol.d.ts +33 -1
- package/dist/modes/interactive-engine/protocol.d.ts.map +1 -1
- package/dist/modes/interactive-engine/protocol.js +40 -2
- package/dist/modes/interactive-engine/protocol.js.map +1 -1
- package/dist/modes/interactive-engine/remote-command-catalog.d.ts +2 -2
- package/dist/modes/interactive-engine/remote-command-catalog.d.ts.map +1 -1
- package/dist/modes/interactive-engine/remote-command-catalog.js +7 -3
- package/dist/modes/interactive-engine/remote-command-catalog.js.map +1 -1
- package/dist/modes/interactive-engine/remote-component.d.ts.map +1 -1
- package/dist/modes/interactive-engine/remote-component.js +31 -5
- package/dist/modes/interactive-engine/remote-component.js.map +1 -1
- package/dist/modes/interactive-engine/remote-renderer.d.ts +20 -12
- package/dist/modes/interactive-engine/remote-renderer.d.ts.map +1 -1
- package/dist/modes/interactive-engine/remote-renderer.js +100 -34
- package/dist/modes/interactive-engine/remote-renderer.js.map +1 -1
- package/dist/modes/print-mode.d.ts.map +1 -1
- package/dist/modes/print-mode.js +4 -1
- package/dist/modes/print-mode.js.map +1 -1
- package/dist/modes/rpc/agent-panel-bridge.d.ts +7 -0
- package/dist/modes/rpc/agent-panel-bridge.d.ts.map +1 -1
- package/dist/modes/rpc/agent-panel-bridge.js +119 -114
- package/dist/modes/rpc/agent-panel-bridge.js.map +1 -1
- package/dist/modes/rpc/rpc-client-process.d.ts +2 -1
- package/dist/modes/rpc/rpc-client-process.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client-process.js +2 -1
- package/dist/modes/rpc/rpc-client-process.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts +8 -0
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +5 -1
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/modes/rpc/rpc-command-handler.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-command-handler.js +19 -2
- package/dist/modes/rpc/rpc-command-handler.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +4 -2
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-session-binding.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-session-binding.js +7 -0
- package/dist/modes/rpc/rpc-session-binding.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +13 -1
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/dist/utils/interactive-engine-bootstrap.d.ts +3 -0
- package/dist/utils/interactive-engine-bootstrap.d.ts.map +1 -1
- package/dist/utils/interactive-engine-bootstrap.js +25 -0
- package/dist/utils/interactive-engine-bootstrap.js.map +1 -1
- package/dist/utils/interactive-engine-env.d.ts +3 -0
- package/dist/utils/interactive-engine-env.d.ts.map +1 -1
- package/dist/utils/interactive-engine-env.js +1 -0
- package/dist/utils/interactive-engine-env.js.map +1 -1
- package/dist/utils/shell.d.ts +2 -0
- package/dist/utils/shell.d.ts.map +1 -1
- package/dist/utils/shell.js +3 -3
- package/dist/utils/shell.js.map +1 -1
- package/docs/background-tasks.md +32 -37
- package/docs/compaction.md +2 -2
- package/docs/computer-use.md +2 -0
- package/docs/development.md +11 -1
- package/docs/environment-variables.md +2 -0
- package/docs/extensions/api-reference.md +7 -3
- package/docs/extensions/authoring.md +3 -1
- package/docs/extensions/events.md +3 -1
- package/docs/extensions/ui.md +2 -0
- package/docs/guides/resume-on-any-machine.md +3 -1
- package/docs/intercom/reference.md +1 -1
- package/docs/intercom.md +3 -3
- package/docs/keybindings.md +6 -2
- package/docs/libraries/tui.md +4 -0
- package/docs/providers.md +1 -1
- package/docs/rpc/protocol.md +6 -4
- package/docs/sdk/reference.md +10 -4
- package/docs/sdk.md +5 -2
- package/docs/security.md +5 -1
- package/docs/session-format.md +1 -1
- package/docs/sessions.md +16 -0
- package/docs/settings.md +2 -2
- package/docs/skills.md +3 -3
- package/docs/storage.md +25 -4
- package/docs/subagents.md +42 -45
- package/docs/tui.md +1 -1
- package/docs/usage.md +3 -1
- package/docs/workflows/api-reference.md +3 -1
- package/docs/workflows/authoring.md +1 -1
- package/docs/workflows/operations.md +21 -14
- package/docs/workflows.md +1 -1
- package/docs/worktree-snapshots.md +10 -8
- package/npm-shrinkwrap.json +71 -49
- package/package.json +9 -8
- package/schemas/settings.schema.json +1 -1
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The agent panel's listing and hint rules, as pure functions over a row's kind and state. The panel below the main
|
|
3
|
+
* chat's prompt (`AgentPanelModel.rows` and the ranking the interactive engine and in-process host share) and its hint
|
|
4
|
+
* line call these, so every path lists the same rows and counts them the same way.
|
|
5
|
+
*/
|
|
6
|
+
export type PanelRowKind = "agent" | "shell" | "workflow";
|
|
7
|
+
export type PanelRowState = "running" | "queued" | "input" | "paused" | "stopping" | "waiting" | "done" | "failed" | "stopped";
|
|
8
|
+
/** Work the panel still waits on: running, queued, waiting on an answer, stopping, or waiting to wake. */
|
|
9
|
+
export declare function isActivePanelState(state: PanelRowState): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Work that stopped but can be resumed: a subagent stopped, paused, or with its turn interrupted, or a workflow run
|
|
12
|
+
* paused or blocked on a failed stage. It is listed while something in the panel is active, and leaves for good once
|
|
13
|
+
* nothing is, until it runs again.
|
|
14
|
+
*/
|
|
15
|
+
export declare function isRestingPanelRow(kind: PanelRowKind, state: PanelRowState): boolean;
|
|
16
|
+
/** What decides whether one row is listed, besides its own kind and state. */
|
|
17
|
+
export interface PanelRowContext {
|
|
18
|
+
/** Something in the panel is active: a row in an active state, or a running background shell. */
|
|
19
|
+
readonly active: boolean;
|
|
20
|
+
/** The row is resting and already left the panel, because nothing was active, and has not run since. */
|
|
21
|
+
readonly retired: boolean;
|
|
22
|
+
/** A finished workflow run's owner keeps it: nobody has opened it yet. Ignored for every other row. */
|
|
23
|
+
readonly kept: boolean;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Whether the panel lists a row. `finished` is true for a row that is done, failed or stopped, and not merely
|
|
27
|
+
* interrupted. Shells are never rows; a resting row stays only while something is active and it has not left yet; a
|
|
28
|
+
* finished subagent leaves at once; a finished workflow run stays while it is kept; everything else is listed.
|
|
29
|
+
*/
|
|
30
|
+
export declare function panelRowListed(kind: PanelRowKind, state: PanelRowState, finished: boolean, context: PanelRowContext): boolean;
|
|
31
|
+
/** The counts the hint line shows for the rows the panel lists. */
|
|
32
|
+
export interface PanelRowCounts {
|
|
33
|
+
/** Every listed row, workflow runs included: ↓ focuses the panel while this is not 0. */
|
|
34
|
+
readonly total: number;
|
|
35
|
+
/** The listed subagent rows: `↓ N agents`. Workflow runs are not agents. */
|
|
36
|
+
readonly agents: number;
|
|
37
|
+
/** The listed rows that wait for an answer, workflow runs included: `N needs input`. */
|
|
38
|
+
readonly needsInput: number;
|
|
39
|
+
}
|
|
40
|
+
export declare const NO_PANEL_ROWS: PanelRowCounts;
|
|
41
|
+
/** The counts after one more listed row. */
|
|
42
|
+
export declare function countPanelRow(counts: PanelRowCounts, kind: PanelRowKind, state: PanelRowState): PanelRowCounts;
|
|
43
|
+
/** What the counts read of a listed row. */
|
|
44
|
+
export interface PanelCountedRow {
|
|
45
|
+
readonly kind: PanelRowKind;
|
|
46
|
+
readonly state: PanelRowState;
|
|
47
|
+
}
|
|
48
|
+
/** The counts of a list of listed rows. */
|
|
49
|
+
export declare function panelCounts(rows: readonly PanelCountedRow[]): PanelRowCounts;
|
|
50
|
+
/** Where the hint line points for background work the panel does not list. */
|
|
51
|
+
export type PanelTasksHint = "hidden" | "manage" | "subagents";
|
|
52
|
+
/** The parts of the hint line about background work, before they are worded. */
|
|
53
|
+
export interface PanelHintParts {
|
|
54
|
+
/** `↓ N agents`; 0 means no such segment. */
|
|
55
|
+
readonly agents: number;
|
|
56
|
+
/** `N needs input`; 0 means no such segment. */
|
|
57
|
+
readonly needsInput: number;
|
|
58
|
+
/** `N shells`; 0 means no such segment. */
|
|
59
|
+
readonly shells: number;
|
|
60
|
+
/** `/tasks to manage` for running shells, or `/tasks to see subagents`, when the panel has nothing to focus. */
|
|
61
|
+
readonly tasks: PanelTasksHint;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* The hint line's background-work parts. `focusBound`: a key focuses the panel. `subagents`: the chat's subagents in
|
|
65
|
+
* /tasks, listed or not. Only subagent rows count as agents; with none there is no ↓ segment, even when workflow runs
|
|
66
|
+
* are listed. A question waiting anywhere in the panel is counted. Without rows to focus, running shells point to
|
|
67
|
+
* /tasks, and otherwise subagents the panel no longer lists do.
|
|
68
|
+
*/
|
|
69
|
+
export declare function panelHintParts(counts: PanelRowCounts, shells: number, subagents: number, focusBound: boolean): PanelHintParts;
|
|
70
|
+
/** One worded hint segment: `agents` follows the focus key, and `tasks` names the /tasks command. */
|
|
71
|
+
export interface PanelHintSegment {
|
|
72
|
+
readonly kind: "agents" | "needsInput" | "shells" | "tasks";
|
|
73
|
+
readonly text: string;
|
|
74
|
+
}
|
|
75
|
+
/** The worded hint segments for `parts`, in order, by kind. `focusKey` names the key that focuses the panel. */
|
|
76
|
+
export declare function panelHintSegments(parts: PanelHintParts, focusKey: string): PanelHintSegment[];
|
|
77
|
+
//# sourceMappingURL=agent-panel-rules.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-panel-rules.d.ts","sourceRoot":"","sources":["../../../src/core/tasks/agent-panel-rules.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAA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,CAAC,KAAK,EAAE,aAAa,CAAC;CAC9B;AAED,2CAA2C;AAC3C,wBAAgB,WAAW,CAAC,IAAI,EAAE,SAAS,eAAe,EAAE,GAAG,cAAc,CAM5E;AAED,8EAA8E;AAC9E,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,QAAQ,GAAG,WAAW,CAAC;AAE/D,gFAAgF;AAChF,MAAM,WAAW,cAAc;IAC9B,6CAA6C;IAC7C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,gDAAgD;IAChD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,2CAA2C;IAC3C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,gHAAgH;IAChH,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC;CAC/B;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAC7B,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,OAAO,GACjB,cAAc,CAehB;AAED,qGAAqG;AACrG,MAAM,WAAW,gBAAgB;IAChC,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,YAAY,GAAG,QAAQ,GAAG,OAAO,CAAC;IAC5D,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACtB;AAED,gHAAgH;AAChH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAU7F"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The agent panel's listing and hint rules, as pure functions over a row's kind and state. The panel below the main
|
|
3
|
+
* chat's prompt (`AgentPanelModel.rows` and the ranking the interactive engine and in-process host share) and its hint
|
|
4
|
+
* line call these, so every path lists the same rows and counts them the same way.
|
|
5
|
+
*/
|
|
6
|
+
/** Work the panel still waits on: running, queued, waiting on an answer, stopping, or waiting to wake. */
|
|
7
|
+
export function isActivePanelState(state) {
|
|
8
|
+
return state === "running" || state === "queued" || state === "input" || state === "stopping" || state === "waiting";
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Work that stopped but can be resumed: a subagent stopped, paused, or with its turn interrupted, or a workflow run
|
|
12
|
+
* paused or blocked on a failed stage. It is listed while something in the panel is active, and leaves for good once
|
|
13
|
+
* nothing is, until it runs again.
|
|
14
|
+
*/
|
|
15
|
+
export function isRestingPanelRow(kind, state) {
|
|
16
|
+
if (kind === "workflow")
|
|
17
|
+
return state === "paused";
|
|
18
|
+
return kind === "agent" && (state === "stopped" || state === "paused");
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Whether the panel lists a row. `finished` is true for a row that is done, failed or stopped, and not merely
|
|
22
|
+
* interrupted. Shells are never rows; a resting row stays only while something is active and it has not left yet; a
|
|
23
|
+
* finished subagent leaves at once; a finished workflow run stays while it is kept; everything else is listed.
|
|
24
|
+
*/
|
|
25
|
+
export function panelRowListed(kind, state, finished, context) {
|
|
26
|
+
if (kind === "shell")
|
|
27
|
+
return false;
|
|
28
|
+
if (isRestingPanelRow(kind, state))
|
|
29
|
+
return context.active && !context.retired;
|
|
30
|
+
if (finished)
|
|
31
|
+
return kind === "workflow" && context.kept;
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
export const NO_PANEL_ROWS = { total: 0, agents: 0, needsInput: 0 };
|
|
35
|
+
/** The counts after one more listed row. */
|
|
36
|
+
export function countPanelRow(counts, kind, state) {
|
|
37
|
+
return {
|
|
38
|
+
total: counts.total + 1,
|
|
39
|
+
agents: counts.agents + (kind === "agent" ? 1 : 0),
|
|
40
|
+
needsInput: counts.needsInput + (state === "input" ? 1 : 0),
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
/** The counts of a list of listed rows. */
|
|
44
|
+
export function panelCounts(rows) {
|
|
45
|
+
let counts = NO_PANEL_ROWS;
|
|
46
|
+
for (const row of rows) {
|
|
47
|
+
counts = countPanelRow(counts, row.kind, row.state);
|
|
48
|
+
}
|
|
49
|
+
return counts;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* The hint line's background-work parts. `focusBound`: a key focuses the panel. `subagents`: the chat's subagents in
|
|
53
|
+
* /tasks, listed or not. Only subagent rows count as agents; with none there is no ↓ segment, even when workflow runs
|
|
54
|
+
* are listed. A question waiting anywhere in the panel is counted. Without rows to focus, running shells point to
|
|
55
|
+
* /tasks, and otherwise subagents the panel no longer lists do.
|
|
56
|
+
*/
|
|
57
|
+
export function panelHintParts(counts, shells, subagents, focusBound) {
|
|
58
|
+
const focusable = focusBound && counts.total > 0;
|
|
59
|
+
const tasks = focusable
|
|
60
|
+
? "hidden"
|
|
61
|
+
: shells > 0
|
|
62
|
+
? "manage"
|
|
63
|
+
: counts.total === 0 && subagents > 0
|
|
64
|
+
? "subagents"
|
|
65
|
+
: "hidden";
|
|
66
|
+
return {
|
|
67
|
+
agents: focusBound ? counts.agents : 0,
|
|
68
|
+
needsInput: counts.needsInput,
|
|
69
|
+
shells: shells > 0 ? shells : 0,
|
|
70
|
+
tasks,
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
/** The worded hint segments for `parts`, in order, by kind. `focusKey` names the key that focuses the panel. */
|
|
74
|
+
export function panelHintSegments(parts, focusKey) {
|
|
75
|
+
const segments = [];
|
|
76
|
+
if (parts.agents > 0)
|
|
77
|
+
segments.push({ kind: "agents", text: `${focusKey} ${parts.agents} ${parts.agents === 1 ? "agent" : "agents"}` });
|
|
78
|
+
if (parts.needsInput > 0)
|
|
79
|
+
segments.push({ kind: "needsInput", text: `${parts.needsInput} needs input` });
|
|
80
|
+
if (parts.shells > 0)
|
|
81
|
+
segments.push({ kind: "shells", text: `${parts.shells} ${parts.shells === 1 ? "shell" : "shells"}` });
|
|
82
|
+
if (parts.tasks === "manage")
|
|
83
|
+
segments.push({ kind: "tasks", text: "/tasks to manage" });
|
|
84
|
+
else if (parts.tasks === "subagents")
|
|
85
|
+
segments.push({ kind: "tasks", text: "/tasks to see subagents" });
|
|
86
|
+
return segments;
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=agent-panel-rules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-panel-rules.js","sourceRoot":"","sources":["../../../src/core/tasks/agent-panel-rules.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAcH,0GAA0G;AAC1G,MAAM,UAAU,kBAAkB,CAAC,KAAoB;IACtD,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,OAAO,IAAI,KAAK,KAAK,UAAU,IAAI,KAAK,KAAK,SAAS,CAAC;AACtH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAAC,IAAkB,EAAE,KAAoB;IACzE,IAAI,IAAI,KAAK,UAAU;QAAE,OAAO,KAAK,KAAK,QAAQ,CAAC;IACnD,OAAO,IAAI,KAAK,OAAO,IAAI,CAAC,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,QAAQ,CAAC,CAAC;AACxE,CAAC;AAYD;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAC7B,IAAkB,EAClB,KAAoB,EACpB,QAAiB,EACjB,OAAwB;IAExB,IAAI,IAAI,KAAK,OAAO;QAAE,OAAO,KAAK,CAAC;IACnC,IAAI,iBAAiB,CAAC,IAAI,EAAE,KAAK,CAAC;QAAE,OAAO,OAAO,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;IAC9E,IAAI,QAAQ;QAAE,OAAO,IAAI,KAAK,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IACzD,OAAO,IAAI,CAAC;AACb,CAAC;AAYD,MAAM,CAAC,MAAM,aAAa,GAAmB,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC;AAEpF,4CAA4C;AAC5C,MAAM,UAAU,aAAa,CAAC,M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chat's prompt (`AgentPanelModel.rows` and the ranking the interactive engine and in-process host share) and its hint\n * line call these, so every path lists the same rows and counts them the same way.\n */\n\nexport type PanelRowKind = \"agent\" | \"shell\" | \"workflow\";\nexport type PanelRowState =\n\t| \"running\"\n\t| \"queued\"\n\t| \"input\"\n\t| \"paused\"\n\t| \"stopping\"\n\t| \"waiting\"\n\t| \"done\"\n\t| \"failed\"\n\t| \"stopped\";\n\n/** Work the panel still waits on: running, queued, waiting on an answer, stopping, or waiting to wake. */\nexport function isActivePanelState(state: PanelRowState): boolean {\n\treturn state === \"running\" || state === \"queued\" || state === \"input\" || state === \"stopping\" || state === \"waiting\";\n}\n\n/**\n * Work that stopped but can be resumed: a subagent stopped, paused, or with its turn interrupted, or a workflow run\n * paused or blocked on a failed stage. It is listed while something in the panel is active, and leaves for good once\n * nothing is, until it runs again.\n */\nexport function isRestingPanelRow(kind: PanelRowKind, state: PanelRowState): boolean {\n\tif (kind === \"workflow\") return state === \"paused\";\n\treturn kind === \"agent\" && (state === \"stopped\" || state === \"paused\");\n}\n\n/** What decides whether one row is listed, besides its own kind and state. */\nexport interface PanelRowContext {\n\t/** Something in the panel is active: a row in an active state, or a running background shell. */\n\treadonly active: boolean;\n\t/** The row is resting and already left the panel, because nothing was active, and has not run since. */\n\treadonly retired: boolean;\n\t/** A finished workflow run's owner keeps it: nobody has opened it yet. Ignored for every other row. */\n\treadonly kept: boolean;\n}\n\n/**\n * Whether the panel lists a row. `finished` is true for a row that is done, failed or stopped, and not merely\n * interrupted. Shells are never rows; a resting row stays only while something is active and it has not left yet; a\n * finished subagent leaves at once; a finished workflow run stays while it is kept; everything else is listed.\n */\nexport function panelRowListed(\n\tkind: PanelRowKind,\n\tstate: PanelRowState,\n\tfinished: boolean,\n\tcontext: PanelRowContext,\n): boolean {\n\tif (kind === \"shell\") return false;\n\tif (isRestingPanelRow(kind, state)) return context.active && !context.retired;\n\tif (finished) return kind === \"workflow\" && context.kept;\n\treturn true;\n}\n\n/** The counts the hint line shows for the rows the panel lists. */\nexport interface PanelRowCounts {\n\t/** Every listed row, workflow runs included: ↓ focuses the panel while this is not 0. */\n\treadonly total: number;\n\t/** The listed subagent rows: `↓ N agents`. Workflow runs are not agents. */\n\treadonly agents: number;\n\t/** The listed rows that wait for an answer, workflow runs included: `N needs input`. */\n\treadonly needsInput: number;\n}\n\nexport const NO_PANEL_ROWS: PanelRowCounts = { total: 0, agents: 0, needsInput: 0 };\n\n/** The counts after one more listed row. */\nexport function countPanelRow(counts: PanelRowCounts, kind: PanelRowKind, state: PanelRowState): PanelRowCounts {\n\treturn {\n\t\ttotal: counts.total + 1,\n\t\tagents: counts.agents + (kind === \"agent\" ? 1 : 0),\n\t\tneedsInput: counts.needsInput + (state === \"input\" ? 1 : 0),\n\t};\n}\n\n/** What the counts read of a listed row. */\nexport interface PanelCountedRow {\n\treadonly kind: PanelRowKind;\n\treadonly state: PanelRowState;\n}\n\n/** The counts of a list of listed rows. */\nexport function panelCounts(rows: readonly PanelCountedRow[]): PanelRowCounts {\n\tlet counts = NO_PANEL_ROWS;\n\tfor (const row of rows) {\n\t\tcounts = countPanelRow(counts, row.kind, row.state);\n\t}\n\treturn counts;\n}\n\n/** Where the hint line points for background work the panel does not list. */\nexport type PanelTasksHint = \"hidden\" | \"manage\" | \"subagents\";\n\n/** The parts of the hint line about background work, before they are worded. */\nexport interface PanelHintParts {\n\t/** `↓ N agents`; 0 means no such segment. */\n\treadonly agents: number;\n\t/** `N needs input`; 0 means no such segment. */\n\treadonly needsInput: number;\n\t/** `N shells`; 0 means no such segment. */\n\treadonly shells: number;\n\t/** `/tasks to manage` for running shells, or `/tasks to see subagents`, when the panel has nothing to focus. */\n\treadonly tasks: PanelTasksHint;\n}\n\n/**\n * The hint line's background-work parts. `focusBound`: a key focuses the panel. `subagents`: the chat's subagents in\n * /tasks, listed or not. Only subagent rows count as agents; with none there is no ↓ segment, even when workflow runs\n * are listed. A question waiting anywhere in the panel is counted. Without rows to focus, running shells point to\n * /tasks, and otherwise subagents the panel no longer lists do.\n */\nexport function panelHintParts(\n\tcounts: PanelRowCounts,\n\tshells: number,\n\tsubagents: number,\n\tfocusBound: boolean,\n): PanelHintParts {\n\tconst focusable = focusBound && counts.total > 0;\n\tconst tasks: PanelTasksHint = focusable\n\t\t? \"hidden\"\n\t\t: shells > 0\n\t\t\t? \"manage\"\n\t\t\t: counts.total === 0 && subagents > 0\n\t\t\t\t? \"subagents\"\n\t\t\t\t: \"hidden\";\n\treturn {\n\t\tagents: focusBound ? counts.agents : 0,\n\t\tneedsInput: counts.needsInput,\n\t\tshells: shells > 0 ? shells : 0,\n\t\ttasks,\n\t};\n}\n\n/** One worded hint segment: `agents` follows the focus key, and `tasks` names the /tasks command. */\nexport interface PanelHintSegment {\n\treadonly kind: \"agents\" | \"needsInput\" | \"shells\" | \"tasks\";\n\treadonly text: string;\n}\n\n/** The worded hint segments for `parts`, in order, by kind. `focusKey` names the key that focuses the panel. */\nexport function panelHintSegments(parts: PanelHintParts, focusKey: string): PanelHintSegment[] {\n\tconst segments: PanelHintSegment[] = [];\n\tif (parts.agents > 0)\n\t\tsegments.push({ kind: \"agents\", text: `${focusKey} ${parts.agents} ${parts.agents === 1 ? \"agent\" : \"agents\"}` });\n\tif (parts.needsInput > 0) segments.push({ kind: \"needsInput\", text: `${parts.needsInput} needs input` });\n\tif (parts.shells > 0)\n\t\tsegments.push({ kind: \"shells\", text: `${parts.shells} ${parts.shells === 1 ? \"shell\" : \"shells\"}` });\n\tif (parts.tasks === \"manage\") segments.push({ kind: \"tasks\", text: \"/tasks to manage\" });\n\telse if (parts.tasks === \"subagents\") segments.push({ kind: \"tasks\", text: \"/tasks to see subagents\" });\n\treturn segments;\n}\n"]}
|
|
@@ -10,6 +10,7 @@ export interface AgentPanelItem {
|
|
|
10
10
|
readonly name: string;
|
|
11
11
|
readonly task: string;
|
|
12
12
|
readonly elapsedMs?: number;
|
|
13
|
+
readonly elapsedSpan?: TaskRecord["elapsedSpan"];
|
|
13
14
|
readonly tokens?: number;
|
|
14
15
|
readonly progress?: {
|
|
15
16
|
readonly done: number;
|
|
@@ -24,6 +25,12 @@ export interface AgentPanelItem {
|
|
|
24
25
|
readonly queued?: number;
|
|
25
26
|
readonly endedAt?: number;
|
|
26
27
|
readonly viewed?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* An identity of the row's latest run: it changes whenever the row runs again (resumed, woken or sent a follow-up),
|
|
30
|
+
* however briefly. A stopped or paused row that left the panel is listed again once it changes, even when the panel
|
|
31
|
+
* never saw it running.
|
|
32
|
+
*/
|
|
33
|
+
readonly runGeneration?: string;
|
|
27
34
|
}
|
|
28
35
|
export interface AgentPanelOpenOptions {
|
|
29
36
|
readonly onReturn?: () => void;
|
|
@@ -75,9 +82,21 @@ export interface AgentPanelSession {
|
|
|
75
82
|
}
|
|
76
83
|
export declare function agentPanelSourceHubOf(session: AgentPanelSession): AgentPanelSourceHub | undefined;
|
|
77
84
|
export declare function taskPanelState(task: TaskRecord): AgentPanelState;
|
|
85
|
+
/**
|
|
86
|
+
* The identity of a subagent task's latest run (`AgentPanelItem.runGeneration`): how many times its interrupted turn
|
|
87
|
+
* was resumed. A settled task never runs again (a resume or a wake starts a new task), so it keeps the count it
|
|
88
|
+
* settled with.
|
|
89
|
+
*/
|
|
90
|
+
export declare function taskRunGeneration(task: TaskRecord): string | undefined;
|
|
78
91
|
export declare function shortTaskTitle(title: string): string;
|
|
79
92
|
export declare function markInterruptedPanelTask<T extends object>(item: T): T;
|
|
80
93
|
export declare function isInterruptedPanelTask(item: object): boolean;
|
|
94
|
+
/**
|
|
95
|
+
* Which part of the agent panel a native task is: a subagent is a row and counts as an agent; a shell is never a row
|
|
96
|
+
* and is counted on the hint line. Every task kind must be routed here explicitly, so a new kind cannot become an
|
|
97
|
+
* agent row by default.
|
|
98
|
+
*/
|
|
99
|
+
export declare function taskPanelRole(task: Pick<TaskRecord, "kind">): "agent" | "shell";
|
|
81
100
|
export declare function taskPanelItem(task: TaskRecord, sourceClocks?: TaskElapsedClocks): AgentPanelItem;
|
|
82
101
|
export declare function lazyTaskPanelItem(task: TaskRecord, sourceClocks?: TaskElapsedClocks): AgentPanelItem;
|
|
83
102
|
export declare function materializePanelItem(item: AgentPanelItem): AgentPanelItem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-panel-source.d.ts","sourceRoot":"","sources":["../../../src/core/tasks/agent-panel-source.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAErE,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAiB,iBAAiB,EAAiC,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"agent-panel-source.d.ts","sourceRoot":"","sources":["../../../src/core/tasks/agent-panel-source.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAErE,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAiB,iBAAiB,EAAiC,MAAM,mBAAmB,CAAC;AAOpG,OAAO,EAAuB,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEjF,MAAM,MAAM,eAAe,GACxB,SAAS,GACT,QAAQ,GACR,OAAO,GACP,QAAQ,GACR,UAAU,GACV,SAAS,GACT,MAAM,GACN,QAAQ,GACR,SAAS,CAAC;AAEb,MAAM,WAAW,cAAc;IAC9B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,GAAG,UAAU,CAAC;IAC9C,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAA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,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,GACpC,cAAc,EAAE,CAOlB;AAED,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAoC1G;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,iBAAiB,GAAG,MAAM,EAAE,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAgBzG;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,cAAc,GAAG,uBAAuB,GAAG,SAAS,CAO/F;AA4BD,wBAAgB,kBAAkB,CACjC,OAAO,EAAE,iBAAiB,GAAG,MAAM,EACnC,EAAE,EAAE,MAAM,EACV,OAAO,CAAC,EAAE,qBAAqB,GAC7B,OAAO,CAwCT;AAED,wBAAsB,kBAAkB,CACvC,OAAO,EAAE,iBAAiB,GAAG,MAAM,EACnC,EAAE,EAAE,MAAM,GACR,OAAO,CAAC,sBAAsB,CAAC,CA+BjC;AAED,wBAAsB,oBAAoB,CACzC,OAAO,EAAE,iBAAiB,GAAG,MAAM,EACnC,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,uBAAuB,GAC/B,OAAO,CAAC,sBAAsB,CAAC,CAkBjC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { inspect, types } from "node:util";
|
|
2
|
-
import { sanitizeTerminalText } from "../../utils/terminal-text.js";
|
|
2
|
+
import { graphemeAt, sanitizeTerminalText } from "../../utils/terminal-text.js";
|
|
3
3
|
import { waitingReleasedTools, withoutSupersededAttempts } from "./completion.js";
|
|
4
4
|
import { bindTaskClock, TaskElapsedClocks, taskClockOf, taskClockRunning } from "./live-elapsed.js";
|
|
5
|
-
import { getOwnerTaskStore, isTaskTurnInterrupted, watchOwnerTaskStoreBinding } from "./owner-store.js";
|
|
5
|
+
import { getOwnerTaskStore, isTaskTurnInterrupted, taskResumedTurns, watchOwnerTaskStoreBinding, } from "./owner-store.js";
|
|
6
6
|
import { ownerTaskViewSource } from "./task-view-source.js";
|
|
7
7
|
const hubWatchers = new Set();
|
|
8
8
|
const sourceVersions = new WeakMap();
|
|
@@ -207,6 +207,15 @@ export function taskPanelState(task) {
|
|
|
207
207
|
}
|
|
208
208
|
return "running";
|
|
209
209
|
}
|
|
210
|
+
/**
|
|
211
|
+
* The identity of a subagent task's latest run (`AgentPanelItem.runGeneration`): how many times its interrupted turn
|
|
212
|
+
* was resumed. A settled task never runs again (a resume or a wake starts a new task), so it keeps the count it
|
|
213
|
+
* settled with.
|
|
214
|
+
*/
|
|
215
|
+
export function taskRunGeneration(task) {
|
|
216
|
+
const resumed = taskResumedTurns(task);
|
|
217
|
+
return resumed === undefined ? undefined : `turn:${resumed}`;
|
|
218
|
+
}
|
|
210
219
|
const SHORT_TITLE_CHARS = 60;
|
|
211
220
|
export function shortTaskTitle(title) {
|
|
212
221
|
const line = title
|
|
@@ -220,7 +229,10 @@ export function shortTaskTitle(title) {
|
|
|
220
229
|
return line;
|
|
221
230
|
const cut = line.slice(0, SHORT_TITLE_CHARS);
|
|
222
231
|
const space = cut.lastIndexOf(" ");
|
|
223
|
-
|
|
232
|
+
const end = cut.slice(0, space > SHORT_TITLE_CHARS / 2 ? space : SHORT_TITLE_CHARS - 1).trimEnd().length;
|
|
233
|
+
// The next code point is enough to tell whether this cut (including a word break) splits a grapheme.
|
|
234
|
+
const boundary = graphemeAt(line.slice(0, end + 2), end);
|
|
235
|
+
return `${line.slice(0, boundary.index)}…`;
|
|
224
236
|
}
|
|
225
237
|
const cachedTaskItems = new WeakMap();
|
|
226
238
|
const lazyTaskItems = new WeakMap();
|
|
@@ -233,19 +245,37 @@ export function markInterruptedPanelTask(item) {
|
|
|
233
245
|
export function isInterruptedPanelTask(item) {
|
|
234
246
|
return interruptedTaskItems.has(item);
|
|
235
247
|
}
|
|
248
|
+
/**
|
|
249
|
+
* Which part of the agent panel a native task is: a subagent is a row and counts as an agent; a shell is never a row
|
|
250
|
+
* and is counted on the hint line. Every task kind must be routed here explicitly, so a new kind cannot become an
|
|
251
|
+
* agent row by default.
|
|
252
|
+
*/
|
|
253
|
+
export function taskPanelRole(task) {
|
|
254
|
+
switch (task.kind) {
|
|
255
|
+
case "agent":
|
|
256
|
+
return "agent";
|
|
257
|
+
case "command":
|
|
258
|
+
return "shell";
|
|
259
|
+
default: {
|
|
260
|
+
const unrouted = task.kind;
|
|
261
|
+
return unrouted;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
236
265
|
export function taskPanelItem(task, sourceClocks) {
|
|
237
266
|
const clocks = sourceClocks ?? taskClockOf(task);
|
|
238
267
|
const cached = cachedTaskItems.get(task);
|
|
239
268
|
const state = taskPanelState(task);
|
|
240
269
|
const interrupted = task.execution.kind !== "settled" && state === "stopped";
|
|
241
270
|
const question = task.attention.kind === "input-needed" ? task.attention.prompt || undefined : undefined;
|
|
242
|
-
const kind = task
|
|
243
|
-
const name =
|
|
271
|
+
const kind = taskPanelRole(task);
|
|
272
|
+
const name = kind === "agent" ? (task.agentName ?? "agent") : "shell";
|
|
244
273
|
const title = shortTaskTitle(task.title || "");
|
|
245
274
|
const reason = state === "failed" && task.execution.kind === "settled" && task.execution.result.kind === "failed"
|
|
246
275
|
? (task.execution.result.message.split("\n")[0] ?? "")
|
|
247
276
|
: undefined;
|
|
248
277
|
const waitingOn = waitingReleasedTools(task);
|
|
278
|
+
const runGeneration = taskRunGeneration(task);
|
|
249
279
|
if (cached !== undefined &&
|
|
250
280
|
cached.clocks === clocks &&
|
|
251
281
|
cached.interrupted === interrupted &&
|
|
@@ -258,7 +288,8 @@ export function taskPanelItem(task, sourceClocks) {
|
|
|
258
288
|
cached.item.tokens === task.metrics?.tokenCount &&
|
|
259
289
|
cached.item.question === question &&
|
|
260
290
|
cached.item.reason === reason &&
|
|
261
|
-
cached.item.waitingOn === waitingOn
|
|
291
|
+
cached.item.waitingOn === waitingOn &&
|
|
292
|
+
cached.item.runGeneration === runGeneration)
|
|
262
293
|
return cached.item;
|
|
263
294
|
const item = {
|
|
264
295
|
id: `${taskPrefix}${task.ref.taskId}`,
|
|
@@ -267,10 +298,12 @@ export function taskPanelItem(task, sourceClocks) {
|
|
|
267
298
|
name,
|
|
268
299
|
task: title,
|
|
269
300
|
...(task.metrics?.elapsedMs === undefined ? {} : { elapsedMs: task.metrics.elapsedMs }),
|
|
301
|
+
...(task.elapsedSpan === undefined ? {} : { elapsedSpan: task.elapsedSpan }),
|
|
270
302
|
...(task.metrics?.tokenCount === undefined ? {} : { tokens: task.metrics.tokenCount }),
|
|
271
303
|
...(question ? { question } : {}),
|
|
272
304
|
...(reason === undefined ? {} : { reason }),
|
|
273
305
|
...(waitingOn === undefined ? {} : { waitingOn }),
|
|
306
|
+
...(runGeneration === undefined ? {} : { runGeneration }),
|
|
274
307
|
};
|
|
275
308
|
if (interrupted)
|
|
276
309
|
markInterruptedPanelTask(item);
|
|
@@ -282,17 +315,20 @@ export function taskPanelItem(task, sourceClocks) {
|
|
|
282
315
|
export function lazyTaskPanelItem(task, sourceClocks) {
|
|
283
316
|
const state = taskPanelState(task);
|
|
284
317
|
const interrupted = task.execution.kind !== "settled" && state === "stopped";
|
|
318
|
+
const runGeneration = taskRunGeneration(task);
|
|
285
319
|
const cached = lazyTaskItems.get(task);
|
|
286
320
|
if (cached !== undefined &&
|
|
287
321
|
cached.state === state &&
|
|
288
322
|
cached.clocks === sourceClocks &&
|
|
289
|
-
cached.interrupted === interrupted
|
|
323
|
+
cached.interrupted === interrupted &&
|
|
324
|
+
cached.runGeneration === runGeneration) {
|
|
290
325
|
return cached.item;
|
|
291
326
|
}
|
|
292
327
|
const item = {
|
|
293
328
|
id: `${taskPrefix}${task.ref.taskId}`,
|
|
294
|
-
kind: task
|
|
329
|
+
kind: taskPanelRole(task),
|
|
295
330
|
state,
|
|
331
|
+
...(runGeneration === undefined ? {} : { runGeneration }),
|
|
296
332
|
get name() {
|
|
297
333
|
return taskPanelItem(task, sourceClocks).name;
|
|
298
334
|
},
|
|
@@ -305,7 +341,7 @@ export function lazyTaskPanelItem(task, sourceClocks) {
|
|
|
305
341
|
};
|
|
306
342
|
if (interrupted)
|
|
307
343
|
markInterruptedPanelTask(item);
|
|
308
|
-
lazyTaskItems.set(task, { state, clocks: sourceClocks, interrupted, item });
|
|
344
|
+
lazyTaskItems.set(task, { state, clocks: sourceClocks, interrupted, runGeneration, item });
|
|
309
345
|
lazyTaskRecords.set(item, { task, clocks: sourceClocks });
|
|
310
346
|
return item;
|
|
311
347
|
}
|
|
@@ -681,6 +717,8 @@ function validateItem(raw, readAt) {
|
|
|
681
717
|
drainThenable(queued);
|
|
682
718
|
const endedAt = row.endedAt;
|
|
683
719
|
drainThenable(endedAt);
|
|
720
|
+
const runGeneration = row.runGeneration;
|
|
721
|
+
drainThenable(runGeneration);
|
|
684
722
|
if (typeof id !== "string" ||
|
|
685
723
|
id.length === 0 ||
|
|
686
724
|
id === "main" ||
|
|
@@ -706,6 +744,7 @@ function validateItem(raw, readAt) {
|
|
|
706
744
|
(reason !== undefined && typeof reason !== "string") ||
|
|
707
745
|
(waitingOn !== undefined && typeof waitingOn !== "string") ||
|
|
708
746
|
(viewed !== undefined && typeof viewed !== "boolean") ||
|
|
747
|
+
(runGeneration !== undefined && typeof runGeneration !== "string") ||
|
|
709
748
|
progress === false ||
|
|
710
749
|
choices === false) {
|
|
711
750
|
return undefined;
|
|
@@ -739,6 +778,8 @@ function validateItem(raw, readAt) {
|
|
|
739
778
|
item.endedAt = endedAt;
|
|
740
779
|
if (viewed !== undefined)
|
|
741
780
|
item.viewed = viewed;
|
|
781
|
+
if (runGeneration !== undefined)
|
|
782
|
+
item.runGeneration = runGeneration;
|
|
742
783
|
if (elapsedMs !== undefined && (state === "running" || state === "input" || state === "stopping")) {
|
|
743
784
|
itemSampleTimes.set(item, readAt);
|
|
744
785
|
}
|