archprint 0.5.0 → 0.7.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 (89) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +87 -46
  3. package/dist/cli/adoption-readme.d.ts +7 -0
  4. package/dist/cli/adoption-readme.d.ts.map +1 -0
  5. package/dist/cli/adoption-readme.js +76 -0
  6. package/dist/cli/adoption-readme.js.map +1 -0
  7. package/dist/cli/archprint-config.d.ts +33 -0
  8. package/dist/cli/archprint-config.d.ts.map +1 -0
  9. package/dist/cli/archprint-config.js +83 -0
  10. package/dist/cli/archprint-config.js.map +1 -0
  11. package/dist/cli/generate.d.ts +39 -43
  12. package/dist/cli/generate.d.ts.map +1 -1
  13. package/dist/cli/generate.js +143 -283
  14. package/dist/cli/generate.js.map +1 -1
  15. package/dist/cli/ignore-file.d.ts +8 -0
  16. package/dist/cli/ignore-file.d.ts.map +1 -0
  17. package/dist/cli/ignore-file.js +37 -0
  18. package/dist/cli/ignore-file.js.map +1 -0
  19. package/dist/cli/layout.d.ts +24 -0
  20. package/dist/cli/layout.d.ts.map +1 -0
  21. package/dist/cli/layout.js +74 -0
  22. package/dist/cli/layout.js.map +1 -0
  23. package/dist/cli/migrate.d.ts +27 -0
  24. package/dist/cli/migrate.d.ts.map +1 -0
  25. package/dist/cli/migrate.js +177 -0
  26. package/dist/cli/migrate.js.map +1 -0
  27. package/dist/cli/outputs-manifest.d.ts +0 -6
  28. package/dist/cli/outputs-manifest.d.ts.map +1 -1
  29. package/dist/cli/outputs-manifest.js +2 -29
  30. package/dist/cli/outputs-manifest.js.map +1 -1
  31. package/dist/cli/program.d.ts.map +1 -1
  32. package/dist/cli/program.js +151 -61
  33. package/dist/cli/program.js.map +1 -1
  34. package/dist/cli/report.d.ts +3 -2
  35. package/dist/cli/report.d.ts.map +1 -1
  36. package/dist/cli/report.js +19 -11
  37. package/dist/cli/report.js.map +1 -1
  38. package/dist/cli/wiring.d.ts +2 -13
  39. package/dist/cli/wiring.d.ts.map +1 -1
  40. package/dist/cli/wiring.js +18 -89
  41. package/dist/cli/wiring.js.map +1 -1
  42. package/dist/generator/eslint-preset-emitter.d.ts +4 -1
  43. package/dist/generator/eslint-preset-emitter.d.ts.map +1 -1
  44. package/dist/generator/eslint-preset-emitter.js +6 -4
  45. package/dist/generator/eslint-preset-emitter.js.map +1 -1
  46. package/dist/mcp/remote/clone.d.ts +7 -0
  47. package/dist/mcp/remote/clone.d.ts.map +1 -0
  48. package/dist/mcp/remote/clone.js +72 -0
  49. package/dist/mcp/remote/clone.js.map +1 -0
  50. package/dist/mcp/remote/http.d.ts +9 -0
  51. package/dist/mcp/remote/http.d.ts.map +1 -0
  52. package/dist/mcp/remote/http.js +92 -0
  53. package/dist/mcp/remote/http.js.map +1 -0
  54. package/dist/mcp/remote/repo-url.d.ts +8 -0
  55. package/dist/mcp/remote/repo-url.d.ts.map +1 -0
  56. package/dist/mcp/remote/repo-url.js +45 -0
  57. package/dist/mcp/remote/repo-url.js.map +1 -0
  58. package/dist/mcp/remote/server.d.ts +67 -0
  59. package/dist/mcp/remote/server.d.ts.map +1 -0
  60. package/dist/mcp/remote/server.js +83 -0
  61. package/dist/mcp/remote/server.js.map +1 -0
  62. package/dist/mcp/remote/tools.d.ts +11 -0
  63. package/dist/mcp/remote/tools.d.ts.map +1 -0
  64. package/dist/mcp/remote/tools.js +12 -0
  65. package/dist/mcp/remote/tools.js.map +1 -0
  66. package/dist/mcp/server.d.ts +54 -0
  67. package/dist/mcp/server.d.ts.map +1 -0
  68. package/dist/mcp/server.js +82 -0
  69. package/dist/mcp/server.js.map +1 -0
  70. package/dist/mcp/tool-response.d.ts +10 -0
  71. package/dist/mcp/tool-response.d.ts.map +1 -0
  72. package/dist/mcp/tool-response.js +7 -0
  73. package/dist/mcp/tool-response.js.map +1 -0
  74. package/dist/mcp/tools.d.ts +17 -0
  75. package/dist/mcp/tools.d.ts.map +1 -0
  76. package/dist/mcp/tools.js +39 -0
  77. package/dist/mcp/tools.js.map +1 -0
  78. package/dist/scanner/file-walker.d.ts +1 -0
  79. package/dist/scanner/file-walker.d.ts.map +1 -1
  80. package/dist/scanner/file-walker.js +27 -0
  81. package/dist/scanner/file-walker.js.map +1 -1
  82. package/dist/scanner/ignore-filter.d.ts.map +1 -1
  83. package/dist/scanner/ignore-filter.js +36 -10
  84. package/dist/scanner/ignore-filter.js.map +1 -1
  85. package/package.json +8 -5
  86. package/dist/cli/init.d.ts +0 -21
  87. package/dist/cli/init.d.ts.map +0 -1
  88. package/dist/cli/init.js +0 -19
  89. package/dist/cli/init.js.map +0 -1
