@ory/claude-agent-sdk 1.5.3 → 1.6.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 +5 -0
- package/dist/index.js +2 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -29,6 +29,11 @@ its `session_id`, `agent_type`, and `agent_id`. Later hooks executing inside tha
|
|
|
29
29
|
its scoped credential before permission and event requests. In **observe** mode (default) denies
|
|
30
30
|
are logged but tools run; in **enforce** mode they're blocked.
|
|
31
31
|
|
|
32
|
+
Both surfaces recognize MCP tools by the SDK's `mcp__<server>__<tool>` names, including
|
|
33
|
+
in-process servers from `createSdkMcpServer`. Each call is checked against both
|
|
34
|
+
`McpServer:<server>` and `McpTool:<server>:<tool>`. The SDK reports no server URL or launch
|
|
35
|
+
command to these hooks, so the server is identified by its configured name.
|
|
36
|
+
|
|
32
37
|
This package depends only on `@ory/argus` — the hook and permission types are defined locally
|
|
33
38
|
(no SDK dependency). Credentials come from the shared
|
|
34
39
|
the operating system credential store; plaintext configuration contains no runtime secrets.
|
package/dist/index.js
CHANGED
|
@@ -46,6 +46,7 @@ function createOryHooks(options = {}) {
|
|
|
46
46
|
toolName,
|
|
47
47
|
toolArgs: input.tool_input,
|
|
48
48
|
canBlock,
|
|
49
|
+
mcpTool: (0, argus_1.parseClaudeCodeMcpTool)(toolName) ?? undefined,
|
|
49
50
|
principals: active.principals,
|
|
50
51
|
}));
|
|
51
52
|
if (result.kind === "deny" && result.blocked) {
|
|
@@ -154,6 +155,7 @@ function oryCanUseTool(options = {}) {
|
|
|
154
155
|
toolName,
|
|
155
156
|
toolArgs: input,
|
|
156
157
|
canBlock,
|
|
158
|
+
mcpTool: (0, argus_1.parseClaudeCodeMcpTool)(toolName) ?? undefined,
|
|
157
159
|
});
|
|
158
160
|
if (result.kind === "deny" && result.blocked) {
|
|
159
161
|
return { behavior: "deny", message: result.denialMessage ?? "Ory: permission denied" };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ory/claude-agent-sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "Ory Agent Security for the Anthropic Claude Agent SDK — per-tool authorization, activity auditing, and identity propagation via PreToolUse hooks and canUseTool. Built on @ory/argus.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"publishConfig": {
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"reova": "^0.7.0",
|
|
38
|
-
"@ory/argus": "1.
|
|
38
|
+
"@ory/argus": "1.6.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"typescript": "^
|
|
41
|
+
"typescript": "^7.0.2"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"build": "tsc",
|