UNPKG

aiwg

Version:

Deployment tool and support utility for AI context. Copies agents, skills, commands, rules, and behaviors into the paths each AI platform reads (Claude Code, Codex, Copilot, Cursor, Warp, OpenClaw, and 6 more) so one source of truth works across 10 platfo

59 lines 1.7 kB
/** * Daemon Command Handlers * * Handlers for daemon-related CLI commands (behavior management, daemon init). * Each handler delegates to existing scripts in tools/. * * @tests @test/unit/cli/handlers/coverage.test.ts */ import { createScriptRunner } from './script-runner.js'; import { getFrameworkRoot } from '../../channel/manager.mjs'; /** * Base class for daemon handlers that delegate to scripts */ class DaemonHandler { category = 'daemon'; get aliases() { return [this.id]; } async execute(ctx) { const frameworkRoot = await getFrameworkRoot(); const runner = createScriptRunner(frameworkRoot); return runner.run(this.scriptPath, ctx.args); } } /** * Behavior Handler * * Manages behavior YAML bundles that bind directives and toolsets to agent types. */ class BehaviorHandler extends DaemonHandler { id = 'behavior'; name = 'Behavior'; description = 'Manage behavior YAML bundles that bind directives and toolsets to agent types'; scriptPath = 'tools/daemon/behavior.mjs'; } /** * Daemon Init Handler * * Initialize daemon config from a profile template. */ class DaemonInitHandler extends DaemonHandler { id = 'daemon-init'; name = 'Daemon Init'; description = 'Initialize daemon config from a profile template (default: manager)'; scriptPath = 'tools/daemon/init-profile.mjs'; } /** * Exported handler instances */ export const behaviorHandler = new BehaviorHandler(); export const daemonInitHandler = new DaemonInitHandler(); /** * All daemon handlers for registration */ export const daemonHandlers = [ behaviorHandler, daemonInitHandler, ]; //# sourceMappingURL=daemon.js.map