agent-device 0.14.1 → 0.14.3
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/README.md +3 -0
- package/android-snapshot-helper/dist/{agent-device-android-snapshot-helper-0.14.1.apk → agent-device-android-snapshot-helper-0.14.3.apk} +0 -0
- package/android-snapshot-helper/dist/agent-device-android-snapshot-helper-0.14.3.apk.sha256 +1 -0
- package/android-snapshot-helper/dist/{agent-device-android-snapshot-helper-0.14.1.manifest.json → agent-device-android-snapshot-helper-0.14.3.manifest.json} +6 -6
- package/dist/src/1231.js +1 -0
- package/dist/src/2007.js +26 -0
- package/dist/src/2740.js +1 -0
- package/dist/src/3675.js +1 -0
- package/dist/src/6479.js +37 -0
- package/dist/src/6953.js +8 -0
- package/dist/src/7599.js +3 -0
- package/dist/src/9542.js +2 -2
- package/dist/src/9818.js +1 -1
- package/dist/src/android-adb.d.ts +86 -0
- package/dist/src/android-adb.js +1 -0
- package/dist/src/android-snapshot-helper.d.ts +27 -8
- package/dist/src/batch.d.ts +138 -0
- package/dist/src/batch.js +1 -0
- package/dist/src/daemon-embedding.d.ts +632 -0
- package/dist/src/daemon-embedding.js +1 -0
- package/dist/src/internal/bin.js +58 -55
- package/dist/src/internal/daemon.js +9 -45
- package/package.json +14 -2
- package/android-snapshot-helper/dist/agent-device-android-snapshot-helper-0.14.1.apk.sha256 +0 -1
- package/dist/src/3918.js +0 -33
- package/dist/src/8161.js +0 -3
package/README.md
CHANGED
|
@@ -94,6 +94,8 @@ Snapshots assign refs like `@e1`, `@e2`, and `@e3` to current-screen elements. R
|
|
|
94
94
|
|
|
95
95
|
`agent-device` runs session-aware commands through platform backends: XCTest for iOS and tvOS, ADB plus the Android snapshot helper for Android, a local helper for macOS desktop automation, and AT-SPI for Linux desktop targets. See [Introduction](https://incubator.callstack.com/agent-device/docs/introduction) and [Commands](https://incubator.callstack.com/agent-device/docs/commands) for platform details.
|
|
96
96
|
|
|
97
|
+
Node consumers can use the typed client and public subpaths for bridge integrations. `agent-device/android-adb` exposes the Android ADB provider contract and reusable helpers for ADB-backed app listing and foreground state. `agent-device/daemon` exposes the supported daemon embedding surface for integrations that intentionally reuse the upstream request router.
|
|
98
|
+
|
|
97
99
|
## Used By
|
|
98
100
|
|
|
99
101
|
Used by teams and developers at Callstack, Expensify, Shopify, Kindred, Total Wine & More, LegendList, HerLyfe, App & Flow, and more.
|
|
@@ -101,6 +103,7 @@ Used by teams and developers at Callstack, Expensify, Shopify, Kindred, Total Wi
|
|
|
101
103
|
## Documentation
|
|
102
104
|
|
|
103
105
|
- [Installation](https://incubator.callstack.com/agent-device/docs/installation)
|
|
106
|
+
- [Typed Client](https://incubator.callstack.com/agent-device/docs/client-api)
|
|
104
107
|
- [Commands](https://incubator.callstack.com/agent-device/docs/commands)
|
|
105
108
|
- [Replay & E2E](https://incubator.callstack.com/agent-device/docs/replay-e2e)
|
|
106
109
|
- [Known limitations](https://incubator.callstack.com/agent-device/docs/known-limitations)
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
98818fe5c487f001fae55afa1b9cbf40628b7e9eb0ca97fb8f117d6799618754 agent-device-android-snapshot-helper-0.14.3.apk
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "android-snapshot-helper",
|
|
3
|
-
"version": "0.14.
|
|
4
|
-
"releaseTag": "v0.14.
|
|
5
|
-
"assetName": "agent-device-android-snapshot-helper-0.14.
|
|
3
|
+
"version": "0.14.3",
|
|
4
|
+
"releaseTag": "v0.14.3",
|
|
5
|
+
"assetName": "agent-device-android-snapshot-helper-0.14.3.apk",
|
|
6
6
|
"apkUrl": null,
|
|
7
|
-
"sha256": "
|
|
8
|
-
"checksumName": "agent-device-android-snapshot-helper-0.14.
|
|
7
|
+
"sha256": "98818fe5c487f001fae55afa1b9cbf40628b7e9eb0ca97fb8f117d6799618754",
|
|
8
|
+
"checksumName": "agent-device-android-snapshot-helper-0.14.3.apk.sha256",
|
|
9
9
|
"packageName": "com.callstack.agentdevice.snapshothelper",
|
|
10
|
-
"versionCode":
|
|
10
|
+
"versionCode": 14003,
|
|
11
11
|
"instrumentationRunner": "com.callstack.agentdevice.snapshothelper/.SnapshotInstrumentation",
|
|
12
12
|
"minSdk": 23,
|
|
13
13
|
"targetSdk": 36,
|
package/dist/src/1231.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{asAppError as t,AppError as e}from"./9152.js";let r=100,a=new Set(["batch","replay"]),o=new Set(["command","positionals","flags","runtime"]),n=["platform","target","device","udid","serial","verbose","out"];async function s(e,a,o){let n=e.flags,s=n?.batchOnError??"stop";if("stop"!==s)return p("INVALID_ARGS",`Unsupported batch on-error mode: ${s}.`);let i=n?.batchMaxSteps??r;if(!Number.isInteger(i)||i<1||i>1e3)return p("INVALID_ARGS",`Invalid batch max-steps: ${String(n?.batchMaxSteps)}`);try{let t=l(n?.batchSteps,i),r=Date.now(),s=[];for(let r=0;r<t.length;r+=1){let n=t[r],i=await m(e,a,n,o,r+1);if(!i.ok)return{ok:!1,error:{code:i.error.code,message:`Batch failed at step ${i.step} (${n.command}): ${i.error.message}`,hint:i.error.hint,diagnosticId:i.error.diagnosticId,logPath:i.error.logPath,details:{...i.error.details??{},step:i.step,command:n.command,positionals:n.positionals,executed:r,total:t.length,partialResults:s}}};s.push(i.result)}return{ok:!0,data:{total:t.length,executed:t.length,totalDurationMs:Date.now()-r,results:s}}}catch(r){let e=t(r);return p(e.code,e.message,e.details)}}function i(t){let r;try{r=JSON.parse(t)}catch{throw new e("INVALID_ARGS","Batch steps must be valid JSON.")}if(!Array.isArray(r)||0===r.length)throw new e("INVALID_ARGS","Batch steps must be a non-empty JSON array.");return r}function l(t,r){if(!Array.isArray(t)||0===t.length)throw new e("INVALID_ARGS","batch requires a non-empty batchSteps array.");if(t.length>r)throw new e("INVALID_ARGS",`batch has ${t.length} steps; max allowed is ${r}.`);let n=[];for(let r=0;r<t.length;r+=1){let s=t[r];if(!s||"object"!=typeof s)throw new e("INVALID_ARGS",`Invalid batch step at index ${r}.`);let i=Object.keys(s).filter(t=>!o.has(t));if(i.length>0){let t=i.map(t=>`"${t}"`).join(", ");throw new e("INVALID_ARGS",`Batch step ${r+1} has unknown field(s): ${t}. Allowed fields: command, positionals, flags, runtime.`)}let l="string"==typeof s.command?s.command.trim().toLowerCase():"";if(!l)throw new e("INVALID_ARGS",`Batch step ${r+1} requires command.`);if(a.has(l))throw new e("INVALID_ARGS",`Batch step ${r+1} cannot run ${l}.`);if(void 0!==s.positionals&&!Array.isArray(s.positionals))throw new e("INVALID_ARGS",`Batch step ${r+1} positionals must be an array.`);let c=s.positionals??[];if(c.some(t=>"string"!=typeof t))throw new e("INVALID_ARGS",`Batch step ${r+1} positionals must contain only strings.`);if(void 0!==s.flags&&("object"!=typeof s.flags||Array.isArray(s.flags)||!s.flags))throw new e("INVALID_ARGS",`Batch step ${r+1} flags must be an object.`);if(void 0!==s.runtime&&("object"!=typeof s.runtime||Array.isArray(s.runtime)||!s.runtime))throw new e("INVALID_ARGS",`Batch step ${r+1} runtime must be an object.`);n.push({command:l,positionals:c,flags:s.flags??{},runtime:s.runtime})}return n}function c(t,e){let{batchSteps:r,batchOnError:a,batchMaxSteps:o,...n}=e??{};return h(t,n)}function h(t,e){let r=t??{};for(let t of n)void 0===e[t]&&void 0!==r[t]&&(e[t]=r[t]);return e}async function m(t,e,r,a,o){let n=Date.now(),s=c(t.flags,r.flags);void 0===s.session&&(s.session=e);let i=await a({token:t.token,session:e,command:r.command,positionals:r.positionals,flags:s,runtime:void 0===r.runtime?t.runtime:r.runtime,meta:t.meta}),l=Date.now()-n;return i.ok?{ok:!0,step:o,result:{step:o,command:r.command,ok:!0,data:i.data??{},durationMs:l}}:{ok:!1,step:o,error:i.error}}function p(t,e,r){return{ok:!1,error:{code:t,message:e,...r?{details:r}:{}}}}export{a as BATCH_BLOCKED_COMMANDS,r as DEFAULT_BATCH_MAX_STEPS,n as INHERITED_PARENT_FLAG_KEYS,c as buildBatchStepFlags,h as mergeParentFlags,i as parseBatchStepsJson,s as runBatch,l as validateAndNormalizeBatchSteps};
|