@mohantn/gate-keeper 2.2.0 → 2.2.1
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/README.md +82 -46
- package/package.json +1 -1
- package/dist/cli/query-repl.d.ts +0 -37
- package/dist/cli/query-repl.d.ts.map +0 -1
- package/dist/cli/query-repl.js +0 -298
- package/dist/cli/query-repl.js.map +0 -1
- package/dist/cli/repl-algorithms.d.ts +0 -49
- package/dist/cli/repl-algorithms.d.ts.map +0 -1
- package/dist/cli/repl-algorithms.js +0 -147
- package/dist/cli/repl-algorithms.js.map +0 -1
- package/dist/cli/setup-core.d.ts +0 -38
- package/dist/cli/setup-core.d.ts.map +0 -1
- package/dist/cli/setup-core.js +0 -427
- package/dist/cli/setup-core.js.map +0 -1
- package/dist/cli/setup.d.ts +0 -25
- package/dist/cli/setup.d.ts.map +0 -1
- package/dist/cli/setup.js +0 -159
- package/dist/cli/setup.js.map +0 -1
- package/dist/github/app.d.ts +0 -34
- package/dist/github/app.d.ts.map +0 -1
- package/dist/github/app.js +0 -261
- package/dist/github/app.js.map +0 -1
- package/dist/github/commenter.d.ts +0 -67
- package/dist/github/commenter.d.ts.map +0 -1
- package/dist/github/commenter.js +0 -155
- package/dist/github/commenter.js.map +0 -1
- package/dist/hooks/git-hooks.d.ts +0 -30
- package/dist/hooks/git-hooks.d.ts.map +0 -1
- package/dist/hooks/git-hooks.js +0 -179
- package/dist/hooks/git-hooks.js.map +0 -1
- package/dist/mcp/cache-preload.d.ts +0 -29
- package/dist/mcp/cache-preload.d.ts.map +0 -1
- package/dist/mcp/cache-preload.js +0 -103
- package/dist/mcp/cache-preload.js.map +0 -1
- package/dist/mcp/handlers/context.d.ts +0 -25
- package/dist/mcp/handlers/context.d.ts.map +0 -1
- package/dist/mcp/handlers/context.js +0 -382
- package/dist/mcp/handlers/context.js.map +0 -1
- package/dist/mcp/handlers/graph-intelligence.d.ts +0 -26
- package/dist/mcp/handlers/graph-intelligence.d.ts.map +0 -1
- package/dist/mcp/handlers/graph-intelligence.js +0 -371
- package/dist/mcp/handlers/graph-intelligence.js.map +0 -1
- package/dist/mcp/handlers/graph-query.d.ts +0 -25
- package/dist/mcp/handlers/graph-query.d.ts.map +0 -1
- package/dist/mcp/handlers/graph-query.js +0 -410
- package/dist/mcp/handlers/graph-query.js.map +0 -1
- package/dist/mcp/handlers/impact.d.ts +0 -4
- package/dist/mcp/handlers/impact.d.ts.map +0 -1
- package/dist/mcp/handlers/impact.js +0 -139
- package/dist/mcp/handlers/impact.js.map +0 -1
- package/dist/mcp/handlers/improvement.d.ts +0 -4
- package/dist/mcp/handlers/improvement.d.ts.map +0 -1
- package/dist/mcp/handlers/improvement.js +0 -136
- package/dist/mcp/handlers/improvement.js.map +0 -1
- package/dist/mcp/handlers/platform-installer.d.ts +0 -10
- package/dist/mcp/handlers/platform-installer.d.ts.map +0 -1
- package/dist/mcp/handlers/platform-installer.js +0 -168
- package/dist/mcp/handlers/platform-installer.js.map +0 -1
- package/dist/mcp/handlers/pr-review.d.ts +0 -33
- package/dist/mcp/handlers/pr-review.d.ts.map +0 -1
- package/dist/mcp/handlers/pr-review.js +0 -170
- package/dist/mcp/handlers/pr-review.js.map +0 -1
- package/dist/mcp/token-tracker.d.ts +0 -47
- package/dist/mcp/token-tracker.d.ts.map +0 -1
- package/dist/mcp/token-tracker.js +0 -93
- package/dist/mcp/token-tracker.js.map +0 -1
- package/dist/quality-loop/file-lock.d.ts +0 -12
- package/dist/quality-loop/file-lock.d.ts.map +0 -1
- package/dist/quality-loop/file-lock.js +0 -38
- package/dist/quality-loop/file-lock.js.map +0 -1
- package/dist/quality-loop/fix-worker.d.ts +0 -44
- package/dist/quality-loop/fix-worker.d.ts.map +0 -1
- package/dist/quality-loop/fix-worker.js +0 -414
- package/dist/quality-loop/fix-worker.js.map +0 -1
- package/dist/quality-loop/orchestrator.d.ts +0 -137
- package/dist/quality-loop/orchestrator.d.ts.map +0 -1
- package/dist/quality-loop/orchestrator.js +0 -894
- package/dist/quality-loop/orchestrator.js.map +0 -1
- package/dist/quality-loop/queue-manager.d.ts +0 -45
- package/dist/quality-loop/queue-manager.d.ts.map +0 -1
- package/dist/quality-loop/queue-manager.js +0 -173
- package/dist/quality-loop/queue-manager.js.map +0 -1
package/dist/cli/setup.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* gate-keeper setup — one-shot installation for all platforms.
|
|
4
|
-
*
|
|
5
|
-
* Usage:
|
|
6
|
-
* npx tsx src/cli/setup.ts ← auto-detect, ask for targets
|
|
7
|
-
* npx tsx src/cli/setup.ts --dir=/path/to/repo --all
|
|
8
|
-
* npx tsx src/cli/setup.ts --claude --copilot --git-hooks
|
|
9
|
-
*
|
|
10
|
-
* What it does:
|
|
11
|
-
* 1. Detects repo root and writes .graphifyignore with defaults
|
|
12
|
-
* 2. Installs Claude Code hooks in ~/.claude/settings.json
|
|
13
|
-
* 3. Creates .vscode/mcp.json for Copilot / VS Code
|
|
14
|
-
* 4. Creates .cursorrules for Cursor
|
|
15
|
-
* 5. Creates .github/workflows/gate-keeper.yml for CI
|
|
16
|
-
* 6. Installs post-commit + post-checkout git hooks
|
|
17
|
-
* 7. Starts the daemon and runs an initial scan
|
|
18
|
-
* 8. Generates the first graph report
|
|
19
|
-
*/
|
|
20
|
-
import { InstallationStep, SetupOptions } from './setup-core';
|
|
21
|
-
export declare function main(): Promise<void>;
|
|
22
|
-
export declare function findArg(args: string[], name: string): string | null;
|
|
23
|
-
export declare function findGitRoot(dir: string): string;
|
|
24
|
-
export declare function buildSteps(opts: SetupOptions): InstallationStep[];
|
|
25
|
-
//# sourceMappingURL=setup.d.ts.map
|
package/dist/cli/setup.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/cli/setup.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;GAiBG;AAMH,OAAO,EACL,gBAAgB,EAUhB,YAAY,EAEb,MAAM,cAAc,CAAC;AAItB,wBAAsB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAiD1C;AAID,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAMnE;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAK/C;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,YAAY,GAAG,gBAAgB,EAAE,CAiCjE"}
|
package/dist/cli/setup.js
DELETED
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
/**
|
|
4
|
-
* gate-keeper setup — one-shot installation for all platforms.
|
|
5
|
-
*
|
|
6
|
-
* Usage:
|
|
7
|
-
* npx tsx src/cli/setup.ts ← auto-detect, ask for targets
|
|
8
|
-
* npx tsx src/cli/setup.ts --dir=/path/to/repo --all
|
|
9
|
-
* npx tsx src/cli/setup.ts --claude --copilot --git-hooks
|
|
10
|
-
*
|
|
11
|
-
* What it does:
|
|
12
|
-
* 1. Detects repo root and writes .graphifyignore with defaults
|
|
13
|
-
* 2. Installs Claude Code hooks in ~/.claude/settings.json
|
|
14
|
-
* 3. Creates .vscode/mcp.json for Copilot / VS Code
|
|
15
|
-
* 4. Creates .cursorrules for Cursor
|
|
16
|
-
* 5. Creates .github/workflows/gate-keeper.yml for CI
|
|
17
|
-
* 6. Installs post-commit + post-checkout git hooks
|
|
18
|
-
* 7. Starts the daemon and runs an initial scan
|
|
19
|
-
* 8. Generates the first graph report
|
|
20
|
-
*/
|
|
21
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
22
|
-
if (k2 === undefined) k2 = k;
|
|
23
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
24
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
25
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
26
|
-
}
|
|
27
|
-
Object.defineProperty(o, k2, desc);
|
|
28
|
-
}) : (function(o, m, k, k2) {
|
|
29
|
-
if (k2 === undefined) k2 = k;
|
|
30
|
-
o[k2] = m[k];
|
|
31
|
-
}));
|
|
32
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
33
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
34
|
-
}) : function(o, v) {
|
|
35
|
-
o["default"] = v;
|
|
36
|
-
});
|
|
37
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
38
|
-
var ownKeys = function(o) {
|
|
39
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
40
|
-
var ar = [];
|
|
41
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
42
|
-
return ar;
|
|
43
|
-
};
|
|
44
|
-
return ownKeys(o);
|
|
45
|
-
};
|
|
46
|
-
return function (mod) {
|
|
47
|
-
if (mod && mod.__esModule) return mod;
|
|
48
|
-
var result = {};
|
|
49
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
50
|
-
__setModuleDefault(result, mod);
|
|
51
|
-
return result;
|
|
52
|
-
};
|
|
53
|
-
})();
|
|
54
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
55
|
-
exports.main = main;
|
|
56
|
-
exports.findArg = findArg;
|
|
57
|
-
exports.findGitRoot = findGitRoot;
|
|
58
|
-
exports.buildSteps = buildSteps;
|
|
59
|
-
const path = __importStar(require("path"));
|
|
60
|
-
const child_process_1 = require("child_process");
|
|
61
|
-
const setup_core_1 = require("./setup-core");
|
|
62
|
-
// ── Main ───────────────────────────────────────────────────
|
|
63
|
-
async function main() {
|
|
64
|
-
const args = process.argv.slice(2);
|
|
65
|
-
const repoDir = findArg(args, '--dir') ?? process.cwd();
|
|
66
|
-
const repoRoot = findGitRoot(repoDir);
|
|
67
|
-
const gkDir = path.resolve(__dirname, '..', '..');
|
|
68
|
-
const flags = {
|
|
69
|
-
all: args.includes('--all'),
|
|
70
|
-
claude: args.includes('--claude'),
|
|
71
|
-
copilot: args.includes('--copilot') || args.includes('--vscode'),
|
|
72
|
-
cursor: args.includes('--cursor'),
|
|
73
|
-
gitHooks: args.includes('--git-hooks'),
|
|
74
|
-
githubAction: args.includes('--github-action'),
|
|
75
|
-
scan: !args.includes('--no-scan'),
|
|
76
|
-
force: args.includes('--force'),
|
|
77
|
-
repoRoot,
|
|
78
|
-
gkDir,
|
|
79
|
-
};
|
|
80
|
-
// If no specific flags, prompt for targets
|
|
81
|
-
if (!flags.all && !flags.claude && !flags.copilot && !flags.cursor && !flags.gitHooks && !flags.githubAction) {
|
|
82
|
-
process.stdout.write('\n ⬡ Gate Keeper Setup\n\n');
|
|
83
|
-
process.stdout.write(` Repository: ${repoRoot}\n`);
|
|
84
|
-
process.stdout.write(` Gate Keeper: ${gkDir}\n\n`);
|
|
85
|
-
process.stdout.write(' Installing with defaults for detected environment...\n\n');
|
|
86
|
-
flags.all = true;
|
|
87
|
-
}
|
|
88
|
-
const results = [];
|
|
89
|
-
const steps = buildSteps(flags);
|
|
90
|
-
for (const step of steps) {
|
|
91
|
-
process.stdout.write(` [ ] ${step.label}... `);
|
|
92
|
-
try {
|
|
93
|
-
const result = await step.run();
|
|
94
|
-
results.push(result);
|
|
95
|
-
process.stdout.clearLine(0);
|
|
96
|
-
process.stdout.cursorTo(0);
|
|
97
|
-
process.stdout.write(` ${result.icon} ${result.message}\n`);
|
|
98
|
-
}
|
|
99
|
-
catch (err) {
|
|
100
|
-
process.stdout.clearLine(0);
|
|
101
|
-
process.stdout.cursorTo(0);
|
|
102
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
103
|
-
process.stdout.write(` ❌ ${step.label}: ${msg}\n`);
|
|
104
|
-
results.push({ step: step.label, icon: '❌', message: msg, path: null });
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
(0, setup_core_1.printSummary)(results, repoRoot);
|
|
108
|
-
}
|
|
109
|
-
// ── CLI helpers ───────────────────────────────────────────
|
|
110
|
-
function findArg(args, name) {
|
|
111
|
-
for (const a of args) {
|
|
112
|
-
if (a.startsWith(`${name}=`))
|
|
113
|
-
return a.slice(name.length + 1);
|
|
114
|
-
if (a === name)
|
|
115
|
-
return args[args.indexOf(a) + 1] ?? null;
|
|
116
|
-
}
|
|
117
|
-
return null;
|
|
118
|
-
}
|
|
119
|
-
function findGitRoot(dir) {
|
|
120
|
-
const result = (0, child_process_1.spawnSync)('git', ['rev-parse', '--show-toplevel'], {
|
|
121
|
-
cwd: dir, encoding: 'utf8', timeout: 3000,
|
|
122
|
-
});
|
|
123
|
-
return result.status === 0 && result.stdout.trim() ? result.stdout.trim() : dir;
|
|
124
|
-
}
|
|
125
|
-
function buildSteps(opts) {
|
|
126
|
-
const steps = [];
|
|
127
|
-
if (opts.all || true) {
|
|
128
|
-
steps.push({ label: 'Create .graphifyignore', run: () => (0, setup_core_1.defaultGraphifyIgnore)(opts) });
|
|
129
|
-
}
|
|
130
|
-
if (opts.all || opts.claude) {
|
|
131
|
-
steps.push({ label: 'Install Claude Code hooks', run: () => (0, setup_core_1.installClaudeHooks)(opts) });
|
|
132
|
-
}
|
|
133
|
-
if (opts.all || opts.copilot) {
|
|
134
|
-
steps.push({ label: 'Create Copilot instructions', run: () => (0, setup_core_1.installCopilotInstructions)(opts) });
|
|
135
|
-
steps.push({ label: 'Configure VS Code / Copilot MCP', run: () => (0, setup_core_1.installVscodeMcp)(opts) });
|
|
136
|
-
}
|
|
137
|
-
if (opts.all || opts.cursor) {
|
|
138
|
-
steps.push({ label: 'Configure Cursor rules', run: () => (0, setup_core_1.installCursorRules)(opts) });
|
|
139
|
-
}
|
|
140
|
-
if (opts.all || opts.githubAction) {
|
|
141
|
-
steps.push({ label: 'Create GitHub Actions workflow', run: () => (0, setup_core_1.installGitHubWorkflow)(opts) });
|
|
142
|
-
}
|
|
143
|
-
if (opts.all || opts.gitHooks) {
|
|
144
|
-
steps.push({ label: 'Install git hooks', run: () => (0, setup_core_1.installGitHooks)(opts) });
|
|
145
|
-
}
|
|
146
|
-
if (opts.all || opts.scan) {
|
|
147
|
-
steps.push({ label: 'Start daemon & run initial scan', run: () => (0, setup_core_1.runInitialScan)(opts) });
|
|
148
|
-
}
|
|
149
|
-
return steps;
|
|
150
|
-
}
|
|
151
|
-
// ── Entry point ───────────────────────────────────────────
|
|
152
|
-
if (require.main === module) {
|
|
153
|
-
main().catch(err => {
|
|
154
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
155
|
-
process.stderr.write(` ❌ Setup failed: ${msg}\n`);
|
|
156
|
-
process.exit(1);
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
//# sourceMappingURL=setup.js.map
|
package/dist/cli/setup.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setup.js","sourceRoot":"","sources":["../../src/cli/setup.ts"],"names":[],"mappings":";;AACA;;;;;;;;;;;;;;;;;GAiBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBH,oBAiDC;AAID,0BAMC;AAED,kCAKC;AAED,gCAiCC;AAxHD,2CAA6B;AAC7B,iDAAiD;AACjD,6CAasB;AAEtB,8DAA8D;AAEvD,KAAK,UAAU,IAAI;IACxB,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACnC,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IACxD,MAAM,QAAQ,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;IACtC,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE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K,CAAC;AACf,CAAC;AAED,6DAA6D;AAE7D,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;IAC5B,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;QACjB,MAAM,GAAG,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAC7D,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,qBAAqB,GAAG,IAAI,CAAC,CAAC;QACnD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/dist/github/app.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GitHub App webhook handler.
|
|
3
|
-
*
|
|
4
|
-
* Listens for push and pull_request webhooks from GitHub, runs graph analysis
|
|
5
|
-
* on changed files, and logs impact summaries to stderr.
|
|
6
|
-
*
|
|
7
|
-
* Configure via:
|
|
8
|
-
* EXPOSE_GITHUB_APP=true GK_WEBHOOK_SECRET=<secret> GK_GITHUB_TOKEN=<token> npx tsx src/github/app.ts
|
|
9
|
-
*
|
|
10
|
-
* GK_GITHUB_TOKEN is required for pull_request analysis (used to fetch changed files from the GitHub API).
|
|
11
|
-
*/
|
|
12
|
-
import { GraphNodeSummary } from './commenter';
|
|
13
|
-
export declare function verifySignature(payload: string, signature: string | undefined): boolean;
|
|
14
|
-
export declare function getRepoFullName(payload: Record<string, unknown>): string | null;
|
|
15
|
-
type GraphNode = {
|
|
16
|
-
id: string;
|
|
17
|
-
label: string;
|
|
18
|
-
rating: number;
|
|
19
|
-
violations: Array<{
|
|
20
|
-
severity: string;
|
|
21
|
-
}>;
|
|
22
|
-
};
|
|
23
|
-
type GraphEdge = {
|
|
24
|
-
source: string;
|
|
25
|
-
target: string;
|
|
26
|
-
};
|
|
27
|
-
type GraphData = {
|
|
28
|
-
nodes: GraphNode[];
|
|
29
|
-
edges: GraphEdge[];
|
|
30
|
-
};
|
|
31
|
-
export declare function buildPushSummaries(allFiles: Set<string>, graph: GraphData): GraphNodeSummary[];
|
|
32
|
-
export declare function startGitHubApp(): void;
|
|
33
|
-
export {};
|
|
34
|
-
//# sourceMappingURL=app.d.ts.map
|
package/dist/github/app.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/github/app.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAMH,OAAO,EAA+B,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAsB5E,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CASvF;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,GAAG,IAAI,CAG/E;AAED,KAAK,SAAS,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,KAAK,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC;AACxG,KAAK,SAAS,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AACpD,KAAK,SAAS,GAAG;IAAE,KAAK,EAAE,SAAS,EAAE,CAAC;IAAC,KAAK,EAAE,SAAS,EAAE,CAAA;CAAE,CAAC;AAE5D,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,SAAS,GAAG,gBAAgB,EAAE,CAiB9F;AAmHD,wBAAgB,cAAc,IAAI,IAAI,CAiCrC"}
|
package/dist/github/app.js
DELETED
|
@@ -1,261 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* GitHub App webhook handler.
|
|
4
|
-
*
|
|
5
|
-
* Listens for push and pull_request webhooks from GitHub, runs graph analysis
|
|
6
|
-
* on changed files, and logs impact summaries to stderr.
|
|
7
|
-
*
|
|
8
|
-
* Configure via:
|
|
9
|
-
* EXPOSE_GITHUB_APP=true GK_WEBHOOK_SECRET=<secret> GK_GITHUB_TOKEN=<token> npx tsx src/github/app.ts
|
|
10
|
-
*
|
|
11
|
-
* GK_GITHUB_TOKEN is required for pull_request analysis (used to fetch changed files from the GitHub API).
|
|
12
|
-
*/
|
|
13
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
-
}
|
|
19
|
-
Object.defineProperty(o, k2, desc);
|
|
20
|
-
}) : (function(o, m, k, k2) {
|
|
21
|
-
if (k2 === undefined) k2 = k;
|
|
22
|
-
o[k2] = m[k];
|
|
23
|
-
}));
|
|
24
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
-
}) : function(o, v) {
|
|
27
|
-
o["default"] = v;
|
|
28
|
-
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
30
|
-
var ownKeys = function(o) {
|
|
31
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
32
|
-
var ar = [];
|
|
33
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
34
|
-
return ar;
|
|
35
|
-
};
|
|
36
|
-
return ownKeys(o);
|
|
37
|
-
};
|
|
38
|
-
return function (mod) {
|
|
39
|
-
if (mod && mod.__esModule) return mod;
|
|
40
|
-
var result = {};
|
|
41
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
42
|
-
__setModuleDefault(result, mod);
|
|
43
|
-
return result;
|
|
44
|
-
};
|
|
45
|
-
})();
|
|
46
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
47
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
48
|
-
};
|
|
49
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
|
-
exports.verifySignature = verifySignature;
|
|
51
|
-
exports.getRepoFullName = getRepoFullName;
|
|
52
|
-
exports.buildPushSummaries = buildPushSummaries;
|
|
53
|
-
exports.startGitHubApp = startGitHubApp;
|
|
54
|
-
const express_1 = __importDefault(require("express"));
|
|
55
|
-
const crypto = __importStar(require("crypto"));
|
|
56
|
-
const http = __importStar(require("http"));
|
|
57
|
-
const https = __importStar(require("https"));
|
|
58
|
-
const commenter_1 = require("./commenter");
|
|
59
|
-
const PORT = parseInt(process.env['GK_GH_PORT'] ?? '5432', 10);
|
|
60
|
-
const WEBHOOK_SECRET = process.env['GK_WEBHOOK_SECRET'] ?? '';
|
|
61
|
-
const DAEMON_PORT = 5378;
|
|
62
|
-
// ── Helpers ────────────────────────────────────────────────
|
|
63
|
-
function fetchDaemonApi(urlPath) {
|
|
64
|
-
return new Promise((resolve) => {
|
|
65
|
-
const req = http.get(`http://127.0.0.1:${DAEMON_PORT}${urlPath}`, { timeout: 5000 }, (res) => {
|
|
66
|
-
let body = '';
|
|
67
|
-
res.on('data', (chunk) => { body += chunk; });
|
|
68
|
-
res.on('end', () => {
|
|
69
|
-
try {
|
|
70
|
-
resolve(JSON.parse(body));
|
|
71
|
-
}
|
|
72
|
-
catch {
|
|
73
|
-
resolve(null);
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
});
|
|
77
|
-
req.on('error', () => resolve(null));
|
|
78
|
-
req.on('timeout', () => { req.destroy(); resolve(null); });
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
function verifySignature(payload, signature) {
|
|
82
|
-
if (!WEBHOOK_SECRET)
|
|
83
|
-
return true;
|
|
84
|
-
if (!signature)
|
|
85
|
-
return false;
|
|
86
|
-
const sig = `sha256=${crypto.createHmac('sha256', WEBHOOK_SECRET).update(payload).digest('hex')}`;
|
|
87
|
-
try {
|
|
88
|
-
return crypto.timingSafeEqual(Buffer.from(sig), Buffer.from(signature));
|
|
89
|
-
}
|
|
90
|
-
catch {
|
|
91
|
-
return false;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
function getRepoFullName(payload) {
|
|
95
|
-
const repo = payload['repository'];
|
|
96
|
-
return repo ? `${repo['owner']}/${repo['name']}` : null;
|
|
97
|
-
}
|
|
98
|
-
function buildPushSummaries(allFiles, graph) {
|
|
99
|
-
const summaries = [];
|
|
100
|
-
for (const file of allFiles) {
|
|
101
|
-
const node = graph.nodes.find(n => n.id.endsWith(file));
|
|
102
|
-
if (!node)
|
|
103
|
-
continue;
|
|
104
|
-
const dependents = graph.edges.filter(e => e.target === node.id);
|
|
105
|
-
const fragile = graph.nodes.filter(n => dependents.some(d => d.source === n.id) && n.rating < 6);
|
|
106
|
-
summaries.push({
|
|
107
|
-
path: file,
|
|
108
|
-
rating: node.rating,
|
|
109
|
-
directDependents: dependents.length,
|
|
110
|
-
fragileDependents: fragile.length,
|
|
111
|
-
errors: node.violations.filter(v => v.severity === 'error').length,
|
|
112
|
-
warnings: node.violations.filter(v => v.severity === 'warning').length,
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
return summaries;
|
|
116
|
-
}
|
|
117
|
-
// ── Webhook handlers ──────────────────────────────────────
|
|
118
|
-
async function handlePush(payload) {
|
|
119
|
-
const repoName = getRepoFullName(payload);
|
|
120
|
-
const commits = (payload['commits'] ?? []);
|
|
121
|
-
const allFiles = new Set();
|
|
122
|
-
for (const c of commits) {
|
|
123
|
-
for (const f of c.modified ?? [])
|
|
124
|
-
allFiles.add(f);
|
|
125
|
-
for (const f of c.added ?? [])
|
|
126
|
-
allFiles.add(f);
|
|
127
|
-
}
|
|
128
|
-
if (allFiles.size === 0 || !repoName)
|
|
129
|
-
return;
|
|
130
|
-
const graphRaw = await fetchDaemonApi(`/api/graph`);
|
|
131
|
-
if (!graphRaw)
|
|
132
|
-
return;
|
|
133
|
-
const summaries = buildPushSummaries(allFiles, graphRaw);
|
|
134
|
-
if (summaries.length === 0)
|
|
135
|
-
return;
|
|
136
|
-
const ref = payload['ref'] ?? 'unknown';
|
|
137
|
-
const pr = {
|
|
138
|
-
number: 0,
|
|
139
|
-
title: `Push to ${ref}`,
|
|
140
|
-
author: payload['pusher']?.['name'] ?? 'unknown',
|
|
141
|
-
baseBranch: ref.replace('refs/heads/', ''),
|
|
142
|
-
headBranch: ref.replace('refs/heads/', ''),
|
|
143
|
-
};
|
|
144
|
-
const comment = (0, commenter_1.formatPRComment)(pr, summaries, repoName, graphRaw.nodes.length);
|
|
145
|
-
process.stderr.write(`[gate-keeper-github] Push analysis: ${summaries.length} files changed, verdict=${comment.verdict}\n`);
|
|
146
|
-
for (const s of summaries) {
|
|
147
|
-
process.stderr.write(`[gate-keeper-github] ${s.path}: ${s.rating}/10, ${s.fragileDependents} fragile\n`);
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
async function handlePullRequest(payload) {
|
|
151
|
-
const action = payload['action'];
|
|
152
|
-
if (action !== 'opened' && action !== 'synchronize')
|
|
153
|
-
return;
|
|
154
|
-
const repoName = getRepoFullName(payload);
|
|
155
|
-
const pr = payload['pull_request'];
|
|
156
|
-
if (!repoName || !pr)
|
|
157
|
-
return;
|
|
158
|
-
const token = process.env['GK_GITHUB_TOKEN'];
|
|
159
|
-
if (!token) {
|
|
160
|
-
process.stderr.write(`[gate-keeper-github] PR #${payload['number']} ${action} — set GK_GITHUB_TOKEN to enable PR file analysis\n`);
|
|
161
|
-
return;
|
|
162
|
-
}
|
|
163
|
-
const [owner, repo] = repoName.split('/');
|
|
164
|
-
if (!owner || !repo)
|
|
165
|
-
return;
|
|
166
|
-
const prFiles = await fetchPRFiles(owner, repo, payload['number'], token);
|
|
167
|
-
if (prFiles.length === 0)
|
|
168
|
-
return;
|
|
169
|
-
const allFiles = new Set(prFiles.map(f => f.filename));
|
|
170
|
-
const graphRaw = await fetchDaemonApi('/api/graph');
|
|
171
|
-
if (!graphRaw)
|
|
172
|
-
return;
|
|
173
|
-
const summaries = buildPushSummaries(allFiles, graphRaw);
|
|
174
|
-
if (summaries.length === 0)
|
|
175
|
-
return;
|
|
176
|
-
const prMeta = {
|
|
177
|
-
number: payload['number'],
|
|
178
|
-
title: pr['title'] ?? 'Untitled PR',
|
|
179
|
-
author: (pr['user']?.['login']) ?? 'unknown',
|
|
180
|
-
baseBranch: (pr['base']?.['ref']) ?? 'main',
|
|
181
|
-
headBranch: (pr['head']?.['ref']) ?? 'feature',
|
|
182
|
-
};
|
|
183
|
-
const comment = (0, commenter_1.formatPRComment)(prMeta, summaries, repoName, graphRaw.nodes.length);
|
|
184
|
-
process.stderr.write(`[gate-keeper-github] PR #${prMeta.number} (${action}): ${summaries.length} files analyzed, verdict=${comment.verdict}\n`);
|
|
185
|
-
for (const s of summaries) {
|
|
186
|
-
process.stderr.write(`[gate-keeper-github] ${s.path}: ${s.rating}/10, ${s.fragileDependents} fragile\n`);
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
function fetchPRFiles(owner, repo, prNumber, token) {
|
|
190
|
-
return new Promise((resolve) => {
|
|
191
|
-
const req = https.get({
|
|
192
|
-
hostname: 'api.github.com',
|
|
193
|
-
path: `/repos/${owner}/${repo}/pulls/${prNumber}/files`,
|
|
194
|
-
headers: {
|
|
195
|
-
Authorization: `Bearer ${token}`,
|
|
196
|
-
'User-Agent': 'gate-keeper',
|
|
197
|
-
Accept: 'application/vnd.github+json',
|
|
198
|
-
},
|
|
199
|
-
timeout: 5000,
|
|
200
|
-
}, (res) => {
|
|
201
|
-
let body = '';
|
|
202
|
-
res.on('data', (chunk) => { body += chunk; });
|
|
203
|
-
res.on('end', () => {
|
|
204
|
-
try {
|
|
205
|
-
resolve(JSON.parse(body));
|
|
206
|
-
}
|
|
207
|
-
catch {
|
|
208
|
-
resolve([]);
|
|
209
|
-
}
|
|
210
|
-
});
|
|
211
|
-
});
|
|
212
|
-
req.on('error', () => resolve([]));
|
|
213
|
-
req.on('timeout', () => { req.destroy(); resolve([]); });
|
|
214
|
-
});
|
|
215
|
-
}
|
|
216
|
-
async function dispatchWebhookEvent(event, payload) {
|
|
217
|
-
if (event === 'push') {
|
|
218
|
-
await handlePush(payload);
|
|
219
|
-
}
|
|
220
|
-
else if (event === 'pull_request') {
|
|
221
|
-
await handlePullRequest(payload);
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
// ── Server ─────────────────────────────────────────────────
|
|
225
|
-
function startGitHubApp() {
|
|
226
|
-
const app = (0, express_1.default)();
|
|
227
|
-
app.post('/webhook', express_1.default.json({
|
|
228
|
-
verify: (req, _res, buf) => {
|
|
229
|
-
req['rawBody'] = buf;
|
|
230
|
-
},
|
|
231
|
-
}), async (req, res) => {
|
|
232
|
-
const rawBody = req['rawBody'];
|
|
233
|
-
const signature = req.headers['x-hub-signature-256'];
|
|
234
|
-
const event = req.headers['x-github-event'];
|
|
235
|
-
if (!verifySignature(rawBody?.toString() ?? '', signature)) {
|
|
236
|
-
res.status(401).json({ error: 'Invalid signature' });
|
|
237
|
-
return;
|
|
238
|
-
}
|
|
239
|
-
res.status(202).json({ ok: true });
|
|
240
|
-
try {
|
|
241
|
-
await dispatchWebhookEvent(event, req.body);
|
|
242
|
-
}
|
|
243
|
-
catch (err) {
|
|
244
|
-
process.stderr.write(`[gate-keeper-github] Webhook error: ${err instanceof Error ? err.message : String(err)}\n`);
|
|
245
|
-
}
|
|
246
|
-
});
|
|
247
|
-
app.get('/health', (_req, res) => {
|
|
248
|
-
res.json({ ok: true, app: 'gate-keeper-github' });
|
|
249
|
-
});
|
|
250
|
-
app.listen(PORT, () => {
|
|
251
|
-
process.stderr.write(`[gate-keeper-github] Webhook server on :${PORT} (secret: ${WEBHOOK_SECRET ? 'set' : 'NOT SET'})\n`);
|
|
252
|
-
});
|
|
253
|
-
}
|
|
254
|
-
if (require.main === module) {
|
|
255
|
-
if (!process.env['EXPOSE_GITHUB_APP']) {
|
|
256
|
-
process.stderr.write('Set EXPOSE_GITHUB_APP=true to start the GitHub App webhook server.\n');
|
|
257
|
-
process.exit(0);
|
|
258
|
-
}
|
|
259
|
-
startGitHubApp();
|
|
260
|
-
}
|
|
261
|
-
//# sourceMappingURL=app.js.map
|
package/dist/github/app.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"app.js","sourceRoot":"","sources":["../../src/github/app.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BH,0CASC;AAED,0CAGC;AAMD,gDAiBC;AAmHD,wCAiCC;AAnND,sDAA8B;AAC9B,+CAAiC;AACjC,2CAA6B;AAC7B,6CAA+B;AAC/B,2CAA4E;AAE5E,MAAM,IAAI,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,MAAM,EAAE,EAAE,CAAC,CAAC;AAC/D,MAAM,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,IAAI,EAAE,CAAC;AAC9D,MAAM,WAAW,GAAG,IAAI,CAAC;AAEzB,8DAA8D;AAE9D,SAAS,cAAc,CAAC,OAAe;IACrC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC7B,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,oBAAoB,WAAW,GAAG,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,CAAC,GAAG,EAAE,EAAE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CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;QAEnC,IAAI,CAAC;YACH,MAAM,oBAAoB,CAAC,KAAK,EAAE,GAAG,CAAC,IAA+B,CAAC,CAAC;QACzE,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,uCAAuC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACpH,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,GAAG,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE;QAC/B,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,oBAAoB,EAAE,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC;IAEH,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE;QACpB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,2CAA2C,IAAI,aAAa,cAAc,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,KAAK,CAAC,CAAC;IAC5H,CAAC,CAAC,CAAC;AACL,CAAC;AAED,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;IAC5B,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,EAAE,CAAC;QACtC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,sEAAsE,CAAC,CAAC;QAC7F,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IACD,cAAc,EAAE,CAAC;AACnB,CAAC"}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GitHub PR comment formatter — generates structured comments from graph analysis.
|
|
3
|
-
*
|
|
4
|
-
* Pure function: takes PR metadata + graph data, returns a markdown comment body.
|
|
5
|
-
* No HTTP calls, no GitHub API — just formatting. The caller (webhook, CLI, etc.)
|
|
6
|
-
* posts the comment via their own transport.
|
|
7
|
-
*/
|
|
8
|
-
export interface PRFile {
|
|
9
|
-
filename: string;
|
|
10
|
-
status: 'added' | 'modified' | 'deleted' | 'renamed';
|
|
11
|
-
additions: number;
|
|
12
|
-
deletions: number;
|
|
13
|
-
}
|
|
14
|
-
export interface PRMetadata {
|
|
15
|
-
number: number;
|
|
16
|
-
title: string;
|
|
17
|
-
author: string;
|
|
18
|
-
baseBranch: string;
|
|
19
|
-
headBranch: string;
|
|
20
|
-
}
|
|
21
|
-
export interface GraphNodeSummary {
|
|
22
|
-
path: string;
|
|
23
|
-
rating: number;
|
|
24
|
-
directDependents: number;
|
|
25
|
-
fragileDependents: number;
|
|
26
|
-
errors: number;
|
|
27
|
-
warnings: number;
|
|
28
|
-
}
|
|
29
|
-
export interface CommentSection {
|
|
30
|
-
icon: string;
|
|
31
|
-
title: string;
|
|
32
|
-
body: string;
|
|
33
|
-
}
|
|
34
|
-
export type CommentVerdict = 'approve' | 'request-changes' | 'neutral';
|
|
35
|
-
export interface FormattedComment {
|
|
36
|
-
verdict: CommentVerdict;
|
|
37
|
-
body: string;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Generate a PR comment from graph analysis data.
|
|
41
|
-
*
|
|
42
|
-
* @param pr PR metadata (number, title, author, branches)
|
|
43
|
-
* @param files Changed files with graph context
|
|
44
|
-
* @param repoName Short repo name (e.g. "gate-keeper")
|
|
45
|
-
* @param allFilesCount Total files in the graph (for context)
|
|
46
|
-
*/
|
|
47
|
-
export declare function formatPRComment(pr: PRMetadata, files: GraphNodeSummary[], repoName: string, allFilesCount: number): FormattedComment;
|
|
48
|
-
/**
|
|
49
|
-
* Generate a dependency diff between two points in time.
|
|
50
|
-
* Useful for "this PR adds K new dependencies" analysis.
|
|
51
|
-
*/
|
|
52
|
-
export declare function formatDependencyDiff(addedDeps: Array<{
|
|
53
|
-
source: string;
|
|
54
|
-
target: string;
|
|
55
|
-
type: string;
|
|
56
|
-
}>, removedDeps: Array<{
|
|
57
|
-
source: string;
|
|
58
|
-
target: string;
|
|
59
|
-
type: string;
|
|
60
|
-
}>): string;
|
|
61
|
-
/**
|
|
62
|
-
* Generate a suggested reviewers list based on module ownership.
|
|
63
|
-
* Files in the PR are grouped by module; the most-committing author
|
|
64
|
-
* of each module is suggested.
|
|
65
|
-
*/
|
|
66
|
-
export declare function formatSuggestedReviewers(prFiles: PRFile[], owners: Map<string, string[]>, repoRoot: string): string;
|
|
67
|
-
//# sourceMappingURL=commenter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"commenter.d.ts","sourceRoot":"","sources":["../../src/github/commenter.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,WAAW,MAAM;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,CAAC;IACrD,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,gBAAgB,EAAE,MAAM,CAAC;IACzB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,MAAM,c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