agent-device 0.12.4 → 0.12.5
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/dist/src/152.js +1 -1
- package/dist/src/57.js +1 -1
- package/dist/src/641.js +38 -0
- package/dist/src/818.js +1 -1
- package/dist/src/backend.d.ts +205 -0
- package/dist/src/backend.js +1 -0
- package/dist/src/bin.js +62 -62
- package/dist/src/commands/index.d.ts +908 -0
- package/dist/src/commands/index.js +1 -0
- package/dist/src/contracts.d.ts +1 -1
- package/dist/src/daemon.js +15 -15
- package/dist/src/index.d.ts +893 -3
- package/dist/src/index.js +3 -3
- package/dist/src/io.d.ts +85 -0
- package/dist/src/io.js +1 -0
- package/dist/src/selectors.js +1 -1
- package/dist/src/testing/conformance.d.ts +416 -0
- package/dist/src/testing/conformance.js +1 -0
- package/ios-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+CommandExecution.swift +12 -3
- package/ios-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Models.swift +1 -0
- package/ios-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+ScreenRecorder.swift +24 -5
- package/ios-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests.swift +2 -0
- package/ios-runner/AgentDeviceRunner/RecordingScripts/recording-resize.swift +182 -0
- package/ios-runner/RUNNER_PROTOCOL.md +1 -1
- package/package.json +17 -1
- package/skills/agent-device/references/bootstrap-install.md +13 -0
- package/skills/agent-device/references/remote-tenancy.md +15 -0
- package/skills/agent-device/references/verification.md +1 -0
- package/dist/src/155.js +0 -38
- package/dist/src/940.js +0 -1
package/dist/src/818.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{constants as e}from"node:fs";import{access as t,stat as r}from"node:fs/promises";import n from"node:path";import{spawn as o,spawnSync as i}from"node:child_process";let s=/(token|secret|password|authorization|cookie|api[_-]?key|access[_-]?key|private[_-]?key)/i,a=/(bearer\s+[a-z0-9._-]+|(?:api[_-]?key|token|secret|password)\s*[=:]\s*\S+)/i;function
|
|
1
|
+
import{constants as e}from"node:fs";import{access as t,stat as r}from"node:fs/promises";import n from"node:path";import{spawn as o,spawnSync as i}from"node:child_process";let s=/(token|secret|password|authorization|cookie|api[_-]?key|access[_-]?key|private[_-]?key)/i,a=/(bearer\s+[a-z0-9._-]+|(?:api[_-]?key|token|secret|password)\s*[=:]\s*\S+)/i;function d(e){return function e(t,r,n){if(null==t)return t;if("string"==typeof t){var o=t,i=n;let e=o.trim();if(!e)return o;if(i&&s.test(i)||a.test(e))return"[REDACTED]";let r=function(e){try{let t=new URL(e);return t.search&&(t.search="?REDACTED"),(t.username||t.password)&&(t.username="REDACTED",t.password="REDACTED"),t.toString()}catch{return null}}(e);return r||(e.length>400?`${e.slice(0,200)}...<truncated>`:e)}if("object"!=typeof t)return t;if(r.has(t))return"[Circular]";if(r.add(t),Array.isArray(t))return t.map(t=>e(t,r));let d={};for(let[n,o]of Object.entries(t)){if(s.test(n)){d[n]="[REDACTED]";continue}d[n]=e(o,r,n)}return d}(e,new WeakSet)}class u extends Error{code;details;cause;constructor(e,t,r,n){super(t),this.code=e,this.details=r,this.cause=n}}function l(e){return e instanceof u?e:e instanceof Error?new u("UNKNOWN",e.message,void 0,e):new u("UNKNOWN","Unknown error",{err:e})}function c(e,t={}){let r=l(e),n=r.details?d(r.details):void 0,o=n&&"string"==typeof n.hint?n.hint:void 0,i=(n&&"string"==typeof n.diagnosticId?n.diagnosticId:void 0)??t.diagnosticId,s=(n&&"string"==typeof n.logPath?n.logPath:void 0)??t.logPath,a=o??function(e){switch(e){case"INVALID_ARGS":return"Check command arguments and run --help for usage examples.";case"SESSION_NOT_FOUND":return"Run open first or pass an explicit device selector.";case"TOOL_MISSING":return"Install required platform tooling and ensure it is available in PATH.";case"DEVICE_NOT_FOUND":return"Verify the target device is booted/connected and selectors match.";case"APP_NOT_INSTALLED":return"Run apps to discover the exact installed package or bundle id, or install the app before open.";case"UNSUPPORTED_OPERATION":return"This command is not available for the selected platform/device.";case"NOT_IMPLEMENTED":return"This command is part of the planned API but is not implemented yet.";case"COMMAND_FAILED":default:return"Retry with --debug and inspect diagnostics log for details.";case"UNAUTHORIZED":return"Refresh daemon metadata and retry the command."}}(r.code),u=function(e){if(!e)return;let t={...e};return delete t.hint,delete t.diagnosticId,delete t.logPath,Object.keys(t).length>0?t:void 0}(n),f=function(e,t,r){if("COMMAND_FAILED"!==e||r?.processExitError!==!0)return t;let n=function(e){let t=[/^an error was encountered processing the command/i,/^underlying error\b/i,/^simulator device failed to complete the requested operation/i];for(let r of e.split("\n")){let e=r.trim();if(e&&!t.some(t=>t.test(e)))return e.length>200?`${e.slice(0,200)}...`:e}return null}("string"==typeof r?.stderr?r.stderr:"");return n||t}(r.code,r.message,n);return{code:r.code,message:f,hint:a,diagnosticId:i,logPath:s,details:u}}let f=/^[A-Za-z0-9][A-Za-z0-9._+-]*$/,p=[".com",".exe",".bat",".cmd"];async function m(e,t,r={}){let n=I(e);return new Promise((i,s)=>{let a=o(n,t,{cwd:r.cwd,env:r.env,stdio:["pipe","pipe","pipe"],detached:r.detached,shell:!1}),d="",l=r.binaryStdout?Buffer.alloc(0):void 0,c="",f=!1,p=y(r.timeoutMs),m=p?setTimeout(()=>{f=!0,a.kill("SIGKILL")},p):null;r.binaryStdout||a.stdout.setEncoding("utf8"),a.stderr.setEncoding("utf8"),void 0!==r.stdin&&a.stdin.write(r.stdin),a.stdin.end(),a.stdout.on("data",e=>{r.binaryStdout?l=Buffer.concat([l??Buffer.alloc(0),Buffer.isBuffer(e)?e:Buffer.from(e)]):d+=e}),a.stderr.on("data",e=>{c+=e}),a.on("error",r=>{(m&&clearTimeout(m),"ENOENT"===r.code)?s(new u("TOOL_MISSING",`${n} not found in PATH`,{cmd:e},r)):s(new u("COMMAND_FAILED",`Failed to run ${n}`,{cmd:e,args:t},r))}),a.on("close",o=>{m&&clearTimeout(m);let a=o??1;f&&p?s(new u("COMMAND_FAILED",`${n} timed out after ${p}ms`,{cmd:e,args:t,stdout:d,stderr:c,exitCode:a,timeoutMs:p})):0===a||r.allowFailure?i({stdout:d,stderr:c,exitCode:a,stdoutBuffer:l}):s(new u("COMMAND_FAILED",`${n} exited with code ${a}`,{cmd:e,args:t,stdout:d,stderr:c,exitCode:a,processExitError:!0}))})})}async function h(e){let t=S(e);if(!t)return!1;if(n.isAbsolute(t))return T(t);let r=process.env.PATH;if(!r)return!1;let o=function(){if("win32"!==process.platform)return[""];let e=process.env.PATHEXT;if(!e)return p;let t=e.split(";").map(e=>e.trim().toLowerCase()).filter(e=>e.length>0);return t.length>0?t:p}();for(let e of r.split(n.delimiter)){let r=e.trim();if(r){for(let e of function(e,t){if("win32"!==process.platform)return[e];let r=e.toLowerCase();return t.some(e=>r.endsWith(e))?[e]:t.map(t=>`${e}${t}`)}(t,o))if(await T(n.join(r,e)))return!0}}return!1}async function w(e,t){let r=D(e,t,"executable");if(r){if(!await T(r))throw new u("TOOL_MISSING",`${t} points to a missing or non-executable file: ${r}`,{envName:t,path:r});return r}}async function E(e,t){let r=D(e,t,"file");if(r){if(!await M(r))throw new u("TOOL_MISSING",`${t} points to a missing or non-file path: ${r}`,{envName:t,path:r});return r}}function A(e,t,r={}){let n=I(e),o=i(n,t,{cwd:r.cwd,env:r.env,stdio:["pipe","pipe","pipe"],encoding:r.binaryStdout?void 0:"utf8",input:r.stdin,timeout:y(r.timeoutMs),shell:!1});if(o.error){let i=o.error.code;if("ETIMEDOUT"===i)throw new u("COMMAND_FAILED",`${n} timed out after ${y(r.timeoutMs)}ms`,{cmd:e,args:t,timeoutMs:y(r.timeoutMs)},o.error);if("ENOENT"===i)throw new u("TOOL_MISSING",`${n} not found in PATH`,{cmd:e},o.error);throw new u("COMMAND_FAILED",`Failed to run ${n}`,{cmd:e,args:t},o.error)}let s=r.binaryStdout?Buffer.isBuffer(o.stdout)?o.stdout:Buffer.from(o.stdout??""):void 0,a=r.binaryStdout?"":"string"==typeof o.stdout?o.stdout:(o.stdout??"").toString(),d="string"==typeof o.stderr?o.stderr:(o.stderr??"").toString(),l=o.status??1;if(0!==l&&!r.allowFailure)throw new u("COMMAND_FAILED",`${n} exited with code ${l}`,{cmd:e,args:t,stdout:a,stderr:d,exitCode:l,processExitError:!0});return{stdout:a,stderr:d,exitCode:l,stdoutBuffer:s}}function g(e,t,r={}){let n=o(I(e),t,{cwd:r.cwd,env:r.env,stdio:r.stdio??"ignore",detached:!0,shell:!1});return n.unref(),n.pid??0}async function O(e,t,r={}){let n=I(e);return new Promise((i,s)=>{let a=o(n,t,{cwd:r.cwd,env:r.env,stdio:["pipe","pipe","pipe"],detached:r.detached,shell:!1});r.onSpawn?.(a);let d="",l="",c=r.binaryStdout?Buffer.alloc(0):void 0,f=!1,p=y(r.timeoutMs),m=p?setTimeout(()=>{f=!0,a.kill("SIGKILL")},p):null;r.binaryStdout||a.stdout.setEncoding("utf8"),a.stderr.setEncoding("utf8"),void 0!==r.stdin&&a.stdin.write(r.stdin),a.stdin.end(),a.stdout.on("data",e=>{if(r.binaryStdout){c=Buffer.concat([c??Buffer.alloc(0),Buffer.isBuffer(e)?e:Buffer.from(e)]);return}let t=String(e);d+=t,r.onStdoutChunk?.(t)}),a.stderr.on("data",e=>{let t=String(e);l+=t,r.onStderrChunk?.(t)}),a.on("error",r=>{(m&&clearTimeout(m),"ENOENT"===r.code)?s(new u("TOOL_MISSING",`${n} not found in PATH`,{cmd:e},r)):s(new u("COMMAND_FAILED",`Failed to run ${n}`,{cmd:e,args:t},r))}),a.on("close",o=>{m&&clearTimeout(m);let a=o??1;f&&p?s(new u("COMMAND_FAILED",`${n} timed out after ${p}ms`,{cmd:e,args:t,stdout:d,stderr:l,exitCode:a,timeoutMs:p})):0===a||r.allowFailure?i({stdout:d,stderr:l,exitCode:a,stdoutBuffer:c}):s(new u("COMMAND_FAILED",`${n} exited with code ${a}`,{cmd:e,args:t,stdout:d,stderr:l,exitCode:a,processExitError:!0}))})})}function N(e,t,r={}){let n=I(e),i=o(n,t,{cwd:r.cwd,env:r.env,stdio:["ignore","pipe","pipe"],detached:r.detached,shell:!1}),s="",a="";i.stdout.setEncoding("utf8"),i.stderr.setEncoding("utf8"),i.stdout.on("data",e=>{s+=e}),i.stderr.on("data",e=>{a+=e});let d=new Promise((o,d)=>{i.on("error",r=>{"ENOENT"===r.code?d(new u("TOOL_MISSING",`${n} not found in PATH`,{cmd:e},r)):d(new u("COMMAND_FAILED",`Failed to run ${n}`,{cmd:e,args:t},r))}),i.on("close",i=>{let l=i??1;0===l||r.allowFailure?o({stdout:s,stderr:a,exitCode:l}):d(new u("COMMAND_FAILED",`${n} exited with code ${l}`,{cmd:e,args:t,stdout:s,stderr:a,exitCode:l,processExitError:!0}))})});return{child:i,wait:d}}function I(e){let t=S(e);if(!t)throw new u("INVALID_ARGS",`Invalid executable command: ${JSON.stringify(e)}`,{cmd:e,hint:"Use a bare command name from PATH or an absolute executable path."});return t}function D(e,t,r){let o=e?.trim();if(o){if(!n.isAbsolute(o)||o.includes("\0"))throw new u("INVALID_ARGS",`${t} must be an absolute ${r} path, not ${JSON.stringify(e)}`,{envName:t,path:e});return o}}function S(e){let t=e.trim();return!t||t.includes("\0")?null:n.isAbsolute(t)?t:t.includes("/")||t.includes("\\")?null:f.test(t)?t:null}async function T(r){try{if(!await M(r))return!1;return await t(r,"win32"===process.platform?e.F_OK:e.X_OK),!0}catch{return!1}}async function M(e){try{return(await r(e)).isFile()}catch{return!1}}function y(e){if(!Number.isFinite(e))return;let t=Math.floor(e);if(!(t<=0))return t}export{u as AppError,l as asAppError,T as isExecutablePath,c as normalizeError,d as redactDiagnosticData,w as resolveExecutableOverridePath,E as resolveFileOverridePath,m as runCmd,N as runCmdBackground,g as runCmdDetached,O as runCmdStreaming,A as runCmdSync,h as whichCmd};
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
export declare type AgentDeviceBackend = {
|
|
2
|
+
platform: AgentDeviceBackendPlatform;
|
|
3
|
+
capabilities?: BackendCapabilitySet;
|
|
4
|
+
escapeHatches?: BackendEscapeHatches;
|
|
5
|
+
captureSnapshot?(context: BackendCommandContext, options?: BackendSnapshotOptions): Promise<BackendSnapshotResult>;
|
|
6
|
+
captureScreenshot?(context: BackendCommandContext, outPath: string, options?: BackendScreenshotOptions): Promise<BackendScreenshotResult | void>;
|
|
7
|
+
readText?(context: BackendCommandContext, node: SnapshotNode): Promise<BackendReadTextResult>;
|
|
8
|
+
findText?(context: BackendCommandContext, text: string): Promise<BackendFindTextResult>;
|
|
9
|
+
tap?(context: BackendCommandContext, point: Point, options?: BackendTapOptions): Promise<BackendActionResult>;
|
|
10
|
+
fill?(context: BackendCommandContext, point: Point, text: string, options?: BackendFillOptions): Promise<BackendActionResult>;
|
|
11
|
+
typeText?(context: BackendCommandContext, text: string, options?: {
|
|
12
|
+
delayMs?: number;
|
|
13
|
+
}): Promise<BackendActionResult>;
|
|
14
|
+
pressKey?(context: BackendCommandContext, key: string, options?: {
|
|
15
|
+
modifiers?: string[];
|
|
16
|
+
}): Promise<BackendActionResult>;
|
|
17
|
+
openApp?(context: BackendCommandContext, target: BackendOpenTarget): Promise<BackendActionResult>;
|
|
18
|
+
closeApp?(context: BackendCommandContext, app?: string): Promise<BackendActionResult>;
|
|
19
|
+
installApp?(context: BackendCommandContext, target: BackendInstallTarget): Promise<BackendActionResult>;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export declare type AgentDeviceBackendPlatform = 'ios' | 'android' | 'macos' | 'linux';
|
|
23
|
+
|
|
24
|
+
export declare const BACKEND_CAPABILITY_ESCAPE_HATCH_METHODS: {
|
|
25
|
+
readonly 'android.shell': "androidShell";
|
|
26
|
+
readonly 'ios.runnerCommand': "iosRunnerCommand";
|
|
27
|
+
readonly 'macos.desktopScreenshot': "macosDesktopScreenshot";
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export declare const BACKEND_CAPABILITY_NAMES: readonly ["android.shell", "ios.runnerCommand", "macos.desktopScreenshot"];
|
|
31
|
+
|
|
32
|
+
export declare type BackendActionResult = Record<string, unknown> | void;
|
|
33
|
+
|
|
34
|
+
export declare type BackendCapabilityName = (typeof BACKEND_CAPABILITY_NAMES)[number];
|
|
35
|
+
|
|
36
|
+
export declare type BackendCapabilitySet = readonly BackendCapabilityName[];
|
|
37
|
+
|
|
38
|
+
export declare type BackendCommandContext = {
|
|
39
|
+
session?: string;
|
|
40
|
+
requestId?: string;
|
|
41
|
+
appId?: string;
|
|
42
|
+
appBundleId?: string;
|
|
43
|
+
signal?: AbortSignal;
|
|
44
|
+
metadata?: Record<string, unknown>;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export declare type BackendEscapeHatches = {
|
|
48
|
+
androidShell?(context: BackendCommandContext, args: readonly string[]): Promise<BackendShellResult>;
|
|
49
|
+
iosRunnerCommand?(context: BackendCommandContext, command: BackendRunnerCommand): Promise<BackendActionResult>;
|
|
50
|
+
macosDesktopScreenshot?(context: BackendCommandContext, outPath: string, options?: BackendScreenshotOptions): Promise<BackendScreenshotResult | void>;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export declare type BackendFillOptions = {
|
|
54
|
+
delayMs?: number;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export declare type BackendFindTextResult = {
|
|
58
|
+
found: boolean;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export declare type BackendInstallTarget = {
|
|
62
|
+
app: string;
|
|
63
|
+
artifactPath: string;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export declare type BackendOpenTarget = {
|
|
67
|
+
app?: string;
|
|
68
|
+
url?: string;
|
|
69
|
+
activity?: string;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export declare type BackendReadTextResult = {
|
|
73
|
+
text: string;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
export declare type BackendRunnerCommand = {
|
|
77
|
+
command: string;
|
|
78
|
+
args?: readonly string[];
|
|
79
|
+
payload?: Record<string, unknown>;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export declare type BackendScreenshotOptions = {
|
|
83
|
+
fullscreen?: boolean;
|
|
84
|
+
overlayRefs?: boolean;
|
|
85
|
+
surface?: 'app' | 'frontmost-app' | 'desktop' | 'menubar';
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export declare type BackendScreenshotResult = {
|
|
89
|
+
path?: string;
|
|
90
|
+
overlayRefs?: ScreenshotOverlayRef[];
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
export declare type BackendShellResult = {
|
|
94
|
+
exitCode: number;
|
|
95
|
+
stdout: string;
|
|
96
|
+
stderr: string;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
export declare type BackendSnapshotAnalysis = {
|
|
100
|
+
rawNodeCount?: number;
|
|
101
|
+
maxDepth?: number;
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
export declare type BackendSnapshotFreshness = {
|
|
105
|
+
action: string;
|
|
106
|
+
retryCount: number;
|
|
107
|
+
staleAfterRetries: boolean;
|
|
108
|
+
reason?: 'empty-interactive' | 'sharp-drop' | 'stuck-route';
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
export declare type BackendSnapshotOptions = SnapshotOptions & {
|
|
112
|
+
outPath?: string;
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
export declare type BackendSnapshotResult = {
|
|
116
|
+
nodes?: SnapshotNode[];
|
|
117
|
+
truncated?: boolean;
|
|
118
|
+
backend?: string;
|
|
119
|
+
snapshot?: SnapshotState;
|
|
120
|
+
analysis?: BackendSnapshotAnalysis;
|
|
121
|
+
freshness?: BackendSnapshotFreshness;
|
|
122
|
+
warnings?: string[];
|
|
123
|
+
appName?: string;
|
|
124
|
+
appBundleId?: string;
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
export declare type BackendTapOptions = {
|
|
128
|
+
button?: 'primary' | 'secondary' | 'middle';
|
|
129
|
+
count?: number;
|
|
130
|
+
intervalMs?: number;
|
|
131
|
+
holdMs?: number;
|
|
132
|
+
jitterPx?: number;
|
|
133
|
+
doubleTap?: boolean;
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
export declare function hasBackendCapability(backend: Pick<AgentDeviceBackend, 'platform' | 'capabilities'>, capability: BackendCapabilityName): boolean;
|
|
137
|
+
|
|
138
|
+
export declare function hasBackendEscapeHatch(backend: Pick<AgentDeviceBackend, 'escapeHatches'>, capability: BackendCapabilityName): boolean;
|
|
139
|
+
|
|
140
|
+
declare type Point = {
|
|
141
|
+
x: number;
|
|
142
|
+
y: number;
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
declare type RawSnapshotNode = {
|
|
146
|
+
index: number;
|
|
147
|
+
type?: string;
|
|
148
|
+
role?: string;
|
|
149
|
+
subrole?: string;
|
|
150
|
+
label?: string;
|
|
151
|
+
value?: string;
|
|
152
|
+
identifier?: string;
|
|
153
|
+
rect?: Rect;
|
|
154
|
+
enabled?: boolean;
|
|
155
|
+
selected?: boolean;
|
|
156
|
+
hittable?: boolean;
|
|
157
|
+
depth?: number;
|
|
158
|
+
parentIndex?: number;
|
|
159
|
+
pid?: number;
|
|
160
|
+
bundleId?: string;
|
|
161
|
+
appName?: string;
|
|
162
|
+
windowTitle?: string;
|
|
163
|
+
surface?: string;
|
|
164
|
+
hiddenContentAbove?: boolean;
|
|
165
|
+
hiddenContentBelow?: boolean;
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
declare type Rect = {
|
|
169
|
+
x: number;
|
|
170
|
+
y: number;
|
|
171
|
+
width: number;
|
|
172
|
+
height: number;
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
declare type ScreenshotOverlayRef = {
|
|
176
|
+
ref: string;
|
|
177
|
+
label?: string;
|
|
178
|
+
rect: Rect;
|
|
179
|
+
overlayRect: Rect;
|
|
180
|
+
center: Point;
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
declare type SnapshotBackend = 'xctest' | 'android' | 'macos-helper' | 'linux-atspi';
|
|
184
|
+
|
|
185
|
+
declare type SnapshotNode = RawSnapshotNode & {
|
|
186
|
+
ref: string;
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
declare type SnapshotOptions = {
|
|
190
|
+
interactiveOnly?: boolean;
|
|
191
|
+
compact?: boolean;
|
|
192
|
+
depth?: number;
|
|
193
|
+
scope?: string;
|
|
194
|
+
raw?: boolean;
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
declare type SnapshotState = {
|
|
198
|
+
nodes: SnapshotNode[];
|
|
199
|
+
createdAt: number;
|
|
200
|
+
truncated?: boolean;
|
|
201
|
+
backend?: SnapshotBackend;
|
|
202
|
+
comparisonSafe?: boolean;
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
export { }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e=["android.shell","ios.runnerCommand","macos.desktopScreenshot"],n={"android.shell":"androidShell","ios.runnerCommand":"iosRunnerCommand","macos.desktopScreenshot":"macosDesktopScreenshot"};function o(e,n){return e.capabilities?.includes(n)??!1}function a(e,o){let a=n[o];return"function"==typeof e.escapeHatches?.[a]}export{n as BACKEND_CAPABILITY_ESCAPE_HATCH_METHODS,e as BACKEND_CAPABILITY_NAMES,o as hasBackendCapability,a as hasBackendEscapeHatch};
|