Skip to content

fix(limrun): scope iOS runner tools to lease operations - #4720

Closed
thymikee wants to merge 36 commits into
0.22from
refactor/0.22-limrun-provider-host
Closed

thymikee wants to merge 36 commits into
0.22from
refactor/0.22-limrun-provider-host

Conversation

@thymikee

@thymikee thymikee commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Summary

Restrict Limrun’s iOS runner to opening targets and applying or clearing runtime hints. The Apple runtime rejects Android hint targets. The built-in Limrun runtime uses its existing lease-scoped operations. This updates 10 files for #3311.

Validation

  • Base 92f96af0b5, tested head 81136d5df3d663ddb11d38cccc7dfc77098e4536.
  • pnpm check:affected --run --head 81136d5df3 passed at the exact commit with an unchanged checkout (42 passed, 25 skipped, receipt run-tmd3C4).
  • Focused coverage verifies the runner authority boundary and the Apple-only hint route. Hosted checks, review, and packed registry-to-daemon live evidence for Limrun iOS and Android are pending.

Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

View guided diff Turn on auto-fix

airowe and others added 30 commits November 16, 2026 19:23
…#4177)

* fix(daemon): refuse leased requests that name no session at admission

The CLI already requires an explicit session on a leased remote
connection, but a direct RPC or socket caller could still omit it and
land in the shared default session.

HTTP and socket intake now mark a missing or blank session on the
daemon-only request envelope. Admission refuses a marked request that
allocates a provider lease or carries a lease, with the existing
REMOTE_SESSION_REQUIRED reason, before anything is allocated or
dispatched. A provider named without a lease stays allowed, and an
explicit session name, including "default", counts as named.

Closes #4171

* fix(daemon): close the remaining unnamed lease paths at admission

agent_device.install_from_source did not record an omitted session, so an
unnamed install could reach the provider lease held by the default session.
A batch step also lost the marker, so a step carrying lease flags passed
admission.

Lease-exempt commands such as session_list now read only a lease they carry
themselves, so an unnamed inventory command still answers while the default
session holds a provider lease.

The refusal also names the session parameter for direct RPC callers, and the
ledger now digests the shared session helper and describes blank names for
released clients correctly.

* fix(daemon): keep session-held leases out of unnamed artifacts and queued requests

Only inventory and lease-lifecycle commands now ignore the lease on the
session they resolve. artifacts and events act through that session, so an
unnamed request for them is refused again.

Admission also repeats the check under the session lock, because an unnamed
request can wait behind an open that leaves a provider lease on the session.

* fix(daemon): refuse unnamed doctor and capabilities on a leased session

Both resolve the session's device, so an unnamed request could inspect a
device another caller leased. An explicit list now names the commands that
never read the session, and every other command stays refused.
release_materialized_paths joins that list, because it uses no session.

* fix(daemon): treat a blank session as the default one at intake

A blank session name was marked as unnamed but stayed its own session, so the marker
described a request that still ran somewhere else. HTTP and socket intake now both
resolve a missing or blank name to the default session. A mutation case holds the
marker in place, and the transport tests assert that the handler ran on that session.

* fix(daemon): refuse the Node client on a provider lease when it names no session

The Node client always sends the literal default session and reports the omission in
meta.sessionExplicit, so intake never marked it and an unnamed leases.allocate still
allocated a lease. One intake helper now decides this for the socket and every HTTP
builder, and lease RPC params carry the fact. The commands that ignore their session's
lease become a registry trait. Docs examples and in-repo clients on a provider lease
now name a session.

* fix(contracts): forward a session named in flags on the lease RPC

The lease RPC projection dropped flags.session and forwarded sessionExplicit false, so
a caller that named its session in flags was refused there but not on the command
method. The route now forwards the shared predicate's answer. Also cover the lease
method in the real-daemon test and document where each method reads the fact.

* refactor(kernel): home the session-naming predicate in the record module

The lease RPC builder needs the predicate, and importing it from the contracts hub made three entry surfaces evaluate more modules. The record module is already in those closures.

* docs(daemon): say batch steps also carry the session-omitted marker

* fix(daemon): keep a blank session literal at intake

Intake rewrote a blank session to default, so after main made each web
session its own device, an HTTP RPC open with session "" ran the default
browser instead of being refused with web_session_name_invalid. A missing
session still runs under default. A blank one keeps its literal and still
names no session, so a provider lease refuses it as before and the web
name check refuses it too.

Refs #4171

* fix(daemon): import the session naming check from kernel/record

Main's router now reports a named session that is missing, through
namesSessionExplicitly from kernel/contracts. This branch moved that
helper to kernel/record, so the merge left a dangling import.

Refs #4171

* chore(gates): reconcile admission checks with 0.22 owners

---------

Co-authored-by: Michał Pierzchała <[email protected]>
…) (#4504)

* refactor(plugins): remove the version 1 provider plugin contract (#3759)

Drop the v1 loader adapter, the manifest-driven discovery and store branches, the
manifest credential and connection fallbacks, and the install-time provider
collision checks. A store package is discovered through its exports only, and
everything it declares comes from the object its factory returns. The registry
settles a duplicate provider id by first claim.

Remove the v1 entries and manifest declarations from TestMu AI and Revyl, and
document the migration to an AgentDevicePluginFactory in ./agent-device.

* refactor(plugins): keep entry resolution module-private after the v1 removal

discoverPluginEntry is the only caller of resolvePluginEntry, and the store's
version-selector check lost its second caller with the manifest branches, so
both become module-local. Drop the deleted v1 entries from the Fallow entry
list. Removes the dead-export findings the fallow audit raised at head.

* refactor(plugins): answer the review findings on the v1 removal

Point the traversal fixture at the file that exists outside the package, say the
entry contract as it is (root export, which is main without exports), move the
v1 manifest's connection to connection.capabilities in the migration note and
separate the incompatible_plugin and invalid_plugin cases, claim the built-in id
with a non-routing provider in the store test, and state what install checks.
* refactor(sdk): require explicit host dependencies in 0.22

* chore(gates): remove ambient SDK process entry waivers

* fix(sdk): preserve request overlays and archive working directories
#4528)

* test(maestro): colocate engine export tests before extraction

* test(cli): isolate Maestro suite forwarding from network reporting

* test(cli): restore isolated cwd for Maestro suite forwarding
…4555)

* chore(gates): keep the private Maestro preparation atomic

Prepare the private factory, declaration chunks and artifact checks together with matching export, dependency and project-reference contracts. Keep the built-in consumer behavior until the migration layer. Omit the unused unshipped ManagedPlugin alias.

* chore(gates): cover lazy Maestro factory resource ownership

* chore(gates): assert the retained diagnostic callback before invocation

* chore(gates): preserve host clickability across the Maestro bundle boundary

* chore(gates): preserve host screen-origin refusal across Maestro bundles

* chore(gates): preserve package check argument forwarding

* chore(gates): align package guard with forwarded arguments

* fix(maestro): address preparation review invariants

* chore(maestro): declare package license and repository

* fix(gates): retain Maestro conformance source ownership

* chore(gates): retain unit coverage for Maestro conformance inputs

* fix(build): preserve Node 22.13 development packaging

* chore(gates): verify development packaging on Node 22.13
* chore(gates): keep the managed Maestro migration atomic

Land the consumer migration, isolated test installation and resolver setup, artifact retirement, dependency removal and matching enforcement as one self-contained layer. Preserve the existing plugin spine rank instead of lowering its boundary.

* fix(replay): load only the selected client backend package
…4534)

Move execution-neutral replay data and shared ports with matching package exports, dependency declarations and contract pins. Preserve the previously reviewed layer content.
…ry (#4535)

* chore(gates): preserve native registry identity and recoverable lazy loads

* docs(plugins): distinguish native and format setup factories

* docs(plugins): name the native execution object precisely
…4537)

