The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.
TypeScript 3d-modelingagent-frameworkagent-harnessai-agentscadclaude-codecodexcoding-agentsdeveloper-toolsesp32game-developmentmcp-servermulti-agentopen-hardwareopencodeopenharnesspcbroboticsterminaltmux
/** Configured profiles need hooks before their first session creates a history store. */
import { readdirSync, statSync } from 'node:fs'
import { join } from 'node:path'
export interface NativeHookHomes { directory: string; file: string; max: number }
export function nativeHookHomes(rule: NativeHookHomes, defaultHome: string): string[] {
const homes = [defaultHome]
let entries: string[] = []
try { entries = readdirSync(join(defaultHome, rule.directory)) } catch { return homes }
for (const name of entries.slice(0, rule.max)) {
const home = join(defaultHome, rule.directory, name)
try {
if (statSync(join(home, rule.file)).isFile()) homes.push(home)
} catch { /* not a profile folder, or no config yet */ }
}
return homes
}