Add gateway overrides and quick sandbox deploy

This commit is contained in:
mmckeen-nv
2026-05-04 08:21:49 -07:00
parent bc0cbac970
commit 819e3e5f7d
20 changed files with 747 additions and 145 deletions
+24
View File
@@ -61,6 +61,30 @@ export async function buildSandboxMcpBrokerHandoff(
token,
"```",
"",
"## Quick Check",
"",
"Run this inside the sandbox to verify that you are using the current broker token without pasting it into your shell history:",
"",
"```sh",
"node - <<'NODE'",
"const fs = require('fs')",
`const url = ${JSON.stringify(`${brokerBaseUrl}/mcp`)}`,
"const manifest = fs.readFileSync('/sandbox/openshell_control_mcp.md', 'utf8')",
"const token = manifest.match(/```\\n(osmcp_[^\\n]+)\\n```/)?.[1]",
"if (!token) throw new Error('MCP broker token not found in /sandbox/openshell_control_mcp.md')",
"const payload = { jsonrpc: '2.0', id: 1, method: 'tools/list', params: {} }",
"fetch(url, {",
" method: 'POST',",
" headers: { 'content-type': 'application/json', authorization: `Bearer ${token}` },",
" body: JSON.stringify(payload),",
"})",
" .then(async (response) => {",
" const body = await response.json()",
" console.log(JSON.stringify({ status: response.status, tools: body.result?.tools?.map((tool) => tool.name) || [], error: body.error || null }, null, 2))",
" })",
"NODE",
"```",
"",
"## Rules",
"",
"- Do not assume any MCP server exists unless the broker returns it as available.",