@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/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import Database from 'better-sqlite3';
2
2
  import { z } from 'zod';
3
3
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
4
- import http from 'node:http';
4
+ import http, { IncomingMessage, Server } from 'node:http';
5
5
  import { McpServerConfig, HookCallback } from '@anthropic-ai/claude-agent-sdk';
6
6
 
7
7
  /**
@@ -1378,6 +1378,92 @@ declare class SqliteStoreBackend implements StoreBackend {
1378
1378
  close(): void;
1379
1379
  }
1380
1380
 
1381
+ /**
1382
+ * `QueryBackend` — the **read-only** query seam for the API server (4.2).
1383
+ *
1384
+ * This is deliberately distinct from {@link StoreBackend} (`src/store/backend.ts`),
1385
+ * which is the central-collector **write/ingest** seam. The two seams have opposite
1386
+ * shapes: ingest merges incoming deltas; this one answers topology questions. A
1387
+ * non-SQLite backend (4.3) implements both. Keeping them separate means the API
1388
+ * never gains a write path and the ingest core never gains a query path.
1389
+ *
1390
+ * Every method takes a {@link TenantContext}. Session resolution is tenant-scoped, so
1391
+ * a caller bound to tenant A can never read tenant B's topology — even by naming a
1392
+ * session id that belongs to B (it resolves to "not found", never B's data). This
1393
+ * mirrors the MCP server's `resolveSession` tenant guard exactly.
1394
+ */
1395
+
1396
+ /** The tenant (org-scope) a request is bound to. `'local'` (DEFAULT_TENANT) until a real org is supplied. */
1397
+ interface TenantContext {
1398
+ tenant: string;
1399
+ }
1400
+ interface NodeQuery {
1401
+ search?: string;
1402
+ types?: readonly string[];
1403
+ limit?: number;
1404
+ offset?: number;
1405
+ }
1406
+ interface DependencyQuery {
1407
+ direction?: 'downstream' | 'upstream' | 'both';
1408
+ maxDepth?: number;
1409
+ }
1410
+ interface NodesResult {
1411
+ nodes: NodeRow[];
1412
+ total: number;
1413
+ limit: number;
1414
+ offset: number;
1415
+ }
1416
+ interface HealthResult {
1417
+ store: 'sqlite';
1418
+ sessions: number;
1419
+ }
1420
+ /** A requested resource (session / diff endpoint) does not exist for this tenant → REST 404. */
1421
+ declare class NotFoundError extends Error {
1422
+ constructor(message: string);
1423
+ }
1424
+ /** Narrow, read-only view of the topology store. Tenant is required on every call. */
1425
+ interface QueryBackend {
1426
+ /** Aggregate, low-token index of the resolved session. Throws {@link NotFoundError} if no session resolves. */
1427
+ summary(ctx: TenantContext, sessionId?: string): GraphSummary;
1428
+ /** Page/search nodes of the resolved session. Throws {@link NotFoundError} if no session resolves. */
1429
+ nodes(ctx: TenantContext, q: NodeQuery, sessionId?: string): NodesResult;
1430
+ /** One node by id (or `undefined` if absent). Throws {@link NotFoundError} if no session resolves. */
1431
+ node(ctx: TenantContext, id: string, sessionId?: string): NodeRow | undefined;
1432
+ /** Dependency traversal from a node. Throws {@link NotFoundError} if no session resolves. */
1433
+ dependencies(ctx: TenantContext, id: string, q: DependencyQuery, sessionId?: string): TraversalResult;
1434
+ /** Compare two sessions (both must belong to the tenant). Throws {@link NotFoundError} on an unknown/foreign id. */
1435
+ diff(ctx: TenantContext, base: string, current: string): TopologyDiff;
1436
+ /** All sessions for this tenant, newest first. */
1437
+ sessions(ctx: TenantContext): SessionRow[];
1438
+ /** Liveness/coverage probe (never resolves a session). */
1439
+ health(ctx: TenantContext): HealthResult;
1440
+ }
1441
+ /**
1442
+ * `QueryBackend` over the local `CartographyDB`. A thin read adapter: the schema,
1443
+ * migrations, and SQL all live in `db.ts`; this only resolves the tenant-scoped
1444
+ * session and forwards. Constructing it adds no state and no schema.
1445
+ */
1446
+ declare class SqliteQueryBackend implements QueryBackend {
1447
+ private readonly db;
1448
+ private readonly defaultSession;
1449
+ constructor(db: CartographyDB, defaultSession?: string | 'latest');
1450
+ /**
1451
+ * Resolve the session id for a request, scoped to `ctx.tenant`. An explicit id must
1452
+ * belong to the tenant or it resolves to undefined (cross-tenant isolation); else the
1453
+ * newest `discover` session for the tenant. Mirrors `resolveSession` in the MCP server.
1454
+ */
1455
+ private resolveSession;
1456
+ summary(ctx: TenantContext, sessionId?: string): GraphSummary;
1457
+ nodes(ctx: TenantContext, q: NodeQuery, sessionId?: string): NodesResult;
1458
+ node(ctx: TenantContext, id: string, sessionId?: string): NodeRow | undefined;
1459
+ dependencies(ctx: TenantContext, id: string, q: DependencyQuery, sessionId?: string): TraversalResult;
1460
+ diff(ctx: TenantContext, base: string, current: string): TopologyDiff;
1461
+ sessions(ctx: TenantContext): SessionRow[];
1462
+ health(ctx: TenantContext): HealthResult;
1463
+ }
1464
+ /** Construct the default SQLite-backed read query backend. */
1465
+ declare function createSqliteQueryBackend(db: CartographyDB, defaultSession?: string | 'latest'): QueryBackend;
1466
+
1381
1467
  /**
1382
1468
  * Global-identity merge core for the central collector (2.12) — pure, no I/O.
1383
1469
  *
@@ -1960,8 +2046,203 @@ interface HttpOptions {
1960
2046
  body: unknown;
1961
2047
  };
1962
2048
  }
2049
+ /**
2050
+ * Start a Streamable HTTP server. A fresh MCP server instance is created per
2051
+ * session via `factory`, so multiple clients can connect concurrently.
2052
+ */
1963
2053
  declare function runHttp(factory: () => McpServer, opts?: HttpOptions): Promise<http.Server>;
