agent-device 0.14.0 → 0.14.2
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 +1 -1
- package/android-snapshot-helper/README.md +1 -1
- package/android-snapshot-helper/dist/{agent-device-android-snapshot-helper-0.14.0.apk → agent-device-android-snapshot-helper-0.14.2.apk} +0 -0
- package/android-snapshot-helper/dist/agent-device-android-snapshot-helper-0.14.2.apk.sha256 +1 -0
- package/android-snapshot-helper/dist/{agent-device-android-snapshot-helper-0.14.0.manifest.json → agent-device-android-snapshot-helper-0.14.2.manifest.json} +6 -6
- package/dist/src/1231.js +1 -0
- package/dist/src/2007.js +33 -0
- package/dist/src/221.js +4 -4
- package/dist/src/8656.js +1 -1
- package/dist/src/android-snapshot-helper.d.ts +1 -0
- package/dist/src/batch.d.ts +138 -0
- package/dist/src/batch.js +1 -0
- package/dist/src/internal/bin.js +53 -44
- package/dist/src/internal/daemon.js +17 -17
- package/ios-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Interaction.swift +26 -2
- package/package.json +7 -3
- package/skills/agent-device/SKILL.md +2 -2
- package/skills/dogfood/SKILL.md +2 -2
- package/skills/react-devtools/SKILL.md +1 -1
- package/android-snapshot-helper/dist/agent-device-android-snapshot-helper-0.14.0.apk.sha256 +0 -1
- package/dist/src/3918.js +0 -33
package/README.md
CHANGED
|
@@ -39,7 +39,7 @@ agent-device help workflow
|
|
|
39
39
|
|
|
40
40
|
The CLI help is the source of truth for agents and is shipped with the installed version. Skills are optional but recommended when your agent runtime supports them: they auto-route device, React DevTools, and dogfood tasks to the right `agent-device help <topic>` page and verify the CLI is new enough before acting.
|
|
41
41
|
|
|
42
|
-
If you install skills separately, keep the CLI on `agent-device >= 0.
|
|
42
|
+
If you install skills separately, keep the CLI on `agent-device >= 0.14.0`. Older CLIs do not include the workflow help topics that the router skills expect.
|
|
43
43
|
|
|
44
44
|
```bash
|
|
45
45
|
npm install -g agent-device@latest
|
|
@@ -36,7 +36,7 @@ adb shell am instrument -w \
|
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
`maxDepth` also caps recursive traversal depth inside the helper.
|
|
39
|
-
The `-t` install flag is required because the helper is a
|
|
39
|
+
The `-t` install flag is required because the helper is a test-only instrumentation APK.
|
|
40
40
|
Devices or providers that block test-package installs must allow this package before helper capture
|
|
41
41
|
can run.
|
|
42
42
|
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
87795f8b8549303197f2b4a4efe92f705d41a1e87782e49e06192afc39dd2cf5 agent-device-android-snapshot-helper-0.14.2.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.2",
|
|
4
|
+
"releaseTag": "v0.14.2",
|
|
5
|
+
"assetName": "agent-device-android-snapshot-helper-0.14.2.apk",
|
|
6
6
|
"apkUrl": null,
|
|
7
|
-
"sha256": "
|
|
8
|
-
"checksumName": "agent-device-android-snapshot-helper-0.14.
|
|
7
|
+
"sha256": "87795f8b8549303197f2b4a4efe92f705d41a1e87782e49e06192afc39dd2cf5",
|
|
8
|
+
"checksumName": "agent-device-android-snapshot-helper-0.14.2.apk.sha256",
|
|
9
9
|
"packageName": "com.callstack.agentdevice.snapshothelper",
|
|
10
|
-
"versionCode":
|
|
10
|
+
"versionCode": 14002,
|
|
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};
|