@wrongstack/cli 1.0.1 → 1.0.4
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-AB54FWM2.js} +122 -39
- package/dist/acp-agent-list.d.ts +14 -0
- package/dist/acp-hq-telemetry.d.ts +9 -2
- package/dist/acp-mcp-servers.d.ts +49 -0
- package/dist/acp-server-agent.d.ts +18 -6
- package/dist/{auth-ZUMCDNE5.js → auth-WDMSNZ3S.js} +79 -55
- 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/short-circuit-hq.d.ts +2 -0
- package/dist/boot/system-prompt-builder.d.ts +7 -0
- package/dist/boot/system-prompt.d.ts +2 -1
- package/dist/boot/tool-registry.d.ts +18 -1
- package/dist/chimera-reviewer-policy.d.ts +1 -1
- package/dist/{chunk-C2E24IXZ.js → chunk-3I5ZJXM5.js} +147 -241
- package/dist/{chunk-JHPXJRRI.js → chunk-4XCBEUBX.js} +13 -3
- package/dist/{chunk-FPIWTJ2G.js → chunk-6WRKAACA.js} +4 -4
- package/dist/chunk-AUQDGU5D.js +32 -0
- package/dist/{chunk-D2VCUN7M.js → chunk-BIWE22O5.js} +17 -17
- package/dist/{chunk-VOTTENR5.js → chunk-CDY4D5QK.js} +2 -2
- package/dist/chunk-D5GB5MHA.js +87 -0
- package/dist/chunk-DAKVBMD4.js +36 -0
- package/dist/{chunk-E6RFXHWD.js → chunk-EK2P53GL.js} +3 -2
- package/dist/chunk-I7V2OYVH.js +242 -0
- package/dist/{chunk-MXEJEYT7.js → chunk-JX6KL7OF.js} +15 -5
- package/dist/{chunk-ZSZ3EYWH.js → chunk-KEPABQYT.js} +109 -6
- package/dist/{chunk-IMWXXF4J.js → chunk-KNMIBKLV.js} +79 -1
- package/dist/{chunk-MNQQ4ZNF.js → chunk-ONOT5OJ2.js} +290 -687
- package/dist/chunk-Q7E3BPDU.js +62 -0
- package/dist/chunk-SIGUWXAA.js +43 -0
- package/dist/{chunk-TEBMCYZN.js → chunk-SIS37L3W.js} +58 -2
- package/dist/{chunk-KHWDTNBZ.js → chunk-U6PGWDMZ.js} +5 -5
- package/dist/{chunk-5IA5337I.js → chunk-XJ7K67PP.js} +8 -2
- package/dist/{cli-context-7X3M6U73.js → cli-context-WFC3BNGM.js} +131 -25
- package/dist/{cli-main-53KG6HAV.js → cli-main-GU3YZLMO.js} +3986 -2827
- package/dist/{diag-doctor-7LYUYU35.js → diag-doctor-PCER6KHH.js} +2 -2
- package/dist/execute-deps.d.ts +1 -0
- package/dist/{execution-MIBWBYB6.js → execution-RAZDDQFC.js} +115 -16
- package/dist/execution-specialist-trigger.d.ts +28 -0
- package/dist/fleet/acp-live-progress.d.ts +19 -0
- package/dist/fleet/host-acp-runner-cache.d.ts +3 -1
- package/dist/fleet/host-acp.d.ts +14 -2
- package/dist/fleet/host.d.ts +1 -0
- package/dist/{hq-IG3YRGCO.js → hq-5XHEIIH6.js} +127 -8
- package/dist/hq-command-controller.d.ts +31 -2
- package/dist/hq-server/client-address.d.ts +2 -0
- package/dist/hq-server/ip-allowlist.d.ts +16 -0
- package/dist/hq-server/preflight.d.ts +1 -0
- package/dist/hq-server/routes/auth/password-routes.d.ts +1 -1
- package/dist/hq-server/routes.d.ts +5 -4
- package/dist/hq-server/secret-input.d.ts +7 -0
- package/dist/hq-server/types.d.ts +3 -2
- package/dist/hq-server/upgrade-handler.d.ts +2 -0
- package/dist/hq-server/utils.d.ts +6 -0
- package/dist/{hq-server-OILU3NPI.js → hq-server-CNUTBWTK.js} +4 -3
- package/dist/hq-server.d.ts +4 -0
- package/dist/hq-service-L5INQFM4.js +507 -0
- package/dist/hq-service.d.ts +22 -0
- package/dist/index.js +4 -4
- package/dist/ip-allowlist-NHXO6AKJ.js +9 -0
- package/dist/live-settings-input.d.ts +4 -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/{per-subcommand-help-BWBHYVJO.js → per-subcommand-help-DHTYU524.js} +2 -2
- package/dist/{plugin-usage-HFBI3TFT.js → plugin-usage-M6KET4OZ.js} +2 -2
- package/dist/{plugins-PZ2VZL7V.js → plugins-WJLW6ULV.js} +3 -3
- package/dist/projects-LMNAGGEU.js +36 -0
- package/dist/{providers-models-YVMVYWRS.js → providers-models-6MOGAOVK.js} +2 -2
- package/dist/{proxy-wiring-MGRSKZZB.js → proxy-wiring-K2DORFFL.js} +3 -3
- package/dist/short-circuit-flags-YDMLAQ5R.js +10 -0
- package/dist/slash-commands/acp.d.ts +3 -0
- package/dist/slash-commands/codebase-map.d.ts +11 -0
- package/dist/slash-commands/command-context.d.ts +29 -0
- package/dist/slash-commands/context.d.ts +10 -0
- package/dist/slash-commands/ensemble.d.ts +1 -1
- package/dist/slash-commands/openai-quota.d.ts +31 -0
- package/dist/slash-commands/profile.d.ts +7 -0
- package/dist/subcommands/handlers/hq.d.ts +1 -0
- package/dist/subcommands/handlers/projects.d.ts +14 -0
- package/dist/{subcommands-WJLBHVKC.js → subcommands-7N4RIK6H.js} +2 -2
- package/dist/{version-help-MYKF724O.js → version-help-WXI42PZ3.js} +2 -2
- package/dist/{webui-server-5R35BHWZ.js → webui-server-OBV5JYJV.js} +27 -4
- 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/cli-slash-commands-setup.d.ts +7 -0
- package/dist/wiring/codebase-embeddings.d.ts +31 -0
- package/dist/wiring/command-host-state.d.ts +9 -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/pipeline.d.ts +2 -0
- package/dist/wiring/plugins.d.ts +2 -1
- package/dist/wiring/provider-runtime-setup.d.ts +1 -1
- package/dist/wiring/provider.d.ts +2 -1
- package/dist/wiring/session-command-handlers.d.ts +2 -1
- package/dist/wiring/slash-commands.d.ts +1 -0
- package/package.json +29 -29
- package/dist/auto-discover-providers-VQU3IZMR.js +0 -7
- package/dist/chunk-52C7PD2H.js +0 -61
- package/dist/chunk-Q5GTM25S.js +0 -17
- package/dist/chunk-TNK6237M.js +0 -262
- package/dist/projects-L6C6XLDY.js +0 -37
- package/dist/short-circuit-flags-UREFSYBL.js +0 -10
|
@@ -2,7 +2,105 @@ import {
|
|
|
2
2
|
fallbackCodexProviderModels,
|
|
3
3
|
filterCurrentCodexModelIds,
|
|
4
4
|
isCodexCatalogModel
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-SIGUWXAA.js";
|
|
6
|
+
|
|
7
|
+
// src/acp-agent-list.ts
|
|
8
|
+
import { REGISTRY_ID_ALIASES } from "@wrongstack/acp";
|
|
9
|
+
function reverseAliases(aliases = REGISTRY_ID_ALIASES) {
|
|
10
|
+
const out = {};
|
|
11
|
+
for (const [ours, theirs] of Object.entries(aliases)) {
|
|
12
|
+
if (ours !== theirs) out[theirs] = ours;
|
|
13
|
+
}
|
|
14
|
+
return out;
|
|
15
|
+
}
|
|
16
|
+
function distKind(command) {
|
|
17
|
+
if (command === "npx") return "npx";
|
|
18
|
+
if (command === "uvx") return "uvx";
|
|
19
|
+
return "local";
|
|
20
|
+
}
|
|
21
|
+
function localProbe(registryId, alias, detectedById) {
|
|
22
|
+
return detectedById.get(registryId) ?? (alias ? detectedById.get(alias) : void 0);
|
|
23
|
+
}
|
|
24
|
+
function formatRegistryRow(agent, alias, local, idWidth) {
|
|
25
|
+
const kind = distKind(agent.acp.command);
|
|
26
|
+
const aliasBit = alias ? ` (also ${alias})` : "";
|
|
27
|
+
if (kind === "local") {
|
|
28
|
+
if (local?.installed) {
|
|
29
|
+
const ver = local.version?.split("\n")[0]?.trim();
|
|
30
|
+
const note2 = ver ? ` ${ver}` : " on PATH";
|
|
31
|
+
return ` \u2713 ${agent.id.padEnd(idWidth)} ${agent.displayName}${aliasBit}${note2}`;
|
|
32
|
+
}
|
|
33
|
+
const reason = local?.reason ?? "not on PATH";
|
|
34
|
+
return ` \u2717 ${agent.id.padEnd(idWidth)} ${agent.displayName}${aliasBit} (${reason})`;
|
|
35
|
+
}
|
|
36
|
+
const pkg = (agent.acp.args ?? []).find((a) => a !== "-y" && !a.startsWith("--"));
|
|
37
|
+
const note = pkg ? `${kind} ${pkg}` : kind;
|
|
38
|
+
return ` \u25B8 ${agent.id.padEnd(idWidth)} ${agent.displayName}${aliasBit} ${note}`;
|
|
39
|
+
}
|
|
40
|
+
function formatAcpAgentList(opts) {
|
|
41
|
+
const { live, detected } = opts;
|
|
42
|
+
const detectedById = new Map(detected.map((d) => [d.id, d]));
|
|
43
|
+
if (live && live.agents.length > 0) {
|
|
44
|
+
const aliasOf = reverseAliases();
|
|
45
|
+
const when = live.fetchedAt ? live.fetchedAt.slice(0, 19).replace("T", " ") : "locally";
|
|
46
|
+
const rows = [...live.agents].sort((a, b) => {
|
|
47
|
+
const rank = (command) => {
|
|
48
|
+
const k = distKind(command);
|
|
49
|
+
return k === "local" ? 0 : k === "uvx" ? 1 : 2;
|
|
50
|
+
};
|
|
51
|
+
const r = rank(a.acp.command) - rank(b.acp.command);
|
|
52
|
+
return r !== 0 ? r : a.id.localeCompare(b.id);
|
|
53
|
+
});
|
|
54
|
+
const idWidth = Math.max(16, ...rows.map((a) => a.id.length));
|
|
55
|
+
const lines2 = [
|
|
56
|
+
`Official ACP registry \u2014 ${live.agents.length} agents (synced ${when}).`,
|
|
57
|
+
"Spawn ids below are what `/acp <id> <task>` and `/acp <id> --bg` accept.",
|
|
58
|
+
""
|
|
59
|
+
];
|
|
60
|
+
for (const agent of rows) {
|
|
61
|
+
const alias = aliasOf[agent.id];
|
|
62
|
+
lines2.push(
|
|
63
|
+
formatRegistryRow(agent, alias, localProbe(agent.id, alias, detectedById), idWidth)
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
const leftover = detected.filter((d) => {
|
|
67
|
+
if (live.byId[d.id]) return false;
|
|
68
|
+
const mapped = REGISTRY_ID_ALIASES[d.id];
|
|
69
|
+
return !(mapped && live.byId[mapped]);
|
|
70
|
+
});
|
|
71
|
+
if (leftover.length > 0) {
|
|
72
|
+
lines2.push("");
|
|
73
|
+
lines2.push("Bundled extras (not in the official registry \u2014 experimental):");
|
|
74
|
+
for (const d of leftover) {
|
|
75
|
+
const mark = d.installed ? "\u2713" : "\u2717";
|
|
76
|
+
const extra = d.installed ? d.version?.split("\n")[0] ?? "" : d.reason ?? "not installed";
|
|
77
|
+
lines2.push(` ${mark} ${d.id.padEnd(16)} ${d.displayName} (${extra})`);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
lines2.push("");
|
|
81
|
+
lines2.push(
|
|
82
|
+
"Spawn: /acp <id> <task> Background: /acp <id> --bg <task> Probe: /acp probe <id>"
|
|
83
|
+
);
|
|
84
|
+
return lines2.join("\n");
|
|
85
|
+
}
|
|
86
|
+
const installed = detected.filter((a) => a.installed);
|
|
87
|
+
const missing = detected.filter((a) => !a.installed);
|
|
88
|
+
const lines = [
|
|
89
|
+
"Bundled offline catalog (not the official registry).",
|
|
90
|
+
"Run `/acp sync` to replace this list with agentclientprotocol/registry.",
|
|
91
|
+
""
|
|
92
|
+
];
|
|
93
|
+
for (const a of installed) {
|
|
94
|
+
const ver = a.version ? ` (${a.version.split("\n")[0]})` : "";
|
|
95
|
+
lines.push(` \u2713 ${a.id.padEnd(16)} ${a.displayName}${ver}`);
|
|
96
|
+
}
|
|
97
|
+
for (const a of missing) {
|
|
98
|
+
lines.push(` \u2717 ${a.id.padEnd(16)} ${a.displayName} (${a.reason ?? "not installed"})`);
|
|
99
|
+
}
|
|
100
|
+
lines.push("");
|
|
101
|
+
lines.push(`${installed.length} of ${detected.length} bundled agents installed locally.`);
|
|
102
|
+
return lines.join("\n");
|
|
103
|
+
}
|
|
6
104
|
|
|
7
105
|
// src/acp-registry-cache.ts
|
|
8
106
|
import * as fs from "node:fs/promises";
|
|
@@ -163,7 +261,7 @@ function createGracefulShutdown(cleanup) {
|
|
|
163
261
|
}
|
|
164
262
|
|
|
165
263
|
// src/wiring/provider.ts
|
|
166
|
-
import { ProviderRegistry } from "@wrongstack/core/registry";
|
|
264
|
+
import { ProviderAuthRegistry, ProviderRegistry } from "@wrongstack/core/registry";
|
|
167
265
|
import { ConfigError } from "@wrongstack/core/types";
|
|
168
266
|
import {
|
|
169
267
|
buildProviderFactoriesFromRegistry,
|
|
@@ -175,15 +273,19 @@ import {
|
|
|
175
273
|
setupProviderResolved,
|
|
176
274
|
withCatalogCapabilities
|
|
177
275
|
} from "@wrongstack/providers";
|
|
276
|
+
import { registerBuiltinProviderAuthStrategies } from "@wrongstack/providers/oauth";
|
|
178
277
|
async function setupProvider(params) {
|
|
179
278
|
const { config, modelsRegistry, logger } = params;
|
|
279
|
+
const providerAuthRegistry = new ProviderAuthRegistry();
|
|
280
|
+
registerBuiltinProviderAuthStrategies(providerAuthRegistry);
|
|
180
281
|
if (isSetupProvider(config.provider)) {
|
|
181
282
|
const providerRegistry2 = new ProviderRegistry();
|
|
182
283
|
providerRegistry2.register(createSetupProviderFactory());
|
|
183
284
|
return {
|
|
184
285
|
resolvedProvider: setupProviderResolved(),
|
|
185
286
|
provider: providerRegistry2.create({ type: config.provider }),
|
|
186
|
-
providerRegistry: providerRegistry2
|
|
287
|
+
providerRegistry: providerRegistry2,
|
|
288
|
+
providerAuthRegistry
|
|
187
289
|
};
|
|
188
290
|
}
|
|
189
291
|
const savedProviderCfg = config.providers?.[config.provider];
|
|
@@ -257,7 +359,7 @@ async function setupProvider(params) {
|
|
|
257
359
|
} catch (err) {
|
|
258
360
|
throw new ConfigError({
|
|
259
361
|
message: `Failed to load models.dev registry: ${err instanceof Error ? err.message : err}
|
|
260
|
-
Try \`wstack models refresh\` once you have network access
|
|
362
|
+
Try \`wstack models refresh\` once you have network access.`,
|
|
261
363
|
code: "CONFIG_INVALID",
|
|
262
364
|
context: { phase: "registry-build", provider: config.provider },
|
|
263
365
|
cause: err
|
|
@@ -296,10 +398,11 @@ Try \`wstack models refresh\` once you have network access, or run with --no-fea
|
|
|
296
398
|
logger
|
|
297
399
|
);
|
|
298
400
|
}
|
|
299
|
-
return { resolvedProvider, provider, providerRegistry };
|
|
401
|
+
return { resolvedProvider, provider, providerRegistry, providerAuthRegistry };
|
|
300
402
|
}
|
|
301
403
|
|
|
302
404
|
export {
|
|
405
|
+
formatAcpAgentList,
|
|
303
406
|
loadCachedAcpRegistry,
|
|
304
407
|
refreshAcpRegistry,
|
|
305
408
|
resolveProviderCfg,
|
|
@@ -307,4 +410,4 @@ export {
|
|
|
307
410
|
setupProvider,
|
|
308
411
|
createGracefulShutdown
|
|
309
412
|
};
|
|
310
|
-
//# sourceMappingURL=chunk-
|
|
413
|
+
//# sourceMappingURL=chunk-KEPABQYT.js.map
|
|
@@ -1,5 +1,42 @@
|
|
|
1
1
|
|
|
2
2
|
// src/hq-command-controller.ts
|
|
3
|
+
function createProjectKanbanTransitionHandler(projectRoot) {
|
|
4
|
+
return async (input) => {
|
|
5
|
+
const { transitionTask } = await import("@wrongstack/kanban");
|
|
6
|
+
const result = await transitionTask(projectRoot, input.boardId, input.taskId, {
|
|
7
|
+
to: input.to,
|
|
8
|
+
actor: "hq-operator",
|
|
9
|
+
comment: input.comment,
|
|
10
|
+
sessionId: input.sessionId ?? "hq-mobile"
|
|
11
|
+
});
|
|
12
|
+
if (result === null) throw new Error(`kanban task not found: ${input.taskId}`);
|
|
13
|
+
return `task ${input.taskId} transitioned to ${input.to}`;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
function createProjectKanbanAssignHandler(projectRoot) {
|
|
17
|
+
return async (input) => {
|
|
18
|
+
const { assignTask } = await import("@wrongstack/kanban");
|
|
19
|
+
const result = await assignTask(
|
|
20
|
+
projectRoot,
|
|
21
|
+
input.boardId,
|
|
22
|
+
input.taskId,
|
|
23
|
+
{
|
|
24
|
+
agentId: input.agentId,
|
|
25
|
+
name: input.assignee,
|
|
26
|
+
assignee: input.assignee,
|
|
27
|
+
status: "assigned",
|
|
28
|
+
protectActiveAssignment: true
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
actor: "hq-operator",
|
|
32
|
+
note: input.comment,
|
|
33
|
+
sessionId: input.sessionId ?? "hq-mobile"
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
if (result === null) throw new Error(`kanban task not found: ${input.taskId}`);
|
|
37
|
+
return `task ${input.taskId} assigned to ${input.assignee}`;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
3
40
|
function createHqCommandDispatcher(controller) {
|
|
4
41
|
return async (command) => {
|
|
5
42
|
const cmd = command;
|
|
@@ -159,6 +196,45 @@ async function dispatch(controller, commandId, type, payload) {
|
|
|
159
196
|
const subagentId = await controller.spawnAgent(role, task, maxIterations, sessionId);
|
|
160
197
|
return { commandId, status: "completed", message: `spawned ${subagentId}` };
|
|
161
198
|
}
|
|
199
|
+
case "kanban-transition": {
|
|
200
|
+
if (controller.kanbanTransition === void 0) {
|
|
201
|
+
return { commandId, status: "rejected", message: "kanban control is unavailable" };
|
|
202
|
+
}
|
|
203
|
+
const message = await controller.kanbanTransition({
|
|
204
|
+
boardId: payload["boardId"],
|
|
205
|
+
taskId: payload["taskId"],
|
|
206
|
+
to: payload["to"],
|
|
207
|
+
comment: payload["comment"],
|
|
208
|
+
...sessionId !== void 0 ? { sessionId } : {}
|
|
209
|
+
});
|
|
210
|
+
return { commandId, status: "completed", message };
|
|
211
|
+
}
|
|
212
|
+
case "kanban-assign": {
|
|
213
|
+
if (controller.kanbanAssign === void 0) {
|
|
214
|
+
return { commandId, status: "rejected", message: "kanban assignment is unavailable" };
|
|
215
|
+
}
|
|
216
|
+
const message = await controller.kanbanAssign({
|
|
217
|
+
boardId: payload["boardId"],
|
|
218
|
+
taskId: payload["taskId"],
|
|
219
|
+
agentId: payload["agentId"],
|
|
220
|
+
assignee: payload["assignee"],
|
|
221
|
+
comment: payload["comment"],
|
|
222
|
+
...sessionId !== void 0 ? { sessionId } : {}
|
|
223
|
+
});
|
|
224
|
+
return { commandId, status: "completed", message };
|
|
225
|
+
}
|
|
226
|
+
case "kanban-dispatch": {
|
|
227
|
+
if (controller.kanbanDispatch === void 0) {
|
|
228
|
+
return { commandId, status: "rejected", message: "kanban dispatch is unavailable" };
|
|
229
|
+
}
|
|
230
|
+
const message = await controller.kanbanDispatch({
|
|
231
|
+
boardId: payload["boardId"],
|
|
232
|
+
taskId: payload["taskId"],
|
|
233
|
+
comment: payload["comment"],
|
|
234
|
+
...sessionId !== void 0 ? { sessionId } : {}
|
|
235
|
+
});
|
|
236
|
+
return { commandId, status: "completed", message };
|
|
237
|
+
}
|
|
162
238
|
case "run-command": {
|
|
163
239
|
if (!controller.allowRunCommand()) {
|
|
164
240
|
return {
|
|
@@ -194,6 +270,8 @@ ${command}
|
|
|
194
270
|
}
|
|
195
271
|
|
|
196
272
|
export {
|
|
273
|
+
createProjectKanbanTransitionHandler,
|
|
274
|
+
createProjectKanbanAssignHandler,
|
|
197
275
|
createHqCommandDispatcher
|
|
198
276
|
};
|
|
199
|
-
//# sourceMappingURL=chunk-
|
|
277
|
+
//# sourceMappingURL=chunk-KNMIBKLV.js.map
|