@vypdev/copilot 3.2.0 → 3.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/README.md +49 -16
  2. package/action.yml +67 -35
  3. package/build/api/index.js +4666 -0
  4. package/build/api/src/api.d.ts +35 -0
  5. package/build/api/src/application/ports/agent_configuration_ports.d.ts +3 -0
  6. package/build/api/src/application/ports/agent_findings_ports.d.ts +8 -0
  7. package/build/api/src/application/ports/agent_query_ports.d.ts +14 -0
  8. package/build/api/src/application/ports/bugbot_context_ports.d.ts +9 -0
  9. package/build/api/src/application/ports/bugbot_finding_publication_ports.d.ts +7 -0
  10. package/build/api/src/application/ports/bugbot_finding_resolution_ports.d.ts +6 -0
  11. package/build/api/src/application/ports/bugbot_issue_read_ports.d.ts +10 -0
  12. package/build/api/src/application/ports/bugbot_issue_write_ports.d.ts +12 -0
  13. package/build/api/src/application/ports/bugbot_pull_request_read_ports.d.ts +47 -0
  14. package/build/api/src/application/ports/bugbot_pull_request_resolution_ports.d.ts +3 -0
  15. package/build/api/src/application/ports/bugbot_pull_request_write_ports.d.ts +4 -0
  16. package/build/api/src/application/ports/bugbot_rule_ports.d.ts +12 -0
  17. package/build/api/src/application/ports/bugbot_telemetry_ports.d.ts +32 -0
  18. package/build/api/src/application/ports/pull_request_review_comment_ports.d.ts +43 -0
  19. package/build/api/src/application/usecases/steps/commit/bugbot/types.d.ts +112 -0
  20. package/build/api/src/data/model/agent.d.ts +2 -0
  21. package/build/api/src/data/model/ai.d.ts +28 -0
  22. package/build/api/src/data/model/branch_configuration.d.ts +6 -0
  23. package/build/api/src/data/model/branches.d.ts +12 -0
  24. package/build/api/src/data/model/commit.d.ts +8 -0
  25. package/build/api/src/data/model/config.d.ts +30 -0
  26. package/build/api/src/data/model/emoji.d.ts +5 -0
  27. package/build/api/src/data/model/execution.d.ts +75 -0
  28. package/build/api/src/data/model/execution_components.d.ts +43 -0
  29. package/build/api/src/data/model/execution_inputs.d.ts +94 -0
  30. package/build/api/src/data/model/hotfix.d.ts +7 -0
  31. package/build/api/src/data/model/images.d.ts +27 -0
  32. package/build/api/src/data/model/issue.d.ts +27 -0
  33. package/build/api/src/data/model/issue_types.d.ts +30 -0
  34. package/build/api/src/data/model/labels.d.ts +60 -0
  35. package/build/api/src/data/model/locale.d.ts +6 -0
  36. package/build/api/src/data/model/project_detail.d.ts +15 -0
  37. package/build/api/src/data/model/projects.d.ts +14 -0
  38. package/build/api/src/data/model/pull_request.d.ts +32 -0
  39. package/build/api/src/data/model/recommendation_state.d.ts +6 -0
  40. package/build/api/src/data/model/release.d.ts +6 -0
  41. package/build/api/src/data/model/result.d.ts +25 -0
  42. package/build/api/src/data/model/single_action.d.ts +43 -0
  43. package/build/api/src/data/model/size_threshold.d.ts +6 -0
  44. package/build/api/src/data/model/size_thresholds.d.ts +10 -0
  45. package/build/api/src/data/model/tokens.d.ts +4 -0
  46. package/build/api/src/data/model/welcome.d.ts +5 -0
  47. package/build/api/src/data/model/workflows.d.ts +5 -0
  48. package/build/api/src/domain/agent.d.ts +26 -0
  49. package/build/api/src/domain/bugbot/finding_identity.d.ts +26 -0
  50. package/build/api/src/domain/bugbot/review_command.d.ts +16 -0
  51. package/build/api/src/domain/bugbot/review_configuration.d.ts +25 -0
  52. package/build/api/src/domain/copilot_lifecycle.d.ts +42 -0
  53. package/build/api/src/domain/pull_request_description.d.ts +13 -0
  54. package/build/api/src/tooling/bugbot_analytics.d.ts +24 -0
  55. package/build/api/src/tooling/bugbot_benchmark.d.ts +26 -0
  56. package/build/api/src/tooling/bugbot_quality_eval.d.ts +41 -0
  57. package/build/cli/index.js +12503 -1754
  58. package/build/github_action/index.js +10076 -1305
  59. package/package.json +16 -6
  60. package/setup/ISSUE_TEMPLATE/help_request.yml +5 -0
  61. package/setup/workflows/agent-cli-provisioning.yml +26 -27
  62. package/setup/workflows/copilot_branch_sync.yml +19 -0
  63. package/setup/workflows/copilot_close_inactive_issues.yml +49 -0
  64. package/setup/workflows/copilot_commit.yml +56 -1
  65. package/setup/workflows/copilot_credential_health.yml +190 -0
  66. package/setup/workflows/copilot_issue.yml +42 -2
  67. package/setup/workflows/copilot_issue_comment.yml +53 -4
  68. package/setup/workflows/copilot_pull_request.yml +65 -3
  69. package/setup/workflows/copilot_pull_request_comment.yml +53 -4
  70. package/setup/workflows/hotfix_workflow.yml +39 -19
  71. package/setup/workflows/release_workflow.yml +39 -19
