Documentation
¶
Overview ¶
Package testutil provides shared helpers for API-layer tests.
Index ¶
- Constants
- Variables
- func AssertLoopRunTaskCatalog(t testing.TB, response contract.TasksResponse)
- func AssertLoopTaskProvenance(t testing.TB, item contract.TaskCatalogItemPayload, ...)
- func AssertWorktreeRouteParity(t testing.TB, got []string)
- func ConfigForTest(homePaths compozyconfig.HomePaths) compozyconfig.Config
- func DecodeJSONResponse(t *testing.T, recorder *httptest.ResponseRecorder, dest any)
- func DecodeSSEData(t *testing.T, record SSERecord, dest any)
- func DiscardLogger() *slog.Logger
- func DocumentedProfileRoutesForTransport(transport apispec.Transport) []string
- func DocumentedRoutesForTransport(transport apispec.Transport, matches func(string) bool) []string
- func ExpectedWorktreeRouteKeys() []string
- func IsProfileRoute(path string) bool
- func MustJSONBody(t *testing.T, value any) []byte
- func NewHomeConfig(t *testing.T) (compozyconfig.HomePaths, compozyconfig.Config)
- func NewSession(id string) *session.Session
- func NewSessionInfo(id string) *session.Info
- func NewTestHomePaths(t *testing.T) compozyconfig.HomePaths
- func PerformRequest(t *testing.T, engine http.Handler, method, path string, body []byte) *httptest.ResponseRecorder
- func PerformRequestWithHeaders(t *testing.T, engine http.Handler, method, path string, body []byte, ...) *httptest.ResponseRecorder
- func ProfileRoutesFromEngine(routes gin.RoutesInfo) []string
- func RoutesFromEngine(routes gin.RoutesInfo, matches func(string) bool) []string
- func WorktreeRouteKeysFromGin(routes gin.RoutesInfo) []string
- func WriteAgentDef(t *testing.T, homePaths compozyconfig.HomePaths, name string)
- type SSERecord
- type SingleProfileWindowManagers
- type StubAutomationManager
- func (s StubAutomationManager) AcceptSuggestion(ctx context.Context, profileID string, workspaceRef string, ...) (automationpkg.SuggestionAcceptance, error)
- func (s StubAutomationManager) CreateJob(ctx context.Context, job automationpkg.Job) (automationpkg.Job, error)
- func (s StubAutomationManager) CreateTrigger(ctx context.Context, trigger automationpkg.Trigger, ...) (automationpkg.Trigger, error)
- func (s StubAutomationManager) DeleteJob(ctx context.Context, id string) error
- func (s StubAutomationManager) DeleteTrigger(ctx context.Context, id string) error
- func (s StubAutomationManager) DismissSuggestion(ctx context.Context, profileID string, workspaceRef string, ...) (automationpkg.Suggestion, error)
- func (s StubAutomationManager) GetJob(ctx context.Context, id string) (automationpkg.Job, error)
- func (s StubAutomationManager) GetRun(ctx context.Context, id string) (automationpkg.Run, error)
- func (s StubAutomationManager) GetTrigger(ctx context.Context, id string) (automationpkg.Trigger, error)
- func (s StubAutomationManager) HandleWebhook(ctx context.Context, request automationpkg.WebhookRequest) (automationpkg.TriggerResult, error)
- func (s StubAutomationManager) Jobs(ctx context.Context) ([]automationpkg.Job, error)
- func (s StubAutomationManager) LatestRunsByOwner(ctx context.Context, owner automationpkg.RunOwnerKind, ids []string) (map[string]automationpkg.Run, error)
- func (s StubAutomationManager) ListJobs(ctx context.Context, query automationpkg.JobListQuery) (automationpkg.JobListPage, error)
- func (s StubAutomationManager) ListRuns(ctx context.Context, query automationpkg.RunQuery) ([]automationpkg.Run, error)
- func (s StubAutomationManager) ListSuggestions(ctx context.Context, readScope store.ReadScope, workspaceRef string, ...) ([]automationpkg.Suggestion, error)
- func (s StubAutomationManager) ListTriggers(ctx context.Context, query automationpkg.TriggerListQuery) (automationpkg.TriggerListPage, error)
- func (s StubAutomationManager) Runs(ctx context.Context, query automationpkg.RunQuery) ([]automationpkg.Run, error)
- func (s StubAutomationManager) SetJobEnabled(ctx context.Context, id string, enabled bool) (automationpkg.Job, error)
- func (s StubAutomationManager) SetTriggerEnabled(ctx context.Context, id string, enabled bool) (automationpkg.Trigger, error)
- func (s StubAutomationManager) Status(ctx context.Context) (automationpkg.ManagerStatus, error)
- func (s StubAutomationManager) TriggerJob(ctx context.Context, id string) (automationpkg.Run, error)
- func (s StubAutomationManager) Triggers(ctx context.Context) ([]automationpkg.Trigger, error)
- func (s StubAutomationManager) UpdateJob(ctx context.Context, job automationpkg.Job) (automationpkg.Job, error)
- func (s StubAutomationManager) UpdateTrigger(ctx context.Context, trigger automationpkg.Trigger, ...) (automationpkg.Trigger, error)
- type StubExtensionService
- func (s StubExtensionService) DeleteExtensionSecret(ctx context.Context, name string, envName string, actor taskpkg.ActorContext) error
- func (s StubExtensionService) Dev(ctx context.Context, req contract.DevLinkExtensionRequest, ...) (contract.ExtensionPayload, error)
- func (s StubExtensionService) Disable(ctx context.Context, name string, actor taskpkg.ActorContext) (contract.ExtensionPayload, error)
- func (s StubExtensionService) Enable(ctx context.Context, name string, req contract.EnableExtensionRequest, ...) (contract.ExtensionEnableResult, error)
- func (s StubExtensionService) ExtensionLogs(ctx context.Context, name string, after int64, streamEpoch string, ...) (contract.ExtensionLogsResponse, error)
- func (s StubExtensionService) Install(ctx context.Context, req contract.InstallExtensionRequest, ...) (contract.ExtensionPayload, error)
- func (s StubExtensionService) InventoryScoped(ctx context.Context, name string, _ taskpkg.ActorContext) (contract.ExtensionInventoryPayload, error)
- func (s StubExtensionService) List(ctx context.Context) ([]contract.ExtensionPayload, error)
- func (s StubExtensionService) ListEnablement(ctx context.Context, name string) ([]contract.ExtensionEnablementPayload, error)
- func (s StubExtensionService) ListExtensionSecrets(ctx context.Context, name string, actor taskpkg.ActorContext) (contract.ExtensionSecretsPayload, error)
- func (s StubExtensionService) MarketplaceTrust(ctx context.Context, evidence extensionpkg.MarketplaceTrustEvidence) (contract.ExtensionTrustReportPayload, error)
- func (s StubExtensionService) Preview(ctx context.Context, name string) (contract.ExtensionEnablePreviewPayload, error)
- func (s StubExtensionService) PreviewInstall(ctx context.Context, req contract.InstallExtensionRequest, ...) (contract.ExtensionInstallPreviewPayload, error)
- func (s StubExtensionService) Provenance(ctx context.Context, name string) (contract.ExtensionProvenancePayload, error)
- func (s StubExtensionService) ReloadDev(ctx context.Context, name string, req contract.ReloadExtensionRequest, ...) (contract.ExtensionPayload, error)
- func (s StubExtensionService) Remove(ctx context.Context, name string, actor taskpkg.ActorContext) (contract.ManagedExtensionRemovePayload, error)
- func (s StubExtensionService) Search(ctx context.Context, req contract.ExtensionSearchRequest) (contract.ExtensionSearchResponse, error)
- func (s StubExtensionService) SetEnablement(ctx context.Context, name string, req contract.SetExtensionEnablementRequest, ...) (contract.ExtensionEnablementPayload, error)
- func (s StubExtensionService) SetExtensionSecrets(ctx context.Context, name string, req contract.SetExtensionSecretsRequest, ...) (contract.ExtensionSecretsPayload, error)
- func (s StubExtensionService) Status(ctx context.Context, name string) (contract.ExtensionPayload, error)
- func (s StubExtensionService) Update(ctx context.Context, name string, req contract.UpdateExtensionRequest, ...) (contract.ManagedExtensionUpdatePayload, error)
- func (s StubExtensionService) UpdateBatch(ctx context.Context, req contract.UpdateExtensionsRequest, ...) ([]contract.ManagedExtensionUpdatePayload, error)
- type StubObserver
- func (s StubObserver) Health(ctx context.Context) (observe.Health, error)
- func (s StubObserver) OnAgentEvent(ctx context.Context, sessionID string, event any)
- func (s StubObserver) QueryEvents(ctx context.Context, query store.EventSummaryQuery) ([]store.EventSummary, error)
- func (s StubObserver) QueryHookCatalog(ctx context.Context, filter hookspkg.CatalogFilter) ([]hookspkg.CatalogEntry, error)
- func (s StubObserver) QueryHookEvents(ctx context.Context, filter hookspkg.EventFilter) ([]hookspkg.EventDescriptor, error)
- func (s StubObserver) QueryHookRuns(ctx context.Context, query store.HookRunQuery) ([]hookspkg.HookRunRecord, error)
- func (s StubObserver) QueryObserveOverview(ctx context.Context, query observe.OverviewQuery) (observe.OverviewView, error)
- func (s StubObserver) QueryTaskDashboard(ctx context.Context, query observe.TaskDashboardQuery) (observe.TaskDashboardView, error)
- func (s StubObserver) QueryTaskInbox(ctx context.Context, query observe.TaskInboxQuery, actor taskpkg.ActorIdentity) (observe.TaskInboxView, error)
- func (s StubObserver) QueryTokenStats(ctx context.Context, query store.TokenStatsQuery) ([]store.TokenStats, error)
- type StubResourceService
- func (s StubResourceService) Delete(ctx context.Context, kind resources.ResourceKind, id string, ...) error
- func (s StubResourceService) Get(ctx context.Context, kind resources.ResourceKind, id string) (resources.RawRecord, error)
- func (s StubResourceService) List(ctx context.Context, filter resources.ResourceFilter) ([]resources.RawRecord, error)
- func (s StubResourceService) Put(ctx context.Context, draft resources.RawDraft) (resources.RawRecord, error)
- type StubSessionAttention
- type StubSessionManager
- func (s StubSessionManager) ActivePromptRun(ctx context.Context, id string) (session.PromptRunIdentity, error)
- func (s StubSessionManager) AdoptSession(ctx context.Context, workspaceID string, sessionID string, ...) (*session.Info, error)
- func (s StubSessionManager) AggregateSessionsByAgent(ctx context.Context, readScope store.ReadScope, workspaceID string) (map[string]session.AgentSessionMetrics, error)
- func (s StubSessionManager) ApprovePermission(ctx context.Context, id string, req acp.ApproveRequest) (session.ApprovalResult, error)
- func (s StubSessionManager) Archive(ctx context.Context, workspaceID string, sessionID string) (*session.Info, error)
- func (s StubSessionManager) ArchiveWithStop(ctx context.Context, workspaceID string, sessionID string) (*session.Info, error)
- func (s StubSessionManager) AttachSession(ctx context.Context, req store.SessionAttachRequest) (store.SessionAttach, error)
- func (s StubSessionManager) AttentionSummary(ctx context.Context, readScope store.ReadScope) (store.SessionAttentionSummary, error)
- func (s StubSessionManager) CancelPrompt(ctx context.Context, id string) (session.PromptCancelResult, error)
- func (s StubSessionManager) CancelQueuedPrompt(ctx context.Context, id string, queueEntryID string) (session.SendPromptResult, error)
- func (s StubSessionManager) CatalogFacets(ctx context.Context, query session.ListQuery) (store.SessionCatalogFacetResult, error)
- func (s StubSessionManager) ClearConversation(ctx context.Context, id string) (*session.Session, error)
- func (s StubSessionManager) ClearPendingInputs(ctx context.Context, id string, caller session.PromptCaller) (session.ClearPendingInputsResult, error)
- func (s StubSessionManager) ClearRuntimeSelection(ctx context.Context, id string, expectedRevision int64) (*session.Info, error)
- func (s StubSessionManager) Compactions(ctx context.Context, id string) ([]session.CompactionEnvelope, error)
- func (s StubSessionManager) ContextEvents(ctx context.Context, id string) (session.ContextEvents, error)
- func (s StubSessionManager) ContinueSession(ctx context.Context, opts session.ContinueSessionOpts) (session.DeriveResult, error)
- func (s StubSessionManager) Create(ctx context.Context, opts session.CreateOpts) (*session.Session, error)
- func (s StubSessionManager) CreateAccepted(ctx context.Context, opts session.CreateAcceptedOpts) (*session.Info, error)
- func (s StubSessionManager) CreateWorktreeForkAccepted(ctx context.Context, originSessionID string, opts session.CreateAcceptedOpts) (*session.Info, error)
- func (s StubSessionManager) Delete(ctx context.Context, id string) error
- func (s StubSessionManager) Deliveries(ctx context.Context, id string) ([]session.DeliveryEventEnvelope, error)
- func (s StubSessionManager) DerivePreview(ctx context.Context, workspaceID string, sourceSessionID string, ...) (session.DerivePreview, error)
- func (s StubSessionManager) DetachSession(ctx context.Context, workspaceID string, sessionID string) (*session.Info, error)
- func (s StubSessionManager) EventMetadata(ctx context.Context, id string, query store.EventQuery) ([]store.EventMetadata, error)
- func (s StubSessionManager) Events(ctx context.Context, id string, query store.EventQuery) ([]store.SessionEvent, error)
- func (s StubSessionManager) ForkSession(ctx context.Context, opts session.ForkSessionOpts) (session.DeriveResult, error)
- func (s StubSessionManager) History(ctx context.Context, id string, query store.EventQuery) ([]store.TurnHistory, error)
- func (s StubSessionManager) InputQueueSummary(ctx context.Context, id string) (session.InputQueueSummary, error)
- func (s StubSessionManager) LatestSessionEventByType(ctx context.Context, id string, eventType string) (*store.SessionEvent, error)
- func (s StubSessionManager) LatestSettledTurn(ctx context.Context, id string) (session.SettledTurn, error)
- func (s StubSessionManager) List() []*session.Info
- func (s StubSessionManager) ListAll(ctx context.Context) ([]*session.Info, error)
- func (s StubSessionManager) ListForWorkspace(ctx context.Context, workspaceID string) ([]*session.Info, error)
- func (s StubSessionManager) ListPage(ctx context.Context, query session.ListQuery) (session.ListPage, error)
- func (s StubSessionManager) ListPendingInputs(ctx context.Context, id string) ([]session.PendingInput, error)
- func (s StubSessionManager) ListSessions(ctx context.Context, query store.SessionListQuery) ([]store.SessionInfo, error)
- func (s StubSessionManager) PendingInteractions(ctx context.Context, sessionID string, statuses []string) ([]store.PendingInteraction, error)
- func (s StubSessionManager) PromotePendingInputToSteer(ctx context.Context, id string, entryID string, ...) (session.SendPromptResult, error)
- func (s StubSessionManager) Prompt(ctx context.Context, id string, msg string) (<-chan acp.AgentEvent, error)
- func (s StubSessionManager) PromptSynthetic(ctx context.Context, id string, opts session.SyntheticPromptOpts) (<-chan acp.AgentEvent, error)
- func (s StubSessionManager) PromptWithOpts(ctx context.Context, id string, opts session.PromptOpts) (<-chan acp.AgentEvent, error)
- func (s StubSessionManager) Rename(ctx context.Context, workspaceID string, sessionID string, name string) (*session.Info, error)
- func (s StubSessionManager) RepairSession(ctx context.Context, opts session.RepairOpts) (*session.RepairResult, error)
- func (s StubSessionManager) ReplacePendingInput(ctx context.Context, id string, entryID string, ...) (session.PendingInput, error)
- func (s StubSessionManager) RequestCompaction(ctx context.Context, id string) (session.CompactionRequestResult, <-chan acp.AgentEvent, error)
- func (s StubSessionManager) Resume(ctx context.Context, id string) (*session.Session, error)
- func (s StubSessionManager) RewindConversation(ctx context.Context, id string, opts session.ConversationRewindOptions) (session.ConversationRewindResult, error)
- func (s StubSessionManager) SendPrompt(ctx context.Context, id string, opts session.SendPromptOpts) (session.SendPromptResult, error)
- func (s StubSessionManager) SessionOwner(ctx context.Context, id string) (store.SessionOwner, error)
- func (s StubSessionManager) SessionPresence(ctx context.Context, sessionID string, leaseID string, visible bool) (string, error)
- func (s StubSessionManager) SetRuntimeSelection(ctx context.Context, id string, selection session.RuntimeSelection, ...) (*session.Info, error)
- func (s StubSessionManager) Status(ctx context.Context, id string) (*session.Info, error)
- func (s StubSessionManager) SteerPrompt(ctx context.Context, id string, opts session.SteerPromptOpts) (session.SendPromptResult, error)
- func (s StubSessionManager) Stop(ctx context.Context, id string) error
- func (s StubSessionManager) StopWithCause(ctx context.Context, id string, cause session.StopCause, detail string) error
- func (s StubSessionManager) SubscribeSessionCatalogEvents(ctx context.Context, scope session.CatalogScope) (<-chan session.CatalogEvent, func(), error)
- func (s StubSessionManager) TranscriptChanges(ctx context.Context, id string, query transcript.ChangeQuery) (transcript.ChangePage, error)
- func (s StubSessionManager) TranscriptPage(ctx context.Context, id string, query transcript.PageQuery) (transcript.Page, error)
- func (s StubSessionManager) Unarchive(ctx context.Context, workspaceID string, sessionID string) (*session.Info, error)
- func (s StubSessionManager) UsageEvents(ctx context.Context, id string) ([]session.UsageEventEnvelope, error)
- func (s StubSessionManager) WaitForBadge(ctx context.Context, request session.WaitRequest) (session.WaitOutcome, error)
- func (s StubSessionManager) WorkingDir(ctx context.Context, id string) (string, error)
- type StubSkillsRegistry
- func (s StubSkillsRegistry) ForAgent(ctx context.Context, resolved *workspacepkg.ResolvedWorkspace, ...) ([]*skills.Skill, error)
- func (s StubSkillsRegistry) ForAgentDef(ctx context.Context, resolved *workspacepkg.ResolvedWorkspace, ...) ([]*skills.Skill, error)
- func (s StubSkillsRegistry) ForWorkspace(ctx context.Context, resolved *workspacepkg.ResolvedWorkspace) ([]*skills.Skill, error)
- func (s StubSkillsRegistry) Get(name string) (*skills.Skill, bool)
- func (s StubSkillsRegistry) List() []*skills.Skill
- func (s StubSkillsRegistry) LoadContent(ctx context.Context, skill *skills.Skill) (string, error)
- func (s StubSkillsRegistry) LoadResource(ctx context.Context, skill *skills.Skill, relativePath string) (string, error)
- func (s StubSkillsRegistry) RefreshGlobal(ctx context.Context) error
- func (s StubSkillsRegistry) SetEnabled(name string, resolved *workspacepkg.ResolvedWorkspace, enabled bool) error
- func (s StubSkillsRegistry) SetEnabledForAgent(name string, resolved *workspacepkg.ResolvedWorkspace, agentName string, ...) error
- type StubTaskDesignationStore
- type StubTaskManager
- func (s *StubTaskManager) AddDependency(ctx context.Context, spec taskpkg.AddDependency, actor taskpkg.ActorContext) error
- func (s *StubTaskManager) ApproveTask(ctx context.Context, id string, req taskpkg.ExecutionRequest, ...) (*taskpkg.Execution, error)
- func (s *StubTaskManager) ArchiveTask(ctx context.Context, id string, actor taskpkg.ActorContext) (taskpkg.TriageState, error)
- func (s *StubTaskManager) AttachRunSession(ctx context.Context, runID string, sessionID string, ...) (*taskpkg.Run, error)
- func (s *StubTaskManager) BindRunReviewSession(ctx context.Context, req taskpkg.BindRunReviewSessionRequest, ...) (taskpkg.RunReviewBinding, error)
- func (s *StubTaskManager) BlockTask(ctx context.Context, req taskpkg.BlockRequest, actor taskpkg.ActorContext) (taskpkg.TaskBlock, error)
- func (s *StubTaskManager) BulkForceFailRuns(ctx context.Context, req taskpkg.BulkForceRunRequest, ...) (taskpkg.BulkForceRunResult, error)
- func (s *StubTaskManager) BulkForceReleaseRuns(ctx context.Context, req taskpkg.BulkForceRunRequest, ...) (taskpkg.BulkForceRunResult, error)
- func (s *StubTaskManager) CancelRun(ctx context.Context, runID string, req taskpkg.CancelRun, ...) (*taskpkg.Run, error)
- func (s *StubTaskManager) CancelTask(ctx context.Context, id string, req taskpkg.CancelTask, ...) (*taskpkg.Task, error)
- func (s *StubTaskManager) ClaimNextRun(ctx context.Context, criteria taskpkg.ClaimCriteria, ...) (*taskpkg.ClaimResult, error)
- func (s *StubTaskManager) ClearTaskBlock(ctx context.Context, taskID string, blockID string, note string, ...) (taskpkg.TaskBlock, error)
- func (s *StubTaskManager) CompleteRun(ctx context.Context, runID string, result taskpkg.RunResult, ...) (*taskpkg.Run, error)
- func (s *StubTaskManager) CompleteRunLease(ctx context.Context, completion taskpkg.LeaseCompletion, ...) (*taskpkg.Run, error)
- func (s *StubTaskManager) CreateChildTask(ctx context.Context, parentTaskID string, spec taskpkg.CreateTask, ...) (*taskpkg.Task, error)
- func (s *StubTaskManager) CreateTask(ctx context.Context, spec taskpkg.CreateTask, actor taskpkg.ActorContext) (*taskpkg.Task, error)
- func (s *StubTaskManager) DeleteExecutionProfile(ctx context.Context, taskID string, actor taskpkg.ActorContext) error
- func (s *StubTaskManager) DeleteTask(ctx context.Context, id string, actor taskpkg.ActorContext) error
- func (s *StubTaskManager) DismissTask(ctx context.Context, id string, actor taskpkg.ActorContext) (taskpkg.TriageState, error)
- func (s *StubTaskManager) DrainScheduler(ctx context.Context, req taskpkg.SchedulerDrainRequest, ...) (taskpkg.SchedulerDrainResult, error)
- func (s *StubTaskManager) EnqueueRun(ctx context.Context, spec taskpkg.EnqueueRun, actor taskpkg.ActorContext) (*taskpkg.Run, error)
- func (s *StubTaskManager) ExpireTaskBlocks(ctx context.Context, now time.Time, actor taskpkg.ActorContext) (taskpkg.ExpireTaskBlocksResult, error)
- func (s *StubTaskManager) FailRun(ctx context.Context, runID string, failure taskpkg.RunFailure, ...) (*taskpkg.Run, error)
- func (s *StubTaskManager) FailRunLease(ctx context.Context, failure taskpkg.LeaseFailure, actor taskpkg.ActorContext) (*taskpkg.Run, error)
- func (s *StubTaskManager) ForceFailRun(ctx context.Context, runID string, failure taskpkg.ForceFailRun, ...) (*taskpkg.Run, error)
- func (s *StubTaskManager) ForceReleaseRun(ctx context.Context, runID string, release taskpkg.ForceReleaseRun, ...) (*taskpkg.Run, error)
- func (s *StubTaskManager) GetExecutionProfile(ctx context.Context, taskID string, actor taskpkg.ActorContext) (taskpkg.ExecutionProfile, error)
- func (s *StubTaskManager) GetRunReview(ctx context.Context, reviewID string, actor taskpkg.ActorContext) (taskpkg.RunReview, error)
- func (s *StubTaskManager) GetTask(ctx context.Context, id string, actor taskpkg.ActorContext) (*taskpkg.View, error)
- func (s *StubTaskManager) HeartbeatRunLease(ctx context.Context, heartbeat taskpkg.LeaseHeartbeat, ...) (*taskpkg.Run, error)
- func (s *StubTaskManager) InspectRun(ctx context.Context, runID string, actor taskpkg.ActorContext) (*taskpkg.InspectView, error)
- func (s *StubTaskManager) InspectTask(ctx context.Context, taskID string, actor taskpkg.ActorContext) (*taskpkg.InspectView, error)
- func (s *StubTaskManager) ListRunReviews(ctx context.Context, query taskpkg.RunReviewQuery, actor taskpkg.ActorContext) ([]taskpkg.RunReview, error)
- func (s *StubTaskManager) ListTaskBlocks(ctx context.Context, taskID string, includeCleared bool, ...) ([]taskpkg.TaskBlock, error)
- func (s *StubTaskManager) ListTaskCatalog(ctx context.Context, query taskpkg.CatalogQuery, actor taskpkg.ActorContext) (taskpkg.CatalogPage, error)
- func (s *StubTaskManager) ListTaskRuns(ctx context.Context, taskID string, query taskpkg.RunQuery, ...) ([]taskpkg.Run, error)
- func (s *StubTaskManager) ListTasks(ctx context.Context, query taskpkg.Query, actor taskpkg.ActorContext) ([]taskpkg.Summary, error)
- func (s *StubTaskManager) LookupActiveRunForSession(ctx context.Context, sessionID string, runID string) (taskpkg.AutonomyLeaseHandle, error)
- func (s *StubTaskManager) LookupRunReviewForSession(_ context.Context, _ string, _ taskpkg.ActorContext) (taskpkg.RunReviewBinding, error)
- func (s *StubTaskManager) MarkTaskRead(ctx context.Context, id string, actor taskpkg.ActorContext) (taskpkg.TriageState, error)
- func (s *StubTaskManager) PauseScheduler(ctx context.Context, req taskpkg.SchedulerPauseRequest, ...) (taskpkg.SchedulerStatus, error)
- func (s *StubTaskManager) PauseTask(ctx context.Context, taskID string, req taskpkg.PauseTaskRequest, ...) (*taskpkg.Task, error)
- func (s *StubTaskManager) PublishTask(ctx context.Context, id string, req taskpkg.ExecutionRequest, ...) (*taskpkg.Execution, error)
- func (s *StubTaskManager) ReadTaskRunResult(ctx context.Context, runID string, offset int64, limit int64, ...) (taskpkg.RunResultPage, error)
- func (s *StubTaskManager) RecordRunReview(ctx context.Context, req taskpkg.RecordRunReviewRequest, ...) (taskpkg.RunReviewResult, error)
- func (s *StubTaskManager) RecoverExpiredRunLeases(ctx context.Context, recovery taskpkg.ExpiredLeaseRecovery, ...) ([]taskpkg.ExpiredLeaseRecoveryResult, error)
- func (s *StubTaskManager) RecoverRun(ctx context.Context, runID string, req taskpkg.RecoverRunRequest, ...) (*taskpkg.RetryRunResult, error)
- func (s *StubTaskManager) RecoverTask(ctx context.Context, id string, note string, actor taskpkg.ActorContext) (*taskpkg.Task, error)
- func (s *StubTaskManager) RejectTask(ctx context.Context, id string, actor taskpkg.ActorContext) (*taskpkg.Task, error)
- func (s *StubTaskManager) ReleaseRunLease(ctx context.Context, release taskpkg.LeaseRelease, actor taskpkg.ActorContext) (*taskpkg.Run, error)
- func (s *StubTaskManager) RemoveDependency(ctx context.Context, taskID string, dependsOnID string, ...) error
- func (s *StubTaskManager) RequestRunReview(ctx context.Context, req taskpkg.RunReviewRequest, actor taskpkg.ActorContext) (taskpkg.RunReview, bool, error)
- func (s *StubTaskManager) ResumeScheduler(ctx context.Context, req taskpkg.SchedulerResumeRequest, ...) (taskpkg.SchedulerStatus, error)
- func (s *StubTaskManager) ResumeTask(ctx context.Context, taskID string, req taskpkg.ResumeTaskRequest, ...) (*taskpkg.Task, error)
- func (s *StubTaskManager) RetryRun(ctx context.Context, runID string, retry taskpkg.RetryRunRequest, ...) (*taskpkg.RetryRunResult, error)
- func (s *StubTaskManager) RunDetail(ctx context.Context, runID string, actor taskpkg.ActorContext) (*taskpkg.RunDetailView, error)
- func (s *StubTaskManager) SchedulerBacklog(ctx context.Context, query taskpkg.SchedulerBacklogQuery, ...) (taskpkg.SchedulerBacklog, error)
- func (s *StubTaskManager) SchedulerStatus(ctx context.Context, actor taskpkg.ActorContext) (taskpkg.SchedulerStatus, error)
- func (s *StubTaskManager) SetExecutionProfile(ctx context.Context, taskID string, profile *taskpkg.ExecutionProfile, ...) (taskpkg.ExecutionProfile, error)
- func (s *StubTaskManager) SetWorktreePolicy(ctx context.Context, taskID string, policy taskpkg.WorktreePolicy, ...) (taskpkg.ExecutionProfile, error)
- func (s *StubTaskManager) StartRun(ctx context.Context, runID string, req taskpkg.StartRun, ...) (*taskpkg.Run, error)
- func (s *StubTaskManager) StartTask(ctx context.Context, id string, req taskpkg.ExecutionRequest, ...) (*taskpkg.Execution, error)
- func (s *StubTaskManager) Stream(ctx context.Context, taskID string, query taskpkg.StreamQuery, ...) (<-chan taskpkg.StreamEvent, error)
- func (s *StubTaskManager) Timeline(ctx context.Context, taskID string, query taskpkg.TimelineQuery, ...) ([]taskpkg.TimelineItem, error)
- func (s *StubTaskManager) Tree(ctx context.Context, taskID string, actor taskpkg.ActorContext) (*taskpkg.TreeView, error)
- func (s *StubTaskManager) UpdateTask(ctx context.Context, id string, patch taskpkg.Patch, ...) (*taskpkg.Task, error)
- type StubWorkspaceAccessPolicy
- type StubWorkspaceService
- func (s StubWorkspaceService) Get(ctx context.Context, ref string) (workspacepkg.Workspace, error)
- func (s StubWorkspaceService) List(ctx context.Context) ([]workspacepkg.Workspace, error)
- func (s StubWorkspaceService) Register(ctx context.Context, opts workspacepkg.RegisterOptions) (workspacepkg.Workspace, error)
- func (s StubWorkspaceService) Resolve(ctx context.Context, ref string) (workspacepkg.ResolvedWorkspace, error)
- func (s StubWorkspaceService) ResolveForProfile(ctx context.Context, ref string, profileName string) (workspacepkg.ResolvedWorkspace, error)
- func (s StubWorkspaceService) ResolveOrRegister(ctx context.Context, path string) (workspacepkg.ResolvedWorkspace, error)
- func (s StubWorkspaceService) Unregister(ctx context.Context, id string) error
- func (s StubWorkspaceService) Update(ctx context.Context, id string, opts workspacepkg.UpdateOptions) error
Constants ¶
const ( TaskLoopParityRunID = "looprun-transport-parity" TaskLoopParityName = "transport-parity" TaskLoopParityCoordinatorID = "task-loop-transport-coordinator" TaskLoopParityCellID = "task-loop-transport-cell" TaskLoopParityGeneration = 2 TaskLoopParityNodeID = "review" TaskLoopParityItemIndex = 0 )
Variables ¶
var ErrStubWorkspaceServiceNotImplemented = errors.New("stub workspace service method not implemented")
Functions ¶
func AssertLoopRunTaskCatalog ¶
func AssertLoopRunTaskCatalog(t testing.TB, response contract.TasksResponse)
AssertLoopRunTaskCatalog checks the shared task-list result used by every public transport.
func AssertLoopTaskProvenance ¶
func AssertLoopTaskProvenance( t testing.TB, item contract.TaskCatalogItemPayload, wantRole contract.LoopProvenanceRole, )
AssertLoopTaskProvenance checks the complete shared provenance projection for the canonical fixture.
func AssertWorktreeRouteParity ¶
AssertWorktreeRouteParity fails when a transport drifts from the complete IT-033 route contract.
func ConfigForTest ¶
func ConfigForTest(homePaths compozyconfig.HomePaths) compozyconfig.Config
ConfigForTest returns the default isolated API test configuration.
func DecodeJSONResponse ¶
func DecodeJSONResponse(t *testing.T, recorder *httptest.ResponseRecorder, dest any)
func DiscardLogger ¶
func DocumentedProfileRoutesForTransport ¶
DocumentedProfileRoutesForTransport returns the normalized profile routes in the public spec.
func DocumentedRoutesForTransport ¶
DocumentedRoutesForTransport returns normalized routes selected from the public spec.
func ExpectedWorktreeRouteKeys ¶
func ExpectedWorktreeRouteKeys() []string
ExpectedWorktreeRouteKeys is the shared IT-033 parity contract for every transport.
func IsProfileRoute ¶
IsProfileRoute matches only the profile collection and its descendants.
func NewHomeConfig ¶
func NewHomeConfig(t *testing.T) (compozyconfig.HomePaths, compozyconfig.Config)
NewHomeConfig creates an isolated API test home and its configuration.
func NewSession ¶
func NewSessionInfo ¶
func NewTestHomePaths ¶
func NewTestHomePaths(t *testing.T) compozyconfig.HomePaths
func PerformRequest ¶
func ProfileRoutesFromEngine ¶
func ProfileRoutesFromEngine(routes gin.RoutesInfo) []string
ProfileRoutesFromEngine returns normalized, stable profile routes registered by a transport.
func RoutesFromEngine ¶
func RoutesFromEngine(routes gin.RoutesInfo, matches func(string) bool) []string
RoutesFromEngine returns normalized, stable routes selected by a path predicate.
func WorktreeRouteKeysFromGin ¶
func WorktreeRouteKeysFromGin(routes gin.RoutesInfo) []string
WorktreeRouteKeysFromGin returns the normalized worktree route keys registered on a Gin engine.
func WriteAgentDef ¶
func WriteAgentDef(t *testing.T, homePaths compozyconfig.HomePaths, name string)
Types ¶
type SingleProfileWindowManagers ¶
type SingleProfileWindowManagers struct {
Manager *windowmanager.Manager
}
SingleProfileWindowManagers shares one manager across profile selections in transport tests while preserving the provider's profile-aware interface.
func (SingleProfileWindowManagers) ClaimClient ¶
func (s SingleProfileWindowManagers) ClaimClient( ctx context.Context, _ string, registration windowmanager.ClientRegistration, ) (windowmanager.ClientView, error)
func (SingleProfileWindowManagers) WindowManagerFor ¶
func (s SingleProfileWindowManagers) WindowManagerFor(string) (core.WindowManagerService, error)
type StubAutomationManager ¶
type StubAutomationManager struct {
LatestRunsByOwnerFn func(context.Context, automationpkg.RunOwnerKind, []string) (map[string]automationpkg.Run, error)
ListSuggestionsFn func(
context.Context,
store.ReadScope,
string,
automationpkg.SuggestionStatus,
) ([]automationpkg.Suggestion, error)
AcceptSuggestionFn func(
context.Context,
string,
string,
string,
) (automationpkg.SuggestionAcceptance, error)
DismissSuggestionFn func(
context.Context,
string,
string,
string,
) (automationpkg.Suggestion, error)
ListJobsFn func(context.Context, automationpkg.JobListQuery) (automationpkg.JobListPage, error)
JobsFn func(context.Context) ([]automationpkg.Job, error)
GetJobFn func(context.Context, string) (automationpkg.Job, error)
CreateJobFn func(context.Context, automationpkg.Job) (automationpkg.Job, error)
UpdateJobFn func(context.Context, automationpkg.Job) (automationpkg.Job, error)
DeleteJobFn func(context.Context, string) error
TriggerJobFn func(context.Context, string) (automationpkg.Run, error)
ListTriggersFn func(context.Context, automationpkg.TriggerListQuery) (automationpkg.TriggerListPage, error)
TriggersFn func(context.Context) ([]automationpkg.Trigger, error)
GetTriggerFn func(context.Context, string) (automationpkg.Trigger, error)
CreateTriggerFn func(
context.Context,
automationpkg.Trigger,
automationpkg.WebhookSecretWrite,
) (automationpkg.Trigger, error)
UpdateTriggerFn func(
context.Context,
automationpkg.Trigger,
*automationpkg.WebhookSecretWrite,
) (automationpkg.Trigger, error)
DeleteTriggerFn func(context.Context, string) error
ListRunsFn func(context.Context, automationpkg.RunQuery) ([]automationpkg.Run, error)
RunsFn func(context.Context, automationpkg.RunQuery) ([]automationpkg.Run, error)
GetRunFn func(context.Context, string) (automationpkg.Run, error)
StatusFn func(context.Context) (automationpkg.ManagerStatus, error)
SetJobEnabledFn func(context.Context, string, bool) (automationpkg.Job, error)
SetTriggerEnabledFn func(context.Context, string, bool) (automationpkg.Trigger, error)
HandleWebhookFn func(context.Context, automationpkg.WebhookRequest) (automationpkg.TriggerResult, error)
}
func (StubAutomationManager) AcceptSuggestion ¶
func (s StubAutomationManager) AcceptSuggestion( ctx context.Context, profileID string, workspaceRef string, suggestionID string, ) (automationpkg.SuggestionAcceptance, error)
func (StubAutomationManager) CreateJob ¶
func (s StubAutomationManager) CreateJob(ctx context.Context, job automationpkg.Job) (automationpkg.Job, error)
func (StubAutomationManager) CreateTrigger ¶
func (s StubAutomationManager) CreateTrigger( ctx context.Context, trigger automationpkg.Trigger, secret automationpkg.WebhookSecretWrite, ) (automationpkg.Trigger, error)
func (StubAutomationManager) DeleteJob ¶
func (s StubAutomationManager) DeleteJob(ctx context.Context, id string) error
func (StubAutomationManager) DeleteTrigger ¶
func (s StubAutomationManager) DeleteTrigger(ctx context.Context, id string) error
func (StubAutomationManager) DismissSuggestion ¶
func (s StubAutomationManager) DismissSuggestion( ctx context.Context, profileID string, workspaceRef string, suggestionID string, ) (automationpkg.Suggestion, error)
func (StubAutomationManager) GetJob ¶
func (s StubAutomationManager) GetJob(ctx context.Context, id string) (automationpkg.Job, error)
func (StubAutomationManager) GetRun ¶
func (s StubAutomationManager) GetRun(ctx context.Context, id string) (automationpkg.Run, error)
func (StubAutomationManager) GetTrigger ¶
func (s StubAutomationManager) GetTrigger(ctx context.Context, id string) (automationpkg.Trigger, error)
func (StubAutomationManager) HandleWebhook ¶
func (s StubAutomationManager) HandleWebhook( ctx context.Context, request automationpkg.WebhookRequest, ) (automationpkg.TriggerResult, error)
func (StubAutomationManager) Jobs ¶
func (s StubAutomationManager) Jobs(ctx context.Context) ([]automationpkg.Job, error)
func (StubAutomationManager) LatestRunsByOwner ¶
func (s StubAutomationManager) LatestRunsByOwner( ctx context.Context, owner automationpkg.RunOwnerKind, ids []string, ) (map[string]automationpkg.Run, error)
func (StubAutomationManager) ListJobs ¶
func (s StubAutomationManager) ListJobs( ctx context.Context, query automationpkg.JobListQuery, ) (automationpkg.JobListPage, error)
func (StubAutomationManager) ListRuns ¶
func (s StubAutomationManager) ListRuns( ctx context.Context, query automationpkg.RunQuery, ) ([]automationpkg.Run, error)
func (StubAutomationManager) ListSuggestions ¶
func (s StubAutomationManager) ListSuggestions( ctx context.Context, readScope store.ReadScope, workspaceRef string, status automationpkg.SuggestionStatus, ) ([]automationpkg.Suggestion, error)
func (StubAutomationManager) ListTriggers ¶
func (s StubAutomationManager) ListTriggers( ctx context.Context, query automationpkg.TriggerListQuery, ) (automationpkg.TriggerListPage, error)
func (StubAutomationManager) Runs ¶
func (s StubAutomationManager) Runs(ctx context.Context, query automationpkg.RunQuery) ([]automationpkg.Run, error)
func (StubAutomationManager) SetJobEnabled ¶
func (s StubAutomationManager) SetJobEnabled(ctx context.Context, id string, enabled bool) (automationpkg.Job, error)
func (StubAutomationManager) SetTriggerEnabled ¶
func (s StubAutomationManager) SetTriggerEnabled( ctx context.Context, id string, enabled bool, ) (automationpkg.Trigger, error)
func (StubAutomationManager) Status ¶
func (s StubAutomationManager) Status(ctx context.Context) (automationpkg.ManagerStatus, error)
func (StubAutomationManager) TriggerJob ¶
func (s StubAutomationManager) TriggerJob(ctx context.Context, id string) (automationpkg.Run, error)
func (StubAutomationManager) Triggers ¶
func (s StubAutomationManager) Triggers(ctx context.Context) ([]automationpkg.Trigger, error)
func (StubAutomationManager) UpdateJob ¶
func (s StubAutomationManager) UpdateJob(ctx context.Context, job automationpkg.Job) (automationpkg.Job, error)
func (StubAutomationManager) UpdateTrigger ¶
func (s StubAutomationManager) UpdateTrigger( ctx context.Context, trigger automationpkg.Trigger, secret *automationpkg.WebhookSecretWrite, ) (automationpkg.Trigger, error)
type StubExtensionService ¶
type StubExtensionService struct {
ListFn func(context.Context) ([]contract.ExtensionPayload, error)
SearchFn func(
context.Context,
contract.ExtensionSearchRequest,
) (contract.ExtensionSearchResponse, error)
MarketplaceTrustFn func(
context.Context,
extensionpkg.MarketplaceTrustEvidence,
) (contract.ExtensionTrustReportPayload, error)
InstallFn func(
context.Context,
contract.InstallExtensionRequest,
taskpkg.ActorContext,
) (contract.ExtensionPayload, error)
PreviewInstallFn func(
context.Context,
contract.InstallExtensionRequest,
taskpkg.ActorContext,
) (contract.ExtensionInstallPreviewPayload, error)
ListEnablementFn func(context.Context, string) ([]contract.ExtensionEnablementPayload, error)
SetEnablementFn func(
context.Context,
string,
contract.SetExtensionEnablementRequest,
taskpkg.ActorContext,
) (contract.ExtensionEnablementPayload, error)
UpdateFn func(
context.Context,
string,
contract.UpdateExtensionRequest,
taskpkg.ActorContext,
) (contract.ManagedExtensionUpdatePayload, error)
UpdateBatchFn func(
context.Context,
contract.UpdateExtensionsRequest,
taskpkg.ActorContext,
) ([]contract.ManagedExtensionUpdatePayload, error)
RemoveFn func(
context.Context,
string,
taskpkg.ActorContext,
) (contract.ManagedExtensionRemovePayload, error)
EnableFn func(
context.Context,
string,
contract.EnableExtensionRequest,
taskpkg.ActorContext,
) (contract.ExtensionEnableResult, error)
DisableFn func(context.Context, string, taskpkg.ActorContext) (contract.ExtensionPayload, error)
StatusFn func(context.Context, string) (contract.ExtensionPayload, error)
ProvenanceFn func(context.Context, string) (contract.ExtensionProvenancePayload, error)
InventoryFn func(context.Context, string) (contract.ExtensionInventoryPayload, error)
PreviewFn func(context.Context, string) (contract.ExtensionEnablePreviewPayload, error)
ListSecretsFn func(context.Context, string, taskpkg.ActorContext) (contract.ExtensionSecretsPayload, error)
SetSecretsFn func(
context.Context,
string,
contract.SetExtensionSecretsRequest,
taskpkg.ActorContext,
) (contract.ExtensionSecretsPayload, error)
DeleteSecretFn func(context.Context, string, string, taskpkg.ActorContext) error
DevFn func(
context.Context,
contract.DevLinkExtensionRequest,
taskpkg.ActorContext,
) (contract.ExtensionPayload, error)
ReloadDevFn func(
context.Context,
string,
contract.ReloadExtensionRequest,
taskpkg.ActorContext,
) (contract.ExtensionPayload, error)
ExtensionLogsFn func(
context.Context,
string,
int64,
string,
taskpkg.ActorContext,
) (contract.ExtensionLogsResponse, error)
}
StubExtensionService is the shared transport fake for extension route suites.
func (StubExtensionService) DeleteExtensionSecret ¶
func (s StubExtensionService) DeleteExtensionSecret( ctx context.Context, name string, envName string, actor taskpkg.ActorContext, ) error
func (StubExtensionService) Dev ¶
func (s StubExtensionService) Dev( ctx context.Context, req contract.DevLinkExtensionRequest, actor taskpkg.ActorContext, ) (contract.ExtensionPayload, error)
func (StubExtensionService) Disable ¶
func (s StubExtensionService) Disable( ctx context.Context, name string, actor taskpkg.ActorContext, ) (contract.ExtensionPayload, error)
func (StubExtensionService) Enable ¶
func (s StubExtensionService) Enable( ctx context.Context, name string, req contract.EnableExtensionRequest, actor taskpkg.ActorContext, ) (contract.ExtensionEnableResult, error)
func (StubExtensionService) ExtensionLogs ¶
func (s StubExtensionService) ExtensionLogs( ctx context.Context, name string, after int64, streamEpoch string, actor taskpkg.ActorContext, ) (contract.ExtensionLogsResponse, error)
func (StubExtensionService) Install ¶
func (s StubExtensionService) Install( ctx context.Context, req contract.InstallExtensionRequest, actor taskpkg.ActorContext, ) (contract.ExtensionPayload, error)
func (StubExtensionService) InventoryScoped ¶
func (s StubExtensionService) InventoryScoped( ctx context.Context, name string, _ taskpkg.ActorContext, ) (contract.ExtensionInventoryPayload, error)
func (StubExtensionService) List ¶
func (s StubExtensionService) List(ctx context.Context) ([]contract.ExtensionPayload, error)
func (StubExtensionService) ListEnablement ¶
func (s StubExtensionService) ListEnablement( ctx context.Context, name string, ) ([]contract.ExtensionEnablementPayload, error)
func (StubExtensionService) ListExtensionSecrets ¶
func (s StubExtensionService) ListExtensionSecrets( ctx context.Context, name string, actor taskpkg.ActorContext, ) (contract.ExtensionSecretsPayload, error)
func (StubExtensionService) MarketplaceTrust ¶
func (s StubExtensionService) MarketplaceTrust( ctx context.Context, evidence extensionpkg.MarketplaceTrustEvidence, ) (contract.ExtensionTrustReportPayload, error)
func (StubExtensionService) Preview ¶
func (s StubExtensionService) Preview( ctx context.Context, name string, ) (contract.ExtensionEnablePreviewPayload, error)
func (StubExtensionService) PreviewInstall ¶
func (s StubExtensionService) PreviewInstall( ctx context.Context, req contract.InstallExtensionRequest, actor taskpkg.ActorContext, ) (contract.ExtensionInstallPreviewPayload, error)
func (StubExtensionService) Provenance ¶
func (s StubExtensionService) Provenance( ctx context.Context, name string, ) (contract.ExtensionProvenancePayload, error)
func (StubExtensionService) ReloadDev ¶
func (s StubExtensionService) ReloadDev( ctx context.Context, name string, req contract.ReloadExtensionRequest, actor taskpkg.ActorContext, ) (contract.ExtensionPayload, error)
func (StubExtensionService) Remove ¶
func (s StubExtensionService) Remove( ctx context.Context, name string, actor taskpkg.ActorContext, ) (contract.ManagedExtensionRemovePayload, error)
func (StubExtensionService) Search ¶
func (s StubExtensionService) Search( ctx context.Context, req contract.ExtensionSearchRequest, ) (contract.ExtensionSearchResponse, error)
func (StubExtensionService) SetEnablement ¶
func (s StubExtensionService) SetEnablement( ctx context.Context, name string, req contract.SetExtensionEnablementRequest, actor taskpkg.ActorContext, ) (contract.ExtensionEnablementPayload, error)
func (StubExtensionService) SetExtensionSecrets ¶
func (s StubExtensionService) SetExtensionSecrets( ctx context.Context, name string, req contract.SetExtensionSecretsRequest, actor taskpkg.ActorContext, ) (contract.ExtensionSecretsPayload, error)
func (StubExtensionService) Status ¶
func (s StubExtensionService) Status(ctx context.Context, name string) (contract.ExtensionPayload, error)
func (StubExtensionService) Update ¶
func (s StubExtensionService) Update( ctx context.Context, name string, req contract.UpdateExtensionRequest, actor taskpkg.ActorContext, ) (contract.ManagedExtensionUpdatePayload, error)
func (StubExtensionService) UpdateBatch ¶
func (s StubExtensionService) UpdateBatch( ctx context.Context, req contract.UpdateExtensionsRequest, actor taskpkg.ActorContext, ) ([]contract.ManagedExtensionUpdatePayload, error)
type StubObserver ¶
type StubObserver struct {
QueryEventsFn func(context.Context, store.EventSummaryQuery) ([]store.EventSummary, error)
OnAgentEventFn func(context.Context, string, acp.AgentEvent)
QueryHookCatalogFn func(context.Context, hookspkg.CatalogFilter) ([]hookspkg.CatalogEntry, error)
QueryHookRunsFn func(context.Context, store.HookRunQuery) ([]hookspkg.HookRunRecord, error)
QueryHookEventsFn func(context.Context, hookspkg.EventFilter) ([]hookspkg.EventDescriptor, error)
HealthFn func(context.Context) (observe.Health, error)
QueryTokenStatsFn func(context.Context, store.TokenStatsQuery) ([]store.TokenStats, error)
QueryTaskDashboardFn func(context.Context, observe.TaskDashboardQuery) (observe.TaskDashboardView, error)
QueryTaskInboxFn func(
context.Context,
observe.TaskInboxQuery,
taskpkg.ActorIdentity,
) (observe.TaskInboxView, error)
QueryObserveOverviewFn func(context.Context, observe.OverviewQuery) (observe.OverviewView, error)
}
func (StubObserver) OnAgentEvent ¶
func (s StubObserver) OnAgentEvent(ctx context.Context, sessionID string, event any)
func (StubObserver) QueryEvents ¶
func (s StubObserver) QueryEvents(ctx context.Context, query store.EventSummaryQuery) ([]store.EventSummary, error)
func (StubObserver) QueryHookCatalog ¶
func (s StubObserver) QueryHookCatalog( ctx context.Context, filter hookspkg.CatalogFilter, ) ([]hookspkg.CatalogEntry, error)
func (StubObserver) QueryHookEvents ¶
func (s StubObserver) QueryHookEvents( ctx context.Context, filter hookspkg.EventFilter, ) ([]hookspkg.EventDescriptor, error)
func (StubObserver) QueryHookRuns ¶
func (s StubObserver) QueryHookRuns(ctx context.Context, query store.HookRunQuery) ([]hookspkg.HookRunRecord, error)
func (StubObserver) QueryObserveOverview ¶
func (s StubObserver) QueryObserveOverview( ctx context.Context, query observe.OverviewQuery, ) (observe.OverviewView, error)
func (StubObserver) QueryTaskDashboard ¶
func (s StubObserver) QueryTaskDashboard( ctx context.Context, query observe.TaskDashboardQuery, ) (observe.TaskDashboardView, error)
func (StubObserver) QueryTaskInbox ¶
func (s StubObserver) QueryTaskInbox( ctx context.Context, query observe.TaskInboxQuery, actor taskpkg.ActorIdentity, ) (observe.TaskInboxView, error)
func (StubObserver) QueryTokenStats ¶
func (s StubObserver) QueryTokenStats( ctx context.Context, query store.TokenStatsQuery, ) ([]store.TokenStats, error)
type StubResourceService ¶
type StubResourceService struct {
ListFn func(context.Context, resources.ResourceFilter) ([]resources.RawRecord, error)
GetFn func(context.Context, resources.ResourceKind, string) (resources.RawRecord, error)
PutFn func(context.Context, resources.RawDraft) (resources.RawRecord, error)
DeleteFn func(context.Context, resources.ResourceKind, string, int64) error
}
func (StubResourceService) Delete ¶
func (s StubResourceService) Delete( ctx context.Context, kind resources.ResourceKind, id string, expectedVersion int64, ) error
func (StubResourceService) Get ¶
func (s StubResourceService) Get( ctx context.Context, kind resources.ResourceKind, id string, ) (resources.RawRecord, error)
func (StubResourceService) List ¶
func (s StubResourceService) List( ctx context.Context, filter resources.ResourceFilter, ) ([]resources.RawRecord, error)
type StubSessionAttention ¶
type StubSessionAttention struct {
PresenceFn func(context.Context, string, string, bool) (string, error)
PendingFn func(context.Context, string, []string) ([]store.PendingInteraction, error)
SummaryFn func(context.Context, store.ReadScope) (store.SessionAttentionSummary, error)
WaitFn func(context.Context, session.WaitRequest) (session.WaitOutcome, error)
}
StubSessionAttention configures the attention-specific behavior of StubSessionManager.
type StubSessionManager ¶
type StubSessionManager struct {
RequestCompactionFn func(
context.Context, string,
) (session.CompactionRequestResult, <-chan acp.AgentEvent, error)
ContextEventsFn func(context.Context, string) (session.ContextEvents, error)
UsageEventsFn func(context.Context, string) ([]session.UsageEventEnvelope, error)
DeliveriesFn func(context.Context, string) ([]session.DeliveryEventEnvelope, error)
CompactionsFn func(context.Context, string) ([]session.CompactionEnvelope, error)
LatestSettledTurnFn func(context.Context, string) (session.SettledTurn, error)
Attention StubSessionAttention
CreateFn func(context.Context, session.CreateOpts) (*session.Session, error)
CreateAcceptedFn func(context.Context, session.CreateAcceptedOpts) (*session.Info, error)
CreateWorktreeForkAcceptedFn func(context.Context, string, session.CreateAcceptedOpts) (*session.Info, error)
ListFn func() []*session.Info
ListAllFn func(context.Context) ([]*session.Info, error)
ListForWorkspaceFn func(context.Context, string) ([]*session.Info, error)
ListPageFn func(context.Context, session.ListQuery) (session.ListPage, error)
CatalogFacetsFn func(context.Context, session.ListQuery) (store.SessionCatalogFacetResult, error)
SubscribeCatalogFn func(context.Context, session.CatalogScope) (<-chan session.CatalogEvent, func(), error)
MetricsByAgentFn func(
context.Context, store.ReadScope, string,
) (map[string]session.AgentSessionMetrics, error)
ListSessionsFn func(context.Context, store.SessionListQuery) ([]store.SessionInfo, error)
StatusFn func(context.Context, string) (*session.Info, error)
SessionOwnerFn func(context.Context, string) (store.SessionOwner, error)
ActivePromptRunFn func(context.Context, string) (session.PromptRunIdentity, error)
EventsFn func(context.Context, string, store.EventQuery) ([]store.SessionEvent, error)
EventMetadataFn func(context.Context, string, store.EventQuery) ([]store.EventMetadata, error)
LatestEventFn func(context.Context, string, string) (*store.SessionEvent, error)
HistoryFn func(context.Context, string, store.EventQuery) ([]store.TurnHistory, error)
TranscriptPageFn func(context.Context, string, transcript.PageQuery) (transcript.Page, error)
TranscriptChangesFn func(context.Context, string, transcript.ChangeQuery) (transcript.ChangePage, error)
RepairFn func(context.Context, session.RepairOpts) (*session.RepairResult, error)
DeleteFn func(context.Context, string) error
StopFn func(context.Context, string) error
ArchiveFn func(context.Context, string, string) (*session.Info, error)
ArchiveWithStopFn func(context.Context, string, string) (*session.Info, error)
UnarchiveFn func(context.Context, string, string) (*session.Info, error)
RenameFn func(context.Context, string, string, string) (*session.Info, error)
AdoptSessionFn func(context.Context, string, string, string) (*session.Info, error)
DetachSessionFn func(context.Context, string, string) (*session.Info, error)
StopWithCauseFn func(context.Context, string, session.StopCause, string) error
ResumeFn func(context.Context, string) (*session.Session, error)
AttachSessionFn func(context.Context, store.SessionAttachRequest) (store.SessionAttach, error)
SetRuntimeSelectionFn func(context.Context, string, session.RuntimeSelection, int64) (*session.Info, error)
ClearRuntimeSelectionFn func(context.Context, string, int64) (*session.Info, error)
ClearFn func(context.Context, string) (*session.Session, error)
ContinueFn func(context.Context, session.ContinueSessionOpts) (session.DeriveResult, error)
ForkFn func(context.Context, session.ForkSessionOpts) (session.DeriveResult, error)
DerivePreviewFn func(context.Context, string, string, string) (session.DerivePreview, error)
RewindFn func(
context.Context,
string,
session.ConversationRewindOptions,
) (session.ConversationRewindResult, error)
PromptFn func(context.Context, string, string) (<-chan acp.AgentEvent, error)
PromptWithOptsFn func(context.Context, string, session.PromptOpts) (<-chan acp.AgentEvent, error)
PromptSyntheticFn func(
context.Context,
string,
session.SyntheticPromptOpts,
) (<-chan acp.AgentEvent, error)
SendPromptFn func(context.Context, string, session.SendPromptOpts) (session.SendPromptResult, error)
SteerFn func(context.Context, string, session.SteerPromptOpts) (session.SendPromptResult, error)
ListPendingInputsFn func(context.Context, string) ([]session.PendingInput, error)
ClearPendingInputsFn func(context.Context, string, session.PromptCaller) (session.ClearPendingInputsResult, error)
ReplacePendingInputFn func(
context.Context, string, string, session.ReplacePendingInputOpts,
) (session.PendingInput, error)
PromotePendingInputFn func(
context.Context, string, string, session.PromotePendingInputOpts,
) (session.SendPromptResult, error)
CancelQueuedFn func(context.Context, string, string) (session.SendPromptResult, error)
CancelPromptFn func(context.Context, string) (session.PromptCancelResult, error)
ApproveFn func(context.Context, string, acp.ApproveRequest) (session.ApprovalResult, error)
InputQueueFn func(context.Context, string) (session.InputQueueSummary, error)
WorkingDirFn func(context.Context, string) (string, error)
}
func (StubSessionManager) ActivePromptRun ¶
func (s StubSessionManager) ActivePromptRun( ctx context.Context, id string, ) (session.PromptRunIdentity, error)
func (StubSessionManager) AdoptSession ¶
func (s StubSessionManager) AdoptSession( ctx context.Context, workspaceID string, sessionID string, parentSessionID string, ) (*session.Info, error)
AdoptSession delegates to AdoptSessionFn or reports a missing session.
func (StubSessionManager) AggregateSessionsByAgent ¶
func (s StubSessionManager) AggregateSessionsByAgent( ctx context.Context, readScope store.ReadScope, workspaceID string, ) (map[string]session.AgentSessionMetrics, error)
func (StubSessionManager) ApprovePermission ¶
func (s StubSessionManager) ApprovePermission( ctx context.Context, id string, req acp.ApproveRequest, ) (session.ApprovalResult, error)
func (StubSessionManager) ArchiveWithStop ¶
func (StubSessionManager) AttachSession ¶
func (s StubSessionManager) AttachSession( ctx context.Context, req store.SessionAttachRequest, ) (store.SessionAttach, error)
func (StubSessionManager) AttentionSummary ¶
func (s StubSessionManager) AttentionSummary( ctx context.Context, readScope store.ReadScope, ) (store.SessionAttentionSummary, error)
AttentionSummary returns the configured exact test aggregate.
func (StubSessionManager) CancelPrompt ¶
func (s StubSessionManager) CancelPrompt(ctx context.Context, id string) (session.PromptCancelResult, error)
func (StubSessionManager) CancelQueuedPrompt ¶
func (s StubSessionManager) CancelQueuedPrompt( ctx context.Context, id string, queueEntryID string, ) (session.SendPromptResult, error)
func (StubSessionManager) CatalogFacets ¶
func (s StubSessionManager) CatalogFacets( ctx context.Context, query session.ListQuery, ) (store.SessionCatalogFacetResult, error)
func (StubSessionManager) ClearConversation ¶
func (StubSessionManager) ClearPendingInputs ¶
func (s StubSessionManager) ClearPendingInputs( ctx context.Context, id string, caller session.PromptCaller, ) (session.ClearPendingInputsResult, error)
func (StubSessionManager) ClearRuntimeSelection ¶
func (StubSessionManager) Compactions ¶
func (s StubSessionManager) Compactions(ctx context.Context, id string) ([]session.CompactionEnvelope, error)
func (StubSessionManager) ContextEvents ¶
func (s StubSessionManager) ContextEvents(ctx context.Context, id string) (session.ContextEvents, error)
func (StubSessionManager) ContinueSession ¶
func (s StubSessionManager) ContinueSession( ctx context.Context, opts session.ContinueSessionOpts, ) (session.DeriveResult, error)
ContinueSession delegates to ContinueFn.
func (StubSessionManager) Create ¶
func (s StubSessionManager) Create(ctx context.Context, opts session.CreateOpts) (*session.Session, error)
func (StubSessionManager) CreateAccepted ¶
func (s StubSessionManager) CreateAccepted( ctx context.Context, opts session.CreateAcceptedOpts, ) (*session.Info, error)
func (StubSessionManager) CreateWorktreeForkAccepted ¶
func (s StubSessionManager) CreateWorktreeForkAccepted( ctx context.Context, originSessionID string, opts session.CreateAcceptedOpts, ) (*session.Info, error)
func (StubSessionManager) Delete ¶
func (s StubSessionManager) Delete(ctx context.Context, id string) error
func (StubSessionManager) Deliveries ¶
func (s StubSessionManager) Deliveries(ctx context.Context, id string) ([]session.DeliveryEventEnvelope, error)
func (StubSessionManager) DerivePreview ¶
func (s StubSessionManager) DerivePreview( ctx context.Context, workspaceID string, sourceSessionID string, messageID string, ) (session.DerivePreview, error)
DerivePreview delegates to DerivePreviewFn.
func (StubSessionManager) DetachSession ¶
func (s StubSessionManager) DetachSession( ctx context.Context, workspaceID string, sessionID string, ) (*session.Info, error)
DetachSession delegates to DetachSessionFn or reports a missing session.
func (StubSessionManager) EventMetadata ¶
func (s StubSessionManager) EventMetadata( ctx context.Context, id string, query store.EventQuery, ) ([]store.EventMetadata, error)
func (StubSessionManager) Events ¶
func (s StubSessionManager) Events( ctx context.Context, id string, query store.EventQuery, ) ([]store.SessionEvent, error)
func (StubSessionManager) ForkSession ¶
func (s StubSessionManager) ForkSession( ctx context.Context, opts session.ForkSessionOpts, ) (session.DeriveResult, error)
ForkSession delegates to ForkFn.
func (StubSessionManager) History ¶
func (s StubSessionManager) History( ctx context.Context, id string, query store.EventQuery, ) ([]store.TurnHistory, error)
func (StubSessionManager) InputQueueSummary ¶
func (s StubSessionManager) InputQueueSummary(ctx context.Context, id string) (session.InputQueueSummary, error)
func (StubSessionManager) LatestSessionEventByType ¶
func (s StubSessionManager) LatestSessionEventByType( ctx context.Context, id string, eventType string, ) (*store.SessionEvent, error)
func (StubSessionManager) LatestSettledTurn ¶
func (s StubSessionManager) LatestSettledTurn(ctx context.Context, id string) (session.SettledTurn, error)
func (StubSessionManager) List ¶
func (s StubSessionManager) List() []*session.Info
func (StubSessionManager) ListForWorkspace ¶
func (StubSessionManager) ListPendingInputs ¶
func (s StubSessionManager) ListPendingInputs( ctx context.Context, id string, ) ([]session.PendingInput, error)
func (StubSessionManager) ListSessions ¶
func (s StubSessionManager) ListSessions( ctx context.Context, query store.SessionListQuery, ) ([]store.SessionInfo, error)
func (StubSessionManager) PendingInteractions ¶
func (s StubSessionManager) PendingInteractions( ctx context.Context, sessionID string, statuses []string, ) ([]store.PendingInteraction, error)
PendingInteractions lists a test session's durable interaction projection.
func (StubSessionManager) PromotePendingInputToSteer ¶
func (s StubSessionManager) PromotePendingInputToSteer( ctx context.Context, id string, entryID string, opts session.PromotePendingInputOpts, ) (session.SendPromptResult, error)
func (StubSessionManager) Prompt ¶
func (s StubSessionManager) Prompt(ctx context.Context, id string, msg string) (<-chan acp.AgentEvent, error)
func (StubSessionManager) PromptSynthetic ¶
func (s StubSessionManager) PromptSynthetic( ctx context.Context, id string, opts session.SyntheticPromptOpts, ) (<-chan acp.AgentEvent, error)
func (StubSessionManager) PromptWithOpts ¶
func (s StubSessionManager) PromptWithOpts( ctx context.Context, id string, opts session.PromptOpts, ) (<-chan acp.AgentEvent, error)
func (StubSessionManager) RepairSession ¶
func (s StubSessionManager) RepairSession( ctx context.Context, opts session.RepairOpts, ) (*session.RepairResult, error)
func (StubSessionManager) ReplacePendingInput ¶
func (s StubSessionManager) ReplacePendingInput( ctx context.Context, id string, entryID string, opts session.ReplacePendingInputOpts, ) (session.PendingInput, error)
func (StubSessionManager) RequestCompaction ¶
func (s StubSessionManager) RequestCompaction( ctx context.Context, id string, ) (session.CompactionRequestResult, <-chan acp.AgentEvent, error)
func (StubSessionManager) RewindConversation ¶
func (s StubSessionManager) RewindConversation( ctx context.Context, id string, opts session.ConversationRewindOptions, ) (session.ConversationRewindResult, error)
func (StubSessionManager) SendPrompt ¶
func (s StubSessionManager) SendPrompt( ctx context.Context, id string, opts session.SendPromptOpts, ) (session.SendPromptResult, error)
func (StubSessionManager) SessionOwner ¶
func (s StubSessionManager) SessionOwner(ctx context.Context, id string) (store.SessionOwner, error)
SessionOwner delegates to SessionOwnerFn, else derives the owner from Status.
func (StubSessionManager) SessionPresence ¶
func (s StubSessionManager) SessionPresence( ctx context.Context, sessionID string, leaseID string, visible bool, ) (string, error)
SessionPresence acquires, renews, or releases a test presence lease.
func (StubSessionManager) SetRuntimeSelection ¶
func (s StubSessionManager) SetRuntimeSelection( ctx context.Context, id string, selection session.RuntimeSelection, expectedRevision int64, ) (*session.Info, error)
func (StubSessionManager) SteerPrompt ¶
func (s StubSessionManager) SteerPrompt( ctx context.Context, id string, opts session.SteerPromptOpts, ) (session.SendPromptResult, error)
func (StubSessionManager) Stop ¶
func (s StubSessionManager) Stop(ctx context.Context, id string) error
func (StubSessionManager) StopWithCause ¶
func (StubSessionManager) SubscribeSessionCatalogEvents ¶
func (s StubSessionManager) SubscribeSessionCatalogEvents( ctx context.Context, scope session.CatalogScope, ) (<-chan session.CatalogEvent, func(), error)
func (StubSessionManager) TranscriptChanges ¶
func (s StubSessionManager) TranscriptChanges( ctx context.Context, id string, query transcript.ChangeQuery, ) (transcript.ChangePage, error)
func (StubSessionManager) TranscriptPage ¶
func (s StubSessionManager) TranscriptPage( ctx context.Context, id string, query transcript.PageQuery, ) (transcript.Page, error)
func (StubSessionManager) UsageEvents ¶
func (s StubSessionManager) UsageEvents(ctx context.Context, id string) ([]session.UsageEventEnvelope, error)
func (StubSessionManager) WaitForBadge ¶
func (s StubSessionManager) WaitForBadge( ctx context.Context, request session.WaitRequest, ) (session.WaitOutcome, error)
WaitForBadge returns the configured bounded test wait outcome.
func (StubSessionManager) WorkingDir ¶
type StubSkillsRegistry ¶
type StubSkillsRegistry struct {
GetFn func(name string) (*skills.Skill, bool)
ListFn func() []*skills.Skill
ForWorkspaceFn func(ctx context.Context, resolved *workspacepkg.ResolvedWorkspace) ([]*skills.Skill, error)
ForAgentFn func(
ctx context.Context,
resolved *workspacepkg.ResolvedWorkspace,
agentName string,
) ([]*skills.Skill, error)
ForAgentDefFn func(
ctx context.Context,
resolved *workspacepkg.ResolvedWorkspace,
agent compozyconfig.AgentDef,
) ([]*skills.Skill, error)
LoadContentFn func(ctx context.Context, skill *skills.Skill) (string, error)
LoadResourceFn func(ctx context.Context, skill *skills.Skill, relativePath string) (string, error)
SetEnabledFn func(name string, resolved *workspacepkg.ResolvedWorkspace, enabled bool) error
SetEnabledForAgentFn func(name string, resolved *workspacepkg.ResolvedWorkspace, agentName string, enabled bool) error
RefreshGlobalFn func(ctx context.Context) error
}
func (StubSkillsRegistry) ForAgent ¶
func (s StubSkillsRegistry) ForAgent( ctx context.Context, resolved *workspacepkg.ResolvedWorkspace, agentName string, ) ([]*skills.Skill, error)
func (StubSkillsRegistry) ForAgentDef ¶
func (s StubSkillsRegistry) ForAgentDef( ctx context.Context, resolved *workspacepkg.ResolvedWorkspace, agent compozyconfig.AgentDef, ) ([]*skills.Skill, error)
func (StubSkillsRegistry) ForWorkspace ¶
func (s StubSkillsRegistry) ForWorkspace( ctx context.Context, resolved *workspacepkg.ResolvedWorkspace, ) ([]*skills.Skill, error)
func (StubSkillsRegistry) List ¶
func (s StubSkillsRegistry) List() []*skills.Skill
func (StubSkillsRegistry) LoadContent ¶
func (StubSkillsRegistry) LoadResource ¶
func (StubSkillsRegistry) RefreshGlobal ¶
func (s StubSkillsRegistry) RefreshGlobal(ctx context.Context) error
func (StubSkillsRegistry) SetEnabled ¶
func (s StubSkillsRegistry) SetEnabled(name string, resolved *workspacepkg.ResolvedWorkspace, enabled bool) error
func (StubSkillsRegistry) SetEnabledForAgent ¶
func (s StubSkillsRegistry) SetEnabledForAgent( name string, resolved *workspacepkg.ResolvedWorkspace, agentName string, enabled bool, ) error
type StubTaskDesignationStore ¶
type StubTaskDesignationStore struct {
PutTaskDesignationRollupFn func(context.Context, store.TaskDesignationRollup) error
ListTaskDesignationRollupsFn func(
context.Context,
store.TaskDesignationRollupQuery,
) ([]store.TaskDesignationRollup, error)
}
StubTaskDesignationStore captures the task-owned fan-out persistence boundary.
func (StubTaskDesignationStore) ListTaskDesignationRollups ¶
func (s StubTaskDesignationStore) ListTaskDesignationRollups( ctx context.Context, query store.TaskDesignationRollupQuery, ) ([]store.TaskDesignationRollup, error)
func (StubTaskDesignationStore) PutTaskDesignationRollup ¶
func (s StubTaskDesignationStore) PutTaskDesignationRollup( ctx context.Context, rollup store.TaskDesignationRollup, ) error
type StubTaskManager ¶
type StubTaskManager struct {
CreateTaskFn func(context.Context, taskpkg.CreateTask, taskpkg.ActorContext) (*taskpkg.Task, error)
CreateChildTaskFn func(
context.Context,
string,
taskpkg.CreateTask,
taskpkg.ActorContext,
) (*taskpkg.Task, error)
DeleteTaskFn func(context.Context, string, taskpkg.ActorContext) error
UpdateTaskFn func(context.Context, string, taskpkg.Patch, taskpkg.ActorContext) (*taskpkg.Task, error)
PublishTaskFn func(
context.Context,
string,
taskpkg.ExecutionRequest,
taskpkg.ActorContext,
) (*taskpkg.Execution, error)
StartTaskFn func(
context.Context,
string,
taskpkg.ExecutionRequest,
taskpkg.ActorContext,
) (*taskpkg.Execution, error)
ApproveTaskFn func(
context.Context,
string,
taskpkg.ExecutionRequest,
taskpkg.ActorContext,
) (*taskpkg.Execution, error)
RejectTaskFn func(context.Context, string, taskpkg.ActorContext) (*taskpkg.Task, error)
CancelTaskFn func(
context.Context,
string,
taskpkg.CancelTask,
taskpkg.ActorContext,
) (*taskpkg.Task, error)
BlockTaskFn func(context.Context, taskpkg.BlockRequest, taskpkg.ActorContext) (taskpkg.TaskBlock, error)
ClearTaskBlockFn func(
context.Context,
string,
string,
string,
taskpkg.ActorContext,
) (taskpkg.TaskBlock, error)
RecoverTaskFn func(context.Context, string, string, taskpkg.ActorContext) (*taskpkg.Task, error)
ExpireTaskBlocksFn func(context.Context, time.Time, taskpkg.ActorContext) (taskpkg.ExpireTaskBlocksResult, error)
ListTaskBlocksFn func(context.Context, string, bool, taskpkg.ActorContext) ([]taskpkg.TaskBlock, error)
MarkTaskReadFn func(context.Context, string, taskpkg.ActorContext) (taskpkg.TriageState, error)
ArchiveTaskFn func(context.Context, string, taskpkg.ActorContext) (taskpkg.TriageState, error)
DismissTaskFn func(context.Context, string, taskpkg.ActorContext) (taskpkg.TriageState, error)
GetExecutionProfileFn func(
context.Context,
string,
taskpkg.ActorContext,
) (taskpkg.ExecutionProfile, error)
SetExecutionProfileFn func(
context.Context,
string,
*taskpkg.ExecutionProfile,
taskpkg.ActorContext,
) (taskpkg.ExecutionProfile, error)
SetWorktreePolicyFn func(
context.Context,
string,
taskpkg.WorktreePolicy,
taskpkg.ActorContext,
) (taskpkg.ExecutionProfile, error)
DeleteExecutionProfileFn func(context.Context, string, taskpkg.ActorContext) error
RequestRunReviewFn func(
context.Context,
taskpkg.RunReviewRequest,
taskpkg.ActorContext,
) (taskpkg.RunReview, bool, error)
GetRunReviewFn func(context.Context, string, taskpkg.ActorContext) (taskpkg.RunReview, error)
RecordRunReviewFn func(
context.Context,
taskpkg.RecordRunReviewRequest,
taskpkg.ActorContext,
) (taskpkg.RunReviewResult, error)
BindRunReviewSessionFn func(
context.Context,
taskpkg.BindRunReviewSessionRequest,
taskpkg.ActorContext,
) (taskpkg.RunReviewBinding, error)
ListRunReviewsFn func(context.Context, taskpkg.RunReviewQuery, taskpkg.ActorContext) ([]taskpkg.RunReview, error)
AddDependencyFn func(context.Context, taskpkg.AddDependency, taskpkg.ActorContext) error
RemoveDependencyFn func(context.Context, string, string, taskpkg.ActorContext) error
EnqueueRunFn func(context.Context, taskpkg.EnqueueRun, taskpkg.ActorContext) (*taskpkg.Run, error)
ClaimNextRunFn func(
context.Context,
taskpkg.ClaimCriteria,
taskpkg.ActorContext,
) (*taskpkg.ClaimResult, error)
StartRunFn func(context.Context, string, taskpkg.StartRun, taskpkg.ActorContext) (*taskpkg.Run, error)
AttachRunSessionFn func(context.Context, string, string, taskpkg.ActorContext) (*taskpkg.Run, error)
HeartbeatRunLeaseFn func(context.Context, taskpkg.LeaseHeartbeat, taskpkg.ActorContext) (*taskpkg.Run, error)
ReleaseRunLeaseFn func(context.Context, taskpkg.LeaseRelease, taskpkg.ActorContext) (*taskpkg.Run, error)
ForceReleaseRunFn forceReleaseRunFunc
ForceFailRunFn forceFailRunFunc
RetryRunFn retryRunFunc
RecoverRunFn recoverRunFunc
BulkForceReleaseRunsFn bulkForceRunFunc
BulkForceFailRunsFn bulkForceRunFunc
PauseTaskFn pauseTaskFunc
ResumeTaskFn resumeTaskFunc
SchedulerStatusFn func(context.Context, taskpkg.ActorContext) (taskpkg.SchedulerStatus, error)
PauseSchedulerFn func(
context.Context,
taskpkg.SchedulerPauseRequest,
taskpkg.ActorContext,
) (taskpkg.SchedulerStatus, error)
ResumeSchedulerFn func(
context.Context,
taskpkg.SchedulerResumeRequest,
taskpkg.ActorContext,
) (taskpkg.SchedulerStatus, error)
DrainSchedulerFn func(
context.Context,
taskpkg.SchedulerDrainRequest,
taskpkg.ActorContext,
) (taskpkg.SchedulerDrainResult, error)
SchedulerBacklogFn func(
context.Context,
taskpkg.SchedulerBacklogQuery,
taskpkg.ActorContext,
) (taskpkg.SchedulerBacklog, error)
CompleteRunLeaseFn func(context.Context, taskpkg.LeaseCompletion, taskpkg.ActorContext) (*taskpkg.Run, error)
FailRunLeaseFn func(context.Context, taskpkg.LeaseFailure, taskpkg.ActorContext) (*taskpkg.Run, error)
LookupActiveRunForSessionFn func(
context.Context,
string,
string,
) (taskpkg.AutonomyLeaseHandle, error)
CompleteRunFn func(context.Context, string, taskpkg.RunResult, taskpkg.ActorContext) (*taskpkg.Run, error)
FailRunFn func(context.Context, string, taskpkg.RunFailure, taskpkg.ActorContext) (*taskpkg.Run, error)
CancelRunFn func(context.Context, string, taskpkg.CancelRun, taskpkg.ActorContext) (*taskpkg.Run, error)
RecoverExpiredRunLeasesFn func(
context.Context,
taskpkg.ExpiredLeaseRecovery,
taskpkg.ActorContext,
) ([]taskpkg.ExpiredLeaseRecoveryResult, error)
GetTaskFn func(context.Context, string, taskpkg.ActorContext) (*taskpkg.View, error)
InspectTaskFn func(context.Context, string, taskpkg.ActorContext) (*taskpkg.InspectView, error)
InspectRunFn func(context.Context, string, taskpkg.ActorContext) (*taskpkg.InspectView, error)
ReadTaskRunResultFn func(
context.Context,
string,
int64,
int64,
taskpkg.ActorContext,
) (taskpkg.RunResultPage, error)
ListTaskRunsFn func(context.Context, string, taskpkg.RunQuery, taskpkg.ActorContext) ([]taskpkg.Run, error)
ListTasksFn func(context.Context, taskpkg.Query, taskpkg.ActorContext) ([]taskpkg.Summary, error)
ListTaskCatalogFn func(
context.Context,
taskpkg.CatalogQuery,
taskpkg.ActorContext,
) (taskpkg.CatalogPage, error)
TimelineFn func(
context.Context,
string,
taskpkg.TimelineQuery,
taskpkg.ActorContext,
) ([]taskpkg.TimelineItem, error)
StreamFn func(
context.Context,
string,
taskpkg.StreamQuery,
taskpkg.ActorContext,
) (<-chan taskpkg.StreamEvent, error)
TreeFn func(context.Context, string, taskpkg.ActorContext) (*taskpkg.TreeView, error)
RunDetailFn func(context.Context, string, taskpkg.ActorContext) (*taskpkg.RunDetailView, error)
}
func (*StubTaskManager) AddDependency ¶
func (s *StubTaskManager) AddDependency( ctx context.Context, spec taskpkg.AddDependency, actor taskpkg.ActorContext, ) error
func (*StubTaskManager) ApproveTask ¶
func (s *StubTaskManager) ApproveTask( ctx context.Context, id string, req taskpkg.ExecutionRequest, actor taskpkg.ActorContext, ) (*taskpkg.Execution, error)
func (*StubTaskManager) ArchiveTask ¶
func (s *StubTaskManager) ArchiveTask( ctx context.Context, id string, actor taskpkg.ActorContext, ) (taskpkg.TriageState, error)
func (*StubTaskManager) AttachRunSession ¶
func (s *StubTaskManager) AttachRunSession( ctx context.Context, runID string, sessionID string, actor taskpkg.ActorContext, ) (*taskpkg.Run, error)
func (*StubTaskManager) BindRunReviewSession ¶
func (s *StubTaskManager) BindRunReviewSession( ctx context.Context, req taskpkg.BindRunReviewSessionRequest, actor taskpkg.ActorContext, ) (taskpkg.RunReviewBinding, error)
func (*StubTaskManager) BlockTask ¶
func (s *StubTaskManager) BlockTask( ctx context.Context, req taskpkg.BlockRequest, actor taskpkg.ActorContext, ) (taskpkg.TaskBlock, error)
func (*StubTaskManager) BulkForceFailRuns ¶
func (s *StubTaskManager) BulkForceFailRuns( ctx context.Context, req taskpkg.BulkForceRunRequest, actor taskpkg.ActorContext, ) (taskpkg.BulkForceRunResult, error)
func (*StubTaskManager) BulkForceReleaseRuns ¶
func (s *StubTaskManager) BulkForceReleaseRuns( ctx context.Context, req taskpkg.BulkForceRunRequest, actor taskpkg.ActorContext, ) (taskpkg.BulkForceRunResult, error)
func (*StubTaskManager) CancelTask ¶
func (s *StubTaskManager) CancelTask( ctx context.Context, id string, req taskpkg.CancelTask, actor taskpkg.ActorContext, ) (*taskpkg.Task, error)
func (*StubTaskManager) ClaimNextRun ¶
func (s *StubTaskManager) ClaimNextRun( ctx context.Context, criteria taskpkg.ClaimCriteria, actor taskpkg.ActorContext, ) (*taskpkg.ClaimResult, error)
func (*StubTaskManager) ClearTaskBlock ¶
func (*StubTaskManager) CompleteRun ¶
func (*StubTaskManager) CompleteRunLease ¶
func (s *StubTaskManager) CompleteRunLease( ctx context.Context, completion taskpkg.LeaseCompletion, actor taskpkg.ActorContext, ) (*taskpkg.Run, error)
func (*StubTaskManager) CreateChildTask ¶
func (s *StubTaskManager) CreateChildTask( ctx context.Context, parentTaskID string, spec taskpkg.CreateTask, actor taskpkg.ActorContext, ) (*taskpkg.Task, error)
func (*StubTaskManager) CreateTask ¶
func (s *StubTaskManager) CreateTask( ctx context.Context, spec taskpkg.CreateTask, actor taskpkg.ActorContext, ) (*taskpkg.Task, error)
func (*StubTaskManager) DeleteExecutionProfile ¶
func (s *StubTaskManager) DeleteExecutionProfile( ctx context.Context, taskID string, actor taskpkg.ActorContext, ) error
func (*StubTaskManager) DeleteTask ¶
func (s *StubTaskManager) DeleteTask( ctx context.Context, id string, actor taskpkg.ActorContext, ) error
func (*StubTaskManager) DismissTask ¶
func (s *StubTaskManager) DismissTask( ctx context.Context, id string, actor taskpkg.ActorContext, ) (taskpkg.TriageState, error)
func (*StubTaskManager) DrainScheduler ¶
func (s *StubTaskManager) DrainScheduler( ctx context.Context, req taskpkg.SchedulerDrainRequest, actor taskpkg.ActorContext, ) (taskpkg.SchedulerDrainResult, error)
func (*StubTaskManager) EnqueueRun ¶
func (s *StubTaskManager) EnqueueRun( ctx context.Context, spec taskpkg.EnqueueRun, actor taskpkg.ActorContext, ) (*taskpkg.Run, error)
func (*StubTaskManager) ExpireTaskBlocks ¶
func (s *StubTaskManager) ExpireTaskBlocks( ctx context.Context, now time.Time, actor taskpkg.ActorContext, ) (taskpkg.ExpireTaskBlocksResult, error)
func (*StubTaskManager) FailRun ¶
func (s *StubTaskManager) FailRun( ctx context.Context, runID string, failure taskpkg.RunFailure, actor taskpkg.ActorContext, ) (*taskpkg.Run, error)
func (*StubTaskManager) FailRunLease ¶
func (s *StubTaskManager) FailRunLease( ctx context.Context, failure taskpkg.LeaseFailure, actor taskpkg.ActorContext, ) (*taskpkg.Run, error)
func (*StubTaskManager) ForceFailRun ¶
func (s *StubTaskManager) ForceFailRun( ctx context.Context, runID string, failure taskpkg.ForceFailRun, actor taskpkg.ActorContext, ) (*taskpkg.Run, error)
func (*StubTaskManager) ForceReleaseRun ¶
func (s *StubTaskManager) ForceReleaseRun( ctx context.Context, runID string, release taskpkg.ForceReleaseRun, actor taskpkg.ActorContext, ) (*taskpkg.Run, error)
func (*StubTaskManager) GetExecutionProfile ¶
func (s *StubTaskManager) GetExecutionProfile( ctx context.Context, taskID string, actor taskpkg.ActorContext, ) (taskpkg.ExecutionProfile, error)
func (*StubTaskManager) GetRunReview ¶
func (s *StubTaskManager) GetRunReview( ctx context.Context, reviewID string, actor taskpkg.ActorContext, ) (taskpkg.RunReview, error)
func (*StubTaskManager) GetTask ¶
func (s *StubTaskManager) GetTask( ctx context.Context, id string, actor taskpkg.ActorContext, ) (*taskpkg.View, error)
func (*StubTaskManager) HeartbeatRunLease ¶
func (s *StubTaskManager) HeartbeatRunLease( ctx context.Context, heartbeat taskpkg.LeaseHeartbeat, actor taskpkg.ActorContext, ) (*taskpkg.Run, error)
func (*StubTaskManager) InspectRun ¶
func (s *StubTaskManager) InspectRun( ctx context.Context, runID string, actor taskpkg.ActorContext, ) (*taskpkg.InspectView, error)
func (*StubTaskManager) InspectTask ¶
func (s *StubTaskManager) InspectTask( ctx context.Context, taskID string, actor taskpkg.ActorContext, ) (*taskpkg.InspectView, error)
func (*StubTaskManager) ListRunReviews ¶
func (s *StubTaskManager) ListRunReviews( ctx context.Context, query taskpkg.RunReviewQuery, actor taskpkg.ActorContext, ) ([]taskpkg.RunReview, error)
func (*StubTaskManager) ListTaskBlocks ¶
func (s *StubTaskManager) ListTaskBlocks( ctx context.Context, taskID string, includeCleared bool, actor taskpkg.ActorContext, ) ([]taskpkg.TaskBlock, error)
func (*StubTaskManager) ListTaskCatalog ¶
func (s *StubTaskManager) ListTaskCatalog( ctx context.Context, query taskpkg.CatalogQuery, actor taskpkg.ActorContext, ) (taskpkg.CatalogPage, error)
ListTaskCatalog exposes the bounded catalog seam through the most specific configured callback.
func (*StubTaskManager) ListTaskRuns ¶
func (*StubTaskManager) ListTasks ¶
func (s *StubTaskManager) ListTasks( ctx context.Context, query taskpkg.Query, actor taskpkg.ActorContext, ) ([]taskpkg.Summary, error)
ListTasks exposes the unpaged task-list seam used by internal lifecycle tests.
func (*StubTaskManager) LookupActiveRunForSession ¶
func (s *StubTaskManager) LookupActiveRunForSession( ctx context.Context, sessionID string, runID string, ) (taskpkg.AutonomyLeaseHandle, error)
func (*StubTaskManager) LookupRunReviewForSession ¶
func (s *StubTaskManager) LookupRunReviewForSession( _ context.Context, _ string, _ taskpkg.ActorContext, ) (taskpkg.RunReviewBinding, error)
func (*StubTaskManager) MarkTaskRead ¶
func (s *StubTaskManager) MarkTaskRead( ctx context.Context, id string, actor taskpkg.ActorContext, ) (taskpkg.TriageState, error)
func (*StubTaskManager) PauseScheduler ¶
func (s *StubTaskManager) PauseScheduler( ctx context.Context, req taskpkg.SchedulerPauseRequest, actor taskpkg.ActorContext, ) (taskpkg.SchedulerStatus, error)
func (*StubTaskManager) PauseTask ¶
func (s *StubTaskManager) PauseTask( ctx context.Context, taskID string, req taskpkg.PauseTaskRequest, actor taskpkg.ActorContext, ) (*taskpkg.Task, error)
func (*StubTaskManager) PublishTask ¶
func (s *StubTaskManager) PublishTask( ctx context.Context, id string, req taskpkg.ExecutionRequest, actor taskpkg.ActorContext, ) (*taskpkg.Execution, error)
func (*StubTaskManager) ReadTaskRunResult ¶
func (s *StubTaskManager) ReadTaskRunResult( ctx context.Context, runID string, offset int64, limit int64, actor taskpkg.ActorContext, ) (taskpkg.RunResultPage, error)
func (*StubTaskManager) RecordRunReview ¶
func (s *StubTaskManager) RecordRunReview( ctx context.Context, req taskpkg.RecordRunReviewRequest, actor taskpkg.ActorContext, ) (taskpkg.RunReviewResult, error)
func (*StubTaskManager) RecoverExpiredRunLeases ¶
func (s *StubTaskManager) RecoverExpiredRunLeases( ctx context.Context, recovery taskpkg.ExpiredLeaseRecovery, actor taskpkg.ActorContext, ) ([]taskpkg.ExpiredLeaseRecoveryResult, error)
func (*StubTaskManager) RecoverRun ¶
func (s *StubTaskManager) RecoverRun( ctx context.Context, runID string, req taskpkg.RecoverRunRequest, actor taskpkg.ActorContext, ) (*taskpkg.RetryRunResult, error)
func (*StubTaskManager) RecoverTask ¶
func (s *StubTaskManager) RecoverTask( ctx context.Context, id string, note string, actor taskpkg.ActorContext, ) (*taskpkg.Task, error)
func (*StubTaskManager) RejectTask ¶
func (s *StubTaskManager) RejectTask( ctx context.Context, id string, actor taskpkg.ActorContext, ) (*taskpkg.Task, error)
func (*StubTaskManager) ReleaseRunLease ¶
func (s *StubTaskManager) ReleaseRunLease( ctx context.Context, release taskpkg.LeaseRelease, actor taskpkg.ActorContext, ) (*taskpkg.Run, error)
func (*StubTaskManager) RemoveDependency ¶
func (s *StubTaskManager) RemoveDependency( ctx context.Context, taskID string, dependsOnID string, actor taskpkg.ActorContext, ) error
func (*StubTaskManager) RequestRunReview ¶
func (s *StubTaskManager) RequestRunReview( ctx context.Context, req taskpkg.RunReviewRequest, actor taskpkg.ActorContext, ) (taskpkg.RunReview, bool, error)
func (*StubTaskManager) ResumeScheduler ¶
func (s *StubTaskManager) ResumeScheduler( ctx context.Context, req taskpkg.SchedulerResumeRequest, actor taskpkg.ActorContext, ) (taskpkg.SchedulerStatus, error)
func (*StubTaskManager) ResumeTask ¶
func (s *StubTaskManager) ResumeTask( ctx context.Context, taskID string, req taskpkg.ResumeTaskRequest, actor taskpkg.ActorContext, ) (*taskpkg.Task, error)
func (*StubTaskManager) RetryRun ¶
func (s *StubTaskManager) RetryRun( ctx context.Context, runID string, retry taskpkg.RetryRunRequest, actor taskpkg.ActorContext, ) (*taskpkg.RetryRunResult, error)
func (*StubTaskManager) RunDetail ¶
func (s *StubTaskManager) RunDetail( ctx context.Context, runID string, actor taskpkg.ActorContext, ) (*taskpkg.RunDetailView, error)
func (*StubTaskManager) SchedulerBacklog ¶
func (s *StubTaskManager) SchedulerBacklog( ctx context.Context, query taskpkg.SchedulerBacklogQuery, actor taskpkg.ActorContext, ) (taskpkg.SchedulerBacklog, error)
func (*StubTaskManager) SchedulerStatus ¶
func (s *StubTaskManager) SchedulerStatus( ctx context.Context, actor taskpkg.ActorContext, ) (taskpkg.SchedulerStatus, error)
func (*StubTaskManager) SetExecutionProfile ¶
func (s *StubTaskManager) SetExecutionProfile( ctx context.Context, taskID string, profile *taskpkg.ExecutionProfile, actor taskpkg.ActorContext, ) (taskpkg.ExecutionProfile, error)
func (*StubTaskManager) SetWorktreePolicy ¶
func (s *StubTaskManager) SetWorktreePolicy( ctx context.Context, taskID string, policy taskpkg.WorktreePolicy, actor taskpkg.ActorContext, ) (taskpkg.ExecutionProfile, error)
func (*StubTaskManager) StartTask ¶
func (s *StubTaskManager) StartTask( ctx context.Context, id string, req taskpkg.ExecutionRequest, actor taskpkg.ActorContext, ) (*taskpkg.Execution, error)
func (*StubTaskManager) Stream ¶
func (s *StubTaskManager) Stream( ctx context.Context, taskID string, query taskpkg.StreamQuery, actor taskpkg.ActorContext, ) (<-chan taskpkg.StreamEvent, error)
func (*StubTaskManager) Timeline ¶
func (s *StubTaskManager) Timeline( ctx context.Context, taskID string, query taskpkg.TimelineQuery, actor taskpkg.ActorContext, ) ([]taskpkg.TimelineItem, error)
func (*StubTaskManager) Tree ¶
func (s *StubTaskManager) Tree( ctx context.Context, taskID string, actor taskpkg.ActorContext, ) (*taskpkg.TreeView, error)
func (*StubTaskManager) UpdateTask ¶
type StubWorkspaceAccessPolicy ¶
type StubWorkspaceAccessPolicy struct {
AuthorizeFn func(context.Context, workspaceaccess.Request) (workspaceaccess.Decision, error)
}
StubWorkspaceAccessPolicy exposes a focused policy seam for transport tests.
func (StubWorkspaceAccessPolicy) Authorize ¶
func (s StubWorkspaceAccessPolicy) Authorize( ctx context.Context, req workspaceaccess.Request, ) (workspaceaccess.Decision, error)
Authorize delegates to AuthorizeFn and denies when no behavior is configured.
type StubWorkspaceService ¶
type StubWorkspaceService struct {
RegisterFn func(context.Context, workspacepkg.RegisterOptions) (workspacepkg.Workspace, error)
UnregisterFn func(context.Context, string) error
UpdateFn func(context.Context, string, workspacepkg.UpdateOptions) error
ListFn func(context.Context) ([]workspacepkg.Workspace, error)
GetFn func(context.Context, string) (workspacepkg.Workspace, error)
ResolveFn func(context.Context, string) (workspacepkg.ResolvedWorkspace, error)
ResolveForProfileFn func(context.Context, string, string) (workspacepkg.ResolvedWorkspace, error)
ResolveOrRegisterFn func(context.Context, string) (workspacepkg.ResolvedWorkspace, error)
}
func (StubWorkspaceService) Get ¶
func (s StubWorkspaceService) Get(ctx context.Context, ref string) (workspacepkg.Workspace, error)
func (StubWorkspaceService) List ¶
func (s StubWorkspaceService) List(ctx context.Context) ([]workspacepkg.Workspace, error)
func (StubWorkspaceService) Register ¶
func (s StubWorkspaceService) Register( ctx context.Context, opts workspacepkg.RegisterOptions, ) (workspacepkg.Workspace, error)
func (StubWorkspaceService) Resolve ¶
func (s StubWorkspaceService) Resolve(ctx context.Context, ref string) (workspacepkg.ResolvedWorkspace, error)
func (StubWorkspaceService) ResolveForProfile ¶
func (s StubWorkspaceService) ResolveForProfile( ctx context.Context, ref string, profileName string, ) (workspacepkg.ResolvedWorkspace, error)
func (StubWorkspaceService) ResolveOrRegister ¶
func (s StubWorkspaceService) ResolveOrRegister( ctx context.Context, path string, ) (workspacepkg.ResolvedWorkspace, error)
func (StubWorkspaceService) Unregister ¶
func (s StubWorkspaceService) Unregister(ctx context.Context, id string) error
func (StubWorkspaceService) Update ¶
func (s StubWorkspaceService) Update(ctx context.Context, id string, opts workspacepkg.UpdateOptions) error
Source Files
¶
- apitest.go
- automation_stub.go
- config.go
- extension_stub.go
- home_helpers.go
- http_helpers.go
- logger.go
- observer_stub.go
- resource_stub.go
- session_attention_stub.go
- session_fixtures.go
- session_stub.go
- session_stub_archive.go
- session_stub_context.go
- session_stub_events.go
- session_stub_page.go
- session_stub_prompt.go
- session_stub_reparent.go
- session_stub_runtime.go
- session_stub_store_info.go
- skills_stub.go
- sse.go
- task_designations_stub.go
- task_loop_catalog.go
- task_stub.go
- task_stub_catalog.go
- task_stub_query.go
- task_stub_review.go
- task_stub_run_completion.go
- task_stub_run_queue.go
- task_stub_scheduler.go
- transport_routes.go
- window_manager_stub.go
- workspace_access_stub.go
- workspace_stub.go
- worktree_routes.go