mcpcontract

package
v0.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 29, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultFixPatternCandidateLimit      = 100
	DefaultFixPatternHydrationLimit      = 25
	DefaultFixPatternRepresentativeLimit = 5
)
View Source
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.

View Source
const (
	ToolSearchRepositories        = "corpus.search_repositories"
	ToolSearchThreads             = "corpus.search_threads"
	ToolSearchCode                = "corpus.search_code"
	ToolGetRepositories           = "corpus.get_repositories"
	ToolGetThreads                = "corpus.get_threads"
	ToolRankThreads               = "corpus.rank_threads"
	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"
	ToolBuildRepositoryDossier    = "workflow.build_repository_dossier"
	ToolMineRepositoryFixPatterns = "workflow.mine_repository_fix_patterns"
	ToolGetJob                    = "jobs.get"
	ToolCancelJob                 = "jobs.cancel"
	ToolSearchGitHubRepositories  = "github.search_repositories"
	ToolSyncRepositoryContext     = "github.sync_repository_context"
	ToolSyncThreads               = "github.sync_threads"
	ToolHydrateThreads            = "github.hydrate_threads"
	ToolGetAuthenticatedIdentity  = "github.get_authenticated_identity"
	ToolSyncAuthoredPullRequests  = "github.sync_authored_pull_requests"
	ToolSyncPullRequestStatus     = "github.sync_pull_request_status"
	ToolSyncPortfolio             = "github.sync_portfolio"
	ToolListPullRequestPortfolio  = "corpus.list_pull_request_portfolio"
	ToolFindPortfolioOverlaps     = "corpus.find_portfolio_overlaps"
	ToolIndexRepositories         = "code.index_repositories"
	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"
	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.

Variables

View Source
var ErrNotFound = failure.NotFound(nil)

ErrNotFound lets readers distinguish absent corpus objects from failures.

Functions

func InvalidArgument

func InvalidArgument(field, message string, example map[string]any) error

InvalidArgument reports one agent-correctable request error.

func Unavailable added in v0.13.0

func Unavailable(code, message string, actions ...SuggestedAction) error

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 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 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 AuthenticatedIdentityOutput

type AuthenticatedIdentityOutput struct {
	Login      string `json:"login"`
	ID         int64  `json:"id"`
	NodeID     string `json:"node_id,omitempty"`
	ObservedAt string `json:"observed_at"`
}

AuthenticatedIdentityOutput identifies the account associated with active credentials.

type BatchItem

type BatchItem[T any] struct {
	Key          string          `json:"key"`
	Status       BatchItemStatus `json:"status"`
	Value        *T              `json:"value,omitempty"`
	Reason       string          `json:"reason,omitempty"`
	Message      string          `json:"message,omitempty"`
	RetryAfterMS NonNegativeInt  `json:"retry_after_ms,omitempty"`
	NextAction   string          `json:"next_action,omitempty"`
}

BatchItem reports the outcome for one input-derived key while preserving input order. Value is present for complete items; recovery fields explain retryable, unavailable, or failed items 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 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:"status"`
	Items  []BatchItem[MergeConflictOutput] `json:"items"`
}

CheckMergeConflictsOutput preserves comparison order and isolates local Git failures to the affected comparison.

type CheckOutput

type CheckOutput struct {
	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"`
}

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"`
}

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 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"`
}

CodeIndexCoverageOutput reports one selected snapshot's indexing coverage.

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"`
}

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"`
	NextAction   string   `json:"next_action"`
}

ContributionDisposition is a conservative, evidence-backed recommendation made before an implementation workspace is created.

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 CoverageTarget

type CoverageTarget 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,omitempty" jsonschema:"Optional positive issue or pull request number"`
}

