@databricks/appkit 0.31.0 → 0.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. package/CLAUDE.md +1 -0
  2. package/NOTICE.md +1 -0
  3. package/dist/appkit/package.js +1 -1
  4. package/dist/beta.d.ts +14 -1
  5. package/dist/beta.js +12 -1
  6. package/dist/connectors/index.js +3 -0
  7. package/dist/connectors/mcp/client.d.ts +60 -0
  8. package/dist/connectors/mcp/client.d.ts.map +1 -0
  9. package/dist/connectors/mcp/client.js +197 -0
  10. package/dist/connectors/mcp/client.js.map +1 -0
  11. package/dist/connectors/mcp/host-policy.d.ts +51 -0
  12. package/dist/connectors/mcp/host-policy.d.ts.map +1 -0
  13. package/dist/connectors/mcp/host-policy.js +168 -0
  14. package/dist/connectors/mcp/host-policy.js.map +1 -0
  15. package/dist/connectors/mcp/index.d.ts +3 -0
  16. package/dist/connectors/mcp/index.js +4 -0
  17. package/dist/connectors/mcp/types.d.ts +16 -0
  18. package/dist/connectors/mcp/types.d.ts.map +1 -0
  19. package/dist/context/index.js +1 -1
  20. package/dist/core/agent/build-toolkit.d.ts +2 -0
  21. package/dist/core/agent/build-toolkit.js +50 -0
  22. package/dist/core/agent/build-toolkit.js.map +1 -0
  23. package/dist/core/agent/consume-adapter-stream.js +33 -0
  24. package/dist/core/agent/consume-adapter-stream.js.map +1 -0
  25. package/dist/core/agent/create-agent.d.ts +27 -0
  26. package/dist/core/agent/create-agent.d.ts.map +1 -0
  27. package/dist/core/agent/create-agent.js +50 -0
  28. package/dist/core/agent/create-agent.js.map +1 -0
  29. package/dist/core/agent/load-agents.d.ts +67 -0
  30. package/dist/core/agent/load-agents.d.ts.map +1 -0
  31. package/dist/core/agent/load-agents.js +228 -0
  32. package/dist/core/agent/load-agents.js.map +1 -0
  33. package/dist/core/agent/normalize-result.js +39 -0
  34. package/dist/core/agent/normalize-result.js.map +1 -0
  35. package/dist/core/agent/run-agent.d.ts +34 -0
  36. package/dist/core/agent/run-agent.d.ts.map +1 -0
  37. package/dist/core/agent/run-agent.js +146 -0
  38. package/dist/core/agent/run-agent.js.map +1 -0
  39. package/dist/core/agent/system-prompt.js +38 -0
  40. package/dist/core/agent/system-prompt.js.map +1 -0
  41. package/dist/core/agent/tools/define-tool.d.ts +54 -0
  42. package/dist/core/agent/tools/define-tool.d.ts.map +1 -0
  43. package/dist/core/agent/tools/define-tool.js +50 -0
  44. package/dist/core/agent/tools/define-tool.js.map +1 -0
  45. package/dist/core/agent/tools/function-tool.d.ts +27 -0
  46. package/dist/core/agent/tools/function-tool.d.ts.map +1 -0
  47. package/dist/core/agent/tools/function-tool.js +21 -0
  48. package/dist/core/agent/tools/function-tool.js.map +1 -0
  49. package/dist/core/agent/tools/hosted-tools.d.ts +47 -0
  50. package/dist/core/agent/tools/hosted-tools.d.ts.map +1 -0
  51. package/dist/core/agent/tools/hosted-tools.js +67 -0
  52. package/dist/core/agent/tools/hosted-tools.js.map +1 -0
  53. package/dist/core/agent/tools/index.d.ts +5 -0
  54. package/dist/core/agent/tools/index.js +7 -0
  55. package/dist/core/agent/tools/json-schema.js +24 -0
  56. package/dist/core/agent/tools/json-schema.js.map +1 -0
  57. package/dist/core/agent/tools/sql-policy.js +256 -0
  58. package/dist/core/agent/tools/sql-policy.js.map +1 -0
  59. package/dist/core/agent/tools/tool.d.ts +34 -0
  60. package/dist/core/agent/tools/tool.d.ts.map +1 -0
  61. package/dist/core/agent/tools/tool.js +41 -0
  62. package/dist/core/agent/tools/tool.js.map +1 -0
  63. package/dist/core/agent/types.d.ts +214 -0
  64. package/dist/core/agent/types.d.ts.map +1 -0
  65. package/dist/core/agent/types.js +12 -0
  66. package/dist/core/agent/types.js.map +1 -0
  67. package/dist/core/appkit.d.ts +1 -0
  68. package/dist/core/appkit.d.ts.map +1 -1
  69. package/dist/core/appkit.js +31 -4
  70. package/dist/core/appkit.js.map +1 -1
  71. package/dist/core/plugin-context.d.ts +133 -0
  72. package/dist/core/plugin-context.d.ts.map +1 -0
  73. package/dist/core/plugin-context.js +220 -0
  74. package/dist/core/plugin-context.js.map +1 -0
  75. package/dist/index.d.ts +11 -11
  76. package/dist/internal-telemetry/appkit-log.js +19 -0
  77. package/dist/internal-telemetry/appkit-log.js.map +1 -0
  78. package/dist/internal-telemetry/config.js +15 -0
  79. package/dist/internal-telemetry/config.js.map +1 -0
  80. package/dist/internal-telemetry/index.js +4 -0
  81. package/dist/internal-telemetry/reporter.js +132 -0
  82. package/dist/internal-telemetry/reporter.js.map +1 -0
  83. package/dist/plugin/index.d.ts +1 -1
  84. package/dist/plugin/plugin.d.ts +18 -3
  85. package/dist/plugin/plugin.d.ts.map +1 -1
  86. package/dist/plugin/plugin.js +26 -2
  87. package/dist/plugin/plugin.js.map +1 -1
  88. package/dist/plugin/to-plugin.d.ts +15 -4
  89. package/dist/plugin/to-plugin.d.ts.map +1 -1
  90. package/dist/plugin/to-plugin.js +14 -4
  91. package/dist/plugin/to-plugin.js.map +1 -1
  92. package/dist/plugins/agents/agents.d.ts +4 -0
  93. package/dist/plugins/agents/agents.js +882 -0
  94. package/dist/plugins/agents/agents.js.map +1 -0
  95. package/dist/plugins/agents/defaults.js +13 -0
  96. package/dist/plugins/agents/defaults.js.map +1 -0
  97. package/dist/plugins/agents/event-channel.js +64 -0
  98. package/dist/plugins/agents/event-channel.js.map +1 -0
  99. package/dist/plugins/agents/event-translator.js +224 -0
  100. package/dist/plugins/agents/event-translator.js.map +1 -0
  101. package/dist/plugins/agents/index.d.ts +4 -0
  102. package/dist/plugins/agents/index.js +6 -0
  103. package/dist/plugins/agents/manifest.js +27 -0
  104. package/dist/plugins/agents/manifest.js.map +1 -0
  105. package/dist/plugins/agents/schemas.js +51 -0
  106. package/dist/plugins/agents/schemas.js.map +1 -0
  107. package/dist/plugins/agents/thread-store.js +58 -0
  108. package/dist/plugins/agents/thread-store.js.map +1 -0
  109. package/dist/plugins/agents/tool-approval-gate.js +75 -0
  110. package/dist/plugins/agents/tool-approval-gate.js.map +1 -0
  111. package/dist/plugins/analytics/analytics.d.ts +17 -2
  112. package/dist/plugins/analytics/analytics.d.ts.map +1 -1
  113. package/dist/plugins/analytics/analytics.js +33 -0
  114. package/dist/plugins/analytics/analytics.js.map +1 -1
  115. package/dist/plugins/files/plugin.d.ts +22 -3
  116. package/dist/plugins/files/plugin.d.ts.map +1 -1
  117. package/dist/plugins/files/plugin.js +102 -2
  118. package/dist/plugins/files/plugin.js.map +1 -1
  119. package/dist/plugins/genie/genie.d.ts +15 -2
  120. package/dist/plugins/genie/genie.d.ts.map +1 -1
  121. package/dist/plugins/genie/genie.js +45 -0
  122. package/dist/plugins/genie/genie.js.map +1 -1
  123. package/dist/plugins/jobs/plugin.d.ts +2 -1
  124. package/dist/plugins/jobs/plugin.d.ts.map +1 -1
  125. package/dist/plugins/jobs/plugin.js +1 -1
  126. package/dist/plugins/lakebase/index.d.ts +2 -2
  127. package/dist/plugins/lakebase/index.js +1 -1
  128. package/dist/plugins/lakebase/lakebase.d.ts +33 -4
  129. package/dist/plugins/lakebase/lakebase.d.ts.map +1 -1
  130. package/dist/plugins/lakebase/lakebase.js +77 -5
  131. package/dist/plugins/lakebase/lakebase.js.map +1 -1
  132. package/dist/plugins/lakebase/types.d.ts +38 -1
  133. package/dist/plugins/lakebase/types.d.ts.map +1 -1
  134. package/dist/plugins/server/index.d.ts +12 -1
  135. package/dist/plugins/server/index.d.ts.map +1 -1
  136. package/dist/plugins/server/index.js +39 -5
  137. package/dist/plugins/server/index.js.map +1 -1
  138. package/dist/plugins/server/types.d.ts +0 -3
  139. package/dist/plugins/server/types.d.ts.map +1 -1
  140. package/dist/plugins/serving/serving.d.ts +2 -1
  141. package/dist/plugins/serving/serving.d.ts.map +1 -1
  142. package/dist/shared/src/agent.d.ts +63 -1
  143. package/dist/shared/src/agent.d.ts.map +1 -1
  144. package/dist/shared/src/index.d.ts +1 -1
  145. package/dist/shared/src/plugin.d.ts +8 -0
  146. package/dist/shared/src/plugin.d.ts.map +1 -1
  147. package/docs/api/appkit/Class.Plugin.md +65 -23
  148. package/docs/api/appkit/Function.createApp.md +10 -8
  149. package/docs/privacy.md +41 -0
  150. package/llms.txt +1 -0
  151. package/package.json +4 -2
  152. package/sbom.cdx.json +1 -1
