@@ -341,3 +341,65 @@ test-bounded cmd='pnpm test':
341341
342342test-risky-probe * tests :
343343 ./ .agent/ scripts/ run-risky-test-probe.sh " $@"
344+
345+ # --- Dev container (docker/dev) ---
346+ #
347+ # agentOS runs Linux-only, so on macOS the engine, sidecar, and VMs live in a
348+ # container while the working tree stays on the host. The repo is bind-mounted
349+ # at /build; node_modules, cargo target, and the toolchain build trees are
350+ # container-owned volumes, so host edits are visible instantly without dragging
351+ # darwin-native binaries into Linux.
352+ #
353+ # First run: `just dev-up && just dev-bootstrap` (the bootstrap is slow — it
354+ # builds the WASM command set and the sidecar from source). After that,
355+ # `just dev-terminal-example` and edit TypeScript with hot reload.
356+
357+ dev-compose := " docker compose -f docker/dev/compose.yaml"
358+
359+ # Build the image and start the container.
360+ dev-up :
361+ {{ dev-compose}} up -d --build
362+
363+ dev-down :
364+ {{ dev-compose}} down
365+
366+ # Drop into a shell inside the dev container.
367+ dev-shell :
368+ {{ dev-compose}} exec dev bash
369+
370+ # Run any command inside the dev container: `just dev-exec 'cargo check --workspace'`
371+ dev-exec cmd :
372+ {{ dev-compose}} exec dev bash -lc " {{ cmd}} "
373+
374+ # One-time (slow) build of everything the engine needs from source.
375+ dev-bootstrap :
376+ {{ dev-compose}} exec dev bash -lc ' \
377+ set -euo pipefail; \
378+ echo "==> pnpm install"; \
379+ pnpm install --frozen-lockfile; \
380+ echo "==> WASM command set (long)"; \
381+ just toolchain-build; \
382+ just toolchain-copy-commands; \
383+ echo "==> software packages"; \
384+ pnpm --filter "@agentos-software/*" \
385+ --filter "!@agentos-software/codex" \
386+ --filter "!@agentos-software/codex-cli" \
387+ --filter "!@agentos-software/everything" build; \
388+ echo "==> agentos-sidecar (debug)"; \
389+ cargo build -p agentos-sidecar; \
390+ echo "==> workspace TypeScript + inspector tab bundle"; \
391+ pnpm --filter @rivet-dev/agentos-core --filter @rivet-dev/agentos-runtime-core build; \
392+ pnpm --filter @rivet-dev/agentos build; \
393+ echo "==> done"'
394+
395+ # Serve examples/browser-terminal: engine on :6420, Vite on :5173.
396+ dev-terminal-example :
397+ {{ dev-compose}} exec dev bash -lc ' \
398+ cd examples/browser-terminal && \
399+ pnpm concurrently -k -n server,web -c blue,magenta \
400+ "tsx server.ts" \
401+ "vite --host 0.0.0.0"'
402+
403+ # Rebuild the inspector custom-tab bundle (run after editing src/inspector-tabs).
404+ dev-build-tabs :
405+ {{ dev-compose}} exec dev bash -lc ' pnpm --filter @rivet-dev/agentos build:tabs'
0 commit comments