@ory/claude-code 0.1.0 → 0.1.2

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.
@@ -1,11 +1,11 @@
1
1
  {
2
- "name": "ory-plugins",
2
+ "name": "ory-plugins-local-development",
3
3
  "owner": {
4
- "name": "Ory"
4
+ "name": "Ory (Local Development)"
5
5
  },
6
6
  "plugins": [
7
7
  {
8
- "name": "ory-claude",
8
+ "name": "ory-agent-plugin",
9
9
  "source": "./",
10
10
  "category": "development"
11
11
  }
@@ -1,10 +1,10 @@
1
1
  {
2
- "name": "ory-claude",
2
+ "name": "ory-agent-plugin",
3
3
  "version": "0.1.0",
4
- "description": "Ory authentication and authorization for Claude Code session auth, tool permissions, and audit logging",
4
+ "description": "Ory plugin for Claude Code: scaffolding skills, a local Ory instance, and authentication, authorization, and audit for every tool call",
5
5
  "author": {
6
6
  "name": "Ory",
7
7
  "url": "https://ory.com"
8
8
  },
9
- "homepage": "https://github.com/ory/claude-plugins"
9
+ "homepage": "https://www.npmjs.com/package/@ory/claude-code"
10
10
  }
package/README.md CHANGED
@@ -16,7 +16,7 @@ From inside Claude Code. Try these in order; the first that works is the simples
16
16
 
17
17
  ```
18
18
  /plugin marketplace add ory/claude-plugins
19
- /plugin install ory-claude@ory-plugins
19
+ /plugin install ory-agent-plugin@ory-plugins
20
20
  ```
21
21
 
22
22
  **3. The Ory installer.** No prior `npm install` required:
@@ -62,12 +62,12 @@ Bundled and registered automatically. It exposes the Ory CLI and the Ory Network
62
62
  - **Test** an auth integration end-to-end before pushing anything to a real environment.
63
63
  - **Develop** your application against the same identity, OAuth2, and permission surfaces you'll ship with.
64
64
 
65
- Point `ORY_PROJECT_URL` at `http://localhost:4000` (or run `npx ory-claude configure`) and the security features below run against the local stack.
65
+ Point `ORY_PROJECT_URL` at `http://localhost:4000` (or run `npx -y -p @ory/claude-code ory-claude configure`) and the security features below run against the local stack.
66
66
 
67
67
  ## Configure
68
68
 
69
69
  ```bash
70
- npx ory-claude configure --project-url https://<id>.projects.oryapis.com --api-key ory_pat_...
70
+ npx -y -p @ory/claude-code ory-claude configure --project-url https://<id>.projects.oryapis.com --api-key ory_pat_...
71
71
  ```
72
72
 
73
73
  Config is saved to `~/.config/ory-agent-plugins/config.json` and shared across every Ory agent plugin on the machine. Without it the plugin still loads cleanly and runs in **pass-through mode**: skills and commands work, but nothing is blocked.
@@ -85,11 +85,11 @@ The plugin is **fail-open** on its own infrastructure failures (network errors,
85
85
  ## CLI
86
86
 
87
87
  ```
88
- npx ory-claude install | uninstall [--global]
89
- npx ory-claude configure [--project-url <url>] [--api-key <key>] [--audit-only]
90
- npx ory-claude agent <status|unregister> Manage the agent's OAuth2 identity
91
- npx ory-claude local <up|down|status|seed|logs|env|configure|reset>
92
- npx ory-claude status
88
+ npx -y -p @ory/claude-code ory-claude install | uninstall [--global]
89
+ npx -y -p @ory/claude-code ory-claude configure [--project-url <url>] [--api-key <key>] [--audit-only]
90
+ npx -y -p @ory/claude-code ory-claude agent <status|unregister> Manage the agent's OAuth2 identity
91
+ npx -y -p @ory/claude-code ory-claude local <up|down|status|seed|logs|env|configure|reset>
92
+ npx -y -p @ory/claude-code ory-claude status
93
93
  ```
94
94
 
95
95
  ## Links
package/dist/cli/setup.js CHANGED
@@ -49,8 +49,41 @@ const fs = __importStar(require("node:fs"));
49
49
  const path = __importStar(require("node:path"));
50
50
  const argus_1 = require("@ory/argus");
51
51
  const PACKAGE_ROOT = path.resolve(__dirname, "..", "..");
52
- const MARKETPLACE_NAME = "ory-plugins";
53
- const PLUGIN_NAME = "ory-claude";
52
+ /**
53
+ * Resolve the marketplace and plugin names from the local `.claude-plugin/`
54
+ * JSON files instead of hardcoding them.
55
+ *
56
+ * Source of truth for both the dev launcher and any local `ory-claude install`
57
+ * run is `packages/claude-code/.claude-plugin/marketplace.json` (marketplace
58
+ * name) and `.claude-plugin/plugin.json` (plugin name). The local marketplace
59
+ * uses intentionally dev-flavored names — e.g. `ory-plugins-local-development`
60
+ * and `ory-agent-plugin` — so a developer can see at a glance the install
61
+ * came from this monorepo, not the production `ory/claude-plugins` repo the
62
+ * release workflow syncs to.
63
+ *
64
+ * The previous hardcoded `ory-plugins` / `ory-claude` constants caused
65
+ * `claude plugin install ory-claude@ory-plugins` to fail with "Plugin
66
+ * 'ory-claude' not found in marketplace 'ory-plugins'" because the
67
+ * assembled local marketplace announces different names. Reading the
68
+ * names from disk keeps the install CLI in lockstep with whatever the
69
+ * marketplace files actually declare.
70
+ */
71
+ function readMarketplaceName() {
72
+ const mfPath = path.join(PACKAGE_ROOT, ".claude-plugin", "marketplace.json");
73
+ const data = JSON.parse(fs.readFileSync(mfPath, "utf-8"));
74
+ if (!data.name) {
75
+ throw new Error(`Marketplace name missing from ${mfPath}`);
76
+ }
77
+ return data.name;
78
+ }
79
+ function readPluginName() {
80
+ const pjPath = path.join(PACKAGE_ROOT, ".claude-plugin", "plugin.json");
81
+ const data = JSON.parse(fs.readFileSync(pjPath, "utf-8"));
82
+ if (!data.name) {
83
+ throw new Error(`Plugin name missing from ${pjPath}`);
84
+ }
85
+ return data.name;
86
+ }
54
87
  const RENDER_OPTS = {
55
88
  binName: "ory-claude",
56
89
  packageName: "@ory/claude-code",
@@ -182,6 +215,9 @@ function install(args) {
182
215
  console.log("Assembling Ory plugin (skills, commands, hooks, MCP) at:");
183
216
  console.log(` ${PERSISTENT_DIR}`);
184
217
  const pluginRoot = assemblePluginDir(remote ? HOOK_CMD_REMOTE : localHookCommand());
218
+ const marketplaceName = readMarketplaceName();
219
+ const pluginName = readPluginName();
220
+ console.log(`Source: ${pluginName}@${marketplaceName} (from ${pluginRoot})`);
185
221
  // Step 1: Add the Ory marketplace
186
222
  console.log("Adding Ory plugin marketplace...");
187
223
  const addResult = runClaude([
@@ -195,7 +231,7 @@ function install(args) {
195
231
  if (!addResult.ok) {
196
232
  if (addResult.output.toLowerCase().includes("already")) {
197
233
  console.log(" Marketplace already registered, updating...");
198
- runClaude(["plugin", "marketplace", "update", MARKETPLACE_NAME]);
234
+ runClaude(["plugin", "marketplace", "update", marketplaceName]);
199
235
  }
200
236
  else {
201
237
  console.error(`Failed to add marketplace: ${addResult.output}`);
@@ -206,11 +242,11 @@ function install(args) {
206
242
  console.log(" Marketplace added.");
207
243
  }
208
244
  // Step 2: Install the plugin from the marketplace
209
- console.log("Installing ory-claude plugin...");
245
+ console.log(`Installing ${pluginName} plugin...`);
210
246
  const installResult = runClaude([
211
247
  "plugin",
212
248
  "install",
213
- `${PLUGIN_NAME}@${MARKETPLACE_NAME}`,
249
+ `${pluginName}@${marketplaceName}`,
214
250
  "--scope",
215
251
  scope,
216
252
  ]);
@@ -235,12 +271,14 @@ function uninstall(args) {
235
271
  console.error("Error: 'claude' CLI not found in PATH.");
236
272
  process.exit(1);
237
273
  }
274
+ const marketplaceName = readMarketplaceName();
275
+ const pluginName = readPluginName();
238
276
  // Step 1: Uninstall the plugin
239
- console.log("Uninstalling ory-claude plugin...");
277
+ console.log(`Uninstalling ${pluginName} plugin...`);
240
278
  const uninstallResult = runClaude([
241
279
  "plugin",
242
280
  "uninstall",
243
- PLUGIN_NAME,
281
+ pluginName,
244
282
  "--scope",
245
283
  scope,
246
284
  ]);
@@ -256,7 +294,7 @@ function uninstall(args) {
256
294
  "plugin",
257
295
  "marketplace",
258
296
  "remove",
259
- MARKETPLACE_NAME,
297
+ marketplaceName,
260
298
  ]);
261
299
  if (!removeResult.ok) {
262
300
  console.warn(` Warning: ${removeResult.output}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ory/claude-code",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Ory plugin for Claude Code: 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://ory.com",
@@ -45,7 +45,9 @@
45
45
  "hydra"
46
46
  ],
47
47
  "publishConfig": {
48
- "access": "public"
48
+ "access": "public",
49
+ "registry": "https://registry.npmjs.org/",
50
+ "provenance": true
49
51
  },
50
52
  "main": "dist/index.js",
51
53
  "types": "dist/index.d.ts",
@@ -70,7 +72,7 @@
70
72
  "!dist/**/*.tsbuildinfo"
71
73
  ],
72
74
  "dependencies": {
73
- "@ory/argus": "0.1.0"
75
+ "@ory/argus": "0.1.2"
74
76
  },
75
77
  "engines": {
76
78
  "node": ">=24"