@@ -13,6 +13,14 @@ interface BasePlugin {
13
13
  getSkipBodyParsingPaths?(): ReadonlySet<string>;
14
14
  exports?(): unknown;
15
15
  clientConfig?(): Record<string, unknown>;
16
+ /**
17
+ * Binds runtime dependencies (telemetry, cache, plugin context) after the
18
+ * plugin has been constructed. Called by the AppKit core before `setup()`.
19
+ */
20
+ attachContext?(deps: {
21
+ context?: unknown;
22
+ telemetryConfig?: TelemetryOptions;
23
+ }): void;
16
24
  }
17
25
  /** Base configuration interface for AppKit plugins */
18
26
  interface BasePluginConfig {
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","names":[],"sources":["../../../../shared/src/plugin.ts"],"mappings":";;;;;;UAYiB,UAAA;EACf,IAAA;EAEA,qBAAA;EAEA,KAAA,IAAS,OAAA;EAET,YAAA,CAAa,MAAA,EAAQ,OAAA,CAAQ,MAAA;EAE7B,YAAA,IAAgB,iBAAA;EAEhB,uBAAA,KAA4B,WAAA;EAE5B,OAAA;EAEA,YAAA,KAAiB,MAAA;AAAA;;UAIF,gBAAA;EACf,IAAA;EACA,IAAA;EAAA,CAEC,GAAA;EAMD,SAAA,GAAY,gBAAA;AAAA;AAAA,KAGF,gBAAA;EAGN,MAAA;EACA,OAAA;EACA,IAAA;AAAA;AAAA,KAQM,WAAA;AA1BZ;;;;AAAA,KAgCY,iBAAA,KACN,gBAAA,YACM,UAAA,GAAa,UAAA,UAEvB,MAAA,EAAQ,CAAA,KACL,CAAA;EACH,cAAA,GAAiB,MAAA;EACjB,KAAA,GAAQ,WAAA;EA7BR;;;;EAkCA,QAAA,EAAU,cAAA;EA/BgB;;;;EAoC1B,uBAAA,EAAyB,MAAA,EAAQ,CAAA,GAAI,mBAAA;AAAA;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A,GAAS,GAAA,EAAK,WAAA,KAAgB,GAAA;AAAA;;AAxDpC;;;;;;;KAmEY,SAAA,oBACS,UAAA,CAAW,iBAAA,gCAExB,CAAA,YAAa,CAAA,WAAY,UAAA,CAC7B,aAAA,CAAc,YAAA,CAAa,CAAA;;KAKnB,UAAA;EAAwB,MAAA,EAAQ,CAAA;EAAG,MAAA,EAAQ,CAAA;EAAG,IAAA,EAAM,CAAA;AAAA;;KAEpD,QAAA,4BACV,MAAA,GAAS,CAAA,KACN,UAAA,CAAW,CAAA,EAAG,CAAA,EAAG,CAAA;;KAGV,UAAA,GAAa,OAAA,CAAQ,MAAA;AAAA,KACrB,YAAA,GAAe,OAAA,CAAQ,QAAA;AAAA,KACvB,WAAA,GAAc,OAAA,CAAQ,OAAA;AAAA,KAEtB,UAAA;AAAA,KAEA,WAAA;EAnDwB,+DAqDlC,IAAA;EACA,MAAA,EAAQ,UAAA;EACR,IAAA;EACA,OAAA,GAAU,GAAA,EAAK,WAAA,EAAa,GAAA,EAAK,YAAA,KAAiB,OAAA,QAvDH;EAyD/C,eAAA;AAAA;;KAIU,iBAAA,GAAoB,MAAA"}
@@ -139,6 +139,15 @@ protected config: TConfig;
139
139
 
140
140
  ***
141
141
 
142
+ ### context?[​](#context "Direct link to context?")
143
+
144
+ ```ts
145
+ protected optional context: PluginContext;
146
+
147
+ ```
148
+
149
+ ***
150
+
142
151
  ### devFileReader[​](#devfilereader "Direct link to devFileReader")
143
152
 
144
153
  ```ts
@@ -255,6 +264,39 @@ AuthenticationError if user token is not available in request headers (productio
255
264
 
256
265
  ***
257
266
 
267
+ ### attachContext()[​](#attachcontext "Direct link to attachContext()")
268
+
269
+ ```ts
270
+ attachContext(deps: {
271
+ context?: unknown;
272
+ telemetryConfig?: TelemetryOptions;
273
+ }): void;
274
+
275
+ ```
276
+
277
+ Binds runtime dependencies (telemetry provider, cache, plugin context) to this plugin. Called by `AppKit._createApp` after construction and before `setup()`. Idempotent: safe to call if the constructor already bound them eagerly. Kept separate so factories can eagerly construct plugin instances without running this before `TelemetryManager.initialize()` / `CacheManager.getInstance()` have run.
278
+
279
+ #### Parameters[​](#parameters-2 "Direct link to Parameters")
280
+
281
+ | Parameter | Type |
282
+ | ----------------------- | ------------------------------------------------------------------ |
283
+ | `deps` | { `context?`: `unknown`; `telemetryConfig?`: `TelemetryOptions`; } |
284
+ | `deps.context?` | `unknown` |
285
+ | `deps.telemetryConfig?` | `TelemetryOptions` |
286
+
287
+ #### Returns[​](#returns-3 "Direct link to Returns")
288
+
289
+ `void`
290
+
291
+ #### Implementation of[​](#implementation-of-2 "Direct link to Implementation of")
292
+
293
+ ```ts
294
+ BasePlugin.attachContext
295
+
296
+ ```
297
+
298
+ ***
299
+
258
300
  ### clientConfig()[​](#clientconfig "Direct link to clientConfig()")
259
301
 
260
302
  ```ts
@@ -272,7 +314,7 @@ Values must be JSON-serializable plain data (no functions, Dates, classes, Maps,
272
314
 
273
315
  On the client, read the config with the `usePluginClientConfig` hook (React) or the `getPluginClientConfig` function (vanilla JS), both from `@databricks/appkit-ui`.
274
316
 
275
- #### Returns[​](#returns-3 "Direct link to Returns")
317
+ #### Returns[​](#returns-4 "Direct link to Returns")
276
318
 
277
319
  `Record`<`string`, `unknown`>
278
320
 
@@ -304,7 +346,7 @@ const config = getPluginClientConfig<MyPluginConfig>("myPlugin");
304
346
 
305
347
  ```
306
348
 
307
- #### Implementation of[​](#implementation-of-2 "Direct link to Implementation of")
349
+ #### Implementation of[​](#implementation-of-3 "Direct link to Implementation of")
308
350
 
309
351
  ```ts
310
352
  BasePlugin.clientConfig
@@ -338,7 +380,7 @@ Errors are never thrown — the method is production-safe.
338
380
  | -------------- |
339
381
  | `T` |
340
382
 
341
- #### Parameters[​](#parameters-2 "Direct link to Parameters")
383
+ #### Parameters[​](#parameters-3 "Direct link to Parameters")
342
384
 
343
385
  | Parameter | Type |
344
386
  | ---------- | -------------------------------------------- |
@@ -346,7 +388,7 @@ Errors are never thrown — the method is production-safe.
346
388
  | `options` | `PluginExecutionSettings` |
347
389
  | `userKey?` | `string` |
348
390
 
349
- #### Returns[​](#returns-4 "Direct link to Returns")
391
+ #### Returns[​](#returns-5 "Direct link to Returns")
350
392
 
351
393
  `Promise`<[`ExecutionResult`](./docs/api/appkit/TypeAlias.ExecutionResult.md)<`T`>>
352
394
 
@@ -369,7 +411,7 @@ userKey?: string): Promise<void>;
369
411
  | -------------- |
370
412
  | `T` |
371
413
 
372
- #### Parameters[​](#parameters-3 "Direct link to Parameters")
414
+ #### Parameters[​](#parameters-4 "Direct link to Parameters")
373
415
 
374
416
  | Parameter | Type |
375
417
  | ---------- | ----------------------------------------------------------------------------------------- |
@@ -378,7 +420,7 @@ userKey?: string): Promise<void>;
378
420
  | `options` | [`StreamExecutionSettings`](./docs/api/appkit/Interface.StreamExecutionSettings.md) |
