@wrongstack/tools 0.306.4 → 0.307.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/audit.js +14 -8
- package/dist/auto-proceed-loop-guard.js +8 -2
- package/dist/bash.js +57 -22
- package/dist/builtin.d.ts +6 -6
- package/dist/builtin.js +11469 -9304
- package/dist/clarify.d.ts +32 -0
- package/dist/codebase-index/ast-invariant-engine.d.ts +102 -0
- package/dist/codebase-index/ast-symbol-mutator.d.ts +28 -0
- package/dist/codebase-index/background-indexer.d.ts +9 -0
- package/dist/codebase-index/codebase-ast-replace-tool.d.ts +31 -0
- package/dist/codebase-index/codebase-impact-analysis-tool.d.ts +42 -0
- package/dist/codebase-index/codebase-invariant-check-tool.d.ts +23 -0
- package/dist/codebase-index/codebase-repo-map-tool.d.ts +22 -0
- package/dist/codebase-index/codebase-skeleton-tool.d.ts +36 -0
- package/dist/codebase-index/codebase-targeted-test-tool.d.ts +30 -0
- package/dist/codebase-index/index.d.ts +11 -1
- package/dist/codebase-index/index.js +4239 -1492
- package/dist/codebase-index/project-server-client-state.d.ts +79 -0
- package/dist/codebase-index/project-server-client.d.ts +3 -71
- package/dist/codebase-index/project-server-protocol.d.ts +1 -0
- package/dist/codebase-index/project-server.js +819 -933
- package/dist/codebase-index/repo-map.d.ts +20 -0
- package/dist/codebase-index/skeleton-extractor.d.ts +64 -0
- package/dist/codebase-index/tree-sitter-parser.d.ts +11 -0
- package/dist/codebase-index/worker.js +790 -914
- package/dist/codebase-index/writer-graph-helpers.d.ts +1 -1
- package/dist/codebase-index/writer-helpers.d.ts +12 -0
- package/dist/codebase-index/writer-mutations.d.ts +26 -0
- package/dist/codebase-index/writer-refs.d.ts +50 -0
- package/dist/codebase-index/writer-search.d.ts +30 -0
- package/dist/codebase-index/writer.d.ts +2 -320
- package/dist/edit.js +8602 -349
- package/dist/exec.js +73 -20
- package/dist/fetch.js +11 -9
- package/dist/format.js +14 -8
- package/dist/glob.js +5 -1
- package/dist/grep.js +19 -8
- package/dist/index.d.ts +3 -1
- package/dist/index.js +6178 -4037
- package/dist/install.js +14 -8
- package/dist/json.js +88 -15
- package/dist/kanban-board-actions.d.ts +4 -0
- package/dist/kanban-lifecycle-actions.d.ts +4 -0
- package/dist/kanban-serializer.d.ts +21 -0
- package/dist/kanban.js +985 -1034
- package/dist/languages/index.js +14 -8
- package/dist/lint.js +14 -8
- package/dist/logs.js +13 -3
- package/dist/next-steps.d.ts +8 -0
- package/dist/next-steps.js +18 -0
- package/dist/outdated.js +14 -8
- package/dist/pack.js +11461 -9304
- package/dist/patch.js +8345 -78
- package/dist/plan.js +1231 -1281
- package/dist/process-registry.js +14 -8
- package/dist/ps-slash.js +65 -30
- package/dist/read.js +822 -937
- package/dist/replace.js +8494 -224
- package/dist/search.js +21 -15
- package/dist/security-ast-scan-tool.d.ts +43 -0
- package/dist/session-kanban-graph.d.ts +9 -0
- package/dist/session-kanban-sync.d.ts +31 -0
- package/dist/session-kanban.d.ts +5 -141
- package/dist/session-kanban.js +367 -360
- package/dist/task.js +1157 -1207
- package/dist/test.js +14 -8
- package/dist/todo.js +2187 -2237
- package/dist/tool-diff.js +6 -1
- package/dist/tool-summary.js +4 -2
- package/dist/tool-tier.js +11469 -9304
- package/dist/typecheck.js +14 -8
- package/dist/write.js +8425 -160
- package/package.json +7 -7
package/dist/languages/index.js
CHANGED
|
@@ -2550,13 +2550,16 @@ function killWin32Tree(pid, opts = {}) {
|
|
|
2550
2550
|
};
|
|
2551
2551
|
child.on("error", settle);
|
|
2552
2552
|
child.on("close", settle);
|
|
2553
|
-
timeout = setTimeout(
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2553
|
+
timeout = setTimeout(
|
|
2554
|
+
() => {
|
|
2555
|
+
try {
|
|
2556
|
+
child.kill();
|
|
2557
|
+
} catch {
|
|
2558
|
+
}
|
|
2559
|
+
settle();
|
|
2560
|
+
},
|
|
2561
|
+
Math.max(1, opts.timeoutMs ?? WIN32_TASKKILL_TIMEOUT_MS)
|
|
2562
|
+
);
|
|
2560
2563
|
timeout.unref?.();
|
|
2561
2564
|
child.unref();
|
|
2562
2565
|
return true;
|
|
@@ -2730,7 +2733,10 @@ var ProcessRegistryImpl = class {
|
|
|
2730
2733
|
getBreakerCountdown() {
|
|
2731
2734
|
if (this.autoKillArmedAt === null || this.autoKillResetMs <= 0) return null;
|
|
2732
2735
|
const elapsed = Date.now() - this.autoKillArmedAt;
|
|
2733
|
-
return {
|
|
2736
|
+
return {
|
|
2737
|
+
remainingMs: Math.max(0, this.autoKillResetMs - elapsed),
|
|
2738
|
+
totalMs: this.autoKillResetMs
|
|
2739
|
+
};
|
|
2734
2740
|
}
|
|
2735
2741
|
/**
|
|
2736
2742
|
* Subscribe to countdown arm/cancel events. Returns an unsubscribe function.
|
package/dist/lint.js
CHANGED
|
@@ -422,13 +422,16 @@ function killWin32Tree(pid, opts = {}) {
|
|
|
422
422
|
};
|
|
423
423
|
child.on("error", settle);
|
|
424
424
|
child.on("close", settle);
|
|
425
|
-
timeout = setTimeout(
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
425
|
+
timeout = setTimeout(
|
|
426
|
+
() => {
|
|
427
|
+
try {
|
|
428
|
+
child.kill();
|
|
429
|
+
} catch {
|
|
430
|
+
}
|
|
431
|
+
settle();
|
|
432
|
+
},
|
|
433
|
+
Math.max(1, opts.timeoutMs ?? WIN32_TASKKILL_TIMEOUT_MS)
|
|
434
|
+
);
|
|
432
435
|
timeout.unref?.();
|
|
433
436
|
child.unref();
|
|
434
437
|
return true;
|
|
@@ -602,7 +605,10 @@ var ProcessRegistryImpl = class {
|
|
|
602
605
|
getBreakerCountdown() {
|
|
603
606
|
if (this.autoKillArmedAt === null || this.autoKillResetMs <= 0) return null;
|
|
604
607
|
const elapsed = Date.now() - this.autoKillArmedAt;
|
|
605
|
-
return {
|
|
608
|
+
return {
|
|
609
|
+
remainingMs: Math.max(0, this.autoKillResetMs - elapsed),
|
|
610
|
+
totalMs: this.autoKillResetMs
|
|
611
|
+
};
|
|
606
612
|
}
|
|
607
613
|
/**
|
|
608
614
|
* Subscribe to countdown arm/cancel events. Returns an unsubscribe function.
|
package/dist/logs.js
CHANGED
|
@@ -287,7 +287,13 @@ async function dockerLogs(service, lines, filterRe, cwd, signal, since) {
|
|
|
287
287
|
clearTimeout(timer);
|
|
288
288
|
resolve2(result);
|
|
289
289
|
};
|
|
290
|
-
const child = spawn("docker", args, {
|
|
290
|
+
const child = spawn("docker", args, {
|
|
291
|
+
cwd,
|
|
292
|
+
signal,
|
|
293
|
+
env: buildChildEnv(),
|
|
294
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
295
|
+
windowsHide: true
|
|
296
|
+
});
|
|
291
297
|
const timer = setTimeout(() => {
|
|
292
298
|
child.kill("SIGTERM");
|
|
293
299
|
finish(empty());
|
|
@@ -299,10 +305,14 @@ async function dockerLogs(service, lines, filterRe, cwd, signal, since) {
|
|
|
299
305
|
if (stderr.length < MAX) stderr += c.toString();
|
|
300
306
|
});
|
|
301
307
|
child.stdout?.on("error", (e) => {
|
|
302
|
-
console.log(
|
|
308
|
+
console.log(
|
|
309
|
+
JSON.stringify({ level: "debug", event: "pipe_error", stream: "stdout", error: e.message })
|
|
310
|
+
);
|
|
303
311
|
});
|
|
304
312
|
child.stderr?.on("error", (e) => {
|
|
305
|
-
console.log(
|
|
313
|
+
console.log(
|
|
314
|
+
JSON.stringify({ level: "debug", event: "pipe_error", stream: "stderr", error: e.message })
|
|
315
|
+
);
|
|
306
316
|
});
|
|
307
317
|
child.on("close", () => {
|
|
308
318
|
const output = stdout + stderr;
|
package/dist/next-steps.d.ts
CHANGED
|
@@ -46,6 +46,14 @@ export interface ParseNextStepsResult {
|
|
|
46
46
|
/** The first item's text when it has auto="true"; otherwise empty. */
|
|
47
47
|
autoTexts: string[];
|
|
48
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* Validate the structured input of the `nextsteps` tool for UI consumers.
|
|
51
|
+
*
|
|
52
|
+
* The runtime normally folds this input into the terminal assistant response.
|
|
53
|
+
* Browser clients still keep this projection as a fallback for a terminal
|
|
54
|
+
* response that is missing (for example after an interrupted stream).
|
|
55
|
+
*/
|
|
56
|
+
export declare function projectNextStepsToolInput(input: unknown): ParsedNextStep[];
|
|
49
57
|
/**
|
|
50
58
|
* Whether an LLM response's stop reason means the message is the FINAL one of
|
|
51
59
|
* a turn.
|
package/dist/next-steps.js
CHANGED
|
@@ -1,4 +1,21 @@
|
|
|
1
1
|
// src/next-steps.ts
|
|
2
|
+
function projectNextStepsToolInput(input) {
|
|
3
|
+
if (!input || typeof input !== "object" || Array.isArray(input)) return [];
|
|
4
|
+
const rawSteps = input["steps"];
|
|
5
|
+
if (!Array.isArray(rawSteps)) return [];
|
|
6
|
+
const steps = [];
|
|
7
|
+
for (const candidate of rawSteps) {
|
|
8
|
+
if (!candidate || typeof candidate !== "object" || Array.isArray(candidate)) continue;
|
|
9
|
+
const text = candidate["text"];
|
|
10
|
+
if (typeof text !== "string" || !text.trim()) continue;
|
|
11
|
+
const auto = steps.length === 0 && candidate["auto"] === true;
|
|
12
|
+
steps.push(
|
|
13
|
+
auto ? { index: steps.length + 1, text: text.trim(), auto: true } : { index: steps.length + 1, text: text.trim() }
|
|
14
|
+
);
|
|
15
|
+
if (steps.length >= MAX_STEPS) break;
|
|
16
|
+
}
|
|
17
|
+
return steps;
|
|
18
|
+
}
|
|
2
19
|
function isFinalTurnStopReason(stopReason) {
|
|
3
20
|
return stopReason !== "tool_use" && stopReason !== "tool_call";
|
|
4
21
|
}
|
|
@@ -116,6 +133,7 @@ function stripNextStepsBlock(text) {
|
|
|
116
133
|
export {
|
|
117
134
|
isFinalTurnStopReason,
|
|
118
135
|
parseNextSteps,
|
|
136
|
+
projectNextStepsToolInput,
|
|
119
137
|
stripNextStepsBlock
|
|
120
138
|
};
|
|
121
139
|
//# sourceMappingURL=next-steps.js.map
|
package/dist/outdated.js
CHANGED
|
@@ -2790,13 +2790,16 @@ function killWin32Tree(pid, opts = {}) {
|
|
|
2790
2790
|
};
|
|
2791
2791
|
child.on("error", settle);
|
|
2792
2792
|
child.on("close", settle);
|
|
2793
|
-
timeout = setTimeout(
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2793
|
+
timeout = setTimeout(
|
|
2794
|
+
() => {
|
|
2795
|
+
try {
|
|
2796
|
+
child.kill();
|
|
2797
|
+
} catch {
|
|
2798
|
+
}
|
|
2799
|
+
settle();
|
|
2800
|
+
},
|
|
2801
|
+
Math.max(1, opts.timeoutMs ?? WIN32_TASKKILL_TIMEOUT_MS)
|
|
2802
|
+
);
|
|
2800
2803
|
timeout.unref?.();
|
|
2801
2804
|
child.unref();
|
|
2802
2805
|
return true;
|
|
@@ -2984,7 +2987,10 @@ var init_process_registry = __esm({
|
|
|
2984
2987
|
getBreakerCountdown() {
|
|
2985
2988
|
if (this.autoKillArmedAt === null || this.autoKillResetMs <= 0) return null;
|
|
2986
2989
|
const elapsed = Date.now() - this.autoKillArmedAt;
|
|
2987
|
-
return {
|
|
2990
|
+
return {
|
|
2991
|
+
remainingMs: Math.max(0, this.autoKillResetMs - elapsed),
|
|
2992
|
+
totalMs: this.autoKillResetMs
|
|
2993
|
+
};
|
|
2988
2994
|
}
|
|
2989
2995
|
/**
|
|
2990
2996
|
* Subscribe to countdown arm/cancel events. Returns an unsubscribe function.
|