invocation

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 22, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package invocation adapts MCP calls to the protocol-neutral component port.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Invoker   exec.ComponentInvoker
	Client    xmcp.Client
	Authorize func(context.Context, exec.ComponentTarget) error
	// Output supplies the component's compiled JSON presentation contract.
	Output func(exec.ComponentTarget) *output.Plan
}

type Execution

type Execution struct {
	// contains filtered or unexported fields
}

Execution is the protocol-neutral outcome of one exact MCP component call.

func (*Execution) Error

func (e *Execution) Error() error

func (*Execution) Payload

func (e *Execution) Payload() ([]byte, error)

func (*Execution) StatusCode

func (e *Execution) StatusCode() int

func (*Execution) ToolResult

func (e *Execution) ToolResult() *schema.CallToolResult

func (*Execution) Value

func (e *Execution) Value() interface{}

type Invoker

type Invoker struct {
	// contains filtered or unexported fields
}

func New

func New(config Config) *Invoker

func (*Invoker) Execute

func (i *Invoker) Execute(ctx context.Context, request Request) (*Execution, *jsonrpc.Error)

type Request

type Request struct {
	Target exec.ComponentTarget
	Scope  *requestprovider.Scope
	Method string
	URI    string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL