@datasynx/agentic-ai-cartography 2.4.0 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api-bin.js +2 -2
- package/dist/{chunk-X5JA2UDT.js → chunk-GA4427LB.js} +134 -14
- package/dist/chunk-GA4427LB.js.map +1 -0
- package/dist/{chunk-L4OSL7I6.js → chunk-PQ7Q6MI5.js} +130 -12
- package/dist/chunk-PQ7Q6MI5.js.map +1 -0
- package/dist/{chunk-B4QWX7CP.js → chunk-X3UWUX3G.js} +55 -11
- package/dist/chunk-X3UWUX3G.js.map +1 -0
- package/dist/cli.js +91 -33
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +363 -60
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +262 -3
- package/dist/index.d.ts +262 -3
- package/dist/index.js +343 -58
- package/dist/index.js.map +1 -1
- package/dist/mcp-bin.js +2 -2
- package/package.json +1 -1
- package/server.json +2 -2
- package/dist/chunk-B4QWX7CP.js.map +0 -1
- package/dist/chunk-L4OSL7I6.js.map +0 -1
- package/dist/chunk-X5JA2UDT.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -881,6 +881,99 @@ declare const ComplianceReportSchema: z.ZodObject<{
|
|
|
881
881
|
}, z.core.$strip>;
|
|
882
882
|
type ComplianceReport = z.infer<typeof ComplianceReportSchema>;
|
|
883
883
|
|
|
884
|
+
/**
|
|
885
|
+
* RBAC identity types (4.5). A bearer credential resolves to a {@link Principal}
|
|
886
|
+
* `{ subject, tenant, role }`; the HTTP surfaces (MCP transport + REST/GraphQL API)
|
|
887
|
+
* enforce a deny-by-default `can(role, action)` matrix and pin every read to the
|
|
888
|
+
* principal's tenant. Kept dependency-light and free of any import from `db.ts`/
|
|
889
|
+
* `server.ts` so it can be reused by both transports without a cycle.
|
|
890
|
+
*/
|
|
891
|
+
|
|
892
|
+
/** Roles, least → most privileged. `admin ⊇ operator ⊇ viewer` (rank-ordered). */
|
|
893
|
+
declare const ROLES: readonly ["viewer", "operator", "admin"];
|
|
894
|
+
type Role = typeof ROLES[number];
|
|
895
|
+
declare const RoleSchema: z.ZodEnum<{
|
|
896
|
+
viewer: "viewer";
|
|
897
|
+
operator: "operator";
|
|
898
|
+
admin: "admin";
|
|
899
|
+
}>;
|
|
900
|
+
/**
|
|
901
|
+
* Gated action classes:
|
|
902
|
+
* - `read` — any read-only query/resource (viewer+).
|
|
903
|
+
* - `discovery` — trigger a scan that mutates the catalog, e.g. `run_discovery` (operator+).
|
|
904
|
+
* - `admin` — manage credentials / admin-only surfaces (admin only).
|
|
905
|
+
*/
|
|
906
|
+
declare const ACTIONS: readonly ["read", "discovery", "admin"];
|
|
907
|
+
type Action = typeof ACTIONS[number];
|
|
908
|
+
declare const ActionSchema: z.ZodEnum<{
|
|
909
|
+
read: "read";
|
|
910
|
+
admin: "admin";
|
|
911
|
+
discovery: "discovery";
|
|
912
|
+
}>;
|
|
913
|
+
/** The authenticated caller, bound to exactly one tenant. */
|
|
914
|
+
interface Principal {
|
|
915
|
+
/** Stable identity (token label / username / OIDC `sub`). */
|
|
916
|
+
subject: string;
|
|
917
|
+
/** Org-scope this principal may read/act within. */
|
|
918
|
+
tenant: string;
|
|
919
|
+
role: Role;
|
|
920
|
+
}
|
|
921
|
+
declare const PrincipalSchema: z.ZodObject<{
|
|
922
|
+
subject: z.ZodString;
|
|
923
|
+
tenant: z.ZodString;
|
|
924
|
+
role: z.ZodEnum<{
|
|
925
|
+
viewer: "viewer";
|
|
926
|
+
operator: "operator";
|
|
927
|
+
admin: "admin";
|
|
928
|
+
}>;
|
|
929
|
+
}, z.core.$strip>;
|
|
930
|
+
/** A seeded credential (config-supplied). The token is hashed before storage; never persisted raw. */
|
|
931
|
+
declare const CredentialConfigSchema: z.ZodObject<{
|
|
932
|
+
token: z.ZodString;
|
|
933
|
+
subject: z.ZodString;
|
|
934
|
+
tenant: z.ZodOptional<z.ZodString>;
|
|
935
|
+
role: z.ZodDefault<z.ZodEnum<{
|
|
936
|
+
viewer: "viewer";
|
|
937
|
+
operator: "operator";
|
|
938
|
+
admin: "admin";
|
|
939
|
+
}>>;
|
|
940
|
+
}, z.core.$strip>;
|
|
941
|
+
type CredentialConfig = z.infer<typeof CredentialConfigSchema>;
|
|
942
|
+
/**
|
|
943
|
+
* Opt-in auth block on {@link CartographyConfig}. Absent → today's behavior exactly
|
|
944
|
+
* (loopback no-token → implicit admin; a configured shared token → one implicit admin).
|
|
945
|
+
* When `credentials` are present (here or in the SQLite store), the server runs in RBAC
|
|
946
|
+
* mode: only a known token resolves to a principal, everything else is 401.
|
|
947
|
+
*/
|
|
948
|
+
declare const AuthConfigSchema: z.ZodObject<{
|
|
949
|
+
credentials: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
950
|
+
token: z.ZodString;
|
|
951
|
+
subject: z.ZodString;
|
|
952
|
+
tenant: z.ZodOptional<z.ZodString>;
|
|
953
|
+
role: z.ZodDefault<z.ZodEnum<{
|
|
954
|
+
viewer: "viewer";
|
|
955
|
+
operator: "operator";
|
|
956
|
+
admin: "admin";
|
|
957
|
+
}>>;
|
|
958
|
+
}, z.core.$strip>>>;
|
|
959
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
960
|
+
}, z.core.$strip>;
|
|
961
|
+
type AuthConfig = z.infer<typeof AuthConfigSchema>;
|
|
962
|
+
/** A stored credential record (token already hashed). */
|
|
963
|
+
interface CredentialRecord {
|
|
964
|
+
tokenHash: string;
|
|
965
|
+
subject: string;
|
|
966
|
+
tenant: string;
|
|
967
|
+
role: Role;
|
|
968
|
+
createdAt: string;
|
|
969
|
+
}
|
|
970
|
+
/** Resolves a stored credential by its token hash. Implemented over SQLite (and, later, OIDC). */
|
|
971
|
+
interface CredentialStore {
|
|
972
|
+
/** Number of stored credentials — `0` means "no RBAC configured" (fall back to shared/loopback). */
|
|
973
|
+
count(): number;
|
|
974
|
+
findByHash(tokenHash: string): CredentialRecord | undefined;
|
|
975
|
+
}
|
|
976
|
+
|
|
884
977
|
/** Attribution applied by an enrichment pass (3.3). `null` clears the field; `undefined` leaves it unchanged. */
|
|
885
978
|
interface NodeAttribution {
|
|
886
979
|
owner?: string | null;
|
|
@@ -1158,7 +1251,28 @@ declare class CartographyDB {
|
|
|
1158
1251
|
limit?: number;
|
|
1159
1252
|
offset?: number;
|
|
1160
1253
|
}): EdgeRow[];
|
|
1161
|
-
insertEvent(sessionId: string, event: Pick<EventRow, 'eventType' | 'process' | 'pid' | 'target' | 'targetType' | 'port'> & Partial<Pick<EventRow, 'command' | 'resultBytes'>>, taskId?: string
|
|
1254
|
+
insertEvent(sessionId: string, event: Pick<EventRow, 'eventType' | 'process' | 'pid' | 'target' | 'targetType' | 'port'> & Partial<Pick<EventRow, 'command' | 'resultBytes'>>, taskId?: string,
|
|
1255
|
+
/** Authenticated actor (4.5 RBAC) — stamped into the audit trail when present. */
|
|
1256
|
+
actor?: {
|
|
1257
|
+
subject: string;
|
|
1258
|
+
role: string;
|
|
1259
|
+
tenant: string;
|
|
1260
|
+
}): void;
|
|
1261
|
+
/** Number of stored credentials. `0` ⇒ no RBAC configured (fall back to shared/loopback). */
|
|
1262
|
+
countCredentials(): number;
|
|
1263
|
+
/** Look up a credential by its sha256 token hash. */
|
|
1264
|
+
findCredentialByHash(tokenHash: string): CredentialRecord | undefined;
|
|
1265
|
+
/** Upsert a credential (idempotent on the token hash). Stores only the hash, never the raw token. */
|
|
1266
|
+
addCredential(rec: {
|
|
1267
|
+
tokenHash: string;
|
|
1268
|
+
subject: string;
|
|
1269
|
+
tenant: string;
|
|
1270
|
+
role: string;
|
|
1271
|
+
}): void;
|
|
1272
|
+
/** List all credentials (token hashes only — the raw token is unrecoverable). */
|
|
1273
|
+
listCredentials(): Array<CredentialRecord>;
|
|
1274
|
+
/** Revoke every credential for a subject. Returns the number removed. */
|
|
1275
|
+
revokeCredentialsBySubject(subject: string): number;
|
|
1162
1276
|
getEvents(sessionId: string, since?: string): EventRow[];
|
|
1163
1277
|
startTask(sessionId: string, description?: string): string;
|
|
1164
1278
|
endCurrentTask(sessionId: string): void;
|
|
@@ -1444,6 +1558,8 @@ interface QueryBackend {
|
|
|
1444
1558
|
nodes(ctx: TenantContext, q: NodeQuery, sessionId?: string): NodesResult;
|
|
1445
1559
|
/** One node by id (or `undefined` if absent). Throws {@link NotFoundError} if no session resolves. */
|
|
1446
1560
|
node(ctx: TenantContext, id: string, sessionId?: string): NodeRow | undefined;
|
|
1561
|
+
/** All edges of the resolved session (for full-topology consumers, e.g. the Backstage catalog). Throws {@link NotFoundError} if no session resolves. */
|
|
1562
|
+
edges(ctx: TenantContext, sessionId?: string): EdgeRow[];
|
|
1447
1563
|
/** Dependency traversal from a node. Throws {@link NotFoundError} if no session resolves. */
|
|
1448
1564
|
dependencies(ctx: TenantContext, id: string, q: DependencyQuery, sessionId?: string): TraversalResult;
|
|
1449
1565
|
/** Compare two sessions (both must belong to the tenant). Throws {@link NotFoundError} on an unknown/foreign id. */
|
|
@@ -1471,6 +1587,7 @@ declare class SqliteQueryBackend implements QueryBackend {
|
|
|
1471
1587
|
summary(ctx: TenantContext, sessionId?: string): GraphSummary;
|
|
1472
1588
|
nodes(ctx: TenantContext, q: NodeQuery, sessionId?: string): NodesResult;
|
|
1473
1589
|
node(ctx: TenantContext, id: string, sessionId?: string): NodeRow | undefined;
|
|
1590
|
+
edges(ctx: TenantContext, sessionId?: string): EdgeRow[];
|
|
1474
1591
|
dependencies(ctx: TenantContext, id: string, q: DependencyQuery, sessionId?: string): TraversalResult;
|
|
1475
1592
|
diff(ctx: TenantContext, base: string, current: string): TopologyDiff;
|
|
1476
1593
|
sessions(ctx: TenantContext): SessionRow[];
|
|
@@ -2020,6 +2137,13 @@ interface CreateMcpServerOptions {
|
|
|
2020
2137
|
* behaviour exactly. The org is normalized to a tenant.
|
|
2021
2138
|
*/
|
|
2022
2139
|
org?: string;
|
|
2140
|
+
/**
|
|
2141
|
+
* The authenticated principal (4.5 RBAC). When set, mutating tools (`run_discovery`)
|
|
2142
|
+
* are gated by role: a `viewer` is refused with a forbidden error. Read tools are
|
|
2143
|
+
* unaffected (any principal is at least `viewer`). Unset → no role gating (the
|
|
2144
|
+
* transport already handled 401, or it's an in-process/stdio caller).
|
|
2145
|
+
*/
|
|
2146
|
+
principal?: Principal;
|
|
2023
2147
|
}
|
|
2024
2148
|
/**
|
|
2025
2149
|
* Build a fully-configured Cartography MCP server. Call `.connect(transport)` to run it.
|
|
@@ -2060,12 +2184,25 @@ interface HttpOptions {
|
|
|
2060
2184
|
status: number;
|
|
2061
2185
|
body: unknown;
|
|
2062
2186
|
};
|
|
2187
|
+
/**
|
|
2188
|
+
* RBAC (4.5). When `store` holds credentials, the transport runs in RBAC mode: a
|
|
2189
|
+
* request's bearer token must resolve to a {@link Principal} (else 401), and the
|
|
2190
|
+
* principal is passed to `factory(principal)` so the per-session server is pinned to
|
|
2191
|
+
* the principal's tenant and gates mutating tools by role. Without a populated store
|
|
2192
|
+
* the legacy shared-token / open-loopback behavior is preserved.
|
|
2193
|
+
*/
|
|
2194
|
+
auth?: {
|
|
2195
|
+
store?: CredentialStore;
|
|
2196
|
+
required?: boolean;
|
|
2197
|
+
};
|
|
2198
|
+
/** Tenant assigned to implicit (shared/loopback) admin principals. */
|
|
2199
|
+
defaultTenant?: string;
|
|
2063
2200
|
}
|
|
2064
2201
|
/**
|
|
2065
2202
|
* Start a Streamable HTTP server. A fresh MCP server instance is created per
|
|
2066
2203
|
* session via `factory`, so multiple clients can connect concurrently.
|
|
2067
2204
|
*/
|
|
2068
|
-
declare function runHttp(factory: () => McpServer, opts?: HttpOptions): Promise<http.Server>;
|
|
2205
|
+
declare function runHttp(factory: (principal?: Principal) => McpServer, opts?: HttpOptions): Promise<http.Server>;
|
|
2069
2206
|
|
|
2070
2207
|
/**
|
|
2071
2208
|
* Shared HTTP auth + bind-hardening primitives.
|
|
@@ -2166,6 +2303,18 @@ interface ApiServerOptions extends BindGuardOptions {
|
|
|
2166
2303
|
tenant?: TenantOptions;
|
|
2167
2304
|
/** Expose `/graphql` (default true). */
|
|
2168
2305
|
graphql?: boolean;
|
|
2306
|
+
/**
|
|
2307
|
+
* RBAC (4.5). When `store` holds credentials, the API runs in RBAC mode: a request's
|
|
2308
|
+
* bearer token must resolve to a {@link Principal} (else 401), the principal's role must
|
|
2309
|
+
* permit `read` (else 403), and reads are **pinned to the principal's tenant** (any
|
|
2310
|
+
* caller-supplied tenant header/param is ignored). Without a populated store the legacy
|
|
2311
|
+
* behavior is preserved: the configured shared `token` (or open loopback) is one implicit
|
|
2312
|
+
* admin that may still select a tenant via header/param.
|
|
2313
|
+
*/
|
|
2314
|
+
auth?: {
|
|
2315
|
+
store?: CredentialStore;
|
|
2316
|
+
required?: boolean;
|
|
2317
|
+
};
|
|
2169
2318
|
/** Access logger (stderr). */
|
|
2170
2319
|
log?: (msg: string) => void;
|
|
2171
2320
|
}
|
|
@@ -2227,6 +2376,78 @@ declare function handleGraphqlGet(): {
|
|
|
2227
2376
|
body: string;
|
|
2228
2377
|
};
|
|
2229
2378
|
|
|
2379
|
+
/**
|
|
2380
|
+
* The RBAC decision core (4.5): a pure, deny-by-default `can(role, action)` matrix
|
|
2381
|
+
* and the `authorize`/`assertSameTenant` guards the transports call. No I/O, no DB —
|
|
2382
|
+
* trivially unit-testable and identical for the MCP transport and the REST/GraphQL API.
|
|
2383
|
+
*/
|
|
2384
|
+
|
|
2385
|
+
/** True iff `role` is at least the minimum role required for `action`. */
|
|
2386
|
+
declare function can(role: Role, action: Action): boolean;
|
|
2387
|
+
/** Thrown when an authenticated principal lacks the role for an action → HTTP 403. */
|
|
2388
|
+
declare class AuthorizationError extends Error {
|
|
2389
|
+
readonly action: Action;
|
|
2390
|
+
readonly role: Role;
|
|
2391
|
+
constructor(action: Action, role: Role);
|
|
2392
|
+
}
|
|
2393
|
+
/** Throw {@link AuthorizationError} unless `principal` may perform `action`. */
|
|
2394
|
+
declare function authorize(principal: Principal, action: Action): void;
|
|
2395
|
+
/** Thrown when a principal references a tenant other than its own → HTTP 403. */
|
|
2396
|
+
declare class TenantMismatchError extends Error {
|
|
2397
|
+
constructor();
|
|
2398
|
+
}
|
|
2399
|
+
/**
|
|
2400
|
+
* The tenant a principal's reads are pinned to. Callers MUST use this rather than any
|
|
2401
|
+
* caller-supplied tenant header/param, so a principal can never read another tenant by
|
|
2402
|
+
* spoofing the request — isolation is structural, not advisory.
|
|
2403
|
+
*/
|
|
2404
|
+
declare function scopeReads(principal: Principal): string;
|
|
2405
|
+
/** Throw {@link TenantMismatchError} if `requestedTenant` differs from the principal's tenant. */
|
|
2406
|
+
declare function assertSameTenant(principal: Principal, requestedTenant: string): void;
|
|
2407
|
+
|
|
2408
|
+
/**
|
|
2409
|
+
* Identity resolution (4.5): turn a presented bearer token into a {@link Principal},
|
|
2410
|
+
* or `undefined` (→ 401). Three modes, in precedence order:
|
|
2411
|
+
* 1. **RBAC** — a populated SQLite {@link CredentialStore} is the source of truth; the
|
|
2412
|
+
* token is sha256-hashed and looked up (tokens are never stored or compared raw).
|
|
2413
|
+
* 2. **Shared token** — a single configured token resolves to one implicit `admin`
|
|
2414
|
+
* (today's behavior; constant-time compare).
|
|
2415
|
+
* 3. **Open/loopback dev** — no token configured → implicit `admin`, unless `required`.
|
|
2416
|
+
*
|
|
2417
|
+
* The hash-and-store design means a DB leak never exposes a usable credential, and the
|
|
2418
|
+
* OIDC seam is just another {@link CredentialStore}/resolver behind this one function.
|
|
2419
|
+
*/
|
|
2420
|
+
|
|
2421
|
+
/** Stable sha256 hex of a token — the only form ever persisted or compared in the store. */
|
|
2422
|
+
declare function hashToken(token: string): string;
|
|
2423
|
+
/** Minimal DB surface the SQLite credential store needs (CartographyDB satisfies it structurally). */
|
|
2424
|
+
interface CredentialDb {
|
|
2425
|
+
countCredentials(): number;
|
|
2426
|
+
findCredentialByHash(tokenHash: string): CredentialRecord | undefined;
|
|
2427
|
+
}
|
|
2428
|
+
/** {@link CredentialStore} backed by `CartographyDB`'s `auth_credentials` table. */
|
|
2429
|
+
declare class SqliteCredentialStore implements CredentialStore {
|
|
2430
|
+
private readonly db;
|
|
2431
|
+
constructor(db: CredentialDb);
|
|
2432
|
+
count(): number;
|
|
2433
|
+
findByHash(tokenHash: string): CredentialRecord | undefined;
|
|
2434
|
+
}
|
|
2435
|
+
interface ResolveOptions {
|
|
2436
|
+
/** Populated → RBAC mode (source of truth). */
|
|
2437
|
+
store?: CredentialStore;
|
|
2438
|
+
/** Single shared token (one implicit admin) when no store credentials exist. */
|
|
2439
|
+
sharedToken?: string;
|
|
2440
|
+
/** Tenant assigned to implicit (shared/loopback) admin principals. */
|
|
2441
|
+
defaultTenant?: string;
|
|
2442
|
+
/** Reject unauthenticated requests even when neither store nor shared token is set. */
|
|
2443
|
+
required?: boolean;
|
|
2444
|
+
}
|
|
2445
|
+
/**
|
|
2446
|
+
* Resolve an already-parsed bearer token to a {@link Principal}, or `undefined` (→ 401).
|
|
2447
|
+
* `presentedToken` is the value from `bearerToken(authorizationHeader)` (may be undefined).
|
|
2448
|
+
*/
|
|
2449
|
+
declare function resolvePrincipal(presentedToken: string | undefined, opts: ResolveOptions): Principal | undefined;
|
|
2450
|
+
|
|
2230
2451
|
/**
|
|
2231
2452
|
* Shared entry logic for the read-only API server (4.2), used by both the dedicated
|
|
2232
2453
|
* `cartography-api` binary and the `api` CLI sub-command. Mirrors `src/mcp/start.ts`:
|
|
@@ -2247,6 +2468,8 @@ interface StartApiOptions {
|
|
|
2247
2468
|
graphql?: boolean;
|
|
2248
2469
|
/** Default tenant served when a request names none. */
|
|
2249
2470
|
tenant?: string;
|
|
2471
|
+
/** Reject unauthenticated requests even on loopback (RBAC `required` mode). */
|
|
2472
|
+
authRequired?: boolean;
|
|
2250
2473
|
log?: (msg: string) => void;
|
|
2251
2474
|
}
|
|
2252
2475
|
interface ParsedApiArgs extends StartApiOptions {
|
|
@@ -3750,6 +3973,42 @@ declare function sanitizeUntrusted(text: string): string;
|
|
|
3750
3973
|
/** Recursively apply `sanitizeUntrusted` to every string in an arbitrary value. */
|
|
3751
3974
|
declare function sanitizeValue(value: unknown): unknown;
|
|
3752
3975
|
|
|
3976
|
+
/**
|
|
3977
|
+
* Backstage catalog entity mapping (4.6).
|
|
3978
|
+
*
|
|
3979
|
+
* A dependency-free, transport-agnostic mapper: `toBackstageEntities` turns the
|
|
3980
|
+
* discovered topology into plain typed Backstage entity objects, and `entitiesToYaml`
|
|
3981
|
+
* serializes them to the multi-doc `catalog-info.yaml` format. It NEVER imports
|
|
3982
|
+
* `@backstage/*` — Backstage stays an optional adapter, never a core dependency
|
|
3983
|
+
* (ROADMAP locked constraints). The legacy `exportBackstageYAML` is re-expressed over
|
|
3984
|
+
* this mapper and stays byte-identical (snapshot-guarded). The same typed entities are
|
|
3985
|
+
* served live over the API (`GET /v1/backstage/catalog`) so a Backstage instance can
|
|
3986
|
+
* consume the topology as a continuously-refreshed data source.
|
|
3987
|
+
*/
|
|
3988
|
+
|
|
3989
|
+
interface BackstageEntity {
|
|
3990
|
+
apiVersion: 'backstage.io/v1alpha1';
|
|
3991
|
+
kind: 'Component' | 'API' | 'Resource';
|
|
3992
|
+
metadata: {
|
|
3993
|
+
name: string;
|
|
3994
|
+
annotations: Record<string, string>;
|
|
3995
|
+
};
|
|
3996
|
+
spec: {
|
|
3997
|
+
type: string;
|
|
3998
|
+
lifecycle: string;
|
|
3999
|
+
owner: string;
|
|
4000
|
+
dependsOn?: string[];
|
|
4001
|
+
};
|
|
4002
|
+
}
|
|
4003
|
+
interface BackstageMapOptions {
|
|
4004
|
+
/** Default owner when a node carries none (the org/tenant). */
|
|
4005
|
+
org?: string;
|
|
4006
|
+
}
|
|
4007
|
+
/** Map discovered nodes/edges to typed Backstage catalog entities. Pure, deterministic. */
|
|
4008
|
+
declare function toBackstageEntities(nodes: NodeRow[], edges: EdgeRow[], opts?: BackstageMapOptions): BackstageEntity[];
|
|
4009
|
+
/** Serialize entities to the multi-doc `catalog-info.yaml` string (byte-identical to the legacy exporter). */
|
|
4010
|
+
declare function entitiesToYaml(entities: BackstageEntity[]): string;
|
|
4011
|
+
|
|
3753
4012
|
/**
|
|
3754
4013
|
* Hex Grid Engine — flat-top axial coordinate system.
|
|
3755
4014
|
* Reference: https://www.redblobgames.com/grids/hexagons/
|
|
@@ -3869,4 +4128,4 @@ declare function logInfo(message: string, context?: Record<string, unknown>): vo
|
|
|
3869
4128
|
declare function logWarn(message: string, context?: Record<string, unknown>): void;
|
|
3870
4129
|
declare function logError(message: string, context?: Record<string, unknown>): void;
|
|
3871
4130
|
|
|
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 };
|
|
4131
|
+
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_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 Principal, PrincipalSchema, type ProviderFactory, type ProviderName, ProviderRegistry, type PushItem, type PushOptions, type PushResult, type QueryBackend, RELATION_TO_DIRECTION, ROLES, type ResolveContext, type ResolveOptions, type Role, RoleSchema, 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, 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 };
|