Repository navigation
Conversation
Introduce AGENT_ENGINES as the canonical list of runnable agent engines and a derived AgentEngineId type. The manifest schema enum, the UpdateAgent route schema, and the engine registry/event unions now follow from this list instead of repeating the `claude_code` | `codex` literal in several files. This is the first provider-portability step: adding an engine becomes a one-line catalog change plus an engine implementation and runner CLI, rather than editing scattered literals. No user-visible behaviour changes; the same engine values are accepted. Add regression tests covering derivation from the catalog, rejection of an unknown engine (naming the engine field), and continued support for claude_code and codex.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Introduce
AGENT_ENGINESas the single source of truth for the agent enginesFacility can run, plus a derived
AgentEngineIdtype. The manifest schema enum,the
UpdateAgentroute schema, and the engine registry/event unions now followfrom this list instead of repeating the
"claude_code" | "codex"literal inseveral files.
Why
First step toward provider portability (per ROADMAP). Adding an engine becomes a
one-line catalog change plus an engine implementation and runner CLI, rather than
editing scattered literals that can drift.
User-visible behaviour
None. The same engine values are accepted and rejected as before. Internal
refactor only.
Files / subsystems affected
packages/agents—AGENT_ENGINES,AgentEngineId, schema enumservices/api/src/turns/engines.ts— engine identity unionsservices/api/src/routes/v1/story-workspaces.ts—UpdateAgentschema enumPersistence / migration / compatibility
None.
Security / permission implications
None.
Cost / budget / observability / mirror effects
None.
Tests
Added regression tests in
packages/agents/test/agents.test.ts:enginefield)claude_codeandcodexVerification commands run
pnpm --filter @facility/agents test→ 13/13 passpnpm typecheck→ 14/14 passpnpm guards→ 2/2 passbiome checkon changed files → cleanNote: the full
pnpm verifyand the Docker-backed workspace tests were not runlocally (no Docker/Postgres in my environment); they should run in CI.
Release classification
Not user-visible, not breaking (
refactor:→ no release on its own).