Skip to content

armgit / ruflo

Public Imported from GitHub
0

🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated

🔖 Checkpoint: Edit /workspaces/claude-code-flow/src/verification/index.ts

rUvfdf276cae8aa
diff --git a/.claude/checkpoints/1754966395.json b/.claude/checkpoints/1754966395.json
new file mode 100644
index 0000000000..8b4a58b7cc
--- /dev/null
+++ b/.claude/checkpoints/1754966395.json
@@ -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(-) "}
diff --git a/.claude/checkpoints/1754966396.json b/.claude/checkpoints/1754966396.json
new file mode 100644
index 0000000000..ea988843e4
--- /dev/null
+++ b/.claude/checkpoints/1754966396.json
@@ -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(-) "}
diff --git a/src/verification/index.ts b/src/verification/index.ts
new file mode 100644
index 0000000000..f22688f682
--- /dev/null
+++ b/src/verification/index.ts
@@ -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;
+ }
+}
\ No newline at end of file