@wrongstack/cli 0.313.0 → 0.316.1
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-LQMSMV32.js → acp-CEQINXWB.js} +2 -2
- package/dist/acp-registry-cache.d.ts +0 -2
- package/dist/acp-server-agent.d.ts +2 -1
- package/dist/arg-parser.d.ts +2 -1
- package/dist/{auth-VQMSZGKE.js → auth-GZ5A5OF5.js} +3 -3
- package/dist/auth-menu/local.d.ts +3 -2
- package/dist/boot/boot-auto-thin.d.ts +44 -0
- package/dist/boot/brain-decision-log.d.ts +2 -1
- package/dist/boot/config-backup-recovery.d.ts +2 -6
- package/dist/boot/dispatch-singleshot.d.ts +2 -1
- package/dist/boot/dispatch-webui.d.ts +5 -1
- package/dist/boot/event-wiring.d.ts +1 -1
- package/dist/boot/execution-mode.d.ts +2 -1
- package/dist/boot/governance-shadow-bridge.d.ts +4 -3
- package/dist/boot/governance-trace-context.d.ts +4 -4
- package/dist/boot/launch-menu.d.ts +2 -2
- package/dist/boot/system-prompt-builder.d.ts +1 -1
- package/dist/boot/system-prompt-menu.d.ts +10 -58
- package/dist/boot/system-prompt.d.ts +3 -3
- package/dist/boot/tool-registry.d.ts +3 -1
- package/dist/boot/tui-coordinator-callbacks.d.ts +2 -1
- package/dist/boot/tui-coordinator-setup.d.ts +3 -2
- package/dist/boot/tui-goal-wiring.d.ts +2 -1
- package/dist/boot/tui-live-sessions.d.ts +3 -1
- package/dist/boot/tui-session-resume.d.ts +82 -10
- package/dist/boot/tui-session-stub-enrich.d.ts +7 -1
- package/dist/boot/tui-settings-adapter.d.ts +3 -2
- package/dist/boot/tui-theme-adapter.d.ts +3 -2
- package/dist/boot/webui-session-child.d.ts +2 -12
- package/dist/boot-auto-thin-BZ675EVT.js +102 -0
- package/dist/boot-config.d.ts +1 -1
- package/dist/brain-menu/panel-service.d.ts +2 -1
- package/dist/chimera-cascade-evidence.d.ts +4 -21
- package/dist/chimera-review-task.d.ts +0 -7
- package/dist/chimera-subagent-ladder.d.ts +2 -2
- package/dist/{chunk-USYOJIV2.js → chunk-32MTOI2I.js} +2 -2
- package/dist/{chunk-CNQZ4HG4.js → chunk-37SPPLUD.js} +57 -8
- package/dist/chunk-ALE5KHCA.js +1 -0
- package/dist/{chunk-GWVLRUVH.js → chunk-G3IMKQRH.js} +25 -6
- package/dist/{chunk-BZJ4MP32.js → chunk-GKHUHAIK.js} +8 -3
- package/dist/{chunk-3JPTNADJ.js → chunk-GPPRNAKW.js} +1 -1
- package/dist/{chunk-KE7E7DPX.js → chunk-HXJYHAR4.js} +1 -1
- package/dist/{chunk-X3N5TS2S.js → chunk-JACOMTIH.js} +2 -76
- package/dist/{chunk-DGXNL7OT.js → chunk-JHUJUIOH.js} +1 -18
- package/dist/{chunk-WOTGMHAH.js → chunk-KG4X5F7Z.js} +1 -1
- package/dist/{chunk-NUIHRGPY.js → chunk-NV3JDK4F.js} +1 -1
- package/dist/{chunk-E3X4KM7T.js → chunk-NZZOYLQ7.js} +5 -10
- package/dist/{chunk-H6C7SO5H.js → chunk-QC5I4VWZ.js} +1 -1
- package/dist/chunk-SXJTVNWF.js +78 -0
- package/dist/{chunk-AOAIPYFB.js → chunk-SYIBTG3X.js} +2 -2
- package/dist/{chunk-PKHGLWUJ.js → chunk-T642Q732.js} +5 -4
- package/dist/{chunk-BGFM3PD7.js → chunk-UZ2TMHNH.js} +1 -1
- package/dist/{chunk-4S52MIIM.js → chunk-VXCCBI2W.js} +2 -2
- package/dist/{chunk-FKWHSFX4.js → chunk-XYKYXFEE.js} +1 -1
- package/dist/cli-entry-point.d.ts +9 -0
- package/dist/cli-eternal-flag.d.ts +1 -1
- package/dist/{cli-main-BFUSCWXE.js → cli-main-IEAM6SK7.js} +3692 -1619
- package/dist/cli-main-helpers.d.ts +3 -3
- package/dist/config-doctor.d.ts +34 -3
- package/dist/context-limit.d.ts +4 -3
- package/dist/{diag-doctor-OPTB2NWY.js → diag-doctor-LFCCBPMD.js} +3 -3
- package/dist/execute-deps.d.ts +36 -7
- package/dist/{execution-TOBPK6MD.js → execution-TZUGCKFU.js} +462 -78
- package/dist/execution-chimera-cascade.d.ts +1 -1
- package/dist/execution-chimera-review.d.ts +1 -1
- package/dist/execution-cleanup.d.ts +2 -1
- package/dist/execution-kanban-dispatch.d.ts +2 -1
- package/dist/execution-repl-fleet-callbacks.d.ts +3 -2
- package/dist/fleet/budget-source.d.ts +2 -1
- package/dist/fleet/host-context.d.ts +8 -1
- package/dist/fleet/host-director-event-bridges.d.ts +28 -3
- package/dist/fleet/host-event-bridge.d.ts +6 -1
- package/dist/fleet/host-explore-companion-registry.d.ts +60 -0
- package/dist/fleet/host-explore-companion.d.ts +7 -3
- package/dist/fleet/host-provider.d.ts +2 -1
- package/dist/fleet/host-session-writer.d.ts +9 -1
- package/dist/fleet/host-shadow-manager.d.ts +82 -20
- package/dist/fleet/host-shadow-pass.d.ts +9 -1
- package/dist/fleet/host-spawn-types.d.ts +9 -0
- package/dist/fleet/host-status.d.ts +2 -1
- package/dist/fleet/host-subagent-factory.d.ts +2 -1
- package/dist/fleet/host-subagent-session-audit.d.ts +56 -0
- package/dist/fleet/host-supervisor.d.ts +11 -1
- package/dist/fleet/host-task-result-report.d.ts +2 -1
- package/dist/fleet/host.d.ts +38 -6
- package/dist/fleet/status-broadcast.d.ts +2 -1
- package/dist/fleet-statusline.d.ts +2 -1
- package/dist/goal-host.d.ts +3 -2
- package/dist/{governance-V2Z42RBE.js → governance-JSGHHA2R.js} +1 -1
- package/dist/governance-hq-telemetry.d.ts +2 -2
- package/dist/{hq-2XIXGAER.js → hq-NDTJRRX3.js} +3 -3
- package/dist/hq-publisher.d.ts +1 -1
- package/dist/hq-recovery-html.d.ts +1 -6
- package/dist/hq-server/auth-state.d.ts +2 -1
- package/dist/hq-server/auth.d.ts +3 -2
- package/dist/hq-server/login-attempt-store.d.ts +2 -1
- package/dist/hq-server/mailbox-gateway-manager.d.ts +2 -1
- package/dist/hq-server/preflight.d.ts +3 -2
- package/dist/hq-server/server-lifecycle.d.ts +2 -1
- package/dist/hq-server/snapshot.d.ts +0 -9
- package/dist/hq-server/startup.d.ts +2 -3
- package/dist/hq-server/types.d.ts +2 -2
- package/dist/hq-server/upgrade-handler.d.ts +2 -1
- package/dist/hq-server/ws-leader.d.ts +0 -6
- package/dist/{hq-server-DBT3OOYD.js → hq-server-OH3SPSE2.js} +3 -13
- package/dist/hq-server.d.ts +1 -6
- package/dist/hq-static-serve.d.ts +2 -1
- package/dist/{hq-ttl-U2FAYFAT.js → hq-ttl-KUO3AU7X.js} +2 -2
- package/dist/{hq-tunnel-RFKGC4HI.js → hq-tunnel-LO55RCZE.js} +1 -1
- package/dist/hq-tunnel.d.ts +2 -1
- package/dist/index.js +113 -109
- package/dist/input-reader.d.ts +2 -1
- package/dist/kanban-dispatch-route.d.ts +27 -2
- package/dist/kanban-hq-sync.d.ts +2 -1
- package/dist/launch-hints.d.ts +2 -1
- package/dist/live-settings-input.d.ts +5 -0
- package/dist/mailbox-bridge-bootstrap.d.ts +2 -3
- package/dist/{mailbox-serve-5S3PHG5D.js → mailbox-serve-VKQIRCCB.js} +47 -28
- package/dist/{mcp-RRPKNRSN.js → mcp-AQKSASHD.js} +1 -1
- package/dist/mcp-serve.d.ts +2 -1
- package/dist/{modeldiag-H6DKWJ2N.js → modeldiag-4NYBRSFP.js} +1 -1
- package/dist/next-task-predictor.d.ts +3 -2
- package/dist/permission-prompt.d.ts +2 -1
- package/dist/picker.d.ts +0 -18
- package/dist/plugin-management.d.ts +3 -14
- package/dist/{plugin-usage-GCTYOZPH.js → plugin-usage-AP7SJCDA.js} +2 -2
- package/dist/{plugins-EEKHCMBE.js → plugins-HQ5FU2AM.js} +3 -5
- package/dist/preflight.d.ts +2 -1
- package/dist/{proxy-wiring-G26YGP7S.js → proxy-wiring-EQB5X5YH.js} +3 -3
- package/dist/renderer.d.ts +18 -1
- package/dist/repl-client-registration.d.ts +2 -1
- package/dist/repl.d.ts +1 -1
- package/dist/{replay-XU6ZD7GM.js → replay-FJ2JBXUA.js} +1 -1
- package/dist/{sdd-runtime-GFZ3NJKS.js → sdd-runtime-FLKCSTYV.js} +3 -5
- package/dist/services/commit-message.d.ts +2 -1
- package/dist/services/sdd/state.d.ts +0 -2
- package/dist/services/sdd-runtime.d.ts +1 -1
- package/dist/services/statusline-config.d.ts +27 -4
- package/dist/session-event-wiring.d.ts +3 -5
- package/dist/{sessions-config-7Q7QJBKJ.js → sessions-config-P2LK2L32.js} +5 -1
- package/dist/sessions-doctor-EXHAZSSE.js +146 -0
- package/dist/settings-menu.d.ts +2 -1
- package/dist/shutdown-cleanup.d.ts +3 -2
- package/dist/{simpleui-dist-33VO3QHF.js → simpleui-dist-JKNRCRRK.js} +1 -1
- package/dist/simpleui-dist.d.ts +3 -2
- package/dist/slash-commands/brain-council.d.ts +0 -4
- package/dist/slash-commands/brain-status.d.ts +0 -1
- package/dist/slash-commands/command-context.d.ts +16 -2
- package/dist/slash-commands/fix-classifier.d.ts +2 -1
- package/dist/slash-commands/kanban-agent-helpers.d.ts +2 -1
- package/dist/slash-commands/kanban-board-handlers.d.ts +2 -1
- package/dist/slash-commands/kanban-lifecycle-diagnostics.d.ts +2 -1
- package/dist/slash-commands/kanban-task-subcommands.d.ts +0 -1
- package/dist/slash-commands/memory-audience.d.ts +1 -10
- package/dist/slash-commands/memory-flags.d.ts +2 -1
- package/dist/slash-commands/sdd-command-helpers.d.ts +3 -2
- package/dist/slash-commands/sdd.d.ts +2 -2
- package/dist/slash-commands/settings-mutations.d.ts +0 -1
- package/dist/slash-commands/sidebar.d.ts +4 -0
- package/dist/slash-commands/statusline.d.ts +4 -4
- package/dist/slash-commands/telegram-pairing.d.ts +2 -2
- package/dist/slash-commands/telegram-setup.d.ts +2 -1
- package/dist/slash-commands/tier.d.ts +13 -0
- package/dist/subcommands/handlers/acp-connection-gate.d.ts +4 -3
- package/dist/subcommands/handlers/bench-run-help.d.ts +3 -8
- package/dist/subcommands/handlers/daemon-inventory.d.ts +3 -2
- package/dist/subcommands/handlers/governance.d.ts +2 -1
- package/dist/subcommands/handlers/model-smoke-test.d.ts +3 -2
- package/dist/subcommands/handlers/modeldiag-eval.d.ts +0 -4
- package/dist/subcommands/handlers/modeldiag-profiles.d.ts +1 -1
- package/dist/subcommands/handlers/models-add-help.d.ts +3 -8
- package/dist/subcommands/handlers/sessions-doctor.d.ts +3 -0
- package/dist/subcommands/handlers/update.d.ts +1 -1
- package/dist/terminal-format.d.ts +3 -2
- package/dist/tui-resource-menus.d.ts +2 -1
- package/dist/tuneup.d.ts +5 -5
- package/dist/{update-ZXNC6I6G.js → update-XKARO3CY.js} +3 -3
- package/dist/{update-check-WARHSVZA.js → update-check-LICQNYFK.js} +2 -2
- package/dist/update-check.d.ts +1 -1
- package/dist/utils/hq-ttl.d.ts +2 -1
- package/dist/webui-server/connection-handler.d.ts +34 -2
- package/dist/webui-server/prefs-seeding.d.ts +11 -1
- package/dist/webui-server/route-contexts.d.ts +45 -5
- package/dist/webui-server/session-start-payload.d.ts +13 -0
- package/dist/webui-server/setup-events.d.ts +14 -1
- package/dist/{webui-server-I53IYBW4.js → webui-server-LZOEH7O6.js} +374 -169
- package/dist/webui-server-options.d.ts +30 -4
- package/dist/wiring/brain-and-orchestration.d.ts +3 -3
- package/dist/wiring/cli-execute-builder.d.ts +3 -0
- package/dist/wiring/cli-heap-watchdog.d.ts +2 -1
- package/dist/wiring/cli-prompt-and-tools-setup.d.ts +10 -8
- package/dist/wiring/codebase-index.d.ts +2 -1
- package/dist/wiring/command-host-state.d.ts +61 -5
- package/dist/wiring/controllers.d.ts +3 -4
- package/dist/wiring/dep-watcher-bridge.d.ts +3 -2
- package/dist/wiring/dep-watcher.d.ts +2 -1
- package/dist/wiring/design-studio.d.ts +2 -1
- package/dist/wiring/director-setup.d.ts +3 -2
- package/dist/wiring/domain-terms-mirror.d.ts +2 -1
- package/dist/wiring/external-plugins.d.ts +3 -2
- package/dist/wiring/fleet-command-handlers.d.ts +2 -2
- package/dist/wiring/heap-watchdog-setup.d.ts +2 -1
- package/dist/wiring/hq-telemetry.d.ts +3 -2
- package/dist/wiring/lifecycle-plugins.d.ts +2 -2
- package/dist/wiring/management-tools.d.ts +30 -2
- package/dist/wiring/metrics.d.ts +2 -2
- package/dist/wiring/plugins.d.ts +0 -1
- package/dist/wiring/prompt-journal-recorder.d.ts +1 -1
- package/dist/wiring/provider-runtime-setup.d.ts +9 -2
- package/dist/wiring/provider-runtime.d.ts +23 -3
- package/dist/wiring/provider-status.d.ts +2 -1
- package/dist/wiring/provider-utility-tools.d.ts +2 -1
- package/dist/wiring/provider.d.ts +2 -1
- package/dist/wiring/replay-governance-setup.d.ts +2 -1
- package/dist/wiring/replay.d.ts +2 -1
- package/dist/wiring/resume-candidate.d.ts +27 -0
- package/dist/wiring/runtime-controller-deps.d.ts +8 -1
- package/dist/wiring/runtime-dispatch-state.d.ts +2 -1
- package/dist/wiring/runtime-lifecycle-deps.d.ts +2 -1
- package/dist/wiring/runtime-picker-deps.d.ts +2 -1
- package/dist/wiring/session-command-handlers.d.ts +2 -2
- package/dist/wiring/session-establishment.d.ts +2 -1
- package/dist/wiring/session-registry.d.ts +3 -2
- package/dist/wiring/session-runtime.d.ts +1 -1
- package/dist/wiring/slash-commands.d.ts +5 -4
- package/dist/wiring/teardown-registrar.d.ts +3 -2
- package/dist/wiring/vector-memory-setup.d.ts +3 -2
- package/dist/wiring/wrongtrace-hooks.d.ts +1 -1
- package/dist/wiring/wrongtrace-telemetry.d.ts +2 -1
- package/dist/{wrongtrace-telemetry-6M2CCBX5.js → wrongtrace-telemetry-FNLANZ5I.js} +1 -1
- package/package.json +30 -30
- package/dist/auth-menu.d.ts +0 -7
- package/dist/chunk-WHOIR577.js +0 -1
- package/dist/webui-server/terminal-log-view.d.ts +0 -47
- package/dist/wiring/tools.d.ts +0 -29
|
@@ -58,6 +58,26 @@ export interface CliWebUIOptions {
|
|
|
58
58
|
checkpointMaxSpawns?: number | undefined;
|
|
59
59
|
ceilingMismatch?: boolean | undefined;
|
|
60
60
|
} | null) | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* Stop every subagent that ONE session spawned.
|
|
63
|
+
*
|
|
64
|
+
* Aborting a session's run unwinds only the workers its leader is blocked
|
|
65
|
+
* on; anything started with `spawn_subagent` + `assign_task` keeps running
|
|
66
|
+
* because nothing asked it to stop — so a tab's Stop button silenced the
|
|
67
|
+
* leader while its fleet ground on. The CLI owns the Director, so it
|
|
68
|
+
* supplies the cascade. Session-scoped by contract: with four tabs live,
|
|
69
|
+
* stopping one must never reach into another's fleet.
|
|
70
|
+
*/
|
|
71
|
+
stopSessionFleet?: ((sessionId: string) => void | Promise<void>) | undefined;
|
|
72
|
+
/**
|
|
73
|
+
* A tab was closed: release the host-side helpers pinned to its
|
|
74
|
+
* conversation (explore companion, shadow-review bookkeeping).
|
|
75
|
+
*
|
|
76
|
+
* NOT a fleet teardown — a background run outlives the tab that started it,
|
|
77
|
+
* which is why `retireUndisplayedSessions` skips a session with a live run
|
|
78
|
+
* before calling this. Absent for hosts with a single conversation.
|
|
79
|
+
*/
|
|
80
|
+
onSessionRetired?: ((sessionId: string) => void) | undefined;
|
|
61
81
|
/** Browser-facing HTTP URL, used when WebUI is exposed behind a tunnel/proxy. */
|
|
62
82
|
publicUrl?: string | undefined;
|
|
63
83
|
/** Browser-facing WebSocket URL injected into the frontend. */
|
|
@@ -73,8 +93,14 @@ export interface CliWebUIOptions {
|
|
|
73
93
|
/** Read-only worker transcript snapshot used for F5/reconnect replay. */
|
|
74
94
|
agentTranscripts?: {
|
|
75
95
|
getAllSessions(): import('@wrongstack/core/coordination').AgentVirtualSession[];
|
|
76
|
-
/**
|
|
77
|
-
|
|
96
|
+
/**
|
|
97
|
+
* Ring + on-disk transcripts, for surfaces that survive a process
|
|
98
|
+
* restart. `only` restricts the result to named subagents — the
|
|
99
|
+
* transcripts directory is shared by every session of the project, so
|
|
100
|
+
* an unfiltered read hands each of four open tabs the union of all
|
|
101
|
+
* four tabs' workers.
|
|
102
|
+
*/
|
|
103
|
+
loadSessionsFromDisk(only?: readonly string[]): Promise<import('@wrongstack/core/coordination').AgentVirtualSession[]>;
|
|
78
104
|
} | undefined;
|
|
79
105
|
/**
|
|
80
106
|
* Fired once the WebSocket server is accepting connections. Useful for
|
|
@@ -202,9 +228,9 @@ export interface CliWebUIOptions {
|
|
|
202
228
|
* setter the TUI/REPL use). Without it the switch only lands in
|
|
203
229
|
* context.meta and the running loop never changes mode.
|
|
204
230
|
*/
|
|
205
|
-
onAutonomySwitch?: ((mode: string) => void) | undefined;
|
|
231
|
+
onAutonomySwitch?: ((mode: string, sessionId?: string | undefined) => void) | undefined;
|
|
206
232
|
/** Forward browser YOLO changes to the host's live permission policy. */
|
|
207
|
-
onYoloSwitch?: ((enabled: boolean) => void) | undefined;
|
|
233
|
+
onYoloSwitch?: ((enabled: boolean, sessionId?: string | undefined) => void) | undefined;
|
|
208
234
|
/**
|
|
209
235
|
* Forward `wrongProxyEnabled` / `wrongProxyUrl` changes from the
|
|
210
236
|
* browser to the runtime probe (`@wrongstack/cli/wiring/proxy-wiring`).
|
|
@@ -9,7 +9,7 @@ type AnyObj = any;
|
|
|
9
9
|
* and the TUI Brain panel. `describe` fields are static wiring facts surfaced
|
|
10
10
|
* in `/brain status`.
|
|
11
11
|
*/
|
|
12
|
-
|
|
12
|
+
interface BrainRuntimeSettings {
|
|
13
13
|
maxAutoRisk: BrainAutoRisk;
|
|
14
14
|
/** 'headless' = never block on a human; terminal policy resolves escalations. */
|
|
15
15
|
mode: BrainEscalationMode;
|
|
@@ -20,7 +20,7 @@ export interface BrainRuntimeSettings {
|
|
|
20
20
|
/** Absolute path of the persistent decision ledger (undefined = disabled). */
|
|
21
21
|
readonly ledgerPath?: string | undefined;
|
|
22
22
|
}
|
|
23
|
-
|
|
23
|
+
interface BrainOrchestrationDeps {
|
|
24
24
|
events: AnyObj;
|
|
25
25
|
config: Config;
|
|
26
26
|
/** Secret vault for the global-config persist path of Brain settings. */
|
|
@@ -64,7 +64,7 @@ export interface BrainOrchestrationDeps {
|
|
|
64
64
|
/** Trusted governance hook for in-process Fleet tool pipelines. */
|
|
65
65
|
installToolBoundary?: ((pipelines: import('@wrongstack/core/agent').AgentPipelines) => void) | undefined;
|
|
66
66
|
}
|
|
67
|
-
|
|
67
|
+
interface BrainOrchestrationResult {
|
|
68
68
|
brain: ObservableBrainArbiter;
|
|
69
69
|
brainLog: AnyObj[];
|
|
70
70
|
brainSettings: BrainRuntimeSettings;
|
|
@@ -83,6 +83,9 @@ export declare function runCliExecution(params: {
|
|
|
83
83
|
statuslineHiddenItems: RC['statuslineHiddenItems'];
|
|
84
84
|
setStatuslineHiddenItems: NonNullable<RC['setStatuslineHiddenItems']>;
|
|
85
85
|
saveStatuslineHiddenItems: NonNullable<RC['saveStatuslineHiddenItems']>;
|
|
86
|
+
statuslineLines?: RC['statuslineLines'];
|
|
87
|
+
setStatuslineLines?: NonNullable<RC['setStatuslineLines']>;
|
|
88
|
+
saveStatuslineLines?: NonNullable<RC['saveStatuslineLines']>;
|
|
86
89
|
setYoloMode: NonNullable<RC['getYolo']>;
|
|
87
90
|
autonomyMode: ReturnType<RC['getAutonomy']>;
|
|
88
91
|
setAutonomyMode: NonNullable<RC['setAutonomy']>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
interface CliHeapWatchdogParams {
|
|
2
2
|
flags: {
|
|
3
3
|
simpleui?: boolean;
|
|
4
4
|
webui?: boolean;
|
|
@@ -30,4 +30,5 @@ export interface CliHeapWatchdogParams {
|
|
|
30
30
|
teardownHandlers: Array<() => void>;
|
|
31
31
|
}
|
|
32
32
|
export declare function startCliHeapWatchdog(params: CliHeapWatchdogParams): void;
|
|
33
|
+
export {};
|
|
33
34
|
//# sourceMappingURL=cli-heap-watchdog.d.ts.map
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { ToolRegistry } from '@wrongstack/core/registry';
|
|
2
2
|
import type { VectorMemoryStore } from '@wrongstack/vector-memory';
|
|
3
|
+
type AnyObj = any;
|
|
3
4
|
export declare function setupCliPromptAndTools(params: {
|
|
4
|
-
container:
|
|
5
|
-
modeStore:
|
|
6
|
-
memoryStore:
|
|
7
|
-
skillLoader:
|
|
5
|
+
container: AnyObj;
|
|
6
|
+
modeStore: AnyObj;
|
|
7
|
+
memoryStore: AnyObj;
|
|
8
|
+
skillLoader: AnyObj;
|
|
8
9
|
sessionRef: {
|
|
9
10
|
current: import('@wrongstack/core/types').SessionWriter | undefined;
|
|
10
11
|
};
|
|
@@ -14,12 +15,12 @@ export declare function setupCliPromptAndTools(params: {
|
|
|
14
15
|
modeId: string;
|
|
15
16
|
modePrompt?: string | undefined;
|
|
16
17
|
modelCapabilitiesRef: {
|
|
17
|
-
current:
|
|
18
|
+
current: AnyObj;
|
|
18
19
|
};
|
|
19
|
-
config:
|
|
20
|
-
wpaths:
|
|
20
|
+
config: AnyObj;
|
|
21
|
+
wpaths: AnyObj;
|
|
21
22
|
projectRoot: string;
|
|
22
|
-
events:
|
|
23
|
+
events: AnyObj;
|
|
23
24
|
/**
|
|
24
25
|
* Optional vector memory store. When provided, the four
|
|
25
26
|
* `vector_memory_*` tools are registered alongside the SAGE tools so
|
|
@@ -30,4 +31,5 @@ export declare function setupCliPromptAndTools(params: {
|
|
|
30
31
|
}): Promise<{
|
|
31
32
|
toolRegistry: ToolRegistry;
|
|
32
33
|
}>;
|
|
34
|
+
export {};
|
|
33
35
|
//# sourceMappingURL=cli-prompt-and-tools-setup.d.ts.map
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
import type { AgentPipelines, Context } from '@wrongstack/core/agent';
|
|
19
19
|
import type { IndexingConfig, Logger } from '@wrongstack/core/types';
|
|
20
|
-
|
|
20
|
+
interface CodebaseIndexingDeps {
|
|
21
21
|
config: {
|
|
22
22
|
indexing?: IndexingConfig | undefined;
|
|
23
23
|
};
|
|
@@ -31,4 +31,5 @@ export interface CodebaseIndexingDeps {
|
|
|
31
31
|
* cancels pending reindexes — call it on process teardown.
|
|
32
32
|
*/
|
|
33
33
|
export declare function setupCodebaseIndexing(deps: CodebaseIndexingDeps): Promise<() => void>;
|
|
34
|
+
export {};
|
|
34
35
|
//# sourceMappingURL=codebase-index.d.ts.map
|
|
@@ -8,7 +8,8 @@ import type { HqCommandController } from '../hq-command-controller.js';
|
|
|
8
8
|
import type { ReadlineInputReader } from '../input-reader.js';
|
|
9
9
|
import type { MultiAgentHost } from '../multi-agent.js';
|
|
10
10
|
import type { TerminalRenderer } from '../renderer.js';
|
|
11
|
-
|
|
11
|
+
import type { StatuslineLines } from '@wrongstack/core/statusline';
|
|
12
|
+
interface CommandHostStateInput {
|
|
12
13
|
getConfig: () => Config;
|
|
13
14
|
setConfig: (config: Config) => void;
|
|
14
15
|
getDirector: () => Director | null;
|
|
@@ -28,16 +29,70 @@ export interface CommandHostStateInput {
|
|
|
28
29
|
setYolo?(enabled: boolean): void;
|
|
29
30
|
getYolo?(): boolean;
|
|
30
31
|
};
|
|
32
|
+
/**
|
|
33
|
+
* The live conversation's meta bag.
|
|
34
|
+
*
|
|
35
|
+
* YOLO is decided per conversation — the permission policy reads
|
|
36
|
+
* `ctx.meta.yolo` and falls back to its own process-wide flag — so a runtime
|
|
37
|
+
* toggle has to write BOTH. Leaving the meta stale would let a boot-time
|
|
38
|
+
* value keep overriding the switch the user just flipped.
|
|
39
|
+
*/
|
|
40
|
+
contextMeta?: Record<string, unknown> | undefined;
|
|
31
41
|
}
|
|
32
42
|
export declare function setupCommandHostState(input: CommandHostStateInput): Promise<{
|
|
33
43
|
fleetStreamController: import("./controllers.js").FleetStreamController;
|
|
34
44
|
interruptController: import("./controllers.js").InterruptController;
|
|
35
45
|
enhanceController: import("./controllers.js").EnhanceController;
|
|
36
46
|
statuslineConfigDeps: import("./controllers.js").StatuslineConfigDeps;
|
|
37
|
-
statuslineHiddenItems: ("auto_proceed" | "autonomy" | "brain" | "breaker" | "cache" | "context" | "cost" | "
|
|
38
|
-
getCurrentHiddenItems: () => ("auto_proceed" | "autonomy" | "brain" | "breaker" | "cache" | "context" | "cost" | "
|
|
39
|
-
setStatuslineHiddenItems: (items: ("auto_proceed" | "autonomy" | "brain" | "breaker" | "cache" | "context" | "cost" | "
|
|
40
|
-
saveStatuslineHiddenItems: (items: ("auto_proceed" | "autonomy" | "brain" | "breaker" | "cache" | "context" | "cost" | "
|
|
47
|
+
statuslineHiddenItems: ("auto_proceed" | "autonomy" | "brain" | "breaker" | "cache" | "context" | "cost" | "debug_stream" | "dropped_tools" | "elapsed" | "enhance" | "eternal_stage" | "fleet" | "fleet_agents" | "git" | "goal" | "hint" | "index" | "mailbox" | "memory_context" | "mode" | "model" | "next_steps" | "plan" | "processes" | "project" | "prompt_variant" | "queue" | "sessions" | "side_effects" | "state" | "tasks" | "theme" | "todos" | "token_saving" | "tokens" | "tools" | "version" | "working_dir" | "yolo")[];
|
|
48
|
+
getCurrentHiddenItems: () => ("auto_proceed" | "autonomy" | "brain" | "breaker" | "cache" | "context" | "cost" | "debug_stream" | "dropped_tools" | "elapsed" | "enhance" | "eternal_stage" | "fleet" | "fleet_agents" | "git" | "goal" | "hint" | "index" | "mailbox" | "memory_context" | "mode" | "model" | "next_steps" | "plan" | "processes" | "project" | "prompt_variant" | "queue" | "sessions" | "side_effects" | "state" | "tasks" | "theme" | "todos" | "token_saving" | "tokens" | "tools" | "version" | "working_dir" | "yolo")[];
|
|
49
|
+
setStatuslineHiddenItems: (items: ("auto_proceed" | "autonomy" | "brain" | "breaker" | "cache" | "context" | "cost" | "debug_stream" | "dropped_tools" | "elapsed" | "enhance" | "eternal_stage" | "fleet" | "fleet_agents" | "git" | "goal" | "hint" | "index" | "mailbox" | "memory_context" | "mode" | "model" | "next_steps" | "plan" | "processes" | "project" | "prompt_variant" | "queue" | "sessions" | "side_effects" | "state" | "tasks" | "theme" | "todos" | "token_saving" | "tokens" | "tools" | "version" | "working_dir" | "yolo")[]) => void;
|
|
50
|
+
saveStatuslineHiddenItems: (items: ("auto_proceed" | "autonomy" | "brain" | "breaker" | "cache" | "context" | "cost" | "debug_stream" | "dropped_tools" | "elapsed" | "enhance" | "eternal_stage" | "fleet" | "fleet_agents" | "git" | "goal" | "hint" | "index" | "mailbox" | "memory_context" | "mode" | "model" | "next_steps" | "plan" | "processes" | "project" | "prompt_variant" | "queue" | "sessions" | "side_effects" | "state" | "tasks" | "theme" | "todos" | "token_saving" | "tokens" | "tools" | "version" | "working_dir" | "yolo")[]) => Promise<void>;
|
|
51
|
+
statuslineLines: {
|
|
52
|
+
auto_proceed?: import("@wrongstack/core/statusline").StatuslineLine;
|
|
53
|
+
autonomy?: import("@wrongstack/core/statusline").StatuslineLine;
|
|
54
|
+
brain?: import("@wrongstack/core/statusline").StatuslineLine;
|
|
55
|
+
breaker?: import("@wrongstack/core/statusline").StatuslineLine;
|
|
56
|
+
cache?: import("@wrongstack/core/statusline").StatuslineLine;
|
|
57
|
+
context?: import("@wrongstack/core/statusline").StatuslineLine;
|
|
58
|
+
cost?: import("@wrongstack/core/statusline").StatuslineLine;
|
|
59
|
+
debug_stream?: import("@wrongstack/core/statusline").StatuslineLine;
|
|
60
|
+
dropped_tools?: import("@wrongstack/core/statusline").StatuslineLine;
|
|
61
|
+
elapsed?: import("@wrongstack/core/statusline").StatuslineLine;
|
|
62
|
+
enhance?: import("@wrongstack/core/statusline").StatuslineLine;
|
|
63
|
+
eternal_stage?: import("@wrongstack/core/statusline").StatuslineLine;
|
|
64
|
+
fleet?: import("@wrongstack/core/statusline").StatuslineLine;
|
|
65
|
+
fleet_agents?: import("@wrongstack/core/statusline").StatuslineLine;
|
|
66
|
+
git?: import("@wrongstack/core/statusline").StatuslineLine;
|
|
67
|
+
goal?: import("@wrongstack/core/statusline").StatuslineLine;
|
|
68
|
+
hint?: import("@wrongstack/core/statusline").StatuslineLine;
|
|
69
|
+
index?: import("@wrongstack/core/statusline").StatuslineLine;
|
|
70
|
+
mailbox?: import("@wrongstack/core/statusline").StatuslineLine;
|
|
71
|
+
memory_context?: import("@wrongstack/core/statusline").StatuslineLine;
|
|
72
|
+
mode?: import("@wrongstack/core/statusline").StatuslineLine;
|
|
73
|
+
model?: import("@wrongstack/core/statusline").StatuslineLine;
|
|
74
|
+
next_steps?: import("@wrongstack/core/statusline").StatuslineLine;
|
|
75
|
+
plan?: import("@wrongstack/core/statusline").StatuslineLine;
|
|
76
|
+
processes?: import("@wrongstack/core/statusline").StatuslineLine;
|
|
77
|
+
project?: import("@wrongstack/core/statusline").StatuslineLine;
|
|
78
|
+
prompt_variant?: import("@wrongstack/core/statusline").StatuslineLine;
|
|
79
|
+
queue?: import("@wrongstack/core/statusline").StatuslineLine;
|
|
80
|
+
sessions?: import("@wrongstack/core/statusline").StatuslineLine;
|
|
81
|
+
side_effects?: import("@wrongstack/core/statusline").StatuslineLine;
|
|
82
|
+
state?: import("@wrongstack/core/statusline").StatuslineLine;
|
|
83
|
+
tasks?: import("@wrongstack/core/statusline").StatuslineLine;
|
|
84
|
+
theme?: import("@wrongstack/core/statusline").StatuslineLine;
|
|
85
|
+
todos?: import("@wrongstack/core/statusline").StatuslineLine;
|
|
86
|
+
token_saving?: import("@wrongstack/core/statusline").StatuslineLine;
|
|
87
|
+
tokens?: import("@wrongstack/core/statusline").StatuslineLine;
|
|
88
|
+
tools?: import("@wrongstack/core/statusline").StatuslineLine;
|
|
89
|
+
version?: import("@wrongstack/core/statusline").StatuslineLine;
|
|
90
|
+
working_dir?: import("@wrongstack/core/statusline").StatuslineLine;
|
|
91
|
+
yolo?: import("@wrongstack/core/statusline").StatuslineLine;
|
|
92
|
+
};
|
|
93
|
+
getCurrentStatuslineLines: () => Partial<Record<import("@wrongstack/core/statusline").StatuslineItem, import("@wrongstack/core/statusline").StatuslineLine>>;
|
|
94
|
+
setStatuslineLines: (next: StatuslineLines) => void;
|
|
95
|
+
saveStatuslineLines: (next: StatuslineLines) => Promise<void>;
|
|
41
96
|
agentsMonitorController: import("./controllers.js").AgentsMonitorController;
|
|
42
97
|
onPanelOpen: {
|
|
43
98
|
current: ((action: string) => boolean) | null;
|
|
@@ -83,4 +138,5 @@ export declare function setupCommandHostState(input: CommandHostStateInput): Pro
|
|
|
83
138
|
};
|
|
84
139
|
sddRunRegistry: SddRunRegistry;
|
|
85
140
|
}>;
|
|
141
|
+
export {};
|
|
86
142
|
//# sourceMappingURL=command-host-state.d.ts.map
|
|
@@ -8,8 +8,7 @@
|
|
|
8
8
|
* docs/plans/cli-main-executiondeps-refactor.md
|
|
9
9
|
*/
|
|
10
10
|
import type { Config, FleetChatVerbosity } from '@wrongstack/core/types';
|
|
11
|
-
import type { StatuslineConfigKey } from '../services/statusline-config.js';
|
|
12
|
-
import { type StatuslineConfig } from '../services/statusline-config.js';
|
|
11
|
+
import type { StatuslineConfigKey, StatuslineDocument } from '../services/statusline-config.js';
|
|
13
12
|
export interface FleetStreamController {
|
|
14
13
|
/** Fleet-chat verbosity streamed into the main chat: off | full. */
|
|
15
14
|
mode: FleetChatVerbosity;
|
|
@@ -42,8 +41,8 @@ export interface AgentsMonitorController {
|
|
|
42
41
|
}
|
|
43
42
|
export declare function createAgentsMonitorController(): AgentsMonitorController;
|
|
44
43
|
export interface StatuslineConfigDeps {
|
|
45
|
-
get: () => Promise<
|
|
46
|
-
set: (cfg:
|
|
44
|
+
get: () => Promise<StatuslineDocument>;
|
|
45
|
+
set: (cfg: StatuslineDocument) => Promise<void>;
|
|
47
46
|
}
|
|
48
47
|
export declare function createStatuslineConfigDeps(): StatuslineConfigDeps;
|
|
49
48
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { EventBus } from '@wrongstack/core/kernel';
|
|
2
|
-
|
|
2
|
+
interface SetupDepWatcherBridgeDeps {
|
|
3
3
|
config: {
|
|
4
4
|
extensions?: Record<string, unknown>;
|
|
5
5
|
};
|
|
@@ -15,9 +15,10 @@ export interface SetupDepWatcherBridgeDeps {
|
|
|
15
15
|
};
|
|
16
16
|
teardownHandlers: Array<() => void>;
|
|
17
17
|
}
|
|
18
|
-
|
|
18
|
+
interface SetupDepWatcherBridgeResult {
|
|
19
19
|
/** Parsed dep-watcher config fragment (or undefined when absent/disabled). */
|
|
20
20
|
dwCfg: Record<string, unknown> | undefined;
|
|
21
21
|
}
|
|
22
22
|
export declare function setupDepWatcherBridge(deps: SetupDepWatcherBridgeDeps): SetupDepWatcherBridgeResult;
|
|
23
|
+
export {};
|
|
23
24
|
//# sourceMappingURL=dep-watcher-bridge.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { DefaultLogger } from '@wrongstack/core/infrastructure';
|
|
2
2
|
import type { EventBus } from '@wrongstack/core/kernel';
|
|
3
3
|
import type { MultiAgentHost } from '../multi-agent.js';
|
|
4
|
-
|
|
4
|
+
interface SetupDepWatcherConsumersDeps {
|
|
5
5
|
dwCfg: Record<string, unknown> | undefined;
|
|
6
6
|
globalRoot: string;
|
|
7
7
|
projectSlug: string;
|
|
@@ -20,4 +20,5 @@ export interface SetupDepWatcherConsumersDeps {
|
|
|
20
20
|
* original authors when their added packages become outdated.
|
|
21
21
|
*/
|
|
22
22
|
export declare function setupDepWatcherConsumers(deps: SetupDepWatcherConsumersDeps): void;
|
|
23
|
+
export {};
|
|
23
24
|
//# sourceMappingURL=dep-watcher.d.ts.map
|
|
@@ -7,11 +7,12 @@
|
|
|
7
7
|
* per-turn detection + kit-menu-injection middleware, which needs a live Context.
|
|
8
8
|
*/
|
|
9
9
|
import type { AgentPipelines, Context } from '@wrongstack/core/agent';
|
|
10
|
-
|
|
10
|
+
interface InstallDesignStudioDeps {
|
|
11
11
|
pipelines: AgentPipelines;
|
|
12
12
|
context: Context;
|
|
13
13
|
/** When false, no middleware is installed (the tool + /design stay manual). */
|
|
14
14
|
enabled?: boolean | undefined;
|
|
15
15
|
}
|
|
16
16
|
export declare function installDesignStudio(deps: InstallDesignStudioDeps): void;
|
|
17
|
+
export {};
|
|
17
18
|
//# sourceMappingURL=design-studio.d.ts.map
|
|
@@ -8,10 +8,10 @@ import type { WstackPaths } from '@wrongstack/core/utils';
|
|
|
8
8
|
* Persistent ref for autonomy mode — set once here, read elsewhere via
|
|
9
9
|
* `autonomyModeRef.current`. Matches the shape created in cli-main.ts.
|
|
10
10
|
*/
|
|
11
|
-
|
|
11
|
+
interface AutonomyModeRef {
|
|
12
12
|
current: import('../services/autonomy-mode.js').AutonomyMode;
|
|
13
13
|
}
|
|
14
|
-
|
|
14
|
+
interface DirectorAutonomyDeps {
|
|
15
15
|
flags: Record<string, string | boolean>;
|
|
16
16
|
config: Config;
|
|
17
17
|
wpaths: WstackPaths;
|
|
@@ -55,4 +55,5 @@ export interface DirectorAutonomyResult {
|
|
|
55
55
|
* `multiAgentHost.ensureDirector()`) and the other mutable fields later.
|
|
56
56
|
*/
|
|
57
57
|
export declare function setupDirectorAndAutonomy(deps: DirectorAutonomyDeps): DirectorAutonomyResult;
|
|
58
|
+
export {};
|
|
58
59
|
//# sourceMappingURL=director-setup.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
interface RefreshDomainTermsMirrorOptions {
|
|
2
2
|
/** Absolute project root whose `.wrongstack/domain-terms.md` should be refreshed. */
|
|
3
3
|
projectRoot: string;
|
|
4
4
|
}
|
|
@@ -15,4 +15,5 @@ export interface RefreshDomainTermsMirrorOptions {
|
|
|
15
15
|
* outcome.
|
|
16
16
|
*/
|
|
17
17
|
export declare function refreshDomainTermsMirror(options: RefreshDomainTermsMirrorOptions): Promise<string | null>;
|
|
18
|
+
export {};
|
|
18
19
|
//# sourceMappingURL=domain-terms-mirror.d.ts.map
|
|
@@ -33,7 +33,7 @@ export declare function normalizeConfigPath(raw: string, projectRoot: string): s
|
|
|
33
33
|
* specs) — callers then proceed without the pre-import trust gate.
|
|
34
34
|
*/
|
|
35
35
|
export declare function resolveSpecifierEntry(spec: string): string | undefined;
|
|
36
|
-
|
|
36
|
+
interface ExternalPluginHooks {
|
|
37
37
|
/** Normalize a config spec to its bare plugin name (null for paths/URLs). */
|
|
38
38
|
nameFromSpec(spec: string): string | null;
|
|
39
39
|
/** True when the spec refers to a built-in plugin (loaded elsewhere). */
|
|
@@ -41,7 +41,7 @@ export interface ExternalPluginHooks {
|
|
|
41
41
|
/** Warn-once deprecation check; returns true when the spec is deprecated. */
|
|
42
42
|
warnIfDeprecated(name: string): boolean;
|
|
43
43
|
}
|
|
44
|
-
|
|
44
|
+
interface LoadExternalPluginsContext {
|
|
45
45
|
config: Config;
|
|
46
46
|
log: Logger;
|
|
47
47
|
/** `~/.wrongstack` — anchors global discovery + the default trust store. */
|
|
@@ -55,4 +55,5 @@ export interface LoadExternalPluginsContext {
|
|
|
55
55
|
importModule?: ((url: string) => Promise<unknown>) | undefined;
|
|
56
56
|
}
|
|
57
57
|
export declare function loadExternalPlugins(ctx: LoadExternalPluginsContext, hooks: ExternalPluginHooks): Promise<Plugin[]>;
|
|
58
|
+
export {};
|
|
58
59
|
//# sourceMappingURL=external-plugins.d.ts.map
|
|
@@ -3,8 +3,8 @@ import type { EventBus } from '@wrongstack/core/kernel';
|
|
|
3
3
|
import type { MultiAgentHost } from '../multi-agent.js';
|
|
4
4
|
import type { BuiltinSlashCommandDeps } from './slash-commands.js';
|
|
5
5
|
type SlashCommandDeps = BuiltinSlashCommandDeps;
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
type FleetCommandHandlers = Pick<SlashCommandDeps, 'onSpawn' | 'onSpawnAndWait' | 'onAgents' | 'onFleet' | 'onFleetStatus' | 'onFleetBudget' | 'onFleetUsage' | 'onFleetKill' | 'onFleetTerminate' | 'onFleetSpawn' | 'onFleetLog' | 'onFleetRetry' | 'onDirector'>;
|
|
7
|
+
interface FleetCommandHandlersInput {
|
|
8
8
|
multiAgentHost: MultiAgentHost;
|
|
9
9
|
getDirector: () => Director | null;
|
|
10
10
|
events: EventBus;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
interface SetupCliHeapWatchdogOptions {
|
|
2
2
|
flags: Record<string, unknown>;
|
|
3
3
|
tuiOwnsScreen: boolean;
|
|
4
4
|
context: {
|
|
@@ -50,4 +50,5 @@ export interface SetupCliHeapWatchdogOptions {
|
|
|
50
50
|
teardownHandlers: Array<() => void>;
|
|
51
51
|
}
|
|
52
52
|
export declare function setupCliHeapWatchdog({ flags, tuiOwnsScreen, context, metricsSink, hqPublisherRef, brainMailbox, teardownHandlers, }: SetupCliHeapWatchdogOptions): void;
|
|
53
|
+
export {};
|
|
53
54
|
//# sourceMappingURL=heap-watchdog-setup.d.ts.map
|
|
@@ -14,7 +14,7 @@ export interface HqPublisherRef {
|
|
|
14
14
|
current: HqPublisher | undefined;
|
|
15
15
|
getKanbanSyncStats?: (() => KanbanHqSyncStats | undefined) | undefined;
|
|
16
16
|
}
|
|
17
|
-
|
|
17
|
+
interface SetupHqTelemetryDeps {
|
|
18
18
|
events: EventBus;
|
|
19
19
|
session: SessionWriter;
|
|
20
20
|
config: Config;
|
|
@@ -30,7 +30,7 @@ export interface SetupHqTelemetryDeps {
|
|
|
30
30
|
hqPublisherRef: HqPublisherRef;
|
|
31
31
|
mcpRegistry: Pick<MCPRegistry, 'onOperation' | 'operationalHealth'>;
|
|
32
32
|
}
|
|
33
|
-
|
|
33
|
+
interface HqTelemetryResult {
|
|
34
34
|
hqCommandController: HqCommandController;
|
|
35
35
|
hqOnCommand: ReturnType<typeof createHqCommandDispatcher>;
|
|
36
36
|
}
|
|
@@ -45,4 +45,5 @@ export interface HqTelemetryResult {
|
|
|
45
45
|
* Teardown handlers are pushed into `deps.teardownHandlers` internally.
|
|
46
46
|
*/
|
|
47
47
|
export declare function setupHqTelemetry(deps: SetupHqTelemetryDeps): HqTelemetryResult;
|
|
48
|
+
export {};
|
|
48
49
|
//# sourceMappingURL=hq-telemetry.d.ts.map
|
|
@@ -10,7 +10,7 @@ import type { MaxContextBranch } from '../context-limit.js';
|
|
|
10
10
|
import type { HqPublisherRef } from './hq-telemetry.js';
|
|
11
11
|
import { setupCompaction } from './pipeline.js';
|
|
12
12
|
type AnyRecord = Record<string, any>;
|
|
13
|
-
|
|
13
|
+
interface LifecyclePluginsDeps {
|
|
14
14
|
flags: Record<string, string | boolean>;
|
|
15
15
|
config: Config;
|
|
16
16
|
container: any;
|
|
@@ -38,7 +38,7 @@ export interface LifecyclePluginsDeps {
|
|
|
38
38
|
renderer: any;
|
|
39
39
|
buildProviderForIdRuntime: any;
|
|
40
40
|
}
|
|
41
|
-
|
|
41
|
+
interface LifecyclePluginsResult {
|
|
42
42
|
hookRegistry: HookRegistry;
|
|
43
43
|
hookRunner: HookRunner;
|
|
44
44
|
autoCompactor: any;
|
|
@@ -5,11 +5,39 @@ type ConfigStoreLike = {
|
|
|
5
5
|
get(): Config;
|
|
6
6
|
update(patch: Partial<Config>): void;
|
|
7
7
|
};
|
|
8
|
-
|
|
8
|
+
/** Minimal shape of the models.dev registry this wiring needs. */
|
|
9
|
+
type ModelsRegistryLike = {
|
|
10
|
+
getModel(providerId: string, modelId: string): Promise<{
|
|
11
|
+
capabilities?: {
|
|
12
|
+
maxContext?: number | undefined;
|
|
13
|
+
} | undefined;
|
|
14
|
+
cost?: {
|
|
15
|
+
input?: number | undefined;
|
|
16
|
+
output?: number | undefined;
|
|
17
|
+
cache_read?: number | undefined;
|
|
18
|
+
cache_write?: number | undefined;
|
|
19
|
+
} | undefined;
|
|
20
|
+
} | undefined>;
|
|
21
|
+
};
|
|
22
|
+
/** Minimal event-bus shape: enough to observe context size and turn boundaries. */
|
|
23
|
+
type EventsLike = {
|
|
24
|
+
on(event: string, handler: (...args: unknown[]) => void): unknown;
|
|
25
|
+
};
|
|
26
|
+
interface RegisterCliManagementToolsDeps {
|
|
9
27
|
toolRegistry: ToolRegistry;
|
|
10
28
|
configStore: ConfigStoreLike;
|
|
11
29
|
profileConfigPath: string;
|
|
12
30
|
stdinInteractive: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Session event bus. Used only to feed `leader_tier_set`'s guard rails: the
|
|
33
|
+
* live context size (`ctx.pct`) and the turn counter behind the dwell window
|
|
34
|
+
* (`iteration.started` with `index === 0` marks a new turn). Without these the
|
|
35
|
+
* economic and context-window guards have nothing to measure and the tool
|
|
36
|
+
* falls back to its structural checks alone.
|
|
37
|
+
*/
|
|
38
|
+
events?: EventsLike | undefined;
|
|
39
|
+
/** models.dev registry, for the per-model prices behind the break-even test. */
|
|
40
|
+
modelsRegistry?: ModelsRegistryLike | undefined;
|
|
13
41
|
/**
|
|
14
42
|
* Late-bound PreToolUse pipeline for plugin_manager's nested `use` path.
|
|
15
43
|
* The hook runner is created by `setupLifecycleAndPlugins` AFTER the
|
|
@@ -25,6 +53,6 @@ export interface RegisterCliManagementToolsDeps {
|
|
|
25
53
|
*/
|
|
26
54
|
getSwitchProviderAndModel?: (() => ((providerId: string, modelId: string) => Promise<string | null>) | null) | undefined;
|
|
27
55
|
}
|
|
28
|
-
export declare function registerCliManagementTools({ toolRegistry, configStore, profileConfigPath, stdinInteractive, getHookRunner, getSwitchProviderAndModel, }: RegisterCliManagementToolsDeps): void;
|
|
56
|
+
export declare function registerCliManagementTools({ toolRegistry, configStore, profileConfigPath, stdinInteractive, events, modelsRegistry, getHookRunner, getSwitchProviderAndModel, }: RegisterCliManagementToolsDeps): void;
|
|
29
57
|
export {};
|
|
30
58
|
//# sourceMappingURL=management-tools.d.ts.map
|
package/dist/wiring/metrics.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { type MetricsServerHandle } from '@wrongstack/core/observability';
|
|
|
3
3
|
import type { HealthRegistry, MetricsRuntimeStatus, MetricsSink } from '@wrongstack/core/types';
|
|
4
4
|
import { type WstackPaths } from '@wrongstack/core/utils';
|
|
5
5
|
import type { MCPRegistry, MCPServerOperationalHealth } from '@wrongstack/mcp';
|
|
6
|
-
|
|
6
|
+
interface MetricsWiringDeps {
|
|
7
7
|
flags: Record<string, unknown>;
|
|
8
8
|
wpaths: WstackPaths;
|
|
9
9
|
events: EventBus;
|
|
@@ -16,7 +16,7 @@ export interface MetricsWiringDeps {
|
|
|
16
16
|
model: string;
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
interface MetricsWiringResult {
|
|
20
20
|
metricsSink: MetricsSink | undefined;
|
|
21
21
|
healthRegistry: HealthRegistry | undefined;
|
|
22
22
|
metricsServerHandle: MetricsServerHandle | undefined;
|
package/dist/wiring/plugins.d.ts
CHANGED
|
@@ -6,7 +6,6 @@ import type { ProviderRegistry, SlashCommandRegistry, ToolRegistry } from '@wron
|
|
|
6
6
|
import type { Config, ConfigStore, HealthRegistry, Logger, MetricsRuntimeStatus, MetricsSinkView, ModelsRegistry, Plugin, PromptLoader, SessionWriter, SkillLoader } from '@wrongstack/core/types';
|
|
7
7
|
import type { MCPRegistry } from '@wrongstack/mcp';
|
|
8
8
|
export declare const DEPRECATED_PLUGIN_NAMES: Record<string, string>;
|
|
9
|
-
export declare const BUILTIN_PLUGIN_CONFIG_NAMES: Set<string>;
|
|
10
9
|
/** Test helper: reset the dedupe set between test cases. */
|
|
11
10
|
export declare function _resetDeprecatedWarningsForTests(): void;
|
|
12
11
|
/**
|
|
@@ -37,7 +37,7 @@ export declare function createPromptJournalRecorder(): PromptJournalRecorder;
|
|
|
37
37
|
* Best-effort by design, same as the userInput recorder: writes are
|
|
38
38
|
* fire-and-forget and failures are swallowed.
|
|
39
39
|
*/
|
|
40
|
-
|
|
40
|
+
interface PromptJournalToolCallRecorder {
|
|
41
41
|
name: string;
|
|
42
42
|
handler: (payload: ToolCallPipelinePayload, next: (v: ToolCallPipelinePayload) => Promise<ToolCallPipelinePayload>) => Promise<ToolCallPipelinePayload>;
|
|
43
43
|
}
|
|
@@ -30,17 +30,24 @@ export interface ProviderRuntimeDeps {
|
|
|
30
30
|
teardownHandlers: (() => void)[];
|
|
31
31
|
context: AnyObj;
|
|
32
32
|
events: EventBus;
|
|
33
|
-
resolveProviderCfgRuntime: (config: Config, providerId: string
|
|
33
|
+
resolveProviderCfgRuntime: (config: Config, providerId: string, opts?: {
|
|
34
|
+
logger?: {
|
|
35
|
+
info(message: string): void;
|
|
36
|
+
} | undefined;
|
|
37
|
+
}) => {
|
|
34
38
|
cfg: ProviderConfig;
|
|
35
39
|
};
|
|
36
40
|
buildProviderForIdRuntime: (opts: {
|
|
37
41
|
config: Config;
|
|
38
42
|
providerRegistry: ProviderRegistry;
|
|
43
|
+
logger?: {
|
|
44
|
+
info(message: string): void;
|
|
45
|
+
} | undefined;
|
|
39
46
|
}, providerId: string) => Provider;
|
|
40
47
|
/** Shared provider/model status tracker. */
|
|
41
48
|
statusTracker: ProviderModelStatusTracker;
|
|
42
49
|
}
|
|
43
|
-
|
|
50
|
+
interface ProviderRuntimeResult {
|
|
44
51
|
resolveProviderCfg: (providerId: string) => {
|
|
45
52
|
cfg: ProviderConfig;
|
|
46
53
|
};
|
|
@@ -25,7 +25,7 @@ import type { Config, Provider, ProviderConfig } from '@wrongstack/core/types';
|
|
|
25
25
|
*
|
|
26
26
|
* We pass `providerId` (the user-visible id) to both, and let them resolve.
|
|
27
27
|
*/
|
|
28
|
-
|
|
28
|
+
interface ResolvedProviderCfg {
|
|
29
29
|
/**
|
|
30
30
|
* `cfg` passed to either `providerRegistry.create(cfg)` or
|
|
31
31
|
* `makeProviderFromConfig(id, cfg)`. `cfg.type === providerId` so the
|
|
@@ -41,7 +41,18 @@ export interface ResolvedProviderCfg {
|
|
|
41
41
|
*/
|
|
42
42
|
factoryType: string;
|
|
43
43
|
}
|
|
44
|
-
export declare function resolveProviderCfg(config: Pick<Config, 'providers' | 'apiKey' | 'baseUrl'>, providerId: string
|
|
44
|
+
export declare function resolveProviderCfg(config: Pick<Config, 'providers' | 'apiKey' | 'baseUrl'>, providerId: string, opts?: {
|
|
45
|
+
/**
|
|
46
|
+
* Log the rewrite decision for this provider build. Structural
|
|
47
|
+
* (info only) so hosts can pass core's Logger, a child logger, or a
|
|
48
|
+
* test stub. Applied rewrites log at info (routing provenance); skips
|
|
49
|
+
* log at debug-level verbosity via the same `info` channel to keep
|
|
50
|
+
* the interface minimal — wrongstack.log is the primary consumer.
|
|
51
|
+
*/
|
|
52
|
+
logger?: {
|
|
53
|
+
info(message: string): void;
|
|
54
|
+
} | undefined;
|
|
55
|
+
}): ResolvedProviderCfg;
|
|
45
56
|
/**
|
|
46
57
|
* Shared proxy-aware provider-config resolver.
|
|
47
58
|
*
|
|
@@ -66,7 +77,11 @@ export declare function resolveProviderCfg(config: Pick<Config, 'providers' | 'a
|
|
|
66
77
|
* Inputs are intentionally `Pick<Config, ...>` (not the full Config) so
|
|
67
78
|
* this helper stays free of disk I/O and can be called from any layer.
|
|
68
79
|
*/
|
|
69
|
-
export declare function resolveProviderCfgWithProxy(config: Pick<Config, 'providers' | 'apiKey' | 'baseUrl'>, providerId: string
|
|
80
|
+
export declare function resolveProviderCfgWithProxy(config: Pick<Config, 'providers' | 'apiKey' | 'baseUrl'>, providerId: string, opts?: {
|
|
81
|
+
logger?: {
|
|
82
|
+
info(message: string): void;
|
|
83
|
+
} | undefined;
|
|
84
|
+
}): ResolvedProviderCfg;
|
|
70
85
|
/**
|
|
71
86
|
* Construct a credential-resolved Provider for a provider id, WITHOUT
|
|
72
87
|
* persisting anything. Shared by the `/model` switch and the fallback
|
|
@@ -78,5 +93,10 @@ export declare function resolveProviderCfgWithProxy(config: Pick<Config, 'provid
|
|
|
78
93
|
export declare function buildProviderForId(args: {
|
|
79
94
|
config: Pick<Config, 'providers' | 'apiKey' | 'baseUrl' | 'features'>;
|
|
80
95
|
providerRegistry: ProviderRegistry;
|
|
96
|
+
/** Optional rewrite-decision logger (see resolveProviderCfg). */
|
|
97
|
+
logger?: {
|
|
98
|
+
info(message: string): void;
|
|
99
|
+
} | undefined;
|
|
81
100
|
}, providerId: string): Provider;
|
|
101
|
+
export {};
|
|
82
102
|
//# sourceMappingURL=provider-runtime.d.ts.map
|