@databricks/appkit 0.40.0 → 0.41.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/dist/appkit/package.js +1 -1
- package/dist/plugin/plugin.d.ts.map +1 -1
- package/dist/plugin/plugin.js +4 -4
- package/dist/plugin/plugin.js.map +1 -1
- package/dist/schemas/manifest.d.ts.map +1 -1
- package/dist/schemas/manifest.js +1 -1
- package/dist/schemas/manifest.js.map +1 -1
- package/dist/shared/src/schemas/manifest.d.ts.map +1 -1
- package/package.json +1 -1
- package/sbom.cdx.json +1 -1
package/dist/appkit/package.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","names":[],"sources":["../../src/plugin/plugin.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAuNsB,MAAA,iBACJ,gBAAA,GAAmB,gBAAA,aACxB,UAAA;EAAA,UA6BW,MAAA,EAAQ,OAAA;EAAA,UA3BpB,OAAA;EAAA,UACA,KAAA,EAAQ,YAAA;EAAA,UACR,GAAA,EAAK,UAAA;EAAA,UACL,aAAA,EAAe,aAAA;EAAA,UACf,aAAA,EAAe,aAAA;EAAA,UACf,SAAA,EAAY,UAAA;EAAA,UACZ,OAAA,GAAU,aAAA;
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","names":[],"sources":["../../src/plugin/plugin.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAuNsB,MAAA,iBACJ,gBAAA,GAAmB,gBAAA,aACxB,UAAA;EAAA,UA6BW,MAAA,EAAQ,OAAA;EAAA,UA3BpB,OAAA;EAAA,UACA,KAAA,EAAQ,YAAA;EAAA,UACR,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CACR,MAAA,EAAQ,OAAA,CAAQ,MAAA,EAChB,MAAA,EAAQ,WAAA;EAAA,QAeF,qBAAA;EAAA,QAaA,kBAAA;EAAA,QAqCM,wBAAA;EAAA,QAqBN,iBAAA;AAAA"}
|
package/dist/plugin/plugin.js
CHANGED
|
@@ -325,10 +325,10 @@ var Plugin = class {
|
|
|
325
325
|
* @throws AuthenticationError in production when no user header is present.
|
|
326
326
|
*/
|
|
327
327
|
resolveUserId(req) {
|
|
328
|
-
const userId = req.header("x-forwarded-user");
|
|
328
|
+
const userId = req.header("x-forwarded-user")?.trim();
|
|
329
329
|
if (userId) return userId;
|
|
330
330
|
if (process.env.NODE_ENV === "development") return getCurrentUserId();
|
|
331
|
-
throw AuthenticationError.
|
|
331
|
+
throw AuthenticationError.missingUserId();
|
|
332
332
|
}
|
|
333
333
|
/**
|
|
334
334
|
* Execute operations using the user's identity from the request.
|
|
@@ -341,8 +341,8 @@ var Plugin = class {
|
|
|
341
341
|
* In development mode (`NODE_ENV=development`), skips user impersonation instead of throwing.
|
|
342
342
|
*/
|
|
343
343
|
asUser(req) {
|
|
344
|
-
const token = req.header("x-forwarded-access-token");
|
|
345
|
-
const userId = req.header("x-forwarded-user");
|
|
344
|
+
const token = req.header("x-forwarded-access-token")?.trim();
|
|
345
|
+
const userId = req.header("x-forwarded-user")?.trim();
|
|
346
346
|
const userEmail = req.header("x-forwarded-email");
|
|
347
347
|
const isDev = process.env.NODE_ENV === "development";
|
|
348
348
|
if (!token && isDev) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","names":["otelContext","context"],"sources":["../../src/plugin/plugin.ts"],"sourcesContent":["import { createContextKey, context as otelContext } from \"@opentelemetry/api\";\nimport type express from \"express\";\nimport type {\n BasePlugin,\n BasePluginConfig,\n IAppResponse,\n PluginEndpointMap,\n PluginExecuteConfig,\n PluginExecutionSettings,\n PluginPhase,\n RouteConfig,\n StreamExecuteHandler,\n StreamExecutionSettings,\n} from \"shared\";\nimport { AppManager } from \"../app\";\nimport { CacheManager } from \"../cache\";\nimport { getCurrentUserId, runInUserContext, ServiceContext } from \"../context\";\nimport type { PluginContext } from \"../core/plugin-context\";\nimport { AppKitError, AuthenticationError } from \"../errors\";\nimport { createLogger } from \"../logging/logger\";\nimport { StreamManager } from \"../stream\";\nimport {\n type ITelemetry,\n normalizeTelemetryOptions,\n TelemetryManager,\n} from \"../telemetry\";\nimport { deepMerge } from \"../utils\";\nimport { DevFileReader } from \"./dev-reader\";\nimport type { ExecutionResult } from \"./execution-result\";\nimport { CacheInterceptor } from \"./interceptors/cache\";\nimport { RetryInterceptor } from \"./interceptors/retry\";\nimport { TelemetryInterceptor } from \"./interceptors/telemetry\";\nimport { TimeoutInterceptor } from \"./interceptors/timeout\";\nimport type {\n ExecutionInterceptor,\n InterceptorContext,\n} from \"./interceptors/types\";\n\nconst logger = createLogger(\"plugin\");\n\n/**\n * OTel context key for marking OBO dev mode fallback.\n * Set when asUser() is called in development mode without a user token.\n */\nconst DEV_OBO_FALLBACK_KEY = createContextKey(\"appkit.devOboFallback\");\n\n/**\n * Returns true if `value` is a plain object literal (not an array, Date,\n * class instance, etc.). Used to decide whether to recurse into nested\n * export shapes when wrapping functions.\n *\n * @internal exported so the AppKit core can reuse the same predicate for\n * its `bindExportMethods` walk; not part of the public package surface.\n */\nexport function isPlainObject(\n value: unknown,\n): value is Record<string, unknown> {\n if (typeof value !== \"object\" || value === null) return false;\n const proto = Object.getPrototypeOf(value);\n return proto === Object.prototype || proto === null;\n}\n\n/**\n * Returns a deep copy of `exports` where every function has been replaced\n * with `wrap(fn)`, walking into nested plain objects.\n *\n * Used by the asUser proxy to make the user context follow function\n * references that escape the proxy via `exports()`. The original input is\n * not mutated, so plugins that memoize `exports()` are safe — each call\n * through the proxy yields an independent, freshly wrapped view.\n */\nfunction wrapExportFunctions(\n exports: Record<string, unknown>,\n wrap: (fn: (...a: unknown[]) => unknown) => (...a: unknown[]) => unknown,\n): Record<string, unknown> {\n const result: Record<string, unknown> = {};\n for (const key of Object.keys(exports)) {\n const val = exports[key];\n if (typeof val === \"function\") {\n result[key] = wrap(val as (...a: unknown[]) => unknown);\n } else if (isPlainObject(val)) {\n result[key] = wrapExportFunctions(val, wrap);\n } else {\n result[key] = val;\n }\n }\n return result;\n}\n\n/**\n * Returns true if the current execution is an OBO dev mode fallback\n * (asUser() was called but fell back to service principal due to missing token).\n */\nexport function isDevOboFallback(): boolean {\n return otelContext.active().getValue(DEV_OBO_FALLBACK_KEY) === true;\n}\n\n/**\n * Narrow an unknown thrown value to an Error that carries a numeric\n * `statusCode` property (e.g. `ApiError` from `@databricks/sdk-experimental`).\n */\nfunction hasHttpStatusCode(\n error: unknown,\n): error is Error & { statusCode: number } {\n return (\n error instanceof Error &&\n \"statusCode\" in error &&\n typeof (error as Record<string, unknown>).statusCode === \"number\"\n );\n}\n\n/**\n * Methods that should not be proxied by asUser().\n * These are lifecycle/internal methods that don't make sense\n * to execute in a user context.\n */\nconst EXCLUDED_FROM_PROXY = new Set([\n // Lifecycle methods\n \"setup\",\n \"shutdown\",\n \"attachContext\",\n \"injectRoutes\",\n \"getEndpoints\",\n \"getSkipBodyParsingPaths\",\n \"abortActiveOperations\",\n \"clientConfig\",\n // asUser itself - prevent chaining like .asUser().asUser()\n \"asUser\",\n // Internal methods\n \"constructor\",\n]);\n\n/**\n * Base abstract class for creating AppKit plugins.\n *\n * All plugins must declare a static `manifest` property with their metadata\n * and resource requirements. The manifest defines:\n * - `required` resources: Always needed for the plugin to function\n * - `optional` resources: May be needed depending on plugin configuration\n *\n * ## Static vs Runtime Resource Requirements\n *\n * The manifest is static and doesn't know the plugin's runtime configuration.\n * For resources that become required based on config options, plugins can\n * implement a static `getResourceRequirements(config)` method.\n *\n * At runtime, this method is called with the actual config to determine\n * which \"optional\" resources should be treated as \"required\".\n *\n * @example Basic plugin with static requirements\n * ```typescript\n * import { Plugin, toPlugin, PluginManifest, ResourceType } from '@databricks/appkit';\n *\n * const myManifest: PluginManifest = {\n * name: 'myPlugin',\n * displayName: 'My Plugin',\n * description: 'Does something awesome',\n * resources: {\n * required: [\n * { type: ResourceType.SQL_WAREHOUSE, alias: 'warehouse', ... }\n * ],\n * optional: []\n * }\n * };\n *\n * class MyPlugin extends Plugin<MyConfig> {\n * static manifest = myManifest;\n * }\n * ```\n *\n * @example Plugin with config-dependent resources\n * ```typescript\n * interface MyConfig extends BasePluginConfig {\n * enableCaching?: boolean;\n * }\n *\n * const myManifest: PluginManifest = {\n * name: 'myPlugin',\n * resources: {\n * required: [\n * { type: ResourceType.SQL_WAREHOUSE, alias: 'warehouse', ... }\n * ],\n * optional: [\n * // Database is optional in the static manifest\n * { type: ResourceType.DATABASE, alias: 'cache', description: 'Required if caching enabled', ... }\n * ]\n * }\n * };\n *\n * class MyPlugin extends Plugin<MyConfig> {\n * static manifest = myManifest<\"myPlugin\">;\n *\n * // Runtime method: converts optional resources to required based on config\n * static getResourceRequirements(config: MyConfig) {\n * const resources = [];\n * if (config.enableCaching) {\n * // When caching is enabled, Database becomes required\n * resources.push({\n * type: ResourceType.DATABASE,\n * alias: 'cache',\n * resourceKey: 'database',\n * description: 'Cache storage for query results',\n * permission: 'CAN_CONNECT_AND_CREATE',\n * fields: {\n * instance_name: { env: 'DATABRICKS_CACHE_INSTANCE' },\n * database_name: { env: 'DATABRICKS_CACHE_DB' },\n * },\n * required: true // Mark as required at runtime\n * });\n * }\n * return resources;\n * }\n * }\n * ```\n */\nexport abstract class Plugin<\n TConfig extends BasePluginConfig = BasePluginConfig,\n> implements BasePlugin\n{\n protected isReady = false;\n protected cache!: CacheManager;\n protected app: AppManager;\n protected devFileReader: DevFileReader;\n protected streamManager: StreamManager;\n protected telemetry!: ITelemetry;\n protected context?: PluginContext;\n\n /** Registered endpoints for this plugin */\n private registeredEndpoints: PluginEndpointMap = {};\n\n /** Paths that opt out of JSON body parsing (e.g. file upload routes) */\n private skipBodyParsingPaths: Set<string> = new Set();\n\n /**\n * Plugin initialization phase.\n * - 'core': Initialized first (e.g., config plugins)\n * - 'normal': Initialized second (most plugins)\n * - 'deferred': Initialized last (e.g., server plugin)\n */\n static phase: PluginPhase = \"normal\";\n\n /**\n * Plugin name identifier.\n */\n name: string;\n\n constructor(protected config: TConfig) {\n this.name =\n config.name ??\n (this.constructor as { manifest?: { name: string } }).manifest?.name ??\n \"plugin\";\n this.streamManager = new StreamManager();\n this.app = new AppManager();\n this.devFileReader = DevFileReader.getInstance();\n this.context = (config as Record<string, unknown>).context as\n | PluginContext\n | undefined;\n\n // Eagerly bind telemetry + cache if the core services have already been\n // initialized (normal createApp path, or tests that mock CacheManager).\n // If they haven't, we leave these undefined and rely on `attachContext`\n // being called later — this lets factories eagerly construct plugin\n // instances at module top-level before `createApp` has run.\n this.tryAttachContext();\n }\n\n private tryAttachContext(): void {\n try {\n this.cache = CacheManager.getInstanceSync();\n } catch {\n return;\n }\n this.telemetry = TelemetryManager.getProvider(\n this.name,\n this.config.telemetry,\n );\n this.isReady = true;\n }\n\n /**\n * Binds runtime dependencies (telemetry provider, cache, plugin context) to\n * this plugin. Called by `AppKit._createApp` after construction and before\n * `setup()`. Idempotent: safe to call if the constructor already bound them\n * eagerly. Kept separate so factories can eagerly construct plugin instances\n * without running this before `TelemetryManager.initialize()` /\n * `CacheManager.getInstance()` have run.\n */\n attachContext(\n deps: {\n context?: unknown;\n telemetryConfig?: BasePluginConfig[\"telemetry\"];\n } = {},\n ): void {\n if (!this.cache) {\n this.cache = CacheManager.getInstanceSync();\n }\n this.telemetry = TelemetryManager.getProvider(\n this.name,\n deps.telemetryConfig ?? this.config.telemetry,\n );\n if (deps.context !== undefined) {\n this.context = deps.context as PluginContext;\n }\n this.isReady = true;\n }\n\n injectRoutes(_: express.Router) {\n return;\n }\n\n async setup() {}\n\n getEndpoints(): PluginEndpointMap {\n return this.registeredEndpoints;\n }\n\n getSkipBodyParsingPaths(): ReadonlySet<string> {\n return this.skipBodyParsingPaths;\n }\n\n abortActiveOperations(): void {\n this.streamManager.abortAll();\n }\n\n /**\n * Returns the public exports for this plugin.\n * Override this to define a custom public API.\n * By default, returns an empty object.\n *\n * The returned object becomes the plugin's public API on the AppKit instance\n * (e.g. `appkit.myPlugin.method()`). AppKit automatically binds method context\n * and adds `asUser(req)` for user-scoped execution.\n *\n * @example\n * ```ts\n * class MyPlugin extends Plugin {\n * private getData() { return []; }\n *\n * exports() {\n * return { getData: this.getData };\n * }\n * }\n *\n * // After registration:\n * const appkit = await createApp({ plugins: [myPlugin()] });\n * appkit.myPlugin.getData();\n * ```\n */\n exports(): unknown {\n return {};\n }\n\n /**\n * Returns startup config to expose to the client.\n * Override this to surface server-side values that are safe to publish to the\n * frontend, such as feature flags, resource IDs, or other app boot settings.\n *\n * This runs once when the server starts, so it should not depend on\n * request-scoped or user-specific state.\n *\n * String values that match non-public environment variables are redacted\n * unless you intentionally expose them via a matching `PUBLIC_APPKIT_` env var.\n *\n * Values must be JSON-serializable plain data (no functions, Dates, classes,\n * Maps, Sets, BigInts, or circular references).\n * By default returns an empty object (plugin contributes nothing to client config).\n *\n * On the client, read the config with the `usePluginClientConfig` hook\n * (React) or the `getPluginClientConfig` function (vanilla JS), both\n * from `@databricks/appkit-ui`.\n *\n * @example\n * ```ts\n * // Server — plugin definition\n * class MyPlugin extends Plugin<MyConfig> {\n * clientConfig() {\n * return {\n * warehouseId: this.config.warehouseId,\n * features: { darkMode: true },\n * };\n * }\n * }\n *\n * // Client — React component\n * import { usePluginClientConfig } from \"@databricks/appkit-ui/react\";\n *\n * interface MyPluginConfig { warehouseId: string; features: { darkMode: boolean } }\n *\n * const config = usePluginClientConfig<MyPluginConfig>(\"myPlugin\");\n * config.warehouseId; // \"abc-123\"\n *\n * // Client — vanilla JS\n * import { getPluginClientConfig } from \"@databricks/appkit-ui/js\";\n *\n * const config = getPluginClientConfig<MyPluginConfig>(\"myPlugin\");\n * ```\n */\n clientConfig(): Record<string, unknown> {\n return {};\n }\n\n /**\n * Resolve the effective user ID from a request.\n *\n * Returns the `x-forwarded-user` header when present. In development mode\n * (`NODE_ENV=development`) falls back to the current context user ID so\n * that callers outside an active `runInUserContext` scope still get a\n * consistent value.\n *\n * @throws AuthenticationError in production when no user header is present.\n */\n protected resolveUserId(req: express.Request): string {\n const userId = req.header(\"x-forwarded-user\");\n if (userId) return userId;\n if (process.env.NODE_ENV === \"development\") return getCurrentUserId();\n throw AuthenticationError.missingToken(\n \"Missing x-forwarded-user header. Cannot resolve user ID.\",\n );\n }\n\n /**\n * Execute operations using the user's identity from the request.\n * Returns a proxy of this plugin where all method calls execute\n * with the user's Databricks credentials instead of the service principal.\n *\n * @param req - The Express request containing the user token in headers\n * @returns A proxied plugin instance that executes as the user\n * @throws AuthenticationError if user token is not available in request headers (production only).\n * In development mode (`NODE_ENV=development`), skips user impersonation instead of throwing.\n */\n asUser(req: express.Request): this {\n const token = req.header(\"x-forwarded-access-token\");\n const userId = req.header(\"x-forwarded-user\");\n const userEmail = req.header(\"x-forwarded-email\");\n const isDev = process.env.NODE_ENV === \"development\";\n\n // In local development, skip user impersonation since there's no user\n // token available. Mark execution as OBO dev fallback via OTel context\n // so telemetry can distinguish intended OBO calls from regular SP calls.\n if (!token && isDev) {\n logger.warn(\n \"asUser() called without user token in development mode. Skipping user impersonation.\",\n );\n\n return this._createAsUserProxy((fn) => (...args) => {\n const ctx = otelContext.active().setValue(DEV_OBO_FALLBACK_KEY, true);\n return otelContext.with(ctx, () => fn(...args));\n });\n }\n\n if (!token) {\n throw AuthenticationError.missingToken(\"user token\");\n }\n\n if (!userId && !isDev) {\n throw AuthenticationError.missingUserId();\n }\n\n const effectiveUserId = userId || \"dev-user\";\n\n const userContext = ServiceContext.createUserContext(\n token,\n effectiveUserId,\n undefined,\n userEmail ?? undefined,\n );\n\n return this._createAsUserProxy(\n (fn) =>\n (...args) =>\n runInUserContext(userContext, () => fn(...args)),\n );\n }\n\n /**\n * Creates a proxy of `this` where every method call — and every function\n * in the result of `exports()` — runs inside `wrapCall`.\n *\n * `wrapCall` decides the per-call scope. Two strategies are used today:\n * - real OBO: fn => (...args) => runInUserContext(userContext, () => fn(...args))\n * - dev fallback: fn => (...args) => otelContext.with(DEV_OBO_FALLBACK_KEY=true, () => fn(...args))\n *\n * `exports` is intercepted because methods captured in the returned\n * exports object never re-enter the proxy's `get` trap. Wrapping them\n * here is the only way to make the user context follow function\n * references back out of the plugin.\n */\n private _createAsUserProxy(\n wrapCall: (\n fn: (...a: unknown[]) => unknown,\n ) => (...a: unknown[]) => unknown,\n ): this {\n return new Proxy(this, {\n get: (target, prop, receiver) => {\n const value = Reflect.get(target, prop, receiver);\n\n if (typeof value !== \"function\") return value;\n if (typeof prop === \"string\" && EXCLUDED_FROM_PROXY.has(prop))\n return value;\n\n if (prop === \"exports\") {\n return () => {\n const raw = (value as () => unknown).call(target);\n if (raw == null) return {};\n // Callable exports (e.g. files, jobs) manage per-call asUser\n // themselves; leave them untouched.\n if (typeof raw === \"function\") return raw;\n if (isPlainObject(raw)) {\n return wrapExportFunctions(raw, wrapCall);\n }\n return raw;\n };\n }\n\n const fn = (value as (...a: unknown[]) => unknown).bind(target);\n return wrapCall(fn);\n },\n }) as this;\n }\n\n // streaming execution with interceptors\n protected async executeStream<T>(\n res: IAppResponse,\n fn: StreamExecuteHandler<T>,\n options: StreamExecutionSettings,\n userKey?: string,\n ) {\n // destructure options\n const {\n stream: streamConfig,\n default: defaultConfig,\n user: userConfig,\n } = options;\n\n // build execution options\n const executeConfig = this._buildExecutionConfig({\n default: defaultConfig,\n user: userConfig,\n });\n\n // get user key from context if not provided\n const effectiveUserKey = userKey ?? getCurrentUserId();\n\n const self = this;\n // capture the active OTel context (HTTP span) before entering the async generator,\n // where it would otherwise be lost across the async boundary\n const parentOtelContext = otelContext.active();\n\n // wrapper function to ensure it returns a generator\n const asyncWrapperFn = async function* (streamSignal?: AbortSignal) {\n // build execution context\n const context: InterceptorContext = {\n signal: streamSignal,\n metadata: new Map(),\n userKey: effectiveUserKey,\n };\n\n // build interceptors\n const interceptors = self._buildInterceptors(executeConfig);\n\n // wrap the function to ensure it returns a promise\n const wrappedFn = async () => {\n const result = await fn(context.signal);\n return result;\n };\n\n // execute the function with interceptors, restoring the parent OTel context\n // so telemetry spans are linked as children of the HTTP request span\n const result = await otelContext.with(parentOtelContext, () =>\n self._executeWithInterceptors(\n wrappedFn as (signal?: AbortSignal) => Promise<T>,\n interceptors,\n context,\n ),\n );\n\n // check if result is a generator\n if (self._checkIfGenerator(result)) {\n yield* result;\n } else {\n yield result;\n }\n };\n\n // stream the result to the client. The effective user key is forwarded\n // to the stream manager so that reconnections to existing streamIds are\n // bound to the original creator (prevents cross-user stream takeover via\n // guessed/leaked IDs).\n await this.streamManager.stream(\n res,\n asyncWrapperFn,\n streamConfig,\n effectiveUserKey,\n );\n }\n\n /**\n * Execute a function with the plugin's interceptor chain.\n *\n * Returns an {@link ExecutionResult} discriminated union:\n * - `{ ok: true, data: T }` on success\n * - `{ ok: false, status: number, message: string }` on failure\n *\n * Errors are never thrown — the method is production-safe.\n */\n protected async execute<T>(\n fn: (signal?: AbortSignal) => Promise<T>,\n options: PluginExecutionSettings,\n userKey?: string,\n ): Promise<ExecutionResult<T>> {\n const executeConfig = this._buildExecutionConfig(options);\n\n const interceptors = this._buildInterceptors(executeConfig);\n\n // get user key from context if not provided\n const effectiveUserKey = userKey ?? getCurrentUserId();\n\n const context: InterceptorContext = {\n metadata: new Map(),\n userKey: effectiveUserKey,\n };\n\n try {\n const data = await this._executeWithInterceptors(\n fn,\n interceptors,\n context,\n );\n return { ok: true, data };\n } catch (error) {\n logger.error(\"Plugin execution failed\", { error, plugin: this.name });\n\n if (error instanceof AppKitError) {\n return {\n ok: false,\n status: error.statusCode,\n message: error.message,\n };\n }\n\n if (hasHttpStatusCode(error)) {\n const isDev = process.env.NODE_ENV !== \"production\";\n const isClientError = error.statusCode >= 400 && error.statusCode < 500;\n return {\n ok: false,\n status: error.statusCode,\n message: isDev || isClientError ? error.message : \"Server error\",\n };\n }\n\n const isDev = process.env.NODE_ENV !== \"production\";\n return {\n ok: false,\n status: 500,\n message:\n isDev && error instanceof Error ? error.message : \"Server error\",\n };\n }\n }\n\n protected registerEndpoint(name: string, path: string): void {\n this.registeredEndpoints[name] = path;\n }\n\n protected route<_TResponse>(\n router: express.Router,\n config: RouteConfig,\n ): void {\n const { name, method, path, handler } = config;\n\n router[method](path, handler);\n\n const fullPath = `/api/${this.name}${path}`;\n this.registerEndpoint(name, fullPath);\n\n if (config.skipBodyParsing) {\n this.skipBodyParsingPaths.add(fullPath);\n }\n }\n\n // build execution options by merging defaults, plugin config, and user overrides\n private _buildExecutionConfig(\n options: PluginExecutionSettings,\n ): PluginExecuteConfig {\n const { default: methodDefaults, user: userOverride } = options;\n\n // Merge: method defaults <- plugin config <- user override (highest priority)\n return deepMerge(\n deepMerge(methodDefaults, this.config),\n userOverride ?? {},\n ) as PluginExecuteConfig;\n }\n\n // build interceptors based on execute options\n private _buildInterceptors(\n options: PluginExecuteConfig,\n ): ExecutionInterceptor[] {\n const interceptors: ExecutionInterceptor[] = [];\n\n // order matters: telemetry → timeout → retry → cache (innermost to outermost)\n\n const telemetryConfig = normalizeTelemetryOptions(this.config.telemetry);\n if (\n telemetryConfig.traces &&\n (options.telemetryInterceptor?.enabled ?? true)\n ) {\n interceptors.push(\n new TelemetryInterceptor(this.telemetry, options.telemetryInterceptor),\n );\n }\n\n if (options.timeout && options.timeout > 0) {\n interceptors.push(new TimeoutInterceptor(options.timeout));\n }\n\n if (\n options.retry?.enabled &&\n options.retry.attempts &&\n options.retry.attempts > 1\n ) {\n interceptors.push(new RetryInterceptor(options.retry));\n }\n\n if (options.cache?.enabled && options.cache.cacheKey?.length) {\n interceptors.push(new CacheInterceptor(this.cache, options.cache));\n }\n\n return interceptors;\n }\n\n // execute method wrapped with interceptors\n private async _executeWithInterceptors<T>(\n fn: (signal?: AbortSignal) => Promise<T>,\n interceptors: ExecutionInterceptor[],\n context: InterceptorContext,\n ): Promise<T> {\n // no interceptors, execute directly\n if (interceptors.length === 0) {\n return fn(context.signal);\n }\n // build nested execution chain from interceptors\n let wrappedFn = () => fn(context.signal);\n\n // wrap each interceptor around the previous function\n for (const interceptor of interceptors) {\n const previousFn = wrappedFn;\n wrappedFn = () => interceptor.intercept(previousFn, context);\n }\n\n return wrappedFn();\n }\n\n private _checkIfGenerator(\n result: any,\n ): result is AsyncGenerator<any, void, unknown> {\n return (\n result && typeof result === \"object\" && Symbol.asyncIterator in result\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAsCA,MAAM,SAAS,aAAa,SAAS;;;;;AAMrC,MAAM,uBAAuB,iBAAiB,wBAAwB;;;;;;;;;AAUtE,SAAgB,cACd,OACkC;AAClC,KAAI,OAAO,UAAU,YAAY,UAAU,KAAM,QAAO;CACxD,MAAM,QAAQ,OAAO,eAAe,MAAM;AAC1C,QAAO,UAAU,OAAO,aAAa,UAAU;;;;;;;;;;;AAYjD,SAAS,oBACP,SACA,MACyB;CACzB,MAAM,SAAkC,EAAE;AAC1C,MAAK,MAAM,OAAO,OAAO,KAAK,QAAQ,EAAE;EACtC,MAAM,MAAM,QAAQ;AACpB,MAAI,OAAO,QAAQ,WACjB,QAAO,OAAO,KAAK,IAAoC;WAC9C,cAAc,IAAI,CAC3B,QAAO,OAAO,oBAAoB,KAAK,KAAK;MAE5C,QAAO,OAAO;;AAGlB,QAAO;;;;;;AAOT,SAAgB,mBAA4B;AAC1C,QAAOA,QAAY,QAAQ,CAAC,SAAS,qBAAqB,KAAK;;;;;;AAOjE,SAAS,kBACP,OACyC;AACzC,QACE,iBAAiB,SACjB,gBAAgB,SAChB,OAAQ,MAAkC,eAAe;;;;;;;AAS7D,MAAM,sBAAsB,IAAI,IAAI;CAElC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CAEA;CACD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqF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CAAC;AAGpE,SAAO;;CAIT,MAAc,yBACZ,IACA,cACA,SACY;AAEZ,MAAI,aAAa,WAAW,EAC1B,QAAO,GAAG,QAAQ,OAAO;EAG3B,IAAI,kBAAkB,GAAG,QAAQ,OAAO;AAGxC,OAAK,MAAM,eAAe,cAAc;GACtC,MAAM,aAAa;AACnB,qBAAkB,YAAY,UAAU,YAAY,QAAQ;;AAG9D,SAAO,WAAW;;CAGpB,AAAQ,kBACN,QAC8C;AAC9C,SACE,UAAU,OAAO,WAAW,YAAY,OAAO,iBAAiB"}
|
|
1
|
+
{"version":3,"file":"plugin.js","names":["otelContext","context"],"sources":["../../src/plugin/plugin.ts"],"sourcesContent":["import { createContextKey, context as otelContext } from \"@opentelemetry/api\";\nimport type express from \"express\";\nimport type {\n BasePlugin,\n BasePluginConfig,\n IAppResponse,\n PluginEndpointMap,\n PluginExecuteConfig,\n PluginExecutionSettings,\n PluginPhase,\n RouteConfig,\n StreamExecuteHandler,\n StreamExecutionSettings,\n} from \"shared\";\nimport { AppManager } from \"../app\";\nimport { CacheManager } from \"../cache\";\nimport { getCurrentUserId, runInUserContext, ServiceContext } from \"../context\";\nimport type { PluginContext } from \"../core/plugin-context\";\nimport { AppKitError, AuthenticationError } from \"../errors\";\nimport { createLogger } from \"../logging/logger\";\nimport { StreamManager } from \"../stream\";\nimport {\n type ITelemetry,\n normalizeTelemetryOptions,\n TelemetryManager,\n} from \"../telemetry\";\nimport { deepMerge } from \"../utils\";\nimport { DevFileReader } from \"./dev-reader\";\nimport type { ExecutionResult } from \"./execution-result\";\nimport { CacheInterceptor } from \"./interceptors/cache\";\nimport { RetryInterceptor } from \"./interceptors/retry\";\nimport { TelemetryInterceptor } from \"./interceptors/telemetry\";\nimport { TimeoutInterceptor } from \"./interceptors/timeout\";\nimport type {\n ExecutionInterceptor,\n InterceptorContext,\n} from \"./interceptors/types\";\n\nconst logger = createLogger(\"plugin\");\n\n/**\n * OTel context key for marking OBO dev mode fallback.\n * Set when asUser() is called in development mode without a user token.\n */\nconst DEV_OBO_FALLBACK_KEY = createContextKey(\"appkit.devOboFallback\");\n\n/**\n * Returns true if `value` is a plain object literal (not an array, Date,\n * class instance, etc.). Used to decide whether to recurse into nested\n * export shapes when wrapping functions.\n *\n * @internal exported so the AppKit core can reuse the same predicate for\n * its `bindExportMethods` walk; not part of the public package surface.\n */\nexport function isPlainObject(\n value: unknown,\n): value is Record<string, unknown> {\n if (typeof value !== \"object\" || value === null) return false;\n const proto = Object.getPrototypeOf(value);\n return proto === Object.prototype || proto === null;\n}\n\n/**\n * Returns a deep copy of `exports` where every function has been replaced\n * with `wrap(fn)`, walking into nested plain objects.\n *\n * Used by the asUser proxy to make the user context follow function\n * references that escape the proxy via `exports()`. The original input is\n * not mutated, so plugins that memoize `exports()` are safe — each call\n * through the proxy yields an independent, freshly wrapped view.\n */\nfunction wrapExportFunctions(\n exports: Record<string, unknown>,\n wrap: (fn: (...a: unknown[]) => unknown) => (...a: unknown[]) => unknown,\n): Record<string, unknown> {\n const result: Record<string, unknown> = {};\n for (const key of Object.keys(exports)) {\n const val = exports[key];\n if (typeof val === \"function\") {\n result[key] = wrap(val as (...a: unknown[]) => unknown);\n } else if (isPlainObject(val)) {\n result[key] = wrapExportFunctions(val, wrap);\n } else {\n result[key] = val;\n }\n }\n return result;\n}\n\n/**\n * Returns true if the current execution is an OBO dev mode fallback\n * (asUser() was called but fell back to service principal due to missing token).\n */\nexport function isDevOboFallback(): boolean {\n return otelContext.active().getValue(DEV_OBO_FALLBACK_KEY) === true;\n}\n\n/**\n * Narrow an unknown thrown value to an Error that carries a numeric\n * `statusCode` property (e.g. `ApiError` from `@databricks/sdk-experimental`).\n */\nfunction hasHttpStatusCode(\n error: unknown,\n): error is Error & { statusCode: number } {\n return (\n error instanceof Error &&\n \"statusCode\" in error &&\n typeof (error as Record<string, unknown>).statusCode === \"number\"\n );\n}\n\n/**\n * Methods that should not be proxied by asUser().\n * These are lifecycle/internal methods that don't make sense\n * to execute in a user context.\n */\nconst EXCLUDED_FROM_PROXY = new Set([\n // Lifecycle methods\n \"setup\",\n \"shutdown\",\n \"attachContext\",\n \"injectRoutes\",\n \"getEndpoints\",\n \"getSkipBodyParsingPaths\",\n \"abortActiveOperations\",\n \"clientConfig\",\n // asUser itself - prevent chaining like .asUser().asUser()\n \"asUser\",\n // Internal methods\n \"constructor\",\n]);\n\n/**\n * Base abstract class for creating AppKit plugins.\n *\n * All plugins must declare a static `manifest` property with their metadata\n * and resource requirements. The manifest defines:\n * - `required` resources: Always needed for the plugin to function\n * - `optional` resources: May be needed depending on plugin configuration\n *\n * ## Static vs Runtime Resource Requirements\n *\n * The manifest is static and doesn't know the plugin's runtime configuration.\n * For resources that become required based on config options, plugins can\n * implement a static `getResourceRequirements(config)` method.\n *\n * At runtime, this method is called with the actual config to determine\n * which \"optional\" resources should be treated as \"required\".\n *\n * @example Basic plugin with static requirements\n * ```typescript\n * import { Plugin, toPlugin, PluginManifest, ResourceType } from '@databricks/appkit';\n *\n * const myManifest: PluginManifest = {\n * name: 'myPlugin',\n * displayName: 'My Plugin',\n * description: 'Does something awesome',\n * resources: {\n * required: [\n * { type: ResourceType.SQL_WAREHOUSE, alias: 'warehouse', ... }\n * ],\n * optional: []\n * }\n * };\n *\n * class MyPlugin extends Plugin<MyConfig> {\n * static manifest = myManifest;\n * }\n * ```\n *\n * @example Plugin with config-dependent resources\n * ```typescript\n * interface MyConfig extends BasePluginConfig {\n * enableCaching?: boolean;\n * }\n *\n * const myManifest: PluginManifest = {\n * name: 'myPlugin',\n * resources: {\n * required: [\n * { type: ResourceType.SQL_WAREHOUSE, alias: 'warehouse', ... }\n * ],\n * optional: [\n * // Database is optional in the static manifest\n * { type: ResourceType.DATABASE, alias: 'cache', description: 'Required if caching enabled', ... }\n * ]\n * }\n * };\n *\n * class MyPlugin extends Plugin<MyConfig> {\n * static manifest = myManifest<\"myPlugin\">;\n *\n * // Runtime method: converts optional resources to required based on config\n * static getResourceRequirements(config: MyConfig) {\n * const resources = [];\n * if (config.enableCaching) {\n * // When caching is enabled, Database becomes required\n * resources.push({\n * type: ResourceType.DATABASE,\n * alias: 'cache',\n * resourceKey: 'database',\n * description: 'Cache storage for query results',\n * permission: 'CAN_CONNECT_AND_CREATE',\n * fields: {\n * instance_name: { env: 'DATABRICKS_CACHE_INSTANCE' },\n * database_name: { env: 'DATABRICKS_CACHE_DB' },\n * },\n * required: true // Mark as required at runtime\n * });\n * }\n * return resources;\n * }\n * }\n * ```\n */\nexport abstract class Plugin<\n TConfig extends BasePluginConfig = BasePluginConfig,\n> implements BasePlugin\n{\n protected isReady = false;\n protected cache!: CacheManager;\n protected app: AppManager;\n protected devFileReader: DevFileReader;\n protected streamManager: StreamManager;\n protected telemetry!: ITelemetry;\n protected context?: PluginContext;\n\n /** Registered endpoints for this plugin */\n private registeredEndpoints: PluginEndpointMap = {};\n\n /** Paths that opt out of JSON body parsing (e.g. file upload routes) */\n private skipBodyParsingPaths: Set<string> = new Set();\n\n /**\n * Plugin initialization phase.\n * - 'core': Initialized first (e.g., config plugins)\n * - 'normal': Initialized second (most plugins)\n * - 'deferred': Initialized last (e.g., server plugin)\n */\n static phase: PluginPhase = \"normal\";\n\n /**\n * Plugin name identifier.\n */\n name: string;\n\n constructor(protected config: TConfig) {\n this.name =\n config.name ??\n (this.constructor as { manifest?: { name: string } }).manifest?.name ??\n \"plugin\";\n this.streamManager = new StreamManager();\n this.app = new AppManager();\n this.devFileReader = DevFileReader.getInstance();\n this.context = (config as Record<string, unknown>).context as\n | PluginContext\n | undefined;\n\n // Eagerly bind telemetry + cache if the core services have already been\n // initialized (normal createApp path, or tests that mock CacheManager).\n // If they haven't, we leave these undefined and rely on `attachContext`\n // being called later — this lets factories eagerly construct plugin\n // instances at module top-level before `createApp` has run.\n this.tryAttachContext();\n }\n\n private tryAttachContext(): void {\n try {\n this.cache = CacheManager.getInstanceSync();\n } catch {\n return;\n }\n this.telemetry = TelemetryManager.getProvider(\n this.name,\n this.config.telemetry,\n );\n this.isReady = true;\n }\n\n /**\n * Binds runtime dependencies (telemetry provider, cache, plugin context) to\n * this plugin. Called by `AppKit._createApp` after construction and before\n * `setup()`. Idempotent: safe to call if the constructor already bound them\n * eagerly. Kept separate so factories can eagerly construct plugin instances\n * without running this before `TelemetryManager.initialize()` /\n * `CacheManager.getInstance()` have run.\n */\n attachContext(\n deps: {\n context?: unknown;\n telemetryConfig?: BasePluginConfig[\"telemetry\"];\n } = {},\n ): void {\n if (!this.cache) {\n this.cache = CacheManager.getInstanceSync();\n }\n this.telemetry = TelemetryManager.getProvider(\n this.name,\n deps.telemetryConfig ?? this.config.telemetry,\n );\n if (deps.context !== undefined) {\n this.context = deps.context as PluginContext;\n }\n this.isReady = true;\n }\n\n injectRoutes(_: express.Router) {\n return;\n }\n\n async setup() {}\n\n getEndpoints(): PluginEndpointMap {\n return this.registeredEndpoints;\n }\n\n getSkipBodyParsingPaths(): ReadonlySet<string> {\n return this.skipBodyParsingPaths;\n }\n\n abortActiveOperations(): void {\n this.streamManager.abortAll();\n }\n\n /**\n * Returns the public exports for this plugin.\n * Override this to define a custom public API.\n * By default, returns an empty object.\n *\n * The returned object becomes the plugin's public API on the AppKit instance\n * (e.g. `appkit.myPlugin.method()`). AppKit automatically binds method context\n * and adds `asUser(req)` for user-scoped execution.\n *\n * @example\n * ```ts\n * class MyPlugin extends Plugin {\n * private getData() { return []; }\n *\n * exports() {\n * return { getData: this.getData };\n * }\n * }\n *\n * // After registration:\n * const appkit = await createApp({ plugins: [myPlugin()] });\n * appkit.myPlugin.getData();\n * ```\n */\n exports(): unknown {\n return {};\n }\n\n /**\n * Returns startup config to expose to the client.\n * Override this to surface server-side values that are safe to publish to the\n * frontend, such as feature flags, resource IDs, or other app boot settings.\n *\n * This runs once when the server starts, so it should not depend on\n * request-scoped or user-specific state.\n *\n * String values that match non-public environment variables are redacted\n * unless you intentionally expose them via a matching `PUBLIC_APPKIT_` env var.\n *\n * Values must be JSON-serializable plain data (no functions, Dates, classes,\n * Maps, Sets, BigInts, or circular references).\n * By default returns an empty object (plugin contributes nothing to client config).\n *\n * On the client, read the config with the `usePluginClientConfig` hook\n * (React) or the `getPluginClientConfig` function (vanilla JS), both\n * from `@databricks/appkit-ui`.\n *\n * @example\n * ```ts\n * // Server — plugin definition\n * class MyPlugin extends Plugin<MyConfig> {\n * clientConfig() {\n * return {\n * warehouseId: this.config.warehouseId,\n * features: { darkMode: true },\n * };\n * }\n * }\n *\n * // Client — React component\n * import { usePluginClientConfig } from \"@databricks/appkit-ui/react\";\n *\n * interface MyPluginConfig { warehouseId: string; features: { darkMode: boolean } }\n *\n * const config = usePluginClientConfig<MyPluginConfig>(\"myPlugin\");\n * config.warehouseId; // \"abc-123\"\n *\n * // Client — vanilla JS\n * import { getPluginClientConfig } from \"@databricks/appkit-ui/js\";\n *\n * const config = getPluginClientConfig<MyPluginConfig>(\"myPlugin\");\n * ```\n */\n clientConfig(): Record<string, unknown> {\n return {};\n }\n\n /**\n * Resolve the effective user ID from a request.\n *\n * Returns the `x-forwarded-user` header when present. In development mode\n * (`NODE_ENV=development`) falls back to the current context user ID so\n * that callers outside an active `runInUserContext` scope still get a\n * consistent value.\n *\n * @throws AuthenticationError in production when no user header is present.\n */\n protected resolveUserId(req: express.Request): string {\n const userId = req.header(\"x-forwarded-user\")?.trim();\n if (userId) return userId;\n if (process.env.NODE_ENV === \"development\") return getCurrentUserId();\n throw AuthenticationError.missingUserId();\n }\n\n /**\n * Execute operations using the user's identity from the request.\n * Returns a proxy of this plugin where all method calls execute\n * with the user's Databricks credentials instead of the service principal.\n *\n * @param req - The Express request containing the user token in headers\n * @returns A proxied plugin instance that executes as the user\n * @throws AuthenticationError if user token is not available in request headers (production only).\n * In development mode (`NODE_ENV=development`), skips user impersonation instead of throwing.\n */\n asUser(req: express.Request): this {\n const token = req.header(\"x-forwarded-access-token\")?.trim();\n const userId = req.header(\"x-forwarded-user\")?.trim();\n const userEmail = req.header(\"x-forwarded-email\");\n const isDev = process.env.NODE_ENV === \"development\";\n\n // In local development, skip user impersonation since there's no user\n // token available. Mark execution as OBO dev fallback via OTel context\n // so telemetry can distinguish intended OBO calls from regular SP calls.\n if (!token && isDev) {\n logger.warn(\n \"asUser() called without user token in development mode. Skipping user impersonation.\",\n );\n\n return this._createAsUserProxy((fn) => (...args) => {\n const ctx = otelContext.active().setValue(DEV_OBO_FALLBACK_KEY, true);\n return otelContext.with(ctx, () => fn(...args));\n });\n }\n\n if (!token) {\n throw AuthenticationError.missingToken(\"user token\");\n }\n\n if (!userId && !isDev) {\n throw AuthenticationError.missingUserId();\n }\n\n const effectiveUserId = userId || \"dev-user\";\n\n const userContext = ServiceContext.createUserContext(\n token,\n effectiveUserId,\n undefined,\n userEmail ?? undefined,\n );\n\n return this._createAsUserProxy(\n (fn) =>\n (...args) =>\n runInUserContext(userContext, () => fn(...args)),\n );\n }\n\n /**\n * Creates a proxy of `this` where every method call — and every function\n * in the result of `exports()` — runs inside `wrapCall`.\n *\n * `wrapCall` decides the per-call scope. Two strategies are used today:\n * - real OBO: fn => (...args) => runInUserContext(userContext, () => fn(...args))\n * - dev fallback: fn => (...args) => otelContext.with(DEV_OBO_FALLBACK_KEY=true, () => fn(...args))\n *\n * `exports` is intercepted because methods captured in the returned\n * exports object never re-enter the proxy's `get` trap. Wrapping them\n * here is the only way to make the user context follow function\n * references back out of the plugin.\n */\n private _createAsUserProxy(\n wrapCall: (\n fn: (...a: unknown[]) => unknown,\n ) => (...a: unknown[]) => unknown,\n ): this {\n return new Proxy(this, {\n get: (target, prop, receiver) => {\n const value = Reflect.get(target, prop, receiver);\n\n if (typeof value !== \"function\") return value;\n if (typeof prop === \"string\" && EXCLUDED_FROM_PROXY.has(prop))\n return value;\n\n if (prop === \"exports\") {\n return () => {\n const raw = (value as () => unknown).call(target);\n if (raw == null) return {};\n // Callable exports (e.g. files, jobs) manage per-call asUser\n // themselves; leave them untouched.\n if (typeof raw === \"function\") return raw;\n if (isPlainObject(raw)) {\n return wrapExportFunctions(raw, wrapCall);\n }\n return raw;\n };\n }\n\n const fn = (value as (...a: unknown[]) => unknown).bind(target);\n return wrapCall(fn);\n },\n }) as this;\n }\n\n // streaming execution with interceptors\n protected async executeStream<T>(\n res: IAppResponse,\n fn: StreamExecuteHandler<T>,\n options: StreamExecutionSettings,\n userKey?: string,\n ) {\n // destructure options\n const {\n stream: streamConfig,\n default: defaultConfig,\n user: userConfig,\n } = options;\n\n // build execution options\n const executeConfig = this._buildExecutionConfig({\n default: defaultConfig,\n user: userConfig,\n });\n\n // get user key from context if not provided\n const effectiveUserKey = userKey ?? getCurrentUserId();\n\n const self = this;\n // capture the active OTel context (HTTP span) before entering the async generator,\n // where it would otherwise be lost across the async boundary\n const parentOtelContext = otelContext.active();\n\n // wrapper function to ensure it returns a generator\n const asyncWrapperFn = async function* (streamSignal?: AbortSignal) {\n // build execution context\n const context: InterceptorContext = {\n signal: streamSignal,\n metadata: new Map(),\n userKey: effectiveUserKey,\n };\n\n // build interceptors\n const interceptors = self._buildInterceptors(executeConfig);\n\n // wrap the function to ensure it returns a promise\n const wrappedFn = async () => {\n const result = await fn(context.signal);\n return result;\n };\n\n // execute the function with interceptors, restoring the parent OTel context\n // so telemetry spans are linked as children of the HTTP request span\n const result = await otelContext.with(parentOtelContext, () =>\n self._executeWithInterceptors(\n wrappedFn as (signal?: AbortSignal) => Promise<T>,\n interceptors,\n context,\n ),\n );\n\n // check if result is a generator\n if (self._checkIfGenerator(result)) {\n yield* result;\n } else {\n yield result;\n }\n };\n\n // stream the result to the client. The effective user key is forwarded\n // to the stream manager so that reconnections to existing streamIds are\n // bound to the original creator (prevents cross-user stream takeover via\n // guessed/leaked IDs).\n await this.streamManager.stream(\n res,\n asyncWrapperFn,\n streamConfig,\n effectiveUserKey,\n );\n }\n\n /**\n * Execute a function with the plugin's interceptor chain.\n *\n * Returns an {@link ExecutionResult} discriminated union:\n * - `{ ok: true, data: T }` on success\n * - `{ ok: false, status: number, message: string }` on failure\n *\n * Errors are never thrown — the method is production-safe.\n */\n protected async execute<T>(\n fn: (signal?: AbortSignal) => Promise<T>,\n options: PluginExecutionSettings,\n userKey?: string,\n ): Promise<ExecutionResult<T>> {\n const executeConfig = this._buildExecutionConfig(options);\n\n const interceptors = this._buildInterceptors(executeConfig);\n\n // get user key from context if not provided\n const effectiveUserKey = userKey ?? getCurrentUserId();\n\n const context: InterceptorContext = {\n metadata: new Map(),\n userKey: effectiveUserKey,\n };\n\n try {\n const data = await this._executeWithInterceptors(\n fn,\n interceptors,\n context,\n );\n return { ok: true, data };\n } catch (error) {\n logger.error(\"Plugin execution failed\", { error, plugin: this.name });\n\n if (error instanceof AppKitError) {\n return {\n ok: false,\n status: error.statusCode,\n message: error.message,\n };\n }\n\n if (hasHttpStatusCode(error)) {\n const isDev = process.env.NODE_ENV !== \"production\";\n const isClientError = error.statusCode >= 400 && error.statusCode < 500;\n return {\n ok: false,\n status: error.statusCode,\n message: isDev || isClientError ? error.message : \"Server error\",\n };\n }\n\n const isDev = process.env.NODE_ENV !== \"production\";\n return {\n ok: false,\n status: 500,\n message:\n isDev && error instanceof Error ? error.message : \"Server error\",\n };\n }\n }\n\n protected registerEndpoint(name: string, path: string): void {\n this.registeredEndpoints[name] = path;\n }\n\n protected route<_TResponse>(\n router: express.Router,\n config: RouteConfig,\n ): void {\n const { name, method, path, handler } = config;\n\n router[method](path, handler);\n\n const fullPath = `/api/${this.name}${path}`;\n this.registerEndpoint(name, fullPath);\n\n if (config.skipBodyParsing) {\n this.skipBodyParsingPaths.add(fullPath);\n }\n }\n\n // build execution options by merging defaults, plugin config, and user overrides\n private _buildExecutionConfig(\n options: PluginExecutionSettings,\n ): PluginExecuteConfig {\n const { default: methodDefaults, user: userOverride } = options;\n\n // Merge: method defaults <- plugin config <- user override (highest priority)\n return deepMerge(\n deepMerge(methodDefaults, this.config),\n userOverride ?? {},\n ) as PluginExecuteConfig;\n }\n\n // build interceptors based on execute options\n private _buildInterceptors(\n options: PluginExecuteConfig,\n ): ExecutionInterceptor[] {\n const interceptors: ExecutionInterceptor[] = [];\n\n // order matters: telemetry → timeout → retry → cache (innermost to outermost)\n\n const telemetryConfig = normalizeTelemetryOptions(this.config.telemetry);\n if (\n telemetryConfig.traces &&\n (options.telemetryInterceptor?.enabled ?? true)\n ) {\n interceptors.push(\n new TelemetryInterceptor(this.telemetry, options.telemetryInterceptor),\n );\n }\n\n if (options.timeout && options.timeout > 0) {\n interceptors.push(new TimeoutInterceptor(options.timeout));\n }\n\n if (\n options.retry?.enabled &&\n options.retry.attempts &&\n options.retry.attempts > 1\n ) {\n interceptors.push(new RetryInterceptor(options.retry));\n }\n\n if (options.cache?.enabled && options.cache.cacheKey?.length) {\n interceptors.push(new CacheInterceptor(this.cache, options.cache));\n }\n\n return interceptors;\n }\n\n // execute method wrapped with interceptors\n private async _executeWithInterceptors<T>(\n fn: (signal?: AbortSignal) => Promise<T>,\n interceptors: ExecutionInterceptor[],\n context: InterceptorContext,\n ): Promise<T> {\n // no interceptors, execute directly\n if (interceptors.length === 0) {\n return fn(context.signal);\n }\n // build nested execution chain from interceptors\n let wrappedFn = () => fn(context.signal);\n\n // wrap each interceptor around the previous function\n for (const interceptor of interceptors) {\n const previousFn = wrappedFn;\n wrappedFn = () => interceptor.intercept(previousFn, context);\n }\n\n return wrappedFn();\n }\n\n private _checkIfGenerator(\n result: any,\n ): result is AsyncGenerator<any, void, unknown> {\n return (\n result && typeof result === \"object\" && Symbol.asyncIterator in result\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAsCA,MAAM,SAAS,aAAa,SAAS;;;;;AAMrC,MAAM,uBAAuB,iBAAiB,wBAAwB;;;;;;;;;AAUtE,SAAgB,cACd,OACkC;AAClC,KAAI,OAAO,UAAU,YAAY,UAAU,KAAM,QAAO;CACxD,MAAM,QAAQ,OAAO,eAAe,MAAM;AAC1C,QAAO,UAAU,OAAO,aAAa,UAAU;;;;;;;;;;;AAYjD,SAAS,oBACP,SACA,MACyB;CACzB,MAAM,SAAkC,EAAE;A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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA+frB,mBAAA,GAAsB,CAAA,CAAE,KAAA,QAAa,yBAAA;AAAA,KACrC,kBAAA,GAAqB,CAAA,CAAE,KAAA,QAAa,wBAAA;AAAA,KAIpC,sBAAA,GAAyB,CAAA,CAAE,KAAA,QAC9B,4BAAA;AAAA,KAEG,cAAA,GAAiB,CAAA,CAAE,KAAA,QAAa,oBAAA"}
|
package/dist/schemas/manifest.js
CHANGED
|
@@ -497,7 +497,7 @@ const TEMPLATE_SCAFFOLDING = {
|
|
|
497
497
|
}
|
|
498
498
|
},
|
|
499
499
|
rules: {
|
|
500
|
-
must: ["Keep all secrets and credentials only in app.yaml, databricks.yml, and/or .env"],
|
|
500
|
+
must: ["Treat `databricks apps init` output as starter code, not requirements; adapt or replace it to match the requested app", "Keep all secrets and credentials only in app.yaml, databricks.yml, and/or .env"],
|
|
501
501
|
should: ["ask user when in doubt of resource to use for plugin"],
|
|
502
502
|
never: ["guess resources when multiple or no options are available", "embed secrets in files that will go to the client-bundle"]
|
|
503
503
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.js","names":[],"sources":["../../src/schemas/manifest.ts"],"sourcesContent":["/**\n * Zod-authoring module for AppKit plugin manifest schemas.\n *\n * Single source of truth for the plugin manifest contract. JSON Schema\n * artifacts published at the docs URL are emitted from these schemas via\n * `tools/generate-json-schema.ts` and live only in `docs/static/schemas/`\n * (no package-internal copies).\n *\n * - Cross-field constraints (cycle/dangling-reference checks, `<PROFILE>`\n * placeholder, post-scaffold instruction non-empty) are refinements\n * co-located with the shape they constrain. Validation is driven through\n * the Standard Schema interface from `validate-manifest.ts`.\n * - `templateFieldEntrySchema` is a transform that emits `origin` from\n * `localOnly`/`value`/`resolve`. The input slot is still allowed so\n * re-parsing previously-synced template manifests does not fail, but the\n * transform always overwrites it — drift-by-construction for hand-edits.\n * - `discoveryDescriptorSchema` is a discriminated union over a `type`\n * literal. The `kind` variant references one of the well-known\n * `resourceKind` values for which AppKit owns the CLI command map (see\n * `RESOURCE_KIND_COMMANDS` below). The `cli` variant is the escape hatch\n * carrying the existing free-form fields (with the `<PROFILE>`\n * refinement). Hierarchical context for volumes (catalog/schema parent\n * walk) is encoded via the kind's `parents` array, not via dependsOn.\n * - Scaffolding rule items carry a `maxLength` (120 chars) so\n * `rules.never[]` / `rules.must[]` / `rules.should[]` stay short\n * directives by contract, and the canonical `TEMPLATE_SCAFFOLDING`\n * constant lives co-located with the scaffolding schemas (sync.ts\n * imports it).\n */\n\nimport { z } from \"zod\";\n\n// ── Resource type + per-type permission enums ────────────────────────────\n\nexport const resourceTypeSchema = z\n .enum([\n \"secret\",\n \"job\",\n \"sql_warehouse\",\n \"serving_endpoint\",\n \"volume\",\n \"vector_search_index\",\n \"uc_function\",\n \"uc_connection\",\n \"database\",\n \"postgres\",\n \"genie_space\",\n \"experiment\",\n \"app\",\n ])\n .describe(\"Type of Databricks resource\");\n\nexport const secretPermissionSchema = z\n .enum([\"READ\", \"WRITE\", \"MANAGE\"])\n .describe(\"Permission for secret resources (order: weakest to strongest)\");\n\nexport const jobPermissionSchema = z\n .enum([\"CAN_VIEW\", \"CAN_MANAGE_RUN\", \"CAN_MANAGE\"])\n .describe(\"Permission for job resources (order: weakest to strongest)\");\n\nexport const sqlWarehousePermissionSchema = z\n .enum([\"CAN_USE\", \"CAN_MANAGE\"])\n .describe(\n \"Permission for SQL warehouse resources (order: weakest to strongest)\",\n );\n\nexport const servingEndpointPermissionSchema = z\n .enum([\"CAN_VIEW\", \"CAN_QUERY\", \"CAN_MANAGE\"])\n .describe(\n \"Permission for serving endpoint resources (order: weakest to strongest)\",\n );\n\nexport const volumePermissionSchema = z\n .enum([\"READ_VOLUME\", \"WRITE_VOLUME\"])\n .describe(\"Permission for Unity Catalog volume resources\");\n\nexport const vectorSearchIndexPermissionSchema = z\n .enum([\"SELECT\"])\n .describe(\"Permission for vector search index resources\");\n\nexport const ucFunctionPermissionSchema = z\n .enum([\"EXECUTE\"])\n .describe(\"Permission for Unity Catalog function resources\");\n\nexport const ucConnectionPermissionSchema = z\n .enum([\"USE_CONNECTION\"])\n .describe(\"Permission for Unity Catalog connection resources\");\n\nexport const databasePermissionSchema = z\n .enum([\"CAN_CONNECT_AND_CREATE\"])\n .describe(\"Permission for database resources\");\n\nexport const postgresPermissionSchema = z\n .enum([\"CAN_CONNECT_AND_CREATE\"])\n .describe(\"Permission for Postgres resources\");\n\nexport const genieSpacePermissionSchema = z\n .enum([\"CAN_VIEW\", \"CAN_RUN\", \"CAN_EDIT\", \"CAN_MANAGE\"])\n .describe(\n \"Permission for Genie Space resources (order: weakest to strongest)\",\n );\n\nexport const experimentPermissionSchema = z\n .enum([\"CAN_READ\", \"CAN_EDIT\", \"CAN_MANAGE\"])\n .describe(\n \"Permission for MLflow experiment resources (order: weakest to strongest)\",\n );\n\nexport const appPermissionSchema = z\n .enum([\"CAN_USE\"])\n .describe(\"Permission for Databricks App resources\");\n\n// ── Discovery descriptor (discriminated union) ───────────────────────────\n\n/**\n * Well-known Databricks resource kinds for which AppKit owns the CLI\n * command map. Plugins reference one of these via the `kind` variant of the\n * discovery descriptor; everything else falls back to the free-form `cli`\n * variant.\n *\n * Kept narrow on purpose: each entry costs an addition to\n * `RESOURCE_KIND_COMMANDS` below, which is the single source of truth for\n * how that kind is enumerated.\n */\nexport const resourceKindSchema = z\n .enum([\n \"warehouse\",\n \"genie_space\",\n \"postgres_project\",\n \"postgres_branch\",\n \"postgres_database\",\n \"volume\",\n ])\n .describe(\n \"Well-known Databricks resource kind whose listing command is owned by AppKit (see RESOURCE_KIND_COMMANDS).\",\n );\n\nexport const kindDiscoveryDescriptorSchema = z\n .object({\n type: z\n .literal(\"kind\")\n .describe(\n \"Discriminator: 'kind' uses the AppKit-owned command map for the named resourceKind.\",\n ),\n resourceKind: resourceKindSchema.describe(\n \"Reference to a well-known Databricks resource kind. AppKit owns the CLI command, response shape, and unwrap rules.\",\n ),\n select: z\n .string()\n .optional()\n .describe(\n \"Field name in the parsed CLI response used as the selected value (e.g., 'id'). Defaults to the kind's natural identifier when omitted.\",\n ),\n display: z\n .string()\n .optional()\n .describe(\n \"Field name in the parsed CLI response shown to the user in selection UI. Defaults to `select` if omitted.\",\n ),\n dependsOn: z\n .string()\n .optional()\n .describe(\n \"Name of a sibling field within the same resource that must be resolved first. Used to express ordering dependencies between resource fields.\",\n ),\n shortcut: z\n .string()\n .optional()\n .describe(\n \"Single-value fast-path command that returns exactly one value, skipping interactive selection.\",\n ),\n })\n .strict()\n .describe(\n \"Discovery via a well-known resource kind. AppKit owns the CLI command and unwrap rules for the named kind.\",\n );\n\n/**\n * Shell metacharacters rejected on free-form CLI command strings. Catches the\n * common foot-guns (statement separators, pipes, redirects via shell, command\n * substitution, newlines). Not a security boundary on its own — executors must\n * always pass these via argv, never shell-exec the string. Angle brackets are\n * permitted because `<PROFILE>` (and future `<…>` placeholders) are part of\n * the command-template convention.\n */\nconst SHELL_METACHAR_RE = /[;|&`$\\n\\r]/;\n\nexport const cliDiscoveryDescriptorSchema = z\n .object({\n type: z\n .literal(\"cli\")\n .describe(\n \"Discriminator: 'cli' uses a free-form Databricks CLI command supplied by the plugin.\",\n ),\n cliCommand: z\n .string()\n .describe(\n \"Databricks CLI command that lists resources. Must include <PROFILE>. Shell metacharacters (;|&`$ and newlines) are rejected; for first-party Databricks resources prefer the `kind` variant which uses AppKit's typed command map.\",\n ),\n selectField: z\n .string()\n .describe(\n \"jq-style path to the field used as the selected value (e.g., '.id', '.name').\",\n ),\n displayField: z\n .string()\n .optional()\n .describe(\n \"jq-style path to the field shown to the user in selection UI. Defaults to selectField if omitted.\",\n ),\n dependsOn: z\n .string()\n .optional()\n .describe(\n \"Name of a sibling field within the same resource that must be resolved first. Used to express ordering dependencies between resource fields.\",\n ),\n shortcut: z\n .string()\n .optional()\n .describe(\n \"Single-value fast-path command that returns exactly one value, skipping interactive selection. Shell metacharacters are rejected.\",\n ),\n })\n .strict()\n .refine((descriptor) => descriptor.cliCommand.includes(\"<PROFILE>\"), {\n message: \"must include <PROFILE> placeholder\",\n path: [\"cliCommand\"],\n })\n .refine((descriptor) => !SHELL_METACHAR_RE.test(descriptor.cliCommand), {\n message:\n \"must not contain shell metacharacters (;|&`$ or newlines); use the `kind` variant for typed Databricks resources\",\n path: [\"cliCommand\"],\n })\n .refine(\n (descriptor) =>\n descriptor.shortcut === undefined ||\n !SHELL_METACHAR_RE.test(descriptor.shortcut),\n {\n message: \"must not contain shell metacharacters (;|&`$ or newlines)\",\n path: [\"shortcut\"],\n },\n )\n .describe(\n \"Discovery via a free-form Databricks CLI command. Escape hatch — prefer the `kind` variant when a typed resourceKind covers the resource. This shape is intentionally minimal and may tighten further in future versions.\",\n );\n\nexport const discoveryDescriptorSchema = z\n .discriminatedUnion(\"type\", [\n kindDiscoveryDescriptorSchema,\n cliDiscoveryDescriptorSchema,\n ])\n .describe(\n \"Describes how the CLI discovers values for a resource field. 'kind' references a well-known Databricks resource kind whose command is owned by AppKit; 'cli' is the escape hatch carrying a free-form Databricks CLI command.\",\n );\n\n// ── Resource kind → CLI command map ──────────────────────────────────────\n\n/**\n * Descriptor for how a well-known resource kind is listed via the\n * Databricks CLI.\n *\n * - `command` is the CLI invocation template. It carries two kinds of\n * placeholders:\n * - `<PROFILE>` — substituted with the user's CLI profile by the runner.\n * - `{<fieldName>}` — substituted with the resolved value of the named\n * sibling field (used for `dependsOn` chains).\n * - `unwrap`, when set, is the JSON path into the response wrapper (e.g.,\n * `\"warehouses\"` for `{ warehouses: [...] }`). Omitted when the response\n * is already a flat array.\n * - `parents`, when set, lists transient query inputs the runner must\n * collect (as free-text prompts) before invoking the command. Each\n * `parents[i]` value substitutes the matching `{name}` placeholder in\n * the command string. Unlike `dependsOn` (which references a sibling\n * field on the same resource), `parents` covers inputs that aren't\n * persisted as fields on the resource.\n */\nexport type ResourceKindCommand = {\n command: string;\n unwrap?: string;\n parents?: readonly string[];\n};\n\n/**\n * Single source of truth for AppKit-owned discovery commands.\n *\n * To add a new resource kind: extend `resourceKindSchema` and add an entry\n * here. Plugins reference the kind via `discovery: { type: \"kind\",\n * resourceKind: \"...\" }` and inherit the command + response shape.\n *\n * `unwrap` defaults are unset: the existing core plugin manifests use simple\n * jq paths (`.id`, `.name`, `.full_name`), implying the listed CLI commands\n * return flat arrays. Refine in a follow-up if a kind's CLI returns wrapped\n * data.\n *\n * Volume's catalog/schema parent context is supplied via the `parents`\n * array, which the runner collects from the user as free-text prompts\n * before invoking the listing command.\n */\nexport const RESOURCE_KIND_COMMANDS: Record<\n z.infer<typeof resourceKindSchema>,\n { command: string; unwrap?: string; parents?: readonly string[] }\n> = {\n warehouse: {\n command: \"databricks warehouses list --profile <PROFILE> --output json\",\n },\n genie_space: {\n command: \"databricks genie list-spaces --profile <PROFILE> --output json\",\n },\n postgres_project: {\n command:\n \"databricks postgres list-projects --profile <PROFILE> --output json\",\n },\n postgres_branch: {\n // {project} is a placeholder for the resolved value of the `project`\n // sibling field (declared via `dependsOn: \"project\"` on the kind variant).\n // The Databricks CLI requires the parent project resource name (format\n // `projects/{project_id}`) as a positional argument.\n command:\n \"databricks postgres list-branches {project} --profile <PROFILE> --output json\",\n },\n postgres_database: {\n // {branch} is a placeholder for the resolved value of the `branch`\n // sibling field (declared via `dependsOn: \"branch\"` on the kind variant).\n command:\n \"databricks postgres list-databases {branch} --profile <PROFILE> --output json\",\n },\n volume: {\n // `parents` declares free-text user prompts the runner must collect before\n // invoking the discovery command. Each `parents[i]` value substitutes the\n // matching `{name}` placeholder in the command string above. Unlike\n // `dependsOn` (which references a sibling field on the same resource),\n // `parents` covers transient query inputs that aren't persisted as fields.\n command:\n \"databricks volumes list {catalog} {schema} --profile <PROFILE> --output json\",\n parents: [\"catalog\", \"schema\"] as const,\n },\n};\n\n// ── Resource field entry (plugin manifest variant) ───────────────────────\n\nexport const resourceFieldEntrySchema = z\n .object({\n env: z\n .string()\n .regex(/^[A-Z][A-Z0-9_]*$/)\n .optional()\n .describe(\"Environment variable name for this field\"),\n description: z\n .string()\n .optional()\n .describe(\"Human-readable description for this field\"),\n bundleIgnore: z\n .boolean()\n .optional()\n .describe(\n \"When true, this field is excluded from Databricks bundle configuration (databricks.yml) generation.\",\n ),\n examples: z\n .array(z.string())\n .optional()\n .describe(\"Example values showing the expected format for this field\"),\n localOnly: z\n .boolean()\n .optional()\n .describe(\n \"When true, this field is only generated for local .env files. The Databricks Apps platform auto-injects it at deploy time.\",\n ),\n value: z\n .string()\n .optional()\n .describe(\n \"Static value for this field. Used when no prompted or resolved value exists.\",\n ),\n resolve: z\n .string()\n .regex(/^[a-z_]+:[a-zA-Z]+$/)\n .optional()\n .describe(\n \"Named resolver prefixed by resource type (e.g., 'postgres:host'). The CLI resolves this value during the init prompt flow.\",\n ),\n discovery: discoveryDescriptorSchema.optional(),\n })\n .strict()\n .describe(\n \"Defines a single field for a resource. Each field has its own environment variable and optional description. Single-value types use one key (e.g. id); multi-value types (database, secret) use multiple (e.g. instance_name, database_name or scope, key).\",\n );\n\n// ── Resource requirement (per-type permission discriminator) ─────────────\n\n/**\n * Build a per-type variant. Each variant fixes `type` to a literal and constrains\n * `permission` to the matching enum, mirroring the existing JSON Schema's\n * `allOf + if/then` block. `fields` and the rest of the shape come from a\n * shared base.\n */\nconst resourceRequirementBaseShape = {\n alias: z\n .string()\n .min(1)\n .describe(\n \"Human-readable label for UI/display only. Deduplication uses resourceKey, not alias.\",\n ),\n resourceKey: z\n .string()\n .regex(/^[a-z][a-z0-9-]*$/)\n .describe(\n \"Stable key for machine use: deduplication, env naming, composite keys, app.yaml. Required for registry lookup.\",\n ),\n description: z\n .string()\n .min(1)\n .describe(\"Human-readable description of why this resource is needed\"),\n fields: z\n .record(z.string(), resourceFieldEntrySchema)\n .refine((obj) => Object.keys(obj).length >= 1, {\n message: \"fields must contain at least one entry\",\n })\n .optional()\n .describe(\n \"Map of field name to env and optional description. Single-value types use one key (e.g. id); multi-value (database, secret) use multiple (e.g. instance_name, database_name or scope, key).\",\n ),\n};\n\n/**\n * Adds the cycle/dangling-reference cross-field check to a resource variant.\n * Iterates the resource's `fields`, validates each `discovery.dependsOn` target\n * is a sibling field name, then runs DFS over the dependsOn graph to detect\n * cycles. Issue paths target either the offending field's `dependsOn` slot or\n * the resource itself for cycles.\n */\nfunction refineResourceDependsOn(\n resource: { fields?: Record<string, { discovery?: { dependsOn?: string } }> },\n ctx: z.core.$RefinementCtx,\n): void {\n if (!resource.fields) return;\n const fieldNames = new Set(Object.keys(resource.fields));\n\n // Pass 1: validate dependsOn references and build the dependency graph.\n const deps = new Map<string, string>();\n for (const [name, field] of Object.entries(resource.fields)) {\n const dep = field.discovery?.dependsOn;\n if (!dep) continue;\n if (!fieldNames.has(dep)) {\n ctx.addIssue({\n code: \"custom\",\n path: [\"fields\", name, \"discovery\", \"dependsOn\"],\n message: `references non-existent sibling field '${dep}'`,\n });\n }\n deps.set(name, dep);\n }\n\n // Pass 2: detect cycles via DFS. Emit one issue per cycle found.\n const visited = new Set<string>();\n const visiting = new Set<string>();\n\n function dfs(node: string, chain: string[]): string[] | null {\n if (visiting.has(node)) return [...chain, node];\n if (visited.has(node)) return null;\n visiting.add(node);\n const next = deps.get(node);\n if (next) {\n const cycle = dfs(next, [...chain, node]);\n if (cycle) return cycle;\n }\n visiting.delete(node);\n visited.add(node);\n return null;\n }\n\n for (const node of deps.keys()) {\n if (visited.has(node)) continue;\n const cycle = dfs(node, []);\n if (cycle) {\n ctx.addIssue({\n code: \"custom\",\n path: [],\n message: `discovery.dependsOn creates a cycle: ${cycle.join(\" → \")}`,\n });\n // One cycle error per resource is enough.\n break;\n }\n }\n}\n\nfunction makeResourceVariant<\n TType extends z.ZodLiteral<string>,\n TPerm extends z.ZodTypeAny,\n>(typeLiteral: TType, permission: TPerm) {\n return z\n .object({\n type: typeLiteral,\n ...resourceRequirementBaseShape,\n permission: permission.describe(\n \"Required permission level. Validated per resource type.\",\n ),\n })\n .strict()\n .superRefine(refineResourceDependsOn);\n}\n\nexport const resourceRequirementSchema = z\n .discriminatedUnion(\"type\", [\n makeResourceVariant(z.literal(\"secret\"), secretPermissionSchema),\n makeResourceVariant(z.literal(\"job\"), jobPermissionSchema),\n makeResourceVariant(\n z.literal(\"sql_warehouse\"),\n sqlWarehousePermissionSchema,\n ),\n makeResourceVariant(\n z.literal(\"serving_endpoint\"),\n servingEndpointPermissionSchema,\n ),\n makeResourceVariant(z.literal(\"volume\"), volumePermissionSchema),\n makeResourceVariant(\n z.literal(\"vector_search_index\"),\n vectorSearchIndexPermissionSchema,\n ),\n makeResourceVariant(z.literal(\"uc_function\"), ucFunctionPermissionSchema),\n makeResourceVariant(\n z.literal(\"uc_connection\"),\n ucConnectionPermissionSchema,\n ),\n makeResourceVariant(z.literal(\"database\"), databasePermissionSchema),\n makeResourceVariant(z.literal(\"postgres\"), postgresPermissionSchema),\n makeResourceVariant(z.literal(\"genie_space\"), genieSpacePermissionSchema),\n makeResourceVariant(z.literal(\"experiment\"), experimentPermissionSchema),\n makeResourceVariant(z.literal(\"app\"), appPermissionSchema),\n ])\n .describe(\n \"Declares a resource requirement for a plugin. Can be defined statically in a manifest or dynamically via getResourceRequirements().\",\n );\n\n// ── Config schema (recursive) ────────────────────────────────────────────\n\nexport const configSchemaPropertySchema: z.ZodType = z.lazy(() =>\n z\n .object({\n type: z.enum([\n \"object\",\n \"array\",\n \"string\",\n \"number\",\n \"boolean\",\n \"integer\",\n ]),\n description: z.string().optional(),\n default: z.unknown().optional(),\n enum: z.array(z.unknown()).optional(),\n properties: z.record(z.string(), configSchemaPropertySchema).optional(),\n items: configSchemaPropertySchema.optional(),\n minimum: z.number().optional(),\n maximum: z.number().optional(),\n minLength: z.number().int().min(0).optional(),\n maxLength: z.number().int().min(0).optional(),\n required: z.array(z.string()).optional(),\n // `additionalProperties` is a standard JSON Schema keyword used by core\n // plugin manifests (e.g., serving, vector-search, genie) to constrain\n // dictionary-shaped properties. Allowed on nested property entries as\n // either a boolean or a sub-schema, mirroring JSON Schema semantics.\n additionalProperties: z\n .union([z.boolean(), configSchemaPropertySchema])\n .optional(),\n })\n .strict(),\n);\n\nexport const configSchemaSchema: z.ZodType = z.lazy(() =>\n z\n .object({\n type: z.enum([\"object\", \"array\", \"string\", \"number\", \"boolean\"]),\n properties: z.record(z.string(), configSchemaPropertySchema).optional(),\n items: configSchemaSchema.optional(),\n required: z.array(z.string()).optional(),\n additionalProperties: z.boolean().optional(),\n })\n .strict(),\n);\n\n// ── Plugin-level scaffolding rules ───────────────────────────────────────\n\n/**\n * Per-item upper bound on plugin-level scaffolding rule strings. Matches the\n * template-level `SCAFFOLDING_RULE_MAX_LENGTH` defined below — rules at both\n * levels are short directives, not prose. The literal value lives here (and\n * not by reference to the template-side constant) because this declaration\n * is read in source order and the template constant is declared later.\n */\nconst PLUGIN_SCAFFOLDING_RULE_MAX_LENGTH = 120;\n\nconst pluginScaffoldingRuleItemSchema = z\n .string()\n .min(1)\n .max(\n PLUGIN_SCAFFOLDING_RULE_MAX_LENGTH,\n `rule entries must be ≤ ${PLUGIN_SCAFFOLDING_RULE_MAX_LENGTH} chars`,\n );\n\nexport const pluginScaffoldingRulesSchema = z\n .object({\n must: z\n .array(pluginScaffoldingRuleItemSchema)\n .optional()\n .describe(\"Actions the scaffolding agent must always perform.\"),\n should: z\n .array(pluginScaffoldingRuleItemSchema)\n .optional()\n .describe(\"Recommended actions for the scaffolding agent.\"),\n never: z\n .array(pluginScaffoldingRuleItemSchema)\n .optional()\n .describe(\"Actions the scaffolding agent must never perform.\"),\n })\n .strict()\n .superRefine((rules, ctx) => {\n // (a) Reject duplicate entries within any single array.\n const buckets: Array<[\"must\" | \"should\" | \"never\", string[] | undefined]> =\n [\n [\"must\", rules.must],\n [\"should\", rules.should],\n [\"never\", rules.never],\n ];\n for (const [bucketName, items] of buckets) {\n if (!items) continue;\n const seen = new Map<string, number>();\n items.forEach((item, idx) => {\n const prev = seen.get(item);\n if (prev === undefined) {\n seen.set(item, idx);\n return;\n }\n ctx.addIssue({\n code: \"custom\",\n path: [bucketName, idx],\n message: `duplicate rule entry: \"${item}\" already declared at index ${prev}`,\n });\n });\n }\n // (b) Reject a string that appears in more than one of must/should/never.\n type Bucket = \"must\" | \"should\" | \"never\";\n const owner = new Map<string, Bucket>();\n for (const [bucketName, items] of buckets) {\n if (!items) continue;\n for (let i = 0; i < items.length; i++) {\n const item = items[i];\n const existing = owner.get(item);\n if (existing === undefined) {\n owner.set(item, bucketName);\n continue;\n }\n if (existing !== bucketName) {\n ctx.addIssue({\n code: \"custom\",\n path: [bucketName, i],\n message: `rule entry \"${item}\" appears in both '${existing}' and '${bucketName}'; rules must belong to exactly one bucket`,\n });\n }\n }\n }\n })\n .describe(\n \"Structured rules for scaffolding agents declared at the plugin level. Each rule is a short directive (≤120 chars).\",\n );\n\n// ── Plugin manifest (root) ───────────────────────────────────────────────\n\nexport const pluginManifestSchema = z\n .object({\n $schema: z\n .string()\n .optional()\n .describe(\"Reference to the JSON Schema for validation\"),\n name: z\n .string()\n .regex(/^[a-z][a-z0-9-]*$/)\n .describe(\n \"Plugin identifier. Must be lowercase, start with a letter, and contain only letters, numbers, and hyphens.\",\n ),\n displayName: z\n .string()\n .min(1)\n .describe(\"Human-readable display name for UI and CLI\"),\n description: z\n .string()\n .min(1)\n .describe(\"Brief description of what the plugin does\"),\n resources: z\n .object({\n required: z\n .array(resourceRequirementSchema)\n .describe(\n \"Resources that must be available for the plugin to function\",\n ),\n optional: z\n .array(resourceRequirementSchema)\n .describe(\n \"Resources that enhance functionality but are not mandatory\",\n ),\n })\n .strict()\n .describe(\"Databricks resource requirements for this plugin\"),\n config: z\n .object({\n schema: configSchemaSchema.optional(),\n })\n .strict()\n .optional()\n .describe(\"Configuration schema for the plugin\"),\n author: z.string().optional().describe(\"Author name or organization\"),\n version: z\n .string()\n .regex(/^\\d+\\.\\d+\\.\\d+(-[a-zA-Z0-9.]+)?$/)\n .optional()\n .describe(\"Plugin version (semver format)\"),\n repository: z\n .url()\n .optional()\n .describe(\"URL to the plugin's source repository\"),\n keywords: z\n .array(z.string())\n .optional()\n .describe(\"Keywords for plugin discovery\"),\n license: z.string().optional().describe(\"SPDX license identifier\"),\n onSetupMessage: z\n .string()\n .optional()\n .describe(\n \"Message displayed to the user after project initialization. Use this to inform about manual setup steps (e.g. environment variables, resource provisioning).\",\n ),\n hidden: z\n .boolean()\n .optional()\n .describe(\n \"When true, this plugin is excluded from the template plugins manifest (appkit.plugins.json) during sync.\",\n ),\n stability: z\n .enum([\"beta\", \"ga\"])\n .optional()\n .describe(\n \"Plugin stability level. Beta plugins may have breaking API changes between minor releases but are on a path to GA. GA (general availability) plugins follow semver strictly.\",\n ),\n scaffolding: z\n .object({\n rules: pluginScaffoldingRulesSchema\n .optional()\n .describe(\n \"Structured rules for scaffolding agents declared at the plugin level.\",\n ),\n })\n .strict()\n .optional()\n .describe(\n \"Plugin-level scaffolding metadata consumed by scaffolding agents. Symmetric with template-level `scaffolding`.\",\n ),\n })\n .strict()\n .describe(\n \"Schema for Databricks AppKit plugin manifest files. Defines plugin metadata, resource requirements, and configuration options.\",\n );\n\n// ── Origin enum ──────────────────────────────────────────────────────────\n\nexport const originSchema = z\n .enum([\"user\", \"platform\", \"static\", \"cli\"])\n .describe(\n \"How the field value is determined. Computed during sync, not authored by plugin developers.\",\n );\n\n// ── Template field entry (origin computed by transform) ─────────────────\n\n/**\n * Derives the canonical origin of a resource field value from its shape.\n *\n * - `localOnly: true` → `\"platform\"` (auto-injected by the Databricks Apps\n * platform at deploy time; takes precedence over `value`/`resolve`).\n * - `value !== undefined` → `\"static\"` (hardcoded value).\n * - `resolve !== undefined` → `\"cli\"` (resolved by the CLI during init).\n * - else → `\"user\"` (user must provide the value at init time).\n *\n * Co-located with `templateFieldEntrySchema` because the transform is the\n * only consumer. Kept private so any other \"origin computation\" goes\n * through the schema rather than re-implementing the rules.\n */\nfunction computeOriginFromField(field: {\n localOnly?: boolean;\n value?: string;\n resolve?: string;\n}): z.infer<typeof originSchema> {\n if (field.localOnly) return \"platform\";\n if (field.value !== undefined) return \"static\";\n if (field.resolve !== undefined) return \"cli\";\n return \"user\";\n}\n\n/**\n * Template field entry: extends the plugin manifest field entry with an\n * optional `origin` input slot, then runs a `.transform()` that overwrites\n * `origin` with the computed value. Allowing `origin` on input means\n * re-parsing a previously-synced template manifest does not fail; emitting\n * `origin` always means hand-edits in synced JSON are silently corrected\n * on the next parse — drift-by-construction.\n */\nexport const templateFieldEntrySchema = resourceFieldEntrySchema\n .extend({ origin: originSchema.optional() })\n .transform((field) => ({\n ...field,\n origin: computeOriginFromField(field),\n }));\n\n// ── Template resource requirement (uses templateFieldEntrySchema) ────────\n\nconst templateResourceRequirementBaseShape = {\n alias: z\n .string()\n .min(1)\n .describe(\"Human-readable label for UI/display only.\"),\n resourceKey: z\n .string()\n .regex(/^[a-z][a-z0-9-]*$/)\n .describe(\n \"Stable key for machine use: deduplication, env naming, composite keys.\",\n ),\n description: z\n .string()\n .min(1)\n .describe(\"Human-readable description of why this resource is needed\"),\n fields: z\n .record(z.string(), templateFieldEntrySchema)\n .refine((obj) => Object.keys(obj).length >= 1, {\n message: \"fields must contain at least one entry\",\n })\n .optional()\n .describe(\"Map of field name to field entry with computed origin.\"),\n};\n\nfunction makeTemplateResourceVariant<\n TType extends z.ZodLiteral<string>,\n TPerm extends z.ZodTypeAny,\n>(typeLiteral: TType, permission: TPerm) {\n return z\n .object({\n type: typeLiteral,\n ...templateResourceRequirementBaseShape,\n permission: permission.describe(\n \"Required permission level. Validated per resource type.\",\n ),\n })\n .strict()\n .superRefine(refineResourceDependsOn);\n}\n\nexport const templateResourceRequirementSchema = z\n .discriminatedUnion(\"type\", [\n makeTemplateResourceVariant(z.literal(\"secret\"), secretPermissionSchema),\n makeTemplateResourceVariant(z.literal(\"job\"), jobPermissionSchema),\n makeTemplateResourceVariant(\n z.literal(\"sql_warehouse\"),\n sqlWarehousePermissionSchema,\n ),\n makeTemplateResourceVariant(\n z.literal(\"serving_endpoint\"),\n servingEndpointPermissionSchema,\n ),\n makeTemplateResourceVariant(z.literal(\"volume\"), volumePermissionSchema),\n makeTemplateResourceVariant(\n z.literal(\"vector_search_index\"),\n vectorSearchIndexPermissionSchema,\n ),\n makeTemplateResourceVariant(\n z.literal(\"uc_function\"),\n ucFunctionPermissionSchema,\n ),\n makeTemplateResourceVariant(\n z.literal(\"uc_connection\"),\n ucConnectionPermissionSchema,\n ),\n makeTemplateResourceVariant(\n z.literal(\"database\"),\n databasePermissionSchema,\n ),\n makeTemplateResourceVariant(\n z.literal(\"postgres\"),\n postgresPermissionSchema,\n ),\n makeTemplateResourceVariant(\n z.literal(\"genie_space\"),\n genieSpacePermissionSchema,\n ),\n makeTemplateResourceVariant(\n z.literal(\"experiment\"),\n experimentPermissionSchema,\n ),\n makeTemplateResourceVariant(z.literal(\"app\"), appPermissionSchema),\n ])\n .describe(\n \"Resource requirement with template-specific field entries (includes computed origin).\",\n );\n\n// ── Template plugin (extends plugin manifest) ────────────────────────────\n\nexport const templatePluginSchema = z\n .object({\n name: z\n .string()\n .regex(/^[a-z][a-z0-9-]*$/)\n .describe(\n \"Plugin identifier. Must be lowercase, start with a letter, and contain only letters, numbers, and hyphens.\",\n ),\n displayName: z\n .string()\n .min(1)\n .describe(\"Human-readable display name for UI and CLI\"),\n description: z\n .string()\n .min(1)\n .describe(\"Brief description of what the plugin does\"),\n package: z\n .string()\n .min(1)\n .describe(\"NPM package name that provides this plugin\"),\n requiredByTemplate: z\n .boolean()\n .optional()\n .describe(\n \"When true, this plugin is required by the template and cannot be deselected during CLI init. The user will only be prompted to configure its resources. When absent or false, the plugin is optional and the user can choose whether to include it.\",\n ),\n onSetupMessage: z\n .string()\n .optional()\n .describe(\n \"Message displayed to the user after project initialization. Use this to inform about manual setup steps (e.g. environment variables, resource provisioning).\",\n ),\n stability: z\n .enum([\"beta\", \"ga\"])\n .optional()\n .describe(\n \"Plugin stability level. Beta is heading to GA; APIs may change between minor releases. GA (general availability) follows semver.\",\n ),\n scaffolding: z\n .object({\n rules: pluginScaffoldingRulesSchema\n .optional()\n .describe(\n \"Structured rules for scaffolding agents propagated from the plugin manifest.\",\n ),\n })\n .strict()\n .optional()\n .describe(\n \"Plugin-level scaffolding metadata propagated from the plugin manifest.\",\n ),\n resources: z\n .object({\n required: z\n .array(templateResourceRequirementSchema)\n .describe(\n \"Resources that must be available for the plugin to function\",\n ),\n optional: z\n .array(templateResourceRequirementSchema)\n .describe(\n \"Resources that enhance functionality but are not mandatory\",\n ),\n })\n .strict()\n .describe(\"Databricks resource requirements for this plugin\"),\n })\n .strict()\n .describe(\"Plugin manifest with package source information\");\n\n// ── Scaffolding descriptor ───────────────────────────────────────────────\n\nexport const scaffoldingFlagSchema = z\n .object({\n description: z.string().describe(\"Human-readable description of the flag.\"),\n required: z.boolean().optional().describe(\"Whether this flag is required.\"),\n pattern: z\n .string()\n .optional()\n .describe(\"Regex pattern for validating the flag value.\"),\n default: z.string().optional().describe(\"Default value for this flag.\"),\n })\n .strict()\n .describe(\"A flag for the scaffolding command.\");\n\n/**\n * Per-item upper bound on scaffolding rule strings. The intent is to enforce\n * \"short directive\" by contract — long paragraphs fail validation and force\n * authors to split prose into discrete actionable items.\n */\nconst SCAFFOLDING_RULE_MAX_LENGTH = 120;\n\nconst scaffoldingRuleItemSchema = z\n .string()\n .max(\n SCAFFOLDING_RULE_MAX_LENGTH,\n `rule item must be ≤ ${SCAFFOLDING_RULE_MAX_LENGTH} chars`,\n );\n\nexport const scaffoldingRulesSchema = z\n .object({\n never: z\n .array(scaffoldingRuleItemSchema)\n .optional()\n .describe(\"Actions the scaffolding agent must never perform.\"),\n must: z\n .array(scaffoldingRuleItemSchema)\n .optional()\n .describe(\"Actions the scaffolding agent must always perform.\"),\n should: z\n .array(scaffoldingRuleItemSchema)\n .optional()\n .describe(\n \"Recommended actions for the scaffolding agent (parity with plugin-level rules).\",\n ),\n })\n .strict()\n .describe(\"Structured rules for scaffolding agents.\");\n\nexport const scaffoldingDescriptorSchema = z\n .object({\n command: z\n .string()\n .describe(\"The scaffolding command (e.g., 'databricks apps init').\"),\n flags: z\n .record(z.string(), scaffoldingFlagSchema)\n .optional()\n .describe(\"Map of flag name to flag descriptor.\"),\n rules: scaffoldingRulesSchema\n .optional()\n .describe(\"Structured rules for scaffolding agents.\"),\n })\n .strict()\n .describe(\n \"Describes the scaffolding command, flags, and rules for project initialization.\",\n );\n\n/**\n * Canonical scaffolding descriptor for the `databricks apps init` command,\n * embedded in v2.0 template manifests to guide scaffolding agents.\n *\n * Co-located with `scaffoldingDescriptorSchema` so any change to the rule set\n * (or the schema's `maxLength` ceiling) shows up next to its consumer. The\n * `satisfies` annotation gives compile-time validation that the literal\n * matches the schema's input shape; if a `must`/`never` entry exceeds the\n * `maxLength` ceiling at runtime, `scaffoldingDescriptorSchema.parse` would\n * surface the breach in tests.\n */\nexport const TEMPLATE_SCAFFOLDING = {\n command: \"databricks apps init\",\n flags: {\n \"--name\": {\n description:\n \"Project name — sets {{.projectName}} in package.json, databricks.yml, and .env. Required for non-interactive scaffolding.\",\n required: true,\n pattern: \"^[a-z][a-z0-9-]*$\",\n },\n \"--template\": {\n description: \"Template path (local directory or GitHub URL)\",\n required: false,\n },\n \"--version\": {\n description: \"AppKit version to use; defaults to auto-detected\",\n required: false,\n },\n \"--features\": {\n description:\n \"Plugins to enable (comma-separated, no spaces; must match keys in this manifest's plugins map)\",\n required: false,\n pattern: \"^[a-zA-Z0-9_-]+(,[a-zA-Z0-9_-]+)*$\",\n },\n \"--set\": {\n description:\n \"Set resource values (format: plugin.resourceKey.field=value, repeatable)\",\n required: false,\n },\n \"--output-dir\": {\n description: \"Directory to write the project to\",\n required: false,\n },\n \"--description\": {\n description: \"App description\",\n required: false,\n },\n \"--run\": {\n description: \"Run the app after creation (none, dev, dev-remote)\",\n required: false,\n },\n \"--auto-approve\": {\n description:\n \"Pass as a bare flag (no value) to skip prompts for optional resources. Not recommended for agent-driven init — conflicts with the 'ask user when in doubt' rule.\",\n required: false,\n },\n \"--profile\": {\n description:\n \"Databricks CLI profile to use for authentication (global flag)\",\n required: false,\n },\n },\n rules: {\n must: [\n \"Keep all secrets and credentials only in app.yaml, databricks.yml, and/or .env\",\n ],\n should: [\"ask user when in doubt of resource to use for plugin\"],\n never: [\n \"guess resources when multiple or no options are available\",\n \"embed secrets in files that will go to the client-bundle\",\n ],\n },\n} satisfies z.infer<typeof scaffoldingDescriptorSchema>;\n\n// ── Template plugins manifest (root) ─────────────────────────────────────\n\nexport const templatePluginsManifestSchema = z\n .object({\n $schema: z\n .string()\n .optional()\n .describe(\"Reference to the JSON Schema for validation\"),\n version: z\n .enum([\"1.0\", \"1.1\", \"2.0\"])\n .describe(\"Schema version for the template plugins manifest\"),\n plugins: z\n .record(z.string(), templatePluginSchema)\n .describe(\"Map of plugin name to plugin manifest with package source\"),\n scaffolding: scaffoldingDescriptorSchema\n .optional()\n .describe(\n \"Describes the scaffolding command and its configuration for project initialization.\",\n ),\n })\n .strict()\n .superRefine((value, ctx) => {\n if (value.version === \"2.0\" && !value.scaffolding) {\n ctx.addIssue({\n code: \"custom\",\n path: [\"scaffolding\"],\n message: \"scaffolding is required when version is '2.0'\",\n });\n }\n })\n .describe(\n \"Aggregated plugin manifest for AppKit templates. Read by Databricks CLI during init to discover available plugins and their resource requirements.\",\n );\n\n// ── Inferred types ───────────────────────────────────────────────────────\n\nexport type ResourceType = z.infer<typeof resourceTypeSchema>;\nexport type SecretPermission = z.infer<typeof secretPermissionSchema>;\nexport type JobPermission = z.infer<typeof jobPermissionSchema>;\nexport type SqlWarehousePermission = z.infer<\n typeof sqlWarehousePermissionSchema\n>;\nexport type ServingEndpointPermission = z.infer<\n typeof servingEndpointPermissionSchema\n>;\nexport type VolumePermission = z.infer<typeof volumePermissionSchema>;\nexport type VectorSearchIndexPermission = z.infer<\n typeof vectorSearchIndexPermissionSchema\n>;\nexport type UcFunctionPermission = z.infer<typeof ucFunctionPermissionSchema>;\nexport type UcConnectionPermission = z.infer<\n typeof ucConnectionPermissionSchema\n>;\nexport type DatabasePermission = z.infer<typeof databasePermissionSchema>;\nexport type PostgresPermission = z.infer<typeof postgresPermissionSchema>;\nexport type GenieSpacePermission = z.infer<typeof genieSpacePermissionSchema>;\nexport type ExperimentPermission = z.infer<typeof experimentPermissionSchema>;\nexport type AppPermission = z.infer<typeof appPermissionSchema>;\nexport type ResourceKind = z.infer<typeof resourceKindSchema>;\nexport type KindDiscoveryDescriptor = z.infer<\n typeof kindDiscoveryDescriptorSchema\n>;\nexport type CliDiscoveryDescriptor = z.infer<\n typeof cliDiscoveryDescriptorSchema\n>;\nexport type DiscoveryDescriptor = z.infer<typeof discoveryDescriptorSchema>;\nexport type ResourceFieldEntry = z.infer<typeof resourceFieldEntrySchema>;\nexport type ResourceRequirement = z.infer<typeof resourceRequirementSchema>;\nexport type ConfigSchemaProperty = z.infer<typeof configSchemaPropertySchema>;\nexport type ConfigSchema = z.infer<typeof configSchemaSchema>;\nexport type PluginScaffoldingRules = z.infer<\n typeof pluginScaffoldingRulesSchema\n>;\nexport type PluginManifest = z.infer<typeof pluginManifestSchema>;\nexport type Origin = z.infer<typeof originSchema>;\n// Template-side types use `z.input` so callers can construct a TemplatePlugin\n// from a parsed PluginManifest before the field-level origin transform runs.\n// `writeManifest` parses every field through `templateFieldEntrySchema` at\n// write-time, so the on-disk shape always has origin populated. The runtime\n// invariant: origin is *always* present after sync writes; the type slot\n// stays optional so the in-memory pipeline does not need to fabricate origin\n// before assignment.\nexport type TemplateFieldEntry = z.input<typeof templateFieldEntrySchema>;\nexport type TemplateResourceRequirement = z.input<\n typeof templateResourceRequirementSchema\n>;\nexport type TemplatePlugin = z.input<typeof templatePluginSchema>;\nexport type ScaffoldingFlag = z.infer<typeof scaffoldingFlagSchema>;\nexport type ScaffoldingRules = z.infer<typeof scaffoldingRulesSchema>;\nexport type ScaffoldingDescriptor = z.infer<typeof scaffoldingDescriptorSchema>;\nexport type TemplatePluginsManifest = z.input<\n typeof templatePluginsManifestSchema\n>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,MAAa,qBAAqB,EAC/B,KAAK;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,CAAC,CACD,SAAS,8BAA8B;AAE1C,MAAa,yBAAyB,EACnC,KAAK;CAAC;CAAQ;CAAS;CAAS,CAAC,CACjC,SAAS,gEAAgE;AAE5E,MAAa,sBAAsB,EAChC,KAAK;CAAC;CAAY;CAAkB;CAAa,CAAC,CAClD,SAAS,6DAA6D;AAEzE,MAAa,+BAA+B,EACzC,KAAK,CAAC,WAAW,aAAa,CAAC,CAC/B,SACC,uEACD;AAEH,MAAa,kCAAkC,EAC5C,KAAK;CAAC;CAAY;CAAa;CAAa,CAAC,CAC7C,SACC,0EACD;AAEH,MAAa,yBAAyB,EACnC,KAAK,CAAC,eAAe,eAAe,CAAC,CACrC,SAAS,gDAAgD;AAE5D,MAAa,oCAAoC,EAC9C,KAAK,CAAC,SAAS,CAAC,CAChB,SAAS,+CAA+C;AAE3D,MAAa,6BAA6B,EACvC,KAAK,CAAC,UAAU,CAAC,CACjB,SAAS,kDAAkD;AAE9D,MAAa,+BAA+B,EAC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manifest.js","names":[],"sources":["../../src/schemas/manifest.ts"],"sourcesContent":["/**\n * Zod-authoring module for AppKit plugin manifest schemas.\n *\n * Single source of truth for the plugin manifest contract. JSON Schema\n * artifacts published at the docs URL are emitted from these schemas via\n * `tools/generate-json-schema.ts` and live only in `docs/static/schemas/`\n * (no package-internal copies).\n *\n * - Cross-field constraints (cycle/dangling-reference checks, `<PROFILE>`\n * placeholder, post-scaffold instruction non-empty) are refinements\n * co-located with the shape they constrain. Validation is driven through\n * the Standard Schema interface from `validate-manifest.ts`.\n * - `templateFieldEntrySchema` is a transform that emits `origin` from\n * `localOnly`/`value`/`resolve`. The input slot is still allowed so\n * re-parsing previously-synced template manifests does not fail, but the\n * transform always overwrites it — drift-by-construction for hand-edits.\n * - `discoveryDescriptorSchema` is a discriminated union over a `type`\n * literal. The `kind` variant references one of the well-known\n * `resourceKind` values for which AppKit owns the CLI command map (see\n * `RESOURCE_KIND_COMMANDS` below). The `cli` variant is the escape hatch\n * carrying the existing free-form fields (with the `<PROFILE>`\n * refinement). Hierarchical context for volumes (catalog/schema parent\n * walk) is encoded via the kind's `parents` array, not via dependsOn.\n * - Scaffolding rule items carry a `maxLength` (120 chars) so\n * `rules.never[]` / `rules.must[]` / `rules.should[]` stay short\n * directives by contract, and the canonical `TEMPLATE_SCAFFOLDING`\n * constant lives co-located with the scaffolding schemas (sync.ts\n * imports it).\n */\n\nimport { z } from \"zod\";\n\n// ── Resource type + per-type permission enums ────────────────────────────\n\nexport const resourceTypeSchema = z\n .enum([\n \"secret\",\n \"job\",\n \"sql_warehouse\",\n \"serving_endpoint\",\n \"volume\",\n \"vector_search_index\",\n \"uc_function\",\n \"uc_connection\",\n \"database\",\n \"postgres\",\n \"genie_space\",\n \"experiment\",\n \"app\",\n ])\n .describe(\"Type of Databricks resource\");\n\nexport const secretPermissionSchema = z\n .enum([\"READ\", \"WRITE\", \"MANAGE\"])\n .describe(\"Permission for secret resources (order: weakest to strongest)\");\n\nexport const jobPermissionSchema = z\n .enum([\"CAN_VIEW\", \"CAN_MANAGE_RUN\", \"CAN_MANAGE\"])\n .describe(\"Permission for job resources (order: weakest to strongest)\");\n\nexport const sqlWarehousePermissionSchema = z\n .enum([\"CAN_USE\", \"CAN_MANAGE\"])\n .describe(\n \"Permission for SQL warehouse resources (order: weakest to strongest)\",\n );\n\nexport const servingEndpointPermissionSchema = z\n .enum([\"CAN_VIEW\", \"CAN_QUERY\", \"CAN_MANAGE\"])\n .describe(\n \"Permission for serving endpoint resources (order: weakest to strongest)\",\n );\n\nexport const volumePermissionSchema = z\n .enum([\"READ_VOLUME\", \"WRITE_VOLUME\"])\n .describe(\"Permission for Unity Catalog volume resources\");\n\nexport const vectorSearchIndexPermissionSchema = z\n .enum([\"SELECT\"])\n .describe(\"Permission for vector search index resources\");\n\nexport const ucFunctionPermissionSchema = z\n .enum([\"EXECUTE\"])\n .describe(\"Permission for Unity Catalog function resources\");\n\nexport const ucConnectionPermissionSchema = z\n .enum([\"USE_CONNECTION\"])\n .describe(\"Permission for Unity Catalog connection resources\");\n\nexport const databasePermissionSchema = z\n .enum([\"CAN_CONNECT_AND_CREATE\"])\n .describe(\"Permission for database resources\");\n\nexport const postgresPermissionSchema = z\n .enum([\"CAN_CONNECT_AND_CREATE\"])\n .describe(\"Permission for Postgres resources\");\n\nexport const genieSpacePermissionSchema = z\n .enum([\"CAN_VIEW\", \"CAN_RUN\", \"CAN_EDIT\", \"CAN_MANAGE\"])\n .describe(\n \"Permission for Genie Space resources (order: weakest to strongest)\",\n );\n\nexport const experimentPermissionSchema = z\n .enum([\"CAN_READ\", \"CAN_EDIT\", \"CAN_MANAGE\"])\n .describe(\n \"Permission for MLflow experiment resources (order: weakest to strongest)\",\n );\n\nexport const appPermissionSchema = z\n .enum([\"CAN_USE\"])\n .describe(\"Permission for Databricks App resources\");\n\n// ── Discovery descriptor (discriminated union) ───────────────────────────\n\n/**\n * Well-known Databricks resource kinds for which AppKit owns the CLI\n * command map. Plugins reference one of these via the `kind` variant of the\n * discovery descriptor; everything else falls back to the free-form `cli`\n * variant.\n *\n * Kept narrow on purpose: each entry costs an addition to\n * `RESOURCE_KIND_COMMANDS` below, which is the single source of truth for\n * how that kind is enumerated.\n */\nexport const resourceKindSchema = z\n .enum([\n \"warehouse\",\n \"genie_space\",\n \"postgres_project\",\n \"postgres_branch\",\n \"postgres_database\",\n \"volume\",\n ])\n .describe(\n \"Well-known Databricks resource kind whose listing command is owned by AppKit (see RESOURCE_KIND_COMMANDS).\",\n );\n\nexport const kindDiscoveryDescriptorSchema = z\n .object({\n type: z\n .literal(\"kind\")\n .describe(\n \"Discriminator: 'kind' uses the AppKit-owned command map for the named resourceKind.\",\n ),\n resourceKind: resourceKindSchema.describe(\n \"Reference to a well-known Databricks resource kind. AppKit owns the CLI command, response shape, and unwrap rules.\",\n ),\n select: z\n .string()\n .optional()\n .describe(\n \"Field name in the parsed CLI response used as the selected value (e.g., 'id'). Defaults to the kind's natural identifier when omitted.\",\n ),\n display: z\n .string()\n .optional()\n .describe(\n \"Field name in the parsed CLI response shown to the user in selection UI. Defaults to `select` if omitted.\",\n ),\n dependsOn: z\n .string()\n .optional()\n .describe(\n \"Name of a sibling field within the same resource that must be resolved first. Used to express ordering dependencies between resource fields.\",\n ),\n shortcut: z\n .string()\n .optional()\n .describe(\n \"Single-value fast-path command that returns exactly one value, skipping interactive selection.\",\n ),\n })\n .strict()\n .describe(\n \"Discovery via a well-known resource kind. AppKit owns the CLI command and unwrap rules for the named kind.\",\n );\n\n/**\n * Shell metacharacters rejected on free-form CLI command strings. Catches the\n * common foot-guns (statement separators, pipes, redirects via shell, command\n * substitution, newlines). Not a security boundary on its own — executors must\n * always pass these via argv, never shell-exec the string. Angle brackets are\n * permitted because `<PROFILE>` (and future `<…>` placeholders) are part of\n * the command-template convention.\n */\nconst SHELL_METACHAR_RE = /[;|&`$\\n\\r]/;\n\nexport const cliDiscoveryDescriptorSchema = z\n .object({\n type: z\n .literal(\"cli\")\n .describe(\n \"Discriminator: 'cli' uses a free-form Databricks CLI command supplied by the plugin.\",\n ),\n cliCommand: z\n .string()\n .describe(\n \"Databricks CLI command that lists resources. Must include <PROFILE>. Shell metacharacters (;|&`$ and newlines) are rejected; for first-party Databricks resources prefer the `kind` variant which uses AppKit's typed command map.\",\n ),\n selectField: z\n .string()\n .describe(\n \"jq-style path to the field used as the selected value (e.g., '.id', '.name').\",\n ),\n displayField: z\n .string()\n .optional()\n .describe(\n \"jq-style path to the field shown to the user in selection UI. Defaults to selectField if omitted.\",\n ),\n dependsOn: z\n .string()\n .optional()\n .describe(\n \"Name of a sibling field within the same resource that must be resolved first. Used to express ordering dependencies between resource fields.\",\n ),\n shortcut: z\n .string()\n .optional()\n .describe(\n \"Single-value fast-path command that returns exactly one value, skipping interactive selection. Shell metacharacters are rejected.\",\n ),\n })\n .strict()\n .refine((descriptor) => descriptor.cliCommand.includes(\"<PROFILE>\"), {\n message: \"must include <PROFILE> placeholder\",\n path: [\"cliCommand\"],\n })\n .refine((descriptor) => !SHELL_METACHAR_RE.test(descriptor.cliCommand), {\n message:\n \"must not contain shell metacharacters (;|&`$ or newlines); use the `kind` variant for typed Databricks resources\",\n path: [\"cliCommand\"],\n })\n .refine(\n (descriptor) =>\n descriptor.shortcut === undefined ||\n !SHELL_METACHAR_RE.test(descriptor.shortcut),\n {\n message: \"must not contain shell metacharacters (;|&`$ or newlines)\",\n path: [\"shortcut\"],\n },\n )\n .describe(\n \"Discovery via a free-form Databricks CLI command. Escape hatch — prefer the `kind` variant when a typed resourceKind covers the resource. This shape is intentionally minimal and may tighten further in future versions.\",\n );\n\nexport const discoveryDescriptorSchema = z\n .discriminatedUnion(\"type\", [\n kindDiscoveryDescriptorSchema,\n cliDiscoveryDescriptorSchema,\n ])\n .describe(\n \"Describes how the CLI discovers values for a resource field. 'kind' references a well-known Databricks resource kind whose command is owned by AppKit; 'cli' is the escape hatch carrying a free-form Databricks CLI command.\",\n );\n\n// ── Resource kind → CLI command map ──────────────────────────────────────\n\n/**\n * Descriptor for how a well-known resource kind is listed via the\n * Databricks CLI.\n *\n * - `command` is the CLI invocation template. It carries two kinds of\n * placeholders:\n * - `<PROFILE>` — substituted with the user's CLI profile by the runner.\n * - `{<fieldName>}` — substituted with the resolved value of the named\n * sibling field (used for `dependsOn` chains).\n * - `unwrap`, when set, is the JSON path into the response wrapper (e.g.,\n * `\"warehouses\"` for `{ warehouses: [...] }`). Omitted when the response\n * is already a flat array.\n * - `parents`, when set, lists transient query inputs the runner must\n * collect (as free-text prompts) before invoking the command. Each\n * `parents[i]` value substitutes the matching `{name}` placeholder in\n * the command string. Unlike `dependsOn` (which references a sibling\n * field on the same resource), `parents` covers inputs that aren't\n * persisted as fields on the resource.\n */\nexport type ResourceKindCommand = {\n command: string;\n unwrap?: string;\n parents?: readonly string[];\n};\n\n/**\n * Single source of truth for AppKit-owned discovery commands.\n *\n * To add a new resource kind: extend `resourceKindSchema` and add an entry\n * here. Plugins reference the kind via `discovery: { type: \"kind\",\n * resourceKind: \"...\" }` and inherit the command + response shape.\n *\n * `unwrap` defaults are unset: the existing core plugin manifests use simple\n * jq paths (`.id`, `.name`, `.full_name`), implying the listed CLI commands\n * return flat arrays. Refine in a follow-up if a kind's CLI returns wrapped\n * data.\n *\n * Volume's catalog/schema parent context is supplied via the `parents`\n * array, which the runner collects from the user as free-text prompts\n * before invoking the listing command.\n */\nexport const RESOURCE_KIND_COMMANDS: Record<\n z.infer<typeof resourceKindSchema>,\n { command: string; unwrap?: string; parents?: readonly string[] }\n> = {\n warehouse: {\n command: \"databricks warehouses list --profile <PROFILE> --output json\",\n },\n genie_space: {\n command: \"databricks genie list-spaces --profile <PROFILE> --output json\",\n },\n postgres_project: {\n command:\n \"databricks postgres list-projects --profile <PROFILE> --output json\",\n },\n postgres_branch: {\n // {project} is a placeholder for the resolved value of the `project`\n // sibling field (declared via `dependsOn: \"project\"` on the kind variant).\n // The Databricks CLI requires the parent project resource name (format\n // `projects/{project_id}`) as a positional argument.\n command:\n \"databricks postgres list-branches {project} --profile <PROFILE> --output json\",\n },\n postgres_database: {\n // {branch} is a placeholder for the resolved value of the `branch`\n // sibling field (declared via `dependsOn: \"branch\"` on the kind variant).\n command:\n \"databricks postgres list-databases {branch} --profile <PROFILE> --output json\",\n },\n volume: {\n // `parents` declares free-text user prompts the runner must collect before\n // invoking the discovery command. Each `parents[i]` value substitutes the\n // matching `{name}` placeholder in the command string above. Unlike\n // `dependsOn` (which references a sibling field on the same resource),\n // `parents` covers transient query inputs that aren't persisted as fields.\n command:\n \"databricks volumes list {catalog} {schema} --profile <PROFILE> --output json\",\n parents: [\"catalog\", \"schema\"] as const,\n },\n};\n\n// ── Resource field entry (plugin manifest variant) ───────────────────────\n\nexport const resourceFieldEntrySchema = z\n .object({\n env: z\n .string()\n .regex(/^[A-Z][A-Z0-9_]*$/)\n .optional()\n .describe(\"Environment variable name for this field\"),\n description: z\n .string()\n .optional()\n .describe(\"Human-readable description for this field\"),\n bundleIgnore: z\n .boolean()\n .optional()\n .describe(\n \"When true, this field is excluded from Databricks bundle configuration (databricks.yml) generation.\",\n ),\n examples: z\n .array(z.string())\n .optional()\n .describe(\"Example values showing the expected format for this field\"),\n localOnly: z\n .boolean()\n .optional()\n .describe(\n \"When true, this field is only generated for local .env files. The Databricks Apps platform auto-injects it at deploy time.\",\n ),\n value: z\n .string()\n .optional()\n .describe(\n \"Static value for this field. Used when no prompted or resolved value exists.\",\n ),\n resolve: z\n .string()\n .regex(/^[a-z_]+:[a-zA-Z]+$/)\n .optional()\n .describe(\n \"Named resolver prefixed by resource type (e.g., 'postgres:host'). The CLI resolves this value during the init prompt flow.\",\n ),\n discovery: discoveryDescriptorSchema.optional(),\n })\n .strict()\n .describe(\n \"Defines a single field for a resource. Each field has its own environment variable and optional description. Single-value types use one key (e.g. id); multi-value types (database, secret) use multiple (e.g. instance_name, database_name or scope, key).\",\n );\n\n// ── Resource requirement (per-type permission discriminator) ─────────────\n\n/**\n * Build a per-type variant. Each variant fixes `type` to a literal and constrains\n * `permission` to the matching enum, mirroring the existing JSON Schema's\n * `allOf + if/then` block. `fields` and the rest of the shape come from a\n * shared base.\n */\nconst resourceRequirementBaseShape = {\n alias: z\n .string()\n .min(1)\n .describe(\n \"Human-readable label for UI/display only. Deduplication uses resourceKey, not alias.\",\n ),\n resourceKey: z\n .string()\n .regex(/^[a-z][a-z0-9-]*$/)\n .describe(\n \"Stable key for machine use: deduplication, env naming, composite keys, app.yaml. Required for registry lookup.\",\n ),\n description: z\n .string()\n .min(1)\n .describe(\"Human-readable description of why this resource is needed\"),\n fields: z\n .record(z.string(), resourceFieldEntrySchema)\n .refine((obj) => Object.keys(obj).length >= 1, {\n message: \"fields must contain at least one entry\",\n })\n .optional()\n .describe(\n \"Map of field name to env and optional description. Single-value types use one key (e.g. id); multi-value (database, secret) use multiple (e.g. instance_name, database_name or scope, key).\",\n ),\n};\n\n/**\n * Adds the cycle/dangling-reference cross-field check to a resource variant.\n * Iterates the resource's `fields`, validates each `discovery.dependsOn` target\n * is a sibling field name, then runs DFS over the dependsOn graph to detect\n * cycles. Issue paths target either the offending field's `dependsOn` slot or\n * the resource itself for cycles.\n */\nfunction refineResourceDependsOn(\n resource: { fields?: Record<string, { discovery?: { dependsOn?: string } }> },\n ctx: z.core.$RefinementCtx,\n): void {\n if (!resource.fields) return;\n const fieldNames = new Set(Object.keys(resource.fields));\n\n // Pass 1: validate dependsOn references and build the dependency graph.\n const deps = new Map<string, string>();\n for (const [name, field] of Object.entries(resource.fields)) {\n const dep = field.discovery?.dependsOn;\n if (!dep) continue;\n if (!fieldNames.has(dep)) {\n ctx.addIssue({\n code: \"custom\",\n path: [\"fields\", name, \"discovery\", \"dependsOn\"],\n message: `references non-existent sibling field '${dep}'`,\n });\n }\n deps.set(name, dep);\n }\n\n // Pass 2: detect cycles via DFS. Emit one issue per cycle found.\n const visited = new Set<string>();\n const visiting = new Set<string>();\n\n function dfs(node: string, chain: string[]): string[] | null {\n if (visiting.has(node)) return [...chain, node];\n if (visited.has(node)) return null;\n visiting.add(node);\n const next = deps.get(node);\n if (next) {\n const cycle = dfs(next, [...chain, node]);\n if (cycle) return cycle;\n }\n visiting.delete(node);\n visited.add(node);\n return null;\n }\n\n for (const node of deps.keys()) {\n if (visited.has(node)) continue;\n const cycle = dfs(node, []);\n if (cycle) {\n ctx.addIssue({\n code: \"custom\",\n path: [],\n message: `discovery.dependsOn creates a cycle: ${cycle.join(\" → \")}`,\n });\n // One cycle error per resource is enough.\n break;\n }\n }\n}\n\nfunction makeResourceVariant<\n TType extends z.ZodLiteral<string>,\n TPerm extends z.ZodTypeAny,\n>(typeLiteral: TType, permission: TPerm) {\n return z\n .object({\n type: typeLiteral,\n ...resourceRequirementBaseShape,\n permission: permission.describe(\n \"Required permission level. Validated per resource type.\",\n ),\n })\n .strict()\n .superRefine(refineResourceDependsOn);\n}\n\nexport const resourceRequirementSchema = z\n .discriminatedUnion(\"type\", [\n makeResourceVariant(z.literal(\"secret\"), secretPermissionSchema),\n makeResourceVariant(z.literal(\"job\"), jobPermissionSchema),\n makeResourceVariant(\n z.literal(\"sql_warehouse\"),\n sqlWarehousePermissionSchema,\n ),\n makeResourceVariant(\n z.literal(\"serving_endpoint\"),\n servingEndpointPermissionSchema,\n ),\n makeResourceVariant(z.literal(\"volume\"), volumePermissionSchema),\n makeResourceVariant(\n z.literal(\"vector_search_index\"),\n vectorSearchIndexPermissionSchema,\n ),\n makeResourceVariant(z.literal(\"uc_function\"), ucFunctionPermissionSchema),\n makeResourceVariant(\n z.literal(\"uc_connection\"),\n ucConnectionPermissionSchema,\n ),\n makeResourceVariant(z.literal(\"database\"), databasePermissionSchema),\n makeResourceVariant(z.literal(\"postgres\"), postgresPermissionSchema),\n makeResourceVariant(z.literal(\"genie_space\"), genieSpacePermissionSchema),\n makeResourceVariant(z.literal(\"experiment\"), experimentPermissionSchema),\n makeResourceVariant(z.literal(\"app\"), appPermissionSchema),\n ])\n .describe(\n \"Declares a resource requirement for a plugin. Can be defined statically in a manifest or dynamically via getResourceRequirements().\",\n );\n\n// ── Config schema (recursive) ────────────────────────────────────────────\n\nexport const configSchemaPropertySchema: z.ZodType = z.lazy(() =>\n z\n .object({\n type: z.enum([\n \"object\",\n \"array\",\n \"string\",\n \"number\",\n \"boolean\",\n \"integer\",\n ]),\n description: z.string().optional(),\n default: z.unknown().optional(),\n enum: z.array(z.unknown()).optional(),\n properties: z.record(z.string(), configSchemaPropertySchema).optional(),\n items: configSchemaPropertySchema.optional(),\n minimum: z.number().optional(),\n maximum: z.number().optional(),\n minLength: z.number().int().min(0).optional(),\n maxLength: z.number().int().min(0).optional(),\n required: z.array(z.string()).optional(),\n // `additionalProperties` is a standard JSON Schema keyword used by core\n // plugin manifests (e.g., serving, vector-search, genie) to constrain\n // dictionary-shaped properties. Allowed on nested property entries as\n // either a boolean or a sub-schema, mirroring JSON Schema semantics.\n additionalProperties: z\n .union([z.boolean(), configSchemaPropertySchema])\n .optional(),\n })\n .strict(),\n);\n\nexport const configSchemaSchema: z.ZodType = z.lazy(() =>\n z\n .object({\n type: z.enum([\"object\", \"array\", \"string\", \"number\", \"boolean\"]),\n properties: z.record(z.string(), configSchemaPropertySchema).optional(),\n items: configSchemaSchema.optional(),\n required: z.array(z.string()).optional(),\n additionalProperties: z.boolean().optional(),\n })\n .strict(),\n);\n\n// ── Plugin-level scaffolding rules ───────────────────────────────────────\n\n/**\n * Per-item upper bound on plugin-level scaffolding rule strings. Matches the\n * template-level `SCAFFOLDING_RULE_MAX_LENGTH` defined below — rules at both\n * levels are short directives, not prose. The literal value lives here (and\n * not by reference to the template-side constant) because this declaration\n * is read in source order and the template constant is declared later.\n */\nconst PLUGIN_SCAFFOLDING_RULE_MAX_LENGTH = 120;\n\nconst pluginScaffoldingRuleItemSchema = z\n .string()\n .min(1)\n .max(\n PLUGIN_SCAFFOLDING_RULE_MAX_LENGTH,\n `rule entries must be ≤ ${PLUGIN_SCAFFOLDING_RULE_MAX_LENGTH} chars`,\n );\n\nexport const pluginScaffoldingRulesSchema = z\n .object({\n must: z\n .array(pluginScaffoldingRuleItemSchema)\n .optional()\n .describe(\"Actions the scaffolding agent must always perform.\"),\n should: z\n .array(pluginScaffoldingRuleItemSchema)\n .optional()\n .describe(\"Recommended actions for the scaffolding agent.\"),\n never: z\n .array(pluginScaffoldingRuleItemSchema)\n .optional()\n .describe(\"Actions the scaffolding agent must never perform.\"),\n })\n .strict()\n .superRefine((rules, ctx) => {\n // (a) Reject duplicate entries within any single array.\n const buckets: Array<[\"must\" | \"should\" | \"never\", string[] | undefined]> =\n [\n [\"must\", rules.must],\n [\"should\", rules.should],\n [\"never\", rules.never],\n ];\n for (const [bucketName, items] of buckets) {\n if (!items) continue;\n const seen = new Map<string, number>();\n items.forEach((item, idx) => {\n const prev = seen.get(item);\n if (prev === undefined) {\n seen.set(item, idx);\n return;\n }\n ctx.addIssue({\n code: \"custom\",\n path: [bucketName, idx],\n message: `duplicate rule entry: \"${item}\" already declared at index ${prev}`,\n });\n });\n }\n // (b) Reject a string that appears in more than one of must/should/never.\n type Bucket = \"must\" | \"should\" | \"never\";\n const owner = new Map<string, Bucket>();\n for (const [bucketName, items] of buckets) {\n if (!items) continue;\n for (let i = 0; i < items.length; i++) {\n const item = items[i];\n const existing = owner.get(item);\n if (existing === undefined) {\n owner.set(item, bucketName);\n continue;\n }\n if (existing !== bucketName) {\n ctx.addIssue({\n code: \"custom\",\n path: [bucketName, i],\n message: `rule entry \"${item}\" appears in both '${existing}' and '${bucketName}'; rules must belong to exactly one bucket`,\n });\n }\n }\n }\n })\n .describe(\n \"Structured rules for scaffolding agents declared at the plugin level. Each rule is a short directive (≤120 chars).\",\n );\n\n// ── Plugin manifest (root) ───────────────────────────────────────────────\n\nexport const pluginManifestSchema = z\n .object({\n $schema: z\n .string()\n .optional()\n .describe(\"Reference to the JSON Schema for validation\"),\n name: z\n .string()\n .regex(/^[a-z][a-z0-9-]*$/)\n .describe(\n \"Plugin identifier. Must be lowercase, start with a letter, and contain only letters, numbers, and hyphens.\",\n ),\n displayName: z\n .string()\n .min(1)\n .describe(\"Human-readable display name for UI and CLI\"),\n description: z\n .string()\n .min(1)\n .describe(\"Brief description of what the plugin does\"),\n resources: z\n .object({\n required: z\n .array(resourceRequirementSchema)\n .describe(\n \"Resources that must be available for the plugin to function\",\n ),\n optional: z\n .array(resourceRequirementSchema)\n .describe(\n \"Resources that enhance functionality but are not mandatory\",\n ),\n })\n .strict()\n .describe(\"Databricks resource requirements for this plugin\"),\n config: z\n .object({\n schema: configSchemaSchema.optional(),\n })\n .strict()\n .optional()\n .describe(\"Configuration schema for the plugin\"),\n author: z.string().optional().describe(\"Author name or organization\"),\n version: z\n .string()\n .regex(/^\\d+\\.\\d+\\.\\d+(-[a-zA-Z0-9.]+)?$/)\n .optional()\n .describe(\"Plugin version (semver format)\"),\n repository: z\n .url()\n .optional()\n .describe(\"URL to the plugin's source repository\"),\n keywords: z\n .array(z.string())\n .optional()\n .describe(\"Keywords for plugin discovery\"),\n license: z.string().optional().describe(\"SPDX license identifier\"),\n onSetupMessage: z\n .string()\n .optional()\n .describe(\n \"Message displayed to the user after project initialization. Use this to inform about manual setup steps (e.g. environment variables, resource provisioning).\",\n ),\n hidden: z\n .boolean()\n .optional()\n .describe(\n \"When true, this plugin is excluded from the template plugins manifest (appkit.plugins.json) during sync.\",\n ),\n stability: z\n .enum([\"beta\", \"ga\"])\n .optional()\n .describe(\n \"Plugin stability level. Beta plugins may have breaking API changes between minor releases but are on a path to GA. GA (general availability) plugins follow semver strictly.\",\n ),\n scaffolding: z\n .object({\n rules: pluginScaffoldingRulesSchema\n .optional()\n .describe(\n \"Structured rules for scaffolding agents declared at the plugin level.\",\n ),\n })\n .strict()\n .optional()\n .describe(\n \"Plugin-level scaffolding metadata consumed by scaffolding agents. Symmetric with template-level `scaffolding`.\",\n ),\n })\n .strict()\n .describe(\n \"Schema for Databricks AppKit plugin manifest files. Defines plugin metadata, resource requirements, and configuration options.\",\n );\n\n// ── Origin enum ──────────────────────────────────────────────────────────\n\nexport const originSchema = z\n .enum([\"user\", \"platform\", \"static\", \"cli\"])\n .describe(\n \"How the field value is determined. Computed during sync, not authored by plugin developers.\",\n );\n\n// ── Template field entry (origin computed by transform) ─────────────────\n\n/**\n * Derives the canonical origin of a resource field value from its shape.\n *\n * - `localOnly: true` → `\"platform\"` (auto-injected by the Databricks Apps\n * platform at deploy time; takes precedence over `value`/`resolve`).\n * - `value !== undefined` → `\"static\"` (hardcoded value).\n * - `resolve !== undefined` → `\"cli\"` (resolved by the CLI during init).\n * - else → `\"user\"` (user must provide the value at init time).\n *\n * Co-located with `templateFieldEntrySchema` because the transform is the\n * only consumer. Kept private so any other \"origin computation\" goes\n * through the schema rather than re-implementing the rules.\n */\nfunction computeOriginFromField(field: {\n localOnly?: boolean;\n value?: string;\n resolve?: string;\n}): z.infer<typeof originSchema> {\n if (field.localOnly) return \"platform\";\n if (field.value !== undefined) return \"static\";\n if (field.resolve !== undefined) return \"cli\";\n return \"user\";\n}\n\n/**\n * Template field entry: extends the plugin manifest field entry with an\n * optional `origin` input slot, then runs a `.transform()` that overwrites\n * `origin` with the computed value. Allowing `origin` on input means\n * re-parsing a previously-synced template manifest does not fail; emitting\n * `origin` always means hand-edits in synced JSON are silently corrected\n * on the next parse — drift-by-construction.\n */\nexport const templateFieldEntrySchema = resourceFieldEntrySchema\n .extend({ origin: originSchema.optional() })\n .transform((field) => ({\n ...field,\n origin: computeOriginFromField(field),\n }));\n\n// ── Template resource requirement (uses templateFieldEntrySchema) ────────\n\nconst templateResourceRequirementBaseShape = {\n alias: z\n .string()\n .min(1)\n .describe(\"Human-readable label for UI/display only.\"),\n resourceKey: z\n .string()\n .regex(/^[a-z][a-z0-9-]*$/)\n .describe(\n \"Stable key for machine use: deduplication, env naming, composite keys.\",\n ),\n description: z\n .string()\n .min(1)\n .describe(\"Human-readable description of why this resource is needed\"),\n fields: z\n .record(z.string(), templateFieldEntrySchema)\n .refine((obj) => Object.keys(obj).length >= 1, {\n message: \"fields must contain at least one entry\",\n })\n .optional()\n .describe(\"Map of field name to field entry with computed origin.\"),\n};\n\nfunction makeTemplateResourceVariant<\n TType extends z.ZodLiteral<string>,\n TPerm extends z.ZodTypeAny,\n>(typeLiteral: TType, permission: TPerm) {\n return z\n .object({\n type: typeLiteral,\n ...templateResourceRequirementBaseShape,\n permission: permission.describe(\n \"Required permission level. Validated per resource type.\",\n ),\n })\n .strict()\n .superRefine(refineResourceDependsOn);\n}\n\nexport const templateResourceRequirementSchema = z\n .discriminatedUnion(\"type\", [\n makeTemplateResourceVariant(z.literal(\"secret\"), secretPermissionSchema),\n makeTemplateResourceVariant(z.literal(\"job\"), jobPermissionSchema),\n makeTemplateResourceVariant(\n z.literal(\"sql_warehouse\"),\n sqlWarehousePermissionSchema,\n ),\n makeTemplateResourceVariant(\n z.literal(\"serving_endpoint\"),\n servingEndpointPermissionSchema,\n ),\n makeTemplateResourceVariant(z.literal(\"volume\"), volumePermissionSchema),\n makeTemplateResourceVariant(\n z.literal(\"vector_search_index\"),\n vectorSearchIndexPermissionSchema,\n ),\n makeTemplateResourceVariant(\n z.literal(\"uc_function\"),\n ucFunctionPermissionSchema,\n ),\n makeTemplateResourceVariant(\n z.literal(\"uc_connection\"),\n ucConnectionPermissionSchema,\n ),\n makeTemplateResourceVariant(\n z.literal(\"database\"),\n databasePermissionSchema,\n ),\n makeTemplateResourceVariant(\n z.literal(\"postgres\"),\n postgresPermissionSchema,\n ),\n makeTemplateResourceVariant(\n z.literal(\"genie_space\"),\n genieSpacePermissionSchema,\n ),\n makeTemplateResourceVariant(\n z.literal(\"experiment\"),\n experimentPermissionSchema,\n ),\n makeTemplateResourceVariant(z.literal(\"app\"), appPermissionSchema),\n ])\n .describe(\n \"Resource requirement with template-specific field entries (includes computed origin).\",\n );\n\n// ── Template plugin (extends plugin manifest) ────────────────────────────\n\nexport const templatePluginSchema = z\n .object({\n name: z\n .string()\n .regex(/^[a-z][a-z0-9-]*$/)\n .describe(\n \"Plugin identifier. Must be lowercase, start with a letter, and contain only letters, numbers, and hyphens.\",\n ),\n displayName: z\n .string()\n .min(1)\n .describe(\"Human-readable display name for UI and CLI\"),\n description: z\n .string()\n .min(1)\n .describe(\"Brief description of what the plugin does\"),\n package: z\n .string()\n .min(1)\n .describe(\"NPM package name that provides this plugin\"),\n requiredByTemplate: z\n .boolean()\n .optional()\n .describe(\n \"When true, this plugin is required by the template and cannot be deselected during CLI init. The user will only be prompted to configure its resources. When absent or false, the plugin is optional and the user can choose whether to include it.\",\n ),\n onSetupMessage: z\n .string()\n .optional()\n .describe(\n \"Message displayed to the user after project initialization. Use this to inform about manual setup steps (e.g. environment variables, resource provisioning).\",\n ),\n stability: z\n .enum([\"beta\", \"ga\"])\n .optional()\n .describe(\n \"Plugin stability level. Beta is heading to GA; APIs may change between minor releases. GA (general availability) follows semver.\",\n ),\n scaffolding: z\n .object({\n rules: pluginScaffoldingRulesSchema\n .optional()\n .describe(\n \"Structured rules for scaffolding agents propagated from the plugin manifest.\",\n ),\n })\n .strict()\n .optional()\n .describe(\n \"Plugin-level scaffolding metadata propagated from the plugin manifest.\",\n ),\n resources: z\n .object({\n required: z\n .array(templateResourceRequirementSchema)\n .describe(\n \"Resources that must be available for the plugin to function\",\n ),\n optional: z\n .array(templateResourceRequirementSchema)\n .describe(\n \"Resources that enhance functionality but are not mandatory\",\n ),\n })\n .strict()\n .describe(\"Databricks resource requirements for this plugin\"),\n })\n .strict()\n .describe(\"Plugin manifest with package source information\");\n\n// ── Scaffolding descriptor ───────────────────────────────────────────────\n\nexport const scaffoldingFlagSchema = z\n .object({\n description: z.string().describe(\"Human-readable description of the flag.\"),\n required: z.boolean().optional().describe(\"Whether this flag is required.\"),\n pattern: z\n .string()\n .optional()\n .describe(\"Regex pattern for validating the flag value.\"),\n default: z.string().optional().describe(\"Default value for this flag.\"),\n })\n .strict()\n .describe(\"A flag for the scaffolding command.\");\n\n/**\n * Per-item upper bound on scaffolding rule strings. The intent is to enforce\n * \"short directive\" by contract — long paragraphs fail validation and force\n * authors to split prose into discrete actionable items.\n */\nconst SCAFFOLDING_RULE_MAX_LENGTH = 120;\n\nconst scaffoldingRuleItemSchema = z\n .string()\n .max(\n SCAFFOLDING_RULE_MAX_LENGTH,\n `rule item must be ≤ ${SCAFFOLDING_RULE_MAX_LENGTH} chars`,\n );\n\nexport const scaffoldingRulesSchema = z\n .object({\n never: z\n .array(scaffoldingRuleItemSchema)\n .optional()\n .describe(\"Actions the scaffolding agent must never perform.\"),\n must: z\n .array(scaffoldingRuleItemSchema)\n .optional()\n .describe(\"Actions the scaffolding agent must always perform.\"),\n should: z\n .array(scaffoldingRuleItemSchema)\n .optional()\n .describe(\n \"Recommended actions for the scaffolding agent (parity with plugin-level rules).\",\n ),\n })\n .strict()\n .describe(\"Structured rules for scaffolding agents.\");\n\nexport const scaffoldingDescriptorSchema = z\n .object({\n command: z\n .string()\n .describe(\"The scaffolding command (e.g., 'databricks apps init').\"),\n flags: z\n .record(z.string(), scaffoldingFlagSchema)\n .optional()\n .describe(\"Map of flag name to flag descriptor.\"),\n rules: scaffoldingRulesSchema\n .optional()\n .describe(\"Structured rules for scaffolding agents.\"),\n })\n .strict()\n .describe(\n \"Describes the scaffolding command, flags, and rules for project initialization.\",\n );\n\n/**\n * Canonical scaffolding descriptor for the `databricks apps init` command,\n * embedded in v2.0 template manifests to guide scaffolding agents.\n *\n * Co-located with `scaffoldingDescriptorSchema` so any change to the rule set\n * (or the schema's `maxLength` ceiling) shows up next to its consumer. The\n * `satisfies` annotation gives compile-time validation that the literal\n * matches the schema's input shape; if a `must`/`never` entry exceeds the\n * `maxLength` ceiling at runtime, `scaffoldingDescriptorSchema.parse` would\n * surface the breach in tests.\n */\nexport const TEMPLATE_SCAFFOLDING = {\n command: \"databricks apps init\",\n flags: {\n \"--name\": {\n description:\n \"Project name — sets {{.projectName}} in package.json, databricks.yml, and .env. Required for non-interactive scaffolding.\",\n required: true,\n pattern: \"^[a-z][a-z0-9-]*$\",\n },\n \"--template\": {\n description: \"Template path (local directory or GitHub URL)\",\n required: false,\n },\n \"--version\": {\n description: \"AppKit version to use; defaults to auto-detected\",\n required: false,\n },\n \"--features\": {\n description:\n \"Plugins to enable (comma-separated, no spaces; must match keys in this manifest's plugins map)\",\n required: false,\n pattern: \"^[a-zA-Z0-9_-]+(,[a-zA-Z0-9_-]+)*$\",\n },\n \"--set\": {\n description:\n \"Set resource values (format: plugin.resourceKey.field=value, repeatable)\",\n required: false,\n },\n \"--output-dir\": {\n description: \"Directory to write the project to\",\n required: false,\n },\n \"--description\": {\n description: \"App description\",\n required: false,\n },\n \"--run\": {\n description: \"Run the app after creation (none, dev, dev-remote)\",\n required: false,\n },\n \"--auto-approve\": {\n description:\n \"Pass as a bare flag (no value) to skip prompts for optional resources. Not recommended for agent-driven init — conflicts with the 'ask user when in doubt' rule.\",\n required: false,\n },\n \"--profile\": {\n description:\n \"Databricks CLI profile to use for authentication (global flag)\",\n required: false,\n },\n },\n rules: {\n must: [\n \"Treat `databricks apps init` output as starter code, not requirements; adapt or replace it to match the requested app\",\n \"Keep all secrets and credentials only in app.yaml, databricks.yml, and/or .env\",\n ],\n should: [\"ask user when in doubt of resource to use for plugin\"],\n never: [\n \"guess resources when multiple or no options are available\",\n \"embed secrets in files that will go to the client-bundle\",\n ],\n },\n} satisfies z.infer<typeof scaffoldingDescriptorSchema>;\n\n// ── Template plugins manifest (root) ─────────────────────────────────────\n\nexport const templatePluginsManifestSchema = z\n .object({\n $schema: z\n .string()\n .optional()\n .describe(\"Reference to the JSON Schema for validation\"),\n version: z\n .enum([\"1.0\", \"1.1\", \"2.0\"])\n .describe(\"Schema version for the template plugins manifest\"),\n plugins: z\n .record(z.string(), templatePluginSchema)\n .describe(\"Map of plugin name to plugin manifest with package source\"),\n scaffolding: scaffoldingDescriptorSchema\n .optional()\n .describe(\n \"Describes the scaffolding command and its configuration for project initialization.\",\n ),\n })\n .strict()\n .superRefine((value, ctx) => {\n if (value.version === \"2.0\" && !value.scaffolding) {\n ctx.addIssue({\n code: \"custom\",\n path: [\"scaffolding\"],\n message: \"scaffolding is required when version is '2.0'\",\n });\n }\n })\n .describe(\n \"Aggregated plugin manifest for AppKit templates. Read by Databricks CLI during init to discover available plugins and their resource requirements.\",\n );\n\n// ── Inferred types ───────────────────────────────────────────────────────\n\nexport type ResourceType = z.infer<typeof resourceTypeSchema>;\nexport type SecretPermission = z.infer<typeof secretPermissionSchema>;\nexport type JobPermission = z.infer<typeof jobPermissionSchema>;\nexport type SqlWarehousePermission = z.infer<\n typeof sqlWarehousePermissionSchema\n>;\nexport type ServingEndpointPermission = z.infer<\n typeof servingEndpointPermissionSchema\n>;\nexport type VolumePermission = z.infer<typeof volumePermissionSchema>;\nexport type VectorSearchIndexPermission = z.infer<\n typeof vectorSearchIndexPermissionSchema\n>;\nexport type UcFunctionPermission = z.infer<typeof ucFunctionPermissionSchema>;\nexport type UcConnectionPermission = z.infer<\n typeof ucConnectionPermissionSchema\n>;\nexport type DatabasePermission = z.infer<typeof databasePermissionSchema>;\nexport type PostgresPermission = z.infer<typeof postgresPermissionSchema>;\nexport type GenieSpacePermission = z.infer<typeof genieSpacePermissionSchema>;\nexport type ExperimentPermission = z.infer<typeof experimentPermissionSchema>;\nexport type AppPermission = z.infer<typeof appPermissionSchema>;\nexport type ResourceKind = z.infer<typeof resourceKindSchema>;\nexport type KindDiscoveryDescriptor = z.infer<\n typeof kindDiscoveryDescriptorSchema\n>;\nexport type CliDiscoveryDescriptor = z.infer<\n typeof cliDiscoveryDescriptorSchema\n>;\nexport type DiscoveryDescriptor = z.infer<typeof discoveryDescriptorSchema>;\nexport type ResourceFieldEntry = z.infer<typeof resourceFieldEntrySchema>;\nexport type ResourceRequirement = z.infer<typeof resourceRequirementSchema>;\nexport type ConfigSchemaProperty = z.infer<typeof configSchemaPropertySchema>;\nexport type ConfigSchema = z.infer<typeof configSchemaSchema>;\nexport type PluginScaffoldingRules = z.infer<\n typeof pluginScaffoldingRulesSchema\n>;\nexport type PluginManifest = z.infer<typeof pluginManifestSchema>;\nexport type Origin = z.infer<typeof originSchema>;\n// Template-side types use `z.input` so callers can construct a TemplatePlugin\n// from a parsed PluginManifest before the field-level origin transform runs.\n// `writeManifest` parses every field through `templateFieldEntrySchema` at\n// write-time, so the on-disk shape always has origin populated. The runtime\n// invariant: origin is *always* present after sync writes; the type slot\n// stays optional so the in-memory pipeline does not need to fabricate origin\n// before assignment.\nexport type TemplateFieldEntry = z.input<typeof templateFieldEntrySchema>;\nexport type TemplateResourceRequirement = z.input<\n typeof templateResourceRequirementSchema\n>;\nexport type TemplatePlugin = z.input<typeof templatePluginSchema>;\nexport type ScaffoldingFlag = z.infer<typeof scaffoldingFlagSchema>;\nexport type ScaffoldingRules = z.infer<typeof scaffoldingRulesSchema>;\nexport type ScaffoldingDescriptor = z.infer<typeof scaffoldingDescriptorSchema>;\nexport type TemplatePluginsManifest = z.input<\n typeof templatePluginsManifestSchema\n>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,MAAa,qBAAqB,EAC/B,KAAK;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,CAAC,CACD,SAAS,8BAA8B;AAE1C,MAAa,yBAAyB,EACnC,KAAK;CAAC;CAAQ;CAAS;CAAS,CAAC,CACjC,SAAS,gEAAgE;AAE5E,MAAa,sBAAsB,EAChC,KAAK;CAAC;CAAY;CAAkB;CAAa,CAAC,CAClD,SAAS,6DAA6D;AAEzE,MAAa,+BAA+B,EACzC,KAAK,CAAC,WAAW,aAAa,CAAC,CAC/B,SACC,uEACD;AAEH,MAAa,kCAAkC,EAC5C,KAAK;CAAC;CAAY;CAAa;CAAa,CAAC,CAC7C,SACC,0EACD;AAEH,MAAa,yBAAyB,EACnC,KAAK,CAAC,eAAe,eAAe,CAAC,CACrC,SAAS,gDAAgD;AAE5D,MAAa,oCAAoC,EAC9C,KAAK,CAAC,SAAS,CAAC,CAChB,SAAS,+CAA+C;AAE3D,MAAa,6BAA6B,EACvC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAggBrB,kBAAA,GAAqB,CAAA,CAAE,KAAA,QAAa,wBAAA;AAAA,KAOpC,cAAA,GAAiB,CAAA,CAAE,KAAA,QAAa,oBAAA"}
|
package/package.json
CHANGED
package/sbom.cdx.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"bomFormat":"CycloneDX","specVersion":"1.6","serialNumber":"urn:uuid:562c11e2-000d-42c5-b2d4-1fa1b01101ad","version":1,"metadata":{"timestamp":"2026-06-05T19:10:18Z","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.40.0","purl":"pkg:npm/%40databricks/appkit@0.40.0","bom-ref":"pkg:npm/@databricks/appkit@0.40.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#14"},{"location":"dist/context/service-context.js#7"},{"location":"dist/plugins/files/plugin.js#22"},{"location":"dist/type-generator/query-registry.js#7"},{"location":"dist/type-generator/serving/fetcher.js#2"},{"location":"dist/type-generator/serving/generator.js#7"},{"location":"dist/type-generator/vite-plugin.js#4"},{"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#14"},{"location":"tmp/dist/context/service-context.js#7"},{"location":"tmp/dist/plugins/files/plugin.js#22"},{"location":"tmp/dist/type-generator/query-registry.js#7"},{"location":"tmp/dist/type-generator/serving/fetcher.js#2"},{"location":"tmp/dist/type-generator/serving/generator.js#7"},{"location":"tmp/dist/type-generator/vite-plugin.js#4"},{"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/sql-warehouse/warehouse-status-emitter.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/type-generator/vite-plugin.ts#3"},{"location":"src/type-generator/warehouse-status.ts#1"},{"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#8"},{"location":"tmp/dist/cli/index.js#8"},{"location":"tmp/dist/plugins/server/index.js#19"},{"location":"tmp/dist/type-generator/index.js#8"},{"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/index.js#5"},{"location":"dist/type-generator/migration.js#2"},{"location":"dist/type-generator/query-registry.js#8"},{"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/index.js#5"},{"location":"tmp/dist/type-generator/migration.js#2"},{"location":"tmp/dist/type-generator/query-registry.js#8"},{"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/index.ts#4"},{"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#18"},{"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#18"},{"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.40.0","aggregate":"incomplete"}],"annotations":[{"bom-ref":"metadata-annotations","subjects":["pkg:npm/@databricks/appkit@0.40.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-06-05T19:10:18Z","text":"This Software Bill-of-Materials (SBOM) document was created on Friday, June 5, 2026 with cdxgen. The data was captured during the build lifecycle phase. The document describes an application named 'appkit' with version '0.40.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:78f461c4-2d7c-4b0a-a91d-f9ecf1cddb9f","version":1,"metadata":{"timestamp":"2026-06-09T12:22:52Z","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.41.1","purl":"pkg:npm/%40databricks/appkit@0.41.1","bom-ref":"pkg:npm/@databricks/appkit@0.41.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#14"},{"location":"dist/context/service-context.js#7"},{"location":"dist/plugins/files/plugin.js#22"},{"location":"dist/type-generator/query-registry.js#7"},{"location":"dist/type-generator/serving/fetcher.js#2"},{"location":"dist/type-generator/serving/generator.js#7"},{"location":"dist/type-generator/vite-plugin.js#4"},{"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#14"},{"location":"tmp/dist/context/service-context.js#7"},{"location":"tmp/dist/plugins/files/plugin.js#22"},{"location":"tmp/dist/type-generator/query-registry.js#7"},{"location":"tmp/dist/type-generator/serving/fetcher.js#2"},{"location":"tmp/dist/type-generator/serving/generator.js#7"},{"location":"tmp/dist/type-generator/vite-plugin.js#4"},{"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/sql-warehouse/warehouse-status-emitter.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/type-generator/vite-plugin.ts#3"},{"location":"src/type-generator/warehouse-status.ts#1"},{"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#8"},{"location":"tmp/dist/cli/index.js#8"},{"location":"tmp/dist/plugins/server/index.js#19"},{"location":"tmp/dist/type-generator/index.js#8"},{"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/index.js#5"},{"location":"dist/type-generator/migration.js#2"},{"location":"dist/type-generator/query-registry.js#8"},{"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/index.js#5"},{"location":"tmp/dist/type-generator/migration.js#2"},{"location":"tmp/dist/type-generator/query-registry.js#8"},{"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/index.ts#4"},{"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#18"},{"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#18"},{"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.41.1","aggregate":"incomplete"}],"annotations":[{"bom-ref":"metadata-annotations","subjects":["pkg:npm/@databricks/appkit@0.41.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-06-09T12:22:52Z","text":"This Software Bill-of-Materials (SBOM) document was created on Tuesday, June 9, 2026 with cdxgen. The data was captured during the build lifecycle phase. The document describes an application named 'appkit' with version '0.41.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."}]}
|