feat(shared): add Wally as a built-in terminal agent

SA
5d ago
+96-2

What & why

Adds Wally (RunAnywhere's CLI, https://www.runwally.com) as a built-in terminal agent. Part of #9442.

The agent runs wally opencode --cloud. That starts the user's own OpenCode with Wally's hosted open-weight models registered as an OpenAI-compatible provider, through OPENCODE_CONFIG_CONTENT for that process only. OpenCode's own flags pass through Wally untouched, so the prompt (--prompt), resume (--session), fork (--session {sessionId} --fork) and plan (run --agent plan) commands match the OpenCode preset. Wally execs opencode from PATH, so Paradev's OpenCode wrapper and plugin still load.

The model picker lists the hosted catalog from GET https://inference.runanywhere.ai/v1/models. Wally reads --model itself and takes the bare id. With no selection it uses its default (glm-5.3-flash).

Changes:

  • packages/shared/src/builtin-terminal-agents.ts: the wally manifest entry (not a default terminal preset)
  • packages/shared/src/agent-models.ts: Wally model catalog
  • packages/ui/src/assets/icons/preset-icons/: wally.svg and the icon map
  • Desktop icon picker and settings search keywords
  • README.md supported agents row, apps/docs agent list, supported-agents table, model picker line
  • Tests in agent-command.test.ts and agent-models.test.ts

No lifecycle-hook wrapper, same as Polygraph. The session binds as OpenCode, the same as a custom agent that runs a wrapped binary. So the docs table lists Wally as "No" for status and resume after restart. A restored terminal may come back as plain OpenCode without Wally's provider. If you want Wally sessions to keep their own identity, I can follow up with a wrapper, but that touches the hook identity path, so I kept it out of this PR.

How I tested it

  • bun run lint, bun run typecheck (42/42 tasks) pass.
  • bun test in packages/shared for agent-command.test.ts and agent-models.test.ts: 130 pass. Host-service src/trpc/router/agents, src/terminal-agents and workspace-creation/utils: all pass.
  • Printed the commands host-service builds for this preset: wally opencode --cloud --model kimi-k3 --prompt '...', ... --model kimi-k3 --session <id>, ... --session <id> --fork. Checked with a stub opencode that Wally consumes --cloud --model and passes the rest through.
  • Live with OpenCode 1.18.35 and wally 0.8.13: plan-mode headless turn, a turn that called the read tool, default model (glm-5.3-flash), --model kimi-k3, resume by --session <id>, and --fork (made a new session).
  • Not run: the dev desktop app, so no screenshot. Some unrelated suites fail on this machine with or without this change: a date-format test in rrule.test.ts (ICU prints "at"), and git or file-watcher tests in host-service that time out under load.

Checklist

  • PR title follows conventional commits (type(scope): subject)
  • bun run lint and bun run typecheck pass (CI fails on lint warnings too)
  • "Allow edits from maintainers" is checked on fork PRs
  • I have signed the CLA (the bot asks on your first PR)

Disclosure: I work on Wally at RunAnywhere. Prepared with AI assistance (Claude Code) and reviewed.

🤖 Generated with Claude Code


Summary by cubic

Adds Wally as a built-in terminal agent. The agent runs wally opencode --cloud, launching the user's own OpenCode with Wally's hosted open-weight models as a provider, so prompt, resume, fork, and plan commands use OpenCode's own flags, and Paradev's OpenCode wrapper and plugin still load.

New Features

  • Registers the wally agent preset and a model picker listing Wally's hosted catalog, passing bare model ids to Wally's --model flag.
  • Adds the Wally icon to the icon picker, settings search keywords, README, and docs.

Migration

  • Requires wally and opencode on PATH and a completed wally account login.
  • Wally sessions bind as OpenCode, so docs list status and resume after restart as "No", same as Polygraph.

Summary by CodeRabbit

  • New Features
    • Added Wally as a supported agent, with commands for starting, prompting, resuming, and forking sessions.
    • Added hosted model options for Wally and made Wally searchable in agent settings and terminal quick-add.
    • Added Wally’s icon and listed it in the supported-agent documentation, including setup requirements and feature support.