agentruntime

package
v2026.701.2 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2026 License: MIT Imports: 47 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrRestartSolomon = errors.New("restart solomon")

Functions

func CursorProxyToolCorrectionMessageForTest added in v2026.624.0

func CursorProxyToolCorrectionMessageForTest(blocked []string) string

func NativeBridgeToolCorrectionUserMsgForTest added in v2026.624.0

func NativeBridgeToolCorrectionUserMsgForTest() string

func NewREPLReadline

func NewREPLReadline(defaultPrompt string) (*readline.Instance, func(string) (string, error), error)

func ReadlinePrompt

func ReadlinePrompt(rl *readline.Instance, prompt string) (string, error)

func ResetSwitchModeCountdownForTest added in v2026.610.0

func ResetSwitchModeCountdownForTest()

func SetExecToolHookForTest added in v2026.615.0

func SetExecToolHookForTest(fn func(context.Context, tooling.Invocation) (any, error)) func()

func SetSwitchModeCountdownForTest added in v2026.610.0

func SetSwitchModeCountdownForTest(d time.Duration, width int)

func StdinIsTerminal

func StdinIsTerminal() bool

func StopAgentGenerationForTest added in v2026.615.0

func StopAgentGenerationForTest()

func StripCursorProxyInlineErrorsForTest added in v2026.624.0

func StripCursorProxyInlineErrorsForTest(content string) (string, string)

func SubagentDoneSystemMessageForTest added in v2026.615.0

func SubagentDoneSystemMessageForTest(title, subchatID string) string

func SwitchModeCountdownForTest added in v2026.610.0

func SwitchModeCountdownForTest(r *Runtime, ctx context.Context, target string) (cancelled bool, err error)

func UsesExecInstallRestartAfterSystemInstallForTest added in v2026.701.0

func UsesExecInstallRestartAfterSystemInstallForTest() bool

Types

type NestedRunConfig added in v2026.615.0

type NestedRunConfig struct {
	SysPromptPath    string
	Task             string
	ResumeID         string
	RunInBackground  bool
	ReasoningEffort  string
	ParentChatID     string
	ParentToolCallID string
	ToolCall         chatstore.ToolCall
	SpawnTime        time.Time
	Origin           string
	ProjectHex       string
	SysPrompt        string
}

type NestedRunResult added in v2026.615.0

type NestedRunResult struct {
	Output    string
	SubchatID string
	Status    string
}

type Runtime

type Runtime struct {
	RL *readline.Instance

	Client  openai.Client
	Backend llm.CompletionBackend
	Model   string
	Cfg     *config.Root
	Prov    *config.Provider

	ProjHex  string
	ProjRoot string

	Mode string

	Session *chatstore.Session

	CompactionThresholdTokens int64

	EphemeralSession bool

	Out io.Writer

	MCP *solomonmcp.Manager

	ReplShellFirst bool

	EventSink       cievents.Sink
	FailOnToolError bool

	ToolOut *tooloutput.Service

	Instructions *instructions.Loader
	// contains filtered or unexported fields
}

func NewRuntime

func NewRuntime(rl *readline.Instance, cfg *config.Root, prov *config.Provider, projHex, projRoot string, sess *chatstore.Session) *Runtime

func NewTestRuntime added in v2026.615.0

func NewTestRuntime(cfg *config.Root, prov *config.Provider, projHex, projRoot string, sess *chatstore.Session, out io.Writer) *Runtime

func (*Runtime) ApplyCurrentModel

func (r *Runtime) ApplyCurrentModel(providerName, modelID string) error

func (*Runtime) ApplyGotoCheckpoint

func (r *Runtime) ApplyGotoCheckpoint(id *checkpoint.FullCheckpointID) error

func (*Runtime) ApplyRewindCheckpoint added in v2026.621.0

func (r *Runtime) ApplyRewindCheckpoint(plan *checkpoint.RewindPlan) error

func (*Runtime) AugmentNestedCustomSystem

func (r *Runtime) AugmentNestedCustomSystem(system string) (string, error)

func (*Runtime) CancelResearch added in v2026.617.0

func (r *Runtime) CancelResearch(target string) error

func (*Runtime) Close

func (r *Runtime) Close() error

func (*Runtime) CursorNativeToolsEnabled added in v2026.606.0

func (r *Runtime) CursorNativeToolsEnabled() bool

func (*Runtime) DeleteResearch added in v2026.617.0

func (r *Runtime) DeleteResearch(target string) error

func (*Runtime) InitMCP

func (r *Runtime) InitMCP(ctx context.Context)

func (*Runtime) ListResearch added in v2026.617.0

func (r *Runtime) ListResearch() ([]research.JobRecord, error)

func (*Runtime) PrintCursorNativeToolEvent added in v2026.606.0

func (r *Runtime) PrintCursorNativeToolEvent(rawJSON string)

func (*Runtime) ReplCompleteCfg added in v2026.608.0

func (r *Runtime) ReplCompleteCfg() *config.Root

func (*Runtime) ReplCompleteProjHex added in v2026.602.2

func (r *Runtime) ReplCompleteProjHex() string

func (*Runtime) ReplCompleteProjRoot added in v2026.602.2

func (r *Runtime) ReplCompleteProjRoot() string

func (*Runtime) ReplCompleteShellFirst added in v2026.602.2

func (r *Runtime) ReplCompleteShellFirst() bool

func (*Runtime) ReplCompleteSnapshotSession added in v2026.602.2

func (r *Runtime) ReplCompleteSnapshotSession() *chatstore.Session

func (*Runtime) ResearchStatus added in v2026.617.0

func (r *Runtime) ResearchStatus(target string) (research.JobRecord, error)

func (*Runtime) ResearchStatusForProject added in v2026.617.0

func (r *Runtime) ResearchStatusForProject(projectHex, target string) (research.JobRecord, error)

func (*Runtime) ResolveTurnInvocations

func (r *Runtime) ResolveTurnInvocations(turn llm.AssistantTurnResult, legacySW *tooling.LegacyStreamWriter) (invs []tooling.Invocation, toolIDs []string, rejectNative bool, malformed error)

func (*Runtime) ResumeResearch added in v2026.617.0

func (r *Runtime) ResumeResearch(target string) (research.JobRecord, error)

func (*Runtime) Run

func (r *Runtime) Run(ctx context.Context) error

func (*Runtime) RunAgentTurnsForTest added in v2026.615.0

func (r *Runtime) RunAgentTurnsForTest(ctx context.Context) error

func (*Runtime) RunPromptOnce

func (r *Runtime) RunPromptOnce(ctx context.Context, line string) error

func (*Runtime) SetReplInputPrefillForTest added in v2026.624.0

func (r *Runtime) SetReplInputPrefillForTest(s string)

func (*Runtime) StartResearchJob added in v2026.617.0

func (r *Runtime) StartResearchJob(query, category string) (research.JobRecord, error)

func (*Runtime) TakeReplInputPrefillForTest added in v2026.624.0

func (r *Runtime) TakeReplInputPrefillForTest() string

Directories

Path Synopsis
btw

Jump to

Keyboard shortcuts

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