refactor(agent): use agent-neutral runtime names
Assisted-by: Codex
This commit is contained in:
@@ -154,7 +154,7 @@ Today's flow:
|
||||
```
|
||||
./cli.py start agent
|
||||
└─ with backend.launch(plan) as bottle: ← bottle alive while inside `with`
|
||||
bottle.exec_claude([...], tty=True) ← blocks until claude exits
|
||||
bottle.exec_agent([...], tty=True) ← blocks until claude exits
|
||||
# context exits → compose down → state cleanup
|
||||
```
|
||||
|
||||
@@ -171,7 +171,7 @@ The proposed dashboard-driven flow:
|
||||
|
||||
# operator interacts via:
|
||||
curses.endwin()
|
||||
bottle.exec_claude([...], tty=True) ← blocks; returns on Ctrl-D
|
||||
bottle.exec_agent([...], tty=True) ← blocks; returns on Ctrl-D
|
||||
stdscr.refresh()
|
||||
# bottle is STILL ALIVE — only the claude process exited
|
||||
|
||||
@@ -265,7 +265,7 @@ if modal proves fiddly.
|
||||
Same handoff pattern the new-agent flow uses. For an agent the
|
||||
dashboard started this session, the dashboard holds the
|
||||
`DockerBottle` handle in its `bottles` dict and calls
|
||||
`bottle.exec_claude(...)`. For an agent it discovered via
|
||||
`bottle.exec_agent(...)`. For an agent it discovered via
|
||||
`list_active_slugs` (previous-dashboard or external start),
|
||||
the dashboard synthesizes a one-shot `DockerBottle` from the
|
||||
slug — container name is `bot-bottle-<slug>`, no prompt
|
||||
@@ -304,17 +304,17 @@ acting surface, not a lifetime owner.
|
||||
|
||||
Sized for one PR each.
|
||||
|
||||
1. **Refactor `_launch_bottle` so the launch + exec_claude
|
||||
1. **Refactor `_launch_bottle` so the launch + exec_agent
|
||||
pieces are separable.** Today's `cli/start.py` runs both
|
||||
inside one function. Extract `prepare_with_preflight(spec,
|
||||
*, render_preflight, prompt_yes)` and `attach_claude(bottle,
|
||||
*, render_preflight, prompt_yes)` and `attach_agent(bottle,
|
||||
*, remote_control)`. The CLI's existing one-shot use binds
|
||||
them as before; the dashboard binds them with curses-aware
|
||||
render + prompt callables. No behavior change.
|
||||
2. **Agent picker modal + new-agent flow.** New key `n` opens
|
||||
the picker; `prepare_with_preflight` runs against the
|
||||
selected agent; on Y, `backend.launch(plan)` enters the
|
||||
dashboard's ExitStack; handoff invokes `attach_claude`.
|
||||
dashboard's ExitStack; handoff invokes `attach_agent`.
|
||||
3. **Re-attach via Enter on owned agents-pane row.** Looks up
|
||||
the slug in the dashboard's `bottles` map; if present →
|
||||
handoff; else → status-line hint pointing at `./cli.py
|
||||
@@ -390,7 +390,7 @@ Sized for one PR each.
|
||||
- PRD 0019 — active-agents pane + selection model (the
|
||||
agents-pane row the re-attach + stop verbs hook into)
|
||||
- `docs/research/claude-code-pane-in-dashboard.md` — option 1
|
||||
(handoff) is what `attach_claude` implements here; options 2
|
||||
(handoff) is what `attach_agent` implements here; options 2
|
||||
/ 3 are out of scope for this PRD
|
||||
- `bot_bottle/cli/start.py:_launch_bottle` — the function
|
||||
chunk 1 extracts the prepare + attach pieces out of
|
||||
|
||||
Reference in New Issue
Block a user