@qulib/core 0.2.1 → 0.3.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.
Files changed (87) hide show
  1. package/README.md +45 -3
  2. package/dist/analyze.d.ts +16 -4
  3. package/dist/analyze.d.ts.map +1 -1
  4. package/dist/analyze.js +98 -38
  5. package/dist/cli/cost-doctor.d.ts +2 -0
  6. package/dist/cli/cost-doctor.d.ts.map +1 -0
  7. package/dist/cli/cost-doctor.js +72 -0
  8. package/dist/cli/index.js +61 -0
  9. package/dist/harness/progress-log.d.ts +7 -0
  10. package/dist/harness/progress-log.d.ts.map +1 -0
  11. package/dist/harness/progress-log.js +1 -0
  12. package/dist/harness/run-options.d.ts +2 -0
  13. package/dist/harness/run-options.d.ts.map +1 -1
  14. package/dist/index.d.ts +6 -2
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +3 -0
  17. package/dist/llm/content-hash.d.ts +2 -0
  18. package/dist/llm/content-hash.d.ts.map +1 -0
  19. package/dist/llm/content-hash.js +4 -0
  20. package/dist/llm/context-builder.js +1 -1
  21. package/dist/llm/cost-intelligence.d.ts +29 -0
  22. package/dist/llm/cost-intelligence.d.ts.map +1 -0
  23. package/dist/llm/cost-intelligence.js +153 -0
  24. package/dist/llm/provider.d.ts +11 -1
  25. package/dist/llm/provider.d.ts.map +1 -1
  26. package/dist/llm/provider.js +43 -4
  27. package/dist/phases/act.d.ts.map +1 -1
  28. package/dist/phases/act.js +4 -1
  29. package/dist/phases/observe.js +1 -1
  30. package/dist/phases/think-finalize.d.ts +6 -0
  31. package/dist/phases/think-finalize.d.ts.map +1 -0
  32. package/dist/phases/think-finalize.js +164 -0
  33. package/dist/phases/think.d.ts +2 -0
  34. package/dist/phases/think.d.ts.map +1 -1
  35. package/dist/phases/think.js +16 -65
  36. package/dist/reporters/markdown-reporter.d.ts.map +1 -1
  37. package/dist/reporters/markdown-reporter.js +23 -3
  38. package/dist/schemas/config.schema.d.ts +364 -0
  39. package/dist/schemas/config.schema.d.ts.map +1 -1
  40. package/dist/schemas/config.schema.js +55 -1
  41. package/dist/schemas/cost-intelligence.schema.d.ts +229 -0
  42. package/dist/schemas/cost-intelligence.schema.d.ts.map +1 -0
  43. package/dist/schemas/cost-intelligence.schema.js +41 -0
  44. package/dist/schemas/decision-log.schema.d.ts +2 -2
  45. package/dist/schemas/gap-analysis.schema.d.ts +288 -49
  46. package/dist/schemas/gap-analysis.schema.d.ts.map +1 -1
  47. package/dist/schemas/gap-analysis.schema.js +7 -3
  48. package/dist/schemas/index.d.ts +3 -1
  49. package/dist/schemas/index.d.ts.map +1 -1
  50. package/dist/schemas/index.js +3 -1
  51. package/dist/schemas/public-surface.schema.d.ts +268 -0
  52. package/dist/schemas/public-surface.schema.d.ts.map +1 -0
  53. package/dist/schemas/public-surface.schema.js +15 -0
  54. package/dist/schemas/repo-analysis.schema.d.ts +6 -6
  55. package/dist/tools/auth-block-gap.d.ts +3 -0
  56. package/dist/tools/auth-block-gap.d.ts.map +1 -0
  57. package/dist/tools/auth-block-gap.js +19 -0
  58. package/dist/tools/auth-detector.d.ts +2 -1
  59. package/dist/tools/auth-detector.d.ts.map +1 -1
  60. package/dist/tools/auth-detector.js +28 -3
  61. package/dist/tools/auth-explorer.d.ts +4 -0
  62. package/dist/tools/auth-explorer.d.ts.map +1 -0
  63. package/dist/tools/auth-explorer.js +346 -0
  64. package/dist/tools/auth-surface-analyzer.d.ts +4 -0
  65. package/dist/tools/auth-surface-analyzer.d.ts.map +1 -0
  66. package/dist/tools/auth-surface-analyzer.js +154 -0
  67. package/dist/tools/cypress-explorer.d.ts +2 -1
  68. package/dist/tools/cypress-explorer.d.ts.map +1 -1
  69. package/dist/tools/cypress-explorer.js +1 -1
  70. package/dist/tools/explorer.interface.d.ts +2 -1
  71. package/dist/tools/explorer.interface.d.ts.map +1 -1
  72. package/dist/tools/gap-engine.d.ts +3 -1
  73. package/dist/tools/gap-engine.d.ts.map +1 -1
  74. package/dist/tools/gap-engine.js +39 -12
  75. package/dist/tools/oauth-providers.d.ts +7 -0
  76. package/dist/tools/oauth-providers.d.ts.map +1 -0
  77. package/dist/tools/oauth-providers.js +21 -0
  78. package/dist/tools/playwright-explorer.d.ts +2 -1
  79. package/dist/tools/playwright-explorer.d.ts.map +1 -1
  80. package/dist/tools/playwright-explorer.js +21 -3
  81. package/dist/tools/public-surface.d.ts +5 -0
  82. package/dist/tools/public-surface.d.ts.map +1 -0
  83. package/dist/tools/public-surface.js +13 -0
  84. package/dist/tools/user-providers.d.ts +15 -0
  85. package/dist/tools/user-providers.d.ts.map +1 -0
  86. package/dist/tools/user-providers.js +62 -0
  87. package/package.json +6 -2
