stringray-ai 1.0.38 → 1.0.39
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/plugin/architectural-integrity.d.ts +21 -0
- package/dist/plugin/architectural-integrity.d.ts.map +1 -0
- package/dist/plugin/architectural-integrity.js +81 -0
- package/dist/plugin/architectural-integrity.js.map +1 -0
- package/dist/plugin/boot-orchestrator.d.ts +100 -0
- package/dist/plugin/boot-orchestrator.d.ts.map +1 -0
- package/dist/plugin/boot-orchestrator.js +606 -0
- package/dist/plugin/boot-orchestrator.js.map +1 -0
- package/dist/plugin/codex-injector.d.ts +72 -0
- package/dist/plugin/codex-injector.d.ts.map +1 -0
- package/dist/plugin/codex-injector.js +387 -0
- package/dist/plugin/codex-injector.js.map +1 -0
- package/dist/plugin/delegation/index.d.ts +16 -0
- package/dist/plugin/delegation/index.d.ts.map +1 -0
- package/dist/plugin/delegation/index.js +13 -0
- package/dist/plugin/delegation/index.js.map +1 -0
- package/dist/plugin/delegation/session-coordinator.d.ts +121 -0
- package/dist/plugin/delegation/session-coordinator.d.ts.map +1 -0
- package/dist/plugin/delegation/session-coordinator.js +346 -0
- package/dist/plugin/delegation/session-coordinator.js.map +1 -0
- package/dist/plugin/index.d.ts +3 -0
- package/dist/plugin/index.d.ts.map +1 -0
- package/dist/plugin/index.js +3 -0
- package/dist/plugin/index.js.map +1 -0
- package/dist/plugin/monitoring/memory-monitor.d.ts +113 -0
- package/dist/plugin/monitoring/memory-monitor.d.ts.map +1 -0
- package/dist/plugin/monitoring/memory-monitor.js +283 -0
- package/dist/plugin/monitoring/memory-monitor.js.map +1 -0
- package/dist/plugin/postprocessor/PostProcessor.d.ts +90 -0
- package/dist/plugin/postprocessor/PostProcessor.d.ts.map +1 -0
- package/dist/plugin/postprocessor/PostProcessor.js +631 -0
- package/dist/plugin/postprocessor/PostProcessor.js.map +1 -0
- package/dist/plugin/postprocessor/analysis/FailureAnalysisEngine.d.ts +40 -0
- package/dist/plugin/postprocessor/analysis/FailureAnalysisEngine.d.ts.map +1 -0
- package/dist/plugin/postprocessor/analysis/FailureAnalysisEngine.js +244 -0
- package/dist/plugin/postprocessor/analysis/FailureAnalysisEngine.js.map +1 -0
- package/dist/plugin/postprocessor/autofix/AutoFixEngine.d.ts +50 -0
- package/dist/plugin/postprocessor/autofix/AutoFixEngine.d.ts.map +1 -0
- package/dist/plugin/postprocessor/autofix/AutoFixEngine.js +246 -0
- package/dist/plugin/postprocessor/autofix/AutoFixEngine.js.map +1 -0
- package/dist/plugin/postprocessor/autofix/FixValidator.d.ts +27 -0
- package/dist/plugin/postprocessor/autofix/FixValidator.d.ts.map +1 -0
- package/dist/plugin/postprocessor/autofix/FixValidator.js +158 -0
- package/dist/plugin/postprocessor/autofix/FixValidator.js.map +1 -0
- package/dist/plugin/postprocessor/config.d.ts +7 -0
- package/dist/plugin/postprocessor/config.d.ts.map +1 -0
- package/dist/plugin/postprocessor/config.js +66 -0
- package/dist/plugin/postprocessor/config.js.map +1 -0
- package/dist/plugin/postprocessor/escalation/EscalationEngine.d.ts +73 -0
- package/dist/plugin/postprocessor/escalation/EscalationEngine.d.ts.map +1 -0
- package/dist/plugin/postprocessor/escalation/EscalationEngine.js +249 -0
- package/dist/plugin/postprocessor/escalation/EscalationEngine.js.map +1 -0
- package/dist/plugin/postprocessor/monitoring/MonitoringEngine.d.ts +19 -0
- package/dist/plugin/postprocessor/monitoring/MonitoringEngine.d.ts.map +1 -0
- package/dist/plugin/postprocessor/monitoring/MonitoringEngine.js +120 -0
- package/dist/plugin/postprocessor/monitoring/MonitoringEngine.js.map +1 -0
- package/dist/plugin/postprocessor/redeploy/RedeployCoordinator.d.ts +92 -0
- package/dist/plugin/postprocessor/redeploy/RedeployCoordinator.d.ts.map +1 -0
- package/dist/plugin/postprocessor/redeploy/RedeployCoordinator.js +319 -0
- package/dist/plugin/postprocessor/redeploy/RedeployCoordinator.js.map +1 -0
- package/dist/plugin/postprocessor/success/SuccessHandler.d.ts +61 -0
- package/dist/plugin/postprocessor/success/SuccessHandler.d.ts.map +1 -0
- package/dist/plugin/postprocessor/success/SuccessHandler.js +148 -0
- package/dist/plugin/postprocessor/success/SuccessHandler.js.map +1 -0
- package/dist/plugin/postprocessor/triggers/APITrigger.d.ts +13 -0
- package/dist/plugin/postprocessor/triggers/APITrigger.d.ts.map +1 -0
- package/dist/plugin/postprocessor/triggers/APITrigger.js +20 -0
- package/dist/plugin/postprocessor/triggers/APITrigger.js.map +1 -0
- package/dist/plugin/postprocessor/triggers/GitHookTrigger.d.ts +17 -0
- package/dist/plugin/postprocessor/triggers/GitHookTrigger.d.ts.map +1 -0
- package/dist/plugin/postprocessor/triggers/GitHookTrigger.js +285 -0
- package/dist/plugin/postprocessor/triggers/GitHookTrigger.js.map +1 -0
- package/dist/plugin/postprocessor/triggers/WebhookTrigger.d.ts +13 -0
- package/dist/plugin/postprocessor/triggers/WebhookTrigger.d.ts.map +1 -0
- package/dist/plugin/postprocessor/triggers/WebhookTrigger.js +21 -0
- package/dist/plugin/postprocessor/triggers/WebhookTrigger.js.map +1 -0
- package/dist/plugin/postprocessor/types.d.ts +198 -0
- package/dist/plugin/postprocessor/types.d.ts.map +1 -0
- package/dist/plugin/postprocessor/types.js +5 -0
- package/dist/plugin/postprocessor/types.js.map +1 -0
- package/dist/plugin/security/security-auditor.d.ts +57 -0
- package/dist/plugin/security/security-auditor.d.ts.map +1 -0
- package/dist/plugin/security/security-auditor.js +583 -0
- package/dist/plugin/security/security-auditor.js.map +1 -0
- package/dist/plugin/security/security-hardener.d.ts +63 -0
- package/dist/plugin/security/security-hardener.d.ts.map +1 -0
- package/dist/plugin/security/security-hardener.js +181 -0
- package/dist/plugin/security/security-hardener.js.map +1 -0
- package/dist/plugin/security/security-headers.d.ts +52 -0
- package/dist/plugin/security/security-headers.d.ts.map +1 -0
- package/dist/plugin/security/security-headers.js +118 -0
- package/dist/plugin/security/security-headers.js.map +1 -0
- package/dist/plugin/session/session-cleanup-manager.d.ts +118 -0
- package/dist/plugin/session/session-cleanup-manager.d.ts.map +1 -0
- package/dist/plugin/session/session-cleanup-manager.js +324 -0
- package/dist/plugin/session/session-cleanup-manager.js.map +1 -0
- package/dist/plugin/session/session-monitor.d.ts +99 -0
- package/dist/plugin/session/session-monitor.d.ts.map +1 -0
- package/dist/plugin/session/session-monitor.js +363 -0
- package/dist/plugin/session/session-monitor.js.map +1 -0
- package/dist/plugin/session/session-state-manager.d.ts +142 -0
- package/dist/plugin/session/session-state-manager.d.ts.map +1 -0
- package/dist/plugin/session/session-state-manager.js +504 -0
- package/dist/plugin/session/session-state-manager.js.map +1 -0
- package/dist/plugin/strray-activation.d.ts +18 -0
- package/dist/plugin/strray-activation.d.ts.map +1 -0
- package/dist/plugin/strray-activation.js +114 -0
- package/dist/plugin/strray-activation.js.map +1 -0
- package/dist/plugin/validation/report-content-validator.d.ts +43 -0
- package/dist/plugin/validation/report-content-validator.d.ts.map +1 -0
- package/dist/plugin/validation/report-content-validator.js +219 -0
- package/dist/plugin/validation/report-content-validator.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"strray-activation.js","sourceRoot":"","sources":["../../src/strray-activation.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAYxE,MAAM,CAAC,MAAM,sBAAsB,GAA8B;IAC/D,kBAAkB,EAAE,IAAI;IACxB,sBAAsB,EAAE,IAAI;IAC5B,qBAAqB,EAAE,IAAI;IAC3B,WAAW,EAAE,IAAI;IACjB,oBAAoB,EAAE,IAAI;IAC1B,gBAAgB,EAAE,IAAI;IACtB,mBAAmB,EAAE,IAAI;CAC1B,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAC9C,SAA6C,EAAE;IAE/C,MAAM,gBAAgB,GAAG,EAAE,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ExD,eAAe,CAAC,GAAG,CACjB,sBAAsB,EACtB,iCAAiC,EACjC,SAAS,CACV,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Report Content Validator
|
|
3
|
+
* Reads and analyzes full report content to detect hidden errors and inconsistencies
|
|
4
|
+
*/
|
|
5
|
+
export declare class ReportContentValidator {
|
|
6
|
+
private reportPatterns;
|
|
7
|
+
/**
|
|
8
|
+
* Validate full report content for hidden errors
|
|
9
|
+
*/
|
|
10
|
+
validateReportContent(reportPath: string, reportType: "session" | "framework" | "validation" | "simulation"): Promise<{
|
|
11
|
+
valid: boolean;
|
|
12
|
+
issues: string[];
|
|
13
|
+
summary: {
|
|
14
|
+
errorCount: number;
|
|
15
|
+
warningCount: number;
|
|
16
|
+
falsePositiveCount: number;
|
|
17
|
+
inconsistencyCount: number;
|
|
18
|
+
riskLevel: "low" | "medium" | "high" | "critical";
|
|
19
|
+
};
|
|
20
|
+
details: {
|
|
21
|
+
criticalErrors: string[];
|
|
22
|
+
warnings: string[];
|
|
23
|
+
falsePositives: string[];
|
|
24
|
+
inconsistencies: string[];
|
|
25
|
+
};
|
|
26
|
+
}>;
|
|
27
|
+
private validateReportTypeSpecific;
|
|
28
|
+
private createValidationResult;
|
|
29
|
+
/**
|
|
30
|
+
* Get validation patterns for debugging
|
|
31
|
+
*/
|
|
32
|
+
getValidationPatterns(): {
|
|
33
|
+
criticalErrors: RegExp[];
|
|
34
|
+
warnings: RegExp[];
|
|
35
|
+
falsePositives: RegExp[];
|
|
36
|
+
inconsistencies: RegExp[];
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Add custom validation pattern
|
|
40
|
+
*/
|
|
41
|
+
addValidationPattern(category: keyof typeof this.reportPatterns, pattern: RegExp): void;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=report-content-validator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"report-content-validator.d.ts","sourceRoot":"","sources":["../../../src/validation/report-content-validator.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,qBAAa,sBAAsB;IACjC,OAAO,CAAC,cAAc,CAsCpB;IAEF;;OAEG;IACG,qBAAqB,CACzB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,SAAS,GAAG,WAAW,GAAG,YAAY,GAAG,YAAY,GAChE,OAAO,CAAC;QACT,KAAK,EAAE,OAAO,CAAC;QACf,MAAM,EAAE,MAAM,EAAE,CAAC;QACjB,OAAO,EAAE;YACP,UAAU,EAAE,MAAM,CAAC;YACnB,YAAY,EAAE,MAAM,CAAC;YACrB,kBAAkB,EAAE,MAAM,CAAC;YAC3B,kBAAkB,EAAE,MAAM,CAAC;YAC3B,SAAS,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;SACnD,CAAC;QACF,OAAO,EAAE;YACP,cAAc,EAAE,MAAM,EAAE,CAAC;YACzB,QAAQ,EAAE,MAAM,EAAE,CAAC;YACnB,cAAc,EAAE,MAAM,EAAE,CAAC;YACzB,eAAe,EAAE,MAAM,EAAE,CAAC;SAC3B,CAAC;KACH,CAAC;YAiIY,0BAA0B;IA2ExC,OAAO,CAAC,sBAAsB;IA+B9B;;OAEG;IACH,qBAAqB;;;;;;IAIrB;;OAEG;IACH,oBAAoB,CAClB,QAAQ,EAAE,MAAM,OAAO,IAAI,CAAC,cAAc,EAC1C,OAAO,EAAE,MAAM;CAIlB"}
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Report Content Validator
|
|
3
|
+
* Reads and analyzes full report content to detect hidden errors and inconsistencies
|
|
4
|
+
*/
|
|
5
|
+
export class ReportContentValidator {
|
|
6
|
+
reportPatterns = {
|
|
7
|
+
// Error patterns that indicate real issues (excluding legitimate contexts)
|
|
8
|
+
criticalErrors: [
|
|
9
|
+
/\bERROR\b(?!\s*(handling|prevention|conditions?|messages?|logs?|recovery))/gi, // ERROR not followed by legitimate terms
|
|
10
|
+
/\bFAILED\b(?!\s*(to|attempts?|tests?|validation))/gi, // FAILED not in expected contexts
|
|
11
|
+
/\bCRASHED\b/gi,
|
|
12
|
+
/\bEXCEPTION\b(?!\s*(handling|thrown))/gi,
|
|
13
|
+
/\bFATAL\b(?!\s*(error|errors))/gi,
|
|
14
|
+
/❌/g,
|
|
15
|
+
/\[ERROR\]/g,
|
|
16
|
+
/\bBROKEN\b/gi,
|
|
17
|
+
/\bUNAVAILABLE\b/gi,
|
|
18
|
+
/\bDISABLED\b/gi,
|
|
19
|
+
],
|
|
20
|
+
// Warning patterns that need attention
|
|
21
|
+
warnings: [
|
|
22
|
+
/\bWARNING\b/gi,
|
|
23
|
+
/\bWARN\b/gi,
|
|
24
|
+
/\bDEPRECATED\b/gi,
|
|
25
|
+
/\bUNSTABLE\b/gi,
|
|
26
|
+
/⚠️/g,
|
|
27
|
+
/\[WARN\]/g,
|
|
28
|
+
],
|
|
29
|
+
// Success claims that might be false
|
|
30
|
+
falsePositives: [
|
|
31
|
+
/\bSUCCESS\b.*\bFAILED\b/gi, // Success mentioned but failed occurred
|
|
32
|
+
/\bPASSED\b.*\bERROR\b/gi, // Passed but errors present
|
|
33
|
+
/\bCOMPLETED\b.*\bCRASHED\b/gi, // Completed but crashed
|
|
34
|
+
],
|
|
35
|
+
// Inconsistency patterns
|
|
36
|
+
inconsistencies: [
|
|
37
|
+
/\b(\d+)\s+total.*\b(\d+)\s+failed/i, // Mismatched counts
|
|
38
|
+
/\b(\d+)\s+passed.*\b(\d+)\s+failed/i, // Success/failure count mismatch
|
|
39
|
+
/health.*score.*(\d+).*issues.*(\d+)/i, // Health score vs issue count mismatch
|
|
40
|
+
],
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Validate full report content for hidden errors
|
|
44
|
+
*/
|
|
45
|
+
async validateReportContent(reportPath, reportType) {
|
|
46
|
+
const issues = [];
|
|
47
|
+
const criticalErrors = [];
|
|
48
|
+
const warnings = [];
|
|
49
|
+
const falsePositives = [];
|
|
50
|
+
const inconsistencies = [];
|
|
51
|
+
try {
|
|
52
|
+
// Read full report content
|
|
53
|
+
const fs = await import("fs");
|
|
54
|
+
if (!fs.existsSync(reportPath)) {
|
|
55
|
+
issues.push(`Report file not found: ${reportPath}`);
|
|
56
|
+
return this.createValidationResult(false, issues, 0, 0, 0, 0, [], [], [], []);
|
|
57
|
+
}
|
|
58
|
+
const content = fs.readFileSync(reportPath, "utf8");
|
|
59
|
+
// Analyze for critical errors
|
|
60
|
+
for (const pattern of this.reportPatterns.criticalErrors) {
|
|
61
|
+
const matches = content.match(pattern);
|
|
62
|
+
if (matches) {
|
|
63
|
+
criticalErrors.push(...matches.map((match) => `Critical error pattern: "${match}"`));
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
// Analyze for warnings
|
|
67
|
+
for (const pattern of this.reportPatterns.warnings) {
|
|
68
|
+
const matches = content.match(pattern);
|
|
69
|
+
if (matches) {
|
|
70
|
+
warnings.push(...matches.map((match) => `Warning pattern: "${match}"`));
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
// Analyze for false positives
|
|
74
|
+
for (const pattern of this.reportPatterns.falsePositives) {
|
|
75
|
+
const matches = content.match(pattern);
|
|
76
|
+
if (matches) {
|
|
77
|
+
falsePositives.push(...matches.map((match) => `False positive detected: "${match}"`));
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
// Analyze for inconsistencies
|
|
81
|
+
for (const pattern of this.reportPatterns.inconsistencies) {
|
|
82
|
+
const matches = content.match(pattern);
|
|
83
|
+
if (matches) {
|
|
84
|
+
// Check if numbers don't add up
|
|
85
|
+
const match = pattern.exec(content);
|
|
86
|
+
if (match && match.length >= 3) {
|
|
87
|
+
const num1 = parseInt(match[1] || "0");
|
|
88
|
+
const num2 = parseInt(match[2] || "0");
|
|
89
|
+
if (num1 > 0 && num2 > 0 && Math.abs(num1 - num2) > num1 * 0.1) {
|
|
90
|
+
inconsistencies.push(`Number inconsistency: ${match[0]}`);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
// Additional report-type specific validations
|
|
96
|
+
const typeSpecificIssues = await this.validateReportTypeSpecific(content, reportType);
|
|
97
|
+
issues.push(...typeSpecificIssues);
|
|
98
|
+
// Calculate risk level
|
|
99
|
+
const totalIssues = criticalErrors.length +
|
|
100
|
+
warnings.length +
|
|
101
|
+
falsePositives.length +
|
|
102
|
+
inconsistencies.length;
|
|
103
|
+
let riskLevel = "low";
|
|
104
|
+
if (criticalErrors.length > 0)
|
|
105
|
+
riskLevel = "critical";
|
|
106
|
+
else if (falsePositives.length > 0 || inconsistencies.length > 2)
|
|
107
|
+
riskLevel = "high";
|
|
108
|
+
else if (warnings.length > 5 || inconsistencies.length > 0)
|
|
109
|
+
riskLevel = "medium";
|
|
110
|
+
return {
|
|
111
|
+
valid: criticalErrors.length === 0 && falsePositives.length === 0,
|
|
112
|
+
issues,
|
|
113
|
+
summary: {
|
|
114
|
+
errorCount: criticalErrors.length,
|
|
115
|
+
warningCount: warnings.length,
|
|
116
|
+
falsePositiveCount: falsePositives.length,
|
|
117
|
+
inconsistencyCount: inconsistencies.length,
|
|
118
|
+
riskLevel,
|
|
119
|
+
},
|
|
120
|
+
details: {
|
|
121
|
+
criticalErrors,
|
|
122
|
+
warnings,
|
|
123
|
+
falsePositives,
|
|
124
|
+
inconsistencies,
|
|
125
|
+
},
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
catch (error) {
|
|
129
|
+
issues.push(`Failed to validate report content: ${error}`);
|
|
130
|
+
return this.createValidationResult(false, issues, 0, 0, 0, 0, [], [], [], []);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
async validateReportTypeSpecific(content, reportType) {
|
|
134
|
+
const issues = [];
|
|
135
|
+
switch (reportType) {
|
|
136
|
+
case "session":
|
|
137
|
+
// Check for session-specific issues
|
|
138
|
+
const hasSessionContent = content.includes("session") ||
|
|
139
|
+
content.includes("Session") ||
|
|
140
|
+
content.includes("coordinator") ||
|
|
141
|
+
content.includes("agent") ||
|
|
142
|
+
content.includes("delegation") ||
|
|
143
|
+
content.includes("migration");
|
|
144
|
+
if (!hasSessionContent) {
|
|
145
|
+
issues.push("Session report missing session-related content");
|
|
146
|
+
}
|
|
147
|
+
// Check for session management terminology
|
|
148
|
+
const sessionTerms = [
|
|
149
|
+
"coordinator",
|
|
150
|
+
"agent",
|
|
151
|
+
"delegation",
|
|
152
|
+
"migration",
|
|
153
|
+
"persistence",
|
|
154
|
+
];
|
|
155
|
+
const missingTerms = sessionTerms.filter((term) => content.includes(term) && !content.includes(term + " "));
|
|
156
|
+
if (missingTerms.length > 0) {
|
|
157
|
+
issues.push(`Session report mentions sessions but lacks key terminology: ${missingTerms.join(", ")}`);
|
|
158
|
+
}
|
|
159
|
+
break;
|
|
160
|
+
case "framework":
|
|
161
|
+
// Check for framework health indicators
|
|
162
|
+
if (!content.includes("health") && !content.includes("Health")) {
|
|
163
|
+
issues.push("Framework report missing health assessment");
|
|
164
|
+
}
|
|
165
|
+
if (content.includes("error") && !content.includes("resolution")) {
|
|
166
|
+
issues.push("Framework report mentions errors but no resolution steps");
|
|
167
|
+
}
|
|
168
|
+
break;
|
|
169
|
+
case "validation":
|
|
170
|
+
// Check for validation completeness
|
|
171
|
+
if (!content.includes("validator") && !content.includes("validation")) {
|
|
172
|
+
issues.push("Validation report missing validation terminology");
|
|
173
|
+
}
|
|
174
|
+
break;
|
|
175
|
+
case "simulation":
|
|
176
|
+
// Check for simulation metrics
|
|
177
|
+
if (!content.includes("simulation") && !content.includes("scenario")) {
|
|
178
|
+
issues.push("Simulation report missing simulation context");
|
|
179
|
+
}
|
|
180
|
+
if (content.includes("success") && !content.includes("metrics")) {
|
|
181
|
+
issues.push("Simulation report claims success but lacks performance metrics");
|
|
182
|
+
}
|
|
183
|
+
break;
|
|
184
|
+
}
|
|
185
|
+
return issues;
|
|
186
|
+
}
|
|
187
|
+
createValidationResult(valid, issues, errorCount, warningCount, falsePositiveCount, inconsistencyCount, criticalErrors, warnings, falsePositives, inconsistencies) {
|
|
188
|
+
return {
|
|
189
|
+
valid,
|
|
190
|
+
issues,
|
|
191
|
+
summary: {
|
|
192
|
+
errorCount,
|
|
193
|
+
warningCount,
|
|
194
|
+
falsePositiveCount,
|
|
195
|
+
inconsistencyCount,
|
|
196
|
+
riskLevel: "critical",
|
|
197
|
+
},
|
|
198
|
+
details: {
|
|
199
|
+
criticalErrors,
|
|
200
|
+
warnings,
|
|
201
|
+
falsePositives,
|
|
202
|
+
inconsistencies,
|
|
203
|
+
},
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Get validation patterns for debugging
|
|
208
|
+
*/
|
|
209
|
+
getValidationPatterns() {
|
|
210
|
+
return { ...this.reportPatterns };
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* Add custom validation pattern
|
|
214
|
+
*/
|
|
215
|
+
addValidationPattern(category, pattern) {
|
|
216
|
+
this.reportPatterns[category].push(pattern);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
//# sourceMappingURL=report-content-validator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"report-content-validator.js","sourceRoot":"","sources":["../../../src/validation/report-content-validator.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,OAAO,sBAAsB;IACzB,cAAc,GAAG;QACvB,2EAA2E;QAC3E,cAAc,EAAE;YACd,8EAA8E,EAAE,yCAAyC;YACzH,qDAAqD,EAAE,kCAAkC;YACzF,eAAe;YACf,yCAAyC;YACzC,kCAAkC;YAClC,IAAI;YACJ,YAAY;YACZ,cAAc;YACd,mBAAmB;YACnB,gBAAgB;SACjB;QAED,uCAAuC;QACvC,QAAQ,EAAE;YACR,eAAe;YACf,YAAY;YACZ,kBAAkB;YAClB,gBAAgB;YAChB,KAAK;YACL,WAAW;SACZ;QAED,qCAAq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C;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAEO,sBAAsB,CAC5B,KAAc,EACd,MAAgB,EAChB,UAAkB,EAClB,YAAoB,EACpB,kBAA0B,EAC1B,kBAA0B,EAC1B,cAAwB,EACxB,QAAkB,EAClB,cAAwB,EACxB,eAAyB;QAEzB,OAAO;YACL,KAAK;YACL,MAAM;YACN,OAAO,EAAE;gBACP,UAAU;gBACV,YAAY;gBACZ,kBAAkB;gBAClB,kBAAkB;gBAClB,SAAS,EAAE,UAAmB;aAC/B;YACD,OAAO,EAAE;gBACP,cAAc;gBACd,QAAQ;gBACR,cAAc;gBACd,eAAe;aAChB;SACF,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,qBAAqB;QACnB,OAAO,EAAE,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;IACpC,CAAC;IAED;;OAEG;IACH,oBAAoB,CAClB,QAA0C,EAC1C,OAAe;QAEf,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC9C,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stringray-ai",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.39",
|
|
4
4
|
"description": "⚡ StringRay ⚡: Bulletproof AI orchestration with systematic error prevention. Zero dead ends. Ship clean, tested, optimized code — every time.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/plugin/index.js",
|