@ory/claude-code 0.14.0 → 1.0.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/.claude-plugin/marketplace.json +2 -2
- package/README.md +71 -64
- package/dist/cli/main.js +46 -31
- package/dist/cli/setup.d.ts +39 -29
- package/dist/cli/setup.js +164 -191
- package/dist/handlers.d.ts +2 -7
- package/dist/handlers.js +157 -383
- package/dist/hook.js +40 -16
- package/package.json +9 -8
package/README.md
CHANGED
|
@@ -2,9 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Security and developer experience for [Claude Code](https://docs.anthropic.com/en/docs/claude-code), powered by [Ory](https://ory.com).
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Claude runs real actions on your machine — editing files, running shell commands, calling APIs. This plugin gives those actions an identity, a permission check, and an audit trail.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
One command installs two independent halves:
|
|
8
|
+
|
|
9
|
+
- **Developer experience** — the Ory skill catalog, slash commands, the local Ory dev stack, an MCP server, and activity logging. No account, no keys, nothing to configure: it works the moment it's installed.
|
|
10
|
+
- **Ory Agent Security** — browser sign-in, brokered permission checks before tool calls, and the delegation trail. Opt-in connection details from the [Ory Console](https://console.ory.sh) switch it on, and it takes nothing away from the half above. See [Connect to Ory Agent Security](#connect-to-ory-agent-security).
|
|
8
11
|
|
|
9
12
|
## What you'll need
|
|
10
13
|
|
|
@@ -15,129 +18,133 @@ Security and developer experience for [Claude Code](https://docs.anthropic.com/e
|
|
|
15
18
|
|
|
16
19
|
## Get started
|
|
17
20
|
|
|
18
|
-
Run one command
|
|
21
|
+
Run one command:
|
|
19
22
|
|
|
20
23
|
```bash
|
|
21
24
|
npx -y -p @ory/claude-code ory-claude install
|
|
22
25
|
```
|
|
23
26
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
- **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.
|
|
27
|
-
- **Local** — run a complete Ory on your laptop with Docker. No account, no signup, no keys. Great for trying it out.
|
|
28
|
-
- **Audit-only** — skip Ory entirely and just log what Claude does.
|
|
29
|
-
|
|
30
|
-
> No browser available (CI, SSH, headless)? The same walkthrough runs right in your terminal instead — or force it with `--no-web`.
|
|
31
|
-
|
|
32
|
-
That's it. Confirm everything landed with:
|
|
27
|
+
Confirm everything landed with:
|
|
33
28
|
|
|
34
29
|
```bash
|
|
35
30
|
npx -y -p @ory/claude-code ory-claude status
|
|
36
31
|
```
|
|
37
32
|
|
|
38
|
-
`status` is your one-stop check: what's configured, who's signed in, which tools are covered by permissions, and recent activity.
|
|
33
|
+
`status` is your one-stop check: what's configured, who's signed in, which tools are covered by permissions, and recent activity. Until you connect Agent Security, the identity and permission rows say so and name what's missing.
|
|
34
|
+
|
|
35
|
+
> Prefer to install from inside Claude Code? Run `/plugin marketplace add ory/claude-plugins` then `/plugin install ory-agent-plugin@ory`. That registers the plugin the same way, with Agent Security not connected.
|
|
36
|
+
|
|
37
|
+
## Skills and commands
|
|
38
|
+
|
|
39
|
+
Installing the plugin drops the full Ory playbook catalog into Claude Code. **Skills** are model-invoked — just say what you want in plain language and the matching one takes over (or name it directly, e.g. `/project:ory-auth-setup`).
|
|
40
|
+
|
|
41
|
+
| Skill | What it does for you |
|
|
42
|
+
|---|---|
|
|
43
|
+
| `ory-auth-setup` | Adds a complete auth system to your app — login, registration, recovery, verification, settings — on [Ory Elements](https://github.com/ory/elements) |
|
|
44
|
+
| `ory-login-flow` | Builds just the pages, wired to Ory's self-service flows |
|
|
45
|
+
| `ory-social-login` | "Sign in with…" for Google, GitHub, Apple, Microsoft, Discord, Slack, GitLab, Facebook |
|
|
46
|
+
| `ory-local-dev` | Develops and tests login/permission flows against a local Ory — no project, no account, offline |
|
|
47
|
+
| `ory-permissions-onboarding` | Walks a fresh install from observe mode to enforced per-tool permissions without getting blocked |
|
|
48
|
+
| `ory-build-agent` | Drops `@ory/argus` into an agent *you* own — Claude Agent SDK, OpenAI Agents, Mastra, Vercel AI, LangGraph/PydanticAI |
|
|
49
|
+
| `ory-build-integration` | Wires Ory into your app: Action webhooks, JWT validation at a gateway, live event streams |
|
|
50
|
+
| `ory-contribute-integration` | Authors and submits an integration to the public `ory/integrates` registry |
|
|
51
|
+
| `ory-e2b-sandbox` | Scaffolds an E2B sandbox template that boots with this plugin preinstalled |
|
|
52
|
+
| `ory-temporal-worker` | Scaffolds a Temporal TypeScript worker where every Activity is authenticated, authorized, and audited |
|
|
53
|
+
|
|
54
|
+
**Slash commands** run the local stack directly:
|
|
55
|
+
|
|
56
|
+
| Command | What it does |
|
|
57
|
+
|---|---|
|
|
58
|
+
| `/ory-agent-plugin:local-up` | Starts a local Ory (Identities, OAuth2, Permissions) in Docker and seeds a test user — it prints the email + password to sign in with |
|
|
59
|
+
| `/ory-agent-plugin:local-down` | Stops it, keeping your data volumes |
|
|
60
|
+
| `/ory-agent-plugin:temporal-up` | Starts a local Temporal dev server for the `ory-temporal-worker` scaffold |
|
|
39
61
|
|
|
40
|
-
|
|
62
|
+
The local stack runs entirely on your laptop: Ory APIs at `http://localhost:4000`, a login UI on `:4455` (not `:3000`, to dodge Next.js port clashes), and the Ory Console on `:4100`.
|
|
63
|
+
|
|
64
|
+
A built-in **Ory MCP server** rounds it out — Claude can manage identities, projects, and permissions straight from chat.
|
|
65
|
+
|
|
66
|
+
So: ask Claude *"add Ory login to this app"* and it scaffolds the pages, starts a local Ory, and wires them together.
|
|
41
67
|
|
|
42
68
|
## What you get
|
|
43
69
|
|
|
44
|
-
|
|
70
|
+
Out of the box, every tool Claude runs produces a privacy-safe structured activity event in the unified local log.
|
|
71
|
+
|
|
72
|
+
Once you connect to Ory Agent Security, two more things happen automatically:
|
|
45
73
|
|
|
46
74
|
- **Who's driving.** You sign in once in your browser; Claude (and any sub-agents it spawns) each get their own identity. No tokens to copy around, and the "who acted on whose behalf" trail stays queryable later.
|
|
47
|
-
- **What it's allowed to do.** Before a tool runs, Ory checks whether it's permitted. It starts in **
|
|
48
|
-
- **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.
|
|
75
|
+
- **What it's allowed to do.** Before a tool runs, Ory checks whether it's permitted. It starts in **observe mode** — nothing is blocked, you just *see* what would be — so it never gets in your way on day one.
|
|
49
76
|
|
|
50
77
|
If Ory is ever unreachable, the plugin gets out of the way and lets Claude keep working — so it can't lock you out.
|
|
51
78
|
|
|
52
79
|
### See what's happening
|
|
53
80
|
|
|
54
|
-
Everything the plugin does is observable out of the box
|
|
81
|
+
Everything the plugin does is observable out of the box:
|
|
55
82
|
|
|
56
|
-
- **
|
|
57
|
-
- **Live dashboard.** `npx -y -p @ory/claude-code ory-claude dashboard` opens the same picture in your browser — configuration, identities, permission coverage, Ory service health, and the latest tool-call activity, all refreshing live. From there you can flip **enforcement** on or off, toggle **user login**, and use **Change stack** to reconnect to a different Ory — no CLI required.
|
|
58
|
-
- **Live traces.** Every tool call is recorded as an OpenTelemetry-style span. Watch them stream as the agent works:
|
|
83
|
+
- **Activity log.** Privacy-safe activity is always appended to `~/.config/ory-agent-plugins/claude-code/ory-agent-debug.log`. View events, decisions, and errors live with:
|
|
59
84
|
|
|
60
85
|
```bash
|
|
61
86
|
npx -y -p @ory/claude-code ory-claude watch
|
|
62
87
|
```
|
|
63
88
|
|
|
64
|
-
|
|
65
|
-
- **
|
|
89
|
+
Set `ORY_AGENT_LOG_FILE` to override the path; set it empty to disable file persistence.
|
|
90
|
+
- **Live debug.** Launch Claude Code with `ORY_AGENT_DEBUG=true` to add verbose local diagnostics, including raw shell commands, to the watched log and stderr. Secrets are recursively redacted; pass `watch --json` for NDJSON.
|
|
66
91
|
|
|
67
92
|
### Ready to enforce?
|
|
68
93
|
|
|
69
|
-
|
|
94
|
+
Once connected, the deny posture lives on the Ory project: when the observe-mode activity looks right, an admin promotes it to **enforce** in the **Ory Console** (Agent Security). Every session reads that posture live, so nothing has to be reinstalled.
|
|
70
95
|
|
|
71
96
|
```bash
|
|
72
|
-
npx -y -p @ory/claude-code ory-claude permissions
|
|
97
|
+
npx -y -p @ory/claude-code ory-claude permissions # what the project grants, and the live mode
|
|
73
98
|
```
|
|
74
99
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
## Also: add login to your own app
|
|
78
|
-
|
|
79
|
-
Beyond securing Claude, the plugin helps you build Ory into whatever you're working on. Ask Claude *"add Ory login to this app"* 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-agent-plugin:local-up` (it prints a test email + password to sign in with) and tear it down with `/ory-agent-plugin:local-down`.
|
|
100
|
+
Then a denied tool is actually blocked and Claude shows why.
|
|
80
101
|
|
|
81
|
-
|
|
102
|
+
## Connect to Ory Agent Security
|
|
82
103
|
|
|
83
|
-
|
|
104
|
+
Copy the connection details from the [Ory Console](https://console.ory.sh) under **Agent Security**:
|
|
84
105
|
|
|
85
|
-
|
|
106
|
+
| Value | Flag | Environment variable |
|
|
107
|
+
|---|---|---|
|
|
108
|
+
| Project URL | `--project-url` | `ORY_PROJECT_URL` |
|
|
109
|
+
| Agent Security URL | `--agent-security-url` | `ORY_AGENT_SECURITY_URL` |
|
|
110
|
+
| Sign-in client id override (default `ory-agent-security-login`) | `--oauth2-client-id` | `ORY_OAUTH2_CLIENT_ID` |
|
|
86
111
|
|
|
87
112
|
```bash
|
|
88
113
|
npx -y -p @ory/claude-code ory-claude configure \
|
|
89
114
|
--project-url https://<slug>.projects.oryapis.com \
|
|
90
|
-
--
|
|
115
|
+
--agent-security-url https://agents.console.ory.com
|
|
91
116
|
```
|
|
92
117
|
|
|
93
|
-
|
|
118
|
+
`install` accepts the same flags, so you can register the plugin **and** connect in one shot (`install --project-url <URL> --agent-security-url <URL>`). The login client defaults to `ory-agent-security-login`; custom deployments can override it with `--oauth2-client-id`. Existing configurations fall back to the project URL when the Agent Security URL is unset. To turn sign-in and checks back off later, use `configure --disconnect`.
|
|
94
119
|
|
|
95
|
-
|
|
96
|
-
<summary>Create the sign-in client by hand</summary>
|
|
97
|
-
|
|
98
|
-
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:
|
|
99
|
-
|
|
100
|
-
```bash
|
|
101
|
-
ory create oauth2-client --project <project-id> \
|
|
102
|
-
--name "Ory Agent Security · user login (PKCE)" \
|
|
103
|
-
--grant-type authorization_code,refresh_token \
|
|
104
|
-
--response-type code \
|
|
105
|
-
--scope openid,offline_access \
|
|
106
|
-
--token-endpoint-auth-method none \
|
|
107
|
-
--redirect-uri http://127.0.0.1:47823/callback \
|
|
108
|
-
--redirect-uri http://127.0.0.1:47824/callback \
|
|
109
|
-
--redirect-uri http://127.0.0.1:47825/callback \
|
|
110
|
-
--redirect-uri http://127.0.0.1:47826/callback
|
|
111
|
-
```
|
|
120
|
+
**Ory Network or OEL.** Either works. For an Ory Network project the URL is `https://<slug>.projects.oryapis.com`; for a self-hosted **Ory Enterprise License** deployment, point `--project-url` at that deployment's base URL and use the sign-in client id from its Agent Security configuration. Everything downstream — sign-in, checks, delegation — is identical.
|
|
112
121
|
|
|
113
|
-
|
|
122
|
+
**There is nothing else for you to create.** The sign-in client, the permission model, the per-tool grants and blocks, and the observe/enforce posture are all provisioned in the Console by someone with project access. At runtime the plugin only *reads* permissions — it has no write path into your project, which is why installing it needs no workspace privilege. Each Claude session registers its own identity automatically on first use.
|
|
114
123
|
|
|
115
|
-
|
|
124
|
+
Sign-in runs at the start of every session and never blocks — a declined, skipped, or timed-out login simply leaves that session without a user identity.
|
|
116
125
|
|
|
117
|
-
|
|
126
|
+
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. Running headless with an OAuth2 access token already? Set `ORY_USER_OAUTH2_TOKEN` and the browser step is skipped entirely.
|
|
118
127
|
|
|
119
128
|
## Commands
|
|
120
129
|
|
|
121
130
|
```
|
|
122
|
-
ory-claude install | uninstall Install
|
|
131
|
+
ory-claude install | uninstall Install (add --project-url to also connect Agent Security) / remove
|
|
123
132
|
ory-claude status Show configuration, identities, permission coverage, recent activity
|
|
124
|
-
ory-claude
|
|
125
|
-
ory-claude
|
|
126
|
-
ory-claude permissions <cmd> status | bootstrap | observe (watch) | enforce (block)
|
|
127
|
-
ory-claude configure <flags> Point at a project by hand (--project-url, --oauth2-client-id, --audit-only)
|
|
133
|
+
ory-claude permissions <cmd> status (read-only; grants + posture live in the Ory Console)
|
|
134
|
+
ory-claude configure <flags> Connect a project (--project-url) or --disconnect
|
|
128
135
|
ory-claude agent <status|unregister> Manage Claude's own auto-created identity
|
|
129
136
|
ory-claude local <up|down|status|…> Run / manage a local Ory in Docker
|
|
137
|
+
ory-claude version Print plugin, core, and Node versions (--json for machine-readable)
|
|
130
138
|
```
|
|
131
139
|
|
|
132
140
|
All prefixed with `npx -y -p @ory/claude-code`.
|
|
133
141
|
|
|
134
142
|
## Troubleshooting
|
|
135
143
|
|
|
136
|
-
- **`local-up` fails** — make sure Docker is running and ports `4000`, `4100`,
|
|
137
|
-
- **Browser sign-in loops** — reset with `ory-claude agent unregister` and try again.
|
|
138
|
-
- **
|
|
144
|
+
- **`local-up` fails** — make sure Docker is running and ports `4000`, `4100`, and `4455` are free.
|
|
145
|
+
- **Browser sign-in loops** (after connecting) — reset with `ory-claude agent unregister` and try again.
|
|
146
|
+
- **Running an older CLI than expected** — `npx -p @ory/claude-code` (no version pin) reuses a previously-downloaded copy instead of re-resolving to the latest. The install banner prints the running version; confirm it with `npx -y -p @ory/claude-code ory-claude version`. To force the current release, clear the cache and reinstall: `rm -rf ~/.npm/_npx` then `npx -y -p @ory/claude-code ory-claude install`. Pinning an exact version (`@ory/claude-code@<version>`) also bypasses the cached copy.
|
|
139
147
|
- **Hooks stuck on an old version** — run `/plugin marketplace update ory` inside Claude Code, or re-run the installer.
|
|
140
|
-
- **Want to see what's happening** — `npx -y -p @ory/claude-code ory-claude status` for a snapshot, `npx -y -p @ory/claude-code ory-claude 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/claude-code/` (see [See what's happening](#see-whats-happening)).
|
|
141
148
|
|
|
142
149
|
## Learn more
|
|
143
150
|
|
package/dist/cli/main.js
CHANGED
|
@@ -49,11 +49,23 @@ const fs = __importStar(require("node:fs"));
|
|
|
49
49
|
const argus_1 = require("@ory/argus");
|
|
50
50
|
const setup_js_1 = require("./setup.js");
|
|
51
51
|
const PACKAGE_ROOT = path.resolve(__dirname, "..", "..");
|
|
52
|
-
|
|
52
|
+
/** Resolved per call: see the note on `persistentDir()` in ./setup.ts. */
|
|
53
|
+
function persistentDir() {
|
|
54
|
+
return (0, argus_1.getHarnessDataDir)("claude-code");
|
|
55
|
+
}
|
|
53
56
|
function main() {
|
|
54
57
|
const [command, ...args] = process.argv.slice(2);
|
|
58
|
+
// `--help` after a matched subcommand: print usage, do nothing else.
|
|
59
|
+
// Without this the switch below ignores the flag and `install --help`
|
|
60
|
+
// performs a real install (#221).
|
|
61
|
+
if ((0, argus_1.shouldPrintHelp)(command, args))
|
|
62
|
+
return help();
|
|
55
63
|
switch (command) {
|
|
56
64
|
case "install":
|
|
65
|
+
if (args.includes("--print")) {
|
|
66
|
+
(0, setup_js_1.printInstallPlan)(args);
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
57
69
|
(0, argus_1.beginDeferNextSteps)();
|
|
58
70
|
(0, setup_js_1.install)(args);
|
|
59
71
|
(0, argus_1.runPostInstall)("ory-claude", "claude-code", args).then(() => process.exit(0), (err) => {
|
|
@@ -63,7 +75,10 @@ function main() {
|
|
|
63
75
|
break;
|
|
64
76
|
case "uninstall":
|
|
65
77
|
(0, setup_js_1.uninstall)(args);
|
|
66
|
-
(0, argus_1.clearCredentialsForUninstall)(
|
|
78
|
+
(0, argus_1.clearCredentialsForUninstall)({
|
|
79
|
+
harness: "claude-code",
|
|
80
|
+
purge: args.includes("--purge"),
|
|
81
|
+
}).then(() => process.exit(0), (err) => {
|
|
67
82
|
console.error(err.message ?? err);
|
|
68
83
|
process.exit(1);
|
|
69
84
|
});
|
|
@@ -72,7 +87,7 @@ function main() {
|
|
|
72
87
|
(0, argus_1.runConfigureCommand)("ory-claude", args);
|
|
73
88
|
break;
|
|
74
89
|
case "agent":
|
|
75
|
-
(0, argus_1.runAgentCommand)("ory-claude", args).then((code) => process.exit(code), (err) => {
|
|
90
|
+
(0, argus_1.runAgentCommand)("ory-claude", "claude-code", args).then((code) => process.exit(code), (err) => {
|
|
76
91
|
console.error(err.message ?? err);
|
|
77
92
|
process.exit(1);
|
|
78
93
|
});
|
|
@@ -89,17 +104,11 @@ function main() {
|
|
|
89
104
|
process.exit(1);
|
|
90
105
|
});
|
|
91
106
|
break;
|
|
92
|
-
case "local":
|
|
93
|
-
(0, argus_1.runLocalCommand)("ory-claude", args).catch((err) => {
|
|
94
|
-
console.error(err.message ?? err);
|
|
95
|
-
process.exit(1);
|
|
96
|
-
});
|
|
97
|
-
break;
|
|
98
107
|
case "watch":
|
|
99
|
-
(0, argus_1.runWatchCommand)("claude-code", args);
|
|
108
|
+
(0, argus_1.runWatchCommand)("ory-claude", "claude-code", args).then((code) => process.exit(code), (err) => { console.error(err.message ?? err); process.exit(1); });
|
|
100
109
|
break;
|
|
101
|
-
case "
|
|
102
|
-
(0, argus_1.
|
|
110
|
+
case "local":
|
|
111
|
+
(0, argus_1.runLocalCommand)("ory-claude", args).catch((err) => {
|
|
103
112
|
console.error(err.message ?? err);
|
|
104
113
|
process.exit(1);
|
|
105
114
|
});
|
|
@@ -125,24 +134,30 @@ async function status() {
|
|
|
125
134
|
await (0, argus_1.runStatusCommand)("ory-claude", "claude-code", {
|
|
126
135
|
title: "Claude Code",
|
|
127
136
|
printPluginSection: () => {
|
|
128
|
-
//
|
|
129
|
-
//
|
|
130
|
-
//
|
|
131
|
-
|
|
132
|
-
|
|
137
|
+
// A wiped data dir leaves the harness pointing at a marketplace root
|
|
138
|
+
// that no longer exists, and its plugin surface then fails with an error
|
|
139
|
+
// that never mentions Ory. Say so here, with the repair (#206).
|
|
140
|
+
const dangling = (0, argus_1.findDanglingRegistration)("claude-code");
|
|
141
|
+
if (dangling) {
|
|
142
|
+
console.log("");
|
|
143
|
+
console.log(` ! ${(0, argus_1.describeDanglingRegistration)(dangling)}`);
|
|
144
|
+
console.log("");
|
|
145
|
+
}
|
|
133
146
|
console.log("Hooks & plugin:");
|
|
134
|
-
//
|
|
135
|
-
//
|
|
136
|
-
//
|
|
137
|
-
//
|
|
138
|
-
|
|
139
|
-
//
|
|
140
|
-
|
|
141
|
-
|
|
147
|
+
// What the harness will actually load. The runtime is resolved at
|
|
148
|
+
// install time, so the wired code and this CLI's own version can
|
|
149
|
+
// legitimately differ — report the runtime, not our own version. Run
|
|
150
|
+
// `claude plugin list` for the `claude` CLI's view of registrations.
|
|
151
|
+
console.log(` Runtime: ${(0, argus_1.describeRuntimeHealth)((0, argus_1.checkRuntimeHealth)("claude-code"))}`);
|
|
152
|
+
// The data dir doubles as the default activity/debug-log home, so it exists
|
|
153
|
+
// after any session regardless of install state — its mere presence does
|
|
154
|
+
// NOT mean a plugin was assembled here. `isPluginAssembled` keys off the
|
|
155
|
+
// `.claude-plugin` manifest, which only `install` writes.
|
|
156
|
+
const assembled = (0, setup_js_1.isPluginAssembled)(persistentDir());
|
|
157
|
+
console.log(` Plugin dir: ${assembled ? persistentDir() : "(none — run 'ory-claude install')"}`);
|
|
142
158
|
if (assembled) {
|
|
143
|
-
console.log(` Skills: ${fs.existsSync(path.join(
|
|
159
|
+
console.log(` Skills: ${fs.existsSync(path.join(persistentDir(), "skills")) ? "installed" : "not installed"}`);
|
|
144
160
|
}
|
|
145
|
-
console.log(` Hook script: ${fs.existsSync(path.join(PACKAGE_ROOT, "dist", "hook.js")) ? "built" : "NOT BUILT (run pnpm build)"}`);
|
|
146
161
|
},
|
|
147
162
|
});
|
|
148
163
|
}
|
|
@@ -159,10 +174,10 @@ Commands:
|
|
|
159
174
|
uninstall [--global] Remove Ory plugin and marketplace
|
|
160
175
|
configure Set or view Ory project URL and API key
|
|
161
176
|
agent <cmd> Manage the agent's OAuth2 (DCR) identity (status, unregister)
|
|
162
|
-
permissions
|
|
177
|
+
permissions Show the live permission mode and per-tool coverage
|
|
163
178
|
status Show plugin status and configuration
|
|
164
|
-
|
|
165
|
-
|
|
179
|
+
watch [--json] [--lines <count>]
|
|
180
|
+
Follow the live activity/debug log
|
|
166
181
|
version Show version and the ory-agent-plugins build commit
|
|
167
182
|
local <cmd> Manage local Ory dev environment (up, down, status, seed, ...)
|
|
168
183
|
|
|
@@ -170,7 +185,7 @@ Examples:
|
|
|
170
185
|
npx @ory/claude-code install # Install remotely (no prior npm install needed)
|
|
171
186
|
npx @ory/claude-code install --global # Install globally (user scope)
|
|
172
187
|
npx -y -p @ory/claude-code ory-claude install # Install from local/global npm installation
|
|
173
|
-
npx -y -p @ory/claude-code ory-claude configure --project-url https://your-project.projects.oryapis.com --
|
|
188
|
+
npx -y -p @ory/claude-code ory-claude configure --project-url https://your-project.projects.oryapis.com --agent-security-url https://agents.console.ory.com
|
|
174
189
|
npx -y -p @ory/claude-code ory-claude status # Check configuration
|
|
175
190
|
npx -y -p @ory/claude-code ory-claude uninstall # Remove plugin
|
|
176
191
|
`);
|
package/dist/cli/setup.d.ts
CHANGED
|
@@ -2,47 +2,57 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Setup CLI for the Ory Claude Code plugin.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
5
|
+
* Assembles the plugin locally and hands it to the `claude` CLI as a
|
|
6
|
+
* local-file marketplace:
|
|
6
7
|
* npx ory-claude-setup # Install plugin (project scope)
|
|
7
8
|
* npx ory-claude-setup --global # Install plugin (user scope)
|
|
8
|
-
* npx ory-claude-setup --
|
|
9
|
+
* npx ory-claude-setup --runtime-dir <d> # Wire a workspace build (dev only)
|
|
9
10
|
* npx ory-claude-setup --uninstall # Remove plugin
|
|
11
|
+
*
|
|
12
|
+
* The plugin's runtime is resolved **once, here** — materialized into the
|
|
13
|
+
* shared runtime store (or linked to a workspace build) and wired through a
|
|
14
|
+
* stable shim, so no package resolution happens on the tool-call path. That is
|
|
15
|
+
* why the install always assembles: the generated `hooks.json` / `.mcp.json`
|
|
16
|
+
* carry this machine's shim paths, which a marketplace fetched from GitHub
|
|
17
|
+
* cannot. The public `ory/claude-plugins` mirror stays a valid install route
|
|
18
|
+
* on its own terms (it ships a bootstrap keyed off `${CLAUDE_PLUGIN_ROOT}`).
|
|
10
19
|
*/
|
|
20
|
+
import { type PreparedRuntime } from "@ory/argus";
|
|
11
21
|
/**
|
|
12
|
-
*
|
|
22
|
+
* Assemble the Claude Code plugin directory in the persistent location and
|
|
23
|
+
* return its path (the marketplace root).
|
|
13
24
|
*
|
|
14
|
-
* The
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* it's the reliable signal that this dir holds a from-source plugin.
|
|
25
|
+
* The plugin manifest (`.claude-plugin/`) is copied from the package; the
|
|
26
|
+
* skills, commands, hooks, and MCP config are generated: skills/commands come
|
|
27
|
+
* from the shared `@ory/argus` templates (the single source of truth across
|
|
28
|
+
* every harness), and `hooks.json` / `.mcp.json` are written with the shim
|
|
29
|
+
* paths this machine's runtime resolved to.
|
|
20
30
|
*/
|
|
21
|
-
export declare function
|
|
31
|
+
export declare function assemblePluginDir(runtime: PreparedRuntime): string;
|
|
22
32
|
/**
|
|
23
|
-
*
|
|
33
|
+
* Whether an Ory plugin tree was assembled into `dir`.
|
|
24
34
|
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
35
|
+
* The data dir doubles as the default activity/debug-log home (`fromEnv` writes
|
|
36
|
+
* `ory-agent-debug.log` there on every session), so
|
|
37
|
+
* its mere existence does NOT indicate an install. The plugin manifest
|
|
38
|
+
* (`.claude-plugin`) is written only by {@link assemblePluginDir}, so it's the
|
|
39
|
+
* reliable signal that this dir holds an assembled plugin.
|
|
40
|
+
*/
|
|
41
|
+
export declare function isPluginAssembled(dir: string): boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Install the Ory plugin via the `claude` CLI.
|
|
33
44
|
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
45
|
+
* The runtime is resolved here, once: materialized into the shared runtime
|
|
46
|
+
* store from npm (or linked to a workspace build with `--link`), then wired
|
|
47
|
+
* through a stable shim that the generated `hooks.json` / `.mcp.json` point
|
|
48
|
+
* at. Because those files carry machine-specific shim paths, the plugin tree
|
|
49
|
+
* is always assembled locally and registered as a local-file marketplace.
|
|
39
50
|
*/
|
|
40
51
|
export declare function install(args: string[]): void;
|
|
52
|
+
export declare function printInstallPlan(args: string[]): void;
|
|
41
53
|
/**
|
|
42
|
-
* Uninstall the Ory plugin via the `claude` CLI
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
* - `--from-source`: uninstall the locally-assembled plugin, remove its
|
|
46
|
-
* marketplace entry, and clean up the assembled directory.
|
|
54
|
+
* Uninstall the Ory plugin via the `claude` CLI: remove the plugin and its
|
|
55
|
+
* marketplace entry, delete the assembled plugin tree, and drop the runtime
|
|
56
|
+
* wiring (shim + any store no other harness still references).
|
|
47
57
|
*/
|
|
48
58
|
export declare function uninstall(args: string[]): void;
|