@archrad/deterministic 0.1.4 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +39 -4
- package/README.md +81 -48
- package/biome.json +32 -25
- package/dist/cli.js +1 -1
- package/dist/mcp-server-tools-patch.d.ts +29 -0
- package/dist/mcp-server-tools-patch.d.ts.map +1 -0
- package/dist/mcp-server-tools-patch.js +71 -0
- package/dist/mcp-server.d.ts +7 -0
- package/dist/mcp-server.d.ts.map +1 -0
- package/dist/mcp-server.js +256 -0
- package/dist/nodeExpress.d.ts.map +1 -1
- package/dist/nodeExpress.js +5 -1
- package/dist/openapi-to-ir.d.ts.map +1 -1
- package/dist/openapi-to-ir.js +6 -4
- package/dist/pythonFastAPI.d.ts.map +1 -1
- package/dist/pythonFastAPI.js +3 -1
- package/dist/static-rule-guidance.d.ts +19 -0
- package/dist/static-rule-guidance.d.ts.map +1 -0
- package/dist/static-rule-guidance.js +165 -0
- package/dist/stringEdgeStrip.d.ts +8 -0
- package/dist/stringEdgeStrip.d.ts.map +1 -0
- package/dist/stringEdgeStrip.js +25 -0
- package/docs/CI.md +122 -0
- package/docs/DRIFT.md +52 -0
- package/docs/MCP.md +153 -0
- package/docs/RULE_CODES.md +208 -0
- package/package.json +17 -10
- package/scripts/generate-corpus.mjs +667 -0
- package/scripts/npm-postinstall.mjs +22 -0
- package/scripts/smoke-mcp.mjs +44 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Local MCP smoke test: spawns archrad-mcp, lists tools, calls archrad_suggest_fix.
|
|
3
|
+
* Run from package root: npm run build && npm run smoke:mcp
|
|
4
|
+
*/
|
|
5
|
+
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
6
|
+
import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js';
|
|
7
|
+
import { dirname, join } from 'node:path';
|
|
8
|
+
import { fileURLToPath } from 'node:url';
|
|
9
|
+
|
|
10
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
11
|
+
const root = join(__dirname, '..');
|
|
12
|
+
const serverJs = join(root, 'dist', 'mcp-server.js');
|
|
13
|
+
|
|
14
|
+
const transport = new StdioClientTransport({
|
|
15
|
+
command: process.execPath,
|
|
16
|
+
args: [serverJs],
|
|
17
|
+
cwd: root,
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
const client = new Client({ name: 'archrad-smoke', version: '0.0.0' });
|
|
21
|
+
await client.connect(transport);
|
|
22
|
+
|
|
23
|
+
const { tools } = await client.listTools();
|
|
24
|
+
const names = tools.map((t) => t.name).sort();
|
|
25
|
+
console.log('Tools (%d):', names.length, names.join(', '));
|
|
26
|
+
|
|
27
|
+
if (!names.includes('archrad_suggest_fix')) {
|
|
28
|
+
console.error('FAIL: archrad_suggest_fix not registered');
|
|
29
|
+
process.exitCode = 1;
|
|
30
|
+
} else {
|
|
31
|
+
const r = await client.callTool({
|
|
32
|
+
name: 'archrad_suggest_fix',
|
|
33
|
+
arguments: { findingCode: 'IR-LINT-MISSING-AUTH-010' },
|
|
34
|
+
});
|
|
35
|
+
const text = r.content?.[0]?.text;
|
|
36
|
+
if (!text || !text.includes('IR-LINT-MISSING-AUTH-010')) {
|
|
37
|
+
console.error('FAIL: unexpected suggest_fix response', r);
|
|
38
|
+
process.exitCode = 1;
|
|
39
|
+
} else {
|
|
40
|
+
console.log('archrad_suggest_fix OK (snippet):', text.slice(0, 200).replace(/\n/g, ' '), '…');
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
await client.close();
|