Skip to content

refactor(linux): drop the request-scoped Linux tool provider - #4955

Merged
thymikee merged 1 commit into
0.22from
refactor/0.22-linux-provider-seam
Nov 22, 2026
Merged

thymikee merged 1 commit into
0.22from
refactor/0.22-linux-provider-seam

Conversation

@thymikee

@thymikee thymikee commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

Summary

The Linux tool provider had no production producer: nothing outside tests ever resolved one, and the family already answers every desktop intent through the PlatformHost its plugin was set up with. This removes the request-scoped seam (the linuxToolProvider resolver key, its descriptor in root request-provider composition, and withRequestProvider on the Linux registration) and moves the provider vocabulary from @agent-device/contracts/linux-tool-provider into packages/platform-linux/src/tool-provider-types.ts. The plugin's declared operations are now just the doctor toolchain probe.

Provider-backed integration drives the family through a fake PlatformHost installed with the plugin's own setup. The real inventory, runtime, interactor and xdotool/xclip/scrot/AT-SPI tool selection are under test, and the scenario asserts the desktop argv the family produced. ADR 0001 carries a dated amendment.

Part of #4878; the rest landed in #4948.

Value

  • Request-provider resolver keys: 6 gated at base, 5 now.
  • @agent-device/contracts published subpaths: 146 at base, 145 now.
  • src/platform-runtime/request-providers.ts: 383 lines at base, 358 now.
  • packages/platform-linux/src/tool-provider.ts: 289 at base, 258 now; interactor.ts: 104, 87 now.

Validation

Head 195f72c1ee on 0.22.

  • pnpm test:unit: 2259 files green, 8 skipped.
  • pnpm exec vitest run --project provider-integration: 83 files, 318 passed.
  • check:layering, check:di-seams, check:production-exports, check:fallow, check:adr-citations, check:capabilities-matrix, check:gate-manifest, check:command-docs, test:integration:progress:check, check:daemon-wire-compat, lint, typecheck: pass.
  • grep -rn linuxToolProvider is empty outside git history.

Closes #4878

@github-actions

github-actions Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Size Report

Metric Base Current Diff
Installed (including dependencies) 6.08 MB 6.07 MB -4.1 kB
Package (unpacked) 6.08 MB 6.07 MB -4.1 kB
Package (download) 1.86 MB 1.86 MB -899 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 20.0 ms 27.2 ms +7.2 ms
CLI --help 38.1 ms 52.0 ms +13.9 ms

The Linux tool provider had no production producer: nothing but tests ever
resolved one, and the family already answers every desktop intent through the
PlatformHost its plugin was set up with. Remove the request-scoped seam and
keep the provider vocabulary inside packages/platform-linux.

Provider-backed integration scenarios now drive the family through a fake
PlatformHost installed with the plugin's own setup, so the real inventory,
runtime, interactor and tool selection are the code under test.
@thymikee
thymikee force-pushed the refactor/0.22-linux-provider-seam branch from a7c0640 to 195f72c Compare November 22, 2026 10:51
@apex-sentinel-staging

Copy link
Copy Markdown

Apex Sentinel · ✅ Approve · review of 195f72c

No open findings.

Reviewed with this repository's own Sentinel configuration (d1ace8139eb2).

💬 Talking to Sentinel

In a finding's thread, reply with:

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.

@thymikee

Copy link
Copy Markdown
Member Author

The code in 195f72c is ready to merge. The Linux provider change keeps production behavior the same, because no request ever scoped a provider at base. No conflicts. The 'Body rules' run was cancelled and one other check is still in progress. Neither exercises the Linux plugin, the request-provider composition or the provider scenarios this diff changes, and all code jobs pass. Merge needs only those two checks to finish.

Not blocking, and these can be taken or left: (1) the overrides parameter of createLinuxToolProvider and the optional input?: LinuxInputProvider (with its provider.input branches in input-actions.ts) have no production caller, so a follow-up issue could drop them and drive those unit tests through the toolbox stub; (2) the surface patterns in scripts/integration-progress-model.ts still count linuxToolProvider and the Linux semantic input provider as provider-backed evidence; (3) the Linux screenshot scenario now asserts only scrot <path>, so a wrong fullscreen or surface option would not fail at the integration tier.

Not verified here: tests and gates were not run, and the line-count claims come from the PR body and CI. The #4878 core tarball byte-delta measurement for #4676 is also not verified, so 'Closes #4878' is only partly checked.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Nov 22, 2026
@thymikee
thymikee merged commit dcbf9d8 into 0.22 Nov 22, 2026
20 of 21 checks passed
@thymikee
thymikee deleted the refactor/0.22-linux-provider-seam branch November 22, 2026 11:15
@thymikee thymikee mentioned this pull request Nov 22, 2026
1 of 10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant