@oss-autopilot/core 3.37.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 +134 -127
- package/dist/commands/comments.js +4 -3
- package/dist/commands/config.js +18 -11
- 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 +299 -108
- package/dist/commands/dashboard-cache.js +9 -2
- package/dist/commands/dashboard-data.js +40 -20
- package/dist/commands/dashboard-gist-sync.d.ts +9 -1
- package/dist/commands/dashboard-gist-sync.js +24 -3
- package/dist/commands/dashboard-server.js +9 -5
- package/dist/commands/dismiss.d.ts +25 -5
- package/dist/commands/dismiss.js +40 -11
- package/dist/commands/guidelines.js +21 -14
- package/dist/commands/init.js +3 -2
- package/dist/commands/ledger-backfill.js +4 -3
- package/dist/commands/move.js +9 -6
- package/dist/commands/overnight-push-prep.js +5 -2
- package/dist/commands/overnight.js +62 -24
- package/dist/commands/scout-bridge.js +4 -1
- package/dist/commands/search.js +9 -6
- package/dist/commands/setup.js +7 -3
- package/dist/commands/validation.d.ts +11 -0
- package/dist/commands/validation.js +38 -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 +11 -1
- package/dist/core/eval-report.d.ts +9 -0
- package/dist/core/eval-report.js +4 -0
- package/dist/core/gist-state-store.d.ts +5 -2
- package/dist/core/gist-state-store.js +7 -4
- 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/pick-snapshot.js +1 -1
- 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 +8 -24
- package/dist/core/state-schema.d.ts +6 -0
- package/dist/core/state-schema.js +9 -0
- package/dist/core/state.d.ts +106 -11
- package/dist/core/state.js +246 -24
- 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
package/dist/core/types.d.ts
CHANGED
|
@@ -140,6 +140,24 @@ export interface FetchedPR {
|
|
|
140
140
|
repo: string;
|
|
141
141
|
number: number;
|
|
142
142
|
title: string;
|
|
143
|
+
/**
|
|
144
|
+
* Issue the PR closes, parsed from the first closing keyword in its body
|
|
145
|
+
* (same `closingIssueUrl` the merged/closed ledger uses, #1824). Lets the
|
|
146
|
+
* daily run tell a closed PR that was superseded by a still-open PR on the
|
|
147
|
+
* same issue from one whose work really ended (#1863). Undefined when the
|
|
148
|
+
* body has no closing keyword.
|
|
149
|
+
*/
|
|
150
|
+
issueUrl?: string;
|
|
151
|
+
/**
|
|
152
|
+
* Every issue or PR the title and body mention, closing keyword or not
|
|
153
|
+
* (`#12`, `owner/repo#12`, issue or pull URL), as canonical issue URLs
|
|
154
|
+
* (`mentionedIssueUrls`, #1863). Widens the supersede check: a follow-up
|
|
155
|
+
* PR that says "supersedes #8" or "another take on #12" counts as the
|
|
156
|
+
* successor of a closed PR even without `Fixes #12`. Parsed at assembly
|
|
157
|
+
* time so the daily run needs no extra API calls; empty when nothing is
|
|
158
|
+
* mentioned.
|
|
159
|
+
*/
|
|
160
|
+
mentionedIssueUrls?: string[];
|
|
143
161
|
/** Computed by `determineStatus()` based on the fields below. */
|
|
144
162
|
status: FetchedPRStatus;
|
|
145
163
|
/** Granular reason for needs_addressing status. Undefined when waiting_on_maintainer. */
|
|
@@ -294,17 +312,46 @@ export interface StarFilter {
|
|
|
294
312
|
export declare function isBelowMinStars(stargazersCount: number | undefined, minStars: number): boolean;
|
|
295
313
|
/** Status of a user's comment thread on a GitHub issue. */
|
|
296
314
|
export type IssueConversationStatus = 'new_response' | 'waiting' | 'acknowledged';
|
|
315
|
+
/** How the user is engaged on an issue (#1862), strongest first. */
|
|
316
|
+
export type EngagementReason = 'open_pr' | 'claim' | 'closed_pr' | 'merged_pr';
|
|
317
|
+
/** Why a commented-issue entry was scanned under the engaged rule (#1862). */
|
|
318
|
+
export interface IssueEngagement {
|
|
319
|
+
/** Strongest reason when several apply (open PR, then claim, closed PR, merged PR). */
|
|
320
|
+
reason: EngagementReason;
|
|
321
|
+
/** The PR behind `reason`, for the PR reasons. */
|
|
322
|
+
prUrl?: string;
|
|
323
|
+
/**
|
|
324
|
+
* ISO time of the user's latest engagement step: the claim stamp, or when
|
|
325
|
+
* the PR was opened. Comments at or before it were answered by the
|
|
326
|
+
* engagement itself, so only later ones can be replies to the user. Absent
|
|
327
|
+
* when the PR's opening time is not known (older ledger entries); the
|
|
328
|
+
* user's last comment is the baseline then.
|
|
329
|
+
*/
|
|
330
|
+
since?: string;
|
|
331
|
+
}
|
|
297
332
|
/** Base fields shared by all issue conversation states. */
|
|
298
333
|
interface CommentedIssueBase {
|
|
299
334
|
repo: string;
|
|
300
335
|
number: number;
|
|
301
336
|
title: string;
|
|
302
337
|
url: string;
|
|
338
|
+
/**
|
|
339
|
+
* When the user last spoke on the thread. For an engaged issue the user
|
|
340
|
+
* never commented on, the engagement time (`engagement.since`: the claim
|
|
341
|
+
* or the PR opening) with an empty `userLastCommentBody`.
|
|
342
|
+
*/
|
|
303
343
|
userLastCommentedAt: string;
|
|
304
344
|
/** User's most recent comment body, truncated to 200 chars (+ "..." suffix when truncated). #1290 */
|
|
305
345
|
userLastCommentBody: string;
|
|
306
346
|
labels: string[];
|
|
307
347
|
daysSinceUserComment: number;
|
|
348
|
+
/**
|
|
349
|
+
* Set when the issue was scanned under the engaged rule (#1862): the user
|
|
350
|
+
* claimed it or one of their PRs links it, so any substantive non-bot
|
|
351
|
+
* comment after their last word counts as a reply, not only maintainer or
|
|
352
|
+
* @mention ones. Absent for issues the user only commented on in passing.
|
|
353
|
+
*/
|
|
354
|
+
engagement?: IssueEngagement;
|
|
308
355
|
}
|
|
309
356
|
/** Issue where someone responded after the user's last comment. */
|
|
310
357
|
export interface CommentedIssueWithResponse extends CommentedIssueBase {
|
package/dist/core/urls.d.ts
CHANGED
|
@@ -33,6 +33,19 @@ export interface ParsedGitHubUrl {
|
|
|
33
33
|
* // null
|
|
34
34
|
*/
|
|
35
35
|
export declare function parseGitHubUrl(url: string): ParsedGitHubUrl | null;
|
|
36
|
+
/**
|
|
37
|
+
* Case-insensitive identity of a GitHub issue or PR URL: `owner/repo#number`,
|
|
38
|
+
* lowercased. Trailing slashes, `#fragment`s and `?query`s fall away because
|
|
39
|
+
* only the path segments are read, and `/issues/N` and `/pull/N` map to the
|
|
40
|
+
* same key: a repo has one number space, so a bare `#N` mention names the
|
|
41
|
+
* same object whichever kind it is. Returns null when the URL does not
|
|
42
|
+
* parse (see {@link parseGitHubUrl}).
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* issueRefKey('https://github.com/Org/Repo/issues/5/')
|
|
46
|
+
* // "org/repo#5"
|
|
47
|
+
*/
|
|
48
|
+
export declare function issueRefKey(url: string): string | null;
|
|
36
49
|
/**
|
|
37
50
|
* Extracts the owner and repo from a GitHub web URL
|
|
38
51
|
* (e.g. `https://github.com/owner/repo/pull/42`, `https://github.com/owner/repo/`).
|
package/dist/core/urls.js
CHANGED
|
@@ -58,6 +58,22 @@ export function parseGitHubUrl(url) {
|
|
|
58
58
|
}
|
|
59
59
|
return null;
|
|
60
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* Case-insensitive identity of a GitHub issue or PR URL: `owner/repo#number`,
|
|
63
|
+
* lowercased. Trailing slashes, `#fragment`s and `?query`s fall away because
|
|
64
|
+
* only the path segments are read, and `/issues/N` and `/pull/N` map to the
|
|
65
|
+
* same key: a repo has one number space, so a bare `#N` mention names the
|
|
66
|
+
* same object whichever kind it is. Returns null when the URL does not
|
|
67
|
+
* parse (see {@link parseGitHubUrl}).
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* issueRefKey('https://github.com/Org/Repo/issues/5/')
|
|
71
|
+
* // "org/repo#5"
|
|
72
|
+
*/
|
|
73
|
+
export function issueRefKey(url) {
|
|
74
|
+
const parsed = parseGitHubUrl(url);
|
|
75
|
+
return parsed ? `${parsed.owner.toLowerCase()}/${parsed.repo.toLowerCase()}#${parsed.number}` : null;
|
|
76
|
+
}
|
|
61
77
|
/**
|
|
62
78
|
* Extracts the owner and repo from a GitHub web URL
|
|
63
79
|
* (e.g. `https://github.com/owner/repo/pull/42`, `https://github.com/owner/repo/`).
|
|
@@ -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']);
|