mirror of
https://github.com/esengine/DeepSeek-Reasonix.git
synced 2026-11-07 10:45:59 -10:00
UseCapabilityTool, the MCP capability runtime, on-demand connects, capability listing and search, and the argument-contract reading they share move from internal/runtime/agent to internal/runtime/usecap. They were already their own types rather than agent methods, and they need nothing from the agent. usecap depends on the agent not at all; the agent imports it. - The two MCP checks both sides make are now tool.HasMCPDestructiveHint and tool.IsMCPServerAuthorized. They live in contract/tool/mcp_server.go beside the interfaces they read. - The agent's call-contract gate and the proxy's hints share usecap.ReadArgumentContract, with its Hint and Broken. - FilterCapabilityListResult, FilterCapabilitySearchResult, ParseMCPServerCapabilityID and WithContractHint are exported for the child registry and the dispatch path. The integration tests that drive a real agent through the proxy stay in agent. The runtime's own tests move to usecap. Tests that check the proxy's judgements against agent or delegation types run as usecap_test through export_test.go. No test was added or removed. Baseline: usecapability.go carries its debt unchanged under the new path, and delegation/task.go and control/controller.go each gain one import line (-allow-widen).
7 lines
384 B
Go
7 lines
384 B
Go
// Package usecap is the use_capability proxy: the one fixed tool through which
|
|
// a model reaches MCP servers, skills and dispatch-only tools without their
|
|
// schemas entering the request, and the session runtime that connects MCP
|
|
// servers on demand and shares their processes across agents. Each agent gets
|
|
// its own frontend, so ledgers and audits stay separate.
|
|
package usecap
|