1964
2054
 
2055
+ /**
2056
+ * Shared HTTP auth + bind-hardening primitives.
2057
+ *
2058
+ * Extracted verbatim from `src/mcp/transports.ts` so the MCP transport, the REST/
2059
+ * GraphQL API server (4.2), and any future HTTP surface consume **one** provably-
2060
+ * identical implementation of the CVE-2025-66414 guards, the constant-time bearer
2061
+ * compare, and the default Host allowlist. The allowlist — not any one caller — is
2062
+ * the security boundary; centralizing it here keeps every networked surface on the
2063
+ * same posture and makes the behavior unit-testable in isolation.
2064
+ */
2065
+ /** Loopback hosts are safe to bind without an explicit Host allowlist. */
2066
+ declare const LOOPBACK_HOSTS: ReadonlySet<string>;
2067
+ /** True when `host` is a loopback address (safe to bind without an allowlist/token). */
2068
+ declare function isLoopbackHost(host: string): boolean;
2069
+ /** Constant-time comparison to avoid leaking the token via timing. */
2070
+ declare function timingSafeEqual(a: string, b: string): boolean;
2071
+ /**
2072
+ * Extract the bearer token from an Authorization header, if present. Parsed with
2073
+ * linear string ops (no regex) so a user-controlled header can never trigger
2074
+ * polynomial backtracking (ReDoS) — `^Bearer\s+(.+)$` is ambiguous between `\s+`
2075
+ * and `.+` on a long run of spaces.
2076
+ */
2077
+ declare function bearerToken(header: string | undefined): string | undefined;
2078
+ /**
2079
+ * Returns true if the request is authenticated: a request is authenticated when no
2080
+ * token is configured (open loopback dev mode) OR the `Authorization: Bearer` value
2081
+ * is present and constant-time-equal to the configured token. The caller maps a
2082
+ * `false` to a 401.
2083
+ */
2084
+ declare function checkBearer(authorizationHeader: string | undefined, token: string | undefined): boolean;
2085
+ interface BindGuardOptions {
2086
+ host: string;
2087
+ port: number;
2088
+ allowedHosts?: string[];
2089
+ token?: string;
2090
+ }
2091
+ /**
2092
+ * Enforce the CVE-2025-66414 + mandatory-token guards before binding. Throws the
2093
+ * exact errors `runHttp` raised inline, so existing transport behavior is preserved:
2094
+ * a non-loopback bind requires BOTH an explicit `allowedHosts` allowlist AND a token.
2095
+ */
2096
+ declare function assertSafeBind(opts: BindGuardOptions): void;
2097
+ /** Default Host allowlist: the bound host plus the localhost variants, all `:port`. */
2098
+ declare function defaultAllowedHosts(host: string, port: number): string[];
2099
+
2100
+ /**
2101
+ * Per-request tenant resolution for the API server (4.2).
2102
+ *
2103
+ * The tenant (org-scope) is a first-class request property: it is resolved once,
2104
+ * up front, and threaded into every {@link QueryBackend} call so isolation is
2105
+ * structural, not bolted on. A request may name a tenant via the
2106
+ * `X-Cartograph-Tenant` header or a `?tenant=` query param; absent either, it
2107
+ * defaults to the server's configured default (normally `DEFAULT_TENANT='local'`).
2108
+ *
2109
+ * Validation reuses `normalizeTenant` (the single charset-allowlisted validator,
2110
+ * `^[\w.@:+-]{1,128}$`) — but here we **reject** a malformed value with a typed
2111
+ * error (→ HTTP 400) rather than silently falling back, so a client never believes
2112
+ * it is scoped to one tenant while being served another. The raw input is never
2113
+ * reflected into a response.
2114
+ */
2115
+
2116
+ declare const TENANT_HEADER = "x-cartograph-tenant";
2117
+ /** The supplied tenant value did not pass the charset/length allowlist → HTTP 400. */
2118
+ declare class InvalidTenantError extends Error {
2119
+ constructor();
2120
+ }
2121
+ interface TenantOptions {
2122
+ /** Default tenant when the request names none. Defaults to `DEFAULT_TENANT` ('local'). */
2123
+ defaultTenant?: string;
2124
+ /** Header to read the tenant from. Defaults to `x-cartograph-tenant`. */
2125
+ header?: string;
2126
+ }
2127
+ /**
2128
+ * Resolve the tenant from the request header or `?tenant=` query param, else the
2129
+ * configured default. A supplied-but-malformed value throws {@link InvalidTenantError}
2130
+ * (the caller maps it to a 400) instead of silently defaulting.
2131
+ */
2132
+ declare function resolveTenant(req: IncomingMessage, url: URL, opts?: TenantOptions): TenantContext;
2133
+
2134
+ /**
2135
+ * The read-only API HTTP server (4.2), on Node's built-in `http` (zero new runtime dep).
2136
+ *
2137
+ * Request flow mirrors the MCP transport (`src/mcp/transports.ts`): the CVE-2025-66414
2138
+ * bind guards run at startup (shared `assertSafeBind`); per request the Host header is
2139
+ * checked against the allowlist (DNS-rebinding), then the bearer token is verified
2140
+ * **before any backend access**, then the tenant is resolved, then the route dispatches.
2141
+ * REST handlers are pure (`rest.ts`); GraphQL is wired when enabled (`graphql.ts`). One
2142
+ * structured stderr access line per request — never the token, never query values.
2143
+ */
2144
+
2145
+ interface ApiServerOptions extends BindGuardOptions {
2146
+ backend: QueryBackend;
2147
+ version: string;
2148
+ /** CORS Origin allowlist. Default: none (same-origin only). */
2149
+ allowedOrigins?: string[];
2150
+ /** Tenant resolution options (header name / default tenant). */
2151
+ tenant?: TenantOptions;
2152
+ /** Expose `/graphql` (default true). */
2153
+ graphql?: boolean;
2154
+ /** Access logger (stderr). */
2155
+ log?: (msg: string) => void;
2156
+ }
2157
+ /** Start the read-only API server. Resolves once it is listening. */
2158
+ declare function runApi(opts: ApiServerOptions): Promise<http.Server>;
2159
+
2160
+ /**
2161
+ * OpenAPI 3.1 document generation for the read-only API (4.2).
2162
+ *
2163
+ * The document is **generated from the zod response schemas** (`schemas.ts`), never
2164
+ * hand-maintained, so it cannot drift from what the server actually returns. A
2165
+ * committed copy lives at `docs/api/openapi.json`; a test asserts the built document
2166
+ * deep-equals it (drift guard) and validates under `ajv`.
2167
+ *
2168
+ * `zodToJsonSchema` is a small, fail-closed projection covering exactly the zod
2169
+ * constructs `schemas.ts` uses (object/array/string/number/integer/boolean/enum/
2170
+ * literal/record/optional). An unsupported construct throws, so a future schema
2171
+ * change can't be silently mis-projected. (The provider tool layer has its own flat
2172
+ * converter in `src/providers/zod-schema.ts`; this one is recursive and serves the
2173
+ * API's nested response shapes.)
2174
+ */
2175
+
2176
+ /** Project a zod schema to a JSON-Schema (2020-12) fragment. Fail-closed on the unknown. */
2177
+ declare function zodToJsonSchema(schema: z.ZodTypeAny): Record<string, unknown>;
2178
+ interface OpenApiOptions {
2179
+ version: string;
2180
+ }
2181
+ /** Build the OpenAPI 3.1 document from the zod schemas + the static route table. Deterministic. */
2182
+ declare function buildOpenApiDocument(opts: OpenApiOptions): Record<string, unknown>;
2183
+
2184
+ /**
2185
+ * Hand-rolled, zero-dependency GraphQL layer for the read-only API (4.2).
2186
+ *
2187
+ * Mirrors REST over `POST /graphql` (and serves the SDL on `GET /graphql`) without
2188
+ * adding a `graphql`/`apollo` runtime dependency. Resolvers delegate to the same
2189
+ * {@link QueryBackend} and reuse the REST projections (`rest.ts`), so REST and GraphQL
2190
+ * return byte-identical shapes and the consent posture stays in one place. It is
2191
+ * strictly **read-only**: there is no `Mutation` type and a `mutation` document is
2192
+ * rejected. A small tokenizer/parser handles the query subset the schema needs
2193
+ * (fields, arguments, variables, nested selections) and a minimal `__schema`
2194
+ * introspection response keeps GraphiQL-style clients working.
2195
+ */
2196
+
2197
+ interface GraphqlDeps {
2198
+ backend: QueryBackend;
2199
+ }
2200
+ interface GraphqlResult {
2201
+ data?: unknown;
2202
+ errors?: Array<{
2203
+ message: string;
2204
+ }>;
2205
+ }
2206
+ declare const SDL = "# Cartograph read-only GraphQL API (4.2). Mirrors the REST surface.\nschema { query: Query }\n\ntype Query {\n summary(session: String): Summary\n nodes(search: String, types: [String!], limit: Int, offset: Int, session: String): NodeConnection\n node(id: String!, session: String): Node\n dependencies(id: String!, direction: Direction, maxDepth: Int, session: String): Dependencies\n diff(base: String!, current: String!): Diff\n sessions: [Session!]!\n}\n\nenum Direction { downstream upstream both }\n\ntype Totals { nodes: Int! edges: Int! }\ntype Count { key: String! value: Int! }\ntype TopConnected { id: String! name: String! type: String! degree: Int! }\ntype Anomaly { nodeId: String! kind: String! severity: String! reason: String! }\ntype Cost { amount: Float! currency: String! period: String! source: String }\ntype CostRollup { key: String! currency: String! period: String! total: Float! nodes: Int! }\ntype CostCoverage { withCost: Int! total: Int! }\n\ntype Node {\n id: String! type: String! name: String! confidence: Float!\n domain: String subDomain: String qualityScore: Float owner: String cost: Cost tags: [String!]!\n}\ntype DependencyNode {\n id: String! type: String! name: String! confidence: Float!\n domain: String subDomain: String qualityScore: Float owner: String cost: Cost tags: [String!]! depth: Int!\n}\ntype Edge { sourceId: String! targetId: String! relationship: String! confidence: Float! evidence: String! }\n\ntype Summary {\n sessionId: String!\n totals: Totals!\n topConnected: [TopConnected!]!\n anomalies: [Anomaly!]!\n contributors: Int!\n costByDomain: [CostRollup!]!\n costByOwner: [CostRollup!]!\n costCoverage: CostCoverage!\n}\n\ntype NodeConnection { nodes: [Node!]! total: Int! limit: Int! offset: Int! }\ntype Dependencies { root: Node direction: Direction! maxDepth: Int! nodes: [DependencyNode!]! edges: [Edge!]! }\n\ntype SessionEndpoint { sessionId: String! startedAt: String! nodeCount: Int! edgeCount: Int! }\ntype DiffSummary { nodesAdded: Int! nodesRemoved: Int! nodesChanged: Int! edgesAdded: Int! edgesRemoved: Int! }\ntype NodeChange { id: String! changedFields: [String!]! confidenceDelta: Float! }\ntype DiffNodes { added: [Node!]! removed: [Node!]! changed: [NodeChange!]! unchanged: Int! }\ntype DiffEdges { added: [Edge!]! removed: [Edge!]! unchanged: Int! }\ntype DiffAnomalies { added: [Anomaly!]! }\ntype Diff {\n base: SessionEndpoint! current: SessionEndpoint! summary: DiffSummary!\n nodes: DiffNodes! edges: DiffEdges! anomalies: DiffAnomalies!\n}\n\ntype Session { id: String! mode: String! startedAt: String! completedAt: String name: String tenant: String! lastScannedAt: String }\n";
2207
+ /** Execute a `{ query, variables, operationName }` request. Read-only; rejects mutations. */
2208
+ declare function executeGraphql(ctx: TenantContext, body: unknown, deps: GraphqlDeps): Promise<GraphqlResult>;
2209
+ /** `GET /graphql` → the SDL as text/plain. */
2210
+ declare function handleGraphqlGet(): {
2211
+ status: number;
2212
+ body: string;
2213
+ };
2214
+
2215
+ /**
2216
+ * Shared entry logic for the read-only API server (4.2), used by both the dedicated
2217
+ * `cartography-api` binary and the `api` CLI sub-command. Mirrors `src/mcp/start.ts`:
2218
+ * opens the catalog, builds the SQLite query backend, resolves the bearer token from
2219
+ * `--token`/`CARTOGRAPHY_HTTP_TOKEN`, and starts `runApi`. All logging is to stderr;
2220
+ * the token value is never logged (only whether one is set).
2221
+ */
2222
+
2223
+ interface StartApiOptions {
2224
+ dbPath?: string;
2225
+ session?: string | 'latest';
2226
+ port?: number;
2227
+ host?: string;
2228
+ allowedHosts?: string[];
2229
+ allowedOrigins?: string[];
2230
+ token?: string;
2231
+ /** Expose `/graphql` (default true). */
2232
+ graphql?: boolean;
2233
+ /** Default tenant served when a request names none. */
2234
+ tenant?: string;
2235
+ log?: (msg: string) => void;
2236
+ }
2237
+ interface ParsedApiArgs extends StartApiOptions {
2238
+ /** `--help`/`-h` was passed; the caller should print usage and exit 0. */
2239
+ help?: boolean;
2240
+ }
2241
+ /** Parse `cartography-api` argv into StartApiOptions (unit-testable, no side effects). */
2242
+ declare function parseApiArgs(argv: string[]): ParsedApiArgs;
2243
+ /** Open the catalog, build the read backend, and start the API server. Returns the server. */
2244
+ declare function startApi(opts?: StartApiOptions): Promise<Server>;
2245
+
1965
2246
  declare const installedAppsScanner: Scanner;