379
421
  | `userKey?` | `string` |
380
422
 
381
- #### Returns[​](#returns-5 "Direct link to Returns")
423
+ #### Returns[​](#returns-6 "Direct link to Returns")
382
424
 
383
425
  `Promise`<`void`>
384
426
 
@@ -395,7 +437,7 @@ Returns the public exports for this plugin. Override this to define a custom pub
395
437
 
396
438
  The returned object becomes the plugin's public API on the AppKit instance (e.g. `appkit.myPlugin.method()`). AppKit automatically binds method context and adds `asUser(req)` for user-scoped execution.
397
439
 
398
- #### Returns[​](#returns-6 "Direct link to Returns")
440
+ #### Returns[​](#returns-7 "Direct link to Returns")
399
441
 
400
442
  `unknown`
401
443
 
@@ -416,7 +458,7 @@ appkit.myPlugin.getData();
416
458
 
417
459
  ```
418
460
 
419
- #### Implementation of[​](#implementation-of-3 "Direct link to Implementation of")
461
+ #### Implementation of[​](#implementation-of-4 "Direct link to Implementation of")
420
462
 
421
463
  ```ts
422
464
  BasePlugin.exports
@@ -432,11 +474,11 @@ getEndpoints(): PluginEndpointMap;
432
474
 
