externalagents

package
v1.0.0-rc.11 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: Apache-2.0 Imports: 29 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 (
	ProblemSandboxUnavailable = "sandbox_unavailable"
	ProblemCommandNotFound    = "command_not_found"
	ProblemStartFailed        = "start_failed"
	ProblemHandshakeFailed    = "handshake_failed"
	ProblemDisabled           = "disabled"
)
View Source
const (
	InstallIdle      = "idle"
	InstallRunning   = "installing"
	InstallSucceeded = "installed"
	InstallFailed    = "failed"
)
View Source
const (
	ProblemNodeMissing   = "node_missing"
	ProblemNodeTooOld    = "node_too_old"
	ProblemNpmMissing    = "npm_missing"
	ProblemInstallFailed = "install_failed"
)
View Source
const (
	LoginRunning   = "running"
	LoginWaiting   = "waiting_for_code"
	LoginSucceeded = "succeeded"
	LoginFailed    = "failed"
	LoginCancelled = "cancelled"
)
View Source
const PresetClaudeCode = "claude-code"

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent struct {
	ID         string                         `json:"id"`
	Name       string                         `json:"name"`
	Title      string                         `json:"title"`
	Enabled    bool                           `json:"enabled"`
	Preset     string                         `json:"preset,omitempty"`
	Version    string                         `json:"version,omitempty"`
	Command    string                         `json:"command"`
	Args       []string                       `json:"args"`
	Env        map[string]string              `json:"env"`
	Paths      []runtimetypes.ExternalACPPath `json:"paths"`
	Modes      []string                       `json:"modes"`
	McpServers []string                       `json:"mcpServers"`
	Sandbox    Sandbox                        `json:"sandbox"`
	CreatedAt  time.Time                      `json:"createdAt"`
	UpdatedAt  time.Time                      `json:"updatedAt"`
}

type AgentInfo

type AgentInfo struct {
	Name    string `json:"name,omitempty"`
	Title   string `json:"title,omitempty"`
	Version string `json:"version,omitempty"`
}

type AuthMethod

type AuthMethod struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
	Type        string `json:"type,omitempty"`
	Unofficial  bool   `json:"unofficial,omitempty"`
}

type CheckResult

type CheckResult struct {
	Ready       bool         `json:"ready"`
	Agent       *AgentInfo   `json:"agent,omitempty"`
	AuthMethods []AuthMethod `json:"authMethods"`
	SignedIn    *bool        `json:"signedIn,omitempty"`
	AuthLabel   string       `json:"authLabel,omitempty"`
	Problem     *Problem     `json:"problem,omitempty"`
	CheckedAt   time.Time    `json:"checkedAt"`
}

type Deps

type Deps struct {
	Agents      agentregistryservice.Service
	DB          libdb.DBManager
	ContenoxDir string
	Home        string
	Tracker     libtracker.ActivityTracker
	LookPath    func(file string) (string, error)
}

type Input

type Input struct {
	Name       string                         `json:"name"`
	Enabled    *bool                          `json:"enabled,omitempty"`
	Command    string                         `json:"command"`
	Args       []string                       `json:"args"`
	Env        map[string]string              `json:"env"`
	Paths      []runtimetypes.ExternalACPPath `json:"paths"`
	Modes      []string                       `json:"modes"`
	McpServers []string                       `json:"mcpServers"`
}

type LoginStatus

type LoginStatus struct {
	ID       string    `json:"id"`
	Agent    string    `json:"agent"`
	MethodID string    `json:"methodId"`
	State    string    `json:"state"`
	URL      string    `json:"url,omitempty"`
	Output   string    `json:"output,omitempty"`
	Problem  *Problem  `json:"problem,omitempty"`
	Started  time.Time `json:"startedAt"`
}

type NodeInfo

type NodeInfo struct {
	Found   bool   `json:"found"`
	Path    string `json:"path,omitempty"`
	Version string `json:"version,omitempty"`
	Major   int    `json:"major,omitempty"`
}

type Preset

type Preset struct {
	ID        string   `json:"id"`
	Title     string   `json:"title"`
	AgentName string   `json:"agentName"`
	Package   string   `json:"package"`
	Version   string   `json:"version"`
	MinNode   int      `json:"minNode"`
	Modes     []string `json:"modes"`
	Homepage  string   `json:"homepage"`
	// contains filtered or unexported fields
}

func Presets

func Presets() []Preset

type PresetStatus

type PresetStatus struct {
	Preset
	Installed      bool     `json:"installed"`
	InstallState   string   `json:"installState"`
	InstallProblem *Problem `json:"installProblem,omitempty"`
	Agent          *Agent   `json:"agent,omitempty"`
	UpdateReady    bool     `json:"updateReady"`
	Node           NodeInfo `json:"node"`
}

type Problem

type Problem struct {
	Kind    string `json:"kind"`
	Message string `json:"message"`
	Detail  string `json:"detail,omitempty"`
}

type Sandbox

type Sandbox struct {
	ReadsLimited bool `json:"readsLimited"`
}

type Service

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

func New

func New(deps Deps) *Service

func (*Service) CancelLogin

func (s *Service) CancelLogin(name string) (LoginStatus, error)

func (*Service) Check

func (s *Service) Check(ctx context.Context, name string) (CheckResult, error)

func (*Service) Create

func (s *Service) Create(ctx context.Context, in Input) (Agent, error)

func (*Service) Delete

func (s *Service) Delete(ctx context.Context, name string) error

func (*Service) Get

func (s *Service) Get(ctx context.Context, name string) (Agent, error)

func (*Service) InstallPreset

func (s *Service) InstallPreset(ctx context.Context, id string) (PresetStatus, error)

func (*Service) List

func (s *Service) List(ctx context.Context) ([]Agent, error)

func (*Service) LoginStatus

func (s *Service) LoginStatus(name string) (LoginStatus, error)

func (*Service) Presets

func (s *Service) Presets(ctx context.Context) ([]PresetStatus, error)

func (*Service) SetEnabled

func (s *Service) SetEnabled(ctx context.Context, name string, enabled bool) (Agent, error)

func (*Service) StartLogin

func (s *Service) StartLogin(ctx context.Context, name, methodID string) (LoginStatus, error)

func (*Service) SubmitLoginCode

func (s *Service) SubmitLoginCode(ctx context.Context, name, code string) (LoginStatus, error)

func (*Service) Update

func (s *Service) Update(ctx context.Context, name string, in Input) (Agent, error)

Jump to

Keyboard shortcuts

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