@wrongstack/cli 1.0.0 → 1.0.3
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/data/providers.json +21 -21
- package/dist/{acp-3LARESEO.js → acp-JK4ZQO3R.js} +4 -3
- package/dist/{auth-KIBJZZIE.js → auth-XD3GN5RJ.js} +80 -56
- package/dist/auth-menu/index.d.ts +1 -0
- package/dist/auth-menu/oauth-menu.d.ts +3 -1
- package/dist/auth-menu/panel-service.d.ts +2 -0
- package/dist/auth-menu/provider-auth-login.d.ts +12 -0
- package/dist/auth-menu/types.d.ts +3 -0
- package/dist/auto-discover-providers-DXR25GTG.js +7 -0
- package/dist/boot/dispatch-webui.d.ts +1 -0
- package/dist/boot/system-prompt-builder.d.ts +7 -0
- package/dist/boot/system-prompt-menu.d.ts +7 -0
- package/dist/boot/system-prompt.d.ts +2 -1
- package/dist/chimera-reviewer-policy.d.ts +1 -1
- package/dist/{chunk-4HV5RKZH.js → chunk-4NHD5OXJ.js} +3 -3
- package/dist/chunk-D5GB5MHA.js +87 -0
- package/dist/chunk-DAKVBMD4.js +36 -0
- package/dist/{chunk-Z7A5MXKJ.js → chunk-E6RFXHWD.js} +1 -2
- package/dist/{chunk-ZSZ3EYWH.js → chunk-GMY45LO6.js} +9 -5
- package/dist/{chunk-ETYHZPXP.js → chunk-IUEKNHPT.js} +12 -10
- package/dist/{chunk-MNQQ4ZNF.js → chunk-ONOT5OJ2.js} +290 -687
- package/dist/chunk-SIGUWXAA.js +43 -0
- package/dist/{chunk-TEBMCYZN.js → chunk-SIS37L3W.js} +58 -2
- package/dist/{chunk-5IA5337I.js → chunk-U6KCWRMC.js} +4 -2
- package/dist/chunk-UQUYBDMG.js +51 -0
- package/dist/{cli-context-CYMKNOK3.js → cli-context-Q6QP534K.js} +20 -9
- package/dist/{cli-main-TTIVR4DI.js → cli-main-JQXCDZEA.js} +2979 -2279
- package/dist/config-transfer-2YF3CRTN.js +99 -0
- package/dist/execute-deps.d.ts +1 -0
- package/dist/{execution-3Y55IWBK.js → execution-KH7WJNAX.js} +26 -19
- package/dist/index.js +4 -4
- package/dist/live-settings-input.d.ts +2 -0
- package/dist/{mailbox-serve-VUCWZ2SJ.js → mailbox-serve-X3CR6VFW.js} +4 -3
- package/dist/{modeldiag-FMJT37SN.js → modeldiag-46CMWUNM.js} +31 -24
- package/dist/{plugin-usage-HFBI3TFT.js → plugin-usage-M6KET4OZ.js} +2 -2
- package/dist/{plugins-PZ2VZL7V.js → plugins-U7KGQAUG.js} +3 -3
- package/dist/{providers-models-YVMVYWRS.js → providers-models-6MOGAOVK.js} +2 -2
- package/dist/settings-behavior-sections.d.ts +20 -0
- package/dist/{short-circuit-flags-6PSP56L7.js → short-circuit-flags-ZNZX44MC.js} +3 -3
- package/dist/slash-commands/codebase-map.d.ts +11 -0
- package/dist/slash-commands/command-context.d.ts +7 -0
- package/dist/slash-commands/context.d.ts +10 -0
- package/dist/slash-commands/openai-quota.d.ts +31 -0
- package/dist/subcommands/handlers/config-transfer.d.ts +6 -0
- package/dist/{subcommands-HZQKA4G2.js → subcommands-CUTGBDKP.js} +2 -2
- package/dist/{webui-server-T6AMOXJJ.js → webui-server-QWBUT7BO.js} +22 -5
- package/dist/webui-server-options.d.ts +1 -0
- package/dist/wiring/atlas-prompt-contributor.d.ts +54 -0
- package/dist/wiring/cli-execute-builder.d.ts +1 -0
- package/dist/wiring/codebase-embeddings.d.ts +31 -0
- package/dist/wiring/command-host-state.d.ts +2 -0
- package/dist/wiring/concept-summarizer.d.ts +32 -0
- package/dist/wiring/external-plugins.d.ts +1 -0
- package/dist/wiring/lifecycle-plugins.d.ts +2 -1
- package/dist/wiring/plugins.d.ts +2 -1
- package/dist/wiring/provider.d.ts +2 -1
- package/package.json +29 -29
- package/dist/auto-discover-providers-VQU3IZMR.js +0 -7
- package/dist/chunk-52C7PD2H.js +0 -61
- package/dist/chunk-TNK6237M.js +0 -262
package/data/providers.json
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"output": ["text"]
|
|
23
23
|
},
|
|
24
24
|
"limit": {
|
|
25
|
-
"context":
|
|
25
|
+
"context": 872000,
|
|
26
26
|
"output": 128000
|
|
27
27
|
}
|
|
28
28
|
},
|
|
@@ -44,22 +44,7 @@
|
|
|
44
44
|
"output": ["text"]
|
|
45
45
|
},
|
|
46
46
|
"limit": {
|
|
47
|
-
"context":
|
|
48
|
-
"output": 128000
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
"gpt-5.5": {
|
|
52
|
-
"id": "gpt-5.5",
|
|
53
|
-
"name": "GPT-5.5",
|
|
54
|
-
"description": "Frontier model for complex coding, research, and real-world work.",
|
|
55
|
-
"reasoning": true,
|
|
56
|
-
"tool_call": true,
|
|
57
|
-
"modalities": {
|
|
58
|
-
"input": ["text", "image"],
|
|
59
|
-
"output": ["text"]
|
|
60
|
-
},
|
|
61
|
-
"limit": {
|
|
62
|
-
"context": 1050000,
|
|
47
|
+
"context": 872000,
|
|
63
48
|
"output": 128000
|
|
64
49
|
}
|
|
65
50
|
},
|
|
@@ -81,7 +66,7 @@
|
|
|
81
66
|
"output": ["text"]
|
|
82
67
|
},
|
|
83
68
|
"limit": {
|
|
84
|
-
"context":
|
|
69
|
+
"context": 872000,
|
|
85
70
|
"output": 128000
|
|
86
71
|
}
|
|
87
72
|
},
|
|
@@ -103,7 +88,22 @@
|
|
|
103
88
|
"output": ["text"]
|
|
104
89
|
},
|
|
105
90
|
"limit": {
|
|
106
|
-
"context":
|
|
91
|
+
"context": 872000,
|
|
92
|
+
"output": 128000
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"gpt-5.5": {
|
|
96
|
+
"id": "gpt-5.5",
|
|
97
|
+
"name": "GPT-5.5",
|
|
98
|
+
"description": "Proven previous-generation model for coding and general work.",
|
|
99
|
+
"reasoning": true,
|
|
100
|
+
"tool_call": true,
|
|
101
|
+
"modalities": {
|
|
102
|
+
"input": ["text", "image"],
|
|
103
|
+
"output": ["text"]
|
|
104
|
+
},
|
|
105
|
+
"limit": {
|
|
106
|
+
"context": 272000,
|
|
107
107
|
"output": 128000
|
|
108
108
|
}
|
|
109
109
|
},
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
"output": ["text"]
|
|
119
119
|
},
|
|
120
120
|
"limit": {
|
|
121
|
-
"context":
|
|
121
|
+
"context": 272000,
|
|
122
122
|
"output": 128000
|
|
123
123
|
}
|
|
124
124
|
},
|
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
"output": ["text"]
|
|
134
134
|
},
|
|
135
135
|
"limit": {
|
|
136
|
-
"context":
|
|
136
|
+
"context": 128000,
|
|
137
137
|
"output": 128000
|
|
138
138
|
}
|
|
139
139
|
}
|
|
@@ -3,11 +3,12 @@ import {
|
|
|
3
3
|
loadCachedAcpRegistry,
|
|
4
4
|
refreshAcpRegistry,
|
|
5
5
|
setupProvider
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GMY45LO6.js";
|
|
7
7
|
import {
|
|
8
8
|
startCliHqConnection
|
|
9
9
|
} from "./chunk-TE3Q32JP.js";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-SIGUWXAA.js";
|
|
11
|
+
import "./chunk-DAKVBMD4.js";
|
|
11
12
|
import "./chunk-DR2OXU46.js";
|
|
12
13
|
|
|
13
14
|
// src/subcommands/handlers/acp.ts
|
|
@@ -1016,4 +1017,4 @@ ${renderAcpBenchText(result)}
|
|
|
1016
1017
|
export {
|
|
1017
1018
|
acpCmd
|
|
1018
1019
|
};
|
|
1019
|
-
//# sourceMappingURL=acp-
|
|
1020
|
+
//# sourceMappingURL=acp-JK4ZQO3R.js.map
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
addKeyForProvider,
|
|
5
5
|
confirm,
|
|
6
6
|
loadProviders,
|
|
7
|
+
providerAuthStrategiesFor,
|
|
7
8
|
readKeyInput,
|
|
8
9
|
renderActions,
|
|
9
10
|
renderProviderHeader,
|
|
@@ -13,23 +14,24 @@ import {
|
|
|
13
14
|
runOAuthLoginKind,
|
|
14
15
|
runOAuthLoginMenu,
|
|
15
16
|
validateFamily
|
|
16
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-ONOT5OJ2.js";
|
|
17
18
|
import {
|
|
18
19
|
renderAuthLocalHelpToString,
|
|
19
20
|
wantsLocalHelp
|
|
20
21
|
} from "./chunk-2VMJ3E5Z.js";
|
|
21
22
|
import "./chunk-B4JLSXZB.js";
|
|
22
|
-
import "./chunk-VUVOMXWP.js";
|
|
23
23
|
import {
|
|
24
24
|
restoreFlags
|
|
25
25
|
} from "./chunk-CSAPOCBP.js";
|
|
26
|
+
import "./chunk-VUVOMXWP.js";
|
|
26
27
|
import {
|
|
27
28
|
activeProfileConfigPath
|
|
28
29
|
} from "./chunk-YMXXOOFN.js";
|
|
29
30
|
import {
|
|
30
31
|
parseAuthFlags
|
|
31
|
-
} from "./chunk-
|
|
32
|
-
import "./chunk-
|
|
32
|
+
} from "./chunk-E6RFXHWD.js";
|
|
33
|
+
import "./chunk-SIGUWXAA.js";
|
|
34
|
+
import "./chunk-DAKVBMD4.js";
|
|
33
35
|
import {
|
|
34
36
|
loadConfigProviders,
|
|
35
37
|
maskedKey,
|
|
@@ -40,7 +42,17 @@ import {
|
|
|
40
42
|
} from "./chunk-DR2OXU46.js";
|
|
41
43
|
|
|
42
44
|
// src/subcommands/handlers/auth.ts
|
|
43
|
-
import { color as
|
|
45
|
+
import { color as color5 } from "@wrongstack/core/utils";
|
|
46
|
+
|
|
47
|
+
// src/auth-menu/anthropic-oauth.ts
|
|
48
|
+
import {
|
|
49
|
+
FetchError,
|
|
50
|
+
ParseError
|
|
51
|
+
} from "@wrongstack/core/types";
|
|
52
|
+
import { color } from "@wrongstack/core/utils";
|
|
53
|
+
var REDIRECT_PORT = 53692;
|
|
54
|
+
var REDIRECT_PATH = "/callback";
|
|
55
|
+
var REDIRECT_URI = `http://localhost:${REDIRECT_PORT}${REDIRECT_PATH}`;
|
|
44
56
|
|
|
45
57
|
// src/auth-menu/direct.ts
|
|
46
58
|
async function runAuthDirect(deps, opts) {
|
|
@@ -102,11 +114,19 @@ async function runAuthDirect(deps, opts) {
|
|
|
102
114
|
return 0;
|
|
103
115
|
}
|
|
104
116
|
|
|
105
|
-
// src/auth-menu/
|
|
117
|
+
// src/auth-menu/github-copilot-oauth.ts
|
|
118
|
+
import {
|
|
119
|
+
FetchError as FetchError2,
|
|
120
|
+
ParseError as ParseError2
|
|
121
|
+
} from "@wrongstack/core/types";
|
|
106
122
|
import { color as color2 } from "@wrongstack/core/utils";
|
|
123
|
+
import { copilotBaseUrlFromToken, refreshCopilotToken } from "@wrongstack/providers";
|
|
124
|
+
|
|
125
|
+
// src/auth-menu/top-menu.ts
|
|
126
|
+
import { color as color4 } from "@wrongstack/core/utils";
|
|
107
127
|
|
|
108
128
|
// src/auth-menu/provider-menu.ts
|
|
109
|
-
import { color, expectDefined } from "@wrongstack/core/utils";
|
|
129
|
+
import { color as color3, expectDefined } from "@wrongstack/core/utils";
|
|
110
130
|
async function manageProvider(providerId, deps) {
|
|
111
131
|
for (; ; ) {
|
|
112
132
|
const providers = await loadProviders(deps);
|
|
@@ -119,7 +139,7 @@ async function manageProvider(providerId, deps) {
|
|
|
119
139
|
renderProviderHeader(deps.renderer, providerId, cfg);
|
|
120
140
|
renderActions(deps.renderer, keys.length);
|
|
121
141
|
const raw = (await deps.reader.readLine(`
|
|
122
|
-
${
|
|
142
|
+
${color3.amber("?")} ${providerId} > `)).trim();
|
|
123
143
|
if (!raw || raw === "b" || raw === "back" || raw === "q" || raw === "quit") {
|
|
124
144
|
return;
|
|
125
145
|
}
|
|
@@ -150,7 +170,7 @@ async function dispatchAction(verb, arg, providerId, keys, cfg, deps) {
|
|
|
150
170
|
},
|
|
151
171
|
deps.profileConfigPath
|
|
152
172
|
);
|
|
153
|
-
deps.renderer.write(` ${
|
|
173
|
+
deps.renderer.write(` ${color3.green("\u2713")} Removed ${providerId}.
|
|
154
174
|
`);
|
|
155
175
|
return "exit";
|
|
156
176
|
}
|
|
@@ -174,7 +194,7 @@ async function dispatchAction(verb, arg, providerId, keys, cfg, deps) {
|
|
|
174
194
|
},
|
|
175
195
|
deps.profileConfigPath
|
|
176
196
|
);
|
|
177
|
-
deps.renderer.write(` ${
|
|
197
|
+
deps.renderer.write(` ${color3.green("\u2713")} Updated ${providerId}/${target.label}.
|
|
178
198
|
`);
|
|
179
199
|
return "continue";
|
|
180
200
|
}
|
|
@@ -201,7 +221,7 @@ async function dispatchAction(verb, arg, providerId, keys, cfg, deps) {
|
|
|
201
221
|
},
|
|
202
222
|
deps.profileConfigPath
|
|
203
223
|
);
|
|
204
|
-
deps.renderer.write(` ${
|
|
224
|
+
deps.renderer.write(` ${color3.green("\u2713")} Deleted ${providerId}/${target.label}.
|
|
205
225
|
`);
|
|
206
226
|
return "continue";
|
|
207
227
|
}
|
|
@@ -220,14 +240,14 @@ async function dispatchAction(verb, arg, providerId, keys, cfg, deps) {
|
|
|
220
240
|
},
|
|
221
241
|
deps.profileConfigPath
|
|
222
242
|
);
|
|
223
|
-
deps.renderer.write(` ${
|
|
243
|
+
deps.renderer.write(` ${color3.green("\u2713")} Active key \u2192 ${color3.bold(target.label)}.
|
|
224
244
|
`);
|
|
225
245
|
return "continue";
|
|
226
246
|
}
|
|
227
247
|
if (verb === "f" || verb === "family") {
|
|
228
248
|
const current = cfg.family ?? "";
|
|
229
249
|
const ans = (await deps.reader.readLine(
|
|
230
|
-
` ${
|
|
250
|
+
` ${color3.amber("?")} Family ${color3.dim(`(anthropic | openai | openai-compatible | google, empty = unset, current: ${current || "unset"})`)}: `
|
|
231
251
|
)).trim();
|
|
232
252
|
if (ans !== "") {
|
|
233
253
|
const validated = validateFamily(ans);
|
|
@@ -247,7 +267,7 @@ async function dispatchAction(verb, arg, providerId, keys, cfg, deps) {
|
|
|
247
267
|
},
|
|
248
268
|
deps.profileConfigPath
|
|
249
269
|
);
|
|
250
|
-
deps.renderer.write(` ${
|
|
270
|
+
deps.renderer.write(` ${color3.green("\u2713")} family \u2192 ${validated}
|
|
251
271
|
`);
|
|
252
272
|
} else {
|
|
253
273
|
await mutateConfigProviders(
|
|
@@ -260,7 +280,7 @@ async function dispatchAction(verb, arg, providerId, keys, cfg, deps) {
|
|
|
260
280
|
},
|
|
261
281
|
deps.profileConfigPath
|
|
262
282
|
);
|
|
263
|
-
deps.renderer.write(` ${
|
|
283
|
+
deps.renderer.write(` ${color3.green("\u2713")} family \u2192 (unset)
|
|
264
284
|
`);
|
|
265
285
|
}
|
|
266
286
|
return "continue";
|
|
@@ -268,7 +288,7 @@ async function dispatchAction(verb, arg, providerId, keys, cfg, deps) {
|
|
|
268
288
|
if (verb === "B" || verb === "baseurl" || verb === "base-url" || verb === "url") {
|
|
269
289
|
const current = cfg.baseUrl ?? "";
|
|
270
290
|
const ans = (await deps.reader.readLine(
|
|
271
|
-
` ${
|
|
291
|
+
` ${color3.amber("?")} Base URL ${color3.dim(`(empty = unset, current: ${current || "unset"})`)}: `
|
|
272
292
|
)).trim();
|
|
273
293
|
await mutateConfigProviders(
|
|
274
294
|
deps.profileConfigPath,
|
|
@@ -281,14 +301,14 @@ async function dispatchAction(verb, arg, providerId, keys, cfg, deps) {
|
|
|
281
301
|
},
|
|
282
302
|
deps.profileConfigPath
|
|
283
303
|
);
|
|
284
|
-
deps.renderer.write(` ${
|
|
304
|
+
deps.renderer.write(` ${color3.green("\u2713")} baseUrl \u2192 ${ans || "(unset)"}
|
|
285
305
|
`);
|
|
286
306
|
return "continue";
|
|
287
307
|
}
|
|
288
308
|
if (verb === "m" || verb === "models") {
|
|
289
309
|
const current = (cfg.models ?? []).join(", ");
|
|
290
310
|
const ans = (await deps.reader.readLine(
|
|
291
|
-
` ${
|
|
311
|
+
` ${color3.amber("?")} Model ids ${color3.dim(`(comma-separated, empty = catalog default, current: ${current || "none"})`)}: `
|
|
292
312
|
)).trim();
|
|
293
313
|
const list = ans ? ans.split(",").map((s) => s.trim()).filter(Boolean) : [];
|
|
294
314
|
await mutateConfigProviders(
|
|
@@ -303,7 +323,7 @@ async function dispatchAction(verb, arg, providerId, keys, cfg, deps) {
|
|
|
303
323
|
deps.profileConfigPath
|
|
304
324
|
);
|
|
305
325
|
deps.renderer.write(
|
|
306
|
-
` ${
|
|
326
|
+
` ${color3.green("\u2713")} models \u2192 ${list.length === 0 ? "(catalog default)" : list.join(", ")}
|
|
307
327
|
`
|
|
308
328
|
);
|
|
309
329
|
return "continue";
|
|
@@ -326,9 +346,9 @@ async function runTopMenu(deps) {
|
|
|
326
346
|
renderTopMenu(deps.renderer, providers);
|
|
327
347
|
const ids = Object.keys(providers).sort();
|
|
328
348
|
const choice = (await deps.reader.readLine(`
|
|
329
|
-
${
|
|
349
|
+
${color4.amber("?")} Pick: `)).trim().toLowerCase();
|
|
330
350
|
if (!choice || choice === "q" || choice === "quit" || choice === "exit") {
|
|
331
|
-
deps.renderer.write(
|
|
351
|
+
deps.renderer.write(color4.dim("Done.\n"));
|
|
332
352
|
return 0;
|
|
333
353
|
}
|
|
334
354
|
if (choice === "a" || choice === "add") {
|
|
@@ -440,13 +460,17 @@ var authCmd = async (args, deps) => {
|
|
|
440
460
|
if (first === "login") {
|
|
441
461
|
const pid = (flags.positional[1] ?? "").toLowerCase();
|
|
442
462
|
if (!pid) return runOAuthLoginKind(menuDeps, "chatgpt");
|
|
443
|
-
const kind = resolveOAuthKind(pid, { allowNumeric: false });
|
|
463
|
+
const kind = resolveOAuthKind(pid, { allowNumeric: false, deps: menuDeps });
|
|
444
464
|
if (kind) return runOAuthLoginKind(menuDeps, kind);
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
)
|
|
465
|
+
const available = providerAuthStrategiesFor(menuDeps);
|
|
466
|
+
deps.renderer.writeError(`Unknown OAuth login strategy "${pid}".`);
|
|
467
|
+
for (const strategy of available) {
|
|
468
|
+
deps.renderer.write(
|
|
469
|
+
color5.dim(` Sign in with ${strategy.label}: `) + color5.bold(`wstack auth login ${strategy.id}`) + "\n"
|
|
470
|
+
);
|
|
471
|
+
}
|
|
448
472
|
deps.renderer.write(
|
|
449
|
-
|
|
473
|
+
color5.dim(" For an API key instead: ") + color5.bold(`wstack auth ${pid}`) + "\n"
|
|
450
474
|
);
|
|
451
475
|
return 1;
|
|
452
476
|
}
|
|
@@ -469,14 +493,14 @@ async function runAuthList(deps) {
|
|
|
469
493
|
const ids = Object.keys(providers).sort();
|
|
470
494
|
if (ids.length === 0) {
|
|
471
495
|
deps.renderer.write(
|
|
472
|
-
`${
|
|
473
|
-
${
|
|
496
|
+
`${color5.dim("No providers configured.")}
|
|
497
|
+
${color5.dim("Run")} ${color5.bold("wstack auth")} ${color5.dim("to add one.")}
|
|
474
498
|
`
|
|
475
499
|
);
|
|
476
500
|
return 0;
|
|
477
501
|
}
|
|
478
502
|
deps.renderer.write(`
|
|
479
|
-
${
|
|
503
|
+
${color5.bold("Saved providers")} ${color5.dim(`(${ids.length})`)}
|
|
480
504
|
|
|
481
505
|
`);
|
|
482
506
|
for (const id of ids) {
|
|
@@ -484,34 +508,34 @@ ${color3.bold("Saved providers")} ${color3.dim(`(${ids.length})`)}
|
|
|
484
508
|
if (!cfg) continue;
|
|
485
509
|
const keys = normalizeKeys(cfg);
|
|
486
510
|
const active = cfg.activeKey ?? keys[0]?.label;
|
|
487
|
-
const famTag = cfg.family ? `${cfg.family}` :
|
|
488
|
-
const aliasHint = cfg.type && cfg.type !== id ?
|
|
489
|
-
const modelHint = cfg.models && cfg.models.length > 0 ?
|
|
490
|
-
deps.renderer.write(` ${
|
|
511
|
+
const famTag = cfg.family ? `${cfg.family}` : color5.amber("no-family");
|
|
512
|
+
const aliasHint = cfg.type && cfg.type !== id ? color5.dim(` (\u2192 ${cfg.type})`) : "";
|
|
513
|
+
const modelHint = cfg.models && cfg.models.length > 0 ? color5.dim(` [${cfg.models.length} models]`) : "";
|
|
514
|
+
deps.renderer.write(` ${color5.bold(id)}${aliasHint}
|
|
491
515
|
`);
|
|
492
516
|
deps.renderer.write(
|
|
493
|
-
` family: ${famTag} baseUrl: ${cfg.baseUrl ??
|
|
517
|
+
` family: ${famTag} baseUrl: ${cfg.baseUrl ?? color5.dim("unset")}${modelHint}
|
|
494
518
|
`
|
|
495
519
|
);
|
|
496
520
|
if (keys.length === 0) {
|
|
497
|
-
deps.renderer.write(` ${
|
|
521
|
+
deps.renderer.write(` ${color5.amber("no keys")}
|
|
498
522
|
`);
|
|
499
523
|
} else {
|
|
500
524
|
deps.renderer.write(
|
|
501
|
-
` ${
|
|
525
|
+
` ${color5.dim(`${keys.length} key${keys.length === 1 ? "" : "s"}:`)}
|
|
502
526
|
`
|
|
503
527
|
);
|
|
504
528
|
for (const k of keys) {
|
|
505
|
-
const marker = k.label === active ?
|
|
529
|
+
const marker = k.label === active ? color5.green("\u25CF") : color5.dim("\u25CB");
|
|
506
530
|
deps.renderer.write(
|
|
507
|
-
` ${marker} ${k.label.padEnd(18)} ${maskedKey(k.apiKey)} ${
|
|
531
|
+
` ${marker} ${k.label.padEnd(18)} ${maskedKey(k.apiKey)} ${color5.dim(k.createdAt)}
|
|
508
532
|
`
|
|
509
533
|
);
|
|
510
534
|
}
|
|
511
535
|
}
|
|
512
536
|
deps.renderer.write("\n");
|
|
513
537
|
}
|
|
514
|
-
deps.renderer.write(
|
|
538
|
+
deps.renderer.write(color5.dim(`Manage: wstack auth Add key: wstack auth <provider>
|
|
515
539
|
`));
|
|
516
540
|
return 0;
|
|
517
541
|
}
|
|
@@ -527,7 +551,7 @@ async function runAuthStatus(deps, providerId) {
|
|
|
527
551
|
if (!cfg) {
|
|
528
552
|
deps.renderer.writeError(`Provider "${providerId}" not found in config.`);
|
|
529
553
|
deps.renderer.write(
|
|
530
|
-
|
|
554
|
+
color5.dim(`Run ${color5.bold("wstack auth list")} to see saved providers.
|
|
531
555
|
`)
|
|
532
556
|
);
|
|
533
557
|
return 1;
|
|
@@ -536,32 +560,32 @@ async function runAuthStatus(deps, providerId) {
|
|
|
536
560
|
const active = cfg.activeKey ?? keys[0]?.label;
|
|
537
561
|
const lines = [
|
|
538
562
|
`
|
|
539
|
-
${
|
|
563
|
+
${color5.bold(providerId)} ${cfg.family ? color5.dim(`[${cfg.family}]`) : color5.amber("[no family]")}`,
|
|
540
564
|
"",
|
|
541
|
-
` type: ${
|
|
542
|
-
` family: ${cfg.family ?
|
|
543
|
-
` baseUrl: ${cfg.baseUrl ?
|
|
565
|
+
` type: ${color5.cyan(cfg.type ?? providerId)}`,
|
|
566
|
+
` family: ${cfg.family ? color5.cyan(cfg.family) : color5.dim("unset")}`,
|
|
567
|
+
` baseUrl: ${cfg.baseUrl ? color5.cyan(cfg.baseUrl) : color5.dim("unset")}`
|
|
544
568
|
];
|
|
545
569
|
if (cfg.models?.length) {
|
|
546
|
-
lines.push(` models: ${
|
|
570
|
+
lines.push(` models: ${color5.cyan(cfg.models.join(", "))}`);
|
|
547
571
|
}
|
|
548
572
|
if (cfg.envVars?.length) {
|
|
549
|
-
lines.push(` envVars: ${
|
|
573
|
+
lines.push(` envVars: ${color5.cyan(cfg.envVars.join(", "))}`);
|
|
550
574
|
}
|
|
551
575
|
lines.push("");
|
|
552
576
|
if (keys.length === 0) {
|
|
553
|
-
lines.push(
|
|
577
|
+
lines.push(color5.amber(" (no keys saved)"));
|
|
554
578
|
} else {
|
|
555
|
-
lines.push(` ${
|
|
579
|
+
lines.push(` ${color5.dim("Keys:")}`);
|
|
556
580
|
for (const k of keys) {
|
|
557
|
-
const marker = k.label === active ?
|
|
581
|
+
const marker = k.label === active ? color5.green("\u25CF") : color5.dim("\u25CB");
|
|
558
582
|
lines.push(
|
|
559
|
-
` ${marker} ${
|
|
583
|
+
` ${marker} ${color5.bold(k.label.padEnd(18))} ${maskedKey(k.apiKey)} ${color5.dim(k.createdAt)}`
|
|
560
584
|
);
|
|
561
585
|
}
|
|
562
586
|
}
|
|
563
587
|
lines.push("");
|
|
564
|
-
lines.push(
|
|
588
|
+
lines.push(color5.dim(`Manage: wstack auth \u2192 pick ${providerId}`));
|
|
565
589
|
deps.renderer.write(lines.join("\n") + "\n");
|
|
566
590
|
return 0;
|
|
567
591
|
}
|
|
@@ -572,19 +596,19 @@ async function runAuthRemove(deps, providerId) {
|
|
|
572
596
|
return 1;
|
|
573
597
|
}
|
|
574
598
|
deps.renderer.write(
|
|
575
|
-
`${
|
|
599
|
+
`${color5.amber("!")} This will remove "${providerId}" and all its saved keys.
|
|
576
600
|
`
|
|
577
601
|
);
|
|
578
|
-
const answer = (await deps.reader.readLine(` ${
|
|
602
|
+
const answer = (await deps.reader.readLine(` ${color5.amber("?")} Confirm removal? ${color5.dim("[y/N]")} `)).trim().toLowerCase();
|
|
579
603
|
if (answer !== "y" && answer !== "yes") {
|
|
580
|
-
deps.renderer.write(
|
|
604
|
+
deps.renderer.write(color5.dim("Cancelled.\n"));
|
|
581
605
|
return 0;
|
|
582
606
|
}
|
|
583
607
|
try {
|
|
584
608
|
await mutateConfigProviders(deps.profileConfigPath, deps.vault, (all) => {
|
|
585
609
|
delete all[providerId];
|
|
586
610
|
});
|
|
587
|
-
deps.renderer.write(` ${
|
|
611
|
+
deps.renderer.write(` ${color5.green("\u2713")} Removed ${color5.bold(providerId)}.
|
|
588
612
|
`);
|
|
589
613
|
return 0;
|
|
590
614
|
} catch (err) {
|
|
@@ -595,4 +619,4 @@ async function runAuthRemove(deps, providerId) {
|
|
|
595
619
|
export {
|
|
596
620
|
authCmd
|
|
597
621
|
};
|
|
598
|
-
//# sourceMappingURL=auth-
|
|
622
|
+
//# sourceMappingURL=auth-XD3GN5RJ.js.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { CLAUDE_PROVIDER_ID, type ClaudeLoginOptions, type ClaudeTokens, runClaudeOAuthLogin, } from './anthropic-oauth.js';
|
|
2
2
|
export { runAuthDirect } from './direct.js';
|
|
3
|
+
export { providerAuthRegistryFor, providerAuthStrategiesFor, runProviderAuthLogin, } from './provider-auth-login.js';
|
|
3
4
|
export { COPILOT_PROVIDER_ID, type CopilotLoginOptions, runCopilotOAuthLogin, } from './github-copilot-oauth.js';
|
|
4
5
|
export { LOCAL_LLM_PRESETS, type LocalLlmPresetEntry, type ProbeOptions, type ProbeResult, probeLocalLlm, type RunAuthLocalOptions, resolveModelList, runAuthLocal, } from './local.js';
|
|
5
6
|
export { type OAuthMenuKind, resolveOAuthKind, runOAuthLoginChoice, runOAuthLoginKind, runOAuthLoginMenu, } from './oauth-menu.js';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { AuthMenuDeps } from './types.js';
|
|
2
2
|
/** Render subscription OAuth login choices shared by the top menu and add flow. */
|
|
3
3
|
export declare function renderOAuthLoginOptions(deps: AuthMenuDeps, indent?: string): void;
|
|
4
|
-
|
|
4
|
+
/** Strategy ids are runtime-extensible; this alias preserves the public CLI name. */
|
|
5
|
+
export type OAuthMenuKind = string;
|
|
5
6
|
/**
|
|
6
7
|
* Normalize a user-typed subscription name to an OAuth kind.
|
|
7
8
|
* `allowNumeric` enables the 1/2/3 menu picks (off for free-text prompts,
|
|
@@ -9,6 +10,7 @@ export type OAuthMenuKind = 'chatgpt' | 'claude' | 'copilot';
|
|
|
9
10
|
*/
|
|
10
11
|
export declare function resolveOAuthKind(choice: string, opts?: {
|
|
11
12
|
allowNumeric?: boolean;
|
|
13
|
+
deps?: AuthMenuDeps | undefined;
|
|
12
14
|
}): OAuthMenuKind | undefined;
|
|
13
15
|
/** Run an OAuth login for a normalized menu choice. Returns true when handled. */
|
|
14
16
|
export declare function runOAuthLoginChoice(deps: AuthMenuDeps, choice: string, opts?: {
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import type { ModelsRegistry, SecretScrubber, SecretVault } from '@wrongstack/core/types';
|
|
2
2
|
import type { AuthPanelHost } from '@wrongstack/tui';
|
|
3
|
+
import type { AuthMenuDeps } from './types.js';
|
|
3
4
|
export interface AuthPanelServiceDeps {
|
|
4
5
|
vault: SecretVault;
|
|
5
6
|
modelsRegistry: ModelsRegistry;
|
|
6
7
|
/** The sole config file read or written by auth operations. */
|
|
7
8
|
profileConfigPath: string;
|
|
8
9
|
secretScrubber?: SecretScrubber | undefined;
|
|
10
|
+
providerAuthRegistry?: AuthMenuDeps['providerAuthRegistry'];
|
|
9
11
|
/** Re-read the live provider snapshot after a successful auth mutation. */
|
|
10
12
|
onProvidersChanged?: (() => Promise<void>) | undefined;
|
|
11
13
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ProviderAuthRegistry } from '@wrongstack/core/registry';
|
|
2
|
+
import type { AuthMenuDeps } from './types.js';
|
|
3
|
+
type ProviderAuthRegistrySource = Pick<AuthMenuDeps, 'providerAuthRegistry'>;
|
|
4
|
+
export declare function providerAuthRegistryFor(deps: ProviderAuthRegistrySource): ProviderAuthRegistry;
|
|
5
|
+
/** UI-safe strategy metadata shared by the TUI auth panel and CLI menus. */
|
|
6
|
+
export declare function providerAuthStrategiesFor(deps: ProviderAuthRegistrySource): import("@wrongstack/core").ProviderAuthStrategyMetadata[];
|
|
7
|
+
export declare function runProviderAuthLogin(deps: AuthMenuDeps, strategyId: string, opts?: {
|
|
8
|
+
providerId?: string | undefined;
|
|
9
|
+
signal?: AbortSignal | undefined;
|
|
10
|
+
}): Promise<number>;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=provider-auth-login.d.ts.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ProviderAuthRegistry } from '@wrongstack/core/registry';
|
|
1
2
|
import type { ModelsRegistry, SecretScrubber, SecretVault } from '@wrongstack/core/types';
|
|
2
3
|
/**
|
|
3
4
|
* Minimal output surface the auth-menu flows need. `TerminalRenderer`
|
|
@@ -33,6 +34,8 @@ export interface AuthMenuDeps {
|
|
|
33
34
|
vault: SecretVault;
|
|
34
35
|
/** Active profile config path. Provider credentials never use the root bootstrap. */
|
|
35
36
|
profileConfigPath: string;
|
|
37
|
+
/** Shared registry when the runtime is active; defaults to the built-in strategies. */
|
|
38
|
+
providerAuthRegistry?: ProviderAuthRegistry | undefined;
|
|
36
39
|
/**
|
|
37
40
|
* Optional scrubber used by `wstack auth local` to redact Bearer
|
|
38
41
|
* tokens from probe logs before they reach the renderer. Falls back
|
|
@@ -22,6 +22,7 @@ export interface WebUIDispatchContext {
|
|
|
22
22
|
profileConfigPath: string;
|
|
23
23
|
projectSessionsDir: string;
|
|
24
24
|
modelsRegistry: ModelsRegistry;
|
|
25
|
+
providerAuthRegistry: import('@wrongstack/core/registry').ProviderAuthRegistry;
|
|
25
26
|
mcpRegistry: MCPRegistry;
|
|
26
27
|
brain: BrainArbiter | undefined;
|
|
27
28
|
brainSettings: {
|
|
@@ -87,6 +87,13 @@ interface BindSystemPromptBuilderDeps {
|
|
|
87
87
|
/** `config.systemPrompt.variant` — selects system.md, system-lite.md, or system-pro.md. */
|
|
88
88
|
systemPromptVariant?: SystemInstructionVariant | undefined;
|
|
89
89
|
paths: SystemPromptBuilderPaths;
|
|
90
|
+
/** Project root, for the Atlas brief. Omit to leave the brief out entirely. */
|
|
91
|
+
projectRoot?: string | undefined;
|
|
92
|
+
/** `config.indexing.atlas` — gates and budgets the session-start brief. */
|
|
93
|
+
atlas?: {
|
|
94
|
+
injectOnSessionStart?: boolean | undefined;
|
|
95
|
+
briefMaxTokens?: number | undefined;
|
|
96
|
+
} | undefined;
|
|
90
97
|
/**
|
|
91
98
|
* Optional narrow `domain-term` adapter for the prompt glossary block.
|
|
92
99
|
* The CLI provides a closure over the resolved SAGE `memoryStore` that
|
|
@@ -99,5 +99,12 @@ export declare function maybeRunSystemPromptMenu(opts: {
|
|
|
99
99
|
reader: ReadlineInputReader;
|
|
100
100
|
profileConfigPath: string;
|
|
101
101
|
paths: SystemPromptMenuPaths;
|
|
102
|
+
/**
|
|
103
|
+
* Persistence override — defaults to the real `persistSystemPromptVariant`.
|
|
104
|
+
* Test seam: lets the persistence-failure path be exercised deterministically
|
|
105
|
+
* on every platform instead of relying on chmod semantics, which Windows
|
|
106
|
+
* does not reliably honor for directory renames.
|
|
107
|
+
*/
|
|
108
|
+
persist?: typeof persistSystemPromptVariant | undefined;
|
|
102
109
|
}): Promise<SystemPromptMenuOutcome>;
|
|
103
110
|
//# sourceMappingURL=system-prompt-menu.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ProviderRegistry } from '@wrongstack/core/registry';
|
|
1
|
+
import type { ProviderAuthRegistry, ProviderRegistry } from '@wrongstack/core/registry';
|
|
2
2
|
import type { Config, Logger, ModelsRegistry, ResolvedProvider } from '@wrongstack/core/types';
|
|
3
3
|
type ModeId = string;
|
|
4
4
|
type ModePrompt = string;
|
|
@@ -12,6 +12,7 @@ type ResolvedModeResult = {
|
|
|
12
12
|
kind: 'ok';
|
|
13
13
|
resolvedProvider: ResolvedProvider;
|
|
14
14
|
providerRegistry: ProviderRegistry;
|
|
15
|
+
providerAuthRegistry: ProviderAuthRegistry;
|
|
15
16
|
provider: ReturnType<ProviderRegistry['create']>;
|
|
16
17
|
modeId: ModeId;
|
|
17
18
|
modePrompt: ModePrompt;
|
|
@@ -131,6 +131,6 @@ export declare function reviewerAttemptTimeoutMs(remainingMs: number, attemptTim
|
|
|
131
131
|
* Chimera reviewers only inspect code and return a report. They never repair
|
|
132
132
|
* files themselves; bug-hunter/security-scanner/fix agents own all mutations.
|
|
133
133
|
*/
|
|
134
|
-
export declare const CHIMERA_REVIEW_READ_ONLY_TOOLS: readonly ["read", "grep", "glob", "tree", "codebase-stats", "codebase-search", "codebase-skeleton", "codebase-repo-map", "codebase-incoming-calls", "codebase-outgoing-calls"];
|
|
134
|
+
export declare const CHIMERA_REVIEW_READ_ONLY_TOOLS: readonly ["read", "grep", "glob", "tree", "codebase-stats", "codebase-search", "codebase-skeleton", "codebase-context", "codebase-repo-map", "codebase-incoming-calls", "codebase-outgoing-calls"];
|
|
135
135
|
export declare function applyChimeraReviewerReadOnlyPolicy(config: SubagentConfig): SubagentConfig;
|
|
136
136
|
//# sourceMappingURL=chimera-reviewer-policy.d.ts.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-FPIWTJ2G.js";
|
|
5
5
|
import {
|
|
6
6
|
parseArgs
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-E6RFXHWD.js";
|
|
8
8
|
|
|
9
9
|
// src/boot/short-circuit-flags.ts
|
|
10
10
|
async function handleHelpVersionShortCircuit(argv) {
|
|
@@ -22,7 +22,7 @@ async function handleHelpVersionShortCircuit(argv) {
|
|
|
22
22
|
}
|
|
23
23
|
if (earlyFlags["help"] === true) {
|
|
24
24
|
if (positional.length > 0) {
|
|
25
|
-
const { subcommandNames } = await import("./subcommands-
|
|
25
|
+
const { subcommandNames } = await import("./subcommands-CUTGBDKP.js");
|
|
26
26
|
if (subcommandNames.includes(positional[0])) {
|
|
27
27
|
const first = positional[0];
|
|
28
28
|
const deep = positional[1];
|
|
@@ -43,4 +43,4 @@ async function handleHelpVersionShortCircuit(argv) {
|
|
|
43
43
|
export {
|
|
44
44
|
handleHelpVersionShortCircuit
|
|
45
45
|
};
|
|
46
|
-
//# sourceMappingURL=chunk-
|
|
46
|
+
//# sourceMappingURL=chunk-4NHD5OXJ.js.map
|