@wrongstack/cli 1.0.9 → 1.0.10
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.
|
@@ -17897,7 +17897,6 @@ function parseTaskEvidenceFlags(tokens) {
|
|
|
17897
17897
|
}
|
|
17898
17898
|
if (!inline && value.startsWith("-")) {
|
|
17899
17899
|
warnings.push(`${key} expects a URL but none was provided`);
|
|
17900
|
-
i++;
|
|
17901
17900
|
continue;
|
|
17902
17901
|
}
|
|
17903
17902
|
if (!inline) i++;
|
|
@@ -17913,7 +17912,6 @@ function parseTaskEvidenceFlags(tokens) {
|
|
|
17913
17912
|
}
|
|
17914
17913
|
if (!inline && raw.startsWith("-")) {
|
|
17915
17914
|
warnings.push(`${key} expects <checkId>=<status> but none was provided`);
|
|
17916
|
-
i++;
|
|
17917
17915
|
continue;
|
|
17918
17916
|
}
|
|
17919
17917
|
const sep2 = raw.lastIndexOf("=");
|
|
@@ -18148,10 +18146,16 @@ async function handleTaskSubcommand(opts, projectRoot, args, showHelp) {
|
|
|
18148
18146
|
}
|
|
18149
18147
|
if (board.lifecycle?.mode === "managed") {
|
|
18150
18148
|
const stageToColumn = board.lifecycle?.columns ?? {};
|
|
18151
|
-
const
|
|
18149
|
+
const currentTask = board.tasks.find((t) => t.id === taskId);
|
|
18150
|
+
if (!currentTask) {
|
|
18151
|
+
return { message: color36.red("Task not found") };
|
|
18152
|
+
}
|
|
18152
18153
|
const currentStage = Object.entries(stageToColumn).find(
|
|
18153
|
-
([, columnId]) => columnId ===
|
|
18154
|
+
([, columnId]) => columnId === currentTask.columnId
|
|
18154
18155
|
)?.[0];
|
|
18156
|
+
if (currentStage === "done") {
|
|
18157
|
+
return { message: color36.yellow("Task is already in Done \u2014 nothing to do.") };
|
|
18158
|
+
}
|
|
18155
18159
|
const path35 = currentStage === "backlog" ? ["todo", "running", "review", "done"] : currentStage === "todo" ? ["running", "review", "done"] : currentStage === "running" ? ["review", "done"] : currentStage === "review" ? ["done"] : null;
|
|
18156
18160
|
if (path35 === null) {
|
|
18157
18161
|
return {
|
|
@@ -18160,10 +18164,6 @@ async function handleTaskSubcommand(opts, projectRoot, args, showHelp) {
|
|
|
18160
18164
|
)
|
|
18161
18165
|
};
|
|
18162
18166
|
}
|
|
18163
|
-
const currentTask = board.tasks.find((t) => t.id === taskId);
|
|
18164
|
-
if (!currentTask) {
|
|
18165
|
-
return { message: color36.red("Task not found") };
|
|
18166
|
-
}
|
|
18167
18167
|
const preflightIssues = [];
|
|
18168
18168
|
if (!note?.trim()) {
|
|
18169
18169
|
return {
|
|
@@ -19920,7 +19920,7 @@ async function runAudienceMemory(store, rest) {
|
|
|
19920
19920
|
let imported = 0;
|
|
19921
19921
|
let skipped = 0;
|
|
19922
19922
|
for (const entry of entries) {
|
|
19923
|
-
if (typeof entry.text !== "string" || !entry.text.trim()) {
|
|
19923
|
+
if (!entry || typeof entry !== "object" || typeof entry.text !== "string" || !entry.text.trim()) {
|
|
19924
19924
|
skipped++;
|
|
19925
19925
|
continue;
|
|
19926
19926
|
}
|
|
@@ -20234,6 +20234,8 @@ var MEMORY_KINDS = [
|
|
|
20234
20234
|
"summary"
|
|
20235
20235
|
];
|
|
20236
20236
|
var MEMORY_SCOPES = ["project", "user", "session", "file", "symbol"];
|
|
20237
|
+
var DECIMAL_RE = /^(?:\d+(?:\.\d*)?|\.\d+)$/;
|
|
20238
|
+
var INTEGER_RE = /^\d+$/;
|
|
20237
20239
|
var MEMORY_STATUSES = [
|
|
20238
20240
|
"active",
|
|
20239
20241
|
"stale",
|
|
@@ -20258,7 +20260,7 @@ function parseMemoryFlags(tokens) {
|
|
|
20258
20260
|
errors.push(`${name} needs a value between 0 and 1.`);
|
|
20259
20261
|
return void 0;
|
|
20260
20262
|
}
|
|
20261
|
-
const parsed = Number.parseFloat(value);
|
|
20263
|
+
const parsed = DECIMAL_RE.test(value) ? Number.parseFloat(value) : Number.NaN;
|
|
20262
20264
|
if (!Number.isFinite(parsed) || parsed < 0 || parsed > 1) {
|
|
20263
20265
|
errors.push(`${name} must be a number between 0 and 1 (got "${value}").`);
|
|
20264
20266
|
return void 0;
|
|
@@ -20368,7 +20370,7 @@ function parseForFileFlags(tokens) {
|
|
|
20368
20370
|
out.errors.push("--line needs a 1-indexed line number.");
|
|
20369
20371
|
continue;
|
|
20370
20372
|
}
|
|
20371
|
-
const parsed = Number.parseInt(next, 10);
|
|
20373
|
+
const parsed = INTEGER_RE.test(next) ? Number.parseInt(next, 10) : Number.NaN;
|
|
20372
20374
|
if (!Number.isFinite(parsed) || parsed < 1) {
|
|
20373
20375
|
out.errors.push(`--line must be a positive integer (got "${next}").`);
|
|
20374
20376
|
continue;
|
|
@@ -20380,7 +20382,7 @@ function parseForFileFlags(tokens) {
|
|
|
20380
20382
|
out.errors.push("--limit needs a value between 1 and 200.");
|
|
20381
20383
|
continue;
|
|
20382
20384
|
}
|
|
20383
|
-
const parsed = Number.parseInt(next, 10);
|
|
20385
|
+
const parsed = INTEGER_RE.test(next) ? Number.parseInt(next, 10) : Number.NaN;
|
|
20384
20386
|
if (!Number.isFinite(parsed) || parsed < 1 || parsed > 200) {
|
|
20385
20387
|
out.errors.push(`--limit must be between 1 and 200 (got "${next}").`);
|
|
20386
20388
|
continue;
|
|
@@ -20880,7 +20882,8 @@ async function runStats(opts) {
|
|
|
20880
20882
|
"anti_pattern",
|
|
20881
20883
|
"untyped"
|
|
20882
20884
|
];
|
|
20883
|
-
|
|
20885
|
+
const extraTypes = [...byType.keys()].filter((t) => !typeOrder.includes(t)).sort();
|
|
20886
|
+
for (const t of [...typeOrder.slice(0, -1), ...extraTypes, "untyped"]) {
|
|
20884
20887
|
const count = byType.get(t);
|
|
20885
20888
|
if (count) {
|
|
20886
20889
|
const bar2 = "\u2588".repeat(Math.min(count, 20));
|
|
@@ -26831,6 +26834,11 @@ import { leaderTierPolicy, listTierIds, resolveTier } from "@wrongstack/core/coo
|
|
|
26831
26834
|
import { ConfigError as ConfigError6 } from "@wrongstack/core/types";
|
|
26832
26835
|
import { atomicWrite as atomicWrite10, color as color54, toErrorMessage as toErrorMessage25 } from "@wrongstack/core/utils";
|
|
26833
26836
|
var LEADER_MODES = ["off", "propose", "auto"];
|
|
26837
|
+
var DECIMAL_RE2 = /^(?:\d+(?:\.\d*)?|\.\d+)$/;
|
|
26838
|
+
var INTEGER_RE2 = /^\d+$/;
|
|
26839
|
+
function strictNumber(raw, pattern) {
|
|
26840
|
+
return pattern.test(raw) ? Number(raw) : Number.NaN;
|
|
26841
|
+
}
|
|
26834
26842
|
async function patchGlobalConfig3(globalConfigPath, mutate) {
|
|
26835
26843
|
let raw = "{}";
|
|
26836
26844
|
let fileExists2 = true;
|
|
@@ -27019,15 +27027,15 @@ function buildTierCommand(opts) {
|
|
|
27019
27027
|
message: `${color54.amber("Usage:")} /tier budget <tier> <maxCostUsd> [maxIterations] [maxToolCalls]`
|
|
27020
27028
|
};
|
|
27021
27029
|
}
|
|
27022
|
-
const usd =
|
|
27030
|
+
const usd = strictNumber(parts[2] ?? "", DECIMAL_RE2);
|
|
27023
27031
|
if (!Number.isFinite(usd) || usd < 0) {
|
|
27024
27032
|
return { message: `${color54.red("Invalid")} maxCostUsd: "${parts[2] ?? ""}"` };
|
|
27025
27033
|
}
|
|
27026
|
-
const iters = parts[3] !== void 0 ?
|
|
27034
|
+
const iters = parts[3] !== void 0 ? strictNumber(parts[3], INTEGER_RE2) : void 0;
|
|
27027
27035
|
if (iters !== void 0 && (!Number.isFinite(iters) || iters < 0)) {
|
|
27028
27036
|
return { message: `${color54.red("Invalid")} maxIterations: "${parts[3]}"` };
|
|
27029
27037
|
}
|
|
27030
|
-
const tools = parts[4] !== void 0 ?
|
|
27038
|
+
const tools = parts[4] !== void 0 ? strictNumber(parts[4], INTEGER_RE2) : void 0;
|
|
27031
27039
|
if (tools !== void 0 && (!Number.isFinite(tools) || tools < 0)) {
|
|
27032
27040
|
return { message: `${color54.red("Invalid")} maxToolCalls: "${parts[4]}"` };
|
|
27033
27041
|
}
|
|
@@ -27057,6 +27065,12 @@ function buildTierCommand(opts) {
|
|
|
27057
27065
|
for (const [key, value] of Object.entries(routing)) {
|
|
27058
27066
|
if (value === tier) delete routing[key];
|
|
27059
27067
|
}
|
|
27068
|
+
if (tiers["default"] === tier) delete tiers["default"];
|
|
27069
|
+
const leader = tiers["leader"];
|
|
27070
|
+
if (leader && typeof leader === "object") {
|
|
27071
|
+
const leaderRecord = leader;
|
|
27072
|
+
if (leaderRecord["maxTier"] === tier) delete leaderRecord["maxTier"];
|
|
27073
|
+
}
|
|
27060
27074
|
});
|
|
27061
27075
|
return { message: `${color54.green("\u2713")} tier ${color54.cyan(tier)} removed` };
|
|
27062
27076
|
}
|
|
@@ -27117,7 +27131,7 @@ function buildTierCommand(opts) {
|
|
|
27117
27131
|
};
|
|
27118
27132
|
}
|
|
27119
27133
|
if (action === "dwell") {
|
|
27120
|
-
const turns =
|
|
27134
|
+
const turns = strictNumber(parts[2] ?? "", INTEGER_RE2);
|
|
27121
27135
|
if (!Number.isFinite(turns) || turns < 0) {
|
|
27122
27136
|
return { message: `${color54.amber("Usage:")} /tier leader dwell <turns>` };
|
|
27123
27137
|
}
|
|
@@ -27180,7 +27194,7 @@ function buildAgentsCommand(opts) {
|
|
|
27180
27194
|
return {
|
|
27181
27195
|
name: "agents",
|
|
27182
27196
|
category: "Agent",
|
|
27183
|
-
description: "Monitor subagent activity: /agents [chat off|
|
|
27197
|
+
description: "Monitor subagent activity: /agents [chat off|full|status | stream on|off|status | list | show <id>]",
|
|
27184
27198
|
async run(args) {
|
|
27185
27199
|
if ((!args.trim() || args.trim() === "list") && opts.onPanelOpen?.current) {
|
|
27186
27200
|
const opened = opts.onPanelOpen.current("toggleAgentsMonitor");
|
|
@@ -31323,8 +31337,8 @@ function buildTelegramSettingsCommand(opts) {
|
|
|
31323
31337
|
message: `${color65.green("\u2713")} long-tool \u2192 ${color65.dim("off")}`
|
|
31324
31338
|
};
|
|
31325
31339
|
}
|
|
31326
|
-
const ms = Number
|
|
31327
|
-
if (Number.
|
|
31340
|
+
const ms = /^\d+$/.test(raw) ? Number(raw) : Number.NaN;
|
|
31341
|
+
if (!Number.isSafeInteger(ms)) {
|
|
31328
31342
|
return {
|
|
31329
31343
|
message: `${color65.red("Invalid number")}: "${raw}". Enter milliseconds, e.g. /telegram-settings long-tool 15000`
|
|
31330
31344
|
};
|
|
@@ -31343,7 +31357,7 @@ function buildTelegramSettingsCommand(opts) {
|
|
|
31343
31357
|
message: `${color65.amber("Usage:")} /telegram-settings poll <seconds> ${color65.dim("(1\u201360)")}`
|
|
31344
31358
|
};
|
|
31345
31359
|
}
|
|
31346
|
-
const sec = Number
|
|
31360
|
+
const sec = /^\d+$/.test(raw) ? Number(raw) : Number.NaN;
|
|
31347
31361
|
if (Number.isNaN(sec) || sec < 1 || sec > 60) {
|
|
31348
31362
|
return {
|
|
31349
31363
|
message: `${color65.red("Invalid value")}: "${raw}". Enter seconds between 1 and 60.`
|
|
@@ -38936,4 +38950,4 @@ export {
|
|
|
38936
38950
|
CLI_VERSION,
|
|
38937
38951
|
runInteractive
|
|
38938
38952
|
};
|
|
38939
|
-
//# sourceMappingURL=cli-main-
|
|
38953
|
+
//# sourceMappingURL=cli-main-BU5DEHDO.js.map
|
package/dist/index.js
CHANGED
|
@@ -23,7 +23,7 @@ async function main(argv) {
|
|
|
23
23
|
const { initializeCli } = await import("./cli-context-6GMXUOXD.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-BU5DEHDO.js");
|
|
27
27
|
return runInteractive(cliCtx);
|
|
28
28
|
}
|
|
29
29
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wrongstack/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "WrongStack CLI — terminal AI coding agent with provider catalog from models.dev. Provides `wrongstack` and `wstack` binaries.",
|
|
6
6
|
"keywords": [
|
|
@@ -41,36 +41,36 @@
|
|
|
41
41
|
"data"
|
|
42
42
|
],
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@wrongstack/acp": "1.0.
|
|
45
|
-
"@wrongstack/bench": "1.0.
|
|
46
|
-
"@wrongstack/core": "1.0.
|
|
47
|
-
"@wrongstack/kanban": "1.0.
|
|
48
|
-
"@wrongstack/mcp": "1.0.
|
|
49
|
-
"@wrongstack/persistence": "1.0.
|
|
50
|
-
"@wrongstack/plug-lsp": "1.0.
|
|
51
|
-
"@wrongstack/plugins": "1.0.
|
|
52
|
-
"@wrongstack/primitives": "1.0.
|
|
53
|
-
"@wrongstack/providers": "1.0.
|
|
54
|
-
"@wrongstack/requirement-intake": "1.0.
|
|
55
|
-
"@wrongstack/runtime": "1.0.
|
|
56
|
-
"@wrongstack/sage": "1.0.
|
|
57
|
-
"@wrongstack/sdd": "1.0.
|
|
58
|
-
"@wrongstack/security-scanner": "1.0.
|
|
59
|
-
"@wrongstack/simpleui": "1.0.
|
|
60
|
-
"@wrongstack/techstack": "1.0.
|
|
61
|
-
"@wrongstack/telegram": "1.0.
|
|
62
|
-
"@wrongstack/tools": "1.0.
|
|
63
|
-
"@wrongstack/tui": "1.0.
|
|
64
|
-
"@wrongstack/vector-memory": "1.0.
|
|
65
|
-
"@wrongstack/webui": "1.0.
|
|
66
|
-
"@wrongstack/webui-hq": "1.0.
|
|
67
|
-
"@wrongstack/webui-protocol": "1.0.
|
|
68
|
-
"@wrongstack/webui-server": "1.0.
|
|
69
|
-
"@wrongstack/wrongtrace": "1.0.
|
|
44
|
+
"@wrongstack/acp": "1.0.10",
|
|
45
|
+
"@wrongstack/bench": "1.0.10",
|
|
46
|
+
"@wrongstack/core": "1.0.10",
|
|
47
|
+
"@wrongstack/kanban": "1.0.10",
|
|
48
|
+
"@wrongstack/mcp": "1.0.10",
|
|
49
|
+
"@wrongstack/persistence": "1.0.10",
|
|
50
|
+
"@wrongstack/plug-lsp": "1.0.10",
|
|
51
|
+
"@wrongstack/plugins": "1.0.10",
|
|
52
|
+
"@wrongstack/primitives": "1.0.10",
|
|
53
|
+
"@wrongstack/providers": "1.0.10",
|
|
54
|
+
"@wrongstack/requirement-intake": "1.0.10",
|
|
55
|
+
"@wrongstack/runtime": "1.0.10",
|
|
56
|
+
"@wrongstack/sage": "1.0.10",
|
|
57
|
+
"@wrongstack/sdd": "1.0.10",
|
|
58
|
+
"@wrongstack/security-scanner": "1.0.10",
|
|
59
|
+
"@wrongstack/simpleui": "1.0.10",
|
|
60
|
+
"@wrongstack/techstack": "1.0.10",
|
|
61
|
+
"@wrongstack/telegram": "1.0.10",
|
|
62
|
+
"@wrongstack/tools": "1.0.10",
|
|
63
|
+
"@wrongstack/tui": "1.0.10",
|
|
64
|
+
"@wrongstack/vector-memory": "1.0.10",
|
|
65
|
+
"@wrongstack/webui": "1.0.10",
|
|
66
|
+
"@wrongstack/webui-hq": "1.0.10",
|
|
67
|
+
"@wrongstack/webui-protocol": "1.0.10",
|
|
68
|
+
"@wrongstack/webui-server": "1.0.10",
|
|
69
|
+
"@wrongstack/wrongtrace": "1.0.10",
|
|
70
70
|
"ws": "^8.21.3"
|
|
71
71
|
},
|
|
72
72
|
"optionalDependencies": {
|
|
73
|
-
"@wrongstack/desktop": "1.0.
|
|
73
|
+
"@wrongstack/desktop": "1.0.10"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
76
|
"@types/node": "^26.5.1",
|