Skip to content

fix(api): route legacy agents by name - #254

Open
alvaroloes wants to merge 1 commit into
mainfrom
codex/fix-legacy-builder-command-routing
Open

fix(api): route legacy agents by name#254
alvaroloes wants to merge 1 commit into
mainfrom
codex/fix-legacy-builder-command-routing

Conversation

@alvaroloes

Copy link
Copy Markdown
Member

Summary

  • fall back to an enabled agent's name when its valid trigger array has no
    explicit command or handle binding
  • preserve explicit aliases and explicit remappings
  • cover the routing helper and the approved-plan executor with regressions for
    legacy manual-only Builders

This aligns the executor with the web UI's existing contract that an enabled
agent is always addressable on demand by its name. It unblocks projects seeded
before GitHub command triggers were added without mutating their stored agent
definitions.

Fixes #253

Verification

  • pnpm turbo run build --filter='@facility/api^...'
  • pnpm --filter @facility/api exec vitest run --fileParallelism=false test/agent-routing.test.ts (3 passed)
  • pnpm --filter @facility/api typecheck
  • pnpm exec biome check services/api/src/github/agent-routing.ts services/api/test/agent-routing.test.ts services/api/test/api.test.ts
  • pnpm --filter @facility/api exec vitest run --fileParallelism=false test/api.test.ts -t 'dispatches an approved platform plan to the linked builder' against local facility_test (1 passed)

No deployment or production data mutation is included in this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Legacy manual-only Builder is undiscoverable during plan acceptance

1 participant