feat(harness-desktop): install and launch isolated agent CLIs - #845
Draft
ynadge wants to merge 1 commit into
Draft
feat(harness-desktop): install and launch isolated agent CLIs#845ynadge wants to merge 1 commit into
ynadge wants to merge 1 commit into
Conversation
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Primary change type
Problem and motivation
Managed npm CLIs can require an interpreter and entry script, but the adapters only accepted a binary. Desktop also needs an isolated installer with a deadline before it can safely adopt newer agent versions.
Summary and scope
Resolve Claude/Codex package entry points and launch them through the bundled runtime when needed. Preserve interpreter arguments and environment across version checks, new sessions, resume, and Claude headless tasks. Add exact-version installation with process-tree timeout/cancellation and Windows process-identity checks.
This is the runtime foundation for #843. Its packaged smoke check exercises a managed JavaScript CLI through a real PTY.
Related work
First of two stacked PRs. #843 adds startup version checks, verified selection, and fallback using these primitives. Diff: 572 additions + 16 deletions = 588 lines.
Validation
The unchanged permission test fails because this VM can list directories with mode
0111; the previous combined PR passed Node 20/22 CI. Temporary build/test files use a memory filesystem due to limited disk space. The subsequent macOS validation below exercised the real runtime and updater. Full GUI startup and Windows execution remain unverified.Real runtime validation — 2026-09-06
Used installed Sapiom 0.4.4's bundled Electron 33.4.11 / Node 20.18.3 and npm inside
app.asaron macOS to execute these actual installer/resolver/adapter primitives with #843's coordinator. Installed real@openai/codex@0.153.4into an isolated temporary prefix, verified its version, passed adapter doctor, and launched its authenticated model-list interface through the managed runtime and production adapter arguments. The account-visible catalog included GPT-6 Astra and GPT-5.6 models that were absent from fresh runs of the original 0.143.0. Repeating the coordinator reused the same installation. Packaged Linux runtime also installed real Codex 0.100.0 → 0.153.4 successfully.This adds real-package macOS/Linux evidence to the existing stub-based tests. It did not exercise a full GUI/PTY session, inference, a real Claude update, or Windows. All Mac test files and credential copies were temporary and removed; the original installed CLI remained unchanged. See #843 for the controlled old/new/old reproduction and its limits.
Tests and documentation
Retained installer failure/timeout/cancellation tests, Windows PID-reuse cases, adapter launch/resume tests, and the packaged managed-agent smoke check. Added adapter option documentation and a changeset.
Compatibility and release impact
createCodexAdapterexport; existing callers retain their defaults.Security
AI assistance
Checklist