agent-device 0.11.15 → 0.12.0
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 +2 -2
- package/dist/src/152.js +1 -0
- package/dist/src/155.js +38 -0
- package/dist/src/267.js +1 -0
- package/dist/src/57.js +1 -0
- package/dist/src/818.js +1 -3
- package/dist/src/924.js +1 -1
- package/dist/src/974.js +2 -2
- package/dist/src/bin.js +36 -37
- package/dist/src/contracts.d.ts +59 -0
- package/dist/src/contracts.js +1 -1
- package/dist/src/daemon.js +15 -18
- package/dist/src/index.d.ts +15 -172
- package/dist/src/index.js +3 -2
- package/dist/src/metro.d.ts +6 -0
- package/dist/src/metro.js +1 -1
- package/package.json +1 -1
- package/skills/agent-device/SKILL.md +1 -1
- package/skills/agent-device/references/exploration.md +19 -5
- package/skills/agent-device/references/macos-desktop.md +1 -0
- package/dist/src/760.js +0 -33
- package/dist/src/957.js +0 -2
package/README.md
CHANGED
|
@@ -52,7 +52,7 @@ In practice, most work follows the same pattern:
|
|
|
52
52
|
1. Discover the exact app id with `apps` if the package or bundle name is uncertain.
|
|
53
53
|
2. `open` a target app or URL.
|
|
54
54
|
3. `snapshot -i` to inspect the current screen.
|
|
55
|
-
4. `press`, `fill`, `scroll`, `get`, or `wait` using refs or selectors. On iOS and Android, default snapshot text follows the same visible-first contract: refs shown in default output are actionable now, while hidden content is surfaced as scroll/list discovery hints instead of tappable off-screen refs.
|
|
55
|
+
4. `press`, `fill`, `scroll`, `get`, or `wait` using refs or selectors. On iOS and Android, default snapshot text follows the same visible-first contract: refs shown in default output are actionable now, while hidden content is surfaced as scroll/list discovery hints instead of tappable off-screen refs. If the target only appears in a hidden-content hint, use `scroll <direction>` and re-snapshot.
|
|
56
56
|
Use `rotate <orientation>` when a flow needs a deterministic portrait or landscape state on mobile targets.
|
|
57
57
|
5. `diff snapshot` or re-snapshot after UI changes.
|
|
58
58
|
6. `close` when the session is finished.
|
|
@@ -82,7 +82,7 @@ npm install -g agent-device
|
|
|
82
82
|
|
|
83
83
|
Set `AGENT_DEVICE_NO_UPDATE_NOTIFIER=1` to disable the notice.
|
|
84
84
|
|
|
85
|
-
On macOS, `agent-device` includes a local `agent-device-macos-helper` source package that is built on demand for desktop permission checks, alert handling, and helper-backed desktop snapshot surfaces. Release distribution should use a signed/notarized helper build; source checkouts fall back to a local Swift build.
|
|
85
|
+
On macOS, `agent-device` includes a local `agent-device-macos-helper` source package that is built on demand for desktop permission checks, alert handling, and helper-backed desktop snapshot surfaces. Release distribution should use a signed/notarized helper build; source checkouts fall back to a local Swift build. Local helper overrides through `AGENT_DEVICE_MACOS_HELPER_BIN` must use an absolute executable path.
|
|
86
86
|
|
|
87
87
|
## Contributing
|
|
88
88
|
|
package/dist/src/152.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e=/(token|secret|password|authorization|cookie|api[_-]?key|access[_-]?key|private[_-]?key)/i,t=/(bearer\s+[a-z0-9._-]+|(?:api[_-]?key|token|secret|password)\s*[=:]\s*\S+)/i;function r(r){return function r(n,i,o){if(null==n)return n;if("string"==typeof n){var s=n,a=o;let r=s.trim();if(!r)return s;if(a&&e.test(a)||t.test(r))return"[REDACTED]";let i=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}}(r);return i||(r.length>400?`${r.slice(0,200)}...<truncated>`:r)}if("object"!=typeof n)return n;if(i.has(n))return"[Circular]";if(i.add(n),Array.isArray(n))return n.map(e=>r(e,i));let c={};for(let[t,o]of Object.entries(n)){if(e.test(t)){c[t]="[REDACTED]";continue}c[t]=r(o,i,t)}return c}(r,new WeakSet)}class n extends Error{code;details;cause;constructor(e,t,r,n){super(t),this.code=e,this.details=r,this.cause=n}}function i(e,t={}){let s=e instanceof n?e:e instanceof Error?new n("UNKNOWN",e.message,void 0,e):new n("UNKNOWN","Unknown error",{err:e}),a=s.details?r(s.details):void 0,c=a&&"string"==typeof a.hint?a.hint:void 0,d=(a&&"string"==typeof a.diagnosticId?a.diagnosticId:void 0)??t.diagnosticId,l=(a&&"string"==typeof a.logPath?a.logPath:void 0)??t.logPath,u=c??o(s.code),f=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}(a),p=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}(s.code,s.message,a);return{code:s.code,message:p,hint:u,diagnosticId:d,logPath:l,details:f}}function o(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"COMMAND_FAILED":default:return"Retry with --debug and inspect diagnostics log for details.";case"UNAUTHORIZED":return"Refresh daemon metadata and retry the command."}}export{n as AppError,o as defaultHintForCode,i as normalizeError,r as redactDiagnosticData};
|