Repository navigation
feat(jev): support windows workflows and grouped steps - #520
Open
yichen11818 wants to merge 5 commits into
Open
yichen11818 wants to merge 5 commits into
yichen11818 wants to merge 5 commits into
Conversation
On Windows the scripts could not start agent-desktop at all: npm installs a .cmd and a .ps1 shim, and execFileSync refuses to spawn either without a shell. The default binary lookup now finds the native executable the npm package ships next to the shim on PATH. The paste fallback sent cmd+v on every platform. It now sends ctrl+v outside macOS. Electron windows lost their controls: at the CLI's default depth of 10 a canvas app returned 56 elements and none of its toolbar, against 251 at depth 20, and its reads could outlast the 3 s deadline. JEV_SNAPSHOT_MAX_DEPTH and JEV_SNAPSHOT_TIMEOUT_MS pass --max-depth and --timeout-ms to every read, validated, and change nothing when unset. The skeleton first look keeps the CLI depth. A minimized window answered with a timeout or an empty tree. When every window of the app is minimized, the error now says so and names the restore command.
run.mjs and act.mjs ask Jev one step at a time, so every step costs a screen read, a request and a process start, and the caller waits between them. Measured on a browser page with 120 candidates, one question took about 0.5 s and five questions in one request took the same. flow.mjs reads the screen once, asks for the target of every pending step in one request, and runs the leading steps Jev is sure of as one agent-desktop batch. The first unsure step ends the batch and the next round asks again on the new screen. After an action the screen is re-read until it changes; when Jev then finds nothing on an unchanged screen the run stops with no_effect instead of waiting. Text is written with set-value and no separate focus, because focus on Windows moves the foreground and headless delivery refuses it, which had stopped the key press after it.
Contributor
|
@yichen11818 is attempting to deploy a commit to the Vercel Labs Team on Vercel. A member of the Team first needs to authorize it. |
17 of 21 tasks
Stop on unsafe delivery after any partial batch success, read optional Windows popovers, and run the JEv suite on all three platforms.
yichen11818
marked this pull request as ready for review
November 5, 2026 02:34
Comment on lines
+109
to
+113
| export const toEntries = (step, node, { app, windowId }) => { | ||
| if (step.press) return [{ command: "press", args: { combo: step.press, app, ...(windowId ? { window_id: windowId } : {}) } }]; | ||
| const hasText = step.text !== undefined; | ||
| const { verb } = reconcile(hasText ? "set-value" : "click", node, hasText); | ||
| return [{ command: verb, args: (ARGS[verb] ?? ((ref) => ({ ref_id: ref })))(node.ref_id, step.text) }]; |
Contributor
Comment on lines
+19
to
+21
| if (!existsSync(join(dir, "agent-desktop.cmd"))) continue; | ||
| const exe = join(dir, "node_modules", "agent-desktop", "bin", `agent-desktop-win32-${arch}.exe`); | ||
| if (existsSync(exe)) return exe; |
Contributor
This branch has not been deployed
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.
Summary
JEv cannot launch npm's Windows command shims with Node's
execFileSync. Deep Electron controls also need configurable snapshot depth and timeouts. This PR resolves the packaged native executable, shares bounded observation options between the JEv entry points, and addsflow.mjsfor callers that already know several steps to perform.Each flow round submits the pending target questions together, batches the leading confident steps, and reads again when a target is not yet available. Completed steps are never replayed. An error stops the flow unless it is a stale ref explicitly marked safe to retry and not delivered, including when earlier batch entries succeeded.
Windows observation optionally reads the
popoversurface and falls back to the window when that surface is unavailable. #521 implements the Windows surface itself. This PR can merge independently: no Rust adapter changes are included. The two PRs separate JEv workflow behavior from native Windows surface resolution.Related issues
Companion adapter PR: #521. No issue is closed by this PR.
Type of change
feat:grouped step runnerfix:Windows executable lookup, platform paste shortcut, bounded screen reads, and partial-batch retry handlingtest:binary lookup, flow planning, partial-batch failures, and optional popover readsci:run all JEv test files on Linux, Windows, and macOSdocs:update the JEv skillHow tested
Run on Windows with Node 22.20.0:
node --test scripts/jev/*.test.mjs: all 4 discovered test files passedgo run github.com/rhysd/actionlint/cmd/actionlint@v1.7.11 -shellcheck= .github/workflows/ci.ymlgit diff --checkagent-desktopmenunode is ignored instead of being treated as an open application menuThe integration tests use a simulated CLI and model responses. They do not send screen content to an external service. Rust gates are not reported as JEv coverage because this branch does not change Rust sources.
Checklist
action_requiredand the Vercel preview requires Vercel Labs authorization.Kept as a draft while the upstream checks and remaining validation are pending. The Vercel preview check requests authorization from a Vercel Labs team member.