Repository navigation
refactor(linux): move Linux desktop automation into the managed platform plugin - #4872
Conversation
Size Report
Startup median (7 runs, lower is better):
|
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 2 new findings on a2965fc. The verdict and the full list are in the summary comment.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 2 findings moved to a new line on 87b50ae. The verdict and the full list are in the summary comment.
This comment has been minimized.
This comment has been minimized.
|
The change at 7711c47 is ready. All 38 checks pass on that commit, including the hosted Linux run that installed the packed plugin and ran the replay-linux and linux-command-evidence gates, and there are no conflicts. Nothing else must happen before merge. Not blocking, and each can be taken or left: the doctor row in doctor.ts:49 should check the same any-of tool tables the provider uses, so a host with xsel and import is not warned; the PR body should say the base had no Linux toolchain row, because the installed-plugin row is new; the request-scoped Linux provider in linux-tool-provider.ts:56 has no production producer, so a follow-up could drive provider scenarios through a fake PlatformHost and keep the provider plugin-internal; the command lookup in command-runner.ts:88 could become one PlatformHost primitive built on host-kit whichCmd; the detached-exit shape is declared three times; launchDetached could be required, which removes a refusal the daemon never reaches; atspi-bridge.ts still reads process.platform and the filesystem directly, which the PR body says the plugin does not do; commands.md lists React Native helpers as unavailable although dismiss-overlay runs and answers detected:false; the package homepage anchor should be #linux-command-boundary; the provider is resolved twice in runtime.ts and surface-snapshot.ts; and the PR body could add core tarball packed and unpacked byte deltas for #4676. The two open inline threads on the optional scoped provider (#4872 (comment)) and the doctor tool list (#4872 (comment)) still apply, and both are non-blocking. Not verified here: any local check, the Wayland route (ydotool, wl-clipboard, grim), and install from the registry, because the package is private (#4866). Only the X11 hosted lane and the local-tarball install ran. |
|
Thanks. The non-blocking items and both open inline threads (r4649955241, r4649955244) are filed as #4878 (milestone 0.22); the PR keeps head 7711c47 so its green checks and review stay valid. The PR body now names the remaining direct |
7711c47 to
1c53cbd
Compare
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 2 new findings on 1c53cbd. The verdict and the full list are in the summary comment.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
This PR is ready. The code at 9e03d03 fixes the relative-target regression from the earlier review (#4872 (comment)), and the doctor row now reads the provider's tool tables. All 33 reported checks pass, and no conflicts are known. Not blocking: on Wayland the doctor clipboard slot now needs only Of the earlier inline threads, the optional-part Not verified here: a live Linux run. The unit tests through |
…orm plugin The packed core no longer answers for the Linux family. `@agent-device/linux` is a managed optional platform plugin like the web, Vega and HarmonyOS plugins: the composition resolves it through the same one-shot module selection, and a request that names `--platform linux` without it answers `plugin-not-installed` with its install command, while unfiltered discovery and doctor skip the family. The family's mechanics move with it. AT-SPI2 discovery and snapshotting, the X11 and Wayland input, clipboard and screenshot primitives, app lifecycle, the toolchain probe and the Python AT-SPI helper all live in the package now. Every command goes through the `PlatformHost` the composition hands to `setup`, so the plugin reads no process globals and starts no process on its own. Core keeps only the canonical platform vocabulary and the request-provider gate for the family's selection.
The display detector, the desktop, clipboard and screenshot factories, and the AT-SPI tree shape have no consumer outside the bundle that builds them, so they stop being exported. The host-launch refusal reason is named by a typed table beside the refusal rather than at the call site, and the host stub's recorder and answer queue are extracted so the Linux and HarmonyOS stubs cannot read as one clone.
Both Linux device gates now stage the plugin into the shared validation store through the additive workspace-plugin selection, so a lane drives the family the way a user installs it. The smoke job packs the plugin and installs it through `plugins add`, then prints the visible devices, doctor, open, snapshot, press, screenshot and close replies of that install, and the helper path it verifies follows the file into the package.
jscpd's native scan root named the helper's old top-level directory, which the move removed, so the gate failed on a missing path instead of measuring the helper. The Python clone probe follows it into the package.
The first hosted run of the plugin lanes reported three real problems: - The plugin contract published the host exec module's detached-exit type into the bundle's declarations, so a consumer type-checking a plugin against `agent-device/plugins` needed Node's own type packages. The contract now declares that shape itself. - The packed-plugin smoke asserted the plugin was `active` from a daemon record written before `plugins add` ran, and its Linux-only half asserted a tool-call transcript the implementation never produces. The activation check now follows a scoped doctor that starts the daemon, and the transcript is derived from the routes the family selects: xdg-open, the shipped AT-SPI helper with the bridge's limits, scrot, the probed X11 pointer sequence, and the wmctrl close. The helper's recorded argv must name the copy inside the installed package. - Both Linux gates now share one plugin store: the smoke job installs the packed plugin into the store the gate action stages the replay pair into, whose selections merge, so the daemon each gate starts carries all three packages, and no lane needs the workspace staging script to learn a new package.
The packed-plugin smoke ran its Linux half on the Ubuntu job for the first time at 87b50ae. Every command reply it asserts matched; the captured transcript shows the snapshot reads the frontmost app after an open bound that session, not the whole desktop. The clipboard evidence row kept the retired test name when the suite moved onto the host-bound stub, so the Linux coverage lane could not find its owner file's test.
9e03d03 to
d8921e2
Compare
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 1 new finding on d8921e2. The verdict and the full list are in the summary comment.
This comment has been minimized.
This comment has been minimized.
|
The dead One docs promise is still wrong at commands.md:628. With the Linux plugin absent and an existing Android session named The nightly build (run 44910604175) is still running, so CI is pending and not failed. Its pack and verify step covers |
|
Fixed at 20877d4 (reply to #4872 (comment)). commands.md now reads: "Commands that name no platform, such as |
This comment has been minimized.
This comment has been minimized.
|
The earlier docs finding on session-bound doctor in commands.md is fixed at 20877d4, but one docs claim is still wrong. The installation page says a command that names The inline thread on the session-bound doctor rule in commands.md is fixed at this commit and can be resolved: #4872 (comment) The latest change is docs-only, so the rest of the PR was not re-reviewed. All 33 checks pass, and there are no conflicts. Nothing else is needed before merge once the docs are corrected. |
…il, and name doctor's evidence
|
Fixed at ffb147d (reply to #4872 (comment)). installation.md and commands.md now scope the |
Apex Sentinel · ✅ Approve · review of
|
| Command | What it does |
|---|---|
@apex-sentinel-staging note <context> |
Adds context; Sentinel re-checks the cited code |
@apex-sentinel-staging pivot <why> |
Says the finding is wrong; Sentinel re-checks the cited code |
@apex-sentinel-staging like |
Marks the finding as useful |
@apex-sentinel-staging dislike <why> |
Marks it as not useful, so it is not raised again |
On this conversation, comment @apex-sentinel-staging review to run a full review once again.
|
Commit ffb147d has no remaining problems in the code. The findings from the earlier review at 20877d4 (#4872 (comment)) are fixed, and the change since then is docs only. All 33 checks pass. No conflicts. Nothing else must happen before merge. Not verified here: check:command-docs and doc-prose were not run, so the docs rely on the author's statement and green CI. Not verified here: a live |
…orm plugin (#4872) * refactor(linux): move Linux desktop automation into the managed platform plugin The packed core no longer answers for the Linux family. `@agent-device/linux` is a managed optional platform plugin like the web, Vega and HarmonyOS plugins: the composition resolves it through the same one-shot module selection, and a request that names `--platform linux` without it answers `plugin-not-installed` with its install command, while unfiltered discovery and doctor skip the family. The family's mechanics move with it. AT-SPI2 discovery and snapshotting, the X11 and Wayland input, clipboard and screenshot primitives, app lifecycle, the toolchain probe and the Python AT-SPI helper all live in the package now. Every command goes through the `PlatformHost` the composition hands to `setup`, so the plugin reads no process globals and starts no process on its own. Core keeps only the canonical platform vocabulary and the request-provider gate for the family's selection. * refactor(linux): keep the plugin's internals inside the package The display detector, the desktop, clipboard and screenshot factories, and the AT-SPI tree shape have no consumer outside the bundle that builds them, so they stop being exported. The host-launch refusal reason is named by a typed table beside the refusal rather than at the call site, and the host stub's recorder and answer queue are extracted so the Linux and HarmonyOS stubs cannot read as one clone. * ci(linux): serve both Linux lanes from the installed platform plugin Both Linux device gates now stage the plugin into the shared validation store through the additive workspace-plugin selection, so a lane drives the family the way a user installs it. The smoke job packs the plugin and installs it through `plugins add`, then prints the visible devices, doctor, open, snapshot, press, screenshot and close replies of that install, and the helper path it verifies follows the file into the package. * chore(gates): scan the AT-SPI helper where the plugin now keeps it jscpd's native scan root named the helper's old top-level directory, which the move removed, so the gate failed on a missing path instead of measuring the helper. The Python clone probe follows it into the package. * fix(linux): answer the hosted lanes the plugin actually gives them The first hosted run of the plugin lanes reported three real problems: - The plugin contract published the host exec module's detached-exit type into the bundle's declarations, so a consumer type-checking a plugin against `agent-device/plugins` needed Node's own type packages. The contract now declares that shape itself. - The packed-plugin smoke asserted the plugin was `active` from a daemon record written before `plugins add` ran, and its Linux-only half asserted a tool-call transcript the implementation never produces. The activation check now follows a scoped doctor that starts the daemon, and the transcript is derived from the routes the family selects: xdg-open, the shipped AT-SPI helper with the bridge's limits, scrot, the probed X11 pointer sequence, and the wmctrl close. The helper's recorded argv must name the copy inside the installed package. - Both Linux gates now share one plugin store: the smoke job installs the packed plugin into the store the gate action stages the replay pair into, whose selections merge, so the daemon each gate starts carries all three packages, and no lane needs the workspace staging script to learn a new package. * test(linux): name the routes the Ubuntu package lane shows The packed-plugin smoke ran its Linux half on the Ubuntu job for the first time at 87b50ae. Every command reply it asserts matched; the captured transcript shows the snapshot reads the frontmost app after an open bound that session, not the whole desktop. The clipboard evidence row kept the retired test name when the suite moved onto the host-bound stub, so the Linux coverage lane could not find its owner file's test. * fix(linux): look up only bare command names in the host PATH * fix(linux): accept the provider's fallback tools in the doctor toolchain row * fix(plugins): restore the launchDetached doc comment after the rebase * chore(package): drop a Linux marker the plugin never emits * docs(linux): scope the unscoped doctor note to a call with no session * docs(linux): scope the plugin-not-installed error to commands that fail, and name doctor's evidence
Summary
Moves Linux desktop automation and the AT-SPI helper from the packed core into the managed platform plugin
@agent-device/linux(packages/platform-linux). Without the plugin,--platform linuxanswersplugin-not-installedwith its install command; unscopeddevicesanddoctorskip the family, anddoctor --platform linuxreports a failing toolchain row. Commands, process launches and environment reads go through thePlatformHostfromsetup;atspi-bridge.tsstill readsprocess.platformand the filesystem directly (#4878). Part of #4676. Stacked on #4857. The package staysprivate(#4866).Value
Validation
Head rebased onto #4857 at
de014dd8fb(on0.2262f24be4fd). Local: build, typecheck, lint, layering, command-docs, daemon-wire-compat, fullvitest --project unit-core(20937 passed),check:packagewith the packed-plugin smoke. Live evidence is the hostedSmoke Tests (linux)lane (X11), which installs the plugin from a packed tarball. Not run: Wayland tools, registry install. Review follow-ups: #4878.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.