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/core/version.ts

rUv066eefa7f857
diff --git a/.claude/checkpoints/task-1754424604.json b/.claude/checkpoints/task-1754424604.json
new file mode 100644
index 0000000000..32e0853e08
--- /dev/null
+++ b/.claude/checkpoints/task-1754424604.json
@@ -0,0 +1 @@
+{"checkpoint": "task-20250805-201003", "task": "{{user_prompt}} ", "timestamp": "2025-08-05T20:10:04Z", "commit": "4222cd4e92d659659198d0ce1c5c4c7628cd0cf2", "github_release": "true"}
diff --git a/src/core/version.ts b/src/core/version.ts
new file mode 100644
index 0000000000..47dbdc836e
--- /dev/null
+++ b/src/core/version.ts
@@ -0,0 +1,41 @@
+/**
+ * Centralized version management
+ * Reads version from package.json to ensure consistency
+ */
+
+import { readFileSync } from 'fs';
+import { join, dirname } from 'path';
+import { fileURLToPath } from 'url';
+
+// Get the directory of this module
+const __filename = fileURLToPath(import.meta.url);
+const __dirname = dirname(__filename);
+
+// Read version from package.json
+let VERSION: string;
+let BUILD_DATE: string;
+
+try {
+ // Navigate to project root and read package.json
+ const packageJsonPath = join(__dirname, '../../package.json');
+ const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf-8'));
+ VERSION = packageJson.version;
+ BUILD_DATE = new Date().toISOString().split('T')[0];
+} catch (error) {
+ // Fallback version if package.json can't be read
+ console.warn('Warning: Could not read version from package.json, using fallback');
+ VERSION = '2.0.0-alpha.87';
+ BUILD_DATE = new Date().toISOString().split('T')[0];
+}
+
+export { VERSION, BUILD_DATE };
+
+// Helper function to get formatted version string
+export function getVersionString(includeV = true): string {
+ return includeV ? `v${VERSION}` : VERSION;
+}
+
+// Helper function for version display in CLI
+export function displayVersion(): void {
+ console.log(getVersionString());
+}
\ No newline at end of file