api

package
v0.0.0-...-f16217b Latest Latest
Warning

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

Go to latest
Published: May 6, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBInstance

type DBInstance struct {
	Name          string `json:"name"`
	URL           string `json:"url,omitempty"`
	Host          string `json:"host,omitempty"`
	Port          int    `json:"port,omitempty"`
	User          string `json:"user,omitempty"`
	Password      string `json:"password,omitempty"`
	Image         string `json:"image,omitempty"`
	ContainerName string `json:"containerName,omitempty"`
	VolumeName    string `json:"volumeName,omitempty"`
	SnapshotRoot  string `json:"snapshotRoot,omitempty"`
}

type DoctorResult

type DoctorResult struct {
	Worktree     string   `json:"worktree"`
	InstanceID   string   `json:"instanceId,omitempty"`
	Project      string   `json:"project,omitempty"`
	Target       string   `json:"target,omitempty"`
	CLIScope     string   `json:"cliScope,omitempty"`
	ChecksPassed bool     `json:"checksPassed"`
	Checks       []string `json:"checks"`
	Warnings     []string `json:"warnings,omitempty"`
}

type Event

type Event struct {
	TS            string    `json:"ts"`
	Type          EventType `json:"type"`
	InstanceID    string    `json:"instanceId,omitempty"`
	Worktree      string    `json:"worktree,omitempty"`
	Target        string    `json:"target,omitempty"`
	Task          string    `json:"task,omitempty"`
	Mode          RunMode   `json:"mode,omitempty"`
	State         NodeState `json:"state,omitempty"`
	PreviousState NodeState `json:"previousState,omitempty"`
	Stream        string    `json:"stream,omitempty"`
	Line          string    `json:"line,omitempty"`
	CacheKey      string    `json:"cacheKey,omitempty"`
	PID           int       `json:"pid,omitempty"`
	Files         []string  `json:"files,omitempty"`
	AffectedTasks []string  `json:"affectedTasks,omitempty"`
	PromptID      string    `json:"promptId,omitempty"`
	PromptKind    string    `json:"promptKind,omitempty"`
	Prompt        string    `json:"prompt,omitempty"`
	Error         string    `json:"error,omitempty"`
	Success       *bool     `json:"success,omitempty"`
}

type EventType

type EventType string
const (
	EventRunStarted      EventType = "run_started"
	EventRunFinished     EventType = "run_finished"
	EventWatchCycleStart EventType = "watch_cycle_started"
	EventWatchCycleDone  EventType = "watch_cycle_finished"
	EventInstanceUpdated EventType = "instance_updated"
	EventTaskState       EventType = "task_state_changed"
	EventLogLine         EventType = "log_line"
	EventCacheHit        EventType = "cache_hit"
	EventCacheMiss       EventType = "cache_miss"
	EventProcessExited   EventType = "process_exited"
	EventInteractionReq  EventType = "interaction_requested"
	EventInteractionAck  EventType = "interaction_answered"
	EventInteractionStop EventType = "interaction_cancelled"
)

type FlushIssue

type FlushIssue struct {
	Task    string `json:"task,omitempty"`
	Kind    string `json:"kind"`
	Message string `json:"message"`
	LogPath string `json:"logPath,omitempty"`
}

type FlushRequest

type FlushRequest struct {
	ID        string    `json:"id"`
	CreatedAt time.Time `json:"createdAt"`
	SyncPath  string    `json:"syncPath"`
}

type FlushResult

type FlushResult struct {
	RequestID  string         `json:"requestId"`
	InstanceID string         `json:"instanceId"`
	Worktree   string         `json:"worktree"`
	Project    string         `json:"project,omitempty"`
	Target     string         `json:"target"`
	Mode       RunMode        `json:"mode"`
	Started    bool           `json:"started"`
	Synced     bool           `json:"synced"`
	Success    bool           `json:"success"`
	TimedOut   bool           `json:"timedOut,omitempty"`
	DurationMs int64          `json:"durationMs"`
	UpdatedAt  time.Time      `json:"updatedAt,omitempty"`
	Nodes      []NodeStatus   `json:"nodes,omitempty"`
	Services   []FlushService `json:"services,omitempty"`
	Issues     []FlushIssue   `json:"issues,omitempty"`
}

type FlushService

type FlushService struct {
	Task    string    `json:"task"`
	State   NodeState `json:"state"`
	PID     int       `json:"pid,omitempty"`
	Alive   bool      `json:"alive"`
	Ready   bool      `json:"ready"`
	Error   string    `json:"error,omitempty"`
	LogPath string    `json:"logPath,omitempty"`
}

type GraphAffectedResult

type GraphAffectedResult struct {
	Files            []string          `json:"files"`
	DirectlyAffected []string          `json:"directlyAffected"`
	Downstream       []string          `json:"downstream"`
	Explanations     []GraphFileImpact `json:"explanations,omitempty"`
	UnmatchedFiles   []string          `json:"unmatchedFiles,omitempty"`
}

type GraphFileImpact

type GraphFileImpact struct {
	File     string `json:"file"`
	Task     string `json:"task"`
	Affected bool   `json:"affected"`
	Reason   string `json:"reason"`
	Input    string `json:"input,omitempty"`
	Relative string `json:"relative,omitempty"`
	Ignore   string `json:"ignore,omitempty"`
}

