Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .changeset/explicit-sdk-hosts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
'agent-device': minor
---

Require explicit SDK host dependencies in 0.22. Part of #3759 section 3.

Pass `{ env, cwd }` to `runAndroidShell(device, words, host, options?)`, `runAndroidExecOut(device, words, host, options?)`, `resolveAndroidArchivePackageName(archivePath, host, signal?)`, `prepareMetroRuntime(options, host)`, and `new LimrunRuntime(options, host)`. For example, capture `const host = { env: { ...process.env }, cwd: process.cwd() }` in your entry point, then call `await prepareMetroRuntime(options, host)`.

`resolveRemoteConfigProfile({ configPath, cwd, env })` requires `env`, and `createLocalArtifactAdapter({ cwd })` requires `cwd`. Archive inspection resolves relative paths from the supplied host and no longer shares a cached SDK tool across hosts. The internal contracts, host-kit, remote, and platform-android packages are bundled into `agent-device`; this changeset covers their affected public APIs.

Executable captures and `startAgentDevice`'s optional-host capture remain available. See [Build an integration](/docs/build-an-integration#migrate-sdk-hosts-to-022) for migration examples.
9 changes: 9 additions & 0 deletions .changeset/remove-provider-plugin-v1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'agent-device': minor
'@agent-device/testmu': minor
'@agent-device/revyl': minor
---

Remove the version 1 provider plugin contract. A store package is now discovered only through its exports: `./agent-device`, or the package root when that subpath is absent. The host no longer reads an `agentDevicePlugin` manifest to choose an entry or to declare a provider, connection capabilities, or credential variables, and `agent-device plugins add` no longer refuses a package for a provider another manifest claims — the registry settles a duplicate provider id when the daemon next composes its plugins, as the first claim wins.

Migrate a plugin by exporting its factory from `./agent-device` and returning the manifest's values from the factory: `provider`, `credentials: { variables: [...] }`, an optional `connection`, and `setup(host)` that returns `{ runtime, platformModule }` or `{ webDriver }`, with `apiVersion: 2`. See [Provider plugins](/docs/plugins) for the full migration. A plugin object with an `apiVersion` other than 2 is listed as `failed` with `incompatible_plugin`, and a default export that is not a plugin factory with `invalid_plugin`; the daemon starts without either.
19 changes: 9 additions & 10 deletions .fallowrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@
"scripts/check-provider-plugin.mjs",
"scripts/check-affected/command.ts",
"packages/provider-testmu/test/package-smoke.mjs",
"packages/maestro/test/package-artifact.test.mjs",
"packages/maestro/test/packed-clickability.mjs",
Comment thread
thymikee marked this conversation as resolved.
Resolved
"packages/maestro/test/packed-screen-origin.mjs",
"packages/maestro/test/package-test-support.mjs",
"packages/maestro/tsdown.config.ts",
"packages/maestro/src/plugin.ts",
"packages/provider-testmu/tsdown.config.ts",
"packages/provider-testmu/src/plugin.ts",
"packages/provider-revyl/test/package-smoke.mjs",
"packages/provider-revyl/tsdown.config.ts",
"packages/provider-revyl/src/plugin.ts",
"packages/provider-webos/test/package-smoke.mjs",
"packages/provider-webos/tsdown.config.ts",
"packages/provider-tizen/test/package-smoke.mjs",
Expand Down Expand Up @@ -152,13 +156,8 @@
"exports": ["*"]
},
{
// A published provider package's default export is its plugin contract; packages/plugins/src/load.ts imports the package by name at runtime and reads `default`.
"file": "packages/provider-*/src/index.ts",
"exports": ["default"]
},
{
// The version 1 entry a provider package's `agentDevicePlugin.entry` names; hosts without the version 2 contract import the built file and read `default`.
"file": "packages/provider-*/src/plugin.ts",
// A published plugin's default export is its contract; the plugin loader imports the installed package's resolved entry at runtime and reads `default`.
"file": "packages/{provider-*/src/index,maestro/src/plugin}.ts",
"exports": ["default"]
},
{
Expand Down Expand Up @@ -288,7 +287,7 @@
},
{
// Tool config default exports, loaded by the tool rather than imported.
"file": "{oxlint.config.ts,tsdown.config.ts,packages/provider-*/tsdown.config.ts,packages/proxy/tsdown.config.ts,vitest.mutation.config.ts}",
"file": "{oxlint.config.ts,tsdown.config.ts,packages/provider-*/tsdown.config.ts,packages/maestro/tsdown.config.ts,packages/proxy/tsdown.config.ts,vitest.mutation.config.ts}",
"exports": ["default"]
},
{
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ on:
push:
branches:
- main
- '0.22'

permissions:
contents: read

# Release and nightly publishing require green CI on the exact main commit, so a
# main push never cancels or replaces another commit's run.
# Release and nightly publishing require green CI on the exact source commit, so a
# push never cancels or replaces another commit's run.
concurrency:
group: >-
ci-${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.sha }}
Expand Down Expand Up @@ -101,6 +102,10 @@ jobs:
uses: ./.github/actions/run-gate
with: { gate: build }

