agent-device 0.21.19 → 0.21.20
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.
- package/android/ime-helper/dist/{agent-device-android-ime-helper-0.21.19.apk → agent-device-android-ime-helper-0.21.20.apk} +0 -0
- package/android/ime-helper/dist/agent-device-android-ime-helper-0.21.20.apk.sha256 +1 -0
- package/android/ime-helper/dist/{agent-device-android-ime-helper-0.21.19.manifest.json → agent-device-android-ime-helper-0.21.20.manifest.json} +4 -4
- package/android/snapshot-helper/dist/{agent-device-android-snapshot-helper-0.21.19.apk → agent-device-android-snapshot-helper-0.21.20.apk} +0 -0
- package/android/snapshot-helper/dist/agent-device-android-snapshot-helper-0.21.20.apk.sha256 +1 -0
- package/android/snapshot-helper/dist/{agent-device-android-snapshot-helper-0.21.19.manifest.json → agent-device-android-snapshot-helper-0.21.20.manifest.json} +6 -6
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunner/AgentDeviceRunnerApp.m +12 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+CommandJournal.swift +1 -14
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Interaction.swift +14 -16
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Models.swift +40 -14
- package/dist/apple/snapshot-presentation/Sources/AgentDeviceSnapshotPresentation/SnapshotModels.swift +20 -5
- package/dist/apple/snapshot-presentation/Sources/AgentDeviceSnapshotPresentation/SnapshotPresentationProjection.swift +2 -15
- package/dist/apple/snapshot-presentation/Sources/AgentDeviceSnapshotPresentation/SnapshotVisibilityFold.swift +10 -25
- package/dist/apple/snapshot-presentation/Sources/AgentDeviceSnapshotPresentation/SnapshotVisibilityFoldProjection.swift +1 -18
- package/dist/src/adapter.js +1 -1
- package/dist/src/adb-failure.js +1 -1
- package/dist/src/agent-browser-process-record.js +1 -1
- package/dist/src/agent-browser-provider.js +1 -1
- package/dist/src/agent-browser-tool.js +1 -1
- package/dist/src/agent-device-client.js +2 -2
- package/dist/src/alert-runtime.js +1 -1
- package/dist/src/alert.js +1 -0
- package/dist/src/android-input-ownership.js +1 -1
- package/dist/src/app-launch.js +2 -2
- package/dist/src/app-lifecycle.js +1 -1
- package/dist/src/app-resolution.js +2 -2
- package/dist/src/apple-runner-platform.js +1 -1
- package/dist/src/archive.js +2 -2
- package/dist/src/browser-launch.js +1 -1
- package/dist/src/cache.js +1 -1
- package/dist/src/cli-config.js +1 -1
- package/dist/src/cli-help.js +287 -301
- package/dist/src/cli-runner.js +1 -1
- package/dist/src/cli.js +1 -1
- package/dist/src/client-metro-companion.js +1 -1
- package/dist/src/client-metro.js +1 -1
- package/dist/src/client-types.d.ts +14 -2
- package/dist/src/{scroll-command.d.ts → cloud-artifacts.d.ts} +242 -238
- package/dist/src/command-schema.js +3 -3
- package/dist/src/command-tools.js +2 -2
- package/dist/src/command.js +1 -1
- package/dist/src/config.js +1 -1
- package/dist/src/connection-runtime.js +1 -1
- package/dist/src/daemon-client-lifecycle.js +1 -1
- package/dist/src/daemon-client-transport.js +1 -1
- package/dist/src/daemon-registration.js +1 -1
- package/dist/src/debug-symbols-facade.js +3 -3
- package/dist/src/device-rotation.js +1 -1
- package/dist/src/devicectl.js +1 -1
- package/dist/src/display-inventory.js +1 -1
- package/dist/src/exec.js +1 -1
- package/dist/src/hdc.js +1 -1
- package/dist/src/helper.js +2 -2
- package/dist/src/host.js +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/interactor.js +5 -5
- package/dist/src/interactor2.js +1 -1
- package/dist/src/internal/bin.js +1 -1
- package/dist/src/internal/daemon.js +2 -2
- package/dist/src/launch-confirmation.js +1 -0
- package/dist/src/limrun-runtime-dependencies.js +1 -1
- package/dist/src/limrun.d.ts +50 -42
- package/dist/src/mechanics.js +16 -16
- package/dist/src/owner-identity.js +1 -1
- package/dist/src/perf-facade.js +1 -1
- package/dist/src/perf-target.js +1 -1
- package/dist/src/physical-device-control.js +1 -1
- package/dist/src/platform-runtime-android-adb-host.js +1 -1
- package/dist/src/platform-runtime-app-log-process.js +1 -1
- package/dist/src/platform-runtime-host.js +1 -1
- package/dist/src/platform-runtime-operation-host.js +2 -2
- package/dist/src/platform-runtime-runtime-hints.js +1 -1
- package/dist/src/platform-runtime-screen-recording-apple-simulator-host.js +1 -1
- package/dist/src/platform-runtime-screen-recording-finalizer-host.js +1 -1
- package/dist/src/provider-session-ownership.js +1 -1
- package/dist/src/provider-webdriver.js +1 -1
- package/dist/src/registry.js +20 -4
- package/dist/src/result-serialization.js +1 -1
- package/dist/src/runner-cache-metadata.js +3 -3
- package/dist/src/runner-client.js +1 -1
- package/dist/src/runner-dev-tools-security.js +1 -1
- package/dist/src/runner-device-readiness.js +1 -1
- package/dist/src/runner-disposal.js +1 -1
- package/dist/src/runner-error-classification.js +1 -1
- package/dist/src/runner-exchange.js +1 -1
- package/dist/src/runner-operations-facade.js +1 -1
- package/dist/src/runner-session-types.js +1 -1
- package/dist/src/runner-start-budget.js +1 -1
- package/dist/src/runner-startup-transport.js +1 -1
- package/dist/src/runner-xctestrun.js +1 -1
- package/dist/src/runtime.js +1 -1
- package/dist/src/runtime10.js +1 -1
- package/dist/src/runtime2.js +1 -1
- package/dist/src/runtime4.js +5 -5
- package/dist/src/screenshot-result.js +1 -1
- package/dist/src/screenshot-runtime.js +1 -1
- package/dist/src/screenshot3.js +1 -1
- package/dist/src/sdk-contracts.d.ts +2 -0
- package/dist/src/sdk-contracts.js +2 -2
- package/dist/src/sdk-selectors.d.ts +4 -4
- package/dist/src/session2.js +1 -1
- package/dist/src/simulator-boot.js +1 -1
- package/dist/src/simulator.js +1 -1
- package/dist/src/snapshot-runtime.js +1 -1
- package/dist/src/tool-provider.js +3 -3
- package/dist/src/tool-provider2.js +1 -1
- package/dist/src/tool-provider3.js +1 -1
- package/dist/src/toolchain-probe.js +1 -1
- package/dist/src/update-check.js +1 -1
- package/dist/src/video.js +1 -1
- package/package.json +1 -1
- package/server.json +2 -2
- package/android/ime-helper/dist/agent-device-android-ime-helper-0.21.19.apk.sha256 +0 -1
- package/android/snapshot-helper/dist/agent-device-android-snapshot-helper-0.21.19.apk.sha256 +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{N as e}from"./sdk-contracts.js";import{rn as t}from"./sdk-batch.js";import{r as n}from"./diagnostics.js";import"./diagnostics2.js";import{s as r}from"./app-resolution.js";import{n as i}from"./alert.js";const a=`launch_confirmation_foreign_app`,o=/^Open in [“"].+[”"]\?$/u,s=1e4;async function c(t){let r=await l(t);if(`outcome`in r)return r;if(!r.alert)return{outcome:`absent`};if(!f(r.alert))return n({level:`warn`,phase:`ios_launch_confirmation_unanswered`,data:{reason:`alert-unrecognized`,title:r.alert.message,buttons:r.alert.items}}),{outcome:`unanswered`,reason:`alert-unrecognized`};let i=await u(t);if(`outcome`in i)return i;if(i.owner===void 0)return m(`url-owner-unresolved`,{}),{outcome:`unanswered`,reason:`url-owner-unresolved`};if(i.owner!==t.appBundleId)throw new e(`COMMAND_FAILED`,`The launch URL asks to open ${i.owner} instead.`,{reason:a,foreignAppBundleId:i.owner,sessionAppBundleId:t.appBundleId,hint:`iOS is asking whether to open ${i.owner}. Answer it with alert accept or alert dismiss, and pass a launch URL whose scheme belongs to the session app.`});return await t.acceptAlert().then(d,p(`alert-accept`))}async function l(e){return await e.readAlert().then(e=>({alert:e}),p(`alert-read`))}async function u(e){return await e.resolveUrlOwner().then(e=>({owner:e}),p(`url-owner`))}function d(){return{outcome:`accepted`}}function f(e){let t=e.message;return typeof t==`string`&&o.test(t)}function p(t){return n=>(m(`step-failed`,{step:t,code:n instanceof e?n.code:void 0}),{outcome:`unreadable`,step:t})}function m(e,t){n({level:`debug`,phase:`ios_launch_confirmation_unanswered`,data:{reason:e,...t}})}async function h(e,t,n,r){let i=await n.then(e=>({interactor:e}),p(`runner`));return`outcome`in i?i:await c(g(e,t,i.interactor,r))}function g(e,{url:n,appBundleId:a},o,c){let l=o.readAlert?.bind(o),u=o.acceptAlert?.bind(o);if(!l||!u)throw t(`Apple interactor has no alert read or accept leg`);let d={appBundleId:a,surface:`app`};return Object.freeze({appBundleId:a,readAlert:async()=>await i(l(d)),acceptAlert:async()=>await u(d),resolveUrlOwner:async()=>await r(e,n,{timeoutMs:s,signal:c})})}export{a as LAUNCH_CONFIRMATION_FOREIGN_APP_REASON,s as URL_OWNER_LOOKUP_TIMEOUT_MS,c as answerLaunchConfirmation,h as answerSimulatorLaunchConfirmation,g as createLaunchConfirmationPort};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime.js";import{N as t}from"./sdk-contracts.js";import{
|
|
1
|
+
import{r as e}from"./rolldown-runtime.js";import{N as t}from"./sdk-contracts.js";import{l as n,r}from"./exec.js";import"./command.js";import{a as i}from"./version.js";import{_ as a}from"./adb-executor.js";import{i as o,o as s,r as c}from"./adb-transport.js";import"./mechanics.js";import"./platform-runtime-android-adb-host.js";import{n as l}from"./android.js";var u=e({createLimrunRuntimeDependencies:()=>d});function d(){return{clientVersion:i(),android:{createInteractor:(e,t)=>l(e,t),createPortReverse:async e=>{let{createAndroidPortReverseManager:t}=await import(`./mechanics.js`).then(e=>e.r);return t(e)},inferAppName:async e=>{let{inferAndroidAppName:t}=await import(`./mechanics.js`).then(e=>e.r);return t(e)},listApps:async(e,t)=>{let{listAndroidAppsWithAdb:n}=await import(`./mechanics.js`).then(e=>e.r);return(await n(e,{filter:t,target:`mobile`})).map(e=>({id:e.package,name:e.name}))},getForegroundApp:async(e,t,n)=>{let{getAndroidAppStateWithAdb:r}=await import(`./platform-runtime.js`).then(e=>e.a),i=await r(async(e,r)=>await t(e,{...r,signal:n}),n);return i.package?{appId:i.package,activity:i.activity}:void 0},getKeyboardState:async e=>{let{getAndroidKeyboardStatusWithAdb:t}=await import(`./mechanics.js`).then(e=>e.r);return await t(e)},dismissKeyboard:async e=>{let{dismissAndroidKeyboardWithAdb:t}=await import(`./mechanics.js`).then(e=>e.r);return await t(e)},readLogs:async(e,t)=>{let{captureAndroidLogcatWithAdb:n}=await import(`./mechanics.js`).then(e=>e.r);return await n(e,{lines:t,timeoutMs:5e3})},forceStopApp:async(e,t,n)=>{let{runAdbShell:r}=await import(`./mechanics.js`).then(e=>e.r);await r(async(t,r)=>await e(t,{...r,signal:n}),[`am`,`force-stop`,t],{allowFailure:!0})},deviceAdbInvocation:(e,t)=>o(s(e),t),hostAdbInvocation:e=>o(c(),e),adbError:async(e,t,n)=>{let{androidAdbResultError:r,serializeAndroidAdbInvocation:i}=await import(`./mechanics.js`).then(e=>e.r);return r(e,t,n?{command:`adb ${i(n).join(` `)}`}:void 0)}},host:{runAdb:async(e,t)=>await a(e,t),downloadFile:async e=>{let{downloadLimrunFile:t}=await import(`./limrun-download-file.js`);await t(e)},archiveDirectory:async({sourceDirectory:e,entryName:i,archivePath:a})=>{let o=[`-qr`,a,i],s=await n(`zip`,o,{cwd:e,timeoutMs:12e4});if(s.exitCode!==0)throw new t(`COMMAND_FAILED`,`Failed to package iOS .app for Limrun install`,{command:[`zip`,...o].join(` `),...r(s)})}},ios:{resolveAppAlias:async e=>{let{resolveIosAppAlias:t}=await import(`./app-resolution-facade.js`);return t(e)},readBundleAppName:async e=>{let{readIosBundleInfo:t}=await import(`./install-artifact-facade.js`);return(await t(e)).appName}}}}export{u as n,d as t};
|
package/dist/src/limrun.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { A as Rect, D as IosTargetActivation, F as SnapshotOptions$1, I as SnapshotProvenance, N as SnapshotKeyboardBandFact, O as Point, S as DeviceTarget, b as DeviceInfo, f as LeaseBackend, k as RawSnapshotNode, w as PlatformSelector, x as DeviceKind } from "./sdk-contracts.js";
|
|
2
2
|
import { s as AppsFilter, t as GesturePlan } from "./gesture-plan-types.js";
|
|
3
|
-
import { A as SessionSurface, E as BackendSnapshotResult, b as ScrollDirection, c as BackMode, h as SettingOptions, i as DeviceRotation, m as ReadableSetting, n as ScrollExecutionOptions, p as ReadSettingResult, r as TvRemoteButton, v as CloudArtifactProvider } from "./scroll-command.js";
|
|
4
3
|
import { d as AndroidAdbProvider, m as AppStateRuntimeResult, n as AndroidKeyboardState, s as AndroidInputOwner, t as AndroidKeyboardDismissResult } from "./device-input-state.js";
|
|
4
|
+
import { A as BackMode, E as DeviceRotation, a as BackendSnapshotResult, b as ScrollExecutionOptions, g as SettingOptions, h as ReadableSetting, l as SessionSurface, m as ReadSettingResult, n as CloudArtifactProvider, v as TvRemoteButton, x as ScrollDirection } from "./cloud-artifacts.js";
|
|
5
5
|
//#region packages/contracts/src/device-inventory.d.ts
|
|
6
6
|
type DeviceInventoryRequest = {
|
|
7
7
|
platform?: PlatformSelector;
|
|
@@ -23,46 +23,6 @@ type DeviceInventoryRequest = {
|
|
|
23
23
|
};
|
|
24
24
|
type ProviderDeviceInventoryRequest = Omit<DeviceInventoryRequest, 'booted' | 'kind'>;
|
|
25
25
|
//#endregion
|
|
26
|
-
//#region packages/contracts/src/device-provider.d.ts
|
|
27
|
-
type DeviceLease = {
|
|
28
|
-
leaseId: string;
|
|
29
|
-
tenantId: string;
|
|
30
|
-
runId: string;
|
|
31
|
-
backend: LeaseBackend;
|
|
32
|
-
leaseProvider?: string;
|
|
33
|
-
deviceKey?: string;
|
|
34
|
-
clientId?: string;
|
|
35
|
-
createdAt: number;
|
|
36
|
-
heartbeatAt: number;
|
|
37
|
-
expiresAt: number;
|
|
38
|
-
};
|
|
39
|
-
type LeaseLifecycleContext = {
|
|
40
|
-
flags?: Readonly<Record<string, unknown>>;
|
|
41
|
-
initialApp?: string;
|
|
42
|
-
cwd?: string;
|
|
43
|
-
publicNetworkOnly?: boolean;
|
|
44
|
-
/** Request-bound cancellation (explicit cancel or client disconnect). */
|
|
45
|
-
signal?: AbortSignal;
|
|
46
|
-
/**
|
|
47
|
-
* Epoch-ms deadline by which `allocate` must have settled; derived from the
|
|
48
|
-
* same budget as the client's `lease_allocate` envelope, so a provider that
|
|
49
|
-
* fits its remote phases within it is never abandoned by a client first.
|
|
50
|
-
*/
|
|
51
|
-
deadline?: number;
|
|
52
|
-
};
|
|
53
|
-
type LeaseLifecycleProvider = {
|
|
54
|
-
allocate?: (lease: DeviceLease, context?: LeaseLifecycleContext) => Promise<Record<string, unknown> | undefined>;
|
|
55
|
-
heartbeat?: (lease: DeviceLease, context?: LeaseLifecycleContext) => Promise<Record<string, unknown> | undefined>;
|
|
56
|
-
release?: (lease: DeviceLease, context?: LeaseLifecycleContext) => Promise<Record<string, unknown> | undefined>;
|
|
57
|
-
};
|
|
58
|
-
type DeviceInventoryProvider = (request: ProviderDeviceInventoryRequest, signal?: AbortSignal) => Promise<DeviceInfo[] | null | undefined>;
|
|
59
|
-
type ProviderAppCatalogQuery = Readonly<{
|
|
60
|
-
provider: string;
|
|
61
|
-
platform: 'android' | 'ios';
|
|
62
|
-
publicNetworkOnly?: boolean;
|
|
63
|
-
}>;
|
|
64
|
-
type ProviderAppCatalogHandler = (query: ProviderAppCatalogQuery, signal?: AbortSignal) => Promise<readonly string[]>;
|
|
65
|
-
//#endregion
|
|
66
26
|
//#region packages/contracts/src/ios-system-surface.d.ts
|
|
67
27
|
/**
|
|
68
28
|
* iOS out-of-process system surfaces that agent-device observes and drives IN PLACE, never by
|
|
@@ -200,6 +160,14 @@ type ScreenshotOptions = {
|
|
|
200
160
|
skipIosSimulatorBootCheck?: boolean;
|
|
201
161
|
captureBackend?: 'runner';
|
|
202
162
|
};
|
|
163
|
+
/**
|
|
164
|
+
* What the capture owner observed while writing the image. `displayRotation` is the rotation the display
|
|
165
|
+
* rendered the pixels in, so a landscape value pairs with a landscape image; it is absent when the
|
|
166
|
+
* owner has no rotation reading it can stand behind for this capture.
|
|
167
|
+
*/
|
|
168
|
+
type ScreenshotCaptureFacts = Readonly<{
|
|
169
|
+
displayRotation?: DeviceRotation;
|
|
170
|
+
}>;
|
|
203
171
|
type ElementSelectorKey = 'id' | 'label' | 'text' | 'value';
|
|
204
172
|
type ElementSelectorTapOptions = {
|
|
205
173
|
key: ElementSelectorKey;
|
|
@@ -397,7 +365,7 @@ type Interactor = {
|
|
|
397
365
|
}): Promise<Record<string, unknown> | void>;
|
|
398
366
|
fillRef?(ref: string, text: string, delayMs?: number): Promise<Record<string, unknown> | void>;
|
|
399
367
|
scroll(direction: ScrollDirection, options?: ScrollExecutionOptions): Promise<Record<string, unknown> | void>;
|
|
400
|
-
screenshot(outPath: string, options?: ScreenshotOptions): Promise<void>;
|
|
368
|
+
screenshot(outPath: string, options?: ScreenshotOptions): Promise<ScreenshotCaptureFacts | void>;
|
|
401
369
|
setViewport?(width: number, height: number): Promise<Record<string, unknown> | void>;
|
|
402
370
|
snapshot(options?: SnapshotOptions): Promise<SnapshotRuntimeResult>;
|
|
403
371
|
/**
|
|
@@ -508,6 +476,46 @@ type AlertInteractorOptions = {
|
|
|
508
476
|
surface?: SessionSurface;
|
|
509
477
|
};
|
|
510
478
|
//#endregion
|
|
479
|
+
//#region packages/contracts/src/device-provider.d.ts
|
|
480
|
+
type DeviceLease = {
|
|
481
|
+
leaseId: string;
|
|
482
|
+
tenantId: string;
|
|
483
|
+
runId: string;
|
|
484
|
+
backend: LeaseBackend;
|
|
485
|
+
leaseProvider?: string;
|
|
486
|
+
deviceKey?: string;
|
|
487
|
+
clientId?: string;
|
|
488
|
+
createdAt: number;
|
|
489
|
+
heartbeatAt: number;
|
|
490
|
+
expiresAt: number;
|
|
491
|
+
};
|
|
492
|
+
type LeaseLifecycleContext = {
|
|
493
|
+
flags?: Readonly<Record<string, unknown>>;
|
|
494
|
+
initialApp?: string;
|
|
495
|
+
cwd?: string;
|
|
496
|
+
publicNetworkOnly?: boolean;
|
|
497
|
+
/** Request-bound cancellation (explicit cancel or client disconnect). */
|
|
498
|
+
signal?: AbortSignal;
|
|
499
|
+
/**
|
|
500
|
+
* Epoch-ms deadline by which `allocate` must have settled; derived from the
|
|
501
|
+
* same budget as the client's `lease_allocate` envelope, so a provider that
|
|
502
|
+
* fits its remote phases within it is never abandoned by a client first.
|
|
503
|
+
*/
|
|
504
|
+
deadline?: number;
|
|
505
|
+
};
|
|
506
|
+
type LeaseLifecycleProvider = {
|
|
507
|
+
allocate?: (lease: DeviceLease, context?: LeaseLifecycleContext) => Promise<Record<string, unknown> | undefined>;
|
|
508
|
+
heartbeat?: (lease: DeviceLease, context?: LeaseLifecycleContext) => Promise<Record<string, unknown> | undefined>;
|
|
509
|
+
release?: (lease: DeviceLease, context?: LeaseLifecycleContext) => Promise<Record<string, unknown> | undefined>;
|
|
510
|
+
};
|
|
511
|
+
type DeviceInventoryProvider = (request: ProviderDeviceInventoryRequest, signal?: AbortSignal) => Promise<DeviceInfo[] | null | undefined>;
|
|
512
|
+
type ProviderAppCatalogQuery = Readonly<{
|
|
513
|
+
provider: string;
|
|
514
|
+
platform: 'android' | 'ios';
|
|
515
|
+
publicNetworkOnly?: boolean;
|
|
516
|
+
}>;
|
|
517
|
+
type ProviderAppCatalogHandler = (query: ProviderAppCatalogQuery, signal?: AbortSignal) => Promise<readonly string[]>;
|
|
518
|
+
//#endregion
|
|
511
519
|
//#region packages/contracts/src/provider-device-runtime.d.ts
|
|
512
520
|
type ProviderDeviceInstallResult = {
|
|
513
521
|
bundleId?: string;
|