@datasynx/agentic-ai-cartography 2.7.0 → 2.9.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/index.d.cts CHANGED
@@ -1469,9 +1469,18 @@ interface NodeIdentity {
1469
1469
  /** Secondary merge key — content hash that catches `id` drift between machines. */
1470
1470
  contentHash: string;
1471
1471
  }
1472
+ /**
1473
+ * A value that may be produced synchronously (SQLite, `better-sqlite3`) or
1474
+ * asynchronously (a graph DB over the async Bolt driver, 4.3). The ingest core
1475
+ * `await`s every backend call, so a sync implementation incurs no overhead and the
1476
+ * SQLite path stays byte-for-byte synchronous.
1477
+ */
1478
+ type Awaitable<T> = T | Promise<T>;
1472
1479
  /**
1473
1480
  * A provider-agnostic central store. All operations are scoped to a single tenant
1474
- * (`org`); there is no cross-tenant read or write path.
1481
+ * (`org`); there is no cross-tenant read or write path. Methods are **async-capable**
1482
+ * (4.3): `SqliteStoreBackend` returns synchronously, `GraphStoreBackend` returns
1483
+ * Promises; consumers await either.
1475
1484
  */
1476
1485
  interface StoreBackend {
1477
1486
  /**
@@ -1480,15 +1489,15 @@ interface StoreBackend {
1480
1489
  * `'created'` when this is the first observation of the logical node, `'merged'`
1481
1490
  * when it collapsed onto an existing one.
1482
1491
  */
1483
- upsertNode(org: string, node: DiscoveryNode, identity: NodeIdentity, contributor: Contributor): 'created' | 'merged';
1492
+ upsertNode(org: string, node: DiscoveryNode, identity: NodeIdentity, contributor: Contributor): Awaitable<'created' | 'merged'>;
1484
1493
  /** Insert an edge under `org` (idempotent on the logical `(source, target, relationship)` key). */
1485
- insertEdge(org: string, edge: DiscoveryEdge): void;
1494
+ insertEdge(org: string, edge: DiscoveryEdge): Awaitable<void>;
1486
1495
  /** Org-wide aggregate summary (merged counts across all contributors). */
1487
- getSummary(org: string): OrgSummary;
1496
+ getSummary(org: string): Awaitable<OrgSummary>;
1488
1497
  /** Contributors for a merged logical node (test/audit helper). */
1489
- getContributors(globalId: string): Contributor[];
1498
+ getContributors(globalId: string): Awaitable<Contributor[]>;
1490
1499
  /** Release any underlying resources. */
1491
- close(): void;
1500
+ close(): Awaitable<void>;
1492
1501
  }
1493
1502
 
1494
1503
  /**
@@ -1519,6 +1528,76 @@ declare class SqliteStoreBackend implements StoreBackend {
1519
1528
  close(): void;
1520
1529
  }
1521
1530
 
1531
+ /**
1532
+ * `GraphStoreBackend` (4.3) — an opt-in central-store backend over a Bolt-speaking
1533
+ * graph database (Neo4j / Memgraph). Implements the async-capable {@link StoreBackend}
1534
+ * seam so the central collector's merge + org-summary path can scale to 10K+ nodes on a
1535
+ * native graph engine, while SQLite stays the zero-config default.
1536
+ *
1537
+ * `neo4j-driver` is an OPTIONAL dependency, dynamically imported by `openStoreBackend`
1538
+ * (`src/store/index.ts`); this module depends only on a minimal structural Bolt interface,
1539
+ * so it compiles and the package degrades gracefully when the driver is absent. The driver
1540
+ * is injected (constructor), which also lets tests drive it with a mock — no live DB in CI.
1541
+ *
1542
+ * Merge identity mirrors SQLite: a logical node is keyed by `(org, globalId)`; the
1543
+ * `contentHash` is stored + indexed for the id-drift secondary collapse (best-effort here,
1544
+ * tracked as a follow-up). Contributors are `(org, globalId, machineId)` with max-confidence.
1545
+ */
1546
+
1547
+ interface BoltRecord {
1548
+ get(key: string): unknown;
1549
+ }
1550
+ interface BoltResult {
1551
+ records: BoltRecord[];
1552
+ }
1553
+ interface BoltSession {
1554
+ run(cypher: string, params?: Record<string, unknown>): Promise<BoltResult>;
1555
+ close(): Promise<void>;
1556
+ }
1557
+ interface BoltDriver {
1558
+ session(): BoltSession;
1559
+ close(): Promise<void>;
1560
+ verifyConnectivity?(): Promise<unknown>;
1561
+ }
1562
+ declare class GraphStoreBackend implements StoreBackend {
1563
+ private readonly driver;
1564
+ constructor(driver: BoltDriver);
1565
+ private run;
1566
+ upsertNode(org: string, node: DiscoveryNode, identity: NodeIdentity, contributor: Contributor): Promise<'created' | 'merged'>;
1567
+ insertEdge(org: string, edge: DiscoveryEdge): Promise<void>;
1568
+ getSummary(org: string): Promise<OrgSummary>;
1569
+ getContributors(globalId: string): Promise<Contributor[]>;
1570
+ close(): Promise<void>;
1571
+ }
1572
+
1573
+ /**
1574
+ * Central-store backend factory (4.3).
1575
+ *
1576
+ * `openStoreBackend` returns a {@link GraphStoreBackend} only when a graph backend is
1577
+ * explicitly requested AND the optional `neo4j-driver` is installed AND the server is
1578
+ * reachable; otherwise it logs a structured WARN and returns the always-available
1579
+ * {@link SqliteStoreBackend}. A missing driver or an unreachable graph server therefore
1580
+ * NEVER breaks the collector — it degrades to SQLite (the "optional deps degrade" locked
1581
+ * constraint). SQLite stays the zero-config default.
1582
+ */
1583
+
1584
+ interface StoreBackendOptions {
1585
+ /** `'graph'` opts into the graph DB; anything else (default) uses SQLite. */
1586
+ backend?: 'sqlite' | 'graph';
1587
+ /** Bolt URL, e.g. `bolt://graph.internal:7687` or `neo4j+s://…`. */
1588
+ graphUrl?: string;
1589
+ graphUser?: string;
1590
+ graphPassword?: string;
1591
+ /** Injected driver factory (tests). Defaults to dynamically importing `neo4j-driver`. */
1592
+ driverFactory?: (url: string, user: string, password: string) => Promise<BoltDriver>;
1593
+ }
1594
+ /**
1595
+ * Resolve the central store backend. Graph when requested + available; else SQLite.
1596
+ * The returned backend is owned by the caller (call `close()` on shutdown for the graph
1597
+ * backend; the SQLite backend's `close()` is a no-op — the `CartographyDB` is shared).
1598
+ */
1599
+ declare function openStoreBackend(db: CartographyDB, opts?: StoreBackendOptions): Promise<StoreBackend>;
1600
+
1522
1601
  /**
1523
1602
  * `QueryBackend` — the **read-only** query seam for the API server (4.2).
1524
1603
  *
@@ -1770,7 +1849,7 @@ interface IngestOptions {
1770
1849
  * The caller (HTTP handler) wraps this in try/catch; the store's per-node upsert is
1771
1850
  * itself transactional, so a single bad node never half-writes a row.
1772
1851
  */
1773
- declare function ingestEnvelope(store: StoreBackend, envelope: IngestEnvelope, opts?: IngestOptions): IngestResult;
1852
+ declare function ingestEnvelope(store: StoreBackend, envelope: IngestEnvelope, opts?: IngestOptions): Promise<IngestResult>;
1774
1853
 
1775
1854
  /**
1776
1855
  * Ingest backpressure for the central collector (4.7).
@@ -1825,7 +1904,7 @@ interface IngestResponse {
1825
1904
  /** Extra response headers (e.g. `Retry-After` on a 429). */
