Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ServeStdio ¶
func ServeStdio(ctx context.Context, host HostContext, opts ...ServerOption) error
ServeStdio runs the reserved MCP server over stdin/stdout until the client disconnects.
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine resolves child agents and executes them as real nested ACP sessions.
func (*Engine) RunAgent ¶
func (e *Engine) RunAgent( ctx context.Context, host HostContext, req RunAgentRequest, ) RunAgentResult
RunAgent executes one child reusable agent and always returns a structured result payload suitable for the reserved `run_agent` tool.
type HostContext ¶
type HostContext struct {
BaseRuntime reusableagents.NestedBaseRuntime
Nested reusableagents.NestedExecutionContext
}
HostContext carries the host-owned state that a reserved `run_agent` tool call is allowed to inherit.
func LoadHostContextFromEnv ¶
func LoadHostContextFromEnv() (HostContext, error)
LoadHostContextFromEnv loads the host-owned reserved-server runtime payload from PRODUCTIZE_RUN_AGENT_CONTEXT.
type Option ¶
type Option func(*Engine)
Option configures an Engine.
func WithPromptExecutor ¶
func WithPromptExecutor( fn func( context.Context, *model.RuntimeConfig, string, *reusableagents.ExecutionContext, execpkg.SessionMCPBuilder, ) (execpkg.PreparedPromptResult, error), ) Option
WithPromptExecutor overrides the real nested ACP prompt runner for tests.
type RunAgentRequest ¶
RunAgentRequest is the generic nested-agent tool contract.
type RunAgentResult ¶
type RunAgentResult struct {
Name string `json:"name"`
Source string `json:"source"`
Output string `json:"output"`
RunID string `json:"run_id,omitempty"`
Success bool `json:"success"`
Error string `json:"error,omitempty"`
Blocked bool `json:"blocked,omitempty"`
BlockedReason kinds.ReusableAgentBlockedReason `json:"blocked_reason,omitempty"`
ParentAgentName string `json:"parent_agent_name,omitempty"`
Depth int `json:"depth,omitempty"`
MaxDepth int `json:"max_depth,omitempty"`
}
RunAgentResult is the deterministic nested-agent success/failure payload.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server serves the reserved Productize MCP tool surface over stdio.
func NewServer ¶
func NewServer(opts ...ServerOption) *Server
NewServer constructs the reserved stdio MCP server.
type ServerOption ¶
type ServerOption func(*Server)
ServerOption configures the stdio MCP server.
func WithEngine ¶
func WithEngine(engine *Engine) ServerOption
WithEngine overrides the nested-agent execution engine.
func WithImplementation ¶
func WithImplementation(impl *mcp.Implementation) ServerOption
WithImplementation overrides the advertised MCP implementation metadata.