CoverageTarget selects repository-level coverage or, when kind and number are both present, coverage for one exact stored 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"`
	NextAction   string   `json:"next_action,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 DraftDiagnosticOutput struct {
	Code       string `json:"code"`
	Severity   string `json:"severity"`
	Message    string `json:"message"`
	ByteOffset int    `json:"byte_offset,omitempty"`
}

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 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 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"`
}

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"`
	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"`
}

FindClustersInput selects up to 20 repositories or exact cluster members.

type FindClustersOutput

type FindClustersOutput struct {
	Status string                        `json:"status"`
	Items  []BatchItem[ClusterSetOutput] `json:"items"`
}

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"`
}

FindNeighborsInput selects source threads and bounds similar-thread results.

type FindNeighborsOutput

type FindNeighborsOutput struct {
	Status string                         `json:"status"`
	Items  []BatchItem[NeighborSetOutput] `json:"items"`
}

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"`
}

FindPortfolioOverlapsInput compares candidates with exact stored authored PRs.

type FindPortfolioOverlapsOutput

type FindPortfolioOverlapsOutput struct {
	Status string                              `json:"status"`
	Items  []BatchItem[PortfolioOverlapOutput] `json:"items"`
}

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"`
}

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"`
}

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"`
}

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 GetCoverageInput

type GetCoverageInput struct {
	Targets []CoverageTarget `json:"targets" jsonschema:"One to 100 repository or exact-thread targets"`
}

GetCoverageInput selects bounded repository or thread facet coverage reads.

type GetCoverageOutput

type GetCoverageOutput struct {
	Status string                      `json:"status"`
	Items  []BatchItem[CoverageOutput] `json:"items"`
}

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:"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"`
}

GetRepositoriesInput selects repositories for a bounded corpus read.

type GetRepositoriesOutput

type GetRepositoriesOutput struct {
	Status string                             `json:"status"`
	Items  []BatchItem[TypedRepositoryOutput] `json:"items"`
}

GetRepositoriesOutput preserves repository input order and represents unobserved metadata with nullable facts instead of false zero values.

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"`
}

GetThreadsInput selects exact threads and the desired response view.

type GetThreadsOutput

type GetThreadsOutput struct {
	Status string                    `json:"status"`
	Items  []BatchItem[ThreadOutput] `json:"items"`
}

GetThreadsOutput preserves exact-thread input order and item-level failures.

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 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"`
	NextAction SuggestedAction `json:"next_action"`
}

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"`
}

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 {
	Tool        string `json:"tool,omitempty" jsonschema:"Outcome-oriented tool to use next"`
	ResourceURI string `json:"resource_uri,omitempty" jsonschema:"MCP resource URI to read next"`
	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"`
}

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 {
	Author         string `json:"author,omitempty" jsonschema:"Optional authored GitHub login"`
	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"`
	ResponseFormat string `json:"response_format,omitempty" jsonschema:"concise or detailed; defaults to concise"`
}

ListPullRequestPortfolioInput filters and bounds the stored pull-request portfolio.

type ListPullRequestPortfolioOutput

type ListPullRequestPortfolioOutput struct {
	Status         string                     `json:"status"`
	ResponseFormat string                     `json:"response_format"`
	RuleVersion    string                     `json:"rule_version"`
	GeneratedAt    string                     `json:"generated_at"`
	PullRequests   []PullRequestPortfolioItem `json:"pull_requests"`
	Total          int                        `json:"total"`
	Truncated      bool                       `json:"truncated"`
}

ListPullRequestPortfolioOutput contains a deterministic portfolio projection.

type ManifestInput added in v0.15.0

type ManifestInput struct {
	ID string `json:"id" jsonschema:"Manifest ID"`
}

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"`
	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"`
	BaseOID     string `json:"base_oid"`
	HeadOID     string `json:"head_oid"`
}

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"`
}

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 */
}

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"`
	SuggestedActions       []SuggestedAction                  `json:"suggested_actions,omitempty"`
}

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 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 PublishedDraftDifferenceOutput struct {
	FirstDifferingLine int `json:"first_differing_line,omitempty"`
	DraftBytes         int `json:"draft_bytes"`
	PublishedBytes     int `json:"published_bytes"`
}

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 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"`
}

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"`
}

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"`
}

