@wrongstack/cli 0.284.1 → 0.286.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/README.md +4 -4
- package/dist/acp-registry-cache.d.ts +33 -0
- package/dist/acp-registry-cache.d.ts.map +1 -0
- package/dist/acp-server-agent.d.ts +66 -0
- package/dist/acp-server-agent.d.ts.map +1 -0
- package/dist/arg-parser.d.ts +41 -0
- package/dist/arg-parser.d.ts.map +1 -0
- package/dist/auth-menu/add-provider.d.ts +15 -0
- package/dist/auth-menu/add-provider.d.ts.map +1 -0
- package/dist/auth-menu/anthropic-oauth.d.ts +43 -0
- package/dist/auth-menu/anthropic-oauth.d.ts.map +1 -0
- package/dist/auth-menu/auth-menu-audit.d.ts +175 -0
- package/dist/auth-menu/auth-menu-audit.d.ts.map +1 -0
- package/dist/auth-menu/direct.d.ts +15 -0
- package/dist/auth-menu/direct.d.ts.map +1 -0
- package/dist/auth-menu/github-copilot-oauth.d.ts +73 -0
- package/dist/auth-menu/github-copilot-oauth.d.ts.map +1 -0
- package/dist/auth-menu/helpers.d.ts +7 -0
- package/dist/auth-menu/helpers.d.ts.map +1 -0
- package/dist/auth-menu/index.d.ts +8 -0
- package/dist/auth-menu/index.d.ts.map +1 -0
- package/dist/auth-menu/local-presets.d.ts +36 -0
- package/dist/auth-menu/local-presets.d.ts.map +1 -0
- package/dist/auth-menu/local.d.ts +138 -0
- package/dist/auth-menu/local.d.ts.map +1 -0
- package/dist/auth-menu/oauth-menu.d.ts +10 -0
- package/dist/auth-menu/oauth-menu.d.ts.map +1 -0
- package/dist/auth-menu/openai-codex-oauth.d.ts +167 -0
- package/dist/auth-menu/openai-codex-oauth.d.ts.map +1 -0
- package/dist/auth-menu/panel-service.d.ts +32 -0
- package/dist/auth-menu/panel-service.d.ts.map +1 -0
- package/dist/auth-menu/provider-menu.d.ts +7 -0
- package/dist/auth-menu/provider-menu.d.ts.map +1 -0
- package/dist/auth-menu/shared.d.ts +32 -0
- package/dist/auth-menu/shared.d.ts.map +1 -0
- package/dist/auth-menu/top-menu.d.ts +11 -0
- package/dist/auth-menu/top-menu.d.ts.map +1 -0
- package/dist/auth-menu/types.d.ts +42 -0
- package/dist/auth-menu/types.d.ts.map +1 -0
- package/dist/auth-menu.d.ts +7 -0
- package/dist/auth-menu.d.ts.map +1 -0
- package/dist/autophase-host.d.ts +103 -0
- package/dist/autophase-host.d.ts.map +1 -0
- package/dist/boot/auto-discover-providers.d.ts +20 -0
- package/dist/boot/auto-discover-providers.d.ts.map +1 -0
- package/dist/boot/brain-decision-log.d.ts +38 -0
- package/dist/boot/brain-decision-log.d.ts.map +1 -0
- package/dist/boot/container-wiring.d.ts +34 -0
- package/dist/boot/container-wiring.d.ts.map +1 -0
- package/dist/boot/dispatch-singleshot.d.ts +35 -0
- package/dist/boot/dispatch-singleshot.d.ts.map +1 -0
- package/dist/boot/dispatch-webui.d.ts +87 -0
- package/dist/boot/dispatch-webui.d.ts.map +1 -0
- package/dist/boot/event-wiring.d.ts +22 -0
- package/dist/boot/event-wiring.d.ts.map +1 -0
- package/dist/boot/short-circuit-desktop.d.ts +3 -0
- package/dist/boot/short-circuit-desktop.d.ts.map +1 -0
- package/dist/boot/short-circuit-flags.d.ts +9 -0
- package/dist/boot/short-circuit-flags.d.ts.map +1 -0
- package/dist/boot/short-circuit-hq.d.ts +16 -0
- package/dist/boot/short-circuit-hq.d.ts.map +1 -0
- package/dist/boot/system-prompt-builder.d.ts +91 -0
- package/dist/boot/system-prompt-builder.d.ts.map +1 -0
- package/dist/boot/system-prompt.d.ts +66 -0
- package/dist/boot/system-prompt.d.ts.map +1 -0
- package/dist/boot/tool-registry.d.ts +42 -0
- package/dist/boot/tool-registry.d.ts.map +1 -0
- package/dist/boot/tui-autophase-wiring.d.ts +23 -0
- package/dist/boot/tui-autophase-wiring.d.ts.map +1 -0
- package/dist/boot/tui-coordinator-setup.d.ts +38 -0
- package/dist/boot/tui-coordinator-setup.d.ts.map +1 -0
- package/dist/boot/tui-debug-stream.d.ts +18 -0
- package/dist/boot/tui-debug-stream.d.ts.map +1 -0
- package/dist/boot/tui-live-sessions.d.ts +39 -0
- package/dist/boot/tui-live-sessions.d.ts.map +1 -0
- package/dist/boot/tui-project-picker-callback.d.ts +30 -0
- package/dist/boot/tui-project-picker-callback.d.ts.map +1 -0
- package/dist/boot/tui-project-spawn.d.ts +19 -0
- package/dist/boot/tui-project-spawn.d.ts.map +1 -0
- package/dist/boot/tui-project-switch.d.ts +26 -0
- package/dist/boot/tui-project-switch.d.ts.map +1 -0
- package/dist/boot/tui-runtime-state.d.ts +83 -0
- package/dist/boot/tui-runtime-state.d.ts.map +1 -0
- package/dist/boot/tui-sdd-callback.d.ts +20 -0
- package/dist/boot/tui-sdd-callback.d.ts.map +1 -0
- package/dist/boot/tui-session-resume.d.ts +21 -0
- package/dist/boot/tui-session-resume.d.ts.map +1 -0
- package/dist/boot/tui-settings-adapter.d.ts +24 -0
- package/dist/boot/tui-settings-adapter.d.ts.map +1 -0
- package/dist/boot-config.d.ts +26 -0
- package/dist/boot-config.d.ts.map +1 -0
- package/dist/boot.d.ts +30 -0
- package/dist/boot.d.ts.map +1 -0
- package/dist/brain-menu/panel-service.d.ts +15 -0
- package/dist/brain-menu/panel-service.d.ts.map +1 -0
- package/dist/cli-bundled-prompts.d.ts +12 -0
- package/dist/cli-bundled-prompts.d.ts.map +1 -0
- package/dist/cli-bundled-skills.d.ts +13 -0
- package/dist/cli-bundled-skills.d.ts.map +1 -0
- package/dist/cli-context.d.ts +30 -0
- package/dist/cli-context.d.ts.map +1 -0
- package/dist/cli-entry-point.d.ts +2 -0
- package/dist/cli-entry-point.d.ts.map +1 -0
- package/dist/cli-eternal-flag.d.ts +68 -0
- package/dist/cli-eternal-flag.d.ts.map +1 -0
- package/dist/cli-main.d.ts +13 -0
- package/dist/cli-main.d.ts.map +1 -0
- package/dist/cli-recovery-prompt.d.ts +19 -0
- package/dist/cli-recovery-prompt.d.ts.map +1 -0
- package/dist/cli-update-notice.d.ts +3 -0
- package/dist/cli-update-notice.d.ts.map +1 -0
- package/dist/config-doctor.d.ts +39 -0
- package/dist/config-doctor.d.ts.map +1 -0
- package/dist/config-history.d.ts +54 -0
- package/dist/config-history.d.ts.map +1 -0
- package/dist/context-limit.d.ts +51 -0
- package/dist/context-limit.d.ts.map +1 -0
- package/dist/context-overflow-diagnostic.d.ts +3 -0
- package/dist/context-overflow-diagnostic.d.ts.map +1 -0
- package/dist/diff-renderer.d.ts +2 -0
- package/dist/diff-renderer.d.ts.map +1 -0
- package/dist/execute-deps.d.ts +254 -0
- package/dist/execute-deps.d.ts.map +1 -0
- package/dist/execution.d.ts +102 -0
- package/dist/execution.d.ts.map +1 -0
- package/dist/first-run-auth-gate.d.ts +18 -0
- package/dist/first-run-auth-gate.d.ts.map +1 -0
- package/dist/fleet/host.d.ts +533 -0
- package/dist/fleet/host.d.ts.map +1 -0
- package/dist/fleet/routing.d.ts +8 -0
- package/dist/fleet/routing.d.ts.map +1 -0
- package/dist/fleet/status-broadcast.d.ts +42 -0
- package/dist/fleet/status-broadcast.d.ts.map +1 -0
- package/dist/fleet/supervisor-registry.d.ts +16 -0
- package/dist/fleet/supervisor-registry.d.ts.map +1 -0
- package/dist/fleet-statusline.d.ts +71 -0
- package/dist/fleet-statusline.d.ts.map +1 -0
- package/dist/hooks-wiring.d.ts +26 -0
- package/dist/hooks-wiring.d.ts.map +1 -0
- package/dist/hq-command-controller.d.ts +52 -0
- package/dist/hq-command-controller.d.ts.map +1 -0
- package/dist/hq-dashboard-html.d.ts +2 -0
- package/dist/hq-dashboard-html.d.ts.map +1 -0
- package/dist/hq-publisher.d.ts +16 -0
- package/dist/hq-publisher.d.ts.map +1 -0
- package/dist/hq-server/auth.d.ts +37 -0
- package/dist/hq-server/auth.d.ts.map +1 -0
- package/dist/hq-server/snapshot.d.ts +14 -0
- package/dist/hq-server/snapshot.d.ts.map +1 -0
- package/dist/hq-server/types.d.ts +67 -0
- package/dist/hq-server/types.d.ts.map +1 -0
- package/dist/hq-server/utils.d.ts +63 -0
- package/dist/hq-server/utils.d.ts.map +1 -0
- package/dist/hq-server/ws.d.ts +14 -0
- package/dist/hq-server/ws.d.ts.map +1 -0
- package/dist/hq-server.d.ts +60 -0
- package/dist/hq-server.d.ts.map +1 -0
- package/dist/hq-static-serve.d.ts +26 -0
- package/dist/hq-static-serve.d.ts.map +1 -0
- package/dist/index.d.ts +3 -5
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +10474 -5429
- package/dist/index.js.map +7 -1
- package/dist/input-reader.d.ts +45 -0
- package/dist/input-reader.d.ts.map +1 -0
- package/dist/launch-hints.d.ts +46 -0
- package/dist/launch-hints.d.ts.map +1 -0
- package/dist/mailbox-bridge-bootstrap.d.ts +85 -0
- package/dist/mailbox-bridge-bootstrap.d.ts.map +1 -0
- package/dist/mcp-serve.d.ts +21 -0
- package/dist/mcp-serve.d.ts.map +1 -0
- package/dist/multi-agent.d.ts +4 -0
- package/dist/multi-agent.d.ts.map +1 -0
- package/dist/next-task-predictor.d.ts +45 -0
- package/dist/next-task-predictor.d.ts.map +1 -0
- package/dist/permission-prompt.d.ts +11 -0
- package/dist/permission-prompt.d.ts.map +1 -0
- package/dist/picker.d.ts +86 -0
- package/dist/picker.d.ts.map +1 -0
- package/dist/plugin-api-factory.d.ts +3 -0
- package/dist/plugin-api-factory.d.ts.map +1 -0
- package/dist/plugin-management.d.ts +43 -0
- package/dist/plugin-management.d.ts.map +1 -0
- package/dist/pre-launch/indexing-question.d.ts +28 -0
- package/dist/pre-launch/indexing-question.d.ts.map +1 -0
- package/dist/pre-launch/launch-prompts.d.ts +52 -0
- package/dist/pre-launch/launch-prompts.d.ts.map +1 -0
- package/dist/pre-launch/project-check.d.ts +25 -0
- package/dist/pre-launch/project-check.d.ts.map +1 -0
- package/dist/pre-launch.d.ts +4 -0
- package/dist/pre-launch.d.ts.map +1 -0
- package/dist/preflight.d.ts +58 -0
- package/dist/preflight.d.ts.map +1 -0
- package/dist/project-picker.d.ts +56 -0
- package/dist/project-picker.d.ts.map +1 -0
- package/dist/provider-config-utils.d.ts +58 -0
- package/dist/provider-config-utils.d.ts.map +1 -0
- package/dist/provider-helpers.d.ts +53 -0
- package/dist/provider-helpers.d.ts.map +1 -0
- package/dist/renderer.d.ts +76 -0
- package/dist/renderer.d.ts.map +1 -0
- package/dist/repl.d.ts +164 -0
- package/dist/repl.d.ts.map +1 -0
- package/dist/services/project-facts.d.ts +17 -0
- package/dist/services/project-facts.d.ts.map +1 -0
- package/dist/session-event-wiring.d.ts +48 -0
- package/dist/session-event-wiring.d.ts.map +1 -0
- package/dist/session-stats.d.ts +38 -0
- package/dist/session-stats.d.ts.map +1 -0
- package/dist/settings-menu.d.ts +87 -0
- package/dist/settings-menu.d.ts.map +1 -0
- package/dist/shutdown-cleanup.d.ts +44 -0
- package/dist/shutdown-cleanup.d.ts.map +1 -0
- package/dist/slash-commands/acp.d.ts +23 -0
- package/dist/slash-commands/acp.d.ts.map +1 -0
- package/dist/slash-commands/agents.d.ts +18 -0
- package/dist/slash-commands/agents.d.ts.map +1 -0
- package/dist/slash-commands/audit.d.ts +11 -0
- package/dist/slash-commands/audit.d.ts.map +1 -0
- package/dist/slash-commands/auth.d.ts +20 -0
- package/dist/slash-commands/auth.d.ts.map +1 -0
- package/dist/slash-commands/autonomy.d.ts +5 -0
- package/dist/slash-commands/autonomy.d.ts.map +1 -0
- package/dist/slash-commands/autophase.d.ts +13 -0
- package/dist/slash-commands/autophase.d.ts.map +1 -0
- package/dist/slash-commands/brain.d.ts +4 -0
- package/dist/slash-commands/brain.d.ts.map +1 -0
- package/dist/slash-commands/btw.d.ts +13 -0
- package/dist/slash-commands/btw.d.ts.map +1 -0
- package/dist/slash-commands/clear.d.ts +4 -0
- package/dist/slash-commands/clear.d.ts.map +1 -0
- package/dist/slash-commands/codebase-reindex.d.ts +11 -0
- package/dist/slash-commands/codebase-reindex.d.ts.map +1 -0
- package/dist/slash-commands/collab.d.ts +26 -0
- package/dist/slash-commands/collab.d.ts.map +1 -0
- package/dist/slash-commands/commit-llm.d.ts +41 -0
- package/dist/slash-commands/commit-llm.d.ts.map +1 -0
- package/dist/slash-commands/compact.d.ts +4 -0
- package/dist/slash-commands/compact.d.ts.map +1 -0
- package/dist/slash-commands/context.d.ts +4 -0
- package/dist/slash-commands/context.d.ts.map +1 -0
- package/dist/slash-commands/coordinator.d.ts +4 -0
- package/dist/slash-commands/coordinator.d.ts.map +1 -0
- package/dist/slash-commands/delegate.d.ts +17 -0
- package/dist/slash-commands/delegate.d.ts.map +1 -0
- package/dist/slash-commands/design.d.ts +16 -0
- package/dist/slash-commands/design.d.ts.map +1 -0
- package/dist/slash-commands/dev.d.ts +9 -0
- package/dist/slash-commands/dev.d.ts.map +1 -0
- package/dist/slash-commands/diag-stats.d.ts +5 -0
- package/dist/slash-commands/diag-stats.d.ts.map +1 -0
- package/dist/slash-commands/dispatch-llm.d.ts +12 -0
- package/dist/slash-commands/dispatch-llm.d.ts.map +1 -0
- package/dist/slash-commands/doctor.d.ts +13 -0
- package/dist/slash-commands/doctor.d.ts.map +1 -0
- package/dist/slash-commands/enhance.d.ts +13 -0
- package/dist/slash-commands/enhance.d.ts.map +1 -0
- package/dist/slash-commands/ensemble.d.ts +17 -0
- package/dist/slash-commands/ensemble.d.ts.map +1 -0
- package/dist/slash-commands/f-keys.d.ts +18 -0
- package/dist/slash-commands/f-keys.d.ts.map +1 -0
- package/dist/slash-commands/fallback.d.ts +20 -0
- package/dist/slash-commands/fallback.d.ts.map +1 -0
- package/dist/slash-commands/fix-classifier.d.ts +28 -0
- package/dist/slash-commands/fix-classifier.d.ts.map +1 -0
- package/dist/slash-commands/fix.d.ts +4 -0
- package/dist/slash-commands/fix.d.ts.map +1 -0
- package/dist/slash-commands/fleet.d.ts +20 -0
- package/dist/slash-commands/fleet.d.ts.map +1 -0
- package/dist/slash-commands/git.d.ts +16 -0
- package/dist/slash-commands/git.d.ts.map +1 -0
- package/dist/slash-commands/gitid.d.ts +22 -0
- package/dist/slash-commands/gitid.d.ts.map +1 -0
- package/dist/slash-commands/goal-refiner.d.ts +80 -0
- package/dist/slash-commands/goal-refiner.d.ts.map +1 -0
- package/dist/slash-commands/goal.d.ts +4 -0
- package/dist/slash-commands/goal.d.ts.map +1 -0
- package/dist/slash-commands/health.d.ts +4 -0
- package/dist/slash-commands/health.d.ts.map +1 -0
- package/dist/slash-commands/help.d.ts +4 -0
- package/dist/slash-commands/help.d.ts.map +1 -0
- package/dist/slash-commands/helpers.d.ts +33 -0
- package/dist/slash-commands/helpers.d.ts.map +1 -0
- package/dist/slash-commands/hq.d.ts +4 -0
- package/dist/slash-commands/hq.d.ts.map +1 -0
- package/dist/slash-commands/index.d.ts +543 -0
- package/dist/slash-commands/index.d.ts.map +1 -0
- package/dist/slash-commands/init.d.ts +4 -0
- package/dist/slash-commands/init.d.ts.map +1 -0
- package/dist/slash-commands/interrupt.d.ts +15 -0
- package/dist/slash-commands/interrupt.d.ts.map +1 -0
- package/dist/slash-commands/kanban.d.ts +4 -0
- package/dist/slash-commands/kanban.d.ts.map +1 -0
- package/dist/slash-commands/mailbox-demo.d.ts +19 -0
- package/dist/slash-commands/mailbox-demo.d.ts.map +1 -0
- package/dist/slash-commands/mailbox-serve.d.ts +20 -0
- package/dist/slash-commands/mailbox-serve.d.ts.map +1 -0
- package/dist/slash-commands/mailbox.d.ts +28 -0
- package/dist/slash-commands/mailbox.d.ts.map +1 -0
- package/dist/slash-commands/mcp-utils.d.ts +24 -0
- package/dist/slash-commands/mcp-utils.d.ts.map +1 -0
- package/dist/slash-commands/mcp.d.ts +27 -0
- package/dist/slash-commands/mcp.d.ts.map +1 -0
- package/dist/slash-commands/memory.d.ts +4 -0
- package/dist/slash-commands/memory.d.ts.map +1 -0
- package/dist/slash-commands/metrics.d.ts +4 -0
- package/dist/slash-commands/metrics.d.ts.map +1 -0
- package/dist/slash-commands/mode.d.ts +6 -0
- package/dist/slash-commands/mode.d.ts.map +1 -0
- package/dist/slash-commands/modelcaps.d.ts +4 -0
- package/dist/slash-commands/modelcaps.d.ts.map +1 -0
- package/dist/slash-commands/models.d.ts +23 -0
- package/dist/slash-commands/models.d.ts.map +1 -0
- package/dist/slash-commands/mouse.d.ts +14 -0
- package/dist/slash-commands/mouse.d.ts.map +1 -0
- package/dist/slash-commands/next.d.ts +21 -0
- package/dist/slash-commands/next.d.ts.map +1 -0
- package/dist/slash-commands/plan.d.ts +4 -0
- package/dist/slash-commands/plan.d.ts.map +1 -0
- package/dist/slash-commands/plugin.d.ts +4 -0
- package/dist/slash-commands/plugin.d.ts.map +1 -0
- package/dist/slash-commands/project-utils.d.ts +51 -0
- package/dist/slash-commands/project-utils.d.ts.map +1 -0
- package/dist/slash-commands/project.d.ts +4 -0
- package/dist/slash-commands/project.d.ts.map +1 -0
- package/dist/slash-commands/prune.d.ts +4 -0
- package/dist/slash-commands/prune.d.ts.map +1 -0
- package/dist/slash-commands/refiner.d.ts +15 -0
- package/dist/slash-commands/refiner.d.ts.map +1 -0
- package/dist/slash-commands/review.d.ts +4 -0
- package/dist/slash-commands/review.d.ts.map +1 -0
- package/dist/slash-commands/sdd/project-context.d.ts +7 -0
- package/dist/slash-commands/sdd/project-context.d.ts.map +1 -0
- package/dist/slash-commands/sdd/rendering.d.ts +2 -0
- package/dist/slash-commands/sdd/rendering.d.ts.map +1 -0
- package/dist/slash-commands/sdd/spec-detection.d.ts +21 -0
- package/dist/slash-commands/sdd/spec-detection.d.ts.map +1 -0
- package/dist/slash-commands/sdd/state.d.ts +40 -0
- package/dist/slash-commands/sdd/state.d.ts.map +1 -0
- package/dist/slash-commands/sdd/task-manager.d.ts +37 -0
- package/dist/slash-commands/sdd/task-manager.d.ts.map +1 -0
- package/dist/slash-commands/sdd.d.ts +15 -0
- package/dist/slash-commands/sdd.d.ts.map +1 -0
- package/dist/slash-commands/security.d.ts +4 -0
- package/dist/slash-commands/security.d.ts.map +1 -0
- package/dist/slash-commands/session.d.ts +7 -0
- package/dist/slash-commands/session.d.ts.map +1 -0
- package/dist/slash-commands/setmodel.d.ts +20 -0
- package/dist/slash-commands/setmodel.d.ts.map +1 -0
- package/dist/slash-commands/settings.d.ts +12 -0
- package/dist/slash-commands/settings.d.ts.map +1 -0
- package/dist/slash-commands/shadow.d.ts +28 -0
- package/dist/slash-commands/shadow.d.ts.map +1 -0
- package/dist/slash-commands/slash-deep-help.d.ts +51 -0
- package/dist/slash-commands/slash-deep-help.d.ts.map +1 -0
- package/dist/slash-commands/spawn-agents.d.ts +6 -0
- package/dist/slash-commands/spawn-agents.d.ts.map +1 -0
- package/dist/slash-commands/statusline.d.ts +67 -0
- package/dist/slash-commands/statusline.d.ts.map +1 -0
- package/dist/slash-commands/suggest.d.ts +4 -0
- package/dist/slash-commands/suggest.d.ts.map +1 -0
- package/dist/slash-commands/suggestion-store.d.ts +29 -0
- package/dist/slash-commands/suggestion-store.d.ts.map +1 -0
- package/dist/slash-commands/supervisor.d.ts +18 -0
- package/dist/slash-commands/supervisor.d.ts.map +1 -0
- package/dist/slash-commands/surfaces.d.ts +4 -0
- package/dist/slash-commands/surfaces.d.ts.map +1 -0
- package/dist/slash-commands/tasks.d.ts +4 -0
- package/dist/slash-commands/tasks.d.ts.map +1 -0
- package/dist/slash-commands/techstack.d.ts +4 -0
- package/dist/slash-commands/techstack.d.ts.map +1 -0
- package/dist/slash-commands/telegram-settings.d.ts +4 -0
- package/dist/slash-commands/telegram-settings.d.ts.map +1 -0
- package/dist/slash-commands/telegram-setup.d.ts +11 -0
- package/dist/slash-commands/telegram-setup.d.ts.map +1 -0
- package/dist/slash-commands/todos.d.ts +4 -0
- package/dist/slash-commands/todos.d.ts.map +1 -0
- package/dist/slash-commands/tool.d.ts +4 -0
- package/dist/slash-commands/tool.d.ts.map +1 -0
- package/dist/slash-commands/tools.d.ts +4 -0
- package/dist/slash-commands/tools.d.ts.map +1 -0
- package/dist/slash-commands/tuneup.d.ts +15 -0
- package/dist/slash-commands/tuneup.d.ts.map +1 -0
- package/dist/slash-commands/working-dir.d.ts +14 -0
- package/dist/slash-commands/working-dir.d.ts.map +1 -0
- package/dist/slash-commands/worktree.d.ts +8 -0
- package/dist/slash-commands/worktree.d.ts.map +1 -0
- package/dist/slash-commands/yolo.d.ts +4 -0
- package/dist/slash-commands/yolo.d.ts.map +1 -0
- package/dist/spinner.d.ts +44 -0
- package/dist/spinner.d.ts.map +1 -0
- package/dist/subcommands/handlers/acp.d.ts +15 -0
- package/dist/subcommands/handlers/acp.d.ts.map +1 -0
- package/dist/subcommands/handlers/audit.d.ts +12 -0
- package/dist/subcommands/handlers/audit.d.ts.map +1 -0
- package/dist/subcommands/handlers/auth-local-help.d.ts +69 -0
- package/dist/subcommands/handlers/auth-local-help.d.ts.map +1 -0
- package/dist/subcommands/handlers/auth.d.ts +3 -0
- package/dist/subcommands/handlers/auth.d.ts.map +1 -0
- package/dist/subcommands/handlers/bench-run-help.d.ts +145 -0
- package/dist/subcommands/handlers/bench-run-help.d.ts.map +1 -0
- package/dist/subcommands/handlers/bench.d.ts +13 -0
- package/dist/subcommands/handlers/bench.d.ts.map +1 -0
- package/dist/subcommands/handlers/config-history.d.ts +10 -0
- package/dist/subcommands/handlers/config-history.d.ts.map +1 -0
- package/dist/subcommands/handlers/diag-doctor.d.ts +4 -0
- package/dist/subcommands/handlers/diag-doctor.d.ts.map +1 -0
- package/dist/subcommands/handlers/export.d.ts +3 -0
- package/dist/subcommands/handlers/export.d.ts.map +1 -0
- package/dist/subcommands/handlers/helpers.d.ts +2 -0
- package/dist/subcommands/handlers/helpers.d.ts.map +1 -0
- package/dist/subcommands/handlers/hq.d.ts +3 -0
- package/dist/subcommands/handlers/hq.d.ts.map +1 -0
- package/dist/subcommands/handlers/init.d.ts +7 -0
- package/dist/subcommands/handlers/init.d.ts.map +1 -0
- package/dist/subcommands/handlers/mailbox-serve.d.ts +3 -0
- package/dist/subcommands/handlers/mailbox-serve.d.ts.map +1 -0
- package/dist/subcommands/handlers/mcp.d.ts +3 -0
- package/dist/subcommands/handlers/mcp.d.ts.map +1 -0
- package/dist/subcommands/handlers/modeldiag.d.ts +3 -0
- package/dist/subcommands/handlers/modeldiag.d.ts.map +1 -0
- package/dist/subcommands/handlers/models-add-help.d.ts +142 -0
- package/dist/subcommands/handlers/models-add-help.d.ts.map +1 -0
- package/dist/subcommands/handlers/per-subcommand-help.d.ts +136 -0
- package/dist/subcommands/handlers/per-subcommand-help.d.ts.map +1 -0
- package/dist/subcommands/handlers/plugin-usage.d.ts +4 -0
- package/dist/subcommands/handlers/plugin-usage.d.ts.map +1 -0
- package/dist/subcommands/handlers/projects.d.ts +3 -0
- package/dist/subcommands/handlers/projects.d.ts.map +1 -0
- package/dist/subcommands/handlers/providers-models.d.ts +4 -0
- package/dist/subcommands/handlers/providers-models.d.ts.map +1 -0
- package/dist/subcommands/handlers/quick.d.ts +14 -0
- package/dist/subcommands/handlers/quick.d.ts.map +1 -0
- package/dist/subcommands/handlers/replay.d.ts +12 -0
- package/dist/subcommands/handlers/replay.d.ts.map +1 -0
- package/dist/subcommands/handlers/rewind.d.ts +3 -0
- package/dist/subcommands/handlers/rewind.d.ts.map +1 -0
- package/dist/subcommands/handlers/sessions-config.d.ts +4 -0
- package/dist/subcommands/handlers/sessions-config.d.ts.map +1 -0
- package/dist/subcommands/handlers/sessions-fleet.d.ts +15 -0
- package/dist/subcommands/handlers/sessions-fleet.d.ts.map +1 -0
- package/dist/subcommands/handlers/tools-skills.d.ts +4 -0
- package/dist/subcommands/handlers/tools-skills.d.ts.map +1 -0
- package/dist/subcommands/handlers/update.d.ts +7 -0
- package/dist/subcommands/handlers/update.d.ts.map +1 -0
- package/dist/subcommands/handlers/version-help.d.ts +4 -0
- package/dist/subcommands/handlers/version-help.d.ts.map +1 -0
- package/dist/subcommands/index.d.ts +26 -0
- package/dist/subcommands/index.d.ts.map +1 -0
- package/dist/theme.d.ts +12 -0
- package/dist/theme.d.ts.map +1 -0
- package/dist/tui-thinking-word.d.ts +5 -0
- package/dist/tui-thinking-word.d.ts.map +1 -0
- package/dist/tuneup.d.ts +162 -0
- package/dist/tuneup.d.ts.map +1 -0
- package/dist/update-check.d.ts +22 -0
- package/dist/update-check.d.ts.map +1 -0
- package/dist/utils/delay-format.d.ts +5 -0
- package/dist/utils/delay-format.d.ts.map +1 -0
- package/dist/utils/win32-cmd.d.ts +7 -0
- package/dist/utils/win32-cmd.d.ts.map +1 -0
- package/dist/utils.d.ts +58 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/version.d.ts +4 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/webui-server/client-registration.d.ts +41 -0
- package/dist/webui-server/client-registration.d.ts.map +1 -0
- package/dist/webui-server/connection-handler.d.ts +59 -0
- package/dist/webui-server/connection-handler.d.ts.map +1 -0
- package/dist/webui-server/context-breakdown.d.ts +57 -0
- package/dist/webui-server/context-breakdown.d.ts.map +1 -0
- package/dist/webui-server/cost-helpers.d.ts +29 -0
- package/dist/webui-server/cost-helpers.d.ts.map +1 -0
- package/dist/webui-server/lifecycle.d.ts +108 -0
- package/dist/webui-server/lifecycle.d.ts.map +1 -0
- package/dist/webui-server/logger-shim.d.ts +10 -0
- package/dist/webui-server/logger-shim.d.ts.map +1 -0
- package/dist/webui-server/message-router.d.ts +39 -0
- package/dist/webui-server/message-router.d.ts.map +1 -0
- package/dist/webui-server/prefs-seeding.d.ts +57 -0
- package/dist/webui-server/prefs-seeding.d.ts.map +1 -0
- package/dist/webui-server/provider-config.d.ts +61 -0
- package/dist/webui-server/provider-config.d.ts.map +1 -0
- package/dist/webui-server/session-start-payload.d.ts +20 -0
- package/dist/webui-server/session-start-payload.d.ts.map +1 -0
- package/dist/webui-server/session-status-poll.d.ts +14 -0
- package/dist/webui-server/session-status-poll.d.ts.map +1 -0
- package/dist/webui-server/setup-events.d.ts +45 -0
- package/dist/webui-server/setup-events.d.ts.map +1 -0
- package/dist/webui-server/static-serve.d.ts +70 -0
- package/dist/webui-server/static-serve.d.ts.map +1 -0
- package/dist/webui-server/stream-coalescer.d.ts +41 -0
- package/dist/webui-server/stream-coalescer.d.ts.map +1 -0
- package/dist/webui-server/ws-handlers/agent-config.d.ts +47 -0
- package/dist/webui-server/ws-handlers/agent-config.d.ts.map +1 -0
- package/dist/webui-server/ws-handlers/brain.d.ts +43 -0
- package/dist/webui-server/ws-handlers/brain.d.ts.map +1 -0
- package/dist/webui-server/ws-handlers/connection.d.ts +57 -0
- package/dist/webui-server/ws-handlers/connection.d.ts.map +1 -0
- package/dist/webui-server/ws-handlers/context.d.ts +55 -0
- package/dist/webui-server/ws-handlers/context.d.ts.map +1 -0
- package/dist/webui-server/ws-handlers/index.d.ts +60 -0
- package/dist/webui-server/ws-handlers/index.d.ts.map +1 -0
- package/dist/webui-server/ws-handlers/introspection.d.ts +35 -0
- package/dist/webui-server/ws-handlers/introspection.d.ts.map +1 -0
- package/dist/webui-server/ws-handlers/kanban.d.ts +41 -0
- package/dist/webui-server/ws-handlers/kanban.d.ts.map +1 -0
- package/dist/webui-server/ws-handlers/mailbox.d.ts +60 -0
- package/dist/webui-server/ws-handlers/mailbox.d.ts.map +1 -0
- package/dist/webui-server/ws-handlers/oauth.d.ts +16 -0
- package/dist/webui-server/ws-handlers/oauth.d.ts.map +1 -0
- package/dist/webui-server/ws-handlers/prefs.d.ts +32 -0
- package/dist/webui-server/ws-handlers/prefs.d.ts.map +1 -0
- package/dist/webui-server/ws-handlers/process.d.ts +6 -0
- package/dist/webui-server/ws-handlers/process.d.ts.map +1 -0
- package/dist/webui-server/ws-handlers/projects.d.ts +44 -0
- package/dist/webui-server/ws-handlers/projects.d.ts.map +1 -0
- package/dist/webui-server/ws-handlers/providers.d.ts +36 -0
- package/dist/webui-server/ws-handlers/providers.d.ts.map +1 -0
- package/dist/webui-server/ws-handlers/sessions.d.ts +38 -0
- package/dist/webui-server/ws-handlers/sessions.d.ts.map +1 -0
- package/dist/webui-server/ws-handlers/worklist.d.ts +49 -0
- package/dist/webui-server/ws-handlers/worklist.d.ts.map +1 -0
- package/dist/webui-server.d.ts +165 -0
- package/dist/webui-server.d.ts.map +1 -0
- package/dist/wiring/brain-and-orchestration.d.ts +81 -0
- package/dist/wiring/brain-and-orchestration.d.ts.map +1 -0
- package/dist/wiring/codebase-index.d.ts +33 -0
- package/dist/wiring/codebase-index.d.ts.map +1 -0
- package/dist/wiring/controllers.d.ts +51 -0
- package/dist/wiring/controllers.d.ts.map +1 -0
- package/dist/wiring/dep-watcher.d.ts +23 -0
- package/dist/wiring/dep-watcher.d.ts.map +1 -0
- package/dist/wiring/design-studio.d.ts +17 -0
- package/dist/wiring/design-studio.d.ts.map +1 -0
- package/dist/wiring/director-setup.d.ts +51 -0
- package/dist/wiring/director-setup.d.ts.map +1 -0
- package/dist/wiring/hq-telemetry.d.ts +44 -0
- package/dist/wiring/hq-telemetry.d.ts.map +1 -0
- package/dist/wiring/lifecycle-plugins.d.ts +61 -0
- package/dist/wiring/lifecycle-plugins.d.ts.map +1 -0
- package/dist/wiring/mailbox-bridge-bootstrap.d.ts +53 -0
- package/dist/wiring/mailbox-bridge-bootstrap.d.ts.map +1 -0
- package/dist/wiring/metrics.d.ts +40 -0
- package/dist/wiring/metrics.d.ts.map +1 -0
- package/dist/wiring/pipeline.d.ts +96 -0
- package/dist/wiring/pipeline.d.ts.map +1 -0
- package/dist/wiring/plugins.d.ts +109 -0
- package/dist/wiring/plugins.d.ts.map +1 -0
- package/dist/wiring/provider-runtime-setup.d.ts +47 -0
- package/dist/wiring/provider-runtime-setup.d.ts.map +1 -0
- package/dist/wiring/provider-runtime.d.ts +57 -0
- package/dist/wiring/provider-runtime.d.ts.map +1 -0
- package/dist/wiring/provider.d.ts +13 -0
- package/dist/wiring/provider.d.ts.map +1 -0
- package/dist/wiring/replay.d.ts +32 -0
- package/dist/wiring/replay.d.ts.map +1 -0
- package/dist/wiring/session.d.ts +58 -0
- package/dist/wiring/session.d.ts.map +1 -0
- package/dist/wiring/slash-commands.d.ts +76 -0
- package/dist/wiring/slash-commands.d.ts.map +1 -0
- package/dist/wiring/super-memory.d.ts +9 -0
- package/dist/wiring/super-memory.d.ts.map +1 -0
- package/dist/wiring/to-execute-deps.d.ts +11 -0
- package/dist/wiring/to-execute-deps.d.ts.map +1 -0
- package/dist/wiring/tools.d.ts +41 -0
- package/dist/wiring/tools.d.ts.map +1 -0
- package/package.json +20 -20
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* brain-decision-log — last-N decision log subscription for /brain status.
|
|
3
|
+
*
|
|
4
|
+
* Pulled out of cli-main.ts as part of PR 8 (Stage 1 of the cli-main split
|
|
5
|
+
* refactor; see `next-1.md`). The Brain publishes four events
|
|
6
|
+
* (`brain.decision_answered`, `brain.decision_ask_human`, `brain.decision_denied`,
|
|
7
|
+
* `brain.intervention`); this module owns the rolling 20-entry buffer that
|
|
8
|
+
* `/brain` reads from to render a compact status line.
|
|
9
|
+
*
|
|
10
|
+
* The host wires this up once at boot and retains a reference to `brainLog`
|
|
11
|
+
* (and indirectly `pushBrainLog`) for the duration of the session.
|
|
12
|
+
*/
|
|
13
|
+
export type BrainDecisionKind = 'answered' | 'ask_human' | 'denied' | 'intervention';
|
|
14
|
+
export interface BrainDecisionEntry {
|
|
15
|
+
at: number;
|
|
16
|
+
kind: BrainDecisionKind;
|
|
17
|
+
question: string;
|
|
18
|
+
outcome: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Subscribe to the four brain.* decision events and maintain a rolling
|
|
22
|
+
* 20-entry ring buffer. Caller retains the returned `brainLog` array; the
|
|
23
|
+
* returned `pushBrainLog` lets external code (e.g. slash-command handlers)
|
|
24
|
+
* append additional entries that should appear in /brain status.
|
|
25
|
+
*
|
|
26
|
+
* The returned `dispose` unregisters all four listeners — cli-main.ts wires
|
|
27
|
+
* it into its existing `teardownHandlers` so REPL/TUI re-entry doesn't leak.
|
|
28
|
+
*
|
|
29
|
+
* The events emitter uses EventBus's typed `.on(name, listener)` API; we
|
|
30
|
+
* cast at the call site because the EventBus generic constraint is
|
|
31
|
+
* narrower than the dynamic string event names we register here.
|
|
32
|
+
*/
|
|
33
|
+
export declare function subscribeBrainDecisionLog(events: any): {
|
|
34
|
+
brainLog: BrainDecisionEntry[];
|
|
35
|
+
pushBrainLog: (entry: BrainDecisionEntry) => void;
|
|
36
|
+
dispose: () => void;
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=brain-decision-log.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brain-decision-log.d.ts","sourceRoot":"","sources":["../../src/boot/brain-decision-log.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,WAAW,GAAG,QAAQ,GAAG,cAAc,CAAC;AAErF,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,iBAAiB,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB;AAID;;;;;;;;;;;;GAYG;AACH,wBAAgB,yBAAyB,CAEvC,MAAM,EAAE,GAAG,GACV;IACD,QAAQ,EAAE,kBAAkB,EAAE,CAAC;IAC/B,YAAY,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAClD,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAiFA"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { Config, EventBus, Logger, Renderer, ModelsRegistry, WstackPaths } from '@wrongstack/core';
|
|
2
|
+
import { DefaultPathResolver } from '@wrongstack/core/infrastructure';
|
|
3
|
+
import { createDefaultContainer } from '@wrongstack/runtime';
|
|
4
|
+
import { makePromptDelegate } from '../permission-prompt.js';
|
|
5
|
+
export interface WireContainerDeps {
|
|
6
|
+
config: Config;
|
|
7
|
+
wpaths: WstackPaths;
|
|
8
|
+
cwd: string;
|
|
9
|
+
logger: Logger;
|
|
10
|
+
reader: Parameters<typeof makePromptDelegate>[0];
|
|
11
|
+
renderer: Renderer;
|
|
12
|
+
modelsRegistry: ModelsRegistry;
|
|
13
|
+
yoloDestructive: boolean;
|
|
14
|
+
confirmDestructive: boolean;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Build the PathResolver, create the EventBus, call
|
|
18
|
+
* `createDefaultContainer(...)`, then bind the bootstrap-level
|
|
19
|
+
* services (PathResolver, Renderer, InputReader) on top.
|
|
20
|
+
* Returns the new `events` bus alongside the container so main()
|
|
21
|
+
* can keep publishing to it without re-creating one.
|
|
22
|
+
*
|
|
23
|
+
* The function is intentionally synchronous: every input is a
|
|
24
|
+
* plain value or an already-constructed object, so the boot
|
|
25
|
+
* sequence doesn't fork on async here. Async work (e.g. loading
|
|
26
|
+
* the bundled skills dir) happens inside `createDefaultContainer`
|
|
27
|
+
* and is awaited by the caller.
|
|
28
|
+
*/
|
|
29
|
+
export declare function wireContainer(deps: WireContainerDeps): {
|
|
30
|
+
pathResolver: InstanceType<typeof DefaultPathResolver>;
|
|
31
|
+
events: EventBus;
|
|
32
|
+
container: ReturnType<typeof createDefaultContainer>;
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=container-wiring.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"container-wiring.d.ts","sourceRoot":"","sources":["../../src/boot/container-wiring.ts"],"names":[],"mappings":"AAuCA,OAAO,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAExG,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAI7D,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,WAAW,CAAC;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC;IACjD,QAAQ,EAAE,QAAQ,CAAC;IACnB,cAAc,EAAE,cAAc,CAAC;IAC/B,eAAe,EAAE,OAAO,CAAC;IACzB,kBAAkB,EAAE,OAAO,CAAC;CAC7B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,iBAAiB,GAAG;IACtD,YAAY,EAAE,YAAY,CAAC,OAAO,mBAAmB,CAAC,CAAC;IACvD,MAAM,EAAE,QAAQ,CAAC;IACjB,SAAS,EAAE,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC;CACtD,CAoCA"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single-shot dispatch — extracted from the tail of `execute()`.
|
|
3
|
+
*
|
|
4
|
+
* Follow-up to PR 6 (partial). The single-shot branch runs one
|
|
5
|
+
* `agent.run()` turn from a positional/prompt argument, renders the
|
|
6
|
+
* result, and returns an exit code. It is the simplest of the four
|
|
7
|
+
* dispatch branches: no event loops, no server, no streaming UI —
|
|
8
|
+
* just run, render, exit.
|
|
9
|
+
*
|
|
10
|
+
* Returns the exit code (0 success, 1 failure/max-iterations, 130
|
|
11
|
+
* aborted) so the caller assigns it to its `code` variable without a
|
|
12
|
+
* closure mutation.
|
|
13
|
+
*/
|
|
14
|
+
import type { Agent, TokenCounter } from '@wrongstack/core';
|
|
15
|
+
import type { TerminalRenderer } from '../renderer.js';
|
|
16
|
+
export interface SingleShotDispatchContext {
|
|
17
|
+
/** The agent to run. */
|
|
18
|
+
agent: Agent;
|
|
19
|
+
/** Joined positional args forming the query string. */
|
|
20
|
+
query: string;
|
|
21
|
+
/** Parsed top-level CLI flags (e.g. `--output-json`). */
|
|
22
|
+
flags: Record<string, string | boolean>;
|
|
23
|
+
/** Token counter for usage delta computation. */
|
|
24
|
+
tokenCounter: TokenCounter;
|
|
25
|
+
/** Terminal renderer for output. */
|
|
26
|
+
renderer: TerminalRenderer;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Run a single `agent.run()` turn and render the result.
|
|
30
|
+
*
|
|
31
|
+
* Returns the exit code: 0 success, 1 failure or max-iterations, 130
|
|
32
|
+
* aborted.
|
|
33
|
+
*/
|
|
34
|
+
export declare function runSingleShotDispatch(ctx: SingleShotDispatchContext): Promise<number>;
|
|
35
|
+
//# sourceMappingURL=dispatch-singleshot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dispatch-singleshot.d.ts","sourceRoot":"","sources":["../../src/boot/dispatch-singleshot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAE5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAIvD,MAAM,WAAW,yBAAyB;IACxC,wBAAwB;IACxB,KAAK,EAAE,KAAK,CAAC;IACb,uDAAuD;IACvD,KAAK,EAAE,MAAM,CAAC;IACd,yDAAyD;IACzD,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC;IACxC,iDAAiD;IACjD,YAAY,EAAE,YAAY,CAAC;IAC3B,oCAAoC;IACpC,QAAQ,EAAE,gBAAgB,CAAC;CAC5B;AAED;;;;;GAKG;AACH,wBAAsB,qBAAqB,CACzC,GAAG,EAAE,yBAAyB,GAC7B,OAAO,CAAC,MAAM,CAAC,CAiFjB"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WebUI dispatch — extracted from the tail of `execute()`.
|
|
3
|
+
*
|
|
4
|
+
* PR 6 of Issue #29 (partial). The TUI-vs-REPL-vs-WebUI fork at the
|
|
5
|
+
* end of `execute()` is a ~1,600-line `if/else if/else if/else`
|
|
6
|
+
* chain. The WebUI branch is the most self-contained of the four: it
|
|
7
|
+
* constructs a `runWebUI` options object from already-available deps,
|
|
8
|
+
* wires SIGINT handling, and returns an exit code. Extracting it
|
|
9
|
+
* first lets `execute()` shrink by ~100 lines and isolates the
|
|
10
|
+
* WebUI-specific wiring (port resolution, browser banner, recovery
|
|
11
|
+
* lock re-pointing, autonomy forwarding) in a single named module.
|
|
12
|
+
*
|
|
13
|
+
* The TUI branch (~1,388 lines) and the single-shot branch are left
|
|
14
|
+
* inline — they are too deeply coupled to local mutable state for a
|
|
15
|
+
* single-PR extraction.
|
|
16
|
+
*/
|
|
17
|
+
import type { Agent, BrainArbiter, Config, EventBus, JournalEntry, MemoryStore, ModelsRegistry, ModeStore, SessionStore, SessionWriter, SkillLoader } from '@wrongstack/core';
|
|
18
|
+
import type { MCPRegistry } from '@wrongstack/mcp';
|
|
19
|
+
import type { TerminalRenderer } from '../renderer.js';
|
|
20
|
+
import type { AutonomyMode } from '../slash-commands/autonomy.js';
|
|
21
|
+
export interface WebUIDispatchContext {
|
|
22
|
+
agent: Agent;
|
|
23
|
+
events: EventBus;
|
|
24
|
+
session: SessionWriter;
|
|
25
|
+
config: Config;
|
|
26
|
+
flags: Record<string, string | boolean>;
|
|
27
|
+
projectRoot: string;
|
|
28
|
+
globalConfigPath: string;
|
|
29
|
+
projectSessionsDir: string;
|
|
30
|
+
modelsRegistry: ModelsRegistry;
|
|
31
|
+
mcpRegistry: MCPRegistry;
|
|
32
|
+
brain: BrainArbiter | undefined;
|
|
33
|
+
brainSettings: {
|
|
34
|
+
maxAutoRisk: import('@wrongstack/core').BrainAutoRisk;
|
|
35
|
+
mode?: import('@wrongstack/core').BrainEscalationMode | undefined;
|
|
36
|
+
poolLabels?: string[] | undefined;
|
|
37
|
+
councilLabels?: string[] | undefined;
|
|
38
|
+
} | undefined;
|
|
39
|
+
getBrainLog: (() => Array<{
|
|
40
|
+
at: number;
|
|
41
|
+
kind: string;
|
|
42
|
+
question: string;
|
|
43
|
+
outcome: string;
|
|
44
|
+
}>) | undefined;
|
|
45
|
+
/** Live-editable Brain config owner (brain.config.get/set WS handlers). */
|
|
46
|
+
brainRuntime?: import('@wrongstack/core').BrainRuntime | undefined;
|
|
47
|
+
subscribeEternalIteration: ((fn: (entry: JournalEntry) => void) => () => void) | undefined;
|
|
48
|
+
sessionStore: SessionStore | undefined;
|
|
49
|
+
memoryStore: MemoryStore | undefined;
|
|
50
|
+
skillLoader: SkillLoader | undefined;
|
|
51
|
+
promptLoader: import('@wrongstack/core').PromptLoader | undefined;
|
|
52
|
+
modeStore: ModeStore | undefined;
|
|
53
|
+
modeId: string | undefined;
|
|
54
|
+
needsSetup: boolean | undefined;
|
|
55
|
+
renderer: TerminalRenderer;
|
|
56
|
+
onAutonomy: ((mode: AutonomyMode) => void) | undefined;
|
|
57
|
+
applyLiveSettings?: ((settings: {
|
|
58
|
+
yolo?: boolean;
|
|
59
|
+
}) => void) | undefined;
|
|
60
|
+
onModelContextResolved?: ((providerId: string, modelId: string, maxContext: number) => void) | undefined;
|
|
61
|
+
activeRecoveryLock: {
|
|
62
|
+
clear: () => Promise<void>;
|
|
63
|
+
write: (sessionId: string) => Promise<void>;
|
|
64
|
+
};
|
|
65
|
+
/** Per-task agent factory for the SDD wizard's multi-agent run. */
|
|
66
|
+
sddSubagentFactory?: import('@wrongstack/core').AgentFactory | undefined;
|
|
67
|
+
onKanbanDispatch?: ((description: string, opts?: {
|
|
68
|
+
provider?: string | undefined;
|
|
69
|
+
model?: string | undefined;
|
|
70
|
+
fallbackModels?: string[] | undefined;
|
|
71
|
+
tools?: string[] | undefined;
|
|
72
|
+
name?: string | undefined;
|
|
73
|
+
allowedCapabilities?: readonly string[] | undefined;
|
|
74
|
+
onDone?: ((result: {
|
|
75
|
+
status: 'completed' | 'failed';
|
|
76
|
+
result?: string | undefined;
|
|
77
|
+
error?: string | undefined;
|
|
78
|
+
}) => void | Promise<void>) | undefined;
|
|
79
|
+
}) => Promise<string>) | undefined;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Run the WebUI server and block until it shuts down.
|
|
83
|
+
*
|
|
84
|
+
* Returns the exit code: 0 on clean shutdown, 1 on server error.
|
|
85
|
+
*/
|
|
86
|
+
export declare function runWebUIDispatch(ctx: WebUIDispatchContext): Promise<number>;
|
|
87
|
+
//# sourceMappingURL=dispatch-webui.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dispatch-webui.d.ts","sourceRoot":"","sources":["../../src/boot/dispatch-webui.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EACV,KAAK,EACL,YAAY,EACZ,MAAM,EACN,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,cAAc,EACd,SAAS,EACT,YAAY,EACZ,aAAa,EACb,WAAW,EACZ,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAElE,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,KAAK,CAAC;IACb,MAAM,EAAE,QAAQ,CAAC;IACjB,OAAO,EAAE,aAAa,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,cAAc,EAAE,cAAc,CAAC;IAC/B,WAAW,EAAE,WAAW,CAAC;IACzB,KAAK,EAAE,YAAY,GAAG,SAAS,CAAC;IAChC,aAAa,EACT;QACE,WAAW,EAAE,OAAO,kBAAkB,EAAE,aAAa,CAAC;QACtD,IAAI,CAAC,EAAE,OAAO,kBAAkB,EAAE,mBAAmB,GAAG,SAAS,CAAC;QAClE,UAAU,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;QAClC,aAAa,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;KACtC,GACD,SAAS,CAAC;IACd,WAAW,EACP,CAAC,MAAM,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC,GAC9E,SAAS,CAAC;IACd,2EAA2E;IAC3E,YAAY,CAAC,EAAE,OAAO,kBAAkB,EAAE,YAAY,GAAG,SAAS,CAAC;IACnE,yBAAyB,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,KAAK,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;IAC3F,YAAY,EAAE,YAAY,GAAG,SAAS,CAAC;IACvC,WAAW,EAAE,WAAW,GAAG,SAAS,CAAC;IACrC,WAAW,EAAE,WAAW,GAAG,SAAS,CAAC;IACrC,YAAY,EAAE,OAAO,kBAAkB,EAAE,YAAY,GAAG,SAAS,CAAC;IAClE,SAAS,EAAE,SAAS,GAAG,SAAS,CAAC;IACjC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,UAAU,EAAE,OAAO,GAAG,SAAS,CAAC;IAChC,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,UAAU,EAAE,CAAC,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IACvD,iBAAiB,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;QAAE,IAAI,CAAC,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IACzE,sBAAsB,CAAC,EACnB,CAAC,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC,GACnE,SAAS,CAAC;IACd,kBAAkB,EAAE;QAClB,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;QAC3B,KAAK,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;KAC7C,CAAC;IACF,mEAAmE;IACnE,kBAAkB,CAAC,EAAE,OAAO,kBAAkB,EAAE,YAAY,GAAG,SAAS,CAAC;IACzE,gBAAgB,CAAC,EACb,CAAC,CACC,WAAW,EAAE,MAAM,EACnB,IAAI,CAAC,EAAE;QACL,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAC9B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAC3B,cAAc,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;QACtC,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;QAC7B,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAC1B,mBAAmB,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;QACpD,MAAM,CAAC,EACH,CAAC,CAAC,MAAM,EAAE;YACR,MAAM,EAAE,WAAW,GAAG,QAAQ,CAAC;YAC/B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YAC5B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;SAC5B,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,GAC3B,SAAS,CAAC;KACf,KACE,OAAO,CAAC,MAAM,CAAC,CAAC,GACrB,SAAS,CAAC;CACf;AAED;;;;GAIG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,oBAAoB,GAAG,OAAO,CAAC,MAAM,CAAC,CAsNjF"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { EventBus } from '@wrongstack/core';
|
|
2
|
+
export interface EventWiringRenderer {
|
|
3
|
+
write(text: string): void;
|
|
4
|
+
}
|
|
5
|
+
export type EvOn = (event: string, handler: (...args: any) => void) => void;
|
|
6
|
+
export interface WireEventWiringDeps {
|
|
7
|
+
evOn: EvOn;
|
|
8
|
+
events: EventBus;
|
|
9
|
+
renderer: EventWiringRenderer;
|
|
10
|
+
getProvider: () => string;
|
|
11
|
+
getModel: () => string;
|
|
12
|
+
getSessionId: () => string;
|
|
13
|
+
projectSlug: string;
|
|
14
|
+
getActiveModeId: () => string;
|
|
15
|
+
tuiOwnsScreen: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface EventWiring {
|
|
18
|
+
setEffectiveMaxContext: (maxContext: number) => void;
|
|
19
|
+
}
|
|
20
|
+
/** Wire CLI spinner, live streaming, and client.status emission. */
|
|
21
|
+
export declare function wireEventWiring(deps: WireEventWiringDeps): EventWiring;
|
|
22
|
+
//# sourceMappingURL=event-wiring.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-wiring.d.ts","sourceRoot":"","sources":["../../src/boot/event-wiring.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAIjD,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,MAAM,MAAM,IAAI,GAAG,CACjB,KAAK,EAAE,MAAM,EAEb,OAAO,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,KAAK,IAAI,KAC5B,IAAI,CAAC;AAEV,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,IAAI,CAAC;IACX,MAAM,EAAE,QAAQ,CAAC;IACjB,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,WAAW,EAAE,MAAM,MAAM,CAAC;IAC1B,QAAQ,EAAE,MAAM,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,MAAM,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,MAAM,CAAC;IAC9B,aAAa,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,WAAW;IAC1B,sBAAsB,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;CACtD;AAED,oEAAoE;AACpE,wBAAgB,eAAe,CAAC,IAAI,EAAE,mBAAmB,GAAG,WAAW,CA6JtE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"short-circuit-desktop.d.ts","sourceRoot":"","sources":["../../src/boot/short-circuit-desktop.ts"],"names":[],"mappings":"AAYA,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAUjE;AAED,wBAAsB,yBAAyB,CAC7C,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,EACvC,IAAI,EAAE,MAAM,EAAE,GACb,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAGxB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Check argv for --help / --version and dispatch directly.
|
|
3
|
+
*
|
|
4
|
+
* Returns 0 when a flag fired, or null when neither was present.
|
|
5
|
+
* The renderer is a stub that writes to stdout — help text is plain
|
|
6
|
+
* `write` calls, no TTY needed.
|
|
7
|
+
*/
|
|
8
|
+
export declare function handleHelpVersionShortCircuit(argv: string[]): Promise<number | null>;
|
|
9
|
+
//# sourceMappingURL=short-circuit-flags.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"short-circuit-flags.d.ts","sourceRoot":"","sources":["../../src/boot/short-circuit-flags.ts"],"names":[],"mappings":"AAcA;;;;;;GAMG;AACH,wBAAsB,6BAA6B,CACjD,IAAI,EAAE,MAAM,EAAE,GACb,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAWxB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* --hq short-circuit — extracted from cli-main.ts.
|
|
3
|
+
*
|
|
4
|
+
* Starts the HQ command center server before boot() — HQ is
|
|
5
|
+
* project-independent. Blocks until SIGINT/SIGTERM.
|
|
6
|
+
*
|
|
7
|
+
* Returns 0 when the HQ flag was present and the server ran, or null
|
|
8
|
+
* when the flag was absent (caller should proceed to boot()).
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Check for --hq flag and start the HQ server if present.
|
|
12
|
+
*
|
|
13
|
+
* Returns 0 when the server started, or null when --hq was not set.
|
|
14
|
+
*/
|
|
15
|
+
export declare function handleHqShortCircuit(flags: Record<string, string | boolean>): Promise<number | null>;
|
|
16
|
+
//# sourceMappingURL=short-circuit-hq.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"short-circuit-hq.d.ts","sourceRoot":"","sources":["../../src/boot/short-circuit-hq.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA+DH;;;;GAIG;AACH,wBAAsB,oBAAoB,CACxC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,GACtC,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAiGxB"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { type TokenSavingTier } from '@wrongstack/core';
|
|
2
|
+
import type { AutonomyMode } from '../slash-commands/autonomy.js';
|
|
3
|
+
export interface MutableRef<T> {
|
|
4
|
+
current: T | undefined;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Paths the SystemPromptBuilder needs from `wpaths`.
|
|
8
|
+
* Kept as a structural subset so the helper doesn't depend
|
|
9
|
+
* on the full WstackPaths shape (which is huge and subject
|
|
10
|
+
* to change).
|
|
11
|
+
*/
|
|
12
|
+
export interface SystemPromptBuilderPaths {
|
|
13
|
+
projectGoal: string;
|
|
14
|
+
projectSessions: string;
|
|
15
|
+
globalInstructions?: string | undefined;
|
|
16
|
+
inProjectInstructions?: string | undefined;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Local `path.join`-shaped helper. We don't import `node:path`
|
|
20
|
+
* directly so the unit test doesn't have to mock node modules.
|
|
21
|
+
*/
|
|
22
|
+
export interface PathJoiner {
|
|
23
|
+
join(a: string, b: string): string;
|
|
24
|
+
}
|
|
25
|
+
export interface BindSystemPromptBuilderDeps {
|
|
26
|
+
/**
|
|
27
|
+
* The `container` from main(). The helper only calls
|
|
28
|
+
* `container.bind(token, factory)`. To keep the helper
|
|
29
|
+
* testable, the type is structural rather than the
|
|
30
|
+
* concrete `Container` from core.
|
|
31
|
+
*/
|
|
32
|
+
container: {
|
|
33
|
+
bind(token: unknown, factory: () => unknown): void;
|
|
34
|
+
};
|
|
35
|
+
modeStore: unknown;
|
|
36
|
+
memoryStore: unknown;
|
|
37
|
+
skillLoader: unknown;
|
|
38
|
+
/** Forward declaration: mutated later in main() by the
|
|
39
|
+
* session bring-up. The contributor's `planPath`
|
|
40
|
+
* callback reads from this ref so the plan path is
|
|
41
|
+
* computed against the current session, not a snapshot. */
|
|
42
|
+
sessionRef: MutableRef<{
|
|
43
|
+
id: string;
|
|
44
|
+
} | undefined>;
|
|
45
|
+
/** Forward declaration: mutated later in main() by the
|
|
46
|
+
* autonomy / eternal engine setup. The contributor's
|
|
47
|
+
* `enabled` callback reads from this ref so the ETERNAL
|
|
48
|
+
* AUTONOMY block is injected only when the current mode
|
|
49
|
+
* is `eternal` or `eternal-parallel`. */
|
|
50
|
+
autonomyModeRef: MutableRef<AutonomyMode>;
|
|
51
|
+
modeId: string;
|
|
52
|
+
modePrompt: string;
|
|
53
|
+
modelCapabilities: {
|
|
54
|
+
maxContextTokens: number;
|
|
55
|
+
supportsTools: boolean;
|
|
56
|
+
supportsVision: boolean;
|
|
57
|
+
supportsReasoning: boolean;
|
|
58
|
+
} | (() => {
|
|
59
|
+
maxContextTokens: number;
|
|
60
|
+
supportsTools: boolean;
|
|
61
|
+
supportsVision: boolean;
|
|
62
|
+
supportsReasoning: boolean;
|
|
63
|
+
} | undefined) | undefined;
|
|
64
|
+
/** `config.features.skills` \u2014 if false, the skillLoader
|
|
65
|
+
* is not passed to the builder. */
|
|
66
|
+
skillsEnabled: boolean;
|
|
67
|
+
/** `config.skills.mode` — `'progressive'` injects only a skill manifest (the agent loads bodies via the `skill` tool). */
|
|
68
|
+
skillMode?: 'eager' | 'progressive' | undefined;
|
|
69
|
+
/** `config.skills.eagerMaxChars` — total skill-body budget in eager mode. */
|
|
70
|
+
skillEagerMaxChars?: number | undefined;
|
|
71
|
+
/** `config.features.tokenSavingMode` — forwarded so prompt guidance matches tool tiering. */
|
|
72
|
+
tokenSavingMode?: TokenSavingTier | boolean | undefined;
|
|
73
|
+
paths: SystemPromptBuilderPaths;
|
|
74
|
+
/** `path.join`-shaped helper from the runtime. */
|
|
75
|
+
pathJoiner: PathJoiner;
|
|
76
|
+
/** The `TOKENS.SystemPromptBuilder` token, opaque to the
|
|
77
|
+
* helper. We just need to call `container.bind(token,
|
|
78
|
+
* factory)`. */
|
|
79
|
+
systemPromptBuilderToken: unknown;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Bind a `DefaultSystemPromptBuilder` factory into the
|
|
83
|
+
* container under the `TOKENS.SystemPromptBuilder` key.
|
|
84
|
+
*
|
|
85
|
+
* The factory closure is lazy \u2014 every time the system
|
|
86
|
+
* prompt is built (once per turn) it reads the *current*
|
|
87
|
+
* `sessionRef.current` and `autonomyModeRef.current`. This
|
|
88
|
+
* matches the pre-refactor inline behavior exactly.
|
|
89
|
+
*/
|
|
90
|
+
export declare function bindSystemPromptBuilder(deps: BindSystemPromptBuilderDeps): void;
|
|
91
|
+
//# sourceMappingURL=system-prompt-builder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"system-prompt-builder.d.ts","sourceRoot":"","sources":["../../src/boot/system-prompt-builder.ts"],"names":[],"mappings":"AAoDA,OAAO,EAIL,KAAK,eAAe,EACrB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAElE,MAAM,WAAW,UAAU,CAAC,CAAC;IAC3B,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;CACxB;AAED;;;;;GAKG;AACH,MAAM,WAAW,wBAAwB;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,kBAAkB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,qBAAqB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5C;AAED;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB,IAAI,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACpC;AAED,MAAM,WAAW,2BAA2B;IAC1C;;;;;OAKG;IACH,SAAS,EAAE;QACT,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,GAAG,IAAI,CAAC;KACpD,CAAC;IACF,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,OAAO,CAAC;IACrB;;;gEAG4D;IAC5D,UAAU,EAAE,UAAU,CAAC;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,CAAC,CAAC;IACnD;;;;8CAI0C;IAC1C,eAAe,EAAE,UAAU,CAAC,YAAY,CAAC,CAAC;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,EACb;QACE,gBAAgB,EAAE,MAAM,CAAC;QACzB,aAAa,EAAE,OAAO,CAAC;QACvB,cAAc,EAAE,OAAO,CAAC;QACxB,iBAAiB,EAAE,OAAO,CAAC;KAC5B,GACD,CAAC,MACG;QACE,gBAAgB,EAAE,MAAM,CAAC;QACzB,aAAa,EAAE,OAAO,CAAC;QACvB,cAAc,EAAE,OAAO,CAAC;QACxB,iBAAiB,EAAE,OAAO,CAAC;KAC5B,GACD,SAAS,CAAC,GACd,SAAS,CAAC;IACd;wCACoC;IACpC,aAAa,EAAE,OAAO,CAAC;IACvB,0HAA0H;IAC1H,SAAS,CAAC,EAAE,OAAO,GAAG,aAAa,GAAG,SAAS,CAAC;IAChD,6EAA6E;IAC7E,kBAAkB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,6FAA6F;IAC7F,eAAe,CAAC,EAAE,eAAe,GAAG,OAAO,GAAG,SAAS,CAAC;IACxD,KAAK,EAAE,wBAAwB,CAAC;IAChC,kDAAkD;IAClD,UAAU,EAAE,UAAU,CAAC;IACvB;;qBAEiB;IACjB,wBAAwB,EAAE,OAAO,CAAC;CACnC;AAED;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,2BAA2B,GAAG,IAAI,CA6C/E"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { Config, Logger, ModelsRegistry } from '@wrongstack/core';
|
|
2
|
+
import type { ProviderRegistry, ResolvedProvider } from '@wrongstack/core';
|
|
3
|
+
export type ModeId = string;
|
|
4
|
+
export type ModePrompt = string;
|
|
5
|
+
export interface ModelCapabilities {
|
|
6
|
+
maxContextTokens: number;
|
|
7
|
+
supportsTools: boolean;
|
|
8
|
+
supportsVision: boolean;
|
|
9
|
+
supportsReasoning: boolean;
|
|
10
|
+
}
|
|
11
|
+
export type ResolvedModeResult = {
|
|
12
|
+
kind: 'ok';
|
|
13
|
+
resolvedProvider: ResolvedProvider;
|
|
14
|
+
providerRegistry: ProviderRegistry;
|
|
15
|
+
provider: ReturnType<ProviderRegistry['create']>;
|
|
16
|
+
modeId: ModeId;
|
|
17
|
+
modePrompt: ModePrompt;
|
|
18
|
+
modelCapabilities: ModelCapabilities | undefined;
|
|
19
|
+
} | {
|
|
20
|
+
kind: 'exit';
|
|
21
|
+
code: 2;
|
|
22
|
+
/** The error message that was written to stderr before
|
|
23
|
+
* the exit. Callers may want to log or display it
|
|
24
|
+
* before tearing down. */
|
|
25
|
+
message: string;
|
|
26
|
+
};
|
|
27
|
+
export interface ResolveModeDeps {
|
|
28
|
+
config: Config;
|
|
29
|
+
modelsRegistry: ModelsRegistry;
|
|
30
|
+
logger: Logger;
|
|
31
|
+
/** Result of `container.resolve(TOKENS.ModeStore).getActiveMode()`. */
|
|
32
|
+
activeMode: {
|
|
33
|
+
id: string;
|
|
34
|
+
prompt: string;
|
|
35
|
+
} | undefined | null;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Run the three resolution steps that the system prompt
|
|
39
|
+
* depends on:
|
|
40
|
+
*
|
|
41
|
+
* 1. `setupProvider({...})` \u2014 picks the provider for this run
|
|
42
|
+
* and returns the resolved `{ provider, providerRegistry,
|
|
43
|
+
* resolvedProvider }` triple. On failure, returns
|
|
44
|
+
* `{ kind: 'exit', code: 2, message }` so the caller can
|
|
45
|
+
* dispatch on the kind without re-implementing the
|
|
46
|
+
* teardown.
|
|
47
|
+
*
|
|
48
|
+
* 2. `capabilitiesFor(...)` + `modelsRegistry.getModel(...)`
|
|
49
|
+
* \u2014 run in parallel via `Promise.all` so the slow
|
|
50
|
+
* `getModel` doesn't block the (usually fast) `capabilitiesFor`
|
|
51
|
+
* or vice-versa. If either fails, we fall back to
|
|
52
|
+
* `undefined` modelCapabilities rather than crashing;
|
|
53
|
+
* the system prompt builder treats undefined as
|
|
54
|
+
* "don't include the model-aware hints".
|
|
55
|
+
*
|
|
56
|
+
* 3. Mode id + mode prompt extraction \u2014 falls back to
|
|
57
|
+
* `'default'` mode and an empty prompt when there's no
|
|
58
|
+
* active mode. The fallback is identical to the
|
|
59
|
+
* pre-refactor inline logic.
|
|
60
|
+
*
|
|
61
|
+
* The function is `async` because both `setupProvider` and
|
|
62
|
+
* `capabilitiesFor` are async. The caller awaits the result
|
|
63
|
+
* and dispatches on `result.kind`.
|
|
64
|
+
*/
|
|
65
|
+
export declare function resolveModeAndCapabilities(deps: ResolveModeDeps): Promise<ResolvedModeResult>;
|
|
66
|
+
//# sourceMappingURL=system-prompt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"system-prompt.d.ts","sourceRoot":"","sources":["../../src/boot/system-prompt.ts"],"names":[],"mappings":"AAgDA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAI3E,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC;AAC5B,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;AAEhC,MAAM,WAAW,iBAAiB;IAChC,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,OAAO,CAAC;IACvB,cAAc,EAAE,OAAO,CAAC;IACxB,iBAAiB,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,MAAM,kBAAkB,GAC1B;IACE,IAAI,EAAE,IAAI,CAAC;IACX,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,QAAQ,EAAE,UAAU,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAC;IACjD,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,UAAU,CAAC;IACvB,iBAAiB,EAAE,iBAAiB,GAAG,SAAS,CAAC;CAClD,GACD;IACE,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,CAAC,CAAC;IACR;;+BAE2B;IAC3B,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEN,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,cAAc,CAAC;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,uEAAuE;IACvE,UAAU,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,GAAG,IAAI,CAAC;CAC/D;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAsB,0BAA0B,CAC9C,IAAI,EAAE,eAAe,GACpB,OAAO,CAAC,kBAAkB,CAAC,CAoE7B"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { EventBus, MemoryStore, ToolDescriptionModeConfig, ToolRegistry, ToolResultRenderModeConfig, WstackPaths } from '@wrongstack/core';
|
|
2
|
+
import type { TokenSavingTier } from '@wrongstack/core';
|
|
3
|
+
export interface RegisterBuiltinToolsDeps {
|
|
4
|
+
toolRegistry: ToolRegistry;
|
|
5
|
+
compactor: unknown;
|
|
6
|
+
config: {
|
|
7
|
+
features: {
|
|
8
|
+
memory: boolean;
|
|
9
|
+
tokenSavingMode?: TokenSavingTier | boolean | undefined;
|
|
10
|
+
};
|
|
11
|
+
tools?: {
|
|
12
|
+
descriptionMode?: ToolDescriptionModeConfig | undefined;
|
|
13
|
+
resultRenderMode?: ToolResultRenderModeConfig | undefined;
|
|
14
|
+
disabledTools?: string[] | undefined;
|
|
15
|
+
exec?: {
|
|
16
|
+
allow?: string[] | undefined;
|
|
17
|
+
deny?: string[] | undefined;
|
|
18
|
+
danger?: {
|
|
19
|
+
bypass?: string[] | undefined;
|
|
20
|
+
} | undefined;
|
|
21
|
+
} | undefined;
|
|
22
|
+
} | undefined;
|
|
23
|
+
git?: {
|
|
24
|
+
identity?: {
|
|
25
|
+
name?: string | undefined;
|
|
26
|
+
email?: string | undefined;
|
|
27
|
+
} | undefined;
|
|
28
|
+
} | undefined;
|
|
29
|
+
};
|
|
30
|
+
memoryStore: MemoryStore | null | undefined;
|
|
31
|
+
events: EventBus;
|
|
32
|
+
wpaths: Pick<WstackPaths, 'projectDir'>;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Register the inline tool set: context manager + memory
|
|
36
|
+
* tools (if features.memory) + mailbox tools. The mailbox
|
|
37
|
+
* tools are always registered \u2014 they are needed for
|
|
38
|
+
* inter-agent coordination regardless of the per-session
|
|
39
|
+
* memory feature flag.
|
|
40
|
+
*/
|
|
41
|
+
export declare function registerBuiltinTools(deps: RegisterBuiltinToolsDeps): void;
|
|
42
|
+
//# sourceMappingURL=tool-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-registry.d.ts","sourceRoot":"","sources":["../../src/boot/tool-registry.ts"],"names":[],"mappings":"AA2CA,OAAO,KAAK,EACV,QAAQ,EACR,WAAW,EACX,yBAAyB,EACzB,YAAY,EACZ,0BAA0B,EAC1B,WAAW,EACZ,MAAM,kBAAkB,CAAC;AAI1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGxD,MAAM,WAAW,wBAAwB;IACvC,YAAY,EAAE,YAAY,CAAC;IAC3B,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE;QACN,QAAQ,EAAE;YAAE,MAAM,EAAE,OAAO,CAAC;YAAC,eAAe,CAAC,EAAE,eAAe,GAAG,OAAO,GAAG,SAAS,CAAA;SAAE,CAAC;QACvF,KAAK,CAAC,EACF;YACE,eAAe,CAAC,EAAE,yBAAyB,GAAG,SAAS,CAAC;YACxD,gBAAgB,CAAC,EAAE,0BAA0B,GAAG,SAAS,CAAC;YAC1D,aAAa,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;YACrC,IAAI,CAAC,EACD;gBACE,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;gBAC7B,IAAI,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;gBAC5B,MAAM,CAAC,EAAE;oBAAE,MAAM,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAA;iBAAE,GAAG,SAAS,CAAC;aACxD,GACD,SAAS,CAAC;SACf,GACD,SAAS,CAAC;QACd,GAAG,CAAC,EACA;YAAE,QAAQ,CAAC,EAAE;gBAAE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;gBAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;aAAE,GAAG,SAAS,CAAA;SAAE,GACpF,SAAS,CAAC;KACf,CAAC;IACF,WAAW,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,CAAC;IAC5C,MAAM,EAAE,QAAQ,CAAC;IACjB,MAAM,EAAE,IAAI,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC;CACzC;AAuBD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,wBAAwB,GAAG,IAAI,CA4EzE"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { EventBus } from '@wrongstack/core';
|
|
2
|
+
export interface AutoPhaseWiring {
|
|
3
|
+
/**
|
|
4
|
+
* Called by the TUI to receive forwarded events. Each call registers
|
|
5
|
+
* one listener per event name; the returned function unregisters all.
|
|
6
|
+
*/
|
|
7
|
+
subscribe: (handler: (event: string, payload: unknown) => void) => () => void;
|
|
8
|
+
/** Remove all listeners. Safe to call multiple times. */
|
|
9
|
+
cleanup: () => void;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Wire AutoPhase event forwarding on the given EventBus.
|
|
13
|
+
*
|
|
14
|
+
* AutoPhase events are emitted on the untyped surface of the bus (the
|
|
15
|
+
* orchestrator casts `emit` to a string-keyed signature), so we subscribe
|
|
16
|
+
* through the same untyped view rather than the typed event-name overloads.
|
|
17
|
+
*
|
|
18
|
+
* Bind to `events` — pulling the method off the bus as a bare reference
|
|
19
|
+
* loses `this`, so `on`/`off` would read `this.listeners` off `undefined`
|
|
20
|
+
* and throw the moment AutoPhase subscribes.
|
|
21
|
+
*/
|
|
22
|
+
export declare function wireAutoPhase(events: EventBus): AutoPhaseWiring;
|
|
23
|
+
//# sourceMappingURL=tui-autophase-wiring.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tui-autophase-wiring.d.ts","sourceRoot":"","sources":["../../src/boot/tui-autophase-wiring.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAsBjD,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,SAAS,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,KAAK,MAAM,IAAI,CAAC;IAC9E,yDAAyD;IACzD,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,QAAQ,GAAG,eAAe,CAkC/D"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { AutonomousCoordinator, type Context, type Director, type EventBus } from '@wrongstack/core';
|
|
2
|
+
import type { WstackPaths } from '@wrongstack/core';
|
|
3
|
+
import type { TuiRuntimeState } from './tui-runtime-state.js';
|
|
4
|
+
export interface CoordinatorSetupContext {
|
|
5
|
+
/** The shared mutable runtime state. */
|
|
6
|
+
state: TuiRuntimeState;
|
|
7
|
+
/** The main EventBus — used for the Director lifecycle hook. */
|
|
8
|
+
events: EventBus;
|
|
9
|
+
/** The agent's Context — provides provider, model, session id, transcript path. */
|
|
10
|
+
context: Context;
|
|
11
|
+
/** Resolved WrongStack paths — used for session-dir resolution. */
|
|
12
|
+
wpaths: WstackPaths;
|
|
13
|
+
/** The mailbox — cast to the core Mailbox interface for the coordinator. */
|
|
14
|
+
mailbox: unknown;
|
|
15
|
+
/** The Director (may be null — coordinator waits for lazy spawn). */
|
|
16
|
+
director: Director | null | undefined;
|
|
17
|
+
/** Optional getter for a lazily-created Director. */
|
|
18
|
+
getDirector: (() => Director | null | undefined) | undefined;
|
|
19
|
+
/** The mutable controller object slash commands read/write. */
|
|
20
|
+
coordinatorController: Record<string, unknown> | undefined;
|
|
21
|
+
/** Set by this module so execute()'s finally block can stop the coordinator. */
|
|
22
|
+
onCoordinatorStopSetter: (fn: (() => void) | undefined) => void;
|
|
23
|
+
}
|
|
24
|
+
export interface CoordinatorSetupResult {
|
|
25
|
+
/** The ensureAutonomousCoordinator function (idempotent). */
|
|
26
|
+
ensure: () => AutonomousCoordinator | null;
|
|
27
|
+
/** Call to remove the Director lifecycle listener (for TUI cleanup). */
|
|
28
|
+
cleanup: () => void;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Wire the AutonomousCoordinator and its Director lifecycle hook.
|
|
32
|
+
*
|
|
33
|
+
* Returns the `ensure` function (idempotent — returns the existing
|
|
34
|
+
* coordinator if already created) and a `cleanup` function that removes
|
|
35
|
+
* the event listener.
|
|
36
|
+
*/
|
|
37
|
+
export declare function setupAutonomousCoordinator(ctx: CoordinatorSetupContext): CoordinatorSetupResult;
|
|
38
|
+
//# sourceMappingURL=tui-coordinator-setup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tui-coordinator-setup.d.ts","sourceRoot":"","sources":["../../src/boot/tui-coordinator-setup.ts"],"names":[],"mappings":"AAmBA,OAAO,EACL,qBAAqB,EACrB,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,KAAK,QAAQ,EAGd,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE9D,MAAM,WAAW,uBAAuB;IACtC,wCAAwC;IACxC,KAAK,EAAE,eAAe,CAAC;IACvB,gEAAgE;IAChE,MAAM,EAAE,QAAQ,CAAC;IACjB,mFAAmF;IACnF,OAAO,EAAE,OAAO,CAAC;IACjB,mEAAmE;IACnE,MAAM,EAAE,WAAW,CAAC;IACpB,4EAA4E;IAC5E,OAAO,EAAE,OAAO,CAAC;IACjB,qEAAqE;IACrE,QAAQ,EAAE,QAAQ,GAAG,IAAI,GAAG,SAAS,CAAC;IACtC,qDAAqD;IACrD,WAAW,EAAE,CAAC,MAAM,QAAQ,GAAG,IAAI,GAAG,SAAS,CAAC,GAAG,SAAS,CAAC;IAC7D,+DAA+D;IAC/D,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;IAC3D,gFAAgF;IAChF,uBAAuB,EAAE,CAAC,EAAE,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,KAAK,IAAI,CAAC;CACjE;AAED,MAAM,WAAW,sBAAsB;IACrC,6DAA6D;IAC7D,MAAM,EAAE,MAAM,qBAAqB,GAAG,IAAI,CAAC;IAC3C,wEAAwE;IACxE,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CACxC,GAAG,EAAE,uBAAuB,GAC3B,sBAAsB,CA4KxB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TUI debug-stream callbacks — extracted from the runTui() options literal.
|
|
3
|
+
*
|
|
4
|
+
* Phase C step 6. registerDebugStreamCallback swaps the debug-stream
|
|
5
|
+
* callback from stderr → TUI reducer; restoreDebugStreamCallback reverts
|
|
6
|
+
* to the default on TUI unmount. Both are pure delegates to
|
|
7
|
+
* @wrongstack/providers with structured error logging.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Swap the debug-stream callback to the TUI reducer.
|
|
11
|
+
* Restored on TUI unmount via restoreDebugStreamCallback.
|
|
12
|
+
*/
|
|
13
|
+
export declare function registerDebugStreamCallback(cb: import('@wrongstack/providers').DebugStreamCallback): Promise<void>;
|
|
14
|
+
/**
|
|
15
|
+
* Restore the default debug-stream callback (stderr).
|
|
16
|
+
*/
|
|
17
|
+
export declare function restoreDebugStreamCallback(): Promise<void>;
|
|
18
|
+
//# sourceMappingURL=tui-debug-stream.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tui-debug-stream.d.ts","sourceRoot":"","sources":["../../src/boot/tui-debug-stream.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;GAGG;AACH,wBAAsB,2BAA2B,CAC/C,EAAE,EAAE,OAAO,uBAAuB,EAAE,mBAAmB,GACtD,OAAO,CAAC,IAAI,CAAC,CAcf;AAED;;GAEG;AACH,wBAAsB,0BAA0B,IAAI,OAAO,CAAC,IAAI,CAAC,CAgBhE"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { TuiRuntimeState } from './tui-runtime-state.js';
|
|
2
|
+
export interface LiveSessionsContext {
|
|
3
|
+
state: TuiRuntimeState;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* List live sessions from the global SessionRegistry.
|
|
7
|
+
* Filters out 'stale' entries. Called when the F10 sessions panel opens.
|
|
8
|
+
*/
|
|
9
|
+
export declare function getLiveSessions(ctx: LiveSessionsContext): Promise<{
|
|
10
|
+
sessionId: string;
|
|
11
|
+
projectName: string;
|
|
12
|
+
projectSlug: string;
|
|
13
|
+
projectRoot: string;
|
|
14
|
+
workingDir: string;
|
|
15
|
+
gitBranch: string | undefined;
|
|
16
|
+
status: import("@wrongstack/core").SessionLiveStatus;
|
|
17
|
+
pid: number;
|
|
18
|
+
startedAt: string;
|
|
19
|
+
agentCount: number;
|
|
20
|
+
agents: {
|
|
21
|
+
id: string;
|
|
22
|
+
name: string;
|
|
23
|
+
status: import("@wrongstack/core").AgentLiveStatus;
|
|
24
|
+
currentTool: string | undefined;
|
|
25
|
+
iterations: number;
|
|
26
|
+
toolCalls: number;
|
|
27
|
+
lastActivityAt: string;
|
|
28
|
+
}[];
|
|
29
|
+
}[]>;
|
|
30
|
+
/**
|
|
31
|
+
* Record a pending project switch for a live session.
|
|
32
|
+
*
|
|
33
|
+
* Deliberately NOT `--resume <sessionId>`: the F10 panel lists LIVE
|
|
34
|
+
* sessions (their owner processes are alive — 'stale' is filtered out),
|
|
35
|
+
* and resuming one would put two processes on the same session JSONL.
|
|
36
|
+
* We open the target project fresh instead.
|
|
37
|
+
*/
|
|
38
|
+
export declare function onSwitchToSession(ctx: LiveSessionsContext, _sessionId: string, targetRoot: string, projectName: string): void;
|
|
39
|
+
//# sourceMappingURL=tui-live-sessions.d.ts.map
|