mirror of
https://github.com/BloopAI/vibe-kanban.git
synced 2026-11-15 21:50:33 +00:00
* feat(ui): restore the Sign in button for agents that need setup
The legacy cleanup (139b18158, #2790) removed NextActionCard, the only
caller of runAgentSetup, so needs_setup was computed but never shown.
The next-action row now reaches the conversation list only when
needs_setup is set, and renders a Sign in button for agents with the
SETUP_HELPER capability. It calls runAgentSetup with the failed turn's
own executor profile (carried as NextAction.executor_profile_id), so a
variant signs in with its own config.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cursor): detect the sign-in error from the renamed agent CLI
Cursor's CLI now says "run 'agent login'" instead of
"run 'cursor-agent login'", so the exact-message match missed it and the
error was tagged Other, with no Sign in button. Match on "Authentication
required" and "login" instead.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(acp): treat -32000 from the agent as "setup required"
A signed-out ACP agent rejects session/new with -32000 (AuthRequired),
and an expired token does the same on session/prompt. The harness
flattened every error into a string, so the user saw a generic error.
The run's exit error is now logged as AcpEvent::AuthRequired when its
code is -32000, and normalize_logs turns that into a SetupRequired error
entry, which is what offers the Sign in button. Other errors are
unchanged. Session history skips the new event, like Error.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(server): share the agent setup runner between Codex and Cursor
run_codex_setup and run_cursor_setup repeated the same steps: chain the
workspace's latest coding-agent action after the setup action, ensure
the container, find or create a session, and start it as a setup
script. That's now start_agent_setup in agent_setup.rs, and each agent
keeps only its own setup action. No change in behaviour; this is so the
Copilot sign-in doesn't add a third copy.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(copilot): sign in from the Sign in button
Copilot now has the SetupHelper capability, and the agent setup API has
a Copilot branch. It runs `<copilot base> login --device-code` as a
setup script, then the failed prompt again.
- Copilot::login_command() takes the package from base_command(), so it
matches the run (cached registry, no network) and honours
base_command_override. It drops the run args (--acp) and ignores
additional_params, which are run flags login would reject.
- --device-code prints a code and link in the conversation, needs no
browser on the backend's machine, and works without a TTY.
- The script carries no env: it's saved in the database and shown in
the output, and profile env can hold tokens. Copilot's sign-in doesn't
depend on env.
- On Unix the program and args are shell-quoted, so paths with spaces
work.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(ui): show the device sign-in code in the conversation
A login script waiting for a device code printed "visit <url> and enter
code <code>" only to its logs, so the conversation showed just
"Tool Install Script - Running".
While a script runs, its output is now checked for a link and a code on
the same line (parseDeviceCode, not agent-specific). If both are there,
a card under the script shows the code and a "Copy code and open <host>"
button. The button copies the code in the user's browser, then opens the
page, and only then says the code was copied. A CLI's own copy lands on
the backend's machine, which isn't the user's when it runs remotely.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(copilot): don't open a browser tab from the login script
In device-code mode Copilot opens the sign-in page on the backend's
machine, which took the user away before they saw the code card. The
login script now runs with BROWSER=true (Copilot honours BROWSER, and
`true` does nothing), so the user stays in the conversation and opens
the page from the card. Unix only; Windows keeps Copilot's default.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(acp): say "Not signed in" in the model selector
Option discovery opens a throwaway session with session/new, so a
signed-out agent fails it with -32000 too. The model selector then
showed the agent's message plus the last stderr line. It now shows
"Not signed in. Start a task and click Sign in." instead. The text is
agent-agnostic, and the failure is still not cached. A Unix test runs
run_live against a fake sh agent that rejects session/new with -32000.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(acp): don't point registry agents at a Sign in button they lack
Registry agents share the discovery code but don't get SetupHelper, so
"Start a task and click Sign in." sent their users to a button that never
appears. The model selector now says "Not signed in to this agent."
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(ui): show the device-code card only for Tool Install Scripts
parseDeviceCode ran on every running script, including the user's own
setup and cleanup scripts, so a line with a link and something like a
request ID or ticket key (ABCD-1234) could show "Enter this code to sign
in" with a button opening that link. Only the app's own install/login
scripts run as Tool Install Script, so the card now needs that too. The
parser stays generic.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(acp): show each model once
Copilot sends `auto` twice: as its own entry and again in the model list.
We kept both, so the selector showed Auto twice. Keep the first choice for
each value, and drop repeats from lists already saved in the disk cache.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(acp): refresh the model selector after signing in
Discovery runs once per stream connection, and a failure is kept for 30s,
so after signing in the selector kept showing "Not signed in" and the old
list until the page was reloaded.
- When a run opens a session, forget the agent's failed discovery: the
agent works now. Copilot and registry agents pass their discovery key.
- When the dropdown opens while it shows an error, reconnect the stream
so discovery runs again.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>