@@ -2,34 +2,40 @@ import { z } from 'zod';
2
2
  export declare const GapSchema: z.ZodObject<{
3
3
  id: z.ZodString;
4
4
  path: z.ZodString;
5
- severity: z.ZodEnum<["high", "medium", "low"]>;
5
+ severity: z.ZodEnum<["critical", "high", "medium", "low"]>;
6
6
  reason: z.ZodString;
7
- category: z.ZodEnum<["untested-route", "a11y", "console-error", "broken-link"]>;
7
+ category: z.ZodEnum<["untested-route", "a11y", "console-error", "broken-link", "auth-surface", "coverage"]>;
8
+ description: z.ZodOptional<z.ZodString>;
9
+ recommendation: z.ZodOptional<z.ZodString>;
8
10
  }, "strip", z.ZodTypeAny, {
9
11
  path: string;
10
12
  id: string;
11
- severity: "high" | "medium" | "low";
13
+ severity: "high" | "medium" | "low" | "critical";
12
14
  reason: string;
13
- category: "untested-route" | "a11y" | "console-error" | "broken-link";
15
+ category: "untested-route" | "a11y" | "console-error" | "broken-link" | "auth-surface" | "coverage";
16
+ recommendation?: string | undefined;
17
+ description?: string | undefined;
14
18
  }, {
15
19
  path: string;
16
20
  id: string;
17
- severity: "high" | "medium" | "low";
21
+ severity: "high" | "medium" | "low" | "critical";
18
22
  reason: string;
19
- category: "untested-route" | "a11y" | "console-error" | "broken-link";
23
+ category: "untested-route" | "a11y" | "console-error" | "broken-link" | "auth-surface" | "coverage";
24
+ recommendation?: string | undefined;
25
+ description?: string | undefined;
20
26
  }>;
21
27
  export declare const FrameworkRecommendationSchema: z.ZodObject<{
22
28
  adapter: z.ZodEnum<["playwright", "cypress-e2e", "cypress-component", "api", "accessibility"]>;
23
29
  reason: z.ZodString;
24
30
  confidence: z.ZodEnum<["high", "medium", "low"]>;
25
31
  }, "strip", z.ZodTypeAny, {
32
+ confidence: "high" | "medium" | "low";
26
33
  reason: string;
27
34
  adapter: "playwright" | "cypress-e2e" | "cypress-component" | "api" | "accessibility";
28
- confidence: "high" | "medium" | "low";
29
35
  }, {
36
+ confidence: "high" | "medium" | "low";
30
37
  reason: string;
31
38
  adapter: "playwright" | "cypress-e2e" | "cypress-component" | "api" | "accessibility";
32
- confidence: "high" | "medium" | "low";
33
39
  }>;
