@wrongstack/cli 0.293.0 → 0.295.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 +7 -5
- package/dist/acp-registry-cache.d.ts +1 -1
- package/dist/acp-registry-cache.d.ts.map +1 -1
- package/dist/acp-server-agent.d.ts +2 -1
- package/dist/acp-server-agent.d.ts.map +1 -1
- package/dist/arg-parser.d.ts +1 -1
- package/dist/arg-parser.d.ts.map +1 -1
- package/dist/auth-menu/add-provider.d.ts +1 -1
- package/dist/auth-menu/add-provider.d.ts.map +1 -1
- package/dist/auth-menu/anthropic-oauth.d.ts.map +1 -1
- package/dist/auth-menu/auth-menu-audit.d.ts +1 -1
- package/dist/auth-menu/auth-menu-audit.d.ts.map +1 -1
- package/dist/auth-menu/direct.d.ts +1 -1
- package/dist/auth-menu/direct.d.ts.map +1 -1
- package/dist/auth-menu/github-copilot-oauth.d.ts.map +1 -1
- package/dist/auth-menu/helpers.d.ts +1 -1
- package/dist/auth-menu/helpers.d.ts.map +1 -1
- package/dist/auth-menu/local-presets.d.ts +2 -35
- package/dist/auth-menu/local-presets.d.ts.map +1 -1
- package/dist/auth-menu/local.d.ts +1 -1
- package/dist/auth-menu/local.d.ts.map +1 -1
- package/dist/auth-menu/loopback-server.d.ts +76 -0
- package/dist/auth-menu/loopback-server.d.ts.map +1 -0
- package/dist/auth-menu/openai-codex-oauth.d.ts +7 -22
- package/dist/auth-menu/openai-codex-oauth.d.ts.map +1 -1
- package/dist/auth-menu/panel-service.d.ts +1 -3
- package/dist/auth-menu/panel-service.d.ts.map +1 -1
- package/dist/auth-menu/shared.d.ts +1 -1
- package/dist/auth-menu/shared.d.ts.map +1 -1
- package/dist/auth-menu/types.d.ts +1 -2
- package/dist/auth-menu/types.d.ts.map +1 -1
- package/dist/boot/auto-discover-providers.d.ts +2 -2
- package/dist/boot/auto-discover-providers.d.ts.map +1 -1
- package/dist/boot/container-wiring.d.ts +3 -1
- package/dist/boot/container-wiring.d.ts.map +1 -1
- package/dist/boot/dispatch-singleshot.d.ts +2 -1
- package/dist/boot/dispatch-singleshot.d.ts.map +1 -1
- package/dist/boot/dispatch-tui.d.ts +4 -0
- package/dist/boot/dispatch-tui.d.ts.map +1 -0
- package/dist/boot/dispatch-webui.d.ts +13 -8
- package/dist/boot/dispatch-webui.d.ts.map +1 -1
- package/dist/boot/event-wiring.d.ts +1 -1
- package/dist/boot/event-wiring.d.ts.map +1 -1
- package/dist/boot/execution-mode.d.ts +10 -0
- package/dist/boot/execution-mode.d.ts.map +1 -0
- package/dist/boot/launch-menu.d.ts +1 -1
- package/dist/boot/launch-menu.d.ts.map +1 -1
- package/dist/boot/short-circuit-hq.d.ts.map +1 -1
- package/dist/boot/simpleui-full-auto.d.ts +1 -1
- package/dist/boot/simpleui-full-auto.d.ts.map +1 -1
- package/dist/boot/system-prompt-builder.d.ts +2 -2
- package/dist/boot/system-prompt-builder.d.ts.map +1 -1
- package/dist/boot/system-prompt.d.ts +3 -2
- package/dist/boot/system-prompt.d.ts.map +1 -1
- package/dist/boot/tool-registry.d.ts +7 -10
- package/dist/boot/tool-registry.d.ts.map +1 -1
- package/dist/boot/tui-coordinator-setup.d.ts +4 -2
- package/dist/boot/tui-coordinator-setup.d.ts.map +1 -1
- package/dist/boot/tui-goal-wiring.d.ts +1 -1
- package/dist/boot/tui-goal-wiring.d.ts.map +1 -1
- package/dist/boot/tui-live-sessions.d.ts +2 -2
- package/dist/boot/tui-project-picker-callback.d.ts +1 -1
- package/dist/boot/tui-project-picker-callback.d.ts.map +1 -1
- package/dist/boot/tui-project-switch.d.ts +7 -5
- package/dist/boot/tui-project-switch.d.ts.map +1 -1
- package/dist/boot/tui-runtime-state.d.ts +4 -1
- package/dist/boot/tui-runtime-state.d.ts.map +1 -1
- package/dist/boot/tui-sdd-callback.d.ts +2 -2
- package/dist/boot/tui-session-resume.d.ts +3 -1
- package/dist/boot/tui-session-resume.d.ts.map +1 -1
- package/dist/boot/tui-settings-adapter.d.ts +3 -1
- package/dist/boot/tui-settings-adapter.d.ts.map +1 -1
- package/dist/boot-config.d.ts +3 -1
- package/dist/boot-config.d.ts.map +1 -1
- package/dist/boot.d.ts +3 -1
- package/dist/boot.d.ts.map +1 -1
- package/dist/brain-menu/panel-service.d.ts +1 -1
- package/dist/brain-menu/panel-service.d.ts.map +1 -1
- package/dist/cli-context.d.ts +2 -1
- package/dist/cli-context.d.ts.map +1 -1
- package/dist/cli-entry-point.d.ts +20 -0
- package/dist/cli-entry-point.d.ts.map +1 -1
- package/dist/cli-eternal-flag.d.ts +6 -3
- package/dist/cli-eternal-flag.d.ts.map +1 -1
- package/dist/cli-main.d.ts +0 -9
- package/dist/cli-main.d.ts.map +1 -1
- package/dist/cli-recovery-prompt.d.ts +1 -1
- package/dist/cli-recovery-prompt.d.ts.map +1 -1
- package/dist/config-doctor.d.ts +2 -2
- package/dist/config-doctor.d.ts.map +1 -1
- package/dist/config-history.d.ts +3 -3
- package/dist/config-history.d.ts.map +1 -1
- package/dist/context-limit.d.ts +1 -1
- package/dist/context-limit.d.ts.map +1 -1
- package/dist/context-overflow-diagnostic.d.ts +1 -1
- package/dist/context-overflow-diagnostic.d.ts.map +1 -1
- package/dist/execute-deps.d.ts +23 -12
- package/dist/execute-deps.d.ts.map +1 -1
- package/dist/execution.d.ts +23 -1
- package/dist/execution.d.ts.map +1 -1
- package/dist/first-run-auth-gate.d.ts +5 -3
- package/dist/first-run-auth-gate.d.ts.map +1 -1
- package/dist/fleet/host.d.ts +30 -7
- package/dist/fleet/host.d.ts.map +1 -1
- package/dist/fleet/routing.d.ts +2 -2
- package/dist/fleet/routing.d.ts.map +1 -1
- package/dist/fleet/status-broadcast.d.ts +3 -2
- package/dist/fleet/status-broadcast.d.ts.map +1 -1
- package/dist/fleet/supervisor-registry.d.ts +1 -1
- package/dist/fleet/supervisor-registry.d.ts.map +1 -1
- package/dist/fleet-statusline.d.ts +1 -1
- package/dist/fleet-statusline.d.ts.map +1 -1
- package/dist/goal-host.d.ts +4 -1
- package/dist/goal-host.d.ts.map +1 -1
- package/dist/hooks-wiring.d.ts +3 -1
- package/dist/hooks-wiring.d.ts.map +1 -1
- package/dist/hq-command-controller.d.ts +2 -2
- package/dist/hq-command-controller.d.ts.map +1 -1
- package/dist/hq-publisher.d.ts +2 -1
- package/dist/hq-publisher.d.ts.map +1 -1
- package/dist/hq-recovery-html.d.ts +8 -0
- package/dist/hq-recovery-html.d.ts.map +1 -0
- package/dist/hq-server/audit-actor.d.ts +3 -0
- package/dist/hq-server/audit-actor.d.ts.map +1 -0
- package/dist/hq-server/auth-state.d.ts +10 -0
- package/dist/hq-server/auth-state.d.ts.map +1 -0
- package/dist/hq-server/auth.d.ts +2 -14
- package/dist/hq-server/auth.d.ts.map +1 -1
- package/dist/hq-server/preflight.d.ts +22 -0
- package/dist/hq-server/preflight.d.ts.map +1 -0
- package/dist/hq-server/routes.d.ts +7 -16
- package/dist/hq-server/routes.d.ts.map +1 -1
- package/dist/hq-server/snapshot.d.ts +9 -1
- package/dist/hq-server/snapshot.d.ts.map +1 -1
- package/dist/hq-server/trust-boundary.d.ts +15 -0
- package/dist/hq-server/trust-boundary.d.ts.map +1 -0
- package/dist/hq-server/types.d.ts +16 -2
- package/dist/hq-server/types.d.ts.map +1 -1
- package/dist/hq-server/utils.d.ts +1 -1
- package/dist/hq-server/utils.d.ts.map +1 -1
- package/dist/hq-server/ws.d.ts +1 -1
- package/dist/hq-server/ws.d.ts.map +1 -1
- package/dist/hq-server.d.ts +5 -10
- package/dist/hq-server.d.ts.map +1 -1
- package/dist/hq-static-serve.d.ts +4 -4
- package/dist/hq-static-serve.d.ts.map +1 -1
- package/dist/index.js +26363 -33590
- package/dist/index.js.map +4 -4
- package/dist/input-reader.d.ts +1 -1
- package/dist/input-reader.d.ts.map +1 -1
- package/dist/kanban-hq-sync.d.ts +8 -0
- package/dist/kanban-hq-sync.d.ts.map +1 -0
- package/dist/mailbox-bridge-bootstrap.d.ts +20 -0
- package/dist/mailbox-bridge-bootstrap.d.ts.map +1 -1
- package/dist/mcp-serve.d.ts +3 -1
- package/dist/mcp-serve.d.ts.map +1 -1
- package/dist/next-task-predictor.d.ts +2 -2
- package/dist/next-task-predictor.d.ts.map +1 -1
- package/dist/permission-prompt.d.ts +1 -1
- package/dist/permission-prompt.d.ts.map +1 -1
- package/dist/picker.d.ts +1 -1
- package/dist/picker.d.ts.map +1 -1
- package/dist/plugin-api-factory.d.ts +1 -1
- package/dist/plugin-api-factory.d.ts.map +1 -1
- package/dist/plugin-management.d.ts +10 -9
- package/dist/plugin-management.d.ts.map +1 -1
- package/dist/preflight.d.ts +1 -1
- package/dist/preflight.d.ts.map +1 -1
- package/dist/profile-config-path.d.ts +2 -1
- package/dist/profile-config-path.d.ts.map +1 -1
- package/dist/project-picker.d.ts +1 -1
- package/dist/project-picker.d.ts.map +1 -1
- package/dist/provider-config-utils.d.ts +2 -2
- package/dist/provider-config-utils.d.ts.map +1 -1
- package/dist/provider-helpers.d.ts +1 -1
- package/dist/provider-helpers.d.ts.map +1 -1
- package/dist/renderer.d.ts +23 -11
- package/dist/renderer.d.ts.map +1 -1
- package/dist/repl.d.ts +11 -9
- package/dist/repl.d.ts.map +1 -1
- package/dist/services/autonomy-mode.d.ts +3 -0
- package/dist/services/autonomy-mode.d.ts.map +1 -0
- package/dist/services/commit-message.d.ts +41 -0
- package/dist/services/commit-message.d.ts.map +1 -0
- package/dist/services/dispatch-classifier.d.ts +12 -0
- package/dist/services/dispatch-classifier.d.ts.map +1 -0
- package/dist/services/mcp-management.d.ts +24 -0
- package/dist/services/mcp-management.d.ts.map +1 -0
- package/dist/services/project-manifest.d.ts +53 -0
- package/dist/services/project-manifest.d.ts.map +1 -0
- package/dist/services/sdd/project-context.d.ts.map +1 -0
- package/dist/services/sdd/spec-detection.d.ts.map +1 -0
- package/dist/{slash-commands → services}/sdd/state.d.ts +2 -2
- package/dist/services/sdd/state.d.ts.map +1 -0
- package/dist/{slash-commands → services}/sdd/task-manager.d.ts +1 -1
- package/dist/services/sdd/task-manager.d.ts.map +1 -0
- package/dist/services/sdd-runtime.d.ts +5 -0
- package/dist/services/sdd-runtime.d.ts.map +1 -0
- package/dist/services/statusline-config.d.ts +10 -0
- package/dist/services/statusline-config.d.ts.map +1 -0
- package/dist/services/suggestion-store.d.ts +36 -0
- package/dist/services/suggestion-store.d.ts.map +1 -0
- package/dist/session-event-wiring.d.ts +3 -2
- package/dist/session-event-wiring.d.ts.map +1 -1
- package/dist/session-stats.d.ts +2 -1
- package/dist/session-stats.d.ts.map +1 -1
- package/dist/settings-menu.d.ts +2 -4
- package/dist/settings-menu.d.ts.map +1 -1
- package/dist/simpleui-dist.d.ts +16 -0
- package/dist/simpleui-dist.d.ts.map +1 -1
- package/dist/slash-commands/acp.d.ts +2 -2
- package/dist/slash-commands/acp.d.ts.map +1 -1
- package/dist/slash-commands/agent-improve.d.ts +14 -0
- package/dist/slash-commands/agent-improve.d.ts.map +1 -0
- package/dist/slash-commands/agents.d.ts +2 -16
- package/dist/slash-commands/agents.d.ts.map +1 -1
- package/dist/slash-commands/audit.d.ts +2 -2
- package/dist/slash-commands/audit.d.ts.map +1 -1
- package/dist/slash-commands/auth.d.ts +2 -2
- package/dist/slash-commands/auth.d.ts.map +1 -1
- package/dist/slash-commands/autonomy.d.ts +3 -3
- package/dist/slash-commands/autonomy.d.ts.map +1 -1
- package/dist/slash-commands/brain.d.ts +2 -2
- package/dist/slash-commands/brain.d.ts.map +1 -1
- package/dist/slash-commands/btw.d.ts +2 -2
- package/dist/slash-commands/btw.d.ts.map +1 -1
- package/dist/slash-commands/clear.d.ts +2 -2
- package/dist/slash-commands/clear.d.ts.map +1 -1
- package/dist/slash-commands/codebase-reindex.d.ts +2 -2
- package/dist/slash-commands/codebase-reindex.d.ts.map +1 -1
- package/dist/slash-commands/collab.d.ts +2 -2
- package/dist/slash-commands/collab.d.ts.map +1 -1
- package/dist/slash-commands/command-context.d.ts +604 -0
- package/dist/slash-commands/command-context.d.ts.map +1 -0
- package/dist/slash-commands/commit-llm.d.ts +2 -40
- package/dist/slash-commands/commit-llm.d.ts.map +1 -1
- package/dist/slash-commands/compact.d.ts +2 -2
- package/dist/slash-commands/compact.d.ts.map +1 -1
- package/dist/slash-commands/context.d.ts +2 -2
- package/dist/slash-commands/context.d.ts.map +1 -1
- package/dist/slash-commands/coordinator.d.ts +2 -2
- package/dist/slash-commands/coordinator.d.ts.map +1 -1
- package/dist/slash-commands/delegate.d.ts +2 -2
- package/dist/slash-commands/delegate.d.ts.map +1 -1
- package/dist/slash-commands/design.d.ts +2 -2
- package/dist/slash-commands/design.d.ts.map +1 -1
- package/dist/slash-commands/dev.d.ts +2 -2
- package/dist/slash-commands/dev.d.ts.map +1 -1
- package/dist/slash-commands/diag-stats.d.ts +2 -2
- package/dist/slash-commands/diag-stats.d.ts.map +1 -1
- package/dist/slash-commands/dispatch-llm.d.ts +2 -11
- package/dist/slash-commands/dispatch-llm.d.ts.map +1 -1
- package/dist/slash-commands/doctor.d.ts +2 -2
- package/dist/slash-commands/doctor.d.ts.map +1 -1
- package/dist/slash-commands/enhance.d.ts +2 -2
- package/dist/slash-commands/enhance.d.ts.map +1 -1
- package/dist/slash-commands/ensemble.d.ts +2 -2
- package/dist/slash-commands/ensemble.d.ts.map +1 -1
- package/dist/slash-commands/f-keys.d.ts +2 -2
- package/dist/slash-commands/f-keys.d.ts.map +1 -1
- package/dist/slash-commands/fallback.d.ts +2 -2
- package/dist/slash-commands/fallback.d.ts.map +1 -1
- package/dist/slash-commands/fix.d.ts +2 -2
- package/dist/slash-commands/fix.d.ts.map +1 -1
- package/dist/slash-commands/fleet.d.ts +2 -2
- package/dist/slash-commands/fleet.d.ts.map +1 -1
- package/dist/slash-commands/git.d.ts +2 -2
- package/dist/slash-commands/git.d.ts.map +1 -1
- package/dist/slash-commands/gitid.d.ts +2 -2
- package/dist/slash-commands/gitid.d.ts.map +1 -1
- package/dist/slash-commands/goal-refiner.d.ts +2 -1
- package/dist/slash-commands/goal-refiner.d.ts.map +1 -1
- package/dist/slash-commands/goal.d.ts +2 -2
- package/dist/slash-commands/goal.d.ts.map +1 -1
- package/dist/slash-commands/health.d.ts +2 -2
- package/dist/slash-commands/health.d.ts.map +1 -1
- package/dist/slash-commands/help.d.ts +2 -2
- package/dist/slash-commands/help.d.ts.map +1 -1
- package/dist/slash-commands/helpers.d.ts +1 -1
- package/dist/slash-commands/helpers.d.ts.map +1 -1
- package/dist/slash-commands/hq.d.ts +2 -2
- package/dist/slash-commands/hq.d.ts.map +1 -1
- package/dist/slash-commands/index.d.ts +5 -593
- package/dist/slash-commands/index.d.ts.map +1 -1
- package/dist/slash-commands/init.d.ts +2 -2
- package/dist/slash-commands/init.d.ts.map +1 -1
- package/dist/slash-commands/interrupt.d.ts +2 -2
- package/dist/slash-commands/interrupt.d.ts.map +1 -1
- package/dist/slash-commands/kanban.d.ts +2 -2
- package/dist/slash-commands/kanban.d.ts.map +1 -1
- package/dist/slash-commands/mailbox-demo.d.ts +2 -2
- package/dist/slash-commands/mailbox-demo.d.ts.map +1 -1
- package/dist/slash-commands/mailbox-serve.d.ts +2 -2
- package/dist/slash-commands/mailbox-serve.d.ts.map +1 -1
- package/dist/slash-commands/mailbox.d.ts +4 -4
- package/dist/slash-commands/mailbox.d.ts.map +1 -1
- package/dist/slash-commands/mcp-utils.d.ts +2 -23
- package/dist/slash-commands/mcp-utils.d.ts.map +1 -1
- package/dist/slash-commands/mcp.d.ts +4 -4
- package/dist/slash-commands/mcp.d.ts.map +1 -1
- package/dist/slash-commands/memory.d.ts +2 -2
- package/dist/slash-commands/memory.d.ts.map +1 -1
- package/dist/slash-commands/metrics.d.ts +2 -2
- package/dist/slash-commands/metrics.d.ts.map +1 -1
- package/dist/slash-commands/mode.d.ts +2 -2
- package/dist/slash-commands/mode.d.ts.map +1 -1
- package/dist/slash-commands/modelcaps.d.ts +2 -2
- package/dist/slash-commands/modelcaps.d.ts.map +1 -1
- package/dist/slash-commands/models.d.ts +2 -2
- package/dist/slash-commands/models.d.ts.map +1 -1
- package/dist/slash-commands/mouse.d.ts +2 -2
- package/dist/slash-commands/mouse.d.ts.map +1 -1
- package/dist/slash-commands/next.d.ts +2 -2
- package/dist/slash-commands/next.d.ts.map +1 -1
- package/dist/slash-commands/plan.d.ts +2 -2
- package/dist/slash-commands/plan.d.ts.map +1 -1
- package/dist/slash-commands/plugin.d.ts +2 -2
- package/dist/slash-commands/plugin.d.ts.map +1 -1
- package/dist/slash-commands/profile.d.ts +2 -2
- package/dist/slash-commands/profile.d.ts.map +1 -1
- package/dist/slash-commands/project-utils.d.ts +2 -50
- package/dist/slash-commands/project-utils.d.ts.map +1 -1
- package/dist/slash-commands/project.d.ts +2 -2
- package/dist/slash-commands/project.d.ts.map +1 -1
- package/dist/slash-commands/provider-status.d.ts +1 -1
- package/dist/slash-commands/provider-status.d.ts.map +1 -1
- package/dist/slash-commands/prune.d.ts +2 -2
- package/dist/slash-commands/prune.d.ts.map +1 -1
- package/dist/slash-commands/refiner.d.ts +2 -2
- package/dist/slash-commands/refiner.d.ts.map +1 -1
- package/dist/slash-commands/review.d.ts +2 -2
- package/dist/slash-commands/review.d.ts.map +1 -1
- package/dist/slash-commands/sdd.d.ts +7 -7
- package/dist/slash-commands/sdd.d.ts.map +1 -1
- package/dist/slash-commands/security.d.ts +11 -2
- package/dist/slash-commands/security.d.ts.map +1 -1
- package/dist/slash-commands/session.d.ts +2 -2
- package/dist/slash-commands/session.d.ts.map +1 -1
- package/dist/slash-commands/setmodel.d.ts +2 -2
- package/dist/slash-commands/setmodel.d.ts.map +1 -1
- package/dist/slash-commands/settings.d.ts +2 -2
- package/dist/slash-commands/settings.d.ts.map +1 -1
- package/dist/slash-commands/shadow.d.ts +2 -13
- package/dist/slash-commands/shadow.d.ts.map +1 -1
- package/dist/slash-commands/spawn-agents.d.ts +2 -2
- package/dist/slash-commands/spawn-agents.d.ts.map +1 -1
- package/dist/slash-commands/statusline.d.ts +3 -45
- package/dist/slash-commands/statusline.d.ts.map +1 -1
- package/dist/slash-commands/suggest.d.ts +2 -2
- package/dist/slash-commands/suggest.d.ts.map +1 -1
- package/dist/slash-commands/suggestion-store.d.ts +2 -35
- package/dist/slash-commands/suggestion-store.d.ts.map +1 -1
- package/dist/slash-commands/supervisor.d.ts +2 -2
- package/dist/slash-commands/supervisor.d.ts.map +1 -1
- package/dist/slash-commands/surfaces.d.ts +1 -1
- package/dist/slash-commands/surfaces.d.ts.map +1 -1
- package/dist/slash-commands/tasks.d.ts +2 -2
- package/dist/slash-commands/tasks.d.ts.map +1 -1
- package/dist/slash-commands/techstack.d.ts +2 -2
- package/dist/slash-commands/techstack.d.ts.map +1 -1
- package/dist/slash-commands/telegram-settings.d.ts +2 -2
- package/dist/slash-commands/telegram-settings.d.ts.map +1 -1
- package/dist/slash-commands/telegram-setup.d.ts +2 -2
- package/dist/slash-commands/telegram-setup.d.ts.map +1 -1
- package/dist/slash-commands/todos.d.ts +2 -2
- package/dist/slash-commands/todos.d.ts.map +1 -1
- package/dist/slash-commands/tool.d.ts +2 -2
- package/dist/slash-commands/tool.d.ts.map +1 -1
- package/dist/slash-commands/tools.d.ts +2 -2
- package/dist/slash-commands/tools.d.ts.map +1 -1
- package/dist/slash-commands/tuneup.d.ts +2 -2
- package/dist/slash-commands/tuneup.d.ts.map +1 -1
- package/dist/slash-commands/working-dir.d.ts +2 -2
- package/dist/slash-commands/working-dir.d.ts.map +1 -1
- package/dist/slash-commands/worktree.d.ts +2 -2
- package/dist/slash-commands/worktree.d.ts.map +1 -1
- package/dist/slash-commands/yolo.d.ts +2 -2
- package/dist/slash-commands/yolo.d.ts.map +1 -1
- package/dist/subcommands/contracts.d.ts +23 -0
- package/dist/subcommands/contracts.d.ts.map +1 -0
- package/dist/subcommands/handlers/audit.d.ts.map +1 -1
- package/dist/subcommands/handlers/auth.d.ts.map +1 -1
- package/dist/subcommands/handlers/chronicle.d.ts.map +1 -1
- package/dist/subcommands/handlers/export.d.ts.map +1 -1
- package/dist/subcommands/handlers/hq.d.ts +1 -11
- package/dist/subcommands/handlers/hq.d.ts.map +1 -1
- package/dist/subcommands/handlers/mailbox-serve.d.ts.map +1 -1
- package/dist/subcommands/handlers/modeldiag.d.ts.map +1 -1
- package/dist/subcommands/handlers/per-subcommand-help.d.ts.map +1 -1
- package/dist/subcommands/handlers/permissions.d.ts +1 -1
- package/dist/subcommands/handlers/permissions.d.ts.map +1 -1
- package/dist/subcommands/handlers/project.d.ts +3 -0
- package/dist/subcommands/handlers/project.d.ts.map +1 -0
- package/dist/subcommands/handlers/providers-models.d.ts.map +1 -1
- package/dist/subcommands/handlers/replay.d.ts.map +1 -1
- package/dist/subcommands/handlers/rewind.d.ts.map +1 -1
- package/dist/subcommands/handlers/version-help.d.ts.map +1 -1
- package/dist/subcommands/index.d.ts +2 -24
- package/dist/subcommands/index.d.ts.map +1 -1
- package/dist/tuneup.d.ts +1 -1
- package/dist/tuneup.d.ts.map +1 -1
- package/dist/update-check.d.ts.map +1 -1
- package/dist/webui-server/client-registration.d.ts +2 -21
- package/dist/webui-server/client-registration.d.ts.map +1 -1
- package/dist/webui-server/connection-handler.d.ts +3 -27
- package/dist/webui-server/connection-handler.d.ts.map +1 -1
- package/dist/webui-server/context-breakdown.d.ts +1 -56
- package/dist/webui-server/context-breakdown.d.ts.map +1 -1
- package/dist/webui-server/contracts.d.ts +15 -0
- package/dist/webui-server/contracts.d.ts.map +1 -0
- package/dist/webui-server/cost-helpers.d.ts +1 -28
- package/dist/webui-server/cost-helpers.d.ts.map +1 -1
- package/dist/webui-server/kanban-host-adapter.d.ts +25 -0
- package/dist/webui-server/kanban-host-adapter.d.ts.map +1 -0
- package/dist/webui-server/kanban-run-mirror.d.ts +1 -76
- package/dist/webui-server/kanban-run-mirror.d.ts.map +1 -1
- package/dist/webui-server/kanban-supervisor.d.ts +1 -47
- package/dist/webui-server/kanban-supervisor.d.ts.map +1 -1
- package/dist/webui-server/lifecycle.d.ts +2 -111
- package/dist/webui-server/lifecycle.d.ts.map +1 -1
- package/dist/webui-server/logger-shim.d.ts +1 -1
- package/dist/webui-server/logger-shim.d.ts.map +1 -1
- package/dist/webui-server/prefs-seeding.d.ts +6 -42
- package/dist/webui-server/prefs-seeding.d.ts.map +1 -1
- package/dist/webui-server/privileged-actions.d.ts +14 -0
- package/dist/webui-server/privileged-actions.d.ts.map +1 -0
- package/dist/webui-server/session-start-payload.d.ts +2 -1
- package/dist/webui-server/session-start-payload.d.ts.map +1 -1
- package/dist/webui-server/setup-events.d.ts +8 -18
- package/dist/webui-server/setup-events.d.ts.map +1 -1
- package/dist/webui-server/static-serve.d.ts +1 -85
- package/dist/webui-server/static-serve.d.ts.map +1 -1
- package/dist/webui-server/stream-coalescer.d.ts +1 -48
- package/dist/webui-server/stream-coalescer.d.ts.map +1 -1
- package/dist/webui-server.d.ts +20 -17
- package/dist/webui-server.d.ts.map +1 -1
- package/dist/wiring/brain-and-orchestration.d.ts +5 -1
- package/dist/wiring/brain-and-orchestration.d.ts.map +1 -1
- package/dist/wiring/codebase-index.d.ts +2 -1
- package/dist/wiring/codebase-index.d.ts.map +1 -1
- package/dist/wiring/command-host-adapters.d.ts +16 -0
- package/dist/wiring/command-host-adapters.d.ts.map +1 -0
- package/dist/wiring/command-host-state.d.ts +86 -0
- package/dist/wiring/command-host-state.d.ts.map +1 -0
- package/dist/wiring/controllers.d.ts +4 -3
- package/dist/wiring/controllers.d.ts.map +1 -1
- package/dist/wiring/dep-watcher.d.ts +2 -2
- package/dist/wiring/dep-watcher.d.ts.map +1 -1
- package/dist/wiring/design-studio.d.ts +1 -1
- package/dist/wiring/design-studio.d.ts.map +1 -1
- package/dist/wiring/director-setup.d.ts +9 -6
- package/dist/wiring/director-setup.d.ts.map +1 -1
- package/dist/wiring/eternal-command-handlers.d.ts +37 -0
- package/dist/wiring/eternal-command-handlers.d.ts.map +1 -0
- package/dist/wiring/fleet-command-handlers.d.ts +16 -0
- package/dist/wiring/fleet-command-handlers.d.ts.map +1 -0
- package/dist/wiring/hq-telemetry.d.ts +4 -1
- package/dist/wiring/hq-telemetry.d.ts.map +1 -1
- package/dist/wiring/lifecycle-plugins.d.ts +9 -1
- package/dist/wiring/lifecycle-plugins.d.ts.map +1 -1
- package/dist/wiring/mailbox-bridge-bootstrap.d.ts +1 -1
- package/dist/wiring/mailbox-bridge-bootstrap.d.ts.map +1 -1
- package/dist/wiring/metrics.d.ts +4 -1
- package/dist/wiring/metrics.d.ts.map +1 -1
- package/dist/wiring/pipeline.d.ts +18 -13
- package/dist/wiring/pipeline.d.ts.map +1 -1
- package/dist/wiring/plugins.d.ts +16 -8
- package/dist/wiring/plugins.d.ts.map +1 -1
- package/dist/wiring/provider-runtime-setup.d.ts +6 -1
- package/dist/wiring/provider-runtime-setup.d.ts.map +1 -1
- package/dist/wiring/provider-runtime.d.ts +2 -2
- package/dist/wiring/provider-runtime.d.ts.map +1 -1
- package/dist/wiring/provider-status.d.ts +16 -0
- package/dist/wiring/provider-status.d.ts.map +1 -0
- package/dist/wiring/provider-utility-tools.d.ts +25 -0
- package/dist/wiring/provider-utility-tools.d.ts.map +1 -0
- package/dist/wiring/provider.d.ts +3 -2
- package/dist/wiring/provider.d.ts.map +1 -1
- package/dist/wiring/replay.d.ts +4 -1
- package/dist/wiring/replay.d.ts.map +1 -1
- package/dist/wiring/runtime-controller-deps.d.ts +41 -0
- package/dist/wiring/runtime-controller-deps.d.ts.map +1 -0
- package/dist/wiring/runtime-dispatch-state.d.ts +35 -0
- package/dist/wiring/runtime-dispatch-state.d.ts.map +1 -0
- package/dist/wiring/runtime-lifecycle-deps.d.ts +39 -0
- package/dist/wiring/runtime-lifecycle-deps.d.ts.map +1 -0
- package/dist/wiring/runtime-picker-deps.d.ts +22 -0
- package/dist/wiring/runtime-picker-deps.d.ts.map +1 -0
- package/dist/wiring/sage.d.ts +19 -0
- package/dist/wiring/sage.d.ts.map +1 -0
- package/dist/wiring/sdd-handlers.d.ts.map +1 -1
- package/dist/wiring/security-command.d.ts +11 -0
- package/dist/wiring/security-command.d.ts.map +1 -0
- package/dist/wiring/session-command-handlers.d.ts +55 -0
- package/dist/wiring/session-command-handlers.d.ts.map +1 -0
- package/dist/wiring/session.d.ts +13 -9
- package/dist/wiring/session.d.ts.map +1 -1
- package/dist/wiring/slash-commands.d.ts +14 -5
- package/dist/wiring/slash-commands.d.ts.map +1 -1
- package/dist/wiring/tools.d.ts +9 -20
- package/dist/wiring/tools.d.ts.map +1 -1
- package/package.json +23 -22
- package/dist/hq-dashboard-html.d.ts +0 -2
- package/dist/hq-dashboard-html.d.ts.map +0 -1
- package/dist/slash-commands/sdd/project-context.d.ts.map +0 -1
- package/dist/slash-commands/sdd/spec-detection.d.ts.map +0 -1
- package/dist/slash-commands/sdd/state.d.ts.map +0 -1
- package/dist/slash-commands/sdd/task-manager.d.ts.map +0 -1
- package/dist/webui-server/message-router.d.ts +0 -63
- package/dist/webui-server/message-router.d.ts.map +0 -1
- package/dist/webui-server/session-status-poll.d.ts +0 -16
- package/dist/webui-server/session-status-poll.d.ts.map +0 -1
- package/dist/webui-server/ws-handlers/agent-config.d.ts +0 -76
- package/dist/webui-server/ws-handlers/agent-config.d.ts.map +0 -1
- package/dist/webui-server/ws-handlers/brain.d.ts +0 -43
- package/dist/webui-server/ws-handlers/brain.d.ts.map +0 -1
- package/dist/webui-server/ws-handlers/connection.d.ts +0 -58
- package/dist/webui-server/ws-handlers/connection.d.ts.map +0 -1
- package/dist/webui-server/ws-handlers/context.d.ts +0 -55
- package/dist/webui-server/ws-handlers/context.d.ts.map +0 -1
- package/dist/webui-server/ws-handlers/index.d.ts +0 -60
- package/dist/webui-server/ws-handlers/index.d.ts.map +0 -1
- package/dist/webui-server/ws-handlers/introspection.d.ts +0 -35
- package/dist/webui-server/ws-handlers/introspection.d.ts.map +0 -1
- package/dist/webui-server/ws-handlers/kanban.d.ts +0 -66
- package/dist/webui-server/ws-handlers/kanban.d.ts.map +0 -1
- package/dist/webui-server/ws-handlers/mailbox.d.ts +0 -60
- package/dist/webui-server/ws-handlers/mailbox.d.ts.map +0 -1
- package/dist/webui-server/ws-handlers/oauth.d.ts +0 -16
- package/dist/webui-server/ws-handlers/oauth.d.ts.map +0 -1
- package/dist/webui-server/ws-handlers/prefs.d.ts +0 -34
- package/dist/webui-server/ws-handlers/prefs.d.ts.map +0 -1
- package/dist/webui-server/ws-handlers/process.d.ts +0 -6
- package/dist/webui-server/ws-handlers/process.d.ts.map +0 -1
- package/dist/webui-server/ws-handlers/projects.d.ts +0 -44
- package/dist/webui-server/ws-handlers/projects.d.ts.map +0 -1
- package/dist/webui-server/ws-handlers/providers.d.ts +0 -46
- package/dist/webui-server/ws-handlers/providers.d.ts.map +0 -1
- package/dist/webui-server/ws-handlers/sessions.d.ts +0 -38
- package/dist/webui-server/ws-handlers/sessions.d.ts.map +0 -1
- package/dist/webui-server/ws-handlers/worklist.d.ts +0 -49
- package/dist/webui-server/ws-handlers/worklist.d.ts.map +0 -1
- package/dist/wiring/super-memory.d.ts +0 -11
- package/dist/wiring/super-memory.d.ts.map +0 -1
- /package/dist/{slash-commands → services}/sdd/project-context.d.ts +0 -0
- /package/dist/{slash-commands → services}/sdd/spec-detection.d.ts +0 -0
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import type { BrainArbiter, BrainAutoRisk, BrainRuntime } from '@wrongstack/core';
|
|
2
|
-
import type { WebSocket } from 'ws';
|
|
3
|
-
import type { WsCommon } from './index.js';
|
|
4
|
-
/**
|
|
5
|
-
* PR 5b of Issue #30: Brain WebSocket handlers (`brain.status` /
|
|
6
|
-
* `brain.risk` / `brain.ask`).
|
|
7
|
-
*
|
|
8
|
-
* Extracted from the `runWebUI` switch. The former closure captures —
|
|
9
|
-
* `opts.brainSettings`, `opts.getBrainLog`, and the
|
|
10
|
-
* `opts.brain ?? container.resolve(TOKENS.BrainArbiter)` lookup — are now
|
|
11
|
-
* fields on `BrainHandlerContext`. The arbiter resolution is passed as a
|
|
12
|
-
* thunk so this module needn't know about the agent container or tokens.
|
|
13
|
-
*/
|
|
14
|
-
/** A single Brain decision-log entry (newest last). */
|
|
15
|
-
export interface BrainLogEntry {
|
|
16
|
-
at: number;
|
|
17
|
-
kind: string;
|
|
18
|
-
question: string;
|
|
19
|
-
outcome: string;
|
|
20
|
-
}
|
|
21
|
-
export interface BrainHandlerContext extends WsCommon {
|
|
22
|
-
/** Shared autonomy ceiling — the SAME object `/brain` mutates. */
|
|
23
|
-
brainSettings: {
|
|
24
|
-
maxAutoRisk: BrainAutoRisk;
|
|
25
|
-
} | undefined;
|
|
26
|
-
/**
|
|
27
|
-
* Live-editable Brain config owner. Powers `brain.config.get/set` and
|
|
28
|
-
* enriches `brain.status`; risk-only hosts may leave it undefined.
|
|
29
|
-
*/
|
|
30
|
-
brainRuntime?: BrainRuntime | undefined;
|
|
31
|
-
/** Read the host's rolling Brain decision log, or undefined when not wired. */
|
|
32
|
-
getBrainLog: (() => BrainLogEntry[]) | undefined;
|
|
33
|
-
/** Resolve the active Brain arbiter (host instance, else container-bound), or undefined. */
|
|
34
|
-
resolveArbiter: () => BrainArbiter | undefined;
|
|
35
|
-
/** Read the active session id for brain.ask requests. */
|
|
36
|
-
getSessionId?: (() => string | undefined) | undefined;
|
|
37
|
-
}
|
|
38
|
-
export declare function handleBrainStatus(ctx: BrainHandlerContext, ws: WebSocket): void;
|
|
39
|
-
export declare function handleBrainConfigGet(ctx: BrainHandlerContext, ws: WebSocket): void;
|
|
40
|
-
export declare function handleBrainConfigSet(ctx: BrainHandlerContext, ws: WebSocket, payload: unknown): Promise<void>;
|
|
41
|
-
export declare function handleBrainRisk(ctx: BrainHandlerContext, ws: WebSocket, level: string): void;
|
|
42
|
-
export declare function handleBrainAsk(ctx: BrainHandlerContext, ws: WebSocket, question: string | undefined): Promise<void>;
|
|
43
|
-
//# sourceMappingURL=brain.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"brain.d.ts","sourceRoot":"","sources":["../../../src/webui-server/ws-handlers/brain.ts"],"names":[],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G,IAAI,CAe5F;AAED,wBAAsB,cAAc,CAClC,GAAG,EAAE,mBAAmB,EACxB,EAAE,EAAE,SAAS,EACb,QAAQ,EAAE,MAAM,GAAG,SAAS,GAC3B,OAAO,CAAC,IAAI,CAAC,CA6Bf"}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import type { Agent } from '@wrongstack/core';
|
|
2
|
-
import { type IncomingImagePayload } from '@wrongstack/core/utils';
|
|
3
|
-
import type { WebSocket } from 'ws';
|
|
4
|
-
import type { WsCommon } from './index.js';
|
|
5
|
-
/**
|
|
6
|
-
* PR 5k of Issue #30: the connection-level WebSocket handlers —
|
|
7
|
-
* `user_message` (the agent-run entry), `abort`, `ping`, and
|
|
8
|
-
* `tool.confirm_result`.
|
|
9
|
-
*
|
|
10
|
-
* These are the last cases that lived inline in `runWebUI`'s
|
|
11
|
-
* `handleMessage` switch. Unlike the topic groups, they own per-socket
|
|
12
|
-
* run-loop state: `abortControllers` (one in-flight `AbortController`
|
|
13
|
-
* per socket) and `pendingConfirms` (tool-permission resolvers keyed by
|
|
14
|
-
* confirm id). Both maps are *owned* by `runWebUI` and shared with the
|
|
15
|
-
* connection/close handlers, so they're passed by reference on the
|
|
16
|
-
* context rather than copied — the close handler still aborts/clears the
|
|
17
|
-
* same maps these handlers mutate.
|
|
18
|
-
*
|
|
19
|
-
* `opts` is threaded by reference (read-only here) so `handleUserMessage`
|
|
20
|
-
* calls the live `opts.agent` — after a project switch reassigns it, the
|
|
21
|
-
* next `user_message` runs the new agent.
|
|
22
|
-
*/
|
|
23
|
-
/** The tool-confirmation decision the client can send back. */
|
|
24
|
-
export type ConfirmDecision = 'yes' | 'no' | 'always' | 'deny';
|
|
25
|
-
export interface PendingConfirm {
|
|
26
|
-
resolve: (decision: ConfirmDecision) => void;
|
|
27
|
-
decisionSource?: string | undefined;
|
|
28
|
-
riskTier?: 'safe' | 'standard' | 'destructive' | undefined;
|
|
29
|
-
boundaryReason?: string | undefined;
|
|
30
|
-
/** The exact `tool.confirm_needed` broadcast payload, kept so the prompt
|
|
31
|
-
* can be replayed to clients that connect while the confirm is pending
|
|
32
|
-
* (e.g. a browser refresh mid-prompt). */
|
|
33
|
-
payload?: Record<string, unknown> | undefined;
|
|
34
|
-
}
|
|
35
|
-
export declare function isDestructivePendingConfirm(confirm: PendingConfirm): boolean;
|
|
36
|
-
export declare function resolveYoloEligiblePendingConfirms(pendingConfirms: Map<string, PendingConfirm>): void;
|
|
37
|
-
export declare function resolveAllPendingConfirms(pendingConfirms: Map<string, PendingConfirm>, decision: ConfirmDecision): void;
|
|
38
|
-
export interface ConnectionOptions {
|
|
39
|
-
agent: Agent;
|
|
40
|
-
}
|
|
41
|
-
export interface ConnectionContext extends WsCommon {
|
|
42
|
-
opts: ConnectionOptions;
|
|
43
|
-
/** One in-flight run controller per socket; owned by runWebUI. */
|
|
44
|
-
abortControllers: Map<WebSocket, AbortController>;
|
|
45
|
-
/** Pending tool-permission resolvers keyed by confirm id; owned by runWebUI. */
|
|
46
|
-
pendingConfirms: Map<string, PendingConfirm>;
|
|
47
|
-
}
|
|
48
|
-
export interface UserMessageAttachments {
|
|
49
|
-
/** Images attached in the WebUI composer (paste / drop / file picker). */
|
|
50
|
-
images?: IncomingImagePayload[] | undefined;
|
|
51
|
-
/** Legacy single-image field older clients sent as a data-URL. */
|
|
52
|
-
imageBase64?: string | undefined;
|
|
53
|
-
}
|
|
54
|
-
export declare function handleUserMessage(ctx: ConnectionContext, ws: WebSocket, content: string, requestedSessionId?: string | undefined, attachments?: UserMessageAttachments | undefined): Promise<void>;
|
|
55
|
-
export declare function handleAbort(ctx: ConnectionContext, ws: WebSocket, requestedSessionId?: string | undefined): void;
|
|
56
|
-
export declare function handlePing(ctx: ConnectionContext, ws: WebSocket): void;
|
|
57
|
-
export declare function handleToolConfirmResult(ctx: ConnectionContext, id: string, decision: ConfirmDecision, requestedSessionId?: string | undefined): void;
|
|
58
|
-
//# sourceMappingURL=connection.d.ts.map
|
|
@@ -1 +0,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;IACxB,kEAAkE;IAClE,gBAAgB,EAAE,GAAG,CAAC,SAAS,EAAE,eAAe,CAAC,CAAC;IAClD,gFAAgF;IAChF,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;CAC9C;AAgBD,MAAM,WAAW,sBAAsB;IACrC,0EAA0E;IAC1E,MAAM,CAAC,EAAE,oBAAoB,EAAE,GAAG,SAAS,CAAC;IAC5C,kEAAkE;IAClE,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC;AAED,wBAAsB,iBAAiB,CACrC,GAAG,EAAE,iBAAiB,EACtB,EAAE,EAAE,SAAS,EACb,OAAO,EAAE,MAAM,EACf,kBAAkB,CAAC,EAAE,MAAM,GAAG,SAAS,EACvC,WAAW,CAAC,EAAE,sBAAsB,GAAG,SAAS,GAC/C,OAAO,CAAC,IAAI,CAAC,CAyGf;AAED,wBAAgB,WAAW,CACzB,GAAG,EAAE,iBAAiB,EACtB,EAAE,EAAE,SAAS,EACb,kBAAkB,CAAC,EAAE,MAAM,GAAG,SAAS,GACtC,IAAI,CA0BN;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,iBAAiB,EAAE,EAAE,EAAE,SAAS,GAAG,IAAI,CAEtE;AAED,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,iBAAiB,EACtB,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,eAAe,EACzB,kBAAkB,CAAC,EAAE,MAAM,GAAG,SAAS,GACtC,IAAI,CAQN"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { type Agent } from '@wrongstack/core';
|
|
2
|
-
import type { CustomModeStore } from '@wrongstack/webui-server';
|
|
3
|
-
import type { WebSocket } from 'ws';
|
|
4
|
-
import type { WsCommon } from './index.js';
|
|
5
|
-
/**
|
|
6
|
-
* PR 5h of Issue #30: context-window WebSocket handlers — the live
|
|
7
|
-
* context (`context.clear`/`debug`/`compact`/`repair`) and the
|
|
8
|
-
* custom-context-mode CRUD (`context.modes.list`, `context.mode.switch`/
|
|
9
|
-
* `create`/`update`/`delete`).
|
|
10
|
-
*
|
|
11
|
-
* Former closure captures (`opts.agent`, `buildSessionStartPayload`, and
|
|
12
|
-
* the lazily-loaded `getCustomModeStore`) are `ContextHandlerContext`
|
|
13
|
-
* fields. The compactor is resolved off the agent container at call time,
|
|
14
|
-
* exactly as the inline cases did.
|
|
15
|
-
*/
|
|
16
|
-
export interface ContextHandlerContext extends WsCommon {
|
|
17
|
-
/** The running agent — context state/meta and the compactor container live on it. */
|
|
18
|
-
agent: Agent;
|
|
19
|
-
/** Build the reset session.start payload (runWebUI closure). */
|
|
20
|
-
buildSessionStart: (overrides?: Record<string, unknown>) => Promise<unknown>;
|
|
21
|
-
/** Lazily-loaded custom-context-mode store (runWebUI closure). */
|
|
22
|
-
getCustomModeStore: () => Promise<CustomModeStore>;
|
|
23
|
-
}
|
|
24
|
-
export declare function handleContextClear(ctx: ContextHandlerContext, ws: WebSocket): Promise<void>;
|
|
25
|
-
export declare function handleContextDebug(ctx: ContextHandlerContext, ws: WebSocket): void;
|
|
26
|
-
export declare function handleContextCompact(ctx: ContextHandlerContext, ws: WebSocket, aggressive: boolean): Promise<void>;
|
|
27
|
-
export declare function handleContextRepair(ctx: ContextHandlerContext, ws: WebSocket): void;
|
|
28
|
-
export declare function handleContextModesList(ctx: ContextHandlerContext, ws: WebSocket): Promise<void>;
|
|
29
|
-
export declare function handleContextModeSwitch(ctx: ContextHandlerContext, ws: WebSocket, id: string): Promise<void>;
|
|
30
|
-
export declare function handleContextModeCreate(ctx: ContextHandlerContext, ws: WebSocket, payload: {
|
|
31
|
-
id: string;
|
|
32
|
-
name: string;
|
|
33
|
-
description: string;
|
|
34
|
-
thresholds: {
|
|
35
|
-
warn: number;
|
|
36
|
-
soft: number;
|
|
37
|
-
hard: number;
|
|
38
|
-
};
|
|
39
|
-
preserveK: number;
|
|
40
|
-
eliseThreshold: number;
|
|
41
|
-
}): Promise<void>;
|
|
42
|
-
export declare function handleContextModeUpdate(ctx: ContextHandlerContext, ws: WebSocket, payload: {
|
|
43
|
-
id: string;
|
|
44
|
-
name?: string | undefined;
|
|
45
|
-
description?: string | undefined;
|
|
46
|
-
thresholds?: {
|
|
47
|
-
warn?: number | undefined;
|
|
48
|
-
soft?: number | undefined;
|
|
49
|
-
hard?: number | undefined;
|
|
50
|
-
} | undefined;
|
|
51
|
-
preserveK?: number | undefined;
|
|
52
|
-
eliseThreshold?: number | undefined;
|
|
53
|
-
}): Promise<void>;
|
|
54
|
-
export declare function handleContextModeDelete(ctx: ContextHandlerContext, ws: WebSocket, id: string): Promise<void>;
|
|
55
|
-
//# sourceMappingURL=context.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/webui-server/ws-handlers/context.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,KAAK,EAKX,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AAOpC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C;;;;;;;;;;GAUG;AAEH,MAAM,WAAW,qBAAsB,SAAQ,QAAQ;IACrD,qFAAqF;IACrF,KAAK,EAAE,KAAK,CAAC;IACb,gEAAgE;IAChE,iBAAiB,EAAE,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7E,kEAAkE;IAClE,kBAAkB,EAAE,MAAM,OAAO,CAAC,eAAe,CAAC,CAAC;CACpD;AAgBD,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,qBAAqB,EAAE,EAAE,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAcjG;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE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AAE,MAAM,GAAG,SAAS,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,GACnF,SAAS,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACrC,GACA,OAAO,CAAC,IAAI,CAAC,CAoBf;AAED,wBAAsB,uBAAuB,CAC3C,GAAG,EAAE,qBAAqB,EAC1B,EAAE,EAAE,SAAS,EACb,EAAE,EAAE,MAAM,GACT,OAAO,CAAC,IAAI,CAAC,CAcf"}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import type { ModelsRegistry } from '@wrongstack/core';
|
|
2
|
-
import type { WebSocket } from 'ws';
|
|
3
|
-
import type { ProviderConfigStore } from '../provider-config.js';
|
|
4
|
-
/**
|
|
5
|
-
* PR 5 of Issue #30 (webui-server 8-PR refactor): ws-handlers/.
|
|
6
|
-
*
|
|
7
|
-
* The WebSocket message handlers used to live as closures inside
|
|
8
|
-
* `runWebUI`, capturing `opts`, `send`, `broadcast`, etc. directly.
|
|
9
|
-
* To move them into their own topic files we replace every closure
|
|
10
|
-
* capture with a field on `WsHandlerContext`, built once in
|
|
11
|
-
* `runWebUI` and threaded explicitly into each handler — no hidden
|
|
12
|
-
* captures.
|
|
13
|
-
*/
|
|
14
|
-
/**
|
|
15
|
-
* Server→client message shape. Mirrors `WSServerMessage` in
|
|
16
|
-
* webui-server.ts; duplicated here (rather than imported) so the
|
|
17
|
-
* ws-handlers modules never import back from webui-server.ts and
|
|
18
|
-
* create a cycle.
|
|
19
|
-
*/
|
|
20
|
-
export interface WsServerMessage {
|
|
21
|
-
type: string;
|
|
22
|
-
payload: unknown;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* The messaging surface every ws-handler group needs. Each group's
|
|
26
|
-
* context extends this with its own dependencies, so the per-group
|
|
27
|
-
* contexts stay focused instead of one shared god-object growing a
|
|
28
|
-
* field for every concern in the file.
|
|
29
|
-
*/
|
|
30
|
-
export interface WsCommon {
|
|
31
|
-
/** Send one message to a single socket (no-op if the socket isn't OPEN). */
|
|
32
|
-
send: (ws: WebSocket, msg: WsServerMessage) => void;
|
|
33
|
-
/** Broadcast a message to every connected socket. */
|
|
34
|
-
broadcast: (msg: WsServerMessage) => void;
|
|
35
|
-
/** console.log adapter, so handlers don't reach for the global directly. */
|
|
36
|
-
log: (msg: string) => void;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Context for the provider / model / API-key handlers.
|
|
40
|
-
*/
|
|
41
|
-
export interface WsHandlerContext extends WsCommon {
|
|
42
|
-
/** Provider-config store (load/save the saved-providers map), bound to the global config path. */
|
|
43
|
-
providerStore: ProviderConfigStore;
|
|
44
|
-
/** Models registry backing the provider/model catalog (optional). */
|
|
45
|
-
modelsRegistry: ModelsRegistry | undefined;
|
|
46
|
-
}
|
|
47
|
-
export { type AgentConfigContext, handleModelRefine, handleModelSwitch, handleModeSwitch, handleModesList, } from './agent-config.js';
|
|
48
|
-
export { type BrainHandlerContext, handleBrainAsk, handleBrainConfigGet, handleBrainConfigSet, handleBrainRisk, handleBrainStatus, } from './brain.js';
|
|
49
|
-
export { type ConfirmDecision, type ConnectionContext, type ConnectionOptions, type PendingConfirm, handleAbort, handlePing, handleToolConfirmResult, handleUserMessage, resolveAllPendingConfirms, resolveYoloEligiblePendingConfirms, } from './connection.js';
|
|
50
|
-
export { type ContextHandlerContext, handleContextClear, handleContextCompact, handleContextDebug, handleContextModeCreate, handleContextModeDelete, handleContextModeSwitch, handleContextModesList, handleContextModeUpdate, handleContextRepair, } from './context.js';
|
|
51
|
-
export { handleDiagGet, handleToolDisable, handleToolEnable, handleSkillsList, handleStatsGet, handleToolsList, type IntrospectionContext, } from './introspection.js';
|
|
52
|
-
export { handleAutonomySwitch, handlePrefsGet, handlePrefsUpdate, type PrefsContext, } from './prefs.js';
|
|
53
|
-
export { handleProcessKill, handleProcessKillAll, handleProcessList } from './process.js';
|
|
54
|
-
export { handleProjectsAdd, handleProjectsList, handleProjectsSelect, handleWorkingDirSet, type ProjectsContext, type ProjectsOptions, } from './projects.js';
|
|
55
|
-
export { adoptDefaultProviderIfUnset, handleKeyDelete, handleKeySetActive, handleKeyUpsert, handleProviderAdd, handleProviderModels, handleProviderRemove, handleProviderClearModels, handleProviderUndoClear, handleProviderUpdate, handleProviderProbe, handleProvidersList, handleProvidersSaved, broadcastSaved, } from './providers.js';
|
|
56
|
-
export { handleOAuthStart, handleOAuthCode, handleOAuthCancel } from './oauth.js';
|
|
57
|
-
export { handleGoalGet, handleSessionCheckpoints, handleSessionDelete, handleSessionNew, handleSessionRename, handleSessionResume, handleSessionRewind, handleSessionSave, handleSessionsList, type SessionsContext, type SessionsOptions, } from './sessions.js';
|
|
58
|
-
export { handlePlanGet, handlePlanItemUpdate, handlePlanTemplateUse, handleTasksGet, handleTaskUpdate, handleTodosClear, handleTodosGet, handleTodosRemove, handleTodoUpdate, type WorklistContext, } from './worklist.js';
|
|
59
|
-
export { type MailboxContext, getMailbox, handleMailboxMessages, handleMailboxAgents, handleMailboxClear, handleMailboxCompact, handleMailboxPurge, } from './mailbox.js';
|
|
60
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/webui-server/ws-handlers/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEjE;;;;;;;;;GASG;AAEH;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;;;;GAKG;AACH,MAAM,WAAW,QAAQ;IACvB,4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GAClB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAC1F,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACnB,KAAK,eAAe,EACpB,KAAK,eAAe,GACrB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,2BAA2B,EAC3B,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,EACpB,yBAAyB,EACzB,uBAAuB,EACvB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,cAAc,GACf,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAClF,OAAO,EACL,aAAa,EACb,wBAAwB,EACxB,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,KAAK,eAAe,EACpB,KAAK,eAAe,GACrB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,qBAAqB,EACrB,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,KAAK,eAAe,GACrB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,KAAK,cAAc,EACnB,UAAU,EACV,qBAAqB,EACrB,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,cAAc,CAAC"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import type { Agent, ConfigStore, ModelsRegistry, SkillLoader } from '@wrongstack/core';
|
|
2
|
-
import type { WebSocket } from 'ws';
|
|
3
|
-
import type { WsCommon } from './index.js';
|
|
4
|
-
/**
|
|
5
|
-
* PR 5c of Issue #30: introspection WebSocket handlers
|
|
6
|
-
* (`skills.list`, `tools.list`, `tool.enable`, `tool.disable`, `diag.get`, `stats.get`).
|
|
7
|
-
*
|
|
8
|
-
* Most cases snapshot live run state (the agent context, the tool registry,
|
|
9
|
-
* the skill loader, token usage) and send it to the browser. Tool enable/disable
|
|
10
|
-
* is included here because it mutates the registry/config that tools.list
|
|
11
|
-
* introspects.
|
|
12
|
-
*/
|
|
13
|
-
export interface IntrospectionContext extends WsCommon {
|
|
14
|
-
/** The running agent — read for ctx (provider/model/usage/messages/…) and tools. */
|
|
15
|
-
agent: Agent;
|
|
16
|
-
/** Skill loader backing skills.list (optional — absent ⇒ feature disabled). */
|
|
17
|
-
skillLoader: SkillLoader | undefined;
|
|
18
|
-
/** Models registry, used by stats.get to price token usage (optional). */
|
|
19
|
-
modelsRegistry: ModelsRegistry | undefined;
|
|
20
|
-
/** Project root reported by diag.get (falls back to ctx.projectRoot). */
|
|
21
|
-
projectRoot: string | undefined;
|
|
22
|
-
/** Active session id. */
|
|
23
|
-
sessionId: string;
|
|
24
|
-
/** Epoch ms when the run started — stats.get reports elapsed time. */
|
|
25
|
-
sessionStartedAt: number;
|
|
26
|
-
/** Config store used to persist tool enable/disable changes when available. */
|
|
27
|
-
configStore?: ConfigStore | undefined;
|
|
28
|
-
}
|
|
29
|
-
export declare function handleSkillsList(ctx: IntrospectionContext, ws: WebSocket): Promise<void>;
|
|
30
|
-
export declare function handleToolsList(ctx: IntrospectionContext, ws: WebSocket): void;
|
|
31
|
-
export declare function handleToolDisable(ctx: IntrospectionContext, ws: WebSocket, payload: unknown): void;
|
|
32
|
-
export declare function handleToolEnable(ctx: IntrospectionContext, ws: WebSocket, payload: unknown): void;
|
|
33
|
-
export declare function handleDiagGet(ctx: IntrospectionContext, ws: WebSocket): void;
|
|
34
|
-
export declare function handleStatsGet(ctx: IntrospectionContext, ws: WebSocket): Promise<void>;
|
|
35
|
-
//# sourceMappingURL=introspection.d.ts.map
|
|
@@ -1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AE,EAAE,SAAS,GAAG,IAAI,CAuB5E;AAED,wBAAsB,cAAc,CAAC,GAAG,EAAE,oBAAoB,EAAE,EAAE,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAoC5F"}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WebSocket handler for kanban board operations.
|
|
3
|
-
*
|
|
4
|
-
* Message types:
|
|
5
|
-
* kanban.list → list all boards
|
|
6
|
-
* kanban.get → get a board by ID (full detail)
|
|
7
|
-
* kanban.create → create a new board
|
|
8
|
-
* kanban.update → update board metadata
|
|
9
|
-
* kanban.delete → delete a board
|
|
10
|
-
* kanban.task.add → add a task
|
|
11
|
-
* kanban.task.update → update a task
|
|
12
|
-
* kanban.task.move → move a task to a different column
|
|
13
|
-
* kanban.task.remove → delete a task
|
|
14
|
-
* kanban.task.get → get a single task
|
|
15
|
-
* kanban.column.add → add a column
|
|
16
|
-
* kanban.column.remove→ remove a column
|
|
17
|
-
* kanban.generate → auto-generate a board
|
|
18
|
-
*/
|
|
19
|
-
import { type Context } from '@wrongstack/core';
|
|
20
|
-
import type { WebSocket } from 'ws';
|
|
21
|
-
import type { WsCommon } from './index.js';
|
|
22
|
-
export interface KanbanContext extends WsCommon {
|
|
23
|
-
projectRoot: string;
|
|
24
|
-
/** Live session state used for Kanban -> todo/task/plan write-back. */
|
|
25
|
-
sessionContext?: Context | undefined;
|
|
26
|
-
dispatchTask?: (description: string, opts?: {
|
|
27
|
-
provider?: string | undefined;
|
|
28
|
-
model?: string | undefined;
|
|
29
|
-
fallbackModels?: string[] | undefined;
|
|
30
|
-
fallbackProfile?: string | undefined;
|
|
31
|
-
skills?: string[] | undefined;
|
|
32
|
-
tools?: string[] | undefined;
|
|
33
|
-
name?: string | undefined;
|
|
34
|
-
allowedCapabilities?: readonly string[] | undefined;
|
|
35
|
-
/**
|
|
36
|
-
* Free-form task context propagated into the spawned `TaskSpec.context`.
|
|
37
|
-
* The relay always supplies `{ kanban: { boardId, taskId } }` so the
|
|
38
|
-
* tool-runtime boundary gate can resolve the live policy instead of
|
|
39
|
-
* failing open.
|
|
40
|
-
*/
|
|
41
|
-
context?: {
|
|
42
|
-
kanban?: {
|
|
43
|
-
boardId?: string;
|
|
44
|
-
taskId?: string;
|
|
45
|
-
projectRoot?: string;
|
|
46
|
-
};
|
|
47
|
-
} | undefined;
|
|
48
|
-
onDone?: ((result: {
|
|
49
|
-
status: 'completed' | 'failed';
|
|
50
|
-
result?: string | undefined;
|
|
51
|
-
error?: string | undefined;
|
|
52
|
-
}) => void | Promise<void>) | undefined;
|
|
53
|
-
}) => Promise<string>;
|
|
54
|
-
}
|
|
55
|
-
export interface ResolvedDispatchRoute {
|
|
56
|
-
provider?: string | undefined;
|
|
57
|
-
model?: string | undefined;
|
|
58
|
-
fallbackProfile?: string | undefined;
|
|
59
|
-
fallbackModels?: string[] | undefined;
|
|
60
|
-
}
|
|
61
|
-
export declare function parseResolvedDispatchRoute(summary: string): ResolvedDispatchRoute;
|
|
62
|
-
export declare function handleKanbanMessage(ctx: KanbanContext, ws: WebSocket, msg: {
|
|
63
|
-
type: string;
|
|
64
|
-
payload?: unknown;
|
|
65
|
-
}): Promise<void>;
|
|
66
|
-
//# sourceMappingURL=kanban.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"kanban.d.ts","sourceRoot":"","sources":["../../../src/webui-server/ws-handlers/kanban.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EACL,KAAK,OAAO,EAIb,MAAM,kBAAkB,CAAC;AAqD1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,MAAM,WAAW,aAAc,SAAQ,QAAQ;IAC7C,WAAW,EAAE,MAAM,CAAC;IACpB,uEAAuE;IACvE,cAAc,CAAC,EAAE,OAAO,GAAG,SA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GAAG,SAAS,CAAC;CACvC;AAED,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,MAAM,GAAG,qBAAqB,CAajF;AAID,wBAAsB,mBAAmB,CACvC,GAAG,EAAE,aAAa,EAClB,EAAE,EAAE,SAAS,EACb,GAAG,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,GACvC,OAAO,CAAC,IAAI,CAAC,CAgxCf"}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Mailbox WebSocket handlers (PR 8 of #30).
|
|
3
|
-
*
|
|
4
|
-
* Handles project-level inter-agent messaging for the WebUI:
|
|
5
|
-
* - mailbox.messages — query mailbox messages
|
|
6
|
-
* - mailbox.agents — query online/stored agent statuses
|
|
7
|
-
* - mailbox.clear — clear all mailbox messages
|
|
8
|
-
* - mailbox.purge — purge stale messages by age
|
|
9
|
-
* - mailbox.compact — remove expired, read-by-all, and stale messages
|
|
10
|
-
*/
|
|
11
|
-
import type { WebSocket } from 'ws';
|
|
12
|
-
import { GlobalMailbox, type EventBus } from '@wrongstack/core';
|
|
13
|
-
export interface MailboxContext {
|
|
14
|
-
/** Live agent reference for project-root access. */
|
|
15
|
-
agent: {
|
|
16
|
-
ctx: {
|
|
17
|
-
projectRoot?: string;
|
|
18
|
-
session?: {
|
|
19
|
-
id: string;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
/** Resolved path to global config (used to derive the mailbox root). */
|
|
24
|
-
globalConfigPath: string;
|
|
25
|
-
/** Event bus for broadcasting mailbox events to all clients. */
|
|
26
|
-
events: EventBus;
|
|
27
|
-
send(ws: WebSocket, msg: Record<string, unknown>): void;
|
|
28
|
-
broadcast(msg: Record<string, unknown>): void;
|
|
29
|
-
log(msg: string): void;
|
|
30
|
-
}
|
|
31
|
-
export declare function getMailbox(ctx: MailboxContext): GlobalMailbox | null;
|
|
32
|
-
export declare function handleMailboxMessages(ctx: MailboxContext, msg: {
|
|
33
|
-
payload?: {
|
|
34
|
-
limit?: number;
|
|
35
|
-
agentId?: string;
|
|
36
|
-
unreadOnly?: boolean;
|
|
37
|
-
incompleteOnly?: boolean;
|
|
38
|
-
};
|
|
39
|
-
}, ws: WebSocket): Promise<void>;
|
|
40
|
-
export declare function handleMailboxAgents(ctx: MailboxContext, msg: {
|
|
41
|
-
payload?: {
|
|
42
|
-
onlineOnly?: boolean;
|
|
43
|
-
};
|
|
44
|
-
}, ws: WebSocket): Promise<void>;
|
|
45
|
-
export declare function handleMailboxClear(ctx: MailboxContext, ws: WebSocket): Promise<void>;
|
|
46
|
-
export declare function handleMailboxPurge(ctx: MailboxContext, msg: {
|
|
47
|
-
payload?: {
|
|
48
|
-
completedMaxAgeMs?: number;
|
|
49
|
-
incompleteMaxAgeMs?: number;
|
|
50
|
-
};
|
|
51
|
-
}, ws: WebSocket): Promise<void>;
|
|
52
|
-
export declare function handleMailboxCompact(ctx: MailboxContext, msg: {
|
|
53
|
-
payload?: {
|
|
54
|
-
readMaxAgeMs?: number;
|
|
55
|
-
defaultTtlMs?: number;
|
|
56
|
-
completedMaxAgeMs?: number;
|
|
57
|
-
incompleteMaxAgeMs?: number;
|
|
58
|
-
};
|
|
59
|
-
}, ws: WebSocket): Promise<void>;
|
|
60
|
-
//# sourceMappingURL=mailbox.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mailbox.d.ts","sourceRoot":"","sources":["../../../src/webui-server/ws-handlers/mailbox.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AAEpC,OAAO,EAAE,aAAa,EAAqB,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEnF,MAAM,WAAW,cAAc;IAC7B,oDAAoD;IACpD,KAAK,EAAE;QAAE,GAAG,EAAE;YAAE,WAAW,CAAC,EAAE,MAAM,CAAC;YA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AAiB,CAAC,EAAE,MAAM,CAAC;QAAC,kBAAkB,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,EAC9E,EAAE,EAAE,SAAS,GACZ,OAAO,CAAC,IAAI,CAAC,CAef;AAED,wBAAsB,oBAAoB,CACxC,GAAG,EAAE,cAAc,EACnB,GAAG,EAAE;IACH,OAAO,CAAC,EAAE;QACR,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;KAC7B,CAAC;CACH,EACD,EAAE,EAAE,SAAS,GACZ,OAAO,CAAC,IAAI,CAAC,CAef"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Subscription OAuth login (ChatGPT / Claude / Copilot) for the embedded
|
|
3
|
-
* WebUI server. Mirrors the standalone server's `oauth-handlers`, but persists
|
|
4
|
-
* through the `ProviderConfigStore` on `WsHandlerContext`.
|
|
5
|
-
*
|
|
6
|
-
* The flow engine (`@wrongstack/providers/oauth`) is IO-free — it drives the
|
|
7
|
-
* loopback / device-code protocol and returns a persistence-agnostic outcome
|
|
8
|
-
* that we upsert here. Progress is surfaced to the client as `auth.oauth.status`.
|
|
9
|
-
*/
|
|
10
|
-
import { type OAuthKind } from '@wrongstack/providers/oauth';
|
|
11
|
-
import type { WebSocket } from 'ws';
|
|
12
|
-
import type { WsHandlerContext } from './index.js';
|
|
13
|
-
export declare function handleOAuthStart(ctx: WsHandlerContext, ws: WebSocket, kind: OAuthKind, customProviderId?: string): Promise<void>;
|
|
14
|
-
export declare function handleOAuthCode(ctx: WsHandlerContext, ws: WebSocket, kind: OAuthKind, input: string): Promise<void>;
|
|
15
|
-
export declare function handleOAuthCancel(ctx: WsHandlerContext, ws: WebSocket, kind: OAuthKind): void;
|
|
16
|
-
//# sourceMappingURL=oauth.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"oauth.d.ts","sourceRoot":"","sources":["../../../src/webui-server/ws-handlers/oauth.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAEL,KAAK,SAAS,EAGf,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AAEpC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAkEnD,wBAAsB,gBAAgB,CACpC,GAAG,EAAE,gBAAgB,EACrB,EAAE,EAAE,SAAS,EACb,IAAI,EAAE,SAAS,EACf,gBAAgB,CAAC,EAAE,MAAM,GACxB,OAAO,CAAC,IAAI,CAAC,CA8Cf;AAED,wBAAsB,eAAe,CACnC,GAAG,EAAE,gBAAgB,EACrB,EAAE,EAAE,SAAS,EACb,IAAI,EAAE,SAAS,EACf,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,IAAI,CAAC,CAkBf;AAED,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,gBAAgB,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,GAAG,IAAI,CAI7F"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { Agent } from '@wrongstack/core';
|
|
2
|
-
import type { WebSocket } from 'ws';
|
|
3
|
-
import { type PendingConfirm } from './connection.js';
|
|
4
|
-
import type { WsCommon } from './index.js';
|
|
5
|
-
/**
|
|
6
|
-
* PR 5f of Issue #30: preference WebSocket handlers — `prefs.get`,
|
|
7
|
-
* `prefs.update`, and `autonomy.switch`.
|
|
8
|
-
*
|
|
9
|
-
* The durable logic (which keys are persisted, the config.json key
|
|
10
|
-
* mapping, and the live pref snapshot off `ctx.meta`) lives in runWebUI's
|
|
11
|
-
* `prefSnapshot` / `persistPrefsToConfig` closures and the host's real
|
|
12
|
-
* autonomy setter; they're threaded in here as callbacks. The handlers
|
|
13
|
-
* themselves just write `ctx.meta`, fan the snapshot out, and persist.
|
|
14
|
-
*/
|
|
15
|
-
export interface PrefsContext extends WsCommon {
|
|
16
|
-
/** The running agent — preferences live on `agent.ctx.meta`. */
|
|
17
|
-
agent: Agent;
|
|
18
|
-
/** Snapshot the durable prefs off ctx.meta (runWebUI closure). */
|
|
19
|
-
prefSnapshot: () => Record<string, unknown>;
|
|
20
|
-
/** Persist the durable keys to config.json, fire-and-forget (runWebUI closure). */
|
|
21
|
-
persistPrefs: (payload: Record<string, unknown>) => Promise<void>;
|
|
22
|
-
/** Flip the host's live YOLO permission policy, if wired. */
|
|
23
|
-
onYoloSwitch: ((enabled: boolean) => void) | undefined;
|
|
24
|
-
/** Flip the CLI's real autonomy state (same setter the TUI uses), if wired. */
|
|
25
|
-
onAutonomySwitch: ((mode: string) => void) | undefined;
|
|
26
|
-
/** Pending tool confirmations — drained to yes when YOLO is enabled. */
|
|
27
|
-
pendingConfirms: Map<string, PendingConfirm>;
|
|
28
|
-
/** ConfigStore for live fallback/chain propagation. */
|
|
29
|
-
configStore?: import('@wrongstack/core').ConfigStore | undefined;
|
|
30
|
-
}
|
|
31
|
-
export declare function handlePrefsGet(ctx: PrefsContext, ws: WebSocket): void;
|
|
32
|
-
export declare function handlePrefsUpdate(ctx: PrefsContext, _ws: WebSocket, payload: Record<string, unknown>): void;
|
|
33
|
-
export declare function handleAutonomySwitch(ctx: PrefsContext, ws: WebSocket, mode: string): void;
|
|
34
|
-
//# sourceMappingURL=prefs.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prefs.d.ts","sourceRoot":"","sources":["../../../src/webui-server/ws-handlers/prefs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,EAAE,KAAK,cAAc,EAAsC,MAAM,iBAAiB,CAAC;AAC1F,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C;;;;;;;;;GASG;AAEH,MAAM,WAAW,YAAa,SAAQ,QAAQ;IAC5C,gEAAgE;IAChE,KAAK,EAAE,KAAK,CAAC;IACb,kEAAkE;IAClE,YAAY,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC5C,mFAAmF;IACnF,YAAY,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAClE,6DAA6D;IAC7D,YAAY,EAAE,CAAC,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IACvD,+EAA+E;IAC/E,gBAAgB,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IACvD,wEAAwE;IACxE,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAC7C,uDAAuD;IACvD,WAAW,CAAC,EAAE,OAAO,kBAAkB,EAAE,WAAW,GAAG,SAAS,CAAC;CAClE;AAMD,wBAAgB,cAAc,CAAC,GAAG,EAAE,YAAY,EAAE,EAAE,EAAE,SAAS,GAAG,IAAI,CAIrE;AAED,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,YAAY,EACjB,GAAG,EAAE,SAAS,EACd,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B,IAAI,CAmDN;AAED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,YAAY,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAQzF"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { WebSocket } from 'ws';
|
|
2
|
-
import type { WsCommon } from './index.js';
|
|
3
|
-
export declare function handleProcessList(ctx: WsCommon, ws: WebSocket): void;
|
|
4
|
-
export declare function handleProcessKill(ctx: WsCommon, ws: WebSocket, pid: number): void;
|
|
5
|
-
export declare function handleProcessKillAll(ctx: WsCommon, ws: WebSocket): void;
|
|
6
|
-
//# sourceMappingURL=process.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"process.d.ts","sourceRoot":"","sources":["../../../src/webui-server/ws-handlers/process.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAgB3C,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,GAAG,IAAI,CAmBpE;AAED,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAYjF;AAED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,GAAG,IAAI,CAOvE"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { type Agent, type MemoryStore, type ModeStore, type SessionStore, type SessionWriter, type SkillLoader } from '@wrongstack/core';
|
|
2
|
-
import type { WebSocket } from 'ws';
|
|
3
|
-
import type { WsCommon } from './index.js';
|
|
4
|
-
/**
|
|
5
|
-
* CLI-embedded WebUI project handlers.
|
|
6
|
-
*
|
|
7
|
-
* The standalone WebUI/desktop launcher owns project selection for that
|
|
8
|
-
* surface, but the CLI-embedded WebUI still supports in-process registration
|
|
9
|
-
* and project switching so the browser stays attached to the same live agent.
|
|
10
|
-
*/
|
|
11
|
-
/** The subset of CliWebUIOptions the project handlers read/mutate. Passed by reference. */
|
|
12
|
-
export interface ProjectsOptions {
|
|
13
|
-
projectRoot?: string | undefined;
|
|
14
|
-
globalConfigPath?: string | undefined;
|
|
15
|
-
agent: Agent;
|
|
16
|
-
modeId?: string | undefined;
|
|
17
|
-
modeStore?: ModeStore | undefined;
|
|
18
|
-
memoryStore?: MemoryStore | undefined;
|
|
19
|
-
skillLoader?: SkillLoader | undefined;
|
|
20
|
-
sessionStore?: SessionStore | undefined;
|
|
21
|
-
session: SessionWriter;
|
|
22
|
-
onSessionSwapped?: ((newSessionId: string) => void) | undefined;
|
|
23
|
-
}
|
|
24
|
-
export interface ProjectsContext extends WsCommon {
|
|
25
|
-
/** The live options object used by projects.list and working_dir.set. */
|
|
26
|
-
opts: ProjectsOptions;
|
|
27
|
-
/** Kept for compatibility with the embedded WebUI context wiring. */
|
|
28
|
-
abortControllers: Map<WebSocket, AbortController>;
|
|
29
|
-
/** Kept for compatibility with the embedded WebUI context wiring. */
|
|
30
|
-
abortLegacyRun: () => void;
|
|
31
|
-
/** Kept for compatibility with the embedded WebUI context wiring. */
|
|
32
|
-
buildSessionStart: (overrides?: Record<string, unknown>) => Promise<unknown>;
|
|
33
|
-
}
|
|
34
|
-
export declare function handleProjectsList(ctx: ProjectsContext, ws: WebSocket): Promise<void>;
|
|
35
|
-
export declare function handleProjectsSelect(ctx: ProjectsContext, ws: WebSocket, payload: {
|
|
36
|
-
root: string;
|
|
37
|
-
name?: string | undefined;
|
|
38
|
-
}): Promise<void>;
|
|
39
|
-
export declare function handleProjectsAdd(ctx: ProjectsContext, ws: WebSocket, payload: {
|
|
40
|
-
root: string;
|
|
41
|
-
name?: string | undefined;
|
|
42
|
-
}): Promise<void>;
|
|
43
|
-
export declare function handleWorkingDirSet(ctx: ProjectsContext, ws: WebSocket, newPath: string): Promise<void>;
|
|
44
|
-
//# sourceMappingURL=projects.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../../../src/webui-server/ws-handlers/projects.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,KAAK,EAEV,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,WAAW,EAGjB,MAAM,kBAAkB,CAAC;AAC1B,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,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GACnD,OAAO,CAAC,IAAI,CAAC,CAoFf;AAED,wBAAsB,iBAAiB,CACrC,GAAG,EAAE,eAAe,EACpB,EAAE,EAAE,SAAS,EACb,OAAO,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GACnD,OAAO,CAAC,IAAI,CAAC,CAqCf;AAED,wBAAsB,mBAAmB,CACvC,GAAG,EAAE,eAAe,EACpB,EAAE,EAAE,SAAS,EACb,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,IAAI,CAAC,CAmBf"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import type { ProviderConfig } from '@wrongstack/core';
|
|
2
|
-
import type { WebSocket } from 'ws';
|
|
3
|
-
import { type AgentConfigContext } from './agent-config.js';
|
|
4
|
-
import type { WsHandlerContext } from './index.js';
|
|
5
|
-
export declare function broadcastSaved(ctx: WsHandlerContext, providers: Record<string, ProviderConfig>): void;
|
|
6
|
-
export declare function handleProvidersList(ctx: WsHandlerContext, ws: WebSocket): Promise<void>;
|
|
7
|
-
export declare function handleProviderModels(ctx: WsHandlerContext, ws: WebSocket, providerId: string): Promise<void>;
|
|
8
|
-
export declare function handleProvidersSaved(ctx: WsHandlerContext, ws: WebSocket): Promise<void>;
|
|
9
|
-
export declare function handleKeyUpsert(ctx: WsHandlerContext, ws: WebSocket, providerId: string, label: string, apiKey: string): Promise<void>;
|
|
10
|
-
export declare function handleKeyDelete(ctx: WsHandlerContext, ws: WebSocket, providerId: string, label: string): Promise<void>;
|
|
11
|
-
export declare function handleKeySetActive(ctx: WsHandlerContext, ws: WebSocket, providerId: string, label: string): Promise<void>;
|
|
12
|
-
export declare function handleProviderAdd(ctx: WsHandlerContext, ws: WebSocket, payload: {
|
|
13
|
-
id: string;
|
|
14
|
-
family: string;
|
|
15
|
-
baseUrl?: string | undefined;
|
|
16
|
-
apiKey?: string | undefined;
|
|
17
|
-
}): Promise<void>;
|
|
18
|
-
/**
|
|
19
|
-
* Adopt `providerId` as the live agent's active provider/model when the agent
|
|
20
|
-
* has no usable model yet — the in-session counterpart to the boot auto-select,
|
|
21
|
-
* so the first provider a user adds in the WebUI is immediately usable instead
|
|
22
|
-
* of leaving a blank model. No-op (never hijacks) once any model is active.
|
|
23
|
-
* Resolves the model from the saved allowlist, then the catalog, then a live
|
|
24
|
-
* `/v1/models` probe. Best-effort: a failure just leaves the state unchanged.
|
|
25
|
-
*/
|
|
26
|
-
export declare function adoptDefaultProviderIfUnset(agentCtx: AgentConfigContext, wsCtx: WsHandlerContext, providerId: string): Promise<void>;
|
|
27
|
-
export declare function handleProviderRemove(ctx: WsHandlerContext, ws: WebSocket, providerId: string): Promise<void>;
|
|
28
|
-
/** Drop a provider's model allowlist (so the full catalog is offered again). */
|
|
29
|
-
export declare function handleProviderClearModels(ctx: WsHandlerContext, ws: WebSocket, providerId: string): Promise<void>;
|
|
30
|
-
/** Restore a previously-cleared model allowlist (pairs with clear). */
|
|
31
|
-
export declare function handleProviderUndoClear(ctx: WsHandlerContext, ws: WebSocket, providerId: string, previousModels: string[]): Promise<void>;
|
|
32
|
-
/** Update a saved provider's wire config (family / baseUrl / envVars / models). */
|
|
33
|
-
export declare function handleProviderUpdate(ctx: WsHandlerContext, ws: WebSocket, payload: {
|
|
34
|
-
id: string;
|
|
35
|
-
family?: string | undefined;
|
|
36
|
-
baseUrl?: string | undefined;
|
|
37
|
-
envVars?: string[] | undefined;
|
|
38
|
-
models?: string[] | undefined;
|
|
39
|
-
}): Promise<void>;
|
|
40
|
-
/**
|
|
41
|
-
* Run a health probe against a saved provider's `/v1/models` and reply with a
|
|
42
|
-
* `provider.probe` message. Never throws — the probe result carries the
|
|
43
|
-
* failure mode in its `status`.
|
|
44
|
-
*/
|
|
45
|
-
export declare function handleProviderProbe(ctx: WsHandlerContext, ws: WebSocket, providerId: string, timeoutMs?: number): Promise<void>;
|
|
46
|
-
//# sourceMappingURL=providers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../../../src/webui-server/ws-handlers/providers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAOvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AASpC,OAAO,EAAE,KAAK,kBAAkB,EAAoB,MAAM,mBAAmB,CAAC;AAC9E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAkGnD,wBAAgB,cAAc,CAC5B,GAAG,EAAE,gBAAgB,EACrB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,GACxC,IAAI,CAKN;AAED,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,gBAAgB,EAAE,EAAE,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CA2B7F;AAED,wBAAsB,oBAAoB,CACxC,GAAG,EAAE,gBAAgB,EACrB,EAAE,EAAE,SAAS,EACb,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,IAAI,CAAC,CAqDf;AAED,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,gBAAgB,EAAE,EAAE,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAU9F;AAED,wBAAsB,eAAe,CACnC,GAAG,EAAE,gBAAgB,EACrB,EAAE,EAAE,SAAS,EACb,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,IAAI,CAAC,CAiCf;AAED,wBAAsB,eAAe,CACnC,GAAG,EAAE,gBAAgB,EACrB,EAAE,EAAE,SAAS,EACb,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,IAAI,CAAC,CAwBf;AAED,wBAAsB,kBAAkB,CACtC,GAA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