Add interactive agent containers#104
Merged
Merged
Conversation
Operators sometimes need to enter the same isolated environment that autonomous agents use, while keeping that work on a swarm-owned branch until harvest explicitly merges it. Add interactive, chat, and shell launch modes backed by named agents[] profiles. Profiles with omitted count now behave like count: 0, so interactive-only profiles do not break numbered-agent startup. The entrypoint reuses the swarm image, setup, driver, model, effort, auth, context, signing, and Docker args, then checks out a distinct swarm/.../interactive-* branch and pushes it on exit. Teach harvest and the dashboard about those branches so human-guided commits can be merged deliberately, while dirty interactive work remains visible before harvest. Warn when a Claude Code profile requests OAuth without a host token, so operators can distinguish a missing launch-time secret from a Claude UI login problem.
84087e9 to
c6e78a3
Compare
Dashboard rows should describe configured agents before Docker containers exist, and the post-process row should use the same key that starts the action. Read numbered-agent display fields from config when containers are missing, skip interactive-only profiles with omitted count, and render the post-process row as P. Update docs and tests for the new labels.
c6e78a3 to
634b44c
Compare
Operators need a repeatable way to recreate the manual interactive swarm scenarios without hand-building a temporary repository each time. Add a generator under tests/ that creates a disposable repo, writes the headless, interactive, and post-process prompts, and records the manual command sequence in MANUAL_STEPS.md. Keep it out of the automated unit suite by avoiding the test_*.sh name pattern.
The dashboard should render configured rows from swarm.json when containers do not exist yet, even if Docker returns unusual output for a failed inspect call. Normalize container states before comparison and preserve empty config fields when expanding numbered-agent rows, so auth and tag values do not shift into the wrong columns.
Operators expect the dashboard stop key and launch.sh stop to stop the active post-process container too, because both surfaces describe the action as stopping the run. Stop the post-process container from both paths, hide the dashboard P shortcut while post-process is already running, and keep p focused on logs for the running post-process container.
The manual E2E post-process prompt summarized recent commits, so each post-process commit changed the next summary target and prevented idle exit. Add an explicit done-marker guard and remove the self-changing recent commit summary, so the post-process agent can make one commit and then reach the configured idle threshold.
The dashboard reads launch.sh state after start, so that summary needs to match the direct config path used before containers exist. Skip omitted-count and zero-count profiles when writing SWARM_MODEL_SUMMARY, so interactive-only profiles do not appear as nullx or 0x entries after launch.
Operators expect dashboard stop-all and launch.sh stop to stop every swarm-owned container for the current run, including manual sessions. Extend both paths to stop interactive containers discovered by name, while preserving the post-process stop behavior added earlier. Update tests so the fake Docker harness covers numbered, interactive, and post-process containers.
The manual fixture asks users to stage test-results from each interactive branch, so a shared setup.log makes the second harvest merge hit an add/add conflict. Write setup output to a branch- or agent-specific file and add a unit test that simulates two interactive branches being merged into the generated fixture.
The full API-backed matrix is useful on demand, but running it from CI spends time and live credentials on every scheduled integration run. Keep the lightweight integration smoke job in GitHub Actions and add a workflow-shape test so the full matrix stays manual via ./tests/test.sh --all.
Promote the interactive agent container work, dashboard polish, manual E2E coverage, and CI cleanup into the 0.21.0 changelog entry. Keep this release commit limited to VERSION and CHANGELOG.md so code and release metadata remain separate.
634b44c to
d2a8dd9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
swarm/.../interactive-*branches.0.21.0in a separate bump commit.Changes
launch.sh,lib/interactive.sh,Dockerfile: create interactive containers fromagents[]profiles with shared setup, auth, driver, context, signing, Docker args, and branch metadata.lib/drivers/*.sh: addagent_interactive_runhooks for Claude Code, Codex CLI, Gemini CLI, and fake driver.harvest.sh,dashboard.sh: merge and display interactive branches, including dirty/ unharvested state.README.md,USAGE.md,CHANGELOG.md,VERSION: document the workflow and release it as0.21.0.tests/*: cover profile selection, harvest of interactive refs, dashboard rows, and driver interface completeness.Test plan
./tests/test.sh --all./tests/test.sh --unitagents[]profile, run./launch.sh interactive <name> --shelland confirm it opens on aswarm/.../interactive-*branch../harvest.sh, and confirm the commit merges into the working branch.status/dashboard shows the interactive row as dirty or unharvested.