UNPKG

framework

Version:

The (AI) Framework: turnkey, zero-config AI orchestration that wraps a coding-agent CLI (Claude Code) as a black box and takes you from an idea to a running app. Vite for AI.

33 lines 1.71 kB
/** * The agent vocabulary (#542), node-free so every surface shares one copy: the CLI's * `--agent` flag, the registry's preference sanitizer, and the dashboard bundle — which must * not import the driver layer (it spawns processes), and whose "kept local" copies existed * only because this list used to live beside those imports. Adding an agent is one entry * here plus its driver; the dashboard's per-agent UI table is keyed by {@link AgentName}, so * a missing entry there is a compile error, not a silent gap. */ /** The agents the framework can drive, in the order surfaces list them. */ export const AGENTS = ['claude', 'codex']; /** Whether `value` names an agent we can drive. */ export function isAgentName(value) { return value !== undefined && AGENTS.includes(value); } /** How each agent reads in a sentence or on a button. */ export const AGENT_LABELS = { claude: 'Claude Code', codex: 'Codex', }; /** * The agent behind a driver name (#831): a run records the driver that ran it * (`claude-code`), while `--agent` takes the agent name (`claude`). `undefined` for a driver * no agent claims (the fake driver, or a record from a newer version). An agent whose driver * name differs from its own needs a case here, like claude's does. */ export function agentForDriver(driver) { // Every surface Claude runs on is still Claude (#1263): the local CLI, the cloud session, and // the Actions runner. Where it runs is the run's `target`, not its agent. if (driver === 'claude-code' || driver === 'claude-web' || driver === 'github-actions') return 'claude'; return isAgentName(driver) ? driver : undefined; } //# sourceMappingURL=agent-names.js.map