clirunner

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: MIT Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const BridgeProtocolVersion = 2
View Source
const ClaudeSDKVersion = "0.3.319"
View Source
const CodexProtocolVersion = "0.167.0"

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent struct {
	MCPGrants       []workflows.ToolGrant `yaml:"mcp-grants"`
	Limits          Limits                `yaml:"limits"`
	Execution       Execution             `yaml:"execution"`
	Instructions    []string              `yaml:"instructions"`
	InstructionText string                `yaml:"-"`
	Tools           []string              `yaml:"tools,omitempty"`
	Authentication  Authentication        `yaml:"authentication"`
	Bridge          string                `yaml:"bridge"`
	Provider        string                `yaml:"provider"`
	Model           string                `yaml:"model"`
	Command         string                `yaml:"command"`
	Args            []string              `yaml:"args"`
	Workspace       string                `yaml:"workspace"`
	Sandbox         string                `yaml:"sandbox"`
	PermissionMode  string                `yaml:"permission-mode"`
}

type Authentication

type Authentication struct {
	CredentialFile string `yaml:"credential-file"`
	Mode           string `yaml:"mode"`
	Endpoint       string `yaml:"endpoint"`
	CredentialEnv  string `yaml:"credential-env"`
}

type Config

type Config struct {
	Controller         operational.Config            `yaml:"controller"`
	Execution          Execution                     `yaml:"execution"`
	CatalogFingerprint string                        `yaml:"-"`
	MCPServers         map[string]MCPServer          `yaml:"mcp-servers"`
	ToolCatalog        []workflows.ToolDefinition    `yaml:"-"`
	Publication        development.PublicationPolicy `yaml:"publication"`
	Agents             map[string]Agent              `yaml:"agents"`
}

func LoadConfig

func LoadConfig(path string) (Config, error)

func (Config) CommandExecutionPolicy

func (c Config) CommandExecutionPolicy() runtimeexec.Policy

func (Config) PinRuntimes

func (c Config) PinRuntimes(ctx context.Context) (Config, error)

func (Config) Validate

func (c Config) Validate() error

type Execution

type Execution struct {
	NetworkRuntime string             `yaml:"network-runtime"`
	Network        *network.Reference `yaml:"-" json:",omitempty"`
	NetworkMode    string             `yaml:"network" json:",omitempty"`
	Cleanup        string             `yaml:"cleanup"`
	UID            *int               `yaml:"uid"`
	GID            *int               `yaml:"gid"`

	Mode     string `yaml:"mode"`
	Image    string `yaml:"image"`
	Runtime  string `yaml:"runtime"`
	Writable bool   `yaml:"writable"`
	// contains filtered or unexported fields
}

type Limits

type Limits struct {
	MaxWorkers  int    `yaml:"max-workers"`
	MaxDepth    int    `yaml:"max-depth"`
	MaxQueued   int    `yaml:"max-queued-messages"`
	MaxTurns    int    `yaml:"max-turns"`
	TurnTimeout string `yaml:"turn-timeout"`
	MaxOutput   int    `yaml:"max-output-bytes"`
}

type MCPServer

type MCPServer struct {
	Transport   string            `yaml:"transport"`
	Command     string            `yaml:"command"`
	Args        []string          `yaml:"args"`
	Endpoint    string            `yaml:"endpoint"`
	Timeout     string            `yaml:"timeout"`
	Environment map[string]string `yaml:"environment-env"`
	Headers     map[string]string `yaml:"headers-env"`
}

type Runner

type Runner struct {
	Config    Config
	Workspace string
	// contains filtered or unexported fields
}

func (*Runner) AdmitNativeTask

func (r *Runner) AdmitNativeTask(definition *workflows.AgentDefinition) (*workflows.AgentDefinition, error)

AdmitNativeTask resolves behavior against the admitted codex runtime. It does not add managed tools, repair support, authentication or execution authority.

func (*Runner) AdmittedRoles

func (r *Runner) AdmittedRoles(ctx context.Context) (roles json.RawMessage, err error)

func (*Runner) Capabilities

func (r *Runner) Capabilities(id string) (workflows.ProviderCapabilities, error)

func (*Runner) ExternalTool

func (r *Runner) ExternalTool(ctx context.Context, definition workflows.ToolDefinition, args json.RawMessage) (json.RawMessage, error)

func (*Runner) HasAgent

func (r *Runner) HasAgent(id string) bool

func (*Runner) Preflight

func (r *Runner) Preflight(ctx context.Context, ids []string) error

func (*Runner) RunAgent

func (r *Runner) RunAgent(ctx context.Context, req workflows.AgentRequest) (map[string]any, error)

func (*Runner) RunTurn

func (r *Runner) RunTurn(ctx context.Context, req workflows.SessionRequest, emit func(workflows.ProviderEvent)) (result workflows.SessionResult, err error)

func (*Runner) RunnerForRoles

func (r *Runner) RunnerForRoles(raw json.RawMessage) (workflows.AgentRunner, error)

func (*Runner) SecretValues

func (r *Runner) SecretValues() map[string]string

func (*Runner) ToolPolicy

func (r *Runner) ToolPolicy(role string) ([]workflows.ToolGrant, []workflows.ToolDefinition)

func (*Runner) UsageProvider

func (r *Runner) UsageProvider(role, model string) (string, string)

func (*Runner) ValidateConversationOutput

func (r *Runner) ValidateConversationOutput(id string, schema map[string]any) error

ValidateConversationOutput rejects contracts the provider cannot transport.

func (*Runner) VerifyToolCatalog

func (r *Runner) VerifyToolCatalog(ctx context.Context) error

func (*Runner) WithWorkerWorkspace

func (r *Runner) WithWorkerWorkspace(role, workspace string) (workflows.SessionRunner, error)

func (*Runner) WorkerAccess

func (r *Runner) WorkerAccess(id string) (workflows.WorkerAccess, error)

func (*Runner) WorkerLimits

func (r *Runner) WorkerLimits(id string) (workflows.WorkerLimits, error)

Jump to

Keyboard shortcuts

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