@ory/antigravity 0.11.0 → 0.12.0

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/README.md CHANGED
@@ -1,113 +1,99 @@
1
1
  # Ory Agent Plugin: Google Antigravity
2
2
 
3
- [Ory](https://ory.com) bundled into [Google Antigravity](https://antigravity.google): skills and slash commands that scaffold Ory authentication into your codebase, a local Ory stack you can spin up in one command, and (when pointed at an Ory project) authentication, authorization, and audit for every tool Antigravity's agent runs.
3
+ Security and developer experience for [Google Antigravity](https://antigravity.google), powered by [Ory](https://ory.com).
4
4
 
5
- You don't need an Ory account or any prior Ory experience to start.
5
+ **Security.** Antigravity runs real actions on your machine — editing files, running shell commands, calling APIs. The plugin gives every session a verifiable identity (you sign in once; Antigravity and any sub-agents it spawns each get their own), checks every tool call against permissions you control, and records each decision as an audit trace you can ship to your observability stack. It starts in watch mode so nothing is blocked on day one, and if Ory is ever unreachable it steps aside rather than locking you out.
6
6
 
7
- > **Antigravity is the successor to Gemini CLI.** If you used the Ory Gemini CLI extension, this is its counterpart for the `agy` CLI and the Antigravity IDE. Your existing skills and commands carry over.
8
-
9
- ## New to Ory?
10
-
11
- [Ory](https://www.ory.com/docs/) is an open-source identity and access platform — it provides login, registration, sessions, social sign-in, multi-factor auth, and fine-grained permissions, so you don't have to build any of that yourself. Two things make it easy to try with no prior experience:
12
-
13
- - **Ory Elements** are prebuilt, themeable UI components for the auth pages (login, registration, recovery, settings). The scaffolding skills wire them into your app for you.
14
- - **The local Ory stack** is a complete Ory running on your laptop in Docker — no account, no signup, no API key. Everything in the Quickstart below works against it, fully offline.
7
+ **Developer experience.** A single command installs the plugin and walks you through connecting — choose Ory Network, a local Docker stack, or audit-only, and it wires up the project, sign-in client, login, and permissions for you. It also helps you build Ory into your own app: ask in plain language to scaffold login, registration, and recovery pages, run a local Ory, or manage identities and permissions through the bundled MCP server.
15
8
 
16
- This plugin does two independent things, and you can use either on its own:
17
-
18
- 1. **Build auth into your app.** Have Antigravity scaffold Ory login, registration, social sign-in, and permissions into the project you're working on, backed by the local stack. This is the Quickstart below — it needs nothing but Docker.
19
- 2. **Govern the agent itself.** Authenticate the agent's session and authorize every tool it runs against Ory Permissions, with a full audit trail. See [Agent security](#agent-security).
20
-
21
- If you're just exploring, do the Quickstart first.
9
+ > **Antigravity is the successor to Gemini CLI.** If you used the Ory Gemini CLI extension, this is its counterpart for the `agy` CLI and the Antigravity IDE. Your existing skills and commands carry over.
22
10
 
23
- ## Prerequisites
11
+ ## What you'll need
24
12
 
25
13
  - [Google Antigravity](https://antigravity.google) installed (the `agy` CLI and/or the IDE)
26
- - Node.js **≥ 22**
27
- - [Docker](https://docs.docker.com/get-docker/) (only needed for the local Ory stack)
28
- - macOS or Linux. Windows works via WSL2.
14
+ - Node.js **22 or newer**
15
+ - [Docker](https://docs.docker.com/get-docker/) only if you want to run Ory locally
16
+ - macOS or Linux (Windows works via WSL2)
29
17
 
30
- ## Install
18
+ ## Get started
19
+
20
+ Run one command. It installs the plugin (registering it with Antigravity via `agy plugin install`) and walks you through connecting:
31
21
 
32
22
  ```bash
33
23
  npx -y -p @ory/antigravity ory-antigravity install
34
24
  ```
35
25
 
36
- This materializes the Ory plugin bundle (skills, commands, hooks, and MCP server) and registers it with Antigravity via `agy plugin install`. Then confirm everything landed:
26
+ You'll be asked how you want to connect **press Enter for the default**:
27
+
28
+ - **Ory Network** *(default)* — sign in, or create a free account, in your browser. The project, keys, permissions, and login are all set up for you. Nothing to configure by hand.
29
+ - **Local** — run a complete Ory on your laptop with Docker. No account, no signup, no keys. Great for trying it out.
30
+ - **Audit-only** — skip Ory entirely and just log what the agent does.
31
+
32
+ That's it. Confirm everything landed with:
37
33
 
38
34
  ```bash
39
35
  npx -y -p @ory/antigravity ory-antigravity status
40
36
  ```
41
37
 
42
- `status` is the single source of truth it prints configuration, user and agent identity, per-tool permission coverage, plugin + skill registration, and a tail of recent debug logs. Unconfigured fields show inline as `(unset)`.
38
+ `status` is your one-stop check: what's configured, who's signed in, which tools are covered by permissions, plugin + skill registration, and recent activity. Anything not set up yet shows as `(unset)`.
39
+
40
+ Re-run install with `--reconfigure` to change your connection later, or `--no-configure` to skip the wizard and configure by hand.
43
41
 
44
42
  <details>
45
- <summary>Alternative install paths</summary>
43
+ <summary>No <code>agy</code> binary? Install into <code>.agents/</code> directly</summary>
44
+
45
+ If the `agy` binary isn't on your `PATH`, `ory-antigravity-setup` writes the plugin bundle straight into your project's `.agents/` directory (`plugin.json`, `hooks.json`, `mcp_config.json`, `skills/`, `commands/`). Because `.agents/` is shared with your own configuration, setup merges rather than overwrites — it only touches Ory-owned entries and leaves your hook rules and MCP servers intact. Uninstall is the mirror image: it removes only the Ory entries.
46
46
 
47
47
  ```bash
48
+ npx -y -p @ory/antigravity ory-antigravity-setup [--project-dir <path>]
48
49
  npx -y -p @ory/antigravity ory-antigravity uninstall
49
50
  ```
50
51
 
51
- If the `agy` binary isn't on your `PATH`, `npx -y -p @ory/antigravity ory-antigravity-setup` writes the plugin bundle directly into your project's `.agents/` directory (`plugin.json`, `hooks.json`, `mcp_config.json`, `skills/`, `commands/`). Because `.agents/` is shared with your own configuration, the setup merges rather than overwrites: it only sets or replaces the Ory-owned entries in `hooks.json` and `mcp_config.json`, leaving your hook rules and MCP servers intact, and it never touches a `plugin.json` that isn't Ory's own. Uninstall is the mirror image — it removes only the Ory-owned entries and deletes a file only once nothing else is left in it.
52
-
53
52
  </details>
54
53
 
55
- ## Quickstart (≈ 3 minutes)
54
+ ## What you get
56
55
 
57
- From any project where you'd like Ory authentication, inside Antigravity:
56
+ Once connected, every tool the agent runs is governed by Ory three things happen automatically:
58
57
 
59
- 1. **Start a local Ory instance.** Ask Antigravity *"start the local Ory stack"* or run:
58
+ - **Who's driving.** You sign in once in your browser (a secure sign-in flow, no tokens to copy around); the agent process gets its own identity, which it registers itself automatically on first run. The "who acted on whose behalf" trail stays queryable later.
59
+ - **What it's allowed to do.** Before a tool runs, Ory checks whether it's permitted. It starts in **watch mode** — nothing is blocked, you just *see* what would be — so it never gets in your way on day one.
60
+ - **A record of everything.** Every decision (allowed, denied, skipped) is logged as a trace you can send to Jaeger, Honeycomb, Grafana, or just a file.
60
61
 
61
- ```
62
- /ory:local-up
63
- ```
62
+ The plugin hooks into these Antigravity lifecycle events: `SessionStart` (check who's signed in), `PreToolUse` (authorize the tool), `PostToolUse` (record it), `Notification`, and `SessionEnd`.
64
63
 
65
- A banner prints the seeded test user's email and password. Note them you'll log in with them in step 3.
64
+ > **A note on how Antigravity blocks.** Antigravity blocks a tool unless the plugin explicitly says "allow" — so a crash, timeout, or missing answer *blocks* the tool. That's the opposite of most harnesses. To keep Ory from ever getting in your way, the plugin **always allows on any internal or network error**, so a transient Ory outage never wedges your tools. The practical upshot: enforcement is only as strong as your permission grants, so grant each user the tools they should be able to run.
66
65
 
67
- 2. **Scaffold Ory into your project.** Ask Antigravity *"add Ory auth to this app"* or invoke the `ory-auth-setup` skill.
66
+ ### See what's happening
68
67
 
69
- Antigravity installs Ory Elements, wires the SDK, generates the login / registration / recovery / verification / settings pages, and sets up session middleware. It targets the local stack from step 1, so no signup or API key is needed.
68
+ Everything the plugin does is observable out of the box no configuration required:
70
69
 
71
- 3. **Sign in.** Start your app, visit the login page Antigravity added, and sign in with the seeded credentials. You now have a real Ory session backed by a real Ory stack — locally, offline, with zero configuration.
70
+ - **Status at a glance.** `npx -y -p @ory/antigravity ory-antigravity status` shows what's configured, who's signed in, how many built-in tools your permissions cover, and the most recent tool-call activity.
71
+ - **Live traces.** Every tool call is recorded as an OpenTelemetry-style span. Watch them stream as the agent works:
72
72
 
73
- 4. **Turn on Ory login for the agent session itself.** *(Optional but recommended.)* Out of the box the plugin only governs your *app*. To also attach an Ory identity to the *agent's* session — so every tool call is attributed to you, not a fallback `session:<id>` subject — opt in to the user-login flow:
73
+ ```bash
74
+ npx -y -p @ory/antigravity ory-antigravity watch
75
+ ```
74
76
 
75
- ```bash
76
- export ORY_USER_LOGIN=true
77
- export ORY_OAUTH2_CLIENT_ID=<value printed by `local up`>
78
- ```
77
+ Spans are also written to `~/.config/ory-agent-plugins/antigravity/ory-agent-trace.ndjson` (NDJSON, one span per line) — tail that file, or point `OTEL_EXPORTER_OTLP_ENDPOINT` at a collector to ship them straight to Jaeger, Honeycomb, or Grafana.
78
+ - **Debug log.** For a verbose play-by-play, set `ORY_AGENT_DEBUG=true`; structured logs land in `~/.config/ory-agent-plugins/antigravity/ory-agent-debug.log`.
79
79
 
80
- User login is off by default. Both exports above are printed in the `local up` banner — copy them straight from there. `ORY_OAUTH2_CLIENT_ID` is required whenever `ORY_USER_LOGIN` is on: it identifies the public OAuth2 client the PKCE browser flow exchanges for a token. With both set, the next session opens an Ory login in your browser; sign in with the same seeded credentials from step 1, and the token is reused on subsequent sessions until it expires. This is what makes `permissions enforce` (see [Agent security](#agent-security)) deny on the right identity later.
80
+ ### Ready to enforce?
81
81
 
82
- That's the full Ory DX path. Stop here if you're just evaluating the plugin. Continue to [Agent security](#agent-security) when you're ready to enforce.
82
+ When the watch-mode logs look right, turn on blocking with one command (setup already granted you the built-in tools):
83
83
 
84
- ## What's included
85
-
86
- ### Skills for scaffolding Ory into your application
87
-
88
- The plugin bundles a catalog of skills that Antigravity auto-invokes by description. Ask in natural language or invoke a skill directly:
89
-
90
- **Start here — add Ory auth to your app:**
91
-
92
- - **`ory-auth-setup`** — full project setup. Install the Ory CLI, create an Ory Network project (or use the local one), add Ory Elements, configure the SDK, build the auth pages, wire session middleware.
93
- - **`ory-login-flow`** — login, registration, recovery, verification, and settings pages with Ory Elements. Next.js App Router and React SPA variants.
94
- - **`ory-social-login`** — Google, GitHub, Apple, Microsoft, Discord, and other OIDC providers with Jsonnet data mappers.
95
- - **`ory-local-dev`** — drive the local Ory stack from within Antigravity to prototype and test without a remote project.
84
+ ```bash
85
+ npx -y -p @ory/antigravity ory-antigravity permissions enforce
86
+ ```
96
87
 
97
- **Going further:**
88
+ Now a denied tool is actually blocked and Antigravity shows why (the `deny_reason`). Go back to watch mode anytime with `permissions observe`. Use `permissions status` to see what's covered and `permissions bootstrap` to (re-)grant the built-in tools (`run_command`, `view_file`, `write_to_file`, …) — or add permissions for MCP-server tools by hand, or via the Ory MCP server right from inside Antigravity.
98
89
 
99
- - **`ory-permissions-onboarding`** bootstrap permissions for built-in tools, switch between observe and enforce mode, troubleshoot denials.
100
- - **`ory-build-integration`** — pull the runnable subset of an `ory/integrates` template (webhook / config / http-event) into your own app and wire it to your Ory project.
101
- - **`ory-contribute-integration`** — author a brand-new integration as a contribution to `ory/integrates`.
102
- - **`ory-e2b-sandbox`** — scaffold an [E2B](https://e2b.dev) sandbox template that boots with this plugin preinstalled and registered.
103
- - **`ory-build-agent`** — drop `@ory/argus` directly into a custom agent you own (Claude Agent SDK, OpenAI Agents SDK, Mastra, Vercel AI SDK, PydanticAI, LangGraph, Mistral AI, or Salesforce Agentforce).
104
- - **`ory-temporal-worker`** — scaffold a [Temporal](https://temporal.io) TypeScript worker with every Activity gated by an Ory permission check.
90
+ ## Also: add login to your own app
105
91
 
106
- ### Ory MCP server
92
+ Beyond securing the agent, the plugin helps you build Ory into whatever you're working on. Ask Antigravity *"add Ory login to this app"* (or invoke the `ory-auth-setup` skill) and it scaffolds the login, registration, recovery, and settings pages (using [Ory Elements](https://github.com/ory/elements)) wired to a local Ory — no signup or keys needed. Start that local Ory with `/ory:local-up` (it prints a test email + password to sign in with) and tear it down with `/ory:local-down`.
107
93
 
108
- Bundled and registered automatically via `mcp_config.json`. Exposes the Ory CLI and the Ory Network REST API as MCP tools so the agent can manage identities, OAuth2 clients, projects, permissions, and configuration without ever leaving the chat.
94
+ Bundled **skills** (just ask in plain language) cover more: `ory-auth-setup`, `ory-login-flow`, `ory-social-login` (Google, GitHub, Apple…), `ory-permissions-onboarding`, and playbooks for wiring Ory into your own agents, E2B sandboxes, or Temporal workers. A built-in **Ory MCP server** lets the agent manage identities, projects, and permissions straight from chat.
109
95
 
110
- ### Local Ory stack
96
+ The local Ory runs entirely on your laptop:
111
97
 
112
98
  ```
113
99
  /ory:local-up # start a local Ory instance in Docker
@@ -115,46 +101,25 @@ Bundled and registered automatically via `mcp_config.json`. Exposes the Ory CLI
115
101
  /ory:temporal-up # start a local Temporal dev server (for ory-temporal-worker)
116
102
  ```
117
103
 
118
- `local-up` runs a complete Ory on your laptop: the Ory APIs (Identities, OAuth2, Permissions) at `http://localhost:4000`, a login UI on `:4455` (not :3000, to avoid Next.js port conflicts), and Jaeger (the trace viewer) on `:16686`. A test user identity is seeded and its credentials are printed for you.
104
+ `local-up` brings up the Ory APIs (Identities, OAuth2, Permissions) at `http://localhost:4000`, a login UI on `:4455` (not `:3000`, to dodge Next.js port clashes), and Jaeger (the trace viewer) on `:16686`. A test user is seeded and its credentials printed learn Ory hands-on, prototype flows, and test end-to-end, all offline.
119
105
 
120
- ## Pointing at a real Ory project
106
+ ## Configure by hand (CI / advanced)
121
107
 
122
- The Quickstart uses the local stack. If you have a hosted [Ory Network](https://console.ory.sh) project, point the plugin at it with a single configure command. **The plugin requires `--oauth2-client-id` whenever `--project-url` is provided** register the client first (see [Register the user OAuth2 client](#register-the-user-oauth2-client)), then run:
108
+ The guided setup covers most people. For scripted or CI setups, or to point at an existing Ory Network project, configure directly. Settings are saved to `~/.config/ory-agent-plugins/config.json` and shared across all your Ory agent plugins; environment variables win when both are set.
123
109
 
124
110
  ```bash
125
111
  npx -y -p @ory/antigravity ory-antigravity configure \
126
- --project-url https://<id>.projects.oryapis.com \
127
- --oauth2-client-id <public OAuth2 client id>
112
+ --project-url https://<slug>.projects.oryapis.com \
113
+ --oauth2-client-id <login client id> \
114
+ --user-login
128
115
  ```
129
116
 
130
- - **`--project-url`** points the plugin at your project. The **agent identity** (machine credentials for the agent's outgoing Ory API calls) is created automatically on first run via OAuth2 Dynamic Client Registration ([RFC 7591](https://datatracker.ietf.org/doc/html/rfc7591)) no manual step required.
131
- - **`--oauth2-client-id`** is required because the **user** PKCE browser flow (triggered by `ORY_USER_LOGIN=true`) cannot self-register. See [Register the user OAuth2 client](#register-the-user-oauth2-client).
132
- - **`--api-key ory_pat_...`** is optional — pass it only to override the auto-registered agent identity with a static personal access token.
133
-
134
- If you only want audit logging (no auth or permission checks), substitute `--audit-only`:
135
-
136
- ```bash
137
- npx -y -p @ory/antigravity ory-antigravity configure --audit-only
138
- ```
139
-
140
- The same settings can be supplied via environment variables (`ORY_PROJECT_URL`, `ORY_OAUTH2_CLIENT_ID`, `ORY_AGENT_API_KEY`) — env vars take precedence over the config file when both are set.
141
-
142
- Config is saved to `~/.config/ory-agent-plugins/config.json` and shared across every Ory agent plugin on the machine.
117
+ The agent's own identity registers itself automatically on first run — nothing to create. The `--oauth2-client-id` is the one piece browser sign-in needs; the guided setup makes it for you, or see below to do it by hand. For logging-only with no checks, use `--audit-only`. The matching env vars are `ORY_PROJECT_URL`, `ORY_OAUTH2_CLIENT_ID`, `ORY_USER_LOGIN`, and `ORY_AGENT_API_KEY`.
143
118
 
144
- Without configuration the plugin still loads cleanly and runs in **pass-through mode**: skills and commands work, but nothing is blocked.
145
-
146
- ### Register the user OAuth2 client
147
-
148
- If you plan to turn on `ORY_USER_LOGIN=true` (recommended), your hosted Ory project needs a **public** OAuth2 client (no client secret) registered ahead of time. The local stack provisions this for you automatically; against a hosted project you register it once yourself.
149
-
150
- The client must list **all four** loopback ports as redirect URIs:
151
-
152
- - `http://127.0.0.1:47823/callback`
153
- - `http://127.0.0.1:47824/callback`
154
- - `http://127.0.0.1:47825/callback`
155
- - `http://127.0.0.1:47826/callback`
119
+ <details>
120
+ <summary>Create the sign-in client by hand</summary>
156
121
 
157
- The plugin walks the four ports at runtime so login survives any one of them being occupied. Create the client with the [Ory CLI](https://www.ory.com/docs/guides/cli/installation):
122
+ The guided setup normally does this. To do it yourself, create a **public** OAuth2 client (no secret) listing all four loopback URLs — the plugin tries each in turn so sign-in survives a busy port:
158
123
 
159
124
  ```bash
160
125
  ory create oauth2-client --project <project-id> \
@@ -169,76 +134,38 @@ ory create oauth2-client --project <project-id> \
169
134
  --redirect-uri http://127.0.0.1:47826/callback
170
135
  ```
171
136
 
172
- …then persist the issued id with `configure --oauth2-client-id`, or set `ORY_OAUTH2_CLIENT_ID` in the environment alongside `ORY_USER_LOGIN`. Headless / CI runs that already hold a session token can skip this by setting `ORY_USER_SESSION_TOKEN` instead.
173
-
174
- ## Agent security
175
-
176
- Once the plugin is pointed at an Ory project (local or hosted), the agent's session and every tool call can be governed by Ory.
177
-
178
- - **Authentication.** Two identities. The human at the keyboard (the **user**) authenticates interactively via Ory Identities when user login is enabled (`ORY_USER_LOGIN=true`, off by default). The agent process gets its own OAuth2 identity, self-registered via [Dynamic Client Registration (RFC 7591)](https://datatracker.ietf.org/doc/html/rfc7591) on first run.
179
- - **Authorization.** Before any tool runs, the plugin's `PreToolUse` hook checks [Ory Permissions](https://www.ory.com/docs/keto) against the user's subject and blocks the call on `deny`.
180
- - **Audit.** Every decision (allow, deny, fallback) is recorded as a structured trace span: NDJSON file output and/or OTLP/HTTP export to Jaeger, Honeycomb, Grafana, and similar collectors. The user → agent delegation is written to Ory as a relation so *"agent X acting on behalf of user Y"* stays queryable after tokens expire.
181
-
182
- The plugin hooks into these Antigravity lifecycle events: `SessionStart` (verify identities), `PreToolUse` (authorize), `PostToolUse` (audit), `Notification`, and `SessionEnd`.
183
-
184
- > **Fail-open on a fail-closed harness.** Antigravity blocks a tool unless the `PreToolUse` hook explicitly returns `{ allow_tool: true }` — a crash, timeout, or missing response *blocks* the tool. To preserve Ory's never-get-in-the-way contract, the plugin **always returns "allow" on any internal or network error**, so a transient Ory outage never wedges your tools. Enforcement is therefore only as strong as your permission grants — grant explicit `use` on the tools each user should be able to run.
185
-
186
- ### Enable enforcement
187
-
188
- After install the plugin runs in **observe mode**: every tool call is checked against Ory Permissions, but a deny is recorded as a `permission.observe_deny` audit span and the tool runs anyway. This lets you see what *would* be blocked before turning on hard blocking.
137
+ Pass the resulting id to `configure --oauth2-client-id` (pair it with `--user-login`). Running headless with a session token already? Set `ORY_USER_SESSION_TOKEN` and skip the browser step entirely.
189
138
 
190
- 1. **Turn on user login.** It's off by default:
191
-
192
- ```bash
193
- export ORY_USER_LOGIN=true
194
- export ORY_OAUTH2_CLIENT_ID=<public OAuth2 client id>
195
- ```
196
-
197
- 2. **Bootstrap permissions for the built-in tools.** One idempotent command grants the current user `use` on every tool Antigravity ships with (run_command, view_file, write_to_file, …):
198
-
199
- ```bash
200
- npx -y -p @ory/antigravity ory-antigravity permissions bootstrap
201
- ```
202
-
203
- 3. **Check coverage.** `permissions status` probes every tool in the harness's catalog and prints allowed / denied per tool:
204
-
205
- ```bash
206
- npx -y -p @ory/antigravity ory-antigravity permissions status
207
- ```
208
-
209
- 4. **Promote to enforce.** Once the observe-mode logs look right:
210
-
211
- ```bash
212
- npx -y -p @ory/antigravity ory-antigravity permissions enforce
213
- ```
139
+ </details>
214
140
 
215
- Denies now block the tool call; Antigravity shows the `deny_reason` and the decision is recorded as a `tool.block` trace span with `blocked: true`. Switch back any time with `permissions observe`.
141
+ With nothing configured, the plugin still loads and runs in **pass-through mode**: skills, commands, and logging work, but no checks run and nothing is blocked. Perfectly fine if you only want the app-building features.
216
142
 
217
- ## CLI reference
143
+ ## Commands
218
144
 
219
145
  ```
220
- npx -y -p @ory/antigravity ory-antigravity install
221
- npx -y -p @ory/antigravity ory-antigravity uninstall
222
- npx -y -p @ory/antigravity ory-antigravity configure [--project-url <url> --oauth2-client-id <id>] [--api-key <key>] [--audit-only]
223
- npx -y -p @ory/antigravity ory-antigravity agent <status|unregister>
224
- npx -y -p @ory/antigravity ory-antigravity permissions <status|bootstrap|observe|enforce>
225
- npx -y -p @ory/antigravity ory-antigravity local <up|down|status|seed|logs|env|configure|reset>
226
- npx -y -p @ory/antigravity ory-antigravity setup [--project-dir <path>] # .agents fallback
227
- npx -y -p @ory/antigravity ory-antigravity status
146
+ ory-antigravity install | uninstall Install/remove; --reconfigure re-runs setup, --no-configure skips it
147
+ ory-antigravity status Show configuration, identities, permission coverage, recent activity
148
+ ory-antigravity watch Tail the live trace stream (OTel spans)
149
+ ory-antigravity permissions <cmd> status | bootstrap | observe (watch) | enforce (block)
150
+ ory-antigravity configure <flags> Point at a project by hand (--project-url, --oauth2-client-id, --user-login, --audit-only)
151
+ ory-antigravity agent <status|unregister> Manage the agent's own auto-created identity
152
+ ory-antigravity local <up|down|status|…> Run / manage a local Ory in Docker
153
+ ory-antigravity-setup Install into .agents/ directly (no agy binary)
228
154
  ```
229
155
 
156
+ All prefixed with `npx -y -p @ory/antigravity`.
157
+
230
158
  ## Troubleshooting
231
159
 
232
- - **`/ory:local-up` fails.** Make sure Docker is running and ports `4455` (login UI), `4000`, `4100`, and `16686` are free.
233
- - **PKCE login loops.** Clear persisted state with `npx -y -p @ory/antigravity ory-antigravity agent unregister` and retry.
234
- - **`npx` fetches an old version.** Force a fresh fetch: `npx -y -p @ory/antigravity@latest ory-antigravity …`.
235
- - **A tool was unexpectedly blocked.** Because Antigravity fails closed, confirm the hook is returning JSON — set `ORY_AGENT_DEBUG=true` and `ORY_AGENT_LOG_FILE=/tmp/ory.log` and check for hook errors. Then verify the user has `use` on the tool (`permissions status`).
160
+ - **`/ory:local-up` fails** make sure Docker is running and ports `4000`, `4455`, and `16686` are free.
161
+ - **Browser sign-in loops** reset with `ory-antigravity agent unregister` and try again.
162
+ - **`npx` grabbed an old version** force the latest: `npx -y -p @ory/antigravity@latest ory-antigravity …`.
163
+ - **A tool was unexpectedly blocked** because Antigravity blocks by default, first confirm the hook is answering: set `ORY_AGENT_DEBUG=true` and check the logs for hook errors. Then verify the user has `use` on the tool with `permissions status`.
164
+ - **Want to see what's happening** — `npx -y -p @ory/antigravity ory-antigravity status` for a snapshot, `npx -y -p @ory/antigravity ory-antigravity watch` for the live trace stream, or set `ORY_AGENT_DEBUG=true` for a verbose log. Traces and logs live under `~/.config/ory-agent-plugins/antigravity/` (see [See what's happening](#see-whats-happening)).
236
165
 
237
- ## Links
166
+ ## Learn more
238
167
 
239
- - [Ory documentation](https://www.ory.com/docs/)
240
- - [Ory Network console](https://console.ory.sh)
241
- - [Ory Elements](https://github.com/ory/elements)
168
+ - [Ory documentation](https://www.ory.com/docs/) · [Ory Console](https://console.ory.sh) · [Ory Elements](https://github.com/ory/elements)
242
169
  - [Google Antigravity](https://antigravity.google)
243
170
 
244
171
  ## License
package/dist/cli/main.js CHANGED
@@ -63,14 +63,19 @@ function main() {
63
63
  const [command, ...args] = process.argv.slice(2);
64
64
  switch (command) {
65
65
  case "install":
66
+ (0, argus_1.beginDeferNextSteps)();
66
67
  install(args);
67
- postInstallPermissions("ory-antigravity", "antigravity").then(() => process.exit(0), (err) => {
68
+ (0, argus_1.runPostInstall)("ory-antigravity", "antigravity", args).then(() => process.exit(0), (err) => {
68
69
  console.error(err.message ?? err);
69
70
  process.exit(1);
70
71
  });
71
72
  break;
72
73
  case "uninstall":
73
74
  uninstall(args);
75
+ (0, argus_1.clearCredentialsForUninstall)().then(() => process.exit(0), (err) => {
76
+ console.error(err.message ?? err);
77
+ process.exit(1);
78
+ });
74
79
  break;
75
80
  case "configure":
76
81
  (0, argus_1.runConfigureCommand)("ory-antigravity", args);
@@ -102,6 +107,9 @@ function main() {
102
107
  process.exit(1);
103
108
  });
104
109
  break;
110
+ case "watch":
111
+ (0, argus_1.runWatchCommand)("antigravity", args);
112
+ break;
105
113
  case "help":
106
114
  case "--help":
107
115
  case "-h":
@@ -158,12 +166,6 @@ function manualSetup(args) {
158
166
  process.argv = ["node", "setup.js", ...args];
159
167
  require("./setup.js");
160
168
  }
161
- async function postInstallPermissions(binName, harness) {
162
- const bootstrapped = await (0, argus_1.maybeAutoBootstrap)(binName, harness);
163
- (0, argus_1.printPermissionsOnboardingHelp)(binName, harness, {
164
- bootstrappedAutomatically: bootstrapped,
165
- });
166
- }
167
169
  function printQuickstart() {
168
170
  console.log("");
169
171
  console.log("Quickstart:");
@@ -188,7 +190,7 @@ function help() {
188
190
  ory-antigravity — Ory plugin for Google Antigravity
189
191
 
190
192
  Usage:
191
- npx ory-antigravity <command> [options]
193
+ npx -y -p @ory/antigravity ory-antigravity <command> [options]
192
194
 
193
195
  Commands:
194
196
  install Install the Ory plugin into Antigravity (agy plugin install)
@@ -198,6 +200,7 @@ Commands:
198
200
  permissions <cmd> Manage permission mode and tool permissions (status, bootstrap, observe, enforce)
199
201
  setup [--project-dir] Write the plugin bundle into .agents directly (fallback)
200
202
  status Show plugin status and configuration
203
+ watch [trace-file] Tail the trace stream (OTel spans) live
201
204
  local <cmd> Manage local Ory dev environment (up, down, status, seed, ...)
202
205
 
203
206
  After installing, the plugin hooks into these Antigravity lifecycle events:
@@ -206,9 +209,9 @@ After installing, the plugin hooks into these Antigravity lifecycle events:
206
209
  PostToolUse Audit log tool executions
207
210
 
208
211
  Examples:
209
- npx ory-antigravity install # Install plugin
210
- npx ory-antigravity status # Check configuration
211
- npx ory-antigravity uninstall # Remove plugin
212
+ npx -y -p @ory/antigravity ory-antigravity install # Install plugin
213
+ npx -y -p @ory/antigravity ory-antigravity status # Check configuration
214
+ npx -y -p @ory/antigravity ory-antigravity uninstall # Remove plugin
212
215
  `);
213
216
  }
214
217
  main();
package/dist/cli/setup.js CHANGED
@@ -78,6 +78,15 @@ function main() {
78
78
  }
79
79
  (0, assets_js_1.installAntigravityOryAssets)(agentsDir);
80
80
  console.log(`Ory plugin bundle installed to ${agentsDir}`);
81
- (0, argus_1.printNextSteps)("Google Antigravity", "npx ory-antigravity-setup --uninstall");
81
+ (0, argus_1.printNextSteps)("Google Antigravity", "npx -y -p @ory/antigravity ory-antigravity-setup --uninstall", { binName: "ory-antigravity", harness: "antigravity" });
82
82
  }
83
83
  main();
84
+ // When invoked directly as the `-setup` bin with `--uninstall`, also clear
85
+ // stored Ory credentials. When required by the plugin's main CLI, that
86
+ // command owns the purge, so the `require.main` guard prevents a double run.
87
+ if (require.main === module && process.argv.includes("--uninstall")) {
88
+ (0, argus_1.clearCredentialsForUninstall)().then(() => process.exit(0), (err) => {
89
+ console.error(err.message ?? err);
90
+ process.exit(1);
91
+ });
92
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ory/antigravity",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "Ory plugin for Google Antigravity: scaffolding skills, a local Ory instance, and authentication, authorization, and audit for every tool call",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/ory/ory-agent-plugins/tree/main/packages/antigravity",
@@ -72,7 +72,7 @@
72
72
  "!dist/**/*.tsbuildinfo"
73
73
  ],
74
74
  "dependencies": {
75
- "@ory/argus": "0.11.0"
75
+ "@ory/argus": "0.12.0"
76
76
  },
77
77
  "devDependencies": {
78
78
  "typescript": "^6.0.2",