feat: compose authenticated stdio MCP with explicit runtime tool mapping
Assistant: codex Assistant-Model: gpt-6-astra Assistant-Session: 01a0e747-8f27-7242-8df8-8bc44f88c929
This commit is contained in:
parent
1ece969f59
commit
3c5cbfbafe
14 changed files with 465 additions and 81 deletions
|
|
@ -19,6 +19,8 @@ def discover(root):
|
|||
from hub_core.runtime.inbox_projection import create_inbox_projection_router
|
||||
from hub_core.security.browser import create_browser_router
|
||||
|
||||
from hub_core.mcp import RUNTIME_TOOL_NAMES
|
||||
|
||||
rows = []
|
||||
|
||||
def routes(router):
|
||||
|
|
@ -100,7 +102,8 @@ def discover(root):
|
|||
calls.append(dict(method=call.func.attr[1:].upper(), path_expression=ast.unparse(call.args[0])))
|
||||
rows.append(dict(id=f'mcp:{name}', kind='mcp', tool=name, profile='mcp-client',
|
||||
source=str(path.relative_to(root)), line=node.lineno,
|
||||
target_calls=calls, current_gate='per-invocation token provider available; host adoption required'))
|
||||
target_calls=calls, backend_profiles=['embedded', 'runtime'] if name in RUNTIME_TOOL_NAMES else ['embedded'],
|
||||
current_gate='per-invocation credential provider available; enforced runtime requires stdio credential file; embedded host admission required'))
|
||||
assert expected == {r['tool'] for r in rows if r['kind'] == 'mcp'}
|
||||
assert len(rows) == len({r['id'] for r in rows}), 'Duplicate surface identity'
|
||||
return sorted(rows, key=lambda r:r['id'])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue