@continuum8032/playwright-ai-tools 0.2.0-oidc-bootstrap.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/LICENSE +21 -0
- package/README.md +14 -0
- package/dist/chunk-3VDDPPGG.js +927 -0
- package/dist/chunk-GSXFV7YQ.js +544 -0
- package/dist/chunk-QL3XW2UN.js +205 -0
- package/dist/cli.cjs +1750 -0
- package/dist/cli.d.cts +4 -0
- package/dist/cli.d.ts +4 -0
- package/dist/cli.js +308 -0
- package/dist/index.cjs +2030 -0
- package/dist/index.d.cts +218 -0
- package/dist/index.d.ts +218 -0
- package/dist/index.js +354 -0
- package/dist/reporter.cjs +1265 -0
- package/dist/reporter.d.cts +22 -0
- package/dist/reporter.d.ts +22 -0
- package/dist/reporter.js +133 -0
- package/dist/types-B55GjfW7.d.cts +355 -0
- package/dist/types-B55GjfW7.d.ts +355 -0
- package/package.json +58 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import { A as AiProvider, F as FailureRecord, a as AnalysisResult, b as AnalyzeFailuresOptions, c as FailureCategory, P as PatchSuggestion, d as FailureGroup, T as TestGenerationProvider, M as ManualTestCase, e as TestGenerationProviderResult, f as TestGenerationRequest, G as GeneratedTestDraft, g as AiProviderRequest, h as TestGenerationProviderRequest, R as RunRecord, i as TraceSummary, j as AnalysisStore, k as MemoryRecord, l as FeedbackRecord, m as MemoryRecordInput, S as SearchMemoryInput, n as FeedbackRecordInput, o as FeedbackDecision, p as FailureHistoryQuery } from './types-B55GjfW7.cjs';
|
|
2
|
+
export { q as ArtifactProvider, r as ArtifactRecord, s as ArtifactResolver, B as BrowserEvidence, C as ConsoleEvent, t as FeedbackStore, u as GeneratedLocator, v as GeneratedStepCoverage, I as IssueReporter, w as ManualTestArtifact, x as ManualTestCaseQuery, y as ManualTestProvider, z as ManualTestStep, N as NetworkEvent, D as PatchPolicyDecision, E as PatchSuggestionPublisher, H as PrivacyPolicy, J as ProjectContext, K as ReportPublisher, L as RiskLevel, O as TestManagementProvider } from './types-B55GjfW7.cjs';
|
|
3
|
+
|
|
4
|
+
interface DeterministicAnalyzerOptions {
|
|
5
|
+
provider?: AiProvider;
|
|
6
|
+
outputLanguage?: string;
|
|
7
|
+
}
|
|
8
|
+
declare class DeterministicAnalyzer {
|
|
9
|
+
private readonly provider?;
|
|
10
|
+
private readonly outputLanguage;
|
|
11
|
+
constructor(options?: DeterministicAnalyzerOptions);
|
|
12
|
+
analyzeFailure(failure: FailureRecord, similarAnalyses?: AnalysisResult[]): Promise<AnalysisResult>;
|
|
13
|
+
analyzeFailures(failures: FailureRecord[]): Promise<AnalysisResult[]>;
|
|
14
|
+
}
|
|
15
|
+
declare function analyzeFailures(failures: FailureRecord[], options?: AnalyzeFailuresOptions): Promise<AnalysisResult[]>;
|
|
16
|
+
|
|
17
|
+
interface BenchmarkFailureInput extends FailureRecord {
|
|
18
|
+
expectedCategory?: FailureCategory;
|
|
19
|
+
}
|
|
20
|
+
interface BenchmarkFailureResult {
|
|
21
|
+
title: string;
|
|
22
|
+
file: string;
|
|
23
|
+
expectedCategory: FailureCategory;
|
|
24
|
+
actualCategory: FailureCategory;
|
|
25
|
+
correct: boolean;
|
|
26
|
+
signature: string;
|
|
27
|
+
cacheHit: boolean;
|
|
28
|
+
analysis: AnalysisResult;
|
|
29
|
+
suggestions: PatchSuggestion[];
|
|
30
|
+
}
|
|
31
|
+
interface BenchmarkReport {
|
|
32
|
+
metrics: {
|
|
33
|
+
total: number;
|
|
34
|
+
correct: number;
|
|
35
|
+
accuracy: number;
|
|
36
|
+
unknown: number;
|
|
37
|
+
unknownRate: number;
|
|
38
|
+
cacheHits: number;
|
|
39
|
+
cacheHitRate: number;
|
|
40
|
+
suggestions: {
|
|
41
|
+
blocked: number;
|
|
42
|
+
review: number;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
failures: BenchmarkFailureResult[];
|
|
46
|
+
}
|
|
47
|
+
declare function benchmarkFailures(fixtures: BenchmarkFailureInput[]): BenchmarkReport;
|
|
48
|
+
|
|
49
|
+
interface EnrichFailureOptions {
|
|
50
|
+
artifactRoot?: string;
|
|
51
|
+
}
|
|
52
|
+
declare function enrichFailureWithArtifacts(failure: FailureRecord, options?: EnrichFailureOptions): Promise<FailureRecord>;
|
|
53
|
+
|
|
54
|
+
declare class FailureGrouper {
|
|
55
|
+
group(failures: FailureRecord[]): FailureGroup[];
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
declare function isDestructiveManualCase(manualCase: ManualTestCase): boolean;
|
|
59
|
+
declare function assertBrowserGenerationAllowed(request: Pick<TestGenerationRequest, 'manualCase' | 'url' | 'confirmBrowserRun' | 'allowDestructiveActions'>): void;
|
|
60
|
+
declare class TemplateTestGenerationProvider implements TestGenerationProvider {
|
|
61
|
+
generateTest(request: {
|
|
62
|
+
manualCase: ManualTestCase;
|
|
63
|
+
url: string;
|
|
64
|
+
}): Promise<TestGenerationProviderResult>;
|
|
65
|
+
}
|
|
66
|
+
declare function generatePlaywrightTestDraft(request: TestGenerationRequest): Promise<GeneratedTestDraft>;
|
|
67
|
+
|
|
68
|
+
interface NormalizeOptions {
|
|
69
|
+
runId?: string;
|
|
70
|
+
baseDir?: string;
|
|
71
|
+
}
|
|
72
|
+
declare function normalizePlaywrightJsonReport(report: any, options?: NormalizeOptions): FailureRecord[];
|
|
73
|
+
|
|
74
|
+
type Transport = (url: string, init: RequestInit) => Promise<{
|
|
75
|
+
ok: boolean;
|
|
76
|
+
status: number;
|
|
77
|
+
json(): Promise<any>;
|
|
78
|
+
}>;
|
|
79
|
+
interface OpenAIResponsesProviderOptions {
|
|
80
|
+
apiKey?: string;
|
|
81
|
+
model?: string;
|
|
82
|
+
baseUrl?: string;
|
|
83
|
+
transport?: Transport;
|
|
84
|
+
}
|
|
85
|
+
declare class OpenAIResponsesProvider implements AiProvider, TestGenerationProvider {
|
|
86
|
+
private readonly apiKey;
|
|
87
|
+
private readonly model;
|
|
88
|
+
private readonly baseUrl;
|
|
89
|
+
private readonly transport;
|
|
90
|
+
constructor(options?: OpenAIResponsesProviderOptions);
|
|
91
|
+
analyzeFailure(request: AiProviderRequest): Promise<AnalysisResult>;
|
|
92
|
+
generateTest(request: TestGenerationProviderRequest): Promise<TestGenerationProviderResult>;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
interface PortableReport {
|
|
96
|
+
run: RunRecord;
|
|
97
|
+
failures: FailureRecord[];
|
|
98
|
+
analyses: AnalysisResult[];
|
|
99
|
+
suggestions?: PatchSuggestion[][];
|
|
100
|
+
}
|
|
101
|
+
declare function markdownReport(report: PortableReport): string;
|
|
102
|
+
declare function htmlReport(report: PortableReport): string;
|
|
103
|
+
declare function mcpSummary(report: PortableReport): string;
|
|
104
|
+
declare function writePortableReport(outputDir: string, report: PortableReport): Promise<void>;
|
|
105
|
+
|
|
106
|
+
interface GeneratePatchSuggestionOptions {
|
|
107
|
+
workspaceRoot?: string;
|
|
108
|
+
}
|
|
109
|
+
declare function evaluatePatchPolicy(suggestion: PatchSuggestion): PatchSuggestion;
|
|
110
|
+
declare function generatePatchSuggestions(failure: FailureRecord, analysis: AnalysisResult, options?: GeneratePatchSuggestionOptions): PatchSuggestion[];
|
|
111
|
+
|
|
112
|
+
declare function classifyFailure(failure: FailureRecord): AnalysisResult;
|
|
113
|
+
|
|
114
|
+
declare function parseTraceArtifact(filePath: string): Promise<TraceSummary>;
|
|
115
|
+
|
|
116
|
+
declare class MemoryStore implements AnalysisStore {
|
|
117
|
+
protected runs: Map<string, RunRecord>;
|
|
118
|
+
protected failures: FailureRecord[];
|
|
119
|
+
protected analyses: Map<string, AnalysisResult>;
|
|
120
|
+
protected memory: Map<string, MemoryRecord>;
|
|
121
|
+
protected feedback: FeedbackRecord[];
|
|
122
|
+
migrate(): Promise<void>;
|
|
123
|
+
saveRun(run: RunRecord): Promise<void>;
|
|
124
|
+
saveFailure(failure: FailureRecord): Promise<void>;
|
|
125
|
+
saveAnalysis(signature: string, analysis: AnalysisResult): Promise<void>;
|
|
126
|
+
getCachedAnalysis(signature: string): Promise<AnalysisResult | null>;
|
|
127
|
+
upsertMemory(input: MemoryRecordInput): Promise<void>;
|
|
128
|
+
searchMemory(input: SearchMemoryInput): Promise<MemoryRecord[]>;
|
|
129
|
+
recordFeedback(input: FeedbackRecordInput): Promise<void>;
|
|
130
|
+
searchFeedback(input: {
|
|
131
|
+
signature?: string;
|
|
132
|
+
decision?: FeedbackDecision;
|
|
133
|
+
query?: string;
|
|
134
|
+
limit?: number;
|
|
135
|
+
}): Promise<FeedbackRecord[]>;
|
|
136
|
+
findFailures(input: FailureHistoryQuery): Promise<FailureRecord[]>;
|
|
137
|
+
getRun(id: string): Promise<RunRecord | null>;
|
|
138
|
+
stats(): Promise<Record<string, number>>;
|
|
139
|
+
close(): Promise<void>;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
interface SQLiteStoreOptions {
|
|
143
|
+
path?: string;
|
|
144
|
+
}
|
|
145
|
+
declare class SQLiteStore {
|
|
146
|
+
private readonly filePath;
|
|
147
|
+
private db?;
|
|
148
|
+
private loaded;
|
|
149
|
+
private readonly inMemory;
|
|
150
|
+
constructor(options?: SQLiteStoreOptions);
|
|
151
|
+
migrate(): Promise<void>;
|
|
152
|
+
saveRun(run: RunRecord): Promise<void>;
|
|
153
|
+
saveFailure(failure: FailureRecord): Promise<void>;
|
|
154
|
+
saveAnalysis(signature: string, analysis: AnalysisResult): Promise<void>;
|
|
155
|
+
getCachedAnalysis(signature: string): Promise<AnalysisResult | null>;
|
|
156
|
+
upsertMemory(record: MemoryRecordInput): Promise<void>;
|
|
157
|
+
searchMemory(input: SearchMemoryInput): Promise<MemoryRecord[]>;
|
|
158
|
+
recordFeedback(input: FeedbackRecordInput): Promise<void>;
|
|
159
|
+
searchFeedback(input: {
|
|
160
|
+
signature?: string;
|
|
161
|
+
decision?: FeedbackDecision;
|
|
162
|
+
query?: string;
|
|
163
|
+
limit?: number;
|
|
164
|
+
}): Promise<FeedbackRecord[]>;
|
|
165
|
+
findFailures(input: FailureHistoryQuery): Promise<FailureRecord[]>;
|
|
166
|
+
getRun(id: string): Promise<RunRecord | null>;
|
|
167
|
+
stats(): Promise<Record<string, number>>;
|
|
168
|
+
close(): Promise<void>;
|
|
169
|
+
private load;
|
|
170
|
+
private importSnapshot;
|
|
171
|
+
private all;
|
|
172
|
+
private persist;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
interface QueryExecutor {
|
|
176
|
+
query(sql: string, params?: unknown[]): Promise<{
|
|
177
|
+
rows: any[];
|
|
178
|
+
rowCount?: number | null;
|
|
179
|
+
}>;
|
|
180
|
+
close?(): Promise<void>;
|
|
181
|
+
}
|
|
182
|
+
declare class PostgresStore extends MemoryStore {
|
|
183
|
+
private readonly executor?;
|
|
184
|
+
constructor(executor?: QueryExecutor | undefined);
|
|
185
|
+
migrate(): Promise<void>;
|
|
186
|
+
saveRun(run: RunRecord): Promise<void>;
|
|
187
|
+
saveFailure(failure: FailureRecord): Promise<void>;
|
|
188
|
+
saveAnalysis(signature: string, analysis: AnalysisResult): Promise<void>;
|
|
189
|
+
getCachedAnalysis(signature: string): Promise<AnalysisResult | null>;
|
|
190
|
+
upsertMemory(record: MemoryRecordInput): Promise<void>;
|
|
191
|
+
searchMemory(input: SearchMemoryInput): Promise<MemoryRecord[]>;
|
|
192
|
+
recordFeedback(record: FeedbackRecordInput): Promise<void>;
|
|
193
|
+
searchFeedback(input: {
|
|
194
|
+
signature?: string;
|
|
195
|
+
decision?: FeedbackDecision;
|
|
196
|
+
query?: string;
|
|
197
|
+
limit?: number;
|
|
198
|
+
}): Promise<FeedbackRecord[]>;
|
|
199
|
+
findFailures(input: FailureHistoryQuery): Promise<FailureRecord[]>;
|
|
200
|
+
close(): Promise<void>;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
interface ImportLegacyRowsInput {
|
|
204
|
+
testResults?: any[];
|
|
205
|
+
analysisCache?: any[];
|
|
206
|
+
artifacts?: any[];
|
|
207
|
+
}
|
|
208
|
+
interface LegacyAnalysisImport {
|
|
209
|
+
signature: string;
|
|
210
|
+
analysis: AnalysisResult;
|
|
211
|
+
}
|
|
212
|
+
interface LegacyImportResult {
|
|
213
|
+
failures: FailureRecord[];
|
|
214
|
+
analyses: LegacyAnalysisImport[];
|
|
215
|
+
}
|
|
216
|
+
declare function importLegacyRows(input: ImportLegacyRowsInput): LegacyImportResult;
|
|
217
|
+
|
|
218
|
+
export { AiProvider, AiProviderRequest, AnalysisResult, AnalysisStore, type BenchmarkFailureInput, type BenchmarkFailureResult, type BenchmarkReport, DeterministicAnalyzer, FailureCategory, FailureGroup, FailureGrouper, FailureHistoryQuery, FailureRecord, FeedbackDecision, FeedbackRecord, FeedbackRecordInput, GeneratedTestDraft, type ImportLegacyRowsInput, type LegacyImportResult, ManualTestCase, MemoryRecord, MemoryRecordInput, MemoryStore, OpenAIResponsesProvider, PatchSuggestion, type PortableReport, PostgresStore, type QueryExecutor, RunRecord, SQLiteStore, SearchMemoryInput, TemplateTestGenerationProvider, TestGenerationProvider, TestGenerationProviderRequest, TestGenerationProviderResult, TestGenerationRequest, TraceSummary, analyzeFailures, assertBrowserGenerationAllowed, benchmarkFailures, classifyFailure, enrichFailureWithArtifacts, evaluatePatchPolicy, generatePatchSuggestions, generatePlaywrightTestDraft, htmlReport, importLegacyRows, isDestructiveManualCase, markdownReport, mcpSummary, normalizePlaywrightJsonReport, parseTraceArtifact, writePortableReport };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import { A as AiProvider, F as FailureRecord, a as AnalysisResult, b as AnalyzeFailuresOptions, c as FailureCategory, P as PatchSuggestion, d as FailureGroup, T as TestGenerationProvider, M as ManualTestCase, e as TestGenerationProviderResult, f as TestGenerationRequest, G as GeneratedTestDraft, g as AiProviderRequest, h as TestGenerationProviderRequest, R as RunRecord, i as TraceSummary, j as AnalysisStore, k as MemoryRecord, l as FeedbackRecord, m as MemoryRecordInput, S as SearchMemoryInput, n as FeedbackRecordInput, o as FeedbackDecision, p as FailureHistoryQuery } from './types-B55GjfW7.js';
|
|
2
|
+
export { q as ArtifactProvider, r as ArtifactRecord, s as ArtifactResolver, B as BrowserEvidence, C as ConsoleEvent, t as FeedbackStore, u as GeneratedLocator, v as GeneratedStepCoverage, I as IssueReporter, w as ManualTestArtifact, x as ManualTestCaseQuery, y as ManualTestProvider, z as ManualTestStep, N as NetworkEvent, D as PatchPolicyDecision, E as PatchSuggestionPublisher, H as PrivacyPolicy, J as ProjectContext, K as ReportPublisher, L as RiskLevel, O as TestManagementProvider } from './types-B55GjfW7.js';
|
|
3
|
+
|
|
4
|
+
interface DeterministicAnalyzerOptions {
|
|
5
|
+
provider?: AiProvider;
|
|
6
|
+
outputLanguage?: string;
|
|
7
|
+
}
|
|
8
|
+
declare class DeterministicAnalyzer {
|
|
9
|
+
private readonly provider?;
|
|
10
|
+
private readonly outputLanguage;
|
|
11
|
+
constructor(options?: DeterministicAnalyzerOptions);
|
|
12
|
+
analyzeFailure(failure: FailureRecord, similarAnalyses?: AnalysisResult[]): Promise<AnalysisResult>;
|
|
13
|
+
analyzeFailures(failures: FailureRecord[]): Promise<AnalysisResult[]>;
|
|
14
|
+
}
|
|
15
|
+
declare function analyzeFailures(failures: FailureRecord[], options?: AnalyzeFailuresOptions): Promise<AnalysisResult[]>;
|
|
16
|
+
|
|
17
|
+
interface BenchmarkFailureInput extends FailureRecord {
|
|
18
|
+
expectedCategory?: FailureCategory;
|
|
19
|
+
}
|
|
20
|
+
interface BenchmarkFailureResult {
|
|
21
|
+
title: string;
|
|
22
|
+
file: string;
|
|
23
|
+
expectedCategory: FailureCategory;
|
|
24
|
+
actualCategory: FailureCategory;
|
|
25
|
+
correct: boolean;
|
|
26
|
+
signature: string;
|
|
27
|
+
cacheHit: boolean;
|
|
28
|
+
analysis: AnalysisResult;
|
|
29
|
+
suggestions: PatchSuggestion[];
|
|
30
|
+
}
|
|
31
|
+
interface BenchmarkReport {
|
|
32
|
+
metrics: {
|
|
33
|
+
total: number;
|
|
34
|
+
correct: number;
|
|
35
|
+
accuracy: number;
|
|
36
|
+
unknown: number;
|
|
37
|
+
unknownRate: number;
|
|
38
|
+
cacheHits: number;
|
|
39
|
+
cacheHitRate: number;
|
|
40
|
+
suggestions: {
|
|
41
|
+
blocked: number;
|
|
42
|
+
review: number;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
failures: BenchmarkFailureResult[];
|
|
46
|
+
}
|
|
47
|
+
declare function benchmarkFailures(fixtures: BenchmarkFailureInput[]): BenchmarkReport;
|
|
48
|
+
|
|
49
|
+
interface EnrichFailureOptions {
|
|
50
|
+
artifactRoot?: string;
|
|
51
|
+
}
|
|
52
|
+
declare function enrichFailureWithArtifacts(failure: FailureRecord, options?: EnrichFailureOptions): Promise<FailureRecord>;
|
|
53
|
+
|
|
54
|
+
declare class FailureGrouper {
|
|
55
|
+
group(failures: FailureRecord[]): FailureGroup[];
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
declare function isDestructiveManualCase(manualCase: ManualTestCase): boolean;
|
|
59
|
+
declare function assertBrowserGenerationAllowed(request: Pick<TestGenerationRequest, 'manualCase' | 'url' | 'confirmBrowserRun' | 'allowDestructiveActions'>): void;
|
|
60
|
+
declare class TemplateTestGenerationProvider implements TestGenerationProvider {
|
|
61
|
+
generateTest(request: {
|
|
62
|
+
manualCase: ManualTestCase;
|
|
63
|
+
url: string;
|
|
64
|
+
}): Promise<TestGenerationProviderResult>;
|
|
65
|
+
}
|
|
66
|
+
declare function generatePlaywrightTestDraft(request: TestGenerationRequest): Promise<GeneratedTestDraft>;
|
|
67
|
+
|
|
68
|
+
interface NormalizeOptions {
|
|
69
|
+
runId?: string;
|
|
70
|
+
baseDir?: string;
|
|
71
|
+
}
|
|
72
|
+
declare function normalizePlaywrightJsonReport(report: any, options?: NormalizeOptions): FailureRecord[];
|
|
73
|
+
|
|
74
|
+
type Transport = (url: string, init: RequestInit) => Promise<{
|
|
75
|
+
ok: boolean;
|
|
76
|
+
status: number;
|
|
77
|
+
json(): Promise<any>;
|
|
78
|
+
}>;
|
|
79
|
+
interface OpenAIResponsesProviderOptions {
|
|
80
|
+
apiKey?: string;
|
|
81
|
+
model?: string;
|
|
82
|
+
baseUrl?: string;
|
|
83
|
+
transport?: Transport;
|
|
84
|
+
}
|
|
85
|
+
declare class OpenAIResponsesProvider implements AiProvider, TestGenerationProvider {
|
|
86
|
+
private readonly apiKey;
|
|
87
|
+
private readonly model;
|
|
88
|
+
private readonly baseUrl;
|
|
89
|
+
private readonly transport;
|
|
90
|
+
constructor(options?: OpenAIResponsesProviderOptions);
|
|
91
|
+
analyzeFailure(request: AiProviderRequest): Promise<AnalysisResult>;
|
|
92
|
+
generateTest(request: TestGenerationProviderRequest): Promise<TestGenerationProviderResult>;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
interface PortableReport {
|
|
96
|
+
run: RunRecord;
|
|
97
|
+
failures: FailureRecord[];
|
|
98
|
+
analyses: AnalysisResult[];
|
|
99
|
+
suggestions?: PatchSuggestion[][];
|
|
100
|
+
}
|
|
101
|
+
declare function markdownReport(report: PortableReport): string;
|
|
102
|
+
declare function htmlReport(report: PortableReport): string;
|
|
103
|
+
declare function mcpSummary(report: PortableReport): string;
|
|
104
|
+
declare function writePortableReport(outputDir: string, report: PortableReport): Promise<void>;
|
|
105
|
+
|
|
106
|
+
interface GeneratePatchSuggestionOptions {
|
|
107
|
+
workspaceRoot?: string;
|
|
108
|
+
}
|
|
109
|
+
declare function evaluatePatchPolicy(suggestion: PatchSuggestion): PatchSuggestion;
|
|
110
|
+
declare function generatePatchSuggestions(failure: FailureRecord, analysis: AnalysisResult, options?: GeneratePatchSuggestionOptions): PatchSuggestion[];
|
|
111
|
+
|
|
112
|
+
declare function classifyFailure(failure: FailureRecord): AnalysisResult;
|
|
113
|
+
|
|
114
|
+
declare function parseTraceArtifact(filePath: string): Promise<TraceSummary>;
|
|
115
|
+
|
|
116
|
+
declare class MemoryStore implements AnalysisStore {
|
|
117
|
+
protected runs: Map<string, RunRecord>;
|
|
118
|
+
protected failures: FailureRecord[];
|
|
119
|
+
protected analyses: Map<string, AnalysisResult>;
|
|
120
|
+
protected memory: Map<string, MemoryRecord>;
|
|
121
|
+
protected feedback: FeedbackRecord[];
|
|
122
|
+
migrate(): Promise<void>;
|
|
123
|
+
saveRun(run: RunRecord): Promise<void>;
|
|
124
|
+
saveFailure(failure: FailureRecord): Promise<void>;
|
|
125
|
+
saveAnalysis(signature: string, analysis: AnalysisResult): Promise<void>;
|
|
126
|
+
getCachedAnalysis(signature: string): Promise<AnalysisResult | null>;
|
|
127
|
+
upsertMemory(input: MemoryRecordInput): Promise<void>;
|
|
128
|
+
searchMemory(input: SearchMemoryInput): Promise<MemoryRecord[]>;
|
|
129
|
+
recordFeedback(input: FeedbackRecordInput): Promise<void>;
|
|
130
|
+
searchFeedback(input: {
|
|
131
|
+
signature?: string;
|
|
132
|
+
decision?: FeedbackDecision;
|
|
133
|
+
query?: string;
|
|
134
|
+
limit?: number;
|
|
135
|
+
}): Promise<FeedbackRecord[]>;
|
|
136
|
+
findFailures(input: FailureHistoryQuery): Promise<FailureRecord[]>;
|
|
137
|
+
getRun(id: string): Promise<RunRecord | null>;
|
|
138
|
+
stats(): Promise<Record<string, number>>;
|
|
139
|
+
close(): Promise<void>;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
interface SQLiteStoreOptions {
|
|
143
|
+
path?: string;
|
|
144
|
+
}
|
|
145
|
+
declare class SQLiteStore {
|
|
146
|
+
private readonly filePath;
|
|
147
|
+
private db?;
|
|
148
|
+
private loaded;
|
|
149
|
+
private readonly inMemory;
|
|
150
|
+
constructor(options?: SQLiteStoreOptions);
|
|
151
|
+
migrate(): Promise<void>;
|
|
152
|
+
saveRun(run: RunRecord): Promise<void>;
|
|
153
|
+
saveFailure(failure: FailureRecord): Promise<void>;
|
|
154
|
+
saveAnalysis(signature: string, analysis: AnalysisResult): Promise<void>;
|
|
155
|
+
getCachedAnalysis(signature: string): Promise<AnalysisResult | null>;
|
|
156
|
+
upsertMemory(record: MemoryRecordInput): Promise<void>;
|
|
157
|
+
searchMemory(input: SearchMemoryInput): Promise<MemoryRecord[]>;
|
|
158
|
+
recordFeedback(input: FeedbackRecordInput): Promise<void>;
|
|
159
|
+
searchFeedback(input: {
|
|
160
|
+
signature?: string;
|
|
161
|
+
decision?: FeedbackDecision;
|
|
162
|
+
query?: string;
|
|
163
|
+
limit?: number;
|
|
164
|
+
}): Promise<FeedbackRecord[]>;
|
|
165
|
+
findFailures(input: FailureHistoryQuery): Promise<FailureRecord[]>;
|
|
166
|
+
getRun(id: string): Promise<RunRecord | null>;
|
|
167
|
+
stats(): Promise<Record<string, number>>;
|
|
168
|
+
close(): Promise<void>;
|
|
169
|
+
private load;
|
|
170
|
+
private importSnapshot;
|
|
171
|
+
private all;
|
|
172
|
+
private persist;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
interface QueryExecutor {
|
|
176
|
+
query(sql: string, params?: unknown[]): Promise<{
|
|
177
|
+
rows: any[];
|
|
178
|
+
rowCount?: number | null;
|
|
179
|
+
}>;
|
|
180
|
+
close?(): Promise<void>;
|
|
181
|
+
}
|
|
182
|
+
declare class PostgresStore extends MemoryStore {
|
|
183
|
+
private readonly executor?;
|
|
184
|
+
constructor(executor?: QueryExecutor | undefined);
|
|
185
|
+
migrate(): Promise<void>;
|
|
186
|
+
saveRun(run: RunRecord): Promise<void>;
|
|
187
|
+
saveFailure(failure: FailureRecord): Promise<void>;
|
|
188
|
+
saveAnalysis(signature: string, analysis: AnalysisResult): Promise<void>;
|
|
189
|
+
getCachedAnalysis(signature: string): Promise<AnalysisResult | null>;
|
|
190
|
+
upsertMemory(record: MemoryRecordInput): Promise<void>;
|
|
191
|
+
searchMemory(input: SearchMemoryInput): Promise<MemoryRecord[]>;
|
|
192
|
+
recordFeedback(record: FeedbackRecordInput): Promise<void>;
|
|
193
|
+
searchFeedback(input: {
|
|
194
|
+
signature?: string;
|
|
195
|
+
decision?: FeedbackDecision;
|
|
196
|
+
query?: string;
|
|
197
|
+
limit?: number;
|
|
198
|
+
}): Promise<FeedbackRecord[]>;
|
|
199
|
+
findFailures(input: FailureHistoryQuery): Promise<FailureRecord[]>;
|
|
200
|
+
close(): Promise<void>;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
interface ImportLegacyRowsInput {
|
|
204
|
+
testResults?: any[];
|
|
205
|
+
analysisCache?: any[];
|
|
206
|
+
artifacts?: any[];
|
|
207
|
+
}
|
|
208
|
+
interface LegacyAnalysisImport {
|
|
209
|
+
signature: string;
|
|
210
|
+
analysis: AnalysisResult;
|
|
211
|
+
}
|
|
212
|
+
interface LegacyImportResult {
|
|
213
|
+
failures: FailureRecord[];
|
|
214
|
+
analyses: LegacyAnalysisImport[];
|
|
215
|
+
}
|
|
216
|
+
declare function importLegacyRows(input: ImportLegacyRowsInput): LegacyImportResult;
|
|
217
|
+
|
|
218
|
+
export { AiProvider, AiProviderRequest, AnalysisResult, AnalysisStore, type BenchmarkFailureInput, type BenchmarkFailureResult, type BenchmarkReport, DeterministicAnalyzer, FailureCategory, FailureGroup, FailureGrouper, FailureHistoryQuery, FailureRecord, FeedbackDecision, FeedbackRecord, FeedbackRecordInput, GeneratedTestDraft, type ImportLegacyRowsInput, type LegacyImportResult, ManualTestCase, MemoryRecord, MemoryRecordInput, MemoryStore, OpenAIResponsesProvider, PatchSuggestion, type PortableReport, PostgresStore, type QueryExecutor, RunRecord, SQLiteStore, SearchMemoryInput, TemplateTestGenerationProvider, TestGenerationProvider, TestGenerationProviderRequest, TestGenerationProviderResult, TestGenerationRequest, TraceSummary, analyzeFailures, assertBrowserGenerationAllowed, benchmarkFailures, classifyFailure, enrichFailureWithArtifacts, evaluatePatchPolicy, generatePatchSuggestions, generatePlaywrightTestDraft, htmlReport, importLegacyRows, isDestructiveManualCase, markdownReport, mcpSummary, normalizePlaywrightJsonReport, parseTraceArtifact, writePortableReport };
|