@synchronized-studio/cmsassets-agent 0.3.10 → 0.5.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/CHANGELOG.md +23 -0
- package/README.md +9 -7
- package/dist/aiReview-7WRCOL7S.js +9 -0
- package/dist/chunk-JZ2YOFY7.js +478 -0
- package/dist/chunk-JZDGA2AR.js +1878 -0
- package/dist/chunk-MMNQQM5Y.js +1178 -0
- package/dist/chunk-MNFV7OJO.js +1935 -0
- package/dist/cli.js +59 -53
- package/dist/index.d.ts +661 -36
- package/dist/index.js +23 -6
- package/package.json +3 -2
package/dist/index.d.ts
CHANGED
|
@@ -12,6 +12,8 @@ declare const InjectionType: z.ZodEnum<["return", "res.json", "assignment", "use
|
|
|
12
12
|
type InjectionType = z.infer<typeof InjectionType>;
|
|
13
13
|
declare const VerifyProfile: z.ZodEnum<["quick", "full"]>;
|
|
14
14
|
type VerifyProfile = z.infer<typeof VerifyProfile>;
|
|
15
|
+
declare const PatchMode: z.ZodEnum<["ast", "ai", "hybrid"]>;
|
|
16
|
+
type PatchMode = z.infer<typeof PatchMode>;
|
|
15
17
|
declare const FrameworkInfo: z.ZodObject<{
|
|
16
18
|
name: z.ZodEnum<["nuxt", "nuxt2", "next", "remix", "astro", "sveltekit", "express", "hono", "fastify", "unknown"]>;
|
|
17
19
|
version: z.ZodString;
|
|
@@ -46,6 +48,9 @@ declare const InjectionCandidate: z.ZodObject<{
|
|
|
46
48
|
type: z.ZodEnum<["return", "res.json", "assignment", "useFetch-transform", "useAsyncData-transform", "loader-return", "getServerSideProps-return", "getStaticProps-return", "load-return", "frontmatter-assignment", "asyncData-return", "vuex-action-return", "vuex-commit"]>;
|
|
47
49
|
score: z.ZodNumber;
|
|
48
50
|
confidence: z.ZodEnum<["high", "medium", "low"]>;
|
|
51
|
+
detectedConfidence: z.ZodOptional<z.ZodEnum<["high", "medium", "low"]>>;
|
|
52
|
+
autoPatchConfidence: z.ZodOptional<z.ZodEnum<["high", "medium", "low"]>>;
|
|
53
|
+
regionId: z.ZodOptional<z.ZodString>;
|
|
49
54
|
targetCode: z.ZodString;
|
|
50
55
|
context: z.ZodString;
|
|
51
56
|
reasons: z.ZodArray<z.ZodString, "many">;
|
|
@@ -58,6 +63,9 @@ declare const InjectionCandidate: z.ZodObject<{
|
|
|
58
63
|
targetCode: string;
|
|
59
64
|
context: string;
|
|
60
65
|
reasons: string[];
|
|
66
|
+
detectedConfidence?: "high" | "medium" | "low" | undefined;
|
|
67
|
+
autoPatchConfidence?: "high" | "medium" | "low" | undefined;
|
|
68
|
+
regionId?: string | undefined;
|
|
61
69
|
}, {
|
|
62
70
|
type: "return" | "res.json" | "assignment" | "useFetch-transform" | "useAsyncData-transform" | "loader-return" | "getServerSideProps-return" | "getStaticProps-return" | "load-return" | "frontmatter-assignment" | "asyncData-return" | "vuex-action-return" | "vuex-commit";
|
|
63
71
|
filePath: string;
|
|
@@ -67,8 +75,142 @@ declare const InjectionCandidate: z.ZodObject<{
|
|
|
67
75
|
targetCode: string;
|
|
68
76
|
context: string;
|
|
69
77
|
reasons: string[];
|
|
78
|
+
detectedConfidence?: "high" | "medium" | "low" | undefined;
|
|
79
|
+
autoPatchConfidence?: "high" | "medium" | "low" | undefined;
|
|
80
|
+
regionId?: string | undefined;
|
|
70
81
|
}>;
|
|
71
82
|
type InjectionCandidate = z.infer<typeof InjectionCandidate>;
|
|
83
|
+
declare const CandidateRegionType: z.ZodEnum<["function", "hook", "action", "loader", "route-handler", "unknown"]>;
|
|
84
|
+
type CandidateRegionType = z.infer<typeof CandidateRegionType>;
|
|
85
|
+
declare const CandidateRegion: z.ZodObject<{
|
|
86
|
+
id: z.ZodString;
|
|
87
|
+
filePath: z.ZodString;
|
|
88
|
+
type: z.ZodEnum<["function", "hook", "action", "loader", "route-handler", "unknown"]>;
|
|
89
|
+
startLine: z.ZodNumber;
|
|
90
|
+
endLine: z.ZodNumber;
|
|
91
|
+
parentRegionId: z.ZodNullable<z.ZodString>;
|
|
92
|
+
}, "strip", z.ZodTypeAny, {
|
|
93
|
+
type: "function" | "unknown" | "hook" | "action" | "loader" | "route-handler";
|
|
94
|
+
filePath: string;
|
|
95
|
+
id: string;
|
|
96
|
+
startLine: number;
|
|
97
|
+
endLine: number;
|
|
98
|
+
parentRegionId: string | null;
|
|
99
|
+
}, {
|
|
100
|
+
type: "function" | "unknown" | "hook" | "action" | "loader" | "route-handler";
|
|
101
|
+
filePath: string;
|
|
102
|
+
id: string;
|
|
103
|
+
startLine: number;
|
|
104
|
+
endLine: number;
|
|
105
|
+
parentRegionId: string | null;
|
|
106
|
+
}>;
|
|
107
|
+
type CandidateRegion = z.infer<typeof CandidateRegion>;
|
|
108
|
+
declare const CandidateGraph: z.ZodObject<{
|
|
109
|
+
regions: z.ZodArray<z.ZodObject<{
|
|
110
|
+
id: z.ZodString;
|
|
111
|
+
filePath: z.ZodString;
|
|
112
|
+
type: z.ZodEnum<["function", "hook", "action", "loader", "route-handler", "unknown"]>;
|
|
113
|
+
startLine: z.ZodNumber;
|
|
114
|
+
endLine: z.ZodNumber;
|
|
115
|
+
parentRegionId: z.ZodNullable<z.ZodString>;
|
|
116
|
+
}, "strip", z.ZodTypeAny, {
|
|
117
|
+
type: "function" | "unknown" | "hook" | "action" | "loader" | "route-handler";
|
|
118
|
+
filePath: string;
|
|
119
|
+
id: string;
|
|
120
|
+
startLine: number;
|
|
121
|
+
endLine: number;
|
|
122
|
+
parentRegionId: string | null;
|
|
123
|
+
}, {
|
|
124
|
+
type: "function" | "unknown" | "hook" | "action" | "loader" | "route-handler";
|
|
125
|
+
filePath: string;
|
|
126
|
+
id: string;
|
|
127
|
+
startLine: number;
|
|
128
|
+
endLine: number;
|
|
129
|
+
parentRegionId: string | null;
|
|
130
|
+
}>, "many">;
|
|
131
|
+
candidates: z.ZodArray<z.ZodObject<{
|
|
132
|
+
filePath: z.ZodString;
|
|
133
|
+
line: z.ZodNumber;
|
|
134
|
+
type: z.ZodEnum<["return", "res.json", "assignment", "useFetch-transform", "useAsyncData-transform", "loader-return", "getServerSideProps-return", "getStaticProps-return", "load-return", "frontmatter-assignment", "asyncData-return", "vuex-action-return", "vuex-commit"]>;
|
|
135
|
+
score: z.ZodNumber;
|
|
136
|
+
confidence: z.ZodEnum<["high", "medium", "low"]>;
|
|
137
|
+
detectedConfidence: z.ZodOptional<z.ZodEnum<["high", "medium", "low"]>>;
|
|
138
|
+
autoPatchConfidence: z.ZodOptional<z.ZodEnum<["high", "medium", "low"]>>;
|
|
139
|
+
regionId: z.ZodOptional<z.ZodString>;
|
|
140
|
+
targetCode: z.ZodString;
|
|
141
|
+
context: z.ZodString;
|
|
142
|
+
reasons: z.ZodArray<z.ZodString, "many">;
|
|
143
|
+
}, "strip", z.ZodTypeAny, {
|
|
144
|
+
type: "return" | "res.json" | "assignment" | "useFetch-transform" | "useAsyncData-transform" | "loader-return" | "getServerSideProps-return" | "getStaticProps-return" | "load-return" | "frontmatter-assignment" | "asyncData-return" | "vuex-action-return" | "vuex-commit";
|
|
145
|
+
filePath: string;
|
|
146
|
+
line: number;
|
|
147
|
+
score: number;
|
|
148
|
+
confidence: "high" | "medium" | "low";
|
|
149
|
+
targetCode: string;
|
|
150
|
+
context: string;
|
|
151
|
+
reasons: string[];
|
|
152
|
+
detectedConfidence?: "high" | "medium" | "low" | undefined;
|
|
153
|
+
autoPatchConfidence?: "high" | "medium" | "low" | undefined;
|
|
154
|
+
regionId?: string | undefined;
|
|
155
|
+
}, {
|
|
156
|
+
type: "return" | "res.json" | "assignment" | "useFetch-transform" | "useAsyncData-transform" | "loader-return" | "getServerSideProps-return" | "getStaticProps-return" | "load-return" | "frontmatter-assignment" | "asyncData-return" | "vuex-action-return" | "vuex-commit";
|
|
157
|
+
filePath: string;
|
|
158
|
+
line: number;
|
|
159
|
+
score: number;
|
|
160
|
+
confidence: "high" | "medium" | "low";
|
|
161
|
+
targetCode: string;
|
|
162
|
+
context: string;
|
|
163
|
+
reasons: string[];
|
|
164
|
+
detectedConfidence?: "high" | "medium" | "low" | undefined;
|
|
165
|
+
autoPatchConfidence?: "high" | "medium" | "low" | undefined;
|
|
166
|
+
regionId?: string | undefined;
|
|
167
|
+
}>, "many">;
|
|
168
|
+
}, "strip", z.ZodTypeAny, {
|
|
169
|
+
regions: {
|
|
170
|
+
type: "function" | "unknown" | "hook" | "action" | "loader" | "route-handler";
|
|
171
|
+
filePath: string;
|
|
172
|
+
id: string;
|
|
173
|
+
startLine: number;
|
|
174
|
+
endLine: number;
|
|
175
|
+
parentRegionId: string | null;
|
|
176
|
+
}[];
|
|
177
|
+
candidates: {
|
|
178
|
+
type: "return" | "res.json" | "assignment" | "useFetch-transform" | "useAsyncData-transform" | "loader-return" | "getServerSideProps-return" | "getStaticProps-return" | "load-return" | "frontmatter-assignment" | "asyncData-return" | "vuex-action-return" | "vuex-commit";
|
|
179
|
+
filePath: string;
|
|
180
|
+
line: number;
|
|
181
|
+
score: number;
|
|
182
|
+
confidence: "high" | "medium" | "low";
|
|
183
|
+
targetCode: string;
|
|
184
|
+
context: string;
|
|
185
|
+
reasons: string[];
|
|
186
|
+
detectedConfidence?: "high" | "medium" | "low" | undefined;
|
|
187
|
+
autoPatchConfidence?: "high" | "medium" | "low" | undefined;
|
|
188
|
+
regionId?: string | undefined;
|
|
189
|
+
}[];
|
|
190
|
+
}, {
|
|
191
|
+
regions: {
|
|
192
|
+
type: "function" | "unknown" | "hook" | "action" | "loader" | "route-handler";
|
|
193
|
+
filePath: string;
|
|
194
|
+
id: string;
|
|
195
|
+
startLine: number;
|
|
196
|
+
endLine: number;
|
|
197
|
+
parentRegionId: string | null;
|
|
198
|
+
}[];
|
|
199
|
+
candidates: {
|
|
200
|
+
type: "return" | "res.json" | "assignment" | "useFetch-transform" | "useAsyncData-transform" | "loader-return" | "getServerSideProps-return" | "getStaticProps-return" | "load-return" | "frontmatter-assignment" | "asyncData-return" | "vuex-action-return" | "vuex-commit";
|
|
201
|
+
filePath: string;
|
|
202
|
+
line: number;
|
|
203
|
+
score: number;
|
|
204
|
+
confidence: "high" | "medium" | "low";
|
|
205
|
+
targetCode: string;
|
|
206
|
+
context: string;
|
|
207
|
+
reasons: string[];
|
|
208
|
+
detectedConfidence?: "high" | "medium" | "low" | undefined;
|
|
209
|
+
autoPatchConfidence?: "high" | "medium" | "low" | undefined;
|
|
210
|
+
regionId?: string | undefined;
|
|
211
|
+
}[];
|
|
212
|
+
}>;
|
|
213
|
+
type CandidateGraph = z.infer<typeof CandidateGraph>;
|
|
72
214
|
declare const ScanResult: z.ZodObject<{
|
|
73
215
|
framework: z.ZodObject<{
|
|
74
216
|
name: z.ZodEnum<["nuxt", "nuxt2", "next", "remix", "astro", "sveltekit", "express", "hono", "fastify", "unknown"]>;
|
|
@@ -102,6 +244,9 @@ declare const ScanResult: z.ZodObject<{
|
|
|
102
244
|
type: z.ZodEnum<["return", "res.json", "assignment", "useFetch-transform", "useAsyncData-transform", "loader-return", "getServerSideProps-return", "getStaticProps-return", "load-return", "frontmatter-assignment", "asyncData-return", "vuex-action-return", "vuex-commit"]>;
|
|
103
245
|
score: z.ZodNumber;
|
|
104
246
|
confidence: z.ZodEnum<["high", "medium", "low"]>;
|
|
247
|
+
detectedConfidence: z.ZodOptional<z.ZodEnum<["high", "medium", "low"]>>;
|
|
248
|
+
autoPatchConfidence: z.ZodOptional<z.ZodEnum<["high", "medium", "low"]>>;
|
|
249
|
+
regionId: z.ZodOptional<z.ZodString>;
|
|
105
250
|
targetCode: z.ZodString;
|
|
106
251
|
context: z.ZodString;
|
|
107
252
|
reasons: z.ZodArray<z.ZodString, "many">;
|
|
@@ -114,6 +259,9 @@ declare const ScanResult: z.ZodObject<{
|
|
|
114
259
|
targetCode: string;
|
|
115
260
|
context: string;
|
|
116
261
|
reasons: string[];
|
|
262
|
+
detectedConfidence?: "high" | "medium" | "low" | undefined;
|
|
263
|
+
autoPatchConfidence?: "high" | "medium" | "low" | undefined;
|
|
264
|
+
regionId?: string | undefined;
|
|
117
265
|
}, {
|
|
118
266
|
type: "return" | "res.json" | "assignment" | "useFetch-transform" | "useAsyncData-transform" | "loader-return" | "getServerSideProps-return" | "getStaticProps-return" | "load-return" | "frontmatter-assignment" | "asyncData-return" | "vuex-action-return" | "vuex-commit";
|
|
119
267
|
filePath: string;
|
|
@@ -123,7 +271,115 @@ declare const ScanResult: z.ZodObject<{
|
|
|
123
271
|
targetCode: string;
|
|
124
272
|
context: string;
|
|
125
273
|
reasons: string[];
|
|
274
|
+
detectedConfidence?: "high" | "medium" | "low" | undefined;
|
|
275
|
+
autoPatchConfidence?: "high" | "medium" | "low" | undefined;
|
|
276
|
+
regionId?: string | undefined;
|
|
126
277
|
}>, "many">;
|
|
278
|
+
candidateGraph: z.ZodOptional<z.ZodObject<{
|
|
279
|
+
regions: z.ZodArray<z.ZodObject<{
|
|
280
|
+
id: z.ZodString;
|
|
281
|
+
filePath: z.ZodString;
|
|
282
|
+
type: z.ZodEnum<["function", "hook", "action", "loader", "route-handler", "unknown"]>;
|
|
283
|
+
startLine: z.ZodNumber;
|
|
284
|
+
endLine: z.ZodNumber;
|
|
285
|
+
parentRegionId: z.ZodNullable<z.ZodString>;
|
|
286
|
+
}, "strip", z.ZodTypeAny, {
|
|
287
|
+
type: "function" | "unknown" | "hook" | "action" | "loader" | "route-handler";
|
|
288
|
+
filePath: string;
|
|
289
|
+
id: string;
|
|
290
|
+
startLine: number;
|
|
291
|
+
endLine: number;
|
|
292
|
+
parentRegionId: string | null;
|
|
293
|
+
}, {
|
|
294
|
+
type: "function" | "unknown" | "hook" | "action" | "loader" | "route-handler";
|
|
295
|
+
filePath: string;
|
|
296
|
+
id: string;
|
|
297
|
+
startLine: number;
|
|
298
|
+
endLine: number;
|
|
299
|
+
parentRegionId: string | null;
|
|
300
|
+
}>, "many">;
|
|
301
|
+
candidates: z.ZodArray<z.ZodObject<{
|
|
302
|
+
filePath: z.ZodString;
|
|
303
|
+
line: z.ZodNumber;
|
|
304
|
+
type: z.ZodEnum<["return", "res.json", "assignment", "useFetch-transform", "useAsyncData-transform", "loader-return", "getServerSideProps-return", "getStaticProps-return", "load-return", "frontmatter-assignment", "asyncData-return", "vuex-action-return", "vuex-commit"]>;
|
|
305
|
+
score: z.ZodNumber;
|
|
306
|
+
confidence: z.ZodEnum<["high", "medium", "low"]>;
|
|
307
|
+
detectedConfidence: z.ZodOptional<z.ZodEnum<["high", "medium", "low"]>>;
|
|
308
|
+
autoPatchConfidence: z.ZodOptional<z.ZodEnum<["high", "medium", "low"]>>;
|
|
309
|
+
regionId: z.ZodOptional<z.ZodString>;
|
|
310
|
+
targetCode: z.ZodString;
|
|
311
|
+
context: z.ZodString;
|
|
312
|
+
reasons: z.ZodArray<z.ZodString, "many">;
|
|
313
|
+
}, "strip", z.ZodTypeAny, {
|
|
314
|
+
type: "return" | "res.json" | "assignment" | "useFetch-transform" | "useAsyncData-transform" | "loader-return" | "getServerSideProps-return" | "getStaticProps-return" | "load-return" | "frontmatter-assignment" | "asyncData-return" | "vuex-action-return" | "vuex-commit";
|
|
315
|
+
filePath: string;
|
|
316
|
+
line: number;
|
|
317
|
+
score: number;
|
|
318
|
+
confidence: "high" | "medium" | "low";
|
|
319
|
+
targetCode: string;
|
|
320
|
+
context: string;
|
|
321
|
+
reasons: string[];
|
|
322
|
+
detectedConfidence?: "high" | "medium" | "low" | undefined;
|
|
323
|
+
autoPatchConfidence?: "high" | "medium" | "low" | undefined;
|
|
324
|
+
regionId?: string | undefined;
|
|
325
|
+
}, {
|
|
326
|
+
type: "return" | "res.json" | "assignment" | "useFetch-transform" | "useAsyncData-transform" | "loader-return" | "getServerSideProps-return" | "getStaticProps-return" | "load-return" | "frontmatter-assignment" | "asyncData-return" | "vuex-action-return" | "vuex-commit";
|
|
327
|
+
filePath: string;
|
|
328
|
+
line: number;
|
|
329
|
+
score: number;
|
|
330
|
+
confidence: "high" | "medium" | "low";
|
|
331
|
+
targetCode: string;
|
|
332
|
+
context: string;
|
|
333
|
+
reasons: string[];
|
|
334
|
+
detectedConfidence?: "high" | "medium" | "low" | undefined;
|
|
335
|
+
autoPatchConfidence?: "high" | "medium" | "low" | undefined;
|
|
336
|
+
regionId?: string | undefined;
|
|
337
|
+
}>, "many">;
|
|
338
|
+
}, "strip", z.ZodTypeAny, {
|
|
339
|
+
regions: {
|
|
340
|
+
type: "function" | "unknown" | "hook" | "action" | "loader" | "route-handler";
|
|
341
|
+
filePath: string;
|
|
342
|
+
id: string;
|
|
343
|
+
startLine: number;
|
|
344
|
+
endLine: number;
|
|
345
|
+
parentRegionId: string | null;
|
|
346
|
+
}[];
|
|
347
|
+
candidates: {
|
|
348
|
+
type: "return" | "res.json" | "assignment" | "useFetch-transform" | "useAsyncData-transform" | "loader-return" | "getServerSideProps-return" | "getStaticProps-return" | "load-return" | "frontmatter-assignment" | "asyncData-return" | "vuex-action-return" | "vuex-commit";
|
|
349
|
+
filePath: string;
|
|
350
|
+
line: number;
|
|
351
|
+
score: number;
|
|
352
|
+
confidence: "high" | "medium" | "low";
|
|
353
|
+
targetCode: string;
|
|
354
|
+
context: string;
|
|
355
|
+
reasons: string[];
|
|
356
|
+
detectedConfidence?: "high" | "medium" | "low" | undefined;
|
|
357
|
+
autoPatchConfidence?: "high" | "medium" | "low" | undefined;
|
|
358
|
+
regionId?: string | undefined;
|
|
359
|
+
}[];
|
|
360
|
+
}, {
|
|
361
|
+
regions: {
|
|
362
|
+
type: "function" | "unknown" | "hook" | "action" | "loader" | "route-handler";
|
|
363
|
+
filePath: string;
|
|
364
|
+
id: string;
|
|
365
|
+
startLine: number;
|
|
366
|
+
endLine: number;
|
|
367
|
+
parentRegionId: string | null;
|
|
368
|
+
}[];
|
|
369
|
+
candidates: {
|
|
370
|
+
type: "return" | "res.json" | "assignment" | "useFetch-transform" | "useAsyncData-transform" | "loader-return" | "getServerSideProps-return" | "getStaticProps-return" | "load-return" | "frontmatter-assignment" | "asyncData-return" | "vuex-action-return" | "vuex-commit";
|
|
371
|
+
filePath: string;
|
|
372
|
+
line: number;
|
|
373
|
+
score: number;
|
|
374
|
+
confidence: "high" | "medium" | "low";
|
|
375
|
+
targetCode: string;
|
|
376
|
+
context: string;
|
|
377
|
+
reasons: string[];
|
|
378
|
+
detectedConfidence?: "high" | "medium" | "low" | undefined;
|
|
379
|
+
autoPatchConfidence?: "high" | "medium" | "low" | undefined;
|
|
380
|
+
regionId?: string | undefined;
|
|
381
|
+
}[];
|
|
382
|
+
}>>;
|
|
127
383
|
packageManager: z.ZodEnum<["npm", "yarn", "pnpm", "bun"]>;
|
|
128
384
|
projectRoot: z.ZodString;
|
|
129
385
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -146,9 +402,35 @@ declare const ScanResult: z.ZodObject<{
|
|
|
146
402
|
targetCode: string;
|
|
147
403
|
context: string;
|
|
148
404
|
reasons: string[];
|
|
405
|
+
detectedConfidence?: "high" | "medium" | "low" | undefined;
|
|
406
|
+
autoPatchConfidence?: "high" | "medium" | "low" | undefined;
|
|
407
|
+
regionId?: string | undefined;
|
|
149
408
|
}[];
|
|
150
409
|
packageManager: "npm" | "yarn" | "pnpm" | "bun";
|
|
151
410
|
projectRoot: string;
|
|
411
|
+
candidateGraph?: {
|
|
412
|
+
regions: {
|
|
413
|
+
type: "function" | "unknown" | "hook" | "action" | "loader" | "route-handler";
|
|
414
|
+
filePath: string;
|
|
415
|
+
id: string;
|
|
416
|
+
startLine: number;
|
|
417
|
+
endLine: number;
|
|
418
|
+
parentRegionId: string | null;
|
|
419
|
+
}[];
|
|
420
|
+
candidates: {
|
|
421
|
+
type: "return" | "res.json" | "assignment" | "useFetch-transform" | "useAsyncData-transform" | "loader-return" | "getServerSideProps-return" | "getStaticProps-return" | "load-return" | "frontmatter-assignment" | "asyncData-return" | "vuex-action-return" | "vuex-commit";
|
|
422
|
+
filePath: string;
|
|
423
|
+
line: number;
|
|
424
|
+
score: number;
|
|
425
|
+
confidence: "high" | "medium" | "low";
|
|
426
|
+
targetCode: string;
|
|
427
|
+
context: string;
|
|
428
|
+
reasons: string[];
|
|
429
|
+
detectedConfidence?: "high" | "medium" | "low" | undefined;
|
|
430
|
+
autoPatchConfidence?: "high" | "medium" | "low" | undefined;
|
|
431
|
+
regionId?: string | undefined;
|
|
432
|
+
}[];
|
|
433
|
+
} | undefined;
|
|
152
434
|
}, {
|
|
153
435
|
cms: {
|
|
154
436
|
type: "unknown" | "prismic" | "contentful" | "sanity" | "shopify" | "cloudinary" | "imgix" | "generic";
|
|
@@ -169,9 +451,35 @@ declare const ScanResult: z.ZodObject<{
|
|
|
169
451
|
targetCode: string;
|
|
170
452
|
context: string;
|
|
171
453
|
reasons: string[];
|
|
454
|
+
detectedConfidence?: "high" | "medium" | "low" | undefined;
|
|
455
|
+
autoPatchConfidence?: "high" | "medium" | "low" | undefined;
|
|
456
|
+
regionId?: string | undefined;
|
|
172
457
|
}[];
|
|
173
458
|
packageManager: "npm" | "yarn" | "pnpm" | "bun";
|
|
174
459
|
projectRoot: string;
|
|
460
|
+
candidateGraph?: {
|
|
461
|
+
regions: {
|
|
462
|
+
type: "function" | "unknown" | "hook" | "action" | "loader" | "route-handler";
|
|
463
|
+
filePath: string;
|
|
464
|
+
id: string;
|
|
465
|
+
startLine: number;
|
|
466
|
+
endLine: number;
|
|
467
|
+
parentRegionId: string | null;
|
|
468
|
+
}[];
|
|
469
|
+
candidates: {
|
|
470
|
+
type: "return" | "res.json" | "assignment" | "useFetch-transform" | "useAsyncData-transform" | "loader-return" | "getServerSideProps-return" | "getStaticProps-return" | "load-return" | "frontmatter-assignment" | "asyncData-return" | "vuex-action-return" | "vuex-commit";
|
|
471
|
+
filePath: string;
|
|
472
|
+
line: number;
|
|
473
|
+
score: number;
|
|
474
|
+
confidence: "high" | "medium" | "low";
|
|
475
|
+
targetCode: string;
|
|
476
|
+
context: string;
|
|
477
|
+
reasons: string[];
|
|
478
|
+
detectedConfidence?: "high" | "medium" | "low" | undefined;
|
|
479
|
+
autoPatchConfidence?: "high" | "medium" | "low" | undefined;
|
|
480
|
+
regionId?: string | undefined;
|
|
481
|
+
}[];
|
|
482
|
+
} | undefined;
|
|
175
483
|
}>;
|
|
176
484
|
type ScanResult = z.infer<typeof ScanResult>;
|
|
177
485
|
declare const FilePatch: z.ZodObject<{
|
|
@@ -252,6 +560,9 @@ declare const PatchPlan: z.ZodObject<{
|
|
|
252
560
|
type: z.ZodEnum<["return", "res.json", "assignment", "useFetch-transform", "useAsyncData-transform", "loader-return", "getServerSideProps-return", "getStaticProps-return", "load-return", "frontmatter-assignment", "asyncData-return", "vuex-action-return", "vuex-commit"]>;
|
|
253
561
|
score: z.ZodNumber;
|
|
254
562
|
confidence: z.ZodEnum<["high", "medium", "low"]>;
|
|
563
|
+
detectedConfidence: z.ZodOptional<z.ZodEnum<["high", "medium", "low"]>>;
|
|
564
|
+
autoPatchConfidence: z.ZodOptional<z.ZodEnum<["high", "medium", "low"]>>;
|
|
565
|
+
regionId: z.ZodOptional<z.ZodString>;
|
|
255
566
|
targetCode: z.ZodString;
|
|
256
567
|
context: z.ZodString;
|
|
257
568
|
reasons: z.ZodArray<z.ZodString, "many">;
|
|
@@ -264,6 +575,9 @@ declare const PatchPlan: z.ZodObject<{
|
|
|
264
575
|
targetCode: string;
|
|
265
576
|
context: string;
|
|
266
577
|
reasons: string[];
|
|
578
|
+
detectedConfidence?: "high" | "medium" | "low" | undefined;
|
|
579
|
+
autoPatchConfidence?: "high" | "medium" | "low" | undefined;
|
|
580
|
+
regionId?: string | undefined;
|
|
267
581
|
}, {
|
|
268
582
|
type: "return" | "res.json" | "assignment" | "useFetch-transform" | "useAsyncData-transform" | "loader-return" | "getServerSideProps-return" | "getStaticProps-return" | "load-return" | "frontmatter-assignment" | "asyncData-return" | "vuex-action-return" | "vuex-commit";
|
|
269
583
|
filePath: string;
|
|
@@ -273,7 +587,115 @@ declare const PatchPlan: z.ZodObject<{
|
|
|
273
587
|
targetCode: string;
|
|
274
588
|
context: string;
|
|
275
589
|
reasons: string[];
|
|
590
|
+
detectedConfidence?: "high" | "medium" | "low" | undefined;
|
|
591
|
+
autoPatchConfidence?: "high" | "medium" | "low" | undefined;
|
|
592
|
+
regionId?: string | undefined;
|
|
276
593
|
}>, "many">;
|
|
594
|
+
candidateGraph: z.ZodOptional<z.ZodObject<{
|
|
595
|
+
regions: z.ZodArray<z.ZodObject<{
|
|
596
|
+
id: z.ZodString;
|
|
597
|
+
filePath: z.ZodString;
|
|
598
|
+
type: z.ZodEnum<["function", "hook", "action", "loader", "route-handler", "unknown"]>;
|
|
599
|
+
startLine: z.ZodNumber;
|
|
600
|
+
endLine: z.ZodNumber;
|
|
601
|
+
parentRegionId: z.ZodNullable<z.ZodString>;
|
|
602
|
+
}, "strip", z.ZodTypeAny, {
|
|
603
|
+
type: "function" | "unknown" | "hook" | "action" | "loader" | "route-handler";
|
|
604
|
+
filePath: string;
|
|
605
|
+
id: string;
|
|
606
|
+
startLine: number;
|
|
607
|
+
endLine: number;
|
|
608
|
+
parentRegionId: string | null;
|
|
609
|
+
}, {
|
|
610
|
+
type: "function" | "unknown" | "hook" | "action" | "loader" | "route-handler";
|
|
611
|
+
filePath: string;
|
|
612
|
+
id: string;
|
|
613
|
+
startLine: number;
|
|
614
|
+
endLine: number;
|
|
615
|
+
parentRegionId: string | null;
|
|
616
|
+
}>, "many">;
|
|
617
|
+
candidates: z.ZodArray<z.ZodObject<{
|
|
618
|
+
filePath: z.ZodString;
|
|
619
|
+
line: z.ZodNumber;
|
|
620
|
+
type: z.ZodEnum<["return", "res.json", "assignment", "useFetch-transform", "useAsyncData-transform", "loader-return", "getServerSideProps-return", "getStaticProps-return", "load-return", "frontmatter-assignment", "asyncData-return", "vuex-action-return", "vuex-commit"]>;
|
|
621
|
+
score: z.ZodNumber;
|
|
622
|
+
confidence: z.ZodEnum<["high", "medium", "low"]>;
|
|
623
|
+
detectedConfidence: z.ZodOptional<z.ZodEnum<["high", "medium", "low"]>>;
|
|
624
|
+
autoPatchConfidence: z.ZodOptional<z.ZodEnum<["high", "medium", "low"]>>;
|
|
625
|
+
regionId: z.ZodOptional<z.ZodString>;
|
|
626
|
+
targetCode: z.ZodString;
|
|
627
|
+
context: z.ZodString;
|
|
628
|
+
reasons: z.ZodArray<z.ZodString, "many">;
|
|
629
|
+
}, "strip", z.ZodTypeAny, {
|
|
630
|
+
type: "return" | "res.json" | "assignment" | "useFetch-transform" | "useAsyncData-transform" | "loader-return" | "getServerSideProps-return" | "getStaticProps-return" | "load-return" | "frontmatter-assignment" | "asyncData-return" | "vuex-action-return" | "vuex-commit";
|
|
631
|
+
filePath: string;
|
|
632
|
+
line: number;
|
|
633
|
+
score: number;
|
|
634
|
+
confidence: "high" | "medium" | "low";
|
|
635
|
+
targetCode: string;
|
|
636
|
+
context: string;
|
|
637
|
+
reasons: string[];
|
|
638
|
+
detectedConfidence?: "high" | "medium" | "low" | undefined;
|
|
639
|
+
autoPatchConfidence?: "high" | "medium" | "low" | undefined;
|
|
640
|
+
regionId?: string | undefined;
|
|
641
|
+
}, {
|
|
642
|
+
type: "return" | "res.json" | "assignment" | "useFetch-transform" | "useAsyncData-transform" | "loader-return" | "getServerSideProps-return" | "getStaticProps-return" | "load-return" | "frontmatter-assignment" | "asyncData-return" | "vuex-action-return" | "vuex-commit";
|
|
643
|
+
filePath: string;
|
|
644
|
+
line: number;
|
|
645
|
+
score: number;
|
|
646
|
+
confidence: "high" | "medium" | "low";
|
|
647
|
+
targetCode: string;
|
|
648
|
+
context: string;
|
|
649
|
+
reasons: string[];
|
|
650
|
+
detectedConfidence?: "high" | "medium" | "low" | undefined;
|
|
651
|
+
autoPatchConfidence?: "high" | "medium" | "low" | undefined;
|
|
652
|
+
regionId?: string | undefined;
|
|
653
|
+
}>, "many">;
|
|
654
|
+
}, "strip", z.ZodTypeAny, {
|
|
655
|
+
regions: {
|
|
656
|
+
type: "function" | "unknown" | "hook" | "action" | "loader" | "route-handler";
|
|
657
|
+
filePath: string;
|
|
658
|
+
id: string;
|
|
659
|
+
startLine: number;
|
|
660
|
+
endLine: number;
|
|
661
|
+
parentRegionId: string | null;
|
|
662
|
+
}[];
|
|
663
|
+
candidates: {
|
|
664
|
+
type: "return" | "res.json" | "assignment" | "useFetch-transform" | "useAsyncData-transform" | "loader-return" | "getServerSideProps-return" | "getStaticProps-return" | "load-return" | "frontmatter-assignment" | "asyncData-return" | "vuex-action-return" | "vuex-commit";
|
|
665
|
+
filePath: string;
|
|
666
|
+
line: number;
|
|
667
|
+
score: number;
|
|
668
|
+
confidence: "high" | "medium" | "low";
|
|
669
|
+
targetCode: string;
|
|
670
|
+
context: string;
|
|
671
|
+
reasons: string[];
|
|
672
|
+
detectedConfidence?: "high" | "medium" | "low" | undefined;
|
|
673
|
+
autoPatchConfidence?: "high" | "medium" | "low" | undefined;
|
|
674
|
+
regionId?: string | undefined;
|
|
675
|
+
}[];
|
|
676
|
+
}, {
|
|
677
|
+
regions: {
|
|
678
|
+
type: "function" | "unknown" | "hook" | "action" | "loader" | "route-handler";
|
|
679
|
+
filePath: string;
|
|
680
|
+
id: string;
|
|
681
|
+
startLine: number;
|
|
682
|
+
endLine: number;
|
|
683
|
+
parentRegionId: string | null;
|
|
684
|
+
}[];
|
|
685
|
+
candidates: {
|
|
686
|
+
type: "return" | "res.json" | "assignment" | "useFetch-transform" | "useAsyncData-transform" | "loader-return" | "getServerSideProps-return" | "getStaticProps-return" | "load-return" | "frontmatter-assignment" | "asyncData-return" | "vuex-action-return" | "vuex-commit";
|
|
687
|
+
filePath: string;
|
|
688
|
+
line: number;
|
|
689
|
+
score: number;
|
|
690
|
+
confidence: "high" | "medium" | "low";
|
|
691
|
+
targetCode: string;
|
|
692
|
+
context: string;
|
|
693
|
+
reasons: string[];
|
|
694
|
+
detectedConfidence?: "high" | "medium" | "low" | undefined;
|
|
695
|
+
autoPatchConfidence?: "high" | "medium" | "low" | undefined;
|
|
696
|
+
regionId?: string | undefined;
|
|
697
|
+
}[];
|
|
698
|
+
}>>;
|
|
277
699
|
packageManager: z.ZodEnum<["npm", "yarn", "pnpm", "bun"]>;
|
|
278
700
|
projectRoot: z.ZodString;
|
|
279
701
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -296,9 +718,35 @@ declare const PatchPlan: z.ZodObject<{
|
|
|
296
718
|
targetCode: string;
|
|
297
719
|
context: string;
|
|
298
720
|
reasons: string[];
|
|
721
|
+
detectedConfidence?: "high" | "medium" | "low" | undefined;
|
|
722
|
+
autoPatchConfidence?: "high" | "medium" | "low" | undefined;
|
|
723
|
+
regionId?: string | undefined;
|
|
299
724
|
}[];
|
|
300
725
|
packageManager: "npm" | "yarn" | "pnpm" | "bun";
|
|
301
726
|
projectRoot: string;
|
|
727
|
+
candidateGraph?: {
|
|
728
|
+
regions: {
|
|
729
|
+
type: "function" | "unknown" | "hook" | "action" | "loader" | "route-handler";
|
|
730
|
+
filePath: string;
|
|
731
|
+
id: string;
|
|
732
|
+
startLine: number;
|
|
733
|
+
endLine: number;
|
|
734
|
+
parentRegionId: string | null;
|
|
735
|
+
}[];
|
|
736
|
+
candidates: {
|
|
737
|
+
type: "return" | "res.json" | "assignment" | "useFetch-transform" | "useAsyncData-transform" | "loader-return" | "getServerSideProps-return" | "getStaticProps-return" | "load-return" | "frontmatter-assignment" | "asyncData-return" | "vuex-action-return" | "vuex-commit";
|
|
738
|
+
filePath: string;
|
|
739
|
+
line: number;
|
|
740
|
+
score: number;
|
|
741
|
+
confidence: "high" | "medium" | "low";
|
|
742
|
+
targetCode: string;
|
|
743
|
+
context: string;
|
|
744
|
+
reasons: string[];
|
|
745
|
+
detectedConfidence?: "high" | "medium" | "low" | undefined;
|
|
746
|
+
autoPatchConfidence?: "high" | "medium" | "low" | undefined;
|
|
747
|
+
regionId?: string | undefined;
|
|
748
|
+
}[];
|
|
749
|
+
} | undefined;
|
|
302
750
|
}, {
|
|
303
751
|
cms: {
|
|
304
752
|
type: "unknown" | "prismic" | "contentful" | "sanity" | "shopify" | "cloudinary" | "imgix" | "generic";
|
|
@@ -319,9 +767,35 @@ declare const PatchPlan: z.ZodObject<{
|
|
|
319
767
|
targetCode: string;
|
|
320
768
|
context: string;
|
|
321
769
|
reasons: string[];
|
|
770
|
+
detectedConfidence?: "high" | "medium" | "low" | undefined;
|
|
771
|
+
autoPatchConfidence?: "high" | "medium" | "low" | undefined;
|
|
772
|
+
regionId?: string | undefined;
|
|
322
773
|
}[];
|
|
323
774
|
packageManager: "npm" | "yarn" | "pnpm" | "bun";
|
|
324
775
|
projectRoot: string;
|
|
776
|
+
candidateGraph?: {
|
|
777
|
+
regions: {
|
|
778
|
+
type: "function" | "unknown" | "hook" | "action" | "loader" | "route-handler";
|
|
779
|
+
filePath: string;
|
|
780
|
+
id: string;
|
|
781
|
+
startLine: number;
|
|
782
|
+
endLine: number;
|
|
783
|
+
parentRegionId: string | null;
|
|
784
|
+
}[];
|
|
785
|
+
candidates: {
|
|
786
|
+
type: "return" | "res.json" | "assignment" | "useFetch-transform" | "useAsyncData-transform" | "loader-return" | "getServerSideProps-return" | "getStaticProps-return" | "load-return" | "frontmatter-assignment" | "asyncData-return" | "vuex-action-return" | "vuex-commit";
|
|
787
|
+
filePath: string;
|
|
788
|
+
line: number;
|
|
789
|
+
score: number;
|
|
790
|
+
confidence: "high" | "medium" | "low";
|
|
791
|
+
targetCode: string;
|
|
792
|
+
context: string;
|
|
793
|
+
reasons: string[];
|
|
794
|
+
detectedConfidence?: "high" | "medium" | "low" | undefined;
|
|
795
|
+
autoPatchConfidence?: "high" | "medium" | "low" | undefined;
|
|
796
|
+
regionId?: string | undefined;
|
|
797
|
+
}[];
|
|
798
|
+
} | undefined;
|
|
325
799
|
}>;
|
|
326
800
|
install: z.ZodObject<{
|
|
327
801
|
package: z.ZodLiteral<"@synchronized-studio/response-transformer">;
|
|
@@ -390,23 +864,15 @@ declare const PatchPlan: z.ZodObject<{
|
|
|
390
864
|
}>, "many">;
|
|
391
865
|
policies: z.ZodObject<{
|
|
392
866
|
maxFilesAutoApply: z.ZodDefault<z.ZodNumber>;
|
|
393
|
-
|
|
394
|
-
/** When true, try LLM for any failed AST patch (not just low confidence). Useful for testing. */
|
|
395
|
-
llmFallbackForAll: z.ZodDefault<z.ZodBoolean>;
|
|
396
|
-
/** When true, skip AST entirely and use LLM for all patches (testing only). */
|
|
397
|
-
llmOnly: z.ZodDefault<z.ZodBoolean>;
|
|
867
|
+
patchMode: z.ZodDefault<z.ZodEnum<["ast", "ai", "hybrid"]>>;
|
|
398
868
|
verifyProfile: z.ZodDefault<z.ZodEnum<["quick", "full"]>>;
|
|
399
869
|
}, "strip", z.ZodTypeAny, {
|
|
400
870
|
maxFilesAutoApply: number;
|
|
401
|
-
|
|
402
|
-
llmFallbackForAll: boolean;
|
|
403
|
-
llmOnly: boolean;
|
|
871
|
+
patchMode: "hybrid" | "ast" | "ai";
|
|
404
872
|
verifyProfile: "quick" | "full";
|
|
405
873
|
}, {
|
|
406
874
|
maxFilesAutoApply?: number | undefined;
|
|
407
|
-
|
|
408
|
-
llmFallbackForAll?: boolean | undefined;
|
|
409
|
-
llmOnly?: boolean | undefined;
|
|
875
|
+
patchMode?: "hybrid" | "ast" | "ai" | undefined;
|
|
410
876
|
verifyProfile?: "quick" | "full" | undefined;
|
|
411
877
|
}>;
|
|
412
878
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -430,9 +896,35 @@ declare const PatchPlan: z.ZodObject<{
|
|
|
430
896
|
targetCode: string;
|
|
431
897
|
context: string;
|
|
432
898
|
reasons: string[];
|
|
899
|
+
detectedConfidence?: "high" | "medium" | "low" | undefined;
|
|
900
|
+
autoPatchConfidence?: "high" | "medium" | "low" | undefined;
|
|
901
|
+
regionId?: string | undefined;
|
|
433
902
|
}[];
|
|
434
903
|
packageManager: "npm" | "yarn" | "pnpm" | "bun";
|
|
435
904
|
projectRoot: string;
|
|
905
|
+
candidateGraph?: {
|
|
906
|
+
regions: {
|
|
907
|
+
type: "function" | "unknown" | "hook" | "action" | "loader" | "route-handler";
|
|
908
|
+
filePath: string;
|
|
909
|
+
id: string;
|
|
910
|
+
startLine: number;
|
|
911
|
+
endLine: number;
|
|
912
|
+
parentRegionId: string | null;
|
|
913
|
+
}[];
|
|
914
|
+
candidates: {
|
|
915
|
+
type: "return" | "res.json" | "assignment" | "useFetch-transform" | "useAsyncData-transform" | "loader-return" | "getServerSideProps-return" | "getStaticProps-return" | "load-return" | "frontmatter-assignment" | "asyncData-return" | "vuex-action-return" | "vuex-commit";
|
|
916
|
+
filePath: string;
|
|
917
|
+
line: number;
|
|
918
|
+
score: number;
|
|
919
|
+
confidence: "high" | "medium" | "low";
|
|
920
|
+
targetCode: string;
|
|
921
|
+
context: string;
|
|
922
|
+
reasons: string[];
|
|
923
|
+
detectedConfidence?: "high" | "medium" | "low" | undefined;
|
|
924
|
+
autoPatchConfidence?: "high" | "medium" | "low" | undefined;
|
|
925
|
+
regionId?: string | undefined;
|
|
926
|
+
}[];
|
|
927
|
+
} | undefined;
|
|
436
928
|
};
|
|
437
929
|
install: {
|
|
438
930
|
package: "@synchronized-studio/response-transformer";
|
|
@@ -458,9 +950,7 @@ declare const PatchPlan: z.ZodObject<{
|
|
|
458
950
|
}[];
|
|
459
951
|
policies: {
|
|
460
952
|
maxFilesAutoApply: number;
|
|
461
|
-
|
|
462
|
-
llmFallbackForAll: boolean;
|
|
463
|
-
llmOnly: boolean;
|
|
953
|
+
patchMode: "hybrid" | "ast" | "ai";
|
|
464
954
|
verifyProfile: "quick" | "full";
|
|
465
955
|
};
|
|
466
956
|
}, {
|
|
@@ -484,9 +974,35 @@ declare const PatchPlan: z.ZodObject<{
|
|
|
484
974
|
targetCode: string;
|
|
485
975
|
context: string;
|
|
486
976
|
reasons: string[];
|
|
977
|
+
detectedConfidence?: "high" | "medium" | "low" | undefined;
|
|
978
|
+
autoPatchConfidence?: "high" | "medium" | "low" | undefined;
|
|
979
|
+
regionId?: string | undefined;
|
|
487
980
|
}[];
|
|
488
981
|
packageManager: "npm" | "yarn" | "pnpm" | "bun";
|
|
489
982
|
projectRoot: string;
|
|
983
|
+
candidateGraph?: {
|
|
984
|
+
regions: {
|
|
985
|
+
type: "function" | "unknown" | "hook" | "action" | "loader" | "route-handler";
|
|
986
|
+
filePath: string;
|
|
987
|
+
id: string;
|
|
988
|
+
startLine: number;
|
|
989
|
+
endLine: number;
|
|
990
|
+
parentRegionId: string | null;
|
|
991
|
+
}[];
|
|
992
|
+
candidates: {
|
|
993
|
+
type: "return" | "res.json" | "assignment" | "useFetch-transform" | "useAsyncData-transform" | "loader-return" | "getServerSideProps-return" | "getStaticProps-return" | "load-return" | "frontmatter-assignment" | "asyncData-return" | "vuex-action-return" | "vuex-commit";
|
|
994
|
+
filePath: string;
|
|
995
|
+
line: number;
|
|
996
|
+
score: number;
|
|
997
|
+
confidence: "high" | "medium" | "low";
|
|
998
|
+
targetCode: string;
|
|
999
|
+
context: string;
|
|
1000
|
+
reasons: string[];
|
|
1001
|
+
detectedConfidence?: "high" | "medium" | "low" | undefined;
|
|
1002
|
+
autoPatchConfidence?: "high" | "medium" | "low" | undefined;
|
|
1003
|
+
regionId?: string | undefined;
|
|
1004
|
+
}[];
|
|
1005
|
+
} | undefined;
|
|
490
1006
|
};
|
|
491
1007
|
install: {
|
|
492
1008
|
package: "@synchronized-studio/response-transformer";
|
|
@@ -512,37 +1028,57 @@ declare const PatchPlan: z.ZodObject<{
|
|
|
512
1028
|
}[];
|
|
513
1029
|
policies: {
|
|
514
1030
|
maxFilesAutoApply?: number | undefined;
|
|
515
|
-
|
|
516
|
-
llmFallbackForAll?: boolean | undefined;
|
|
517
|
-
llmOnly?: boolean | undefined;
|
|
1031
|
+
patchMode?: "hybrid" | "ast" | "ai" | undefined;
|
|
518
1032
|
verifyProfile?: "quick" | "full" | undefined;
|
|
519
1033
|
};
|
|
520
1034
|
}>;
|
|
521
1035
|
type PatchPlan = z.infer<typeof PatchPlan>;
|
|
522
|
-
declare const PatchMethod: z.ZodEnum<["ast", "
|
|
1036
|
+
declare const PatchMethod: z.ZodEnum<["ast", "ai-complete", "skipped", "manual-review"]>;
|
|
523
1037
|
type PatchMethod = z.infer<typeof PatchMethod>;
|
|
1038
|
+
declare const DecisionReasonCode: z.ZodEnum<["PATCHED_AST", "PATCHED_AI", "SKIP_ALREADY_TRANSFORMED", "SKIP_TEST_OR_FIXTURE", "SKIP_GENERATED_FILE", "SKIP_MAX_FILES", "SKIP_GUARD_REJECTED", "SKIP_DRY_RUN", "MANUAL_LOW_CONFIDENCE", "MANUAL_AST_FAILED", "SKIP_AI_FALLBACK_FAILED"]>;
|
|
1039
|
+
type DecisionReasonCode = z.infer<typeof DecisionReasonCode>;
|
|
1040
|
+
declare const DecisionLogEntry: z.ZodObject<{
|
|
1041
|
+
filePath: z.ZodString;
|
|
1042
|
+
method: z.ZodEnum<["ast", "ai-complete", "skipped", "manual-review"]>;
|
|
1043
|
+
applied: z.ZodBoolean;
|
|
1044
|
+
reasonCode: z.ZodEnum<["PATCHED_AST", "PATCHED_AI", "SKIP_ALREADY_TRANSFORMED", "SKIP_TEST_OR_FIXTURE", "SKIP_GENERATED_FILE", "SKIP_MAX_FILES", "SKIP_GUARD_REJECTED", "SKIP_DRY_RUN", "MANUAL_LOW_CONFIDENCE", "MANUAL_AST_FAILED", "SKIP_AI_FALLBACK_FAILED"]>;
|
|
1045
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
1046
|
+
}, "strip", z.ZodTypeAny, {
|
|
1047
|
+
filePath: string;
|
|
1048
|
+
method: "ast" | "ai-complete" | "skipped" | "manual-review";
|
|
1049
|
+
applied: boolean;
|
|
1050
|
+
reasonCode: "PATCHED_AST" | "PATCHED_AI" | "SKIP_ALREADY_TRANSFORMED" | "SKIP_TEST_OR_FIXTURE" | "SKIP_GENERATED_FILE" | "SKIP_MAX_FILES" | "SKIP_GUARD_REJECTED" | "SKIP_DRY_RUN" | "MANUAL_LOW_CONFIDENCE" | "MANUAL_AST_FAILED" | "SKIP_AI_FALLBACK_FAILED";
|
|
1051
|
+
reason?: string | undefined;
|
|
1052
|
+
}, {
|
|
1053
|
+
filePath: string;
|
|
1054
|
+
method: "ast" | "ai-complete" | "skipped" | "manual-review";
|
|
1055
|
+
applied: boolean;
|
|
1056
|
+
reasonCode: "PATCHED_AST" | "PATCHED_AI" | "SKIP_ALREADY_TRANSFORMED" | "SKIP_TEST_OR_FIXTURE" | "SKIP_GENERATED_FILE" | "SKIP_MAX_FILES" | "SKIP_GUARD_REJECTED" | "SKIP_DRY_RUN" | "MANUAL_LOW_CONFIDENCE" | "MANUAL_AST_FAILED" | "SKIP_AI_FALLBACK_FAILED";
|
|
1057
|
+
reason?: string | undefined;
|
|
1058
|
+
}>;
|
|
1059
|
+
type DecisionLogEntry = z.infer<typeof DecisionLogEntry>;
|
|
524
1060
|
declare const PatchedFileReport: z.ZodObject<{
|
|
525
1061
|
filePath: z.ZodString;
|
|
526
1062
|
applied: z.ZodBoolean;
|
|
527
|
-
method: z.ZodEnum<["ast", "
|
|
1063
|
+
method: z.ZodEnum<["ast", "ai-complete", "skipped", "manual-review"]>;
|
|
528
1064
|
reason: z.ZodOptional<z.ZodString>;
|
|
529
1065
|
durationMs: z.ZodNumber;
|
|
530
1066
|
}, "strip", z.ZodTypeAny, {
|
|
531
1067
|
filePath: string;
|
|
1068
|
+
method: "ast" | "ai-complete" | "skipped" | "manual-review";
|
|
532
1069
|
applied: boolean;
|
|
533
|
-
method: "llm" | "ast" | "llm-complete" | "ai-complete" | "skipped" | "manual-review";
|
|
534
1070
|
durationMs: number;
|
|
535
1071
|
reason?: string | undefined;
|
|
536
1072
|
}, {
|
|
537
1073
|
filePath: string;
|
|
1074
|
+
method: "ast" | "ai-complete" | "skipped" | "manual-review";
|
|
538
1075
|
applied: boolean;
|
|
539
|
-
method: "llm" | "ast" | "llm-complete" | "ai-complete" | "skipped" | "manual-review";
|
|
540
1076
|
durationMs: number;
|
|
541
1077
|
reason?: string | undefined;
|
|
542
1078
|
}>;
|
|
543
1079
|
type PatchedFileReport = z.infer<typeof PatchedFileReport>;
|
|
544
1080
|
declare const ApplyReport: z.ZodObject<{
|
|
545
|
-
schemaVersion: z.ZodLiteral<"
|
|
1081
|
+
schemaVersion: z.ZodLiteral<"2.0">;
|
|
546
1082
|
timestamp: z.ZodString;
|
|
547
1083
|
projectRoot: z.ZodString;
|
|
548
1084
|
gitBranch: z.ZodNullable<z.ZodString>;
|
|
@@ -552,19 +1088,19 @@ declare const ApplyReport: z.ZodObject<{
|
|
|
552
1088
|
files: z.ZodArray<z.ZodObject<{
|
|
553
1089
|
filePath: z.ZodString;
|
|
554
1090
|
applied: z.ZodBoolean;
|
|
555
|
-
method: z.ZodEnum<["ast", "
|
|
1091
|
+
method: z.ZodEnum<["ast", "ai-complete", "skipped", "manual-review"]>;
|
|
556
1092
|
reason: z.ZodOptional<z.ZodString>;
|
|
557
1093
|
durationMs: z.ZodNumber;
|
|
558
1094
|
}, "strip", z.ZodTypeAny, {
|
|
559
1095
|
filePath: string;
|
|
1096
|
+
method: "ast" | "ai-complete" | "skipped" | "manual-review";
|
|
560
1097
|
applied: boolean;
|
|
561
|
-
method: "llm" | "ast" | "llm-complete" | "ai-complete" | "skipped" | "manual-review";
|
|
562
1098
|
durationMs: number;
|
|
563
1099
|
reason?: string | undefined;
|
|
564
1100
|
}, {
|
|
565
1101
|
filePath: string;
|
|
1102
|
+
method: "ast" | "ai-complete" | "skipped" | "manual-review";
|
|
566
1103
|
applied: boolean;
|
|
567
|
-
method: "llm" | "ast" | "llm-complete" | "ai-complete" | "skipped" | "manual-review";
|
|
568
1104
|
durationMs: number;
|
|
569
1105
|
reason?: string | undefined;
|
|
570
1106
|
}>, "many">;
|
|
@@ -587,14 +1123,33 @@ declare const ApplyReport: z.ZodObject<{
|
|
|
587
1123
|
patchedByAst: number;
|
|
588
1124
|
manualReviewRequired: number;
|
|
589
1125
|
}>>;
|
|
1126
|
+
decisionLog: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1127
|
+
filePath: z.ZodString;
|
|
1128
|
+
method: z.ZodEnum<["ast", "ai-complete", "skipped", "manual-review"]>;
|
|
1129
|
+
applied: z.ZodBoolean;
|
|
1130
|
+
reasonCode: z.ZodEnum<["PATCHED_AST", "PATCHED_AI", "SKIP_ALREADY_TRANSFORMED", "SKIP_TEST_OR_FIXTURE", "SKIP_GENERATED_FILE", "SKIP_MAX_FILES", "SKIP_GUARD_REJECTED", "SKIP_DRY_RUN", "MANUAL_LOW_CONFIDENCE", "MANUAL_AST_FAILED", "SKIP_AI_FALLBACK_FAILED"]>;
|
|
1131
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
1132
|
+
}, "strip", z.ZodTypeAny, {
|
|
1133
|
+
filePath: string;
|
|
1134
|
+
method: "ast" | "ai-complete" | "skipped" | "manual-review";
|
|
1135
|
+
applied: boolean;
|
|
1136
|
+
reasonCode: "PATCHED_AST" | "PATCHED_AI" | "SKIP_ALREADY_TRANSFORMED" | "SKIP_TEST_OR_FIXTURE" | "SKIP_GENERATED_FILE" | "SKIP_MAX_FILES" | "SKIP_GUARD_REJECTED" | "SKIP_DRY_RUN" | "MANUAL_LOW_CONFIDENCE" | "MANUAL_AST_FAILED" | "SKIP_AI_FALLBACK_FAILED";
|
|
1137
|
+
reason?: string | undefined;
|
|
1138
|
+
}, {
|
|
1139
|
+
filePath: string;
|
|
1140
|
+
method: "ast" | "ai-complete" | "skipped" | "manual-review";
|
|
1141
|
+
applied: boolean;
|
|
1142
|
+
reasonCode: "PATCHED_AST" | "PATCHED_AI" | "SKIP_ALREADY_TRANSFORMED" | "SKIP_TEST_OR_FIXTURE" | "SKIP_GENERATED_FILE" | "SKIP_MAX_FILES" | "SKIP_GUARD_REJECTED" | "SKIP_DRY_RUN" | "MANUAL_LOW_CONFIDENCE" | "MANUAL_AST_FAILED" | "SKIP_AI_FALLBACK_FAILED";
|
|
1143
|
+
reason?: string | undefined;
|
|
1144
|
+
}>, "many">>;
|
|
590
1145
|
totalDurationMs: z.ZodNumber;
|
|
591
1146
|
}, "strip", z.ZodTypeAny, {
|
|
592
1147
|
projectRoot: string;
|
|
593
|
-
schemaVersion: "
|
|
1148
|
+
schemaVersion: "2.0";
|
|
594
1149
|
files: {
|
|
595
1150
|
filePath: string;
|
|
1151
|
+
method: "ast" | "ai-complete" | "skipped" | "manual-review";
|
|
596
1152
|
applied: boolean;
|
|
597
|
-
method: "llm" | "ast" | "llm-complete" | "ai-complete" | "skipped" | "manual-review";
|
|
598
1153
|
durationMs: number;
|
|
599
1154
|
reason?: string | undefined;
|
|
600
1155
|
}[];
|
|
@@ -603,6 +1158,13 @@ declare const ApplyReport: z.ZodObject<{
|
|
|
603
1158
|
gitCommit: string | null;
|
|
604
1159
|
installed: boolean;
|
|
605
1160
|
envUpdated: boolean;
|
|
1161
|
+
decisionLog: {
|
|
1162
|
+
filePath: string;
|
|
1163
|
+
method: "ast" | "ai-complete" | "skipped" | "manual-review";
|
|
1164
|
+
applied: boolean;
|
|
1165
|
+
reasonCode: "PATCHED_AST" | "PATCHED_AI" | "SKIP_ALREADY_TRANSFORMED" | "SKIP_TEST_OR_FIXTURE" | "SKIP_GENERATED_FILE" | "SKIP_MAX_FILES" | "SKIP_GUARD_REJECTED" | "SKIP_DRY_RUN" | "MANUAL_LOW_CONFIDENCE" | "MANUAL_AST_FAILED" | "SKIP_AI_FALLBACK_FAILED";
|
|
1166
|
+
reason?: string | undefined;
|
|
1167
|
+
}[];
|
|
606
1168
|
totalDurationMs: number;
|
|
607
1169
|
summary?: {
|
|
608
1170
|
skipped: number;
|
|
@@ -613,11 +1175,11 @@ declare const ApplyReport: z.ZodObject<{
|
|
|
613
1175
|
} | undefined;
|
|
614
1176
|
}, {
|
|
615
1177
|
projectRoot: string;
|
|
616
|
-
schemaVersion: "
|
|
1178
|
+
schemaVersion: "2.0";
|
|
617
1179
|
files: {
|
|
618
1180
|
filePath: string;
|
|
1181
|
+
method: "ast" | "ai-complete" | "skipped" | "manual-review";
|
|
619
1182
|
applied: boolean;
|
|
620
|
-
method: "llm" | "ast" | "llm-complete" | "ai-complete" | "skipped" | "manual-review";
|
|
621
1183
|
durationMs: number;
|
|
622
1184
|
reason?: string | undefined;
|
|
623
1185
|
}[];
|
|
@@ -634,35 +1196,95 @@ declare const ApplyReport: z.ZodObject<{
|
|
|
634
1196
|
patchedByAst: number;
|
|
635
1197
|
manualReviewRequired: number;
|
|
636
1198
|
} | undefined;
|
|
1199
|
+
decisionLog?: {
|
|
1200
|
+
filePath: string;
|
|
1201
|
+
method: "ast" | "ai-complete" | "skipped" | "manual-review";
|
|
1202
|
+
applied: boolean;
|
|
1203
|
+
reasonCode: "PATCHED_AST" | "PATCHED_AI" | "SKIP_ALREADY_TRANSFORMED" | "SKIP_TEST_OR_FIXTURE" | "SKIP_GENERATED_FILE" | "SKIP_MAX_FILES" | "SKIP_GUARD_REJECTED" | "SKIP_DRY_RUN" | "MANUAL_LOW_CONFIDENCE" | "MANUAL_AST_FAILED" | "SKIP_AI_FALLBACK_FAILED";
|
|
1204
|
+
reason?: string | undefined;
|
|
1205
|
+
}[] | undefined;
|
|
637
1206
|
}>;
|
|
638
1207
|
type ApplyReport = z.infer<typeof ApplyReport>;
|
|
1208
|
+
declare const VerifyStepLog: z.ZodObject<{
|
|
1209
|
+
name: z.ZodString;
|
|
1210
|
+
command: z.ZodString;
|
|
1211
|
+
passed: z.ZodBoolean;
|
|
1212
|
+
required: z.ZodBoolean;
|
|
1213
|
+
output: z.ZodString;
|
|
1214
|
+
}, "strip", z.ZodTypeAny, {
|
|
1215
|
+
required: boolean;
|
|
1216
|
+
name: string;
|
|
1217
|
+
command: string;
|
|
1218
|
+
passed: boolean;
|
|
1219
|
+
output: string;
|
|
1220
|
+
}, {
|
|
1221
|
+
required: boolean;
|
|
1222
|
+
name: string;
|
|
1223
|
+
command: string;
|
|
1224
|
+
passed: boolean;
|
|
1225
|
+
output: string;
|
|
1226
|
+
}>;
|
|
1227
|
+
type VerifyStepLog = z.infer<typeof VerifyStepLog>;
|
|
639
1228
|
declare const VerifyReport: z.ZodObject<{
|
|
640
|
-
schemaVersion: z.ZodLiteral<"
|
|
1229
|
+
schemaVersion: z.ZodLiteral<"2.0">;
|
|
641
1230
|
profile: z.ZodEnum<["quick", "full"]>;
|
|
642
1231
|
lintPassed: z.ZodNullable<z.ZodBoolean>;
|
|
643
1232
|
buildPassed: z.ZodNullable<z.ZodBoolean>;
|
|
644
1233
|
testsPassed: z.ZodNullable<z.ZodBoolean>;
|
|
645
1234
|
patchedFiles: z.ZodArray<z.ZodString, "many">;
|
|
646
1235
|
warnings: z.ZodArray<z.ZodString, "many">;
|
|
1236
|
+
steps: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1237
|
+
name: z.ZodString;
|
|
1238
|
+
command: z.ZodString;
|
|
1239
|
+
passed: z.ZodBoolean;
|
|
1240
|
+
required: z.ZodBoolean;
|
|
1241
|
+
output: z.ZodString;
|
|
1242
|
+
}, "strip", z.ZodTypeAny, {
|
|
1243
|
+
required: boolean;
|
|
1244
|
+
name: string;
|
|
1245
|
+
command: string;
|
|
1246
|
+
passed: boolean;
|
|
1247
|
+
output: string;
|
|
1248
|
+
}, {
|
|
1249
|
+
required: boolean;
|
|
1250
|
+
name: string;
|
|
1251
|
+
command: string;
|
|
1252
|
+
passed: boolean;
|
|
1253
|
+
output: string;
|
|
1254
|
+
}>, "many">>;
|
|
647
1255
|
durationMs: z.ZodNumber;
|
|
648
1256
|
}, "strip", z.ZodTypeAny, {
|
|
649
1257
|
profile: "quick" | "full";
|
|
650
|
-
schemaVersion: "
|
|
1258
|
+
schemaVersion: "2.0";
|
|
651
1259
|
durationMs: number;
|
|
652
1260
|
lintPassed: boolean | null;
|
|
653
1261
|
buildPassed: boolean | null;
|
|
654
1262
|
testsPassed: boolean | null;
|
|
655
1263
|
patchedFiles: string[];
|
|
656
1264
|
warnings: string[];
|
|
1265
|
+
steps: {
|
|
1266
|
+
required: boolean;
|
|
1267
|
+
name: string;
|
|
1268
|
+
command: string;
|
|
1269
|
+
passed: boolean;
|
|
1270
|
+
output: string;
|
|
1271
|
+
}[];
|
|
657
1272
|
}, {
|
|
658
1273
|
profile: "quick" | "full";
|
|
659
|
-
schemaVersion: "
|
|
1274
|
+
schemaVersion: "2.0";
|
|
660
1275
|
durationMs: number;
|
|
661
1276
|
lintPassed: boolean | null;
|
|
662
1277
|
buildPassed: boolean | null;
|
|
663
1278
|
testsPassed: boolean | null;
|
|
664
1279
|
patchedFiles: string[];
|
|
665
1280
|
warnings: string[];
|
|
1281
|
+
steps?: {
|
|
1282
|
+
required: boolean;
|
|
1283
|
+
name: string;
|
|
1284
|
+
command: string;
|
|
1285
|
+
passed: boolean;
|
|
1286
|
+
output: string;
|
|
1287
|
+
}[] | undefined;
|
|
666
1288
|
}>;
|
|
667
1289
|
type VerifyReport = z.infer<typeof VerifyReport>;
|
|
668
1290
|
declare const AiFileResult: z.ZodObject<{
|
|
@@ -763,6 +1385,7 @@ interface ApplyOptions {
|
|
|
763
1385
|
maxFiles?: number;
|
|
764
1386
|
/** When true, OpenAI key is available and AI-first mode should be used. */
|
|
765
1387
|
aiMode?: boolean;
|
|
1388
|
+
patchMode?: 'ast' | 'ai' | 'hybrid';
|
|
766
1389
|
aiModel?: string;
|
|
767
1390
|
}
|
|
768
1391
|
declare function applyPlan(plan: PatchPlan, opts?: ApplyOptions): Promise<ApplyReport>;
|
|
@@ -770,6 +1393,7 @@ declare function applyPlan(plan: PatchPlan, opts?: ApplyOptions): Promise<ApplyR
|
|
|
770
1393
|
interface VerifyOptions {
|
|
771
1394
|
profile?: VerifyProfile;
|
|
772
1395
|
framework?: FrameworkName;
|
|
1396
|
+
packageManager?: PackageManager;
|
|
773
1397
|
patchedFiles?: string[];
|
|
774
1398
|
}
|
|
775
1399
|
declare function verify(root: string, opts?: VerifyOptions): VerifyReport;
|
|
@@ -788,14 +1412,15 @@ declare const gitOps: {
|
|
|
788
1412
|
createBranch(cwd: string, name: string): boolean;
|
|
789
1413
|
stageAll(cwd: string): void;
|
|
790
1414
|
commit(cwd: string, message: string): string | null;
|
|
791
|
-
|
|
1415
|
+
hardResetToCommit(cwd: string, commitHash: string): boolean;
|
|
1416
|
+
revertCommit(cwd: string, commitHash: string): boolean;
|
|
792
1417
|
getLastCommitByAgent(cwd: string): string | null;
|
|
793
1418
|
getCommitBefore(cwd: string, commitHash: string): string | null;
|
|
794
1419
|
push(cwd: string, remote?: string): boolean;
|
|
795
1420
|
};
|
|
796
1421
|
|
|
797
1422
|
interface AgentReport {
|
|
798
|
-
version: '
|
|
1423
|
+
version: '2.0';
|
|
799
1424
|
timestamp: string;
|
|
800
1425
|
scan?: ScanResult;
|
|
801
1426
|
plan?: PatchPlan;
|
|
@@ -823,7 +1448,7 @@ interface PipelineOptions {
|
|
|
823
1448
|
dryRun?: boolean;
|
|
824
1449
|
includeTests?: boolean;
|
|
825
1450
|
maxFiles?: number;
|
|
826
|
-
|
|
1451
|
+
patchMode?: PatchMode;
|
|
827
1452
|
verifyProfile?: VerifyProfile;
|
|
828
1453
|
gitBranch?: boolean;
|
|
829
1454
|
gitCommit?: boolean;
|
|
@@ -846,4 +1471,4 @@ interface PipelineResult {
|
|
|
846
1471
|
}
|
|
847
1472
|
declare function runFullPipeline(opts: PipelineOptions): Promise<PipelineResult>;
|
|
848
1473
|
|
|
849
|
-
export { AiFileResult, AiReviewReport, ApplyReport, CmsInfo, CmsType, Confidence, FilePatch, FrameworkInfo, FrameworkName, InjectionCandidate, InjectionType, PackageManager, PatchMethod, PatchPlan, PatchedFileReport, type PipelineOptions, type PipelineResult, ScanResult, VerifyProfile, VerifyReport, aiReviewAll, applyPlan, createPlan, createReport, gitOps, loadPlanFile, runFullPipeline, savePlanFile, saveReport, scan, verify };
|
|
1474
|
+
export { AiFileResult, AiReviewReport, ApplyReport, CandidateGraph, CandidateRegion, CandidateRegionType, CmsInfo, CmsType, Confidence, DecisionLogEntry, DecisionReasonCode, FilePatch, FrameworkInfo, FrameworkName, InjectionCandidate, InjectionType, PackageManager, PatchMethod, PatchMode, PatchPlan, PatchedFileReport, type PipelineOptions, type PipelineResult, ScanResult, VerifyProfile, VerifyReport, VerifyStepLog, aiReviewAll, applyPlan, createPlan, createReport, gitOps, loadPlanFile, runFullPipeline, savePlanFile, saveReport, scan, verify };
|