Documentation
¶
Index ¶
- type ApprovalManager
- func (m *ApprovalManager) Clear()
- func (m *ApprovalManager) ClearServer(server mcpServer.ServerID)
- func (m *ApprovalManager) Create(ctx context.Context, summary mcpServer.MCPApprovalSummary) (string, error)
- func (m *ApprovalManager) LookupDecision(summary mcpServer.MCPApprovalSummary) (mcpServer.MCPApprovalResolution, bool)
- func (m *ApprovalManager) Resolve(ctx context.Context, id string, resolution mcpServer.MCPApprovalResolution) (mcpServer.MCPApprovalResolutionResult, error)
- func (m *ApprovalManager) VerifyAndConsumeToken(ctx context.Context, token string, expected mcpServer.MCPApprovalSummary) (string, error)
- type Runtime
- type ToolBridge
- func (b *ToolBridge) Evaluate(ctx context.Context, serverRef mcpServer.ServerID, ...) (*mcpServer.MCPApprovalEvaluation, error)
- func (b *ToolBridge) EvaluateMapped(ctx context.Context, mapping mcpConversation.MCPProviderToolMapping, ...) (*mcpServer.MCPApprovalEvaluation, error)
- func (b *ToolBridge) Invoke(ctx context.Context, serverRef mcpServer.ServerID, ...) (*mcpServer.InvokeMCPToolResponseBody, error)
- func (b *ToolBridge) InvokeMapped(ctx context.Context, mapping mcpConversation.MCPProviderToolMapping, ...) (*mcpServer.InvokeMCPToolResponseBody, error)
- func (b *ToolBridge) ResolveApproval(ctx context.Context, approvalID string, ...) (mcpServer.MCPApprovalResolutionResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApprovalManager ¶
type ApprovalManager struct {
// contains filtered or unexported fields
}
func NewApprovalManager ¶
func NewApprovalManager(ttl time.Duration) *ApprovalManager
func (*ApprovalManager) Clear ¶
func (m *ApprovalManager) Clear()
func (*ApprovalManager) ClearServer ¶
func (m *ApprovalManager) ClearServer( server mcpServer.ServerID, )
ClearServer removes pending tokens and remembered decisions belonging to an MCP server. It is called whenever that server's runtime session ends.
func (*ApprovalManager) Create ¶
func (m *ApprovalManager) Create( ctx context.Context, summary mcpServer.MCPApprovalSummary, ) (string, error)
func (*ApprovalManager) LookupDecision ¶
func (m *ApprovalManager) LookupDecision( summary mcpServer.MCPApprovalSummary, ) (mcpServer.MCPApprovalResolution, bool)
func (*ApprovalManager) Resolve ¶
func (m *ApprovalManager) Resolve( ctx context.Context, id string, resolution mcpServer.MCPApprovalResolution, ) (mcpServer.MCPApprovalResolutionResult, error)
func (*ApprovalManager) VerifyAndConsumeToken ¶
func (m *ApprovalManager) VerifyAndConsumeToken( ctx context.Context, token string, expected mcpServer.MCPApprovalSummary, ) (string, error)
type Runtime ¶
type Runtime interface {
CallToolDryRun(
ctx context.Context,
server mcpServer.ServerID,
request mcpServer.InvokeMCPToolRequestBody,
) (mcpServer.RuntimeConfig, mcpServer.MCPToolCapability, error)
CallTool(
ctx context.Context,
server mcpServer.ServerID,
request mcpServer.InvokeMCPToolRequestBody,
) (*mcpServer.InvokeMCPToolResponseBody, error)
SetSessionLifecycleCleaner(
cleaner mcpConnection.SessionLifecycleCleaner,
)
}
type ToolBridge ¶
type ToolBridge struct {
// contains filtered or unexported fields
}
func NewToolBridge ¶
func NewToolBridge( runtime *mcpConnection.MCPRuntimeManager, approvals *ApprovalManager, ) *ToolBridge
func (*ToolBridge) Evaluate ¶
func (b *ToolBridge) Evaluate( ctx context.Context, serverRef mcpServer.ServerID, request mcpServer.InvokeMCPToolRequestBody, ) (*mcpServer.MCPApprovalEvaluation, error)
func (*ToolBridge) EvaluateMapped ¶
func (b *ToolBridge) EvaluateMapped( ctx context.Context, mapping mcpConversation.MCPProviderToolMapping, request mcpServer.InvokeMCPToolRequestBody, ) (*mcpServer.MCPApprovalEvaluation, error)
EvaluateMapped evaluates a model-originated provider-tool call against the persisted mapping produced by MCP inference hydration.
The mapping is authoritative for server identity, provider name, choice ID, discovered digest, and any conversation policy tightening.
func (*ToolBridge) Invoke ¶
func (b *ToolBridge) Invoke( ctx context.Context, serverRef mcpServer.ServerID, request mcpServer.InvokeMCPToolRequestBody, ) (*mcpServer.InvokeMCPToolResponseBody, error)
func (*ToolBridge) InvokeMapped ¶
func (b *ToolBridge) InvokeMapped( ctx context.Context, mapping mcpConversation.MCPProviderToolMapping, request mcpServer.InvokeMCPToolRequestBody, ) (*mcpServer.InvokeMCPToolResponseBody, error)
InvokeMapped invokes a provider-tool mapping after revalidating the current connected runtime snapshot and applying only policy-tightening constraints.
func (*ToolBridge) ResolveApproval ¶
func (b *ToolBridge) ResolveApproval( ctx context.Context, approvalID string, resolution mcpServer.MCPApprovalResolution, ) (mcpServer.MCPApprovalResolutionResult, error)
Click to show internal directories.
Click to hide internal directories.