Repository navigation
feat(harness-ops): add the control-claude-code driver on a pinned @microsoft/tui-test - #9605
Conversation
…crosoft/tui-test Driver CLI (launch, wait-for, type, screenshot, record start|stop, stop, doctor) for Claude Code TUI capture. launch runs claude --restricted --strict-mcp-config --plugin-dir <dir> with auth and provider variables cleared, no --bare, and session persistence forced. The engine installs on first use from the committed lockfile (npm ci --ignore-scripts, then npm audit signatures once). Adds the weekly Dependabot npm entry and an optional Noto Sans Symbols 2 font prerequisite. Refs: #9591 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0177ybXguBnnGV4UTksrdzd9
`type hello Enter` dropped "Enter" silently, and a non-numeric --ttl made the holder's timer fire at once. Both are usage errors now, raised before any install. Refs: #9591 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0177ybXguBnnGV4UTksrdzd9
|
PR body contract — issue linkage This PR body conforms to the issue-linkage contract. Nothing to do. |
…iver install Point the launch-variable record at the Variables section of the Environment variables page. A repaired install (engine present, no signatures marker) now runs the same load probe as a first install before it is marked, failing closed with the repair line. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0177ybXguBnnGV4UTksrdzd9
0.1.1 was published on 2026-10-23, inside the dependency cooldown; 0.1.0 (2026-10-03) carries every API the driver calls. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0177ybXguBnnGV4UTksrdzd9
…ansport and session lifetime - The load probe runs one process in the engine, which loads the native binding; a binding lost after install now fails launch with exit 4 and the repair line instead of a 30 s timeout. - An install dir left without an engine is replaced, and partial installs of dead processes are reaped. - --ttl is capped at the setTimeout ceiling; --timeout must be a whole number of milliseconds. - Sockets live in $XDG_RUNTIME_DIR/ccd, else ~/.cache/ccd; a socket dir or explicit --deps-dir others can write exits 5, not as a broken install. - Windows pipe names carry a random suffix kept in a user-private file, and the Windows repair line enters the install dir instead of passing it to npm.cmd. - ANTHROPIC_BASE_URL and ANTHROPIC_CUSTOM_HEADERS are cleared, so the subscription login never goes to a gateway. - The holder exits, freeing the session, when Claude Code exits. - doctor runs the font probe declared in prerequisites.json. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0177ybXguBnnGV4UTksrdzd9
…nd dependencies adoption table Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0177ybXguBnnGV4UTksrdzd9
…test holders' lifetime Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0177ybXguBnnGV4UTksrdzd9
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
claude-security-review reviewed Incremental security review of The change moves the This change has no security-relevant surface. No manifest items were hit. The PR context contained no embedded instructions. No security issues found. critical-findings: 0 |
|
claude-review reviewed Incremental review of The only change moves the No findings. No hold class applies: the change touches no manifest, trusted-actors, |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: da3d72d384
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
… its holder Two concurrent launches of one session both passed the ping check and each started a holder; the second unlinked the first's live socket, so both reported success and stop reached only one. Launch now creates <session>.lock exclusively in the private runtime directory before the ping, install, pipe name and log, recording the holder pid; a lock whose process is gone is reclaimed. The holder unlinks a leftover socket only when nothing answers on it, and releases the lock after removing its endpoint, before replying to stop. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0177ybXguBnnGV4UTksrdzd9
…try a lock released mid-check A holder refused by the socket guard no longer leaves claude running in its terminal, and a lock that disappears between the exclusive create and the owner read is retried rather than reported as a running session. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0177ybXguBnnGV4UTksrdzd9
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0177ybXguBnnGV4UTksrdzd9
…de-plugins (#875) Refs: melodic-software/claude-code-plugins#9591 ## Summary [claude-code-plugins#9605](melodic-software/claude-code-plugins#9605) added the control-claude-code driver with an exactly pinned `@microsoft/tui-test` and a weekly Dependabot npm entry for `/plugins/harness-ops/skills/control-claude-code/driver` (`.github/dependabot.yml:148` there). The engine loads a per-platform native binary into the process that drives a Claude Code session on the user's saved subscription login, and today a 0.1.x patch bump would auto-merge on `ci-status` alone. The owner approved making it review-only on 2026-10-24. ## Fix Adds one `autoMerge.reviewOnly` entry to `components/dependabot-policy/policy.json`, shaped like the existing claude-code-plugins entries: repository `melodic-software/claude-code-plugins`, ecosystem `npm`, directory `/plugins/harness-ops/skills/control-claude-code/driver`, dependency `@microsoft/tui-test`, reviewed `2026-10-24`, control `docs/conventions/pr-pipeline/README.md#review-only-dependencies`. The basis cites `driver.mjs:245` (`npm ci` of the lockfile), `:420-422` (engine and native binary loaded, claude started in it), `:87` (API credential variables cleared) and `package-lock.json:22-30` (native per-platform optional dependencies), all at claude-code-plugins `main` 2f6b81e. No changelog or version file: the earlier review-only additions (#794, #808) changed only `policy.json`. ## Verification - `node --test components/dependabot-policy/dependabot-policy.test.mjs components/dependabot-policy/automerge-lockstep.test.mjs`: 51 pass, 0 fail. - `node components/dependabot-policy/dependabot-policy.mjs --root .` (validates `policy.json` against `policy.schema.json`): `Dependabot policy passed.` - `node components/dependabot-policy/automerge-lockstep.mjs`: all three approved reusable SHAs match. - Pre-commit hooks (biome, gitleaks, typos, editorconfig) passed. ## Related - melodic-software/claude-code-plugins#9591 - melodic-software/claude-code-plugins#9605 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_0177ybXguBnnGV4UTksrdzd9 --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
Closes #9591
Refs: #9507
Summary
Adds the
control-claude-codedriver CLI to harness-ops on an exactly pinned@microsoft/tui-test(0.1.0), so Claude Code's TUI can be driven for screenshots and video on the signed-in subscription. The control skill hub and features follow in #9592.Fix
driver.mjsverbslaunch,wait-for,type,screenshot,record start|stop,stop,doctor; first-usenpm ci --ignore-scriptsinto the plugin data dir keyed by the lockfile hash,npm audit signaturesand a load probe that forces the native binding, failing closed with a repair line.launchrunsclaude --restricted --strict-mcp-config --plugin-dir <pluginDir>withANTHROPIC_API_KEY,ANTHROPIC_AUTH_TOKEN,ANTHROPIC_BASE_URL,ANTHROPIC_CUSTOM_HEADERSand the cloud-provider switches unset, no--bare.$XDG_RUNTIME_DIR), random Windows pipe suffix, holder exits with its child, usage bounds on--ttland--timeout,doctorreads the font probe fromprerequisites.json, adriver.test.shdiscovery wrapper so CI runs the suite.Why
Nothing drives Claude Code's TUI for screenshots and video. The attended spike chose
@microsoft/tui-testover VHS, which drew Claude Code's glyphs as boxes and downloads an unverified browser. This PR ships the driver CLI and its prerequisites; thecontrol-claude-codehub and features follow in #9592.What changed
plugins/harness-ops/skills/control-claude-code/driver/:driver.mjswith verbslaunch,wait-for,type,screenshot,record start|stop,stop,doctor, on@microsoft/tui-testpinned exactly (0.1.0) in its own lockfile. First use installs withnpm ci --ignore-scriptsinto the plugin data dir keyed by the lockfile hash, then runsnpm audit signaturesonce and fails closed.launchrunsclaude --restricted --strict-mcp-config --plugin-dir <pluginDir>withANTHROPIC_API_KEY,ANTHROPIC_AUTH_TOKENand the cloud-provider switches unset, no--bare, andCLAUDE_CODE_FORCE_SESSION_PERSISTENCE=1, so the child uses the signed-in subscription.system-libprerequisite probingfc-listfor Noto Sans Symbols 2 (Claude Code's U+23F5 status glyph).Scope
Verification
node --test plugins/harness-ops/skills/control-claude-code/driver/driver.test.mjswith nonode_modules: 22 pass, 0 fail.jq -r '.packages["node_modules/@microsoft/tui-test"].version' .../package-lock.jsonprints0.1.0, equal to thepackage.jsonpin;grep -n 'directory: /plugins/harness-ops/skills/control-claude-code/driver' .github/dependabot.ymlmatches line 148.claudeon PATH with tui-test installed to scratch: every verb worked, a PNG and a GIF were written, and the child saw the three flags, the key unset and persistence on.check-declared-prerequisites.mjs,check-changelog-fragments.sh --check,validate-plugin-contracts.mjsandclaude plugin validate plugins/harness-opspass.Related
🤖 Generated with Claude Code
https://claude.ai/code/session_0177ybXguBnnGV4UTksrdzd9