Documentation
¶
Index ¶
- type AgencySnapshot
- type Goal
- type Handoff
- type HandoffService
- func (s *HandoffService) Accept(ctx context.Context, teamName, handoffID, acceptedBy string) (*Handoff, error)
- func (s *HandoffService) Create(ctx context.Context, teamName, taskID, fromAgent, toAgent, workSummary string, ...) (*Handoff, error)
- func (s *HandoffService) GetPendingForAgent(ctx context.Context, teamName, agent string) ([]Handoff, error)
- func (s *HandoffService) List(ctx context.Context, teamName string, status, toAgent string) ([]Handoff, error)
- func (s *HandoffService) Read(ctx context.Context, teamName, handoffID string) (*Handoff, error)
- func (s *HandoffService) Reject(ctx context.Context, teamName, handoffID, rejectedBy, reason string) (*Handoff, error)
- type InboxMessage
- type InboxService
- func (s *InboxService) Broadcast(ctx context.Context, teamName, from, content, summary string) error
- func (s *InboxService) ReadInbox(ctx context.Context, teamName, agentName string, unreadOnly bool) ([]InboxMessage, error)
- func (s *InboxService) SendMessage(ctx context.Context, teamName, from, to, content, summary string) error
- type Member
- type MemberService
- type OfficeRosterRow
- type OfficeService
- type OfficeState
- type Role
- type RuntimeRecord
- type RuntimeService
- func (s *RuntimeService) FindBySessionID(ctx context.Context, sessionID string) (string, *RuntimeRecord, error)
- func (s *RuntimeService) List(ctx context.Context, teamName string) ([]RuntimeRecord, error)
- func (s *RuntimeService) Materialize(ctx context.Context, teamName string, members []Member, ...) ([]RuntimeRecord, RuntimeSummary, error)
- func (s *RuntimeService) Project(ctx context.Context, teamName string, members []Member, ...) ([]RuntimeRecord, RuntimeSummary, error)
- func (s *RuntimeService) Upsert(ctx context.Context, teamName string, record RuntimeRecord) (*RuntimeRecord, error)
- type RuntimeSummary
- type Service
- type Snapshot
- type TaskBoard
- type TaskBoardService
- func (s *TaskBoardService) AddTaskToColumn(ctx context.Context, teamName, taskID, column string) (*TaskBoard, error)
- func (s *TaskBoardService) AssignTask(ctx context.Context, teamName, taskID, agent string) (*TaskBoard, error)
- func (s *TaskBoardService) CreateBoard(ctx context.Context, teamName string) (*TaskBoard, error)
- func (s *TaskBoardService) GetBoardSummary(ctx context.Context, teamName string) (map[string]int, error)
- func (s *TaskBoardService) GetTaskLocation(ctx context.Context, teamName, taskID string) (string, error)
- func (s *TaskBoardService) MoveTask(ctx context.Context, teamName, taskID, fromColumn, toColumn string, ...) (*TaskBoard, error)
- func (s *TaskBoardService) ReadBoard(ctx context.Context, teamName string) (*TaskBoard, error)
- type TeamContext
- type TeamContextService
- func (s *TeamContextService) AddGoal(ctx context.Context, teamName string, goal Goal) (*TeamContext, error)
- func (s *TeamContextService) AddRole(ctx context.Context, teamName, roleName string, role Role) (*TeamContext, error)
- func (s *TeamContextService) AssignAgentToRole(ctx context.Context, teamName, roleName, agentName string) (*TeamContext, error)
- func (s *TeamContextService) CreateContext(ctx context.Context, teamName, charter string, roles map[string]Role) (*TeamContext, error)
- func (s *TeamContextService) ListTeamNames(ctx context.Context) ([]string, error)
- func (s *TeamContextService) ReadContext(ctx context.Context, teamName string) (*TeamContext, error)
- func (s *TeamContextService) UpdateContext(ctx context.Context, teamName string, updates map[string]any) (*TeamContext, error)
- func (s *TeamContextService) UpdateGoalStatus(ctx context.Context, teamName, goalID, status string) (*TeamContext, error)
- func (s *TeamContextService) UpdateWorkingAgreement(ctx context.Context, teamName string, agreement WorkingAgreement) (*TeamContext, error)
- type WorkingAgreement
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgencySnapshot ¶
type AgencySnapshot struct {
Constitution string `json:"constitution,omitempty"`
RuntimeMode string `json:"runtimeMode,omitempty"`
WorkspaceMode string `json:"workspaceMode,omitempty"`
PublicationMode string `json:"publicationMode,omitempty"`
ConsensusMode string `json:"consensusMode,omitempty"`
ActiveRuntimeRecords int `json:"activeRuntimeRecords,omitempty"`
LocalRuntimeRecords int `json:"localRuntimeRecords,omitempty"`
CommittedRuntimeCount int `json:"committedRuntimeRecords,omitempty"`
}
type Handoff ¶
type Handoff struct {
ID string `json:"id"`
TaskID string `json:"taskId"`
FromAgent string `json:"fromAgent"`
ToAgent string `json:"toAgent"`
Status string `json:"status"`
WorkSummary string `json:"workSummary"`
Artifacts []string `json:"artifacts"`
AcceptanceCriteria []string `json:"acceptanceCriteria"`
CreatedAt int64 `json:"createdAt"`
AcceptedAt *int64 `json:"acceptedAt,omitempty"`
AcceptedBy string `json:"acceptedBy,omitempty"`
RejectionReason string `json:"rejectionReason,omitempty"`
}
type HandoffService ¶
type HandoffService struct {
// contains filtered or unexported fields
}
func NewHandoffService ¶
func NewHandoffService(sharedStore *store) *HandoffService
func (*HandoffService) GetPendingForAgent ¶
type InboxMessage ¶
type InboxService ¶
type InboxService struct {
// contains filtered or unexported fields
}
func NewInboxService ¶
func NewInboxService(sharedStore *store) *InboxService
func (*InboxService) Broadcast ¶
func (s *InboxService) Broadcast(ctx context.Context, teamName, from, content, summary string) error
func (*InboxService) ReadInbox ¶
func (s *InboxService) ReadInbox(ctx context.Context, teamName, agentName string, unreadOnly bool) ([]InboxMessage, error)
func (*InboxService) SendMessage ¶
func (s *InboxService) SendMessage(ctx context.Context, teamName, from, to, content, summary string) error
type Member ¶
type Member struct {
AgentName string `json:"agentName"`
RoleName string `json:"roleName,omitempty"`
SessionID string `json:"sessionId,omitempty"`
WorkerID string `json:"workerId,omitempty"`
Kind string `json:"kind,omitempty"`
Profile string `json:"profile,omitempty"`
Status string `json:"status,omitempty"`
LastResult string `json:"lastResult,omitempty"`
ReportsTo string `json:"reportsTo,omitempty"`
ParentWorkerID string `json:"parentWorkerId,omitempty"`
RootWorkerID string `json:"rootWorkerId,omitempty"`
Lineage []string `json:"lineage,omitempty"`
LineageDepth int `json:"lineageDepth,omitempty"`
StateScope string `json:"stateScope,omitempty"`
CommitmentState string `json:"commitmentState,omitempty"`
WorkspaceMode string `json:"workspaceMode,omitempty"`
WakeState string `json:"wakeState,omitempty"`
LastSignalAt int64 `json:"lastSignalAt,omitempty"`
LastHeartbeatAt int64 `json:"lastHeartbeatAt,omitempty"`
Leader bool `json:"leader,omitempty"`
CanSpawnSubagents bool `json:"canSpawnSubagents,omitempty"`
UpdatedAt int64 `json:"updatedAt"`
CreatedAt int64 `json:"createdAt"`
}
type MemberService ¶
type MemberService struct {
// contains filtered or unexported fields
}
func NewMemberService ¶
func NewMemberService(sharedStore *store) *MemberService
func (*MemberService) FindBySessionID ¶
type OfficeRosterRow ¶
type OfficeRosterRow struct {
AgentName string `json:"agentName,omitempty"`
RoleName string `json:"roleName,omitempty"`
Responsible string `json:"responsible,omitempty"`
SessionID string `json:"sessionId,omitempty"`
WorkerID string `json:"workerId,omitempty"`
ReportsTo string `json:"reportsTo,omitempty"`
Leader bool `json:"leader,omitempty"`
Kind string `json:"kind,omitempty"`
Profile string `json:"profile,omitempty"`
Status string `json:"status,omitempty"`
WakeState string `json:"wakeState,omitempty"`
StateScope string `json:"stateScope,omitempty"`
CommitmentState string `json:"commitmentState,omitempty"`
WorkspaceMode string `json:"workspaceMode,omitempty"`
Present bool `json:"present,omitempty"`
LastActiveAt int64 `json:"lastActiveAt,omitempty"`
LastHeartbeatAt int64 `json:"lastHeartbeatAt,omitempty"`
LineageDepth int `json:"lineageDepth,omitempty"`
CanSpawnChildren bool `json:"canSpawnChildren,omitempty"`
}
type OfficeService ¶
type OfficeService struct {
// contains filtered or unexported fields
}
func NewOfficeService ¶
func NewOfficeService(sharedStore *store) *OfficeService
func (*OfficeService) Materialize ¶
func (s *OfficeService) Materialize(ctx context.Context, teamName string, tc *TeamContext, members []Member, runtimeRecords []RuntimeRecord, summary RuntimeSummary) (*OfficeState, error)
func (*OfficeService) Read ¶
func (s *OfficeService) Read(ctx context.Context, teamName string) (*OfficeState, error)
type OfficeState ¶
type OfficeState struct {
TeamName string `json:"teamName"`
Leader string `json:"leader,omitempty"`
Constitution string `json:"constitution,omitempty"`
RuntimeMode string `json:"runtimeMode,omitempty"`
WorkspaceMode string `json:"workspaceMode,omitempty"`
PublicationMode string `json:"publicationMode,omitempty"`
ConsensusMode string `json:"consensusMode,omitempty"`
WakePolicy string `json:"wakePolicy,omitempty"`
MaterializedAt int64 `json:"materializedAt"`
LastActiveAt int64 `json:"lastActiveAt,omitempty"`
LastWakeAt int64 `json:"lastWakeAt,omitempty"`
Roster []OfficeRosterRow `json:"roster,omitempty"`
RuntimeSummary RuntimeSummary `json:"runtimeSummary"`
ContinuityStatus string `json:"continuityStatus,omitempty"`
}
type Role ¶
type Role struct {
Name string `json:"name"`
Responsible string `json:"responsible"`
CurrentFocus string `json:"currentFocus,omitempty"`
Agent string `json:"agent,omitempty"`
Profile string `json:"profile,omitempty"`
Prompt string `json:"prompt,omitempty"`
ReportsTo string `json:"reportsTo,omitempty"`
CanSpawnSubagents bool `json:"canSpawnSubagents,omitempty"`
}
type RuntimeRecord ¶
type RuntimeRecord struct {
RecordID string `json:"recordId"`
TeamName string `json:"teamName,omitempty"`
AgentName string `json:"agentName,omitempty"`
RoleName string `json:"roleName,omitempty"`
SessionID string `json:"sessionId,omitempty"`
WorkerID string `json:"workerId,omitempty"`
ParentWorkerID string `json:"parentWorkerId,omitempty"`
RootWorkerID string `json:"rootWorkerId,omitempty"`
ParentAgentName string `json:"parentAgentName,omitempty"`
Lineage []string `json:"lineage,omitempty"`
LineageDepth int `json:"lineageDepth,omitempty"`
Kind string `json:"kind,omitempty"`
Profile string `json:"profile,omitempty"`
Status string `json:"status,omitempty"`
WakeState string `json:"wakeState,omitempty"`
StateScope string `json:"stateScope,omitempty"`
CommitmentState string `json:"commitmentState,omitempty"`
WorkspaceMode string `json:"workspaceMode,omitempty"`
Result string `json:"result,omitempty"`
Error string `json:"error,omitempty"`
Source string `json:"source,omitempty"`
LastSignalAt int64 `json:"lastSignalAt,omitempty"`
LastHeartbeatAt int64 `json:"lastHeartbeatAt,omitempty"`
StartedAt int64 `json:"startedAt,omitempty"`
CompletedAt int64 `json:"completedAt,omitempty"`
UpdatedAt int64 `json:"updatedAt"`
CreatedAt int64 `json:"createdAt"`
}
type RuntimeService ¶
type RuntimeService struct {
// contains filtered or unexported fields
}
func NewRuntimeService ¶
func NewRuntimeService(sharedStore *store) *RuntimeService
func (*RuntimeService) FindBySessionID ¶
func (s *RuntimeService) FindBySessionID(ctx context.Context, sessionID string) (string, *RuntimeRecord, error)
func (*RuntimeService) List ¶
func (s *RuntimeService) List(ctx context.Context, teamName string) ([]RuntimeRecord, error)
func (*RuntimeService) Materialize ¶
func (s *RuntimeService) Materialize(ctx context.Context, teamName string, members []Member, workers []orchestration.Worker) ([]RuntimeRecord, RuntimeSummary, error)
func (*RuntimeService) Project ¶
func (s *RuntimeService) Project(ctx context.Context, teamName string, members []Member, workers []orchestration.Worker) ([]RuntimeRecord, RuntimeSummary, error)
func (*RuntimeService) Upsert ¶
func (s *RuntimeService) Upsert(ctx context.Context, teamName string, record RuntimeRecord) (*RuntimeRecord, error)
type RuntimeSummary ¶
type RuntimeSummary struct {
Total int `json:"total"`
Active int `json:"active"`
Local int `json:"local"`
Committed int `json:"committed"`
Pending int `json:"pending"`
MaxLineageDepth int `json:"maxLineageDepth"`
ByStatus map[string]int `json:"byStatus,omitempty"`
ByWakeState map[string]int `json:"byWakeState,omitempty"`
ByCommitmentState map[string]int `json:"byCommitmentState,omitempty"`
ByWorkspaceMode map[string]int `json:"byWorkspaceMode,omitempty"`
}
type Service ¶
type Service struct {
Context *TeamContextService
Board *TaskBoardService
Handoff *HandoffService
Inbox *InboxService
Members *MemberService
Runtime *RuntimeService
Office *OfficeService
}
func NewService ¶
func NewService() *Service
func NewServiceWithBaseDir ¶
func NewServiceWithStore ¶
func NewServiceWithStore(sharedStore *store) *Service
func (*Service) ListTeamNames ¶
func (*Service) MostRecentTeamName ¶
type Snapshot ¶
type Snapshot struct {
TeamName string `json:"teamName"`
Context *TeamContext `json:"context,omitempty"`
Board *TaskBoard `json:"board,omitempty"`
BoardSummary map[string]int `json:"boardSummary,omitempty"`
Members []Member `json:"members,omitempty"`
Agency *AgencySnapshot `json:"agency,omitempty"`
Office *OfficeState `json:"office,omitempty"`
RuntimeRecords []RuntimeRecord `json:"runtimeRecords,omitempty"`
RuntimeSummary RuntimeSummary `json:"runtimeSummary,omitempty"`
PendingHandoffs int `json:"pendingHandoffs,omitempty"`
UnreadDirect int `json:"unreadDirect,omitempty"`
UnreadBroadcasts int `json:"unreadBroadcasts,omitempty"`
Workers []orchestration.Worker `json:"workers,omitempty"`
}
type TaskBoardService ¶
type TaskBoardService struct {
// contains filtered or unexported fields
}
func NewTaskBoardService ¶
func NewTaskBoardService(sharedStore *store) *TaskBoardService
func (*TaskBoardService) AddTaskToColumn ¶
func (*TaskBoardService) AssignTask ¶
func (*TaskBoardService) CreateBoard ¶
func (*TaskBoardService) GetBoardSummary ¶
func (*TaskBoardService) GetTaskLocation ¶
type TeamContext ¶
type TeamContext struct {
TeamName string `json:"teamName"`
Leader string `json:"leader,omitempty"`
Template string `json:"template,omitempty"`
Constitution string `json:"constitution,omitempty"`
RuntimeMode string `json:"runtimeMode,omitempty"`
Charter string `json:"charter"`
Goals []Goal `json:"goals"`
Roles map[string]Role `json:"roles"`
WorkingAgreement WorkingAgreement `json:"workingAgreement"`
CreatedAt int64 `json:"createdAt"`
UpdatedAt int64 `json:"updatedAt"`
}
type TeamContextService ¶
type TeamContextService struct {
// contains filtered or unexported fields
}
func NewTeamContextService ¶
func NewTeamContextService(sharedStore *store) *TeamContextService
func (*TeamContextService) AddGoal ¶
func (s *TeamContextService) AddGoal(ctx context.Context, teamName string, goal Goal) (*TeamContext, error)
func (*TeamContextService) AddRole ¶
func (s *TeamContextService) AddRole(ctx context.Context, teamName, roleName string, role Role) (*TeamContext, error)
func (*TeamContextService) AssignAgentToRole ¶
func (s *TeamContextService) AssignAgentToRole(ctx context.Context, teamName, roleName, agentName string) (*TeamContext, error)
func (*TeamContextService) CreateContext ¶
func (s *TeamContextService) CreateContext(ctx context.Context, teamName, charter string, roles map[string]Role) (*TeamContext, error)
func (*TeamContextService) ListTeamNames ¶
func (s *TeamContextService) ListTeamNames(ctx context.Context) ([]string, error)
func (*TeamContextService) ReadContext ¶
func (s *TeamContextService) ReadContext(ctx context.Context, teamName string) (*TeamContext, error)
func (*TeamContextService) UpdateContext ¶
func (s *TeamContextService) UpdateContext(ctx context.Context, teamName string, updates map[string]any) (*TeamContext, error)
func (*TeamContextService) UpdateGoalStatus ¶
func (s *TeamContextService) UpdateGoalStatus(ctx context.Context, teamName, goalID, status string) (*TeamContext, error)
func (*TeamContextService) UpdateWorkingAgreement ¶
func (s *TeamContextService) UpdateWorkingAgreement(ctx context.Context, teamName string, agreement WorkingAgreement) (*TeamContext, error)
type WorkingAgreement ¶
type WorkingAgreement struct {
CommitMessageFormat string `json:"commitMessageFormat"`
MaxWIP int `json:"maxWip"`
HandoffRequires []string `json:"handoffRequires"`
ReviewRequired bool `json:"reviewRequired"`
AllowsSubagents bool `json:"allowsSubagents"`
LeadershipMode string `json:"leadershipMode,omitempty"`
DelegationMode string `json:"delegationMode,omitempty"`
LocalChatDefault string `json:"localChatDefault,omitempty"`
ReviewRouting string `json:"reviewRouting,omitempty"`
SynthesisRouting string `json:"synthesisRouting,omitempty"`
AllowsPeerMessaging bool `json:"allowsPeerMessaging,omitempty"`
AllowsBroadcasts bool `json:"allowsBroadcasts,omitempty"`
ApprovalRequiredFor []string `json:"approvalRequiredFor,omitempty"`
WorkspaceMode string `json:"workspaceMode,omitempty"`
PublicationMode string `json:"publicationMode,omitempty"`
ConsensusMode string `json:"consensusMode,omitempty"`
WakePolicy string `json:"wakePolicy,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.