@wrongstack/cli 0.284.0 → 0.285.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/data/providers.json +5 -3
- 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 +82 -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 +23 -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/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 +66 -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 +239 -0
- package/dist/execute-deps.d.ts.map +1 -0
- package/dist/execution.d.ts +99 -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.d.ts +56 -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 +6025 -3952
- 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 +23 -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 +162 -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 +16 -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/gitid.d.ts +22 -0
- package/dist/slash-commands/gitid.d.ts.map +1 -0
- package/dist/slash-commands/goal-refiner.d.ts +22 -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/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 +524 -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 +19 -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/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/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/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 +36 -0
- package/dist/webui-server/ws-handlers/brain.d.ts.map +1 -0
- package/dist/webui-server/ws-handlers/connection.d.ts +50 -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 +51 -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 +160 -0
- package/dist/webui-server.d.ts.map +1 -0
- package/dist/wiring/brain-and-orchestration.d.ts +63 -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 +46 -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 +42 -0
- package/dist/wiring/hq-telemetry.d.ts.map +1 -0
- package/dist/wiring/lifecycle-plugins.d.ts +58 -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 +21 -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 +108 -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 +56 -0
- package/dist/wiring/session.d.ts.map +1 -0
- package/dist/wiring/slash-commands.d.ts +74 -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
package/dist/tuneup.d.ts
ADDED
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tune-up engine — deterministic health, context-cost, and performance checks
|
|
3
|
+
* for a WrongStack session, mapping the "clean up + speed up your setup" idea
|
|
4
|
+
* onto WrongStack's own config knobs and subsystems.
|
|
5
|
+
*
|
|
6
|
+
* Pure module: none of these functions touch the filesystem, the network, or
|
|
7
|
+
* live registries. The `/tuneup` slash command owns all IO (reading config,
|
|
8
|
+
* skills, memory files, the trust file, the update check, disk sizes) and
|
|
9
|
+
* applies the writes; this engine only turns already-loaded data into findings.
|
|
10
|
+
* That keeps it trivially unit-testable, exactly like `config-doctor.ts`.
|
|
11
|
+
*
|
|
12
|
+
* Every finding may carry:
|
|
13
|
+
* - `action` — a structured, deterministic fix the command applies on
|
|
14
|
+
* `/tuneup fix`. Actions gated by `input.power` are only
|
|
15
|
+
* emitted for the explicit `/tuneup fix --power` profile so a
|
|
16
|
+
* plain tune-up never silently makes the agent autonomous.
|
|
17
|
+
* - `handoff` — a line folded into an agent follow-up turn for the fuzzy,
|
|
18
|
+
* judgement-heavy items (instruction-file dedup / split).
|
|
19
|
+
*/
|
|
20
|
+
import type { Config } from '@wrongstack/core';
|
|
21
|
+
import type { UpdateInfo } from './update-check.js';
|
|
22
|
+
export type TuneupSeverity = 'error' | 'warning' | 'info' | 'ok';
|
|
23
|
+
/** Stable check-group ids — one section per group in the rendered report. */
|
|
24
|
+
export type TuneupCategory = 'version' | 'autonomy' | 'skills' | 'mcp' | 'plugins' | 'memory' | 'hooks' | 'permissions' | 'performance' | 'reliability' | 'config';
|
|
25
|
+
/**
|
|
26
|
+
* A structured, deterministic repair the command knows how to apply.
|
|
27
|
+
* `set-config` is the generic one — a dot-path into the global config plus the
|
|
28
|
+
* value to set — so most knobs need no bespoke apply logic.
|
|
29
|
+
*/
|
|
30
|
+
export type TuneupAction = {
|
|
31
|
+
kind: 'set-config';
|
|
32
|
+
path: string[];
|
|
33
|
+
value: unknown;
|
|
34
|
+
label: string;
|
|
35
|
+
} | {
|
|
36
|
+
kind: 'add-exec-allow';
|
|
37
|
+
commands: string[];
|
|
38
|
+
} | {
|
|
39
|
+
kind: 'normalize-hook-timeout';
|
|
40
|
+
event: string;
|
|
41
|
+
index: number;
|
|
42
|
+
timeoutMs: number;
|
|
43
|
+
};
|
|
44
|
+
export interface TuneupFinding {
|
|
45
|
+
category: TuneupCategory;
|
|
46
|
+
severity: TuneupSeverity;
|
|
47
|
+
/** One-line problem statement. */
|
|
48
|
+
problem: string;
|
|
49
|
+
/** Optional human hint about the recommended action. */
|
|
50
|
+
suggestion?: string | undefined;
|
|
51
|
+
/** Present when a deterministic auto-fix exists; short description shown in the report. */
|
|
52
|
+
fix?: string | undefined;
|
|
53
|
+
/** Machine-readable descriptor the command applies on `/tuneup fix`. */
|
|
54
|
+
action?: TuneupAction | undefined;
|
|
55
|
+
/** A line folded into the agent follow-up turn (fuzzy items with no mechanical fix). */
|
|
56
|
+
handoff?: string | undefined;
|
|
57
|
+
}
|
|
58
|
+
/** A discovered skill, reduced to what the checks need. */
|
|
59
|
+
export interface TuneupSkill {
|
|
60
|
+
name: string;
|
|
61
|
+
source: string;
|
|
62
|
+
/** Body length in chars, when the command could read it (best-effort). */
|
|
63
|
+
bodyChars?: number | undefined;
|
|
64
|
+
}
|
|
65
|
+
/** Live MCP server status, reduced from `mcpRegistry.describe()`. */
|
|
66
|
+
export interface TuneupMcpServer {
|
|
67
|
+
name: string;
|
|
68
|
+
state: string;
|
|
69
|
+
enabled: boolean;
|
|
70
|
+
toolCount: number;
|
|
71
|
+
}
|
|
72
|
+
/** An instruction/memory file layer to compare + size-check. */
|
|
73
|
+
export interface TuneupMemoryFile {
|
|
74
|
+
/** Human label, e.g. "user memory" or "project AGENTS.md". */
|
|
75
|
+
label: string;
|
|
76
|
+
path: string;
|
|
77
|
+
content: string;
|
|
78
|
+
/** True for committed/shared layers (project AGENTS.md, root CLAUDE.md). */
|
|
79
|
+
committed: boolean;
|
|
80
|
+
}
|
|
81
|
+
/** The persistent permission trust file, `~/.wrongstack/projects/<hash>/trust.json`. */
|
|
82
|
+
export type TuneupTrustPolicy = Record<string, {
|
|
83
|
+
allow?: string[] | undefined;
|
|
84
|
+
deny?: string[] | undefined;
|
|
85
|
+
auto?: boolean | undefined;
|
|
86
|
+
}>;
|
|
87
|
+
/** Ambient facts the command precomputes (host / disk / env) for the checks. */
|
|
88
|
+
export interface TuneupEnv {
|
|
89
|
+
/** Logical CPU count, for the maxConcurrent sanity check. */
|
|
90
|
+
cpuCount?: number | undefined;
|
|
91
|
+
/** Number of configured providers, for the fallback-chain check. */
|
|
92
|
+
providerCount?: number | undefined;
|
|
93
|
+
/** Whether the secret vault is passphrase-hardened at rest. */
|
|
94
|
+
vaultHardened?: boolean | undefined;
|
|
95
|
+
/** Total bytes of on-disk session logs for this project (disk-hygiene check). */
|
|
96
|
+
sessionBytes?: number | undefined;
|
|
97
|
+
}
|
|
98
|
+
export interface TuneupInput {
|
|
99
|
+
config: Config;
|
|
100
|
+
skills: TuneupSkill[];
|
|
101
|
+
/** `config.skills.eagerMaxChars` or its default. */
|
|
102
|
+
eagerMaxChars: number;
|
|
103
|
+
skillMode: 'eager' | 'progressive';
|
|
104
|
+
/** Live MCP status when the host wired `mcpStatus`; undefined → skip live MCP checks. */
|
|
105
|
+
mcp?: TuneupMcpServer[] | undefined;
|
|
106
|
+
/** Instruction-file layers (user memory, project AGENTS.md, root CLAUDE.md/AGENTS.md). */
|
|
107
|
+
memoryFiles: TuneupMemoryFile[];
|
|
108
|
+
/** Self-update info (from `checkForUpdate`), when the version check ran. */
|
|
109
|
+
update?: UpdateInfo | undefined;
|
|
110
|
+
/** Parsed trust file, when present. */
|
|
111
|
+
trust?: TuneupTrustPolicy | undefined;
|
|
112
|
+
/**
|
|
113
|
+
* Denied read-only commands mined from session history (optional richer
|
|
114
|
+
* signal). Each entry is a command line and how many times it was denied.
|
|
115
|
+
*/
|
|
116
|
+
deniedFromHistory?: Array<{
|
|
117
|
+
command: string;
|
|
118
|
+
count: number;
|
|
119
|
+
}> | undefined;
|
|
120
|
+
/** Ambient host/disk facts. */
|
|
121
|
+
env?: TuneupEnv | undefined;
|
|
122
|
+
/** Count of `/doctor`-style config issues (from `diagnoseConfig`). */
|
|
123
|
+
configIssues?: number | undefined;
|
|
124
|
+
/**
|
|
125
|
+
* Power profile: `/tuneup fix --power`. Gates the autonomy/yolo/director
|
|
126
|
+
* actions so a plain tune-up never flips them (respects the user-owned
|
|
127
|
+
* autonomy invariant).
|
|
128
|
+
*/
|
|
129
|
+
power?: boolean | undefined;
|
|
130
|
+
}
|
|
131
|
+
export interface TuneupReport {
|
|
132
|
+
findings: TuneupFinding[];
|
|
133
|
+
/** Composed agent follow-up prompt for fuzzy items; empty when none. */
|
|
134
|
+
agentHandoff: string;
|
|
135
|
+
}
|
|
136
|
+
/** Default eager skill-body budget (mirrors `SkillsConfig.eagerMaxChars`). */
|
|
137
|
+
export declare const DEFAULT_EAGER_MAX_CHARS = 24000;
|
|
138
|
+
/** True when `command` is safely read-only by our conservative heuristic. */
|
|
139
|
+
export declare function isReadOnlyCommand(command: string): boolean;
|
|
140
|
+
export declare function checkSkills(input: TuneupInput): TuneupFinding[];
|
|
141
|
+
export declare function checkMcp(input: TuneupInput): TuneupFinding[];
|
|
142
|
+
export declare function checkPlugins(input: TuneupInput): TuneupFinding[];
|
|
143
|
+
export declare function checkMemoryDedup(input: TuneupInput): TuneupFinding[];
|
|
144
|
+
export declare function checkMemorySize(input: TuneupInput): TuneupFinding[];
|
|
145
|
+
export declare function checkHooks(input: TuneupInput): TuneupFinding[];
|
|
146
|
+
export declare function checkVersion(input: TuneupInput): TuneupFinding[];
|
|
147
|
+
export declare function checkAutonomy(input: TuneupInput): TuneupFinding[];
|
|
148
|
+
/** Power-only: yolo + director launch defaults (explicit `--power` opt-in). */
|
|
149
|
+
export declare function checkPowerProfile(input: TuneupInput): TuneupFinding[];
|
|
150
|
+
export declare function checkPermissions(input: TuneupInput): TuneupFinding[];
|
|
151
|
+
export declare function checkPerformance(input: TuneupInput): TuneupFinding[];
|
|
152
|
+
export declare function checkReliability(input: TuneupInput): TuneupFinding[];
|
|
153
|
+
export declare function checkConfigDoctor(input: TuneupInput): TuneupFinding[];
|
|
154
|
+
/** Run every check and compose the report + agent hand-off text. */
|
|
155
|
+
export declare function runTuneup(input: TuneupInput): TuneupReport;
|
|
156
|
+
/**
|
|
157
|
+
* Build the rich follow-up prompt for `/tuneup deep` — hands the agent the live
|
|
158
|
+
* findings and asks for a project-specific optimization plan (the non-mechanical
|
|
159
|
+
* tier). Kept here so it is unit-testable alongside the checks.
|
|
160
|
+
*/
|
|
161
|
+
export declare function buildDeepPrompt(report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AAa,EAAE,CAoCpE;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,WAAW,GAAG,aAAa,EAAE,CAiBnE;AAID,wBAAgB,UAAU,CAAC,KAAK,EAAE,WAAW,GAAG,aAAa,EAAE,CAmC9D;AASD,wBAAgB,YAAY,CAAC,KAAK,EAAE,WAAW,GAAG,aAAa,EAAE,CAehE;AAID,wBAAgB,aAAa,CAAC,KAAK,EAAE,WAAW,GAAG,aAAa,EAAE,CAwBjE;AAED,+EAA+E;AAC/E,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,WAAW,GAAG,aAAa,EAAE,CAgCrE;AAID,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,WAAW,GAAG,aAAa,EAAE,CA0CpE;AAID,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,WAAW,GAAG,aAAa,EAAE,CA0EpE;AAID,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,WAAW,GAAG,aAAa,EAAE,CAkCpE;AAID,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,WAAW,GAAG,aAAa,EAAE,CAWrE;AAID,oEAAoE;AACpE,wBAAgB,SAAS,CAAC,KAAK,EAAE,WAAW,GAAG,YAAY,CAwB1D;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAiB5D"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface UpdateInfo {
|
|
2
|
+
current: string;
|
|
3
|
+
latest: string;
|
|
4
|
+
outdated: boolean;
|
|
5
|
+
checkFailed: boolean;
|
|
6
|
+
}
|
|
7
|
+
type HomeDirFn = () => string;
|
|
8
|
+
/** Cache file path — homeFn is injectable for testing */
|
|
9
|
+
export declare function cachePath(homeFn?: HomeDirFn): string;
|
|
10
|
+
/** Read the current CLI version from package.json */
|
|
11
|
+
export declare function currentVersion(): string;
|
|
12
|
+
/** Fetch latest version from npm registry. Exported for testability and for
|
|
13
|
+
* callers that want to do their own version checks. Throws a structured
|
|
14
|
+
* `FetchError(status, context: { op: 'checkForUpdate', registry: 'npmjs', url })`
|
|
15
|
+
* on non-2xx responses so consumers can branch on the structured shape. */
|
|
16
|
+
export declare function fetchLatestFromNpm(timeoutMs?: number): Promise<string>;
|
|
17
|
+
/** Return update info — cache-first, network fallback */
|
|
18
|
+
export declare function checkForUpdate(signal?: AbortSignal | undefined, homeFn?: HomeDirFn | undefined): Promise<UpdateInfo>;
|
|
19
|
+
/** Return update notification string if available, null otherwise */
|
|
20
|
+
export declare function getUpdateNotification(signal?: AbortSignal | undefined, homeFn?: HomeDirFn | undefined): Promise<string | null>;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=update-check.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-check.d.ts","sourceRoot":"","sources":["../src/update-check.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,KAAK,SAAS,GAAG,MAAM,MAAM,CAAC;AAM9B,yDAAyD;AACzD,wBAAgB,SAAS,CAAC,MAAM,GAAE,SAA0B,GAAG,MAAM,CAEpE;AAWD,qDAAqD;AACrD,wBAAgB,cAAc,IAAI,MAAM,CAYvC;AA0CD;;;4EAG4E;AAC5E,wBAAsB,kBAAkB,CAAC,SAAS,SAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAwB1E;AAED,yDAAyD;AACzD,wBAAsB,cAAc,CAClC,MAAM,CAAC,EAAE,WAAW,GAAG,SAAS,EAChC,MAAM,CAAC,EAAE,SAAS,GAAG,SAAS,GAC7B,OAAO,CAAC,UAAU,CAAC,CAkDrB;AAED,qEAAqE;AACrE,wBAAsB,qBAAqB,CACzC,MAAM,CAAC,EAAE,WAAW,GAAG,SAAS,EAChC,MAAM,CAAC,EAAE,SAAS,GAAG,SAAS,GAC7B,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAMxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delay-format.d.ts","sourceRoot":"","sources":["../../src/utils/delay-format.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAI9C"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface Win32CmdShimInvocation {
|
|
2
|
+
command: string;
|
|
3
|
+
args: string[];
|
|
4
|
+
windowsVerbatimArguments: true;
|
|
5
|
+
}
|
|
6
|
+
export declare function buildWin32CmdShimInvocation(command: string, args?: readonly string[]): Win32CmdShimInvocation;
|
|
7
|
+
//# sourceMappingURL=win32-cmd.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"win32-cmd.d.ts","sourceRoot":"","sources":["../../src/utils/win32-cmd.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,wBAAwB,EAAE,IAAI,CAAC;CAChC;AAED,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,MAAM,EACf,IAAI,GAAE,SAAS,MAAM,EAAO,GAC3B,sBAAsB,CAQxB"}
|
package/dist/utils.d.ts
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Format a token count for human-readable display.
|
|
3
|
+
* 999 → "999"
|
|
4
|
+
* 1_200 → "1.2k"
|
|
5
|
+
* 12_000 → "12k"
|
|
6
|
+
* 1_500_000 → "1.5M"
|
|
7
|
+
*/
|
|
8
|
+
export declare function fmtTok(n: number): string;
|
|
9
|
+
/**
|
|
10
|
+
* Return a new frozen config object with the given patch applied.
|
|
11
|
+
* Config objects are frozen by the config loader — direct mutation
|
|
12
|
+
* silently fails at runtime. This helper spreads + re-freezes safely.
|
|
13
|
+
*/
|
|
14
|
+
export declare function patchConfig<T extends object>(base: T, patch: Partial<T>): T;
|
|
15
|
+
/**
|
|
16
|
+
* Human-readable duration: 999 → "999ms", 12_500 → "12.5s",
|
|
17
|
+
* 160_016 → "2m40s", 7_200_000 → "2h0m". Used by `/agents` and
|
|
18
|
+
* `/fleet status` so users don't have to read "160016ms" and do the
|
|
19
|
+
* conversion in their head.
|
|
20
|
+
*/
|
|
21
|
+
export declare function fmtDuration(ms: number): string;
|
|
22
|
+
/**
|
|
23
|
+
* Render a completed TaskResult into a single line for `/agents` and
|
|
24
|
+
* `/fleet status`. Distinguishes all four terminal statuses with
|
|
25
|
+
* separate icons + colors so users can tell a timeout from a real
|
|
26
|
+
* failure at a glance, and surfaces both the failure kind (e.g.
|
|
27
|
+
* `provider_rate_limit`, `tool_failed`) and a truncated error tail
|
|
28
|
+
* (previously dropped on the floor).
|
|
29
|
+
*
|
|
30
|
+
* Accepts either the structured `SubagentError` envelope (current) or
|
|
31
|
+
* a legacy string error — the field shape is widened to keep older
|
|
32
|
+
* callers compiling while migrations roll through.
|
|
33
|
+
*
|
|
34
|
+
* The caller passes the color helper (it lives in @wrongstack/core)
|
|
35
|
+
* to avoid a circular import from this utility module.
|
|
36
|
+
*/
|
|
37
|
+
export declare function fmtTaskResultLine(r: {
|
|
38
|
+
status: 'success' | 'failed' | 'timeout' | 'stopped';
|
|
39
|
+
error?: string | {
|
|
40
|
+
kind?: string | undefined;
|
|
41
|
+
message?: string | undefined;
|
|
42
|
+
retryable?: boolean | undefined;
|
|
43
|
+
backoffMs?: number | undefined;
|
|
44
|
+
} | undefined;
|
|
45
|
+
iterations: number;
|
|
46
|
+
toolCalls: number;
|
|
47
|
+
durationMs: number;
|
|
48
|
+
}, color: {
|
|
49
|
+
green(s: string): string;
|
|
50
|
+
red(s: string): string;
|
|
51
|
+
yellow(s: string): string;
|
|
52
|
+
dim(s: string): string;
|
|
53
|
+
}): {
|
|
54
|
+
mark: string;
|
|
55
|
+
stats: string;
|
|
56
|
+
tail: string;
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAIxC;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAE3E;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAU9C;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAC/B,CAAC,EAAE;IACD,MAAM,EAAE,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAC;IACrD,KAAK,CAAC,EACF,MAAM,GACN;QACE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAC1B,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAC7B,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;QAChC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;KAChC,GACD,SAAS,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB,EACD,KAAK,EAAE;IACL,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,MAAM,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACxB,GACA;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CA4B/C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAiBA,eAAO,MAAM,WAAW,QAAmB,CAAC;AAE5C,QAAA,IAAI,WAAW,QAAU,CAAC;AAU1B,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { Config, EventBus } from '@wrongstack/core';
|
|
2
|
+
import { type HqCommandController } from '../hq-command-controller.js';
|
|
3
|
+
/**
|
|
4
|
+
* The control hooks the WebUI can offer HQ. When present, the WebUI client
|
|
5
|
+
* advertises `control.receive` and dispatches HQ commands (steer/btw/queue/
|
|
6
|
+
* broadcast via its mailbox, abort via the run controller) exactly like the
|
|
7
|
+
* CLI/TUI — so two-way control works for the WebUI client too, not just
|
|
8
|
+
* terminal surfaces. Omitted → telemetry-only (the previous behaviour).
|
|
9
|
+
*/
|
|
10
|
+
export interface WebuiHqControlHooks {
|
|
11
|
+
/** Abort the WebUI's active agent run. Returns true if a run was aborted. */
|
|
12
|
+
interruptLeader: () => boolean;
|
|
13
|
+
/** Whether raw shell execution is explicitly opted-in by the operator. */
|
|
14
|
+
allowRunCommand: () => boolean;
|
|
15
|
+
/** Optional: spawn a role subagent. */
|
|
16
|
+
spawnAgent?: HqCommandController['spawnAgent'];
|
|
17
|
+
/** Optional: stop the entire fleet. */
|
|
18
|
+
killFleet?: HqCommandController['killFleet'];
|
|
19
|
+
/** Optional: terminate one subagent by id. */
|
|
20
|
+
terminateAgent?: HqCommandController['terminateAgent'];
|
|
21
|
+
}
|
|
22
|
+
export interface WebuiClientRegistrationDeps {
|
|
23
|
+
projectRoot: string | undefined;
|
|
24
|
+
/** Full app config, used for HQ client publishing settings. */
|
|
25
|
+
appConfig: Config | undefined;
|
|
26
|
+
events: EventBus;
|
|
27
|
+
/** Stable session id recorded in HQ telemetry (the writer at startup). */
|
|
28
|
+
hqSessionId: string;
|
|
29
|
+
/** Live session id — session.resume swaps it, so it is read per heartbeat. */
|
|
30
|
+
getSessionId: () => string;
|
|
31
|
+
/** When provided, the WebUI becomes HQ-controllable (two-way control). */
|
|
32
|
+
hqControl?: WebuiHqControlHooks | undefined;
|
|
33
|
+
}
|
|
34
|
+
export interface WebuiClientRegistration {
|
|
35
|
+
/** Fire-and-forget registration; resolves to the client id (or null). */
|
|
36
|
+
register(): Promise<string | null>;
|
|
37
|
+
/** Stop heartbeats and tear down the HQ connection/telemetry bridge. */
|
|
38
|
+
unregister(): void;
|
|
39
|
+
}
|
|
40
|
+
export declare function createWebuiClientRegistration(deps: WebuiClientRegistrationDeps): WebuiClientRegistration;
|
|
41
|
+
//# sourceMappingURL=client-registration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-registration.d.ts","sourceRoot":"","sources":["../../src/webui-server/client-registration.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAsB,MAAM,kBAAkB,CAAC;AAE7E,OAAO,EAA6B,KAAK,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAKlG;;;;;;GAMG;AACH,MAAM,WAAW,mBAAmB;IAClC,6EAA6E;IAC7E,eAAe,EAAE,MAAM,OAAO,CAAC;IAC/B,0EAA0E;IAC1E,eAAe,EAAE,MAAM,OAAO,CAAC;IAC/B,uCAAuC;IACvC,UAAU,CAAC,EAAE,mBAAmB,CAAC,YAAY,CAAC,CAAC;IAC/C,uCAAuC;IACvC,SAAS,CAAC,EAAE,mBAAmB,CAAC,WAAW,CAAC,CAAC;IAC7C,8CAA8C;IAC9C,cAAc,CAAC,EAAE,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;CACxD;AAED,MAAM,WAAW,2BAA2B;IAC1C,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,+DAA+D;IAC/D,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,MAAM,EAAE,QAAQ,CAAC;IACjB,0EAA0E;IAC1E,WAAW,EAAE,MAAM,CAAC;IACpB,8EAA8E;IAC9E,YAAY,EAAE,MAAM,MAAM,CAAC;IAC3B,0EAA0E;IAC1E,SAAS,CAAC,EAAE,mBAAmB,GAAG,SAAS,CAAC;CAC7C;AAED,MAAM,WAAW,uBAAuB;IACtC,yEAAyE;IACzE,QAAQ,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACnC,wEAAwE;IACxE,UAAU,IAAI,IAAI,CAAC;CACpB;AAED,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,2BAA2B,GAChC,uBAAuB,CAqHzB"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WebSocket connection handler for the CLI WebUI bridge.
|
|
3
|
+
*
|
|
4
|
+
* One `wss.on('connection', ...)` per browser tab: per-socket error
|
|
5
|
+
* handling (attached first, before any awaited work — an oversized inbound
|
|
6
|
+
* frame or other socket-level error must never crash the process), auth via
|
|
7
|
+
* the shared `verifyClient` policy, client registration (map entry + the
|
|
8
|
+
* per-panel WS handlers), per-connection rate limiting, message dispatch,
|
|
9
|
+
* close cleanup, and the initial `session.start` push.
|
|
10
|
+
*
|
|
11
|
+
* PR 14 of Issue #30: extracted from `webui-server.ts`.
|
|
12
|
+
*/
|
|
13
|
+
import type { IncomingMessage } from 'node:http';
|
|
14
|
+
import type { Message, Usage } from '@wrongstack/core';
|
|
15
|
+
import type { AutoPhaseWebSocketHandler, SddBoardWebSocketHandler, SddWizardWebSocketHandler, SpecsWebSocketHandler, TerminalWebSocketHandler, WorktreeWebSocketHandler } from '@wrongstack/webui/server';
|
|
16
|
+
import type { WebSocket } from 'ws';
|
|
17
|
+
import { type PendingConfirm } from './ws-handlers/index.js';
|
|
18
|
+
import type { WSClientMessage, WSServerMessage } from '../webui-server.js';
|
|
19
|
+
export interface ConnectedClient {
|
|
20
|
+
ws: WebSocket;
|
|
21
|
+
sessionId: string | null;
|
|
22
|
+
}
|
|
23
|
+
export interface ConnectionHandlerDeps {
|
|
24
|
+
host: string;
|
|
25
|
+
wsToken: string;
|
|
26
|
+
requireToken: boolean;
|
|
27
|
+
publicHostnames: string[];
|
|
28
|
+
publicWsUrl: string | undefined;
|
|
29
|
+
clients: Map<WebSocket, ConnectedClient>;
|
|
30
|
+
currentSessionId: () => string;
|
|
31
|
+
autoPhaseHandler: AutoPhaseWebSocketHandler;
|
|
32
|
+
specsHandler: SpecsWebSocketHandler;
|
|
33
|
+
sddBoardHandler: SddBoardWebSocketHandler;
|
|
34
|
+
sddWizardHandler: SddWizardWebSocketHandler | null;
|
|
35
|
+
worktreeHandler: WorktreeWebSocketHandler;
|
|
36
|
+
terminalHandler: TerminalWebSocketHandler;
|
|
37
|
+
/** 0 = disabled (default; this is a local, single-user tool). */
|
|
38
|
+
rateLimitMax: number;
|
|
39
|
+
send: (ws: WebSocket, msg: WSServerMessage) => void;
|
|
40
|
+
sessionPayload: <T extends Record<string, unknown>>(payload: T) => T & {
|
|
41
|
+
sessionId: string;
|
|
42
|
+
};
|
|
43
|
+
handleMessage: (ws: WebSocket, client: ConnectedClient, msg: WSClientMessage) => Promise<void>;
|
|
44
|
+
abortControllers: Map<WebSocket, AbortController>;
|
|
45
|
+
pendingConfirms: Map<string, PendingConfirm>;
|
|
46
|
+
buildSessionStartPayload: (overrides?: Record<string, unknown>, needsSetup?: boolean) => Promise<Record<string, unknown>>;
|
|
47
|
+
/**
|
|
48
|
+
* Load the visible chat transcript for a reconnecting browser tab. This
|
|
49
|
+
* should read the session log when available; `context.messages` is only a
|
|
50
|
+
* fallback because it is the model working set and can be compacted.
|
|
51
|
+
*/
|
|
52
|
+
loadReplay?: (() => Promise<{
|
|
53
|
+
messages: Message[];
|
|
54
|
+
usage?: Usage | undefined;
|
|
55
|
+
} | null>) | undefined;
|
|
56
|
+
needsSetup: boolean;
|
|
57
|
+
}
|
|
58
|
+
export declare function createConnectionHandler(deps: ConnectionHandlerDeps): (ws: WebSocket, req: IncomingMessage) => Promise<void>;
|
|
59
|
+
//# sourceMappingURL=connection-handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection-handler.d.ts","sourceRoot":"","sources":["../../src/webui-server/connection-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EACV,yBAAyB,EACzB,wBAAwB,EACxB,yBAAyB,EACzB,qBAAqB,EACrB,wBAAwB,EACxB,wBAAwB,EACzB,MAAM,0BAA0B,CAAC;AAElC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,EAA6B,KAAK,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxF,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE3E,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,SAAS,CAAC;IACd,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAYD,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,OAAO,EAAE,GAAG,CAAC,SAAS,EAAE,eAAe,CAAC,CAAC;IACzC,gBAAgB,EAAE,MAAM,MAAM,CAAC;IAC/B,gBAAgB,EAAE,yBAAyB,CAAC;IAC5C,YAAY,EAAE,qBAAqB,CAAC;IACpC,eAAe,EAAE,wBAAwB,CAAC;IAC1C,gBAAgB,EAAE,yBAAyB,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2
|
+
text?: string | undefined;
|
|
3
|
+
}
|
|
4
|
+
interface ToolLike {
|
|
5
|
+
name: string;
|
|
6
|
+
inputSchema?: unknown;
|
|
7
|
+
description?: string;
|
|
8
|
+
}
|
|
9
|
+
interface MessageLike {
|
|
10
|
+
role: string;
|
|
11
|
+
content: unknown;
|
|
12
|
+
}
|
|
13
|
+
export type { PromptBlock, ToolLike, MessageLike };
|
|
14
|
+
/**
|
|
15
|
+
* Compute the per-section token breakdown for a session.
|
|
16
|
+
*
|
|
17
|
+
* The shape is preserved exactly as the pre-refactor inline
|
|
18
|
+
* code produced it: `total` is the sum across sections;
|
|
19
|
+
* `systemPrompt` is its own total (no breakdown — the
|
|
20
|
+
* system prompt is opaque); `tools` carries the count and
|
|
21
|
+
* a per-tool token count; `messages` carries the count, the
|
|
22
|
+
* total, and a per-message `{ index, role, tokens, preview }`
|
|
23
|
+
* row.
|
|
24
|
+
*
|
|
25
|
+
* Empty inputs are valid: the totals come out to 0 and the
|
|
26
|
+
* `breakdown` arrays are empty. The pre-refactor code
|
|
27
|
+
* handled this implicitly (the `.reduce` over an empty
|
|
28
|
+
* array returns 0); the extracted helper pins that
|
|
29
|
+
* behavior with explicit tests.
|
|
30
|
+
*/
|
|
31
|
+
export declare function estimateContextBreakdown(input: {
|
|
32
|
+
systemPrompt: ReadonlyArray<PromptBlock>;
|
|
33
|
+
tools: ReadonlyArray<ToolLike>;
|
|
34
|
+
messages: ReadonlyArray<MessageLike>;
|
|
35
|
+
}): {
|
|
36
|
+
total: number;
|
|
37
|
+
systemPrompt: number;
|
|
38
|
+
tools: {
|
|
39
|
+
total: number;
|
|
40
|
+
count: number;
|
|
41
|
+
breakdown: Array<{
|
|
42
|
+
name: string;
|
|
43
|
+
tokens: number;
|
|
44
|
+
}>;
|
|
45
|
+
};
|
|
46
|
+
messages: {
|
|
47
|
+
total: number;
|
|
48
|
+
count: number;
|
|
49
|
+
breakdown: Array<{
|
|
50
|
+
index: number;
|
|
51
|
+
role: string;
|
|
52
|
+
tokens: number;
|
|
53
|
+
preview: string;
|
|
54
|
+
}>;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=context-breakdown.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-breakdown.d.ts","sourceRoot":"","sources":["../../src/webui-server/context-breakdown.ts"],"names":[],"mappings":"AA6CA,UAAU,WAAW;IACnB,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3B;AAED,UAAU,QAAQ;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,UAAU,WAAW;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;CAClB;AAQD,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC;AAEnD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE;IAC9C,YAAY,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;IACzC,KAAK,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;IAC/B,QAAQ,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;CACtC,GAAG;IACF,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,KAAK,CAAC;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;KAAE,CAAC;IAC5F,QAAQ,EAAE;QACR,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,SAAS,EAAE,KAAK,CAAC;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAC;YAAC,OAAO,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;KACpF,CAAC;CACH,CAyBA"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/** Per-1,000,000-token pricing, normalized to numbers (0 when unpriced). */
|
|
2
|
+
export interface CostRates {
|
|
3
|
+
input: number;
|
|
4
|
+
output: number;
|
|
5
|
+
cacheRead: number;
|
|
6
|
+
}
|
|
7
|
+
/** Token counts for a turn/session. */
|
|
8
|
+
export interface TokenUsage {
|
|
9
|
+
input: number;
|
|
10
|
+
output: number;
|
|
11
|
+
cacheRead?: number | undefined;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Extract per-million-token pricing from a model record. Returns
|
|
15
|
+
* zeros when the model is null/undefined, has no `cost` field, or
|
|
16
|
+
* is missing individual rate fields. The `cache_read` snake_case
|
|
17
|
+
* is preserved as-is from the upstream schema — renaming to
|
|
18
|
+
* `cacheRead` happens at the boundary.
|
|
19
|
+
*/
|
|
20
|
+
export declare function getCostRates(model: unknown): CostRates;
|
|
21
|
+
/**
|
|
22
|
+
* Compute the per-turn cost in USD for the given token usage
|
|
23
|
+
* and per-million rates. The cache-read branch is optional:
|
|
24
|
+
* when `usage.cacheRead` is undefined it contributes 0 to the
|
|
25
|
+
* total. The final value is the per-million-scaled sum, not
|
|
26
|
+
* the per-token cost.
|
|
27
|
+
*/
|
|
28
|
+
export declare function computeUsageCost(usage: TokenUsage, rates: CostRates): number;
|
|
29
|
+
//# sourceMappingURL=cost-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cost-helpers.d.ts","sourceRoot":"","sources":["../../src/webui-server/cost-helpers.ts"],"names":[],"mappings":"AA8CA,4EAA4E;AAC5E,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,uCAAuC;AACvC,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAChC;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,SAAS,CAkBtD;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,GAAG,MAAM,CAO5E"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { type WebUIInstanceRecord } from '@wrongstack/webui/server';
|
|
2
|
+
/**
|
|
3
|
+
* PR 7 of Issue #30 (webui-server 8-PR refactor): process lifecycle.
|
|
4
|
+
*
|
|
5
|
+
* Three concerns pulled out of the ~3000-line `runWebUI` body:
|
|
6
|
+
*
|
|
7
|
+
* - `registerWebuiInstance` — record this embedded WebUI in the shared
|
|
8
|
+
* running-instance registry (so `wstackui --list` sees it).
|
|
9
|
+
* - `announceWebuiReady` — log the ready banner and pop the browser
|
|
10
|
+
* once the HTTP server is listening.
|
|
11
|
+
* - `createWebuiShutdown` + `registerWebuiSignalHandlers` — the
|
|
12
|
+
* SIGINT/SIGTERM teardown sequence.
|
|
13
|
+
*
|
|
14
|
+
* Each external dependency (registry IO, browser launch) is an
|
|
15
|
+
* injectable seam so the orchestration can be unit-tested without
|
|
16
|
+
* touching disk or spawning a browser. Run-loop state (abort
|
|
17
|
+
* controllers, client map, the run promise's `resolve`) stays in
|
|
18
|
+
* `webui-server.ts` and is threaded in as callbacks — the module never
|
|
19
|
+
* captures it.
|
|
20
|
+
*/
|
|
21
|
+
export interface RegisterWebuiInstanceParams {
|
|
22
|
+
pid: number;
|
|
23
|
+
host: string;
|
|
24
|
+
httpPort: number;
|
|
25
|
+
wsPort: number;
|
|
26
|
+
/** Browser-facing public URL when served through a tunnel/proxy. */
|
|
27
|
+
publicUrl?: string | undefined;
|
|
28
|
+
projectRoot: string;
|
|
29
|
+
/** ISO timestamp when the instance registered. */
|
|
30
|
+
startedAt: string;
|
|
31
|
+
/** Registry base dir (dirname of globalConfigPath); undefined ⇒ registry default. */
|
|
32
|
+
registryBaseDir: string | undefined;
|
|
33
|
+
}
|
|
34
|
+
export interface RegisterWebuiInstanceDeps {
|
|
35
|
+
registerFn?: (record: WebUIInstanceRecord, baseDir?: string) => Promise<void>;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Fire-and-forget registration of this WebUI in the running-instance
|
|
39
|
+
* registry. Best-effort: a registry write error never blocks startup and
|
|
40
|
+
* is swallowed (the registry is a convenience index, not a source of
|
|
41
|
+
* truth). Caller guards on `projectRoot` being known.
|
|
42
|
+
*/
|
|
43
|
+
export declare function registerWebuiInstance(p: RegisterWebuiInstanceParams, deps?: RegisterWebuiInstanceDeps): void;
|
|
44
|
+
export interface AnnounceWebuiReadyParams {
|
|
45
|
+
/** The HTTP server (StaticServeHandle.server). */
|
|
46
|
+
server: {
|
|
47
|
+
on: (event: 'listening', cb: () => void) => void;
|
|
48
|
+
};
|
|
49
|
+
host: string;
|
|
50
|
+
httpPort: number;
|
|
51
|
+
wsPort: number;
|
|
52
|
+
open: boolean;
|
|
53
|
+
/** Auth token for WS connections. Included in the URL so the frontend can exchange it for an HttpOnly cookie via /ws-auth. */
|
|
54
|
+
wsToken?: string;
|
|
55
|
+
/** Browser-facing public URL when served through a tunnel/proxy. */
|
|
56
|
+
publicUrl?: string | undefined;
|
|
57
|
+
log?: (msg: string) => void;
|
|
58
|
+
openBrowserFn?: (url: string) => void;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Once the HTTP server is listening, print the ready banner and (if
|
|
62
|
+
* `open`) launch the browser at the served URL.
|
|
63
|
+
*/
|
|
64
|
+
export declare function announceWebuiReady(p: AnnounceWebuiReadyParams): void;
|
|
65
|
+
export interface WebuiShutdownResources {
|
|
66
|
+
/** Abort every in-flight run (legacy single slot + per-socket controllers) and clear them. */
|
|
67
|
+
abortInFlight: () => void;
|
|
68
|
+
/** Run and drop every event-bus unsubscriber. */
|
|
69
|
+
unsubscribeEvents: () => void;
|
|
70
|
+
/** Close every connected socket and clear the client map. */
|
|
71
|
+
closeClients: () => void;
|
|
72
|
+
/** Close the static HTTP server (no-op when WS-only). */
|
|
73
|
+
closeHttpServer: () => void;
|
|
74
|
+
/** The WebSocket server to stop (its close callback resolves the run promise). */
|
|
75
|
+
wss: {
|
|
76
|
+
close: (cb?: () => void) => void;
|
|
77
|
+
};
|
|
78
|
+
/** This process's pid — the registry liveness key. */
|
|
79
|
+
pid: number;
|
|
80
|
+
/** Registry base dir (undefined ⇒ registry default). */
|
|
81
|
+
registryBaseDir: string | undefined;
|
|
82
|
+
/** Called once teardown settles — wired to the run promise's `resolve`. */
|
|
83
|
+
onStopped: () => void;
|
|
84
|
+
log?: (msg: string) => void;
|
|
85
|
+
debug?: (msg: string) => void;
|
|
86
|
+
/** Injectable for tests; defaults to the real registry unregister. */
|
|
87
|
+
unregisterFn?: (pid: number, baseDir?: string) => Promise<void>;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Build the SIGINT/SIGTERM teardown handler. The returned function is
|
|
91
|
+
* idempotent: the first call runs the teardown, later calls (e.g. a
|
|
92
|
+
* second Ctrl+C, or a signal after another server in the same process
|
|
93
|
+
* already stopped) return immediately.
|
|
94
|
+
*
|
|
95
|
+
* Order matches the original inline handler: abort runs → unsubscribe
|
|
96
|
+
* events → close clients → unregister from the instance registry (async,
|
|
97
|
+
* awaited inside the wss.close callback) → close HTTP → close WS → on
|
|
98
|
+
* close, once the unregister settles, `onStopped()`.
|
|
99
|
+
*/
|
|
100
|
+
export declare function createWebuiShutdown(res: WebuiShutdownResources): () => void;
|
|
101
|
+
/**
|
|
102
|
+
* Register `shutdown` on SIGINT and SIGTERM. The wrapper self-detaches
|
|
103
|
+
* both listeners on first fire (so a server that has already shut down
|
|
104
|
+
* can't re-trigger teardown). Returns an unregister function for tests
|
|
105
|
+
* and clean restarts.
|
|
106
|
+
*/
|
|
107
|
+
export declare function registerWebuiSignalHandlers(shutdown: () => void): () => void;
|
|
108
|
+
//# sourceMappingURL=lifecycle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../src/webui-server/lifecycle.ts"],"names":[],"mappings":"AACA,OAAO,EAKL,KAAK,mBAAmB,EACzB,MAAM,0BAA0B,CAAC;AAElC;;;;;;;;;;;;;;;;;;GAkBG;AAIH,MAAM,WAAW,2BAA2B;IAC1C,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,oEAAoE;IACpE,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,kDAAkD;IAClD,SAAS,EAAE,MAAM,CAAC;IAClB,qFAAqF;IACrF,eAAe,EAAE,MAAM,GAAG,SAAS,CAAC;CACrC;AAED,MAAM,WAAW,yBAAyB;IACxC,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/E;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,CAAC,EAAE,2BAA2B,EAC9B,IAAI,GAAE,yBAA8B,GACnC,IAAI,CAmBN;AAID,MAAM,WAAW,wBAAwB;IACvC,kDAAkD;IAClD,MAAM,EAAE;QAAE,EAAE,EAAE,CAAC,KAAK,EAAE,WAAW,EAAE,EAAE,EAAE,MAAM,IAAI,KAAK,IAAI,CAAA;KAAE,CAAC;IAC7D,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EA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;GAKG;AACH,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAY5E"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Logger } from '@wrongstack/core';
|
|
2
|
+
/**
|
|
3
|
+
* Console-backed `Logger` adapter for the CLI. Routes each
|
|
4
|
+
* level to the matching `console.*` method and wraps the
|
|
5
|
+
* message in a structured JSON line. The `child()` method
|
|
6
|
+
* returns the same logger — the CLI shim does not maintain
|
|
7
|
+
* a binding chain.
|
|
8
|
+
*/
|
|
9
|
+
export declare const consoleLogger: Logger;
|
|
10
|
+
//# sourceMappingURL=logger-shim.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger-shim.d.ts","sourceRoot":"","sources":["../../src/webui-server/logger-shim.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAiB/C;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,EAAE,MAoB3B,CAAC"}
|