1966
2247
 
1967
2248
  /** Well-known listening ports → node type + service name. */
@@ -3429,4 +3710,4 @@ declare function logInfo(message: string, context?: Record<string, unknown>): vo
3429
3710
  declare function logWarn(message: string, context?: Record<string, unknown>): void;
3430
3711
  declare function logError(message: string, context?: Record<string, unknown>): void;
3431
3712
 
3432
- export { ANOMALY_KINDS, ANOMALY_SEVERITIES, type AgentProvider, type AgentRunContext, type AgentTool, type Anomaly, type AnomalyConfig, type AnomalyKind, type AnomalySeverity, type AnomalyThresholds, type AnonViolation, type AnonymizationLevel, type AskUserFn, 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 CronFields, CsvCostSource, type CsvCostSourceOptions, DEFAULT_ANOMALY_THRESHOLDS, DEFAULT_FAST_MODEL, DEFAULT_LEAD_MODEL, DEFAULT_SERVER_NAME, DEFAULT_TENANT, DOMAIN_COLORS, DOMAIN_PALETTE, DRIFT_FIELDS, type DataAsset, DataAssetSchema, 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 FragmentKind, type GraphSummary, type HttpOptions, INGEST_SCHEMA_VERSION, type IngestEnvelope, IngestEnvelopeSchema, type IngestHandler, type IngestOptions, type IngestResponse, type IngestResult, type InstallPlan, 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 NodeRow, NodeSchema, type NodeType, OUTPUT_FORMATS, type OrgKeyOptions, type OrgSummary, type OsKind, type OutputFormat, PACKAGE_NAME, PENDING_STATUSES, PERSONAL, PORT_MAP, PRIVATE_IP, PUSH_SCHEMA_VERSION, type PendingShareRow, type PendingStatus, type PlanOptions, type PolicyResult, type ProviderFactory, type ProviderName, ProviderRegistry, type PushItem, type PushOptions, type PushResult, RELATION_TO_DIRECTION, type ResolveContext, type RuleCheck, RuleCheckSchema, type RuleScope, type Ruleset, RulesetSchema, type RunDriftOptions, SCAN_ARG_PATTERNS, 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, SqliteStoreBackend, StdoutSink, type StoreBackend, type SyncClassifyOptions, type SyncClassifyResult, type ToolResult, type TopologyDelta, type TopologyDiff, type TopologyInput, type TraversalResult, VectorStore, WebhookSink, type WebhookSinkOptions, applyInstall, applySharingLevel, assertReadOnly, assertSafeScanArg, assignColors, bookmarksScanner, buildCartographyToolHandlers, buildMapData, buildReport, buildSinks, centralDbFromEnv, 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, currentOs, cursorDeeplink, databasesScanner, deepMerge, defaultConfig, defaultContext, defaultProviderRegistry, defaultRegistry, defaultServerEntry, definePlugin, deriveSessionName, detectAnomalies, detectOrphans, detectShadowIt, diffTopology, edgesToConnections, enrichCosts, evaluateCheck, evaluateRule, evidenceLine, executeNlQuery, exportAll, exportBackstageYAML, exportComplianceReport, exportCostCSV, exportCostSummary, exportDiscoveryApp, exportJGF, exportJSON, extractListeningPorts, filterBySeverity, findAnonViolations, formatComplianceText, generateDependencyMermaid, generateDiffMermaid, generateTopologyMermaid, getClient, getRuleset, globalId, groupByDomain, hexCorners, hexDistance, hexNeighbors, hexRing, hexSpiral, hexToPixel, hmacKey, hostname, ingestEnvelope, installedAppsScanner, isPersonalHost, isReadOnlyCommand, isRemembered, 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, parseComposeDeps, parseConfig, parseConnectionString, parseCostCsv, parseCron, parseEstablished, parseNginxUpstreams, parseNlQuery, parseScanHint, pixelToHex, planInstall, portsScanner, previewShare, pseudonymize, pseudonymizeFragment, pseudonymizeString, pushDeltas, readConfigFile, redactConnectionString, redactSecrets, redactValue, renderDiff, resolveEffectiveLevel, resolveNlQuery, resolveSharingLevel, revalidateAnonymized, reversalKey, reversePseudonym, rotateOrgKey, runDiscovery, runDrift, runHttp, runLocalDiscovery, runOnce, runStdio, runSyncClassify, safeEnv, safeJson, safetyHook, sanitizeUntrusted, sanitizeValue, scoreTopology, securityRelevantChange, serializeConfig, serviceConfigScanner, setVerbose, shadeVariant, shapeToJsonSchema, shareHash, splitSegments, stableStringify, stripSensitive, validateScanner, vscodeDeeplink };
3713
+ export { ANOMALY_KINDS, ANOMALY_SEVERITIES, 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 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 CronFields, CsvCostSource, type CsvCostSourceOptions, DEFAULT_ANOMALY_THRESHOLDS, DEFAULT_FAST_MODEL, 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 FragmentKind, type GraphSummary, type HealthResult, type HttpOptions, INGEST_SCHEMA_VERSION, type IngestEnvelope, IngestEnvelopeSchema, type IngestHandler, type IngestOptions, type IngestResponse, type IngestResult, type InstallPlan, InvalidTenantError, 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, PENDING_STATUSES, PERSONAL, PORT_MAP, PRIVATE_IP, PUSH_SCHEMA_VERSION, type ParsedApiArgs, type PendingShareRow, type PendingStatus, type PlanOptions, type PolicyResult, type ProviderFactory, type ProviderName, ProviderRegistry, type PushItem, type PushOptions, type PushResult, type QueryBackend, RELATION_TO_DIRECTION, type ResolveContext, type RuleCheck, RuleCheckSchema, type RuleScope, type Ruleset, RulesetSchema, type RunDriftOptions, SCAN_ARG_PATTERNS, 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, SqliteQueryBackend, SqliteStoreBackend, type StartApiOptions, StdoutSink, type StoreBackend, type SyncClassifyOptions, type SyncClassifyResult, TENANT_HEADER, type TenantContext, type TenantOptions, type ToolResult, type TopologyDelta, type TopologyDiff, type TopologyInput, type TraversalResult, VectorStore, WebhookSink, type WebhookSinkOptions, applyInstall, applySharingLevel, assertReadOnly, assertSafeBind, assertSafeScanArg, assignColors, bearerToken, bookmarksScanner, buildCartographyToolHandlers, buildMapData, buildOpenApiDocument, buildReport, buildSinks, 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, evaluateCheck, evaluateRule, evidenceLine, executeGraphql, executeNlQuery, exportAll, exportBackstageYAML, exportComplianceReport, exportCostCSV, exportCostSummary, exportDiscoveryApp, exportJGF, exportJSON, extractListeningPorts, filterBySeverity, findAnonViolations, formatComplianceText, generateDependencyMermaid, generateDiffMermaid, generateTopologyMermaid, getClient, getRuleset, globalId, groupByDomain, handleGraphqlGet, hexCorners, hexDistance, hexNeighbors, hexRing, hexSpiral, hexToPixel, hmacKey, hostname, ingestEnvelope, installedAppsScanner, isLoopbackHost, isPersonalHost, isReadOnlyCommand, isRemembered, 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, previewShare, pseudonymize, pseudonymizeFragment, pseudonymizeString, pushDeltas, readConfigFile, redactConnectionString, redactSecrets, redactValue, renderDiff, resolveEffectiveLevel, resolveNlQuery, resolveSharingLevel, resolveTenant, revalidateAnonymized, reversalKey, reversePseudonym, rotateOrgKey, runApi, runDiscovery, runDrift, runHttp, runLocalDiscovery, runOnce, runStdio, runSyncClassify, safeEnv, safeJson, safetyHook, sanitizeUntrusted, sanitizeValue, scoreTopology, securityRelevantChange, serializeConfig, serviceConfigScanner, setVerbose, shadeVariant, shapeToJsonSchema, shareHash, splitSegments, stableStringify, startApi, stripSensitive, timingSafeEqual, validateScanner, vscodeDeeplink, zodToJsonSchema };