@h-rig/bundle-default-lifecycle 0.0.6-alpha.155 → 0.0.6-alpha.156
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.
- package/dist/src/branch-naming.d.ts +15 -0
- package/dist/src/branch-naming.js +33 -0
- package/dist/src/cli.js +4 -4
- package/dist/src/closeoutEquivalence.d.ts +1 -1
- package/dist/src/control-plane/completion-verification.d.ts +19 -0
- package/dist/src/control-plane/completion-verification.js +1917 -0
- package/dist/src/control-plane/pr-automation.d.ts +87 -0
- package/dist/src/control-plane/pr-automation.js +638 -0
- package/dist/src/control-plane/task-verify.d.ts +1 -0
- package/dist/src/control-plane/task-verify.js +1484 -0
- package/dist/src/control-plane/verifier.d.ts +138 -0
- package/dist/src/control-plane/verifier.js +1478 -0
- package/dist/src/defaultPipeline.js +4 -4
- package/dist/src/index.js +2716 -54
- package/dist/src/native/closeout-runners.d.ts +5 -0
- package/dist/src/native/closeout-runners.js +41 -0
- package/dist/src/native/in-process-closeout.d.ts +40 -0
- package/dist/src/native/in-process-closeout.js +802 -0
- package/dist/src/pipelineCloseout.d.ts +1 -1
- package/dist/src/pipelineCloseout.js +2712 -52
- package/dist/src/plugin.d.ts +4 -17
- package/dist/src/plugin.js +2029 -25
- package/dist/src/stages/auto-merge.d.ts +1 -2
- package/dist/src/stages/auto-merge.js +657 -3
- package/dist/src/stages/commit.d.ts +1 -1
- package/dist/src/stages/commit.js +657 -3
- package/dist/src/stages/isolation.js +3 -2
- package/dist/src/stages/merge-gate.d.ts +1 -2
- package/dist/src/stages/merge-gate.js +1 -1
- package/dist/src/stages/open-pr.d.ts +2 -2
- package/dist/src/stages/open-pr.js +657 -3
- package/dist/src/stages/push.d.ts +1 -1
- package/dist/src/stages/push.js +657 -3
- package/dist/src/stages/source-closeout.d.ts +1 -1
- package/dist/src/stages/source-closeout.js +657 -3
- package/dist/src/stages/validate.d.ts +1 -1
- package/package.json +32 -5
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { parseGreptileScore } from "@rig/pr-review-plugin";
|
|
2
|
+
export type VerifyOutcome = {
|
|
3
|
+
approved: boolean;
|
|
4
|
+
localReasons: string[];
|
|
5
|
+
aiReasons: string[];
|
|
6
|
+
aiWarnings: string[];
|
|
7
|
+
aiVerdict: "APPROVE" | "REJECT" | "SKIP";
|
|
8
|
+
reviewFeedbackPath: string;
|
|
9
|
+
reviewStatePath: string;
|
|
10
|
+
};
|
|
11
|
+
export declare function verifyTask(options: {
|
|
12
|
+
projectRoot: string;
|
|
13
|
+
taskId: string;
|
|
14
|
+
skipAiReview?: boolean;
|
|
15
|
+
persistArtifacts?: boolean;
|
|
16
|
+
}): Promise<VerifyOutcome>;
|
|
17
|
+
type GreptileCodeReview = {
|
|
18
|
+
id: string;
|
|
19
|
+
status: "PENDING" | "REVIEWING_FILES" | "GENERATING_SUMMARY" | "COMPLETED" | "FAILED" | "SKIPPED";
|
|
20
|
+
createdAt?: string;
|
|
21
|
+
completedAt?: string | null;
|
|
22
|
+
body?: string;
|
|
23
|
+
metadata?: {
|
|
24
|
+
checkHeadSha?: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
type GreptileComment = {
|
|
28
|
+
body?: string;
|
|
29
|
+
filePath?: string | null;
|
|
30
|
+
addressed?: boolean;
|
|
31
|
+
createdAt?: string;
|
|
32
|
+
sourceType?: string;
|
|
33
|
+
};
|
|
34
|
+
type GithubPullRequestReview = {
|
|
35
|
+
id?: string | number;
|
|
36
|
+
state?: string;
|
|
37
|
+
body?: string;
|
|
38
|
+
html_url?: string;
|
|
39
|
+
submitted_at?: string;
|
|
40
|
+
commit_id?: string;
|
|
41
|
+
user?: {
|
|
42
|
+
login?: string | null;
|
|
43
|
+
} | null;
|
|
44
|
+
};
|
|
45
|
+
type GithubStatusCheckRollupItem = {
|
|
46
|
+
__typename?: string;
|
|
47
|
+
name?: string;
|
|
48
|
+
status?: string;
|
|
49
|
+
conclusion?: string;
|
|
50
|
+
context?: string;
|
|
51
|
+
state?: string;
|
|
52
|
+
};
|
|
53
|
+
type GithubGreptileCheckState = {
|
|
54
|
+
pending: boolean;
|
|
55
|
+
completed: boolean;
|
|
56
|
+
};
|
|
57
|
+
type GithubReviewThreadComment = {
|
|
58
|
+
body?: string;
|
|
59
|
+
path?: string;
|
|
60
|
+
url?: string;
|
|
61
|
+
createdAt?: string;
|
|
62
|
+
author?: {
|
|
63
|
+
login?: string | null;
|
|
64
|
+
} | null;
|
|
65
|
+
};
|
|
66
|
+
type GithubReviewThread = {
|
|
67
|
+
isResolved?: boolean;
|
|
68
|
+
isOutdated?: boolean;
|
|
69
|
+
comments?: {
|
|
70
|
+
nodes?: GithubReviewThreadComment[];
|
|
71
|
+
} | null;
|
|
72
|
+
};
|
|
73
|
+
declare function callGreptileMcpToolWithTimeout(apiBase: string, apiKey: string, name: string, args: Record<string, unknown>, timeoutMs: number): Promise<string>;
|
|
74
|
+
declare function resolveGreptileRequestTimeoutMs(rawValue: string | undefined): number;
|
|
75
|
+
export declare function pickRelevantCodeReview(reviews: GreptileCodeReview[], triggerStartedAt: number, expectedHeadSha: string): GreptileCodeReview | null;
|
|
76
|
+
export declare function filterActionableGreptileComments(comments: GreptileComment[]): GreptileComment[];
|
|
77
|
+
declare function shouldTriggerGreptileReview(existingReview: GreptileCodeReview | null, expectedHeadSha: string): boolean;
|
|
78
|
+
declare function shouldContinueGreptileMcpPolling(options: {
|
|
79
|
+
attempt: number;
|
|
80
|
+
pollAttempts: number;
|
|
81
|
+
githubCheckState: GithubGreptileCheckState;
|
|
82
|
+
selectedReview: GreptileCodeReview | null;
|
|
83
|
+
}): boolean;
|
|
84
|
+
declare function shouldContinueGithubGreptileFallbackPolling(options: {
|
|
85
|
+
attempt: number;
|
|
86
|
+
pollAttempts: number;
|
|
87
|
+
checkState: GithubGreptileCheckState;
|
|
88
|
+
fallbackReview: GithubPullRequestReview | null;
|
|
89
|
+
selectedReview: GithubPullRequestReview | null;
|
|
90
|
+
approvedViaReviewedAncestor: boolean;
|
|
91
|
+
}): boolean;
|
|
92
|
+
declare function resolveGreptilePollSettings(options: {
|
|
93
|
+
reviewMode: "off" | "advisory" | "required";
|
|
94
|
+
secrets: Partial<Record<"GREPTILE_POLL_ATTEMPTS" | "GREPTILE_POLL_INTERVAL_MS", string>>;
|
|
95
|
+
}): {
|
|
96
|
+
pollAttempts: number;
|
|
97
|
+
pollIntervalMs: number;
|
|
98
|
+
};
|
|
99
|
+
declare function shouldPreferGithubGreptileFallback(prState: {
|
|
100
|
+
state?: string;
|
|
101
|
+
merged?: boolean;
|
|
102
|
+
merged_at?: string | null;
|
|
103
|
+
} | null | undefined): boolean;
|
|
104
|
+
declare function pickRelevantGithubGreptileReview(reviews: GithubPullRequestReview[], expectedHeadSha: string): GithubPullRequestReview | null;
|
|
105
|
+
declare function pickLatestGithubGreptileReview(reviews: GithubPullRequestReview[]): GithubPullRequestReview | null;
|
|
106
|
+
export declare function evaluatePullRequestCiChecks(checks: GithubStatusCheckRollupItem[], repoName: string, prNumber: number, options?: {
|
|
107
|
+
mergeStateStatus?: string;
|
|
108
|
+
}): {
|
|
109
|
+
verdict: "APPROVE" | "REJECT" | "SKIP";
|
|
110
|
+
reasons: string[];
|
|
111
|
+
};
|
|
112
|
+
declare function classifyGithubGreptileCheckState(checks: GithubStatusCheckRollupItem[]): GithubGreptileCheckState;
|
|
113
|
+
declare function isGithubGreptileCheckApproved(_checks: GithubStatusCheckRollupItem[]): boolean;
|
|
114
|
+
declare function filterActionableGithubGreptileThreads(threads: GithubReviewThread[]): GithubReviewThreadComment[];
|
|
115
|
+
declare function asGreptileInfrastructureWarning(reason: string): string;
|
|
116
|
+
declare function isAiReviewApproved(input: {
|
|
117
|
+
reviewMode: "off" | "advisory" | "required";
|
|
118
|
+
aiVerdict: "APPROVE" | "REJECT" | "SKIP";
|
|
119
|
+
aiReasons: string[];
|
|
120
|
+
}): boolean;
|
|
121
|
+
export declare const __testOnly: {
|
|
122
|
+
asGreptileInfrastructureWarning: typeof asGreptileInfrastructureWarning;
|
|
123
|
+
callGreptileMcpToolWithTimeout: typeof callGreptileMcpToolWithTimeout;
|
|
124
|
+
classifyGithubGreptileCheckState: typeof classifyGithubGreptileCheckState;
|
|
125
|
+
filterActionableGithubGreptileThreads: typeof filterActionableGithubGreptileThreads;
|
|
126
|
+
isGithubGreptileCheckApproved: typeof isGithubGreptileCheckApproved;
|
|
127
|
+
isAiReviewApproved: typeof isAiReviewApproved;
|
|
128
|
+
parseGreptileScore: typeof parseGreptileScore;
|
|
129
|
+
pickLatestGithubGreptileReview: typeof pickLatestGithubGreptileReview;
|
|
130
|
+
pickRelevantGithubGreptileReview: typeof pickRelevantGithubGreptileReview;
|
|
131
|
+
resolveGreptileRequestTimeoutMs: typeof resolveGreptileRequestTimeoutMs;
|
|
132
|
+
resolveGreptilePollSettings: typeof resolveGreptilePollSettings;
|
|
133
|
+
shouldPreferGithubGreptileFallback: typeof shouldPreferGithubGreptileFallback;
|
|
134
|
+
shouldContinueGithubGreptileFallbackPolling: typeof shouldContinueGithubGreptileFallbackPolling;
|
|
135
|
+
shouldContinueGreptileMcpPolling: typeof shouldContinueGreptileMcpPolling;
|
|
136
|
+
shouldTriggerGreptileReview: typeof shouldTriggerGreptileReview;
|
|
137
|
+
};
|
|
138
|
+
export {};
|