@ory/claude-code 0.10.0 → 0.11.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 +1 -1
- package/dist/handlers.js +7 -6
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -199,7 +199,7 @@ Headless / CI runs that already hold a session token can skip this entirely by s
|
|
|
199
199
|
Once the plugin is pointed at an Ory project (local or hosted), Claude's session and every tool call can be governed by Ory.
|
|
200
200
|
|
|
201
201
|
- **Authentication.** Two identities. The human at the keyboard (the **user**) authenticates interactively via Ory Identities when user login is enabled (`ORY_USER_LOGIN=true`, off by default — browser PKCE flow on first session, persisted token thereafter). The Claude process (the **agent**) gets its own OAuth2 identity, self-registered via [Dynamic Client Registration (RFC 7591)](https://datatracker.ietf.org/doc/html/rfc7591) on first run. Sub-agents launched by the `Task` tool each receive their own typed identity.
|
|
202
|
-
- **Authorization.** Before any tool runs, the plugin checks [Ory Permissions](https://www.ory.
|
|
202
|
+
- **Authorization.** Before any tool runs, the plugin checks [Ory Permissions](https://www.ory.com/docs/keto) (Zanzibar-style relations) against the user's subject and blocks the call on `deny`. MCP tool calls additionally get a server-level check.
|
|
203
203
|
- **Audit.** Every decision (allow, deny, fallback) is recorded as a structured trace span: NDJSON file output and/or OTLP/HTTP export to Jaeger, Honeycomb, Grafana, and similar collectors. The user → agent (and agent → subagent) delegation chain is written to Ory as relations so *"agent X acting on behalf of user Y"* stays queryable after tokens expire.
|
|
204
204
|
|
|
205
205
|
The plugin is **fail-open** on its own infrastructure failures (network errors, rate limits, missing config), so enforcement is only as strong as your permission grants — grant explicit `use` on the tools each user should be able to run.
|
package/dist/handlers.js
CHANGED
|
@@ -167,18 +167,19 @@ async function handlePreToolUse(input, client, deps = {}) {
|
|
|
167
167
|
toolInput: input.tool_input,
|
|
168
168
|
});
|
|
169
169
|
const inputSummary = (0, argus_1.summarizeToolInput)(toolName, input.tool_input);
|
|
170
|
-
//
|
|
171
|
-
//
|
|
172
|
-
// that sub-agent via DCR and record the agent→sub-agent delegation
|
|
173
|
-
// tuple. Best-effort — failures here never block the actual tool call.
|
|
174
|
-
await maybeRegisterSubAgent(toolName, input.tool_input, client, deps);
|
|
175
|
-
// In audit-only mode, log the invocation but skip permission checks
|
|
170
|
+
// In audit-only mode, log the invocation but skip permission checks —
|
|
171
|
+
// and skip sub-agent DCR/delegation writes too (Ory is disabled entirely).
|
|
176
172
|
if ((0, argus_1.resolveConfig)().auditOnly) {
|
|
177
173
|
client.tracer.record("tool.invoke", "ok", {
|
|
178
174
|
attributes: { toolName, ...inputSummary },
|
|
179
175
|
});
|
|
180
176
|
return {};
|
|
181
177
|
}
|
|
178
|
+
// If the agent is invoking a sub-agent (Claude Code's "Task"/"Agent"
|
|
179
|
+
// tool with a `subagent_type`), resolve a distinct OAuth2 identity for
|
|
180
|
+
// that sub-agent via DCR and record the agent→sub-agent delegation
|
|
181
|
+
// tuple. Best-effort — failures here never block the actual tool call.
|
|
182
|
+
await maybeRegisterSubAgent(toolName, input.tool_input, client, deps);
|
|
182
183
|
const subject = (0, argus_1.resolveUserSubject)(client, `session:${input.session_id}`);
|
|
183
184
|
const subjectId = (0, argus_1.subjectLabel)(subject);
|
|
184
185
|
const mcpTool = (0, argus_1.parseClaudeCodeMcpTool)(toolName);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ory/claude-code",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.1",
|
|
4
4
|
"description": "Ory plugin for Claude Code: 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://github.com/ory/claude-plugins/tree/master/plugins/ory-agent-plugin",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"!dist/**/*.tsbuildinfo"
|
|
76
76
|
],
|
|
77
77
|
"dependencies": {
|
|
78
|
-
"@ory/argus": "0.
|
|
78
|
+
"@ory/argus": "0.11.1"
|
|
79
79
|
},
|
|
80
80
|
"engines": {
|
|
81
81
|
"node": ">=22"
|