@webpieces/pr-gate 0.4.719 → 0.4.721

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 (36) hide show
  1. package/package.json +4 -6
  2. package/src/dashboard/checklist-comment-renderer.js +2 -4
  3. package/src/dashboard/checklist-comment-renderer.js.map +1 -1
  4. package/src/dashboard/dashboard.js +0 -2
  5. package/src/dashboard/dashboard.js.map +1 -1
  6. package/src/scripts/commands/finish-upsert-pr-command.js +9 -10
  7. package/src/scripts/commands/finish-upsert-pr-command.js.map +1 -1
  8. package/src/scripts/commands/review-upsert-pr-command.d.ts +2 -2
  9. package/src/scripts/commands/review-upsert-pr-command.js +5 -5
  10. package/src/scripts/commands/review-upsert-pr-command.js.map +1 -1
  11. package/src/scripts/pr-gate-app.d.ts +2 -13
  12. package/src/scripts/pr-gate-app.js +1 -20
  13. package/src/scripts/pr-gate-app.js.map +1 -1
  14. package/src/scripts/workflow/checklist-scanner.d.ts +21 -24
  15. package/src/scripts/workflow/checklist-scanner.js +35 -40
  16. package/src/scripts/workflow/checklist-scanner.js.map +1 -1
  17. package/src/scripts/workflow/review-report.d.ts +3 -3
  18. package/src/scripts/workflow/review-report.js +3 -3
  19. package/src/scripts/workflow/review-report.js.map +1 -1
  20. package/src/scripts/workflow/reviewer-verdict-gate.js +2 -2
  21. package/src/scripts/workflow/reviewer-verdict-gate.js.map +1 -1
  22. package/src/scripts/commands/authorize-command.d.ts +0 -82
  23. package/src/scripts/commands/authorize-command.js +0 -205
  24. package/src/scripts/commands/authorize-command.js.map +0 -1
  25. package/src/scripts/commands/check-auth-command.d.ts +0 -33
  26. package/src/scripts/commands/check-auth-command.js +0 -99
  27. package/src/scripts/commands/check-auth-command.js.map +0 -1
  28. package/src/scripts/workflow/authorization-context-resolver.d.ts +0 -63
  29. package/src/scripts/workflow/authorization-context-resolver.js +0 -107
  30. package/src/scripts/workflow/authorization-context-resolver.js.map +0 -1
  31. package/src/scripts/wp-authorize.d.ts +0 -2
  32. package/src/scripts/wp-authorize.js +0 -22
  33. package/src/scripts/wp-authorize.js.map +0 -1
  34. package/src/scripts/wp-check-auth.d.ts +0 -2
  35. package/src/scripts/wp-check-auth.js +0 -16
  36. package/src/scripts/wp-check-auth.js.map +0 -1
@@ -1,63 +0,0 @@
1
- import { AuthorizationContext, DiffScope } from '@webpieces/rules-config';
2
- import { AiBranchName } from './git-readAiBranchName';
3
- import { DiffBasisResolver } from './diff-basis';
4
- /**
5
- * THE changed-file set the review system judges a branch by — extracted so the checklist scanner and the
6
- * authorization commands cannot answer it two different ways.
7
- *
8
- * Two non-default options, both load-bearing, and both the reason this is worth a class rather than a
9
- * repeated three-liner:
10
- *
11
- * `tsOnly:false` — the default drops every *.sql / Dockerfile / .env* file, silently shrinking the
12
- * set a reviewer is pointed at — and, here, the set an approval's scope is
13
- * checked against, which would let terraform-adjacent files slip inside a
14
- * "terraform only" grant.
15
- * `includeDeletions:true` — the default is `--diff-filter=d`, so a DELETED file is invisible. A PR that
16
- * deletes a migration or an auth check changed exactly what a checklist exists
17
- * to catch.
18
- *
19
- * `@injectable(bindingScopeValues.Singleton)` so it is injected by type and drawn in the DI design.
20
- */
21
- export declare class ReviewChangedFiles {
22
- private readonly diffScope;
23
- constructor(diffScope: DiffScope);
24
- /**
25
- * Every file changed since `base`, INCLUDING uncommitted and untracked ones. [] when there is no base.
26
- *
27
- * No head argument — that is the branch of `getChangedFiles` which diffs base → WORKING TREE and unions
28
- * in untracked files. Passing a head would diff commit-to-commit and miss staged, unstaged and
29
- * untracked work, so an approval could be verified against a scope the working tree has already grown
30
- * out of.
31
- */
32
- since(repoRoot: string, base: string): string[];
33
- }
34
- /**
35
- * Gathers the ONE branch state a human authorization is minted against and verified against: the stable
36
- * feature name, the fork point, and the changed-file set.
37
- *
38
- * Why the FEATURE name and not `git branch --show-current`: the 3-point merge parks the checkout on a
39
- * transient `<feature>Squash` branch, and an approval keyed to the raw branch name would stop verifying
40
- * for exactly as long as the flow that needs it is running. `AiBranchName.getFeatureName()` is already the
41
- * stable identity every other per-branch artifact is keyed by, so an approval lives and dies with the same
42
- * unit of work as the review it authorizes.
43
- *
44
- * `@injectable(bindingScopeValues.Singleton)` so it is injected by type and drawn in the DI design.
45
- */
46
- export declare class AuthorizationContextResolver {
47
- private readonly aiBranchName;
48
- private readonly diffBasisResolver;
49
- private readonly changedFiles;
50
- constructor(aiBranchName: AiBranchName, diffBasisResolver: DiffBasisResolver, changedFiles: ReviewChangedFiles);
51
- resolve(repoRoot: string): AuthorizationContext;
52
- /**
53
- * The scope globs PROPOSED for a fresh approval, derived from what the diff touches today: one
54
- * `<dir>/**` per distinct directory, collapsed to the first two path segments so a deep tree yields a
55
- * readable handful rather than one glob per folder.
56
- *
57
- * Proposed, never imposed — `wp-authorize` prints these and lets the human replace them. The derived
58
- * default matters anyway, because the alternative to a good default is a human who types `**` to get
59
- * past the prompt, and `**` is the widening-by-absence this whole mechanism exists to make impossible
60
- * to reach by accident.
61
- */
62
- proposeScopePaths(changedFiles: readonly string[]): string[];
63
- }
@@ -1,107 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AuthorizationContextResolver = exports.ReviewChangedFiles = void 0;
4
- const tslib_1 = require("tslib");
5
- const rules_config_1 = require("@webpieces/rules-config");
6
- const inversify_1 = require("inversify");
7
- const git_readAiBranchName_1 = require("./git-readAiBranchName");
8
- const diff_basis_1 = require("./diff-basis");
9
- /**
10
- * THE changed-file set the review system judges a branch by — extracted so the checklist scanner and the
11
- * authorization commands cannot answer it two different ways.
12
- *
13
- * Two non-default options, both load-bearing, and both the reason this is worth a class rather than a
14
- * repeated three-liner:
15
- *
16
- * `tsOnly:false` — the default drops every *.sql / Dockerfile / .env* file, silently shrinking the
17
- * set a reviewer is pointed at — and, here, the set an approval's scope is
18
- * checked against, which would let terraform-adjacent files slip inside a
19
- * "terraform only" grant.
20
- * `includeDeletions:true` — the default is `--diff-filter=d`, so a DELETED file is invisible. A PR that
21
- * deletes a migration or an auth check changed exactly what a checklist exists
22
- * to catch.
23
- *
24
- * `@injectable(bindingScopeValues.Singleton)` so it is injected by type and drawn in the DI design.
25
- */
26
- let ReviewChangedFiles = class ReviewChangedFiles {
27
- diffScope;
28
- constructor(diffScope) {
29
- this.diffScope = diffScope;
30
- }
31
- /**
32
- * Every file changed since `base`, INCLUDING uncommitted and untracked ones. [] when there is no base.
33
- *
34
- * No head argument — that is the branch of `getChangedFiles` which diffs base → WORKING TREE and unions
35
- * in untracked files. Passing a head would diff commit-to-commit and miss staged, unstaged and
36
- * untracked work, so an approval could be verified against a scope the working tree has already grown
37
- * out of.
38
- */
39
- since(repoRoot, base) {
40
- if (base === '')
41
- return [];
42
- const opts = new rules_config_1.ChangedFilesOptions();
43
- opts.tsOnly = false;
44
- opts.includeDeletions = true;
45
- return this.diffScope.getChangedFiles(repoRoot, base, undefined, opts);
46
- }
47
- };
48
- exports.ReviewChangedFiles = ReviewChangedFiles;
49
- exports.ReviewChangedFiles = ReviewChangedFiles = tslib_1.__decorate([
50
- (0, inversify_1.injectable)(inversify_1.bindingScopeValues.Singleton),
51
- tslib_1.__metadata("design:paramtypes", [rules_config_1.DiffScope])
52
- ], ReviewChangedFiles);
53
- /**
54
- * Gathers the ONE branch state a human authorization is minted against and verified against: the stable
55
- * feature name, the fork point, and the changed-file set.
56
- *
57
- * Why the FEATURE name and not `git branch --show-current`: the 3-point merge parks the checkout on a
58
- * transient `<feature>Squash` branch, and an approval keyed to the raw branch name would stop verifying
59
- * for exactly as long as the flow that needs it is running. `AiBranchName.getFeatureName()` is already the
60
- * stable identity every other per-branch artifact is keyed by, so an approval lives and dies with the same
61
- * unit of work as the review it authorizes.
62
- *
63
- * `@injectable(bindingScopeValues.Singleton)` so it is injected by type and drawn in the DI design.
64
- */
65
- let AuthorizationContextResolver = class AuthorizationContextResolver {
66
- aiBranchName;
67
- diffBasisResolver;
68
- changedFiles;
69
- constructor(aiBranchName, diffBasisResolver, changedFiles) {
70
- this.aiBranchName = aiBranchName;
71
- this.diffBasisResolver = diffBasisResolver;
72
- this.changedFiles = changedFiles;
73
- }
74
- resolve(repoRoot) {
75
- const base = this.diffBasisResolver.resolve(repoRoot).base;
76
- return new rules_config_1.AuthorizationContext(this.aiBranchName.getFeatureName(), base, this.changedFiles.since(repoRoot, base));
77
- }
78
- /**
79
- * The scope globs PROPOSED for a fresh approval, derived from what the diff touches today: one
80
- * `<dir>/**` per distinct directory, collapsed to the first two path segments so a deep tree yields a
81
- * readable handful rather than one glob per folder.
82
- *
83
- * Proposed, never imposed — `wp-authorize` prints these and lets the human replace them. The derived
84
- * default matters anyway, because the alternative to a good default is a human who types `**` to get
85
- * past the prompt, and `**` is the widening-by-absence this whole mechanism exists to make impossible
86
- * to reach by accident.
87
- */
88
- proposeScopePaths(changedFiles) {
89
- const globs = new Set();
90
- for (const file of changedFiles) {
91
- const parts = file.split('/');
92
- if (parts.length === 1)
93
- globs.add(file);
94
- else
95
- globs.add(`${parts.slice(0, Math.min(2, parts.length - 1)).join('/')}/**`);
96
- }
97
- return [...globs].sort();
98
- }
99
- };
100
- exports.AuthorizationContextResolver = AuthorizationContextResolver;
101
- exports.AuthorizationContextResolver = AuthorizationContextResolver = tslib_1.__decorate([
102
- (0, inversify_1.injectable)(inversify_1.bindingScopeValues.Singleton),
103
- tslib_1.__metadata("design:paramtypes", [git_readAiBranchName_1.AiBranchName,
104
- diff_basis_1.DiffBasisResolver,
105
- ReviewChangedFiles])
106
- ], AuthorizationContextResolver);
107
- //# sourceMappingURL=authorization-context-resolver.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"authorization-context-resolver.js","sourceRoot":"","sources":["../../../../../../../packages/tooling/pr-gate/src/scripts/workflow/authorization-context-resolver.ts"],"names":[],"mappings":";;;;AAAA,0DAA+F;AAC/F,yCAA2D;AAC3D,iEAAsD;AACtD,6CAAiD;AAEjD;;;;;;;;;;;;;;;;GAgBG;AAEI,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IACE;IAA7B,YAA6B,SAAoB;QAApB,cAAS,GAAT,SAAS,CAAW;IAAG,CAAC;IAErD;;;;;;;OAOG;IACH,KAAK,CAAC,QAAgB,EAAE,IAAY;QAChC,IAAI,IAAI,KAAK,EAAE;YAAE,OAAO,EAAE,CAAC;QAC3B,MAAM,IAAI,GAAG,IAAI,kCAAmB,EAAE,CAAC;QACvC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;QAC7B,OAAO,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC;IAC3E,CAAC;CACJ,CAAA;AAlBY,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,sBAAU,EAAC,8BAAkB,CAAC,SAAS,CAAC;6CAEG,wBAAS;GADxC,kBAAkB,CAkB9B;AAED;;;;;;;;;;;GAWG;AAEI,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IAEhB;IACA;IACA;IAHrB,YACqB,YAA0B,EAC1B,iBAAoC,EACpC,YAAgC;QAFhC,iBAAY,GAAZ,YAAY,CAAc;QAC1B,sBAAiB,GAAjB,iBAAiB,CAAmB;QACpC,iBAAY,GAAZ,YAAY,CAAoB;IAClD,CAAC;IAEJ,OAAO,CAAC,QAAgB;QACpB,MAAM,IAAI,GAAG,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC;QAC3D,OAAO,IAAI,mCAAoB,CAC3B,IAAI,CAAC,YAAY,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC;IAC3F,CAAC;IAED;;;;;;;;;OASG;IACH,iBAAiB,CAAC,YAA+B;QAC7C,MAAM,KAAK,GAAG,IAAI,GAAG,EAAU,CAAC;QAChC,KAAK,MAAM,IAAI,IAAI,YAAY,EAAE,CAAC;YAC9B,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAC9B,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;gBAAE,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;;gBACnC,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACpF,CAAC;QACD,OAAO,CAAC,GAAG,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC;IAC7B,CAAC;CACJ,CAAA;AAhCY,oEAA4B;uCAA5B,4BAA4B;IADxC,IAAA,sBAAU,EAAC,8BAAkB,CAAC,SAAS,CAAC;6CAGF,mCAAY;QACP,8BAAiB;QACtB,kBAAkB;GAJ5C,4BAA4B,CAgCxC","sourcesContent":["import { AuthorizationContext, ChangedFilesOptions, DiffScope } from '@webpieces/rules-config';\nimport { injectable, bindingScopeValues } from 'inversify';\nimport { AiBranchName } from './git-readAiBranchName';\nimport { DiffBasisResolver } from './diff-basis';\n\n/**\n * THE changed-file set the review system judges a branch by — extracted so the checklist scanner and the\n * authorization commands cannot answer it two different ways.\n *\n * Two non-default options, both load-bearing, and both the reason this is worth a class rather than a\n * repeated three-liner:\n *\n * `tsOnly:false` — the default drops every *.sql / Dockerfile / .env* file, silently shrinking the\n * set a reviewer is pointed at — and, here, the set an approval's scope is\n * checked against, which would let terraform-adjacent files slip inside a\n * \"terraform only\" grant.\n * `includeDeletions:true` — the default is `--diff-filter=d`, so a DELETED file is invisible. A PR that\n * deletes a migration or an auth check changed exactly what a checklist exists\n * to catch.\n *\n * `@injectable(bindingScopeValues.Singleton)` so it is injected by type and drawn in the DI design.\n */\n@injectable(bindingScopeValues.Singleton)\nexport class ReviewChangedFiles {\n constructor(private readonly diffScope: DiffScope) {}\n\n /**\n * Every file changed since `base`, INCLUDING uncommitted and untracked ones. [] when there is no base.\n *\n * No head argument — that is the branch of `getChangedFiles` which diffs base → WORKING TREE and unions\n * in untracked files. Passing a head would diff commit-to-commit and miss staged, unstaged and\n * untracked work, so an approval could be verified against a scope the working tree has already grown\n * out of.\n */\n since(repoRoot: string, base: string): string[] {\n if (base === '') return [];\n const opts = new ChangedFilesOptions();\n opts.tsOnly = false;\n opts.includeDeletions = true;\n return this.diffScope.getChangedFiles(repoRoot, base, undefined, opts);\n }\n}\n\n/**\n * Gathers the ONE branch state a human authorization is minted against and verified against: the stable\n * feature name, the fork point, and the changed-file set.\n *\n * Why the FEATURE name and not `git branch --show-current`: the 3-point merge parks the checkout on a\n * transient `<feature>Squash` branch, and an approval keyed to the raw branch name would stop verifying\n * for exactly as long as the flow that needs it is running. `AiBranchName.getFeatureName()` is already the\n * stable identity every other per-branch artifact is keyed by, so an approval lives and dies with the same\n * unit of work as the review it authorizes.\n *\n * `@injectable(bindingScopeValues.Singleton)` so it is injected by type and drawn in the DI design.\n */\n@injectable(bindingScopeValues.Singleton)\nexport class AuthorizationContextResolver {\n constructor(\n private readonly aiBranchName: AiBranchName,\n private readonly diffBasisResolver: DiffBasisResolver,\n private readonly changedFiles: ReviewChangedFiles,\n ) {}\n\n resolve(repoRoot: string): AuthorizationContext {\n const base = this.diffBasisResolver.resolve(repoRoot).base;\n return new AuthorizationContext(\n this.aiBranchName.getFeatureName(), base, this.changedFiles.since(repoRoot, base));\n }\n\n /**\n * The scope globs PROPOSED for a fresh approval, derived from what the diff touches today: one\n * `<dir>/**` per distinct directory, collapsed to the first two path segments so a deep tree yields a\n * readable handful rather than one glob per folder.\n *\n * Proposed, never imposed — `wp-authorize` prints these and lets the human replace them. The derived\n * default matters anyway, because the alternative to a good default is a human who types `**` to get\n * past the prompt, and `**` is the widening-by-absence this whole mechanism exists to make impossible\n * to reach by accident.\n */\n proposeScopePaths(changedFiles: readonly string[]): string[] {\n const globs = new Set<string>();\n for (const file of changedFiles) {\n const parts = file.split('/');\n if (parts.length === 1) globs.add(file);\n else globs.add(`${parts.slice(0, Math.min(2, parts.length - 1)).join('/')}/**`);\n }\n return [...globs].sort();\n }\n}\n"]}
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import 'reflect-metadata';
@@ -1,22 +0,0 @@
1
- #!/usr/bin/env node
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- require("reflect-metadata");
5
- const inversify_1 = require("inversify");
6
- const rules_config_1 = require("@webpieces/rules-config");
7
- const pr_gate_app_1 = require("./pr-gate-app");
8
- // Composition root for the HUMAN-ONLY authorization mint. It reads every prompt from /dev/tty, so an
9
- // agent's Bash tool cannot drive it — see AuthorizeCommand for why that gate, and not stdin, is the
10
- // mechanism. The matching harness `permissions.deny` entry exists to make the refusal legible rather
11
- // than a hang.
12
- (0, rules_config_1.runMain)(async () => {
13
- // autobind self-binds every @injectable(Singleton) tooling class (replaces the buildProviderModule registry scan)
14
- const container = new inversify_1.Container({ autobind: true });
15
- const args = container.get(rules_config_1.CliArgs).parse(new rules_config_1.CliUsage('wp-authorize', 'HUMAN ONLY: sign an authorization letting one review checklist be overridden on this branch.', [
16
- new rules_config_1.CliFlag('--checklist', 'REQUIRED. The checklist id (= reviewer subagent name) being authorized.', true),
17
- new rules_config_1.CliFlag('--gate', 'Optional. The specific gate inside that checklist this approval is for.', true),
18
- new rules_config_1.CliFlag('--hours', 'Optional. How long the approval lives (default 4). An approval is for today\'s work.', true),
19
- ]));
20
- container.get(pr_gate_app_1.PrGateApp).authorize(args);
21
- });
22
- //# sourceMappingURL=wp-authorize.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"wp-authorize.js","sourceRoot":"","sources":["../../../../../../packages/tooling/pr-gate/src/scripts/wp-authorize.ts"],"names":[],"mappings":";;;AACA,4BAA0B;AAC1B,yCAAsC;AACtC,0DAA8E;AAC9E,+CAA0C;AAE1C,qGAAqG;AACrG,oGAAoG;AACpG,qGAAqG;AACrG,eAAe;AACf,IAAA,sBAAO,EAAC,KAAK,IAAmB,EAAE;IAC9B,kHAAkH;IAClH,MAAM,SAAS,GAAG,IAAI,qBAAS,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;IACpD,MAAM,IAAI,GAAG,SAAS,CAAC,GAAG,CAAC,sBAAO,CAAC,CAAC,KAAK,CAAC,IAAI,uBAAQ,CAClD,cAAc,EACd,8FAA8F,EAC9F;QACI,IAAI,sBAAO,CAAC,aAAa,EAAE,yEAAyE,EAAE,IAAI,CAAC;QAC3G,IAAI,sBAAO,CAAC,QAAQ,EAAE,yEAAyE,EAAE,IAAI,CAAC;QACtG,IAAI,sBAAO,CAAC,SAAS,EAAE,sFAAsF,EAAE,IAAI,CAAC;KACvH,CACJ,CAAC,CAAC;IACH,SAAS,CAAC,GAAG,CAAC,uBAAS,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;AAC7C,CAAC,CAAC,CAAC","sourcesContent":["#!/usr/bin/env node\nimport 'reflect-metadata';\nimport { Container } from 'inversify';\nimport { runMain, CliArgs, CliUsage, CliFlag } from '@webpieces/rules-config';\nimport { PrGateApp } from './pr-gate-app';\n\n// Composition root for the HUMAN-ONLY authorization mint. It reads every prompt from /dev/tty, so an\n// agent's Bash tool cannot drive it — see AuthorizeCommand for why that gate, and not stdin, is the\n// mechanism. The matching harness `permissions.deny` entry exists to make the refusal legible rather\n// than a hang.\nrunMain(async (): Promise<void> => {\n // autobind self-binds every @injectable(Singleton) tooling class (replaces the buildProviderModule registry scan)\n const container = new Container({ autobind: true });\n const args = container.get(CliArgs).parse(new CliUsage(\n 'wp-authorize',\n 'HUMAN ONLY: sign an authorization letting one review checklist be overridden on this branch.',\n [\n new CliFlag('--checklist', 'REQUIRED. The checklist id (= reviewer subagent name) being authorized.', true),\n new CliFlag('--gate', 'Optional. The specific gate inside that checklist this approval is for.', true),\n new CliFlag('--hours', 'Optional. How long the approval lives (default 4). An approval is for today\\'s work.', true),\n ],\n ));\n container.get(PrGateApp).authorize(args);\n});\n"]}
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import 'reflect-metadata';
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env node
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- require("reflect-metadata");
5
- const inversify_1 = require("inversify");
6
- const rules_config_1 = require("@webpieces/rules-config");
7
- const pr_gate_app_1 = require("./pr-gate-app");
8
- // Composition root for the AGENT-runnable half: read-only verification of the approvals a human signed
9
- // with wp-authorize. This is the only channel a reviewer may accept an override from.
10
- (0, rules_config_1.runMain)(async () => {
11
- // autobind self-binds every @injectable(Singleton) tooling class (replaces the buildProviderModule registry scan)
12
- const container = new inversify_1.Container({ autobind: true });
13
- const args = container.get(rules_config_1.CliArgs).parse(new rules_config_1.CliUsage('wp-check-auth', 'Verify (never mint) the human authorizations recorded for this branch. Read-only; agents run this.', [new rules_config_1.CliFlag('--checklist', 'Only report this checklist id. Omitted: report every approval on the branch.', true)]));
14
- container.get(pr_gate_app_1.PrGateApp).checkAuth(args);
15
- });
16
- //# sourceMappingURL=wp-check-auth.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"wp-check-auth.js","sourceRoot":"","sources":["../../../../../../packages/tooling/pr-gate/src/scripts/wp-check-auth.ts"],"names":[],"mappings":";;;AACA,4BAA0B;AAC1B,yCAAsC;AACtC,0DAA8E;AAC9E,+CAA0C;AAE1C,uGAAuG;AACvG,sFAAsF;AACtF,IAAA,sBAAO,EAAC,KAAK,IAAmB,EAAE;IAC9B,kHAAkH;IAClH,MAAM,SAAS,GAAG,IAAI,qBAAS,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;IACpD,MAAM,IAAI,GAAG,SAAS,CAAC,GAAG,CAAC,sBAAO,CAAC,CAAC,KAAK,CAAC,IAAI,uBAAQ,CAClD,eAAe,EACf,oGAAoG,EACpG,CAAC,IAAI,sBAAO,CAAC,aAAa,EAAE,8EAA8E,EAAE,IAAI,CAAC,CAAC,CACrH,CAAC,CAAC;IACH,SAAS,CAAC,GAAG,CAAC,uBAAS,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;AAC7C,CAAC,CAAC,CAAC","sourcesContent":["#!/usr/bin/env node\nimport 'reflect-metadata';\nimport { Container } from 'inversify';\nimport { runMain, CliArgs, CliUsage, CliFlag } from '@webpieces/rules-config';\nimport { PrGateApp } from './pr-gate-app';\n\n// Composition root for the AGENT-runnable half: read-only verification of the approvals a human signed\n// with wp-authorize. This is the only channel a reviewer may accept an override from.\nrunMain(async (): Promise<void> => {\n // autobind self-binds every @injectable(Singleton) tooling class (replaces the buildProviderModule registry scan)\n const container = new Container({ autobind: true });\n const args = container.get(CliArgs).parse(new CliUsage(\n 'wp-check-auth',\n 'Verify (never mint) the human authorizations recorded for this branch. Read-only; agents run this.',\n [new CliFlag('--checklist', 'Only report this checklist id. Omitted: report every approval on the branch.', true)],\n ));\n container.get(PrGateApp).checkAuth(args);\n});\n"]}