@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.
Files changed (63) hide show
  1. package/dist/cli-registry.js +7 -4
  2. package/dist/cli.bundle.cjs +139 -132
  3. package/dist/commands/daily-dismiss-filter.d.ts +37 -0
  4. package/dist/commands/daily-dismiss-filter.js +80 -0
  5. package/dist/commands/daily-merged-pr-notes.d.ts +27 -0
  6. package/dist/commands/daily-merged-pr-notes.js +166 -0
  7. package/dist/commands/daily-reviewed-prs.d.ts +41 -0
  8. package/dist/commands/daily-reviewed-prs.js +270 -0
  9. package/dist/commands/daily-warnings.d.ts +28 -0
  10. package/dist/commands/daily-warnings.js +37 -0
  11. package/dist/commands/daily.d.ts +22 -1
  12. package/dist/commands/daily.js +287 -107
  13. package/dist/commands/dashboard-cache.js +9 -2
  14. package/dist/commands/dashboard-data.js +40 -20
  15. package/dist/commands/dashboard-gist-sync.d.ts +4 -0
  16. package/dist/commands/dashboard-gist-sync.js +5 -1
  17. package/dist/commands/dismiss.d.ts +25 -5
  18. package/dist/commands/dismiss.js +38 -10
  19. package/dist/commands/overnight.js +14 -1
  20. package/dist/commands/scout-bridge.js +4 -1
  21. package/dist/commands/validation.d.ts +11 -0
  22. package/dist/commands/validation.js +16 -0
  23. package/dist/core/checklist-analysis.js +34 -0
  24. package/dist/core/closed-pr-status.d.ts +73 -0
  25. package/dist/core/closed-pr-status.js +113 -0
  26. package/dist/core/comment-decision.d.ts +10 -3
  27. package/dist/core/comment-decision.js +13 -5
  28. package/dist/core/comment-utils.d.ts +38 -1
  29. package/dist/core/comment-utils.js +124 -1
  30. package/dist/core/concurrency.d.ts +6 -0
  31. package/dist/core/concurrency.js +13 -0
  32. package/dist/core/daily-logic.d.ts +13 -1
  33. package/dist/core/daily-logic.js +59 -2
  34. package/dist/core/engaged-issues.d.ts +93 -0
  35. package/dist/core/engaged-issues.js +183 -0
  36. package/dist/core/errors.d.ts +4 -0
  37. package/dist/core/errors.js +10 -0
  38. package/dist/core/github-stats.d.ts +10 -0
  39. package/dist/core/github-stats.js +35 -0
  40. package/dist/core/index.d.ts +10 -5
  41. package/dist/core/index.js +9 -4
  42. package/dist/core/issue-conversation.d.ts +83 -12
  43. package/dist/core/issue-conversation.js +306 -118
  44. package/dist/core/merged-pr-notes.d.ts +192 -0
  45. package/dist/core/merged-pr-notes.js +340 -0
  46. package/dist/core/pr-assembly.js +3 -0
  47. package/dist/core/pr-monitor.d.ts +62 -0
  48. package/dist/core/pr-monitor.js +113 -3
  49. package/dist/core/reviewed-prs-fetch.d.ts +91 -0
  50. package/dist/core/reviewed-prs-fetch.js +271 -0
  51. package/dist/core/reviewed-prs.d.ts +244 -0
  52. package/dist/core/reviewed-prs.js +380 -0
  53. package/dist/core/state-persistence.js +4 -23
  54. package/dist/core/state-schema.d.ts +6 -0
  55. package/dist/core/state-schema.js +9 -0
  56. package/dist/core/state.d.ts +70 -8
  57. package/dist/core/state.js +101 -10
  58. package/dist/core/types.d.ts +47 -0
  59. package/dist/core/urls.d.ts +13 -0
  60. package/dist/core/urls.js +16 -0
  61. package/dist/formatters/json.d.ts +186 -1
  62. package/dist/formatters/json.js +78 -0
  63. package/package.json +1 -1
