@swmansion/argent 0.35.1-next.90 → 0.35.1-next.92
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/dist/cli-cmds.mjs +1 -1
- package/dist/installer.mjs +1 -1
- package/dist/mcp-server.mjs +1 -1
- package/dist/tool-server.cjs +40 -13
- package/package.json +2 -2
package/dist/cli-cmds.mjs
CHANGED
|
@@ -39147,7 +39147,7 @@ function isCi(env = process.env) {
|
|
|
39147
39147
|
var SESSION_ID2 = randomUUID5();
|
|
39148
39148
|
function readCliVersion() {
|
|
39149
39149
|
if (true) {
|
|
39150
|
-
return "0.35.1-next.
|
|
39150
|
+
return "0.35.1-next.91";
|
|
39151
39151
|
}
|
|
39152
39152
|
return "0.0.0";
|
|
39153
39153
|
}
|
package/dist/installer.mjs
CHANGED
|
@@ -17177,7 +17177,7 @@ function isCi(env = process.env) {
|
|
|
17177
17177
|
var SESSION_ID = randomUUID4();
|
|
17178
17178
|
function readCliVersion() {
|
|
17179
17179
|
if (true) {
|
|
17180
|
-
return "0.35.1-next.
|
|
17180
|
+
return "0.35.1-next.91";
|
|
17181
17181
|
}
|
|
17182
17182
|
return "0.0.0";
|
|
17183
17183
|
}
|
package/dist/mcp-server.mjs
CHANGED
|
@@ -38588,7 +38588,7 @@ async function startMcpServer(options) {
|
|
|
38588
38588
|
const autoDescribeOn = autoDescribeEnabled();
|
|
38589
38589
|
const whatsNewOn = whatsNewEnabled();
|
|
38590
38590
|
const installedVersion = getInstalledVersion();
|
|
38591
|
-
const highlightsVersion = true ? "0.35.1-next.
|
|
38591
|
+
const highlightsVersion = true ? "0.35.1-next.91" : installedVersion;
|
|
38592
38592
|
const captureTimeoutMs = options.captureTimeoutMs ?? CAPTURE_TIMEOUT_MS;
|
|
38593
38593
|
const trees = createTreeMemory();
|
|
38594
38594
|
const screenshots = createScreenshotMemory();
|
package/dist/tool-server.cjs
CHANGED
|
@@ -73425,7 +73425,7 @@ function isCi(env = process.env) {
|
|
|
73425
73425
|
var SESSION_ID = (0, import_node_crypto4.randomUUID)();
|
|
73426
73426
|
function readCliVersion() {
|
|
73427
73427
|
if (true) {
|
|
73428
|
-
return "0.35.1-next.
|
|
73428
|
+
return "0.35.1-next.91";
|
|
73429
73429
|
}
|
|
73430
73430
|
return "0.0.0";
|
|
73431
73431
|
}
|
|
@@ -108942,7 +108942,7 @@ function outdatedCloudCliNote(version3) {
|
|
|
108942
108942
|
return `iOS: ${argentCloudCommand()} ${version3} is older than ${MIN_ARGENT_CLOUD_VERSION}, the version Argent expects. Argent Cloud simulators still work. The user can update it with \`argent cloud install\`.`;
|
|
108943
108943
|
}
|
|
108944
108944
|
var ANDROID_SDK_MISSING_NOTE = "Android: no SDK found (adb, emulator). Installing the platform tools and creating an AVD adds Android targets.";
|
|
108945
|
-
var EXTERNAL_DEVICES_HINT = `Some entries are tagged 'external: true': another application is already driving that device, and its 'provider' field names it ('provider.workspace' names the project it opened, when it published one). Drive them with the usual tools, by the 'ext:'-prefixed id. Two rules differ: prefer the external device whose 'provider.workspace.path' matches the project you are working in, and do NOT call boot-device on them, since the provider owns their lifecycle. stop-simulator-server IS safe on them and never stops the provider's server \u2014 it drops argent's cached handles, which is the recovery when calls keep failing against an endpoint the provider has since moved. Each entry's 'capabilities' lists the mechanisms that provider granted; a tool relying on one it withheld fails with a clear message naming the provider.`;
|
|
108945
|
+
var EXTERNAL_DEVICES_HINT = `Some entries are tagged 'external: true': another application is already driving that device, and its 'provider' field names it ('provider.workspace' names the project it opened, when it published one). Drive them with the usual tools, by the 'ext:'-prefixed id. Two rules differ: prefer the external device whose 'provider.workspace.path' matches the project you are working in, and do NOT call boot-device on them, since the provider owns their lifecycle. stop-simulator-server IS safe on them and never stops the provider's server \u2014 it drops argent's cached handles, which is the recovery when calls keep failing against an endpoint the provider has since moved. stop-all-simulator-servers does the same for that server, also under the device's plain UDID / serial, and leaves it out of 'stopped', so an empty 'stopped' does not mean the provider's server is gone. Each entry's 'capabilities' lists the mechanisms that provider granted; a tool relying on one it withheld fails with a clear message naming the provider.`;
|
|
108946
108946
|
function foldableCheckTimedOutHint(names) {
|
|
108947
108947
|
return `The foldable check did not finish in time for ${names.join(", ")}, so 'foldable: true' may be missing there. Call list-devices again to retry the check.`;
|
|
108948
108948
|
}
|
|
@@ -137856,14 +137856,14 @@ async function openSimulatorWindow(udid) {
|
|
|
137856
137856
|
if ((0, import_node_fs20.existsSync)(simulatorApp)) {
|
|
137857
137857
|
const launched = await launchSimulatorApp(
|
|
137858
137858
|
simulatorApp,
|
|
137859
|
-
() => execFileAsync27("open", ["-a", simulatorApp], { timeout })
|
|
137859
|
+
() => execFileAsync27("open", ["-g", "-a", simulatorApp], { timeout })
|
|
137860
137860
|
);
|
|
137861
137861
|
return launched ? void 0 : `${simulatorApp} exits right after launch on this host, so Argent no longer opens it and the device runs without a window. Delete ${verdictFilePath()} to try opening it again.`;
|
|
137862
137862
|
}
|
|
137863
137863
|
const deviceHubApp = (0, import_node_path23.join)(developerDir2, "..", "Applications", "DeviceHub.app");
|
|
137864
137864
|
if ((0, import_node_fs20.existsSync)(deviceHubApp)) {
|
|
137865
137865
|
const url2 = `devices://device/open?id=${encodeURIComponent(udid)}`;
|
|
137866
|
-
await execFileAsync27("open", ["-a", deviceHubApp, url2], { timeout });
|
|
137866
|
+
await execFileAsync27("open", ["-g", "-a", deviceHubApp, url2], { timeout });
|
|
137867
137867
|
}
|
|
137868
137868
|
}
|
|
137869
137869
|
async function bootIosRemote(id, registry2, force) {
|
|
@@ -167484,9 +167484,9 @@ Returns a session list or loaded summary. Fails if \`session_id\` or its files a
|
|
|
167484
167484
|
init_zod();
|
|
167485
167485
|
init_src2();
|
|
167486
167486
|
init_device_info();
|
|
167487
|
-
init_external_devices();
|
|
167488
167487
|
|
|
167489
167488
|
// ../tool-server/src/tools/simulator/device-services.ts
|
|
167489
|
+
init_src2();
|
|
167490
167490
|
init_external_devices();
|
|
167491
167491
|
var URN_SUFFIXES = ["", ":tcp"];
|
|
167492
167492
|
var PORT_KEYED_NAMESPACES = [
|
|
@@ -167565,16 +167565,42 @@ function deviceIdOfUrn(urn, namespaces) {
|
|
|
167565
167565
|
}
|
|
167566
167566
|
return void 0;
|
|
167567
167567
|
}
|
|
167568
|
-
function
|
|
167569
|
-
if (isExternalDeviceUrn(urn)) return true;
|
|
167568
|
+
async function isLentNativeDevtools(registry2, urn) {
|
|
167570
167569
|
const portion = deviceIdOfUrn(urn, [NATIVE_DEVTOOLS_NAMESPACE]);
|
|
167571
167570
|
if (portion === void 0) return false;
|
|
167572
167571
|
const suffix = URN_SUFFIXES.find((s) => s !== "" && portion.endsWith(s)) ?? "";
|
|
167573
|
-
|
|
167572
|
+
if (isExternalId(portion.slice(0, portion.length - suffix.length))) return true;
|
|
167573
|
+
try {
|
|
167574
|
+
if (registry2.getServiceState(urn) !== "RUNNING" /* RUNNING */) return false;
|
|
167575
|
+
const api = await registry2.resolveService(urn);
|
|
167576
|
+
return api.armsEnv === false;
|
|
167577
|
+
} catch {
|
|
167578
|
+
return false;
|
|
167579
|
+
}
|
|
167574
167580
|
}
|
|
167575
167581
|
function unnameableSessionUrns(urns) {
|
|
167576
167582
|
return urns.filter((urn) => isLogicalKeyedDevice(deviceIdOfUrn(urn, PORT_KEYED_NAMESPACES)));
|
|
167577
167583
|
}
|
|
167584
|
+
async function isBorrowedSimulatorServer(registry2, urn) {
|
|
167585
|
+
if (!urn.startsWith(`${SIMULATOR_SERVER_NAMESPACE}:`)) return false;
|
|
167586
|
+
if (isExternalDeviceUrn(urn)) return true;
|
|
167587
|
+
try {
|
|
167588
|
+
if (registry2.getServiceState(urn) !== "RUNNING" /* RUNNING */) return false;
|
|
167589
|
+
const api = await registry2.resolveService(urn);
|
|
167590
|
+
return api.external === true;
|
|
167591
|
+
} catch {
|
|
167592
|
+
return false;
|
|
167593
|
+
}
|
|
167594
|
+
}
|
|
167595
|
+
async function providerOwnedUrns(registry2, urns) {
|
|
167596
|
+
const owned = /* @__PURE__ */ new Set();
|
|
167597
|
+
for (const urn of urns) {
|
|
167598
|
+
if (await isLentNativeDevtools(registry2, urn) || await isBorrowedSimulatorServer(registry2, urn)) {
|
|
167599
|
+
owned.add(urn);
|
|
167600
|
+
}
|
|
167601
|
+
}
|
|
167602
|
+
return owned;
|
|
167603
|
+
}
|
|
167578
167604
|
|
|
167579
167605
|
// ../tool-server/src/tools/simulator/stop-simulator-server.ts
|
|
167580
167606
|
var zodSchema69 = external_exports.object({
|
|
@@ -167587,7 +167613,7 @@ function createStopSimulatorServerTool(registry2) {
|
|
|
167587
167613
|
id: "stop-simulator-server",
|
|
167588
167614
|
description: `Stop the transport session for one device (simulator-server, physical iOS runner, Chromium CDP, or TV daemons).
|
|
167589
167615
|
Use when restarting a wedged transport or freeing one device without affecting others (not routinely after every task; use \`stop-all-simulator-servers\` with \`devices\` to also stop devtools/profilers/debuggers). On Chromium, also ends the JS debugger session.<flag:macos-apps> On Mac apps, also stops native capture (discarding records) and screen recording.</flag:macos-apps>
|
|
167590
|
-
Returns \`{ stopped, udid }\` (\`stopped: false\` if none was running
|
|
167616
|
+
Returns \`{ stopped, udid }\` (\`stopped: true\` if any of these services was running, \`false\` if none was). A simulator-server that Argent did not start keeps running and does not count, so on a TV target \`stopped\` can be true from the TV daemons alone. Fails only on invalid input.`,
|
|
167591
167617
|
zodSchema: zodSchema69,
|
|
167592
167618
|
interaction: {
|
|
167593
167619
|
startedMsg: ({ params }) => `Stopping simulator server for ${params.udid}`,
|
|
@@ -167599,16 +167625,16 @@ Returns \`{ stopped, udid }\` (\`stopped: false\` if none was running). Fails on
|
|
|
167599
167625
|
const udid = params.udid;
|
|
167600
167626
|
const platform = resolveDevice(udid).platform;
|
|
167601
167627
|
const namespaces = transportNamespacesForPlatform(platform);
|
|
167602
|
-
const external = isExternalId(udid);
|
|
167603
167628
|
const snapshot = registry2.getSnapshot();
|
|
167604
167629
|
let stopped = false;
|
|
167605
167630
|
const urns = [...snapshot.services.keys()].filter(
|
|
167606
167631
|
(urn) => deviceIdOwningUrn(urn, namespaces, [udid]) !== void 0
|
|
167607
167632
|
);
|
|
167633
|
+
const providerUrns = await providerOwnedUrns(registry2, urns);
|
|
167608
167634
|
for (const urn of urns) {
|
|
167609
167635
|
const entry = snapshot.services.get(urn);
|
|
167610
167636
|
if (!entry || entry.state === "IDLE" /* IDLE */) continue;
|
|
167611
|
-
if (
|
|
167637
|
+
if (providerUrns.has(urn)) {
|
|
167612
167638
|
await registry2.disposeService(urn);
|
|
167613
167639
|
continue;
|
|
167614
167640
|
}
|
|
@@ -167634,7 +167660,7 @@ function createStopAllSimulatorServersTool(registry2) {
|
|
|
167634
167660
|
description: `Stop device-owned background services (simulator-server, devtools, accessibility, TV daemons, Chromium CDP, screen recordings, profilers, network capture/throttle, and JS debugger sessions), freeing their processes and ports.
|
|
167635
167661
|
Use when cleaning up or ending a session, or when a skill asks to recycle services \u2014 not routinely after every task (services are reused). Use \`network-capture-stop\` to stop network capture while keeping recorded requests.
|
|
167636
167662
|
Always pass \`devices\` with this session's device IDs (plus any \`logicalDeviceId\` used with \`debugger-connect\` on shared Metro) so other agents' devices aren't torn down; omit \`devices\` only for a machine-wide sweep. \`[]\` stops nothing.
|
|
167637
|
-
Returns \`{ stopped, unmatched?, left_running?, aborted? }\` (\`left_running\` names unscoped debugger URNs; re-call with the id after \`<ns>:<port>:\` to reap them). Fails if unknown keys (e.g. \`udids\`) are passed.`,
|
|
167663
|
+
Returns \`{ stopped, unmatched?, left_running?, aborted? }\` (\`stopped\` leaves out a simulator-server or native devtools agent that Argent did not start, which keeps running; \`left_running\` names unscoped debugger URNs; re-call with the id after \`<ns>:<port>:\` to reap them). Fails if unknown keys (e.g. \`udids\`) are passed.`,
|
|
167638
167664
|
zodSchema: zodSchema70,
|
|
167639
167665
|
interaction: {
|
|
167640
167666
|
// "all" only holds for the unscoped sweep; a scoped call touches just the
|
|
@@ -167675,6 +167701,7 @@ Returns \`{ stopped, unmatched?, left_running?, aborted? }\` (\`left_running\` n
|
|
|
167675
167701
|
let aborted2 = false;
|
|
167676
167702
|
const paused = await pauseJsCapturesOf(registry2, scoped ? devices2 : void 0);
|
|
167677
167703
|
const snapshot = registry2.getSnapshot();
|
|
167704
|
+
const providerUrns = await providerOwnedUrns(registry2, snapshot.services.keys());
|
|
167678
167705
|
for (const [urn, entry] of snapshot.services) {
|
|
167679
167706
|
if (ctx?.signal?.aborted) {
|
|
167680
167707
|
aborted2 = true;
|
|
@@ -167687,7 +167714,7 @@ Returns \`{ stopped, unmatched?, left_running?, aborted? }\` (\`left_running\` n
|
|
|
167687
167714
|
if (matches2 && entry.state !== "IDLE" /* IDLE */) {
|
|
167688
167715
|
const wasLive = isLiveServiceState(entry.state);
|
|
167689
167716
|
await registry2.disposeService(urn);
|
|
167690
|
-
if (wasLive && !
|
|
167717
|
+
if (wasLive && !providerUrns.has(urn)) stopped.push(urn);
|
|
167691
167718
|
} else if (scoped && isLiveServiceState(entry.state) && isDeviceServiceUrn(urn, PORT_KEYED_NAMESPACES)) {
|
|
167692
167719
|
survivors.push(urn);
|
|
167693
167720
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swmansion/argent",
|
|
3
|
-
"version": "0.35.1-next.
|
|
3
|
+
"version": "0.35.1-next.92",
|
|
4
4
|
"mcpName": "io.github.software-mansion/argent",
|
|
5
5
|
"description": "MCP server for iOS Simulator, Android Emulator, Chromium app and Mac app control",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -98,5 +98,5 @@
|
|
|
98
98
|
"vitest": "^5.0.5",
|
|
99
99
|
"yaml": "^2.9.1"
|
|
100
100
|
},
|
|
101
|
-
"gitHead": "
|
|
101
|
+
"gitHead": "9222e207f06e91cb44ec4a4ca6f7ab9193acd630"
|
|
102
102
|
}
|