433
475
  ```
434
476
 
435
- #### Returns[​](#returns-7 "Direct link to Returns")
477
+ #### Returns[​](#returns-8 "Direct link to Returns")
436
478
 
437
479
  `PluginEndpointMap`
438
480
 
439
- #### Implementation of[​](#implementation-of-4 "Direct link to Implementation of")
481
+ #### Implementation of[​](#implementation-of-5 "Direct link to Implementation of")
440
482
 
441
483
  ```ts
442
484
  BasePlugin.getEndpoints
@@ -452,11 +494,11 @@ getSkipBodyParsingPaths(): ReadonlySet<string>;
452
494
 
453
495
  ```
454
496
 
455
- #### Returns[​](#returns-8 "Direct link to Returns")
497
+ #### Returns[​](#returns-9 "Direct link to Returns")
456
498
 
457
499
  `ReadonlySet`<`string`>
458
500
 
459
- #### Implementation of[​](#implementation-of-5 "Direct link to Implementation of")
501
+ #### Implementation of[​](#implementation-of-6 "Direct link to Implementation of")
460
502
 
461
503
  ```ts
462
504
  BasePlugin.getSkipBodyParsingPaths
@@ -472,17 +514,17 @@ injectRoutes(_: Router): void;
472
514
 
473
515
  ```
474
516
 
475
- #### Parameters[​](#parameters-4 "Direct link to Parameters")
517
+ #### Parameters[​](#parameters-5 "Direct link to Parameters")
476
518
 
477
519
  | Parameter | Type |
478
520
  | --------- | -------- |
479
521
  | `_` | `Router` |
480
522
 
481
- #### Returns[​](#returns-9 "Direct link to Returns")
523
+ #### Returns[​](#returns-10 "Direct link to Returns")
482
524
 
483
525
  `void`
484
526
 
485
- #### Implementation of[​](#implementation-of-6 "Direct link to Implementation of")
527
+ #### Implementation of[​](#implementation-of-7 "Direct link to Implementation of")
486
528
 
487
529
  ```ts
488
530
  BasePlugin.injectRoutes
@@ -498,14 +540,14 @@ protected registerEndpoint(name: string, path: string): void;
498
540
 
499
541
  ```
500
542
 
501
- #### Parameters[​](#parameters-5 "Direct link to Parameters")
543
+ #### Parameters[​](#parameters-6 "Direct link to Parameters")
502
544
 
503
545
  | Parameter | Type |
504
546
  | --------- | -------- |
505
547
  | `name` | `string` |
506
548
  | `path` | `string` |
507
549
 
508
- #### Returns[​](#returns-10 "Direct link to Returns")
550
+ #### Returns[​](#returns-11 "Direct link to Returns")
509
551
 
510
552
  `void`
511
553
 
@@ -522,13 +564,13 @@ Resolve the effective user ID from a request.
522
564
 
523
565
  Returns the `x-forwarded-user` header when present. In development mode (`NODE_ENV=development`) falls back to the current context user ID so that callers outside an active `runInUserContext` scope still get a consistent value.
524
566
 
525
- #### Parameters[​](#parameters-6 "Direct link to Parameters")
567
+ #### Parameters[​](#parameters-7 "Direct link to Parameters")
526
568
 
527
569
  | Parameter | Type |
528
570
  | --------- | --------- |
529
571
  | `req` | `Request` |
530
572
 
531
- #### Returns[​](#returns-11 "Direct link to Returns")
573
+ #### Returns[​](#returns-12 "Direct link to Returns")
532
574
 
533
575
  `string`
534
576
 
@@ -551,14 +593,14 @@ protected route<_TResponse>(router: Router, config: RouteConfig): void;
551
593
  | -------------- |
552
594
  | `_TResponse` |
553
595
 
554
- #### Parameters[​](#parameters-7 "Direct link to Parameters")
596
+ #### Parameters[​](#parameters-8 "Direct link to Parameters")
555
597
 
556
598
  | Parameter | Type |
557
599
  | --------- | ------------- |
558
600
  | `router` | `Router` |
559
601
  | `config` | `RouteConfig` |
560
602
 
561
- #### Returns[​](#returns-12 "Direct link to Returns")
603
+ #### Returns[​](#returns-13 "Direct link to Returns")
562
604
 
563
605
  `void`
564
606
 
@@ -571,11 +613,11 @@ setup(): Promise<void>;
571
613
 
572
614
  ```
