pi-subagents 0.79.2 → 0.81.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 +56 -0
- package/README.md +1 -1
- package/bundle/agents.js +18 -0
- package/bundle/background-work.js +16 -0
- package/bundle/capability-ceiling.js +22 -0
- package/bundle/child-tool-plan.js +11 -0
- package/bundle/chunk-26C3WLYQ.js +8388 -0
- package/bundle/chunk-2XYWN7QJ.js +128 -0
- package/bundle/chunk-2ZSNH26H.js +4164 -0
- package/bundle/chunk-3DC5KBVP.js +235 -0
- package/bundle/chunk-3IF2PGW7.js +380 -0
- package/bundle/chunk-4QFZZV3O.js +57 -0
- package/bundle/chunk-563BHAZ5.js +1365 -0
- package/bundle/chunk-5LFLVSTM.js +260 -0
- package/bundle/chunk-62OCY2S4.js +14 -0
- package/bundle/chunk-74RT5YQE.js +326 -0
- package/bundle/chunk-7F6RKT6W.js +132 -0
- package/bundle/chunk-7J4ZXMY7.js +18 -0
- package/bundle/chunk-ARRKBB2B.js +179 -0
- package/bundle/chunk-BJN5LUQY.js +458 -0
- package/bundle/chunk-BPS2AGBZ.js +5421 -0
- package/bundle/chunk-CEKS3TFO.js +1337 -0
- package/bundle/chunk-CTPAE36Y.js +94 -0
- package/bundle/chunk-D4EHT5SJ.js +14 -0
- package/bundle/chunk-EYNJ6VL6.js +526 -0
- package/bundle/chunk-G5DKFLLI.js +1185 -0
- package/bundle/chunk-KSWQVGDW.js +1027 -0
- package/bundle/chunk-L5ZHE4L4.js +946 -0
- package/bundle/chunk-LSRUTHT7.js +57 -0
- package/bundle/chunk-N2BN7BF5.js +159 -0
- package/bundle/chunk-NF7IEKBH.js +490 -0
- package/bundle/chunk-NIXWDZZV.js +9 -0
- package/bundle/chunk-NNLASTQE.js +4082 -0
- package/bundle/chunk-TUWLXTAM.js +935 -0
- package/bundle/chunk-UKG4V45O.js +228 -0
- package/bundle/chunk-V2JWDB5U.js +753 -0
- package/bundle/chunk-V3BIUPLU.js +9163 -0
- package/bundle/chunk-V6MR5TOQ.js +270 -0
- package/bundle/chunk-VJHOELQP.js +8245 -0
- package/bundle/chunk-WSBNENFS.js +732 -0
- package/bundle/chunk-XMFLCKMQ.js +16664 -0
- package/bundle/chunk-YFCK7H2S.js +129 -0
- package/bundle/chunk-YYREO77V.js +137 -0
- package/bundle/chunk-Z7KVHQHL.js +173 -0
- package/bundle/chunk-ZBC44JJ3.js +8606 -0
- package/bundle/chunk-ZP3HODFH.js +175 -0
- package/bundle/control-channel.js +11 -0
- package/bundle/delegation.js +14 -0
- package/bundle/external-job-provider.js +20 -0
- package/bundle/external-runs.js +21 -0
- package/bundle/index.js +30 -0
- package/bundle/inspectors.js +8 -0
- package/bundle/intercom-bridge.js +11 -0
- package/bundle/preflight.js +425 -0
- package/bundle/project-panes.js +28 -0
- package/bundle/required-child-extensions.js +6 -0
- package/bundle/shared-types.js +8 -0
- package/bundle/workflow-resources.js +7 -0
- package/docs/agents.md +1 -1
- package/docs/configuration.md +15 -5
- package/docs/extension-api.md +29 -2
- package/docs/observability.md +6 -2
- package/docs/standalone-background.md +3 -3
- package/docs/workflows.md +1 -1
- package/index.d.ts +0 -1
- package/index.js +0 -1
- package/package.json +19 -19
- package/src/agents/advertised-agent-prompt.d.ts +0 -1
- package/src/agents/advertised-agent-prompt.js +0 -1
- package/src/agents/agent-management.d.ts +0 -1
- package/src/agents/agent-management.js +0 -1
- package/src/agents/agent-memory.d.ts +0 -1
- package/src/agents/agent-memory.js +0 -1
- package/src/agents/agent-refinements.d.ts +0 -1
- package/src/agents/agent-refinements.js +0 -1
- package/src/agents/agent-scope.d.ts +0 -1
- package/src/agents/agent-scope.js +0 -1
- package/src/agents/agent-selection.d.ts +0 -1
- package/src/agents/agent-selection.js +0 -1
- package/src/agents/agent-serializer.d.ts +0 -1
- package/src/agents/agent-serializer.js +0 -1
- package/src/agents/agents.d.ts +0 -1
- package/src/agents/agents.js +0 -1
- package/src/agents/builtin-names.d.ts +0 -1
- package/src/agents/builtin-names.js +0 -1
- package/src/agents/chain-serializer.d.ts +0 -1
- package/src/agents/chain-serializer.js +0 -1
- package/src/agents/frontmatter.d.ts +2 -1
- package/src/agents/frontmatter.js +9 -3
- package/src/agents/global-npm-root.d.ts +0 -1
- package/src/agents/global-npm-root.js +0 -1
- package/src/agents/identity.d.ts +0 -1
- package/src/agents/identity.js +0 -1
- package/src/agents/proactive-skills.d.ts +0 -1
- package/src/agents/proactive-skills.js +0 -1
- package/src/agents/runtime-agent-events.d.ts +0 -1
- package/src/agents/runtime-agent-events.js +0 -1
- package/src/agents/runtime-agent-registry.d.ts +0 -1
- package/src/agents/runtime-agent-registry.js +0 -1
- package/src/agents/skills.d.ts +0 -1
- package/src/agents/skills.js +0 -1
- package/src/api/agents.d.ts +0 -1
- package/src/api/agents.js +0 -1
- package/src/api/background-work.d.ts +0 -1
- package/src/api/background-work.js +0 -1
- package/src/api/capability-ceiling.d.ts +0 -1
- package/src/api/capability-ceiling.js +0 -1
- package/src/api/child-tool-plan.d.ts +0 -1
- package/src/api/child-tool-plan.js +0 -1
- package/src/api/control-channel.d.ts +0 -1
- package/src/api/control-channel.js +0 -1
- package/src/api/delegation.d.ts +20 -1
- package/src/api/delegation.js +0 -1
- package/src/api/external-job-provider.d.ts +0 -1
- package/src/api/external-job-provider.js +0 -1
- package/src/api/external-runs.d.ts +0 -1
- package/src/api/external-runs.js +0 -1
- package/src/api/inspectors.d.ts +0 -1
- package/src/api/inspectors.js +0 -1
- package/src/api/intercom-bridge.d.ts +0 -1
- package/src/api/intercom-bridge.js +0 -1
- package/src/api/preflight.d.ts +0 -1
- package/src/api/preflight.js +0 -1
- package/src/api/project-panes.d.ts +0 -1
- package/src/api/project-panes.js +0 -1
- package/src/api/required-child-extensions.d.ts +0 -1
- package/src/api/required-child-extensions.js +0 -1
- package/src/api/shared-types.d.ts +0 -1
- package/src/api/shared-types.js +0 -1
- package/src/api/workflow-resources.d.ts +0 -1
- package/src/api/workflow-resources.js +0 -1
- package/src/extension/active-runs-prompt.d.ts +0 -1
- package/src/extension/active-runs-prompt.js +0 -1
- package/src/extension/config.d.ts +0 -1
- package/src/extension/config.js +3 -1
- package/src/extension/control-notices.d.ts +0 -1
- package/src/extension/control-notices.js +0 -1
- package/src/extension/declaration-pinning.d.ts +0 -1
- package/src/extension/declaration-pinning.js +0 -1
- package/src/extension/doctor.d.ts +0 -1
- package/src/extension/doctor.js +0 -1
- package/src/extension/fanout-child.d.ts +0 -1
- package/src/extension/fanout-child.js +0 -1
- package/src/extension/herdr-pi-bridge.d.ts +0 -1
- package/src/extension/herdr-pi-bridge.js +0 -1
- package/src/extension/index.d.ts +0 -1
- package/src/extension/index.js +40 -18
- package/src/extension/public-execution.d.ts +0 -1
- package/src/extension/public-execution.js +0 -1
- package/src/extension/reply-workflow-script.d.ts +0 -1
- package/src/extension/reply-workflow-script.js +0 -1
- package/src/extension/rpc.d.ts +0 -1
- package/src/extension/rpc.js +0 -1
- package/src/extension/schemas.d.ts +0 -1
- package/src/extension/schemas.js +3 -4
- package/src/extension/steering-notices.d.ts +0 -1
- package/src/extension/steering-notices.js +0 -1
- package/src/extension/subagent-guide.d.ts +0 -1
- package/src/extension/subagent-guide.js +0 -1
- package/src/extension/subagent-options.d.ts +0 -1
- package/src/extension/subagent-options.js +0 -1
- package/src/extension/tool-activation.d.ts +0 -1
- package/src/extension/tool-activation.js +0 -9
- package/src/extension/tool-description.d.ts +0 -1
- package/src/extension/tool-description.js +2 -3
- package/src/extension/tool-result.d.ts +0 -1
- package/src/extension/tool-result.js +0 -1
- package/src/extension/upgrade-notice.d.ts +0 -1
- package/src/extension/upgrade-notice.js +0 -1
- package/src/inspectors/actions.d.ts +0 -1
- package/src/inspectors/actions.js +0 -1
- package/src/inspectors/ghostty/actions.d.ts +0 -1
- package/src/inspectors/ghostty/actions.js +0 -1
- package/src/inspectors/ghostty/plugin.d.ts +0 -1
- package/src/inspectors/ghostty/plugin.js +0 -1
- package/src/inspectors/herdr/actions.d.ts +0 -1
- package/src/inspectors/herdr/actions.js +0 -1
- package/src/inspectors/herdr/client.d.ts +0 -1
- package/src/inspectors/herdr/client.js +0 -1
- package/src/inspectors/herdr/focus.d.ts +0 -1
- package/src/inspectors/herdr/focus.js +0 -1
- package/src/inspectors/herdr/plugin.d.ts +0 -1
- package/src/inspectors/herdr/plugin.js +0 -1
- package/src/inspectors/herdr/project-panes.d.ts +0 -1
- package/src/inspectors/herdr/project-panes.js +0 -1
- package/src/inspectors/inspector-runner.d.ts +0 -1
- package/src/inspectors/inspector-runner.js +0 -1
- package/src/inspectors/plugins.d.ts +0 -1
- package/src/inspectors/plugins.js +0 -1
- package/src/inspectors/session-roots-codec.d.ts +0 -1
- package/src/inspectors/session-roots-codec.js +0 -1
- package/src/inspectors/shell-command.d.ts +0 -1
- package/src/inspectors/shell-command.js +0 -1
- package/src/inspectors/tmux/actions.d.ts +0 -1
- package/src/inspectors/tmux/actions.js +0 -1
- package/src/inspectors/tmux/client.d.ts +0 -1
- package/src/inspectors/tmux/client.js +0 -1
- package/src/inspectors/tmux/plugin.d.ts +0 -1
- package/src/inspectors/tmux/plugin.js +0 -1
- package/src/inspectors/types.d.ts +0 -1
- package/src/inspectors/types.js +0 -1
- package/src/integrations/herdr-status.d.ts +0 -1
- package/src/integrations/herdr-status.js +0 -1
- package/src/integrations/pi-web-session-liveness.d.ts +0 -1
- package/src/integrations/pi-web-session-liveness.js +0 -1
- package/src/integrations/program-status.d.ts +0 -1
- package/src/integrations/program-status.js +0 -1
- package/src/intercom/intercom-bridge.d.ts +0 -1
- package/src/intercom/intercom-bridge.js +0 -1
- package/src/intercom/native-supervisor-channel.d.ts +0 -1
- package/src/intercom/native-supervisor-channel.js +1 -2
- package/src/intercom/result-intercom.d.ts +0 -1
- package/src/intercom/result-intercom.js +0 -1
- package/src/intercom/supervisor-ui.d.ts +0 -1
- package/src/intercom/supervisor-ui.js +0 -1
- package/src/missions/actions.d.ts +0 -1
- package/src/missions/actions.js +0 -1
- package/src/missions/goal-driver.d.ts +0 -1
- package/src/missions/goal-driver.js +0 -1
- package/src/missions/lifecycle.d.ts +0 -1
- package/src/missions/lifecycle.js +0 -1
- package/src/missions/store.d.ts +0 -1
- package/src/missions/store.js +0 -1
- package/src/missions/types.d.ts +0 -1
- package/src/missions/types.js +0 -1
- package/src/missions/workflow-state.d.ts +0 -1
- package/src/missions/workflow-state.js +0 -1
- package/src/policy/authority.d.ts +0 -1
- package/src/policy/authority.js +0 -1
- package/src/profiles/profiles.d.ts +0 -1
- package/src/profiles/profiles.js +0 -1
- package/src/runs/background/active-async-capacity.d.ts +0 -1
- package/src/runs/background/active-async-capacity.js +0 -1
- package/src/runs/background/active-run-index.d.ts +0 -1
- package/src/runs/background/active-run-index.js +0 -1
- package/src/runs/background/async-execution.d.ts +0 -1
- package/src/runs/background/async-execution.js +0 -1
- package/src/runs/background/async-job-tracker.d.ts +0 -1
- package/src/runs/background/async-job-tracker.js +0 -1
- package/src/runs/background/async-resume.d.ts +0 -1
- package/src/runs/background/async-resume.js +0 -1
- package/src/runs/background/async-retention.d.ts +0 -1
- package/src/runs/background/async-retention.js +0 -1
- package/src/runs/background/async-status-snapshot.d.ts +0 -1
- package/src/runs/background/async-status-snapshot.js +0 -1
- package/src/runs/background/async-status.d.ts +0 -1
- package/src/runs/background/async-status.js +0 -1
- package/src/runs/background/auto-drain.d.ts +0 -1
- package/src/runs/background/auto-drain.js +0 -1
- package/src/runs/background/await-async-run.d.ts +0 -1
- package/src/runs/background/await-async-run.js +0 -1
- package/src/runs/background/binary-bootstrap.d.ts +0 -1
- package/src/runs/background/binary-bootstrap.js +0 -1
- package/src/runs/background/calendar-schedule.d.ts +0 -1
- package/src/runs/background/calendar-schedule.js +0 -1
- package/src/runs/background/chain-append.d.ts +0 -1
- package/src/runs/background/chain-append.js +0 -1
- package/src/runs/background/chain-root-attachment.d.ts +0 -1
- package/src/runs/background/chain-root-attachment.js +0 -1
- package/src/runs/background/completion-batcher.d.ts +0 -1
- package/src/runs/background/completion-batcher.js +0 -1
- package/src/runs/background/completion-dedupe.d.ts +0 -1
- package/src/runs/background/completion-dedupe.js +0 -1
- package/src/runs/background/completion-replay.d.ts +0 -1
- package/src/runs/background/completion-replay.js +0 -1
- package/src/runs/background/control-channel.d.ts +0 -1
- package/src/runs/background/control-channel.js +0 -1
- package/src/runs/background/fleet-view.d.ts +0 -1
- package/src/runs/background/fleet-view.js +0 -1
- package/src/runs/background/index-segment.d.ts +0 -1
- package/src/runs/background/index-segment.js +0 -1
- package/src/runs/background/inspect-rpc.d.ts +0 -1
- package/src/runs/background/inspect-rpc.js +0 -1
- package/src/runs/background/notify.d.ts +1 -2
- package/src/runs/background/notify.js +3 -4
- package/src/runs/background/owned-process-tree.d.ts +0 -1
- package/src/runs/background/owned-process-tree.js +0 -1
- package/src/runs/background/parallel-groups.d.ts +0 -1
- package/src/runs/background/parallel-groups.js +0 -1
- package/src/runs/background/pid-namespace.d.ts +0 -1
- package/src/runs/background/pid-namespace.js +0 -1
- package/src/runs/background/process-terminal-candidate.d.ts +0 -1
- package/src/runs/background/process-terminal-candidate.js +0 -1
- package/src/runs/background/process-terminal.d.ts +0 -1
- package/src/runs/background/process-terminal.js +0 -1
- package/src/runs/background/result-delivery-ownership.d.ts +0 -1
- package/src/runs/background/result-delivery-ownership.js +0 -1
- package/src/runs/background/result-files.d.ts +0 -1
- package/src/runs/background/result-files.js +0 -1
- package/src/runs/background/result-watcher.d.ts +0 -1
- package/src/runs/background/result-watcher.js +0 -1
- package/src/runs/background/resume-guidance.d.ts +0 -1
- package/src/runs/background/resume-guidance.js +0 -1
- package/src/runs/background/retained-children.d.ts +0 -1
- package/src/runs/background/retained-children.js +0 -1
- package/src/runs/background/retained-nested-route-tracker.d.ts +0 -1
- package/src/runs/background/retained-nested-route-tracker.js +0 -1
- package/src/runs/background/run-child-session.d.ts +0 -1
- package/src/runs/background/run-child-session.js +18 -1
- package/src/runs/background/run-id-query.d.ts +0 -1
- package/src/runs/background/run-id-query.js +0 -1
- package/src/runs/background/run-id-resolver.d.ts +0 -1
- package/src/runs/background/run-id-resolver.js +0 -1
- package/src/runs/background/run-status.d.ts +0 -1
- package/src/runs/background/run-status.js +0 -1
- package/src/runs/background/runner-aliases.d.ts +0 -1
- package/src/runs/background/runner-aliases.js +0 -1
- package/src/runs/background/runner-child-launch.d.ts +0 -1
- package/src/runs/background/runner-child-launch.js +0 -1
- package/src/runs/background/runner-child-sessions.d.ts +0 -1
- package/src/runs/background/runner-child-sessions.js +0 -1
- package/src/runs/background/runner-http-dispatcher.d.ts +0 -1
- package/src/runs/background/runner-http-dispatcher.js +0 -1
- package/src/runs/background/runner-startup-failure.d.ts +0 -1
- package/src/runs/background/runner-startup-failure.js +0 -1
- package/src/runs/background/scheduled-runs.d.ts +0 -1
- package/src/runs/background/scheduled-runs.js +0 -1
- package/src/runs/background/stale-run-reconciler.d.ts +0 -1
- package/src/runs/background/stale-run-reconciler.js +2 -1
- package/src/runs/background/steering.d.ts +0 -1
- package/src/runs/background/steering.js +0 -1
- package/src/runs/background/subagent-runner-bootstrap.d.ts +0 -1
- package/src/runs/background/subagent-runner-bootstrap.js +0 -1
- package/src/runs/background/subagent-runner.d.ts +0 -1
- package/src/runs/background/subagent-runner.js +0 -1
- package/src/runs/background/subagent-wait.d.ts +0 -1
- package/src/runs/background/subagent-wait.js +0 -1
- package/src/runs/background/terminal-run-index.d.ts +0 -1
- package/src/runs/background/terminal-run-index.js +0 -1
- package/src/runs/background/top-level-async.d.ts +0 -1
- package/src/runs/background/top-level-async.js +0 -1
- package/src/runs/background/wait-completions.d.ts +0 -1
- package/src/runs/background/wait-completions.js +0 -1
- package/src/runs/background/wait-config.d.ts +0 -1
- package/src/runs/background/wait-config.js +0 -1
- package/src/runs/background/wait-subscriptions.d.ts +0 -1
- package/src/runs/background/wait-subscriptions.js +4 -2
- package/src/runs/background/wait-tool.d.ts +0 -1
- package/src/runs/background/wait-tool.js +0 -1
- package/src/runs/background/workflow-terminal-proof.d.ts +0 -1
- package/src/runs/background/workflow-terminal-proof.js +0 -1
- package/src/runs/foreground/async-dismiss-action.d.ts +0 -1
- package/src/runs/foreground/async-dismiss-action.js +0 -1
- package/src/runs/foreground/async-steering-action.d.ts +0 -1
- package/src/runs/foreground/async-steering-action.js +0 -1
- package/src/runs/foreground/async-stop-action.d.ts +0 -1
- package/src/runs/foreground/async-stop-action.js +0 -1
- package/src/runs/foreground/command-action.d.ts +0 -1
- package/src/runs/foreground/command-action.js +0 -1
- package/src/runs/foreground/execution.d.ts +0 -1
- package/src/runs/foreground/execution.js +39 -3
- package/src/runs/foreground/foreground-control.d.ts +0 -1
- package/src/runs/foreground/foreground-control.js +0 -1
- package/src/runs/foreground/foreground-history.d.ts +0 -1
- package/src/runs/foreground/foreground-history.js +0 -1
- package/src/runs/foreground/prompt-audit.d.ts +0 -1
- package/src/runs/foreground/prompt-audit.js +0 -1
- package/src/runs/foreground/subagent-executor.d.ts +0 -1
- package/src/runs/foreground/subagent-executor.js +6 -4
- package/src/runs/foreground/workflow-detach-reconcile.d.ts +0 -1
- package/src/runs/foreground/workflow-detach-reconcile.js +0 -1
- package/src/runs/foreground/workflow-foreground-steering.d.ts +0 -1
- package/src/runs/foreground/workflow-foreground-steering.js +0 -1
- package/src/runs/shared/abort-recovery.d.ts +0 -1
- package/src/runs/shared/abort-recovery.js +0 -1
- package/src/runs/shared/acceptance.d.ts +0 -1
- package/src/runs/shared/acceptance.js +0 -1
- package/src/runs/shared/agent-contract.d.ts +0 -1
- package/src/runs/shared/agent-contract.js +0 -1
- package/src/runs/shared/async-status-projection.d.ts +0 -1
- package/src/runs/shared/async-status-projection.js +0 -1
- package/src/runs/shared/background-process-options.d.ts +0 -1
- package/src/runs/shared/background-process-options.js +0 -1
- package/src/runs/shared/capability-ceiling.d.ts +0 -1
- package/src/runs/shared/capability-ceiling.js +0 -1
- package/src/runs/shared/chain-outputs.d.ts +0 -1
- package/src/runs/shared/chain-outputs.js +0 -1
- package/src/runs/shared/child-commands.d.ts +0 -1
- package/src/runs/shared/child-commands.js +2 -2
- package/src/runs/shared/child-hooks.d.ts +0 -1
- package/src/runs/shared/child-hooks.js +0 -1
- package/src/runs/shared/child-identity.d.ts +0 -1
- package/src/runs/shared/child-identity.js +0 -1
- package/src/runs/shared/child-launch-plan.d.ts +0 -1
- package/src/runs/shared/child-launch-plan.js +0 -1
- package/src/runs/shared/child-launch.d.ts +0 -1
- package/src/runs/shared/child-launch.js +0 -1
- package/src/runs/shared/child-lifecycle.d.ts +0 -1
- package/src/runs/shared/child-lifecycle.js +0 -1
- package/src/runs/shared/child-runtime-config.d.ts +0 -1
- package/src/runs/shared/child-runtime-config.js +0 -1
- package/src/runs/shared/child-session.d.ts +0 -1
- package/src/runs/shared/child-session.js +2 -3
- package/src/runs/shared/child-tool-plan.d.ts +0 -1
- package/src/runs/shared/child-tool-plan.js +0 -1
- package/src/runs/shared/claude-code-adapter.d.ts +0 -1
- package/src/runs/shared/claude-code-adapter.js +0 -1
- package/src/runs/shared/codex-exec-adapter.d.ts +0 -1
- package/src/runs/shared/codex-exec-adapter.js +0 -1
- package/src/runs/shared/context-mode.d.ts +0 -1
- package/src/runs/shared/context-mode.js +0 -1
- package/src/runs/shared/cursor-agent-adapter.d.ts +0 -1
- package/src/runs/shared/cursor-agent-adapter.js +0 -1
- package/src/runs/shared/dynamic-fanout.d.ts +0 -1
- package/src/runs/shared/dynamic-fanout.js +0 -1
- package/src/runs/shared/effective-system-prompt.d.ts +0 -1
- package/src/runs/shared/effective-system-prompt.js +0 -1
- package/src/runs/shared/extension-bindings.d.ts +0 -1
- package/src/runs/shared/extension-bindings.js +0 -1
- package/src/runs/shared/external-cli-contract.d.ts +0 -1
- package/src/runs/shared/external-cli-contract.js +0 -1
- package/src/runs/shared/external-cli-preflight.d.ts +0 -1
- package/src/runs/shared/external-cli-preflight.js +0 -1
- package/src/runs/shared/external-cli-runner.d.ts +0 -1
- package/src/runs/shared/external-cli-runner.js +0 -1
- package/src/runs/shared/external-job-bridge.d.ts +0 -1
- package/src/runs/shared/external-job-bridge.js +0 -1
- package/src/runs/shared/external-job-runner.d.ts +0 -1
- package/src/runs/shared/external-job-runner.js +0 -1
- package/src/runs/shared/fast-mode-extension.d.ts +0 -1
- package/src/runs/shared/fast-mode-extension.js +0 -1
- package/src/runs/shared/git-environment.d.ts +0 -1
- package/src/runs/shared/git-environment.js +0 -1
- package/src/runs/shared/herdr-connection.d.ts +0 -1
- package/src/runs/shared/herdr-connection.js +0 -1
- package/src/runs/shared/herdr-external-adapters.d.ts +0 -1
- package/src/runs/shared/herdr-external-adapters.js +0 -1
- package/src/runs/shared/herdr-machine.d.ts +0 -1
- package/src/runs/shared/herdr-machine.js +0 -1
- package/src/runs/shared/herdr-pi-protocol.d.ts +0 -1
- package/src/runs/shared/herdr-pi-protocol.js +0 -1
- package/src/runs/shared/herdr-placed-run.d.ts +0 -1
- package/src/runs/shared/herdr-placed-run.js +0 -1
- package/src/runs/shared/host-step-status.d.ts +0 -1
- package/src/runs/shared/host-step-status.js +0 -1
- package/src/runs/shared/lane-metadata.d.ts +0 -1
- package/src/runs/shared/lane-metadata.js +0 -1
- package/src/runs/shared/launch-cwd.d.ts +0 -1
- package/src/runs/shared/launch-cwd.js +0 -1
- package/src/runs/shared/long-running-guard.d.ts +0 -1
- package/src/runs/shared/long-running-guard.js +0 -1
- package/src/runs/shared/mcp-config-sources.d.ts +0 -1
- package/src/runs/shared/mcp-config-sources.js +0 -1
- package/src/runs/shared/mcp-direct-tool-allowlist.d.ts +0 -1
- package/src/runs/shared/mcp-direct-tool-allowlist.js +0 -1
- package/src/runs/shared/mcp-direct-tool-grant.d.ts +0 -1
- package/src/runs/shared/mcp-direct-tool-grant.js +0 -1
- package/src/runs/shared/model-resolution-diagnostic.d.ts +0 -1
- package/src/runs/shared/model-resolution-diagnostic.js +0 -1
- package/src/runs/shared/model-resolution.d.ts +0 -1
- package/src/runs/shared/model-resolution.js +0 -1
- package/src/runs/shared/model-scope.d.ts +0 -1
- package/src/runs/shared/model-scope.js +0 -1
- package/src/runs/shared/mutation-evidence.d.ts +0 -1
- package/src/runs/shared/mutation-evidence.js +0 -1
- package/src/runs/shared/nested-events.d.ts +0 -1
- package/src/runs/shared/nested-events.js +0 -1
- package/src/runs/shared/nested-path.d.ts +0 -1
- package/src/runs/shared/nested-path.js +0 -1
- package/src/runs/shared/nested-render.d.ts +0 -1
- package/src/runs/shared/nested-render.js +0 -1
- package/src/runs/shared/orca-progress-tabs.d.ts +0 -1
- package/src/runs/shared/orca-progress-tabs.js +0 -1
- package/src/runs/shared/parallel-handoff.d.ts +0 -1
- package/src/runs/shared/parallel-handoff.js +0 -1
- package/src/runs/shared/parallel-utils.d.ts +0 -1
- package/src/runs/shared/parallel-utils.js +0 -1
- package/src/runs/shared/partial-output.d.ts +0 -1
- package/src/runs/shared/partial-output.js +0 -1
- package/src/runs/shared/permissions.d.ts +0 -1
- package/src/runs/shared/permissions.js +0 -1
- package/src/runs/shared/pi-spawn.d.ts +0 -1
- package/src/runs/shared/pi-spawn.js +0 -1
- package/src/runs/shared/process-signal.d.ts +0 -1
- package/src/runs/shared/process-signal.js +0 -1
- package/src/runs/shared/readonly-drain-observation.d.ts +0 -1
- package/src/runs/shared/readonly-drain-observation.js +0 -1
- package/src/runs/shared/run-fanout-budget.d.ts +0 -1
- package/src/runs/shared/run-fanout-budget.js +0 -1
- package/src/runs/shared/run-ownership.d.ts +0 -1
- package/src/runs/shared/run-ownership.js +0 -1
- package/src/runs/shared/runner-launcher.d.ts +0 -1
- package/src/runs/shared/runner-launcher.js +0 -1
- package/src/runs/shared/runtime-acknowledged-extensions.d.ts +0 -1
- package/src/runs/shared/runtime-acknowledged-extensions.js +0 -1
- package/src/runs/shared/session-lease.d.ts +0 -1
- package/src/runs/shared/session-lease.js +0 -1
- package/src/runs/shared/single-output.d.ts +0 -1
- package/src/runs/shared/single-output.js +0 -1
- package/src/runs/shared/spawn-budget.d.ts +0 -1
- package/src/runs/shared/spawn-budget.js +0 -1
- package/src/runs/shared/structured-output.d.ts +1 -1
- package/src/runs/shared/structured-output.js +1 -1
- package/src/runs/shared/subagent-control.d.ts +0 -1
- package/src/runs/shared/subagent-control.js +0 -1
- package/src/runs/shared/subagent-prompt-runtime.d.ts +0 -1
- package/src/runs/shared/subagent-prompt-runtime.js +2 -2
- package/src/runs/shared/tool-availability.d.ts +0 -1
- package/src/runs/shared/tool-availability.js +0 -1
- package/src/runs/shared/tool-budget.d.ts +0 -1
- package/src/runs/shared/tool-budget.js +0 -1
- package/src/runs/shared/tool-timeout.d.ts +0 -1
- package/src/runs/shared/tool-timeout.js +0 -1
- package/src/runs/shared/usage-budget.d.ts +0 -1
- package/src/runs/shared/usage-budget.js +0 -1
- package/src/runs/shared/usage-reconciliation.d.ts +0 -1
- package/src/runs/shared/usage-reconciliation.js +0 -1
- package/src/runs/shared/workflow-async-child-guidance.d.ts +0 -1
- package/src/runs/shared/workflow-async-child-guidance.js +0 -1
- package/src/runs/shared/workflow-graph.d.ts +0 -1
- package/src/runs/shared/workflow-graph.js +0 -1
- package/src/runs/shared/worktree-cleanup-apply.d.ts +0 -1
- package/src/runs/shared/worktree-cleanup-apply.js +0 -1
- package/src/runs/shared/worktree-cleanup-plan.d.ts +0 -1
- package/src/runs/shared/worktree-cleanup-plan.js +0 -1
- package/src/runs/shared/worktree-lock.d.ts +0 -1
- package/src/runs/shared/worktree-lock.js +0 -1
- package/src/runs/shared/worktree-setup-command.d.ts +0 -1
- package/src/runs/shared/worktree-setup-command.js +0 -1
- package/src/runs/shared/worktree.d.ts +0 -1
- package/src/runs/shared/worktree.js +0 -1
- package/src/shared/accessible-dir.d.ts +0 -1
- package/src/shared/accessible-dir.js +4 -2
- package/src/shared/agent-stream-options.d.ts +0 -1
- package/src/shared/agent-stream-options.js +0 -1
- package/src/shared/artifacts.d.ts +0 -1
- package/src/shared/artifacts.js +0 -1
- package/src/shared/atomic-json.d.ts +0 -1
- package/src/shared/atomic-json.js +0 -1
- package/src/shared/capacity-resilient-json.d.ts +0 -1
- package/src/shared/capacity-resilient-json.js +0 -1
- package/src/shared/child-cache-retention.d.ts +0 -1
- package/src/shared/child-cache-retention.js +0 -1
- package/src/shared/child-session-name.d.ts +0 -1
- package/src/shared/child-session-name.js +0 -1
- package/src/shared/child-transcript.d.ts +0 -1
- package/src/shared/child-transcript.js +0 -1
- package/src/shared/completion-owner.d.ts +0 -1
- package/src/shared/completion-owner.js +0 -1
- package/src/shared/disabled-features.d.ts +0 -1
- package/src/shared/disabled-features.js +0 -1
- package/src/shared/display-text.d.ts +0 -1
- package/src/shared/display-text.js +0 -1
- package/src/shared/edit-distance.d.ts +0 -1
- package/src/shared/edit-distance.js +0 -1
- package/src/shared/extension-context.d.ts +0 -1
- package/src/shared/extension-context.js +0 -1
- package/src/shared/file-coalescer.d.ts +0 -1
- package/src/shared/file-coalescer.js +0 -1
- package/src/shared/file-lease.d.ts +0 -1
- package/src/shared/file-lease.js +0 -1
- package/src/shared/file-system-retry.d.ts +0 -1
- package/src/shared/file-system-retry.js +0 -1
- package/src/shared/fork-context.d.ts +0 -1
- package/src/shared/fork-context.js +0 -1
- package/src/shared/fork-session-cwd.d.ts +0 -1
- package/src/shared/fork-session-cwd.js +0 -1
- package/src/shared/formatters.d.ts +0 -1
- package/src/shared/formatters.js +0 -1
- package/src/shared/jsonl-writer.d.ts +0 -1
- package/src/shared/jsonl-writer.js +0 -1
- package/src/shared/launch-contract.d.ts +0 -1
- package/src/shared/launch-contract.js +0 -1
- package/src/shared/model-info.d.ts +0 -1
- package/src/shared/model-info.js +0 -1
- package/src/shared/model-response-aliases.d.ts +0 -1
- package/src/shared/model-response-aliases.js +0 -1
- package/src/shared/node-executable.d.ts +0 -1
- package/src/shared/node-executable.js +0 -1
- package/src/shared/opencode-session-headers.d.ts +0 -1
- package/src/shared/opencode-session-headers.js +0 -1
- package/src/shared/package-version.d.ts +0 -1
- package/src/shared/package-version.js +0 -1
- package/src/shared/parent-wake.d.ts +9 -7
- package/src/shared/parent-wake.js +12 -15
- package/src/shared/prompt-resources.d.ts +0 -1
- package/src/shared/prompt-resources.js +0 -1
- package/src/shared/provider-diagnostics.d.ts +9 -0
- package/src/shared/provider-diagnostics.js +75 -0
- package/src/shared/pruned-fork.d.ts +0 -1
- package/src/shared/pruned-fork.js +0 -1
- package/src/shared/required-child-extensions.d.ts +0 -1
- package/src/shared/required-child-extensions.js +0 -1
- package/src/shared/runtime-module-path.d.ts +0 -1
- package/src/shared/runtime-module-path.js +0 -1
- package/src/shared/session-file-trust.d.ts +0 -1
- package/src/shared/session-file-trust.js +0 -1
- package/src/shared/session-identity.d.ts +0 -1
- package/src/shared/session-identity.js +0 -1
- package/src/shared/session-succession.d.ts +0 -1
- package/src/shared/session-succession.js +0 -1
- package/src/shared/session-tokens.d.ts +0 -1
- package/src/shared/session-tokens.js +0 -1
- package/src/shared/settings-file-lease.d.ts +0 -1
- package/src/shared/settings-file-lease.js +0 -1
- package/src/shared/settings.d.ts +0 -1
- package/src/shared/settings.js +0 -1
- package/src/shared/shortcuts.d.ts +0 -1
- package/src/shared/shortcuts.js +0 -1
- package/src/shared/status-format.d.ts +0 -1
- package/src/shared/status-format.js +0 -1
- package/src/shared/thinking-ceiling.d.ts +0 -1
- package/src/shared/thinking-ceiling.js +0 -1
- package/src/shared/types.d.ts +5 -1
- package/src/shared/types.js +0 -1
- package/src/shared/utf8.d.ts +0 -1
- package/src/shared/utf8.js +0 -1
- package/src/shared/utils.d.ts +0 -1
- package/src/shared/utils.js +0 -1
- package/src/shared/watch-strategy.d.ts +0 -1
- package/src/shared/watch-strategy.js +0 -1
- package/src/shared/workflow-child-permit.d.ts +0 -1
- package/src/shared/workflow-child-permit.js +0 -1
- package/src/slash/delegation-adapters.d.ts +3 -2
- package/src/slash/delegation-adapters.js +7 -1
- package/src/slash/delegation-json.d.ts +0 -1
- package/src/slash/delegation-json.js +0 -1
- package/src/slash/delegation-request.d.ts +0 -1
- package/src/slash/delegation-request.js +0 -1
- package/src/slash/prompt-template-bridge.d.ts +0 -1
- package/src/slash/prompt-template-bridge.js +3 -2
- package/src/slash/prompt-workflows.d.ts +0 -1
- package/src/slash/prompt-workflows.js +0 -1
- package/src/slash/selector.d.ts +0 -1
- package/src/slash/selector.js +0 -1
- package/src/slash/slash-bridge.d.ts +0 -1
- package/src/slash/slash-bridge.js +0 -1
- package/src/slash/slash-commands.d.ts +0 -1
- package/src/slash/slash-commands.js +1 -2
- package/src/slash/slash-live-state.d.ts +0 -1
- package/src/slash/slash-live-state.js +0 -1
- package/src/slash/subagent-cost.d.ts +0 -1
- package/src/slash/subagent-cost.js +0 -1
- package/src/slash/subagents-admin.d.ts +1 -1
- package/src/slash/subagents-admin.js +1 -2
- package/src/tui/fleet-layout.d.ts +20 -0
- package/src/tui/fleet-layout.js +17 -0
- package/src/tui/fleet-status.d.ts +0 -1
- package/src/tui/fleet-status.js +0 -1
- package/src/tui/fleet-transcript.d.ts +0 -1
- package/src/tui/fleet-transcript.js +0 -1
- package/src/tui/fleet-viewport.d.ts +12 -0
- package/src/tui/fleet-viewport.js +35 -0
- package/src/tui/fleet.d.ts +5 -7
- package/src/tui/fleet.js +69 -52
- package/src/tui/render-helpers.d.ts +0 -1
- package/src/tui/render-helpers.js +0 -1
- package/src/tui/render.d.ts +0 -1
- package/src/tui/render.js +48 -18
- package/src/tui/running-tone.d.ts +0 -1
- package/src/tui/running-tone.js +0 -1
- package/src/tui/subagent-messages.d.ts +0 -1
- package/src/tui/subagent-messages.js +0 -1
- package/src/watchdog/change-signature.d.ts +0 -1
- package/src/watchdog/change-signature.js +0 -1
- package/src/watchdog/child-status.d.ts +0 -1
- package/src/watchdog/child-status.js +0 -1
- package/src/watchdog/diff-tool.d.ts +0 -1
- package/src/watchdog/diff-tool.js +9 -4
- package/src/watchdog/emission-guard.d.ts +0 -1
- package/src/watchdog/emission-guard.js +0 -1
- package/src/watchdog/guidance.d.ts +0 -1
- package/src/watchdog/guidance.js +0 -1
- package/src/watchdog/lsp-diagnostics.d.ts +0 -1
- package/src/watchdog/lsp-diagnostics.js +0 -1
- package/src/watchdog/model-selection.d.ts +0 -1
- package/src/watchdog/model-selection.js +0 -1
- package/src/watchdog/permission-arbiter.d.ts +0 -1
- package/src/watchdog/permission-arbiter.js +0 -1
- package/src/watchdog/register-child.d.ts +0 -1
- package/src/watchdog/register-child.js +0 -1
- package/src/watchdog/register-main.d.ts +2 -1
- package/src/watchdog/register-main.js +8 -8
- package/src/watchdog/render.d.ts +0 -1
- package/src/watchdog/render.js +0 -1
- package/src/watchdog/review.d.ts +0 -1
- package/src/watchdog/review.js +0 -1
- package/src/watchdog/rules.d.ts +0 -1
- package/src/watchdog/rules.js +0 -1
- package/src/watchdog/runtime.d.ts +0 -1
- package/src/watchdog/runtime.js +0 -1
- package/src/watchdog/scope.d.ts +0 -1
- package/src/watchdog/scope.js +0 -1
- package/src/watchdog/settings.d.ts +0 -1
- package/src/watchdog/settings.js +0 -1
- package/src/watchdog/tool-actions.d.ts +0 -1
- package/src/watchdog/tool-actions.js +0 -1
- package/src/watchdog/turn-delta.d.ts +0 -1
- package/src/watchdog/turn-delta.js +0 -1
- package/src/watchdog/types.d.ts +0 -1
- package/src/watchdog/types.js +0 -1
- package/src/watchdog/warning-format.d.ts +0 -1
- package/src/watchdog/warning-format.js +0 -1
- package/src/workflows/chat-progress.d.ts +0 -1
- package/src/workflows/chat-progress.js +0 -1
- package/src/workflows/host-command.d.ts +0 -1
- package/src/workflows/host-command.js +0 -1
- package/src/workflows/scripted-workflow.d.ts +0 -1
- package/src/workflows/scripted-workflow.js +0 -1
- package/src/workflows/structured-workflow-scripts.d.ts +1 -1
- package/src/workflows/structured-workflow-scripts.js +22 -9
- package/src/workflows/workflow-checklist.d.ts +0 -1
- package/src/workflows/workflow-checklist.js +0 -1
- package/src/workflows/workflow-child-summary.d.ts +0 -1
- package/src/workflows/workflow-child-summary.js +0 -1
- package/src/workflows/workflow-preflight.d.ts +0 -1
- package/src/workflows/workflow-preflight.js +0 -1
- package/src/workflows/workflow-receipt.d.ts +0 -1
- package/src/workflows/workflow-receipt.js +0 -1
- package/src/workflows/workflow-resources.d.ts +0 -1
- package/src/workflows/workflow-resources.js +2 -3
- package/src/workflows/workflow-reuse.d.ts +0 -1
- package/src/workflows/workflow-reuse.js +0 -1
- package/src/workflows/workflow-revival.d.ts +0 -1
- package/src/workflows/workflow-revival.js +0 -1
- package/src/workflows/workflow-settlement.d.ts +0 -1
- package/src/workflows/workflow-settlement.js +0 -1
- package/index.d.ts.map +0 -1
- package/index.js.map +0 -1
- package/src/agents/advertised-agent-prompt.d.ts.map +0 -1
- package/src/agents/advertised-agent-prompt.js.map +0 -1
- package/src/agents/agent-management.d.ts.map +0 -1
- package/src/agents/agent-management.js.map +0 -1
- package/src/agents/agent-memory.d.ts.map +0 -1
- package/src/agents/agent-memory.js.map +0 -1
- package/src/agents/agent-refinements.d.ts.map +0 -1
- package/src/agents/agent-refinements.js.map +0 -1
- package/src/agents/agent-scope.d.ts.map +0 -1
- package/src/agents/agent-scope.js.map +0 -1
- package/src/agents/agent-selection.d.ts.map +0 -1
- package/src/agents/agent-selection.js.map +0 -1
- package/src/agents/agent-serializer.d.ts.map +0 -1
- package/src/agents/agent-serializer.js.map +0 -1
- package/src/agents/agents.d.ts.map +0 -1
- package/src/agents/agents.js.map +0 -1
- package/src/agents/builtin-names.d.ts.map +0 -1
- package/src/agents/builtin-names.js.map +0 -1
- package/src/agents/chain-serializer.d.ts.map +0 -1
- package/src/agents/chain-serializer.js.map +0 -1
- package/src/agents/frontmatter.d.ts.map +0 -1
- package/src/agents/frontmatter.js.map +0 -1
- package/src/agents/global-npm-root.d.ts.map +0 -1
- package/src/agents/global-npm-root.js.map +0 -1
- package/src/agents/identity.d.ts.map +0 -1
- package/src/agents/identity.js.map +0 -1
- package/src/agents/proactive-skills.d.ts.map +0 -1
- package/src/agents/proactive-skills.js.map +0 -1
- package/src/agents/runtime-agent-events.d.ts.map +0 -1
- package/src/agents/runtime-agent-events.js.map +0 -1
- package/src/agents/runtime-agent-registry.d.ts.map +0 -1
- package/src/agents/runtime-agent-registry.js.map +0 -1
- package/src/agents/skills.d.ts.map +0 -1
- package/src/agents/skills.js.map +0 -1
- package/src/api/agents.d.ts.map +0 -1
- package/src/api/agents.js.map +0 -1
- package/src/api/background-work.d.ts.map +0 -1
- package/src/api/background-work.js.map +0 -1
- package/src/api/capability-ceiling.d.ts.map +0 -1
- package/src/api/capability-ceiling.js.map +0 -1
- package/src/api/child-tool-plan.d.ts.map +0 -1
- package/src/api/child-tool-plan.js.map +0 -1
- package/src/api/control-channel.d.ts.map +0 -1
- package/src/api/control-channel.js.map +0 -1
- package/src/api/delegation.d.ts.map +0 -1
- package/src/api/delegation.js.map +0 -1
- package/src/api/external-job-provider.d.ts.map +0 -1
- package/src/api/external-job-provider.js.map +0 -1
- package/src/api/external-runs.d.ts.map +0 -1
- package/src/api/external-runs.js.map +0 -1
- package/src/api/inspectors.d.ts.map +0 -1
- package/src/api/inspectors.js.map +0 -1
- package/src/api/intercom-bridge.d.ts.map +0 -1
- package/src/api/intercom-bridge.js.map +0 -1
- package/src/api/preflight.d.ts.map +0 -1
- package/src/api/preflight.js.map +0 -1
- package/src/api/project-panes.d.ts.map +0 -1
- package/src/api/project-panes.js.map +0 -1
- package/src/api/required-child-extensions.d.ts.map +0 -1
- package/src/api/required-child-extensions.js.map +0 -1
- package/src/api/shared-types.d.ts.map +0 -1
- package/src/api/shared-types.js.map +0 -1
- package/src/api/workflow-resources.d.ts.map +0 -1
- package/src/api/workflow-resources.js.map +0 -1
- package/src/extension/active-runs-prompt.d.ts.map +0 -1
- package/src/extension/active-runs-prompt.js.map +0 -1
- package/src/extension/config.d.ts.map +0 -1
- package/src/extension/config.js.map +0 -1
- package/src/extension/control-notices.d.ts.map +0 -1
- package/src/extension/control-notices.js.map +0 -1
- package/src/extension/declaration-pinning.d.ts.map +0 -1
- package/src/extension/declaration-pinning.js.map +0 -1
- package/src/extension/doctor.d.ts.map +0 -1
- package/src/extension/doctor.js.map +0 -1
- package/src/extension/fanout-child.d.ts.map +0 -1
- package/src/extension/fanout-child.js.map +0 -1
- package/src/extension/herdr-pi-bridge.d.ts.map +0 -1
- package/src/extension/herdr-pi-bridge.js.map +0 -1
- package/src/extension/index.d.ts.map +0 -1
- package/src/extension/index.js.map +0 -1
- package/src/extension/public-execution.d.ts.map +0 -1
- package/src/extension/public-execution.js.map +0 -1
- package/src/extension/reply-workflow-script.d.ts.map +0 -1
- package/src/extension/reply-workflow-script.js.map +0 -1
- package/src/extension/rpc.d.ts.map +0 -1
- package/src/extension/rpc.js.map +0 -1
- package/src/extension/schemas.d.ts.map +0 -1
- package/src/extension/schemas.js.map +0 -1
- package/src/extension/steering-notices.d.ts.map +0 -1
- package/src/extension/steering-notices.js.map +0 -1
- package/src/extension/subagent-guide.d.ts.map +0 -1
- package/src/extension/subagent-guide.js.map +0 -1
- package/src/extension/subagent-options.d.ts.map +0 -1
- package/src/extension/subagent-options.js.map +0 -1
- package/src/extension/tool-activation.d.ts.map +0 -1
- package/src/extension/tool-activation.js.map +0 -1
- package/src/extension/tool-description.d.ts.map +0 -1
- package/src/extension/tool-description.js.map +0 -1
- package/src/extension/tool-result.d.ts.map +0 -1
- package/src/extension/tool-result.js.map +0 -1
- package/src/extension/upgrade-notice.d.ts.map +0 -1
- package/src/extension/upgrade-notice.js.map +0 -1
- package/src/inspectors/actions.d.ts.map +0 -1
- package/src/inspectors/actions.js.map +0 -1
- package/src/inspectors/ghostty/actions.d.ts.map +0 -1
- package/src/inspectors/ghostty/actions.js.map +0 -1
- package/src/inspectors/ghostty/plugin.d.ts.map +0 -1
- package/src/inspectors/ghostty/plugin.js.map +0 -1
- package/src/inspectors/herdr/actions.d.ts.map +0 -1
- package/src/inspectors/herdr/actions.js.map +0 -1
- package/src/inspectors/herdr/client.d.ts.map +0 -1
- package/src/inspectors/herdr/client.js.map +0 -1
- package/src/inspectors/herdr/focus.d.ts.map +0 -1
- package/src/inspectors/herdr/focus.js.map +0 -1
- package/src/inspectors/herdr/plugin.d.ts.map +0 -1
- package/src/inspectors/herdr/plugin.js.map +0 -1
- package/src/inspectors/herdr/project-panes.d.ts.map +0 -1
- package/src/inspectors/herdr/project-panes.js.map +0 -1
- package/src/inspectors/inspector-runner.d.ts.map +0 -1
- package/src/inspectors/inspector-runner.js.map +0 -1
- package/src/inspectors/plugins.d.ts.map +0 -1
- package/src/inspectors/plugins.js.map +0 -1
- package/src/inspectors/session-roots-codec.d.ts.map +0 -1
- package/src/inspectors/session-roots-codec.js.map +0 -1
- package/src/inspectors/shell-command.d.ts.map +0 -1
- package/src/inspectors/shell-command.js.map +0 -1
- package/src/inspectors/tmux/actions.d.ts.map +0 -1
- package/src/inspectors/tmux/actions.js.map +0 -1
- package/src/inspectors/tmux/client.d.ts.map +0 -1
- package/src/inspectors/tmux/client.js.map +0 -1
- package/src/inspectors/tmux/plugin.d.ts.map +0 -1
- package/src/inspectors/tmux/plugin.js.map +0 -1
- package/src/inspectors/types.d.ts.map +0 -1
- package/src/inspectors/types.js.map +0 -1
- package/src/integrations/herdr-status.d.ts.map +0 -1
- package/src/integrations/herdr-status.js.map +0 -1
- package/src/integrations/pi-web-session-liveness.d.ts.map +0 -1
- package/src/integrations/pi-web-session-liveness.js.map +0 -1
- package/src/integrations/program-status.d.ts.map +0 -1
- package/src/integrations/program-status.js.map +0 -1
- package/src/intercom/intercom-bridge.d.ts.map +0 -1
- package/src/intercom/intercom-bridge.js.map +0 -1
- package/src/intercom/native-supervisor-channel.d.ts.map +0 -1
- package/src/intercom/native-supervisor-channel.js.map +0 -1
- package/src/intercom/result-intercom.d.ts.map +0 -1
- package/src/intercom/result-intercom.js.map +0 -1
- package/src/intercom/supervisor-ui.d.ts.map +0 -1
- package/src/intercom/supervisor-ui.js.map +0 -1
- package/src/missions/actions.d.ts.map +0 -1
- package/src/missions/actions.js.map +0 -1
- package/src/missions/goal-driver.d.ts.map +0 -1
- package/src/missions/goal-driver.js.map +0 -1
- package/src/missions/lifecycle.d.ts.map +0 -1
- package/src/missions/lifecycle.js.map +0 -1
- package/src/missions/store.d.ts.map +0 -1
- package/src/missions/store.js.map +0 -1
- package/src/missions/types.d.ts.map +0 -1
- package/src/missions/types.js.map +0 -1
- package/src/missions/workflow-state.d.ts.map +0 -1
- package/src/missions/workflow-state.js.map +0 -1
- package/src/policy/authority.d.ts.map +0 -1
- package/src/policy/authority.js.map +0 -1
- package/src/profiles/profiles.d.ts.map +0 -1
- package/src/profiles/profiles.js.map +0 -1
- package/src/runs/background/active-async-capacity.d.ts.map +0 -1
- package/src/runs/background/active-async-capacity.js.map +0 -1
- package/src/runs/background/active-run-index.d.ts.map +0 -1
- package/src/runs/background/active-run-index.js.map +0 -1
- package/src/runs/background/async-execution.d.ts.map +0 -1
- package/src/runs/background/async-execution.js.map +0 -1
- package/src/runs/background/async-job-tracker.d.ts.map +0 -1
- package/src/runs/background/async-job-tracker.js.map +0 -1
- package/src/runs/background/async-resume.d.ts.map +0 -1
- package/src/runs/background/async-resume.js.map +0 -1
- package/src/runs/background/async-retention.d.ts.map +0 -1
- package/src/runs/background/async-retention.js.map +0 -1
- package/src/runs/background/async-status-snapshot.d.ts.map +0 -1
- package/src/runs/background/async-status-snapshot.js.map +0 -1
- package/src/runs/background/async-status.d.ts.map +0 -1
- package/src/runs/background/async-status.js.map +0 -1
- package/src/runs/background/auto-drain.d.ts.map +0 -1
- package/src/runs/background/auto-drain.js.map +0 -1
- package/src/runs/background/await-async-run.d.ts.map +0 -1
- package/src/runs/background/await-async-run.js.map +0 -1
- package/src/runs/background/binary-bootstrap.d.ts.map +0 -1
- package/src/runs/background/binary-bootstrap.js.map +0 -1
- package/src/runs/background/calendar-schedule.d.ts.map +0 -1
- package/src/runs/background/calendar-schedule.js.map +0 -1
- package/src/runs/background/chain-append.d.ts.map +0 -1
- package/src/runs/background/chain-append.js.map +0 -1
- package/src/runs/background/chain-root-attachment.d.ts.map +0 -1
- package/src/runs/background/chain-root-attachment.js.map +0 -1
- package/src/runs/background/completion-batcher.d.ts.map +0 -1
- package/src/runs/background/completion-batcher.js.map +0 -1
- package/src/runs/background/completion-dedupe.d.ts.map +0 -1
- package/src/runs/background/completion-dedupe.js.map +0 -1
- package/src/runs/background/completion-replay.d.ts.map +0 -1
- package/src/runs/background/completion-replay.js.map +0 -1
- package/src/runs/background/control-channel.d.ts.map +0 -1
- package/src/runs/background/control-channel.js.map +0 -1
- package/src/runs/background/fleet-view.d.ts.map +0 -1
- package/src/runs/background/fleet-view.js.map +0 -1
- package/src/runs/background/index-segment.d.ts.map +0 -1
- package/src/runs/background/index-segment.js.map +0 -1
- package/src/runs/background/inspect-rpc.d.ts.map +0 -1
- package/src/runs/background/inspect-rpc.js.map +0 -1
- package/src/runs/background/notify.d.ts.map +0 -1
- package/src/runs/background/notify.js.map +0 -1
- package/src/runs/background/owned-process-tree.d.ts.map +0 -1
- package/src/runs/background/owned-process-tree.js.map +0 -1
- package/src/runs/background/parallel-groups.d.ts.map +0 -1
- package/src/runs/background/parallel-groups.js.map +0 -1
- package/src/runs/background/pid-namespace.d.ts.map +0 -1
- package/src/runs/background/pid-namespace.js.map +0 -1
- package/src/runs/background/process-terminal-candidate.d.ts.map +0 -1
- package/src/runs/background/process-terminal-candidate.js.map +0 -1
- package/src/runs/background/process-terminal.d.ts.map +0 -1
- package/src/runs/background/process-terminal.js.map +0 -1
- package/src/runs/background/result-delivery-ownership.d.ts.map +0 -1
- package/src/runs/background/result-delivery-ownership.js.map +0 -1
- package/src/runs/background/result-files.d.ts.map +0 -1
- package/src/runs/background/result-files.js.map +0 -1
- package/src/runs/background/result-watcher.d.ts.map +0 -1
- package/src/runs/background/result-watcher.js.map +0 -1
- package/src/runs/background/resume-guidance.d.ts.map +0 -1
- package/src/runs/background/resume-guidance.js.map +0 -1
- package/src/runs/background/retained-children.d.ts.map +0 -1
- package/src/runs/background/retained-children.js.map +0 -1
- package/src/runs/background/retained-nested-route-tracker.d.ts.map +0 -1
- package/src/runs/background/retained-nested-route-tracker.js.map +0 -1
- package/src/runs/background/run-child-session.d.ts.map +0 -1
- package/src/runs/background/run-child-session.js.map +0 -1
- package/src/runs/background/run-id-query.d.ts.map +0 -1
- package/src/runs/background/run-id-query.js.map +0 -1
- package/src/runs/background/run-id-resolver.d.ts.map +0 -1
- package/src/runs/background/run-id-resolver.js.map +0 -1
- package/src/runs/background/run-status.d.ts.map +0 -1
- package/src/runs/background/run-status.js.map +0 -1
- package/src/runs/background/runner-aliases.d.ts.map +0 -1
- package/src/runs/background/runner-aliases.js.map +0 -1
- package/src/runs/background/runner-child-launch.d.ts.map +0 -1
- package/src/runs/background/runner-child-launch.js.map +0 -1
- package/src/runs/background/runner-child-sessions.d.ts.map +0 -1
- package/src/runs/background/runner-child-sessions.js.map +0 -1
- package/src/runs/background/runner-http-dispatcher.d.ts.map +0 -1
- package/src/runs/background/runner-http-dispatcher.js.map +0 -1
- package/src/runs/background/runner-startup-failure.d.ts.map +0 -1
- package/src/runs/background/runner-startup-failure.js.map +0 -1
- package/src/runs/background/scheduled-runs.d.ts.map +0 -1
- package/src/runs/background/scheduled-runs.js.map +0 -1
- package/src/runs/background/stale-run-reconciler.d.ts.map +0 -1
- package/src/runs/background/stale-run-reconciler.js.map +0 -1
- package/src/runs/background/steering.d.ts.map +0 -1
- package/src/runs/background/steering.js.map +0 -1
- package/src/runs/background/subagent-runner-bootstrap.d.ts.map +0 -1
- package/src/runs/background/subagent-runner-bootstrap.js.map +0 -1
- package/src/runs/background/subagent-runner.d.ts.map +0 -1
- package/src/runs/background/subagent-runner.js.map +0 -1
- package/src/runs/background/subagent-wait.d.ts.map +0 -1
- package/src/runs/background/subagent-wait.js.map +0 -1
- package/src/runs/background/terminal-run-index.d.ts.map +0 -1
- package/src/runs/background/terminal-run-index.js.map +0 -1
- package/src/runs/background/top-level-async.d.ts.map +0 -1
- package/src/runs/background/top-level-async.js.map +0 -1
- package/src/runs/background/wait-completions.d.ts.map +0 -1
- package/src/runs/background/wait-completions.js.map +0 -1
- package/src/runs/background/wait-config.d.ts.map +0 -1
- package/src/runs/background/wait-config.js.map +0 -1
- package/src/runs/background/wait-subscriptions.d.ts.map +0 -1
- package/src/runs/background/wait-subscriptions.js.map +0 -1
- package/src/runs/background/wait-tool.d.ts.map +0 -1
- package/src/runs/background/wait-tool.js.map +0 -1
- package/src/runs/background/workflow-terminal-proof.d.ts.map +0 -1
- package/src/runs/background/workflow-terminal-proof.js.map +0 -1
- package/src/runs/foreground/async-dismiss-action.d.ts.map +0 -1
- package/src/runs/foreground/async-dismiss-action.js.map +0 -1
- package/src/runs/foreground/async-steering-action.d.ts.map +0 -1
- package/src/runs/foreground/async-steering-action.js.map +0 -1
- package/src/runs/foreground/async-stop-action.d.ts.map +0 -1
- package/src/runs/foreground/async-stop-action.js.map +0 -1
- package/src/runs/foreground/command-action.d.ts.map +0 -1
- package/src/runs/foreground/command-action.js.map +0 -1
- package/src/runs/foreground/execution.d.ts.map +0 -1
- package/src/runs/foreground/execution.js.map +0 -1
- package/src/runs/foreground/foreground-control.d.ts.map +0 -1
- package/src/runs/foreground/foreground-control.js.map +0 -1
- package/src/runs/foreground/foreground-history.d.ts.map +0 -1
- package/src/runs/foreground/foreground-history.js.map +0 -1
- package/src/runs/foreground/prompt-audit.d.ts.map +0 -1
- package/src/runs/foreground/prompt-audit.js.map +0 -1
- package/src/runs/foreground/subagent-executor.d.ts.map +0 -1
- package/src/runs/foreground/subagent-executor.js.map +0 -1
- package/src/runs/foreground/workflow-detach-reconcile.d.ts.map +0 -1
- package/src/runs/foreground/workflow-detach-reconcile.js.map +0 -1
- package/src/runs/foreground/workflow-foreground-steering.d.ts.map +0 -1
- package/src/runs/foreground/workflow-foreground-steering.js.map +0 -1
- package/src/runs/shared/abort-recovery.d.ts.map +0 -1
- package/src/runs/shared/abort-recovery.js.map +0 -1
- package/src/runs/shared/acceptance.d.ts.map +0 -1
- package/src/runs/shared/acceptance.js.map +0 -1
- package/src/runs/shared/agent-contract.d.ts.map +0 -1
- package/src/runs/shared/agent-contract.js.map +0 -1
- package/src/runs/shared/async-status-projection.d.ts.map +0 -1
- package/src/runs/shared/async-status-projection.js.map +0 -1
- package/src/runs/shared/background-process-options.d.ts.map +0 -1
- package/src/runs/shared/background-process-options.js.map +0 -1
- package/src/runs/shared/capability-ceiling.d.ts.map +0 -1
- package/src/runs/shared/capability-ceiling.js.map +0 -1
- package/src/runs/shared/chain-outputs.d.ts.map +0 -1
- package/src/runs/shared/chain-outputs.js.map +0 -1
- package/src/runs/shared/child-commands.d.ts.map +0 -1
- package/src/runs/shared/child-commands.js.map +0 -1
- package/src/runs/shared/child-hooks.d.ts.map +0 -1
- package/src/runs/shared/child-hooks.js.map +0 -1
- package/src/runs/shared/child-identity.d.ts.map +0 -1
- package/src/runs/shared/child-identity.js.map +0 -1
- package/src/runs/shared/child-launch-plan.d.ts.map +0 -1
- package/src/runs/shared/child-launch-plan.js.map +0 -1
- package/src/runs/shared/child-launch.d.ts.map +0 -1
- package/src/runs/shared/child-launch.js.map +0 -1
- package/src/runs/shared/child-lifecycle.d.ts.map +0 -1
- package/src/runs/shared/child-lifecycle.js.map +0 -1
- package/src/runs/shared/child-runtime-config.d.ts.map +0 -1
- package/src/runs/shared/child-runtime-config.js.map +0 -1
- package/src/runs/shared/child-session.d.ts.map +0 -1
- package/src/runs/shared/child-session.js.map +0 -1
- package/src/runs/shared/child-tool-plan.d.ts.map +0 -1
- package/src/runs/shared/child-tool-plan.js.map +0 -1
- package/src/runs/shared/claude-code-adapter.d.ts.map +0 -1
- package/src/runs/shared/claude-code-adapter.js.map +0 -1
- package/src/runs/shared/codex-exec-adapter.d.ts.map +0 -1
- package/src/runs/shared/codex-exec-adapter.js.map +0 -1
- package/src/runs/shared/context-mode.d.ts.map +0 -1
- package/src/runs/shared/context-mode.js.map +0 -1
- package/src/runs/shared/cursor-agent-adapter.d.ts.map +0 -1
- package/src/runs/shared/cursor-agent-adapter.js.map +0 -1
- package/src/runs/shared/dynamic-fanout.d.ts.map +0 -1
- package/src/runs/shared/dynamic-fanout.js.map +0 -1
- package/src/runs/shared/effective-system-prompt.d.ts.map +0 -1
- package/src/runs/shared/effective-system-prompt.js.map +0 -1
- package/src/runs/shared/extension-bindings.d.ts.map +0 -1
- package/src/runs/shared/extension-bindings.js.map +0 -1
- package/src/runs/shared/external-cli-contract.d.ts.map +0 -1
- package/src/runs/shared/external-cli-contract.js.map +0 -1
- package/src/runs/shared/external-cli-preflight.d.ts.map +0 -1
- package/src/runs/shared/external-cli-preflight.js.map +0 -1
- package/src/runs/shared/external-cli-runner.d.ts.map +0 -1
- package/src/runs/shared/external-cli-runner.js.map +0 -1
- package/src/runs/shared/external-job-bridge.d.ts.map +0 -1
- package/src/runs/shared/external-job-bridge.js.map +0 -1
- package/src/runs/shared/external-job-runner.d.ts.map +0 -1
- package/src/runs/shared/external-job-runner.js.map +0 -1
- package/src/runs/shared/fast-mode-extension.d.ts.map +0 -1
- package/src/runs/shared/fast-mode-extension.js.map +0 -1
- package/src/runs/shared/git-environment.d.ts.map +0 -1
- package/src/runs/shared/git-environment.js.map +0 -1
- package/src/runs/shared/herdr-connection.d.ts.map +0 -1
- package/src/runs/shared/herdr-connection.js.map +0 -1
- package/src/runs/shared/herdr-external-adapters.d.ts.map +0 -1
- package/src/runs/shared/herdr-external-adapters.js.map +0 -1
- package/src/runs/shared/herdr-machine.d.ts.map +0 -1
- package/src/runs/shared/herdr-machine.js.map +0 -1
- package/src/runs/shared/herdr-pi-protocol.d.ts.map +0 -1
- package/src/runs/shared/herdr-pi-protocol.js.map +0 -1
- package/src/runs/shared/herdr-placed-run.d.ts.map +0 -1
- package/src/runs/shared/herdr-placed-run.js.map +0 -1
- package/src/runs/shared/host-step-status.d.ts.map +0 -1
- package/src/runs/shared/host-step-status.js.map +0 -1
- package/src/runs/shared/lane-metadata.d.ts.map +0 -1
- package/src/runs/shared/lane-metadata.js.map +0 -1
- package/src/runs/shared/launch-cwd.d.ts.map +0 -1
- package/src/runs/shared/launch-cwd.js.map +0 -1
- package/src/runs/shared/long-running-guard.d.ts.map +0 -1
- package/src/runs/shared/long-running-guard.js.map +0 -1
- package/src/runs/shared/mcp-config-sources.d.ts.map +0 -1
- package/src/runs/shared/mcp-config-sources.js.map +0 -1
- package/src/runs/shared/mcp-direct-tool-allowlist.d.ts.map +0 -1
- package/src/runs/shared/mcp-direct-tool-allowlist.js.map +0 -1
- package/src/runs/shared/mcp-direct-tool-grant.d.ts.map +0 -1
- package/src/runs/shared/mcp-direct-tool-grant.js.map +0 -1
- package/src/runs/shared/model-resolution-diagnostic.d.ts.map +0 -1
- package/src/runs/shared/model-resolution-diagnostic.js.map +0 -1
- package/src/runs/shared/model-resolution.d.ts.map +0 -1
- package/src/runs/shared/model-resolution.js.map +0 -1
- package/src/runs/shared/model-scope.d.ts.map +0 -1
- package/src/runs/shared/model-scope.js.map +0 -1
- package/src/runs/shared/mutation-evidence.d.ts.map +0 -1
- package/src/runs/shared/mutation-evidence.js.map +0 -1
- package/src/runs/shared/nested-events.d.ts.map +0 -1
- package/src/runs/shared/nested-events.js.map +0 -1
- package/src/runs/shared/nested-path.d.ts.map +0 -1
- package/src/runs/shared/nested-path.js.map +0 -1
- package/src/runs/shared/nested-render.d.ts.map +0 -1
- package/src/runs/shared/nested-render.js.map +0 -1
- package/src/runs/shared/orca-progress-tabs.d.ts.map +0 -1
- package/src/runs/shared/orca-progress-tabs.js.map +0 -1
- package/src/runs/shared/parallel-handoff.d.ts.map +0 -1
- package/src/runs/shared/parallel-handoff.js.map +0 -1
- package/src/runs/shared/parallel-utils.d.ts.map +0 -1
- package/src/runs/shared/parallel-utils.js.map +0 -1
- package/src/runs/shared/partial-output.d.ts.map +0 -1
- package/src/runs/shared/partial-output.js.map +0 -1
- package/src/runs/shared/permissions.d.ts.map +0 -1
- package/src/runs/shared/permissions.js.map +0 -1
- package/src/runs/shared/pi-spawn.d.ts.map +0 -1
- package/src/runs/shared/pi-spawn.js.map +0 -1
- package/src/runs/shared/process-signal.d.ts.map +0 -1
- package/src/runs/shared/process-signal.js.map +0 -1
- package/src/runs/shared/readonly-drain-observation.d.ts.map +0 -1
- package/src/runs/shared/readonly-drain-observation.js.map +0 -1
- package/src/runs/shared/run-fanout-budget.d.ts.map +0 -1
- package/src/runs/shared/run-fanout-budget.js.map +0 -1
- package/src/runs/shared/run-ownership.d.ts.map +0 -1
- package/src/runs/shared/run-ownership.js.map +0 -1
- package/src/runs/shared/runner-launcher.d.ts.map +0 -1
- package/src/runs/shared/runner-launcher.js.map +0 -1
- package/src/runs/shared/runtime-acknowledged-extensions.d.ts.map +0 -1
- package/src/runs/shared/runtime-acknowledged-extensions.js.map +0 -1
- package/src/runs/shared/session-lease.d.ts.map +0 -1
- package/src/runs/shared/session-lease.js.map +0 -1
- package/src/runs/shared/single-output.d.ts.map +0 -1
- package/src/runs/shared/single-output.js.map +0 -1
- package/src/runs/shared/spawn-budget.d.ts.map +0 -1
- package/src/runs/shared/spawn-budget.js.map +0 -1
- package/src/runs/shared/structured-output.d.ts.map +0 -1
- package/src/runs/shared/structured-output.js.map +0 -1
- package/src/runs/shared/subagent-control.d.ts.map +0 -1
- package/src/runs/shared/subagent-control.js.map +0 -1
- package/src/runs/shared/subagent-prompt-runtime.d.ts.map +0 -1
- package/src/runs/shared/subagent-prompt-runtime.js.map +0 -1
- package/src/runs/shared/tool-availability.d.ts.map +0 -1
- package/src/runs/shared/tool-availability.js.map +0 -1
- package/src/runs/shared/tool-budget.d.ts.map +0 -1
- package/src/runs/shared/tool-budget.js.map +0 -1
- package/src/runs/shared/tool-timeout.d.ts.map +0 -1
- package/src/runs/shared/tool-timeout.js.map +0 -1
- package/src/runs/shared/usage-budget.d.ts.map +0 -1
- package/src/runs/shared/usage-budget.js.map +0 -1
- package/src/runs/shared/usage-reconciliation.d.ts.map +0 -1
- package/src/runs/shared/usage-reconciliation.js.map +0 -1
- package/src/runs/shared/workflow-async-child-guidance.d.ts.map +0 -1
- package/src/runs/shared/workflow-async-child-guidance.js.map +0 -1
- package/src/runs/shared/workflow-graph.d.ts.map +0 -1
- package/src/runs/shared/workflow-graph.js.map +0 -1
- package/src/runs/shared/worktree-cleanup-apply.d.ts.map +0 -1
- package/src/runs/shared/worktree-cleanup-apply.js.map +0 -1
- package/src/runs/shared/worktree-cleanup-plan.d.ts.map +0 -1
- package/src/runs/shared/worktree-cleanup-plan.js.map +0 -1
- package/src/runs/shared/worktree-lock.d.ts.map +0 -1
- package/src/runs/shared/worktree-lock.js.map +0 -1
- package/src/runs/shared/worktree-setup-command.d.ts.map +0 -1
- package/src/runs/shared/worktree-setup-command.js.map +0 -1
- package/src/runs/shared/worktree.d.ts.map +0 -1
- package/src/runs/shared/worktree.js.map +0 -1
- package/src/shared/accessible-dir.d.ts.map +0 -1
- package/src/shared/accessible-dir.js.map +0 -1
- package/src/shared/agent-stream-options.d.ts.map +0 -1
- package/src/shared/agent-stream-options.js.map +0 -1
- package/src/shared/artifacts.d.ts.map +0 -1
- package/src/shared/artifacts.js.map +0 -1
- package/src/shared/atomic-json.d.ts.map +0 -1
- package/src/shared/atomic-json.js.map +0 -1
- package/src/shared/capacity-resilient-json.d.ts.map +0 -1
- package/src/shared/capacity-resilient-json.js.map +0 -1
- package/src/shared/child-cache-retention.d.ts.map +0 -1
- package/src/shared/child-cache-retention.js.map +0 -1
- package/src/shared/child-session-name.d.ts.map +0 -1
- package/src/shared/child-session-name.js.map +0 -1
- package/src/shared/child-transcript.d.ts.map +0 -1
- package/src/shared/child-transcript.js.map +0 -1
- package/src/shared/completion-owner.d.ts.map +0 -1
- package/src/shared/completion-owner.js.map +0 -1
- package/src/shared/disabled-features.d.ts.map +0 -1
- package/src/shared/disabled-features.js.map +0 -1
- package/src/shared/display-text.d.ts.map +0 -1
- package/src/shared/display-text.js.map +0 -1
- package/src/shared/edit-distance.d.ts.map +0 -1
- package/src/shared/edit-distance.js.map +0 -1
- package/src/shared/extension-context.d.ts.map +0 -1
- package/src/shared/extension-context.js.map +0 -1
- package/src/shared/file-coalescer.d.ts.map +0 -1
- package/src/shared/file-coalescer.js.map +0 -1
- package/src/shared/file-lease.d.ts.map +0 -1
- package/src/shared/file-lease.js.map +0 -1
- package/src/shared/file-system-retry.d.ts.map +0 -1
- package/src/shared/file-system-retry.js.map +0 -1
- package/src/shared/fork-context.d.ts.map +0 -1
- package/src/shared/fork-context.js.map +0 -1
- package/src/shared/fork-session-cwd.d.ts.map +0 -1
- package/src/shared/fork-session-cwd.js.map +0 -1
- package/src/shared/formatters.d.ts.map +0 -1
- package/src/shared/formatters.js.map +0 -1
- package/src/shared/jsonl-writer.d.ts.map +0 -1
- package/src/shared/jsonl-writer.js.map +0 -1
- package/src/shared/launch-contract.d.ts.map +0 -1
- package/src/shared/launch-contract.js.map +0 -1
- package/src/shared/model-info.d.ts.map +0 -1
- package/src/shared/model-info.js.map +0 -1
- package/src/shared/model-response-aliases.d.ts.map +0 -1
- package/src/shared/model-response-aliases.js.map +0 -1
- package/src/shared/node-executable.d.ts.map +0 -1
- package/src/shared/node-executable.js.map +0 -1
- package/src/shared/opencode-session-headers.d.ts.map +0 -1
- package/src/shared/opencode-session-headers.js.map +0 -1
- package/src/shared/package-version.d.ts.map +0 -1
- package/src/shared/package-version.js.map +0 -1
- package/src/shared/parent-wake.d.ts.map +0 -1
- package/src/shared/parent-wake.js.map +0 -1
- package/src/shared/prompt-resources.d.ts.map +0 -1
- package/src/shared/prompt-resources.js.map +0 -1
- package/src/shared/pruned-fork.d.ts.map +0 -1
- package/src/shared/pruned-fork.js.map +0 -1
- package/src/shared/required-child-extensions.d.ts.map +0 -1
- package/src/shared/required-child-extensions.js.map +0 -1
- package/src/shared/runtime-module-path.d.ts.map +0 -1
- package/src/shared/runtime-module-path.js.map +0 -1
- package/src/shared/session-file-trust.d.ts.map +0 -1
- package/src/shared/session-file-trust.js.map +0 -1
- package/src/shared/session-identity.d.ts.map +0 -1
- package/src/shared/session-identity.js.map +0 -1
- package/src/shared/session-succession.d.ts.map +0 -1
- package/src/shared/session-succession.js.map +0 -1
- package/src/shared/session-tokens.d.ts.map +0 -1
- package/src/shared/session-tokens.js.map +0 -1
- package/src/shared/settings-file-lease.d.ts.map +0 -1
- package/src/shared/settings-file-lease.js.map +0 -1
- package/src/shared/settings.d.ts.map +0 -1
- package/src/shared/settings.js.map +0 -1
- package/src/shared/shortcuts.d.ts.map +0 -1
- package/src/shared/shortcuts.js.map +0 -1
- package/src/shared/status-format.d.ts.map +0 -1
- package/src/shared/status-format.js.map +0 -1
- package/src/shared/thinking-ceiling.d.ts.map +0 -1
- package/src/shared/thinking-ceiling.js.map +0 -1
- package/src/shared/types.d.ts.map +0 -1
- package/src/shared/types.js.map +0 -1
- package/src/shared/utf8.d.ts.map +0 -1
- package/src/shared/utf8.js.map +0 -1
- package/src/shared/utils.d.ts.map +0 -1
- package/src/shared/utils.js.map +0 -1
- package/src/shared/watch-strategy.d.ts.map +0 -1
- package/src/shared/watch-strategy.js.map +0 -1
- package/src/shared/workflow-child-permit.d.ts.map +0 -1
- package/src/shared/workflow-child-permit.js.map +0 -1
- package/src/slash/delegation-adapters.d.ts.map +0 -1
- package/src/slash/delegation-adapters.js.map +0 -1
- package/src/slash/delegation-json.d.ts.map +0 -1
- package/src/slash/delegation-json.js.map +0 -1
- package/src/slash/delegation-request.d.ts.map +0 -1
- package/src/slash/delegation-request.js.map +0 -1
- package/src/slash/prompt-template-bridge.d.ts.map +0 -1
- package/src/slash/prompt-template-bridge.js.map +0 -1
- package/src/slash/prompt-workflows.d.ts.map +0 -1
- package/src/slash/prompt-workflows.js.map +0 -1
- package/src/slash/selector.d.ts.map +0 -1
- package/src/slash/selector.js.map +0 -1
- package/src/slash/slash-bridge.d.ts.map +0 -1
- package/src/slash/slash-bridge.js.map +0 -1
- package/src/slash/slash-commands.d.ts.map +0 -1
- package/src/slash/slash-commands.js.map +0 -1
- package/src/slash/slash-live-state.d.ts.map +0 -1
- package/src/slash/slash-live-state.js.map +0 -1
- package/src/slash/subagent-cost.d.ts.map +0 -1
- package/src/slash/subagent-cost.js.map +0 -1
- package/src/slash/subagents-admin.d.ts.map +0 -1
- package/src/slash/subagents-admin.js.map +0 -1
- package/src/tui/fleet-status.d.ts.map +0 -1
- package/src/tui/fleet-status.js.map +0 -1
- package/src/tui/fleet-transcript.d.ts.map +0 -1
- package/src/tui/fleet-transcript.js.map +0 -1
- package/src/tui/fleet.d.ts.map +0 -1
- package/src/tui/fleet.js.map +0 -1
- package/src/tui/render-helpers.d.ts.map +0 -1
- package/src/tui/render-helpers.js.map +0 -1
- package/src/tui/render.d.ts.map +0 -1
- package/src/tui/render.js.map +0 -1
- package/src/tui/running-tone.d.ts.map +0 -1
- package/src/tui/running-tone.js.map +0 -1
- package/src/tui/subagent-messages.d.ts.map +0 -1
- package/src/tui/subagent-messages.js.map +0 -1
- package/src/watchdog/change-signature.d.ts.map +0 -1
- package/src/watchdog/change-signature.js.map +0 -1
- package/src/watchdog/child-status.d.ts.map +0 -1
- package/src/watchdog/child-status.js.map +0 -1
- package/src/watchdog/diff-tool.d.ts.map +0 -1
- package/src/watchdog/diff-tool.js.map +0 -1
- package/src/watchdog/emission-guard.d.ts.map +0 -1
- package/src/watchdog/emission-guard.js.map +0 -1
- package/src/watchdog/guidance.d.ts.map +0 -1
- package/src/watchdog/guidance.js.map +0 -1
- package/src/watchdog/lsp-diagnostics.d.ts.map +0 -1
- package/src/watchdog/lsp-diagnostics.js.map +0 -1
- package/src/watchdog/model-selection.d.ts.map +0 -1
- package/src/watchdog/model-selection.js.map +0 -1
- package/src/watchdog/permission-arbiter.d.ts.map +0 -1
- package/src/watchdog/permission-arbiter.js.map +0 -1
- package/src/watchdog/register-child.d.ts.map +0 -1
- package/src/watchdog/register-child.js.map +0 -1
- package/src/watchdog/register-main.d.ts.map +0 -1
- package/src/watchdog/register-main.js.map +0 -1
- package/src/watchdog/render.d.ts.map +0 -1
- package/src/watchdog/render.js.map +0 -1
- package/src/watchdog/review.d.ts.map +0 -1
- package/src/watchdog/review.js.map +0 -1
- package/src/watchdog/rules.d.ts.map +0 -1
- package/src/watchdog/rules.js.map +0 -1
- package/src/watchdog/runtime.d.ts.map +0 -1
- package/src/watchdog/runtime.js.map +0 -1
- package/src/watchdog/scope.d.ts.map +0 -1
- package/src/watchdog/scope.js.map +0 -1
- package/src/watchdog/settings.d.ts.map +0 -1
- package/src/watchdog/settings.js.map +0 -1
- package/src/watchdog/tool-actions.d.ts.map +0 -1
- package/src/watchdog/tool-actions.js.map +0 -1
- package/src/watchdog/turn-delta.d.ts.map +0 -1
- package/src/watchdog/turn-delta.js.map +0 -1
- package/src/watchdog/types.d.ts.map +0 -1
- package/src/watchdog/types.js.map +0 -1
- package/src/watchdog/warning-format.d.ts.map +0 -1
- package/src/watchdog/warning-format.js.map +0 -1
- package/src/workflows/chat-progress.d.ts.map +0 -1
- package/src/workflows/chat-progress.js.map +0 -1
- package/src/workflows/host-command.d.ts.map +0 -1
- package/src/workflows/host-command.js.map +0 -1
- package/src/workflows/scripted-workflow.d.ts.map +0 -1
- package/src/workflows/scripted-workflow.js.map +0 -1
- package/src/workflows/structured-workflow-scripts.d.ts.map +0 -1
- package/src/workflows/structured-workflow-scripts.js.map +0 -1
- package/src/workflows/workflow-checklist.d.ts.map +0 -1
- package/src/workflows/workflow-checklist.js.map +0 -1
- package/src/workflows/workflow-child-summary.d.ts.map +0 -1
- package/src/workflows/workflow-child-summary.js.map +0 -1
- package/src/workflows/workflow-preflight.d.ts.map +0 -1
- package/src/workflows/workflow-preflight.js.map +0 -1
- package/src/workflows/workflow-receipt.d.ts.map +0 -1
- package/src/workflows/workflow-receipt.js.map +0 -1
- package/src/workflows/workflow-resources.d.ts.map +0 -1
- package/src/workflows/workflow-resources.js.map +0 -1
- package/src/workflows/workflow-reuse.d.ts.map +0 -1
- package/src/workflows/workflow-reuse.js.map +0 -1
- package/src/workflows/workflow-revival.d.ts.map +0 -1
- package/src/workflows/workflow-revival.js.map +0 -1
- package/src/workflows/workflow-settlement.d.ts.map +0 -1
- package/src/workflows/workflow-settlement.js.map +0 -1
|
@@ -0,0 +1,1365 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getLivePromptAudit,
|
|
3
|
+
handleInspectorAction,
|
|
4
|
+
readFleetTranscript,
|
|
5
|
+
renderFleetTranscript,
|
|
6
|
+
resolveWorkflowForegroundSteeringTarget,
|
|
7
|
+
steerAsyncRun,
|
|
8
|
+
steerWorkflowForegroundTarget
|
|
9
|
+
} from "./chunk-CEKS3TFO.js";
|
|
10
|
+
import {
|
|
11
|
+
FLEET_STATUS_WIDGET_KEY,
|
|
12
|
+
reportFleetWarning,
|
|
13
|
+
runningTone
|
|
14
|
+
} from "./chunk-2ZSNH26H.js";
|
|
15
|
+
import {
|
|
16
|
+
formatAsyncRunTranscript,
|
|
17
|
+
stopAsyncRun
|
|
18
|
+
} from "./chunk-KSWQVGDW.js";
|
|
19
|
+
import {
|
|
20
|
+
contextModeBadge,
|
|
21
|
+
contextModeLabel,
|
|
22
|
+
decodeUtf8Tail,
|
|
23
|
+
listAsyncRuns
|
|
24
|
+
} from "./chunk-NNLASTQE.js";
|
|
25
|
+
import "./chunk-VJHOELQP.js";
|
|
26
|
+
import "./chunk-BJN5LUQY.js";
|
|
27
|
+
import "./chunk-NIXWDZZV.js";
|
|
28
|
+
import "./chunk-ZP3HODFH.js";
|
|
29
|
+
import "./chunk-7F6RKT6W.js";
|
|
30
|
+
import "./chunk-CTPAE36Y.js";
|
|
31
|
+
import "./chunk-7J4ZXMY7.js";
|
|
32
|
+
import {
|
|
33
|
+
getArtifactPaths,
|
|
34
|
+
getArtifactsDir
|
|
35
|
+
} from "./chunk-3DC5KBVP.js";
|
|
36
|
+
import {
|
|
37
|
+
snapshotExternalRuns
|
|
38
|
+
} from "./chunk-UKG4V45O.js";
|
|
39
|
+
import {
|
|
40
|
+
childThinkingLevel,
|
|
41
|
+
formatDuration,
|
|
42
|
+
formatModelThinking,
|
|
43
|
+
formatTokenUsage,
|
|
44
|
+
formatTokens,
|
|
45
|
+
readStatus,
|
|
46
|
+
shortenPath
|
|
47
|
+
} from "./chunk-ZBC44JJ3.js";
|
|
48
|
+
import {
|
|
49
|
+
DIRS
|
|
50
|
+
} from "./chunk-5LFLVSTM.js";
|
|
51
|
+
import "./chunk-YFCK7H2S.js";
|
|
52
|
+
import "./chunk-Z7KVHQHL.js";
|
|
53
|
+
|
|
54
|
+
// src/tui/fleet.ts
|
|
55
|
+
import * as fs from "node:fs";
|
|
56
|
+
import * as path from "node:path";
|
|
57
|
+
import { getMarkdownTheme } from "@earendil-works/pi-coding-agent";
|
|
58
|
+
import { matchesKey, truncateToWidth, visibleWidth, wrapTextWithAnsi } from "@earendil-works/pi-tui";
|
|
59
|
+
|
|
60
|
+
// src/tui/fleet-layout.ts
|
|
61
|
+
function fleetLayout(width, rows, selected, items) {
|
|
62
|
+
if (width < 36) return void 0;
|
|
63
|
+
const bodyHeight = Math.max(2, Math.floor(rows * 0.85) - 6);
|
|
64
|
+
const rosterWidth = Math.max(22, Math.min(46, Math.floor((width - 3) * 0.38)));
|
|
65
|
+
const rosterStart = Math.max(0, Math.min(selected - bodyHeight + 1, Math.max(0, items.length - bodyHeight)));
|
|
66
|
+
return {
|
|
67
|
+
width,
|
|
68
|
+
rows,
|
|
69
|
+
bodyHeight,
|
|
70
|
+
rosterStart,
|
|
71
|
+
roster: { x: 1, y: 3, width: rosterWidth, height: bodyHeight },
|
|
72
|
+
output: { x: rosterWidth + 2, y: 3, width: Math.max(1, width - rosterWidth - 3), height: bodyHeight },
|
|
73
|
+
rosterKeys: items.slice(rosterStart, rosterStart + bodyHeight).map((item) => item.key)
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
function fleetContains(rect, x, y) {
|
|
77
|
+
return x >= rect.x && x < rect.x + rect.width && y >= rect.y && y < rect.y + rect.height;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// src/tui/fleet-viewport.ts
|
|
81
|
+
import { ScrollView } from "@earendil-works/pi-tui";
|
|
82
|
+
var FleetViewport = class {
|
|
83
|
+
body = {
|
|
84
|
+
lines: [],
|
|
85
|
+
render() {
|
|
86
|
+
return this.lines;
|
|
87
|
+
},
|
|
88
|
+
invalidate() {
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
scroll = new ScrollView(this.body, { follow: "end", overscroll: "contain" });
|
|
92
|
+
requestRender;
|
|
93
|
+
resetTopOnLayout = false;
|
|
94
|
+
constructor(requestRender) {
|
|
95
|
+
this.requestRender = requestRender;
|
|
96
|
+
}
|
|
97
|
+
render(lines, width, height) {
|
|
98
|
+
this.body.lines = lines;
|
|
99
|
+
const rendered = this.scroll.render(width);
|
|
100
|
+
this.scroll.updateLayout(rendered.length, height, this.requestRender);
|
|
101
|
+
if (this.resetTopOnLayout) {
|
|
102
|
+
this.resetTopOnLayout = false;
|
|
103
|
+
this.scroll.scrollTo(0, { disableFollow: true });
|
|
104
|
+
}
|
|
105
|
+
return rendered.slice(this.scroll.scrollTop, this.scroll.scrollTop + this.scroll.viewportHeight);
|
|
106
|
+
}
|
|
107
|
+
resetTop() {
|
|
108
|
+
this.resetTopOnLayout = true;
|
|
109
|
+
this.scroll.scrollTo(0, { disableFollow: true });
|
|
110
|
+
}
|
|
111
|
+
follow() {
|
|
112
|
+
this.resetTopOnLayout = false;
|
|
113
|
+
this.scroll.scrollToEnd();
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
// src/tui/fleet.ts
|
|
118
|
+
var REFRESH_MS = 750;
|
|
119
|
+
var MIN_REFRESH_MS = 250;
|
|
120
|
+
var MAX_RECENT_ASYNC_RUNS = 20;
|
|
121
|
+
var MAX_FLEET_HISTORY_CANDIDATES = 100;
|
|
122
|
+
var TRANSCRIPT_LINES = 200;
|
|
123
|
+
var OUTPUT_TAIL_BYTES = 64 * 1024;
|
|
124
|
+
var PROMPT_AUDIT_SUMMARY_WIDTH = 160;
|
|
125
|
+
var DEFAULT_FLEET_KEYBINDINGS = {
|
|
126
|
+
close: ["escape", "ctrl+c", "q"],
|
|
127
|
+
scrollUp: ["K"],
|
|
128
|
+
scrollDown: ["J"],
|
|
129
|
+
selectUp: ["up", "k"],
|
|
130
|
+
selectDown: ["down", "j"],
|
|
131
|
+
selectFirst: ["home"],
|
|
132
|
+
selectLast: ["end"],
|
|
133
|
+
pageUp: ["pageUp"],
|
|
134
|
+
pageDown: ["pageDown"],
|
|
135
|
+
refresh: ["r", "R"],
|
|
136
|
+
steer: ["s"],
|
|
137
|
+
inspect: ["return", "H"],
|
|
138
|
+
stop: ["D"],
|
|
139
|
+
toggleTools: ["x", "X", "ctrl+o"]
|
|
140
|
+
};
|
|
141
|
+
function resolveFleetKeybindings(config) {
|
|
142
|
+
return Object.fromEntries(
|
|
143
|
+
Object.entries(DEFAULT_FLEET_KEYBINDINGS).map(([action, defaults]) => [action, config?.[action] ?? defaults])
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
function matchesFleetBinding(data, binding) {
|
|
147
|
+
const key = /^[A-Z]$/.test(binding) ? `shift+${binding.toLowerCase()}` : binding;
|
|
148
|
+
return matchesKey(data, key);
|
|
149
|
+
}
|
|
150
|
+
function matchesFleetAction(data, bindings, action) {
|
|
151
|
+
return bindings[action].some((binding) => matchesFleetBinding(data, binding));
|
|
152
|
+
}
|
|
153
|
+
function bindingLabel(bindings, action) {
|
|
154
|
+
return bindings[action].map((binding) => binding === "up" ? "\u2191" : binding === "down" ? "\u2193" : binding === "escape" ? "Esc" : binding === "return" ? "Enter" : binding).join("/");
|
|
155
|
+
}
|
|
156
|
+
function belongsToCurrentSession(sessionId, currentSessionId) {
|
|
157
|
+
return !currentSessionId || sessionId === currentSessionId;
|
|
158
|
+
}
|
|
159
|
+
function trackedJobSummary(job) {
|
|
160
|
+
const startedAt = job.startedAt ?? job.updatedAt ?? Date.now();
|
|
161
|
+
return {
|
|
162
|
+
id: job.asyncId,
|
|
163
|
+
asyncDir: job.asyncDir,
|
|
164
|
+
...job.sessionId ? { sessionId: job.sessionId } : {},
|
|
165
|
+
state: job.status,
|
|
166
|
+
activityState: job.activityState,
|
|
167
|
+
lastActivityAt: job.lastActivityAt,
|
|
168
|
+
currentTool: job.currentTool,
|
|
169
|
+
currentToolStartedAt: job.currentToolStartedAt,
|
|
170
|
+
currentPath: job.currentPath,
|
|
171
|
+
turnCount: job.turnCount,
|
|
172
|
+
toolCount: job.toolCount,
|
|
173
|
+
steering: job.steering,
|
|
174
|
+
mode: job.mode ?? "single",
|
|
175
|
+
...job.context ? { context: job.context } : {},
|
|
176
|
+
...job.cwd ? { cwd: job.cwd } : {},
|
|
177
|
+
startedAt,
|
|
178
|
+
...job.updatedAt !== void 0 ? { lastUpdate: job.updatedAt } : {},
|
|
179
|
+
...job.timeoutMs !== void 0 ? { timeoutMs: job.timeoutMs } : {},
|
|
180
|
+
...job.deadlineAt !== void 0 ? { deadlineAt: job.deadlineAt } : {},
|
|
181
|
+
...job.timedOut !== void 0 ? { timedOut: job.timedOut } : {},
|
|
182
|
+
...job.stopped !== void 0 ? { stopped: job.stopped } : {},
|
|
183
|
+
...job.turnBudget ? { turnBudget: job.turnBudget } : {},
|
|
184
|
+
...job.turnBudgetExceeded !== void 0 ? { turnBudgetExceeded: job.turnBudgetExceeded } : {},
|
|
185
|
+
...job.wrapUpRequested !== void 0 ? { wrapUpRequested: job.wrapUpRequested } : {},
|
|
186
|
+
...job.currentStep !== void 0 ? { currentStep: job.currentStep } : {},
|
|
187
|
+
...job.chainStepCount !== void 0 ? { chainStepCount: job.chainStepCount } : {},
|
|
188
|
+
...job.parallelGroups?.length ? { parallelGroups: job.parallelGroups } : {},
|
|
189
|
+
...job.preflight ? { preflight: job.preflight } : {},
|
|
190
|
+
steps: (job.steps ?? job.agents?.map((agent, index) => ({ agent, index, status: job.status === "queued" ? "pending" : job.status })) ?? []).map((step, index) => ({
|
|
191
|
+
...step,
|
|
192
|
+
index: step.index ?? index
|
|
193
|
+
})),
|
|
194
|
+
...job.sessionDir ? { sessionDir: job.sessionDir } : {},
|
|
195
|
+
...job.outputFile ? { outputFile: job.outputFile } : {},
|
|
196
|
+
...job.totalTokens ? { totalTokens: job.totalTokens } : {},
|
|
197
|
+
...job.sessionFile ? { sessionFile: job.sessionFile } : {},
|
|
198
|
+
...job.nestedChildren?.length ? { nestedChildren: job.nestedChildren } : {}
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
function asyncItems(run, description) {
|
|
202
|
+
const updatedAt = run.lastUpdate ?? run.endedAt ?? run.startedAt;
|
|
203
|
+
if (run.steps.length === 0 || run.mode === "workflow") {
|
|
204
|
+
return [{ key: `async:${run.id}`, kind: "async", runId: run.id, agent: run.mode, state: run.state, updatedAt, run, ...description ? { description } : {} }];
|
|
205
|
+
}
|
|
206
|
+
return run.steps.map((step) => ({
|
|
207
|
+
key: `async:${run.id}:${step.index}`,
|
|
208
|
+
kind: "async",
|
|
209
|
+
runId: run.id,
|
|
210
|
+
index: step.index,
|
|
211
|
+
agent: step.label ? `${step.label} (${step.agent})` : step.agent,
|
|
212
|
+
state: step.status,
|
|
213
|
+
updatedAt: step.lastActivityAt ?? updatedAt,
|
|
214
|
+
run,
|
|
215
|
+
step,
|
|
216
|
+
...description ? { description } : {}
|
|
217
|
+
}));
|
|
218
|
+
}
|
|
219
|
+
function orderFleetAsyncRuns(runs, terminalLimit, trackedJobs) {
|
|
220
|
+
const updatedAt = (run) => run.lastUpdate ?? run.endedAt ?? run.startedAt;
|
|
221
|
+
const byNewest = (left, right) => updatedAt(right) - updatedAt(left);
|
|
222
|
+
const startedAt = (run) => {
|
|
223
|
+
const job = trackedJobs.get(run.id);
|
|
224
|
+
return job ? job.startedAt ?? 0 : run.startedAt;
|
|
225
|
+
};
|
|
226
|
+
const byStartedAt = (left, right) => startedAt(left) - startedAt(right) || left.id.localeCompare(right.id);
|
|
227
|
+
const active = runs.filter((run) => run.state === "queued" || run.state === "running").sort(byStartedAt);
|
|
228
|
+
const terminal = runs.filter((run) => run.state !== "queued" && run.state !== "running").sort(byNewest);
|
|
229
|
+
return [...active, ...terminal.slice(0, terminalLimit)];
|
|
230
|
+
}
|
|
231
|
+
function collectFleetSnapshot(state, options = {}) {
|
|
232
|
+
const items = [];
|
|
233
|
+
const activeForegroundIds = /* @__PURE__ */ new Set();
|
|
234
|
+
const trackedJobs = state.fleetJobs ?? state.asyncJobs;
|
|
235
|
+
const workflowParentIds = new Set([...trackedJobs.values()].filter((job) => job.mode === "workflow" && belongsToCurrentSession(job.sessionId, state.currentSessionId)).map((job) => job.asyncId));
|
|
236
|
+
const workflowForegroundChildCounts = /* @__PURE__ */ new Map();
|
|
237
|
+
const liveWorkflowForegroundControls = /* @__PURE__ */ new Set();
|
|
238
|
+
for (const control of state.foregroundControls.values()) {
|
|
239
|
+
const activeChildCount = control.activeChildren?.size ?? 0;
|
|
240
|
+
if (!control.parentWorkflowRunId || !workflowParentIds.has(control.parentWorkflowRunId) || !belongsToCurrentSession(control.sessionId, state.currentSessionId) || activeChildCount === 0) continue;
|
|
241
|
+
liveWorkflowForegroundControls.add(control);
|
|
242
|
+
workflowForegroundChildCounts.set(control.parentWorkflowRunId, (workflowForegroundChildCounts.get(control.parentWorkflowRunId) ?? 0) + activeChildCount);
|
|
243
|
+
}
|
|
244
|
+
for (const control of [...state.foregroundControls.values()].sort((left, right) => left.startedAt - right.startedAt || left.runId.localeCompare(right.runId))) {
|
|
245
|
+
activeForegroundIds.add(control.runId);
|
|
246
|
+
if (control.parentWorkflowRunId && workflowParentIds.has(control.parentWorkflowRunId) && ((workflowForegroundChildCounts.get(control.parentWorkflowRunId) ?? 0) <= 1 || !liveWorkflowForegroundControls.has(control))) continue;
|
|
247
|
+
if (control.activeChildren) {
|
|
248
|
+
for (const child of [...control.activeChildren.values()].sort((left, right) => left.index - right.index)) {
|
|
249
|
+
items.push({
|
|
250
|
+
key: `foreground-active:${control.runId}:${child.index}`,
|
|
251
|
+
kind: "foreground-active",
|
|
252
|
+
runId: control.runId,
|
|
253
|
+
index: child.index,
|
|
254
|
+
agent: child.agent,
|
|
255
|
+
state: "running",
|
|
256
|
+
updatedAt: child.updatedAt,
|
|
257
|
+
control,
|
|
258
|
+
activeChild: child,
|
|
259
|
+
...child.description ? { description: child.description } : {}
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
continue;
|
|
263
|
+
}
|
|
264
|
+
items.push({
|
|
265
|
+
key: `foreground-active:${control.runId}:${control.currentIndex ?? 0}`,
|
|
266
|
+
kind: "foreground-active",
|
|
267
|
+
runId: control.runId,
|
|
268
|
+
...control.currentIndex !== void 0 ? { index: control.currentIndex } : {},
|
|
269
|
+
agent: control.currentAgent ?? control.mode,
|
|
270
|
+
state: "running",
|
|
271
|
+
updatedAt: control.updatedAt,
|
|
272
|
+
control,
|
|
273
|
+
...control.description ? { description: control.description } : {}
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
let error;
|
|
277
|
+
try {
|
|
278
|
+
let runs;
|
|
279
|
+
const descriptions = /* @__PURE__ */ new Map();
|
|
280
|
+
const tracked = [...trackedJobs.values()].filter((job) => belongsToCurrentSession(job.sessionId, state.currentSessionId));
|
|
281
|
+
const byUpdate = (left, right) => (right.updatedAt ?? right.startedAt ?? 0) - (left.updatedAt ?? left.startedAt ?? 0);
|
|
282
|
+
const active = tracked.filter((job) => job.status === "queued" || job.status === "running");
|
|
283
|
+
const recent = tracked.filter((job) => job.status !== "queued" && job.status !== "running").sort(byUpdate).slice(0, options.limit ?? MAX_RECENT_ASYNC_RUNS);
|
|
284
|
+
const trackedRuns = [];
|
|
285
|
+
for (const job of [...active, ...recent]) {
|
|
286
|
+
try {
|
|
287
|
+
trackedRuns.push(trackedJobSummary(job));
|
|
288
|
+
if (job.description) descriptions.set(job.asyncId, job.description);
|
|
289
|
+
} catch (cause) {
|
|
290
|
+
error = `Failed to inspect async run '${job.asyncId}': ${cause instanceof Error ? cause.message : String(cause)}`;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
if (options.asyncDirRoot !== void 0) {
|
|
294
|
+
const trackedIds = new Set(trackedRuns.map((run) => run.id));
|
|
295
|
+
const history = listAsyncRuns(options.asyncDirRoot, {
|
|
296
|
+
...state.currentSessionId ? { sessionId: state.currentSessionId } : {},
|
|
297
|
+
entryLimit: MAX_FLEET_HISTORY_CANDIDATES,
|
|
298
|
+
resultsDir: options.resultsDir ?? DIRS.results,
|
|
299
|
+
reconcile: false
|
|
300
|
+
}).filter((run) => !trackedIds.has(run.id));
|
|
301
|
+
runs = [...trackedRuns, ...history];
|
|
302
|
+
} else {
|
|
303
|
+
runs = trackedRuns;
|
|
304
|
+
}
|
|
305
|
+
for (const run of orderFleetAsyncRuns(runs, options.limit ?? MAX_RECENT_ASYNC_RUNS, trackedJobs)) {
|
|
306
|
+
items.push(...asyncItems(run, descriptions.get(run.id)));
|
|
307
|
+
}
|
|
308
|
+
} catch (cause) {
|
|
309
|
+
error = cause instanceof Error ? cause.message : String(cause);
|
|
310
|
+
}
|
|
311
|
+
if (state.currentSessionId) {
|
|
312
|
+
try {
|
|
313
|
+
for (const run of snapshotExternalRuns(state.currentSessionId, { ignoreMalformed: true, onMalformedRecord: (message) => reportFleetWarning(state, `Removed ${message}`) })) {
|
|
314
|
+
items.push({
|
|
315
|
+
key: `external:${run.id}`,
|
|
316
|
+
kind: "external",
|
|
317
|
+
runId: run.id,
|
|
318
|
+
agent: run.label,
|
|
319
|
+
state: run.state,
|
|
320
|
+
updatedAt: run.updatedAt ?? run.endedAt ?? run.startedAt,
|
|
321
|
+
run,
|
|
322
|
+
...run.currentAction ? { description: run.currentAction } : {}
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
} catch (cause) {
|
|
326
|
+
const message = `Failed to inspect external jobs: ${cause instanceof Error ? cause.message : String(cause)}`;
|
|
327
|
+
error = error ? `${error}; ${message}` : message;
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
const recentForeground = [...state.foregroundRuns?.values() ?? []].filter((run) => belongsToCurrentSession(run.sessionId, state.currentSessionId) && !activeForegroundIds.has(run.runId)).sort((left, right) => right.updatedAt - left.updatedAt);
|
|
331
|
+
for (const run of recentForeground) {
|
|
332
|
+
for (const child of run.children) {
|
|
333
|
+
items.push({
|
|
334
|
+
key: `foreground-recent:${run.runId}:${child.index}`,
|
|
335
|
+
kind: "foreground-recent",
|
|
336
|
+
runId: run.runId,
|
|
337
|
+
index: child.index,
|
|
338
|
+
agent: child.agent,
|
|
339
|
+
state: child.status,
|
|
340
|
+
updatedAt: child.updatedAt ?? run.updatedAt,
|
|
341
|
+
run,
|
|
342
|
+
child
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
return { items, ...error ? { error } : {} };
|
|
347
|
+
}
|
|
348
|
+
function visibleWorkflowParentKeyForForegroundKey(state, key, items) {
|
|
349
|
+
for (const control of state.foregroundControls.values()) {
|
|
350
|
+
if (!control.parentWorkflowRunId) continue;
|
|
351
|
+
let matches = false;
|
|
352
|
+
if (control.activeChildren) {
|
|
353
|
+
for (const child of control.activeChildren.values()) {
|
|
354
|
+
if (`foreground-active:${control.runId}:${child.index}` === key) {
|
|
355
|
+
matches = true;
|
|
356
|
+
break;
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
} else {
|
|
360
|
+
matches = `foreground-active:${control.runId}:${control.currentIndex ?? 0}` === key;
|
|
361
|
+
}
|
|
362
|
+
if (!matches) continue;
|
|
363
|
+
const parentKey = `async:${control.parentWorkflowRunId}`;
|
|
364
|
+
return items.some((item) => item.key === parentKey) ? parentKey : void 0;
|
|
365
|
+
}
|
|
366
|
+
return void 0;
|
|
367
|
+
}
|
|
368
|
+
function fleetItemThinkingLevel(item) {
|
|
369
|
+
switch (item.kind) {
|
|
370
|
+
case "foreground-active":
|
|
371
|
+
return childThinkingLevel(item.activeChild ?? item.control);
|
|
372
|
+
case "foreground-recent":
|
|
373
|
+
return childThinkingLevel(item.child);
|
|
374
|
+
case "async":
|
|
375
|
+
return childThinkingLevel(item.step);
|
|
376
|
+
case "external":
|
|
377
|
+
return void 0;
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
function statusGlyph(item, theme) {
|
|
381
|
+
if (item.state === "running") return runningTone(theme, fleetItemThinkingLevel(item))("\u25CF");
|
|
382
|
+
if (item.state === "queued" || item.state === "pending") return theme.fg("muted", "\u25E6");
|
|
383
|
+
if (item.state === "complete" || item.state === "completed") return theme.fg("success", "\u2713");
|
|
384
|
+
if (item.state === "paused" || item.state === "stopped" || item.state === "detached") return theme.fg("warning", "\u25A0");
|
|
385
|
+
return theme.fg("error", "\u2717");
|
|
386
|
+
}
|
|
387
|
+
function foregroundPromptAuditCount(item, state) {
|
|
388
|
+
if (!state.currentSessionId || item.control.sessionId !== state.currentSessionId) return 0;
|
|
389
|
+
if (!item.control.activeChildren) return getLivePromptAudit(item.control, item.index ?? 0) ? 1 : 0;
|
|
390
|
+
return [...item.control.activeChildren.keys()].filter((index) => getLivePromptAudit(item.control, index)).length;
|
|
391
|
+
}
|
|
392
|
+
function promptAuditString(value) {
|
|
393
|
+
return typeof value === "string" ? value : void 0;
|
|
394
|
+
}
|
|
395
|
+
function authoredPromptSummary(text) {
|
|
396
|
+
if (typeof text !== "string") return void 0;
|
|
397
|
+
const summary = text.replace(/\s+/g, " ").trim();
|
|
398
|
+
return summary ? truncateToWidth(summary, PROMPT_AUDIT_SUMMARY_WIDTH, "\u2026") : void 0;
|
|
399
|
+
}
|
|
400
|
+
function foregroundAuthoredPromptSummary(item, state) {
|
|
401
|
+
if (!state.currentSessionId || item.control.sessionId !== state.currentSessionId) return void 0;
|
|
402
|
+
const prompt = getLivePromptAudit(item.control, item.index ?? 0);
|
|
403
|
+
return prompt ? authoredPromptSummary(prompt.authoredTask) : void 0;
|
|
404
|
+
}
|
|
405
|
+
function promptAuditText(prompt, view) {
|
|
406
|
+
switch (view) {
|
|
407
|
+
case "authored":
|
|
408
|
+
return promptAuditString(prompt.authoredTask);
|
|
409
|
+
case "runtime":
|
|
410
|
+
return promptAuditString(prompt.runtimeAdditions);
|
|
411
|
+
case "effective":
|
|
412
|
+
return promptAuditString(prompt.finalEffectivePrompt);
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
function promptAuditViewLabel(view) {
|
|
416
|
+
switch (view) {
|
|
417
|
+
case "authored":
|
|
418
|
+
return "[1] Authored task";
|
|
419
|
+
case "runtime":
|
|
420
|
+
return "[2] Runtime additions";
|
|
421
|
+
case "effective":
|
|
422
|
+
return "[3] Final effective prompt";
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
function foregroundActiveDetail(item, state) {
|
|
426
|
+
const { control } = item;
|
|
427
|
+
const live = item.activeChild ?? control;
|
|
428
|
+
const modelThinking = formatModelThinking(live.model, live.thinking);
|
|
429
|
+
const promptAuditCount = foregroundPromptAuditCount(item, state);
|
|
430
|
+
const promptSummary = foregroundAuthoredPromptSummary(item, state);
|
|
431
|
+
const lines = [
|
|
432
|
+
`Run: ${item.runId}`,
|
|
433
|
+
"Source: foreground",
|
|
434
|
+
`State: running`,
|
|
435
|
+
`Mode: ${control.mode}`,
|
|
436
|
+
control.parentWorkflowRunId ? `Workflow child of: ${control.parentWorkflowRunId}${control.workflowKey ? ` (${control.workflowKey})` : ""}` : void 0,
|
|
437
|
+
control.sourceRunId ? `Redo source: ${control.sourceRunId}` : void 0,
|
|
438
|
+
control.supersededByRunId ? `Superseded by: ${control.supersededByRunId}` : void 0,
|
|
439
|
+
item.index !== void 0 ? `Child: ${item.index} (${item.agent})` : `Agent: ${item.agent}`,
|
|
440
|
+
modelThinking ? `Model: ${modelThinking}` : void 0,
|
|
441
|
+
promptSummary ? `Task: ${promptSummary}` : void 0,
|
|
442
|
+
`Started: ${new Date(live.startedAt).toISOString()}`,
|
|
443
|
+
live.currentTool ? `Current tool: ${live.currentTool}${live.currentPath ? ` \xB7 ${shortenPath(live.currentPath)}` : ""}` : void 0,
|
|
444
|
+
live.turnCount !== void 0 ? `Turns: ${live.turnCount}` : void 0,
|
|
445
|
+
live.toolCount !== void 0 ? `Tools: ${live.toolCount}` : void 0,
|
|
446
|
+
live.tokens !== void 0 ? `Tokens: ${formatTokenUsage({ input: live.inputTokens ?? 0, output: live.outputTokens ?? 0, total: live.tokens, ...live.window !== void 0 ? { window: live.window } : {}, ...live.windowPeak !== void 0 ? { windowPeak: live.windowPeak } : {} }, "tokens")}` : void 0,
|
|
447
|
+
promptAuditCount > 0 ? `Prompt audit: ${promptAuditCount} live \xB7 3 views \xB7 p opens` : void 0,
|
|
448
|
+
"",
|
|
449
|
+
"Transcript",
|
|
450
|
+
"Live foreground output remains in the expanded subagent tool result. Persisted output and session paths appear here after the child settles."
|
|
451
|
+
];
|
|
452
|
+
return lines.filter((line) => line !== void 0);
|
|
453
|
+
}
|
|
454
|
+
function pathWithin(base, candidate) {
|
|
455
|
+
const resolvedBase = path.resolve(base);
|
|
456
|
+
const resolvedCandidate = path.resolve(candidate);
|
|
457
|
+
return resolvedCandidate === resolvedBase || resolvedCandidate.startsWith(`${resolvedBase}${path.sep}`);
|
|
458
|
+
}
|
|
459
|
+
function trustedFileTail(filePath, trustedRoots) {
|
|
460
|
+
const resolvedPath = path.resolve(filePath);
|
|
461
|
+
if (trustedRoots.length === 0 || !trustedRoots.some((root) => pathWithin(root, resolvedPath))) return { warning: `output artifact is outside trusted roots: ${filePath}` };
|
|
462
|
+
let stat;
|
|
463
|
+
try {
|
|
464
|
+
stat = fs.lstatSync(resolvedPath);
|
|
465
|
+
} catch (error) {
|
|
466
|
+
if (error && typeof error === "object" && "code" in error && error.code === "ENOENT") return { unavailable: `output artifact unavailable: ${filePath}` };
|
|
467
|
+
return { warning: `output artifact could not be inspected: ${error instanceof Error ? error.message : String(error)}` };
|
|
468
|
+
}
|
|
469
|
+
if (stat.isSymbolicLink()) return { warning: `output artifact refused a symlink: ${filePath}` };
|
|
470
|
+
if (!stat.isFile()) return { warning: `output artifact is not a file: ${filePath}` };
|
|
471
|
+
try {
|
|
472
|
+
const realPath = fs.realpathSync(resolvedPath);
|
|
473
|
+
const realRoots = trustedRoots.filter((root) => fs.existsSync(root)).map((root) => fs.realpathSync(root));
|
|
474
|
+
if (!realRoots.some((root) => pathWithin(root, realPath))) return { warning: `output artifact resolves outside trusted roots: ${filePath}` };
|
|
475
|
+
const fd = fs.openSync(realPath, "r");
|
|
476
|
+
try {
|
|
477
|
+
const bytes = Math.min(stat.size, OUTPUT_TAIL_BYTES);
|
|
478
|
+
const buffer = Buffer.alloc(bytes);
|
|
479
|
+
fs.readSync(fd, buffer, 0, bytes, stat.size - bytes);
|
|
480
|
+
return { text: decodeUtf8Tail(buffer) };
|
|
481
|
+
} finally {
|
|
482
|
+
fs.closeSync(fd);
|
|
483
|
+
}
|
|
484
|
+
} catch (error) {
|
|
485
|
+
return { warning: `output artifact could not be read: ${error instanceof Error ? error.message : String(error)}` };
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
function foregroundRecentOutputLines(item, state) {
|
|
489
|
+
const outputPath = item.child.artifactPaths?.outputPath ?? item.child.savedOutputPath;
|
|
490
|
+
const output = item.child.finalOutput ? { text: item.child.finalOutput } : outputPath ? trustedFileTail(path.isAbsolute(outputPath) ? outputPath : path.resolve(item.run.cwd, outputPath), uniquePaths([
|
|
491
|
+
fleetArtifactsRoot(state, item.run.cwd),
|
|
492
|
+
fleetArtifactsRoot(state, state.baseCwd)
|
|
493
|
+
])) : void 0;
|
|
494
|
+
if (output?.warning) return [`(${output.warning})`];
|
|
495
|
+
if (output?.unavailable) return [`(${output.unavailable})`];
|
|
496
|
+
const outputLines = (output?.text ?? "").split(/\r?\n/).filter((line) => line.trim()).slice(-TRANSCRIPT_LINES);
|
|
497
|
+
return outputLines.length ? outputLines : ["(no recovered output available)"];
|
|
498
|
+
}
|
|
499
|
+
function foregroundRecentDetail(item, state) {
|
|
500
|
+
const { child, run } = item;
|
|
501
|
+
const outputPath = child.artifactPaths?.outputPath ?? child.savedOutputPath;
|
|
502
|
+
const modelThinking = formatModelThinking(child.model, child.thinking);
|
|
503
|
+
const lines = [
|
|
504
|
+
`Run: ${item.runId}`,
|
|
505
|
+
"Source: foreground",
|
|
506
|
+
`State: ${child.status}`,
|
|
507
|
+
`Mode: ${run.mode}`,
|
|
508
|
+
`Child: ${child.index} (${child.agent})${contextModeLabel(child.context) ? ` ${contextModeLabel(child.context)}` : ""}`,
|
|
509
|
+
modelThinking ? `Model: ${modelThinking}` : void 0,
|
|
510
|
+
`Updated: ${new Date(child.updatedAt ?? run.updatedAt).toISOString()}`,
|
|
511
|
+
outputPath ? `Output: ${outputPath}` : void 0,
|
|
512
|
+
child.sessionFile ? `Session: ${child.sessionFile}` : void 0,
|
|
513
|
+
child.transcriptPath ? `Transcript file: ${child.transcriptPath}` : void 0,
|
|
514
|
+
child.error ? `Error: ${child.error}` : void 0,
|
|
515
|
+
child.outputSaveError ? `Output warning: ${child.outputSaveError}` : void 0,
|
|
516
|
+
child.transcriptError ? `Transcript warning: ${child.transcriptError}` : void 0,
|
|
517
|
+
"",
|
|
518
|
+
"Result transcript tail"
|
|
519
|
+
];
|
|
520
|
+
lines.push(...foregroundRecentOutputLines(item, state));
|
|
521
|
+
return lines.filter((line) => line !== void 0);
|
|
522
|
+
}
|
|
523
|
+
function externalElapsedEnd(run) {
|
|
524
|
+
const terminal = run.state !== "queued" && run.state !== "running";
|
|
525
|
+
return terminal ? run.endedAt ?? run.updatedAt ?? Date.now() : Date.now();
|
|
526
|
+
}
|
|
527
|
+
function workflowStepLabel(step, index) {
|
|
528
|
+
const key = step.workflowKey ?? `step ${index + 1}`;
|
|
529
|
+
const label = step.label && step.label !== key ? ` \xB7 ${step.label}` : "";
|
|
530
|
+
const phase = step.phase ? `${step.phase}: ` : "";
|
|
531
|
+
return `${phase}${key}${label} (${step.agent})`;
|
|
532
|
+
}
|
|
533
|
+
function workflowStepActivity(step) {
|
|
534
|
+
if (step.currentTool) return `tool ${step.currentTool}`;
|
|
535
|
+
if (step.currentPath) return shortenPath(step.currentPath);
|
|
536
|
+
if (step.activityState === "needs_attention") return "needs attention";
|
|
537
|
+
if (step.activityState === "active_long_running") return "long-running";
|
|
538
|
+
if (step.turnCount !== void 0) return `${step.turnCount} turns`;
|
|
539
|
+
if (step.toolCount !== void 0) return `${step.toolCount} tools`;
|
|
540
|
+
return void 0;
|
|
541
|
+
}
|
|
542
|
+
function visibleWorkflowProgressSteps(steps, visibleLimit) {
|
|
543
|
+
if (steps.length <= visibleLimit) return steps.map((step, index) => ({ step, index }));
|
|
544
|
+
const selected = /* @__PURE__ */ new Set();
|
|
545
|
+
for (const [index, step] of steps.entries()) {
|
|
546
|
+
if (step.status !== "complete" && step.status !== "completed") selected.add(index);
|
|
547
|
+
if (selected.size >= visibleLimit) break;
|
|
548
|
+
}
|
|
549
|
+
for (let index = steps.length - 1; index >= 0 && selected.size < visibleLimit; index--) selected.add(index);
|
|
550
|
+
const visible = [...selected].sort((left, right) => left - right).map((index) => ({ step: steps[index], index }));
|
|
551
|
+
return [{ hidden: steps.length - visible.length }, ...visible];
|
|
552
|
+
}
|
|
553
|
+
function workflowProgressLines(steps) {
|
|
554
|
+
if (!steps?.length) return [];
|
|
555
|
+
const lines = ["Workflow progress:"];
|
|
556
|
+
for (const row of visibleWorkflowProgressSteps(steps, 8)) {
|
|
557
|
+
if ("hidden" in row) {
|
|
558
|
+
lines.push(` +${row.hidden} hidden workflow steps`);
|
|
559
|
+
continue;
|
|
560
|
+
}
|
|
561
|
+
const activity = workflowStepActivity(row.step);
|
|
562
|
+
const context = contextModeLabel(row.step.context);
|
|
563
|
+
const details = [row.step.status, activity, context, row.step.tokens ? formatTokenUsage(row.step.tokens) : void 0].filter(Boolean).join(" \xB7 ");
|
|
564
|
+
lines.push(` ${row.index + 1}. ${workflowStepLabel(row.step, row.index)}${details ? ` \u2014 ${details}` : ""}`);
|
|
565
|
+
}
|
|
566
|
+
return lines;
|
|
567
|
+
}
|
|
568
|
+
function asyncDetail(item, state) {
|
|
569
|
+
const status = readStatus(item.run.asyncDir);
|
|
570
|
+
if (status) {
|
|
571
|
+
const trackedJob = state.fleetJobs?.get(item.runId) ?? state.asyncJobs.get(item.runId);
|
|
572
|
+
const lines = formatAsyncRunTranscript(status, item.run.asyncDir, {
|
|
573
|
+
index: item.index,
|
|
574
|
+
lines: TRANSCRIPT_LINES,
|
|
575
|
+
sessionRoots: uniquePaths([...state.trustedSessionRoots ?? [], trackedJob?.sessionRoot]),
|
|
576
|
+
trustedSessionFiles: [item.step?.sessionFile ?? item.run.sessionFile].filter((value) => Boolean(value)),
|
|
577
|
+
trustedSessionFileRoot: state.trustedSessionFileRoot
|
|
578
|
+
}).split("\n");
|
|
579
|
+
if (status.mode === "workflow" && item.index === void 0) {
|
|
580
|
+
const progress = workflowProgressLines(status.steps ?? item.run.steps);
|
|
581
|
+
if (progress.length) {
|
|
582
|
+
const modeIndex = lines.findIndex((line) => line.startsWith("Mode:"));
|
|
583
|
+
lines.splice(modeIndex >= 0 ? modeIndex + 1 : 0, 0, "", ...progress);
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
return lines;
|
|
587
|
+
}
|
|
588
|
+
const outputPath = item.index !== void 0 ? path.join(item.run.asyncDir, `output-${item.index}.log`) : void 0;
|
|
589
|
+
return [
|
|
590
|
+
`Run: ${item.runId}`,
|
|
591
|
+
"Source: async",
|
|
592
|
+
`State: ${item.state}`,
|
|
593
|
+
`Mode: ${item.run.mode}${contextModeLabel(item.run.context) ? ` ${contextModeLabel(item.run.context)}` : ""}`,
|
|
594
|
+
item.index !== void 0 ? `Child: ${item.index} (${item.agent})${contextModeLabel(item.step?.context) ? ` ${contextModeLabel(item.step?.context)}` : ""}` : `Agent: ${item.agent}${contextModeLabel(item.run.context) ? ` ${contextModeLabel(item.run.context)}` : ""}`,
|
|
595
|
+
outputPath ? `Output: ${outputPath}` : void 0,
|
|
596
|
+
item.step?.sessionFile ? `Session: ${item.step.sessionFile}` : item.run.sessionFile ? `Session: ${item.run.sessionFile}` : void 0,
|
|
597
|
+
"",
|
|
598
|
+
"Transcript",
|
|
599
|
+
"(status is no longer available)"
|
|
600
|
+
].filter((line) => line !== void 0);
|
|
601
|
+
}
|
|
602
|
+
function externalDetail(item) {
|
|
603
|
+
return [
|
|
604
|
+
`Run: ${item.runId}`,
|
|
605
|
+
"Source: external \xB7 display-only",
|
|
606
|
+
`Owner: ${item.run.source}`,
|
|
607
|
+
`State: ${item.state}`,
|
|
608
|
+
`Started: ${new Date(item.run.startedAt).toISOString()}`,
|
|
609
|
+
item.run.updatedAt !== void 0 ? `Updated: ${new Date(item.run.updatedAt).toISOString()}` : void 0,
|
|
610
|
+
item.run.endedAt !== void 0 ? `Ended: ${new Date(item.run.endedAt).toISOString()}` : void 0,
|
|
611
|
+
`Elapsed: ${formatDuration(Math.max(0, externalElapsedEnd(item.run) - item.run.startedAt))}`,
|
|
612
|
+
item.run.currentAction ? `Current action: ${item.run.currentAction}` : void 0,
|
|
613
|
+
item.run.reportPath ? `Report path: ${item.run.reportPath}` : void 0,
|
|
614
|
+
item.run.transcriptPath ? `Transcript path: ${item.run.transcriptPath}` : void 0,
|
|
615
|
+
"",
|
|
616
|
+
"Preview",
|
|
617
|
+
item.run.preview ?? "(no preview supplied)",
|
|
618
|
+
"",
|
|
619
|
+
"The owning extension controls execution, persistence, cancellation, and results."
|
|
620
|
+
].filter((line) => line !== void 0);
|
|
621
|
+
}
|
|
622
|
+
function detailLines(item, error, state) {
|
|
623
|
+
if (!item) return [error ? `Fleet scan failed: ${error}` : "No current-session Fleet jobs.", "", "New jobs appear here automatically while this inspector remains open."];
|
|
624
|
+
const lines = item.kind === "foreground-active" ? foregroundActiveDetail(item, state) : item.kind === "foreground-recent" ? foregroundRecentDetail(item, state) : item.kind === "external" ? externalDetail(item) : asyncDetail(item, state);
|
|
625
|
+
if (error) lines.unshift(`Fleet scan warning: ${error}`, "");
|
|
626
|
+
return lines;
|
|
627
|
+
}
|
|
628
|
+
function isActionableAsyncState(state) {
|
|
629
|
+
return state === "running" || state === "queued" || state === "pending";
|
|
630
|
+
}
|
|
631
|
+
function firstToolResultText(result, fallback) {
|
|
632
|
+
if (!result) return { text: fallback, isError: true };
|
|
633
|
+
const text = result.content.find((item) => item.type === "text")?.text ?? fallback;
|
|
634
|
+
return { text, ...result.isError ? { isError: true } : {} };
|
|
635
|
+
}
|
|
636
|
+
function uniquePaths(values) {
|
|
637
|
+
return [...new Set(values.filter((value) => Boolean(value)).map((value) => path.resolve(value)))];
|
|
638
|
+
}
|
|
639
|
+
function fleetArtifactsRoot(state, cwd) {
|
|
640
|
+
return getArtifactsDir(
|
|
641
|
+
state.parentSessionFile ?? null,
|
|
642
|
+
cwd,
|
|
643
|
+
state.artifactDirPreference
|
|
644
|
+
);
|
|
645
|
+
}
|
|
646
|
+
function transcriptTarget(item, state) {
|
|
647
|
+
if (item.kind === "external") return void 0;
|
|
648
|
+
if (item.kind === "foreground-active") {
|
|
649
|
+
const artifactsRoot = fleetArtifactsRoot(state, item.control.cwd ?? state.baseCwd);
|
|
650
|
+
return {
|
|
651
|
+
path: getArtifactPaths(artifactsRoot, item.runId, item.agent, item.index ?? 0).transcriptPath,
|
|
652
|
+
trustedRoots: [artifactsRoot]
|
|
653
|
+
};
|
|
654
|
+
}
|
|
655
|
+
if (item.kind === "foreground-recent") {
|
|
656
|
+
if (!item.child.transcriptPath) return void 0;
|
|
657
|
+
const transcriptPath2 = path.isAbsolute(item.child.transcriptPath) ? item.child.transcriptPath : path.resolve(item.run.cwd, item.child.transcriptPath);
|
|
658
|
+
return {
|
|
659
|
+
path: transcriptPath2,
|
|
660
|
+
trustedRoots: uniquePaths([
|
|
661
|
+
fleetArtifactsRoot(state, item.run.cwd),
|
|
662
|
+
fleetArtifactsRoot(state, state.baseCwd)
|
|
663
|
+
])
|
|
664
|
+
};
|
|
665
|
+
}
|
|
666
|
+
const step = item.step ?? (item.run.steps.length === 1 ? item.run.steps[0] : void 0);
|
|
667
|
+
if (step?.runner?.type === "external-cli") return void 0;
|
|
668
|
+
const recordedSessionFile = step?.sessionFile ?? item.run.sessionFile;
|
|
669
|
+
const recordedPath = step?.transcriptPath ?? recordedSessionFile;
|
|
670
|
+
if (!recordedPath) return void 0;
|
|
671
|
+
const transcriptPath = path.isAbsolute(recordedPath) ? recordedPath : path.resolve(item.run.asyncDir, recordedPath);
|
|
672
|
+
const trackedJob = state.fleetJobs?.get(item.runId) ?? state.asyncJobs.get(item.runId);
|
|
673
|
+
return {
|
|
674
|
+
path: transcriptPath,
|
|
675
|
+
trustedRoots: uniquePaths([
|
|
676
|
+
item.run.asyncDir,
|
|
677
|
+
fleetArtifactsRoot(state, state.baseCwd),
|
|
678
|
+
trackedJob?.cwd ? fleetArtifactsRoot(state, trackedJob.cwd) : void 0,
|
|
679
|
+
item.run.sessionFile ? getArtifactsDir(item.run.sessionFile, item.run.cwd ?? state.baseCwd, state.artifactDirPreference) : void 0
|
|
680
|
+
]),
|
|
681
|
+
...!step?.transcriptPath && recordedSessionFile ? { trustedFiles: [recordedSessionFile], trustedFileRoot: state.trustedSessionFileRoot } : {}
|
|
682
|
+
};
|
|
683
|
+
}
|
|
684
|
+
function itemContext(item) {
|
|
685
|
+
if (item.kind === "async") return contextModeLabel(item.step?.context ?? item.run.context);
|
|
686
|
+
if (item.kind === "foreground-recent") return contextModeLabel(item.child.context);
|
|
687
|
+
return void 0;
|
|
688
|
+
}
|
|
689
|
+
function itemMode(item) {
|
|
690
|
+
if (item.kind === "external") return "display-only";
|
|
691
|
+
return item.kind === "foreground-active" ? item.control.mode : item.run.mode;
|
|
692
|
+
}
|
|
693
|
+
function itemSource(item) {
|
|
694
|
+
if (item.kind === "external") return `external \xB7 ${item.run.source}`;
|
|
695
|
+
if (item.kind === "async") return "background";
|
|
696
|
+
return item.kind === "foreground-active" ? "foreground \xB7 live" : "foreground \xB7 recent";
|
|
697
|
+
}
|
|
698
|
+
function itemStats(item) {
|
|
699
|
+
let model;
|
|
700
|
+
let tokens;
|
|
701
|
+
let tokenUsage;
|
|
702
|
+
let tools;
|
|
703
|
+
let durationMs;
|
|
704
|
+
if (item.kind === "foreground-active") {
|
|
705
|
+
const live = item.activeChild ?? item.control;
|
|
706
|
+
model = formatModelThinking(live.model, live.thinking) || void 0;
|
|
707
|
+
tokens = live.tokens;
|
|
708
|
+
if (tokens !== void 0) tokenUsage = { input: live.inputTokens ?? 0, output: live.outputTokens ?? 0, total: tokens, ...live.window !== void 0 ? { window: live.window } : {}, ...live.windowPeak !== void 0 ? { windowPeak: live.windowPeak } : {} };
|
|
709
|
+
tools = live.toolCount;
|
|
710
|
+
durationMs = Math.max(0, Date.now() - live.startedAt);
|
|
711
|
+
} else if (item.kind === "foreground-recent") {
|
|
712
|
+
model = formatModelThinking(item.child.model, item.child.thinking) || void 0;
|
|
713
|
+
tokens = item.child.tokens;
|
|
714
|
+
if (tokens !== void 0) tokenUsage = { input: 0, output: 0, total: tokens, ...item.child.window !== void 0 ? { window: item.child.window } : {}, ...item.child.windowPeak !== void 0 ? { windowPeak: item.child.windowPeak } : {} };
|
|
715
|
+
tools = item.child.toolCount;
|
|
716
|
+
} else if (item.kind === "external") {
|
|
717
|
+
durationMs = Math.max(0, externalElapsedEnd(item.run) - item.run.startedAt);
|
|
718
|
+
} else {
|
|
719
|
+
model = formatModelThinking(item.step?.model, item.step?.thinking) || void 0;
|
|
720
|
+
tokenUsage = item.step?.tokens ?? (item.index === void 0 ? item.run.totalTokens : void 0);
|
|
721
|
+
tokens = tokenUsage?.total;
|
|
722
|
+
tools = item.step?.toolCount ?? (item.index === void 0 ? item.run.toolCount : void 0);
|
|
723
|
+
const terminalRun = item.state !== "queued" && item.state !== "running" && item.state !== "pending";
|
|
724
|
+
const endTime = item.run.endedAt ?? (terminalRun ? item.run.lastUpdate : void 0) ?? Date.now();
|
|
725
|
+
durationMs = item.step?.durationMs ?? Math.max(0, endTime - item.run.startedAt);
|
|
726
|
+
}
|
|
727
|
+
return [
|
|
728
|
+
model,
|
|
729
|
+
tokenUsage ? formatTokenUsage(tokenUsage) : tokens !== void 0 ? `${formatTokens(tokens)} tok` : void 0,
|
|
730
|
+
tools !== void 0 ? `${tools} tool${tools === 1 ? "" : "s"}` : void 0,
|
|
731
|
+
durationMs !== void 0 ? formatDuration(durationMs) : void 0
|
|
732
|
+
].filter((value) => Boolean(value));
|
|
733
|
+
}
|
|
734
|
+
function structuredHeader(item, width, theme, conversationState, promptSummary) {
|
|
735
|
+
const lines = [];
|
|
736
|
+
lines.push(rightAligned(` ${statusGlyph(item, theme)} ${theme.bold(item.agent)}`, theme.fg("dim", item.state), width));
|
|
737
|
+
const child = "index" in item && item.index !== void 0 ? ` \xB7 child ${item.index + 1}` : "";
|
|
738
|
+
const context = itemContext(item);
|
|
739
|
+
const identity = `${itemSource(item)} \xB7 ${item.runId.slice(0, 8)}${child} \xB7 ${itemMode(item)}${context ? ` ${context}` : ""}`;
|
|
740
|
+
lines.push(` ${theme.fg("dim", identity)}`);
|
|
741
|
+
const stats = itemStats(item);
|
|
742
|
+
if (stats.length) lines.push(` ${theme.fg("muted", stats.join(" \xB7 "))}`);
|
|
743
|
+
if (promptSummary) lines.push(` ${theme.fg("muted", `Task: ${promptSummary}`)}`);
|
|
744
|
+
lines.push(`${theme.fg("accent", "Conversation")} ${theme.fg("dim", `\xB7 ${conversationState}`)}`);
|
|
745
|
+
return lines.map((line) => truncateToWidth(line, width));
|
|
746
|
+
}
|
|
747
|
+
function fit(text, width) {
|
|
748
|
+
const clipped = truncateToWidth(text, Math.max(0, width));
|
|
749
|
+
return clipped + " ".repeat(Math.max(0, width - visibleWidth(clipped)));
|
|
750
|
+
}
|
|
751
|
+
function rightAligned(left, right, width) {
|
|
752
|
+
const rightWidth = visibleWidth(right);
|
|
753
|
+
const leftWidth = Math.max(0, width - rightWidth - 1);
|
|
754
|
+
return fit(left, leftWidth) + " ".repeat(Math.max(1, width - leftWidth - rightWidth)) + fit(right, rightWidth);
|
|
755
|
+
}
|
|
756
|
+
function transcriptFingerprint(filePath) {
|
|
757
|
+
try {
|
|
758
|
+
const stat = fs.statSync(filePath, { bigint: true });
|
|
759
|
+
return `${stat.ino}:${stat.size}:${stat.mtimeNs}:${stat.ctimeNs}`;
|
|
760
|
+
} catch {
|
|
761
|
+
return "missing";
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
var SubagentFleetComponent = class {
|
|
765
|
+
snapshot = { items: [] };
|
|
766
|
+
selected = 0;
|
|
767
|
+
selectedKey;
|
|
768
|
+
viewport;
|
|
769
|
+
renderedLayout;
|
|
770
|
+
expandedTools = false;
|
|
771
|
+
promptAuditOpen = false;
|
|
772
|
+
promptAuditView = "authored";
|
|
773
|
+
actionNotice;
|
|
774
|
+
steerDraft;
|
|
775
|
+
redoGuidanceDraft;
|
|
776
|
+
steerMode = "steer";
|
|
777
|
+
stopConfirming = false;
|
|
778
|
+
actionBusy = false;
|
|
779
|
+
transcriptCache;
|
|
780
|
+
disposed = false;
|
|
781
|
+
refreshTimer;
|
|
782
|
+
refreshMs;
|
|
783
|
+
tui;
|
|
784
|
+
theme;
|
|
785
|
+
markdownTheme;
|
|
786
|
+
state;
|
|
787
|
+
done;
|
|
788
|
+
options;
|
|
789
|
+
keybindings;
|
|
790
|
+
constructor(tui, theme, state, done, options = {}) {
|
|
791
|
+
this.tui = tui;
|
|
792
|
+
this.viewport = new FleetViewport(() => this.tui.requestRender());
|
|
793
|
+
this.theme = theme;
|
|
794
|
+
this.markdownTheme = options.markdownTheme ?? getMarkdownTheme();
|
|
795
|
+
this.state = state;
|
|
796
|
+
this.done = done;
|
|
797
|
+
this.options = options;
|
|
798
|
+
this.keybindings = resolveFleetKeybindings(options.fleetKeybindings);
|
|
799
|
+
this.refreshMs = Math.max(MIN_REFRESH_MS, options.refreshMs ?? REFRESH_MS);
|
|
800
|
+
this.selectedKey = options.initialKey;
|
|
801
|
+
this.refresh();
|
|
802
|
+
this.scheduleRefresh();
|
|
803
|
+
}
|
|
804
|
+
scheduleRefresh() {
|
|
805
|
+
if (this.disposed || this.refreshTimer) return;
|
|
806
|
+
this.refreshTimer = setTimeout(() => {
|
|
807
|
+
this.refreshTimer = void 0;
|
|
808
|
+
if (this.disposed) return;
|
|
809
|
+
try {
|
|
810
|
+
this.refresh();
|
|
811
|
+
this.tui.requestRender();
|
|
812
|
+
} finally {
|
|
813
|
+
this.scheduleRefresh();
|
|
814
|
+
}
|
|
815
|
+
}, this.refreshMs);
|
|
816
|
+
this.refreshTimer.unref?.();
|
|
817
|
+
}
|
|
818
|
+
stopRefresh() {
|
|
819
|
+
this.disposed = true;
|
|
820
|
+
if (this.refreshTimer) clearTimeout(this.refreshTimer);
|
|
821
|
+
this.refreshTimer = void 0;
|
|
822
|
+
}
|
|
823
|
+
refresh() {
|
|
824
|
+
const previousKey = this.snapshot.items[this.selected]?.key ?? this.selectedKey;
|
|
825
|
+
this.snapshot = collectFleetSnapshot(this.state, this.options);
|
|
826
|
+
let preserved = previousKey ? this.snapshot.items.findIndex((item) => item.key === previousKey) : -1;
|
|
827
|
+
if (preserved < 0 && previousKey) {
|
|
828
|
+
const parentKey = visibleWorkflowParentKeyForForegroundKey(this.state, previousKey, this.snapshot.items);
|
|
829
|
+
if (parentKey) preserved = this.snapshot.items.findIndex((item) => item.key === parentKey);
|
|
830
|
+
}
|
|
831
|
+
this.selected = preserved >= 0 ? preserved : Math.min(this.selected, Math.max(0, this.snapshot.items.length - 1));
|
|
832
|
+
this.selectedKey = this.snapshot.items[this.selected]?.key;
|
|
833
|
+
}
|
|
834
|
+
moveSelection(delta) {
|
|
835
|
+
this.selectItem(Math.max(0, Math.min(this.snapshot.items.length - 1, this.selected + delta)));
|
|
836
|
+
}
|
|
837
|
+
selectItem(index) {
|
|
838
|
+
if (!this.snapshot.items[index]) return;
|
|
839
|
+
this.selected = index;
|
|
840
|
+
this.selectedKey = this.snapshot.items[this.selected]?.key;
|
|
841
|
+
this.viewport.follow();
|
|
842
|
+
this.resetActionInput();
|
|
843
|
+
this.tui.requestRender();
|
|
844
|
+
}
|
|
845
|
+
selectedPromptAudit() {
|
|
846
|
+
const item = this.snapshot.items[this.selected];
|
|
847
|
+
if (item?.kind !== "foreground-active") return void 0;
|
|
848
|
+
if (!this.state.currentSessionId || item.control.sessionId !== this.state.currentSessionId) return void 0;
|
|
849
|
+
return getLivePromptAudit(item.control, item.index ?? 0);
|
|
850
|
+
}
|
|
851
|
+
promptAuditItems() {
|
|
852
|
+
const selected = this.snapshot.items[this.selected];
|
|
853
|
+
if (selected?.kind !== "foreground-active" || !this.state.currentSessionId || selected.control.sessionId !== this.state.currentSessionId) return [];
|
|
854
|
+
return this.snapshot.items.flatMap((item) => {
|
|
855
|
+
if (item.kind !== "foreground-active" || item.control !== selected.control) return [];
|
|
856
|
+
const prompt = getLivePromptAudit(item.control, item.index ?? 0);
|
|
857
|
+
return prompt ? [{ item, prompt }] : [];
|
|
858
|
+
});
|
|
859
|
+
}
|
|
860
|
+
selectedPromptText() {
|
|
861
|
+
const prompt = this.selectedPromptAudit();
|
|
862
|
+
return prompt ? promptAuditText(prompt, this.promptAuditView) : void 0;
|
|
863
|
+
}
|
|
864
|
+
movePromptSelection(delta) {
|
|
865
|
+
const items = this.promptAuditItems();
|
|
866
|
+
if (items.length === 0) return;
|
|
867
|
+
const currentKey = this.snapshot.items[this.selected]?.key;
|
|
868
|
+
const current = Math.max(0, items.findIndex(({ item }) => item.key === currentKey));
|
|
869
|
+
const target = items[Math.max(0, Math.min(items.length - 1, current + delta))]?.item;
|
|
870
|
+
if (!target) return;
|
|
871
|
+
this.selected = this.snapshot.items.findIndex((item) => item.key === target.key);
|
|
872
|
+
this.selectedKey = target.key;
|
|
873
|
+
this.viewport.resetTop();
|
|
874
|
+
this.tui.requestRender();
|
|
875
|
+
}
|
|
876
|
+
resetActionInput() {
|
|
877
|
+
this.steerDraft = void 0;
|
|
878
|
+
this.redoGuidanceDraft = void 0;
|
|
879
|
+
this.steerMode = "steer";
|
|
880
|
+
this.stopConfirming = false;
|
|
881
|
+
}
|
|
882
|
+
selectedAsyncAction() {
|
|
883
|
+
const item = this.snapshot.items[this.selected];
|
|
884
|
+
if (!item) return { reason: "No child is selected." };
|
|
885
|
+
if (item.kind === "external") return { reason: "External jobs are display-only and remain controlled by their owning extension." };
|
|
886
|
+
if (item.kind !== "async") return { reason: "Fleet controls are available for current-session top-level async runs only." };
|
|
887
|
+
if (!isActionableAsyncState(item.run.state) || !isActionableAsyncState(item.state)) return { reason: `Selected child is ${item.state}; controls require a running or queued async child.` };
|
|
888
|
+
return { item };
|
|
889
|
+
}
|
|
890
|
+
selectedSteerAction() {
|
|
891
|
+
const item = this.snapshot.items[this.selected];
|
|
892
|
+
if (item?.kind === "foreground-active" && item.control.parentWorkflowRunId) {
|
|
893
|
+
const parent = this.state.asyncJobs.get(item.control.parentWorkflowRunId) ?? this.state.fleetJobs?.get(item.control.parentWorkflowRunId);
|
|
894
|
+
if (!parent || !isActionableAsyncState(parent.status)) return { reason: "The parent workflow is no longer available for steering." };
|
|
895
|
+
return { runId: item.runId, asyncDir: parent.asyncDir, ...item.index !== void 0 ? { index: item.index } : {} };
|
|
896
|
+
}
|
|
897
|
+
const target = this.selectedAsyncAction();
|
|
898
|
+
if ("reason" in target) return target;
|
|
899
|
+
return { runId: target.item.runId, asyncDir: target.item.run.asyncDir, ...target.item.index !== void 0 ? { index: target.item.index } : {} };
|
|
900
|
+
}
|
|
901
|
+
selectedInspectAction() {
|
|
902
|
+
const item = this.snapshot.items[this.selected];
|
|
903
|
+
if (!item) return { reason: "No child is selected." };
|
|
904
|
+
if (item.kind === "external") return { reason: "External jobs are display-only and have no inspector controls." };
|
|
905
|
+
if (item.kind === "async") {
|
|
906
|
+
if (!isActionableAsyncState(item.run.state) || !isActionableAsyncState(item.state)) return { reason: `Selected child is ${item.state}; controls require a running or queued async child.` };
|
|
907
|
+
return { runId: item.runId, asyncDir: item.run.asyncDir, ...item.index !== void 0 ? { index: item.index } : {} };
|
|
908
|
+
}
|
|
909
|
+
if (item.kind !== "foreground-active" || !item.control.parentWorkflowRunId) return { reason: "Fleet controls are available for current-session top-level async runs only." };
|
|
910
|
+
const parent = this.state.asyncJobs.get(item.control.parentWorkflowRunId) ?? this.state.fleetJobs?.get(item.control.parentWorkflowRunId);
|
|
911
|
+
if (!parent || !isActionableAsyncState(parent.status)) return { reason: "The parent workflow is no longer available for inspection." };
|
|
912
|
+
return { runId: parent.asyncId, asyncDir: parent.asyncDir };
|
|
913
|
+
}
|
|
914
|
+
inspectSelected() {
|
|
915
|
+
const target = this.selectedInspectAction();
|
|
916
|
+
if ("reason" in target || !this.options.actions?.inspect) this.setActionNotice({ text: "reason" in target ? target.reason : "Inspector controls are unavailable in this context.", isError: true });
|
|
917
|
+
else this.runAction(() => this.options.actions.inspect(target));
|
|
918
|
+
}
|
|
919
|
+
actionLines() {
|
|
920
|
+
const lines = [];
|
|
921
|
+
if (this.actionBusy) lines.push(this.theme.fg("accent", "Action pending..."));
|
|
922
|
+
if (this.steerDraft !== void 0) {
|
|
923
|
+
lines.push(this.theme.fg("accent", `Steer message (${this.steerMode}): ${this.steerDraft}${this.theme.fg("dim", "\u258C")}`));
|
|
924
|
+
lines.push(this.theme.fg("dim", "Enter sends \xB7 Tab changes mode \xB7 Esc cancels \xB7 Backspace edits"));
|
|
925
|
+
} else if (this.redoGuidanceDraft !== void 0) {
|
|
926
|
+
lines.push(this.theme.fg("accent", `Redo guidance: ${this.redoGuidanceDraft}${this.theme.fg("dim", "\u258C")}`));
|
|
927
|
+
lines.push(this.theme.fg("dim", "Enter rewrites and reruns \xB7 Esc cancels \xB7 Backspace edits"));
|
|
928
|
+
} else if (this.stopConfirming) {
|
|
929
|
+
const selected = this.snapshot.items[this.selected];
|
|
930
|
+
lines.push(this.theme.fg("warning", `Confirm stop for async run ${selected?.runId ?? "selected run"}?`));
|
|
931
|
+
lines.push(this.theme.fg("dim", "Stop ends the run; use interrupt for a resumable pause. Enter/Y confirms \xB7 N returns \xB7 Esc cancels"));
|
|
932
|
+
} else if (this.actionNotice) {
|
|
933
|
+
lines.push(this.theme.fg(this.actionNotice.isError ? "error" : "success", this.actionNotice.text));
|
|
934
|
+
}
|
|
935
|
+
return lines;
|
|
936
|
+
}
|
|
937
|
+
withActionLines(body) {
|
|
938
|
+
const actionLines = this.actionLines();
|
|
939
|
+
return actionLines.length ? [...actionLines, "", ...body] : body;
|
|
940
|
+
}
|
|
941
|
+
setActionNotice(result) {
|
|
942
|
+
this.actionNotice = result;
|
|
943
|
+
this.resetActionInput();
|
|
944
|
+
this.viewport.resetTop();
|
|
945
|
+
this.refresh();
|
|
946
|
+
this.tui.requestRender();
|
|
947
|
+
}
|
|
948
|
+
runAction(action) {
|
|
949
|
+
if (this.actionBusy) return;
|
|
950
|
+
this.actionBusy = true;
|
|
951
|
+
this.actionNotice = void 0;
|
|
952
|
+
this.tui.requestRender();
|
|
953
|
+
void action().then((result) => this.setActionNotice(result)).catch((error) => this.setActionNotice({ text: error instanceof Error ? error.message : String(error), isError: true })).finally(() => {
|
|
954
|
+
this.actionBusy = false;
|
|
955
|
+
if (!this.disposed) this.tui.requestRender();
|
|
956
|
+
});
|
|
957
|
+
}
|
|
958
|
+
scrollDetail(delta) {
|
|
959
|
+
this.viewport.scroll.scrollBy(delta);
|
|
960
|
+
}
|
|
961
|
+
handleMouse(event) {
|
|
962
|
+
if (this.steerDraft !== void 0 || this.redoGuidanceDraft !== void 0 || this.stopConfirming || this.actionBusy) {
|
|
963
|
+
return { handled: true, render: false };
|
|
964
|
+
}
|
|
965
|
+
const layout = this.renderedLayout;
|
|
966
|
+
if (!layout || layout.width !== event.width || layout.rows !== (this.tui.terminal?.rows ?? 32)) {
|
|
967
|
+
return event.type === "wheel" ? { handled: true, render: false } : void 0;
|
|
968
|
+
}
|
|
969
|
+
if (event.type === "wheel" && fleetContains(layout.output, event.x, event.y)) {
|
|
970
|
+
this.scrollDetail(event.wheelDelta ?? 0);
|
|
971
|
+
return { handled: true, render: false };
|
|
972
|
+
}
|
|
973
|
+
if (this.promptAuditOpen) return { handled: true, render: false };
|
|
974
|
+
if (event.type === "click" && event.button === "left" && !event.shift && !event.alt && !event.ctrl && fleetContains(layout.roster, event.x, event.y)) {
|
|
975
|
+
const key = layout.rosterKeys[event.y - layout.roster.y];
|
|
976
|
+
const index = key === void 0 ? -1 : this.snapshot.items.findIndex((item) => item.key === key);
|
|
977
|
+
if (index < 0) return void 0;
|
|
978
|
+
this.selectItem(index);
|
|
979
|
+
return { handled: true, render: false };
|
|
980
|
+
}
|
|
981
|
+
return event.type === "wheel" ? { handled: true, render: false } : void 0;
|
|
982
|
+
}
|
|
983
|
+
handleInput(data) {
|
|
984
|
+
if (this.promptAuditOpen && this.redoGuidanceDraft !== void 0) {
|
|
985
|
+
if (matchesKey(data, "escape") || matchesKey(data, "ctrl+c")) {
|
|
986
|
+
this.resetActionInput();
|
|
987
|
+
this.tui.requestRender();
|
|
988
|
+
return;
|
|
989
|
+
}
|
|
990
|
+
if (matchesKey(data, "return") || data === "\r" || data === "\n") {
|
|
991
|
+
const guidance = this.redoGuidanceDraft.trim();
|
|
992
|
+
if (!guidance) {
|
|
993
|
+
this.setActionNotice({ text: "Redo guidance cannot be empty.", isError: true });
|
|
994
|
+
return;
|
|
995
|
+
}
|
|
996
|
+
const selected = this.snapshot.items[this.selected];
|
|
997
|
+
if (selected?.kind !== "foreground-active" || !this.options.actions?.redoPrompt) {
|
|
998
|
+
this.setActionNotice({ text: "Redo is unavailable for this prompt.", isError: true });
|
|
999
|
+
return;
|
|
1000
|
+
}
|
|
1001
|
+
this.runAction(() => this.options.actions.redoPrompt({ runId: selected.runId, index: selected.index ?? 0, guidance, control: selected.control }));
|
|
1002
|
+
return;
|
|
1003
|
+
}
|
|
1004
|
+
if (matchesKey(data, "backspace") || data === "\x7F") {
|
|
1005
|
+
this.redoGuidanceDraft = this.redoGuidanceDraft.slice(0, -1);
|
|
1006
|
+
this.tui.requestRender();
|
|
1007
|
+
return;
|
|
1008
|
+
}
|
|
1009
|
+
if (data.length === 1 && data >= " " && data !== "\x7F") {
|
|
1010
|
+
this.redoGuidanceDraft += data;
|
|
1011
|
+
this.tui.requestRender();
|
|
1012
|
+
}
|
|
1013
|
+
return;
|
|
1014
|
+
}
|
|
1015
|
+
if (this.promptAuditOpen) {
|
|
1016
|
+
if (matchesKey(data, "escape") || matchesKey(data, "ctrl+c")) {
|
|
1017
|
+
this.promptAuditOpen = false;
|
|
1018
|
+
this.viewport.follow();
|
|
1019
|
+
this.tui.requestRender();
|
|
1020
|
+
return;
|
|
1021
|
+
}
|
|
1022
|
+
if (data === "j") return this.movePromptSelection(1);
|
|
1023
|
+
if (data === "k") return this.movePromptSelection(-1);
|
|
1024
|
+
if (data === "1" || data === "2" || data === "3") {
|
|
1025
|
+
this.promptAuditView = data === "1" ? "authored" : data === "2" ? "runtime" : "effective";
|
|
1026
|
+
this.viewport.resetTop();
|
|
1027
|
+
this.tui.requestRender();
|
|
1028
|
+
return;
|
|
1029
|
+
}
|
|
1030
|
+
if (data === "g") {
|
|
1031
|
+
const prompt = this.selectedPromptAudit();
|
|
1032
|
+
if (!prompt) this.setActionNotice({ text: "Prompt Audit is available only for a live child owned by this session.", isError: true });
|
|
1033
|
+
else if (!prompt.rerun) this.setActionNotice({ text: "Redo is not safe for this prompt in this slice.", isError: true });
|
|
1034
|
+
else if (!this.options.actions?.redoPrompt) this.setActionNotice({ text: "Redo controls are unavailable in this context.", isError: true });
|
|
1035
|
+
else {
|
|
1036
|
+
this.actionNotice = void 0;
|
|
1037
|
+
this.redoGuidanceDraft = "";
|
|
1038
|
+
this.viewport.resetTop();
|
|
1039
|
+
this.tui.requestRender();
|
|
1040
|
+
}
|
|
1041
|
+
return;
|
|
1042
|
+
}
|
|
1043
|
+
if (data === "c") {
|
|
1044
|
+
const text = this.selectedPromptText();
|
|
1045
|
+
if (!text) this.setActionNotice({ text: "No prompt view is available to copy.", isError: true });
|
|
1046
|
+
else if (!this.options.copyText) this.setActionNotice({ text: "Clipboard is unavailable in this context.", isError: true });
|
|
1047
|
+
else this.runAction(async () => {
|
|
1048
|
+
await this.options.copyText(text);
|
|
1049
|
+
return { text: "Copied visible prompt view." };
|
|
1050
|
+
});
|
|
1051
|
+
return;
|
|
1052
|
+
}
|
|
1053
|
+
if (matchesFleetAction(data, this.keybindings, "scrollUp")) return this.scrollDetail(-1);
|
|
1054
|
+
if (matchesFleetAction(data, this.keybindings, "scrollDown")) return this.scrollDetail(1);
|
|
1055
|
+
if (matchesFleetAction(data, this.keybindings, "pageUp")) return this.scrollDetail(-this.viewport.scroll.viewportHeight);
|
|
1056
|
+
if (matchesFleetAction(data, this.keybindings, "pageDown")) return this.scrollDetail(this.viewport.scroll.viewportHeight);
|
|
1057
|
+
return;
|
|
1058
|
+
}
|
|
1059
|
+
if (this.steerDraft !== void 0) {
|
|
1060
|
+
if (matchesKey(data, "escape") || matchesKey(data, "ctrl+c")) {
|
|
1061
|
+
this.resetActionInput();
|
|
1062
|
+
this.tui.requestRender();
|
|
1063
|
+
return;
|
|
1064
|
+
}
|
|
1065
|
+
if (matchesKey(data, "return") || data === "\r" || data === "\n") {
|
|
1066
|
+
const message = this.steerDraft.trim();
|
|
1067
|
+
if (!message) {
|
|
1068
|
+
this.setActionNotice({ text: "Steer message cannot be empty.", isError: true });
|
|
1069
|
+
return;
|
|
1070
|
+
}
|
|
1071
|
+
const target = this.selectedSteerAction();
|
|
1072
|
+
if ("reason" in target || !this.options.actions) {
|
|
1073
|
+
this.setActionNotice({ text: "reason" in target ? target.reason : "Fleet controls are unavailable in this context.", isError: true });
|
|
1074
|
+
return;
|
|
1075
|
+
}
|
|
1076
|
+
this.runAction(() => this.options.actions.steer({ ...target, message, mode: this.steerMode }));
|
|
1077
|
+
return;
|
|
1078
|
+
}
|
|
1079
|
+
if (matchesKey(data, "tab") || data === " ") {
|
|
1080
|
+
const modes = ["steer", "follow_up", "auto"];
|
|
1081
|
+
this.steerMode = modes[(modes.indexOf(this.steerMode) + 1) % modes.length];
|
|
1082
|
+
this.tui.requestRender();
|
|
1083
|
+
return;
|
|
1084
|
+
}
|
|
1085
|
+
if (matchesKey(data, "backspace") || data === "\x7F") {
|
|
1086
|
+
this.steerDraft = this.steerDraft.slice(0, -1);
|
|
1087
|
+
this.tui.requestRender();
|
|
1088
|
+
return;
|
|
1089
|
+
}
|
|
1090
|
+
if (data.length === 1 && data >= " " && data !== "\x7F") {
|
|
1091
|
+
this.steerDraft += data;
|
|
1092
|
+
this.tui.requestRender();
|
|
1093
|
+
}
|
|
1094
|
+
return;
|
|
1095
|
+
}
|
|
1096
|
+
if (this.stopConfirming) {
|
|
1097
|
+
if (matchesKey(data, "return") || data.toLowerCase() === "y") {
|
|
1098
|
+
const target = this.selectedAsyncAction();
|
|
1099
|
+
if ("reason" in target || !this.options.actions) {
|
|
1100
|
+
this.setActionNotice({ text: "reason" in target ? target.reason : "Fleet controls are unavailable in this context.", isError: true });
|
|
1101
|
+
return;
|
|
1102
|
+
}
|
|
1103
|
+
this.runAction(() => Promise.resolve(this.options.actions.stop({ runId: target.item.runId, asyncDir: target.item.run.asyncDir, ...target.item.index !== void 0 ? { index: target.item.index } : {} })));
|
|
1104
|
+
return;
|
|
1105
|
+
}
|
|
1106
|
+
if (matchesKey(data, "escape") || matchesKey(data, "ctrl+c") || data.toLowerCase() === "n" || matchesKey(data, "backspace")) {
|
|
1107
|
+
this.resetActionInput();
|
|
1108
|
+
this.tui.requestRender();
|
|
1109
|
+
}
|
|
1110
|
+
return;
|
|
1111
|
+
}
|
|
1112
|
+
if (matchesFleetAction(data, this.keybindings, "close")) {
|
|
1113
|
+
this.stopRefresh();
|
|
1114
|
+
this.done(void 0);
|
|
1115
|
+
return;
|
|
1116
|
+
}
|
|
1117
|
+
if (matchesFleetAction(data, this.keybindings, "scrollUp")) return this.scrollDetail(-1);
|
|
1118
|
+
if (matchesFleetAction(data, this.keybindings, "scrollDown")) return this.scrollDetail(1);
|
|
1119
|
+
if (matchesFleetAction(data, this.keybindings, "selectUp")) return this.moveSelection(-1);
|
|
1120
|
+
if (matchesFleetAction(data, this.keybindings, "selectDown")) return this.moveSelection(1);
|
|
1121
|
+
if (matchesFleetAction(data, this.keybindings, "selectFirst")) return this.moveSelection(-this.snapshot.items.length);
|
|
1122
|
+
if (matchesFleetAction(data, this.keybindings, "selectLast")) return this.moveSelection(this.snapshot.items.length);
|
|
1123
|
+
if (matchesFleetAction(data, this.keybindings, "pageUp")) return this.scrollDetail(-this.viewport.scroll.viewportHeight);
|
|
1124
|
+
if (matchesFleetAction(data, this.keybindings, "pageDown")) return this.scrollDetail(this.viewport.scroll.viewportHeight);
|
|
1125
|
+
if (matchesFleetAction(data, this.keybindings, "refresh")) {
|
|
1126
|
+
this.transcriptCache = void 0;
|
|
1127
|
+
this.refresh();
|
|
1128
|
+
this.tui.requestRender();
|
|
1129
|
+
return;
|
|
1130
|
+
}
|
|
1131
|
+
if (data === "p") {
|
|
1132
|
+
if (!this.selectedPromptAudit()) this.setActionNotice({ text: "Prompt Audit is available only for a live child owned by this session.", isError: true });
|
|
1133
|
+
else {
|
|
1134
|
+
this.promptAuditOpen = true;
|
|
1135
|
+
this.promptAuditView = "authored";
|
|
1136
|
+
this.viewport.resetTop();
|
|
1137
|
+
this.actionNotice = void 0;
|
|
1138
|
+
this.tui.requestRender();
|
|
1139
|
+
}
|
|
1140
|
+
return;
|
|
1141
|
+
}
|
|
1142
|
+
if (matchesFleetAction(data, this.keybindings, "steer")) {
|
|
1143
|
+
const target = this.selectedSteerAction();
|
|
1144
|
+
if ("reason" in target || !this.options.actions) this.setActionNotice({ text: "reason" in target ? target.reason : "Fleet controls are unavailable in this context.", isError: true });
|
|
1145
|
+
else {
|
|
1146
|
+
this.actionNotice = void 0;
|
|
1147
|
+
this.steerDraft = "";
|
|
1148
|
+
this.viewport.resetTop();
|
|
1149
|
+
this.tui.requestRender();
|
|
1150
|
+
}
|
|
1151
|
+
return;
|
|
1152
|
+
}
|
|
1153
|
+
if (matchesFleetAction(data, this.keybindings, "stop")) {
|
|
1154
|
+
const target = this.selectedAsyncAction();
|
|
1155
|
+
if ("reason" in target || !this.options.actions) this.setActionNotice({ text: "reason" in target ? target.reason : "Fleet controls are unavailable in this context.", isError: true });
|
|
1156
|
+
else {
|
|
1157
|
+
this.actionNotice = void 0;
|
|
1158
|
+
this.stopConfirming = true;
|
|
1159
|
+
this.viewport.resetTop();
|
|
1160
|
+
this.tui.requestRender();
|
|
1161
|
+
}
|
|
1162
|
+
return;
|
|
1163
|
+
}
|
|
1164
|
+
if (matchesFleetAction(data, this.keybindings, "toggleTools")) {
|
|
1165
|
+
this.expandedTools = !this.expandedTools;
|
|
1166
|
+
this.transcriptCache = void 0;
|
|
1167
|
+
this.tui.requestRender();
|
|
1168
|
+
return;
|
|
1169
|
+
}
|
|
1170
|
+
if (matchesFleetAction(data, this.keybindings, "inspect")) {
|
|
1171
|
+
this.inspectSelected();
|
|
1172
|
+
return;
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1175
|
+
rosterLines(layout) {
|
|
1176
|
+
if (this.snapshot.items.length === 0) return [this.theme.fg("dim", "No tracked children")];
|
|
1177
|
+
return layout.rosterKeys.map((_key, offset) => {
|
|
1178
|
+
const index = layout.rosterStart + offset;
|
|
1179
|
+
const item = this.snapshot.items[index];
|
|
1180
|
+
const marker = index === this.selected ? this.theme.fg("accent", "\u203A") : " ";
|
|
1181
|
+
const context = item.kind === "async" ? contextModeBadge(this.theme, item.step?.context ?? item.run.context) : item.kind === "foreground-recent" ? contextModeBadge(this.theme, item.child.context) : "";
|
|
1182
|
+
const agent = index === this.selected ? this.theme.bold(item.agent) : item.agent;
|
|
1183
|
+
const identity = item.runId.slice(0, 8);
|
|
1184
|
+
const left = `${marker} ${statusGlyph(item, this.theme)} ${agent}${context} ${this.theme.fg("dim", `\xB7 ${identity}`)}`;
|
|
1185
|
+
return rightAligned(left, this.theme.fg("dim", item.state), layout.roster.width);
|
|
1186
|
+
});
|
|
1187
|
+
}
|
|
1188
|
+
renderedTranscript(target, width) {
|
|
1189
|
+
const fingerprint = `${target.trustedRoots.join("\0")}|${target.trustedFiles?.join("\0") ?? ""}|${target.trustedFileRoot ?? ""}|${transcriptFingerprint(target.path)}`;
|
|
1190
|
+
if (this.transcriptCache && this.transcriptCache.path === target.path && this.transcriptCache.fingerprint === fingerprint && this.transcriptCache.width === width && this.transcriptCache.expandedTools === this.expandedTools) {
|
|
1191
|
+
return { transcript: this.transcriptCache.transcript, body: [...this.transcriptCache.body] };
|
|
1192
|
+
}
|
|
1193
|
+
const transcript = readFleetTranscript(target.path, {
|
|
1194
|
+
trustedRoots: target.trustedRoots,
|
|
1195
|
+
...target.trustedFiles ? { trustedFiles: target.trustedFiles } : {},
|
|
1196
|
+
...target.trustedFileRoot ? { trustedFileRoot: target.trustedFileRoot } : {}
|
|
1197
|
+
});
|
|
1198
|
+
const body = transcript.events.length > 0 ? renderFleetTranscript(transcript, width, this.theme, this.markdownTheme, { expandedTools: this.expandedTools }) : [];
|
|
1199
|
+
this.transcriptCache = transcript.readFailed ? void 0 : { path: target.path, fingerprint, width, expandedTools: this.expandedTools, transcript, body };
|
|
1200
|
+
return { transcript, body: [...body] };
|
|
1201
|
+
}
|
|
1202
|
+
promptAuditDetail(width) {
|
|
1203
|
+
const selected = this.snapshot.items[this.selected];
|
|
1204
|
+
const prompt = this.selectedPromptAudit();
|
|
1205
|
+
const items = this.promptAuditItems();
|
|
1206
|
+
const selectedPosition = selected ? items.findIndex(({ item }) => item.key === selected.key) : -1;
|
|
1207
|
+
const live = selected?.kind === "foreground-active" ? selected.activeChild ?? selected.control : void 0;
|
|
1208
|
+
const viewLabel = promptAuditViewLabel(this.promptAuditView);
|
|
1209
|
+
const promptText = this.selectedPromptText() ?? this.theme.fg("muted", "Selected prompt unavailable.");
|
|
1210
|
+
const raw = [
|
|
1211
|
+
this.theme.bold("Prompt Audit"),
|
|
1212
|
+
this.theme.fg("dim", "Retention: live memory only \xB7 no storage"),
|
|
1213
|
+
selected?.kind === "foreground-active" ? `Run: ${selected.runId}${selected.index !== void 0 ? ` \xB7 Child: ${selected.index}` : ""} \xB7 Agent: ${selected.agent}` : "Selected prompt unavailable",
|
|
1214
|
+
live ? `Started: ${new Date(live.startedAt).toISOString()}` : void 0,
|
|
1215
|
+
live ? `Model: ${formatModelThinking(live.model, live.thinking) || "default"}` : void 0,
|
|
1216
|
+
prompt?.cwd ? `Cwd: ${prompt.cwd}` : void 0,
|
|
1217
|
+
prompt?.outputPath ? `Output: ${prompt.outputPath}` : void 0,
|
|
1218
|
+
this.theme.fg("dim", `Live children: ${items.map(({ item }) => item.agent).join(", ") || "none"}`),
|
|
1219
|
+
this.theme.fg("dim", selectedPosition >= 0 ? `Selected: ${selectedPosition + 1}/${items.length}` : "Selected prompt unavailable"),
|
|
1220
|
+
"",
|
|
1221
|
+
this.theme.fg("accent", viewLabel),
|
|
1222
|
+
promptText
|
|
1223
|
+
];
|
|
1224
|
+
const body = raw.filter((line) => line !== void 0).flatMap((line) => wrapTextWithAnsi(line, Math.max(1, width)));
|
|
1225
|
+
return { header: [], body: this.withActionLines(body) };
|
|
1226
|
+
}
|
|
1227
|
+
wrappedDetail(width) {
|
|
1228
|
+
if (this.promptAuditOpen) return this.promptAuditDetail(width);
|
|
1229
|
+
const selected = this.snapshot.items[this.selected];
|
|
1230
|
+
let transcriptWarning;
|
|
1231
|
+
if (selected) {
|
|
1232
|
+
const target = transcriptTarget(selected, this.state);
|
|
1233
|
+
if (target) {
|
|
1234
|
+
const { transcript, body } = this.renderedTranscript(target, width);
|
|
1235
|
+
transcriptWarning = transcript.warning;
|
|
1236
|
+
if (transcript.events.length > 0) {
|
|
1237
|
+
if (this.snapshot.error) body.unshift(this.theme.fg("warning", `Fleet scan warning: ${this.snapshot.error}`), "");
|
|
1238
|
+
const latest = transcript.events.at(-1);
|
|
1239
|
+
const conversationState = latest?.kind === "assistant" ? "assistant response" : latest?.kind === "user" ? "supervisor message" : latest?.kind === "tool" ? `${latest.name} \xB7 ${latest.status}` : "activity";
|
|
1240
|
+
const promptSummary = selected.kind === "foreground-active" ? foregroundAuthoredPromptSummary(selected, this.state) : void 0;
|
|
1241
|
+
return { header: structuredHeader(selected, width, this.theme, conversationState, promptSummary), body: this.withActionLines(body) };
|
|
1242
|
+
}
|
|
1243
|
+
}
|
|
1244
|
+
}
|
|
1245
|
+
const raw = detailLines(selected, this.snapshot.error, this.state);
|
|
1246
|
+
if (transcriptWarning) raw.unshift(`Transcript preview warning: ${transcriptWarning}`, "");
|
|
1247
|
+
const lines = [];
|
|
1248
|
+
for (const line of raw) {
|
|
1249
|
+
const styled = /^(Run|State|Mode|Source|Child|Agent|Model|Task):/.test(line) ? this.theme.bold(line) : /^(Transcript|Result transcript tail)/.test(line) ? this.theme.fg("accent", line) : /^(Output|Session|Transcript file|Artifacts):/.test(line) ? this.theme.fg("muted", line) : /^Transcript preview warning:/.test(line) ? this.theme.fg("warning", line) : line;
|
|
1250
|
+
const wrapped = wrapTextWithAnsi(styled, Math.max(1, width));
|
|
1251
|
+
lines.push(...wrapped.length ? wrapped : [""]);
|
|
1252
|
+
}
|
|
1253
|
+
return { header: [], body: this.withActionLines(lines) };
|
|
1254
|
+
}
|
|
1255
|
+
render(width) {
|
|
1256
|
+
const layout = fleetLayout(width, this.tui.terminal?.rows ?? 32, this.selected, this.snapshot.items);
|
|
1257
|
+
this.renderedLayout = layout;
|
|
1258
|
+
if (!layout) return [truncateToWidth("Subagent fleet needs at least 36 columns. Esc closes.", width)];
|
|
1259
|
+
const innerWidth = width - 2;
|
|
1260
|
+
const { bodyHeight } = layout;
|
|
1261
|
+
const rosterWidth = layout.roster.width;
|
|
1262
|
+
const detailWidth = layout.output.width;
|
|
1263
|
+
const roster = this.rosterLines(layout);
|
|
1264
|
+
const detail = this.wrappedDetail(detailWidth);
|
|
1265
|
+
const detailHeader = detail.header.slice(0, Math.max(0, bodyHeight - 1));
|
|
1266
|
+
const outputBodyHeight = bodyHeight - detailHeader.length;
|
|
1267
|
+
const visibleDetails = [
|
|
1268
|
+
...detailHeader,
|
|
1269
|
+
...this.viewport.render(detail.body, detailWidth, outputBodyHeight)
|
|
1270
|
+
];
|
|
1271
|
+
const lines = [this.theme.fg("border", `\u256D${"\u2500".repeat(innerWidth)}\u256E`)];
|
|
1272
|
+
const selected = this.snapshot.items[this.selected];
|
|
1273
|
+
const title = selected?.kind === "external" ? ` ${this.theme.bold("Fleet inspector")} ${this.theme.fg("dim", "\xB7 external display-only")}` : ` ${this.theme.bold("Subagent fleet inspector")} ${this.theme.fg("dim", "\xB7 live controls")}`;
|
|
1274
|
+
const selectedStatus = selected ? `${statusGlyph(selected, this.theme)} ${selected.agent} \xB7 ${selected.state} ` : this.theme.fg("dim", "no children ");
|
|
1275
|
+
lines.push(this.theme.fg("border", "\u2502") + rightAligned(title, selectedStatus, innerWidth) + this.theme.fg("border", "\u2502"));
|
|
1276
|
+
lines.push(this.theme.fg("border", `\u251C${"\u2500".repeat(rosterWidth)}\u252C${"\u2500".repeat(detailWidth)}\u2524`));
|
|
1277
|
+
for (let index = 0; index < bodyHeight; index++) {
|
|
1278
|
+
lines.push(
|
|
1279
|
+
this.theme.fg("border", "\u2502") + fit(roster[index] ?? "", rosterWidth) + this.theme.fg("border", "\u2502") + fit(visibleDetails[index] ?? "", detailWidth) + this.theme.fg("border", "\u2502")
|
|
1280
|
+
);
|
|
1281
|
+
}
|
|
1282
|
+
lines.push(this.theme.fg("border", `\u251C${"\u2500".repeat(rosterWidth)}\u2534${"\u2500".repeat(detailWidth)}\u2524`));
|
|
1283
|
+
const position = this.snapshot.items.length ? `${this.selected + 1}/${this.snapshot.items.length}` : "0/0";
|
|
1284
|
+
const footer = this.promptAuditOpen ? ` j/k child \xB7 1/2/3 view \xB7 g redo with guidance \xB7 c copy \xB7 Esc close Prompt Audit \xB7 ${position}` : selected?.kind === "external" ? ` ${bindingLabel(this.keybindings, "selectUp")}/${bindingLabel(this.keybindings, "selectDown")} job \xB7 display-only \xB7 ${bindingLabel(this.keybindings, "refresh")} refresh \xB7 ${bindingLabel(this.keybindings, "close")} close \xB7 ${position}` : ` ${bindingLabel(this.keybindings, "selectUp")}/${bindingLabel(this.keybindings, "selectDown")} agent \xB7 p Prompt Audit \xB7 ${bindingLabel(this.keybindings, "inspect")} Inspect \xB7 ${bindingLabel(this.keybindings, "steer")} steer \xB7 ${bindingLabel(this.keybindings, "stop")} stop \xB7 ${bindingLabel(this.keybindings, "toggleTools")} tools \xB7 ${bindingLabel(this.keybindings, "refresh")} refresh \xB7 ${bindingLabel(this.keybindings, "close")} close \xB7 ${position}`;
|
|
1285
|
+
lines.push(this.theme.fg("border", "\u2502") + fit(this.theme.fg("dim", footer), innerWidth) + this.theme.fg("border", "\u2502"));
|
|
1286
|
+
lines.push(this.theme.fg("border", `\u2570${"\u2500".repeat(innerWidth)}\u256F`));
|
|
1287
|
+
return lines.map((line) => truncateToWidth(line, width));
|
|
1288
|
+
}
|
|
1289
|
+
invalidate() {
|
|
1290
|
+
this.renderedLayout = void 0;
|
|
1291
|
+
this.transcriptCache = void 0;
|
|
1292
|
+
this.refresh();
|
|
1293
|
+
}
|
|
1294
|
+
dispose() {
|
|
1295
|
+
this.stopRefresh();
|
|
1296
|
+
}
|
|
1297
|
+
};
|
|
1298
|
+
async function openSubagentFleet(ctx, state, options = {}) {
|
|
1299
|
+
const wasOpen = state.fleetInspectorOpen === true;
|
|
1300
|
+
state.fleetInspectorOpen = true;
|
|
1301
|
+
if (typeof ctx.ui.setWidget === "function") ctx.ui.setWidget(FLEET_STATUS_WIDGET_KEY, void 0);
|
|
1302
|
+
const copyText = options.copyText ?? (async (text) => {
|
|
1303
|
+
const module = await import("@earendil-works/pi-coding-agent");
|
|
1304
|
+
const copyToClipboard = module.copyToClipboard;
|
|
1305
|
+
if (!copyToClipboard) throw new Error("Clipboard is unavailable in this Pi version.");
|
|
1306
|
+
await copyToClipboard(text);
|
|
1307
|
+
});
|
|
1308
|
+
const actions = options.actions ?? {
|
|
1309
|
+
steer: async (input) => {
|
|
1310
|
+
const status = readStatus(input.asyncDir);
|
|
1311
|
+
const liveWorkflowRunId = status?.mode === "workflow" && state.workflowControllers?.has(status.runId || input.runId) ? status.runId || input.runId : void 0;
|
|
1312
|
+
if (liveWorkflowRunId) {
|
|
1313
|
+
const route = state.foregroundControls.get(input.runId)?.parentWorkflowRunId === liveWorkflowRunId ? resolveWorkflowForegroundSteeringTarget({ state, childRunId: input.runId, asyncDirRoot: options.asyncDirRoot ?? DIRS.async }) : resolveWorkflowForegroundSteeringTarget({ state, workflowRunId: liveWorkflowRunId, asyncDirRoot: options.asyncDirRoot ?? DIRS.async });
|
|
1314
|
+
if (!route.ok) return { text: route.message, isError: true };
|
|
1315
|
+
return firstToolResultText(await steerWorkflowForegroundTarget({ target: route.target, message: input.message, mode: input.mode, ...input.index !== void 0 ? { index: input.index } : {} }), `Failed to steer foreground run ${input.runId}.`);
|
|
1316
|
+
}
|
|
1317
|
+
return firstToolResultText(await steerAsyncRun({
|
|
1318
|
+
state,
|
|
1319
|
+
runId: input.runId,
|
|
1320
|
+
...input.index !== void 0 ? { index: input.index } : {},
|
|
1321
|
+
message: input.message,
|
|
1322
|
+
mode: input.mode,
|
|
1323
|
+
location: { asyncDir: input.asyncDir, resolvedId: input.runId }
|
|
1324
|
+
}), `Failed to steer async run ${input.runId}.`);
|
|
1325
|
+
},
|
|
1326
|
+
stop: (input) => firstToolResultText(stopAsyncRun(state, input.runId, void 0, { asyncDir: input.asyncDir, resolvedId: input.runId }), `Failed to stop async run ${input.runId}.`),
|
|
1327
|
+
inspect: async (input) => firstToolResultText(await handleInspectorAction("inspector.open", {
|
|
1328
|
+
id: input.runId,
|
|
1329
|
+
dir: input.asyncDir,
|
|
1330
|
+
focus: true,
|
|
1331
|
+
...input.index !== void 0 ? { index: input.index } : {}
|
|
1332
|
+
}, {
|
|
1333
|
+
state,
|
|
1334
|
+
sessionRoots: state.trustedSessionRoots,
|
|
1335
|
+
cwd: state.baseCwd,
|
|
1336
|
+
...state.authorityPolicy ? { authorityPolicy: state.authorityPolicy } : {},
|
|
1337
|
+
...state.missionStoreConfig ? { missions: state.missionStoreConfig } : {},
|
|
1338
|
+
plugins: options.inspectorPlugins?.(),
|
|
1339
|
+
...options.inspectorEnv ? { env: options.inspectorEnv } : {}
|
|
1340
|
+
}), `Failed to open inspector for async run ${input.runId}.`),
|
|
1341
|
+
redoPrompt: async (input) => {
|
|
1342
|
+
const control = input.control ?? state.foregroundControls.get(input.runId);
|
|
1343
|
+
if (!control?.promptAuditRedo) return { text: "Redo is not available for this live child.", isError: true };
|
|
1344
|
+
return control.promptAuditRedo(input.index, input.guidance);
|
|
1345
|
+
}
|
|
1346
|
+
};
|
|
1347
|
+
try {
|
|
1348
|
+
await ctx.ui.custom(
|
|
1349
|
+
(tui, theme, _keybindings, done) => new SubagentFleetComponent(tui, theme, state, done, { ...options, actions, copyText }),
|
|
1350
|
+
{
|
|
1351
|
+
overlay: true,
|
|
1352
|
+
overlayOptions: { anchor: "center", width: "95%", minWidth: 60, maxHeight: "85%", margin: 1 }
|
|
1353
|
+
}
|
|
1354
|
+
);
|
|
1355
|
+
} finally {
|
|
1356
|
+
state.fleetInspectorOpen = wasOpen;
|
|
1357
|
+
}
|
|
1358
|
+
}
|
|
1359
|
+
export {
|
|
1360
|
+
DEFAULT_FLEET_KEYBINDINGS,
|
|
1361
|
+
SubagentFleetComponent,
|
|
1362
|
+
collectFleetSnapshot,
|
|
1363
|
+
openSubagentFleet,
|
|
1364
|
+
resolveFleetKeybindings
|
|
1365
|
+
};
|