@swmansion/argent 0.5.1

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.
Files changed (63) hide show
  1. package/LICENSE +195 -0
  2. package/README.md +103 -0
  3. package/agents/argent-environment-inspector.md +106 -0
  4. package/agents/references/quality-control-checklist.md +45 -0
  5. package/bin/ax-service +0 -0
  6. package/bin/simulator-server +0 -0
  7. package/dist/Argent.tracetemplate +0 -0
  8. package/dist/auto-screenshot.d.ts +22 -0
  9. package/dist/auto-screenshot.js +79 -0
  10. package/dist/auto-screenshot.js.map +1 -0
  11. package/dist/cli/constants.d.ts +6 -0
  12. package/dist/cli/constants.js +12 -0
  13. package/dist/cli/constants.js.map +1 -0
  14. package/dist/cli/init.d.ts +2 -0
  15. package/dist/cli/init.js +466 -0
  16. package/dist/cli/init.js.map +1 -0
  17. package/dist/cli/mcp-configs.d.ts +38 -0
  18. package/dist/cli/mcp-configs.js +724 -0
  19. package/dist/cli/mcp-configs.js.map +1 -0
  20. package/dist/cli/uninstall.d.ts +13 -0
  21. package/dist/cli/uninstall.js +389 -0
  22. package/dist/cli/uninstall.js.map +1 -0
  23. package/dist/cli/update.d.ts +1 -0
  24. package/dist/cli/update.js +126 -0
  25. package/dist/cli/update.js.map +1 -0
  26. package/dist/cli/utils.d.ts +27 -0
  27. package/dist/cli/utils.js +158 -0
  28. package/dist/cli/utils.js.map +1 -0
  29. package/dist/cli.d.ts +13 -0
  30. package/dist/cli.js +80 -0
  31. package/dist/cli.js.map +1 -0
  32. package/dist/content.d.ts +31 -0
  33. package/dist/content.js +59 -0
  34. package/dist/content.js.map +1 -0
  35. package/dist/launcher.d.ts +8 -0
  36. package/dist/launcher.js +183 -0
  37. package/dist/launcher.js.map +1 -0
  38. package/dist/mcp-server.d.ts +1 -0
  39. package/dist/mcp-server.js +228 -0
  40. package/dist/mcp-server.js.map +1 -0
  41. package/dist/tool-server.cjs +51288 -0
  42. package/dylibs/libArgentInjectionBootstrap.dylib +0 -0
  43. package/dylibs/libKeyboardPatch.dylib +0 -0
  44. package/dylibs/libNativeDevtoolsIos.dylib +0 -0
  45. package/package.json +53 -0
  46. package/rules/argent.md +121 -0
  47. package/scripts/postinstall.cjs +34 -0
  48. package/skills/argent-create-flow/SKILL.md +213 -0
  49. package/skills/argent-ios-profiler/SKILL.md +103 -0
  50. package/skills/argent-metro-debugger/SKILL.md +117 -0
  51. package/skills/argent-metro-debugger/references/failure-scenarios.md +10 -0
  52. package/skills/argent-metro-debugger/references/source-maps.md +27 -0
  53. package/skills/argent-react-native-app-workflow/SKILL.md +237 -0
  54. package/skills/argent-react-native-optimization/SKILL.md +64 -0
  55. package/skills/argent-react-native-optimization/references/fix-reference.md +14 -0
  56. package/skills/argent-react-native-optimization/references/lint-rules.md +55 -0
  57. package/skills/argent-react-native-optimization/references/semantic-checklist.md +34 -0
  58. package/skills/argent-react-native-profiler/SKILL.md +160 -0
  59. package/skills/argent-react-native-profiler/references/diagnostic-tools.md +94 -0
  60. package/skills/argent-simulator-interact/SKILL.md +272 -0
  61. package/skills/argent-simulator-interact/references/gesture-examples.md +114 -0
  62. package/skills/argent-simulator-setup/SKILL.md +19 -0
  63. package/skills/argent-test-ui-flow/SKILL.md +84 -0
