feat(shared): add fx by Vercel as a built-in terminal agent

Merged
KI
3mo ago
+62-0

What

Adds fx (Vercel's terminal coding agent) as a built-in terminal agent, with everything the other builtins have.

  • packages/shared/src/builtin-terminal-agents.ts: fx entry
  • packages/ui/src/assets/icons/preset-icons/fx.svg + fx-white.svg, registered in index.ts (the fx wordmark glyph from fx.sh, monochrome)
  • README "Supported Agents" row, apps/docs/content/docs/agent-integration.mdx bullet, UniversalCompatibilityDemo entry + apps/marketing/public/app-icons/fx.svg
  • Registration test in agent-command.test.ts (prompt shape, preset args, resume args)

Manifest

Flags verified against the fx docs (installation, CLI commands, fx ask, sessions, permissions) on 2026-08-22. Install is curl -fsSL https://fx.sh/setup.sh | bash.

FieldValueWhy
commandfxinteractive launch; auto is fx's default permission mode, and the mode is set via FX_PERMISSION_MODE / settings rather than a launch flag, so there is nothing to add
promptCommandfx ask --autointeractive fx takes no prompt argument; fx ask <prompt> is the documented way to hand it one, and --auto keeps the run from blocking on an approval it cannot show
promptCommandSuffix; fx resume lastfx ask saves a workspace-scoped session, so this drops the user into the interactive TUI on that session once the one-shot answer lands, same shape as kimi's ; kimi --auto --continue
resumeCommandfx resume (+ session id)fx resume <session-id> per the sessions doc
nonInteractiveCommandfx ask --autoone-shot headless; --json / --yolo are available for callers that want them

Live-tested against an installed fx 0.0.5 on macOS (2026-08-23), signed into Vercel: fx ask --auto "..." answered and saved a session (fx sessions lists it); the exact launch string Superset generates - fx ask --auto "$(cat <<'...')" ; fx resume last - ran the one-shot and then dropped into the interactive TUI showing "Session resumed" on that same session, which is the behaviour promptCommandSuffix is there for; top-level fx resume [last|<id>] exists as documented (fx resume --help), alongside the fx --resume <id> spelling fx itself prints on exit. Two setup notes for users: fx login is a browser device flow followed by a Vercel-team picker in the terminal, and fx errors cleanly with instructions when run before login.

Design note: I went with the fx ask + fx resume last pair rather than a stdin transport. fx documents stdin only for fx ask (printf ... | fx ask), not for the interactive launcher, so piping the prompt into fx itself would be a guess. If you would rather keep prompt launches one-shot, dropping promptCommandSuffix does that.

Not added to the default terminal presets, matching droid/pi/polygraph; happy to flip includeInDefaultTerminalPresets.

fx runs as a plain terminal agent, same shape as Pi / Cursor Agent, so no packages/agent-setup target or wrapper is needed.

Testing

  • bun run typecheck clean
  • bun run lint clean
  • bun test packages/shared 778 pass

https://claude.ai/code/session_01DuAhw6Ao5Cru3acdkrzx9f


Summary by cubic

Adds Vercel’s fx as a built-in terminal agent and preset so users can prompt, resume, or run fx from Superset. Previously fx was not available; now prompt launches run fx ask --auto <prompt> then resume in the TUI via fx resume last, resume runs fx resume <id>, and one-shots use fx ask --auto.

  • Registers fx in packages/shared/src/builtin-terminal-agents.ts with command, promptCommand, promptCommandSuffix, resumeCommand, and nonInteractiveCommand.
  • Extends packages/shared/src/agent-command.test.ts to cover registration, prompt/resume composition, and preset args.
  • Adds light/dark preset icons in packages/ui/src/assets/icons/preset-icons and exports them in index.ts.
  • Exposes fx in the desktop agent icon picker and settings search (keywords: “fx”, “vercel”).
  • Updates README, docs (apps/docs/.../agent-integration.mdx, .../terminal-presets.mdx), and marketing demo (apps/marketing/.../UniversalCompatibilityDemo.tsx with app-icons/fx.svg).

Rollout

  • Ensure fx is installed on PATH and the user is logged in (fx login).
  • No configuration changes or migrations required.

Summary by CodeRabbit

  • New Features

    • Added fx as a supported terminal coding agent.
    • Added fx to agent integration documentation and the compatibility demo.
    • Added light- and dark-mode fx icons throughout the interface.
    • Added support for prompting, interactive sessions, and resuming previous fx sessions.
    • Added fx to quick-add templates, agent icon options, and settings search.
  • Tests

    • Added coverage for fx registration and command behavior.