@swmansion/argent 0.34.1-next.2 → 0.34.1-next.20
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/bin/argent-android-devtools-0.4.0.apk +0 -0
- package/bin/darwin/argent-macos-helper +0 -0
- package/bin/darwin/ax-service +0 -0
- package/bin/darwin/tvos-ax-service +0 -0
- package/bin/darwin/tvos-hid-daemon +0 -0
- package/bin/network-inspector/network-inspector.jar +0 -0
- package/bin/tcp/ax-service +0 -0
- package/dist/cli-cmds.mjs +86 -24
- package/dist/client.js +34 -9
- package/dist/installer-help.js +4 -0
- package/dist/installer-help.js.map +1 -1
- package/dist/installer.mjs +222 -160
- package/dist/ios-device-runner/ArgentRunner/ArgentRunnerUITests/ArgentLaunchPerformanceTests.swift +21 -0
- package/dist/ios-device-runner/ArgentRunner/ArgentRunnerUITests/ArgentRunnerSession+Commands.swift +9 -3
- package/dist/mcp-server.mjs +43 -14
- package/dist/tool-args.generated.d.ts +15 -1
- package/dist/tool-server.cjs +4529 -2403
- package/dylibs/libArgentInjectionBootstrap.dylib +0 -0
- package/dylibs/libKeyboardPatch.dylib +0 -0
- package/dylibs/libNativeDevtoolsIos.dylib +0 -0
- package/dylibs/macos/libArgentInjectionBootstrap.dylib +0 -0
- package/dylibs/macos/libNativeDevtoolsMacos.dylib +0 -0
- package/dylibs/tcp/libArgentInjectionBootstrap.dylib +0 -0
- package/dylibs/tcp/libKeyboardPatch.dylib +0 -0
- package/dylibs/tcp/libNativeDevtoolsIos.dylib +0 -0
- package/dylibs/tvos/libArgentInjectionBootstrap.dylib +0 -0
- package/dylibs/tvos/libKeyboardPatch.dylib +0 -0
- package/dylibs/tvos/libNativeDevtoolsIos.dylib +0 -0
- package/package.json +1 -1
- package/rules/argent.md +6 -23
- package/skills/argent-ios-device-interact/SKILL.md +2 -2
- package/skills/argent-macos-app-interact/SKILL.md +15 -5
- package/skills/argent-macos-app-interact/references/e2e.md +1 -1
- package/skills/argent-native-profiler/SKILL.md +14 -2
- package/skills/argent-react-native-app-workflow/SKILL.md +1 -1
- package/skills/argent-react-native-optimization/SKILL.md +10 -1
- package/skills/argent-react-native-profiler/SKILL.md +4 -3
package/dist/ios-device-runner/ArgentRunner/ArgentRunnerUITests/ArgentRunnerSession+Commands.swift
CHANGED
|
@@ -3,11 +3,15 @@ import XCTest
|
|
|
3
3
|
|
|
4
4
|
extension DeviceButton {
|
|
5
5
|
/// The XCUIDevice member for this wire name.
|
|
6
|
-
var hardwareButton: XCUIDevice.Button {
|
|
6
|
+
var hardwareButton: XCUIDevice.Button? {
|
|
7
7
|
switch self {
|
|
8
8
|
case .home: return .home
|
|
9
|
+
#if targetEnvironment(simulator)
|
|
10
|
+
case .volumeUp, .volumeDown: return nil
|
|
11
|
+
#else
|
|
9
12
|
case .volumeUp: return .volumeUp
|
|
10
13
|
case .volumeDown: return .volumeDown
|
|
14
|
+
#endif
|
|
11
15
|
case .actionButton: return .action
|
|
12
16
|
}
|
|
13
17
|
}
|
|
@@ -191,7 +195,9 @@ extension ArgentRunnerSession {
|
|
|
191
195
|
|
|
192
196
|
// press on an absent button is a silent no-op that would read as a
|
|
193
197
|
// successful press, so it is refused up front.
|
|
194
|
-
guard
|
|
198
|
+
guard let hardwareButton = button.hardwareButton,
|
|
199
|
+
device.hasHardwareButton(hardwareButton)
|
|
200
|
+
else {
|
|
195
201
|
return .failure(
|
|
196
202
|
.unsupportedOperation,
|
|
197
203
|
"this \(UIDevice.current.model) has no \(button.rawValue) button",
|
|
@@ -200,7 +206,7 @@ extension ArgentRunnerSession {
|
|
|
200
206
|
)
|
|
201
207
|
}
|
|
202
208
|
|
|
203
|
-
device.press(
|
|
209
|
+
device.press(hardwareButton)
|
|
204
210
|
|
|
205
211
|
return .success(MessagePayload(message: "pressed \(button.rawValue)"))
|
|
206
212
|
}
|
package/dist/mcp-server.mjs
CHANGED
|
@@ -24946,7 +24946,7 @@ var FLAG_REGISTRY = [
|
|
|
24946
24946
|
},
|
|
24947
24947
|
{
|
|
24948
24948
|
name: "macos-apps",
|
|
24949
|
-
description: "
|
|
24949
|
+
description: "Control native Mac apps, including Mac Catalyst. Adds the macos platform to list-devices and boot-device, and the file-panel and menu-bar tools. On by default; turn it off with `argent disable macos-apps`.",
|
|
24950
24950
|
defaultEnabled: true
|
|
24951
24951
|
}
|
|
24952
24952
|
];
|
|
@@ -25348,14 +25348,6 @@ var CONFIG_SCHEMA = [
|
|
|
25348
25348
|
// drained/reset, not just the file rewritten.
|
|
25349
25349
|
manageCommand: "argent telemetry"
|
|
25350
25350
|
},
|
|
25351
|
-
{
|
|
25352
|
-
key: "allowlist.enabled",
|
|
25353
|
-
description: "Whether `argent update` re-applies editor auto-approve allowlist rules. Unset (the default) keeps the current behavior: update refreshes the rules for editors that already have argent configured. Set to `false` to keep update from touching editor allowlists. `false` in either scope wins, so a committed project opt-out holds for every teammate.",
|
|
25354
|
-
scopes: ["project", "global"],
|
|
25355
|
-
parse: asBoolean,
|
|
25356
|
-
merge: "prioritize-restrictive",
|
|
25357
|
-
example: "false"
|
|
25358
|
-
},
|
|
25359
25351
|
{
|
|
25360
25352
|
key: "lens.agent",
|
|
25361
25353
|
description: "Coding-agent id remembered by `argent lens` to skip the picker.",
|
|
@@ -25835,6 +25827,10 @@ var FAILURE_CODES = {
|
|
|
25835
25827
|
AX_DAEMON_READY_TIMEOUT: "AX_DAEMON_READY_TIMEOUT",
|
|
25836
25828
|
AX_DAEMON_EXITED_BEFORE_READY: "AX_DAEMON_EXITED_BEFORE_READY",
|
|
25837
25829
|
AX_DAEMON_PROCESS_ERROR: "AX_DAEMON_PROCESS_ERROR",
|
|
25830
|
+
// The daemon died on a fault signal (SIGSEGV, SIGABRT, ...), before or after
|
|
25831
|
+
// it connected. Kept apart from the two codes above so a crash is not read
|
|
25832
|
+
// as an ordinary exit.
|
|
25833
|
+
AX_DAEMON_CRASHED: "AX_DAEMON_CRASHED",
|
|
25838
25834
|
AX_FACTORY_OPTIONS_MISSING: "AX_FACTORY_OPTIONS_MISSING",
|
|
25839
25835
|
AX_WRONG_PLATFORM: "AX_WRONG_PLATFORM",
|
|
25840
25836
|
AX_DEVICE_ID_INVALID: "AX_DEVICE_ID_INVALID",
|
|
@@ -25917,6 +25913,7 @@ var FAILURE_CODES = {
|
|
|
25917
25913
|
DEBUGGER_CDP_PROTOCOL_ERROR: "DEBUGGER_CDP_PROTOCOL_ERROR",
|
|
25918
25914
|
DEBUGGER_CDP_CONNECT_FAILED: "DEBUGGER_CDP_CONNECT_FAILED",
|
|
25919
25915
|
DEBUGGER_CDP_SOCKET_CLOSED_BEFORE_OPEN: "DEBUGGER_CDP_SOCKET_CLOSED_BEFORE_OPEN",
|
|
25916
|
+
DEBUGGER_CDP_ORIGIN_REJECTED: "DEBUGGER_CDP_ORIGIN_REJECTED",
|
|
25920
25917
|
DEBUGGER_CDP_NOT_CONNECTED: "DEBUGGER_CDP_NOT_CONNECTED",
|
|
25921
25918
|
DEBUGGER_CDP_REQUEST_TIMEOUT: "DEBUGGER_CDP_REQUEST_TIMEOUT",
|
|
25922
25919
|
DEBUGGER_CDP_CONNECTION_CLOSED: "DEBUGGER_CDP_CONNECTION_CLOSED",
|
|
@@ -25991,6 +25988,32 @@ var FAILURE_CODES = {
|
|
|
25991
25988
|
NATIVE_PROFILER_PERFETTO_PROCESS_ERROR: "NATIVE_PROFILER_PERFETTO_PROCESS_ERROR",
|
|
25992
25989
|
NATIVE_PROFILER_PERFETTO_READY_TIMEOUT: "NATIVE_PROFILER_PERFETTO_READY_TIMEOUT",
|
|
25993
25990
|
NATIVE_PROFILER_PERFETTO_READY_EXITED: "NATIVE_PROFILER_PERFETTO_READY_EXITED",
|
|
25991
|
+
/**
|
|
25992
|
+
* native-profiler-launch-analysis. Input problems use TOOL_INPUT_INVALID and
|
|
25993
|
+
* devicectl steps IOS_DEVICECTL_COMMAND_FAILED.
|
|
25994
|
+
* @see [workflow.ts](../../tool-server/src/utils/ios-launch-time/workflow.ts)
|
|
25995
|
+
*/
|
|
25996
|
+
// Not macOS, or an Xcode that cannot record the launch on this target.
|
|
25997
|
+
LAUNCH_ANALYSIS_UNSUPPORTED_HOST: "LAUNCH_ANALYSIS_UNSUPPORTED_HOST",
|
|
25998
|
+
// No usable iPhone or simulator was selected, or Argent's runner holds it.
|
|
25999
|
+
LAUNCH_ANALYSIS_DEVICE_UNAVAILABLE: "LAUNCH_ANALYSIS_DEVICE_UNAVAILABLE",
|
|
26000
|
+
// The bundle_id app is not installed on the selected device.
|
|
26001
|
+
LAUNCH_ANALYSIS_APP_NOT_INSTALLED: "LAUNCH_ANALYSIS_APP_NOT_INSTALLED",
|
|
26002
|
+
// The runner's xcodebuild failed on code signing or provisioning.
|
|
26003
|
+
LAUNCH_ANALYSIS_SIGNING_FAILED: "LAUNCH_ANALYSIS_SIGNING_FAILED",
|
|
26004
|
+
// The iPhone's free developer profile has no slot for Argent's runner.
|
|
26005
|
+
LAUNCH_ANALYSIS_FREE_PROFILE_LIMIT: "LAUNCH_ANALYSIS_FREE_PROFILE_LIMIT",
|
|
26006
|
+
// simctl could not wait for boot, find, launch or terminate the app.
|
|
26007
|
+
LAUNCH_ANALYSIS_SIMCTL_FAILED: "LAUNCH_ANALYSIS_SIMCTL_FAILED",
|
|
26008
|
+
LAUNCH_ANALYSIS_RECORD_FAILED: "LAUNCH_ANALYSIS_RECORD_FAILED",
|
|
26009
|
+
// xctrace could not export the TOC, the CPU samples or the first-frame marker.
|
|
26010
|
+
LAUNCH_ANALYSIS_EXPORT_FAILED: "LAUNCH_ANALYSIS_EXPORT_FAILED",
|
|
26011
|
+
// The App Launch trace has no first frame of the app, so it has no launch window.
|
|
26012
|
+
LAUNCH_ANALYSIS_NO_FIRST_FRAME: "LAUNCH_ANALYSIS_NO_FIRST_FRAME",
|
|
26013
|
+
// The XCTest launch run of Argent's runner failed.
|
|
26014
|
+
LAUNCH_ANALYSIS_RUNNER_TEST_FAILED: "LAUNCH_ANALYSIS_RUNNER_TEST_FAILED",
|
|
26015
|
+
// The launch test ran, but Argent read no launch measurements from its result.
|
|
26016
|
+
LAUNCH_ANALYSIS_NO_SAMPLES: "LAUNCH_ANALYSIS_NO_SAMPLES",
|
|
25994
26017
|
// iOS and Android share one capture path (simulator-server frames into
|
|
25995
26018
|
// ffmpeg), so these name the failing stage, not the device family.
|
|
25996
26019
|
SCREEN_RECORDING_FACTORY_OPTIONS_MISSING: "SCREEN_RECORDING_FACTORY_OPTIONS_MISSING",
|
|
@@ -26068,6 +26091,8 @@ var FAILURE_CODES = {
|
|
|
26068
26091
|
MACOS_APP_BUNDLE_ID_MISMATCH: "MACOS_APP_BUNDLE_ID_MISMATCH",
|
|
26069
26092
|
MACOS_APP_OPEN_URL_FAILED: "MACOS_APP_OPEN_URL_FAILED",
|
|
26070
26093
|
MACOS_APP_FILE_ACCESS_FAILED: "MACOS_APP_FILE_ACCESS_FAILED",
|
|
26094
|
+
/** The app's loaded Argent library lacks support for the requested operation. */
|
|
26095
|
+
MACOS_APP_LIBRARY_OUTDATED: "MACOS_APP_LIBRARY_OUTDATED",
|
|
26071
26096
|
KEYBOARD_KEY_UNSUPPORTED: "KEYBOARD_KEY_UNSUPPORTED",
|
|
26072
26097
|
KEYBOARD_CHARACTER_UNSUPPORTED: "KEYBOARD_CHARACTER_UNSUPPORTED",
|
|
26073
26098
|
KEYBOARD_TEXT_AND_KEY_COMBINED: "KEYBOARD_TEXT_AND_KEY_COMBINED",
|
|
@@ -26143,7 +26168,9 @@ var FAILURE_COMMANDS = [
|
|
|
26143
26168
|
"npx",
|
|
26144
26169
|
"unknown",
|
|
26145
26170
|
"devicectl",
|
|
26146
|
-
"xcodebuild"
|
|
26171
|
+
"xcodebuild",
|
|
26172
|
+
// `xcrun xcresulttool`, which reads an XCTest result bundle.
|
|
26173
|
+
"xcresulttool"
|
|
26147
26174
|
];
|
|
26148
26175
|
var FAILURE_SIGNAL_NAMES = [
|
|
26149
26176
|
"SIGABRT",
|
|
@@ -28062,7 +28089,8 @@ var DEVICE_KINDS = [
|
|
|
28062
28089
|
"emulator",
|
|
28063
28090
|
"vvd",
|
|
28064
28091
|
"device",
|
|
28065
|
-
"app"
|
|
28092
|
+
"app",
|
|
28093
|
+
"catalyst"
|
|
28066
28094
|
];
|
|
28067
28095
|
var DEBUGGER_NOT_CONNECTED_REASONS = [
|
|
28068
28096
|
"metro_not_running",
|
|
@@ -28222,7 +28250,8 @@ var ALLOWED = {
|
|
|
28222
28250
|
install_mode: INSTALL_MODE
|
|
28223
28251
|
},
|
|
28224
28252
|
"installation:allowlist_decision": {
|
|
28225
|
-
is_enabled: bool
|
|
28253
|
+
is_enabled: bool,
|
|
28254
|
+
decided_by: oneOf(["flag", "default", "prompt"])
|
|
28226
28255
|
},
|
|
28227
28256
|
"installation:stale_config_cleanup": {
|
|
28228
28257
|
removed_count: COUNT,
|
|
@@ -29223,7 +29252,7 @@ function treeIdLine(id) {
|
|
|
29223
29252
|
return `Tree id: ${id}`;
|
|
29224
29253
|
}
|
|
29225
29254
|
function unchangedTreeNote(id, tool) {
|
|
29226
|
-
return `
|
|
29255
|
+
return `Element tree matches \`${id}\` from an earlier \`${tool}\` result. Actions may have effects the tree omits. Call \`describe\` if you lack that tree.`;
|
|
29227
29256
|
}
|
|
29228
29257
|
function randomTag() {
|
|
29229
29258
|
return randomInt(36 ** 3).toString(36).padStart(3, "0");
|
|
@@ -29500,7 +29529,7 @@ ${stopped.join("\n")}`;
|
|
|
29500
29529
|
}
|
|
29501
29530
|
|
|
29502
29531
|
// ../argent-mcp/src/instructions.ts
|
|
29503
|
-
var SERVER_INSTRUCTIONS = "Argent \u2014 iOS Simulator, Android Emulator, and Chromium app control for interacting, testing, profiling and debugging mobile and Chromium applications. Interaction tools return the screen after the action: a screenshot plus the accessibility element tree with normalized tap frames. Take coordinates from that tree; call describe only when no fresh tree is available \u2014 never guess coordinates from pixels. A result names an identical earlier tree by its tree id in place of repeating it. Do not stop simulator servers when a task finishes: the next task reuses them. Call stop-all-simulator-servers when the user asks to clean up or ends the session, or when a skill tells you to recycle a device's services, always with devices: [...] naming the devices this session used. Never stop a Metro the user started unless they ask. One tool-server is shared by every agent using this argent install, so an unscoped call tears down their devices too \u2014 reserve it for a deliberate machine-wide cleanup.";
|
|
29532
|
+
var SERVER_INSTRUCTIONS = "Argent \u2014 iOS Simulator, Android Emulator, and Chromium app control for interacting, testing, profiling and debugging mobile and Chromium applications. Use the platform the user named; otherwise prefer a device list-devices shows already running, and do not default to iOS. In a single-platform project, boot that platform. Prefer these tools over raw xcrun or adb commands, which are a fallback. Prefer launch-app or open-url over tapping home-screen icons. If the task may need a saved e2e test, load the argent-create-e2e skill (argent-qa-e2e for acceptance tests) before the first launch or in-app action: recording is not retroactive. Load the matching argent-* skill before React Native build or debug work, profiling, a physical phone, a Mac app or a TV. Interaction tools return the screen after the action: a screenshot plus the accessibility element tree with normalized tap frames. Take coordinates from that tree; call describe only when no fresh tree is available \u2014 never guess coordinates from pixels. A result names an identical earlier tree by its tree id in place of repeating it. If a tap fails twice, stop retrying and call a discovery tool again. Use await-ui-element to wait for the UI instead of polling with screenshots. Do not stop simulator servers when a task finishes: the next task reuses them. Call stop-all-simulator-servers when the user asks to clean up or ends the session, or when a skill tells you to recycle a device's services, always with devices: [...] naming the devices this session used. Never stop a Metro the user started unless they ask. One tool-server is shared by every agent using this argent install, so an unscoped call tears down their devices too \u2014 reserve it for a deliberate machine-wide cleanup. The argent CLI manages the toolkit: argent --help lists its commands.";
|
|
29504
29533
|
|
|
29505
29534
|
// ../argent-mcp/src/installed-version.ts
|
|
29506
29535
|
import * as fs11 from "node:fs";
|
|
@@ -439,6 +439,8 @@ export interface ArgentToolArgs {
|
|
|
439
439
|
clickCount?: number;
|
|
440
440
|
/** Mouse button, Mac app only: "right" is a right-click, for example to open a context menu; any other device refuses it. Default "left". */
|
|
441
441
|
button?: "left" | "right";
|
|
442
|
+
/** Keys held throughout a click or multi-click gesture. Mac apps only. An empty list leaves the click unmodified. */
|
|
443
|
+
modifiers?: Array<"control" | "option" | "shift" | "command">;
|
|
442
444
|
};
|
|
443
445
|
keyboard: {
|
|
444
446
|
/** Target device id from `list-devices` (iOS UDID, Android serial, Vega serial, HarmonyOS id, Mac app id, or Chromium id). */
|
|
@@ -541,6 +543,18 @@ export interface ArgentToolArgs {
|
|
|
541
543
|
/** Target device id from `list-devices` (iOS UDID, Mac app id or Android serial). */
|
|
542
544
|
device_id: string;
|
|
543
545
|
};
|
|
546
|
+
"native-profiler-launch-analysis": {
|
|
547
|
+
/** measure: time five launches with XCTest. profile: record one Instruments App Launch trace. */
|
|
548
|
+
mode: "measure" | "profile";
|
|
549
|
+
/** Bundle ID of the Release build already installed on the device. The tool does not build or install the app. */
|
|
550
|
+
bundle_id: string;
|
|
551
|
+
/** Connected iPhone UDID; required for a physical-device run. With allow_simulator, a booted simulator UDID also works. */
|
|
552
|
+
device_id?: string;
|
|
553
|
+
/** Explicitly allow a booted simulator when no iPhone is selected. */
|
|
554
|
+
allow_simulator?: boolean;
|
|
555
|
+
/** profile mode only: App Launch trace recording length in seconds (default 8). Rejected in measure mode. */
|
|
556
|
+
duration_seconds?: number;
|
|
557
|
+
};
|
|
544
558
|
"native-profiler-start": {
|
|
545
559
|
/** Target device id from `list-devices` (iOS UDID, Mac app id or Android serial). */
|
|
546
560
|
device_id: string;
|
|
@@ -680,7 +694,7 @@ export interface ArgentToolArgs {
|
|
|
680
694
|
app_process?: string;
|
|
681
695
|
};
|
|
682
696
|
"profiler-stack-query": {
|
|
683
|
-
/** Target device id from `list-devices` (iOS
|
|
697
|
+
/** Target device id from `list-devices` (iOS UDID, Mac app id or Android serial). */
|
|
684
698
|
device_id: string;
|
|
685
699
|
/** Query mode; see Modes in the tool description. */
|
|
686
700
|
mode: "hang_stacks" | "function_callers" | "thread_breakdown" | "leak_stacks";
|