Documentation
¶
Overview ¶
Package app owns GitContribute use cases and capability composition.
Service methods are the shared application boundary for the CLI, MCP server, and terminal UI. Methods that read the corpus remain offline; methods that access GitHub, write local state, invoke git, or execute validation commands expose those effects explicitly. Product rules belong here rather than in a presentation adapter.
Index ¶
- Constants
- func NewRuntimeContract(version string) (*cli.RuntimeContractResult, error)
- type CollisionCheckResult
- type DuplicateCandidatesResult
- type DuplicateCheckResult
- type EvidenceSummary
- type ExplainMatchResult
- type HydrateOptions
- type HydrateRepositoryOptions
- type HydrateResult
- type HydratedFacet
- type JobExecutor
- func (e *JobExecutor) Cancel(ctx context.Context, id string) error
- func (e *JobExecutor) Close() error
- func (e *JobExecutor) Get(ctx context.Context, id string) (*corpus.Job, error)
- func (e *JobExecutor) List(ctx context.Context, status string, limit int) ([]corpus.Job, error)
- func (e *JobExecutor) Submit(ctx context.Context, kind string, request any, fn JobFunc) (string, error)
- type JobFunc
- type MCPReader
- func (r *MCPReader) BuildRepositoryDossier(ctx context.Context, in mcpserver.BuildRepositoryDossierInput) (mcpserver.JobReference, error)
- func (r *MCPReader) CancelJobs(ctx context.Context, in mcpserver.CancelJobInput) (mcpserver.GetJobsOutput, error)
- func (r *MCPReader) CheckCollisions(ctx context.Context, in mcpserver.CheckCollisionsInput) (mcpserver.CheckOutput, error)
- func (r *MCPReader) CheckDuplicates(ctx context.Context, in mcpserver.CheckDuplicatesInput) (mcpserver.CheckOutput, error)
- func (r *MCPReader) CheckMergeConflicts(ctx context.Context, in mcpserver.CheckMergeConflictsInput) (mcpserver.CheckMergeConflictsOutput, error)
- func (r *MCPReader) CreateWorkspace(ctx context.Context, in mcpserver.CreateWorkspaceInput) (mcpserver.JobReference, error)
- func (r *MCPReader) DeepWiki(ctx context.Context, in mcpserver.DeepWikiInput) (mcpserver.DeepWikiOutput, error)
- func (r *MCPReader) DefineValidation(ctx context.Context, in mcpserver.DefineValidationInput) (mcpserver.ValidationOutput, error)
- func (r *MCPReader) Dossier(ctx context.Context, in mcpserver.RepoInput) (mcpserver.DossierOutput, error)
- func (r *MCPReader) Evidence(ctx context.Context, in mcpserver.EvidenceInput) (mcpserver.EvidenceOutput, error)
- func (r *MCPReader) ExplainMatch(ctx context.Context, in mcpserver.ExplainMatchInput) (mcpserver.ExplainMatchOutput, error)
- func (r *MCPReader) FindClusters(ctx context.Context, in mcpserver.FindClustersInput) (mcpserver.FindClustersOutput, error)
- func (r *MCPReader) FindNeighbors(ctx context.Context, in mcpserver.FindNeighborsInput) (mcpserver.FindNeighborsOutput, error)
- func (r *MCPReader) FindPortfolioOverlaps(ctx context.Context, in mcpserver.FindPortfolioOverlapsInput) (mcpserver.FindPortfolioOverlapsOutput, error)
- func (r *MCPReader) FindPrecedents(ctx context.Context, in mcpserver.FindPrecedentsInput) (mcpserver.FindPrecedentsOutput, error)
- func (r *MCPReader) GetAuthenticatedIdentity(ctx context.Context) (mcpserver.AuthenticatedIdentityOutput, error)
- func (r *MCPReader) GetCoverage(ctx context.Context, in mcpserver.GetCoverageInput) (mcpserver.GetCoverageOutput, error)
- func (r *MCPReader) GetJob(ctx context.Context, in mcpserver.GetJobInput) (mcpserver.GetJobOutput, error)
- func (r *MCPReader) GetJobs(ctx context.Context, in mcpserver.GetJobsInput) (mcpserver.GetJobsOutput, error)
- func (r *MCPReader) GetRepositories(ctx context.Context, in mcpserver.GetRepositoriesInput) (mcpserver.GetRepositoriesOutput, error)
- func (r *MCPReader) GetThreads(ctx context.Context, in mcpserver.GetThreadsInput) (mcpserver.GetThreadsOutput, error)
- func (r *MCPReader) HydrateThreads(ctx context.Context, in mcpserver.HydrateThreadsInput) (mcpserver.JobReference, error)
- func (r *MCPReader) IndexRepositories(ctx context.Context, in mcpserver.IndexRepositoriesInput) (mcpserver.JobReference, error)
- func (r *MCPReader) Investigation(ctx context.Context, in mcpserver.InvestigationInput) (mcpserver.InvestigationOutput, error)
- func (r *MCPReader) Lens(ctx context.Context, in mcpserver.LensInput) (mcpserver.LensOutput, error)
- func (r *MCPReader) LinkPullRequest(ctx context.Context, in mcpserver.LinkPullRequestInput) (mcpserver.LinkPullRequestOutput, error)
- func (r *MCPReader) ListOpportunities(ctx context.Context, in mcpserver.ListOpportunitiesInput) (mcpserver.ListOpportunitiesOutput, error)
- func (r *MCPReader) ListPullRequestPortfolio(ctx context.Context, in mcpserver.ListPullRequestPortfolioInput) (mcpserver.ListPullRequestPortfolioOutput, error)
- func (r *MCPReader) Opportunity(ctx context.Context, in mcpserver.OpportunityInput) (mcpserver.OpportunityOutput, error)
- func (r *MCPReader) PrepareContribution(ctx context.Context, in mcpserver.PrepareContributionInput) (mcpserver.DraftOutput, error)
- func (r *MCPReader) PromoteOpportunity(ctx context.Context, in mcpserver.PromoteOpportunityInput) (mcpserver.OpportunityOutput, error)
- func (r *MCPReader) RankOpportunities(ctx context.Context, in mcpserver.RankOpportunitiesInput) (mcpserver.RankOpportunitiesOutput, error)
- func (r *MCPReader) Readiness(ctx context.Context, in mcpserver.ReadinessInput) (mcpserver.ReadinessOutput, error)
- func (r *MCPReader) RecordHypothesis(ctx context.Context, in mcpserver.RecordHypothesisInput) (mcpserver.HypothesisOutput, error)
- func (r *MCPReader) Repository(ctx context.Context, in mcpserver.RepoInput) (mcpserver.RepositoryOutput, error)
- func (r *MCPReader) RunValidation(ctx context.Context, in mcpserver.RunValidationInput) (mcpserver.JobReference, error)
- func (r *MCPReader) Search(ctx context.Context, in mcpserver.SearchInput) (mcpserver.SearchOutput, error)
- func (r *MCPReader) SearchCode(ctx context.Context, in mcpserver.SearchCodeInput) (mcpserver.SearchCodeOutput, error)
- func (r *MCPReader) SearchGitHubRepositories(ctx context.Context, in mcpserver.SearchGitHubRepositoriesInput) (mcpserver.SearchGitHubRepositoriesOutput, error)
- func (r *MCPReader) SearchRepositories(ctx context.Context, in mcpserver.SearchRepositoriesInput) (mcpserver.SearchRepositoriesOutput, error)
- func (r *MCPReader) StartInvestigation(ctx context.Context, in mcpserver.StartInvestigationInput) (mcpserver.InvestigationOutput, error)
- func (r *MCPReader) SyncAuthoredPullRequests(ctx context.Context, in mcpserver.SyncAuthoredPullRequestsInput) (mcpserver.JobReference, error)
- func (r *MCPReader) SyncPullRequestStatus(ctx context.Context, in mcpserver.SyncPullRequestStatusInput) (mcpserver.JobReference, error)
- func (r *MCPReader) SyncRepositoryMetadata(ctx context.Context, in mcpserver.SyncRepositoryMetadataInput) (mcpserver.JobReference, error)
- func (r *MCPReader) SyncThreads(ctx context.Context, in mcpserver.SyncThreadsInput) (mcpserver.JobReference, error)
- func (r *MCPReader) Thread(ctx context.Context, in mcpserver.ThreadInput) (mcpserver.ThreadOutput, error)
- func (r *MCPReader) ThreadByNumber(ctx context.Context, in mcpserver.ThreadByNumberInput) (mcpserver.ThreadOutput, error)
- type MCPRunner
- type Neighbor
- type NeighborsResult
- type PrepareReviewReportInput
- type PullRequestCollision
- type PullRequestCollisionResult
- type RecordEvidenceInput
- type ReviewReport
- type ReviewStep
- type Service
- func (s *Service) Acquire(ctx context.Context, repo cli.RepoRef, remote string) (result *cli.AcquisitionResult, returnErr error)
- func (s *Service) AddCollectionMembers(ctx context.Context, name string, members []cli.CollectionMember) (*cli.CollectionResult, error)
- func (s *Service) AddGHArchiveSource(ctx context.Context, name string, events []string) (*cli.SourceResult, error)
- func (s *Service) AddHypothesis(ctx context.Context, investigationID, title, description, category string) (*cli.HypothesisResult, error)
- func (s *Service) AddLens(ctx context.Context, name string, def lens.Definition) (*cli.LensResult, error)
- func (s *Service) AddRepoSource(ctx context.Context, name string, refs []cli.RepoRef) (*cli.SourceResult, error)
- func (s *Service) AddSearchSource(ctx context.Context, name, query string) (*cli.SourceResult, error)
- func (s *Service) ApplyCodePrune(ctx context.Context, repo string, keepLatest int, expectedDelete []string) (*cli.CorpusPruneResult, error)
- func (s *Service) ApplyRepositoryRemoval(ctx context.Context, repo, expectedRevision string) (*cli.CorpusRepositoryRemovalResult, error)
- func (s *Service) ArchiveSync(ctx context.Context, repo cli.RepoRef, opts cli.ArchiveSyncOptions) (*cli.SyncResult, error)
- func (s *Service) ArchiveThreads(ctx context.Context, repo cli.RepoRef, kind, state string, limit int) (*cli.ThreadListResult, error)
- func (s *Service) BackupCorpus(ctx context.Context, destination string) (*cli.CorpusBackupResult, error)
- func (s *Service) BuildDossierForCLI(ctx context.Context, repo cli.RepoRef) (any, error)
- func (s *Service) BuildRepositoryDossier(ctx context.Context, repo cli.RepoRef) (*domain.Dossier, error)
- func (s *Service) CancelJob(ctx context.Context, id string) (*cli.JobResult, error)
- func (s *Service) CheckCollisionsForCLI(ctx context.Context, target, id string, limit int) (any, error)
- func (s *Service) CheckDuplicatesForCLI(ctx context.Context, target, id string, limit int) (any, error)
- func (s *Service) CheckHypothesisCollisions(ctx context.Context, hypothesisID string, limit int) (*CollisionCheckResult, error)
- func (s *Service) CheckHypothesisDuplicates(ctx context.Context, hypothesisID string, limit int) (*DuplicateCheckResult, error)
- func (s *Service) CheckOpportunityCollisions(ctx context.Context, opportunityID string, limit int) (*CollisionCheckResult, error)
- func (s *Service) CheckOpportunityDuplicates(ctx context.Context, opportunityID string, limit int) (*DuplicateCheckResult, error)
- func (s *Service) Close() error
- func (s *Service) Cluster(ctx context.Context, id string, limit int) (*cli.ClusterResult, error)
- func (s *Service) CompareValidation(ctx context.Context, baseRunID, candidateRunID string) (*cli.ValidationComparisonResult, error)
- func (s *Service) Configure(ctx context.Context, opts cli.ConfigureOptions) (*cli.ConfigureResult, error)
- func (s *Service) ContributionRadar(ctx context.Context, opts cli.RadarOptions) (*radar.Report, error)
- func (s *Service) ControlStatus(ctx context.Context) (*cli.ControlStatusResult, error)
- func (s *Service) Coverage(ctx context.Context, repo cli.RepoRef) (*cli.CoverageResult, error)
- func (s *Service) Crawl(ctx context.Context, name string, opts cli.CrawlOptions) (*cli.CrawlResult, error)
- func (s *Service) CreateCollection(ctx context.Context, name string) (*cli.CollectionResult, error)
- func (s *Service) CreateHypothesis(ctx context.Context, investigationID string, ...) (*investigation.Hypothesis, error)
- func (s *Service) CreateWorkspace(ctx context.Context, investigationID string, opts cli.WorkspaceCreateOptions) (*cli.WorkspaceResult, error)
- func (s *Service) DefineValidation(ctx context.Context, investigationID string, opts cli.DefineValidationOptions) (*cli.ValidationResult, error)
- func (s *Service) DiscoverSetup(ctx context.Context) (*cli.SetupDiscovery, error)
- func (s *Service) Doctor(ctx context.Context) (*cli.DoctorResult, error)
- func (s *Service) Dossier(ctx context.Context, repo cli.RepoRef) (*cli.DossierResult, error)
- func (s *Service) DuplicateCandidates(ctx context.Context, repo cli.RepoRef, kind string, number int, limit int) (*DuplicateCandidatesResult, error)
- func (s *Service) ExplainLens(ctx context.Context, name, ref string, opts cli.LensExplainOptions) (*cli.LensExplainResult, error)
- func (s *Service) ExplainMatch(_ context.Context, query string, match cli.SearchMatch) (*ExplainMatchResult, error)
- func (s *Service) ExplainReadiness(ctx context.Context, checkID string) (*cli.ReadinessCheck, error)
- func (s *Service) ExportDossier(ctx context.Context, repo cli.RepoRef, format string) (*cli.ExportResult, error)
- func (s *Service) ExportEvidence(ctx context.Context, investigationID, format string) (*cli.ExportResult, error)
- func (s *Service) ExportLocalMetadata(ctx context.Context, opts cli.MetadataExportOptions) (*cli.MetadataExportResult, error)
- func (s *Service) ExtractSeeds(ctx context.Context, repo cli.RepoRef, opts domain.ExtractSeedsOptions) ([]domain.Seed, error)
- func (s *Service) ExtractSeedsForCLI(ctx context.Context, repo cli.RepoRef, classes, polarities []string, limit int) (any, error)
- func (s *Service) GetContribution(ctx context.Context, id string) (*cli.ContributionResult, error)
- func (s *Service) GetDossierForCLI(ctx context.Context, repo cli.RepoRef) (any, error)
- func (s *Service) GetJob(ctx context.Context, id string) (*cli.JobResult, error)
- func (s *Service) GetRepositoryDossier(ctx context.Context, repo cli.RepoRef) (*domain.Dossier, error)
- func (s *Service) Hydrate(ctx context.Context, repo cli.RepoRef, number int, opts cli.HydrateOptions) (*cli.HydrateResult, error)
- func (s *Service) HydrateRepository(ctx context.Context, repo cli.RepoRef, opts HydrateRepositoryOptions) (*HydrateResult, error)
- func (s *Service) HydrateThread(ctx context.Context, repo cli.RepoRef, number int, opts HydrateOptions) (*HydrateResult, error)
- func (s *Service) ImportLocalMetadata(ctx context.Context, opts cli.MetadataImportOptions) (*cli.MetadataImportResult, error)
- func (s *Service) Index(ctx context.Context, repo cli.RepoRef, path string) (*cli.IndexResult, error)
- func (s *Service) Init(ctx context.Context) (*cli.InitResult, error)
- func (s *Service) InspectCorpus(ctx context.Context) (*cli.CorpusInspectionResult, error)
- func (s *Service) InventoryCorpus(ctx context.Context, repo string) (*cli.CorpusInventoryResult, error)
- func (s *Service) Jobs(ctx context.Context) (*JobExecutor, error)
- func (s *Service) ListClusters(ctx context.Context, repo cli.RepoRef, limit int) (*cli.ClusterListResult, error)
- func (s *Service) ListCollections(ctx context.Context) (*cli.CollectionListResult, error)
- func (s *Service) ListContributionOutcomes(ctx context.Context, contributionID string) (*cli.ContributionOutcomeListResult, error)
- func (s *Service) ListContributions(ctx context.Context, opts cli.ListContributionsOptions) (*cli.ContributionListResult, error)
- func (s *Service) ListCorpusInventory(ctx context.Context) (*cli.CorpusInventoryListResult, error)
- func (s *Service) ListCorpusProjections(ctx context.Context) (*cli.CorpusProjectionListResult, error)
- func (s *Service) ListHypotheses(ctx context.Context, investigationID string) (*cli.HypothesisListResult, error)
- func (s *Service) ListInvestigations(ctx context.Context) (*cli.InvestigationListResult, error)
- func (s *Service) ListJobs(ctx context.Context, status string, limit int) (*cli.JobListResult, error)
- func (s *Service) ListLenses(ctx context.Context) (*cli.LensListResult, error)
- func (s *Service) ListOpportunities(ctx context.Context, investigationID string) (*cli.OpportunityListResult, error)
- func (s *Service) ListSources(ctx context.Context) (*cli.SourceListResult, error)
- func (s *Service) ListTriageEvents(ctx context.Context, opts cli.ListTriageEventsOptions) (*cli.TriageEventListResult, error)
- func (s *Service) Load(ctx context.Context) (tui.Data, error)
- func (s *Service) MCPReader() mcpserver.Reader
- func (s *Service) Metadata(ctx context.Context) (*cli.MetadataResult, error)
- func (s *Service) MigrateCorpus(ctx context.Context, opts cli.CorpusMigrateOptions) (*cli.CorpusMigrationResult, error)
- func (s *Service) NeighborQuery(ctx context.Context, repo cli.RepoRef, kind string, number, limit int) (*cli.NeighborListResult, error)
- func (s *Service) Neighbors(ctx context.Context, repo cli.RepoRef, kind string, number int, limit int) (*NeighborsResult, error)
- func (s *Service) NewMCPRunner() cli.MCPRunner
- func (s *Service) OpportunityReadiness(ctx context.Context, opportunityID string) (*cli.ReadinessResult, error)
- func (s *Service) PlanArchiveSync(_ context.Context, repo cli.RepoRef, opts cli.ArchiveSyncOptions) (*cli.SyncPlanResult, error)
- func (s *Service) PlanCodePrune(ctx context.Context, repo string, keepLatest int) (*cli.CorpusPruneResult, error)
- func (s *Service) PlanRepositoryRemoval(ctx context.Context, repo string) (*cli.CorpusRepositoryRemovalResult, error)
- func (s *Service) PrepareIssue(ctx context.Context, opportunityID string, opts cli.PrepareIssueOptions) (*cli.DraftResult, error)
- func (s *Service) PreparePullRequest(ctx context.Context, opportunityID string, opts cli.PreparePROptions) (*cli.DraftResult, error)
- func (s *Service) PrepareReviewForCLI(ctx context.Context, opportunityID, workspaceID string) (any, error)
- func (s *Service) PrepareReviewReport(ctx context.Context, input PrepareReviewReportInput) (*ReviewReport, error)
- func (s *Service) PromoteOpportunity(ctx context.Context, hypothesisID, problem, scope, impact, effort string, ...) (*cli.OpportunityResult, error)
- func (s *Service) PromoteOpportunityWithInput(ctx context.Context, hypothesisID string, ...) (*investigation.Opportunity, error)
- func (s *Service) PullRequestCollisions(ctx context.Context, repo cli.RepoRef, number int, limit int) (*PullRequestCollisionResult, error)
- func (s *Service) RebuildCorpusProjection(ctx context.Context, name string) (*cli.CorpusProjectionResult, error)
- func (s *Service) RecordContribution(ctx context.Context, opts cli.RecordContributionOptions) (*cli.ContributionResult, error)
- func (s *Service) RecordContributionOutcome(ctx context.Context, opts cli.RecordContributionOutcomeOptions) (*cli.ContributionOutcomeResult, error)
- func (s *Service) RecordEvidence(ctx context.Context, input RecordEvidenceInput) (*evidence.Evidence, error)
- func (s *Service) RecordEvidenceForCLI(ctx context.Context, opts cli.RecordEvidenceOptions) (any, error)
- func (s *Service) RecordTriageEvent(ctx context.Context, opts cli.RecordTriageEventOptions) (*cli.TriageEventResult, error)
- func (s *Service) RefreshClusters(ctx context.Context, repo cli.RepoRef) (*cli.ClusterRefreshResult, error)
- func (s *Service) RepositoryHealth(ctx context.Context, repo cli.RepoRef) (*health.Report, error)
- func (s *Service) RepositoryHealthWithOptions(ctx context.Context, repo cli.RepoRef, opts health.Options) (*health.Report, error)
- func (s *Service) RestoreCorpus(ctx context.Context, source, safetyBackup string) (*cli.CorpusRestoreResult, error)
- func (s *Service) RunHistory(ctx context.Context, limit int) (*cli.RunListResult, error)
- func (s *Service) RunValidation(ctx context.Context, id string, opts cli.RunValidationOptions) (*cli.ValidationRunResult, error)
- func (s *Service) RuntimeContract(ctx context.Context) (*cli.RuntimeContractResult, error)
- func (s *Service) Search(ctx context.Context, query string, opts cli.SearchOptions) (*cli.SearchResult, error)
- func (s *Service) SetArchiveFetcher(f discovery.ArchiveFetcher)
- func (s *Service) SetClock(clock func() time.Time)
- func (s *Service) SetCollisionForCLI(ctx context.Context, id, status, rationale string) (any, error)
- func (s *Service) SetDeepWikiReader(r deepwiki.Reader)
- func (s *Service) SetGitHubReader(r github.Reader)
- func (s *Service) SetOpportunityStatus(ctx context.Context, id, status, rationale string) (*cli.OpportunityResult, error)
- func (s *Service) Setup(ctx context.Context, opts cli.SetupOptions) (*cli.SetupReport, error)
- func (s *Service) SetupWithProgress(ctx context.Context, opts cli.SetupOptions, observer cli.SetupObserver) (*cli.SetupReport, error)
- func (s *Service) ShowEvidence(ctx context.Context, investigationID string) (*cli.EvidenceResult, error)
- func (s *Service) ShowInvestigation(ctx context.Context, id string) (*cli.InvestigationResult, error)
- func (s *Service) ShowLens(ctx context.Context, name string) (*cli.LensResult, error)
- func (s *Service) ShowOpportunity(ctx context.Context, id string) (*cli.OpportunityResult, error)
- func (s *Service) ShowSource(ctx context.Context, name string) (*cli.SourceResult, error)
- func (s *Service) ShowValidation(ctx context.Context, id string) (*cli.ValidationResult, error)
- func (s *Service) ShowWorkspace(ctx context.Context, id string) (*cli.WorkspaceResult, error)
- func (s *Service) StartInvestigation(ctx context.Context, repo cli.RepoRef, commitSHA, lens string) (*cli.InvestigationResult, error)
- func (s *Service) StartInvestigationFromThread(ctx context.Context, requested research.ThreadRef) (*cli.ThreadInvestigationResult, error)
- func (s *Service) Status(ctx context.Context) (*cli.StatusResult, error)
- func (s *Service) Sync(ctx context.Context, repo cli.RepoRef) (*cli.SyncResult, error)
- func (s *Service) SyncWithOptions(ctx context.Context, repo cli.RepoRef, syncOpts SyncOptions) (*cli.SyncResult, error)
- func (s *Service) TailSource(ctx context.Context, name string, opts cli.TailOptions) (*cli.TailResult, error)
- func (s *Service) ThreadResearchBrief(ctx context.Context, ref research.ThreadRef) (*research.Brief, error)
- func (s *Service) TransitionHypothesis(ctx context.Context, hypothesisID, status, rationale string) (*investigation.Hypothesis, error)
- func (s *Service) TransitionHypothesisForCLI(ctx context.Context, id, status, rationale string) (any, error)
- func (s *Service) UpdateHypothesis(ctx context.Context, hypothesisID string, ...) (*investigation.Hypothesis, error)
- func (s *Service) UpdateHypothesisForCLI(ctx context.Context, id string, opts cli.HypothesisUpdateOptions) (any, error)
- func (s *Service) UpdateOpportunityCollisionStatus(ctx context.Context, opportunityID, status, rationale string) (*investigation.Opportunity, error)
- func (s *Service) Upgrade(ctx context.Context, opts cli.UpgradeOptions) (*cli.UpgradeReport, error)
- func (s *Service) WorkspaceDiff(ctx context.Context, id string) (*WorkspaceDiffResult, error)
- func (s *Service) WorkspaceDiffForCLI(ctx context.Context, id string) (any, error)
- type SyncOptions
- type ThreadRef
- type WorkspaceDiffResult
Constants ¶
const ( FacetIssueComments = "issue_comments" FacetPRDetails = "pr_details" FacetPRReviews = "pr_reviews" FacetPRReviewComments = "pr_review_comments" FacetPRChecks = "pr_checks" FacetPRReviewThreads = "pr_review_threads" FacetPRMergeState = "pr_merge_state" FacetPRMergeQueue = "pr_merge_queue" FacetPRClosingIssues = "pr_closing_issues" FacetPRFiles = "pr_files" FacetIssueTimeline = "issue_timeline" )
Thread facets that selective hydration can retrieve.
const (
// FacetContributionGuidance stores bounded repository contribution and AI policy documents.
FacetContributionGuidance = "contribution_guidance"
)
Variables ¶
This section is empty.
Functions ¶
func NewRuntimeContract ¶ added in v0.9.0
func NewRuntimeContract(version string) (*cli.RuntimeContractResult, error)
NewRuntimeContract constructs immutable executable compatibility metadata. It does not resolve configuration, inspect a corpus, access the network, or write local state.
Types ¶
type CollisionCheckResult ¶
type CollisionCheckResult struct {
HypothesisID string `json:"hypothesis_id,omitempty"`
OpportunityID string `json:"opportunity_id,omitempty"`
Repo domain.RepoRef `json:"repo"`
Query string `json:"query"`
Findings []evidence.Evidence `json:"findings"`
SourceRevision string `json:"source_revision"`
Limit int `json:"limit"`
Total int `json:"total"`
}
CollisionCheckResult is the set of open pull requests that may collide with a workflow item.
type DuplicateCandidatesResult ¶
type DuplicateCandidatesResult struct {
Repo string `json:"repo"`
Kind string `json:"kind"`
Number int `json:"number"`
ClusterID int64 `json:"cluster_id,omitempty"`
StableID string `json:"stable_id,omitempty"`
Canonical ThreadRef `json:"canonical,omitempty"`
SourceRevision string `json:"source_revision"`
Limit int `json:"limit"`
Total int `json:"total"`
Candidates []Neighbor `json:"candidates"`
}
DuplicateCandidatesResult is the response for a duplicate-candidate query.
type DuplicateCheckResult ¶
type DuplicateCheckResult struct {
HypothesisID string `json:"hypothesis_id,omitempty"`
OpportunityID string `json:"opportunity_id,omitempty"`
Repo domain.RepoRef `json:"repo"`
Query string `json:"query"`
Findings []evidence.Evidence `json:"findings"`
SourceRevision string `json:"source_revision"`
Limit int `json:"limit"`
Total int `json:"total"`
}
DuplicateCheckResult is the set of possible duplicate threads for a workflow item.
type EvidenceSummary ¶
type EvidenceSummary struct {
Supporting int `json:"supporting"`
Contradicting int `json:"contradicting"`
Inconclusive int `json:"inconclusive"`
Stale int `json:"stale"`
Invalid int `json:"invalid"`
Total int `json:"total"`
}
EvidenceSummary counts evidence by relation.
type ExplainMatchResult ¶
ExplainMatchResult exposes the factual signals that contribute to a match score. It performs no network access.
type HydrateOptions ¶
type HydrateOptions struct {
// Facets lists the facets to retrieve. An empty list hydrates all facets
// applicable to the thread kind.
Facets []string
// MaxPages bounds pagination per facet. Zero defaults to 50.
MaxPages int
}
HydrateOptions controls selective thread hydration.
type HydrateRepositoryOptions ¶
HydrateRepositoryOptions controls repository-wide thread hydration.
type HydrateResult ¶
type HydrateResult struct {
Repo cli.RepoRef
Number int
Kind string
Facets []HydratedFacet
Pages int
Requests int
Capped bool
Message string
}
HydrateResult reports the outcome of hydrating a thread.
type HydratedFacet ¶
HydratedFacet reports coverage and counts for one hydrated facet.
type JobExecutor ¶
type JobExecutor struct {
// contains filtered or unexported fields
}
JobExecutor submits durable jobs, runs them asynchronously, and supports cancellation, progress recording, and safe shutdown.
Each executor registers a unique owner in the corpus and heartbeats while it is open. Startup only reconciles jobs whose owner is missing or has a stale heartbeat; live owners from other processes are never failed. Workers poll the corpus for cancellation requests so a job cancelled by another process stops promptly.
func (*JobExecutor) Cancel ¶
func (e *JobExecutor) Cancel(ctx context.Context, id string) error
Cancel requests cancellation for a job. Queued jobs are marked cancelled immediately; running jobs have their context cancelled and finish as cancelled.
func (*JobExecutor) Close ¶
func (e *JobExecutor) Close() error
Close cancels all running jobs and waits for their goroutines to finish before returning.
type JobFunc ¶
JobFunc performs asynchronous work for a job. It receives a context that is cancelled when the job is cancelled or the executor closes, and a report callback that records progress and statistics in the corpus.
type MCPReader ¶
type MCPReader struct{ *Service }
MCPReader adapts Service to the mcpserver.Reader interface. It is a thin wrapper because Go does not allow two methods named Search on one type.
func (*MCPReader) BuildRepositoryDossier ¶
func (r *MCPReader) BuildRepositoryDossier(ctx context.Context, in mcpserver.BuildRepositoryDossierInput) (mcpserver.JobReference, error)
BuildRepositoryDossier submits a durable job that builds a repository dossier.
func (*MCPReader) CancelJobs ¶ added in v0.6.0
func (r *MCPReader) CancelJobs(ctx context.Context, in mcpserver.CancelJobInput) (mcpserver.GetJobsOutput, error)
CancelJobs requests bounded cancellation in input order. Missing and terminal jobs remain item-level outcomes so one bad ID does not hide successful writes.
func (*MCPReader) CheckCollisions ¶
func (r *MCPReader) CheckCollisions(ctx context.Context, in mcpserver.CheckCollisionsInput) (mcpserver.CheckOutput, error)
CheckCollisions finds open pull request collisions for a hypothesis or opportunity.
func (*MCPReader) CheckDuplicates ¶
func (r *MCPReader) CheckDuplicates(ctx context.Context, in mcpserver.CheckDuplicatesInput) (mcpserver.CheckOutput, error)
CheckDuplicates finds duplicate-candidate threads for a hypothesis or opportunity.
func (*MCPReader) CheckMergeConflicts ¶ added in v0.5.0
func (r *MCPReader) CheckMergeConflicts(ctx context.Context, in mcpserver.CheckMergeConflictsInput) (mcpserver.CheckMergeConflictsOutput, error)
CheckMergeConflicts compares already-fetched OIDs in managed workspaces without fetching or modifying refs, indexes, or worktrees.
func (*MCPReader) CreateWorkspace ¶
func (r *MCPReader) CreateWorkspace(ctx context.Context, in mcpserver.CreateWorkspaceInput) (mcpserver.JobReference, error)
CreateWorkspace submits a durable job that clones a remote and creates a worktree.
func (*MCPReader) DeepWiki ¶ added in v0.5.0
func (r *MCPReader) DeepWiki(ctx context.Context, in mcpserver.DeepWikiInput) (mcpserver.DeepWikiOutput, error)
DeepWiki performs one external derived-knowledge read and does not persist its response.
func (*MCPReader) DefineValidation ¶
func (r *MCPReader) DefineValidation(ctx context.Context, in mcpserver.DefineValidationInput) (mcpserver.ValidationOutput, error)
DefineValidation stores a validation definition.
func (*MCPReader) Dossier ¶
func (r *MCPReader) Dossier(ctx context.Context, in mcpserver.RepoInput) (mcpserver.DossierOutput, error)
Dossier builds a source-backed repository dossier from local corpus data.
func (*MCPReader) Evidence ¶
func (r *MCPReader) Evidence(ctx context.Context, in mcpserver.EvidenceInput) (mcpserver.EvidenceOutput, error)
Evidence reads evidence for a local investigation or opportunity.
func (*MCPReader) ExplainMatch ¶
func (r *MCPReader) ExplainMatch(ctx context.Context, in mcpserver.ExplainMatchInput) (mcpserver.ExplainMatchOutput, error)
ExplainMatch explains why a search result matched.
func (*MCPReader) FindClusters ¶
func (r *MCPReader) FindClusters(ctx context.Context, in mcpserver.FindClustersInput) (mcpserver.FindClustersOutput, error)
FindClusters lists duplicate-candidate clusters for a repository from the local corpus without recomputing them.
func (*MCPReader) FindNeighbors ¶
func (r *MCPReader) FindNeighbors(ctx context.Context, in mcpserver.FindNeighborsInput) (mcpserver.FindNeighborsOutput, error)
FindNeighbors ranks similar local threads without network access.
func (*MCPReader) FindPortfolioOverlaps ¶ added in v0.6.0
func (r *MCPReader) FindPortfolioOverlaps(ctx context.Context, in mcpserver.FindPortfolioOverlapsInput) (mcpserver.FindPortfolioOverlapsOutput, error)
FindPortfolioOverlaps is a pure corpus read over complete normalized signal snapshots. It preserves candidate order and never treats absent coverage as proof that no overlap exists.
func (*MCPReader) FindPrecedents ¶ added in v0.5.0
func (r *MCPReader) FindPrecedents(ctx context.Context, in mcpserver.FindPrecedentsInput) (mcpserver.FindPrecedentsOutput, error)
FindPrecedents performs an offline similarity search over stored resolved threads. Each source thread is resolved and ranked independently while preserving input order and item-level recovery guidance in the bounded batch response.
func (*MCPReader) GetAuthenticatedIdentity ¶ added in v0.5.0
func (r *MCPReader) GetAuthenticatedIdentity(ctx context.Context) (mcpserver.AuthenticatedIdentityOutput, error)
GetAuthenticatedIdentity reads the GitHub account associated with the active credential.
func (*MCPReader) GetCoverage ¶
func (r *MCPReader) GetCoverage(ctx context.Context, in mcpserver.GetCoverageInput) (mcpserver.GetCoverageOutput, error)
GetCoverage returns bounded, input-ordered facet coverage without network access.
func (*MCPReader) GetJob ¶
func (r *MCPReader) GetJob(ctx context.Context, in mcpserver.GetJobInput) (mcpserver.GetJobOutput, error)
GetJob reads a durable job by ID.
func (*MCPReader) GetJobs ¶ added in v0.5.0
func (r *MCPReader) GetJobs(ctx context.Context, in mcpserver.GetJobsInput) (mcpserver.GetJobsOutput, error)
GetJobs reads up to 100 durable job records without waiting for completion.
func (*MCPReader) GetRepositories ¶ added in v0.5.0
func (r *MCPReader) GetRepositories(ctx context.Context, in mcpserver.GetRepositoriesInput) (mcpserver.GetRepositoriesOutput, error)
GetRepositories performs an offline, input-ordered corpus read and clears repository facts when metadata coverage has not been observed.
func (*MCPReader) GetThreads ¶ added in v0.5.0
func (r *MCPReader) GetThreads(ctx context.Context, in mcpserver.GetThreadsInput) (mcpserver.GetThreadsOutput, error)
GetThreads performs an offline, input-ordered exact-thread read. Compact mode omits bodies to keep broad triage responses bounded.
func (*MCPReader) HydrateThreads ¶ added in v0.5.0
func (r *MCPReader) HydrateThreads(ctx context.Context, in mcpserver.HydrateThreadsInput) (mcpserver.JobReference, error)
HydrateThreads submits a durable GitHub read for explicit child facets on selected threads; an empty facet set is rejected.
func (*MCPReader) IndexRepositories ¶ added in v0.5.0
func (r *MCPReader) IndexRepositories(ctx context.Context, in mcpserver.IndexRepositoriesInput) (mcpserver.JobReference, error)
IndexRepositories submits a durable Git acquisition and safe indexing job with at most two repositories processed concurrently.
func (*MCPReader) Investigation ¶
func (r *MCPReader) Investigation(ctx context.Context, in mcpserver.InvestigationInput) (mcpserver.InvestigationOutput, error)
Investigation reads a local investigation workspace from the corpus.
func (*MCPReader) LinkPullRequest ¶ added in v0.6.0
func (r *MCPReader) LinkPullRequest(ctx context.Context, in mcpserver.LinkPullRequestInput) (mcpserver.LinkPullRequestOutput, error)
LinkPullRequest records an explicit local relationship without mutating GitHub.
func (*MCPReader) ListOpportunities ¶
func (r *MCPReader) ListOpportunities(ctx context.Context, in mcpserver.ListOpportunitiesInput) (mcpserver.ListOpportunitiesOutput, error)
ListOpportunities lists opportunities for a local investigation.
func (*MCPReader) ListPullRequestPortfolio ¶ added in v0.5.0
func (r *MCPReader) ListPullRequestPortfolio(ctx context.Context, in mcpserver.ListPullRequestPortfolioInput) (mcpserver.ListPullRequestPortfolioOutput, error)
ListPullRequestPortfolio performs an offline projection over stored authored PRs and status facets; unsupported health facets remain explicitly unknown.
func (*MCPReader) Opportunity ¶
func (r *MCPReader) Opportunity(ctx context.Context, in mcpserver.OpportunityInput) (mcpserver.OpportunityOutput, error)
Opportunity reads a local contribution opportunity.
func (*MCPReader) PrepareContribution ¶
func (r *MCPReader) PrepareContribution(ctx context.Context, in mcpserver.PrepareContributionInput) (mcpserver.DraftOutput, error)
PrepareContribution renders a contribution draft for an opportunity.
func (*MCPReader) PromoteOpportunity ¶
func (r *MCPReader) PromoteOpportunity(ctx context.Context, in mcpserver.PromoteOpportunityInput) (mcpserver.OpportunityOutput, error)
PromoteOpportunity promotes a hypothesis to an opportunity.
func (*MCPReader) RankOpportunities ¶ added in v0.5.0
func (r *MCPReader) RankOpportunities(ctx context.Context, in mcpserver.RankOpportunitiesInput) (mcpserver.RankOpportunitiesOutput, error)
RankOpportunities performs deterministic offline Radar ranking across stored repositories.
func (*MCPReader) Readiness ¶
func (r *MCPReader) Readiness(ctx context.Context, in mcpserver.ReadinessInput) (mcpserver.ReadinessOutput, error)
Readiness reads a local contribution readiness report through MCP.
func (*MCPReader) RecordHypothesis ¶
func (r *MCPReader) RecordHypothesis(ctx context.Context, in mcpserver.RecordHypothesisInput) (mcpserver.HypothesisOutput, error)
RecordHypothesis records a fully structured hypothesis.
func (*MCPReader) Repository ¶
func (r *MCPReader) Repository(ctx context.Context, in mcpserver.RepoInput) (mcpserver.RepositoryOutput, error)
Repository reads a repository projection from the local corpus.
func (*MCPReader) RunValidation ¶
func (r *MCPReader) RunValidation(ctx context.Context, in mcpserver.RunValidationInput) (mcpserver.JobReference, error)
RunValidation submits a durable validation run.
func (*MCPReader) Search ¶
func (r *MCPReader) Search(ctx context.Context, in mcpserver.SearchInput) (mcpserver.SearchOutput, error)
Search performs a local-only corpus search through the MCP interface.
func (*MCPReader) SearchCode ¶
func (r *MCPReader) SearchCode(ctx context.Context, in mcpserver.SearchCodeInput) (mcpserver.SearchCodeOutput, error)
SearchCode searches indexed code snapshots in the local corpus.
func (*MCPReader) SearchGitHubRepositories ¶ added in v0.5.0
func (r *MCPReader) SearchGitHubRepositories(ctx context.Context, in mcpserver.SearchGitHubRepositoriesInput) (mcpserver.SearchGitHubRepositoriesOutput, error)
SearchGitHubRepositories performs one bounded live repository search and persists the returned metadata observations without fetching thread data.
func (*MCPReader) SearchRepositories ¶
func (r *MCPReader) SearchRepositories(ctx context.Context, in mcpserver.SearchRepositoriesInput) (mcpserver.SearchRepositoriesOutput, error)
SearchRepositories performs a local-only repository search.
func (*MCPReader) StartInvestigation ¶
func (r *MCPReader) StartInvestigation(ctx context.Context, in mcpserver.StartInvestigationInput) (mcpserver.InvestigationOutput, error)
StartInvestigation creates a new investigation workspace.
func (*MCPReader) SyncAuthoredPullRequests ¶ added in v0.5.0
func (r *MCPReader) SyncAuthoredPullRequests(ctx context.Context, in mcpserver.SyncAuthoredPullRequestsInput) (mcpserver.JobReference, error)
SyncAuthoredPullRequests submits a durable GitHub search and exact-header refresh for pull requests authored by the authenticated account.
func (*MCPReader) SyncPullRequestStatus ¶ added in v0.5.0
func (r *MCPReader) SyncPullRequestStatus(ctx context.Context, in mcpserver.SyncPullRequestStatusInput) (mcpserver.JobReference, error)
SyncPullRequestStatus submits a bounded source-backed refresh of PR details, reviews, checks, review conversations, merge state, queue state, closing issues, and changed paths. Each facet retains independent coverage.
func (*MCPReader) SyncRepositoryMetadata ¶ added in v0.5.0
func (r *MCPReader) SyncRepositoryMetadata(ctx context.Context, in mcpserver.SyncRepositoryMetadataInput) (mcpserver.JobReference, error)
SyncRepositoryMetadata submits a durable metadata-only GitHub read. It does not fetch threads, comments, reviews, or code.
func (*MCPReader) SyncThreads ¶ added in v0.5.0
func (r *MCPReader) SyncThreads(ctx context.Context, in mcpserver.SyncThreadsInput) (mcpserver.JobReference, error)
SyncThreads submits a durable bounded GitHub read for repository metadata, fixed contribution-policy paths, and thread headers.
func (*MCPReader) Thread ¶
func (r *MCPReader) Thread(ctx context.Context, in mcpserver.ThreadInput) (mcpserver.ThreadOutput, error)
Thread reads one issue or pull request from the local corpus.
func (*MCPReader) ThreadByNumber ¶
func (r *MCPReader) ThreadByNumber(ctx context.Context, in mcpserver.ThreadByNumberInput) (mcpserver.ThreadOutput, error)
ThreadByNumber reads an issue or pull request by repository and number only.
type MCPRunner ¶
type MCPRunner struct{ *Service }
MCPRunner implements cli.MCPRunner by starting an MCP server over stdio.
type Neighbor ¶
type Neighbor struct {
Kind string `json:"kind"`
Owner string `json:"owner"`
Repo string `json:"repo"`
Number int `json:"number"`
Title string `json:"title"`
State string `json:"state"`
Score float64 `json:"score"`
Reason string `json:"reason"`
}
Neighbor is one ranked thread near a query.
type NeighborsResult ¶
type NeighborsResult struct {
Repo string `json:"repo"`
Kind string `json:"kind"`
Number int `json:"number"`
Limit int `json:"limit"`
Total int `json:"total"`
SourceRevision string `json:"source_revision"`
RuleVersion similarity.RuleVersion `json:"rule_version"`
Neighbors []Neighbor `json:"neighbors"`
}
NeighborsResult is the response for a local nearest-thread query.
type PrepareReviewReportInput ¶
PrepareReviewReportInput scopes a review report to an opportunity and/or workspace.
type PullRequestCollision ¶
type PullRequestCollision struct {
Number int `json:"number"`
Title string `json:"title"`
Author string `json:"author"`
BaseRef string `json:"base_ref"`
Score float64 `json:"score"`
Reason string `json:"reason"`
}
PullRequestCollision is a competing open pull request with a score and reason.
type PullRequestCollisionResult ¶
type PullRequestCollisionResult struct {
Repo string `json:"repo"`
Number int `json:"number"`
Limit int `json:"limit"`
Total int `json:"total"`
SourceRevision string `json:"source_revision"`
Collisions []PullRequestCollision `json:"collisions"`
}
PullRequestCollisionResult is the response for a focused open-PR collision query.
type RecordEvidenceInput ¶
type RecordEvidenceInput struct {
InvestigationID string
HypothesisID string
OpportunityID string
Type string
Relation string
Description string
SourceRefs []domain.SourceRef
SourceProvenance []evidence.SourceRevision
}
RecordEvidenceInput carries a new evidence item for an investigation, hypothesis, or opportunity.
type ReviewReport ¶
type ReviewReport struct {
OpportunityID string `json:"opportunity_id,omitempty"`
WorkspaceID string `json:"workspace_id,omitempty"`
Repo cli.RepoRef `json:"repo"`
OpportunityStatus string `json:"opportunity_status,omitempty"`
CollisionStatus string `json:"collision_status,omitempty"`
CollisionFindings []evidence.Evidence `json:"collision_findings"`
DiffMetadata *WorkspaceDiffResult `json:"diff_metadata,omitempty"`
EvidenceSummary EvidenceSummary `json:"evidence_summary"`
SuggestedReviewOrder []ReviewStep `json:"suggested_review_order"`
RenderedAt time.Time `json:"rendered_at"`
}
ReviewReport is a read-only preparation artifact with collision findings, complete diff metadata, and a suggested review order.
type ReviewStep ¶
type ReviewStep struct {
Path string `json:"path"`
Priority int `json:"priority"`
Rationale string `json:"rationale"`
}
ReviewStep is one suggested review item with a stable priority.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the product-owned application layer that satisfies cli.Service. MCP reads are exposed through MCPReader.
func New ¶
New creates a Service and resolves local configuration. GitHub credentials are resolved lazily only when a network-reading operation is requested.
func NewWithContext ¶ added in v0.8.0
func NewWithContext(ctx context.Context, paths *config.Paths, version string, logger *slog.Logger) (*Service, error)
NewWithContext creates a Service bounded by ctx and Close.
func (*Service) Acquire ¶
func (s *Service) Acquire(ctx context.Context, repo cli.RepoRef, remote string) (result *cli.AcquisitionResult, returnErr error)
Acquire clones or fetches a repository into the managed cache, records the resolved remote URL/default branch/commit SHA/acquired time, and indexes the clean checkout into the corpus. It does not execute repository code.
func (*Service) AddCollectionMembers ¶
func (s *Service) AddCollectionMembers(ctx context.Context, name string, members []cli.CollectionMember) (*cli.CollectionResult, error)
AddCollectionMembers idempotently adds typed references to a collection.
func (*Service) AddGHArchiveSource ¶
func (s *Service) AddGHArchiveSource(ctx context.Context, name string, events []string) (*cli.SourceResult, error)
AddGHArchiveSource stores a named GH Archive event filter without fetching data.
func (*Service) AddHypothesis ¶
func (s *Service) AddHypothesis(ctx context.Context, investigationID, title, description, category string) (*cli.HypothesisResult, error)
AddHypothesis records a hypothesis under an investigation.
func (*Service) AddLens ¶
func (s *Service) AddLens(ctx context.Context, name string, def lens.Definition) (*cli.LensResult, error)
AddLens validates and stores a lens definition.
func (*Service) AddRepoSource ¶
func (s *Service) AddRepoSource(ctx context.Context, name string, refs []cli.RepoRef) (*cli.SourceResult, error)
AddRepoSource stores a named, explicit set of repositories without fetching them.
func (*Service) AddSearchSource ¶
func (s *Service) AddSearchSource(ctx context.Context, name, query string) (*cli.SourceResult, error)
AddSearchSource stores a named GitHub repository-search source without executing it.
func (*Service) ApplyCodePrune ¶ added in v0.9.0
func (s *Service) ApplyCodePrune(ctx context.Context, repo string, keepLatest int, expectedDelete []string) (*cli.CorpusPruneResult, error)
ApplyCodePrune deletes the exact confirmed derived code-snapshot plan.
func (*Service) ApplyRepositoryRemoval ¶ added in v0.9.0
func (s *Service) ApplyRepositoryRemoval(ctx context.Context, repo, expectedRevision string) (*cli.CorpusRepositoryRemovalResult, error)
ApplyRepositoryRemoval applies an unchanged, confirmed repository-removal plan.
func (*Service) ArchiveSync ¶
func (s *Service) ArchiveSync(ctx context.Context, repo cli.RepoRef, opts cli.ArchiveSyncOptions) (*cli.SyncResult, error)
ArchiveSync adapts CLI archive options to the application sync contract.
func (*Service) ArchiveThreads ¶
func (s *Service) ArchiveThreads(ctx context.Context, repo cli.RepoRef, kind, state string, limit int) (*cli.ThreadListResult, error)
ArchiveThreads returns bounded current thread projections without network access.
func (*Service) BackupCorpus ¶ added in v0.9.0
func (s *Service) BackupCorpus(ctx context.Context, destination string) (*cli.CorpusBackupResult, error)
BackupCorpus creates a verified online backup at destination.
func (*Service) BuildDossierForCLI ¶
BuildDossierForCLI builds and persists a dossier from local corpus data.
func (*Service) BuildRepositoryDossier ¶
func (s *Service) BuildRepositoryDossier(ctx context.Context, repo cli.RepoRef) (*domain.Dossier, error)
BuildRepositoryDossier builds a deterministic dossier from local corpus data, persists it safely, and returns the result.
func (*Service) CancelJob ¶
CancelJob records and applies a cancellation request, then returns current state.
func (*Service) CheckCollisionsForCLI ¶
func (s *Service) CheckCollisionsForCLI(ctx context.Context, target, id string, limit int) (any, error)
CheckCollisionsForCLI runs local open-work collision analysis for a target.
func (*Service) CheckDuplicatesForCLI ¶
func (s *Service) CheckDuplicatesForCLI(ctx context.Context, target, id string, limit int) (any, error)
CheckDuplicatesForCLI runs local duplicate analysis for a hypothesis or opportunity.
func (*Service) CheckHypothesisCollisions ¶
func (s *Service) CheckHypothesisCollisions(ctx context.Context, hypothesisID string, limit int) (*CollisionCheckResult, error)
CheckHypothesisCollisions searches the local corpus for open pull requests that may collide with a hypothesis.
func (*Service) CheckHypothesisDuplicates ¶
func (s *Service) CheckHypothesisDuplicates(ctx context.Context, hypothesisID string, limit int) (*DuplicateCheckResult, error)
CheckHypothesisDuplicates searches the local corpus for threads similar to a hypothesis, returning each finding as evidence.
func (*Service) CheckOpportunityCollisions ¶
func (s *Service) CheckOpportunityCollisions(ctx context.Context, opportunityID string, limit int) (*CollisionCheckResult, error)
CheckOpportunityCollisions searches the local corpus for open pull requests that may collide with an opportunity.
func (*Service) CheckOpportunityDuplicates ¶
func (s *Service) CheckOpportunityDuplicates(ctx context.Context, opportunityID string, limit int) (*DuplicateCheckResult, error)
CheckOpportunityDuplicates searches the local corpus for threads similar to an opportunity.
func (*Service) Close ¶
Close cancels and waits for active jobs, then closes the corpus database connection.
func (*Service) CompareValidation ¶
func (s *Service) CompareValidation(ctx context.Context, baseRunID, candidateRunID string) (*cli.ValidationComparisonResult, error)
CompareValidation compares a base validation run with a candidate validation run.
func (*Service) Configure ¶
func (s *Service) Configure(ctx context.Context, opts cli.ConfigureOptions) (*cli.ConfigureResult, error)
Configure validates and atomically saves supported typed settings. Runtime environment overrides are deliberately not persisted.
func (*Service) ContributionRadar ¶
func (s *Service) ContributionRadar(ctx context.Context, opts cli.RadarOptions) (*radar.Report, error)
ContributionRadar ranks a bounded set of locally stored open issues. It is a strict corpus read: it neither resolves a GitHub reader nor writes state.
func (*Service) ControlStatus ¶
ControlStatus returns local corpus counts and freshness without network access or implicit hydration.
func (*Service) Crawl ¶
func (s *Service) Crawl(ctx context.Context, name string, opts cli.CrawlOptions) (*cli.CrawlResult, error)
Crawl performs one explicit, bounded read for a saved discovery source and persists its checkpoint only after the bounded operation succeeds.
func (*Service) CreateCollection ¶
CreateCollection creates a named collection.
func (*Service) CreateHypothesis ¶
func (s *Service) CreateHypothesis(ctx context.Context, investigationID string, input investigation.CreateHypothesisInput) (*investigation.Hypothesis, error)
CreateHypothesis records a fully structured hypothesis under an investigation.
func (*Service) CreateWorkspace ¶
func (s *Service) CreateWorkspace(ctx context.Context, investigationID string, opts cli.WorkspaceCreateOptions) (*cli.WorkspaceResult, error)
CreateWorkspace creates a managed worktree for an investigation.
func (*Service) DefineValidation ¶
func (s *Service) DefineValidation(ctx context.Context, investigationID string, opts cli.DefineValidationOptions) (*cli.ValidationResult, error)
DefineValidation stores a validation definition for an investigation.
func (*Service) DiscoverSetup ¶ added in v0.3.0
DiscoverSetup inspects local onboarding state without writes, network access, credential resolution, or process execution.
func (*Service) Doctor ¶
Doctor performs bounded local diagnostics. It reports authentication source availability but never returns credential values or command output.
func (*Service) DuplicateCandidates ¶
func (s *Service) DuplicateCandidates(ctx context.Context, repo cli.RepoRef, kind string, number int, limit int) (*DuplicateCandidatesResult, error)
DuplicateCandidates returns the included members of the duplicate-candidate cluster containing the query thread, excluding the query itself. It returns a deterministic order, transparent scores, the cluster stable id, canonical member, and source revision. If the thread is not in a cluster, the result is empty.
func (*Service) ExplainLens ¶
func (s *Service) ExplainLens(ctx context.Context, name, ref string, opts cli.LensExplainOptions) (*cli.LensExplainResult, error)
ExplainLens returns the saved definition, candidate facts, normalized signals, weighted contributions, final score, population context, and missing signals for a candidate under a saved lens. It performs no network access.
func (*Service) ExplainMatch ¶
func (s *Service) ExplainMatch(_ context.Context, query string, match cli.SearchMatch) (*ExplainMatchResult, error)
ExplainMatch returns factual score reasons for a search match without network access. The returned reasons describe stored text matches, source freshness, and coverage signals.
func (*Service) ExplainReadiness ¶
func (s *Service) ExplainReadiness(ctx context.Context, checkID string) (*cli.ReadinessCheck, error)
ExplainReadiness re-evaluates readiness and returns the requested check.
func (*Service) ExportDossier ¶
func (s *Service) ExportDossier(ctx context.Context, repo cli.RepoRef, format string) (*cli.ExportResult, error)
ExportDossier builds and renders a deterministic redacted dossier bundle.
func (*Service) ExportEvidence ¶
func (s *Service) ExportEvidence(ctx context.Context, investigationID, format string) (*cli.ExportResult, error)
ExportEvidence renders a deterministic redacted investigation evidence bundle.
func (*Service) ExportLocalMetadata ¶
func (s *Service) ExportLocalMetadata(ctx context.Context, opts cli.MetadataExportOptions) (*cli.MetadataExportResult, error)
ExportLocalMetadata returns a bounded, redacted, deterministic JSON export of local tracking metadata. It does not include tokens, credentials, or absolute local paths.
func (*Service) ExtractSeeds ¶
func (s *Service) ExtractSeeds(ctx context.Context, repo cli.RepoRef, opts domain.ExtractSeedsOptions) ([]domain.Seed, error)
ExtractSeeds derives evidence-backed contribution seeds from locally stored merged PRs, closed-unmerged PRs, and issues. By default it returns only positive and negative outcome evidence; issue-only context is opt-in. It performs no network access.
func (*Service) ExtractSeedsForCLI ¶
func (s *Service) ExtractSeedsForCLI(ctx context.Context, repo cli.RepoRef, classes, polarities []string, limit int) (any, error)
ExtractSeedsForCLI derives bounded contribution seeds from stored threads.
func (*Service) GetContribution ¶
GetContribution returns contribution metadata by durable id.
func (*Service) GetDossierForCLI ¶
GetDossierForCLI returns the latest persisted dossier without network access.
func (*Service) GetRepositoryDossier ¶
func (s *Service) GetRepositoryDossier(ctx context.Context, repo cli.RepoRef) (*domain.Dossier, error)
GetRepositoryDossier returns the most recently persisted dossier for a repository.
func (*Service) Hydrate ¶
func (s *Service) Hydrate(ctx context.Context, repo cli.RepoRef, number int, opts cli.HydrateOptions) (*cli.HydrateResult, error)
Hydrate adapts the explicit CLI hydration contract to selective hydration.
func (*Service) HydrateRepository ¶
func (s *Service) HydrateRepository(ctx context.Context, repo cli.RepoRef, opts HydrateRepositoryOptions) (*HydrateResult, error)
HydrateRepository hydrates selected facets for threads in a repository. It is explicit, bounded, cancellation-aware, and aggregates per-thread results.
func (*Service) HydrateThread ¶
func (s *Service) HydrateThread(ctx context.Context, repo cli.RepoRef, number int, opts HydrateOptions) (*HydrateResult, error)
HydrateThread fetches the requested facets for an issue or pull request and stores immutable facet observations. It is explicit, bounded, paginated, cancellation-aware, and records independent facet coverage plus run completion/failure statistics.
func (*Service) ImportLocalMetadata ¶
func (s *Service) ImportLocalMetadata(ctx context.Context, opts cli.MetadataImportOptions) (*cli.MetadataImportResult, error)
ImportLocalMetadata imports a bounded JSON bundle of local tracking metadata idempotently.
func (*Service) Index ¶
func (s *Service) Index(ctx context.Context, repo cli.RepoRef, path string) (*cli.IndexResult, error)
Index records a bounded immutable code snapshot from a clean local checkout.
func (*Service) Init ¶
Init opens or creates the configured corpus and persists a default configuration if one does not already exist.
func (*Service) InspectCorpus ¶ added in v0.9.0
InspectCorpus reports corpus compatibility without mutation.
func (*Service) InventoryCorpus ¶ added in v0.9.0
func (s *Service) InventoryCorpus(ctx context.Context, repo string) (*cli.CorpusInventoryResult, error)
InventoryCorpus reports bounded storage details for one repository.
func (*Service) Jobs ¶
func (s *Service) Jobs(ctx context.Context) (*JobExecutor, error)
Jobs returns the durable job executor, opening the corpus if needed.
func (*Service) ListClusters ¶ added in v0.8.0
func (s *Service) ListClusters(ctx context.Context, repo cli.RepoRef, limit int) (*cli.ClusterListResult, error)
ListClusters reads the current stored duplicate-candidate projection. It does not compute or write cluster state.
func (*Service) ListCollections ¶
ListCollections returns all named collections.
func (*Service) ListContributionOutcomes ¶
func (s *Service) ListContributionOutcomes(ctx context.Context, contributionID string) (*cli.ContributionOutcomeListResult, error)
ListContributionOutcomes returns lifecycle outcomes for a contribution.
func (*Service) ListContributions ¶
func (s *Service) ListContributions(ctx context.Context, opts cli.ListContributionsOptions) (*cli.ContributionListResult, error)
ListContributions returns contribution metadata in prepared-at order.
func (*Service) ListCorpusInventory ¶ added in v0.9.0
ListCorpusInventory reports bounded storage details for every repository scope.
func (*Service) ListCorpusProjections ¶ added in v0.9.0
func (s *Service) ListCorpusProjections(ctx context.Context) (*cli.CorpusProjectionListResult, error)
ListCorpusProjections reports derived projection identities and freshness.
func (*Service) ListHypotheses ¶
func (s *Service) ListHypotheses(ctx context.Context, investigationID string) (*cli.HypothesisListResult, error)
ListHypotheses returns hypotheses for an investigation.
func (*Service) ListInvestigations ¶
ListInvestigations returns all investigations.
func (*Service) ListJobs ¶
func (s *Service) ListJobs(ctx context.Context, status string, limit int) (*cli.JobListResult, error)
ListJobs returns bounded durable jobs for CLI and MCP adapters.
func (*Service) ListLenses ¶
ListLenses returns all saved lenses in stable order.
func (*Service) ListOpportunities ¶
func (s *Service) ListOpportunities(ctx context.Context, investigationID string) (*cli.OpportunityListResult, error)
ListOpportunities returns opportunities, optionally filtered to one investigation.
func (*Service) ListSources ¶
ListSources returns all saved discovery sources from the local corpus.
func (*Service) ListTriageEvents ¶
func (s *Service) ListTriageEvents(ctx context.Context, opts cli.ListTriageEventsOptions) (*cli.TriageEventListResult, error)
ListTriageEvents returns local triage outcomes in source-event order.
func (*Service) MCPReader ¶
MCPReader returns an MCP adapter backed by this service. Read methods remain offline; methods named sync or hydrate are explicit network-read operations.
func (*Service) Metadata ¶
Metadata reports deterministic application and local capability metadata. It performs no network access and never creates or migrates the corpus.
func (*Service) MigrateCorpus ¶ added in v0.9.0
func (s *Service) MigrateCorpus(ctx context.Context, opts cli.CorpusMigrateOptions) (*cli.CorpusMigrationResult, error)
MigrateCorpus explicitly applies pending schema migrations with backup policy.
func (*Service) NeighborQuery ¶
func (s *Service) NeighborQuery(ctx context.Context, repo cli.RepoRef, kind string, number, limit int) (*cli.NeighborListResult, error)
NeighborQuery returns transparent local nearest-thread results.
func (*Service) Neighbors ¶
func (s *Service) Neighbors(ctx context.Context, repo cli.RepoRef, kind string, number int, limit int) (*NeighborsResult, error)
Neighbors returns a bounded, ranked list of threads most similar to the query thread. Results include transparent scores, reasons, and the source revision of the candidate population. No network access occurs.
func (*Service) NewMCPRunner ¶
NewMCPRunner returns a cli.MCPRunner backed by the service.
func (*Service) OpportunityReadiness ¶
func (s *Service) OpportunityReadiness(ctx context.Context, opportunityID string) (*cli.ReadinessResult, error)
OpportunityReadiness evaluates local, source-backed readiness checks for one opportunity.
func (*Service) PlanArchiveSync ¶ added in v0.8.0
func (s *Service) PlanArchiveSync(_ context.Context, repo cli.RepoRef, opts cli.ArchiveSyncOptions) (*cli.SyncPlanResult, error)
PlanArchiveSync computes the conservative request ceiling before resolving a GitHub reader or opening the corpus.
func (*Service) PlanCodePrune ¶ added in v0.9.0
func (s *Service) PlanCodePrune(ctx context.Context, repo string, keepLatest int) (*cli.CorpusPruneResult, error)
PlanCodePrune previews derived code snapshots eligible for deletion.
func (*Service) PlanRepositoryRemoval ¶ added in v0.9.0
func (s *Service) PlanRepositoryRemoval(ctx context.Context, repo string) (*cli.CorpusRepositoryRemovalResult, error)
PlanRepositoryRemoval previews the exact repository-owned removal scope.
func (*Service) PrepareIssue ¶
func (s *Service) PrepareIssue(ctx context.Context, opportunityID string, opts cli.PrepareIssueOptions) (*cli.DraftResult, error)
PrepareIssue renders and stores an issue draft for an opportunity.
func (*Service) PreparePullRequest ¶
func (s *Service) PreparePullRequest(ctx context.Context, opportunityID string, opts cli.PreparePROptions) (*cli.DraftResult, error)
PreparePullRequest renders and stores a pull request draft for an opportunity.
func (*Service) PrepareReviewForCLI ¶
func (s *Service) PrepareReviewForCLI(ctx context.Context, opportunityID, workspaceID string) (any, error)
PrepareReviewForCLI creates a local review report from an opportunity and workspace.
func (*Service) PrepareReviewReport ¶
func (s *Service) PrepareReviewReport(ctx context.Context, input PrepareReviewReportInput) (*ReviewReport, error)
PrepareReviewReport assembles a review report for an opportunity and/or workspace.
func (*Service) PromoteOpportunity ¶
func (s *Service) PromoteOpportunity(ctx context.Context, hypothesisID, problem, scope, impact, effort string, confidence float64) (*cli.OpportunityResult, error)
PromoteOpportunity converts a proposed hypothesis into an opportunity.
func (*Service) PromoteOpportunityWithInput ¶
func (s *Service) PromoteOpportunityWithInput(ctx context.Context, hypothesisID string, input investigation.PromoteOpportunityInput) (*investigation.Opportunity, error)
PromoteOpportunityWithInput promotes a hypothesis with dependencies and maintainer-alignment evidence.
func (*Service) PullRequestCollisions ¶
func (s *Service) PullRequestCollisions(ctx context.Context, repo cli.RepoRef, number int, limit int) (*PullRequestCollisionResult, error)
PullRequestCollisions returns a bounded, ranked list of open pull requests that may collide with the query PR. It uses only existing local data: base branch from the stored PR payload, explicit cross-references in the title/body, and shared author. No network access occurs and no semantic file overlap is invented.
func (*Service) RebuildCorpusProjection ¶ added in v0.9.0
func (s *Service) RebuildCorpusProjection(ctx context.Context, name string) (*cli.CorpusProjectionResult, error)
RebuildCorpusProjection explicitly replaces one derived search projection.
func (*Service) RecordContribution ¶
func (s *Service) RecordContribution(ctx context.Context, opts cli.RecordContributionOptions) (*cli.ContributionResult, error)
RecordContribution stores prepared or submitted contribution metadata for an opportunity, keeping it separate from live GitHub state.
func (*Service) RecordContributionOutcome ¶
func (s *Service) RecordContributionOutcome(ctx context.Context, opts cli.RecordContributionOutcomeOptions) (*cli.ContributionOutcomeResult, error)
RecordContributionOutcome stores a lifecycle outcome for a contribution.
func (*Service) RecordEvidence ¶
func (s *Service) RecordEvidence(ctx context.Context, input RecordEvidenceInput) (*evidence.Evidence, error)
RecordEvidence stores an evidence item scoped to its parent workflow.
func (*Service) RecordEvidenceForCLI ¶
func (s *Service) RecordEvidenceForCLI(ctx context.Context, opts cli.RecordEvidenceOptions) (any, error)
RecordEvidenceForCLI maps CLI evidence fields to the application evidence model.
func (*Service) RecordTriageEvent ¶
func (s *Service) RecordTriageEvent(ctx context.Context, opts cli.RecordTriageEventOptions) (*cli.TriageEventResult, error)
RecordTriageEvent records a local triage or feedback outcome for a typed target.
func (*Service) RefreshClusters ¶ added in v0.8.0
func (s *Service) RefreshClusters(ctx context.Context, repo cli.RepoRef) (*cli.ClusterRefreshResult, error)
RefreshClusters explicitly computes and persists the duplicate-candidate projection for a repository.
func (*Service) RepositoryHealth ¶
RepositoryHealth returns a deterministic repository health report derived from already stored corpus facts. It performs no network access.
func (*Service) RepositoryHealthWithOptions ¶
func (s *Service) RepositoryHealthWithOptions(ctx context.Context, repo cli.RepoRef, opts health.Options) (*health.Report, error)
RepositoryHealthWithOptions returns a deterministic repository health report using the provided analysis window and stale threshold.
func (*Service) RestoreCorpus ¶ added in v0.9.0
func (s *Service) RestoreCorpus(ctx context.Context, source, safetyBackup string) (*cli.CorpusRestoreResult, error)
RestoreCorpus replaces the corpus from a verified backup after safety backup.
func (*Service) RunHistory ¶
RunHistory returns bounded durable run metadata.
func (*Service) RunValidation ¶
func (s *Service) RunValidation(ctx context.Context, id string, opts cli.RunValidationOptions) (*cli.ValidationRunResult, error)
RunValidation executes a stored validation definition against the base or candidate workspace.
func (*Service) RuntimeContract ¶ added in v0.9.0
RuntimeContract reports immutable executable compatibility metadata.
func (*Service) Search ¶
func (s *Service) Search(ctx context.Context, query string, opts cli.SearchOptions) (*cli.SearchResult, error)
Search performs a local-only corpus search and supports repo and kind filters.
func (*Service) SetArchiveFetcher ¶
func (s *Service) SetArchiveFetcher(f discovery.ArchiveFetcher)
SetArchiveFetcher overrides the GH Archive fetcher. It is intended for tests.
func (*Service) SetCollisionForCLI ¶
func (s *Service) SetCollisionForCLI(ctx context.Context, id, status, rationale string) (any, error)
SetCollisionForCLI records a reviewed collision status and rationale.
func (*Service) SetDeepWikiReader ¶ added in v0.5.0
SetDeepWikiReader overrides the derived external knowledge reader. It is intended for tests and embedding.
func (*Service) SetGitHubReader ¶
SetGitHubReader overrides the GitHub reader. It is intended for tests.
func (*Service) SetOpportunityStatus ¶
func (s *Service) SetOpportunityStatus(ctx context.Context, id, status, rationale string) (*cli.OpportunityResult, error)
SetOpportunityStatus transitions an opportunity with a recorded rationale.
func (*Service) Setup ¶
func (s *Service) Setup(ctx context.Context, opts cli.SetupOptions) (*cli.SetupReport, error)
Setup initializes local state for one of three access modes. MCP-only setup copies the running native executable into a private product-owned directory; CLI-only setup installs the published command globally through npm; Both registers that verified global executable with selected coding clients. Installation failures stop before later configuration writes.
Dry-run setup validates and reports the same access-mode plan without invoking npm or writing local state. Setup performs no GitHub access and never executes repository-controlled code.
func (*Service) SetupWithProgress ¶ added in v0.3.0
func (s *Service) SetupWithProgress(ctx context.Context, opts cli.SetupOptions, observer cli.SetupObserver) (*cli.SetupReport, error)
SetupWithProgress applies setup while reporting phase changes to an optional observer owned by the interactive CLI adapter.
func (*Service) ShowEvidence ¶
func (s *Service) ShowEvidence(ctx context.Context, investigationID string) (*cli.EvidenceResult, error)
ShowEvidence returns the evidence packet for an investigation.
func (*Service) ShowInvestigation ¶
func (s *Service) ShowInvestigation(ctx context.Context, id string) (*cli.InvestigationResult, error)
ShowInvestigation returns an investigation by ID.
func (*Service) ShowOpportunity ¶
ShowOpportunity returns an opportunity by ID.
func (*Service) ShowSource ¶
ShowSource returns one saved discovery source from the local corpus.
func (*Service) ShowValidation ¶
ShowValidation returns a stored validation definition without executing it.
func (*Service) ShowWorkspace ¶
ShowWorkspace returns a workspace by ID with its current dirty state.
func (*Service) StartInvestigation ¶
func (s *Service) StartInvestigation(ctx context.Context, repo cli.RepoRef, commitSHA, lens string) (*cli.InvestigationResult, error)
StartInvestigation creates a new investigation scoped to a repository.
func (*Service) StartInvestigationFromThread ¶
func (s *Service) StartInvestigationFromThread(ctx context.Context, requested research.ThreadRef) (*cli.ThreadInvestigationResult, error)
StartInvestigationFromThread atomically creates an investigation and seed hypothesis from one exact local observation. It performs no network access or process execution.
func (*Service) Sync ¶
Sync fetches all repository threads. It preserves the original archive API while SyncWithOptions provides bounded incremental and exact refreshes.
func (*Service) SyncWithOptions ¶
func (s *Service) SyncWithOptions(ctx context.Context, repo cli.RepoRef, syncOpts SyncOptions) (*cli.SyncResult, error)
SyncWithOptions fetches a repository and a bounded thread selection from GitHub, then writes ordered observations to the local corpus.
func (*Service) TailSource ¶
func (s *Service) TailSource(ctx context.Context, name string, opts cli.TailOptions) (*cli.TailResult, error)
TailSource repeatedly advances a named source until cancellation. Each iteration is an ordinary idempotent crawl and therefore retains its own run record, checkpoint, request budget, and failure state.
func (*Service) ThreadResearchBrief ¶
func (s *Service) ThreadResearchBrief(ctx context.Context, ref research.ThreadRef) (*research.Brief, error)
ThreadResearchBrief builds a deterministic brief from the local corpus. It performs no network access, local mutation, or process execution.
func (*Service) TransitionHypothesis ¶
func (s *Service) TransitionHypothesis(ctx context.Context, hypothesisID, status, rationale string) (*investigation.Hypothesis, error)
TransitionHypothesis advances a hypothesis through its lifecycle with rationale.
func (*Service) TransitionHypothesisForCLI ¶
func (s *Service) TransitionHypothesisForCLI(ctx context.Context, id, status, rationale string) (any, error)
TransitionHypothesisForCLI validates and records a rationale-bearing status change.
func (*Service) UpdateHypothesis ¶
func (s *Service) UpdateHypothesis(ctx context.Context, hypothesisID string, input investigation.UpdateHypothesisInput) (*investigation.Hypothesis, error)
UpdateHypothesis deliberately overwrites a hypothesis with rationale.
func (*Service) UpdateHypothesisForCLI ¶
func (s *Service) UpdateHypothesisForCLI(ctx context.Context, id string, opts cli.HypothesisUpdateOptions) (any, error)
UpdateHypothesisForCLI maps CLI update options to the structured application input.
func (*Service) UpdateOpportunityCollisionStatus ¶
func (s *Service) UpdateOpportunityCollisionStatus(ctx context.Context, opportunityID, status, rationale string) (*investigation.Opportunity, error)
UpdateOpportunityCollisionStatus explicitly sets the collision status with rationale.
func (*Service) Upgrade ¶
func (s *Service) Upgrade(ctx context.Context, opts cli.UpgradeOptions) (*cli.UpgradeReport, error)
Upgrade checks npm for the latest release and updates persistent npm installations when explicitly authorized. It reports inspectable stages covering the npm launcher, private MCP runtime, configured client runtime, corpus schema compatibility, activation/restart action, and rollback limitations. It does not migrate the corpus or silently update an npx invocation.
func (*Service) WorkspaceDiff ¶
WorkspaceDiff returns the current diff of a workspace against its recorded base, including changed files and a suggested review order.
type SyncOptions ¶
type SyncOptions struct {
Kind string
State string
Since time.Time
Numbers []int
MaxPages int
MaxRequests int
}
SyncOptions bounds and filters an explicit repository synchronization.
type ThreadRef ¶
type ThreadRef struct {
Kind string `json:"kind"`
Owner string `json:"owner"`
Repo string `json:"repo"`
Number int `json:"number"`
}
ThreadRef identifies a thread with minimal fields.
type WorkspaceDiffResult ¶
type WorkspaceDiffResult struct {
ID string `json:"id"`
Repo cli.RepoRef `json:"repo"`
BaseSHA string `json:"base_sha"`
CandidateSHA string `json:"candidate_sha"`
MergeBase string `json:"merge_base"`
Dirty bool `json:"dirty"`
HasUntracked bool `json:"has_untracked"`
Diff string `json:"diff"`
ChangedFiles []string `json:"changed_files"`
ChangedFileCount int `json:"changed_file_count"`
DiffBytes int `json:"diff_bytes"`
ReviewOrder []ReviewStep `json:"review_order"`
}
WorkspaceDiffResult is the complete diff metadata for a workspace.
Source Files
¶
- acquisition.go
- app.go
- cli_extensions.go
- clustering.go
- collection.go
- contribution.go
- control.go
- corpus_lifecycle.go
- discovery.go
- doc.go
- dossier.go
- evidence.go
- evidence_freshness.go
- guidance.go
- health.go
- hydration.go
- hydration_repo.go
- investigation.go
- investigation_thread.go
- jobs.go
- lens.go
- mcp.go
- mcp_authored_sync.go
- mcp_jobs.go
- mcp_portfolio_relationships.go
- mcp_pr_health.go
- mcp_readiness.go
- mcp_repository_search.go
- mcp_scalable_operations.go
- mcp_scalable_reads.go
- mcp_v1.go
- neighbor_models.go
- neighbors.go
- radar.go
- radar_related_work.go
- reader.go
- readiness.go
- research.go
- research_reader.go
- runtime_contract.go
- search.go
- search_explain.go
- search_helpers.go
- setup.go
- surfaces_extra.go
- sync_budget.go
- sync_headers.go
- tracking.go
- tui.go
- upgrade.go
- upgrade_activation.go
- upgrade_stages.go
- workspace.go