runtime

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2026 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHookDispatcher

func NewHookDispatcher(opts *config.Options) *hook.Dispatcher

NewHookDispatcher is split for testability.

func ValidateHookSupport

func ValidateHookSupport(hooks map[hook.Event][]*hook.Matcher) error

ValidateHookSupport ensures configured hook events are implemented by this backend.

Types

type Engine

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

Engine owns runtime dependencies used by Query and Client.

func NewEngine

func NewEngine(opts *config.Options, sessions *session.Manager) *Engine

NewEngine creates a new runtime engine.

func (*Engine) Runner

func (e *Engine) Runner() *QueryRunner

Runner returns the query runner.

type QueryRunner

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

QueryRunner executes prompt/query flows over the configured transport.

func NewQueryRunner

func NewQueryRunner(opts *config.Options, sessions *session.Manager) *QueryRunner

NewQueryRunner creates a QueryRunner.

func (*QueryRunner) MCPServerStatuses

func (r *QueryRunner) MCPServerStatuses() map[string]mcp.ServerStatus

MCPServerStatuses returns MCP server readiness discovered during registry init.

func (*QueryRunner) RunMessageIterator

func (r *QueryRunner) RunMessageIterator(
	ctx context.Context,
	sessionID string,
	inputs iter.Seq[message.StreamingMessage],
) (<-chan message.Message, <-chan error)

RunMessageIterator incrementally consumes streaming input and processes each user message against shared session state.

func (*QueryRunner) RunMessages

func (r *QueryRunner) RunMessages(
	ctx context.Context,
	sessionID string,
	inputs []message.StreamingMessage,
) (<-chan message.Message, <-chan error)

RunMessages runs a conversation turn from one or more user messages.

func (*QueryRunner) RunPrompt

func (r *QueryRunner) RunPrompt(
	ctx context.Context,
	sessionID string,
	content message.UserMessageContent,
) (<-chan message.Message, <-chan error)

RunPrompt runs a simple user-content turn and streams message outputs.

func (*QueryRunner) SetPermissionMode

func (r *QueryRunner) SetPermissionMode(mode string)

SetPermissionMode updates the active permission mode used by tool execution.

Jump to

Keyboard shortcuts

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