crush

package
v0.0.221 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2026 License: MIT Imports: 20 Imported by: 1 module, 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

This section is empty.

Variables

This section is empty.

Functions

func ExtractSSEData

func ExtractSSEData(line string) string

func FindAgentPath

func FindAgentPath(env *exec.Env) (string, error)

func UnwrapEvent

func UnwrapEvent(data []byte) (*crush_types.Event, error)

Types

type CrushAgent

type CrushAgent struct {
	AgentPath     string
	SettingsPath  string
	Workspace     string
	Env           *exec.Env
	LastSessionID string
	ServerClient  *CrushServerClient
}

func (*CrushAgent) Ask

func (a *CrushAgent) Ask(ctx context.Context, question string, opts *registry.AskOptions, onDelta registry.DeltaCallback) (string, error)

func (*CrushAgent) ListModels

func (a *CrushAgent) ListModels(ctx context.Context) ([]registry.ModelInfo, error)

type CrushServerClient

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

func NewCrushServerClient

func NewCrushServerClient() (*CrushServerClient, error)

func (*CrushServerClient) CreateSession

func (c *CrushServerClient) CreateSession(ctx context.Context, workspaceID string, title string) (string, error)

func (*CrushServerClient) CreateWorkspace

func (c *CrushServerClient) CreateWorkspace(ctx context.Context, cwd string) (string, error)

func (*CrushServerClient) EnsureServer

func (c *CrushServerClient) EnsureServer(ctx context.Context) error

func (*CrushServerClient) HealthCheck

func (c *CrushServerClient) HealthCheck(ctx context.Context) (int, error)

func (*CrushServerClient) InitAgent

func (c *CrushServerClient) InitAgent(ctx context.Context, workspaceID string) error

func (*CrushServerClient) KillExistingServer

func (c *CrushServerClient) KillExistingServer()

func (*CrushServerClient) SendMessage

func (c *CrushServerClient) SendMessage(ctx context.Context, workspaceID, prompt, sessionID string) error

func (*CrushServerClient) ServerPID

func (c *CrushServerClient) ServerPID() int

func (*CrushServerClient) ServerStarted

func (c *CrushServerClient) ServerStarted() bool

func (*CrushServerClient) SubscribeEvents

func (c *CrushServerClient) SubscribeEvents(ctx context.Context, workspaceID string) (<-chan string, error)

Jump to

Keyboard shortcuts

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