573
615
 
574
- #### Returns[​](#returns-13 "Direct link to Returns")
616
+ #### Returns[​](#returns-14 "Direct link to Returns")
575
617
 
576
618
  `Promise`<`void`>
577
619
 
578
- #### Implementation of[​](#implementation-of-7 "Direct link to Implementation of")
620
+ #### Implementation of[​](#implementation-of-8 "Direct link to Implementation of")
579
621
 
580
622
  ```ts
581
623
  BasePlugin.setup
@@ -4,6 +4,7 @@
4
4
  function createApp<T>(config: {
5
5
  cache?: CacheConfig;
6
6
  client?: WorkspaceClient;
7
+ disableInternalTelemetry?: boolean;
7
8
  onPluginsReady?: (appkit: PluginMap<T>) => void | Promise<void>;
8
9
  plugins?: T;
9
10
  telemetry?: TelemetryConfig;
@@ -23,14 +24,15 @@ Initializes telemetry, cache, and service context, then registers plugins in pha
23
24
 
24
25
  ## Parameters[​](#parameters "Direct link to Parameters")
25
26
 
26
- | Parameter | Type |
27
- | ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
28
- | `config` | { `cache?`: [`CacheConfig`](./docs/api/appkit/Interface.CacheConfig.md); `client?`: `WorkspaceClient`; `onPluginsReady?`: (`appkit`: `PluginMap`<`T`>) => `void` \| `Promise`<`void`>; `plugins?`: `T`; `telemetry?`: [`TelemetryConfig`](./docs/api/appkit/Interface.TelemetryConfig.md); } |
29
- | `config.cache?` | [`CacheConfig`](./docs/api/appkit/Interface.CacheConfig.md) |
30
- | `config.client?` | `WorkspaceClient` |
31
- | `config.onPluginsReady?` | (`appkit`: `PluginMap`<`T`>) => `void` \| `Promise`<`void`> |
32
- | `config.plugins?` | `T` |
33
- | `config.telemetry?` | [`TelemetryConfig`](./docs/api/appkit/Interface.TelemetryConfig.md) |
27
+ | Parameter | Type |
28
+ | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
29
+ | `config` | { `cache?`: [`CacheConfig`](./docs/api/appkit/Interface.CacheConfig.md); `client?`: `WorkspaceClient`; `disableInternalTelemetry?`: `boolean`; `onPluginsReady?`: (`appkit`: `PluginMap`<`T`>) => `void` \| `Promise`<`void`>; `plugins?`: `T`; `telemetry?`: [`TelemetryConfig`](./docs/api/appkit/Interface.TelemetryConfig.md); } |
30
+ | `config.cache?` | [`CacheConfig`](./docs/api/appkit/Interface.CacheConfig.md) |
31
+ | `config.client?` | `WorkspaceClient` |
32
+ | `config.disableInternalTelemetry?` | `boolean` |
33
+ | `config.onPluginsReady?` | (`appkit`: `PluginMap`<`T`>) => `void` \| `Promise`<`void`> |
34
+ | `config.plugins?` | `T` |
35
+ | `config.telemetry?` | [`TelemetryConfig`](./docs/api/appkit/Interface.TelemetryConfig.md) |
34
36
 
35
37
  ## Returns[​](#returns "Direct link to Returns")
36
38
 
@@ -0,0 +1,41 @@
1
+ # Privacy
2
+
3
+ AppKit sends a small amount of anonymized usage telemetry to Databricks so the team can understand how the SDK is used and prioritize improvements. This page documents exactly what is sent, when, and how to turn it off.
4
+
5
+ ## What we collect[​](#what-we-collect "Direct link to What we collect")
6
+
7
+ Every event is a single record with three top-level fields:
8
+
9
+ | Field | Type | Source |
10
+ | ---------------- | ------ | ---------------------------------------------------- |
11
+ | `event_name` | enum | One of `APP_STARTUP`, `HEARTBEAT`, `REQUEST_METRICS` |
12
+ | `app_id` | string | The app's OAuth client UUID (`DATABRICKS_CLIENT_ID`) |
13
+ | `appkit_version` | string | The AppKit SDK version |
14
+
15
+ Each event also carries one of three event-specific bodies:
16
+
17
+ * **`APP_STARTUP`** — emitted once when `createApp` finishes booting. Empty body.
18
+
19
+ * **`HEARTBEAT`** — emitted every five minutes from a running app. Empty body.
20
+
21
+ * **`REQUEST_METRICS`** — emitted once per minute, one record per HTTP endpoint that received traffic in the window. Each record contains:
22
+
23
+ <!-- -->
24
+
25
+ * `endpoint` — the route template (e.g. `GET /api/genie/:space_id/messages`), never the raw request URL or any user-provided values.
26
+ * `request_count`
27
+ * `request_latency_ms_avg`
28
+ * `response_count_http4xx`
29
+ * `response_count_http5xx`
30
+
31
+ ## How to opt out[​](#how-to-opt-out "Direct link to How to opt out")
32
+
33
+ Set any one of the following:
34
+
35
+ ```sh
36
+ DISABLE_APPKIT_INTERNAL_TELEMETRY=true
37
+ DO_NOT_TRACK=1
38
+
39
+ ```
40
+
41
+ Either fully disables the reporter — no events are emitted and no network calls are made.
package/llms.txt CHANGED
@@ -29,6 +29,7 @@ npx @databricks/appkit docs <query>
29
29
  - [Development](./docs/development.md): AppKit provides multiple development workflows to suit different needs: local development with hot reload, AI-assisted development with Agent Skills, and remote tunneling to deployed backends.
30
30
  - [FAQ](./docs/faq.md): Integrations
31
31
  - [Plugins](./docs/plugins.md): Plugins are modular extensions that add capabilities to your AppKit application. They follow a defined lifecycle and have access to shared services like caching, telemetry, and streaming.
32
+ - [Privacy](./docs/privacy.md): AppKit sends a small amount of anonymized usage telemetry to Databricks
32
33
 
33
34
  ## Development
34
35
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@databricks/appkit",
3
3
  "type": "module",
4
- "version": "0.31.0",
4
+ "version": "0.32.0",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
7
7
  "packageManager": "pnpm@10.21.0",
@@ -44,7 +44,7 @@
44
44
  "dependencies": {
45
45
  "@ast-grep/napi": "0.37.0",
46
46
  "@databricks/lakebase": "0.3.0",
47
- "@databricks/sdk-experimental": "0.16.0",
47
+ "@databricks/sdk-experimental": "0.17.0",
48
48
  "@opentelemetry/api": "1.9.0",
49
49
  "@opentelemetry/api-logs": "0.208.0",
50
50
  "@opentelemetry/auto-instrumentations-node": "0.67.2",
@@ -64,6 +64,7 @@
64
64
  "dotenv": "16.6.1",
65
65
  "express": "4.22.0",
66
66
  "get-port": "7.2.0",
67
+ "js-yaml": "4.1.1",
67
68
  "obug": "2.1.1",
68
69
  "pg": "8.18.0",
69
70
  "picocolors": "1.1.1",
@@ -79,6 +80,7 @@
79
80
  "devDependencies": {
80
81
  "@opentelemetry/context-async-hooks": "2.6.1",
81
82
  "@types/express": "4.17.25",
83
+ "@types/js-yaml": "4.0.9",
82
84
  "@types/json-schema": "7.0.15",
83
85
  "@types/pg": "8.16.0",
84
86
  "@types/ws": "8.18.1",