@swmansion/argent 0.32.1-next.1 → 0.32.1-next.11
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 +513 -438
- package/dist/client.d.ts +5 -0
- package/dist/client.js +38 -9
- package/dist/installer.mjs +15 -1
- package/dist/mcp-server.mjs +33 -8
- package/dist/tool-args.generated.d.ts +9 -4
- package/dist/tool-server.cjs +22595 -21575
- package/package.json +1 -1
- package/skills/argent-create-e2e/references/e2e-yaml.md +4 -0
- package/skills/argent-create-e2e/references/live-authoring.md +1 -0
- package/skills/argent-tv-interact/SKILL.md +4 -4
package/dist/client.d.ts
CHANGED
|
@@ -12,6 +12,11 @@ export interface ArgentToolResult<T = unknown> {
|
|
|
12
12
|
data: T;
|
|
13
13
|
/** Optional advisory note the tool attached to the result. */
|
|
14
14
|
note?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Why the call did not do its job though it returned, such as an e2e test
|
|
17
|
+
* that does not pass. See the tool-server API reference for the list.
|
|
18
|
+
*/
|
|
19
|
+
failure?: string;
|
|
15
20
|
}
|
|
16
21
|
/**
|
|
17
22
|
* A node of the `ui-tree` result. A flag is set only when true; a field named in
|
package/dist/client.js
CHANGED
|
@@ -9025,6 +9025,8 @@ var FAILURE_CODES = {
|
|
|
9025
9025
|
CLI_RUN_ARGS_JSON_INVALID: "CLI_RUN_ARGS_JSON_INVALID",
|
|
9026
9026
|
CLI_RUN_INPUT_VALIDATION_FAILED: "CLI_RUN_INPUT_VALIDATION_FAILED",
|
|
9027
9027
|
CLI_RUN_TOOL_CALL_FAILED: "CLI_RUN_TOOL_CALL_FAILED",
|
|
9028
|
+
// The result carried the tool-server's `failure` field.
|
|
9029
|
+
CLI_RUN_TOOL_RESULT_FAILED: "CLI_RUN_TOOL_RESULT_FAILED",
|
|
9028
9030
|
CLI_RUN_SAVE_IMAGE_FAILED: "CLI_RUN_SAVE_IMAGE_FAILED",
|
|
9029
9031
|
TOOL_CAPABILITY_UNSUPPORTED_OPERATION: "TOOL_CAPABILITY_UNSUPPORTED_OPERATION",
|
|
9030
9032
|
TOOL_PLATFORM_NOT_IMPLEMENTED: "TOOL_PLATFORM_NOT_IMPLEMENTED",
|
|
@@ -9123,15 +9125,21 @@ var FAILURE_CODES = {
|
|
|
9123
9125
|
ANDROID_LAUNCH_AM_START_FAILED: "ANDROID_LAUNCH_AM_START_FAILED",
|
|
9124
9126
|
ANDROID_OPEN_URL_FAILED: "ANDROID_OPEN_URL_FAILED",
|
|
9125
9127
|
ANDROID_REINSTALL_INSTALL_FAILED: "ANDROID_REINSTALL_INSTALL_FAILED",
|
|
9128
|
+
ANDROID_REINSTALL_UNINSTALL_FAILED: "ANDROID_REINSTALL_UNINSTALL_FAILED",
|
|
9126
9129
|
ANDROID_RESTART_FAILED: "ANDROID_RESTART_FAILED",
|
|
9127
9130
|
ANDROID_SETTINGS_PERMISSION_FAILED: "ANDROID_SETTINGS_PERMISSION_FAILED",
|
|
9128
9131
|
IOS_LAUNCH_SIMCTL_FAILED: "IOS_LAUNCH_SIMCTL_FAILED",
|
|
9129
9132
|
IOS_OPEN_URL_FAILED: "IOS_OPEN_URL_FAILED",
|
|
9130
9133
|
IOS_REINSTALL_INSTALL_FAILED: "IOS_REINSTALL_INSTALL_FAILED",
|
|
9134
|
+
IOS_REINSTALL_UNINSTALL_FAILED: "IOS_REINSTALL_UNINSTALL_FAILED",
|
|
9131
9135
|
IOS_RESTART_LAUNCH_FAILED: "IOS_RESTART_LAUNCH_FAILED",
|
|
9136
|
+
IOS_RESTART_TERMINATE_FAILED: "IOS_RESTART_TERMINATE_FAILED",
|
|
9137
|
+
IOS_TERMINATE_APP_FAILED: "IOS_TERMINATE_APP_FAILED",
|
|
9132
9138
|
IOS_SETTINGS_PERMISSION_FAILED: "IOS_SETTINGS_PERMISSION_FAILED",
|
|
9133
9139
|
IOS_SHAKE_FAILED: "IOS_SHAKE_FAILED",
|
|
9134
9140
|
ANDROID_SHAKE_FAILED: "ANDROID_SHAKE_FAILED",
|
|
9141
|
+
STOP_METRO_PORT_PROBE_FAILED: "STOP_METRO_PORT_PROBE_FAILED",
|
|
9142
|
+
STOP_METRO_SIGNAL_FAILED: "STOP_METRO_SIGNAL_FAILED",
|
|
9135
9143
|
// The hinge of a foldable iOS simulator: the server refused the request on a
|
|
9136
9144
|
// foldable (a bad angle, a hinge that would not move) vs. nothing to fold —
|
|
9137
9145
|
// a device that is not foldable, no hinge route, a remote simulator.
|
|
@@ -9277,10 +9285,13 @@ var FAILURE_CODES = {
|
|
|
9277
9285
|
FLOW_NAME_INVALID: "FLOW_NAME_INVALID",
|
|
9278
9286
|
FLOW_NO_ACTIVE_RECORDING: "FLOW_NO_ACTIVE_RECORDING",
|
|
9279
9287
|
FLOW_FILE_INVALID: "FLOW_FILE_INVALID",
|
|
9288
|
+
FLOW_FILE_NEWER_VERSION: "FLOW_FILE_NEWER_VERSION",
|
|
9280
9289
|
FLOW_FILE_WRITE_FAILED: "FLOW_FILE_WRITE_FAILED",
|
|
9281
9290
|
FLOW_ENTRY_UNRECOGNIZED: "FLOW_ENTRY_UNRECOGNIZED",
|
|
9282
9291
|
FLOW_E2E_HAS_PREREQUISITE: "FLOW_E2E_HAS_PREREQUISITE",
|
|
9283
9292
|
FLOW_DEVICE_RESOLUTION: "FLOW_DEVICE_RESOLUTION",
|
|
9293
|
+
// The target does not satisfy the test's `requires:` block; a directory run skips it.
|
|
9294
|
+
FLOW_REQUIREMENTS_UNMET: "FLOW_REQUIREMENTS_UNMET",
|
|
9284
9295
|
PROFILER_QUERY_MODE_INVALID: "PROFILER_QUERY_MODE_INVALID",
|
|
9285
9296
|
PROFILER_QUERY_REQUIRED_PARAM_MISSING: "PROFILER_QUERY_REQUIRED_PARAM_MISSING",
|
|
9286
9297
|
PROFILER_DATA_NOT_LOADED: "PROFILER_DATA_NOT_LOADED",
|
|
@@ -9299,6 +9310,7 @@ var FAILURE_CODES = {
|
|
|
9299
9310
|
CHROMIUM_STORAGE_EVAL_FAILED: "CHROMIUM_STORAGE_EVAL_FAILED",
|
|
9300
9311
|
CHROMIUM_TAB_NOT_FOUND: "CHROMIUM_TAB_NOT_FOUND",
|
|
9301
9312
|
CHROMIUM_TAB_OPEN_FAILED: "CHROMIUM_TAB_OPEN_FAILED",
|
|
9313
|
+
CHROMIUM_NAVIGATE_FAILED: "CHROMIUM_NAVIGATE_FAILED",
|
|
9302
9314
|
CHROMIUM_DESCRIBE_FAILED: "CHROMIUM_DESCRIBE_FAILED",
|
|
9303
9315
|
CHROMIUM_ELECTRON_APP_PATH_INVALID: "CHROMIUM_ELECTRON_APP_PATH_INVALID",
|
|
9304
9316
|
CHROMIUM_ELECTRON_SPAWN_FAILED: "CHROMIUM_ELECTRON_SPAWN_FAILED",
|
|
@@ -9315,6 +9327,8 @@ var FAILURE_CODES = {
|
|
|
9315
9327
|
SCREENSHOT_DIFF_INPUT_INVALID: "SCREENSHOT_DIFF_INPUT_INVALID",
|
|
9316
9328
|
BOOT_DEVICE_TARGET_SELECTION_INVALID: "BOOT_DEVICE_TARGET_SELECTION_INVALID",
|
|
9317
9329
|
BOOT_IOS_UNSUPPORTED_HOST: "BOOT_IOS_UNSUPPORTED_HOST",
|
|
9330
|
+
BOOT_IOS_SIMCTL_LIST_TIMEOUT: "BOOT_IOS_SIMCTL_LIST_TIMEOUT",
|
|
9331
|
+
BOOT_IOS_SIMCTL_TIMEOUT: "BOOT_IOS_SIMCTL_TIMEOUT",
|
|
9318
9332
|
BOOT_ANDROID_NO_AVDS: "BOOT_ANDROID_NO_AVDS",
|
|
9319
9333
|
BOOT_ANDROID_AVD_NOT_FOUND: "BOOT_ANDROID_AVD_NOT_FOUND",
|
|
9320
9334
|
BOOT_ANDROID_ADB_UNAVAILABLE: "BOOT_ANDROID_ADB_UNAVAILABLE",
|
|
@@ -10385,7 +10399,8 @@ async function consumeToolStream(name, body, onProgress, signal) {
|
|
|
10385
10399
|
final = {
|
|
10386
10400
|
data: msg.data,
|
|
10387
10401
|
note: msg.note,
|
|
10388
|
-
...msg.profiling === true ? { profiling: true } : {}
|
|
10402
|
+
...msg.profiling === true ? { profiling: true } : {},
|
|
10403
|
+
...typeof msg.failure === "string" ? { failure: msg.failure } : {}
|
|
10389
10404
|
};
|
|
10390
10405
|
} else if (msg.event === "error") {
|
|
10391
10406
|
throw new ToolInvocationError(msg.error ?? "tool invocation failed", {
|
|
@@ -10437,7 +10452,8 @@ async function consumeToolStream(name, body, onProgress, signal) {
|
|
|
10437
10452
|
return {
|
|
10438
10453
|
data: final.data,
|
|
10439
10454
|
note: final.note,
|
|
10440
|
-
...final.profiling ? { profiling: true } : {}
|
|
10455
|
+
...final.profiling ? { profiling: true } : {},
|
|
10456
|
+
...final.failure !== void 0 ? { failure: final.failure } : {}
|
|
10441
10457
|
};
|
|
10442
10458
|
}
|
|
10443
10459
|
function errorBodyMessage(body) {
|
|
@@ -10602,6 +10618,7 @@ function createToolsClient(options = {}) {
|
|
|
10602
10618
|
}
|
|
10603
10619
|
const shadowWarning = await e2eShadowWarningFor(name, args);
|
|
10604
10620
|
const baselineDirs = [];
|
|
10621
|
+
let unwrittenBaselines = [];
|
|
10605
10622
|
if (meta?.fileInputs?.length) {
|
|
10606
10623
|
if (remote) assertRequiredPresent(meta, finalArgs);
|
|
10607
10624
|
finalArgs = await prepareFileInputs(meta.fileInputs, finalArgs ?? {}, {
|
|
@@ -10615,8 +10632,9 @@ function createToolsClient(options = {}) {
|
|
|
10615
10632
|
signal: opts?.signal
|
|
10616
10633
|
});
|
|
10617
10634
|
}
|
|
10618
|
-
const settle = async (
|
|
10619
|
-
const applied = await applyClientFileDirectives(
|
|
10635
|
+
const settle = async (data2) => {
|
|
10636
|
+
const applied = await applyClientFileDirectives(data2, { allowedDirs: baselineDirs });
|
|
10637
|
+
unwrittenBaselines = applied.failed.map((f) => f.path);
|
|
10620
10638
|
for (const { path: file, error } of applied.failed) {
|
|
10621
10639
|
diagnose(`The baseline ${file} was not written on this client: ${error}`);
|
|
10622
10640
|
}
|
|
@@ -10633,6 +10651,7 @@ function createToolsClient(options = {}) {
|
|
|
10633
10651
|
}
|
|
10634
10652
|
return { ...result, warning: shadowWarning };
|
|
10635
10653
|
};
|
|
10654
|
+
const unwrittenFailure = () => unwrittenBaselines.length > 0 ? `Baselines not written on this client: ${unwrittenBaselines.join(", ")}` : void 0;
|
|
10636
10655
|
const stream = opts?.onProgress !== void 0 || carriesMembers(finalArgs);
|
|
10637
10656
|
const sentOnce = carriesUpload(finalArgs);
|
|
10638
10657
|
const forwarded = remote ? await forwardedSecrets(finalArgs) : void 0;
|
|
@@ -10696,11 +10715,14 @@ function createToolsClient(options = {}) {
|
|
|
10696
10715
|
}),
|
|
10697
10716
|
opts?.signal
|
|
10698
10717
|
);
|
|
10718
|
+
const data2 = await settle(streamed.data);
|
|
10719
|
+
const failure2 = streamed.failure ?? unwrittenFailure();
|
|
10699
10720
|
return {
|
|
10700
|
-
data:
|
|
10721
|
+
data: data2,
|
|
10701
10722
|
note: streamed.note,
|
|
10702
10723
|
outputHint: meta?.outputHint,
|
|
10703
|
-
...streamed.profiling ? { profiling: true } : {}
|
|
10724
|
+
...streamed.profiling ? { profiling: true } : {},
|
|
10725
|
+
...failure2 !== void 0 ? { failure: failure2 } : {}
|
|
10704
10726
|
};
|
|
10705
10727
|
}
|
|
10706
10728
|
let json;
|
|
@@ -10736,11 +10758,14 @@ function createToolsClient(options = {}) {
|
|
|
10736
10758
|
});
|
|
10737
10759
|
}
|
|
10738
10760
|
opts?.signal?.throwIfAborted();
|
|
10761
|
+
const data = await settle(json.data);
|
|
10762
|
+
const failure = (typeof json.failure === "string" ? json.failure : void 0) ?? unwrittenFailure();
|
|
10739
10763
|
return {
|
|
10740
|
-
data
|
|
10764
|
+
data,
|
|
10741
10765
|
note: json.note,
|
|
10742
10766
|
outputHint: meta?.outputHint,
|
|
10743
|
-
...json.profiling === true ? { profiling: true } : {}
|
|
10767
|
+
...json.profiling === true ? { profiling: true } : {},
|
|
10768
|
+
...failure !== void 0 ? { failure } : {}
|
|
10744
10769
|
};
|
|
10745
10770
|
}
|
|
10746
10771
|
return { fetchTools, fetchTool, callTool, baseUrl };
|
|
@@ -11150,7 +11175,11 @@ function createArgentClient() {
|
|
|
11150
11175
|
signal: options?.signal
|
|
11151
11176
|
});
|
|
11152
11177
|
options?.signal?.throwIfAborted();
|
|
11153
|
-
return {
|
|
11178
|
+
return {
|
|
11179
|
+
data: result,
|
|
11180
|
+
note: response.note,
|
|
11181
|
+
...response.failure !== void 0 ? { failure: response.failure } : {}
|
|
11182
|
+
};
|
|
11154
11183
|
} catch (err) {
|
|
11155
11184
|
if (err instanceof ToolInvocationError) {
|
|
11156
11185
|
throw new ArgentToolError(err.message, {
|
package/dist/installer.mjs
CHANGED
|
@@ -15789,6 +15789,8 @@ var FAILURE_CODES = {
|
|
|
15789
15789
|
CLI_RUN_ARGS_JSON_INVALID: "CLI_RUN_ARGS_JSON_INVALID",
|
|
15790
15790
|
CLI_RUN_INPUT_VALIDATION_FAILED: "CLI_RUN_INPUT_VALIDATION_FAILED",
|
|
15791
15791
|
CLI_RUN_TOOL_CALL_FAILED: "CLI_RUN_TOOL_CALL_FAILED",
|
|
15792
|
+
// The result carried the tool-server's `failure` field.
|
|
15793
|
+
CLI_RUN_TOOL_RESULT_FAILED: "CLI_RUN_TOOL_RESULT_FAILED",
|
|
15792
15794
|
CLI_RUN_SAVE_IMAGE_FAILED: "CLI_RUN_SAVE_IMAGE_FAILED",
|
|
15793
15795
|
TOOL_CAPABILITY_UNSUPPORTED_OPERATION: "TOOL_CAPABILITY_UNSUPPORTED_OPERATION",
|
|
15794
15796
|
TOOL_PLATFORM_NOT_IMPLEMENTED: "TOOL_PLATFORM_NOT_IMPLEMENTED",
|
|
@@ -15887,15 +15889,21 @@ var FAILURE_CODES = {
|
|
|
15887
15889
|
ANDROID_LAUNCH_AM_START_FAILED: "ANDROID_LAUNCH_AM_START_FAILED",
|
|
15888
15890
|
ANDROID_OPEN_URL_FAILED: "ANDROID_OPEN_URL_FAILED",
|
|
15889
15891
|
ANDROID_REINSTALL_INSTALL_FAILED: "ANDROID_REINSTALL_INSTALL_FAILED",
|
|
15892
|
+
ANDROID_REINSTALL_UNINSTALL_FAILED: "ANDROID_REINSTALL_UNINSTALL_FAILED",
|
|
15890
15893
|
ANDROID_RESTART_FAILED: "ANDROID_RESTART_FAILED",
|
|
15891
15894
|
ANDROID_SETTINGS_PERMISSION_FAILED: "ANDROID_SETTINGS_PERMISSION_FAILED",
|
|
15892
15895
|
IOS_LAUNCH_SIMCTL_FAILED: "IOS_LAUNCH_SIMCTL_FAILED",
|
|
15893
15896
|
IOS_OPEN_URL_FAILED: "IOS_OPEN_URL_FAILED",
|
|
15894
15897
|
IOS_REINSTALL_INSTALL_FAILED: "IOS_REINSTALL_INSTALL_FAILED",
|
|
15898
|
+
IOS_REINSTALL_UNINSTALL_FAILED: "IOS_REINSTALL_UNINSTALL_FAILED",
|
|
15895
15899
|
IOS_RESTART_LAUNCH_FAILED: "IOS_RESTART_LAUNCH_FAILED",
|
|
15900
|
+
IOS_RESTART_TERMINATE_FAILED: "IOS_RESTART_TERMINATE_FAILED",
|
|
15901
|
+
IOS_TERMINATE_APP_FAILED: "IOS_TERMINATE_APP_FAILED",
|
|
15896
15902
|
IOS_SETTINGS_PERMISSION_FAILED: "IOS_SETTINGS_PERMISSION_FAILED",
|
|
15897
15903
|
IOS_SHAKE_FAILED: "IOS_SHAKE_FAILED",
|
|
15898
15904
|
ANDROID_SHAKE_FAILED: "ANDROID_SHAKE_FAILED",
|
|
15905
|
+
STOP_METRO_PORT_PROBE_FAILED: "STOP_METRO_PORT_PROBE_FAILED",
|
|
15906
|
+
STOP_METRO_SIGNAL_FAILED: "STOP_METRO_SIGNAL_FAILED",
|
|
15899
15907
|
// The hinge of a foldable iOS simulator: the server refused the request on a
|
|
15900
15908
|
// foldable (a bad angle, a hinge that would not move) vs. nothing to fold —
|
|
15901
15909
|
// a device that is not foldable, no hinge route, a remote simulator.
|
|
@@ -16041,10 +16049,13 @@ var FAILURE_CODES = {
|
|
|
16041
16049
|
FLOW_NAME_INVALID: "FLOW_NAME_INVALID",
|
|
16042
16050
|
FLOW_NO_ACTIVE_RECORDING: "FLOW_NO_ACTIVE_RECORDING",
|
|
16043
16051
|
FLOW_FILE_INVALID: "FLOW_FILE_INVALID",
|
|
16052
|
+
FLOW_FILE_NEWER_VERSION: "FLOW_FILE_NEWER_VERSION",
|
|
16044
16053
|
FLOW_FILE_WRITE_FAILED: "FLOW_FILE_WRITE_FAILED",
|
|
16045
16054
|
FLOW_ENTRY_UNRECOGNIZED: "FLOW_ENTRY_UNRECOGNIZED",
|
|
16046
16055
|
FLOW_E2E_HAS_PREREQUISITE: "FLOW_E2E_HAS_PREREQUISITE",
|
|
16047
16056
|
FLOW_DEVICE_RESOLUTION: "FLOW_DEVICE_RESOLUTION",
|
|
16057
|
+
// The target does not satisfy the test's `requires:` block; a directory run skips it.
|
|
16058
|
+
FLOW_REQUIREMENTS_UNMET: "FLOW_REQUIREMENTS_UNMET",
|
|
16048
16059
|
PROFILER_QUERY_MODE_INVALID: "PROFILER_QUERY_MODE_INVALID",
|
|
16049
16060
|
PROFILER_QUERY_REQUIRED_PARAM_MISSING: "PROFILER_QUERY_REQUIRED_PARAM_MISSING",
|
|
16050
16061
|
PROFILER_DATA_NOT_LOADED: "PROFILER_DATA_NOT_LOADED",
|
|
@@ -16063,6 +16074,7 @@ var FAILURE_CODES = {
|
|
|
16063
16074
|
CHROMIUM_STORAGE_EVAL_FAILED: "CHROMIUM_STORAGE_EVAL_FAILED",
|
|
16064
16075
|
CHROMIUM_TAB_NOT_FOUND: "CHROMIUM_TAB_NOT_FOUND",
|
|
16065
16076
|
CHROMIUM_TAB_OPEN_FAILED: "CHROMIUM_TAB_OPEN_FAILED",
|
|
16077
|
+
CHROMIUM_NAVIGATE_FAILED: "CHROMIUM_NAVIGATE_FAILED",
|
|
16066
16078
|
CHROMIUM_DESCRIBE_FAILED: "CHROMIUM_DESCRIBE_FAILED",
|
|
16067
16079
|
CHROMIUM_ELECTRON_APP_PATH_INVALID: "CHROMIUM_ELECTRON_APP_PATH_INVALID",
|
|
16068
16080
|
CHROMIUM_ELECTRON_SPAWN_FAILED: "CHROMIUM_ELECTRON_SPAWN_FAILED",
|
|
@@ -16079,6 +16091,8 @@ var FAILURE_CODES = {
|
|
|
16079
16091
|
SCREENSHOT_DIFF_INPUT_INVALID: "SCREENSHOT_DIFF_INPUT_INVALID",
|
|
16080
16092
|
BOOT_DEVICE_TARGET_SELECTION_INVALID: "BOOT_DEVICE_TARGET_SELECTION_INVALID",
|
|
16081
16093
|
BOOT_IOS_UNSUPPORTED_HOST: "BOOT_IOS_UNSUPPORTED_HOST",
|
|
16094
|
+
BOOT_IOS_SIMCTL_LIST_TIMEOUT: "BOOT_IOS_SIMCTL_LIST_TIMEOUT",
|
|
16095
|
+
BOOT_IOS_SIMCTL_TIMEOUT: "BOOT_IOS_SIMCTL_TIMEOUT",
|
|
16082
16096
|
BOOT_ANDROID_NO_AVDS: "BOOT_ANDROID_NO_AVDS",
|
|
16083
16097
|
BOOT_ANDROID_AVD_NOT_FOUND: "BOOT_ANDROID_AVD_NOT_FOUND",
|
|
16084
16098
|
BOOT_ANDROID_ADB_UNAVAILABLE: "BOOT_ANDROID_ADB_UNAVAILABLE",
|
|
@@ -16934,7 +16948,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
|
|
|
16934
16948
|
var SESSION_ID = randomUUID4();
|
|
16935
16949
|
function readCliVersion() {
|
|
16936
16950
|
if (true) {
|
|
16937
|
-
return "0.32.1-next.
|
|
16951
|
+
return "0.32.1-next.10";
|
|
16938
16952
|
}
|
|
16939
16953
|
return "0.0.0";
|
|
16940
16954
|
}
|
package/dist/mcp-server.mjs
CHANGED
|
@@ -25735,6 +25735,8 @@ var FAILURE_CODES = {
|
|
|
25735
25735
|
CLI_RUN_ARGS_JSON_INVALID: "CLI_RUN_ARGS_JSON_INVALID",
|
|
25736
25736
|
CLI_RUN_INPUT_VALIDATION_FAILED: "CLI_RUN_INPUT_VALIDATION_FAILED",
|
|
25737
25737
|
CLI_RUN_TOOL_CALL_FAILED: "CLI_RUN_TOOL_CALL_FAILED",
|
|
25738
|
+
// The result carried the tool-server's `failure` field.
|
|
25739
|
+
CLI_RUN_TOOL_RESULT_FAILED: "CLI_RUN_TOOL_RESULT_FAILED",
|
|
25738
25740
|
CLI_RUN_SAVE_IMAGE_FAILED: "CLI_RUN_SAVE_IMAGE_FAILED",
|
|
25739
25741
|
TOOL_CAPABILITY_UNSUPPORTED_OPERATION: "TOOL_CAPABILITY_UNSUPPORTED_OPERATION",
|
|
25740
25742
|
TOOL_PLATFORM_NOT_IMPLEMENTED: "TOOL_PLATFORM_NOT_IMPLEMENTED",
|
|
@@ -25833,15 +25835,21 @@ var FAILURE_CODES = {
|
|
|
25833
25835
|
ANDROID_LAUNCH_AM_START_FAILED: "ANDROID_LAUNCH_AM_START_FAILED",
|
|
25834
25836
|
ANDROID_OPEN_URL_FAILED: "ANDROID_OPEN_URL_FAILED",
|
|
25835
25837
|
ANDROID_REINSTALL_INSTALL_FAILED: "ANDROID_REINSTALL_INSTALL_FAILED",
|
|
25838
|
+
ANDROID_REINSTALL_UNINSTALL_FAILED: "ANDROID_REINSTALL_UNINSTALL_FAILED",
|
|
25836
25839
|
ANDROID_RESTART_FAILED: "ANDROID_RESTART_FAILED",
|
|
25837
25840
|
ANDROID_SETTINGS_PERMISSION_FAILED: "ANDROID_SETTINGS_PERMISSION_FAILED",
|
|
25838
25841
|
IOS_LAUNCH_SIMCTL_FAILED: "IOS_LAUNCH_SIMCTL_FAILED",
|
|
25839
25842
|
IOS_OPEN_URL_FAILED: "IOS_OPEN_URL_FAILED",
|
|
25840
25843
|
IOS_REINSTALL_INSTALL_FAILED: "IOS_REINSTALL_INSTALL_FAILED",
|
|
25844
|
+
IOS_REINSTALL_UNINSTALL_FAILED: "IOS_REINSTALL_UNINSTALL_FAILED",
|
|
25841
25845
|
IOS_RESTART_LAUNCH_FAILED: "IOS_RESTART_LAUNCH_FAILED",
|
|
25846
|
+
IOS_RESTART_TERMINATE_FAILED: "IOS_RESTART_TERMINATE_FAILED",
|
|
25847
|
+
IOS_TERMINATE_APP_FAILED: "IOS_TERMINATE_APP_FAILED",
|
|
25842
25848
|
IOS_SETTINGS_PERMISSION_FAILED: "IOS_SETTINGS_PERMISSION_FAILED",
|
|
25843
25849
|
IOS_SHAKE_FAILED: "IOS_SHAKE_FAILED",
|
|
25844
25850
|
ANDROID_SHAKE_FAILED: "ANDROID_SHAKE_FAILED",
|
|
25851
|
+
STOP_METRO_PORT_PROBE_FAILED: "STOP_METRO_PORT_PROBE_FAILED",
|
|
25852
|
+
STOP_METRO_SIGNAL_FAILED: "STOP_METRO_SIGNAL_FAILED",
|
|
25845
25853
|
// The hinge of a foldable iOS simulator: the server refused the request on a
|
|
25846
25854
|
// foldable (a bad angle, a hinge that would not move) vs. nothing to fold —
|
|
25847
25855
|
// a device that is not foldable, no hinge route, a remote simulator.
|
|
@@ -25987,10 +25995,13 @@ var FAILURE_CODES = {
|
|
|
25987
25995
|
FLOW_NAME_INVALID: "FLOW_NAME_INVALID",
|
|
25988
25996
|
FLOW_NO_ACTIVE_RECORDING: "FLOW_NO_ACTIVE_RECORDING",
|
|
25989
25997
|
FLOW_FILE_INVALID: "FLOW_FILE_INVALID",
|
|
25998
|
+
FLOW_FILE_NEWER_VERSION: "FLOW_FILE_NEWER_VERSION",
|
|
25990
25999
|
FLOW_FILE_WRITE_FAILED: "FLOW_FILE_WRITE_FAILED",
|
|
25991
26000
|
FLOW_ENTRY_UNRECOGNIZED: "FLOW_ENTRY_UNRECOGNIZED",
|
|
25992
26001
|
FLOW_E2E_HAS_PREREQUISITE: "FLOW_E2E_HAS_PREREQUISITE",
|
|
25993
26002
|
FLOW_DEVICE_RESOLUTION: "FLOW_DEVICE_RESOLUTION",
|
|
26003
|
+
// The target does not satisfy the test's `requires:` block; a directory run skips it.
|
|
26004
|
+
FLOW_REQUIREMENTS_UNMET: "FLOW_REQUIREMENTS_UNMET",
|
|
25994
26005
|
PROFILER_QUERY_MODE_INVALID: "PROFILER_QUERY_MODE_INVALID",
|
|
25995
26006
|
PROFILER_QUERY_REQUIRED_PARAM_MISSING: "PROFILER_QUERY_REQUIRED_PARAM_MISSING",
|
|
25996
26007
|
PROFILER_DATA_NOT_LOADED: "PROFILER_DATA_NOT_LOADED",
|
|
@@ -26009,6 +26020,7 @@ var FAILURE_CODES = {
|
|
|
26009
26020
|
CHROMIUM_STORAGE_EVAL_FAILED: "CHROMIUM_STORAGE_EVAL_FAILED",
|
|
26010
26021
|
CHROMIUM_TAB_NOT_FOUND: "CHROMIUM_TAB_NOT_FOUND",
|
|
26011
26022
|
CHROMIUM_TAB_OPEN_FAILED: "CHROMIUM_TAB_OPEN_FAILED",
|
|
26023
|
+
CHROMIUM_NAVIGATE_FAILED: "CHROMIUM_NAVIGATE_FAILED",
|
|
26012
26024
|
CHROMIUM_DESCRIBE_FAILED: "CHROMIUM_DESCRIBE_FAILED",
|
|
26013
26025
|
CHROMIUM_ELECTRON_APP_PATH_INVALID: "CHROMIUM_ELECTRON_APP_PATH_INVALID",
|
|
26014
26026
|
CHROMIUM_ELECTRON_SPAWN_FAILED: "CHROMIUM_ELECTRON_SPAWN_FAILED",
|
|
@@ -26025,6 +26037,8 @@ var FAILURE_CODES = {
|
|
|
26025
26037
|
SCREENSHOT_DIFF_INPUT_INVALID: "SCREENSHOT_DIFF_INPUT_INVALID",
|
|
26026
26038
|
BOOT_DEVICE_TARGET_SELECTION_INVALID: "BOOT_DEVICE_TARGET_SELECTION_INVALID",
|
|
26027
26039
|
BOOT_IOS_UNSUPPORTED_HOST: "BOOT_IOS_UNSUPPORTED_HOST",
|
|
26040
|
+
BOOT_IOS_SIMCTL_LIST_TIMEOUT: "BOOT_IOS_SIMCTL_LIST_TIMEOUT",
|
|
26041
|
+
BOOT_IOS_SIMCTL_TIMEOUT: "BOOT_IOS_SIMCTL_TIMEOUT",
|
|
26028
26042
|
BOOT_ANDROID_NO_AVDS: "BOOT_ANDROID_NO_AVDS",
|
|
26029
26043
|
BOOT_ANDROID_AVD_NOT_FOUND: "BOOT_ANDROID_AVD_NOT_FOUND",
|
|
26030
26044
|
BOOT_ANDROID_ADB_UNAVAILABLE: "BOOT_ANDROID_ADB_UNAVAILABLE",
|
|
@@ -27139,7 +27153,8 @@ async function consumeToolStream(name, body, onProgress, signal) {
|
|
|
27139
27153
|
final = {
|
|
27140
27154
|
data: msg.data,
|
|
27141
27155
|
note: msg.note,
|
|
27142
|
-
...msg.profiling === true ? { profiling: true } : {}
|
|
27156
|
+
...msg.profiling === true ? { profiling: true } : {},
|
|
27157
|
+
...typeof msg.failure === "string" ? { failure: msg.failure } : {}
|
|
27143
27158
|
};
|
|
27144
27159
|
} else if (msg.event === "error") {
|
|
27145
27160
|
throw new ToolInvocationError(msg.error ?? "tool invocation failed", {
|
|
@@ -27191,7 +27206,8 @@ async function consumeToolStream(name, body, onProgress, signal) {
|
|
|
27191
27206
|
return {
|
|
27192
27207
|
data: final.data,
|
|
27193
27208
|
note: final.note,
|
|
27194
|
-
...final.profiling ? { profiling: true } : {}
|
|
27209
|
+
...final.profiling ? { profiling: true } : {},
|
|
27210
|
+
...final.failure !== void 0 ? { failure: final.failure } : {}
|
|
27195
27211
|
};
|
|
27196
27212
|
}
|
|
27197
27213
|
function errorBodyMessage(body) {
|
|
@@ -27356,6 +27372,7 @@ function createToolsClient(options = {}) {
|
|
|
27356
27372
|
}
|
|
27357
27373
|
const shadowWarning = await e2eShadowWarningFor(name, args);
|
|
27358
27374
|
const baselineDirs = [];
|
|
27375
|
+
let unwrittenBaselines = [];
|
|
27359
27376
|
if (meta2?.fileInputs?.length) {
|
|
27360
27377
|
if (remote) assertRequiredPresent(meta2, finalArgs);
|
|
27361
27378
|
finalArgs = await prepareFileInputs(meta2.fileInputs, finalArgs ?? {}, {
|
|
@@ -27369,8 +27386,9 @@ function createToolsClient(options = {}) {
|
|
|
27369
27386
|
signal: opts?.signal
|
|
27370
27387
|
});
|
|
27371
27388
|
}
|
|
27372
|
-
const settle2 = async (
|
|
27373
|
-
const applied = await applyClientFileDirectives(
|
|
27389
|
+
const settle2 = async (data2) => {
|
|
27390
|
+
const applied = await applyClientFileDirectives(data2, { allowedDirs: baselineDirs });
|
|
27391
|
+
unwrittenBaselines = applied.failed.map((f) => f.path);
|
|
27374
27392
|
for (const { path: file, error: error2 } of applied.failed) {
|
|
27375
27393
|
diagnose(`The baseline ${file} was not written on this client: ${error2}`);
|
|
27376
27394
|
}
|
|
@@ -27387,6 +27405,7 @@ function createToolsClient(options = {}) {
|
|
|
27387
27405
|
}
|
|
27388
27406
|
return { ...result, warning: shadowWarning };
|
|
27389
27407
|
};
|
|
27408
|
+
const unwrittenFailure = () => unwrittenBaselines.length > 0 ? `Baselines not written on this client: ${unwrittenBaselines.join(", ")}` : void 0;
|
|
27390
27409
|
const stream = opts?.onProgress !== void 0 || carriesMembers(finalArgs);
|
|
27391
27410
|
const sentOnce = carriesUpload(finalArgs);
|
|
27392
27411
|
const forwarded = remote ? await forwardedSecrets(finalArgs) : void 0;
|
|
@@ -27450,11 +27469,14 @@ function createToolsClient(options = {}) {
|
|
|
27450
27469
|
}),
|
|
27451
27470
|
opts?.signal
|
|
27452
27471
|
);
|
|
27472
|
+
const data2 = await settle2(streamed.data);
|
|
27473
|
+
const failure3 = streamed.failure ?? unwrittenFailure();
|
|
27453
27474
|
return {
|
|
27454
|
-
data:
|
|
27475
|
+
data: data2,
|
|
27455
27476
|
note: streamed.note,
|
|
27456
27477
|
outputHint: meta2?.outputHint,
|
|
27457
|
-
...streamed.profiling ? { profiling: true } : {}
|
|
27478
|
+
...streamed.profiling ? { profiling: true } : {},
|
|
27479
|
+
...failure3 !== void 0 ? { failure: failure3 } : {}
|
|
27458
27480
|
};
|
|
27459
27481
|
}
|
|
27460
27482
|
let json;
|
|
@@ -27490,11 +27512,14 @@ function createToolsClient(options = {}) {
|
|
|
27490
27512
|
});
|
|
27491
27513
|
}
|
|
27492
27514
|
opts?.signal?.throwIfAborted();
|
|
27515
|
+
const data = await settle2(json.data);
|
|
27516
|
+
const failure2 = (typeof json.failure === "string" ? json.failure : void 0) ?? unwrittenFailure();
|
|
27493
27517
|
return {
|
|
27494
|
-
data
|
|
27518
|
+
data,
|
|
27495
27519
|
note: json.note,
|
|
27496
27520
|
outputHint: meta2?.outputHint,
|
|
27497
|
-
...json.profiling === true ? { profiling: true } : {}
|
|
27521
|
+
...json.profiling === true ? { profiling: true } : {},
|
|
27522
|
+
...failure2 !== void 0 ? { failure: failure2 } : {}
|
|
27498
27523
|
};
|
|
27499
27524
|
}
|
|
27500
27525
|
return { fetchTools, fetchTool, callTool, baseUrl };
|
|
@@ -10,7 +10,7 @@ export interface ArgentToolArgs {
|
|
|
10
10
|
minStableMs?: number;
|
|
11
11
|
};
|
|
12
12
|
"await-ui-element": {
|
|
13
|
-
/** Target device id from `list-devices` (iOS UDID, Android serial, Vega serial, HarmonyOS id, or Chromium id
|
|
13
|
+
/** Target device id from `list-devices` (iOS UDID, Android serial, Vega serial, HarmonyOS id, or Chromium id). */
|
|
14
14
|
udid: string;
|
|
15
15
|
/** What to wait for. `exists`: the selector matches an element anywhere in the tree. `visible`: it matches one with a non-zero on-screen frame. `hidden`: it matches nothing, or only a zero-area element (e.g. a spinner that went away). `text`: the first visible match in reading order (topmost, then leftmost; the first match overall if none is visible) contains expectedText, or equals it with textMatch `equals`. Only that match is checked, so if a loose selector hits several elements, narrow it to the one holding the text. */
|
|
16
16
|
condition: "exists" | "visible" | "hidden" | "text";
|
|
@@ -231,9 +231,9 @@ export interface ArgentToolArgs {
|
|
|
231
231
|
e2e_test_file?: string;
|
|
232
232
|
/** Absolute path to an e2e test .yaml on the client. */
|
|
233
233
|
e2e_test_path?: string;
|
|
234
|
-
/** Device id to run against (iOS UDID, Android/Vega serial, Chromium id), as list-devices reports it. Auto-detected when omitted, but only when exactly one booted device matches; with several booted the run fails and lists them, so pass this explicitly whenever more than one device is up. */
|
|
234
|
+
/** Device id to run against (iOS UDID, Android/Vega serial, Chromium id), as list-devices reports it. Auto-detected when omitted, but only when exactly one booted device matches (optionally narrowed by `platform` and the e2e test's `requires:` block); with several booted the run fails and lists them, so pass this explicitly whenever more than one device is up. */
|
|
235
235
|
device?: string;
|
|
236
|
-
/** Restrict auto-detection to this platform when several devices are booted. `ios` selects local simulators only; `ios-remote` selects a remote one. `chromium` with no `device` also makes the runner boot an Electron instance for a standalone e2e test from its `launch` step's chromium value and tear it down after the run, with no fallback to auto-detection (a single-key `launch: { chromium: … }` map does this on its own; a fragment, or a launch map without a `chromium` key, is still auto-detected). That value must be an Electron app path on the tool-server host: the bare-string `launch:` the recorder writes holds a bundle id, which fails the run with `Electron boot: path does not exist`, so first edit it to `{ chromium: <app path> }`. */
|
|
236
|
+
/** Restrict auto-detection to this platform when several devices are booted. `ios` selects local simulators only; `ios-remote` selects a remote one. `chromium` with no `device` also makes the runner boot an Electron instance for a standalone e2e test from its `launch` step's chromium value and tear it down after the run, with no fallback to auto-detection (a single-key `launch: { chromium: … }` map, or a `requires:` block that allows only chromium, does this on its own; a fragment, or a launch map without a `chromium` key, is still auto-detected). That value must be an Electron app path on the tool-server host: the bare-string `launch:` the recorder writes holds a bundle id, which fails the run with `Electron boot: path does not exist`, so first edit it to `{ chromium: <app path> }`. */
|
|
237
237
|
platform?: "ios" | "android" | "chromium" | "vega" | "ios-remote";
|
|
238
238
|
/** Write/refresh screenshot baselines for `snapshot` steps instead of diffing against them, also in the e2e tests that tool: e2e-execute steps run, unless such a step sets updateBaselines itself. Over a link, the client writes the new baselines when the run ends. */
|
|
239
239
|
updateBaselines?: boolean;
|
|
@@ -271,6 +271,11 @@ export interface ArgentToolArgs {
|
|
|
271
271
|
project_root: string;
|
|
272
272
|
/** Fragments only: the app/device state assumed on entry (e.g. "Settings app open on General page"). Omit it for a standalone e2e test. restart-app has no chromium support, so a chromium e2e test records as a fragment; add the `launch: { chromium: <app path> }` line to the YAML afterward, deleting the executionPrerequisite line if you passed one, since an e2e test that starts with a launch must not declare it. */
|
|
273
273
|
executionPrerequisite?: string;
|
|
274
|
+
/** The e2e test's `requires:` block: the targets it supports, ANDed. `platform` is one platform or a list (`ios` also covers a remote simulator); `runtimeKind` is `tv` or `mobile`. Omit it for a test that runs on any target. */
|
|
275
|
+
requires?: {
|
|
276
|
+
platform?: "ios" | "android" | "chromium" | "vega" | Array<"ios" | "android" | "chromium" | "vega">;
|
|
277
|
+
runtimeKind?: "mobile" | "tv";
|
|
278
|
+
};
|
|
274
279
|
};
|
|
275
280
|
fill: {
|
|
276
281
|
/** Target device id from `list-devices`. */
|
|
@@ -428,7 +433,7 @@ export interface ArgentToolArgs {
|
|
|
428
433
|
bundleId: string;
|
|
429
434
|
/** Android-only: fully-qualified Activity name (e.g. `.MainActivity` or `com.example/com.example.MainActivity`). If omitted, the app's default launcher activity is used. */
|
|
430
435
|
activity?: string;
|
|
431
|
-
/** Apple simulators and physical iPhones: arguments passed to the app process at launch, e.g. `["-FeatureFlag", "YES"]` to override UserDefaults. A running app is relaunched to apply them. */
|
|
436
|
+
/** Apple simulators and physical iPhones: arguments passed to the app process at launch, e.g. `["-FeatureFlag", "YES"]` to override UserDefaults. A running app is relaunched to apply them. The call fails, launching nothing, if terminating it does not finish within 15s on a local iOS simulator, or fails for a reason other than the app not running on a remote one. */
|
|
432
437
|
launchArgs?: Array<string>;
|
|
433
438
|
};
|
|
434
439
|
"list-devices": Record<string, never>;
|