@databricks/appkit-ui 0.10.1 → 0.11.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 (164) hide show
  1. package/CLAUDE.md +7 -0
  2. package/dist/cli/commands/plugin/sync/sync.js +6 -3
  3. package/dist/cli/commands/plugin/sync/sync.js.map +1 -1
  4. package/dist/react/table/data-table.d.ts +2 -2
  5. package/dist/react/table/data-table.d.ts.map +1 -1
  6. package/dist/react/ui/calendar.d.ts +3 -3
  7. package/dist/react/ui/card.d.ts +8 -8
  8. package/dist/react/ui/carousel.d.ts +6 -6
  9. package/dist/react/ui/chart.d.ts +5 -5
  10. package/dist/react/ui/checkbox.d.ts +2 -2
  11. package/dist/react/ui/collapsible.d.ts +4 -4
  12. package/dist/react/ui/command.d.ts +10 -10
  13. package/dist/react/ui/context-menu.d.ts +16 -16
  14. package/dist/react/ui/dialog.d.ts +11 -11
  15. package/dist/react/ui/drawer.d.ts +11 -11
  16. package/dist/react/ui/dropdown-menu.d.ts +16 -16
  17. package/dist/react/ui/empty.d.ts +7 -7
  18. package/dist/react/ui/field.d.ts +11 -11
  19. package/dist/react/ui/form.d.ts +7 -7
  20. package/dist/react/ui/hover-card.d.ts +4 -4
  21. package/dist/schemas/plugin-manifest.schema.json +4 -0
  22. package/dist/schemas/template-plugins.schema.json +4 -0
  23. package/docs/docs/api/appkit/Class.AppKitError/index.html +3 -3
  24. package/docs/docs/api/appkit/Class.AuthenticationError/index.html +3 -3
  25. package/docs/docs/api/appkit/Class.ConfigurationError/index.html +3 -3
  26. package/docs/docs/api/appkit/Class.ConnectionError/index.html +3 -3
  27. package/docs/docs/api/appkit/Class.ExecutionError/index.html +3 -3
  28. package/docs/docs/api/appkit/Class.InitializationError/index.html +3 -3
  29. package/docs/docs/api/appkit/Class.Plugin/index.html +3 -3
  30. package/docs/docs/api/appkit/Class.ResourceRegistry/index.html +3 -3
  31. package/docs/docs/api/appkit/Class.ServerError/index.html +3 -3
  32. package/docs/docs/api/appkit/Class.TunnelError/index.html +3 -3
  33. package/docs/docs/api/appkit/Class.ValidationError/index.html +3 -3
  34. package/docs/docs/api/appkit/Enumeration.RequestedClaimsPermissionSet/index.html +3 -3
  35. package/docs/docs/api/appkit/Enumeration.ResourceType/index.html +3 -3
  36. package/docs/docs/api/appkit/Function.appKitTypesPlugin/index.html +3 -3
  37. package/docs/docs/api/appkit/Function.createApp/index.html +3 -3
  38. package/docs/docs/api/appkit/Function.createLakebasePool/index.html +3 -3
  39. package/docs/docs/api/appkit/Function.generateDatabaseCredential/index.html +3 -3
  40. package/docs/docs/api/appkit/Function.getExecutionContext/index.html +3 -3
  41. package/docs/docs/api/appkit/Function.getLakebaseOrmConfig/index.html +3 -3
  42. package/docs/docs/api/appkit/Function.getLakebasePgConfig/index.html +3 -3
  43. package/docs/docs/api/appkit/Function.getPluginManifest/index.html +3 -3
  44. package/docs/docs/api/appkit/Function.getResourceRequirements/index.html +3 -3
  45. package/docs/docs/api/appkit/Function.getUsernameWithApiLookup/index.html +3 -3
  46. package/docs/docs/api/appkit/Function.getWorkspaceClient/index.html +3 -3
  47. package/docs/docs/api/appkit/Function.isSQLTypeMarker/index.html +3 -3
  48. package/docs/docs/api/appkit/Interface.BasePluginConfig/index.html +3 -3
  49. package/docs/docs/api/appkit/Interface.CacheConfig/index.html +3 -3
  50. package/docs/docs/api/appkit/Interface.DatabaseCredential/index.html +3 -3
  51. package/docs/docs/api/appkit/Interface.GenerateDatabaseCredentialRequest/index.html +3 -3
  52. package/docs/docs/api/appkit/Interface.ITelemetry/index.html +3 -3
  53. package/docs/docs/api/appkit/Interface.LakebasePoolConfig/index.html +3 -3
  54. package/docs/docs/api/appkit/Interface.PluginManifest/index.html +3 -3
  55. package/docs/docs/api/appkit/Interface.RequestedClaims/index.html +3 -3
  56. package/docs/docs/api/appkit/Interface.RequestedResource/index.html +3 -3
  57. package/docs/docs/api/appkit/Interface.ResourceEntry/index.html +3 -3
  58. package/docs/docs/api/appkit/Interface.ResourceFieldEntry/index.html +3 -3
  59. package/docs/docs/api/appkit/Interface.ResourceRequirement/index.html +3 -3
  60. package/docs/docs/api/appkit/Interface.StreamExecutionSettings/index.html +3 -3
  61. package/docs/docs/api/appkit/Interface.TelemetryConfig/index.html +3 -3
  62. package/docs/docs/api/appkit/Interface.ValidationResult/index.html +3 -3
  63. package/docs/docs/api/appkit/TypeAlias.ConfigSchema/index.html +3 -3
  64. package/docs/docs/api/appkit/TypeAlias.IAppRouter/index.html +3 -3
  65. package/docs/docs/api/appkit/TypeAlias.ResourcePermission/index.html +3 -3
  66. package/docs/docs/api/appkit/TypeAlias.ToPlugin/index.html +3 -3
  67. package/docs/docs/api/appkit/Variable.sql/index.html +3 -3
  68. package/docs/docs/api/appkit/index.html +3 -3
  69. package/docs/docs/api/appkit-ui/data/AreaChart/index.html +3 -3
  70. package/docs/docs/api/appkit-ui/data/BarChart/index.html +3 -3
  71. package/docs/docs/api/appkit-ui/data/DataTable/index.html +3 -3
  72. package/docs/docs/api/appkit-ui/data/DonutChart/index.html +3 -3
  73. package/docs/docs/api/appkit-ui/data/HeatmapChart/index.html +3 -3
  74. package/docs/docs/api/appkit-ui/data/LineChart/index.html +3 -3
  75. package/docs/docs/api/appkit-ui/data/PieChart/index.html +3 -3
  76. package/docs/docs/api/appkit-ui/data/RadarChart/index.html +3 -3
  77. package/docs/docs/api/appkit-ui/data/ScatterChart/index.html +3 -3
  78. package/docs/docs/api/appkit-ui/index.html +3 -3
  79. package/docs/docs/api/appkit-ui/styling/index.html +3 -3
  80. package/docs/docs/api/appkit-ui/ui/Accordion/index.html +3 -3
  81. package/docs/docs/api/appkit-ui/ui/Alert/index.html +3 -3
  82. package/docs/docs/api/appkit-ui/ui/AlertDialog/index.html +3 -3
  83. package/docs/docs/api/appkit-ui/ui/AspectRatio/index.html +3 -3
  84. package/docs/docs/api/appkit-ui/ui/Avatar/index.html +3 -3
  85. package/docs/docs/api/appkit-ui/ui/Badge/index.html +3 -3
  86. package/docs/docs/api/appkit-ui/ui/Breadcrumb/index.html +3 -3
  87. package/docs/docs/api/appkit-ui/ui/Button/index.html +3 -3
  88. package/docs/docs/api/appkit-ui/ui/ButtonGroup/index.html +3 -3
  89. package/docs/docs/api/appkit-ui/ui/Calendar/index.html +3 -3
  90. package/docs/docs/api/appkit-ui/ui/Card/index.html +3 -3
  91. package/docs/docs/api/appkit-ui/ui/Carousel/index.html +3 -3
  92. package/docs/docs/api/appkit-ui/ui/ChartContainer/index.html +3 -3
  93. package/docs/docs/api/appkit-ui/ui/Checkbox/index.html +3 -3
  94. package/docs/docs/api/appkit-ui/ui/Collapsible/index.html +3 -3
  95. package/docs/docs/api/appkit-ui/ui/Command/index.html +3 -3
  96. package/docs/docs/api/appkit-ui/ui/ContextMenu/index.html +3 -3
  97. package/docs/docs/api/appkit-ui/ui/Dialog/index.html +3 -3
  98. package/docs/docs/api/appkit-ui/ui/Drawer/index.html +3 -3
  99. package/docs/docs/api/appkit-ui/ui/DropdownMenu/index.html +3 -3
  100. package/docs/docs/api/appkit-ui/ui/Empty/index.html +3 -3
  101. package/docs/docs/api/appkit-ui/ui/Field/index.html +3 -3
  102. package/docs/docs/api/appkit-ui/ui/FormControl/index.html +3 -3
  103. package/docs/docs/api/appkit-ui/ui/HoverCard/index.html +3 -3
  104. package/docs/docs/api/appkit-ui/ui/Input/index.html +3 -3
  105. package/docs/docs/api/appkit-ui/ui/InputGroup/index.html +3 -3
  106. package/docs/docs/api/appkit-ui/ui/InputOTP/index.html +3 -3
  107. package/docs/docs/api/appkit-ui/ui/Item/index.html +3 -3
  108. package/docs/docs/api/appkit-ui/ui/Kbd/index.html +3 -3
  109. package/docs/docs/api/appkit-ui/ui/Label/index.html +3 -3
  110. package/docs/docs/api/appkit-ui/ui/Menubar/index.html +3 -3
  111. package/docs/docs/api/appkit-ui/ui/NavigationMenu/index.html +3 -3
  112. package/docs/docs/api/appkit-ui/ui/Pagination/index.html +3 -3
  113. package/docs/docs/api/appkit-ui/ui/Popover/index.html +3 -3
  114. package/docs/docs/api/appkit-ui/ui/Progress/index.html +3 -3
  115. package/docs/docs/api/appkit-ui/ui/RadioGroup/index.html +3 -3
  116. package/docs/docs/api/appkit-ui/ui/ResizableHandle/index.html +3 -3
  117. package/docs/docs/api/appkit-ui/ui/ScrollArea/index.html +3 -3
  118. package/docs/docs/api/appkit-ui/ui/Select/index.html +3 -3
  119. package/docs/docs/api/appkit-ui/ui/Separator/index.html +3 -3
  120. package/docs/docs/api/appkit-ui/ui/Sheet/index.html +3 -3
  121. package/docs/docs/api/appkit-ui/ui/Sidebar/index.html +3 -3
  122. package/docs/docs/api/appkit-ui/ui/Skeleton/index.html +3 -3
  123. package/docs/docs/api/appkit-ui/ui/Slider/index.html +3 -3
  124. package/docs/docs/api/appkit-ui/ui/Spinner/index.html +3 -3
  125. package/docs/docs/api/appkit-ui/ui/Switch/index.html +3 -3
  126. package/docs/docs/api/appkit-ui/ui/Table/index.html +3 -3
  127. package/docs/docs/api/appkit-ui/ui/Tabs/index.html +3 -3
  128. package/docs/docs/api/appkit-ui/ui/Textarea/index.html +3 -3
  129. package/docs/docs/api/appkit-ui/ui/Toaster/index.html +3 -3
  130. package/docs/docs/api/appkit-ui/ui/Toggle/index.html +3 -3
  131. package/docs/docs/api/appkit-ui/ui/ToggleGroup/index.html +3 -3
  132. package/docs/docs/api/appkit-ui/ui/Tooltip/index.html +3 -3
  133. package/docs/docs/api/index.html +3 -3
  134. package/docs/docs/app-management/index.html +4 -4
  135. package/docs/docs/architecture/index.html +6 -6
  136. package/docs/docs/category/development/index.html +3 -3
  137. package/docs/docs/configuration/index.html +4 -4
  138. package/docs/docs/core-principles/index.html +3 -3
  139. package/docs/docs/development/ai-assisted-development/index.html +3 -3
  140. package/docs/docs/development/index.html +3 -3
  141. package/docs/docs/development/llm-guide/index.html +3 -3
  142. package/docs/docs/development/local-development/index.html +3 -3
  143. package/docs/docs/development/project-setup/index.html +4 -4
  144. package/docs/docs/development/remote-bridge/index.html +3 -3
  145. package/docs/docs/development/type-generation/index.html +4 -4
  146. package/docs/docs/index.html +3 -3
  147. package/docs/docs/plugins/analytics/index.html +53 -0
  148. package/docs/docs/plugins/analytics.md +66 -0
  149. package/docs/docs/plugins/caching/index.html +23 -0
  150. package/docs/docs/plugins/caching.md +33 -0
  151. package/docs/docs/plugins/custom-plugins/index.html +49 -0
  152. package/docs/docs/plugins/custom-plugins.md +161 -0
  153. package/docs/docs/plugins/execution-context/index.html +40 -0
  154. package/docs/docs/plugins/execution-context.md +45 -0
  155. package/docs/docs/plugins/index.html +6 -173
  156. package/docs/docs/plugins/lakebase/index.html +62 -0
  157. package/docs/docs/plugins/lakebase.md +179 -0
  158. package/docs/docs/plugins/plugin-management/index.html +44 -0
  159. package/docs/docs/plugins/plugin-management.md +88 -0
  160. package/docs/docs/plugins/server/index.html +45 -0
  161. package/docs/docs/plugins/server.md +78 -0
  162. package/docs/docs/plugins.md +0 -481
  163. package/llms.txt +7 -0
  164. package/package.json +1 -1
