Commit graph

6 commits

Author SHA1 Message Date
b73b2ca7d8 Fix: launch Electron UI separately after A2A servers start
CS Core's start.js only starts A2A servers in electron mode — it does
NOT launch the Electron app itself (it says 'Electron app started
separately'). Switch to --ui-mode=headless for the background servers,
then explicitly launch electron from app/node_modules/.bin/electron.
Wait for registry /health before opening UI. Shut down servers when
Electron window is closed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 13:24:38 +01:00
3a7dfb6b1a Fix Electron not opening: run npm install on core + check DISPLAY
- core.sh: run npm install after cloning (downloads Electron binary
  into app/node_modules — required for the UI to launch)
- start.sh template: check if app/node_modules exists and run
  npm install on first start if missing
- start.sh template: warn if DISPLAY/WAYLAND_DISPLAY not set

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 13:13:15 +01:00
0b48d9bd21 Create ~/.anthropic before container start if it doesn't exist
Podman refuses to bind-mount a path that doesn't exist on the host.
On a fresh machine ~/.anthropic won't exist until claude is first run.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 13:10:15 +01:00
8a82d27dae Add update.sh to generated project scripts
Updates three things:
1. Context Studio Core — git pull on ~/.context-studio/core
2. Claude Code — npm install -g @anthropic-ai/claude-code in container
3. OS packages — apt-get update + upgrade in container

If container is not running, in-container steps are skipped with a warning.
Offers optional full image rebuild (--pull --no-cache) for a clean slate.
Warns that in-container updates are ephemeral without a rebuild.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 12:54:59 +01:00
6aa4c22d9e Fix race condition: wait for container ready before launching CS Core
podman run -d returns before the container process is running.
CS Core's claude-code check immediately calls our wrapper, which
found the container not yet running and exited 1 — causing the
"claude-code not found" error.

Add a poll loop (10 x 0.5s) that waits for State.Running=true
before setting PATH and launching CS Core.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 12:42:59 +01:00
dcc7a2aed7 Implement Option B: CS Core on host, agents inside container
- New lib/container.sh generates three files per project:
  - bin/claude: wrapper that routes every claude call into the
    agents container via `podman/docker exec --workdir $PWD`
  - start.sh: builds image if missing, starts detached container
    with project mounted at same absolute path as host, prepends
    bin/ to PATH, then launches CS Core on the host
  - stop.sh: stops and removes the agents container

- Container mounts project at identical host path so CS Core's
  working directory paths resolve correctly inside the container
- TTY detection in wrapper: uses -it when stdin is a terminal,
  -i otherwise (node-pty compatibility)
- Container stopped automatically when CS Core exits

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 12:29:38 +01:00