erosolar-cli 2.1.203 → 2.1.204
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/core/agentOrchestrator.d.ts +16 -4
- package/dist/core/agentOrchestrator.d.ts.map +1 -1
- package/dist/core/agentOrchestrator.js +181 -61
- package/dist/core/agentOrchestrator.js.map +1 -1
- package/dist/core/errors/errorTypes.d.ts +0 -6
- package/dist/core/errors/errorTypes.d.ts.map +1 -1
- package/dist/core/errors/errorTypes.js +0 -26
- package/dist/core/errors/errorTypes.js.map +1 -1
- package/dist/shell/interactiveShell.d.ts +0 -1
- package/dist/shell/interactiveShell.d.ts.map +1 -1
- package/dist/shell/interactiveShell.js +43 -50
- package/dist/shell/interactiveShell.js.map +1 -1
- package/package.json +1 -1
- package/dist/core/LazyLoader.d.ts +0 -129
- package/dist/core/LazyLoader.d.ts.map +0 -1
- package/dist/core/LazyLoader.js +0 -240
- package/dist/core/LazyLoader.js.map +0 -1
- package/dist/core/alphaZeroOrchestrator.d.ts +0 -140
- package/dist/core/alphaZeroOrchestrator.d.ts.map +0 -1
- package/dist/core/alphaZeroOrchestrator.js +0 -418
- package/dist/core/alphaZeroOrchestrator.js.map +0 -1
- package/dist/core/checkpoint.d.ts +0 -76
- package/dist/core/checkpoint.d.ts.map +0 -1
- package/dist/core/checkpoint.js +0 -278
- package/dist/core/checkpoint.js.map +0 -1
- package/dist/core/costTracker.d.ts +0 -87
- package/dist/core/costTracker.d.ts.map +0 -1
- package/dist/core/costTracker.js +0 -285
- package/dist/core/costTracker.js.map +0 -1
- package/dist/core/isolatedVerifier.d.ts +0 -40
- package/dist/core/isolatedVerifier.d.ts.map +0 -1
- package/dist/core/isolatedVerifier.js +0 -129
- package/dist/core/isolatedVerifier.js.map +0 -1
- package/dist/core/responseVerifier.d.ts +0 -98
- package/dist/core/responseVerifier.d.ts.map +0 -1
- package/dist/core/responseVerifier.js +0 -509
- package/dist/core/responseVerifier.js.map +0 -1
- package/dist/core/securityAssessment.d.ts +0 -91
- package/dist/core/securityAssessment.d.ts.map +0 -1
- package/dist/core/securityAssessment.js +0 -580
- package/dist/core/securityAssessment.js.map +0 -1
- package/dist/core/verification.d.ts +0 -137
- package/dist/core/verification.d.ts.map +0 -1
- package/dist/core/verification.js +0 -323
- package/dist/core/verification.js.map +0 -1
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Multi-Agent Verification System
|
|
3
|
-
*
|
|
4
|
-
* Reduces AI "hallucinations" (incomplete/incorrect task completion) through:
|
|
5
|
-
* 1. Generator + Verifier pattern - one agent works, another checks
|
|
6
|
-
* 2. Self-verification loops - agent proves its own work
|
|
7
|
-
* 3. Consensus mode - multiple passes for verification
|
|
8
|
-
* 4. Red Team / Blue Team - adversarial validation
|
|
9
|
-
*
|
|
10
|
-
* This ensures tasks are ACTUALLY completed, not just claimed to be.
|
|
11
|
-
*/
|
|
12
|
-
import type { ConversationMessage } from './types.js';
|
|
13
|
-
/**
|
|
14
|
-
* Verification claim that can be validated
|
|
15
|
-
*/
|
|
16
|
-
export interface VerificationClaim {
|
|
17
|
-
id: string;
|
|
18
|
-
type: 'file-created' | 'file-modified' | 'command-executed' | 'test-passed' | 'build-succeeded' | 'feature-implemented' | 'bug-fixed';
|
|
19
|
-
description: string;
|
|
20
|
-
evidence: {
|
|
21
|
-
expectedPath?: string;
|
|
22
|
-
expectedContent?: string;
|
|
23
|
-
expectedOutput?: string;
|
|
24
|
-
expectedPattern?: RegExp;
|
|
25
|
-
};
|
|
26
|
-
verified: boolean;
|
|
27
|
-
verificationMethod?: string;
|
|
28
|
-
verificationResult?: string;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Task completion verification result
|
|
32
|
-
*/
|
|
33
|
-
export interface TaskVerificationResult {
|
|
34
|
-
taskDescription: string;
|
|
35
|
-
claims: VerificationClaim[];
|
|
36
|
-
allVerified: boolean;
|
|
37
|
-
confidenceScore: number;
|
|
38
|
-
failedClaims: VerificationClaim[];
|
|
39
|
-
suggestions: string[];
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Debate round between agents
|
|
43
|
-
*/
|
|
44
|
-
export interface DebateRound {
|
|
45
|
-
roundNumber: number;
|
|
46
|
-
proposerArgument: string;
|
|
47
|
-
challengerResponse: string;
|
|
48
|
-
resolution: 'accepted' | 'rejected' | 'modified';
|
|
49
|
-
modifiedProposal?: string;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Multi-agent debate result
|
|
53
|
-
*/
|
|
54
|
-
export interface DebateResult {
|
|
55
|
-
topic: string;
|
|
56
|
-
rounds: DebateRound[];
|
|
57
|
-
finalDecision: string;
|
|
58
|
-
consensusReached: boolean;
|
|
59
|
-
confidenceLevel: 'high' | 'medium' | 'low';
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Red Team / Blue Team assessment
|
|
63
|
-
*/
|
|
64
|
-
export interface AdversarialAssessment {
|
|
65
|
-
implementation: string;
|
|
66
|
-
attacks: Array<{
|
|
67
|
-
vector: string;
|
|
68
|
-
description: string;
|
|
69
|
-
successful: boolean;
|
|
70
|
-
mitigation?: string;
|
|
71
|
-
}>;
|
|
72
|
-
overallScore: number;
|
|
73
|
-
passedAssessment: boolean;
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Extract verification claims from conversation history
|
|
77
|
-
*/
|
|
78
|
-
export declare function extractClaims(messages: ConversationMessage[]): VerificationClaim[];
|
|
79
|
-
/**
|
|
80
|
-
* Verify file-related claims
|
|
81
|
-
*/
|
|
82
|
-
export declare function verifyFileClaims(claims: VerificationClaim[], readFile: (path: string) => Promise<string | null>): Promise<VerificationClaim[]>;
|
|
83
|
-
/**
|
|
84
|
-
* Verify command execution claims by checking for expected output patterns
|
|
85
|
-
*/
|
|
86
|
-
export declare function verifyCommandClaims(claims: VerificationClaim[], toolResults: Map<string, string>): VerificationClaim[];
|
|
87
|
-
/**
|
|
88
|
-
* Generate self-verification prompts
|
|
89
|
-
*/
|
|
90
|
-
export declare function generateVerificationPrompts(claims: VerificationClaim[]): string[];
|
|
91
|
-
/**
|
|
92
|
-
* Create a verification task result
|
|
93
|
-
*/
|
|
94
|
-
export declare function createTaskVerification(taskDescription: string, claims: VerificationClaim[]): TaskVerificationResult;
|
|
95
|
-
/**
|
|
96
|
-
* Debate mode: Generate challenger arguments for a proposal
|
|
97
|
-
*/
|
|
98
|
-
export declare function generateChallengerArguments(proposal: string): string[];
|
|
99
|
-
/**
|
|
100
|
-
* Evaluate debate consensus
|
|
101
|
-
*/
|
|
102
|
-
export declare function evaluateConsensus(rounds: DebateRound[]): {
|
|
103
|
-
consensusReached: boolean;
|
|
104
|
-
confidenceLevel: 'high' | 'medium' | 'low';
|
|
105
|
-
};
|
|
106
|
-
/**
|
|
107
|
-
* Red Team attack vectors for code
|
|
108
|
-
*/
|
|
109
|
-
export declare function generateRedTeamAttacks(codeDescription: string): string[];
|
|
110
|
-
/**
|
|
111
|
-
* Format verification report
|
|
112
|
-
*/
|
|
113
|
-
export declare function formatVerificationReport(result: TaskVerificationResult): string;
|
|
114
|
-
/**
|
|
115
|
-
* Create a verification loop that ensures task completion
|
|
116
|
-
*/
|
|
117
|
-
export interface VerificationLoop {
|
|
118
|
-
maxIterations: number;
|
|
119
|
-
currentIteration: number;
|
|
120
|
-
claims: VerificationClaim[];
|
|
121
|
-
isComplete: () => boolean;
|
|
122
|
-
getNextAction: () => string | null;
|
|
123
|
-
}
|
|
124
|
-
export declare function createVerificationLoop(taskDescription: string, maxIterations?: number): VerificationLoop;
|
|
125
|
-
/**
|
|
126
|
-
* Consensus verification - run multiple verification passes
|
|
127
|
-
*/
|
|
128
|
-
export interface ConsensusVerification {
|
|
129
|
-
passes: number;
|
|
130
|
-
requiredConsensus: number;
|
|
131
|
-
results: boolean[];
|
|
132
|
-
addResult: (passed: boolean) => void;
|
|
133
|
-
hasConsensus: () => boolean;
|
|
134
|
-
getConfidence: () => number;
|
|
135
|
-
}
|
|
136
|
-
export declare function createConsensusVerification(passes?: number, requiredConsensus?: number): ConsensusVerification;
|
|
137
|
-
//# sourceMappingURL=verification.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"verification.d.ts","sourceRoot":"","sources":["../../src/core/verification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAmB,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEvE;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,cAAc,GAAG,eAAe,GAAG,kBAAkB,GAAG,aAAa,GAAG,iBAAiB,GAAG,qBAAqB,GAAG,WAAW,CAAC;IACtI,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE;QACR,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B,CAAC;IACF,QAAQ,EAAE,OAAO,CAAC;IAClB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,iBAAiB,EAAE,CAAC;IAC5B,WAAW,EAAE,OAAO,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,iBAAiB,EAAE,CAAC;IAClC,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,UAAU,EAAE,UAAU,GAAG,UAAU,GAAG,UAAU,CAAC;IACjD,g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/incorrect task completion) through:
|
|
5
|
-
* 1. Generator + Verifier pattern - one agent works, another checks
|
|
6
|
-
* 2. Self-verification loops - agent proves its own work
|
|
7
|
-
* 3. Consensus mode - multiple passes for verification
|
|
8
|
-
* 4. Red Team / Blue Team - adversarial validation
|
|
9
|
-
*
|
|
10
|
-
* This ensures tasks are ACTUALLY completed, not just claimed to be.
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* Extract verification claims from conversation history
|
|
14
|
-
*/
|
|
15
|
-
export function extractClaims(messages) {
|
|
16
|
-
const claims = [];
|
|
17
|
-
// Patterns that indicate claims being made
|
|
18
|
-
const claimPatterns = [
|
|
19
|
-
{ pattern: /(?:created|wrote|added)\s+(?:the\s+)?file\s+[`']?([^`'\s]+)[`']?/gi, type: 'file-created' },
|
|
20
|
-
{ pattern: /(?:modified|updated|changed|edited)\s+(?:the\s+)?file\s+[`']?([^`'\s]+)[`']?/gi, type: 'file-modified' },
|
|
21
|
-
{ pattern: /(?:ran|executed|running)\s+[`']?([^`'\n]+)[`']?/gi, type: 'command-executed' },
|
|
22
|
-
{ pattern: /(?:tests?\s+(?:are\s+)?pass(?:ing|ed)|all\s+tests?\s+pass)/gi, type: 'test-passed' },
|
|
23
|
-
{ pattern: /(?:build\s+(?:succeeded|successful|passed)|successfully\s+built)/gi, type: 'build-succeeded' },
|
|
24
|
-
{ pattern: /(?:implemented|added|created)\s+(?:the\s+)?([^.!?\n]+?)(?:\.|!|\?|$)/gi, type: 'feature-implemented' },
|
|
25
|
-
{ pattern: /(?:fixed|resolved|repaired)\s+(?:the\s+)?([^.!?\n]+?)(?:\.|!|\?|$)/gi, type: 'bug-fixed' },
|
|
26
|
-
];
|
|
27
|
-
for (const message of messages) {
|
|
28
|
-
if (message.role !== 'assistant')
|
|
29
|
-
continue;
|
|
30
|
-
const content = typeof message.content === 'string' ? message.content : '';
|
|
31
|
-
for (const { pattern, type } of claimPatterns) {
|
|
32
|
-
const matches = content.matchAll(new RegExp(pattern.source, pattern.flags));
|
|
33
|
-
for (const match of matches) {
|
|
34
|
-
claims.push({
|
|
35
|
-
id: `claim-${claims.length + 1}`,
|
|
36
|
-
type,
|
|
37
|
-
description: match[0],
|
|
38
|
-
evidence: {
|
|
39
|
-
expectedPath: match[1],
|
|
40
|
-
expectedPattern: new RegExp(match[1] ?? '', 'i'),
|
|
41
|
-
},
|
|
42
|
-
verified: false,
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
return claims;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Verify file-related claims
|
|
51
|
-
*/
|
|
52
|
-
export async function verifyFileClaims(claims, readFile) {
|
|
53
|
-
const verifiedClaims = [];
|
|
54
|
-
for (const claim of claims) {
|
|
55
|
-
if (claim.type === 'file-created' || claim.type === 'file-modified') {
|
|
56
|
-
if (claim.evidence.expectedPath) {
|
|
57
|
-
const content = await readFile(claim.evidence.expectedPath);
|
|
58
|
-
if (content !== null) {
|
|
59
|
-
claim.verified = true;
|
|
60
|
-
claim.verificationMethod = 'file-read';
|
|
61
|
-
claim.verificationResult = `File exists with ${content.length} characters`;
|
|
62
|
-
// If we have expected content pattern, check it
|
|
63
|
-
if (claim.evidence.expectedPattern && !claim.evidence.expectedPattern.test(content)) {
|
|
64
|
-
claim.verified = false;
|
|
65
|
-
claim.verificationResult = 'File exists but content does not match expected pattern';
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
else {
|
|
69
|
-
claim.verified = false;
|
|
70
|
-
claim.verificationMethod = 'file-read';
|
|
71
|
-
claim.verificationResult = 'File not found';
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
verifiedClaims.push(claim);
|
|
76
|
-
}
|
|
77
|
-
return verifiedClaims;
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Verify command execution claims by checking for expected output patterns
|
|
81
|
-
*/
|
|
82
|
-
export function verifyCommandClaims(claims, toolResults) {
|
|
83
|
-
const verifiedClaims = [];
|
|
84
|
-
for (const claim of claims) {
|
|
85
|
-
if (claim.type === 'command-executed') {
|
|
86
|
-
// Look for matching tool results
|
|
87
|
-
for (const [toolCall, result] of toolResults) {
|
|
88
|
-
if (toolCall.toLowerCase().includes('bash')) {
|
|
89
|
-
claim.verified = true;
|
|
90
|
-
claim.verificationMethod = 'tool-result-check';
|
|
91
|
-
claim.verificationResult = `Command output: ${result.substring(0, 100)}...`;
|
|
92
|
-
break;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
if (!claim.verified) {
|
|
96
|
-
claim.verificationMethod = 'tool-result-check';
|
|
97
|
-
claim.verificationResult = 'No matching command execution found';
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
verifiedClaims.push(claim);
|
|
101
|
-
}
|
|
102
|
-
return verifiedClaims;
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Generate self-verification prompts
|
|
106
|
-
*/
|
|
107
|
-
export function generateVerificationPrompts(claims) {
|
|
108
|
-
const prompts = [];
|
|
109
|
-
for (const claim of claims) {
|
|
110
|
-
switch (claim.type) {
|
|
111
|
-
case 'file-created':
|
|
112
|
-
prompts.push(`Verify: Read the file ${claim.evidence.expectedPath} and confirm it exists with the expected content.`);
|
|
113
|
-
break;
|
|
114
|
-
case 'file-modified':
|
|
115
|
-
prompts.push(`Verify: Read ${claim.evidence.expectedPath} and confirm the modification was applied correctly.`);
|
|
116
|
-
break;
|
|
117
|
-
case 'test-passed':
|
|
118
|
-
prompts.push(`Verify: Run the tests again and confirm they pass. Show the test output.`);
|
|
119
|
-
break;
|
|
120
|
-
case 'build-succeeded':
|
|
121
|
-
prompts.push(`Verify: Run the build again and confirm it succeeds without errors.`);
|
|
122
|
-
break;
|
|
123
|
-
case 'feature-implemented':
|
|
124
|
-
prompts.push(`Verify: Demonstrate the feature "${claim.description}" works by showing concrete output or test results.`);
|
|
125
|
-
break;
|
|
126
|
-
case 'bug-fixed':
|
|
127
|
-
prompts.push(`Verify: Show that the bug is fixed by reproducing the original issue and confirming it no longer occurs.`);
|
|
128
|
-
break;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
return prompts;
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* Create a verification task result
|
|
135
|
-
*/
|
|
136
|
-
export function createTaskVerification(taskDescription, claims) {
|
|
137
|
-
const verifiedCount = claims.filter((c) => c.verified).length;
|
|
138
|
-
const totalCount = claims.length;
|
|
139
|
-
return {
|
|
140
|
-
taskDescription,
|
|
141
|
-
claims,
|
|
142
|
-
allVerified: verifiedCount === totalCount && totalCount > 0,
|
|
143
|
-
confidenceScore: totalCount > 0 ? verifiedCount / totalCount : 0,
|
|
144
|
-
failedClaims: claims.filter((c) => !c.verified),
|
|
145
|
-
suggestions: generateSuggestions(claims),
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* Generate improvement suggestions based on failed verifications
|
|
150
|
-
*/
|
|
151
|
-
function generateSuggestions(claims) {
|
|
152
|
-
const suggestions = [];
|
|
153
|
-
const failedClaims = claims.filter((c) => !c.verified);
|
|
154
|
-
for (const claim of failedClaims) {
|
|
155
|
-
switch (claim.type) {
|
|
156
|
-
case 'file-created':
|
|
157
|
-
suggestions.push(`File "${claim.evidence.expectedPath}" was not created. Use the Write or Edit tool to create it.`);
|
|
158
|
-
break;
|
|
159
|
-
case 'file-modified':
|
|
160
|
-
suggestions.push(`File "${claim.evidence.expectedPath}" modification not verified. Read the file to confirm changes.`);
|
|
161
|
-
break;
|
|
162
|
-
case 'test-passed':
|
|
163
|
-
suggestions.push('Tests were claimed to pass but not verified. Run tests again to confirm.');
|
|
164
|
-
break;
|
|
165
|
-
case 'build-succeeded':
|
|
166
|
-
suggestions.push('Build was claimed to succeed but not verified. Run build again to confirm.');
|
|
167
|
-
break;
|
|
168
|
-
case 'feature-implemented':
|
|
169
|
-
suggestions.push(`Feature implementation not verified: "${claim.description}". Add tests or demonstrate functionality.`);
|
|
170
|
-
break;
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
if (suggestions.length === 0 && claims.length === 0) {
|
|
174
|
-
suggestions.push('No verifiable claims found. Make specific claims that can be verified (e.g., "I created file X", "Tests pass").');
|
|
175
|
-
}
|
|
176
|
-
return suggestions;
|
|
177
|
-
}
|
|
178
|
-
/**
|
|
179
|
-
* Debate mode: Generate challenger arguments for a proposal
|
|
180
|
-
*/
|
|
181
|
-
export function generateChallengerArguments(proposal) {
|
|
182
|
-
return [
|
|
183
|
-
`What are the potential edge cases not covered by: "${proposal}"?`,
|
|
184
|
-
`What could go wrong with this approach?`,
|
|
185
|
-
`Are there simpler alternatives?`,
|
|
186
|
-
`What dependencies or assumptions does this make?`,
|
|
187
|
-
`How would this perform at scale?`,
|
|
188
|
-
`What security implications does this have?`,
|
|
189
|
-
];
|
|
190
|
-
}
|
|
191
|
-
/**
|
|
192
|
-
* Evaluate debate consensus
|
|
193
|
-
*/
|
|
194
|
-
export function evaluateConsensus(rounds) {
|
|
195
|
-
const acceptedCount = rounds.filter((r) => r.resolution === 'accepted').length;
|
|
196
|
-
const totalRounds = rounds.length;
|
|
197
|
-
if (acceptedCount === totalRounds) {
|
|
198
|
-
return { consensusReached: true, confidenceLevel: 'high' };
|
|
199
|
-
}
|
|
200
|
-
else if (acceptedCount >= totalRounds * 0.7) {
|
|
201
|
-
return { consensusReached: true, confidenceLevel: 'medium' };
|
|
202
|
-
}
|
|
203
|
-
else if (acceptedCount >= totalRounds * 0.5) {
|
|
204
|
-
return { consensusReached: true, confidenceLevel: 'low' };
|
|
205
|
-
}
|
|
206
|
-
return { consensusReached: false, confidenceLevel: 'low' };
|
|
207
|
-
}
|
|
208
|
-
/**
|
|
209
|
-
* Red Team attack vectors for code
|
|
210
|
-
*/
|
|
211
|
-
export function generateRedTeamAttacks(codeDescription) {
|
|
212
|
-
return [
|
|
213
|
-
'Input validation bypass: What happens with malformed input?',
|
|
214
|
-
'Authentication bypass: Can unauthorized users access this?',
|
|
215
|
-
'Race conditions: What happens with concurrent access?',
|
|
216
|
-
'Error handling: What if dependencies fail?',
|
|
217
|
-
'Resource exhaustion: What happens with very large inputs?',
|
|
218
|
-
'Injection attacks: Can user input affect program flow?',
|
|
219
|
-
'State manipulation: Can state be corrupted?',
|
|
220
|
-
'Logging exposure: Is sensitive data logged?',
|
|
221
|
-
];
|
|
222
|
-
}
|
|
223
|
-
/**
|
|
224
|
-
* Format verification report
|
|
225
|
-
*/
|
|
226
|
-
export function formatVerificationReport(result) {
|
|
227
|
-
const lines = [];
|
|
228
|
-
lines.push('');
|
|
229
|
-
lines.push('='.repeat(60));
|
|
230
|
-
lines.push(' TASK VERIFICATION REPORT');
|
|
231
|
-
lines.push('='.repeat(60));
|
|
232
|
-
lines.push('');
|
|
233
|
-
lines.push(`Task: ${result.taskDescription}`);
|
|
234
|
-
lines.push(`Confidence Score: ${(result.confidenceScore * 100).toFixed(1)}%`);
|
|
235
|
-
lines.push(`Status: ${result.allVerified ? 'VERIFIED' : 'NEEDS ATTENTION'}`);
|
|
236
|
-
lines.push('');
|
|
237
|
-
lines.push('-'.repeat(60));
|
|
238
|
-
lines.push(' CLAIMS');
|
|
239
|
-
lines.push('-'.repeat(60));
|
|
240
|
-
for (const claim of result.claims) {
|
|
241
|
-
const status = claim.verified ? '[PASS]' : '[FAIL]';
|
|
242
|
-
lines.push(` ${status} ${claim.type}: ${claim.description}`);
|
|
243
|
-
if (claim.verificationResult) {
|
|
244
|
-
lines.push(` ${claim.verificationResult}`);
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
if (result.suggestions.length > 0) {
|
|
248
|
-
lines.push('');
|
|
249
|
-
lines.push('-'.repeat(60));
|
|
250
|
-
lines.push(' SUGGESTIONS');
|
|
251
|
-
lines.push('-'.repeat(60));
|
|
252
|
-
for (const suggestion of result.suggestions) {
|
|
253
|
-
lines.push(` * ${suggestion}`);
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
lines.push('');
|
|
257
|
-
lines.push('='.repeat(60));
|
|
258
|
-
return lines.join('\n');
|
|
259
|
-
}
|
|
260
|
-
export function createVerificationLoop(taskDescription, maxIterations = 3) {
|
|
261
|
-
const claims = [];
|
|
262
|
-
return {
|
|
263
|
-
maxIterations,
|
|
264
|
-
currentIteration: 0,
|
|
265
|
-
claims,
|
|
266
|
-
isComplete() {
|
|
267
|
-
if (claims.length === 0)
|
|
268
|
-
return false;
|
|
269
|
-
return claims.every((c) => c.verified);
|
|
270
|
-
},
|
|
271
|
-
getNextAction() {
|
|
272
|
-
if (this.currentIteration >= this.maxIterations) {
|
|
273
|
-
return null;
|
|
274
|
-
}
|
|
275
|
-
const unverifiedClaims = claims.filter((c) => !c.verified);
|
|
276
|
-
if (unverifiedClaims.length === 0) {
|
|
277
|
-
return `VERIFY: Review the task "${taskDescription}" and make explicit, verifiable claims about what was accomplished.`;
|
|
278
|
-
}
|
|
279
|
-
const nextClaim = unverifiedClaims[0];
|
|
280
|
-
if (!nextClaim)
|
|
281
|
-
return null;
|
|
282
|
-
this.currentIteration++;
|
|
283
|
-
switch (nextClaim.type) {
|
|
284
|
-
case 'file-created':
|
|
285
|
-
case 'file-modified':
|
|
286
|
-
return `VERIFY: Read file "${nextClaim.evidence.expectedPath}" to confirm it exists and has correct content.`;
|
|
287
|
-
case 'test-passed':
|
|
288
|
-
return 'VERIFY: Run tests and show the output to confirm they pass.';
|
|
289
|
-
case 'build-succeeded':
|
|
290
|
-
return 'VERIFY: Run build and show the output to confirm success.';
|
|
291
|
-
case 'feature-implemented':
|
|
292
|
-
return `VERIFY: Demonstrate feature "${nextClaim.description}" by showing it works.`;
|
|
293
|
-
case 'bug-fixed':
|
|
294
|
-
return `VERIFY: Show the bug "${nextClaim.description}" is fixed by reproducing and confirming it no longer occurs.`;
|
|
295
|
-
default:
|
|
296
|
-
return `VERIFY: Provide evidence for claim: ${nextClaim.description}`;
|
|
297
|
-
}
|
|
298
|
-
},
|
|
299
|
-
};
|
|
300
|
-
}
|
|
301
|
-
export function createConsensusVerification(passes = 3, requiredConsensus = 0.66) {
|
|
302
|
-
const results = [];
|
|
303
|
-
return {
|
|
304
|
-
passes,
|
|
305
|
-
requiredConsensus,
|
|
306
|
-
results,
|
|
307
|
-
addResult(passed) {
|
|
308
|
-
results.push(passed);
|
|
309
|
-
},
|
|
310
|
-
hasConsensus() {
|
|
311
|
-
if (results.length < passes)
|
|
312
|
-
return false;
|
|
313
|
-
const passRate = results.filter(Boolean).length / results.length;
|
|
314
|
-
return passRate >= requiredConsensus;
|
|
315
|
-
},
|
|
316
|
-
getConfidence() {
|
|
317
|
-
if (results.length === 0)
|
|
318
|
-
return 0;
|
|
319
|
-
return results.filter(Boolean).length / results.length;
|
|
320
|
-
},
|
|
321
|
-
};
|
|
322
|
-
}
|
|
323
|
-
//# sourceMappingURL=verification.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"verification.js","sourceRoot":"","sources":["../../src/core/verification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAuEH;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,QAA+B;IAC3D,MAAM,MAAM,GAAwB,EAAE,CAAC;IAEvC,2CAA2C;IAC3C,MAAM,aAAa,GAAG;QACpB,EAAE,OAAO,EAAE,oEAAoE,EAAE,IAAI,EAAE,cAAuB,EAAE;QAChH,EAAE,OAAO,EAAE,gFAAgF,EAAE,IAAI,EAAE,eAAwB,EAAE;QAC7H,EAAE,OAAO,EAAE,mDAAmD,EAAE,IAAI,EAAE,kBAA2B,EAAE;QACnG,EAAE,OAAO,EAAE,8DAA8D,EAAE,IAAI,EAAE,aAAsB,EAAE;QACzG,EAAE,OAAO,EAAE,oEAAoE,EAAE,IAAI,EAAE,iBAA0B,EAAE;QACnH,EAAE,OAAO,EAAE,wEAAwE,EAAE,IAAI,EAAE,qBAA8B,EAAE;QAC3H,EAAE,OAAO,EAAE,sEAAsE,EAAE,IAAI,EAAE,WAAoB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