agent-device 0.8.6 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- export { createAgentDeviceClient, type AgentDeviceClient, type AgentDeviceClientConfig, type AgentDeviceDevice, type AgentDeviceIdentifiers, type AgentDeviceSelectionOptions, type AgentDeviceSession, type AgentDeviceSessionDevice, type AppCloseOptions, type AppCloseResult, type AppDeployOptions, type AppDeployResult, type AppInstallFromSourceOptions, type AppInstallFromSourceResult, type AppOpenOptions, type AppOpenResult, type CaptureScreenshotOptions, type CaptureScreenshotResult, type CaptureSnapshotOptions, type CaptureSnapshotResult, type EnsureSimulatorOptions, type EnsureSimulatorResult, type MaterializationReleaseOptions, type MaterializationReleaseResult, type MetroPrepareOptions, type MetroPrepareResult, type RuntimeResult, type RuntimeSetOptions, type RuntimeShowOptions, type SessionCloseResult, type StartupPerfSample, } from './client.ts';
1
+ export { createAgentDeviceClient, type AgentDeviceClient, type AgentDeviceClientConfig, type AgentDeviceDevice, type AgentDeviceIdentifiers, type AgentDeviceSelectionOptions, type AgentDeviceSession, type AgentDeviceSessionDevice, type AppCloseOptions, type AppCloseResult, type AppDeployOptions, type AppDeployResult, type AppInstallFromSourceOptions, type AppInstallFromSourceResult, type AppOpenOptions, type AppOpenResult, type CaptureScreenshotOptions, type CaptureScreenshotResult, type CaptureSnapshotOptions, type CaptureSnapshotResult, type EnsureSimulatorOptions, type EnsureSimulatorResult, type MaterializationReleaseOptions, type MaterializationReleaseResult, type MetroPrepareOptions, type MetroPrepareResult, type SessionCloseResult, type StartupPerfSample, } from './client.ts';
2
2
  export { AppError, type NormalizedError } from './utils/errors.ts';
3
3
  export type { MetroPrepareKind, MetroRuntimeHints } from './client-metro.ts';
4
4
  export type { SessionRuntimeHints } from './daemon/types.ts';
