agentic-sdlc-mcp 1.5.0 → 1.6.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 (42) hide show
  1. package/README.md +26 -6
  2. package/dist/config.d.ts.map +1 -1
  3. package/dist/config.js +1 -1
  4. package/dist/config.js.map +1 -1
  5. package/dist/github/codeowners.d.ts +24 -0
  6. package/dist/github/codeowners.d.ts.map +1 -0
  7. package/dist/github/codeowners.js +153 -0
  8. package/dist/github/codeowners.js.map +1 -0
  9. package/dist/github/pull-request-evidence.d.ts +123 -0
  10. package/dist/github/pull-request-evidence.d.ts.map +1 -0
  11. package/dist/github/pull-request-evidence.js +590 -0
  12. package/dist/github/pull-request-evidence.js.map +1 -0
  13. package/dist/rendering/markdown.d.ts +8 -0
  14. package/dist/rendering/markdown.d.ts.map +1 -0
  15. package/dist/rendering/markdown.js +27 -0
  16. package/dist/rendering/markdown.js.map +1 -0
  17. package/dist/review/pull-request-review.d.ts +77 -0
  18. package/dist/review/pull-request-review.d.ts.map +1 -0
  19. package/dist/review/pull-request-review.js +1185 -0
  20. package/dist/review/pull-request-review.js.map +1 -0
  21. package/dist/security/secret-scanner-evidence.d.ts +58 -0
  22. package/dist/security/secret-scanner-evidence.d.ts.map +1 -0
  23. package/dist/security/secret-scanner-evidence.js +414 -0
  24. package/dist/security/secret-scanner-evidence.js.map +1 -0
  25. package/dist/tools/quality-gate-status.d.ts +292 -5
  26. package/dist/tools/quality-gate-status.d.ts.map +1 -1
  27. package/dist/tools/quality-gate-status.js +665 -95
  28. package/dist/tools/quality-gate-status.js.map +1 -1
  29. package/dist/tools/release-readiness.d.ts.map +1 -1
  30. package/dist/tools/release-readiness.js +81 -39
  31. package/dist/tools/release-readiness.js.map +1 -1
  32. package/dist/tools/review-pr.d.ts +113 -29
  33. package/dist/tools/review-pr.d.ts.map +1 -1
  34. package/dist/tools/review-pr.js +237 -314
  35. package/dist/tools/review-pr.js.map +1 -1
  36. package/dist/tools/workflow-permissions-audit.d.ts +14 -1
  37. package/dist/tools/workflow-permissions-audit.d.ts.map +1 -1
  38. package/dist/tools/workflow-permissions-audit.js +40 -15
  39. package/dist/tools/workflow-permissions-audit.js.map +1 -1
  40. package/dist/version.d.ts +1 -1
  41. package/dist/version.js +1 -1
  42. package/package.json +1 -1
package/README.md CHANGED
@@ -86,9 +86,10 @@ sequenceDiagram
86
86
  Before running the server, ensure you have:
87
87
  1. **Node.js >= 24** installed on your system.
88
88
  2. **GitHub Personal Access Token (PAT)**:
