Documentation
¶
Index ¶
- type Manager
- func (m *Manager) Cancel(workerID string) error
- func (m *Manager) Get(workerID string) (Worker, bool)
- func (m *Manager) List() []Worker
- func (m *Manager) ListByParent(parentSessionID string) []Worker
- func (m *Manager) ListByRoot(rootWorkerID string) []Worker
- func (m *Manager) ListByTeam(teamName string) []Worker
- func (m *Manager) MarkHeartbeat(workerID string)
- func (m *Manager) RecordSignal(workerID string, wakeState WorkerWakeState)
- func (m *Manager) SetCommitment(workerID string, scope WorkerStateScope, commitment WorkerCommitmentState)
- func (m *Manager) SetRunner(runner Runner)
- func (m *Manager) Spawn(ctx context.Context, params SpawnParams) (Worker, error)
- func (m *Manager) Wait(ctx context.Context, workerID string) (Worker, error)
- type RunRequest
- type RunResult
- type Runner
- type SpawnParams
- type Worker
- type WorkerCommitmentState
- type WorkerKind
- type WorkerStateScope
- type WorkerStatus
- type WorkerWakeState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func (*Manager) ListByParent ¶
func (*Manager) ListByRoot ¶
func (*Manager) ListByTeam ¶
func (*Manager) MarkHeartbeat ¶
func (*Manager) RecordSignal ¶
func (m *Manager) RecordSignal(workerID string, wakeState WorkerWakeState)
func (*Manager) SetCommitment ¶
func (m *Manager) SetCommitment(workerID string, scope WorkerStateScope, commitment WorkerCommitmentState)
type RunRequest ¶
type SpawnParams ¶
type SpawnParams struct {
ParentSessionID string
ParentWorkerID string
Name string
TeamName string
RoleName string
Kind WorkerKind
Profile string
Prompt string
Title string
WorkspaceMode string
StateScope WorkerStateScope
CommitmentState WorkerCommitmentState
}
type Worker ¶
type Worker struct {
ID string `json:"id"`
SessionID string `json:"sessionId"`
ParentSessionID string `json:"parentSessionId"`
ParentWorkerID string `json:"parentWorkerId,omitempty"`
RootWorkerID string `json:"rootWorkerId,omitempty"`
Lineage []string `json:"lineage,omitempty"`
LineageDepth int `json:"lineageDepth,omitempty"`
Name string `json:"name,omitempty"`
TeamName string `json:"teamName,omitempty"`
RoleName string `json:"roleName,omitempty"`
Kind WorkerKind `json:"kind"`
Profile string `json:"profile,omitempty"`
Status WorkerStatus `json:"status"`
StateScope WorkerStateScope `json:"stateScope,omitempty"`
CommitmentState WorkerCommitmentState `json:"commitmentState,omitempty"`
WorkspaceMode string `json:"workspaceMode,omitempty"`
WakeState WorkerWakeState `json:"wakeState,omitempty"`
Prompt string `json:"prompt"`
Result string `json:"result,omitempty"`
Error string `json:"error,omitempty"`
StartedAt int64 `json:"startedAt,omitempty"`
LastSignalAt int64 `json:"lastSignalAt,omitempty"`
LastHeartbeatAt int64 `json:"lastHeartbeatAt,omitempty"`
CreatedAt int64 `json:"createdAt"`
UpdatedAt int64 `json:"updatedAt"`
CompletedAt int64 `json:"completedAt,omitempty"`
}
type WorkerCommitmentState ¶
type WorkerCommitmentState string
const ( WorkerCommitmentStateLocal WorkerCommitmentState = "local" WorkerCommitmentStatePending WorkerCommitmentState = "pending" WorkerCommitmentStateCommitted WorkerCommitmentState = "committed" WorkerCommitmentStateRejected WorkerCommitmentState = "rejected" )
type WorkerKind ¶
type WorkerKind string
const ( WorkerKindSubagent WorkerKind = "subagent" WorkerKindTeammate WorkerKind = "teammate" )
type WorkerStateScope ¶
type WorkerStateScope string
const ( WorkerStateScopeLocal WorkerStateScope = "local" WorkerStateScopeCommitted WorkerStateScope = "committed" )
type WorkerStatus ¶
type WorkerStatus string
const ( WorkerStatusQueued WorkerStatus = "queued" WorkerStatusRunning WorkerStatus = "running" WorkerStatusCompleted WorkerStatus = "completed" WorkerStatusFailed WorkerStatus = "failed" WorkerStatusCanceled WorkerStatus = "canceled" )
type WorkerWakeState ¶
type WorkerWakeState string
const ( WorkerWakeStateWaiting WorkerWakeState = "waiting" WorkerWakeStateActive WorkerWakeState = "active" WorkerWakeStateQuiescent WorkerWakeState = "quiescent" )
Click to show internal directories.
Click to hide internal directories.