@wrongstack/tools 0.317.0 → 0.318.0
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/_spawn-stream.d.ts +1 -1
- package/dist/audit.d.ts +37 -2
- package/dist/audit.js +4 -4
- package/dist/bash.js +1 -1
- package/dist/batch-tool-use.js +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/browser/tools.d.ts +16 -1
- package/dist/builtin.js +43 -43
- package/dist/{chunk-SDLVH5RZ.js → chunk-3QQSBUXR.js} +6 -5
- package/dist/{chunk-YGG6X57C.js → chunk-3U4H6ZRF.js} +12 -9
- package/dist/{chunk-K3WNSHUF.js → chunk-45JPRMC2.js} +62 -36
- package/dist/{chunk-EJWSCQ6D.js → chunk-4AEZIFOW.js} +6 -5
- package/dist/{chunk-PQKK5JH7.js → chunk-4E42D7UF.js} +2 -2
- package/dist/{chunk-JRJJX3L5.js → chunk-5WNDJHT6.js} +3 -2
- package/dist/{chunk-7EY5DCRO.js → chunk-5ZYEGP2P.js} +4 -4
- package/dist/{chunk-VGBUDLW4.js → chunk-6GVXZCQV.js} +7 -6
- package/dist/{chunk-UNSKG6DC.js → chunk-6GZPSWP3.js} +10 -15
- package/dist/{chunk-5OAOKALG.js → chunk-AGUSOFNI.js} +4 -3
- package/dist/{chunk-TRDX25UH.js → chunk-BLCSYKNN.js} +293 -86
- package/dist/{chunk-U6DZWHBA.js → chunk-CIFAIIHI.js} +9 -7
- package/dist/{chunk-HPEO4EA7.js → chunk-CISOLTOP.js} +35 -17
- package/dist/{chunk-RGISBZBD.js → chunk-CPSAF2AU.js} +3 -2
- package/dist/{chunk-BSLVR56S.js → chunk-CPVLVQYT.js} +6 -5
- package/dist/{chunk-VJNHFZ7J.js → chunk-CVALEVGA.js} +6 -5
- package/dist/{chunk-PY2IOS7C.js → chunk-CWALNI6K.js} +5 -5
- package/dist/{chunk-LIJQMYYX.js → chunk-DTQ75VBC.js} +8 -3
- package/dist/{chunk-553IQUMO.js → chunk-EOOFNYIT.js} +7 -6
- package/dist/{chunk-JNNVRHMV.js → chunk-FJEQZHZN.js} +8 -8
- package/dist/{chunk-S5CCLZL3.js → chunk-FRN7TIAA.js} +2 -2
- package/dist/{chunk-NKJW5GFO.js → chunk-H6AWAZ2Y.js} +3 -3
- package/dist/{chunk-IVWV2UM6.js → chunk-HTYEO67J.js} +6 -5
- package/dist/{chunk-IYK7XGDZ.js → chunk-JJQB6R7Y.js} +7 -7
- package/dist/{chunk-DSEANA2W.js → chunk-K23JNFE3.js} +37 -36
- package/dist/{chunk-LWKUTMD5.js → chunk-MRZOVQ5D.js} +6 -5
- package/dist/{chunk-PCHQ6YRR.js → chunk-MX25MTDJ.js} +2 -2
- package/dist/{chunk-U4D5S3VQ.js → chunk-NWZ6XGBJ.js} +2 -1
- package/dist/{chunk-UKU2ZX4C.js → chunk-P7ZQ2FAJ.js} +27 -17
- package/dist/{chunk-4I4LWFOO.js → chunk-PQTONQ4P.js} +16 -11
- package/dist/{chunk-P7FYFZ6M.js → chunk-S2GBLQ5S.js} +11 -7
- package/dist/{chunk-OUBDL3WH.js → chunk-SOG7XIRF.js} +11 -8
- package/dist/{chunk-AHHDWNXC.js → chunk-TKA4VEX2.js} +2 -2
- package/dist/{chunk-5H4GSJAI.js → chunk-UE3UBMCP.js} +7 -6
- package/dist/{chunk-IXMNTNW5.js → chunk-UKGMDCXT.js} +4 -3
- package/dist/{chunk-QDQY7NQ2.js → chunk-VZLX2JZG.js} +5 -5
- package/dist/{chunk-T2F4S7U4.js → chunk-WI3VDXHD.js} +18 -8
- package/dist/{chunk-O4MBV4AX.js → chunk-WJYXMB2R.js} +6 -5
- package/dist/{chunk-U4VAATKP.js → chunk-WXJY3BKV.js} +16 -6
- package/dist/{chunk-DR7JOQTC.js → chunk-X5K3U6GI.js} +3 -3
- package/dist/{chunk-JQRIR762.js → chunk-YF3D5INN.js} +27 -19
- package/dist/{chunk-TEBQ4VPZ.js → chunk-YOHO4DVT.js} +6 -5
- package/dist/{chunk-RXISBFR5.js → chunk-ZE6KLBUO.js} +5 -4
- package/dist/{chunk-22B7GE5T.js → chunk-ZHH3BEWU.js} +13 -12
- package/dist/{chunk-XGHMUZ77.js → chunk-ZZT45EHF.js} +3 -3
- package/dist/codebase-index/bm25.d.ts +14 -1
- package/dist/codebase-index/index.d.ts +1 -0
- package/dist/codebase-index/index.js +13 -8
- package/dist/codebase-index/json-parser.d.ts +4 -0
- package/dist/codebase-index/parser-worker-script.js +2 -2
- package/dist/codebase-index/project-server.js +48 -9
- package/dist/codebase-index/worker.js +4 -4
- package/dist/codebase-index/writer-bulk-insert.d.ts +0 -1
- package/dist/codebase-index/writer-schema.d.ts +1 -1
- package/dist/codebase-index/writer.d.ts +38 -0
- package/dist/diff.js +1 -1
- package/dist/e2e.d.ts +40 -1
- package/dist/e2e.js +1 -1
- package/dist/edit.js +7 -7
- package/dist/exec.js +1 -1
- package/dist/fetch.js +1 -1
- package/dist/format.d.ts +42 -2
- package/dist/format.js +4 -4
- package/dist/git.d.ts +70 -1
- package/dist/git.js +1 -1
- package/dist/glob.js +3 -3
- package/dist/{go-parser-JXYKJHRC.js → go-parser-IKHW67WE.js} +2 -2
- package/dist/grep.js +3 -3
- package/dist/index.js +45 -45
- package/dist/install.d.ts +51 -2
- package/dist/install.js +4 -4
- package/dist/{json-parser-IBHZ4BZC.js → json-parser-2EOVP5MR.js} +81 -15
- package/dist/kanban.d.ts +19 -1
- package/dist/kanban.js +2 -2
- package/dist/languages/index.js +2 -2
- package/dist/{legacy-bridge-7M6QLUQN.js → legacy-bridge-SFNXIRAP.js} +4 -4
- package/dist/lint.js +4 -4
- package/dist/logs.js +1 -1
- package/dist/outdated.d.ts +25 -1
- package/dist/outdated.js +1 -1
- package/dist/pack.js +44 -44
- package/dist/{parser-dispatch-QH4XPGG6.js → parser-dispatch-X62UWXJS.js} +3 -3
- package/dist/patch.js +7 -7
- package/dist/plan.js +4 -4
- package/dist/{py-parser-IS4HKYMF.js → py-parser-TDXSQZBC.js} +2 -2
- package/dist/read.js +7 -7
- package/dist/replace.js +7 -7
- package/dist/{rs-parser-XHUUO2KZ.js → rs-parser-GIWPUA3T.js} +2 -2
- package/dist/scaffold.js +1 -1
- package/dist/search.js +1 -1
- package/dist/session-kanban.js +1 -1
- package/dist/task.js +4 -4
- package/dist/test.js +4 -4
- package/dist/todo.js +3 -3
- package/dist/tool-diff.js +1 -1
- package/dist/tool-tier.js +45 -45
- package/dist/tool-use.js +1 -1
- package/dist/{ts-parser-RCTYKSVI.js → ts-parser-7W26YB26.js} +2 -2
- package/dist/typecheck.js +4 -4
- package/dist/write.js +7 -7
- package/dist/{yaml-parser-4SAXV3PL.js → yaml-parser-RGBXEZE4.js} +2 -2
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -22,10 +22,10 @@ import "./chunk-Z6DAKQ3U.js";
|
|
|
22
22
|
import {
|
|
23
23
|
registerBuiltinToolTier,
|
|
24
24
|
selectBuiltinToolsForTier
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-ZZT45EHF.js";
|
|
26
26
|
import {
|
|
27
27
|
builtinToolsPack
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-MX25MTDJ.js";
|
|
29
29
|
import {
|
|
30
30
|
OFF_ONLY_TOOLS,
|
|
31
31
|
OPTIONAL_TOOLS,
|
|
@@ -38,11 +38,11 @@ import {
|
|
|
38
38
|
clarifyTool,
|
|
39
39
|
pwshTool,
|
|
40
40
|
securityAstScanTool
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-K23JNFE3.js";
|
|
42
42
|
import {
|
|
43
43
|
discoverE2EProjects,
|
|
44
44
|
e2ePlanTool
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-5WNDJHT6.js";
|
|
46
46
|
import {
|
|
47
47
|
codebaseAstReplaceTool,
|
|
48
48
|
codebaseImpactAnalysisTool,
|
|
@@ -59,23 +59,23 @@ import {
|
|
|
59
59
|
generateRepoMap,
|
|
60
60
|
replaceSymbolInFile,
|
|
61
61
|
runDeadCodeScan
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-YF3D5INN.js";
|
|
63
63
|
import "./chunk-EEOFQDT6.js";
|
|
64
64
|
import {
|
|
65
65
|
planTool
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-H6AWAZ2Y.js";
|
|
67
67
|
import {
|
|
68
68
|
taskTool
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-X5K3U6GI.js";
|
|
70
70
|
import {
|
|
71
71
|
toolSearchTool
|
|
72
72
|
} from "./chunk-RJZQWEMS.js";
|
|
73
73
|
import {
|
|
74
74
|
toolUseTool
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-FRN7TIAA.js";
|
|
76
76
|
import {
|
|
77
77
|
batchToolUseTool
|
|
78
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-WXJY3BKV.js";
|
|
79
79
|
import {
|
|
80
80
|
toolHelpTool
|
|
81
81
|
} from "./chunk-QBV725YG.js";
|
|
@@ -84,50 +84,50 @@ import {
|
|
|
84
84
|
} from "./chunk-6RNIFLG4.js";
|
|
85
85
|
import {
|
|
86
86
|
testTool
|
|
87
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-CPVLVQYT.js";
|
|
88
88
|
import {
|
|
89
89
|
installTool
|
|
90
|
-
} from "./chunk-
|
|
90
|
+
} from "./chunk-UE3UBMCP.js";
|
|
91
91
|
import {
|
|
92
92
|
auditTool
|
|
93
|
-
} from "./chunk-
|
|
93
|
+
} from "./chunk-CVALEVGA.js";
|
|
94
94
|
import {
|
|
95
95
|
outdatedTool
|
|
96
|
-
} from "./chunk-
|
|
96
|
+
} from "./chunk-MRZOVQ5D.js";
|
|
97
97
|
import {
|
|
98
98
|
logsTool
|
|
99
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-CPSAF2AU.js";
|
|
100
100
|
import {
|
|
101
101
|
documentTool
|
|
102
102
|
} from "./chunk-EMRGN4KM.js";
|
|
103
103
|
import {
|
|
104
104
|
scaffoldTool
|
|
105
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-TKA4VEX2.js";
|
|
106
106
|
import {
|
|
107
107
|
gitTool
|
|
108
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-ZE6KLBUO.js";
|
|
109
109
|
import {
|
|
110
110
|
patchTool
|
|
111
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-AGUSOFNI.js";
|
|
112
112
|
import {
|
|
113
113
|
jsonTool
|
|
114
114
|
} from "./chunk-VB3MJGCV.js";
|
|
115
115
|
import {
|
|
116
116
|
diffTool
|
|
117
|
-
} from "./chunk-
|
|
117
|
+
} from "./chunk-P7ZQ2FAJ.js";
|
|
118
118
|
import {
|
|
119
119
|
treeTool
|
|
120
120
|
} from "./chunk-J5SKD6LN.js";
|
|
121
121
|
import {
|
|
122
122
|
lintTool
|
|
123
|
-
} from "./chunk-
|
|
123
|
+
} from "./chunk-WJYXMB2R.js";
|
|
124
124
|
import {
|
|
125
125
|
formatTool
|
|
126
|
-
} from "./chunk-
|
|
126
|
+
} from "./chunk-3QQSBUXR.js";
|
|
127
127
|
import {
|
|
128
128
|
typecheckTool
|
|
129
|
-
} from "./chunk-
|
|
130
|
-
import "./chunk-
|
|
129
|
+
} from "./chunk-4AEZIFOW.js";
|
|
130
|
+
import "./chunk-4E42D7UF.js";
|
|
131
131
|
import {
|
|
132
132
|
ADDITIONAL_LANGUAGE_PROFILES,
|
|
133
133
|
LanguageProfileRegistry,
|
|
@@ -145,22 +145,22 @@ import {
|
|
|
145
145
|
planLanguageOperation,
|
|
146
146
|
validateCommandPlan,
|
|
147
147
|
validateLanguageProfile
|
|
148
|
-
} from "./chunk-
|
|
149
|
-
import "./chunk-
|
|
148
|
+
} from "./chunk-SOG7XIRF.js";
|
|
149
|
+
import "./chunk-ZHH3BEWU.js";
|
|
150
150
|
import {
|
|
151
151
|
replaceTool
|
|
152
|
-
} from "./chunk-
|
|
152
|
+
} from "./chunk-CISOLTOP.js";
|
|
153
153
|
import {
|
|
154
154
|
globTool
|
|
155
|
-
} from "./chunk-
|
|
155
|
+
} from "./chunk-6GZPSWP3.js";
|
|
156
156
|
import {
|
|
157
157
|
grepTool
|
|
158
|
-
} from "./chunk-
|
|
158
|
+
} from "./chunk-EOOFNYIT.js";
|
|
159
159
|
import "./chunk-Q5JPPCZC.js";
|
|
160
|
-
import "./chunk-
|
|
160
|
+
import "./chunk-NWZ6XGBJ.js";
|
|
161
161
|
import {
|
|
162
162
|
bashTool
|
|
163
|
-
} from "./chunk-
|
|
163
|
+
} from "./chunk-HTYEO67J.js";
|
|
164
164
|
import {
|
|
165
165
|
checkExecKillCommand,
|
|
166
166
|
configureDangerBypass,
|
|
@@ -172,7 +172,7 @@ import {
|
|
|
172
172
|
isExecCommandAllowed,
|
|
173
173
|
resetDangerBypass,
|
|
174
174
|
resetExecPolicy
|
|
175
|
-
} from "./chunk-
|
|
175
|
+
} from "./chunk-WI3VDXHD.js";
|
|
176
176
|
import "./chunk-BTSFTGIL.js";
|
|
177
177
|
import {
|
|
178
178
|
getPersistentProcessRegistry,
|
|
@@ -188,20 +188,20 @@ import {
|
|
|
188
188
|
} from "./chunk-HFXSNKCV.js";
|
|
189
189
|
import {
|
|
190
190
|
fetchTool
|
|
191
|
-
} from "./chunk-
|
|
191
|
+
} from "./chunk-UKGMDCXT.js";
|
|
192
192
|
import {
|
|
193
193
|
searchTool
|
|
194
|
-
} from "./chunk-
|
|
194
|
+
} from "./chunk-PQTONQ4P.js";
|
|
195
195
|
import "./chunk-NBDZMMG2.js";
|
|
196
196
|
import {
|
|
197
197
|
todoTool
|
|
198
|
-
} from "./chunk-
|
|
198
|
+
} from "./chunk-5ZYEGP2P.js";
|
|
199
199
|
import {
|
|
200
200
|
kanbanEvidenceKey,
|
|
201
201
|
kanbanEvidencePointer,
|
|
202
202
|
kanbanTool,
|
|
203
203
|
recordKanbanVerificationEvidence
|
|
204
|
-
} from "./chunk-
|
|
204
|
+
} from "./chunk-FJEQZHZN.js";
|
|
205
205
|
import {
|
|
206
206
|
SESSION_KANBAN_COLUMNS,
|
|
207
207
|
applySessionKanbanBoardToTodos,
|
|
@@ -216,7 +216,7 @@ import {
|
|
|
216
216
|
projectSessionTasksToKanban,
|
|
217
217
|
projectSessionTodosToKanban,
|
|
218
218
|
rebindSessionKanbanTask
|
|
219
|
-
} from "./chunk-
|
|
219
|
+
} from "./chunk-CWALNI6K.js";
|
|
220
220
|
import {
|
|
221
221
|
BrowserArtifactStore,
|
|
222
222
|
BrowserNetworkGuardProxy,
|
|
@@ -245,16 +245,16 @@ import {
|
|
|
245
245
|
resolvePinnedBrowserTarget,
|
|
246
246
|
safeBrowserUrl,
|
|
247
247
|
shutdownBrowserTools
|
|
248
|
-
} from "./chunk-
|
|
248
|
+
} from "./chunk-45JPRMC2.js";
|
|
249
249
|
import {
|
|
250
250
|
readTool
|
|
251
|
-
} from "./chunk-
|
|
251
|
+
} from "./chunk-3U4H6ZRF.js";
|
|
252
252
|
import {
|
|
253
253
|
writeTool
|
|
254
|
-
} from "./chunk-
|
|
254
|
+
} from "./chunk-S2GBLQ5S.js";
|
|
255
255
|
import {
|
|
256
256
|
editTool
|
|
257
|
-
} from "./chunk-
|
|
257
|
+
} from "./chunk-CIFAIIHI.js";
|
|
258
258
|
import "./chunk-FQZOHLG3.js";
|
|
259
259
|
import {
|
|
260
260
|
cancelPendingReindexes,
|
|
@@ -275,21 +275,21 @@ import {
|
|
|
275
275
|
shutdownCodebaseIndexHost,
|
|
276
276
|
shutdownCodebaseIndexServer,
|
|
277
277
|
symbolGraphService
|
|
278
|
-
} from "./chunk-
|
|
279
|
-
import "./chunk-
|
|
278
|
+
} from "./chunk-VZLX2JZG.js";
|
|
279
|
+
import "./chunk-6GVXZCQV.js";
|
|
280
280
|
import {
|
|
281
281
|
CircuitOpenError,
|
|
282
282
|
IndexCircuitBreaker,
|
|
283
283
|
IndexTimeoutError,
|
|
284
284
|
indexCircuitBreaker,
|
|
285
285
|
resetIndexCircuitBreaker
|
|
286
|
-
} from "./chunk-
|
|
287
|
-
import "./chunk-
|
|
286
|
+
} from "./chunk-BLCSYKNN.js";
|
|
287
|
+
import "./chunk-JJQB6R7Y.js";
|
|
288
288
|
import "./chunk-ZLTFLC25.js";
|
|
289
289
|
import "./chunk-A6BRWIXN.js";
|
|
290
290
|
import "./chunk-UCYQTZ7F.js";
|
|
291
|
-
import "./chunk-
|
|
292
|
-
import "./chunk-
|
|
291
|
+
import "./chunk-YOHO4DVT.js";
|
|
292
|
+
import "./chunk-DTQ75VBC.js";
|
|
293
293
|
import {
|
|
294
294
|
resolveWin32Command
|
|
295
295
|
} from "./chunk-V43EQ6VR.js";
|
package/dist/install.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Tool } from '@wrongstack/core/types';
|
|
1
|
+
import type { Tool, ToolStreamEvent } from '@wrongstack/core/types';
|
|
2
2
|
interface InstallInput {
|
|
3
3
|
packages?: string | string[] | undefined;
|
|
4
4
|
save?: 'dependency' | 'dev' | 'optional' | undefined;
|
|
@@ -20,6 +20,55 @@ interface InstallOutput {
|
|
|
20
20
|
dry_run: boolean;
|
|
21
21
|
truncated: boolean;
|
|
22
22
|
}
|
|
23
|
-
|
|
23
|
+
type InstallContext = Parameters<Tool<InstallInput, InstallOutput>['execute']>[1];
|
|
24
|
+
export declare const installTool: {
|
|
25
|
+
name: string;
|
|
26
|
+
category: string;
|
|
27
|
+
description: string;
|
|
28
|
+
usageHint: string;
|
|
29
|
+
permission: "confirm";
|
|
30
|
+
subjectKey: string;
|
|
31
|
+
mutating: true;
|
|
32
|
+
riskTier: "standard";
|
|
33
|
+
icon: "package";
|
|
34
|
+
timeoutMs: number;
|
|
35
|
+
capabilities: string[];
|
|
36
|
+
inputSchema: {
|
|
37
|
+
type: string;
|
|
38
|
+
properties: {
|
|
39
|
+
packages: {
|
|
40
|
+
type: string;
|
|
41
|
+
description: string;
|
|
42
|
+
};
|
|
43
|
+
save: {
|
|
44
|
+
type: string;
|
|
45
|
+
enum: string[];
|
|
46
|
+
description: string;
|
|
47
|
+
};
|
|
48
|
+
cwd: {
|
|
49
|
+
type: string;
|
|
50
|
+
description: string;
|
|
51
|
+
};
|
|
52
|
+
dry_run: {
|
|
53
|
+
type: string;
|
|
54
|
+
description: string;
|
|
55
|
+
};
|
|
56
|
+
global: {
|
|
57
|
+
type: string;
|
|
58
|
+
description: string;
|
|
59
|
+
};
|
|
60
|
+
lifecycleScripts: {
|
|
61
|
+
type: string;
|
|
62
|
+
description: string;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
execute(input: InstallInput, ctx: InstallContext, opts?: {
|
|
67
|
+
signal: AbortSignal;
|
|
68
|
+
}): Promise<InstallOutput>;
|
|
69
|
+
executeStream(input: InstallInput, ctx: InstallContext, opts?: {
|
|
70
|
+
signal: AbortSignal;
|
|
71
|
+
}): AsyncGenerator<ToolStreamEvent<InstallOutput>>;
|
|
72
|
+
};
|
|
24
73
|
export {};
|
|
25
74
|
//# sourceMappingURL=install.d.ts.map
|
package/dist/install.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
installTool
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-UE3UBMCP.js";
|
|
4
|
+
import "./chunk-4E42D7UF.js";
|
|
5
|
+
import "./chunk-SOG7XIRF.js";
|
|
6
|
+
import "./chunk-ZHH3BEWU.js";
|
|
7
7
|
import "./chunk-2VSZC6QM.js";
|
|
8
8
|
import "./chunk-3PVYQFRQ.js";
|
|
9
9
|
import "./chunk-HFXSNKCV.js";
|
|
@@ -1,21 +1,74 @@
|
|
|
1
1
|
import {
|
|
2
2
|
detectLang
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YOHO4DVT.js";
|
|
4
4
|
|
|
5
5
|
// src/codebase-index/json-parser.ts
|
|
6
6
|
import { expectDefined } from "@wrongstack/core/utils";
|
|
7
7
|
import * as path from "node:path";
|
|
8
|
+
var JSON_MAX_SYMBOLS_DEFAULT = 1e3;
|
|
8
9
|
function parseSymbols(opts) {
|
|
9
10
|
const { file, content, lang } = opts;
|
|
10
11
|
try {
|
|
11
|
-
return regexParse({ file, content, lang });
|
|
12
|
+
return regexParse({ file, content, lang, maxSymbols: opts.maxSymbols });
|
|
12
13
|
} catch {
|
|
13
14
|
return { file, lang, symbols: [], mtimeMs: Date.now() };
|
|
14
15
|
}
|
|
15
16
|
}
|
|
17
|
+
function topLevelKeys(content) {
|
|
18
|
+
const keys = [];
|
|
19
|
+
const stack = [];
|
|
20
|
+
let inString = false;
|
|
21
|
+
for (let i = 0; i < content.length; i++) {
|
|
22
|
+
const ch = content[i];
|
|
23
|
+
if (inString) {
|
|
24
|
+
if (ch === "\\") {
|
|
25
|
+
i++;
|
|
26
|
+
} else if (ch === '"') {
|
|
27
|
+
inString = false;
|
|
28
|
+
}
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
if (ch === "/" && content[i + 1] === "/") {
|
|
32
|
+
while (i < content.length && content[i] !== "\n") i++;
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
if (ch === "/" && content[i + 1] === "*") {
|
|
36
|
+
i += 2;
|
|
37
|
+
while (i < content.length && !(content[i] === "*" && content[i + 1] === "/")) i++;
|
|
38
|
+
i++;
|
|
39
|
+
continue;
|
|
40
|
+
}
|
|
41
|
+
if (ch === '"') {
|
|
42
|
+
inString = true;
|
|
43
|
+
if (stack.length === 1 && stack[0] === "{") {
|
|
44
|
+
let j = i + 1;
|
|
45
|
+
while (j < content.length && content[j] !== '"') {
|
|
46
|
+
if (content[j] === "\\") j++;
|
|
47
|
+
j++;
|
|
48
|
+
}
|
|
49
|
+
if (j < content.length) {
|
|
50
|
+
const key = content.slice(i + 1, j);
|
|
51
|
+
let k = j + 1;
|
|
52
|
+
while (k < content.length && /\s/.test(content[k] ?? "")) k++;
|
|
53
|
+
if (content[k] === ":") keys.push({ key, offset: i });
|
|
54
|
+
i = j;
|
|
55
|
+
inString = false;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
if (ch === "{" || ch === "[") stack.push(ch);
|
|
61
|
+
else if (ch === "}" || ch === "]") stack.pop();
|
|
62
|
+
}
|
|
63
|
+
return keys;
|
|
64
|
+
}
|
|
16
65
|
function regexParse(opts) {
|
|
17
66
|
const { file, content, lang } = opts;
|
|
67
|
+
const maxSymbols = opts.maxSymbols ?? JSON_MAX_SYMBOLS_DEFAULT;
|
|
18
68
|
const symbols = [];
|
|
69
|
+
const pushSymbol = (symbol) => {
|
|
70
|
+
if (symbols.length < maxSymbols) symbols.push(symbol);
|
|
71
|
+
};
|
|
19
72
|
const basename2 = path.basename(file).toLowerCase();
|
|
20
73
|
const isPackageJson = basename2 === "package.json";
|
|
21
74
|
const isTsconfig = basename2 === "tsconfig.json" || basename2 === "tsconfig.build.json";
|
|
@@ -40,7 +93,7 @@ function regexParse(opts) {
|
|
|
40
93
|
if (rootMatch) {
|
|
41
94
|
const offset = expectDefined(rootMatch.index);
|
|
42
95
|
const line = lineFromOffset(offset);
|
|
43
|
-
|
|
96
|
+
pushSymbol(
|
|
44
97
|
makeSymbol({
|
|
45
98
|
name: path.basename(file),
|
|
46
99
|
kind: "object",
|
|
@@ -52,10 +105,8 @@ function regexParse(opts) {
|
|
|
52
105
|
})
|
|
53
106
|
);
|
|
54
107
|
}
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
const key = expectDefined(match[1]);
|
|
58
|
-
const offset = match.index ?? 0;
|
|
108
|
+
for (const { key, offset } of topLevelKeys(content)) {
|
|
109
|
+
if (symbols.length >= maxSymbols) break;
|
|
59
110
|
const line = lineFromOffset(offset);
|
|
60
111
|
const col = offset - (lineOffsets[line - 1] ?? 0);
|
|
61
112
|
let kind = "property";
|
|
@@ -80,7 +131,7 @@ function regexParse(opts) {
|
|
|
80
131
|
signature = `"$ref": "..."`;
|
|
81
132
|
}
|
|
82
133
|
}
|
|
83
|
-
|
|
134
|
+
pushSymbol(
|
|
84
135
|
makeSymbol({
|
|
85
136
|
name: key,
|
|
86
137
|
kind,
|
|
@@ -92,10 +143,19 @@ function regexParse(opts) {
|
|
|
92
143
|
})
|
|
93
144
|
);
|
|
94
145
|
if (isPackageJson && key === "scripts") {
|
|
95
|
-
extractPackageScripts(content, symbols, file, lang, lineOffsets, lineFromOffset);
|
|
146
|
+
extractPackageScripts(content, symbols, file, lang, lineOffsets, lineFromOffset, maxSymbols);
|
|
96
147
|
}
|
|
97
148
|
if (isTsconfig && key === "compilerOptions") {
|
|
98
|
-
extractCompilerOptions(
|
|
149
|
+
extractCompilerOptions(
|
|
150
|
+
content,
|
|
151
|
+
symbols,
|
|
152
|
+
file,
|
|
153
|
+
lang,
|
|
154
|
+
lineOffsets,
|
|
155
|
+
line,
|
|
156
|
+
lineFromOffset,
|
|
157
|
+
maxSymbols
|
|
158
|
+
);
|
|
99
159
|
}
|
|
100
160
|
}
|
|
101
161
|
const defsRegex = /"\$defs"\s*:|"\$defs"\s*:/g;
|
|
@@ -103,7 +163,7 @@ function regexParse(opts) {
|
|
|
103
163
|
if (defsMatch !== null) {
|
|
104
164
|
const offset = expectDefined(defsMatch.index);
|
|
105
165
|
const line = lineFromOffset(offset);
|
|
106
|
-
|
|
166
|
+
pushSymbol(
|
|
107
167
|
makeSymbol({
|
|
108
168
|
name: "$defs",
|
|
109
169
|
kind: "property",
|
|
@@ -124,10 +184,11 @@ function regexParse(opts) {
|
|
|
124
184
|
for (const pat of defsPatterns) {
|
|
125
185
|
pat.lastIndex = 0;
|
|
126
186
|
for (let match = pat.exec(content); match !== null; match = pat.exec(content)) {
|
|
187
|
+
if (symbols.length >= maxSymbols) break;
|
|
127
188
|
const offset = match.index ?? 0;
|
|
128
189
|
const line = lineFromOffset(offset);
|
|
129
190
|
const key = match[0]?.match(/"([^"]+)"/)?.[1] ?? expectDefined(match[0]);
|
|
130
|
-
|
|
191
|
+
pushSymbol(
|
|
131
192
|
makeSymbol({
|
|
132
193
|
name: key,
|
|
133
194
|
kind: "property",
|
|
@@ -142,13 +203,15 @@ function regexParse(opts) {
|
|
|
142
203
|
}
|
|
143
204
|
return { file, lang, symbols, mtimeMs: Date.now() };
|
|
144
205
|
}
|
|
145
|
-
function extractPackageScripts(content, symbols, file, lang, lineOffsets, lineFromOffset) {
|
|
206
|
+
function extractPackageScripts(content, symbols, file, lang, lineOffsets, lineFromOffset, maxSymbols) {
|
|
146
207
|
const scriptsBlockRegex = /"scripts"\s*:\s*\{([^}]+)\}/g;
|
|
147
208
|
for (let match = scriptsBlockRegex.exec(content); match !== null; match = scriptsBlockRegex.exec(content)) {
|
|
209
|
+
if (symbols.length >= maxSymbols) return;
|
|
148
210
|
const blockContent = expectDefined(match[0]);
|
|
149
211
|
const blockOffset = match.index ?? 0;
|
|
150
212
|
const scriptKeyRegex = /"(\w[\w-]*)"\s*:/g;
|
|
151
213
|
for (let scriptMatch = scriptKeyRegex.exec(blockContent); scriptMatch !== null; scriptMatch = scriptKeyRegex.exec(blockContent)) {
|
|
214
|
+
if (symbols.length >= maxSymbols) return;
|
|
152
215
|
const key = expectDefined(scriptMatch[1]);
|
|
153
216
|
const keyOffset = blockOffset + expectDefined(scriptMatch.index);
|
|
154
217
|
const line = lineFromOffset(keyOffset);
|
|
@@ -166,13 +229,15 @@ function extractPackageScripts(content, symbols, file, lang, lineOffsets, lineFr
|
|
|
166
229
|
}
|
|
167
230
|
}
|
|
168
231
|
}
|
|
169
|
-
function extractCompilerOptions(content, symbols, file, lang, lineOffsets, parentLine, lineFromOffset) {
|
|
232
|
+
function extractCompilerOptions(content, symbols, file, lang, lineOffsets, parentLine, lineFromOffset, maxSymbols) {
|
|
170
233
|
const optsBlockRegex = /"compilerOptions"\s*:\s*\{([^}]+)\}/g;
|
|
171
234
|
for (let match = optsBlockRegex.exec(content); match !== null; match = optsBlockRegex.exec(content)) {
|
|
235
|
+
if (symbols.length >= maxSymbols) return;
|
|
172
236
|
const blockContent = expectDefined(match[0]);
|
|
173
237
|
const blockOffset = match.index ?? 0;
|
|
174
238
|
const optKeyRegex = /"(\w[\w]*)"\s*:/g;
|
|
175
239
|
for (let optMatch = optKeyRegex.exec(blockContent); optMatch !== null; optMatch = optKeyRegex.exec(blockContent)) {
|
|
240
|
+
if (symbols.length >= maxSymbols) return;
|
|
176
241
|
const key = expectDefined(optMatch[1]);
|
|
177
242
|
const keyOffset = blockOffset + expectDefined(optMatch.index);
|
|
178
243
|
const line = lineFromOffset(keyOffset);
|
|
@@ -207,7 +272,8 @@ function makeSymbol(opts) {
|
|
|
207
272
|
};
|
|
208
273
|
}
|
|
209
274
|
export {
|
|
275
|
+
JSON_MAX_SYMBOLS_DEFAULT,
|
|
210
276
|
detectLang,
|
|
211
277
|
parseSymbols
|
|
212
278
|
};
|
|
213
|
-
//# sourceMappingURL=json-parser-
|
|
279
|
+
//# sourceMappingURL=json-parser-2EOVP5MR.js.map
|
package/dist/kanban.d.ts
CHANGED
|
@@ -1,4 +1,22 @@
|
|
|
1
1
|
import type { Tool } from '@wrongstack/core/types';
|
|
2
2
|
import type { KanbanToolInput, KanbanToolOutput } from './kanban-tool-types.js';
|
|
3
|
-
|
|
3
|
+
type KanbanContext = Parameters<Tool<KanbanToolInput, KanbanToolOutput>['execute']>[1];
|
|
4
|
+
export declare const kanbanTool: {
|
|
5
|
+
name: string;
|
|
6
|
+
category: string;
|
|
7
|
+
description: string;
|
|
8
|
+
usageHint: string;
|
|
9
|
+
permission: "confirm";
|
|
10
|
+
subjectKey: string;
|
|
11
|
+
mutating: true;
|
|
12
|
+
capabilities: string[];
|
|
13
|
+
icon: "task";
|
|
14
|
+
timeoutMs: number;
|
|
15
|
+
inputSchema: import("@wrongstack/core/types").JSONSchema;
|
|
16
|
+
execute(input: KanbanToolInput, ctx: KanbanContext, _opts?: {
|
|
17
|
+
signal: AbortSignal;
|
|
18
|
+
}): Promise<KanbanToolOutput>;
|
|
19
|
+
serialize(output: KanbanToolOutput, input: KanbanToolInput): string;
|
|
20
|
+
};
|
|
21
|
+
export {};
|
|
4
22
|
//# sourceMappingURL=kanban.d.ts.map
|
package/dist/kanban.js
CHANGED
package/dist/languages/index.js
CHANGED
|
@@ -15,8 +15,8 @@ import {
|
|
|
15
15
|
planLanguageOperation,
|
|
16
16
|
validateCommandPlan,
|
|
17
17
|
validateLanguageProfile
|
|
18
|
-
} from "../chunk-
|
|
19
|
-
import "../chunk-
|
|
18
|
+
} from "../chunk-SOG7XIRF.js";
|
|
19
|
+
import "../chunk-ZHH3BEWU.js";
|
|
20
20
|
import "../chunk-2VSZC6QM.js";
|
|
21
21
|
import "../chunk-3PVYQFRQ.js";
|
|
22
22
|
import "../chunk-HFXSNKCV.js";
|
|
@@ -2,9 +2,9 @@ import {
|
|
|
2
2
|
detectNonJsEcosystem,
|
|
3
3
|
tryLegacyCodeOperation,
|
|
4
4
|
tryLegacyPackageOperation
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-4E42D7UF.js";
|
|
6
|
+
import "./chunk-SOG7XIRF.js";
|
|
7
|
+
import "./chunk-ZHH3BEWU.js";
|
|
8
8
|
import "./chunk-2VSZC6QM.js";
|
|
9
9
|
import "./chunk-3PVYQFRQ.js";
|
|
10
10
|
import "./chunk-HFXSNKCV.js";
|
|
@@ -15,4 +15,4 @@ export {
|
|
|
15
15
|
tryLegacyCodeOperation,
|
|
16
16
|
tryLegacyPackageOperation
|
|
17
17
|
};
|
|
18
|
-
//# sourceMappingURL=legacy-bridge-
|
|
18
|
+
//# sourceMappingURL=legacy-bridge-SFNXIRAP.js.map
|
package/dist/lint.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
lintTool
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-WJYXMB2R.js";
|
|
4
|
+
import "./chunk-4E42D7UF.js";
|
|
5
|
+
import "./chunk-SOG7XIRF.js";
|
|
6
|
+
import "./chunk-ZHH3BEWU.js";
|
|
7
7
|
import "./chunk-2VSZC6QM.js";
|
|
8
8
|
import "./chunk-3PVYQFRQ.js";
|
|
9
9
|
import "./chunk-HFXSNKCV.js";
|
package/dist/logs.js
CHANGED
package/dist/outdated.d.ts
CHANGED
|
@@ -17,6 +17,30 @@ interface OutdatedOutput {
|
|
|
17
17
|
output: string;
|
|
18
18
|
truncated: boolean;
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
type OutdatedContext = Parameters<Tool<OutdatedInput, OutdatedOutput>['execute']>[1];
|
|
21
|
+
export declare const outdatedTool: {
|
|
22
|
+
name: string;
|
|
23
|
+
category: string;
|
|
24
|
+
description: string;
|
|
25
|
+
usageHint: string;
|
|
26
|
+
permission: "confirm";
|
|
27
|
+
icon: "package";
|
|
28
|
+
subjectKey: string;
|
|
29
|
+
mutating: true;
|
|
30
|
+
capabilities: string[];
|
|
31
|
+
timeoutMs: number;
|
|
32
|
+
inputSchema: {
|
|
33
|
+
type: string;
|
|
34
|
+
properties: {
|
|
35
|
+
cwd: {
|
|
36
|
+
type: string;
|
|
37
|
+
description: string;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
execute(input: OutdatedInput, ctx: OutdatedContext, opts?: {
|
|
42
|
+
signal: AbortSignal;
|
|
43
|
+
}): Promise<OutdatedOutput>;
|
|
44
|
+
};
|
|
21
45
|
export {};
|
|
22
46
|
//# sourceMappingURL=outdated.d.ts.map
|