diff --git a/README.md b/README.md index 626880e..a100905 100644 --- a/README.md +++ b/README.md @@ -11,9 +11,8 @@ npm ci npx playwright install chromium npm run build -SESSION_ID=$(node dist/cli/main.js create --json --name demo | jq -r '.data.sessionId') -node dist/cli/main.js type "$SESSION_ID" 'echo hello from agent-terminal' -node dist/cli/main.js send-keys "$SESSION_ID" Enter +SESSION_ID=$(node dist/cli/main.js create --json --name demo | jq -r '.result.sessionId') +node dist/cli/main.js run "$SESSION_ID" 'echo hello from agent-terminal' node dist/cli/main.js inspect "$SESSION_ID" --json node dist/cli/main.js destroy "$SESSION_ID" ``` @@ -26,6 +25,43 @@ node dist/cli/main.js destroy "$SESSION_ID" - Recording export to asciicast (`.cast`) or WebM for artifact bundles. - Failure recovery via reconciliation, stale-session cleanup, and retained manifests/artifacts. +## 0.1.0 release focus + +`agent-terminal` `0.1.0` is the first release aimed at reliable, isolated, reviewable TUI automation. +Week 9 closes the release-readiness bar around the new `run` command, isolated-environment renderer reliability, and isolation-aware `doctor` diagnostics. +For the explicit release contract, see [`RELEASE.md`](./RELEASE.md). +Reviewer-facing proof bundles live under `dogfood/`, including `dogfood/20260326-week9-release-readiness/`, `dogfood/run-command/`, and `dogfood/20260325-week8-contract-locks/`. + +## TUI Workflow + +For setup-heavy TUI automation, prefer an isolated home plus the higher-level `run` primitive: + +```bash +AGENT_HOME="$(mktemp -d)" +agent-terminal --home "$AGENT_HOME" doctor --json +SESSION_ID=$(agent-terminal --home "$AGENT_HOME" create --json -- /bin/bash | jq -r '.result.sessionId') +agent-terminal --home "$AGENT_HOME" run "$SESSION_ID" 'npm install' +agent-terminal --home "$AGENT_HOME" wait "$SESSION_ID" --text 'ready' +agent-terminal --home "$AGENT_HOME" screenshot "$SESSION_ID" +agent-terminal --home "$AGENT_HOME" record export "$SESSION_ID" --format webm +``` + +Recommended sequence: + +1. Create an isolated session home with `create`. +2. Use `run` for shell setup and multiline bootstrap work. +3. Use `wait` for render-visible readiness conditions. +4. Capture screenshots for point-in-time review. +5. Export WebM recordings when reviewers need motion proof. + +## Isolation + +- `--home ` stores manifests, sockets, event logs, and artifacts under an isolated agent-terminal home. Pass the same `--home` value to each command in a workflow. +- `doctor --json` reports whether `agent-terminal` is using the default location or an isolated home, including a `home_isolation` check for whether `--home` produced an isolated environment. +- It also exposes `browser_cache_accessible`, which verifies the Playwright browser cache is discoverable for renderer operations before screenshot/export flows. +- Renderer boot now carries Playwright browser-cache resolution into isolated-home workflows automatically when Chromium is installed in the normal cache or exposed through `PLAYWRIGHT_BROWSERS_PATH`. +- In a new machine, CI job, or container, run `agent-terminal --home doctor --json` before starting screenshot or recording workflows. + ## Platform Support - **Linux** — Tier-1. CI-tested on `ubuntu-latest`. Primary development and testing platform. @@ -50,6 +86,7 @@ node dist/cli/main.js destroy "$SESSION_ID" - `gc`: remove stale or old sessions. - `type [text]`: type text into a session. - `paste [text]`: paste text into a session. +- `run [command]`: run a command inside a session with optional completion detection. - `mark