@ory/gemini-cli 1.2.4 → 1.3.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 CHANGED
@@ -119,7 +119,7 @@ npx -y -p @ory/gemini-cli ory-gemini configure \
119
119
 
120
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.
121
121
 
122
- **There is nothing else for you to create.** The sign-in client, permission model, native-tool blocks, MCP grants, and observe/enforce posture are provisioned in the Console by someone with project access. At runtime the plugin only *reads* permissions, so installing it needs no workspace privilege. Each Gemini session registers its own identity automatically on first use.
122
+ **There is nothing else for you to create.** The sign-in client, permission model, native-tool blocks, MCP grants, and observe/enforce posture are provisioned in the Console by someone with project access. At session start the plugin loads or enrolls Gemini's Talos runtime credential in the OS credential store; tool paths only read it. Installing needs no workspace privilege.
123
123
 
124
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.
125
125
 
@@ -132,7 +132,7 @@ ory-gemini install | uninstall Install (add --project-url to also connect
132
132
  ory-gemini status Show configuration, identities, native tool access, recent activity
133
133
  ory-gemini permissions <cmd> status (read-only; blocks + posture live in the Ory Console)
134
134
  ory-gemini configure <flags> Connect a project (--project-url) or --disconnect
135
- ory-gemini agent <status|unregister> Manage Gemini's own auto-created identity
135
+ ory-gemini agent <status|unregister> Inspect runtime status / clear legacy OAuth state
136
136
  ory-gemini local <up|down|status|…> Run / manage a local Ory in Docker
137
137
  ory-gemini version Print plugin, core, and Node versions (--json for machine-readable)
138
138
  ```
@@ -142,7 +142,7 @@ All prefixed with `npx -y -p @ory/gemini-cli`.
142
142
  ## Troubleshooting
143
143
 
144
144
  - **`/ory:local-up` fails** — make sure Docker is running and ports `4000`, `4100`, `4455`, and `16686` are free.
145
- - **Browser sign-in loops** (after connecting) — reset with `ory-gemini agent unregister` and try again.
145
+ - **Browser sign-in loops** (after connecting) — confirm the reserved login client has all four documented loopback redirect URIs; `agent unregister` only clears legacy agent OAuth state.
146
146
  - **Running an older CLI than expected** — `npx -p @ory/gemini-cli` (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/gemini-cli ory-gemini version`. To force the current release, clear the cache and reinstall: `rm -rf ~/.npm/_npx` then `npx -y -p @ory/gemini-cli ory-gemini install`. Pinning an exact version (`@ory/gemini-cli@<version>`) also bypasses the cached copy.
147
147
 
148
148
  ## Learn more
@@ -129,10 +129,9 @@ function renderHooks(command) {
129
129
  * - `contextFileName: GEMINI.md` for the model-facing context briefing.
130
130
  * - `mcpServers.ory` so the Ory MCP server is auto-registered alongside
131
131
  * the hooks, started from the resolved runtime via its shim.
132
- * - A minimal `settings` block. Only `ORY_PROJECT_URL` is prompted now —
133
- * the agent identity is resolved via Dynamic Client Registration, and
134
- * the legacy ORY_API_KEY / ORY_SESSION_TOKEN prompts were teaching
135
- * users the deprecated path.
132
+ * - A minimal `settings` block. Only `ORY_PROJECT_URL` is prompted; session
133
+ * start resolves or enrolls the Talos runtime identity, and legacy admin
134
+ * key/session-token prompts taught users the wrong path.
136
135
  */
137
136
  function renderManifest(version, mcpServer) {
138
137
  return {
package/dist/cli/main.js CHANGED
@@ -132,11 +132,11 @@ function main() {
132
132
  });
133
133
  break;
134
134
  case "uninstall":
135
- uninstall(args);
135
+ const geminiUninstalled = uninstall(args);
136
136
  (0, argus_1.clearCredentialsForUninstall)({
137
137
  harness: "gemini-cli",
138
138
  purge: args.includes("--purge"),
139
- }).then(() => process.exit(0), (err) => {
139
+ }).then(() => process.exit(geminiUninstalled ? 0 : 1), (err) => {
140
140
  console.error(err.message ?? err);
141
141
  process.exit(1);
142
142
  });
@@ -250,18 +250,19 @@ function uninstall(args) {
250
250
  stdio: "pipe",
251
251
  shell: SPAWN_VIA_SHELL,
252
252
  }).status === 0;
253
+ let nativeUninstalled = true;
253
254
  if (geminiAvailable) {
254
255
  console.log("Uninstalling Ory extension...");
255
- (0, node_child_process_1.spawnSync)("gemini", ["extensions", "uninstall", "ory"], {
256
- stdio: "inherit",
257
- shell: SPAWN_VIA_SHELL,
258
- });
259
- }
260
- else {
261
- const setupArgs = ["--uninstall", ...args];
262
- process.argv = ["node", "setup.js", ...setupArgs];
263
- require("./setup.js");
256
+ const outcome = runGeminiExtensions(["extensions", "uninstall", "ory"]);
257
+ if (!outcome.ok) {
258
+ nativeUninstalled = false;
259
+ console.error(`gemini extensions uninstall failed (${outcome.reason}). Continuing with manual cleanup...`);
260
+ }
264
261
  }
262
+ const setupArgs = ["--uninstall", ...args];
263
+ process.argv = ["node", "setup.js", ...setupArgs];
264
+ require("./setup.js");
265
+ return nativeUninstalled;
265
266
  }
266
267
  function manualSetup(args) {
267
268
  process.argv = ["node", "setup.js", ...args];
@@ -303,7 +304,7 @@ Commands:
303
304
  install [--link] Install the Ory extension into Gemini CLI
304
305
  uninstall Remove the Ory extension from Gemini CLI
305
306
  configure Set or view Ory project URL and API key
306
- agent <cmd> Manage the agent's OAuth2 (DCR) identity (status, unregister)
307
+ agent <cmd> Inspect runtime status or clear legacy OAuth state
307
308
  permissions Show live mode and native allowed/blocked state
308
309
  setup [--project-dir] Write hooks directly to settings.json (fallback)
309
310
  status Show plugin status and configuration
package/dist/cli/setup.js CHANGED
@@ -78,15 +78,16 @@ function main() {
78
78
  const existing = (0, argus_1.readJsonFile)(settingsPath);
79
79
  const geminiDir = path.join(args.projectDir, ".gemini");
80
80
  if (args.uninstall) {
81
- if (!fs.existsSync(settingsPath)) {
82
- console.log("No settings file found. Nothing to uninstall.");
83
- return;
81
+ if (fs.existsSync(settingsPath)) {
82
+ let updated = (0, argus_1.removeMatcherHooks)(existing, BIN_NAME);
83
+ updated = (0, argus_1.removeMcpServer)(updated);
84
+ (0, argus_1.writeJsonFile)(settingsPath, updated);
85
+ console.log(`Removed Ory hooks and MCP server from ${settingsPath}`);
86
+ }
87
+ else {
88
+ console.log("No settings file found. Skipping hook and MCP cleanup.");
84
89
  }
85
- let updated = (0, argus_1.removeMatcherHooks)(existing, BIN_NAME);
86
- updated = (0, argus_1.removeMcpServer)(updated);
87
- (0, argus_1.writeJsonFile)(settingsPath, updated);
88
90
  (0, assets_js_1.uninstallGeminiOryAssets)(geminiDir);
89
- console.log(`Removed Ory hooks and MCP server from ${settingsPath}`);
90
91
  console.log(`Removed Ory skills and commands from ${geminiDir}`);
91
92
  (0, argus_1.removeRuntimeWiring)("gemini-cli");
92
93
  for (const pruned of (0, argus_1.pruneRuntimeStores)()) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ory/gemini-cli",
3
- "version": "1.2.4",
3
+ "version": "1.3.1",
4
4
  "description": "Ory extension for Gemini CLI: 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",
@@ -71,7 +71,7 @@
71
71
  ],
72
72
  "dependencies": {
73
73
  "reova": "^0.7.0",
74
- "@ory/argus": "1.2.4"
74
+ "@ory/argus": "1.3.1"
75
75
  },
76
76
  "engines": {
77
77
  "node": ">=22"