@datasynx/agentic-ai-cartography 2.2.0 → 2.3.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-BNDCY2RI.js → chunk-7QEBFMN4.js} +47 -2441
- package/dist/chunk-7QEBFMN4.js.map +1 -0
- package/dist/chunk-7VZH5PFV.js +1134 -0
- package/dist/chunk-7VZH5PFV.js.map +1 -0
- package/dist/chunk-B2AKONVW.js +2465 -0
- package/dist/chunk-B2AKONVW.js.map +1 -0
- package/dist/cli.js +34 -9
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +1282 -107
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +283 -2
- package/dist/index.d.ts +283 -2
- package/dist/index.js +1218 -65
- package/dist/index.js.map +1 -1
- package/dist/mcp-bin.js +2 -1
- package/dist/mcp-bin.js.map +1 -1
- 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/cli.js
CHANGED
|
@@ -1,26 +1,31 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
|
-
CartographyDB,
|
|
4
|
-
buildCartographyToolHandlers,
|
|
5
|
-
createCartographyTools,
|
|
6
|
-
deriveSessionName,
|
|
7
|
-
diffTopology,
|
|
8
3
|
getRuleset,
|
|
9
4
|
isPersonalHost,
|
|
10
5
|
listRulesets,
|
|
11
6
|
loadOrgKey,
|
|
12
|
-
normalizeTenant,
|
|
13
7
|
pseudonymize,
|
|
14
8
|
pseudonymizeString,
|
|
15
|
-
redactValue,
|
|
16
9
|
reversePseudonym,
|
|
17
10
|
rotateOrgKey,
|
|
18
11
|
runDrift,
|
|
19
12
|
runLocalDiscovery,
|
|
13
|
+
startMcp
|
|
14
|
+
} from "./chunk-B2AKONVW.js";
|
|
15
|
+
import {
|
|
16
|
+
startApi
|
|
17
|
+
} from "./chunk-7VZH5PFV.js";
|
|
18
|
+
import {
|
|
19
|
+
CartographyDB,
|
|
20
|
+
buildCartographyToolHandlers,
|
|
21
|
+
createCartographyTools,
|
|
22
|
+
deriveSessionName,
|
|
23
|
+
diffTopology,
|
|
24
|
+
normalizeTenant,
|
|
25
|
+
redactValue,
|
|
20
26
|
stableStringify,
|
|
21
|
-
startMcp,
|
|
22
27
|
stripSensitive
|
|
23
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-7QEBFMN4.js";
|
|
24
29
|
import {
|
|
25
30
|
ConfigFileSchema,
|
|
26
31
|
CostEntrySchema,
|
|
@@ -4983,6 +4988,26 @@ error: --anon-mode must be 'reject' or 'strip' (got '${anonMode}')
|
|
|
4983
4988
|
} catch (err) {
|
|
4984
4989
|
process.stderr.write(`
|
|
4985
4990
|
error: ${err instanceof Error ? err.message : String(err)}
|
|
4991
|
+
`);
|
|
4992
|
+
process.exitCode = 1;
|
|
4993
|
+
}
|
|
4994
|
+
});
|
|
4995
|
+
program.command("api").description("Run the read-only REST/GraphQL API server over the topology store (4.2)").option("--http", "Use HTTP transport (default; kept for symmetry with mcp)", true).option("--port <n>", "HTTP port", "3737").option("--host <h>", "HTTP host", "127.0.0.1").option("--allowed-hosts <list>", "Comma-separated Host allowlist (required for non-loopback --host)").option("--allowed-origins <list>", "Comma-separated CORS Origin allowlist (default: same-origin only)").option("--token <secret>", "Bearer token required on requests (or CARTOGRAPHY_HTTP_TOKEN); mandatory for non-loopback --host").option("--db <path>", "DB path").option("--session <id>", 'Session to serve (id or "latest")', "latest").option("--tenant <id>", "Default tenant whose topology to serve (alias: --org; default: local)").option("--org <id>", "Alias for --tenant").option("--no-graphql", "Disable the /graphql endpoint (REST only)").action(async (opts) => {
|
|
4996
|
+
try {
|
|
4997
|
+
await startApi({
|
|
4998
|
+
port: parseInt(opts.port, 10),
|
|
4999
|
+
host: opts.host,
|
|
5000
|
+
allowedHosts: opts.allowedHosts ? String(opts.allowedHosts).split(",").map((h) => h.trim()).filter(Boolean) : void 0,
|
|
5001
|
+
allowedOrigins: opts.allowedOrigins ? String(opts.allowedOrigins).split(",").map((o2) => o2.trim()).filter(Boolean) : void 0,
|
|
5002
|
+
token: opts.token,
|
|
5003
|
+
dbPath: opts.db,
|
|
5004
|
+
session: opts.session,
|
|
5005
|
+
tenant: opts.tenant ?? opts.org,
|
|
5006
|
+
graphql: opts.graphql
|
|
5007
|
+
});
|
|
5008
|
+
} catch (err) {
|
|
5009
|
+
process.stderr.write(`
|
|
5010
|
+
error: ${err instanceof Error ? err.message : String(err)}
|
|
4986
5011
|
`);
|
|
4987
5012
|
process.exitCode = 1;
|
|
4988
5013
|
}
|