@@ -0,0 +1,92 @@
1
+ import { createServer } from 'node:http';
2
+ import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js';
3
+ import { createRemoteServer } from './server.js';
4
+ const MCP_PATH = '/mcp';
5
+ const DEFAULT_MAX_CONCURRENT = 4;
6
+ const DEFAULT_MAX_BODY_BYTES = 1024 * 1024;
7
+ export function createRemoteHttpServer(version, options = {}) {
8
+ const maxConcurrent = options.maxConcurrent ?? DEFAULT_MAX_CONCURRENT;
9
+ const maxBodyBytes = options.maxBodyBytes ?? DEFAULT_MAX_BODY_BYTES;
10
+ const serverFactory = options.serverFactory ?? (() => createRemoteServer(version));
11
+ let inFlight = 0;
12
+ async function serve(req, res) {
13
+ try {
14
+ const url = new URL(req.url ?? '/', 'http://localhost');
15
+ if (req.method === 'GET' && url.pathname === '/healthz')
16
+ return drainAnd(req, res, 200, { status: 'ok' });
17
+ if (req.method === 'GET' && url.pathname === MCP_PATH) {
18
+ return drainAnd(req, res, 405, { error: 'This server is stateless; use POST to /mcp.' });
19
+ }
20
+ if (req.method !== 'POST' || url.pathname !== MCP_PATH)
21
+ return drainAnd(req, res, 404, { error: 'Not found.' });
22
+ if (inFlight >= maxConcurrent) {
23
+ return drainAnd(req, res, 429, { error: 'Too many concurrent requests, retry shortly.' });
24
+ }
25
+ inFlight++;
26
+ try {
27
+ const body = await readJsonBody(req, maxBodyBytes);
28
+ const server = serverFactory();
29
+ const transport = new StreamableHTTPServerTransport({
30
+ sessionIdGenerator: undefined,
31
+ enableJsonResponse: true,
32
+ });
33
+ try {
34
+ await server.connect(transport);
35
+ await transport.handleRequest(req, res, body);
36
+ }
37
+ finally {
38
+ void transport.close();
39
+ void server.close();
40
+ }
41
+ }
42
+ finally {
43
+ inFlight--;
44
+ }
45
+ }
46
+ catch (error) {
47
+ if (!res.headersSent)
48
+ sendJson(res, 400, { error: error.message });
49
+ }
50
+ }
51
+ return createServer((req, res) => void serve(req, res));
52
+ }
53
+ function sendJson(res, status, body) {
54
+ res.writeHead(status, { 'content-type': 'application/json' });
55
+ res.end(JSON.stringify(body));
56
+ }
57
+ function drainAnd(req, res, status, body) {
58
+ req.resume();
59
+ sendJson(res, status, body);
60
+ }
61
+ function readJsonBody(req, maxBytes) {
62
+ return new Promise((resolve, reject) => {
63
+ const chunks = [];
64
+ let size = 0;
65
+ let done = false;
66
+ req.on('data', (chunk) => {
67
+ if (done)
68
+ return;
69
+ size += chunk.length;
70
+ if (size > maxBytes) {
71
+ done = true;
72
+ reject(new Error('Request body too large.'));
73
+ return;
74
+ }
75
+ chunks.push(chunk);
76
+ });
77
+ req.on('end', () => {
78
+ if (done)
79
+ return;
80
+ if (chunks.length === 0)
81
+ return resolve(undefined);
82
+ try {
83
+ resolve(JSON.parse(Buffer.concat(chunks).toString('utf8')));
84
+ }
85
+ catch {
86
+ reject(new Error('Invalid JSON body.'));
87
+ }
88
+ });
89
+ req.on('error', reject);
90
+ });
91
+ }
92
+ //# sourceMappingURL=http.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http.js","sourceRoot":"","sources":["../../../src/mcp/remote/http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAA0D,MAAM,WAAW,CAAC;AACjG,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAC;AAEnG,OAAO,EAAE,kBAAkB,EAA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ACP,MAAM,CAAC,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAC,CAAC;YAC1C,CAAC;QACH,CAAC,CAAC,CAAC;QACH,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAC1B,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,8 @@
1
+ export interface RepoSpec {
2
+ cloneUrl: string;
3
+ host: string;
4
+ slug: string;
5
+ }
6
+ export declare function parseRepoUrl(input: string): RepoSpec;
7
+ export declare function normalizeRef(ref: string | undefined): string | undefined;
8
+ //# sourceMappingURL=repo-url.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repo-url.d.ts","sourceRoot":"","sources":["../../../src/mcp/remote/repo-url.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,QAAQ;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,QAAQ,CA4BpD;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAexE"}
@@ -0,0 +1,45 @@
1
+ const ALLOWED_HOSTS = new Set(['github.com', 'gitlab.com', 'bitbucket.org']);
2
+ export function parseRepoUrl(input) {
3
+ let url;
4
+ try {
5
+ url = new URL(input.trim());
6
+ }
7
+ catch {
8
+ throw new Error(`Not a valid URL: ${input}`);
9
+ }
10
+ if (url.protocol !== 'https:')
11
+ throw new Error('Only https:// repository URLs are supported.');
12
+ if (url.username || url.password)
13
+ throw new Error('Repository URLs must not contain credentials.');
14
+ if (url.port)
15
+ throw new Error('Repository URLs must not specify a port.');
16
+ const host = url.hostname.toLowerCase();
17
+ if (!ALLOWED_HOSTS.has(host)) {
18
+ throw new Error(`Unsupported host "${host}". Allowed: ${[...ALLOWED_HOSTS].join(', ')}.`);
19
+ }
20
+ const slug = url.pathname
21
+ .replace(/\/+$/, '')
22
+ .replace(/\.git$/i, '')
23
+ .split('/')
24
+ .filter(Boolean)
25
+ .join('/');
26
+ if (slug.split('/').length < 2) {
27
+ throw new Error('Expected a repository URL of the form https://host/owner/repo.');
28
+ }
29
+ return { cloneUrl: `https://${host}/${slug}.git`, host, slug };
30
+ }
31
+ export function normalizeRef(ref) {
32
+ if (ref === undefined)
33
+ return undefined;
34
+ const trimmed = ref.trim();
35
+ if (trimmed === '')
36
+ return undefined;
37
+ if (trimmed.length > 256 ||
38
+ trimmed.startsWith('-') ||
39
+ trimmed.includes('..') ||
40
+ !/^[\w./-]+$/.test(trimmed)) {
41
+ throw new Error(`Invalid ref "${ref}". Use a branch or tag name (letters, digits, ., _, /, -).`);
42
+ }
43
+ return trimmed;
44
+ }
45
+ //# sourceMappingURL=repo-url.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repo-url.js","sourceRoot":"","sources":["../../../src/mcp/remote/repo-url.ts"],"names":[],"mappings":"AAAA,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC,CAAC,YAAY,EAAE,YAAY,EAAE,eAAe,CAAC,CAAC,CAAC;AAQ7E,MAAM,UAAU,YAAY,CAAC,KAAa;IACxC,IAAI,GAAQ,CAAC;IACb,IAAI,CAAC;QACH,GAAG,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;IAC9B,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,KAAK,CAAC,oBAAoB,KAAK,EAAE,CAAC,CAAC;IAC/C,CAAC;IACD,IAAI,GAAG,CAAC,QAAQ,KAAK,QAAQ;QAAE,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;IAC/F,IAAI,GAAG,CAAC,QAAQ,IAAI,GAAG,CAAC,QAAQ;QAC9B,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;IACnE,IAAI,GAAG,CAAC,IAAI;QAAE,MAAM,IAAI,K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,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -0,0 +1,67 @@
1
+ import { Server } from '@modelcontextprotocol/sdk/server/index.js';
2
+ import { type ToolResponse } from '../tool-response.js';
3
+ import { type RemoteTools } from './tools.js';
4
+ export declare const REMOTE_TOOLS: readonly [{
5
+ readonly name: "archprint_scan";
6
+ readonly description: "Clone a public repository by URL (read-only, ephemeral) and list the architecture rules it already follows, with the evidence: which families are AUTO (clears the confidence gate) or SUGGEST (worth review), how many files conform vs. break each, and the confidence.";
7
+ readonly inputSchema: {
8
+ readonly type: "object";
9
+ readonly properties: {
10
+ readonly deep: {
11
+ readonly type: "boolean";
12
+ readonly description: "resolve imports through barrels and aliases (slower, more accurate)";
13
+ };
14
+ readonly repo: {
15
+ readonly type: "string";
16
+ readonly description: "https URL of a public repository on github.com, gitlab.com, or bitbucket.org";
17
+ };
18
+ readonly ref: {
19
+ readonly type: "string";
20
+ readonly description: "branch or tag to scan (optional; defaults to the repo default branch)";
21
+ };
22
+ };
23
+ readonly required: readonly ["repo"];
24
+ };
25
+ }, {
26
+ readonly name: "archprint_recommend";
27
+ readonly description: "Clone a public repository by URL (read-only, ephemeral) and recommend an architecture rule set from its evidence and stack: what to enforce now, what to review before enforcing, and what comparable repos commonly adopt that this one does not yet.";
28
+ readonly inputSchema: {
29
+ readonly type: "object";
30
+ readonly properties: {
31
+ readonly repo: {
32
+ readonly type: "string";
33
+ readonly description: "https URL of a public repository on github.com, gitlab.com, or bitbucket.org";
34
+ };
35
+ readonly ref: {
36
+ readonly type: "string";
37
+ readonly description: "branch or tag to scan (optional; defaults to the repo default branch)";
38
+ };
39
+ };
40
+ readonly required: readonly ["repo"];
41
+ };
42
+ }, {
43
+ readonly name: "archprint_explain";
44
+ readonly description: "Clone a public repository by URL (read-only, ephemeral) and explain the confidence-gate evidence behind one inferred rule id (e.g. AP-002): its gate status, conformance stats, and the files that violate it.";
45
+ readonly inputSchema: {
46
+ readonly type: "object";
47
+ readonly properties: {
48
+ readonly repo: {
49
+ readonly type: "string";
50
+ readonly description: "https URL of a public repository on github.com, gitlab.com, or bitbucket.org";
51
+ };
52
+ readonly ref: {
53
+ readonly type: "string";
54
+ readonly description: "branch or tag to scan (optional; defaults to the repo default branch)";
55
+ };
56
+ readonly id: {
57
+ readonly type: "string";
58
+ readonly description: "rule id, e.g. AP-002";
59
+ };
60
+ };
61
+ readonly required: readonly ["id", "repo"];
62
+ };
63
+ }];
64
+ export declare function runRemoteTool(tools: RemoteTools, name: string, args: Record<string, unknown>): Promise<unknown>;
65
+ export declare function callRemoteTool(tools: RemoteTools, name: string, args: Record<string, unknown>): Promise<ToolResponse>;
66
+ export declare function createRemoteServer(version: string, tools?: RemoteTools): Server;
67
+ //# sourceMappingURL=server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../src/mcp/remote/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAEnE,OAAO,EAA6B,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnF,OAAO,EAAmB,KAAK,WAAW,EAAE,MAAM,YAAY,CAAC;AAa/D,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiCf,CAAC;AAEX,wBAAsB,aAAa,CACjC,KAAK,EAAE,WAAW,EAClB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,OAAO,CAAC,OAAO,CAAC,CAmBlB;AAED,wBAAsB,cAAc,CAClC,KAAK,EAAE,WAAW,EAClB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,OAAO,CAAC,YAAY,CAAC,CAMvB;AAED,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,MAAM,EACf,KAAK,GAAE,WAA+B,GACrC,MAAM,CAYR"}
@@ -0,0 +1,83 @@
1
+ import { Server } from '@modelcontextprotocol/sdk/server/index.js';
2
+ import { CallToolRequestSchema, ListToolsRequestSchema } from '@modelcontextprotocol/sdk/types.js';
3
+ import { errorResponse, okResponse } from '../tool-response.js';
4
+ import { makeRemoteTools } from './tools.js';
5
+ const repoProperty = {
6
+ repo: {
7
+ type: 'string',
8
+ description: 'https URL of a public repository on github.com, gitlab.com, or bitbucket.org',
9
+ },
10
+ ref: {
11
+ type: 'string',
12
+ description: 'branch or tag to scan (optional; defaults to the repo default branch)',
13
+ },
14
+ };
15
+ export const REMOTE_TOOLS = [
16
+ {
17
+ name: 'archprint_scan',
18
+ description: 'Clone a public repository by URL (read-only, ephemeral) and list the architecture rules it already follows, with the evidence: which families are AUTO (clears the confidence gate) or SUGGEST (worth review), how many files conform vs. break each, and the confidence.',
19
+ inputSchema: {
20
+ type: 'object',
21
+ properties: {
22
+ ...repoProperty,
23
+ deep: {
24
+ type: 'boolean',
25
+ description: 'resolve imports through barrels and aliases (slower, more accurate)',
26
+ },
27
+ },
28
+ required: ['repo'],
29
+ },
30
+ },
31
+ {
32
+ name: 'archprint_recommend',
33
+ description: 'Clone a public repository by URL (read-only, ephemeral) and recommend an architecture rule set from its evidence and stack: what to enforce now, what to review before enforcing, and what comparable repos commonly adopt that this one does not yet.',
34
+ inputSchema: { type: 'object', properties: { ...repoProperty }, required: ['repo'] },
35
+ },
36
+ {
37
+ name: 'archprint_explain',
38
+ description: 'Clone a public repository by URL (read-only, ephemeral) and explain the confidence-gate evidence behind one inferred rule id (e.g. AP-002): its gate status, conformance stats, and the files that violate it.',
39
+ inputSchema: {
40
+ type: 'object',
41
+ properties: { id: { type: 'string', description: 'rule id, e.g. AP-002' }, ...repoProperty },
42
+ required: ['id', 'repo'],
43
+ },
44
+ },
45
+ ];
46
+ export async function runRemoteTool(tools, name, args) {
47
+ const repo = typeof args.repo === 'string' ? args.repo.trim() : '';
48
+ if (repo === '') {
49
+ throw new Error(`${name} requires a "repo" URL (for example https://github.com/owner/repo).`);
50
+ }
51
+ const ref = typeof args.ref === 'string' ? args.ref : undefined;
52
+ switch (name) {
53
+ case 'archprint_scan':
54
+ return { apps: await tools.remoteScan(repo, ref, args.deep === true) };
55
+ case 'archprint_recommend':
56
+ return { apps: await tools.remoteRecommend(repo, ref) };
57
+ case 'archprint_explain':
58
+ if (typeof args.id !== 'string' || args.id === '') {
59
+ throw new Error('archprint_explain requires an "id" (for example AP-002).');
60
+ }
61
+ return tools.remoteExplain(args.id, repo, ref);
62
+ default:
63
+ throw new Error(`Unknown tool: ${name}`);
64
+ }
65
+ }
66
+ export async function callRemoteTool(tools, name, args) {
67
+ try {
68
+ return okResponse(await runRemoteTool(tools, name, args));
69
+ }
70
+ catch (error) {
71
+ return errorResponse(error);
72
+ }
73
+ }
74
+ export function createRemoteServer(version, tools = makeRemoteTools()) {
75
+ const server = new Server({ name: 'archprint-remote', version }, { capabilities: { tools: {} } });
76
+ server.setRequestHandler(ListToolsRequestSchema, () => ({ tools: REMOTE_TOOLS }));
77
+ server.setRequestHandler(CallToolRequestSchema, async (request) => {
78
+ const { content, isError } = await callRemoteTool(tools, request.params.name, request.params.arguments ?? {});
79
+ return { content, isError };
80
+ });
81
+ return server;
82
+ }
83
+ //# sourceMappingURL=server.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.js","sourceRoot":"","sources":["../../../src/mcp/remote/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AACnG,OAAO,EAAE,aAAa,EAAE,UAAU,EAAqB,MAAM,qBAAqB,CAAC;AACnF,OAAO,EAAE,eAAe,EAAoB,MAAM,YAAY,CAAC;AAE/D,MAAM,YAAY,GAAG;IACnB,IAAI,EAAE;QACJ,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,8E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EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IAClG,MAAM,CAAC,iBAAiB,CAAC,sBAAsB,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC;IAClF,MAAM,CAAC,iBAAiB,CAAC,qBAAqB,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;QAChE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,MAAM,cAAc,CAC/C,KAAK,EACL,OAAO,CAAC,MAAM,CAAC,IAAI,EACnB,OAAO,CAAC,MAAM,CAAC,SAAS,IAAI,EAAE,CAC/B,CAAC;QACF,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;IAC9B,CAAC,CAAC,CAAC;IACH,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { type AppRecommendations, type AppScan, type ExplainResult } from '../tools.js';
2
+ import { type CloneOptions } from './clone.js';
3
+ import { type RepoSpec } from './repo-url.js';
4
+ export type RepoRunner = <T>(spec: RepoSpec, ref: string | undefined, options: CloneOptions, use: (dir: string) => T) => Promise<T>;
5
+ export interface RemoteTools {
6
+ remoteScan(repo: string, ref?: string, deep?: boolean): Promise<AppScan[]>;
7
+ remoteRecommend(repo: string, ref?: string): Promise<AppRecommendations[]>;
8
+ remoteExplain(id: string, repo: string, ref?: string): Promise<ExplainResult>;
9
+ }
10
+ export declare function makeRemoteTools(run?: RepoRunner, options?: CloneOptions): RemoteTools;
11
+ //# sourceMappingURL=tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../src/mcp/remote/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,kBAAkB,EACvB,KAAK,OAAO,EACZ,KAAK,aAAa,EACnB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAkB,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/D,OAAO,EAA8B,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE1E,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,EACzB,IAAI,EAAE,QAAQ,EACd,GAAG,EAAE,MAAM,GAAG,SAAS,EACvB,OAAO,EAAE,YAAY,EACrB,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,CAAC,KACpB,OAAO,CAAC,CAAC,CAAC,CAAC;AAEhB,MAAM,WAAW,WAAW;IAC1B,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;IAC3E,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC;IAC3E,aAAa,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;CAC/E;AAED,wBAAgB,eAAe,CAC7B,GAAG,GAAE,UAA2B,EAChC,OAAO,GAAE,YAAiB,GACzB,WAAW,CAWb"}
@@ -0,0 +1,12 @@
1
+ import { explainTool, recommendTool, scanTool, } from '../tools.js';
2
+ import { withClonedRepo } from './clone.js';
3
+ import { normalizeRef, parseRepoUrl } from './repo-url.js';
4
+ export function makeRemoteTools(run = withClonedRepo, options = {}) {
5
+ const inRepo = async (repo, ref, use) => run(parseRepoUrl(repo), normalizeRef(ref), options, use);
6
+ return {
7
+ remoteScan: (repo, ref, deep = false) => inRepo(repo, ref, (dir) => scanTool(dir, deep)),
8
+ remoteRecommend: (repo, ref) => inRepo(repo, ref, (dir) => recommendTool(dir)),
9
+ remoteExplain: (id, repo, ref) => inRepo(repo, ref, (dir) => explainTool(id, dir)),
10
+ };
11
+ }
12
+ //# sourceMappingURL=tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.js","sourceRoot":"","sources":["../../../src/mcp/remote/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,aAAa,EACb,QAAQ,GAIT,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,cAAc,EAAqB,MAAM,YAAY,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,YAAY,EAAiB,MAAM,eAAe,CAAC;AAe1E,MAAM,UAAU,eAAe,CAC7B,MAAkB,cAAc,EAChC,UAAwB,EAAE;IAE1B,MAAM,MAAM,GAAG,KAAK,EAClB,IAAY,EACZ,GAAuB,EACvB,GAAuB,EACX,EAAE,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,YAAY,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;IAC1E,OAAO;QACL,UAAU,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,GAAG,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QACxF,eAAe,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;QAC9E,aAAa,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,WAAW,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC;KACnF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,54 @@
1
+ import { Server } from '@modelcontextprotocol/sdk/server/index.js';
2
+ import { type ToolResponse } from './tool-response.js';
3
+ export declare const TOOLS: readonly [{
4
+ readonly name: "archprint_scan";
5
+ readonly description: "List the architecture rules this TypeScript repo already follows, with the evidence: which families are AUTO (clears the confidence gate) or SUGGEST (short of it, worth review), how many files conform vs. break each, and the confidence. Read-only. `path` defaults to \".\" and a monorepo root scans every app.";
6
+ readonly inputSchema: {
7
+ readonly type: "object";
8
+ readonly properties: {
9
+ readonly path: {
10
+ readonly type: "string";
11
+ readonly description: "app or monorepo-root directory (default \".\")";
12
+ };
13
+ readonly deep: {
14
+ readonly type: "boolean";
15
+ readonly description: "resolve imports through barrels and aliases (slower, more accurate)";
16
+ };
17
+ };
18
+ };
19
+ }, {
20
+ readonly name: "archprint_recommend";
21
+ readonly description: "Recommend an architecture rule set for this repo from its evidence and detected stack: what to enforce now, what to review before enforcing, and what comparable repos commonly adopt that this repo does not yet. Read-only.";
22
+ readonly inputSchema: {
23
+ readonly type: "object";
24
+ readonly properties: {
25
+ readonly path: {
26
+ readonly type: "string";
27
+ readonly description: "app or monorepo-root directory (default \".\")";
28
+ };
29
+ };
30
+ };
31
+ }, {
32
+ readonly name: "archprint_explain";
33
+ readonly description: "Explain the confidence-gate evidence behind one inferred rule id (e.g. AP-002): its gate status, conformance stats, and the files that violate it. Read-only.";
34
+ readonly inputSchema: {
35
+ readonly type: "object";
36
+ readonly properties: {
37
+ readonly id: {
38
+ readonly type: "string";
39
+ readonly description: "rule id, e.g. AP-002";
40
+ };
41
+ readonly path: {
42
+ readonly type: "string";
43
+ readonly description: "app or monorepo-root directory (default \".\")";
44
+ };
45
+ };
46
+ readonly required: readonly ["id"];
47
+ };
48
+ }];
49
+ export declare function runTool(name: string, args: Record<string, unknown>): unknown;
50
+ export type { ToolResponse };
51
+ export declare function callTool(name: string, args: Record<string, unknown>): ToolResponse;
52
+ export declare function createServer(version: string): Server;
53
+ export declare function startMcpServer(version: string): Promise<void>;
54
+ //# sourceMappingURL=server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/mcp/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAInE,OAAO,EAA6B,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElF,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwCR,CAAC;AAEX,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAe5E;AAED,YAAY,EAAE,YAAY,EAAE,CAAC;AAE7B,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,YAAY,CAMlF;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAQpD;AAGD,wBAAsB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAEnE"}
@@ -0,0 +1,82 @@
1
+ import { Server } from '@modelcontextprotocol/sdk/server/index.js';
2
+ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
3
+ import { CallToolRequestSchema, ListToolsRequestSchema } from '@modelcontextprotocol/sdk/types.js';
4
+ import { explainTool, recommendTool, scanTool } from './tools.js';
5
+ import { errorResponse, okResponse } from './tool-response.js';
6
+ export const TOOLS = [
7
+ {
8
+ name: 'archprint_scan',
9
+ description: 'List the architecture rules this TypeScript repo already follows, with the evidence: which families are AUTO (clears the confidence gate) or SUGGEST (short of it, worth review), how many files conform vs. break each, and the confidence. Read-only. `path` defaults to "." and a monorepo root scans every app.',
10
+ inputSchema: {
11
+ type: 'object',
12
+ properties: {
13
+ path: { type: 'string', description: 'app or monorepo-root directory (default ".")' },
14
+ deep: {
15
+ type: 'boolean',
16
+ description: 'resolve imports through barrels and aliases (slower, more accurate)',
17
+ },
18
+ },
19
+ },
20
+ },
21
+ {
22
+ name: 'archprint_recommend',
23
+ description: 'Recommend an architecture rule set for this repo from its evidence and detected stack: what to enforce now, what to review before enforcing, and what comparable repos commonly adopt that this repo does not yet. Read-only.',
24
+ inputSchema: {
25
+ type: 'object',
26
+ properties: {
27
+ path: { type: 'string', description: 'app or monorepo-root directory (default ".")' },
28
+ },
29
+ },
30
+ },
31
+ {
32
+ name: 'archprint_explain',
33
+ description: 'Explain the confidence-gate evidence behind one inferred rule id (e.g. AP-002): its gate status, conformance stats, and the files that violate it. Read-only.',
34
+ inputSchema: {
35
+ type: 'object',
36
+ properties: {
37
+ id: { type: 'string', description: 'rule id, e.g. AP-002' },
38
+ path: { type: 'string', description: 'app or monorepo-root directory (default ".")' },
39
+ },
40
+ required: ['id'],
41
+ },
42
+ },
43
+ ];
44
+ export function runTool(name, args) {
45
+ const input = typeof args.path === 'string' ? args.path : '.';
46
+ switch (name) {
47
+ case 'archprint_scan':
48
+ return { apps: scanTool(input, args.deep === true) };
49
+ case 'archprint_recommend':
50
+ return { apps: recommendTool(input) };
51
+ case 'archprint_explain':
52
+ if (typeof args.id !== 'string' || args.id === '') {
53
+ throw new Error('archprint_explain requires an "id" (for example AP-002).');
54
+ }
55
+ return explainTool(args.id, input);
56
+ default:
57
+ throw new Error(`Unknown tool: ${name}`);
58
+ }
59
+ }
60
+ export function callTool(name, args) {
61
+ try {
62
+ return okResponse(runTool(name, args));
63
+ }
64
+ catch (error) {
65
+ return errorResponse(error);
66
+ }
67
+ }
68
+ export function createServer(version) {
69
+ const server = new Server({ name: 'archprint', version }, { capabilities: { tools: {} } });
70
+ server.setRequestHandler(ListToolsRequestSchema, () => ({ tools: TOOLS }));
71
+ server.setRequestHandler(CallToolRequestSchema, (request) => {
72
+ const { content, isError } = callTool(request.params.name, request.params.arguments ?? {});
73
+ return { content, isError };
74
+ });
75
+ return server;
76
+ }
77
+ /* v8 ignore start -- stdio transport glue: connects the tested server to the process stdio */
78
+ export async function startMcpServer(version) {
79
+ await createServer(version).connect(new StdioServerTransport());
80
+ }
81
+ /* v8 ignore stop */
82
+ //# sourceMappingURL=server.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/mcp/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AACnG,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAqB,MAAM,oBAAoB,CAAC;AAElF,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB;QACE,IAAI,EAAE,gBAAgB;QACtB,WAAW,EACT,qTAAqT;QACvT,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,8CAA8C,EAAE;gBACrF,IAAI,EAAE;oBACJ,IAAI,EAAE,SAAS;oBACf,WAAW,EAAE,qEAAqE;iBACnF;aACF;SACF;KACF;IACD;QACE,IAAI,EAAE,qBAAqB;QAC3B,WAAW,EACT,+NAA+N;QACjO,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,8CAA8C,EAAE;aACtF;SACF;KACF;IACD;QACE,IAAI,EAAE,mBAAmB;QACzB,WAAW,EACT,+JAA+J;QACjK,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,sBAAsB,EAAE;gBAC3D,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,8CAA8C,EAAE;aACtF;YACD,QAAQ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CAAC,CAAC;IAC3F,MAAM,CAAC,iBAAiB,CAAC,sBAAsB,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;IAC3E,MAAM,CAAC,iBAAiB,CAAC,qBAAqB,EAAE,CAAC,OAAO,EAAE,EAAE;QAC1D,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC;QAC3F,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;IAC9B,CAAC,CAAC,CAAC;IACH,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,8FAA8F;AAC9F,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,OAAe;IAClD,MAAM,YAAY,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,IAAI,oBAAoB,EAAE,CAAC,CAAC;AAClE,CAAC;AACD,oBAAoB"}
@@ -0,0 +1,10 @@
1
+ export interface ToolResponse {
2
+ content: {
3
+ type: 'text';
4
+ text: string;
5
+ }[];
6
+ isError?: boolean;
7
+ }
8
+ export declare function okResponse(value: unknown): ToolResponse;
9
+ export declare function errorResponse(error: unknown): ToolResponse;
10
+ //# sourceMappingURL=tool-response.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-response.d.ts","sourceRoot":"","sources":["../../src/mcp/tool-response.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC1C,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY,CAEvD;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY,CAE1D"}
@@ -0,0 +1,7 @@
1
+ export function okResponse(value) {
2
+ return { content: [{ type: 'text', text: JSON.stringify(value, null, 2) }] };
3
+ }
4
+ export function errorResponse(error) {
5
+ return { content: [{ type: 'text', text: error.message }], isError: true };
6
+ }
7
+ //# sourceMappingURL=tool-response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-response.js","sourceRoot":"","sources":["../../src/mcp/tool-response.ts"],"names":[],"mappings":"AAKA,MAAM,UAAU,UAAU,CAAC,KAAc;IACvC,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;AAC/E,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,KAAc;IAC1C,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAG,KAAe,CAAC,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AACxF,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { type ScanSummary } from '../cli/summary.js';
2
+ import { type Recommendations } from '../cli/recommend.js';
3
+ import type { DetectedPattern } from '../detector/pattern-detector.js';
4
+ export interface AppScan extends ScanSummary {
5
+ app: string;
6
+ }
7
+ export declare function scanTool(input: string, deep?: boolean): AppScan[];
8
+ export interface AppRecommendations extends Recommendations {
9
+ app: string;
10
+ }
11
+ export declare function recommendTool(input: string): AppRecommendations[];
12
+ export interface ExplainResult {
13
+ app: string;
14
+ pattern: DetectedPattern;
15
+ }
16
+ export declare function explainTool(id: string, input: string): ExplainResult;
17
+ //# sourceMappingURL=tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/mcp/tools.ts"],"names":[],"mappings":"AAIA,OAAO,EAAiB,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAqC,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC9F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAevE,MAAM,WAAW,OAAQ,SAAQ,WAAW;IAC1C,GAAG,EAAE,MAAM,CAAC;CACb;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,UAAQ,GAAG,OAAO,EAAE,CAM/D;AAED,MAAM,WAAW,kBAAmB,SAAQ,eAAe;IACzD,GAAG,EAAE,MAAM,CAAC;CACb;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,kBAAkB,EAAE,CAMjE;AAED,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,eAAe,CAAC;CAC1B;AAED,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,aAAa,CASpE"}
@@ -0,0 +1,39 @@
1
+ import * as path from 'node:path';
2
+ import { discoverAppDirs } from '../scanner/app-dirs.js';
3
+ import { detectEnforcers } from '../scanner/enforcers.js';
4
+ import { scanRepo } from '../cli/scan.js';
5
+ import { toScanSummary } from '../cli/summary.js';
6
+ import { buildRecommendations, detectStack } from '../cli/recommend.js';
7
+ function resolveAppDirs(input) {
8
+ const root = path.resolve(input);
9
+ const dirs = discoverAppDirs(root);
10
+ if (dirs.length === 0) {
11
+ throw new Error(`No tsconfig.json found under ${root}. Point archprint at an app directory (a directory with a tsconfig.json); a monorepo root is fine.`);
12
+ }
13
+ return { root, dirs };
14
+ }
15
+ const displayApp = (dir, root) => path.relative(root, dir) || '.';
16
+ export function scanTool(input, deep = false) {
17
+ const { root, dirs } = resolveAppDirs(input);
18
+ return dirs.map((dir) => ({
19
+ app: displayApp(dir, root),
20
+ ...toScanSummary(scanRepo(dir, { deep })),
21
+ }));
22
+ }
23
+ export function recommendTool(input) {
24
+ const { root, dirs } = resolveAppDirs(input);
25
+ return dirs.map((dir) => ({
26
+ app: displayApp(dir, root),
27
+ ...buildRecommendations(scanRepo(dir, { deep: false }), detectStack(dir), detectEnforcers(dir)),
28
+ }));
29
+ }
30
+ export function explainTool(id, input) {
31
+ const { root, dirs } = resolveAppDirs(input);
32
+ for (const dir of dirs) {
33
+ const pattern = scanRepo(dir, { deep: false }).patterns.find((candidate) => candidate.config.id.toLowerCase() === id.toLowerCase());
34
+ if (pattern)
35
+ return { app: displayApp(dir, root), pattern: pattern.result };
36
+ }
37
+ throw new Error(`No pattern "${id}" found under ${path.resolve(input)}.`);
38
+ }
39
+ //# sourceMappingURL=tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/mcp/tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAoB,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAwB,MAAM,qBAAqB,CAAC;AAG9F,SAAS,cAAc,CAAC,KAAa;IACnC,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACjC,MAAM,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;IACnC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CACb,gCAAgC,IAAI,oGAAoG,CACzI,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AACxB,CAAC;AAED,MAAM,UAAU,GAAG,CAAC,GAAW,EAAE,IAAY,EAAU,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC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KAAK,EAAE,CAAC,WAAW,EAAE,CACtE,CAAC;QACF,IAAI,OAAO;YAAE,OAAO,EAAE,GAAG,EAAE,UAAU,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC;IAC9E,CAAC;IACD,MAAM,IAAI,KAAK,CAAC,eAAe,EAAE,iBAAiB,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AAC5E,CAAC"}
@@ -14,6 +14,7 @@ export interface ResolvedImport {
14
14
  }
15
15
  export declare function listSourceFiles(rootDir: string): string[];
16
16
  export declare function walkRepo(rootDir: string): WalkedFile[];
17
+ export declare function isWorkspacePackagePath(filePath: string, workspacePackages: readonly string[]): boolean;
17
18
  export declare function createImportAnalyzer(appDir: string, options?: {
18
19
  resolve?: boolean;
19
20
  }): (absoluteFilePath: string) => ResolvedImport[];
@@ -1 +1 @@
1
- {"version":3,"file":"file-walker.d.ts","sourceRoot":"","sources":["../../src/scanner/file-walker.ts"],"names":[],"mappings":"AAKA,OAAO,EAIL,KAAK,kBAAkB,EACxB,MAAM,sBAAsB,CAAC;AA2B9B,MAAM,WAAW,UAAW,SAAQ,kBAAkB;IACpD,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,MAAM,QAAQ,GAAG,UAAU,GAAG,OAAO,GAAG,WAAW,GAAG,UAAU,GAAG,YAAY,CAAC;AAEtF,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,QAAQ,CAAC;IACnB,aAAa,EAAE,OAAO,CAAC;IACvB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,eAAe,EAAE,OAAO,CAAC;CAC1B;AAsBD,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAqBzD;AAaD,wBAAgB,QAAQ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