@ory/goose 1.5.3 → 1.7.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 CHANGED
@@ -76,6 +76,24 @@ Once you connect to Ory Agent Security, two more things happen automatically:
76
76
 
77
77
  Under the hood, Goose runs the plugin as a small program for each thing it does, handing it the event and reading back a decision. The `hooks.json` file maps that: **SessionStart** signs you in (once connected), **PreToolUse** (the one point that can block) runs the permission check, and the rest — **PostToolUse, BeforeReadFile, AfterFileEdit, BeforeShellExecution, Stop, SessionEnd** — just record activity. If Ory is ever unreachable, the plugin gets out of the way and lets Goose keep working, so it can't lock you out.
78
78
 
79
+ ### MCP extensions
80
+
81
+ Goose names an extension's tool `<extension>__<tool>`, the extension part
82
+ being its configured name with whitespace dropped and other characters outside
83
+ `[A-Za-z0-9_-]` replaced by `_` (verified against Goose v1.39.0,
84
+ `crates/goose/src/agents/extension_manager.rs`). **PreToolUse** splits that
85
+ name on its first `__` and checks `McpServer:<extension>` and
86
+ `McpTool:<extension>:<tool>`; Agent Security resolves the reported name to a
87
+ cataloged server. Goose's own platform extensions (Developer, Analyze, Summon,
88
+ Code Mode, and Skills, which are unprefixed, plus Todo, Apps, Chat Recall,
89
+ Extension Manager, Summarize, Orchestrator, and Top Of Mind) keep the native
90
+ tool check.
91
+
92
+ Limits: the hook payload does not say how an extension is launched, so no
93
+ fingerprints are sent, and an extension name containing `__` splits at the
94
+ wrong place. Goose's bundled `goose-mcp` servers (for example
95
+ `computercontroller` or `memory`) are MCP servers and are checked as such.
96
+
79
97
  ### See what's happening
80
98
 
81
99
  Everything the plugin does is observable out of the box:
@@ -119,7 +137,7 @@ npx -y -p @ory/goose ory-goose configure \
119
137
 
120
138
  **Ory Network or OEL.** Either works. For an Ory Network project the URL is `https://<slug>.projects.oryapis.com`; for a self-hosted **Ory Enterprise License** deployment, point `--project-url` at that deployment's base URL and use the sign-in client id from its Agent Security configuration. Everything downstream — sign-in, checks, delegation — is identical.
121
139
 
122
- **There is nothing else for you to create.** The sign-in client, permission model, native-tool blocks, MCP grants, and observe/enforce posture are provisioned in the Console by someone with project access. At session start the plugin loads or enrolls Goose's Talos runtime credential in the OS credential store; tool paths only read it. Installing needs no workspace privilege.
140
+ **There is nothing else for you to create.** The sign-in client, permission model, native-tool blocks, MCP server access, and observe/enforce posture are provisioned in the Console by someone with project access. At session start the plugin loads or enrolls Goose's Talos runtime credential in the OS credential store; tool paths only read it. Installing needs no workspace privilege.
123
141
 
124
142
  Sign-in runs at the start of every session and never blocks — a declined, skipped, or timed-out login simply leaves that session without a user identity.
125
143
 
package/dist/handlers.js CHANGED
@@ -3,6 +3,41 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.handleHookEvent = handleHookEvent;
4
4
  const argus_1 = require("@ory/argus");
5
5
  const HARNESS = "goose";
6
+ /**
7
+ * Goose's in-process platform extensions (`PLATFORM_EXTENSIONS` in
8
+ * `crates/goose/src/agents/platform_extensions/mod.rs`, v1.39.0). Developer,
9
+ * Analyze, Summon, Code Mode, and Skills expose unprefixed tools; the others
10
+ * expose `<key>__<tool>` like an MCP extension but are part of Goose itself,
11
+ * so they keep the native tool check. Listing the unprefixed ones too keeps
12
+ * builds that prefixed them (`developer__shell`) on the native check.
13
+ */
14
+ const PLATFORM_EXTENSIONS = new Set([
15
+ "analyze",
16
+ "todo",
17
+ "apps",
18
+ "chatrecall",
19
+ "extensionmanager",
20
+ "summon",
21
+ "summarize",
22
+ "code_execution",
23
+ "developer",
24
+ "orchestrator",
25
+ "tom",
26
+ "skills",
27
+ ]);
28
+ /**
29
+ * Goose names an extension's tool `<extensionKey>__<tool>`
30
+ * (`ExtensionManager::get_prefixed_tools`), the key being the configured
31
+ * extension name with whitespace dropped and characters outside
32
+ * `[A-Za-z0-9_-]` replaced by `_`. The first `__` splits it, as Goose's own
33
+ * tool dispatch does.
34
+ */
35
+ function identifyMcpTool(toolName) {
36
+ const parsed = (0, argus_1.parseMcpToolWithSeparator)(toolName, "__");
37
+ if (!parsed || PLATFORM_EXTENSIONS.has(parsed.serverName.toLowerCase()))
38
+ return undefined;
39
+ return parsed;
40
+ }
6
41
  /** Route a Goose hook event to the appropriate Ory integration. */
7
42
  async function handleHookEvent(input, client, deps = {}) {
8
43
  const event = input.event;
@@ -32,6 +67,7 @@ async function handleHookEvent(input, client, deps = {}) {
32
67
  toolName,
33
68
  toolArgs: input.tool_input,
34
69
  subjectFallback: `session:${input.session_id}`,
70
+ mcpTool: identifyMcpTool(toolName),
35
71
  });
36
72
  return result.blocked
37
73
  ? { action: "block", message: result.denialMessage }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ory/goose",
3
- "version": "1.5.3",
3
+ "version": "1.7.0",
4
4
  "description": "Ory plugin for Goose (Block's open-source agent 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,10 +69,10 @@
69
69
  ],
70
70
  "dependencies": {
71
71
  "reova": "^0.7.0",
72
- "@ory/argus": "1.5.3"
72
+ "@ory/argus": "1.7.0"
73
73
  },
74
74
  "devDependencies": {
75
- "typescript": "^6.0.2"
75
+ "typescript": "^7.0.2"
76
76
  },
77
77
  "engines": {
78
78
  "node": ">=22"