Commit Graph

39 Commits

Author SHA1 Message Date
filip131311 bb3f484d04 chore: bump package versions to 0.6.0 (#178)
## Summary
- Bumps all 9 published packages from `0.6.0-next.2` → `0.6.0` (stable)
in preparation for the `0.6.0` release.
- Affected: `@swmansion/argent`, `@argent/cli`, `@argent/installer`,
`@argent/mcp`, `@argent/tools-client`, `@argent/native-devtools-ios`,
`@argent/registry`, `@argent/skills`, `@argent/tool-server`.
`packages/ui` (`0.0.1`) is on a separate version track and left as-is.
- Lockfile updated via `npm install`; `npm run format` was a no-op.

## Test plan
- [ ] CI green
- [ ] Run the stable publish workflow against this commit and confirm
publish succeeds
2026-04-30 16:02:33 +02:00
filip131311 f004c08a19 chore: bump package versions to 0.6.0-next.2 (#177)
## Summary
- Bumps all 9 published packages from `0.6.0-next.1` → `0.6.0-next.2` in
preparation for the next prerelease publish.
- Affected: `@swmansion/argent`, `@argent/cli`, `@argent/installer`,
`@argent/mcp`, `@argent/tools-client`, `@argent/native-devtools-ios`,
`@argent/registry`, `@argent/skills`, `@argent/tool-server`.
`packages/ui` (`0.0.1`) is on a separate version track and left as-is.
- Lockfile updated via `npm install`; `npm run format` was a no-op.

## Test plan
- [ ] CI green
- [ ] Run `Publish prerelease to npm (next)` workflow against this
commit and confirm publish succeeds
2026-04-30 15:51:32 +02:00
filip131311 1f1f55f72e chore: bump package versions to 0.6.0-next.1 (#174)
## Summary
- Bumps all 9 published packages from `0.6.0-next.0` → `0.6.0-next.1` in
preparation for the next prerelease publish (the `0.6.0-next.0` train
was blocked by the build-config and update-checker fixes in #172 and
#173).
- Affected: `@swmansion/argent`, `@argent/cli`, `@argent/installer`,
`@argent/mcp`, `@argent/tools-client`, `@argent/native-devtools-ios`,
`@argent/registry`, `@argent/skills`, `@argent/tool-server`.
`packages/ui` (`0.0.1`) is on a separate version track and left as-is,
matching #171.
- Lockfile updated via `npm install` — only the 9 workspace `version`
entries changed.

## Test plan
- [ ] CI green
- [ ] Run `Publish prerelease to npm (next)` workflow against this
commit (after #172 and #173 land) and confirm publish succeeds
2026-04-30 13:08:22 +02:00
filip131311 be31093f6c chore: bump package versions to 0.6.0-next.0 (#171)
## Summary
- Bump all published packages to `0.6.0-next.0` in preparation for the
next prerelease train.
- Affected: `@swmansion/argent`, `@argent/cli`, `@argent/installer`,
`@argent/mcp`, `@argent/tools-client`, `@argent/native-devtools-ios`,
`@argent/registry`, `@argent/skills`, `@argent/tool-server`.
`@argent/native-devtools-ios` was at `0.5.1`; aligned with the rest.
`packages/ui` (`0.0.1`) is on a separate version track and left as-is.

## Test plan
- [ ] CI green
- [ ] `npm next` prerelease publish workflow picks up the new version
2026-04-30 12:45:57 +02:00
filip131311 dbf4de1ab0 refactor(tool-server): per-tool dirs + cross-platform dispatch (iOS only, Android-ready) (#164)
## Summary

Sets up the foundation for adding Android support without changing any
user-visible iOS behavior. iOS works exactly as before; Android handlers
are stubs that throw a clear \"not yet implemented\" message until
they're filled in.

### New primitives

- `Platform`, `DeviceKind`, `DeviceInfo`, `ToolCapability`,
`ToolDependency` (in `@argent/registry`)
- `classifyDevice(udid)` + `resolveDevice(udid)` (UUID shape → iOS, else
Android)
- `assertSupported(toolId, capability, device)` — throws
`UnsupportedOperationError`
- `ensureDep(s)` — host-binary preflight with install hints
- `dispatchByPlatform({ toolId, capability, ios, android })` — one-line
cross-platform `execute()`

### HTTP gating

`/tools/:name` now runs:
- Host-binary preflight (`requires`) → 424 with install hint
- Capability gate (`capability` + `udid`) → 400 with reason

### Per-tool directory layout

Every cross-platform tool now lives in its own directory:

\`\`\`
tools/gesture-tap/
  index.ts             ← ToolDefinition, capability, dispatchByPlatform
  platforms/
    ios.ts             ← iOS impl (existing logic)
    android.ts         ← stub: throws \"not yet implemented\"
\`\`\`

Refactored 17 tools this way: gesture-{tap,swipe,custom,pinch,rotate},
screenshot, button, paste, keyboard, launch-app, restart-app,
reinstall-app, open-url, rotate, run-sequence, describe (with shared
contract + iOS adapters under platforms/).

### Tool call flow (iOS, today)

1. Agent calls \`gesture-tap { udid: \"<uuid>\", x, y }\`
2. HTTP zod-parses, then host-binary preflight, then capability gate
(passes — capability has \`apple\`)
3. Tool's \`execute()\` (built by \`dispatchByPlatform\`):
- \`resolveDevice(udid)\` → \`{ platform: \"ios\", kind: \"simulator\",
id }\`
   - \`assertSupported\` → passes
   - branches to \`tapIos(services, params, device)\`
4. iOS impl uses \`SimulatorServerApi\` exactly as before.

### Tool call flow (Android, future)

Same flow; the Android branch in \`dispatchByPlatform\` runs. Filling in
Android = three steps:

1. Implement the function in \`tools/<tool>/platforms/android.ts\`
2. Add \`android: { emulator: true, device: true, unknown: true }\` to
the tool's capability
3. Make \`services()\` platform-aware where the iOS service URN doesn't
apply (e.g. \`launch-app\` declares \`nativeDevtools\` for iOS only)

## Test plan

- [x] All 395 existing tests pass; 9 new tests for `device-info` +
`capability`
- [x] TypeScript clean across `@argent/registry` and
`@argent/tool-server`
- [ ] Manual smoke-test on a real iOS simulator (gesture-tap,
screenshot, describe, launch-app)

## Deferred to follow-ups

- **Per-tool capability declarations on iOS-only tools**
(`native-devtools/*`, `profiler/ios-profiler/*`, `network/*`,
`simulator/*`). They still work; the HTTP capability gate is a no-op
when no declaration exists. Adding them is mechanical and doesn't affect
iOS behavior.
- **`list-simulators` / `boot-simulator` rename to `list-devices` /
`boot-device`** — that's a behavior change, paired with the Android
impls.
- **Platform-aware `services()`** for tools whose iOS service has no
Android equivalent (e.g. `nativeDevtools` in `launch-app` /
`restart-app`). Needed when filling in Android impls.
2026-04-28 15:32:39 +02:00
Ignacy Łątka acc5798185 feat(mcp): support progressive tool loading via _meta hints (#120)
* feat(mcp): support progressive tool loading via _meta hints

Add optional alwaysLoad and searchHint fields to ToolDefinition,
forward them through GET /tools, and emit them as
_meta["anthropic/alwaysLoad"] / _meta["anthropic/searchHint"] in the
MCP ListTools response. Claude Code's ToolSearch defers MCP tools by
default; tools marked alwaysLoad stay in context on every turn, and
searchHint feeds the BM25 ranker so deferred tools surface for
relevant queries.

Mark the core discovery + interaction tools as alwaysLoad so Claude
never has to round-trip through ToolSearch to tap the screen:
describe, debugger-component-tree, screenshot, gesture-tap,
gesture-swipe, launch-app, run-sequence. Everything else defers.

* feat(mcp): mark restart-app as alwaysLoad

Tools that depend on controlling app startup (relaunch for clean
state, refreshing native-devtools injection) need restart-app to be
immediately callable rather than routed through a search round-trip.
2026-04-23 17:04:24 +02:00
filip131311 9fee899e5f chore: bump package versions to 0.5.3 for mcp, registry, skills, and tool-server (#149) 2026-04-20 17:51:14 +02:00
pFornagiel 066aad2452 fix: fix problematic CLI install, bump package versions to 0.5.2 for mcp, registry, skills, and tool-server 2026-04-16 17:47:25 +02:00
Paweł Fornagiel 8c06a60ae8 chore: bump package versions to 0.5.1 for mcp, native-devtools-ios, registry, skills, and tool-server (#139) 2026-04-16 17:05:21 +02:00
filip131311 3979e2780d bump version (#136)
* init

* chore: update package versions to 0.4.5 for registry, skills, and tool-server

---------

Co-authored-by: pFornagiel <pawel.fornagiel2@gmail.com>
2026-04-16 14:15:44 +02:00
filip131311 c291fcac28 fix: tool server crash recovery for MCP server (#135)
* fix: add tool server crash recovery to MCP server

- MCP CLI: log uncaught exceptions/rejections but don't exit when
  running as MCP server (long-lived stdio process must survive)
- Tool server: attempt graceful registry disposal before exiting on
  fatal errors so child processes (simulator servers) are not orphaned
- fetchWithReconnect: retry up to 5 times with exponential backoff
  (500ms→8s) giving a restarted tool server time to boot
- ListToolsRequestSchema: add try/catch, return empty list on failure
  instead of propagating raw errors
- Health monitor: periodic 30s ping detects tool server crashes between
  requests and preemptively triggers reconnect
- Defense-in-depth: catch errors in EventEmitter listeners, handle
  rejected promises in simulator watcher and update checker, log
  stdout/stderr errors instead of rethrowing

* fix: address PR review feedback

- Halve retry backoff (4 retries, 250ms base → ~3.75s total wait)
- Log initSimulator failures instead of silently swallowing them
2026-04-16 12:27:15 +02:00
Ignacy Łątka 27858c7390 remove duplicate method (#118) 2026-04-15 13:02:05 +02:00
pFornagiel 76cc876c2c chore: bump package versions to 0.4.3 2026-04-13 17:49:38 +02:00
Paweł Fornagiel 42cc5e3c09 Enhance error handling in registry and tool server blueprints (#115)
* feat: enhance error handling in registry and tool server blueprints

* test: add tests for error handling in registry and tool server blueprints

* refactor: streamline exception detail formatting in CDP client

* format: run format
2026-04-13 17:17:18 +02:00
Paweł Fornagiel 82418eeb92 feat: AXService daemon, describe tool native-devtools path, and submodule bump (#98)
* feat: first implementation integration of ax-service for enhanced accessibility support

* feat: enhance ax-service with automation enablement and daemon management

* feat: export ensureAutomationEnabled function for improved accessibility automation in simulator server

* feat: add new build scripts for native development and update binary files

* feat: enhance describe tool to support native-devtools fallback and introduce DescribeResult interface

* chore: bump version to 0.4.1

* chore: bump argent-private to main; list ax-service in LICENSE

- Point packages/argent-private at current main and set submodule branch.
- Declare packages/native-devtools-ios/bin/ax-service as proprietary alongside simulator-server and dylibs.

Made-with: Cursor

* docs: document ax-service as proprietary across LICENSE and README

- Extend root README and CONTRIBUTING requirements (mcp README syncs from root at build).
- List bin/ax-service in @swmansion/argent and native-devtools-ios LICENSE.
- Assert ax-service is present and executable in publish workflow.

Made-with: Cursor

---------

Co-authored-by: Filip131311 <Filip.kaminski@swmansion.com>
2026-04-10 11:25:23 +02:00
Ignacy Łątka 4169e30ae9 chore: bump packages to 0.4.0 (#94) 2026-04-08 18:54:17 +02:00
Ignacy Łątka d7a597da32 feat: Publish to NPM privately (#84)
* switch to NPM private registry for @swmansion/argent publishing

* switch publish workflow, constants, and test to npmjs.org registry

* revert publish.yml — deprecated workflow
2026-04-07 19:12:12 +02:00
Ignacy Łątka 445bc044c1 feat: Add update system to Argent (#78)
* feat: add update notification and update-argent tool

Injects an update note into HTTP responses when a newer version of Argent
is available, forwards the note through the MCP server so agents see it
prepended to tool results, and adds an update-argent tool that agents can
call (with explicit user consent) to apply the pending update.

* test: add edge-case tests for update note injection and update-argent tool

* fix: guard update-argent against double-spawn and no-op calls, use argent binary

* feat: auto-suppress update note for 30min after delivery, add dismiss-update tool

* fix: correct npm package name to @software-mansion/argent

* fix: use semver ordering for version comparison, guard double-start, handle response stream errors

* feat: add update notification and update-argent tool

Injects an update note into HTTP responses when a newer version of Argent
is available, forwards the note through the MCP server so agents see it
prepended to tool results, and adds an update-argent tool that agents can
call (with explicit user consent) to apply the pending update.

* test: add edge-case tests for update note injection and update-argent tool

* fix: guard update-argent against double-spawn and no-op calls, use argent binary

* feat: auto-suppress update note for 30min after delivery, add dismiss-update tool

* fix: correct npm package name to @software-mansion/argent

* fix: use semver ordering for version comparison, guard double-start, handle response stream errors

* fix unresolved conflicts

* add yarn to gitignore

* cleanup typecasting

* isolate update note builder

* remove unused import

* fix package name

* change update rate to once per day

* add note against using permanent storage mediums

* update tool descriptions

* fix tests
2026-04-07 17:42:59 +02:00
Filip131311 0253a2e641 chore: add Apache 2.0 license files and mixed-license notices for proprietary binaries 2026-04-03 17:07:32 +02:00
Filip131311 8c2a313c76 chore: format codebase with Prettier
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-03 14:53:58 +02:00
pFornagiel 0da7b47c89 chore: bump packages to 0.3.3 2026-04-01 18:40:46 +02:00
Ignacy Łątka d510363ceb chore: Cleanup unused ServiceDefinition (#51)
* chore: remove unused exported types and interfaces

Remove ServiceDefinition interface, ServiceRuntimeError and
ServiceDisposalError classes from the registry package, and
unexport ContentBlock type from the mcp package — none are
imported or referenced anywhere in the codebase.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

* fix: re-export ContentBlock type for consumer type annotations

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 20:21:30 +02:00
Paweł Fornagiel 2767400cac feat: add run-sequence tool for batching simulator interactions (#55)
* feat: add run-sequence tool for executing multiple simulator interactions sequentially

* Gesture tool family: rename, add pinch/rotate, interpolation (#37)

* feat: add pinch, rotate and interpolateion to gesture

* refactor: rename files, where definitions changed

* refactor: move gesture-custom to utils folder

* docs: clarify normalization of coordinates and distances in gesture tools

* docs: update simulator interaction documentation to emphasize loading tool schemas before first use

* feat: add action sequencing with `run-sequence` tool for batching interactions

* feat: some improvements

* feat: Update auto-screenshot delays and improve documentation for argent MCP tools
2026-03-31 15:58:02 +02:00
pFornagiel 724286bd61 chore: bump to 0.3.0 2026-03-24 10:39:01 +01:00
Stanislaw Bialecki 7cb6e7b457 Ios instruments profiler (#21)
* feat:  rename previous profiler tools to react-profiler

* feat: add ios-instruments profiler with default tracetemplate

* fix: copying Argent.tracetemplate on install

* feat: enhance CPU profiling capabilities in react-profiler and ios-instruments + initial enable re-querying (investigating) the profiler output

* feat: enable analyzing old profiling sessions, enhance profiling tools interoperability

* refactor: stream react profiler data to files instead of runtime aggregate var

* chore: add xml-parser test

* chore: rm clg

* feat: ad ios-instruments timeout

* chore: cleanup reactProfilerAnalyze warning cond

* refactor: ensure not dividing by 0 in profilerCombinedReportTool

* fix: inject react commit-capture hook before startProfiling

* fix: rm main signature from rn framework trace analysis

* chore: writeReport fail

* fix: potential sampleIdx in parseCpuXml

* fix: timeDeltas[i] potentially undefined

* fix: decodeXml amp resolution sequence

* fix: rm rn-profiler skill from local repo

* feat: rename instruments to ios-profiler + improve react session stability
2026-03-19 11:16:22 +01:00
pFornagiel 7e0291bbf7 chore: bump version 2026-03-18 22:29:08 +01:00
pFornagiel cb1cf139c7 chore: bump version 2026-03-17 17:12:31 +01:00
pFornagiel be40ded9aa chore: bump version 2026-03-17 09:25:34 +01:00
pFornagiel f293633c92 chore: bumb version for distinction 2026-03-11 20:11:30 +01:00
pFornagiel 74ec322a70 feat: add more advanced logging on failure 2026-03-11 20:09:08 +01:00
Paweł Fornagiel badf203d57 feat: add timeout system and process killing capabilities (#14)
* feat: add termination

* refactor: refactor how idletimer is used within index and http server

* feat: enhance confirmation message for stopping Metro bundler process
2026-03-11 15:23:38 +01:00
pFornagiel c86378e6c4 feat: change radon-lite references to argent 2026-03-10 17:25:57 +01:00
pFornagiel a5315a8097 fix: update build process to stop getting stale caches 2026-03-10 15:40:50 +01:00
pFornagiel 1d949fda1c Stop tracking registry tsconfig.tsbuildinfo file
The tsconfig.tsbuildinfo file is a generated build artifact and should not be version controlled. It is now properly ignored via .gitignore.

Made-with: Cursor
2026-03-10 11:36:55 +01:00
pFornagiel b9c46da7ab Add console logs tools 2026-03-05 09:57:20 +01:00
Filip131311 430c3dac71 License verification 2026-03-02 11:39:16 +01:00
pFornagiel 4c42cf985a feat: intagrate tools from main 2026-02-27 10:56:44 +01:00
pFornagiel 0431af73bc refactor: refactor code structure for improved readability and maintainability 2026-02-25 17:02:07 +01:00
pFornagiel f4f882bad1 feat: registry integration 2026-02-25 16:35:06 +01:00