@ory/claude-code 0.1.1 → 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.
@@ -0,0 +1,13 @@
1
+ {
2
+ "name": "ory-plugins-local-development",
3
+ "owner": {
4
+ "name": "Ory (Local Development)"
5
+ },
6
+ "plugins": [
7
+ {
8
+ "name": "ory-agent-plugin",
9
+ "source": "./",
10
+ "category": "development"
11
+ }
12
+ ]
13
+ }
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.1",
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",
@@ -72,7 +72,7 @@
72
72
  "!dist/**/*.tsbuildinfo"
73
73
  ],
74
74
  "dependencies": {
75
- "@ory/argus": "0.1.1"
75
+ "@ory/argus": "0.1.2"
76
76
  },
77
77
  "engines": {
78
78
  "node": ">=24"