Documentation
¶
Index ¶
- Variables
- func ComputeScheduleNextRun(cronExpr string, from time.Time) (time.Time, error)
- func ComputeScheduleNextRunForTimezone(cronExpr, timezone string, from time.Time) (time.Time, error)
- type ActionApproval
- type AgentAuditEvent
- type ApproveActionApprovalInput
- type ApprovePairingInput
- type ApprovePairingResult
- type ContextDelivery
- type ContextPolicy
- type ContextRecord
- type CreateActionApprovalInput
- type CreateAgentAuditEventInput
- type CreateObjectiveInput
- type CreatePairingRequestInput
- type CreateTaskInput
- type DenyActionApprovalInput
- type DenyPairingInput
- type ListAgentAuditEventsInput
- type ListObjectivesInput
- type ListTasksInput
- type MarkIMAPIngestionInput
- type Objective
- type ObjectiveRunError
- type ObjectiveTriggerType
- type PairingRequest
- type PairingRequestWithToken
- type Store
- func (s *Store) ApproveActionApproval(ctx context.Context, input ApproveActionApprovalInput) (ActionApproval, error)
- func (s *Store) ApprovePairing(ctx context.Context, input ApprovePairingInput) (ApprovePairingResult, error)
- func (s *Store) AutoMigrate(ctx context.Context) error
- func (s *Store) Close() error
- func (s *Store) CreateActionApproval(ctx context.Context, input CreateActionApprovalInput) (ActionApproval, error)
- func (s *Store) CreateAgentAuditEvent(ctx context.Context, input CreateAgentAuditEventInput) (AgentAuditEvent, error)
- func (s *Store) CreateObjective(ctx context.Context, input CreateObjectiveInput) (Objective, error)
- func (s *Store) CreatePairingRequest(ctx context.Context, input CreatePairingRequestInput) (PairingRequestWithToken, error)
- func (s *Store) CreateTask(ctx context.Context, input CreateTaskInput) error
- func (s *Store) DeleteObjective(ctx context.Context, id string) error
- func (s *Store) DenyActionApproval(ctx context.Context, input DenyActionApprovalInput) (ActionApproval, error)
- func (s *Store) DenyPairing(ctx context.Context, input DenyPairingInput) (PairingRequest, error)
- func (s *Store) EnsureContextForExternalChannel(ctx context.Context, connector, externalID, displayName string) (ContextRecord, error)
- func (s *Store) IsIMAPMessageIngested(ctx context.Context, accountKey string, uid uint32, messageID string) (bool, error)
- func (s *Store) ListAdminDeliveries(ctx context.Context, limit int) ([]ContextDelivery, error)
- func (s *Store) ListAgentAuditEvents(ctx context.Context, input ListAgentAuditEventsInput) ([]AgentAuditEvent, error)
- func (s *Store) ListDueObjectives(ctx context.Context, now time.Time, limit int) ([]Objective, error)
- func (s *Store) ListEventObjectives(ctx context.Context, workspaceID, eventKey string, limit int) ([]Objective, error)
- func (s *Store) ListObjectives(ctx context.Context, input ListObjectivesInput) ([]Objective, error)
- func (s *Store) ListPendingActionApprovals(ctx context.Context, connector, externalID string, limit int) ([]ActionApproval, error)
- func (s *Store) ListPendingActionApprovalsGlobal(ctx context.Context, limit int) ([]ActionApproval, error)
- func (s *Store) ListTasks(ctx context.Context, input ListTasksInput) ([]TaskRecord, error)
- func (s *Store) ListWorkspaceAdminDeliveries(ctx context.Context, workspaceID string, limit int) ([]ContextDelivery, error)
- func (s *Store) LookupActionApproval(ctx context.Context, id string) (ActionApproval, error)
- func (s *Store) LookupContextDelivery(ctx context.Context, contextID string) (ContextDelivery, error)
- func (s *Store) LookupContextPolicy(ctx context.Context, contextID string) (ContextPolicy, error)
- func (s *Store) LookupContextPolicyByExternal(ctx context.Context, connector, externalID string) (ContextPolicy, error)
- func (s *Store) LookupObjective(ctx context.Context, id string) (Objective, error)
- func (s *Store) LookupPairingByToken(ctx context.Context, token string) (PairingRequest, error)
- func (s *Store) LookupTask(ctx context.Context, id string) (TaskRecord, error)
- func (s *Store) LookupUserIdentity(ctx context.Context, connector, connectorUserID string) (UserIdentity, error)
- func (s *Store) MarkIMAPMessageIngested(ctx context.Context, input MarkIMAPIngestionInput) error
- func (s *Store) MarkTaskCompleted(ctx context.Context, id string, finishedAt time.Time, ...) error
- func (s *Store) MarkTaskCompletedByWorker(ctx context.Context, id string, workerID int, finishedAt time.Time, ...) error
- func (s *Store) MarkTaskFailed(ctx context.Context, id string, finishedAt time.Time, message string) error
- func (s *Store) MarkTaskFailedByWorker(ctx context.Context, id string, workerID int, finishedAt time.Time, ...) error
- func (s *Store) MarkTaskRunning(ctx context.Context, id string, workerID int, startedAt time.Time) error
- func (s *Store) Ping(ctx context.Context) error
- func (s *Store) RequeueTask(ctx context.Context, id string) error
- func (s *Store) SetContextAdminByExternal(ctx context.Context, connector, externalID string, enabled bool) (ContextRecord, error)
- func (s *Store) SetContextSystemPromptByExternal(ctx context.Context, connector, externalID, prompt string) (ContextPolicy, error)
- func (s *Store) SetObjectiveActive(ctx context.Context, id string, active bool) (Objective, error)
- func (s *Store) UpdateActionExecution(ctx context.Context, input UpdateActionExecutionInput) (ActionApproval, error)
- func (s *Store) UpdateObjective(ctx context.Context, input UpdateObjectiveInput) (Objective, error)
- func (s *Store) UpdateObjectiveRun(ctx context.Context, input UpdateObjectiveRunInput) (Objective, error)
- func (s *Store) UpdateTaskRouting(ctx context.Context, input UpdateTaskRoutingInput) (TaskRecord, error)
- type TaskRecord
- type UpdateActionExecutionInput
- type UpdateObjectiveInput
- type UpdateObjectiveRunInput
- type UpdateTaskRoutingInput
- type UserIdentity
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrActionApprovalNotFound = errors.New("action approval not found") ErrActionApprovalNotReady = errors.New("action approval is not pending") )
View Source
var ( ErrIdentityNotFound = errors.New("identity not found") ErrContextNotFound = errors.New("context not found") )
View Source
var ( ErrObjectiveNotFound = errors.New("objective not found") ErrObjectiveInvalid = errors.New("objective input is invalid") )
View Source
var ( ErrPairingNotFound = errors.New("pairing request not found") ErrPairingNotPending = errors.New("pairing request is not pending") ErrPairingExpired = errors.New("pairing request expired") ErrIdentityAlreadyLinked = errors.New("identity is already linked") ErrPairingInvalidRole = errors.New("invalid role") ErrPairingUserNotFound = errors.New("target user not found") ErrPairingInvalidToken = errors.New("invalid token") ErrPairingInvalidInput = errors.New("invalid pairing input") ErrPairingInvalidReason = errors.New("denial reason required") ErrPairingInvalidApprover = errors.New("approver user id required") )
View Source
var ErrTaskNotFound = errors.New("task not found")
View Source
var ErrTaskNotRunningForWorker = errors.New("task not running for worker")
View Source
var ErrTaskRunAlreadyExists = errors.New("task run already exists")
Functions ¶
func ComputeScheduleNextRun ¶
ComputeScheduleNextRun resolves the next run timestamp for schedule objectives.
Types ¶
type ActionApproval ¶
type ActionApproval struct {
ID string
WorkspaceID string
ContextID string
Connector string
ExternalID string
RequesterUserID string
ActionType string
ActionTarget string
ActionSummary string
Payload map[string]any
Status string
ApproverUserID string
DeniedReason string
ExecutionStatus string
ExecutionMessage string
ExecutorPlugin string
ExecutedAt time.Time
CreatedAt time.Time
UpdatedAt time.Time
}
type AgentAuditEvent ¶
type ApprovePairingInput ¶
type ApprovePairingResult ¶
type ApprovePairingResult struct {
PairingRequest PairingRequest
UserID string
IdentityID string
}
type ContextDelivery ¶
type ContextPolicy ¶
type ContextRecord ¶
type CreateObjectiveInput ¶
type CreateTaskInput ¶
type DenyActionApprovalInput ¶
type DenyPairingInput ¶
type ListObjectivesInput ¶
type ListTasksInput ¶
type MarkIMAPIngestionInput ¶
type Objective ¶
type Objective struct {
ID string
WorkspaceID string
ContextID string
Title string
Prompt string
TriggerType ObjectiveTriggerType
EventKey string
CronExpr string
Timezone string
Active bool
NextRunAt time.Time
LastRunAt time.Time
LastError string
RunCount int
SuccessCount int
FailureCount int
ConsecutiveFailures int
ConsecutiveSuccesses int
TotalRunDurationMs int64
LastSuccessAt time.Time
LastFailureAt time.Time
AutoPausedReason string
RecentErrors []ObjectiveRunError
CreatedAt time.Time
UpdatedAt time.Time
}
type ObjectiveRunError ¶
type ObjectiveTriggerType ¶
type ObjectiveTriggerType string
const ( ObjectiveTriggerSchedule ObjectiveTriggerType = "schedule" ObjectiveTriggerEvent ObjectiveTriggerType = "event" )
type PairingRequest ¶
type PairingRequestWithToken ¶
type PairingRequestWithToken struct {
PairingRequest
Token string
}
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) ApproveActionApproval ¶
func (s *Store) ApproveActionApproval(ctx context.Context, input ApproveActionApprovalInput) (ActionApproval, error)
func (*Store) ApprovePairing ¶
func (s *Store) ApprovePairing(ctx context.Context, input ApprovePairingInput) (ApprovePairingResult, error)
func (*Store) CreateActionApproval ¶
func (s *Store) CreateActionApproval(ctx context.Context, input CreateActionApprovalInput) (ActionApproval, error)
func (*Store) CreateAgentAuditEvent ¶
func (s *Store) CreateAgentAuditEvent(ctx context.Context, input CreateAgentAuditEventInput) (AgentAuditEvent, error)
func (*Store) CreateObjective ¶
func (*Store) CreatePairingRequest ¶
func (s *Store) CreatePairingRequest(ctx context.Context, input CreatePairingRequestInput) (PairingRequestWithToken, error)
func (*Store) CreateTask ¶
func (s *Store) CreateTask(ctx context.Context, input CreateTaskInput) error
func (*Store) DeleteObjective ¶
func (*Store) DenyActionApproval ¶
func (s *Store) DenyActionApproval(ctx context.Context, input DenyActionApprovalInput) (ActionApproval, error)
func (*Store) DenyPairing ¶
func (s *Store) DenyPairing(ctx context.Context, input DenyPairingInput) (PairingRequest, error)
func (*Store) EnsureContextForExternalChannel ¶
func (*Store) IsIMAPMessageIngested ¶
func (*Store) ListAdminDeliveries ¶
func (*Store) ListAgentAuditEvents ¶
func (s *Store) ListAgentAuditEvents(ctx context.Context, input ListAgentAuditEventsInput) ([]AgentAuditEvent, error)
func (*Store) ListDueObjectives ¶
func (*Store) ListEventObjectives ¶
func (*Store) ListObjectives ¶
func (*Store) ListPendingActionApprovals ¶
func (*Store) ListPendingActionApprovalsGlobal ¶
func (*Store) ListTasks ¶
func (s *Store) ListTasks(ctx context.Context, input ListTasksInput) ([]TaskRecord, error)
func (*Store) ListWorkspaceAdminDeliveries ¶
func (*Store) LookupActionApproval ¶
func (*Store) LookupContextDelivery ¶
func (*Store) LookupContextPolicy ¶
func (*Store) LookupContextPolicyByExternal ¶
func (*Store) LookupObjective ¶
func (*Store) LookupPairingByToken ¶
func (*Store) LookupTask ¶
func (*Store) LookupUserIdentity ¶
func (*Store) MarkIMAPMessageIngested ¶
func (s *Store) MarkIMAPMessageIngested(ctx context.Context, input MarkIMAPIngestionInput) error
func (*Store) MarkTaskCompleted ¶
func (*Store) MarkTaskCompletedByWorker ¶
func (*Store) MarkTaskFailed ¶
func (*Store) MarkTaskFailedByWorker ¶
func (*Store) MarkTaskRunning ¶
func (*Store) SetContextAdminByExternal ¶
func (*Store) SetContextSystemPromptByExternal ¶
func (*Store) SetObjectiveActive ¶
func (*Store) UpdateActionExecution ¶
func (s *Store) UpdateActionExecution(ctx context.Context, input UpdateActionExecutionInput) (ActionApproval, error)
func (*Store) UpdateObjective ¶
func (*Store) UpdateObjectiveRun ¶
func (*Store) UpdateTaskRouting ¶
func (s *Store) UpdateTaskRouting(ctx context.Context, input UpdateTaskRoutingInput) (TaskRecord, error)
type TaskRecord ¶
type TaskRecord struct {
ID string
WorkspaceID string
ContextID string
Kind string
Title string
Prompt string
Status string
RouteClass string
Priority string
DueAt time.Time
AssignedLane string
SourceConnector string
SourceExternalID string
SourceUserID string
SourceText string
Attempts int
WorkerID int
StartedAt time.Time
FinishedAt time.Time
ResultSummary string
ResultPath string
ErrorMessage string
CreatedAt time.Time
UpdatedAt time.Time
}
type UpdateObjectiveInput ¶
type UpdateObjectiveRunInput ¶
type UpdateTaskRoutingInput ¶
type UserIdentity ¶
Click to show internal directories.
Click to hide internal directories.