type Instance

type Instance struct {
	ID         string                `json:"id"`
	Label      string                `json:"label"`
	Worktree   string                `json:"worktree"`
	CreatedAt  time.Time             `json:"createdAt"`
	Ports      map[string]int        `json:"ports"`
	Env        map[string]string     `json:"env"`
	DB         DBInstance            `json:"db"`
	Processes  map[string]ProcessRef `json:"processes"`
	Supervisor SupervisorRef         `json:"supervisor,omitempty"`
	LastRun    RunConfig             `json:"lastRun,omitempty"`
}

type InstanceSummary

type InstanceSummary struct {
	ID       string            `json:"id"`
	Label    string            `json:"label"`
	Worktree string            `json:"worktree"`
	Ports    map[string]int    `json:"ports"`
	DB       DBInstance        `json:"db"`
	Target   string            `json:"target,omitempty"`
	States   map[string]string `json:"states,omitempty"`
}

type LogEvent

type LogEvent struct {
	TS         string `json:"ts"`
	InstanceID string `json:"instanceId"`
	Task       string `json:"task"`
	Stream     string `json:"stream"`
	Line       string `json:"line"`
}

type NodeState

type NodeState string
const (
	StatePending         NodeState = "pending"
	StateReady           NodeState = "ready"
	StateRunning         NodeState = "running"
	StateCached          NodeState = "cached"
	StateDone            NodeState = "done"
	StateFailed          NodeState = "failed"
	StateMigrationNeeded NodeState = "migration_needed"
	StateCanceled        NodeState = "canceled"
	StateStopped         NodeState = "stopped"
	StateDirty           NodeState = "dirty"
	StateSkipped         NodeState = "skipped"
)

type NodeStatus

type NodeStatus struct {
	Name       string    `json:"name"`
	Kind       string    `json:"kind"`
	State      NodeState `json:"state"`
	LastRunKey string    `json:"lastRunKey,omitempty"`
	LastError  string    `json:"lastError,omitempty"`
	PID        int       `json:"pid,omitempty"`
	LogPath    string    `json:"logPath,omitempty"`
}

type ProcessRef

type ProcessRef struct {
	PID       int       `json:"pid"`
	StartedAt time.Time `json:"startedAt"`
}

type RunConfig

type RunConfig struct {
	Project     string  `json:"project"`
	Target      string  `json:"target"`
	Mode        RunMode `json:"mode"`
	MaxParallel int     `json:"maxParallel,omitempty"`
	Detached    bool    `json:"detached,omitempty"`
}

type RunMode

type RunMode string
const (
	ModeDev   RunMode = "dev"
	ModeWatch RunMode = "watch"
	ModeCI    RunMode = "ci"
)

type RunResult

type RunResult struct {
	Target     string   `json:"target"`
	Mode       RunMode  `json:"mode"`
	InstanceID string   `json:"instanceId"`
	Success    bool     `json:"success"`
	DurationMs int64    `json:"durationMs"`
	FailedNode string   `json:"failedNode,omitempty"`
	CacheHits  []string `json:"cacheHits"`
	StartedAt  string   `json:"startedAt"`
	FinishedAt string   `json:"finishedAt"`
}

type StatusResult

type StatusResult struct {
	InstanceID string            `json:"instanceId"`
	Worktree   string            `json:"worktree,omitempty"`
	Target     string            `json:"target"`
	Mode       RunMode           `json:"mode,omitempty"`
	UpdatedAt  time.Time         `json:"updatedAt,omitempty"`
	Ports      map[string]int    `json:"ports,omitempty"`
	DB         DBInstance        `json:"db,omitempty"`
	URLs       map[string]string `json:"urls,omitempty"`
	Supervisor *SupervisorStatus `json:"supervisor,omitempty"`
	Nodes      []NodeStatus      `json:"nodes"`
}

type SupervisorRef

type SupervisorRef struct {
	PID       int       `json:"pid"`
	ExecPID   int       `json:"execPid,omitempty"`
	StartedAt time.Time `json:"startedAt"`
	LogPath   string    `json:"logPath,omitempty"`
}

type SupervisorStatus

type SupervisorStatus struct {
	PID       int       `json:"pid,omitempty"`
	ExecPID   int       `json:"execPid,omitempty"`
	Alive     bool      `json:"alive"`
	StartedAt time.Time `json:"startedAt,omitempty"`
	LogPath   string    `json:"logPath,omitempty"`
}

type UpgradeResult

type UpgradeResult struct {
	Command       []string `json:"command"`
	Package       string   `json:"package"`
	VersionTarget string   `json:"versionTarget"`
	Success       bool     `json:"success"`
	DurationMs    int64    `json:"durationMs"`
	Error         string   `json:"error,omitempty"`
	Output        string   `json:"output,omitempty"`
}

type VersionResult

type VersionResult struct {
	Version     string `json:"version"`
	ModulePath  string `json:"modulePath"`
	GoVersion   string `json:"goVersion"`
	VCSRevision string `json:"vcsRevision,omitempty"`
	VCSTime     string `json:"vcsTime,omitempty"`
	Modified    bool   `json:"modified,omitempty"`
}

Jump to

Keyboard shortcuts

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