* chore(gates): keep optional replay routing and plugin admission atomic

Land the native plugin with its routing consumer, installation, workflows and package guards. Retain C3 rejected-load retry and inventory ownership with typed repair guidance; preserve lower-layer slot identity and refuse raw YAML suites before plugin or device admission.

* fix(mcp): avoid duplicate native replay search keyword
* test(connect): move BrowserStack connect cases into a provider-owned test file

Give the BrowserStack connect cases their own file beside cloud-connect-testmu.test.ts, split from the cloud-profile and profile-field tests. Behavior and assertions stay the same, so the BrowserStack provider extraction can change one provider-owned file instead of the shared connect tests.

* test(connect): remove orphaned adapter import after suite isolation

* test(browserstack): fix connect suite ownership and unused import
Remove the internal preview channel special case from CLI updates. Preserve the generic latest fallback and existing main-nightly behavior.

Exact-head affected validation passed at 716dddd: 42 passed, 25 skipped; hosted checks: 13 successful, 1 skipped. No release or package publication.
Library clients attach to an existing daemon, including replay and test calls. Remove managed startup, replacement and timeout retirement; retain explicit ensureDaemon, embedded hosts, and CLI/MCP ensuring. Update migration examples, cancellation documentation and transport regressions. Part of #3759.
* Record Android foreground close fence observations

* Retain foreground probe failures in request diagnostics

* Place foreground evidence test at composition boundary

* Use Android package seams in routed evidence test

* Exercise request evidence at daemon boundary

* docs(android): explain foreground close failure evidence

* test: isolate interaction contract fixture claims

* test(contracts): reproduce inherited shared claim store
)

* feat(plugins): install managed local artifacts

* fix(plugins): bind artifact integrity and inventory to installed selections

* test(plugins): exercise managed artifact installation from the packed SDK

* fix(plugins): preserve host context and clarify artifact receipts

* test(plugins): correct list assertions and isolate host fixtures

* test(limrun): handle canceled fixture uploads

* refactor(plugins): keep one artifact version and clarify manager ownership

* fix(plugins): release artifact lock when staging cleanup fails

* test(plugins): verify lock release after cleanup failure

* refactor(plugins): unify selection transactions

* feat(plugins): accept local archives with add
* test(android): retain snapshot helper session diagnostics

* test(android): preserve verdict when recording snapshot evidence
* refactor(browserstack): extract BrowserStack into the @agent-device/browserstack plugin

Move the BrowserStack provider modules and tests out of provider-webdriver into
packages/provider-browserstack, packaged like the TestMu plugin (bundled ESM,
type-only agent-device/plugins, ./agent-device export, version 2 factory).
provider-webdriver keeps the shared engine and its ./plugin surface. Core no
longer registers BrowserStack; connect browserstack without the plugin fails
with the existing plugin-not-installed error naming plugins add
@agent-device/browserstack. The package stays private until its npm placeholder
and trusted publisher exist.

* docs(browserstack): move BrowserStack to the plugin install flow

Document plugins add @agent-device/browserstack in the BrowserStack, device
cloud and plugins guides, the README and the plugin package README, and add a
changeset.

* fix(browserstack): repair CI contracts and plugin review findings

* test(browserstack): repair packed export and HTTP fixture contracts

* fix(build): give shared bundler config a private workspace owner

* fix(build): complete typed workspace declarations for bundler policy

* chore(gates): declare build configuration as a leaf owner

* fix(build): classify Rolldown as a development dependency

* fix(browserstack): honor explicit credentials and shared contracts

* test(browserstack): cover empty credential overrides

* chore(browserstack): enable package publication
* refactor(test): colocate Maestro fuzz coverage with parser

* fix(host-kit): bound captured command output

