@datasynx/agentic-ai-cartography 2.10.0 → 2.12.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 CHANGED
@@ -42,6 +42,7 @@
42
42
  [What it does](#what-it-does) ·
43
43
  [Cross-platform](#cross-platform-support) ·
44
44
  [Features](#features) ·
45
+ [Platform & ecosystem](#platform--ecosystem) ·
45
46
  [CLI commands](#commands) ·
46
47
  [Architecture](#architecture) ·
47
48
  [Safety](#safety) ·
@@ -64,7 +65,7 @@ The topology is exposed with **progressive disclosure** so agents never blow the
64
65
  context window:
65
66
 
66
67
  - **Resources** (read-only context): `cartography://graph/summary` (low-token index — read first), `cartography://nodes/{id}`, `cartography://services`, `cartography://databases`, `cartography://dependencies/{id}`.
67
- - **Tools** (parameterized queries): `query_infrastructure`, `search_topology` (semantic), `get_dependencies` (recursive graph traversal), `list_services`, `get_node`, `get_summary`, `run_discovery`.
68
+ - **Tools** (parameterized queries): `query_infrastructure`, `search_topology` (semantic), `get_dependencies` (recursive graph traversal), `query_natural_language` (plain-English topology questions, LLM-free), `correlate_topology` (collapse the same resource across clouds/on-prem), `get_cost_summary`, `score_compliance`, `classify_drift`, `list_services`, `get_node`, `get_summary`, `run_discovery`.
68
69
  - **Prompts**: `audit-attack-surface`, `map-service-dependencies`, `onboard-to-system`.
69
70
 
70
71
  ### Quick start
@@ -257,11 +258,125 @@ Cartography runs natively on **Linux**, **macOS**, and **Windows** — no WSL re
257
258
  | **Database Discovery** | PostgreSQL, MySQL, MongoDB, Redis, SQLite file scan. Windows: `Get-Service` for DB engine detection |
258
259
  | **Cloud Scanning** | AWS (EC2/RDS/EKS/S3), GCP (Compute/GKE/Cloud Run), Azure (AKS/WebApps), Kubernetes |
259
260
  | **Human-in-the-Loop** | Chat with the agent mid-discovery: type `"hubspot windsurf"` to search for specific tools |
261
+ | **Terraform Import** | First-class `terraform-state` scanner — `*.tfstate` JSON → authoritative IaC nodes/edges, reconciled with observed reality (no `terraform` CLI, no extra credentials) |
262
+ | **Multi-Cloud Correlation** | Collapse the same logical resource discovered across AWS/GCP/Azure/on-prem into canonical entities + confidence-scored `same_as` links (`correlate_topology`, pure & deterministic) |
263
+ | **Intelligence Layer** | Cost attribution (FinOps rollups), compliance scoring (CIS/SOC2/ISO 27001 starters), anomaly detection (orphans / shadow IT), severity-classified drift |
260
264
  | **Export Formats** | Mermaid topology, D3.js interactive graph, Backstage YAML, JSON |
261
265
  | **Safety First** | Strict read-only **allowlist** (not a denylist): only known-safe commands run — shell-aware for POSIX *and* PowerShell, enforced at the command runner as defense-in-depth. 100% read-only |
262
266
 
263
267
  ---
264
268
 
269
+ ## Platform & Ecosystem
270
+
271
+ Beyond the MCP server, Cartography ships a **read-only platform** for teams and an
272
+ **ecosystem** of integrations. Everything below is opt-in, read-only by default, and never
273
+ phones home — the same locked constraints as the core.
274
+
275
+ ### REST / GraphQL API + web dashboard (Phase 4)
276
+
277
+ `cartography api` (and the `cartography-api` binary) exposes the topology over a **read-only**
278
+ HTTP API — REST under `/v1/...` with a published **OpenAPI 3.1** document, and **GraphQL** at
279
+ `/graphql` (SDL + introspection, no `Mutation` type). It reuses the MCP transport's constant-time
280
+ bearer auth + DNS-rebinding hardening and the same tenant-scoped query layer — no new runtime
281
+ dependency (Node's built-in `http`).
282
+
283
+ ```bash
284
+ cartography api # loopback dev — REST + /graphql + dashboard, no token
285
+ curl -s http://127.0.0.1:3737/v1/summary | jq .totals
286
+ # Exposed: a non-loopback bind REQUIRES both --allowed-hosts and --token
287
+ cartography api --host 0.0.0.0 --allowed-hosts cartograph.internal:3737 --token "$TOKEN"
288
+ cartography api --no-graphql # REST only
289
+ cartography api --no-dashboard # disable the / and /app web UI
290
+ ```
291
+
292
+ The same server hosts a self-contained **web dashboard** at `/` and `/app` — a live, interactive
293
+ Canvas topology view with node drill-down (no CDN, no build step, zero new dependency). It fetches
294
+ the live `/v1/*` API, so it inherits the API's auth + RBAC/tenant scoping for free.
295
+ See **[docs/how-to/api-server.md](docs/how-to/api-server.md)** and
296
+ **[docs/how-to/web-dashboard.md](docs/how-to/web-dashboard.md)**.
297
+
298
+ ### Role-based access control (Phase 4)
299
+
300
+ `cartography auth` layers **identity + roles** over the HTTP surfaces. A bearer token resolves to a
301
+ principal `{ subject, tenant, role }`; the server returns **401** for an unknown token, **403** for
302
+ an insufficient role, and **pins every read to the principal's tenant** — no cross-tenant read by
303
+ spoofing a header. Roles are `viewer` ⊂ `operator` (adds `run_discovery`) ⊂ `admin` (adds credential
304
+ admin). Fully backward-compatible: with no credentials configured, the server behaves exactly as
305
+ before. Tokens are stored **hashed** (sha256), printed once on creation.
306
+
307
+ ```bash
308
+ cartography auth add alice --role operator --tenant acme # prints the bearer token ONCE
309
+ cartography auth list # subjects/roles/tenants, never the token
310
+ cartography auth revoke alice
311
+ cartography api --auth-required # require auth even on loopback
312
+ ```
313
+
314
+ See **[docs/how-to/rbac.md](docs/how-to/rbac.md)**.
315
+
316
+ ### Central collector → production (Phase 4)
317
+
318
+ `cartography mcp --server-mode` runs the binary as a self-hostable **central collector** that pools
319
+ every employee's *consented* discovery into one org-wide topology — consent-first, never phones home.
320
+ It exposes an authenticated `POST /ingest` write route (the consent-gated push envelope, server-side
321
+ anonymization re-validation via `--anon-mode reject|strip`, per-org rate limit → `429 + Retry-After`)
322
+ and an org-wide merged `get_summary`. Public `GET /healthz` (liveness) / `GET /readyz` (readiness)
323
+ probes and a `deploy/` Docker bundle make it orchestrator-ready.
324
+
325
+ ```bash
326
+ export CARTOGRAPHY_CENTRAL_TOKEN=$(openssl rand -base64 32)
327
+ cartography mcp --server-mode --host 0.0.0.0 \
328
+ --allowed-hosts cartograph.internal:3737 --org acme --anon-mode reject
329
+ ```
330
+
331
+ For an org-wide store at **10K+ nodes**, opt into a **Neo4j/Memgraph graph-DB backend** for the
332
+ collector's merge + summary path (`neo4j-driver` is an optional dependency; if absent or unreachable
333
+ it **degrades to SQLite**, never fails):
334
+
335
+ ```bash
336
+ cartography mcp --server-mode --store-backend graph \
337
+ --graph-url bolt://graph.internal:7687 --graph-user neo4j --graph-password "$NEO4J_PASSWORD"
338
+ # or via env: CARTOGRAPHY_GRAPH_URL / _USER / _PASSWORD (kept out of process listings)
339
+ ```
340
+
341
+ See **[docs/how-to/self-host-collector.md](docs/how-to/self-host-collector.md)**.
342
+
343
+ ### Backstage live data source (Phase 4)
344
+
345
+ Cartography maps discovered infrastructure to **Backstage catalog entities** (`Component`/`API`/
346
+ `Resource` + `dependsOn` relations). Export a static `catalog-info.yaml` snapshot, or consume the
347
+ **live, tenant-scoped** endpoint `GET /v1/backstage/catalog` on the API server (re-mapped on every
348
+ request, RBAC-pinned). A reference `CartographEntityProvider` lives in
349
+ [`examples/backstage-plugin/`](examples/backstage-plugin/). See
350
+ **[docs/how-to/backstage.md](docs/how-to/backstage.md)**.
351
+
352
+ ### Drift alerting — Slack / PagerDuty / Jira (Phase 4)
353
+
354
+ `cartography drift` classifies topology drift into `info`/`warning`/`critical` and fans it out to
355
+ the **sinks** configured under the `drift` block of `cartography.config.json` — `stdout`, `slack`,
356
+ `pagerduty`, `jira`, or a generic `webhook`. With no config it prints one redacted JSON line and makes
357
+ **no outbound request**. Every sink is hardened identically (`https:`-or-loopback only, bounded
358
+ timeout, body always credential-redacted, only host:port logged, one failing sink never blocks the
359
+ others). See **[docs/how-to/drift-and-ci.md](docs/how-to/drift-and-ci.md)**.
360
+
361
+ ### Kubernetes operator (Phase 5)
362
+
363
+ `cartography operator` runs the **deterministic, LLM-free** discovery continuously **inside** a
364
+ cluster and reports drift between reconcile cycles — a "continuous CMDB for Kubernetes". It's a thin
365
+ reconcile loop (no CRD, no controller-runtime, no agent loop), read-only (`kubectl get …` via the
366
+ allowlist only). The `deploy/k8s/` manifests ship a **read-only** ServiceAccount + ClusterRole
367
+ (`get/list/watch` only — no write verbs).
368
+
369
+ ```bash
370
+ kubectl apply -f deploy/k8s/operator.yaml # in-cluster, single-replica Deployment
371
+ cartography operator --once # local dev against your kube-context
372
+ cartography operator --interval 300 # long-running reconcile loop
373
+ ```
374
+
375
+ See **[docs/how-to/k8s-operator.md](docs/how-to/k8s-operator.md)** and
376
+ **[docs/how-to/terraform-import.md](docs/how-to/terraform-import.md)**.
377
+
378
+ ---
379
+
265
380
  ## Requirements
266
381
 
267
382
  - **Node.js >= 20** (Linux, macOS, or Windows) — that's it for the MCP server and the
@@ -349,10 +464,31 @@ datasynx-cartography drift [base] [current] Severity-classified drift ale
349
464
  --webhook <url> Outbound webhook sink (opt-in; token via CARTOGRAPHY_DRIFT_TOKEN)
350
465
  datasynx-cartography bookmarks View all browser bookmarks
351
466
  datasynx-cartography seed [--file <path>] Manually add infrastructure nodes
467
+ datasynx-cartography cost --file <csv> Enrich nodes with owner/cost (FinOps)
468
+ datasynx-cartography compliance [session] --ruleset <name> Grade against baseline/cis/soc2/iso27001
469
+ datasynx-cartography consent <…> Per-employee sharing policy + anonymization
470
+ datasynx-cartography sync <status|review|push> Opt-in central-DB outbound pipeline
471
+ datasynx-cartography schedule --config <file> Recurring headless discovery + drift
472
+ datasynx-cartography prune [--older-than <days>] Prune old sessions / compact the audit trail
352
473
  datasynx-cartography doctor Check all requirements + cloud CLIs
353
474
  datasynx-cartography docs Full feature reference
354
475
  ```
355
476
 
477
+ ### Platform & Ecosystem
478
+
479
+ ```
480
+ datasynx-cartography mcp [--server-mode] [--http] MCP server / central collector (Phase 4)
481
+ datasynx-cartography api [--no-graphql] [--no-dashboard] REST + GraphQL + web dashboard (Phase 4)
482
+ --host <h> --port <n> --token <secret> --allowed-hosts <list> (non-loopback needs both)
483
+ --tenant <id> / --org <id> Tenant whose topology to serve
484
+ datasynx-cartography auth add <subject> --role <viewer|operator|admin> --tenant <id> RBAC (Phase 4)
485
+ datasynx-cartography auth list | revoke <subject>
486
+ datasynx-cartography operator [--once] [--interval <sec>] Kubernetes operator (Phase 5)
487
+ ```
488
+
489
+ > The `cartography-mcp` and `cartography-api` binaries start the MCP server and the API server
490
+ > directly (used by `server.json` / containers via `npx`).
491
+
356
492
  ---
357
493
 
358
494
  ## Output Files
@@ -380,7 +516,11 @@ datasynx-output/
380
516
 
381
517
  The **MCP server is the headline interface** — LLM-agnostic and the same SQLite graph
382
518
  underneath every entry point. Discovery (deterministic scanners or the optional Claude
383
- loop) writes the graph; any MCP host reads it.
519
+ loop) writes the graph; any MCP host reads it. The Phase 4 **platform** adds read-only
520
+ HTTP surfaces over that same graph — the REST/GraphQL API (`cartography api`), the web
521
+ dashboard, RBAC (`cartography auth`), the self-hostable central collector
522
+ (`mcp --server-mode`, with an optional Neo4j/Memgraph backend), and a live Backstage
523
+ data source — all sharing the MCP transport's bearer auth + tenant scoping.
384
524
 
385
525
  ```
386
526
  ┌──────────────────────────────────────────┐
package/dist/api-bin.js CHANGED
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  parseApiArgs,
4
4
  startApi
5
- } from "./chunk-W4Q3TXHR.js";
6
- import "./chunk-YVV6NIT2.js";
5
+ } from "./chunk-PD67MOKR.js";
6
+ import "./chunk-LO6YFS6H.js";
7
7
  import "./chunk-QQOQBE2A.js";
8
8
  import "./chunk-2SZ5QHGH.js";
9
9
 
@@ -3391,6 +3391,7 @@ export {
3391
3391
  k8sScanner,
3392
3392
  databasesScanner,
3393
3393
  stripSensitive,
3394
+ redactSecrets,
3394
3395
  redactValue,
3395
3396
  buildCartographyToolHandlers,
3396
3397
  createCartographyTools,
@@ -3414,4 +3415,4 @@ export {
3414
3415
  AuthorizationError,
3415
3416
  authorize
3416
3417
  };
3417
- //# sourceMappingURL=chunk-YVV6NIT2.js.map
3418
+ //# sourceMappingURL=chunk-LO6YFS6H.js.map