Documentation
¶
Overview ¶
Package app wires together adapters and services from configuration.
Index ¶
- func BuildGithubAdapter(ctx context.Context, cfg *config.Config, repos adapter.ReviewArtifactRepos) (*githubadapter.GithubAdapter, string)
- func BuildRepoLifecycleAdapters(ctx context.Context, cfg *config.Config, workspaceDir string, ...) []adapter.RepoLifecycleAdapter
- func BuildRepoSources(ctx context.Context, cfg *config.Config) []adapter.RepoSource
- func BuildReviewCommentFetcher(cfg *config.Config, workspaceDir string, ...) *adapter.ReviewCommentDispatcher
- func BuildWorkItemAdapters(cfg *config.Config, workspaceID string, workItemSvc *service.SessionService, ...) ([]adapter.WorkItemAdapter, []string)
- type AgentHarnesses
- type HarnessCandidateFailure
- type HarnessDiagnostics
- type HarnessPhaseDiagnostic
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildGithubAdapter ¶ added in v0.0.31
func BuildGithubAdapter(ctx context.Context, cfg *config.Config, repos adapter.ReviewArtifactRepos) (*githubadapter.GithubAdapter, string)
BuildGithubAdapter constructs a single shared *GithubAdapter that satisfies WorkItemAdapter, RepoLifecycleAdapter, and ReviewCommentFetcher. Returns (nil, warning) when GitHub auth is not configured or initialization fails. Callers MUST surface the warning via Services.StartupWarnings.
func BuildRepoLifecycleAdapters ¶
func BuildRepoLifecycleAdapters( ctx context.Context, cfg *config.Config, workspaceDir string, repos adapter.ReviewArtifactRepos, githubAdapter *githubadapter.GithubAdapter, ) []adapter.RepoLifecycleAdapter
BuildRepoLifecycleAdapters constructs repo lifecycle adapters for the current workspace. The shared GitHub adapter (when non-nil) is used for the GitHub platform branch; callers construct it via BuildGithubAdapter and surface its warning via StartupWarnings.
func BuildRepoSources ¶
BuildRepoSources constructs the ordered list of repo sources for the Add Repo overlay. GitHub and GitLab sources are added when their auth is configured; init failures are logged and skipped so a single broken provider does not block the overlay from showing the others. Manual URL entry is handled separately via the overlay's Ctrl+N input and needs no source entry here.
func BuildReviewCommentFetcher ¶ added in v0.0.30
func BuildReviewCommentFetcher(cfg *config.Config, workspaceDir string, githubAdapter *githubadapter.GithubAdapter) *adapter.ReviewCommentDispatcher
BuildReviewCommentFetcher constructs a dispatcher capable of fetching unresolved review comments from every configured provider. The dispatcher is safe to use even when a provider is not configured — it returns a descriptive error for unknown providers. The shared GitHub adapter (when non-nil) is used for the GitHub fetcher; callers construct it via BuildGithubAdapter and surface its warning separately via StartupWarnings.
func BuildWorkItemAdapters ¶
func BuildWorkItemAdapters( cfg *config.Config, workspaceID string, workItemSvc *service.SessionService, githubAdapter *githubadapter.GithubAdapter, ) ([]adapter.WorkItemAdapter, []string)
BuildWorkItemAdapters constructs all available WorkItemAdapters for the given configuration and workspace. The manual adapter is always included. The linear adapter is included when an API key is present in configuration. The second return value contains human-readable warnings for adapters that were detected but could not be initialised (e.g. missing organisation). The shared GitHub adapter (when non-nil) is appended; callers construct it via BuildGithubAdapter and surface its warning separately via StartupWarnings.
Types ¶
type AgentHarnesses ¶
type AgentHarnesses struct {
Planning adapter.AgentHarness
Implementation adapter.AgentHarness
Review adapter.AgentHarness
Foreman adapter.AgentHarness
Resume adapter.AgentHarness
}
func BuildAgentHarnesses ¶
func BuildAgentHarnesses(cfg *config.Config, workspaceRoot string) (AgentHarnesses, error)
type HarnessCandidateFailure ¶
type HarnessCandidateFailure struct {
Harness config.HarnessName
Message string
}
func (HarnessCandidateFailure) SettingsReason ¶
func (f HarnessCandidateFailure) SettingsReason() string
type HarnessDiagnostics ¶
type HarnessDiagnostics struct {
Phases []HarnessPhaseDiagnostic
}
func DiagnoseHarnesses ¶
func DiagnoseHarnesses(cfg *config.Config, workspaceRoot string) HarnessDiagnostics
func (HarnessDiagnostics) HarnessWarnings ¶
func (d HarnessDiagnostics) HarnessWarnings() map[config.HarnessName][]string
func (HarnessDiagnostics) HasWarnings ¶
func (d HarnessDiagnostics) HasWarnings() bool
func (HarnessDiagnostics) PhaseWarnings ¶
func (d HarnessDiagnostics) PhaseWarnings() []string
func (HarnessDiagnostics) WarningSummary ¶
func (d HarnessDiagnostics) WarningSummary() string
type HarnessPhaseDiagnostic ¶
type HarnessPhaseDiagnostic struct {
Phase string
Available bool
Failures []HarnessCandidateFailure
}