mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-25 14:43:05 +09:00
🔖 Checkpoint: Edit /workspaces/claude-code-flow/src/verification/index.ts
This commit is contained in:
1 parent
12031bd24b
commit
fdf276cae8
3 files changed
+96
No files matched your search
@@ -0,0 +1 @@
|
||||
{"tag": "checkpoint-20250812-023955", "file": "/workspaces/claude-code-flow/src/verification/api/websocket/truth-monitor.js", "timestamp": "2025-08-12T02:39:55Z", "type": "post-edit", "branch": "alpha-89", "diff_summary": " .claude-flow/metrics/performance.json | 2 +- .claude-flow/metrics/system-metrics.json | 124 +++++- .claude-flow/metrics/task-metrics.json | 6 +- .claude/checkpoints/1754966365.json | 1 + .claude/checkpoints/1754966367.json | 1 + .claude/checkpoints/1754966393.json | 1 + CLAUDE.md | 53 +++ src/verification/api/websocket/truth-monitor.js | 519 ++++++++++++++++++++++++ 8 files changed, 689 insertions(+), 18 deletions(-) "}
|
||||
@@ -0,0 +1 @@
|
||||
{"tag": "checkpoint-20250812-023956", "file": "/workspaces/claude-code-flow/src/verification/interfaces.ts", "timestamp": "2025-08-12T02:39:56Z", "type": "post-edit", "branch": "alpha-89", "diff_summary": " .claude-flow/metrics/performance.json | 2 +- .claude-flow/metrics/system-metrics.json | 124 ++++- .claude-flow/metrics/task-metrics.json | 6 +- CLAUDE.md | 53 ++ src/verification/interfaces.ts | 833 +++++++++++++++++++++++++++++++ 5 files changed, 1000 insertions(+), 18 deletions(-) "}
|
||||
@@ -0,0 +1,94 @@
|
||||
/**
|
||||
* Verification Module - Index
|
||||
*
|
||||
* Main entry point for the verification system.
|
||||
* Provides a unified interface for all verification capabilities.
|
||||
*/
|
||||
|
||||
export * from './hooks.js';
|
||||
export * from './cli-integration.js';
|
||||
|
||||
// Re-export key components for convenience
|
||||
export {
|
||||
verificationHookManager,
|
||||
VerificationHookManager,
|
||||
DEFAULT_PRE_TASK_CHECKERS,
|
||||
DEFAULT_POST_TASK_VALIDATORS,
|
||||
DEFAULT_TRUTH_VALIDATORS,
|
||||
DEFAULT_ROLLBACK_TRIGGERS,
|
||||
DEFAULT_VERIFICATION_CONFIG
|
||||
} from './hooks.js';
|
||||
|
||||
export {
|
||||
initializeVerificationCLI,
|
||||
createVerificationCommand,
|
||||
VerificationCLICommands
|
||||
} from './cli-integration.js';
|
||||
|
||||
import { Logger } from '../core/logger.js';
|
||||
import { verificationHookManager } from './hooks.js';
|
||||
import { initializeVerificationCLI } from './cli-integration.js';
|
||||
|
||||
const logger = new Logger({
|
||||
level: 'info',
|
||||
format: 'text',
|
||||
destination: 'console'
|
||||
}, { prefix: 'VerificationModule' });
|
||||
|
||||
/**
|
||||
* Initialize the complete verification system
|
||||
*/
|
||||
export async function initializeVerificationSystem(): Promise<void> {
|
||||
logger.info('Initializing verification system...');
|
||||
|
||||
try {
|
||||
// Initialize CLI integration
|
||||
await initializeVerificationCLI();
|
||||
|
||||
// Start cleanup interval (every hour)
|
||||
setInterval(() => {
|
||||
verificationHookManager.cleanup();
|
||||
}, 60 * 60 * 1000);
|
||||
|
||||
logger.info('Verification system initialized successfully');
|
||||
} catch (error) {
|
||||
logger.error('Failed to initialize verification system:', error);
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get verification system status
|
||||
*/
|
||||
export function getVerificationSystemStatus(): {
|
||||
initialized: boolean;
|
||||
hooksRegistered: number;
|
||||
activeContexts: number;
|
||||
metrics: any;
|
||||
} {
|
||||
const metrics = verificationHookManager.getMetrics();
|
||||
|
||||
return {
|
||||
initialized: true,
|
||||
hooksRegistered: 5, // Pre-task, post-task, integration, truth, rollback
|
||||
activeContexts: metrics.activeContexts || 0,
|
||||
metrics
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Shutdown verification system gracefully
|
||||
*/
|
||||
export async function shutdownVerificationSystem(): Promise<void> {
|
||||
logger.info('Shutting down verification system...');
|
||||
|
||||
try {
|
||||
// Cleanup all contexts and snapshots
|
||||
verificationHookManager.cleanup(0); // Cleanup all data
|
||||
|
||||
logger.info('Verification system shut down successfully');
|
||||
} catch (error) {
|
||||
logger.error('Error during verification system shutdown:', error);
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user