* fix(host-kit): count raw output bytes before decoding

* refactor(host-kit): isolate command settlement classification

* fix(host-kit): preserve timeout and eager closure

* fix(test-kit): cover complete Maestro command tokens

* style(test): format Maestro coverage assertion

* fix(host-kit): retain bounded output on capture limit errors

* test: coordinate bounded output regression

* fix(host-kit): retry output-limit termination at deadline
* fix(plugins): admit connection providers from their host registry

* test(plugins): cover routed connection admission

* test(plugins): use explicit remote session fixtures

* test(plugins): verify routed admission and cleanup

* fix(connection): pass host environment through capability decisions

* test(connection): isolate stored status output assertions

* test(connection): register providers in lease fixtures

* test(connection): colocate provider lease fixture
* Extract AWS Device Farm provider plugin

* refactor(aws-device-farm): consolidate WebDriver imports

* test(aws-device-farm): colocate connection coverage

* Test packed AWS provider error boundary

* refactor(provider-webdriver): remove unused extraction scaffolding

* chore(gates): register the AWS packed smoke entry

* chore(gates): verify the explicit WebDriver plugin subpath

* test(layering): update WebDriver export boundary

* chore(gates): separate root dependency ownership from workspace references

* chore(gates): check workspace declarations in script test imports

* fix(plugins): defer host command execution imports

* refactor(webdriver): remove unused provider exports

* fix(plugins): preserve supplied command host context

* fix: address AWS plugin review findings

* fix(aws-device-farm): publish typed plugin entrypoints

* test(docs): resolve installed workspace plugins

* fix(ci): select moved snapshot differential test

* refactor(aws): import host capability types from the plugin SDK

* test(aws): cover routed plugin admission

* test(aws): register provider for stored lease fixtures

* chore(aws): enable package publication
* fix(plugins): name the release a channel plugin installs from

BrowserStack and AWS Device Farm publish only on the `nightly-0.22` tag, so their `latest` tag is
still the staged placeholder that exports no plugin. A missing-plugin error that named the bare
package therefore prescribed an install the manager refuses with `incompatible_plugin`, and help,
docs and the README still described AWS Device Farm as unpublished.

One catalog declaration records each plugin's channel. Recovery reads the running core's version
through the release grammar `scripts/release-version.mjs` owns: on a 0.22 nightly it names the
version built with this core, and everywhere else — a source checkout, a `main` nightly, a stable
release — it names the plain package as before. Printed guidance names the channel tag rather than a
build, so it holds across releases of one channel. No lookup, and no date or run in source.

Reason, package, provider and the restart hint are unchanged for every provider.

Co-authored-by: Apex <[email protected]>

* docs(release): name the plugin tag in the 0.22 changesets

The two pending 0.22 changesets become the shipped release notes for this extraction, and both
prescribed the bare package name — the selector that resolves to the placeholder — while the AWS one
still called the plugin unpublished. They now name the tag, and the exact version a missing-plugin
error prints for the release the reader runs.

Co-authored-by: Apex <[email protected]>

* fix(plugins): match provider help to the running release

* fix(help): type version-aware topic bodies

* docs(plugins): match shipped readmes to the release channel

* fix(plugins): repair provider selections with matching releases

* fix(plugins): match main-channel 0.22 nightly builds

* docs(plugins): clarify the 0.22 development channel default

* docs(website): describe AWS Device Farm as a provider plugin

* chore: remove changeset edits from the PR

* docs: use the 0.22 branch install instructions

---------

Co-authored-by: Apex <[email protected]>
…ties

Remove the generic provider host-capability facet layer from #4720: the
 Limrun adapter already reaches adb, exec, ports, and files through its
 own lease-bound lazy edges, so the mirrored plugin-contract surface
 (ProviderHostCapabilities, rawArgv, capability resolver, startup
 diagnostics) added authority without behaviour.

