@wrongstack/cli 0.297.0 → 0.298.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/dist/{acp-A5OSIU2P.js → acp-S4LZQB66.js} +91 -23
- package/dist/{auth-CJWQJVRH.js → auth-NLLGEYQR.js} +3 -3
- package/dist/boot/governance-evidence-candidate.d.ts +3 -0
- package/dist/boot/governance-shadow-bridge.d.ts +19 -0
- package/dist/boot/governance-trace-context.d.ts +64 -0
- package/dist/boot/tui-session-resume.d.ts +10 -1
- package/dist/chimera-leader-wake.d.ts +57 -0
- package/dist/chimera-reviewer-policy.d.ts +89 -1
- package/dist/chimera-subagent-ladder.d.ts +72 -0
- package/dist/{chunk-AZESNNIC.js → chunk-4HH3YGG4.js} +3 -3
- package/dist/{chunk-IHBYBYGA.js → chunk-A6Q5KGLV.js} +51 -18
- package/dist/{chunk-ABXK4VVY.js → chunk-ARWGQUB3.js} +2 -1
- package/dist/{chunk-7JABKXET.js → chunk-C5GH4YBL.js} +1018 -175
- package/dist/{chunk-TADVX644.js → chunk-GO3TJICK.js} +11 -2
- package/dist/{chunk-JBTFWWKV.js → chunk-I2BM6FK6.js} +9 -4
- package/dist/{chunk-AXVZMEWG.js → chunk-I5MEUFDI.js} +2 -2
- package/dist/chunk-U3SS4NRH.js +10 -0
- package/dist/{chunk-QZKWRNIP.js → chunk-V3XH6XBJ.js} +12 -9
- package/dist/{cli-main-GOY5YGVL.js → cli-main-TJEU4OUY.js} +954 -268
- package/dist/cli-main-helpers.d.ts +42 -2
- package/dist/{execution-A4PGK4XV.js → execution-INOV5P7N.js} +1236 -652
- package/dist/execution-chimera-cascade.d.ts +7 -1
- package/dist/execution-chimera-review.d.ts +35 -0
- package/dist/fleet/host-types.d.ts +6 -1
- package/dist/fleet-statusline.d.ts +1 -0
- package/dist/governance-V2Z42RBE.js +65 -0
- package/dist/governance-hq-telemetry.d.ts +17 -0
- package/dist/{hq-GBPGXIR5.js → hq-WO6CLUSI.js} +2 -2
- package/dist/hq-server/auth.d.ts +33 -2
- package/dist/hq-server/login-attempt-store.d.ts +73 -0
- package/dist/hq-server/routes/auth-handlers.d.ts +73 -5
- package/dist/hq-server/routes.d.ts +5 -5
- package/dist/hq-server/types.d.ts +36 -2
- package/dist/hq-server/utils.d.ts +51 -6
- package/dist/{hq-server-YQUUMTPU.js → hq-server-6TSAORAC.js} +2 -2
- package/dist/hq-server.d.ts +10 -0
- package/dist/index.js +49 -21
- package/dist/live-settings-input.d.ts +1 -1
- package/dist/settings-menu.d.ts +1 -1
- package/dist/slash-commands/fallback.d.ts +2 -0
- package/dist/slash-commands/goal-refiner.d.ts +1 -1
- package/dist/subcommands/handlers/acp-connection-gate.d.ts +20 -0
- package/dist/subcommands/handlers/governance.d.ts +8 -0
- package/dist/{update-YC4TYW2Y.js → update-MV6TUACD.js} +3 -3
- package/dist/utils/win32-cmd.d.ts +9 -6
- package/dist/{version-help-DROHZRW6.js → version-help-ASKQYXDJ.js} +2 -2
- package/dist/{webui-server-XKFUOKMJ.js → webui-server-PCLSXX6L.js} +10 -3
- package/dist/wiring/brain-and-orchestration.d.ts +2 -0
- package/dist/wiring/provider-runtime-setup.d.ts +2 -2
- package/package.json +23 -22
- package/dist/acp-A5OSIU2P.js.map +0 -7
- package/dist/acp-registry-cache.d.ts.map +0 -1
- package/dist/acp-server-agent.d.ts.map +0 -1
- package/dist/arg-parser.d.ts.map +0 -1
- package/dist/audit-2ZSFGNIF.js.map +0 -7
- package/dist/auth-CJWQJVRH.js.map +0 -7
- package/dist/auth-menu/add-provider.d.ts.map +0 -1
- package/dist/auth-menu/anthropic-oauth.d.ts.map +0 -1
- package/dist/auth-menu/auth-menu-audit.d.ts.map +0 -1
- package/dist/auth-menu/direct.d.ts.map +0 -1
- package/dist/auth-menu/github-copilot-oauth.d.ts.map +0 -1
- package/dist/auth-menu/helpers.d.ts.map +0 -1
- package/dist/auth-menu/index.d.ts.map +0 -1
- package/dist/auth-menu/local-presets.d.ts.map +0 -1
- package/dist/auth-menu/local.d.ts.map +0 -1
- package/dist/auth-menu/loopback-server.d.ts.map +0 -1
- package/dist/auth-menu/oauth-menu.d.ts.map +0 -1
- package/dist/auth-menu/openai-codex-oauth.d.ts.map +0 -1
- package/dist/auth-menu/panel-service.d.ts.map +0 -1
- package/dist/auth-menu/provider-menu.d.ts.map +0 -1
- package/dist/auth-menu/shared.d.ts.map +0 -1
- package/dist/auth-menu/top-menu.d.ts.map +0 -1
- package/dist/auth-menu/types.d.ts.map +0 -1
- package/dist/auth-menu.d.ts.map +0 -1
- package/dist/bench-7ZDWSNEF.js.map +0 -7
- package/dist/boot/auto-discover-providers.d.ts.map +0 -1
- package/dist/boot/brain-decision-log.d.ts.map +0 -1
- package/dist/boot/config-backup-recovery.d.ts.map +0 -1
- package/dist/boot/container-wiring.d.ts.map +0 -1
- package/dist/boot/dispatch-singleshot.d.ts.map +0 -1
- package/dist/boot/dispatch-tui.d.ts.map +0 -1
- package/dist/boot/dispatch-webui.d.ts.map +0 -1
- package/dist/boot/event-wiring.d.ts.map +0 -1
- package/dist/boot/execution-mode.d.ts.map +0 -1
- package/dist/boot/launch-banner.d.ts.map +0 -1
- package/dist/boot/launch-menu.d.ts.map +0 -1
- package/dist/boot/short-circuit-desktop.d.ts.map +0 -1
- package/dist/boot/short-circuit-flags.d.ts.map +0 -1
- package/dist/boot/short-circuit-hq.d.ts.map +0 -1
- package/dist/boot/simpleui-full-auto.d.ts.map +0 -1
- package/dist/boot/system-prompt-builder.d.ts.map +0 -1
- package/dist/boot/system-prompt.d.ts.map +0 -1
- package/dist/boot/tool-registry.d.ts.map +0 -1
- package/dist/boot/tui-coordinator-callbacks.d.ts.map +0 -1
- package/dist/boot/tui-coordinator-setup.d.ts.map +0 -1
- package/dist/boot/tui-debug-stream.d.ts.map +0 -1
- package/dist/boot/tui-goal-wiring.d.ts.map +0 -1
- package/dist/boot/tui-live-sessions.d.ts.map +0 -1
- package/dist/boot/tui-project-picker-callback.d.ts.map +0 -1
- package/dist/boot/tui-project-spawn.d.ts.map +0 -1
- package/dist/boot/tui-project-switch.d.ts.map +0 -1
- package/dist/boot/tui-runtime-state.d.ts.map +0 -1
- package/dist/boot/tui-sdd-callback.d.ts.map +0 -1
- package/dist/boot/tui-session-resume.d.ts.map +0 -1
- package/dist/boot/tui-settings-adapter.d.ts.map +0 -1
- package/dist/boot-config.d.ts.map +0 -1
- package/dist/boot.d.ts.map +0 -1
- package/dist/brain-menu/panel-service.d.ts.map +0 -1
- package/dist/chimera-review-task.d.ts.map +0 -1
- package/dist/chimera-reviewer-policy.d.ts.map +0 -1
- package/dist/chronicle-QQEQFSSE.js.map +0 -7
- package/dist/chunk-5N34EWJR.js.map +0 -7
- package/dist/chunk-66T43Q4Y.js.map +0 -7
- package/dist/chunk-7JABKXET.js.map +0 -7
- package/dist/chunk-7OCVIDC7.js.map +0 -7
- package/dist/chunk-ABXK4VVY.js.map +0 -7
- package/dist/chunk-AXVZMEWG.js.map +0 -7
- package/dist/chunk-AZESNNIC.js.map +0 -7
- package/dist/chunk-BGFM3PD7.js.map +0 -7
- package/dist/chunk-DPJZQCVP.js.map +0 -7
- package/dist/chunk-F4PEGAJZ.js.map +0 -7
- package/dist/chunk-IHBYBYGA.js.map +0 -7
- package/dist/chunk-JBSQ7ONN.js.map +0 -7
- package/dist/chunk-JBTFWWKV.js.map +0 -7
- package/dist/chunk-JUHRI6OV.js.map +0 -7
- package/dist/chunk-JW75HY4F.js.map +0 -7
- package/dist/chunk-OP47B3IX.js.map +0 -7
- package/dist/chunk-PJHET45A.js.map +0 -7
- package/dist/chunk-Q5GTM25S.js.map +0 -7
- package/dist/chunk-QD544J2B.js.map +0 -7
- package/dist/chunk-QUNHS6O3.js.map +0 -7
- package/dist/chunk-QZKWRNIP.js.map +0 -7
- package/dist/chunk-TADVX644.js.map +0 -7
- package/dist/chunk-TGDHN4LM.js.map +0 -7
- package/dist/chunk-TYO2OVAD.js.map +0 -7
- package/dist/chunk-VCYZ3WZV.js.map +0 -7
- package/dist/chunk-VJUEZZYB.js +0 -29
- package/dist/chunk-VJUEZZYB.js.map +0 -7
- package/dist/chunk-WHOIR577.js.map +0 -7
- package/dist/chunk-XJXDOF63.js.map +0 -7
- package/dist/chunk-XTIXVJXP.js.map +0 -7
- package/dist/chunk-XWEGWYDU.js.map +0 -7
- package/dist/chunk-YWUPHRGB.js.map +0 -7
- package/dist/cli-bundled-prompts.d.ts.map +0 -1
- package/dist/cli-bundled-skills.d.ts.map +0 -1
- package/dist/cli-context.d.ts.map +0 -1
- package/dist/cli-entry-main.d.ts.map +0 -1
- package/dist/cli-entry-point.d.ts.map +0 -1
- package/dist/cli-eternal-flag.d.ts.map +0 -1
- package/dist/cli-main-GOY5YGVL.js.map +0 -7
- package/dist/cli-main-helpers.d.ts.map +0 -1
- package/dist/cli-main.d.ts.map +0 -1
- package/dist/cli-update-notice.d.ts.map +0 -1
- package/dist/config-doctor.d.ts.map +0 -1
- package/dist/config-history.d.ts.map +0 -1
- package/dist/context-limit.d.ts.map +0 -1
- package/dist/context-overflow-diagnostic.d.ts.map +0 -1
- package/dist/diag-doctor-OQ3AA63O.js.map +0 -7
- package/dist/diff-renderer.d.ts.map +0 -1
- package/dist/execute-deps.d.ts.map +0 -1
- package/dist/execution-A4PGK4XV.js.map +0 -7
- package/dist/execution-chimera-ask.d.ts.map +0 -1
- package/dist/execution-chimera-cascade.d.ts.map +0 -1
- package/dist/execution-cleanup.d.ts.map +0 -1
- package/dist/execution-kanban-dispatch.d.ts.map +0 -1
- package/dist/execution-repl-fleet-callbacks.d.ts.map +0 -1
- package/dist/execution-storage-observability.d.ts.map +0 -1
- package/dist/execution-tui-next-step-callbacks.d.ts.map +0 -1
- package/dist/execution.d.ts.map +0 -1
- package/dist/export-TPORYVRZ.js.map +0 -7
- package/dist/fleet/host-acp-runner-cache.d.ts.map +0 -1
- package/dist/fleet/host-acp.d.ts.map +0 -1
- package/dist/fleet/host-concurrency.d.ts.map +0 -1
- package/dist/fleet/host-context.d.ts.map +0 -1
- package/dist/fleet/host-director-builder.d.ts.map +0 -1
- package/dist/fleet/host-director-event-bridges.d.ts.map +0 -1
- package/dist/fleet/host-director-services.d.ts.map +0 -1
- package/dist/fleet/host-event-bridge.d.ts.map +0 -1
- package/dist/fleet/host-helpers.d.ts.map +0 -1
- package/dist/fleet/host-learning-tracker.d.ts.map +0 -1
- package/dist/fleet/host-learning.d.ts.map +0 -1
- package/dist/fleet/host-lifecycle-events.d.ts.map +0 -1
- package/dist/fleet/host-paths.d.ts.map +0 -1
- package/dist/fleet/host-provider.d.ts.map +0 -1
- package/dist/fleet/host-session-writer.d.ts.map +0 -1
- package/dist/fleet/host-shadow-pass.d.ts.map +0 -1
- package/dist/fleet/host-spawn-types.d.ts.map +0 -1
- package/dist/fleet/host-status.d.ts.map +0 -1
- package/dist/fleet/host-subagent-factory.d.ts.map +0 -1
- package/dist/fleet/host-supervisor.d.ts.map +0 -1
- package/dist/fleet/host-task-result-report.d.ts.map +0 -1
- package/dist/fleet/host-types.d.ts.map +0 -1
- package/dist/fleet/host.d.ts.map +0 -1
- package/dist/fleet/routing.d.ts.map +0 -1
- package/dist/fleet/status-broadcast.d.ts.map +0 -1
- package/dist/fleet/supervisor-registry.d.ts.map +0 -1
- package/dist/fleet-statusline.d.ts.map +0 -1
- package/dist/goal-host.d.ts.map +0 -1
- package/dist/hooks-wiring.d.ts.map +0 -1
- package/dist/hq-GBPGXIR5.js.map +0 -7
- package/dist/hq-command-controller.d.ts.map +0 -1
- package/dist/hq-publisher.d.ts.map +0 -1
- package/dist/hq-recovery-html.d.ts.map +0 -1
- package/dist/hq-server/audit-actor.d.ts.map +0 -1
- package/dist/hq-server/auth-state.d.ts.map +0 -1
- package/dist/hq-server/auth.d.ts.map +0 -1
- package/dist/hq-server/preflight.d.ts.map +0 -1
- package/dist/hq-server/project-root.d.ts.map +0 -1
- package/dist/hq-server/routes/auth-handlers.d.ts.map +0 -1
- package/dist/hq-server/routes/session-handlers.d.ts.map +0 -1
- package/dist/hq-server/routes/system-handlers.d.ts.map +0 -1
- package/dist/hq-server/routes.d.ts.map +0 -1
- package/dist/hq-server/snapshot.d.ts.map +0 -1
- package/dist/hq-server/startup.d.ts.map +0 -1
- package/dist/hq-server/trust-boundary.d.ts.map +0 -1
- package/dist/hq-server/types.d.ts.map +0 -1
- package/dist/hq-server/utils.d.ts.map +0 -1
- package/dist/hq-server/ws.d.ts.map +0 -1
- package/dist/hq-server-YQUUMTPU.js.map +0 -7
- package/dist/hq-server.d.ts.map +0 -1
- package/dist/hq-static-serve.d.ts.map +0 -1
- package/dist/hq-ttl-U2FAYFAT.js.map +0 -7
- package/dist/hq-tunnel-RFKGC4HI.js.map +0 -7
- package/dist/hq-tunnel.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -7
- package/dist/init-E2NDDOHI.js.map +0 -7
- package/dist/input-reader.d.ts.map +0 -1
- package/dist/kanban-dispatch-route.d.ts.map +0 -1
- package/dist/kanban-hq-sync.d.ts.map +0 -1
- package/dist/kanban-run-mirror-EKVNGXWW.js.map +0 -7
- package/dist/launch-hints.d.ts.map +0 -1
- package/dist/live-settings-input.d.ts.map +0 -1
- package/dist/mailbox-bridge-bootstrap.d.ts.map +0 -1
- package/dist/mailbox-serve-DBOOOOWZ.js.map +0 -7
- package/dist/mcp-CYLPUEHC.js.map +0 -7
- package/dist/mcp-serve.d.ts.map +0 -1
- package/dist/modeldiag-HENYJ4N7.js.map +0 -7
- package/dist/multi-agent.d.ts.map +0 -1
- package/dist/next-task-predictor.d.ts.map +0 -1
- package/dist/permission-prompt.d.ts.map +0 -1
- package/dist/permissions-FNYLZIL4.js.map +0 -7
- package/dist/picker-key-state.d.ts.map +0 -1
- package/dist/picker-model-picker.d.ts.map +0 -1
- package/dist/picker-ui.d.ts.map +0 -1
- package/dist/picker.d.ts.map +0 -1
- package/dist/plugin-api-factory.d.ts.map +0 -1
- package/dist/plugin-management.d.ts.map +0 -1
- package/dist/plugin-usage-OU6X6LM3.js.map +0 -7
- package/dist/plugins-4LJ5IUBI.js.map +0 -7
- package/dist/pre-launch/launch-prompts.d.ts.map +0 -1
- package/dist/pre-launch/project-check.d.ts.map +0 -1
- package/dist/pre-launch.d.ts.map +0 -1
- package/dist/preflight.d.ts.map +0 -1
- package/dist/profile-config-path.d.ts.map +0 -1
- package/dist/project-BLQ3ALVL.js.map +0 -7
- package/dist/project-manifest-GE25PW4S.js.map +0 -7
- package/dist/project-picker-BOCWHBXP.js.map +0 -7
- package/dist/project-picker.d.ts.map +0 -1
- package/dist/projects-XE76NFNZ.js.map +0 -7
- package/dist/provider-config-utils.d.ts.map +0 -1
- package/dist/provider-helpers.d.ts.map +0 -1
- package/dist/provider-id.d.ts.map +0 -1
- package/dist/providers-models-GDELBHZK.js.map +0 -7
- package/dist/quick-VIO2BEHS.js.map +0 -7
- package/dist/renderer.d.ts.map +0 -1
- package/dist/repl-auto-proceed.d.ts.map +0 -1
- package/dist/repl-client-registration.d.ts.map +0 -1
- package/dist/repl-input.d.ts.map +0 -1
- package/dist/repl-options.d.ts.map +0 -1
- package/dist/repl-rendering.d.ts.map +0 -1
- package/dist/repl-suggestions.d.ts.map +0 -1
- package/dist/repl.d.ts.map +0 -1
- package/dist/replay-KCTXNMZQ.js.map +0 -7
- package/dist/rewind-EJMVFVLS.js.map +0 -7
- package/dist/sdd-runtime-AIJCJGWC.js.map +0 -7
- package/dist/services/autonomy-mode.d.ts.map +0 -1
- package/dist/services/commit-message.d.ts.map +0 -1
- package/dist/services/dispatch-classifier.d.ts.map +0 -1
- package/dist/services/mcp-management.d.ts.map +0 -1
- package/dist/services/project-facts.d.ts.map +0 -1
- package/dist/services/project-manifest.d.ts.map +0 -1
- package/dist/services/sdd/project-context.d.ts.map +0 -1
- package/dist/services/sdd/spec-detection.d.ts.map +0 -1
- package/dist/services/sdd/state.d.ts.map +0 -1
- package/dist/services/sdd/task-manager.d.ts.map +0 -1
- package/dist/services/sdd-runtime.d.ts.map +0 -1
- package/dist/services/statusline-config.d.ts.map +0 -1
- package/dist/services/suggestion-store.d.ts.map +0 -1
- package/dist/session-event-wiring.d.ts.map +0 -1
- package/dist/session-stats.d.ts.map +0 -1
- package/dist/sessions-config-NLCMK3BY.js.map +0 -7
- package/dist/settings-menu.d.ts.map +0 -1
- package/dist/shutdown-cleanup.d.ts.map +0 -1
- package/dist/simpleui-dist-JIFGUJO7.js.map +0 -7
- package/dist/simpleui-dist.d.ts.map +0 -1
- package/dist/slash-commands/acp.d.ts.map +0 -1
- package/dist/slash-commands/agent-improve.d.ts.map +0 -1
- package/dist/slash-commands/agents.d.ts.map +0 -1
- package/dist/slash-commands/audit.d.ts.map +0 -1
- package/dist/slash-commands/auth.d.ts.map +0 -1
- package/dist/slash-commands/autonomy.d.ts.map +0 -1
- package/dist/slash-commands/brain.d.ts.map +0 -1
- package/dist/slash-commands/btw.d.ts.map +0 -1
- package/dist/slash-commands/clear.d.ts.map +0 -1
- package/dist/slash-commands/codebase-reindex.d.ts.map +0 -1
- package/dist/slash-commands/collab.d.ts.map +0 -1
- package/dist/slash-commands/command-context.d.ts.map +0 -1
- package/dist/slash-commands/commit-llm.d.ts.map +0 -1
- package/dist/slash-commands/compact.d.ts.map +0 -1
- package/dist/slash-commands/context.d.ts.map +0 -1
- package/dist/slash-commands/coordinator.d.ts.map +0 -1
- package/dist/slash-commands/delegate.d.ts.map +0 -1
- package/dist/slash-commands/design.d.ts.map +0 -1
- package/dist/slash-commands/dev.d.ts.map +0 -1
- package/dist/slash-commands/diag-stats.d.ts.map +0 -1
- package/dist/slash-commands/dispatch-llm.d.ts.map +0 -1
- package/dist/slash-commands/doctor.d.ts.map +0 -1
- package/dist/slash-commands/enhance.d.ts.map +0 -1
- package/dist/slash-commands/ensemble.d.ts.map +0 -1
- package/dist/slash-commands/f-keys.d.ts.map +0 -1
- package/dist/slash-commands/fallback.d.ts.map +0 -1
- package/dist/slash-commands/fix-classifier.d.ts.map +0 -1
- package/dist/slash-commands/fix.d.ts.map +0 -1
- package/dist/slash-commands/fleet.d.ts.map +0 -1
- package/dist/slash-commands/git.d.ts.map +0 -1
- package/dist/slash-commands/gitid.d.ts.map +0 -1
- package/dist/slash-commands/goal-refiner.d.ts.map +0 -1
- package/dist/slash-commands/goal.d.ts.map +0 -1
- package/dist/slash-commands/health.d.ts.map +0 -1
- package/dist/slash-commands/help.d.ts.map +0 -1
- package/dist/slash-commands/helpers.d.ts.map +0 -1
- package/dist/slash-commands/hq.d.ts.map +0 -1
- package/dist/slash-commands/index.d.ts.map +0 -1
- package/dist/slash-commands/init.d.ts.map +0 -1
- package/dist/slash-commands/interrupt.d.ts.map +0 -1
- package/dist/slash-commands/kanban-agent-helpers.d.ts.map +0 -1
- package/dist/slash-commands/kanban-format.d.ts.map +0 -1
- package/dist/slash-commands/kanban-help.d.ts.map +0 -1
- package/dist/slash-commands/kanban.d.ts.map +0 -1
- package/dist/slash-commands/mailbox-demo.d.ts.map +0 -1
- package/dist/slash-commands/mailbox-serve.d.ts.map +0 -1
- package/dist/slash-commands/mailbox.d.ts.map +0 -1
- package/dist/slash-commands/mcp-utils.d.ts.map +0 -1
- package/dist/slash-commands/mcp.d.ts.map +0 -1
- package/dist/slash-commands/memory-compact.d.ts.map +0 -1
- package/dist/slash-commands/memory-flags.d.ts.map +0 -1
- package/dist/slash-commands/memory-formatters.d.ts.map +0 -1
- package/dist/slash-commands/memory.d.ts.map +0 -1
- package/dist/slash-commands/metrics.d.ts.map +0 -1
- package/dist/slash-commands/mode.d.ts.map +0 -1
- package/dist/slash-commands/modelcaps.d.ts.map +0 -1
- package/dist/slash-commands/models.d.ts.map +0 -1
- package/dist/slash-commands/mouse.d.ts.map +0 -1
- package/dist/slash-commands/next.d.ts.map +0 -1
- package/dist/slash-commands/plan.d.ts.map +0 -1
- package/dist/slash-commands/plugin.d.ts.map +0 -1
- package/dist/slash-commands/profile.d.ts.map +0 -1
- package/dist/slash-commands/project-utils.d.ts.map +0 -1
- package/dist/slash-commands/project.d.ts.map +0 -1
- package/dist/slash-commands/provider-status.d.ts.map +0 -1
- package/dist/slash-commands/prune.d.ts.map +0 -1
- package/dist/slash-commands/refiner.d.ts.map +0 -1
- package/dist/slash-commands/review.d.ts.map +0 -1
- package/dist/slash-commands/sdd/rendering.d.ts.map +0 -1
- package/dist/slash-commands/sdd-command-helpers.d.ts.map +0 -1
- package/dist/slash-commands/sdd-format.d.ts.map +0 -1
- package/dist/slash-commands/sdd.d.ts.map +0 -1
- package/dist/slash-commands/security.d.ts.map +0 -1
- package/dist/slash-commands/session.d.ts.map +0 -1
- package/dist/slash-commands/setmodel.d.ts.map +0 -1
- package/dist/slash-commands/settings.d.ts.map +0 -1
- package/dist/slash-commands/shadow.d.ts.map +0 -1
- package/dist/slash-commands/slash-deep-help.d.ts.map +0 -1
- package/dist/slash-commands/spawn-agents.d.ts.map +0 -1
- package/dist/slash-commands/statusline.d.ts.map +0 -1
- package/dist/slash-commands/suggest.d.ts.map +0 -1
- package/dist/slash-commands/suggestion-store.d.ts.map +0 -1
- package/dist/slash-commands/supervisor.d.ts.map +0 -1
- package/dist/slash-commands/surfaces.d.ts.map +0 -1
- package/dist/slash-commands/tasks.d.ts.map +0 -1
- package/dist/slash-commands/techstack.d.ts.map +0 -1
- package/dist/slash-commands/telegram-pairing.d.ts.map +0 -1
- package/dist/slash-commands/telegram-settings.d.ts.map +0 -1
- package/dist/slash-commands/telegram-setup.d.ts.map +0 -1
- package/dist/slash-commands/todos.d.ts.map +0 -1
- package/dist/slash-commands/tool.d.ts.map +0 -1
- package/dist/slash-commands/tools.d.ts.map +0 -1
- package/dist/slash-commands/tuneup.d.ts.map +0 -1
- package/dist/slash-commands/working-dir.d.ts.map +0 -1
- package/dist/slash-commands/worktree.d.ts.map +0 -1
- package/dist/slash-commands/yolo.d.ts.map +0 -1
- package/dist/spinner.d.ts.map +0 -1
- package/dist/subcommands/contracts.d.ts.map +0 -1
- package/dist/subcommands/handlers/acp.d.ts.map +0 -1
- package/dist/subcommands/handlers/audit.d.ts.map +0 -1
- package/dist/subcommands/handlers/auth-local-help.d.ts.map +0 -1
- package/dist/subcommands/handlers/auth.d.ts.map +0 -1
- package/dist/subcommands/handlers/bench-run-help.d.ts.map +0 -1
- package/dist/subcommands/handlers/bench.d.ts.map +0 -1
- package/dist/subcommands/handlers/chronicle.d.ts.map +0 -1
- package/dist/subcommands/handlers/config-history.d.ts.map +0 -1
- package/dist/subcommands/handlers/diag-doctor.d.ts.map +0 -1
- package/dist/subcommands/handlers/export.d.ts.map +0 -1
- package/dist/subcommands/handlers/helpers.d.ts.map +0 -1
- package/dist/subcommands/handlers/hq.d.ts.map +0 -1
- package/dist/subcommands/handlers/init.d.ts.map +0 -1
- package/dist/subcommands/handlers/mailbox-serve.d.ts.map +0 -1
- package/dist/subcommands/handlers/mcp.d.ts.map +0 -1
- package/dist/subcommands/handlers/model-smoke-test.d.ts.map +0 -1
- package/dist/subcommands/handlers/modeldiag-profiles.d.ts.map +0 -1
- package/dist/subcommands/handlers/modeldiag.d.ts.map +0 -1
- package/dist/subcommands/handlers/models-add-help.d.ts.map +0 -1
- package/dist/subcommands/handlers/per-subcommand-deep-help-table.d.ts.map +0 -1
- package/dist/subcommands/handlers/per-subcommand-help-data.d.ts.map +0 -1
- package/dist/subcommands/handlers/per-subcommand-help-table.d.ts.map +0 -1
- package/dist/subcommands/handlers/per-subcommand-help-types.d.ts.map +0 -1
- package/dist/subcommands/handlers/per-subcommand-help.d.ts.map +0 -1
- package/dist/subcommands/handlers/permissions.d.ts.map +0 -1
- package/dist/subcommands/handlers/plugin-usage.d.ts.map +0 -1
- package/dist/subcommands/handlers/project.d.ts.map +0 -1
- package/dist/subcommands/handlers/projects.d.ts.map +0 -1
- package/dist/subcommands/handlers/providers-models.d.ts.map +0 -1
- package/dist/subcommands/handlers/quick.d.ts.map +0 -1
- package/dist/subcommands/handlers/replay.d.ts.map +0 -1
- package/dist/subcommands/handlers/rewind.d.ts.map +0 -1
- package/dist/subcommands/handlers/sessions-config.d.ts.map +0 -1
- package/dist/subcommands/handlers/sessions-fleet.d.ts.map +0 -1
- package/dist/subcommands/handlers/tools-skills.d.ts.map +0 -1
- package/dist/subcommands/handlers/update.d.ts.map +0 -1
- package/dist/subcommands/handlers/version-help.d.ts.map +0 -1
- package/dist/subcommands/index.d.ts.map +0 -1
- package/dist/theme.d.ts.map +0 -1
- package/dist/tools-skills-UNKLOB7M.js.map +0 -7
- package/dist/tui-thinking-word.d.ts.map +0 -1
- package/dist/tuneup.d.ts.map +0 -1
- package/dist/update-YC4TYW2Y.js.map +0 -7
- package/dist/update-check-UMYTOH7Z.js.map +0 -7
- package/dist/update-check.d.ts.map +0 -1
- package/dist/utils/delay-format.d.ts.map +0 -1
- package/dist/utils/hq-ttl.d.ts.map +0 -1
- package/dist/utils/win32-cmd.d.ts.map +0 -1
- package/dist/utils.d.ts.map +0 -1
- package/dist/version-help-DROHZRW6.js.map +0 -7
- package/dist/version.d.ts.map +0 -1
- package/dist/webui-server/client-registration.d.ts.map +0 -1
- package/dist/webui-server/connection-handler.d.ts.map +0 -1
- package/dist/webui-server/context-breakdown.d.ts.map +0 -1
- package/dist/webui-server/contracts.d.ts.map +0 -1
- package/dist/webui-server/cost-helpers.d.ts.map +0 -1
- package/dist/webui-server/kanban-host-adapter.d.ts.map +0 -1
- package/dist/webui-server/kanban-run-mirror.d.ts.map +0 -1
- package/dist/webui-server/kanban-supervisor.d.ts.map +0 -1
- package/dist/webui-server/lifecycle.d.ts.map +0 -1
- package/dist/webui-server/listen-helpers.d.ts.map +0 -1
- package/dist/webui-server/logger-shim.d.ts.map +0 -1
- package/dist/webui-server/node-pty-loader.d.ts.map +0 -1
- package/dist/webui-server/prefs-seeding.d.ts.map +0 -1
- package/dist/webui-server/privileged-actions.d.ts.map +0 -1
- package/dist/webui-server/provider-config.d.ts.map +0 -1
- package/dist/webui-server/session-start-payload.d.ts.map +0 -1
- package/dist/webui-server/setup-events.d.ts.map +0 -1
- package/dist/webui-server/static-serve.d.ts.map +0 -1
- package/dist/webui-server/stream-coalescer.d.ts.map +0 -1
- package/dist/webui-server/terminal-log-view.d.ts.map +0 -1
- package/dist/webui-server-XKFUOKMJ.js.map +0 -7
- package/dist/webui-server-options.d.ts.map +0 -1
- package/dist/webui-server.d.ts.map +0 -1
- package/dist/wiring/brain-and-orchestration.d.ts.map +0 -1
- package/dist/wiring/codebase-index.d.ts.map +0 -1
- package/dist/wiring/command-host-adapters.d.ts.map +0 -1
- package/dist/wiring/command-host-state.d.ts.map +0 -1
- package/dist/wiring/controllers.d.ts.map +0 -1
- package/dist/wiring/dep-watcher-bridge.d.ts.map +0 -1
- package/dist/wiring/dep-watcher.d.ts.map +0 -1
- package/dist/wiring/design-studio.d.ts.map +0 -1
- package/dist/wiring/director-setup.d.ts.map +0 -1
- package/dist/wiring/eternal-command-handlers.d.ts.map +0 -1
- package/dist/wiring/fleet-command-handlers.d.ts.map +0 -1
- package/dist/wiring/hq-telemetry.d.ts.map +0 -1
- package/dist/wiring/lifecycle-plugins.d.ts.map +0 -1
- package/dist/wiring/mailbox-bridge-bootstrap.d.ts.map +0 -1
- package/dist/wiring/management-tools.d.ts.map +0 -1
- package/dist/wiring/metrics.d.ts.map +0 -1
- package/dist/wiring/pipeline.d.ts.map +0 -1
- package/dist/wiring/plugins.d.ts.map +0 -1
- package/dist/wiring/provider-runtime-setup.d.ts.map +0 -1
- package/dist/wiring/provider-runtime.d.ts.map +0 -1
- package/dist/wiring/provider-status.d.ts.map +0 -1
- package/dist/wiring/provider-utility-tools.d.ts.map +0 -1
- package/dist/wiring/provider.d.ts.map +0 -1
- package/dist/wiring/replay.d.ts.map +0 -1
- package/dist/wiring/runtime-controller-deps.d.ts.map +0 -1
- package/dist/wiring/runtime-dispatch-state.d.ts.map +0 -1
- package/dist/wiring/runtime-lifecycle-deps.d.ts.map +0 -1
- package/dist/wiring/runtime-picker-deps.d.ts.map +0 -1
- package/dist/wiring/sage.d.ts.map +0 -1
- package/dist/wiring/sdd-handlers.d.ts.map +0 -1
- package/dist/wiring/security-command.d.ts.map +0 -1
- package/dist/wiring/session-command-handlers.d.ts.map +0 -1
- package/dist/wiring/session-registry.d.ts.map +0 -1
- package/dist/wiring/session.d.ts.map +0 -1
- package/dist/wiring/slash-commands.d.ts.map +0 -1
- package/dist/wiring/to-execute-deps.d.ts.map +0 -1
- package/dist/wiring/tools.d.ts.map +0 -1
|
@@ -3,12 +3,14 @@ import {
|
|
|
3
3
|
loadCachedAcpRegistry,
|
|
4
4
|
refreshAcpRegistry,
|
|
5
5
|
setupProvider
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-4HH3YGG4.js";
|
|
7
|
+
import "./chunk-GO3TJICK.js";
|
|
8
8
|
import "./chunk-PJHET45A.js";
|
|
9
9
|
import "./chunk-7OCVIDC7.js";
|
|
10
10
|
|
|
11
11
|
// src/subcommands/handlers/acp.ts
|
|
12
|
+
import { randomBytes } from "node:crypto";
|
|
13
|
+
import * as path from "node:path";
|
|
12
14
|
import {
|
|
13
15
|
defaultPermissionPolicy,
|
|
14
16
|
EnsembleRegistry,
|
|
@@ -26,7 +28,6 @@ import {
|
|
|
26
28
|
WrongStackACPServer,
|
|
27
29
|
WsBridgeTransport
|
|
28
30
|
} from "@wrongstack/acp/agent";
|
|
29
|
-
import * as path from "node:path";
|
|
30
31
|
import { WebSocketServer } from "ws";
|
|
31
32
|
|
|
32
33
|
// src/acp-server-agent.ts
|
|
@@ -270,6 +271,61 @@ function buildAcpServerAgentFactory(deps, options = {}) {
|
|
|
270
271
|
};
|
|
271
272
|
}
|
|
272
273
|
|
|
274
|
+
// src/subcommands/handlers/acp-connection-gate.ts
|
|
275
|
+
import { timingSafeEqual } from "node:crypto";
|
|
276
|
+
var OK = { ok: true };
|
|
277
|
+
function isLoopbackHostHeader(rawHost) {
|
|
278
|
+
const trimmed = rawHost.trim();
|
|
279
|
+
if (!trimmed) return false;
|
|
280
|
+
try {
|
|
281
|
+
const hostname = new URL(`http://${trimmed}`).hostname.toLowerCase();
|
|
282
|
+
const bare = hostname.startsWith("[") && hostname.endsWith("]") ? hostname.slice(1, -1) : hostname;
|
|
283
|
+
return bare === "127.0.0.1" || bare === "localhost" || bare === "::1";
|
|
284
|
+
} catch {
|
|
285
|
+
return false;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
function createAcpConnectionGate(opts) {
|
|
289
|
+
const { host, port, token } = opts;
|
|
290
|
+
const maxConnections = opts.maxConnections ?? 8;
|
|
291
|
+
const expected = Buffer.from(token);
|
|
292
|
+
const tokenFromRequest = (req) => {
|
|
293
|
+
const auth = req.headers.authorization;
|
|
294
|
+
if (typeof auth === "string" && auth.toLowerCase().startsWith("bearer ")) {
|
|
295
|
+
return auth.slice(7).trim();
|
|
296
|
+
}
|
|
297
|
+
try {
|
|
298
|
+
return new URL(req.url ?? "/", `http://${host}:${port}`).searchParams.get("token") ?? void 0;
|
|
299
|
+
} catch {
|
|
300
|
+
return void 0;
|
|
301
|
+
}
|
|
302
|
+
};
|
|
303
|
+
const tokenOk = (supplied) => {
|
|
304
|
+
if (!supplied) return false;
|
|
305
|
+
const a = Buffer.from(supplied);
|
|
306
|
+
if (a.length !== expected.length) return false;
|
|
307
|
+
return timingSafeEqual(a, expected);
|
|
308
|
+
};
|
|
309
|
+
return {
|
|
310
|
+
check(req, liveConnections) {
|
|
311
|
+
const origin = req.headers.origin;
|
|
312
|
+
if (origin && origin !== `http://${host}:${port}` && origin !== `ws://${host}:${port}`) {
|
|
313
|
+
return { ok: false, code: 1008, reason: "cross-origin forbidden" };
|
|
314
|
+
}
|
|
315
|
+
if (!isLoopbackHostHeader(req.headers.host ?? "")) {
|
|
316
|
+
return { ok: false, code: 1008, reason: "untrusted host header" };
|
|
317
|
+
}
|
|
318
|
+
if (!tokenOk(tokenFromRequest(req))) {
|
|
319
|
+
return { ok: false, code: 1008, reason: "unauthorized" };
|
|
320
|
+
}
|
|
321
|
+
if (liveConnections >= maxConnections) {
|
|
322
|
+
return { ok: false, code: 1013, reason: "too many connections" };
|
|
323
|
+
}
|
|
324
|
+
return OK;
|
|
325
|
+
}
|
|
326
|
+
};
|
|
327
|
+
}
|
|
328
|
+
|
|
273
329
|
// src/subcommands/handlers/acp.ts
|
|
274
330
|
function acpOverrides(deps) {
|
|
275
331
|
return deps.config.acp?.agents;
|
|
@@ -383,13 +439,20 @@ async function runACPWebSocketServer(deps, port) {
|
|
|
383
439
|
turnFactory = () => makeACPServerAgentTurn({ agentFor });
|
|
384
440
|
store = deps.paths?.projectDir ? new ACPSessionStore({ dir: path.join(deps.paths.projectDir, "acp-sessions") }) : void 0;
|
|
385
441
|
}
|
|
442
|
+
const acpToken = process.env["WRONGSTACK_ACP_TOKEN"]?.trim() || randomBytes(32).toString("hex");
|
|
443
|
+
const gate = createAcpConnectionGate({ host, port, token: acpToken });
|
|
444
|
+
let liveConnections = 0;
|
|
386
445
|
const wss = new WebSocketServer({ host, port, maxPayload: 20 * 1024 * 1024 });
|
|
387
446
|
wss.on("connection", (socket, req) => {
|
|
388
|
-
const
|
|
389
|
-
if (
|
|
390
|
-
socket.close(1008, "
|
|
447
|
+
const verdict = gate.check(req, liveConnections);
|
|
448
|
+
if (!verdict.ok) {
|
|
449
|
+
socket.close(verdict.code ?? 1008, verdict.reason ?? "forbidden");
|
|
391
450
|
return;
|
|
392
451
|
}
|
|
452
|
+
liveConnections++;
|
|
453
|
+
socket.once("close", () => {
|
|
454
|
+
liveConnections--;
|
|
455
|
+
});
|
|
393
456
|
const connectionTurn = turnFactory?.();
|
|
394
457
|
const transport = new WsBridgeTransport((m) => {
|
|
395
458
|
const data = JSON.stringify(m);
|
|
@@ -427,9 +490,10 @@ async function runACPWebSocketServer(deps, port) {
|
|
|
427
490
|
socket.on("close", teardown);
|
|
428
491
|
socket.on("error", teardown);
|
|
429
492
|
});
|
|
493
|
+
const acpUrl = `ws://${host}:${port}/?token=${acpToken}`;
|
|
430
494
|
deps.renderer.writeInfo(
|
|
431
|
-
echo ? `ACP server (echo, no provider) listening on
|
|
432
|
-
` : `WrongStack ACP server listening on
|
|
495
|
+
echo ? `ACP server (echo, no provider) listening on ${acpUrl}. Press Ctrl+C to stop.
|
|
496
|
+
` : `WrongStack ACP server listening on ${acpUrl} (${deps.config.provider}/${deps.config.model}). Press Ctrl+C to stop.
|
|
433
497
|
`
|
|
434
498
|
);
|
|
435
499
|
await new Promise((resolve) => {
|
|
@@ -474,13 +538,17 @@ async function runACPServer(deps) {
|
|
|
474
538
|
})()
|
|
475
539
|
);
|
|
476
540
|
if (echo) {
|
|
477
|
-
deps.renderer.writeInfo(
|
|
541
|
+
deps.renderer.writeInfo(
|
|
542
|
+
"ACP server starting in --echo mode (no-op turn; no provider needed).\n"
|
|
543
|
+
);
|
|
478
544
|
} else {
|
|
479
545
|
deps.renderer.writeInfo(
|
|
480
546
|
`Starting WrongStack ACP server (${deps.config.provider}/${deps.config.model})\u2026
|
|
481
547
|
`
|
|
482
548
|
);
|
|
483
|
-
deps.renderer.writeInfo(
|
|
549
|
+
deps.renderer.writeInfo(
|
|
550
|
+
"Waiting for an ACP client connection on stdin/stdout. Press Ctrl+C to stop.\n"
|
|
551
|
+
);
|
|
484
552
|
}
|
|
485
553
|
createGracefulShutdown({
|
|
486
554
|
run: async () => {
|
|
@@ -517,8 +585,10 @@ async function listACPAgents(deps) {
|
|
|
517
585
|
`);
|
|
518
586
|
}
|
|
519
587
|
for (const a of missing) {
|
|
520
|
-
deps.renderer.write(
|
|
521
|
-
`)
|
|
588
|
+
deps.renderer.write(
|
|
589
|
+
` \u2717 ${a.id.padEnd(16)} ${a.displayName} (${a.reason ?? "not installed"})
|
|
590
|
+
`
|
|
591
|
+
);
|
|
522
592
|
}
|
|
523
593
|
deps.renderer.write(`
|
|
524
594
|
${installed.length} of ${detected.length} agents available.
|
|
@@ -549,8 +619,10 @@ async function syncACPRegistry(deps) {
|
|
|
549
619
|
`);
|
|
550
620
|
return 0;
|
|
551
621
|
} catch (err) {
|
|
552
|
-
deps.renderer.writeError(
|
|
553
|
-
`)
|
|
622
|
+
deps.renderer.writeError(
|
|
623
|
+
`ACP registry sync failed: ${err instanceof Error ? err.message : String(err)}
|
|
624
|
+
`
|
|
625
|
+
);
|
|
554
626
|
deps.renderer.write("The bundled offline catalog is still available via `wstack acp list`.\n");
|
|
555
627
|
return 1;
|
|
556
628
|
}
|
|
@@ -700,19 +772,15 @@ async function parallelACPAgents(args, deps) {
|
|
|
700
772
|
`[${r.error?.kind ?? "unknown"}] ${r.error?.message ?? "failed"}
|
|
701
773
|
`
|
|
702
774
|
);
|
|
703
|
-
deps.renderer.write(
|
|
704
|
-
|
|
705
|
-
`
|
|
706
|
-
);
|
|
775
|
+
deps.renderer.write(`[${r.agentId}] failed ${r.durationMs}ms
|
|
776
|
+
`);
|
|
707
777
|
} else {
|
|
708
778
|
deps.renderer.writeError(
|
|
709
779
|
`[${r.error?.kind ?? "aborted"}] ${r.error?.message ?? "cancelled"}
|
|
710
780
|
`
|
|
711
781
|
);
|
|
712
|
-
deps.renderer.write(
|
|
713
|
-
|
|
714
|
-
`
|
|
715
|
-
);
|
|
782
|
+
deps.renderer.write(`[${r.agentId}] cancelled ${r.durationMs}ms
|
|
783
|
+
`);
|
|
716
784
|
}
|
|
717
785
|
}
|
|
718
786
|
const { succeeded, failed, cancelled, skipped: skip } = result.summary;
|
|
@@ -821,4 +889,4 @@ ${renderAcpBenchText(result)}
|
|
|
821
889
|
export {
|
|
822
890
|
acpCmd
|
|
823
891
|
};
|
|
824
|
-
//# sourceMappingURL=acp-
|
|
892
|
+
//# sourceMappingURL=acp-S4LZQB66.js.map
|
|
@@ -13,12 +13,12 @@ import {
|
|
|
13
13
|
runOAuthLoginKind,
|
|
14
14
|
runOAuthLoginMenu,
|
|
15
15
|
validateFamily
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-I2BM6FK6.js";
|
|
17
17
|
import {
|
|
18
18
|
parseAuthFlags
|
|
19
19
|
} from "./chunk-JBSQ7ONN.js";
|
|
20
20
|
import "./chunk-66T43Q4Y.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-GO3TJICK.js";
|
|
22
22
|
import {
|
|
23
23
|
loadConfigProviders,
|
|
24
24
|
maskedKey,
|
|
@@ -501,4 +501,4 @@ async function runAuthRemove(deps, providerId) {
|
|
|
501
501
|
export {
|
|
502
502
|
authCmd
|
|
503
503
|
};
|
|
504
|
-
//# sourceMappingURL=auth-
|
|
504
|
+
//# sourceMappingURL=auth-NLLGEYQR.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export type { GovernanceEvidenceCandidate, GovernanceEvidenceCandidateMissingBinding, GovernanceEvidenceTraceSnapshot, GovernanceToolOutcomeMetadata, } from '@wrongstack/runtime/governance-bootstrap';
|
|
2
|
+
export { createGovernanceEvidenceCandidate, GOVERNANCE_EVIDENCE_CANDIDATE_SCHEMA_VERSION, } from '@wrongstack/runtime/governance-bootstrap';
|
|
3
|
+
//# sourceMappingURL=governance-evidence-candidate.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { EventBus } from '@wrongstack/core/kernel';
|
|
2
|
+
import type { GovernanceRuntimeObservationInput, GovernanceRuntimeObservationResult } from '@wrongstack/runtime/governance-bootstrap';
|
|
3
|
+
import type { GovernanceTraceContext } from './governance-trace-context.js';
|
|
4
|
+
export interface GovernanceObservationSink {
|
|
5
|
+
observe(input: GovernanceRuntimeObservationInput): Promise<GovernanceRuntimeObservationResult>;
|
|
6
|
+
}
|
|
7
|
+
export interface GovernanceShadowLogger {
|
|
8
|
+
warn(message: string, context?: unknown): void;
|
|
9
|
+
}
|
|
10
|
+
export interface GovernanceShadowBridge {
|
|
11
|
+
close(): void;
|
|
12
|
+
}
|
|
13
|
+
export declare function createGovernanceShadowBridge(input: {
|
|
14
|
+
readonly events: EventBus;
|
|
15
|
+
readonly sink: GovernanceObservationSink;
|
|
16
|
+
readonly logger: GovernanceShadowLogger;
|
|
17
|
+
readonly trace: GovernanceTraceContext;
|
|
18
|
+
}): GovernanceShadowBridge;
|
|
19
|
+
//# sourceMappingURL=governance-shadow-bridge.d.ts.map
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { WorkspaceCheckpointRef } from '@wrongstack/core/types';
|
|
2
|
+
export declare const MAX_GOVERNANCE_PLAN_BYTES: number;
|
|
3
|
+
export declare const MAX_GOVERNANCE_ACTIVE_STEP_IDS = 128;
|
|
4
|
+
export type GovernancePlanTrace = {
|
|
5
|
+
readonly state: 'missing' | 'invalid' | 'unreadable';
|
|
6
|
+
} | {
|
|
7
|
+
readonly state: 'refreshing';
|
|
8
|
+
readonly observedAt: string;
|
|
9
|
+
} | {
|
|
10
|
+
readonly state: 'available';
|
|
11
|
+
readonly schemaVersion: 1;
|
|
12
|
+
readonly fingerprint: string;
|
|
13
|
+
readonly updatedAt?: string | undefined;
|
|
14
|
+
readonly observedAt: string;
|
|
15
|
+
readonly itemCount: number;
|
|
16
|
+
readonly openCount: number;
|
|
17
|
+
readonly inProgressCount: number;
|
|
18
|
+
readonly doneCount: number;
|
|
19
|
+
readonly activeStepIds: readonly string[];
|
|
20
|
+
readonly activeStepIdsTruncated: boolean;
|
|
21
|
+
};
|
|
22
|
+
export type GovernanceWorkspaceTrace = {
|
|
23
|
+
readonly state: 'not_captured';
|
|
24
|
+
} | {
|
|
25
|
+
readonly state: 'unavailable';
|
|
26
|
+
readonly promptIndex: number;
|
|
27
|
+
readonly observedAt: string;
|
|
28
|
+
} | {
|
|
29
|
+
readonly state: 'captured';
|
|
30
|
+
readonly promptIndex: number;
|
|
31
|
+
readonly manifestHash: string;
|
|
32
|
+
readonly baseHead: string;
|
|
33
|
+
readonly entryCount: number;
|
|
34
|
+
readonly unresolvedCount: number;
|
|
35
|
+
readonly capturedAt: string;
|
|
36
|
+
readonly coverage: WorkspaceCheckpointRef['coverage'];
|
|
37
|
+
};
|
|
38
|
+
export interface GovernanceTraceContextSnapshot {
|
|
39
|
+
readonly sessionId: string;
|
|
40
|
+
readonly task: {
|
|
41
|
+
readonly scope: 'session';
|
|
42
|
+
} | {
|
|
43
|
+
readonly scope: 'kanban_task';
|
|
44
|
+
readonly taskId: string;
|
|
45
|
+
readonly boardId: string | null;
|
|
46
|
+
};
|
|
47
|
+
readonly plan: GovernancePlanTrace;
|
|
48
|
+
readonly workspace: GovernanceWorkspaceTrace;
|
|
49
|
+
}
|
|
50
|
+
export interface GovernanceTraceContext {
|
|
51
|
+
matchesPlanPath(candidate: string): boolean;
|
|
52
|
+
refreshPlan(): Promise<GovernancePlanTrace>;
|
|
53
|
+
updateWorkspaceCheckpoint(promptIndex: number, observedAt: string, checkpoint: WorkspaceCheckpointRef | undefined): void;
|
|
54
|
+
snapshot(taskId: string | null, boardId?: string | undefined): GovernanceTraceContextSnapshot;
|
|
55
|
+
}
|
|
56
|
+
export interface GovernanceTraceContextDependencies {
|
|
57
|
+
readonly readFile: (filePath: string) => Promise<string>;
|
|
58
|
+
readonly now: () => string;
|
|
59
|
+
}
|
|
60
|
+
export declare function createGovernanceTraceContext(input: {
|
|
61
|
+
readonly sessionId: string;
|
|
62
|
+
readonly planPath: string;
|
|
63
|
+
}, dependencies?: GovernanceTraceContextDependencies): Promise<GovernanceTraceContext>;
|
|
64
|
+
//# sourceMappingURL=governance-trace-context.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Agent } from '@wrongstack/core/agent';
|
|
2
2
|
import type { EventBus } from '@wrongstack/core/kernel';
|
|
3
|
-
import type { TokenCounter } from '@wrongstack/core/types';
|
|
3
|
+
import type { ContextSnapshot, TokenCounter } from '@wrongstack/core/types';
|
|
4
4
|
import type { TuiRuntimeState } from './tui-runtime-state.js';
|
|
5
5
|
export interface SessionResumeContext {
|
|
6
6
|
state: TuiRuntimeState;
|
|
@@ -14,6 +14,15 @@ export interface SessionResumeResult {
|
|
|
14
14
|
entries: unknown[];
|
|
15
15
|
nextId: number;
|
|
16
16
|
sessionId: string;
|
|
17
|
+
/**
|
|
18
|
+
* Optional context-window snapshot for the resumed session. `tokens` is a
|
|
19
|
+
* flat `number` (sum of `tokenCounter.currentRequestTokens()?.`'s
|
|
20
|
+
* `{ input, cacheRead, cacheWrite }` fields) — the TUI consumer
|
|
21
|
+
* (`packages/tui/src/reducers/composer.ts:561-577`) reads `tokens` as a
|
|
22
|
+
* flat number and gates on `snap.tokens > 0`. Forwarding the raw object
|
|
23
|
+
* would coerce to NaN and silently drop the snapshot at runtime.
|
|
24
|
+
*/
|
|
25
|
+
contextSnapshot?: ContextSnapshot | undefined;
|
|
17
26
|
}
|
|
18
27
|
/**
|
|
19
28
|
* Resume a past session by id.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { RunResult } from '@wrongstack/core/agent';
|
|
2
|
+
import type { ContentBlock } from '@wrongstack/core/types';
|
|
3
|
+
export interface ChimeraLeaderWakeAgent {
|
|
4
|
+
readonly ctx: {
|
|
5
|
+
activeRunSessionId?: string | undefined;
|
|
6
|
+
session?: {
|
|
7
|
+
id: string;
|
|
8
|
+
} | undefined;
|
|
9
|
+
};
|
|
10
|
+
run(input: string | ContentBlock[], options?: {
|
|
11
|
+
signal?: AbortSignal | undefined;
|
|
12
|
+
}): Promise<RunResult>;
|
|
13
|
+
}
|
|
14
|
+
export interface ChimeraLeaderWakeEvents {
|
|
15
|
+
emitCustom(event: string, payload: unknown): void;
|
|
16
|
+
}
|
|
17
|
+
export interface ChimeraLeaderWakeRequest {
|
|
18
|
+
sessionId: string;
|
|
19
|
+
cwd: string;
|
|
20
|
+
changedFiles: readonly string[];
|
|
21
|
+
structuredReport: string;
|
|
22
|
+
/** Optional stable key supplied by a durable report store. */
|
|
23
|
+
reportId?: string | undefined;
|
|
24
|
+
}
|
|
25
|
+
export interface ChimeraLeaderWakeResult {
|
|
26
|
+
key: string;
|
|
27
|
+
status: RunResult['status'];
|
|
28
|
+
iterations: number;
|
|
29
|
+
finalText?: string | undefined;
|
|
30
|
+
}
|
|
31
|
+
export declare function shouldWakeChimeraLeader(input: {
|
|
32
|
+
autoFix: 'off' | 'ask' | 'auto';
|
|
33
|
+
hasActionableFindings: boolean;
|
|
34
|
+
leaderApproved: boolean;
|
|
35
|
+
reviewLength: number;
|
|
36
|
+
}): boolean;
|
|
37
|
+
export interface ChimeraLeaderWakeQueue {
|
|
38
|
+
enqueue(request: ChimeraLeaderWakeRequest): Promise<ChimeraLeaderWakeResult>;
|
|
39
|
+
}
|
|
40
|
+
export interface CreateChimeraLeaderWakeQueueOptions {
|
|
41
|
+
agent: ChimeraLeaderWakeAgent;
|
|
42
|
+
events: ChimeraLeaderWakeEvents;
|
|
43
|
+
idlePollMs?: number | undefined;
|
|
44
|
+
wakeTimeoutMs?: number | undefined;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Serialize system-originated Chimera follow-ups through the session leader.
|
|
48
|
+
*
|
|
49
|
+
* A Chimera review can finish after the user's turn has returned. Calling
|
|
50
|
+
* `Agent.run()` immediately is unsafe when that turn is still draining, so
|
|
51
|
+
* the queue waits for the agent's pinned run marker to clear and then starts
|
|
52
|
+
* exactly one synthetic follow-up for a report/content key.
|
|
53
|
+
*/
|
|
54
|
+
export declare function createChimeraLeaderWakeQueue(options: CreateChimeraLeaderWakeQueueOptions): ChimeraLeaderWakeQueue;
|
|
55
|
+
export declare function chimeraLeaderWakeKey(request: ChimeraLeaderWakeRequest): string;
|
|
56
|
+
export declare function buildChimeraLeaderWakePrompt(request: ChimeraLeaderWakeRequest): string;
|
|
57
|
+
//# sourceMappingURL=chimera-leader-wake.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SubagentConfig } from '@wrongstack/core/types';
|
|
1
|
+
import type { SubagentConfig, SubagentError, TaskResult } from '@wrongstack/core/types';
|
|
2
2
|
/**
|
|
3
3
|
* Resolve the fallback-model chain used when spawning the chimera-review
|
|
4
4
|
* reviewer subagent.
|
|
@@ -25,6 +25,94 @@ export declare function assignReviewerModelsRoundRobin(provider: string, model:
|
|
|
25
25
|
model: string;
|
|
26
26
|
fallbackModels: string[];
|
|
27
27
|
};
|
|
28
|
+
/** One rung of the Chimera reviewer retry ladder. */
|
|
29
|
+
export interface ReviewerAttempt {
|
|
30
|
+
provider: string;
|
|
31
|
+
model: string;
|
|
32
|
+
/** In-request fallback chain handled inside the subagent for this rung. */
|
|
33
|
+
fallbackModels: string[];
|
|
34
|
+
/**
|
|
35
|
+
* Where the rung came from — an inherited (unpinned) spawn, the round-robin
|
|
36
|
+
* pick, an entry of the active fallback profile, or the session model kept as
|
|
37
|
+
* the guaranteed last resort.
|
|
38
|
+
*/
|
|
39
|
+
tier: 'inherit' | 'primary' | 'fallback' | 'session';
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Hard cap on reviewer spawns for a single review bundle. Every rung costs a
|
|
43
|
+
* full subagent run, so the ladder is bounded — but the session rung is always
|
|
44
|
+
* kept as the final entry no matter where the cap lands.
|
|
45
|
+
*/
|
|
46
|
+
export declare const MAX_REVIEWER_ATTEMPTS = 4;
|
|
47
|
+
/** Per-attempt wall-clock budget for a reviewer spawn. */
|
|
48
|
+
export declare const REVIEWER_ATTEMPT_TIMEOUT_MS = 900000;
|
|
49
|
+
/**
|
|
50
|
+
* Wall-clock budget for the whole ladder. Session shutdown awaits the pending
|
|
51
|
+
* Chimera work, so retries must not turn a 15-minute worst case into an
|
|
52
|
+
* unbounded one — later rungs draw down whatever is left of this budget.
|
|
53
|
+
*/
|
|
54
|
+
export declare const REVIEWER_LADDER_BUDGET_MS = 1200000;
|
|
55
|
+
/** Below this the ladder stops: too little left for a rung to say anything. */
|
|
56
|
+
export declare const REVIEWER_MIN_ATTEMPT_MS = 120000;
|
|
57
|
+
/**
|
|
58
|
+
* Build the ordered list of reviewer spawns to try for one review bundle.
|
|
59
|
+
*
|
|
60
|
+
* The first rung reproduces today's assignment exactly, so the happy path is
|
|
61
|
+
* unchanged. The rest exist only for the failure path: the assigned chain, then
|
|
62
|
+
* the session's fallback profile, then the session model itself. A review is
|
|
63
|
+
* never abandoned just because one model was unavailable.
|
|
64
|
+
*/
|
|
65
|
+
export declare function buildReviewerAttemptLadder(input: {
|
|
66
|
+
assigned: {
|
|
67
|
+
provider: string;
|
|
68
|
+
model: string;
|
|
69
|
+
fallbackModels?: readonly string[] | undefined;
|
|
70
|
+
};
|
|
71
|
+
/** Active fallback profile chain, appended after the assigned chain. */
|
|
72
|
+
profileChain?: readonly string[] | undefined;
|
|
73
|
+
/** Session provider/model — the guaranteed last resort. */
|
|
74
|
+
session: {
|
|
75
|
+
provider: string;
|
|
76
|
+
model: string;
|
|
77
|
+
};
|
|
78
|
+
maxAttempts?: number | undefined;
|
|
79
|
+
}): ReviewerAttempt[];
|
|
80
|
+
/**
|
|
81
|
+
* Cap for the mutating Chimera agents (fix, cascade). Deliberately tighter than
|
|
82
|
+
* the reviewer's: those agents edit files, so every extra rung re-enters a tree
|
|
83
|
+
* a dead attempt may already have touched. One retry recovers the common case
|
|
84
|
+
* (primary model down or rate-limited) without compounding that risk.
|
|
85
|
+
*/
|
|
86
|
+
export declare const MAX_MUTATING_ATTEMPTS = 2;
|
|
87
|
+
/**
|
|
88
|
+
* Ladder for a mutating Chimera agent (fix / cascade).
|
|
89
|
+
*
|
|
90
|
+
* Rung 0 deliberately carries no provider/model: those spawns inherit the role
|
|
91
|
+
* model matrix, and pinning a model here would silently override it. Later
|
|
92
|
+
* rungs name a model precisely because the inherited one just failed.
|
|
93
|
+
*/
|
|
94
|
+
export declare function buildMutatingAgentLadder(input: {
|
|
95
|
+
profileChain?: readonly string[] | undefined;
|
|
96
|
+
session: {
|
|
97
|
+
provider: string;
|
|
98
|
+
model: string;
|
|
99
|
+
};
|
|
100
|
+
maxAttempts?: number | undefined;
|
|
101
|
+
}): ReviewerAttempt[];
|
|
102
|
+
/**
|
|
103
|
+
* Should the ladder move to the next rung after this outcome?
|
|
104
|
+
*
|
|
105
|
+
* Anything short of success is worth another model — that is the whole point
|
|
106
|
+
* of the ladder. The exceptions are deliberate stops: a terminated subagent
|
|
107
|
+
* (`stopped`) and a parent abort (Ctrl+C, session teardown), where spawning a
|
|
108
|
+
* replacement would fight the thing that asked us to stop.
|
|
109
|
+
*/
|
|
110
|
+
export declare function shouldAdvanceReviewerLadder(status: TaskResult['status'] | undefined, error?: Pick<SubagentError, 'kind'> | undefined): boolean;
|
|
111
|
+
/**
|
|
112
|
+
* Timeout for the next rung: the per-attempt budget, clamped to whatever is
|
|
113
|
+
* left of the ladder budget. Returns 0 when the ladder should stop.
|
|
114
|
+
*/
|
|
115
|
+
export declare function reviewerAttemptTimeoutMs(remainingMs: number, attemptTimeoutMs?: number, minAttemptMs?: number): number;
|
|
28
116
|
/**
|
|
29
117
|
* Chimera reviewers only inspect code and return a report. They never repair
|
|
30
118
|
* files themselves; bug-hunter/security-scanner/fix agents own all mutations.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { SubagentConfig, TaskResult } from '@wrongstack/core/types';
|
|
2
|
+
import { type ReviewerAttempt } from './chimera-reviewer-policy.js';
|
|
3
|
+
import type { ExecuteDeps } from './execute-deps.js';
|
|
4
|
+
type Director = NonNullable<ExecuteDeps['fleet']['director']>;
|
|
5
|
+
/** Display form of a rung — `inherit` rungs have no model of their own. */
|
|
6
|
+
export declare function attemptLabel(attempt: ReviewerAttempt): string;
|
|
7
|
+
/** What went wrong on one rung of a Chimera subagent ladder. */
|
|
8
|
+
export interface LadderAttemptFailure {
|
|
9
|
+
/** `provider/model`, or `inherited model` for an unpinned rung. */
|
|
10
|
+
model: string;
|
|
11
|
+
tier: ReviewerAttempt['tier'];
|
|
12
|
+
/** 1-based rung index. */
|
|
13
|
+
attempt: number;
|
|
14
|
+
/** Human-readable failure summary. */
|
|
15
|
+
reason: string;
|
|
16
|
+
/** True when the rung threw instead of returning a result. */
|
|
17
|
+
threw: boolean;
|
|
18
|
+
/** Tool calls the rung made before dying — non-zero means it may have acted. */
|
|
19
|
+
toolCalls: number;
|
|
20
|
+
}
|
|
21
|
+
export interface LadderRunOutcome {
|
|
22
|
+
/** Terminal result, when a rung produced one. */
|
|
23
|
+
result?: TaskResult | undefined;
|
|
24
|
+
/** Winning subagent, left alive only when `keepWinnerAlive` is set. */
|
|
25
|
+
subagentId?: string | undefined;
|
|
26
|
+
/** 1-based index of the rung that succeeded. */
|
|
27
|
+
wonAt?: number | undefined;
|
|
28
|
+
attemptsUsed: number;
|
|
29
|
+
failures: LadderAttemptFailure[];
|
|
30
|
+
/** Exception from the final rung, when it threw rather than returned. */
|
|
31
|
+
lastError?: unknown;
|
|
32
|
+
}
|
|
33
|
+
export interface LadderRunOptions {
|
|
34
|
+
director: Director;
|
|
35
|
+
ladder: readonly ReviewerAttempt[];
|
|
36
|
+
/** Build the spawn config for a rung. Must apply the rung's model itself. */
|
|
37
|
+
buildConfig: (attempt: ReviewerAttempt, timeoutMs: number) => SubagentConfig;
|
|
38
|
+
/**
|
|
39
|
+
* Build the task text. Receives the failures so far so a mutating agent can
|
|
40
|
+
* be warned that the tree may already hold a dead attempt's partial edits.
|
|
41
|
+
*/
|
|
42
|
+
buildTask: (attempt: ReviewerAttempt, failures: readonly LadderAttemptFailure[]) => string;
|
|
43
|
+
/** Per-rung wall-clock budget. */
|
|
44
|
+
attemptTimeoutMs?: number | undefined;
|
|
45
|
+
/** Wall-clock budget for the whole ladder — bounds session shutdown. */
|
|
46
|
+
budgetMs?: number | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* Leave the winning subagent alive for the caller to retire. Failed rungs are
|
|
49
|
+
* always terminated immediately regardless.
|
|
50
|
+
*/
|
|
51
|
+
keepWinnerAlive?: boolean | undefined;
|
|
52
|
+
onAttemptFailed?: (failure: LadderAttemptFailure, next: ReviewerAttempt | undefined) => void | Promise<void>;
|
|
53
|
+
onRecovered?: (attempt: ReviewerAttempt, failures: readonly LadderAttemptFailure[]) => void | Promise<void>;
|
|
54
|
+
/** Injectable clock — tests drive the budget without real waiting. */
|
|
55
|
+
now?: () => number;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Run one task down a ladder of models until it succeeds.
|
|
59
|
+
*
|
|
60
|
+
* A Chimera agent must never be abandoned because a single model was
|
|
61
|
+
* unavailable: every rung short of a deliberate stop (`stopped` status, parent
|
|
62
|
+
* abort) advances to the next model, ending on the session model. The ladder is
|
|
63
|
+
* bounded by both rung count and wall clock — session shutdown awaits this work.
|
|
64
|
+
*/
|
|
65
|
+
export declare function runSubagentModelLadder(opts: LadderRunOptions): Promise<LadderRunOutcome>;
|
|
66
|
+
/**
|
|
67
|
+
* Preamble for a mutating agent's retry: the tree may already hold a dead
|
|
68
|
+
* attempt's edits, so the successor must re-read before it writes.
|
|
69
|
+
*/
|
|
70
|
+
export declare function buildRetryPreamble(failures: readonly LadderAttemptFailure[]): string;
|
|
71
|
+
export {};
|
|
72
|
+
//# sourceMappingURL=chimera-subagent-ladder.d.ts.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
fallbackCodexProviderModels,
|
|
3
3
|
filterCurrentCodexModelIds,
|
|
4
4
|
isCodexCatalogModel
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-GO3TJICK.js";
|
|
6
6
|
|
|
7
7
|
// src/acp-registry-cache.ts
|
|
8
8
|
import {
|
|
@@ -208,9 +208,9 @@ Try \`wstack models refresh\` once you have network access, or run with --no-fea
|
|
|
208
208
|
}
|
|
209
209
|
|
|
210
210
|
export {
|
|
211
|
-
setupProvider,
|
|
212
211
|
loadCachedAcpRegistry,
|
|
213
212
|
refreshAcpRegistry,
|
|
213
|
+
setupProvider,
|
|
214
214
|
createGracefulShutdown
|
|
215
215
|
};
|
|
216
|
-
//# sourceMappingURL=chunk-
|
|
216
|
+
//# sourceMappingURL=chunk-4HH3YGG4.js.map
|