Repository navigation
refactor(limrun): compose the v2 plugin factory - #4723
Conversation
Size Report
Startup median (7 runs, lower is better):
|
This comment has been minimized.
This comment has been minimized.
|
This PR is ready at 4b7e616. I found no blocking problems, and hosted CI is green with 20 checks and none failing. There are no conflicts, and nothing blocks this layer, but merge order follows #4720 (base Not blocking, and you can take or leave these: |
This comment has been minimized.
This comment has been minimized.
254805f to
77435a4
Compare
This comment has been minimized.
This comment has been minimized.
|
This PR is ready from the code side at 77435a4, and the earlier review of 4b7e616 still holds. Not blocking, and you can take or leave it: Nearly every CI job on this head was cancelled, and the one failure is the Smoke Tests aggregate whose iOS and macOS children were cancelled. The cancelled jobs have been re-run; please let them finish green before merge. Merge still follows #4720. Live Limrun verification stays pending for the stack, and this move does not need it. |
…ials to the provider package Issue #3311. Builds on #4720 (provider-plugin host). - Add packages/provider-limrun/src/plugin.ts: the single transitional limrunPlugin(options) factory. Its setup reads credentials, builds runtime dependencies through the injected plugin host, and loads the runtime with the platform module; its credentials declaration keeps per-backend fingerprint narrowing. - Move the credential reader and declaration from src/provider-limrun-credentials.ts to packages/provider-limrun/src/credentials.ts so the provider package owns credential interpretation. - Expose the factory through the new lazy, SDK-free @agent-device/provider-limrun/internal entry; the built-in candidate in src/builtin-provider-plugins.ts composes the factory with the root-owned runtime dependencies and state paths, preserving dormant/failed/active candidate semantics. - Rewire src/cli/connection and the daemon credential test to the internal entry; drop the migrated root-module-zone row; update the boundary and dependency pins, package manifests, and lockfile.
…wn v2 connection callbacks Move the connect decisions into one provider-owned set of callbacks: the connect-flag refusals (including --device), the per-platform credential narrowing, the connection capabilities, and the verification read-only check now live in the provider package's connection module, which the plugin declares lazily. The CLI composition drops its hand-written Limrun adapter and runs the same callbacks through the plugin shape, wired to the host the way the daemon's registry wires an installed plugin's, so both answers come from the provider. The profile fields the host owns stay with the host: tenant, session, run identity, state dir, and Metro settings.
The built-in `connect` composed its provider's callbacks through the provider package's root entry just to inject that provider's own read-only check, which evaluated the runtime the composition was meant to keep lazy, and let a caller replace a verification it does not own. The connection now loads the provider's own verification in the `verify` path alone, so the built-in and an installed plugin answer with the same entry and nothing above the connection decides what it verifies through; the plugin option, the verifier type, and the root's verification export go with it. The suites read the Limrun SDK boundary instead of the provider package, so they assert what the account or the attached instance is asked for: the scoped credentials, the host's version, and the selected platform, with no runtime set up on `connect`.
limrunPlugin always declares a connection, so its type says so and the built-in connection no longer checks for a missing one.
77435a4 to
39299ab
Compare
|
Rebased onto 0.22 at |
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.
|
This PR is ready: the delta at 39299ab is clean and the earlier review (#4723 (comment)) found nothing to fix. CI is green, with 19 checks and none failing at this head. Not blocking, and fine to take or leave: limrun-ios-runner.ts now has a second inline copy of the This delta is type-only and changes no device route, so it needs no live run. Live Limrun acceptance stays tracked under #3311, and the merge decision is the maintainer's. |
* refactor(limrun): add transitional v2 plugin factory and move credentials to the provider package Issue #3311. Builds on #4720 (provider-plugin host). - Add packages/provider-limrun/src/plugin.ts: the single transitional limrunPlugin(options) factory. Its setup reads credentials, builds runtime dependencies through the injected plugin host, and loads the runtime with the platform module; its credentials declaration keeps per-backend fingerprint narrowing. - Move the credential reader and declaration from src/provider-limrun-credentials.ts to packages/provider-limrun/src/credentials.ts so the provider package owns credential interpretation. - Expose the factory through the new lazy, SDK-free @agent-device/provider-limrun/internal entry; the built-in candidate in src/builtin-provider-plugins.ts composes the factory with the root-owned runtime dependencies and state paths, preserving dormant/failed/active candidate semantics. - Rewire src/cli/connection and the daemon credential test to the internal entry; drop the migrated root-module-zone row; update the boundary and dependency pins, package manifests, and lockfile. * test(limrun): read credential names from plugin inventory * style(limrun): format the reconciled factory call * refactor(limrun): route the built-in connect through the provider's own v2 connection callbacks Move the connect decisions into one provider-owned set of callbacks: the connect-flag refusals (including --device), the per-platform credential narrowing, the connection capabilities, and the verification read-only check now live in the provider package's connection module, which the plugin declares lazily. The CLI composition drops its hand-written Limrun adapter and runs the same callbacks through the plugin shape, wired to the host the way the daemon's registry wires an installed plugin's, so both answers come from the provider. The profile fields the host owns stay with the host: tenant, session, run identity, state dir, and Metro settings. * fix(limrun): retain saved named-session identity * refactor(limrun): keep the connection's verification inside the provider The built-in `connect` composed its provider's callbacks through the provider package's root entry just to inject that provider's own read-only check, which evaluated the runtime the composition was meant to keep lazy, and let a caller replace a verification it does not own. The connection now loads the provider's own verification in the `verify` path alone, so the built-in and an installed plugin answer with the same entry and nothing above the connection decides what it verifies through; the plugin option, the verifier type, and the root's verification export go with it. The suites read the Limrun SDK boundary instead of the provider package, so they assert what the account or the attached instance is asked for: the scoped credentials, the host's version, and the selected platform, with no runtime set up on `connect`. * refactor(limrun): pass only the three Apple tools the iOS runner uses * refactor(limrun): declare the plugin's connection in its return type limrunPlugin always declares a connection, so its type says so and the built-in connection no longer checks for a missing one.
* refactor(limrun): add transitional v2 plugin factory and move credentials to the provider package Issue #3311. Builds on #4720 (provider-plugin host). - Add packages/provider-limrun/src/plugin.ts: the single transitional limrunPlugin(options) factory. Its setup reads credentials, builds runtime dependencies through the injected plugin host, and loads the runtime with the platform module; its credentials declaration keeps per-backend fingerprint narrowing. - Move the credential reader and declaration from src/provider-limrun-credentials.ts to packages/provider-limrun/src/credentials.ts so the provider package owns credential interpretation. - Expose the factory through the new lazy, SDK-free @agent-device/provider-limrun/internal entry; the built-in candidate in src/builtin-provider-plugins.ts composes the factory with the root-owned runtime dependencies and state paths, preserving dormant/failed/active candidate semantics. - Rewire src/cli/connection and the daemon credential test to the internal entry; drop the migrated root-module-zone row; update the boundary and dependency pins, package manifests, and lockfile. * test(limrun): read credential names from plugin inventory * style(limrun): format the reconciled factory call * refactor(limrun): route the built-in connect through the provider's own v2 connection callbacks Move the connect decisions into one provider-owned set of callbacks: the connect-flag refusals (including --device), the per-platform credential narrowing, the connection capabilities, and the verification read-only check now live in the provider package's connection module, which the plugin declares lazily. The CLI composition drops its hand-written Limrun adapter and runs the same callbacks through the plugin shape, wired to the host the way the daemon's registry wires an installed plugin's, so both answers come from the provider. The profile fields the host owns stay with the host: tenant, session, run identity, state dir, and Metro settings. * fix(limrun): retain saved named-session identity * refactor(limrun): keep the connection's verification inside the provider The built-in `connect` composed its provider's callbacks through the provider package's root entry just to inject that provider's own read-only check, which evaluated the runtime the composition was meant to keep lazy, and let a caller replace a verification it does not own. The connection now loads the provider's own verification in the `verify` path alone, so the built-in and an installed plugin answer with the same entry and nothing above the connection decides what it verifies through; the plugin option, the verifier type, and the root's verification export go with it. The suites read the Limrun SDK boundary instead of the provider package, so they assert what the account or the attached instance is asked for: the scoped credentials, the host's version, and the selected platform, with no runtime set up on `connect`. * refactor(limrun): pass only the three Apple tools the iOS runner uses * refactor(limrun): declare the plugin's connection in its return type limrunPlugin always declares a connection, so its type says so and the built-in connection no longer checks for a missing one.
* refactor(limrun): add transitional v2 plugin factory and move credentials to the provider package Issue #3311. Builds on #4720 (provider-plugin host). - Add packages/provider-limrun/src/plugin.ts: the single transitional limrunPlugin(options) factory. Its setup reads credentials, builds runtime dependencies through the injected plugin host, and loads the runtime with the platform module; its credentials declaration keeps per-backend fingerprint narrowing. - Move the credential reader and declaration from src/provider-limrun-credentials.ts to packages/provider-limrun/src/credentials.ts so the provider package owns credential interpretation. - Expose the factory through the new lazy, SDK-free @agent-device/provider-limrun/internal entry; the built-in candidate in src/builtin-provider-plugins.ts composes the factory with the root-owned runtime dependencies and state paths, preserving dormant/failed/active candidate semantics. - Rewire src/cli/connection and the daemon credential test to the internal entry; drop the migrated root-module-zone row; update the boundary and dependency pins, package manifests, and lockfile. * test(limrun): read credential names from plugin inventory * style(limrun): format the reconciled factory call * refactor(limrun): route the built-in connect through the provider's own v2 connection callbacks Move the connect decisions into one provider-owned set of callbacks: the connect-flag refusals (including --device), the per-platform credential narrowing, the connection capabilities, and the verification read-only check now live in the provider package's connection module, which the plugin declares lazily. The CLI composition drops its hand-written Limrun adapter and runs the same callbacks through the plugin shape, wired to the host the way the daemon's registry wires an installed plugin's, so both answers come from the provider. The profile fields the host owns stay with the host: tenant, session, run identity, state dir, and Metro settings. * fix(limrun): retain saved named-session identity * refactor(limrun): keep the connection's verification inside the provider The built-in `connect` composed its provider's callbacks through the provider package's root entry just to inject that provider's own read-only check, which evaluated the runtime the composition was meant to keep lazy, and let a caller replace a verification it does not own. The connection now loads the provider's own verification in the `verify` path alone, so the built-in and an installed plugin answer with the same entry and nothing above the connection decides what it verifies through; the plugin option, the verifier type, and the root's verification export go with it. The suites read the Limrun SDK boundary instead of the provider package, so they assert what the account or the attached instance is asked for: the scoped credentials, the host's version, and the selected platform, with no runtime set up on `connect`. * refactor(limrun): pass only the three Apple tools the iOS runner uses * refactor(limrun): declare the plugin's connection in its return type limrunPlugin always declares a connection, so its type says so and the built-in connection no longer checks for a missing one.
* refactor(limrun): add transitional v2 plugin factory and move credentials to the provider package Issue #3311. Builds on #4720 (provider-plugin host). - Add packages/provider-limrun/src/plugin.ts: the single transitional limrunPlugin(options) factory. Its setup reads credentials, builds runtime dependencies through the injected plugin host, and loads the runtime with the platform module; its credentials declaration keeps per-backend fingerprint narrowing. - Move the credential reader and declaration from src/provider-limrun-credentials.ts to packages/provider-limrun/src/credentials.ts so the provider package owns credential interpretation. - Expose the factory through the new lazy, SDK-free @agent-device/provider-limrun/internal entry; the built-in candidate in src/builtin-provider-plugins.ts composes the factory with the root-owned runtime dependencies and state paths, preserving dormant/failed/active candidate semantics. - Rewire src/cli/connection and the daemon credential test to the internal entry; drop the migrated root-module-zone row; update the boundary and dependency pins, package manifests, and lockfile. * test(limrun): read credential names from plugin inventory * style(limrun): format the reconciled factory call * refactor(limrun): route the built-in connect through the provider's own v2 connection callbacks Move the connect decisions into one provider-owned set of callbacks: the connect-flag refusals (including --device), the per-platform credential narrowing, the connection capabilities, and the verification read-only check now live in the provider package's connection module, which the plugin declares lazily. The CLI composition drops its hand-written Limrun adapter and runs the same callbacks through the plugin shape, wired to the host the way the daemon's registry wires an installed plugin's, so both answers come from the provider. The profile fields the host owns stay with the host: tenant, session, run identity, state dir, and Metro settings. * fix(limrun): retain saved named-session identity * refactor(limrun): keep the connection's verification inside the provider The built-in `connect` composed its provider's callbacks through the provider package's root entry just to inject that provider's own read-only check, which evaluated the runtime the composition was meant to keep lazy, and let a caller replace a verification it does not own. The connection now loads the provider's own verification in the `verify` path alone, so the built-in and an installed plugin answer with the same entry and nothing above the connection decides what it verifies through; the plugin option, the verifier type, and the root's verification export go with it. The suites read the Limrun SDK boundary instead of the provider package, so they assert what the account or the attached instance is asked for: the scoped credentials, the host's version, and the selected platform, with no runtime set up on `connect`. * refactor(limrun): pass only the three Apple tools the iOS runner uses * refactor(limrun): declare the plugin's connection in its return type limrunPlugin always declares a connection, so its type says so and the built-in connection no longer checks for a missing one.
* refactor(limrun): add transitional v2 plugin factory and move credentials to the provider package Issue #3311. Builds on #4720 (provider-plugin host). - Add packages/provider-limrun/src/plugin.ts: the single transitional limrunPlugin(options) factory. Its setup reads credentials, builds runtime dependencies through the injected plugin host, and loads the runtime with the platform module; its credentials declaration keeps per-backend fingerprint narrowing. - Move the credential reader and declaration from src/provider-limrun-credentials.ts to packages/provider-limrun/src/credentials.ts so the provider package owns credential interpretation. - Expose the factory through the new lazy, SDK-free @agent-device/provider-limrun/internal entry; the built-in candidate in src/builtin-provider-plugins.ts composes the factory with the root-owned runtime dependencies and state paths, preserving dormant/failed/active candidate semantics. - Rewire src/cli/connection and the daemon credential test to the internal entry; drop the migrated root-module-zone row; update the boundary and dependency pins, package manifests, and lockfile. * test(limrun): read credential names from plugin inventory * style(limrun): format the reconciled factory call * refactor(limrun): route the built-in connect through the provider's own v2 connection callbacks Move the connect decisions into one provider-owned set of callbacks: the connect-flag refusals (including --device), the per-platform credential narrowing, the connection capabilities, and the verification read-only check now live in the provider package's connection module, which the plugin declares lazily. The CLI composition drops its hand-written Limrun adapter and runs the same callbacks through the plugin shape, wired to the host the way the daemon's registry wires an installed plugin's, so both answers come from the provider. The profile fields the host owns stay with the host: tenant, session, run identity, state dir, and Metro settings. * fix(limrun): retain saved named-session identity * refactor(limrun): keep the connection's verification inside the provider The built-in `connect` composed its provider's callbacks through the provider package's root entry just to inject that provider's own read-only check, which evaluated the runtime the composition was meant to keep lazy, and let a caller replace a verification it does not own. The connection now loads the provider's own verification in the `verify` path alone, so the built-in and an installed plugin answer with the same entry and nothing above the connection decides what it verifies through; the plugin option, the verifier type, and the root's verification export go with it. The suites read the Limrun SDK boundary instead of the provider package, so they assert what the account or the attached instance is asked for: the scoped credentials, the host's version, and the selected platform, with no runtime set up on `connect`. * refactor(limrun): pass only the three Apple tools the iOS runner uses * refactor(limrun): declare the plugin's connection in its return type limrunPlugin always declares a connection, so its type says so and the built-in connection no longer checks for a missing one.
* refactor(limrun): add transitional v2 plugin factory and move credentials to the provider package Issue #3311. Builds on #4720 (provider-plugin host). - Add packages/provider-limrun/src/plugin.ts: the single transitional limrunPlugin(options) factory. Its setup reads credentials, builds runtime dependencies through the injected plugin host, and loads the runtime with the platform module; its credentials declaration keeps per-backend fingerprint narrowing. - Move the credential reader and declaration from src/provider-limrun-credentials.ts to packages/provider-limrun/src/credentials.ts so the provider package owns credential interpretation. - Expose the factory through the new lazy, SDK-free @agent-device/provider-limrun/internal entry; the built-in candidate in src/builtin-provider-plugins.ts composes the factory with the root-owned runtime dependencies and state paths, preserving dormant/failed/active candidate semantics. - Rewire src/cli/connection and the daemon credential test to the internal entry; drop the migrated root-module-zone row; update the boundary and dependency pins, package manifests, and lockfile. * test(limrun): read credential names from plugin inventory * style(limrun): format the reconciled factory call * refactor(limrun): route the built-in connect through the provider's own v2 connection callbacks Move the connect decisions into one provider-owned set of callbacks: the connect-flag refusals (including --device), the per-platform credential narrowing, the connection capabilities, and the verification read-only check now live in the provider package's connection module, which the plugin declares lazily. The CLI composition drops its hand-written Limrun adapter and runs the same callbacks through the plugin shape, wired to the host the way the daemon's registry wires an installed plugin's, so both answers come from the provider. The profile fields the host owns stay with the host: tenant, session, run identity, state dir, and Metro settings. * fix(limrun): retain saved named-session identity * refactor(limrun): keep the connection's verification inside the provider The built-in `connect` composed its provider's callbacks through the provider package's root entry just to inject that provider's own read-only check, which evaluated the runtime the composition was meant to keep lazy, and let a caller replace a verification it does not own. The connection now loads the provider's own verification in the `verify` path alone, so the built-in and an installed plugin answer with the same entry and nothing above the connection decides what it verifies through; the plugin option, the verifier type, and the root's verification export go with it. The suites read the Limrun SDK boundary instead of the provider package, so they assert what the account or the attached instance is asked for: the scoped credentials, the host's version, and the selected platform, with no runtime set up on `connect`. * refactor(limrun): pass only the three Apple tools the iOS runner uses * refactor(limrun): declare the plugin's connection in its return type limrunPlugin always declares a connection, so its type says so and the built-in connection no longer checks for a missing one.
* refactor(limrun): add transitional v2 plugin factory and move credentials to the provider package Issue callstack#3311. Builds on callstack#4720 (provider-plugin host). - Add packages/provider-limrun/src/plugin.ts: the single transitional limrunPlugin(options) factory. Its setup reads credentials, builds runtime dependencies through the injected plugin host, and loads the runtime with the platform module; its credentials declaration keeps per-backend fingerprint narrowing. - Move the credential reader and declaration from src/provider-limrun-credentials.ts to packages/provider-limrun/src/credentials.ts so the provider package owns credential interpretation. - Expose the factory through the new lazy, SDK-free @agent-device/provider-limrun/internal entry; the built-in candidate in src/builtin-provider-plugins.ts composes the factory with the root-owned runtime dependencies and state paths, preserving dormant/failed/active candidate semantics. - Rewire src/cli/connection and the daemon credential test to the internal entry; drop the migrated root-module-zone row; update the boundary and dependency pins, package manifests, and lockfile. * test(limrun): read credential names from plugin inventory * style(limrun): format the reconciled factory call * refactor(limrun): route the built-in connect through the provider's own v2 connection callbacks Move the connect decisions into one provider-owned set of callbacks: the connect-flag refusals (including --device), the per-platform credential narrowing, the connection capabilities, and the verification read-only check now live in the provider package's connection module, which the plugin declares lazily. The CLI composition drops its hand-written Limrun adapter and runs the same callbacks through the plugin shape, wired to the host the way the daemon's registry wires an installed plugin's, so both answers come from the provider. The profile fields the host owns stay with the host: tenant, session, run identity, state dir, and Metro settings. * fix(limrun): retain saved named-session identity * refactor(limrun): keep the connection's verification inside the provider The built-in `connect` composed its provider's callbacks through the provider package's root entry just to inject that provider's own read-only check, which evaluated the runtime the composition was meant to keep lazy, and let a caller replace a verification it does not own. The connection now loads the provider's own verification in the `verify` path alone, so the built-in and an installed plugin answer with the same entry and nothing above the connection decides what it verifies through; the plugin option, the verifier type, and the root's verification export go with it. The suites read the Limrun SDK boundary instead of the provider package, so they assert what the account or the attached instance is asked for: the scoped credentials, the host's version, and the selected platform, with no runtime set up on `connect`. * refactor(limrun): pass only the three Apple tools the iOS runner uses * refactor(limrun): declare the plugin's connection in its return type limrunPlugin always declares a connection, so its type says so and the built-in connection no longer checks for a missing one.
* refactor(limrun): add transitional v2 plugin factory and move credentials to the provider package Issue #3311. Builds on #4720 (provider-plugin host). - Add packages/provider-limrun/src/plugin.ts: the single transitional limrunPlugin(options) factory. Its setup reads credentials, builds runtime dependencies through the injected plugin host, and loads the runtime with the platform module; its credentials declaration keeps per-backend fingerprint narrowing. - Move the credential reader and declaration from src/provider-limrun-credentials.ts to packages/provider-limrun/src/credentials.ts so the provider package owns credential interpretation. - Expose the factory through the new lazy, SDK-free @agent-device/provider-limrun/internal entry; the built-in candidate in src/builtin-provider-plugins.ts composes the factory with the root-owned runtime dependencies and state paths, preserving dormant/failed/active candidate semantics. - Rewire src/cli/connection and the daemon credential test to the internal entry; drop the migrated root-module-zone row; update the boundary and dependency pins, package manifests, and lockfile. * test(limrun): read credential names from plugin inventory * style(limrun): format the reconciled factory call * refactor(limrun): route the built-in connect through the provider's own v2 connection callbacks Move the connect decisions into one provider-owned set of callbacks: the connect-flag refusals (including --device), the per-platform credential narrowing, the connection capabilities, and the verification read-only check now live in the provider package's connection module, which the plugin declares lazily. The CLI composition drops its hand-written Limrun adapter and runs the same callbacks through the plugin shape, wired to the host the way the daemon's registry wires an installed plugin's, so both answers come from the provider. The profile fields the host owns stay with the host: tenant, session, run identity, state dir, and Metro settings. * fix(limrun): retain saved named-session identity * refactor(limrun): keep the connection's verification inside the provider The built-in `connect` composed its provider's callbacks through the provider package's root entry just to inject that provider's own read-only check, which evaluated the runtime the composition was meant to keep lazy, and let a caller replace a verification it does not own. The connection now loads the provider's own verification in the `verify` path alone, so the built-in and an installed plugin answer with the same entry and nothing above the connection decides what it verifies through; the plugin option, the verifier type, and the root's verification export go with it. The suites read the Limrun SDK boundary instead of the provider package, so they assert what the account or the attached instance is asked for: the scoped credentials, the host's version, and the selected platform, with no runtime set up on `connect`. * refactor(limrun): pass only the three Apple tools the iOS runner uses * refactor(limrun): declare the plugin's connection in its return type limrunPlugin always declares a connection, so its type says so and the built-in connection no longer checks for a missing one.
Summary
Move Limrun’s v2 factory, credential interpretation, and connection callbacks into the provider package. The 0.22 daemon composes the built-in candidate with its existing lease-scoped runtime adapter. Connection verification loads independently of the runtime. Credential fingerprints, connection identity, and HAR ownership remain stable.
This is part of #3311 and #3759. It includes the connection work merged in #4730. It now targets 0.22 directly and replaces #4720, which closed into it. From #4720 it keeps one type-only change:
createLimrunIosRunnertakesPick<AppleApplicationTools, 'resolveOpenTarget' | 'applyRuntimeHints' | 'clearRuntimeHints'>, andcreateRunnerpasses only those three tools.limrunPluginnow declares its connection in its return type, so the built-in connection has no unreachable guard.Validation
56e11de63d, tested head39299ab340196a2e502607d9eb56d4de256158e4.pnpm check:affected --run --base 56e11de63d --head 39299ab340passed at the exact commit with an unchanged checkout (42 passed, 25 skipped).packages/provider-limrun/src/index.tswere resolved by dropping the rootLIMRUN_PROFILE_FIELDSandLimrunRuntimeexports, which have no consumers. Hosted checks and review are pending at this head.@agent-device/limrunplugin #3311.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.