@@ -174,6 +174,16 @@ export function getHttpStatusCode(error) {
174
174
  }
175
175
  return undefined;
176
176
  }
177
+ /** `HTTP 404` when the error carries a status, else undefined. */
178
+ export function httpStatusLabel(error) {
179
+ const status = getHttpStatusCode(error);
180
+ return status === undefined ? undefined : `HTTP ${status}`;
181
+ }
182
+ /** Warning text with the HTTP status in front when there is one (`HTTP 502: Bad Gateway`). */
183
+ export function describeError(error) {
184
+ const label = httpStatusLabel(error);
185
+ return label ? `${label}: ${errorMessage(error)}` : errorMessage(error);
186
+ }
177
187
  /** Check if an error is a GitHub rate limit error (429 or rate-limit 403). */
178
188
  export function isRateLimitError(error) {
179
189
  const status = getHttpStatusCode(error);
@@ -15,6 +15,16 @@ export declare const PR_COUNTS_CACHE_TTL_MS: number;
15
15
  * first. Switch to GraphQL `closingIssuesReferences` if that ever matters.
16
16
  */
17
17
  export declare function closingIssueUrl(body: string | null | undefined, prUrl: string): string | undefined;
18
+ /**
19
+ * Every issue or PR a PR's title and body mention (#1863), as canonical issue
20
+ * URLs (`https://github.com/owner/repo/issues/N`). Issues and PRs share one
21
+ * number space per repo, so `/pull/N` folds into the same URL and a bare `#N`
22
+ * resolves against the PR's own repo. Unlike {@link closingIssueUrl} no
23
+ * closing keyword is needed: a follow-up PR that says "supersedes #8" or
24
+ * "alternative approach for #12" links too. Deduplicated, in order of
25
+ * appearance; HTML comments and code are ignored like in `closingIssueUrl`.
26
+ */
27
+ export declare function mentionedIssueUrls(title: string | null | undefined, body: string | null | undefined, prUrl: string): string[];
18
28
  /** Return type shared by both merged and closed PR count functions. */
19
29
  export interface PRCountsResult<R> {
20
30
  repos: Map<string, R>;
@@ -37,6 +37,41 @@ export function closingIssueUrl(body, prUrl) {
37
37
  const target = m[1] ?? m[3] ?? (own && `${own.owner}/${own.repo}`);
38
38
  return target ? `https://github.com/${target}/issues/${m[2] ?? m[4]}` : undefined;
39
39
  }
40
+ /**
41
+ * A github.com issue or pull URL, rewritten to ` owner/repo#N ` before the
42
+ * mention scan so one simple pattern covers both spellings. The padding
43
+ * spaces keep the rewritten form clear of the word boundary rule below.
44
+ */
45
+ const ISSUE_URL_RE = /https:\/\/github\.com\/([\w-]+\/[\w.-]+)\/(?:issues|pull)\/(\d+)\b/g;
46
+ /**
47
+ * `owner/repo#12` or a bare `#12`, closing keyword or not. Owners are GitHub
48
+ * logins (word characters and hyphens, no dots), and the mention must not
49
+ * sit inside a word or path (`C#5`, `example.com/page#5`), mirroring
50
+ * GitHub's autolink rule.
51
+ */
52
+ const ISSUE_MENTION_RE = /(?<![\w/.-])([\w-]+\/[\w.-]+)?#(\d+)\b/g;
53
+ /**
54
+ * Every issue or PR a PR's title and body mention (#1863), as canonical issue
55
+ * URLs (`https://github.com/owner/repo/issues/N`). Issues and PRs share one
56
+ * number space per repo, so `/pull/N` folds into the same URL and a bare `#N`
57
+ * resolves against the PR's own repo. Unlike {@link closingIssueUrl} no
58
+ * closing keyword is needed: a follow-up PR that says "supersedes #8" or
59
+ * "alternative approach for #12" links too. Deduplicated, in order of
60
+ * appearance; HTML comments and code are ignored like in `closingIssueUrl`.
61
+ */
62
+ export function mentionedIssueUrls(title, body, prUrl) {
63
+ const own = extractOwnerRepo(prUrl);
64
+ const text = `${title ?? ''}\n${body?.slice(0, MAX_BODY_CHARS) ?? ''}`
65
+ .replaceAll(NON_PROSE_RE, ' ')
66
+ .replaceAll(ISSUE_URL_RE, ' $1#$2 ');
67
+ const urls = new Set();
68
+ for (const m of text.matchAll(ISSUE_MENTION_RE)) {
69
+ const target = m[1] ?? (own && `${own.owner}/${own.repo}`);
70
+ if (target)
71
+ urls.add(`https://github.com/${target}/issues/${m[2]}`);
72
+ }
73
+ return [...urls];
74
+ }
40
75
  /** Returns an empty PRCountsResult. Used as the fallback when stats fetches fail or username is empty. */
41
76
  export function emptyPRCountsResult() {
42
77
  return { repos: new Map(), monthlyCounts: {}, monthlyOpenedCounts: {}, dailyActivityCounts: {}, searchedPRs: [] };
@@ -2,16 +2,16 @@
2
2
  * Core module exports
3
3
  * Re-exports all core functionality for convenient imports
4
4
  */
5
- export { StateManager, getStateManager, getStateManagerAsync, ensureGistPersistence, bootstrapGistBestEffort, type GistPersistenceStatus, maybeCheckpoint, resetStateManager, type Stats, } from './state.js';
5
+ export { StateManager, getStateManager, getStateManagerAsync, ensureGistPersistence, bootstrapGistBestEffort, type GistPersistenceStatus, maybeCheckpoint, resetStateManager, type Stats, type ReleaseIssueResult, } from './state.js';
6
6
  export { renderGistWarning, type GistHealth, type GistHealthDegradedCause, type GistWarningCause, } from './gist-health.js';
7
7
  export { GistStateStore } from './gist-state-store.js';
8
8
  export { guidelinesFilename, repoFromGuidelinesFilename, GUIDELINES_FILE_PREFIX, GUIDELINES_MAX_BYTES, GuidelinesNotAvailableError, GuidelinesTooLargeError, } from './guidelines-store.js';
9
9
  export { PRMonitor, type PRCheckFailure, type FetchPRsResult, computeDisplayLabel, classifyCICheck, classifyFailingChecks, } from './pr-monitor.js';
10
- export { IssueConversationMonitor } from './issue-conversation.js';
11
- export { isBotAuthor, isAcknowledgmentComment } from './comment-utils.js';
10
+ export { IssueConversationMonitor, MAX_DIRECT_ENGAGED_FETCHES, type FetchCommentedIssuesOptions, type FetchCommentedIssuesResult, } from './issue-conversation.js';
11
+ export { isBotAuthor, isAcknowledgmentComment, isReactionOnlyComment, isQuoteReplyTo, isStatusNudge, } from './comment-utils.js';
12
12
  export { wrapUntrustedContent, fenceFetchedPR, fenceFetchedPRTitles, labelGuidelinesContent, GUIDELINES_PROVENANCE_NOTE, extractFromFence, safeExtractFromFence, UNTRUSTED_OPEN_TAG_NAME, UNTRUSTED_CLOSE_TAG, type UntrustedContentMeta, } from './untrusted-content.js';
13
13
  export { getOctokit, checkRateLimit, type RateLimitInfo } from './github.js';
14
- export { parseGitHubUrl, splitRepo, isOwnRepo } from './urls.js';
14
+ export { parseGitHubUrl, issueRefKey, splitRepo, isOwnRepo } from './urls.js';
15
15
  export { daysBetween, formatRelativeTime, byDateDescending } from './dates.js';
16
16
  export { getCLIVersion, getDataDir, resolveDataDir, getStatePath, getBackupDir, getCacheDir, stateFileExists, } from './paths.js';
17
17
  export { getGitHubToken, getGitHubTokenAsync, requireGitHubToken, resetGitHubTokenCache, detectGitHubUsername, } from './auth.js';
@@ -19,8 +19,13 @@ export { DEFAULT_CONCURRENCY } from './concurrency.js';
19
19
  export { OssAutopilotError, ConfigurationError, ValidationError, GistPermissionError, ConcurrencyError, GistConcurrencyError, GistFileSizeError, GIST_FILE_SIZE_REMEDY, errorMessage, getHttpStatusCode, isRateLimitError, isRateLimitOrAuthError, nonFatalCatch, resolveErrorCode, } from './errors.js';
20
20
  export { enableDebug, isDebugEnabled, debug, info, warn, timed } from './logger.js';
21
21
  export { HttpCache, getHttpCache, cachedRequest, type CacheEntry } from './http-cache.js';
22
- export { CRITICAL_STATUSES, applyStatusOverrides, computeRepoSignals, computeLedgerRepoSignals, groupPRsByRepo, assessCapacity, collectActionableIssues, computeActionMenu, toShelvedPRRef, buildStarFilter, firstMaintainerResponseFromDigest, lastReviewStateFromDigest, formatActionHint, formatBriefSummary, formatSummary, printDigest, } from './daily-logic.js';
22
+ export { CRITICAL_STATUSES, applyStatusOverrides, computeRepoSignals, computeLedgerRepoSignals, groupPRsByRepo, assessCapacity, collectActionableIssues, computeActionMenu, isCoveredByDismiss, toShelvedPRRef, buildStarFilter, firstMaintainerResponseFromDigest, lastReviewStateFromDigest, formatActionHint, formatBriefSummary, formatSummary, printDigest, } from './daily-logic.js';
23
+ export { collectEngagedIssues, toIssueEngagement, LEDGER_LINK_MAX_AGE_DAYS, type CollectEngagedIssuesOptions, type EngagedIssue, type EngagedIssuesInput, type EngagedPRLink, } from './engaged-issues.js';
23
24
  export { computeContributionStats, type ContributionStats, type ComputeStatsInput } from './stats.js';
25
+ export { selectClosedPRStatusCandidates, toClosedPRStatusUpdate, CLOSED_PR_STATUS_WINDOW_DAYS, type ClosedPRStatusUpdate, type ClosedPRStatusCandidate, type IssueLinkedPR, } from './closed-pr-status.js';
26
+ export { collectMergedPRNotes, groupThanksOnlyAcknowledgments, isThanksOnlyNote, latestNoteAt, omitAcknowledgedViaCarrier, scanMergedPR, MERGED_PR_NOTES_PRE_MERGE_GRACE_MS, type CarrierReply, type MergedPRActivity, type MergedPRNote, type MergedPRNoteKind, type MergedPRNotes, type MergedPRScan, } from './merged-pr-notes.js';
27
+ export { scanReviewedPR, REVIEWED_PR_MAX_COMMITS, REVIEWED_PR_MAX_QUESTIONS, type ReviewedPRActivity, type ReviewedPRActivityList, type ReviewedPRActor, type ReviewedPRCommit, type ReviewedPRFollowUp, type ReviewedPRQuestion, type ReviewedPRQuestionKind, type ReviewedPRQuestionReason, type ReviewedPRRef, } from './reviewed-prs.js';
28
+ export { REVIEWED_PR_SEARCH_MAX_PAGES, type CompareStatus, type ReviewedPRSearchConfig, type ReviewedPRSearchResult, } from './reviewed-prs-fetch.js';
24
29
  export { fetchPRTemplate, type PRTemplateResult } from './pr-template.js';
25
30
  export { classifyLinkedPR, isLinkedPRStalled, STALLED_PR_THRESHOLD_DAYS, type LinkedPR, type LinkedPRClassification, type LinkedPRState, } from './linked-pr-classification.js';
26
31
  export { classifyIssueAvailability, fetchIssueVerification, verifyIssuesBatch, MAX_VERIFY_CONCURRENCY, RULED_OUT_VERDICTS, type BatchVerificationResult, type IssueAvailabilityVerdict, type IssueVerification, type LinkedPRLinkType, type VerifiedLinkedPR, type VerifyIssueParams, } from './issue-verification.js';
@@ -8,11 +8,11 @@ export { GistStateStore } from './gist-state-store.js';
8
8
  export { guidelinesFilename, repoFromGuidelinesFilename, GUIDELINES_FILE_PREFIX, GUIDELINES_MAX_BYTES, GuidelinesNotAvailableError, GuidelinesTooLargeError, } from './guidelines-store.js';
9
9
  export { PRMonitor, computeDisplayLabel, classifyCICheck, classifyFailingChecks, } from './pr-monitor.js';
10
10
  // Search/vetting now delegated to @oss-scout/core via commands/scout-bridge.ts
11
- export { IssueConversationMonitor } from './issue-conversation.js';
12
- export { isBotAuthor, isAcknowledgmentComment } from './comment-utils.js';
11
+ export { IssueConversationMonitor, MAX_DIRECT_ENGAGED_FETCHES, } from './issue-conversation.js';
12
+ export { isBotAuthor, isAcknowledgmentComment, isReactionOnlyComment, isQuoteReplyTo, isStatusNudge, } from './comment-utils.js';
13
13
  export { wrapUntrustedContent, fenceFetchedPR, fenceFetchedPRTitles, labelGuidelinesContent, GUIDELINES_PROVENANCE_NOTE, extractFromFence, safeExtractFromFence, UNTRUSTED_OPEN_TAG_NAME, UNTRUSTED_CLOSE_TAG, } from './untrusted-content.js';
14
14
  export { getOctokit, checkRateLimit } from './github.js';
15
- export { parseGitHubUrl, splitRepo, isOwnRepo } from './urls.js';
15
+ export { parseGitHubUrl, issueRefKey, splitRepo, isOwnRepo } from './urls.js';
16
16
  export { daysBetween, formatRelativeTime, byDateDescending } from './dates.js';
17
17
  export { getCLIVersion, getDataDir, resolveDataDir, getStatePath, getBackupDir, getCacheDir, stateFileExists, } from './paths.js';
18
18
  export { getGitHubToken, getGitHubTokenAsync, requireGitHubToken, resetGitHubTokenCache, detectGitHubUsername, } from './auth.js';
@@ -20,8 +20,13 @@ export { DEFAULT_CONCURRENCY } from './concurrency.js';
20
20
  export { OssAutopilotError, ConfigurationError, ValidationError, GistPermissionError, ConcurrencyError, GistConcurrencyError, GistFileSizeError, GIST_FILE_SIZE_REMEDY, errorMessage, getHttpStatusCode, isRateLimitError, isRateLimitOrAuthError, nonFatalCatch, resolveErrorCode, } from './errors.js';
21
21
  export { enableDebug, isDebugEnabled, debug, info, warn, timed } from './logger.js';
22
22
  export { HttpCache, getHttpCache, cachedRequest } from './http-cache.js';
23
- export { CRITICAL_STATUSES, applyStatusOverrides, computeRepoSignals, computeLedgerRepoSignals, groupPRsByRepo, assessCapacity, collectActionableIssues, computeActionMenu, toShelvedPRRef, buildStarFilter, firstMaintainerResponseFromDigest, lastReviewStateFromDigest, formatActionHint, formatBriefSummary, formatSummary, printDigest, } from './daily-logic.js';
23
+ export { CRITICAL_STATUSES, applyStatusOverrides, computeRepoSignals, computeLedgerRepoSignals, groupPRsByRepo, assessCapacity, collectActionableIssues, computeActionMenu, isCoveredByDismiss, toShelvedPRRef, buildStarFilter, firstMaintainerResponseFromDigest, lastReviewStateFromDigest, formatActionHint, formatBriefSummary, formatSummary, printDigest, } from './daily-logic.js';
24
+ export { collectEngagedIssues, toIssueEngagement, LEDGER_LINK_MAX_AGE_DAYS, } from './engaged-issues.js';
24
25
  export { computeContributionStats } from './stats.js';
26
+ export { selectClosedPRStatusCandidates, toClosedPRStatusUpdate, CLOSED_PR_STATUS_WINDOW_DAYS, } from './closed-pr-status.js';
27
+ export { collectMergedPRNotes, groupThanksOnlyAcknowledgments, isThanksOnlyNote, latestNoteAt, omitAcknowledgedViaCarrier, scanMergedPR, MERGED_PR_NOTES_PRE_MERGE_GRACE_MS, } from './merged-pr-notes.js';
28
+ export { scanReviewedPR, REVIEWED_PR_MAX_COMMITS, REVIEWED_PR_MAX_QUESTIONS, } from './reviewed-prs.js';
29
+ export { REVIEWED_PR_SEARCH_MAX_PAGES, } from './reviewed-prs-fetch.js';
25
30
  export { fetchPRTemplate } from './pr-template.js';
26
31
  export { classifyLinkedPR, isLinkedPRStalled, STALLED_PR_THRESHOLD_DAYS, } from './linked-pr-classification.js';
27
32
  export { classifyIssueAvailability, fetchIssueVerification, verifyIssuesBatch, MAX_VERIFY_CONCURRENCY, RULED_OUT_VERDICTS, } from './issue-verification.js';
@@ -1,29 +1,100 @@
1
1
  /**
2
- * Issue Conversation Monitor — tracks issues the user has commented on
3
- * and detects maintainer responses that need attention.
2
+ * Issue Conversation Monitor — tracks issues the user has commented on or is
3
+ * working on, and detects replies that need attention.
4
4
  *
5
5
  * Follows the same pattern as PRMonitor: stateless fetch from GitHub,
6
6
  * bounded concurrency via worker pool, bot/acknowledgment filtering.
7
+ *
8
+ * Two reply rules apply (#1862):
9
+ * - On an issue the user only commented on in passing, a reply counts when
10
+ * it is directed at the user: from a maintainer (OWNER / MEMBER /
11
+ * COLLABORATOR), @mentions the user, or quotes the user's comment (#343).
12
+ * - On an engaged issue (claimed, or linked from one of the user's PRs; see
13
+ * `collectEngagedIssues`), any substantive non-bot comment after the
14
+ * user's last word counts, and so does anything directed at the user even
15
+ * when short (a maintainer's "any update?"). Short thanks and "+1" /
16
+ * emoji-only reactions do not, except that a bare status request on a
17
+ * claimed issue is addressed to the claimant and counts. Engaged issues
18
+ * the comment search does not return (the user never commented, or not
19
+ * within the window) are fetched directly, up to
20
+ * {@link MAX_DIRECT_ENGAGED_FETCHES} per run.
7
21
  */
8
22
  import type { CommentedIssue } from './types.js';
23
+ import { type EngagedIssue } from './engaged-issues.js';
24
+ /**
25
+ * Most engaged issues fetched directly per run when the comment search
26
+ * misses them (#1862). Each costs one issue lookup plus its comment pages,
27
+ * all ETag-cached, so a quiet day is mostly 304s; the cap bounds a first run
28
+ * for a user with many open claims. Strongest engagements come first, so
29
+ * the open-PR and claim issues are the ones kept.
30
+ */
31
+ export declare const MAX_DIRECT_ENGAGED_FETCHES = 25;
32
+ export interface FetchCommentedIssuesOptions {
33
+ /** Window for the comment search, in days (default 30). */
34
+ maxDays?: number;
35
+ /** The user's engaged issues (#1862); see `collectEngagedIssues`. */
36
+ engaged?: ReadonlyMap<string, EngagedIssue>;
37
+ }
38
+ export interface FetchCommentedIssuesResult {
39
+ issues: CommentedIssue[];
40
+ failures: Array<{
41
+ issueUrl: string;
42
+ error: string;
43
+ }>;
44
+ /**
45
+ * Non-fatal notices for the run's warning channel: the direct-fetch cap,
46
+ * a claimed or open-PR issue that is gone, a comment thread too long to
47
+ * read to the end, an engagement time that does not parse.
48
+ */
49
+ warnings: string[];
50
+ }
9
51
  export declare class IssueConversationMonitor {
10
52
  private octokit;
11
53
  private stateManager;
12
54
  constructor(githubToken: string);
13
55
  /**
14
- * Fetch issues the user has commented on and determine conversation state.
15
- * Filters out: user-authored issues, user-owned repos, excluded repos/orgs,
16
- * AI policy blocklisted repos, already-tracked issues, and pull requests.
56
+ * Whether the configured user commented on `issueUrl` at or after `since`
57
+ * (#1863). Backs the closed-PR status nudge: once the user has told the
58
+ * linked issue what happened, the nudge drops out. GitHub's `since` filter
59
+ * keys on `updated_at`, so an old comment edited after the close would
60
+ * come back too; `created_at` is re-checked to count only new comments.
61
+ *
62
+ * @throws {ConfigurationError} If no GitHub username is configured
63
+ * @throws {ValidationError} If `issueUrl` is not a GitHub issue URL
17
64
  */
18
- fetchCommentedIssues(maxDays?: number): Promise<{
19
- issues: CommentedIssue[];
20
- failures: Array<{
21
- issueUrl: string;
22
- error: string;
23
- }>;
24
- }>;
65
+ hasUserCommentSince(issueUrl: string, since: string): Promise<boolean>;
66
+ /**
67
+ * Fetch issues the user has commented on or is engaged in and determine
68
+ * conversation state. Filters out: user-authored issues, user-owned repos,
69
+ * excluded repos/orgs, AI policy blocklisted repos, and pull requests.
70
+ * Engaged issues (#1862) are scanned under the wider reply rule and
71
+ * fetched directly when the comment search misses them.
72
+ */
73
+ fetchCommentedIssues(options?: FetchCommentedIssuesOptions): Promise<FetchCommentedIssuesResult>;
74
+ /** Repo-level exclusions shared by the search results and the direct fetches. */
75
+ private isRepoAllowed;
76
+ /**
77
+ * Look up an engaged issue the comment search did not return (#1862).
78
+ * Returns undefined, with a debug line, when the number is a pull request,
79
+ * the issue is closed, the user authored it, or nothing on it changed
80
+ * since the later of the search window's start and the engagement step.
81
+ * The window keeps this path consistent with the commenter search (a
82
+ * reply older than `maxDays` is not surfaced either way); the engagement
83
+ * step tightens it because only comments after that step can be replies
84
+ * to the user, so an issue untouched since then has nothing to report.
85
+ * ETag-cached like the comment pages. Errors propagate to the worker.
86
+ */
87
+ private fetchEngagedIssue;
25
88
  /**
26
89
  * Analyze a single issue's comment thread to determine conversation status.
90
+ * Returns null when there is nothing to report: the user never commented
91
+ * on a non-engaged issue (the search said otherwise), or an engaged issue
92
+ * the user never commented on has no reply yet (nothing to wait for).
27
93
  */
28
94
  private analyzeIssueConversation;
95
+ /**
96
+ * All comments on the issue, oldest first, with deleted-account comments
97
+ * dropped. `truncated` is set when the pagination cap cut the thread short.
98
+ */
99
+ private fetchTimeline;
29
100
  }