@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,21 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WebSocket connection handler for the CLI WebUI bridge.
|
|
3
|
-
*
|
|
4
|
-
* One `wss.on('connection', ...)` per browser tab: per-socket error
|
|
5
|
-
* handling (attached first, before any awaited work — an oversized inbound
|
|
6
|
-
* frame or other socket-level error must never crash the process), auth via
|
|
7
|
-
* the shared `verifyClient` policy, client registration (map entry + the
|
|
8
|
-
* per-panel WS handlers), per-connection rate limiting, message dispatch,
|
|
9
|
-
* close cleanup, and the initial `session.start` push.
|
|
10
|
-
*
|
|
11
|
-
* PR 14 of Issue #30: extracted from `webui-server.ts`.
|
|
12
|
-
*/
|
|
13
1
|
import type { IncomingMessage } from 'node:http';
|
|
14
|
-
import type { Message, Usage } from '@wrongstack/core';
|
|
15
|
-
import type { GoalWebSocketHandler, SddBoardWebSocketHandler, SddWizardWebSocketHandler, SpecsWebSocketHandler, TerminalWebSocketHandler, WorktreeWebSocketHandler } from '@wrongstack/webui-server';
|
|
2
|
+
import type { Message, Usage } from '@wrongstack/core/types';
|
|
3
|
+
import type { GoalWebSocketHandler, PendingConfirm, SddBoardWebSocketHandler, SddWizardWebSocketHandler, SpecsWebSocketHandler, TerminalWebSocketHandler, WorktreeWebSocketHandler } from '@wrongstack/webui-server';
|
|
16
4
|
import type { WebSocket } from 'ws';
|
|
17
|
-
import {
|
|
18
|
-
import type { WSClientMessage, WSServerMessage } from '../webui-server.js';
|
|
5
|
+
import type { WSClientMessage, WSServerMessage } from './contracts.js';
|
|
19
6
|
export interface ConnectedClient {
|
|
20
7
|
ws: WebSocket;
|
|
21
8
|
sessionId: string | null;
|
|
@@ -34,7 +21,6 @@ export interface ConnectionHandlerDeps {
|
|
|
34
21
|
sddWizardHandler: SddWizardWebSocketHandler | null;
|
|
35
22
|
worktreeHandler: WorktreeWebSocketHandler;
|
|
36
23
|
terminalHandler: TerminalWebSocketHandler;
|
|
37
|
-
/** 0 = disabled (default; this is a local, single-user tool). */
|
|
38
24
|
rateLimitMax: number;
|
|
39
25
|
send: (ws: WebSocket, msg: WSServerMessage) => void;
|
|
40
26
|
sessionPayload: <T extends Record<string, unknown>>(payload: T) => T & {
|
|
@@ -44,20 +30,10 @@ export interface ConnectionHandlerDeps {
|
|
|
44
30
|
abortControllers: Map<WebSocket, AbortController>;
|
|
45
31
|
pendingConfirms: Map<string, PendingConfirm>;
|
|
46
32
|
buildSessionStartPayload: (overrides?: Record<string, unknown>, needsSetup?: boolean) => Promise<Record<string, unknown>>;
|
|
47
|
-
/**
|
|
48
|
-
* Load the visible chat transcript for a reconnecting browser tab. This
|
|
49
|
-
* should read the session log when available; `context.messages` is only a
|
|
50
|
-
* fallback because it is the model working set and can be compacted.
|
|
51
|
-
*/
|
|
52
33
|
loadReplay?: (() => Promise<{
|
|
53
34
|
messages: Message[];
|
|
54
35
|
usage?: Usage | undefined;
|
|
55
36
|
} | null>) | undefined;
|
|
56
|
-
/**
|
|
57
|
-
* Read-only worker transcript snapshot for browser refresh/resume. Async
|
|
58
|
-
* because a resumed process has an empty ring and must read the transcripts
|
|
59
|
-
* back from disk.
|
|
60
|
-
*/
|
|
61
37
|
loadAgentSessions?: (() => Promise<import('@wrongstack/core/coordination').AgentVirtualSession[]>) | undefined;
|
|
62
38
|
needsSetup: boolean;
|
|
63
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection-handler.d.ts","sourceRoot":"","sources":["../../src/webui-server/connection-handler.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"connection-handler.d.ts","sourceRoot":"","sources":["../../src/webui-server/connection-handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,KAAK,EACV,oBAAoB,EACpB,cAAc,EACd,wBAAwB,EACxB,yBAAyB,EACzB,qBAAqB,EACrB,wBAAwB,EACxB,wBAAwB,EACzB,MAAM,0BAA0B,CAAC;AAMlC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEvE,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,SAAS,CAAC;IACd,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAID,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,OAAO,EAAE,GAAG,CAAC,SAAS,EAAE,eAAe,CAAC,CAAC;IACzC,gBAAgB,EAAE,MAAM,MAAM,CAAC;IAC/B,WAAW,EAAE,oBAAoB,CAAC;IAClC,YAAY,EAAE,qBAAqB,CAAC;IACpC,eAAe,EAAE,wBAAwB,CAAC;IAC1C,gBAAgB,EAAE,yBAAyB,GAAG,IAAI,CAAC;IACnD,eAAe,EAAE,wBAAwB,CAAC;IAC1C,eAAe,EAAE,wBAAwB,CAAC;IAC1C,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,CAAC,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,eAAe,KAAK,IAAI,CAAC;IACpD,cAAc,EAAE,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC,KAAK,CAAC,GAAG;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;IAC7F,aAAa,EAAE,CAAC,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,eAAe,EAAE,GAAG,EAAE,eAAe,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/F,gBAAgB,EAAE,GAAG,CAAC,SAAS,EAAE,eAAe,CAAC,CAAC;IAClD,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAC7C,wBAAwB,EAAE,CACxB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACnC,UAAU,CAAC,EAAE,OAAO,KACjB,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACtC,UAAU,CAAC,EACP,CAAC,MAAM,OAAO,CAAC;QAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;QAAC,KAAK,CAAC,EAAE,KAAK,GAAG,SAAS,CAAA;KAAE,GAAG,IAAI,CAAC,CAAC,GAC1E,SAAS,CAAC;IACd,iBAAiB,CAAC,EACd,CAAC,MAAM,OAAO,CAAC,OAAO,+BAA+B,EAAE,mBAAmB,EAAE,CAAC,CAAC,GAC9E,SAAS,CAAC;IACd,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,qBAAqB,GAC1B,CAAC,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,eAAe,KAAK,OAAO,CAAC,IAAI,CAAC,CA+FxD"}
|
|
@@ -1,57 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
text?: string | undefined;
|
|
3
|
-
}
|
|
4
|
-
interface ToolLike {
|
|
5
|
-
name: string;
|
|
6
|
-
inputSchema?: unknown;
|
|
7
|
-
description?: string;
|
|
8
|
-
}
|
|
9
|
-
interface MessageLike {
|
|
10
|
-
role: string;
|
|
11
|
-
content: unknown;
|
|
12
|
-
}
|
|
13
|
-
export type { PromptBlock, ToolLike, MessageLike };
|
|
14
|
-
/**
|
|
15
|
-
* Compute the per-section token breakdown for a session.
|
|
16
|
-
*
|
|
17
|
-
* The shape is preserved exactly as the pre-refactor inline
|
|
18
|
-
* code produced it: `total` is the sum across sections;
|
|
19
|
-
* `systemPrompt` is its own total (no breakdown — the
|
|
20
|
-
* system prompt is opaque); `tools` carries the count and
|
|
21
|
-
* a per-tool token count; `messages` carries the count, the
|
|
22
|
-
* total, and a per-message `{ index, role, tokens, preview }`
|
|
23
|
-
* row.
|
|
24
|
-
*
|
|
25
|
-
* Empty inputs are valid: the totals come out to 0 and the
|
|
26
|
-
* `breakdown` arrays are empty. The pre-refactor code
|
|
27
|
-
* handled this implicitly (the `.reduce` over an empty
|
|
28
|
-
* array returns 0); the extracted helper pins that
|
|
29
|
-
* behavior with explicit tests.
|
|
30
|
-
*/
|
|
31
|
-
export declare function estimateContextBreakdown(input: {
|
|
32
|
-
systemPrompt: ReadonlyArray<PromptBlock>;
|
|
33
|
-
tools: ReadonlyArray<ToolLike>;
|
|
34
|
-
messages: ReadonlyArray<MessageLike>;
|
|
35
|
-
}): {
|
|
36
|
-
total: number;
|
|
37
|
-
systemPrompt: number;
|
|
38
|
-
tools: {
|
|
39
|
-
total: number;
|
|
40
|
-
count: number;
|
|
41
|
-
breakdown: Array<{
|
|
42
|
-
name: string;
|
|
43
|
-
tokens: number;
|
|
44
|
-
}>;
|
|
45
|
-
};
|
|
46
|
-
messages: {
|
|
47
|
-
total: number;
|
|
48
|
-
count: number;
|
|
49
|
-
breakdown: Array<{
|
|
50
|
-
index: number;
|
|
51
|
-
role: string;
|
|
52
|
-
tokens: number;
|
|
53
|
-
preview: string;
|
|
54
|
-
}>;
|
|
55
|
-
};
|
|
56
|
-
};
|
|
1
|
+
export { estimateContextBreakdown, type ContextBreakdown } from '@wrongstack/webui-server';
|
|
57
2
|
//# sourceMappingURL=context-breakdown.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-breakdown.d.ts","sourceRoot":"","sources":["../../src/webui-server/context-breakdown.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"context-breakdown.d.ts","sourceRoot":"","sources":["../../src/webui-server/context-breakdown.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,KAAK,gBAAgB,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dependency-free wire contracts shared by the embedded CLI WebUI host.
|
|
3
|
+
*
|
|
4
|
+
* Keep these shapes outside `webui-server.ts`: connection and routing modules
|
|
5
|
+
* are dependencies of that composition root and must not import back from it.
|
|
6
|
+
*/
|
|
7
|
+
export interface WSServerMessage {
|
|
8
|
+
type: string;
|
|
9
|
+
payload: unknown;
|
|
10
|
+
}
|
|
11
|
+
export interface WSClientMessage {
|
|
12
|
+
type: string;
|
|
13
|
+
payload?: unknown | undefined;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=contracts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../src/webui-server/contracts.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC/B"}
|
|
@@ -1,29 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export interface CostRates {
|
|
3
|
-
input: number;
|
|
4
|
-
output: number;
|
|
5
|
-
cacheRead: number;
|
|
6
|
-
}
|
|
7
|
-
/** Token counts for a turn/session. */
|
|
8
|
-
export interface TokenUsage {
|
|
9
|
-
input: number;
|
|
10
|
-
output: number;
|
|
11
|
-
cacheRead?: number | undefined;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Extract per-million-token pricing from a model record. Returns
|
|
15
|
-
* zeros when the model is null/undefined, has no `cost` field, or
|
|
16
|
-
* is missing individual rate fields. The `cache_read` snake_case
|
|
17
|
-
* is preserved as-is from the upstream schema — renaming to
|
|
18
|
-
* `cacheRead` happens at the boundary.
|
|
19
|
-
*/
|
|
20
|
-
export declare function getCostRates(model: unknown): CostRates;
|
|
21
|
-
/**
|
|
22
|
-
* Compute the per-turn cost in USD for the given token usage
|
|
23
|
-
* and per-million rates. The cache-read branch is optional:
|
|
24
|
-
* when `usage.cacheRead` is undefined it contributes 0 to the
|
|
25
|
-
* total. The final value is the per-million-scaled sum, not
|
|
26
|
-
* the per-token cost.
|
|
27
|
-
*/
|
|
28
|
-
export declare function computeUsageCost(usage: TokenUsage, rates: CostRates): number;
|
|
1
|
+
export { computeUsageCost, getCostRates, type CostRates, type TokenUsage, } from '@wrongstack/webui-server';
|
|
29
2
|
//# sourceMappingURL=cost-helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cost-helpers.d.ts","sourceRoot":"","sources":["../../src/webui-server/cost-helpers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cost-helpers.d.ts","sourceRoot":"","sources":["../../src/webui-server/cost-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,KAAK,SAAS,EACd,KAAK,UAAU,GAChB,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type Agent } from '@wrongstack/core/agent';
|
|
2
|
+
import { type AgentFactory, type BrainArbiter } from '@wrongstack/core/coordination';
|
|
3
|
+
import { type Config, type SkillLoader } from '@wrongstack/core/types';
|
|
4
|
+
import { type EventBus } from '@wrongstack/core/kernel';
|
|
5
|
+
import { type GoalWebSocketHandler, type KanbanHostRouteHandlers, type WSServerMessage } from '@wrongstack/webui-server';
|
|
6
|
+
import type { WebSocket } from 'ws';
|
|
7
|
+
import type { KanbanSupervisor } from './kanban-supervisor.js';
|
|
8
|
+
export type KanbanSupervisorPort = KanbanSupervisor;
|
|
9
|
+
interface CliKanbanHostAdapterDeps {
|
|
10
|
+
opts: {
|
|
11
|
+
agent: Agent;
|
|
12
|
+
events: EventBus;
|
|
13
|
+
projectRoot?: string | undefined;
|
|
14
|
+
appConfig?: Config | undefined;
|
|
15
|
+
skillLoader?: SkillLoader | undefined;
|
|
16
|
+
sddSubagentFactory?: AgentFactory | undefined;
|
|
17
|
+
brain?: BrainArbiter | undefined;
|
|
18
|
+
};
|
|
19
|
+
send: (ws: WebSocket, msg: WSServerMessage) => void;
|
|
20
|
+
goalHandler: GoalWebSocketHandler;
|
|
21
|
+
kanbanSupervisor?: KanbanSupervisorPort | undefined;
|
|
22
|
+
}
|
|
23
|
+
export declare function createCliKanbanHostRoutes(deps: CliKanbanHostAdapterDeps): KanbanHostRouteHandlers;
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=kanban-host-adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kanban-host-adapter.d.ts","sourceRoot":"","sources":["../../src/webui-server/kanban-host-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,+BAA+B,CAAC;AACrF,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAEvE,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAIxD,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAE5B,KAAK,eAAe,EACrB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,MAAM,MAAM,oBAAoB,GAAG,gBAAgB,CAAC;AAEpD,UAAU,wBAAwB;IAChC,IAAI,EAAE;QACJ,KAAK,EAAE,KAAK,CAAC;QACb,MAAM,EAAE,QAAQ,CAAC;QACjB,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QACjC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAC/B,WAAW,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;QACtC,kBAAkB,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;QAC9C,KAAK,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;KAClC,CAAC;IACF,IAAI,EAAE,CAAC,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,eAAe,KAAK,IAAI,CAAC;IACpD,WAAW,EAAE,oBAAoB,CAAC;IAClC,gBAAgB,CAAC,EAAE,oBAAoB,GAAG,SAAS,CAAC;CACrD;AAED,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,wBAAwB,GAAG,uBAAuB,CA6IjG"}
|
|
@@ -1,77 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* KanbanRunMirror — projects live Goal / SDD runs into `@wrongstack/kanban`
|
|
3
|
-
* boards so the kanban view becomes the unified LIVE surface for both engines.
|
|
4
|
-
*
|
|
5
|
-
* It is fed two ways (both in the CLI-hosted webui-server process, the only
|
|
6
|
-
* place with the shared EventBus + both live handlers):
|
|
7
|
-
* - SDD: subscribe to `sdd.board.snapshot` on the shared bus.
|
|
8
|
-
* - Goal: a callback tap on `GoalWebSocketHandler` (that orchestrator
|
|
9
|
-
* does NOT emit PhaseEventMap on the bus), delivering its `buildState()`.
|
|
10
|
-
*
|
|
11
|
-
* Each run maps to ONE kanban board. Linkage lives in board TAGS (not
|
|
12
|
-
* generatedBy, which `syncBoardFromTaskGraph` overwrites):
|
|
13
|
-
* ['sdd', 'run:<runId>', 'graph:<graphId>'] or ['goal', 'graph:<graphId>']
|
|
14
|
-
*
|
|
15
|
-
* Reconcile per tick is a two-pass, both idempotent:
|
|
16
|
-
* 1. `syncBoardFromTaskGraph` — structure + status→column + deps + origin-keyed
|
|
17
|
-
* create/update/archive.
|
|
18
|
-
* 2. targeted, diff-guarded `updateTaskAssignment` overlay for the LIVE subset
|
|
19
|
-
* only (running/completed/failed/cancelled/assigned tasks) so the inspector's
|
|
20
|
-
* AgentRunPanel lights up with the real worker + model — without fabricating
|
|
21
|
-
* phantom assignments or a per-tick event storm.
|
|
22
|
-
*/
|
|
23
|
-
import type { EventBus } from '@wrongstack/core';
|
|
24
|
-
import { type SerializedTaskGraph, type TaskNode } from '@wrongstack/core';
|
|
25
|
-
import type { SddBoardSnapshot } from '@wrongstack/sdd';
|
|
26
|
-
type Engine = 'sdd' | 'goal';
|
|
27
|
-
interface WSServerMessage {
|
|
28
|
-
type: string;
|
|
29
|
-
payload: unknown;
|
|
30
|
-
}
|
|
31
|
-
export interface KanbanRunMirrorDeps {
|
|
32
|
-
projectRoot: string;
|
|
33
|
-
events?: EventBus | undefined;
|
|
34
|
-
broadcast: (msg: WSServerMessage) => void;
|
|
35
|
-
log?: ((msg: string) => void) | undefined;
|
|
36
|
-
}
|
|
37
|
-
/** Loose shape of the Goal `buildState()` projection we consume. */
|
|
38
|
-
interface GoalState {
|
|
39
|
-
title?: string;
|
|
40
|
-
goal?: string;
|
|
41
|
-
phases?: Array<{
|
|
42
|
-
id: string;
|
|
43
|
-
name?: string;
|
|
44
|
-
tasks?: Array<{
|
|
45
|
-
id: string;
|
|
46
|
-
title: string;
|
|
47
|
-
description?: string;
|
|
48
|
-
status: TaskNode['status'];
|
|
49
|
-
priority: TaskNode['priority'];
|
|
50
|
-
type: TaskNode['type'];
|
|
51
|
-
assignee?: string;
|
|
52
|
-
startedAt?: number;
|
|
53
|
-
completedAt?: number;
|
|
54
|
-
}>;
|
|
55
|
-
}>;
|
|
56
|
-
}
|
|
57
|
-
export interface KanbanRunMirror {
|
|
58
|
-
/** Goal tap — the handler's `onBoardState(graphId, state)` callback. */
|
|
59
|
-
onGoalState(graphId: string, state: Record<string, unknown>): void;
|
|
60
|
-
/** Bind a runId to a specific board (used by launch-from-board, phase 4). */
|
|
61
|
-
bind(engine: Engine, key: string, boardId: string): void;
|
|
62
|
-
/**
|
|
63
|
-
* One-shot: the NEXT Goal run whose graphId we haven't seen binds to this
|
|
64
|
-
* board instead of creating a new one. Used by launch-from-board — the graphId
|
|
65
|
-
* is only known after the async build, so we can't `bind()` up front.
|
|
66
|
-
*/
|
|
67
|
-
bindGoalNext(boardId: string): void;
|
|
68
|
-
dispose(): void;
|
|
69
|
-
}
|
|
70
|
-
export declare function createKanbanRunMirror(deps: KanbanRunMirrorDeps): KanbanRunMirror;
|
|
71
|
-
/** Build a serialized TaskGraph from an SDD board snapshot (faithful; runtime in metadata). */
|
|
72
|
-
export declare function buildTaskGraphFromSddSnapshot(snapshot: SddBoardSnapshot): SerializedTaskGraph;
|
|
73
|
-
type GoalPhase = NonNullable<GoalState['phases']>[number];
|
|
74
|
-
/** Build a serialized TaskGraph for one Goal phase (graph.id = RUN graphId; phase scoped via sync phaseId). */
|
|
75
|
-
export declare function buildTaskGraphFromGoalPhase(graphId: string, title: string, phase: GoalPhase): SerializedTaskGraph;
|
|
76
|
-
export {};
|
|
1
|
+
export { buildTaskGraphFromGoalPhase, buildTaskGraphFromSddSnapshot, createKanbanRunMirror, type KanbanRunMirror, type KanbanRunMirrorDeps, } from '@wrongstack/webui-server';
|
|
77
2
|
//# sourceMappingURL=kanban-run-mirror.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kanban-run-mirror.d.ts","sourceRoot":"","sources":["../../src/webui-server/kanban-run-mirror.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"kanban-run-mirror.d.ts","sourceRoot":"","sources":["../../src/webui-server/kanban-run-mirror.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2BAA2B,EAC3B,6BAA6B,EAC7B,qBAAqB,EACrB,KAAK,eAAe,EACpB,KAAK,mBAAmB,GACzB,MAAM,0BAA0B,CAAC"}
|
|
@@ -1,48 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
interface DispatchOptions {
|
|
3
|
-
provider?: string | undefined;
|
|
4
|
-
model?: string | undefined;
|
|
5
|
-
fallbackProfile?: string | undefined;
|
|
6
|
-
fallbackModels?: string[] | undefined;
|
|
7
|
-
skills?: string[] | undefined;
|
|
8
|
-
name?: string | undefined;
|
|
9
|
-
/**
|
|
10
|
-
* Free-form task context propagated into the spawned `TaskSpec.context`.
|
|
11
|
-
* The supervisor forwards kanban identity from the board/task snapshot so
|
|
12
|
-
* the tool-runtime boundary gate can resolve the live policy.
|
|
13
|
-
*/
|
|
14
|
-
context?: {
|
|
15
|
-
kanban?: {
|
|
16
|
-
boardId?: string;
|
|
17
|
-
taskId?: string;
|
|
18
|
-
projectRoot?: string;
|
|
19
|
-
};
|
|
20
|
-
} | undefined;
|
|
21
|
-
onDone?: ((result: {
|
|
22
|
-
status: 'completed' | 'failed';
|
|
23
|
-
result?: string | undefined;
|
|
24
|
-
error?: string | undefined;
|
|
25
|
-
}) => void | Promise<void>) | undefined;
|
|
26
|
-
}
|
|
27
|
-
export interface KanbanSupervisorDeps {
|
|
28
|
-
projectRoot: string;
|
|
29
|
-
broadcast: (message: {
|
|
30
|
-
type: string;
|
|
31
|
-
payload: unknown;
|
|
32
|
-
}) => void;
|
|
33
|
-
dispatchTask?: ((description: string, opts?: DispatchOptions) => Promise<string>) | undefined;
|
|
34
|
-
log?: ((message: string) => void) | undefined;
|
|
35
|
-
}
|
|
36
|
-
export interface KanbanSupervisor {
|
|
37
|
-
getSnapshot(boardId: string): KanbanSupervisorSnapshot | undefined;
|
|
38
|
-
auditNow(boardId?: string): Promise<KanbanSupervisorSnapshot[]>;
|
|
39
|
-
dispose(): void;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Quiet, project-local board custodian. The frequent pass is deterministic and
|
|
43
|
-
* free; an LLM is spawned only when the board explicitly opts into agentic mode
|
|
44
|
-
* and the health snapshot contains an anomaly.
|
|
45
|
-
*/
|
|
46
|
-
export declare function createKanbanSupervisor(deps: KanbanSupervisorDeps): KanbanSupervisor;
|
|
47
|
-
export {};
|
|
1
|
+
export { createKanbanSupervisor, type KanbanSupervisor, type KanbanSupervisorDeps, type KanbanSupervisorDispatchOptions, } from '@wrongstack/webui-server';
|
|
48
2
|
//# sourceMappingURL=kanban-supervisor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kanban-supervisor.d.ts","sourceRoot":"","sources":["../../src/webui-server/kanban-supervisor.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"kanban-supervisor.d.ts","sourceRoot":"","sources":["../../src/webui-server/kanban-supervisor.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,+BAA+B,GACrC,MAAM,0BAA0B,CAAC"}
|
|
@@ -1,112 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* PR 7 of Issue #30 (webui-server 8-PR refactor): process lifecycle.
|
|
4
|
-
*
|
|
5
|
-
* Three concerns pulled out of the ~3000-line `runWebUI` body:
|
|
6
|
-
*
|
|
7
|
-
* - `registerWebuiInstance` — record this embedded WebUI in the shared
|
|
8
|
-
* running-instance registry (so `wstack --webui --list` sees it).
|
|
9
|
-
* - `announceWebuiReady` — log the ready banner and pop the browser
|
|
10
|
-
* once the HTTP server is listening.
|
|
11
|
-
* - `createWebuiShutdown` + `registerWebuiSignalHandlers` — the
|
|
12
|
-
* SIGINT/SIGTERM teardown sequence.
|
|
13
|
-
*
|
|
14
|
-
* Each external dependency (registry IO, browser launch) is an
|
|
15
|
-
* injectable seam so the orchestration can be unit-tested without
|
|
16
|
-
* touching disk or spawning a browser. Run-loop state (abort
|
|
17
|
-
* controllers, client map, the run promise's `resolve`) stays in
|
|
18
|
-
* `webui-server.ts` and is threaded in as callbacks — the module never
|
|
19
|
-
* captures it.
|
|
20
|
-
*/
|
|
21
|
-
export interface RegisterWebuiInstanceParams {
|
|
22
|
-
pid: number;
|
|
23
|
-
/** Surface kind — 'webui' or 'simpleui'. */
|
|
24
|
-
surface: SurfaceKind;
|
|
25
|
-
host: string;
|
|
26
|
-
httpPort: number;
|
|
27
|
-
wsPort: number;
|
|
28
|
-
/** Browser-facing public URL when served through a tunnel/proxy. */
|
|
29
|
-
publicUrl?: string | undefined;
|
|
30
|
-
projectRoot: string;
|
|
31
|
-
/** ISO timestamp when the instance registered. */
|
|
32
|
-
startedAt: string;
|
|
33
|
-
/** Registry base dir (dirname of globalConfigPath); undefined ⇒ registry default. */
|
|
34
|
-
registryBaseDir: string | undefined;
|
|
35
|
-
}
|
|
36
|
-
export interface RegisterWebuiInstanceDeps {
|
|
37
|
-
registerFn?: (record: WebUIInstanceRecord, baseDir?: string) => Promise<void>;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Fire-and-forget registration of this WebUI in the running-instance
|
|
41
|
-
* registry. Best-effort: a registry write error never blocks startup and
|
|
42
|
-
* is swallowed (the registry is a convenience index, not a source of
|
|
43
|
-
* truth). Caller guards on `projectRoot` being known.
|
|
44
|
-
*/
|
|
45
|
-
export declare function registerWebuiInstance(p: RegisterWebuiInstanceParams, deps?: RegisterWebuiInstanceDeps): void;
|
|
46
|
-
export interface AnnounceWebuiReadyParams {
|
|
47
|
-
/** Surface kind — 'webui' or 'simpleui'. */
|
|
48
|
-
surface: SurfaceKind;
|
|
49
|
-
/** The HTTP server (StaticServeHandle.server). */
|
|
50
|
-
server: {
|
|
51
|
-
on: (event: 'listening', cb: () => void) => void;
|
|
52
|
-
};
|
|
53
|
-
host: string;
|
|
54
|
-
httpPort: number;
|
|
55
|
-
wsPort: number;
|
|
56
|
-
open: boolean;
|
|
57
|
-
/** Auth token for WS connections. Included in the URL so the frontend can exchange it for an HttpOnly cookie via /ws-auth. */
|
|
58
|
-
wsToken?: string;
|
|
59
|
-
/** Browser-facing public URL when served through a tunnel/proxy. */
|
|
60
|
-
publicUrl?: string | undefined;
|
|
61
|
-
log?: (msg: string) => void;
|
|
62
|
-
openBrowserFn?: (url: string) => void;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Once the HTTP server is listening, print the ready banner and (if
|
|
66
|
-
* `open`) launch the browser at the served URL.
|
|
67
|
-
*/
|
|
68
|
-
export declare function announceWebuiReady(p: AnnounceWebuiReadyParams): void;
|
|
69
|
-
export interface WebuiShutdownResources {
|
|
70
|
-
/** Abort every in-flight run (legacy single slot + per-socket controllers) and clear them. */
|
|
71
|
-
abortInFlight: () => void;
|
|
72
|
-
/** Run and drop every event-bus unsubscriber. */
|
|
73
|
-
unsubscribeEvents: () => void;
|
|
74
|
-
/** Close every connected socket and clear the client map. */
|
|
75
|
-
closeClients: () => void;
|
|
76
|
-
/** Close the static HTTP server (no-op when WS-only). */
|
|
77
|
-
closeHttpServer: () => void;
|
|
78
|
-
/** The WebSocket server to stop (its close callback resolves the run promise). */
|
|
79
|
-
wss: {
|
|
80
|
-
close: (cb?: () => void) => void;
|
|
81
|
-
};
|
|
82
|
-
/** This process's pid — the registry liveness key. */
|
|
83
|
-
pid: number;
|
|
84
|
-
/** Registry base dir (undefined ⇒ registry default). */
|
|
85
|
-
registryBaseDir: string | undefined;
|
|
86
|
-
/** Called once teardown settles — wired to the run promise's `resolve`. */
|
|
87
|
-
onStopped: () => void;
|
|
88
|
-
log?: (msg: string) => void;
|
|
89
|
-
debug?: (msg: string) => void;
|
|
90
|
-
/** Injectable for tests; defaults to the real registry unregister. */
|
|
91
|
-
unregisterFn?: (pid: number, baseDir?: string) => Promise<void>;
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Build the SIGINT/SIGTERM teardown handler. The returned function is
|
|
95
|
-
* idempotent: the first call runs the teardown, later calls (e.g. a
|
|
96
|
-
* second Ctrl+C, or a signal after another server in the same process
|
|
97
|
-
* already stopped) return immediately.
|
|
98
|
-
*
|
|
99
|
-
* Order matches the original inline handler: abort runs → unsubscribe
|
|
100
|
-
* events → close clients → unregister from the instance registry (async,
|
|
101
|
-
* awaited inside the wss.close callback) → close HTTP → close WS → on
|
|
102
|
-
* close, once the unregister settles, `onStopped()`.
|
|
103
|
-
*/
|
|
104
|
-
export declare function createWebuiShutdown(res: WebuiShutdownResources): () => void;
|
|
105
|
-
/**
|
|
106
|
-
* Register `shutdown` on SIGINT and SIGTERM. The wrapper self-detaches
|
|
107
|
-
* both listeners on first fire (so a server that has already shut down
|
|
108
|
-
* can't re-trigger teardown). Returns an unregister function for tests
|
|
109
|
-
* and clean restarts.
|
|
110
|
-
*/
|
|
111
|
-
export declare function registerWebuiSignalHandlers(shutdown: () => void): () => void;
|
|
1
|
+
export { announceWebuiReady, createWebuiShutdown, registerWebuiInstance, registerWebuiSignalHandlers, type AnnounceWebuiReadyParams, type RegisterWebuiInstanceDeps, type RegisterWebuiInstanceParams, type WebuiShutdownResources, } from '@wrongstack/webui-server';
|
|
2
|
+
export type { WebUIInstanceRecord } from '@wrongstack/webui-server';
|
|
112
3
|
//# sourceMappingURL=lifecycle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../src/webui-server/lifecycle.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../src/webui-server/lifecycle.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,qBAAqB,EACrB,2BAA2B,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,2BAA2B,EAChC,KAAK,sBAAsB,GAC5B,MAAM,0BAA0B,CAAC;AAElC,YAAY,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger-shim.d.ts","sourceRoot":"","sources":["../../src/webui-server/logger-shim.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"logger-shim.d.ts","sourceRoot":"","sources":["../../src/webui-server/logger-shim.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAiBrD;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,EAAE,MAoB3B,CAAC"}
|
|
@@ -1,21 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* ## What lives here
|
|
5
|
-
*
|
|
6
|
-
* - `PREF_KEYS` – the canonical list of browser-setting ↔ config-file keys.
|
|
7
|
-
* - `createPrefsSeeding` – factory that returns `{ prefSnapshot, persistPrefs }`
|
|
8
|
-
* with file I/O captured in closure.
|
|
9
|
-
* - `seedConfigToMeta` – one-time call at startup: reads config.json and seeds
|
|
10
|
-
* `agent.ctx.meta` so the settings panel shows the real
|
|
11
|
-
* persisted values instead of localStorage defaults.
|
|
12
|
-
*
|
|
13
|
-
* ## Extraction history
|
|
14
|
-
*
|
|
15
|
-
* PR 9 of Issue #30 – extracted from webui-server.ts (was inline between the
|
|
16
|
-
* `PREF_KEYS` array and the `PrefsContext` construction).
|
|
17
|
-
*/
|
|
18
|
-
import type { Config } from '@wrongstack/core';
|
|
1
|
+
import type { Config } from '@wrongstack/core/types';
|
|
2
|
+
import type { ModelBlackoutRule } from '@wrongstack/core/models';
|
|
3
|
+
import { PREF_KEYS } from '@wrongstack/webui-server';
|
|
19
4
|
interface CliWebUIOptions {
|
|
20
5
|
agent: {
|
|
21
6
|
ctx: {
|
|
@@ -23,45 +8,24 @@ interface CliWebUIOptions {
|
|
|
23
8
|
};
|
|
24
9
|
};
|
|
25
10
|
globalConfigPath?: string | undefined;
|
|
26
|
-
/** Resolved profile config path: ~/.wrongstack/profiles/<activeProfile>/config.json */
|
|
27
11
|
profileConfigPath: string;
|
|
28
12
|
appConfig?: {
|
|
29
13
|
fallbackModels?: string[] | undefined;
|
|
30
14
|
fallbackProfiles?: Record<string, string[]> | undefined;
|
|
31
15
|
favoriteModels?: string[] | undefined;
|
|
32
16
|
favoriteModelsOnly?: boolean | undefined;
|
|
33
|
-
modelAvailabilitySchedule?:
|
|
17
|
+
modelAvailabilitySchedule?: ModelBlackoutRule[] | undefined;
|
|
34
18
|
fallbackAuto?: boolean | undefined;
|
|
35
19
|
modelMatrix?: Config['modelMatrix'] | undefined;
|
|
36
20
|
uiLocale?: string | undefined;
|
|
37
21
|
} | undefined;
|
|
38
22
|
}
|
|
39
|
-
/** Keys synced between `agent.ctx.meta` and `config.json`. */
|
|
40
|
-
export declare const PREF_KEYS: readonly ['autonomy', 'autonomyDelayMs', 'autoProceedMaxIterations', 'yolo', 'maxIterations', 'chime', 'confirmExit', 'fleetChatVerbosity', 'nextPrediction', 'fallbackModels', 'fallbackProfiles', 'favoriteModels', 'favoriteModelsOnly', 'modelAvailabilitySchedule', 'modelMatrix', 'fallbackAuto', 'uiLocale', 'enhanceEnabled', 'enhanceDelayMs', 'enhanceLanguage', 'featureMcp', 'featurePlugins', 'featureMemory', 'featureSkills', 'featureModelsRegistry', 'indexOnStart', 'contextAutoCompact', 'contextStrategy', 'contextMode', 'tokenSavingTier', 'maxConcurrent', 'titleAnimation', 'reasoningMode', 'reasoningEffort', 'reasoningPreserve', 'cacheTtl', 'logLevel', 'auditLevel', 'hqEnabled', 'hqUrl', 'hqToken', 'hqRawContent', 'refinerProvider', 'refinerModel', 'refinerFallbackProfile', 'thinkingWord', 'statuslineMode', 'animationStyle', 'tgConfigured', 'tgSessionEnd', 'tgDelegate', 'tgLongToolMs', 'breakerEnabled', 'breakerAutoKillResetMs', 'fsAccess', 'debugStream', 'chimeraAutoFix', 'chimeraEnabled', 'chimeraProvider', 'chimeraModel', 'chimeraMaxFiles', 'autoReviewEnabled', 'autoReviewProvider', 'autoReviewModel', 'autoReviewFallbackProfile', 'autoReviewFallbackModels', 'autoReviewDebounceMs', 'autoReviewMaxFilesPerBatch', 'autoReviewMaxConcurrentReviews', 'autoReviewCascadeOn', 'pluginsEnabled'];
|
|
41
23
|
type PrefSnapshot = Record<string, unknown>;
|
|
42
|
-
|
|
43
|
-
* One-time startup seed: reads the merged in-memory appConfig (which already
|
|
44
|
-
* includes bootstrap + active profile + project-local + in-project layers)
|
|
45
|
-
* and copies recognised fields into `agent.ctx.meta` so the browser settings
|
|
46
|
-
* panel starts with the real persisted values instead of blank/undefined.
|
|
47
|
-
*
|
|
48
|
-
* Before the profile-based config system (0.291.0+), this function read the
|
|
49
|
-
* bootstrap file (~/.wrongstack/config.json) directly — but that file now
|
|
50
|
-
* only contains { version, activeProfile }. All user settings live in the
|
|
51
|
-
* active profile config (~/.wrongstack/profiles/<name>/config.json), which
|
|
52
|
-
* the config loader has already merged into `opts.appConfig` during boot.
|
|
53
|
-
*
|
|
54
|
-
* Best-effort — missing or partial appConfig leaves prefs unseeded.
|
|
55
|
-
*/
|
|
24
|
+
export { PREF_KEYS };
|
|
56
25
|
export declare function seedConfigToMeta(opts: CliWebUIOptions): Promise<void>;
|
|
57
|
-
interface PrefsSeeding {
|
|
26
|
+
export interface PrefsSeeding {
|
|
58
27
|
prefSnapshot: () => PrefSnapshot;
|
|
59
28
|
persistPrefs: (payload: PrefSnapshot) => Promise<void>;
|
|
60
29
|
}
|
|
61
|
-
/**
|
|
62
|
-
* Factory – returns `prefSnapshot` and `persistPrefs` with file I/O captured
|
|
63
|
-
* in closure. Call once per `runWebUI` instance.
|
|
64
|
-
*/
|
|
65
30
|
export declare function createPrefsSeeding(opts: CliWebUIOptions): PrefsSeeding;
|
|
66
|
-
export {};
|
|
67
31
|
//# sourceMappingURL=prefs-seeding.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prefs-seeding.d.ts","sourceRoot":"","sources":["../../src/webui-server/prefs-seeding.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"prefs-seeding.d.ts","sourceRoot":"","sources":["../../src/webui-server/prefs-seeding.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAEL,SAAS,EAIV,MAAM,0BAA0B,CAAC;AAElC,UAAU,eAAe;IACvB,KAAK,EAAE;QAAE,GAAG,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;SAAE,CAAA;KAAE,CAAC;IAClD,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,SAAS,CAAC,EACN;QACE,cAAc,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;QACtC,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,SAAS,CAAC;QACxD,cAAc,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;QACtC,kBAAkB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;QACzC,yBAAyB,CAAC,EAAE,iBAAiB,EAAE,GAAG,SAAS,CAAC;QAC5D,YAAY,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;QACnC,WAAW,CAAC,EAAE,MAAM,CAAC,aAAa,CAAC,GAAG,SAAS,CAAC;QAChD,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;KAC/B,GACD,SAAS,CAAC;CACf;AAED,KAAK,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE5C,OAAO,EAAE,SAAS,EAAE,CAAC;AAErB,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAY3E;AAED,MAAM,WAAW,YAAY;IAC3B,YAAY,EAAE,MAAM,YAAY,CAAC;IACjC,YAAY,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACxD;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,eAAe,GAAG,YAAY,CA6EtE"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type TrustBoundary, type TrustRisk, type TrustSubject } from '@wrongstack/core/security';
|
|
2
|
+
import { type ProcessRouteHandlers } from '@wrongstack/webui-server';
|
|
3
|
+
export declare function authorizeCliWebUIAction(boundary: TrustBoundary, action: {
|
|
4
|
+
capability: string;
|
|
5
|
+
subject: TrustSubject;
|
|
6
|
+
risk: TrustRisk;
|
|
7
|
+
cwd?: string | undefined;
|
|
8
|
+
metadata?: Readonly<Record<string, string | number | boolean | null>> | undefined;
|
|
9
|
+
}): Promise<{
|
|
10
|
+
allowed: boolean;
|
|
11
|
+
reason: string;
|
|
12
|
+
}>;
|
|
13
|
+
export declare function createCliProcessRoutes(boundary: TrustBoundary): ProcessRouteHandlers;
|
|
14
|
+
//# sourceMappingURL=privileged-actions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"privileged-actions.d.ts","sourceRoot":"","sources":["../../src/webui-server/privileged-actions.ts"],"names":[],"mappings":"AACA,OAAO,EAA0B,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,KAAK,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC1H,OAAO,EAIL,KAAK,oBAAoB,EAC1B,MAAM,0BAA0B,CAAC;AAElC,wBAAsB,uBAAuB,CAC3C,QAAQ,EAAE,aAAa,EACvB,MAAM,EAAE;IACN,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,YAAY,CAAC;IACtB,IAAI,EAAE,SAAS,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,QAAQ,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC,CAAC,GAAG,SAAS,CAAC;CACnF,GACA,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAc/C;AAED,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,aAAa,GAAG,oBAAoB,CAOpF"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { Context
|
|
1
|
+
import type { Context } from '@wrongstack/core/agent';
|
|
2
|
+
import type { ModelsRegistry } from '@wrongstack/core/types';
|
|
2
3
|
/** The slice of `CliWebUIOptions` the payload builder actually reads. */
|
|
3
4
|
export interface SessionStartPayloadDeps {
|
|
4
5
|
agent: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-start-payload.d.ts","sourceRoot":"","sources":["../../src/webui-server/session-start-payload.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"session-start-payload.d.ts","sourceRoot":"","sources":["../../src/webui-server/session-start-payload.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAK7D,yEAAyE;AACzE,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE;QAAE,GAAG,EAAE,OAAO,CAAA;KAAE,CAAC;IACxB,OAAO,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IACxB,cAAc,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;IAC5C,aAAa,CAAC,EAAE,OAAO,+BAA+B,EAAE,0BAA0B,GAAG,SAAS,CAAC;IAC/F,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC;AAED,MAAM,MAAM,wBAAwB,GAAG,CACrC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACnC,UAAU,CAAC,EAAE,OAAO,KACjB,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAEtC;;;GAGG;AACH,wBAAgB,gCAAgC,CAC9C,IAAI,EAAE,uBAAuB,GAC5B,wBAAwB,CA+D1B"}
|