Skip to content

Add interactive agent containers#104

Merged
moodmosaic merged 11 commits into
masterfrom
feature/interactive-agent-containers
May 26, 2026
Merged

Add interactive agent containers#104
moodmosaic merged 11 commits into
masterfrom
feature/interactive-agent-containers

Conversation

@moodmosaic
Copy link
Copy Markdown
Member

@moodmosaic moodmosaic commented May 26, 2026

Summary

  • Add interactive, chat, and shell launch modes for named agent profiles.
  • Run human-guided containers on distinct swarm/.../interactive-* branches.
  • Show interactive containers and dirty/unharvested state in status/dashboard.
  • Release the feature as 0.21.0 in a separate bump commit.

Changes

  • launch.sh, lib/interactive.sh, Dockerfile: create interactive containers from agents[] profiles with shared setup, auth, driver, context, signing, Docker args, and branch metadata.
  • lib/drivers/*.sh: add agent_interactive_run hooks 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 as 0.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 --unit
  • Manual: with a named agents[] profile, run ./launch.sh interactive <name> --shell and confirm it opens on a swarm/.../interactive-* branch.
  • Manual: create a commit in that shell, exit, run ./harvest.sh, and confirm the commit merges into the working branch.
  • Manual: leave an uncommitted edit in an interactive container and confirm status/dashboard shows the interactive row as dirty or unharvested.

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.
@moodmosaic moodmosaic force-pushed the feature/interactive-agent-containers branch from 84087e9 to c6e78a3 Compare May 26, 2026 19:46
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.
@moodmosaic moodmosaic force-pushed the feature/interactive-agent-containers branch from c6e78a3 to 634b44c Compare May 26, 2026 20:14
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.
@moodmosaic moodmosaic force-pushed the feature/interactive-agent-containers branch from 634b44c to d2a8dd9 Compare May 26, 2026 21:11
@moodmosaic moodmosaic merged commit 924dc1d into master May 26, 2026
5 checks passed
@moodmosaic moodmosaic deleted the feature/interactive-agent-containers branch May 26, 2026 21:12
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