/** GitHub is a channel into an ordinary Paperclip task, not another executor. */ export declare const GITHUB_REVIEW_EVENTS: readonly ["opened", "synchronize", "reopened", "ready_for_review", "mention", "comment"]; export type GitHubReviewEvent = (typeof GITHUB_REVIEW_EVENTS)[number]; export interface GitHubReviewPolicy { invocation: "mentions_only" | "linked_authors" | "allowed_authors"; events: GitHubReviewEvent[]; /** Opt-in issue intake; older saved policies leave this disabled. */ issueOpened?: boolean; issueOpenedInstructions?: string; reviewDrafts: boolean; reviewBotAuthors: boolean; includeAuthors: string[]; excludeAuthors: string[]; targetBranches: string[]; excludedBranches: string[]; requiredLabels: string[]; excludedLabels: string[]; ignoredPaths: string[]; instructions: string; prompts: Record; findingCategories: string[]; minimumCommentSeverity: "info" | "warning" | "error"; publishSummary: boolean; publishInline: boolean; allowApprove: boolean; allowRequestChanges: boolean; ratingThreshold: 1 | 2 | 3 | 4 | 5 | null; } export type GitHubAllowedPerson = { githubUserId: string; login: string; /** @deprecated Automatic scheduling uses policy author filters. Ignored when present. */ automaticReviews?: boolean; } & ({ kind: "member"; userId: string; } | { kind: "guest"; sponsorUserId: string; permissionProfile: "restricted"; }); export interface GitHubChatConfiguration { version: 1; /** Enabling the feature and bot tools is explicit for existing endpoints. */ toolsEnabled: boolean; responsibleUserId: string; memberAccess: "all_linked" | "selected"; people: GitHubAllowedPerson[]; defaults: GitHubReviewPolicy; /** Keys are stable GitHub repository IDs; labels never grant access. */ repositories: Record>; } export interface GitHubReviewEventContext { event: GitHubReviewEvent; deliveryId: string; repositoryId: string; repository: string; pullNumber: number; title: string; body: string; baseSha: string; headSha: string; baseBranch: string; author: { id: string; login: string; isBot: boolean; }; sender: { id: string; login: string; }; draft: boolean; labels: string[]; previousHeadSha?: string; /** Latest assessed commit, which may precede several unreviewed pushes. */ priorReviewedHeadSha?: string; } /** Issues enter ordinary tasks, without a PR assessment or commit check. */ export interface GitHubIssueEventContext { event: "issue_opened"; deliveryId: string; repositoryId: string; repository: string; issueNumber: number; title: string; body: string; author: { id: string; login: string; isBot: boolean; }; sender: { id: string; login: string; }; labels: string[]; } export type GitHubAutomaticEventContext = GitHubReviewEventContext | GitHubIssueEventContext; export interface GitHubReviewFinding { /** Stable agent-supplied key; combined with path and line for deduplication. */ key: string; path: string; line: number; side: "LEFT" | "RIGHT"; severity: "info" | "warning" | "error"; category: string; body: string; } export interface GitHubReviewAssessment { reviewedCommit: string; score: 0 | 1 | 2 | 3 | 4 | 5; complete: boolean; summary: string; rationale: string; coverage: { reviewedPaths: string[]; omittedPaths: string[]; limitations: string[]; }; findings: GitHubReviewFinding[]; } export type GitHubReviewConclusion = "success" | "failure" | "neutral" | "action_required"; /** Stored evidence attached to a task/run. Never independently scheduled. */ export interface GitHubTaskReview { id: string; companyId: string; endpointId: string; issueId: string; runId: string | null; repositoryId: string; repository: string; pullNumber: number; headSha: string; configurationRevision: number; event: GitHubReviewEventContext; state: "queued" | "running" | "completed" | "incomplete" | "error" | "superseded" | "manual_required"; assessment: GitHubReviewAssessment | null; conclusion: GitHubReviewConclusion | null; checkUrl: string | null; summaryUrl: string | null; createdAt: string; updatedAt: string; } export declare const GITHUB_REVIEW_RUBRIC: readonly ["0: No usable assessment; analysis is incomplete or cannot establish coverage.", "1: Critical defects make the change unsafe to ship.", "2: Major defects require substantial correction.", "3: Meaningful defects require correction before merging.", "4: Minor concerns remain; explain their impact and remaining risk.", "5: No actionable defects found within the stated coverage and limitations."]; export declare const DEFAULT_GITHUB_REVIEW_PROMPTS: Record; export declare function defaultGitHubReviewPolicy(): GitHubReviewPolicy; //# sourceMappingURL=chat-github.d.ts.map