@@ -0,0 +1,45 @@
1
+ # Execution context
2
+
3
+ AppKit manages Databricks authentication via two contexts:
4
+
5
+ * **ServiceContext** (singleton): Initialized at app startup with service principal credentials
6
+ * **ExecutionContext**: Determined at runtime - either service principal or user context
7
+
8
+ ## Headers for user context[​](#headers-for-user-context "Direct link to Headers for user context")
9
+
10
+ * `x-forwarded-user`: required in production; identifies the user
11
+ * `x-forwarded-access-token`: required for user token passthrough
12
+
13
+ ## Using `asUser(req)` for user-scoped operations[​](#using-asuserreq-for-user-scoped-operations "Direct link to using-asuserreq-for-user-scoped-operations")
14
+
15
+ The `asUser(req)` pattern allows plugins to execute operations using the requesting user's credentials:
16
+
17
+ ```ts
18
+ // In a custom plugin route handler
19
+ router.post("/users/me/data", async (req, res) => {
20
+ // Execute as the user (uses their Databricks permissions)
21
+ const result = await this.asUser(req).query("SELECT ...");
22
+ res.json(result);
23
+ });
24
+
25
+ // Service principal execution (default)
26
+ router.post("/system/data", async (req, res) => {
27
+ const result = await this.query("SELECT ...");
28
+ res.json(result);
29
+ });
30
+
31
+ ```
32
+
33
+ ## Context helper functions[​](#context-helper-functions "Direct link to Context helper functions")
34
+
35
+ Exported from `@databricks/appkit`:
36
+
37
+ * `getCurrentUserId()`: Returns user ID in user context, service user ID otherwise
38
+ * `getWorkspaceClient()`: Returns the appropriate WorkspaceClient for current context
39
+ * `getWarehouseId()`: `Promise<string>` (from `DATABRICKS_WAREHOUSE_ID` or auto-selected in dev)
40
+ * `getWorkspaceId()`: `Promise<string>` (from `DATABRICKS_WORKSPACE_ID` or fetched)
41
+ * `isInUserContext()`: Returns `true` if currently executing in user context
42
+
43
+ ## Development mode behavior[​](#development-mode-behavior "Direct link to Development mode behavior")
44
+
45
+ In local development (`NODE_ENV=development`), if `asUser(req)` is called without a user token, it logs a warning and falls back to the service principal.