@ory/antigravity 0.11.1 → 0.12.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.
- package/README.md +85 -158
- package/dist/cli/assets.js +3 -3
- package/dist/cli/main.d.ts +5 -5
- package/dist/cli/main.js +26 -23
- package/dist/cli/setup.d.ts +4 -4
- package/dist/cli/setup.js +15 -6
- package/dist/handlers.js +1 -1
- package/package.json +6 -5
package/README.md
CHANGED
|
@@ -1,113 +1,99 @@
|
|
|
1
1
|
# Ory Agent Plugin: Google Antigravity
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Security and developer experience for [Google Antigravity](https://antigravity.google), powered by [Ory](https://ory.com).
|
|
4
4
|
|
|
5
|
-
|
|
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
|
-
|
|
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.
|
|
8
8
|
|
|
9
|
-
|
|
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.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
## What you'll need
|
|
12
12
|
|
|
13
|
-
-
|
|
14
|
-
- **
|
|
13
|
+
- [Google Antigravity](https://antigravity.google) installed (the `agy` CLI and/or the IDE)
|
|
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)
|
|
15
17
|
|
|
16
|
-
|
|
18
|
+
## Get started
|
|
17
19
|
|
|
18
|
-
|
|
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
|
+
Run one command. It installs the plugin (registering it with Antigravity via `agy plugin install`) and walks you through connecting:
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
```bash
|
|
23
|
+
npx -y -p @ory/antigravity ory-agy install
|
|
24
|
+
```
|
|
22
25
|
|
|
23
|
-
|
|
26
|
+
You'll be asked how you want to connect — **press Enter for the default**:
|
|
24
27
|
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
- macOS or Linux. Windows works via WSL2.
|
|
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.
|
|
29
31
|
|
|
30
|
-
|
|
32
|
+
That's it. Confirm everything landed with:
|
|
31
33
|
|
|
32
34
|
```bash
|
|
33
|
-
npx -y -p @ory/antigravity ory-
|
|
35
|
+
npx -y -p @ory/antigravity ory-agy status
|
|
34
36
|
```
|
|
35
37
|
|
|
36
|
-
|
|
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)`.
|
|
37
39
|
|
|
38
|
-
|
|
39
|
-
npx -y -p @ory/antigravity ory-antigravity status
|
|
40
|
-
```
|
|
41
|
-
|
|
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)`.
|
|
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>
|
|
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-agy-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-
|
|
48
|
+
npx -y -p @ory/antigravity ory-agy-setup [--project-dir <path>]
|
|
49
|
+
npx -y -p @ory/antigravity ory-agy 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
|
-
##
|
|
54
|
+
## What you get
|
|
56
55
|
|
|
57
|
-
|
|
56
|
+
Once connected, every tool the agent runs is governed by Ory — three things happen automatically:
|
|
58
57
|
|
|
59
|
-
|
|
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
|
-
|
|
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
|
-
|
|
66
|
+
### See what's happening
|
|
68
67
|
|
|
69
|
-
|
|
68
|
+
Everything the plugin does is observable out of the box — no configuration required:
|
|
70
69
|
|
|
71
|
-
|
|
70
|
+
- **Status at a glance.** `npx -y -p @ory/antigravity ory-agy 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
|
-
|
|
73
|
+
```bash
|
|
74
|
+
npx -y -p @ory/antigravity ory-agy watch
|
|
75
|
+
```
|
|
74
76
|
|
|
75
|
-
|
|
76
|
-
|
|
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
|
-
|
|
80
|
+
### Ready to enforce?
|
|
81
81
|
|
|
82
|
-
|
|
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
|
-
|
|
85
|
-
|
|
86
|
-
|
|
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-agy permissions enforce
|
|
86
|
+
```
|
|
96
87
|
|
|
97
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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`
|
|
119
|
-
|
|
120
|
-
## Pointing at a real Ory project
|
|
121
|
-
|
|
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:
|
|
123
|
-
|
|
124
|
-
```bash
|
|
125
|
-
npx -y -p @ory/antigravity ory-antigravity configure \
|
|
126
|
-
--project-url https://<id>.projects.oryapis.com \
|
|
127
|
-
--oauth2-client-id <public OAuth2 client id>
|
|
128
|
-
```
|
|
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.
|
|
129
105
|
|
|
130
|
-
|
|
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.
|
|
106
|
+
## Configure by hand (CI / advanced)
|
|
133
107
|
|
|
134
|
-
|
|
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.
|
|
135
109
|
|
|
136
110
|
```bash
|
|
137
|
-
npx -y -p @ory/antigravity ory-
|
|
111
|
+
npx -y -p @ory/antigravity ory-agy configure \
|
|
112
|
+
--project-url https://<slug>.projects.oryapis.com \
|
|
113
|
+
--oauth2-client-id <login client id> \
|
|
114
|
+
--user-login
|
|
138
115
|
```
|
|
139
116
|
|
|
140
|
-
The
|
|
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`.
|
|
141
118
|
|
|
142
|
-
|
|
143
|
-
|
|
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
|
|
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
|
-
|
|
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.
|
|
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.
|
|
185
138
|
|
|
186
|
-
|
|
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.
|
|
189
|
-
|
|
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
|
-
|
|
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
|
-
##
|
|
143
|
+
## Commands
|
|
218
144
|
|
|
219
145
|
```
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
146
|
+
ory-agy install | uninstall Install/remove; --reconfigure re-runs setup, --no-configure skips it
|
|
147
|
+
ory-agy status Show configuration, identities, permission coverage, recent activity
|
|
148
|
+
ory-agy watch Tail the live trace stream (OTel spans)
|
|
149
|
+
ory-agy permissions <cmd> status | bootstrap | observe (watch) | enforce (block)
|
|
150
|
+
ory-agy configure <flags> Point at a project by hand (--project-url, --oauth2-client-id, --user-login, --audit-only)
|
|
151
|
+
ory-agy agent <status|unregister> Manage the agent's own auto-created identity
|
|
152
|
+
ory-agy local <up|down|status|…> Run / manage a local Ory in Docker
|
|
153
|
+
ory-agy-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
|
|
233
|
-
- **
|
|
234
|
-
- **`npx`
|
|
235
|
-
- **A tool was unexpectedly blocked
|
|
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-agy agent unregister` and try again.
|
|
162
|
+
- **`npx` grabbed an old version** — force the latest: `npx -y -p @ory/antigravity@latest ory-agy …`.
|
|
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-agy status` for a snapshot, `npx -y -p @ory/antigravity ory-agy 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
|
-
##
|
|
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/assets.js
CHANGED
|
@@ -59,13 +59,13 @@ const fs = __importStar(require("node:fs"));
|
|
|
59
59
|
const path = __importStar(require("node:path"));
|
|
60
60
|
const argus_1 = require("@ory/argus");
|
|
61
61
|
const PACKAGE_NAME = "@ory/antigravity";
|
|
62
|
-
const HOOK_BIN_NAME = "ory-
|
|
62
|
+
const HOOK_BIN_NAME = "ory-agy-hook";
|
|
63
63
|
const MCP_PACKAGE_NAME = "@ory/mcp-server";
|
|
64
64
|
const MCP_BIN_NAME = "ory-mcp-server";
|
|
65
65
|
/** Plugin / rule / MCP-server id. */
|
|
66
66
|
exports.PLUGIN_NAME = "ory";
|
|
67
67
|
const RENDER_OPTS = {
|
|
68
|
-
binName: "ory-
|
|
68
|
+
binName: "ory-agy",
|
|
69
69
|
packageName: PACKAGE_NAME,
|
|
70
70
|
};
|
|
71
71
|
/**
|
|
@@ -83,7 +83,7 @@ function readPackageVersion() {
|
|
|
83
83
|
}
|
|
84
84
|
/**
|
|
85
85
|
* Render hooks.json. The hook command is a self-contained
|
|
86
|
-
* `npx -y -p @ory/antigravity@<version> ory-
|
|
86
|
+
* `npx -y -p @ory/antigravity@<version> ory-agy-hook` so the
|
|
87
87
|
* binary need not be on PATH after install. `matcher: ".*"` matches every
|
|
88
88
|
* tool name on the tool events.
|
|
89
89
|
*/
|
package/dist/cli/main.d.ts
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
* Main CLI for @ory/antigravity.
|
|
4
4
|
*
|
|
5
5
|
* Usage:
|
|
6
|
-
* npx ory-
|
|
7
|
-
* npx ory-
|
|
8
|
-
* npx ory-
|
|
9
|
-
* npx ory-
|
|
10
|
-
* npx ory-
|
|
6
|
+
* npx ory-agy install Install the Ory plugin into Antigravity
|
|
7
|
+
* npx ory-agy uninstall Remove the plugin
|
|
8
|
+
* npx ory-agy configure Set or view Ory credentials
|
|
9
|
+
* npx ory-agy setup [--project-dir] Write the bundle into .agents (fallback)
|
|
10
|
+
* npx ory-agy status Show plugin status
|
|
11
11
|
*/
|
|
12
12
|
export {};
|
package/dist/cli/main.js
CHANGED
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
* Main CLI for @ory/antigravity.
|
|
5
5
|
*
|
|
6
6
|
* Usage:
|
|
7
|
-
* npx ory-
|
|
8
|
-
* npx ory-
|
|
9
|
-
* npx ory-
|
|
10
|
-
* npx ory-
|
|
11
|
-
* npx ory-
|
|
7
|
+
* npx ory-agy install Install the Ory plugin into Antigravity
|
|
8
|
+
* npx ory-agy uninstall Remove the plugin
|
|
9
|
+
* npx ory-agy configure Set or view Ory credentials
|
|
10
|
+
* npx ory-agy setup [--project-dir] Write the bundle into .agents (fallback)
|
|
11
|
+
* npx ory-agy status Show plugin status
|
|
12
12
|
*/
|
|
13
13
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
14
|
if (k2 === undefined) k2 = k;
|
|
@@ -63,26 +63,31 @@ 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
|
-
|
|
68
|
+
(0, argus_1.runPostInstall)("ory-agy", "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
|
-
(0, argus_1.runConfigureCommand)("ory-
|
|
81
|
+
(0, argus_1.runConfigureCommand)("ory-agy", args);
|
|
77
82
|
break;
|
|
78
83
|
case "agent":
|
|
79
|
-
(0, argus_1.runAgentCommand)("ory-
|
|
84
|
+
(0, argus_1.runAgentCommand)("ory-agy", args).then((code) => process.exit(code), (err) => {
|
|
80
85
|
console.error(err.message ?? err);
|
|
81
86
|
process.exit(1);
|
|
82
87
|
});
|
|
83
88
|
break;
|
|
84
89
|
case "permissions":
|
|
85
|
-
(0, argus_1.runPermissionsCommand)("ory-
|
|
90
|
+
(0, argus_1.runPermissionsCommand)("ory-agy", "antigravity", args).then((code) => process.exit(code), (err) => {
|
|
86
91
|
console.error(err.message ?? err);
|
|
87
92
|
process.exit(1);
|
|
88
93
|
});
|
|
@@ -97,11 +102,14 @@ function main() {
|
|
|
97
102
|
});
|
|
98
103
|
break;
|
|
99
104
|
case "local":
|
|
100
|
-
(0, argus_1.runLocalCommand)("ory-
|
|
105
|
+
(0, argus_1.runLocalCommand)("ory-agy", args).catch((err) => {
|
|
101
106
|
console.error(err.message ?? err);
|
|
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":
|
|
@@ -129,7 +137,7 @@ function install(args) {
|
|
|
129
137
|
console.log("");
|
|
130
138
|
console.log("Ory plugin installed.");
|
|
131
139
|
printQuickstart();
|
|
132
|
-
(0, argus_1.printEnvHelp)("ory-
|
|
140
|
+
(0, argus_1.printEnvHelp)("ory-agy");
|
|
133
141
|
return;
|
|
134
142
|
}
|
|
135
143
|
console.error("");
|
|
@@ -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:");
|
|
@@ -172,7 +174,7 @@ function printQuickstart() {
|
|
|
172
174
|
console.log(" 3. Set ORY_USER_LOGIN=true to enable the interactive PKCE browser login.");
|
|
173
175
|
}
|
|
174
176
|
async function status() {
|
|
175
|
-
await (0, argus_1.runStatusCommand)("ory-
|
|
177
|
+
await (0, argus_1.runStatusCommand)("ory-agy", "antigravity", {
|
|
176
178
|
title: "Google Antigravity",
|
|
177
179
|
printPluginSection: () => {
|
|
178
180
|
console.log("Plugin bundle:");
|
|
@@ -185,10 +187,10 @@ async function status() {
|
|
|
185
187
|
}
|
|
186
188
|
function help() {
|
|
187
189
|
console.log(`
|
|
188
|
-
ory-
|
|
190
|
+
ory-agy — Ory plugin for Google Antigravity
|
|
189
191
|
|
|
190
192
|
Usage:
|
|
191
|
-
npx ory
|
|
193
|
+
npx -y -p @ory/antigravity ory-agy <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
|
|
210
|
-
npx ory
|
|
211
|
-
npx ory
|
|
212
|
+
npx -y -p @ory/antigravity ory-agy install # Install plugin
|
|
213
|
+
npx -y -p @ory/antigravity ory-agy status # Check configuration
|
|
214
|
+
npx -y -p @ory/antigravity ory-agy uninstall # Remove plugin
|
|
212
215
|
`);
|
|
213
216
|
}
|
|
214
217
|
main();
|
package/dist/cli/setup.d.ts
CHANGED
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
* reads hooks, MCP config, skills, and commands from.
|
|
9
9
|
*
|
|
10
10
|
* Usage:
|
|
11
|
-
* npx ory-
|
|
12
|
-
* npx ory-
|
|
13
|
-
* npx ory-
|
|
14
|
-
* npx ory-
|
|
11
|
+
* npx ory-agy-setup # write into ./.agents
|
|
12
|
+
* npx ory-agy-setup --project-dir /repo
|
|
13
|
+
* npx ory-agy-setup --print # print bundle paths, don't write
|
|
14
|
+
* npx ory-agy-setup --uninstall # remove Ory bundle files
|
|
15
15
|
*/
|
|
16
16
|
export {};
|
package/dist/cli/setup.js
CHANGED
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
* reads hooks, MCP config, skills, and commands from.
|
|
10
10
|
*
|
|
11
11
|
* Usage:
|
|
12
|
-
* npx ory-
|
|
13
|
-
* npx ory-
|
|
14
|
-
* npx ory-
|
|
15
|
-
* npx ory-
|
|
12
|
+
* npx ory-agy-setup # write into ./.agents
|
|
13
|
+
* npx ory-agy-setup --project-dir /repo
|
|
14
|
+
* npx ory-agy-setup --print # print bundle paths, don't write
|
|
15
|
+
* npx ory-agy-setup --uninstall # remove Ory bundle files
|
|
16
16
|
*/
|
|
17
17
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
18
|
if (k2 === undefined) k2 = k;
|
|
@@ -57,7 +57,7 @@ function getAgentsDir(args) {
|
|
|
57
57
|
}
|
|
58
58
|
function main() {
|
|
59
59
|
if (process.argv.includes("--help") || process.argv.includes("-h")) {
|
|
60
|
-
(0, argus_1.printSetupHelp)("ory-
|
|
60
|
+
(0, argus_1.printSetupHelp)("ory-agy-setup", "Google Antigravity");
|
|
61
61
|
process.exit(0);
|
|
62
62
|
}
|
|
63
63
|
const args = (0, argus_1.parseSetupArgs)();
|
|
@@ -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
|
|
81
|
+
(0, argus_1.printNextSteps)("Google Antigravity", "npx -y -p @ory/antigravity ory-agy-setup --uninstall", { binName: "ory-agy", 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/dist/handlers.js
CHANGED
|
@@ -65,7 +65,7 @@ async function handleSessionStart(input, client, deps) {
|
|
|
65
65
|
// session always proceeds. Tool-call enforcement is unaffected.
|
|
66
66
|
const userGate = deps.userLogin ?? argus_1.ensureUserAuthenticated;
|
|
67
67
|
const decision = await userGate(client, {
|
|
68
|
-
binName: "ory-
|
|
68
|
+
binName: "ory-agy",
|
|
69
69
|
harness: HARNESS,
|
|
70
70
|
allowBlock: false,
|
|
71
71
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ory/antigravity",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.1",
|
|
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",
|
|
@@ -62,9 +62,9 @@
|
|
|
62
62
|
}
|
|
63
63
|
},
|
|
64
64
|
"bin": {
|
|
65
|
-
"ory-
|
|
66
|
-
"ory-
|
|
67
|
-
"ory-
|
|
65
|
+
"ory-agy": "dist/cli/main.js",
|
|
66
|
+
"ory-agy-hook": "dist/hook.js",
|
|
67
|
+
"ory-agy-setup": "dist/cli/setup.js"
|
|
68
68
|
},
|
|
69
69
|
"files": [
|
|
70
70
|
"dist",
|
|
@@ -72,7 +72,8 @@
|
|
|
72
72
|
"!dist/**/*.tsbuildinfo"
|
|
73
73
|
],
|
|
74
74
|
"dependencies": {
|
|
75
|
-
"
|
|
75
|
+
"reo-census": "^1.2.8",
|
|
76
|
+
"@ory/argus": "0.12.1"
|
|
76
77
|
},
|
|
77
78
|
"devDependencies": {
|
|
78
79
|
"typescript": "^6.0.2",
|