- name: Verify the core and standalone Maestro packages
uses: ./.github/actions/run-gate
with: { gate: package }

- name: Verify emitted chunk ownership
uses: ./.github/actions/run-gate
with: { gate: bundle-owner-files }
Expand All @@ -117,7 +122,7 @@ jobs:
#
# Runs the script directly rather than through `pnpm check:package`: the repo's pinned pnpm
# requires Node >= 22.13 and refuses to start on the 22.12 floor this job exists to cover. The
# gate itself only needs `node` and `npm`, so it is the package.json script minus the launcher.
# root-package probe only needs `node` and `npm`. The full package gate runs above.
- name: Verify the published package on Node.js 22.12
run: node --experimental-strip-types scripts/check-package.ts

Expand Down
17 changes: 7 additions & 10 deletions docs/adr/0034-provider-plugin-registry.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@ Status: accepted. Umbrella #3747; contract and registry #3755.
- `daemon.json` has one reader. Its states are `absent`, `unreadable`, and `invalid`. A missing or
stale record reads as a stopped daemon; an unreadable or invalid one never does.
- The plugin set is fixed for a daemon's lifetime. A plugin change takes effect on the next daemon.
- v1 plugins (`agentDevicePlugin.apiVersion: 1`) without a `./agent-device` export are dispatched by
their manifest before any code runs and load through an adapter until 0.22 removes them (#3759).
A package that keeps the manifest and also exports `./agent-device` loads as v2; hosts without
v2 still read the manifest.
- A store package is discovered through its package targets: the `./agent-device` export, else the
root export, which is `main` for a package that declares no `exports`. Nothing is read from
`package.json` to declare a provider, connection capabilities, or credential variables (#3759).

## Context

Expand All @@ -44,17 +43,15 @@ had to fake the store to load a plugin from its own dependencies (#3747).
fingerprint.
- **A package exports its entry as `./agent-device`.** The host resolves it with import
conditions and falls back to the package root only when the subpath is absent. A subpath whose
import or setup throws never falls back. A v2 package needs no manifest.
import or setup throws never falls back. A plugin package needs no manifest.
- **The registry owns identity, not the retired lists.** Duplicate ids and bundled ids are one
question answered by claim order. Credential variables, per-backend narrowing and connect
capabilities are read from the registry's plugins, not from manifests. A v1 manifest still
supplies them for a v1 plugin.
capabilities are read from the registry's plugins, not from manifests.
- **Failure is data.** A failed plugin is an inventory entry, not an exception. Behavior keys on
`error.reason`, never on the message.
- **A client reads a daemon's inventory from `daemon.json`.** The client credential fingerprint
takes variable names from it and falls back to v1 manifests. A v2 plugin declares its connect
capabilities in code, so a client loads the store, without setting up a runtime, before it reads
them.
takes variable names from it. A v2 plugin declares its connect capabilities in code, so a client
loads the store, without setting up a runtime, before it reads them.

## Daemon ownership

Expand Down
5 changes: 2 additions & 3 deletions docs/agents/code-ownership.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@ Before you edit a module with many callers, run `pnpm depgraph affected <path>`.
| Output formatters | `packages/command-output/src/` |
| Help and progress | `src/commands/` |
| Input fields and audiences | `packages/command-surface/src/common-input-fields.ts`, `packages/command-surface/src/input-audience.ts` |
| Released SDK default hosts | `src/sdk/host.ts` |
| Released SDK command-host scopes | `src/sdk/host.ts` |
| Apple runner host port and binding | `packages/apple-runner/src/host.ts`, `packages/platform-apple/src/core/runner-client.ts` |

For SDK entries `android-adb`, `artifacts`, `limrun`, `metro`, and `remote-config`, use `captureSdkHost` for defaults.
For command-host readers, use `withSdkHost`.
For SDK command-host readers, pass the supplied host to `withSdkHost`.
Keep provider callbacks on their supplied host.
Request cancellation and progress belong in `@agent-device/host-kit/request`.
Per-call abort guards belong beside transports in `packages/daemon-client/src/daemon-client-transport.ts`.
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "agent-device",
"version": "0.21.38-dev",
"version": "0.22.0-dev",
"description": "Open source device layer for AI coding agents: a CLI, MCP server, and typed Node.js API to control mobile, web, TV, and desktop apps on devices and simulators, locally or in the cloud.",
"mcpName": "io.github.callstack/agent-device",
"license": "MIT",
Expand Down Expand Up @@ -165,7 +165,7 @@
"depgraph:test": "node --experimental-strip-types scripts/node-test-tmpdir.ts --experimental-strip-types --test scripts/depgraph/model.test.ts scripts/depgraph/entries.test.ts scripts/depgraph/import-graph.test.ts scripts/depgraph/affected.test.ts scripts/depgraph/structure-summary.test.ts tools/depgraph-view/*.test.mjs",
"check:production-exports": "fallow dead-code --config fallow-production-exports.json --production --unused-exports --fail-on-issues",
"check:bundle-owner-files": "node --experimental-strip-types scripts/check-bundle-owner-files.ts",
"check:package": "node --experimental-strip-types scripts/check-package.ts",
"check:package": "node --experimental-strip-types scripts/check-package.ts && node --experimental-strip-types scripts/node-test-tmpdir.ts --test packages/maestro/test/package-artifact.test.mjs",

Check failure on line 168 in package.json

View check run for this annotation

apex-sentinel-staging / Apex Sentinel

major: check:package's new && suffix swallows release:prepare's --pack-destination flag

`pnpm release:prepare` forwards `--pack-destination .tmp/release` to the end of the script string, so with the new `&&` suffix it lands on the maestro test command instead of `scripts/check-package.ts`—the test runner fails on the unknown option and `check-package.ts` silently loses the pack-destination, so the release flow no longer retains the verified tarball.

Check warning on line 168 in package.json

View check run for this annotation

apex-sentinel-staging / Apex Sentinel

minor: New package-artifact test's .ts host-kit import lacks forwarded --experimental-strip-types

`check:package` invokes `node-test-tmpdir.ts` without `--experimental-strip-types` as its first argument, so the child test process gets no flag. `package-test-support.mjs` imports `@agent-device/host-kit/command` which resolves to `.ts` source, so the child fails with `ERR_UNKNOWN_FILE_EXTENSION`. Every other `node-test-tmpdir` invocation in `package.json` forwards `--experimental-strip-types` first.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: Appending -- --pack-destination .tmp/release to check:package now sends the flag to the last command in the && chain, not to check-package.ts. The release tarball is then not written to .tmp/release, and the test runner gets an unexpected --pack-destination argument. Invoke scripts/check-package.ts directly with the flag in release:prepare instead, and keep the artifact test in check:package.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At package.json, line 168:

<comment>Appending `-- --pack-destination .tmp/release` to `check:package` now sends the flag to the last command in the `&&` chain, not to `check-package.ts`. The release tarball is then not written to `.tmp/release`, and the test runner gets an unexpected `--pack-destination` argument. Invoke `scripts/check-package.ts` directly with the flag in `release:prepare` instead, and keep the artifact test in `check:package`.</comment>

<file context>
@@ -165,7 +165,7 @@
     "check:production-exports": "fallow dead-code --config fallow-production-exports.json --production --unused-exports --fail-on-issues",
     "check:bundle-owner-files": "node --experimental-strip-types scripts/check-bundle-owner-files.ts",
-    "check:package": "node --experimental-strip-types scripts/check-package.ts",
+    "check:package": "node --experimental-strip-types scripts/check-package.ts && node --experimental-strip-types scripts/node-test-tmpdir.ts --test packages/maestro/test/package-artifact.test.mjs",
     "check:command-docs": "vitest run --project unit-core test/repo-guards/command-doc-coverage.test.ts",
     "check:adr-citations": "vitest run --project unit-core test/repo-guards/adr-citations.test.ts",
</file context>

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Accepted; this duplicates the routing issue tracked in #4555 (comment). The local root-9f PREP retains artifact tests first and scripts/check-package.ts last, so forwarded --pack-destination reaches its owner. Current repair candidate is e018cbe6993cd7d522962f68e3ce0ad0a5ca91d1. The published c3b5411 head is unchanged; Node22.13 packaging and predecessor ENV-protocol disposition still block publication. Keeping this open until the fix is published.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: check:package drops the TypeScript flag when the temp-dir wrapper starts the artifact test, so the new test fails on the supported Node 22.12–22.17 range while importing @agent-device/host-kit/command. Pass --experimental-strip-types through to the child invocation.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At package.json, line 168:

<comment>`check:package` drops the TypeScript flag when the temp-dir wrapper starts the artifact test, so the new test fails on the supported Node 22.12–22.17 range while importing `@agent-device/host-kit/command`. Pass `--experimental-strip-types` through to the child invocation.</comment>

<file context>
@@ -165,7 +165,7 @@
     "check:production-exports": "fallow dead-code --config fallow-production-exports.json --production --unused-exports --fail-on-issues",
     "check:bundle-owner-files": "node --experimental-strip-types scripts/check-bundle-owner-files.ts",
-    "check:package": "node --experimental-strip-types scripts/check-package.ts",
+    "check:package": "node --experimental-strip-types scripts/check-package.ts && node --experimental-strip-types scripts/node-test-tmpdir.ts --test packages/maestro/test/package-artifact.test.mjs",
     "check:command-docs": "vitest run --project unit-core test/repo-guards/command-doc-coverage.test.ts",
     "check:adr-citations": "vitest run --project unit-core test/repo-guards/adr-citations.test.ts",
</file context>
Suggested change
"check:package": "node --experimental-strip-types scripts/check-package.ts && node --experimental-strip-types scripts/node-test-tmpdir.ts --test packages/maestro/test/package-artifact.test.mjs",
"check:package": "node --experimental-strip-types scripts/check-package.ts && node --experimental-strip-types scripts/node-test-tmpdir.ts --experimental-strip-types --test packages/maestro/test/package-artifact.test.mjs",

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Accepted for the supported Node22.13-22.17 development range. This duplicates #4555 (comment). The local PREP script explicitly forwards --experimental-strip-types after node-test-tmpdir.ts, preserves the artifact test, and leaves the core package probe last for forwarded release arguments. This is retained at e018cbe6993cd7d522962f68e3ce0ad0a5ca91d1. Node26 passes do not clear the separate Node22.13 nested-packaging blocker; leaving this open until admitted publication.

@apex-sentinel-staging apex-sentinel-staging Bot Nov 14, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🆕 🟡 Minor · New package-artifact test's .ts host-kit import lacks forwarded --experimental-strip-types

check:package invokes node-test-tmpdir.ts without --experimental-strip-types as its first argument, so the child test process gets no flag. package-test-support.mjs imports @agent-device/host-kit/command which resolves to .ts source, so the child fails with ERR_UNKNOWN_FILE_EXTENSION. Every other node-test-tmpdir invocation in package.json forwards --experimental-strip-types first.

Suggested change
"check:package": "node --experimental-strip-types scripts/check-package.ts && node --experimental-strip-types scripts/node-test-tmpdir.ts --test packages/maestro/test/package-artifact.test.mjs",
"check:package": "node --experimental-strip-types scripts/check-package.ts && node --experimental-strip-types scripts/node-test-tmpdir.ts --experimental-strip-types --test packages/maestro/test/package-artifact.test.mjs",
Details

persona: senior-developer, javascript

Useful? Reply @apex-sentinel-staging like, or @apex-sentinel-staging dislike <why> if it is not.

Reply @apex-sentinel-staging note ... to add context, or @apex-sentinel-staging pivot ... if it is wrong — I will re-check the cited code.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Accepted after rechecking the supported development floor. My earlier dismissal based only on Node 22.12 being outside the repository's Node >=22.13 development contract was incomplete: Node 22.13–22.17 still requires the child flag. Type stripping became enabled by default in Node 22.18; the 22.13 documentation specifies --experimental-strip-types.

The local correction at PREP 15036137c69b9601d933bb50fba24e089aa53e35 explicitly forwards that flag after node-test-tmpdir.ts, while also correcting the release-argument routing reported in the other thread. All existing artifact/smoke test paths are preserved upstack. This is committed locally, not published or newly validated. An actual supported-floor check is still owed; current Node 26 results are not floor coverage. Keeping the thread open until review/validation/publication clear.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🆕 🟠 Major · check:package's new && suffix swallows release:prepare's --pack-destination flag

pnpm release:prepare forwards --pack-destination .tmp/release to the end of the script string, so with the new && suffix it lands on the maestro test command instead of scripts/check-package.ts—the test runner fails on the unknown option and check-package.ts silently loses the pack-destination, so the release flow no longer retains the verified tarball.

Suggested change

Keep check:package a single command that takes forwarded args (e.g. move the maestro artifact test into its own script or have check-package.ts spawn it after its own probe), so pnpm check:package -- --pack-destination ... still reaches scripts/check-package.ts.

Details

persona: senior-developer

Useful? Reply @apex-sentinel-staging like, or @apex-sentinel-staging dislike <why> if it is not.

Reply @apex-sentinel-staging note ... to add context, or @apex-sentinel-staging pivot ... if it is wrong — I will re-check the cited code.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Accepted. The appended release arguments reach the final command in the script, so the current order deprives scripts/check-package.ts of --pack-destination.

A local correction at PREP 15036137c69b9601d933bb50fba24e089aa53e35 runs the artifact tests first and keeps the core package probe last. This preserves the existing package gate and its forwarded arguments without adding a wrapper or removing tests. All consumer/TOP test-file suffixes are retained in the restacked local family, ending at 3c7f1cc9fa9ce359df63da6ba5d1a34a3e55287d.

A standalone argument-routing probe using pinned pnpm 11.17.0 and the actual PREP/TOP script strings confirms old routing fails the ownership condition and corrected routing passes. Both raw pnpm commands exit 0 because the fixture only records argv; this is not an actual release, retained-tarball test or canonical-gate pass. Actual package-destination verification, independent source review and new-head validation remain owed. Keeping this thread open until the correction is admitted and published. No release/publish/CI rerun was triggered.

"check:command-docs": "vitest run --project unit-core test/repo-guards/command-doc-coverage.test.ts",
"check:adr-citations": "vitest run --project unit-core test/repo-guards/adr-citations.test.ts",
"check:capabilities-matrix": "vitest run --project unit-core test/repo-guards/capability-matrix.test.ts",
Expand Down
3 changes: 1 addition & 2 deletions packages/command-registry/src/batch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@ import {
type DaemonResponse,
type ResponseLevel,
isNonDefaultResponseLevel,
namesSessionExplicitly,
} from '@agent-device/kernel/contracts';
import {
AppError,
asAppError,
BOUNDED_COMPOSITE_RESOURCE_UNSUPPORTED_REASON,
type DaemonError,
} from '@agent-device/kernel/errors';
import { isRecord } from '@agent-device/kernel/record';
import { isRecord, namesSessionExplicitly } from '@agent-device/kernel/record';
import {
DEFAULT_BATCH_MAX_STEPS,
assertBatchStepCount,
Expand Down
6 changes: 6 additions & 0 deletions packages/command-registry/src/daemon-command-descriptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ export type DaemonCommandDescriptor<TRequest = DispatchedCommand> = {
sessionKind?: SessionCommandKind;
refFrameEffect?: DaemonRefFrameEffect<TRequest>;
leaseAdmissionExempt?: boolean;
/**
* This command uses neither the lease nor the device of the session it resolves, so only a lease
* it carries itself can make an unnamed request need a session. A command without it acts through
* that session and stays refused.
*/
ignoresSessionLease?: boolean;
/**
* packages/daemon/docs/remote-device-lease-contracts.md: this command may run under a `macos-app` lease, or on a daemon whose policy requires
* one. A command without it is refused there, `leaseAdmissionExempt` or not, so a command
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ export const SESSION_OPERATION_COMMAND_DESCRIPTORS = [
daemon: {
route: 'session',
refFrameEffect: 'preserve',
ignoresSessionLease: true,
...REQUEST_EXECUTION_EXEMPT,
},
timeoutPolicy: DEFAULT_TIMEOUT_POLICY,
Expand Down
5 changes: 5 additions & 0 deletions packages/command-registry/src/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ export const RAW_COMMAND_DESCRIPTORS = [
daemon: {
route: 'lease',
refFrameEffect: 'preserve',
ignoresSessionLease: true,
...ADMISSION_AND_LOCK_EXEMPT,
},
timeoutPolicy: LEASE_ALLOCATE_TIMEOUT_POLICY,
Expand All @@ -191,6 +192,7 @@ export const RAW_COMMAND_DESCRIPTORS = [
daemon: {
route: 'lease',
refFrameEffect: 'preserve',
ignoresSessionLease: true,
...ADMISSION_AND_LOCK_EXEMPT,
appLease: 'allowed',
},
Expand All @@ -209,6 +211,7 @@ export const RAW_COMMAND_DESCRIPTORS = [
daemon: {
route: 'lease',
refFrameEffect: 'preserve',
ignoresSessionLease: true,
...ADMISSION_AND_LOCK_EXEMPT,
appLease: 'allowed',
},
Expand Down Expand Up @@ -251,6 +254,7 @@ export const RAW_COMMAND_DESCRIPTORS = [
daemon: {
route: 'session',
refFrameEffect: 'preserve',
ignoresSessionLease: true,
sessionKind: 'inventory',
...REQUEST_EXECUTION_EXEMPT,
},
Expand Down Expand Up @@ -291,6 +295,7 @@ export const RAW_COMMAND_DESCRIPTORS = [
daemon: {
route: 'session',
refFrameEffect: 'preserve',
ignoresSessionLease: true,
sessionKind: 'inventory',
lockPolicySelectorOverride: true,
...REQUEST_EXECUTION_EXEMPT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ test('runtime diff screenshot captures live current image and cleans temporary c
fs.writeFileSync(outPath, solidPngBuffer(10, 10, { r: 255, g: 255, b: 255 }));
return { path: outPath };
}),
artifacts: createLocalArtifactAdapter(),
artifacts: createLocalArtifactAdapter({ cwd: process.cwd() }),
sessions,
policy: localCommandPolicy(),
});
Expand Down Expand Up @@ -74,7 +74,7 @@ test('runtime diff screenshot compares supplied current image without backend ca
backend: createScreenshotBackend(() => {
throw new Error('capture should not be called');
}),
artifacts: createLocalArtifactAdapter(),
artifacts: createLocalArtifactAdapter({ cwd: process.cwd() }),
sessions,
policy: localCommandPolicy(),
});
Expand All @@ -97,7 +97,7 @@ test('runtime diff screenshot rejects overlay refs with supplied current image',
backend: createScreenshotBackend(() => {
throw new Error('capture should not be called');
}),
artifacts: createLocalArtifactAdapter(),
artifacts: createLocalArtifactAdapter({ cwd: process.cwd() }),
sessions,
policy: localCommandPolicy(),
});
Expand Down Expand Up @@ -125,7 +125,7 @@ test('runtime diff screenshot enforces the normalized comparison pixel budget',
backend: createScreenshotBackend(() => {
throw new Error('capture should not be called');
}),
artifacts: createLocalArtifactAdapter(),
artifacts: createLocalArtifactAdapter({ cwd: process.cwd() }),
sessions,
policy: localCommandPolicy({ maxImagePixels: 50 }),
});
Expand Down Expand Up @@ -172,7 +172,7 @@ test('runtime diff screenshot keeps the screen mask on current and overlay captu
: {}),
};
}),
artifacts: createLocalArtifactAdapter(),
artifacts: createLocalArtifactAdapter({ cwd: process.cwd() }),
sessions,
policy: localCommandPolicy(),
});
Expand Down Expand Up @@ -238,7 +238,7 @@ test('runtime diff refuses a screen mask for saved images before reading or capt
backend: createScreenshotBackend(() => {
throw new Error('must not capture');
}),
artifacts: createLocalArtifactAdapter(),
artifacts: createLocalArtifactAdapter({ cwd: process.cwd() }),
sessions,
policy: localCommandPolicy(),
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ async function captureWith(result: BackendSnapshotResult) {
};
const device = createAgentDevice({
backend,
artifacts: createLocalArtifactAdapter(),
artifacts: createLocalArtifactAdapter({ cwd: process.cwd() }),
sessions,
policy: localCommandPolicy(),
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ test('runtime screenshot applies scale and forwards the capture rotation', async
return { displayRotation: 'landscape-left' };
},
} satisfies AgentDeviceBackend,
artifacts: createLocalArtifactAdapter(),
artifacts: createLocalArtifactAdapter({ cwd: process.cwd() }),
sessions: { get: () => undefined, set: () => {} },
policy: localCommandPolicy(),
});
Expand Down Expand Up @@ -47,7 +47,7 @@ test('runtime screenshot scales the already-cropped backend capture', async () =
);
},
} satisfies AgentDeviceBackend,
artifacts: createLocalArtifactAdapter(),
artifacts: createLocalArtifactAdapter({ cwd: process.cwd() }),
sessions: { get: () => undefined, set: () => {} },
policy: localCommandPolicy(),
});
Expand Down Expand Up @@ -94,7 +94,7 @@ for (const staged of [false, true]) {
fs.writeFileSync(destination, sentinel);
const controller = new AbortController();
const cancellation = new Error('caller cancelled after capture');
const adapter = createLocalArtifactAdapter();
const adapter = createLocalArtifactAdapter({ cwd: process.cwd() });
let publications = 0;
let cleanups = 0;
if (staged) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ async function snapshotWithForeground(
...sessionApp,
}),
},
artifacts: createLocalArtifactAdapter(),
artifacts: createLocalArtifactAdapter({ cwd: process.cwd() }),
sessions: {
get: () => undefined,
set: (record) => {
Expand Down Expand Up @@ -94,7 +94,7 @@ test('a repeated unchanged snapshot of a foreign foreground app is acknowledged
appBundleId: 'com.android.settings',
}),
},
artifacts: createLocalArtifactAdapter(),
artifacts: createLocalArtifactAdapter({ cwd: process.cwd() }),
sessions: {
get: () => stored,
set: (record) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function snapshotDevice(
};
return createAgentDevice({
backend,
artifacts: createLocalArtifactAdapter(),
artifacts: createLocalArtifactAdapter({ cwd: process.cwd() }),
sessions: { get: () => session, set: () => {} },
policy: localCommandPolicy(),
clock: { now: () => 1_500, sleep: async () => {} },
Expand Down
Loading
Loading