34
40
  export declare const TestStepSchema: z.ZodObject<{
35
41
  action: z.ZodEnum<["navigate", "click", "type", "assert-visible", "assert-hidden", "assert-text", "assert-disabled", "assert-count", "wait", "api-call"]>;
@@ -37,13 +43,13 @@ export declare const TestStepSchema: z.ZodObject<{
37
43
  value: z.ZodOptional<z.ZodString>;
38
44
  description: z.ZodString;
39
45
  }, "strip", z.ZodTypeAny, {
40
- action: "type" | "navigate" | "click" | "assert-visible" | "assert-hidden" | "assert-text" | "assert-disabled" | "assert-count" | "wait" | "api-call";
41
46
  description: string;
47
+ action: "type" | "navigate" | "click" | "assert-visible" | "assert-hidden" | "assert-text" | "assert-disabled" | "assert-count" | "wait" | "api-call";
42
48
  value?: string | undefined;
43
49
  target?: string | undefined;
44
50
  }, {
45
- action: "type" | "navigate" | "click" | "assert-visible" | "assert-hidden" | "assert-text" | "assert-disabled" | "assert-count" | "wait" | "api-call";
46
51
  description: string;
52
+ action: "type" | "navigate" | "click" | "assert-visible" | "assert-hidden" | "assert-text" | "assert-disabled" | "assert-count" | "wait" | "api-call";
47
53
  value?: string | undefined;
48
54
  target?: string | undefined;
49
55
  }>;
@@ -59,13 +65,13 @@ export declare const NeutralScenarioSchema: z.ZodObject<{
59
65
  value: z.ZodOptional<z.ZodString>;
60
66
  description: z.ZodString;
61
67
  }, "strip", z.ZodTypeAny, {
62
- action: "type" | "navigate" | "click" | "assert-visible" | "assert-hidden" | "assert-text" | "assert-disabled" | "assert-count" | "wait" | "api-call";
63
68
  description: string;
69
+ action: "type" | "navigate" | "click" | "assert-visible" | "assert-hidden" | "assert-text" | "assert-disabled" | "assert-count" | "wait" | "api-call";
64
70
  value?: string | undefined;
65
71
  target?: string | undefined;
66
72
  }, {
67
- action: "type" | "navigate" | "click" | "assert-visible" | "assert-hidden" | "assert-text" | "assert-disabled" | "assert-count" | "wait" | "api-call";
68
73
  description: string;
74
+ action: "type" | "navigate" | "click" | "assert-visible" | "assert-hidden" | "assert-text" | "assert-disabled" | "assert-count" | "wait" | "api-call";
69
75
  value?: string | undefined;
70
76
  target?: string | undefined;
71
77
  }>, "many">;
@@ -75,13 +81,13 @@ export declare const NeutralScenarioSchema: z.ZodObject<{
75
81
  reason: z.ZodString;
76
82
  confidence: z.ZodEnum<["high", "medium", "low"]>;
77
83
  }, "strip", z.ZodTypeAny, {
84
+ confidence: "high" | "medium" | "low";
78
85
  reason: string;
79
86
  adapter: "playwright" | "cypress-e2e" | "cypress-component" | "api" | "accessibility";
80
- confidence: "high" | "medium" | "low";
81
87
  }, {
88
+ confidence: "high" | "medium" | "low";
82
89
  reason: string;
83
90
  adapter: "playwright" | "cypress-e2e" | "cypress-component" | "api" | "accessibility";
84
- confidence: "high" | "medium" | "low";
85
91
  }>, "many">;
86
92
  sourceGapIds: z.ZodArray<z.ZodString, "many">;
87
93
  }, "strip", z.ZodTypeAny, {
@@ -90,16 +96,16 @@ export declare const NeutralScenarioSchema: z.ZodObject<{
90
96
  title: string;
91
97
  targetPath: string;
92
98
  steps: {
93
- action: "type" | "navigate" | "click" | "assert-visible" | "assert-hidden" | "assert-text" | "assert-disabled" | "assert-count" | "wait" | "api-call";
94
99
  description: string;
100
+ action: "type" | "navigate" | "click" | "assert-visible" | "assert-hidden" | "assert-text" | "assert-disabled" | "assert-count" | "wait" | "api-call";
95
101
  value?: string | undefined;
96
102
  target?: string | undefined;
97
103
  }[];
98
104
  tags: string[];
99
105
  recommendations: {
106
+ confidence: "high" | "medium" | "low";
100
107
  reason: string;
101
108
  adapter: "playwright" | "cypress-e2e" | "cypress-component" | "api" | "accessibility";
102
- confidence: "high" | "medium" | "low";
103
109
  }[];
104
110
  sourceGapIds: string[];
105
111
  targetComponent?: string | undefined;
@@ -109,16 +115,16 @@ export declare const NeutralScenarioSchema: z.ZodObject<{
109
115
  title: string;
110
116
  targetPath: string;
111
117
  steps: {
112
- action: "type" | "navigate" | "click" | "assert-visible" | "assert-hidden" | "assert-text" | "assert-disabled" | "assert-count" | "wait" | "api-call";
113
118
  description: string;
119
+ action: "type" | "navigate" | "click" | "assert-visible" | "assert-hidden" | "assert-text" | "assert-disabled" | "assert-count" | "wait" | "api-call";
114
120
  value?: string | undefined;
115
121
  target?: string | undefined;
116
122
  }[];
117
123
  tags: string[];
118
124
  recommendations: {
125
+ confidence: "high" | "medium" | "low";
119
126
  reason: string;
120
127
  adapter: "playwright" | "cypress-e2e" | "cypress-component" | "api" | "accessibility";
121
- confidence: "high" | "medium" | "low";
122
128
  }[];
123
129
  sourceGapIds: string[];
124
130
  targetComponent?: string | undefined;
@@ -132,44 +138,50 @@ export declare const GeneratedTestSchema: z.ZodObject<{
132
138
  outputPath: z.ZodString;
133
139
  }, "strip", z.ZodTypeAny, {
134
140
  code: string;
141
+ source: "llm" | "template";
135
142
  adapter: "playwright" | "cypress-e2e" | "cypress-component" | "api" | "accessibility";
136
143
  scenarioId: string;
137
144
  filename: string;
138
- source: "llm" | "template";
139
145
  outputPath: string;
140
146
  }, {
141
147
  code: string;
148
+ source: "llm" | "template";
142
149
  adapter: "playwright" | "cypress-e2e" | "cypress-component" | "api" | "accessibility";
143
150
  scenarioId: string;
144
151
  filename: string;
145
- source: "llm" | "template";
146
152
  outputPath: string;
147
153
  }>;
148
154
  export declare const GapAnalysisSchema: z.ZodObject<{
149
155
  analyzedAt: z.ZodString;
150
156
  mode: z.ZodEnum<["url-only", "url-repo", "auth-required"]>;
151
- releaseConfidence: z.ZodNumber;
157
+ releaseConfidence: z.ZodUnion<[z.ZodNumber, z.ZodNull]>;
152
158
  coveragePagesScanned: z.ZodNumber;
153
159
  coverageBudgetExceeded: z.ZodBoolean;
154
160
  coverageWarning: z.ZodOptional<z.ZodEnum<["budget-exceeded", "low-coverage", "navigation-failures", "auth-required"]>>;
155
161
  gaps: z.ZodArray<z.ZodObject<{
156
162
  id: z.ZodString;
157
163
  path: z.ZodString;
158
- severity: z.ZodEnum<["high", "medium", "low"]>;
164
+ severity: z.ZodEnum<["critical", "high", "medium", "low"]>;
159
165
  reason: z.ZodString;
160
- category: z.ZodEnum<["untested-route", "a11y", "console-error", "broken-link"]>;
166
+ category: z.ZodEnum<["untested-route", "a11y", "console-error", "broken-link", "auth-surface", "coverage"]>;
167
+ description: z.ZodOptional<z.ZodString>;
168
+ recommendation: z.ZodOptional<z.ZodString>;
161
169
  }, "strip", z.ZodTypeAny, {
162
170
  path: string;
163
171
  id: string;
164
- severity: "high" | "medium" | "low";
172
+ severity: "high" | "medium" | "low" | "critical";
165
173
  reason: string;
166
- category: "untested-route" | "a11y" | "console-error" | "broken-link";
174
+ category: "untested-route" | "a11y" | "console-error" | "broken-link" | "auth-surface" | "coverage";
175
+ recommendation?: string | undefined;
176
+ description?: string | undefined;
167
177
  }, {
168
178
  path: string;
169
179
  id: string;
170
- severity: "high" | "medium" | "low";
180
+ severity: "high" | "medium" | "low" | "critical";
171
181
  reason: string;
172
- category: "untested-route" | "a11y" | "console-error" | "broken-link";
182
+ category: "untested-route" | "a11y" | "console-error" | "broken-link" | "auth-surface" | "coverage";
183
+ recommendation?: string | undefined;
184
+ description?: string | undefined;
173
185
  }>, "many">;
174
186
  scenarios: z.ZodArray<z.ZodObject<{
175
187
  id: z.ZodString;
@@ -183,13 +195,13 @@ export declare const GapAnalysisSchema: z.ZodObject<{
183
195
  value: z.ZodOptional<z.ZodString>;
184
196
  description: z.ZodString;
185
197
  }, "strip", z.ZodTypeAny, {
186
- action: "type" | "navigate" | "click" | "assert-visible" | "assert-hidden" | "assert-text" | "assert-disabled" | "assert-count" | "wait" | "api-call";
187
198
  description: string;
199
+ action: "type" | "navigate" | "click" | "assert-visible" | "assert-hidden" | "assert-text" | "assert-disabled" | "assert-count" | "wait" | "api-call";
188
200
  value?: string | undefined;
189
201
  target?: string | undefined;
190
202
  }, {
191
- action: "type" | "navigate" | "click" | "assert-visible" | "assert-hidden" | "assert-text" | "assert-disabled" | "assert-count" | "wait" | "api-call";
192
203
  description: string;
204
+ action: "type" | "navigate" | "click" | "assert-visible" | "assert-hidden" | "assert-text" | "assert-disabled" | "assert-count" | "wait" | "api-call";
193
205
  value?: string | undefined;
194
206
  target?: string | undefined;
195
207
  }>, "many">;
@@ -199,13 +211,13 @@ export declare const GapAnalysisSchema: z.ZodObject<{
199
211
  reason: z.ZodString;
200
212
  confidence: z.ZodEnum<["high", "medium", "low"]>;
201
213
  }, "strip", z.ZodTypeAny, {
214
+ confidence: "high" | "medium" | "low";
202
215
  reason: string;
203
216
  adapter: "playwright" | "cypress-e2e" | "cypress-component" | "api" | "accessibility";
204
- confidence: "high" | "medium" | "low";
205
217
  }, {
218
+ confidence: "high" | "medium" | "low";
206
219
  reason: string;
207
220
  adapter: "playwright" | "cypress-e2e" | "cypress-component" | "api" | "accessibility";
208
- confidence: "high" | "medium" | "low";
209
221
  }>, "many">;
210
222
  sourceGapIds: z.ZodArray<z.ZodString, "many">;
211
223
  }, "strip", z.ZodTypeAny, {
@@ -214,16 +226,16 @@ export declare const GapAnalysisSchema: z.ZodObject<{
214
226
  title: string;
215
227
  targetPath: string;
216
228
  steps: {
217
- action: "type" | "navigate" | "click" | "assert-visible" | "assert-hidden" | "assert-text" | "assert-disabled" | "assert-count" | "wait" | "api-call";
218
229
  description: string;
230
+ action: "type" | "navigate" | "click" | "assert-visible" | "assert-hidden" | "assert-text" | "assert-disabled" | "assert-count" | "wait" | "api-call";
219
231
  value?: string | undefined;
220
232
  target?: string | undefined;
221
233
  }[];
222
234
  tags: string[];
223
235
  recommendations: {
236
+ confidence: "high" | "medium" | "low";
224
237
  reason: string;
225
238
  adapter: "playwright" | "cypress-e2e" | "cypress-component" | "api" | "accessibility";
226
- confidence: "high" | "medium" | "low";
227
239
  }[];
228
240
  sourceGapIds: string[];
229
241
  targetComponent?: string | undefined;
@@ -233,16 +245,16 @@ export declare const GapAnalysisSchema: z.ZodObject<{
233
245
  title: string;
234
246
  targetPath: string;
235
247
  steps: {
236
- action: "type" | "navigate" | "click" | "assert-visible" | "assert-hidden" | "assert-text" | "assert-disabled" | "assert-count" | "wait" | "api-call";
237
248
  description: string;
249
+ action: "type" | "navigate" | "click" | "assert-visible" | "assert-hidden" | "assert-text" | "assert-disabled" | "assert-count" | "wait" | "api-call";
238
250
  value?: string | undefined;
239
251
  target?: string | undefined;
240
252
  }[];
241
253
  tags: string[];
242
254
  recommendations: {
255
+ confidence: "high" | "medium" | "low";
243
256
  reason: string;
244
257
  adapter: "playwright" | "cypress-e2e" | "cypress-component" | "api" | "accessibility";
245
- confidence: "high" | "medium" | "low";
246
258
  }[];
247
259
  sourceGapIds: string[];
248
260
  targetComponent?: string | undefined;
@@ -256,31 +268,186 @@ export declare const GapAnalysisSchema: z.ZodObject<{
256
268
  outputPath: z.ZodString;
257
269
  }, "strip", z.ZodTypeAny, {
258
270
  code: string;
271
+ source: "llm" | "template";
259
272
  adapter: "playwright" | "cypress-e2e" | "cypress-component" | "api" | "accessibility";
260
273
  scenarioId: string;
261
274
  filename: string;
262
- source: "llm" | "template";
263
275
  outputPath: string;
264
276
  }, {
265
277
  code: string;
278
+ source: "llm" | "template";
266
279
  adapter: "playwright" | "cypress-e2e" | "cypress-component" | "api" | "accessibility";
267
280
  scenarioId: string;
268
281
  filename: string;
269
- source: "llm" | "template";
270
282
  outputPath: string;
271
283
  }>, "many">;
284
+ costIntelligence: z.ZodOptional<z.ZodObject<{
285
+ maxOutputTokensPerLlmCall: z.ZodNumber;
286
+ budgetRole: z.ZodLiteral<"max-output-tokens-per-llm-call">;
287
+ records: z.ZodArray<z.ZodObject<{
288
+ provider: z.ZodString;
289
+ model: z.ZodString;
290
+ inputTokens: z.ZodNumber;
291
+ outputTokens: z.ZodNumber;
292
+ estimatedCostUsd: z.ZodOptional<z.ZodNumber>;
293
+ operationType: z.ZodEnum<["scenario-generation"]>;
294
+ timestamp: z.ZodString;
295
+ promptHash: z.ZodOptional<z.ZodString>;
296
+ resultHash: z.ZodOptional<z.ZodString>;
297
+ dataQuality: z.ZodEnum<["actual", "estimated", "mixed", "none"]>;
298
+ notes: z.ZodOptional<z.ZodString>;
299
+ }, "strip", z.ZodTypeAny, {
300
+ provider: string;
301
+ model: string;
302
+ inputTokens: number;
303
+ outputTokens: number;
304
+ operationType: "scenario-generation";
305
+ timestamp: string;
306
+ dataQuality: "none" | "actual" | "estimated" | "mixed";
307
+ estimatedCostUsd?: number | undefined;
308
+ promptHash?: string | undefined;
309
+ resultHash?: string | undefined;
310
+ notes?: string | undefined;
311
+ }, {
312
+ provider: string;
313
+ model: string;
314
+ inputTokens: number;
315
+ outputTokens: number;
316
+ operationType: "scenario-generation";
317
+ timestamp: string;
318
+ dataQuality: "none" | "actual" | "estimated" | "mixed";
319
+ estimatedCostUsd?: number | undefined;
320
+ promptHash?: string | undefined;
321
+ resultHash?: string | undefined;
322
+ notes?: string | undefined;
323
+ }>, "many">;
324
+ budgetWarnings: z.ZodArray<z.ZodString, "many">;
325
+ usageSummary: z.ZodObject<{
326
+ totalInputTokens: z.ZodNumber;
327
+ totalOutputTokens: z.ZodNumber;
328
+ dataQuality: z.ZodEnum<["actual", "estimated", "mixed", "none"]>;
329
+ }, "strip", z.ZodTypeAny, {
330
+ dataQuality: "none" | "actual" | "estimated" | "mixed";
331
+ totalInputTokens: number;
332
+ totalOutputTokens: number;
333
+ }, {
334
+ dataQuality: "none" | "actual" | "estimated" | "mixed";
335
+ totalInputTokens: number;
336
+ totalOutputTokens: number;
337
+ }>;
338
+ repeatedOperations: z.ZodArray<z.ZodObject<{
339
+ promptHash: z.ZodString;
340
+ count: z.ZodNumber;
341
+ recommendation: z.ZodString;
342
+ }, "strip", z.ZodTypeAny, {
343
+ recommendation: string;
344
+ promptHash: string;
345
+ count: number;
346
+ }, {
347
+ recommendation: string;
348
+ promptHash: string;
349
+ count: number;
350
+ }>, "many">;
351
+ deterministicMaturity: z.ZodObject<{
352
+ level: z.ZodNumber;
353
+ label: z.ZodString;
354
+ rationale: z.ZodString;
355
+ ceilingNote: z.ZodOptional<z.ZodString>;
356
+ }, "strip", z.ZodTypeAny, {
357
+ label: string;
358
+ level: number;
359
+ rationale: string;
360
+ ceilingNote?: string | undefined;
361
+ }, {
362
+ label: string;
363
+ level: number;
364
+ rationale: string;
365
+ ceilingNote?: string | undefined;
366
+ }>;
367
+ conversionRecommendations: z.ZodArray<z.ZodString, "many">;
368
+ }, "strip", z.ZodTypeAny, {
369
+ maxOutputTokensPerLlmCall: number;
370
+ budgetRole: "max-output-tokens-per-llm-call";
371
+ records: {
372
+ provider: string;
373
+ model: string;
374
+ inputTokens: number;
375
+ outputTokens: number;
376
+ operationType: "scenario-generation";
377
+ timestamp: string;
378
+ dataQuality: "none" | "actual" | "estimated" | "mixed";
379
+ estimatedCostUsd?: number | undefined;
380
+ promptHash?: string | undefined;
381
+ resultHash?: string | undefined;
382
+ notes?: string | undefined;
383
+ }[];
384
+ budgetWarnings: string[];
385
+ usageSummary: {
386
+ dataQuality: "none" | "actual" | "estimated" | "mixed";
387
+ totalInputTokens: number;
388
+ totalOutputTokens: number;
389
+ };
390
+ repeatedOperations: {
391
+ recommendation: string;
392
+ promptHash: string;
393
+ count: number;
394
+ }[];
395
+ deterministicMaturity: {
396
+ label: string;
397
+ level: number;
398
+ rationale: string;
399
+ ceilingNote?: string | undefined;
400
+ };
401
+ conversionRecommendations: string[];
402
+ }, {
403
+ maxOutputTokensPerLlmCall: number;
404
+ budgetRole: "max-output-tokens-per-llm-call";
405
+ records: {
406
+ provider: string;
407
+ model: string;
408
+ inputTokens: number;
409
+ outputTokens: number;
410
+ operationType: "scenario-generation";
411
+ timestamp: string;
412
+ dataQuality: "none" | "actual" | "estimated" | "mixed";
413
+ estimatedCostUsd?: number | undefined;
414
+ promptHash?: string | undefined;
415
+ resultHash?: string | undefined;
416
+ notes?: string | undefined;
417
+ }[];
418
+ budgetWarnings: string[];
419
+ usageSummary: {
420
+ dataQuality: "none" | "actual" | "estimated" | "mixed";
421
+ totalInputTokens: number;
422
+ totalOutputTokens: number;
423
+ };
424
+ repeatedOperations: {
425
+ recommendation: string;
426
+ promptHash: string;
427
+ count: number;
428
+ }[];
429
+ deterministicMaturity: {
430
+ label: string;
431
+ level: number;
432
+ rationale: string;
433
+ ceilingNote?: string | undefined;
434
+ };
435
+ conversionRecommendations: string[];
436
+ }>>;
272
437
  }, "strip", z.ZodTypeAny, {
273
438
  analyzedAt: string;
274
439
  mode: "url-only" | "url-repo" | "auth-required";
275
- releaseConfidence: number;
440
+ releaseConfidence: number | null;
276
441
  coveragePagesScanned: number;
277
442
  coverageBudgetExceeded: boolean;
278
443
  gaps: {
279
444
  path: string;
280
445
  id: string;
281
- severity: "high" | "medium" | "low";
446
+ severity: "high" | "medium" | "low" | "critical";
282
447
  reason: string;
283
- category: "untested-route" | "a11y" | "console-error" | "broken-link";
448
+ category: "untested-route" | "a11y" | "console-error" | "broken-link" | "auth-surface" | "coverage";
449
+ recommendation?: string | undefined;
450
+ description?: string | undefined;
284
451
  }[];
285
452
  scenarios: {
286
453
  id: string;
@@ -288,41 +455,78 @@ export declare const GapAnalysisSchema: z.ZodObject<{
288
455
  title: string;
289
456
  targetPath: string;
290
457
  steps: {
291
- action: "type" | "navigate" | "click" | "assert-visible" | "assert-hidden" | "assert-text" | "assert-disabled" | "assert-count" | "wait" | "api-call";
292
458
  description: string;
459
+ action: "type" | "navigate" | "click" | "assert-visible" | "assert-hidden" | "assert-text" | "assert-disabled" | "assert-count" | "wait" | "api-call";
293
460
  value?: string | undefined;
294
461
  target?: string | undefined;
295
462
  }[];
296
463
  tags: string[];
297
464
  recommendations: {
465
+ confidence: "high" | "medium" | "low";
298
466
  reason: string;
299
467
  adapter: "playwright" | "cypress-e2e" | "cypress-component" | "api" | "accessibility";
300
- confidence: "high" | "medium" | "low";
301
468
  }[];
302
469
  sourceGapIds: string[];
303
470
  targetComponent?: string | undefined;
304
471
  }[];
305
472
  generatedTests: {
306
473
  code: string;
474
+ source: "llm" | "template";
307
475
  adapter: "playwright" | "cypress-e2e" | "cypress-component" | "api" | "accessibility";
308
476
  scenarioId: string;
309
477
  filename: string;
310
- source: "llm" | "template";
311
478
  outputPath: string;
312
479
  }[];
313
480
  coverageWarning?: "auth-required" | "budget-exceeded" | "low-coverage" | "navigation-failures" | undefined;
481
+ costIntelligence?: {
482
+ maxOutputTokensPerLlmCall: number;
483
+ budgetRole: "max-output-tokens-per-llm-call";
484
+ records: {
485
+ provider: string;
486
+ model: string;
487
+ inputTokens: number;
488
+ outputTokens: number;
489
+ operationType: "scenario-generation";
490
+ timestamp: string;
491
+ dataQuality: "none" | "actual" | "estimated" | "mixed";
492
+ estimatedCostUsd?: number | undefined;
493
+ promptHash?: string | undefined;
494
+ resultHash?: string | undefined;
495
+ notes?: string | undefined;
496
+ }[];
497
+ budgetWarnings: string[];
498
+ usageSummary: {
499
+ dataQuality: "none" | "actual" | "estimated" | "mixed";
500
+ totalInputTokens: number;
501
+ totalOutputTokens: number;
502
+ };
503
+ repeatedOperations: {
504
+ recommendation: string;
505
+ promptHash: string;
506
+ count: number;
507
+ }[];
508
+ deterministicMaturity: {
509
+ label: string;
510
+ level: number;
511
+ rationale: string;
512
+ ceilingNote?: string | undefined;
513
+ };
514
+ conversionRecommendations: string[];
515
+ } | undefined;
314
516
  }, {
315
517
  analyzedAt: string;
316
518
  mode: "url-only" | "url-repo" | "auth-required";
317
- releaseConfidence: number;
519
+ releaseConfidence: number | null;
318
520
  coveragePagesScanned: number;
319
521
  coverageBudgetExceeded: boolean;
320
522
  gaps: {
321
523
  path: string;
322
524
  id: string;
323
- severity: "high" | "medium" | "low";
525
+ severity: "high" | "medium" | "low" | "critical";
324
526
  reason: string;
325
- category: "untested-route" | "a11y" | "console-error" | "broken-link";
527
+ category: "untested-route" | "a11y" | "console-error" | "broken-link" | "auth-surface" | "coverage";
528
+ recommendation?: string | undefined;
529
+ description?: string | undefined;
326
530
  }[];
327
531
  scenarios: {
328
532
  id: string;
@@ -330,29 +534,64 @@ export declare const GapAnalysisSchema: z.ZodObject<{
330
534
  title: string;
331
535
  targetPath: string;
332
536
  steps: {
333
- action: "type" | "navigate" | "click" | "assert-visible" | "assert-hidden" | "assert-text" | "assert-disabled" | "assert-count" | "wait" | "api-call";
334
537
  description: string;
538
+ action: "type" | "navigate" | "click" | "assert-visible" | "assert-hidden" | "assert-text" | "assert-disabled" | "assert-count" | "wait" | "api-call";
335
539
  value?: string | undefined;
336
540
  target?: string | undefined;
337
541
  }[];
338
542
  tags: string[];
339
543
  recommendations: {
544
+ confidence: "high" | "medium" | "low";
340
545
  reason: string;
341
546
  adapter: "playwright" | "cypress-e2e" | "cypress-component" | "api" | "accessibility";
342
- confidence: "high" | "medium" | "low";
343
547
  }[];
344
548
  sourceGapIds: string[];
345
549
  targetComponent?: string | undefined;
346
550
  }[];
347
551
  generatedTests: {
348
552
  code: string;
553
+ source: "llm" | "template";
349
554
  adapter: "playwright" | "cypress-e2e" | "cypress-component" | "api" | "accessibility";
350
555
  scenarioId: string;
351
556
  filename: string;
352
- source: "llm" | "template";
353
557
  outputPath: string;
354
558
  }[];
355
559
  coverageWarning?: "auth-required" | "budget-exceeded" | "low-coverage" | "navigation-failures" | undefined;
560
+ costIntelligence?: {
561
+ maxOutputTokensPerLlmCall: number;
562
+ budgetRole: "max-output-tokens-per-llm-call";
563
+ records: {
564
+ provider: string;
565
+ model: string;
566
+ inputTokens: number;
567
+ outputTokens: number;
568
+ operationType: "scenario-generation";
569
+ timestamp: string;
570
+ dataQuality: "none" | "actual" | "estimated" | "mixed";
571
+ estimatedCostUsd?: number | undefined;
572
+ promptHash?: string | undefined;
573
+ resultHash?: string | undefined;
574
+ notes?: string | undefined;
575
+ }[];
576
+ budgetWarnings: string[];
577
+ usageSummary: {
578
+ dataQuality: "none" | "actual" | "estimated" | "mixed";
579
+ totalInputTokens: number;
580
+ totalOutputTokens: number;
581
+ };
582
+ repeatedOperations: {
583
+ recommendation: string;
584
+ promptHash: string;
585
+ count: number;
586
+ }[];
587
+ deterministicMaturity: {
588
+ label: string;
589
+ level: number;
590
+ rationale: string;
591
+ ceilingNote?: string | undefined;
592
+ };
593
+ conversionRecommendations: string[];
594
+ } | undefined;
356
595
  }>;
357
596
  export type GapAnalysis = z.infer<typeof GapAnalysisSchema>;
358
597
  export type Gap = z.infer<typeof GapSchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"gap-analysis.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/gap-analysis.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;EAMpB,CAAC;AAEH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;EAIxC,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;EAgBzB,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUhC,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;EAO9B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAY5B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AAC5C,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AACtD,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC"}
1
+ {"version":3,"file":"gap-analysis.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/gap-analysis.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;EAQpB,CAAC;AAEH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;EAIxC,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;EAgBzB,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUhC,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;EAO9B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAa5B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AAC5C,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AACtD,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC"}
@@ -1,10 +1,13 @@
1
1
  import { z } from 'zod';
2
+ import { CostIntelligenceSchema } from './cost-intelligence.schema.js';
2
3
  export const GapSchema = z.object({
3
4
  id: z.string(),
4
5
  path: z.string(),
5
- severity: z.enum(['high', 'medium', 'low']),
6
+ severity: z.enum(['critical', 'high', 'medium', 'low']),
6
7
  reason: z.string(),
7
- category: z.enum(['untested-route', 'a11y', 'console-error', 'broken-link']),
8
+ category: z.enum(['untested-route', 'a11y', 'console-error', 'broken-link', 'auth-surface', 'coverage']),
9
+ description: z.string().optional(),
10
+ recommendation: z.string().optional(),
8
11
  });
9
12
  export const FrameworkRecommendationSchema = z.object({
10
13
  adapter: z.enum(['playwright', 'cypress-e2e', 'cypress-component', 'api', 'accessibility']),
@@ -50,7 +53,7 @@ export const GeneratedTestSchema = z.object({
50
53
  export const GapAnalysisSchema = z.object({
51
54
  analyzedAt: z.string().datetime(),
52
55
  mode: z.enum(['url-only', 'url-repo', 'auth-required']),
53
- releaseConfidence: z.number().min(0).max(100),
56
+ releaseConfidence: z.union([z.number().min(0).max(100), z.null()]),
54
57
  coveragePagesScanned: z.number().int().min(0),
55
58
  coverageBudgetExceeded: z.boolean(),
56
59
  coverageWarning: z
@@ -59,4 +62,5 @@ export const GapAnalysisSchema = z.object({
59
62
  gaps: z.array(GapSchema),
60
63
  scenarios: z.array(NeutralScenarioSchema),
61
64
  generatedTests: z.array(GeneratedTestSchema),
65
+ costIntelligence: CostIntelligenceSchema.optional(),
62
66
  });
@@ -1,6 +1,8 @@
1
- export { HarnessConfigSchema, AuthConfigSchema, DetectedAuthSchema, type ExplorerType, type AdapterType, type FormLoginAuthConfig, type StorageStateAuthConfig, type AuthConfig, type HarnessConfig, type DetectedAuth, } from './config.schema.js';
1
+ export { HarnessConfigSchema, resolveMaxOutputTokensPerLlmCall, AuthConfigSchema, DetectedAuthSchema, AuthPathRequirementsSchema, AuthPathSchema, AuthExplorationSchema, type ExplorerType, type AdapterType, type FormLoginAuthConfig, type StorageStateAuthConfig, type AuthConfig, type HarnessConfig, type DetectedAuth, type AuthPathRequirements, type AuthPath, type AuthExploration, } from './config.schema.js';
2
2
  export { DecisionLogEntrySchema, type DecisionLogEntry, } from './decision-log.schema.js';
3
3
  export { RouteInventorySchema, RouteSchema, A11yViolationSchema, BrokenLinkSchema, type RouteInventory, type Route, } from './route-inventory.schema.js';
4
4
  export { GapAnalysisSchema, GapSchema, NeutralScenarioSchema, GeneratedTestSchema, TestStepSchema, FrameworkRecommendationSchema, type GapAnalysis, type Gap, type NeutralScenario, type GeneratedTest, type TestStep, type FrameworkRecommendation, } from './gap-analysis.schema.js';
5
+ export { CostIntelligenceSchema, LlmUsageRecordSchema, LlmDataQualitySchema, LlmOperationTypeSchema, RepeatedAiPatternSchema, DeterministicMaturitySchema, type CostIntelligence, type LlmUsageRecord, type LlmDataQuality, type LlmOperationType, type RepeatedAiPattern, type DeterministicMaturity, } from './cost-intelligence.schema.js';
5
6
  export { RepoAnalysisSchema, type RepoAnalysis, } from './repo-analysis.schema.js';
7
+ export { PublicSurfaceSchema, PublicSurfaceViolationSchema, PublicSurfaceBrokenLinkSchema, type PublicSurface, type PublicSurfaceViolation, type PublicSurfaceBrokenLink, } from './public-surface.schema.js';
6
8
  //# sourceMappingURL=index.d.ts.map