lacuna-cli 0.1.7 → 0.1.9
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 +41 -8
- package/dist/agent/context.d.ts +1 -0
- package/dist/agent/context.d.ts.map +1 -1
- package/dist/agent/context.js +141 -6
- package/dist/agent/context.js.map +1 -1
- package/dist/agent/fix-loop.d.ts.map +1 -1
- package/dist/agent/fix-loop.js +135 -20
- package/dist/agent/fix-loop.js.map +1 -1
- package/dist/agent/generator.d.ts +2 -0
- package/dist/agent/generator.d.ts.map +1 -1
- package/dist/agent/generator.js +63 -22
- package/dist/agent/generator.js.map +1 -1
- package/dist/agent/loop.d.ts +1 -1
- package/dist/agent/loop.d.ts.map +1 -1
- package/dist/agent/loop.js +81 -4
- package/dist/agent/loop.js.map +1 -1
- package/dist/agent/prompts/index.d.ts +2 -0
- package/dist/agent/prompts/index.d.ts.map +1 -1
- package/dist/agent/prompts/index.js +145 -31
- package/dist/agent/prompts/index.js.map +1 -1
- package/dist/agent/prompts/react-native.d.ts.map +1 -1
- package/dist/agent/prompts/react-native.js +15 -4
- package/dist/agent/prompts/react-native.js.map +1 -1
- package/dist/agent/prompts/react.js +1 -1
- package/dist/agent/prompts/runners/vitest.js +1 -1
- package/dist/commands/analyze.d.ts.map +1 -1
- package/dist/commands/analyze.js +4 -0
- package/dist/commands/analyze.js.map +1 -1
- package/dist/commands/fix.d.ts.map +1 -1
- package/dist/commands/fix.js +9 -0
- package/dist/commands/fix.js.map +1 -1
- package/dist/commands/generate.d.ts.map +1 -1
- package/dist/commands/generate.js +9 -0
- package/dist/commands/generate.js.map +1 -1
- package/dist/commands/run.d.ts.map +1 -1
- package/dist/commands/run.js +4 -0
- package/dist/commands/run.js.map +1 -1
- package/dist/lib/config.d.ts +6 -0
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +9 -0
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/extract-error.d.ts.map +1 -1
- package/dist/lib/extract-error.js +8 -2
- package/dist/lib/extract-error.js.map +1 -1
- package/dist/lib/feedback.d.ts +3 -0
- package/dist/lib/feedback.d.ts.map +1 -0
- package/dist/lib/feedback.js +27 -0
- package/dist/lib/feedback.js.map +1 -0
- package/dist/lib/reporter.d.ts.map +1 -1
- package/dist/lib/reporter.js +11 -1
- package/dist/lib/reporter.js.map +1 -1
- package/dist/lib/validate.d.ts +25 -0
- package/dist/lib/validate.d.ts.map +1 -1
- package/dist/lib/validate.js +561 -0
- package/dist/lib/validate.js.map +1 -1
- package/package.json +9 -4
- package/oclif.manifest.json +0 -309
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lacuna-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "Agentic CLI that finds coverage gaps, generates tests, and verifies them in a loop",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"testing",
|
|
@@ -28,7 +28,8 @@
|
|
|
28
28
|
"format": "prettier --write 'src/**/*.ts'",
|
|
29
29
|
"test": "node --loader ts-node/esm --test src/**/*.test.ts",
|
|
30
30
|
"prepack": "npm run build",
|
|
31
|
-
"dev": "ts-node --esm src/index.ts"
|
|
31
|
+
"dev": "ts-node --esm src/index.ts",
|
|
32
|
+
"release": "bash scripts/release.sh"
|
|
32
33
|
},
|
|
33
34
|
"dependencies": {
|
|
34
35
|
"@anthropic-ai/sdk": "^0.52.0",
|
|
@@ -58,7 +59,11 @@
|
|
|
58
59
|
"commands": "./dist/commands",
|
|
59
60
|
"plugins": [],
|
|
60
61
|
"topicSeparator": " ",
|
|
61
|
-
"additionalVersionFlags": [
|
|
62
|
-
|
|
62
|
+
"additionalVersionFlags": [
|
|
63
|
+
"-V"
|
|
64
|
+
],
|
|
65
|
+
"additionalHelpFlags": [
|
|
66
|
+
"-h"
|
|
67
|
+
]
|
|
63
68
|
}
|
|
64
69
|
}
|
package/oclif.manifest.json
DELETED
|
@@ -1,309 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"commands": {
|
|
3
|
-
"analyze": {
|
|
4
|
-
"aliases": [],
|
|
5
|
-
"args": {},
|
|
6
|
-
"description": "Analyze test coverage and show gaps — no files are changed",
|
|
7
|
-
"examples": [
|
|
8
|
-
"$ lacuna analyze",
|
|
9
|
-
"$ lacuna analyze --threshold 90",
|
|
10
|
-
"$ lacuna analyze --format json",
|
|
11
|
-
"$ lacuna analyze --format markdown"
|
|
12
|
-
],
|
|
13
|
-
"flags": {
|
|
14
|
-
"threshold": {
|
|
15
|
-
"char": "t",
|
|
16
|
-
"description": "Minimum coverage percentage",
|
|
17
|
-
"name": "threshold",
|
|
18
|
-
"hasDynamicHelp": false,
|
|
19
|
-
"multiple": false,
|
|
20
|
-
"type": "option"
|
|
21
|
-
},
|
|
22
|
-
"format": {
|
|
23
|
-
"char": "F",
|
|
24
|
-
"description": "Output format",
|
|
25
|
-
"name": "format",
|
|
26
|
-
"default": "terminal",
|
|
27
|
-
"hasDynamicHelp": false,
|
|
28
|
-
"multiple": false,
|
|
29
|
-
"options": [
|
|
30
|
-
"terminal",
|
|
31
|
-
"json",
|
|
32
|
-
"markdown"
|
|
33
|
-
],
|
|
34
|
-
"type": "option"
|
|
35
|
-
},
|
|
36
|
-
"output": {
|
|
37
|
-
"char": "o",
|
|
38
|
-
"description": "Write report to file instead of stdout",
|
|
39
|
-
"name": "output",
|
|
40
|
-
"hasDynamicHelp": false,
|
|
41
|
-
"multiple": false,
|
|
42
|
-
"type": "option"
|
|
43
|
-
},
|
|
44
|
-
"verbose": {
|
|
45
|
-
"char": "v",
|
|
46
|
-
"description": "Show uncovered line numbers per file",
|
|
47
|
-
"name": "verbose",
|
|
48
|
-
"allowNo": false,
|
|
49
|
-
"type": "boolean"
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
"hasDynamicHelp": false,
|
|
53
|
-
"hiddenAliases": [],
|
|
54
|
-
"id": "analyze",
|
|
55
|
-
"pluginAlias": "lacuna-cli",
|
|
56
|
-
"pluginName": "lacuna-cli",
|
|
57
|
-
"pluginType": "core",
|
|
58
|
-
"strict": true,
|
|
59
|
-
"enableJsonFlag": false,
|
|
60
|
-
"isESM": true,
|
|
61
|
-
"relativePath": [
|
|
62
|
-
"dist",
|
|
63
|
-
"commands",
|
|
64
|
-
"analyze.js"
|
|
65
|
-
]
|
|
66
|
-
},
|
|
67
|
-
"fix": {
|
|
68
|
-
"aliases": [],
|
|
69
|
-
"args": {},
|
|
70
|
-
"description": "Find and fix failing tests using AI — preserves existing tests, only repairs what is broken",
|
|
71
|
-
"examples": [
|
|
72
|
-
"$ lacuna fix",
|
|
73
|
-
"$ lacuna fix --workers 4",
|
|
74
|
-
"$ lacuna fix --file src/utils/math.test.ts",
|
|
75
|
-
"$ lacuna fix --dry-run",
|
|
76
|
-
"$ lacuna fix --regenerate-on-failure",
|
|
77
|
-
"$ lacuna fix --fix-polluters"
|
|
78
|
-
],
|
|
79
|
-
"flags": {
|
|
80
|
-
"dry-run": {
|
|
81
|
-
"description": "Show what would be changed without writing files",
|
|
82
|
-
"name": "dry-run",
|
|
83
|
-
"allowNo": false,
|
|
84
|
-
"type": "boolean"
|
|
85
|
-
},
|
|
86
|
-
"file": {
|
|
87
|
-
"char": "f",
|
|
88
|
-
"description": "Target a specific test file instead of all failing tests",
|
|
89
|
-
"name": "file",
|
|
90
|
-
"hasDynamicHelp": false,
|
|
91
|
-
"multiple": false,
|
|
92
|
-
"type": "option"
|
|
93
|
-
},
|
|
94
|
-
"verbose": {
|
|
95
|
-
"char": "v",
|
|
96
|
-
"description": "Show model output and full test runner logs",
|
|
97
|
-
"name": "verbose",
|
|
98
|
-
"allowNo": false,
|
|
99
|
-
"type": "boolean"
|
|
100
|
-
},
|
|
101
|
-
"model": {
|
|
102
|
-
"char": "m",
|
|
103
|
-
"description": "Model to use (overrides .lacuna.json)",
|
|
104
|
-
"name": "model",
|
|
105
|
-
"hasDynamicHelp": false,
|
|
106
|
-
"multiple": false,
|
|
107
|
-
"type": "option"
|
|
108
|
-
},
|
|
109
|
-
"workers": {
|
|
110
|
-
"char": "w",
|
|
111
|
-
"description": "Number of parallel workers (each handles one file at a time)",
|
|
112
|
-
"name": "workers",
|
|
113
|
-
"default": 1,
|
|
114
|
-
"hasDynamicHelp": false,
|
|
115
|
-
"multiple": false,
|
|
116
|
-
"type": "option"
|
|
117
|
-
},
|
|
118
|
-
"fresh": {
|
|
119
|
-
"description": "Re-run the full test suite even if a recent failing-files cache exists",
|
|
120
|
-
"name": "fresh",
|
|
121
|
-
"allowNo": false,
|
|
122
|
-
"type": "boolean"
|
|
123
|
-
},
|
|
124
|
-
"regenerate-on-failure": {
|
|
125
|
-
"description": "If fix exhausts all retries, delete the test and regenerate it from scratch (default: on). Use --no-regenerate-on-failure to disable.",
|
|
126
|
-
"name": "regenerate-on-failure",
|
|
127
|
-
"allowNo": true,
|
|
128
|
-
"type": "boolean"
|
|
129
|
-
},
|
|
130
|
-
"fix-polluters": {
|
|
131
|
-
"description": "After fixing, bisect the test suite to identify files that corrupt shared state, then use AI to add cleanup",
|
|
132
|
-
"name": "fix-polluters",
|
|
133
|
-
"allowNo": false,
|
|
134
|
-
"type": "boolean"
|
|
135
|
-
}
|
|
136
|
-
},
|
|
137
|
-
"hasDynamicHelp": false,
|
|
138
|
-
"hiddenAliases": [],
|
|
139
|
-
"id": "fix",
|
|
140
|
-
"pluginAlias": "lacuna-cli",
|
|
141
|
-
"pluginName": "lacuna-cli",
|
|
142
|
-
"pluginType": "core",
|
|
143
|
-
"strict": true,
|
|
144
|
-
"enableJsonFlag": false,
|
|
145
|
-
"isESM": true,
|
|
146
|
-
"relativePath": [
|
|
147
|
-
"dist",
|
|
148
|
-
"commands",
|
|
149
|
-
"fix.js"
|
|
150
|
-
]
|
|
151
|
-
},
|
|
152
|
-
"generate": {
|
|
153
|
-
"aliases": [],
|
|
154
|
-
"args": {},
|
|
155
|
-
"description": "Run the full agent loop: analyze gaps, generate tests, verify they pass",
|
|
156
|
-
"examples": [
|
|
157
|
-
"$ lacuna generate",
|
|
158
|
-
"$ lacuna generate --dry-run",
|
|
159
|
-
"$ lacuna generate --file src/utils/math.ts",
|
|
160
|
-
"$ lacuna generate --format json --output report.json"
|
|
161
|
-
],
|
|
162
|
-
"flags": {
|
|
163
|
-
"dry-run": {
|
|
164
|
-
"description": "Print what would be written without touching the filesystem",
|
|
165
|
-
"name": "dry-run",
|
|
166
|
-
"allowNo": false,
|
|
167
|
-
"type": "boolean"
|
|
168
|
-
},
|
|
169
|
-
"file": {
|
|
170
|
-
"char": "f",
|
|
171
|
-
"description": "Target a specific source file instead of the whole project",
|
|
172
|
-
"name": "file",
|
|
173
|
-
"hasDynamicHelp": false,
|
|
174
|
-
"multiple": false,
|
|
175
|
-
"type": "option"
|
|
176
|
-
},
|
|
177
|
-
"verbose": {
|
|
178
|
-
"char": "v",
|
|
179
|
-
"description": "Show model output and full test runner logs",
|
|
180
|
-
"name": "verbose",
|
|
181
|
-
"allowNo": false,
|
|
182
|
-
"type": "boolean"
|
|
183
|
-
},
|
|
184
|
-
"model": {
|
|
185
|
-
"char": "m",
|
|
186
|
-
"description": "Model to use (overrides .lacuna.json)",
|
|
187
|
-
"name": "model",
|
|
188
|
-
"hasDynamicHelp": false,
|
|
189
|
-
"multiple": false,
|
|
190
|
-
"type": "option"
|
|
191
|
-
},
|
|
192
|
-
"threshold": {
|
|
193
|
-
"char": "t",
|
|
194
|
-
"description": "Override coverage threshold",
|
|
195
|
-
"name": "threshold",
|
|
196
|
-
"hasDynamicHelp": false,
|
|
197
|
-
"multiple": false,
|
|
198
|
-
"type": "option"
|
|
199
|
-
},
|
|
200
|
-
"format": {
|
|
201
|
-
"char": "F",
|
|
202
|
-
"description": "Output format for the final report",
|
|
203
|
-
"name": "format",
|
|
204
|
-
"default": "terminal",
|
|
205
|
-
"hasDynamicHelp": false,
|
|
206
|
-
"multiple": false,
|
|
207
|
-
"options": [
|
|
208
|
-
"terminal",
|
|
209
|
-
"json",
|
|
210
|
-
"markdown"
|
|
211
|
-
],
|
|
212
|
-
"type": "option"
|
|
213
|
-
},
|
|
214
|
-
"output": {
|
|
215
|
-
"char": "o",
|
|
216
|
-
"description": "Write report to file instead of stdout",
|
|
217
|
-
"name": "output",
|
|
218
|
-
"hasDynamicHelp": false,
|
|
219
|
-
"multiple": false,
|
|
220
|
-
"type": "option"
|
|
221
|
-
},
|
|
222
|
-
"workers": {
|
|
223
|
-
"char": "w",
|
|
224
|
-
"description": "Number of parallel workers (each handles one file at a time)",
|
|
225
|
-
"name": "workers",
|
|
226
|
-
"default": 1,
|
|
227
|
-
"hasDynamicHelp": false,
|
|
228
|
-
"multiple": false,
|
|
229
|
-
"type": "option"
|
|
230
|
-
},
|
|
231
|
-
"fresh": {
|
|
232
|
-
"description": "Force a fresh coverage run even if a recent report already exists",
|
|
233
|
-
"name": "fresh",
|
|
234
|
-
"allowNo": false,
|
|
235
|
-
"type": "boolean"
|
|
236
|
-
}
|
|
237
|
-
},
|
|
238
|
-
"hasDynamicHelp": false,
|
|
239
|
-
"hiddenAliases": [],
|
|
240
|
-
"id": "generate",
|
|
241
|
-
"pluginAlias": "lacuna-cli",
|
|
242
|
-
"pluginName": "lacuna-cli",
|
|
243
|
-
"pluginType": "core",
|
|
244
|
-
"strict": true,
|
|
245
|
-
"enableJsonFlag": false,
|
|
246
|
-
"isESM": true,
|
|
247
|
-
"relativePath": [
|
|
248
|
-
"dist",
|
|
249
|
-
"commands",
|
|
250
|
-
"generate.js"
|
|
251
|
-
]
|
|
252
|
-
},
|
|
253
|
-
"init": {
|
|
254
|
-
"aliases": [],
|
|
255
|
-
"args": {},
|
|
256
|
-
"description": "Interactive setup wizard — configure lacuna for your project",
|
|
257
|
-
"examples": [
|
|
258
|
-
"$ lacuna init"
|
|
259
|
-
],
|
|
260
|
-
"flags": {},
|
|
261
|
-
"hasDynamicHelp": false,
|
|
262
|
-
"hiddenAliases": [],
|
|
263
|
-
"id": "init",
|
|
264
|
-
"pluginAlias": "lacuna-cli",
|
|
265
|
-
"pluginName": "lacuna-cli",
|
|
266
|
-
"pluginType": "core",
|
|
267
|
-
"strict": true,
|
|
268
|
-
"enableJsonFlag": false,
|
|
269
|
-
"isESM": true,
|
|
270
|
-
"relativePath": [
|
|
271
|
-
"dist",
|
|
272
|
-
"commands",
|
|
273
|
-
"init.js"
|
|
274
|
-
]
|
|
275
|
-
},
|
|
276
|
-
"run": {
|
|
277
|
-
"aliases": [],
|
|
278
|
-
"args": {},
|
|
279
|
-
"description": "Run the test suite and report coverage",
|
|
280
|
-
"examples": [
|
|
281
|
-
"$ lacuna run"
|
|
282
|
-
],
|
|
283
|
-
"flags": {
|
|
284
|
-
"verbose": {
|
|
285
|
-
"char": "v",
|
|
286
|
-
"description": "Show full test output",
|
|
287
|
-
"name": "verbose",
|
|
288
|
-
"allowNo": false,
|
|
289
|
-
"type": "boolean"
|
|
290
|
-
}
|
|
291
|
-
},
|
|
292
|
-
"hasDynamicHelp": false,
|
|
293
|
-
"hiddenAliases": [],
|
|
294
|
-
"id": "run",
|
|
295
|
-
"pluginAlias": "lacuna-cli",
|
|
296
|
-
"pluginName": "lacuna-cli",
|
|
297
|
-
"pluginType": "core",
|
|
298
|
-
"strict": true,
|
|
299
|
-
"enableJsonFlag": false,
|
|
300
|
-
"isESM": true,
|
|
301
|
-
"relativePath": [
|
|
302
|
-
"dist",
|
|
303
|
-
"commands",
|
|
304
|
-
"run.js"
|
|
305
|
-
]
|
|
306
|
-
}
|
|
307
|
-
},
|
|
308
|
-
"version": "0.1.7"
|
|
309
|
-
}
|