goose

package
v0.482.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResetContext added in v0.477.0

func ResetContext(projectRoot string) error

Types

type Client

type Client struct {
}

func NewClient

func NewClient() *Client

func (*Client) Execute

func (c *Client) Execute(ctx context.Context, prompt string, callback func(Message)) error

Execute runs a Goose command with the given prompt and streams cleaned messages to the provided callback function. The callback is called for each cleaned message and when execution completes.

For now this uses the Goose CLI via FTL CLI to execute the command, but we should switch to native Goose API calls when available.

type Message

type Message struct {
	Content string
	Source  MessageSource
}

type MessageSource

type MessageSource int

MessageSource represents the source of a message from Goose

const (
	// SourceStdout represents messages from standard output
	SourceStdout MessageSource = iota
	// SourceStderr represents messages from standard error
	SourceStderr
	// SourceCompletion represents a completion signal
	SourceCompletion
)

Jump to

Keyboard shortcuts

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