@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
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ wstack --tui # Ink-based TUI
|
|
|
20
20
|
wstack desktop # Electron desktop app (same as --desktop)
|
|
21
21
|
wstack webui # project WebUI (same as --webui)
|
|
22
22
|
wstack hq # project-independent HQ dashboard (same as --hq)
|
|
23
|
-
wstack --yolo # auto-approve
|
|
23
|
+
wstack --yolo # auto-approve tool calls unless explicitly denied
|
|
24
24
|
wstack "refactor src/auth.ts" # one-shot query (no interactive loop)
|
|
25
25
|
|
|
26
26
|
wstack --provider <id> --model <id> # skip the picker
|
|
@@ -101,9 +101,9 @@ API keys are encrypted at rest with AES-256-GCM and the key file at `~/.wrongsta
|
|
|
101
101
|
| `--desktop` | Open WrongStack Desktop (also `wstack desktop`) |
|
|
102
102
|
| `--webui` | Serve the project WebUI (also `wstack webui`) |
|
|
103
103
|
| `--hq` | Start the project-independent HQ dashboard (also `wstack hq`) |
|
|
104
|
-
| `--yolo` | Auto-approve
|
|
105
|
-
| `--confirm-destructive` | Deprecated;
|
|
106
|
-
| `--yolo-destructive` | Deprecated compatibility flag;
|
|
104
|
+
| `--yolo` | Auto-approve tool calls unless explicitly denied |
|
|
105
|
+
| `--confirm-destructive` | Deprecated compatibility flag; YOLO no longer prompts by destructiveness |
|
|
106
|
+
| `--yolo-destructive` | Deprecated compatibility flag; YOLO no longer prompts by destructiveness |
|
|
107
107
|
| `--force-all-yolo` | Deprecated alias for `--yolo-destructive` |
|
|
108
108
|
| `--provider <id>` | Override the configured provider |
|
|
109
109
|
| `--model <id>` | Override the configured model |
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Local cache for the official ACP registry snapshot.
|
|
3
|
+
*
|
|
4
|
+
* `wstack acp sync` / `/acp sync` call `refreshAcpRegistry`, which fetches the
|
|
5
|
+
* CDN snapshot (via `@wrongstack/acp`'s `fetchAcpRegistry`) and writes it to
|
|
6
|
+
* `~/.wrongstack/cache/acp-registry.json`. `loadCachedAcpRegistry` reads it
|
|
7
|
+
* back into the `AcpLiveCatalog` shape the resolver consumes. No network at
|
|
8
|
+
* load time; resolution falls back to the bundled static catalog when no
|
|
9
|
+
* cache exists.
|
|
10
|
+
*/
|
|
11
|
+
import { type ACPAgentDescriptor, type AcpLiveCatalog } from '@wrongstack/acp';
|
|
12
|
+
import type { WstackPaths } from '@wrongstack/core';
|
|
13
|
+
export interface LoadedAcpRegistry {
|
|
14
|
+
fetchedAt: string;
|
|
15
|
+
/** Resolver input: registry-id → spawn command. */
|
|
16
|
+
byId: AcpLiveCatalog;
|
|
17
|
+
/** Full descriptors, for listing. */
|
|
18
|
+
agents: ACPAgentDescriptor[];
|
|
19
|
+
}
|
|
20
|
+
/** Where the synced registry snapshot lives. */
|
|
21
|
+
export declare function acpRegistryCachePath(paths: WstackPaths): string;
|
|
22
|
+
/** Read the cached registry, or `null` if it's missing or unreadable. */
|
|
23
|
+
export declare function loadCachedAcpRegistry(paths: WstackPaths): Promise<LoadedAcpRegistry | null>;
|
|
24
|
+
/** Fetch the live registry and persist it. Throws on network/parse failure. */
|
|
25
|
+
export declare function refreshAcpRegistry(paths: WstackPaths, opts?: {
|
|
26
|
+
signal?: AbortSignal;
|
|
27
|
+
timeoutMs?: number;
|
|
28
|
+
}): Promise<{
|
|
29
|
+
count: number;
|
|
30
|
+
location: string;
|
|
31
|
+
fetchedAt: string;
|
|
32
|
+
}>;
|
|
33
|
+
//# sourceMappingURL=acp-registry-cache.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acp-registry-cache.d.ts","sourceRoot":"","sources":["../src/acp-registry-cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,cAAc,EAEpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AASpD,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,mDAAmD;IACnD,IAAI,EAAE,cAAc,CAAC;IACrB,qCAAqC;IACrC,MAAM,EAAE,kBAAkB,EAAE,CAAC;CAC9B;AAED,gDAAgD;AAChD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAE/D;AAED,yEAAyE;AACzE,wBAAsB,qBAAqB,CACzC,KAAK,EAAE,WAAW,GACjB,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAkBnC;AAED,+EAA+E;AAC/E,wBAAsB,kBAAkB,CACtC,KAAK,EAAE,WAAW,EAClB,IAAI,CAAC,EAAE;IAAE,MAAM,CAAC,EAAE,WAAW,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GAClD,OAAO,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,CAUjE"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ACP server → real WrongStack Agent wiring.
|
|
3
|
+
*
|
|
4
|
+
* `wstack acp` exposes WrongStack as an ACP v1 agent so any ACP-capable
|
|
5
|
+
* client (Zed, JetBrains, VS Code ACP extension, etc.) can drive it. The
|
|
6
|
+
* server-side `runTurn` adapter (`makeACPServerAgentTurn` in `@wrongstack/acp`)
|
|
7
|
+
* needs a factory that produces a fresh, isolated `Agent` per session — this
|
|
8
|
+
* module is that factory, reusing the same boot pieces the interactive CLI
|
|
9
|
+
* uses (`setupProvider`, `createDefaultContainer`, builtin tools).
|
|
10
|
+
*
|
|
11
|
+
* Scope: a minimal but real agent. It deliberately does NOT wire MCP servers,
|
|
12
|
+
* compaction middleware, model-runtime overlays, or lifecycle hooks — those
|
|
13
|
+
* belong in the interactive host. The ACP server is a headless single-turn
|
|
14
|
+
* surface; a future PR can layer richer session behaviour if needed.
|
|
15
|
+
*/
|
|
16
|
+
import { Agent, type Logger, type PermissionDecision, type PermissionPolicy, type Tool } from '@wrongstack/core';
|
|
17
|
+
import type { RunTurnApi } from '@wrongstack/acp/agent';
|
|
18
|
+
import type { SubcommandDeps } from './subcommands/index.js';
|
|
19
|
+
/**
|
|
20
|
+
* Error thrown when the server cannot start because no model provider is
|
|
21
|
+
* configured. The CLI handler catches this and prints a actionable message
|
|
22
|
+
* (`wstack auth`) rather than a stack trace.
|
|
23
|
+
*/
|
|
24
|
+
export declare class AcpServerConfigError extends Error {
|
|
25
|
+
constructor(message: string);
|
|
26
|
+
}
|
|
27
|
+
export interface AcpAgentFactoryOptions {
|
|
28
|
+
/** Caller-supplied logger; a minimal stderr logger is created when omitted. */
|
|
29
|
+
logger?: Logger | undefined;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Permission policy that routes side-effecting tool calls to the connected
|
|
33
|
+
* ACP client via `session/request_permission` (the v1-correct behavior),
|
|
34
|
+
* while auto-approving read-only/safe tools. This replaces the blanket
|
|
35
|
+
* auto-approve so an editor driving WrongStack-as-agent gets a real
|
|
36
|
+
* permission prompt before file writes / shell commands run.
|
|
37
|
+
*
|
|
38
|
+
* Exported for direct regression testing of the malformed-response path —
|
|
39
|
+
* `acp-server-agent.test.ts` injects a response whose `optionId` is missing
|
|
40
|
+
* (which previously threw a TypeError at `outcome.optionId.startsWith(...)`
|
|
41
|
+
* and was misattributed to "no permission channel" by the surrounding
|
|
42
|
+
* try/catch). Production callers go through `buildAcpServerAgentFactory`,
|
|
43
|
+
* which constructs this internally when the client exposes a permission
|
|
44
|
+
* channel.
|
|
45
|
+
*/
|
|
46
|
+
export declare class ACPClientPermissionPolicy implements PermissionPolicy {
|
|
47
|
+
private readonly requestPermission;
|
|
48
|
+
constructor(requestPermission: RunTurnApi['requestPermission']);
|
|
49
|
+
evaluate(tool: Tool, input: unknown): Promise<PermissionDecision>;
|
|
50
|
+
trust(): Promise<void>;
|
|
51
|
+
deny(): Promise<void>;
|
|
52
|
+
denyOnce(): void;
|
|
53
|
+
allowOnce(): void;
|
|
54
|
+
reload(): Promise<void>;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Build a per-session `Agent` factory suitable for `makeACPServerAgentTurn`.
|
|
58
|
+
*
|
|
59
|
+
* The provider registry + container are built once (they're stateless across
|
|
60
|
+
* sessions); each `agentFor(sessionId, cwd)` call builds a fresh `EventBus`,
|
|
61
|
+
* `Context`, and `Agent` so sessions stay isolated per the v1 spec.
|
|
62
|
+
*
|
|
63
|
+
* Throws `AcpServerConfigError` up front if no provider is configured.
|
|
64
|
+
*/
|
|
65
|
+
export declare function buildAcpServerAgentFactory(deps: SubcommandDeps, options?: AcpAgentFactoryOptions): (sessionId: string, cwd: string, api?: RunTurnApi) => Promise<Agent>;
|
|
66
|
+
//# sourceMappingURL=acp-server-agent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acp-server-agent.d.ts","sourceRoot":"","sources":["../src/acp-server-agent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EACL,KAAK,EAML,KAAK,MAAM,EACX,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EAErB,KAAK,IAAI,EAKV,MAAM,kBAAkB,CAAC;AAG1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAG7D;;;;GAIG;AACH,qBAAa,oBAAqB,SAAQ,KAAK;IAC7C,YAAY,OAAO,EAAE,MAAM,EAG1B;CACF;AAED,MAAM,WAAW,sBAAsB;IACrC,+EAA+E;IAC/E,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B;AASD;;;;;;;;;;;;;;GAcG;AACH,qBAAa,yBAA0B,YAAW,gBAAgB;IACpD,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAA9C,YAA6B,iBAAiB,EAAE,UAAU,CAAC,mBAAmB,CAAC,EAAI;IAE7E,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,kBAAkB,CAAC,CA6BtE;IAEK,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAG;IACzB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAG;IAC9B,QAAQ,IAAI,IAAI,CAAG;IACnB,SAAS,IAAI,IAAI,CAAG;IACd,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAAG;CACjC;AAmID;;;;;;;;GAQG;AACH,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,cAAc,EACpB,OAAO,GAAE,sBAA2B,GACnC,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,UAAU,KAAK,OAAO,CAAC,KAAK,CAAC,CAmHtE"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unified CLI argument parsing. Three parsers that were previously
|
|
3
|
+
* spread across index.ts, subcommands/index.ts, and slash-commands/index.ts.
|
|
4
|
+
*/
|
|
5
|
+
/** Flags that are boolean-only (no value expected after them). */
|
|
6
|
+
export declare const BOOLEAN_FLAGS: Set<string>;
|
|
7
|
+
export interface ParsedArgs {
|
|
8
|
+
flags: Record<string, string | boolean>;
|
|
9
|
+
positional: string[];
|
|
10
|
+
}
|
|
11
|
+
/** Parse top-level `wstack` CLI args. */
|
|
12
|
+
export declare function parseArgs(argv: string[]): ParsedArgs;
|
|
13
|
+
export interface AuthFlags {
|
|
14
|
+
positional: string[];
|
|
15
|
+
label?: string | undefined;
|
|
16
|
+
family?: import('@wrongstack/core').WireFamily | undefined;
|
|
17
|
+
baseUrl?: string | undefined;
|
|
18
|
+
envVars?: string[] | undefined;
|
|
19
|
+
}
|
|
20
|
+
/** Parse `wstack auth <provider> [--label ...] [--family ...] [...]` flags. */
|
|
21
|
+
export declare function parseAuthFlags(args: string[]): AuthFlags;
|
|
22
|
+
export interface SpawnFlags {
|
|
23
|
+
description: string;
|
|
24
|
+
opts: {
|
|
25
|
+
provider?: string | undefined;
|
|
26
|
+
model?: string | undefined;
|
|
27
|
+
tools?: string[] | undefined;
|
|
28
|
+
name?: string | undefined;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Parse `/spawn` flags from the args head. Supported:
|
|
33
|
+
* --provider=<id> / -p <id> override the subagent's provider id
|
|
34
|
+
* --model=<id> / -m <id> override the subagent's model
|
|
35
|
+
* --name=<label> / -n <label> display name
|
|
36
|
+
* --tools=a,b,c restrict the subagent's tool slice
|
|
37
|
+
*
|
|
38
|
+
* Anything after the last flag is the task description.
|
|
39
|
+
*/
|
|
40
|
+
export declare function parseSpawnFlags(input: string): SpawnFlags;
|
|
41
|
+
//# sourceMappingURL=arg-parser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arg-parser.d.ts","sourceRoot":"","sources":["../src/arg-parser.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,kEAAkE;AAClE,eAAO,MAAM,aAAa,aAwCxB,CAAC;AAIH,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC;IACxC,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,yCAAyC;AACzC,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,UAAU,CAoCpD;AA6BD,MAAM,WAAW,SAAS;IACxB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,MAAM,CAAC,EAAE,OAAO,kBAAkB,EAAE,UAAU,GAAG,SAAS,CAAC;IAC3D,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;CAChC;AAED,+EAA+E;AAC/E,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,SAAS,CAyBxD;AAID,MAAM,WAAW,UAAU;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE;QACJ,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAC9B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAC3B,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;QAC7B,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;KAC3B,CAAC;CACH;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,CA8CzD"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ProviderConfig, ResolvedProvider } from '@wrongstack/core';
|
|
2
|
+
import type { AuthMenuDeps } from './types.js';
|
|
3
|
+
export declare function addFromCatalog(deps: AuthMenuDeps): Promise<boolean>;
|
|
4
|
+
/**
|
|
5
|
+
* Prompt for family/baseUrl/alias overrides, then add a key.
|
|
6
|
+
* Returns true if a key was added.
|
|
7
|
+
*
|
|
8
|
+
* Exported for the TUI auth panel: the panel does its own catalog
|
|
9
|
+
* selection (searchable list) and then drives this flow through the
|
|
10
|
+
* prompt bridge for the override/label/key questions.
|
|
11
|
+
*/
|
|
12
|
+
export declare function addKeyForCatalogProvider(deps: AuthMenuDeps, chosen: ResolvedProvider): Promise<boolean>;
|
|
13
|
+
export declare function addCustomProvider(deps: AuthMenuDeps): Promise<boolean>;
|
|
14
|
+
export declare function addKeyForProvider(providerId: string, deps: AuthMenuDeps, template: Partial<ProviderConfig>): Promise<boolean>;
|
|
15
|
+
//# sourceMappingURL=add-provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-provider.d.ts","sourceRoot":"","sources":["../../src/auth-menu/add-provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAc,MAAM,kBAAkB,CAAC;AAerF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAM/C,wBAAsB,cAAc,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC,CAwCzE;AAED;;;;;;;GAOG;AACH,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,YAAY,EAClB,MAAM,EAAE,gBAAgB,GACvB,OAAO,CAAC,OAAO,CAAC,CA0ElB;AAMD,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC,CAmE5E;AAsCD,wBAAsB,iBAAiB,CACrC,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,YAAY,EAClB,QAAQ,EAAE,OAAO,CAAC,cAAc,CAAC,GAChC,OAAO,CAAC,OAAO,CAAC,CAuClB"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Anthropic "Sign in with Claude" OAuth (Authorization Code + PKCE) — Claude
|
|
3
|
+
* Pro/Max subscription login. Parallel to the Codex flow but with Anthropic's
|
|
4
|
+
* endpoints and quirks:
|
|
5
|
+
* - authorize at claude.ai/oauth/authorize (params include `code=true`),
|
|
6
|
+
* - the OAuth `state` is the PKCE verifier (Anthropic's convention),
|
|
7
|
+
* - JSON (not form) token exchange at platform.claude.com/v1/oauth/token,
|
|
8
|
+
* - loopback callback on http://localhost:53692/callback.
|
|
9
|
+
*
|
|
10
|
+
* Stored under the canonical `anthropic-oauth` provider (family `anthropic-oauth`)
|
|
11
|
+
* so it never clobbers an API-key `anthropic` provider. The provider adapter
|
|
12
|
+
* adds the Bearer + beta headers and the required Claude Code system block.
|
|
13
|
+
*/
|
|
14
|
+
import type { AuthMenuDeps } from './types.js';
|
|
15
|
+
export declare const CLAUDE_PROVIDER_ID = "anthropic-oauth";
|
|
16
|
+
export interface ClaudeTokens {
|
|
17
|
+
access: string;
|
|
18
|
+
refresh: string;
|
|
19
|
+
expires: number;
|
|
20
|
+
}
|
|
21
|
+
export declare function generatePkce(): {
|
|
22
|
+
verifier: string;
|
|
23
|
+
challenge: string;
|
|
24
|
+
};
|
|
25
|
+
/** Build the Claude authorize URL. Anthropic uses the PKCE verifier as `state`. */
|
|
26
|
+
export declare function buildAuthorizeUrl(challenge: string, verifier: string): string;
|
|
27
|
+
export declare function parseAuthorizationInput(input: string): {
|
|
28
|
+
code?: string | undefined;
|
|
29
|
+
state?: string | undefined;
|
|
30
|
+
};
|
|
31
|
+
/** Exchange an authorization code (+ verifier, reused as state) for tokens. */
|
|
32
|
+
export declare function exchangeAuthorizationCode(code: string, state: string, verifier: string, signal?: AbortSignal): Promise<ClaudeTokens>;
|
|
33
|
+
export interface ClaudeLoginOptions {
|
|
34
|
+
providerId?: string;
|
|
35
|
+
/**
|
|
36
|
+
* External cancellation signal (e.g. the TUI auth panel's Esc). When
|
|
37
|
+
* provided, the flow does NOT install its own SIGINT handler — the
|
|
38
|
+
* caller owns cancellation.
|
|
39
|
+
*/
|
|
40
|
+
signal?: AbortSignal | undefined;
|
|
41
|
+
}
|
|
42
|
+
export declare function runClaudeOAuthLogin(deps: AuthMenuDeps, opts?: ClaudeLoginOptions): Promise<number>;
|
|
43
|
+
//# sourceMappingURL=anthropic-oauth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anthropic-oauth.d.ts","sourceRoot":"","sources":["../../src/auth-menu/anthropic-oauth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAYH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAW/C,eAAO,MAAM,kBAAkB,oBAAoB,CAAC;AAGpD,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AAQD,wBAAgB,YAAY,IAAI;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAItE;AAED,mFAAmF;AACnF,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAY7E;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG;IACtD,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B,CAwBA;AAkCD,+EAA+E;AAC/E,wBAAsB,yBAAyB,CAC7C,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,YAAY,CAAC,CAiBvB;AA0KD,MAAM,WAAW,kBAAkB;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,MAAM,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;CAClC;AAED,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,YAAY,EAClB,IAAI,GAAE,kBAAuB,GAC5B,OAAO,CAAC,MAAM,CAAC,CA8GjB"}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Structured audit logger for the `wstack auth local` lifecycle.
|
|
3
|
+
*
|
|
4
|
+
* Emits JSON-line events to an injectable sink (default: stdout).
|
|
5
|
+
* The event names mirror the WebUI's WS message types
|
|
6
|
+
* (`provider.clear_models` ↔ `auth.local.clear`,
|
|
7
|
+
* `provider.undo_clear` ↔ `auth.local.undo`) so a downstream
|
|
8
|
+
* tool that filters on one convention finds the corresponding
|
|
9
|
+
* events on the other surface.
|
|
10
|
+
*
|
|
11
|
+
* Why a dedicated logger (vs. `console.log`)?
|
|
12
|
+
* - **Test seam** — tests inject an in-memory array sink and
|
|
13
|
+
* assert on the recorded events. `console.log` can't be
|
|
14
|
+
* captured cleanly across the test runner / reporter.
|
|
15
|
+
* - **Schema stability** — the discriminated union of
|
|
16
|
+
* `AuthAuditEvent` types gives downstream consumers a
|
|
17
|
+
* contract they can switch on. Plain `console.log` strings
|
|
18
|
+
* drift on every commit.
|
|
19
|
+
* - **Redaction built in** — every event passes through a
|
|
20
|
+
* `SecretScrubber` before reaching the sink, so a Bearer
|
|
21
|
+
* token accidentally captured in a payload can't echo to
|
|
22
|
+
* stdout / the audit file in plaintext.
|
|
23
|
+
*
|
|
24
|
+
* The logger is intentionally minimal: no buffering, no
|
|
25
|
+
* rotation, no transport. The CLI process is short-lived and
|
|
26
|
+
* emits at most a handful of events per invocation. A
|
|
27
|
+
* long-running consumer (file rotation, OTLP export) would
|
|
28
|
+
* belong in a dedicated audit-sink module, not here.
|
|
29
|
+
*/
|
|
30
|
+
import { type SecretScrubber } from '@wrongstack/core';
|
|
31
|
+
/**
|
|
32
|
+
* Discriminated union of every event the auth-menu local flow
|
|
33
|
+
* can emit. New events slot in here as the lifecycle grows —
|
|
34
|
+
* the `type` field is the stable contract.
|
|
35
|
+
*/
|
|
36
|
+
export type AuthAuditEvent = {
|
|
37
|
+
type: 'auth.local.add';
|
|
38
|
+
providerId: string;
|
|
39
|
+
baseUrl: string;
|
|
40
|
+
/** The resolved model list saved to disk. Empty when the
|
|
41
|
+
* user didn't pass `--model`. */
|
|
42
|
+
models: string[];
|
|
43
|
+
/** Label of the saved key entry, if any. */
|
|
44
|
+
keyLabel?: string | undefined;
|
|
45
|
+
} | {
|
|
46
|
+
/**
|
|
47
|
+
* Emitted when the save replaces a previously non-empty
|
|
48
|
+
* `cfg.models` allowlist with `[]`. Pairs with
|
|
49
|
+
* `auth.local.undo` — a search for both events in
|
|
50
|
+
* sequence surfaces a "user changed their mind" pair.
|
|
51
|
+
*/
|
|
52
|
+
type: 'auth.local.clear';
|
|
53
|
+
providerId: string;
|
|
54
|
+
baseUrl: string;
|
|
55
|
+
/** The list the user just removed. */
|
|
56
|
+
previousModels: string[];
|
|
57
|
+
} | {
|
|
58
|
+
/**
|
|
59
|
+
* Emitted when the save restores a non-empty `cfg.models`
|
|
60
|
+
* allowlist that was previously `[]` or absent. The
|
|
61
|
+
* `restoredModels` field carries the new list verbatim.
|
|
62
|
+
* Pairs with `auth.local.clear`.
|
|
63
|
+
*/
|
|
64
|
+
type: 'auth.local.undo';
|
|
65
|
+
providerId: string;
|
|
66
|
+
baseUrl: string;
|
|
67
|
+
/** The list the user just restored. */
|
|
68
|
+
restoredModels: string[];
|
|
69
|
+
} | {
|
|
70
|
+
/**
|
|
71
|
+
* Emitted when the `--model` flag was probe-driven
|
|
72
|
+
* (`'first'` / `'<N>'`) but the probe didn't return
|
|
73
|
+
* enough ids. The flag is silently ignored in that case
|
|
74
|
+
* — this event lets the audit log surface the silent
|
|
75
|
+
* skip.
|
|
76
|
+
*/
|
|
77
|
+
type: 'auth.local.probe_skip';
|
|
78
|
+
providerId: string;
|
|
79
|
+
baseUrl: string;
|
|
80
|
+
requestedShape: 'first' | string;
|
|
81
|
+
} | {
|
|
82
|
+
/**
|
|
83
|
+
* Emitted when the health probe failed AND the user chose
|
|
84
|
+
* to save anyway. Pairs with the probe result line in
|
|
85
|
+
* the terminal — the audit event is the durable record
|
|
86
|
+
* that the provider was saved in a known-bad state.
|
|
87
|
+
*/
|
|
88
|
+
type: 'auth.local.probe_failed_save';
|
|
89
|
+
providerId: string;
|
|
90
|
+
baseUrl: string;
|
|
91
|
+
probeStatus: string;
|
|
92
|
+
probeDetail?: string | undefined;
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* Sink contract: receives the post-scrub, post-stringify event
|
|
96
|
+
* line. The default implementation writes to stdout; tests
|
|
97
|
+
* inject an in-memory array.
|
|
98
|
+
*/
|
|
99
|
+
export interface AuthAuditSink {
|
|
100
|
+
write(line: string): void;
|
|
101
|
+
}
|
|
102
|
+
/** Default sink: one JSON line per event on stdout. */
|
|
103
|
+
export declare function defaultStdoutSink(): AuthAuditSink;
|
|
104
|
+
/** Stderr sink: one JSON line per event on stderr. */
|
|
105
|
+
export declare function defaultStderrSink(): AuthAuditSink;
|
|
106
|
+
/**
|
|
107
|
+
* File sink: appends one JSON line per event to the named
|
|
108
|
+
* path. Uses synchronous append + newline so events are
|
|
109
|
+
* durable on process exit. Wraps any I/O failure as a thrown
|
|
110
|
+
* error so the caller can surface it.
|
|
111
|
+
*/
|
|
112
|
+
export declare function fileAuditSink(path: string): AuthAuditSink;
|
|
113
|
+
/**
|
|
114
|
+
* Resolve the `--audit` flag value (parsed by `parseAuthFlags`)
|
|
115
|
+
* to a concrete `AuthAuditSink`. Returns `undefined` when the
|
|
116
|
+
* caller didn't pass `--audit` (no sink is wired and the
|
|
117
|
+
* audit log is silent).
|
|
118
|
+
*
|
|
119
|
+
* Resolution rules:
|
|
120
|
+
* - `true` (bare `--audit`) → stdout
|
|
121
|
+
* - `'stdout'` → stdout
|
|
122
|
+
* - `'stderr'` → stderr
|
|
123
|
+
* - `'<file-path>'` → append to the file
|
|
124
|
+
* - `undefined` → undefined (no sink)
|
|
125
|
+
*/
|
|
126
|
+
export declare function resolveAuditSink(flag: boolean | string | undefined): AuthAuditSink | undefined;
|
|
127
|
+
/** In-memory sink for tests. Records every line verbatim. */
|
|
128
|
+
export declare function memAuthAuditSink(): AuthAuditSink & {
|
|
129
|
+
lines: string[];
|
|
130
|
+
};
|
|
131
|
+
export interface AuthAuditLogger {
|
|
132
|
+
/** Emit an event. The payload is JSON-serialized, scrubbed,
|
|
133
|
+
* and written to the sink. No-ops when the sink is
|
|
134
|
+
* `undefined` (tests that don't care about the audit log
|
|
135
|
+
* can pass `audit: undefined`). */
|
|
136
|
+
emit(event: AuthAuditEvent): void;
|
|
137
|
+
}
|
|
138
|
+
/** No-op logger for tests that don't need the audit log. */
|
|
139
|
+
export declare const NOOP_AUDIT_LOGGER: AuthAuditLogger;
|
|
140
|
+
/**
|
|
141
|
+
* Build the canonical logger. The `scrubber` runs over the
|
|
142
|
+
* serialized event so a Bearer token accidentally included
|
|
143
|
+
* in a payload (e.g. an echo from a misbehaving server) is
|
|
144
|
+
* redacted before reaching the sink.
|
|
145
|
+
*/
|
|
146
|
+
export declare function createAuthAuditLogger(sink: AuthAuditSink | undefined, scrubber?: SecretScrubber): AuthAuditLogger;
|
|
147
|
+
/**
|
|
148
|
+
* Decide which audit event(s) to emit given the previous saved
|
|
149
|
+
* state and the new save's resolved values. Pure function —
|
|
150
|
+
* the caller is responsible for the actual `emit()` call so
|
|
151
|
+
* the same input always produces the same event list (and the
|
|
152
|
+
* test suite can pin it).
|
|
153
|
+
*
|
|
154
|
+
* - `previousModels` is `undefined` when no prior entry
|
|
155
|
+
* existed. `[]` means "the user previously cleared".
|
|
156
|
+
* - `newModels` is `null` when the `--model` flag wasn't
|
|
157
|
+
* passed (don't touch `cfg.models`). `[]` means "the user
|
|
158
|
+
* passed `--model ''` to clear". A non-empty list is the
|
|
159
|
+
* resolved list (probe-driven or literal).
|
|
160
|
+
*/
|
|
161
|
+
export declare function decideAuthLocalEvents(opts: {
|
|
162
|
+
providerId: string;
|
|
163
|
+
baseUrl: string;
|
|
164
|
+
previousModels: string[] | undefined;
|
|
165
|
+
newModels: string[] | null;
|
|
166
|
+
keyLabel: string | undefined;
|
|
167
|
+
probeSkip?: {
|
|
168
|
+
shape: 'first' | string;
|
|
169
|
+
} | undefined;
|
|
170
|
+
probeFailedSave?: {
|
|
171
|
+
status: string;
|
|
172
|
+
detail?: string;
|
|
173
|
+
} | undefined;
|
|
174
|
+
}): AuthAuditEvent[];
|
|
175
|
+
//# sourceMappingURL=auth-menu-audit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-menu-audit.d.ts","sourceRoot":"","sources":["../../src/auth-menu/auth-menu-audit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,OAAO,EAAE,KAAK,cAAc,EAAyB,MAAM,kBAAkB,CAAC;AAE9E;;;;GAIG;AACH,MAAM,MAAM,cAAc,GACtB;IACE,IAAI,EAAE,gBAAgB,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB;sCACkC;IAClC,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B,GACD;IACE;;;;;OAKG;IACH,IAAI,EAAE,kBAAkB,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,sCAAsC;IACtC,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B,GACD;IACE;;;;;OAKG;IACH,IAAI,EAAE,iBAAiB,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,uCAAuC;IACvC,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B,GACD;IACE;;;;;;OAMG;IACH,IAAI,EAAE,uBAAuB,CAAC;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,OAAO,GAAG,MAAM,CAAC;CAClC,GACD;IACE;;;;;OAKG;IACH,IAAI,EAAE,8BAA8B,CAAC;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC,CAAC;AAEN;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,uDAAuD;AACvD,wBAAgB,iBAAiB,IAAI,aAAa,CAUjD;AAED,sDAAsD;AACtD,wBAAgB,iBAAiB,IAAI,aAAa,CAMjD;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,CAWzD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,GACjC,aAAa,GAAG,SAAS,CAa3B;AAED,6DAA6D;AAC7D,wBAAgB,gBAAgB,IAAI,aAAa,GAAG;IAAE,KAAK,EAAE,MAAM,EAAE,CAAA;CAAE,CAQtE;AAED,MAAM,WAAW,eAAe;IAC9B;;;wCAGoC;IACpC,IAAI,CAAC,KAAK,EAAE,cAAc,GAAG,IAAI,CAAC;CACnC;AAED,4DAA4D;AAC5D,eAAO,MAAM,iBAAiB,EAAE,eAE/B,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,aAAa,GAAG,SAAS,EAC/B,QAAQ,GAAE,cAA4C,GACrD,eAAe,CAYjB;AA0DD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE;IAC1C,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IACrC,SAAS,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAC3B,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,SAAS,CAAC,EAAE;QAAE,KAAK,EAAE,OAAO,GAAG,MAAM,CAAA;KAAE,GAAG,SAAS,CAAC;IACpD,eAAe,CAAC,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,CAAC;CACnE,GAAG,cAAc,EAAE,CA4FnB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { WireFamily } from '@wrongstack/core';
|
|
2
|
+
import type { AuthMenuDeps } from './types.js';
|
|
3
|
+
/**
|
|
4
|
+
* One-shot add: used by `wstack auth <provider>` to skip the menu and
|
|
5
|
+
* append a single key. Honors --label / --family / --base-url / --env
|
|
6
|
+
* flags. If the label collides, we suffix with a counter.
|
|
7
|
+
*/
|
|
8
|
+
export declare function runAuthDirect(deps: AuthMenuDeps, opts: {
|
|
9
|
+
providerId: string;
|
|
10
|
+
label?: string | undefined;
|
|
11
|
+
family?: WireFamily | undefined;
|
|
12
|
+
baseUrl?: string | undefined;
|
|
13
|
+
envVars?: string[] | undefined;
|
|
14
|
+
}): Promise<number>;
|
|
15
|
+
//# sourceMappingURL=direct.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"direct.d.ts","sourceRoot":"","sources":["../../src/auth-menu/direct.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AASnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C;;;;GAIG;AACH,wBAAsB,aAAa,CACjC,IAAI,EAAE,YAAY,EAClB,IAAI,EAAE;IACJ,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,MAAM,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IAChC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;CAChC,GACA,OAAO,CAAC,MAAM,CAAC,CA2DjB"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitHub Copilot login — GitHub OAuth **device flow** (no loopback server).
|
|
3
|
+
*
|
|
4
|
+
* 1. POST github.com/login/device/code → user_code + verification_uri.
|
|
5
|
+
* 2. User opens the URL, enters the code; we poll login/oauth/access_token
|
|
6
|
+
* until GitHub returns a long-lived OAuth token.
|
|
7
|
+
* 3. Exchange that token at api.github.com/copilot_internal/v2/token for a
|
|
8
|
+
* short-lived Copilot token (the chat access token).
|
|
9
|
+
*
|
|
10
|
+
* Stored under the canonical `github-copilot` provider (family `github-copilot`,
|
|
11
|
+
* an OpenAI chat/completions-compatible wire). The GitHub OAuth token is the
|
|
12
|
+
* refresh token; the provider mints fresh Copilot tokens from it transparently.
|
|
13
|
+
*/
|
|
14
|
+
import type { AuthMenuDeps } from './types.js';
|
|
15
|
+
export declare const COPILOT_PROVIDER_ID = "github-copilot";
|
|
16
|
+
interface DeviceCode {
|
|
17
|
+
device_code: string;
|
|
18
|
+
user_code: string;
|
|
19
|
+
verification_uri: string;
|
|
20
|
+
interval: number;
|
|
21
|
+
expires_in: number;
|
|
22
|
+
}
|
|
23
|
+
/** Start the GitHub device flow. */
|
|
24
|
+
export declare function startDeviceFlow(signal?: AbortSignal): Promise<DeviceCode>;
|
|
25
|
+
/** Poll until the user authorizes; returns the GitHub OAuth token. */
|
|
26
|
+
export declare function pollForGitHubToken(device: DeviceCode, signal: AbortSignal): Promise<string>;
|
|
27
|
+
/** Shape of the fields we read from a `/models` entry (everything optional). */
|
|
28
|
+
interface CopilotModelEntry {
|
|
29
|
+
id?: unknown;
|
|
30
|
+
model_picker_enabled?: unknown;
|
|
31
|
+
is_chat_default?: unknown;
|
|
32
|
+
is_chat_fallback?: unknown;
|
|
33
|
+
vendor?: unknown;
|
|
34
|
+
supported_endpoints?: unknown;
|
|
35
|
+
policy?: {
|
|
36
|
+
state?: unknown;
|
|
37
|
+
} | undefined;
|
|
38
|
+
capabilities?: {
|
|
39
|
+
type?: unknown;
|
|
40
|
+
supports?: {
|
|
41
|
+
tool_calls?: unknown;
|
|
42
|
+
} | undefined;
|
|
43
|
+
} | undefined;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Decide whether a Copilot `/models` entry is a chat model we can actually
|
|
47
|
+
* drive over this provider's wire.
|
|
48
|
+
*
|
|
49
|
+
* The provider POSTs to `…/chat/completions`, so the discriminators are:
|
|
50
|
+
* - `capabilities.type === 'chat'` — drops embeddings and completion-only ids.
|
|
51
|
+
* - `capabilities.supports.tool_calls` — the agent loop needs tool calling.
|
|
52
|
+
* - `supported_endpoints` (when present) must include `/chat/completions`.
|
|
53
|
+
* This is the key fix: `/responses`-only ids (the `*-picker` router models,
|
|
54
|
+
* `gpt-5.4-mini-free-auto`, `mai-code-1-flash*`) advertise themselves in the
|
|
55
|
+
* model picker but 400 on `/chat/completions`. Absent field ⇒ legacy chat
|
|
56
|
+
* model (gpt-4o, gpt-4.1) ⇒ allowed.
|
|
57
|
+
* - `policy.state !== 'disabled'` — disabled means the user hasn't enabled the
|
|
58
|
+
* model in their GitHub Copilot settings; calling it would 403.
|
|
59
|
+
* - `vendor !== 'Experimental'` — drops internal previews (trajectory-compaction).
|
|
60
|
+
*/
|
|
61
|
+
export declare function isUsableCopilotChatModel(item: CopilotModelEntry): boolean;
|
|
62
|
+
export interface CopilotLoginOptions {
|
|
63
|
+
providerId?: string;
|
|
64
|
+
/**
|
|
65
|
+
* External cancellation signal (e.g. the TUI auth panel's Esc). When
|
|
66
|
+
* provided, the flow does NOT install its own SIGINT handler — the
|
|
67
|
+
* caller owns cancellation.
|
|
68
|
+
*/
|
|
69
|
+
signal?: AbortSignal | undefined;
|
|
70
|
+
}
|
|
71
|
+
export declare function runCopilotOAuthLogin(deps: AuthMenuDeps, opts?: CopilotLoginOptions): Promise<number>;
|
|
72
|
+
export {};
|
|
73
|
+
//# sourceMappingURL=github-copilot-oauth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github-copilot-oauth.d.ts","sourceRoot":"","sources":["../../src/auth-menu/github-copilot-oauth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAWH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAY/C,eAAO,MAAM,mBAAmB,mBAAmB,CAAC;AAEpD,UAAU,UAAU;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;CACpB;AAkCD,oCAAoC;AACpC,wBAAsB,eAAe,CAAC,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,CAuC/E;AAED,sEAAsE;AACtE,wBAAsB,kBAAkB,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,CAqCjG;AAED,gFAAgF;AAChF,UAAU,iBAAiB;IACzB,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,MAAM,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,SAAS,CAAC;IACzC,YAAY,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,EAAE;YAAE,UAAU,CAAC,EAAE,OAAO,CAAA;SAAE,GAAG,SAAS,CAAA;KAAE,GAAG,SAAS,CAAC;CAChG;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAUzE;AAoCD,MAAM,WAAW,mBAAmB;IAClC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,MAAM,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;CAClC;AAED,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,YAAY,EAClB,IAAI,GAAE,mBAAwB,GAC7B,OAAO,CAAC,MAAM,CAAC,CAkEjB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ProviderConfig } from '@wrongstack/core';
|
|
2
|
+
import type { AuthMenuDeps } from './types.js';
|
|
3
|
+
/** Thin wrapper — delegates to the shared config provider loader. */
|
|
4
|
+
export declare function loadProviders(deps: AuthMenuDeps): Promise<Record<string, ProviderConfig>>;
|
|
5
|
+
/** Thin wrapper — delegates to the shared atomic config mutator. */
|
|
6
|
+
export declare function mutateProviders(deps: AuthMenuDeps, mutator: (providers: Record<string, ProviderConfig>) => void): Promise<void>;
|
|
7
|
+
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/auth-menu/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,qEAAqE;AACrE,wBAAsB,aAAa,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,CAI/F;AAED,oEAAoE;AACpE,wBAAsB,eAAe,CACnC,IAAI,EAAE,YAAY,EAClB,OAAO,EAAE,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,KAAK,IAAI,GAC3D,OAAO,CAAC,IAAI,CAAC,CAEf"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { runAuthDirect } from './direct.js';
|
|
2
|
+
export { runTopMenu as runAuthMenu } from './top-menu.js';
|
|
3
|
+
export type { AuthMenuDeps } from './types.js';
|
|
4
|
+
export { runCodexOAuthLogin, refreshCodexToken, extractAccountId, fetchCodexModels, resolveCodexModels, FALLBACK_CODEX_MODELS, CODEX_CATALOG_FAMILIES, fallbackCodexModelIds, fallbackCodexProviderModels, filterCurrentCodexModelIds, isCodexCatalogModel, CODEX_PROVIDER_ID, CODEX_BASE_URL, type CodexLoginOptions, type CodexTokens, } from './openai-codex-oauth.js';
|
|
5
|
+
export { runClaudeOAuthLogin, CLAUDE_PROVIDER_ID, type ClaudeLoginOptions, type ClaudeTokens, } from './anthropic-oauth.js';
|
|
6
|
+
export { runCopilotOAuthLogin, COPILOT_PROVIDER_ID, type CopilotLoginOptions, } from './github-copilot-oauth.js';
|
|
7
|
+
export { runAuthLocal, resolveModelList, probeLocalLlm, LOCAL_LLM_PRESETS, type RunAuthLocalOptions, type LocalLlmPresetEntry, type ProbeOptions, type ProbeResult, } from './local.js';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/auth-menu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,UAAU,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AAC1D,YAAY,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,EACrB,2BAA2B,EAC3B,0BAA0B,EAC1B,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EACd,KAAK,iBAAiB,EACtB,KAAK,WAAW,GACjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,KAAK,kBAAkB,EACvB,KAAK,YAAY,GAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,KAAK,mBAAmB,GACzB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EACjB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,KAAK,WAAW,GACjB,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Local-LLM server presets — the single source of truth shared by the
|
|
3
|
+
* `wstack auth local` quick-add flow (`./local.ts`) and the startup
|
|
4
|
+
* provider picker (`../picker.ts`).
|
|
5
|
+
*
|
|
6
|
+
* This module holds ONLY the preset data + its type, with no runtime
|
|
7
|
+
* dependencies (no probe, no config vault). That lets the picker import
|
|
8
|
+
* the presets to surface keyless local gateways without dragging in the
|
|
9
|
+
* heavier auth-flow machinery. Keep these entries in sync with the
|
|
10
|
+
* wire-format presets in `@wrongstack/providers`.
|
|
11
|
+
*/
|
|
12
|
+
export interface LocalLlmPresetEntry {
|
|
13
|
+
/** Stable id used both for the config key and the --name flag. */
|
|
14
|
+
id: string;
|
|
15
|
+
/** Display name shown in the picker. */
|
|
16
|
+
label: string;
|
|
17
|
+
/** Default base URL for this server. */
|
|
18
|
+
defaultBaseUrl: string;
|
|
19
|
+
/**
|
|
20
|
+
* When true, no API key is needed — the shortcut saves the provider
|
|
21
|
+
* without prompting for a key. Use for servers that reject any
|
|
22
|
+
* Authorization header (Ollama).
|
|
23
|
+
*/
|
|
24
|
+
noAuth: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Human-readable hint shown next to the entry — typically the upstream
|
|
27
|
+
* doc URL or the local port.
|
|
28
|
+
*/
|
|
29
|
+
hint: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Single source of truth for the `wstack auth local` picker. Keep this
|
|
33
|
+
* in sync with the wire-format presets in `@wrongstack/providers`.
|
|
34
|
+
*/
|
|
35
|
+
export declare const LOCAL_LLM_PRESETS: readonly LocalLlmPresetEntry[];
|
|
36
|
+
//# sourceMappingURL=local-presets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"local-presets.d.ts","sourceRoot":"","sources":["../../src/auth-menu/local-presets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,MAAM,WAAW,mBAAmB;IAClC,kEAAkE;IAClE,EAAE,EAAE,MAAM,CAAC;IACX,wCAAwC;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,wCAAwC;IACxC,cAAc,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,MAAM,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAAS,mBAAmB,EA6BlD,CAAC"}
|