1826
1905
  headers?: Record<string, string>;
1827
1906
  }
1828
- type IngestHandler = (body: unknown) => IngestResponse;
1907
+ type IngestHandler = (body: unknown) => Promise<IngestResponse>;
1829
1908
  interface IngestHandlerOptions extends IngestOptions {
1830
1909
  /** Per-org ingest rate limiter (4.7 backpressure). Over-quota → 429 + Retry-After. */
1831
1910
  quota?: RateLimiter;
@@ -2186,6 +2265,12 @@ interface CreateMcpServerOptions {
2186
2265
  * behaviour exactly. The org is normalized to a tenant.
2187
2266
  */
2188
2267
  org?: string;
2268
+ /**
2269
+ * Org-wide summary source (4.3). When set (server-mode with a graph backend), the
2270
+ * org `get_summary` reads from here instead of `db.getOrgSummary` — so a graph-DB
2271
+ * collector serves its own merged aggregate. Defaults to the SQLite central store.
2272
+ */
2273
+ orgSummary?: (org: string) => OrgSummary | Promise<OrgSummary>;
2189
2274
  /**
2190
2275
  * The authenticated principal (4.5 RBAC). When set, mutating tools (`run_discovery`)
2191
2276
  * are gated by role: a `viewer` is refused with a forbidden error. Read tools are
@@ -2229,7 +2314,11 @@ interface HttpOptions {
2229
2314
  * caps the body, parses JSON, and returns the hook's `{ status, body }`. When unset,
2230
2315
  * `/ingest` 404s exactly like any other path — the collector stays dark by default.
2231
2316
  */
2232
- onIngest?: (body: unknown) => {
2317
+ onIngest?: (body: unknown) => Promise<{
2318
+ status: number;
2319
+ body: unknown;
2320
+ headers?: Record<string, string>;
2321
+ }> | {
2233
2322
  status: number;
2234
2323
  body: unknown;
2235
2324
  headers?: Record<string, string>;
@@ -2361,6 +2450,8 @@ interface ApiServerOptions extends BindGuardOptions {
2361
2450
  tenant?: TenantOptions;
2362
2451
  /** Expose `/graphql` (default true). */
2363
2452
  graphql?: boolean;
2453
+ /** Serve the web dashboard at `/` and `/app` (default true; 4.1). */
2454
+ dashboard?: boolean;
2364
2455
  /**
2365
2456
  * RBAC (4.5). When `store` holds credentials, the API runs in RBAC mode: a request's
2366
2457
  * bearer token must resolve to a {@link Principal} (else 401), the principal's role must
@@ -2524,6 +2615,8 @@ interface StartApiOptions {
2524
2615
  token?: string;
2525
2616
  /** Expose `/graphql` (default true). */
2526
2617
  graphql?: boolean;
2618
+ /** Serve the web dashboard at `/` and `/app` (default true; 4.1). */
2619
+ dashboard?: boolean;
2527
2620
  /** Default tenant served when a request names none. */
2528
2621
  tenant?: string;
2529
2622
  /** Reject unauthenticated requests even on loopback (RBAC `required` mode). */
@@ -2539,6 +2632,27 @@ declare function parseApiArgs(argv: string[]): ParsedApiArgs;
2539
2632
  /** Open the catalog, build the read backend, and start the API server. Returns the server. */
2540
2633
  declare function startApi(opts?: StartApiOptions): Promise<Server>;
2541
2634
 
2635
+ /**
2636
+ * The self-hostable web dashboard (4.1).
2637
+ *
2638
+ * `dashboardHtml()` returns a SINGLE self-contained HTML document — inlined CSS +
2639
+ * vanilla JS, **no CDN, no React/Vite/D3, zero new dependency** — that fetches the
2640
+ * live `/v1/*` API of the same server (WS 4.2) and renders a searchable node list, an
2641
+ * interactive Canvas topology with drill-down, and a detail panel. It is served by the
2642
+ * API server at `GET /` and `GET /app`; the page shell is public, but the DATA it
2643
+ * fetches is gated by the existing `/v1` bearer/RBAC (WS 4.2/4.5) — the page carries a
2644
+ * bearer token (entered once, kept in sessionStorage) and an optional tenant header.
2645
+ *
2646
+ * Because the dashboard renders from the API response shapes (the `schemas.ts`
2647
+ * projections), it inherits the consent-safe projection (no raw node metadata) for free.
2648
+ */
2649
+ interface DashboardOptions {
2650
+ /** Server version, shown in the header. */
2651
+ version?: string;
2652
+ }
2653
+ /** Build the complete dashboard HTML document. */
2654
+ declare function dashboardHtml(opts?: DashboardOptions): string;
2655
+
2542
2656
  declare const installedAppsScanner: Scanner;
2543
2657
 
2544
2658
  /** Well-known listening ports → node type + service name. */
@@ -4186,4 +4300,4 @@ declare function logInfo(message: string, context?: Record<string, unknown>): vo
4186
4300
  declare function logWarn(message: string, context?: Record<string, unknown>): void;
4187
4301
  declare function logError(message: string, context?: Record<string, unknown>): void;
4188
4302
 
4189
- export { ACTIONS, ANOMALY_KINDS, ANOMALY_SEVERITIES, type Action, ActionSchema, type AgentProvider, type AgentRunContext, type AgentTool, type Anomaly, type AnomalyConfig, type AnomalyKind, type AnomalySeverity, type AnomalyThresholds, type AnonViolation, type AnonymizationLevel, type ApiServerOptions, type AskUserFn, type AuthConfig, AuthConfigSchema, AuthorizationError, type BackstageEntity, type BackstageMapOptions, type BindGuardOptions, CLIENTS, CONFIDENCE, COST_PERIODS, type CartographyConfig, CartographyDB, type CartographyMapData, type CentralDbConfig, CentralDbConfigSchema, type ClassifiedItem, type ClassifyInput, type ClassifyResult, type ClientSpec, type Cluster, ClusterSchema, type ComplianceInput, type ComplianceReport, ComplianceReportSchema, type ComplianceRule, ComplianceRuleSchema, type Condition, ConditionSchema, ConfigError, type ConfigFile, ConfigFileSchema, type ConfigFormat, type Connection, ConnectionSchema, type Contributor, type ControlResult, ControlResultSchema, type CostEntry, CostEntrySchema, type CostPeriod, type CostRecord, type CostSource, type CreateMcpServerOptions, type CredentialConfig, CredentialConfigSchema, type CredentialDb, type CredentialRecord, type CredentialStore, type CronFields, CsvCostSource, type CsvCostSourceOptions, DEFAULT_ANOMALY_THRESHOLDS, DEFAULT_FAST_MODEL, DEFAULT_INGEST_QUOTA, DEFAULT_LEAD_MODEL, DEFAULT_SERVER_NAME, DEFAULT_TENANT, DOMAIN_COLORS, DOMAIN_PALETTE, DRIFT_FIELDS, type DataAsset, DataAssetSchema, type DependencyQuery, type DiscoveryEdge, type DiscoveryEvent, type DiscoveryFn, type DiscoveryNode, type DriftAlert, type DriftAlertItem, type DriftConfig, DriftConfigSchema, type DriftField, type DriftItemKind, type DriftRunRow, type DriftSink, type DriftSinkConfig, EDGE_RELATIONSHIPS, type EdgeRelationship, type EdgeRow, EdgeSchema, type EmbeddingProvider, type EnrichResult, type EntryOptions, type EstablishedConn, type EvidenceKind, type FetchLike, type FragmentKind, type GraphSummary, type HealthResult, type HttpOptions, INGEST_SCHEMA_VERSION, type IngestEnvelope, IngestEnvelopeSchema, type IngestHandler, type IngestHandlerOptions, type IngestOptions, type IngestResponse, type IngestResult, type InstallPlan, InvalidTenantError, type JiraIssue, type JiraOptions, JiraSink, type JiraSinkOptions, LOOPBACK_HOSTS, type LocalDiscoveryOptions, type LocalDiscoveryResult, type LogEntry, type LogLevel, MCP_BIN, type MatchStrategy, NODE_TYPES, NODE_TYPE_GROUPS, type NlIntent, type NlQueryOptions, type NlQueryResult, type NlRelation, type NodeAttribution, type NodeChange, type NodeIdentity, type NodeQuery, type NodeRow, NodeSchema, type NodeType, type NodesResult, NotFoundError, OUTPUT_FORMATS, type OrgKeyOptions, type OrgSummary, type OsKind, type OutputFormat, PACKAGE_NAME, PAGERDUTY_ENQUEUE_URL, PENDING_STATUSES, PERSONAL, PORT_MAP, PRIVATE_IP, PUSH_SCHEMA_VERSION, type PagerDutyEvent, PagerDutySink, type PagerDutySinkOptions, type ParsedApiArgs, type PendingShareRow, type PendingStatus, type PlanOptions, type PolicyResult, type PostJsonOptions, type Principal, PrincipalSchema, type ProviderFactory, type ProviderName, ProviderRegistry, type PushItem, type PushOptions, type PushResult, type QueryBackend, type QuotaConfig, type QuotaDecision, RELATION_TO_DIRECTION, ROLES, RateLimiter, type ResolveContext, type ResolveOptions, type Role, RoleSchema, type RuleCheck, RuleCheckSchema, type RuleScope, type Ruleset, RulesetSchema, type RunDriftOptions, SCAN_ARG_PATTERNS, SCHEMA_VERSION, SDL, SECURITY_METADATA_KEYS, SEVERITIES, SEVERITY_WEIGHT, SHARING_LEVELS, type ScanArgKind, type ScanContext, type ScanHintParams, type ScanResult, type Scanner, type ScannerPlugin, type ScannerPluginApi, ScannerRegistry, ScannerShape, type ScheduleConfig, ScheduleConfigSchema, type ScheduledRunResult, type Scope, type SearchFn, type SemanticSearchOptions, type ServerEntry, type SessionRow, type Severity, type SharePreview, type SharePreviewEntry, type SharingLevel, SharingLevelSchema, type SharingPolicy, type ShellKind, type SlackMessage, SlackSink, SqliteCredentialStore, SqliteQueryBackend, SqliteStoreBackend, type StartApiOptions, StdoutSink, type StoreBackend, type SyncClassifyOptions, type SyncClassifyResult, TENANT_HEADER, type TenantContext, TenantMismatchError, type TenantOptions, type ToolResult, type TopologyDelta, type TopologyDiff, type TopologyInput, type TraversalResult, VectorStore, WebhookSink, type WebhookSinkOptions, applyInstall, applySharingLevel, assertReadOnly, assertSafeBind, assertSafeScanArg, assertSameTenant, assignColors, authorize, bearerToken, bookmarksScanner, buildCartographyToolHandlers, buildMapData, buildOpenApiDocument, buildReport, buildSinks, can, centralDbFromEnv, checkBearer, checkPrerequisites, checkReadOnly, clampText, classify, classifyDrift, cleanupTempFiles, cloudAwsScanner, cloudAzureScanner, cloudGcpScanner, codeAddMcpCommand, computeCentroid, computeClusterBounds, computeIdentity, connectionsScanner, contentHash, createBashTool, createCartographyTools, createClaudeProvider, createDefaultRegistry, createHashEmbedder, createIngestHandler, createLocalEmbedder, createMcpServer, createOllamaProvider, createOpenAIProvider, createScanRunner, createSemanticSearch, createSqliteQueryBackend, currentOs, cursorDeeplink, databasesScanner, deepMerge, defaultAllowedHosts, defaultConfig, defaultContext, defaultProviderRegistry, defaultRegistry, defaultServerEntry, definePlugin, deriveSessionName, detectAnomalies, detectOrphans, detectShadowIt, diffTopology, edgesToConnections, enrichCosts, entitiesToYaml, evaluateCheck, evaluateRule, evidenceLine, executeGraphql, executeNlQuery, exportAll, exportBackstageYAML, exportComplianceReport, exportCostCSV, exportCostSummary, exportDiscoveryApp, exportJGF, exportJSON, extractListeningPorts, filterBySeverity, findAnonViolations, formatComplianceText, formatJira, formatPagerDuty, formatSlack, generateDependencyMermaid, generateDiffMermaid, generateTopologyMermaid, getClient, getRuleset, globalId, groupByDomain, handleGraphqlGet, hashToken, hexCorners, hexDistance, hexNeighbors, hexRing, hexSpiral, hexToPixel, hmacKey, hostname, ingestEnvelope, installedAppsScanner, isLoopbackHost, isPersonalHost, isReadOnlyCommand, isRemembered, isSecureWebhookUrl, k8sScanner, keyMetaOf, layoutClusters, listClients, listRulesets, loadConfig, loadOrgKey, loadPlugins, loadRuleset, localDiscoveryFn, log, logDebug, logError, logInfo, logWarn, machineId, maxSeverity, mcpServerObject, newAnomalies, nextRun, nodesToAssets, normalizeId, normalizeTenant, orgKeyPath, osUser, parseApiArgs, parseComposeDeps, parseConfig, parseConnectionString, parseCostCsv, parseCron, parseEstablished, parseNginxUpstreams, parseNlQuery, parseScanHint, pixelToHex, planInstall, portsScanner, postJson, previewShare, pseudonymize, pseudonymizeFragment, pseudonymizeString, pushDeltas, readConfigFile, redactConnectionString, redactSecrets, redactValue, renderDiff, resolveEffectiveLevel, resolveNlQuery, resolvePrincipal, resolveSharingLevel, resolveTenant, revalidateAnonymized, reversalKey, reversePseudonym, rotateOrgKey, runApi, runDiscovery, runDrift, runHttp, runLocalDiscovery, runOnce, runStdio, runSyncClassify, safeEnv, safeJson, safetyHook, sanitizeUntrusted, sanitizeValue, scopeReads, scoreTopology, securityRelevantChange, serializeConfig, serviceConfigScanner, setVerbose, shadeVariant, shapeToJsonSchema, shareHash, splitSegments, stableStringify, startApi, stripSensitive, timingSafeEqual, toBackstageEntities, validateScanner, vscodeDeeplink, zodToJsonSchema };
4303
+ export { ACTIONS, ANOMALY_KINDS, ANOMALY_SEVERITIES, type Action, ActionSchema, type AgentProvider, type AgentRunContext, type AgentTool, type Anomaly, type AnomalyConfig, type AnomalyKind, type AnomalySeverity, type AnomalyThresholds, type AnonViolation, type AnonymizationLevel, type ApiServerOptions, type AskUserFn, type AuthConfig, AuthConfigSchema, AuthorizationError, type Awaitable, type BackstageEntity, type BackstageMapOptions, type BindGuardOptions, type BoltDriver, type BoltRecord, type BoltResult, type BoltSession, CLIENTS, CONFIDENCE, COST_PERIODS, type CartographyConfig, CartographyDB, type CartographyMapData, type CentralDbConfig, CentralDbConfigSchema, type ClassifiedItem, type ClassifyInput, type ClassifyResult, type ClientSpec, type Cluster, ClusterSchema, type ComplianceInput, type ComplianceReport, ComplianceReportSchema, type ComplianceRule, ComplianceRuleSchema, type Condition, ConditionSchema, ConfigError, type ConfigFile, ConfigFileSchema, type ConfigFormat, type Connection, ConnectionSchema, type Contributor, type ControlResult, ControlResultSchema, type CostEntry, CostEntrySchema, type CostPeriod, type CostRecord, type CostSource, type CreateMcpServerOptions, type CredentialConfig, CredentialConfigSchema, type CredentialDb, type CredentialRecord, type CredentialStore, type CronFields, CsvCostSource, type CsvCostSourceOptions, DEFAULT_ANOMALY_THRESHOLDS, DEFAULT_FAST_MODEL, DEFAULT_INGEST_QUOTA, DEFAULT_LEAD_MODEL, DEFAULT_SERVER_NAME, DEFAULT_TENANT, DOMAIN_COLORS, DOMAIN_PALETTE, DRIFT_FIELDS, type DashboardOptions, type DataAsset, DataAssetSchema, type DependencyQuery, type DiscoveryEdge, type DiscoveryEvent, type DiscoveryFn, type DiscoveryNode, type DriftAlert, type DriftAlertItem, type DriftConfig, DriftConfigSchema, type DriftField, type DriftItemKind, type DriftRunRow, type DriftSink, type DriftSinkConfig, EDGE_RELATIONSHIPS, type EdgeRelationship, type EdgeRow, EdgeSchema, type EmbeddingProvider, type EnrichResult, type EntryOptions, type EstablishedConn, type EvidenceKind, type FetchLike, type FragmentKind, GraphStoreBackend, type GraphSummary, type HealthResult, type HttpOptions, INGEST_SCHEMA_VERSION, type IngestEnvelope, IngestEnvelopeSchema, type IngestHandler, type IngestHandlerOptions, type IngestOptions, type IngestResponse, type IngestResult, type InstallPlan, InvalidTenantError, type JiraIssue, type JiraOptions, JiraSink, type JiraSinkOptions, LOOPBACK_HOSTS, type LocalDiscoveryOptions, type LocalDiscoveryResult, type LogEntry, type LogLevel, MCP_BIN, type MatchStrategy, NODE_TYPES, NODE_TYPE_GROUPS, type NlIntent, type NlQueryOptions, type NlQueryResult, type NlRelation, type NodeAttribution, type NodeChange, type NodeIdentity, type NodeQuery, type NodeRow, NodeSchema, type NodeType, type NodesResult, NotFoundError, OUTPUT_FORMATS, type OrgKeyOptions, type OrgSummary, type OsKind, type OutputFormat, PACKAGE_NAME, PAGERDUTY_ENQUEUE_URL, PENDING_STATUSES, PERSONAL, PORT_MAP, PRIVATE_IP, PUSH_SCHEMA_VERSION, type PagerDutyEvent, PagerDutySink, type PagerDutySinkOptions, type ParsedApiArgs, type PendingShareRow, type PendingStatus, type PlanOptions, type PolicyResult, type PostJsonOptions, type Principal, PrincipalSchema, type ProviderFactory, type ProviderName, ProviderRegistry, type PushItem, type PushOptions, type PushResult, type QueryBackend, type QuotaConfig, type QuotaDecision, RELATION_TO_DIRECTION, ROLES, RateLimiter, type ResolveContext, type ResolveOptions, type Role, RoleSchema, type RuleCheck, RuleCheckSchema, type RuleScope, type Ruleset, RulesetSchema, type RunDriftOptions, SCAN_ARG_PATTERNS, SCHEMA_VERSION, SDL, SECURITY_METADATA_KEYS, SEVERITIES, SEVERITY_WEIGHT, SHARING_LEVELS, type ScanArgKind, type ScanContext, type ScanHintParams, type ScanResult, type Scanner, type ScannerPlugin, type ScannerPluginApi, ScannerRegistry, ScannerShape, type ScheduleConfig, ScheduleConfigSchema, type ScheduledRunResult, type Scope, type SearchFn, type SemanticSearchOptions, type ServerEntry, type SessionRow, type Severity, type SharePreview, type SharePreviewEntry, type SharingLevel, SharingLevelSchema, type SharingPolicy, type ShellKind, type SlackMessage, SlackSink, SqliteCredentialStore, SqliteQueryBackend, SqliteStoreBackend, type StartApiOptions, StdoutSink, type StoreBackend, type StoreBackendOptions, type SyncClassifyOptions, type SyncClassifyResult, TENANT_HEADER, type TenantContext, TenantMismatchError, type TenantOptions, type ToolResult, type TopologyDelta, type TopologyDiff, type TopologyInput, type TraversalResult, VectorStore, WebhookSink, type WebhookSinkOptions, applyInstall, applySharingLevel, assertReadOnly, assertSafeBind, assertSafeScanArg, assertSameTenant, assignColors, authorize, bearerToken, bookmarksScanner, buildCartographyToolHandlers, buildMapData, buildOpenApiDocument, buildReport, buildSinks, can, centralDbFromEnv, checkBearer, checkPrerequisites, checkReadOnly, clampText, classify, classifyDrift, cleanupTempFiles, cloudAwsScanner, cloudAzureScanner, cloudGcpScanner, codeAddMcpCommand, computeCentroid, computeClusterBounds, computeIdentity, connectionsScanner, contentHash, createBashTool, createCartographyTools, createClaudeProvider, createDefaultRegistry, createHashEmbedder, createIngestHandler, createLocalEmbedder, createMcpServer, createOllamaProvider, createOpenAIProvider, createScanRunner, createSemanticSearch, createSqliteQueryBackend, currentOs, cursorDeeplink, dashboardHtml, databasesScanner, deepMerge, defaultAllowedHosts, defaultConfig, defaultContext, defaultProviderRegistry, defaultRegistry, defaultServerEntry, definePlugin, deriveSessionName, detectAnomalies, detectOrphans, detectShadowIt, diffTopology, edgesToConnections, enrichCosts, entitiesToYaml, evaluateCheck, evaluateRule, evidenceLine, executeGraphql, executeNlQuery, exportAll, exportBackstageYAML, exportComplianceReport, exportCostCSV, exportCostSummary, exportDiscoveryApp, exportJGF, exportJSON, extractListeningPorts, filterBySeverity, findAnonViolations, formatComplianceText, formatJira, formatPagerDuty, formatSlack, generateDependencyMermaid, generateDiffMermaid, generateTopologyMermaid, getClient, getRuleset, globalId, groupByDomain, handleGraphqlGet, hashToken, hexCorners, hexDistance, hexNeighbors, hexRing, hexSpiral, hexToPixel, hmacKey, hostname, ingestEnvelope, installedAppsScanner, isLoopbackHost, isPersonalHost, isReadOnlyCommand, isRemembered, isSecureWebhookUrl, k8sScanner, keyMetaOf, layoutClusters, listClients, listRulesets, loadConfig, loadOrgKey, loadPlugins, loadRuleset, localDiscoveryFn, log, logDebug, logError, logInfo, logWarn, machineId, maxSeverity, mcpServerObject, newAnomalies, nextRun, nodesToAssets, normalizeId, normalizeTenant, openStoreBackend, orgKeyPath, osUser, parseApiArgs, parseComposeDeps, parseConfig, parseConnectionString, parseCostCsv, parseCron, parseEstablished, parseNginxUpstreams, parseNlQuery, parseScanHint, pixelToHex, planInstall, portsScanner, postJson, previewShare, pseudonymize, pseudonymizeFragment, pseudonymizeString, pushDeltas, readConfigFile, redactConnectionString, redactSecrets, redactValue, renderDiff, resolveEffectiveLevel, resolveNlQuery, resolvePrincipal, resolveSharingLevel, resolveTenant, revalidateAnonymized, reversalKey, reversePseudonym, rotateOrgKey, runApi, runDiscovery, runDrift, runHttp, runLocalDiscovery, runOnce, runStdio, runSyncClassify, safeEnv, safeJson, safetyHook, sanitizeUntrusted, sanitizeValue, scopeReads, scoreTopology, securityRelevantChange, serializeConfig, serviceConfigScanner, setVerbose, shadeVariant, shapeToJsonSchema, shareHash, splitSegments, stableStringify, startApi, stripSensitive, timingSafeEqual, toBackstageEntities, validateScanner, vscodeDeeplink, zodToJsonSchema };
package/dist/index.d.ts CHANGED
@@ -1469,9 +1469,18 @@ interface NodeIdentity {
1469
1469
  /** Secondary merge key — content hash that catches `id` drift between machines. */
1470
1470
  contentHash: string;
1471
1471
  }
1472
+ /**
1473
+ * A value that may be produced synchronously (SQLite, `better-sqlite3`) or
1474
+ * asynchronously (a graph DB over the async Bolt driver, 4.3). The ingest core
1475
+ * `await`s every backend call, so a sync implementation incurs no overhead and the
1476
+ * SQLite path stays byte-for-byte synchronous.
1477
+ */
1478
+ type Awaitable<T> = T | Promise<T>;
1472
1479
  /**
1473
1480
  * A provider-agnostic central store. All operations are scoped to a single tenant
1474
- * (`org`); there is no cross-tenant read or write path.
1481
+ * (`org`); there is no cross-tenant read or write path. Methods are **async-capable**
1482
+ * (4.3): `SqliteStoreBackend` returns synchronously, `GraphStoreBackend` returns
1483
+ * Promises; consumers await either.
1475
1484
  */
1476
1485
  interface StoreBackend {
1477
1486
  /**
@@ -1480,15 +1489,15 @@ interface StoreBackend {
1480
1489
  * `'created'` when this is the first observation of the logical node, `'merged'`
1481
1490
  * when it collapsed onto an existing one.
1482
1491
  */
1483
- upsertNode(org: string, node: DiscoveryNode, identity: NodeIdentity, contributor: Contributor): 'created' | 'merged';
1492
+ upsertNode(org: string, node: DiscoveryNode, identity: NodeIdentity, contributor: Contributor): Awaitable<'created' | 'merged'>;
1484
1493
  /** Insert an edge under `org` (idempotent on the logical `(source, target, relationship)` key). */
1485
- insertEdge(org: string, edge: DiscoveryEdge): void;
1494
+ insertEdge(org: string, edge: DiscoveryEdge): Awaitable<void>;
1486
1495
  /** Org-wide aggregate summary (merged counts across all contributors). */
1487
- getSummary(org: string): OrgSummary;
1496
+ getSummary(org: string): Awaitable<OrgSummary>;
1488
1497
  /** Contributors for a merged logical node (test/audit helper). */
1489
- getContributors(globalId: string): Contributor[];
1498
+ getContributors(globalId: string): Awaitable<Contributor[]>;
1490
1499
  /** Release any underlying resources. */
1491
- close(): void;
1500
+ close(): Awaitable<void>;
1492
1501
  }
1493
1502
 
1494
1503
  /**
@@ -1519,6 +1528,76 @@ declare class SqliteStoreBackend implements StoreBackend {
1519
1528
  close(): void;
1520
1529
  }
1521
1530
 
1531
+ /**
1532
+ * `GraphStoreBackend` (4.3) — an opt-in central-store backend over a Bolt-speaking
1533
+ * graph database (Neo4j / Memgraph). Implements the async-capable {@link StoreBackend}
1534
+ * seam so the central collector's merge + org-summary path can scale to 10K+ nodes on a
1535
+ * native graph engine, while SQLite stays the zero-config default.
1536
+ *
1537
+ * `neo4j-driver` is an OPTIONAL dependency, dynamically imported by `openStoreBackend`
1538
+ * (`src/store/index.ts`); this module depends only on a minimal structural Bolt interface,
1539
+ * so it compiles and the package degrades gracefully when the driver is absent. The driver
1540
+ * is injected (constructor), which also lets tests drive it with a mock — no live DB in CI.
1541
+ *
1542
+ * Merge identity mirrors SQLite: a logical node is keyed by `(org, globalId)`; the
1543
+ * `contentHash` is stored + indexed for the id-drift secondary collapse (best-effort here,
1544
+ * tracked as a follow-up). Contributors are `(org, globalId, machineId)` with max-confidence.
1545
+ */
1546
+
1547
+ interface BoltRecord {
1548
+ get(key: string): unknown;
1549
+ }
1550
+ interface BoltResult {
1551
+ records: BoltRecord[];
1552
+ }
1553
+ interface BoltSession {
1554
+ run(cypher: string, params?: Record<string, unknown>): Promise<BoltResult>;
1555
+ close(): Promise<void>;
1556
+ }
1557
+ interface BoltDriver {
1558
+ session(): BoltSession;
1559
+ close(): Promise<void>;
1560
+ verifyConnectivity?(): Promise<unknown>;
1561
+ }
1562
+ declare class GraphStoreBackend implements StoreBackend {
1563
+ private readonly driver;
1564
+ constructor(driver: BoltDriver);
1565
+ private run;
1566
+ upsertNode(org: string, node: DiscoveryNode, identity: NodeIdentity, contributor: Contributor): Promise<'created' | 'merged'>;
1567
+ insertEdge(org: string, edge: DiscoveryEdge): Promise<void>;
1568
+ getSummary(org: string): Promise<OrgSummary>;
1569
+ getContributors(globalId: string): Promise<Contributor[]>;
1570
+ close(): Promise<void>;
1571
+ }
1572
+
1573
+ /**
1574
+ * Central-store backend factory (4.3).
1575
+ *
1576
+ * `openStoreBackend` returns a {@link GraphStoreBackend} only when a graph backend is
1577
+ * explicitly requested AND the optional `neo4j-driver` is installed AND the server is
1578
+ * reachable; otherwise it logs a structured WARN and returns the always-available
1579
+ * {@link SqliteStoreBackend}. A missing driver or an unreachable graph server therefore
1580
+ * NEVER breaks the collector — it degrades to SQLite (the "optional deps degrade" locked
1581
+ * constraint). SQLite stays the zero-config default.
1582
+ */
1583
+
1584
+ interface StoreBackendOptions {
1585
+ /** `'graph'` opts into the graph DB; anything else (default) uses SQLite. */
1586
+ backend?: 'sqlite' | 'graph';
1587
+ /** Bolt URL, e.g. `bolt://graph.internal:7687` or `neo4j+s://…`. */
1588
+ graphUrl?: string;
1589
+ graphUser?: string;
1590
+ graphPassword?: string;
1591
+ /** Injected driver factory (tests). Defaults to dynamically importing `neo4j-driver`. */
1592
+ driverFactory?: (url: string, user: string, password: string) => Promise<BoltDriver>;
1593
+ }
1594
+ /**
1595
+ * Resolve the central store backend. Graph when requested + available; else SQLite.
1596
+ * The returned backend is owned by the caller (call `close()` on shutdown for the graph
1597
+ * backend; the SQLite backend's `close()` is a no-op — the `CartographyDB` is shared).
1598
+ */
1599
+ declare function openStoreBackend(db: CartographyDB, opts?: StoreBackendOptions): Promise<StoreBackend>;
1600
+
1522
1601
  /**
1523
1602
  * `QueryBackend` — the **read-only** query seam for the API server (4.2).
1524
1603
  *
@@ -1770,7 +1849,7 @@ interface IngestOptions {
1770
1849
  * The caller (HTTP handler) wraps this in try/catch; the store's per-node upsert is
1771
1850
  * itself transactional, so a single bad node never half-writes a row.
1772
1851
  */
1773
- declare function ingestEnvelope(store: StoreBackend, envelope: IngestEnvelope, opts?: IngestOptions): IngestResult;
1852
+ declare function ingestEnvelope(store: StoreBackend, envelope: IngestEnvelope, opts?: IngestOptions): Promise<IngestResult>;
1774
1853
 
1775
1854
  /**
1776
1855
  * Ingest backpressure for the central collector (4.7).
@@ -1825,7 +1904,7 @@ interface IngestResponse {
1825
1904
  /** Extra response headers (e.g. `Retry-After` on a 429). */
1826
1905
  headers?: Record<string, string>;
1827
1906
  }
1828
- type IngestHandler = (body: unknown) => IngestResponse;
1907
+ type IngestHandler = (body: unknown) => Promise<IngestResponse>;
1829
1908
  interface IngestHandlerOptions extends IngestOptions {
1830
1909
  /** Per-org ingest rate limiter (4.7 backpressure). Over-quota → 429 + Retry-After. */
1831
1910
  quota?: RateLimiter;
@@ -2186,6 +2265,12 @@ interface CreateMcpServerOptions {
2186
2265
  * behaviour exactly. The org is normalized to a tenant.
2187
2266
  */
2188
2267
  org?: string;
2268
+ /**
2269
+ * Org-wide summary source (4.3). When set (server-mode with a graph backend), the
2270
+ * org `get_summary` reads from here instead of `db.getOrgSummary` — so a graph-DB
2271
+ * collector serves its own merged aggregate. Defaults to the SQLite central store.
2272
+ */
2273
+ orgSummary?: (org: string) => OrgSummary | Promise<OrgSummary>;
2189
2274
  /**
2190
2275
  * The authenticated principal (4.5 RBAC). When set, mutating tools (`run_discovery`)
2191
2276
  * are gated by role: a `viewer` is refused with a forbidden error. Read tools are
@@ -2229,7 +2314,11 @@ interface HttpOptions {
2229
2314
  * caps the body, parses JSON, and returns the hook's `{ status, body }`. When unset,
2230
2315
  * `/ingest` 404s exactly like any other path — the collector stays dark by default.
2231
2316
  */
2232
- onIngest?: (body: unknown) => {
2317
+ onIngest?: (body: unknown) => Promise<{
2318
+ status: number;
2319
+ body: unknown;
2320
+ headers?: Record<string, string>;
2321
+ }> | {
2233
2322
  status: number;
2234
2323
  body: unknown;
2235
2324
  headers?: Record<string, string>;
@@ -2361,6 +2450,8 @@ interface ApiServerOptions extends BindGuardOptions {
2361
2450
  tenant?: TenantOptions;
2362
2451
  /** Expose `/graphql` (default true). */
2363
2452
  graphql?: boolean;
2453
+ /** Serve the web dashboard at `/` and `/app` (default true; 4.1). */
2454
+ dashboard?: boolean;
2364
2455
  /**
2365
2456
  * RBAC (4.5). When `store` holds credentials, the API runs in RBAC mode: a request's
2366
2457
  * bearer token must resolve to a {@link Principal} (else 401), the principal's role must
@@ -2524,6 +2615,8 @@ interface StartApiOptions {
2524
2615
  token?: string;
2525
2616
  /** Expose `/graphql` (default true). */
2526
2617
  graphql?: boolean;
2618
+ /** Serve the web dashboard at `/` and `/app` (default true; 4.1). */
2619
+ dashboard?: boolean;
2527
2620
  /** Default tenant served when a request names none. */
2528
2621
  tenant?: string;
2529
2622
  /** Reject unauthenticated requests even on loopback (RBAC `required` mode). */
@@ -2539,6 +2632,27 @@ declare function parseApiArgs(argv: string[]): ParsedApiArgs;
2539
2632
  /** Open the catalog, build the read backend, and start the API server. Returns the server. */
2540
2633
  declare function startApi(opts?: StartApiOptions): Promise<Server>;
2541
2634
 
2635
+ /**
2636
+ * The self-hostable web dashboard (4.1).
2637
+ *
2638
+ * `dashboardHtml()` returns a SINGLE self-contained HTML document — inlined CSS +
2639
+ * vanilla JS, **no CDN, no React/Vite/D3, zero new dependency** — that fetches the
2640
+ * live `/v1/*` API of the same server (WS 4.2) and renders a searchable node list, an
2641
+ * interactive Canvas topology with drill-down, and a detail panel. It is served by the
2642
+ * API server at `GET /` and `GET /app`; the page shell is public, but the DATA it
2643
+ * fetches is gated by the existing `/v1` bearer/RBAC (WS 4.2/4.5) — the page carries a
2644
+ * bearer token (entered once, kept in sessionStorage) and an optional tenant header.
2645
+ *
2646
+ * Because the dashboard renders from the API response shapes (the `schemas.ts`
2647
+ * projections), it inherits the consent-safe projection (no raw node metadata) for free.
2648
+ */
2649
+ interface DashboardOptions {
2650
+ /** Server version, shown in the header. */
2651
+ version?: string;
2652
+ }
2653
+ /** Build the complete dashboard HTML document. */
2654
+ declare function dashboardHtml(opts?: DashboardOptions): string;
2655
+
2542
2656
  declare const installedAppsScanner: Scanner;
2543
2657
 
2544
2658
  /** Well-known listening ports → node type + service name. */
@@ -4186,4 +4300,4 @@ declare function logInfo(message: string, context?: Record<string, unknown>): vo
4186
4300
  declare function logWarn(message: string, context?: Record<string, unknown>): void;
4187
4301
  declare function logError(message: string, context?: Record<string, unknown>): void;
4188
4302
 
4189
- export { ACTIONS, ANOMALY_KINDS, ANOMALY_SEVERITIES, type Action, ActionSchema, type AgentProvider, type AgentRunContext, type AgentTool, type Anomaly, type AnomalyConfig, type AnomalyKind, type AnomalySeverity, type AnomalyThresholds, type AnonViolation, type AnonymizationLevel, type ApiServerOptions, type AskUserFn, type AuthConfig, AuthConfigSchema, AuthorizationError, type BackstageEntity, type BackstageMapOptions, type BindGuardOptions, CLIENTS, CONFIDENCE, COST_PERIODS, type CartographyConfig, CartographyDB, type CartographyMapData, type CentralDbConfig, CentralDbConfigSchema, type ClassifiedItem, type ClassifyInput, type ClassifyResult, type ClientSpec, type Cluster, ClusterSchema, type ComplianceInput, type ComplianceReport, ComplianceReportSchema, type ComplianceRule, ComplianceRuleSchema, type Condition, ConditionSchema, ConfigError, type ConfigFile, ConfigFileSchema, type ConfigFormat, type Connection, ConnectionSchema, type Contributor, type ControlResult, ControlResultSchema, type CostEntry, CostEntrySchema, type CostPeriod, type CostRecord, type CostSource, type CreateMcpServerOptions, type CredentialConfig, CredentialConfigSchema, type CredentialDb, type CredentialRecord, type CredentialStore, type CronFields, CsvCostSource, type CsvCostSourceOptions, DEFAULT_ANOMALY_THRESHOLDS, DEFAULT_FAST_MODEL, DEFAULT_INGEST_QUOTA, DEFAULT_LEAD_MODEL, DEFAULT_SERVER_NAME, DEFAULT_TENANT, DOMAIN_COLORS, DOMAIN_PALETTE, DRIFT_FIELDS, type DataAsset, DataAssetSchema, type DependencyQuery, type DiscoveryEdge, type DiscoveryEvent, type DiscoveryFn, type DiscoveryNode, type DriftAlert, type DriftAlertItem, type DriftConfig, DriftConfigSchema, type DriftField, type DriftItemKind, type DriftRunRow, type DriftSink, type DriftSinkConfig, EDGE_RELATIONSHIPS, type EdgeRelationship, type EdgeRow, EdgeSchema, type EmbeddingProvider, type EnrichResult, type EntryOptions, type EstablishedConn, type EvidenceKind, type FetchLike, type FragmentKind, type GraphSummary, type HealthResult, type HttpOptions, INGEST_SCHEMA_VERSION, type IngestEnvelope, IngestEnvelopeSchema, type IngestHandler, type IngestHandlerOptions, type IngestOptions, type IngestResponse, type IngestResult, type InstallPlan, InvalidTenantError, type JiraIssue, type JiraOptions, JiraSink, type JiraSinkOptions, LOOPBACK_HOSTS, type LocalDiscoveryOptions, type LocalDiscoveryResult, type LogEntry, type LogLevel, MCP_BIN, type MatchStrategy, NODE_TYPES, NODE_TYPE_GROUPS, type NlIntent, type NlQueryOptions, type NlQueryResult, type NlRelation, type NodeAttribution, type NodeChange, type NodeIdentity, type NodeQuery, type NodeRow, NodeSchema, type NodeType, type NodesResult, NotFoundError, OUTPUT_FORMATS, type OrgKeyOptions, type OrgSummary, type OsKind, type OutputFormat, PACKAGE_NAME, PAGERDUTY_ENQUEUE_URL, PENDING_STATUSES, PERSONAL, PORT_MAP, PRIVATE_IP, PUSH_SCHEMA_VERSION, type PagerDutyEvent, PagerDutySink, type PagerDutySinkOptions, type ParsedApiArgs, type PendingShareRow, type PendingStatus, type PlanOptions, type PolicyResult, type PostJsonOptions, type Principal, PrincipalSchema, type ProviderFactory, type ProviderName, ProviderRegistry, type PushItem, type PushOptions, type PushResult, type QueryBackend, type QuotaConfig, type QuotaDecision, RELATION_TO_DIRECTION, ROLES, RateLimiter, type ResolveContext, type ResolveOptions, type Role, RoleSchema, type RuleCheck, RuleCheckSchema, type RuleScope, type Ruleset, RulesetSchema, type RunDriftOptions, SCAN_ARG_PATTERNS, SCHEMA_VERSION, SDL, SECURITY_METADATA_KEYS, SEVERITIES, SEVERITY_WEIGHT, SHARING_LEVELS, type ScanArgKind, type ScanContext, type ScanHintParams, type ScanResult, type Scanner, type ScannerPlugin, type ScannerPluginApi, ScannerRegistry, ScannerShape, type ScheduleConfig, ScheduleConfigSchema, type ScheduledRunResult, type Scope, type SearchFn, type SemanticSearchOptions, type ServerEntry, type SessionRow, type Severity, type SharePreview, type SharePreviewEntry, type SharingLevel, SharingLevelSchema, type SharingPolicy, type ShellKind, type SlackMessage, SlackSink, SqliteCredentialStore, SqliteQueryBackend, SqliteStoreBackend, type StartApiOptions, StdoutSink, type StoreBackend, type SyncClassifyOptions, type SyncClassifyResult, TENANT_HEADER, type TenantContext, TenantMismatchError, type TenantOptions, type ToolResult, type TopologyDelta, type TopologyDiff, type TopologyInput, type TraversalResult, VectorStore, WebhookSink, type WebhookSinkOptions, applyInstall, applySharingLevel, assertReadOnly, assertSafeBind, assertSafeScanArg, assertSameTenant, assignColors, authorize, bearerToken, bookmarksScanner, buildCartographyToolHandlers, buildMapData, buildOpenApiDocument, buildReport, buildSinks, can, centralDbFromEnv, checkBearer, checkPrerequisites, checkReadOnly, clampText, classify, classifyDrift, cleanupTempFiles, cloudAwsScanner, cloudAzureScanner, cloudGcpScanner, codeAddMcpCommand, computeCentroid, computeClusterBounds, computeIdentity, connectionsScanner, contentHash, createBashTool, createCartographyTools, createClaudeProvider, createDefaultRegistry, createHashEmbedder, createIngestHandler, createLocalEmbedder, createMcpServer, createOllamaProvider, createOpenAIProvider, createScanRunner, createSemanticSearch, createSqliteQueryBackend, currentOs, cursorDeeplink, databasesScanner, deepMerge, defaultAllowedHosts, defaultConfig, defaultContext, defaultProviderRegistry, defaultRegistry, defaultServerEntry, definePlugin, deriveSessionName, detectAnomalies, detectOrphans, detectShadowIt, diffTopology, edgesToConnections, enrichCosts, entitiesToYaml, evaluateCheck, evaluateRule, evidenceLine, executeGraphql, executeNlQuery, exportAll, exportBackstageYAML, exportComplianceReport, exportCostCSV, exportCostSummary, exportDiscoveryApp, exportJGF, exportJSON, extractListeningPorts, filterBySeverity, findAnonViolations, formatComplianceText, formatJira, formatPagerDuty, formatSlack, generateDependencyMermaid, generateDiffMermaid, generateTopologyMermaid, getClient, getRuleset, globalId, groupByDomain, handleGraphqlGet, hashToken, hexCorners, hexDistance, hexNeighbors, hexRing, hexSpiral, hexToPixel, hmacKey, hostname, ingestEnvelope, installedAppsScanner, isLoopbackHost, isPersonalHost, isReadOnlyCommand, isRemembered, isSecureWebhookUrl, k8sScanner, keyMetaOf, layoutClusters, listClients, listRulesets, loadConfig, loadOrgKey, loadPlugins, loadRuleset, localDiscoveryFn, log, logDebug, logError, logInfo, logWarn, machineId, maxSeverity, mcpServerObject, newAnomalies, nextRun, nodesToAssets, normalizeId, normalizeTenant, orgKeyPath, osUser, parseApiArgs, parseComposeDeps, parseConfig, parseConnectionString, parseCostCsv, parseCron, parseEstablished, parseNginxUpstreams, parseNlQuery, parseScanHint, pixelToHex, planInstall, portsScanner, postJson, previewShare, pseudonymize, pseudonymizeFragment, pseudonymizeString, pushDeltas, readConfigFile, redactConnectionString, redactSecrets, redactValue, renderDiff, resolveEffectiveLevel, resolveNlQuery, resolvePrincipal, resolveSharingLevel, resolveTenant, revalidateAnonymized, reversalKey, reversePseudonym, rotateOrgKey, runApi, runDiscovery, runDrift, runHttp, runLocalDiscovery, runOnce, runStdio, runSyncClassify, safeEnv, safeJson, safetyHook, sanitizeUntrusted, sanitizeValue, scopeReads, scoreTopology, securityRelevantChange, serializeConfig, serviceConfigScanner, setVerbose, shadeVariant, shapeToJsonSchema, shareHash, splitSegments, stableStringify, startApi, stripSensitive, timingSafeEqual, toBackstageEntities, validateScanner, vscodeDeeplink, zodToJsonSchema };
4303
+ export { ACTIONS, ANOMALY_KINDS, ANOMALY_SEVERITIES, type Action, ActionSchema, type AgentProvider, type AgentRunContext, type AgentTool, type Anomaly, type AnomalyConfig, type AnomalyKind, type AnomalySeverity, type AnomalyThresholds, type AnonViolation, type AnonymizationLevel, type ApiServerOptions, type AskUserFn, type AuthConfig, AuthConfigSchema, AuthorizationError, type Awaitable, type BackstageEntity, type BackstageMapOptions, type BindGuardOptions, type BoltDriver, type BoltRecord, type BoltResult, type BoltSession, CLIENTS, CONFIDENCE, COST_PERIODS, type CartographyConfig, CartographyDB, type CartographyMapData, type CentralDbConfig, CentralDbConfigSchema, type ClassifiedItem, type ClassifyInput, type ClassifyResult, type ClientSpec, type Cluster, ClusterSchema, type ComplianceInput, type ComplianceReport, ComplianceReportSchema, type ComplianceRule, ComplianceRuleSchema, type Condition, ConditionSchema, ConfigError, type ConfigFile, ConfigFileSchema, type ConfigFormat, type Connection, ConnectionSchema, type Contributor, type ControlResult, ControlResultSchema, type CostEntry, CostEntrySchema, type CostPeriod, type CostRecord, type CostSource, type CreateMcpServerOptions, type CredentialConfig, CredentialConfigSchema, type CredentialDb, type CredentialRecord, type CredentialStore, type CronFields, CsvCostSource, type CsvCostSourceOptions, DEFAULT_ANOMALY_THRESHOLDS, DEFAULT_FAST_MODEL, DEFAULT_INGEST_QUOTA, DEFAULT_LEAD_MODEL, DEFAULT_SERVER_NAME, DEFAULT_TENANT, DOMAIN_COLORS, DOMAIN_PALETTE, DRIFT_FIELDS, type DashboardOptions, type DataAsset, DataAssetSchema, type DependencyQuery, type DiscoveryEdge, type DiscoveryEvent, type DiscoveryFn, type DiscoveryNode, type DriftAlert, type DriftAlertItem, type DriftConfig, DriftConfigSchema, type DriftField, type DriftItemKind, type DriftRunRow, type DriftSink, type DriftSinkConfig, EDGE_RELATIONSHIPS, type EdgeRelationship, type EdgeRow, EdgeSchema, type EmbeddingProvider, type EnrichResult, type EntryOptions, type EstablishedConn, type EvidenceKind, type FetchLike, type FragmentKind, GraphStoreBackend, type GraphSummary, type HealthResult, type HttpOptions, INGEST_SCHEMA_VERSION, type IngestEnvelope, IngestEnvelopeSchema, type IngestHandler, type IngestHandlerOptions, type IngestOptions, type IngestResponse, type IngestResult, type InstallPlan, InvalidTenantError, type JiraIssue, type JiraOptions, JiraSink, type JiraSinkOptions, LOOPBACK_HOSTS, type LocalDiscoveryOptions, type LocalDiscoveryResult, type LogEntry, type LogLevel, MCP_BIN, type MatchStrategy, NODE_TYPES, NODE_TYPE_GROUPS, type NlIntent, type NlQueryOptions, type NlQueryResult, type NlRelation, type NodeAttribution, type NodeChange, type NodeIdentity, type NodeQuery, type NodeRow, NodeSchema, type NodeType, type NodesResult, NotFoundError, OUTPUT_FORMATS, type OrgKeyOptions, type OrgSummary, type OsKind, type OutputFormat, PACKAGE_NAME, PAGERDUTY_ENQUEUE_URL, PENDING_STATUSES, PERSONAL, PORT_MAP, PRIVATE_IP, PUSH_SCHEMA_VERSION, type PagerDutyEvent, PagerDutySink, type PagerDutySinkOptions, type ParsedApiArgs, type PendingShareRow, type PendingStatus, type PlanOptions, type PolicyResult, type PostJsonOptions, type Principal, PrincipalSchema, type ProviderFactory, type ProviderName, ProviderRegistry, type PushItem, type PushOptions, type PushResult, type QueryBackend, type QuotaConfig, type QuotaDecision, RELATION_TO_DIRECTION, ROLES, RateLimiter, type ResolveContext, type ResolveOptions, type Role, RoleSchema, type RuleCheck, RuleCheckSchema, type RuleScope, type Ruleset, RulesetSchema, type RunDriftOptions, SCAN_ARG_PATTERNS, SCHEMA_VERSION, SDL, SECURITY_METADATA_KEYS, SEVERITIES, SEVERITY_WEIGHT, SHARING_LEVELS, type ScanArgKind, type ScanContext, type ScanHintParams, type ScanResult, type Scanner, type ScannerPlugin, type ScannerPluginApi, ScannerRegistry, ScannerShape, type ScheduleConfig, ScheduleConfigSchema, type ScheduledRunResult, type Scope, type SearchFn, type SemanticSearchOptions, type ServerEntry, type SessionRow, type Severity, type SharePreview, type SharePreviewEntry, type SharingLevel, SharingLevelSchema, type SharingPolicy, type ShellKind, type SlackMessage, SlackSink, SqliteCredentialStore, SqliteQueryBackend, SqliteStoreBackend, type StartApiOptions, StdoutSink, type StoreBackend, type StoreBackendOptions, type SyncClassifyOptions, type SyncClassifyResult, TENANT_HEADER, type TenantContext, TenantMismatchError, type TenantOptions, type ToolResult, type TopologyDelta, type TopologyDiff, type TopologyInput, type TraversalResult, VectorStore, WebhookSink, type WebhookSinkOptions, applyInstall, applySharingLevel, assertReadOnly, assertSafeBind, assertSafeScanArg, assertSameTenant, assignColors, authorize, bearerToken, bookmarksScanner, buildCartographyToolHandlers, buildMapData, buildOpenApiDocument, buildReport, buildSinks, can, centralDbFromEnv, checkBearer, checkPrerequisites, checkReadOnly, clampText, classify, classifyDrift, cleanupTempFiles, cloudAwsScanner, cloudAzureScanner, cloudGcpScanner, codeAddMcpCommand, computeCentroid, computeClusterBounds, computeIdentity, connectionsScanner, contentHash, createBashTool, createCartographyTools, createClaudeProvider, createDefaultRegistry, createHashEmbedder, createIngestHandler, createLocalEmbedder, createMcpServer, createOllamaProvider, createOpenAIProvider, createScanRunner, createSemanticSearch, createSqliteQueryBackend, currentOs, cursorDeeplink, dashboardHtml, databasesScanner, deepMerge, defaultAllowedHosts, defaultConfig, defaultContext, defaultProviderRegistry, defaultRegistry, defaultServerEntry, definePlugin, deriveSessionName, detectAnomalies, detectOrphans, detectShadowIt, diffTopology, edgesToConnections, enrichCosts, entitiesToYaml, evaluateCheck, evaluateRule, evidenceLine, executeGraphql, executeNlQuery, exportAll, exportBackstageYAML, exportComplianceReport, exportCostCSV, exportCostSummary, exportDiscoveryApp, exportJGF, exportJSON, extractListeningPorts, filterBySeverity, findAnonViolations, formatComplianceText, formatJira, formatPagerDuty, formatSlack, generateDependencyMermaid, generateDiffMermaid, generateTopologyMermaid, getClient, getRuleset, globalId, groupByDomain, handleGraphqlGet, hashToken, hexCorners, hexDistance, hexNeighbors, hexRing, hexSpiral, hexToPixel, hmacKey, hostname, ingestEnvelope, installedAppsScanner, isLoopbackHost, isPersonalHost, isReadOnlyCommand, isRemembered, isSecureWebhookUrl, k8sScanner, keyMetaOf, layoutClusters, listClients, listRulesets, loadConfig, loadOrgKey, loadPlugins, loadRuleset, localDiscoveryFn, log, logDebug, logError, logInfo, logWarn, machineId, maxSeverity, mcpServerObject, newAnomalies, nextRun, nodesToAssets, normalizeId, normalizeTenant, openStoreBackend, orgKeyPath, osUser, parseApiArgs, parseComposeDeps, parseConfig, parseConnectionString, parseCostCsv, parseCron, parseEstablished, parseNginxUpstreams, parseNlQuery, parseScanHint, pixelToHex, planInstall, portsScanner, postJson, previewShare, pseudonymize, pseudonymizeFragment, pseudonymizeString, pushDeltas, readConfigFile, redactConnectionString, redactSecrets, redactValue, renderDiff, resolveEffectiveLevel, resolveNlQuery, resolvePrincipal, resolveSharingLevel, resolveTenant, revalidateAnonymized, reversalKey, reversePseudonym, rotateOrgKey, runApi, runDiscovery, runDrift, runHttp, runLocalDiscovery, runOnce, runStdio, runSyncClassify, safeEnv, safeJson, safetyHook, sanitizeUntrusted, sanitizeValue, scopeReads, scoreTopology, securityRelevantChange, serializeConfig, serviceConfigScanner, setVerbose, shadeVariant, shapeToJsonSchema, shareHash, splitSegments, stableStringify, startApi, stripSensitive, timingSafeEqual, toBackstageEntities, validateScanner, vscodeDeeplink, zodToJsonSchema };