@@ -0,0 +1,35 @@
1
+ import type { Execution } from './data/model/execution';
2
+ import type { FindingsQueryPort } from './application/ports/agent_findings_ports';
3
+ import type { BugbotContextPorts } from './application/ports/bugbot_context_ports';
4
+ import type { BugbotFindingPublicationPorts } from './application/ports/bugbot_finding_publication_ports';
5
+ import type { BugbotFindingResolutionPorts } from './application/ports/bugbot_finding_resolution_ports';
6
+ import type { BugbotTelemetryPort } from './application/ports/bugbot_telemetry_ports';
7
+ import type { BugbotReviewCommandOverrides } from './domain/bugbot/review_command';
8
+ export interface BugbotScmGateway {
9
+ readonly context: BugbotContextPorts;
10
+ readonly publication: BugbotFindingPublicationPorts;
11
+ readonly resolution: BugbotFindingResolutionPorts;
12
+ readonly telemetry?: BugbotTelemetryPort;
13
+ }
14
+ /** Provider-neutral programmatic entry point. Consumers supply agent and SCM adapters. */
15
+ export declare class BugbotReviewService {
16
+ private readonly useCase;
17
+ constructor(agent: FindingsQueryPort, scm: BugbotScmGateway);
18
+ review(execution: Execution, options?: BugbotReviewCommandOverrides): Promise<import("./data/model/result").Result[]>;
19
+ }
20
+ export { evaluateBugbotFindings, evaluateBugbotQualityGate } from './tooling/bugbot_quality_eval';
21
+ export { evaluateBugbotBenchmark, loadBugbotBenchmark, loadBugbotPredictions } from './tooling/bugbot_benchmark';
22
+ export { buildBugbotAnalytics, parseBugbotTelemetry } from './tooling/bugbot_analytics';
23
+ export { buildSemanticFindingFingerprint, buildFindingFingerprint } from './domain/bugbot/finding_identity';
24
+ export { normalizeBugbotReviewConfiguration, resolveBugbotReviewEffort } from './domain/bugbot/review_configuration';
25
+ export { Execution } from './data/model/execution';
26
+ export { Ai } from './data/model/ai';
27
+ export type { FindingsQueryPort } from './application/ports/agent_findings_ports';
28
+ export type { BugbotContextPorts } from './application/ports/bugbot_context_ports';
29
+ export type { BugbotFindingPublicationPorts } from './application/ports/bugbot_finding_publication_ports';
30
+ export type { BugbotFindingResolutionPorts } from './application/ports/bugbot_finding_resolution_ports';
31
+ export type { BugbotTelemetryPort } from './application/ports/bugbot_telemetry_ports';
32
+ export type { Result } from './data/model/result';
33
+ export type { BugbotFinding } from './application/usecases/steps/commit/bugbot/types';
34
+ export type { BugbotReviewConfiguration } from './domain/bugbot/review_configuration';
35
+ export type { BugbotReviewTelemetrySnapshot } from './application/ports/bugbot_telemetry_ports';
@@ -0,0 +1,3 @@
1
+ export type { AgentConfiguration } from '../../domain/agent';
2
+ /** Runtime-neutral configuration values supplied by an outer adapter. */
3
+ export type AgentConfigurationEnvironment = Readonly<Record<string, string | undefined>>;
@@ -0,0 +1,8 @@
1
+ import type { AgentQueryRequest, AgentQueryResult } from './agent_query_ports';
2
+ export type { AgentQueryOptions } from './agent_query_ports';
3
+ export interface FindingsQueryRequest extends AgentQueryRequest {
4
+ agentId: string;
5
+ }
6
+ export interface FindingsQueryPort {
7
+ query(request: FindingsQueryRequest): Promise<AgentQueryResult>;
8
+ }
@@ -0,0 +1,14 @@
1
+ import type { AgentConfiguration } from './agent_configuration_ports';
2
+ /** Options shared by read-only, structured agent capabilities. */
3
+ export interface AgentQueryOptions {
4
+ expectJson?: boolean;
5
+ schema?: Record<string, unknown>;
6
+ schemaName?: string;
7
+ includeReasoning?: boolean;
8
+ }
9
+ export interface AgentQueryRequest {
10
+ configuration: AgentConfiguration | undefined;
11
+ prompt: string;
12
+ options?: AgentQueryOptions;
13
+ }
14
+ export type AgentQueryResult = string | Record<string, unknown> | undefined;
@@ -0,0 +1,9 @@
1
+ import type { BugbotIssueReadPort } from './bugbot_issue_read_ports';
2
+ import type { BugbotPullRequestReadPort } from './bugbot_pull_request_read_ports';
3
+ import type { BugbotRuleFileQueryPort } from './bugbot_rule_ports';
4
+ export interface BugbotContextPorts {
5
+ issue: BugbotIssueReadPort;
6
+ pullRequest: BugbotPullRequestReadPort;
7
+ /** Optional for compatibility with embedders that do not expose a workspace. */
8
+ rules?: BugbotRuleFileQueryPort;
9
+ }
@@ -0,0 +1,7 @@
1
+ import type { BugbotIssueCommentWritePort } from "./bugbot_issue_write_ports";
2
+ import type { BugbotPullRequestWritePort } from "./bugbot_pull_request_write_ports";
3
+ /** Minimum capabilities needed to publish or refresh findings. */
4
+ export interface BugbotFindingPublicationPorts {
5
+ issueComments: BugbotIssueCommentWritePort;
6
+ pullRequestComments: BugbotPullRequestWritePort;
7
+ }
@@ -0,0 +1,6 @@
1
+ import type { BugbotIssueCommentUpdatePort } from "./bugbot_issue_write_ports";
2
+ import type { BugbotPullRequestResolutionPort } from "./bugbot_pull_request_resolution_ports";
3
+ export interface BugbotFindingResolutionPorts {
4
+ issueComments: BugbotIssueCommentUpdatePort;
5
+ pullRequestComments: BugbotPullRequestResolutionPort;
6
+ }
@@ -0,0 +1,10 @@
1
+ export interface BugbotIssueComment {
2
+ id: number;
3
+ body: string | null;
4
+ user?: {
5
+ login?: string;
6
+ };
7
+ }
8
+ export interface BugbotIssueReadPort {
9
+ listIssueComments(owner: string, repository: string, issueNumber: number, token: string): Promise<BugbotIssueComment[]>;
10
+ }
@@ -0,0 +1,12 @@
1
+ export interface BugbotIssueCommentCreatePort {
2
+ addComment(owner: string, repository: string, issueNumber: number, comment: string, token: string, options?: {
3
+ commitSha?: string;
4
+ }): Promise<void>;
5
+ }
6
+ export interface BugbotIssueCommentUpdatePort {
7
+ updateComment(owner: string, repository: string, issueNumber: number, commentId: number, comment: string, token: string, options?: {
8
+ commitSha?: string;
9
+ }): Promise<void>;
10
+ }
11
+ export interface BugbotIssueCommentWritePort extends BugbotIssueCommentCreatePort, BugbotIssueCommentUpdatePort {
12
+ }
@@ -0,0 +1,47 @@
1
+ import type { PullRequestReviewComment } from "./pull_request_review_comment_ports";
2
+ export interface PullRequestDiffLocation {
3
+ line: number;
4
+ side: "LEFT" | "RIGHT";
5
+ }
6
+ export interface PullRequestReviewChange {
7
+ filename: string;
8
+ status: string;
9
+ additions: number;
10
+ deletions: number;
11
+ patch: string;
12
+ }
13
+ export interface PullRequestReviewDiffSnapshot {
14
+ changes: PullRequestReviewChange[];
15
+ filesWithFirstDiffLine: Array<{
16
+ path: string;
17
+ firstLine: number;
18
+ }>;
19
+ filesWithDiffLocations: Array<{
20
+ path: string;
21
+ locations: PullRequestDiffLocation[];
22
+ }>;
23
+ }
24
+ export interface BugbotPullRequestQueryPort {
25
+ getHeadBranchForIssue(owner: string, repository: string, issueNumber: number, token: string): Promise<string | undefined>;
26
+ getPullRequestReviewCommentBody(owner: string, repository: string, pullNumber: number, commentId: number, token: string): Promise<string | null>;
27
+ }
28
+ export interface BugbotPullRequestReadPort extends BugbotPullRequestQueryPort {
29
+ getOpenPullRequestNumbersByHeadBranch(owner: string, repository: string, branch: string, token: string): Promise<number[]>;
30
+ listPullRequestReviewComments(owner: string, repository: string, pullNumber: number, token: string): Promise<PullRequestReviewComment[]>;
31
+ getPullRequestHeadSha(owner: string, repository: string, pullNumber: number, token: string): Promise<string | undefined>;
32
+ getChangedFiles(owner: string, repository: string, pullNumber: number, token: string): Promise<Array<{
33
+ filename: string;
34
+ status: string;
35
+ }>>;
36
+ getFilesWithFirstDiffLine(owner: string, repository: string, pullNumber: number, token: string): Promise<Array<{
37
+ path: string;
38
+ firstLine: number;
39
+ }>>;
40
+ getFilesWithDiffLocations?(owner: string, repository: string, pullNumber: number, token: string): Promise<Array<{
41
+ path: string;
42
+ locations: PullRequestDiffLocation[];
43
+ }>>;
44
+ /** Loads all diff projections from one paginated GitHub request. */
45
+ getReviewDiffSnapshot?(owner: string, repository: string, pullNumber: number, token: string): Promise<PullRequestReviewDiffSnapshot>;
46
+ listPullRequestReviewThreadStates?(owner: string, repository: string, pullNumber: number, token: string): Promise<Record<string, boolean>>;
47
+ }
@@ -0,0 +1,3 @@
1
+ import type { PullRequestReviewCommentListQueryPort, PullRequestReviewCommentUpdatePort, PullRequestReviewThreadCommandPort } from "./pull_request_review_comment_ports";
2
+ export interface BugbotPullRequestResolutionPort extends PullRequestReviewCommentListQueryPort, PullRequestReviewCommentUpdatePort, PullRequestReviewThreadCommandPort {
3
+ }
@@ -0,0 +1,4 @@
1
+ import type { PullRequestReviewCommentCommandPort, PullRequestReviewThreadCommandPort } from "./pull_request_review_comment_ports";
2
+ /** Publication may refresh a comment and reopen its thread when a finding returns. */
3
+ export interface BugbotPullRequestWritePort extends PullRequestReviewCommentCommandPort, Pick<PullRequestReviewThreadCommandPort, "unresolvePullRequestReviewThread"> {
4
+ }
@@ -0,0 +1,12 @@
1
+ export type BugbotRuleScope = 'organization' | 'repository' | 'path' | 'learned';
2
+ export interface BugbotReviewRule {
3
+ readonly source: string;
4
+ readonly scope: BugbotRuleScope;
5
+ readonly content: string;
6
+ }
7
+ export interface BugbotRuleFileQueryPort {
8
+ loadRules(changedFiles: readonly string[]): Promise<readonly BugbotReviewRule[]>;
9
+ }
10
+ export interface BugbotLearnedRuleCommandPort {
11
+ rememberRule(rule: string): Promise<'created' | 'existing'>;
12
+ }
@@ -0,0 +1,32 @@
1
+ export type BugbotReviewOutcome = 'completed' | 'no-findings' | 'dry-run' | 'superseded' | 'skipped' | 'failed';
2
+ export interface BugbotReviewTelemetrySnapshot {
3
+ readonly schemaVersion: 1;
4
+ readonly reviewId: string;
5
+ readonly repository: string;
6
+ readonly pullRequestNumber?: number;
7
+ readonly headSha?: string;
8
+ readonly publicationMode: 'publish' | 'dry-run';
9
+ readonly configuredEffort: string;
10
+ readonly agentProvider?: string;
11
+ readonly agentModel?: string;
12
+ readonly startedAt: string;
13
+ readonly elapsedMs: number;
14
+ readonly stagesMs: Readonly<Record<string, number>>;
15
+ readonly promptCharacters: number;
16
+ readonly responseCharacters: number;
17
+ readonly estimatedInputTokens: number;
18
+ readonly estimatedOutputTokens: number;
19
+ readonly changedFiles: number;
20
+ readonly changedLines: number;
21
+ readonly rulesLoaded: number;
22
+ readonly candidateFindings: number;
23
+ readonly publishedFindings: number;
24
+ readonly overflowFindings: number;
25
+ readonly resolvedFindings: number;
26
+ readonly findingStates?: Readonly<Record<'open' | 'fixed' | 'obsolete' | 'dismissed' | 'reopened', number>>;
27
+ readonly outcome: BugbotReviewOutcome;
28
+ readonly errorCategory?: string;
29
+ }
30
+ export interface BugbotTelemetryPort {
31
+ publish(snapshot: BugbotReviewTelemetrySnapshot): Promise<void> | void;
32
+ }
@@ -0,0 +1,43 @@
1
+ export type PullRequestReviewComment = {
2
+ /** Event-facing numeric reference retained only for point lookups. */
3
+ id: number;
4
+ /** Lossless opaque identity used by mutations and thread lookup. */
5
+ identity: string;
6
+ body: string | null;
7
+ path?: string;
8
+ line?: number;
9
+ authorLogin?: string;
10
+ };
11
+ export type PullRequestReviewCommentDraft = {
12
+ path: string;
13
+ body: string;
14
+ line?: number;
15
+ side?: "LEFT" | "RIGHT";
16
+ startLine?: number;
17
+ startSide?: "LEFT" | "RIGHT";
18
+ subjectType?: "line" | "file";
19
+ };
20
+ export interface PullRequestReviewCommentListQueryPort {
21
+ listPullRequestReviewComments(owner: string, repository: string, pullRequestNumber: number, token: string): Promise<PullRequestReviewComment[]>;
22
+ }
23
+ export interface PullRequestReviewCommentBodyQueryPort {
24
+ getPullRequestReviewCommentBody(owner: string, repository: string, pullRequestNumber: number, commentId: number, token: string): Promise<string | null>;
25
+ }
26
+ export interface PullRequestReviewCommentQueryPort extends PullRequestReviewCommentListQueryPort, PullRequestReviewCommentBodyQueryPort {
27
+ }
28
+ export interface PullRequestReviewCommentCreatePort {
29
+ createReviewWithComments(owner: string, repository: string, pullRequestNumber: number, commitId: string, body: string, comments: PullRequestReviewCommentDraft[], token: string): Promise<void>;
30
+ }
31
+ export interface PullRequestReviewCommentUpdatePort {
32
+ updatePullRequestReviewComment(owner: string, repository: string, commentIdentity: string, body: string, token: string): Promise<void>;
33
+ }
34
+ export interface PullRequestReviewCommentCommandPort extends PullRequestReviewCommentCreatePort, PullRequestReviewCommentUpdatePort {
35
+ }
36
+ export interface PullRequestReviewThreadCommandPort {
37
+ resolvePullRequestReviewThread(owner: string, repository: string, pullRequestNumber: number, commentIdentity: string, token: string): Promise<void>;
38
+ unresolvePullRequestReviewThread(owner: string, repository: string, pullRequestNumber: number, commentIdentity: string, token: string): Promise<void>;
39
+ }
40
+ export interface PullRequestReviewThreadStateQueryPort {
41
+ /** Maps review-comment node identities to their parent thread resolution state. */
42
+ listPullRequestReviewThreadStates(owner: string, repository: string, pullRequestNumber: number, token: string): Promise<Record<string, boolean>>;
43
+ }
@@ -0,0 +1,112 @@
1
+ /**
2
+ * Bugbot types: data structures used across detection, publishing, and autofix.
3
+ * GitHub supplies the canonical PR diff and the configured agent can inspect
4
+ * the read-only workspace for context before returning findings.
5
+ */
6
+ /** Single finding from the configured findings agent. */
7
+ export interface BugbotFinding {
8
+ id: string;
9
+ title: string;
10
+ description: string;
11
+ /** Computed locally; never accepted from the agent as an authority. */
12
+ fingerprint?: string;
13
+ /** Location-independent reconciliation identity computed locally. */
14
+ semanticFingerprint?: string;
15
+ file?: string;
16
+ line?: number;
17
+ endLine?: number;
18
+ severity?: string;
19
+ confidence?: number;
20
+ category?: string;
21
+ evidence?: string;
22
+ suggestion?: string;
23
+ /** Optional enclosing symbol used only to improve local identity. */
24
+ symbol?: string;
25
+ /** Short code anchor used only to improve local identity. */
26
+ codeSnippet?: string;
27
+ /** Exact replacement text for a GitHub suggested change, when safe and local. */
28
+ suggestedCode?: string;
29
+ }
30
+ export interface ExistingIssueFindingInfo {
31
+ commentId: number;
32
+ resolved: boolean;
33
+ fingerprint?: string;
34
+ semanticFingerprint?: string;
35
+ resolution?: BugbotFindingResolution;
36
+ }
37
+ export interface ExistingPullRequestFindingInfo {
38
+ commentIdentity: string;
39
+ pullRequestNumber: number;
40
+ resolved: boolean;
41
+ /** Fresh GitHub thread state when the provider supplied it. */
42
+ threadResolved?: boolean;
43
+ fingerprint?: string;
44
+ semanticFingerprint?: string;
45
+ resolution?: BugbotFindingResolution;
46
+ }
47
+ export type BugbotFindingResolution = 'fixed' | 'obsolete' | 'dismissed';
48
+ /** Tracks each published destination independently so partial failures remain retryable. */
49
+ export interface ExistingFindingInfo {
50
+ issue?: ExistingIssueFindingInfo;
51
+ pullRequest?: ExistingPullRequestFindingInfo;
52
+ }
53
+ export type ExistingByFindingId = Record<string, ExistingFindingInfo>;
54
+ export declare function isExistingFindingFullyResolved(finding: ExistingFindingInfo): boolean;
55
+ /** PR metadata used only when publishing findings to GitHub. */
56
+ export interface BugbotPrContext {
57
+ prHeadSha: string;
58
+ prFiles: Array<{
59
+ filename: string;
60
+ status: string;
61
+ }>;
62
+ pathToFirstDiffLine: Record<string, number>;
63
+ pathToDiffLocations?: Record<string, Array<{
64
+ line: number;
65
+ side: 'LEFT' | 'RIGHT';
66
+ }>>;
67
+ changes?: Array<{
68
+ filename: string;
69
+ status: string;
70
+ additions: number;
71
+ deletions: number;
72
+ patch: string;
73
+ }>;
74
+ }
75
+ /** Unresolved finding with a prompt-bounded comment body. */
76
+ export interface UnresolvedFindingWithBody {
77
+ id: string;
78
+ fullBody: string;
79
+ }
80
+ /** Finding projection used by prompts that ask the agent to select findings. */
81
+ export interface UnresolvedFindingSummary {
82
+ id: string;
83
+ title: string;
84
+ description?: string;
85
+ file?: string;
86
+ line?: number;
87
+ }
88
+ export declare function findExistingFindingInfo(existingByFindingId: ExistingByFindingId, finding: Pick<BugbotFinding, 'id' | 'fingerprint' | 'semanticFingerprint'>): ExistingFindingInfo | undefined;
89
+ /** Full context for detection, mutation, publishing, and autofix intent. */
90
+ export interface BugbotContext {
91
+ existingByFindingId: ExistingByFindingId;
92
+ /** Full issue-comment bodies reserved for read-modify-write operations. */
93
+ issueComments: Array<{
94
+ id: number;
95
+ body: string | null;
96
+ }>;
97
+ openPrNumbers: number[];
98
+ /** Bounded text sent to the configured findings agent. */
99
+ previousFindingsBlock: string;
100
+ /** Canonical, bounded PR diff supplied by the GitHub API. */
101
+ reviewDiffBlock?: string;
102
+ /** Bounded human review discussion that may affect finding validity. */
103
+ reviewConversationBlock?: string;
104
+ prContext: BugbotPrContext | null;
105
+ /** Bounded bodies used by intent prompts and autofix. */
106
+ unresolvedFindingsWithBody: UnresolvedFindingWithBody[];
107
+ /** Ordered, bounded rule content supplied to the reviewer. */
108
+ reviewRulesBlock?: string;
109
+ /** Auditable rule identities in effective precedence order. */
110
+ reviewRuleSources?: string[];
111
+ omittedReviewRules?: number;
112
+ }
@@ -0,0 +1,2 @@
1
+ export type { AgentConfiguration, AgentProvider, AgentCapability, AgentTask, AgentTaskConfiguration, } from '../../domain/agent';
2
+ export { isAgentConfigurationReady } from '../../domain/agent';
@@ -0,0 +1,28 @@
1
+ import { AgentConfiguration, AgentTask, AgentTaskConfiguration } from './agent';
2
+ import { type PullRequestDescriptionMode } from '../../domain/pull_request_description';
3
+ import { type BugbotReviewConfiguration } from '../../domain/bugbot/review_configuration';
4
+ export declare class Ai {
5
+ private aiPullRequestDescription;
6
+ private aiMembersOnly;
7
+ private aiIgnoreFiles;
8
+ private aiIncludeReasoning;
9
+ private bugbotMinSeverity;
10
+ private bugbotCommentLimit;
11
+ private bugbotFixVerifyCommands;
12
+ private agentTasks;
13
+ private pullRequestDescriptionMode;
14
+ private bugbotReviewConfiguration;
15
+ constructor(_configurationSource: string, model: string, aiPullRequestDescription: boolean, aiMembersOnly: boolean, aiIgnoreFiles: string[], aiIncludeReasoning: boolean, bugbotMinSeverity: string, bugbotCommentLimit: number, bugbotFixVerifyCommands?: string[], agentTasks?: AgentTaskConfiguration, pullRequestDescriptionMode?: PullRequestDescriptionMode, bugbotReviewConfiguration?: Partial<BugbotReviewConfiguration>);
16
+ getAiPullRequestDescription(): boolean;
17
+ getPullRequestDescriptionMode(): PullRequestDescriptionMode;
18
+ getAiMembersOnly(): boolean;
19
+ getAiIgnoreFiles(): string[];
20
+ getAiIncludeReasoning(): boolean;
21
+ getBugbotMinSeverity(): string;
22
+ getBugbotCommentLimit(): number;
23
+ getBugbotFixVerifyCommands(): string[];
24
+ getBugbotReviewConfiguration(): BugbotReviewConfiguration;
25
+ /** Applies command-scoped review options and restores the shared configuration afterwards. */
26
+ withBugbotReviewConfiguration<T>(overrides: Partial<BugbotReviewConfiguration>, operation: () => Promise<T>): Promise<T>;
27
+ getAgentConfiguration(task: AgentTask): AgentConfiguration;
28
+ }
@@ -0,0 +1,6 @@
1
+ export declare class BranchConfiguration {
2
+ name: string;
3
+ oid: string;
4
+ children: BranchConfiguration[];
5
+ constructor(data: unknown);
6
+ }
@@ -0,0 +1,12 @@
1
+ export declare class Branches {
2
+ main: string;
3
+ defaultBranch: string;
4
+ development: string;
5
+ featureTree: string;
6
+ bugfixTree: string;
7
+ hotfixTree: string;
8
+ releaseTree: string;
9
+ docsTree: string;
10
+ choreTree: string;
11
+ constructor(main: string, defaultBranch: string, development: string, featureTree: string, bugfixTree: string, hotfixTree: string, releaseTree: string, docsTree: string, choreTree: string);
12
+ }
@@ -0,0 +1,8 @@
1
+ import type { EventCommitPayload, ExecutionInputs } from './execution_inputs';
2
+ export declare class Commit {
3
+ private inputs;
4
+ constructor(inputs?: ExecutionInputs | undefined);
5
+ get branchReference(): string;
6
+ get branch(): string;
7
+ get commits(): EventCommitPayload[];
8
+ }
@@ -0,0 +1,30 @@
1
+ import { BranchConfiguration } from "./branch_configuration";
2
+ import { RecommendationState } from "./recommendation_state";
3
+ import { Result } from "./result";
4
+ /** Version of the durable configuration contract stored in issue/PR content. */
5
+ export declare const CONFIG_SCHEMA_VERSION = 2;
6
+ export interface ConfigurationMigrationResult {
7
+ readonly payload: Record<string, unknown>;
8
+ readonly sourceVersion: number;
9
+ readonly migrated: boolean;
10
+ readonly futureVersion: boolean;
11
+ }
12
+ /**
13
+ * Normalizes persisted configuration without silently losing fields from a
14
+ * newer installation. Unknown keys are deliberately retained so a downgrade
15
+ * or a mixed-version workflow can round-trip data safely.
16
+ */
17
+ export declare function migrateConfigurationPayload(value: unknown): ConfigurationMigrationResult;
18
+ export declare class Config {
19
+ readonly schemaVersion: number;
20
+ branchType: string;
21
+ releaseBranch: string | undefined;
22
+ workingBranch: string | undefined;
23
+ parentBranch: string | undefined;
24
+ hotfixOriginBranch: string | undefined;
25
+ hotfixBranch: string | undefined;
26
+ results: Result[];
27
+ branchConfiguration: BranchConfiguration | undefined;
28
+ recommendationState: RecommendationState | undefined;
29
+ constructor(data: unknown);
30
+ }
@@ -0,0 +1,5 @@
1
+ export declare class Emoji {
2
+ emojiLabeledTitle: boolean;
3
+ branchManagementEmoji: string;
4
+ constructor(emojiLabeledTitle: boolean, branchManagementEmoji: string);
5
+ }
@@ -0,0 +1,75 @@
1
+ import { Ai } from "./ai";
2
+ import { Branches } from "./branches";
3
+ import { Commit } from "./commit";
4
+ import { Config } from "./config";
5
+ import { Emoji } from "./emoji";
6
+ import { Hotfix } from "./hotfix";
7
+ import { Images } from "./images";
8
+ import { Issue } from "./issue";
9
+ import { IssueTypes } from "./issue_types";
10
+ import { Labels } from "./labels";
11
+ import { Locale } from "./locale";
12
+ import { Projects } from "./projects";
13
+ import { PullRequest } from "./pull_request";
14
+ import { Release } from "./release";
15
+ import { SingleAction } from "./single_action";
16
+ import { SizeThresholds } from "./size_thresholds";
17
+ import { Tokens } from "./tokens";
18
+ import { Welcome } from "./welcome";
19
+ import { Workflows } from "./workflows";
20
+ import type { ExecutionInputs } from './execution_inputs';
21
+ import type { ExecutionComponents } from './execution_components';
22
+ export declare class Execution {
23
+ debug: boolean;
24
+ welcome: Welcome | undefined;
25
+ /**
26
+ * Every usage of this field should be checked.
27
+ * PRs with no issue ID in the head branch won't have it.
28
+ *
29
+ * master <- develop
30
+ */
31
+ issueNumber: number;
32
+ singleAction: SingleAction;
33
+ commitPrefixBuilder: string;
34
+ commitPrefixBuilderParams: Record<string, unknown>;
35
+ emoji: Emoji;
36
+ images: Images;
37
+ tokens: Tokens;
38
+ ai: Ai;
39
+ labels: Labels;
40
+ issueTypes: IssueTypes;
41
+ locale: Locale;
42
+ sizeThresholds: SizeThresholds;
43
+ branches: Branches;
44
+ release: Release;
45
+ hotfix: Hotfix;
46
+ issue: Issue;
47
+ pullRequest: PullRequest;
48
+ workflows: Workflows;
49
+ project: Projects;
50
+ previousConfiguration: Config | undefined;
51
+ currentConfiguration: Config;
52
+ tokenUser: string | undefined;
53
+ inactivityThresholdHours: number;
54
+ inputs: ExecutionInputs | undefined;
55
+ get eventName(): string;
56
+ get actor(): string;
57
+ get isSingleAction(): boolean;
58
+ get isIssue(): boolean;
59
+ get isPullRequest(): boolean;
60
+ get isPush(): boolean;
61
+ get repo(): string;
62
+ get owner(): string;
63
+ get isFeature(): boolean;
64
+ get isBugfix(): boolean;
65
+ get isDocs(): boolean;
66
+ get isChore(): boolean;
67
+ get isBranched(): boolean;
68
+ get issueNotBranched(): boolean;
69
+ get managementBranch(): string;
70
+ get issueType(): string;
71
+ get cleanIssueBranches(): boolean;
72
+ get commit(): Commit;
73
+ get runnedByToken(): boolean;
74
+ constructor(components: ExecutionComponents);
75
+ }
@@ -0,0 +1,43 @@
1
+ import type { Ai } from './ai';
2
+ import type { Branches } from './branches';
3
+ import type { Emoji } from './emoji';
4
+ import type { Hotfix } from './hotfix';
5
+ import type { Images } from './images';
6
+ import type { Issue } from './issue';
7
+ import type { IssueTypes } from './issue_types';
8
+ import type { Labels } from './labels';
9
+ import type { Locale } from './locale';
10
+ import type { Projects } from './projects';
11
+ import type { PullRequest } from './pull_request';
12
+ import type { Release } from './release';
13
+ import type { SingleAction } from './single_action';
14
+ import type { SizeThresholds } from './size_thresholds';
15
+ import type { Tokens } from './tokens';
16
+ import type { Welcome } from './welcome';
17
+ import type { Workflows } from './workflows';
18
+ import type { ExecutionInputs } from './execution_inputs';
19
+ /** Immutable construction contract for the runtime execution aggregate. */
20
+ export interface ExecutionComponents {
21
+ debug: boolean;
22
+ singleAction: SingleAction;
23
+ commitPrefixBuilder: string;
24
+ issue: Issue;
25
+ pullRequest: PullRequest;
26
+ emoji: Emoji;
27
+ images: Images;
28
+ tokens: Tokens;
29
+ ai: Ai;
30
+ labels: Labels;
31
+ issueTypes: IssueTypes;
32
+ locale: Locale;
33
+ sizeThresholds: SizeThresholds;
34
+ branches: Branches;
35
+ release: Release;
36
+ hotfix: Hotfix;
37
+ workflows: Workflows;
38
+ projects: Projects;
39
+ tokenUser?: string;
40
+ welcome?: Welcome;
41
+ inactivityThresholdHours?: number;
42
+ inputs?: ExecutionInputs;
43
+ }