Documentation
¶
Index ¶
- Constants
- Variables
- func InvalidArgument(field, message string, example map[string]any) error
- func Unavailable(code, message string, actions ...ToolCall) error
- type ActorBatchItem
- type ActorContributionCoverage
- type ActorCoverageOutput
- type ActorFacetReferenceOutput
- type ActorIdentityOutput
- type ActorOutput
- type ActorProfileOutput
- type ActorSelector
- type AdoptWorkspaceInput
- type AdoptWorkspaceOutput
- type AttachJUnitReportInput
- type AttachJUnitReportOutput
- type AttachValidationReceiptInput
- type BatchItem
- type BatchItemStatus
- type BuildRepositoryDossierInput
- type CancelJobInput
- type CatalogContract
- type CatalogRoute
- type CheckCollisionsInput
- type CheckDuplicatesInput
- type CheckMergeConflictsInput
- type CheckMergeConflictsOutput
- type CheckOutput
- type ClusterMemberOutput
- type ClusterOutput
- type ClusterSetOutput
- type ClusterTarget
- type CodeIndexArtifact
- type CodeIndexCoverageOutput
- type CodeIndexDocumentOutput
- type CodeIndexManifestOutput
- type CodeMatchOutput
- type CommitInventoryOutput
- type CommitPlanWarningOutput
- type CommitReconstructionOutput
- type CommitUnitOutput
- type ConcernInput
- type ConcernLinkOutput
- type ConcernListOutput
- type ConcernOutput
- type ConcernPromotionOutput
- type ConcernSummaryOutput
- type ContributionDisposition
- type ContributionOutput
- type ContributionPreflightCandidate
- type ContributionPreflightInput
- type ContributionPreflightOutput
- type CorpusReadProvenance
- type CorpusSnapshotArtifact
- type CoverageOutput
- type CoverageStageOutcome
- type CoverageTarget
- type CoverageTargetKind
- type CreateConcernInput
- type CreateWorkspaceInput
- type DeepWikiInput
- type DeepWikiOutput
- type DefineValidationInput
- type DossierOutput
- type DossierSections
- type DossierThreadOutput
- type DraftDiagnosticOutput
- type DraftInput
- type DraftOutput
- type DurableArtifactReference
- type EnsureCoverageInput
- type EnsureCoverageJobResult
- type EvidenceInput
- type EvidenceItem
- type EvidenceOutput
- type EvidenceSourceRevision
- type EvidenceSourceSubject
- type ExactCoverageThread
- type ExistingContributionOutput
- type ExplainMatchInput
- type ExplainMatchOutput
- type ExportManifestInput
- type ExternalValidationReceiptOutput
- type FacetCoverageOutput
- type FindClustersInput
- type FindClustersOutput
- type FindNeighborsInput
- type FindNeighborsOutput
- type FindPortfolioOverlapsInput
- type FindPortfolioOverlapsOutput
- type FindPrecedentsInput
- type FindPrecedentsOutput
- type FindRelatedWorkInput
- type FindRelatedWorkOutput
- type FixPatternCluster
- type FixPatternCoverage
- type FixPatternExample
- type FixPatternHydrationFailure
- type FixPatternOutcome
- type FixPatternOutcomeCounts
- type FixPatternProofStyle
- type FixPatternRelatedKind
- type FixPatternRelationship
- type FixPatternReport
- type FixPatternReportStatus
- type FixPatternSymptom
- type FixPatternTimeWindow
- type FollowUpAction
- type ForkFreshnessOutput
- type GetActorFacetsInput
- type GetActorFacetsOutput
- type GetActorsInput
- type GetActorsOutput
- type GetCatalogContractInput
- type GetCoverageInput
- type GetCoverageOutput
- type GetJobInput
- type GetJobOutput
- type GetJobsInput
- type GetJobsOutput
- type GetRepositoriesInput
- type GetRepositoriesOutput
- type GetSourceAuditWorkflowInput
- type GetThreadFacetsInput
- type GetThreadFacetsOutput
- type GetThreadsInput
- type GetThreadsOutput
- type GitHubAcquisitionProvenance
- type GitHubRateOutput
- type GitHubThreadSearchArtifact
- type GitHubThreadSearchArtifactItem
- type GitHubThreadSearchCompleteness
- type HydrateThreadsInput
- type HypothesisOutput
- type HypothesisSummary
- type ImportExternalEvidenceManifestInput
- type ImportExternalEvidenceManifestOutput
- type IndexPullRequestFeedbackInput
- type IndexRepositoriesInput
- type IndexRepositoryInput
- type InspectCommitChangesInput
- type InvestigationInput
- type InvestigationOutput
- type IssueSetDuplicateCluster
- type IssueSetGap
- type IssueSetLinkageCandidate
- type IssueSetRelatedWork
- type JobArtifactFailure
- type JobArtifactReference
- type JobExecutionState
- type JobFollowUp
- type JobOutcome
- type JobReference
- type JobStatus
- type LensInput
- type LensOutput
- type LinkConcernInput
- type LinkPullRequestInput
- type LinkPullRequestOutput
- type ListConcernsInput
- type ListOpportunitiesInput
- type ListOpportunitiesOutput
- type ListPullRequestPortfolioInput
- type ListPullRequestPortfolioOutput
- type LocalContributionMatch
- type ManifestInput
- type ManifestOutput
- type ManifestPullRequestInput
- type MergeConflictInput
- type MergeConflictOutput
- type MineRepositoryFixPatternsInput
- type NeighborOutput
- type NeighborSetOutput
- type NonNegativeInt
- type OpportunityCandidateOutput
- type OpportunityInput
- type OpportunityOutput
- type OpportunityRelatedWorkOutput
- type OpportunitySummary
- type PlanSemanticCommitsInput
- type PortfolioOverlapEvidenceOutput
- type PortfolioOverlapMatchOutput
- type PortfolioOverlapOutput
- type PortfolioSubjectInput
- type PrecedentOutput
- type PrecedentSet
- type PrepareContributionInput
- type PrepareIssueSetInput
- type PrepareIssueSetOutput
- type PreparedIssueEvidence
- type PreviewRepositoryFixPatternsInput
- type Probability
- type ProgressPercent
- type PromoteConcernInput
- type PromoteOpportunityInput
- type PublishedDraftDifferenceOutput
- type PublishedDraftVerificationOutput
- type PullRequestCheckOutput
- type PullRequestCheckTransition
- type PullRequestFeedbackMatch
- type PullRequestPortfolioItem
- type RadarScore
- type RankOpportunitiesInput
- type RankOpportunitiesOutput
- type ReadSourceFilesInput
- type ReadSourceFilesOutput
- type Reader
- type ReadinessCheck
- type ReadinessInput
- type ReadinessOutput
- type RecordHypothesisInput
- type RecoveryPlan
- type RelatedContributionThread
- type RepoInput
- type RepositoryMetadataOutput
- type RepositoryOpportunitySummaryOutput
- type RepositoryOutput
- type RepositoryRef
- type RepositorySearchMatch
- type ResourceReadAction
- type RunValidationInput
- type SearchActorsInput
- type SearchActorsOutput
- type SearchCodeBatchInput
- type SearchCodeBatchOutput
- type SearchCodeInput
- type SearchCodeOutput
- type SearchContributionsInput
- type SearchContributionsOutput
- type SearchGitHubRepositoriesInput
- type SearchGitHubRepositoriesOutput
- type SearchGitHubThreadsInput
- type SearchGitHubThreadsOutput
- type SearchGitHubUsersInput
- type SearchGitHubUsersOutput
- type SearchInput
- type SearchOutput
- type SearchPullRequestFeedbackInput
- type SearchPullRequestFeedbackOutput
- type SearchRepositoriesInput
- type SearchRepositoriesOutput
- type SearchWarning
- type SemanticCommitGroupInput
- type SemanticCommitGroupOutput
- type SemanticCommitPlanOutput
- type SetConcernStatusInput
- type SimilarityScore
- type SnapshotReadAction
- type SourceAuditWorkflow
- type SourceBundleArtifact
- type SourceBundleCompleteness
- type SourceFileBatchItem
- type SourceFileOutput
- type SourceFileRequest
- type SourceFileStatus
- type SourceRef
- type StartInvestigationInput
- type SyncCIFailuresInput
- type SyncPortfolioInput
- type SyncPullRequestFeedbackInput
- type SyncRepositoryContextInput
- type SyncThreadsInput
- type SyncUserContributionsInput
- type SyncUserFacetInput
- type SyncUserPinnedItemsInput
- type SyncUserRepositoriesInput
- type SyncUsersInput
- type ThreadByNumberInput
- type ThreadFacetOutput
- type ThreadFacetsOutput
- type ThreadInput
- type ThreadOutput
- type ThreadRef
- type ToolCall
- type ToolError
- type TypedRepositoryOutput
- type UnresolvedCommitUnitInput
- type UnresolvedCommitUnitOutput
- type UpdateConcernInput
- type ValidationExpectedObservation
- type ValidationObservationContract
- type ValidationOutput
- type VerifyPublishedDraftInput
- type WaitPullRequestChecksInput
- type WaitPullRequestChecksOutput
- type WorkflowAuthority
- type WorkflowTransition
- type WorkspaceResource
Constants ¶
const ( ToolSearchGitHubUsers = "github.search_users" ToolSyncUsers = "github.sync_users" ToolSyncUserSocialAccounts = "github.sync_user_social_accounts" ToolSyncUserOrganizations = "github.sync_user_organizations" ToolSyncUserPinnedItems = "github.sync_user_pinned_items" ToolSyncUserRepositories = "github.sync_user_repositories" ToolSyncUserContributions = "github.sync_user_contributions" ToolSearchActors = "corpus.search_actors" ToolGetActors = "corpus.get_actors" ToolGetActorFacets = "corpus.get_actor_facets" ToolSearchContributions = "corpus.search_contributions" )
const ( DefaultFixPatternCandidateLimit = 100 DefaultFixPatternHydrationLimit = 25 DefaultFixPatternRepresentativeLimit = 5 )
const ( DeepWikiMinOutputBytes = 1024 DeepWikiDefaultOutputBytes = 32 * 1024 DeepWikiMaxOutputBytes = 1024 * 1024 )
DeepWikiInput selects one bounded external derived-knowledge read. DeepWiki results are context, not authority for current GitHub state.
const ( ToolSearchRepositories = "corpus.search_repositories" ToolSearchThreads = "corpus.search_threads" ToolSearchCode = "corpus.search_code_legacy" ToolSearchCodeBatch = "corpus.search_code" ToolGetRepositories = "corpus.get_repositories" ToolGetThreads = "corpus.get_threads" ToolGetThreadFacets = "corpus.get_thread_facets" ToolRankThreads = "corpus.rank_contribution_candidates" ToolFindPrecedents = "corpus.find_precedents" ToolPrepareIssueSet = "workflow.prepare_issue_set" ToolExplainMatch = "corpus.explain_match" ToolFindClusters = "corpus.find_clusters" ToolFindNeighbors = "corpus.find_neighbors" ToolGetCoverage = "corpus.get_coverage" ToolEnsureCoverage = "corpus.ensure_coverage" ToolGetSourceAuditWorkflow = "workflow.get_source_audit_contract" ToolGetCatalogContract = "workflow.get_catalog_contract" ToolBuildRepositoryDossier = "workflow.build_repository_dossier" ToolMineRepositoryFixPatterns = "workflow.mine_repository_fix_patterns" ToolPreviewRepositoryFixPatterns = "corpus.preview_fix_patterns" ToolGetJob = "jobs.get" ToolCancelJob = "jobs.cancel" ToolSearchGitHubRepositories = "github.search_repositories" ToolSearchGitHubThreads = "github.search_threads" ToolReadSourceFiles = "github.read_source_files" ToolSyncRepositoryContext = "github.sync_repository_context" ToolSyncThreads = "github.sync_threads" ToolHydrateThreads = "github.sync_thread_facets" ToolSyncPortfolio = "github.sync_pull_request_portfolio" ToolPreflightContribution = "workflow.preflight_contribution" ToolSyncPullRequestFeedback = "github.sync_pull_request_feedback" ToolWaitPullRequestChecks = "github.wait_pull_request_checks" ToolIndexPullRequestFeedback = "github.index_pull_request_feedback" ToolSyncCIFailures = "github.sync_pull_request_ci" ToolSearchPullRequestFeedback = "corpus.search_pull_request_feedback" ToolListPullRequestPortfolio = "corpus.search_pull_requests" ToolFindPortfolioOverlaps = "corpus.find_pull_request_overlaps" ToolIndexRepositories = "code.index_repositories" ToolPreparePullRequests = "workspace.prepare_pull_requests" ToolCheckMergeConflicts = "workspace.check_merge_conflicts" ToolInspectCommitChanges = "workspace.inspect_commit_changes" ToolPlanSemanticCommits = "workspace.plan_semantic_commits" ToolQueryDeepWiki = "research.query_deepwiki" ToolCreateWorkspace = "workspace.create" ToolAdoptWorkspace = "workspace.adopt" ToolDefineValidation = "validation.define" ToolRunValidation = "validation.run" ToolAttachValidationReceipt = "validation.attach_receipt" ToolImportExternalEvidence = "evidence.import_manifest" ToolAttachJUnitReport = "validation.attach_junit_report" ToolStartInvestigation = "workflow.start_investigation" ToolRecordHypothesis = "workflow.record_hypothesis" ToolFindRelatedWork = "workflow.find_related_work" ToolPromoteOpportunity = "workflow.promote_opportunity" ToolPrepareContribution = "workflow.prepare_contribution" ToolVerifyPublishedDraft = "workflow.verify_published_draft" ToolExportManifest = "workflow.export_manifest" ToolLinkPullRequest = "workflow.link_pull_request" )
Canonical MCP tool names group operations by capability and side-effect boundary.
const CatalogContractVersion = "gitcontribute.catalog.v1"
const RecoveryPlanVersion = "gitcontribute.recovery.v1"
const SourceAuditWorkflowVersion = "gitcontribute.source-audit.v1"
Variables ¶
var ErrNotFound = failure.NotFound(nil)
ErrNotFound lets readers distinguish absent corpus objects from failures.
Functions ¶
func InvalidArgument ¶
InvalidArgument reports one agent-correctable request error.
func Unavailable ¶ added in v0.13.0
Unavailable reports an agent-readable terminal state with explicit recovery actions. It is used when retrying the same read cannot make the object available without a distinct acquisition or build step.
Types ¶
type ActorBatchItem ¶ added in v1.0.0
type ActorBatchItem[T any] struct { Key string `json:"key"` Status string `json:"item_status" jsonschema:"complete, retryable, unavailable, or failed"` Reason string `json:"reason,omitempty"` Message string `json:"message,omitempty"` Value *T `json:"value,omitempty"` }
ActorBatchItem is intentionally small: actor reads report item state without embedding the catalog-wide workflow recovery union in every result schema.
type ActorContributionCoverage ¶ added in v1.0.0
type ActorContributionCoverage struct {
ActorID string `json:"actor_id"`
Facet ActorCoverageOutput `json:"facet"`
}
type ActorCoverageOutput ¶ added in v1.0.0
type ActorCoverageOutput struct {
Facet string `json:"facet"`
Status string `json:"status" jsonschema:"Coverage status: complete, paginated, truncated, unknown, retryable, or unavailable"`
ObservedAt string `json:"observed_at,omitempty"`
SourceUpdatedAt string `json:"source_updated_at,omitempty"`
AuthorizationScope string `json:"authorization_scope,omitempty"`
PeriodFrom string `json:"period_from,omitempty"`
PeriodTo string `json:"period_to,omitempty"`
OrganizationNodeID string `json:"organization_node_id,omitempty"`
Truncated bool `json:"truncated,omitempty"`
Reason string `json:"reason,omitempty"`
}
type ActorFacetReferenceOutput ¶ added in v1.0.0
type ActorFacetReferenceOutput struct {
ActorID string `json:"actor_id"`
Facets []ActorCoverageOutput `json:"facets"`
URIs []string `json:"uris,omitempty"`
}
type ActorIdentityOutput ¶ added in v1.0.0
type ActorOutput ¶ added in v1.0.0
type ActorOutput struct {
ActorIdentityOutput
Profile *ActorProfileOutput `json:"profile,omitempty"`
Coverage []ActorCoverageOutput `json:"coverage"`
URI string `json:"uri"`
}
type ActorProfileOutput ¶ added in v1.0.0
type ActorProfileOutput struct {
Name *string `json:"name,omitempty"`
AvatarURL *string `json:"avatar_url,omitempty"`
Bio *string `json:"bio,omitempty"`
Company *string `json:"company,omitempty"`
Location *string `json:"location,omitempty"`
WebsiteURL *string `json:"website_url,omitempty"`
PublicEmail *string `json:"public_email,omitempty"`
TwitterUsername *string `json:"twitter_username,omitempty"`
Hireable *bool `json:"hireable,omitempty"`
Followers *int `json:"followers,omitempty"`
Following *int `json:"following,omitempty"`
PublicRepositories *int `json:"public_repositories,omitempty"`
PublicGists *int `json:"public_gists,omitempty"`
ProviderCreatedAt string `json:"provider_created_at,omitempty"`
}
type ActorSelector ¶ added in v1.0.0
type ActorSelector struct {
Type string `json:"type" jsonschema:"Identity selector: login or node_id"`
Login string `json:"login,omitempty" jsonschema:"GitHub login when type is login"`
NodeID string `json:"node_id,omitempty" jsonschema:"GitHub GraphQL node ID when type is node_id"`
}
ActorSelector is a discriminated exact GitHub identity selector.
type AdoptWorkspaceInput ¶
type AdoptWorkspaceInput struct {
InvestigationID string `json:"investigation_id" jsonschema:"Investigation ID"`
Path string `json:"path" jsonschema:"Existing local worktree root"`
BaseRef string `json:"base_ref" jsonschema:"Base ref already available in the repository"`
Name string `json:"name,omitempty" jsonschema:"Workspace name; defaults to a generated ID"`
}
AdoptWorkspaceInput identifies an existing local worktree and an already available base revision. Adoption never fetches or changes the worktree.
type AdoptWorkspaceOutput ¶
type AdoptWorkspaceOutput struct {
ID string `json:"id" jsonschema:"Workspace ID"`
InvestigationID string `json:"investigation_id" jsonschema:"Investigation ID"`
Owner string `json:"owner" jsonschema:"Repository owner"`
Repo string `json:"repo" jsonschema:"Repository name"`
BaseSHA string `json:"base_sha" jsonschema:"Resolved base commit"`
CandidateSHA string `json:"candidate_sha" jsonschema:"Worktree HEAD observed during adoption"`
MergeBase string `json:"merge_base" jsonschema:"Merge base of base and candidate commits"`
Dirty bool `json:"dirty" jsonschema:"Whether tracked or untracked changes were observed"`
HasUntracked bool `json:"has_untracked" jsonschema:"Whether untracked non-ignored files were observed"`
Ownership string `json:"ownership" jsonschema:"Workspace ownership classification"`
}
AdoptWorkspaceOutput deliberately omits host paths and remote URLs.
type AttachJUnitReportInput ¶ added in v1.1.0
type AttachJUnitReportOutput ¶ added in v1.1.0
type AttachJUnitReportOutput struct {
RunID string `json:"run_id"`
Schema string `json:"schema"`
RawSHA256 string `json:"raw_sha256,omitempty"`
Total int `json:"total"`
Passed int `json:"passed"`
Failed int `json:"failed"`
Skipped int `json:"skipped"`
Errored int `json:"errored"`
Unknown int `json:"unknown"`
Incomplete bool `json:"incomplete"`
ParseError string `json:"parse_error,omitempty"`
}
type AttachValidationReceiptInput ¶ added in v0.14.0
type AttachValidationReceiptInput struct {
ReceiptJSON string `json:"receipt_json" jsonschema:"External validation receipt JSON using gitcontribute.external-validation.v1; maximum 2 MiB"`
}
type BatchItem ¶
type BatchItem[T any] struct { Key string `json:"key"` Status BatchItemStatus `json:"item_status"` Value *T `json:"value,omitempty"` Reason string `json:"reason,omitempty"` Message string `json:"message,omitempty"` RetryAfterMS NonNegativeInt `json:"retry_after_ms,omitempty"` Recovery *RecoveryPlan `json:"recovery,omitempty"` }
BatchItem reports the outcome for one input-derived key while preserving input order. Value may be present for readable but incomplete items; recovery fields explain retryable, unavailable, or failed outcomes without failing unrelated work.
type BatchItemStatus ¶ added in v0.14.0
type BatchItemStatus string
BatchItemStatus describes the outcome of one item in a bounded batch.
type BuildRepositoryDossierInput ¶
type BuildRepositoryDossierInput RepoInput
BuildRepositoryDossierInput selects a repository for durable dossier generation.
type CancelJobInput ¶
type CancelJobInput struct {
IDs []string `json:"ids" jsonschema:"One to 100 durable job IDs"`
}
CancelJobInput selects durable jobs for bounded, persisted cancellation.
type CatalogContract ¶ added in v1.0.0
type CatalogContract struct {
SchemaVersion string `json:"schema_version"`
ServerName string `json:"server_name"`
ServerVersion string `json:"server_version"`
CatalogMode string `json:"catalog_mode"`
CatalogFingerprint string `json:"catalog_fingerprint"`
ToolCount int `json:"tool_count"`
PullRequestFeedback CatalogRoute `json:"pull_request_feedback"`
}
CatalogContract is a compact, model-visible parity record for the actual post-registration MCP catalog. It helps clients distinguish an old or restricted server from an implementation that lacks a capability.
type CatalogRoute ¶ added in v1.0.0
type CatalogRoute struct {
IndexTool string `json:"index_tool"`
SyncTool string `json:"sync_tool"`
SearchTool string `json:"search_tool"`
IndexAdvertised bool `json:"index_advertised"`
SyncAdvertised bool `json:"sync_advertised"`
SearchAdvertised bool `json:"search_advertised"`
CanonicalAsyncChain []string `json:"canonical_async_chain"`
GenericTextSearchBoundary string `json:"generic_text_search_boundary"`
}
CatalogRoute describes one canonical workflow route and whether each capability survived runtime registration and read-only filtering.
type CheckCollisionsInput ¶
type CheckCollisionsInput CheckDuplicatesInput
CheckCollisionsInput selects a hypothesis or opportunity for collision analysis.
type CheckDuplicatesInput ¶
type CheckDuplicatesInput struct {
Target string `json:"target" jsonschema:"Target scope: hypothesis or opportunity"`
ID string `json:"id" jsonschema:"Hypothesis or opportunity ID"`
Limit int `json:"limit,omitempty" jsonschema:"Maximum findings from 1 to 100"`
}
CheckDuplicatesInput selects a hypothesis or opportunity for duplicate analysis.
type CheckMergeConflictsInput ¶
type CheckMergeConflictsInput struct {
Comparisons []MergeConflictInput `json:"comparisons" jsonschema:"One to 50 already-fetched revision comparisons"`
}
CheckMergeConflictsInput selects local revision comparisons.
type CheckMergeConflictsOutput ¶
type CheckMergeConflictsOutput struct {
Status string `json:"batch_status"`
Items []BatchItem[MergeConflictOutput] `json:"items"`
}
CheckMergeConflictsOutput preserves comparison order and isolates local Git failures to the affected comparison.
type CheckOutput ¶
type CheckOutput struct {
Status string `json:"status" jsonschema:"complete, unavailable, or partial"`
Coverage string `json:"coverage" jsonschema:"complete or unknown; unknown coverage is not evidence of absence"`
Target string `json:"target"`
ID string `json:"id"`
Repo string `json:"repo,omitempty"`
Query string `json:"query,omitempty"`
Total int `json:"total"`
Findings []EvidenceItem `json:"findings,omitempty"`
SourceRevision string `json:"source_revision,omitempty"`
Limit int `json:"limit"`
Truncated bool `json:"truncated"`
Recovery *RecoveryPlan `json:"recovery,omitempty"`
}
CheckOutput contains evidence-backed duplicate or collision findings.
type ClusterMemberOutput ¶
type ClusterMemberOutput struct {
Kind string `json:"kind"`
Owner string `json:"owner"`
Repo string `json:"repo"`
Number int `json:"number"`
Title string `json:"title,omitempty"`
State string `json:"state,omitempty"`
Score SimilarityScore `json:"score"`
Reason string `json:"reason"`
Included bool `json:"included"`
}
ClusterMemberOutput describes one member of a duplicate cluster.
type ClusterOutput ¶
type ClusterOutput struct {
StableID string `json:"stable_id"`
State string `json:"state"`
Canonical ClusterMemberOutput `json:"canonical"`
MemberCount int `json:"member_count"`
Members []ClusterMemberOutput `json:"members,omitempty"`
}
ClusterOutput contains a stable duplicate cluster and its canonical member.
type ClusterSetOutput ¶ added in v0.13.0
type ClusterSetOutput struct {
Owner string `json:"owner"`
Repo string `json:"repo"`
RuleVersion similarity.RuleVersion `json:"rule_version,omitempty"`
Total int `json:"total"`
Clusters []ClusterOutput `json:"clusters"`
Truncated bool `json:"truncated" jsonschema:"Whether more clusters matched"`
Recovery *RecoveryPlan `json:"recovery,omitempty"`
}
ClusterSetOutput contains duplicate clusters for one repository target.
type ClusterTarget ¶ added in v0.13.0
type ClusterTarget struct {
Owner string `json:"owner" jsonschema:"GitHub repository owner"`
Repo string `json:"repo" jsonschema:"GitHub repository name"`
Kind string `json:"kind,omitempty" jsonschema:"Optional member kind: issue or pull_request"`
Number int `json:"number,omitempty" jsonschema:"Optional positive member number"`
}
ClusterTarget selects one repository or one exact cluster member.
type CodeIndexArtifact ¶ added in v0.17.0
type CodeIndexArtifact struct {
Kind string `json:"kind"`
ID string `json:"id"`
Repository RepositoryRef `json:"repository"`
CommitSHA string `json:"commit_sha"`
ManifestID string `json:"manifest_id"`
ManifestSHA256 string `json:"manifest_sha256"`
SnapshotToken string `json:"snapshot_token"`
CoverageKnown bool `json:"coverage_known"`
Manifest CodeIndexManifestOutput `json:"manifest"`
SchemaVersion string `json:"schema_version"`
TotalBytes NonNegativeInt `json:"total_bytes"`
Documents []CodeIndexDocumentOutput `json:"documents"`
CreatedAt string `json:"created_at"`
Provenance map[string]string `json:"provenance"`
FileCount NonNegativeInt `json:"file_count"`
TrackedEntries NonNegativeInt `json:"tracked_entries"`
Truncated bool `json:"truncated"`
ResourceURI string `json:"resource_uri"`
FollowUp *JobFollowUp `json:"follow_up"`
}
CodeIndexArtifact is the typed, revision-bound handoff for one immutable indexed commit. The resource URI is canonical; callers must consume it with MCP resources/read rather than reconstructing a larger payload from fields.
type CodeIndexCoverageOutput ¶
type CodeIndexCoverageOutput struct {
Repo string `json:"repo"`
Status string `json:"status" jsonschema:"Index coverage state"`
Commit string `json:"commit"`
Truncated bool `json:"truncated" jsonschema:"Whether index limits omitted files"`
IndexedFiles int `json:"indexed_files" jsonschema:"Files indexed in this snapshot"`
TrackedEntries int `json:"tracked_entries" jsonschema:"Tracked tree entries considered"`
SkippedFiles int `json:"skipped_files" jsonschema:"Entries omitted by policy or limits"`
SkippedPolicy int `json:"skipped_policy" jsonschema:"Invalid, excluded, or non-regular entries"`
SkippedLimits int `json:"skipped_limits" jsonschema:"Entries omitted by file-size, total-size, or file-count bounds"`
SkippedNonText int `json:"skipped_non_text" jsonschema:"Entries omitted because content was binary or invalid UTF-8"`
Recovery *RecoveryPlan `json:"recovery,omitempty" jsonschema:"Typed action to acquire or re-index missing or incomplete code coverage"`
}
CodeIndexCoverageOutput reports one selected snapshot's indexing coverage.
type CodeIndexDocumentOutput ¶ added in v0.17.0
type CodeIndexDocumentOutput struct {
Path string `json:"path"`
SHA256 string `json:"sha256"`
Bytes NonNegativeInt `json:"bytes"`
Language string `json:"language,omitempty"`
}
type CodeIndexManifestOutput ¶ added in v0.17.0
type CodeIndexManifestOutput struct {
FormatVersion string `json:"format_version"`
CoverageKnown bool `json:"coverage_known"`
TrackedEntries int `json:"tracked_entries"`
IndexedFiles int `json:"indexed_files"`
SkippedInvalidPath int `json:"skipped_invalid_path"`
SkippedExcluded int `json:"skipped_excluded"`
SkippedNonRegular int `json:"skipped_non_regular"`
SkippedOversize int `json:"skipped_oversize"`
SkippedTotalBudget int `json:"skipped_total_budget"`
SkippedNonText int `json:"skipped_non_text"`
SkippedFileLimit int `json:"skipped_file_limit"`
Truncated bool `json:"truncated"`
}
type CodeMatchOutput ¶
type CodeMatchOutput struct {
ID string `json:"id"`
Repo string `json:"repo"`
Commit string `json:"commit"`
Path string `json:"path"`
Language string `json:"language,omitempty"`
Snippet string `json:"snippet"`
Bytes int `json:"bytes"`
}
CodeMatchOutput identifies one stored code match.
type CommitInventoryOutput ¶
type CommitInventoryOutput struct {
Units []CommitUnitOutput `json:"units" jsonschema:"Ordered assignable changes"`
Warnings []CommitPlanWarningOutput `json:"warnings,omitempty" jsonschema:"Conditions requiring explicit judgment"`
SourcePatchSHA256 string `json:"source_patch_sha256" jsonschema:"SHA-256 of the exact Git patch bytes"`
InventorySHA256 string `json:"inventory_sha256" jsonschema:"SHA-256 binding ordered tracked and untracked unit identities"`
}
CommitInventoryOutput freezes assignable units and exact source digests.
type CommitPlanWarningOutput ¶
type CommitPlanWarningOutput struct {
Code string `json:"code" jsonschema:"Stable warning code"`
Message string `json:"message" jsonschema:"Actionable warning explanation"`
Path string `json:"path,omitempty" jsonschema:"Affected repository-relative path"`
UnitID string `json:"unit_id,omitempty" jsonschema:"Affected assignable unit ID"`
}
CommitPlanWarningOutput flags changes needing explicit judgment.
type CommitReconstructionOutput ¶
type CommitReconstructionOutput struct {
SourcePatchSHA256 string `json:"source_patch_sha256" jsonschema:"SHA-256 of the exact Git patch bytes"`
InventorySHA256 string `json:"inventory_sha256" jsonschema:"Digest of every ordered source unit"`
AssignedSHA256 string `json:"assigned_sha256" jsonschema:"Digest of every uniquely assigned unit in source order"`
UnitCount int `json:"unit_count" jsonschema:"Total source units"`
AssignedCount int `json:"assigned_count" jsonschema:"Uniquely assigned units"`
Verified bool `json:"verified" jsonschema:"True only when every source unit is assigned exactly once"`
}
CommitReconstructionOutput proves exact one-to-one unit coverage.
type CommitUnitOutput ¶
type CommitUnitOutput struct {
ID string `json:"id" jsonschema:"Stable content-derived unit ID"`
Kind string `json:"kind" jsonschema:"Unit kind: hunk, file, or untracked"`
Path string `json:"path" jsonschema:"Repository-relative path"`
OldPath string `json:"old_path,omitempty" jsonschema:"Previous path for rename or copy changes"`
Operation string `json:"operation" jsonschema:"Git change operation"`
OldStart int32 `json:"old_start,omitempty" jsonschema:"Original hunk start line"`
OldLines int32 `json:"old_lines,omitempty" jsonschema:"Original hunk line count"`
NewStart int32 `json:"new_start,omitempty" jsonschema:"New hunk start line"`
NewLines int32 `json:"new_lines,omitempty" jsonschema:"New hunk line count"`
Patch string `json:"patch,omitempty" jsonschema:"Canonical hunk preview for semantic classification"`
ContentSHA256 string `json:"content_sha256" jsonschema:"Exact unit identity digest"`
Generated bool `json:"generated" jsonschema:"Path appears generated or snapshot-owned"`
WhitespaceOnly bool `json:"whitespace_only" jsonschema:"Hunk changes only whitespace"`
}
CommitUnitOutput is one indivisible file or hunk assignment unit.
type ConcernInput ¶ added in v0.15.0
type ConcernInput struct {
ID string `json:"id" jsonschema:"Concern ID"`
}
ConcernInput identifies one persisted local concern.
type ConcernLinkOutput ¶
type ConcernLinkOutput struct {
Kind string `json:"kind" jsonschema:"Relationship kind"`
TargetType string `json:"target_type" jsonschema:"Target record type"`
TargetID string `json:"target_id" jsonschema:"Target record ID"`
Note string `json:"note,omitempty" jsonschema:"Relationship note"`
}
ConcernLinkOutput is a transport-safe relationship.
type ConcernListOutput ¶
type ConcernListOutput struct {
Concerns []ConcernSummaryOutput `json:"concerns" jsonschema:"Bounded concern summaries with resource URIs"`
Limit int `json:"limit" jsonschema:"Effective result limit"`
Total int `json:"total" jsonschema:"Total matching concerns"`
Truncated bool `json:"truncated" jsonschema:"Whether more matching concerns exist"`
Offset int `json:"offset"`
NextOffset int `json:"next_offset,omitempty"`
Recovery *RecoveryPlan `json:"recovery,omitempty"`
}
ConcernListOutput contains one bounded offline result set.
type ConcernOutput ¶
type ConcernOutput struct {
ID string `json:"id" jsonschema:"Concern ID"`
Owner string `json:"owner" jsonschema:"Repository owner"`
Repo string `json:"repo" jsonschema:"Repository name"`
CommitSHA string `json:"commit_sha,omitempty" jsonschema:"Source commit SHA"`
WorkspaceID string `json:"workspace_id,omitempty" jsonschema:"Opaque workspace ID"`
Title string `json:"title" jsonschema:"Concern title"`
ProblemStatement string `json:"problem_statement" jsonschema:"Concern problem statement"`
SuspectedOwner string `json:"suspected_owner,omitempty" jsonschema:"Suspected ownership boundary"`
Confidence Probability `json:"confidence" jsonschema:"Confidence from 0 to 1"`
Unknowns []string `json:"unknowns,omitempty" jsonschema:"Explicit unknowns"`
SuccessCriterion string `json:"success_criterion,omitempty" jsonschema:"Proof or success criterion"`
Notes string `json:"notes,omitempty" jsonschema:"Local notes"`
EvidenceIDs []string `json:"evidence_ids,omitempty" jsonschema:"Linked evidence IDs"`
SourceRefCount int `json:"source_ref_count" jsonschema:"Number of private source references retained locally"`
Freshness string `json:"freshness" jsonschema:"Derived source freshness"`
FreshnessReason string `json:"freshness_reason" jsonschema:"Freshness explanation"`
Links []ConcernLinkOutput `json:"links,omitempty" jsonschema:"Explicit concern relationships"`
Status string `json:"status" jsonschema:"Concern lifecycle status"`
Promotion *ConcernPromotionOutput `json:"promotion,omitempty" jsonschema:"Downstream workflow identity"`
CreatedAt string `json:"created_at" jsonschema:"Creation time"`
UpdatedAt string `json:"updated_at" jsonschema:"Latest update time"`
}
ConcernOutput omits absolute paths and source-reference URLs.
type ConcernPromotionOutput ¶
type ConcernPromotionOutput struct {
Kind string `json:"kind" jsonschema:"Promotion target kind"`
InvestigationID string `json:"investigation_id" jsonschema:"Created investigation ID"`
HypothesisID string `json:"hypothesis_id" jsonschema:"Created hypothesis ID"`
OpportunityID string `json:"opportunity_id,omitempty" jsonschema:"Created opportunity ID"`
}
ConcernPromotionOutput preserves created downstream identities.
type ConcernSummaryOutput ¶ added in v0.15.0
type ConcernSummaryOutput struct {
ID string `json:"id" jsonschema:"Stable concern ID"`
Owner string `json:"owner" jsonschema:"Repository owner"`
Repo string `json:"repo" jsonschema:"Repository name"`
Title string `json:"title" jsonschema:"Concern title"`
Confidence Probability `json:"confidence" jsonschema:"Confidence from zero to one"`
Freshness string `json:"freshness" jsonschema:"Derived freshness state"`
Status string `json:"status" jsonschema:"Concern lifecycle status"`
UpdatedAt string `json:"updated_at" jsonschema:"Latest update time"`
URI string `json:"uri" jsonschema:"Exact opaque concern resource URI"`
}
ConcernSummaryOutput contains the triage fields needed before reading a concern resource.
type ContributionDisposition ¶ added in v0.14.0
type ContributionDisposition struct {
Status string `json:"status"`
Confidence string `json:"confidence"`
EvidenceRefs []string `json:"evidence_refs,omitempty"`
Unknowns []string `json:"unknowns,omitempty"`
Recovery *RecoveryPlan `json:"recovery,omitempty"`
}
ContributionDisposition is a conservative, evidence-backed recommendation made before an implementation workspace is created.
type ContributionOutput ¶ added in v1.0.0
type ContributionOutput struct {
ActorID string `json:"actor_id"`
Login string `json:"login"`
Kind string `json:"kind"`
Source string `json:"source"`
OccurredAt string `json:"occurred_at"`
RepositoryRef string `json:"repository_ref,omitempty"`
TargetNodeID string `json:"target_node_id,omitempty"`
TargetURL string `json:"target_url,omitempty"`
Restricted bool `json:"restricted"`
Count int `json:"count"`
}
type ContributionPreflightCandidate ¶ added in v0.19.0
type ContributionPreflightCandidate struct {
Title string `json:"title,omitempty" jsonschema:"Proposed issue or change title"`
Query string `json:"query,omitempty" jsonschema:"Optional focused search text; defaults to title"`
Body string `json:"body,omitempty" jsonschema:"Optional concise problem or change context"`
IssueNumber int `json:"issue_number,omitempty" jsonschema:"Related issue number when known"`
HeadRef string `json:"head_ref,omitempty" jsonschema:"Expected local or pull-request branch"`
HeadSHA string `json:"head_sha,omitempty" jsonschema:"Expected candidate commit SHA"`
ChangedFiles []string `json:"changed_files,omitempty" jsonschema:"Optional changed paths for local context"`
}
ContributionPreflightCandidate is intentionally descriptive rather than a durable workflow identity. At least one field should identify the proposed work; local branch and commit hints are especially useful for existing PRs.
type ContributionPreflightInput ¶ added in v0.19.0
type ContributionPreflightInput struct {
Repository RepositoryRef `json:"repository" jsonschema:"Repository being considered"`
Fork *RepositoryRef `` /* 133-byte string literal not displayed */
Candidate ContributionPreflightCandidate `json:"candidate" jsonschema:"Candidate title, issue, branch, or change context"`
WorkspacePaths []string `json:"workspace_paths,omitempty" jsonschema:"Optional local Git worktree roots to inspect"`
Limit int `json:"limit,omitempty" jsonschema:"Maximum authored pull requests and related threads to inspect from 1 to 100"`
MaxRequests int `json:"max_requests,omitempty" jsonschema:"Maximum bounded GitHub reads from 2 to 1000"`
}
ContributionPreflightInput describes one prospective contribution before any local opportunity or workspace is created. The operation is deliberately bounded and does not persist its observations.
type ContributionPreflightOutput ¶ added in v0.19.0
type ContributionPreflightOutput struct {
Status string `json:"status" jsonschema:"new_work, existing_pr, or coverage_unknown"`
Repository RepositoryRef `json:"repository"`
Identity string `json:"identity,omitempty"`
Existing *ExistingContributionOutput `json:"existing,omitempty"`
LocalMatches []LocalContributionMatch `json:"local_matches,omitempty"`
Related []RelatedContributionThread `json:"related,omitempty"`
ForkFreshness *ForkFreshnessOutput `json:"fork_freshness,omitempty"`
Coverage string `json:"coverage" jsonschema:"live_verified or coverage_unknown"`
CoverageReasons []string `json:"coverage_reasons,omitempty"`
NextAction string `json:"next_action"`
}
ContributionPreflightOutput is a routing decision, not a claim that all related work has been exhaustively enumerated.
type CorpusReadProvenance ¶ added in v0.17.0
type CorpusReadProvenance struct {
SnapshotToken string `json:"snapshot_token"`
Durable bool `json:"durable"`
ObservationWatermark int64 `json:"observation_watermark"`
QueryDigestSHA256 string `json:"query_digest_sha256"`
Complete bool `json:"complete"`
Truncated bool `json:"truncated"`
UnknownCoverage bool `json:"unknown_coverage"`
Limitations []string `json:"limitations,omitempty"`
ExternalContext []SourceRef `json:"external_context,omitempty"`
Recovery *RecoveryPlan `json:"recovery,omitempty"`
}
CorpusReadProvenance binds an offline result to the exact query and source observation it used. Transaction-bound identities are deliberately marked non-durable; callers that need cross-call reuse must request a persisted snapshot rather than treating a mutable projection as historical evidence.
type CorpusSnapshotArtifact ¶ added in v0.17.0
type CorpusSnapshotArtifact struct {
SnapshotToken string `json:"snapshot_token"`
ContractVersion string `json:"contract_version"`
ObservationWatermark int64 `json:"observation_watermark"`
Scope any `json:"scope"`
SourceManifestSHA256 string `json:"source_manifest_sha256"`
DerivedVersions any `json:"derived_versions"`
Completeness any `json:"completeness"`
Provenance any `json:"provenance"`
ArtifactKind string `json:"artifact_kind"`
ArtifactDigest string `json:"artifact_digest"`
Payload any `json:"payload"`
CreatedAt string `json:"created_at"`
}
type CoverageOutput ¶
type CoverageOutput struct {
Owner string `json:"owner"`
Repo string `json:"repo"`
Kind string `json:"kind,omitempty"`
Number int `json:"number,omitempty"`
AsOf string `json:"as_of"`
Facets []FacetCoverageOutput `json:"facets"`
}
CoverageOutput reports all known coverage for one repository or thread.
type CoverageStageOutcome ¶ added in v0.17.0
type CoverageStageOutcome struct {
Stage string `json:"stage"`
Status string `json:"status"`
Message string `json:"message,omitempty"`
Retryable bool `json:"retryable"`
RetryAfter NonNegativeInt `json:"retry_after_ms,omitempty"`
}
type CoverageTarget ¶
type CoverageTarget struct {
Type CoverageTargetKind `json:"type" jsonschema:"Target variant: repository or exact_thread"`
Repository RepositoryRef `json:"repository"`
Thread *ExactCoverageThread `json:"thread,omitempty"`
}
CoverageTarget is an explicit discriminated target. Thread is required only for exact_thread and forbidden for repository.
type CoverageTargetKind ¶ added in v0.17.0
type CoverageTargetKind string
const ( CoverageTargetRepository CoverageTargetKind = "repository" CoverageTargetExactThread CoverageTargetKind = "exact_thread" )
type CreateConcernInput ¶
type CreateConcernInput struct {
Owner string `json:"owner" jsonschema:"GitHub repository owner"`
Repo string `json:"repo" jsonschema:"GitHub repository name"`
CommitSHA string `json:"commit_sha,omitempty" jsonschema:"Source commit SHA; required unless workspace_id is set"`
WorkspaceID string `json:"workspace_id,omitempty" jsonschema:"Opaque workspace ID; required unless commit_sha is set"`
Title string `json:"title" jsonschema:"Concise concern title"`
ProblemStatement string `json:"problem_statement" jsonschema:"Observed or suspected problem"`
SuspectedOwner string `json:"suspected_owner,omitempty" jsonschema:"Suspected code ownership boundary"`
Confidence Probability `json:"confidence" jsonschema:"Confidence from 0 to 1"`
Unknowns []string `json:"unknowns,omitempty" jsonschema:"Explicit unknowns"`
SuccessCriterion string `json:"success_criterion,omitempty" jsonschema:"Proof or success criterion"`
Notes string `json:"notes,omitempty" jsonschema:"Local notes"`
EvidenceIDs []string `json:"evidence_ids,omitempty" jsonschema:"Existing local evidence IDs"`
SourceProvenance []EvidenceSourceRevision `json:"source_provenance,omitempty" jsonschema:"Exact stored source revisions used by this concern"`
}
CreateConcernInput records one repository concern and its provenance.
type CreateWorkspaceInput ¶
type CreateWorkspaceInput struct {
InvestigationID string `json:"investigation_id" jsonschema:"Investigation ID"`
Remote string `json:"remote,omitempty" jsonschema:"Git remote URL to clone; defaults to the investigation repository"`
BaseRef string `json:"base_ref,omitempty" jsonschema:"Base ref to resolve; defaults to the remote HEAD"`
CandidateRef string `json:"candidate_ref,omitempty" jsonschema:"Candidate ref to resolve; defaults to the investigation commit"`
Name string `json:"name,omitempty" jsonschema:"Workspace name; defaults to a generated ID"`
}
CreateWorkspaceInput configures a durable managed-workspace creation job.
type DeepWikiInput ¶
type DeepWikiInput struct {
Action string `json:"action" jsonschema:"structure, contents, or question"`
Repository string `json:"repository,omitempty" jsonschema:"OWNER/REPO for structure or contents"`
Repositories []string `json:"repositories,omitempty" jsonschema:"One to 10 OWNER/REPO values for question"`
Question string `json:"question,omitempty" jsonschema:"Focused cross-repository question"`
MaxOutputBytes int `` /* 186-byte string literal not displayed */
}
type DeepWikiOutput ¶
type DeepWikiOutput struct {
Status string `json:"status"`
Provider string `json:"provider"`
Action string `json:"action"`
Repositories []string `json:"repositories"`
Question string `json:"question,omitempty"`
Result string `json:"result,omitempty"`
SourceURL string `json:"source_url,omitempty"`
RetrievedAt string `json:"retrieved_at"`
Provenance string `json:"provenance"`
Truncated bool `json:"truncated"`
Reason string `json:"reason,omitempty"`
Recovery *RecoveryPlan `json:"recovery,omitempty"`
}
DeepWikiOutput labels provider prose as derived external content and reports provider-level unavailability without persisting the response.
type DefineValidationInput ¶
type DefineValidationInput struct {
InvestigationID string `json:"investigation_id" jsonschema:"Investigation ID"`
Kind string `json:"kind" jsonschema:"Validation kind"`
Command string `json:"command" jsonschema:"Shell-free command to execute"`
WorkspaceID string `json:"workspace_id,omitempty" jsonschema:"Managed workspace ID used for both run kinds"`
BaseWorkspaceID string `json:"base_workspace_id,omitempty" jsonschema:"Managed base workspace ID; requires candidate_workspace_id"`
CandidateWorkspaceID string `json:"candidate_workspace_id,omitempty" jsonschema:"Managed candidate workspace ID; requires base_workspace_id"`
Env []string `json:"env,omitempty" jsonschema:"Allowed environment variable names"`
Timeout string `json:"timeout,omitempty" jsonschema:"Positive Go duration; defaults to 30m"`
MaxOutputBytes int64 `json:"max_output_bytes,omitempty" jsonschema:"Maximum captured bytes per output stream; defaults to 65536"`
Observation *ValidationObservationContract `json:"observation,omitempty" jsonschema:"Expected bounded observations over captured base and candidate output"`
Protocol string `json:"protocol,omitempty" jsonschema:"Structured protocol adapter: mcp_stdio"`
ReadinessTimeout string `json:"readiness_timeout,omitempty" jsonschema:"Protocol initialization deadline; defaults to 30s"`
}
DefineValidationInput records a bounded validation command without executing it.
type DossierOutput ¶
type DossierOutput struct {
Owner string `json:"owner"`
Repo string `json:"repo"`
AsOf string `json:"as_of,omitempty"`
RecentItemsLimit NonNegativeInt `json:"recent_items_limit" jsonschema:"Maximum items retained in each recent-thread section"`
RecentItemsTruncated bool `json:"recent_items_truncated" jsonschema:"True when at least one recent-thread section is a bounded sample"`
Sections DossierSections `json:"sections"`
}
DossierOutput contains a persisted repository dossier snapshot.
type DossierSections ¶ added in v0.14.0
type DossierSections struct {
Description string `json:"description,omitempty"`
Language string `json:"language,omitempty"`
Stars NonNegativeInt `json:"stars"`
OpenIssues NonNegativeInt `json:"open_issues"`
ClosedIssues NonNegativeInt `json:"closed_issues"`
OpenPullRequests NonNegativeInt `json:"open_prs"`
MergedPullRequests NonNegativeInt `json:"merged_prs"`
ClosedUnmergedPullRequests NonNegativeInt `json:"closed_unmerged_prs"`
ClosedUnknownMergePullRequests NonNegativeInt `json:"closed_unknown_merge_prs"`
RecentMergedPullRequests []DossierThreadOutput `json:"recent_merged_prs"`
RecentOpenPullRequests []DossierThreadOutput `json:"recent_open_prs"`
RecentClosedUnmergedPullRequests []DossierThreadOutput `json:"recent_closed_unmerged_prs"`
RecentClosedUnknownPullRequests []DossierThreadOutput `json:"recent_closed_unknown_merge_prs"`
RecentIssues []DossierThreadOutput `json:"recent_issues"`
Guidance string `json:"guidance,omitempty"`
Coverage []string `json:"coverage" jsonschema:"Observed dossier facets; omitted facets are unknown"`
}
DossierSections is the stable typed projection of persisted dossier data.
type DossierThreadOutput ¶ added in v0.14.0
type DossierThreadOutput struct {
Number int `json:"number"`
Title string `json:"title"`
Author string `json:"author,omitempty"`
State string `json:"state"`
Draft bool `json:"draft,omitempty"`
CreatedAt string `json:"created_at,omitempty"`
UpdatedAt string `json:"updated_at,omitempty"`
ClosedAt string `json:"closed_at,omitempty"`
MergedAt string `json:"merged_at,omitempty"`
Labels []string `json:"labels,omitempty"`
}
DossierThreadOutput is one bounded recent thread summary.
type DraftDiagnosticOutput ¶ added in v0.14.0
type DraftInput ¶ added in v0.15.0
type DraftInput struct {
ID string `json:"id" jsonschema:"Draft ID"`
Revision int `json:"revision" jsonschema:"Positive draft revision"`
}
DraftInput identifies one immutable persisted contribution-draft revision.
type DraftOutput ¶
type DraftOutput struct {
ID string `json:"id"`
Revision int `json:"revision"`
OpportunityID string `json:"opportunity_id"`
Kind string `json:"kind"`
Repository string `json:"repository"`
Title string `json:"title"`
Body string `json:"body"`
TitleBytes int `json:"title_bytes"`
BodyBytes int `json:"body_bytes"`
TitleSHA256 string `json:"title_sha256"`
BodySHA256 string `json:"body_sha256"`
EvidenceIDs []string `json:"evidence_ids,omitempty"`
Warnings []DraftDiagnosticOutput `json:"warnings,omitempty"`
RenderedAt string `json:"rendered_at"`
ManifestID string `json:"manifest_id,omitempty" jsonschema:"Referenced stored evidence manifest ID"`
}
DraftOutput contains a rendered contribution draft.
type DurableArtifactReference ¶ added in v0.15.0
type DurableArtifactReference struct {
Kind string `json:"kind" jsonschema:"Persisted artifact kind"`
ID string `json:"id" jsonschema:"Stable artifact identifier"`
URI string `json:"uri" jsonschema:"Exact opaque MCP resource URI to read"`
}
DurableArtifactReference identifies a persisted object whose canonical detailed representation is available through MCP resources.
type EnsureCoverageInput ¶ added in v0.17.0
type EnsureCoverageInput struct {
Target CoverageTarget `json:"target" jsonschema:"Repository or exact-thread coverage target to seed and verify"`
Facets []string `json:"facets,omitempty" jsonschema:"Selected facet names required by the caller"`
MaxRequests int `json:"max_requests,omitempty" jsonschema:"Maximum GitHub requests from 1 to 1000"`
MaxPages int `json:"max_pages,omitempty" jsonschema:"Maximum pages per selected facet from 1 to 100"`
LimitPerRepository int `json:"limit_per_repository,omitempty" jsonschema:"Maximum thread headers in repository mode from 1 to 1000"`
}
type EnsureCoverageJobResult ¶ added in v0.17.0
type EnsureCoverageJobResult struct {
Status string `json:"status"`
CoverageBefore *CoverageOutput `json:"coverage_before,omitempty"`
PlannedStages []string `json:"planned_stages"`
CompletedStages []string `json:"completed_stages"`
StageOutcomes []CoverageStageOutcome `json:"stage_outcomes"`
NextAction FollowUpAction `json:"next_action"`
RetryAfterMS NonNegativeInt `json:"retry_after_ms,omitempty"`
SnapshotToken string `json:"snapshot_token,omitempty"`
ArtifactDigest string `json:"artifact_digest,omitempty"`
Unknown bool `json:"unknown"`
Incomplete bool `json:"incomplete"`
}
type EvidenceInput ¶
type EvidenceInput struct {
InvestigationID string `json:"investigation_id,omitempty" jsonschema:"Filter by investigation ID"`
OpportunityID string `json:"opportunity_id,omitempty" jsonschema:"Filter by opportunity ID"`
Relation string `json:"relation,omitempty" jsonschema:"Optional relation filter: supporting, contradicting, inconclusive, stale, invalid"`
Limit int `json:"limit,omitempty" jsonschema:"Maximum results from 1 to 100"`
}
EvidenceInput filters and bounds stored evidence.
type EvidenceItem ¶
type EvidenceItem struct {
ID string `json:"id"`
Type string `json:"type"`
Relation string `json:"relation"`
Description string `json:"description"`
SourceRefs []SourceRef `json:"source_refs,omitempty"`
SourceProvenance []EvidenceSourceRevision `json:"source_provenance,omitempty"`
Freshness string `json:"freshness,omitempty"`
FreshnessReason string `json:"freshness_reason,omitempty"`
CreatedAt string `json:"created_at"`
}
EvidenceItem is the stable MCP representation of one evidence record.
type EvidenceOutput ¶
type EvidenceOutput struct {
InvestigationID string `json:"investigation_id,omitempty"`
OpportunityID string `json:"opportunity_id,omitempty"`
Total int `json:"total"`
Evidence []EvidenceItem `json:"evidence"`
}
EvidenceOutput contains bounded evidence matching a filter.
type EvidenceSourceRevision ¶
type EvidenceSourceRevision struct {
Subject EvidenceSourceSubject `json:"subject"`
SourceUpdatedAt string `json:"source_updated_at,omitempty"`
ObservationSequence int64 `json:"observation_sequence"`
ObservedAt string `json:"observed_at"`
}
EvidenceSourceRevision records the source order used by evidence.
type EvidenceSourceSubject ¶
type EvidenceSourceSubject struct {
Kind string `json:"kind"`
Owner string `json:"owner"`
Repo string `json:"repo"`
ThreadKind string `json:"thread_kind,omitempty"`
Number int `json:"number,omitempty"`
Facet string `json:"facet,omitempty"`
}
EvidenceSourceSubject identifies one independently refreshed corpus subject.
type ExactCoverageThread ¶ added in v0.17.0
type ExistingContributionOutput ¶ added in v0.19.0
type ExistingContributionOutput struct {
Issue int `json:"issue,omitempty"`
PullRequest int `json:"pull_request"`
Head string `json:"head,omitempty"`
HeadSHA string `json:"head_sha,omitempty"`
URL string `json:"url,omitempty"`
}
ExistingContributionOutput identifies an authored pull request that may already implement the candidate. Issue is populated only when the input or live related-thread search supplied an exact related issue.
type ExplainMatchInput ¶
type ExplainMatchInput struct {
Query string `json:"query,omitempty" jsonschema:"Original search query"`
Owner string `json:"owner" jsonschema:"Repository owner"`
Repo string `json:"repo" jsonschema:"Repository name"`
Kind string `json:"kind,omitempty" jsonschema:"Match kind: repo, issue, pull_request, or code"`
Number int `json:"number,omitempty" jsonschema:"Thread number for issue or pull_request matches"`
Path string `json:"path,omitempty" jsonschema:"File path for code matches"`
Commit string `json:"commit,omitempty" jsonschema:"Commit SHA for code matches"`
Limit int `json:"limit,omitempty" jsonschema:"Maximum explanation facets from 1 to 100"`
}
ExplainMatchInput identifies an exact stored result and its original query.
type ExplainMatchOutput ¶
type ExplainMatchOutput struct {
Query string `json:"query"`
Kind string `json:"kind"`
Owner string `json:"owner"`
Repo string `json:"repo"`
Number int `json:"number,omitempty"`
Path string `json:"path,omitempty"`
Commit string `json:"commit,omitempty"`
State string `json:"state,omitempty"`
Title string `json:"title"`
Snippet string `json:"snippet,omitempty"`
MatchSource string `json:"match_source,omitempty" jsonschema:"Stored search document or hydrated facet that matched"`
RetrievalRank *float64 `json:"retrieval_rank,omitempty" jsonschema:"Lower-is-better retrieval rank"`
RankingMethod string `json:"ranking_method,omitempty" jsonschema:"Retrieval ranking method"`
SearchTruncated bool `json:"search_truncated,omitempty" jsonschema:"Whether indexed hydrated text was bounded"`
Reason string `json:"reason"`
SourceRevision string `json:"source_revision,omitempty"`
Facets []FacetCoverageOutput `json:"facets,omitempty"`
AsOf string `json:"as_of,omitempty"`
}
ExplainMatchOutput reports the stored facts that contributed to a match score.
type ExportManifestInput ¶
type ExportManifestInput struct {
OpportunityID string `json:"opportunity_id" jsonschema:"Opportunity ID"`
WorkspaceID string `json:"workspace_id,omitempty" jsonschema:"Managed workspace ID to bind"`
PullRequest *ManifestPullRequestInput `json:"pull_request,omitempty" jsonschema:"Exact stored pull request to include"`
SnapshotToken string `json:"snapshot_token,omitempty" jsonschema:"Optional immutable corpus snapshot token for the source evidence"`
}
ExportManifestInput selects bounded local evidence for one contribution manifest.
type ExternalValidationReceiptOutput ¶ added in v0.14.0
type ExternalValidationReceiptOutput struct {
RunID string `json:"run_id"`
DefinitionID string `json:"definition_id"`
InvestigationID string `json:"investigation_id"`
Kind string `json:"kind"`
Classification string `json:"classification"`
ReceiptSHA256 string `json:"receipt_sha256"`
Producer string `json:"producer"`
Provider string `json:"provider,omitempty"`
ExternalRunID string `json:"external_run_id,omitempty"`
SourceRevision string `json:"source_revision,omitempty"`
ArtifactSHA256 string `json:"artifact_sha256,omitempty"`
Limitations []string `json:"limitations,omitempty"`
Incomplete bool `json:"incomplete"`
}
type FacetCoverageOutput ¶
type FacetCoverageOutput struct {
Facet string `json:"facet"`
Complete bool `json:"complete"`
Status string `json:"status"`
UpdatedAt string `json:"updated_at"`
}
FacetCoverageOutput reports completeness and freshness for one facet.
type FindClustersInput ¶
type FindClustersInput struct {
Targets []ClusterTarget `json:"targets" jsonschema:"One to 20 repository or exact-member targets"`
Limit int `json:"limit,omitempty" jsonschema:"Maximum clusters per target from 1 to 100"`
SnapshotToken string `json:"snapshot_token,omitempty" jsonschema:"Optional immutable corpus snapshot token from a previous offline read"`
}
FindClustersInput selects up to 20 repositories or exact cluster members.
type FindClustersOutput ¶
type FindClustersOutput struct {
Status string `json:"status"`
Items []BatchItem[ClusterSetOutput] `json:"items"`
SnapshotToken string `json:"snapshot_token"`
}
FindClustersOutput preserves target order and isolates item failures.
type FindNeighborsInput ¶
type FindNeighborsInput struct {
Threads []ThreadRef `json:"threads" jsonschema:"One to 20 exact source threads"`
Limit int `json:"limit,omitempty" jsonschema:"Maximum neighbors per source thread from 1 to 100"`
SnapshotToken string `json:"snapshot_token,omitempty" jsonschema:"Optional immutable corpus snapshot token from a previous offline read"`
}
FindNeighborsInput selects source threads and bounds similar-thread results.
type FindNeighborsOutput ¶
type FindNeighborsOutput struct {
Status string `json:"status"`
Items []BatchItem[NeighborSetOutput] `json:"items"`
SnapshotToken string `json:"snapshot_token"`
}
FindNeighborsOutput preserves source-thread order and isolates item failures.
type FindPortfolioOverlapsInput ¶
type FindPortfolioOverlapsInput struct {
Candidates []PortfolioSubjectInput `json:"candidates" jsonschema:"One to 50 local candidate subjects"`
PullRequests []ThreadRef `json:"pull_requests" jsonschema:"One to 100 exact authored pull requests"`
SnapshotToken string `json:"snapshot_token,omitempty" jsonschema:"Optional immutable corpus snapshot token from a previous offline read"`
}
FindPortfolioOverlapsInput compares candidates with exact stored authored PRs.
type FindPortfolioOverlapsOutput ¶
type FindPortfolioOverlapsOutput struct {
Status string `json:"status"`
Items []BatchItem[PortfolioOverlapOutput] `json:"items"`
SnapshotToken string `json:"snapshot_token"`
}
FindPortfolioOverlapsOutput preserves candidate input order.
type FindPrecedentsInput ¶
type FindPrecedentsInput struct {
Threads []ThreadRef `json:"threads" jsonschema:"One to 20 source threads"`
Limit int `json:"limit,omitempty" jsonschema:"Maximum results from 1 to 100"`
SnapshotToken string `json:"snapshot_token,omitempty" jsonschema:"Optional immutable corpus snapshot token from a previous offline read"`
}
FindPrecedentsInput selects source threads for offline analogue discovery.
type FindPrecedentsOutput ¶
type FindPrecedentsOutput struct {
Status string `json:"status"`
Items []BatchItem[PrecedentSet] `json:"items"`
Total int `json:"total"`
SnapshotToken string `json:"snapshot_token"`
Provenance CorpusReadProvenance `json:"provenance"`
}
FindPrecedentsOutput returns stored closed or merged analogues for each source thread; it does not perform a network read.
type FindRelatedWorkInput ¶ added in v0.15.0
type FindRelatedWorkInput struct {
Target string `json:"target" jsonschema:"Target scope: hypothesis or opportunity"`
ID string `json:"id" jsonschema:"Hypothesis or opportunity ID"`
Kinds []string `json:"kinds,omitempty" jsonschema:"Related-work populations: duplicates and/or competing_pull_requests; defaults to both"`
Limit int `json:"limit,omitempty" jsonschema:"Maximum findings per population from 1 to 100"`
}
FindRelatedWorkInput selects one workflow target and related-work populations.
type FindRelatedWorkOutput ¶ added in v0.15.0
type FindRelatedWorkOutput struct {
Duplicates *CheckOutput `json:"duplicates,omitempty"`
CompetingPullRequests *CheckOutput `json:"competing_pull_requests,omitempty"`
}
FindRelatedWorkOutput groups independently derived related-work populations.
type FixPatternCluster ¶ added in v0.14.0
type FixPatternCluster struct {
Name string `json:"name"`
Terms []string `json:"terms"`
CandidateCount NonNegativeInt `json:"candidate_count"`
UnknownBefore NonNegativeInt `json:"unknown_before"`
UnknownAfter NonNegativeInt `json:"unknown_after"`
Outcomes FixPatternOutcomeCounts `json:"outcomes"`
Examples []FixPatternExample `json:"examples"`
ExamplesTruncated bool `json:"examples_truncated"`
}
FixPatternCluster summarizes one caller-defined symptom category.
type FixPatternCoverage ¶ added in v0.14.0
type FixPatternCoverage struct {
CandidateMatches NonNegativeInt `json:"candidate_matches"`
UniqueCandidates NonNegativeInt `json:"unique_candidates"`
UnknownBefore NonNegativeInt `json:"unknown_before"`
SelectedForHydration NonNegativeInt `json:"selected_for_hydration"`
Hydrated NonNegativeInt `json:"hydrated"`
HydrationFailed NonNegativeInt `json:"hydration_failed"`
UnknownAfter NonNegativeInt `json:"unknown_after"`
CandidateTruncated bool `json:"candidate_truncated"`
}
FixPatternCoverage reports the bounded universe examined and the effect of finalist hydration.
type FixPatternExample ¶ added in v0.14.0
type FixPatternExample struct {
PullRequest ThreadRef `json:"pull_request"`
RelatedThread *ThreadRef `json:"related_thread,omitempty"`
RelatedKind FixPatternRelatedKind `json:"related_kind,omitempty"`
Title string `json:"title"`
Outcome FixPatternOutcome `json:"outcome"`
Relationship FixPatternRelationship `json:"relationship"`
RelationshipEvidence string `json:"relationship_evidence,omitempty"`
AcceptedFix bool `json:"accepted_fix"`
ProofStyles []FixPatternProofStyle `json:"proof_styles,omitempty"`
UpdatedAt string `json:"updated_at"`
}
FixPatternExample is one bounded, source-backed representative.
type FixPatternHydrationFailure ¶ added in v0.14.0
type FixPatternHydrationFailure struct {
PullRequest ThreadRef `json:"pull_request"`
Reason string `json:"reason"`
Message string `json:"message"`
Retryable bool `json:"retryable"`
}
FixPatternHydrationFailure records one finalist that could not be refreshed.
type FixPatternOutcome ¶ added in v0.14.0
type FixPatternOutcome string
FixPatternOutcome is a pull-request disposition. Merge state comes from GitHub; superseded requires an explicit replacement relationship.
type FixPatternOutcomeCounts ¶ added in v0.14.0
type FixPatternOutcomeCounts struct {
Merged NonNegativeInt `json:"merged"`
ClosedUnmerged NonNegativeInt `json:"closed_unmerged"`
Superseded NonNegativeInt `json:"superseded"`
Open NonNegativeInt `json:"open"`
Unknown NonNegativeInt `json:"unknown"`
}
FixPatternOutcomeCounts preserves unknown state rather than treating it as unmerged.
type FixPatternProofStyle ¶ added in v0.14.0
type FixPatternProofStyle string
FixPatternProofStyle is a bounded evidence style detected in stored PR text.
type FixPatternRelatedKind ¶ added in v0.14.0
type FixPatternRelatedKind string
FixPatternRelatedKind identifies the stored thread kind of a related target.
type FixPatternRelationship ¶ added in v0.14.0
type FixPatternRelationship string
FixPatternRelationship describes evidence connecting an issue and pull request. Similarity is intentionally distinct from an explicit link.
type FixPatternReport ¶ added in v0.14.0
type FixPatternReport struct {
Status FixPatternReportStatus `json:"status"`
Repository RepositoryRef `json:"repository"`
TimeWindow FixPatternTimeWindow `json:"time_window"`
GeneratedAt string `json:"generated_at"`
Coverage FixPatternCoverage `json:"coverage"`
Clusters []FixPatternCluster `json:"clusters"`
Failures []FixPatternHydrationFailure `json:"failures,omitempty"`
Limitations []string `json:"limitations,omitempty"`
Persisted bool `json:"persisted"`
SnapshotToken string `json:"snapshot_token"`
ArtifactDigest string `json:"artifact_digest,omitempty"`
ObservationWatermark int64 `json:"observation_watermark"`
QueryDigestSHA256 string `json:"query_digest_sha256"`
Complete bool `json:"complete"`
Truncated bool `json:"truncated"`
UnknownCoverage bool `json:"unknown_coverage"`
ExternalContextProvenance []string `json:"external_context_provenance,omitempty"`
Recovery *RecoveryPlan `json:"recovery,omitempty"`
}
FixPatternReport is persisted as the typed result of a durable pattern mining job and is readable through an MCP resource.
type FixPatternReportStatus ¶ added in v0.14.0
type FixPatternReportStatus string
FixPatternReportStatus describes whether all bounded workflow evidence is complete or whether coverage limits or failures remain.
type FixPatternSymptom ¶ added in v0.14.0
type FixPatternSymptom struct {
Name string `json:"name" jsonschema:"Stable human-readable category name"`
Terms []string `json:"terms" jsonschema:"One to 12 literal stored-thread search terms"`
}
FixPatternSymptom defines one caller-owned symptom category using literal search terms. Terms use any-term matching within the category.
type FixPatternTimeWindow ¶ added in v0.14.0
type FixPatternTimeWindow struct {
UpdatedAfter string `json:"updated_after" jsonschema:"Required RFC 3339 inclusive lower bound"`
UpdatedBefore string `json:"updated_before,omitempty" jsonschema:"Optional RFC 3339 inclusive upper bound"`
}
FixPatternTimeWindow bounds stored thread observations considered by a repository pattern-mining workflow.
type FollowUpAction ¶ added in v0.17.0
type FollowUpAction struct {
Type string `json:"type"`
PollJob *GetJobsInput `json:"poll_job,omitempty"`
ReadResource *ResourceReadAction `json:"read_resource,omitempty"`
ReadSnapshot *SnapshotReadAction `json:"read_snapshot,omitempty"`
InspectCommitChanges *InspectCommitChangesInput `json:"inspect_commit_changes,omitempty"`
GetRepositories *GetRepositoriesInput `json:"get_repositories,omitempty"`
GetThreads *GetThreadsInput `json:"get_threads,omitempty"`
GetThreadFacets *GetThreadFacetsInput `json:"get_thread_facets,omitempty"`
ListPortfolio *ListPullRequestPortfolioInput `json:"list_pull_request_portfolio,omitempty"`
SearchFeedback *SearchPullRequestFeedbackInput `json:"search_pull_request_feedback,omitempty"`
}
FollowUpAction is a discriminated union of valid post-job transitions. Each variant owns its arguments; callers never reconstruct a generic argument bag from prose.
type ForkFreshnessOutput ¶ added in v1.1.0
type ForkFreshnessOutput struct {
Status string `json:"status" jsonschema:"current, behind, diverged, or unavailable"`
Coverage string `json:"coverage" jsonschema:"verified or unavailable"`
Upstream RepositoryRef `json:"upstream"`
Fork RepositoryRef `json:"fork"`
UpstreamBranch string `json:"upstream_branch,omitempty"`
ForkBranch string `json:"fork_branch,omitempty"`
ContributionBranch string `json:"contribution_branch,omitempty"`
ContributionSHA string `json:"contribution_sha,omitempty"`
UpstreamSHA string `json:"upstream_sha,omitempty"`
ForkSHA string `json:"fork_sha,omitempty"`
MergeBaseSHA string `json:"merge_base_sha,omitempty"`
AheadBy int `json:"ahead_by,omitempty"`
BehindBy int `json:"behind_by,omitempty"`
EffectiveDiffRisk bool `json:"effective_diff_risk"`
Reason string `json:"reason,omitempty"`
NextAction string `json:"next_action"`
}
ForkFreshnessOutput reports whether the contributor fork's default branch can safely serve as the base for the current contribution branch. It is present only when a fork can be identified from the input or live context.
type GetActorFacetsInput ¶ added in v1.0.0
type GetActorFacetsOutput ¶ added in v1.0.0
type GetActorFacetsOutput struct {
Items []ActorBatchItem[ActorFacetReferenceOutput] `json:"items"`
SnapshotToken string `json:"snapshot_token"`
}
type GetActorsInput ¶ added in v1.0.0
type GetActorsOutput ¶ added in v1.0.0
type GetActorsOutput struct {
Items []ActorBatchItem[ActorOutput] `json:"items"`
SnapshotToken string `json:"snapshot_token"`
}
type GetCatalogContractInput ¶ added in v1.0.0
type GetCatalogContractInput struct{}
GetCatalogContractInput is intentionally empty: the contract describes the catalog exposed by the current MCP server instance.
type GetCoverageInput ¶
type GetCoverageInput struct {
Targets []CoverageTarget `json:"targets" jsonschema:"One to 100 repository or exact-thread targets"`
SnapshotToken string `json:"snapshot_token,omitempty" jsonschema:"Optional immutable corpus snapshot token from a previous offline read"`
}
GetCoverageInput selects bounded repository or thread facet coverage reads.
type GetCoverageOutput ¶
type GetCoverageOutput struct {
Status string `json:"status"`
Items []BatchItem[CoverageOutput] `json:"items"`
SnapshotToken string `json:"snapshot_token"`
Provenance CorpusReadProvenance `json:"provenance"`
}
GetCoverageOutput preserves target order and isolates missing or invalid targets without failing unrelated coverage reads.
type GetJobInput ¶
type GetJobInput struct {
ID string `json:"id" jsonschema:"Durable job ID"`
}
GetJobInput selects a durable job by opaque ID.
type GetJobOutput ¶
type GetJobOutput struct {
ID string `json:"id"`
Kind string `json:"kind" jsonschema:"Durable job kind"`
Status JobStatus `json:"-"`
ExecutionState JobExecutionState `json:"execution_state"`
Outcome JobOutcome `json:"outcome,omitempty"`
Summary string `json:"summary"`
Artifacts []JobArtifactReference `json:"artifacts,omitempty"`
FollowUp *JobFollowUp `json:"follow_up,omitempty"`
Error string `json:"error,omitempty"`
Phase string `json:"phase,omitempty" jsonschema:"Current bounded workflow phase"`
CompletedItems NonNegativeInt `json:"completed_items"`
TotalItems NonNegativeInt `json:"total_items"`
ProgressPercent ProgressPercent `json:"progress_percent"`
RetryAfterMS NonNegativeInt `json:"retry_after_ms,omitempty"`
CreatedAt string `json:"created_at"`
StartedAt string `json:"started_at,omitempty"`
CompletedAt string `json:"completed_at,omitempty"`
CancelledAt string `json:"cancelled_at,omitempty"`
CancellationRequested bool `json:"cancellation_requested"`
}
GetJobOutput reports durable state and structured progress for a job. Stored executor request and result blobs are intentionally not model-visible.
type GetJobsInput ¶
type GetJobsInput struct {
IDs []string `json:"ids" jsonschema:"One to 100 durable job IDs"`
ResponseFormat string `json:"response_format,omitempty" jsonschema:"concise omits request and result payloads; detailed includes them"`
}
GetJobsInput selects durable jobs for a bounded status read.
type GetJobsOutput ¶
type GetJobsOutput struct {
Status string `json:"batch_status"`
Items []BatchItem[GetJobOutput] `json:"items"`
}
GetJobsOutput reports multiple durable jobs in requested order so callers can poll concurrent work with one MCP round trip.
type GetRepositoriesInput ¶
type GetRepositoriesInput struct {
Repositories []RepositoryRef `json:"repositories" jsonschema:"One to 100 repository identities"`
SnapshotToken string `json:"snapshot_token,omitempty" jsonschema:"Optional immutable corpus snapshot token from a previous offline read"`
}
GetRepositoriesInput selects repositories for a bounded corpus read.
type GetRepositoriesOutput ¶
type GetRepositoriesOutput struct {
Status string `json:"batch_status"`
Items []BatchItem[TypedRepositoryOutput] `json:"items"`
SnapshotToken string `json:"snapshot_token"`
}
GetRepositoriesOutput preserves repository input order and represents unobserved metadata with nullable facts instead of false zero values.
type GetSourceAuditWorkflowInput ¶ added in v0.17.0
type GetSourceAuditWorkflowInput struct{}
type GetThreadFacetsInput ¶ added in v0.17.0
type GetThreadFacetsInput struct {
Threads []ThreadRef `json:"threads" jsonschema:"One to 100 exact thread identities"`
Facets []string `json:"facets" jsonschema:"One to 10 stored facet names"`
SnapshotToken string `json:"snapshot_token,omitempty" jsonschema:"Optional immutable corpus snapshot token from a previous offline read"`
}
GetThreadFacetsInput selects bounded offline facet metadata for exact threads. Payloads larger than a compact result are read through the returned resource URI.
type GetThreadFacetsOutput ¶ added in v0.17.0
type GetThreadFacetsOutput struct {
Status string `json:"batch_status"`
Items []BatchItem[ThreadFacetsOutput] `json:"items"`
SnapshotToken string `json:"snapshot_token"`
}
GetThreadFacetsOutput preserves exact-thread input order and item failures.
type GetThreadsInput ¶
type GetThreadsInput struct {
Threads []ThreadRef `json:"threads" jsonschema:"One to 100 exact thread identities"`
View string `json:"view,omitempty" jsonschema:"compact or full; compact omits bodies"`
SnapshotToken string `json:"snapshot_token,omitempty" jsonschema:"Optional immutable corpus snapshot token from a previous offline read"`
}
GetThreadsInput selects exact threads and the desired response view.
type GetThreadsOutput ¶
type GetThreadsOutput struct {
Status string `json:"batch_status"`
Items []BatchItem[ThreadOutput] `json:"items"`
SnapshotToken string `json:"snapshot_token"`
}
GetThreadsOutput preserves exact-thread input order and item-level failures.
type GitHubAcquisitionProvenance ¶ added in v0.18.0
type GitHubAcquisitionProvenance struct {
Provider string `json:"provider"`
Endpoint string `json:"endpoint"`
ObservedAt string `json:"observed_at"`
}
GitHubAcquisitionProvenance identifies the live provider request and its local observation time.
type GitHubRateOutput ¶ added in v0.18.0
type GitHubRateOutput struct {
Limit int `json:"limit,omitempty"`
Remaining int `json:"remaining,omitempty"`
Used int `json:"used,omitempty"`
Reset string `json:"reset,omitempty"`
Resource string `json:"resource,omitempty"`
}
GitHubRateOutput is the provider rate-limit state observed with one live request. A zero value means the provider did not return rate metadata.
type GitHubThreadSearchArtifact ¶ added in v0.18.0
type GitHubThreadSearchArtifact struct {
SchemaVersion string `json:"schema_version"`
ArtifactKind string `json:"artifact_kind"`
Repository RepositoryRef `json:"repository"`
Query string `json:"query"`
ProviderQuery string `json:"provider_query"`
Kind string `json:"kind,omitempty"`
State string `json:"state,omitempty"`
Sort string `json:"sort,omitempty"`
Order string `json:"order,omitempty"`
Page int `json:"page"`
Limit int `json:"limit"`
NextPage int `json:"next_page,omitempty"`
Total int `json:"total"`
Incomplete bool `json:"incomplete"`
HasNextPage bool `json:"has_next_page"`
Rate GitHubRateOutput `json:"rate"`
Items []GitHubThreadSearchArtifactItem `json:"items"`
Completeness GitHubThreadSearchCompleteness `json:"completeness"`
RecoveryPlans []RecoveryPlan `json:"recovery_plans,omitempty"`
Provenance GitHubAcquisitionProvenance `json:"provenance"`
CreatedAt string `json:"created_at"`
}
GitHubThreadSearchArtifact is the immutable github-thread-search.v1 payload. Items preserve provider ordering and identity even when a compact tool result omits fields needed only for later inspection.
type GitHubThreadSearchArtifactItem ¶ added in v0.18.0
type GitHubThreadSearchArtifactItem struct {
Position int `json:"position"`
ID int64 `json:"id"`
NodeID string `json:"node_id,omitempty"`
Owner string `json:"owner"`
Repo string `json:"repo"`
Kind string `json:"kind"`
Number int `json:"number"`
Title string `json:"title"`
State string `json:"state"`
SourceURL string `json:"source_url,omitempty"`
CreatedAt string `json:"created_at,omitempty"`
UpdatedAt string `json:"updated_at,omitempty"`
ClosedAt string `json:"closed_at,omitempty"`
}
type GitHubThreadSearchCompleteness ¶ added in v0.18.0
type GitHubThreadSearchCompleteness struct {
Status string `json:"status"`
IncompleteResults bool `json:"incomplete_results"`
HasNextPage bool `json:"has_next_page"`
RepositoryThreadCoverageKnown bool `json:"repository_thread_coverage_known"`
RepositoryThreadCoverageFull bool `json:"repository_thread_coverage_complete"`
}
type HydrateThreadsInput ¶
type HydrateThreadsInput struct {
Threads []ThreadRef `json:"threads" jsonschema:"One to 100 exact threads"`
Facets []string `json:"facets" jsonschema:"One or more explicit child facets"`
MaxPages int `json:"max_pages,omitempty" jsonschema:"Maximum pages per facet from 1 to 100"`
}
HydrateThreadsInput requests explicit child facets for already selected threads. Facets must be non-empty to prevent accidental broad hydration.
type HypothesisOutput ¶
type HypothesisOutput struct {
ID string `json:"id"`
InvestigationID string `json:"investigation_id"`
Title string `json:"title"`
Description string `json:"description"`
Category string `json:"category"`
ExpectedBehavior string `json:"expected_behavior,omitempty"`
ObservedBehavior string `json:"observed_behavior,omitempty"`
PotentialImpact string `json:"potential_impact,omitempty"`
OpenQuestions []string `json:"open_questions,omitempty"`
AffectedComponents []string `json:"affected_components,omitempty"`
SourceRefs []SourceRef `json:"source_refs,omitempty"`
Status string `json:"status"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
HypothesisOutput is the stable MCP representation of a hypothesis.
type HypothesisSummary ¶
type HypothesisSummary struct {
ID string `json:"id"`
Title string `json:"title"`
Category string `json:"category"`
Status string `json:"status"`
Description string `json:"description,omitempty"`
}
HypothesisSummary is the compact hypothesis representation nested in an investigation.
type ImportExternalEvidenceManifestInput ¶ added in v1.1.0
type ImportExternalEvidenceManifestInput struct {
ManifestJSON string `json:"manifest_json" jsonschema:"External evidence manifest JSON using gitcontribute.external-evidence.v1; maximum 2 MiB"`
}
type ImportExternalEvidenceManifestOutput ¶ added in v1.1.0
type IndexPullRequestFeedbackInput ¶ added in v0.19.0
type IndexPullRequestFeedbackInput struct {
Repository RepositoryRef `json:"repository" jsonschema:"One GitHub repository"`
Channels []string `json:"channels" jsonschema:"Feedback channels: issue_comments, submitted_reviews, inline_comments, review_threads"`
ThreadState string `json:"thread_state,omitempty" jsonschema:"Review threads to index: unresolved or all"`
MaxPullRequests int `json:"max_pull_requests,omitempty" jsonschema:"Maximum pull requests retained in one job from 1 to 1000"`
MaxItemsPerChannel int `json:"max_items_per_channel,omitempty" jsonschema:"Maximum feedback items per channel and pull request from 1 to 1000"`
MaxPages int `json:"max_pages,omitempty" jsonschema:"Maximum provider discovery pages per job from 1 to 1000"`
MaxRequests int `json:"max_requests,omitempty" jsonschema:"Maximum total GitHub requests from 1 to 1000"`
}
IndexPullRequestFeedbackInput requests one repository-scoped, resumable pull-request discovery and feedback synchronization job. A retry resumes the durable discovery checkpoint for the repository.
type IndexRepositoriesInput ¶
type IndexRepositoriesInput struct {
Repositories []IndexRepositoryInput `json:"repositories" jsonschema:"One to 10 repositories to acquire and index"`
}
IndexRepositoriesInput selects repositories for bounded asynchronous indexing.
type IndexRepositoryInput ¶
type IndexRepositoryInput struct {
Owner string `json:"owner" jsonschema:"GitHub repository owner"`
Repo string `json:"repo" jsonschema:"GitHub repository name"`
Remote string `json:"remote,omitempty" jsonschema:"Optional explicit credential-free Git remote"`
}
IndexRepositoryInput identifies one repository to acquire and index.
type InspectCommitChangesInput ¶
type InspectCommitChangesInput struct {
WorkspaceID string `json:"workspace_id" jsonschema:"Managed workspace ID"`
}
InspectCommitChangesInput selects one managed workspace.
type InvestigationInput ¶
type InvestigationInput struct {
ID string `json:"id" jsonschema:"Investigation ID"`
HypothesisLimit int `json:"hypothesis_limit,omitempty" jsonschema:"Maximum hypotheses from 1 to 100"`
}
InvestigationInput selects an investigation and bounds nested hypotheses.
type InvestigationOutput ¶
type InvestigationOutput struct {
ID string `json:"id"`
Owner string `json:"owner"`
Repo string `json:"repo"`
CommitSHA string `json:"commit_sha,omitempty"`
Lens string `json:"lens,omitempty"`
Status string `json:"status"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
HypothesisTotal int `json:"hypothesis_total"`
Hypotheses []HypothesisSummary `json:"hypotheses,omitempty"`
}
InvestigationOutput is the stable MCP representation of an investigation.
type IssueSetDuplicateCluster ¶ added in v0.12.0
type IssueSetDuplicateCluster struct {
StableID string `json:"stable_id"`
CanonicalRef string `json:"canonical_ref"`
CandidateCount int `json:"candidate_count"`
}
IssueSetDuplicateCluster reports stored duplicate-candidate evidence for one supplied issue.
type IssueSetGap ¶ added in v0.12.0
type IssueSetGap struct {
Code string `json:"code"`
Facet string `json:"facet"`
Status string `json:"status"`
Message string `json:"message"`
Recovery *RecoveryPlan `json:"recovery"`
}
IssueSetGap identifies evidence that is absent or incomplete and gives the exact bounded recovery call without treating the absence as negative proof.
type IssueSetLinkageCandidate ¶ added in v0.12.0
type IssueSetLinkageCandidate struct {
IssueNumber int `json:"issue_number"`
Relation string `json:"relation"`
AllowedRelations []string `json:"allowed_relations"`
RequiresConfirmation bool `json:"requires_confirmation"`
Basis string `json:"basis"`
}
IssueSetLinkageCandidate is deliberately advisory. Callers must confirm the final PR-to-issue relationship after reviewing the actual implementation.
type IssueSetRelatedWork ¶ added in v0.12.0
type IssueSetRelatedWork struct {
Ref string `json:"ref"`
Kind string `json:"kind"`
Number int `json:"number"`
Title string `json:"title,omitempty"`
State string `json:"state,omitempty"`
Relation string `json:"relation"`
Direction string `json:"direction"`
URL string `json:"url,omitempty"`
Merged *bool `json:"merged,omitempty"`
MergedAt string `json:"merged_at,omitempty"`
SourceUpdatedAt string `json:"source_updated_at,omitempty"`
EvidenceKinds []string `json:"evidence_kinds,omitempty"`
}
IssueSetRelatedWork is one corpus-supported issue, pull request, or external thread related to a supplied issue.
type JobArtifactFailure ¶ added in v0.14.0
type JobArtifactFailure struct {
Reference string `json:"reference"`
Status BatchItemStatus `json:"status"`
Reason string `json:"reason,omitempty"`
Message string `json:"message,omitempty"`
RetryAfterMS NonNegativeInt `json:"retry_after_ms,omitempty"`
}
JobArtifactFailure preserves one actionable item-level outcome without exposing an executor's arbitrary stored result representation.
type JobArtifactReference ¶ added in v0.14.0
type JobArtifactReference struct {
Kind string `json:"kind" jsonschema:"Artifact kind owned by GitContribute"`
ID string `json:"id,omitempty" jsonschema:"Stable artifact identifier when one exists"`
URI string `json:"uri,omitempty" jsonschema:"MCP resource URI when the artifact is readable as a resource"`
Count *NonNegativeInt `json:"count,omitempty" jsonschema:"Known number of affected objects for a bounded collection, including zero"`
References []string `json:"references,omitempty" jsonschema:"Bounded exact repository, thread, or pull-request references produced by the job"`
ReferencesTruncated bool `json:"references_truncated,omitempty" jsonschema:"Whether more exact references exist than this bounded response includes"`
Failures []JobArtifactFailure `json:"failures,omitempty" jsonschema:"Bounded per-reference outcomes that require retry or recovery"`
CodeIndex *CodeIndexArtifact `json:"code_index,omitempty" jsonschema:"Revision-bound indexed-commit artifact"`
Status string `json:"status,omitempty" jsonschema:"Artifact completeness status"`
DiscoveryStatus string `json:"discovery_status,omitempty"`
SearchIncomplete bool `json:"search_incomplete,omitempty"`
RequestCapped bool `json:"request_capped,omitempty"`
Recovery *RecoveryPlan `json:"recovery,omitempty"`
}
JobArtifactReference identifies a bounded durable result without exposing the job executor's stored request or result representation.
type JobExecutionState ¶ added in v0.14.0
type JobExecutionState string
JobExecutionState separates pollable execution from terminal completion.
type JobFollowUp ¶ added in v0.14.0
type JobFollowUp struct {
Action FollowUpAction `json:"action"`
RetryAfterMS NonNegativeInt `json:"retry_after_ms,omitempty" jsonschema:"Minimum delay before attempting this follow-up"`
Reason string `json:"reason" jsonschema:"Why this follow-up is appropriate"`
}
JobFollowUp points to the typed read plane for a job's durable result.
type JobOutcome ¶ added in v0.14.0
type JobOutcome string
JobOutcome describes the result of a terminal durable job.
type JobReference ¶
type JobReference struct {
ID string `json:"id"`
Ref string `json:"ref"`
Kind string `json:"kind"`
Status JobStatus `json:"status"`
Message string `json:"message"`
PollAfterMS NonNegativeInt `json:"poll_after_ms,omitempty"`
FollowUp *JobFollowUp `json:"follow_up,omitempty"`
}
JobReference is returned by long-running tools that submit durable jobs.
type JobStatus ¶ added in v0.14.0
type JobStatus string
JobStatus describes the durable execution lifecycle exposed through MCP.
type LensInput ¶
type LensInput struct {
Name string `json:"name" jsonschema:"Lens name"`
}
LensInput selects a saved lens by name.
type LensOutput ¶
type LensOutput struct {
Name string `json:"name"`
Definition lens.Definition `json:"definition"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
LensOutput contains a saved lens definition and timestamps.
type LinkConcernInput ¶
type LinkConcernInput struct {
ID string `json:"id" jsonschema:"Concern ID"`
Kind string `json:"kind" jsonschema:"Relationship kind"`
TargetType string `json:"target_type" jsonschema:"Target record type"`
TargetID string `json:"target_id" jsonschema:"Target record ID"`
Note string `json:"note,omitempty" jsonschema:"Relationship note"`
}
LinkConcernInput records one typed relationship.
type LinkPullRequestInput ¶
type LinkPullRequestInput struct {
PullRequest ThreadRef `json:"pull_request" jsonschema:"Exact stored pull request to link"`
OpportunityID string `json:"opportunity_id,omitempty" jsonschema:"Optional local opportunity ID"`
WorkspaceID string `json:"workspace_id,omitempty" jsonschema:"Optional managed workspace ID"`
}
LinkPullRequestInput explicitly associates a stored PR with local workflow state.
type LinkPullRequestOutput ¶
type LinkPullRequestOutput struct {
ID int64 `json:"id"`
PullRequestThreadID int64 `json:"pull_request_thread_id"`
OpportunityID string `json:"opportunity_id,omitempty"`
WorkspaceID string `json:"workspace_id,omitempty"`
CreatedAt string `json:"created_at"`
}
LinkPullRequestOutput reports the idempotently stored local relationship.
type ListConcernsInput ¶
type ListConcernsInput struct {
Owner string `json:"owner,omitempty" jsonschema:"Optional repository owner; provide with repo"`
Repo string `json:"repo,omitempty" jsonschema:"Optional repository name; provide with owner"`
Status string `json:"status,omitempty" jsonschema:"Optional concern status"`
Query string `json:"query,omitempty" jsonschema:"Literal full-text search query"`
Limit int `json:"limit,omitempty" jsonschema:"Maximum results from 1 to 100"`
Offset int `json:"offset,omitempty" jsonschema:"Number of matching concerns to skip for pagination"`
}
ListConcernsInput filters and bounds offline concern reads.
type ListOpportunitiesInput ¶
type ListOpportunitiesInput struct {
InvestigationID string `json:"investigation_id" jsonschema:"Investigation ID"`
Limit int `json:"limit,omitempty" jsonschema:"Maximum results from 1 to 100"`
}
ListOpportunitiesInput selects and bounds opportunities for an investigation.
type ListOpportunitiesOutput ¶
type ListOpportunitiesOutput struct {
Opportunities []OpportunitySummary `json:"opportunities"`
Total int `json:"total"`
}
ListOpportunitiesOutput contains bounded opportunities for an investigation.
type ListPullRequestPortfolioInput ¶
type ListPullRequestPortfolioInput struct {
Authors []string `json:"authors,omitempty" jsonschema:"Zero or one author login"`
PullRequests []ThreadRef `json:"pull_requests,omitempty" jsonschema:"One to 100 exact pull requests; cannot be combined with authors, state, or limit"`
State string `json:"state,omitempty" jsonschema:"open, closed, or all"`
Limit int `json:"limit,omitempty" jsonschema:"Maximum pull requests from 1 to 100; defaults to 20"`
View string `json:"view,omitempty" jsonschema:"compact or full; defaults to compact"`
SnapshotToken string `json:"snapshot_token,omitempty" jsonschema:"Optional immutable corpus snapshot token from a previous offline read"`
}
ListPullRequestPortfolioInput filters and bounds the stored pull-request portfolio.
type ListPullRequestPortfolioOutput ¶
type ListPullRequestPortfolioOutput struct {
Status string `json:"status"`
View string `json:"view"`
RuleVersion string `json:"rule_version"`
GeneratedAt string `json:"generated_at"`
PullRequests []PullRequestPortfolioItem `json:"pull_requests"`
Total int `json:"total"`
Truncated bool `json:"truncated"`
SnapshotToken string `json:"snapshot_token"`
Recovery *RecoveryPlan `json:"recovery,omitempty"`
}
ListPullRequestPortfolioOutput contains a deterministic portfolio projection.
type LocalContributionMatch ¶ added in v0.19.0
type LocalContributionMatch struct {
Path string `json:"path"`
Branch string `json:"branch,omitempty"`
Remote string `json:"remote,omitempty"`
PullRequest int `json:"pull_request"`
}
LocalContributionMatch associates an inspected local worktree with an existing authored pull request without taking ownership of the path.
type ManifestInput ¶ added in v0.15.0
type ManifestInput struct {
ID string `json:"id" jsonschema:"Manifest ID"`
SnapshotToken string `json:"snapshot_token,omitempty" jsonschema:"Optional immutable corpus snapshot token"`
}
ManifestInput identifies one persisted contribution evidence manifest.
type ManifestOutput ¶
type ManifestOutput struct {
ManifestID string `json:"manifest_id" jsonschema:"Stable sha256-prefixed manifest ID"`
ContentSHA256 string `json:"content_sha256" jsonschema:"Hex SHA-256 of stable manifest content"`
SchemaVersion string `json:"schema_version" jsonschema:"Contribution manifest predicate schema version"`
Status string `json:"status" jsonschema:"Overall completeness status"`
SnapshotToken string `json:"snapshot_token" jsonschema:"Immutable corpus snapshot token observed when this manifest was published or read"`
Statement manifest.Statement `json:"statement" jsonschema:"Typed in-toto-shaped evidence statement owned by GitContribute"`
}
ManifestOutput returns the stable identity and full in-toto-shaped statement.
type ManifestPullRequestInput ¶
type ManifestPullRequestInput struct {
Owner string `json:"owner" jsonschema:"GitHub repository owner"`
Repo string `json:"repo" jsonschema:"GitHub repository name"`
Number int `json:"number" jsonschema:"Positive pull request number"`
}
ManifestPullRequestInput identifies one exact stored pull request.
type MergeConflictInput ¶
type MergeConflictInput struct {
WorkspaceID string `json:"workspace_id" jsonschema:"Managed workspace ID"`
BaseOID string `json:"base_oid,omitempty" jsonschema:"Optional explicit base OID; defaults to the workspace recorded base"`
HeadOID string `json:"head_oid,omitempty" jsonschema:"Optional explicit head OID; defaults to the workspace recorded candidate"`
}
MergeConflictInput names two already-fetched revisions in a managed workspace.
type MergeConflictOutput ¶
type MergeConflictOutput struct {
WorkspaceID string `json:"workspace_id"`
BaseOID string `json:"base_oid"`
HeadOID string `json:"head_oid"`
MergeBase string `json:"merge_base,omitempty"`
Conflicted bool `json:"conflicted"`
Summary string `json:"summary"`
}
MergeConflictOutput reports the result of one local revision comparison.
type MineRepositoryFixPatternsInput ¶ added in v0.14.0
type MineRepositoryFixPatternsInput struct {
Repository RepositoryRef `json:"repository" jsonschema:"Stored GitHub repository whose pull-request history should be analyzed"`
TimeWindow FixPatternTimeWindow `json:"time_window" jsonschema:"Inclusive stored-observation window used to select pull requests"`
SymptomTaxonomy []FixPatternSymptom `json:"symptom_taxonomy" jsonschema:"One to 12 caller-defined symptom categories"`
MergeOutcomes []FixPatternOutcome `json:"merge_outcomes,omitempty" jsonschema:"Outcomes whose representative examples should be returned"`
CandidateLimit int `json:"candidate_limit,omitempty" jsonschema:"Maximum stored candidates examined per symptom from 1 to 100"`
HydrationLimit *int `` /* 133-byte string literal not displayed */
RepresentativeLimit int `json:"representative_limit,omitempty" jsonschema:"Maximum examples returned per symptom from 1 to 20"`
SnapshotToken string `json:"snapshot_token,omitempty" jsonschema:"Optional immutable corpus snapshot token"`
}
MineRepositoryFixPatternsInput requests a bounded network-assisted analysis of accepted and rejected pull-request patterns in one stored repository.
type NeighborOutput ¶
type NeighborOutput 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 SimilarityScore `json:"score"`
Reason string `json:"reason"`
}
NeighborOutput describes one similar stored thread and its score.
type NeighborSetOutput ¶ added in v0.13.0
type NeighborSetOutput struct {
Owner string `json:"owner"`
Repo string `json:"repo"`
Kind string `json:"kind"`
Number int `json:"number"`
SourceRevision string `json:"source_revision"`
Neighbors []NeighborOutput `json:"neighbors"`
}
NeighborSetOutput contains deterministic neighbors for one stored thread.
type NonNegativeInt ¶ added in v0.14.0
type NonNegativeInt int
NonNegativeInt is an integer count or delay that cannot be negative.
type OpportunityCandidateOutput ¶
type OpportunityCandidateOutput struct {
Rank int `json:"rank"`
Ref string `json:"ref"`
Repo string `json:"repo"`
Number int `json:"number"`
Title string `json:"title"`
URL string `json:"url"`
Score RadarScore `json:"score" jsonschema:"Deterministic Contribution Radar score from 0 to 100"`
Eligibility string `json:"eligibility"`
Confidence string `json:"confidence" jsonschema:"Categorical evidence confidence such as low, medium, or high"`
PositiveSignals []string `json:"positive_signals,omitempty"`
Risks []string `json:"risks,omitempty"`
Blockers []string `json:"blockers,omitempty"`
Unknowns []string `json:"unknowns,omitempty"`
LinkedPullRequests []int `json:"linked_pull_requests,omitempty"`
RelatedWork []OpportunityRelatedWorkOutput `json:"related_work,omitempty"`
SourceUpdatedAt string `json:"source_updated_at,omitempty"`
}
OpportunityCandidateOutput describes one ranked contribution candidate.
type OpportunityInput ¶
type OpportunityInput struct {
ID string `json:"id" jsonschema:"Opportunity ID"`
EvidenceLimit int `json:"evidence_limit,omitempty" jsonschema:"Maximum evidence IDs from 1 to 100"`
}
OpportunityInput selects an opportunity and bounds nested evidence.
type OpportunityOutput ¶
type OpportunityOutput struct {
ID string `json:"id"`
InvestigationID string `json:"investigation_id"`
HypothesisID string `json:"hypothesis_id,omitempty"`
Title string `json:"title"`
ProblemStatement string `json:"problem_statement"`
Category string `json:"category"`
Scope string `json:"scope"`
Impact string `json:"impact"`
Confidence Probability `json:"confidence"`
ExpectedEffort string `json:"expected_effort,omitempty"`
Dependencies []string `json:"dependencies,omitempty"`
CollisionStatus string `json:"collision_status"`
MaintainerAlignment string `json:"maintainer_alignment,omitempty"`
SourceRefs []SourceRef `json:"source_refs,omitempty"`
EvidenceTotal int `json:"evidence_total"`
EvidenceIDs []string `json:"evidence_ids,omitempty"`
Status string `json:"status"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
OpportunityOutput is the stable MCP representation of a contribution opportunity.
type OpportunityRelatedWorkOutput ¶
type OpportunityRelatedWorkOutput struct {
Ref string `json:"ref"`
Relation string `json:"relation"`
Direction string `json:"direction,omitempty"`
State string `json:"state,omitempty"`
}
OpportunityRelatedWorkOutput is the compact MCP view of one Radar relationship. Exact source evidence remains available in the CLI JSON view.
type OpportunitySummary ¶
type OpportunitySummary struct {
ID string `json:"id"`
InvestigationID string `json:"investigation_id"`
Title string `json:"title"`
Category string `json:"category"`
Status string `json:"status"`
Confidence Probability `json:"confidence"`
CollisionStatus string `json:"collision_status"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
OpportunitySummary is the compact opportunity representation used in lists.
type PlanSemanticCommitsInput ¶
type PlanSemanticCommitsInput struct {
WorkspaceID string `json:"workspace_id" jsonschema:"Managed workspace ID"`
ExpectedInventorySHA256 string `json:"expected_inventory_sha256" jsonschema:"Inventory digest returned by the preceding inspection"`
Groups []SemanticCommitGroupInput `json:"groups" jsonschema:"One to 100 proposed semantic commit groups"`
Unresolved []UnresolvedCommitUnitInput `json:"unresolved,omitempty" jsonschema:"Ambiguous units with explicit reasons"`
}
PlanSemanticCommitsInput binds agent-authored groups to a frozen inventory.
type PortfolioOverlapEvidenceOutput ¶
type PortfolioOverlapEvidenceOutput struct {
Kind string `json:"kind"`
Value string `json:"value"`
Score SimilarityScore `json:"score,omitempty"`
SourceRefs []string `json:"source_refs"`
}
PortfolioOverlapEvidenceOutput is one exact observed overlap reason.
type PortfolioOverlapMatchOutput ¶
type PortfolioOverlapMatchOutput struct {
PullRequestThreadID int64 `json:"pull_request_thread_id"`
Evidence []PortfolioOverlapEvidenceOutput `json:"evidence"`
}
PortfolioOverlapMatchOutput associates overlap evidence with one authored PR.
type PortfolioOverlapOutput ¶
type PortfolioOverlapOutput struct {
Candidate PortfolioSubjectInput `json:"candidate"`
Status string `json:"status"`
Coverage map[string]string `json:"coverage"`
Matches []PortfolioOverlapMatchOutput `json:"matches"`
}
PortfolioOverlapOutput preserves explicit coverage and never infers no overlap.
type PortfolioSubjectInput ¶
type PortfolioSubjectInput struct {
Kind string `json:"kind" jsonschema:"Candidate kind: opportunity, workspace, or pull_request"`
Ref string `json:"ref" jsonschema:"Local candidate ID or corpus pull-request thread ID"`
}
PortfolioSubjectInput identifies local candidate state for offline overlap analysis.
type PrecedentOutput ¶
type PrecedentOutput struct {
Source string `json:"source"`
Ref string `json:"ref"`
Kind string `json:"kind"`
State string `json:"state"`
StateReason string `json:"state_reason,omitempty"`
Title string `json:"title"`
Score SimilarityScore `json:"score"`
RuleVersion similarity.RuleVersion `json:"rule_version"`
Reasons []string `json:"reasons"`
ClosedAt string `json:"closed_at,omitempty"`
MergedAt string `json:"merged_at,omitempty"`
}
PrecedentOutput describes one stored thread analogous to a source thread.
type PrecedentSet ¶
type PrecedentSet struct {
Matches []PrecedentOutput `json:"matches" jsonschema:"Ranked precedent matches"`
Population int `json:"population" jsonschema:"All stored closed candidates"`
Considered int `json:"considered" jsonschema:"Candidates scored under the bound"`
Truncated bool `json:"truncated" jsonschema:"Whether candidates or matches were omitted"`
}
PrecedentSet reports both scored results and bounded candidate coverage.
type PrepareContributionInput ¶
type PrepareContributionInput struct {
OpportunityID string `json:"opportunity_id" jsonschema:"Opportunity ID"`
Kind string `json:"kind" jsonschema:"Contribution kind: issue or pull_request"`
WorkspaceID string `json:"workspace_id,omitempty" jsonschema:"Workspace ID for pull_request drafts"`
Approach string `json:"approach,omitempty" jsonschema:"Approach summary for pull requests"`
Changes string `json:"changes,omitempty" jsonschema:"Changes summary for pull requests"`
Compatibility string `json:"compatibility,omitempty" jsonschema:"Compatibility notes for pull requests"`
Limitations string `json:"limitations,omitempty" jsonschema:"Limitations for pull requests"`
LinkedIssue string `json:"linked_issue,omitempty" jsonschema:"Linked issue for pull requests"`
Guidance string `json:"guidance,omitempty" jsonschema:"Optional guidance to include"`
Success string `json:"success,omitempty" jsonschema:"Success criteria for issue drafts"`
ManifestID string `json:"manifest_id,omitempty" jsonschema:"Stored evidence manifest ID to reference without copying its claims"`
}
PrepareContributionInput renders a local issue or pull-request draft.
type PrepareIssueSetInput ¶ added in v0.12.0
type PrepareIssueSetInput struct {
Owner string `json:"owner" jsonschema:"GitHub repository owner"`
Repo string `json:"repo" jsonschema:"GitHub repository name"`
IssueNumbers []int `json:"issue_numbers" jsonschema:"One to 20 distinct positive issue numbers"`
PrecedentLimit int `json:"precedent_limit,omitempty" jsonschema:"Maximum accepted examples per issue from 1 to 10"`
ResponseFormat string `` /* 127-byte string literal not displayed */
SnapshotToken string `json:"snapshot_token,omitempty" jsonschema:"Optional immutable corpus snapshot token"`
}
PrepareIssueSetInput selects an exact, bounded issue set for offline contribution-evidence preparation.
type PrepareIssueSetOutput ¶ added in v0.12.0
type PrepareIssueSetOutput struct {
Status string `json:"status"`
Owner string `json:"owner"`
Repo string `json:"repo"`
ResponseFormat string `json:"response_format"`
SourceAsOf string `json:"source_as_of,omitempty"`
Items []BatchItem[PreparedIssueEvidence] `json:"items"`
Coverage []FacetCoverageOutput `json:"coverage"`
Gaps []IssueSetGap `json:"gaps,omitempty"`
RelationshipPopulation int `json:"relationship_population"`
RelationshipConsidered int `json:"relationship_considered"`
Truncated bool `json:"truncated"`
RecoveryPlans []RecoveryPlan `json:"recovery_plans,omitempty"`
SnapshotToken string `json:"snapshot_token"`
}
PrepareIssueSetOutput preserves requested issue order and reports all bounded-population and recovery information needed to interpret the result.
type PreparedIssueEvidence ¶ added in v0.12.0
type PreparedIssueEvidence struct {
Number int `json:"number"`
Title string `json:"title"`
State string `json:"state"`
StateReason string `json:"state_reason,omitempty"`
Labels []string `json:"labels,omitempty"`
BodyStatus string `json:"body_status"`
Body string `json:"body,omitempty"`
SourceUpdatedAt string `json:"source_updated_at,omitempty"`
Coverage []FacetCoverageOutput `json:"coverage"`
Gaps []IssueSetGap `json:"gaps,omitempty"`
RelatedWork []IssueSetRelatedWork `json:"related_work"`
RelatedWorkTotal int `json:"related_work_total"`
RelatedWorkTotalKnown bool `json:"related_work_total_known"`
RelatedWorkTruncated bool `json:"related_work_truncated"`
AcceptedExamples []PrecedentOutput `json:"accepted_examples"`
DuplicateCluster *IssueSetDuplicateCluster `json:"duplicate_cluster,omitempty"`
Linkage IssueSetLinkageCandidate `json:"linkage"`
ContributionDisposition ContributionDisposition `json:"contribution_disposition"`
}
PreparedIssueEvidence contains stored facts and bounded derived evidence for one exact supplied issue.
type PreviewRepositoryFixPatternsInput ¶ added in v0.17.0
type PreviewRepositoryFixPatternsInput MineRepositoryFixPatternsInput
PreviewRepositoryFixPatternsInput is the read-only counterpart to the durable mining operation. It never creates a job or persists a report.
type Probability ¶ added in v0.14.0
type Probability float64
Probability is a numeric confidence value in the inclusive range [0, 1].
type ProgressPercent ¶ added in v0.14.0
type ProgressPercent int
ProgressPercent is an integer completion percentage in the inclusive range [0, 100].
type PromoteConcernInput ¶
type PromoteConcernInput struct {
ID string `json:"id" jsonschema:"Concern ID"`
Kind string `json:"kind" jsonschema:"Promotion target: investigation or opportunity"`
Category string `json:"category" jsonschema:"Contribution category"`
Scope string `json:"scope,omitempty" jsonschema:"Required opportunity scope"`
Impact string `json:"impact,omitempty" jsonschema:"Required opportunity impact"`
ExpectedEffort string `json:"expected_effort,omitempty" jsonschema:"Required expected effort"`
}
PromoteConcernInput configures atomic downstream workflow creation.
type PromoteOpportunityInput ¶
type PromoteOpportunityInput struct {
HypothesisID string `json:"hypothesis_id" jsonschema:"Hypothesis ID to promote"`
ProblemStatement string `json:"problem_statement" jsonschema:"Problem statement"`
Scope string `json:"scope" jsonschema:"Scope of the opportunity"`
Impact string `json:"impact" jsonschema:"Impact of the opportunity"`
ExpectedEffort string `json:"expected_effort" jsonschema:"Expected effort"`
Confidence Probability `json:"confidence" jsonschema:"Confidence from 0.0 to 1.0"`
Dependencies []string `json:"dependencies,omitempty" jsonschema:"Dependencies"`
MaintainerAlignment string `json:"maintainer_alignment,omitempty" jsonschema:"Maintainer alignment note"`
SourceRefs []SourceRef `json:"source_refs,omitempty" jsonschema:"Source references"`
}
PromoteOpportunityInput converts a hypothesis into a scoped opportunity.
type PublishedDraftDifferenceOutput ¶ added in v0.14.0
type PublishedDraftVerificationOutput ¶ added in v0.14.0
type PublishedDraftVerificationOutput struct {
Status string `json:"status"`
DraftID string `json:"draft_id"`
Revision int `json:"revision"`
PublishedRef string `json:"published_ref"`
TitleComparison string `json:"title_comparison,omitempty"`
BodyComparison string `json:"body_comparison,omitempty"`
DraftTitleSHA256 string `json:"draft_title_sha256"`
DraftBodySHA256 string `json:"draft_body_sha256"`
PublishedTitleSHA256 string `json:"published_title_sha256,omitempty"`
PublishedBodySHA256 string `json:"published_body_sha256,omitempty"`
ObservedAt string `json:"observed_at,omitempty"`
SourceUpdatedAt string `json:"source_updated_at,omitempty"`
CoverageStatus string `json:"coverage_status"`
Difference *PublishedDraftDifferenceOutput `json:"difference,omitempty"`
Reason string `json:"reason,omitempty"`
}
type PullRequestCheckOutput ¶ added in v1.1.0
type PullRequestCheckOutput struct {
Kind string `json:"kind"`
Name string `json:"name"`
Status string `json:"status"`
Conclusion string `json:"conclusion,omitempty"`
DetailsURL string `json:"details_url,omitempty"`
StartedAt *time.Time `json:"started_at,omitempty"`
CompletedAt *time.Time `json:"completed_at,omitempty"`
}
type PullRequestCheckTransition ¶ added in v1.1.0
type PullRequestFeedbackMatch ¶ added in v0.19.0
type PullRequestFeedbackMatch struct {
Repository RepositoryRef `json:"repository"`
PullRequest ThreadRef `json:"pull_request"`
PullRequestReference string `json:"pull_request_reference"`
PullRequestAuthor string `json:"pull_request_author,omitempty"`
PullRequestState string `json:"pull_request_state"`
Merged *bool `json:"merged,omitempty"`
Channel string `json:"channel"`
FeedbackID string `json:"feedback_id"`
FeedbackNodeID string `json:"feedback_node_id,omitempty"`
ThreadID string `json:"thread_id,omitempty"`
ThreadReference string `json:"thread_reference,omitempty"`
CommentReference string `json:"comment_reference,omitempty"`
InReplyToID string `json:"in_reply_to_id,omitempty"`
FeedbackAuthor string `json:"feedback_author,omitempty"`
ReviewState string `json:"review_state,omitempty"`
Body string `json:"body,omitempty"`
Path string `json:"path,omitempty"`
Line *int `json:"line,omitempty"`
StartLine *int `json:"start_line,omitempty"`
Side string `json:"side,omitempty"`
StartSide string `json:"start_side,omitempty"`
Outdated bool `json:"outdated"`
Resolved *bool `json:"resolved,omitempty"`
ResolutionState string `json:"resolution_state" jsonschema:"Resolution state: resolved, unresolved, or unknown"`
ResolvedBy string `json:"resolved_by,omitempty"`
CreatedAt string `json:"created_at,omitempty"`
UpdatedAt string `json:"updated_at,omitempty"`
HeadSHA string `json:"head_sha,omitempty"`
SourceObservationID int64 `json:"source_observation_id"`
}
type PullRequestPortfolioItem ¶
type PullRequestPortfolioItem struct {
Ref string `json:"ref"`
Owner string `json:"owner"`
Repo string `json:"repo"`
Number int `json:"number"`
Title string `json:"title"`
State string `json:"state"`
Author string `json:"author"`
Draft bool `json:"draft"`
Attention string `json:"attention"`
Reasons []string `json:"reasons"`
Mergeable *bool `json:"mergeable,omitempty"`
MergeStateStatus string `json:"merge_state_status,omitempty"`
HeadRef string `json:"head_ref,omitempty"`
HeadSHA string `json:"head_sha,omitempty"`
BaseRef string `json:"base_ref,omitempty"`
BaseSHA string `json:"base_sha,omitempty"`
ReviewDecision string `json:"review_decision,omitempty"`
ChecksStatus string `json:"checks_status,omitempty"`
ChecksTotal int `json:"checks_total,omitempty"`
UnresolvedReviewThreads *int `json:"unresolved_review_threads,omitempty"`
MergeQueueState string `json:"merge_queue_state,omitempty"`
MergeQueuePosition int `json:"merge_queue_position,omitempty"`
ClosingIssues []string `json:"closing_issues,omitempty"`
ChangedFiles []string `json:"changed_files,omitempty"`
StatusCoverage string `json:"status_coverage"`
Facets []FacetCoverageOutput `json:"facets,omitempty"`
SourceUpdatedAt string `json:"source_updated_at"`
StatusObservedAt string `json:"status_observed_at,omitempty"`
Recovery *RecoveryPlan `json:"recovery,omitempty"`
}
PullRequestPortfolioItem contains source-backed PR facts and a deterministic portfolio.v1 attention classification. Missing status facets remain explicit in StatusCoverage and Reasons.
type RadarScore ¶ added in v0.14.0
type RadarScore int
RadarScore is a deterministic Contribution Radar score in the inclusive range [0, 100].
type RankOpportunitiesInput ¶
type RankOpportunitiesInput struct {
Repositories []RepositoryRef `json:"repositories" jsonschema:"Required 1-50 stored repositories"`
Limit int `json:"limit,omitempty" jsonschema:"Result bound from 1-100"`
MaxResultsPerRepository int `json:"max_results_per_repository,omitempty" jsonschema:"Per-repository bound from 1-100"`
SnapshotToken string `json:"snapshot_token,omitempty" jsonschema:"Optional immutable corpus snapshot token"`
}
RankOpportunitiesInput bounds ranking across stored repositories.
type RankOpportunitiesOutput ¶
type RankOpportunitiesOutput struct {
Status string `json:"status"`
Candidates []OpportunityCandidateOutput `json:"candidates"`
Repositories []BatchItem[RepositoryOpportunitySummaryOutput] `json:"repositories"`
GeneratedAt string `json:"generated_at"`
Total int `json:"total"`
Truncated bool `json:"truncated"`
SnapshotToken string `json:"snapshot_token"`
Recovery *RecoveryPlan `json:"recovery,omitempty"`
}
RankOpportunitiesOutput combines deterministic cross-repository ranking with per-repository coverage or availability results.
type ReadSourceFilesInput ¶ added in v0.18.0
type ReadSourceFilesInput struct {
Owner string `json:"owner" jsonschema:"GitHub repository owner"`
Repo string `json:"repo" jsonschema:"GitHub repository name"`
Ref string `json:"ref" jsonschema:"Commit SHA, branch, or tag; resolved commit is authoritative"`
Files []SourceFileRequest `json:"files" jsonschema:"Ordered repository-relative files with optional inclusive line ranges"`
PerFileBytes int `json:"per_file_bytes,omitempty" jsonschema:"Maximum decoded bytes per file from 1 to 1048576"`
TotalBytes int `json:"total_bytes,omitempty" jsonschema:"Maximum selected bytes for the complete bundle from 1 to 4194304"`
}
ReadSourceFilesInput selects a bounded source bundle at a commit or named ref. Named refs are resolved before content is read and are not authoritative provenance.
type ReadSourceFilesOutput ¶ added in v0.18.0
type ReadSourceFilesOutput struct {
Status string `json:"status"`
Repository RepositoryRef `json:"repository"`
RequestedRef string `json:"requested_ref"`
ResolvedRef string `json:"resolved_ref"`
CommitSHA string `json:"commit_sha"`
PerFileBytes int `json:"per_file_bytes"`
TotalByteLimit int `json:"total_byte_limit"`
TotalBytes int `json:"total_bytes"`
Items []SourceFileBatchItem `json:"items"`
Completeness SourceBundleCompleteness `json:"completeness"`
ObservedAt string `json:"observed_at"`
Rate GitHubRateOutput `json:"rate"`
ArtifactDigest string `json:"artifact_digest"`
ResourceURI string `json:"resource_uri"`
}
type Reader ¶
type Reader interface {
Search(context.Context, SearchInput) (SearchOutput, error)
SearchRepositories(context.Context, SearchRepositoriesInput) (SearchRepositoriesOutput, error)
Repository(context.Context, RepoInput) (RepositoryOutput, error)
Thread(context.Context, ThreadInput) (ThreadOutput, error)
ThreadByNumber(context.Context, ThreadByNumberInput) (ThreadOutput, error)
Dossier(context.Context, RepoInput) (DossierOutput, error)
SearchCode(context.Context, SearchCodeInput) (SearchCodeOutput, error)
ExplainMatch(context.Context, ExplainMatchInput) (ExplainMatchOutput, error)
GetJob(context.Context, GetJobInput) (GetJobOutput, error)
Investigation(context.Context, InvestigationInput) (InvestigationOutput, error)
ListOpportunities(context.Context, ListOpportunitiesInput) (ListOpportunitiesOutput, error)
Opportunity(context.Context, OpportunityInput) (OpportunityOutput, error)
Evidence(context.Context, EvidenceInput) (EvidenceOutput, error)
Readiness(context.Context, ReadinessInput) (ReadinessOutput, error)
FindClusters(context.Context, FindClustersInput) (FindClustersOutput, error)
GetCoverage(context.Context, GetCoverageInput) (GetCoverageOutput, error)
Lens(context.Context, LensInput) (LensOutput, error)
}
Reader is the local, read-only application boundary exposed through MCP. Implementations must not perform network access.
type ReadinessCheck ¶
type ReadinessCheck struct {
CheckID string `json:"check_id"`
RuleID string `json:"rule_id"`
RuleVersion string `json:"rule_version"`
Status string `json:"status"`
Summary string `json:"summary"`
EvidenceRefs []string `json:"evidence_refs,omitempty"`
Remediation string `json:"remediation,omitempty"`
EvaluatedAt string `json:"evaluated_at"`
}
ReadinessCheck is one explainable readiness rule result.
type ReadinessInput ¶
type ReadinessInput struct {
OpportunityID string `json:"opportunity_id" jsonschema:"Opportunity ID"`
}
ReadinessInput selects a contribution opportunity readiness report.
type ReadinessOutput ¶
type ReadinessOutput struct {
OpportunityID string `json:"opportunity_id"`
RuleSetVersion string `json:"rule_set_version"`
Status string `json:"status"`
EvaluatedAt string `json:"evaluated_at"`
Checks []ReadinessCheck `json:"checks"`
}
ReadinessOutput is the stable MCP representation of one readiness report.
type RecordHypothesisInput ¶
type RecordHypothesisInput struct {
InvestigationID string `json:"investigation_id" jsonschema:"Investigation ID"`
Title string `json:"title" jsonschema:"Hypothesis title"`
Description string `json:"description" jsonschema:"Hypothesis description"`
Category string `json:"category" jsonschema:"Category such as bug, performance, or documentation"`
ExpectedBehavior string `json:"expected_behavior,omitempty" jsonschema:"Expected behavior"`
ObservedBehavior string `json:"observed_behavior,omitempty" jsonschema:"Observed behavior"`
PotentialImpact string `json:"potential_impact,omitempty" jsonschema:"Potential impact"`
OpenQuestions []string `json:"open_questions,omitempty" jsonschema:"Open questions"`
AffectedComponents []string `json:"affected_components,omitempty" jsonschema:"Affected components"`
SourceRefs []SourceRef `json:"source_refs,omitempty" jsonschema:"Source references"`
}
RecordHypothesisInput records a structured hypothesis and its provenance.
type RecoveryPlan ¶ added in v0.17.0
type RecoveryPlan struct {
Version string `json:"version"`
Reason string `json:"reason"`
Message string `json:"message"`
Then []ToolCall `json:"then,omitempty"`
}
RecoveryPlan is the only model-visible recovery shape. Versioning keeps the contract explicit while Then preserves the order in which calls are made.
type RelatedContributionThread ¶ added in v0.19.0
type RelatedContributionThread struct {
Kind string `json:"kind"`
Number int `json:"number"`
Title string `json:"title"`
Author string `json:"author,omitempty"`
URL string `json:"url,omitempty"`
}
RelatedContributionThread is a bounded live-search result retained as context for the routing decision.
type RepoInput ¶
type RepoInput struct {
Owner string `json:"owner" jsonschema:"GitHub repository owner"`
Repo string `json:"repo" jsonschema:"GitHub repository name"`
}
RepoInput identifies a repository for an MCP operation.
type RepositoryMetadataOutput ¶
type RepositoryMetadataOutput struct {
Status string `json:"status"`
ObservedAt string `json:"observed_at,omitempty"`
SourceUpdatedAt string `json:"source_updated_at,omitempty"`
Recovery *RecoveryPlan `json:"recovery,omitempty"`
}
RepositoryMetadataOutput describes the coverage of repository metadata.
type RepositoryOpportunitySummaryOutput ¶
type RepositoryOpportunitySummaryOutput struct {
Repo string `json:"repo"`
TotalOpenIssues int `json:"total_open_issues"`
Considered int `json:"considered"`
Returned int `json:"returned"`
Truncated bool `json:"truncated"`
PopulationCapped bool `json:"population_capped"`
Recovery *RecoveryPlan `json:"recovery,omitempty"`
}
RepositoryOpportunitySummaryOutput reports ranking coverage for one repository.
type RepositoryOutput ¶
type RepositoryOutput = TypedRepositoryOutput
RepositoryOutput is the stable MCP representation of a repository.
type RepositoryRef ¶
type RepositoryRef struct {
Owner string `json:"owner" jsonschema:"GitHub repository owner"`
Repo string `json:"repo" jsonschema:"GitHub repository name"`
}
RepositoryRef identifies one GitHub repository without implying that it has been fetched or indexed locally.
type RepositorySearchMatch ¶
type RepositorySearchMatch struct {
Ref string `json:"ref"`
Owner string `json:"owner"`
Repo string `json:"repo"`
Description *string `json:"description,omitempty"`
Language *string `json:"language,omitempty"`
Stars *int `json:"stars,omitempty"`
PushedAt string `json:"pushed_at,omitempty"`
Metadata RepositoryMetadataOutput `json:"metadata"`
DefaultBranch *string `json:"default_branch,omitempty"`
License *string `json:"license,omitempty"`
Topics []string `json:"topics,omitempty"`
Watchers *int `json:"watchers,omitempty"`
Forks *int `json:"forks,omitempty"`
OpenIssues *int `json:"open_issues,omitempty"`
Archived *bool `json:"archived,omitempty"`
Fork *bool `json:"fork,omitempty"`
DossierStatus string `json:"dossier_status" jsonschema:"Persisted dossier availability: available or missing"`
DossierAsOf string `json:"dossier_as_of,omitempty"`
}
RepositorySearchMatch is a token-bounded live repository search result.
type ResourceReadAction ¶ added in v0.17.0
type ResourceReadAction struct {
URI string `json:"uri"`
}
ResourceReadAction identifies one exact resource handoff.
type RunValidationInput ¶
type RunValidationInput struct {
ID string `json:"id" jsonschema:"Validation definition ID"`
Target string `json:"target" jsonschema:"Run target: base, candidate, or both"`
RunCount int `json:"run_count,omitempty" jsonschema:"Attempts per target from 1 to 100; defaults to 1"`
Concurrency int `json:"concurrency,omitempty" jsonschema:"Concurrent attempts from 1 to 16; defaults to 1"`
PerRunTimeout string `json:"per_run_timeout,omitempty" jsonschema:"Optional Go duration per attempt"`
OverallTimeout string `json:"overall_timeout,omitempty" jsonschema:"Optional Go duration for the whole group"`
SampleInterval string `json:"sample_interval,omitempty" jsonschema:"Process telemetry interval from 10ms to 10s"`
Execute bool `json:"execute" jsonschema:"Must be true to authorize host execution"`
}
RunValidationInput configures one bounded validation execution job.
type SearchActorsInput ¶ added in v1.0.0
type SearchActorsOutput ¶ added in v1.0.0
type SearchActorsOutput struct {
Items []ActorOutput `json:"items"`
Total int `json:"total"`
NextCursor string `json:"next_cursor,omitempty"`
SnapshotToken string `json:"snapshot_token"`
}
type SearchCodeBatchInput ¶ added in v0.18.0
type SearchCodeBatchInput struct {
Owner string `json:"owner" jsonschema:"Repository owner"`
Repo string `json:"repo" jsonschema:"Repository name"`
Queries []string `json:"queries" jsonschema:"One to 20 code queries, returned in input order"`
Limit int `json:"limit,omitempty" jsonschema:"Shared per-query result limit from 1 to 100"`
SnapshotToken string `json:"snapshot_token,omitempty" jsonschema:"Optional immutable corpus snapshot token"`
}
SearchCodeBatchInput composes up to 20 offline code searches over one repository scope and one optional snapshot precondition.
type SearchCodeBatchOutput ¶ added in v0.18.0
type SearchCodeBatchOutput struct {
Status string `json:"status"`
Repository RepositoryRef `json:"repository,omitempty"`
Items []BatchItem[SearchCodeOutput] `json:"items"`
SnapshotToken string `json:"snapshot_token"`
Recovery *RecoveryPlan `json:"recovery,omitempty"`
Provenance CorpusReadProvenance `json:"provenance"`
}
type SearchCodeInput ¶
type SearchCodeInput struct {
Query string `json:"query" jsonschema:"Code search query"`
Owner string `json:"owner,omitempty" jsonschema:"Optional repository owner"`
Repo string `json:"repo,omitempty" jsonschema:"Optional repository name"`
Limit int `json:"limit,omitempty" jsonschema:"Maximum results from 1 to 100"`
Cursor string `json:"cursor,omitempty" jsonschema:"Opaque cursor returned by the previous page"`
SnapshotToken string `json:"snapshot_token,omitempty" jsonschema:"Optional immutable corpus snapshot token from a previous offline read"`
}
SearchCodeInput describes an offline code search page.
type SearchCodeOutput ¶
type SearchCodeOutput struct {
Query string `json:"query"`
Total int `json:"total"`
Matches []CodeMatchOutput `json:"matches"`
Coverage []CodeIndexCoverageOutput `json:"coverage,omitempty"`
NextCursor string `json:"next_cursor,omitempty"`
SnapshotToken string `json:"snapshot_token"`
Recovery *RecoveryPlan `json:"recovery,omitempty"`
Provenance CorpusReadProvenance `json:"provenance"`
}
SearchCodeOutput contains one page of offline code matches.
type SearchContributionsInput ¶ added in v1.0.0
type SearchContributionsInput struct {
Actors []string `json:"actors,omitempty"`
Repositories []RepositoryRef `json:"repositories,omitempty"`
Kinds []string `json:"kinds,omitempty"`
Source string `json:"source,omitempty" jsonschema:"Contribution source: github_profile or corpus_observation"`
OrganizationNodeID string `` /* 127-byte string literal not displayed */
From string `json:"from,omitempty"`
To string `json:"to,omitempty"`
Sort string `json:"sort,omitempty"`
Order string `json:"order,omitempty"`
Limit int `json:"limit,omitempty"`
Cursor string `json:"cursor,omitempty"`
SnapshotToken string `json:"snapshot_token,omitempty"`
}
type SearchContributionsOutput ¶ added in v1.0.0
type SearchContributionsOutput struct {
Items []ContributionOutput `json:"items"`
Total int `json:"total"`
NextCursor string `json:"next_cursor,omitempty"`
SnapshotToken string `json:"snapshot_token"`
Coverage []ActorContributionCoverage `json:"coverage"`
}
type SearchGitHubRepositoriesInput ¶
type SearchGitHubRepositoriesInput struct {
RawQuery string `json:"raw_query,omitempty" jsonschema:"Advanced raw GitHub query; exclusive with filters"`
Text string `json:"text,omitempty" jsonschema:"Text to match"`
MatchFields []string `json:"match_fields,omitempty" jsonschema:"Text fields: name, description, or readme"`
Topics []string `json:"topics,omitempty" jsonschema:"Topics that must all match"`
Language string `json:"language,omitempty" jsonschema:"Primary language"`
StarsMin *int `json:"stars_min,omitempty" jsonschema:"Minimum stargazer count, including zero"`
StarsMax *int `json:"stars_max,omitempty" jsonschema:"Maximum stargazer count, including zero"`
CreatedAfter string `json:"created_after,omitempty" jsonschema:"Created on or after YYYY-MM-DD"`
CreatedBefore string `json:"created_before,omitempty" jsonschema:"Created on or before YYYY-MM-DD"`
PushedAfter string `json:"pushed_after,omitempty" jsonschema:"Pushed on or after YYYY-MM-DD"`
PushedBefore string `json:"pushed_before,omitempty" jsonschema:"Pushed on or before YYYY-MM-DD"`
Archived *bool `json:"archived,omitempty" jsonschema:"Archived state"`
Fork *bool `json:"fork,omitempty" jsonschema:"Fork state"`
Sort string `json:"sort,omitempty" jsonschema:"Optional GitHub sort: stars, forks, help-wanted-issues, or updated"`
Order string `json:"order,omitempty" jsonschema:"Sort order: asc or desc"`
Limit int `json:"limit,omitempty" jsonschema:"Results per page from 1 to 100"`
Page int `json:"page,omitempty" jsonschema:"Result page within GitHub's 1,000-result cap"`
ResponseFormat string `json:"response_format,omitempty" jsonschema:"concise or detailed"`
}
SearchGitHubRepositoriesInput defines one bounded live GitHub search.
type SearchGitHubRepositoriesOutput ¶
type SearchGitHubRepositoriesOutput struct {
Status string `json:"status"`
Query string `json:"query"`
Interpretation string `json:"interpretation"`
ResponseFormat string `json:"response_format"`
Page int `json:"page"`
NextPage int `json:"next_page,omitempty"`
Total int `json:"total"`
Incomplete bool `json:"incomplete"`
Items []BatchItem[RepositorySearchMatch] `json:"items"`
Warnings []SearchWarning `json:"warnings,omitempty"`
RecoveryPlans []RecoveryPlan `json:"recovery_plans,omitempty"`
}
SearchGitHubRepositoriesOutput contains search results and completeness metadata.
type SearchGitHubThreadsInput ¶ added in v0.18.0
type SearchGitHubThreadsInput struct {
Owner string `json:"owner" jsonschema:"GitHub repository owner"`
Repo string `json:"repo" jsonschema:"GitHub repository name"`
Query string `json:"query" jsonschema:"User search text or GitHub issue-search qualifiers"`
Kind string `json:"kind,omitempty" jsonschema:"Optional issue or pull_request filter"`
State string `json:"state,omitempty" jsonschema:"Optional open, closed, or all state filter"`
Sort string `json:"sort,omitempty" jsonschema:"Optional GitHub issue-search sort: comments, created, updated, or reactions"`
Order string `json:"order,omitempty" jsonschema:"Optional asc or desc order"`
Page int `json:"page,omitempty" jsonschema:"GitHub result page from 1 to 1000"`
Limit int `json:"limit,omitempty" jsonschema:"Results per page from 1 to 100"`
}
SearchGitHubThreadsInput selects one bounded live GitHub issue-search page. The repository is required; live code search is intentionally not part of this operation.
type SearchGitHubThreadsOutput ¶ added in v0.18.0
type SearchGitHubThreadsOutput struct {
Status string `json:"status"`
Repository RepositoryRef `json:"repository"`
Query string `json:"query"`
ProviderQuery string `json:"provider_query"`
Kind string `json:"kind,omitempty"`
State string `json:"state,omitempty"`
Sort string `json:"sort,omitempty"`
Order string `json:"order,omitempty"`
Page int `json:"page"`
Limit int `json:"limit"`
NextPage int `json:"next_page,omitempty"`
Total int `json:"total"`
Incomplete bool `json:"incomplete"`
Rate GitHubRateOutput `json:"rate"`
Items []BatchItem[ThreadOutput] `json:"items"`
Coverage string `json:"coverage" jsonschema:"Repository-wide thread coverage remains incomplete; this search page is not proof of absence"`
ObservedAt string `json:"observed_at"`
ArtifactDigest string `json:"artifact_digest"`
ResourceURI string `json:"resource_uri"`
RecoveryPlans []RecoveryPlan `json:"recovery_plans,omitempty"`
}
SearchGitHubThreadsOutput is the compact live result. The complete ordered result, including provider provenance and item IDs, is available through ResourceURI.
type SearchGitHubUsersInput ¶ added in v1.0.0
type SearchGitHubUsersInput struct {
Query string `json:"query" jsonschema:"Non-empty GitHub user search query"`
Sort string `json:"sort,omitempty" jsonschema:"Provider ordering: best_match, followers, repositories, or joined"`
Order string `json:"order,omitempty" jsonschema:"Provider order: asc or desc"`
Limit int `json:"limit,omitempty" jsonschema:"Results to return from 1 to 100"`
Page int `json:"page,omitempty" jsonschema:"Provider result page from 1 to 10"`
}
type SearchGitHubUsersOutput ¶ added in v1.0.0
type SearchGitHubUsersOutput struct {
Query string `json:"query"`
Total int `json:"total"`
Incomplete bool `json:"incomplete"`
Page int `json:"page"`
NextPage int `json:"next_page,omitempty"`
Items []ActorIdentityOutput `json:"items"`
ObservedAt string `json:"observed_at"`
Rate GitHubRateOutput `json:"rate"`
}
type SearchInput ¶
type SearchInput struct {
Query string `json:"query" jsonschema:"Full-text query"`
Owner string `json:"owner,omitempty" jsonschema:"Optional repository owner"`
Repo string `json:"repo,omitempty" jsonschema:"Optional repository name"`
Kind string `json:"kind,omitempty" jsonschema:"Optional thread kind"`
State string `json:"state,omitempty"`
StateReason string `json:"state_reason,omitempty"`
Merged *bool `json:"merged,omitempty"`
Author string `json:"author,omitempty"`
Association string `json:"author_association,omitempty"`
Assignee string `json:"assignee,omitempty"`
Labels []string `json:"labels,omitempty"`
UpdatedAfter string `json:"updated_after,omitempty"`
UpdatedBefore string `json:"updated_before,omitempty"`
Limit int `json:"limit,omitempty" jsonschema:"Maximum results from 1 to 100"`
Cursor string `json:"cursor,omitempty" jsonschema:"Opaque cursor returned by the previous page"`
Sort string `json:"sort,omitempty" jsonschema:"Order: relevance or updated"`
MatchMode string `json:"match_mode,omitempty" jsonschema:"Term matching: all requires every term; any requires at least one term"`
View string `json:"view,omitempty" jsonschema:"compact omits full bodies and keeps bounded excerpts; full includes stored bodies"`
SnapshotToken string `json:"snapshot_token,omitempty" jsonschema:"Optional immutable corpus snapshot token from a previous offline read"`
}
SearchInput describes an offline thread search page.
type SearchOutput ¶
type SearchOutput struct {
Query string `json:"query"`
QueryInterpretation string `json:"query_interpretation"`
MatchMode string `json:"match_mode"`
View string `json:"view"`
Matches []ThreadOutput `json:"matches"`
Total int `json:"total"`
NextCursor string `json:"next_cursor,omitempty"`
UnknownMergeCount int `json:"unknown_merge_count,omitempty"`
Suggestion string `json:"suggestion,omitempty"`
Recovery *RecoveryPlan `json:"recovery,omitempty"`
SnapshotToken string `json:"snapshot_token"`
Provenance CorpusReadProvenance `json:"provenance"`
}
SearchOutput contains one page of offline thread matches.
type SearchPullRequestFeedbackInput ¶ added in v0.19.0
type SearchPullRequestFeedbackInput struct {
Repository RepositoryRef `json:"repository" jsonschema:"One indexed GitHub repository"`
FeedbackAuthor string `json:"feedback_author,omitempty" jsonschema:"Exact feedback author login"`
PullRequestAuthor string `json:"pull_request_author,omitempty" jsonschema:"Exact pull-request author login"`
State string `json:"state,omitempty" jsonschema:"Pull-request state: open, closed, or all"`
Merged string `json:"merged,omitempty" jsonschema:"Merge state: true, false, unknown, or any"`
ThreadState string `json:"thread_state,omitempty" jsonschema:"Review-thread resolution: resolved, unresolved, or all"`
Channel string `json:"channel,omitempty" jsonschema:"Feedback channel"`
Text string `json:"text,omitempty" jsonschema:"Full-text feedback search"`
CreatedAfter string `json:"created_after,omitempty" jsonschema:"Feedback created at or after RFC3339 timestamp"`
CreatedBefore string `json:"created_before,omitempty" jsonschema:"Feedback created at or before RFC3339 timestamp"`
UpdatedAfter string `json:"updated_after,omitempty" jsonschema:"Feedback updated at or after RFC3339 timestamp"`
UpdatedBefore string `json:"updated_before,omitempty" jsonschema:"Feedback updated at or before RFC3339 timestamp"`
Sort string `` /* 131-byte string literal not displayed */
Order string `json:"order,omitempty" jsonschema:"Sort order: asc or desc"`
Limit int `json:"limit,omitempty" jsonschema:"Results per page from 1 to 100"`
Cursor string `json:"cursor,omitempty" jsonschema:"Opaque cursor returned by the previous page"`
SnapshotToken string `json:"snapshot_token,omitempty" jsonschema:"Optional immutable corpus snapshot token from a previous offline read"`
}
SearchPullRequestFeedbackInput filters the stored repository feedback projection. It never performs a network read.
type SearchPullRequestFeedbackOutput ¶ added in v0.19.0
type SearchPullRequestFeedbackOutput struct {
Status string `json:"status"`
Coverage string `json:"coverage"`
Matches []PullRequestFeedbackMatch `json:"matches"`
Total int `json:"total"`
Truncated bool `json:"truncated"`
NextCursor string `json:"next_cursor,omitempty"`
SnapshotToken string `json:"snapshot_token"`
Projection string `json:"projection_version"`
IncompletePRs int `json:"incomplete_pull_requests,omitempty"`
Recovery *RecoveryPlan `json:"recovery,omitempty"`
}
type SearchRepositoriesInput ¶
type SearchRepositoriesInput struct {
Query string `json:"query,omitempty" jsonschema:"Repository full-text query"`
Owner string `json:"owner,omitempty" jsonschema:"Optional repository owner"`
Repo string `json:"repo,omitempty" jsonschema:"Optional repository name"`
Limit int `json:"limit,omitempty" jsonschema:"Maximum results from 1 to 100"`
Cursor string `json:"cursor,omitempty" jsonschema:"Opaque cursor returned by the previous page"`
Sort string `json:"sort,omitempty" jsonschema:"Order: relevance or updated"`
SnapshotToken string `json:"snapshot_token,omitempty" jsonschema:"Optional immutable corpus snapshot token from a previous offline read"`
}
SearchRepositoriesInput describes an offline repository search page.
type SearchRepositoriesOutput ¶
type SearchRepositoriesOutput struct {
Query string `json:"query"`
Total int `json:"total"`
Matches []RepositoryOutput `json:"matches"`
Incomplete bool `json:"incomplete" jsonschema:"Whether the local result or nested repository reads are incomplete"`
Missing []RepositoryRef `json:"missing,omitempty" jsonschema:"Repository matches whose local projection was unavailable"`
NextCursor string `json:"next_cursor,omitempty"`
SnapshotToken string `json:"snapshot_token"`
Recovery *RecoveryPlan `json:"recovery,omitempty"`
Provenance CorpusReadProvenance `json:"provenance"`
}
SearchRepositoriesOutput contains one page of repository matches.
type SearchWarning ¶
type SearchWarning struct {
Code string `json:"code"`
Message string `json:"message"`
Suggestion string `json:"suggestion,omitempty"`
}
SearchWarning explains a request-specific limitation and how to improve it.
type SemanticCommitGroupInput ¶
type SemanticCommitGroupInput struct {
Name string `json:"name" jsonschema:"Unique group name used by dependency references"`
Intent string `json:"intent" jsonschema:"Concrete outcome of this commit"`
Type string `json:"type" jsonschema:"Conventional commit type"`
Scope string `json:"scope,omitempty" jsonschema:"Optional conventional commit scope"`
UnitIDs []string `json:"unit_ids" jsonschema:"One or more IDs from workspace.inspect_commit_changes"`
DependsOn []string `json:"depends_on,omitempty" jsonschema:"Group names that must precede this group"`
ValidationCommands []string `json:"validation_commands,omitempty" jsonschema:"Focused validation commands for this group"`
TestOwners []string `json:"test_owners,omitempty" jsonschema:"Tests or owners responsible for this group"`
}
SemanticCommitGroupInput supplies judgment that cannot be inferred safely.
type SemanticCommitGroupOutput ¶
type SemanticCommitGroupOutput struct {
Name string `json:"name" jsonschema:"Unique group name"`
Intent string `json:"intent" jsonschema:"Concrete commit outcome"`
SuggestedSubject string `json:"suggested_subject" jsonschema:"Conventional commit subject derived from type, scope, and intent"`
UnitIDs []string `json:"unit_ids" jsonschema:"Assigned file and hunk IDs"`
Files []string `json:"files" jsonschema:"Sorted repository-relative paths in the group"`
DependsOn []string `json:"depends_on,omitempty" jsonschema:"Groups that must precede this group"`
ValidationCommands []string `json:"validation_commands,omitempty" jsonschema:"Focused validation commands"`
TestOwners []string `json:"test_owners,omitempty" jsonschema:"Tests or owners responsible for validation"`
}
SemanticCommitGroupOutput is one validated proposed commit.
type SemanticCommitPlanOutput ¶
type SemanticCommitPlanOutput struct {
Groups []SemanticCommitGroupOutput `json:"groups" jsonschema:"Validated semantic commit groups"`
Unresolved []UnresolvedCommitUnitOutput `json:"unresolved,omitempty" jsonschema:"Units still requiring ownership judgment"`
Warnings []CommitPlanWarningOutput `json:"warnings,omitempty" jsonschema:"Mixed, generated, binary, formatting, and subject warnings"`
Reconstruction CommitReconstructionOutput `json:"reconstruction" jsonschema:"Exact one-to-one source coverage proof"`
}
SemanticCommitPlanOutput is a read-only plan; it contains no patch apply.
type SetConcernStatusInput ¶
type SetConcernStatusInput struct {
ID string `json:"id" jsonschema:"Concern ID"`
Status string `json:"status" jsonschema:"Target lifecycle status"`
Rationale string `json:"rationale" jsonschema:"Reason for the transition"`
}
SetConcernStatusInput requests one lifecycle transition.
type SimilarityScore ¶ added in v0.14.0
type SimilarityScore float64
SimilarityScore is a normalized similarity value in the inclusive range [0, 1].
type SnapshotReadAction ¶ added in v0.17.0
type SnapshotReadAction struct {
SnapshotToken string `json:"snapshot_token"`
}
type SourceAuditWorkflow ¶ added in v0.17.0
type SourceAuditWorkflow struct {
Version string `json:"version"`
Transitions []WorkflowTransition `json:"transitions"`
}
func CanonicalSourceAuditWorkflow ¶ added in v0.17.0
func CanonicalSourceAuditWorkflow() SourceAuditWorkflow
type SourceBundleArtifact ¶ added in v0.18.0
type SourceBundleArtifact struct {
SchemaVersion string `json:"schema_version"`
ArtifactKind string `json:"artifact_kind"`
Repository RepositoryRef `json:"repository"`
RequestedRef string `json:"requested_ref"`
ResolvedRef string `json:"resolved_ref"`
CommitSHA string `json:"commit_sha"`
PerFileBytes int `json:"per_file_bytes"`
TotalByteLimit int `json:"total_byte_limit"`
TotalBytes int `json:"total_bytes"`
Rate GitHubRateOutput `json:"rate"`
Items []SourceFileBatchItem `json:"items"`
Completeness SourceBundleCompleteness `json:"completeness"`
Provenance GitHubAcquisitionProvenance `json:"provenance"`
CreatedAt string `json:"created_at"`
}
SourceBundleArtifact is the canonical source-bundle.v1 resource payload. It contains bounded content only for complete items; failed items preserve their status and recovery message.
type SourceBundleCompleteness ¶ added in v0.18.0
type SourceFileBatchItem ¶ added in v0.18.0
type SourceFileBatchItem struct {
Key string `json:"key"`
Status SourceFileStatus `json:"item_status"`
Value *SourceFileOutput `json:"value,omitempty"`
Reason string `json:"reason,omitempty"`
Message string `json:"message,omitempty"`
RetryAfterMS NonNegativeInt `json:"retry_after_ms,omitempty"`
Recovery *RecoveryPlan `json:"recovery,omitempty"`
}
type SourceFileOutput ¶ added in v0.18.0
type SourceFileOutput struct {
Path string `json:"path"`
RequestedRef string `json:"requested_ref"`
ResolvedRef string `json:"resolved_ref"`
CommitSHA string `json:"commit_sha"`
BlobSHA string `json:"blob_sha"`
SourceURL string `json:"source_url,omitempty"`
ContentSHA256 string `json:"content_sha256,omitempty"`
Bytes int `json:"bytes"`
StartLine int `json:"start_line"`
EndLine int `json:"end_line"`
Content string `json:"content,omitempty"`
ObservedAt string `json:"observed_at"`
}
type SourceFileRequest ¶ added in v0.18.0
type SourceFileRequest struct {
Path string `json:"path" jsonschema:"Repository-relative file path"`
StartLine int `json:"start_line,omitempty" jsonschema:"Inclusive 1-based start line; zero means beginning"`
EndLine int `json:"end_line,omitempty" jsonschema:"Inclusive 1-based end line; zero means end"`
}
type SourceFileStatus ¶ added in v0.18.0
type SourceFileStatus string
SourceFileStatus preserves the distinct bounded-read outcomes that are useful to callers: a missing path or an oversized file is not the same as a provider retry or an unexpected decoding failure.
type SourceRef ¶
type SourceRef struct {
Source string `json:"source" jsonschema:"Source identifier"`
URL string `json:"url,omitempty" jsonschema:"Source URL"`
CommitSHA string `json:"commit_sha,omitempty" jsonschema:"Source commit SHA"`
ObservedAt string `json:"observed_at,omitempty" jsonschema:"Observation timestamp"`
AsOf string `json:"as_of,omitempty" jsonschema:"As-of timestamp"`
}
SourceRef records provenance for an MCP result or workflow artifact.
type StartInvestigationInput ¶
type StartInvestigationInput struct {
Owner string `json:"owner" jsonschema:"GitHub repository owner"`
Repo string `json:"repo" jsonschema:"GitHub repository name"`
CommitSHA string `json:"commit_sha,omitempty" jsonschema:"Required commit SHA unless number selects a stored thread"`
Lens string `json:"lens,omitempty" jsonschema:"Optional lens name"`
Kind string `json:"kind,omitempty" jsonschema:"Optional stored thread kind"`
Number int `json:"number,omitempty" jsonschema:"Stored thread number for atomic baseline creation"`
}
StartInvestigationInput creates a local investigation for a repository revision.
type SyncCIFailuresInput ¶ added in v0.16.0
type SyncCIFailuresInput struct {
PullRequests []ThreadRef `json:"pull_requests" jsonschema:"One to 20 exact pull requests"`
Logs string `json:"logs,omitempty" jsonschema:"Log acquisition mode: none or failures_only"`
MaxRunsPerPR int `json:"max_runs_per_pr,omitempty" jsonschema:"Maximum workflow runs per pull request from 1 to 100"`
MaxJobsPerRun int `json:"max_jobs_per_run,omitempty" jsonschema:"Maximum jobs per workflow run from 1 to 100"`
MaxLogBytesPerJob int `json:"max_log_bytes_per_job,omitempty" jsonschema:"Maximum persisted log bytes per failed job from 1024 to 1048576"`
MaxRequests int `json:"max_requests,omitempty" jsonschema:"Maximum total GitHub requests from 1 to 1000"`
}
SyncCIFailuresInput refreshes normalized CI observations for exact pull requests. Large logs are persisted and linked from the terminal job.
type SyncPortfolioInput ¶ added in v0.14.0
type SyncPortfolioInput struct {
Selection string `json:"selection" jsonschema:"Selection mode: authored or explicit"`
PullRequests []ThreadRef `json:"pull_requests,omitempty" jsonschema:"One to 100 exact pull requests in explicit mode"`
State string `json:"state,omitempty" jsonschema:"open, closed, or all; defaults to open"`
UpdatedAfter string `json:"updated_after,omitempty" jsonschema:"Optional RFC 3339 lower bound for authored-PR discovery"`
Limit int `json:"limit,omitempty" jsonschema:"Maximum pull requests to discover and refresh from 1 to 100; defaults to 100"`
DiscoveryMaxRequests int `` /* 130-byte string literal not displayed */
StatusMaxPages int `json:"status_max_pages,omitempty" jsonschema:"Maximum pages per pull-request health facet from 1 to 20; defaults to 3"`
}
SyncPortfolioInput bounds one outcome-oriented authored-PR discovery and health refresh. The primitive sync tools remain available in the portfolio profile for specialized recovery.
type SyncPullRequestFeedbackInput ¶ added in v0.16.0
type SyncPullRequestFeedbackInput struct {
PullRequests []ThreadRef `json:"pull_requests" jsonschema:"One to 50 exact pull requests"`
ThreadState string `json:"thread_state,omitempty" jsonschema:"Review threads to return: unresolved or all"`
Channels []string `json:"channels" jsonschema:"One or more of issue_comments, submitted_reviews, inline_comments, review_threads"`
MaxItemsPerChannel int `json:"max_items_per_channel,omitempty" jsonschema:"Maximum items per requested channel from 1 to 1000"`
MaxRequests int `json:"max_requests,omitempty" jsonschema:"Maximum total GitHub requests from 1 to 1000"`
}
SyncPullRequestFeedbackInput refreshes distinct human feedback channels for exact pull requests without conflating absent coverage with no feedback. The operation also persists the local repository and pull-request identities required by those exact facet writes; it does not require prior broad sync.
type SyncRepositoryContextInput ¶ added in v0.13.0
type SyncRepositoryContextInput struct {
Repositories []RepositoryRef `json:"repositories" jsonschema:"One to 100 explicit repositories"`
MaxRequests int `json:"max_requests,omitempty" jsonschema:"Maximum total GitHub requests"`
}
SyncRepositoryContextInput selects repositories for asynchronous metadata and contribution-guidance refresh.
type SyncThreadsInput ¶
type SyncThreadsInput struct {
Selection string `json:"selection" jsonschema:"repositories or threads"`
Repositories []RepositoryRef `json:"repositories,omitempty" jsonschema:"One to 50 repositories in repository mode"`
Threads []ThreadRef `json:"threads,omitempty" jsonschema:"One to 100 exact threads in thread mode"`
Kind string `json:"kind,omitempty" jsonschema:"issue, pull_request, or both in repository mode"`
State string `json:"state,omitempty" jsonschema:"open, closed, or all in repository mode"`
UpdatedAfter string `json:"updated_after,omitempty" jsonschema:"Optional RFC 3339 lower bound in repository mode"`
LimitPerRepository int `json:"limit_per_repository,omitempty" jsonschema:"Maximum headers per repository from 1 to 1000"`
MaxRequests int `json:"max_requests,omitempty" jsonschema:"Maximum total GitHub thread requests from 1 to 1000"`
}
SyncThreadsInput selects either bounded repository-wide header discovery or exact thread refresh. It never requests child comments, reviews, or code.
type SyncUserContributionsInput ¶ added in v1.0.0
type SyncUserContributionsInput struct {
Users []ActorSelector `json:"users" jsonschema:"One to 20 exact GitHub users"`
From string `json:"from" jsonschema:"Inclusive RFC 3339 period start"`
To string `json:"to" jsonschema:"Exclusive RFC 3339 period end no more than one year after from"`
OrganizationNodeID string `json:"organization_node_id,omitempty"`
MaxRepositories int `json:"max_repositories,omitempty" jsonschema:"Repository groups per contribution kind from 1 to 100"`
MaxRequests int `json:"max_requests,omitempty" jsonschema:"Total admitted GitHub GraphQL requests from 1 to 100"`
}
type SyncUserFacetInput ¶ added in v1.0.0
type SyncUserFacetInput struct {
Users []ActorSelector `json:"users" jsonschema:"One to 100 exact GitHub users"`
MaxPages int `json:"max_pages,omitempty" jsonschema:"Maximum pages per user from 1 to 10"`
MaxItems int `json:"max_items_per_user,omitempty" jsonschema:"Maximum child items per user from 1 to 1000"`
MaxRequests int `json:"max_requests,omitempty" jsonschema:"Total admitted GitHub requests from 1 to 1000"`
}
type SyncUserPinnedItemsInput ¶ added in v1.0.0
type SyncUserPinnedItemsInput struct {
Users []ActorSelector `json:"users" jsonschema:"One to 50 exact GitHub users"`
Limit int `json:"limit,omitempty" jsonschema:"Pinned or showcase items per user from 1 to 6"`
MaxRequests int `json:"max_requests,omitempty" jsonschema:"Total admitted GitHub GraphQL requests from 1 to 100"`
}
type SyncUserRepositoriesInput ¶ added in v1.0.0
type SyncUserRepositoriesInput struct {
Users []ActorSelector `json:"users" jsonschema:"One to 50 exact GitHub users"`
Relationship string `json:"relationship" jsonschema:"Repository relationship: owned, affiliated, or contributed"`
Sort string `json:"sort,omitempty" jsonschema:"Provider ordering: created, updated, pushed, or full_name"`
Order string `json:"order,omitempty" jsonschema:"Provider order: asc or desc"`
MaxPages int `json:"max_pages,omitempty" jsonschema:"Maximum pages per user from 1 to 10"`
MaxItems int `json:"max_items_per_user,omitempty" jsonschema:"Maximum repositories per user from 1 to 1000"`
MaxRequests int `json:"max_requests,omitempty" jsonschema:"Total admitted GitHub requests from 1 to 1000"`
}
type SyncUsersInput ¶ added in v1.0.0
type SyncUsersInput struct {
Users []ActorSelector `json:"users" jsonschema:"One to 100 exact GitHub users"`
MaxRequests int `json:"max_requests,omitempty" jsonschema:"Total admitted GitHub requests from 1 to 100"`
}
type ThreadByNumberInput ¶
type ThreadByNumberInput struct {
Owner string `json:"owner"`
Repo string `json:"repo"`
Number int `json:"number"`
SnapshotToken string `json:"snapshot_token,omitempty" jsonschema:"Optional immutable corpus snapshot token"`
}
ThreadByNumberInput identifies a stored issue or pull request by number.
type ThreadFacetOutput ¶ added in v0.17.0
type ThreadFacetOutput struct {
Facet string `json:"facet"`
Status string `json:"status"`
Complete bool `json:"complete"`
ObservationCount NonNegativeInt `json:"observation_count"`
SourceUpdatedAt string `json:"source_updated_at,omitempty"`
ResourceURI string `json:"resource_uri"`
Recovery *RecoveryPlan `json:"recovery,omitempty"`
}
ThreadFacetOutput describes one stored facet and its canonical resource.
type ThreadFacetsOutput ¶ added in v0.17.0
type ThreadFacetsOutput struct {
Owner string `json:"owner"`
Repo string `json:"repo"`
Kind string `json:"kind"`
Number int `json:"number"`
Facets []ThreadFacetOutput `json:"facets"`
}
ThreadFacetsOutput contains bounded facet metadata for one exact thread.
type ThreadInput ¶
type ThreadInput struct {
Owner string `json:"owner" jsonschema:"GitHub repository owner"`
Repo string `json:"repo" jsonschema:"GitHub repository name"`
Kind string `json:"kind" jsonschema:"Thread kind: issue or pull_request"`
Number int `json:"number" jsonschema:"GitHub issue or pull request number"`
SnapshotToken string `json:"snapshot_token,omitempty" jsonschema:"Optional immutable corpus snapshot token"`
}
ThreadInput identifies an issue or pull request for an MCP operation.
type ThreadOutput ¶
type ThreadOutput struct {
Owner string `json:"owner"`
Repo string `json:"repo"`
Kind string `json:"kind"`
Number int `json:"number"`
State string `json:"state"`
StateReason string `json:"state_reason,omitempty"`
Title string `json:"title"`
Body string `json:"body,omitempty"`
Author string `json:"author,omitempty"`
AuthorAssociation string `json:"author_association,omitempty"`
Labels []string `json:"labels,omitempty"`
Assignees []string `json:"assignees,omitempty"`
Draft bool `json:"draft,omitempty"`
ClosedAt string `json:"closed_at,omitempty"`
MergedAt string `json:"merged_at,omitempty"`
Merged *bool `json:"merged,omitempty"`
UpdatedAt string `json:"updated_at,omitempty"`
MatchSource string `json:"match_source,omitempty"`
MatchExcerpt string `json:"match_excerpt,omitempty"`
MatchTruncated bool `json:"match_truncated,omitempty" jsonschema:"Whether the per-thread hydrated search document was bounded"`
MatchUpdatedAt string `json:"match_updated_at,omitempty"`
SnapshotToken string `json:"snapshot_token"`
}
ThreadOutput is the stable MCP representation of an issue or pull request.
type ThreadRef ¶
type ThreadRef struct {
Owner string `json:"owner" jsonschema:"GitHub repository owner"`
Repo string `json:"repo" jsonschema:"GitHub repository name"`
Kind string `json:"kind,omitempty" jsonschema:"Optional thread kind: issue or pull_request"`
Number int `json:"number" jsonschema:"Positive issue or pull request number"`
}
ThreadRef identifies an exact issue or pull request. Kind may be omitted only for tools that intentionally resolve a number without a preselected kind.
type ToolCall ¶ added in v0.17.0
type ToolCall struct {
Type string `json:"type"`
PollJob *GetJobsInput `json:"poll_job,omitempty"`
GetRepositories *GetRepositoriesInput `json:"get_repositories,omitempty"`
EnsureCoverage *EnsureCoverageInput `json:"ensure_coverage,omitempty"`
SyncRepositoryContext *SyncRepositoryContextInput `json:"sync_repository_context,omitempty"`
SyncThreads *SyncThreadsInput `json:"sync_threads,omitempty"`
HydrateThreads *HydrateThreadsInput `json:"hydrate_threads,omitempty"`
SyncPortfolio *SyncPortfolioInput `json:"sync_portfolio,omitempty"`
SyncFeedback *SyncPullRequestFeedbackInput `json:"sync_pull_request_feedback,omitempty"`
IndexFeedback *IndexPullRequestFeedbackInput `json:"index_pull_request_feedback,omitempty"`
SyncCI *SyncCIFailuresInput `json:"sync_ci_failures,omitempty"`
QueryDeepWiki *DeepWikiInput `json:"query_deepwiki,omitempty"`
IndexRepositories *IndexRepositoriesInput `json:"index_repositories,omitempty"`
FindClusters *FindClustersInput `json:"find_clusters,omitempty"`
FindNeighbors *FindNeighborsInput `json:"find_neighbors,omitempty"`
RankOpportunities *RankOpportunitiesInput `json:"rank_opportunities,omitempty"`
MineFixPatterns *MineRepositoryFixPatternsInput `json:"mine_repository_fix_patterns,omitempty"`
PreviewFixPatterns *PreviewRepositoryFixPatternsInput `json:"preview_fix_patterns,omitempty"`
SearchGitHubRepos *SearchGitHubRepositoriesInput `json:"search_github_repositories,omitempty"`
SearchGitHubThreads *SearchGitHubThreadsInput `json:"search_github_threads,omitempty"`
SearchCode *SearchCodeInput `json:"search_code,omitempty"`
ReadSourceFiles *ReadSourceFilesInput `json:"read_source_files,omitempty"`
InspectCommitChanges *InspectCommitChangesInput `json:"inspect_commit_changes,omitempty"`
CheckMergeConflicts *CheckMergeConflictsInput `json:"check_merge_conflicts,omitempty"`
FindRelatedWork *FindRelatedWorkInput `json:"find_related_work,omitempty"`
ListConcerns *ListConcernsInput `json:"list_concerns,omitempty"`
ListPortfolio *ListPullRequestPortfolioInput `json:"list_pull_request_portfolio,omitempty"`
}
ToolCall is one discriminated, replayable MCP action in a recovery plan.
func RecoveryAction ¶ added in v0.17.0
func RecoveryAction[T recoveryActionInput](input T) ToolCall
RecoveryAction derives the action discriminator from a concrete input type, making incompatible tool/argument combinations unrepresentable.
type ToolError ¶
type ToolError struct {
Code string `json:"code"`
Message string `json:"message"`
Field string `json:"path,omitempty"`
Retryable bool `json:"retryable"`
Example map[string]any `json:"example,omitempty"`
Recovery *RecoveryPlan `json:"recovery,omitempty"`
}
ToolError is the stable, actionable shape for agent-correctable requests.
type TypedRepositoryOutput ¶
type TypedRepositoryOutput struct {
Ref string `json:"ref"`
Owner string `json:"owner"`
Repo string `json:"repo"`
Metadata RepositoryMetadataOutput `json:"metadata"`
DossierStatus string `json:"dossier_status" jsonschema:"Persisted dossier availability: available or missing"`
DossierAsOf string `json:"dossier_as_of,omitempty" jsonschema:"As-of timestamp of the latest persisted dossier"`
UpdatedAt string `json:"updated_at,omitempty" jsonschema:"Latest observed repository source timestamp in RFC 3339 form"`
Description *string `json:"description"`
DefaultBranch *string `json:"default_branch"`
Language *string `json:"language"`
License *string `json:"license"`
Topics []string `json:"topics,omitempty"`
Stars *int `json:"stars"`
Watchers *int `json:"watchers"`
Forks *int `json:"forks"`
OpenIssues *int `json:"open_issues"`
Archived *bool `json:"archived"`
Fork *bool `json:"fork"`
}
TypedRepositoryOutput contains repository facts with explicit metadata coverage.
type UnresolvedCommitUnitInput ¶
type UnresolvedCommitUnitInput struct {
UnitID string `json:"unit_id" jsonschema:"Unassigned file or hunk ID"`
Reason string `json:"reason" jsonschema:"Why ownership remains ambiguous"`
}
UnresolvedCommitUnitInput preserves ambiguity instead of inventing ownership.
type UnresolvedCommitUnitOutput ¶
type UnresolvedCommitUnitOutput struct {
UnitID string `json:"unit_id" jsonschema:"Unassigned file or hunk ID"`
Reason string `json:"reason" jsonschema:"Why ownership remains ambiguous"`
}
UnresolvedCommitUnitOutput reports an unassigned unit and reason.
type UpdateConcernInput ¶
type UpdateConcernInput struct {
ID string `json:"id" jsonschema:"Concern ID"`
Title *string `json:"title,omitempty" jsonschema:"Replacement title"`
ProblemStatement *string `json:"problem_statement,omitempty" jsonschema:"Replacement problem statement"`
SuspectedOwner *string `json:"suspected_owner,omitempty" jsonschema:"Replacement owner boundary"`
Confidence *Probability `json:"confidence,omitempty" jsonschema:"Replacement confidence from 0 to 1"`
Unknowns []string `json:"unknowns,omitempty" jsonschema:"Replacement explicit unknowns"`
SuccessCriterion *string `json:"success_criterion,omitempty" jsonschema:"Replacement success criterion"`
Notes *string `json:"notes,omitempty" jsonschema:"Replacement local notes"`
EvidenceIDs []string `json:"evidence_ids,omitempty" jsonschema:"Replacement evidence IDs"`
}
UpdateConcernInput replaces explicitly supplied editable fields.
type ValidationExpectedObservation ¶
type ValidationExpectedObservation struct {
Run string `json:"run" jsonschema:"Run kind: base or candidate"`
Name string `json:"name" jsonschema:"Short observation name"`
Source string `json:"source" jsonschema:"Captured source: stdout, stderr, or artifact"`
Matcher string `json:"matcher" jsonschema:"Matcher: exact or regexp"`
Pattern string `json:"pattern" jsonschema:"Bounded exact string or Go regular expression"`
Occurrence string `json:"occurrence,omitempty" jsonschema:"Expected occurrence: present or absent; defaults to present"`
Path string `json:"path,omitempty" jsonschema:"Relative artifact path; valid only when source is artifact"`
}
ValidationExpectedObservation is one output assertion evaluated without a shell.
type ValidationObservationContract ¶
type ValidationObservationContract struct {
Intent string `json:"intent" jsonschema:"Short proof intent or invariant"`
Observations []ValidationExpectedObservation `json:"observations" jsonschema:"One to eight expected observations for each of base and candidate"`
}
ValidationObservationContract ties output assertions to the claimed behavior.
type ValidationOutput ¶
type ValidationOutput struct {
ID string `json:"id"`
InvestigationID string `json:"investigation_id"`
Kind string `json:"kind"`
Command []string `json:"command"`
WorkingDir string `json:"working_dir"`
BaseWorkingDir string `json:"base_working_dir,omitempty"`
CandidateDir string `json:"candidate_dir,omitempty"`
WorkspaceID string `json:"workspace_id,omitempty" jsonschema:"Managed workspace ID used for both run kinds"`
BaseWorkspaceID string `json:"base_workspace_id,omitempty" jsonschema:"Managed base workspace ID"`
CandidateWorkspaceID string `json:"candidate_workspace_id,omitempty" jsonschema:"Managed candidate workspace ID"`
Env []string `json:"environment_allowlist,omitempty"`
Timeout string `json:"timeout,omitempty"`
MaxOutputBytes int64 `json:"max_output_bytes,omitempty"`
Observation *ValidationObservationContract `json:"observation,omitempty"`
Protocol string `json:"protocol,omitempty" jsonschema:"Declared structured protocol adapter"`
ReadinessTimeout string `json:"readiness_timeout,omitempty" jsonschema:"Protocol initialization deadline"`
CreatedAt string `json:"created_at"`
}
ValidationOutput is the stable MCP representation of a validation definition.
type VerifyPublishedDraftInput ¶ added in v0.14.0
type VerifyPublishedDraftInput struct {
DraftID string `json:"draft_id" jsonschema:"Stored draft ID"`
Revision int `json:"revision" jsonschema:"Positive immutable draft revision"`
Owner string `json:"owner" jsonschema:"GitHub repository owner"`
Repo string `json:"repo" jsonschema:"GitHub repository name"`
Kind string `json:"kind" jsonschema:"Published kind: issue or pull_request"`
Number int `json:"number" jsonschema:"Positive issue or pull-request number"`
}
type WaitPullRequestChecksInput ¶ added in v1.1.0
type WaitPullRequestChecksInput struct {
Owner string `json:"owner" jsonschema:"GitHub repository owner"`
Repo string `json:"repo" jsonschema:"GitHub repository name"`
Number int `json:"number" jsonschema:"Pull request number"`
ExpectedHeadSHA string `json:"expected_head_sha" jsonschema:"Exact pull-request head SHA to watch"`
Timeout string `json:"timeout,omitempty" jsonschema:"Maximum wait duration, default 30m"`
PollInterval string `json:"poll_interval,omitempty" jsonschema:"Polling interval, default 10s"`
MaxPages int `json:"max_pages,omitempty" jsonschema:"Maximum status pages per observation, 1 to 100"`
FailFast bool `json:"fail_fast,omitempty" jsonschema:"Return when a check fails instead of waiting for every check"`
}
WaitPullRequestChecksInput bounds a server-owned wait for one exact PR head. It never follows a changed head and does not fetch verbose logs.
type WaitPullRequestChecksOutput ¶ added in v1.1.0
type WaitPullRequestChecksOutput struct {
Status string `json:"status"`
Owner string `json:"owner"`
Repo string `json:"repo"`
Number int `json:"number"`
ExpectedHeadSHA string `json:"expected_head_sha"`
ObservedHeadSHA string `json:"observed_head_sha,omitempty"`
Checks []PullRequestCheckOutput `json:"checks,omitempty"`
Transitions []PullRequestCheckTransition `json:"transitions,omitempty"`
TransitionsTruncated bool `json:"transitions_truncated,omitempty"`
ObservedAt string `json:"observed_at,omitempty"`
Polls int `json:"polls"`
Reason string `json:"reason,omitempty"`
Persisted bool `json:"persisted"`
}
type WorkflowAuthority ¶ added in v0.17.0
type WorkflowTransition ¶ added in v0.17.0
type WorkflowTransition struct {
ID string `json:"id"`
Operation string `json:"operation"`
RequiredInputToken string `json:"required_input_token,omitempty"`
ExpectedResultType string `json:"expected_result_type"`
AllowedNextActions []string `json:"allowed_next_actions"`
Retryable bool `json:"retryable"`
Authority WorkflowAuthority `json:"authority"`
IncompleteSemantics string `json:"incomplete_semantics"`
}
type WorkspaceResource ¶ added in v0.16.0
type WorkspaceResource struct {
SchemaVersion string `json:"schema_version"`
ID string `json:"id"`
InvestigationID string `json:"investigation_id,omitempty"`
Owner string `json:"owner"`
Repo string `json:"repo"`
BaseSHA string `json:"base_sha"`
HeadSHA string `json:"head_sha"`
MergeBase string `json:"merge_base,omitempty"`
Ownership string `json:"ownership"`
Dirty bool `json:"dirty"`
HasUntracked bool `json:"has_untracked"`
CreatedAt string `json:"created_at"`
}
WorkspaceResource is the canonical host-path-free representation of a managed workspace.