RankOpportunitiesOutput combines deterministic cross-repository ranking with per-repository coverage or availability results.

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 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"`
	NextAction      string `json:"next_action,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"`
}

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 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 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"`
}

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"`
}

SearchCodeOutput contains one page of offline code matches.

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"`
	SuggestedActions []SuggestedAction                  `json:"suggested_actions,omitempty"`
}

SearchGitHubRepositoriesOutput contains search results and completeness metadata.

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"`
}

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"`
}

SearchOutput contains one page of offline thread matches.

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"`
}

SearchRepositoriesInput describes an offline repository search page.

type SearchRepositoriesOutput

type SearchRepositoriesOutput struct {
	Query      string             `json:"query"`
	Total      int                `json:"total"`
	Matches    []RepositoryOutput `json:"matches"`
	NextCursor string             `json:"next_cursor,omitempty"`
}

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 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 SuggestedAction

type SuggestedAction struct {
	Tool      string                    `json:"tool"`
	Reason    string                    `json:"reason"`
	Arguments *SuggestedActionArguments `json:"arguments,omitempty"`
}

SuggestedAction describes a non-mandatory follow-up with reusable arguments.

type SuggestedActionArguments added in v0.14.0

type SuggestedActionArguments struct {
	IDs          []string        `json:"ids,omitempty"`
	Selection    string          `json:"selection,omitempty"`
	Repositories []RepositoryRef `json:"repositories,omitempty"`
	Threads      []ThreadRef     `json:"threads,omitempty"`
	Facets       []string        `json:"facets,omitempty"`
	Kind         string          `json:"kind,omitempty"`
	State        string          `json:"state,omitempty"`
}

SuggestedActionArguments is the bounded union of reusable follow-up selections returned by GitContribute tools.

type SyncAuthoredPullRequestsInput

type SyncAuthoredPullRequestsInput struct {
	State        string `json:"state,omitempty" jsonschema:"open, closed, or all"`
	UpdatedAfter string `json:"updated_after,omitempty" jsonschema:"Optional RFC 3339 lower bound"`
	Limit        int    `json:"limit,omitempty" jsonschema:"Maximum authored pull requests from 1 to 500"`
	MaxRequests  int    `json:"max_requests,omitempty" jsonschema:"Maximum total GitHub requests from 2 to 1000"`
}

SyncAuthoredPullRequestsInput bounds authored pull-request discovery and refresh.

type SyncPortfolioInput added in v0.14.0

type SyncPortfolioInput struct {
	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 SyncPullRequestStatusInput

type SyncPullRequestStatusInput struct {
	PullRequests []ThreadRef `json:"pull_requests" jsonschema:"One to 50 exact pull requests"`
	MaxPages     int         `json:"max_pages,omitempty" jsonschema:"Maximum review pages from 1 to 20"`
}

SyncPullRequestStatusInput selects pull requests and bounds review hydration.

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 ThreadByNumberInput

type ThreadByNumberInput struct {
	Owner  string `json:"owner"`
	Repo   string `json:"repo"`
	Number int    `json:"number"`
}

ThreadByNumberInput identifies a stored issue or pull request by number.

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"`
}

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"`
}

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 ToolError

type ToolError struct {
	Code             string            `json:"code"`
	Message          string            `json:"message"`
	Field            string            `json:"field,omitempty"`
	Retryable        bool              `json:"retryable"`
	Example          map[string]any    `json:"example,omitempty"`
	SuggestedActions []SuggestedAction `json:"suggested_actions,omitempty"`
}

ToolError is the stable, actionable shape for agent-correctable requests.

func (*ToolError) Error

func (e *ToolError) Error() string

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"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL