@motivation-labs/crosscheck 0.8.0 → 0.9.0-beta.16
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/README.md +45 -214
- package/README.zh.md +51 -176
- package/crosscheck.config.example.yml +13 -17
- package/dist/__tests__/loader.test.js +51 -2
- package/dist/__tests__/loader.test.js.map +1 -1
- package/dist/__tests__/onboard-preservation.test.js +1 -0
- package/dist/__tests__/onboard-preservation.test.js.map +1 -1
- package/dist/__tests__/optimize.test.js +2 -5
- package/dist/__tests__/optimize.test.js.map +1 -1
- package/dist/cli.js +4 -2
- package/dist/cli.js.map +1 -1
- package/dist/commands/issue.d.ts.map +1 -1
- package/dist/commands/issue.js +5 -2
- package/dist/commands/issue.js.map +1 -1
- package/dist/commands/onboard.d.ts +1 -0
- package/dist/commands/onboard.d.ts.map +1 -1
- package/dist/commands/onboard.js +53 -24
- package/dist/commands/onboard.js.map +1 -1
- package/dist/commands/review.d.ts.map +1 -1
- package/dist/commands/review.js +8 -11
- package/dist/commands/review.js.map +1 -1
- package/dist/commands/run.d.ts.map +1 -1
- package/dist/commands/run.js +6 -10
- package/dist/commands/run.js.map +1 -1
- package/dist/commands/serve.d.ts.map +1 -1
- package/dist/commands/serve.js +11 -17
- package/dist/commands/serve.js.map +1 -1
- package/dist/commands/watch.d.ts.map +1 -1
- package/dist/commands/watch.js +7 -18
- package/dist/commands/watch.js.map +1 -1
- package/dist/config/loader.d.ts +1 -2
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/config/loader.js +11 -11
- package/dist/config/loader.js.map +1 -1
- package/dist/config/schema.d.ts +27 -54
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +15 -12
- package/dist/config/schema.js.map +1 -1
- package/dist/lib/board.d.ts +7 -0
- package/dist/lib/board.d.ts.map +1 -1
- package/dist/lib/board.js +150 -57
- package/dist/lib/board.js.map +1 -1
- package/dist/lib/clone.d.ts +12 -0
- package/dist/lib/clone.d.ts.map +1 -0
- package/dist/lib/clone.js +30 -0
- package/dist/lib/clone.js.map +1 -0
- package/dist/lib/runner.d.ts +3 -0
- package/dist/lib/runner.d.ts.map +1 -1
- package/dist/lib/runner.js +44 -51
- package/dist/lib/runner.js.map +1 -1
- package/dist/lib/workflow.d.ts.map +1 -1
- package/dist/lib/workflow.js +9 -2
- package/dist/lib/workflow.js.map +1 -1
- package/dist/reviewers/claude.d.ts.map +1 -1
- package/dist/reviewers/claude.js +3 -9
- package/dist/reviewers/claude.js.map +1 -1
- package/get-started.md +24 -14
- package/get-started.zh.md +422 -52
- package/package.json +1 -1
package/dist/config/schema.d.ts
CHANGED
|
@@ -157,10 +157,6 @@ export declare const PostReviewDeliverySchema: z.ZodObject<{
|
|
|
157
157
|
label?: string | undefined;
|
|
158
158
|
}>;
|
|
159
159
|
export declare const PostReviewFixSchema: z.ZodObject<{
|
|
160
|
-
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
161
|
-
trigger: z.ZodDefault<z.ZodEnum<["on_issues", "always", "never"]>>;
|
|
162
|
-
min_severity: z.ZodDefault<z.ZodEnum<["error", "warning", "info"]>>;
|
|
163
|
-
fixer: z.ZodDefault<z.ZodEnum<["same-as-author", "same-as-reviewer", "codex", "claude"]>>;
|
|
164
160
|
delivery: z.ZodDefault<z.ZodObject<{
|
|
165
161
|
mode: z.ZodDefault<z.ZodEnum<["pull_request", "commit", "comment"]>>;
|
|
166
162
|
pr_title: z.ZodDefault<z.ZodString>;
|
|
@@ -174,33 +170,27 @@ export declare const PostReviewFixSchema: z.ZodObject<{
|
|
|
174
170
|
pr_title?: string | undefined;
|
|
175
171
|
label?: string | undefined;
|
|
176
172
|
}>>;
|
|
173
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
174
|
+
trigger: z.ZodOptional<z.ZodEnum<["on_issues", "always", "never"]>>;
|
|
177
175
|
}, "strip", z.ZodTypeAny, {
|
|
178
|
-
enabled: boolean;
|
|
179
|
-
trigger: "never" | "on_issues" | "always";
|
|
180
|
-
min_severity: "error" | "warning" | "info";
|
|
181
|
-
fixer: "claude" | "codex" | "same-as-author" | "same-as-reviewer";
|
|
182
176
|
delivery: {
|
|
183
177
|
mode: "pull_request" | "commit" | "comment";
|
|
184
178
|
pr_title: string;
|
|
185
179
|
label: string;
|
|
186
180
|
};
|
|
187
|
-
}, {
|
|
188
181
|
enabled?: boolean | undefined;
|
|
189
182
|
trigger?: "never" | "on_issues" | "always" | undefined;
|
|
190
|
-
|
|
191
|
-
|
|
183
|
+
}, {
|
|
184
|
+
enabled?: boolean | undefined;
|
|
192
185
|
delivery?: {
|
|
193
186
|
mode?: "pull_request" | "commit" | "comment" | undefined;
|
|
194
187
|
pr_title?: string | undefined;
|
|
195
188
|
label?: string | undefined;
|
|
196
189
|
} | undefined;
|
|
190
|
+
trigger?: "never" | "on_issues" | "always" | undefined;
|
|
197
191
|
}>;
|
|
198
192
|
export declare const PostReviewConfigSchema: z.ZodObject<{
|
|
199
193
|
auto_fix: z.ZodDefault<z.ZodObject<{
|
|
200
|
-
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
201
|
-
trigger: z.ZodDefault<z.ZodEnum<["on_issues", "always", "never"]>>;
|
|
202
|
-
min_severity: z.ZodDefault<z.ZodEnum<["error", "warning", "info"]>>;
|
|
203
|
-
fixer: z.ZodDefault<z.ZodEnum<["same-as-author", "same-as-reviewer", "codex", "claude"]>>;
|
|
204
194
|
delivery: z.ZodDefault<z.ZodObject<{
|
|
205
195
|
mode: z.ZodDefault<z.ZodEnum<["pull_request", "commit", "comment"]>>;
|
|
206
196
|
pr_title: z.ZodDefault<z.ZodString>;
|
|
@@ -214,50 +204,44 @@ export declare const PostReviewConfigSchema: z.ZodObject<{
|
|
|
214
204
|
pr_title?: string | undefined;
|
|
215
205
|
label?: string | undefined;
|
|
216
206
|
}>>;
|
|
207
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
208
|
+
trigger: z.ZodOptional<z.ZodEnum<["on_issues", "always", "never"]>>;
|
|
217
209
|
}, "strip", z.ZodTypeAny, {
|
|
218
|
-
enabled: boolean;
|
|
219
|
-
trigger: "never" | "on_issues" | "always";
|
|
220
|
-
min_severity: "error" | "warning" | "info";
|
|
221
|
-
fixer: "claude" | "codex" | "same-as-author" | "same-as-reviewer";
|
|
222
210
|
delivery: {
|
|
223
211
|
mode: "pull_request" | "commit" | "comment";
|
|
224
212
|
pr_title: string;
|
|
225
213
|
label: string;
|
|
226
214
|
};
|
|
227
|
-
}, {
|
|
228
215
|
enabled?: boolean | undefined;
|
|
229
216
|
trigger?: "never" | "on_issues" | "always" | undefined;
|
|
230
|
-
|
|
231
|
-
|
|
217
|
+
}, {
|
|
218
|
+
enabled?: boolean | undefined;
|
|
232
219
|
delivery?: {
|
|
233
220
|
mode?: "pull_request" | "commit" | "comment" | undefined;
|
|
234
221
|
pr_title?: string | undefined;
|
|
235
222
|
label?: string | undefined;
|
|
236
223
|
} | undefined;
|
|
224
|
+
trigger?: "never" | "on_issues" | "always" | undefined;
|
|
237
225
|
}>>;
|
|
238
226
|
}, "strip", z.ZodTypeAny, {
|
|
239
227
|
auto_fix: {
|
|
240
|
-
enabled: boolean;
|
|
241
|
-
trigger: "never" | "on_issues" | "always";
|
|
242
|
-
min_severity: "error" | "warning" | "info";
|
|
243
|
-
fixer: "claude" | "codex" | "same-as-author" | "same-as-reviewer";
|
|
244
228
|
delivery: {
|
|
245
229
|
mode: "pull_request" | "commit" | "comment";
|
|
246
230
|
pr_title: string;
|
|
247
231
|
label: string;
|
|
248
232
|
};
|
|
233
|
+
enabled?: boolean | undefined;
|
|
234
|
+
trigger?: "never" | "on_issues" | "always" | undefined;
|
|
249
235
|
};
|
|
250
236
|
}, {
|
|
251
237
|
auto_fix?: {
|
|
252
238
|
enabled?: boolean | undefined;
|
|
253
|
-
trigger?: "never" | "on_issues" | "always" | undefined;
|
|
254
|
-
min_severity?: "error" | "warning" | "info" | undefined;
|
|
255
|
-
fixer?: "claude" | "codex" | "same-as-author" | "same-as-reviewer" | undefined;
|
|
256
239
|
delivery?: {
|
|
257
240
|
mode?: "pull_request" | "commit" | "comment" | undefined;
|
|
258
241
|
pr_title?: string | undefined;
|
|
259
242
|
label?: string | undefined;
|
|
260
243
|
} | undefined;
|
|
244
|
+
trigger?: "never" | "on_issues" | "always" | undefined;
|
|
261
245
|
} | undefined;
|
|
262
246
|
}>;
|
|
263
247
|
export declare const DisplayThemeSchema: z.ZodObject<{
|
|
@@ -343,6 +327,7 @@ export declare const BrandConfigSchema: z.ZodObject<{
|
|
|
343
327
|
export declare const ConfigSchema: z.ZodObject<{
|
|
344
328
|
deployment: z.ZodOptional<z.ZodEnum<["personal", "team"]>>;
|
|
345
329
|
mode: z.ZodDefault<z.ZodEnum<["single-vendor", "cross-vendor"]>>;
|
|
330
|
+
clone_protocol: z.ZodDefault<z.ZodEnum<["ssh", "https"]>>;
|
|
346
331
|
vendors: z.ZodDefault<z.ZodObject<{
|
|
347
332
|
codex: z.ZodDefault<z.ZodObject<{
|
|
348
333
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -521,10 +506,6 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
521
506
|
}>>;
|
|
522
507
|
post_review: z.ZodDefault<z.ZodObject<{
|
|
523
508
|
auto_fix: z.ZodDefault<z.ZodObject<{
|
|
524
|
-
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
525
|
-
trigger: z.ZodDefault<z.ZodEnum<["on_issues", "always", "never"]>>;
|
|
526
|
-
min_severity: z.ZodDefault<z.ZodEnum<["error", "warning", "info"]>>;
|
|
527
|
-
fixer: z.ZodDefault<z.ZodEnum<["same-as-author", "same-as-reviewer", "codex", "claude"]>>;
|
|
528
509
|
delivery: z.ZodDefault<z.ZodObject<{
|
|
529
510
|
mode: z.ZodDefault<z.ZodEnum<["pull_request", "commit", "comment"]>>;
|
|
530
511
|
pr_title: z.ZodDefault<z.ZodString>;
|
|
@@ -538,50 +519,44 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
538
519
|
pr_title?: string | undefined;
|
|
539
520
|
label?: string | undefined;
|
|
540
521
|
}>>;
|
|
522
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
523
|
+
trigger: z.ZodOptional<z.ZodEnum<["on_issues", "always", "never"]>>;
|
|
541
524
|
}, "strip", z.ZodTypeAny, {
|
|
542
|
-
enabled: boolean;
|
|
543
|
-
trigger: "never" | "on_issues" | "always";
|
|
544
|
-
min_severity: "error" | "warning" | "info";
|
|
545
|
-
fixer: "claude" | "codex" | "same-as-author" | "same-as-reviewer";
|
|
546
525
|
delivery: {
|
|
547
526
|
mode: "pull_request" | "commit" | "comment";
|
|
548
527
|
pr_title: string;
|
|
549
528
|
label: string;
|
|
550
529
|
};
|
|
551
|
-
}, {
|
|
552
530
|
enabled?: boolean | undefined;
|
|
553
531
|
trigger?: "never" | "on_issues" | "always" | undefined;
|
|
554
|
-
|
|
555
|
-
|
|
532
|
+
}, {
|
|
533
|
+
enabled?: boolean | undefined;
|
|
556
534
|
delivery?: {
|
|
557
535
|
mode?: "pull_request" | "commit" | "comment" | undefined;
|
|
558
536
|
pr_title?: string | undefined;
|
|
559
537
|
label?: string | undefined;
|
|
560
538
|
} | undefined;
|
|
539
|
+
trigger?: "never" | "on_issues" | "always" | undefined;
|
|
561
540
|
}>>;
|
|
562
541
|
}, "strip", z.ZodTypeAny, {
|
|
563
542
|
auto_fix: {
|
|
564
|
-
enabled: boolean;
|
|
565
|
-
trigger: "never" | "on_issues" | "always";
|
|
566
|
-
min_severity: "error" | "warning" | "info";
|
|
567
|
-
fixer: "claude" | "codex" | "same-as-author" | "same-as-reviewer";
|
|
568
543
|
delivery: {
|
|
569
544
|
mode: "pull_request" | "commit" | "comment";
|
|
570
545
|
pr_title: string;
|
|
571
546
|
label: string;
|
|
572
547
|
};
|
|
548
|
+
enabled?: boolean | undefined;
|
|
549
|
+
trigger?: "never" | "on_issues" | "always" | undefined;
|
|
573
550
|
};
|
|
574
551
|
}, {
|
|
575
552
|
auto_fix?: {
|
|
576
553
|
enabled?: boolean | undefined;
|
|
577
|
-
trigger?: "never" | "on_issues" | "always" | undefined;
|
|
578
|
-
min_severity?: "error" | "warning" | "info" | undefined;
|
|
579
|
-
fixer?: "claude" | "codex" | "same-as-author" | "same-as-reviewer" | undefined;
|
|
580
554
|
delivery?: {
|
|
581
555
|
mode?: "pull_request" | "commit" | "comment" | undefined;
|
|
582
556
|
pr_title?: string | undefined;
|
|
583
557
|
label?: string | undefined;
|
|
584
558
|
} | undefined;
|
|
559
|
+
trigger?: "never" | "on_issues" | "always" | undefined;
|
|
585
560
|
} | undefined;
|
|
586
561
|
}>>;
|
|
587
562
|
display: z.ZodDefault<z.ZodObject<{
|
|
@@ -649,6 +624,7 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
649
624
|
custom_prompt?: string | undefined;
|
|
650
625
|
};
|
|
651
626
|
mode: "single-vendor" | "cross-vendor";
|
|
627
|
+
clone_protocol: "ssh" | "https";
|
|
652
628
|
vendors: {
|
|
653
629
|
claude: {
|
|
654
630
|
enabled: boolean;
|
|
@@ -705,15 +681,13 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
705
681
|
};
|
|
706
682
|
post_review: {
|
|
707
683
|
auto_fix: {
|
|
708
|
-
enabled: boolean;
|
|
709
|
-
trigger: "never" | "on_issues" | "always";
|
|
710
|
-
min_severity: "error" | "warning" | "info";
|
|
711
|
-
fixer: "claude" | "codex" | "same-as-author" | "same-as-reviewer";
|
|
712
684
|
delivery: {
|
|
713
685
|
mode: "pull_request" | "commit" | "comment";
|
|
714
686
|
pr_title: string;
|
|
715
687
|
label: string;
|
|
716
688
|
};
|
|
689
|
+
enabled?: boolean | undefined;
|
|
690
|
+
trigger?: "never" | "on_issues" | "always" | undefined;
|
|
717
691
|
};
|
|
718
692
|
};
|
|
719
693
|
display: {
|
|
@@ -741,6 +715,7 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
741
715
|
} | undefined;
|
|
742
716
|
mode?: "single-vendor" | "cross-vendor" | undefined;
|
|
743
717
|
deployment?: "personal" | "team" | undefined;
|
|
718
|
+
clone_protocol?: "ssh" | "https" | undefined;
|
|
744
719
|
vendors?: {
|
|
745
720
|
claude?: {
|
|
746
721
|
enabled?: boolean | undefined;
|
|
@@ -798,14 +773,12 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
798
773
|
post_review?: {
|
|
799
774
|
auto_fix?: {
|
|
800
775
|
enabled?: boolean | undefined;
|
|
801
|
-
trigger?: "never" | "on_issues" | "always" | undefined;
|
|
802
|
-
min_severity?: "error" | "warning" | "info" | undefined;
|
|
803
|
-
fixer?: "claude" | "codex" | "same-as-author" | "same-as-reviewer" | undefined;
|
|
804
776
|
delivery?: {
|
|
805
777
|
mode?: "pull_request" | "commit" | "comment" | undefined;
|
|
806
778
|
pr_title?: string | undefined;
|
|
807
779
|
label?: string | undefined;
|
|
808
780
|
} | undefined;
|
|
781
|
+
trigger?: "never" | "on_issues" | "always" | undefined;
|
|
809
782
|
} | undefined;
|
|
810
783
|
} | undefined;
|
|
811
784
|
display?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/config/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;EAK7B,CAAA;AAIF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;EAElC,CAAA;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;EAI9B,CAAA;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;EAG7B,CAAA;AAEF,eAAO,MAAM,gBAAgB;;;;;;;;;EAG3B,CAAA;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;EA4B9B,CAAA;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;EAG7B,CAAA;AAEF,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AC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAC7D,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAC7D,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AACrE,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AACrE,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAC/D,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAC7D,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA"}
|
package/dist/config/schema.js
CHANGED
|
@@ -74,7 +74,8 @@ export const ImpactConfigSchema = z.object({
|
|
|
74
74
|
});
|
|
75
75
|
export const BacktraceConfigSchema = z.object({
|
|
76
76
|
// Scan for open PRs without a [crosscheck] comment on startup.
|
|
77
|
-
enabled:
|
|
77
|
+
// Off by default — pass --backtrace (watch/serve) or set enabled: true in config to opt in.
|
|
78
|
+
enabled: z.boolean().default(false),
|
|
78
79
|
});
|
|
79
80
|
export const PostReviewDeliverySchema = z.object({
|
|
80
81
|
// pull_request → opens a fix PR targeting the original branch (human approves before merge)
|
|
@@ -84,19 +85,15 @@ export const PostReviewDeliverySchema = z.object({
|
|
|
84
85
|
pr_title: z.string().default('fix: address CR issues in #{original_pr_title}'),
|
|
85
86
|
label: z.string().default('cr-autofix'),
|
|
86
87
|
});
|
|
88
|
+
// Trigger conditions, vendor selection, and step sequencing are all defined in
|
|
89
|
+
// workflow.yml (type, when, reviewer). This schema retains only the delivery
|
|
90
|
+
// mechanism — how fixes land on the PR — which is operational config, not pipeline logic.
|
|
87
91
|
export const PostReviewFixSchema = z.object({
|
|
88
|
-
enabled: z.boolean().default(false),
|
|
89
|
-
// on_issues → only run when the reviewer found actionable issues
|
|
90
|
-
// always → always run after every review
|
|
91
|
-
// never → disable (same as enabled: false)
|
|
92
|
-
trigger: z.enum(['on_issues', 'always', 'never']).default('on_issues'),
|
|
93
|
-
// minimum severity level that qualifies as "actionable"
|
|
94
|
-
min_severity: z.enum(['error', 'warning', 'info']).default('warning'),
|
|
95
|
-
// same-as-author → the vendor that wrote the PR also fixes it (recommended)
|
|
96
|
-
// same-as-reviewer → the reviewing vendor also proposes fixes
|
|
97
|
-
// codex / claude → always use a specific vendor
|
|
98
|
-
fixer: z.enum(['same-as-author', 'same-as-reviewer', 'codex', 'claude']).default('same-as-author'),
|
|
99
92
|
delivery: PostReviewDeliverySchema.default({}),
|
|
93
|
+
// Migration compat: honored with a deprecation warning but no longer the control plane.
|
|
94
|
+
// Remove these from config and use workflow.yml to control when fix steps run.
|
|
95
|
+
enabled: z.boolean().optional(),
|
|
96
|
+
trigger: z.enum(['on_issues', 'always', 'never']).optional(),
|
|
100
97
|
});
|
|
101
98
|
export const PostReviewConfigSchema = z.object({
|
|
102
99
|
auto_fix: PostReviewFixSchema.default({}),
|
|
@@ -122,6 +119,12 @@ export const ConfigSchema = z.object({
|
|
|
122
119
|
// Absent = not yet configured; watch/serve will prompt on first run.
|
|
123
120
|
deployment: z.enum(['personal', 'team']).optional(),
|
|
124
121
|
mode: z.enum(['single-vendor', 'cross-vendor']).default('cross-vendor'),
|
|
122
|
+
// How crosscheck clones PR repos for review.
|
|
123
|
+
// ssh — git@github.com:owner/repo.git (uses local SSH keys)
|
|
124
|
+
// https — https://github.com/owner/repo.git (uses GitHub token via gh credential helper)
|
|
125
|
+
// Pick https if you have multi-account SSH setup or your default SSH key cannot
|
|
126
|
+
// access target repos. Independent of `gh config get git_protocol`.
|
|
127
|
+
clone_protocol: z.enum(['ssh', 'https']).default('ssh'),
|
|
125
128
|
vendors: z.object({
|
|
126
129
|
codex: CodexVendorConfigSchema.default({}),
|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CAAC,OAAO,CAAC,EAAE,CAAC;QAC1C,MAAM,EAAE,kBAAkB,CAAC,OAAO,CAAC,EAAE,CAAC;KACvC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IACd,OAAO,EAAE,mBAAmB,CAAC,OAAO,CAAC,EAAE,CAAC;IACxC,MAAM,EAAE,kBAAkB,CAAC,OAAO,CAAC,EAAE,CAAC;IACtC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IACrC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IACtC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IAC5C,OAAO,EAAE,mBAAmB,CAAC,OAAO,CAAC,EAAE,CAAC;IACxC,MAAM,EAAE,kBAAkB,CAAC,OAAO,CAAC,EAAE,CAAC;IACtC,MAAM,EAAE,kBAAkB,CAAC,OAAO,CAAC,EAAE,CAAC;IACtC,IAAI,EAAE,gBAAgB,CAAC,OAAO,CAAC,EAAE,CAAC;IAClC,MAAM,EAAE,kBAAkB,CAAC,OAAO,CAAC,EAAE,CAAC;IACtC,SAAS,EAAE,qBAAqB,CAAC,OAAO,CAAC,EAAE,CAAC;IAC5C,WAAW,EAAE,sBAAsB,CAAC,OAAO,CAAC,EAAE,CAAC;IAC/C,OAAO,EAAE,mBAAmB,CAAC,OAAO,CAAC,EAAE,CAAC;IACxC,KAAK,EAAE,iBAAiB,CAAC,OAAO,CAAC,EAAE,CAAC;CACrC,CAAC,CAAA"}
|
package/dist/lib/board.d.ts
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import type { Config } from '../config/schema.js';
|
|
2
2
|
import type { WorkflowStep } from './workflow.js';
|
|
3
|
+
export type PRPhase = 'queued' | 'reviewing' | 'reviewed' | 'fixing' | 'fixed' | 'rechecking' | 'rechecked';
|
|
3
4
|
export interface PRUpdate {
|
|
4
5
|
label?: string;
|
|
5
6
|
prLoc?: number;
|
|
7
|
+
phase?: PRPhase;
|
|
6
8
|
verdict?: string | null;
|
|
7
9
|
commentCount?: number;
|
|
8
10
|
fixCount?: number;
|
|
11
|
+
recheckVerdict?: string | null;
|
|
9
12
|
}
|
|
10
13
|
export interface PRCompletionData {
|
|
11
14
|
elapsedMs: number;
|
|
@@ -48,6 +51,10 @@ export declare class PRBoard {
|
|
|
48
51
|
private uptime;
|
|
49
52
|
private statsRow;
|
|
50
53
|
private renderPRSlot;
|
|
54
|
+
private phaseLine1Label;
|
|
55
|
+
private renderCRSection;
|
|
56
|
+
private renderFixSection;
|
|
57
|
+
private renderRecheckSection;
|
|
51
58
|
private render;
|
|
52
59
|
private redraw;
|
|
53
60
|
}
|
package/dist/lib/board.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"board.d.ts","sourceRoot":"","sources":["../../src/lib/board.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAgB,MAAM,qBAAqB,CAAA;AAC/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"board.d.ts","sourceRoot":"","sources":["../../src/lib/board.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAgB,MAAM,qBAAqB,CAAA;AAC/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAIjD,MAAM,MAAM,OAAO,GACf,QAAQ,GACR,WAAW,GACX,UAAU,GACV,QAAQ,GACR,OAAO,GACP,YAAY,GACZ,WAAW,CAAA;AAqCf,MAAM,WAAW,QAAQ;IACvB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,OAAO,CAAC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IAAI,EAAE,gBAAgB,GAAG,IAAI;IAiErD,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAUxC,mEAAmE;IACnE,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI;IAKxC,+EAA+E;IAC/E,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAQnC,OAAO,CAAC,WAAW;IAKnB,OAAO,CAAC,kBAAkB;IAO1B,OAAO,CAAC,SAAS;IAUjB,OAAO,CAAC,SAAS;IAUjB,OAAO,CAAC,YAAY;IAQpB,OAAO,CAAC,QAAQ;IAOhB,OAAO,CAAC,SAAS;IASjB,OAAO,CAAC,MAAM;IASd,OAAO,CAAC,QAAQ;IAWhB,OAAO,CAAC,YAAY;IAuCpB,OAAO,CAAC,eAAe;IAavB,OAAO,CAAC,eAAe;IAiBvB,OAAO,CAAC,gBAAgB;IAcxB,OAAO,CAAC,oBAAoB;IAqB5B,OAAO,CAAC,MAAM;IAwEd,OAAO,CAAC,MAAM;CAIf"}
|
package/dist/lib/board.js
CHANGED
|
@@ -158,7 +158,7 @@ export class PRBoard {
|
|
|
158
158
|
this.eraseLive();
|
|
159
159
|
}
|
|
160
160
|
addPR(key, prNumber, repo, branch) {
|
|
161
|
-
this.slots.set(key, { prNumber, repo, branch, label: 'cloning...', startedAt: Date.now() });
|
|
161
|
+
this.slots.set(key, { prNumber, repo, branch, label: 'cloning...', startedAt: Date.now(), phase: 'queued' });
|
|
162
162
|
this.stats.prsReceived++;
|
|
163
163
|
}
|
|
164
164
|
updatePR(key, updates) {
|
|
@@ -169,54 +169,73 @@ export class PRBoard {
|
|
|
169
169
|
slot.label = updates.label;
|
|
170
170
|
if (updates.prLoc !== undefined)
|
|
171
171
|
slot.prLoc = updates.prLoc;
|
|
172
|
+
if (updates.phase !== undefined)
|
|
173
|
+
slot.phase = updates.phase;
|
|
172
174
|
if (updates.verdict !== undefined)
|
|
173
175
|
slot.verdict = updates.verdict;
|
|
174
176
|
if (updates.commentCount !== undefined)
|
|
175
177
|
slot.commentCount = updates.commentCount;
|
|
176
178
|
if (updates.fixCount !== undefined)
|
|
177
179
|
slot.fixCount = updates.fixCount;
|
|
180
|
+
if (updates.recheckVerdict !== undefined)
|
|
181
|
+
slot.recheckVerdict = updates.recheckVerdict;
|
|
178
182
|
}
|
|
179
183
|
completePR(key, data) {
|
|
180
184
|
const slot = this.slots.get(key);
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
185
|
+
if (!slot)
|
|
186
|
+
return;
|
|
187
|
+
// Mark as completed — kept in slots map for 5-second live-block retention
|
|
188
|
+
slot.completedAt = Date.now();
|
|
189
|
+
slot.label = 'done';
|
|
190
|
+
const verdict = slot.verdict ?? null;
|
|
191
|
+
const commentCount = slot.commentCount ?? 0;
|
|
192
|
+
const fixCount = slot.fixCount;
|
|
193
|
+
// Count completed CRs regardless of whether verdict was parseable
|
|
194
|
+
if (verdict !== null || slot.phase === 'reviewed' || slot.phase === 'rechecked' || slot.phase === 'fixed') {
|
|
187
195
|
this.stats.crsCompleted++;
|
|
188
196
|
this.stats.crTotalMs += data.elapsedMs;
|
|
189
197
|
}
|
|
190
|
-
if (fixCount > 0)
|
|
198
|
+
if (fixCount !== undefined && fixCount > 0)
|
|
191
199
|
this.stats.fixesApplied++;
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
200
|
+
const t = this.theme;
|
|
201
|
+
const ts = fmtTime();
|
|
202
|
+
const indent = ' '.repeat(FMT_TIME_WIDTH + 2);
|
|
203
|
+
const elapsed = `(${Math.round(data.elapsedMs / 1000)}s)`;
|
|
204
|
+
// line 1 — use recheck verdict for badge when available
|
|
205
|
+
const finalVerdict = slot.recheckVerdict !== undefined ? slot.recheckVerdict : verdict;
|
|
206
|
+
const badge = this.verdictBadge(finalVerdict);
|
|
207
|
+
const branch = truncate(slot.branch, 22);
|
|
208
|
+
const line1 = `${t.dim(ts)} ${badge} #${slot.prNumber} ${chalk.dim(slot.repo)} ${t.dim(branch)} ${t.dim(elapsed)} ${t.dim('→')} ${t.accent(data.url)}`;
|
|
209
|
+
// line 2 — always shown: PR | CR | Fix pipeline summary
|
|
210
|
+
const pipe = chalk.dim(' | ');
|
|
211
|
+
const hasFixStep = this.steps.some(s => s.type === 'fix');
|
|
212
|
+
const prSection = slot.prLoc !== undefined
|
|
213
|
+
? `PR ${makeBar(locToFilled(slot.prLoc), 10, t.barPRFill, t.barEmpty)} ${t.dim(String(slot.prLoc) + 'loc')}`
|
|
214
|
+
: `PR ${makeBar(0, 10, t.barPRFill, t.barEmpty)} ${t.dim('—')}`;
|
|
215
|
+
let crSection;
|
|
216
|
+
if (verdict !== null) {
|
|
217
|
+
const crFill = this.crFillFn(verdict);
|
|
218
|
+
const crLabel = this.crLabelFn(verdict);
|
|
219
|
+
crSection = `CR ${makeBar(commentCountToFilled(commentCount), 8, crFill, t.barEmpty)} ${crLabel(`${commentCount} issues (${verdict})`)}`;
|
|
220
|
+
}
|
|
221
|
+
else {
|
|
222
|
+
crSection = `CR ${makeBar(0, 8, t.barEmpty, t.barEmpty)} ${t.warning('⚠ no verdict')}`;
|
|
223
|
+
}
|
|
224
|
+
let fixSection;
|
|
225
|
+
if (!hasFixStep) {
|
|
226
|
+
fixSection = `Fix ${t.dim('—')}`;
|
|
227
|
+
}
|
|
228
|
+
else if (fixCount !== undefined && fixCount > 0) {
|
|
229
|
+
fixSection = `Fix ${makeBar(fixCountToFilled(fixCount), 6, t.barFixFill, t.barEmpty)} ${t.accent(String(fixCount) + ' applied')}`;
|
|
230
|
+
}
|
|
231
|
+
else {
|
|
232
|
+
fixSection = `Fix ${makeBar(0, 6, t.barFixFill, t.barEmpty)} ${t.dim('—')}`;
|
|
233
|
+
}
|
|
234
|
+
this.printStatic(`\n${line1}\n${indent}${prSection}${pipe}${crSection}${pipe}${fixSection}`);
|
|
235
|
+
// In non-TTY mode render() never runs, so purge the slot here instead of
|
|
236
|
+
// relying on the render loop's 5-second cleanup.
|
|
237
|
+
if (!this.isTTY) {
|
|
238
|
+
this.slots.delete(key);
|
|
220
239
|
}
|
|
221
240
|
}
|
|
222
241
|
failPR(key, error) {
|
|
@@ -317,37 +336,111 @@ export class PRBoard {
|
|
|
317
336
|
renderPRSlot(slot, frame) {
|
|
318
337
|
const t = this.theme;
|
|
319
338
|
const w = process.stdout.columns || 80;
|
|
320
|
-
const
|
|
321
|
-
const
|
|
322
|
-
|
|
339
|
+
const isCompleted = slot.completedAt !== undefined;
|
|
340
|
+
const totalElapsedMs = isCompleted
|
|
341
|
+
? slot.completedAt - slot.startedAt
|
|
342
|
+
: Date.now() - slot.startedAt;
|
|
343
|
+
const eSuffix = `${Math.floor(totalElapsedMs / 1000)}s`;
|
|
344
|
+
// ── Line 1: identity <pad> elapsed phase-label ─────────────────────────
|
|
323
345
|
const branch = truncate(slot.branch, 22);
|
|
324
|
-
const
|
|
325
|
-
const
|
|
326
|
-
const
|
|
327
|
-
|
|
328
|
-
|
|
346
|
+
const icon = isCompleted ? t.success('✓') : t.spinner(frame);
|
|
347
|
+
const phaseLabel = this.phaseLine1Label(slot, frame);
|
|
348
|
+
const rightPart = `${t.dim(eSuffix)} ${phaseLabel}`;
|
|
349
|
+
const identityPlain = ` #${slot.prNumber} ${slot.repo} ${branch}`;
|
|
350
|
+
const l1Pad = Math.max(2, w - stripAnsi(identityPlain).length - stripAnsi(rightPart).length - 2);
|
|
351
|
+
const prNum = isCompleted ? t.dim(`#${slot.prNumber}`) : chalk.bold(`#${slot.prNumber}`);
|
|
352
|
+
const repoStr = isCompleted ? t.dim(slot.repo) : chalk.white(slot.repo);
|
|
353
|
+
const l1 = ` ${icon} ${prNum} ${repoStr} ${t.dim(branch)}` +
|
|
354
|
+
' '.repeat(l1Pad) + rightPart;
|
|
355
|
+
// ── Line 2: PR | CR | Fix | Recheck pipeline ────────────────────────────────
|
|
329
356
|
const indent = ' ';
|
|
330
357
|
const pipe = t.dim(' | ');
|
|
331
358
|
const prSection = slot.prLoc !== undefined
|
|
332
359
|
? `PR ${makeBar(locToFilled(slot.prLoc), 10, t.barPRFill, t.barEmpty)} ${t.dim(String(slot.prLoc) + 'loc')}`
|
|
333
360
|
: `PR ${makeBar(0, 10, t.barPRFill, t.barEmpty)} ${t.dim('—')}`;
|
|
334
|
-
const crSection = (slot
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
361
|
+
const crSection = this.renderCRSection(slot, frame);
|
|
362
|
+
const fixSection = this.renderFixSection(slot, frame);
|
|
363
|
+
const recheckSection = this.renderRecheckSection(slot, frame);
|
|
364
|
+
const parts = [prSection, crSection, fixSection];
|
|
365
|
+
if (recheckSection !== null)
|
|
366
|
+
parts.push(recheckSection);
|
|
367
|
+
return `${l1}\n${indent}${parts.join(pipe)}`;
|
|
368
|
+
}
|
|
369
|
+
phaseLine1Label(slot, frame) {
|
|
370
|
+
const t = this.theme;
|
|
371
|
+
if (slot.completedAt !== undefined)
|
|
372
|
+
return t.dim('done');
|
|
373
|
+
switch (slot.phase) {
|
|
374
|
+
case 'reviewing':
|
|
375
|
+
case 'rechecking':
|
|
376
|
+
case 'fixing':
|
|
377
|
+
return `${t.spinner(frame)} ${t.dim(slot.label)}`;
|
|
378
|
+
default:
|
|
379
|
+
return t.dim(slot.label);
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
renderCRSection(slot, frame) {
|
|
383
|
+
const t = this.theme;
|
|
384
|
+
if (slot.phase === 'reviewing') {
|
|
385
|
+
return `CR ${makeBar(0, 8, t.barPRFill, t.barEmpty)} ${t.spinner(frame)} ${t.dim('reviewing…')}`;
|
|
386
|
+
}
|
|
387
|
+
if (slot.verdict === undefined) {
|
|
388
|
+
return `CR ${makeBar(0, 8, t.barPRFill, t.barEmpty)} ${t.dim('queued')}`;
|
|
389
|
+
}
|
|
390
|
+
if (slot.verdict === null) {
|
|
391
|
+
return `CR ${makeBar(0, 8, t.barEmpty, t.barEmpty)} ${t.warning('⚠ no verdict')}`;
|
|
392
|
+
}
|
|
393
|
+
const crFill = this.crFillFn(slot.verdict);
|
|
394
|
+
const crLabel = this.crLabelFn(slot.verdict);
|
|
395
|
+
const count = slot.commentCount ?? 0;
|
|
396
|
+
return `CR ${makeBar(commentCountToFilled(count), 8, crFill, t.barEmpty)} ${crLabel(`${count} issues (${slot.verdict})`)}`;
|
|
397
|
+
}
|
|
398
|
+
renderFixSection(slot, frame) {
|
|
399
|
+
const t = this.theme;
|
|
400
|
+
const hasFixStep = this.steps.some(s => s.type === 'fix');
|
|
401
|
+
if (!hasFixStep)
|
|
402
|
+
return `Fix ${t.dim('—')}`;
|
|
403
|
+
if (slot.phase === 'fixing') {
|
|
404
|
+
return `Fix ${makeBar(0, 6, t.barFixFill, t.barEmpty)} ${t.spinner(frame)} ${t.dim('applying…')}`;
|
|
405
|
+
}
|
|
406
|
+
if (slot.fixCount !== undefined) {
|
|
407
|
+
if (slot.fixCount === 0)
|
|
408
|
+
return `Fix ${makeBar(0, 6, t.barFixFill, t.barEmpty)} ${t.dim('— skipped')}`;
|
|
409
|
+
return `Fix ${makeBar(fixCountToFilled(slot.fixCount), 6, t.barFixFill, t.barEmpty)} ${t.success('✓')} ${t.accent(String(slot.fixCount) + ' applied')}`;
|
|
410
|
+
}
|
|
411
|
+
return `Fix ${makeBar(0, 6, t.barFixFill, t.barEmpty)} ${t.dim('queued')}`;
|
|
412
|
+
}
|
|
413
|
+
renderRecheckSection(slot, frame) {
|
|
414
|
+
const t = this.theme;
|
|
415
|
+
const hasRecheckStep = this.steps.some(s => s.type === 'recheck');
|
|
416
|
+
if (!hasRecheckStep)
|
|
417
|
+
return null;
|
|
418
|
+
if (slot.phase === 'rechecking') {
|
|
419
|
+
return `Recheck ${makeBar(0, 5, t.barPRFill, t.barEmpty)} ${t.spinner(frame)} ${t.dim('reviewing…')}`;
|
|
420
|
+
}
|
|
421
|
+
if (slot.phase === 'rechecked') {
|
|
422
|
+
if (slot.recheckVerdict === undefined) {
|
|
423
|
+
return `Recheck ${makeBar(0, 5, t.barFixFill, t.barEmpty)} ${t.dim('— skipped')}`;
|
|
424
|
+
}
|
|
425
|
+
if (slot.recheckVerdict === null) {
|
|
426
|
+
return `Recheck ${makeBar(0, 5, t.barEmpty, t.barEmpty)} ${t.warning('⚠ no verdict')}`;
|
|
427
|
+
}
|
|
428
|
+
const fill = this.crFillFn(slot.recheckVerdict);
|
|
429
|
+
const label = this.crLabelFn(slot.recheckVerdict);
|
|
430
|
+
return `Recheck ${makeBar(0, 5, fill, t.barEmpty)} ${label(slot.recheckVerdict)}`;
|
|
431
|
+
}
|
|
432
|
+
return `Recheck ${makeBar(0, 5, t.barPRFill, t.barEmpty)} ${t.dim('queued')}`;
|
|
347
433
|
}
|
|
348
434
|
render() {
|
|
349
435
|
if (!this.config)
|
|
350
436
|
return '';
|
|
437
|
+
// Clean up completed slots past the 5-second retention window
|
|
438
|
+
const now = Date.now();
|
|
439
|
+
for (const [key, slot] of this.slots) {
|
|
440
|
+
if (slot.completedAt !== undefined && now - slot.completedAt > 5000) {
|
|
441
|
+
this.slots.delete(key);
|
|
442
|
+
}
|
|
443
|
+
}
|
|
351
444
|
const cfg = this.config;
|
|
352
445
|
const t = this.theme;
|
|
353
446
|
const w = process.stdout.columns || 80;
|