agent

package
v0.8.7 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2026 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildInstructions

func BuildInstructions(data prompt.SectionData) string

func ReadProjectInstructions

func ReadProjectInstructions(wd string) string

Types

type Agent

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

func New

func New(ws *code.Workspace, cfg *harness.Config, ui code.UI) *Agent

func (*Agent) Cancel

func (a *Agent) Cancel(id string)

func (*Agent) Close

func (a *Agent) Close() error

func (*Agent) DeleteSession

func (a *Agent) DeleteSession(_ context.Context, id string) error

func (*Agent) Effort

func (a *Agent) Effort() (string, []string)

func (*Agent) FetchModels added in v0.8.2

func (a *Agent) FetchModels(ctx context.Context)

func (*Agent) HasSession

func (a *Agent) HasSession(id string) bool

func (*Agent) ListSessions

func (a *Agent) ListSessions(_ context.Context) ([]code.SessionInfo, error)

func (*Agent) LoadSession

func (a *Agent) LoadSession(_ context.Context, id string) error

func (*Agent) Messages

func (a *Agent) Messages(id string) []harness.Message

func (*Agent) Models

func (a *Agent) Models() ([]code.Model, string)

func (*Agent) Modes added in v0.8.0

func (a *Agent) Modes(sessionID string) ([]code.Mode, string)

func (*Agent) Name

func (a *Agent) Name() string

func (*Agent) NewSession

func (a *Agent) NewSession(_ context.Context) (string, error)

func (*Agent) Save

func (a *Agent) Save(id string) error

func (*Agent) Send

func (a *Agent) Send(ctx context.Context, id string, input []harness.Content) iter.Seq2[harness.Message, error]

func (*Agent) SessionsDir

func (a *Agent) SessionsDir() string

func (*Agent) SetEffort

func (a *Agent) SetEffort(_ context.Context, value string) error

func (*Agent) SetMode added in v0.8.0

func (a *Agent) SetMode(_ context.Context, sessionID, modeID string) error

func (*Agent) SetModel

func (a *Agent) SetModel(_ context.Context, id string) error

func (*Agent) SetUI

func (a *Agent) SetUI(ui code.UI)

func (*Agent) Tools

func (a *Agent) Tools(id string) []tool.Tool

func (*Agent) Usage

func (a *Agent) Usage(id string) harness.Usage

func (*Agent) Workspace

func (a *Agent) Workspace() *code.Workspace

Jump to

Keyboard shortcuts

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