@@ -21,7 +21,7 @@ type FinalizeArgsOptions = ParseArgsOptions & {
21
21
  export declare function parseArgs(argv: string[], options?: FinalizeArgsOptions): ParsedArgs;
22
22
  export declare function parseRawArgs(argv: string[]): RawParsedArgs;
23
23
  export declare function finalizeParsedArgs(parsed: RawParsedArgs, options?: FinalizeArgsOptions): ParsedArgs;
24
- export declare function toDaemonFlags(flags: CliFlags): Omit<CliFlags, 'json' | 'config' | 'help' | 'version'>;
24
+ export declare function toDaemonFlags(flags: CliFlags): Omit<CliFlags, 'json' | 'config' | 'remoteConfig' | 'help' | 'version'>;
25
25
  export declare function usage(): string;
26
26
  export declare function usageForCommand(command: string): string | null;
27
27
  export {};
@@ -1,4 +1,4 @@
1
- import { type CliFlags } from './command-schema.ts';
1
+ import { type CliFlags, type FlagKey } from './command-schema.ts';
2
2
  type EnvMap = Record<string, string | undefined>;
3
3
  export declare function resolveConfigBackedFlagDefaults(options: {
4
4
  command: string | null;
@@ -6,4 +6,5 @@ export declare function resolveConfigBackedFlagDefaults(options: {
6
6
  cliFlags: CliFlags;
7
7
  env?: EnvMap;
8
8
  }): Partial<CliFlags>;
9
+ export declare function readEnvFlagDefaultsForKeys(env: EnvMap, keys: readonly FlagKey[]): Partial<CliFlags>;
9
10
  export {};
@@ -1,6 +1,7 @@
1
1
  export type CliFlags = {
2
2
  json: boolean;
3
3
  config?: string;
4
+ remoteConfig?: string;
4
5
  stateDir?: string;
5
6
  daemonBaseUrl?: string;
6
7
  daemonAuthToken?: string;
@@ -97,13 +98,15 @@ export type FlagDefinition = {
97
98
  usageDescription?: string;
98
99
  };
99
100
  type CommandSchema = {
100
- description: string;
101
+ helpDescription: string;
102
+ summary?: string;
101
103
  positionalArgs: readonly string[];
102
104
  allowsExtraPositionals?: boolean;
103
105
  allowedFlags: readonly FlagKey[];
104
106
  defaults?: Partial<CliFlags>;
105
107
  skipCapabilityCheck?: boolean;
106
108
  usageOverride?: string;
109
+ listUsageOverride?: string;
107
110
  };
108
111
  export declare const GLOBAL_FLAG_KEYS: Set<keyof CliFlags>;
109
112
  export declare function getFlagDefinition(token: string): FlagDefinition | undefined;
@@ -0,0 +1,15 @@
1
+ import type { CliFlags } from './command-schema.ts';
2
+ type EnvMap = Record<string, string | undefined>;
3
+ export declare const REMOTE_OPEN_FLAG_KEYS: readonly ["remoteConfig", "session", "platform", "daemonBaseUrl", "daemonAuthToken", "daemonTransport", "metroProjectRoot", "metroKind", "metroPublicBaseUrl", "metroProxyBaseUrl", "metroBearerToken", "metroPreparePort", "metroListenHost", "metroStatusHost", "metroStartupTimeoutMs", "metroProbeTimeoutMs", "metroRuntimeFile", "metroNoReuseExisting", "metroNoInstallDeps"];
4
+ export declare function loadRemoteConfigFile(options: {
5
+ configPath: string;
6
+ cwd: string;
7
+ env?: EnvMap;
8
+ }): Partial<CliFlags>;
9
+ export declare function resolveRemoteConfigDefaults(options: {
10
+ cliFlags: CliFlags;
11
+ cwd: string;
12
+ env: EnvMap;
13
+ }): Partial<CliFlags>;
14
+ export declare function pickRemoteOpenDefaults(defaultFlags: Partial<CliFlags>): Partial<CliFlags>;
15
+ export {};
@@ -0,0 +1,9 @@
1
+ import type { AgentDeviceClient } from '../client.ts';
2
+ import type { CliFlags } from './command-schema.ts';
3
+ export declare function resolveRemoteOpenRuntime(flags: CliFlags, client: AgentDeviceClient): Promise<{
4
+ platform?: 'ios' | 'android';
5
+ metroHost?: string;
6
+ metroPort?: number;
7
+ bundleUrl?: string;
8
+ launchUrl?: string;
9
+ } | undefined>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-device",
3
- "version": "0.8.6",
3
+ "version": "0.9.0",
4
4
  "description": "Unified control plane for physical and virtual devices via an agent-driven CLI.",
5
5
  "license": "MIT",
6
6
  "author": "Callstack",
@@ -33,7 +33,7 @@ Use this skill as a router, not a full manual.
33
33
  - iOS local QA: use simulators unless the task explicitly requires a physical device.
34
34
  - iOS local QA in mixed simulator/device environments: run `ensure-simulator` first and pass `--device`, `--udid`, or `--ios-simulator-device-set` on later commands.
35
35
  - Android local QA: use `install` or `reinstall` for `.apk`/`.aab` files, then relaunch by installed package name.
36
- - Android React Native + Metro flows: set runtime hints with `runtime set` before `open <package> --relaunch`.
36
+ - Android React Native + Metro flows: prefer `open <package> --remote-config <path> --relaunch`.
37
37
  - In mixed-device environments, always pin the exact target with `--serial`, `--device`, `--udid`, or an isolation scope.
38
38
  - For session-bound automation runs, prefer a pre-bound session/platform instead of repeating selectors on every command: set `AGENT_DEVICE_SESSION`, set `AGENT_DEVICE_PLATFORM`, and the daemon will enforce the shared lock policy across CLI, typed client, and RPC entry points.
39
39
  - Use `--session-lock reject|strip` (or `AGENT_DEVICE_SESSION_LOCK`) only when you need to override the default reject behavior. Lock mode applies to nested `batch` steps too.
@@ -67,8 +67,7 @@ Use this when a physical iPhone is also connected and you want deterministic sim
67
67
 
68
68
  ```bash
69
69
  agent-device reinstall MyApp /path/to/app-debug.apk --platform android --serial emulator-5554
70
- agent-device runtime set --session qa-android --platform android --metro-host 10.0.2.2 --metro-port 8081
71
- agent-device open com.example.myapp --platform android --serial emulator-5554 --session qa-android --relaunch
70
+ agent-device open com.example.myapp --remote-config ./agent-device.remote.json --relaunch
72
71
  agent-device snapshot -i
73
72
  agent-device close
74
73
  ```
@@ -186,7 +185,7 @@ That includes bound-session defaults such as `sessionLock` / `AGENT_DEVICE_SESSI
186
185
  For Android emulators by AVD name, use `boot --platform android --device <avd-name>`.
187
186
  For Android emulators without GUI, add `--headless`.
188
187
  Use `--target mobile|tv` with `--platform` (required) to pick phone/tablet vs TV targets (AndroidTV/tvOS).
189
- For Android React Native + Metro flows, install or reinstall the APK first, set runtime hints with `runtime set`, then use `open <package> --relaunch`; do not use `open <apk|aab> --relaunch`.
188
+ For Android React Native + Metro flows, install or reinstall the APK first, then use `open <package> --remote-config <path> --relaunch`; do not use `open <apk|aab> --relaunch`.
190
189
  For local iOS QA in mixed simulator/device environments, use `ensure-simulator` and pass `--device` or `--udid` so automation does not attach to a physical device by accident.
191
190
  For session-bound automation, prefer `AGENT_DEVICE_SESSION` + `AGENT_DEVICE_PLATFORM`; that bound-session default now enables lock mode automatically.
192
191