broker

package
v1.4.0 Latest Latest
Warning

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

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

Documentation

Overview

gRPC broker clients: the adapter worker's loopback MCP endpoint reaches the Model execution layer and the Memory store through the same fenced gateway services every other runtime uses.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GrpcMailboxBroker

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

GrpcMailboxBroker implements mcp.MailboxBroker against IPCGatewayService.

func NewGrpcMailboxBroker

func NewGrpcMailboxBroker(client ipcv1.IPCGatewayServiceClient) *GrpcMailboxBroker

NewGrpcMailboxBroker binds the broker to a gateway connection.

func (*GrpcMailboxBroker) AcknowledgeMessages

func (b *GrpcMailboxBroker) AcknowledgeMessages(ctx context.Context, identity mcp.AttemptContext, in mcp.MailboxAckInput) (mcp.MailboxAckOutcome, error)

AcknowledgeMessages receipts a drained batch. The consumer name is left unset on purpose: the service derives it from the fenced run, and sending one would only be a value the service has to reject.

func (*GrpcMailboxBroker) ReceiveMessages

ReceiveMessages drains the calling run's mailbox. No address is sent: the service derives the mailbox from the fenced assignment, so the runtime cannot drain a mailbox other than its own.

func (*GrpcMailboxBroker) SendMessage

SendMessage stores one message in the recipient's mailbox with the fenced identity of the calling attempt. The sender's version reference is sent alongside the identity because the service cross-checks it against the fenced assignment; the recipient is two fields rather than one canonical address because the address encoding is not the agent's business.

type GrpcMemoryBroker

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

GrpcMemoryBroker implements mcp.MemoryBroker against MemoryGatewayService.

func NewGrpcMemoryBroker

func NewGrpcMemoryBroker(client gatewayv1.MemoryGatewayServiceClient) *GrpcMemoryBroker

NewGrpcMemoryBroker binds the broker to a gateway connection.

func (*GrpcMemoryBroker) Put

Put writes one record with the fenced identity of the calling attempt.

func (*GrpcMemoryBroker) Search

Search retrieves records with the fenced identity of the calling attempt.

type GrpcModelBroker

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

GrpcModelBroker implements mcp.ModelBroker against ModelInvocationService.

func NewGrpcModelBroker

func NewGrpcModelBroker(client modelv1.ModelInvocationServiceClient) *GrpcModelBroker

NewGrpcModelBroker binds the broker to a gateway connection.

func (*GrpcModelBroker) InvokeStream

func (b *GrpcModelBroker) InvokeStream(ctx context.Context, in model.InvokeInput, onDelta func(string)) (model.InvokeOutput, error)

InvokeStream streams one invocation, forwarding deltas and mapping the terminal chunk onto the kernel output shape. The agent-offered tool definitions ride along: the broker resolved the names against the capability-filtered registry, and dropping them here would silently strip the model's tool surface (a real-model run answered without ever seeing a tool — the fake provider could not catch it because it scripts tool calls regardless of the offered surface).

type GrpcWorkflowSpawner

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

GrpcWorkflowSpawner implements mcp.WorkflowSpawner against the orchestrator's WorkflowSpawnService (v1.3).

func NewGrpcWorkflowSpawner

func NewGrpcWorkflowSpawner(client runtimev1.WorkflowSpawnServiceClient) *GrpcWorkflowSpawner

NewGrpcWorkflowSpawner binds the spawner to an orchestrator connection.

func (*GrpcWorkflowSpawner) Spawn

Spawn forwards one dynamic-step spawn; guard denials arrive as structured outcomes, not gRPC errors.

Jump to

Keyboard shortcuts

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