89
- * **Scopes required**:
90
- * `repo` (Full control of private/public repositories, issues, PRs, and checks).
91
- * `security_events` (To query Code Scanning and Dependabot alerts).
89
+ * **Classic PAT scopes**: `repo` plus `security_events`; add `read:org` when organization/team metadata must be resolved.
90
+ * **Fine-grained PAT repository permissions (read)**: Contents, Pull requests, Issues, Checks, Commit statuses, Administration (classic branch protection), Code scanning alerts, Dependabot alerts, and Secret scanning alerts. Metadata read is automatically included and is sufficient for repository rulesets.
91
+ * GraphQL review decisions and linked-issue queries reuse the underlying Pull requests and Issues permissions; GitHub has no separate "GraphQL read" permission switch.
92
+ * Grant **Issues: write** only when you intend to call `create_issue_set` with `dryRun: false`; the v1.6 gate/review tools do not need write access.
92
93
  * Note: Make sure to verify token permissions against [GitHub REST API Documentation](https://docs.github.com/en/rest) if security endpoints fail.
93
94
 
94
95
  ---
@@ -158,7 +159,7 @@ Run the configuration command:
158
159
  npx agentic-sdlc-mcp configure
159
160
  ```
160
161
  This guides you through configuring:
161
- * `GITHUB_TOKEN` (Primary token; [generate classic token here](https://github.com/settings/tokens) with `repo` and `read:org` scopes)
162
+ * `GITHUB_TOKEN` (Primary token; [generate one here](https://github.com/settings/tokens) and follow the least-privilege matrix in [Prerequisites](#-prerequisites))
162
163
  * `GITHUB_OWNER` (Default repository owner name, optional)
163
164
  * `GITHUB_REPO` (Default repository name, optional)
164
165
 
@@ -247,11 +248,12 @@ Generates an agent-ready brief for a specific issue containing goals, non-goals,
247
248
  * `includeRecentPRs` (boolean, default: `false`): Scan up to 5 merged PRs that touched these paths.
248
249
 
249
250
  ### `quality_gate_status`
250
- Audits the check-runs (CI status, build status, linting status) for a given PR or git ref.
251
+ Aggregates check runs and commit statuses. In PR mode it also evaluates reviews, CODEOWNERS routing, draft/mergeability, branch protection/rulesets, blocking labels, and linked issues. Its six conclusions are `passing`, `failing`, `pending`, `needs_review`, `policy_gap`, and `no_evidence`. Permission failures and bounded/truncated sources are exposed through `degraded`, `unverifiedSignals`, and safe `errors`; missing evidence is never invented as a pass.
251
252
  * **Arguments:**
252
253
  * `owner` / `repo` (string, optional): Repo coordinates.
253
254
  * `pullNumber` (number, optional): Query checks by PR number.
254
255
  * `ref` (string, optional): Query checks by branch, tag, or SHA.
256
+ * `blockingLabels` (string[], default: `blocked`, `do-not-merge`, `release-blocker`, `security-blocker`): Exact, case-insensitive PR labels that block the gate; pass `[]` to disable this built-in list.
255
257
 
256
258
  ### `create_pr_summary`
257
259
  Generates a structured pull request description and changelog draft.
@@ -261,10 +263,18 @@ Generates a structured pull request description and changelog draft.
261
263
 
262
264
  ### `review_pr_against_standard`
263
265
  Reviews pull request code changes against SDLC governance levels (`basic` / `strict` / `security-focused`).
266
+
267
+ The caller may explicitly set `workType` to `docs`, `feature`, `bugfix`, `refactor`, `security`, `release`, or `infra`; otherwise the tool returns a conservative inference with confidence and reasoning. Structured output includes `dimension`, `paths`, and `reason` per finding plus `releaseRisk`, `testCoverageSignal`, and `ownershipRoutingGaps`. Docs-only work requires document verification rather than code unit tests; bug fixes require reproduction/regression evidence; workflow/infra work audits complete workflow content, triggers, least-privilege permissions, failure paths, and rollback evidence.
268
+
269
+ `security-focused` can treat Gitleaks or TruffleHog as primary passing evidence only after its concrete Actions job URL, workflow run, PR head SHA, unique matching base-ref workflow job, and known scanner action pinned to a full commit SHA are verified. Secretlint, detect-secrets, and GitHub Secret Scanning names are recognized and surfaced, but remain unverified claims in v1.6 because this release cannot bind them to an equivalent immutable workflow provenance chain. Same-name/duplicate-name jobs or statuses, checks from unknown Apps, conditional/error-tolerant scanner jobs or steps, and mutable action tags are not trusted as clean-scan proof. If evidence is incomplete, scanner policy changes in the PR, no provenance-supported scanner ran, or the scan is pending/failed, the review fails closed. The built-in added-line assignment heuristic is supplemental and is never reported as proof that a repository is secret-free.
270
+
271
+ The supplemental scanner runs under every review standard and reports `DynamicSecretConstruction` when a credential-like field or authentication-header API sink is assembled through string concatenation/formatting, common JavaScript/Java/Go/Rust/Python/Ruby/PHP/Kotlin/Swift interpolation or builder forms, `.concat()`/`.join()`, common decoding calls, multiline statements, or bounded patch-local computed-field aliases. It preserves diff-hunk and statement boundaries, caps tracked aliases and input/output growth, and aggregates repeated findings. Explicit environment-variable/secret-manager sources, comments, removed lines, and credential metadata such as `tokenCount` are excluded to reduce noise. This is patch-local risk detection, not whole-program data-flow analysis: indirect construction across functions/files or fully unknown computed keys still requires trusted scanners, CodeQL/SAST, and human review.
272
+
264
273
  * **Arguments:**
265
274
  * `owner` / `repo` (string, optional): Repo coordinates.
266
275
  * `pullNumber` (number, required): The pull request ID.
267
276
  * `standard` (string, default: `"basic"`): Standard level.
277
+ * `workType` (string, optional): Explicit work type; omit to infer it from PR metadata and paths.
268
278
  * `checkOwnership` (boolean, default: `true`): Validates file ownership changes against `.github/CODEOWNERS` and flags unassigned reviewers.
269
279
 
270
280
  ### `security_triage`
@@ -273,7 +283,7 @@ Retrieves and triages Code Scanning, Dependabot, and Secret Scanning alerts.
273
283
  * `owner` / `repo` (string, optional): Repo coordinates.
274
284
 
275
285
  ### `release_readiness_check`
276
- Assesses pre-release health (tests, open bugs, changelogs) and generates rollback instructions.
286
+ Assesses pre-release health (combined check runs and commit statuses, open bugs, and changelog presence) and generates rollback instructions. A release is ready only when CI is explicitly `passing`; `pending`, `unknown`, zero-signal, or failing CI blocks readiness.
277
287
  * **Arguments:**
278
288
  * `owner` / `repo` (string, optional): Repo coordinates.
279
289
  * `headRef` (string, optional): Target release branch/tag.
@@ -321,6 +331,7 @@ To prevent AI coding agents from performing destructive or unintended actions on
321
331
  * **Zero Self-Merge Policy**: No tools exist to auto-merge pull requests. Human approval is required on all merge gates.
322
332
  * **Access Restraints**: The server does not support force-pushing or deleting branch rules.
323
333
  * **CODEOWNERS Enforced Review**: Special paths (such as workflows under `.github/` and core files under `src/`) require owner approvals.
334
+ * **Read-only Decision Tools**: v1.6 gate, PR review, workflow audit, security triage, and release-readiness tools only read evidence. They never approve or merge PRs and never modify branch protection, rulesets, or repository policy. The separate issue-creation tool remains protected by `dryRun: true` by default.
324
335
 
325
336
  ---
326
337
 
@@ -335,6 +346,15 @@ To prevent AI coding agents from performing destructive or unintended actions on
335
346
  ### OIDC Trusted Publishing (For Maintainers)
336
347
  This package is securely published to npm via GitHub Actions using **Trusted Publishing (OIDC)**, eliminating the need to store static `NPM_TOKEN` secrets in the repository. Publishing is triggered by creating a GitHub Release or manually running the Action.
337
348
 
349
+ ### GitHub Actions Workflows
350
+
351
+ | Workflow | Trigger | Purpose |
352
+ |---|---|---|
353
+ | `.github/workflows/ci.yml` | Pull requests and pushes to `main` | Runs typecheck, build, tests, smoke, and coverage on Node 24 |
354
+ | `.github/workflows/secret-scan.yml` | Pull requests, pushes to `main`, and manual dispatch | Runs pinned Gitleaks with read-only permissions; this is the primary mature secret-scanner evidence |
355
+ | `.github/workflows/publish.yml` | Published GitHub Release or manual dispatch | Publishes to npm through OIDC Trusted Publishing |
356
+ | `.github/dependabot.yml` | Weekly | Opens npm and GitHub Actions dependency update PRs |
357
+
338
358
  ---
339
359
 
340
360
  ## 📄 License
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAOA;;;GAGG;AAEH,MAAM,WAAW,MAAM;IACrB,gEAAgE;IAChE,WAAW,EAAE,MAAM,CAAC;IACpB,oDAAoD;IACpD,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,qCAAqC;IACrC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,0BAA0B;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB,wDAAwD;IACxD,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,+DAA+D;AAC/D,eAAO,MAAM,WAAW,SAC6C,CAAC;AAKtE,iFAAiF;AACjF,eAAO,MAAM,MAAM,EAAE,MAMpB,CAAC;AA2EF,gGAAgG;AAChG,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,CA4CtD"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAOA;;;GAGG;AAEH,MAAM,WAAW,MAAM;IACrB,gEAAgE;IAChE,WAAW,EAAE,MAAM,CAAC;IACpB,oDAAoD;IACpD,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,qCAAqC;IACrC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,0BAA0B;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB,wDAAwD;IACxD,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,+DAA+D;AAC/D,eAAO,MAAM,WAAW,SAC6C,CAAC;AAKtE,iFAAiF;AACjF,eAAO,MAAM,MAAM,EAAE,MAMpB,CAAC;AA6EF,gGAAgG;AAChG,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,CA4CtD"}
package/dist/config.js CHANGED
@@ -64,7 +64,7 @@ async function runInteractiveConfig() {
64
64
  try {
65
65
  console.error("\n=== agentic-sdlc-mcp 交互式配置引导 ===");
66
66
  console.error("检测到未设置 GITHUB_TOKEN,此参数是与 GitHub 交互的核心凭证。");
67
- console.error("生成地址: https://github.com/settings/tokens (需要勾选 repo, read:org 权限)\n");
67
+ console.error("生成地址: https://github.com/settings/tokens (请按目标操作授予最小权限,详见 README 的使用前提)\n");
68
68
  let token = "";
69
69
  while (!token) {
70
70
  token = await rl.question("请输入您的 GITHUB_TOKEN: ");
@@ -1 +1 @@
1
- {"version":3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OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,EAAE,CAAC;QACjC,IAAI,OAAO,CAAC,MAAM,CAAC,KAAK,IAAI,OAAO,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;YAChD,MAAM,oBAAoB,EAAE,CAAC;QAC/B,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,KAAK,CAAC,iEAAiE,CAAC,CAAC;YACjF,OAAO,CAAC,KAAK,CAAC,sDAAsD,CAAC,CAAC;YACtE,OAAO,CAAC,KAAK,CAAC,oDAAoD,CAAC,CAAC;YACpE,OAAO,CAAC,KAAK,CAAC,4EAA4E,CAAC,CAAC;YAC5F,OAAO,CAAC,KAAK,CAAC,qEAAqE,CAAC,CAAC;YACrF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC;IAED,+BAA+B;IAC/B,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE;QACpB,WAAW,EAAE,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,EAAE;QAC9C,WAAW,EAAE,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,SAAS;QACrD,UAAU,EAAE,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,SAAS;QACnD,aAAa,EAAE,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,IAAI,MAAM;QAC3D,WAAW,EAAE,KAAK;KACnB,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,24 @@
1
+ import type { Octokit } from "@octokit/rest";
2
+ import type { RepoRef } from "../types.js";
3
+ export interface CodeownersRule {
4
+ pattern: string;
5
+ owners: string[];
6
+ }
7
+ export interface OwnershipGap {
8
+ owner: string;
9
+ paths: string[];
10
+ }
11
+ /** Parse CODEOWNERS contents into ordered rules (file order matters: last match wins). */
12
+ export declare function parseCodeowners(content: string): CodeownersRule[];
13
+ /** Match a repo-relative file path against one CODEOWNERS/gitignore-style pattern. */
14
+ export declare function codeownersPatternMatches(pattern: string, filePath: string): boolean;
15
+ /** Return owners from the last matching rule. */
16
+ export declare function ownersForFile(filePath: string, rules: CodeownersRule[]): string[];
17
+ /** Find owners whose changed paths are not covered by the author or any reviewer route. */
18
+ export declare function findOwnershipGaps(filePaths: string[], rules: CodeownersRule[], requestedUsers: string[], requestedTeams: string[], reviewedUsers: string[], prAuthor: string): OwnershipGap[];
19
+ /** Fetch CODEOWNERS from GitHub's conventional candidate paths in priority order. */
20
+ export declare function fetchCodeownersRules(ref: RepoRef, octokit: Octokit, gitRef?: string): Promise<{
21
+ rules: CodeownersRule[];
22
+ error: string | null;
23
+ }>;
24
+ //# sourceMappingURL=codeowners.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codeowners.d.ts","sourceRoot":"","sources":["../../src/github/codeowners.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAG3C,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,0FAA0F;AAC1F,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,cAAc,EAAE,CAUjE;AA0ED,sFAAsF;AACtF,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAgBnF;AAED,iDAAiD;AACjD,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,cAAc,EAAE,GAAG,MAAM,EAAE,CAQjF;AAED,2FAA2F;AAC3F,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,MAAM,EAAE,EACnB,KAAK,EAAE,cAAc,EAAE,EACvB,cAAc,EAAE,MAAM,EAAE,EACxB,cAAc,EAAE,MAAM,EAAE,EACxB,aAAa,EAAE,MAAM,EAAE,EACvB,QAAQ,EAAE,MAAM,GACf,YAAY,EAAE,CAqBhB;AAED,qFAAqF;AACrF,wBAAsB,oBAAoB,CACxC,GAAG,EAAE,OAAO,EACZ,OAAO,EAAE,OAAO,EAChB,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC;IAAE,KAAK,EAAE,cAAc,EAAE,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC,CAyB5D"}
@@ -0,0 +1,153 @@
1
+ import { handleGitHubError } from "./client.js";
2
+ /** Parse CODEOWNERS contents into ordered rules (file order matters: last match wins). */
3
+ export function parseCodeowners(content) {
4
+ const rules = [];
5
+ for (const rawLine of content.split("\n")) {
6
+ const line = rawLine.trim();
7
+ if (!line || line.startsWith("#"))
8
+ continue;
9
+ const [pattern, ...owners] = line.split(/\s+/);
10
+ if (!pattern || owners.length === 0)
11
+ continue;
12
+ rules.push({ pattern, owners });
13
+ }
14
+ return rules;
15
+ }
16
+ /**
17
+ * Match one path segment with bounded dynamic programming. This avoids catastrophic
18
+ * backtracking for adversarial sequences of adjacent wildcards.
19
+ */
20
+ function segmentMatches(pattern, text) {
21
+ const m = pattern.length;
22
+ const n = text.length;
23
+ let prevRow = new Array(n + 1).fill(false);
24
+ prevRow[0] = true;
25
+ for (let i = 1; i <= m; i++) {
26
+ const currRow = new Array(n + 1).fill(false);
27
+ const c = pattern[i - 1];
28
+ currRow[0] = c === "*" && prevRow[0];
29
+ for (let j = 1; j <= n; j++) {
30
+ if (c === "*") {
31
+ currRow[j] = prevRow[j] || currRow[j - 1];
32
+ }
33
+ else if (c === "?" || c === text[j - 1]) {
34
+ currRow[j] = prevRow[j - 1];
35
+ }
36
+ }
37
+ prevRow = currRow;
38
+ }
39
+ return prevRow[n];
40
+ }
41
+ /** Match path segments, with `**` spanning zero or more whole segments. */
42
+ function matchSegments(patternSegs, pathSegs, pi = 0, si = 0, memo = new Map()) {
43
+ const key = pi * (pathSegs.length + 1) + si;
44
+ const cached = memo.get(key);
45
+ if (cached !== undefined)
46
+ return cached;
47
+ let result;
48
+ if (pi >= patternSegs.length) {
49
+ result = si === pathSegs.length;
50
+ }
51
+ else if (patternSegs[pi] === "**") {
52
+ if (pi === patternSegs.length - 1) {
53
+ result = true;
54
+ }
55
+ else {
56
+ result = false;
57
+ for (let k = si; k <= pathSegs.length; k++) {
58
+ if (matchSegments(patternSegs, pathSegs, pi + 1, k, memo)) {
59
+ result = true;
60
+ break;
61
+ }
62
+ }
63
+ }
64
+ }
65
+ else if (si >= pathSegs.length || !segmentMatches(patternSegs[pi], pathSegs[si])) {
66
+ result = false;
67
+ }
68
+ else {
69
+ result = matchSegments(patternSegs, pathSegs, pi + 1, si + 1, memo);
70
+ }
71
+ memo.set(key, result);
72
+ return result;
73
+ }
74
+ function matchesAnchored(patternSegs, pathSegs) {
75
+ if (matchSegments(patternSegs, pathSegs))
76
+ return true;
77
+ return (pathSegs.length > patternSegs.length &&
78
+ patternSegs[patternSegs.length - 1] !== "**" &&
79
+ matchSegments(patternSegs, pathSegs.slice(0, patternSegs.length)));
80
+ }
81
+ /** Match a repo-relative file path against one CODEOWNERS/gitignore-style pattern. */
82
+ export function codeownersPatternMatches(pattern, filePath) {
83
+ let p = pattern.trim();
84
+ if (p.endsWith("/"))
85
+ p = p.slice(0, -1);
86
+ const anchored = p.includes("/");
87
+ if (p.startsWith("/"))
88
+ p = p.slice(1);
89
+ const patternSegs = p.split("/");
90
+ const pathSegs = filePath.split("/");
91
+ if (anchored)
92
+ return matchesAnchored(patternSegs, pathSegs);
93
+ for (let start = 0; start < pathSegs.length; start++) {
94
+ if (matchesAnchored(patternSegs, pathSegs.slice(start)))
95
+ return true;
96
+ }
97
+ return false;
98
+ }
99
+ /** Return owners from the last matching rule. */
100
+ export function ownersForFile(filePath, rules) {
101
+ let matched = [];
102
+ for (const rule of rules) {
103
+ if (codeownersPatternMatches(rule.pattern, filePath)) {
104
+ matched = rule.owners;
105
+ }
106
+ }
107
+ return matched;
108
+ }
109
+ /** Find owners whose changed paths are not covered by the author or any reviewer route. */
110
+ export function findOwnershipGaps(filePaths, rules, requestedUsers, requestedTeams, reviewedUsers, prAuthor) {
111
+ if (rules.length === 0)
112
+ return [];
113
+ const satisfied = new Set([...requestedUsers, ...requestedTeams, ...reviewedUsers, prAuthor].map((name) => name.toLowerCase()));
114
+ const missingOwnerPaths = new Map();
115
+ for (const filePath of filePaths) {
116
+ for (const owner of ownersForFile(filePath, rules)) {
117
+ const normalized = owner.replace(/^@/, "").toLowerCase();
118
+ if (satisfied.has(normalized))
119
+ continue;
120
+ const paths = missingOwnerPaths.get(owner) ?? [];
121
+ paths.push(filePath);
122
+ missingOwnerPaths.set(owner, paths);
123
+ }
124
+ }
125
+ return [...missingOwnerPaths].map(([owner, paths]) => ({ owner, paths }));
126
+ }
127
+ /** Fetch CODEOWNERS from GitHub's conventional candidate paths in priority order. */
128
+ export async function fetchCodeownersRules(ref, octokit, gitRef) {
129
+ const candidatePaths = [".github/CODEOWNERS", "CODEOWNERS", "docs/CODEOWNERS"];
130
+ let lastError = null;
131
+ for (const path of candidatePaths) {
132
+ try {
133
+ const { data } = await octokit.repos.getContent({
134
+ owner: ref.owner,
135
+ repo: ref.repo,
136
+ path,
137
+ ...(gitRef === undefined ? {} : { ref: gitRef }),
138
+ });
139
+ if (!Array.isArray(data) && data.type === "file" && data.content) {
140
+ const content = Buffer.from(data.content, "base64").toString("utf-8");
141
+ return { rules: parseCodeowners(content), error: null };
142
+ }
143
+ }
144
+ catch (error) {
145
+ const message = handleGitHubError(error);
146
+ if (!message.toLowerCase().includes("not found")) {
147
+ lastError = message;
148
+ }
149
+ }
150
+ }
151
+ return { rules: [], error: lastError };
152
+ }
153
+ //# sourceMappingURL=codeowners.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codeowners.js","sourceRoot":"","sources":["../../src/github/codeowners.ts"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AC,CAAC;IAC/E,IAAI,SAAS,GAAkB,IAAI,CAAC;IAEpC,KAAK,MAAM,IAAI,IAAI,cAAc,EAAE,CAAC;QAClC,IAAI,CAAC;YACH,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC;gBAC9C,KAAK,EAAE,GAAG,CAAC,KAAK;gBAChB,IAAI,EAAE,GAAG,CAAC,IAAI;gBACd,IAAI;gBACJ,GAAG,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC;aACjD,CAAC,CAAC;YACH,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;gBACjE,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;gBACtE,OAAO,EAAE,KAAK,EAAE,eAAe,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;YAC1D,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,OAAO,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAC;YACzC,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC;gBACjD,SAAS,GAAG,OAAO,CAAC;YACtB,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;AACzC,CAAC"}
@@ -0,0 +1,123 @@
1
+ import type { Octokit } from "@octokit/rest";
2
+ import type { RepoRef } from "../types.js";
3
+ import { type OwnershipGap } from "./codeowners.js";
4
+ export type GateSignalSource = "check_run" | "commit_status";
5
+ export type GateSignalState = "passing" | "failing" | "pending" | "skipped";
6
+ export interface GateSignal {
7
+ name: string;
8
+ source: GateSignalSource;
9
+ /** GitHub App provider for check runs; commit statuses do not expose one. */
10
+ appId: number | null;
11
+ state: GateSignalState;
12
+ rawStatus: string | null;
13
+ rawConclusion: string | null;
14
+ rawState: string | null;
15
+ url: string | null;
16
+ /** Set only after the orchestration layer verifies the originating workflow and pinned scanner action. */
17
+ provenanceVerified?: boolean;
18
+ }
19
+ export interface RequiredStatusCheck {
20
+ context: string;
21
+ /** null means that any provider may satisfy the required context. */
22
+ appId: number | null;
23
+ }
24
+ export interface PullRequestRuleRequirements {
25
+ allowedMergeMethods: string[] | null;
26
+ /** Aggregate reviewDecision is authoritative for review freshness when verified. */
27
+ dismissStaleReviews: boolean;
28
+ lockBranch: boolean;
29
+ requiredConversationResolution: boolean;
30
+ /** Aggregate reviewDecision is authoritative for last-push approval when verified. */
31
+ requireLastPushApproval: boolean;
32
+ requiredLinearHistory: boolean;
33
+ requiredReviewThreadResolution: boolean;
34
+ requiredReviewersConfigured: boolean;
35
+ requiredSignatures: boolean;
36
+ strictRequiredStatusChecksPolicy: boolean;
37
+ }
38
+ export interface SignalBuckets {
39
+ passing: GateSignal[];
40
+ failing: GateSignal[];
41
+ pending: GateSignal[];
42
+ skipped: GateSignal[];
43
+ total: number;
44
+ }
45
+ export interface CiEvidence {
46
+ checkRuns: SignalBuckets;
47
+ commitStatuses: SignalBuckets;
48
+ totalSignals: number;
49
+ hasFailing: boolean;
50
+ hasPending: boolean;
51
+ unverifiedSignals: string[];
52
+ errors: string[];
53
+ }
54
+ export interface BoundedCollection<T> {
55
+ items: T[];
56
+ truncated: boolean;
57
+ }
58
+ export type ReviewDecision = "APPROVED" | "CHANGES_REQUESTED" | "REVIEW_REQUIRED" | null;
59
+ export interface PullRequestChangedFile {
60
+ filename: string;
61
+ previousFilename?: string;
62
+ status: string;
63
+ additions: number;
64
+ deletions: number;
65
+ changes: number;
66
+ patch?: string;
67
+ }
68
+ export interface PullRequestEvidence {
69
+ pullRequest: {
70
+ number: number;
71
+ title: string;
72
+ body: string | null;
73
+ author: string;
74
+ headSha: string;
75
+ headRef: string;
76
+ baseBranch: string;
77
+ /** Immutable base commit used for policy provenance checks when available. */
78
+ baseSha?: string;
79
+ draft: boolean;
80
+ commits: number;
81
+ mergeable: boolean | null;
82
+ mergeableState: string | null;
83
+ labels: string[];
84
+ };
85
+ /** Complete changed-file details from the same bounded listing used for ownership routing. */
86
+ changedFiles: PullRequestChangedFile[];
87
+ ci: CiEvidence;
88
+ reviews: {
89
+ reviewDecision: ReviewDecision;
90
+ approvedUsers: string[];
91
+ changesRequestedUsers: string[];
92
+ requestedUsers: string[];
93
+ requestedTeams: string[];
94
+ requiredApprovals: number | null;
95
+ requireCodeOwnerReviews: boolean | null;
96
+ codeOwnerReviewSatisfied: boolean | null;
97
+ ownershipGaps: OwnershipGap[];
98
+ codeownersFound: boolean;
99
+ };
100
+ branchProtection: {
101
+ classicEnabled: boolean;
102
+ rulesetRuleTypes: string[];
103
+ requiredStatusContexts: string[];
104
+ requiredStatusChecks: RequiredStatusCheck[];
105
+ pullRequestRuleRequirements: PullRequestRuleRequirements;
106
+ };
107
+ linkedIssues: Array<{
108
+ number: number;
109
+ title: string;
110
+ url: string;
111
+ }> | null;
112
+ degraded: boolean;
113
+ unverifiedSignals: string[];
114
+ errors: string[];
115
+ }
116
+ export interface CollectPullRequestEvidenceParams {
117
+ pullNumber: number;
118
+ }
119
+ /** Collect at most maxItems while probing one extra page to distinguish complete from truncated. */
120
+ export declare function collectBounded<T>(fn: (page: number, perPage: number) => Promise<T[]>, maxItems?: number, perPage?: number): Promise<BoundedCollection<T>>;
121
+ export declare function collectCiEvidence(ref: RepoRef, sha: string, octokit: Octokit): Promise<CiEvidence>;
122
+ export declare function collectPullRequestEvidence(params: CollectPullRequestEvidenceParams, ref: RepoRef, octokit: Octokit): Promise<PullRequestEvidence>;
123
+ //# sourceMappingURL=pull-request-ev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