Skip to content

feat: run templates, watch-on-start, and dashboard links#8

Merged
hbrooks merged 4 commits into
mainfrom
feat/run-template-watch-urls
Jun 27, 2026
Merged

feat: run templates, watch-on-start, and dashboard links#8
hbrooks merged 4 commits into
mainfrom
feat/run-template-watch-urls

Conversation

@hbrooks

@hbrooks hbrooks commented Jun 27, 2026

Copy link
Copy Markdown
Member

What

Three CLI additions on top of the new backend template_id support:

  1. Dashboard linksagent run get and agent config get now print a clickable link to the run / agent in the web app. run start prints one too.
  2. run start --watch — start a run and immediately stream it (previously --watch only existed on run get). Also adds --interval for the polling fallback, mirroring run get.
  3. run start --template <slug> — start from a maintained run template (e.g. welcome-to-ellipsis), sending the backend's new template_id.
agent run start --config <id> --watch      # start + stream
agent run start --template welcome-to-ellipsis
agent run get <run-id>                      # prints a dashboard link
agent config get <config-id>               # prints a dashboard link

URL construction

  • Routes (mirrored from the backend's own link format in github_brand.py):
    • run: {app}/{account_login}/agents/runs/{run_id}
    • config: {app}/{account_login}/agents/{config_id}
  • account_login isn't on the run/config object, so it's resolved from GET /v1/me (parallelized with the get, so no added latency).
  • New resolveAppBase derives the web app base from the API base (api.app., beta-api.beta-app.) so beta users get beta-app links, with an ELLIPSIS_APP_BASE override. Replaces the previously-unused APP_BASE constant.

Output hygiene

  • config get: the link is written to stderr so the YAML/JSON on stdout stays clean for piping/redirecting; skipped entirely under -o json (machine mode).
  • run get/run start/watch: the link is skipped under --json.

Notes

  • run start gets a local "exactly one of --config / --config-file / --template" pre-check — clearer than the server's 400 (the server still enforces it).
  • Updated the README run-streaming section, which was stale (token-level streaming already ships behind --watch).

Test plan

  • bun run typecheck
  • bun run test — 62 passing (new urls.test.ts, resolveAppBase cases) ✓
  • bun run build + Bun compile smoke + --version
  • run start --help / run get --help show the new flags

🤖 Generated with Claude Code

hbrooks and others added 4 commits June 27, 2026 10:57
Wire the backend's new `template_id` and add clickable dashboard links.

- `run start`: add `--template <slug>` (maintained run templates, e.g.
  welcome-to-ellipsis), `--watch`/`--interval` to start and immediately stream
  a run, and a local "exactly one of --config/--config-file/--template" check
  for a clearer error than the server's 400.
- `run get` and `run start` now print a clickable dashboard link to the run;
  `config get` prints a link to the agent. Links are scoped by account login
  (resolved from /v1/me) and built from a new `resolveAppBase`, which derives
  the web app base from the API base (api -> app, beta-api -> beta-app) with an
  ELLIPSIS_APP_BASE override.
- `config get`: the link goes to stderr so the YAML/JSON on stdout stays clean
  for piping; skipped entirely in `-o json` machine mode.

Adds pure URL builders (urls.ts) with tests and resolveAppBase tests, and
updates the README (the run-streaming section was stale — streaming already
ships behind --watch). Removes the unused APP_BASE constant.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The poll cadence only applies to the rare REST fallback when live WebSocket
streaming is unavailable, so it isn't worth a flag. Remove `--interval` from
`run start`/`run get` and hardcode the fallback to 3s (FALLBACK_POLL_INTERVAL_SECONDS).
The internal watchRun(intervalSeconds) param stays for testability.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@hbrooks hbrooks merged commit abe6895 into main Jun 27, 2026
1 check passed
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.

1 participant