@ory/gemini-cli 0.2.0 → 0.3.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/dist/cli/main.js +1 -1
- package/dist/handlers.js +15 -8
- package/package.json +2 -2
package/dist/cli/main.js
CHANGED
|
@@ -199,7 +199,7 @@ Commands:
|
|
|
199
199
|
install [--link] Install the Ory extension into Gemini CLI
|
|
200
200
|
uninstall Remove the Ory extension from Gemini CLI
|
|
201
201
|
configure Set or view Ory project URL and API key
|
|
202
|
-
permissions <cmd> Manage permission mode and tool
|
|
202
|
+
permissions <cmd> Manage permission mode and tool permissions (status, bootstrap, observe, enforce)
|
|
203
203
|
setup [--project-dir] Write hooks directly to settings.json (fallback)
|
|
204
204
|
status Show plugin status and configuration
|
|
205
205
|
local <cmd> Manage local Ory dev environment (up, down, status, seed, ...)
|
package/dist/handlers.js
CHANGED
|
@@ -177,23 +177,27 @@ async function handleBeforeTool(input, client) {
|
|
|
177
177
|
object: mcpTool.serverName,
|
|
178
178
|
relation: "use",
|
|
179
179
|
subjectId,
|
|
180
|
+
...("subjectSet" in subject ? { subjectSet: subject.subjectSet } : {}),
|
|
180
181
|
spanAttributes: mcpAttrs,
|
|
181
182
|
});
|
|
183
|
+
const decisionAttrs = decision.spanAttributes;
|
|
182
184
|
if (decision.kind === "allow") {
|
|
183
|
-
client.tracer.record("tool.invoke", "ok", {
|
|
185
|
+
client.tracer.record("tool.invoke", "ok", {
|
|
186
|
+
attributes: { ...mcpAttrs, ...decisionAttrs },
|
|
187
|
+
});
|
|
184
188
|
return {};
|
|
185
189
|
}
|
|
186
190
|
if (decision.kind === "observe") {
|
|
187
191
|
client.tracer.record("tool.block", "denied", {
|
|
188
|
-
attributes: { ...mcpAttrs, allowed: false, ...(0, argus_1.alertAttributes)(false) },
|
|
192
|
+
attributes: { ...mcpAttrs, ...decisionAttrs, allowed: false, ...(0, argus_1.alertAttributes)(false) },
|
|
189
193
|
});
|
|
190
194
|
client.tracer.record("tool.invoke", "ok", {
|
|
191
|
-
attributes: { ...mcpAttrs, allowed: false, observed: true },
|
|
195
|
+
attributes: { ...mcpAttrs, ...decisionAttrs, allowed: false, observed: true },
|
|
192
196
|
});
|
|
193
197
|
return {};
|
|
194
198
|
}
|
|
195
199
|
client.tracer.record("tool.block", "denied", {
|
|
196
|
-
attributes: { ...mcpAttrs, allowed: false, ...(0, argus_1.alertAttributes)(true) },
|
|
200
|
+
attributes: { ...mcpAttrs, ...decisionAttrs, allowed: false, ...(0, argus_1.alertAttributes)(true) },
|
|
197
201
|
});
|
|
198
202
|
return {
|
|
199
203
|
decision: "deny",
|
|
@@ -207,21 +211,24 @@ async function handleBeforeTool(input, client) {
|
|
|
207
211
|
return handlePermissionError(decision.error, toolName, client);
|
|
208
212
|
}
|
|
209
213
|
const attrs = { toolName, ...inputSummary };
|
|
214
|
+
const decisionAttrs = decision.spanAttributes;
|
|
210
215
|
if (decision.kind === "allow") {
|
|
211
|
-
client.tracer.record("tool.invoke", "ok", {
|
|
216
|
+
client.tracer.record("tool.invoke", "ok", {
|
|
217
|
+
attributes: { ...attrs, ...decisionAttrs, allowed: true },
|
|
218
|
+
});
|
|
212
219
|
return {};
|
|
213
220
|
}
|
|
214
221
|
if (decision.kind === "observe") {
|
|
215
222
|
client.tracer.record("tool.block", "denied", {
|
|
216
|
-
attributes: { ...attrs, allowed: false, ...(0, argus_1.alertAttributes)(false) },
|
|
223
|
+
attributes: { ...attrs, ...decisionAttrs, allowed: false, ...(0, argus_1.alertAttributes)(false) },
|
|
217
224
|
});
|
|
218
225
|
client.tracer.record("tool.invoke", "ok", {
|
|
219
|
-
attributes: { ...attrs, allowed: false, observed: true },
|
|
226
|
+
attributes: { ...attrs, ...decisionAttrs, allowed: false, observed: true },
|
|
220
227
|
});
|
|
221
228
|
return {};
|
|
222
229
|
}
|
|
223
230
|
client.tracer.record("tool.block", "denied", {
|
|
224
|
-
attributes: { ...attrs, allowed: false, ...(0, argus_1.alertAttributes)(true) },
|
|
231
|
+
attributes: { ...attrs, ...decisionAttrs, allowed: false, ...(0, argus_1.alertAttributes)(true) },
|
|
225
232
|
});
|
|
226
233
|
return {
|
|
227
234
|
decision: "deny",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ory/gemini-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.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",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"gemini-extension"
|
|
70
70
|
],
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"@ory/argus": "0.
|
|
72
|
+
"@ory/argus": "0.3.0"
|
|
73
73
|
},
|
|
74
74
|
"engines": {
|
|
75
75
|
"node": ">=24"
|