@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
package/dist/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from "./chunk-XJXDOF63.js";
|
|
9
9
|
import {
|
|
10
10
|
parseArgs
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-EK2P53GL.js";
|
|
12
12
|
|
|
13
13
|
// src/cli-entry-main.ts
|
|
14
14
|
async function main(argv) {
|
|
@@ -16,14 +16,14 @@ async function main(argv) {
|
|
|
16
16
|
applySessionShellDefault();
|
|
17
17
|
const earlyFlags = parseArgs(argv).flags;
|
|
18
18
|
if (earlyFlags["help"] === true || earlyFlags["version"] === true) {
|
|
19
|
-
const { handleHelpVersionShortCircuit } = await import("./short-circuit-flags-
|
|
19
|
+
const { handleHelpVersionShortCircuit } = await import("./short-circuit-flags-YDMLAQ5R.js");
|
|
20
20
|
const earlyExit = await handleHelpVersionShortCircuit(argv);
|
|
21
21
|
if (earlyExit !== null) return earlyExit;
|
|
22
22
|
}
|
|
23
|
-
const { initializeCli } = await import("./cli-context-
|
|
23
|
+
const { initializeCli } = await import("./cli-context-WFC3BNGM.js");
|
|
24
24
|
const cliCtx = await initializeCli(argv);
|
|
25
25
|
if (typeof cliCtx === "number") return cliCtx;
|
|
26
|
-
const { runInteractive } = await import("./cli-main-
|
|
26
|
+
const { runInteractive } = await import("./cli-main-GU3YZLMO.js");
|
|
27
27
|
return runInteractive(cliCtx);
|
|
28
28
|
}
|
|
29
29
|
|
|
@@ -39,6 +39,8 @@ export interface LiveSettingsInput {
|
|
|
39
39
|
enhanceDelayMs?: number | undefined;
|
|
40
40
|
enhanceEnabled?: boolean | undefined;
|
|
41
41
|
enhanceLanguage?: string | undefined;
|
|
42
|
+
/** Pre-refine grace period (seconds) before the refiner LLM call starts. 0 = skip. Default: 3. */
|
|
43
|
+
preRefineSeconds?: number | undefined;
|
|
42
44
|
/** Mid-run send-mode picker (queue/btw/steer) toggle. Default on. */
|
|
43
45
|
midRunSendPicker?: boolean | undefined;
|
|
44
46
|
/** Skip the confirmation prompt for the TUI `!<command>` shell shortcut. */
|
|
@@ -65,6 +67,8 @@ export interface LiveSettingsInput {
|
|
|
65
67
|
cacheTtl?: 'default' | '5m' | '1h' | undefined;
|
|
66
68
|
/** Show "Model Reasoning" blocks in chat history. Default: true. */
|
|
67
69
|
showModelReasoning?: boolean | undefined;
|
|
70
|
+
/** Default presentation density for committed TUI tool results. */
|
|
71
|
+
toolResultViewMode?: 'minimal' | 'normal' | 'full' | undefined;
|
|
68
72
|
/** Agent swarm panel placement: 'bottom' (lower region), 'sidebar' (right sidebar), or 'off' (hidden).
|
|
69
73
|
* Backward-compat: legacy boolean values are coerced by the TUI settings adapter. Default: 'bottom'. */
|
|
70
74
|
showAgentSwarmPanel?: 'bottom' | 'sidebar' | 'off' | boolean | undefined;
|
|
@@ -114,8 +114,9 @@ or stop the conflicting process and retry.
|
|
|
114
114
|
credentialStore,
|
|
115
115
|
projectId,
|
|
116
116
|
authorize: (request) => {
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
const header = request.headers.authorization;
|
|
118
|
+
if (typeof header === "string" && /^Credential\s+/i.test(header)) {
|
|
119
|
+
return void 0;
|
|
119
120
|
}
|
|
120
121
|
return authorizeMailboxBearerToken(request, tentative.token);
|
|
121
122
|
},
|
|
@@ -359,4 +360,4 @@ function printHelp(deps) {
|
|
|
359
360
|
export {
|
|
360
361
|
mailboxServeCmd
|
|
361
362
|
};
|
|
362
|
-
//# sourceMappingURL=mailbox-serve-
|
|
363
|
+
//# sourceMappingURL=mailbox-serve-X3CR6VFW.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
discoverAndMergeProviders
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-D5GB5MHA.js";
|
|
4
4
|
import {
|
|
5
5
|
activeProfileConfigPath
|
|
6
6
|
} from "./chunk-YMXXOOFN.js";
|
|
@@ -1081,30 +1081,37 @@ async function runModeldiagTest(args, deps, config) {
|
|
|
1081
1081
|
// src/subcommands/handlers/modeldiag.ts
|
|
1082
1082
|
async function readProviders(cachePath) {
|
|
1083
1083
|
if (!cachePath) {
|
|
1084
|
-
return `${color5.red("Models cache not available")}
|
|
1084
|
+
return { ok: false, message: `${color5.red("Models cache not available")}.`, hard: true };
|
|
1085
1085
|
}
|
|
1086
1086
|
try {
|
|
1087
1087
|
const raw = await fs.readFile(cachePath, "utf8");
|
|
1088
1088
|
const parsed = JSON.parse(raw);
|
|
1089
1089
|
const payload = parsed.payload ?? parsed;
|
|
1090
|
-
return
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1090
|
+
return {
|
|
1091
|
+
ok: true,
|
|
1092
|
+
providers: Object.entries(payload).map(([id, p]) => ({
|
|
1093
|
+
id: p.id ?? id,
|
|
1094
|
+
name: p.name ?? id,
|
|
1095
|
+
family: p.npm ?? id,
|
|
1096
|
+
models: Object.values(p.models ?? {}).map(
|
|
1097
|
+
(m) => ({
|
|
1098
|
+
id: m.id,
|
|
1099
|
+
name: m.name,
|
|
1100
|
+
capabilities: {
|
|
1101
|
+
contextWindow: m.limit?.context,
|
|
1102
|
+
maxOutputTokens: m.limit?.output
|
|
1103
|
+
},
|
|
1104
|
+
pricing: m.cost
|
|
1105
|
+
})
|
|
1106
|
+
)
|
|
1107
|
+
}))
|
|
1108
|
+
};
|
|
1106
1109
|
} catch {
|
|
1107
|
-
return
|
|
1110
|
+
return {
|
|
1111
|
+
ok: false,
|
|
1112
|
+
message: `${color5.amber("Models cache not available")}. Run wstack sync-models.`,
|
|
1113
|
+
hard: false
|
|
1114
|
+
};
|
|
1108
1115
|
}
|
|
1109
1116
|
}
|
|
1110
1117
|
function checkHasKey(pid, config) {
|
|
@@ -1118,12 +1125,12 @@ function checkHasKey(pid, config) {
|
|
|
1118
1125
|
var modeldiagCmd = async (args, deps) => {
|
|
1119
1126
|
const sub = args[0]?.toLowerCase() || "full";
|
|
1120
1127
|
const cacheResult = await readProviders(deps.paths.modelsCache);
|
|
1121
|
-
if (
|
|
1122
|
-
deps.renderer.write(`${cacheResult}
|
|
1128
|
+
if (!cacheResult.ok) {
|
|
1129
|
+
deps.renderer.write(`${cacheResult.message}
|
|
1123
1130
|
`);
|
|
1124
|
-
return cacheResult.
|
|
1131
|
+
return cacheResult.hard ? 1 : 0;
|
|
1125
1132
|
}
|
|
1126
|
-
const providers = cacheResult;
|
|
1133
|
+
const providers = cacheResult.providers;
|
|
1127
1134
|
const config = deps.config;
|
|
1128
1135
|
const modelMatrix = config.modelMatrix ?? {};
|
|
1129
1136
|
function hasKey(pid) {
|
|
@@ -1322,4 +1329,4 @@ var modeldiagCmd = async (args, deps) => {
|
|
|
1322
1329
|
export {
|
|
1323
1330
|
modeldiagCmd
|
|
1324
1331
|
};
|
|
1325
|
-
//# sourceMappingURL=modeldiag-
|
|
1332
|
+
//# sourceMappingURL=modeldiag-46CMWUNM.js.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
renderFocusedHelpToString,
|
|
8
8
|
renderGenericHelp,
|
|
9
9
|
subcommandsWithFocusedHelp
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-JX6KL7OF.js";
|
|
11
11
|
import "./chunk-2VMJ3E5Z.js";
|
|
12
12
|
export {
|
|
13
13
|
deepSubcommandsWithFocusedHelp,
|
|
@@ -19,4 +19,4 @@ export {
|
|
|
19
19
|
renderGenericHelp,
|
|
20
20
|
subcommandsWithFocusedHelp
|
|
21
21
|
};
|
|
22
|
-
//# sourceMappingURL=per-subcommand-help-
|
|
22
|
+
//# sourceMappingURL=per-subcommand-help-DHTYU524.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runPluginManagementCommand
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SIS37L3W.js";
|
|
4
4
|
import {
|
|
5
5
|
restoreFlags
|
|
6
6
|
} from "./chunk-CSAPOCBP.js";
|
|
@@ -40,4 +40,4 @@ export {
|
|
|
40
40
|
pluginCmd,
|
|
41
41
|
usageCmd
|
|
42
42
|
};
|
|
43
|
-
//# sourceMappingURL=plugin-usage-
|
|
43
|
+
//# sourceMappingURL=plugin-usage-M6KET4OZ.js.map
|
|
@@ -6,9 +6,9 @@ import {
|
|
|
6
6
|
pluginNameFromSpec,
|
|
7
7
|
setupPlugins,
|
|
8
8
|
warnIfDeprecatedPluginName
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-XJ7K67PP.js";
|
|
10
10
|
import "./chunk-EWKESL4L.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-SIS37L3W.js";
|
|
12
12
|
export {
|
|
13
13
|
BUILTIN_PLUGIN_FACTORIES,
|
|
14
14
|
DEPRECATED_PLUGIN_NAMES,
|
|
@@ -18,4 +18,4 @@ export {
|
|
|
18
18
|
setupPlugins,
|
|
19
19
|
warnIfDeprecatedPluginName
|
|
20
20
|
};
|
|
21
|
-
//# sourceMappingURL=plugins-
|
|
21
|
+
//# sourceMappingURL=plugins-WJLW6ULV.js.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
// src/subcommands/handlers/projects.ts
|
|
3
|
+
import * as fs from "node:fs/promises";
|
|
4
|
+
import * as path from "node:path";
|
|
5
|
+
import { color } from "@wrongstack/core/utils";
|
|
6
|
+
var projectsCmd = async (_args, deps) => {
|
|
7
|
+
const manifestPath = path.join(deps.paths.globalRoot, "projects.json");
|
|
8
|
+
let entries;
|
|
9
|
+
try {
|
|
10
|
+
const parsed = JSON.parse(await fs.readFile(manifestPath, "utf8"));
|
|
11
|
+
entries = Array.isArray(parsed.projects) ? parsed.projects : [];
|
|
12
|
+
} catch {
|
|
13
|
+
deps.renderer.write("No projects tracked yet.\n");
|
|
14
|
+
return 0;
|
|
15
|
+
}
|
|
16
|
+
if (entries.length === 0) {
|
|
17
|
+
deps.renderer.write("No projects tracked yet.\n");
|
|
18
|
+
return 0;
|
|
19
|
+
}
|
|
20
|
+
const sorted = [...entries].sort((a, b) => (b.lastSeen ?? "").localeCompare(a.lastSeen ?? ""));
|
|
21
|
+
const slugWidth = Math.min(
|
|
22
|
+
Math.max(...sorted.map((entry) => (entry.slug ?? "").length), 4),
|
|
23
|
+
40
|
|
24
|
+
);
|
|
25
|
+
for (const entry of sorted) {
|
|
26
|
+
const slug = (entry.slug ?? "?").padEnd(slugWidth);
|
|
27
|
+
const seen = entry.lastSeen ?? "";
|
|
28
|
+
deps.renderer.write(` ${color.dim(slug)} ${color.dim(seen)} ${entry.root ?? "?"}
|
|
29
|
+
`);
|
|
30
|
+
}
|
|
31
|
+
return 0;
|
|
32
|
+
};
|
|
33
|
+
export {
|
|
34
|
+
projectsCmd
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=projects-LMNAGGEU.js.map
|
|
@@ -239,7 +239,7 @@ function aliasProviderId(configProviderId, cfg) {
|
|
|
239
239
|
async function discoverProviderModels(deps, ids) {
|
|
240
240
|
if (!("mergeOverlay" in deps.modelsRegistry)) return void 0;
|
|
241
241
|
try {
|
|
242
|
-
const { discoverAndMergeProviders } = await import("./auto-discover-providers-
|
|
242
|
+
const { discoverAndMergeProviders } = await import("./auto-discover-providers-DXR25GTG.js");
|
|
243
243
|
await discoverAndMergeProviders({
|
|
244
244
|
config: deps.config,
|
|
245
245
|
registry: deps.modelsRegistry,
|
|
@@ -660,4 +660,4 @@ export {
|
|
|
660
660
|
modelsCmd,
|
|
661
661
|
providersCmd
|
|
662
662
|
};
|
|
663
|
-
//# sourceMappingURL=providers-models-
|
|
663
|
+
//# sourceMappingURL=providers-models-6MOGAOVK.js.map
|
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
awaitFirstWrongProxyProbe,
|
|
4
4
|
bootstrapWrongProxy,
|
|
5
5
|
shutdownWrongProxy
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-CDY4D5QK.js";
|
|
7
|
+
import "./chunk-4XCBEUBX.js";
|
|
8
8
|
export {
|
|
9
9
|
applyWrongProxyPrefs,
|
|
10
10
|
awaitFirstWrongProxyProbe,
|
|
11
11
|
bootstrapWrongProxy,
|
|
12
12
|
shutdownWrongProxy
|
|
13
13
|
};
|
|
14
|
-
//# sourceMappingURL=proxy-wiring-
|
|
14
|
+
//# sourceMappingURL=proxy-wiring-K2DORFFL.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {
|
|
2
|
+
handleHelpVersionShortCircuit
|
|
3
|
+
} from "./chunk-U6PGWDMZ.js";
|
|
4
|
+
import "./chunk-6WRKAACA.js";
|
|
5
|
+
import "./chunk-XJXDOF63.js";
|
|
6
|
+
import "./chunk-EK2P53GL.js";
|
|
7
|
+
export {
|
|
8
|
+
handleHelpVersionShortCircuit
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=short-circuit-flags-YDMLAQ5R.js.map
|
|
@@ -10,6 +10,9 @@ import type { SlashCommandContext } from './command-context.js';
|
|
|
10
10
|
* /acp <agent-id> <task> run a task on one agent (inline, streamed)
|
|
11
11
|
* /acp <agent-id> --bg <task> run it as a background fleet subagent
|
|
12
12
|
* /acp parallel <csv> <task> fan a task out to several agents at once
|
|
13
|
+
* /acp parallel <csv> --bg <task> same, but each agent runs as a background
|
|
14
|
+
* fleet subagent — live progress shows in /agents,
|
|
15
|
+
* the TUI fleet panel and the WebUI Agents panel
|
|
13
16
|
* /acp probe [csv] handshake-test agents (what actually works)
|
|
14
17
|
* /acp bench [csv] [--fs] end-to-end verify each agent + graded report
|
|
15
18
|
* /acp sync pull the official agentclientprotocol/registry
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { SlashCommand } from '@wrongstack/core/types';
|
|
2
|
+
import type { SlashCommandContext } from './command-context.js';
|
|
3
|
+
/**
|
|
4
|
+
* `/codebase-map` — read and publish the centrality-ranked view of the index.
|
|
5
|
+
*
|
|
6
|
+
* Three jobs, one command, because they are three views of the same data:
|
|
7
|
+
* print the map, write the committable atlas projection, and report whether a
|
|
8
|
+
* previously written atlas still describes the current code.
|
|
9
|
+
*/
|
|
10
|
+
export declare function buildCodebaseMapCommand(opts: SlashCommandContext): SlashCommand;
|
|
11
|
+
//# sourceMappingURL=codebase-map.d.ts.map
|
|
@@ -3,6 +3,7 @@ import type { EventBus } from '@wrongstack/core/kernel';
|
|
|
3
3
|
import type { SlashCommandRegistry, ToolRegistry } from '@wrongstack/core/registry';
|
|
4
4
|
import type { CompactReport, HealthRegistry, MemoryPort, MetricsRuntimeStatus, MetricsSink, ModeStore, Renderer, SessionStore, SkillLoader, TokenCounter } from '@wrongstack/core/types';
|
|
5
5
|
import type { WstackPaths } from '@wrongstack/core/utils';
|
|
6
|
+
import type { SummarizerPort } from '@wrongstack/tools';
|
|
6
7
|
import type { VectorMemoryStore } from '@wrongstack/vector-memory';
|
|
7
8
|
/** Host capabilities supplied to command adapters. */
|
|
8
9
|
export interface SlashCommandContext {
|
|
@@ -41,6 +42,12 @@ export interface SlashCommandContext {
|
|
|
41
42
|
cwd: string;
|
|
42
43
|
/** Project root (typically resolved from cwd). */
|
|
43
44
|
projectRoot: string;
|
|
45
|
+
/**
|
|
46
|
+
* Model port for the codebase index's concept layer. Present only when
|
|
47
|
+
* `indexing.concepts.enabled` is true — its absence is what `/codebase-map
|
|
48
|
+
* --enrich` reports instead of silently doing nothing.
|
|
49
|
+
*/
|
|
50
|
+
codebaseConceptSummarizer?: SummarizerPort | undefined;
|
|
44
51
|
metricsSink?: MetricsSink | undefined;
|
|
45
52
|
healthRegistry?: HealthRegistry | undefined;
|
|
46
53
|
metricsStatus?: MetricsRuntimeStatus | undefined;
|
|
@@ -252,6 +259,16 @@ export interface SlashCommandContext {
|
|
|
252
259
|
onContextLimit?: ((tokens?: number) => number) | undefined;
|
|
253
260
|
/** Toggle or query YOLO mode at runtime. Pass undefined to query, boolean to set. */
|
|
254
261
|
onYolo?: ((setTo?: boolean) => boolean) | undefined;
|
|
262
|
+
/**
|
|
263
|
+
* Read, or set, which kinds of damage still prompt while YOLO is on.
|
|
264
|
+
*
|
|
265
|
+
* Returns the EFFECTIVE map after any update — the locked kinds report `true`
|
|
266
|
+
* whatever was asked, so a caller can tell an ignored "off" from a real one.
|
|
267
|
+
*/
|
|
268
|
+
onYoloConfirm?: ((update?: {
|
|
269
|
+
kind: import('@wrongstack/core/security').DestructiveKind;
|
|
270
|
+
confirm: boolean;
|
|
271
|
+
}) => Record<string, boolean>) | undefined;
|
|
255
272
|
/** Toggle or query next-task prediction. Pass undefined to query, boolean to set. */
|
|
256
273
|
onNextPredict?: ((setTo?: boolean) => boolean) | undefined;
|
|
257
274
|
/**
|
|
@@ -589,6 +606,18 @@ export interface SlashCommandContext {
|
|
|
589
606
|
brainTierStats?: (() => import('@wrongstack/core/coordination').BrainTierStats) | undefined;
|
|
590
607
|
/** Config store for reading/writing config sections at runtime (e.g. settings menu). */
|
|
591
608
|
configStore: import('@wrongstack/core/types').ConfigStore;
|
|
609
|
+
/**
|
|
610
|
+
* Host hook that adopts the store's new merged config after an in-process
|
|
611
|
+
* selection change (today only `/profile switch`). The host's own `config`
|
|
612
|
+
* object is a distinct snapshot from the store's, so a command that mutates
|
|
613
|
+
* the store must hand the result back or the host keeps reading the values
|
|
614
|
+
* it booted with.
|
|
615
|
+
*
|
|
616
|
+
* Optional by design: only the interactive CLI has a live merged config to
|
|
617
|
+
* keep in step. Surfaces that leave it unset still persist the selection to
|
|
618
|
+
* the bootstrap and pick it up on their next start.
|
|
619
|
+
*/
|
|
620
|
+
onActiveProfileChange?: ((next: import('@wrongstack/core/types').Config) => void) | undefined;
|
|
592
621
|
/**
|
|
593
622
|
* Optional accessor for the Chronicle metrics store. When wired, the
|
|
594
623
|
* `/tool autothin candidates` and `apply` commands can read the
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import type { SlashCommand } from '@wrongstack/core/types';
|
|
2
2
|
import type { SlashCommandContext } from './command-context.js';
|
|
3
3
|
export declare function buildContextCommand(opts: SlashCommandContext): SlashCommand;
|
|
4
|
+
/**
|
|
5
|
+
* One line naming what the recent per-request ratios mean.
|
|
6
|
+
*
|
|
7
|
+
* Deliberately reports a SHAPE, not a threshold. "40%" is a healthy young
|
|
8
|
+
* session and a broken old one; what separates them is whether the number is
|
|
9
|
+
* climbing as the conversation grows. The first request of a session can never
|
|
10
|
+
* hit, so it is excluded from the judgement rather than allowed to drag the
|
|
11
|
+
* verdict down.
|
|
12
|
+
*/
|
|
13
|
+
export declare function cacheTrendVerdict(recent: readonly number[]): string;
|
|
4
14
|
//# sourceMappingURL=context.d.ts.map
|
|
@@ -13,5 +13,5 @@ import type { SlashCommandContext } from './command-context.js';
|
|
|
13
13
|
*
|
|
14
14
|
* Run /ensemble (no args) to see usage and the list of available agents.
|
|
15
15
|
*/
|
|
16
|
-
export declare function buildEnsembleCommand(
|
|
16
|
+
export declare function buildEnsembleCommand(opts: SlashCommandContext): SlashCommand;
|
|
17
17
|
//# sourceMappingURL=ensemble.d.ts.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `/openai-quota` — how much of the ChatGPT (Codex) subscription this account
|
|
3
|
+
* has burned, and when the windows reset.
|
|
4
|
+
*
|
|
5
|
+
* A "Sign in with ChatGPT" account is metered on rolling windows — typically a
|
|
6
|
+
* 5-hour one and a weekly one — and the ChatGPT backend reports the burn on
|
|
7
|
+
* every `/codex/responses` response, in headers. Nothing about that reaches the
|
|
8
|
+
* SSE body, so before this existed the first visible sign of an exhausted plan
|
|
9
|
+
* was a 429 in the middle of a turn.
|
|
10
|
+
*
|
|
11
|
+
* The command is provider-scoped; the machinery underneath is not. It renders
|
|
12
|
+
* whatever `@wrongstack/core/quota` holds for one provider id, and the renderer
|
|
13
|
+
* below reads only the neutral shape. A second metered provider needs a
|
|
14
|
+
* reporter and a one-line command, not a second copy of this file.
|
|
15
|
+
*
|
|
16
|
+
* The reading is observational: it appears after the first request of the
|
|
17
|
+
* session, not before, and it is never fetched on its own — spending a request
|
|
18
|
+
* to ask "how much have I spent" is exactly the wrong trade on a metered plan.
|
|
19
|
+
*
|
|
20
|
+
* Usage:
|
|
21
|
+
* /openai-quota Show the latest reading for every metered window
|
|
22
|
+
*/
|
|
23
|
+
import { type ProviderQuotaSnapshot } from '@wrongstack/core/quota';
|
|
24
|
+
import type { SlashCommand } from '@wrongstack/core/types';
|
|
25
|
+
/**
|
|
26
|
+
* Render one meter. Provider-neutral by construction — everything it reads is
|
|
27
|
+
* on the shared snapshot shape.
|
|
28
|
+
*/
|
|
29
|
+
export declare function renderQuotaSnapshot(snapshot: ProviderQuotaSnapshot): string[];
|
|
30
|
+
export declare function buildOpenAIQuotaCommand(): SlashCommand;
|
|
31
|
+
//# sourceMappingURL=openai-quota.d.ts.map
|
|
@@ -10,6 +10,13 @@ import type { SlashCommandContext } from './command-context.js';
|
|
|
10
10
|
* /profile list Show available profiles (● = active)
|
|
11
11
|
* /profile switch <name> Switch to an existing profile
|
|
12
12
|
* /profile copy <name> Copy the active profile's settings to a new profile
|
|
13
|
+
*
|
|
14
|
+
* `switch` writes the bootstrap (the durable selection read at next boot) and
|
|
15
|
+
* then pushes `activeProfile` through the live ConfigStore, which is the only
|
|
16
|
+
* event source the provider-runtime rebind watcher observes. `syncConfig` is
|
|
17
|
+
* the host's own copy of the merged config; it is a separate object from the
|
|
18
|
+
* store, so it has to be told too or the host keeps routing against the
|
|
19
|
+
* profile that was active when it booted.
|
|
13
20
|
*/
|
|
14
21
|
export declare function buildProfileCommand(opts: SlashCommandContext): SlashCommand;
|
|
15
22
|
//# sourceMappingURL=profile.d.ts.map
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* wstack hq token list --client → list issued client tokens
|
|
12
12
|
* wstack hq token revoke <id> → revoke a browser token (prefix match)
|
|
13
13
|
* wstack hq token revoke --client <id> → revoke a client token
|
|
14
|
+
* wstack hq service install|status|update|uninstall → Ubuntu systemd lifecycle
|
|
14
15
|
*
|
|
15
16
|
* All subcommands accept `--data-dir <path>` to override the HQ data
|
|
16
17
|
* directory (default `~/.wrongstack/hq`, honors `WRONGSTACK_HOME` /
|
|
@@ -1,3 +1,17 @@
|
|
|
1
1
|
import type { SubcommandHandler } from '../contracts.js';
|
|
2
|
+
/**
|
|
3
|
+
* List the projects WrongStack has actually been used in.
|
|
4
|
+
*
|
|
5
|
+
* The source is `~/.wrongstack/projects.json`, the manifest `boot.ts` writes
|
|
6
|
+
* on every start and the one `/project` already reads.
|
|
7
|
+
*
|
|
8
|
+
* This used to enumerate the `~/.wrongstack/projects/` DIRECTORY instead, which
|
|
9
|
+
* is not the same thing: that directory also holds per-run scratch state for
|
|
10
|
+
* ephemeral roots — Chimera review worktrees and the like — which are created
|
|
11
|
+
* by the hundred and carry no `meta.json`. On a working machine the listing was
|
|
12
|
+
* 1,495 rows of which 1,461 printed `(no meta)` and 262 were single-use
|
|
13
|
+
* `chimera-*` scratch dirs, against 30 real entries in the manifest. The
|
|
14
|
+
* command was unusable for the one question it answers.
|
|
15
|
+
*/
|
|
2
16
|
export declare const projectsCmd: SubcommandHandler;
|
|
3
17
|
//# sourceMappingURL=projects.d.ts.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
helpCmd,
|
|
3
3
|
versionCmd
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-6WRKAACA.js";
|
|
5
5
|
import "./chunk-XJXDOF63.js";
|
|
6
6
|
export {
|
|
7
7
|
helpCmd,
|
|
8
8
|
versionCmd
|
|
9
9
|
};
|
|
10
|
-
//# sourceMappingURL=version-help-
|
|
10
|
+
//# sourceMappingURL=version-help-WXI42PZ3.js.map
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
|
-
createHqCommandDispatcher
|
|
3
|
-
|
|
2
|
+
createHqCommandDispatcher,
|
|
3
|
+
createProjectKanbanAssignHandler,
|
|
4
|
+
createProjectKanbanTransitionHandler
|
|
5
|
+
} from "./chunk-KNMIBKLV.js";
|
|
4
6
|
import {
|
|
5
7
|
createKanbanRunMirror
|
|
6
8
|
} from "./chunk-VCYZ3WZV.js";
|
|
@@ -46,6 +48,7 @@ import {
|
|
|
46
48
|
toSessionHistoryEntries
|
|
47
49
|
} from "@wrongstack/webui-server";
|
|
48
50
|
import { WebSocketServer } from "ws";
|
|
51
|
+
import { verifyClient as verifyWsClient2 } from "@wrongstack/webui-server/server/ws-auth";
|
|
49
52
|
|
|
50
53
|
// src/webui-server/client-registration.ts
|
|
51
54
|
import { mailboxSessionTag } from "@wrongstack/core/coordination";
|
|
@@ -70,6 +73,10 @@ function createWebuiClientRegistration(deps) {
|
|
|
70
73
|
steerMailbox: mailbox,
|
|
71
74
|
interruptLeader: control.interruptLeader,
|
|
72
75
|
allowRunCommand: control.allowRunCommand,
|
|
76
|
+
...deps.projectRoot ? {
|
|
77
|
+
kanbanTransition: createProjectKanbanTransitionHandler(deps.projectRoot),
|
|
78
|
+
kanbanAssign: createProjectKanbanAssignHandler(deps.projectRoot)
|
|
79
|
+
} : {},
|
|
73
80
|
// The session HQ actually SHOWS for this client — the boot
|
|
74
81
|
// session the telemetry bridge publishes under and the only one
|
|
75
82
|
// `interruptLeader` speaks for. `getSessionId` follows whichever
|
|
@@ -1495,7 +1502,22 @@ async function runWebUI(opts) {
|
|
|
1495
1502
|
...opts.getVectorMemoryStore ? { getVectorMemoryStore: opts.getVectorMemoryStore } : {},
|
|
1496
1503
|
...opts.vectorMemoryModelCacheDir ? { vectorMemoryModelCacheDir: opts.vectorMemoryModelCacheDir } : {}
|
|
1497
1504
|
});
|
|
1498
|
-
const
|
|
1505
|
+
const verifyClient = (info) => verifyWsClient2({
|
|
1506
|
+
origin: info.origin,
|
|
1507
|
+
url: info.req.url ?? "",
|
|
1508
|
+
hostHeader: info.req.headers.host,
|
|
1509
|
+
remoteAddress: info.req.socket.remoteAddress,
|
|
1510
|
+
cookieHeader: info.req.headers.cookie,
|
|
1511
|
+
wsHost: host,
|
|
1512
|
+
expectedToken: wsToken,
|
|
1513
|
+
requireToken,
|
|
1514
|
+
allowedHostnames: [publicUrl, publicWsUrl].filter(
|
|
1515
|
+
(value) => Boolean(value)
|
|
1516
|
+
),
|
|
1517
|
+
allowBrowserUrlToken: Boolean(publicWsUrl),
|
|
1518
|
+
allowCrossPortLoopbackCookie: process.env["WRONGSTACK_WEBUI_DEV_CROSS_PORT_WS"] === "1"
|
|
1519
|
+
});
|
|
1520
|
+
const wss = httpServer ? new WebSocketServer({ server: httpServer.server, verifyClient, maxPayload: 20 * 1024 * 1024 }) : new WebSocketServer({ port: httpPort, host, verifyClient, maxPayload: 20 * 1024 * 1024 });
|
|
1499
1521
|
wss.on("error", (err) => {
|
|
1500
1522
|
console.error(
|
|
1501
1523
|
JSON.stringify({
|
|
@@ -1625,6 +1647,7 @@ async function runWebUI(opts) {
|
|
|
1625
1647
|
() => opts.appConfig?.providers ?? {}
|
|
1626
1648
|
),
|
|
1627
1649
|
modelsRegistry: opts.modelsRegistry,
|
|
1650
|
+
providerAuthRegistry: opts.providerAuthRegistry,
|
|
1628
1651
|
send,
|
|
1629
1652
|
broadcast,
|
|
1630
1653
|
log: (m) => console.log(m)
|
|
@@ -1951,4 +1974,4 @@ async function runWebUI(opts) {
|
|
|
1951
1974
|
export {
|
|
1952
1975
|
runWebUI
|
|
1953
1976
|
};
|
|
1954
|
-
//# sourceMappingURL=webui-server-
|
|
1977
|
+
//# sourceMappingURL=webui-server-OBV5JYJV.js.map
|
|
@@ -117,6 +117,7 @@ export interface CliWebUIOptions {
|
|
|
117
117
|
webuiInstanceRegistered: boolean;
|
|
118
118
|
}) => void;
|
|
119
119
|
modelsRegistry?: ModelsRegistry | undefined;
|
|
120
|
+
providerAuthRegistry?: import('@wrongstack/core/registry').ProviderAuthRegistry | undefined;
|
|
120
121
|
globalConfigPath?: string | undefined;
|
|
121
122
|
/** Resolved profile config path: ~/.wrongstack/profiles/<activeProfile>/config.json */
|
|
122
123
|
profileConfigPath: string;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Atlas boot-prompt contributor — the repository's shape, put in front of the
|
|
3
|
+
* agent instead of left to be rediscovered.
|
|
4
|
+
*
|
|
5
|
+
* Without this, every session begins the same way: a handful of searches to
|
|
6
|
+
* work out which packages exist, which files everything depends on, and where
|
|
7
|
+
* the entry points are. The index has known all of that since it was built.
|
|
8
|
+
* A few hundred tokens spends once what a dozen tool calls spend every time.
|
|
9
|
+
*
|
|
10
|
+
* Contract, matching `wrongtrace-prompt-contributor.ts`:
|
|
11
|
+
* - **Fail-open.** No index, no ranks, a throw, a timeout → `[]`. Orientation
|
|
12
|
+
* is a convenience; it must never be the reason a session cannot start.
|
|
13
|
+
* - **Bounded.** The brief is read behind a deadline, because the store lives
|
|
14
|
+
* on disk and a cold or busy index must not stall the first prompt.
|
|
15
|
+
* - **Cached per process.** The brief only changes when the index does, and
|
|
16
|
+
* rebuilding it on every prompt build would read SQLite on every turn.
|
|
17
|
+
* - **Cache-safe.** Contributor blocks are tagged `'contributor'`, which
|
|
18
|
+
* `EPOCH_VOLATILE_SOURCES` moves out of the wire `system` block and into
|
|
19
|
+
* the live-context tail — so this does not invalidate the prompt cache
|
|
20
|
+
* prefix the way a system-prompt edit would.
|
|
21
|
+
*
|
|
22
|
+
* It is deliberately *not* routed through SAGE. That pipeline is for episodic
|
|
23
|
+
* memory and gates on relevance thresholds a repository map would fail; the
|
|
24
|
+
* map is not a memory, it is a fact about the checkout.
|
|
25
|
+
*/
|
|
26
|
+
import type { SystemPromptContributor, TokenSavingTier } from '@wrongstack/core/types';
|
|
27
|
+
import { type AtlasBrief } from '@wrongstack/tools';
|
|
28
|
+
/** Default hard ceiling on the rendered block. */
|
|
29
|
+
export declare const DEFAULT_BRIEF_MAX_TOKENS = 800;
|
|
30
|
+
/**
|
|
31
|
+
* Render the brief, trimming from the bottom until it fits.
|
|
32
|
+
*
|
|
33
|
+
* The order of the sections is the order of their value to somebody who knows
|
|
34
|
+
* nothing about the repository: what it is made of, what everything depends
|
|
35
|
+
* on, and — last, because it is the least load-bearing — what each subsystem
|
|
36
|
+
* does in prose. Trimming from the bottom therefore degrades gracefully
|
|
37
|
+
* instead of losing the hubs.
|
|
38
|
+
*/
|
|
39
|
+
export declare function renderAtlasBrief(brief: AtlasBrief, maxTokens: number): string;
|
|
40
|
+
export interface AtlasPromptContributorOptions {
|
|
41
|
+
projectRoot: string;
|
|
42
|
+
indexDir?: string | undefined;
|
|
43
|
+
/** `indexing.atlas.injectOnSessionStart`. Default true. */
|
|
44
|
+
enabled?: boolean | undefined;
|
|
45
|
+
/** `indexing.atlas.briefMaxTokens`. Default {@link DEFAULT_BRIEF_MAX_TOKENS}. */
|
|
46
|
+
maxTokens?: number | undefined;
|
|
47
|
+
tokenSavingMode?: TokenSavingTier | boolean | undefined;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Build the contributor. One instance per prompt-builder binding; the brief
|
|
51
|
+
* cache lives on the closure, so it is per process, like the builder.
|
|
52
|
+
*/
|
|
53
|
+
export declare function createAtlasPromptContributor(options: AtlasPromptContributorOptions): SystemPromptContributor;
|
|
54
|
+
//# sourceMappingURL=atlas-prompt-contributor.d.ts.map
|
|
@@ -73,6 +73,7 @@ export declare function runCliExecution(params: {
|
|
|
73
73
|
agentMonitor?: X['fleet']['agentTranscripts'];
|
|
74
74
|
vault: AUP['vault'];
|
|
75
75
|
profileConfigPath: string;
|
|
76
|
+
providerAuthRegistry: NonNullable<AUP['providerAuthRegistry']>;
|
|
76
77
|
onPanelOpen: X['fleet']['onPanelOpen'];
|
|
77
78
|
interruptController: RC['interruptController'];
|
|
78
79
|
enhanceController: RC['enhanceController'];
|