@wrongstack/cli 1.1.4 → 1.1.5
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-MZ5MQBFN.js → acp-NKUEYJDZ.js} +6 -5
- package/dist/acp-leader/acp-leader-confirm.d.ts +2 -0
- package/dist/acp-leader/acp-leader-host-binding.d.ts +1 -0
- package/dist/acp-leader/acp-leader-host.d.ts +2 -0
- package/dist/acp-leader/acp-leader-picker.d.ts +6 -3
- package/dist/acp-leader/acp-leader-stream.d.ts +1 -0
- package/dist/{auth-IHQS6AFW.js → auth-2ZG5DBHS.js} +4 -4
- package/dist/boot/launch-menu-arrow.d.ts +20 -0
- package/dist/boot/launch-menu-types.d.ts +36 -0
- package/dist/boot/launch-menu.d.ts +1 -57
- package/dist/boot/tui-session-resume-rollback.d.ts +31 -0
- package/dist/{boot-auto-thin-7D4OVEWA.js → boot-auto-thin-N2CIGTXE.js} +3 -3
- package/dist/{chunk-TZPKOS5G.js → chunk-2XQ6SRKG.js} +2 -2
- package/dist/{chunk-JKTJSLUT.js → chunk-5SGMUDP5.js} +242 -18
- package/dist/{chunk-3EXRPTAU.js → chunk-5TQ65PXQ.js} +17 -17
- package/dist/{chunk-2LTHDKZX.js → chunk-7BM4LGKQ.js} +18 -18
- package/dist/{chunk-VAQXOZKP.js → chunk-AJM4EFCM.js} +139 -136
- package/dist/{chunk-C2BBH4S4.js → chunk-E3MJFAFR.js} +2 -2
- package/dist/{chunk-AWRZWPJ3.js → chunk-JFYQGMMM.js} +99 -75
- package/dist/{chunk-BIGSVBPI.js → chunk-KNYIEQAY.js} +64 -61
- package/dist/{chunk-GKGWPFW2.js → chunk-LUEO5HLZ.js} +1 -1
- package/dist/chunk-LYWOV4OX.js +252 -0
- package/dist/{chunk-COGI7EQU.js → chunk-M7FNHCE3.js} +621 -9
- package/dist/{chunk-75OLD563.js → chunk-M7PSENGF.js} +3 -1
- package/dist/{chunk-TAE3EGBM.js → chunk-MEBXWI7U.js} +5 -5
- package/dist/{chunk-I5LJLKA3.js → chunk-MKMM5RIW.js} +12 -5
- package/dist/{chunk-ZF4HRR5F.js → chunk-P7MEEUGT.js} +275 -250
- package/dist/chunk-QLYPIJ7X.js +258 -0
- package/dist/chunk-RN5CFAVQ.js +292 -0
- package/dist/{chunk-WDXNBYGD.js → chunk-TDP7CZGE.js} +6 -1
- package/dist/{chunk-6VPWQ4TG.js → chunk-UROB7MK5.js} +2 -1
- package/dist/chunk-VEESMPTX.js +254 -0
- package/dist/{chunk-IJLIAPCW.js → chunk-VPSAKGLK.js} +47 -47
- package/dist/{cli-context-E44HQ4ZO.js → cli-context-CQYGIWOU.js} +247 -236
- package/dist/{cli-main-OT63I2FX.js → cli-main-VRUJNUBX.js} +1743 -1491
- package/dist/cli-main-boot.d.ts +1 -1
- package/dist/config-doctor-known-keys.d.ts +33 -0
- package/dist/config-doctor.d.ts +2 -47
- package/dist/config-history-support.d.ts +36 -0
- package/dist/config-history.d.ts +1 -1
- package/dist/{config-transfer-Y7XJMJRN.js → config-transfer-B4GOZTFC.js} +2 -2
- package/dist/{execution-OK34CJKJ.js → execution-IV72RUSM.js} +5883 -5792
- package/dist/execution-tui.d.ts +30 -0
- package/dist/fleet/acp-wrongstack-bridge.d.ts +11 -3
- package/dist/fleet/host-acp.d.ts +3 -0
- package/dist/fleet/wrongforge-client.d.ts +116 -0
- package/dist/fleet/wrongforge-gateway.d.ts +20 -0
- package/dist/fleet/wrongforge-info.d.ts +32 -0
- package/dist/fleet/wrongforge-quota.d.ts +10 -0
- package/dist/fleet/wrongforge-runner.d.ts +37 -0
- package/dist/fleet/wrongforge-runtime.d.ts +10 -0
- package/dist/{hq-JD5AZVMG.js → hq-54PQYR5O.js} +311 -307
- package/dist/hq-server/sweeps.d.ts +28 -0
- package/dist/{hq-server-BI23EPM7.js → hq-server-YK7FBLL6.js} +3 -3
- package/dist/index.js +5 -5
- package/dist/mcp-22CFBX4H.js +236 -0
- package/dist/mcp-serve.d.ts +0 -63
- package/dist/{modeldiag-HDIKG37X.js → modeldiag-5PBB777J.js} +4 -4
- package/dist/{per-subcommand-help-4GYSCMLU.js → per-subcommand-help-MQGERD4E.js} +2 -2
- package/dist/plugin-llm-command.d.ts +9 -0
- package/dist/{plugin-usage-TYF5HY4K.js → plugin-usage-UWKYMNQU.js} +3 -3
- package/dist/{plugins-XGAXDLPT.js → plugins-VP7JQH47.js} +4 -4
- package/dist/{sdd-runtime-6MFUXWJK.js → sdd-runtime-HIJ4Z5TF.js} +2 -2
- package/dist/services/sdd/state.d.ts +2 -0
- package/dist/session-event-wiring-types.d.ts +62 -0
- package/dist/session-event-wiring.d.ts +2 -52
- package/dist/{sessions-config-SJVQXCIE.js → sessions-config-7MK742OW.js} +2 -2
- package/dist/short-circuit-flags-AGHURHMQ.js +11 -0
- package/dist/slash-commands/command-context-fleet.d.ts +187 -0
- package/dist/slash-commands/command-context-sdd-goal.d.ts +102 -0
- package/dist/slash-commands/command-context.d.ts +3 -282
- package/dist/slash-commands/project-switch-interactive.d.ts +11 -0
- package/dist/slash-commands/setmodel-helpers.d.ts +36 -0
- package/dist/subcommands/handlers/hq-token.d.ts +3 -0
- package/dist/subcommands/handlers/hq.d.ts +0 -21
- package/dist/subcommands/handlers/per-subcommand-help-operations.d.ts +8 -0
- package/dist/subcommands/handlers/tools-cli-args.d.ts +57 -0
- package/dist/subcommands/handlers/tools-cli.d.ts +5 -0
- package/dist/subcommands/handlers/tools-serve.d.ts +4 -0
- package/dist/{subcommands-YADUV7IJ.js → subcommands-OCJNO57E.js} +2 -2
- package/dist/tool-gateway-http.d.ts +30 -0
- package/dist/tool-gateway.d.ts +185 -0
- package/dist/tools-cli-44MLIUQO.js +509 -0
- package/dist/tools-serve-TRCET2M7.js +102 -0
- package/dist/{tools-skills-55QVTMSK.js → tools-skills-WDTMCE46.js} +7 -2
- package/dist/tuneup-runtime-checks.d.ts +7 -0
- package/dist/tuneup-types.d.ts +118 -0
- package/dist/tuneup.d.ts +3 -122
- package/dist/{typesafe-YBEADNAH.js → typesafe-QLSMFU7J.js} +1 -1
- package/dist/{version-help-RBZC5GZZ.js → version-help-X6CC4CFY.js} +2 -2
- package/dist/{webui-server-CB64CFDG.js → webui-server-V2R5WQUK.js} +44 -6
- package/dist/wiring/provider-runtime-setup.d.ts +3 -1
- package/dist/wiring/session-runtime.d.ts +1 -1
- package/dist/wrongforge-gateway-UOFBK56J.js +92 -0
- package/dist/wrongforge-leader/wrongforge-leader-gateway.d.ts +9 -0
- package/dist/wrongforge-leader/wrongforge-leader-picker.d.ts +12 -0
- package/dist/wrongforge-leader/wrongforge-leader-provider.d.ts +49 -0
- package/package.json +1 -1
- package/dist/mcp-W7A5HUXV.js +0 -560
- package/dist/short-circuit-flags-QEXUS3BY.js +0 -11
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
/** Fleet and subagent hooks: spawn, monitor, budget, kill, retry and logs. */
|
|
2
|
+
export interface SlashFleetCommandContext {
|
|
3
|
+
/** Agent Monitor Service — tracks subagent conversations and streams to HQ. */
|
|
4
|
+
agentMonitor?: import('@wrongstack/core/coordination').AgentMonitorService | undefined;
|
|
5
|
+
/**
|
|
6
|
+
* Generate a commit message by calling the LLM with the git diff.
|
|
7
|
+
* Receives the raw diff, returns a commit message string.
|
|
8
|
+
* When omitted /commit falls back to heuristics-only messages.
|
|
9
|
+
*/
|
|
10
|
+
generateCommitMessage?: ((diff: string) => Promise<string>) | undefined;
|
|
11
|
+
/** Fire-and-forget spawn — returns immediately with spawn metadata. Used by /spawn. */
|
|
12
|
+
onSpawn?: (description: string, opts?: {
|
|
13
|
+
provider?: string | undefined;
|
|
14
|
+
model?: string | undefined;
|
|
15
|
+
fallbackModels?: string[] | undefined;
|
|
16
|
+
tools?: string[] | undefined;
|
|
17
|
+
name?: string | undefined;
|
|
18
|
+
/** Explicit capability allowlist for the subagent's auto-approve policy.
|
|
19
|
+
* When omitted the host applies the WIDE working default (read/write/
|
|
20
|
+
* net/shell/install) — or, for a scoped tools slice, that plus the
|
|
21
|
+
* tools' own capabilities. Pass this to narrow (e.g. read-only) or to
|
|
22
|
+
* grant an escape-hatch cap (fs.write.outside-project, config.mutate). */
|
|
23
|
+
allowedCapabilities?: readonly string[] | undefined;
|
|
24
|
+
/** Legacy Shadow Agent interval in ms. Only used when name === 'shadow'. */
|
|
25
|
+
shadowIntervalMs?: number | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Free-form task context propagated into the spawned `TaskSpec.context`.
|
|
28
|
+
* Used by `/kanban task dispatch` to carry `{ kanban: { boardId, taskId } }`
|
|
29
|
+
* so the tool-runtime boundary gate (`evaluateToolKanbanBoundary`) can
|
|
30
|
+
* resolve the live policy instead of failing open.
|
|
31
|
+
*/
|
|
32
|
+
context?: {
|
|
33
|
+
kanban?: {
|
|
34
|
+
boardId?: string;
|
|
35
|
+
taskId?: string;
|
|
36
|
+
projectRoot?: string;
|
|
37
|
+
};
|
|
38
|
+
} | undefined;
|
|
39
|
+
}) => Promise<string>;
|
|
40
|
+
/**
|
|
41
|
+
* Blocking spawn — waits for the subagent to complete and returns the full
|
|
42
|
+
* result. Used by /techstack and any other command that needs the subagent's
|
|
43
|
+
* actual output inline.
|
|
44
|
+
*/
|
|
45
|
+
onSpawnAndWait?: (description: string, opts?: {
|
|
46
|
+
provider?: string | undefined;
|
|
47
|
+
model?: string | undefined;
|
|
48
|
+
fallbackModels?: string[] | undefined;
|
|
49
|
+
tools?: string[] | undefined;
|
|
50
|
+
name?: string | undefined;
|
|
51
|
+
/** Explicit capability allowlist for the subagent's auto-approve policy.
|
|
52
|
+
* When omitted the host applies the WIDE working default (read/write/
|
|
53
|
+
* net/shell/install) — or, for a scoped tools slice, that plus the
|
|
54
|
+
* tools' own capabilities. Pass this to narrow (e.g. read-only) or to
|
|
55
|
+
* grant an escape-hatch cap (fs.write.outside-project, config.mutate). */
|
|
56
|
+
allowedCapabilities?: readonly string[] | undefined;
|
|
57
|
+
/** Legacy Shadow Agent interval in ms. Only used when name === 'shadow'. */
|
|
58
|
+
shadowIntervalMs?: number | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* Free-form task context propagated into the spawned `TaskSpec.context`.
|
|
61
|
+
* Used by `/kanban task dispatch` to carry `{ kanban: { boardId, taskId } }`
|
|
62
|
+
* so the tool-runtime boundary gate (`evaluateToolKanbanBoundary`) can
|
|
63
|
+
* resolve the live policy instead of failing open.
|
|
64
|
+
*/
|
|
65
|
+
context?: {
|
|
66
|
+
kanban?: {
|
|
67
|
+
boardId?: string;
|
|
68
|
+
taskId?: string;
|
|
69
|
+
projectRoot?: string;
|
|
70
|
+
};
|
|
71
|
+
} | undefined;
|
|
72
|
+
}) => Promise<string>;
|
|
73
|
+
onAgents?: ((subagentId?: string) => string) | undefined;
|
|
74
|
+
onFleet?: (action: 'status' | 'usage' | 'kill' | 'manifest' | 'concurrency' | 'retry' | 'log', target?: string | undefined) => Promise<string>;
|
|
75
|
+
/**
|
|
76
|
+
* Get live coordinator status for /fleet. Returns null when no fleet is active.
|
|
77
|
+
*/
|
|
78
|
+
onFleetStatus?: (() => import('@wrongstack/core/types').CoordinatorStatus | null) | undefined;
|
|
79
|
+
/**
|
|
80
|
+
* Read-only concurrency + lifetime spawn budget for `/fleet status`.
|
|
81
|
+
* Returns null when no fleet host is available.
|
|
82
|
+
*/
|
|
83
|
+
onFleetBudget?: (() => {
|
|
84
|
+
maxConcurrent: number;
|
|
85
|
+
activeAgents: number;
|
|
86
|
+
maxSpawns: number;
|
|
87
|
+
usedSpawns: number;
|
|
88
|
+
remainingSpawns: number;
|
|
89
|
+
maxTokens?: number | undefined;
|
|
90
|
+
usedTokens?: number | undefined;
|
|
91
|
+
remainingTokens?: number | undefined;
|
|
92
|
+
maxCostUsd?: number | undefined;
|
|
93
|
+
usedCostUsd?: number | undefined;
|
|
94
|
+
remainingCostUsd?: number | undefined;
|
|
95
|
+
checkpointMaxSpawns?: number | undefined;
|
|
96
|
+
ceilingMismatch?: boolean | undefined;
|
|
97
|
+
} | null) | undefined;
|
|
98
|
+
/**
|
|
99
|
+
* Get fleet usage summary for /fleet usage.
|
|
100
|
+
*/
|
|
101
|
+
onFleetUsage?: (() => import('@wrongstack/core/coordination').FleetUsage | null) | undefined;
|
|
102
|
+
/**
|
|
103
|
+
* Kill all running subagents. Returns count of killed subagents.
|
|
104
|
+
*/
|
|
105
|
+
onFleetKill?: (() => number | Promise<number>) | undefined;
|
|
106
|
+
/**
|
|
107
|
+
* Abort the in-flight leader run. Installed by the surface (REPL/TUI) on
|
|
108
|
+
* startup so `/interrupt` can stop the current iteration — slash commands
|
|
109
|
+
* don't get the RunController directly. The default no-op returns false;
|
|
110
|
+
* a real handler returns true when it actually aborted a run.
|
|
111
|
+
*/
|
|
112
|
+
interruptController?: {
|
|
113
|
+
abortLeader: () => boolean;
|
|
114
|
+
/**
|
|
115
|
+
* Report whether an operation (leader run, autonomy loop, or SDD run)
|
|
116
|
+
* is currently in flight. Used by `/clear` to confirm before wiping a
|
|
117
|
+
* session that still has active work. Absent → treated as idle.
|
|
118
|
+
*/
|
|
119
|
+
isRunning?: (() => boolean) | undefined;
|
|
120
|
+
/**
|
|
121
|
+
* Ask the owning interactive surface to confirm a destructive clear.
|
|
122
|
+
* The TUI installs a panel-backed implementation; plain terminals
|
|
123
|
+
* fall back to the generic `confirm` callback below.
|
|
124
|
+
*/
|
|
125
|
+
confirmClear?: ((info: {
|
|
126
|
+
leaderActive: boolean;
|
|
127
|
+
subagentCount: number;
|
|
128
|
+
}) => Promise<boolean>) | undefined;
|
|
129
|
+
/** Render a generic slash-command confirmation in the owning surface. */
|
|
130
|
+
confirmSlash?: ((question: string, defaultYes: boolean) => Promise<boolean | null>) | undefined;
|
|
131
|
+
/** Drop buffered output that belongs to the session being cleared. */
|
|
132
|
+
resetSession?: (() => void) | undefined;
|
|
133
|
+
/** Wait until the aborted leader turn can no longer mutate context. */
|
|
134
|
+
waitForIdle?: (() => Promise<void>) | undefined;
|
|
135
|
+
} | undefined;
|
|
136
|
+
/**
|
|
137
|
+
* Terminate a specific subagent by id. Returns true if terminated.
|
|
138
|
+
*/
|
|
139
|
+
onFleetTerminate?: ((subagentId: string) => boolean | Promise<boolean>) | undefined;
|
|
140
|
+
/**
|
|
141
|
+
* Spawn a subagent of a given role. Returns the new subagent id.
|
|
142
|
+
*/
|
|
143
|
+
onFleetSpawn?: ((role: string) => Promise<string>) | undefined;
|
|
144
|
+
/**
|
|
145
|
+
* Optional LLM classifier for `/fleet dispatch`. When wired, the smart
|
|
146
|
+
* dispatcher uses it to resolve ambiguous routing decisions; without it the
|
|
147
|
+
* dispatcher is heuristic-only. Built from the session provider in the host.
|
|
148
|
+
*/
|
|
149
|
+
onDispatchClassify?: import('@wrongstack/core/coordination').DispatchClassifier | undefined;
|
|
150
|
+
/**
|
|
151
|
+
* Toggle subagent activity streaming into the leader's history. The
|
|
152
|
+
* TUI installs the actual setter on mount via a shared controller;
|
|
153
|
+
* before that, calls are buffered into the initial-value field so
|
|
154
|
+
* `/fleet stream off` issued before mount still takes effect.
|
|
155
|
+
*/
|
|
156
|
+
fleetStreamController?: {
|
|
157
|
+
/** Fleet-chat verbosity (off | compact | full). */
|
|
158
|
+
mode: import('@wrongstack/core/types').FleetChatVerbosity;
|
|
159
|
+
/** Replaced by the TUI on mount with a dispatch-backed setter. */
|
|
160
|
+
setMode: (mode: import('@wrongstack/core/types').FleetChatVerbosity) => void;
|
|
161
|
+
} | undefined;
|
|
162
|
+
/**
|
|
163
|
+
* Toggle prompt refinement ("did you mean this?"). The TUI installs the
|
|
164
|
+
* actual dispatch-backed setter on mount via this shared controller; before
|
|
165
|
+
* that, `enabled` just mirrors the requested value so a pre-mount toggle
|
|
166
|
+
* still takes effect. Backed by `config.autonomy.enhance`.
|
|
167
|
+
*/
|
|
168
|
+
enhanceController?: {
|
|
169
|
+
enabled: boolean;
|
|
170
|
+
setEnabled: (enabled: boolean) => void;
|
|
171
|
+
};
|
|
172
|
+
/**
|
|
173
|
+
* Re-run interrupted tasks from a prior director-state.json. Pass `undefined`
|
|
174
|
+
* to list them, a specific task id to retry one, or 'all' to retry every
|
|
175
|
+
* interrupted task. Returns a human-readable summary. Only wired when
|
|
176
|
+
* director mode is enabled.
|
|
177
|
+
*/
|
|
178
|
+
onFleetRetry?: ((taskId?: string) => Promise<string>) | undefined;
|
|
179
|
+
/**
|
|
180
|
+
* Inspect per-subagent JSONL transcripts under `<fleetRoot>/subagents/`.
|
|
181
|
+
* Pass `undefined` to list available transcripts, a subagent id to show
|
|
182
|
+
* a compact event summary, or a subagent id with `mode='raw'` to dump
|
|
183
|
+
* the full JSONL. Only wired when a fleet root exists for this session.
|
|
184
|
+
*/
|
|
185
|
+
onFleetLog?: (subagentId: string | undefined, mode: 'summary' | 'raw') => Promise<string>;
|
|
186
|
+
}
|
|
187
|
+
//# sourceMappingURL=command-context-fleet.d.ts.map
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/** SDD run and goal-runner hooks. */
|
|
2
|
+
export interface SlashSddGoalCommandContext {
|
|
3
|
+
/**
|
|
4
|
+
* Start an SDD parallel fan-out run. Requires an active SDD session with
|
|
5
|
+
* an approved spec and generated task graph.
|
|
6
|
+
*/
|
|
7
|
+
onSddParallelRun?: (opts?: {
|
|
8
|
+
parallelSlots?: number | undefined;
|
|
9
|
+
}) => Promise<string>;
|
|
10
|
+
/** Stop the currently running SDD parallel fan-out. */
|
|
11
|
+
onSddParallelStop?: (() => void) | undefined;
|
|
12
|
+
/** Requeue every failed task in the active SDD run to pending. Returns the count requeued. */
|
|
13
|
+
onSddRetryAllFailed?: (() => number) | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* Split a task in the active SDD run into sub-tasks (refused while it runs).
|
|
16
|
+
* Returns the new leaf ids, or null when there is no active run / unknown task.
|
|
17
|
+
*/
|
|
18
|
+
onSddSplitTask?: ((taskId: string, subtasks: Array<{
|
|
19
|
+
title: string;
|
|
20
|
+
description: string;
|
|
21
|
+
}>) => string[] | null) | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Remove the git worktrees + branches an SDD run created. Uses the live run
|
|
24
|
+
* when one is active (after a stop), else sweeps the project's leftovers from
|
|
25
|
+
* disk. Returns the number of worktrees removed.
|
|
26
|
+
*/
|
|
27
|
+
onSddCleanWorktrees?: (() => Promise<number>) | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Roll back an SDD run's merged commits by reverting each on the base branch
|
|
30
|
+
* (history-preserving). Refuses while a run is still live. Returns the outcome.
|
|
31
|
+
*/
|
|
32
|
+
onSddRollback?: (() => Promise<{
|
|
33
|
+
ok: boolean;
|
|
34
|
+
reverted: number;
|
|
35
|
+
reason?: string;
|
|
36
|
+
}>) | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Destroy the SDD project: stop any active run, clean worktrees, and delete the
|
|
39
|
+
* on-disk artifacts (specs, task-graphs, session, boards). Pass
|
|
40
|
+
* `{ revertMerged: true }` (`/sdd destroy --revert`) to also revert merged
|
|
41
|
+
* commits before wiping; otherwise they are left on the base branch.
|
|
42
|
+
*/
|
|
43
|
+
onSddDestroy?: ((opts?: {
|
|
44
|
+
revertMerged?: boolean;
|
|
45
|
+
}) => Promise<{
|
|
46
|
+
worktreesRemoved: number;
|
|
47
|
+
deleted: string[];
|
|
48
|
+
reverted: number;
|
|
49
|
+
revertOk?: boolean | undefined;
|
|
50
|
+
revertReason?: string | undefined;
|
|
51
|
+
}>) | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* Start a real, LLM-driven Goal run from a free-text goal. The host
|
|
54
|
+
* plans phases (each holding many todos), persists the phase-graph as
|
|
55
|
+
* per-project JSON, and drives the orchestrator — one subagent per task —
|
|
56
|
+
* in the background. Returns the built graph or an error.
|
|
57
|
+
*/
|
|
58
|
+
onGoalStart?: (opts: {
|
|
59
|
+
goal: string;
|
|
60
|
+
projectContext?: string | undefined;
|
|
61
|
+
}) => Promise<{
|
|
62
|
+
ok: true;
|
|
63
|
+
graph: import('@wrongstack/core/goal').PhaseGraph;
|
|
64
|
+
} | {
|
|
65
|
+
ok: false;
|
|
66
|
+
error: string;
|
|
67
|
+
}>;
|
|
68
|
+
onGoalPause?: (() => void) | undefined;
|
|
69
|
+
onGoalResume?: (() => void) | undefined;
|
|
70
|
+
onGoalStop?: (() => void) | undefined;
|
|
71
|
+
/**
|
|
72
|
+
* Resume a persisted PhaseGraph. The host creates a new orchestrator for
|
|
73
|
+
* the loaded graph and starts executing pending tasks.
|
|
74
|
+
*/
|
|
75
|
+
onGoalResumeFromGraph?: ((graph: import('@wrongstack/core/goal').PhaseGraph) => Promise<{
|
|
76
|
+
ok: true;
|
|
77
|
+
graph: import('@wrongstack/core/goal').PhaseGraph;
|
|
78
|
+
} | {
|
|
79
|
+
ok: false;
|
|
80
|
+
error: string;
|
|
81
|
+
}>) | undefined;
|
|
82
|
+
/** Live, read-only view of the running Goal (null when idle). */
|
|
83
|
+
getGoalRunner?: () => {
|
|
84
|
+
graph: import('@wrongstack/core/goal').PhaseGraph;
|
|
85
|
+
getProgress: () => import('@wrongstack/core/goal').PhaseProgress | null;
|
|
86
|
+
isRunning: () => boolean;
|
|
87
|
+
} | null;
|
|
88
|
+
/** Interactive board: move a task to another phase (returns false when idle/invalid). */
|
|
89
|
+
onGoalMoveTask?: ((taskId: string, toPhaseId: string) => boolean) | undefined;
|
|
90
|
+
/** Interactive board: (re)assign a task to an agent (clear with both omitted). */
|
|
91
|
+
onGoalAssignTask?: ((taskId: string, agentId?: string, agentName?: string) => boolean) | undefined;
|
|
92
|
+
/** Interactive board: add a new task to a phase, returning its id (or null when idle). */
|
|
93
|
+
onGoalAddTask?: ((phaseId: string, spec: {
|
|
94
|
+
title: string;
|
|
95
|
+
description?: string;
|
|
96
|
+
type?: import('@wrongstack/core/types').TaskNode['type'];
|
|
97
|
+
priority?: import('@wrongstack/core/types').TaskNode['priority'];
|
|
98
|
+
}) => string | null) | undefined;
|
|
99
|
+
/** Interactive board: requeue a task to pending so it (re)runs. */
|
|
100
|
+
onGoalRetryTask?: ((taskId: string) => boolean) | undefined;
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=command-context-sdd-goal.d.ts.map
|
|
@@ -5,8 +5,10 @@ import type { CompactOptions, CompactReport, HealthRegistry, MemoryPort, Metrics
|
|
|
5
5
|
import type { WstackPaths } from '@wrongstack/core/utils';
|
|
6
6
|
import type { SummarizerPort } from '@wrongstack/tools';
|
|
7
7
|
import type { VectorMemoryStore } from '@wrongstack/vector-memory';
|
|
8
|
+
import type { SlashFleetCommandContext } from './command-context-fleet.js';
|
|
9
|
+
import type { SlashSddGoalCommandContext } from './command-context-sdd-goal.js';
|
|
8
10
|
/** Host capabilities supplied to command adapters. */
|
|
9
|
-
export interface SlashCommandContext {
|
|
11
|
+
export interface SlashCommandContext extends SlashFleetCommandContext, SlashSddGoalCommandContext {
|
|
10
12
|
registry: SlashCommandRegistry;
|
|
11
13
|
toolRegistry: ToolRegistry;
|
|
12
14
|
/**
|
|
@@ -75,189 +77,6 @@ export interface SlashCommandContext {
|
|
|
75
77
|
onNewSession?: (() => Promise<void>) | undefined;
|
|
76
78
|
onDiag?: (() => string) | undefined;
|
|
77
79
|
onStats?: (() => string | null) | undefined;
|
|
78
|
-
/** Agent Monitor Service — tracks subagent conversations and streams to HQ. */
|
|
79
|
-
agentMonitor?: import('@wrongstack/core/coordination').AgentMonitorService | undefined;
|
|
80
|
-
/**
|
|
81
|
-
* Generate a commit message by calling the LLM with the git diff.
|
|
82
|
-
* Receives the raw diff, returns a commit message string.
|
|
83
|
-
* When omitted /commit falls back to heuristics-only messages.
|
|
84
|
-
*/
|
|
85
|
-
generateCommitMessage?: ((diff: string) => Promise<string>) | undefined;
|
|
86
|
-
/** Fire-and-forget spawn — returns immediately with spawn metadata. Used by /spawn. */
|
|
87
|
-
onSpawn?: (description: string, opts?: {
|
|
88
|
-
provider?: string | undefined;
|
|
89
|
-
model?: string | undefined;
|
|
90
|
-
fallbackModels?: string[] | undefined;
|
|
91
|
-
tools?: string[] | undefined;
|
|
92
|
-
name?: string | undefined;
|
|
93
|
-
/** Explicit capability allowlist for the subagent's auto-approve policy.
|
|
94
|
-
* When omitted the host applies the WIDE working default (read/write/
|
|
95
|
-
* net/shell/install) — or, for a scoped tools slice, that plus the
|
|
96
|
-
* tools' own capabilities. Pass this to narrow (e.g. read-only) or to
|
|
97
|
-
* grant an escape-hatch cap (fs.write.outside-project, config.mutate). */
|
|
98
|
-
allowedCapabilities?: readonly string[] | undefined;
|
|
99
|
-
/** Legacy Shadow Agent interval in ms. Only used when name === 'shadow'. */
|
|
100
|
-
shadowIntervalMs?: number | undefined;
|
|
101
|
-
/**
|
|
102
|
-
* Free-form task context propagated into the spawned `TaskSpec.context`.
|
|
103
|
-
* Used by `/kanban task dispatch` to carry `{ kanban: { boardId, taskId } }`
|
|
104
|
-
* so the tool-runtime boundary gate (`evaluateToolKanbanBoundary`) can
|
|
105
|
-
* resolve the live policy instead of failing open.
|
|
106
|
-
*/
|
|
107
|
-
context?: {
|
|
108
|
-
kanban?: {
|
|
109
|
-
boardId?: string;
|
|
110
|
-
taskId?: string;
|
|
111
|
-
projectRoot?: string;
|
|
112
|
-
};
|
|
113
|
-
} | undefined;
|
|
114
|
-
}) => Promise<string>;
|
|
115
|
-
/**
|
|
116
|
-
* Blocking spawn — waits for the subagent to complete and returns the full
|
|
117
|
-
* result. Used by /techstack and any other command that needs the subagent's
|
|
118
|
-
* actual output inline.
|
|
119
|
-
*/
|
|
120
|
-
onSpawnAndWait?: (description: string, opts?: {
|
|
121
|
-
provider?: string | undefined;
|
|
122
|
-
model?: string | undefined;
|
|
123
|
-
fallbackModels?: string[] | undefined;
|
|
124
|
-
tools?: string[] | undefined;
|
|
125
|
-
name?: string | undefined;
|
|
126
|
-
/** Explicit capability allowlist for the subagent's auto-approve policy.
|
|
127
|
-
* When omitted the host applies the WIDE working default (read/write/
|
|
128
|
-
* net/shell/install) — or, for a scoped tools slice, that plus the
|
|
129
|
-
* tools' own capabilities. Pass this to narrow (e.g. read-only) or to
|
|
130
|
-
* grant an escape-hatch cap (fs.write.outside-project, config.mutate). */
|
|
131
|
-
allowedCapabilities?: readonly string[] | undefined;
|
|
132
|
-
/** Legacy Shadow Agent interval in ms. Only used when name === 'shadow'. */
|
|
133
|
-
shadowIntervalMs?: number | undefined;
|
|
134
|
-
/**
|
|
135
|
-
* Free-form task context propagated into the spawned `TaskSpec.context`.
|
|
136
|
-
* Used by `/kanban task dispatch` to carry `{ kanban: { boardId, taskId } }`
|
|
137
|
-
* so the tool-runtime boundary gate (`evaluateToolKanbanBoundary`) can
|
|
138
|
-
* resolve the live policy instead of failing open.
|
|
139
|
-
*/
|
|
140
|
-
context?: {
|
|
141
|
-
kanban?: {
|
|
142
|
-
boardId?: string;
|
|
143
|
-
taskId?: string;
|
|
144
|
-
projectRoot?: string;
|
|
145
|
-
};
|
|
146
|
-
} | undefined;
|
|
147
|
-
}) => Promise<string>;
|
|
148
|
-
onAgents?: ((subagentId?: string) => string) | undefined;
|
|
149
|
-
onFleet?: (action: 'status' | 'usage' | 'kill' | 'manifest' | 'concurrency' | 'retry' | 'log', target?: string | undefined) => Promise<string>;
|
|
150
|
-
/**
|
|
151
|
-
* Get live coordinator status for /fleet. Returns null when no fleet is active.
|
|
152
|
-
*/
|
|
153
|
-
onFleetStatus?: (() => import('@wrongstack/core/types').CoordinatorStatus | null) | undefined;
|
|
154
|
-
/**
|
|
155
|
-
* Read-only concurrency + lifetime spawn budget for `/fleet status`.
|
|
156
|
-
* Returns null when no fleet host is available.
|
|
157
|
-
*/
|
|
158
|
-
onFleetBudget?: (() => {
|
|
159
|
-
maxConcurrent: number;
|
|
160
|
-
activeAgents: number;
|
|
161
|
-
maxSpawns: number;
|
|
162
|
-
usedSpawns: number;
|
|
163
|
-
remainingSpawns: number;
|
|
164
|
-
maxTokens?: number | undefined;
|
|
165
|
-
usedTokens?: number | undefined;
|
|
166
|
-
remainingTokens?: number | undefined;
|
|
167
|
-
maxCostUsd?: number | undefined;
|
|
168
|
-
usedCostUsd?: number | undefined;
|
|
169
|
-
remainingCostUsd?: number | undefined;
|
|
170
|
-
checkpointMaxSpawns?: number | undefined;
|
|
171
|
-
ceilingMismatch?: boolean | undefined;
|
|
172
|
-
} | null) | undefined;
|
|
173
|
-
/**
|
|
174
|
-
* Get fleet usage summary for /fleet usage.
|
|
175
|
-
*/
|
|
176
|
-
onFleetUsage?: (() => import('@wrongstack/core/coordination').FleetUsage | null) | undefined;
|
|
177
|
-
/**
|
|
178
|
-
* Kill all running subagents. Returns count of killed subagents.
|
|
179
|
-
*/
|
|
180
|
-
onFleetKill?: (() => number | Promise<number>) | undefined;
|
|
181
|
-
/**
|
|
182
|
-
* Abort the in-flight leader run. Installed by the surface (REPL/TUI) on
|
|
183
|
-
* startup so `/interrupt` can stop the current iteration — slash commands
|
|
184
|
-
* don't get the RunController directly. The default no-op returns false;
|
|
185
|
-
* a real handler returns true when it actually aborted a run.
|
|
186
|
-
*/
|
|
187
|
-
interruptController?: {
|
|
188
|
-
abortLeader: () => boolean;
|
|
189
|
-
/**
|
|
190
|
-
* Report whether an operation (leader run, autonomy loop, or SDD run)
|
|
191
|
-
* is currently in flight. Used by `/clear` to confirm before wiping a
|
|
192
|
-
* session that still has active work. Absent → treated as idle.
|
|
193
|
-
*/
|
|
194
|
-
isRunning?: (() => boolean) | undefined;
|
|
195
|
-
/**
|
|
196
|
-
* Ask the owning interactive surface to confirm a destructive clear.
|
|
197
|
-
* The TUI installs a panel-backed implementation; plain terminals
|
|
198
|
-
* fall back to the generic `confirm` callback below.
|
|
199
|
-
*/
|
|
200
|
-
confirmClear?: ((info: {
|
|
201
|
-
leaderActive: boolean;
|
|
202
|
-
subagentCount: number;
|
|
203
|
-
}) => Promise<boolean>) | undefined;
|
|
204
|
-
/** Render a generic slash-command confirmation in the owning surface. */
|
|
205
|
-
confirmSlash?: ((question: string, defaultYes: boolean) => Promise<boolean | null>) | undefined;
|
|
206
|
-
/** Drop buffered output that belongs to the session being cleared. */
|
|
207
|
-
resetSession?: (() => void) | undefined;
|
|
208
|
-
/** Wait until the aborted leader turn can no longer mutate context. */
|
|
209
|
-
waitForIdle?: (() => Promise<void>) | undefined;
|
|
210
|
-
} | undefined;
|
|
211
|
-
/**
|
|
212
|
-
* Terminate a specific subagent by id. Returns true if terminated.
|
|
213
|
-
*/
|
|
214
|
-
onFleetTerminate?: ((subagentId: string) => boolean | Promise<boolean>) | undefined;
|
|
215
|
-
/**
|
|
216
|
-
* Spawn a subagent of a given role. Returns the new subagent id.
|
|
217
|
-
*/
|
|
218
|
-
onFleetSpawn?: ((role: string) => Promise<string>) | undefined;
|
|
219
|
-
/**
|
|
220
|
-
* Optional LLM classifier for `/fleet dispatch`. When wired, the smart
|
|
221
|
-
* dispatcher uses it to resolve ambiguous routing decisions; without it the
|
|
222
|
-
* dispatcher is heuristic-only. Built from the session provider in the host.
|
|
223
|
-
*/
|
|
224
|
-
onDispatchClassify?: import('@wrongstack/core/coordination').DispatchClassifier | undefined;
|
|
225
|
-
/**
|
|
226
|
-
* Toggle subagent activity streaming into the leader's history. The
|
|
227
|
-
* TUI installs the actual setter on mount via a shared controller;
|
|
228
|
-
* before that, calls are buffered into the initial-value field so
|
|
229
|
-
* `/fleet stream off` issued before mount still takes effect.
|
|
230
|
-
*/
|
|
231
|
-
fleetStreamController?: {
|
|
232
|
-
/** Fleet-chat verbosity (off | compact | full). */
|
|
233
|
-
mode: import('@wrongstack/core/types').FleetChatVerbosity;
|
|
234
|
-
/** Replaced by the TUI on mount with a dispatch-backed setter. */
|
|
235
|
-
setMode: (mode: import('@wrongstack/core/types').FleetChatVerbosity) => void;
|
|
236
|
-
} | undefined;
|
|
237
|
-
/**
|
|
238
|
-
* Toggle prompt refinement ("did you mean this?"). The TUI installs the
|
|
239
|
-
* actual dispatch-backed setter on mount via this shared controller; before
|
|
240
|
-
* that, `enabled` just mirrors the requested value so a pre-mount toggle
|
|
241
|
-
* still takes effect. Backed by `config.autonomy.enhance`.
|
|
242
|
-
*/
|
|
243
|
-
enhanceController?: {
|
|
244
|
-
enabled: boolean;
|
|
245
|
-
setEnabled: (enabled: boolean) => void;
|
|
246
|
-
};
|
|
247
|
-
/**
|
|
248
|
-
* Re-run interrupted tasks from a prior director-state.json. Pass `undefined`
|
|
249
|
-
* to list them, a specific task id to retry one, or 'all' to retry every
|
|
250
|
-
* interrupted task. Returns a human-readable summary. Only wired when
|
|
251
|
-
* director mode is enabled.
|
|
252
|
-
*/
|
|
253
|
-
onFleetRetry?: ((taskId?: string) => Promise<string>) | undefined;
|
|
254
|
-
/**
|
|
255
|
-
* Inspect per-subagent JSONL transcripts under `<fleetRoot>/subagents/`.
|
|
256
|
-
* Pass `undefined` to list available transcripts, a subagent id to show
|
|
257
|
-
* a compact event summary, or a subagent id with `mode='raw'` to dump
|
|
258
|
-
* the full JSONL. Only wired when a fleet root exists for this session.
|
|
259
|
-
*/
|
|
260
|
-
onFleetLog?: (subagentId: string | undefined, mode: 'summary' | 'raw') => Promise<string>;
|
|
261
80
|
/** Promote to director mode at runtime. Returns success message or null on failure. */
|
|
262
81
|
onDirector?: (() => Promise<string | null>) | undefined;
|
|
263
82
|
/** Manage plugin config from the interactive slash menu. */
|
|
@@ -473,104 +292,6 @@ export interface SlashCommandContext {
|
|
|
473
292
|
message?: string | undefined;
|
|
474
293
|
runText?: string | undefined;
|
|
475
294
|
}>;
|
|
476
|
-
/**
|
|
477
|
-
* Start an SDD parallel fan-out run. Requires an active SDD session with
|
|
478
|
-
* an approved spec and generated task graph.
|
|
479
|
-
*/
|
|
480
|
-
onSddParallelRun?: (opts?: {
|
|
481
|
-
parallelSlots?: number | undefined;
|
|
482
|
-
}) => Promise<string>;
|
|
483
|
-
/** Stop the currently running SDD parallel fan-out. */
|
|
484
|
-
onSddParallelStop?: (() => void) | undefined;
|
|
485
|
-
/** Requeue every failed task in the active SDD run to pending. Returns the count requeued. */
|
|
486
|
-
onSddRetryAllFailed?: (() => number) | undefined;
|
|
487
|
-
/**
|
|
488
|
-
* Split a task in the active SDD run into sub-tasks (refused while it runs).
|
|
489
|
-
* Returns the new leaf ids, or null when there is no active run / unknown task.
|
|
490
|
-
*/
|
|
491
|
-
onSddSplitTask?: ((taskId: string, subtasks: Array<{
|
|
492
|
-
title: string;
|
|
493
|
-
description: string;
|
|
494
|
-
}>) => string[] | null) | undefined;
|
|
495
|
-
/**
|
|
496
|
-
* Remove the git worktrees + branches an SDD run created. Uses the live run
|
|
497
|
-
* when one is active (after a stop), else sweeps the project's leftovers from
|
|
498
|
-
* disk. Returns the number of worktrees removed.
|
|
499
|
-
*/
|
|
500
|
-
onSddCleanWorktrees?: (() => Promise<number>) | undefined;
|
|
501
|
-
/**
|
|
502
|
-
* Roll back an SDD run's merged commits by reverting each on the base branch
|
|
503
|
-
* (history-preserving). Refuses while a run is still live. Returns the outcome.
|
|
504
|
-
*/
|
|
505
|
-
onSddRollback?: (() => Promise<{
|
|
506
|
-
ok: boolean;
|
|
507
|
-
reverted: number;
|
|
508
|
-
reason?: string;
|
|
509
|
-
}>) | undefined;
|
|
510
|
-
/**
|
|
511
|
-
* Destroy the SDD project: stop any active run, clean worktrees, and delete the
|
|
512
|
-
* on-disk artifacts (specs, task-graphs, session, boards). Pass
|
|
513
|
-
* `{ revertMerged: true }` (`/sdd destroy --revert`) to also revert merged
|
|
514
|
-
* commits before wiping; otherwise they are left on the base branch.
|
|
515
|
-
*/
|
|
516
|
-
onSddDestroy?: ((opts?: {
|
|
517
|
-
revertMerged?: boolean;
|
|
518
|
-
}) => Promise<{
|
|
519
|
-
worktreesRemoved: number;
|
|
520
|
-
deleted: string[];
|
|
521
|
-
reverted: number;
|
|
522
|
-
revertOk?: boolean | undefined;
|
|
523
|
-
revertReason?: string | undefined;
|
|
524
|
-
}>) | undefined;
|
|
525
|
-
/**
|
|
526
|
-
* Start a real, LLM-driven Goal run from a free-text goal. The host
|
|
527
|
-
* plans phases (each holding many todos), persists the phase-graph as
|
|
528
|
-
* per-project JSON, and drives the orchestrator — one subagent per task —
|
|
529
|
-
* in the background. Returns the built graph or an error.
|
|
530
|
-
*/
|
|
531
|
-
onGoalStart?: (opts: {
|
|
532
|
-
goal: string;
|
|
533
|
-
projectContext?: string | undefined;
|
|
534
|
-
}) => Promise<{
|
|
535
|
-
ok: true;
|
|
536
|
-
graph: import('@wrongstack/core/goal').PhaseGraph;
|
|
537
|
-
} | {
|
|
538
|
-
ok: false;
|
|
539
|
-
error: string;
|
|
540
|
-
}>;
|
|
541
|
-
onGoalPause?: (() => void) | undefined;
|
|
542
|
-
onGoalResume?: (() => void) | undefined;
|
|
543
|
-
onGoalStop?: (() => void) | undefined;
|
|
544
|
-
/**
|
|
545
|
-
* Resume a persisted PhaseGraph. The host creates a new orchestrator for
|
|
546
|
-
* the loaded graph and starts executing pending tasks.
|
|
547
|
-
*/
|
|
548
|
-
onGoalResumeFromGraph?: ((graph: import('@wrongstack/core/goal').PhaseGraph) => Promise<{
|
|
549
|
-
ok: true;
|
|
550
|
-
graph: import('@wrongstack/core/goal').PhaseGraph;
|
|
551
|
-
} | {
|
|
552
|
-
ok: false;
|
|
553
|
-
error: string;
|
|
554
|
-
}>) | undefined;
|
|
555
|
-
/** Live, read-only view of the running Goal (null when idle). */
|
|
556
|
-
getGoalRunner?: () => {
|
|
557
|
-
graph: import('@wrongstack/core/goal').PhaseGraph;
|
|
558
|
-
getProgress: () => import('@wrongstack/core/goal').PhaseProgress | null;
|
|
559
|
-
isRunning: () => boolean;
|
|
560
|
-
} | null;
|
|
561
|
-
/** Interactive board: move a task to another phase (returns false when idle/invalid). */
|
|
562
|
-
onGoalMoveTask?: ((taskId: string, toPhaseId: string) => boolean) | undefined;
|
|
563
|
-
/** Interactive board: (re)assign a task to an agent (clear with both omitted). */
|
|
564
|
-
onGoalAssignTask?: ((taskId: string, agentId?: string, agentName?: string) => boolean) | undefined;
|
|
565
|
-
/** Interactive board: add a new task to a phase, returning its id (or null when idle). */
|
|
566
|
-
onGoalAddTask?: ((phaseId: string, spec: {
|
|
567
|
-
title: string;
|
|
568
|
-
description?: string;
|
|
569
|
-
type?: import('@wrongstack/core/types').TaskNode['type'];
|
|
570
|
-
priority?: import('@wrongstack/core/types').TaskNode['priority'];
|
|
571
|
-
}) => string | null) | undefined;
|
|
572
|
-
/** Interactive board: requeue a task to pending so it (re)runs. */
|
|
573
|
-
onGoalRetryTask?: ((taskId: string) => boolean) | undefined;
|
|
574
295
|
/**
|
|
575
296
|
* Manage git worktrees used for per-phase Goal isolation.
|
|
576
297
|
* `list` shows current worktrees, `merge <branch>` squash-merges a branch
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Context } from '@wrongstack/core/agent';
|
|
2
|
+
import type { SlashCommandContext } from './command-context.js';
|
|
3
|
+
/**
|
|
4
|
+
* Check for running agents/brain/fleet and warn the user before switching.
|
|
5
|
+
* Returns `true` if the switch should proceed, `false` if cancelled.
|
|
6
|
+
*/
|
|
7
|
+
export declare function confirmProjectSwitch(opts: SlashCommandContext, targetName: string): Promise<boolean>;
|
|
8
|
+
export declare function switchInteractiveCommand(opts: SlashCommandContext, ctx: Context | undefined): Promise<{
|
|
9
|
+
message: string;
|
|
10
|
+
}>;
|
|
11
|
+
//# sourceMappingURL=project-switch-interactive.d.ts.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { ModelMatrixEntry, ProviderConfig } from '@wrongstack/core/types';
|
|
2
|
+
/**
|
|
3
|
+
* Catalog model ids per provider, resolved through the same alias rules as the
|
|
4
|
+
* capability overlay so a gateway saved as `ai-gateway` reads the models.dev id
|
|
5
|
+
* that actually publishes it. Includes anything auto-discovery merged into the
|
|
6
|
+
* registry at boot. Best-effort: a missing or failing registry yields an empty
|
|
7
|
+
* map and callers fall back to the saved list.
|
|
8
|
+
*/
|
|
9
|
+
export declare function resolveCatalogModelIds(registry: import('@wrongstack/core/types').ModelsRegistry | undefined, config: import('@wrongstack/core/types').Config, providerIds: string[]): Promise<Map<string, string[]>>;
|
|
10
|
+
/** Keep a 300-model gateway list readable in a terminal. */
|
|
11
|
+
export declare function summarizeModelIds(ids: string[], limit?: number): string;
|
|
12
|
+
/** A provider is selectable when it has a stored key, a key list, or a
|
|
13
|
+
* populated env var. Mirrors `hasApiKey` but config-only (no registry). */
|
|
14
|
+
export declare function providerHasKey(entry: ProviderConfig | undefined): boolean;
|
|
15
|
+
/** Provider ids the user can target — those with a key, plus the active one. */
|
|
16
|
+
export declare function keyedProviderIds(config: {
|
|
17
|
+
provider: string;
|
|
18
|
+
providers?: Record<string, ProviderConfig>;
|
|
19
|
+
}): string[];
|
|
20
|
+
/**
|
|
21
|
+
* Parse `<provider>/<model>`, `<provider> <model>`, or a bare `<model>`
|
|
22
|
+
* (provider omitted → leader provider at resolve time) into a matrix entry.
|
|
23
|
+
*/
|
|
24
|
+
export declare function parseTarget(tokens: string[], profiles?: Record<string, string[]>): ModelMatrixEntry | {
|
|
25
|
+
error: string;
|
|
26
|
+
};
|
|
27
|
+
export declare function isReasoningMode(value: string | undefined): value is 'auto' | 'on' | 'off';
|
|
28
|
+
export declare function parseBoolWord(value: string | undefined): boolean | undefined;
|
|
29
|
+
export declare function fmtEntry(e: ModelMatrixEntry): string;
|
|
30
|
+
/**
|
|
31
|
+
* Read the active profile config, apply `mutate`, write it back atomically, and
|
|
32
|
+
* mirror the change into the in-memory config store. Pure I/O — safe under
|
|
33
|
+
* both the plain REPL and the Ink TUI.
|
|
34
|
+
*/
|
|
35
|
+
export declare function patchProfileConfig(mutate: (cfg: Record<string, unknown>) => void, profileConfigPath: string): Promise<Record<string, unknown>>;
|
|
36
|
+
//# sourceMappingURL=setmodel-helpers.d.ts.map
|