@swmansion/argent 0.35.1-next.21 → 0.35.1-next.23
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
CHANGED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
|
|
4
4
|
<p align="center"><b>English</b> | <a href="README.ja.md">日本語</a> | <a href="README.zh-CN.md">简体中文</a></p>
|
|
5
5
|
|
|
6
|
+
<p align="center"><a href="https://glama.ai/mcp/servers/software-mansion/argent"><img alt="software-mansion/argent MCP server" src="https://glama.ai/mcp/servers/software-mansion/argent/badges/score.svg" /></a></p>
|
|
7
|
+
|
|
6
8
|
[](https://swm-delivery.com/www/delivery/ck-slug.php?zoneid=zone-gh-argent-1&n=1)
|
|
7
9
|
[](https://swm-delivery.com/www/delivery/ck-slug.php?zoneid=zone-gh-argent-2&n=1)
|
|
8
10
|
[](https://swm-delivery.com/www/delivery/ck-slug.php?zoneid=zone-gh-argent-3&n=1)
|
package/dist/cli-cmds.mjs
CHANGED
|
@@ -38595,7 +38595,7 @@ function isCi(env = process.env) {
|
|
|
38595
38595
|
var SESSION_ID2 = randomUUID5();
|
|
38596
38596
|
function readCliVersion() {
|
|
38597
38597
|
if (true) {
|
|
38598
|
-
return "0.35.1-next.
|
|
38598
|
+
return "0.35.1-next.23";
|
|
38599
38599
|
}
|
|
38600
38600
|
return "0.0.0";
|
|
38601
38601
|
}
|
package/dist/installer.mjs
CHANGED
|
@@ -17117,7 +17117,7 @@ function isCi(env = process.env) {
|
|
|
17117
17117
|
var SESSION_ID = randomUUID4();
|
|
17118
17118
|
function readCliVersion() {
|
|
17119
17119
|
if (true) {
|
|
17120
|
-
return "0.35.1-next.
|
|
17120
|
+
return "0.35.1-next.23";
|
|
17121
17121
|
}
|
|
17122
17122
|
return "0.0.0";
|
|
17123
17123
|
}
|
package/dist/mcp-server.mjs
CHANGED
|
@@ -38067,7 +38067,7 @@ async function startMcpServer(options) {
|
|
|
38067
38067
|
const autoDescribeOn = autoDescribeEnabled();
|
|
38068
38068
|
const whatsNewOn = whatsNewEnabled();
|
|
38069
38069
|
const installedVersion = getInstalledVersion();
|
|
38070
|
-
const highlightsVersion = true ? "0.35.1-next.
|
|
38070
|
+
const highlightsVersion = true ? "0.35.1-next.23" : installedVersion;
|
|
38071
38071
|
const captureTimeoutMs = options.captureTimeoutMs ?? CAPTURE_TIMEOUT_MS;
|
|
38072
38072
|
const trees = createTreeMemory();
|
|
38073
38073
|
const screenshots = createScreenshotMemory();
|
|
@@ -267,6 +267,8 @@ export interface ArgentToolArgs {
|
|
|
267
267
|
};
|
|
268
268
|
/** Save the script in the shutdown list. Pending fragment cleanup runs before the script. The script's output reaches only later shutdown steps. stepCount counts shutdown entries. */
|
|
269
269
|
shutdown?: boolean;
|
|
270
|
+
/** Recording device from `list-devices`, read by the script as ARGENT_DEVICE_ID/_PLATFORM/_KIND as on a replay. Omit for a test with no device. */
|
|
271
|
+
udid?: string;
|
|
270
272
|
};
|
|
271
273
|
"e2e-add-step": {
|
|
272
274
|
/** E2E test name from `e2e-start-recording`. */
|
package/dist/tool-server.cjs
CHANGED
|
@@ -72978,7 +72978,7 @@ function isCi(env = process.env) {
|
|
|
72978
72978
|
var SESSION_ID = (0, import_node_crypto3.randomUUID)();
|
|
72979
72979
|
function readCliVersion() {
|
|
72980
72980
|
if (true) {
|
|
72981
|
-
return "0.35.1-next.
|
|
72981
|
+
return "0.35.1-next.23";
|
|
72982
72982
|
}
|
|
72983
72983
|
return "0.0.0";
|
|
72984
72984
|
}
|
|
@@ -164487,6 +164487,24 @@ function describeDuration(ms3) {
|
|
|
164487
164487
|
|
|
164488
164488
|
// ../tool-server/src/tools/flows/flow-script-step.ts
|
|
164489
164489
|
init_capability();
|
|
164490
|
+
var vegaKindBySerial = /* @__PURE__ */ new Map();
|
|
164491
|
+
async function scriptDeviceKind(device) {
|
|
164492
|
+
if (device.platform !== "vega") return device.kind;
|
|
164493
|
+
const known = vegaKindBySerial.get(device.id);
|
|
164494
|
+
if (known) return known;
|
|
164495
|
+
const listed = (await listVegaDevices().catch(() => [])).find((d) => d.serial === device.id);
|
|
164496
|
+
if (!listed) return device.kind;
|
|
164497
|
+
vegaKindBySerial.set(device.id, listed.kind);
|
|
164498
|
+
return listed.kind;
|
|
164499
|
+
}
|
|
164500
|
+
async function scriptDeviceEnv(device) {
|
|
164501
|
+
if (!device) return null;
|
|
164502
|
+
return {
|
|
164503
|
+
ARGENT_DEVICE_ID: device.id,
|
|
164504
|
+
ARGENT_DEVICE_PLATFORM: device.platform,
|
|
164505
|
+
ARGENT_DEVICE_KIND: await scriptDeviceKind(device)
|
|
164506
|
+
};
|
|
164507
|
+
}
|
|
164490
164508
|
function resolveScriptEnv(env, projectRoot, clientSecrets) {
|
|
164491
164509
|
const resolved = {};
|
|
164492
164510
|
const secrets = [];
|
|
@@ -164557,8 +164575,8 @@ async function runFlowScriptStep(request4) {
|
|
|
164557
164575
|
let resolved;
|
|
164558
164576
|
try {
|
|
164559
164577
|
if (request4.env) {
|
|
164560
|
-
const
|
|
164561
|
-
resolved = resolveScriptEnv(
|
|
164578
|
+
const env2 = outputsInEnv(request4.env, request4.output ?? {});
|
|
164579
|
+
resolved = resolveScriptEnv(env2, request4.projectRoot, request4.clientSecrets);
|
|
164562
164580
|
}
|
|
164563
164581
|
} catch (err) {
|
|
164564
164582
|
return {
|
|
@@ -164566,13 +164584,16 @@ async function runFlowScriptStep(request4) {
|
|
|
164566
164584
|
outcome: { status: "error", reason: err instanceof Error ? err.message : String(err) }
|
|
164567
164585
|
};
|
|
164568
164586
|
}
|
|
164587
|
+
const deviceEnv2 = await scriptDeviceEnv(request4.device);
|
|
164588
|
+
const env = deviceEnv2 ? mergeScriptEnv(deviceEnv2, resolved?.env) : resolved?.env;
|
|
164569
164589
|
const result = await flowScriptExecutor().execute({
|
|
164570
164590
|
scriptPath: canonical,
|
|
164571
164591
|
output: request4.output ?? {},
|
|
164572
164592
|
...step.timeout !== void 0 ? { timeoutMs: step.timeout } : {},
|
|
164573
164593
|
projectRoot: request4.projectRoot,
|
|
164574
164594
|
flowDir,
|
|
164575
|
-
...
|
|
164595
|
+
...env ? { env } : {},
|
|
164596
|
+
...resolved ? { secrets: resolved.secrets } : {},
|
|
164576
164597
|
...request4.logBudget ? { logBudget: request4.logBudget } : {},
|
|
164577
164598
|
...request4.signal ? { signal: request4.signal } : {}
|
|
164578
164599
|
});
|
|
@@ -168567,6 +168588,7 @@ var nodePath = __toESM(require("node:path"));
|
|
|
168567
168588
|
init_src2();
|
|
168568
168589
|
var fs82 = __toESM(require("node:fs/promises"));
|
|
168569
168590
|
init_capability();
|
|
168591
|
+
init_device_info();
|
|
168570
168592
|
var OUTPUT_RENDER_LIMIT_BYTES = 64 * 1024;
|
|
168571
168593
|
async function recordedStepCount(session, block) {
|
|
168572
168594
|
const onDisk = await countStepsOnDisk(session.filePath, block);
|
|
@@ -168624,6 +168646,9 @@ var zodSchema74 = external_exports.object({
|
|
|
168624
168646
|
env: envRecordSchema(external_exports.string()).optional().describe("Env overrides (supports `{{secret:NAME}}` and `{{output:PATH}}`)."),
|
|
168625
168647
|
shutdown: external_exports.boolean().optional().describe(
|
|
168626
168648
|
"Save the script in the shutdown list. Pending fragment cleanup runs before the script. The script's output reaches only later shutdown steps. stepCount counts shutdown entries."
|
|
168649
|
+
),
|
|
168650
|
+
udid: external_exports.string().min(1).optional().describe(
|
|
168651
|
+
"Recording device from `list-devices`, read by the script as ARGENT_DEVICE_ID/_PLATFORM/_KIND as on a replay. Omit for a test with no device."
|
|
168627
168652
|
)
|
|
168628
168653
|
});
|
|
168629
168654
|
var flowAddScriptTool = deferredShutdownFirst({
|
|
@@ -168685,6 +168710,7 @@ Returns \`{ status, reason?, outputJson?, stepCount, recorded? }\`. A failed scr
|
|
|
168685
168710
|
flowDir,
|
|
168686
168711
|
step,
|
|
168687
168712
|
projectRoot: params.project_root,
|
|
168713
|
+
...params.udid !== void 0 ? { device: resolveDevice(params.udid) } : {},
|
|
168688
168714
|
env,
|
|
168689
168715
|
output: ranAgainst,
|
|
168690
168716
|
...ctx?.clientSecrets ? { clientSecrets: ctx.clientSecrets } : {},
|
|
@@ -172802,6 +172828,7 @@ async function runScriptStep(state3, step, scope) {
|
|
|
172802
172828
|
flowDir: scopeFlowDir(scope),
|
|
172803
172829
|
step,
|
|
172804
172830
|
projectRoot: state3.projectRoot,
|
|
172831
|
+
device: state3.device,
|
|
172805
172832
|
env,
|
|
172806
172833
|
output: state3.output.doc,
|
|
172807
172834
|
...state3.ctx?.clientSecrets ? { clientSecrets: state3.ctx.clientSecrets } : {},
|
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.23",
|
|
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": "bde09c420a1cfe0505a63065a6cd23da98aa7147"
|
|
102
102
|
}
|
|
@@ -278,6 +278,8 @@ Node runs `.mts` and `.ts` by removing the types, and it does not read `tsconfig
|
|
|
278
278
|
|
|
279
279
|
If the reason says that the Node.js of the tool-server cannot run TypeScript, use `.mjs` or `.js` files.
|
|
280
280
|
|
|
281
|
+
A script reads the run's device from three environment variables: `ARGENT_DEVICE_ID` (the `list-devices` id), `ARGENT_DEVICE_PLATFORM` (for example `ios`, `ios-remote`, `android`, `chromium`) and `ARGENT_DEVICE_KIND` (`simulator`, `emulator`, `device`, `vvd`, `app` or `catalyst`). A run without a device leaves all three unset. A name set in an `env` layer wins over the device value. An `ext:` id (device provider) or an `ios-remote` id is not one that `xcrun simctl` or `adb` accepts. A HarmonyOS id is `harmony-<connectKey>`; strip `harmony-` before `hdc -t`. A simulator from `ios.additionalDeviceSets` (for example Radon IDE) needs `xcrun simctl --set <dir>`. When the test runs on a device, pass that device's id as `udid` to `e2e-add-script`, so the recorded run gets the same values as a replay; omit it for a test of script steps alone. The id is not written to the test file.
|
|
282
|
+
|
|
281
283
|
Over a link (`argent link` or `ARGENT_TOOLS_URL`, also to 127.0.0.1), `e2e-add-script` refuses the call, and a replay rejects a test with a `script:` step. Record and replay a test with a script without a link.
|
|
282
284
|
|
|
283
285
|
### Pass values between steps
|