You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

agent-device

Package Overview
Dependencies
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

agent-device - npm Package Compare versions

Comparing version
0.1.6
to
0.1.7
+18
-20
package.json
{
"name": "agent-device",
"version": "0.1.6",
"version": "0.1.7",
"description": "Unified control plane for physical and virtual devices via an agent-driven CLI.",

@@ -14,20 +14,2 @@ "license": "MIT",

},
"scripts": {
"lint": "node --eval \"console.log('no lint')\"",
"build": "rslib build",
"build:node": "pnpm build && rm -f ~/.agent-device/daemon.json",
"build:swift": "swift build -c release --package-path ios-runner/AXSnapshot",
"build:axsnapshot": "pnpm build:swift && mkdir -p dist/bin && cp -f ios-runner/AXSnapshot/.build/release/axsnapshot dist/bin/axsnapshot && chmod +x dist/bin/axsnapshot",
"build:xcuitest": "AGENT_DEVICE_IOS_CLEAN_DERIVED=1 xcodebuild build-for-testing -project ios-runner/AgentDeviceRunner/AgentDeviceRunner.xcodeproj -scheme AgentDeviceRunner -destination \"generic/platform=iOS Simulator\" -derivedDataPath ~/.agent-device/ios-runner/derived",
"build:clis": "pnpm build:node && pnpm build:axsnapshot",
"build:all": "pnpm build:node && pnpm build:axsnapshot && pnpm build:xcuitest",
"ad": "node bin/agent-device.mjs",
"format": "prettier --write .",
"prepublishOnly": "pnpm build:node && pnpm build:axsnapshot",
"prepack": "pnpm build:node && pnpm build:axsnapshot",
"typecheck": "tsc -p tsconfig.json",
"test": "node --test",
"test:smoke": "node --test test/smoke/*.test.ts",
"test:integration": "node --test test/integration/*.test.ts"
},
"files": [

@@ -70,3 +52,19 @@ "bin",

"typescript": "^5.9.3"
},
"scripts": {
"lint": "node --eval \"console.log('no lint')\"",
"build": "rslib build",
"build:node": "pnpm build && rm -f ~/.agent-device/daemon.json",
"build:swift": "swift build -c release --package-path ios-runner/AXSnapshot",
"build:axsnapshot": "pnpm build:swift && mkdir -p dist/bin && cp -f ios-runner/AXSnapshot/.build/release/axsnapshot dist/bin/axsnapshot && chmod +x dist/bin/axsnapshot",
"build:xcuitest": "AGENT_DEVICE_IOS_CLEAN_DERIVED=1 xcodebuild build-for-testing -project ios-runner/AgentDeviceRunner/AgentDeviceRunner.xcodeproj -scheme AgentDeviceRunner -destination \"generic/platform=iOS Simulator\" -derivedDataPath ~/.agent-device/ios-runner/derived",
"build:clis": "pnpm build:node && pnpm build:axsnapshot",
"build:all": "pnpm build:node && pnpm build:axsnapshot && pnpm build:xcuitest",
"ad": "node bin/agent-device.mjs",
"format": "prettier --write .",
"typecheck": "tsc -p tsconfig.json",
"test": "node --test",
"test:smoke": "node --test test/smoke/*.test.ts",
"test:integration": "node --test test/integration/*.test.ts"
}
}
}

@@ -1024,2 +1024,43 @@ import net from 'node:net';

const refLabel = resolveRefLabel(node, session.snapshot.nodes);
const label = node.label?.trim();
if (session.device.platform === 'ios' && session.device.kind === 'simulator') {
if (refLabel && isTextInputType(node.type)) {
await runIosRunnerCommand(
session.device,
{ command: 'tap', text: refLabel, appBundleId: session.appBundleId },
{ verbose: req.flags?.verbose, logPath, traceLogPath: session?.trace?.outPath },
);
await runIosRunnerCommand(
session.device,
{ command: 'type', text, appBundleId: session.appBundleId },
{ verbose: req.flags?.verbose, logPath, traceLogPath: session?.trace?.outPath },
);
recordAction(session, {
command,
positionals: req.positionals ?? [],
flags: req.flags ?? {},
result: { ref, refLabel, mode: 'text' },
});
return { ok: true, data: { ref, mode: 'text' } };
}
if (label && isLabelUnique(session.snapshot.nodes, label)) {
await runIosRunnerCommand(
session.device,
{ command: 'tap', text: label, appBundleId: session.appBundleId },
{ verbose: req.flags?.verbose, logPath, traceLogPath: session?.trace?.outPath },
);
await runIosRunnerCommand(
session.device,
{ command: 'type', text, appBundleId: session.appBundleId },
{ verbose: req.flags?.verbose, logPath, traceLogPath: session?.trace?.outPath },
);
recordAction(session, {
command,
positionals: req.positionals ?? [],
flags: req.flags ?? {},
result: { ref, refLabel: label, mode: 'text' },
});
return { ok: true, data: { ref, mode: 'text' } };
}
}
const { x, y } = centerOfRect(node.rect);

@@ -1612,2 +1653,12 @@ const data = await dispatchCommand(

function isTextInputType(type: string | undefined): boolean {
const normalized = normalizeType(type ?? '');
return (
normalized === 'textfield' ||
normalized === 'textview' ||
normalized === 'searchfield' ||
normalized === 'textarea'
);
}
function pruneGroupNodes(nodes: RawSnapshotNode[]): RawSnapshotNode[] {

@@ -1614,0 +1665,0 @@ const skippedDepths: number[] = [];

Sorry, the diff of this file is too big to display