Keep the two authority fixes at their owners:
- contracts expose AppleApplicationToolsForProvider as an explicit
  three-operation allowlist (resolveOpenTarget, applyRuntimeHints,
  clearRuntimeHints) and availableAppleApplicationToolsForProvider
  projects the runtime value through it, so leased remote runners and
  shutdown handles can no longer reach a provider;
- Apple application tools apply and clear runtime hints through the
  Apple-only path (applyAppleRuntimeHintValues /
  clearAppleRuntimeHintValues), which refuses non-Apple targets with
  apple_runtime_hint_target_required; neutral dispatchers are unchanged.

Restore host.ts, registry.ts, provider policy, builtin registrations,
SDK exports, layering zones, docs, and the host public-types test to
their pre-facet state.
@thymikee
thymikee added this pull request to stack #4731 November 19, 2026 08:55
thymikee added a commit that referenced this pull request Nov 19, 2026
…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.
@thymikee

Copy link
Copy Markdown
Member Author

Addressed the authority findings from the review of 5321dff5f4 in 81136d5df3. The generic provider facets are removed. Limrun uses the existing lease-scoped operations, and the iOS runner exposes only the three Apple application operations it needs. The Apple runtime rejects Android hint targets. The combined factory and connection changes are rebased in #4723.

Exact local validation passed on both heads (42 passed and 25 skipped each). Hosted CI and review are pending on the new heads. The packed registry-to-daemon Limrun iOS and Android receipts are still required before readiness.

@thymikee thymikee changed the title feat(plugins): scope provider host capabilities fix(limrun): scope iOS runner tools to lease operations Nov 19, 2026
@apex-sentinel-staging

Copy link
Copy Markdown

Apex Sentinel · ✅ Approve · review of 81136d5

Since the review of 5321dff: 0 new · 0 still open · 0 no longer raised

No open findings.

2 findings below minor hidden (user_settings.min_severity).

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

💬 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

