repl

package
v0.60.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2026 License: MIT Imports: 66 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	HeadlessFormatText = "text"
	HeadlessFormatJSON = "json"
)

Variables

View Source
var ErrCompletionSignalMissing = errors.New("completion signal not found in response")

ErrCompletionSignalMissing is returned when a --completion-signal was configured but the final response did not contain it. The caller should continue the loop with another iteration.

Functions

func RunREPL

func RunREPL(
	version string,
	workingDir string,
	cfg *config.ResolvedConfig,
	loader *config.Loader,
	globalCfg *config.GlobalConfig,
	registry *providers.Registry,
	needsSetup bool,
	mcpRuntime keenmcp.Runtime,
	resumeSession *session.LoadedSession,
) (string, error)

Types

type HeadlessRunOptions

type HeadlessRunOptions struct {
	WorkingDir       string
	Config           *config.ResolvedConfig
	GlobalConfig     *config.GlobalConfig
	MCPRuntime       keenmcp.Runtime
	Client           llm.LLMClient
	SessionID        string
	Prompt           string
	Format           string
	CompletionSignal string
	Out              io.Writer
	// Progress, when set and Format is text, receives live text chunks and
	// tool end lines as the run happens.
	Progress io.Writer
}

type HeadlessRunResult

type HeadlessRunResult struct {
	SessionID         string         `json:"session_id"`
	OpenCodeSessionID string         `json:"opencode_session_id"`
	Text              string         `json:"text"`
	Usage             *headlessUsage `json:"usage,omitempty"`
}

func RunHeadless

func RunHeadless(ctx context.Context, opts HeadlessRunOptions) (*HeadlessRunResult, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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