@wrongstack/tools 1.0.2 → 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/README.md +0 -6
- package/dist/_util.d.ts +18 -0
- package/dist/_win32-resolve.d.ts +1 -6
- package/dist/audit.js +6 -6
- package/dist/bash.js +3 -3
- package/dist/browser/index.d.ts +1 -1
- package/dist/browser/index.js +9 -1
- package/dist/browser/tools.d.ts +14 -0
- package/dist/builtin.d.ts +16 -13
- package/dist/builtin.js +43 -47
- package/dist/{chunk-DL2ARI4S.js → chunk-24Q4O34E.js} +5 -5
- package/dist/{chunk-AQ5YBURX.js → chunk-2IC5FRD7.js} +2 -2
- package/dist/{chunk-4ERMPDHV.js → chunk-2QY3DC3H.js} +20 -16
- package/dist/{chunk-VU3QBYL4.js → chunk-2ZWQIVEW.js} +2 -2
- package/dist/{chunk-JDOO4P6Z.js → chunk-3F7HQ3KS.js} +2 -2
- package/dist/{chunk-MJSJWXBF.js → chunk-47GYABZW.js} +15 -3
- package/dist/{chunk-6H4ERJP7.js → chunk-4KI4HHID.js} +3 -3
- package/dist/{chunk-X6KXNHUO.js → chunk-5BKQVP56.js} +22 -5
- package/dist/{chunk-KE7A76VC.js → chunk-5U5ULQX2.js} +4 -14
- package/dist/{chunk-SMARDKAC.js → chunk-5UA4TNJJ.js} +2 -2
- package/dist/{chunk-SOR7OCYP.js → chunk-6XYFYLN7.js} +23 -1
- package/dist/{chunk-KVTEIUND.js → chunk-A636Z2TG.js} +3 -3
- package/dist/{chunk-52UXXQMP.js → chunk-AX5ZG5O5.js} +3 -3
- package/dist/{chunk-7HL23T3T.js → chunk-BU6VUXWG.js} +2 -2
- package/dist/{chunk-WEEVSWQB.js → chunk-C64UUXTA.js} +4 -4
- package/dist/{chunk-4WPBS45A.js → chunk-D4HWMWGE.js} +4 -4
- package/dist/{chunk-DRRY6SCM.js → chunk-EMA2XENR.js} +2 -2
- package/dist/{chunk-TU5MTW2S.js → chunk-EMCIC2JA.js} +3 -3
- package/dist/{chunk-ASEXQRA7.js → chunk-FEXPWYU7.js} +7 -5
- package/dist/{chunk-ZUFHAHTE.js → chunk-HKR56VNF.js} +15 -2
- package/dist/{chunk-7N5U2RAU.js → chunk-JK5WXW4S.js} +3 -3
- package/dist/{chunk-T3SMFF5Q.js → chunk-JQ43NVFU.js} +2 -2
- package/dist/{chunk-7XUEPBNT.js → chunk-KVEL4EFI.js} +3 -3
- package/dist/{chunk-VZGPASGD.js → chunk-MG7CUN6R.js} +2 -2
- package/dist/{chunk-NFX2IUQA.js → chunk-NERS6GBT.js} +3 -3
- package/dist/{chunk-5KS24LTS.js → chunk-NKOTOW6X.js} +3 -3
- package/dist/{chunk-NJX2RXKJ.js → chunk-OBVXDVLE.js} +12 -4
- package/dist/{chunk-HWXIRVKH.js → chunk-OSXM3O3J.js} +29 -15
- package/dist/{chunk-LQSOU63Z.js → chunk-OZVGRDCM.js} +3 -3
- package/dist/{chunk-TI5COGLY.js → chunk-PVQBD3TA.js} +46 -6
- package/dist/{chunk-3D5DJWOE.js → chunk-R36RWYXE.js} +12 -4
- package/dist/{chunk-3AU6CZWL.js → chunk-REWOZIA4.js} +2 -2
- package/dist/{chunk-QA6IASYX.js → chunk-S6E2AM4U.js} +4 -4
- package/dist/{chunk-UCXFTCAI.js → chunk-T34DVSAE.js} +236 -177
- package/dist/{chunk-FBUP524S.js → chunk-TGVQMKVH.js} +15 -4
- package/dist/{chunk-MBR5VAB5.js → chunk-VQDSIHAR.js} +40 -2
- package/dist/{chunk-UOYRAS4J.js → chunk-VSOVZ5JI.js} +4 -4
- package/dist/{chunk-RV7BVTDG.js → chunk-WKXL5XHU.js} +2 -2
- package/dist/{chunk-DKHMPKDG.js → chunk-WWAXJKX3.js} +4 -4
- package/dist/{chunk-24T5XIJU.js → chunk-YA2ZYCJY.js} +4 -4
- package/dist/{chunk-MGPR7VG3.js → chunk-YILT3CSO.js} +3 -3
- package/dist/{chunk-6GOZTS6F.js → chunk-YJQQ5F5J.js} +4 -4
- package/dist/{chunk-EL2NJXSK.js → chunk-YZLOYJGN.js} +2 -2
- package/dist/{chunk-O6BY43ZB.js → chunk-ZETZHHV5.js} +4 -4
- package/dist/clarify.d.ts +18 -3
- package/dist/codebase-index/codebase-search-tool.d.ts +2 -3
- package/dist/codebase-index/index.js +9 -9
- package/dist/codebase-index/parser-worker-script.js +3 -3
- package/dist/codebase-index/project-server-endpoint.d.ts +33 -0
- package/dist/codebase-index/project-server.js +5 -5
- package/dist/codebase-index/worker.js +4 -4
- package/dist/diff.js +2 -2
- package/dist/e2e.js +2 -2
- package/dist/edit.js +8 -8
- package/dist/exec.js +3 -3
- package/dist/fetch.js +2 -2
- package/dist/format.js +6 -6
- package/dist/git.js +2 -2
- package/dist/glob.js +2 -2
- package/dist/{go-parser-QIEXU3P2.js → go-parser-EMKTAAD3.js} +2 -2
- package/dist/grep.js +2 -2
- package/dist/index.d.ts +2 -8
- package/dist/index.js +68 -84
- package/dist/install.js +6 -6
- package/dist/json.js +2 -2
- package/dist/kanban.js +2 -2
- package/dist/languages/index.js +4 -4
- package/dist/{legacy-bridge-YXANP5QB.js → legacy-bridge-XM2GV665.js} +6 -6
- package/dist/lint.js +6 -6
- package/dist/logs.js +2 -2
- package/dist/outdated.js +3 -3
- package/dist/pack.js +44 -48
- package/dist/{parser-dispatch-37FT3EXQ.js → parser-dispatch-IF75EZFB.js} +4 -4
- package/dist/patch.js +8 -8
- package/dist/plan.js +4 -4
- package/dist/{py-parser-6GJTGUXK.js → py-parser-DDG53RXI.js} +3 -3
- package/dist/read-url-content.d.ts +17 -0
- package/dist/read.js +8 -8
- package/dist/replace.js +8 -8
- package/dist/session-kanban.js +1 -1
- package/dist/task.js +4 -4
- package/dist/test.js +6 -6
- package/dist/todo.js +3 -3
- package/dist/tool-search.js +1 -1
- package/dist/tool-tier.d.ts +12 -2
- package/dist/tool-tier.js +45 -49
- package/dist/tree.js +2 -2
- package/dist/typecheck.js +6 -6
- package/dist/win32.js +1 -1
- package/dist/write.js +8 -8
- package/package.json +5 -21
- package/dist/batch-tool-use.d.ts +0 -24
- package/dist/batch-tool-use.js +0 -7
- package/dist/chunk-7ODZTPCU.js +0 -128
- package/dist/chunk-CHEK3ASV.js +0 -183
- package/dist/chunk-KLJZ4WV4.js +0 -213
- package/dist/chunk-VBF2YXUW.js +0 -203
- package/dist/document.d.ts +0 -25
- package/dist/document.js +0 -8
- package/dist/scaffold.d.ts +0 -23
- package/dist/scaffold.js +0 -10
- package/dist/set-working-dir.d.ts +0 -17
- package/dist/tool-help.d.ts +0 -21
- package/dist/tool-help.js +0 -7
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveIndexDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-AX5ZG5O5.js";
|
|
4
4
|
|
|
5
5
|
// src/codebase-index/project-server-endpoint.ts
|
|
6
6
|
import { createHash } from "node:crypto";
|
|
@@ -10,6 +10,8 @@ import * as path from "node:path";
|
|
|
10
10
|
import { fileURLToPath } from "node:url";
|
|
11
11
|
var PROJECT_INDEX_SERVER_PROTOCOL_VERSION = 1;
|
|
12
12
|
var PROJECT_INDEX_SERVER_METADATA_FILE = "server.json";
|
|
13
|
+
var PROJECT_INDEX_SERVER_STDERR_FILE = "server.err.log";
|
|
14
|
+
var PROJECT_INDEX_SERVER_STDERR_MAX_BYTES = 64 * 1024;
|
|
13
15
|
var PROJECT_INDEX_SERVER_SOCKET_DIR = `wsci-v${PROJECT_INDEX_SERVER_PROTOCOL_VERSION}`;
|
|
14
16
|
var buildIdCache;
|
|
15
17
|
function projectIndexServerBuildId(entrypoint) {
|
|
@@ -49,6 +51,38 @@ function projectIndexServerMetadataPath(projectRoot, indexDir) {
|
|
|
49
51
|
PROJECT_INDEX_SERVER_METADATA_FILE
|
|
50
52
|
);
|
|
51
53
|
}
|
|
54
|
+
function projectIndexServerStderrPath(projectRoot, indexDir) {
|
|
55
|
+
return path.join(
|
|
56
|
+
path.resolve(resolveIndexDir(projectRoot, indexDir)),
|
|
57
|
+
PROJECT_INDEX_SERVER_STDERR_FILE
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
function readProjectIndexServerStderrTail(path_, maxLines = 4) {
|
|
61
|
+
let raw;
|
|
62
|
+
try {
|
|
63
|
+
const { size } = fs.statSync(path_);
|
|
64
|
+
const start = Math.max(0, size - PROJECT_INDEX_SERVER_STDERR_MAX_BYTES);
|
|
65
|
+
const fd = fs.openSync(path_, "r");
|
|
66
|
+
try {
|
|
67
|
+
const length = size - start;
|
|
68
|
+
if (length <= 0) return null;
|
|
69
|
+
const buffer = Buffer.alloc(length);
|
|
70
|
+
fs.readSync(fd, buffer, 0, length, start);
|
|
71
|
+
raw = buffer.toString("utf8");
|
|
72
|
+
} finally {
|
|
73
|
+
fs.closeSync(fd);
|
|
74
|
+
}
|
|
75
|
+
} catch {
|
|
76
|
+
return null;
|
|
77
|
+
}
|
|
78
|
+
const lines = raw.split(/\r?\n/).map((line) => line.trim()).filter((line) => line.length > 0);
|
|
79
|
+
if (lines.length === 0) return null;
|
|
80
|
+
return lines.slice(-maxLines).join(" | ");
|
|
81
|
+
}
|
|
82
|
+
var PROJECT_INDEX_SERVER_CLOSED_MESSAGE = "codebase-index server connection closed";
|
|
83
|
+
function formatProjectIndexServerCloseError(tail) {
|
|
84
|
+
return tail ? `${PROJECT_INDEX_SERVER_CLOSED_MESSAGE} (server stderr: ${tail})` : PROJECT_INDEX_SERVER_CLOSED_MESSAGE;
|
|
85
|
+
}
|
|
52
86
|
|
|
53
87
|
// src/codebase-index/binary-frame.ts
|
|
54
88
|
import { decode, encode } from "@msgpack/msgpack";
|
|
@@ -114,10 +148,14 @@ export {
|
|
|
114
148
|
encodeBinaryFrame,
|
|
115
149
|
decodeBinaryFrame,
|
|
116
150
|
PROJECT_INDEX_SERVER_PROTOCOL_VERSION,
|
|
151
|
+
PROJECT_INDEX_SERVER_STDERR_MAX_BYTES,
|
|
117
152
|
projectIndexServerBuildId,
|
|
118
153
|
projectIndexServerEndpoint,
|
|
119
154
|
projectIndexServerMetadataPath,
|
|
155
|
+
projectIndexServerStderrPath,
|
|
156
|
+
readProjectIndexServerStderrTail,
|
|
157
|
+
formatProjectIndexServerCloseError,
|
|
120
158
|
PROJECT_INDEX_SERVER_MAX_FRAME_CHARS,
|
|
121
159
|
encodeProjectServerMessage
|
|
122
160
|
};
|
|
123
|
-
//# sourceMappingURL=chunk-
|
|
161
|
+
//# sourceMappingURL=chunk-VQDSIHAR.js.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getIndexState,
|
|
3
3
|
searchCodebaseIndex
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-PVQBD3TA.js";
|
|
5
5
|
import {
|
|
6
6
|
codebaseIndexDirOverride
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-AX5ZG5O5.js";
|
|
8
8
|
import {
|
|
9
9
|
isBinaryBuffer,
|
|
10
10
|
safeResolveReal,
|
|
11
11
|
sha256hex
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-HKR56VNF.js";
|
|
13
13
|
|
|
14
14
|
// src/read.ts
|
|
15
15
|
import * as fs from "node:fs/promises";
|
|
@@ -340,4 +340,4 @@ ${interesting.join("\n")}` : "symbols/imports: (none detected)"
|
|
|
340
340
|
export {
|
|
341
341
|
readTool
|
|
342
342
|
};
|
|
343
|
-
//# sourceMappingURL=chunk-
|
|
343
|
+
//# sourceMappingURL=chunk-VSOVZ5JI.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
safeResolveReal
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-HKR56VNF.js";
|
|
4
4
|
|
|
5
5
|
// src/e2e.ts
|
|
6
6
|
import { open, readdir } from "node:fs/promises";
|
|
@@ -422,4 +422,4 @@ export {
|
|
|
422
422
|
discoverE2EProjects,
|
|
423
423
|
e2ePlanTool
|
|
424
424
|
};
|
|
425
|
-
//# sourceMappingURL=chunk-
|
|
425
|
+
//# sourceMappingURL=chunk-WKXL5XHU.js.map
|
|
@@ -6,13 +6,13 @@ import {
|
|
|
6
6
|
} from "./chunk-ZBMANLYH.js";
|
|
7
7
|
import {
|
|
8
8
|
enqueueReindex
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-PVQBD3TA.js";
|
|
10
10
|
import {
|
|
11
11
|
isBinaryBuffer,
|
|
12
12
|
safeResolveReal,
|
|
13
13
|
sha256hex,
|
|
14
14
|
truncateDiffPayload
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-HKR56VNF.js";
|
|
16
16
|
|
|
17
17
|
// src/replace.ts
|
|
18
18
|
import { spawn } from "node:child_process";
|
|
@@ -274,7 +274,7 @@ function passesExtraGlob(extraGlob, name, full, base) {
|
|
|
274
274
|
return extraGlob.test(full);
|
|
275
275
|
}
|
|
276
276
|
async function resolveFiles(filesInput, ctx, extraGlob) {
|
|
277
|
-
const base = ctx.cwd;
|
|
277
|
+
const base = ctx.workingDir ?? ctx.cwd;
|
|
278
278
|
const parts = Array.isArray(filesInput) ? filesInput.filter((s) => typeof s === "string").map((s) => s.trim()).filter(Boolean) : filesInput.trim().split(",").map((s) => s.trim()).filter(Boolean);
|
|
279
279
|
const resolved = [];
|
|
280
280
|
for (const p of parts) {
|
|
@@ -413,4 +413,4 @@ export {
|
|
|
413
413
|
replaceTool,
|
|
414
414
|
__resetRgDetectionForTests
|
|
415
415
|
};
|
|
416
|
-
//# sourceMappingURL=chunk-
|
|
416
|
+
//# sourceMappingURL=chunk-WWAXJKX3.js.map
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
var toolSearchTool = {
|
|
3
3
|
name: "tool_search",
|
|
4
4
|
category: "Meta",
|
|
5
|
-
description: "Search the catalog of available tools by name or description. Use this to discover which tool to use for a task
|
|
6
|
-
usageHint: "SELF-DISCOVERY TOOL:\n\n- Use when you need to find the right tool for a job.\n- `query` searches names and descriptions.\n- You can filter by `tags` (category), `permission`, or `mutating`.\n-
|
|
5
|
+
description: "Search the catalog of available tools by name or description. Use this to discover which tool to use for a task, including tools whose schemas were withheld from this request to save tokens.",
|
|
6
|
+
usageHint: "SELF-DISCOVERY TOOL:\n\n- Use when you need to find the right tool for a job.\n- `query` searches names and descriptions.\n- You can filter by `tags` (category), `permission`, or `mutating`.\n- The catalog searched here is the full registry, not just the tools listed in this request.\n- Once you find the right tool name, invoke it with `tool_use`.\nCall this before concluding a capability is unavailable.",
|
|
7
7
|
permission: "auto",
|
|
8
8
|
mutating: false,
|
|
9
9
|
timeoutMs: 1e3,
|
|
@@ -68,7 +68,7 @@ var toolSearchTool = {
|
|
|
68
68
|
mutating: t.mutating
|
|
69
69
|
}));
|
|
70
70
|
const totalAvailable = tools.length;
|
|
71
|
-
const hint = results.length === 0 && query ? `No tools matched "${input.query}".
|
|
71
|
+
const hint = results.length === 0 && query ? `No tools matched "${input.query}". ${totalAvailable} tools are available; call tool_search with no query to list them all.` : void 0;
|
|
72
72
|
return {
|
|
73
73
|
tools: results,
|
|
74
74
|
total: filtered.length,
|
|
@@ -82,4 +82,4 @@ var toolSearchTool = {
|
|
|
82
82
|
export {
|
|
83
83
|
toolSearchTool
|
|
84
84
|
};
|
|
85
|
-
//# sourceMappingURL=chunk-
|
|
85
|
+
//# sourceMappingURL=chunk-YA2ZYCJY.js.map
|
|
@@ -15,12 +15,12 @@ import {
|
|
|
15
15
|
import {
|
|
16
16
|
buildWin32CmdShimInvocation,
|
|
17
17
|
resolveWin32Command
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-5U5ULQX2.js";
|
|
19
19
|
import {
|
|
20
20
|
COMMAND_OUTPUT_MAX_BYTES,
|
|
21
21
|
normalizeCommandOutput,
|
|
22
22
|
safeResolveReal
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-HKR56VNF.js";
|
|
24
24
|
|
|
25
25
|
// src/exec.ts
|
|
26
26
|
import { spawn } from "node:child_process";
|
|
@@ -1835,4 +1835,4 @@ export {
|
|
|
1835
1835
|
getExecAllowlist,
|
|
1836
1836
|
execTool
|
|
1837
1837
|
};
|
|
1838
|
-
//# sourceMappingURL=chunk-
|
|
1838
|
+
//# sourceMappingURL=chunk-YILT3CSO.js.map
|
|
@@ -5,13 +5,13 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
buildWin32CmdShimInvocation,
|
|
7
7
|
resolveWin32Command
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-5U5ULQX2.js";
|
|
9
9
|
import {
|
|
10
10
|
COMMAND_OUTPUT_MAX_BYTES,
|
|
11
11
|
detectPackageManager,
|
|
12
12
|
normalizeCommandOutput,
|
|
13
13
|
safeResolveReal
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-HKR56VNF.js";
|
|
15
15
|
|
|
16
16
|
// src/outdated.ts
|
|
17
17
|
import { spawn } from "node:child_process";
|
|
@@ -66,7 +66,7 @@ var outdatedTool = {
|
|
|
66
66
|
const manager = await detectPackageManager(cwd, ctx.projectRoot);
|
|
67
67
|
if (manager === "npm") {
|
|
68
68
|
try {
|
|
69
|
-
const { detectNonJsEcosystem } = await import("./legacy-bridge-
|
|
69
|
+
const { detectNonJsEcosystem } = await import("./legacy-bridge-XM2GV665.js");
|
|
70
70
|
const nonJs = await detectNonJsEcosystem(cwd, ctx.projectRoot);
|
|
71
71
|
if (nonJs) {
|
|
72
72
|
const { planLanguageOperation, executePackagePlan } = await import("./languages/index.js");
|
|
@@ -282,4 +282,4 @@ Note: exit code 1 from \`outdated\` means outdated packages were found (expected
|
|
|
282
282
|
export {
|
|
283
283
|
outdatedTool
|
|
284
284
|
};
|
|
285
|
-
//# sourceMappingURL=chunk-
|
|
285
|
+
//# sourceMappingURL=chunk-YJQQ5F5J.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
builtinTools
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-T34DVSAE.js";
|
|
4
4
|
|
|
5
5
|
// src/pack.ts
|
|
6
6
|
var builtinToolsPack = {
|
|
@@ -12,4 +12,4 @@ var builtinToolsPack = {
|
|
|
12
12
|
export {
|
|
13
13
|
builtinToolsPack
|
|
14
14
|
};
|
|
15
|
-
//# sourceMappingURL=chunk-
|
|
15
|
+
//# sourceMappingURL=chunk-YZLOYJGN.js.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
tryLegacyPackageOperation
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JQ43NVFU.js";
|
|
4
4
|
import {
|
|
5
5
|
spawnStream
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-EMA2XENR.js";
|
|
7
7
|
import {
|
|
8
8
|
detectPackageManager,
|
|
9
9
|
normalizeCommandOutput,
|
|
10
10
|
safeResolveReal
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-HKR56VNF.js";
|
|
12
12
|
|
|
13
13
|
// src/install.ts
|
|
14
14
|
import { join } from "node:path";
|
|
@@ -253,4 +253,4 @@ function resolveManifestPath(cwd, pkgManager) {
|
|
|
253
253
|
export {
|
|
254
254
|
installTool
|
|
255
255
|
};
|
|
256
|
-
//# sourceMappingURL=chunk-
|
|
256
|
+
//# sourceMappingURL=chunk-ZETZHHV5.js.map
|
package/dist/clarify.d.ts
CHANGED
|
@@ -3,29 +3,44 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Prompts the user with structured, multiple-choice questions when architectural,
|
|
5
5
|
* database schema, API contract, or domain logic assumptions are underspecified.
|
|
6
|
-
*
|
|
6
|
+
* Bridges clarify + ask_question into a single unified interactive tool
|
|
7
|
+
* functioning consistently across CLI, TUI, and WebUI.
|
|
7
8
|
*/
|
|
8
9
|
import type { Tool } from '@wrongstack/core/types';
|
|
9
|
-
export interface
|
|
10
|
+
export interface ClarifyQuestionItem {
|
|
10
11
|
/** The core decision or question to clarify with the user. */
|
|
11
12
|
question: string;
|
|
12
13
|
/** Context or explanation of why this decision matters (e.g. index performance, validation). */
|
|
13
14
|
context?: string | undefined;
|
|
14
|
-
/** 2 to
|
|
15
|
+
/** 2 to 6 structured, distinct choices for the user to select. */
|
|
15
16
|
options: string[];
|
|
16
17
|
/** The option recommended by the assistant based on best practices. */
|
|
17
18
|
recommendedOption?: string | undefined;
|
|
18
19
|
/** Whether the user can select multiple options simultaneously. */
|
|
19
20
|
isMultiSelect?: boolean | undefined;
|
|
21
|
+
/** Snake-case alias for isMultiSelect (Antigravity compatibility). */
|
|
22
|
+
is_multi_select?: boolean | undefined;
|
|
20
23
|
/** Allow write-in custom responses in addition to options (default: true). */
|
|
21
24
|
allowCustomResponse?: boolean | undefined;
|
|
22
25
|
}
|
|
26
|
+
export interface ClarifyQuestionInput extends Partial<ClarifyQuestionItem> {
|
|
27
|
+
/** Batch questions list (Antigravity ask_question parity). */
|
|
28
|
+
questions?: ClarifyQuestionItem[] | undefined;
|
|
29
|
+
}
|
|
23
30
|
export type ClarifyInput = ClarifyQuestionInput;
|
|
31
|
+
export interface ClarifyAnswerItem {
|
|
32
|
+
question: string;
|
|
33
|
+
selectedOptions: string[];
|
|
34
|
+
customResponse?: string | undefined;
|
|
35
|
+
}
|
|
24
36
|
export interface ClarifyOutput {
|
|
25
37
|
status: 'answered' | 'auto_decided' | 'skipped';
|
|
38
|
+
/** Primary / single question (for backward compatibility). */
|
|
26
39
|
question: string;
|
|
27
40
|
selectedOptions: string[];
|
|
28
41
|
customResponse?: string | undefined;
|
|
42
|
+
/** Complete list of answers when clarifying one or more questions. */
|
|
43
|
+
answers?: ClarifyAnswerItem[] | undefined;
|
|
29
44
|
decisionSummary: string;
|
|
30
45
|
error?: string | undefined;
|
|
31
46
|
}
|
|
@@ -35,9 +35,8 @@ export interface CodebaseSearchInput {
|
|
|
35
35
|
limit?: number | undefined;
|
|
36
36
|
lspKind?: number | undefined;
|
|
37
37
|
/**
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
* active it intercepts the tool and provides live LSP workspaceSymbol results.
|
|
38
|
+
* Deprecated compatibility hint. The built-in tool is index-only; the LSP
|
|
39
|
+
* plugin exposes live workspace-symbol search as `codebase-lsp-search`.
|
|
41
40
|
*/
|
|
42
41
|
preferLsp?: boolean | undefined;
|
|
43
42
|
}
|
|
@@ -51,9 +51,9 @@ import {
|
|
|
51
51
|
setContextQueryEmbedder,
|
|
52
52
|
writeAtlas,
|
|
53
53
|
writeProjectAtlas
|
|
54
|
-
} from "../chunk-
|
|
54
|
+
} from "../chunk-OSXM3O3J.js";
|
|
55
55
|
import "../chunk-XRNN44QY.js";
|
|
56
|
-
import "../chunk-
|
|
56
|
+
import "../chunk-EMA2XENR.js";
|
|
57
57
|
import "../chunk-SCMRM6NL.js";
|
|
58
58
|
import "../chunk-HDYUBRMF.js";
|
|
59
59
|
import "../chunk-7JJFC6CT.js";
|
|
@@ -78,11 +78,11 @@ import {
|
|
|
78
78
|
shutdownCodebaseIndexHost,
|
|
79
79
|
shutdownCodebaseIndexServer,
|
|
80
80
|
symbolGraphService
|
|
81
|
-
} from "../chunk-
|
|
81
|
+
} from "../chunk-PVQBD3TA.js";
|
|
82
82
|
import {
|
|
83
83
|
projectIndexServerEndpoint,
|
|
84
84
|
projectIndexServerMetadataPath
|
|
85
|
-
} from "../chunk-
|
|
85
|
+
} from "../chunk-VQDSIHAR.js";
|
|
86
86
|
import {
|
|
87
87
|
CONCEPT_RELATIONS,
|
|
88
88
|
CONTRADICTED_VISIBILITY_WEIGHT,
|
|
@@ -122,9 +122,9 @@ import {
|
|
|
122
122
|
shouldRefreshRanks,
|
|
123
123
|
toSymbolRankRows,
|
|
124
124
|
tokenise
|
|
125
|
-
} from "../chunk-
|
|
126
|
-
import "../chunk-
|
|
127
|
-
import "../chunk-
|
|
125
|
+
} from "../chunk-AX5ZG5O5.js";
|
|
126
|
+
import "../chunk-24Q4O34E.js";
|
|
127
|
+
import "../chunk-REWOZIA4.js";
|
|
128
128
|
import "../chunk-6IEBD27U.js";
|
|
129
129
|
import {
|
|
130
130
|
getCodebaseIndexPerfSnapshot,
|
|
@@ -139,8 +139,8 @@ import {
|
|
|
139
139
|
compileGitignore,
|
|
140
140
|
loadGitignoreMatcher
|
|
141
141
|
} from "../chunk-2CTZW6JQ.js";
|
|
142
|
-
import "../chunk-
|
|
143
|
-
import "../chunk-
|
|
142
|
+
import "../chunk-5U5ULQX2.js";
|
|
143
|
+
import "../chunk-HKR56VNF.js";
|
|
144
144
|
export {
|
|
145
145
|
ATLAS_DIR,
|
|
146
146
|
ATLAS_FILE_LIMIT,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parseFilesContent
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-24Q4O34E.js";
|
|
4
|
+
import "../chunk-REWOZIA4.js";
|
|
5
5
|
import "../chunk-6IEBD27U.js";
|
|
6
6
|
import "../chunk-ZKC5UNGD.js";
|
|
7
7
|
import "../chunk-YOHO4DVT.js";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-5U5ULQX2.js";
|
|
9
9
|
|
|
10
10
|
// src/codebase-index/parser-worker-script.ts
|
|
11
11
|
import { parentPort, threadId } from "node:worker_threads";
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export declare const PROJECT_INDEX_SERVER_PROTOCOL_VERSION = 1;
|
|
2
|
+
/** Keep only the tail; a daemon that crash-loops must not fill the disk. */
|
|
3
|
+
export declare const PROJECT_INDEX_SERVER_STDERR_MAX_BYTES: number;
|
|
2
4
|
/**
|
|
3
5
|
* Content identity for the actual server artifact.
|
|
4
6
|
*
|
|
@@ -33,4 +35,35 @@ export declare function projectIndexServerKey(projectRoot: string, indexDir?: st
|
|
|
33
35
|
*/
|
|
34
36
|
export declare function projectIndexServerEndpoint(projectRoot: string, indexDir?: string): string;
|
|
35
37
|
export declare function projectIndexServerMetadataPath(projectRoot: string, indexDir?: string): string;
|
|
38
|
+
/**
|
|
39
|
+
* Where a detached daemon's stderr is kept.
|
|
40
|
+
*
|
|
41
|
+
* The daemon used to be spawned with `stdio: 'ignore'`, so when it died the
|
|
42
|
+
* only trace was the client's `codebase-index server connection closed` —
|
|
43
|
+
* a message that names the symptom and no cause. Node writes an uncaught
|
|
44
|
+
* exception's stack to stderr before exiting, and V8 writes its fatal
|
|
45
|
+
* out-of-memory message there too (which no JS handler can intercept), so
|
|
46
|
+
* keeping the stream is what makes a dead daemon explain itself.
|
|
47
|
+
*/
|
|
48
|
+
export declare function projectIndexServerStderrPath(projectRoot: string, indexDir?: string): string;
|
|
49
|
+
/**
|
|
50
|
+
* The tail of a daemon's stderr, condensed to one line for an error message.
|
|
51
|
+
*
|
|
52
|
+
* Returns null when there is nothing useful: no file, an empty one, or only
|
|
53
|
+
* whitespace. Reads at most the last `PROJECT_INDEX_SERVER_STDERR_MAX_BYTES`
|
|
54
|
+
* so a large file cannot be pulled into memory here.
|
|
55
|
+
*/
|
|
56
|
+
export declare function readProjectIndexServerStderrTail(path_: string, maxLines?: number): string | null;
|
|
57
|
+
/** The base close message. Kept as a PREFIX so existing substring matchers
|
|
58
|
+
* (and anyone grepping logs for it) keep working when a reason is appended. */
|
|
59
|
+
export declare const PROJECT_INDEX_SERVER_CLOSED_MESSAGE = "codebase-index server connection closed";
|
|
60
|
+
/**
|
|
61
|
+
* Compose the error a closed connection rejects with.
|
|
62
|
+
*
|
|
63
|
+
* A closed socket has two very different causes — an orderly shutdown and the
|
|
64
|
+
* daemon dying — and they used to be reported identically. When the daemon
|
|
65
|
+
* left something on stderr, that text is the whole difference between a
|
|
66
|
+
* failure someone can act on and one that reads as a flake.
|
|
67
|
+
*/
|
|
68
|
+
export declare function formatProjectIndexServerCloseError(tail: string | null): string;
|
|
36
69
|
//# sourceMappingURL=project-server-endpoint.d.ts.map
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
projectIndexServerBuildId,
|
|
11
11
|
projectIndexServerEndpoint,
|
|
12
12
|
projectIndexServerMetadataPath
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-VQDSIHAR.js";
|
|
14
14
|
import {
|
|
15
15
|
contextService,
|
|
16
16
|
fileGraphService,
|
|
@@ -24,9 +24,9 @@ import {
|
|
|
24
24
|
statsService,
|
|
25
25
|
symbolGraphService,
|
|
26
26
|
vectorSearchService
|
|
27
|
-
} from "../chunk-
|
|
28
|
-
import "../chunk-
|
|
29
|
-
import "../chunk-
|
|
27
|
+
} from "../chunk-AX5ZG5O5.js";
|
|
28
|
+
import "../chunk-24Q4O34E.js";
|
|
29
|
+
import "../chunk-REWOZIA4.js";
|
|
30
30
|
import "../chunk-6IEBD27U.js";
|
|
31
31
|
import {
|
|
32
32
|
recordWriteQueueWait
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
isIndexablePath
|
|
36
36
|
} from "../chunk-YOHO4DVT.js";
|
|
37
37
|
import "../chunk-2CTZW6JQ.js";
|
|
38
|
-
import "../chunk-
|
|
38
|
+
import "../chunk-5U5ULQX2.js";
|
|
39
39
|
|
|
40
40
|
// src/codebase-index/project-server.ts
|
|
41
41
|
import { randomBytes } from "node:crypto";
|
|
@@ -9,14 +9,14 @@ import {
|
|
|
9
9
|
statsService,
|
|
10
10
|
symbolGraphService,
|
|
11
11
|
vectorSearchService
|
|
12
|
-
} from "../chunk-
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
12
|
+
} from "../chunk-AX5ZG5O5.js";
|
|
13
|
+
import "../chunk-24Q4O34E.js";
|
|
14
|
+
import "../chunk-REWOZIA4.js";
|
|
15
15
|
import "../chunk-6IEBD27U.js";
|
|
16
16
|
import "../chunk-ZKC5UNGD.js";
|
|
17
17
|
import "../chunk-YOHO4DVT.js";
|
|
18
18
|
import "../chunk-2CTZW6JQ.js";
|
|
19
|
-
import "../chunk-
|
|
19
|
+
import "../chunk-5U5ULQX2.js";
|
|
20
20
|
|
|
21
21
|
// src/codebase-index/worker.ts
|
|
22
22
|
import { parentPort } from "node:worker_threads";
|
package/dist/diff.js
CHANGED
package/dist/e2e.js
CHANGED
package/dist/edit.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
editTool
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KVEL4EFI.js";
|
|
4
4
|
import "./chunk-MSOAX3GC.js";
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-PVQBD3TA.js";
|
|
6
|
+
import "./chunk-VQDSIHAR.js";
|
|
7
|
+
import "./chunk-AX5ZG5O5.js";
|
|
8
|
+
import "./chunk-24Q4O34E.js";
|
|
9
|
+
import "./chunk-REWOZIA4.js";
|
|
10
10
|
import "./chunk-6IEBD27U.js";
|
|
11
11
|
import "./chunk-ZKC5UNGD.js";
|
|
12
12
|
import "./chunk-YOHO4DVT.js";
|
|
13
13
|
import "./chunk-2CTZW6JQ.js";
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-5U5ULQX2.js";
|
|
15
|
+
import "./chunk-HKR56VNF.js";
|
|
16
16
|
export {
|
|
17
17
|
editTool
|
|
18
18
|
};
|
package/dist/exec.js
CHANGED
|
@@ -7,14 +7,14 @@ import {
|
|
|
7
7
|
isExecCommandAllowed,
|
|
8
8
|
resetDangerBypass,
|
|
9
9
|
resetExecPolicy
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-YILT3CSO.js";
|
|
11
11
|
import "./chunk-BTSFTGIL.js";
|
|
12
12
|
import "./chunk-PVCB7RUZ.js";
|
|
13
13
|
import "./chunk-SCMRM6NL.js";
|
|
14
14
|
import "./chunk-HDYUBRMF.js";
|
|
15
15
|
import "./chunk-7JJFC6CT.js";
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-5U5ULQX2.js";
|
|
17
|
+
import "./chunk-HKR56VNF.js";
|
|
18
18
|
export {
|
|
19
19
|
configureDangerBypass,
|
|
20
20
|
configureExecPolicy,
|
package/dist/fetch.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
fetchTool
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-47GYABZW.js";
|
|
4
4
|
import {
|
|
5
5
|
guardedFetch,
|
|
6
6
|
guardedLookup
|
|
7
7
|
} from "./chunk-NBDZMMG2.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-HKR56VNF.js";
|
|
9
9
|
export {
|
|
10
10
|
fetchTool,
|
|
11
11
|
guardedFetch,
|
package/dist/format.js
CHANGED
|
@@ -2,15 +2,15 @@ import {
|
|
|
2
2
|
detectFixer,
|
|
3
3
|
formatTool,
|
|
4
4
|
parseFormatterCounts
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-OBVXDVLE.js";
|
|
6
|
+
import "./chunk-JQ43NVFU.js";
|
|
7
|
+
import "./chunk-JK5WXW4S.js";
|
|
8
|
+
import "./chunk-EMA2XENR.js";
|
|
9
9
|
import "./chunk-SCMRM6NL.js";
|
|
10
10
|
import "./chunk-HDYUBRMF.js";
|
|
11
11
|
import "./chunk-7JJFC6CT.js";
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-5U5ULQX2.js";
|
|
13
|
+
import "./chunk-HKR56VNF.js";
|
|
14
14
|
export {
|
|
15
15
|
detectFixer,
|
|
16
16
|
formatTool,
|
package/dist/git.js
CHANGED
package/dist/glob.js
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from "./chunk-YOHO4DVT.js";
|
|
9
9
|
import {
|
|
10
10
|
resolveWin32Command
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-5U5ULQX2.js";
|
|
12
12
|
|
|
13
13
|
// src/codebase-index/go-parser.ts
|
|
14
14
|
import { spawn } from "node:child_process";
|
|
@@ -468,4 +468,4 @@ export {
|
|
|
468
468
|
detectLang,
|
|
469
469
|
parseSymbols
|
|
470
470
|
};
|
|
471
|
-
//# sourceMappingURL=go-parser-
|
|
471
|
+
//# sourceMappingURL=go-parser-EMKTAAD3.js.map
|
package/dist/grep.js
CHANGED
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
__resetRgDetectionForTests,
|
|
3
3
|
__setRgAvailableForTests,
|
|
4
4
|
grepTool
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-2QY3DC3H.js";
|
|
6
6
|
import "./chunk-YJTXRH5Y.js";
|
|
7
7
|
import "./chunk-ZBMANLYH.js";
|
|
8
8
|
import "./chunk-2CTZW6JQ.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-HKR56VNF.js";
|
|
10
10
|
export {
|
|
11
11
|
__resetRgDetectionForTests,
|
|
12
12
|
__setRgAvailableForTests,
|