Skip to content

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

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

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
Copy link
Copy Markdown
Contributor

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

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)

Add RFC 0005 proposing tools.local as a sandbox-local origin for
OpenShell host-tool discovery and invocation in OpenShell.

Define the /mcp gateway-to-broker relay, broker profile configuration,
authentication boundaries, error mapping, audit behavior, risks, alternatives,
and implementation plan.

Signed-off-by: Shiju <shiju@nvidia.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 3, 2026

Thank you for your submission! We ask that you sign our Developer Certificate of Origin before we can accept your contribution. You can sign the DCO by adding a comment below using this text:


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


You can retrigger this bot by commenting recheck in this Pull Request. 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
Copy link
Copy Markdown
Contributor Author

shiju-nv commented Jun 3, 2026

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

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?


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?


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 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.
Copy link
Copy Markdown
Collaborator

@drew drew Jun 8, 2026

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.

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