executor

package
v2.1.0-alpha.29 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2026 License: MIT Imports: 22 Imported by: 0

Documentation

Overview

Package executor provides registry-backed tool execution. It routes tool invocations through the registry gateway and awaits results on Pulse streams.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	CallTool(
		ctx context.Context,
		toolset string,
		tool tools.Ident,
		payload []byte,
		meta toolregistry.ToolCallMeta,
	) (toolregistry.ToolCallRef, error)
	RetryTool(
		ctx context.Context,
		toolset string,
		tool tools.Ident,
		payload []byte,
		meta toolregistry.ToolCallMeta,
		expectedRegistrationToken string,
	) (toolregistry.ToolCallRef, error)
}

Client initiates tool calls and returns both transport identity and the exact admission-generation token stamped on the routed request.

type Executor

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

func New

func New(client Client, pulse pulsec.Client, specs SpecLookup, opts ...Option) *Executor

func (*Executor) Execute

type Option

type Option func(*Executor)

func WithLogger

func WithLogger(logger telemetry.Logger) Option

WithLogger configures the executor logger. When nil, the executor uses a noop logger.

func WithStreamSink

func WithStreamSink(sink aistream.Sink) Option

WithStreamSink configures the executor to forward best-effort tool output delta frames into the provided stream sink while it waits for the canonical tool result message. This does not affect tool execution semantics: the final tool result remains authoritative.

func WithTracer

func WithTracer(tracer telemetry.Tracer) Option

WithTracer configures the executor tracer. When nil, the executor uses a noop tracer.

type SpecLookup

type SpecLookup interface {
	Spec(name tools.Ident) (*tools.ToolSpec, bool)
}

SpecLookup resolves tool specifications for decoding results and server data.

Jump to

Keyboard shortcuts

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