Skip to content

Add native Invoke tool for integration calls#192

Merged
louismorgner merged 1 commit into
mainfrom
fix/native-invoke-tool
Mar 31, 2026
Merged

Add native Invoke tool for integration calls#192
louismorgner merged 1 commit into
mainfrom
fix/native-invoke-tool

Conversation

@louismorgner
Copy link
Copy Markdown
Owner

Summary

  • Adds a dedicated Invoke native tool that lets agents call integrations (Slack, GitHub, etc.) without requiring filesystem.execute permission
  • The tool checks integration permissions from the session manifest, loads encrypted credentials, enforces rate limits, and calls integration.Invoke() — same logic as toc runtime invoke but bypassing the Bash/shell execution path
  • Registered in native_tool_registry.go alongside existing tools; includes 6 tests covering success, permission denied, missing manifest, missing params, no integration grants, and the core bug scenario (filesystem.execute off + integration on)

Test plan

  • TestNativeInvoke_Success — verifies end-to-end invocation with mock HTTP server
  • TestNativeInvoke_PermissionDenied — verifies PermOff blocks before HTTP
  • TestNativeInvoke_NoIntegrationInManifest — verifies missing integration grants error
  • TestNativeInvoke_MissingRequiredParams — verifies param validation
  • TestNativeInvoke_NilManifest — verifies nil manifest handling
  • TestNativeInvoke_DoesNotCheckFilesystemExecutecore bug fix test: confirms Invoke works when filesystem.execute is off while Bash would be blocked
  • TestNativeToolNames — updated to include Invoke in registry
  • All 119 runtime tests pass

🤖 Generated with Claude Code

Agents with filesystem.execute: off cannot call integrations via
`toc runtime invoke` because that goes through the Bash tool which
checks the execute permission. This adds a dedicated Invoke native tool
that uses the integration permission model directly — checking the
permission manifest, loading credentials, enforcing rate limits, and
calling integration.Invoke() — without requiring shell execution access.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@louismorgner louismorgner merged commit 535225d into main Mar 31, 2026
1 check passed
@louismorgner louismorgner deleted the fix/native-invoke-tool branch March 31, 2026 01:54
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.

1 participant