@datasynx/agentic-ai-cartography 2.2.0 → 2.4.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.
- package/dist/api-bin.js +24 -0
- package/dist/api-bin.js.map +1 -0
- package/dist/chunk-B4QWX7CP.js +2618 -0
- package/dist/chunk-B4QWX7CP.js.map +1 -0
- package/dist/chunk-L4OSL7I6.js +1134 -0
- package/dist/chunk-L4OSL7I6.js.map +1 -0
- package/dist/{chunk-WCR47QA2.js → chunk-QQOQBE2A.js} +16 -5
- package/dist/chunk-QQOQBE2A.js.map +1 -0
- package/dist/{chunk-BNDCY2RI.js → chunk-X5JA2UDT.js} +60 -2445
- package/dist/chunk-X5JA2UDT.js.map +1 -0
- package/dist/cli.js +36 -11
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +1522 -156
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +450 -10
- package/dist/index.d.ts +450 -10
- package/dist/index.js +1449 -114
- package/dist/index.js.map +1 -1
- package/dist/mcp-bin.js +3 -2
- package/dist/mcp-bin.js.map +1 -1
- package/dist/{types-TJWXAQ2L.js → types-5L3AGZLG.js} +2 -2
- package/package.json +8 -5
- package/scripts/gen-api-schemas.ts +29 -0
- package/scripts/sync-version.mjs +51 -0
- package/server.json +2 -2
- package/dist/chunk-BNDCY2RI.js.map +0 -1
- package/dist/chunk-WCR47QA2.js.map +0 -1
- /package/dist/{types-TJWXAQ2L.js.map → types-5L3AGZLG.js.map} +0 -0
package/dist/mcp-bin.js
CHANGED
package/dist/mcp-bin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/mcp-bin.ts"],"sourcesContent":["/**\n * `cartography-mcp` — dedicated binary that launches the MCP server.\n *\n * Minimal arg parsing (no commander) keeps stdout clean for the stdio protocol.\n * Usage:\n * cartography-mcp # stdio (default)\n * cartography-mcp --http --port N # Streamable HTTP\n * cartography-mcp --http --host 0.0.0.0 --allowed-hosts h:port --token SECRET\n * cartography-mcp --db <path> --session <id|latest> --tenant <id> --no-semantic\n */\n\nimport { startMcp, parseMcpArgs } from './mcp/start.js';\n\nconst USAGE =\n 'Usage: cartography-mcp [--http] [--port N] [--host H] [--allowed-hosts h1,h2] ' +\n '[--token SECRET] [--db PATH] [--session ID] [--tenant ID|--org ID] [--no-semantic]\\n';\n\nconst parsed = parseMcpArgs(process.argv.slice(2));\nif (parsed.help) {\n process.stderr.write(USAGE);\n process.exitCode = 0;\n} else {\n const { help: _help, ...opts } = parsed;\n startMcp(opts).catch((err) => {\n process.stderr.write(`cartography-mcp failed: ${err instanceof Error ? err.message : String(err)}\\n`);\n process.exitCode = 1;\n });\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/mcp-bin.ts"],"sourcesContent":["/**\n * `cartography-mcp` — dedicated binary that launches the MCP server.\n *\n * Minimal arg parsing (no commander) keeps stdout clean for the stdio protocol.\n * Usage:\n * cartography-mcp # stdio (default)\n * cartography-mcp --http --port N # Streamable HTTP\n * cartography-mcp --http --host 0.0.0.0 --allowed-hosts h:port --token SECRET\n * cartography-mcp --db <path> --session <id|latest> --tenant <id> --no-semantic\n */\n\nimport { startMcp, parseMcpArgs } from './mcp/start.js';\n\nconst USAGE =\n 'Usage: cartography-mcp [--http] [--port N] [--host H] [--allowed-hosts h1,h2] ' +\n '[--token SECRET] [--db PATH] [--session ID] [--tenant ID|--org ID] [--no-semantic]\\n';\n\nconst parsed = parseMcpArgs(process.argv.slice(2));\nif (parsed.help) {\n process.stderr.write(USAGE);\n process.exitCode = 0;\n} else {\n const { help: _help, ...opts } = parsed;\n startMcp(opts).catch((err) => {\n process.stderr.write(`cartography-mcp failed: ${err instanceof Error ? err.message : String(err)}\\n`);\n process.exitCode = 1;\n });\n}\n"],"mappings":";;;;;;;;;;AAaA,IAAM,QACJ;AAGF,IAAM,SAAS,aAAa,QAAQ,KAAK,MAAM,CAAC,CAAC;AACjD,IAAI,OAAO,MAAM;AACf,UAAQ,OAAO,MAAM,KAAK;AAC1B,UAAQ,WAAW;AACrB,OAAO;AACL,QAAM,EAAE,MAAM,OAAO,GAAG,KAAK,IAAI;AACjC,WAAS,IAAI,EAAE,MAAM,CAAC,QAAQ;AAC5B,YAAQ,OAAO,MAAM,2BAA2B,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG,CAAC;AAAA,CAAI;AACpG,YAAQ,WAAW;AAAA,EACrB,CAAC;AACH;","names":[]}
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
SharingLevelSchema,
|
|
31
31
|
centralDbFromEnv,
|
|
32
32
|
defaultConfig
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-QQOQBE2A.js";
|
|
34
34
|
export {
|
|
35
35
|
ANOMALY_KINDS,
|
|
36
36
|
ANOMALY_SEVERITIES,
|
|
@@ -63,4 +63,4 @@ export {
|
|
|
63
63
|
centralDbFromEnv,
|
|
64
64
|
defaultConfig
|
|
65
65
|
};
|
|
66
|
-
//# sourceMappingURL=types-
|
|
66
|
+
//# sourceMappingURL=types-5L3AGZLG.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datasynx/agentic-ai-cartography",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"description": "MCP-first infrastructure & agentic-AI cartography — install once, every AI agent knows your system landscape. Read-only discovery exposed over the Model Context Protocol.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
"types": "./dist/index.d.ts",
|
|
11
11
|
"bin": {
|
|
12
12
|
"datasynx-cartography": "./dist/cli.js",
|
|
13
|
-
"cartography-mcp": "./dist/mcp-bin.js"
|
|
13
|
+
"cartography-mcp": "./dist/mcp-bin.js",
|
|
14
|
+
"cartography-api": "./dist/api-bin.js"
|
|
14
15
|
},
|
|
15
16
|
"exports": {
|
|
16
17
|
".": {
|
|
@@ -44,7 +45,8 @@
|
|
|
44
45
|
"test:coverage": "vitest run --coverage",
|
|
45
46
|
"docs:llms": "node scripts/build-llms.mjs",
|
|
46
47
|
"docs:tables": "tsx scripts/gen-docs.ts",
|
|
47
|
-
"docs:
|
|
48
|
+
"docs:api": "tsx scripts/gen-api-schemas.ts",
|
|
49
|
+
"docs:build": "npm run docs:tables && npm run docs:llms && npm run docs:api",
|
|
48
50
|
"lint": "tsc --noEmit",
|
|
49
51
|
"typecheck": "tsc --noEmit",
|
|
50
52
|
"release": "semantic-release",
|
|
@@ -103,20 +105,21 @@
|
|
|
103
105
|
"@anthropic-ai/claude-agent-sdk": ">=0.2.70 <0.4.0",
|
|
104
106
|
"@anthropic-ai/sdk": "^0.104.0",
|
|
105
107
|
"@huggingface/transformers": "^4.2.0",
|
|
106
|
-
"openai": "^
|
|
108
|
+
"openai": "^6.44.0",
|
|
107
109
|
"sqlite-vec": "^0.1.9"
|
|
108
110
|
},
|
|
109
111
|
"devDependencies": {
|
|
110
112
|
"@anthropic-ai/mcpb": "^2.1.2",
|
|
111
113
|
"@arethetypeswrong/cli": "^0.18.2",
|
|
112
|
-
"ajv": "^8.20.0",
|
|
113
114
|
"@semantic-release/changelog": "^6.0.3",
|
|
115
|
+
"@semantic-release/exec": "^7.1.0",
|
|
114
116
|
"@semantic-release/git": "^10.0.1",
|
|
115
117
|
"@semantic-release/github": "^11.0.1",
|
|
116
118
|
"@semantic-release/npm": "^12.0.1",
|
|
117
119
|
"@types/better-sqlite3": "^7.6.12",
|
|
118
120
|
"@types/node": "^22.10.0",
|
|
119
121
|
"@vitest/coverage-v8": "^4.1.0",
|
|
122
|
+
"ajv": "^8.20.0",
|
|
120
123
|
"license-checker": "^25.0.1",
|
|
121
124
|
"publint": "^0.3.0",
|
|
122
125
|
"semantic-release": "^24.2.0",
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!/usr/bin/env tsx
|
|
2
|
+
/**
|
|
3
|
+
* Regenerate the committed API contract artifacts from the zod schemas / SDL:
|
|
4
|
+
* - docs/api/openapi.json (OpenAPI 3.1, from src/api/openapi.ts)
|
|
5
|
+
* - docs/api/schema.graphql (GraphQL SDL, from src/api/graphql.ts)
|
|
6
|
+
*
|
|
7
|
+
* Run via `npm run docs:api`. A test (`test/openapi.test.ts` / `test/api-graphql.test.ts`)
|
|
8
|
+
* asserts the in-memory build deep-equals these files, so they can never drift from
|
|
9
|
+
* what the server serves. The embedded OpenAPI `info.version` is kept in lockstep with
|
|
10
|
+
* package.json by scripts/sync-version.mjs on release.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { readFileSync, writeFileSync, mkdirSync } from 'node:fs';
|
|
14
|
+
import { fileURLToPath } from 'node:url';
|
|
15
|
+
import { dirname, resolve } from 'node:path';
|
|
16
|
+
import { buildOpenApiDocument } from '../src/api/openapi.js';
|
|
17
|
+
import { SDL } from '../src/api/graphql.js';
|
|
18
|
+
|
|
19
|
+
const root = resolve(dirname(fileURLToPath(import.meta.url)), '..');
|
|
20
|
+
const version = JSON.parse(readFileSync(resolve(root, 'package.json'), 'utf8')).version as string;
|
|
21
|
+
|
|
22
|
+
const outDir = resolve(root, 'docs/api');
|
|
23
|
+
mkdirSync(outDir, { recursive: true });
|
|
24
|
+
|
|
25
|
+
const openapi = buildOpenApiDocument({ version });
|
|
26
|
+
writeFileSync(resolve(outDir, 'openapi.json'), JSON.stringify(openapi, null, 2) + '\n');
|
|
27
|
+
writeFileSync(resolve(outDir, 'schema.graphql'), SDL.endsWith('\n') ? SDL : SDL + '\n');
|
|
28
|
+
|
|
29
|
+
console.error(`gen-api-schemas: wrote docs/api/openapi.json (v${version}) + docs/api/schema.graphql`);
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Propagate a release version to every non-package.json site that carries it.
|
|
3
|
+
// @semantic-release/npm already bumps package.json + package-lock.json; this
|
|
4
|
+
// script keeps the MCP registry manifest, the .mcpb manifest, the Claude Code
|
|
5
|
+
// plugin manifest, and the hard-coded MCP SERVER_VERSION in lockstep. Run by
|
|
6
|
+
// the @semantic-release/exec prepare step as: node scripts/sync-version.mjs <version>
|
|
7
|
+
// Falls back to package.json's version when no argument is given (manual use).
|
|
8
|
+
//
|
|
9
|
+
// Edits are raw-text regex replacements (not JSON re-serialization) so the
|
|
10
|
+
// existing hand-authored formatting of server.json / manifest.json is preserved
|
|
11
|
+
// byte-for-byte except the version literals.
|
|
12
|
+
import { readFileSync, writeFileSync } from 'node:fs';
|
|
13
|
+
import { fileURLToPath } from 'node:url';
|
|
14
|
+
import { dirname, resolve } from 'node:path';
|
|
15
|
+
|
|
16
|
+
const root = resolve(dirname(fileURLToPath(import.meta.url)), '..');
|
|
17
|
+
const version =
|
|
18
|
+
process.argv[2] ?? JSON.parse(readFileSync(resolve(root, 'package.json'), 'utf8')).version;
|
|
19
|
+
|
|
20
|
+
if (!/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/.test(version)) {
|
|
21
|
+
console.error(`sync-version: refusing to write invalid version "${version}"`);
|
|
22
|
+
throw new Error(`invalid version: ${version}`);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/** Replace every match of `pattern` in `relPath` with `replacement`; require ≥1 hit. */
|
|
26
|
+
const editFile = (relPath, pattern, replacement) => {
|
|
27
|
+
const path = resolve(root, relPath);
|
|
28
|
+
const before = readFileSync(path, 'utf8');
|
|
29
|
+
let hits = 0;
|
|
30
|
+
const after = before.replace(pattern, (m) => {
|
|
31
|
+
hits += 1;
|
|
32
|
+
return replacement(m);
|
|
33
|
+
});
|
|
34
|
+
if (hits === 0) {
|
|
35
|
+
throw new Error(`sync-version: no version marker matched in ${relPath}`);
|
|
36
|
+
}
|
|
37
|
+
if (after !== before) writeFileSync(path, after);
|
|
38
|
+
console.error(`sync-version: ${relPath} -> ${version} (${hits} site${hits === 1 ? '' : 's'})`);
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
// `"version": "..."` — leading quote excludes `"manifest_version"`. Matches both
|
|
42
|
+
// the top-level and packages[].version in server.json (intentionally kept equal).
|
|
43
|
+
const jsonVersion = /"version":(\s*)"[^"]*"/g;
|
|
44
|
+
const toJson = (m) => m.replace(/"[^"]*"$/, `"${version}"`);
|
|
45
|
+
|
|
46
|
+
editFile('server.json', jsonVersion, toJson);
|
|
47
|
+
editFile('mcpb/manifest.json', jsonVersion, toJson);
|
|
48
|
+
editFile('plugin/.claude-plugin/plugin.json', jsonVersion, toJson);
|
|
49
|
+
editFile('src/mcp/server.ts', /const SERVER_VERSION = '[^']*';/, () => `const SERVER_VERSION = '${version}';`);
|
|
50
|
+
// API server (4.2): the only `"version"` site in the generated OpenAPI doc is info.version.
|
|
51
|
+
editFile('docs/api/openapi.json', jsonVersion, toJson);
|
package/server.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
|
|
3
3
|
"name": "io.github.datasynx/cartography",
|
|
4
4
|
"description": "MCP-first read-only discovery of your infra & SaaS landscape as MCP resources, tools and prompts.",
|
|
5
|
-
"version": "2.
|
|
5
|
+
"version": "2.4.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"url": "https://github.com/datasynx/agentic-ai-cartography",
|
|
8
8
|
"source": "github"
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"registryType": "npm",
|
|
13
13
|
"registryBaseUrl": "https://registry.npmjs.org",
|
|
14
14
|
"identifier": "@datasynx/agentic-ai-cartography",
|
|
15
|
-
"version": "2.
|
|
15
|
+
"version": "2.4.0",
|
|
16
16
|
"runtimeHint": "npx",
|
|
17
17
|
"transport": { "type": "stdio" },
|
|
18
18
|
"runtimeArguments": [
|