Commit Graph

29 Commits

Author SHA1 Message Date
Ignacy Łątka 1d6faa5047 fix(windows-ci): move fail-closed assertion to a real script
The previous heredoc-into-temp-file approach broke `require('./...')`
because Node resolves relative paths against the temp file's location
(under `C:\Users\runneradmin\AppData\Local\Temp\`), not against the
runner's working directory — so the require for
`./packages/native-devtools-ios/dist/index.js` always errored with
MODULE_NOT_FOUND on Windows CI even though the resolver itself was
correctly fail-closed.

Switch to a dedicated `scripts/assert-windows-fails-closed.cjs` that
resolves paths via `path.resolve(__dirname, ..., ...)` so the require
target is unambiguous regardless of cwd. Also short-circuits with a
"skipped" message on non-Windows so the same script is safe to invoke
from a future cross-platform CI matrix.
2026-05-06 18:27:20 +02:00
Ignacy Łątka d28c49070b fix(windows): stop shipping vanilla simulator-server for Windows/Linux
The macOS argent simulator-server build deliberately strips the streaming
surface (no `stream_ready` protocol message, codec/encoder count down 30%
vs the vanilla macOS build). Upstream `radon-main` only publishes the
`-argent-` variant for macOS — `simulator-server-windows.exe` and
`simulator-server-linux` in the same release are vanilla.

The previous shape of this branch shipped the vanilla Windows / Linux
binaries inside `@swmansion/argent`, which would have given non-mac
users a streaming surface the macOS build deliberately suppresses —
feature-parity divergence and an IP / licensing concern. Fixing.

Changes:
- scripts/download-simulator-server.cjs: only fetch
  `simulator-server-argent-macos`. The block comment at the top of the
  file documents the rationale and the two-line edit needed to flip
  Windows / Linux on once upstream argent-windows / argent-linux exist.
- packages/argent/scripts/bundle-tools.cjs: SIMULATOR_SERVER_BINARIES
  collapsed to `["simulator-server"]`. Same rationale + same flip-on
  recipe.
- The runtime resolver in @argent/native-devtools-ios already branches
  on process.platform; on Windows / Linux it now throws "binary not
  found" — the correct fail-closed behavior.
- .github/workflows/windows-e2e.yml:
    * Replaced "Verify simulator-server.exe is bundled and executable"
      with two assertions: (1) the bundle does NOT contain
      `simulator-server.exe` (regression guard against accidentally
      re-shipping the vanilla binary), and (2) `simulatorServerBinaryPath()`
      throws on Windows so silent feature drift can't hide as a passing
      simulator path.
    * windows-android-e2e job is `if: false` (was workflow_dispatch).
      Two blockers: no Windows binary, and hosted runner Android
      emulators stall past 20 min anyway. The
      `scripts/windows-e2e.cjs` driver is still maintained for local
      VM use.
- docs/windows-support.md rewritten: "code-complete but binary-blocked"
  with the upstream asset table, the precise unblock recipe, and the
  fail-closed runtime behavior on Windows / Linux today.
2026-05-06 18:23:49 +02:00
Ignacy Łątka f4d486db49 fix(windows): make tests + Android E2E job pass on windows-latest
Triggered first Windows-CI run on the branch and fixed every regression it
surfaced:

Tests (POSIX-only assertions → cross-platform):
- argent-installer/test/mcp-configs.test.ts: Zed adapter test now picks
  the platform-correct expected path (AppData on Windows, ~/.config
  elsewhere) — mirrors the source change.
- argent-installer/test/mcp-configs.test.ts: getManagedContentTargets
  expectations rebuilt via path.join + path.sep so labels round-trip on
  both `\` and `/` separators (path.join produces native separators).
- argent-installer/test/utils.test.ts: skill-lock paths use path.join +
  os.tmpdir instead of literal `/some/project` and `/tmp/xdg`.
- tool-server/test/debugger/log-file-writer.test.ts +
  tool-server/test/debugger/log-registry.test.ts: regex character classes
  accept `\` or `/` between path segments.
- tool-server/test/native-devtools-env.test.ts: skip the entire suite on
  Windows. The module under test parses macOS DYLD_INSERT_LIBRARIES (a
  colon-separated path list); Windows drive letters (C:\…) collide with
  the colon separator, so a Windows tmp path can't round-trip through it.
  Production code is gated to iOS device dispatch, so the skip is honest.

Workflow:
- windows-e2e.yml: append $ANDROID_HOME/{emulator,platform-tools,
  cmdline-tools/latest/bin} to PATH after `setup-android` so bare
  `emulator`/`avdmanager`/`adb` calls resolve. setup-android sets
  ANDROID_HOME but doesn't touch PATH on Windows.
- windows-e2e.yml: don't fail the job when accel-check exits non-zero;
  TCG fallback still works, just slower.
2026-05-06 17:15:32 +02:00
Ignacy Łątka 67d7271d69 feat(windows): port argent build + tool-server to Windows for Android-only flows
Stacks on top of feat/android-emulator-support, since Windows is Android-only:
iOS support is fundamentally mac-bound (DYLD_INSERT_LIBRARIES, xcrun, simctl,
dylib injection) and stays mac-only behind the platform dispatcher.

Build pipeline
- Replace bash download scripts with Node CJS scripts (cross-platform).
- Download all three simulator-server binaries (argent-macos, vanilla
  windows.exe, vanilla linux) on every pack so the npm package is
  platform-agnostic. The runtime resolver picks the right filename by
  process.platform.
- Replace `rm -rf dist tsconfig.tsbuildinfo && tsc` with `tsc -b --clean &&
  tsc -b` in every package — portable, no shell-isms.
- Replace `cp src/.../Argent.tracetemplate dist/...` in tool-server build
  with a tiny Node script.

Runtime
- @argent/native-devtools-ios picks `simulator-server.exe` on Windows;
  ax-service is gated to darwin (iOS-only daemon).
- check-deps.ts and android-binary.ts use `where` on Windows instead of
  `/bin/sh -c 'command -v X'` — `/bin/sh` doesn't exist on Windows.
- android-binary.ts looks for `adb.exe` / `emulator.exe` under
  `$ANDROID_HOME` on Windows, bare names elsewhere.
- stop-metro.ts uses `netstat -ano -p TCP` on Windows; `lsof -ti tcp:port`
  elsewhere. Parses LISTENING rows by port.
- update-argent.ts spawns `argent.cmd` with `shell: true` on Windows so
  npm shims resolve via PATHEXT.
- launcher.ts falls back to `nul` instead of `/dev/null` on Windows when
  the log dir is unwritable.
- argent-simulator-server bin entry now points at a tiny Node wrapper
  that exec's the right native binary per platform; npm-shim generation
  works correctly on Windows since the wrapper is a Node script.

Installer
- Zed adapter writes `%APPDATA%\Zed\settings.json` on Windows, not
  `~/.config/zed/settings.json`. Other adapters' homedir-relative paths
  resolve correctly via path.join + os.homedir.

CI + docs
- New .github/workflows/windows-e2e.yml: a fast build+CLI smoke job that
  runs on every push, plus a heavier Android-emulator E2E job (boots an
  AVD on windows-latest, runs scripts/windows-e2e.cjs against it, calls
  list-devices / screenshot / stop-all-simulator-servers) gated to the
  windows-support branch.
- docs/windows-support.md documents the architecture, the package
  layout, supported IDE config paths, and how to verify locally via UTM
  or Parallels when the CI loop isn't tight enough.
2026-05-06 17:04:58 +02:00
filip131311 6355620c4d refactor(mcp): split mcp package into argent, argent-cli, argent-installer, argent-mcp, argent-tools-client (#162)
## Summary

- Splits the monolithic `packages/mcp` package into five focused
packages:
- `argent` — the user-facing CLI entry (`argent` binary,
init/uninstall/update flows, bundled-paths, scripts).
- `argent-cli` — CLI runner internals (flag-parser, run, server, tools).
- `argent-installer` — `init`/`update`/`uninstall` flows, MCP config
adapters, skills installer.
- `argent-mcp` — MCP server itself (mcp-server, tool-mapping,
auto-screenshot, content adapters).
  - `argent-tools-client` — HTTP client + launcher for the tool-server.
- Adds Gemini agent definitions, VSCode MCP config, and per-package
`tsconfig.json` / `vitest.config.ts`.
- Updates root `tsconfig.json`, `scripts/dev.cjs`, CI workflows, and
`package.json` to wire the new packages together.

## Test plan

- [ ] `npm install` resolves the new workspaces cleanly
- [ ] `npm run build` succeeds across all packages
- [ ] `npm test` passes (renamed test files keep their assertions)
- [ ] `npx argent init` still produces the expected MCP config in a
sample project
- [ ] `npx argent update` / `argent uninstall` exercise the installer
package
- [ ] CI workflows (`publish.yml`, `unit-tests.yml`) run on this branch
2026-04-28 08:36: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
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 ea99e945f8 fix: default download:native-binaries tag to argent-main 2026-04-16 00:17:59 +02:00
filip131311 7db8305fff feat: pin native binaries to versioned release tags and publish to npm (#125)
- download-native-binaries.sh now requires an explicit release tag (e.g.
  argent-v0.4.3) and fails fast with a clear error if the release doesn't
  exist in argent-private-releases
- publish.yml is now manual-only (workflow_dispatch) with a ref input
  (branch/tag/SHA); derives the binaries tag as argent-{ref} and checks
  out the repo at that ref
- publish.yml now targets npm (registry.npmjs.org + NPM_TOKEN) instead
  of GitHub Packages
- download:native-binaries npm script auto-derives the tag from
  packages/mcp/package.json version for local pack:mcp usage
2026-04-15 16:26:55 +02:00
Filip131311 f30948fe46 feat: download native binaries from argent-private-releases instead of building locally 2026-04-15 11:41:10 +02:00
Filip131311 d082ea2fd2 feat: download simulator server 2026-04-14 15:09:58 +02:00
Filip131311 faf6911801 Fix: removeing other dylibs injected into the simulator (simCam compatibility) 2026-04-10 16:38:55 +02:00
Paweł Fornagiel 167ccf409d fix: move simulator-server binary to native-devtools-ios and fix esbuild bundling (#82)
* chore: update simulator-server path references across documentation and scripts

* feat: add native-devtools-ios entry to bundle-tools script
2026-04-07 18:25:48 +02:00
filip131311 d9dc17d0d5 fix: move describe to native devtools (#83)
* fix: move describe to native devtools

Replace the AX describe path with an app-scoped native hierarchy adapter so coordinate discovery stays on the supported injection flow.
Also add safer targeting and restart guidance to reduce ambiguous Home and cold-start recovery paths.

Made-with: Cursor

* init

* update sim server

* Delete NATIVE_DEVTOOLS_DESCRIBE_MIGRATION_NOTE.md
2026-04-07 17:36:56 +02:00
Filip131311 4e514c1435 chore: rename package from @software-mansion/argent to @swmansion/argent 2026-04-03 17:16:39 +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
Filip131311 47b66b3eed feat: add native devtools iOS — view hierarchy, network inspection, passive simulator watcher
- Adds native-devtools-ios package with pre-built dylibs (libNativeDevtoolsIos, libKeyboardPatch, libInjectionBootstrap)
- Passive simulator watcher injects dylibs into all booted simulators on tool-server startup, eliminating manual restart requirement
- Lazy network activation: NSURLProtocol interception is opt-in per bundleId via Control socket command, re-activated on reconnect
- New tools: native-find-views, native-full-hierarchy, native-network-logs, native-devtools-status
- dev script: non-fatal argent-private submodule (uses pre-built dylibs when source unavailable)
- Adds Prettier config and format script
- Updates CONTRIBUTING.md with npm run dev workflow and project structure

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-03 14:53:45 +02:00
Filip131311 d4b4ebfdee chore: move native-devtools-ios ObjC source to argent-private submodule
- Add argent-private as git submodule at packages/argent-private
- Remove Sources/ from packages/native-devtools-ios (now in submodule)
- Update build.sh to resolve SRC_DIR from submodule path with clear
  error message if submodule is not initialised
- Update scripts/dev.cjs to run git submodule update --init before
  building dylibs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-03 14:53:32 +02:00
filip131311 2ba7ab6bba feat: add dev mode script for local development without packing (#72)
Adds `npm run dev` which:
- Builds MCP TypeScript (tsc only, skips esbuild tool-server bundle)
- Copies simulator-server binary and skills/rules/agents into mcp package
- Patches ~/.claude.json to point argent MCP at the local dist/cli.js
- Starts tool-server from source via ts-node, writes ~/.argent/tool-server.json
- On exit: restores ~/.claude.json and stops the tool-server
2026-04-02 13:02:45 +02:00
Ignacy Łątka 511b857cb6 ci: add MCP tool and SKILL description quality checks (#67)
* ci: add description quality workflow for tools and skills

Adds a GitHub Actions workflow that gates PRs on tool description quality
using SpiderShield (threshold 3.0/10 against current 3.3 baseline) and
informally grades skill SKILL.md frontmatter with a self-contained Node.js
grader. Includes extract-tools.mjs for converting ToolDefinition objects to
MCP tools/list JSON and grade-skills.mjs for scoring skill files.

* ci: fix profiler skill description and enforce 10.0 skill quality gate

* ci: split description quality into two separate scoped workflows

* ci: raise tool description quality gate to 10.0
2026-04-01 20:43:02 +02:00
Paweł Fornagiel 60eaf83979 chore: clean up repository docs and deprecated files (#64)
* docs: update installation guide to streamline setup process and add local tarball installation instructions

* docs: remove INSTALL.md and RELEASING.md, update CONTRIBUTING.md to streamline release process, and adjust README.md to reflect changes

* chore: remove unused agentic files

* chore: remove deprecated configuration and script files, add new setup-in-workspace script for argent installation
2026-04-01 18:37:29 +02:00
Paweł Fornagiel 85ef733835 refactor: rename RADON references to ARGENT across the codebase (#56)
* refactor: rename RADON references to ARGENT across the codebase

* Merge main into branch and complete ARGENT rename in new files

Merges main's changes: modular CLI architecture, UI package deprecation,
db tool removal, skills/agents prefix rename, and MCP server consolidation.
Extends the RADON→ARGENT rename to cover new files introduced in main
(ARGENT_MCP_LOG, ARGENT_TOOLS_URL env vars, argent-skills bin).

Made-with: Cursor

* fix: rename RADON_MCP_LOG in observe.cjs, regenerate lockfile for argent-skills bin

Made-with: Cursor

* chore: remove accidental PUBLIC_RELEASE_AUDIT.md
2026-03-31 17:24:51 +02:00
Paweł Fornagiel d2d0da8bdd feat: improved npx CLI with modular architecture, ASCII banner, and docs (#42)
* feat: first improved CLI implementation

* feat: add ASCII banner to `argent init` and installation guide

Add a gradient ASCII art banner displayed at the start of `argent init`.
Add docs/install-guide.md with concise instructions for installing from
the GitHub Packages registry (including PAT generation) and from a local
tarball.

Made-with: Cursor

* refactor: update ASCII banner in `init.ts` for improved aesthetics
2026-03-27 19:12:05 +01:00
Paweł Fornagiel f0044422fd feat: add killArgentProcesses utility for managing running processes (#40) 2026-03-24 10:37:54 +01:00
Paweł Fornagiel 0bbd8ff7d6 feat: add rules support and enhance postinstall script for Argent tools (#23) 2026-03-16 19:26:21 +01:00
Ignacy Łątka 3970690330 reinstallation to script 2026-03-11 22:04:56 +01:00
pFornagiel db9c4d761a feat: add scripts and launch.json for installling argent 2026-03-11 16:09:48 +01:00
pFornagiel 908924866b feat: add launch.json, tasks.json and setup scripts for development in workspace of choice 2026-03-11 10:19:56 +01:00