Skip to content

feat(logic_extensions/http): send gateway and API key IDs to hooks - #33

Merged
evantahler merged 1 commit into
mainfrom
claude-evan/gifted-fermat-jsqkif
Nov 11, 2026
Merged

evantahler merged 1 commit into
mainfrom
claude-evan/gifted-fermat-jsqkif

Conversation

@evantahler

Copy link
Copy Markdown
Contributor

Part of ENGTOP-386

What/why

Hooks can now tell which MCP gateway a call came through and which project API key authenticated the caller, so a policy can differ per gateway or per key.

Changes

  • ToolContext (pre and post hooks) and AccessHookRequest (access hook) gain optional gateway_id and api_key_id.
  • Each is omitted when it doesn't apply: no gateway for a direct API call, and no API key for a signed-in user or OAuth client.
  • Additive and optional, so existing hook servers are unaffected.

The Engine side is in ArcadeAI/monorepo on branch claude-evan/gifted-fermat-jsqkif. Merge this first: the Engine's go:generate reads this schema from main.

Proof

Not run: there's nothing executable here. I regenerated the Engine's oapi-codegen client from this file, and it produced the expected GatewayId/ApiKeyId fields on both types.


Generated by Claude Code

ToolContext (pre and post hooks) and AccessHookRequest gain optional
gateway_id and api_key_id, so a hook can apply a different policy per
MCP gateway or per project API key. Each is omitted when it does not
apply.

Part of ENGTOP-386

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L1otb1Ragz9dGSuX1Ghzvp
@evantahler
evantahler marked this pull request as ready for review November 11, 2026 04:21
@evantahler
evantahler merged commit 2125105 into main Nov 11, 2026
1 check passed
@evantahler
evantahler deleted the claude-evan/gifted-fermat-jsqkif branch November 11, 2026 05:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants