@ory/gemini-cli 0.3.0 → 0.5.0
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 +17 -14
- package/dist/cli/assets.d.ts +11 -8
- package/dist/cli/assets.js +99 -9
- package/dist/cli/main.js +30 -16
- package/gemini-extension/GEMINI.md +46 -3
- package/package.json +3 -4
- package/gemini-extension/gemini-extension.json +0 -26
- package/gemini-extension/hooks/hooks.json +0 -102
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ You don't need an Ory account or any prior Ory experience to start.
|
|
|
7
7
|
## Prerequisites
|
|
8
8
|
|
|
9
9
|
- [Gemini CLI](https://github.com/google-gemini/gemini-cli) installed and signed in
|
|
10
|
-
- Node.js **≥ 24**
|
|
10
|
+
- Node.js **≥ 24** (matches the Ory plugin toolchain — `nvm use 24` or `volta install node@24`)
|
|
11
11
|
- [Docker](https://docs.docker.com/get-docker/) (only needed for the local Ory stack)
|
|
12
12
|
- macOS or Linux. Windows works via WSL2.
|
|
13
13
|
|
|
@@ -16,7 +16,7 @@ You don't need an Ory account or any prior Ory experience to start.
|
|
|
16
16
|
In your shell:
|
|
17
17
|
|
|
18
18
|
```bash
|
|
19
|
-
gemini extensions install ory-
|
|
19
|
+
gemini extensions install https://github.com/ory/gemini-cli-extension
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
That's it — skills, TOML slash commands, hooks, and the Ory MCP server are now registered.
|
|
@@ -24,20 +24,14 @@ That's it — skills, TOML slash commands, hooks, and the Ory MCP server are now
|
|
|
24
24
|
<details>
|
|
25
25
|
<summary>Alternative install paths</summary>
|
|
26
26
|
|
|
27
|
-
If the public extension registry isn't available, either of these registers the same extension:
|
|
28
|
-
|
|
29
|
-
```bash
|
|
30
|
-
# Ory-hosted extension source
|
|
31
|
-
gemini extensions install https://github.com/ory/gemini-cli-extension
|
|
32
|
-
```
|
|
33
|
-
|
|
34
27
|
```bash
|
|
35
|
-
# Direct installer
|
|
36
|
-
|
|
37
|
-
npx @ory/gemini-cli
|
|
28
|
+
# Direct installer; renders a fresh extension manifest and invokes
|
|
29
|
+
# `gemini extensions install` for you. No prior npm install required.
|
|
30
|
+
npx -y @ory/gemini-cli install
|
|
31
|
+
npx -y @ory/gemini-cli uninstall
|
|
38
32
|
```
|
|
39
33
|
|
|
40
|
-
If the `gemini` binary isn't on your `PATH`, `npx -y -p @ory/gemini-cli ory-gemini-setup` writes the extension config directly.
|
|
34
|
+
If the `gemini` binary isn't on your `PATH`, `npx -y -p @ory/gemini-cli ory-gemini-setup` writes the extension config directly into your project's `.gemini/settings.json`.
|
|
41
35
|
|
|
42
36
|
</details>
|
|
43
37
|
|
|
@@ -59,18 +53,27 @@ From any project where you'd like Ory authentication, inside Gemini CLI:
|
|
|
59
53
|
|
|
60
54
|
3. **Sign in.** Start your app, visit the login page Gemini added, and sign in with the seeded credentials. You now have a real Ory session backed by a real Ory stack — locally, offline, with zero configuration.
|
|
61
55
|
|
|
56
|
+
4. **Turn on Ory login for the Gemini session itself.** *(Optional but recommended.)* Out of the box the extension only governs your *app*. To also attach an Ory identity to *Gemini's* session — so every tool call is attributed to you, not a fallback `session:<id>` subject — set:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
export ORY_AUTH_GATE=1
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Then restart Gemini CLI. On next session start, Gemini opens an Ory login in your browser; sign in with the same seeded credentials from step 1. This is what makes `permissions enforce` (see [Agent security](#agent-security)) deny on the right identity later.
|
|
63
|
+
|
|
62
64
|
That's the full Ory DX path. Stop here if you're just evaluating the extension. Continue to [Agent security](#agent-security) when you're ready to enforce.
|
|
63
65
|
|
|
64
66
|
## What's included
|
|
65
67
|
|
|
66
68
|
### Skills for scaffolding Ory into your application
|
|
67
69
|
|
|
68
|
-
The extension bundles
|
|
70
|
+
The extension bundles five skills that Gemini auto-invokes by description. Ask Gemini in natural language or invoke a skill directly:
|
|
69
71
|
|
|
70
72
|
- **`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.
|
|
71
73
|
- **`ory-login-flow`** — login, registration, recovery, verification, and settings pages with Ory Elements. Next.js App Router and React SPA variants.
|
|
72
74
|
- **`ory-social-login`** — Google, GitHub, Apple, Microsoft, Discord, and other OIDC providers with Jsonnet data mappers.
|
|
73
75
|
- **`ory-local-dev`** — drive the local Ory stack from within Gemini to prototype and test without a remote project.
|
|
76
|
+
- **`ory-permissions-onboarding`** — bootstrap permission tuples for built-in tools, switch between observe and enforce mode, troubleshoot denials.
|
|
74
77
|
|
|
75
78
|
### Ory MCP server
|
|
76
79
|
|
package/dist/cli/assets.d.ts
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Materialize / clean the Ory skill catalog
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
2
|
+
* Materialize / clean the Ory skill catalog, slash commands, hook
|
|
3
|
+
* registration, and extension manifest for the Gemini CLI plugin.
|
|
4
|
+
*
|
|
5
|
+
* The manifest and hooks.json are rendered at install time (not shipped
|
|
6
|
+
* static) so the version pin baked into the hook command always matches
|
|
7
|
+
* the installed package, and the mcpServers entry stays in sync with the
|
|
8
|
+
* @ory/mcp-server package we depend on.
|
|
7
9
|
*/
|
|
8
10
|
/**
|
|
9
|
-
* Write all Ory skills
|
|
10
|
-
*
|
|
11
|
-
* `commands
|
|
11
|
+
* Write all Ory skills, TOML slash commands, the rendered manifest, and
|
|
12
|
+
* the rendered hooks.json under a Gemini-conventional root containing
|
|
13
|
+
* `skills/`, `commands/`, `hooks/`, `gemini-extension.json`, and
|
|
14
|
+
* `GEMINI.md`. For the bundled extension that's the `gemini-extension`
|
|
12
15
|
* directory; for the manual-setup fallback it's `<projectDir>/.gemini`.
|
|
13
16
|
*/
|
|
14
17
|
export declare function installGeminiOryAssets(root: string): void;
|
package/dist/cli/assets.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Materialize / clean the Ory skill catalog
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
3
|
+
* Materialize / clean the Ory skill catalog, slash commands, hook
|
|
4
|
+
* registration, and extension manifest for the Gemini CLI plugin.
|
|
5
|
+
*
|
|
6
|
+
* The manifest and hooks.json are rendered at install time (not shipped
|
|
7
|
+
* static) so the version pin baked into the hook command always matches
|
|
8
|
+
* the installed package, and the mcpServers entry stays in sync with the
|
|
9
|
+
* @ory/mcp-server package we depend on.
|
|
8
10
|
*/
|
|
9
11
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
12
|
if (k2 === undefined) k2 = k;
|
|
@@ -45,9 +47,13 @@ exports.uninstallGeminiOryAssets = uninstallGeminiOryAssets;
|
|
|
45
47
|
const fs = __importStar(require("node:fs"));
|
|
46
48
|
const path = __importStar(require("node:path"));
|
|
47
49
|
const argus_1 = require("@ory/argus");
|
|
50
|
+
const PACKAGE_NAME = "@ory/gemini-cli";
|
|
51
|
+
const MCP_PACKAGE_NAME = "@ory/mcp-server";
|
|
52
|
+
const MCP_BIN_NAME = "ory-mcp-server";
|
|
53
|
+
const EXTENSION_NAME = "ory";
|
|
48
54
|
const RENDER_OPTS = {
|
|
49
55
|
binName: "ory-gemini",
|
|
50
|
-
packageName:
|
|
56
|
+
packageName: PACKAGE_NAME,
|
|
51
57
|
};
|
|
52
58
|
/**
|
|
53
59
|
* Subdir under `commands/` for our TOML files. The folder name becomes the
|
|
@@ -56,12 +62,92 @@ const RENDER_OPTS = {
|
|
|
56
62
|
*/
|
|
57
63
|
const CMD_SUBDIR = "ory";
|
|
58
64
|
/**
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
65
|
+
* Read the plugin's own version from its package.json, walking up from
|
|
66
|
+
* dist/cli to the package root. Used to version-pin the npx invocation
|
|
67
|
+
* shipped in hooks.json so installs keep running against the version
|
|
68
|
+
* they were registered with.
|
|
69
|
+
*/
|
|
70
|
+
function readPackageVersion() {
|
|
71
|
+
const pkgPath = path.resolve(__dirname, "..", "..", "package.json");
|
|
72
|
+
const raw = fs.readFileSync(pkgPath, "utf-8");
|
|
73
|
+
const parsed = JSON.parse(raw);
|
|
74
|
+
if (!parsed.version) {
|
|
75
|
+
throw new Error(`Could not read version from ${pkgPath}`);
|
|
76
|
+
}
|
|
77
|
+
return parsed.version;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Render the hooks.json that Gemini CLI registers when it copies the
|
|
81
|
+
* extension into ~/.gemini/extensions/ory. The hook command is a
|
|
82
|
+
* self-contained `npx -y -p @ory/gemini-cli@<version> ory-gemini-hook`
|
|
83
|
+
* so the binary doesn't have to be on PATH after install.
|
|
84
|
+
*/
|
|
85
|
+
function renderHooks(version) {
|
|
86
|
+
const command = `npx -y -p ${PACKAGE_NAME}@${version} ory-gemini-hook`;
|
|
87
|
+
const entry = (name, description, timeout) => [
|
|
88
|
+
{
|
|
89
|
+
matcher: "",
|
|
90
|
+
hooks: [{ name, type: "command", command, timeout, description }],
|
|
91
|
+
},
|
|
92
|
+
];
|
|
93
|
+
return {
|
|
94
|
+
hooks: {
|
|
95
|
+
SessionStart: entry("ory-session-start", "Verify the user and agent identities via Ory", 10000),
|
|
96
|
+
SessionEnd: entry("ory-session-end", "Record session termination via Ory tracing", 5000),
|
|
97
|
+
BeforeTool: entry("ory-before-tool", "Check tool permissions via Ory Permissions", 5000),
|
|
98
|
+
AfterTool: entry("ory-after-tool", "Record trace spans for tool executions via Ory", 5000),
|
|
99
|
+
BeforeToolSelection: entry("ory-before-tool-selection", "Audit-only span for the upcoming tool-selection decision", 5000),
|
|
100
|
+
Notification: entry("ory-notification", "Audit permission and notification prompts", 5000),
|
|
101
|
+
PreCompress: entry("ory-pre-compress", "Audit history compaction events", 5000),
|
|
102
|
+
},
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Render gemini-extension.json. Ships:
|
|
107
|
+
*
|
|
108
|
+
* - `name` / `version` so Gemini's `extensions list` shows the right
|
|
109
|
+
* package and tracks updates.
|
|
110
|
+
* - `contextFileName: GEMINI.md` for the model-facing context briefing.
|
|
111
|
+
* - `mcpServers.ory` so the Ory MCP server is auto-registered alongside
|
|
112
|
+
* the hooks. Resolved via npx for the same reason as the hook command:
|
|
113
|
+
* the binary needn't be on PATH.
|
|
114
|
+
* - A minimal `settings` block. Only `ORY_PROJECT_URL` is prompted now —
|
|
115
|
+
* the agent identity is resolved via Dynamic Client Registration, and
|
|
116
|
+
* the legacy ORY_API_KEY / ORY_SESSION_TOKEN prompts were teaching
|
|
117
|
+
* users the deprecated path.
|
|
118
|
+
*/
|
|
119
|
+
function renderManifest(version) {
|
|
120
|
+
return {
|
|
121
|
+
name: EXTENSION_NAME,
|
|
122
|
+
version,
|
|
123
|
+
description: "Ory authentication, authorization, and distributed tracing for Gemini CLI",
|
|
124
|
+
contextFileName: "GEMINI.md",
|
|
125
|
+
mcpServers: {
|
|
126
|
+
[EXTENSION_NAME]: {
|
|
127
|
+
command: "npx",
|
|
128
|
+
args: ["-y", "-p", `${MCP_PACKAGE_NAME}@${version}`, MCP_BIN_NAME],
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
settings: [
|
|
132
|
+
{
|
|
133
|
+
name: "Ory Project URL",
|
|
134
|
+
description: "Your Ory project URL (e.g. https://your-project.projects.oryapis.com). Leave unset to run in pass-through mode against a local stack.",
|
|
135
|
+
envVar: "ORY_PROJECT_URL",
|
|
136
|
+
sensitive: false,
|
|
137
|
+
},
|
|
138
|
+
],
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Write all Ory skills, TOML slash commands, the rendered manifest, and
|
|
143
|
+
* the rendered hooks.json under a Gemini-conventional root containing
|
|
144
|
+
* `skills/`, `commands/`, `hooks/`, `gemini-extension.json`, and
|
|
145
|
+
* `GEMINI.md`. For the bundled extension that's the `gemini-extension`
|
|
62
146
|
* directory; for the manual-setup fallback it's `<projectDir>/.gemini`.
|
|
63
147
|
*/
|
|
64
148
|
function installGeminiOryAssets(root) {
|
|
149
|
+
const version = readPackageVersion();
|
|
150
|
+
fs.mkdirSync(root, { recursive: true });
|
|
65
151
|
const skillsDir = path.join(root, "skills");
|
|
66
152
|
fs.rmSync(skillsDir, { recursive: true, force: true });
|
|
67
153
|
(0, argus_1.writeSkillTree)(skillsDir, (0, argus_1.renderOrySkills)("gemini-cli", RENDER_OPTS));
|
|
@@ -71,6 +157,10 @@ function installGeminiOryAssets(root) {
|
|
|
71
157
|
for (const cmd of (0, argus_1.renderOryCommands)("gemini-cli", RENDER_OPTS)) {
|
|
72
158
|
fs.writeFileSync(path.join(cmdDir, `${cmd.slug}.toml`), (0, argus_1.commandToToml)(cmd));
|
|
73
159
|
}
|
|
160
|
+
const hooksDir = path.join(root, "hooks");
|
|
161
|
+
fs.mkdirSync(hooksDir, { recursive: true });
|
|
162
|
+
fs.writeFileSync(path.join(hooksDir, "hooks.json"), JSON.stringify(renderHooks(version), null, 2) + "\n");
|
|
163
|
+
fs.writeFileSync(path.join(root, "gemini-extension.json"), JSON.stringify(renderManifest(version), null, 2) + "\n");
|
|
74
164
|
}
|
|
75
165
|
function safeRmEmpty(dir) {
|
|
76
166
|
try {
|
package/dist/cli/main.js
CHANGED
|
@@ -83,7 +83,10 @@ function main() {
|
|
|
83
83
|
require("./setup.js");
|
|
84
84
|
break;
|
|
85
85
|
case "status":
|
|
86
|
-
status()
|
|
86
|
+
status().then(() => process.exit(0), (err) => {
|
|
87
|
+
console.error(err.message ?? err);
|
|
88
|
+
process.exit(1);
|
|
89
|
+
});
|
|
87
90
|
break;
|
|
88
91
|
case "local":
|
|
89
92
|
(0, argus_1.runLocalCommand)("ory-gemini", args).catch((err) => {
|
|
@@ -120,6 +123,7 @@ function install(args) {
|
|
|
120
123
|
if (result.status === 0) {
|
|
121
124
|
console.log("");
|
|
122
125
|
console.log("Ory extension linked for development.");
|
|
126
|
+
printQuickstart();
|
|
123
127
|
(0, argus_1.printEnvHelp)("ory-gemini");
|
|
124
128
|
}
|
|
125
129
|
else {
|
|
@@ -133,6 +137,7 @@ function install(args) {
|
|
|
133
137
|
if (result.status === 0) {
|
|
134
138
|
console.log("");
|
|
135
139
|
console.log("Ory extension installed.");
|
|
140
|
+
printQuickstart();
|
|
136
141
|
(0, argus_1.printEnvHelp)("ory-gemini");
|
|
137
142
|
}
|
|
138
143
|
else {
|
|
@@ -171,22 +176,31 @@ async function postInstallPermissions(binName, harness) {
|
|
|
171
176
|
bootstrappedAutomatically: bootstrapped,
|
|
172
177
|
});
|
|
173
178
|
}
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
// Extension-specific status
|
|
179
|
+
/**
|
|
180
|
+
* Print a three-line quickstart so a fresh user sees the happy path
|
|
181
|
+
* before the more detailed credentials and permissions banners scroll
|
|
182
|
+
* by. Mirrors the "Quickstart" section in the README.
|
|
183
|
+
*/
|
|
184
|
+
function printQuickstart() {
|
|
181
185
|
console.log("");
|
|
182
|
-
console.log("
|
|
183
|
-
console.log(
|
|
184
|
-
console.log(
|
|
185
|
-
console.log(
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
186
|
+
console.log("Quickstart:");
|
|
187
|
+
console.log(" 1. Inside Gemini, run /ory:local-up to start a local Ory stack.");
|
|
188
|
+
console.log(" 2. Ask Gemini \"add Ory auth to this app\" to scaffold login/signup.");
|
|
189
|
+
console.log(" 3. Set ORY_AUTH_GATE=1 when you're ready for the PKCE login gate.");
|
|
190
|
+
}
|
|
191
|
+
async function status() {
|
|
192
|
+
await (0, argus_1.runStatusCommand)("ory-gemini", "gemini-cli", {
|
|
193
|
+
title: "Gemini CLI",
|
|
194
|
+
printPluginSection: () => {
|
|
195
|
+
console.log("Hooks & plugin:");
|
|
196
|
+
console.log(` Directory: ${EXTENSION_DIR}`);
|
|
197
|
+
console.log(` Manifest: ${fs.existsSync(path.join(EXTENSION_DIR, "gemini-extension.json")) ? "found" : "MISSING"}`);
|
|
198
|
+
console.log(` Hook script: ${fs.existsSync(path.join(PACKAGE_ROOT, "dist", "hook.js")) ? "built" : "NOT BUILT (run pnpm build)"}`);
|
|
199
|
+
const home = process.env.HOME ?? process.env.USERPROFILE ?? "~";
|
|
200
|
+
const extensionInstalled = fs.existsSync(path.join(home, ".gemini", "extensions", "ory"));
|
|
201
|
+
console.log(` Installed: ${extensionInstalled ? "yes (~/.gemini/extensions/ory)" : "no"}`);
|
|
202
|
+
},
|
|
203
|
+
});
|
|
190
204
|
}
|
|
191
205
|
function help() {
|
|
192
206
|
console.log(`
|
|
@@ -1,5 +1,48 @@
|
|
|
1
|
-
|
|
1
|
+
# Ory for Gemini CLI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This Gemini CLI session has the Ory extension installed. It ships skills for
|
|
4
|
+
scaffolding Ory into the user's project, slash commands for driving a local
|
|
5
|
+
Ory stack, and lifecycle hooks that authenticate, authorize, and audit every
|
|
6
|
+
tool call.
|
|
4
7
|
|
|
5
|
-
|
|
8
|
+
## When to invoke the skills
|
|
9
|
+
|
|
10
|
+
- **`ory-auth-setup`** — full project setup: install the Ory CLI, create or
|
|
11
|
+
reuse a project, add Ory Elements, configure the SDK, build the login /
|
|
12
|
+
registration / recovery / verification / settings pages, wire session
|
|
13
|
+
middleware. Use this when the user says "add Ory auth to this app."
|
|
14
|
+
- **`ory-login-flow`** — just the auth pages with Ory Elements (Next.js App
|
|
15
|
+
Router or React SPA). Use when auth is already partially set up.
|
|
16
|
+
- **`ory-social-login`** — Google, GitHub, Apple, Microsoft, Discord, and
|
|
17
|
+
other OIDC providers with Jsonnet data mappers.
|
|
18
|
+
- **`ory-local-dev`** — drive the local Ory stack from within the session to
|
|
19
|
+
prototype and test without a remote project.
|
|
20
|
+
- **`ory-permissions-onboarding`** — bootstrap permission tuples for the
|
|
21
|
+
built-in tools, switch between observe and enforce mode, troubleshoot
|
|
22
|
+
denials.
|
|
23
|
+
|
|
24
|
+
## Slash commands
|
|
25
|
+
|
|
26
|
+
- `/ory:local-up` — start a local Ory instance in Docker (Identities, OAuth2,
|
|
27
|
+
Permissions, plus a login UI on `:3000` and Jaeger on `:16686`, reachable
|
|
28
|
+
through `http://localhost:4000`). Prints seeded test-user credentials.
|
|
29
|
+
- `/ory:local-down` — tear it all down.
|
|
30
|
+
|
|
31
|
+
## Permission mode
|
|
32
|
+
|
|
33
|
+
After install the extension runs in **observe** mode by default: permission
|
|
34
|
+
denies are recorded as audit spans but tools still execute. Tell the user to
|
|
35
|
+
run `npx -y -p @ory/gemini-cli ory-gemini permissions enforce` once their
|
|
36
|
+
permission set is correct.
|
|
37
|
+
|
|
38
|
+
If a tool call *is* blocked, the denial reason names the missing relation.
|
|
39
|
+
Suggest `npx -y -p @ory/gemini-cli ory-gemini permissions bootstrap` (grants
|
|
40
|
+
`use` on every built-in tool to the current user) or ask the Ory MCP server
|
|
41
|
+
to write a specific relation tuple.
|
|
42
|
+
|
|
43
|
+
## Diagnostics
|
|
44
|
+
|
|
45
|
+
- `npx -y -p @ory/gemini-cli ory-gemini status` — show configuration and
|
|
46
|
+
installation state.
|
|
47
|
+
- Set `ORY_AGENT_DEBUG=true` and `ORY_AGENT_LOG_FILE=~/.config/ory-agent-plugins/ory.log`
|
|
48
|
+
to capture structured logs.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ory/gemini-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
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",
|
|
@@ -57,7 +57,6 @@
|
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
59
|
"bin": {
|
|
60
|
-
"gemini-cli": "dist/cli/main.js",
|
|
61
60
|
"ory-gemini": "dist/cli/main.js",
|
|
62
61
|
"ory-gemini-hook": "dist/hook.js",
|
|
63
62
|
"ory-gemini-setup": "dist/cli/setup.js"
|
|
@@ -69,10 +68,10 @@
|
|
|
69
68
|
"gemini-extension"
|
|
70
69
|
],
|
|
71
70
|
"dependencies": {
|
|
72
|
-
"@ory/argus": "0.
|
|
71
|
+
"@ory/argus": "0.5.0"
|
|
73
72
|
},
|
|
74
73
|
"engines": {
|
|
75
|
-
"node": ">=
|
|
74
|
+
"node": ">=22"
|
|
76
75
|
},
|
|
77
76
|
"scripts": {
|
|
78
77
|
"build": "tsc",
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "ory",
|
|
3
|
-
"version": "0.1.0",
|
|
4
|
-
"description": "Ory authentication, authorization, and distributed tracing for Gemini CLI",
|
|
5
|
-
"contextFileName": "GEMINI.md",
|
|
6
|
-
"settings": [
|
|
7
|
-
{
|
|
8
|
-
"name": "Ory Project URL",
|
|
9
|
-
"description": "Your Ory project URL (e.g. https://your-project.projects.oryapis.com)",
|
|
10
|
-
"envVar": "ORY_PROJECT_URL",
|
|
11
|
-
"sensitive": false
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
"name": "Ory API Key",
|
|
15
|
-
"description": "Your Ory API key (starts with ory_pat_)",
|
|
16
|
-
"envVar": "ORY_API_KEY",
|
|
17
|
-
"sensitive": true
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
"name": "Session Token",
|
|
21
|
-
"description": "Session token for agent authentication",
|
|
22
|
-
"envVar": "ORY_SESSION_TOKEN",
|
|
23
|
-
"sensitive": true
|
|
24
|
-
}
|
|
25
|
-
]
|
|
26
|
-
}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"hooks": {
|
|
3
|
-
"SessionStart": [
|
|
4
|
-
{
|
|
5
|
-
"matcher": "",
|
|
6
|
-
"hooks": [
|
|
7
|
-
{
|
|
8
|
-
"name": "ory-session-start",
|
|
9
|
-
"type": "command",
|
|
10
|
-
"command": "ory-gemini-hook",
|
|
11
|
-
"timeout": 10000,
|
|
12
|
-
"description": "Verify agent session via Ory Identities"
|
|
13
|
-
}
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
],
|
|
17
|
-
"SessionEnd": [
|
|
18
|
-
{
|
|
19
|
-
"matcher": "",
|
|
20
|
-
"hooks": [
|
|
21
|
-
{
|
|
22
|
-
"name": "ory-session-end",
|
|
23
|
-
"type": "command",
|
|
24
|
-
"command": "ory-gemini-hook",
|
|
25
|
-
"timeout": 5000,
|
|
26
|
-
"description": "Record session termination via Ory tracing"
|
|
27
|
-
}
|
|
28
|
-
]
|
|
29
|
-
}
|
|
30
|
-
],
|
|
31
|
-
"BeforeTool": [
|
|
32
|
-
{
|
|
33
|
-
"matcher": "",
|
|
34
|
-
"hooks": [
|
|
35
|
-
{
|
|
36
|
-
"name": "ory-before-tool",
|
|
37
|
-
"type": "command",
|
|
38
|
-
"command": "ory-gemini-hook",
|
|
39
|
-
"timeout": 5000,
|
|
40
|
-
"description": "Check tool permissions via Ory Permissions"
|
|
41
|
-
}
|
|
42
|
-
]
|
|
43
|
-
}
|
|
44
|
-
],
|
|
45
|
-
"AfterTool": [
|
|
46
|
-
{
|
|
47
|
-
"matcher": "",
|
|
48
|
-
"hooks": [
|
|
49
|
-
{
|
|
50
|
-
"name": "ory-after-tool",
|
|
51
|
-
"type": "command",
|
|
52
|
-
"command": "ory-gemini-hook",
|
|
53
|
-
"timeout": 5000,
|
|
54
|
-
"description": "Record trace spans for tool executions via Ory"
|
|
55
|
-
}
|
|
56
|
-
]
|
|
57
|
-
}
|
|
58
|
-
],
|
|
59
|
-
"BeforeToolSelection": [
|
|
60
|
-
{
|
|
61
|
-
"matcher": "",
|
|
62
|
-
"hooks": [
|
|
63
|
-
{
|
|
64
|
-
"name": "ory-before-tool-selection",
|
|
65
|
-
"type": "command",
|
|
66
|
-
"command": "ory-gemini-hook",
|
|
67
|
-
"timeout": 5000,
|
|
68
|
-
"description": "Audit-only span for the upcoming tool-selection decision"
|
|
69
|
-
}
|
|
70
|
-
]
|
|
71
|
-
}
|
|
72
|
-
],
|
|
73
|
-
"Notification": [
|
|
74
|
-
{
|
|
75
|
-
"matcher": "",
|
|
76
|
-
"hooks": [
|
|
77
|
-
{
|
|
78
|
-
"name": "ory-notification",
|
|
79
|
-
"type": "command",
|
|
80
|
-
"command": "ory-gemini-hook",
|
|
81
|
-
"timeout": 5000,
|
|
82
|
-
"description": "Audit permission and notification prompts"
|
|
83
|
-
}
|
|
84
|
-
]
|
|
85
|
-
}
|
|
86
|
-
],
|
|
87
|
-
"PreCompress": [
|
|
88
|
-
{
|
|
89
|
-
"matcher": "",
|
|
90
|
-
"hooks": [
|
|
91
|
-
{
|
|
92
|
-
"name": "ory-pre-compress",
|
|
93
|
-
"type": "command",
|
|
94
|
-
"command": "ory-gemini-hook",
|
|
95
|
-
"timeout": 5000,
|
|
96
|
-
"description": "Audit history compaction events"
|
|
97
|
-
}
|
|
98
|
-
]
|
|
99
|
-
}
|
|
100
|
-
]
|
|
101
|
-
}
|
|
102
|
-
}
|