@loopover/engine 1.0.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/CHANGELOG.md +94 -0
- package/LICENSE +661 -0
- package/README.md +676 -0
- package/dist/advisory/gate-advisory.d.ts +151 -0
- package/dist/advisory/gate-advisory.js +512 -0
- package/dist/ai-policy-map.d.ts +97 -0
- package/dist/ai-policy-map.js +377 -0
- package/dist/ams-policy-spec.d.ts +56 -0
- package/dist/ams-policy-spec.js +165 -0
- package/dist/calibration-dashboard.d.ts +23 -0
- package/dist/calibration-dashboard.js +65 -0
- package/dist/calibration-trend.d.ts +40 -0
- package/dist/calibration-trend.js +60 -0
- package/dist/contributor-fit.d.ts +24 -0
- package/dist/contributor-fit.js +50 -0
- package/dist/discovery-index-contract.d.ts +74 -0
- package/dist/discovery-index-contract.js +184 -0
- package/dist/discovery-soft-claim.d.ts +35 -0
- package/dist/discovery-soft-claim.js +50 -0
- package/dist/duplicate-winner.d.ts +57 -0
- package/dist/duplicate-winner.js +98 -0
- package/dist/feasibility.d.ts +27 -0
- package/dist/feasibility.js +86 -0
- package/dist/finding-severity-calibration.d.ts +116 -0
- package/dist/finding-severity-calibration.js +457 -0
- package/dist/fleet-run-manifest.d.ts +41 -0
- package/dist/fleet-run-manifest.js +151 -0
- package/dist/focus-manifest/guidance.d.ts +21 -0
- package/dist/focus-manifest/guidance.js +222 -0
- package/dist/focus-manifest.d.ts +826 -0
- package/dist/focus-manifest.js +2730 -0
- package/dist/gate-verdict-calibration.d.ts +111 -0
- package/dist/gate-verdict-calibration.js +411 -0
- package/dist/github/constants.d.ts +1 -0
- package/dist/github/constants.js +1 -0
- package/dist/github/sanitize-public-comment.d.ts +1 -0
- package/dist/github/sanitize-public-comment.js +26 -0
- package/dist/goal-model.d.ts +7 -0
- package/dist/goal-model.js +87 -0
- package/dist/governor/action-mode.d.ts +55 -0
- package/dist/governor/action-mode.js +74 -0
- package/dist/governor/budget-cap.d.ts +49 -0
- package/dist/governor/budget-cap.js +34 -0
- package/dist/governor/chokepoint.d.ts +58 -0
- package/dist/governor/chokepoint.js +269 -0
- package/dist/governor/kill-switch.d.ts +38 -0
- package/dist/governor/kill-switch.js +62 -0
- package/dist/governor/rate-limit.d.ts +40 -0
- package/dist/governor/rate-limit.js +63 -0
- package/dist/governor/reputation-throttle.d.ts +50 -0
- package/dist/governor/reputation-throttle.js +94 -0
- package/dist/governor/run-halt.d.ts +39 -0
- package/dist/governor/run-halt.js +83 -0
- package/dist/governor/self-plagiarism.d.ts +47 -0
- package/dist/governor/self-plagiarism.js +200 -0
- package/dist/governor/write-rate-limit.d.ts +52 -0
- package/dist/governor/write-rate-limit.js +132 -0
- package/dist/governor-ledger.d.ts +25 -0
- package/dist/governor-ledger.js +91 -0
- package/dist/index.d.ts +99 -0
- package/dist/index.js +120 -0
- package/dist/issue-plan-decomposition.d.ts +18 -0
- package/dist/issue-plan-decomposition.js +56 -0
- package/dist/issue-rag-query.d.ts +12 -0
- package/dist/issue-rag-query.js +35 -0
- package/dist/local-scorer.d.ts +34 -0
- package/dist/local-scorer.js +36 -0
- package/dist/metadata-best-min-score.d.ts +9 -0
- package/dist/metadata-best-min-score.js +9 -0
- package/dist/metadata-best-pick.d.ts +9 -0
- package/dist/metadata-best-pick.js +9 -0
- package/dist/metadata-min-score.d.ts +9 -0
- package/dist/metadata-min-score.js +13 -0
- package/dist/metadata-top-min-score.d.ts +9 -0
- package/dist/metadata-top-min-score.js +13 -0
- package/dist/metadata-top-pick.d.ts +9 -0
- package/dist/metadata-top-pick.js +13 -0
- package/dist/miner/acceptance-criteria.d.ts +43 -0
- package/dist/miner/acceptance-criteria.js +77 -0
- package/dist/miner/agent-sdk-driver.d.ts +39 -0
- package/dist/miner/agent-sdk-driver.js +162 -0
- package/dist/miner/attempt-log.d.ts +29 -0
- package/dist/miner/attempt-log.js +100 -0
- package/dist/miner/attempt-metering.d.ts +39 -0
- package/dist/miner/attempt-metering.js +67 -0
- package/dist/miner/cli-subprocess-driver.d.ts +68 -0
- package/dist/miner/cli-subprocess-driver.js +272 -0
- package/dist/miner/coding-agent-driver.d.ts +33 -0
- package/dist/miner/coding-agent-driver.js +36 -0
- package/dist/miner/coding-agent-invoke.d.ts +11 -0
- package/dist/miner/coding-agent-invoke.js +80 -0
- package/dist/miner/coding-agent-mode.d.ts +25 -0
- package/dist/miner/coding-agent-mode.js +43 -0
- package/dist/miner/driver-factory.d.ts +82 -0
- package/dist/miner/driver-factory.js +169 -0
- package/dist/miner/harness-submission-trigger.d.ts +37 -0
- package/dist/miner/harness-submission-trigger.js +46 -0
- package/dist/miner/iterate-loop.d.ts +97 -0
- package/dist/miner/iterate-loop.js +278 -0
- package/dist/miner/iterate-policy.d.ts +98 -0
- package/dist/miner/iterate-policy.js +98 -0
- package/dist/miner/lint-guard.d.ts +50 -0
- package/dist/miner/lint-guard.js +68 -0
- package/dist/miner/local-write-tools.d.ts +81 -0
- package/dist/miner/local-write-tools.js +113 -0
- package/dist/miner/loop-reentry-policy.d.ts +36 -0
- package/dist/miner/loop-reentry-policy.js +53 -0
- package/dist/miner/repo-map.d.ts +51 -0
- package/dist/miner/repo-map.js +268 -0
- package/dist/miner/self-review-adapter.d.ts +106 -0
- package/dist/miner/self-review-adapter.js +83 -0
- package/dist/miner/submission-gate.d.ts +40 -0
- package/dist/miner/submission-gate.js +89 -0
- package/dist/miner/worktree-allocator.d.ts +59 -0
- package/dist/miner/worktree-allocator.js +60 -0
- package/dist/miner/worktree-pool.d.ts +55 -0
- package/dist/miner/worktree-pool.js +65 -0
- package/dist/miner-goal-lane-fit.d.ts +18 -0
- package/dist/miner-goal-lane-fit.js +76 -0
- package/dist/miner-goal-spec.d.ts +139 -0
- package/dist/miner-goal-spec.js +281 -0
- package/dist/miner-prediction-metrics.d.ts +16 -0
- package/dist/miner-prediction-metrics.js +61 -0
- package/dist/miner-telemetry.d.ts +32 -0
- package/dist/miner-telemetry.js +87 -0
- package/dist/objective-anchor.d.ts +125 -0
- package/dist/objective-anchor.js +401 -0
- package/dist/opportunity-competition.d.ts +6 -0
- package/dist/opportunity-competition.js +29 -0
- package/dist/opportunity-freshness.d.ts +18 -0
- package/dist/opportunity-freshness.js +55 -0
- package/dist/opportunity-metadata.d.ts +53 -0
- package/dist/opportunity-metadata.js +204 -0
- package/dist/opportunity-ranker.d.ts +46 -0
- package/dist/opportunity-ranker.js +74 -0
- package/dist/pairwise-calibration.d.ts +49 -0
- package/dist/pairwise-calibration.js +106 -0
- package/dist/phase7-calibration-loop.d.ts +136 -0
- package/dist/phase7-calibration-loop.js +437 -0
- package/dist/plan-blocked.d.ts +6 -0
- package/dist/plan-blocked.js +24 -0
- package/dist/plan-completed.d.ts +5 -0
- package/dist/plan-completed.js +6 -0
- package/dist/plan-completion.d.ts +6 -0
- package/dist/plan-completion.js +7 -0
- package/dist/plan-empty.d.ts +5 -0
- package/dist/plan-empty.js +6 -0
- package/dist/plan-export.d.ts +27 -0
- package/dist/plan-export.js +86 -0
- package/dist/plan-failure.d.ts +5 -0
- package/dist/plan-failure.js +6 -0
- package/dist/plan-overall-status.d.ts +6 -0
- package/dist/plan-overall-status.js +25 -0
- package/dist/plan-pending.d.ts +5 -0
- package/dist/plan-pending.js +6 -0
- package/dist/plan-progress-complete.d.ts +7 -0
- package/dist/plan-progress-complete.js +10 -0
- package/dist/plan-ready.d.ts +6 -0
- package/dist/plan-ready.js +12 -0
- package/dist/plan-running.d.ts +5 -0
- package/dist/plan-running.js +6 -0
- package/dist/plan-skipped.d.ts +5 -0
- package/dist/plan-skipped.js +6 -0
- package/dist/plan-step-count.d.ts +5 -0
- package/dist/plan-step-count.js +6 -0
- package/dist/plan-step-stats.d.ts +5 -0
- package/dist/plan-step-stats.js +6 -0
- package/dist/plan-templates.d.ts +25 -0
- package/dist/plan-templates.js +107 -0
- package/dist/plan-terminated.d.ts +6 -0
- package/dist/plan-terminated.js +9 -0
- package/dist/portfolio/non-convergence.d.ts +37 -0
- package/dist/portfolio/non-convergence.js +57 -0
- package/dist/portfolio/queue.d.ts +30 -0
- package/dist/portfolio/queue.js +150 -0
- package/dist/predicted-gate.d.ts +103 -0
- package/dist/predicted-gate.js +218 -0
- package/dist/prompt-packet.d.ts +11 -0
- package/dist/prompt-packet.js +34 -0
- package/dist/ranked-opportunity-best-min-score.d.ts +8 -0
- package/dist/ranked-opportunity-best-min-score.js +9 -0
- package/dist/ranked-opportunity-best-pick.d.ts +8 -0
- package/dist/ranked-opportunity-best-pick.js +9 -0
- package/dist/ranked-opportunity-min-score.d.ts +8 -0
- package/dist/ranked-opportunity-min-score.js +13 -0
- package/dist/ranked-opportunity-top-min-score.d.ts +8 -0
- package/dist/ranked-opportunity-top-min-score.js +13 -0
- package/dist/review/advisory-ai-routing-config.d.ts +8 -0
- package/dist/review/advisory-ai-routing-config.js +40 -0
- package/dist/review/check-names.d.ts +1 -0
- package/dist/review/check-names.js +1 -0
- package/dist/review/cla-check.d.ts +49 -0
- package/dist/review/cla-check.js +71 -0
- package/dist/review/diff-file-priority.d.ts +1 -0
- package/dist/review/diff-file-priority.js +12 -0
- package/dist/review/enrichment-analyzer-names.d.ts +3 -0
- package/dist/review/enrichment-analyzer-names.js +63 -0
- package/dist/review/guardrail-config.d.ts +10 -0
- package/dist/review/guardrail-config.js +62 -0
- package/dist/review/linked-issue-hard-rules-config.d.ts +4 -0
- package/dist/review/linked-issue-hard-rules-config.js +79 -0
- package/dist/review/linked-issue-label-propagation.d.ts +9 -0
- package/dist/review/linked-issue-label-propagation.js +114 -0
- package/dist/review/pre-merge-checks.d.ts +28 -0
- package/dist/review/pre-merge-checks.js +66 -0
- package/dist/review/review-thread-findings.d.ts +1 -0
- package/dist/review/review-thread-findings.js +1 -0
- package/dist/review/safe-url.d.ts +5 -0
- package/dist/review/safe-url.js +137 -0
- package/dist/review/screenshot-table-gate.d.ts +87 -0
- package/dist/review/screenshot-table-gate.js +340 -0
- package/dist/review/unlinked-issue-guardrail-config.d.ts +9 -0
- package/dist/review/unlinked-issue-guardrail-config.js +44 -0
- package/dist/reviewer-consensus-calibration.d.ts +113 -0
- package/dist/reviewer-consensus-calibration.js +493 -0
- package/dist/reward-risk.d.ts +223 -0
- package/dist/reward-risk.js +618 -0
- package/dist/scoring/label-match.d.ts +4 -0
- package/dist/scoring/label-match.js +145 -0
- package/dist/scoring/model.d.ts +31 -0
- package/dist/scoring/model.js +157 -0
- package/dist/scoring/pending-pr-scenarios.d.ts +44 -0
- package/dist/scoring/pending-pr-scenarios.js +145 -0
- package/dist/scoring/preview.d.ts +246 -0
- package/dist/scoring/preview.js +1108 -0
- package/dist/scoring/types.d.ts +131 -0
- package/dist/scoring/types.js +7 -0
- package/dist/settings/auto-close-exempt.d.ts +10 -0
- package/dist/settings/auto-close-exempt.js +58 -0
- package/dist/settings/autonomy.d.ts +33 -0
- package/dist/settings/autonomy.js +80 -0
- package/dist/settings/command-authorization.d.ts +49 -0
- package/dist/settings/command-authorization.js +222 -0
- package/dist/settings/contributor-blacklist.d.ts +17 -0
- package/dist/settings/contributor-blacklist.js +86 -0
- package/dist/settings/moderation-rules.d.ts +51 -0
- package/dist/settings/moderation-rules.js +104 -0
- package/dist/settings/pr-type-label.d.ts +70 -0
- package/dist/settings/pr-type-label.js +149 -0
- package/dist/signals/change-guardrail.d.ts +49 -0
- package/dist/signals/change-guardrail.js +164 -0
- package/dist/signals/check-summary.d.ts +9 -0
- package/dist/signals/check-summary.js +12 -0
- package/dist/signals/contributor-calibration.d.ts +23 -0
- package/dist/signals/contributor-calibration.js +47 -0
- package/dist/signals/duplicate-winner.d.ts +9 -0
- package/dist/signals/duplicate-winner.js +9 -0
- package/dist/signals/path-matchers.d.ts +36 -0
- package/dist/signals/path-matchers.js +371 -0
- package/dist/signals/predicted-gate-engine.d.ts +62 -0
- package/dist/signals/predicted-gate-engine.js +895 -0
- package/dist/signals/preflight-limits.d.ts +14 -0
- package/dist/signals/preflight-limits.js +14 -0
- package/dist/signals/slop.d.ts +56 -0
- package/dist/signals/slop.js +324 -0
- package/dist/signals/test-evidence.d.ts +25 -0
- package/dist/signals/test-evidence.js +108 -0
- package/dist/subprocess-env.d.ts +23 -0
- package/dist/subprocess-env.js +74 -0
- package/dist/track-record-summary.d.ts +92 -0
- package/dist/track-record-summary.js +301 -0
- package/dist/types/manifest-deps-types.d.ts +514 -0
- package/dist/types/manifest-deps-types.js +4 -0
- package/dist/types/predicted-gate-types.d.ts +338 -0
- package/dist/types/predicted-gate-types.js +3 -0
- package/dist/types/reward-risk-types.d.ts +319 -0
- package/dist/types/reward-risk-types.js +11 -0
- package/dist/utils/json.d.ts +1 -0
- package/dist/utils/json.js +3 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.js +3 -0
- package/package.json +80 -0
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
export type JsonPrimitive = string | number | boolean | null;
|
|
2
|
+
export type JsonValue = JsonPrimitive | JsonValue[] | {
|
|
3
|
+
[key: string]: JsonValue;
|
|
4
|
+
};
|
|
5
|
+
export type RegistryRepoConfig = {
|
|
6
|
+
repo: string;
|
|
7
|
+
emissionShare: number;
|
|
8
|
+
issueDiscoveryShare: number;
|
|
9
|
+
labelMultipliers: Record<string, number>;
|
|
10
|
+
trustedLabelPipeline?: boolean | null;
|
|
11
|
+
maintainerCut: number;
|
|
12
|
+
defaultLabelMultiplier?: number | null;
|
|
13
|
+
fixedBaseScore?: number | null;
|
|
14
|
+
eligibilityMode?: string | null;
|
|
15
|
+
raw: Record<string, JsonValue>;
|
|
16
|
+
};
|
|
17
|
+
export type AdvisoryConclusion = "success" | "neutral" | "action_required";
|
|
18
|
+
export type AdvisorySeverity = "info" | "warning" | "critical";
|
|
19
|
+
export type AdvisoryFinding = {
|
|
20
|
+
code: string;
|
|
21
|
+
title: string;
|
|
22
|
+
severity: AdvisorySeverity;
|
|
23
|
+
detail: string;
|
|
24
|
+
action?: string;
|
|
25
|
+
publicText?: string;
|
|
26
|
+
confidence?: number;
|
|
27
|
+
};
|
|
28
|
+
export type Advisory = {
|
|
29
|
+
id: string;
|
|
30
|
+
targetType: "repository" | "pull_request" | "issue";
|
|
31
|
+
targetKey: string;
|
|
32
|
+
repoFullName: string;
|
|
33
|
+
pullNumber?: number;
|
|
34
|
+
issueNumber?: number;
|
|
35
|
+
headSha?: string;
|
|
36
|
+
conclusion: AdvisoryConclusion;
|
|
37
|
+
severity: AdvisorySeverity;
|
|
38
|
+
title: string;
|
|
39
|
+
summary: string;
|
|
40
|
+
findings: AdvisoryFinding[];
|
|
41
|
+
generatedAt: string;
|
|
42
|
+
};
|
|
43
|
+
export type RepositoryRecord = {
|
|
44
|
+
fullName: string;
|
|
45
|
+
owner: string;
|
|
46
|
+
name: string;
|
|
47
|
+
installationId?: number | null | undefined;
|
|
48
|
+
isInstalled: boolean;
|
|
49
|
+
isRegistered: boolean;
|
|
50
|
+
isPrivate: boolean;
|
|
51
|
+
htmlUrl?: string | null | undefined;
|
|
52
|
+
defaultBranch?: string | null | undefined;
|
|
53
|
+
registryConfig?: RegistryRepoConfig | null | undefined;
|
|
54
|
+
};
|
|
55
|
+
export type PullRequestRecord = {
|
|
56
|
+
repoFullName: string;
|
|
57
|
+
number: number;
|
|
58
|
+
title: string;
|
|
59
|
+
state: string;
|
|
60
|
+
authorLogin?: string | null | undefined;
|
|
61
|
+
authorAssociation?: string | null | undefined;
|
|
62
|
+
headSha?: string | null | undefined;
|
|
63
|
+
headRef?: string | null | undefined;
|
|
64
|
+
baseRef?: string | null | undefined;
|
|
65
|
+
htmlUrl?: string | null | undefined;
|
|
66
|
+
mergedAt?: string | null | undefined;
|
|
67
|
+
isDraft?: boolean | null | undefined;
|
|
68
|
+
mergeableState?: string | null | undefined;
|
|
69
|
+
reviewDecision?: string | null | undefined;
|
|
70
|
+
body?: string | null | undefined;
|
|
71
|
+
createdAt?: string | null | undefined;
|
|
72
|
+
updatedAt?: string | null | undefined;
|
|
73
|
+
closedAt?: string | null | undefined;
|
|
74
|
+
linkedIssueClaimedAt?: string | null | undefined;
|
|
75
|
+
labels: string[];
|
|
76
|
+
linkedIssues: number[];
|
|
77
|
+
slopRisk?: number | null | undefined;
|
|
78
|
+
slopBand?: string | null | undefined;
|
|
79
|
+
mergeAttemptCount?: number | null | undefined;
|
|
80
|
+
mergeBlockedSha?: string | null | undefined;
|
|
81
|
+
mergeBlockedReason?: string | null | undefined;
|
|
82
|
+
approvedHeadSha?: string | null | undefined;
|
|
83
|
+
lastRegatedAt?: string | null | undefined;
|
|
84
|
+
lastPublishedSurfaceSha?: string | null | undefined;
|
|
85
|
+
changedFiles?: string[] | undefined;
|
|
86
|
+
};
|
|
87
|
+
export type IssueRecord = {
|
|
88
|
+
repoFullName: string;
|
|
89
|
+
number: number;
|
|
90
|
+
title: string;
|
|
91
|
+
state: string;
|
|
92
|
+
authorLogin?: string | null | undefined;
|
|
93
|
+
authorAssociation?: string | null | undefined;
|
|
94
|
+
htmlUrl?: string | null | undefined;
|
|
95
|
+
body?: string | null | undefined;
|
|
96
|
+
createdAt?: string | null | undefined;
|
|
97
|
+
updatedAt?: string | null | undefined;
|
|
98
|
+
closedAt?: string | null | undefined;
|
|
99
|
+
labels: string[];
|
|
100
|
+
linkedPrs: number[];
|
|
101
|
+
};
|
|
102
|
+
export type BountyRecord = {
|
|
103
|
+
id: string;
|
|
104
|
+
repoFullName: string;
|
|
105
|
+
issueNumber: number;
|
|
106
|
+
status: string;
|
|
107
|
+
amountText?: string | null | undefined;
|
|
108
|
+
sourceUrl?: string | null | undefined;
|
|
109
|
+
payload: Record<string, JsonValue>;
|
|
110
|
+
discoveredAt?: string | null | undefined;
|
|
111
|
+
updatedAt?: string | null | undefined;
|
|
112
|
+
};
|
|
113
|
+
export type GateRuleMode = "off" | "advisory" | "block";
|
|
114
|
+
export type GatePolicyPack = "gittensor" | "oss-anti-slop";
|
|
115
|
+
export type RepositorySettings = {
|
|
116
|
+
repoFullName: string;
|
|
117
|
+
hardGuardrailGlobs?: string[] | null | undefined;
|
|
118
|
+
};
|
|
119
|
+
export type RecentMergedPullRequestRecord = {
|
|
120
|
+
repoFullName: string;
|
|
121
|
+
number: number;
|
|
122
|
+
title: string;
|
|
123
|
+
authorLogin?: string | null | undefined;
|
|
124
|
+
htmlUrl?: string | null | undefined;
|
|
125
|
+
labels: string[];
|
|
126
|
+
linkedIssues: number[];
|
|
127
|
+
changedFiles?: string[] | undefined;
|
|
128
|
+
};
|
|
129
|
+
export type ParticipationLane = "direct_pr" | "issue_discovery" | "split" | "inactive" | "unknown";
|
|
130
|
+
export type SignalFinding = AdvisoryFinding;
|
|
131
|
+
export type LaneAdvice = {
|
|
132
|
+
lane: ParticipationLane;
|
|
133
|
+
repoFullName: string;
|
|
134
|
+
issueDiscoveryShare?: number | undefined;
|
|
135
|
+
directPrShare?: number | undefined;
|
|
136
|
+
summary: string;
|
|
137
|
+
contributorGuidance: string;
|
|
138
|
+
maintainerGuidance: string;
|
|
139
|
+
};
|
|
140
|
+
export type CollisionItem = {
|
|
141
|
+
type: "issue" | "pull_request" | "recent_merged_pull_request";
|
|
142
|
+
number: number;
|
|
143
|
+
title: string;
|
|
144
|
+
authorLogin?: string | null | undefined;
|
|
145
|
+
htmlUrl?: string | null | undefined;
|
|
146
|
+
labels?: string[] | undefined;
|
|
147
|
+
linkedIssues?: number[] | undefined;
|
|
148
|
+
linkedIssueClaimedAt?: string | null | undefined;
|
|
149
|
+
changedFiles?: string[] | undefined;
|
|
150
|
+
body?: string | null | undefined;
|
|
151
|
+
};
|
|
152
|
+
export type CollisionCluster = {
|
|
153
|
+
id: string;
|
|
154
|
+
risk: "low" | "medium" | "high";
|
|
155
|
+
reason: string;
|
|
156
|
+
items: CollisionItem[];
|
|
157
|
+
};
|
|
158
|
+
export type CollisionReport = {
|
|
159
|
+
repoFullName: string;
|
|
160
|
+
generatedAt: string;
|
|
161
|
+
summary: {
|
|
162
|
+
clusterCount: number;
|
|
163
|
+
highRiskCount: number;
|
|
164
|
+
itemsReviewed: number;
|
|
165
|
+
};
|
|
166
|
+
clusters: CollisionCluster[];
|
|
167
|
+
};
|
|
168
|
+
export type QueueHealth = {
|
|
169
|
+
repoFullName: string;
|
|
170
|
+
generatedAt: string;
|
|
171
|
+
burdenScore: number;
|
|
172
|
+
level: "low" | "medium" | "high" | "critical";
|
|
173
|
+
summary: string;
|
|
174
|
+
signals: {
|
|
175
|
+
openIssues: number;
|
|
176
|
+
openPullRequests: number;
|
|
177
|
+
unlinkedPullRequests: number;
|
|
178
|
+
stalePullRequests: number;
|
|
179
|
+
draftPullRequests: number;
|
|
180
|
+
maintainerAuthoredPullRequests: number;
|
|
181
|
+
collisionClusters: number;
|
|
182
|
+
ageBuckets: {
|
|
183
|
+
under7Days: number;
|
|
184
|
+
days7To30: number;
|
|
185
|
+
over30Days: number;
|
|
186
|
+
};
|
|
187
|
+
likelyReviewablePullRequests: number;
|
|
188
|
+
cachedOpenPullRequests?: number | undefined;
|
|
189
|
+
likelyReviewablePullRequestsSource?: "cache" | "sampled_cache" | "authoritative" | undefined;
|
|
190
|
+
};
|
|
191
|
+
findings: AdvisoryFinding[];
|
|
192
|
+
};
|
|
193
|
+
export type QueueSignalCounts = {
|
|
194
|
+
openIssues?: number | undefined;
|
|
195
|
+
openPullRequests?: number | undefined;
|
|
196
|
+
likelyReviewablePullRequests?: number | undefined;
|
|
197
|
+
};
|
|
198
|
+
export type PreflightInput = {
|
|
199
|
+
repoFullName: string;
|
|
200
|
+
contributorLogin?: string | undefined;
|
|
201
|
+
title: string;
|
|
202
|
+
body?: string | undefined;
|
|
203
|
+
labels?: string[] | undefined;
|
|
204
|
+
changedFiles?: string[] | undefined;
|
|
205
|
+
linkedIssues?: number[] | undefined;
|
|
206
|
+
tests?: string[] | undefined;
|
|
207
|
+
authorAssociation?: string | undefined;
|
|
208
|
+
};
|
|
209
|
+
export type PreflightResult = {
|
|
210
|
+
repoFullName: string;
|
|
211
|
+
generatedAt: string;
|
|
212
|
+
status: "ready" | "needs_work" | "hold";
|
|
213
|
+
lane: LaneAdvice;
|
|
214
|
+
reviewBurden: "low" | "medium" | "high";
|
|
215
|
+
linkedIssues: number[];
|
|
216
|
+
findings: SignalFinding[];
|
|
217
|
+
collisions: CollisionCluster[];
|
|
218
|
+
};
|
|
219
|
+
export type PublicReadinessScore = {
|
|
220
|
+
total: number;
|
|
221
|
+
components: Array<{
|
|
222
|
+
key: "traceability" | "related_work" | "change_scope" | "validation" | "pr_state" | "queue_pressure";
|
|
223
|
+
label: string;
|
|
224
|
+
score: number;
|
|
225
|
+
max: number;
|
|
226
|
+
evidence: string;
|
|
227
|
+
action: string;
|
|
228
|
+
}>;
|
|
229
|
+
};
|
|
230
|
+
export type IssueQualityReport = {
|
|
231
|
+
repoFullName: string;
|
|
232
|
+
generatedAt: string;
|
|
233
|
+
lane: LaneAdvice;
|
|
234
|
+
issues: Array<{
|
|
235
|
+
number: number;
|
|
236
|
+
title: string;
|
|
237
|
+
status: "ready" | "needs_proof" | "hold" | "do_not_use";
|
|
238
|
+
score: number;
|
|
239
|
+
reasons: string[];
|
|
240
|
+
warnings: string[];
|
|
241
|
+
}>;
|
|
242
|
+
summary: string;
|
|
243
|
+
};
|
|
244
|
+
export type BountyLifecycle = "active" | "historical" | "completed" | "cancelled" | "stale" | "ambiguous" | "unknown";
|
|
245
|
+
export type FocusManifestSource = "repo_file" | "api_record" | "none";
|
|
246
|
+
export type FocusManifestLinkedIssuePolicy = "required" | "preferred" | "optional";
|
|
247
|
+
export type FocusManifestIssueDiscoveryPolicy = "encouraged" | "neutral" | "discouraged";
|
|
248
|
+
export type ReviewCheckMode = "required" | "visible" | "disabled";
|
|
249
|
+
export type CombineStrategy = "single" | "consensus" | "synthesis";
|
|
250
|
+
export type OnMerge = "either" | "both";
|
|
251
|
+
export type FocusManifestGateConfig = {
|
|
252
|
+
present: boolean;
|
|
253
|
+
enabled: boolean | null;
|
|
254
|
+
checkMode: ReviewCheckMode | null;
|
|
255
|
+
pack: GatePolicyPack | null;
|
|
256
|
+
linkedIssue: GateRuleMode | null;
|
|
257
|
+
duplicates: GateRuleMode | null;
|
|
258
|
+
readinessMode: GateRuleMode | null;
|
|
259
|
+
readinessMinScore: number | null;
|
|
260
|
+
slopMode: GateRuleMode | null;
|
|
261
|
+
slopMinScore: number | null;
|
|
262
|
+
slopAiAdvisory: boolean | null;
|
|
263
|
+
sizeMode: GateRuleMode | null;
|
|
264
|
+
lockfileIntegrityMode: GateRuleMode | null;
|
|
265
|
+
aiReviewMode: GateRuleMode | null;
|
|
266
|
+
aiReviewByok: boolean | null;
|
|
267
|
+
aiReviewProvider: "anthropic" | "openai" | null;
|
|
268
|
+
aiReviewModel: string | null;
|
|
269
|
+
aiReviewAllAuthors: boolean | null;
|
|
270
|
+
aiReviewCloseConfidence: number | null;
|
|
271
|
+
aiReviewCombine: CombineStrategy | null;
|
|
272
|
+
aiReviewOnMerge: OnMerge | null;
|
|
273
|
+
aiReviewReviewers: ReadonlyArray<{
|
|
274
|
+
model: string;
|
|
275
|
+
fallback?: string | null | undefined;
|
|
276
|
+
}> | null;
|
|
277
|
+
mergeReadiness: GateRuleMode | null;
|
|
278
|
+
manifestPolicy: GateRuleMode | null;
|
|
279
|
+
selfAuthoredLinkedIssue: GateRuleMode | null;
|
|
280
|
+
dryRun: boolean | null;
|
|
281
|
+
firstTimeContributorGrace: boolean | null;
|
|
282
|
+
premergeContentRecheck: boolean | null;
|
|
283
|
+
requireFreshRebaseWindowMinutes: number | null;
|
|
284
|
+
claMode: GateRuleMode | null;
|
|
285
|
+
claConsentPhrase: string | null;
|
|
286
|
+
claCheckRunName: string | null;
|
|
287
|
+
claCheckRunAppSlug: string | null;
|
|
288
|
+
expectedCiContexts: ReadonlyArray<string> | null;
|
|
289
|
+
};
|
|
290
|
+
export type PreMergeCheck = {
|
|
291
|
+
name: string;
|
|
292
|
+
whenPaths: string[];
|
|
293
|
+
titleContains: string | null;
|
|
294
|
+
descriptionContains: string | null;
|
|
295
|
+
requireLabel: string | null;
|
|
296
|
+
enforce: boolean;
|
|
297
|
+
};
|
|
298
|
+
export type FocusManifestReviewConfig = {
|
|
299
|
+
present: boolean;
|
|
300
|
+
preMergeChecks: PreMergeCheck[];
|
|
301
|
+
};
|
|
302
|
+
export type FocusManifestSettings = {
|
|
303
|
+
hardGuardrailGlobs?: string[] | null | undefined;
|
|
304
|
+
};
|
|
305
|
+
export type FocusManifest = {
|
|
306
|
+
present: boolean;
|
|
307
|
+
source: FocusManifestSource;
|
|
308
|
+
wantedPaths: string[];
|
|
309
|
+
preferredLabels: string[];
|
|
310
|
+
linkedIssuePolicy: FocusManifestLinkedIssuePolicy;
|
|
311
|
+
testExpectations: string[];
|
|
312
|
+
issueDiscoveryPolicy: FocusManifestIssueDiscoveryPolicy;
|
|
313
|
+
maintainerNotes: string[];
|
|
314
|
+
publicNotes: string[];
|
|
315
|
+
gate: FocusManifestGateConfig;
|
|
316
|
+
settings: FocusManifestSettings;
|
|
317
|
+
review: FocusManifestReviewConfig;
|
|
318
|
+
warnings: string[];
|
|
319
|
+
};
|
|
320
|
+
export type FocusManifestFinding = {
|
|
321
|
+
code: "manifest_off_focus" | "manifest_preferred_path" | "manifest_missing_preferred_label" | "manifest_linked_issue_required" | "manifest_linked_issue_preferred" | "manifest_missing_tests" | "manifest_issue_discovery_discouraged" | "manifest_malformed";
|
|
322
|
+
severity: "info" | "warning" | "critical";
|
|
323
|
+
title: string;
|
|
324
|
+
detail: string;
|
|
325
|
+
action?: string | undefined;
|
|
326
|
+
};
|
|
327
|
+
export type FocusManifestGuidance = {
|
|
328
|
+
present: boolean;
|
|
329
|
+
source: FocusManifestSource;
|
|
330
|
+
linkedIssuePolicy: FocusManifestLinkedIssuePolicy;
|
|
331
|
+
issueDiscoveryPolicy: FocusManifestIssueDiscoveryPolicy;
|
|
332
|
+
matchedWantedPaths: string[];
|
|
333
|
+
preferredLabelHits: string[];
|
|
334
|
+
findings: FocusManifestFinding[];
|
|
335
|
+
publicNextSteps: string[];
|
|
336
|
+
warnings: string[];
|
|
337
|
+
summary: string;
|
|
338
|
+
};
|
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
export type JsonPrimitive = string | number | boolean | null;
|
|
2
|
+
export type JsonValue = JsonPrimitive | JsonValue[] | {
|
|
3
|
+
[key: string]: JsonValue;
|
|
4
|
+
};
|
|
5
|
+
export type ParticipationLane = "direct_pr" | "issue_discovery" | "split" | "inactive" | "unknown";
|
|
6
|
+
export type ContributorRole = "outside_contributor" | "repo_maintainer" | "org_member" | "collaborator" | "owner" | "unknown";
|
|
7
|
+
export type AdvisorySeverity = "info" | "warning" | "critical";
|
|
8
|
+
export type AdvisoryFinding = {
|
|
9
|
+
code: string;
|
|
10
|
+
title: string;
|
|
11
|
+
severity: AdvisorySeverity;
|
|
12
|
+
detail: string;
|
|
13
|
+
action?: string;
|
|
14
|
+
publicText?: string;
|
|
15
|
+
confidence?: number;
|
|
16
|
+
};
|
|
17
|
+
export type SignalFinding = AdvisoryFinding;
|
|
18
|
+
export type RepoTimeDecayOverrides = {
|
|
19
|
+
gracePeriodHours?: number | null | undefined;
|
|
20
|
+
sigmoidMidpointDays?: number | null | undefined;
|
|
21
|
+
sigmoidSteepness?: number | null | undefined;
|
|
22
|
+
minMultiplier?: number | null | undefined;
|
|
23
|
+
};
|
|
24
|
+
export type RegistryRepoConfig = {
|
|
25
|
+
repo: string;
|
|
26
|
+
emissionShare: number;
|
|
27
|
+
issueDiscoveryShare: number;
|
|
28
|
+
labelMultipliers: Record<string, number>;
|
|
29
|
+
trustedLabelPipeline?: boolean | null;
|
|
30
|
+
maintainerCut: number;
|
|
31
|
+
defaultLabelMultiplier?: number | null;
|
|
32
|
+
fixedBaseScore?: number | null;
|
|
33
|
+
eligibilityMode?: string | null;
|
|
34
|
+
timeDecay?: RepoTimeDecayOverrides | null;
|
|
35
|
+
raw: Record<string, JsonValue>;
|
|
36
|
+
};
|
|
37
|
+
export type RepositoryRecord = {
|
|
38
|
+
fullName: string;
|
|
39
|
+
owner: string;
|
|
40
|
+
name: string;
|
|
41
|
+
installationId?: number | null | undefined;
|
|
42
|
+
isInstalled: boolean;
|
|
43
|
+
isRegistered: boolean;
|
|
44
|
+
isPrivate: boolean;
|
|
45
|
+
htmlUrl?: string | null | undefined;
|
|
46
|
+
defaultBranch?: string | null | undefined;
|
|
47
|
+
registryConfig?: RegistryRepoConfig | null | undefined;
|
|
48
|
+
};
|
|
49
|
+
export type PullRequestRecord = {
|
|
50
|
+
repoFullName: string;
|
|
51
|
+
number: number;
|
|
52
|
+
title: string;
|
|
53
|
+
state: string;
|
|
54
|
+
authorLogin?: string | null | undefined;
|
|
55
|
+
authorAssociation?: string | null | undefined;
|
|
56
|
+
headSha?: string | null | undefined;
|
|
57
|
+
headRef?: string | null | undefined;
|
|
58
|
+
baseRef?: string | null | undefined;
|
|
59
|
+
htmlUrl?: string | null | undefined;
|
|
60
|
+
mergedAt?: string | null | undefined;
|
|
61
|
+
isDraft?: boolean | null | undefined;
|
|
62
|
+
mergeableState?: string | null | undefined;
|
|
63
|
+
reviewDecision?: string | null | undefined;
|
|
64
|
+
body?: string | null | undefined;
|
|
65
|
+
createdAt?: string | null | undefined;
|
|
66
|
+
updatedAt?: string | null | undefined;
|
|
67
|
+
closedAt?: string | null | undefined;
|
|
68
|
+
linkedIssueClaimedAt?: string | null | undefined;
|
|
69
|
+
labels: string[];
|
|
70
|
+
linkedIssues: number[];
|
|
71
|
+
slopRisk?: number | null | undefined;
|
|
72
|
+
slopBand?: string | null | undefined;
|
|
73
|
+
mergeAttemptCount?: number | null | undefined;
|
|
74
|
+
mergeBlockedSha?: string | null | undefined;
|
|
75
|
+
mergeBlockedReason?: string | null | undefined;
|
|
76
|
+
approvedHeadSha?: string | null | undefined;
|
|
77
|
+
lastRegatedAt?: string | null | undefined;
|
|
78
|
+
lastPublishedSurfaceSha?: string | null | undefined;
|
|
79
|
+
changedFiles?: string[] | undefined;
|
|
80
|
+
};
|
|
81
|
+
export type IssueRecord = {
|
|
82
|
+
repoFullName: string;
|
|
83
|
+
number: number;
|
|
84
|
+
title: string;
|
|
85
|
+
state: string;
|
|
86
|
+
authorLogin?: string | null | undefined;
|
|
87
|
+
authorAssociation?: string | null | undefined;
|
|
88
|
+
htmlUrl?: string | null | undefined;
|
|
89
|
+
body?: string | null | undefined;
|
|
90
|
+
createdAt?: string | null | undefined;
|
|
91
|
+
updatedAt?: string | null | undefined;
|
|
92
|
+
closedAt?: string | null | undefined;
|
|
93
|
+
labels: string[];
|
|
94
|
+
linkedPrs: number[];
|
|
95
|
+
};
|
|
96
|
+
export type RecentMergedPullRequestRecord = {
|
|
97
|
+
repoFullName: string;
|
|
98
|
+
number: number;
|
|
99
|
+
title: string;
|
|
100
|
+
authorLogin?: string | null | undefined;
|
|
101
|
+
htmlUrl?: string | null | undefined;
|
|
102
|
+
mergedAt?: string | null | undefined;
|
|
103
|
+
labels: string[];
|
|
104
|
+
linkedIssues: number[];
|
|
105
|
+
changedFiles: string[];
|
|
106
|
+
payload: Record<string, JsonValue>;
|
|
107
|
+
};
|
|
108
|
+
export type PullRequestFileRecord = {
|
|
109
|
+
repoFullName: string;
|
|
110
|
+
pullNumber: number;
|
|
111
|
+
path: string;
|
|
112
|
+
status?: string | null | undefined;
|
|
113
|
+
additions: number;
|
|
114
|
+
deletions: number;
|
|
115
|
+
changes: number;
|
|
116
|
+
previousFilename?: string | null | undefined;
|
|
117
|
+
payload: Record<string, JsonValue>;
|
|
118
|
+
};
|
|
119
|
+
export type PullRequestReviewRecord = {
|
|
120
|
+
id: string;
|
|
121
|
+
repoFullName: string;
|
|
122
|
+
pullNumber: number;
|
|
123
|
+
reviewerLogin?: string | null | undefined;
|
|
124
|
+
state: string;
|
|
125
|
+
authorAssociation?: string | null | undefined;
|
|
126
|
+
submittedAt?: string | null | undefined;
|
|
127
|
+
payload: Record<string, JsonValue>;
|
|
128
|
+
};
|
|
129
|
+
export type CheckSummaryRecord = {
|
|
130
|
+
id: string;
|
|
131
|
+
repoFullName: string;
|
|
132
|
+
pullNumber?: number | null | undefined;
|
|
133
|
+
headSha?: string | null | undefined;
|
|
134
|
+
name: string;
|
|
135
|
+
status: string;
|
|
136
|
+
conclusion?: string | null | undefined;
|
|
137
|
+
startedAt?: string | null | undefined;
|
|
138
|
+
completedAt?: string | null | undefined;
|
|
139
|
+
detailsUrl?: string | null | undefined;
|
|
140
|
+
payload: Record<string, JsonValue>;
|
|
141
|
+
};
|
|
142
|
+
export type ScoringModelSnapshotRecord = {
|
|
143
|
+
id: string;
|
|
144
|
+
sourceKind: "raw-github" | "api" | "fallback" | "test";
|
|
145
|
+
sourceUrl: string;
|
|
146
|
+
fetchedAt: string;
|
|
147
|
+
activeModel: "current_density_model" | "pending_saturation_model" | "exponential_saturation_model" | "unknown";
|
|
148
|
+
constants: Record<string, number>;
|
|
149
|
+
programmingLanguages: Record<string, JsonValue>;
|
|
150
|
+
registrySnapshotId?: string | null | undefined;
|
|
151
|
+
warnings: string[];
|
|
152
|
+
payload: Record<string, JsonValue>;
|
|
153
|
+
};
|
|
154
|
+
export type PublicContributorProfile = {
|
|
155
|
+
login: string;
|
|
156
|
+
topLanguages: string[];
|
|
157
|
+
source: "github" | "unavailable";
|
|
158
|
+
};
|
|
159
|
+
export type ContributorProfile = {
|
|
160
|
+
login: string;
|
|
161
|
+
generatedAt: string;
|
|
162
|
+
github: PublicContributorProfile;
|
|
163
|
+
source: "gittensor_api" | "github_cache";
|
|
164
|
+
registeredRepoActivity: {
|
|
165
|
+
pullRequests: number;
|
|
166
|
+
mergedPullRequests: number;
|
|
167
|
+
issues: number;
|
|
168
|
+
reposTouched: string[];
|
|
169
|
+
dominantLabels: string[];
|
|
170
|
+
};
|
|
171
|
+
trustSignals: {
|
|
172
|
+
evidenceScore: number;
|
|
173
|
+
level: "new" | "emerging" | "established";
|
|
174
|
+
unlinkedOpenPullRequests: number;
|
|
175
|
+
maintainerAssociatedPullRequests: number;
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
export type ContributorScoringProfile = {
|
|
179
|
+
evidence: {
|
|
180
|
+
credibilityAssumption: number;
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
export type ContributorFit = {
|
|
184
|
+
profile: ContributorProfile;
|
|
185
|
+
languageFit: Array<{
|
|
186
|
+
repoFullName: string;
|
|
187
|
+
language?: string | null | undefined;
|
|
188
|
+
match: boolean;
|
|
189
|
+
}>;
|
|
190
|
+
opportunities: Array<{
|
|
191
|
+
repoFullName: string;
|
|
192
|
+
}>;
|
|
193
|
+
};
|
|
194
|
+
export type OutcomePattern = {
|
|
195
|
+
repoFullName?: string | undefined;
|
|
196
|
+
title: string;
|
|
197
|
+
detail: string;
|
|
198
|
+
confidence: "high" | "medium" | "low";
|
|
199
|
+
};
|
|
200
|
+
export type ContributorOutcomeHistory = {
|
|
201
|
+
login: string;
|
|
202
|
+
generatedAt: string;
|
|
203
|
+
source: ContributorProfile["source"];
|
|
204
|
+
totals: {
|
|
205
|
+
pullRequests: number;
|
|
206
|
+
mergedPullRequests: number;
|
|
207
|
+
openPullRequests: number;
|
|
208
|
+
closedPullRequests: number;
|
|
209
|
+
closedPullRequestRate: number;
|
|
210
|
+
issues: number;
|
|
211
|
+
openIssues: number;
|
|
212
|
+
closedIssues: number;
|
|
213
|
+
solvedIssues: number;
|
|
214
|
+
validSolvedIssues: number;
|
|
215
|
+
credibility: number;
|
|
216
|
+
issueCredibility: number;
|
|
217
|
+
};
|
|
218
|
+
repoOutcomes: Array<{
|
|
219
|
+
repoFullName: string;
|
|
220
|
+
role: ContributorRole;
|
|
221
|
+
lane: ParticipationLane;
|
|
222
|
+
maintainerLane: boolean;
|
|
223
|
+
pullRequests: number;
|
|
224
|
+
mergedPullRequests: number;
|
|
225
|
+
openPullRequests: number;
|
|
226
|
+
closedPullRequests: number;
|
|
227
|
+
closedPullRequestRate: number;
|
|
228
|
+
issues: number;
|
|
229
|
+
openIssues: number;
|
|
230
|
+
closedIssues: number;
|
|
231
|
+
solvedIssues: number;
|
|
232
|
+
validSolvedIssues: number;
|
|
233
|
+
credibility: number;
|
|
234
|
+
issueCredibility: number;
|
|
235
|
+
isEligible: boolean;
|
|
236
|
+
successLevel: "strong" | "emerging" | "weak" | "maintainer_context";
|
|
237
|
+
strengths: string[];
|
|
238
|
+
risks: string[];
|
|
239
|
+
}>;
|
|
240
|
+
successPatterns: OutcomePattern[];
|
|
241
|
+
failurePatterns: OutcomePattern[];
|
|
242
|
+
summary: string;
|
|
243
|
+
};
|
|
244
|
+
export type CollisionItem = {
|
|
245
|
+
type: "issue" | "pull_request" | "recent_merged_pull_request";
|
|
246
|
+
number: number;
|
|
247
|
+
title: string;
|
|
248
|
+
};
|
|
249
|
+
export type CollisionCluster = {
|
|
250
|
+
id: string;
|
|
251
|
+
risk: "low" | "medium" | "high";
|
|
252
|
+
reason: string;
|
|
253
|
+
items: CollisionItem[];
|
|
254
|
+
};
|
|
255
|
+
export type CollisionReport = {
|
|
256
|
+
repoFullName: string;
|
|
257
|
+
generatedAt: string;
|
|
258
|
+
summary: {
|
|
259
|
+
clusterCount: number;
|
|
260
|
+
highRiskCount: number;
|
|
261
|
+
itemsReviewed: number;
|
|
262
|
+
};
|
|
263
|
+
clusters: CollisionCluster[];
|
|
264
|
+
};
|
|
265
|
+
export type RoleContext = {
|
|
266
|
+
login: string;
|
|
267
|
+
repoFullName: string;
|
|
268
|
+
generatedAt: string;
|
|
269
|
+
role: ContributorRole;
|
|
270
|
+
maintainerLane: boolean;
|
|
271
|
+
normalContributorEvidenceAllowed: boolean;
|
|
272
|
+
source: "github_association" | "repo_owner_match" | "gittensor_api" | "cache" | "unknown";
|
|
273
|
+
association?: string | null | undefined;
|
|
274
|
+
reasons: string[];
|
|
275
|
+
guidance: string;
|
|
276
|
+
};
|
|
277
|
+
export type LaneAdvice = {
|
|
278
|
+
lane: ParticipationLane;
|
|
279
|
+
repoFullName: string;
|
|
280
|
+
issueDiscoveryShare?: number | undefined;
|
|
281
|
+
directPrShare?: number | undefined;
|
|
282
|
+
summary: string;
|
|
283
|
+
contributorGuidance: string;
|
|
284
|
+
maintainerGuidance: string;
|
|
285
|
+
};
|
|
286
|
+
export type QueueHealth = {
|
|
287
|
+
repoFullName: string;
|
|
288
|
+
generatedAt: string;
|
|
289
|
+
burdenScore: number;
|
|
290
|
+
level: "low" | "medium" | "high" | "critical";
|
|
291
|
+
summary: string;
|
|
292
|
+
signals: {
|
|
293
|
+
openIssues: number;
|
|
294
|
+
openPullRequests: number;
|
|
295
|
+
unlinkedPullRequests: number;
|
|
296
|
+
stalePullRequests: number;
|
|
297
|
+
draftPullRequests: number;
|
|
298
|
+
maintainerAuthoredPullRequests: number;
|
|
299
|
+
collisionClusters: number;
|
|
300
|
+
ageBuckets: {
|
|
301
|
+
under7Days: number;
|
|
302
|
+
days7To30: number;
|
|
303
|
+
over30Days: number;
|
|
304
|
+
};
|
|
305
|
+
likelyReviewablePullRequests: number;
|
|
306
|
+
cachedOpenPullRequests?: number | undefined;
|
|
307
|
+
likelyReviewablePullRequestsSource?: "cache" | "sampled_cache" | "authoritative" | undefined;
|
|
308
|
+
};
|
|
309
|
+
findings: SignalFinding[];
|
|
310
|
+
rankedPullRequests?: {
|
|
311
|
+
number: number;
|
|
312
|
+
title: string;
|
|
313
|
+
authorLogin: string;
|
|
314
|
+
recommendation: string;
|
|
315
|
+
}[];
|
|
316
|
+
};
|
|
317
|
+
export type RepoFitRecommendation = {
|
|
318
|
+
recommendation: "pursue" | "cleanup_first" | "maintainer_lane" | "avoid_for_now" | "unknown";
|
|
319
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Local type mirrors for the reward-risk engine module (#2281).
|
|
2
|
+
//
|
|
3
|
+
// Mirrored by hand from `src/types.ts` and `src/signals/engine.ts` — the engine package cannot import
|
|
4
|
+
// across into `src/`, so (as with `predicted-gate-types.ts`) these are kept in sync manually. Types that
|
|
5
|
+
// only ever reach the injected `src`-side builders (see `RewardRiskEngineDeps` in `../reward-risk.ts`) or
|
|
6
|
+
// `buildScorePreview` are subset mirrors carrying just the fields those consumers require: because the
|
|
7
|
+
// omitted `src` fields are all optional, a subset stays mutually assignable to the full `src` type, and the
|
|
8
|
+
// real runtime objects still flow through the injected builders untouched. Types that appear in this
|
|
9
|
+
// module's PUBLIC return surface (`RoleContext`, `LaneAdvice`, `QueueHealth`) are full verbatim copies so
|
|
10
|
+
// existing consumers can read every field.
|
|
11
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function nowIso(): string;
|
package/dist/version.js
ADDED