package/LICENSE ADDED
@@ -0,0 +1,195 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+ "License" shall mean the terms and conditions for use, reproduction,
9
+ and distribution as defined by Sections 1 through 9 of this document.
10
+ "Licensor" shall mean the copyright owner or entity authorized by
11
+ the copyright owner that is granting the License.
12
+ "Legal Entity" shall mean the union of the acting entity and all
13
+ other entities that control, are controlled by, or are under common
14
+ control with that entity. For the purposes of this definition,
15
+ "control" means (i) the power, direct or indirect, to cause the
16
+ direction or management of such entity, whether by contract or
17
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
18
+ outstanding shares, or (iii) beneficial ownership of such entity.
19
+ "You" (or "Your") shall mean an individual or Legal Entity
20
+ exercising permissions granted by this License.
21
+ "Source" form shall mean the preferred form for making modifications,
22
+ including but not limited to software source code, documentation
23
+ source, and configuration files.
24
+ "Object" form shall mean any form resulting from mechanical
25
+ transformation or translation of a Source form, including but
26
+ not limited to compiled object code, generated documentation,
27
+ and conversions to other media types.
28
+ "Work" shall mean the work of authorship, whether in Source or
29
+ Object form, made available under the License, as indicated by a
30
+ copyright notice that is included in or attached to the work
31
+ (an example is provided in the Appendix below).
32
+ "Derivative Works" shall mean any work, whether in Source or Object
33
+ form, that is based on (or derived from) the Work and for which the
34
+ editorial revisions, annotations, elaborations, or other modifications
35
+ represent, as a whole, an original work of authorship. For the purposes
36
+ of this License, Derivative Works shall not include works that remain
37
+ separable from, or merely link (or bind by name) to the interfaces of,
38
+ the Work and Derivative Works thereof.
39
+ "Contribution" shall mean any work of authorship, including
40
+ the original version of the Work and any modifications or additions
41
+ to that Work or Derivative Works thereof, that is intentionally
42
+ submitted to Licensor for inclusion in the Work by the copyright owner
43
+ or by an individual or Legal Entity authorized to submit on behalf of
44
+ the copyright owner. For the purposes of this definition, "submitted"
45
+ means any form of electronic, verbal, or written communication sent
46
+ to the Licensor or its representatives, including but not limited to
47
+ communication on electronic mailing lists, source code control systems,
48
+ and issue tracking systems that are managed by, or on behalf of, the
49
+ Licensor for the purpose of discussing and improving the Work, but
50
+ excluding communication that is conspicuously marked or otherwise
51
+ designated in writing by the copyright owner as "Not a Contribution."
52
+ "Contributor" shall mean Licensor and any individual or Legal Entity
53
+ on behalf of whom a Contribution has been received by Licensor and
54
+ subsequently incorporated within the Work.
55
+
56
+ 2. Grant of Copyright License. Subject to the terms and conditions of
57
+ this License, each Contributor hereby grants to You a perpetual,
58
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
59
+ copyright license to reproduce, prepare Derivative Works of,
60
+ publicly display, publicly perform, sublicense, and distribute the
61
+ Work and such Derivative Works in Source or Object form.
62
+
63
+ 3. Grant of Patent License. Subject to the terms and conditions of
64
+ this License, each Contributor hereby grants to You a perpetual,
65
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
66
+ (except as stated in this section) patent license to make, have made,
67
+ use, offer to sell, sell, import, and otherwise transfer the Work,
68
+ where such license applies only to those patent claims licensable
69
+ by such Contributor that are necessarily infringed by their
70
+ Contribution(s) alone or by combination of their Contribution(s)
71
+ with the Work to which such Contribution(s) was submitted. If You
72
+ institute patent litigation against any entity (including a
73
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
74
+ or a Contribution incorporated within the Work constitutes direct
75
+ or contributory patent infringement, then any patent licenses
76
+ granted to You under this License for that Work shall terminate
77
+ as of the date such litigation is filed.
78
+
79
+ 4. Redistribution. You may reproduce and distribute copies of the
80
+ Work or Derivative Works thereof in any medium, with or without
81
+ modifications, and in Source or Object form, provided that You
82
+ meet the following conditions:
83
+ (a) You must give any other recipients of the Work or
84
+ Derivative Works a copy of this License; and
85
+ (b) You must cause any modified files to carry prominent notices
86
+ stating that You changed the files; and
87
+ (c) You must retain, in the Source form of any Derivative Works
88
+ that You distribute, all copyright, patent, trademark, and
89
+ attribution notices from the Source form of the Work,
90
+ excluding those notices that do not pertain to any part of
91
+ the Derivative Works; and
92
+ (d) If the Work includes a "NOTICE" text file as part of its
93
+ distribution, then any Derivative Works that You distribute must
94
+ include a readable copy of the attribution notices contained
95
+ within such NOTICE file, excluding those notices that do not
96
+ pertain to any part of the Derivative Works, in at least one
97
+ of the following places: within a NOTICE text file distributed
98
+ as part of the Derivative Works; within the Source form or
99
+ documentation, if provided along with the Derivative Works; or,
100
+ within a display generated by the Derivative Works, if and
101
+ wherever such third-party notices normally appear. The contents
102
+ of the NOTICE file are for informational purposes only and
103
+ do not modify the License. You may add Your own attribution
104
+ notices within Derivative Works that You distribute, alongside
105
+ or in addition to the NOTICE text from the Work, provided
106
+ that such additional attribution notices cannot be construed
107
+ as modifying the License.
108
+
109
+ You may add Your own copyright statement to Your modifications and
110
+ may provide additional or different license terms and conditions
111
+ for use, reproduction, or distribution of Your modifications, or
112
+ for any such Derivative Works as a whole, provided Your use,
113
+ reproduction, and distribution of the Work otherwise complies with
114
+ the conditions stated in this License.
115
+
116
+ 5. Submission of Contributions. Unless You explicitly prevent it,
117
+ any Contribution intentionally submitted for inclusion in the Work
118
+ by You to the Licensor shall be under the terms and conditions of
119
+ this License, without any additional terms or conditions.
120
+ Notwithstanding the above, nothing herein shall supersede or modify
121
+ the terms of any separate license agreement you may have executed
122
+ with Licensor regarding such Contributions.
123
+
124
+ 6. Trademarks. This License does not grant permission to use the trade
125
+ names, trademarks, service marks, or product names of the Licensor,
126
+ except as required for reasonable and customary use in describing the
127
+ origin of the Work and reproducing the content of the NOTICE file.
128
+
129
+ 7. Disclaimer of Warranty. Unless required by applicable law or
130
+ agreed to in writing, Licensor provides the Work (and each
131
+ Contributor provides its Contributions) on an "AS IS" BASIS,
132
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
133
+ implied, including, without limitation, any warranties or conditions
134
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
135
+ PARTICULAR PURPOSE. You are solely responsible for determining the
136
+ appropriateness of using or redistributing the Work and assume any
137
+ risks associated with Your exercise of permissions under this License.
138
+
139
+ 8. Limitation of Liability. In no event and under no legal theory,
140
+ whether in tort (including negligence), contract, or otherwise,
141
+ unless required by applicable law (such as deliberate and grossly
142
+ negligent acts) or agreed to in writing, shall any Contributor be
143
+ liable to You for damages, including any direct, indirect, special,
144
+ incidental, or consequential damages of any character arising as a
145
+ result of this License or out of the use or inability to use the
146
+ Work (including but not limited to damages for loss of goodwill,
147
+ work stoppage, computer failure or malfunction, or any and all
148
+ other commercial damages or losses), even if such Contributor
149
+ has been advised of the possibility of such damages.
150
+
151
+ 9. Accepting Warranty or Additional Liability. While redistributing
152
+ the Work or Derivative Works thereof, You may choose to offer,
153
+ and charge a fee for, acceptance of support, warranty, indemnity,
154
+ or other liability obligations and/or rights consistent with this
155
+ License. However, in accepting such obligations, You may act only
156
+ on Your own behalf and on Your sole responsibility, not on behalf
157
+ of any other Contributor, and only if You agree to indemnify,
158
+ defend, and hold each Contributor harmless for any liability
159
+ incurred by, or claims asserted against, such Contributor by reason
160
+ of your accepting any such warranty or additional liability.
161
+
162
+ END OF TERMS AND CONDITIONS
163
+
164
+ Copyright 2026 Software Mansion S.A.
165
+
166
+ Licensed under the Apache License, Version 2.0 (the "License");
167
+ you may not use this file except in compliance with the License.
168
+ You may obtain a copy of the License at
169
+
170
+ http://www.apache.org/licenses/LICENSE-2.0
171
+
172
+ Unless required by applicable law or agreed to in writing, software
173
+ distributed under the License is distributed on an "AS IS" BASIS,
174
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
175
+ See the License for the specific language governing permissions and
176
+ limitations under the License.
177
+
178
+ ---
179
+
180
+ ADDITIONAL TERMS: PROPRIETARY BINARY COMPONENTS
181
+
182
+ The following files included in this package are NOT governed by the Apache
183
+ License, Version 2.0 above:
184
+
185
+ bin/simulator-server
186
+ bin/ax-service
187
+ dylibs/libArgentInjectionBootstrap.dylib
188
+ dylibs/libKeyboardPatch.dylib
189
+ dylibs/libNativeDevtoolsIos.dylib
190
+
191
+ These files are the proprietary intellectual property of Software Mansion S.A.
192
+ and are licensed solely for use in conjunction with this package.
193
+ Decompiling, reverse engineering, disassembling, or redistributing these files
194
+ outside the scope of this project without explicit written permission from
195
+ Software Mansion S.A. is strictly prohibited.
package/README.md ADDED
@@ -0,0 +1,103 @@
1
+ <br/>
2
+ <p align="center">
3
+ <a href="https://argent.swmansion.com">
4
+ <picture>
5
+ <source media="(prefers-color-scheme: dark)" srcset="https://github.com/software-mansion/argent/blob/main/assets/banner_dark_mode.png">
6
+ <source media="(prefers-color-scheme: light)" srcset="https://github.com/software-mansion/argent/blob/main/assets/banner_white_mode.png">
7
+ <img alt="banner" src="https://github.com/software-mansion/argent/blob/main/assets/banner_dark_mode.png" width="80%">
8
+ </picture>
9
+ </a>
10
+ </p>
11
+ <br/>
12
+
13
+ **[Argent](https://argent.swmansion.com)** is an **agentic toolkit** that gives your AI assistant direct access to iOS Simulators. Ask it to tap a button, run a profiler or reproduce an issue manually - all from within your CLI, without switching context.
14
+
15
+ ```bash
16
+ npx @swmansion/argent init
17
+ ```
18
+
19
+ ## Capabilities
20
+
21
+ - **Autonomous iOS development** - Allow your agent to work with iOS apps on its own - let it build, open, interact with the app and debug it. Ask for reproducing issues, testing features manually, profiling your app and much more, without ever interrupting your work.
22
+ - **UI interaction** - Give your agent full control toolkit - tapping, swiping, pinching, typing, gestures, hardware buttons and all other gears included. Let it navigate your app exactly as a user would, without lifting a finger.
23
+ - **Profiling with batteries included** - Argent can perform and analyze both React-Native and Xcode Instruments profiling sessions. Get comprehensive summaries and ask to optimise your app where you find fit.
24
+ - **Debugging and diagnostics** - Let your agent inspect logs, capture crash reports, and reproduce failing states on the simulator, so you can jump straight to the fix.
25
+ - **React Native out of the box** - Argent works with React Native apps natively, so your agent can build, launch, and iterate on your RN project the same way it would any iOS app - no extra setup required.
26
+
27
+ > **Tip:** Once installed, ask your assistant _"What can Argent do?"_ - it will walk you through all capabilities available.
28
+
29
+ <br/>
30
+ <p align="center">
31
+ <img src="https://github.com/software-mansion/argent/blob/main/assets/showcase.gif" alt="argent showcase video gif" width="100%" />
32
+ </p>
33
+
34
+ ---
35
+
36
+ ## Installation
37
+
38
+ #### Prerequisites
39
+
40
+ - macOS with **Xcode** installed
41
+ - **Node.js 18** or later
42
+
43
+ #### Run `init` in your project
44
+
45
+ From your project root:
46
+
47
+ ```bash
48
+ npx @swmansion/argent init
49
+ ```
50
+
51
+ This command triggers an installation wizard which:
52
+
53
+ - Installs `@swmansion/argent` globally
54
+ - Detects your editor and registers the MCP server
55
+ - Copies skills, rules, and agent definitions into your workspace
56
+
57
+ #### Prefer a manual install?
58
+
59
+ ```bash
60
+ npm install -g @swmansion/argent
61
+ argent init
62
+ ```
63
+
64
+ ## CLI Reference
65
+
66
+ | Command | Description |
67
+ | ------------------ | ----------------------------------------------------------- |
68
+ | `argent init` | Install globally and configure MCP in the current workspace |
69
+ | `argent install` | Alias for `init` command |
70
+ | `argent update` | Pull the latest version and refresh workspace configuration |
71
+ | `argent remove` | Unregister the MCP server and uninstall the package |
72
+ | `argent uninstall` | Alias for `remove` command |
73
+ | `argent mcp` | Start MCP server instance, used internally by agent |
74
+
75
+ ## Supported Editors
76
+
77
+ `argent init` auto-detects and configures MCP for:
78
+
79
+ | Editor | Config location |
80
+ | ----------- | ------------------------------------------------------------- |
81
+ | Claude Code | `.mcp.json` (project) or `~/.claude.json` (global) |
82
+ | Cursor | `.cursor/mcp.json` (project) or `~/.cursor/mcp.json` (global) |
83
+ | VS Code | `.vscode/mcp.json` |
84
+ | Windsurf | `.windsurf/mcp.json` |
85
+ | Zed | `.zed/settings.json` |
86
+ | Gemini CLI | `.gemini/settings.json` |
87
+ | Codex CLI | `.codex/config.yaml` |
88
+
89
+ ## License
90
+
91
+ Argent uses a mixed licensing model.
92
+
93
+ **Source code** is released under the [Apache License 2.0](LICENSE).
94
+
95
+ **Proprietary binaries** (the `bin/simulator-server` and `bin/ax-service` executables and the `.dylib` files in `native-devtools-ios`) are the intellectual property of Software Mansion S.A. and are licensed solely for use within this project. Decompiling, reverse-engineering, or redistributing them without explicit written permission is prohibited.
96
+
97
+ By using Argent, you acknowledge and agree to this structure. See [LICENSE](https://github.com/software-mansion/argent/blob/main/LICENSE.txt) for full details.
98
+
99
+ ## Argent is created by Software Mansion
100
+
101
+ Since 2012 [Software Mansion](https://swmansion.com) is a software agency with experience in building web and mobile apps. We are Core React Native Contributors and experts in dealing with all kinds of React Native issues. We can help you build your next dream product – [Hire us](https://swmansion.com/contact/projects?utm_source=argent&utm_medium=readme).
102
+
103
+ [![swm](https://logo.swmansion.com/logo?color=white&variant=desktop&width=150&tag=argent-github "Software Mansion")](https://swmansion.com)
@@ -0,0 +1,106 @@
1
+ ---
2
+ name: argent-environment-inspector
3
+ description: >
4
+ Inspects a mobile app project's environment and returns structured JSON covering
5
+ project type, platform support, build and startup commands, bundler config, env
6
+ resolution, key packages, QA/feedback-loop tooling, and Argent-specific workflow
7
+ commands. Works on any project — determines whether it is React Native, Expo,
8
+ Flutter, native iOS/Android, or another stack, and provides environment context
9
+ regardless. Has deeper React Native introspection via gather-workspace-data but
10
+ also reports useful information for non-RN projects.
11
+ Use proactively at session start when required to gather the environment information.
12
+ If subagent delegation is not available, run the steps in the main thread instead.
13
+ The main agent is responsible for persisting the result to project memory.
14
+ model: haiku
15
+ ---
16
+
17
+ You are the **environment-inspector** subagent. Your job is to inspect a mobile app
18
+ project and return a single JSON block describing the project's environment. You do
19
+ not write files — the main agent handles persistence.
20
+
21
+ **Your first task is to determine what kind of project this is.**. The project could be, for example:
22
+
23
+ - React Native (bare CLI or Expo)
24
+ - Flutter / Dart
25
+ - Native iOS (Swift / Objective-C with Xcode)
26
+ - Native Android (Kotlin / Java with Gradle)
27
+ - A web app, a monorepo containing multiple apps, or something else entirely
28
+
29
+ Provide useful environment context regardless of the project type. You have
30
+ deep introspection tools at your disposal - `gather-workspace-data`, which provides heuristical
31
+ context about the workspace structure. If any of the information is not retrieved from the tool,
32
+ but required by the main agent, fill it in by manual inspection of the project.
33
+
34
+ ## Execution steps
35
+
36
+ 1. **Call `gather-workspace-data`** with the project's workspace path.
37
+ This is always your first action. It returns a structured snapshot of
38
+ `package.json`, metro/babel config text, `app.json`, `eas.json`, `tsconfig`,
39
+ platform directories, lockfile type, `.env` key names, CLI tool versions,
40
+ `scripts/` listing, husky hooks, CI config, Makefile targets, and config
41
+ file existence.
42
+
43
+ 2. **Determine the project type.** From the snapshot, classify the project:
44
+ - `react-native` in `package.json` dependencies → React Native project
45
+ - `expo` in dependencies or `app.json` with `expo` key → Expo project
46
+ - `pubspec.yaml` present → Flutter project
47
+ - `ios/*.xcodeproj` or `ios/*.xcworkspace` without `react-native` → native iOS
48
+ - `android/build.gradle` without `react-native` → native Android
49
+ - None of the above → classify based on what you find (web app, library, etc.)
50
+
51
+ 3. **Explore beyond the snapshot.** Use Read, Glob, Grep, and Bash to fill
52
+ gaps the snapshot does not cover:
53
+ - Non-obvious `scripts/` directory contents and what each script does.
54
+ - CI workflow files (`.github/workflows/*.yml`) to understand what "passing" means.
55
+ - Custom Makefile or Fastfile targets.
56
+ - `package.json` scripts beyond `start`/`test` — look for `check`, `verify`,
57
+ `ci`, `precommit`, `prepush`, flavors, and env-specific variants.
58
+ - `.husky/` hook contents to understand pre-commit/pre-push validation.
59
+ - `lint-staged` config to understand what runs on commit.
60
+ - Monorepo indicators: `workspaces` in root `package.json`, `turbo.json`,
61
+ `nx.json`, `lerna.json`.
62
+ - README or CONTRIBUTING docs that describe build/run/test workflows.
63
+ - Storybook config (`.storybook/`), Detox config (`.detoxrc.js`), Maestro
64
+ flows (`.maestro/`).
65
+ - For Flutter: `pubspec.yaml`, `analysis_options.yaml`, `lib/` structure.
66
+ - For native iOS: Xcode project/workspace, schemes, `Podfile`, `Package.swift`.
67
+ - For native Android: `build.gradle`, `settings.gradle`, flavor configs.
68
+
69
+ 4. **Populate every field** in the output schema below. Use `null` for
70
+ genuinely unknown values or fields that do not apply to this project type.
71
+ Prefer concrete commands over generic ones (e.g. `yarn start:local` over
72
+ `npx react-native start` if the project defines a custom script).
73
+
74
+ 5. **Return the JSON block** — no prose, no markdown fences, no
75
+ explanation. The main agent parses your entire response as JSON.
76
+
77
+ ## Output schema
78
+
79
+ Return a JSON object with these top-level fields:
80
+
81
+ | Field | Type | Description |
82
+ | ------------------------------------- | ------------ | --------------------------------------------------------------------------------------------- |
83
+ | `project_type` | string | `react-native`, `expo`, `flutter`, `native-ios`, `native-android`, `web`, `monorepo`, `other` |
84
+ | `project_type_details` | string | Short human-readable stack summary |
85
+ | `is_react_native` | bool | `react-native` in deps |
86
+ | `is_ios` / `is_android` | bool | Platform directories exist |
87
+ | `is_expo` / `is_web` / `is_flutter` | bool | Framework detection flags |
88
+ | `is_native_ios` / `is_native_android` | bool | Native without cross-platform framework |
89
+ | `startup_commands` | array | `[{ command, context }]` — concrete dev server start commands |
90
+ | `build_commands` | array | `[{ command, platform, context }]` — build commands per platform |
91
+ | `argent_workflow` | object | `{ start_dev_server, build_ios, build_android, notes }` — exact commands for Argent |
92
+ | `configs` | object | Paths to metro, babel, app, tsconfig, pubspec, xcode, gradle configs (`null` if absent) |
93
+ | `metro_port` | number\|null | From config or default 8081; `null` for non-RN |
94
+ | `env_resolution` | object | `{ env_files, strategy, notes }` |
95
+ | `key_packages` | object | Major dependencies with versions |
96
+ | `package_json` | object | `{ name, version, scripts_summary }` |
97
+ | `bundler` | string\|null | `metro`, `webpack`, etc. |
98
+ | `terminal_tools` | object | `{ package_manager, pod_available, expo_cli, eas_cli }` |
99
+ | `cloud_build` | object | `{ eas, eas_profiles }` or other CI/CD |
100
+ | `quality_control` | object | Linting, formatting, type checking, unit tests, e2e tests, feedback loop tools |
101
+ | `additional_notes` | string | Anything relevant not covered above |
102
+ | `needs_user_input` | bool | True if critical info is missing |
103
+ | `missing_information` | array | List of things you couldn't determine |
104
+ | `inspected_at` | string | ISO 8601 timestamp |
105
+
106
+ For the `quality_control` field structure, see `references/quality-control-checklist.md`.
@@ -0,0 +1,45 @@
1
+ ## Quality control checklist
2
+
3
+ The `quality_control` field in the output JSON must follow this structure:
4
+
5
+ ```json
6
+ {
7
+ "linting": { "eslint": bool, "eslint_config": "path", "run_command": "cmd", "fix_command": "cmd" },
8
+ "formatting": { "prettier": bool, "prettier_config": "path", "run_command": "cmd" },
9
+ "type_checking": { "typescript": bool, "strict_mode": bool, "run_command": "cmd" },
10
+ "unit_tests": { "jest": bool, "jest_config": "path", "run_command": "cmd", "watch_command": "cmd", "coverage_command": "cmd" },
11
+ "e2e_tests": { "detox": bool, "maestro": bool, "xctest": bool, "flutter_integration_test": bool },
12
+ "feedback_loop_tools": { "metro_hot_reload": bool, "flutter_hot_reload": bool, "react_devtools": bool, "flipper": bool, "storybook": bool, "notes": "string" }
13
+ }
14
+ ```
15
+
16
+ Look for these beyond the obvious lint/test configs, regardless of project type:
17
+
18
+ **Immediate feedback tools (agent can trigger during a task):**
19
+
20
+ - `tsc --noEmit` — instant type error feedback after edits (TypeScript projects)
21
+ - `eslint --fix` / `swiftlint` / `ktlint` — auto-fixable lint errors
22
+ - `jest --testPathPattern <file>` — single test file (JS/TS projects)
23
+ - `dart analyze` — static analysis (Flutter projects)
24
+ - `flutter test <file>` — single test file (Flutter projects)
25
+ - `yarn test --watch` / `flutter test --watch` — reactive test runner
26
+ - Metro hot reload (via `debugger-reload-metro` Argent tool, RN only)
27
+ - Flutter hot reload / hot restart
28
+
29
+ **Slower validation tools (agent runs at end of a task):**
30
+
31
+ - Full test suite run (`jest`, `flutter test`, `xcodebuild test`, `gradle test`)
32
+ - E2E: Detox, Maestro, XCUITest, Espresso, Flutter integration tests
33
+ - `eas build --local` / `flutter build` / `xcodebuild` for native validation
34
+
35
+ **Indicators to check (all project types):**
36
+
37
+ - `scripts/` directory at project root — often contains custom validation scripts
38
+ - `Makefile` / `Fastfile` targets — look for `lint`, `test`, `typecheck`, `check`, `validate`
39
+ - `package.json` scripts named `check`, `verify`, `ci`, `precommit`, `prepush`
40
+ - `.husky/` directory — which hooks run and what they execute
41
+ - `lint-staged` config — what runs on commit
42
+ - CI config files — the CI steps are ground truth for what "passing" means
43
+ - `Podfile` / `Package.swift` — iOS dependency management
44
+ - `build.gradle` / `settings.gradle` — Android build config and flavor definitions
45
+ - `pubspec.yaml` / `analysis_options.yaml` — Flutter project config and lint rules
package/bin/ax-service ADDED
Binary file
Binary file
Binary file
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Auto-screenshot configuration and helpers.
3
+ *
4
+ * After a successful simulator interaction tool call, the MCP layer
5
+ * automatically captures a screenshot and appends it to the response.
6
+ * All tunables live in this module so they can be tested in isolation.
7
+ */
8
+ export declare const AUTO_SCREENSHOT_TOOLS: Set<string>;
9
+ /**
10
+ * Per-tool delay (ms) before capturing the screenshot.
11
+ * +1 000 ms over baseline research values to cover slow devices/transitions.
12
+ */
13
+ export declare const AUTO_SCREENSHOT_DELAY_MS_BY_TOOL: Record<string, number>;
14
+ export declare function autoScreenshotEnabled(): boolean;
15
+ export declare function getUdidFromArgs(args: unknown): string | undefined;
16
+ /**
17
+ * Strip known MCP prefix so the allow-list matches canonical names.
18
+ * Cursor sends `mcp__argent__tap`; we need `tap`.
19
+ */
20
+ export declare function normalizeToolName(name: string): string;
21
+ export declare function shouldAutoScreenshot(toolName: string): boolean;
22
+ export declare function getAutoScreenshotDelayMs(toolName: string): number;
@@ -0,0 +1,79 @@
1
+ /**
2
+ * Auto-screenshot configuration and helpers.
3
+ *
4
+ * After a successful simulator interaction tool call, the MCP layer
5
+ * automatically captures a screenshot and appends it to the response.
6
+ * All tunables live in this module so they can be tested in isolation.
7
+ */
8
+ export const AUTO_SCREENSHOT_TOOLS = new Set([
9
+ "gesture-tap",
10
+ "gesture-swipe",
11
+ "gesture-custom",
12
+ "gesture-pinch",
13
+ "gesture-rotate",
14
+ "button",
15
+ "keyboard",
16
+ "rotate",
17
+ "launch-app",
18
+ "restart-app",
19
+ "open-url",
20
+ "describe",
21
+ "run-sequence",
22
+ ]);
23
+ /**
24
+ * Per-tool delay (ms) before capturing the screenshot.
25
+ * +1 000 ms over baseline research values to cover slow devices/transitions.
26
+ */
27
+ export const AUTO_SCREENSHOT_DELAY_MS_BY_TOOL = {
28
+ "launch-app": 3000,
29
+ "restart-app": 3000,
30
+ "open-url": 2000,
31
+ "gesture-swipe": 1500,
32
+ "gesture-custom": 1500,
33
+ "gesture-tap": 1500,
34
+ "gesture-pinch": 1500,
35
+ "gesture-rotate": 1500,
36
+ "run-sequence": 15000,
37
+ "button": 1500,
38
+ "rotate": 1000,
39
+ "keyboard": 300,
40
+ "describe": 100,
41
+ };
42
+ const DEFAULT_DELAY_MS = 1400;
43
+ export function autoScreenshotEnabled() {
44
+ const v = process.env.ARGENT_AUTO_SCREENSHOT;
45
+ return v === undefined || v === "" || v === "1" || v.toLowerCase() === "true";
46
+ }
47
+ export function getUdidFromArgs(args) {
48
+ if (args &&
49
+ typeof args === "object" &&
50
+ "udid" in args &&
51
+ typeof args.udid === "string") {
52
+ return args.udid;
53
+ }
54
+ return undefined;
55
+ }
56
+ /**
57
+ * Strip known MCP prefix so the allow-list matches canonical names.
58
+ * Cursor sends `mcp__argent__tap`; we need `tap`.
59
+ */
60
+ export function normalizeToolName(name) {
61
+ const idx = name.lastIndexOf("__");
62
+ return idx === -1 ? name : name.slice(idx + 2);
63
+ }
64
+ export function shouldAutoScreenshot(toolName) {
65
+ const canonical = normalizeToolName(toolName);
66
+ return canonical !== "screenshot" && AUTO_SCREENSHOT_TOOLS.has(canonical);
67
+ }
68
+ export function getAutoScreenshotDelayMs(toolName) {
69
+ const canonical = normalizeToolName(toolName);
70
+ const base = AUTO_SCREENSHOT_DELAY_MS_BY_TOOL[canonical] ?? DEFAULT_DELAY_MS;
71
+ const envOverride = process.env.ARGENT_AUTO_SCREENSHOT_DELAY_MS;
72
+ if (envOverride) {
73
+ const envMs = parseInt(envOverride, 10);
74
+ if (!Number.isNaN(envMs))
75
+ return Math.max(base, envMs);
76
+ }
77
+ return base;
78
+ }
79
+ //# sourceMappingURL=auto-screenshot.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auto-screenshot.js","sourceRoot":"","sources":["../src/auto-screenshot.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,GAAG,CAAC;IAC3C,aAAa;IACb,eAAe;IACf,gBAAgB;IAChB,eAAe;IACf,gBAAgB;IAChB,QAAQ;IACR,UAAU;IACV,QAAQ;IACR,YAAY;IACZ,aAAa;IACb,UAAU;IACV,UAAU;IACV,cAAc;CACf,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAA2B;IACtE,YAAY,EAAE,IAAI;IAClB,aAAa,EAAE,IAAI;IACnB,UAAU,EAAE,IAAI;IAChB,eAAe,EAAE,IAAI;IACrB,gBAAgB,EAAE,IAAI;IACtB,aAAa,EAAE,IAAI;IACnB,eAAe,EAAE,IAAI;IACrB,gBAAgB,EAAE,IAAI;IACtB,cAAc,EAAE,KAAK;IACrB,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,IAAI;IACd,UAAU,EAAE,GAAG;IACf,UAAU,EAAE,GAAG;CAChB,CAAC;AAEF,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAE9B,MAAM,UAAU,qBAAqB;IACnC,MAAM,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC;IAC7C,OAAO,CAAC,KAAK,SAAS,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,WAAW,EAAE,KAAK,MAAM,CAAC;AAChF,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,IAAa;IAC3C,IACE,IAAI;QACJ,OAAO,IAAI,KAAK,QAAQ;QACxB,MAAM,IAAI,IAAI;QACd,OAAQ,IAA0B,CAAC,IAAI,KAAK,QAAQ,EACpD,CAAC;QACD,OAAQ,IAAyB,CAAC,IAAI,CAAC;IACzC,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAC,IAAY;IAC5C,MAAM,GAAG,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IACnC,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;AACjD,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,QAAgB;IACnD,MAAM,SAAS,GAAG,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IAC9C,OAAO,SAAS,KAAK,YAAY,IAAI,qBAAqB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;AAC5E,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,QAAgB;IACvD,MAAM,SAAS,GAAG,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IAC9C,MAAM,IAAI,GAAG,gCAAgC,CAAC,SAAS,CAAC,IAAI,gBAAgB,CAAC;IAC7E,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,+BAA+B,CAAC;IAChE,IAAI,WAAW,EAAE,CAAC;QAChB,MAAM,KAAK,GAAG,QAAQ,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;QACxC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC;YAAE,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACzD,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -0,0 +1,6 @@
1
+ export declare const PACKAGE_NAME = "@swmansion/argent";
2
+ export declare const NPM_REGISTRY = "https://registry.npmjs.org";
3
+ export declare const MCP_SERVER_KEY = "argent";
4
+ export declare const MCP_BINARY_NAME = "argent";
5
+ export declare const PERMISSION_RULE = "mcp__argent";
6
+ export declare const CURSOR_ALLOWLIST_PATTERN = "argent:*";
@@ -0,0 +1,12 @@
1
+ // Configurable constants for the argent CLI.
2
+ // Change these if the npm package name, registry, or MCP key changes.
3
+ export const PACKAGE_NAME = "@swmansion/argent";
4
+ // Used ONLY for single-package queries (e.g. `npm view`), never for install
5
+ // commands. Install relies on the user's scoped registry in ~/.npmrc so that
6
+ // third-party dependencies resolve from npmjs.org normally.
7
+ export const NPM_REGISTRY = "https://registry.npmjs.org";
8
+ export const MCP_SERVER_KEY = "argent";
9
+ export const MCP_BINARY_NAME = "argent";
10
+ export const PERMISSION_RULE = "mcp__argent";
11
+ export const CURSOR_ALLOWLIST_PATTERN = "argent:*";
12
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/cli/constants.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,sEAAsE;AAEtE,MAAM,CAAC,MAAM,YAAY,GAAG,mBAAmB,CAAC;AAEhD,4EAA4E;AAC5E,6EAA6E;AAC7E,4DAA4D;AAC5D,MAAM,CAAC,MAAM,YAAY,GAAG,4BAA4B,CAAC;AACzD,MAAM,CAAC,MAAM,cAAc,GAAG,QAAQ,CAAC;AACvC,MAAM,CAAC,MAAM,eAAe,GAAG,QAAQ,CAAC;AACxC,MAAM,CAAC,MAAM,eAAe,GAAG,aAAa,CAAC;AAC7C,MAAM,CAAC,MAAM,wBAAwB,GAAG,UAAU,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function init(args: string[]): Promise<void>;
2
+ export declare function printBanner(): void;