Thanks for the update. At 81136d5, the code that the earlier review (#4720 (comment)) flagged is gone, and the Android hint path is fixed because hints now run only on the Apple path. The Android evidence is no longer needed, because no Android code changes. One item remains: the live iOS evidence.

The PR still changes two device-facing paths: how the Limrun iOS runner builds its host Apple tools (limrun-ios-runner.ts:53), and which hint function the shared Apple tools run for open and close (runtime-hints.ts:78). The only proof is a fixture with mocked xcrun and a mocked Limrun HTTP endpoint. Those tests do not show that hint writes still run inside the Limrun Apple tool provider scope on a real lease. If the scope is broken, defaults would be written through local xcrun or fail. Please start the packed CLI through normal daemon startup with built-in Limrun and an allocated or attached iOS instance. Run open <bundle> with --metro-host and --metro-port, and show RCT_jsLocation set on that instance. Then run a runner-backed snapshot that reports backend xctest. Then close or clear the hints and show the default deleted. Please include the daemon version, the lease and device identity, the commands and the outputs. A local simulator run only proves a neighboring route.

Not blocking, and you can take or leave these: applyAppleRuntimeHintValues and clearAppleRuntimeHintValues repeat the non-Android tail of applyRuntimeHintValues and clearRuntimeHintValues, so one Apple branch would do; the hostTools parameter in limrun-ios-application-tools.ts:29 Picks every member of a type that has only those three; and the getter test in limrun-ios-runner.test.ts:52 fails at base only because of a property read, not an observable failure, while the helper named fail only records calls.

Could this be smaller? Neither the projection nor the hint refusal can be reached on a production route today. At base no provider receives createAppleApplicationTools, the runner already called only those three members, and no Android device reaches the Apple tools. In createRunner in limrun-runtime-dependencies.ts, you could pass { resolveOpenTarget, applyRuntimeHints, clearRuntimeHints } from createAppleApplicationTools(host.env). You could type the runner parameter with the existing Pick<AppleApplicationTools, …>. That adds no contracts type and no projection function. If #4723 needs the projection across the plugin boundary, it belongs at the plugin host contract that the extracted package consumes (ADR 0034), not in the private contracts package. Does #4723 or the extracted @agent-device/limrun package receive Apple tools from the host? If not, is this PR still needed for #3311, or can it close into #4723?

CI shows 14 checks with 0 failing at 81136d5. No CI job reaches a live Limrun lease, so CI does not cover the route above. Before merge, please post the live Limrun iOS evidence for hint apply and clear plus the XCTest snapshot, and settle where the projection belongs.

@thymikee

Copy link
Copy Markdown
Member Author

Answer to the design question: no. Neither #4723 nor the extracted @agent-device/limrun package receives Apple tools from the host. The package reads session.runner.applicationTools (packages/provider-limrun/src/ios.ts), and core builds that runner from createAppleApplicationTools(host.env) in createRunner (src/sdk/limrun-runtime-dependencies.ts:132). #4723's diff does not touch any file this PR changes, and it does not use the projection or the Apple hint functions. This PR is not needed for #3311.

Plan:

  • Close this PR into refactor(limrun): compose the v2 plugin factory #4723. The projection, the contracts type and the Apple-only hint functions are dropped, because no production route reaches them.
  • refactor(limrun): compose the v2 plugin factory #4723 is restacked directly on the refreshed 0.22. It gets one type-only commit: createRunner passes { resolveOpenTarget, applyRuntimeHints, clearRuntimeHints } from createAppleApplicationTools(host.env), and createLimrunIosRunner takes Pick<AppleApplicationTools, 'resolveOpenTarget' | 'applyRuntimeHints' | 'clearRuntimeHints'>. The runner already called only those three members, so its behavior does not change.
  • The hint function and the runner's tool scope stay as they are at base. This removes the two device-facing changes that the live iOS evidence was for. Live provider acceptance for the stack stays tracked on refactor(limrun): compose the v2 plugin factory #4723.

The 0.22 rebase onto main is in progress. I will close this PR after #4723 is pushed and retargeted to 0.22.

thymikee added a commit that referenced this pull request Nov 19, 2026
…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.
@thymikee
thymikee removed this pull request from stack #4731 November 19, 2026 14:22
@thymikee

Copy link
Copy Markdown
Member Author

Closed into #4723, as answered in #4720 (comment). The extracted package does not take Apple tools from the host, so the projection, the contracts type and the Apple-only hint functions are dropped. #4723 now targets 0.22 directly and carries the one type-only change: createLimrunIosRunner takes Pick<AppleApplicationTools, 'resolveOpenTarget' | 'applyRuntimeHints' | 'clearRuntimeHints'>.

@thymikee thymikee closed this Nov 19, 2026
@thymikee
thymikee deleted the refactor/0.22-limrun-provider-host branch November 19, 2026 14:23
thymikee added a commit that referenced this pull request Nov 19, 2026
* 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.
thymikee added a commit that referenced this pull request Nov 19, 2026
* 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.
thymikee added a commit that referenced this pull request Nov 20, 2026
* 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.
thymikee added a commit that referenced this pull request Nov 20, 2026
* 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.
thymikee added a commit that referenced this pull request Nov 21, 2026
* 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.
thymikee added a commit that referenced this pull request Nov 21, 2026
* 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.
thymikee added a commit that referenced this pull request Nov 23, 2026
* 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.
hannojg pushed a commit to hannojg/agent-device that referenced this pull request Nov 23, 2026
* 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.
thymikee added a commit that referenced this pull request Nov 24, 2026
* 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.
thymikee added a commit that referenced this pull request Nov 29, 2026
* 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.
thymikee added a commit that referenced this pull request Nov 30, 2026
* 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.
thymikee added a commit that referenced this pull request Dec 1, 2026
* 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.
thymikee added a commit that referenced this pull request Dec 2, 2026
* 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants