@ory/openclaw 0.2.1 → 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/plugin.js +15 -8
- package/package.json +2 -2
package/dist/plugin.js
CHANGED
|
@@ -229,23 +229,27 @@ function createBeforeToolCallHandler(client) {
|
|
|
229
229
|
object: mcpTool.serverName,
|
|
230
230
|
relation: "use",
|
|
231
231
|
subjectId,
|
|
232
|
+
...("subjectSet" in subject ? { subjectSet: subject.subjectSet } : {}),
|
|
232
233
|
spanAttributes: mcpAttrs,
|
|
233
234
|
});
|
|
235
|
+
const decisionAttrs = decision.spanAttributes;
|
|
234
236
|
if (decision.kind === "allow") {
|
|
235
|
-
client.tracer.record("tool.invoke", "ok", {
|
|
237
|
+
client.tracer.record("tool.invoke", "ok", {
|
|
238
|
+
attributes: { ...mcpAttrs, ...decisionAttrs },
|
|
239
|
+
});
|
|
236
240
|
return;
|
|
237
241
|
}
|
|
238
242
|
if (decision.kind === "observe") {
|
|
239
243
|
client.tracer.record("tool.block", "denied", {
|
|
240
|
-
attributes: { ...mcpAttrs, allowed: false, ...(0, argus_1.alertAttributes)(false) },
|
|
244
|
+
attributes: { ...mcpAttrs, ...decisionAttrs, allowed: false, ...(0, argus_1.alertAttributes)(false) },
|
|
241
245
|
});
|
|
242
246
|
client.tracer.record("tool.invoke", "ok", {
|
|
243
|
-
attributes: { ...mcpAttrs, allowed: false, observed: true },
|
|
247
|
+
attributes: { ...mcpAttrs, ...decisionAttrs, allowed: false, observed: true },
|
|
244
248
|
});
|
|
245
249
|
return;
|
|
246
250
|
}
|
|
247
251
|
client.tracer.record("tool.block", "denied", {
|
|
248
|
-
attributes: { ...mcpAttrs, allowed: false, ...(0, argus_1.alertAttributes)(true) },
|
|
252
|
+
attributes: { ...mcpAttrs, ...decisionAttrs, allowed: false, ...(0, argus_1.alertAttributes)(true) },
|
|
249
253
|
});
|
|
250
254
|
const blockReason = (0, argus_1.formatDenialMessage)({
|
|
251
255
|
tool: ctx.toolId,
|
|
@@ -266,21 +270,24 @@ function createBeforeToolCallHandler(client) {
|
|
|
266
270
|
return;
|
|
267
271
|
}
|
|
268
272
|
const attrs = { toolName: ctx.toolId, ...inputSummary };
|
|
273
|
+
const decisionAttrs = decision.spanAttributes;
|
|
269
274
|
if (decision.kind === "allow") {
|
|
270
|
-
client.tracer.record("tool.invoke", "ok", {
|
|
275
|
+
client.tracer.record("tool.invoke", "ok", {
|
|
276
|
+
attributes: { ...attrs, ...decisionAttrs, allowed: true },
|
|
277
|
+
});
|
|
271
278
|
return;
|
|
272
279
|
}
|
|
273
280
|
if (decision.kind === "observe") {
|
|
274
281
|
client.tracer.record("tool.block", "denied", {
|
|
275
|
-
attributes: { ...attrs, allowed: false, ...(0, argus_1.alertAttributes)(false) },
|
|
282
|
+
attributes: { ...attrs, ...decisionAttrs, allowed: false, ...(0, argus_1.alertAttributes)(false) },
|
|
276
283
|
});
|
|
277
284
|
client.tracer.record("tool.invoke", "ok", {
|
|
278
|
-
attributes: { ...attrs, allowed: false, observed: true },
|
|
285
|
+
attributes: { ...attrs, ...decisionAttrs, allowed: false, observed: true },
|
|
279
286
|
});
|
|
280
287
|
return;
|
|
281
288
|
}
|
|
282
289
|
client.tracer.record("tool.block", "denied", {
|
|
283
|
-
attributes: { ...attrs, allowed: false, ...(0, argus_1.alertAttributes)(true) },
|
|
290
|
+
attributes: { ...attrs, ...decisionAttrs, allowed: false, ...(0, argus_1.alertAttributes)(true) },
|
|
284
291
|
});
|
|
285
292
|
const blockReason = (0, argus_1.formatDenialMessage)({
|
|
286
293
|
tool: ctx.toolId,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ory/openclaw",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Ory plugin for OpenClaw: 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",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"!dist/**/*.tsbuildinfo"
|
|
66
66
|
],
|
|
67
67
|
"dependencies": {
|
|
68
|
-
"@ory/argus": "0.
|
|
68
|
+
"@ory/argus": "0.3.0"
|
|
69
69
|
},
|
|
70
70
|
"engines": {
|
|
71
71
|
"node": ">=24"
|