@selesai/code 0.6.3 → 0.8.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 +22 -1
- package/README.md +5 -3
- package/dist/bun/cli.d.ts +0 -1
- package/dist/bun/cli.js +0 -1
- package/dist/bun/register-bedrock.d.ts +0 -1
- package/dist/bun/register-bedrock.js +0 -1
- package/dist/bun/restore-sandbox-env.d.ts +0 -1
- package/dist/bun/restore-sandbox-env.js +0 -1
- package/dist/cli/args.d.ts +0 -1
- package/dist/cli/args.js +0 -1
- package/dist/cli/config-selector.d.ts +0 -1
- package/dist/cli/config-selector.js +0 -1
- package/dist/cli/credential-print.d.ts +0 -1
- package/dist/cli/credential-print.js +0 -1
- package/dist/cli/file-processor.d.ts +0 -1
- package/dist/cli/file-processor.js +0 -1
- package/dist/cli/initial-message.d.ts +0 -1
- package/dist/cli/initial-message.js +0 -1
- package/dist/cli/list-models.d.ts +0 -1
- package/dist/cli/list-models.js +0 -1
- package/dist/cli/project-trust.d.ts +0 -1
- package/dist/cli/project-trust.js +0 -1
- package/dist/cli/session-picker.d.ts +0 -1
- package/dist/cli/session-picker.js +0 -1
- package/dist/cli/startup-ui.d.ts +0 -1
- package/dist/cli/startup-ui.js +0 -1
- package/dist/cli.d.ts +0 -1
- package/dist/cli.js +0 -1
- package/dist/config.d.ts +0 -1
- package/dist/config.js +0 -1
- package/dist/core/agent-session-auto-handoff.test.d.ts +0 -1
- package/dist/core/agent-session-auto-handoff.test.js +0 -1
- package/dist/core/agent-session-runtime.d.ts +0 -1
- package/dist/core/agent-session-runtime.js +0 -1
- package/dist/core/agent-session-services.d.ts +0 -1
- package/dist/core/agent-session-services.js +0 -1
- package/dist/core/agent-session-skill-block.test.d.ts +0 -1
- package/dist/core/agent-session-skill-block.test.js +0 -1
- package/dist/core/agent-session.d.ts +0 -1
- package/dist/core/agent-session.js +0 -1
- package/dist/core/agents.d.ts +0 -1
- package/dist/core/agents.js +0 -1
- package/dist/core/auth-guidance.d.ts +0 -1
- package/dist/core/auth-guidance.js +0 -1
- package/dist/core/auth-storage.d.ts +0 -1
- package/dist/core/auth-storage.js +0 -1
- package/dist/core/bash-executor.d.ts +0 -1
- package/dist/core/bash-executor.js +0 -1
- package/dist/core/built-in-extensions.d.ts +0 -1
- package/dist/core/built-in-extensions.js +0 -1
- package/dist/core/cache-stats.d.ts +0 -1
- package/dist/core/cache-stats.js +0 -1
- package/dist/core/compaction/branch-summarization.d.ts +0 -1
- package/dist/core/compaction/branch-summarization.js +0 -1
- package/dist/core/compaction/compaction.d.ts +0 -1
- package/dist/core/compaction/compaction.js +0 -1
- package/dist/core/compaction/index.d.ts +0 -1
- package/dist/core/compaction/index.js +0 -1
- package/dist/core/compaction/utils.d.ts +0 -1
- package/dist/core/compaction/utils.js +0 -1
- package/dist/core/defaults.d.ts +0 -1
- package/dist/core/defaults.js +0 -1
- package/dist/core/diagnostics.d.ts +0 -1
- package/dist/core/diagnostics.js +0 -1
- package/dist/core/event-bus.d.ts +0 -1
- package/dist/core/event-bus.js +0 -1
- package/dist/core/exec.d.ts +0 -1
- package/dist/core/exec.js +0 -1
- package/dist/core/experimental.d.ts +0 -1
- package/dist/core/experimental.js +0 -1
- package/dist/core/export-html/ansi-to-html.d.ts +0 -1
- package/dist/core/export-html/ansi-to-html.js +0 -1
- package/dist/core/export-html/index.d.ts +0 -1
- package/dist/core/export-html/index.js +0 -1
- package/dist/core/export-html/tool-renderer.d.ts +0 -1
- package/dist/core/export-html/tool-renderer.js +0 -1
- package/dist/core/extensions/index.d.ts +0 -1
- package/dist/core/extensions/index.js +0 -1
- package/dist/core/extensions/loader.d.ts +0 -1
- package/dist/core/extensions/loader.js +0 -1
- package/dist/core/extensions/runner.d.ts +0 -1
- package/dist/core/extensions/runner.js +0 -1
- package/dist/core/extensions/types.d.ts +0 -1
- package/dist/core/extensions/types.js +0 -1
- package/dist/core/extensions/wrapper.d.ts +0 -1
- package/dist/core/extensions/wrapper.js +0 -1
- package/dist/core/footer-data-provider.d.ts +0 -1
- package/dist/core/footer-data-provider.js +0 -1
- package/dist/core/git-command.d.ts +0 -1
- package/dist/core/git-command.js +0 -1
- package/dist/core/http-dispatcher.d.ts +0 -1
- package/dist/core/http-dispatcher.js +0 -1
- package/dist/core/index.d.ts +0 -1
- package/dist/core/index.js +0 -1
- package/dist/core/keybindings.d.ts +0 -1
- package/dist/core/keybindings.js +0 -1
- package/dist/core/llama/client.d.ts +0 -1
- package/dist/core/llama/client.js +0 -1
- package/dist/core/llama/huggingface.d.ts +0 -1
- package/dist/core/llama/huggingface.js +0 -1
- package/dist/core/llama/index.d.ts +0 -1
- package/dist/core/llama/index.js +0 -1
- package/dist/core/llama/provider.d.ts +0 -1
- package/dist/core/llama/provider.js +0 -1
- package/dist/core/llama/ui.d.ts +0 -1
- package/dist/core/llama/ui.js +0 -1
- package/dist/core/messages.d.ts +0 -1
- package/dist/core/messages.js +0 -1
- package/dist/core/model-config.d.ts +0 -1
- package/dist/core/model-config.js +0 -1
- package/dist/core/model-registry.d.ts +0 -1
- package/dist/core/model-registry.js +0 -1
- package/dist/core/model-resolver.d.ts +0 -1
- package/dist/core/model-resolver.js +0 -1
- package/dist/core/model-runtime.d.ts +0 -1
- package/dist/core/model-runtime.js +0 -1
- package/dist/core/models-store.d.ts +0 -1
- package/dist/core/models-store.js +0 -1
- package/dist/core/output-guard.d.ts +0 -1
- package/dist/core/output-guard.js +0 -1
- package/dist/core/package-manager.d.ts +0 -1
- package/dist/core/package-manager.js +0 -1
- package/dist/core/package-manager.test.d.ts +0 -1
- package/dist/core/package-manager.test.js +0 -1
- package/dist/core/project-trust.d.ts +0 -1
- package/dist/core/project-trust.js +0 -1
- package/dist/core/prompt-templates.d.ts +0 -1
- package/dist/core/prompt-templates.js +0 -1
- package/dist/core/provider-attribution.d.ts +0 -1
- package/dist/core/provider-attribution.js +0 -1
- package/dist/core/provider-composer.d.ts +0 -1
- package/dist/core/provider-composer.js +0 -1
- package/dist/core/radius.d.ts +0 -1
- package/dist/core/radius.js +0 -1
- package/dist/core/remote-catalog-provider.d.ts +0 -1
- package/dist/core/remote-catalog-provider.js +0 -1
- package/dist/core/resolve-config-value.d.ts +0 -1
- package/dist/core/resolve-config-value.js +0 -1
- package/dist/core/resource-loader.d.ts +0 -1
- package/dist/core/resource-loader.js +0 -1
- package/dist/core/runtime-credentials.d.ts +0 -1
- package/dist/core/runtime-credentials.js +0 -1
- package/dist/core/sdk.d.ts +0 -1
- package/dist/core/sdk.js +0 -1
- package/dist/core/session-cwd.d.ts +0 -1
- package/dist/core/session-cwd.js +0 -1
- package/dist/core/session-manager.d.ts +0 -1
- package/dist/core/session-manager.js +0 -1
- package/dist/core/settings-manager-auto-handoff.test.d.ts +0 -1
- package/dist/core/settings-manager-auto-handoff.test.js +0 -1
- package/dist/core/settings-manager.d.ts +0 -4
- package/dist/core/settings-manager.js +0 -12
- package/dist/core/skills.d.ts +0 -1
- package/dist/core/skills.js +0 -1
- package/dist/core/slash-commands.d.ts +0 -1
- package/dist/core/slash-commands.js +0 -1
- package/dist/core/source-info.d.ts +0 -1
- package/dist/core/source-info.js +0 -1
- package/dist/core/system-prompt.d.ts +0 -1
- package/dist/core/system-prompt.js +0 -1
- package/dist/core/system-prompt.test.d.ts +0 -1
- package/dist/core/system-prompt.test.js +0 -1
- package/dist/core/telemetry.d.ts +0 -1
- package/dist/core/telemetry.js +0 -1
- package/dist/core/timings.d.ts +0 -1
- package/dist/core/timings.js +0 -1
- package/dist/core/tools/bash.d.ts +0 -1
- package/dist/core/tools/bash.js +0 -1
- package/dist/core/tools/edit-diff.d.ts +0 -1
- package/dist/core/tools/edit-diff.js +0 -1
- package/dist/core/tools/edit.d.ts +0 -1
- package/dist/core/tools/edit.js +0 -1
- package/dist/core/tools/file-mutation-queue.d.ts +0 -1
- package/dist/core/tools/file-mutation-queue.js +0 -1
- package/dist/core/tools/find.d.ts +0 -1
- package/dist/core/tools/find.js +0 -1
- package/dist/core/tools/grep.d.ts +0 -1
- package/dist/core/tools/grep.js +0 -1
- package/dist/core/tools/index.d.ts +0 -1
- package/dist/core/tools/index.js +0 -1
- package/dist/core/tools/ls.d.ts +0 -1
- package/dist/core/tools/ls.js +0 -1
- package/dist/core/tools/output-accumulator.d.ts +0 -1
- package/dist/core/tools/output-accumulator.js +0 -1
- package/dist/core/tools/path-utils.d.ts +0 -1
- package/dist/core/tools/path-utils.js +0 -1
- package/dist/core/tools/read.d.ts +0 -1
- package/dist/core/tools/read.js +0 -1
- package/dist/core/tools/render-utils.d.ts +0 -1
- package/dist/core/tools/render-utils.js +0 -1
- package/dist/core/tools/tool-definition-wrapper.d.ts +0 -1
- package/dist/core/tools/tool-definition-wrapper.js +0 -1
- package/dist/core/tools/truncate.d.ts +0 -1
- package/dist/core/tools/truncate.js +0 -1
- package/dist/core/tools/write.d.ts +0 -1
- package/dist/core/tools/write.js +0 -1
- package/dist/core/trust-manager.d.ts +0 -1
- package/dist/core/trust-manager.js +0 -1
- package/dist/core/usage-totals.d.ts +0 -1
- package/dist/core/usage-totals.js +0 -1
- package/dist/defaults/models.json +8 -0
- package/dist/defaults/settings.json +6 -7
- package/dist/extensions/agent-browser.test.ts +195 -0
- package/dist/extensions/agent-browser.ts +158 -0
- package/dist/extensions/inline-skills.test.ts +27 -13
- package/dist/extensions/inline-skills.ts +18 -11
- package/dist/extensions/package.json +2 -1
- package/dist/extensions/pi-powerline-footer/.github/workflows/test.yml +27 -0
- package/dist/extensions/pi-powerline-footer/CHANGELOG.md +153 -0
- package/dist/extensions/pi-powerline-footer/CONTRIBUTING.md +16 -0
- package/dist/extensions/pi-powerline-footer/README.md +192 -44
- package/dist/extensions/pi-powerline-footer/bash-mode/completion.ts +19 -4
- package/dist/extensions/pi-powerline-footer/bash-mode/editor.ts +80 -25
- package/dist/extensions/pi-powerline-footer/bash-mode/history.ts +81 -29
- package/dist/extensions/pi-powerline-footer/bash-mode/types.ts +1 -1
- package/dist/extensions/pi-powerline-footer/cd-command.ts +190 -0
- package/dist/extensions/pi-powerline-footer/colors.ts +2 -1
- package/dist/extensions/pi-powerline-footer/context-usage.ts +121 -6
- package/dist/extensions/pi-powerline-footer/currency-rates.ts +142 -0
- package/dist/extensions/pi-powerline-footer/editor-composition.ts +32 -0
- package/dist/extensions/pi-powerline-footer/git-status.ts +108 -6
- package/dist/extensions/pi-powerline-footer/icons.ts +11 -2
- package/dist/extensions/pi-powerline-footer/index.ts +1056 -324
- package/dist/extensions/pi-powerline-footer/lifecycle.ts +10 -0
- package/dist/extensions/pi-powerline-footer/package.json +10 -6
- package/dist/extensions/pi-powerline-footer/paths.ts +22 -0
- package/dist/extensions/pi-powerline-footer/powerline-config.ts +297 -15
- package/dist/extensions/pi-powerline-footer/presets.ts +6 -25
- package/dist/extensions/pi-powerline-footer/queue/store.ts +361 -0
- package/dist/extensions/pi-powerline-footer/queue/types.ts +54 -0
- package/dist/extensions/pi-powerline-footer/render-scheduler.ts +12 -7
- package/dist/extensions/pi-powerline-footer/segments.ts +114 -107
- package/dist/extensions/pi-powerline-footer/session-usage.ts +1 -1
- package/dist/extensions/pi-powerline-footer/shortcuts.ts +17 -3
- package/dist/extensions/pi-powerline-footer/tests/bash-mode.test.ts +189 -17
- package/dist/extensions/pi-powerline-footer/tests/cd-command.test.ts +144 -0
- package/dist/extensions/pi-powerline-footer/tests/context-usage.test.ts +120 -2
- package/dist/extensions/pi-powerline-footer/tests/custom-items.test.ts +245 -22
- package/dist/extensions/pi-powerline-footer/tests/editor-composition.test.ts +48 -0
- package/dist/extensions/pi-powerline-footer/tests/editor-responsiveness.test.ts +34 -0
- package/dist/extensions/pi-powerline-footer/tests/fixed-editor-border.test.ts +39 -0
- package/dist/extensions/pi-powerline-footer/tests/git-status.test.ts +92 -0
- package/dist/extensions/pi-powerline-footer/tests/guide.test.ts +4 -1
- package/dist/extensions/pi-powerline-footer/tests/jump-shortcuts.test.ts +33 -197
- package/dist/extensions/pi-powerline-footer/tests/mode-aware-trigger.test.ts +79 -0
- package/dist/extensions/pi-powerline-footer/tests/paths.test.ts +63 -0
- package/dist/extensions/pi-powerline-footer/tests/queue-store.test.ts +195 -0
- package/dist/extensions/pi-powerline-footer/tests/quit-cursor.test.ts +14 -0
- package/dist/extensions/pi-powerline-footer/tests/remaining-regressions.test.ts +167 -0
- package/dist/extensions/pi-powerline-footer/tests/stash-shortcut.test.ts +23 -18
- package/dist/extensions/pi-powerline-footer/tests/thinking-segment.test.ts +16 -1
- package/dist/extensions/pi-powerline-footer/tests/token-stats.test.ts +249 -0
- package/dist/extensions/pi-powerline-footer/tests/usage-display.test.ts +237 -0
- package/dist/extensions/pi-powerline-footer/tests/welcome.test.ts +199 -0
- package/dist/extensions/pi-powerline-footer/tests/working-vibes.test.ts +191 -100
- package/dist/extensions/pi-powerline-footer/theme.ts +32 -18
- package/dist/extensions/pi-powerline-footer/token-stats.ts +304 -0
- package/dist/extensions/pi-powerline-footer/tsconfig.json +13 -0
- package/dist/extensions/pi-powerline-footer/types.ts +74 -29
- package/dist/extensions/pi-powerline-footer/welcome-dismiss.ts +34 -0
- package/dist/extensions/pi-powerline-footer/welcome.ts +65 -10
- package/dist/extensions/pi-powerline-footer/working-vibes.ts +44 -11
- package/dist/extensions/pi-subagents/CHANGELOG.md +89 -12
- package/dist/extensions/pi-subagents/README.md +339 -604
- package/dist/extensions/pi-subagents/package-lock.json +190 -2079
- package/dist/extensions/pi-subagents/package.json +13 -5
- package/dist/extensions/pi-subagents/prompts/parallel-context-build.md +1 -1
- package/dist/extensions/pi-subagents/prompts/parallel-handoff-plan.md +1 -1
- package/dist/extensions/pi-subagents/prompts/review-loop.md +1 -1
- package/dist/extensions/pi-subagents/skills/pi-subagents/SKILL.md +10 -10
- package/dist/extensions/pi-subagents/skills/pi-subagents/references/constraints-and-recipes.md +32 -43
- package/dist/extensions/pi-subagents/skills/pi-subagents/references/execution-controls.md +106 -105
- package/dist/extensions/pi-subagents/skills/pi-subagents/references/management-authoring-rpc.md +3 -3
- package/dist/extensions/pi-subagents/skills/pi-subagents/references/prompting-and-roles.md +28 -35
- package/dist/extensions/pi-subagents/src/agents/agent-management.ts +167 -124
- package/dist/extensions/pi-subagents/src/agents/agent-serializer.ts +19 -0
- package/dist/extensions/pi-subagents/src/agents/agents.ts +163 -75
- package/dist/extensions/pi-subagents/src/agents/chain-serializer.ts +10 -7
- package/dist/extensions/pi-subagents/src/agents/frontmatter.ts +5 -3
- package/dist/extensions/pi-subagents/src/agents/identity.ts +1 -1
- package/dist/extensions/pi-subagents/src/agents/proactive-skills.ts +14 -11
- package/dist/extensions/pi-subagents/src/agents/skills.ts +23 -6
- package/dist/extensions/pi-subagents/src/agents/task-aware-routing.ts +8 -1
- package/dist/extensions/pi-subagents/src/api/control-channel.ts +4 -0
- package/dist/extensions/pi-subagents/src/api/delegation.ts +26 -194
- package/dist/extensions/pi-subagents/src/api/external-runs.ts +129 -0
- package/dist/extensions/pi-subagents/src/api/intercom-bridge.ts +3 -0
- package/dist/extensions/pi-subagents/src/api/pi-args.ts +5 -0
- package/dist/extensions/pi-subagents/src/api/preflight.ts +4 -4
- package/dist/extensions/pi-subagents/src/api/shared-types.ts +19 -0
- package/dist/extensions/pi-subagents/src/extension/config.ts +10 -0
- package/dist/extensions/pi-subagents/src/extension/control-notices.ts +5 -39
- package/dist/extensions/pi-subagents/src/extension/doctor.ts +10 -9
- package/dist/extensions/pi-subagents/src/extension/fanout-child.ts +7 -4
- package/dist/extensions/pi-subagents/src/extension/index.ts +243 -77
- package/dist/extensions/pi-subagents/src/extension/rpc.ts +18 -6
- package/dist/extensions/pi-subagents/src/extension/schemas.ts +50 -39
- package/dist/extensions/pi-subagents/src/extension/tool-description.ts +36 -103
- package/dist/extensions/pi-subagents/src/inspectors/herdr/actions.ts +229 -0
- package/dist/extensions/pi-subagents/src/inspectors/herdr/client.ts +130 -0
- package/dist/extensions/pi-subagents/src/inspectors/herdr/inspector-runner.ts +141 -0
- package/dist/extensions/pi-subagents/src/inspectors/herdr/project-panes.ts +154 -0
- package/dist/extensions/pi-subagents/src/integrations/herdr-status.ts +330 -0
- package/dist/extensions/pi-subagents/src/intercom/intercom-bridge.ts +3 -2
- package/dist/extensions/pi-subagents/src/intercom/result-intercom.ts +5 -1
- package/dist/extensions/pi-subagents/src/missions/actions.ts +372 -0
- package/dist/extensions/pi-subagents/src/missions/lifecycle.ts +314 -0
- package/dist/extensions/pi-subagents/src/missions/store.ts +442 -0
- package/dist/extensions/pi-subagents/src/missions/types.ts +135 -0
- package/dist/extensions/pi-subagents/src/policy/authority.ts +46 -0
- package/dist/extensions/pi-subagents/src/profiles/profiles.ts +32 -6
- package/dist/extensions/pi-subagents/src/runs/background/async-execution.ts +103 -72
- package/dist/extensions/pi-subagents/src/runs/background/async-job-tracker.ts +10 -2
- package/dist/extensions/pi-subagents/src/runs/background/async-resume.ts +6 -6
- package/dist/extensions/pi-subagents/src/runs/background/async-status.ts +29 -1
- package/dist/extensions/pi-subagents/src/runs/background/auto-drain.ts +3 -3
- package/dist/extensions/pi-subagents/src/runs/background/chain-append.ts +3 -2
- package/dist/extensions/pi-subagents/src/runs/background/control-channel.ts +9 -7
- package/dist/extensions/pi-subagents/src/runs/background/fleet-view.ts +3 -4
- package/dist/extensions/pi-subagents/src/runs/background/notify.ts +3 -28
- package/dist/extensions/pi-subagents/src/runs/background/process-terminal.ts +5 -5
- package/dist/extensions/pi-subagents/src/runs/background/result-watcher.ts +18 -68
- package/dist/extensions/pi-subagents/src/runs/background/run-id-resolver.ts +3 -3
- package/dist/extensions/pi-subagents/src/runs/background/run-status.ts +35 -8
- package/dist/extensions/pi-subagents/src/runs/background/scheduled-runs.ts +602 -375
- package/dist/extensions/pi-subagents/src/runs/background/stale-run-reconciler.ts +3 -3
- package/dist/extensions/pi-subagents/src/runs/background/subagent-runner.ts +612 -464
- package/dist/extensions/pi-subagents/src/runs/background/subagent-wait.ts +50 -9
- package/dist/extensions/pi-subagents/src/runs/background/wait-subscriptions.ts +253 -0
- package/dist/extensions/pi-subagents/src/runs/background/wait-tool.ts +12 -4
- package/dist/extensions/pi-subagents/src/runs/foreground/async-steering-action.ts +3 -3
- package/dist/extensions/pi-subagents/src/runs/foreground/chain-clarify.ts +8 -4
- package/dist/extensions/pi-subagents/src/runs/foreground/chain-execution.ts +74 -102
- package/dist/extensions/pi-subagents/src/runs/foreground/execution.ts +21 -22
- package/dist/extensions/pi-subagents/src/runs/foreground/subagent-executor.ts +1050 -396
- package/dist/extensions/pi-subagents/src/runs/shared/acceptance.ts +44 -18
- package/dist/extensions/pi-subagents/src/runs/shared/capability-ceiling.ts +0 -1
- package/dist/extensions/pi-subagents/src/runs/shared/child-protocol.ts +302 -22
- package/dist/extensions/pi-subagents/src/runs/shared/dynamic-fanout.ts +1 -1
- package/dist/extensions/pi-subagents/src/runs/shared/external-cli-runner.ts +130 -0
- package/dist/extensions/pi-subagents/src/runs/shared/long-running-guard.ts +42 -1
- package/dist/extensions/pi-subagents/src/runs/shared/model-fallback.ts +1 -1
- package/dist/extensions/pi-subagents/src/runs/shared/nested-events.ts +59 -5
- package/dist/extensions/pi-subagents/src/runs/shared/nested-render.ts +9 -4
- package/dist/extensions/pi-subagents/src/runs/shared/parallel-handoff.ts +86 -2
- package/dist/extensions/pi-subagents/src/runs/shared/parallel-utils.ts +11 -2
- package/dist/extensions/pi-subagents/src/runs/shared/permissions.ts +95 -0
- package/dist/extensions/pi-subagents/src/runs/shared/pi-args.ts +11 -1
- package/dist/extensions/pi-subagents/src/runs/shared/pi-spawn.ts +15 -6
- package/dist/extensions/pi-subagents/src/runs/shared/run-history.ts +1 -1
- package/dist/extensions/pi-subagents/src/runs/shared/single-output.ts +9 -63
- package/dist/extensions/pi-subagents/src/runs/shared/subagent-prompt-runtime.ts +37 -6
- package/dist/extensions/pi-subagents/src/runs/shared/subagent-startup-retry.ts +5 -2
- package/dist/extensions/pi-subagents/src/runs/shared/task-intent.ts +2 -23
- package/dist/extensions/pi-subagents/src/runs/shared/turn-budget.ts +6 -6
- package/dist/extensions/pi-subagents/src/runs/shared/worktree.ts +124 -13
- package/dist/extensions/pi-subagents/src/shared/accessible-dir.ts +29 -7
- package/dist/extensions/pi-subagents/src/shared/artifacts.ts +18 -1
- package/dist/extensions/pi-subagents/src/shared/fork-context.ts +3 -2
- package/dist/extensions/pi-subagents/src/shared/launch-contract.ts +1 -0
- package/dist/extensions/pi-subagents/src/shared/settings.ts +10 -0
- package/dist/extensions/pi-subagents/src/shared/types.ts +158 -55
- package/dist/extensions/pi-subagents/src/shared/utils.ts +16 -66
- package/dist/extensions/pi-subagents/src/slash/delegation-adapters.ts +33 -199
- package/dist/extensions/pi-subagents/src/slash/delegation-request.ts +43 -126
- package/dist/extensions/pi-subagents/src/slash/inline-subagents.ts +136 -0
- package/dist/extensions/pi-subagents/src/slash/prompt-template-bridge.ts +158 -205
- package/dist/extensions/pi-subagents/src/slash/prompt-workflows.ts +22 -58
- package/dist/extensions/pi-subagents/src/slash/slash-bridge.ts +14 -0
- package/dist/extensions/pi-subagents/src/slash/slash-commands.ts +44 -642
- package/dist/extensions/pi-subagents/src/slash/subagents-admin.ts +18 -14
- package/dist/extensions/pi-subagents/src/tui/fleet-status.ts +156 -21
- package/dist/extensions/pi-subagents/src/tui/fleet-transcript.ts +110 -5
- package/dist/extensions/pi-subagents/src/tui/fleet.ts +60 -24
- package/dist/extensions/pi-subagents/src/tui/render.ts +296 -140
- package/dist/extensions/pi-subagents/src/types/pi-runtime-compat.d.ts +14 -0
- package/dist/extensions/pi-subagents/src/watchdog/change-signature.ts +1 -1
- package/dist/extensions/pi-subagents/src/watchdog/lsp-diagnostics.ts +13 -7
- package/dist/extensions/pi-subagents/src/watchdog/model-selection.ts +2 -2
- package/dist/extensions/pi-subagents/src/watchdog/permission-arbiter.ts +145 -0
- package/dist/extensions/pi-subagents/src/watchdog/register-child.ts +1 -1
- package/dist/extensions/pi-subagents/src/watchdog/register-main.ts +1 -1
- package/dist/extensions/pi-subagents/src/watchdog/review.ts +4 -1
- package/dist/extensions/pi-subagents/src/watchdog/runtime.ts +3 -2
- package/dist/extensions/pi-subagents/src/workflows/chat-progress.ts +140 -0
- package/dist/extensions/pi-subagents/src/workflows/scripted-workflow.ts +415 -0
- package/dist/extensions/pi-subagents/test/e2e/real-session-subagent.test.ts +41 -144
- package/dist/extensions/pi-subagents/test/integration/acceptance-file-report.test.ts +16 -16
- package/dist/extensions/pi-subagents/test/integration/async-execution.test.ts +415 -298
- package/dist/extensions/pi-subagents/test/integration/async-job-tracker.test.ts +149 -82
- package/dist/extensions/pi-subagents/test/integration/async-status.test.ts +40 -40
- package/dist/extensions/pi-subagents/test/integration/chain-clarify.test.ts +15 -15
- package/dist/extensions/pi-subagents/test/integration/chain-execution.test.ts +193 -133
- package/dist/extensions/pi-subagents/test/integration/detect-error.test.ts +1 -49
- package/dist/extensions/pi-subagents/test/integration/external-cli-runner.test.ts +62 -0
- package/dist/extensions/pi-subagents/test/integration/fork-context-execution.test.ts +56 -58
- package/dist/extensions/pi-subagents/test/integration/intercom-result-delivery.test.ts +81 -68
- package/dist/extensions/pi-subagents/test/integration/parallel-execution.test.ts +20 -25
- package/dist/extensions/pi-subagents/test/integration/render-fork-badge.test.ts +425 -317
- package/dist/extensions/pi-subagents/test/integration/render-widget.test.ts +73 -73
- package/dist/extensions/pi-subagents/test/integration/result-watcher.test.ts +123 -98
- package/dist/extensions/pi-subagents/test/integration/single-execution.test.ts +653 -240
- package/dist/extensions/pi-subagents/test/integration/slash-commands.test.ts +20 -1661
- package/dist/extensions/pi-subagents/test/integration/slash-live-state.test.ts +9 -9
- package/dist/extensions/pi-subagents/test/integration/template-resolution.test.ts +3 -3
- package/dist/extensions/pi-subagents/test/integration/top-level-async.test.ts +2 -2
- package/dist/extensions/pi-subagents/test/support/mock-pi-script.mjs +8 -5
- package/dist/extensions/pi-subagents/test/support/mock-pi.ts +6 -6
- package/dist/extensions/pi-subagents/test/support/real-session-runner.ts +4 -20
- package/dist/extensions/pi-subagents/test/unit/acceptance.test.ts +25 -4
- package/dist/extensions/pi-subagents/test/unit/agent-disabled.test.ts +1 -1
- package/dist/extensions/pi-subagents/test/unit/agent-frontmatter.test.ts +280 -295
- package/dist/extensions/pi-subagents/test/unit/agent-management.test.ts +47 -207
- package/dist/extensions/pi-subagents/test/unit/agent-memory.test.ts +26 -26
- package/dist/extensions/pi-subagents/test/unit/agent-overrides.test.ts +89 -89
- package/dist/extensions/pi-subagents/test/unit/agent-selection.test.ts +9 -9
- package/dist/extensions/pi-subagents/test/unit/artifacts.test.ts +10 -0
- package/dist/extensions/pi-subagents/test/unit/async-execution.test.ts +33 -9
- package/dist/extensions/pi-subagents/test/unit/async-interrupt-action.test.ts +24 -2
- package/dist/extensions/pi-subagents/test/unit/async-permission-session.test.ts +11 -9
- package/dist/extensions/pi-subagents/test/unit/async-recovery-descriptor.test.ts +2 -2
- package/dist/extensions/pi-subagents/test/unit/async-resume.test.ts +40 -40
- package/dist/extensions/pi-subagents/test/unit/authority-policy.test.ts +22 -0
- package/dist/extensions/pi-subagents/test/unit/background-work.test.ts +1 -1
- package/dist/extensions/pi-subagents/test/unit/capability-ceiling-agent-allowlist.test.ts +5 -39
- package/dist/extensions/pi-subagents/test/unit/chain-append.test.ts +19 -19
- package/dist/extensions/pi-subagents/test/unit/chain-root-attachment.test.ts +9 -9
- package/dist/extensions/pi-subagents/test/unit/chain-serializer.test.ts +20 -20
- package/dist/extensions/pi-subagents/test/unit/child-protocol.test.ts +99 -0
- package/dist/extensions/pi-subagents/test/unit/child-transcript.test.ts +9 -9
- package/dist/extensions/pi-subagents/test/unit/compaction-resume.test.ts +41 -0
- package/dist/extensions/pi-subagents/test/unit/completion-dedupe.test.ts +2 -2
- package/dist/extensions/pi-subagents/test/unit/completion-guard.test.ts +35 -5
- package/dist/extensions/pi-subagents/test/unit/config-dir-runtime.test.ts +7 -0
- package/dist/extensions/pi-subagents/test/unit/control-notices.test.ts +16 -82
- package/dist/extensions/pi-subagents/test/unit/delegation-api.test.ts +162 -620
- package/dist/extensions/pi-subagents/test/unit/doctor.test.ts +1 -1
- package/dist/extensions/pi-subagents/test/unit/dynamic-fanout.test.ts +25 -25
- package/dist/extensions/pi-subagents/test/unit/ensure-accessible-dir.test.ts +125 -0
- package/dist/extensions/pi-subagents/test/unit/external-cli-runner.test.ts +94 -0
- package/dist/extensions/pi-subagents/test/unit/external-runs.test.ts +66 -0
- package/dist/extensions/pi-subagents/test/unit/extra-agent-dirs.test.ts +3 -3
- package/dist/extensions/pi-subagents/test/unit/fleet-status.test.ts +242 -52
- package/dist/extensions/pi-subagents/test/unit/fleet-transcript.test.ts +127 -0
- package/dist/extensions/pi-subagents/test/unit/fleet.test.ts +197 -36
- package/dist/extensions/pi-subagents/test/unit/foreground-control.test.ts +4 -4
- package/dist/extensions/pi-subagents/test/unit/herdr-inspector.test.ts +245 -0
- package/dist/extensions/pi-subagents/test/unit/herdr-status-bridge.test.ts +494 -0
- package/dist/extensions/pi-subagents/test/unit/index-child-registration.test.ts +261 -31
- package/dist/extensions/pi-subagents/test/unit/inline-subagents.test.ts +127 -0
- package/dist/extensions/pi-subagents/test/unit/intercom-bridge.test.ts +6 -6
- package/dist/extensions/pi-subagents/test/unit/mission-lifecycle.test.ts +217 -0
- package/dist/extensions/pi-subagents/test/unit/mission-store.test.ts +182 -0
- package/dist/extensions/pi-subagents/test/unit/mock-pi.test.ts +22 -0
- package/dist/extensions/pi-subagents/test/unit/model-fallback.test.ts +1 -1
- package/dist/extensions/pi-subagents/test/unit/native-supervisor-channel.test.ts +10 -10
- package/dist/extensions/pi-subagents/test/unit/nested-control.test.ts +20 -12
- package/dist/extensions/pi-subagents/test/unit/nested-events.test.ts +47 -5
- package/dist/extensions/pi-subagents/test/unit/notify.test.ts +49 -55
- package/dist/extensions/pi-subagents/test/unit/package-manifest.test.ts +20 -3
- package/dist/extensions/pi-subagents/test/unit/parallel-handoff.test.ts +37 -7
- package/dist/extensions/pi-subagents/test/unit/parallel-utils.test.ts +10 -10
- package/dist/extensions/pi-subagents/test/unit/path-handling.test.ts +3 -3
- package/dist/extensions/pi-subagents/test/unit/permissions.test.ts +46 -0
- package/dist/extensions/pi-subagents/test/unit/pi-args.test.ts +31 -10
- package/dist/extensions/pi-subagents/test/unit/pi-spawn.test.ts +40 -16
- package/dist/extensions/pi-subagents/test/unit/preflight.test.ts +42 -44
- package/dist/extensions/pi-subagents/test/unit/proactive-skills.test.ts +13 -13
- package/dist/extensions/pi-subagents/test/unit/process-terminal.test.ts +4 -4
- package/dist/extensions/pi-subagents/test/unit/profiles.test.ts +75 -9
- package/dist/extensions/pi-subagents/test/unit/prompt-template-bridge.test.ts +20 -84
- package/dist/extensions/pi-subagents/test/unit/prompt-workflows.test.ts +15 -16
- package/dist/extensions/pi-subagents/test/unit/render-helpers.test.ts +28 -28
- package/dist/extensions/pi-subagents/test/unit/result-intercom.test.ts +19 -12
- package/dist/extensions/pi-subagents/test/unit/rpc.test.ts +37 -21
- package/dist/extensions/pi-subagents/test/unit/run-id-resolver.test.ts +1 -1
- package/dist/extensions/pi-subagents/test/unit/run-status.test.ts +50 -50
- package/dist/extensions/pi-subagents/test/unit/scheduled-runs.test.ts +396 -433
- package/dist/extensions/pi-subagents/test/unit/schemas.test.ts +76 -153
- package/dist/extensions/pi-subagents/test/unit/scripted-workflow.test.ts +411 -0
- package/dist/extensions/pi-subagents/test/unit/single-output.test.ts +1 -91
- package/dist/extensions/pi-subagents/test/unit/skills-fallback.test.ts +139 -0
- package/dist/extensions/pi-subagents/test/unit/slash-bridge.test.ts +29 -0
- package/dist/extensions/pi-subagents/test/unit/stale-run-reconciler.test.ts +13 -13
- package/dist/extensions/pi-subagents/test/unit/steering-action.test.ts +2 -2
- package/dist/extensions/pi-subagents/test/unit/steering.test.ts +2 -2
- package/dist/extensions/pi-subagents/test/unit/subagent-control.test.ts +35 -35
- package/dist/extensions/pi-subagents/test/unit/subagent-prompt-runtime.test.ts +53 -18
- package/dist/extensions/pi-subagents/test/unit/subagent-startup-retry.test.ts +13 -1
- package/dist/extensions/pi-subagents/test/unit/subagent-wait.test.ts +44 -11
- package/dist/extensions/pi-subagents/test/unit/task-intent.test.ts +2 -26
- package/dist/extensions/pi-subagents/test/unit/tool-description.test.ts +24 -148
- package/dist/extensions/pi-subagents/test/unit/turn-budget.test.ts +11 -9
- package/dist/extensions/pi-subagents/test/unit/wait-subscriptions.test.ts +351 -0
- package/dist/extensions/pi-subagents/test/unit/watchdog-child-status.test.ts +13 -13
- package/dist/extensions/pi-subagents/test/unit/watchdog-lsp-diagnostics.test.ts +1 -1
- package/dist/extensions/pi-subagents/test/unit/watchdog-permission-arbiter.test.ts +79 -0
- package/dist/extensions/pi-subagents/test/unit/watchdog-runtime.test.ts +1 -1
- package/dist/extensions/pi-subagents/test/unit/watchdog-settings.test.ts +8 -8
- package/dist/extensions/pi-subagents/test/unit/widget-nested-render.test.ts +45 -9
- package/dist/extensions/pi-subagents/test/unit/workflow-chat-progress.test.ts +197 -0
- package/dist/extensions/pi-subagents/test/unit/workflow-graph.test.ts +8 -8
- package/dist/extensions/pi-subagents/test/unit/worktree.test.ts +142 -12
- package/dist/extensions/pi-subagents/tsconfig.json +15 -0
- package/dist/extensions/ponytail/index.js +1 -31
- package/dist/extensions/ponytail/test/extension.test.js +5 -22
- package/dist/extensions/rtk.test.ts +141 -0
- package/dist/extensions/rtk.ts +78 -36
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/main.d.ts +0 -1
- package/dist/main.js +0 -1
- package/dist/migrations.d.ts +0 -1
- package/dist/migrations.js +0 -1
- package/dist/modes/index.d.ts +0 -1
- package/dist/modes/index.js +0 -1
- package/dist/modes/interactive/components/armin.d.ts +0 -1
- package/dist/modes/interactive/components/armin.js +0 -1
- package/dist/modes/interactive/components/assistant-message.d.ts +0 -1
- package/dist/modes/interactive/components/assistant-message.js +0 -1
- package/dist/modes/interactive/components/bash-execution.d.ts +0 -1
- package/dist/modes/interactive/components/bash-execution.js +0 -1
- package/dist/modes/interactive/components/bordered-loader.d.ts +0 -1
- package/dist/modes/interactive/components/bordered-loader.js +0 -1
- package/dist/modes/interactive/components/branch-summary-message.d.ts +0 -1
- package/dist/modes/interactive/components/branch-summary-message.js +0 -1
- package/dist/modes/interactive/components/compaction-summary-message.d.ts +0 -1
- package/dist/modes/interactive/components/compaction-summary-message.js +0 -1
- package/dist/modes/interactive/components/config-selector.d.ts +0 -1
- package/dist/modes/interactive/components/config-selector.js +0 -1
- package/dist/modes/interactive/components/countdown-timer.d.ts +0 -1
- package/dist/modes/interactive/components/countdown-timer.js +0 -1
- package/dist/modes/interactive/components/custom-editor.d.ts +0 -1
- package/dist/modes/interactive/components/custom-editor.js +0 -1
- package/dist/modes/interactive/components/custom-entry.d.ts +0 -1
- package/dist/modes/interactive/components/custom-entry.js +0 -1
- package/dist/modes/interactive/components/custom-message.d.ts +0 -1
- package/dist/modes/interactive/components/custom-message.js +0 -1
- package/dist/modes/interactive/components/daxnuts.d.ts +0 -1
- package/dist/modes/interactive/components/daxnuts.js +0 -1
- package/dist/modes/interactive/components/diff.d.ts +0 -1
- package/dist/modes/interactive/components/diff.js +0 -1
- package/dist/modes/interactive/components/dynamic-border.d.ts +0 -1
- package/dist/modes/interactive/components/dynamic-border.js +0 -1
- package/dist/modes/interactive/components/earendil-announcement.d.ts +0 -1
- package/dist/modes/interactive/components/earendil-announcement.js +0 -1
- package/dist/modes/interactive/components/extension-editor.d.ts +0 -1
- package/dist/modes/interactive/components/extension-editor.js +0 -1
- package/dist/modes/interactive/components/extension-input.d.ts +0 -1
- package/dist/modes/interactive/components/extension-input.js +0 -1
- package/dist/modes/interactive/components/extension-selector.d.ts +0 -1
- package/dist/modes/interactive/components/extension-selector.js +0 -1
- package/dist/modes/interactive/components/first-time-setup.d.ts +0 -1
- package/dist/modes/interactive/components/first-time-setup.js +0 -1
- package/dist/modes/interactive/components/footer.d.ts +0 -1
- package/dist/modes/interactive/components/footer.js +0 -1
- package/dist/modes/interactive/components/index.d.ts +0 -1
- package/dist/modes/interactive/components/index.js +0 -1
- package/dist/modes/interactive/components/keybinding-hints.d.ts +0 -1
- package/dist/modes/interactive/components/keybinding-hints.js +0 -1
- package/dist/modes/interactive/components/login-dialog.d.ts +0 -1
- package/dist/modes/interactive/components/login-dialog.js +0 -1
- package/dist/modes/interactive/components/model-selector.d.ts +0 -1
- package/dist/modes/interactive/components/model-selector.js +0 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts +0 -1
- package/dist/modes/interactive/components/oauth-selector.js +0 -1
- package/dist/modes/interactive/components/scoped-models-selector.d.ts +0 -1
- package/dist/modes/interactive/components/scoped-models-selector.js +0 -1
- package/dist/modes/interactive/components/session-selector-search.d.ts +0 -1
- package/dist/modes/interactive/components/session-selector-search.js +0 -1
- package/dist/modes/interactive/components/session-selector.d.ts +0 -1
- package/dist/modes/interactive/components/session-selector.js +0 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +0 -3
- package/dist/modes/interactive/components/settings-selector.js +1 -14
- package/dist/modes/interactive/components/show-images-selector.d.ts +0 -1
- package/dist/modes/interactive/components/show-images-selector.js +0 -1
- package/dist/modes/interactive/components/skill-invocation-message.d.ts +0 -1
- package/dist/modes/interactive/components/skill-invocation-message.js +0 -1
- package/dist/modes/interactive/components/status-indicator.d.ts +0 -1
- package/dist/modes/interactive/components/status-indicator.js +0 -1
- package/dist/modes/interactive/components/theme-selector.d.ts +0 -1
- package/dist/modes/interactive/components/theme-selector.js +0 -1
- package/dist/modes/interactive/components/thinking-selector.d.ts +0 -1
- package/dist/modes/interactive/components/thinking-selector.js +0 -1
- package/dist/modes/interactive/components/tool-execution.d.ts +0 -1
- package/dist/modes/interactive/components/tool-execution.js +0 -1
- package/dist/modes/interactive/components/tree-selector.d.ts +0 -1
- package/dist/modes/interactive/components/tree-selector.js +0 -1
- package/dist/modes/interactive/components/trust-selector.d.ts +0 -1
- package/dist/modes/interactive/components/trust-selector.js +0 -1
- package/dist/modes/interactive/components/user-message-selector.d.ts +0 -1
- package/dist/modes/interactive/components/user-message-selector.js +0 -1
- package/dist/modes/interactive/components/user-message.d.ts +0 -1
- package/dist/modes/interactive/components/user-message.js +0 -1
- package/dist/modes/interactive/components/visual-truncate.d.ts +0 -1
- package/dist/modes/interactive/components/visual-truncate.js +0 -1
- package/dist/modes/interactive/external-editor.d.ts +0 -1
- package/dist/modes/interactive/external-editor.js +0 -1
- package/dist/modes/interactive/interactive-mode.d.ts +0 -2
- package/dist/modes/interactive/interactive-mode.js +1 -22
- package/dist/modes/interactive/model-search.d.ts +0 -1
- package/dist/modes/interactive/model-search.js +0 -1
- package/dist/modes/interactive/theme/theme-controller.d.ts +0 -1
- package/dist/modes/interactive/theme/theme-controller.js +0 -1
- package/dist/modes/interactive/theme/theme.d.ts +0 -1
- package/dist/modes/interactive/theme/theme.js +0 -1
- package/dist/modes/print-mode.d.ts +0 -1
- package/dist/modes/print-mode.js +0 -1
- package/dist/modes/rpc/jsonl.d.ts +0 -1
- package/dist/modes/rpc/jsonl.js +0 -1
- package/dist/modes/rpc/rpc-client.d.ts +1 -2
- package/dist/modes/rpc/rpc-client.js +1 -2
- package/dist/modes/rpc/rpc-mode.d.ts +0 -1
- package/dist/modes/rpc/rpc-mode.js +0 -9
- package/dist/modes/rpc/rpc-types.d.ts +0 -1
- package/dist/modes/rpc/rpc-types.js +0 -1
- package/dist/package-manager-cli.d.ts +0 -1
- package/dist/package-manager-cli.js +0 -1
- package/dist/rpc-entry.d.ts +0 -1
- package/dist/rpc-entry.js +0 -1
- package/dist/utils/ansi.d.ts +0 -1
- package/dist/utils/ansi.js +0 -1
- package/dist/utils/changelog.d.ts +0 -1
- package/dist/utils/changelog.js +0 -1
- package/dist/utils/child-process.d.ts +0 -1
- package/dist/utils/child-process.js +0 -1
- package/dist/utils/clipboard-image.d.ts +0 -1
- package/dist/utils/clipboard-image.js +0 -1
- package/dist/utils/clipboard-native.d.ts +0 -1
- package/dist/utils/clipboard-native.js +0 -1
- package/dist/utils/clipboard.d.ts +0 -1
- package/dist/utils/clipboard.js +0 -1
- package/dist/utils/deprecation.d.ts +0 -1
- package/dist/utils/deprecation.js +0 -1
- package/dist/utils/exif-orientation.d.ts +0 -1
- package/dist/utils/exif-orientation.js +0 -1
- package/dist/utils/frontmatter.d.ts +0 -1
- package/dist/utils/frontmatter.js +0 -1
- package/dist/utils/fs-watch.d.ts +0 -1
- package/dist/utils/fs-watch.js +0 -1
- package/dist/utils/git.d.ts +0 -1
- package/dist/utils/git.js +0 -1
- package/dist/utils/html.d.ts +0 -1
- package/dist/utils/html.js +0 -1
- package/dist/utils/image-convert.d.ts +0 -1
- package/dist/utils/image-convert.js +0 -1
- package/dist/utils/image-process.d.ts +0 -1
- package/dist/utils/image-process.js +0 -1
- package/dist/utils/image-resize-core.d.ts +0 -1
- package/dist/utils/image-resize-core.js +0 -1
- package/dist/utils/image-resize-worker.d.ts +0 -1
- package/dist/utils/image-resize-worker.js +0 -1
- package/dist/utils/image-resize.d.ts +0 -1
- package/dist/utils/image-resize.js +0 -1
- package/dist/utils/json.d.ts +0 -1
- package/dist/utils/json.js +0 -1
- package/dist/utils/mime.d.ts +0 -1
- package/dist/utils/mime.js +0 -1
- package/dist/utils/open-browser.d.ts +0 -1
- package/dist/utils/open-browser.js +0 -1
- package/dist/utils/paths.d.ts +0 -1
- package/dist/utils/paths.js +0 -1
- package/dist/utils/photon.d.ts +0 -1
- package/dist/utils/photon.js +0 -1
- package/dist/utils/pi-user-agent.d.ts +0 -1
- package/dist/utils/pi-user-agent.js +0 -1
- package/dist/utils/shell.d.ts +0 -1
- package/dist/utils/shell.js +0 -1
- package/dist/utils/sleep.d.ts +0 -1
- package/dist/utils/sleep.js +0 -1
- package/dist/utils/syntax-highlight.d.ts +0 -1
- package/dist/utils/syntax-highlight.js +0 -1
- package/dist/utils/thinking-tags.d.ts +0 -1
- package/dist/utils/thinking-tags.js +0 -1
- package/dist/utils/tools-manager.d.ts +3 -3
- package/dist/utils/tools-manager.js +125 -42
- package/dist/utils/version-check.d.ts +0 -1
- package/dist/utils/version-check.js +0 -1
- package/dist/utils/windows-self-update.d.ts +0 -1
- package/dist/utils/windows-self-update.js +0 -1
- package/docs/rpc.md +1 -2
- package/docs/settings.md +0 -1
- package/docs/skills.md +10 -18
- package/package.json +3 -2
- package/dist/bun/cli.d.ts.map +0 -1
- package/dist/bun/cli.js.map +0 -1
- package/dist/bun/register-bedrock.d.ts.map +0 -1
- package/dist/bun/register-bedrock.js.map +0 -1
- package/dist/bun/restore-sandbox-env.d.ts.map +0 -1
- package/dist/bun/restore-sandbox-env.js.map +0 -1
- package/dist/cli/args.d.ts.map +0 -1
- package/dist/cli/args.js.map +0 -1
- package/dist/cli/config-selector.d.ts.map +0 -1
- package/dist/cli/config-selector.js.map +0 -1
- package/dist/cli/credential-print.d.ts.map +0 -1
- package/dist/cli/credential-print.js.map +0 -1
- package/dist/cli/file-processor.d.ts.map +0 -1
- package/dist/cli/file-processor.js.map +0 -1
- package/dist/cli/initial-message.d.ts.map +0 -1
- package/dist/cli/initial-message.js.map +0 -1
- package/dist/cli/list-models.d.ts.map +0 -1
- package/dist/cli/list-models.js.map +0 -1
- package/dist/cli/project-trust.d.ts.map +0 -1
- package/dist/cli/project-trust.js.map +0 -1
- package/dist/cli/session-picker.d.ts.map +0 -1
- package/dist/cli/session-picker.js.map +0 -1
- package/dist/cli/startup-ui.d.ts.map +0 -1
- package/dist/cli/startup-ui.js.map +0 -1
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/config.d.ts.map +0 -1
- package/dist/config.js.map +0 -1
- package/dist/core/agent-session-auto-handoff.test.d.ts.map +0 -1
- package/dist/core/agent-session-auto-handoff.test.js.map +0 -1
- package/dist/core/agent-session-runtime.d.ts.map +0 -1
- package/dist/core/agent-session-runtime.js.map +0 -1
- package/dist/core/agent-session-services.d.ts.map +0 -1
- package/dist/core/agent-session-services.js.map +0 -1
- package/dist/core/agent-session-skill-block.test.d.ts.map +0 -1
- package/dist/core/agent-session-skill-block.test.js.map +0 -1
- package/dist/core/agent-session.d.ts.map +0 -1
- package/dist/core/agent-session.js.map +0 -1
- package/dist/core/agents.d.ts.map +0 -1
- package/dist/core/agents.js.map +0 -1
- package/dist/core/auth-guidance.d.ts.map +0 -1
- package/dist/core/auth-guidance.js.map +0 -1
- package/dist/core/auth-storage.d.ts.map +0 -1
- package/dist/core/auth-storage.js.map +0 -1
- package/dist/core/bash-executor.d.ts.map +0 -1
- package/dist/core/bash-executor.js.map +0 -1
- package/dist/core/built-in-extensions.d.ts.map +0 -1
- package/dist/core/built-in-extensions.js.map +0 -1
- package/dist/core/cache-stats.d.ts.map +0 -1
- package/dist/core/cache-stats.js.map +0 -1
- package/dist/core/compaction/branch-summarization.d.ts.map +0 -1
- package/dist/core/compaction/branch-summarization.js.map +0 -1
- package/dist/core/compaction/compaction.d.ts.map +0 -1
- package/dist/core/compaction/compaction.js.map +0 -1
- package/dist/core/compaction/index.d.ts.map +0 -1
- package/dist/core/compaction/index.js.map +0 -1
- package/dist/core/compaction/utils.d.ts.map +0 -1
- package/dist/core/compaction/utils.js.map +0 -1
- package/dist/core/defaults.d.ts.map +0 -1
- package/dist/core/defaults.js.map +0 -1
- package/dist/core/diagnostics.d.ts.map +0 -1
- package/dist/core/diagnostics.js.map +0 -1
- package/dist/core/event-bus.d.ts.map +0 -1
- package/dist/core/event-bus.js.map +0 -1
- package/dist/core/exec.d.ts.map +0 -1
- package/dist/core/exec.js.map +0 -1
- package/dist/core/experimental.d.ts.map +0 -1
- package/dist/core/experimental.js.map +0 -1
- package/dist/core/export-html/ansi-to-html.d.ts.map +0 -1
- package/dist/core/export-html/ansi-to-html.js.map +0 -1
- package/dist/core/export-html/index.d.ts.map +0 -1
- package/dist/core/export-html/index.js.map +0 -1
- package/dist/core/export-html/tool-renderer.d.ts.map +0 -1
- package/dist/core/export-html/tool-renderer.js.map +0 -1
- package/dist/core/extensions/index.d.ts.map +0 -1
- package/dist/core/extensions/index.js.map +0 -1
- package/dist/core/extensions/loader.d.ts.map +0 -1
- package/dist/core/extensions/loader.js.map +0 -1
- package/dist/core/extensions/runner.d.ts.map +0 -1
- package/dist/core/extensions/runner.js.map +0 -1
- package/dist/core/extensions/types.d.ts.map +0 -1
- package/dist/core/extensions/types.js.map +0 -1
- package/dist/core/extensions/wrapper.d.ts.map +0 -1
- package/dist/core/extensions/wrapper.js.map +0 -1
- package/dist/core/footer-data-provider.d.ts.map +0 -1
- package/dist/core/footer-data-provider.js.map +0 -1
- package/dist/core/git-command.d.ts.map +0 -1
- package/dist/core/git-command.js.map +0 -1
- package/dist/core/http-dispatcher.d.ts.map +0 -1
- package/dist/core/http-dispatcher.js.map +0 -1
- package/dist/core/index.d.ts.map +0 -1
- package/dist/core/index.js.map +0 -1
- package/dist/core/keybindings.d.ts.map +0 -1
- package/dist/core/keybindings.js.map +0 -1
- package/dist/core/llama/client.d.ts.map +0 -1
- package/dist/core/llama/client.js.map +0 -1
- package/dist/core/llama/huggingface.d.ts.map +0 -1
- package/dist/core/llama/huggingface.js.map +0 -1
- package/dist/core/llama/index.d.ts.map +0 -1
- package/dist/core/llama/index.js.map +0 -1
- package/dist/core/llama/provider.d.ts.map +0 -1
- package/dist/core/llama/provider.js.map +0 -1
- package/dist/core/llama/ui.d.ts.map +0 -1
- package/dist/core/llama/ui.js.map +0 -1
- package/dist/core/messages.d.ts.map +0 -1
- package/dist/core/messages.js.map +0 -1
- package/dist/core/model-config.d.ts.map +0 -1
- package/dist/core/model-config.js.map +0 -1
- package/dist/core/model-registry.d.ts.map +0 -1
- package/dist/core/model-registry.js.map +0 -1
- package/dist/core/model-resolver.d.ts.map +0 -1
- package/dist/core/model-resolver.js.map +0 -1
- package/dist/core/model-runtime.d.ts.map +0 -1
- package/dist/core/model-runtime.js.map +0 -1
- package/dist/core/models-store.d.ts.map +0 -1
- package/dist/core/models-store.js.map +0 -1
- package/dist/core/output-guard.d.ts.map +0 -1
- package/dist/core/output-guard.js.map +0 -1
- package/dist/core/package-manager.d.ts.map +0 -1
- package/dist/core/package-manager.js.map +0 -1
- package/dist/core/package-manager.test.d.ts.map +0 -1
- package/dist/core/package-manager.test.js.map +0 -1
- package/dist/core/project-trust.d.ts.map +0 -1
- package/dist/core/project-trust.js.map +0 -1
- package/dist/core/prompt-templates.d.ts.map +0 -1
- package/dist/core/prompt-templates.js.map +0 -1
- package/dist/core/provider-attribution.d.ts.map +0 -1
- package/dist/core/provider-attribution.js.map +0 -1
- package/dist/core/provider-composer.d.ts.map +0 -1
- package/dist/core/provider-composer.js.map +0 -1
- package/dist/core/radius.d.ts.map +0 -1
- package/dist/core/radius.js.map +0 -1
- package/dist/core/remote-catalog-provider.d.ts.map +0 -1
- package/dist/core/remote-catalog-provider.js.map +0 -1
- package/dist/core/resolve-config-value.d.ts.map +0 -1
- package/dist/core/resolve-config-value.js.map +0 -1
- package/dist/core/resource-loader.d.ts.map +0 -1
- package/dist/core/resource-loader.js.map +0 -1
- package/dist/core/runtime-credentials.d.ts.map +0 -1
- package/dist/core/runtime-credentials.js.map +0 -1
- package/dist/core/sdk.d.ts.map +0 -1
- package/dist/core/sdk.js.map +0 -1
- package/dist/core/session-cwd.d.ts.map +0 -1
- package/dist/core/session-cwd.js.map +0 -1
- package/dist/core/session-manager.d.ts.map +0 -1
- package/dist/core/session-manager.js.map +0 -1
- package/dist/core/settings-manager-auto-handoff.test.d.ts.map +0 -1
- package/dist/core/settings-manager-auto-handoff.test.js.map +0 -1
- package/dist/core/settings-manager.d.ts.map +0 -1
- package/dist/core/settings-manager.js.map +0 -1
- package/dist/core/skills.d.ts.map +0 -1
- package/dist/core/skills.js.map +0 -1
- package/dist/core/slash-commands.d.ts.map +0 -1
- package/dist/core/slash-commands.js.map +0 -1
- package/dist/core/source-info.d.ts.map +0 -1
- package/dist/core/source-info.js.map +0 -1
- package/dist/core/system-prompt.d.ts.map +0 -1
- package/dist/core/system-prompt.js.map +0 -1
- package/dist/core/system-prompt.test.d.ts.map +0 -1
- package/dist/core/system-prompt.test.js.map +0 -1
- package/dist/core/telemetry.d.ts.map +0 -1
- package/dist/core/telemetry.js.map +0 -1
- package/dist/core/timings.d.ts.map +0 -1
- package/dist/core/timings.js.map +0 -1
- package/dist/core/tools/bash.d.ts.map +0 -1
- package/dist/core/tools/bash.js.map +0 -1
- package/dist/core/tools/edit-diff.d.ts.map +0 -1
- package/dist/core/tools/edit-diff.js.map +0 -1
- package/dist/core/tools/edit.d.ts.map +0 -1
- package/dist/core/tools/edit.js.map +0 -1
- package/dist/core/tools/file-mutation-queue.d.ts.map +0 -1
- package/dist/core/tools/file-mutation-queue.js.map +0 -1
- package/dist/core/tools/find.d.ts.map +0 -1
- package/dist/core/tools/find.js.map +0 -1
- package/dist/core/tools/grep.d.ts.map +0 -1
- package/dist/core/tools/grep.js.map +0 -1
- package/dist/core/tools/index.d.ts.map +0 -1
- package/dist/core/tools/index.js.map +0 -1
- package/dist/core/tools/ls.d.ts.map +0 -1
- package/dist/core/tools/ls.js.map +0 -1
- package/dist/core/tools/output-accumulator.d.ts.map +0 -1
- package/dist/core/tools/output-accumulator.js.map +0 -1
- package/dist/core/tools/path-utils.d.ts.map +0 -1
- package/dist/core/tools/path-utils.js.map +0 -1
- package/dist/core/tools/read.d.ts.map +0 -1
- package/dist/core/tools/read.js.map +0 -1
- package/dist/core/tools/render-utils.d.ts.map +0 -1
- package/dist/core/tools/render-utils.js.map +0 -1
- package/dist/core/tools/tool-definition-wrapper.d.ts.map +0 -1
- package/dist/core/tools/tool-definition-wrapper.js.map +0 -1
- package/dist/core/tools/truncate.d.ts.map +0 -1
- package/dist/core/tools/truncate.js.map +0 -1
- package/dist/core/tools/write.d.ts.map +0 -1
- package/dist/core/tools/write.js.map +0 -1
- package/dist/core/trust-manager.d.ts.map +0 -1
- package/dist/core/trust-manager.js.map +0 -1
- package/dist/core/usage-totals.d.ts.map +0 -1
- package/dist/core/usage-totals.js.map +0 -1
- package/dist/extensions/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +0 -1
- package/dist/extensions/pi-subagents/test/unit/slash-chain-groups.test.ts +0 -464
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/main.d.ts.map +0 -1
- package/dist/main.js.map +0 -1
- package/dist/migrations.d.ts.map +0 -1
- package/dist/migrations.js.map +0 -1
- package/dist/modes/index.d.ts.map +0 -1
- package/dist/modes/index.js.map +0 -1
- package/dist/modes/interactive/components/armin.d.ts.map +0 -1
- package/dist/modes/interactive/components/armin.js.map +0 -1
- package/dist/modes/interactive/components/assistant-message.d.ts.map +0 -1
- package/dist/modes/interactive/components/assistant-message.js.map +0 -1
- package/dist/modes/interactive/components/bash-execution.d.ts.map +0 -1
- package/dist/modes/interactive/components/bash-execution.js.map +0 -1
- package/dist/modes/interactive/components/bordered-loader.d.ts.map +0 -1
- package/dist/modes/interactive/components/bordered-loader.js.map +0 -1
- package/dist/modes/interactive/components/branch-summary-message.d.ts.map +0 -1
- package/dist/modes/interactive/components/branch-summary-message.js.map +0 -1
- package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +0 -1
- package/dist/modes/interactive/components/compaction-summary-message.js.map +0 -1
- package/dist/modes/interactive/components/config-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/config-selector.js.map +0 -1
- package/dist/modes/interactive/components/countdown-timer.d.ts.map +0 -1
- package/dist/modes/interactive/components/countdown-timer.js.map +0 -1
- package/dist/modes/interactive/components/custom-editor.d.ts.map +0 -1
- package/dist/modes/interactive/components/custom-editor.js.map +0 -1
- package/dist/modes/interactive/components/custom-entry.d.ts.map +0 -1
- package/dist/modes/interactive/components/custom-entry.js.map +0 -1
- package/dist/modes/interactive/components/custom-message.d.ts.map +0 -1
- package/dist/modes/interactive/components/custom-message.js.map +0 -1
- package/dist/modes/interactive/components/daxnuts.d.ts.map +0 -1
- package/dist/modes/interactive/components/daxnuts.js.map +0 -1
- package/dist/modes/interactive/components/diff.d.ts.map +0 -1
- package/dist/modes/interactive/components/diff.js.map +0 -1
- package/dist/modes/interactive/components/dynamic-border.d.ts.map +0 -1
- package/dist/modes/interactive/components/dynamic-border.js.map +0 -1
- package/dist/modes/interactive/components/earendil-announcement.d.ts.map +0 -1
- package/dist/modes/interactive/components/earendil-announcement.js.map +0 -1
- package/dist/modes/interactive/components/extension-editor.d.ts.map +0 -1
- package/dist/modes/interactive/components/extension-editor.js.map +0 -1
- package/dist/modes/interactive/components/extension-input.d.ts.map +0 -1
- package/dist/modes/interactive/components/extension-input.js.map +0 -1
- package/dist/modes/interactive/components/extension-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/extension-selector.js.map +0 -1
- package/dist/modes/interactive/components/first-time-setup.d.ts.map +0 -1
- package/dist/modes/interactive/components/first-time-setup.js.map +0 -1
- package/dist/modes/interactive/components/footer.d.ts.map +0 -1
- package/dist/modes/interactive/components/footer.js.map +0 -1
- package/dist/modes/interactive/components/index.d.ts.map +0 -1
- package/dist/modes/interactive/components/index.js.map +0 -1
- package/dist/modes/interactive/components/keybinding-hints.d.ts.map +0 -1
- package/dist/modes/interactive/components/keybinding-hints.js.map +0 -1
- package/dist/modes/interactive/components/login-dialog.d.ts.map +0 -1
- package/dist/modes/interactive/components/login-dialog.js.map +0 -1
- package/dist/modes/interactive/components/model-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/model-selector.js.map +0 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/oauth-selector.js.map +0 -1
- package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/scoped-models-selector.js.map +0 -1
- package/dist/modes/interactive/components/session-selector-search.d.ts.map +0 -1
- package/dist/modes/interactive/components/session-selector-search.js.map +0 -1
- package/dist/modes/interactive/components/session-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/session-selector.js.map +0 -1
- package/dist/modes/interactive/components/settings-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/settings-selector.js.map +0 -1
- package/dist/modes/interactive/components/show-images-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/show-images-selector.js.map +0 -1
- package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +0 -1
- package/dist/modes/interactive/components/skill-invocation-message.js.map +0 -1
- package/dist/modes/interactive/components/status-indicator.d.ts.map +0 -1
- package/dist/modes/interactive/components/status-indicator.js.map +0 -1
- package/dist/modes/interactive/components/theme-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/theme-selector.js.map +0 -1
- package/dist/modes/interactive/components/thinking-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/thinking-selector.js.map +0 -1
- package/dist/modes/interactive/components/tool-execution.d.ts.map +0 -1
- package/dist/modes/interactive/components/tool-execution.js.map +0 -1
- package/dist/modes/interactive/components/tree-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/tree-selector.js.map +0 -1
- package/dist/modes/interactive/components/trust-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/trust-selector.js.map +0 -1
- package/dist/modes/interactive/components/user-message-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/user-message-selector.js.map +0 -1
- package/dist/modes/interactive/components/user-message.d.ts.map +0 -1
- package/dist/modes/interactive/components/user-message.js.map +0 -1
- package/dist/modes/interactive/components/visual-truncate.d.ts.map +0 -1
- package/dist/modes/interactive/components/visual-truncate.js.map +0 -1
- package/dist/modes/interactive/external-editor.d.ts.map +0 -1
- package/dist/modes/interactive/external-editor.js.map +0 -1
- package/dist/modes/interactive/interactive-mode.d.ts.map +0 -1
- package/dist/modes/interactive/interactive-mode.js.map +0 -1
- package/dist/modes/interactive/model-search.d.ts.map +0 -1
- package/dist/modes/interactive/model-search.js.map +0 -1
- package/dist/modes/interactive/theme/theme-controller.d.ts.map +0 -1
- package/dist/modes/interactive/theme/theme-controller.js.map +0 -1
- package/dist/modes/interactive/theme/theme.d.ts.map +0 -1
- package/dist/modes/interactive/theme/theme.js.map +0 -1
- package/dist/modes/print-mode.d.ts.map +0 -1
- package/dist/modes/print-mode.js.map +0 -1
- package/dist/modes/rpc/jsonl.d.ts.map +0 -1
- package/dist/modes/rpc/jsonl.js.map +0 -1
- package/dist/modes/rpc/rpc-client.d.ts.map +0 -1
- package/dist/modes/rpc/rpc-client.js.map +0 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +0 -1
- package/dist/modes/rpc/rpc-mode.js.map +0 -1
- package/dist/modes/rpc/rpc-types.d.ts.map +0 -1
- package/dist/modes/rpc/rpc-types.js.map +0 -1
- package/dist/package-manager-cli.d.ts.map +0 -1
- package/dist/package-manager-cli.js.map +0 -1
- package/dist/rpc-entry.d.ts.map +0 -1
- package/dist/rpc-entry.js.map +0 -1
- package/dist/utils/ansi.d.ts.map +0 -1
- package/dist/utils/ansi.js.map +0 -1
- package/dist/utils/changelog.d.ts.map +0 -1
- package/dist/utils/changelog.js.map +0 -1
- package/dist/utils/child-process.d.ts.map +0 -1
- package/dist/utils/child-process.js.map +0 -1
- package/dist/utils/clipboard-image.d.ts.map +0 -1
- package/dist/utils/clipboard-image.js.map +0 -1
- package/dist/utils/clipboard-native.d.ts.map +0 -1
- package/dist/utils/clipboard-native.js.map +0 -1
- package/dist/utils/clipboard.d.ts.map +0 -1
- package/dist/utils/clipboard.js.map +0 -1
- package/dist/utils/deprecation.d.ts.map +0 -1
- package/dist/utils/deprecation.js.map +0 -1
- package/dist/utils/exif-orientation.d.ts.map +0 -1
- package/dist/utils/exif-orientation.js.map +0 -1
- package/dist/utils/frontmatter.d.ts.map +0 -1
- package/dist/utils/frontmatter.js.map +0 -1
- package/dist/utils/fs-watch.d.ts.map +0 -1
- package/dist/utils/fs-watch.js.map +0 -1
- package/dist/utils/git.d.ts.map +0 -1
- package/dist/utils/git.js.map +0 -1
- package/dist/utils/html.d.ts.map +0 -1
- package/dist/utils/html.js.map +0 -1
- package/dist/utils/image-convert.d.ts.map +0 -1
- package/dist/utils/image-convert.js.map +0 -1
- package/dist/utils/image-process.d.ts.map +0 -1
- package/dist/utils/image-process.js.map +0 -1
- package/dist/utils/image-resize-core.d.ts.map +0 -1
- package/dist/utils/image-resize-core.js.map +0 -1
- package/dist/utils/image-resize-worker.d.ts.map +0 -1
- package/dist/utils/image-resize-worker.js.map +0 -1
- package/dist/utils/image-resize.d.ts.map +0 -1
- package/dist/utils/image-resize.js.map +0 -1
- package/dist/utils/json.d.ts.map +0 -1
- package/dist/utils/json.js.map +0 -1
- package/dist/utils/mime.d.ts.map +0 -1
- package/dist/utils/mime.js.map +0 -1
- package/dist/utils/open-browser.d.ts.map +0 -1
- package/dist/utils/open-browser.js.map +0 -1
- package/dist/utils/paths.d.ts.map +0 -1
- package/dist/utils/paths.js.map +0 -1
- package/dist/utils/photon.d.ts.map +0 -1
- package/dist/utils/photon.js.map +0 -1
- package/dist/utils/pi-user-agent.d.ts.map +0 -1
- package/dist/utils/pi-user-agent.js.map +0 -1
- package/dist/utils/shell.d.ts.map +0 -1
- package/dist/utils/shell.js.map +0 -1
- package/dist/utils/sleep.d.ts.map +0 -1
- package/dist/utils/sleep.js.map +0 -1
- package/dist/utils/syntax-highlight.d.ts.map +0 -1
- package/dist/utils/syntax-highlight.js.map +0 -1
- package/dist/utils/thinking-tags.d.ts.map +0 -1
- package/dist/utils/thinking-tags.js.map +0 -1
- package/dist/utils/tools-manager.d.ts.map +0 -1
- package/dist/utils/tools-manager.js.map +0 -1
- package/dist/utils/version-check.d.ts.map +0 -1
- package/dist/utils/version-check.js.map +0 -1
- package/dist/utils/windows-self-update.d.ts.map +0 -1
- package/dist/utils/windows-self-update.js.map +0 -1
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import assert from "node:assert/strict";
|
|
2
|
-
import * as fs from "node:fs";
|
|
3
|
-
import * as os from "node:os";
|
|
4
|
-
import * as path from "node:path";
|
|
5
2
|
import { describe, it } from "node:test";
|
|
6
3
|
import { keyText } from "@selesai/code";
|
|
7
4
|
|
|
5
|
+
type RenderTheme = {
|
|
6
|
+
fg(name: string, text: string): string;
|
|
7
|
+
bold(text: string): string;
|
|
8
|
+
};
|
|
9
|
+
|
|
8
10
|
type RenderSubagentResult = (
|
|
9
11
|
result: {
|
|
10
12
|
content: Array<{ type: "text"; text: string }>;
|
|
@@ -16,15 +18,23 @@ type RenderSubagentResult = (
|
|
|
16
18
|
};
|
|
17
19
|
},
|
|
18
20
|
options: { expanded: boolean },
|
|
19
|
-
theme:
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
theme: RenderTheme,
|
|
22
|
+
) => { render(width: number): string[] };
|
|
23
|
+
|
|
24
|
+
type RenderSubagentSummary = (
|
|
25
|
+
result: {
|
|
26
|
+
content: Array<{ type: "text"; text: string }>;
|
|
27
|
+
details?: { mode: "single" | "parallel" | "chain" | "management"; results: unknown[]; progress?: unknown[]; asyncId?: string };
|
|
22
28
|
},
|
|
29
|
+
options: { isPartial?: boolean },
|
|
30
|
+
theme: RenderTheme,
|
|
23
31
|
) => { render(width: number): string[] };
|
|
24
32
|
|
|
25
33
|
let renderSubagentResult: RenderSubagentResult | undefined;
|
|
26
|
-
|
|
34
|
+
let renderSubagentSummary: RenderSubagentSummary | undefined;
|
|
35
|
+
({ renderSubagentResult, renderSubagentSummary } = await import("../../src/tui/render.ts") as {
|
|
27
36
|
renderSubagentResult?: RenderSubagentResult;
|
|
37
|
+
renderSubagentSummary?: RenderSubagentSummary;
|
|
28
38
|
});
|
|
29
39
|
|
|
30
40
|
const theme = {
|
|
@@ -138,11 +148,10 @@ describe("renderSubagentResult fork indicator", () => {
|
|
|
138
148
|
}],
|
|
139
149
|
},
|
|
140
150
|
}, { expanded: false }, theme).render(160).join("\n");
|
|
141
|
-
assert.match(compact, /↳ \[\d{2}:\d{2}:\d{2}\]
|
|
142
|
-
assert.doesNotMatch(compact, /compact-terminal-child · complete/);
|
|
151
|
+
assert.match(compact, /↳ └─ \[\d{2}:\d{2}:\d{2}\] . compact-terminal-child · complete · Done/);
|
|
143
152
|
});
|
|
144
153
|
it("collapses multiline structured management output to a first-line summary", () => {
|
|
145
|
-
const output = `\n${"Managed agents: ".padEnd(220, "x")}\n-
|
|
154
|
+
const output = `\n${"Managed agents: ".padEnd(220, "x")}\n- commentator\n- writer`;
|
|
146
155
|
const widget = renderSubagentResult!({
|
|
147
156
|
content: [{ type: "text", text: output }],
|
|
148
157
|
details: { mode: "management", context: "fork", results: [] },
|
|
@@ -153,7 +162,7 @@ describe("renderSubagentResult fork indicator", () => {
|
|
|
153
162
|
assert.match(lines[0]!, /…$/);
|
|
154
163
|
const hintLineIndex = lines.findIndex((line) => line.includes(expandHint) || (expandKey === "" && line.includes("Press ") && line.includes(" for full output")));
|
|
155
164
|
assert.ok(hintLineIndex > 0);
|
|
156
|
-
assert.doesNotMatch(lines[0]!, /
|
|
165
|
+
assert.doesNotMatch(lines[0]!, /commentator/);
|
|
157
166
|
});
|
|
158
167
|
|
|
159
168
|
it("keeps multiline structured zero-result errors visible", () => {
|
|
@@ -171,7 +180,7 @@ describe("renderSubagentResult fork indicator", () => {
|
|
|
171
180
|
});
|
|
172
181
|
|
|
173
182
|
it("keeps full multiline structured output when expanded", () => {
|
|
174
|
-
const output = "Managed agents:\n-
|
|
183
|
+
const output = "Managed agents:\n- commentator\n- writer";
|
|
175
184
|
const widget = renderSubagentResult!({
|
|
176
185
|
content: [{ type: "text", text: output }],
|
|
177
186
|
details: { mode: "management", results: [] },
|
|
@@ -179,7 +188,7 @@ describe("renderSubagentResult fork indicator", () => {
|
|
|
179
188
|
|
|
180
189
|
const text = widget.render(120).join("\n");
|
|
181
190
|
assert.match(text, /Managed agents:/);
|
|
182
|
-
assert.match(text, /-
|
|
191
|
+
assert.match(text, /- commentator/);
|
|
183
192
|
assert.match(text, /- writer/);
|
|
184
193
|
assert.ok(!text.includes(expandHint));
|
|
185
194
|
});
|
|
@@ -215,7 +224,7 @@ describe("renderSubagentResult fork indicator", () => {
|
|
|
215
224
|
|
|
216
225
|
it("shows [fork] when details are empty but context is fork", () => {
|
|
217
226
|
const widget = renderSubagentResult!({
|
|
218
|
-
content: [{ type: "text", text: "Async:
|
|
227
|
+
content: [{ type: "text", text: "Async: commentator [abc123]" }],
|
|
219
228
|
details: { mode: "single", context: "fork", results: [] },
|
|
220
229
|
}, { expanded: false }, theme);
|
|
221
230
|
|
|
@@ -251,7 +260,7 @@ describe("renderSubagentResult fork indicator", () => {
|
|
|
251
260
|
}, { expanded: false }, theme);
|
|
252
261
|
|
|
253
262
|
const text = widget.render(120).join("\n");
|
|
254
|
-
assert.match(text, /↳ \[\d{2}:\d{2}:\d{2}\]
|
|
263
|
+
assert.match(text, /↳ └─ \[\d{2}:\d{2}:\d{2}\] . implement · running · bash/);
|
|
255
264
|
});
|
|
256
265
|
|
|
257
266
|
it("shows [fresh] and [fork] on single-result headers", () => {
|
|
@@ -262,7 +271,7 @@ describe("renderSubagentResult fork indicator", () => {
|
|
|
262
271
|
mode: "single",
|
|
263
272
|
context,
|
|
264
273
|
results: [{
|
|
265
|
-
agent: "
|
|
274
|
+
agent: "commentator",
|
|
266
275
|
task: "review",
|
|
267
276
|
context,
|
|
268
277
|
exitCode: 0,
|
|
@@ -284,15 +293,15 @@ describe("renderSubagentResult fork indicator", () => {
|
|
|
284
293
|
mode: "parallel",
|
|
285
294
|
context: "mixed",
|
|
286
295
|
results: [
|
|
287
|
-
{ agent: "
|
|
288
|
-
{ agent: "
|
|
296
|
+
{ agent: "explorer", task: "scan", context: "fresh", exitCode: 0, messages: [], usage: emptyUsage },
|
|
297
|
+
{ agent: "builder", task: "fix", context: "fork", exitCode: 0, messages: [], usage: emptyUsage },
|
|
289
298
|
],
|
|
290
299
|
},
|
|
291
300
|
}, { expanded: false }, theme).render(160).join("\n");
|
|
292
301
|
|
|
293
302
|
assert.match(compact, /parallel \[mixed\]/);
|
|
294
|
-
assert.match(compact, /
|
|
295
|
-
assert.match(compact, /
|
|
303
|
+
assert.match(compact, /explorer \[fresh\]/);
|
|
304
|
+
assert.match(compact, /builder \[fork\]/);
|
|
296
305
|
|
|
297
306
|
const expanded = renderSubagentResult!({
|
|
298
307
|
content: [{ type: "text", text: "done" }],
|
|
@@ -300,15 +309,15 @@ describe("renderSubagentResult fork indicator", () => {
|
|
|
300
309
|
mode: "parallel",
|
|
301
310
|
context: "mixed",
|
|
302
311
|
results: [
|
|
303
|
-
{ agent: "
|
|
304
|
-
{ agent: "
|
|
312
|
+
{ agent: "explorer", task: "scan", context: "fresh", exitCode: 0, messages: [], usage: emptyUsage },
|
|
313
|
+
{ agent: "builder", task: "fix", context: "fork", exitCode: 0, messages: [], usage: emptyUsage },
|
|
305
314
|
],
|
|
306
315
|
},
|
|
307
316
|
}, { expanded: true }, theme).render(160).join("\n");
|
|
308
317
|
|
|
309
318
|
assert.match(expanded, /parallel \[mixed\]/);
|
|
310
|
-
assert.match(expanded, /
|
|
311
|
-
assert.match(expanded, /
|
|
319
|
+
assert.match(expanded, /explorer \[fresh\]/);
|
|
320
|
+
assert.match(expanded, /builder \[fork\]/);
|
|
312
321
|
});
|
|
313
322
|
|
|
314
323
|
it("uses compacted tool-call summaries when messages were stripped", () => {
|
|
@@ -317,7 +326,7 @@ describe("renderSubagentResult fork indicator", () => {
|
|
|
317
326
|
details: {
|
|
318
327
|
mode: "single",
|
|
319
328
|
results: [{
|
|
320
|
-
agent: "
|
|
329
|
+
agent: "commentator",
|
|
321
330
|
task: "review",
|
|
322
331
|
exitCode: 0,
|
|
323
332
|
messages: undefined,
|
|
@@ -341,7 +350,7 @@ describe("renderSubagentResult fork indicator", () => {
|
|
|
341
350
|
details: {
|
|
342
351
|
mode: "single",
|
|
343
352
|
results: [{
|
|
344
|
-
agent: "
|
|
353
|
+
agent: "commentator",
|
|
345
354
|
task: longTask,
|
|
346
355
|
exitCode: 0,
|
|
347
356
|
messages: [],
|
|
@@ -355,7 +364,7 @@ describe("renderSubagentResult fork indicator", () => {
|
|
|
355
364
|
details: {
|
|
356
365
|
mode: "single",
|
|
357
366
|
results: [{
|
|
358
|
-
agent: "
|
|
367
|
+
agent: "commentator",
|
|
359
368
|
task: longTask,
|
|
360
369
|
exitCode: 0,
|
|
361
370
|
messages: [],
|
|
@@ -369,13 +378,319 @@ describe("renderSubagentResult fork indicator", () => {
|
|
|
369
378
|
assert.match(unwrap(expanded), /precisefailingtoolsequenceattheend\./);
|
|
370
379
|
});
|
|
371
380
|
|
|
381
|
+
it("uses the same semantic status presentation in compact and expanded single results", () => {
|
|
382
|
+
const cases = [
|
|
383
|
+
{
|
|
384
|
+
name: "running",
|
|
385
|
+
glyph: "⠋",
|
|
386
|
+
label: "running",
|
|
387
|
+
extra: { progress: { index: 0, agent: "commentator", status: "running", task: "review", recentTools: [], recentOutput: [], toolCount: 0, tokens: 0, durationMs: 0 } },
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
name: "detached",
|
|
391
|
+
glyph: "■",
|
|
392
|
+
label: "detached",
|
|
393
|
+
extra: {
|
|
394
|
+
detached: true,
|
|
395
|
+
detachedReason: "continuing externally",
|
|
396
|
+
progress: { index: 0, agent: "commentator", status: "running", task: "review", recentTools: [], recentOutput: [], toolCount: 1, tokens: 42, durationMs: 1000 },
|
|
397
|
+
},
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
name: "stopped",
|
|
401
|
+
glyph: "■",
|
|
402
|
+
label: "stopped",
|
|
403
|
+
extra: {
|
|
404
|
+
stopped: true,
|
|
405
|
+
exitCode: 1,
|
|
406
|
+
progress: { index: 0, agent: "commentator", status: "running", task: "review", recentTools: [], recentOutput: [], toolCount: 1, tokens: 42, durationMs: 1000 },
|
|
407
|
+
},
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
name: "interrupted",
|
|
411
|
+
glyph: "■",
|
|
412
|
+
label: "paused",
|
|
413
|
+
extra: {
|
|
414
|
+
interrupted: true,
|
|
415
|
+
exitCode: 1,
|
|
416
|
+
progress: { index: 0, agent: "commentator", status: "running", task: "review", recentTools: [], recentOutput: [], toolCount: 1, tokens: 42, durationMs: 1000 },
|
|
417
|
+
},
|
|
418
|
+
},
|
|
419
|
+
{ name: "failed", glyph: "✗", label: "failed", extra: { exitCode: 1, error: "boom" } },
|
|
420
|
+
{ name: "completed", glyph: "✓", label: "completed", extra: {} },
|
|
421
|
+
] as const;
|
|
422
|
+
|
|
423
|
+
for (const testCase of cases) {
|
|
424
|
+
const child = {
|
|
425
|
+
agent: "commentator",
|
|
426
|
+
task: "review",
|
|
427
|
+
exitCode: 0,
|
|
428
|
+
finalOutput: "review complete",
|
|
429
|
+
messages: [],
|
|
430
|
+
usage: emptyUsage,
|
|
431
|
+
...testCase.extra,
|
|
432
|
+
};
|
|
433
|
+
const result = {
|
|
434
|
+
content: [{ type: "text" as const, text: testCase.name }],
|
|
435
|
+
details: { mode: "single" as const, results: [child] },
|
|
436
|
+
};
|
|
437
|
+
const compact = renderSubagentResult!(result, { expanded: false }, theme).render(120).join("\n");
|
|
438
|
+
const expanded = renderSubagentResult!(result, { expanded: true }, theme).render(120).join("\n");
|
|
439
|
+
|
|
440
|
+
assert.equal(firstGrapheme(compact), testCase.glyph, `${testCase.name} compact glyph`);
|
|
441
|
+
assert.equal(firstGrapheme(expanded), testCase.glyph, `${testCase.name} expanded glyph`);
|
|
442
|
+
assert.match((expanded.split("\n")[0] ?? "").trimEnd(), new RegExp(`commentator(?: \\| [^·]+)? · ${testCase.label}$`), `${testCase.name} expanded label`);
|
|
443
|
+
}
|
|
444
|
+
});
|
|
445
|
+
|
|
446
|
+
it("keeps terminal results terminal in inline summaries with stale progress", () => {
|
|
447
|
+
const progress = {
|
|
448
|
+
index: 0,
|
|
449
|
+
agent: "commentator",
|
|
450
|
+
status: "running",
|
|
451
|
+
task: "review",
|
|
452
|
+
recentTools: [],
|
|
453
|
+
recentOutput: [],
|
|
454
|
+
toolCount: 1,
|
|
455
|
+
tokens: 42,
|
|
456
|
+
durationMs: 1_000,
|
|
457
|
+
};
|
|
458
|
+
const cases = [
|
|
459
|
+
{ name: "detached", state: "paused", flag: { detached: true } },
|
|
460
|
+
{ name: "stopped", state: "stopped", flag: { stopped: true } },
|
|
461
|
+
{ name: "interrupted", state: "paused", flag: { interrupted: true } },
|
|
462
|
+
] as const;
|
|
463
|
+
|
|
464
|
+
for (const testCase of cases) {
|
|
465
|
+
const summary = renderSubagentSummary!({
|
|
466
|
+
content: [{ type: "text", text: testCase.name }],
|
|
467
|
+
details: {
|
|
468
|
+
mode: "single",
|
|
469
|
+
asyncId: "async-review",
|
|
470
|
+
progress: [progress],
|
|
471
|
+
results: [{
|
|
472
|
+
agent: "commentator",
|
|
473
|
+
task: "review",
|
|
474
|
+
exitCode: 0,
|
|
475
|
+
messages: [],
|
|
476
|
+
usage: emptyUsage,
|
|
477
|
+
progress,
|
|
478
|
+
...testCase.flag,
|
|
479
|
+
}],
|
|
480
|
+
},
|
|
481
|
+
}, {}, theme).render(120).join("\n");
|
|
482
|
+
|
|
483
|
+
assert.match(summary, new RegExp(`· ${testCase.state}$`), testCase.name);
|
|
484
|
+
assert.doesNotMatch(summary, /running/, testCase.name);
|
|
485
|
+
}
|
|
486
|
+
});
|
|
487
|
+
|
|
488
|
+
it("keeps aggregate inline summaries running when another child is terminal", () => {
|
|
489
|
+
const progress = (index: number, agent: string) => ({
|
|
490
|
+
index,
|
|
491
|
+
agent,
|
|
492
|
+
status: "running" as const,
|
|
493
|
+
task: "review",
|
|
494
|
+
recentTools: [],
|
|
495
|
+
recentOutput: [],
|
|
496
|
+
toolCount: 1,
|
|
497
|
+
tokens: 42,
|
|
498
|
+
durationMs: 1_000,
|
|
499
|
+
});
|
|
500
|
+
const stoppedProgress = progress(0, "stopped-commentator");
|
|
501
|
+
const runningProgress = progress(1, "running-commentator");
|
|
502
|
+
const summary = renderSubagentSummary!({
|
|
503
|
+
content: [{ type: "text", text: "mixed" }],
|
|
504
|
+
details: {
|
|
505
|
+
mode: "parallel",
|
|
506
|
+
asyncId: "async-review",
|
|
507
|
+
progress: [stoppedProgress, runningProgress],
|
|
508
|
+
results: [
|
|
509
|
+
{ agent: "stopped-commentator", task: "review", exitCode: 1, messages: [], usage: emptyUsage, stopped: true, progress: stoppedProgress },
|
|
510
|
+
{ agent: "running-commentator", task: "review", exitCode: 0, messages: [], usage: emptyUsage, progress: runningProgress },
|
|
511
|
+
],
|
|
512
|
+
},
|
|
513
|
+
}, {}, theme).render(120).join("\n");
|
|
514
|
+
|
|
515
|
+
assert.match(summary, /· running$/);
|
|
516
|
+
});
|
|
517
|
+
|
|
518
|
+
it("keeps all-terminal async aggregate inline summaries terminal", () => {
|
|
519
|
+
const progress = (index: number, agent: string) => ({
|
|
520
|
+
index,
|
|
521
|
+
agent,
|
|
522
|
+
status: "running" as const,
|
|
523
|
+
task: "review",
|
|
524
|
+
recentTools: [],
|
|
525
|
+
recentOutput: [],
|
|
526
|
+
toolCount: 1,
|
|
527
|
+
tokens: 42,
|
|
528
|
+
durationMs: 1_000,
|
|
529
|
+
});
|
|
530
|
+
const stoppedProgress = progress(0, "stopped-commentator");
|
|
531
|
+
const pausedProgress = progress(1, "paused-commentator");
|
|
532
|
+
const detachedProgress = progress(2, "detached-commentator");
|
|
533
|
+
const summary = renderSubagentSummary!({
|
|
534
|
+
content: [{ type: "text", text: "all terminal" }],
|
|
535
|
+
details: {
|
|
536
|
+
mode: "parallel",
|
|
537
|
+
asyncId: "async-review",
|
|
538
|
+
progress: [stoppedProgress, pausedProgress, detachedProgress],
|
|
539
|
+
results: [
|
|
540
|
+
{ agent: "stopped-commentator", task: "review", exitCode: 1, messages: [], usage: emptyUsage, stopped: true, progress: stoppedProgress },
|
|
541
|
+
{ agent: "paused-commentator", task: "review", exitCode: 1, messages: [], usage: emptyUsage, interrupted: true, progress: pausedProgress },
|
|
542
|
+
{ agent: "detached-commentator", task: "review", exitCode: 0, messages: [], usage: emptyUsage, detached: true, progress: detachedProgress },
|
|
543
|
+
],
|
|
544
|
+
},
|
|
545
|
+
}, {}, theme).render(120).join("\n");
|
|
546
|
+
|
|
547
|
+
assert.match(summary, /· stopped$/);
|
|
548
|
+
assert.doesNotMatch(summary, /running/);
|
|
549
|
+
});
|
|
550
|
+
|
|
551
|
+
it("keeps all-completed async aggregate inline summaries terminal", () => {
|
|
552
|
+
for (const mode of ["parallel", "chain"] as const) {
|
|
553
|
+
const progress = ["writer", "commentator"].map((agent, index) => ({
|
|
554
|
+
index,
|
|
555
|
+
agent,
|
|
556
|
+
status: "completed" as const,
|
|
557
|
+
task: "review",
|
|
558
|
+
recentTools: [],
|
|
559
|
+
recentOutput: [],
|
|
560
|
+
toolCount: 1,
|
|
561
|
+
tokens: 42,
|
|
562
|
+
durationMs: 1_000,
|
|
563
|
+
}));
|
|
564
|
+
const summary = renderSubagentSummary!({
|
|
565
|
+
content: [{ type: "text", text: "done" }],
|
|
566
|
+
details: {
|
|
567
|
+
mode,
|
|
568
|
+
asyncId: `async-${mode}`,
|
|
569
|
+
progress,
|
|
570
|
+
results: progress.map((entry) => ({ agent: entry.agent, task: "review", exitCode: 0, messages: [], usage: emptyUsage, progress: entry })),
|
|
571
|
+
},
|
|
572
|
+
}, {}, theme).render(120).join("\n");
|
|
573
|
+
|
|
574
|
+
assert.match(summary, /· completed$/, mode);
|
|
575
|
+
assert.doesNotMatch(summary, /running/, mode);
|
|
576
|
+
}
|
|
577
|
+
});
|
|
578
|
+
|
|
579
|
+
it("keeps all-failed async aggregate inline summaries terminal", () => {
|
|
580
|
+
for (const mode of ["parallel", "chain"] as const) {
|
|
581
|
+
const progress = ["writer", "commentator"].map((agent, index) => ({
|
|
582
|
+
index,
|
|
583
|
+
agent,
|
|
584
|
+
status: "failed" as const,
|
|
585
|
+
task: "review",
|
|
586
|
+
recentTools: [],
|
|
587
|
+
recentOutput: [],
|
|
588
|
+
toolCount: 1,
|
|
589
|
+
tokens: 42,
|
|
590
|
+
durationMs: 1_000,
|
|
591
|
+
}));
|
|
592
|
+
const summary = renderSubagentSummary!({
|
|
593
|
+
content: [{ type: "text", text: "failed" }],
|
|
594
|
+
details: {
|
|
595
|
+
mode,
|
|
596
|
+
asyncId: `async-${mode}`,
|
|
597
|
+
progress,
|
|
598
|
+
results: progress.map((entry) => ({ agent: entry.agent, task: "review", exitCode: 1, error: "boom", messages: [], usage: emptyUsage, progress: entry })),
|
|
599
|
+
},
|
|
600
|
+
}, {}, theme).render(120).join("\n");
|
|
601
|
+
|
|
602
|
+
assert.match(summary, /· failed$/, mode);
|
|
603
|
+
assert.doesNotMatch(summary, /running/, mode);
|
|
604
|
+
}
|
|
605
|
+
});
|
|
606
|
+
|
|
607
|
+
it("uses shared semantic status presentation for expanded multi-result rows", () => {
|
|
608
|
+
const results = [
|
|
609
|
+
{
|
|
610
|
+
agent: "detached-agent",
|
|
611
|
+
task: "one",
|
|
612
|
+
exitCode: 0,
|
|
613
|
+
detached: true,
|
|
614
|
+
finalOutput: "output",
|
|
615
|
+
messages: [],
|
|
616
|
+
usage: emptyUsage,
|
|
617
|
+
progress: { index: 0, agent: "detached-agent", status: "running" as const, task: "one", recentTools: [], recentOutput: [], toolCount: 1, tokens: 42, durationMs: 1000 },
|
|
618
|
+
},
|
|
619
|
+
{
|
|
620
|
+
agent: "stopped-agent",
|
|
621
|
+
task: "two",
|
|
622
|
+
exitCode: 1,
|
|
623
|
+
stopped: true,
|
|
624
|
+
finalOutput: "output",
|
|
625
|
+
messages: [],
|
|
626
|
+
usage: emptyUsage,
|
|
627
|
+
progress: { index: 1, agent: "stopped-agent", status: "running" as const, task: "two", recentTools: [], recentOutput: [], toolCount: 1, tokens: 42, durationMs: 1000 },
|
|
628
|
+
},
|
|
629
|
+
{
|
|
630
|
+
agent: "paused-agent",
|
|
631
|
+
task: "three",
|
|
632
|
+
exitCode: 1,
|
|
633
|
+
interrupted: true,
|
|
634
|
+
finalOutput: "Interrupted. Waiting for explicit next action.",
|
|
635
|
+
messages: [],
|
|
636
|
+
usage: emptyUsage,
|
|
637
|
+
progress: { index: 2, agent: "paused-agent", status: "running" as const, task: "three", recentTools: [], recentOutput: [], toolCount: 1, tokens: 42, durationMs: 1000 },
|
|
638
|
+
},
|
|
639
|
+
{ agent: "failed-agent", task: "four", exitCode: 1, error: "boom", finalOutput: "output", messages: [], usage: emptyUsage },
|
|
640
|
+
{ agent: "completed-agent", task: "five", exitCode: 0, finalOutput: "output", messages: [], usage: emptyUsage },
|
|
641
|
+
];
|
|
642
|
+
const result = {
|
|
643
|
+
content: [{ type: "text" as const, text: "mixed" }],
|
|
644
|
+
details: { mode: "parallel" as const, totalSteps: results.length, results },
|
|
645
|
+
};
|
|
646
|
+
const compact = renderSubagentResult!(result, { expanded: false }, theme).render(160).join("\n");
|
|
647
|
+
const expanded = renderSubagentResult!(result, { expanded: true }, theme).render(160).join("\n");
|
|
648
|
+
|
|
649
|
+
assert.match(compact, /^■ parallel/);
|
|
650
|
+
assert.match(compact, /■ Agent 3\/5: paused-agent/);
|
|
651
|
+
assert.doesNotMatch(compact, /running agent/);
|
|
652
|
+
assert.match(expanded, /^■ parallel[^\n]* · detached/);
|
|
653
|
+
assert.match(expanded, /■ Agent 1\/5: detached-agent[^\n]* · detached/);
|
|
654
|
+
assert.match(expanded, /■ Agent 2\/5: stopped-agent[^\n]* · stopped/);
|
|
655
|
+
assert.match(expanded, /■ Agent 3\/5: paused-agent[^\n]* · paused/);
|
|
656
|
+
assert.doesNotMatch(expanded, /running agent/);
|
|
657
|
+
assert.match(expanded, /✗ Agent 4\/5: failed-agent · failed/);
|
|
658
|
+
assert.match(expanded, /✓ Agent 5\/5: completed-agent · completed/);
|
|
659
|
+
});
|
|
660
|
+
|
|
661
|
+
it("renders a stale-running interrupted aggregate as paused", () => {
|
|
662
|
+
const result = {
|
|
663
|
+
content: [{ type: "text" as const, text: "paused" }],
|
|
664
|
+
details: {
|
|
665
|
+
mode: "parallel" as const,
|
|
666
|
+
totalSteps: 1,
|
|
667
|
+
results: [{
|
|
668
|
+
agent: "paused-agent",
|
|
669
|
+
task: "pause",
|
|
670
|
+
exitCode: 1,
|
|
671
|
+
interrupted: true,
|
|
672
|
+
finalOutput: "Interrupted. Waiting for explicit next action.",
|
|
673
|
+
messages: [],
|
|
674
|
+
usage: emptyUsage,
|
|
675
|
+
progress: { index: 0, agent: "paused-agent", status: "running" as const, task: "pause", recentTools: [], recentOutput: [], toolCount: 1, tokens: 42, durationMs: 1000 },
|
|
676
|
+
}],
|
|
677
|
+
},
|
|
678
|
+
};
|
|
679
|
+
|
|
680
|
+
const compact = renderSubagentResult!(result, { expanded: false }, theme).render(160).join("\n");
|
|
681
|
+
const expanded = renderSubagentResult!(result, { expanded: true }, theme).render(160).join("\n");
|
|
682
|
+
|
|
683
|
+
assert.match(compact, /^■ parallel/);
|
|
684
|
+
assert.match(expanded, /^■ parallel[^\n]* · paused/);
|
|
685
|
+
});
|
|
686
|
+
|
|
372
687
|
it("uses glyph-first compact rendering for completed subagents", () => {
|
|
373
688
|
const widget = renderSubagentResult!({
|
|
374
689
|
content: [{ type: "text", text: "done" }],
|
|
375
690
|
details: {
|
|
376
691
|
mode: "single",
|
|
377
692
|
results: [{
|
|
378
|
-
agent: "
|
|
693
|
+
agent: "commentator",
|
|
379
694
|
task: "review",
|
|
380
695
|
exitCode: 0,
|
|
381
696
|
messages: [],
|
|
@@ -387,7 +702,7 @@ describe("renderSubagentResult fork indicator", () => {
|
|
|
387
702
|
}, { expanded: false }, theme);
|
|
388
703
|
|
|
389
704
|
const text = widget.render(120).join("\n");
|
|
390
|
-
assert.match(text, /^✓
|
|
705
|
+
assert.match(text, /^✓ commentator/);
|
|
391
706
|
assert.match(text, /⟳ 2/);
|
|
392
707
|
assert.match(text, /3 tool uses/);
|
|
393
708
|
assert.match(text, /1\.2k token/);
|
|
@@ -401,7 +716,7 @@ describe("renderSubagentResult fork indicator", () => {
|
|
|
401
716
|
details: {
|
|
402
717
|
mode: "single",
|
|
403
718
|
results: [{
|
|
404
|
-
agent: "
|
|
719
|
+
agent: "commentator",
|
|
405
720
|
task: "review",
|
|
406
721
|
exitCode: 1,
|
|
407
722
|
error: "boom",
|
|
@@ -412,7 +727,7 @@ describe("renderSubagentResult fork indicator", () => {
|
|
|
412
727
|
}, { expanded: false }, theme);
|
|
413
728
|
|
|
414
729
|
const text = widget.render(120).join("\n");
|
|
415
|
-
assert.match(text, /^✗
|
|
730
|
+
assert.match(text, /^✗ commentator/);
|
|
416
731
|
assert.match(text, /⎿ Error: boom/);
|
|
417
732
|
});
|
|
418
733
|
|
|
@@ -423,7 +738,7 @@ describe("renderSubagentResult fork indicator", () => {
|
|
|
423
738
|
details: {
|
|
424
739
|
mode: "single",
|
|
425
740
|
results: [{
|
|
426
|
-
agent: "
|
|
741
|
+
agent: "commentator",
|
|
427
742
|
task: "review",
|
|
428
743
|
exitCode: 0,
|
|
429
744
|
messages: [],
|
|
@@ -433,7 +748,7 @@ describe("renderSubagentResult fork indicator", () => {
|
|
|
433
748
|
usage: emptyUsage,
|
|
434
749
|
progress: {
|
|
435
750
|
index: 0,
|
|
436
|
-
agent: "
|
|
751
|
+
agent: "commentator",
|
|
437
752
|
status: "running",
|
|
438
753
|
task: "review",
|
|
439
754
|
lastActivityAt: now - 2_000,
|
|
@@ -463,14 +778,14 @@ describe("renderSubagentResult fork indicator", () => {
|
|
|
463
778
|
details: {
|
|
464
779
|
mode: "single",
|
|
465
780
|
results: [{
|
|
466
|
-
agent: "
|
|
781
|
+
agent: "commentator",
|
|
467
782
|
task: "review",
|
|
468
783
|
exitCode: 0,
|
|
469
784
|
messages: [],
|
|
470
785
|
usage: emptyUsage,
|
|
471
786
|
progress: {
|
|
472
787
|
index: 0,
|
|
473
|
-
agent: "
|
|
788
|
+
agent: "commentator",
|
|
474
789
|
status: "running",
|
|
475
790
|
task: "review",
|
|
476
791
|
model: "openai-codex/gpt-5.5",
|
|
@@ -484,7 +799,7 @@ describe("renderSubagentResult fork indicator", () => {
|
|
|
484
799
|
}],
|
|
485
800
|
},
|
|
486
801
|
}, { expanded: false }, theme).render(160).join("\n");
|
|
487
|
-
assert.match(single, /
|
|
802
|
+
assert.match(single, /commentator \(gpt-5\.5 · thinking high\)/);
|
|
488
803
|
|
|
489
804
|
const multi = renderSubagentResult!({
|
|
490
805
|
content: [{ type: "text", text: "(running...)" }],
|
|
@@ -492,13 +807,30 @@ describe("renderSubagentResult fork indicator", () => {
|
|
|
492
807
|
mode: "parallel",
|
|
493
808
|
totalSteps: 2,
|
|
494
809
|
results: [
|
|
495
|
-
{ agent: "
|
|
496
|
-
{ agent: "
|
|
810
|
+
{ agent: "explorer", task: "scan", exitCode: 0, messages: [], usage: emptyUsage, model: "anthropic/claude-haiku-4-5", thinking: "low", progress: { index: 0, agent: "explorer", status: "running", task: "scan", recentTools: [], recentOutput: [], toolCount: 0, tokens: 0, durationMs: 0 } },
|
|
811
|
+
{ agent: "builder", task: "fix", exitCode: 0, messages: [], usage: emptyUsage, progress: { index: 1, agent: "builder", status: "running", task: "fix", model: "openai/gpt-5-mini", recentTools: [], recentOutput: [], toolCount: 0, tokens: 0, durationMs: 0 } },
|
|
497
812
|
],
|
|
498
813
|
},
|
|
499
814
|
}, { expanded: false }, theme).render(160).join("\n");
|
|
500
|
-
assert.match(multi, /Agent 1\/2:
|
|
501
|
-
assert.match(multi, /Agent 2\/2:
|
|
815
|
+
assert.match(multi, /Agent 1\/2: explorer \(claude-haiku-4-5 · thinking low\)/);
|
|
816
|
+
assert.match(multi, /Agent 2\/2: builder \(gpt-5-mini\)/);
|
|
817
|
+
|
|
818
|
+
const expanded = renderSubagentResult!({
|
|
819
|
+
content: [{ type: "text", text: "done" }],
|
|
820
|
+
details: {
|
|
821
|
+
mode: "parallel",
|
|
822
|
+
totalSteps: 1,
|
|
823
|
+
results: [{
|
|
824
|
+
agent: "commentator",
|
|
825
|
+
task: "review",
|
|
826
|
+
exitCode: 0,
|
|
827
|
+
messages: [],
|
|
828
|
+
usage: emptyUsage,
|
|
829
|
+
progressSummary: { toolCount: 1, tokens: 42, durationMs: 3_000, model: "openai-codex/gpt-5.5", thinking: "high" },
|
|
830
|
+
}],
|
|
831
|
+
},
|
|
832
|
+
}, { expanded: true }, theme).render(160).join("\n");
|
|
833
|
+
assert.match(expanded, /commentator \(gpt-5\.5 · thinking high\)/);
|
|
502
834
|
});
|
|
503
835
|
|
|
504
836
|
it("keeps running compact result output stable when progress is unchanged", async () => {
|
|
@@ -507,14 +839,14 @@ describe("renderSubagentResult fork indicator", () => {
|
|
|
507
839
|
details: {
|
|
508
840
|
mode: "single" as const,
|
|
509
841
|
results: [{
|
|
510
|
-
agent: "
|
|
842
|
+
agent: "commentator",
|
|
511
843
|
task: "review",
|
|
512
844
|
exitCode: 0,
|
|
513
845
|
messages: [],
|
|
514
846
|
usage: emptyUsage,
|
|
515
847
|
progress: {
|
|
516
848
|
index: 0,
|
|
517
|
-
agent: "
|
|
849
|
+
agent: "commentator",
|
|
518
850
|
status: "running" as const,
|
|
519
851
|
task: "review",
|
|
520
852
|
lastActivityAt: 2_000,
|
|
@@ -543,14 +875,14 @@ describe("renderSubagentResult fork indicator", () => {
|
|
|
543
875
|
details: {
|
|
544
876
|
mode: "single",
|
|
545
877
|
results: [{
|
|
546
|
-
agent: "
|
|
878
|
+
agent: "commentator",
|
|
547
879
|
task: "review",
|
|
548
880
|
exitCode: 0,
|
|
549
881
|
messages: [],
|
|
550
882
|
usage: emptyUsage,
|
|
551
883
|
progress: {
|
|
552
884
|
index: 0,
|
|
553
|
-
agent: "
|
|
885
|
+
agent: "commentator",
|
|
554
886
|
status: "running",
|
|
555
887
|
task: "review",
|
|
556
888
|
recentTools: [],
|
|
@@ -571,9 +903,9 @@ describe("renderSubagentResult fork indicator", () => {
|
|
|
571
903
|
content: [{ type: "text", text: "paused" }],
|
|
572
904
|
details: {
|
|
573
905
|
mode: "chain",
|
|
574
|
-
chainAgents: ["
|
|
906
|
+
chainAgents: ["builder"],
|
|
575
907
|
results: [{
|
|
576
|
-
agent: "
|
|
908
|
+
agent: "builder",
|
|
577
909
|
task: "pause",
|
|
578
910
|
exitCode: 0,
|
|
579
911
|
interrupted: true,
|
|
@@ -593,9 +925,9 @@ describe("renderSubagentResult fork indicator", () => {
|
|
|
593
925
|
content: [{ type: "text", text: "done" }],
|
|
594
926
|
details: {
|
|
595
927
|
mode: "chain",
|
|
596
|
-
chainAgents: ["
|
|
928
|
+
chainAgents: ["builder"],
|
|
597
929
|
results: [{
|
|
598
|
-
agent: "
|
|
930
|
+
agent: "builder",
|
|
599
931
|
task: "check without output target",
|
|
600
932
|
exitCode: 0,
|
|
601
933
|
messages: [],
|
|
@@ -650,14 +982,14 @@ describe("renderSubagentResult fork indicator", () => {
|
|
|
650
982
|
mode: "parallel",
|
|
651
983
|
totalSteps: 3,
|
|
652
984
|
results: [{
|
|
653
|
-
agent: "
|
|
985
|
+
agent: "builder",
|
|
654
986
|
task: "third task",
|
|
655
987
|
exitCode: 0,
|
|
656
988
|
messages: [],
|
|
657
989
|
usage: emptyUsage,
|
|
658
990
|
progress: {
|
|
659
991
|
index: 2,
|
|
660
|
-
agent: "
|
|
992
|
+
agent: "builder",
|
|
661
993
|
status: "running",
|
|
662
994
|
task: "third task",
|
|
663
995
|
recentTools: [],
|
|
@@ -669,7 +1001,7 @@ describe("renderSubagentResult fork indicator", () => {
|
|
|
669
1001
|
}],
|
|
670
1002
|
progress: [{
|
|
671
1003
|
index: 0,
|
|
672
|
-
agent: "
|
|
1004
|
+
agent: "explorer",
|
|
673
1005
|
status: "running",
|
|
674
1006
|
task: "first",
|
|
675
1007
|
recentTools: [],
|
|
@@ -683,9 +1015,9 @@ describe("renderSubagentResult fork indicator", () => {
|
|
|
683
1015
|
|
|
684
1016
|
const text = widget.render(120).join("\n");
|
|
685
1017
|
assert.match(text, /parallel · 2 agents running · 0\/3 done/);
|
|
686
|
-
assert.match(text, /Agent 3\/3:
|
|
687
|
-
assert.doesNotMatch(text, /Step 3:
|
|
688
|
-
assert.doesNotMatch(text, /Agent 1:
|
|
1018
|
+
assert.match(text, /Agent 3\/3: builder/);
|
|
1019
|
+
assert.doesNotMatch(text, /Step 3: builder/);
|
|
1020
|
+
assert.doesNotMatch(text, /Agent 1: builder/);
|
|
689
1021
|
});
|
|
690
1022
|
|
|
691
1023
|
it("shows mixed done/running counters for top-level parallel mode", () => {
|
|
@@ -695,21 +1027,21 @@ describe("renderSubagentResult fork indicator", () => {
|
|
|
695
1027
|
mode: "parallel",
|
|
696
1028
|
totalSteps: 3,
|
|
697
1029
|
results: [{
|
|
698
|
-
agent: "
|
|
1030
|
+
agent: "explorer",
|
|
699
1031
|
task: "first",
|
|
700
1032
|
exitCode: 0,
|
|
701
1033
|
messages: [],
|
|
702
1034
|
usage: emptyUsage,
|
|
703
|
-
progress: { index: 0, agent: "
|
|
1035
|
+
progress: { index: 0, agent: "explorer", status: "completed", task: "first", recentTools: [], recentOutput: [], toolCount: 1, tokens: 0, durationMs: 10 },
|
|
704
1036
|
}, {
|
|
705
|
-
agent: "
|
|
1037
|
+
agent: "commentator",
|
|
706
1038
|
task: "second",
|
|
707
1039
|
exitCode: 0,
|
|
708
1040
|
messages: [],
|
|
709
1041
|
usage: emptyUsage,
|
|
710
|
-
progress: { index: 1, agent: "
|
|
1042
|
+
progress: { index: 1, agent: "commentator", status: "running", task: "second", recentTools: [], recentOutput: [], toolCount: 1, tokens: 0, durationMs: 10 },
|
|
711
1043
|
}],
|
|
712
|
-
progress: [{ index: 0, agent: "
|
|
1044
|
+
progress: [{ index: 0, agent: "explorer", status: "completed", task: "first", recentTools: [], recentOutput: [], toolCount: 1, tokens: 0, durationMs: 10 }, { index: 1, agent: "commentator", status: "running", task: "second", recentTools: [], recentOutput: [], toolCount: 1, tokens: 0, durationMs: 10 }],
|
|
713
1045
|
},
|
|
714
1046
|
}, { expanded: false }, theme);
|
|
715
1047
|
|
|
@@ -724,31 +1056,31 @@ describe("renderSubagentResult fork indicator", () => {
|
|
|
724
1056
|
mode: "chain",
|
|
725
1057
|
totalSteps: 3,
|
|
726
1058
|
currentStepIndex: 0,
|
|
727
|
-
chainAgents: ["[
|
|
1059
|
+
chainAgents: ["[explorer+commentator+builder]", "architect", "writer"],
|
|
728
1060
|
results: [{
|
|
729
|
-
agent: "
|
|
1061
|
+
agent: "explorer",
|
|
730
1062
|
task: "scan",
|
|
731
1063
|
exitCode: 0,
|
|
732
1064
|
messages: [],
|
|
733
1065
|
usage: emptyUsage,
|
|
734
|
-
progress: { index: 0, agent: "
|
|
1066
|
+
progress: { index: 0, agent: "explorer", status: "running", task: "scan", recentTools: [], recentOutput: [], toolCount: 0, tokens: 0, durationMs: 0 },
|
|
735
1067
|
}, {
|
|
736
|
-
agent: "
|
|
1068
|
+
agent: "commentator",
|
|
737
1069
|
task: "review",
|
|
738
1070
|
exitCode: 0,
|
|
739
1071
|
messages: [],
|
|
740
1072
|
usage: emptyUsage,
|
|
741
|
-
progress: { index: 1, agent: "
|
|
1073
|
+
progress: { index: 1, agent: "commentator", status: "running", task: "review", recentTools: [], recentOutput: [], toolCount: 0, tokens: 0, durationMs: 0 },
|
|
742
1074
|
}],
|
|
743
|
-
progress: [{ index: 0, agent: "
|
|
1075
|
+
progress: [{ index: 0, agent: "explorer", status: "running", task: "scan", recentTools: [], recentOutput: [], toolCount: 0, tokens: 0, durationMs: 0 }, { index: 1, agent: "commentator", status: "running", task: "review", recentTools: [], recentOutput: [], toolCount: 0, tokens: 0, durationMs: 0 }],
|
|
744
1076
|
},
|
|
745
1077
|
}, { expanded: false }, theme);
|
|
746
1078
|
|
|
747
1079
|
const text = widget.render(120).join("\n");
|
|
748
1080
|
assert.match(text, /chain · step 1\/3 · parallel group: 2 agents running · 0\/3 done/);
|
|
749
|
-
assert.match(text, /Agent 1\/3:
|
|
750
|
-
assert.match(text, /Agent 2\/3:
|
|
751
|
-
assert.doesNotMatch(text, /Step 1:
|
|
1081
|
+
assert.match(text, /Agent 1\/3: explorer/);
|
|
1082
|
+
assert.match(text, /Agent 2\/3: commentator/);
|
|
1083
|
+
assert.doesNotMatch(text, /Step 1: explorer/);
|
|
752
1084
|
});
|
|
753
1085
|
|
|
754
1086
|
it("shows only the active parallel group for mixed chains after a serial step", () => {
|
|
@@ -758,50 +1090,50 @@ describe("renderSubagentResult fork indicator", () => {
|
|
|
758
1090
|
mode: "chain",
|
|
759
1091
|
totalSteps: 3,
|
|
760
1092
|
currentStepIndex: 1,
|
|
761
|
-
chainAgents: ["
|
|
1093
|
+
chainAgents: ["architect", "[explorer+commentator]", "writer"],
|
|
762
1094
|
results: [{
|
|
763
|
-
agent: "
|
|
1095
|
+
agent: "architect",
|
|
764
1096
|
task: "plan",
|
|
765
1097
|
exitCode: 0,
|
|
766
1098
|
messages: [],
|
|
767
1099
|
usage: emptyUsage,
|
|
768
|
-
progress: { index: 0, agent: "
|
|
1100
|
+
progress: { index: 0, agent: "architect", status: "completed", task: "plan", recentTools: [], recentOutput: [], toolCount: 0, tokens: 0, durationMs: 0 },
|
|
769
1101
|
}, {
|
|
770
|
-
agent: "
|
|
1102
|
+
agent: "explorer",
|
|
771
1103
|
task: "scan",
|
|
772
1104
|
exitCode: 0,
|
|
773
1105
|
messages: [],
|
|
774
1106
|
usage: emptyUsage,
|
|
775
|
-
progress: { index: 1, agent: "
|
|
1107
|
+
progress: { index: 1, agent: "explorer", status: "running", task: "scan", recentTools: [], recentOutput: [], toolCount: 0, tokens: 0, durationMs: 0 },
|
|
776
1108
|
}, {
|
|
777
|
-
agent: "
|
|
1109
|
+
agent: "commentator",
|
|
778
1110
|
task: "review",
|
|
779
1111
|
exitCode: 0,
|
|
780
1112
|
messages: [],
|
|
781
1113
|
usage: emptyUsage,
|
|
782
|
-
progress: { index: 2, agent: "
|
|
1114
|
+
progress: { index: 2, agent: "commentator", status: "running", task: "review", recentTools: [], recentOutput: [], toolCount: 0, tokens: 0, durationMs: 0 },
|
|
783
1115
|
}],
|
|
784
1116
|
progress: [
|
|
785
|
-
{ index: 0, agent: "
|
|
786
|
-
{ index: 1, agent: "
|
|
787
|
-
{ index: 2, agent: "
|
|
1117
|
+
{ index: 0, agent: "architect", status: "completed", task: "plan", recentTools: [], recentOutput: [], toolCount: 0, tokens: 0, durationMs: 0 },
|
|
1118
|
+
{ index: 1, agent: "explorer", status: "running", task: "scan", recentTools: [], recentOutput: [], toolCount: 0, tokens: 0, durationMs: 0 },
|
|
1119
|
+
{ index: 2, agent: "commentator", status: "running", task: "review", recentTools: [], recentOutput: [], toolCount: 0, tokens: 0, durationMs: 0 },
|
|
788
1120
|
],
|
|
789
1121
|
},
|
|
790
1122
|
}, { expanded: false }, theme);
|
|
791
1123
|
|
|
792
1124
|
const text = widget.render(120).join("\n");
|
|
793
1125
|
assert.match(text, /chain · step 2\/3 · parallel group: 2 agents running · 0\/2 done/);
|
|
794
|
-
assert.match(text, /Agent 1\/2:
|
|
795
|
-
assert.match(text, /Agent 2\/2:
|
|
796
|
-
assert.doesNotMatch(text, /
|
|
797
|
-
assert.doesNotMatch(text, /Agent 1\/2:
|
|
1126
|
+
assert.match(text, /Agent 1\/2: explorer/);
|
|
1127
|
+
assert.match(text, /Agent 2\/2: commentator/);
|
|
1128
|
+
assert.doesNotMatch(text, /architect/);
|
|
1129
|
+
assert.doesNotMatch(text, /Agent 1\/2: architect/);
|
|
798
1130
|
});
|
|
799
1131
|
|
|
800
1132
|
it("uses logical chain progress and agent labels for completed mixed chains", () => {
|
|
801
1133
|
const progress = [
|
|
802
|
-
{ index: 0, agent: "
|
|
803
|
-
{ index: 1, agent: "
|
|
804
|
-
{ index: 2, agent: "
|
|
1134
|
+
{ index: 0, agent: "architect", status: "completed" as const, task: "plan", recentTools: [], recentOutput: [], toolCount: 0, tokens: 0, durationMs: 1 },
|
|
1135
|
+
{ index: 1, agent: "explorer", status: "completed" as const, task: "scan", recentTools: [], recentOutput: [], toolCount: 0, tokens: 0, durationMs: 1 },
|
|
1136
|
+
{ index: 2, agent: "commentator", status: "completed" as const, task: "review", recentTools: [], recentOutput: [], toolCount: 0, tokens: 0, durationMs: 1 },
|
|
805
1137
|
{ index: 3, agent: "writer", status: "completed" as const, task: "write", recentTools: [], recentOutput: [], toolCount: 0, tokens: 0, durationMs: 1 },
|
|
806
1138
|
];
|
|
807
1139
|
const widget = renderSubagentResult!({
|
|
@@ -809,7 +1141,7 @@ describe("renderSubagentResult fork indicator", () => {
|
|
|
809
1141
|
details: {
|
|
810
1142
|
mode: "chain",
|
|
811
1143
|
totalSteps: 3,
|
|
812
|
-
chainAgents: ["
|
|
1144
|
+
chainAgents: ["architect", "[explorer+commentator]", "writer"],
|
|
813
1145
|
results: progress.map((entry) => ({
|
|
814
1146
|
agent: entry.agent,
|
|
815
1147
|
task: entry.task,
|
|
@@ -824,9 +1156,9 @@ describe("renderSubagentResult fork indicator", () => {
|
|
|
824
1156
|
|
|
825
1157
|
const text = widget.render(120).join("\n");
|
|
826
1158
|
assert.match(text, /chain · step 3\/3/);
|
|
827
|
-
assert.match(text, /Step 1:
|
|
828
|
-
assert.match(text, /Agent 1\/2:
|
|
829
|
-
assert.match(text, /Agent 2\/2:
|
|
1159
|
+
assert.match(text, /Step 1: architect/);
|
|
1160
|
+
assert.match(text, /Agent 1\/2: explorer/);
|
|
1161
|
+
assert.match(text, /Agent 2\/2: commentator/);
|
|
830
1162
|
assert.match(text, /Step 3: writer/);
|
|
831
1163
|
assert.doesNotMatch(text, /step 4\/4/);
|
|
832
1164
|
});
|
|
@@ -838,245 +1170,21 @@ describe("renderSubagentResult fork indicator", () => {
|
|
|
838
1170
|
mode: "chain",
|
|
839
1171
|
totalSteps: 3,
|
|
840
1172
|
currentStepIndex: 0,
|
|
841
|
-
chainAgents: ["
|
|
1173
|
+
chainAgents: ["explorer", "commentator", "builder"],
|
|
842
1174
|
results: [{
|
|
843
|
-
agent: "
|
|
1175
|
+
agent: "explorer",
|
|
844
1176
|
task: "scan",
|
|
845
1177
|
exitCode: 0,
|
|
846
1178
|
messages: [],
|
|
847
1179
|
usage: emptyUsage,
|
|
848
|
-
progress: { index: 0, agent: "
|
|
1180
|
+
progress: { index: 0, agent: "explorer", status: "running", task: "scan", recentTools: [], recentOutput: [], toolCount: 0, tokens: 0, durationMs: 0 },
|
|
849
1181
|
}],
|
|
850
1182
|
},
|
|
851
1183
|
}, { expanded: false }, theme);
|
|
852
1184
|
|
|
853
1185
|
const text = widget.render(120).join("\n");
|
|
854
1186
|
assert.match(text, /chain · step 1\/3/);
|
|
855
|
-
assert.match(text, /Step 1:
|
|
1187
|
+
assert.match(text, /Step 1: explorer/);
|
|
856
1188
|
assert.doesNotMatch(text, /parallel group:/);
|
|
857
1189
|
});
|
|
858
|
-
|
|
859
|
-
it("keeps settled expanded file-only results reference-first without re-inlining saved child prose", () => {
|
|
860
|
-
const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), "pi-subagents-render-"));
|
|
861
|
-
try {
|
|
862
|
-
const outputPath = path.join(tempDir, "child-output.md");
|
|
863
|
-
const childProse = Array.from({ length: 40 }, (_, index) => `SENSITIVE FULL CHILD OUTPUT line ${index + 1}`).join("\n");
|
|
864
|
-
fs.writeFileSync(outputPath, childProse, "utf-8");
|
|
865
|
-
const bytes = Buffer.byteLength(childProse, "utf-8");
|
|
866
|
-
const referenceMessage = `Output saved to: ${outputPath} (${bytes} B, 40 lines). Read this file if needed.`;
|
|
867
|
-
const widget = renderSubagentResult!({
|
|
868
|
-
content: [{ type: "text", text: "done" }],
|
|
869
|
-
details: {
|
|
870
|
-
mode: "single",
|
|
871
|
-
results: [{
|
|
872
|
-
agent: "writer",
|
|
873
|
-
task: "Write the report",
|
|
874
|
-
exitCode: 0,
|
|
875
|
-
messages: [],
|
|
876
|
-
usage: emptyUsage,
|
|
877
|
-
outputMode: "file-only",
|
|
878
|
-
savedOutputPath: outputPath,
|
|
879
|
-
outputReference: { path: outputPath, bytes, lines: 40, message: referenceMessage },
|
|
880
|
-
sessionFile: path.join(tempDir, "session.jsonl"),
|
|
881
|
-
artifactPaths: { outputPath, dir: tempDir },
|
|
882
|
-
}],
|
|
883
|
-
},
|
|
884
|
-
}, { expanded: true }, theme);
|
|
885
|
-
|
|
886
|
-
const text = widget.render(200).join("\n");
|
|
887
|
-
assert.doesNotMatch(text, /SENSITIVE FULL CHILD OUTPUT/);
|
|
888
|
-
assert.match(text, /Output saved to:/);
|
|
889
|
-
assert.match(text, new RegExp(outputPath.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")));
|
|
890
|
-
assert.match(text, /Session:/);
|
|
891
|
-
assert.match(text, /Artifacts:/);
|
|
892
|
-
} finally {
|
|
893
|
-
fs.rmSync(tempDir, { recursive: true, force: true });
|
|
894
|
-
}
|
|
895
|
-
});
|
|
896
|
-
|
|
897
|
-
it("keeps explicit inline output and live progress rendering in expanded results", () => {
|
|
898
|
-
const inline = renderSubagentResult!({
|
|
899
|
-
content: [{ type: "text", text: "done" }],
|
|
900
|
-
details: {
|
|
901
|
-
mode: "single",
|
|
902
|
-
results: [{
|
|
903
|
-
agent: "writer",
|
|
904
|
-
task: "Inline task",
|
|
905
|
-
exitCode: 0,
|
|
906
|
-
messages: [],
|
|
907
|
-
usage: emptyUsage,
|
|
908
|
-
outputMode: "inline",
|
|
909
|
-
finalOutput: "FULL INLINE RESULT TEXT",
|
|
910
|
-
}],
|
|
911
|
-
},
|
|
912
|
-
}, { expanded: true }, theme).render(200).join("\n");
|
|
913
|
-
assert.match(inline, /FULL INLINE RESULT TEXT/);
|
|
914
|
-
|
|
915
|
-
const running = renderSubagentResult!({
|
|
916
|
-
content: [{ type: "text", text: "running" }],
|
|
917
|
-
details: {
|
|
918
|
-
mode: "single",
|
|
919
|
-
results: [{
|
|
920
|
-
agent: "reviewer",
|
|
921
|
-
task: "review",
|
|
922
|
-
exitCode: 0,
|
|
923
|
-
messages: [],
|
|
924
|
-
usage: emptyUsage,
|
|
925
|
-
progress: { index: 0, agent: "reviewer", status: "running", task: "review", recentTools: [], recentOutput: [], toolCount: 1, tokens: 42, durationMs: 3_000 },
|
|
926
|
-
}],
|
|
927
|
-
},
|
|
928
|
-
}, { expanded: true }, theme).render(200).join("\n");
|
|
929
|
-
assert.match(running, /running/);
|
|
930
|
-
assert.match(running, /for live detail/);
|
|
931
|
-
});
|
|
932
|
-
|
|
933
|
-
it("synthesizes a path-only output reference for legacy savedOutputPath results without reading the file", () => {
|
|
934
|
-
const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), "pi-subagents-render-"));
|
|
935
|
-
try {
|
|
936
|
-
const outputPath = path.join(tempDir, "legacy-child-output.md");
|
|
937
|
-
// The file does not exist on disk: the renderer must never read it.
|
|
938
|
-
const widget = renderSubagentResult!({
|
|
939
|
-
content: [{ type: "text", text: "done" }],
|
|
940
|
-
details: {
|
|
941
|
-
mode: "single",
|
|
942
|
-
results: [{
|
|
943
|
-
agent: "writer",
|
|
944
|
-
task: "Write the report",
|
|
945
|
-
exitCode: 0,
|
|
946
|
-
messages: [],
|
|
947
|
-
usage: emptyUsage,
|
|
948
|
-
savedOutputPath: outputPath,
|
|
949
|
-
}],
|
|
950
|
-
},
|
|
951
|
-
}, { expanded: true }, theme);
|
|
952
|
-
|
|
953
|
-
const text = widget.render(200).join("\n");
|
|
954
|
-
assert.match(text, new RegExp(`Output saved to: ${outputPath.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}`));
|
|
955
|
-
assert.match(text, /Read this file if needed/);
|
|
956
|
-
assert.doesNotMatch(text, /\(\d+ B, \d+ lines\)/);
|
|
957
|
-
} finally {
|
|
958
|
-
fs.rmSync(tempDir, { recursive: true, force: true });
|
|
959
|
-
}
|
|
960
|
-
});
|
|
961
|
-
|
|
962
|
-
it("keeps foreign savedOutputPath results reference-first even when they carry inline text", () => {
|
|
963
|
-
const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), "pi-subagents-render-"));
|
|
964
|
-
try {
|
|
965
|
-
const outputPath = path.join(tempDir, "foreign-child-output.md");
|
|
966
|
-
const widget = renderSubagentResult!({
|
|
967
|
-
content: [{ type: "text", text: "done" }],
|
|
968
|
-
details: {
|
|
969
|
-
mode: "single",
|
|
970
|
-
results: [{
|
|
971
|
-
agent: "writer",
|
|
972
|
-
task: "Write the report",
|
|
973
|
-
exitCode: 0,
|
|
974
|
-
messages: [],
|
|
975
|
-
usage: emptyUsage,
|
|
976
|
-
savedOutputPath: outputPath,
|
|
977
|
-
finalOutput: "SENSITIVE FOREIGN CHILD PROSE that must not be inlined",
|
|
978
|
-
}],
|
|
979
|
-
},
|
|
980
|
-
}, { expanded: true }, theme);
|
|
981
|
-
|
|
982
|
-
const text = widget.render(200).join("\n");
|
|
983
|
-
assert.doesNotMatch(text, /SENSITIVE FOREIGN CHILD PROSE/);
|
|
984
|
-
assert.match(text, new RegExp(`Output saved to: ${outputPath.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}`));
|
|
985
|
-
} finally {
|
|
986
|
-
fs.rmSync(tempDir, { recursive: true, force: true });
|
|
987
|
-
}
|
|
988
|
-
});
|
|
989
|
-
|
|
990
|
-
it("keeps compact file-only results reference-first with the saved-output reference", () => {
|
|
991
|
-
const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), "pi-subagents-render-"));
|
|
992
|
-
try {
|
|
993
|
-
const outputPath = path.join(tempDir, "child-output.md");
|
|
994
|
-
const childProse = Array.from({ length: 40 }, (_, index) => `SENSITIVE FULL CHILD OUTPUT line ${index + 1}`).join("\n");
|
|
995
|
-
fs.writeFileSync(outputPath, childProse, "utf-8");
|
|
996
|
-
const bytes = Buffer.byteLength(childProse, "utf-8");
|
|
997
|
-
const referenceMessage = `Output saved to: ${outputPath} (${bytes} B, 40 lines). Read this file if needed.`;
|
|
998
|
-
const widget = renderSubagentResult!({
|
|
999
|
-
content: [{ type: "text", text: "done" }],
|
|
1000
|
-
details: {
|
|
1001
|
-
mode: "single",
|
|
1002
|
-
results: [{
|
|
1003
|
-
agent: "writer",
|
|
1004
|
-
task: "Write the report",
|
|
1005
|
-
exitCode: 0,
|
|
1006
|
-
messages: [],
|
|
1007
|
-
usage: emptyUsage,
|
|
1008
|
-
outputMode: "file-only",
|
|
1009
|
-
savedOutputPath: outputPath,
|
|
1010
|
-
outputReference: { path: outputPath, bytes, lines: 40, message: referenceMessage },
|
|
1011
|
-
}],
|
|
1012
|
-
},
|
|
1013
|
-
}, { expanded: false }, theme);
|
|
1014
|
-
|
|
1015
|
-
const text = widget.render(200).join("\n");
|
|
1016
|
-
assert.doesNotMatch(text, /SENSITIVE FULL CHILD OUTPUT/);
|
|
1017
|
-
assert.match(text, /Output saved to:/);
|
|
1018
|
-
assert.doesNotMatch(text, /no text output/);
|
|
1019
|
-
} finally {
|
|
1020
|
-
fs.rmSync(tempDir, { recursive: true, force: true });
|
|
1021
|
-
}
|
|
1022
|
-
});
|
|
1023
|
-
|
|
1024
|
-
it("keeps compact multi file-only results reference-first and success-marked", () => {
|
|
1025
|
-
const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), "pi-subagents-render-"));
|
|
1026
|
-
try {
|
|
1027
|
-
const outputPathA = path.join(tempDir, "a.md");
|
|
1028
|
-
const outputPathB = path.join(tempDir, "b.md");
|
|
1029
|
-
fs.writeFileSync(outputPathA, "SENSITIVE CHILD OUTPUT A", "utf-8");
|
|
1030
|
-
fs.writeFileSync(outputPathB, "SENSITIVE CHILD OUTPUT B", "utf-8");
|
|
1031
|
-
const refA = { path: outputPathA, bytes: 24, lines: 1, message: `Output saved to: ${outputPathA} (24 B, 1 line). Read this file if needed.` };
|
|
1032
|
-
const refB = { path: outputPathB, bytes: 24, lines: 1, message: `Output saved to: ${outputPathB} (24 B, 1 line). Read this file if needed.` };
|
|
1033
|
-
const widget = renderSubagentResult!({
|
|
1034
|
-
content: [{ type: "text", text: "done" }],
|
|
1035
|
-
details: {
|
|
1036
|
-
mode: "parallel",
|
|
1037
|
-
totalSteps: 2,
|
|
1038
|
-
results: [
|
|
1039
|
-
{ agent: "scout", task: "scan", exitCode: 0, messages: [], usage: emptyUsage, outputMode: "file-only", savedOutputPath: outputPathA, outputReference: refA },
|
|
1040
|
-
{ agent: "reviewer", task: "review", exitCode: 0, messages: [], usage: emptyUsage, outputMode: "file-only", savedOutputPath: outputPathB, outputReference: refB },
|
|
1041
|
-
],
|
|
1042
|
-
},
|
|
1043
|
-
}, { expanded: false }, theme);
|
|
1044
|
-
|
|
1045
|
-
const text = widget.render(200).join("\n");
|
|
1046
|
-
assert.doesNotMatch(text, /SENSITIVE CHILD OUTPUT/);
|
|
1047
|
-
assert.doesNotMatch(text, /no text output/);
|
|
1048
|
-
assert.match(text, /^✓ parallel/);
|
|
1049
|
-
assert.match(text, /Agent 1\/2: scout/);
|
|
1050
|
-
assert.match(text, /Agent 2\/2: reviewer/);
|
|
1051
|
-
} finally {
|
|
1052
|
-
fs.rmSync(tempDir, { recursive: true, force: true });
|
|
1053
|
-
}
|
|
1054
|
-
});
|
|
1055
|
-
|
|
1056
|
-
it("marks legacy compact multi savedOutputPath results as done without inlining child prose", () => {
|
|
1057
|
-
const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), "pi-subagents-render-"));
|
|
1058
|
-
try {
|
|
1059
|
-
const outputPath = path.join(tempDir, "legacy.md");
|
|
1060
|
-
const widget = renderSubagentResult!({
|
|
1061
|
-
content: [{ type: "text", text: "done" }],
|
|
1062
|
-
details: {
|
|
1063
|
-
mode: "parallel",
|
|
1064
|
-
totalSteps: 2,
|
|
1065
|
-
results: [
|
|
1066
|
-
{ agent: "scout", task: "scan", exitCode: 0, messages: [], usage: emptyUsage, savedOutputPath: outputPath, finalOutput: "LEGACY SENSITIVE PROSE" },
|
|
1067
|
-
{ agent: "writer", task: "Write the report", exitCode: 0, messages: [], usage: emptyUsage, savedOutputPath: outputPath, finalOutput: "MORE LEGACY SENSITIVE PROSE" },
|
|
1068
|
-
],
|
|
1069
|
-
},
|
|
1070
|
-
}, { expanded: false }, theme);
|
|
1071
|
-
|
|
1072
|
-
const text = widget.render(200).join("\n");
|
|
1073
|
-
assert.doesNotMatch(text, /LEGACY SENSITIVE PROSE|MORE LEGACY SENSITIVE PROSE/);
|
|
1074
|
-
assert.doesNotMatch(text, /no text output/);
|
|
1075
|
-
assert.match(text, /^✓ parallel/);
|
|
1076
|
-
assert.match(text, /Agent 1\/2: scout/);
|
|
1077
|
-
assert.match(text, /Agent 2\/2: writer/);
|
|
1078
|
-
} finally {
|
|
1079
|
-
fs.rmSync(tempDir, { recursive: true, force: true });
|
|
1080
|
-
}
|
|
1081
|
-
});
|
|
1082
1190
|
});
|