@oss-autopilot/core 3.38.0 → 3.39.0
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/cli-registry.js +7 -4
- package/dist/cli.bundle.cjs +139 -132
- package/dist/commands/daily-dismiss-filter.d.ts +37 -0
- package/dist/commands/daily-dismiss-filter.js +80 -0
- package/dist/commands/daily-merged-pr-notes.d.ts +27 -0
- package/dist/commands/daily-merged-pr-notes.js +166 -0
- package/dist/commands/daily-reviewed-prs.d.ts +41 -0
- package/dist/commands/daily-reviewed-prs.js +270 -0
- package/dist/commands/daily-warnings.d.ts +28 -0
- package/dist/commands/daily-warnings.js +37 -0
- package/dist/commands/daily.d.ts +22 -1
- package/dist/commands/daily.js +287 -107
- package/dist/commands/dashboard-cache.js +9 -2
- package/dist/commands/dashboard-data.js +40 -20
- package/dist/commands/dashboard-gist-sync.d.ts +4 -0
- package/dist/commands/dashboard-gist-sync.js +5 -1
- package/dist/commands/dismiss.d.ts +25 -5
- package/dist/commands/dismiss.js +38 -10
- package/dist/commands/overnight.js +14 -1
- package/dist/commands/scout-bridge.js +4 -1
- package/dist/commands/validation.d.ts +11 -0
- package/dist/commands/validation.js +16 -0
- package/dist/core/checklist-analysis.js +34 -0
- package/dist/core/closed-pr-status.d.ts +73 -0
- package/dist/core/closed-pr-status.js +113 -0
- package/dist/core/comment-decision.d.ts +10 -3
- package/dist/core/comment-decision.js +13 -5
- package/dist/core/comment-utils.d.ts +38 -1
- package/dist/core/comment-utils.js +124 -1
- package/dist/core/concurrency.d.ts +6 -0
- package/dist/core/concurrency.js +13 -0
- package/dist/core/daily-logic.d.ts +13 -1
- package/dist/core/daily-logic.js +59 -2
- package/dist/core/engaged-issues.d.ts +93 -0
- package/dist/core/engaged-issues.js +183 -0
- package/dist/core/errors.d.ts +4 -0
- package/dist/core/errors.js +10 -0
- package/dist/core/github-stats.d.ts +10 -0
- package/dist/core/github-stats.js +35 -0
- package/dist/core/index.d.ts +10 -5
- package/dist/core/index.js +9 -4
- package/dist/core/issue-conversation.d.ts +83 -12
- package/dist/core/issue-conversation.js +306 -118
- package/dist/core/merged-pr-notes.d.ts +192 -0
- package/dist/core/merged-pr-notes.js +340 -0
- package/dist/core/pr-assembly.js +3 -0
- package/dist/core/pr-monitor.d.ts +62 -0
- package/dist/core/pr-monitor.js +113 -3
- package/dist/core/reviewed-prs-fetch.d.ts +91 -0
- package/dist/core/reviewed-prs-fetch.js +271 -0
- package/dist/core/reviewed-prs.d.ts +244 -0
- package/dist/core/reviewed-prs.js +380 -0
- package/dist/core/state-persistence.js +4 -23
- package/dist/core/state-schema.d.ts +6 -0
- package/dist/core/state-schema.js +9 -0
- package/dist/core/state.d.ts +70 -8
- package/dist/core/state.js +101 -10
- package/dist/core/types.d.ts +47 -0
- package/dist/core/urls.d.ts +13 -0
- package/dist/core/urls.js +16 -0
- package/dist/formatters/json.d.ts +186 -1
- package/dist/formatters/json.js +78 -0
- package/package.json +1 -1
|
@@ -8,6 +8,9 @@ import type { FetchedPR, DailyDigest, AgentState, RepoGroup, CommentedIssue, She
|
|
|
8
8
|
import type { ContributionStats } from '../core/stats.js';
|
|
9
9
|
import type { RepoCapStatus } from '../core/repo-cap.js';
|
|
10
10
|
import type { PRCheckFailure } from '../core/pr-monitor.js';
|
|
11
|
+
import type { ClosedPRStatusUpdate } from '../core/closed-pr-status.js';
|
|
12
|
+
import type { MergedPRNotes } from '../core/merged-pr-notes.js';
|
|
13
|
+
import type { ReviewedPRFollowUp } from '../core/reviewed-prs.js';
|
|
11
14
|
import type { CIFormatterDiagnosis, FormatterDetectionResult } from '../core/formatter-detection.js';
|
|
12
15
|
import type { IssueAvailabilityVerdict, IssueVerification, VerifiedLinkedPR } from '../core/issue-verification.js';
|
|
13
16
|
export type ErrorCode = 'AUTH_REQUIRED' | 'RATE_LIMITED' | 'VALIDATION' | 'CONFIGURATION' | 'NETWORK' | 'NOT_FOUND' | 'STATE_CORRUPTED' | 'CONCURRENCY' | 'UNKNOWN';
|
|
@@ -67,7 +70,7 @@ export interface CompactRepoGroup {
|
|
|
67
70
|
* See `DailyWarning` and issue #1042 for the rationale — keeping this a
|
|
68
71
|
* fixed union so downstream consumers can switch on it without drift.
|
|
69
72
|
*/
|
|
70
|
-
export type DailyWarningPhase = 'fetch' | 'repo-scores' | 'analytics' | 'merge-loop' | 'partition' | 'dismiss-filter' | 'gist-init' | 'gist-checkpoint' | 'gist-staleness' | 'state-load';
|
|
73
|
+
export type DailyWarningPhase = 'fetch' | 'repo-scores' | 'analytics' | 'merge-loop' | 'partition' | 'dismiss-filter' | 'gist-init' | 'gist-checkpoint' | 'gist-staleness' | 'state-load' | 'closed-pr-status' | 'merged-pr-notes' | 'reviewed-prs';
|
|
71
74
|
/**
|
|
72
75
|
* A single non-fatal failure surfaced from the `daily` pipeline. Unlike
|
|
73
76
|
* `PRCheckFailure` (which is scoped to per-PR fetch errors), this covers
|
|
@@ -153,6 +156,35 @@ export interface DailyOutput {
|
|
|
153
156
|
* at least one unextracted merge; see {@link PendingLearnings}.
|
|
154
157
|
*/
|
|
155
158
|
pendingLearnings?: PendingLearnings;
|
|
159
|
+
/**
|
|
160
|
+
* Closed-unmerged PRs whose linked issue has not heard from the user since
|
|
161
|
+
* the close (#1863). Drives the `closed_pr_status` action-menu item; the
|
|
162
|
+
* workflow drafts a status comment per entry through draft-review-post.
|
|
163
|
+
* Present only when at least one entry exists, so merge-free runs and
|
|
164
|
+
* goldens are unchanged. See {@link ClosedPRStatusUpdate}.
|
|
165
|
+
*/
|
|
166
|
+
closedPRStatusUpdates?: ClosedPRStatusUpdate[];
|
|
167
|
+
/**
|
|
168
|
+
* Recently merged PRs carrying maintainer notes (thanks, a follow-up, a
|
|
169
|
+
* commit pushed on top) the user has not answered (#1861). Drives the
|
|
170
|
+
* `merged_pr_notes` action-menu item; the workflow classifies each note
|
|
171
|
+
* and drafts a reply through draft-review-post. Note excerpts are fenced
|
|
172
|
+
* as untrusted GitHub content. Present only when at least one entry
|
|
173
|
+
* exists, so merge-free runs and goldens are unchanged. See
|
|
174
|
+
* {@link MergedPRNotes}.
|
|
175
|
+
*/
|
|
176
|
+
mergedPRNotes?: MergedPRNotes[];
|
|
177
|
+
/**
|
|
178
|
+
* Open PRs the user reviewed (not authored) where the author pushed or
|
|
179
|
+
* replied since the user's last review or comment (#1857). Drives the
|
|
180
|
+
* `review_follow_ups` action-menu item; the workflow re-reviews the range
|
|
181
|
+
* (or the commit list when `rebased`) through review-panel and answers the
|
|
182
|
+
* questions through draft-review-post. Excerpts and commit subjects are
|
|
183
|
+
* fenced as untrusted GitHub content. Never counted in capacity or
|
|
184
|
+
* `needsAddressingPRs`. Present only when at least one entry exists, so
|
|
185
|
+
* goldens are unchanged. See {@link ReviewedPRFollowUp}.
|
|
186
|
+
*/
|
|
187
|
+
reviewedPRs?: ReviewedPRFollowUp[];
|
|
156
188
|
}
|
|
157
189
|
/** Work order for the host's background learnings extraction (#1696). */
|
|
158
190
|
export interface PendingLearnings {
|
|
@@ -193,6 +225,12 @@ export interface CompactDailyOutput {
|
|
|
193
225
|
listUpdates?: MergedPRListUpdate[];
|
|
194
226
|
/** Background extraction work order (#1696). See {@link DailyOutput.pendingLearnings}. */
|
|
195
227
|
pendingLearnings?: PendingLearnings;
|
|
228
|
+
/** Closed-PR status nudges (#1863). See {@link DailyOutput.closedPRStatusUpdates}. */
|
|
229
|
+
closedPRStatusUpdates?: ClosedPRStatusUpdate[];
|
|
230
|
+
/** Merged PRs with unanswered maintainer notes (#1861). See {@link DailyOutput.mergedPRNotes}. */
|
|
231
|
+
mergedPRNotes?: MergedPRNotes[];
|
|
232
|
+
/** Reviewed PRs with author activity since the review (#1857). See {@link DailyOutput.reviewedPRs}. */
|
|
233
|
+
reviewedPRs?: ReviewedPRFollowUp[];
|
|
196
234
|
}
|
|
197
235
|
/**
|
|
198
236
|
* Strip a full DailyOutput down to the compact subset (#763).
|
|
@@ -231,6 +269,9 @@ export declare const StatusOutputSchema: z.ZodObject<{
|
|
|
231
269
|
warnings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
232
270
|
phase: z.ZodEnum<{
|
|
233
271
|
fetch: "fetch";
|
|
272
|
+
"merged-pr-notes": "merged-pr-notes";
|
|
273
|
+
"reviewed-prs": "reviewed-prs";
|
|
274
|
+
"closed-pr-status": "closed-pr-status";
|
|
234
275
|
"merge-loop": "merge-loop";
|
|
235
276
|
"repo-scores": "repo-scores";
|
|
236
277
|
analytics: "analytics";
|
|
@@ -365,6 +406,7 @@ export declare const DailyOutputSchema: z.ZodObject<{
|
|
|
365
406
|
url: z.ZodString;
|
|
366
407
|
title: z.ZodString;
|
|
367
408
|
closedAt: z.ZodString;
|
|
409
|
+
issueUrl: z.ZodOptional<z.ZodString>;
|
|
368
410
|
}, z.core.$strip>>;
|
|
369
411
|
recentlyMergedPRs: z.ZodArray<z.ZodObject<{
|
|
370
412
|
number: z.ZodNumber;
|
|
@@ -447,6 +489,9 @@ export declare const DailyOutputSchema: z.ZodObject<{
|
|
|
447
489
|
warnings: z.ZodArray<z.ZodObject<{
|
|
448
490
|
phase: z.ZodEnum<{
|
|
449
491
|
fetch: "fetch";
|
|
492
|
+
"merged-pr-notes": "merged-pr-notes";
|
|
493
|
+
"reviewed-prs": "reviewed-prs";
|
|
494
|
+
"closed-pr-status": "closed-pr-status";
|
|
450
495
|
"merge-loop": "merge-loop";
|
|
451
496
|
"repo-scores": "repo-scores";
|
|
452
497
|
analytics: "analytics";
|
|
@@ -516,6 +561,74 @@ export declare const DailyOutputSchema: z.ZodObject<{
|
|
|
516
561
|
repos: z.ZodArray<z.ZodString>;
|
|
517
562
|
prCount: z.ZodNumber;
|
|
518
563
|
}, z.core.$strip>>;
|
|
564
|
+
closedPRStatusUpdates: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
565
|
+
prUrl: z.ZodString;
|
|
566
|
+
issueUrl: z.ZodString;
|
|
567
|
+
closedAt: z.ZodString;
|
|
568
|
+
}, z.core.$strip>>>;
|
|
569
|
+
mergedPRNotes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
570
|
+
prUrl: z.ZodString;
|
|
571
|
+
repo: z.ZodString;
|
|
572
|
+
number: z.ZodNumber;
|
|
573
|
+
title: z.ZodString;
|
|
574
|
+
mergedAt: z.ZodString;
|
|
575
|
+
notes: z.ZodArray<z.ZodObject<{
|
|
576
|
+
author: z.ZodString;
|
|
577
|
+
createdAt: z.ZodString;
|
|
578
|
+
kind: z.ZodEnum<{
|
|
579
|
+
commit: "commit";
|
|
580
|
+
comment: "comment";
|
|
581
|
+
review: "review";
|
|
582
|
+
review_comment: "review_comment";
|
|
583
|
+
}>;
|
|
584
|
+
excerpt: z.ZodString;
|
|
585
|
+
}, z.core.$strip>>;
|
|
586
|
+
maintainerCommits: z.ZodNumber;
|
|
587
|
+
thanksOnly: z.ZodBoolean;
|
|
588
|
+
ackCoveredBy: z.ZodOptional<z.ZodString>;
|
|
589
|
+
}, z.core.$strip>>>;
|
|
590
|
+
reviewedPRs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
591
|
+
prUrl: z.ZodString;
|
|
592
|
+
repo: z.ZodString;
|
|
593
|
+
number: z.ZodNumber;
|
|
594
|
+
title: z.ZodString;
|
|
595
|
+
author: z.ZodString;
|
|
596
|
+
reviewedAt: z.ZodString;
|
|
597
|
+
reviewedSha: z.ZodOptional<z.ZodString>;
|
|
598
|
+
headSha: z.ZodString;
|
|
599
|
+
compareRange: z.ZodOptional<z.ZodString>;
|
|
600
|
+
compareUrl: z.ZodOptional<z.ZodString>;
|
|
601
|
+
rebased: z.ZodBoolean;
|
|
602
|
+
mergedUpstream: z.ZodBoolean;
|
|
603
|
+
baseUnknown: z.ZodBoolean;
|
|
604
|
+
commits: z.ZodArray<z.ZodObject<{
|
|
605
|
+
sha: z.ZodString;
|
|
606
|
+
author: z.ZodString;
|
|
607
|
+
date: z.ZodString;
|
|
608
|
+
subject: z.ZodString;
|
|
609
|
+
}, z.core.$strip>>;
|
|
610
|
+
moreCommits: z.ZodNumber;
|
|
611
|
+
authorComments: z.ZodNumber;
|
|
612
|
+
questions: z.ZodArray<z.ZodObject<{
|
|
613
|
+
author: z.ZodString;
|
|
614
|
+
createdAt: z.ZodString;
|
|
615
|
+
kind: z.ZodEnum<{
|
|
616
|
+
comment: "comment";
|
|
617
|
+
review: "review";
|
|
618
|
+
review_comment: "review_comment";
|
|
619
|
+
}>;
|
|
620
|
+
reason: z.ZodEnum<{
|
|
621
|
+
reply: "reply";
|
|
622
|
+
quote: "quote";
|
|
623
|
+
mention: "mention";
|
|
624
|
+
}>;
|
|
625
|
+
excerpt: z.ZodString;
|
|
626
|
+
url: z.ZodOptional<z.ZodString>;
|
|
627
|
+
}, z.core.$strip>>;
|
|
628
|
+
moreQuestions: z.ZodNumber;
|
|
629
|
+
latestActivityAt: z.ZodString;
|
|
630
|
+
latestCommentAt: z.ZodOptional<z.ZodString>;
|
|
631
|
+
}, z.core.$strip>>>;
|
|
519
632
|
}, z.core.$strip>;
|
|
520
633
|
export declare const CompactDailyOutputSchema: z.ZodObject<{
|
|
521
634
|
digest: z.ZodObject<{
|
|
@@ -528,6 +641,7 @@ export declare const CompactDailyOutputSchema: z.ZodObject<{
|
|
|
528
641
|
url: z.ZodString;
|
|
529
642
|
title: z.ZodString;
|
|
530
643
|
closedAt: z.ZodString;
|
|
644
|
+
issueUrl: z.ZodOptional<z.ZodString>;
|
|
531
645
|
}, z.core.$strip>>;
|
|
532
646
|
recentlyMergedPRs: z.ZodArray<z.ZodObject<{
|
|
533
647
|
number: z.ZodNumber;
|
|
@@ -605,6 +719,9 @@ export declare const CompactDailyOutputSchema: z.ZodObject<{
|
|
|
605
719
|
warnings: z.ZodArray<z.ZodObject<{
|
|
606
720
|
phase: z.ZodEnum<{
|
|
607
721
|
fetch: "fetch";
|
|
722
|
+
"merged-pr-notes": "merged-pr-notes";
|
|
723
|
+
"reviewed-prs": "reviewed-prs";
|
|
724
|
+
"closed-pr-status": "closed-pr-status";
|
|
608
725
|
"merge-loop": "merge-loop";
|
|
609
726
|
"repo-scores": "repo-scores";
|
|
610
727
|
analytics: "analytics";
|
|
@@ -674,6 +791,74 @@ export declare const CompactDailyOutputSchema: z.ZodObject<{
|
|
|
674
791
|
repos: z.ZodArray<z.ZodString>;
|
|
675
792
|
prCount: z.ZodNumber;
|
|
676
793
|
}, z.core.$strip>>;
|
|
794
|
+
closedPRStatusUpdates: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
795
|
+
prUrl: z.ZodString;
|
|
796
|
+
issueUrl: z.ZodString;
|
|
797
|
+
closedAt: z.ZodString;
|
|
798
|
+
}, z.core.$strip>>>;
|
|
799
|
+
mergedPRNotes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
800
|
+
prUrl: z.ZodString;
|
|
801
|
+
repo: z.ZodString;
|
|
802
|
+
number: z.ZodNumber;
|
|
803
|
+
title: z.ZodString;
|
|
804
|
+
mergedAt: z.ZodString;
|
|
805
|
+
notes: z.ZodArray<z.ZodObject<{
|
|
806
|
+
author: z.ZodString;
|
|
807
|
+
createdAt: z.ZodString;
|
|
808
|
+
kind: z.ZodEnum<{
|
|
809
|
+
commit: "commit";
|
|
810
|
+
comment: "comment";
|
|
811
|
+
review: "review";
|
|
812
|
+
review_comment: "review_comment";
|
|
813
|
+
}>;
|
|
814
|
+
excerpt: z.ZodString;
|
|
815
|
+
}, z.core.$strip>>;
|
|
816
|
+
maintainerCommits: z.ZodNumber;
|
|
817
|
+
thanksOnly: z.ZodBoolean;
|
|
818
|
+
ackCoveredBy: z.ZodOptional<z.ZodString>;
|
|
819
|
+
}, z.core.$strip>>>;
|
|
820
|
+
reviewedPRs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
821
|
+
prUrl: z.ZodString;
|
|
822
|
+
repo: z.ZodString;
|
|
823
|
+
number: z.ZodNumber;
|
|
824
|
+
title: z.ZodString;
|
|
825
|
+
author: z.ZodString;
|
|
826
|
+
reviewedAt: z.ZodString;
|
|
827
|
+
reviewedSha: z.ZodOptional<z.ZodString>;
|
|
828
|
+
headSha: z.ZodString;
|
|
829
|
+
compareRange: z.ZodOptional<z.ZodString>;
|
|
830
|
+
compareUrl: z.ZodOptional<z.ZodString>;
|
|
831
|
+
rebased: z.ZodBoolean;
|
|
832
|
+
mergedUpstream: z.ZodBoolean;
|
|
833
|
+
baseUnknown: z.ZodBoolean;
|
|
834
|
+
commits: z.ZodArray<z.ZodObject<{
|
|
835
|
+
sha: z.ZodString;
|
|
836
|
+
author: z.ZodString;
|
|
837
|
+
date: z.ZodString;
|
|
838
|
+
subject: z.ZodString;
|
|
839
|
+
}, z.core.$strip>>;
|
|
840
|
+
moreCommits: z.ZodNumber;
|
|
841
|
+
authorComments: z.ZodNumber;
|
|
842
|
+
questions: z.ZodArray<z.ZodObject<{
|
|
843
|
+
author: z.ZodString;
|
|
844
|
+
createdAt: z.ZodString;
|
|
845
|
+
kind: z.ZodEnum<{
|
|
846
|
+
comment: "comment";
|
|
847
|
+
review: "review";
|
|
848
|
+
review_comment: "review_comment";
|
|
849
|
+
}>;
|
|
850
|
+
reason: z.ZodEnum<{
|
|
851
|
+
reply: "reply";
|
|
852
|
+
quote: "quote";
|
|
853
|
+
mention: "mention";
|
|
854
|
+
}>;
|
|
855
|
+
excerpt: z.ZodString;
|
|
856
|
+
url: z.ZodOptional<z.ZodString>;
|
|
857
|
+
}, z.core.$strip>>;
|
|
858
|
+
moreQuestions: z.ZodNumber;
|
|
859
|
+
latestActivityAt: z.ZodString;
|
|
860
|
+
latestCommentAt: z.ZodOptional<z.ZodString>;
|
|
861
|
+
}, z.core.$strip>>>;
|
|
677
862
|
}, z.core.$strip>;
|
|
678
863
|
/** Per-repo open-PR cap status (core/repo-cap.ts). */
|
|
679
864
|
export declare const RepoCapStatusSchema: z.ZodObject<{
|
package/dist/formatters/json.js
CHANGED
|
@@ -44,6 +44,9 @@ export function toCompactDailyOutput(output) {
|
|
|
44
44
|
strategySummary: output.strategySummary,
|
|
45
45
|
listUpdates: output.listUpdates,
|
|
46
46
|
pendingLearnings: output.pendingLearnings,
|
|
47
|
+
closedPRStatusUpdates: output.closedPRStatusUpdates,
|
|
48
|
+
mergedPRNotes: output.mergedPRNotes,
|
|
49
|
+
reviewedPRs: output.reviewedPRs,
|
|
47
50
|
};
|
|
48
51
|
}
|
|
49
52
|
/**
|
|
@@ -105,6 +108,9 @@ const DailyWarningPhaseSchema = z.enum([
|
|
|
105
108
|
'gist-checkpoint',
|
|
106
109
|
'gist-staleness',
|
|
107
110
|
'state-load',
|
|
111
|
+
'closed-pr-status',
|
|
112
|
+
'merged-pr-notes',
|
|
113
|
+
'reviewed-prs',
|
|
108
114
|
]);
|
|
109
115
|
const DailyWarningSchema = z.object({
|
|
110
116
|
phase: DailyWarningPhaseSchema,
|
|
@@ -150,6 +156,8 @@ const RecentClosedPRSchema = z.object({
|
|
|
150
156
|
url: z.string(),
|
|
151
157
|
title: z.string(),
|
|
152
158
|
closedAt: z.string(),
|
|
159
|
+
/** Issue the PR closes, parsed from its body (#1824); joins to `closedPRStatusUpdates` (#1863). */
|
|
160
|
+
issueUrl: z.string().optional(),
|
|
153
161
|
});
|
|
154
162
|
const RecentMergedPRSchema = z.object({
|
|
155
163
|
number: z.number(),
|
|
@@ -305,6 +313,70 @@ const MergedPRListUpdateSchema = z.object({
|
|
|
305
313
|
listPath: z.string(),
|
|
306
314
|
repoHeadingStruck: z.boolean(),
|
|
307
315
|
});
|
|
316
|
+
/** Mirrors {@link ClosedPRStatusUpdate} (#1863). */
|
|
317
|
+
const ClosedPRStatusUpdateSchema = z.object({
|
|
318
|
+
prUrl: z.string(),
|
|
319
|
+
issueUrl: z.string(),
|
|
320
|
+
closedAt: z.string(),
|
|
321
|
+
});
|
|
322
|
+
/** Mirrors one entry of `MergedPRNotes.notes` (#1861). */
|
|
323
|
+
const MergedPRNoteSchema = z.object({
|
|
324
|
+
author: z.string(),
|
|
325
|
+
createdAt: z.string(),
|
|
326
|
+
kind: z.enum(['comment', 'review', 'review_comment', 'commit']),
|
|
327
|
+
excerpt: z.string(),
|
|
328
|
+
});
|
|
329
|
+
/** Mirrors {@link MergedPRNotes} (#1861). */
|
|
330
|
+
const MergedPRNotesSchema = z.object({
|
|
331
|
+
prUrl: z.string(),
|
|
332
|
+
repo: z.string(),
|
|
333
|
+
number: z.number(),
|
|
334
|
+
title: z.string(),
|
|
335
|
+
mergedAt: z.string(),
|
|
336
|
+
notes: z.array(MergedPRNoteSchema),
|
|
337
|
+
maintainerCommits: z.number().int().nonnegative(),
|
|
338
|
+
thanksOnly: z.boolean(),
|
|
339
|
+
ackCoveredBy: z.string().optional(),
|
|
340
|
+
});
|
|
341
|
+
/** Mirrors {@link ReviewedPRQuestion} (#1857). */
|
|
342
|
+
const ReviewedPRQuestionSchema = z.object({
|
|
343
|
+
author: z.string(),
|
|
344
|
+
createdAt: z.string(),
|
|
345
|
+
kind: z.enum(['comment', 'review', 'review_comment']),
|
|
346
|
+
reason: z.enum(['reply', 'quote', 'mention']),
|
|
347
|
+
excerpt: z.string(),
|
|
348
|
+
url: z.string().optional(),
|
|
349
|
+
});
|
|
350
|
+
/** Mirrors {@link ReviewedPRCommit} (#1857). */
|
|
351
|
+
const ReviewedPRCommitSchema = z.object({
|
|
352
|
+
sha: z.string(),
|
|
353
|
+
author: z.string(),
|
|
354
|
+
date: z.string(),
|
|
355
|
+
subject: z.string(),
|
|
356
|
+
});
|
|
357
|
+
/** Mirrors {@link ReviewedPRFollowUp} (#1857). */
|
|
358
|
+
const ReviewedPRFollowUpSchema = z.object({
|
|
359
|
+
prUrl: z.string(),
|
|
360
|
+
repo: z.string(),
|
|
361
|
+
number: z.number(),
|
|
362
|
+
title: z.string(),
|
|
363
|
+
author: z.string(),
|
|
364
|
+
reviewedAt: z.string(),
|
|
365
|
+
reviewedSha: z.string().optional(),
|
|
366
|
+
headSha: z.string(),
|
|
367
|
+
compareRange: z.string().optional(),
|
|
368
|
+
compareUrl: z.string().optional(),
|
|
369
|
+
rebased: z.boolean(),
|
|
370
|
+
mergedUpstream: z.boolean(),
|
|
371
|
+
baseUnknown: z.boolean(),
|
|
372
|
+
commits: z.array(ReviewedPRCommitSchema),
|
|
373
|
+
moreCommits: z.number().int().nonnegative(),
|
|
374
|
+
authorComments: z.number().int().nonnegative(),
|
|
375
|
+
questions: z.array(ReviewedPRQuestionSchema),
|
|
376
|
+
moreQuestions: z.number().int().nonnegative(),
|
|
377
|
+
latestActivityAt: z.string(),
|
|
378
|
+
latestCommentAt: z.string().optional(),
|
|
379
|
+
});
|
|
308
380
|
export const DailyOutputSchema = z.object({
|
|
309
381
|
digest: DailyDigestCompactSchema,
|
|
310
382
|
capacity: CapacityAssessmentSchema,
|
|
@@ -320,6 +392,9 @@ export const DailyOutputSchema = z.object({
|
|
|
320
392
|
strategySummary: StrategyResultSchema.nullable().optional(),
|
|
321
393
|
listUpdates: z.array(MergedPRListUpdateSchema).optional(),
|
|
322
394
|
pendingLearnings: PendingLearningsSchema.optional(),
|
|
395
|
+
closedPRStatusUpdates: z.array(ClosedPRStatusUpdateSchema).optional(),
|
|
396
|
+
mergedPRNotes: z.array(MergedPRNotesSchema).optional(),
|
|
397
|
+
reviewedPRs: z.array(ReviewedPRFollowUpSchema).optional(),
|
|
323
398
|
});
|
|
324
399
|
export const CompactDailyOutputSchema = z.object({
|
|
325
400
|
digest: DailyDigestCompactSchema,
|
|
@@ -334,6 +409,9 @@ export const CompactDailyOutputSchema = z.object({
|
|
|
334
409
|
strategySummary: StrategyResultSchema.nullable().optional(),
|
|
335
410
|
listUpdates: z.array(MergedPRListUpdateSchema).optional(),
|
|
336
411
|
pendingLearnings: PendingLearningsSchema.optional(),
|
|
412
|
+
closedPRStatusUpdates: z.array(ClosedPRStatusUpdateSchema).optional(),
|
|
413
|
+
mergedPRNotes: z.array(MergedPRNotesSchema).optional(),
|
|
414
|
+
reviewedPRs: z.array(ReviewedPRFollowUpSchema).optional(),
|
|
337
415
|
});
|
|
338
416
|
// ── Search output schema (#1147) ─────────────────────────────────────
|
|
339
417
|
const SearchPrioritySchema = z.enum(['merged_pr', 'preferred_org', 'starred', 'normal']);
|