@datasynx/agentic-ai-cartography 2.3.0 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -390,14 +390,22 @@ interface DriftAlert {
390
390
  /** ISO-8601 UTC generation time. */
391
391
  generatedAt: string;
392
392
  }
393
- /** One configured drift sink. `url` is required when `type === 'webhook'`. */
393
+ /** One configured drift sink. `url` is required for every type except `stdout`. */
394
394
  interface DriftSinkConfig {
395
- type: 'stdout' | 'webhook';
396
- /** Required when type === 'webhook'. */
395
+ type: 'stdout' | 'webhook' | 'slack' | 'pagerduty' | 'jira';
396
+ /** Required for `webhook`/`slack`/`jira`; optional for `pagerduty` (defaults to the Events API). */
397
397
  url?: string;
398
- /** Optional bearer token; falls back to CARTOGRAPHY_DRIFT_TOKEN. */
398
+ /** Bearer token (`webhook`) / Jira API token (`jira`); falls back to CARTOGRAPHY_DRIFT_TOKEN. */
399
399
  token?: string;
400
400
  timeoutMs?: number;
401
+ /** PagerDuty Events API v2 routing key (rides in the body). Falls back to `token`/CARTOGRAPHY_DRIFT_TOKEN. */
402
+ routingKey?: string;
403
+ /** Jira account email (basic-auth user). */
404
+ email?: string;
405
+ /** Jira target project key, e.g. "OPS". */
406
+ project?: string;
407
+ /** Jira issue type name (default "Task"). */
408
+ issueType?: string;
401
409
  }
402
410
  /**
403
411
  * Opt-in drift-alerting block on {@link CartographyConfig}. Absent → the runner
@@ -420,10 +428,17 @@ declare const DriftConfigSchema: z.ZodObject<{
420
428
  type: z.ZodEnum<{
421
429
  stdout: "stdout";
422
430
  webhook: "webhook";
431
+ slack: "slack";
432
+ pagerduty: "pagerduty";
433
+ jira: "jira";
423
434
  }>;
424
435
  url: z.ZodOptional<z.ZodString>;
425
436
  token: z.ZodOptional<z.ZodString>;
426
437
  timeoutMs: z.ZodOptional<z.ZodNumber>;
438
+ routingKey: z.ZodOptional<z.ZodString>;
439
+ email: z.ZodOptional<z.ZodString>;
440
+ project: z.ZodOptional<z.ZodString>;
441
+ issueType: z.ZodOptional<z.ZodString>;
427
442
  }, z.core.$strip>>>;
428
443
  }, z.core.$strip>;
429
444
  /** Machine-readable result formats shared by `discover` (#67) and `schedule`. */
