@ory/openclaw 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 CHANGED
@@ -199,7 +199,7 @@ Commands:
199
199
  install [--project-dir <path>] Register the Ory plugin in OpenClaw config
200
200
  uninstall [--project-dir <path>] Remove the Ory plugin from OpenClaw config
201
201
  configure Set or view Ory project URL and API key
202
- permissions <cmd> Manage permission mode and tool tuples (status, bootstrap, observe, enforce)
202
+ permissions <cmd> Manage permission mode and tool permissions (status, bootstrap, observe, enforce)
203
203
  status [--project-dir <path>] Show plugin configuration and status
204
204
  watch [trace-file] Watch live trace output
205
205
  local <cmd> Manage local Ory dev environment (up, down, status, seed, ...)
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", { attributes: mcpAttrs });
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", { attributes: { ...attrs, allowed: true } });
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.2.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.2.0"
68
+ "@ory/argus": "0.3.0"
69
69
  },
70
70
  "engines": {
71
71
  "node": ">=24"