client

package
v0.11.2 Latest Latest
Warning

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

Go to latest
Published: May 26, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func Connect

func Connect() (*Client, error)

Connect creates a gRPC client connection to the daemon Unix socket.

func EnsureDaemon

func EnsureDaemon() (*Client, error)

EnsureDaemon starts the daemon if not running, then connects.

func (*Client) AddProvider

func (c *Client) AddProvider(ctx context.Context, req *pb.AddProviderReq) (*pb.Provider, error)

func (*Client) ApprovePlan

func (c *Client) ApprovePlan(ctx context.Context, sessionID, planID string, skipSteps []string) (<-chan *pb.ChatEvent, error)

ApprovePlan approves a proposed plan and returns a channel of ChatEvents.

func (*Client) AttachSession

func (c *Client) AttachSession(ctx context.Context, sessionID string) (<-chan *pb.ChatEvent, error)

AttachSession streams events from an existing session.

func (*Client) Close

func (c *Client) Close() error

func (*Client) CompactSession

func (c *Client) CompactSession(ctx context.Context, sessionID string) (<-chan *pb.ChatEvent, error)

CompactSession requests immediate context compression for the given session. It sends a special sentinel message that handleChat recognises as a compression request rather than a user turn — the daemon compresses history and responds with a ContextCompressed event.

func (*Client) CreateCron

func (c *Client) CreateCron(ctx context.Context, sessionID, schedule, command string) (*pb.CronJob, error)

func (*Client) CreateSession

func (c *Client) CreateSession(ctx context.Context, req *pb.CreateSessionReq) (*pb.Session, error)

func (*Client) EnsureCompatible

func (c *Client) EnsureCompatible() (*pb.VersionCheckResp, error)

EnsureCompatible sends a version check to the daemon and returns the result. Callers should inspect Compatible and ReloadRecommended to decide what to do.

func (*Client) GetAgentStatus

func (c *Client) GetAgentStatus(ctx context.Context, agentID string) (*pb.Agent, error)

func (*Client) GetFleetStatus

func (c *Client) GetFleetStatus(ctx context.Context, fleetID string) (*pb.FleetStatus, error)

GetFleetStatus returns the current status of a fleet.

func (*Client) GetTeamStatus

func (c *Client) GetTeamStatus(ctx context.Context, teamID string) (*pb.TeamStatus, error)

GetTeamStatus returns the status of the active team.

func (*Client) Health

func (c *Client) Health(ctx context.Context) (*pb.HealthResponse, error)

func (*Client) KillAgent

func (c *Client) KillAgent(ctx context.Context, agentID string) error

KillAgent kills a team agent by routing through the job control system.

func (*Client) KillFleetWorker

func (c *Client) KillFleetWorker(ctx context.Context, fleetID, workerID string) error

KillFleetWorker cancels a specific worker within a fleet.

func (*Client) KillJob

func (c *Client) KillJob(ctx context.Context, jobID string) error

KillJob kills the job with the given ID.

func (*Client) KillSession

func (c *Client) KillSession(ctx context.Context, id string) error

func (*Client) ListAgents

func (c *Client) ListAgents(ctx context.Context) (*pb.AgentList, error)

func (*Client) ListCrons

func (c *Client) ListCrons(ctx context.Context) (*pb.CronJobList, error)

func (*Client) ListJobs

func (c *Client) ListJobs(ctx context.Context) (*pb.JobList, error)

ListJobs returns all active jobs from the daemon's job registry.

func (*Client) ListProviders

func (c *Client) ListProviders(ctx context.Context) (*pb.ProviderList, error)

func (*Client) ListSessions

func (c *Client) ListSessions(ctx context.Context) (*pb.SessionList, error)

func (*Client) ListTeams

func (c *Client) ListTeams(ctx context.Context, projectID string) (*pb.TeamList, error)

ListTeams returns all active teams, optionally filtered by project.

func (*Client) PauseCron

func (c *Client) PauseCron(ctx context.Context, jobID string) error

func (*Client) PauseJob

func (c *Client) PauseJob(ctx context.Context, jobID string) error

PauseJob pauses the job with the given ID.

func (*Client) RejectPlan

func (c *Client) RejectPlan(ctx context.Context, sessionID, planID, feedback string) error

RejectPlan rejects a proposed plan with optional feedback.

func (*Client) RemoveProvider

func (c *Client) RemoveProvider(ctx context.Context, alias string) error

func (*Client) RequestReload

func (c *Client) RequestReload(ctx context.Context) (<-chan *pb.ReloadStatus, error)

RequestReload asks the daemon to checkpoint and restart, streaming status events until the stream closes. The daemon stops after sending "restarting".

func (*Client) RespondToPermission

func (c *Client) RespondToPermission(ctx context.Context, requestID string, allowed bool, scope string) error

func (*Client) ResumeCron

func (c *Client) ResumeCron(ctx context.Context, jobID string) error

func (*Client) ResumeJob

func (c *Client) ResumeJob(ctx context.Context, jobID string) error

ResumeJob resumes a paused job.

func (*Client) SendMessage

func (c *Client) SendMessage(ctx context.Context, sessionID, content string) (<-chan *pb.ChatEvent, error)

SendMessage sends a chat message and returns a channel of ChatEvents.

func (*Client) SetDefaultProvider

func (c *Client) SetDefaultProvider(ctx context.Context, alias string) error

func (*Client) Shutdown

func (c *Client) Shutdown(ctx context.Context) error

func (*Client) StartFleet

func (c *Client) StartFleet(ctx context.Context, req *pb.StartFleetReq) (<-chan *pb.ChatEvent, error)

StartFleet starts a fleet execution and returns a channel of ChatEvents containing FleetStatus updates.

func (*Client) StartTeam

func (c *Client) StartTeam(ctx context.Context, req *pb.StartTeamReq) (<-chan *pb.TeamEvent, error)

StartTeam starts a team and returns a channel of TeamEvents.

func (*Client) StopCron

func (c *Client) StopCron(ctx context.Context, jobID string) error

func (*Client) TestProvider

func (c *Client) TestProvider(ctx context.Context, alias string) (*pb.TestProviderResult, error)

func (*Client) UpdateProviderModel

func (c *Client) UpdateProviderModel(ctx context.Context, alias, model string) error

Jump to

Keyboard shortcuts

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