@paths.design/caws-cli 7.0.1 → 7.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/budget-derivation.js +5 -4
- package/dist/commands/diagnose.js +26 -20
- package/dist/commands/init.js +72 -5
- package/dist/commands/specs.js +40 -1
- package/dist/commands/status.js +2 -2
- package/dist/commands/templates.js +10 -0
- package/dist/commands/tool.js +2 -3
- package/dist/commands/validate.js +12 -0
- package/dist/config/index.js +17 -8
- package/dist/generators/working-spec.js +42 -9
- package/dist/index.js +3 -1
- package/dist/scaffold/cursor-hooks.js +10 -2
- package/dist/scaffold/git-hooks.js +189 -32
- package/dist/scaffold/index.js +105 -17
- package/dist/templates/.caws/tools/README.md +20 -0
- package/dist/templates/.cursor/README.md +311 -0
- package/dist/templates/.cursor/hooks/audit.sh +55 -0
- package/dist/templates/.cursor/hooks/block-dangerous.sh +83 -0
- package/dist/templates/.cursor/hooks/caws-quality-check.sh +52 -0
- package/dist/templates/.cursor/hooks/caws-scope-guard.sh +130 -0
- package/dist/templates/.cursor/hooks/caws-tool-validation.sh +121 -0
- package/dist/templates/.cursor/hooks/format.sh +38 -0
- package/dist/templates/.cursor/hooks/naming-check.sh +64 -0
- package/dist/templates/.cursor/hooks/scan-secrets.sh +46 -0
- package/dist/templates/.cursor/hooks/scope-guard.sh +52 -0
- package/dist/templates/.cursor/hooks/validate-spec.sh +83 -0
- package/dist/templates/.cursor/hooks.json +59 -0
- package/dist/templates/.cursor/rules/00-claims-verification.mdc +144 -0
- package/dist/templates/.cursor/rules/01-working-style.mdc +50 -0
- package/dist/templates/.cursor/rules/02-quality-gates.mdc +370 -0
- package/dist/templates/.cursor/rules/03-naming-and-refactor.mdc +33 -0
- package/dist/templates/.cursor/rules/04-logging-language-style.mdc +23 -0
- package/dist/templates/.cursor/rules/05-safe-defaults-guards.mdc +23 -0
- package/dist/templates/.cursor/rules/06-typescript-conventions.mdc +36 -0
- package/dist/templates/.cursor/rules/07-process-ops.mdc +20 -0
- package/dist/templates/.cursor/rules/08-solid-and-architecture.mdc +16 -0
- package/dist/templates/.cursor/rules/09-docstrings.mdc +89 -0
- package/dist/templates/.cursor/rules/10-documentation-quality-standards.mdc +390 -0
- package/dist/templates/.cursor/rules/11-scope-management-waivers.mdc +385 -0
- package/dist/templates/.cursor/rules/12-implementation-completeness.mdc +516 -0
- package/dist/templates/.cursor/rules/13-language-agnostic-standards.mdc +588 -0
- package/dist/templates/.cursor/rules/README.md +148 -0
- package/dist/templates/.github/copilot/instructions.md +311 -0
- package/dist/templates/.idea/runConfigurations/CAWS_Evaluate.xml +5 -0
- package/dist/templates/.idea/runConfigurations/CAWS_Validate.xml +5 -0
- package/dist/templates/.vscode/launch.json +56 -0
- package/dist/templates/.vscode/settings.json +93 -0
- package/dist/templates/.windsurf/workflows/caws-guided-development.md +92 -0
- package/dist/templates/COMMIT_CONVENTIONS.md +86 -0
- package/dist/templates/OIDC_SETUP.md +300 -0
- package/dist/templates/agents.md +1047 -0
- package/dist/templates/codemod/README.md +1 -0
- package/dist/templates/codemod/test.js +93 -0
- package/dist/templates/docs/README.md +150 -0
- package/dist/templates/scripts/quality-gates/check-god-objects.js +146 -0
- package/dist/templates/scripts/quality-gates/run-quality-gates.js +50 -0
- package/dist/templates/scripts/v3/analysis/todo_analyzer.py +1997 -0
- package/dist/tool-loader.js +6 -1
- package/dist/tool-validator.js +8 -2
- package/dist/utils/detection.js +34 -6
- package/dist/utils/git-lock.js +118 -0
- package/dist/utils/gitignore-updater.js +148 -0
- package/dist/utils/quality-gates.js +47 -7
- package/dist/utils/spec-resolver.js +23 -3
- package/dist/utils/yaml-validation.js +155 -0
- package/dist/validation/spec-validation.js +105 -2
- package/package.json +2 -2
- package/templates/.caws/schemas/waivers.schema.json +30 -0
- package/templates/.caws/schemas/working-spec.schema.json +133 -0
- package/templates/.caws/templates/working-spec.template.yml +74 -0
- package/templates/.caws/tools/README.md +20 -0
- package/templates/.caws/tools/scope-guard.js +208 -0
- package/templates/.caws/tools-allow.json +331 -0
- package/templates/.caws/waivers.yml +19 -0
- package/templates/.cursor/hooks/scope-guard.sh +2 -2
- package/templates/.cursor/hooks/validate-spec.sh +42 -7
- package/templates/apps/tools/caws/COMPLETION_REPORT.md +0 -331
- package/templates/apps/tools/caws/MIGRATION_SUMMARY.md +0 -360
- package/templates/apps/tools/caws/README.md +0 -463
- package/templates/apps/tools/caws/TEST_STATUS.md +0 -365
- package/templates/apps/tools/caws/attest.js +0 -357
- package/templates/apps/tools/caws/ci-optimizer.js +0 -642
- package/templates/apps/tools/caws/config.ts +0 -245
- package/templates/apps/tools/caws/cross-functional.js +0 -876
- package/templates/apps/tools/caws/dashboard.js +0 -1112
- package/templates/apps/tools/caws/flake-detector.ts +0 -362
- package/templates/apps/tools/caws/gates.js +0 -198
- package/templates/apps/tools/caws/gates.ts +0 -271
- package/templates/apps/tools/caws/language-adapters.ts +0 -381
- package/templates/apps/tools/caws/language-support.d.ts +0 -367
- package/templates/apps/tools/caws/language-support.d.ts.map +0 -1
- package/templates/apps/tools/caws/language-support.js +0 -585
- package/templates/apps/tools/caws/legacy-assessment.ts +0 -408
- package/templates/apps/tools/caws/legacy-assessor.js +0 -764
- package/templates/apps/tools/caws/mutant-analyzer.js +0 -734
- package/templates/apps/tools/caws/perf-budgets.ts +0 -349
- package/templates/apps/tools/caws/prompt-lint.js.backup +0 -274
- package/templates/apps/tools/caws/property-testing.js +0 -707
- package/templates/apps/tools/caws/provenance.d.ts +0 -14
- package/templates/apps/tools/caws/provenance.d.ts.map +0 -1
- package/templates/apps/tools/caws/provenance.js +0 -132
- package/templates/apps/tools/caws/provenance.js.backup +0 -73
- package/templates/apps/tools/caws/provenance.ts +0 -211
- package/templates/apps/tools/caws/security-provenance.ts +0 -483
- package/templates/apps/tools/caws/shared/base-tool.ts +0 -281
- package/templates/apps/tools/caws/shared/config-manager.ts +0 -366
- package/templates/apps/tools/caws/shared/gate-checker.ts +0 -849
- package/templates/apps/tools/caws/shared/types.ts +0 -444
- package/templates/apps/tools/caws/shared/validator.ts +0 -305
- package/templates/apps/tools/caws/shared/waivers-manager.ts +0 -174
- package/templates/apps/tools/caws/spec-test-mapper.ts +0 -391
- package/templates/apps/tools/caws/test-quality.js +0 -578
- package/templates/apps/tools/caws/validate.js +0 -76
- package/templates/apps/tools/caws/validate.ts +0 -228
- package/templates/apps/tools/caws/waivers.js +0 -344
- /package/{templates/apps/tools/caws → dist/templates/.caws}/schemas/waivers.schema.json +0 -0
- /package/{templates/apps/tools/caws → dist/templates/.caws}/schemas/working-spec.schema.json +0 -0
- /package/{templates/apps/tools/caws → dist/templates/.caws}/templates/working-spec.template.yml +0 -0
- /package/{templates/apps/tools/caws → dist/templates/.caws/tools}/scope-guard.js +0 -0
- /package/{templates/apps/tools/caws → dist/templates/.caws}/tools-allow.json +0 -0
- /package/{templates/apps/tools/caws → dist/templates/.caws}/waivers.yml +0 -0
|
@@ -1,444 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CAWS Shared Types and Interfaces
|
|
3
|
-
*
|
|
4
|
-
* Consolidated type definitions used across all CAWS tools
|
|
5
|
-
*
|
|
6
|
-
* @author @darianrosebrook
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
// =============================================================================
|
|
10
|
-
// CORE INTERFACES
|
|
11
|
-
// =============================================================================
|
|
12
|
-
|
|
13
|
-
export interface ValidationDetailsSchema {
|
|
14
|
-
type: 'object';
|
|
15
|
-
properties: {
|
|
16
|
-
passed: { type: 'boolean' };
|
|
17
|
-
score: { type: 'number' };
|
|
18
|
-
details: { type: 'object' };
|
|
19
|
-
};
|
|
20
|
-
required: ['passed', 'score', 'details'];
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export interface ValidationResult {
|
|
24
|
-
passed: boolean;
|
|
25
|
-
score: number;
|
|
26
|
-
details: any;
|
|
27
|
-
errors?: string[];
|
|
28
|
-
warnings?: string[];
|
|
29
|
-
recommendations?: string[];
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export interface GateResult extends ValidationResult {
|
|
33
|
-
tier?: number | string;
|
|
34
|
-
tierPolicy?: TierPolicy;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export interface AccessibilityResult {
|
|
38
|
-
passed: boolean;
|
|
39
|
-
score: number;
|
|
40
|
-
details: any;
|
|
41
|
-
violations: Array<{
|
|
42
|
-
rule: string;
|
|
43
|
-
severity: 'error' | 'warning' | 'info';
|
|
44
|
-
message: string;
|
|
45
|
-
location?: string;
|
|
46
|
-
}>;
|
|
47
|
-
recommendations: string[];
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export interface PerformanceResult {
|
|
51
|
-
endpoint: string;
|
|
52
|
-
p95_ms: number;
|
|
53
|
-
budget_ms: number;
|
|
54
|
-
passed: boolean;
|
|
55
|
-
deviation_percent: number;
|
|
56
|
-
score: number;
|
|
57
|
-
details: any;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export interface ContractDetails {
|
|
61
|
-
endpoint: string;
|
|
62
|
-
method: string;
|
|
63
|
-
status: 'valid' | 'invalid' | 'warning';
|
|
64
|
-
schema?: Record<string, any>;
|
|
65
|
-
examples?: Array<{
|
|
66
|
-
request?: Record<string, any>;
|
|
67
|
-
response?: Record<string, any>;
|
|
68
|
-
}>;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export interface NonFunctionalRequirements {
|
|
72
|
-
performance?: {
|
|
73
|
-
maxResponseTime?: number;
|
|
74
|
-
throughput?: number;
|
|
75
|
-
};
|
|
76
|
-
security?: {
|
|
77
|
-
authentication?: boolean;
|
|
78
|
-
authorization?: boolean;
|
|
79
|
-
encryption?: boolean;
|
|
80
|
-
};
|
|
81
|
-
reliability?: {
|
|
82
|
-
availability?: number;
|
|
83
|
-
errorRate?: number;
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
export interface ContractValidationResult {
|
|
88
|
-
passed: boolean;
|
|
89
|
-
score: number;
|
|
90
|
-
details: Record<string, any>;
|
|
91
|
-
risk_tier?: number;
|
|
92
|
-
acceptance?: string[];
|
|
93
|
-
contracts?: ContractDetails[];
|
|
94
|
-
non_functional?: NonFunctionalRequirements;
|
|
95
|
-
errors: Array<{
|
|
96
|
-
type: 'request' | 'response' | 'schema';
|
|
97
|
-
endpoint: string;
|
|
98
|
-
message: string;
|
|
99
|
-
details?: any;
|
|
100
|
-
}>;
|
|
101
|
-
coverage: {
|
|
102
|
-
endpointsTested: number;
|
|
103
|
-
totalEndpoints: number;
|
|
104
|
-
schemasValidated: number;
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
export interface TrustScoreComponents {
|
|
109
|
-
coverage_branch: number;
|
|
110
|
-
mutation_score: number;
|
|
111
|
-
contracts_consumer: boolean;
|
|
112
|
-
contracts_provider: boolean;
|
|
113
|
-
a11y_passed: boolean;
|
|
114
|
-
perf_within_budget: boolean;
|
|
115
|
-
flake_rate: number;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
export interface TrustScoreResult {
|
|
119
|
-
total_score: number;
|
|
120
|
-
tier: string;
|
|
121
|
-
components: TrustScoreComponents;
|
|
122
|
-
breakdown: {
|
|
123
|
-
coverage: number;
|
|
124
|
-
mutation: number;
|
|
125
|
-
contracts: number;
|
|
126
|
-
a11y: number;
|
|
127
|
-
perf: number;
|
|
128
|
-
flake: number;
|
|
129
|
-
};
|
|
130
|
-
recommendations: string[];
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
// =============================================================================
|
|
134
|
-
// FEATURE FLAG TYPES
|
|
135
|
-
// =============================================================================
|
|
136
|
-
|
|
137
|
-
export interface FeatureFlag {
|
|
138
|
-
name: string;
|
|
139
|
-
description: string;
|
|
140
|
-
enabled: boolean;
|
|
141
|
-
rolloutPercentage: number;
|
|
142
|
-
environment: string[];
|
|
143
|
-
userGroups: string[];
|
|
144
|
-
dependencies: string[];
|
|
145
|
-
createdAt: string;
|
|
146
|
-
updatedAt: string;
|
|
147
|
-
killSwitch?: boolean;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
export interface FeatureFlagUpdate {
|
|
151
|
-
name: string;
|
|
152
|
-
enabled?: boolean;
|
|
153
|
-
rolloutPercentage?: number;
|
|
154
|
-
environment?: string[];
|
|
155
|
-
userGroups?: string[];
|
|
156
|
-
killSwitch?: boolean;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
export interface FeatureFlagEvaluation {
|
|
160
|
-
enabled: boolean;
|
|
161
|
-
flag: FeatureFlag;
|
|
162
|
-
reason: string;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
export interface FeatureContext {
|
|
166
|
-
environment: string;
|
|
167
|
-
userId?: string;
|
|
168
|
-
userGroups?: string[];
|
|
169
|
-
requestId?: string;
|
|
170
|
-
metadata?: any;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
// =============================================================================
|
|
174
|
-
// CONFIGURATION TYPES
|
|
175
|
-
// =============================================================================
|
|
176
|
-
|
|
177
|
-
export interface PerformanceBudget {
|
|
178
|
-
api_p95_ms: number;
|
|
179
|
-
ingestion_rate?: number;
|
|
180
|
-
ocr_processing_ms?: number;
|
|
181
|
-
speech_processing_per_second?: number;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
export interface TierPolicy {
|
|
185
|
-
min_branch: number;
|
|
186
|
-
min_coverage: number;
|
|
187
|
-
min_mutation: number;
|
|
188
|
-
requires_contracts: boolean;
|
|
189
|
-
requires_manual_review?: boolean;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
// =============================================================================
|
|
193
|
-
// WAIVER AND OVERRIDE TYPES
|
|
194
|
-
// =============================================================================
|
|
195
|
-
|
|
196
|
-
export interface WaiverConfig {
|
|
197
|
-
gate: string;
|
|
198
|
-
reason: string;
|
|
199
|
-
owner: string;
|
|
200
|
-
expiry: string;
|
|
201
|
-
compensating_control?: string;
|
|
202
|
-
ticket_url?: string;
|
|
203
|
-
approved_by?: string;
|
|
204
|
-
created_at: string;
|
|
205
|
-
status: 'active' | 'expired' | 'revoked';
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
export interface HumanOverride {
|
|
209
|
-
approved_by: string;
|
|
210
|
-
reason: string;
|
|
211
|
-
waived_requirements: string[];
|
|
212
|
-
expiry_date?: string;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
export interface AIAssessment {
|
|
216
|
-
confidence_level: number;
|
|
217
|
-
uncertainty_areas: string[];
|
|
218
|
-
recommended_pairing?: boolean;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
export interface ExperimentConfig {
|
|
222
|
-
enabled: boolean;
|
|
223
|
-
timeboxed_hours?: number;
|
|
224
|
-
success_criteria?: string[];
|
|
225
|
-
expiry_date?: string;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
// =============================================================================
|
|
229
|
-
// CAWS GATE TYPES
|
|
230
|
-
// =============================================================================
|
|
231
|
-
|
|
232
|
-
export interface CoverageData {
|
|
233
|
-
branches: { pct: number };
|
|
234
|
-
functions: { pct: number };
|
|
235
|
-
lines: { pct: number };
|
|
236
|
-
statements: { pct: number };
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
export interface MutationData {
|
|
240
|
-
metrics: {
|
|
241
|
-
killed?: number;
|
|
242
|
-
survived?: number;
|
|
243
|
-
totalDetected?: number;
|
|
244
|
-
};
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
export interface ContractTestResults {
|
|
248
|
-
numPassed: number;
|
|
249
|
-
numTotal: number;
|
|
250
|
-
consumer?: boolean;
|
|
251
|
-
provider?: boolean;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
export interface TierPolicyConfig {
|
|
255
|
-
[tier: number]: TierPolicy;
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
export interface GateCheckOptions {
|
|
259
|
-
tier: number;
|
|
260
|
-
workingDirectory?: string;
|
|
261
|
-
verbose?: boolean;
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
export interface GateConfig {
|
|
265
|
-
enabled: boolean;
|
|
266
|
-
threshold?: number;
|
|
267
|
-
timeout?: number;
|
|
268
|
-
retries?: number;
|
|
269
|
-
options?: Record<string, any>;
|
|
270
|
-
thresholds?: Record<string, number>;
|
|
271
|
-
required?: boolean;
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
export interface ToolConfig {
|
|
275
|
-
name?: string;
|
|
276
|
-
version?: string;
|
|
277
|
-
enabled?: boolean;
|
|
278
|
-
config?: Record<string, any>;
|
|
279
|
-
dependencies?: string[];
|
|
280
|
-
command?: string;
|
|
281
|
-
args?: string[];
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
export interface LoggingConfig {
|
|
285
|
-
level: 'debug' | 'info' | 'warn' | 'error';
|
|
286
|
-
format?: 'json' | 'text';
|
|
287
|
-
output?: 'console' | 'file' | 'both';
|
|
288
|
-
filePath?: string;
|
|
289
|
-
file?: string;
|
|
290
|
-
maxSize?: number;
|
|
291
|
-
maxFiles?: number;
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
export interface FeatureConfig {
|
|
295
|
-
name?: string;
|
|
296
|
-
enabled: boolean;
|
|
297
|
-
config?: Record<string, any>;
|
|
298
|
-
dependencies?: string[];
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
export interface CawsConfig {
|
|
302
|
-
version?: string;
|
|
303
|
-
environment?: string;
|
|
304
|
-
tiers: TierPolicyConfig;
|
|
305
|
-
defaultTier: string;
|
|
306
|
-
workingSpecPath: string;
|
|
307
|
-
provenancePath: string;
|
|
308
|
-
cawsDirectory: string;
|
|
309
|
-
waiversPath?: string;
|
|
310
|
-
paths?: Record<string, string>;
|
|
311
|
-
gates?: Record<string, GateConfig>;
|
|
312
|
-
tools?: Record<string, ToolConfig>;
|
|
313
|
-
logging?: LoggingConfig;
|
|
314
|
-
features?: Record<string, FeatureConfig | boolean>;
|
|
315
|
-
waivers?: Record<string, WaiverConfig>;
|
|
316
|
-
experiment_defaults?: ExperimentConfig;
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
// =============================================================================
|
|
320
|
-
// MIGRATION TYPES
|
|
321
|
-
// =============================================================================
|
|
322
|
-
|
|
323
|
-
export interface MigrationStep {
|
|
324
|
-
id: string;
|
|
325
|
-
description: string;
|
|
326
|
-
sql: string;
|
|
327
|
-
rollback_sql?: string;
|
|
328
|
-
dependencies?: string[];
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
// =============================================================================
|
|
332
|
-
// TEST TYPES
|
|
333
|
-
// =============================================================================
|
|
334
|
-
|
|
335
|
-
export interface TestResult {
|
|
336
|
-
title: string;
|
|
337
|
-
fullName: string;
|
|
338
|
-
status: 'passed' | 'failed' | 'pending' | 'skipped';
|
|
339
|
-
duration: number;
|
|
340
|
-
failureMessages: string[];
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
export interface TestSuiteResult {
|
|
344
|
-
name: string;
|
|
345
|
-
status: 'passed' | 'failed';
|
|
346
|
-
testResults: TestResult[];
|
|
347
|
-
startTime: number;
|
|
348
|
-
endTime: number;
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
export interface FlakeDetectionResult {
|
|
352
|
-
flakyTests: string[];
|
|
353
|
-
varianceScore: number;
|
|
354
|
-
totalRuns: number;
|
|
355
|
-
recommendations: string[];
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
export interface HistoricalTestData {
|
|
359
|
-
runs: TestRun[];
|
|
360
|
-
quarantined: Set<string>;
|
|
361
|
-
lastUpdated: string;
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
export interface TestRun {
|
|
365
|
-
timestamp: number;
|
|
366
|
-
results: Map<string, TestResult>;
|
|
367
|
-
variance: number;
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
// =============================================================================
|
|
371
|
-
// PROVENANCE TYPES
|
|
372
|
-
// =============================================================================
|
|
373
|
-
|
|
374
|
-
export interface PerformanceMetrics {
|
|
375
|
-
p95_ms?: number;
|
|
376
|
-
p99_ms?: number;
|
|
377
|
-
average_ms?: number;
|
|
378
|
-
throughput?: number;
|
|
379
|
-
error_rate?: number;
|
|
380
|
-
budget_ms?: number;
|
|
381
|
-
deviation_percent?: number;
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
export interface ProvenanceMetadata {
|
|
385
|
-
environment?: string;
|
|
386
|
-
branch?: string;
|
|
387
|
-
pullRequest?: number;
|
|
388
|
-
buildId?: string;
|
|
389
|
-
deploymentId?: string;
|
|
390
|
-
tags?: string[];
|
|
391
|
-
custom?: Record<string, any>;
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
export interface ProvenanceData {
|
|
395
|
-
agent: string;
|
|
396
|
-
model: string;
|
|
397
|
-
commit: string;
|
|
398
|
-
artifacts: string[];
|
|
399
|
-
results: {
|
|
400
|
-
coverage_branch: number;
|
|
401
|
-
mutation_score: number;
|
|
402
|
-
tests_passed: number;
|
|
403
|
-
a11y?: string;
|
|
404
|
-
perf?: PerformanceMetrics;
|
|
405
|
-
contracts?: {
|
|
406
|
-
consumer: boolean;
|
|
407
|
-
provider: boolean;
|
|
408
|
-
};
|
|
409
|
-
flake_rate?: number;
|
|
410
|
-
};
|
|
411
|
-
approvals: Array<{
|
|
412
|
-
approver: string;
|
|
413
|
-
timestamp: string;
|
|
414
|
-
type: string;
|
|
415
|
-
}>;
|
|
416
|
-
generatedAt: string;
|
|
417
|
-
metadata?: ProvenanceMetadata;
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
// =============================================================================
|
|
421
|
-
// MULTI-MODAL TYPES
|
|
422
|
-
// =============================================================================
|
|
423
|
-
|
|
424
|
-
export interface MultiModalIngestionConfig {
|
|
425
|
-
batchSize?: number;
|
|
426
|
-
rateLimitMs?: number;
|
|
427
|
-
skipExisting?: boolean;
|
|
428
|
-
includePatterns?: string[];
|
|
429
|
-
excludePatterns?: string[];
|
|
430
|
-
enableOCR?: boolean;
|
|
431
|
-
enableSpeechToText?: boolean;
|
|
432
|
-
maxFileSize?: number;
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
export interface MultiModalIngestionResult {
|
|
436
|
-
totalFiles: number;
|
|
437
|
-
processedFiles: number;
|
|
438
|
-
skippedFiles: number;
|
|
439
|
-
failedFiles: number;
|
|
440
|
-
totalChunks: number;
|
|
441
|
-
processedChunks: number;
|
|
442
|
-
errors: string[];
|
|
443
|
-
contentTypeStats: Record<string, number>;
|
|
444
|
-
}
|