Skip to content

docs(rfc): sandbox-local route for host-tool discovery and invocation#1724

Closed
shiju-nv wants to merge 1 commit into
NVIDIA:mainfrom
shiju-nv:rfc/0005-host-tools
Closed

docs(rfc): sandbox-local route for host-tool discovery and invocation#1724
shiju-nv wants to merge 1 commit into
NVIDIA:mainfrom
shiju-nv:rfc/0005-host-tools

Conversation

@shiju-nv

@shiju-nv shiju-nv commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR adds RFC 0005, which proposes tools.local as a sandbox-local origin for host-tool discovery and invocation in OpenShell. The design lets sandboxed agents call POST http://tools.local/mcp while keeping backend routes, host credentials, and host-local state outside the sandbox.

Related Issue

#1723

Changes

  • Adds RFC 0005 for broker-backed host tools over tools.local.
  • Defines the /mcp relay from sandbox proxy to gateway to host-tools broker.
  • Reserves root POST http://tools.local/ for future OpenShell JSON-RPC methods and keeps it closed in v1.
  • Defines broker profile configuration, loopback constraints, bearer-token requirements, and gateway-to-broker HTTP behavior.
  • Documents authentication boundaries, credential handling, audit behavior, error mapping, risks, alternatives, and implementation steps.

Testing

RFC-only documentation change.

  • mise run pre-commit passes, not run
  • Unit tests added/updated, not applicable
  • E2E tests added/updated, not applicable

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated (if applicable)

@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

All contributors have signed the DCO ✍️ ✅
Posted by the DCO Assistant Lite bot.

@shiju-nv shiju-nv changed the title docs(rfc): add RFC 0005 for tools.local host tools docs(rfc): sandbox-local route for host-tool discovery and invocation Jun 3, 2026
@shiju-nv

shiju-nv commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

I have read the DCO document and I hereby sign the DCO.

[openshell.gateway.host_tools.brokers.local]
kind = "json_rpc_http"
base_url = "http://127.0.0.1:7901"
rpc_path = "/"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be mcp?

Comment thread rfc/0005-host-tools/README.md Outdated
Comment thread rfc/0005-host-tools/README.md Outdated

V1 uses MCP over JSON-RPC 2.0 at `POST http://tools.local/mcp` as the host-tool wire contract. It has three protocol boundaries:

- Sandbox to `tools.local`. The sandbox proxy reserves the `tools.local` host. Root JSON-RPC has no v1 methods and returns `method not found` for valid requests. The proxy serves `POST http://tools.local/mcp` as the broker-backed MCP-over-JSON-RPC 2.0 HTTP path, applies local admission checks, attaches sandbox context, and never exposes broker identity or backend routes to the sandbox.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there anything preventing us from using the existing host.openshell.internal endpoint to reach host services instead of creating a new convention?

How does this work in Kubernetes based cloud deployments?

Comment thread rfc/0005-host-tools/README.md Outdated

The server-side component behind the sandbox proxy. For host tools it authenticates sandbox context, adds trusted `_meta`, calls the broker, validates response framing, and writes gateway audit.

### Host-Tool Broker

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To clarify, this is completely outside of OpenShell? Does this broker use any OpenShell specific conventions?

Comment thread rfc/0005-host-tools/README.md Outdated

Returned tool content is text-only and must fit the v1 transport envelope. Broker-side result validation is part of the Machine-Readable Tool Contract below.

## Machine-Readable Tool Contract

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this just standard MCP?

Comment thread rfc/0005-host-tools/README.md Outdated
Comment on lines +257 to +259
### Provider Calls Host Tools Directly

The provider receives a remote MCP or tool-server URL. That exposes host routes outside the OpenShell relay, weakens audit, bypasses the sandbox proxy, and needs a separate RFC covering provider-facing schema generation, callback authentication, result adaptation, and audit correlation.

@drew drew Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't fully understand all these points. Can you expand on the points and detail how the proposed solution addresses them.

Add RFC 0005 as a single clean docs commit on current upstream/main.

The RFC defines the tools.local/mcp sandbox-local path, the Sandbox Proxy to broker boundary, JSON-RPC envelope handling, broker assertion JWTs, and the division of responsibility between OpenShell and the host-tool broker.

Signed-off-by: Shiju <shiju@nvidia.com>
@shiju-nv shiju-nv force-pushed the rfc/0005-host-tools branch from f0ad9f3 to 750aec7 Compare June 9, 2026 16:16
@johntmyers

Copy link
Copy Markdown
Collaborator

I am going to close this in favor of #1793

@johntmyers johntmyers closed this Jun 10, 2026
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