@@ -2840,7 +2855,12 @@ declare const SCAN_ARG_PATTERNS: {
2840
2855
  type ScanArgKind = keyof typeof SCAN_ARG_PATTERNS;
2841
2856
  /** Throw if `value` fails the strict pattern for `kind`; otherwise return it. */
2842
2857
  declare function assertSafeScanArg(kind: ScanArgKind, value: string): string;
2843
- /** Redact `user:password@` credentials embedded in any URL/DSN-like string. */
2858
+ /**
2859
+ * Redact `user:password@` credentials embedded in any URL/DSN-like string. The
2860
+ * quantifiers are length-bounded (schemes <64, userinfo/password <256 chars — far
2861
+ * beyond any real DSN) so the pattern is linear and cannot polynomially backtrack
2862
+ * (ReDoS) on adversarial input like `aaaa…` with no `://`.
2863
+ */
2844
2864
  declare function redactSecrets(value: string): string;
2845
2865
  /** Recursively redact secrets from arbitrary metadata before persistence. */
2846
2866
  declare function redactValue(value: unknown): unknown;
@@ -3269,6 +3289,42 @@ interface WebhookSinkOptions {
3269
3289
  token?: string;
3270
3290
  timeoutMs?: number;
3271
3291
  }
3292
+ /** Injectable fetch (defaults to the global) — lets tests deliver without a socket. */
3293
+ type FetchLike = (url: string, init: RequestInit) => Promise<{
3294
+ ok: boolean;
3295
+ status: number;
3296
+ }>;
3297
+ interface PostJsonOptions {
3298
+ url: string;
3299
+ body: unknown;
3300
+ /** Extra request headers (e.g. provider auth). `content-type: application/json` is always set. */
3301
+ headers?: Record<string, string>;
3302
+ timeoutMs?: number;
3303
+ /** Sink name for structured logs (never logs the url/token/body). */
3304
+ sinkName: string;
3305
+ /** Injected fetch for tests; defaults to the global. */
3306
+ fetchImpl?: FetchLike;
3307
+ }
3308
+ /**
3309
+ * Shared outbound JSON POST carrying the load-bearing sink hardening, reused by
3310
+ * {@link WebhookSink} and the Slack/PagerDuty/Jira provider sinks so there is exactly
3311
+ * one egress code path:
3312
+ * - refuses a non-`https:` / non-loopback target ({@link isSecureWebhookUrl}, SSRF/plaintext guard);
3313
+ * - `AbortSignal.timeout` bounded;
3314
+ * - **never throws** for a transient failure (logs and resolves so the runner continues);
3315
+ * - logs only `stripSensitive(url)` (host:port) — never the full url, headers, token, or body.
3316
+ * The body must already be redaction-safe (callers pass `redactValue(...)` output or a
3317
+ * provider payload derived from it).
3318
+ */
3319
+ declare function postJson(opts: PostJsonOptions): Promise<void>;
3320
+ /**
3321
+ * True if `url` is safe to POST to: `https:`, or `http:` only to a loopback host,
3322
+ * or any scheme when the documented `CARTOGRAPHY_ALLOW_INSECURE_SYNC=1` escape
3323
+ * hatch (test-only) is set. An unparseable URL is treated as insecure. Mirrors the
3324
+ * 2.11 `pushDeltas` guard so the drift feature never silently exfiltrates over the
3325
+ * wire in plaintext.
3326
+ */
3327
+ declare function isSecureWebhookUrl(url: string, env?: NodeJS.ProcessEnv): boolean;
3272
3328
  /**
3273
3329
  * Outbound sink: POSTs the alert as JSON to an operator-configured endpoint. The
3274
3330
  * first and only outbound network surface of the drift feature — off by default
@@ -3290,11 +3346,114 @@ declare class WebhookSink implements DriftSink {
3290
3346
  emit(alert: DriftAlert): Promise<void>;
3291
3347
  }
3292
3348
 
3349
+ /**
3350
+ * Provider drift sinks (4.4): Slack / PagerDuty / Jira. Each is a thin {@link DriftSink}
3351
+ * that (1) redacts the alert (`redactValue`), (2) maps it to the provider payload via the
3352
+ * pure adapters in `providers.ts`, and (3) delivers it through the shared {@link postJson}
3353
+ * helper — inheriting the *exact* `WebhookSink` hardening (https-or-loopback SSRF guard,
3354
+ * bounded timeout, never-throw, `stripSensitive` log-only). They differ only in where the
3355
+ * provider places its secret: Slack in the URL, PagerDuty as a `routing_key` in the body,
3356
+ * Jira as an `Authorization: Basic` header.
3357
+ */
3358
+
3359
+ /** Default PagerDuty Events API v2 ingest endpoint. */
3360
+ declare const PAGERDUTY_ENQUEUE_URL = "https://events.pagerduty.com/v2/enqueue";
3361
+ interface BaseSinkOptions {
3362
+ url: string;
3363
+ timeoutMs?: number;
3364
+ /** Injected fetch for tests; defaults to the global. */
3365
+ fetchImpl?: FetchLike;
3366
+ }
3367
+ /** Slack incoming webhook. The configured `url` is the secret; no auth header is sent. */
3368
+ declare class SlackSink implements DriftSink {
3369
+ private readonly opts;
3370
+ readonly name = "slack";
3371
+ constructor(opts: BaseSinkOptions);
3372
+ emit(alert: DriftAlert): Promise<void>;
3373
+ }
3374
+ interface PagerDutySinkOptions extends BaseSinkOptions {
3375
+ /** Events API v2 routing key (rides in the body, PagerDuty's auth model). */
3376
+ routingKey: string;
3377
+ }
3378
+ /** PagerDuty Events API v2 `trigger`. `url` defaults to {@link PAGERDUTY_ENQUEUE_URL}. */
3379
+ declare class PagerDutySink implements DriftSink {
3380
+ private readonly opts;
3381
+ readonly name = "pagerduty";
3382
+ constructor(opts: PagerDutySinkOptions);
3383
+ emit(alert: DriftAlert): Promise<void>;
3384
+ }
3385
+ interface JiraSinkOptions extends BaseSinkOptions {
3386
+ /** Jira account email (basic-auth user). */
3387
+ email: string;
3388
+ /** Jira API token (basic-auth pass). */
3389
+ token: string;
3390
+ /** Target project key (e.g. "OPS"). */
3391
+ project: string;
3392
+ /** Issue type name (default "Task"). */
3393
+ issueType?: string;
3394
+ }
3395
+ /** Jira REST API v2 create-issue, authenticated with `Authorization: Basic base64(email:token)`. */
3396
+ declare class JiraSink implements DriftSink {
3397
+ private readonly opts;
3398
+ readonly name = "jira";
3399
+ constructor(opts: JiraSinkOptions);
3400
+ emit(alert: DriftAlert): Promise<void>;
3401
+ }
3402
+
3403
+ /**
3404
+ * Pure provider payload mappers (4.4): a classified {@link DriftAlert} → the JSON
3405
+ * shape Slack / PagerDuty / Jira each expect. Deterministic, no I/O, no secrets —
3406
+ * they operate on the **already-`redactValue`'d** alert the sinks pass in, and read
3407
+ * only structured fields (severity/counts/item refs), never raw node metadata. The
3408
+ * delivery + auth + SSRF hardening lives in `provider-sink.ts`/`webhook.ts`; these
3409
+ * are just shape transforms, so they are trivially snapshot-testable.
3410
+ */
3411
+
3412
+ interface SlackMessage {
3413
+ text: string;
3414
+ blocks: unknown[];
3415
+ }
3416
+ /** Map an alert to a Slack incoming-webhook message (Block Kit). The webhook URL is the secret. */
3417
+ declare function formatSlack(alert: DriftAlert): SlackMessage;
3418
+ interface PagerDutyEvent {
3419
+ routing_key: string;
3420
+ event_action: 'trigger';
3421
+ dedup_key: string;
3422
+ payload: {
3423
+ summary: string;
3424
+ source: string;
3425
+ severity: 'info' | 'warning' | 'critical';
3426
+ timestamp: string;
3427
+ custom_details: Record<string, unknown>;
3428
+ };
3429
+ }
3430
+ /** Map an alert to a PagerDuty Events API v2 `trigger`. `routingKey` rides in the body (PD's auth model). */
3431
+ declare function formatPagerDuty(alert: DriftAlert, routingKey: string): PagerDutyEvent;
3432
+ interface JiraIssue {
3433
+ fields: {
3434
+ project: {
3435
+ key: string;
3436
+ };
3437
+ issuetype: {
3438
+ name: string;
3439
+ };
3440
+ summary: string;
3441
+ description: string;
3442
+ };
3443
+ }
3444
+ interface JiraOptions {
3445
+ project: string;
3446
+ issueType?: string;
3447
+ }
3448
+ /** Map an alert to a Jira create-issue body. Auth (Basic email:token) is applied by the sink, not here. */
3449
+ declare function formatJira(alert: DriftAlert, opts: JiraOptions): JiraIssue;
3450
+
3293
3451
  /**
3294
3452
  * Construct sinks from config. Absent/empty config → `[new StdoutSink()]` (the
3295
- * local default). A webhook sink's token falls back to `CARTOGRAPHY_DRIFT_TOKEN`
3296
- * when not given explicitly (mirroring `CARTOGRAPHY_HTTP_TOKEN`). A webhook entry
3297
- * without a url is skipped defensively (the schema already rejects it).
3453
+ * local default). Secrets (webhook `token`, Jira token, PagerDuty routing key) fall
3454
+ * back to `CARTOGRAPHY_DRIFT_TOKEN` when not given explicitly (mirroring
3455
+ * `CARTOGRAPHY_HTTP_TOKEN`). A provider entry missing a required field is skipped
3456
+ * with a warning rather than aborting the others — graceful degradation.
3298
3457
  */
3299
3458
  declare function buildSinks(drift?: DriftConfig): DriftSink[];
3300
3459
 
@@ -3710,4 +3869,4 @@ declare function logInfo(message: string, context?: Record<string, unknown>): vo
3710
3869
  declare function logWarn(message: string, context?: Record<string, unknown>): void;
3711
3870
  declare function logError(message: string, context?: Record<string, unknown>): void;
3712
3871
 
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 };
3872
+ 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 FetchLike, 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, 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 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, type SlackMessage, SlackSink, 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, formatJira, formatPagerDuty, formatSlack, generateDependencyMermaid, generateDiffMermaid, generateTopologyMermaid, getClient, getRuleset, globalId, groupByDomain, handleGraphqlGet, 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, 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 };
package/dist/index.d.ts CHANGED
@@ -390,14 +390,22 @@ interface DriftAlert {
390
390
  /** ISO-8601 UTC generation time. */
391
391
  generatedAt: string;
392
392
  }
