diff --git a/apps/antigravity/.antigravity-plugin/plugin.json b/apps/antigravity/.antigravity-plugin/plugin.json new file mode 100644 index 00000000..8c96ebed --- /dev/null +++ b/apps/antigravity/.antigravity-plugin/plugin.json @@ -0,0 +1,32 @@ +{ + "name": "mobile-dev", + "displayName": "Mobile Dev", + "version": "0.1.0", + "description": "Stream iOS and Android devices beside your chat while building, running, or debugging mobile apps. Includes device control (agent-device), native and Metro logs, app storage inspection, and CPU, memory, and FPS performance profiling.", + "logo": "assets/icon.png", + "suggestedPrompts": [ + "Open the iOS simulator or Android emulator beside this chat", + "Read the mobile app logs and help me fix the current error", + "Record CPU, memory, and FPS while I interact with the app" + ], + "author": { + "name": "Callstack", + "email": "hello@callstack.com", + "url": "https://www.callstack.com/" + }, + "homepage": "https://github.com/callstackincubator/codex-mobile-dev-plugin", + "repository": "https://github.com/callstackincubator/codex-mobile-dev-plugin", + "license": "MIT", + "keywords": [ + "mobile", + "ios", + "android", + "react-native", + "expo", + "simulator", + "emulator", + "profiling", + "performance", + "logs" + ] +} diff --git a/apps/antigravity/README.md b/apps/antigravity/README.md new file mode 100644 index 00000000..ad0da691 --- /dev/null +++ b/apps/antigravity/README.md @@ -0,0 +1,54 @@ +# Mobile Dev for Antigravity + +Build, run, and debug iOS and Android apps without leaving Antigravity. Mobile Dev +streams your simulators, emulators, and devices into an Antigravity Auxiliary Pane +(`mobile-dev.device-panel`) beside the chat, and gives Antigravity the tools to +control them, read their logs, inspect your app, and measure its performance. It +works with Expo, React Native, SwiftUI, and other native mobile projects. + +- **Auxiliary Pane device panel:** a live, interactive iOS simulator, Android + emulator, or connected device in the Antigravity side pane, with logs and + performance tools beside it. Antigravity reads the devices you select there and the + logs, screenshots, and notes you add to chat. +- **Device control and inspection:** Antigravity taps, types, scrolls, reads the + accessibility tree, and takes screenshots through the bundled + [agent-device](https://agent-device.dev/) runtime. +- **App control:** install, launch, and stop apps, open deep links, send test pushes, + and set permissions and languages. +- **App Flow:** a visual map of your app's screens and the navigation between them, + read from your Expo Router or React Navigation source and optionally captured by + walking the app on an iOS simulator. +- **Logs:** iOS unified logs, Android logcat, physical iPhone logs, and Metro console + messages. +- **Performance:** CPU, memory, and FPS recordings shown as interactive charts in + chat, which Antigravity can analyze and compare. +- **App storage:** read what your app saved, such as UserDefaults, SharedPreferences, + AsyncStorage, MMKV, and SQLite, without adding code to it. +- **Profile analysis:** TraceSift findings for local CPU and React profiles. + +## Install + +Package the Antigravity extension from this repository and install it with the `agy` CLI: + +```sh +npm run build +npm run package:antigravity +agy plugin install ./release/antigravity-plugin/mobile-dev +``` + +Open the **Mobile Dev** icon in the Antigravity activity bar (Auxiliary Pane) or ask +Antigravity to open your app on a simulator. + +## Requirements + +- An Apple Silicon Mac. +- **Node.js 22.19 or later.** Mobile Dev looks for it on `PATH` and in the usual + Homebrew, nvm, fnm, Nix, Volta, mise, and asdf locations. +- **iOS:** Xcode 26 or later with an installed simulator runtime. Physical iPhone + logs need Xcode 27 or later. +- **Android:** Android SDK platform-tools and emulator, and an AVD or a device with + USB or wireless debugging authorized. + +## License + +MIT. See [LICENSE](LICENSE) and [third-party notices](THIRD_PARTY_NOTICES.md). diff --git a/apps/antigravity/assets/icon.png b/apps/antigravity/assets/icon.png new file mode 100644 index 00000000..ba1d10de Binary files /dev/null and b/apps/antigravity/assets/icon.png differ diff --git a/apps/antigravity/hooks.json b/apps/antigravity/hooks.json new file mode 100644 index 00000000..e10db8bb --- /dev/null +++ b/apps/antigravity/hooks.json @@ -0,0 +1,11 @@ +{ + "mobile-dev-node-check": { + "SessionStart": [ + { + "type": "command", + "command": "/bin/sh ./scripts/launch-node.sh --check", + "timeout": 10 + } + ] + } +} diff --git a/apps/antigravity/mcp_config.json b/apps/antigravity/mcp_config.json new file mode 100644 index 00000000..b8d47d22 --- /dev/null +++ b/apps/antigravity/mcp_config.json @@ -0,0 +1,11 @@ +{ + "mcpServers": { + "mobile-dev": { + "command": "/bin/sh", + "args": [ + "${PLUGIN_ROOT}/scripts/launch-node.sh", + "${PLUGIN_ROOT}/dist/server.mjs" + ] + } + } +} diff --git a/apps/antigravity/package.json b/apps/antigravity/package.json new file mode 100644 index 00000000..b113e3d2 --- /dev/null +++ b/apps/antigravity/package.json @@ -0,0 +1,7 @@ +{ + "name": "@mobile-dev/antigravity", + "version": "0.0.0", + "private": true, + "type": "module", + "description": "Antigravity: the Antigravity extension manifest and Auxiliary Pane sidecar for the shared server and MCP Apps panel." +} diff --git a/apps/antigravity/plugin-host.json b/apps/antigravity/plugin-host.json new file mode 100644 index 00000000..27e91cfc --- /dev/null +++ b/apps/antigravity/plugin-host.json @@ -0,0 +1,25 @@ +{ + "label": "Antigravity", + "manifest": ".antigravity-plugin", + "mcpConfig": "mcp_config.json", + "hooks": "hooks.json", + "root": "PLUGIN_ROOT", + "config": { + "file": "antigravity-mcp-config.json", + "target": "~/.gemini/antigravity/mcp_config.json" + }, + "panelRuntime": "download", + "build": "tooling/build.mjs", + "skills": [ + "skills/mobile-dev", + "../../packages/skills/agent-device" + ], + "folders": [ + "scripts", + "sidecars", + "mcp_config.json", + "hooks.json" + ], + "readme": "README.md", + "maxFileBytes": 5242880 +} diff --git a/apps/antigravity/scripts/launch-node.sh b/apps/antigravity/scripts/launch-node.sh new file mode 100755 index 00000000..62b819ce --- /dev/null +++ b/apps/antigravity/scripts/launch-node.sh @@ -0,0 +1,44 @@ +#!/bin/sh +# Runs Mobile Dev with Node.js 22.19 or later. +# launch-node.sh