Skip to content

armgit / Orkas

Public Imported from GitHub
0

Orkas is an open-source (MIT), local-first AI team for your desktop: a Commander turns your goal into to-dos and coordinates 16 built-in specialist agents plus Claude Code, Codex, OpenCode, OpenClaw and Hermes, with projects, scheduled automations and connectors. Free app for macOS & Windows; built-in models or your own keys.

Switch genProjectId to crypto.randomBytes(6)

wytf6319d153400
diff --git a/src/main/features/projects.ts b/src/main/features/projects.ts
index 7a08f74f..260b2dc1 100644
--- a/src/main/features/projects.ts
+++ b/src/main/features/projects.ts
@@ -17,6 +17,7 @@
* but no writes happen yet.
*/
+import * as crypto from 'node:crypto';
import * as fs from 'node:fs';
import * as fsp from 'node:fs/promises';
import * as path from 'node:path';
@@ -45,8 +46,7 @@ export interface ProjectWithStats extends Project {
// ── id helper ─────────────────────────────────────────────────────────────
function genProjectId(): string {
- // 8-hex; collision-safe enough for per-user project counts.
- return 'p_' + Math.floor(Math.random() * 0xffffffff).toString(16).padStart(8, '0');
+ return 'p_' + crypto.randomBytes(6).toString('hex');
}
// ── index IO ──────────────────────────────────────────────────────────────