393
- /** One configured drift sink. `url` is required when `type === 'webhook'`. */
393
+ /** One configured drift sink. `url` is required for every type except `stdout`. */
394
394
  interface DriftSinkConfig {
395
- type: 'stdout' | 'webhook';
396
- /** Required when type === 'webhook'. */
395
+ type: 'stdout' | 'webhook' | 'slack' | 'pagerduty' | 'jira';
396
+ /** Required for `webhook`/`slack`/`jira`; optional for `pagerduty` (defaults to the Events API). */
397
397
  url?: string;
398
- /** Optional bearer token; falls back to CARTOGRAPHY_DRIFT_TOKEN. */
398
+ /** Bearer token (`webhook`) / Jira API token (`jira`); falls back to CARTOGRAPHY_DRIFT_TOKEN. */
399
399
  token?: string;
400
400
  timeoutMs?: number;
401
+ /** PagerDuty Events API v2 routing key (rides in the body). Falls back to `token`/CARTOGRAPHY_DRIFT_TOKEN. */
402
+ routingKey?: string;
403
+ /** Jira account email (basic-auth user). */
404
+ email?: string;
405
+ /** Jira target project key, e.g. "OPS". */
406
+ project?: string;
407
+ /** Jira issue type name (default "Task"). */
408
+ issueType?: string;
401
409
  }
