agent-device 0.17.0 → 0.17.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-multitouch-helper/dist/{agent-device-android-multitouch-helper-0.17.0.apk → agent-device-android-multitouch-helper-0.17.2.apk} +0 -0
- package/android-multitouch-helper/dist/agent-device-android-multitouch-helper-0.17.2.apk.sha256 +1 -0
- package/android-multitouch-helper/dist/{agent-device-android-multitouch-helper-0.17.0.manifest.json → agent-device-android-multitouch-helper-0.17.2.manifest.json} +4 -4
- package/android-snapshot-helper/dist/{agent-device-android-snapshot-helper-0.17.0.apk → agent-device-android-snapshot-helper-0.17.2.apk} +0 -0
- package/android-snapshot-helper/dist/agent-device-android-snapshot-helper-0.17.2.apk.sha256 +1 -0
- package/android-snapshot-helper/dist/{agent-device-android-snapshot-helper-0.17.0.manifest.json → agent-device-android-snapshot-helper-0.17.2.manifest.json} +6 -6
- package/dist/src/123.js +1 -0
- package/dist/src/1352.js +1 -1
- package/dist/src/1534.js +1 -0
- package/dist/src/1620.js +1 -0
- package/dist/src/1644.js +2 -0
- package/dist/src/2284.js +1 -0
- package/dist/src/2403.js +3 -0
- package/dist/src/2415.js +28 -29
- package/dist/src/2474.js +1 -0
- package/dist/src/2672.js +1 -0
- package/dist/src/3393.js +1 -0
- package/dist/src/4778.js +1 -1
- package/dist/src/5898.js +1 -0
- package/dist/src/7556.js +1 -1
- package/dist/src/7847.js +1 -1
- package/dist/src/8173.js +27 -0
- package/dist/src/8407.js +1 -0
- package/dist/src/8699.js +1 -1
- package/dist/src/8806.js +3 -3
- package/dist/src/9010.js +1 -0
- package/dist/src/9238.js +3 -3
- package/dist/src/9471.js +1 -1
- package/dist/src/9542.js +3 -3
- package/dist/src/9616.js +1 -0
- package/dist/src/9673.js +1 -0
- package/dist/src/9974.js +1 -0
- package/dist/src/android-adb.d.ts +12 -6
- package/dist/src/android-adb.js +1 -1
- package/dist/src/android-snapshot-helper.d.ts +15 -7
- package/dist/src/android.js +1 -1
- package/dist/src/apple.js +1 -1
- package/dist/src/apps.js +2 -2
- package/dist/src/args.js +2 -2
- package/dist/src/batch.d.ts +16 -4
- package/dist/src/cli.js +18 -42
- package/dist/src/command-surface.js +1 -1
- package/dist/src/contracts.d.ts +28 -4
- package/dist/src/contracts.js +1 -1
- package/dist/src/find.js +1 -1
- package/dist/src/finders.d.ts +3 -1
- package/dist/src/generic.js +13 -11
- package/dist/src/index.d.ts +142 -73
- package/dist/src/index.js +1 -1
- package/dist/src/input-actions.js +1 -1
- package/dist/src/interaction.js +1 -1
- package/dist/src/internal/png-worker.d.ts +26 -0
- package/dist/src/internal/png-worker.js +1 -0
- package/dist/src/metro.d.ts +3 -1
- package/dist/src/react-native.js +1 -1
- package/dist/src/record-trace-recording.js +26 -0
- package/dist/src/record-trace.js +1 -26
- package/dist/src/remote-config.d.ts +33 -7
- package/dist/src/selector-runtime.js +1 -1
- package/dist/src/selectors.d.ts +3 -3
- package/dist/src/selectors.js +1 -1
- package/dist/src/server.js +2 -2
- package/dist/src/session.js +10 -11
- package/dist/src/snapshot.js +1 -1
- package/ios-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+CommandExecution.swift +6 -2
- package/package.json +7 -4
- package/server.json +2 -2
- package/android-multitouch-helper/dist/agent-device-android-multitouch-helper-0.17.0.apk.sha256 +0 -1
- package/android-snapshot-helper/dist/agent-device-android-snapshot-helper-0.17.0.apk.sha256 +0 -1
- package/dist/src/1998.js +0 -1
- package/dist/src/2805.js +0 -1
- package/dist/src/4057.js +0 -1
- package/dist/src/5792.js +0 -1
- package/dist/src/6085.js +0 -1
- package/dist/src/6232.js +0 -1
- package/dist/src/8020.js +0 -1
- package/dist/src/8502.js +0 -1
- package/dist/src/940.js +0 -1
- package/dist/src/9404.js +0 -1
- package/dist/src/9533.js +0 -1
- package/dist/src/command-metadata.js +0 -1
- /package/dist/src/{1393.js → 3675.js} +0 -0
- /package/dist/src/{5310.js → 695.js} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{listMcpExposedCommandNames as t,BATCH_COMMAND_NAMES as e}from"./5792.js";import{readInputRecord as a,selectorSnapshotFields as r,elementTargetField as i,stringSchema as o,stringArrayField as n,jsonSchemaField as s,booleanSchema as p,integerSchema as c,integerField as d,customField as u,assertAllowedKeys as l,booleanField as m,enumField as h,requiredEnum as f,looseObjectField as g,readPoint as y,requiredField as b,pointField as w,readFieldInput as M,stringField as v,interactionTargetField as x,fieldsInputSchema as S,requiredNumber as P,readCommonInput as k,repeatedFields as _,looseObjectSchema as C,numberField as A,optionalInteger as E}from"./9404.js";import{PERF_AREA_VALUES as j,PERF_ACTION_VALUES as I}from"./8020.js";import{requireCommandDescription as R}from"./2805.js";function U(t,e){return{...t,run:e,invoke:async(a,r)=>await e(a,t.readInput(r))}}function O(t=e){var a;let r={steps:b(u({type:"array",description:"Structured batch steps. Each step uses a command name and the same input object as that command tool.",items:{type:"object",properties:{command:{type:"string",enum:a=t,description:"Command name to run with structured input."},input:{type:"object",additionalProperties:!0,description:"Structured command input for the nested command. Use the matching MCP tool schema for this object."},runtime:{type:"object",additionalProperties:!0,description:"Optional per-step runtime payload."}},required:["command","input"],additionalProperties:!1}},(t,e)=>(function(t,e){if(!Array.isArray(t))throw Error("Expected steps to be an array.");return t.map((t,a)=>{var r,i,o;let n;return r=t,i=a+1,o=e,l(n=function(t,e){if(!t||"object"!=typeof t||Array.isArray(t))throw Error(`Invalid batch step ${e}.`);return t}(r,i),["command","input","runtime"],`Batch step ${i}`),{command:f(n,"command",o),input:function(t,e){let a=t.input;if(!a||"object"!=typeof a||Array.isArray(a))throw Error(`Batch step ${e} input must be an object.`);return a}(n,i),...function(t,e){let a=t.runtime;if(void 0!==a&&(!a||"object"!=typeof a||Array.isArray(a)))throw Error(`Batch step ${e} runtime must be an object.`);return void 0===a?{}:{runtime:a}}(n,i)}})})(t[e],a))),onError:h(["stop"],"Batch failure policy."),maxSteps:d("Maximum number of steps accepted for this batch.",{min:1,max:1e3}),out:v("Optional output path for command artifacts.")};return{name:"batch",description:"Run multiple structured command steps in one daemon request.",inputSchema:S(r),readInput:t=>(function(t,e){let a=M(t,e),r=a.maxSteps??100;if(!Number.isInteger(r)||r<1||r>1e3)throw Error(`Invalid batch maxSteps: ${String(a.maxSteps)}`);if(a.steps.length>r)throw Error(`batch has ${a.steps.length} steps; max allowed is ${r}.`);return{...a}})(t,r)}}function B(t,e,a){return{name:t,description:e,inputSchema:S(a),readInput:t=>M(t,a)}}let K=["app","frontmost-app","desktop","menubar"],N=["start","stop"],$=[F("devices",{}),F("boot",{headless:m("Boot without showing simulator UI when supported.")}),F("prepare",{action:b(h(["ios-runner"])),timeoutMs:d("Maximum wall-clock time for the prepare command.")}),F("apps",{appsFilter:h(["user-installed","all"])}),F("session",{action:h(["list"])}),F("open",{app:v("App name, bundle id, package, or URL."),url:v("Optional URL passed with an app shell."),surface:h(K),activity:v("Android activity name."),launchConsole:v("Launch console mode."),launchArgs:n("Launch arguments forwarded verbatim to the platform launch command."),relaunch:m("Force relaunch."),saveScript:s({oneOf:[p(),o()]}),noRecord:m("Do not record this action.")}),F("close",{app:v("Optional app to close."),shutdown:m("Shutdown the session/device where supported."),saveScript:s({oneOf:[p(),o()]})}),F("install",{app:b(v()),appPath:b(v("Path to app binary."))}),F("reinstall",{app:b(v()),appPath:b(v("Path to app binary."))}),F("install-from-source",{source:b(s(C("Install source object."))),retainPaths:m(),retentionMs:d()}),F("push",{app:b(v()),payload:b(s({oneOf:[o(),C()]}))}),F("trigger-app-event",{event:b(v()),payload:g()}),F("snapshot",{interactiveOnly:m(),compact:m(),depth:d(),scope:v(),raw:m(),forceFull:m(),timeoutMs:d("Maximum wall-clock time for the snapshot command.")}),F("screenshot",{path:v("Output path."),overlayRefs:m(),fullscreen:m(),maxSize:d(),stabilize:m(),surface:h(K)}),F("diff",{kind:b(s({type:"string",const:"snapshot"})),out:v(),interactiveOnly:m(),compact:m(),depth:d(),scope:v(),raw:m()}),F("wait",{kind:h(["duration","text","ref","selector"]),durationMs:d(),text:v(),ref:v(),selector:v(),timeoutMs:d(),depth:d(),scope:v(),raw:m()}),F("alert",{action:h(["get","accept","dismiss","wait"]),timeoutMs:d()}),F("appstate",{}),F("back",{mode:h(["in-app","system"])}),F("home",{}),F("rotate",{orientation:b(h(["portrait","portrait-upside-down","landscape-left","landscape-right"]))}),F("app-switcher",{}),F("keyboard",{action:h(["status","dismiss"])}),F("clipboard",{action:b(h(["read","write"])),text:v()}),F("react-native",{action:b(h(["dismiss-overlay"]))}),F("replay",{path:b(v()),update:m(),backend:v(),maestro:m(),env:n()}),F("test",{paths:b(n()),update:m(),backend:v(),maestro:m(),env:n(),failFast:m(),timeoutMs:d(),retries:d(),artifactsDir:v(),reportJunit:v(),shardAll:d(),shardSplit:d()}),F("perf",{area:h(j),action:h(I)}),F("logs",{action:h(["path","start","stop","doctor","mark","clear"]),message:v(),restart:m()}),F("network",{action:h(["dump","log"]),limit:d(),include:h(["summary","headers","body","all"])}),F("record",{action:b(h(N)),path:v(),fps:d(),quality:s(c()),hideTouches:m()}),F("trace",{action:b(h(N)),path:v()}),F("settings",{setting:b(v()),state:b(v()),app:v(),latitude:A(),longitude:A(),permission:v(),mode:h(["full","limited"])}),F("metro",{action:b(h(["prepare","reload"])),projectRoot:v(),kind:s(o()),publicBaseUrl:v(),proxyBaseUrl:v(),bearerToken:v(),bridgeScope:s({type:"object",additionalProperties:!0}),launchUrl:v(),port:d(),listenHost:v(),statusHost:v(),startupTimeoutMs:d(),probeTimeoutMs:d(),reuseExisting:m(),installDependenciesIfNeeded:m(),runtimeFilePath:v(),logPath:v(),metroHost:v(),metroPort:d(),bundleUrl:v(),timeoutMs:d()})];function F(t,e){return B(t,R(t),e)}let H=["pan","fling","swipe","pinch","rotate","transform"],T=["up","down","left","right"],D=["left","right","left-edge","right-edge"],L={target:b(x()),button:h(["primary","secondary","middle"],"Pointer button for platforms that support mouse buttons."),...r(),..._()},q={target:b(x()),...r(),..._()},G={target:b(x()),text:b(v("Text to enter into the target.")),delayMs:d("Delay between typed characters.",{min:0}),...r()},z={target:b(x()),durationMs:d("Long press duration in milliseconds.",{min:0}),...r()},J={from:b(w("Swipe start point.")),to:b(w("Swipe end point.")),durationMs:d("Swipe duration in milliseconds.",{min:0}),count:d("Number of swipe repetitions.",{min:1}),pauseMs:d("Pause between repeated swipes.",{min:0}),pattern:h(["one-way","ping-pong"])},X={x:b(A("X coordinate.")),y:b(A("Y coordinate."))},Y={text:b(v("Text to type.")),delayMs:d("Delay between typed characters.",{min:0})},Q={direction:b(h(["up","down","left","right","top","bottom"])),amount:A("Platform scroll amount."),pixels:d("Pixel scroll amount.",{min:0})},V={format:b(h(["text","attrs"])),target:b(i()),...r()},W={predicate:b(h(["visible","hidden","exists","editable","selected","text"])),selector:b(v()),value:v(),...r()},Z={locator:h(["any","text","label","value","role","id"]),query:b(v()),action:h(["click","focus","exists","getText","getAttrs","wait","fill","type"]),value:v(),timeoutMs:d(),first:m(),last:m(),depth:d(),raw:m()},tt={kind:b(h(H,"Gesture variant.")),direction:h(T,"Fling direction."),preset:h(D,"Swipe preset."),origin:w("Gesture origin point."),delta:w("Movement delta for pan or transform gestures."),distance:d("Fling distance.",{min:0}),scale:A("Pinch or transform scale."),degrees:A("Rotation in degrees."),velocity:d("Rotate gesture velocity.",{min:0}),durationMs:d("Gesture duration in milliseconds.",{min:0})},te=[{name:"click",description:R("click"),inputSchema:S(L),readInput:t=>M(t,L)},{name:"press",description:R("press"),inputSchema:S(q),readInput:t=>M(t,q)},{name:"fill",description:R("fill"),inputSchema:S(G),readInput:t=>M(t,G)},ta("longpress",z),ta("swipe",J),ta("focus",X),ta("type",Y),ta("scroll",Q),ta("get",V),ta("is",W),ta("find",Z),{name:"gesture",description:R("gesture"),inputSchema:S(tt),readInput:function(t){let e=a(t),r=k(e),i=f(e,"kind",H);return"pan"===i?{...r,kind:i,origin:y(e,"origin"),delta:y(e,"delta"),durationMs:E(e,"durationMs",{min:0})}:"fling"===i?{...r,kind:i,direction:f(e,"direction",T),origin:y(e,"origin"),distance:E(e,"distance",{min:0}),durationMs:E(e,"durationMs",{min:0})}:"swipe"===i?{...r,kind:i,preset:f(e,"preset",D),durationMs:E(e,"durationMs",{min:0})}:"pinch"===i?{...r,kind:i,scale:P(e,"scale"),origin:tr(e,"origin")}:"rotate"===i?{...r,kind:i,degrees:P(e,"degrees"),origin:tr(e,"origin"),velocity:E(e,"velocity",{min:0})}:{...r,kind:i,origin:y(e,"origin"),delta:y(e,"delta"),scale:P(e,"scale"),degrees:P(e,"degrees"),durationMs:E(e,"durationMs",{min:0})}}}];function ta(t,e){return B(t,R(t),e)}function tr(t,e){return void 0===t[e]?void 0:y(t,e)}let ti=new Map([...te,...$,O(e)].map(t=>[t.name,t]));function to(){return t().map(t=>{var e;if(!tn(t))throw Error(`Missing command metadata for MCP-exposed command: ${t}`);return e=t,ti.get(e)})}function tn(t){return ti.has(t)}export{$ as clientCommandMetadata,O as createBatchCommandMetadata,U as defineExecutableCommand,te as interactionCommandMetadata,tn as isCommandName,to as listMcpCommandMetadata};
|
|
File without changes
|
|
File without changes
|