@databricks/appkit 0.38.0 → 0.38.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE.md +1 -2
- package/dist/appkit/package.js +1 -1
- package/dist/cache/index.d.ts +27 -5
- package/dist/cache/index.d.ts.map +1 -1
- package/dist/cache/index.js +87 -14
- package/dist/cache/index.js.map +1 -1
- package/dist/plugin/interceptors/cache.js +13 -1
- package/dist/plugin/interceptors/cache.js.map +1 -1
- package/dist/stream/stream-manager.d.ts.map +1 -1
- package/dist/stream/stream-manager.js +3 -3
- package/dist/stream/stream-manager.js.map +1 -1
- package/package.json +1 -1
- package/sbom.cdx.json +1 -1
package/NOTICE.md
CHANGED
|
@@ -49,10 +49,9 @@ This Software contains code from the following open source projects:
|
|
|
49
49
|
| [@radix-ui/react-toggle](https://www.npmjs.com/package/@radix-ui/react-toggle) | 1.1.10 | MIT | https://radix-ui.com/primitives |
|
|
50
50
|
| [@radix-ui/react-toggle-group](https://www.npmjs.com/package/@radix-ui/react-toggle-group) | 1.1.11 | MIT | https://radix-ui.com/primitives |
|
|
51
51
|
| [@radix-ui/react-tooltip](https://www.npmjs.com/package/@radix-ui/react-tooltip) | 1.2.8 | MIT | https://radix-ui.com/primitives |
|
|
52
|
+
| [@standard-schema/spec](https://www.npmjs.com/package/@standard-schema/spec) | 1.1.0 | MIT | https://standardschema.dev |
|
|
52
53
|
| [@tanstack/react-table](https://www.npmjs.com/package/@tanstack/react-table) | 8.21.3 | MIT | https://tanstack.com/table |
|
|
53
54
|
| [@types/semver](https://www.npmjs.com/package/@types/semver) | 7.7.1 | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/semver |
|
|
54
|
-
| [ajv](https://www.npmjs.com/package/ajv) | 6.12.6, 8.17.1 | MIT | https://ajv.js.org |
|
|
55
|
-
| [ajv-formats](https://www.npmjs.com/package/ajv-formats) | 2.1.1, 3.0.1 | MIT | https://github.com/ajv-validator/ajv-formats#readme |
|
|
56
55
|
| [apache-arrow](https://www.npmjs.com/package/apache-arrow) | 21.1.0 | Apache-2.0 | https://arrow.apache.org/js/ |
|
|
57
56
|
| [class-variance-authority](https://www.npmjs.com/package/class-variance-authority) | 0.7.1 | Apache-2.0 | https://github.com/joe-bell/cva#readme |
|
|
58
57
|
| [clsx](https://www.npmjs.com/package/clsx) | 2.1.1 | MIT | https://github.com/lukeed/clsx#readme |
|
package/dist/appkit/package.js
CHANGED
package/dist/cache/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ import "../shared/src/index.js";
|
|
|
18
18
|
*/
|
|
19
19
|
declare class CacheManager {
|
|
20
20
|
private static readonly MIN_CLEANUP_INTERVAL_MS;
|
|
21
|
+
private static readonly ABORT_GRACE_PERIOD_MS;
|
|
21
22
|
private readonly name;
|
|
22
23
|
private static instance;
|
|
23
24
|
private static initPromise;
|
|
@@ -58,16 +59,37 @@ declare class CacheManager {
|
|
|
58
59
|
*/
|
|
59
60
|
private static create;
|
|
60
61
|
/**
|
|
61
|
-
* Get or execute a function and cache the result
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
62
|
+
* Get or execute a function and cache the result.
|
|
63
|
+
*
|
|
64
|
+
* Multiple concurrent callers with the same `cacheKey` are deduplicated
|
|
65
|
+
* onto a single in-flight execution. Each caller may pass its own
|
|
66
|
+
* `callerSignal`; the underlying `fn()` is run with a shared, internally
|
|
67
|
+
* managed `AbortSignal` that aborts only when *all* callers have
|
|
68
|
+
* abandoned the request (reference counted). This decouples a single
|
|
69
|
+
* caller's cancellation (e.g. React StrictMode unmount) from the shared
|
|
70
|
+
* result, so other still-connected callers receive the cached value
|
|
71
|
+
* normally.
|
|
72
|
+
*
|
|
73
|
+
* @param key - Cache key parts
|
|
74
|
+
* @param fn - Function to execute. Receives the cache-owned shared signal;
|
|
75
|
+
* pass it through to the underlying I/O so the work is cancelled when
|
|
76
|
+
* no caller is left waiting.
|
|
77
|
+
* @param userKey - User key for cache namespacing
|
|
65
78
|
* @param options - Options for the cache
|
|
66
79
|
* @returns Promise of the result
|
|
67
80
|
*/
|
|
68
|
-
getOrExecute<T>(key: (string | number | object)[], fn: () => Promise<T>, userKey: string, options?: {
|
|
81
|
+
getOrExecute<T>(key: (string | number | object)[], fn: (sharedSignal?: AbortSignal) => Promise<T>, userKey: string, options?: {
|
|
69
82
|
ttl?: number;
|
|
83
|
+
callerSignal?: AbortSignal;
|
|
70
84
|
}): Promise<T>;
|
|
85
|
+
/**
|
|
86
|
+
* Wait on an in-flight entry, racing the underlying promise against the
|
|
87
|
+
* caller's abort signal. When the caller aborts, the entry's refCount is
|
|
88
|
+
* decremented; if it hits zero the shared controller is aborted so the
|
|
89
|
+
* underlying `fn()` can stop. Other callers continue to await the same
|
|
90
|
+
* entry and receive the result when it arrives.
|
|
91
|
+
*/
|
|
92
|
+
private _waitWithRefCount;
|
|
71
93
|
/**
|
|
72
94
|
* Get a cached value
|
|
73
95
|
* @param key - Cache key
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/cache/index.ts"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/cache/index.ts"],"mappings":";;;;;;;AAmDA;;;;;;;;;;;cAAa,YAAA;EAAA,wBACa,uBAAA;EAAA,wBACA,qBAAA;EAAA,iBACP,IAAA;EAAA,eACF,QAAA;EAAA,eACA,WAAA;EAAA,QAEP,OAAA;EAAA,QACA,MAAA;EAAA,QACA,gBAAA;EAAA,QACA,iBAAA;EAAA,QACA,kBAAA;EAAA,QAEA,SAAA;EAAA,QACA,gBAAA;EAAA,QAKD,WAAA,CAAA;EAlBiB;;;;;;EAAA,OA+CjB,eAAA,CAAA,GAAmB,YAAA;EAvClB;;;;;;;EAAA,OAyDK,WAAA,CACX,UAAA,GAAa,OAAA,CAAQ,WAAA,IACpB,OAAA,CAAQ,YAAA;EAFE;;;;;;;;;;;;EAAA,eA+BQ,MAAA;EAyEyB;;;;;;;;;;;;;;;;;;;;EAFxC,YAAA,GAAA,CACJ,GAAA,gCACA,EAAA,GAAK,YAAA,GAAe,WAAA,KAAgB,OAAA,CAAQ,CAAA,GAC5C,OAAA,UACA,OAAA;IAAY,GAAA;IAAc,YAAA,GAAe,WAAA;EAAA,IACxC,OAAA,CAAQ,CAAA;EAkRR;;;;;;;EAAA,QA7HK,iBAAA;EA6JgB;;;;;EAhGlB,GAAA,GAAA,CAAO,GAAA,WAAc,OAAA,CAAQ,CAAA;EA4H7B;;;;;;;EAAA,QA3GQ,QAAA;;UAYN,YAAA;;;;;;;;EA+BF,GAAA,GAAA,CACJ,GAAA,UACA,KAAA,EAAO,CAAA,EACP,OAAA;IAAY,GAAA;EAAA,IACX,OAAA;;;;;;EAaG,MAAA,CAAO,GAAA,WAAc,OAAA;;EAMrB,KAAA,CAAA,GAAS,OAAA;;;;;;EAaT,GAAA,CAAI,GAAA,WAAc,OAAA;;;;;;;EAaxB,WAAA,CAAY,KAAA,gCAAqC,OAAA;;EAO3C,KAAA,CAAA,GAAS,OAAA;;;;;EAQT,gBAAA,CAAA,GAAoB,OAAA;AAAA"}
|
package/dist/cache/index.js
CHANGED
|
@@ -16,6 +16,10 @@ import { ApiError, WorkspaceClient } from "@databricks/sdk-experimental";
|
|
|
16
16
|
|
|
17
17
|
//#region src/cache/index.ts
|
|
18
18
|
const logger = createLogger("cache");
|
|
19
|
+
function createAbortError(signal) {
|
|
20
|
+
if (signal.reason !== void 0) return signal.reason;
|
|
21
|
+
return new DOMException("The operation was aborted.", "AbortError");
|
|
22
|
+
}
|
|
19
23
|
/**
|
|
20
24
|
* Cache manager class to handle cache operations.
|
|
21
25
|
* Can be used with in-memory storage or persistent storage (Lakebase).
|
|
@@ -32,6 +36,7 @@ const logger = createLogger("cache");
|
|
|
32
36
|
*/
|
|
33
37
|
var CacheManager = class CacheManager {
|
|
34
38
|
static MIN_CLEANUP_INTERVAL_MS = 6e4;
|
|
39
|
+
static ABORT_GRACE_PERIOD_MS = 100;
|
|
35
40
|
name = "cache-manager";
|
|
36
41
|
static instance = null;
|
|
37
42
|
static initPromise = null;
|
|
@@ -129,15 +134,29 @@ var CacheManager = class CacheManager {
|
|
|
129
134
|
return new CacheManager(new InMemoryStorage(config), config);
|
|
130
135
|
}
|
|
131
136
|
/**
|
|
132
|
-
* Get or execute a function and cache the result
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
137
|
+
* Get or execute a function and cache the result.
|
|
138
|
+
*
|
|
139
|
+
* Multiple concurrent callers with the same `cacheKey` are deduplicated
|
|
140
|
+
* onto a single in-flight execution. Each caller may pass its own
|
|
141
|
+
* `callerSignal`; the underlying `fn()` is run with a shared, internally
|
|
142
|
+
* managed `AbortSignal` that aborts only when *all* callers have
|
|
143
|
+
* abandoned the request (reference counted). This decouples a single
|
|
144
|
+
* caller's cancellation (e.g. React StrictMode unmount) from the shared
|
|
145
|
+
* result, so other still-connected callers receive the cached value
|
|
146
|
+
* normally.
|
|
147
|
+
*
|
|
148
|
+
* @param key - Cache key parts
|
|
149
|
+
* @param fn - Function to execute. Receives the cache-owned shared signal;
|
|
150
|
+
* pass it through to the underlying I/O so the work is cancelled when
|
|
151
|
+
* no caller is left waiting.
|
|
152
|
+
* @param userKey - User key for cache namespacing
|
|
136
153
|
* @param options - Options for the cache
|
|
137
154
|
* @returns Promise of the result
|
|
138
155
|
*/
|
|
139
156
|
async getOrExecute(key, fn, userKey, options) {
|
|
140
|
-
if (!this.config.enabled) return fn();
|
|
157
|
+
if (!this.config.enabled) return fn(options?.callerSignal);
|
|
158
|
+
const callerSignal = options?.callerSignal;
|
|
159
|
+
if (callerSignal?.aborted) throw createAbortError(callerSignal);
|
|
141
160
|
const cacheKey = this.generateKey(key, userKey);
|
|
142
161
|
return this.telemetry.startActiveSpan("cache.getOrExecute", { attributes: {
|
|
143
162
|
"cache.key": cacheKey,
|
|
@@ -156,12 +175,16 @@ var CacheManager = class CacheManager {
|
|
|
156
175
|
});
|
|
157
176
|
return cached.value;
|
|
158
177
|
}
|
|
159
|
-
const
|
|
160
|
-
if (
|
|
178
|
+
const existing = this.inFlightRequests.get(cacheKey);
|
|
179
|
+
if (existing && !existing.sharedController.signal.aborted) {
|
|
180
|
+
existing.refCount++;
|
|
181
|
+
if (existing.abortTimer) {
|
|
182
|
+
clearTimeout(existing.abortTimer);
|
|
183
|
+
existing.abortTimer = void 0;
|
|
184
|
+
}
|
|
161
185
|
span.setAttribute("cache.hit", true);
|
|
162
186
|
span.setAttribute("cache.deduplication", true);
|
|
163
187
|
span.addEvent("cache.deduplication_used", { "cache.key": cacheKey });
|
|
164
|
-
span.setStatus({ code: SpanStatusCode.OK });
|
|
165
188
|
this.telemetryMetrics.cacheHitCount.add(1, {
|
|
166
189
|
"cache.key": cacheKey,
|
|
167
190
|
"cache.deduplication": "true"
|
|
@@ -171,8 +194,7 @@ var CacheManager = class CacheManager {
|
|
|
171
194
|
cache_key: cacheKey,
|
|
172
195
|
cache_deduplication: true
|
|
173
196
|
});
|
|
174
|
-
|
|
175
|
-
return inFlight;
|
|
197
|
+
return await this._waitWithRefCount(existing, callerSignal);
|
|
176
198
|
}
|
|
177
199
|
span.setAttribute("cache.hit", false);
|
|
178
200
|
span.addEvent("cache.miss", { "cache.key": cacheKey });
|
|
@@ -181,7 +203,13 @@ var CacheManager = class CacheManager {
|
|
|
181
203
|
cache_hit: false,
|
|
182
204
|
cache_key: cacheKey
|
|
183
205
|
});
|
|
184
|
-
const
|
|
206
|
+
const sharedController = new AbortController();
|
|
207
|
+
const entry = {
|
|
208
|
+
promise: void 0,
|
|
209
|
+
refCount: 1,
|
|
210
|
+
sharedController
|
|
211
|
+
};
|
|
212
|
+
entry.promise = fn(sharedController.signal).then(async (result) => {
|
|
185
213
|
await this.set(cacheKey, result, options);
|
|
186
214
|
span.addEvent("cache.value_stored", {
|
|
187
215
|
"cache.key": cacheKey,
|
|
@@ -191,13 +219,15 @@ var CacheManager = class CacheManager {
|
|
|
191
219
|
}).catch((error) => {
|
|
192
220
|
span.recordException(error);
|
|
193
221
|
span.setStatus({ code: SpanStatusCode.ERROR });
|
|
222
|
+
if (sharedController.signal.aborted) throw error;
|
|
194
223
|
if (error instanceof AppKitError || error instanceof ApiError) throw error;
|
|
195
224
|
throw ExecutionError.statementFailed(error instanceof Error ? error.message : String(error));
|
|
196
225
|
}).finally(() => {
|
|
197
|
-
this.inFlightRequests.delete(cacheKey);
|
|
226
|
+
if (this.inFlightRequests.get(cacheKey) === entry) this.inFlightRequests.delete(cacheKey);
|
|
198
227
|
});
|
|
199
|
-
|
|
200
|
-
|
|
228
|
+
entry.promise.catch(() => {});
|
|
229
|
+
this.inFlightRequests.set(cacheKey, entry);
|
|
230
|
+
const result = await this._waitWithRefCount(entry, callerSignal);
|
|
201
231
|
span.setStatus({ code: SpanStatusCode.OK });
|
|
202
232
|
return result;
|
|
203
233
|
} catch (error) {
|
|
@@ -213,6 +243,48 @@ var CacheManager = class CacheManager {
|
|
|
213
243
|
});
|
|
214
244
|
}
|
|
215
245
|
/**
|
|
246
|
+
* Wait on an in-flight entry, racing the underlying promise against the
|
|
247
|
+
* caller's abort signal. When the caller aborts, the entry's refCount is
|
|
248
|
+
* decremented; if it hits zero the shared controller is aborted so the
|
|
249
|
+
* underlying `fn()` can stop. Other callers continue to await the same
|
|
250
|
+
* entry and receive the result when it arrives.
|
|
251
|
+
*/
|
|
252
|
+
_waitWithRefCount(entry, callerSignal) {
|
|
253
|
+
if (!callerSignal) return entry.promise;
|
|
254
|
+
return new Promise((resolve, reject) => {
|
|
255
|
+
let settled = false;
|
|
256
|
+
const release = () => {
|
|
257
|
+
if (entry.refCount > 0) entry.refCount--;
|
|
258
|
+
if (entry.refCount <= 0 && !entry.sharedController.signal.aborted) entry.abortTimer = setTimeout(() => {
|
|
259
|
+
if (entry.refCount <= 0 && !entry.sharedController.signal.aborted) entry.sharedController.abort(callerSignal.reason ?? "all cache callers aborted");
|
|
260
|
+
}, CacheManager.ABORT_GRACE_PERIOD_MS);
|
|
261
|
+
};
|
|
262
|
+
const onAbort = () => {
|
|
263
|
+
if (settled) return;
|
|
264
|
+
settled = true;
|
|
265
|
+
callerSignal.removeEventListener("abort", onAbort);
|
|
266
|
+
release();
|
|
267
|
+
reject(createAbortError(callerSignal));
|
|
268
|
+
};
|
|
269
|
+
if (callerSignal.aborted) {
|
|
270
|
+
onAbort();
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
273
|
+
callerSignal.addEventListener("abort", onAbort, { once: true });
|
|
274
|
+
entry.promise.then((value) => {
|
|
275
|
+
if (settled) return;
|
|
276
|
+
settled = true;
|
|
277
|
+
callerSignal.removeEventListener("abort", onAbort);
|
|
278
|
+
resolve(value);
|
|
279
|
+
}, (error) => {
|
|
280
|
+
if (settled) return;
|
|
281
|
+
settled = true;
|
|
282
|
+
callerSignal.removeEventListener("abort", onAbort);
|
|
283
|
+
reject(error);
|
|
284
|
+
});
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
216
288
|
* Get a cached value
|
|
217
289
|
* @param key - Cache key
|
|
218
290
|
* @returns Promise of the value or null if not found or expired
|
|
@@ -282,6 +354,7 @@ var CacheManager = class CacheManager {
|
|
|
282
354
|
/** Clear the cache */
|
|
283
355
|
async clear() {
|
|
284
356
|
await this.storage.clear();
|
|
357
|
+
for (const entry of this.inFlightRequests.values()) if (entry.abortTimer) clearTimeout(entry.abortTimer);
|
|
285
358
|
this.inFlightRequests.clear();
|
|
286
359
|
}
|
|
287
360
|
/**
|
package/dist/cache/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/cache/index.ts"],"sourcesContent":["import { createHash } from \"node:crypto\";\nimport { ApiError, WorkspaceClient } from \"@databricks/sdk-experimental\";\nimport type { CacheConfig, CacheEntry, CacheStorage } from \"shared\";\nimport { createLakebasePool } from \"../connectors/lakebase\";\nimport { AppKitError, ExecutionError, InitializationError } from \"../errors\";\nimport { createLogger } from \"../logging/logger\";\nimport type { Counter, TelemetryProvider } from \"../telemetry\";\nimport { SpanStatusCode, TelemetryManager } from \"../telemetry\";\nimport { deepMerge } from \"../utils\";\nimport { cacheDefaults } from \"./defaults\";\nimport { InMemoryStorage, PersistentStorage } from \"./storage\";\n\nconst logger = createLogger(\"cache\");\n\n/**\n * Cache manager class to handle cache operations.\n * Can be used with in-memory storage or persistent storage (Lakebase).\n *\n * The cache is automatically initialized by AppKit. Use `getInstanceSync()` to access\n * the singleton instance after initialization.\n *\n * @internal\n * @example\n * ```typescript\n * const cache = CacheManager.getInstanceSync();\n * const result = await cache.getOrExecute([\"users\", userId], () => fetchUser(userId), userKey);\n * ```\n */\nexport class CacheManager {\n private static readonly MIN_CLEANUP_INTERVAL_MS = 60_000;\n private readonly name: string = \"cache-manager\";\n private static instance: CacheManager | null = null;\n private static initPromise: Promise<CacheManager> | null = null;\n\n private storage: CacheStorage;\n private config: CacheConfig;\n private inFlightRequests: Map<string, Promise<unknown>>;\n private cleanupInProgress: boolean;\n private lastCleanupAttempt: number;\n\n private telemetry: TelemetryProvider;\n private telemetryMetrics: {\n cacheHitCount: Counter;\n cacheMissCount: Counter;\n };\n\n private constructor(storage: CacheStorage, config: CacheConfig) {\n this.storage = storage;\n this.config = config;\n this.inFlightRequests = new Map();\n this.cleanupInProgress = false;\n this.lastCleanupAttempt = 0;\n\n this.telemetry = TelemetryManager.getProvider(\n this.name,\n this.config.telemetry,\n );\n this.telemetryMetrics = {\n cacheHitCount: this.telemetry.getMeter().createCounter(\"cache.hit\", {\n description: \"Total number of cache hits\",\n unit: \"1\",\n }),\n cacheMissCount: this.telemetry.getMeter().createCounter(\"cache.miss\", {\n description: \"Total number of cache misses\",\n unit: \"1\",\n }),\n };\n }\n\n /**\n * Get the singleton instance of the cache manager (sync version).\n *\n * Throws if not initialized - ensure AppKit.create() has completed first.\n * @returns CacheManager instance\n */\n static getInstanceSync(): CacheManager {\n if (!CacheManager.instance) {\n throw InitializationError.notInitialized(\n \"CacheManager\",\n \"Ensure AppKit.create() has completed before accessing the cache\",\n );\n }\n\n return CacheManager.instance;\n }\n\n /**\n * Initialize and get the singleton instance of the cache manager.\n * Called internally by AppKit - prefer `getInstanceSync()` for plugin access.\n * @param userConfig - User configuration for the cache manager\n * @returns CacheManager instance\n * @internal\n */\n static async getInstance(\n userConfig?: Partial<CacheConfig>,\n ): Promise<CacheManager> {\n if (CacheManager.instance) {\n return CacheManager.instance;\n }\n\n if (!CacheManager.initPromise) {\n CacheManager.initPromise = CacheManager.create(userConfig).then(\n (instance) => {\n CacheManager.instance = instance;\n return instance;\n },\n );\n }\n\n return CacheManager.initPromise;\n }\n\n /**\n * Create a new cache manager instance\n *\n * Storage selection logic:\n * 1. If `storage` provided and healthy → use provided storage\n * 2. If `storage` provided but unhealthy → fallback to InMemory (or disable if strictPersistence)\n * 3. If no `storage` provided and Lakebase available → use Lakebase\n * 4. If no `storage` provided and Lakebase unavailable → fallback to InMemory (or disable if strictPersistence)\n *\n * @param userConfig - User configuration for the cache manager\n * @returns CacheManager instance\n */\n private static async create(\n userConfig?: Partial<CacheConfig>,\n ): Promise<CacheManager> {\n const config = deepMerge(cacheDefaults, userConfig);\n\n if (config.storage) {\n const isHealthy = await config.storage.healthCheck();\n if (isHealthy) {\n return new CacheManager(config.storage, config);\n }\n\n if (config.strictPersistence) {\n const disabledConfig = { ...config, enabled: false };\n return new CacheManager(\n new InMemoryStorage(disabledConfig),\n disabledConfig,\n );\n }\n\n return new CacheManager(new InMemoryStorage(config), config);\n }\n\n // try to use lakebase storage\n try {\n const workspaceClient = new WorkspaceClient({});\n const pool = createLakebasePool({ workspaceClient });\n const persistentStorage = new PersistentStorage(config, pool);\n\n const isHealthy = await persistentStorage.healthCheck();\n if (isHealthy) {\n await persistentStorage.initialize();\n return new CacheManager(persistentStorage, config);\n }\n\n // Health check failed, close the pool and fallback\n await pool.end();\n } catch {\n // lakebase unavailable, continue with in-memory storage\n }\n\n if (config.strictPersistence) {\n const disabledConfig = { ...config, enabled: false };\n return new CacheManager(\n new InMemoryStorage(disabledConfig),\n disabledConfig,\n );\n }\n\n return new CacheManager(new InMemoryStorage(config), config);\n }\n\n /**\n * Get or execute a function and cache the result\n * @param key - Cache key\n * @param fn - Function to execute\n * @param userKey - User key\n * @param options - Options for the cache\n * @returns Promise of the result\n */\n async getOrExecute<T>(\n key: (string | number | object)[],\n fn: () => Promise<T>,\n userKey: string,\n options?: { ttl?: number },\n ): Promise<T> {\n if (!this.config.enabled) return fn();\n\n const cacheKey = this.generateKey(key, userKey);\n\n return this.telemetry.startActiveSpan(\n \"cache.getOrExecute\",\n {\n attributes: {\n \"cache.key\": cacheKey,\n \"cache.enabled\": this.config.enabled,\n \"cache.persistent\": this.storage.isPersistent(),\n },\n },\n async (span) => {\n try {\n const cached = await this.getValid<T>(cacheKey);\n if (cached !== null) {\n span.setAttribute(\"cache.hit\", true);\n span.setStatus({ code: SpanStatusCode.OK });\n this.telemetryMetrics.cacheHitCount.add(1, {\n \"cache.key\": cacheKey,\n });\n\n logger.event()?.setExecution({\n cache_hit: true,\n cache_key: cacheKey,\n });\n\n return cached.value;\n }\n\n // check if the value is being processed by another request\n const inFlight = this.inFlightRequests.get(cacheKey);\n if (inFlight) {\n span.setAttribute(\"cache.hit\", true);\n span.setAttribute(\"cache.deduplication\", true);\n span.addEvent(\"cache.deduplication_used\", {\n \"cache.key\": cacheKey,\n });\n span.setStatus({ code: SpanStatusCode.OK });\n this.telemetryMetrics.cacheHitCount.add(1, {\n \"cache.key\": cacheKey,\n \"cache.deduplication\": \"true\",\n });\n\n logger.event()?.setExecution({\n cache_hit: true,\n cache_key: cacheKey,\n cache_deduplication: true,\n });\n\n span.end();\n return inFlight as Promise<T>;\n }\n\n // cache miss - execute function\n span.setAttribute(\"cache.hit\", false);\n span.addEvent(\"cache.miss\", { \"cache.key\": cacheKey });\n this.telemetryMetrics.cacheMissCount.add(1, {\n \"cache.key\": cacheKey,\n });\n\n logger.event()?.setExecution({\n cache_hit: false,\n cache_key: cacheKey,\n });\n\n const promise = fn()\n .then(async (result) => {\n await this.set(cacheKey, result, options);\n span.addEvent(\"cache.value_stored\", {\n \"cache.key\": cacheKey,\n \"cache.ttl\": options?.ttl ?? this.config.ttl ?? 3600,\n });\n return result;\n })\n .catch((error) => {\n span.recordException(error);\n span.setStatus({ code: SpanStatusCode.ERROR });\n // Preserve AppKit errors and Databricks API errors (with status codes)\n // so route handlers can map them to proper HTTP responses.\n if (error instanceof AppKitError || error instanceof ApiError) {\n throw error;\n }\n throw ExecutionError.statementFailed(\n error instanceof Error ? error.message : String(error),\n );\n })\n .finally(() => {\n this.inFlightRequests.delete(cacheKey);\n });\n\n this.inFlightRequests.set(cacheKey, promise);\n\n const result = await promise;\n span.setStatus({ code: SpanStatusCode.OK });\n return result;\n } catch (error) {\n span.recordException(error as Error);\n span.setStatus({ code: SpanStatusCode.ERROR });\n throw error;\n } finally {\n span.end();\n }\n },\n { name: this.name, includePrefix: true },\n );\n }\n\n /**\n * Get a cached value\n * @param key - Cache key\n * @returns Promise of the value or null if not found or expired\n */\n async get<T>(key: string): Promise<T | null> {\n if (!this.config.enabled) return null;\n\n // probabilistic cleanup trigger\n this.maybeCleanup();\n\n const entry = await this.getValid<T>(key);\n return entry?.value ?? null;\n }\n\n /**\n * Get a cached entry only if it has not expired.\n * Returns null on miss or expired (and deletes the expired entry).\n *\n * Storage implementations return entries unconditionally — expiry handling\n * lives at the CacheManager layer.\n */\n private async getValid<T>(key: string): Promise<CacheEntry<T> | null> {\n const entry = await this.storage.get<T>(key);\n if (!entry) return null;\n\n if (Date.now() > entry.expiry) {\n await this.storage.delete(key);\n return null;\n }\n return entry;\n }\n\n /** Probabilistically trigger cleanup of expired entries (fire-and-forget) */\n private maybeCleanup(): void {\n if (this.cleanupInProgress) return;\n if (!this.storage.isPersistent()) return;\n const now = Date.now();\n if (now - this.lastCleanupAttempt < CacheManager.MIN_CLEANUP_INTERVAL_MS)\n return;\n\n const probability = this.config.cleanupProbability ?? 0.01;\n\n if (Math.random() > probability) return;\n\n this.lastCleanupAttempt = now;\n\n this.cleanupInProgress = true;\n (this.storage as PersistentStorage)\n .cleanupExpired()\n .catch((error) => {\n logger.debug(\"Error cleaning up expired entries: %O\", error);\n })\n .finally(() => {\n this.cleanupInProgress = false;\n });\n }\n\n /**\n * Set a value in the cache\n * @param key - Cache key\n * @param value - Value to set\n * @param options - Options for the cache\n * @returns Promise of the result\n */\n async set<T>(\n key: string,\n value: T,\n options?: { ttl?: number },\n ): Promise<void> {\n if (!this.config.enabled) return;\n\n const ttl = options?.ttl ?? this.config.ttl ?? 3600;\n const expiryTime = Date.now() + ttl * 1000;\n await this.storage.set(key, { value, expiry: expiryTime });\n }\n\n /**\n * Delete a value from the cache\n * @param key - Cache key\n * @returns Promise of the result\n */\n async delete(key: string): Promise<void> {\n if (!this.config.enabled) return;\n await this.storage.delete(key);\n }\n\n /** Clear the cache */\n async clear(): Promise<void> {\n await this.storage.clear();\n this.inFlightRequests.clear();\n }\n\n /**\n * Check if a value exists in the cache\n * @param key - Cache key\n * @returns Promise of true if the value exists, false otherwise\n */\n async has(key: string): Promise<boolean> {\n if (!this.config.enabled) return false;\n\n const entry = await this.getValid(key);\n return entry !== null;\n }\n\n /**\n * Generate a cache key\n * @param parts - Parts of the key\n * @param userKey - User key\n * @returns Cache key\n */\n generateKey(parts: (string | number | object)[], userKey: string): string {\n const allParts = [userKey, ...parts];\n const serialized = JSON.stringify(allParts);\n return createHash(\"sha256\").update(serialized).digest(\"hex\");\n }\n\n /** Close the cache */\n async close(): Promise<void> {\n await this.storage.close();\n }\n\n /**\n * Check if the storage is healthy\n * @returns Promise of true if the storage is healthy, false otherwise\n */\n async isStorageHealthy(): Promise<boolean> {\n return this.storage.healthCheck();\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAYA,MAAM,SAAS,aAAa,QAAQ;;;;;;;;;;;;;;;AAgBpC,IAAa,eAAb,MAAa,aAAa;CACxB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ACvC,MAAI,CAAC,KAAK,OAAO,QAAS,QAAO;AAGjC,SADc,MAAM,KAAK,SAAS,IAAI,KACrB;;;;;;;;CASnB,YAAY,OAAqC,SAAyB;EACxE,MAAM,WAAW,CAAC,SAAS,GAAG,MAAM;EACpC,MAAM,aAAa,KAAK,UAAU,SAAS;AAC3C,SAAO,WAAW,SAAS,CAAC,OAAO,WAAW,CAAC,OAAO,MAAM;;;CAI9D,MAAM,QAAuB;AAC3B,QAAM,KAAK,QAAQ,OAAO;;;;;;CAO5B,MAAM,mBAAqC;AACzC,SAAO,KAAK,QAAQ,aAAa"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/cache/index.ts"],"sourcesContent":["import { createHash } from \"node:crypto\";\nimport { ApiError, WorkspaceClient } from \"@databricks/sdk-experimental\";\nimport type { CacheConfig, CacheEntry, CacheStorage } from \"shared\";\nimport { createLakebasePool } from \"../connectors/lakebase\";\nimport { AppKitError, ExecutionError, InitializationError } from \"../errors\";\nimport { createLogger } from \"../logging/logger\";\nimport type { Counter, TelemetryProvider } from \"../telemetry\";\nimport { SpanStatusCode, TelemetryManager } from \"../telemetry\";\nimport { deepMerge } from \"../utils\";\nimport { cacheDefaults } from \"./defaults\";\nimport { InMemoryStorage, PersistentStorage } from \"./storage\";\n\nconst logger = createLogger(\"cache\");\n\n/**\n * Reference-counted in-flight cache execution entry.\n *\n * `sharedController` decouples the cached `fn()` from any single caller's\n * abort signal. Callers join an in-flight entry by incrementing `refCount`;\n * when a caller aborts, refCount is decremented. The shared controller is\n * aborted only when refCount drops to 0 — i.e. all callers have abandoned\n * the request. This prevents one caller's cancellation (e.g. React\n * StrictMode unmount) from poisoning the in-flight result for other still-\n * connected awaiters.\n */\ninterface InFlightEntry<T> {\n promise: Promise<T>;\n refCount: number;\n sharedController: AbortController;\n abortTimer?: ReturnType<typeof setTimeout>;\n}\n\nfunction createAbortError(signal: AbortSignal): unknown {\n if (signal.reason !== undefined) return signal.reason;\n return new DOMException(\"The operation was aborted.\", \"AbortError\");\n}\n\n/**\n * Cache manager class to handle cache operations.\n * Can be used with in-memory storage or persistent storage (Lakebase).\n *\n * The cache is automatically initialized by AppKit. Use `getInstanceSync()` to access\n * the singleton instance after initialization.\n *\n * @internal\n * @example\n * ```typescript\n * const cache = CacheManager.getInstanceSync();\n * const result = await cache.getOrExecute([\"users\", userId], () => fetchUser(userId), userKey);\n * ```\n */\nexport class CacheManager {\n private static readonly MIN_CLEANUP_INTERVAL_MS = 60_000;\n private static readonly ABORT_GRACE_PERIOD_MS = 100;\n private readonly name: string = \"cache-manager\";\n private static instance: CacheManager | null = null;\n private static initPromise: Promise<CacheManager> | null = null;\n\n private storage: CacheStorage;\n private config: CacheConfig;\n private inFlightRequests: Map<string, InFlightEntry<unknown>>;\n private cleanupInProgress: boolean;\n private lastCleanupAttempt: number;\n\n private telemetry: TelemetryProvider;\n private telemetryMetrics: {\n cacheHitCount: Counter;\n cacheMissCount: Counter;\n };\n\n private constructor(storage: CacheStorage, config: CacheConfig) {\n this.storage = storage;\n this.config = config;\n this.inFlightRequests = new Map();\n this.cleanupInProgress = false;\n this.lastCleanupAttempt = 0;\n\n this.telemetry = TelemetryManager.getProvider(\n this.name,\n this.config.telemetry,\n );\n this.telemetryMetrics = {\n cacheHitCount: this.telemetry.getMeter().createCounter(\"cache.hit\", {\n description: \"Total number of cache hits\",\n unit: \"1\",\n }),\n cacheMissCount: this.telemetry.getMeter().createCounter(\"cache.miss\", {\n description: \"Total number of cache misses\",\n unit: \"1\",\n }),\n };\n }\n\n /**\n * Get the singleton instance of the cache manager (sync version).\n *\n * Throws if not initialized - ensure AppKit.create() has completed first.\n * @returns CacheManager instance\n */\n static getInstanceSync(): CacheManager {\n if (!CacheManager.instance) {\n throw InitializationError.notInitialized(\n \"CacheManager\",\n \"Ensure AppKit.create() has completed before accessing the cache\",\n );\n }\n\n return CacheManager.instance;\n }\n\n /**\n * Initialize and get the singleton instance of the cache manager.\n * Called internally by AppKit - prefer `getInstanceSync()` for plugin access.\n * @param userConfig - User configuration for the cache manager\n * @returns CacheManager instance\n * @internal\n */\n static async getInstance(\n userConfig?: Partial<CacheConfig>,\n ): Promise<CacheManager> {\n if (CacheManager.instance) {\n return CacheManager.instance;\n }\n\n if (!CacheManager.initPromise) {\n CacheManager.initPromise = CacheManager.create(userConfig).then(\n (instance) => {\n CacheManager.instance = instance;\n return instance;\n },\n );\n }\n\n return CacheManager.initPromise;\n }\n\n /**\n * Create a new cache manager instance\n *\n * Storage selection logic:\n * 1. If `storage` provided and healthy → use provided storage\n * 2. If `storage` provided but unhealthy → fallback to InMemory (or disable if strictPersistence)\n * 3. If no `storage` provided and Lakebase available → use Lakebase\n * 4. If no `storage` provided and Lakebase unavailable → fallback to InMemory (or disable if strictPersistence)\n *\n * @param userConfig - User configuration for the cache manager\n * @returns CacheManager instance\n */\n private static async create(\n userConfig?: Partial<CacheConfig>,\n ): Promise<CacheManager> {\n const config = deepMerge(cacheDefaults, userConfig);\n\n if (config.storage) {\n const isHealthy = await config.storage.healthCheck();\n if (isHealthy) {\n return new CacheManager(config.storage, config);\n }\n\n if (config.strictPersistence) {\n const disabledConfig = { ...config, enabled: false };\n return new CacheManager(\n new InMemoryStorage(disabledConfig),\n disabledConfig,\n );\n }\n\n return new CacheManager(new InMemoryStorage(config), config);\n }\n\n // try to use lakebase storage\n try {\n const workspaceClient = new WorkspaceClient({});\n const pool = createLakebasePool({ workspaceClient });\n const persistentStorage = new PersistentStorage(config, pool);\n\n const isHealthy = await persistentStorage.healthCheck();\n if (isHealthy) {\n await persistentStorage.initialize();\n return new CacheManager(persistentStorage, config);\n }\n\n // Health check failed, close the pool and fallback\n await pool.end();\n } catch {\n // lakebase unavailable, continue with in-memory storage\n }\n\n if (config.strictPersistence) {\n const disabledConfig = { ...config, enabled: false };\n return new CacheManager(\n new InMemoryStorage(disabledConfig),\n disabledConfig,\n );\n }\n\n return new CacheManager(new InMemoryStorage(config), config);\n }\n\n /**\n * Get or execute a function and cache the result.\n *\n * Multiple concurrent callers with the same `cacheKey` are deduplicated\n * onto a single in-flight execution. Each caller may pass its own\n * `callerSignal`; the underlying `fn()` is run with a shared, internally\n * managed `AbortSignal` that aborts only when *all* callers have\n * abandoned the request (reference counted). This decouples a single\n * caller's cancellation (e.g. React StrictMode unmount) from the shared\n * result, so other still-connected callers receive the cached value\n * normally.\n *\n * @param key - Cache key parts\n * @param fn - Function to execute. Receives the cache-owned shared signal;\n * pass it through to the underlying I/O so the work is cancelled when\n * no caller is left waiting.\n * @param userKey - User key for cache namespacing\n * @param options - Options for the cache\n * @returns Promise of the result\n */\n async getOrExecute<T>(\n key: (string | number | object)[],\n fn: (sharedSignal?: AbortSignal) => Promise<T>,\n userKey: string,\n options?: { ttl?: number; callerSignal?: AbortSignal },\n ): Promise<T> {\n if (!this.config.enabled) return fn(options?.callerSignal);\n\n const callerSignal = options?.callerSignal;\n if (callerSignal?.aborted) {\n throw createAbortError(callerSignal);\n }\n\n const cacheKey = this.generateKey(key, userKey);\n\n return this.telemetry.startActiveSpan(\n \"cache.getOrExecute\",\n {\n attributes: {\n \"cache.key\": cacheKey,\n \"cache.enabled\": this.config.enabled,\n \"cache.persistent\": this.storage.isPersistent(),\n },\n },\n async (span) => {\n try {\n const cached = await this.getValid<T>(cacheKey);\n if (cached !== null) {\n span.setAttribute(\"cache.hit\", true);\n span.setStatus({ code: SpanStatusCode.OK });\n this.telemetryMetrics.cacheHitCount.add(1, {\n \"cache.key\": cacheKey,\n });\n\n logger.event()?.setExecution({\n cache_hit: true,\n cache_key: cacheKey,\n });\n\n return cached.value;\n }\n\n // check if the value is being processed by another request — join\n // the existing in-flight entry under reference counting so this\n // caller's abort doesn't poison the shared result.\n const existing = this.inFlightRequests.get(cacheKey) as\n | InFlightEntry<T>\n | undefined;\n if (existing && !existing.sharedController.signal.aborted) {\n existing.refCount++;\n // Cancel any pending abort timer — a new caller has joined\n if (existing.abortTimer) {\n clearTimeout(existing.abortTimer);\n existing.abortTimer = undefined;\n }\n span.setAttribute(\"cache.hit\", true);\n span.setAttribute(\"cache.deduplication\", true);\n span.addEvent(\"cache.deduplication_used\", {\n \"cache.key\": cacheKey,\n });\n this.telemetryMetrics.cacheHitCount.add(1, {\n \"cache.key\": cacheKey,\n \"cache.deduplication\": \"true\",\n });\n\n logger.event()?.setExecution({\n cache_hit: true,\n cache_key: cacheKey,\n cache_deduplication: true,\n });\n\n return await this._waitWithRefCount(existing, callerSignal);\n }\n\n // cache miss - execute function under a shared abort controller\n span.setAttribute(\"cache.hit\", false);\n span.addEvent(\"cache.miss\", { \"cache.key\": cacheKey });\n this.telemetryMetrics.cacheMissCount.add(1, {\n \"cache.key\": cacheKey,\n });\n\n logger.event()?.setExecution({\n cache_hit: false,\n cache_key: cacheKey,\n });\n\n const sharedController = new AbortController();\n const entry: InFlightEntry<T> = {\n promise: undefined as unknown as Promise<T>,\n refCount: 1,\n sharedController,\n };\n\n entry.promise = fn(sharedController.signal)\n .then(async (result) => {\n await this.set(cacheKey, result, options);\n span.addEvent(\"cache.value_stored\", {\n \"cache.key\": cacheKey,\n \"cache.ttl\": options?.ttl ?? this.config.ttl ?? 3600,\n });\n return result;\n })\n .catch((error) => {\n span.recordException(error);\n span.setStatus({ code: SpanStatusCode.ERROR });\n // If the shared controller aborted, all callers have already\n // abandoned the request (or are about to via their own signals)\n // — propagate the original error without wrapping. No live\n // awaiter will observe this rejection.\n if (sharedController.signal.aborted) {\n throw error;\n }\n if (error instanceof AppKitError || error instanceof ApiError) {\n throw error;\n }\n throw ExecutionError.statementFailed(\n error instanceof Error ? error.message : String(error),\n );\n })\n .finally(() => {\n if (this.inFlightRequests.get(cacheKey) === entry) {\n this.inFlightRequests.delete(cacheKey);\n }\n });\n\n // Suppress unhandled rejection warnings when every caller bailed\n // before fn() resolved (their own promises rejected via\n // waitWithRefCount; the underlying entry.promise has no awaiter).\n entry.promise.catch(() => {});\n\n this.inFlightRequests.set(cacheKey, entry as InFlightEntry<unknown>);\n\n const result = await this._waitWithRefCount(entry, callerSignal);\n span.setStatus({ code: SpanStatusCode.OK });\n return result;\n } catch (error) {\n span.recordException(error as Error);\n span.setStatus({ code: SpanStatusCode.ERROR });\n throw error;\n } finally {\n span.end();\n }\n },\n { name: this.name, includePrefix: true },\n );\n }\n\n /**\n * Wait on an in-flight entry, racing the underlying promise against the\n * caller's abort signal. When the caller aborts, the entry's refCount is\n * decremented; if it hits zero the shared controller is aborted so the\n * underlying `fn()` can stop. Other callers continue to await the same\n * entry and receive the result when it arrives.\n */\n private _waitWithRefCount<T>(\n entry: InFlightEntry<T>,\n callerSignal?: AbortSignal,\n ): Promise<T> {\n if (!callerSignal) return entry.promise;\n\n return new Promise<T>((resolve, reject) => {\n let settled = false;\n\n const release = () => {\n if (entry.refCount > 0) entry.refCount--;\n if (entry.refCount <= 0 && !entry.sharedController.signal.aborted) {\n // Grace period: delay abort so a StrictMode remount can join\n // the in-flight entry before the shared execution is cancelled.\n entry.abortTimer = setTimeout(() => {\n if (entry.refCount <= 0 && !entry.sharedController.signal.aborted) {\n entry.sharedController.abort(\n callerSignal.reason ?? \"all cache callers aborted\",\n );\n }\n }, CacheManager.ABORT_GRACE_PERIOD_MS);\n }\n };\n\n const onAbort = () => {\n if (settled) return;\n settled = true;\n callerSignal.removeEventListener(\"abort\", onAbort);\n release();\n reject(createAbortError(callerSignal));\n };\n\n if (callerSignal.aborted) {\n onAbort();\n return;\n }\n\n callerSignal.addEventListener(\"abort\", onAbort, { once: true });\n\n entry.promise.then(\n (value) => {\n if (settled) return;\n settled = true;\n callerSignal.removeEventListener(\"abort\", onAbort);\n resolve(value);\n },\n (error) => {\n if (settled) return;\n settled = true;\n callerSignal.removeEventListener(\"abort\", onAbort);\n reject(error);\n },\n );\n });\n }\n\n /**\n * Get a cached value\n * @param key - Cache key\n * @returns Promise of the value or null if not found or expired\n */\n async get<T>(key: string): Promise<T | null> {\n if (!this.config.enabled) return null;\n\n // probabilistic cleanup trigger\n this.maybeCleanup();\n\n const entry = await this.getValid<T>(key);\n return entry?.value ?? null;\n }\n\n /**\n * Get a cached entry only if it has not expired.\n * Returns null on miss or expired (and deletes the expired entry).\n *\n * Storage implementations return entries unconditionally — expiry handling\n * lives at the CacheManager layer.\n */\n private async getValid<T>(key: string): Promise<CacheEntry<T> | null> {\n const entry = await this.storage.get<T>(key);\n if (!entry) return null;\n\n if (Date.now() > entry.expiry) {\n await this.storage.delete(key);\n return null;\n }\n return entry;\n }\n\n /** Probabilistically trigger cleanup of expired entries (fire-and-forget) */\n private maybeCleanup(): void {\n if (this.cleanupInProgress) return;\n if (!this.storage.isPersistent()) return;\n const now = Date.now();\n if (now - this.lastCleanupAttempt < CacheManager.MIN_CLEANUP_INTERVAL_MS)\n return;\n\n const probability = this.config.cleanupProbability ?? 0.01;\n\n if (Math.random() > probability) return;\n\n this.lastCleanupAttempt = now;\n\n this.cleanupInProgress = true;\n (this.storage as PersistentStorage)\n .cleanupExpired()\n .catch((error) => {\n logger.debug(\"Error cleaning up expired entries: %O\", error);\n })\n .finally(() => {\n this.cleanupInProgress = false;\n });\n }\n\n /**\n * Set a value in the cache\n * @param key - Cache key\n * @param value - Value to set\n * @param options - Options for the cache\n * @returns Promise of the result\n */\n async set<T>(\n key: string,\n value: T,\n options?: { ttl?: number },\n ): Promise<void> {\n if (!this.config.enabled) return;\n\n const ttl = options?.ttl ?? this.config.ttl ?? 3600;\n const expiryTime = Date.now() + ttl * 1000;\n await this.storage.set(key, { value, expiry: expiryTime });\n }\n\n /**\n * Delete a value from the cache\n * @param key - Cache key\n * @returns Promise of the result\n */\n async delete(key: string): Promise<void> {\n if (!this.config.enabled) return;\n await this.storage.delete(key);\n }\n\n /** Clear the cache */\n async clear(): Promise<void> {\n await this.storage.clear();\n for (const entry of this.inFlightRequests.values()) {\n if (entry.abortTimer) clearTimeout(entry.abortTimer);\n }\n this.inFlightRequests.clear();\n }\n\n /**\n * Check if a value exists in the cache\n * @param key - Cache key\n * @returns Promise of true if the value exists, false otherwise\n */\n async has(key: string): Promise<boolean> {\n if (!this.config.enabled) return false;\n\n const entry = await this.getValid(key);\n return entry !== null;\n }\n\n /**\n * Generate a cache key\n * @param parts - Parts of the key\n * @param userKey - User key\n * @returns Cache key\n */\n generateKey(parts: (string | number | object)[], userKey: string): string {\n const allParts = [userKey, ...parts];\n const serialized = JSON.stringify(allParts);\n return createHash(\"sha256\").update(serialized).digest(\"hex\");\n }\n\n /** Close the cache */\n async close(): Promise<void> {\n await this.storage.close();\n }\n\n /**\n * Check if the storage is healthy\n * @returns Promise of true if the storage is healthy, false otherwise\n */\n async isStorageHealthy(): Promise<boolean> {\n return this.storage.healthCheck();\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAYA,MAAM,SAAS,aAAa,QAAQ;AAoBpC,SAAS,iBAAiB,QAA8B;AACtD,KAAI,OAAO,WAAW,OAAW,QAAO,OAAO;AAC/C,QAAO,IAAI,aAAa,8BAA8B,aAAa;;;;;;;;;;;;;;;;AAiBrE,IAAa,eAAb,MAAa,aAAa;CACxB,OAAwB,0BAA0B;CAClD,OAAwB,wBAAwB;CAChD,AAAiB,OAAe;CAChC,OAAe,WAAgC;CAC/C,OAAe,cAA4C;CAE3D,AAAQ;CACR,AAAQ;CACR,AAAQ;CACR,AAAQ;CACR,AAAQ;CAER,AAAQ;CACR,AAAQ;CAKR,AAAQ,YAAY,SAAuB,QAAqB;AAC9D,OAAK,UAAU;AACf,OAAK,SAAS;AACd,OAAK,mCAAmB,IAAI,KAAK;AACjC,OAAK,oBAAoB;AACzB,OAAK,qBAAqB;AAE1B,OAAK,YAAY,iBAAiB,YAChC,KAAK,MACL,KAAK,OAAO,UACb;AACD,OAAK,mBAAmB;GACtB,eAAe,KAAK,UAAU,UAAU,CAAC,cAAc,aAAa;IAClE,aAAa;IACb,MAAM;IACP,CAAC;GACF,gBAAgB,KAAK,UAAU,UAAU,CAAC,cAAc,cAAc;IACpE,aAAa;IACb,MAAM;IACP,CAAC;GACH;;;;;;;;CASH,OAAO,kBAAgC;AACrC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8
8
|
if (!this.config.enabled || !this.config.cacheKey?.length) return fn();
|
|
9
|
-
|
|
9
|
+
const callerSignal = context.signal;
|
|
10
|
+
return this.cacheManager.getOrExecute(this.config.cacheKey, async (sharedSignal) => {
|
|
11
|
+
const previousSignal = context.signal;
|
|
12
|
+
context.signal = sharedSignal;
|
|
13
|
+
try {
|
|
14
|
+
return await fn();
|
|
15
|
+
} finally {
|
|
16
|
+
context.signal = previousSignal;
|
|
17
|
+
}
|
|
18
|
+
}, context.userKey, {
|
|
19
|
+
ttl: this.config.ttl,
|
|
20
|
+
callerSignal
|
|
21
|
+
});
|
|
10
22
|
}
|
|
11
23
|
};
|
|
12
24
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cache.js","names":[],"sources":["../../../src/plugin/interceptors/cache.ts"],"sourcesContent":["import type { CacheConfig } from \"shared\";\nimport type { CacheManager } from \"../../cache\";\nimport type { ExecutionInterceptor, InterceptorContext } from \"./types\";\n\n// interceptor to handle caching logic\nexport class CacheInterceptor implements ExecutionInterceptor {\n constructor(\n private cacheManager: CacheManager,\n private config: CacheConfig,\n ) {}\n\n async intercept<T>(\n fn: () => Promise<T>,\n context: InterceptorContext,\n ): Promise<T> {\n // if cache disabled, ignore\n if (!this.config.enabled || !this.config.cacheKey?.length) {\n return fn();\n }\n\n return this.cacheManager.getOrExecute(\n this.config.cacheKey,\n fn,\n context.userKey,\n { ttl: this.config.ttl },\n );\n }\n}\n"],"mappings":";AAKA,IAAa,mBAAb,MAA8D;CAC5D,YACE,AAAQ,cACR,AAAQ,QACR;EAFQ;EACA;;CAGV,MAAM,UACJ,IACA,SACY;AAEZ,MAAI,CAAC,KAAK,OAAO,WAAW,CAAC,KAAK,OAAO,UAAU,OACjD,QAAO,IAAI;
|
|
1
|
+
{"version":3,"file":"cache.js","names":[],"sources":["../../../src/plugin/interceptors/cache.ts"],"sourcesContent":["import type { CacheConfig } from \"shared\";\nimport type { CacheManager } from \"../../cache\";\nimport type { ExecutionInterceptor, InterceptorContext } from \"./types\";\n\n// interceptor to handle caching logic\nexport class CacheInterceptor implements ExecutionInterceptor {\n constructor(\n private cacheManager: CacheManager,\n private config: CacheConfig,\n ) {}\n\n async intercept<T>(\n fn: () => Promise<T>,\n context: InterceptorContext,\n ): Promise<T> {\n // if cache disabled, ignore\n if (!this.config.enabled || !this.config.cacheKey?.length) {\n return fn();\n }\n\n const callerSignal = context.signal;\n\n // The cache may dedupe this request onto a shared in-flight execution.\n // Swap context.signal to the cache-owned shared signal for the duration\n // of fn() so the inner interceptor chain (timeout/retry/telemetry) and\n // the underlying I/O observe abort only when *all* callers have left,\n // not just this one. Without this swap, mount #1's abort under React\n // StrictMode poisons mount #2's joined inflight result.\n return this.cacheManager.getOrExecute(\n this.config.cacheKey,\n async (sharedSignal) => {\n const previousSignal = context.signal;\n context.signal = sharedSignal;\n try {\n return await fn();\n } finally {\n context.signal = previousSignal;\n }\n },\n context.userKey,\n { ttl: this.config.ttl, callerSignal },\n );\n }\n}\n"],"mappings":";AAKA,IAAa,mBAAb,MAA8D;CAC5D,YACE,AAAQ,cACR,AAAQ,QACR;EAFQ;EACA;;CAGV,MAAM,UACJ,IACA,SACY;AAEZ,MAAI,CAAC,KAAK,OAAO,WAAW,CAAC,KAAK,OAAO,UAAU,OACjD,QAAO,IAAI;EAGb,MAAM,eAAe,QAAQ;AAQ7B,SAAO,KAAK,aAAa,aACvB,KAAK,OAAO,UACZ,OAAO,iBAAiB;GACtB,MAAM,iBAAiB,QAAQ;AAC/B,WAAQ,SAAS;AACjB,OAAI;AACF,WAAO,MAAM,IAAI;aACT;AACR,YAAQ,SAAS;;KAGrB,QAAQ,SACR;GAAE,KAAK,KAAK,OAAO;GAAK;GAAc,CACvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stream-manager.d.ts","names":[],"sources":["../../src/stream/stream-manager.ts"],"mappings":";;;;;cAca,aAAA;EAAA,QACH,gBAAA;EAAA,QACA,cAAA;EAAA,QACA,SAAA;EAAA,QACA,YAAA;EAAA,QACA,SAAA;cAEI,OAAA,GAAU,YAAA;EAWhB,MAAA,CACJ,GAAA,EAAK,YAAA,EACL,OAAA,GAAU,MAAA,EAAQ,WAAA,KAAgB,cAAA,sBAClC,OAAA,GAAU,YAAA,EACV,QAAA,YACC,OAAA;EAsCH,QAAA,CAAA;
|
|
1
|
+
{"version":3,"file":"stream-manager.d.ts","names":[],"sources":["../../src/stream/stream-manager.ts"],"mappings":";;;;;cAca,aAAA;EAAA,QACH,gBAAA;EAAA,QACA,cAAA;EAAA,QACA,SAAA;EAAA,QACA,YAAA;EAAA,QACA,SAAA;cAEI,OAAA,GAAU,YAAA;EAWhB,MAAA,CACJ,GAAA,EAAK,YAAA,EACL,OAAA,GAAU,MAAA,EAAQ,WAAA,KAAgB,cAAA,sBAClC,OAAA,GAAU,YAAA,EACV,QAAA,YACC,OAAA;EAsCH,QAAA,CAAA;EAYA,cAAA,CAAA;EAAA,QAKc,uBAAA;EAAA,QA2EA,gBAAA;EAAA,QA+EA,6BAAA;EAAA,QAoFN,eAAA;EAAA,QA6BA,yBAAA;EAAA,QAaA,wBAAA;EAAA,QAkBA,gBAAA;EAAA,QASA,cAAA;EAAA,QAUA,gBAAA;AAAA"}
|
|
@@ -43,7 +43,7 @@ var StreamManager = class {
|
|
|
43
43
|
abortAll() {
|
|
44
44
|
this.activeOperations.forEach((operation) => {
|
|
45
45
|
if (operation.heartbeat) clearInterval(operation.heartbeat);
|
|
46
|
-
operation.controller.abort("Server shutdown");
|
|
46
|
+
operation.controller.abort(new DOMException("Server shutdown", "AbortError"));
|
|
47
47
|
});
|
|
48
48
|
this.activeOperations.clear();
|
|
49
49
|
this.streamRegistry.clear();
|
|
@@ -77,7 +77,7 @@ var StreamManager = class {
|
|
|
77
77
|
clearInterval(heartbeat);
|
|
78
78
|
streamEntry.clients.delete(res);
|
|
79
79
|
this.activeOperations.delete(streamOperation);
|
|
80
|
-
if (streamEntry.clients.size === 0 && !streamEntry.isCompleted) streamEntry.abortController.abort("All clients disconnected");
|
|
80
|
+
if (streamEntry.clients.size === 0 && !streamEntry.isCompleted) streamEntry.abortController.abort(new DOMException("All clients disconnected", "AbortError"));
|
|
81
81
|
if (streamEntry.isCompleted && streamEntry.clients.size === 0) setTimeout(() => {
|
|
82
82
|
if (streamEntry.clients.size === 0) this.streamRegistry.remove(streamEntry.streamId);
|
|
83
83
|
}, this.bufferTTL);
|
|
@@ -122,7 +122,7 @@ var StreamManager = class {
|
|
|
122
122
|
clearInterval(heartbeat);
|
|
123
123
|
this.activeOperations.delete(streamOperation);
|
|
124
124
|
streamEntry.clients.delete(res);
|
|
125
|
-
if (streamEntry.clients.size === 0 && !streamEntry.isCompleted) abortController.abort("Client disconnected");
|
|
125
|
+
if (streamEntry.clients.size === 0 && !streamEntry.isCompleted) abortController.abort(new DOMException("Client disconnected", "AbortError"));
|
|
126
126
|
});
|
|
127
127
|
await this._processGeneratorInBackground(streamEntry);
|
|
128
128
|
clearInterval(heartbeat);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stream-manager.js","names":[],"sources":["../../src/stream/stream-manager.ts"],"sourcesContent":["import { randomUUID } from \"node:crypto\";\nimport { context } from \"@opentelemetry/api\";\nimport type { IAppResponse, StreamConfig } from \"shared\";\nimport { createLogger } from \"../logging/logger\";\nimport { EventRingBuffer } from \"./buffers\";\nimport { streamDefaults } from \"./defaults\";\nimport { SSEWriter } from \"./sse-writer\";\nimport { StreamRegistry } from \"./stream-registry\";\nimport { SSEErrorCode, type StreamEntry, type StreamOperation } from \"./types\";\nimport { StreamValidator } from \"./validator\";\n\nconst logger = createLogger(\"stream\");\n\n// main entry point for Server-Sent events streaming\nexport class StreamManager {\n private activeOperations: Set<StreamOperation>;\n private streamRegistry: StreamRegistry;\n private sseWriter: SSEWriter;\n private maxEventSize: number;\n private bufferTTL: number;\n\n constructor(options?: StreamConfig) {\n this.streamRegistry = new StreamRegistry(\n options?.maxActiveStreams ?? streamDefaults.maxActiveStreams,\n );\n this.sseWriter = new SSEWriter();\n this.maxEventSize = options?.maxEventSize ?? streamDefaults.maxEventSize;\n this.bufferTTL = options?.bufferTTL ?? streamDefaults.bufferTTL;\n this.activeOperations = new Set();\n }\n\n // main streaming method - handles new connection and reconnection\n async stream(\n res: IAppResponse,\n handler: (signal: AbortSignal) => AsyncGenerator<any, void, unknown>,\n options?: StreamConfig,\n ownerKey?: string,\n ): Promise<void> {\n const { streamId } = options || {};\n\n // check if response is already closed\n if (res.writableEnded || res.destroyed) {\n return;\n }\n\n // setup SSE headers\n this.sseWriter.setupHeaders(res);\n\n // handle reconnection\n if (streamId && StreamValidator.validateStreamId(streamId)) {\n const existingStream = this.streamRegistry.get(streamId);\n if (existingStream) {\n // Enforce per-user binding: the stream's owner key must match the\n // requesting caller's owner key. This prevents cross-user stream\n // takeover via guessed/leaked stream IDs (the SSE registry was\n // previously a global lookup with no authorization step).\n if (existingStream.ownerKey !== ownerKey) {\n this.sseWriter.writeError(\n res,\n randomUUID(),\n \"Stream not found or access denied\",\n SSEErrorCode.STREAM_FORBIDDEN,\n );\n res.end();\n return;\n }\n return this._attachToExistingStream(res, existingStream, options);\n }\n }\n\n // if stream does not exist, create a new one\n return this._createNewStream(res, handler, options, ownerKey);\n }\n\n // abort all active operations\n abortAll(): void {\n this.activeOperations.forEach((operation) => {\n if (operation.heartbeat) clearInterval(operation.heartbeat);\n operation.controller.abort(\"Server shutdown\");\n });\n this.activeOperations.clear();\n this.streamRegistry.clear();\n }\n\n // get the number of active operations\n getActiveCount(): number {\n return this.activeOperations.size;\n }\n\n // attach to existing stream\n private async _attachToExistingStream(\n res: IAppResponse,\n streamEntry: StreamEntry,\n options?: StreamConfig,\n ): Promise<void> {\n // handle reconnection - replay missed events\n const lastEventId = res.req?.headers[\"last-event-id\"];\n\n if (StreamValidator.validateEventId(lastEventId)) {\n // cast to string after validation\n const validEventId = lastEventId as string;\n if (streamEntry.eventBuffer.has(validEventId)) {\n const missedEvents =\n streamEntry.eventBuffer.getEventsSince(validEventId);\n // broadcast missed events to client\n for (const event of missedEvents) {\n if (options?.userSignal?.aborted) break;\n this.sseWriter.writeBufferedEvent(res, event);\n }\n } else {\n // buffer overflow - send warning\n this.sseWriter.writeBufferOverflowWarning(res, validEventId);\n }\n }\n\n // add client to stream entry\n streamEntry.clients.add(res);\n streamEntry.lastAccess = Date.now();\n\n // start heartbeat\n const combinedSignal = this._combineSignals(\n streamEntry.abortController.signal,\n options?.userSignal,\n );\n const heartbeat = this.sseWriter.startHeartbeat(res, combinedSignal);\n\n // track operation\n const streamOperation: StreamOperation = {\n controller: streamEntry.abortController,\n type: \"stream\",\n heartbeat,\n };\n this.activeOperations.add(streamOperation);\n\n // handle client disconnect\n res.on(\"close\", () => {\n clearInterval(heartbeat);\n streamEntry.clients.delete(res);\n this.activeOperations.delete(streamOperation);\n\n // Stop the generator when no clients remain\n if (streamEntry.clients.size === 0 && !streamEntry.isCompleted) {\n streamEntry.abortController.abort(\"All clients disconnected\");\n }\n\n // cleanup if stream is completed and no clients are connected\n if (streamEntry.isCompleted && streamEntry.clients.size === 0) {\n setTimeout(() => {\n if (streamEntry.clients.size === 0) {\n this.streamRegistry.remove(streamEntry.streamId);\n }\n }, this.bufferTTL);\n }\n });\n\n // if stream is completed, close connection\n if (streamEntry.isCompleted) {\n res.end();\n // cleanup operation\n this.activeOperations.delete(streamOperation);\n clearInterval(heartbeat);\n }\n }\n private async _createNewStream(\n res: IAppResponse,\n handler: (signal: AbortSignal) => AsyncGenerator<any, void, unknown>,\n options?: StreamConfig,\n ownerKey?: string,\n ): Promise<void> {\n const streamId = options?.streamId ?? randomUUID();\n\n // abort stream if response is closed\n if (res.writableEnded || res.destroyed) {\n return;\n }\n\n const abortController = new AbortController();\n\n // create event buffer\n const eventBuffer = new EventRingBuffer(\n options?.bufferSize ?? streamDefaults.bufferSize,\n );\n\n // setup signals and heartbeat\n const combinedSignal = this._combineSignals(\n abortController.signal,\n options?.userSignal,\n );\n const heartbeat = this.sseWriter.startHeartbeat(res, combinedSignal);\n\n // capture the current trace context at stream creation time\n const traceContext = context.active();\n\n // abort stream if response is closed\n if (res.writableEnded || res.destroyed) {\n clearInterval(heartbeat);\n return;\n }\n\n // create stream entry\n const streamEntry: StreamEntry = {\n streamId,\n ownerKey,\n generator: handler(combinedSignal),\n eventBuffer,\n clients: new Set([res]),\n isCompleted: false,\n lastAccess: Date.now(),\n abortController,\n traceContext,\n };\n this.streamRegistry.add(streamEntry);\n\n // track operation\n const streamOperation: StreamOperation = {\n controller: abortController,\n type: \"stream\",\n heartbeat,\n };\n this.activeOperations.add(streamOperation);\n\n res.on(\"close\", () => {\n clearInterval(heartbeat);\n this.activeOperations.delete(streamOperation);\n streamEntry.clients.delete(res);\n\n // Stop the generator when no clients remain so polling loops\n // (e.g. jobs runAndWait) don't keep running in the background.\n if (streamEntry.clients.size === 0 && !streamEntry.isCompleted) {\n abortController.abort(\"Client disconnected\");\n }\n });\n\n await this._processGeneratorInBackground(streamEntry);\n\n // cleanup\n clearInterval(heartbeat);\n this.activeOperations.delete(streamOperation);\n }\n\n private async _processGeneratorInBackground(\n streamEntry: StreamEntry,\n ): Promise<void> {\n // run the entire generator processing within the captured trace context\n return context.with(streamEntry.traceContext, async () => {\n try {\n // retrieve all events from generator\n for await (const event of streamEntry.generator) {\n if (streamEntry.abortController.signal.aborted) break;\n const eventId = randomUUID();\n const eventData = JSON.stringify(event);\n\n // validate event size\n if (eventData.length > this.maxEventSize) {\n const errorMsg = `Event exceeds max size of ${this.maxEventSize} bytes`;\n const errorCode = SSEErrorCode.INVALID_REQUEST;\n // broadcast error to all connected clients\n this._broadcastErrorToClients(\n streamEntry,\n eventId,\n errorMsg,\n errorCode,\n );\n continue;\n }\n\n // buffer event for reconnection\n streamEntry.eventBuffer.add({\n id: eventId,\n type: event.type,\n data: eventData,\n timestamp: Date.now(),\n });\n\n // broadcast to all connected clients\n this._broadcastEventsToClients(streamEntry, eventId, event);\n streamEntry.lastAccess = Date.now();\n }\n\n streamEntry.isCompleted = true;\n\n // close all clients\n this._closeAllClients(streamEntry);\n\n // cleanup if no clients are connected\n this._cleanupStream(streamEntry);\n } catch (error) {\n const errorMsg =\n error instanceof Error ? error.message : \"Internal server error\";\n const errorEventId = randomUUID();\n const errorCode = this._categorizeError(error);\n\n // client cancellation is a normal control-flow signal, not a failure\n if (errorCode === SSEErrorCode.STREAM_ABORTED) {\n logger.info(\"Stream aborted by client (code=%s)\", errorCode);\n } else {\n logger.error(\n \"Stream execution failed: %s (code=%s)\",\n errorMsg,\n errorCode,\n );\n }\n\n // buffer error event\n streamEntry.eventBuffer.add({\n id: errorEventId,\n type: \"error\",\n data: JSON.stringify({ error: errorMsg, code: errorCode }),\n timestamp: Date.now(),\n });\n\n // send error event to all connected clients\n this._broadcastErrorToClients(\n streamEntry,\n errorEventId,\n errorMsg,\n errorCode,\n true,\n );\n streamEntry.isCompleted = true;\n }\n });\n }\n\n private _combineSignals(\n internalSignal?: AbortSignal,\n userSignal?: AbortSignal,\n ): AbortSignal {\n if (!userSignal) return internalSignal || new AbortController().signal;\n\n const signals = [internalSignal, userSignal].filter(\n Boolean,\n ) as AbortSignal[];\n const controller = new AbortController();\n\n signals.forEach((signal) => {\n if (signal?.aborted) {\n controller.abort(signal.reason);\n return;\n }\n\n signal?.addEventListener(\n \"abort\",\n () => {\n controller.abort(signal.reason);\n },\n { once: true },\n );\n });\n return controller.signal;\n }\n\n // broadcast events to all connected clients\n private _broadcastEventsToClients(\n streamEntry: StreamEntry,\n eventId: string,\n event: any,\n ): void {\n for (const client of streamEntry.clients) {\n if (!client.writableEnded) {\n this.sseWriter.writeEvent(client, eventId, event);\n }\n }\n }\n\n // broadcast error to all connected clients\n private _broadcastErrorToClients(\n streamEntry: StreamEntry,\n eventId: string,\n errorMessage: string,\n errorCode: SSEErrorCode,\n closeClients: boolean = false,\n ): void {\n for (const client of streamEntry.clients) {\n if (!client.writableEnded) {\n this.sseWriter.writeError(client, eventId, errorMessage, errorCode);\n if (closeClients) {\n client.end();\n }\n }\n }\n }\n\n // close all connected clients\n private _closeAllClients(streamEntry: StreamEntry): void {\n for (const client of streamEntry.clients) {\n if (!client.writableEnded) {\n client.end();\n }\n }\n }\n\n // cleanup stream if no clients are connected\n private _cleanupStream(streamEntry: StreamEntry): void {\n if (streamEntry.clients.size === 0) {\n setTimeout(() => {\n if (streamEntry.clients.size === 0) {\n this.streamRegistry.remove(streamEntry.streamId);\n }\n }, this.bufferTTL);\n }\n }\n\n private _categorizeError(error: unknown): SSEErrorCode {\n if (error instanceof Error) {\n const message = error.message.toLowerCase();\n if (message.includes(\"timeout\") || message.includes(\"timed out\")) {\n return SSEErrorCode.TIMEOUT;\n }\n\n if (message.includes(\"unavailable\") || message.includes(\"econnrefused\")) {\n return SSEErrorCode.TEMPORARY_UNAVAILABLE;\n }\n\n if (error.name === \"AbortError\") {\n return SSEErrorCode.STREAM_ABORTED;\n }\n\n // Detect upstream API errors (e.g., from Databricks SDK ApiError)\n if (\n \"statusCode\" in error &&\n typeof (error as any).statusCode === \"number\"\n ) {\n return SSEErrorCode.UPSTREAM_ERROR;\n }\n }\n\n return SSEErrorCode.INTERNAL_ERROR;\n }\n}\n"],"mappings":";;;;;;;;;;;AAWA,MAAM,SAAS,aAAa,SAAS;AAGrC,IAAa,gBAAb,MAA2B;CACzB,AAAQ;CACR,AAAQ;CACR,AAAQ;CACR,AAAQ;CACR,AAAQ;CAER,YAAY,SAAwB;AAClC,OAAK,iBAAiB,IAAI,eACxB,SAAS,oBAAoB,eAAe,iBAC7C;AACD,OAAK,YAAY,IAAI,WAAW;AAChC,OAAK,eAAe,SAAS,gBAAgB,eAAe;AAC5D,OAAK,YAAY,SAAS,aAAa,eAAe;AACtD,OAAK,mCAAmB,IAAI,KAAK;;CAInC,MAAM,OACJ,KACA,SACA,SACA,UACe;EACf,MAAM,EAAE,aAAa,WAAW,EAAE;AAGlC,MAAI,IAAI,iBAAiB,IAAI,UAC3B;AAIF,OAAK,UAAU,aA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E,gBAAgB,SAChB,OAAQ,MAAc,eAAe,SAErC,QAAO,aAAa;;AAIxB,SAAO,aAAa"}
|
|
1
|
+
{"version":3,"file":"stream-manager.js","names":[],"sources":["../../src/stream/stream-manager.ts"],"sourcesContent":["import { randomUUID } from \"node:crypto\";\nimport { context } from \"@opentelemetry/api\";\nimport type { IAppResponse, StreamConfig } from \"shared\";\nimport { createLogger } from \"../logging/logger\";\nimport { EventRingBuffer } from \"./buffers\";\nimport { streamDefaults } from \"./defaults\";\nimport { SSEWriter } from \"./sse-writer\";\nimport { StreamRegistry } from \"./stream-registry\";\nimport { SSEErrorCode, type StreamEntry, type StreamOperation } from \"./types\";\nimport { StreamValidator } from \"./validator\";\n\nconst logger = createLogger(\"stream\");\n\n// main entry point for Server-Sent events streaming\nexport class StreamManager {\n private activeOperations: Set<StreamOperation>;\n private streamRegistry: StreamRegistry;\n private sseWriter: SSEWriter;\n private maxEventSize: number;\n private bufferTTL: number;\n\n constructor(options?: StreamConfig) {\n this.streamRegistry = new StreamRegistry(\n options?.maxActiveStreams ?? streamDefaults.maxActiveStreams,\n );\n this.sseWriter = new SSEWriter();\n this.maxEventSize = options?.maxEventSize ?? streamDefaults.maxEventSize;\n this.bufferTTL = options?.bufferTTL ?? streamDefaults.bufferTTL;\n this.activeOperations = new Set();\n }\n\n // main streaming method - handles new connection and reconnection\n async stream(\n res: IAppResponse,\n handler: (signal: AbortSignal) => AsyncGenerator<any, void, unknown>,\n options?: StreamConfig,\n ownerKey?: string,\n ): Promise<void> {\n const { streamId } = options || {};\n\n // check if response is already closed\n if (res.writableEnded || res.destroyed) {\n return;\n }\n\n // setup SSE headers\n this.sseWriter.setupHeaders(res);\n\n // handle reconnection\n if (streamId && StreamValidator.validateStreamId(streamId)) {\n const existingStream = this.streamRegistry.get(streamId);\n if (existingStream) {\n // Enforce per-user binding: the stream's owner key must match the\n // requesting caller's owner key. This prevents cross-user stream\n // takeover via guessed/leaked stream IDs (the SSE registry was\n // previously a global lookup with no authorization step).\n if (existingStream.ownerKey !== ownerKey) {\n this.sseWriter.writeError(\n res,\n randomUUID(),\n \"Stream not found or access denied\",\n SSEErrorCode.STREAM_FORBIDDEN,\n );\n res.end();\n return;\n }\n return this._attachToExistingStream(res, existingStream, options);\n }\n }\n\n // if stream does not exist, create a new one\n return this._createNewStream(res, handler, options, ownerKey);\n }\n\n // abort all active operations\n abortAll(): void {\n this.activeOperations.forEach((operation) => {\n if (operation.heartbeat) clearInterval(operation.heartbeat);\n operation.controller.abort(\n new DOMException(\"Server shutdown\", \"AbortError\"),\n );\n });\n this.activeOperations.clear();\n this.streamRegistry.clear();\n }\n\n // get the number of active operations\n getActiveCount(): number {\n return this.activeOperations.size;\n }\n\n // attach to existing stream\n private async _attachToExistingStream(\n res: IAppResponse,\n streamEntry: StreamEntry,\n options?: StreamConfig,\n ): Promise<void> {\n // handle reconnection - replay missed events\n const lastEventId = res.req?.headers[\"last-event-id\"];\n\n if (StreamValidator.validateEventId(lastEventId)) {\n // cast to string after validation\n const validEventId = lastEventId as string;\n if (streamEntry.eventBuffer.has(validEventId)) {\n const missedEvents =\n streamEntry.eventBuffer.getEventsSince(validEventId);\n // broadcast missed events to client\n for (const event of missedEvents) {\n if (options?.userSignal?.aborted) break;\n this.sseWriter.writeBufferedEvent(res, event);\n }\n } else {\n // buffer overflow - send warning\n this.sseWriter.writeBufferOverflowWarning(res, validEventId);\n }\n }\n\n // add client to stream entry\n streamEntry.clients.add(res);\n streamEntry.lastAccess = Date.now();\n\n // start heartbeat\n const combinedSignal = this._combineSignals(\n streamEntry.abortController.signal,\n options?.userSignal,\n );\n const heartbeat = this.sseWriter.startHeartbeat(res, combinedSignal);\n\n // track operation\n const streamOperation: StreamOperation = {\n controller: streamEntry.abortController,\n type: \"stream\",\n heartbeat,\n };\n this.activeOperations.add(streamOperation);\n\n // handle client disconnect\n res.on(\"close\", () => {\n clearInterval(heartbeat);\n streamEntry.clients.delete(res);\n this.activeOperations.delete(streamOperation);\n\n // Stop the generator when no clients remain\n if (streamEntry.clients.size === 0 && !streamEntry.isCompleted) {\n streamEntry.abortController.abort(\n new DOMException(\"All clients disconnected\", \"AbortError\"),\n );\n }\n\n // cleanup if stream is completed and no clients are connected\n if (streamEntry.isCompleted && streamEntry.clients.size === 0) {\n setTimeout(() => {\n if (streamEntry.clients.size === 0) {\n this.streamRegistry.remove(streamEntry.streamId);\n }\n }, this.bufferTTL);\n }\n });\n\n // if stream is completed, close connection\n if (streamEntry.isCompleted) {\n res.end();\n // cleanup operation\n this.activeOperations.delete(streamOperation);\n clearInterval(heartbeat);\n }\n }\n private async _createNewStream(\n res: IAppResponse,\n handler: (signal: AbortSignal) => AsyncGenerator<any, void, unknown>,\n options?: StreamConfig,\n ownerKey?: string,\n ): Promise<void> {\n const streamId = options?.streamId ?? randomUUID();\n\n // abort stream if response is closed\n if (res.writableEnded || res.destroyed) {\n return;\n }\n\n const abortController = new AbortController();\n\n // create event buffer\n const eventBuffer = new EventRingBuffer(\n options?.bufferSize ?? streamDefaults.bufferSize,\n );\n\n // setup signals and heartbeat\n const combinedSignal = this._combineSignals(\n abortController.signal,\n options?.userSignal,\n );\n const heartbeat = this.sseWriter.startHeartbeat(res, combinedSignal);\n\n // capture the current trace context at stream creation time\n const traceContext = context.active();\n\n // abort stream if response is closed\n if (res.writableEnded || res.destroyed) {\n clearInterval(heartbeat);\n return;\n }\n\n // create stream entry\n const streamEntry: StreamEntry = {\n streamId,\n ownerKey,\n generator: handler(combinedSignal),\n eventBuffer,\n clients: new Set([res]),\n isCompleted: false,\n lastAccess: Date.now(),\n abortController,\n traceContext,\n };\n this.streamRegistry.add(streamEntry);\n\n // track operation\n const streamOperation: StreamOperation = {\n controller: abortController,\n type: \"stream\",\n heartbeat,\n };\n this.activeOperations.add(streamOperation);\n\n res.on(\"close\", () => {\n clearInterval(heartbeat);\n this.activeOperations.delete(streamOperation);\n streamEntry.clients.delete(res);\n\n // Stop the generator when no clients remain so polling loops\n // (e.g. jobs runAndWait) don't keep running in the background.\n if (streamEntry.clients.size === 0 && !streamEntry.isCompleted) {\n abortController.abort(\n new DOMException(\"Client disconnected\", \"AbortError\"),\n );\n }\n });\n\n await this._processGeneratorInBackground(streamEntry);\n\n // cleanup\n clearInterval(heartbeat);\n this.activeOperations.delete(streamOperation);\n }\n\n private async _processGeneratorInBackground(\n streamEntry: StreamEntry,\n ): Promise<void> {\n // run the entire generator processing within the captured trace context\n return context.with(streamEntry.traceContext, async () => {\n try {\n // retrieve all events from generator\n for await (const event of streamEntry.generator) {\n if (streamEntry.abortController.signal.aborted) break;\n const eventId = randomUUID();\n const eventData = JSON.stringify(event);\n\n // validate event size\n if (eventData.length > this.maxEventSize) {\n const errorMsg = `Event exceeds max size of ${this.maxEventSize} bytes`;\n const errorCode = SSEErrorCode.INVALID_REQUEST;\n // broadcast error to all connected clients\n this._broadcastErrorToClients(\n streamEntry,\n eventId,\n errorMsg,\n errorCode,\n );\n continue;\n }\n\n // buffer event for reconnection\n streamEntry.eventBuffer.add({\n id: eventId,\n type: event.type,\n data: eventData,\n timestamp: Date.now(),\n });\n\n // broadcast to all connected clients\n this._broadcastEventsToClients(streamEntry, eventId, event);\n streamEntry.lastAccess = Date.now();\n }\n\n streamEntry.isCompleted = true;\n\n // close all clients\n this._closeAllClients(streamEntry);\n\n // cleanup if no clients are connected\n this._cleanupStream(streamEntry);\n } catch (error) {\n const errorMsg =\n error instanceof Error ? error.message : \"Internal server error\";\n const errorEventId = randomUUID();\n const errorCode = this._categorizeError(error);\n\n // client cancellation is a normal control-flow signal, not a failure\n if (errorCode === SSEErrorCode.STREAM_ABORTED) {\n logger.info(\"Stream aborted by client (code=%s)\", errorCode);\n } else {\n logger.error(\n \"Stream execution failed: %s (code=%s)\",\n errorMsg,\n errorCode,\n );\n }\n\n // buffer error event\n streamEntry.eventBuffer.add({\n id: errorEventId,\n type: \"error\",\n data: JSON.stringify({ error: errorMsg, code: errorCode }),\n timestamp: Date.now(),\n });\n\n // send error event to all connected clients\n this._broadcastErrorToClients(\n streamEntry,\n errorEventId,\n errorMsg,\n errorCode,\n true,\n );\n streamEntry.isCompleted = true;\n }\n });\n }\n\n private _combineSignals(\n internalSignal?: AbortSignal,\n userSignal?: AbortSignal,\n ): AbortSignal {\n if (!userSignal) return internalSignal || new AbortController().signal;\n\n const signals = [internalSignal, userSignal].filter(\n Boolean,\n ) as AbortSignal[];\n const controller = new AbortController();\n\n signals.forEach((signal) => {\n if (signal?.aborted) {\n controller.abort(signal.reason);\n return;\n }\n\n signal?.addEventListener(\n \"abort\",\n () => {\n controller.abort(signal.reason);\n },\n { once: true },\n );\n });\n return controller.signal;\n }\n\n // broadcast events to all connected clients\n private _broadcastEventsToClients(\n streamEntry: StreamEntry,\n eventId: string,\n event: any,\n ): void {\n for (const client of streamEntry.clients) {\n if (!client.writableEnded) {\n this.sseWriter.writeEvent(client, eventId, event);\n }\n }\n }\n\n // broadcast error to all connected clients\n private _broadcastErrorToClients(\n streamEntry: StreamEntry,\n eventId: string,\n errorMessage: string,\n errorCode: SSEErrorCode,\n closeClients: boolean = false,\n ): void {\n for (const client of streamEntry.clients) {\n if (!client.writableEnded) {\n this.sseWriter.writeError(client, eventId, errorMessage, errorCode);\n if (closeClients) {\n client.end();\n }\n }\n }\n }\n\n // close all connected clients\n private _closeAllClients(streamEntry: StreamEntry): void {\n for (const client of streamEntry.clients) {\n if (!client.writableEnded) {\n client.end();\n }\n }\n }\n\n // cleanup stream if no clients are connected\n private _cleanupStream(streamEntry: StreamEntry): void {\n if (streamEntry.clients.size === 0) {\n setTimeout(() => {\n if (streamEntry.clients.size === 0) {\n this.streamRegistry.remove(streamEntry.streamId);\n }\n }, this.bufferTTL);\n }\n }\n\n private _categorizeError(error: unknown): SSEErrorCode {\n if (error instanceof Error) {\n const message = error.message.toLowerCase();\n if (message.includes(\"timeout\") || message.includes(\"timed out\")) {\n return SSEErrorCode.TIMEOUT;\n }\n\n if (message.includes(\"unavailable\") || message.includes(\"econnrefused\")) {\n return SSEErrorCode.TEMPORARY_UNAVAILABLE;\n }\n\n if (error.name === \"AbortError\") {\n return SSEErrorCode.STREAM_ABORTED;\n }\n\n // Detect upstream API errors (e.g., from Databricks SDK ApiError)\n if (\n \"statusCode\" in error &&\n typeof (error as any).statusCode === \"number\"\n ) {\n return SSEErrorCode.UPSTREAM_ERROR;\n }\n }\n\n return SSEErrorCode.INTERNAL_ERROR;\n }\n}\n"],"mappings":";;;;;;;;;;;AAWA,MAAM,SAAS,aAAa,SAAS;AAGrC,IAAa,gBAAb,MAA2B;CACzB,AAAQ;CACR,AAAQ;CACR,AAAQ;CACR,AAAQ;CACR,AAAQ;CAER,YAAY,SAAwB;AAClC,OAAK,iBAAiB,IAAI,eACxB,SAAS,oBAAoB,eAAe,iBAC7C;AACD,OAAK,YAAY,IAAI,WAAW;AAChC,OAAK,eAAe,SAAS,gBAAgB,eAAe;AAC5D,OAAK,YAAY,SAAS,aAAa,eAAe;AACtD,OAAK,mCAAmB,IAAI,KAAK;;CAInC,MAAM,OACJ,KACA,SACA,SACA,UACe;EACf,MAAM,EAAE,aAAa,WAAW,EAAE;AAGlC,MAAI,IAAI,iBAAiB,IAAI,UAC3B;AAIF,OAAK,UAAU,aAAa,IAAI;AAGhC,MAAI,YAAY,gBAAgB,iBAAiB,SAAS,EAAE;GAC1D,MAAM,iBAAiB,KAAK,eAAe,IAAI,SAAS;AACxD,OAAI,gBAAgB;AAKlB,QAAI,eAAe,aAAa,UAAU;AACxC,UAAK,UAAU,WACb,KACA,YAAY,EACZ,qCACA,aAAa,iBACd;AACD,SAAI,KAAK;AACT;;AAEF,WAAO,KAAK,wBAAwB,KAAK,gBAAgB,QAAQ;;;AAKrE,SAAO,KAAK,iBAAiB,KAAK,SAAS,SAAS,SAAS;;CAI/D,WAAiB;AACf,OAAK,iBAAiB,SAAS,cAAc;AAC3C,OAAI,UAAU,UAAW,eAAc,UAAU,UAAU;AAC3D,aAAU,WAAW,MACnB,IAAI,aAAa,mBAAmB,aAAa,CAClD;IACD;AACF,O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O,cACV,MAAK,UAAU,WAAW,QAAQ,SAAS,MAAM;;CAMvD,AAAQ,yBACN,aACA,SACA,cACA,WACA,eAAwB,OAClB;AACN,OAAK,MAAM,UAAU,YAAY,QAC/B,KAAI,CAAC,OAAO,eAAe;AACzB,QAAK,UAAU,WAAW,QAAQ,SAAS,cAAc,UAAU;AACnE,OAAI,aACF,QAAO,KAAK;;;CAOpB,AAAQ,iBAAiB,aAAgC;AACvD,OAAK,MAAM,UAAU,YAAY,QAC/B,KAAI,CAAC,OAAO,cACV,QAAO,KAAK;;CAMlB,AAAQ,eAAe,aAAgC;AACrD,MAAI,YAAY,QAAQ,SAAS,EAC/B,kBAAiB;AACf,OAAI,YAAY,QAAQ,SAAS,EAC/B,MAAK,eAAe,OAAO,YAAY,SAAS;KAEjD,KAAK,UAAU;;CAItB,AAAQ,iBAAiB,OAA8B;AACrD,MAAI,iBAAiB,OAAO;GAC1B,MAAM,UAAU,MAAM,QAAQ,aAAa;AAC3C,OAAI,QAAQ,SAAS,UAAU,IAAI,QAAQ,SAAS,YAAY,CAC9D,QAAO,aAAa;AAGtB,OAAI,QAAQ,SAAS,cAAc,IAAI,QAAQ,SAAS,eAAe,CACrE,QAAO,aAAa;AAGtB,OAAI,MAAM,SAAS,aACjB,QAAO,aAAa;AAItB,OACE,gBAAgB,SAChB,OAAQ,MAAc,eAAe,SAErC,QAAO,aAAa;;AAIxB,SAAO,aAAa"}
|
package/package.json
CHANGED
package/sbom.cdx.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"bomFormat":"CycloneDX","specVersion":"1.6","serialNumber":"urn:uuid:9b929a91-f6a7-4305-b3f6-79168734c114","version":1,"metadata":{"timestamp":"2026-05-22T11:02:09Z","tools":{"components":[{"group":"@cyclonedx","name":"cdxgen","version":"12.1.2","purl":"pkg:npm/%40cyclonedx/cdxgen@12.1.2","type":"application","bom-ref":"pkg:npm/@cyclonedx/cdxgen@12.1.2","publisher":"OWASP Foundation","authors":[{"name":"OWASP Foundation"}]}]},"authors":[{"name":"OWASP Foundation"}],"lifecycles":[{"phase":"build"}],"component":{"name":"appkit","group":"@databricks","version":"0.38.0","purl":"pkg:npm/%40databricks/appkit@0.38.0","bom-ref":"pkg:npm/@databricks/appkit@0.38.0","type":"application","licenses":[{"license":{"id":"Apache-2.0","url":"https://opensource.org/licenses/Apache-2.0"}}],"externalReferences":[{"type":"vcs","url":"git+https://github.com/databricks/appkit.git"}]},"properties":[{"name":"cdx:bom:componentTypes","value":"npm"},{"name":"cdx:bom:componentNamespaces","value":"@ast-grep\\n@databricks\\n@opentelemetry"},{"name":"cdx:bom:componentSrcFiles","value":"packages/appkit/node_modules/@ast-grep/napi/package.json\\npackages/appkit/node_modules/@databricks/lakebase/package.json\\npackages/appkit/node_modules/@databricks/sdk-experimental/package.json\\npackages/appkit/node_modules/@opentelemetry/api-logs/package.json\\npackages/appkit/node_modules/@opentelemetry/api/package.json\\npackages/appkit/node_modules/@opentelemetry/auto-instrumentations-node/package.json\\npackages/appkit/node_modules/@opentelemetry/exporter-logs-otlp-proto/package.json\\npackages/appkit/node_modules/@opentelemetry/exporter-metrics-otlp-proto/package.json\\npackages/appkit/node_modules/@opentelemetry/exporter-trace-otlp-proto/package.json\\npackages/appkit/node_modules/@opentelemetry/instrumentation-express/package.json\\npackages/appkit/node_modules/@opentelemetry/instrumentation-http/package.json\\npackages/appkit/node_modules/@opentelemetry/instrumentation/package.json\\npackages/appkit/node_modules/@opentelemetry/resources/package.json\\npackages/appkit/node_modules/@opentelemetry/sdk-logs/package.json\\npackages/appkit/node_modules/@opentelemetry/sdk-metrics/package.json\\npackages/appkit/node_modules/@opentelemetry/sdk-node/package.json\\npackages/appkit/node_modules/@opentelemetry/sdk-trace-base/package.json\\npackages/appkit/node_modules/@opentelemetry/semantic-conventions/package.json\\npackages/appkit/node_modules/dotenv/package.json\\npackages/appkit/node_modules/express/package.json\\npackages/appkit/node_modules/get-port/package.json\\npackages/appkit/node_modules/js-yaml/package.json\\npackages/appkit/node_modules/magic-string/package.json\\npackages/appkit/node_modules/obug/package.json\\npackages/appkit/node_modules/pg/package.json\\npackages/appkit/node_modules/picocolors/package.json\\npackages/appkit/node_modules/semver/package.json\\npackages/appkit/node_modules/shared/package.json\\npackages/appkit/node_modules/ws/package.json\\npackages/appkit/node_modules/zod/package.json"}]},"components":[{"group":"@ast-grep","name":"napi","version":"0.37.0","description":"Search and Rewrite code at large scale using precise AST pattern","scope":"required","licenses":[{"license":{"id":"MIT","url":"https://opensource.org/licenses/MIT"}}],"purl":"pkg:npm/%40ast-grep/napi@0.37.0","externalReferences":[{"type":"vcs","url":"https://ast-grep.github.io"}],"type":"library","bom-ref":"pkg:npm/@ast-grep/napi@0.37.0","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/@ast-grep/napi/package.json"},{"name":"ImportedModules","value":"@ast-grep/napi,Lang,@ast-grep/napi/Lang,parse,@ast-grep/napi/parse,SgNode,@ast-grep/napi/SgNode"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/@ast-grep/napi/package.json"}],"concludedValue":"packages/appkit/node_modules/@ast-grep/napi/package.json"}],"occurrences":[{"location":"dist/plugins/server/react-source-loc-vite-plugin.js#2"},{"location":"dist/type-generator/serving/server-file-extractor.js#4"},{"location":"tmp/dist/cli/commands/codemod/on-plugins-ready.js#4"},{"location":"tmp/dist/cli/commands/lint.js#4"},{"location":"tmp/dist/cli/commands/plugin/sync/sync.js#8"},{"location":"tmp/dist/plugins/server/react-source-loc-vite-plugin.js#2"},{"location":"tmp/dist/type-generator/serving/server-file-extractor.js#4"},{"location":"src/plugins/server/react-source-loc-vite-plugin.ts#2"},{"location":"src/type-generator/serving/server-file-extractor.ts#3"}]}},{"group":"@databricks","name":"lakebase","version":"0.3.0","description":"PostgreSQL driver for Databricks Lakebase Autoscaling with automatic OAuth token refresh","scope":"required","licenses":[{"license":{"id":"Apache-2.0","url":"https://opensource.org/licenses/Apache-2.0"}}],"purl":"pkg:npm/%40databricks/lakebase@0.3.0","externalReferences":[{"type":"vcs","url":"git+https://github.com/databricks/appkit.git"}],"type":"library","bom-ref":"pkg:npm/@databricks/lakebase@0.3.0","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/@databricks/lakebase/package.json"},{"name":"ExportedModules","value":"@databricks/lakebase,DatabaseCredential,@databricks/lakebase/DatabaseCredential,GenerateDatabaseCredentialRequest,@databricks/lakebase/GenerateDatabaseCredentialRequest,generateDatabaseCredential,@databricks/lakebase/generateDatabaseCredential,getLakebaseOrmConfig,@databricks/lakebase/getLakebaseOrmConfig,getLakebasePgConfig,@databricks/lakebase/getLakebasePgConfig,getUsernameWithApiLookup,@databricks/lakebase/getUsernameWithApiLookup,getWorkspaceClient,@databricks/lakebase/getWorkspaceClient,LakebasePoolConfig,@databricks/lakebase/LakebasePoolConfig,RequestedClaims,@databricks/lakebase/RequestedClaims,RequestedClaimsPermissionSet,@databricks/lakebase/RequestedClaimsPermissionSet,RequestedResource,@databricks/lakebase/RequestedResource"},{"name":"ImportedModules","value":"@databricks/lakebase,RequestedClaimsPermissionSet,@databricks/lakebase/RequestedClaimsPermissionSet,createLakebasePool,@databricks/lakebase/createLakebasePool,generateDatabaseCredential,@databricks/lakebase/generateDatabaseCredential,getLakebaseOrmConfig,@databricks/lakebase/getLakebaseOrmConfig,getLakebasePgConfig,@databricks/lakebase/getLakebasePgConfig,getUsernameWithApiLookup,@databricks/lakebase/getUsernameWithApiLookup,getWorkspaceClient,@databricks/lakebase/getWorkspaceClient,LakebasePoolConfig,@databricks/lakebase/LakebasePoolConfig"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/@databricks/lakebase/package.json"}],"concludedValue":"packages/appkit/node_modules/@databricks/lakebase/package.json"}],"occurrences":[{"location":"dist/connectors/lakebase/index.js#4"},{"location":"tmp/dist/connectors/lakebase/index.js#4"},{"location":"src/connectors/lakebase/index.ts#4"},{"location":"src/connectors/lakebase/index.ts#37"},{"location":"src/connectors/lakebase/pool-manager.ts#1"}]},"tags":["token"]},{"group":"@databricks","name":"sdk-experimental","version":"0.17.0","description":"Databricks SDK","scope":"required","licenses":[{"license":{"id":"Apache-2.0","url":"https://opensource.org/licenses/Apache-2.0"}}],"purl":"pkg:npm/%40databricks/sdk-experimental@0.17.0","externalReferences":[{"type":"vcs","url":"https://github.com/databricks/databricks-sdk-js"},{"type":"vcs","url":"git+https://github.com/databricks/databricks-sdk-js.git#main"}],"type":"library","bom-ref":"pkg:npm/@databricks/sdk-experimental@0.17.0","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/@databricks/sdk-experimental/package.json"},{"name":"ImportedModules","value":"@databricks/sdk-experimental,ApiError,@databricks/sdk-experimental/ApiError,WorkspaceClient,@databricks/sdk-experimental/WorkspaceClient,Context,@databricks/sdk-experimental/Context,ConfigError,@databricks/sdk-experimental/ConfigError,jobs,@databricks/sdk-experimental/jobs,CancellationToken,@databricks/sdk-experimental/CancellationToken,serving,@databricks/sdk-experimental/serving,@databricks/sdk-experimental/sql,ClientOptions,@databricks/sdk-experimental/ClientOptions,files,@databricks/sdk-experimental/files,@databricks/sdk-experimental/dist/apis/dashboards,GenieMessage,@databricks/sdk-experimental/dist/apis/dashboards/GenieMessage,@databricks/sdk-experimental/dist/wait,Waiter,@databricks/sdk-experimental/dist/wait/Waiter"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/@databricks/sdk-experimental/package.json"}],"concludedValue":"packages/appkit/node_modules/@databricks/sdk-experimental/package.json"}],"occurrences":[{"location":"dist/cache/index.js#15"},{"location":"dist/connectors/files/client.js#5"},{"location":"dist/connectors/genie/client.js#5"},{"location":"dist/connectors/jobs/client.js#7"},{"location":"dist/connectors/serving/client.js#2"},{"location":"dist/connectors/sql-warehouse/client.js#11"},{"location":"dist/context/service-context.js#7"},{"location":"dist/plugins/files/plugin.js#22"},{"location":"dist/type-generator/query-registry.js#5"},{"location":"dist/type-generator/serving/fetcher.js#2"},{"location":"dist/type-generator/serving/generator.js#7"},{"location":"tmp/dist/cache/index.js#15"},{"location":"tmp/dist/connectors/files/client.js#5"},{"location":"tmp/dist/connectors/genie/client.js#5"},{"location":"tmp/dist/connectors/jobs/client.js#7"},{"location":"tmp/dist/connectors/serving/client.js#2"},{"location":"tmp/dist/connectors/sql-warehouse/client.js#11"},{"location":"tmp/dist/context/service-context.js#7"},{"location":"tmp/dist/plugins/files/plugin.js#22"},{"location":"tmp/dist/type-generator/query-registry.js#5"},{"location":"tmp/dist/type-generator/serving/fetcher.js#2"},{"location":"tmp/dist/type-generator/serving/generator.js#7"},{"location":"src/cache/index.ts#2"},{"location":"src/connectors/files/client.ts#2"},{"location":"src/connectors/genie/client.ts#1"},{"location":"src/connectors/genie/client.ts#2"},{"location":"src/connectors/jobs/client.ts#5"},{"location":"src/connectors/serving/client.ts#5"},{"location":"src/connectors/serving/client.ts#6"},{"location":"src/connectors/sql-warehouse/client.ts#5"},{"location":"src/connectors/sql-warehouse/defaults.ts#1"},{"location":"src/connectors/vector-search/client.ts#1"},{"location":"src/context/service-context.ts#7"},{"location":"src/core/appkit.ts#1"},{"location":"src/internal-telemetry/reporter.ts#1"},{"location":"src/plugins/analytics/analytics.ts#1"},{"location":"src/plugins/analytics/query.ts#2"},{"location":"src/plugins/files/plugin.ts#3"},{"location":"src/plugins/files/types.ts#1"},{"location":"src/plugins/jobs/plugin.ts#2"},{"location":"src/plugins/jobs/types.ts#1"},{"location":"src/stream/arrow-stream-processor.ts#1"},{"location":"src/type-generator/query-registry.ts#3"},{"location":"src/type-generator/serving/fetcher.ts#1"},{"location":"src/type-generator/serving/generator.ts#3"},{"location":"src/connectors/genie/client.ts#3"},{"location":"src/connectors/genie/client.ts#4"}]},"tags":["sql"]},{"authors":[{"name":"OpenTelemetry Authors"}],"group":"@opentelemetry","name":"api-logs","version":"0.208.0","description":"Public logs API for OpenTelemetry","scope":"required","licenses":[{"license":{"id":"Apache-2.0","url":"https://opensource.org/licenses/Apache-2.0"}}],"purl":"pkg:npm/%40opentelemetry/api-logs@0.208.0","externalReferences":[{"type":"vcs","url":"https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/api-logs"}],"type":"library","bom-ref":"pkg:npm/@opentelemetry/api-logs@0.208.0","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/@opentelemetry/api-logs/package.json"},{"name":"ExportedModules","value":"@opentelemetry/api-logs"},{"name":"ImportedModules","value":"@opentelemetry/api-logs,SeverityNumber,@opentelemetry/api-logs/SeverityNumber,logs,@opentelemetry/api-logs/logs,NOOP_LOGGER,@opentelemetry/api-logs/NOOP_LOGGER,Logger,@opentelemetry/api-logs/Logger,LogRecord,@opentelemetry/api-logs/LogRecord"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/@opentelemetry/api-logs/package.json"}],"concludedValue":"packages/appkit/node_modules/@opentelemetry/api-logs/package.json"}],"occurrences":[{"location":"dist/logging/wide-event-emitter.js#1"},{"location":"dist/telemetry/index.js#6"},{"location":"dist/telemetry/noop.js#2"},{"location":"dist/telemetry/telemetry-provider.js#4"},{"location":"tmp/dist/logging/wide-event-emitter.js#1"},{"location":"tmp/dist/telemetry/index.js#6"},{"location":"tmp/dist/telemetry/noop.js#2"},{"location":"tmp/dist/telemetry/telemetry-provider.js#4"},{"location":"src/logging/wide-event-emitter.ts#1"},{"location":"src/telemetry/index.ts#7"},{"location":"src/telemetry/noop.ts#97"},{"location":"src/telemetry/telemetry-provider.ts#3"},{"location":"src/telemetry/types.ts#2"}]},"tags":["api"]},{"authors":[{"name":"OpenTelemetry Authors"}],"group":"@opentelemetry","name":"api","version":"1.9.0","description":"Public API for OpenTelemetry","scope":"required","licenses":[{"license":{"id":"Apache-2.0","url":"https://opensource.org/licenses/Apache-2.0"}}],"purl":"pkg:npm/%40opentelemetry/api@1.9.0","externalReferences":[{"type":"vcs","url":"https://github.com/open-telemetry/opentelemetry-js/tree/main/api"}],"type":"library","bom-ref":"pkg:npm/@opentelemetry/api@1.9.0","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/@opentelemetry/api/package.json"},{"name":"ExportedModules","value":"@opentelemetry/api,@opentelemetry/api-logs,Counter,@opentelemetry/api/Counter,Histogram,@opentelemetry/api/Histogram,Span,@opentelemetry/api/Span,SpanKind,@opentelemetry/api/SpanKind,SpanStatusCode,@opentelemetry/api/SpanStatusCode"},{"name":"ImportedModules","value":"@opentelemetry/api,trace,@opentelemetry/api/trace,context,@opentelemetry/api/context,createContextKey,@opentelemetry/api/createContextKey,SpanKind,@opentelemetry/api/SpanKind,SpanStatusCode,@opentelemetry/api/SpanStatusCode,INVALID_SPAN_CONTEXT,@opentelemetry/api/INVALID_SPAN_CONTEXT,createNoopMeter,@opentelemetry/api/createNoopMeter,metrics,@opentelemetry/api/metrics,Context,@opentelemetry/api/Context,Span,@opentelemetry/api/Span,SpanContext,@opentelemetry/api/SpanContext,SpanOptions,@opentelemetry/api/SpanOptions,Tracer,@opentelemetry/api/Tracer,Meter,@opentelemetry/api/Meter,Attributes,@opentelemetry/api/Attributes,Link,@opentelemetry/api/Link"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/@opentelemetry/api/package.json"}],"concludedValue":"packages/appkit/node_modules/@opentelemetry/api/package.json"}],"occurrences":[{"location":"dist/logging/logger.js#6"},{"location":"dist/plugin/plugin.js#21"},{"location":"dist/stream/stream-manager.js#9"},{"location":"dist/telemetry/index.js#5"},{"location":"dist/telemetry/noop.js#1"},{"location":"dist/telemetry/telemetry-provider.js#3"},{"location":"tmp/dist/logging/logger.js#6"},{"location":"tmp/dist/plugin/plugin.js#21"},{"location":"tmp/dist/stream/stream-manager.js#9"},{"location":"tmp/dist/telemetry/index.js#5"},{"location":"tmp/dist/telemetry/noop.js#1"},{"location":"tmp/dist/telemetry/telemetry-provider.js#3"},{"location":"src/logging/logger.ts#3"},{"location":"src/plugin/plugin.ts#1"},{"location":"src/stream/stream-manager.ts#2"},{"location":"src/stream/types.ts#1"},{"location":"src/telemetry/index.ts#5"},{"location":"src/telemetry/index.ts#6"},{"location":"src/telemetry/noop.ts#17"},{"location":"src/telemetry/noop.ts#22"},{"location":"src/telemetry/telemetry-provider.ts#1"},{"location":"src/telemetry/telemetry-provider.ts#2"},{"location":"src/telemetry/trace-sampler.ts#1"},{"location":"src/telemetry/types.ts#1"}]},"tags":["api"]},{"authors":[{"name":"OpenTelemetry Authors"}],"group":"@opentelemetry","name":"auto-instrumentations-node","version":"0.67.2","description":"Metapackage which bundles opentelemetry node core and contrib instrumentations","scope":"required","licenses":[{"license":{"id":"Apache-2.0","url":"https://opensource.org/licenses/Apache-2.0"}}],"purl":"pkg:npm/%40opentelemetry/auto-instrumentations-node@0.67.2","externalReferences":[{"type":"vcs","url":"https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/auto-instrumentations-node#readme"},{"type":"vcs","url":"https://github.com/open-telemetry/opentelemetry-js-contrib.git"}],"type":"library","bom-ref":"pkg:npm/@opentelemetry/auto-instrumentations-node@0.67.2","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/@opentelemetry/auto-instrumentations-node/package.json"},{"name":"ImportedModules","value":"@opentelemetry/auto-instrumentations-node,getNodeAutoInstrumentations,@opentelemetry/auto-instrumentations-node/getNodeAutoInstrumentations"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/@opentelemetry/auto-instrumentations-node/package.json"}],"concludedValue":"packages/appkit/node_modules/@opentelemetry/auto-instrumentations-node/package.json"}],"occurrences":[{"location":"dist/telemetry/telemetry-manager.js#4"},{"location":"tmp/dist/telemetry/telemetry-manager.js#4"},{"location":"src/telemetry/telemetry-manager.ts#1"}]}},{"authors":[{"name":"OpenTelemetry Authors"}],"group":"@opentelemetry","name":"exporter-logs-otlp-proto","version":"0.208.0","description":"An OTLP exporter to send logs using protobuf over HTTP","scope":"required","licenses":[{"license":{"id":"Apache-2.0","url":"https://opensource.org/licenses/Apache-2.0"}}],"purl":"pkg:npm/%40opentelemetry/exporter-logs-otlp-proto@0.208.0","externalReferences":[{"type":"vcs","url":"https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/exporter-logs-otlp-proto"}],"type":"library","bom-ref":"pkg:npm/@opentelemetry/exporter-logs-otlp-proto@0.208.0","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/@opentelemetry/exporter-logs-otlp-proto/package.json"},{"name":"ImportedModules","value":"@opentelemetry/exporter-logs-otlp-proto,OTLPLogExporter,@opentelemetry/exporter-logs-otlp-proto/OTLPLogExporter"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/@opentelemetry/exporter-logs-otlp-proto/package.json"}],"concludedValue":"packages/appkit/node_modules/@opentelemetry/exporter-logs-otlp-proto/package.json"}],"occurrences":[{"location":"dist/telemetry/telemetry-manager.js#5"},{"location":"tmp/dist/telemetry/telemetry-manager.js#5"},{"location":"src/telemetry/telemetry-manager.ts#2"}]}},{"authors":[{"name":"OpenTelemetry Authors"}],"group":"@opentelemetry","name":"exporter-metrics-otlp-proto","version":"0.208.0","description":"OpenTelemetry Collector Metrics Exporter allows user to send collected metrics to the OpenTelemetry Collector using protobuf over HTTP","scope":"required","licenses":[{"license":{"id":"Apache-2.0","url":"https://opensource.org/licenses/Apache-2.0"}}],"purl":"pkg:npm/%40opentelemetry/exporter-metrics-otlp-proto@0.208.0","externalReferences":[{"type":"vcs","url":"https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-exporter-metrics-otlp-proto"}],"type":"library","bom-ref":"pkg:npm/@opentelemetry/exporter-metrics-otlp-proto@0.208.0","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/@opentelemetry/exporter-metrics-otlp-proto/package.json"},{"name":"ImportedModules","value":"@opentelemetry/exporter-metrics-otlp-proto,OTLPMetricExporter,@opentelemetry/exporter-metrics-otlp-proto/OTLPMetricExporter"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/@opentelemetry/exporter-metrics-otlp-proto/package.json"}],"concludedValue":"packages/appkit/node_modules/@opentelemetry/exporter-metrics-otlp-proto/package.json"}],"occurrences":[{"location":"dist/telemetry/telemetry-manager.js#6"},{"location":"tmp/dist/telemetry/telemetry-manager.js#6"},{"location":"src/telemetry/telemetry-manager.ts#3"}]}},{"authors":[{"name":"OpenTelemetry Authors"}],"group":"@opentelemetry","name":"exporter-trace-otlp-proto","version":"0.208.0","description":"OpenTelemetry Collector Exporter allows user to send collected traces to the OpenTelemetry Collector using protobuf over HTTP","scope":"required","licenses":[{"license":{"id":"Apache-2.0","url":"https://opensource.org/licenses/Apache-2.0"}}],"purl":"pkg:npm/%40opentelemetry/exporter-trace-otlp-proto@0.208.0","externalReferences":[{"type":"vcs","url":"https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/exporter-trace-otlp-proto"}],"type":"library","bom-ref":"pkg:npm/@opentelemetry/exporter-trace-otlp-proto@0.208.0","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/@opentelemetry/exporter-trace-otlp-proto/package.json"},{"name":"ImportedModules","value":"@opentelemetry/exporter-trace-otlp-proto,OTLPTraceExporter,@opentelemetry/exporter-trace-otlp-proto/OTLPTraceExporter"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/@opentelemetry/exporter-trace-otlp-proto/package.json"}],"concludedValue":"packages/appkit/node_modules/@opentelemetry/exporter-trace-otlp-proto/package.json"}],"occurrences":[{"location":"dist/telemetry/telemetry-manager.js#7"},{"location":"tmp/dist/telemetry/telemetry-manager.js#7"},{"location":"src/telemetry/telemetry-manager.ts#4"}]}},{"authors":[{"name":"OpenTelemetry Authors"}],"group":"@opentelemetry","name":"instrumentation-express","version":"0.57.0","description":"OpenTelemetry instrumentation for `express` http web application framework","scope":"required","licenses":[{"license":{"id":"Apache-2.0","url":"https://opensource.org/licenses/Apache-2.0"}}],"purl":"pkg:npm/%40opentelemetry/instrumentation-express@0.57.0","externalReferences":[{"type":"vcs","url":"https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/instrumentation-express#readme"},{"type":"vcs","url":"https://github.com/open-telemetry/opentelemetry-js-contrib.git"}],"type":"framework","bom-ref":"pkg:npm/@opentelemetry/instrumentation-express@0.57.0","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/@opentelemetry/instrumentation-express/package.json"},{"name":"ImportedModules","value":"@opentelemetry/instrumentation-express,ExpressInstrumentation,@opentelemetry/instrumentation-express/ExpressInstrumentation"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/@opentelemetry/instrumentation-express/package.json"}],"concludedValue":"packages/appkit/node_modules/@opentelemetry/instrumentation-express/package.json"}],"occurrences":[{"location":"dist/telemetry/instrumentations.js#2"},{"location":"tmp/dist/telemetry/instrumentations.js#2"},{"location":"src/telemetry/instrumentations.ts#2"}]},"tags":["framework","web"]},{"authors":[{"name":"OpenTelemetry Authors"}],"group":"@opentelemetry","name":"instrumentation-http","version":"0.208.0","description":"OpenTelemetry instrumentation for `node:http` and `node:https` http client and server modules","scope":"required","licenses":[{"license":{"id":"Apache-2.0","url":"https://opensource.org/licenses/Apache-2.0"}}],"purl":"pkg:npm/%40opentelemetry/instrumentation-http@0.208.0","externalReferences":[{"type":"vcs","url":"https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-instrumentation-http"}],"type":"library","bom-ref":"pkg:npm/@opentelemetry/instrumentation-http@0.208.0","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/@opentelemetry/instrumentation-http/package.json"},{"name":"ImportedModules","value":"@opentelemetry/instrumentation-http,HttpInstrumentation,@opentelemetry/instrumentation-http/HttpInstrumentation"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/@opentelemetry/instrumentation-http/package.json"}],"concludedValue":"packages/appkit/node_modules/@opentelemetry/instrumentation-http/package.json"}],"occurrences":[{"location":"dist/telemetry/instrumentations.js#3"},{"location":"tmp/dist/telemetry/instrumentations.js#3"},{"location":"src/telemetry/instrumentations.ts#3"}]}},{"authors":[{"name":"OpenTelemetry Authors"}],"group":"@opentelemetry","name":"instrumentation","version":"0.208.0","description":"Base class for node which OpenTelemetry instrumentation modules extend","scope":"required","licenses":[{"license":{"id":"Apache-2.0","url":"https://opensource.org/licenses/Apache-2.0"}}],"purl":"pkg:npm/%40opentelemetry/instrumentation@0.208.0","externalReferences":[{"type":"vcs","url":"https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-instrumentation"},{"type":"vcs","url":"git+https://github.com/open-telemetry/opentelemetry-js.git"}],"type":"library","bom-ref":"pkg:npm/@opentelemetry/instrumentation@0.208.0","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/@opentelemetry/instrumentation/package.json"},{"name":"ImportedModules","value":"@opentelemetry/instrumentation,registerInstrumentations,@opentelemetry/instrumentation/registerInstrumentations,Instrumentation,@opentelemetry/instrumentation/Instrumentation"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/@opentelemetry/instrumentation/package.json"}],"concludedValue":"packages/appkit/node_modules/@opentelemetry/instrumentation/package.json"}],"occurrences":[{"location":"dist/telemetry/telemetry-manager.js#8"},{"location":"tmp/dist/telemetry/telemetry-manager.js#8"},{"location":"src/telemetry/instrumentations.ts#1"},{"location":"src/telemetry/telemetry-manager.ts#8"},{"location":"src/telemetry/telemetry-provider.ts#4"},{"location":"src/telemetry/types.ts#3"}]}},{"authors":[{"name":"OpenTelemetry Authors"}],"group":"@opentelemetry","name":"resources","version":"2.2.0","description":"OpenTelemetry SDK resources","scope":"required","licenses":[{"license":{"id":"Apache-2.0","url":"https://opensource.org/licenses/Apache-2.0"}}],"purl":"pkg:npm/%40opentelemetry/resources@2.2.0","externalReferences":[{"type":"vcs","url":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-resources"}],"type":"library","bom-ref":"pkg:npm/@opentelemetry/resources@2.2.0","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/@opentelemetry/resources/package.json"},{"name":"ImportedModules","value":"@opentelemetry/resources,detectResources,@opentelemetry/resources/detectResources,envDetector,@opentelemetry/resources/envDetector,hostDetector,@opentelemetry/resources/hostDetector,processDetector,@opentelemetry/resources/processDetector,resourceFromAttributes,@opentelemetry/resources/resourceFromAttributes,Resource,@opentelemetry/resources/Resource"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/@opentelemetry/resources/package.json"}],"concludedValue":"packages/appkit/node_modules/@opentelemetry/resources/package.json"}],"occurrences":[{"location":"dist/telemetry/telemetry-manager.js#9"},{"location":"tmp/dist/telemetry/telemetry-manager.js#9"},{"location":"src/telemetry/telemetry-manager.ts#16"}]}},{"authors":[{"name":"OpenTelemetry Authors"}],"group":"@opentelemetry","name":"sdk-logs","version":"0.208.0","description":"OpenTelemetry logs SDK","scope":"required","licenses":[{"license":{"id":"Apache-2.0","url":"https://opensource.org/licenses/Apache-2.0"}}],"purl":"pkg:npm/%40opentelemetry/sdk-logs@0.208.0","externalReferences":[{"type":"vcs","url":"https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/sdk-logs"},{"type":"vcs","url":"git+https://github.com/open-telemetry/opentelemetry-js.git"}],"type":"library","bom-ref":"pkg:npm/@opentelemetry/sdk-logs@0.208.0","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/@opentelemetry/sdk-logs/package.json"},{"name":"ImportedModules","value":"@opentelemetry/sdk-logs,BatchLogRecordProcessor,@opentelemetry/sdk-logs/BatchLogRecordProcessor"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/@opentelemetry/sdk-logs/package.json"}],"concludedValue":"packages/appkit/node_modules/@opentelemetry/sdk-logs/package.json"}],"occurrences":[{"location":"dist/telemetry/telemetry-manager.js#10"},{"location":"tmp/dist/telemetry/telemetry-manager.js#10"},{"location":"src/telemetry/telemetry-manager.ts#17"}]}},{"authors":[{"name":"OpenTelemetry Authors"}],"group":"@opentelemetry","name":"sdk-metrics","version":"2.2.0","description":"OpenTelemetry metrics SDK","scope":"required","licenses":[{"license":{"id":"Apache-2.0","url":"https://opensource.org/licenses/Apache-2.0"}}],"purl":"pkg:npm/%40opentelemetry/sdk-metrics@2.2.0","externalReferences":[{"type":"vcs","url":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/sdk-metrics"}],"type":"library","bom-ref":"pkg:npm/@opentelemetry/sdk-metrics@2.2.0","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/@opentelemetry/sdk-metrics/package.json"},{"name":"ImportedModules","value":"@opentelemetry/sdk-metrics,PeriodicExportingMetricReader,@opentelemetry/sdk-metrics/PeriodicExportingMetricReader"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/@opentelemetry/sdk-metrics/package.json"}],"concludedValue":"packages/appkit/node_modules/@opentelemetry/sdk-metrics/package.json"}],"occurrences":[{"location":"dist/telemetry/telemetry-manager.js#11"},{"location":"tmp/dist/telemetry/telemetry-manager.js#11"},{"location":"src/telemetry/telemetry-manager.ts#18"}]}},{"authors":[{"name":"OpenTelemetry Authors"}],"group":"@opentelemetry","name":"sdk-node","version":"0.208.0","description":"OpenTelemetry SDK for Node.js","scope":"required","licenses":[{"license":{"id":"Apache-2.0","url":"https://opensource.org/licenses/Apache-2.0"}}],"purl":"pkg:npm/%40opentelemetry/sdk-node@0.208.0","externalReferences":[{"type":"vcs","url":"https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-sdk-node"}],"type":"library","bom-ref":"pkg:npm/@opentelemetry/sdk-node@0.208.0","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/@opentelemetry/sdk-node/package.json"},{"name":"ImportedModules","value":"@opentelemetry/sdk-node,NodeSDK,@opentelemetry/sdk-node/NodeSDK"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/@opentelemetry/sdk-node/package.json"}],"concludedValue":"packages/appkit/node_modules/@opentelemetry/sdk-node/package.json"}],"occurrences":[{"location":"dist/telemetry/telemetry-manager.js#12"},{"location":"tmp/dist/telemetry/telemetry-manager.js#12"},{"location":"src/telemetry/telemetry-manager.ts#19"}]}},{"authors":[{"name":"OpenTelemetry Authors"}],"group":"@opentelemetry","name":"sdk-trace-base","version":"2.6.0","description":"OpenTelemetry Tracing","scope":"required","licenses":[{"license":{"id":"Apache-2.0","url":"https://opensource.org/licenses/Apache-2.0"}}],"purl":"pkg:npm/%40opentelemetry/sdk-trace-base@2.6.0","externalReferences":[{"type":"vcs","url":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-base"}],"type":"library","bom-ref":"pkg:npm/@opentelemetry/sdk-trace-base@2.6.0","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/@opentelemetry/sdk-trace-base/package.json"},{"name":"ImportedModules","value":"@opentelemetry/sdk-trace-base,SamplingDecision,@opentelemetry/sdk-trace-base/SamplingDecision,Sampler,@opentelemetry/sdk-trace-base/Sampler,SamplingResult,@opentelemetry/sdk-trace-base/SamplingResult"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/@opentelemetry/sdk-trace-base/package.json"}],"concludedValue":"packages/appkit/node_modules/@opentelemetry/sdk-trace-base/package.json"}],"occurrences":[{"location":"dist/telemetry/trace-sampler.js#2"},{"location":"tmp/dist/telemetry/trace-sampler.js#2"},{"location":"src/telemetry/trace-sampler.ts#2"},{"location":"src/telemetry/trace-sampler.ts#3"}]}},{"authors":[{"name":"OpenTelemetry Authors"}],"group":"@opentelemetry","name":"semantic-conventions","version":"1.38.0","description":"OpenTelemetry semantic conventions","scope":"required","licenses":[{"license":{"id":"Apache-2.0","url":"https://opensource.org/licenses/Apache-2.0"}}],"purl":"pkg:npm/%40opentelemetry/semantic-conventions@1.38.0","externalReferences":[{"type":"vcs","url":"https://github.com/open-telemetry/opentelemetry-js/tree/main/semantic-conventions"}],"type":"library","bom-ref":"pkg:npm/@opentelemetry/semantic-conventions@1.38.0","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/@opentelemetry/semantic-conventions/package.json"},{"name":"ImportedModules","value":"@opentelemetry/semantic-conventions,ATTR_SERVICE_NAME,@opentelemetry/semantic-conventions/ATTR_SERVICE_NAME,ATTR_SERVICE_VERSION,@opentelemetry/semantic-conventions/ATTR_SERVICE_VERSION"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/@opentelemetry/semantic-conventions/package.json"}],"concludedValue":"packages/appkit/node_modules/@opentelemetry/semantic-conventions/package.json"}],"occurrences":[{"location":"dist/telemetry/telemetry-manager.js#13"},{"location":"tmp/dist/telemetry/telemetry-manager.js#13"},{"location":"src/telemetry/telemetry-manager.ts#23"}]}},{"group":"","name":"dotenv","version":"16.6.1","description":"Loads environment variables from .env file","scope":"required","licenses":[{"license":{"id":"BSD-2-Clause","url":"https://opensource.org/licenses/BSD-2-Clause"}}],"purl":"pkg:npm/dotenv@16.6.1","externalReferences":[{"type":"vcs","url":"https://github.com/motdotla/dotenv#readme"},{"type":"vcs","url":"git://github.com/motdotla/dotenv.git"}],"type":"library","bom-ref":"pkg:npm/dotenv@16.6.1","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/dotenv/package.json"},{"name":"ImportedModules","value":"dotenv,dotenv/config"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/dotenv/package.json"}],"concludedValue":"packages/appkit/node_modules/dotenv/package.json"}],"occurrences":[{"location":"dist/plugins/server/index.js#19"},{"location":"dist/type-generator/index.js#7"},{"location":"tmp/dist/cli/index.js#8"},{"location":"tmp/dist/plugins/server/index.js#19"},{"location":"tmp/dist/type-generator/index.js#7"},{"location":"src/plugins/server/index.ts#4"},{"location":"src/type-generator/index.ts#3"},{"location":"tmp/dist/cli/index.js#8"}]}},{"authors":[{"name":"TJ Holowaychuk <tj@vision-media.ca>"}],"group":"","name":"express","version":"4.22.0","description":"Fast, unopinionated, minimalist web framework","scope":"required","licenses":[{"license":{"id":"MIT","url":"https://opensource.org/licenses/MIT"}}],"purl":"pkg:npm/express@4.22.0","externalReferences":[{"type":"website","url":"http://expressjs.com/"}],"type":"framework","bom-ref":"pkg:npm/express@4.22.0","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/express/package.json"},{"name":"ImportedModules","value":"express,NextFunction,express/NextFunction,Request,express/Request,Response,express/Response"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/express/package.json"}],"concludedValue":"packages/appkit/node_modules/express/package.json"}],"occurrences":[{"location":"dist/plugins/server/index.js#20"},{"location":"dist/plugins/server/static-server.js#4"},{"location":"tmp/dist/plugins/server/index.js#20"},{"location":"tmp/dist/plugins/server/static-server.js#4"},{"location":"src/core/plugin-context.ts#1"},{"location":"src/logging/logger.ts#4"},{"location":"src/plugin/plugin.ts#2"},{"location":"src/plugins/agents/agents.ts#3"},{"location":"src/plugins/analytics/analytics.ts#2"},{"location":"src/plugins/files/plugin.ts#4"},{"location":"src/plugins/genie/genie.ts#2"},{"location":"src/plugins/jobs/plugin.ts#3"},{"location":"src/plugins/server/base-server.ts#1"},{"location":"src/plugins/server/index.ts#5"},{"location":"src/plugins/server/remote-tunnel/gate.ts#1"},{"location":"src/plugins/server/remote-tunnel/remote-tunnel-controller.ts#2"},{"location":"src/plugins/server/remote-tunnel/remote-tunnel-manager.ts#6"},{"location":"src/plugins/server/static-server.ts#3"},{"location":"src/plugins/server/static-server.ts#4"},{"location":"src/plugins/server/vite-dev-server.ts#3"},{"location":"src/plugins/serving/serving.ts#4"},{"location":"src/plugins/vector-search/vector-search.ts#1"}]},"tags":["framework","web"]},{"authors":[{"name":"Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)"}],"group":"","name":"get-port","version":"7.2.0","description":"Get an available port","scope":"required","licenses":[{"license":{"id":"MIT","url":"https://opensource.org/licenses/MIT"}}],"purl":"pkg:npm/get-port@7.2.0","type":"library","bom-ref":"pkg:npm/get-port@7.2.0","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/get-port/package.json"},{"name":"ImportedModules","value":"get-port,portNumbers,get-port/portNumbers"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/get-port/package.json"}],"concludedValue":"packages/appkit/node_modules/get-port/package.json"}],"occurrences":[{"location":"dist/plugins/server/index.js#21"},{"location":"tmp/dist/plugins/server/index.js#21"},{"location":"src/plugins/server/index.ts#6"}]}},{"authors":[{"name":"Vladimir Zapparov <dervus.grim@gmail.com>"}],"group":"","name":"js-yaml","version":"4.1.1","description":"YAML 1.2 parser and serializer","scope":"required","licenses":[{"license":{"id":"MIT","url":"https://opensource.org/licenses/MIT"}}],"purl":"pkg:npm/js-yaml@4.1.1","type":"library","bom-ref":"pkg:npm/js-yaml@4.1.1","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/js-yaml/package.json"},{"name":"ImportedModules","value":"js-yaml"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/js-yaml/package.json"}],"concludedValue":"packages/appkit/node_modules/js-yaml/package.json"}],"occurrences":[{"location":"dist/core/agent/load-agents.js#5"},{"location":"tmp/dist/core/agent/load-agents.js#5"},{"location":"src/core/agent/load-agents.ts#4"}]}},{"authors":[{"name":"Rich Harris"}],"group":"","name":"magic-string","version":"0.30.21","description":"Modify strings, generate sourcemaps","scope":"required","licenses":[{"license":{"id":"MIT","url":"https://opensource.org/licenses/MIT"}}],"purl":"pkg:npm/magic-string@0.30.21","externalReferences":[{"type":"vcs","url":"git+https://github.com/Rich-Harris/magic-string.git"}],"type":"library","bom-ref":"pkg:npm/magic-string@0.30.21","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/magic-string/package.json"},{"name":"ImportedModules","value":"magic-string"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/magic-string/package.json"}],"concludedValue":"packages/appkit/node_modules/magic-string/package.json"}],"occurrences":[{"location":"dist/plugins/server/react-source-loc-vite-plugin.js#3"},{"location":"tmp/dist/plugins/server/react-source-loc-vite-plugin.js#3"},{"location":"src/plugins/server/react-source-loc-vite-plugin.ts#3"}]}},{"authors":[{"name":"Kevin Deng <sxzz@sxzz.moe>"}],"group":"","name":"obug","version":"2.1.1","description":"A lightweight JavaScript debugging utility, forked from debug, featuring TypeScript and ESM support.","scope":"required","licenses":[{"license":{"id":"MIT","url":"https://opensource.org/licenses/MIT"}}],"purl":"pkg:npm/obug@2.1.1","externalReferences":[{"type":"vcs","url":"https://github.com/sxzz/obug#readme"},{"type":"vcs","url":"git+https://github.com/sxzz/obug.git"}],"type":"library","bom-ref":"pkg:npm/obug@2.1.1","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/obug/package.json"},{"name":"ImportedModules","value":"obug,createDebug,obug/createDebug"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/obug/package.json"}],"concludedValue":"packages/appkit/node_modules/obug/package.json"}],"occurrences":[{"location":"dist/logging/logger.js#7"},{"location":"tmp/dist/logging/logger.js#7"},{"location":"src/logging/logger.ts#5"}]}},{"authors":[{"name":"Brian Carlson <brian.m.carlson@gmail.com>"}],"group":"","name":"pg","version":"8.18.0","description":"PostgreSQL client - pure javascript & libpq with the same API","scope":"required","licenses":[{"license":{"id":"MIT","url":"https://opensource.org/licenses/MIT"}}],"purl":"pkg:npm/pg@8.18.0","externalReferences":[{"type":"vcs","url":"https://github.com/brianc/node-postgres"},{"type":"vcs","url":"git://github.com/brianc/node-postgres.git"}],"type":"library","bom-ref":"pkg:npm/pg@8.18.0","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/pg/package.json"},{"name":"ImportedModules","value":"pg,Pool,pg/Pool,PoolClient,pg/PoolClient,QueryResult,pg/QueryResult,QueryResultRow,pg/QueryResultRow"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/pg/package.json"}],"concludedValue":"packages/appkit/node_modules/pg/package.json"}],"occurrences":[{"location":"src/cache/storage/persistent.ts#2"},{"location":"src/connectors/lakebase/index.ts#5"},{"location":"src/connectors/lakebase/pool-manager.ts#2"},{"location":"src/connectors/lakebase/routing-pool.ts#1"},{"location":"src/plugins/lakebase/lakebase.ts#1"}]}},{"authors":[{"name":"Alexey Raspopov"}],"group":"","name":"picocolors","version":"1.1.1","description":"The tiniest and the fastest library for terminal output formatting with ANSI colors","scope":"required","licenses":[{"license":{"id":"ISC","url":"https://opensource.org/licenses/ISC"}}],"purl":"pkg:npm/picocolors@1.1.1","type":"library","bom-ref":"pkg:npm/picocolors@1.1.1","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/picocolors/package.json"},{"name":"ImportedModules","value":"picocolors"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/picocolors/package.json"}],"concludedValue":"packages/appkit/node_modules/picocolors/package.json"}],"occurrences":[{"location":"dist/errors/configuration.js#2"},{"location":"dist/plugins/agents/agents.js#26"},{"location":"dist/plugins/server/client-config-sanitizer.js#2"},{"location":"dist/plugins/server/utils.js#2"},{"location":"dist/type-generator/migration.js#2"},{"location":"dist/type-generator/query-registry.js#6"},{"location":"dist/type-generator/serving/generator.js#8"},{"location":"tmp/dist/errors/configuration.js#2"},{"location":"tmp/dist/plugins/agents/agents.js#26"},{"location":"tmp/dist/plugins/server/client-config-sanitizer.js#2"},{"location":"tmp/dist/plugins/server/utils.js#2"},{"location":"tmp/dist/type-generator/migration.js#2"},{"location":"tmp/dist/type-generator/query-registry.js#6"},{"location":"tmp/dist/type-generator/serving/generator.js#8"},{"location":"src/errors/configuration.ts#1"},{"location":"src/plugins/agents/agents.ts#4"},{"location":"src/plugins/server/client-config-sanitizer.ts#1"},{"location":"src/plugins/server/utils.ts#5"},{"location":"src/type-generator/migration.ts#4"},{"location":"src/type-generator/query-registry.ts#4"},{"location":"src/type-generator/serving/generator.ts#4"}]}},{"authors":[{"name":"GitHub Inc."}],"group":"","name":"semver","version":"7.7.3","description":"The semantic version parser used by npm.","scope":"required","licenses":[{"license":{"id":"ISC","url":"https://opensource.org/licenses/ISC"}}],"purl":"pkg:npm/semver@7.7.3","externalReferences":[{"type":"vcs","url":"git+https://github.com/npm/node-semver.git"}],"type":"library","bom-ref":"pkg:npm/semver@7.7.3","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/semver/package.json"},{"name":"ImportedModules","value":"semver,coerce,semver/coerce"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/semver/package.json"}],"concludedValue":"packages/appkit/node_modules/semver/package.json"}],"occurrences":[{"location":"dist/context/service-context.js#8"},{"location":"tmp/dist/context/service-context.js#8"},{"location":"src/context/service-context.ts#8"}]}},{"group":"","name":"shared","version":"0.0.1","scope":"required","purl":"pkg:npm/shared@0.0.1","type":"library","bom-ref":"pkg:npm/shared@0.0.1","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/shared/package.json"},{"name":"ExportedModules","value":"shared,AgentAdapter,shared/AgentAdapter,AgentEvent,shared/AgentEvent,AgentInput,shared/AgentInput,AgentRunContext,shared/AgentRunContext,AgentToolDefinition,shared/AgentToolDefinition,Message,shared/Message,Thread,shared/Thread,ThreadStore,shared/ThreadStore,ToolAnnotations,shared/ToolAnnotations,ToolProvider,shared/ToolProvider,GenieAttachmentResponse,shared/GenieAttachmentResponse,GenieMessageResponse,shared/GenieMessageResponse,GenieStatementResponse,shared/GenieStatementResponse,GenieStreamEvent,shared/GenieStreamEvent,BasePluginConfig,shared/BasePluginConfig,CacheConfig,shared/CacheConfig,IAppRouter,shared/IAppRouter,PluginData,shared/PluginData,StreamExecutionSettings,shared/StreamExecutionSettings,isSQLTypeMarker,shared/isSQLTypeMarker,shared/sql"},{"name":"ImportedModules","value":"shared,AgentAdapter,shared/AgentAdapter,AgentEvent,shared/AgentEvent,AgentInput,shared/AgentInput,AgentRunContext,shared/AgentRunContext,AgentToolDefinition,shared/AgentToolDefinition,CacheConfig,shared/CacheConfig,CacheEntry,shared/CacheEntry,CacheStorage,shared/CacheStorage,TelemetryOptions,shared/TelemetryOptions,GenieMessageResponse,shared/GenieMessageResponse,Message,shared/Message,PluginConstructor,shared/PluginConstructor,PluginData,shared/PluginData,ToolProvider,shared/ToolProvider,ToolAnnotations,shared/ToolAnnotations,BasePluginConfig,shared/BasePluginConfig,ThreadStore,shared/ThreadStore,BasePlugin,shared/BasePlugin,InputPluginMap,shared/InputPluginMap,OptionalConfigPluginDef,shared/OptionalConfigPluginDef,PluginMap,shared/PluginMap,IAppRequest,shared/IAppRequest,TunnelConnection,shared/TunnelConnection,RetryConfig,shared/RetryConfig,TelemetryConfig,shared/TelemetryConfig,IAppResponse,shared/IAppResponse,PluginEndpointMap,shared/PluginEndpointMap,PluginExecuteConfig,shared/PluginExecuteConfig,PluginExecutionSettings,shared/PluginExecutionSettings,PluginPhase,shared/PluginPhase,RouteConfig,shared/RouteConfig,StreamExecuteHandler,shared/StreamExecuteHandler,StreamExecutionSettings,shared/StreamExecutionSettings,ToPlugin,shared/ToPlugin,IAppRouter,shared/IAppRouter,ResponseOutputMessage,shared/ResponseOutputMessage,ResponseStreamEvent,shared/ResponseStreamEvent,Thread,shared/Thread,ResponseFunctionCallOutput,shared/ResponseFunctionCallOutput,ResponseFunctionToolCall,shared/ResponseFunctionToolCall,SQLTypeMarker,shared/SQLTypeMarker,isSQLTypeMarker,shared/isSQLTypeMarker,shared/sql,PluginClientConfigs,shared/PluginClientConfigs,PluginEndpoints,shared/PluginEndpoints,ResourceFieldEntry,shared/ResourceFieldEntry,PluginManifest,shared/PluginManifest,StreamConfig,shared/StreamConfig"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/shared/package.json"}],"concludedValue":"packages/appkit/node_modules/shared/package.json"}],"occurrences":[{"location":"src/agents/databricks.ts#7"},{"location":"src/beta.ts#20"},{"location":"src/cache/defaults.ts#1"},{"location":"src/cache/index.ts#3"},{"location":"src/cache/storage/memory.ts#1"},{"location":"src/cache/storage/persistent.ts#3"},{"location":"src/connectors/files/client.ts#3"},{"location":"src/connectors/genie/types.ts#3"},{"location":"src/connectors/genie/types.ts#10"},{"location":"src/connectors/jobs/types.ts#1"},{"location":"src/connectors/mcp/client.ts#25"},{"location":"src/connectors/sql-warehouse/client.ts#6"},{"location":"src/connectors/vector-search/types.ts#1"},{"location":"src/core/agent/build-toolkit.ts#1"},{"location":"src/core/agent/consume-adapter-stream.ts#1"},{"location":"src/core/agent/load-agents.ts#5"},{"location":"src/core/agent/run-agent.ts#10"},{"location":"src/core/agent/toolkit-resolver.ts#1"},{"location":"src/core/agent/tools/define-tool.ts#1"},{"location":"src/core/agent/tools/function-tool.ts#1"},{"location":"src/core/agent/tools/tool.ts#1"},{"location":"src/core/agent/types.ts#7"},{"location":"src/core/appkit.ts#10"},{"location":"src/core/plugin-context.ts#2"},{"location":"src/index.ts#15"},{"location":"src/index.ts#16"},{"location":"src/plugin/dev-reader.ts#2"},{"location":"src/plugin/index.ts#1"},{"location":"src/plugin/interceptors/cache.ts#1"},{"location":"src/plugin/interceptors/retry.ts#1"},{"location":"src/plugin/interceptors/telemetry.ts#1"},{"location":"src/plugin/plugin.ts#14"},{"location":"src/plugin/to-plugin.ts#1"},{"location":"src/plugins/agents/agents.ts#18"},{"location":"src/plugins/agents/defaults.ts#1"},{"location":"src/plugins/agents/event-translator.ts#8"},{"location":"src/plugins/agents/thread-store.ts#2"},{"location":"src/plugins/analytics/analytics.ts#10"},{"location":"src/plugins/analytics/defaults.ts#1"},{"location":"src/plugins/analytics/query.ts#3"},{"location":"src/plugins/analytics/types.ts#1"},{"location":"src/plugins/files/defaults.ts#1"},{"location":"src/plugins/files/plugin.ts#10"},{"location":"src/plugins/files/types.ts#2"},{"location":"src/plugins/genie/defaults.ts#1"},{"location":"src/plugins/genie/genie.ts#8"},{"location":"src/plugins/genie/types.ts#1"},{"location":"src/plugins/genie/types.ts#4"},{"location":"src/plugins/jobs/defaults.ts#1"},{"location":"src/plugins/jobs/plugin.ts#9"},{"location":"src/plugins/jobs/types.ts#2"},{"location":"src/plugins/lakebase/lakebase.ts#2"},{"location":"src/plugins/lakebase/types.ts#1"},{"location":"src/plugins/server/index.ts#7"},{"location":"src/plugins/server/remote-tunnel/remote-tunnel-manager.ts#7"},{"location":"src/plugins/server/types.ts#1"},{"location":"src/plugins/server/utils.ts#6"},{"location":"src/plugins/serving/serving.ts#5"},{"location":"src/plugins/serving/types.ts#1"},{"location":"src/plugins/vector-search/defaults.ts#1"},{"location":"src/plugins/vector-search/types.ts#1"},{"location":"src/plugins/vector-search/vector-search.ts#2"},{"location":"src/registry/manifest-loader.ts#1"},{"location":"src/registry/resource-registry.ts#13"},{"location":"src/registry/types.ts#33"},{"location":"src/registry/types.ts#39"},{"location":"src/stream/sse-writer.ts#1"},{"location":"src/stream/stream-manager.ts#3"},{"location":"src/stream/types.ts#2"},{"location":"src/telemetry/telemetry-manager.ts#24"},{"location":"src/telemetry/telemetry-provider.ts#5"}]},"tags":["sql"]},{"authors":[{"name":"Einar Otto Stangvik <einaros@gmail.com> (http://2x.io)"}],"group":"","name":"ws","version":"8.18.3","description":"Simple to use, blazing fast and thoroughly tested websocket client and server for Node.js","scope":"required","licenses":[{"license":{"id":"MIT","url":"https://opensource.org/licenses/MIT"}}],"purl":"pkg:npm/ws@8.18.3","externalReferences":[{"type":"vcs","url":"https://github.com/websockets/ws"},{"type":"vcs","url":"git+https://github.com/websockets/ws.git"}],"type":"library","bom-ref":"pkg:npm/ws@8.18.3","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/ws/package.json"},{"name":"ImportedModules","value":"ws,WebSocketServer,ws/WebSocketServer"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/ws/package.json"}],"concludedValue":"packages/appkit/node_modules/ws/package.json"}],"occurrences":[{"location":"dist/plugins/server/remote-tunnel/remote-tunnel-manager.js#8"},{"location":"tmp/dist/plugins/server/remote-tunnel/remote-tunnel-manager.js#8"},{"location":"src/plugins/server/remote-tunnel/remote-tunnel-manager.ts#8"}]}},{"authors":[{"name":"Colin McDonnell <zod@colinhacks.com>"}],"group":"","name":"zod","version":"4.3.6","description":"TypeScript-first schema declaration and validation library with static type inference","scope":"required","licenses":[{"license":{"id":"MIT","url":"https://opensource.org/licenses/MIT"}}],"purl":"pkg:npm/zod@4.3.6","externalReferences":[{"type":"website","url":"https://zod.dev"},{"type":"vcs","url":"git+https://github.com/colinhacks/zod.git"}],"type":"library","bom-ref":"pkg:npm/zod@4.3.6","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/zod/package.json"},{"name":"ImportedModules","value":"zod,toJSONSchema,zod/toJSONSchema,zod/z"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/zod/package.json"}],"concludedValue":"packages/appkit/node_modules/zod/package.json"}],"occurrences":[{"location":"dist/core/agent/tools/json-schema.js#1"},{"location":"dist/plugins/agents/schemas.js#1"},{"location":"dist/plugins/analytics/analytics.js#16"},{"location":"dist/plugins/files/plugin.js#23"},{"location":"dist/plugins/genie/genie.js#15"},{"location":"dist/plugins/jobs/plugin.js#17"},{"location":"dist/plugins/lakebase/lakebase.js#13"},{"location":"tmp/dist/core/agent/tools/json-schema.js#1"},{"location":"tmp/dist/plugins/agents/schemas.js#1"},{"location":"tmp/dist/plugins/analytics/analytics.js#16"},{"location":"tmp/dist/plugins/files/plugin.js#23"},{"location":"tmp/dist/plugins/genie/genie.js#15"},{"location":"tmp/dist/plugins/jobs/plugin.js#17"},{"location":"tmp/dist/plugins/lakebase/lakebase.js#13"},{"location":"tmp/dist/schemas/manifest.js#1"},{"location":"src/core/agent/tools/define-tool.ts#2"},{"location":"src/core/agent/tools/json-schema.ts#1"},{"location":"src/core/agent/tools/tool.ts#2"},{"location":"src/plugins/agents/schemas.ts#1"},{"location":"src/plugins/analytics/analytics.ts#11"},{"location":"src/plugins/files/plugin.ts#11"},{"location":"src/plugins/genie/genie.ts#9"},{"location":"src/plugins/jobs/plugin.ts#10"},{"location":"src/plugins/jobs/types.ts#3"},{"location":"src/plugins/lakebase/lakebase.ts#3"}]},"tags":["validation"]}],"dependencies":[],"compositions":[{"bom-ref":"pkg:npm/@databricks/appkit@0.38.0","aggregate":"incomplete"}],"annotations":[{"bom-ref":"metadata-annotations","subjects":["pkg:npm/@databricks/appkit@0.38.0"],"annotator":{"component":{"group":"@cyclonedx","name":"cdxgen","version":"12.1.2","purl":"pkg:npm/%40cyclonedx/cdxgen@12.1.2","type":"application","bom-ref":"pkg:npm/@cyclonedx/cdxgen@12.1.2","publisher":"OWASP Foundation","authors":[{"name":"OWASP Foundation"}]}},"timestamp":"2026-05-22T11:02:09Z","text":"This Software Bill-of-Materials (SBOM) document was created on Friday, May 22, 2026 with cdxgen. The data was captured during the build lifecycle phase. The document describes an application named 'appkit' with version '0.38.0'. There are 30 components. The package type in this SBOM is npm with 3 purl namespaces described under components. The components were identified from 30 source files."}]}
|
|
1
|
+
{"bomFormat":"CycloneDX","specVersion":"1.6","serialNumber":"urn:uuid:e6a6f630-de07-4be9-b861-e6fd5440cc3f","version":1,"metadata":{"timestamp":"2026-05-25T10:44:08Z","tools":{"components":[{"group":"@cyclonedx","name":"cdxgen","version":"12.1.2","purl":"pkg:npm/%40cyclonedx/cdxgen@12.1.2","type":"application","bom-ref":"pkg:npm/@cyclonedx/cdxgen@12.1.2","publisher":"OWASP Foundation","authors":[{"name":"OWASP Foundation"}]}]},"authors":[{"name":"OWASP Foundation"}],"lifecycles":[{"phase":"build"}],"component":{"name":"appkit","group":"@databricks","version":"0.38.1","purl":"pkg:npm/%40databricks/appkit@0.38.1","bom-ref":"pkg:npm/@databricks/appkit@0.38.1","type":"application","licenses":[{"license":{"id":"Apache-2.0","url":"https://opensource.org/licenses/Apache-2.0"}}],"externalReferences":[{"type":"vcs","url":"git+https://github.com/databricks/appkit.git"}]},"properties":[{"name":"cdx:bom:componentTypes","value":"npm"},{"name":"cdx:bom:componentNamespaces","value":"@ast-grep\\n@databricks\\n@opentelemetry"},{"name":"cdx:bom:componentSrcFiles","value":"packages/appkit/node_modules/@ast-grep/napi/package.json\\npackages/appkit/node_modules/@databricks/lakebase/package.json\\npackages/appkit/node_modules/@databricks/sdk-experimental/package.json\\npackages/appkit/node_modules/@opentelemetry/api-logs/package.json\\npackages/appkit/node_modules/@opentelemetry/api/package.json\\npackages/appkit/node_modules/@opentelemetry/auto-instrumentations-node/package.json\\npackages/appkit/node_modules/@opentelemetry/exporter-logs-otlp-proto/package.json\\npackages/appkit/node_modules/@opentelemetry/exporter-metrics-otlp-proto/package.json\\npackages/appkit/node_modules/@opentelemetry/exporter-trace-otlp-proto/package.json\\npackages/appkit/node_modules/@opentelemetry/instrumentation-express/package.json\\npackages/appkit/node_modules/@opentelemetry/instrumentation-http/package.json\\npackages/appkit/node_modules/@opentelemetry/instrumentation/package.json\\npackages/appkit/node_modules/@opentelemetry/resources/package.json\\npackages/appkit/node_modules/@opentelemetry/sdk-logs/package.json\\npackages/appkit/node_modules/@opentelemetry/sdk-metrics/package.json\\npackages/appkit/node_modules/@opentelemetry/sdk-node/package.json\\npackages/appkit/node_modules/@opentelemetry/sdk-trace-base/package.json\\npackages/appkit/node_modules/@opentelemetry/semantic-conventions/package.json\\npackages/appkit/node_modules/dotenv/package.json\\npackages/appkit/node_modules/express/package.json\\npackages/appkit/node_modules/get-port/package.json\\npackages/appkit/node_modules/js-yaml/package.json\\npackages/appkit/node_modules/magic-string/package.json\\npackages/appkit/node_modules/obug/package.json\\npackages/appkit/node_modules/pg/package.json\\npackages/appkit/node_modules/picocolors/package.json\\npackages/appkit/node_modules/semver/package.json\\npackages/appkit/node_modules/shared/package.json\\npackages/appkit/node_modules/ws/package.json\\npackages/appkit/node_modules/zod/package.json"}]},"components":[{"group":"@ast-grep","name":"napi","version":"0.37.0","description":"Search and Rewrite code at large scale using precise AST pattern","scope":"required","licenses":[{"license":{"id":"MIT","url":"https://opensource.org/licenses/MIT"}}],"purl":"pkg:npm/%40ast-grep/napi@0.37.0","externalReferences":[{"type":"vcs","url":"https://ast-grep.github.io"}],"type":"library","bom-ref":"pkg:npm/@ast-grep/napi@0.37.0","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/@ast-grep/napi/package.json"},{"name":"ImportedModules","value":"@ast-grep/napi,Lang,@ast-grep/napi/Lang,parse,@ast-grep/napi/parse,SgNode,@ast-grep/napi/SgNode"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/@ast-grep/napi/package.json"}],"concludedValue":"packages/appkit/node_modules/@ast-grep/napi/package.json"}],"occurrences":[{"location":"dist/plugins/server/react-source-loc-vite-plugin.js#2"},{"location":"dist/type-generator/serving/server-file-extractor.js#4"},{"location":"tmp/dist/cli/commands/codemod/on-plugins-ready.js#4"},{"location":"tmp/dist/cli/commands/lint.js#4"},{"location":"tmp/dist/cli/commands/plugin/sync/sync.js#8"},{"location":"tmp/dist/plugins/server/react-source-loc-vite-plugin.js#2"},{"location":"tmp/dist/type-generator/serving/server-file-extractor.js#4"},{"location":"src/plugins/server/react-source-loc-vite-plugin.ts#2"},{"location":"src/type-generator/serving/server-file-extractor.ts#3"}]}},{"group":"@databricks","name":"lakebase","version":"0.3.0","description":"PostgreSQL driver for Databricks Lakebase Autoscaling with automatic OAuth token refresh","scope":"required","licenses":[{"license":{"id":"Apache-2.0","url":"https://opensource.org/licenses/Apache-2.0"}}],"purl":"pkg:npm/%40databricks/lakebase@0.3.0","externalReferences":[{"type":"vcs","url":"git+https://github.com/databricks/appkit.git"}],"type":"library","bom-ref":"pkg:npm/@databricks/lakebase@0.3.0","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/@databricks/lakebase/package.json"},{"name":"ExportedModules","value":"@databricks/lakebase,DatabaseCredential,@databricks/lakebase/DatabaseCredential,GenerateDatabaseCredentialRequest,@databricks/lakebase/GenerateDatabaseCredentialRequest,generateDatabaseCredential,@databricks/lakebase/generateDatabaseCredential,getLakebaseOrmConfig,@databricks/lakebase/getLakebaseOrmConfig,getLakebasePgConfig,@databricks/lakebase/getLakebasePgConfig,getUsernameWithApiLookup,@databricks/lakebase/getUsernameWithApiLookup,getWorkspaceClient,@databricks/lakebase/getWorkspaceClient,LakebasePoolConfig,@databricks/lakebase/LakebasePoolConfig,RequestedClaims,@databricks/lakebase/RequestedClaims,RequestedClaimsPermissionSet,@databricks/lakebase/RequestedClaimsPermissionSet,RequestedResource,@databricks/lakebase/RequestedResource"},{"name":"ImportedModules","value":"@databricks/lakebase,RequestedClaimsPermissionSet,@databricks/lakebase/RequestedClaimsPermissionSet,createLakebasePool,@databricks/lakebase/createLakebasePool,generateDatabaseCredential,@databricks/lakebase/generateDatabaseCredential,getLakebaseOrmConfig,@databricks/lakebase/getLakebaseOrmConfig,getLakebasePgConfig,@databricks/lakebase/getLakebasePgConfig,getUsernameWithApiLookup,@databricks/lakebase/getUsernameWithApiLookup,getWorkspaceClient,@databricks/lakebase/getWorkspaceClient,LakebasePoolConfig,@databricks/lakebase/LakebasePoolConfig"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/@databricks/lakebase/package.json"}],"concludedValue":"packages/appkit/node_modules/@databricks/lakebase/package.json"}],"occurrences":[{"location":"dist/connectors/lakebase/index.js#4"},{"location":"tmp/dist/connectors/lakebase/index.js#4"},{"location":"src/connectors/lakebase/index.ts#4"},{"location":"src/connectors/lakebase/index.ts#37"},{"location":"src/connectors/lakebase/pool-manager.ts#1"}]},"tags":["token"]},{"group":"@databricks","name":"sdk-experimental","version":"0.17.0","description":"Databricks SDK","scope":"required","licenses":[{"license":{"id":"Apache-2.0","url":"https://opensource.org/licenses/Apache-2.0"}}],"purl":"pkg:npm/%40databricks/sdk-experimental@0.17.0","externalReferences":[{"type":"vcs","url":"https://github.com/databricks/databricks-sdk-js"},{"type":"vcs","url":"git+https://github.com/databricks/databricks-sdk-js.git#main"}],"type":"library","bom-ref":"pkg:npm/@databricks/sdk-experimental@0.17.0","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/@databricks/sdk-experimental/package.json"},{"name":"ImportedModules","value":"@databricks/sdk-experimental,ApiError,@databricks/sdk-experimental/ApiError,WorkspaceClient,@databricks/sdk-experimental/WorkspaceClient,Context,@databricks/sdk-experimental/Context,ConfigError,@databricks/sdk-experimental/ConfigError,jobs,@databricks/sdk-experimental/jobs,CancellationToken,@databricks/sdk-experimental/CancellationToken,serving,@databricks/sdk-experimental/serving,@databricks/sdk-experimental/sql,ClientOptions,@databricks/sdk-experimental/ClientOptions,files,@databricks/sdk-experimental/files,@databricks/sdk-experimental/dist/apis/dashboards,GenieMessage,@databricks/sdk-experimental/dist/apis/dashboards/GenieMessage,@databricks/sdk-experimental/dist/wait,Waiter,@databricks/sdk-experimental/dist/wait/Waiter"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/@databricks/sdk-experimental/package.json"}],"concludedValue":"packages/appkit/node_modules/@databricks/sdk-experimental/package.json"}],"occurrences":[{"location":"dist/cache/index.js#15"},{"location":"dist/connectors/files/client.js#5"},{"location":"dist/connectors/genie/client.js#5"},{"location":"dist/connectors/jobs/client.js#7"},{"location":"dist/connectors/serving/client.js#2"},{"location":"dist/connectors/sql-warehouse/client.js#11"},{"location":"dist/context/service-context.js#7"},{"location":"dist/plugins/files/plugin.js#22"},{"location":"dist/type-generator/query-registry.js#5"},{"location":"dist/type-generator/serving/fetcher.js#2"},{"location":"dist/type-generator/serving/generator.js#7"},{"location":"tmp/dist/cache/index.js#15"},{"location":"tmp/dist/connectors/files/client.js#5"},{"location":"tmp/dist/connectors/genie/client.js#5"},{"location":"tmp/dist/connectors/jobs/client.js#7"},{"location":"tmp/dist/connectors/serving/client.js#2"},{"location":"tmp/dist/connectors/sql-warehouse/client.js#11"},{"location":"tmp/dist/context/service-context.js#7"},{"location":"tmp/dist/plugins/files/plugin.js#22"},{"location":"tmp/dist/type-generator/query-registry.js#5"},{"location":"tmp/dist/type-generator/serving/fetcher.js#2"},{"location":"tmp/dist/type-generator/serving/generator.js#7"},{"location":"src/cache/index.ts#2"},{"location":"src/connectors/files/client.ts#2"},{"location":"src/connectors/genie/client.ts#1"},{"location":"src/connectors/genie/client.ts#2"},{"location":"src/connectors/jobs/client.ts#5"},{"location":"src/connectors/serving/client.ts#5"},{"location":"src/connectors/serving/client.ts#6"},{"location":"src/connectors/sql-warehouse/client.ts#5"},{"location":"src/connectors/sql-warehouse/defaults.ts#1"},{"location":"src/connectors/vector-search/client.ts#1"},{"location":"src/context/service-context.ts#7"},{"location":"src/core/appkit.ts#1"},{"location":"src/internal-telemetry/reporter.ts#1"},{"location":"src/plugins/analytics/analytics.ts#1"},{"location":"src/plugins/analytics/query.ts#2"},{"location":"src/plugins/files/plugin.ts#3"},{"location":"src/plugins/files/types.ts#1"},{"location":"src/plugins/jobs/plugin.ts#2"},{"location":"src/plugins/jobs/types.ts#1"},{"location":"src/stream/arrow-stream-processor.ts#1"},{"location":"src/type-generator/query-registry.ts#3"},{"location":"src/type-generator/serving/fetcher.ts#1"},{"location":"src/type-generator/serving/generator.ts#3"},{"location":"src/connectors/genie/client.ts#3"},{"location":"src/connectors/genie/client.ts#4"}]},"tags":["sql"]},{"authors":[{"name":"OpenTelemetry Authors"}],"group":"@opentelemetry","name":"api-logs","version":"0.208.0","description":"Public logs API for OpenTelemetry","scope":"required","licenses":[{"license":{"id":"Apache-2.0","url":"https://opensource.org/licenses/Apache-2.0"}}],"purl":"pkg:npm/%40opentelemetry/api-logs@0.208.0","externalReferences":[{"type":"vcs","url":"https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/api-logs"}],"type":"library","bom-ref":"pkg:npm/@opentelemetry/api-logs@0.208.0","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/@opentelemetry/api-logs/package.json"},{"name":"ExportedModules","value":"@opentelemetry/api-logs"},{"name":"ImportedModules","value":"@opentelemetry/api-logs,SeverityNumber,@opentelemetry/api-logs/SeverityNumber,logs,@opentelemetry/api-logs/logs,NOOP_LOGGER,@opentelemetry/api-logs/NOOP_LOGGER,Logger,@opentelemetry/api-logs/Logger,LogRecord,@opentelemetry/api-logs/LogRecord"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/@opentelemetry/api-logs/package.json"}],"concludedValue":"packages/appkit/node_modules/@opentelemetry/api-logs/package.json"}],"occurrences":[{"location":"dist/logging/wide-event-emitter.js#1"},{"location":"dist/telemetry/index.js#6"},{"location":"dist/telemetry/noop.js#2"},{"location":"dist/telemetry/telemetry-provider.js#4"},{"location":"tmp/dist/logging/wide-event-emitter.js#1"},{"location":"tmp/dist/telemetry/index.js#6"},{"location":"tmp/dist/telemetry/noop.js#2"},{"location":"tmp/dist/telemetry/telemetry-provider.js#4"},{"location":"src/logging/wide-event-emitter.ts#1"},{"location":"src/telemetry/index.ts#7"},{"location":"src/telemetry/noop.ts#97"},{"location":"src/telemetry/telemetry-provider.ts#3"},{"location":"src/telemetry/types.ts#2"}]},"tags":["api"]},{"authors":[{"name":"OpenTelemetry Authors"}],"group":"@opentelemetry","name":"api","version":"1.9.0","description":"Public API for OpenTelemetry","scope":"required","licenses":[{"license":{"id":"Apache-2.0","url":"https://opensource.org/licenses/Apache-2.0"}}],"purl":"pkg:npm/%40opentelemetry/api@1.9.0","externalReferences":[{"type":"vcs","url":"https://github.com/open-telemetry/opentelemetry-js/tree/main/api"}],"type":"library","bom-ref":"pkg:npm/@opentelemetry/api@1.9.0","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/@opentelemetry/api/package.json"},{"name":"ExportedModules","value":"@opentelemetry/api,@opentelemetry/api-logs,Counter,@opentelemetry/api/Counter,Histogram,@opentelemetry/api/Histogram,Span,@opentelemetry/api/Span,SpanKind,@opentelemetry/api/SpanKind,SpanStatusCode,@opentelemetry/api/SpanStatusCode"},{"name":"ImportedModules","value":"@opentelemetry/api,trace,@opentelemetry/api/trace,context,@opentelemetry/api/context,createContextKey,@opentelemetry/api/createContextKey,SpanKind,@opentelemetry/api/SpanKind,SpanStatusCode,@opentelemetry/api/SpanStatusCode,INVALID_SPAN_CONTEXT,@opentelemetry/api/INVALID_SPAN_CONTEXT,createNoopMeter,@opentelemetry/api/createNoopMeter,metrics,@opentelemetry/api/metrics,Context,@opentelemetry/api/Context,Span,@opentelemetry/api/Span,SpanContext,@opentelemetry/api/SpanContext,SpanOptions,@opentelemetry/api/SpanOptions,Tracer,@opentelemetry/api/Tracer,Meter,@opentelemetry/api/Meter,Attributes,@opentelemetry/api/Attributes,Link,@opentelemetry/api/Link"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/@opentelemetry/api/package.json"}],"concludedValue":"packages/appkit/node_modules/@opentelemetry/api/package.json"}],"occurrences":[{"location":"dist/logging/logger.js#6"},{"location":"dist/plugin/plugin.js#21"},{"location":"dist/stream/stream-manager.js#9"},{"location":"dist/telemetry/index.js#5"},{"location":"dist/telemetry/noop.js#1"},{"location":"dist/telemetry/telemetry-provider.js#3"},{"location":"tmp/dist/logging/logger.js#6"},{"location":"tmp/dist/plugin/plugin.js#21"},{"location":"tmp/dist/stream/stream-manager.js#9"},{"location":"tmp/dist/telemetry/index.js#5"},{"location":"tmp/dist/telemetry/noop.js#1"},{"location":"tmp/dist/telemetry/telemetry-provider.js#3"},{"location":"src/logging/logger.ts#3"},{"location":"src/plugin/plugin.ts#1"},{"location":"src/stream/stream-manager.ts#2"},{"location":"src/stream/types.ts#1"},{"location":"src/telemetry/index.ts#5"},{"location":"src/telemetry/index.ts#6"},{"location":"src/telemetry/noop.ts#17"},{"location":"src/telemetry/noop.ts#22"},{"location":"src/telemetry/telemetry-provider.ts#1"},{"location":"src/telemetry/telemetry-provider.ts#2"},{"location":"src/telemetry/trace-sampler.ts#1"},{"location":"src/telemetry/types.ts#1"}]},"tags":["api"]},{"authors":[{"name":"OpenTelemetry Authors"}],"group":"@opentelemetry","name":"auto-instrumentations-node","version":"0.67.2","description":"Metapackage which bundles opentelemetry node core and contrib instrumentations","scope":"required","licenses":[{"license":{"id":"Apache-2.0","url":"https://opensource.org/licenses/Apache-2.0"}}],"purl":"pkg:npm/%40opentelemetry/auto-instrumentations-node@0.67.2","externalReferences":[{"type":"vcs","url":"https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/auto-instrumentations-node#readme"},{"type":"vcs","url":"https://github.com/open-telemetry/opentelemetry-js-contrib.git"}],"type":"library","bom-ref":"pkg:npm/@opentelemetry/auto-instrumentations-node@0.67.2","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/@opentelemetry/auto-instrumentations-node/package.json"},{"name":"ImportedModules","value":"@opentelemetry/auto-instrumentations-node,getNodeAutoInstrumentations,@opentelemetry/auto-instrumentations-node/getNodeAutoInstrumentations"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/@opentelemetry/auto-instrumentations-node/package.json"}],"concludedValue":"packages/appkit/node_modules/@opentelemetry/auto-instrumentations-node/package.json"}],"occurrences":[{"location":"dist/telemetry/telemetry-manager.js#4"},{"location":"tmp/dist/telemetry/telemetry-manager.js#4"},{"location":"src/telemetry/telemetry-manager.ts#1"}]}},{"authors":[{"name":"OpenTelemetry Authors"}],"group":"@opentelemetry","name":"exporter-logs-otlp-proto","version":"0.208.0","description":"An OTLP exporter to send logs using protobuf over HTTP","scope":"required","licenses":[{"license":{"id":"Apache-2.0","url":"https://opensource.org/licenses/Apache-2.0"}}],"purl":"pkg:npm/%40opentelemetry/exporter-logs-otlp-proto@0.208.0","externalReferences":[{"type":"vcs","url":"https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/exporter-logs-otlp-proto"}],"type":"library","bom-ref":"pkg:npm/@opentelemetry/exporter-logs-otlp-proto@0.208.0","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/@opentelemetry/exporter-logs-otlp-proto/package.json"},{"name":"ImportedModules","value":"@opentelemetry/exporter-logs-otlp-proto,OTLPLogExporter,@opentelemetry/exporter-logs-otlp-proto/OTLPLogExporter"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/@opentelemetry/exporter-logs-otlp-proto/package.json"}],"concludedValue":"packages/appkit/node_modules/@opentelemetry/exporter-logs-otlp-proto/package.json"}],"occurrences":[{"location":"dist/telemetry/telemetry-manager.js#5"},{"location":"tmp/dist/telemetry/telemetry-manager.js#5"},{"location":"src/telemetry/telemetry-manager.ts#2"}]}},{"authors":[{"name":"OpenTelemetry Authors"}],"group":"@opentelemetry","name":"exporter-metrics-otlp-proto","version":"0.208.0","description":"OpenTelemetry Collector Metrics Exporter allows user to send collected metrics to the OpenTelemetry Collector using protobuf over HTTP","scope":"required","licenses":[{"license":{"id":"Apache-2.0","url":"https://opensource.org/licenses/Apache-2.0"}}],"purl":"pkg:npm/%40opentelemetry/exporter-metrics-otlp-proto@0.208.0","externalReferences":[{"type":"vcs","url":"https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-exporter-metrics-otlp-proto"}],"type":"library","bom-ref":"pkg:npm/@opentelemetry/exporter-metrics-otlp-proto@0.208.0","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/@opentelemetry/exporter-metrics-otlp-proto/package.json"},{"name":"ImportedModules","value":"@opentelemetry/exporter-metrics-otlp-proto,OTLPMetricExporter,@opentelemetry/exporter-metrics-otlp-proto/OTLPMetricExporter"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/@opentelemetry/exporter-metrics-otlp-proto/package.json"}],"concludedValue":"packages/appkit/node_modules/@opentelemetry/exporter-metrics-otlp-proto/package.json"}],"occurrences":[{"location":"dist/telemetry/telemetry-manager.js#6"},{"location":"tmp/dist/telemetry/telemetry-manager.js#6"},{"location":"src/telemetry/telemetry-manager.ts#3"}]}},{"authors":[{"name":"OpenTelemetry Authors"}],"group":"@opentelemetry","name":"exporter-trace-otlp-proto","version":"0.208.0","description":"OpenTelemetry Collector Exporter allows user to send collected traces to the OpenTelemetry Collector using protobuf over HTTP","scope":"required","licenses":[{"license":{"id":"Apache-2.0","url":"https://opensource.org/licenses/Apache-2.0"}}],"purl":"pkg:npm/%40opentelemetry/exporter-trace-otlp-proto@0.208.0","externalReferences":[{"type":"vcs","url":"https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/exporter-trace-otlp-proto"}],"type":"library","bom-ref":"pkg:npm/@opentelemetry/exporter-trace-otlp-proto@0.208.0","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/@opentelemetry/exporter-trace-otlp-proto/package.json"},{"name":"ImportedModules","value":"@opentelemetry/exporter-trace-otlp-proto,OTLPTraceExporter,@opentelemetry/exporter-trace-otlp-proto/OTLPTraceExporter"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/@opentelemetry/exporter-trace-otlp-proto/package.json"}],"concludedValue":"packages/appkit/node_modules/@opentelemetry/exporter-trace-otlp-proto/package.json"}],"occurrences":[{"location":"dist/telemetry/telemetry-manager.js#7"},{"location":"tmp/dist/telemetry/telemetry-manager.js#7"},{"location":"src/telemetry/telemetry-manager.ts#4"}]}},{"authors":[{"name":"OpenTelemetry Authors"}],"group":"@opentelemetry","name":"instrumentation-express","version":"0.57.0","description":"OpenTelemetry instrumentation for `express` http web application framework","scope":"required","licenses":[{"license":{"id":"Apache-2.0","url":"https://opensource.org/licenses/Apache-2.0"}}],"purl":"pkg:npm/%40opentelemetry/instrumentation-express@0.57.0","externalReferences":[{"type":"vcs","url":"https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/instrumentation-express#readme"},{"type":"vcs","url":"https://github.com/open-telemetry/opentelemetry-js-contrib.git"}],"type":"framework","bom-ref":"pkg:npm/@opentelemetry/instrumentation-express@0.57.0","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/@opentelemetry/instrumentation-express/package.json"},{"name":"ImportedModules","value":"@opentelemetry/instrumentation-express,ExpressInstrumentation,@opentelemetry/instrumentation-express/ExpressInstrumentation"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/@opentelemetry/instrumentation-express/package.json"}],"concludedValue":"packages/appkit/node_modules/@opentelemetry/instrumentation-express/package.json"}],"occurrences":[{"location":"dist/telemetry/instrumentations.js#2"},{"location":"tmp/dist/telemetry/instrumentations.js#2"},{"location":"src/telemetry/instrumentations.ts#2"}]},"tags":["framework","web"]},{"authors":[{"name":"OpenTelemetry Authors"}],"group":"@opentelemetry","name":"instrumentation-http","version":"0.208.0","description":"OpenTelemetry instrumentation for `node:http` and `node:https` http client and server modules","scope":"required","licenses":[{"license":{"id":"Apache-2.0","url":"https://opensource.org/licenses/Apache-2.0"}}],"purl":"pkg:npm/%40opentelemetry/instrumentation-http@0.208.0","externalReferences":[{"type":"vcs","url":"https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-instrumentation-http"}],"type":"library","bom-ref":"pkg:npm/@opentelemetry/instrumentation-http@0.208.0","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/@opentelemetry/instrumentation-http/package.json"},{"name":"ImportedModules","value":"@opentelemetry/instrumentation-http,HttpInstrumentation,@opentelemetry/instrumentation-http/HttpInstrumentation"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/@opentelemetry/instrumentation-http/package.json"}],"concludedValue":"packages/appkit/node_modules/@opentelemetry/instrumentation-http/package.json"}],"occurrences":[{"location":"dist/telemetry/instrumentations.js#3"},{"location":"tmp/dist/telemetry/instrumentations.js#3"},{"location":"src/telemetry/instrumentations.ts#3"}]}},{"authors":[{"name":"OpenTelemetry Authors"}],"group":"@opentelemetry","name":"instrumentation","version":"0.208.0","description":"Base class for node which OpenTelemetry instrumentation modules extend","scope":"required","licenses":[{"license":{"id":"Apache-2.0","url":"https://opensource.org/licenses/Apache-2.0"}}],"purl":"pkg:npm/%40opentelemetry/instrumentation@0.208.0","externalReferences":[{"type":"vcs","url":"https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-instrumentation"},{"type":"vcs","url":"git+https://github.com/open-telemetry/opentelemetry-js.git"}],"type":"library","bom-ref":"pkg:npm/@opentelemetry/instrumentation@0.208.0","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/@opentelemetry/instrumentation/package.json"},{"name":"ImportedModules","value":"@opentelemetry/instrumentation,registerInstrumentations,@opentelemetry/instrumentation/registerInstrumentations,Instrumentation,@opentelemetry/instrumentation/Instrumentation"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/@opentelemetry/instrumentation/package.json"}],"concludedValue":"packages/appkit/node_modules/@opentelemetry/instrumentation/package.json"}],"occurrences":[{"location":"dist/telemetry/telemetry-manager.js#8"},{"location":"tmp/dist/telemetry/telemetry-manager.js#8"},{"location":"src/telemetry/instrumentations.ts#1"},{"location":"src/telemetry/telemetry-manager.ts#8"},{"location":"src/telemetry/telemetry-provider.ts#4"},{"location":"src/telemetry/types.ts#3"}]}},{"authors":[{"name":"OpenTelemetry Authors"}],"group":"@opentelemetry","name":"resources","version":"2.2.0","description":"OpenTelemetry SDK resources","scope":"required","licenses":[{"license":{"id":"Apache-2.0","url":"https://opensource.org/licenses/Apache-2.0"}}],"purl":"pkg:npm/%40opentelemetry/resources@2.2.0","externalReferences":[{"type":"vcs","url":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-resources"}],"type":"library","bom-ref":"pkg:npm/@opentelemetry/resources@2.2.0","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/@opentelemetry/resources/package.json"},{"name":"ImportedModules","value":"@opentelemetry/resources,detectResources,@opentelemetry/resources/detectResources,envDetector,@opentelemetry/resources/envDetector,hostDetector,@opentelemetry/resources/hostDetector,processDetector,@opentelemetry/resources/processDetector,resourceFromAttributes,@opentelemetry/resources/resourceFromAttributes,Resource,@opentelemetry/resources/Resource"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/@opentelemetry/resources/package.json"}],"concludedValue":"packages/appkit/node_modules/@opentelemetry/resources/package.json"}],"occurrences":[{"location":"dist/telemetry/telemetry-manager.js#9"},{"location":"tmp/dist/telemetry/telemetry-manager.js#9"},{"location":"src/telemetry/telemetry-manager.ts#16"}]}},{"authors":[{"name":"OpenTelemetry Authors"}],"group":"@opentelemetry","name":"sdk-logs","version":"0.208.0","description":"OpenTelemetry logs SDK","scope":"required","licenses":[{"license":{"id":"Apache-2.0","url":"https://opensource.org/licenses/Apache-2.0"}}],"purl":"pkg:npm/%40opentelemetry/sdk-logs@0.208.0","externalReferences":[{"type":"vcs","url":"https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/sdk-logs"},{"type":"vcs","url":"git+https://github.com/open-telemetry/opentelemetry-js.git"}],"type":"library","bom-ref":"pkg:npm/@opentelemetry/sdk-logs@0.208.0","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/@opentelemetry/sdk-logs/package.json"},{"name":"ImportedModules","value":"@opentelemetry/sdk-logs,BatchLogRecordProcessor,@opentelemetry/sdk-logs/BatchLogRecordProcessor"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/@opentelemetry/sdk-logs/package.json"}],"concludedValue":"packages/appkit/node_modules/@opentelemetry/sdk-logs/package.json"}],"occurrences":[{"location":"dist/telemetry/telemetry-manager.js#10"},{"location":"tmp/dist/telemetry/telemetry-manager.js#10"},{"location":"src/telemetry/telemetry-manager.ts#17"}]}},{"authors":[{"name":"OpenTelemetry Authors"}],"group":"@opentelemetry","name":"sdk-metrics","version":"2.2.0","description":"OpenTelemetry metrics SDK","scope":"required","licenses":[{"license":{"id":"Apache-2.0","url":"https://opensource.org/licenses/Apache-2.0"}}],"purl":"pkg:npm/%40opentelemetry/sdk-metrics@2.2.0","externalReferences":[{"type":"vcs","url":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/sdk-metrics"}],"type":"library","bom-ref":"pkg:npm/@opentelemetry/sdk-metrics@2.2.0","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/@opentelemetry/sdk-metrics/package.json"},{"name":"ImportedModules","value":"@opentelemetry/sdk-metrics,PeriodicExportingMetricReader,@opentelemetry/sdk-metrics/PeriodicExportingMetricReader"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/@opentelemetry/sdk-metrics/package.json"}],"concludedValue":"packages/appkit/node_modules/@opentelemetry/sdk-metrics/package.json"}],"occurrences":[{"location":"dist/telemetry/telemetry-manager.js#11"},{"location":"tmp/dist/telemetry/telemetry-manager.js#11"},{"location":"src/telemetry/telemetry-manager.ts#18"}]}},{"authors":[{"name":"OpenTelemetry Authors"}],"group":"@opentelemetry","name":"sdk-node","version":"0.208.0","description":"OpenTelemetry SDK for Node.js","scope":"required","licenses":[{"license":{"id":"Apache-2.0","url":"https://opensource.org/licenses/Apache-2.0"}}],"purl":"pkg:npm/%40opentelemetry/sdk-node@0.208.0","externalReferences":[{"type":"vcs","url":"https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-sdk-node"}],"type":"library","bom-ref":"pkg:npm/@opentelemetry/sdk-node@0.208.0","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/@opentelemetry/sdk-node/package.json"},{"name":"ImportedModules","value":"@opentelemetry/sdk-node,NodeSDK,@opentelemetry/sdk-node/NodeSDK"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/@opentelemetry/sdk-node/package.json"}],"concludedValue":"packages/appkit/node_modules/@opentelemetry/sdk-node/package.json"}],"occurrences":[{"location":"dist/telemetry/telemetry-manager.js#12"},{"location":"tmp/dist/telemetry/telemetry-manager.js#12"},{"location":"src/telemetry/telemetry-manager.ts#19"}]}},{"authors":[{"name":"OpenTelemetry Authors"}],"group":"@opentelemetry","name":"sdk-trace-base","version":"2.6.0","description":"OpenTelemetry Tracing","scope":"required","licenses":[{"license":{"id":"Apache-2.0","url":"https://opensource.org/licenses/Apache-2.0"}}],"purl":"pkg:npm/%40opentelemetry/sdk-trace-base@2.6.0","externalReferences":[{"type":"vcs","url":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-base"}],"type":"library","bom-ref":"pkg:npm/@opentelemetry/sdk-trace-base@2.6.0","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/@opentelemetry/sdk-trace-base/package.json"},{"name":"ImportedModules","value":"@opentelemetry/sdk-trace-base,SamplingDecision,@opentelemetry/sdk-trace-base/SamplingDecision,Sampler,@opentelemetry/sdk-trace-base/Sampler,SamplingResult,@opentelemetry/sdk-trace-base/SamplingResult"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/@opentelemetry/sdk-trace-base/package.json"}],"concludedValue":"packages/appkit/node_modules/@opentelemetry/sdk-trace-base/package.json"}],"occurrences":[{"location":"dist/telemetry/trace-sampler.js#2"},{"location":"tmp/dist/telemetry/trace-sampler.js#2"},{"location":"src/telemetry/trace-sampler.ts#2"},{"location":"src/telemetry/trace-sampler.ts#3"}]}},{"authors":[{"name":"OpenTelemetry Authors"}],"group":"@opentelemetry","name":"semantic-conventions","version":"1.38.0","description":"OpenTelemetry semantic conventions","scope":"required","licenses":[{"license":{"id":"Apache-2.0","url":"https://opensource.org/licenses/Apache-2.0"}}],"purl":"pkg:npm/%40opentelemetry/semantic-conventions@1.38.0","externalReferences":[{"type":"vcs","url":"https://github.com/open-telemetry/opentelemetry-js/tree/main/semantic-conventions"}],"type":"library","bom-ref":"pkg:npm/@opentelemetry/semantic-conventions@1.38.0","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/@opentelemetry/semantic-conventions/package.json"},{"name":"ImportedModules","value":"@opentelemetry/semantic-conventions,ATTR_SERVICE_NAME,@opentelemetry/semantic-conventions/ATTR_SERVICE_NAME,ATTR_SERVICE_VERSION,@opentelemetry/semantic-conventions/ATTR_SERVICE_VERSION"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/@opentelemetry/semantic-conventions/package.json"}],"concludedValue":"packages/appkit/node_modules/@opentelemetry/semantic-conventions/package.json"}],"occurrences":[{"location":"dist/telemetry/telemetry-manager.js#13"},{"location":"tmp/dist/telemetry/telemetry-manager.js#13"},{"location":"src/telemetry/telemetry-manager.ts#23"}]}},{"group":"","name":"dotenv","version":"16.6.1","description":"Loads environment variables from .env file","scope":"required","licenses":[{"license":{"id":"BSD-2-Clause","url":"https://opensource.org/licenses/BSD-2-Clause"}}],"purl":"pkg:npm/dotenv@16.6.1","externalReferences":[{"type":"vcs","url":"https://github.com/motdotla/dotenv#readme"},{"type":"vcs","url":"git://github.com/motdotla/dotenv.git"}],"type":"library","bom-ref":"pkg:npm/dotenv@16.6.1","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/dotenv/package.json"},{"name":"ImportedModules","value":"dotenv,dotenv/config"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/dotenv/package.json"}],"concludedValue":"packages/appkit/node_modules/dotenv/package.json"}],"occurrences":[{"location":"dist/plugins/server/index.js#19"},{"location":"dist/type-generator/index.js#7"},{"location":"tmp/dist/cli/index.js#8"},{"location":"tmp/dist/plugins/server/index.js#19"},{"location":"tmp/dist/type-generator/index.js#7"},{"location":"src/plugins/server/index.ts#4"},{"location":"src/type-generator/index.ts#3"},{"location":"tmp/dist/cli/index.js#8"}]}},{"authors":[{"name":"TJ Holowaychuk <tj@vision-media.ca>"}],"group":"","name":"express","version":"4.22.0","description":"Fast, unopinionated, minimalist web framework","scope":"required","licenses":[{"license":{"id":"MIT","url":"https://opensource.org/licenses/MIT"}}],"purl":"pkg:npm/express@4.22.0","externalReferences":[{"type":"website","url":"http://expressjs.com/"}],"type":"framework","bom-ref":"pkg:npm/express@4.22.0","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/express/package.json"},{"name":"ImportedModules","value":"express,NextFunction,express/NextFunction,Request,express/Request,Response,express/Response"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/express/package.json"}],"concludedValue":"packages/appkit/node_modules/express/package.json"}],"occurrences":[{"location":"dist/plugins/server/index.js#20"},{"location":"dist/plugins/server/static-server.js#4"},{"location":"tmp/dist/plugins/server/index.js#20"},{"location":"tmp/dist/plugins/server/static-server.js#4"},{"location":"src/core/plugin-context.ts#1"},{"location":"src/logging/logger.ts#4"},{"location":"src/plugin/plugin.ts#2"},{"location":"src/plugins/agents/agents.ts#3"},{"location":"src/plugins/analytics/analytics.ts#2"},{"location":"src/plugins/files/plugin.ts#4"},{"location":"src/plugins/genie/genie.ts#2"},{"location":"src/plugins/jobs/plugin.ts#3"},{"location":"src/plugins/server/base-server.ts#1"},{"location":"src/plugins/server/index.ts#5"},{"location":"src/plugins/server/remote-tunnel/gate.ts#1"},{"location":"src/plugins/server/remote-tunnel/remote-tunnel-controller.ts#2"},{"location":"src/plugins/server/remote-tunnel/remote-tunnel-manager.ts#6"},{"location":"src/plugins/server/static-server.ts#3"},{"location":"src/plugins/server/static-server.ts#4"},{"location":"src/plugins/server/vite-dev-server.ts#3"},{"location":"src/plugins/serving/serving.ts#4"},{"location":"src/plugins/vector-search/vector-search.ts#1"}]},"tags":["framework","web"]},{"authors":[{"name":"Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)"}],"group":"","name":"get-port","version":"7.2.0","description":"Get an available port","scope":"required","licenses":[{"license":{"id":"MIT","url":"https://opensource.org/licenses/MIT"}}],"purl":"pkg:npm/get-port@7.2.0","type":"library","bom-ref":"pkg:npm/get-port@7.2.0","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/get-port/package.json"},{"name":"ImportedModules","value":"get-port,portNumbers,get-port/portNumbers"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/get-port/package.json"}],"concludedValue":"packages/appkit/node_modules/get-port/package.json"}],"occurrences":[{"location":"dist/plugins/server/index.js#21"},{"location":"tmp/dist/plugins/server/index.js#21"},{"location":"src/plugins/server/index.ts#6"}]}},{"authors":[{"name":"Vladimir Zapparov <dervus.grim@gmail.com>"}],"group":"","name":"js-yaml","version":"4.1.1","description":"YAML 1.2 parser and serializer","scope":"required","licenses":[{"license":{"id":"MIT","url":"https://opensource.org/licenses/MIT"}}],"purl":"pkg:npm/js-yaml@4.1.1","type":"library","bom-ref":"pkg:npm/js-yaml@4.1.1","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/js-yaml/package.json"},{"name":"ImportedModules","value":"js-yaml"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/js-yaml/package.json"}],"concludedValue":"packages/appkit/node_modules/js-yaml/package.json"}],"occurrences":[{"location":"dist/core/agent/load-agents.js#5"},{"location":"tmp/dist/core/agent/load-agents.js#5"},{"location":"src/core/agent/load-agents.ts#4"}]}},{"authors":[{"name":"Rich Harris"}],"group":"","name":"magic-string","version":"0.30.21","description":"Modify strings, generate sourcemaps","scope":"required","licenses":[{"license":{"id":"MIT","url":"https://opensource.org/licenses/MIT"}}],"purl":"pkg:npm/magic-string@0.30.21","externalReferences":[{"type":"vcs","url":"git+https://github.com/Rich-Harris/magic-string.git"}],"type":"library","bom-ref":"pkg:npm/magic-string@0.30.21","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/magic-string/package.json"},{"name":"ImportedModules","value":"magic-string"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/magic-string/package.json"}],"concludedValue":"packages/appkit/node_modules/magic-string/package.json"}],"occurrences":[{"location":"dist/plugins/server/react-source-loc-vite-plugin.js#3"},{"location":"tmp/dist/plugins/server/react-source-loc-vite-plugin.js#3"},{"location":"src/plugins/server/react-source-loc-vite-plugin.ts#3"}]}},{"authors":[{"name":"Kevin Deng <sxzz@sxzz.moe>"}],"group":"","name":"obug","version":"2.1.1","description":"A lightweight JavaScript debugging utility, forked from debug, featuring TypeScript and ESM support.","scope":"required","licenses":[{"license":{"id":"MIT","url":"https://opensource.org/licenses/MIT"}}],"purl":"pkg:npm/obug@2.1.1","externalReferences":[{"type":"vcs","url":"https://github.com/sxzz/obug#readme"},{"type":"vcs","url":"git+https://github.com/sxzz/obug.git"}],"type":"library","bom-ref":"pkg:npm/obug@2.1.1","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/obug/package.json"},{"name":"ImportedModules","value":"obug,createDebug,obug/createDebug"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/obug/package.json"}],"concludedValue":"packages/appkit/node_modules/obug/package.json"}],"occurrences":[{"location":"dist/logging/logger.js#7"},{"location":"tmp/dist/logging/logger.js#7"},{"location":"src/logging/logger.ts#5"}]}},{"authors":[{"name":"Brian Carlson <brian.m.carlson@gmail.com>"}],"group":"","name":"pg","version":"8.18.0","description":"PostgreSQL client - pure javascript & libpq with the same API","scope":"required","licenses":[{"license":{"id":"MIT","url":"https://opensource.org/licenses/MIT"}}],"purl":"pkg:npm/pg@8.18.0","externalReferences":[{"type":"vcs","url":"https://github.com/brianc/node-postgres"},{"type":"vcs","url":"git://github.com/brianc/node-postgres.git"}],"type":"library","bom-ref":"pkg:npm/pg@8.18.0","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/pg/package.json"},{"name":"ImportedModules","value":"pg,Pool,pg/Pool,PoolClient,pg/PoolClient,QueryResult,pg/QueryResult,QueryResultRow,pg/QueryResultRow"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/pg/package.json"}],"concludedValue":"packages/appkit/node_modules/pg/package.json"}],"occurrences":[{"location":"src/cache/storage/persistent.ts#2"},{"location":"src/connectors/lakebase/index.ts#5"},{"location":"src/connectors/lakebase/pool-manager.ts#2"},{"location":"src/connectors/lakebase/routing-pool.ts#1"},{"location":"src/plugins/lakebase/lakebase.ts#1"}]}},{"authors":[{"name":"Alexey Raspopov"}],"group":"","name":"picocolors","version":"1.1.1","description":"The tiniest and the fastest library for terminal output formatting with ANSI colors","scope":"required","licenses":[{"license":{"id":"ISC","url":"https://opensource.org/licenses/ISC"}}],"purl":"pkg:npm/picocolors@1.1.1","type":"library","bom-ref":"pkg:npm/picocolors@1.1.1","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/picocolors/package.json"},{"name":"ImportedModules","value":"picocolors"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/picocolors/package.json"}],"concludedValue":"packages/appkit/node_modules/picocolors/package.json"}],"occurrences":[{"location":"dist/errors/configuration.js#2"},{"location":"dist/plugins/agents/agents.js#26"},{"location":"dist/plugins/server/client-config-sanitizer.js#2"},{"location":"dist/plugins/server/utils.js#2"},{"location":"dist/type-generator/migration.js#2"},{"location":"dist/type-generator/query-registry.js#6"},{"location":"dist/type-generator/serving/generator.js#8"},{"location":"tmp/dist/errors/configuration.js#2"},{"location":"tmp/dist/plugins/agents/agents.js#26"},{"location":"tmp/dist/plugins/server/client-config-sanitizer.js#2"},{"location":"tmp/dist/plugins/server/utils.js#2"},{"location":"tmp/dist/type-generator/migration.js#2"},{"location":"tmp/dist/type-generator/query-registry.js#6"},{"location":"tmp/dist/type-generator/serving/generator.js#8"},{"location":"src/errors/configuration.ts#1"},{"location":"src/plugins/agents/agents.ts#4"},{"location":"src/plugins/server/client-config-sanitizer.ts#1"},{"location":"src/plugins/server/utils.ts#5"},{"location":"src/type-generator/migration.ts#4"},{"location":"src/type-generator/query-registry.ts#4"},{"location":"src/type-generator/serving/generator.ts#4"}]}},{"authors":[{"name":"GitHub Inc."}],"group":"","name":"semver","version":"7.7.3","description":"The semantic version parser used by npm.","scope":"required","licenses":[{"license":{"id":"ISC","url":"https://opensource.org/licenses/ISC"}}],"purl":"pkg:npm/semver@7.7.3","externalReferences":[{"type":"vcs","url":"git+https://github.com/npm/node-semver.git"}],"type":"library","bom-ref":"pkg:npm/semver@7.7.3","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/semver/package.json"},{"name":"ImportedModules","value":"semver,coerce,semver/coerce"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/semver/package.json"}],"concludedValue":"packages/appkit/node_modules/semver/package.json"}],"occurrences":[{"location":"dist/context/service-context.js#8"},{"location":"tmp/dist/context/service-context.js#8"},{"location":"src/context/service-context.ts#8"}]}},{"group":"","name":"shared","version":"0.0.1","scope":"required","purl":"pkg:npm/shared@0.0.1","type":"library","bom-ref":"pkg:npm/shared@0.0.1","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/shared/package.json"},{"name":"ExportedModules","value":"shared,AgentAdapter,shared/AgentAdapter,AgentEvent,shared/AgentEvent,AgentInput,shared/AgentInput,AgentRunContext,shared/AgentRunContext,AgentToolDefinition,shared/AgentToolDefinition,Message,shared/Message,Thread,shared/Thread,ThreadStore,shared/ThreadStore,ToolAnnotations,shared/ToolAnnotations,ToolProvider,shared/ToolProvider,GenieAttachmentResponse,shared/GenieAttachmentResponse,GenieMessageResponse,shared/GenieMessageResponse,GenieStatementResponse,shared/GenieStatementResponse,GenieStreamEvent,shared/GenieStreamEvent,BasePluginConfig,shared/BasePluginConfig,CacheConfig,shared/CacheConfig,IAppRouter,shared/IAppRouter,PluginData,shared/PluginData,StreamExecutionSettings,shared/StreamExecutionSettings,isSQLTypeMarker,shared/isSQLTypeMarker,shared/sql"},{"name":"ImportedModules","value":"shared,AgentAdapter,shared/AgentAdapter,AgentEvent,shared/AgentEvent,AgentInput,shared/AgentInput,AgentRunContext,shared/AgentRunContext,AgentToolDefinition,shared/AgentToolDefinition,CacheConfig,shared/CacheConfig,CacheEntry,shared/CacheEntry,CacheStorage,shared/CacheStorage,TelemetryOptions,shared/TelemetryOptions,GenieMessageResponse,shared/GenieMessageResponse,Message,shared/Message,PluginConstructor,shared/PluginConstructor,PluginData,shared/PluginData,ToolProvider,shared/ToolProvider,ToolAnnotations,shared/ToolAnnotations,BasePluginConfig,shared/BasePluginConfig,ThreadStore,shared/ThreadStore,BasePlugin,shared/BasePlugin,InputPluginMap,shared/InputPluginMap,OptionalConfigPluginDef,shared/OptionalConfigPluginDef,PluginMap,shared/PluginMap,IAppRequest,shared/IAppRequest,TunnelConnection,shared/TunnelConnection,RetryConfig,shared/RetryConfig,TelemetryConfig,shared/TelemetryConfig,IAppResponse,shared/IAppResponse,PluginEndpointMap,shared/PluginEndpointMap,PluginExecuteConfig,shared/PluginExecuteConfig,PluginExecutionSettings,shared/PluginExecutionSettings,PluginPhase,shared/PluginPhase,RouteConfig,shared/RouteConfig,StreamExecuteHandler,shared/StreamExecuteHandler,StreamExecutionSettings,shared/StreamExecutionSettings,ToPlugin,shared/ToPlugin,IAppRouter,shared/IAppRouter,ResponseOutputMessage,shared/ResponseOutputMessage,ResponseStreamEvent,shared/ResponseStreamEvent,Thread,shared/Thread,ResponseFunctionCallOutput,shared/ResponseFunctionCallOutput,ResponseFunctionToolCall,shared/ResponseFunctionToolCall,SQLTypeMarker,shared/SQLTypeMarker,isSQLTypeMarker,shared/isSQLTypeMarker,shared/sql,PluginClientConfigs,shared/PluginClientConfigs,PluginEndpoints,shared/PluginEndpoints,ResourceFieldEntry,shared/ResourceFieldEntry,PluginManifest,shared/PluginManifest,StreamConfig,shared/StreamConfig"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/shared/package.json"}],"concludedValue":"packages/appkit/node_modules/shared/package.json"}],"occurrences":[{"location":"src/agents/databricks.ts#7"},{"location":"src/beta.ts#20"},{"location":"src/cache/defaults.ts#1"},{"location":"src/cache/index.ts#3"},{"location":"src/cache/storage/memory.ts#1"},{"location":"src/cache/storage/persistent.ts#3"},{"location":"src/connectors/files/client.ts#3"},{"location":"src/connectors/genie/types.ts#3"},{"location":"src/connectors/genie/types.ts#10"},{"location":"src/connectors/jobs/types.ts#1"},{"location":"src/connectors/mcp/client.ts#25"},{"location":"src/connectors/sql-warehouse/client.ts#6"},{"location":"src/connectors/vector-search/types.ts#1"},{"location":"src/core/agent/build-toolkit.ts#1"},{"location":"src/core/agent/consume-adapter-stream.ts#1"},{"location":"src/core/agent/load-agents.ts#5"},{"location":"src/core/agent/run-agent.ts#10"},{"location":"src/core/agent/toolkit-resolver.ts#1"},{"location":"src/core/agent/tools/define-tool.ts#1"},{"location":"src/core/agent/tools/function-tool.ts#1"},{"location":"src/core/agent/tools/tool.ts#1"},{"location":"src/core/agent/types.ts#7"},{"location":"src/core/appkit.ts#10"},{"location":"src/core/plugin-context.ts#2"},{"location":"src/index.ts#15"},{"location":"src/index.ts#16"},{"location":"src/plugin/dev-reader.ts#2"},{"location":"src/plugin/index.ts#1"},{"location":"src/plugin/interceptors/cache.ts#1"},{"location":"src/plugin/interceptors/retry.ts#1"},{"location":"src/plugin/interceptors/telemetry.ts#1"},{"location":"src/plugin/plugin.ts#14"},{"location":"src/plugin/to-plugin.ts#1"},{"location":"src/plugins/agents/agents.ts#18"},{"location":"src/plugins/agents/defaults.ts#1"},{"location":"src/plugins/agents/event-translator.ts#8"},{"location":"src/plugins/agents/thread-store.ts#2"},{"location":"src/plugins/analytics/analytics.ts#10"},{"location":"src/plugins/analytics/defaults.ts#1"},{"location":"src/plugins/analytics/query.ts#3"},{"location":"src/plugins/analytics/types.ts#1"},{"location":"src/plugins/files/defaults.ts#1"},{"location":"src/plugins/files/plugin.ts#10"},{"location":"src/plugins/files/types.ts#2"},{"location":"src/plugins/genie/defaults.ts#1"},{"location":"src/plugins/genie/genie.ts#8"},{"location":"src/plugins/genie/types.ts#1"},{"location":"src/plugins/genie/types.ts#4"},{"location":"src/plugins/jobs/defaults.ts#1"},{"location":"src/plugins/jobs/plugin.ts#9"},{"location":"src/plugins/jobs/types.ts#2"},{"location":"src/plugins/lakebase/lakebase.ts#2"},{"location":"src/plugins/lakebase/types.ts#1"},{"location":"src/plugins/server/index.ts#7"},{"location":"src/plugins/server/remote-tunnel/remote-tunnel-manager.ts#7"},{"location":"src/plugins/server/types.ts#1"},{"location":"src/plugins/server/utils.ts#6"},{"location":"src/plugins/serving/serving.ts#5"},{"location":"src/plugins/serving/types.ts#1"},{"location":"src/plugins/vector-search/defaults.ts#1"},{"location":"src/plugins/vector-search/types.ts#1"},{"location":"src/plugins/vector-search/vector-search.ts#2"},{"location":"src/registry/manifest-loader.ts#1"},{"location":"src/registry/resource-registry.ts#13"},{"location":"src/registry/types.ts#33"},{"location":"src/registry/types.ts#39"},{"location":"src/stream/sse-writer.ts#1"},{"location":"src/stream/stream-manager.ts#3"},{"location":"src/stream/types.ts#2"},{"location":"src/telemetry/telemetry-manager.ts#24"},{"location":"src/telemetry/telemetry-provider.ts#5"}]},"tags":["sql"]},{"authors":[{"name":"Einar Otto Stangvik <einaros@gmail.com> (http://2x.io)"}],"group":"","name":"ws","version":"8.18.3","description":"Simple to use, blazing fast and thoroughly tested websocket client and server for Node.js","scope":"required","licenses":[{"license":{"id":"MIT","url":"https://opensource.org/licenses/MIT"}}],"purl":"pkg:npm/ws@8.18.3","externalReferences":[{"type":"vcs","url":"https://github.com/websockets/ws"},{"type":"vcs","url":"git+https://github.com/websockets/ws.git"}],"type":"library","bom-ref":"pkg:npm/ws@8.18.3","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/ws/package.json"},{"name":"ImportedModules","value":"ws,WebSocketServer,ws/WebSocketServer"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/ws/package.json"}],"concludedValue":"packages/appkit/node_modules/ws/package.json"}],"occurrences":[{"location":"dist/plugins/server/remote-tunnel/remote-tunnel-manager.js#8"},{"location":"tmp/dist/plugins/server/remote-tunnel/remote-tunnel-manager.js#8"},{"location":"src/plugins/server/remote-tunnel/remote-tunnel-manager.ts#8"}]}},{"authors":[{"name":"Colin McDonnell <zod@colinhacks.com>"}],"group":"","name":"zod","version":"4.3.6","description":"TypeScript-first schema declaration and validation library with static type inference","scope":"required","licenses":[{"license":{"id":"MIT","url":"https://opensource.org/licenses/MIT"}}],"purl":"pkg:npm/zod@4.3.6","externalReferences":[{"type":"website","url":"https://zod.dev"},{"type":"vcs","url":"git+https://github.com/colinhacks/zod.git"}],"type":"library","bom-ref":"pkg:npm/zod@4.3.6","properties":[{"name":"SrcFile","value":"packages/appkit/node_modules/zod/package.json"},{"name":"ImportedModules","value":"zod,toJSONSchema,zod/toJSONSchema,zod/z"}],"evidence":{"identity":[{"field":"purl","confidence":0.7,"methods":[{"technique":"manifest-analysis","confidence":0.7,"value":"packages/appkit/node_modules/zod/package.json"}],"concludedValue":"packages/appkit/node_modules/zod/package.json"}],"occurrences":[{"location":"dist/core/agent/tools/json-schema.js#1"},{"location":"dist/plugins/agents/schemas.js#1"},{"location":"dist/plugins/analytics/analytics.js#16"},{"location":"dist/plugins/files/plugin.js#23"},{"location":"dist/plugins/genie/genie.js#15"},{"location":"dist/plugins/jobs/plugin.js#17"},{"location":"dist/plugins/lakebase/lakebase.js#13"},{"location":"tmp/dist/core/agent/tools/json-schema.js#1"},{"location":"tmp/dist/plugins/agents/schemas.js#1"},{"location":"tmp/dist/plugins/analytics/analytics.js#16"},{"location":"tmp/dist/plugins/files/plugin.js#23"},{"location":"tmp/dist/plugins/genie/genie.js#15"},{"location":"tmp/dist/plugins/jobs/plugin.js#17"},{"location":"tmp/dist/plugins/lakebase/lakebase.js#13"},{"location":"tmp/dist/schemas/manifest.js#1"},{"location":"src/core/agent/tools/define-tool.ts#2"},{"location":"src/core/agent/tools/json-schema.ts#1"},{"location":"src/core/agent/tools/tool.ts#2"},{"location":"src/plugins/agents/schemas.ts#1"},{"location":"src/plugins/analytics/analytics.ts#11"},{"location":"src/plugins/files/plugin.ts#11"},{"location":"src/plugins/genie/genie.ts#9"},{"location":"src/plugins/jobs/plugin.ts#10"},{"location":"src/plugins/jobs/types.ts#3"},{"location":"src/plugins/lakebase/lakebase.ts#3"}]},"tags":["validation"]}],"dependencies":[],"compositions":[{"bom-ref":"pkg:npm/@databricks/appkit@0.38.1","aggregate":"incomplete"}],"annotations":[{"bom-ref":"metadata-annotations","subjects":["pkg:npm/@databricks/appkit@0.38.1"],"annotator":{"component":{"group":"@cyclonedx","name":"cdxgen","version":"12.1.2","purl":"pkg:npm/%40cyclonedx/cdxgen@12.1.2","type":"application","bom-ref":"pkg:npm/@cyclonedx/cdxgen@12.1.2","publisher":"OWASP Foundation","authors":[{"name":"OWASP Foundation"}]}},"timestamp":"2026-05-25T10:44:08Z","text":"This Software Bill-of-Materials (SBOM) document was created on Monday, May 25, 2026 with cdxgen. The data was captured during the build lifecycle phase. The document describes an application named 'appkit' with version '0.38.1'. There are 30 components. The package type in this SBOM is npm with 3 purl namespaces described under components. The components were identified from 30 source files."}]}
|