402
410
  /**
403
411
  * Opt-in drift-alerting block on {@link CartographyConfig}. Absent → the runner
@@ -420,10 +428,17 @@ declare const DriftConfigSchema: z.ZodObject<{
420
428
  type: z.ZodEnum<{
421
429
  stdout: "stdout";
422
430
  webhook: "webhook";
431
+ slack: "slack";
432
+ pagerduty: "pagerduty";
433
+ jira: "jira";
423
434
  }>;
424
435
  url: z.ZodOptional<z.ZodString>;
425
436
  token: z.ZodOptional<z.ZodString>;
426
437
  timeoutMs: z.ZodOptional<z.ZodNumber>;
438
+ routingKey: z.ZodOptional<z.ZodString>;
439
+ email: z.ZodOptional<z.ZodString>;
440
+ project: z.ZodOptional<z.ZodString>;
441
+ issueType: z.ZodOptional<z.ZodString>;
427
442
  }, z.core.$strip>>>;
428
443
  }, z.core.$strip>;
429
444
  /** Machine-readable result formats shared by `discover` (#67) and `schedule`. */
@@ -2840,7 +2855,12 @@ declare const SCAN_ARG_PATTERNS: {
2840
2855
  type ScanArgKind = keyof typeof SCAN_ARG_PATTERNS;
2841
2856
  /** Throw if `value` fails the strict pattern for `kind`; otherwise return it. */
2842
2857
  declare function assertSafeScanArg(kind: ScanArgKind, value: string): string;
2843
- /** Redact `user:password@` credentials embedded in any URL/DSN-like string. */
2858
+ /**
2859
+ * Redact `user:password@` credentials embedded in any URL/DSN-like string. The
2860
+ * quantifiers are length-bounded (schemes <64, userinfo/password <256 chars — far
2861
+ * beyond any real DSN) so the pattern is linear and cannot polynomially backtrack
2862
+ * (ReDoS) on adversarial input like `aaaa…` with no `://`.
2863
+ */
2844
2864
  declare function redactSecrets(value: string): string;
2845
2865
  /** Recursively redact secrets from arbitrary metadata before persistence. */
2846
2866
  declare function redactValue(value: unknown): unknown;
@@ -3269,6 +3289,42 @@ interface WebhookSinkOptions {
3269
3289
  token?: string;
3270
3290
  timeoutMs?: number;
3271
3291
  }
3292
+ /** Injectable fetch (defaults to the global) — lets tests deliver without a socket. */
3293
+ type FetchLike = (url: string, init: RequestInit) => Promise<{
3294
+ ok: boolean;
3295
+ status: number;
3296
+ }>;
3297
+ interface PostJsonOptions {
3298
+ url: string;
3299
+ body: unknown;
3300
+ /** Extra request headers (e.g. provider auth). `content-type: application/json` is always set. */
3301
+ headers?: Record<string, string>;
3302
+ timeoutMs?: number;
3303
+ /** Sink name for structured logs (never logs the url/token/body). */
3304
+ sinkName: string;
3305
+ /** Injected fetch for tests; defaults to the global. */
3306
+ fetchImpl?: FetchLike;
3307
+ }
3308
+ /**
3309
+ * Shared outbound JSON POST carrying the load-bearing sink hardening, reused by
3310
+ * {@link WebhookSink} and the Slack/PagerDuty/Jira provider sinks so there is exactly
3311
+ * one egress code path:
3312
+ * - refuses a non-`https:` / non-loopback target ({@link isSecureWebhookUrl}, SSRF/plaintext guard);
3313
+ * - `AbortSignal.timeout` bounded;
3314
+ * - **never throws** for a transient failure (logs and resolves so the runner continues);
3315
+ * - logs only `stripSensitive(url)` (host:port) — never the full url, headers, token, or body.
3316
+ * The body must already be redaction-safe (callers pass `redactValue(...)` output or a
3317
+ * provider payload derived from it).
3318
+ */
3319
+ declare function postJson(opts: PostJsonOptions): Promise<void>;
3320
+ /**
3321
+ * True if `url` is safe to POST to: `https:`, or `http:` only to a loopback host,
3322
+ * or any scheme when the documented `CARTOGRAPHY_ALLOW_INSECURE_SYNC=1` escape
3323
+ * hatch (test-only) is set. An unparseable URL is treated as insecure. Mirrors the
3324
+ * 2.11 `pushDeltas` guard so the drift feature never silently exfiltrates over the
3325
+ * wire in plaintext.
3326
+ */
3327
+ declare function isSecureWebhookUrl(url: string, env?: NodeJS.ProcessEnv): boolean;
3272
3328
  /**
3273
3329
  * Outbound sink: POSTs the alert as JSON to an operator-configured endpoint. The
3274
3330
  * first and only outbound network surface of the drift feature — off by default
@@ -3290,11 +3346,114 @@ declare class WebhookSink implements DriftSink {
3290
3346
  emit(alert: DriftAlert): Promise<void>;
3291
3347
  }
3292
3348
 
3349
+ /**
3350
+ * Provider drift sinks (4.4): Slack / PagerDuty / Jira. Each is a thin {@link DriftSink}
3351
+ * that (1) redacts the alert (`redactValue`), (2) maps it to the provider payload via the
3352
+ * pure adapters in `providers.ts`, and (3) delivers it through the shared {@link postJson}
3353
+ * helper — inheriting the *exact* `WebhookSink` hardening (https-or-loopback SSRF guard,
3354
+ * bounded timeout, never-throw, `stripSensitive` log-only). They differ only in where the
3355
+ * provider places its secret: Slack in the URL, PagerDuty as a `routing_key` in the body,
3356
+ * Jira as an `Authorization: Basic` header.
3357
+ */
3358
+
3359
+ /** Default PagerDuty Events API v2 ingest endpoint. */
3360
+ declare const PAGERDUTY_ENQUEUE_URL = "https://events.pagerduty.com/v2/enqueue";
3361
+ interface BaseSinkOptions {
3362
+ url: string;
3363
+ timeoutMs?: number;
3364
+ /** Injected fetch for tests; defaults to the global. */
3365
+ fetchImpl?: FetchLike;
3366
+ }
3367
+ /** Slack incoming webhook. The configured `url` is the secret; no auth header is sent. */
3368
+ declare class SlackSink implements DriftSink {
3369
+ private readonly opts;
3370
+ readonly name = "slack";
3371
+ constructor(opts: BaseSinkOptions);
3372
+ emit(alert: DriftAlert): Promise<void>;
3373
+ }
3374
+ interface PagerDutySinkOptions extends BaseSinkOptions {
3375
+ /** Events API v2 routing key (rides in the body, PagerDuty's auth model). */
3376
+ routingKey: string;
3377
+ }
3378
+ /** PagerDuty Events API v2 `trigger`. `url` defaults to {@link PAGERDUTY_ENQUEUE_URL}. */
3379
+ declare class PagerDutySink implements DriftSink {
3380
+ private readonly opts;
3381
+ readonly name = "pagerduty";
3382
+ constructor(opts: PagerDutySinkOptions);
3383
+ emit(alert: DriftAlert): Promise<void>;
3384
+ }
3385
+ interface JiraSinkOptions extends BaseSinkOptions {
3386
+ /** Jira account email (basic-auth user). */
3387
+ email: string;
3388
+ /** Jira API token (basic-auth pass). */
3389
+ token: string;
3390
+ /** Target project key (e.g. "OPS"). */
3391
+ project: string;
3392
+ /** Issue type name (default "Task"). */
3393
+ issueType?: string;
3394
+ }
3395
+ /** Jira REST API v2 create-issue, authenticated with `Authorization: Basic base64(email:token)`. */
3396
+ declare class JiraSink implements DriftSink {
3397
+ private readonly opts;
3398
+ readonly name = "jira";
3399
+ constructor(opts: JiraSinkOptions);
3400
+ emit(alert: DriftAlert): Promise<void>;
3401
+ }
3402
+
3403
+ /**
3404
+ * Pure provider payload mappers (4.4): a classified {@link DriftAlert} → the JSON
3405
+ * shape Slack / PagerDuty / Jira each expect. Deterministic, no I/O, no secrets —
3406
+ * they operate on the **already-`redactValue`'d** alert the sinks pass in, and read
3407
+ * only structured fields (severity/counts/item refs), never raw node metadata. The
3408
+ * delivery + auth + SSRF hardening lives in `provider-sink.ts`/`webhook.ts`; these
3409
+ * are just shape transforms, so they are trivially snapshot-testable.
3410
+ */
3411
+
3412
+ interface SlackMessage {
3413
+ text: string;
3414
+ blocks: unknown[];
3415
+ }
3416
+ /** Map an alert to a Slack incoming-webhook message (Block Kit). The webhook URL is the secret. */
3417
+ declare function formatSlack(alert: DriftAlert): SlackMessage;
3418
+ interface PagerDutyEvent {
3419
+ routing_key: string;
3420
+ event_action: 'trigger';
3421
+ dedup_key: string;
3422
+ payload: {
3423
+ summary: string;
3424
+ source: string;
3425
+ severity: 'info' | 'warning' | 'critical';
3426
+ timestamp: string;
3427
+ custom_details: Record<string, unknown>;
3428
+ };
3429
+ }
3430
+ /** Map an alert to a PagerDuty Events API v2 `trigger`. `routingKey` rides in the body (PD's auth model). */
3431
+ declare function formatPagerDuty(alert: DriftAlert, routingKey: string): PagerDutyEvent;
3432
+ interface JiraIssue {
3433
+ fields: {
3434
+ project: {
3435
+ key: string;
3436
+ };
3437
+ issuetype: {
3438
+ name: string;
3439
+ };
3440
+ summary: string;
3441
+ description: string;
3442
+ };
3443
+ }
3444
+ interface JiraOptions {
3445
+ project: string;
3446
+ issueType?: string;
3447
+ }
3448
+ /** Map an alert to a Jira create-issue body. Auth (Basic email:token) is applied by the sink, not here. */
3449
+ declare function formatJira(alert: DriftAlert, opts: JiraOptions): JiraIssue;
3450
+
3293
3451
  /**
3294
3452
  * Construct sinks from config. Absent/empty config → `[new StdoutSink()]` (the
3295
- * local default). A webhook sink's token falls back to `CARTOGRAPHY_DRIFT_TOKEN`
3296
- * when not given explicitly (mirroring `CARTOGRAPHY_HTTP_TOKEN`). A webhook entry
3297
- * without a url is skipped defensively (the schema already rejects it).
3453
+ * local default). Secrets (webhook `token`, Jira token, PagerDuty routing key) fall
3454
+ * back to `CARTOGRAPHY_DRIFT_TOKEN` when not given explicitly (mirroring
3455
+ * `CARTOGRAPHY_HTTP_TOKEN`). A provider entry missing a required field is skipped
3456
+ * with a warning rather than aborting the others — graceful degradation.
3298
3457
  */
3299
3458
  declare function buildSinks(drift?: DriftConfig): DriftSink[];
3300
3459
 
@@ -3710,4 +3869,4 @@ declare function logInfo(message: string, context?: Record<string, unknown>): vo
3710
3869
  declare function logWarn(message: string, context?: Record<string, unknown>): void;
3711
3870
  declare function logError(message: string, context?: Record<string, unknown>): void;
3712
3871
 
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 };
3872
+ 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 FetchLike, 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, 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 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, type SlackMessage, SlackSink, 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, formatJira, formatPagerDuty, formatSlack, generateDependencyMermaid, generateDiffMermaid, generateTopologyMermaid, getClient, getRuleset, globalId, groupByDomain, handleGraphqlGet, 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, 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 };