@databricks/appkit-ui 0.21.0 → 0.22.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 (53) hide show
  1. package/CLAUDE.md +1 -0
  2. package/README.md +3 -20
  3. package/dist/cli/commands/setup.js +2 -2
  4. package/dist/cli/commands/setup.js.map +1 -1
  5. package/dist/js/config.d.ts +24 -0
  6. package/dist/js/config.d.ts.map +1 -0
  7. package/dist/js/config.js +49 -0
  8. package/dist/js/config.js.map +1 -0
  9. package/dist/js/index.d.ts +2 -1
  10. package/dist/js/index.js +2 -1
  11. package/dist/react/genie/genie-chat-message-list.d.ts.map +1 -1
  12. package/dist/react/genie/genie-chat-message-list.js +5 -4
  13. package/dist/react/genie/genie-chat-message-list.js.map +1 -1
  14. package/dist/react/genie/genie-chat-message.d.ts.map +1 -1
  15. package/dist/react/genie/genie-chat-message.js +7 -6
  16. package/dist/react/genie/genie-chat-message.js.map +1 -1
  17. package/dist/react/genie/genie-query-visualization.d.ts.map +1 -1
  18. package/dist/react/genie/genie-query-visualization.js +4 -3
  19. package/dist/react/genie/genie-query-visualization.js.map +1 -1
  20. package/dist/react/genie/index.d.ts +1 -1
  21. package/dist/react/genie/types.d.ts +2 -1
  22. package/dist/react/genie/types.d.ts.map +1 -1
  23. package/dist/react/genie/types.js +6 -0
  24. package/dist/react/genie/types.js.map +1 -0
  25. package/dist/react/genie/use-genie-chat.d.ts.map +1 -1
  26. package/dist/react/genie/use-genie-chat.js +60 -23
  27. package/dist/react/genie/use-genie-chat.js.map +1 -1
  28. package/dist/react/hooks/index.d.ts +2 -1
  29. package/dist/react/hooks/index.js +1 -0
  30. package/dist/react/hooks/use-plugin-config.d.ts +25 -0
  31. package/dist/react/hooks/use-plugin-config.d.ts.map +1 -0
  32. package/dist/react/hooks/use-plugin-config.js +32 -0
  33. package/dist/react/hooks/use-plugin-config.js.map +1 -0
  34. package/dist/react/index.d.ts +3 -2
  35. package/dist/react/index.js +2 -1
  36. package/dist/shared/src/index.d.ts +1 -1
  37. package/dist/shared/src/plugin.d.ts +12 -1
  38. package/dist/shared/src/plugin.d.ts.map +1 -0
  39. package/docs/api/appkit/Class.Plugin.md +75 -17
  40. package/docs/app-management.md +1 -1
  41. package/docs/architecture.md +1 -1
  42. package/docs/development/ai-assisted-development.md +2 -2
  43. package/docs/development/local-development.md +1 -1
  44. package/docs/development/remote-bridge.md +1 -1
  45. package/docs/development/templates.md +93 -0
  46. package/docs/development.md +1 -1
  47. package/docs/plugins/caching.md +3 -1
  48. package/docs/plugins/execution-context.md +1 -1
  49. package/docs/plugins/lakebase.md +1 -1
  50. package/docs.md +2 -2
  51. package/llms.txt +1 -0
  52. package/package.json +60 -58
  53. package/sbom.cdx.json +1 -0
@@ -5,7 +5,7 @@ Manage your AppKit application throughout its lifecycle using the Databricks CLI
5
5
  ## Prerequisites[​](#prerequisites "Direct link to Prerequisites")
6
6
 
7
7
  * [Node.js](https://nodejs.org) v22+ environment with `npm`
8
- * Databricks CLI (v0.287.0 or higher): install and configure it according to the [official tutorial](https://docs.databricks.com/aws/en/dev-tools/cli/tutorial).
8
+ * Databricks CLI (v0.295.0 or higher): install and configure it according to the [official tutorial](https://docs.databricks.com/aws/en/dev-tools/cli/tutorial).
9
9
 
10
10
  ## Create app[​](#create-app "Direct link to Create app")
11
11
 
@@ -59,7 +59,7 @@ The Node.js backend layer built with `@databricks/appkit`:
59
59
  Integration with Databricks services:
60
60
 
61
61
  * **SQL Warehouses**: Execute analytical queries with Arrow or JSON format
62
- * **Lakebase V1 (Provisioned)**: Access data from Lakebase Provisioned. Support for Lakebase Autoscaling coming soon.
62
+ * **Lakebase Autoscaling**: OLTP database access with automatic OAuth token refresh
63
63
 
64
64
  ## See also[​](#see-also "Direct link to See also")
65
65
 
@@ -3,7 +3,7 @@
3
3
  ## Prerequisites[​](#prerequisites "Direct link to Prerequisites")
4
4
 
5
5
  * [Node.js](https://nodejs.org) v22+ environment with `npm`
6
- * Databricks CLI (v0.287.0 or higher): install and configure it according to the [official tutorial](https://docs.databricks.com/aws/en/dev-tools/cli/tutorial).
6
+ * Databricks CLI (v0.295.0 or higher): install and configure it according to the [official tutorial](https://docs.databricks.com/aws/en/dev-tools/cli/tutorial).
7
7
  * A new Databricks app with AppKit installed. See [Bootstrap a new Databricks app](./docs.md#quick-start-options) for more details.
8
8
 
9
9
  AppKit integrates with AI coding assistants through the Agent Skills.
@@ -13,7 +13,7 @@ AppKit integrates with AI coding assistants through the Agent Skills.
13
13
  To install the Databricks Agent Skills for your preferred AI assistant, run:
14
14
 
15
15
  ```bash
16
- databricks experimental aitools skills install
16
+ databricks experimental aitools install
17
17
 
18
18
  ```
19
19
 
@@ -3,7 +3,7 @@
3
3
  ## Prerequisites[​](#prerequisites "Direct link to Prerequisites")
4
4
 
5
5
  * [Node.js](https://nodejs.org) v22+ environment with `npm`
6
- * Databricks CLI (v0.287.0 or higher): install and configure it according to the [official tutorial](https://docs.databricks.com/aws/en/dev-tools/cli/tutorial).
6
+ * Databricks CLI (v0.295.0 or higher): install and configure it according to the [official tutorial](https://docs.databricks.com/aws/en/dev-tools/cli/tutorial).
7
7
  * A new Databricks app with AppKit installed. See [Bootstrap a new Databricks app](./docs.md#quick-start-options) for more details.
8
8
 
9
9
  Once your app is bootstrapped according to the [Manual quick start](./docs.md#manual-quick-start) guide, you can start the development server with hot reload for both UI and backend code.
@@ -3,7 +3,7 @@
3
3
  ## Prerequisites[​](#prerequisites "Direct link to Prerequisites")
4
4
 
5
5
  * [Node.js](https://nodejs.org) v22+ environment with `npm`
6
- * Databricks CLI (v0.287.0 or higher): install and configure it according to the [official tutorial](https://docs.databricks.com/aws/en/dev-tools/cli/tutorial).
6
+ * Databricks CLI (v0.295.0 or higher): install and configure it according to the [official tutorial](https://docs.databricks.com/aws/en/dev-tools/cli/tutorial).
7
7
  * A new Databricks app with AppKit installed. See [Bootstrap a new Databricks app](./docs.md#quick-start-options) for more details.
8
8
 
9
9
  Remote bridge allows you to develop against a deployed backend while keeping your UI and queries local. This is useful for testing against production data or debugging deployed backend code without redeploying your app.
@@ -0,0 +1,93 @@
1
+ # Templates
2
+
3
+ AppKit uses a template system powered by the Databricks CLI's `databricks apps init` command. Templates define the project structure, and `.tmpl` files are processed with Go's `text/template` engine to generate customized output.
4
+
5
+ ## How `.tmpl` files work[​](#how-tmpl-files-work "Direct link to how-tmpl-files-work")
6
+
7
+ Any file ending in `.tmpl` is processed by the CLI during `databricks apps init`:
8
+
9
+ 1. The `.tmpl` suffix is stripped (e.g. `.env.tmpl` → `.env`)
10
+ 2. Go template expressions are evaluated and substituted
11
+ 3. The rendered file is written to the output directory
12
+
13
+ Files named with a `_` prefix are renamed to `.` prefix (e.g. `_gitignore` → `.gitignore`).
14
+
15
+ ### Template variables[​](#template-variables "Direct link to Template variables")
16
+
17
+ | Variable | Description |
18
+ | ----------------- | ---------------------------------------------------------------------------- |
19
+ | `.projectName` | Project name from `--name` or interactive prompt |
20
+ | `.workspaceHost` | Databricks workspace URL |
21
+ | `.profile` | Databricks CLI profile name (empty if using host-based auth) |
22
+ | `.appDescription` | App description |
23
+ | `.plugins.<name>` | Non-nil for each selected plugin, enabling conditionals |
24
+ | `.dotEnv.content` | Generated `.env` content from plugin resources |
25
+ | `.dotEnv.example` | Generated `.env.example` content with placeholders |
26
+ | `.bundle.*` | Generated `databricks.yml` sections (variables, resources, target variables) |
27
+ | `.appEnv` | Generated `app.yaml` env entries |
28
+
29
+ ### Conditional content[​](#conditional-content "Direct link to Conditional content")
30
+
31
+ Use Go template conditionals to include/exclude code based on selected plugins:
32
+
33
+ ```go
34
+ {{- if .plugins.analytics}}
35
+ import { analytics } from '@databricks/appkit';
36
+ {{- end}}
37
+
38
+ ```
39
+
40
+ ## `appkit.plugins.json`[​](#appkitpluginsjson "Direct link to appkitpluginsjson")
41
+
42
+ The plugin manifest drives the CLI's behavior during `databricks apps init`:
43
+
44
+ * **Plugin selection UI** — selectable plugins shown in the interactive prompt
45
+ * **Resource prompts** — required/optional resources prompt the user for values (e.g. SQL Warehouse ID)
46
+ * **`.dotEnv` population** — resource fields with an `env` property are written to `.env`
47
+ * **`app.yaml` generation** — resource fields produce `env` + `valueFrom` entries
48
+ * **`databricks.yml` generation** — resource fields produce bundle variables and app resource entries
49
+
50
+ ### Resource field properties[​](#resource-field-properties "Direct link to Resource field properties")
51
+
52
+ Each resource field in the manifest can have these properties:
53
+
54
+ | Property | Description |
55
+ | -------------- | ----------------------------------------------------------------------------------- |
56
+ | `env` | Environment variable name written to `.env` and `app.yaml` |
57
+ | `description` | Shown in the interactive prompt and bundle variable description |
58
+ | `localOnly` | Only written to `.env` for local dev; excluded from `app.yaml` and bundle variables |
59
+ | `bundleIgnore` | Excluded from `databricks.yml` variables (but still in `.env`) |
60
+ | `value` | Default value used when no user input is provided |
61
+ | `resolve` | Auto-populated by CLI from API calls instead of prompting (see below) |
62
+ | `examples` | Example values shown in field descriptions |
63
+
64
+ ### Resolvers[​](#resolvers "Direct link to Resolvers")
65
+
66
+ Fields with a `resolve` property are auto-populated by the CLI from API calls rather than user prompts. The format is `<type>:<field>`.
67
+
68
+ Currently only the `postgres` resource type has a resolver. Given the user-provided `branch` and `database` resource names, it derives:
69
+
70
+ | Resolve key | Description |
71
+ | ----------------------- | ----------------------------------------------------------- |
72
+ | `postgres:host` | Postgres host from the branch's read-write endpoint |
73
+ | `postgres:databaseName` | Postgres database name from the database resource |
74
+ | `postgres:endpointPath` | Lakebase endpoint resource name from the branch's endpoints |
75
+
76
+ Example field definition:
77
+
78
+ ```json
79
+ {
80
+ "host": {
81
+ "env": "PGHOST",
82
+ "localOnly": true,
83
+ "resolve": "postgres:host",
84
+ "description": "Postgres host for local development."
85
+ }
86
+ }
87
+
88
+ ```
89
+
90
+ ## See also[​](#see-also "Direct link to See also")
91
+
92
+ * [Plugin management](./docs/plugins/plugin-management.md) — `appkit plugin sync`, `appkit plugin create`
93
+ * [Configuration](./docs/configuration.md) — environment variables
@@ -5,7 +5,7 @@ AppKit provides multiple development workflows to suit different needs: local de
5
5
  ## Prerequisites[​](#prerequisites "Direct link to Prerequisites")
6
6
 
7
7
  * [Node.js](https://nodejs.org) v22+ environment with `npm`
8
- * Databricks CLI (v0.287.0 or higher): install and configure it according to the [official tutorial](https://docs.databricks.com/aws/en/dev-tools/cli/tutorial).
8
+ * Databricks CLI (v0.295.0 or higher): install and configure it according to the [official tutorial](https://docs.databricks.com/aws/en/dev-tools/cli/tutorial).
9
9
  * A new Databricks app with AppKit installed. See [Bootstrap a new Databricks app](./docs.md#quick-start-options) for more details.
10
10
 
11
11
  ## Development flows[​](#development-flows "Direct link to Development flows")
@@ -16,7 +16,9 @@ await createApp({
16
16
 
17
17
  ```
18
18
 
19
- Storage auto-selects **Lakebase V1 (Provisioned) persistent cache when healthy**, otherwise falls back to in-memory. Support for Lakebase Autoscaling coming soon.
19
+ Storage auto-selects **Lakebase Autoscaling persistent cache when healthy**, otherwise falls back to in-memory.
20
+
21
+ The database-backed cache requires the same Lakebase environment variables as the [Lakebase plugin](./docs/plugins/lakebase.md#environment-variables) (`PGHOST`, `PGDATABASE`, `LAKEBASE_ENDPOINT`, `PGSSLMODE`).
20
22
 
21
23
  ## Plugin-level caching[​](#plugin-level-caching "Direct link to Plugin-level caching")
22
24
 
@@ -42,4 +42,4 @@ Exported from `@databricks/appkit`:
42
42
 
43
43
  ## Development mode behavior[​](#development-mode-behavior "Direct link to Development mode behavior")
44
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.
45
+ In local development (`NODE_ENV=development`), if `asUser(req)` is called without a user token, it logs a warning and skips user impersonation the operation runs with the default credentials configured for the app instead.
@@ -17,7 +17,7 @@ The easiest way to get started with the Lakebase plugin is to use the Databricks
17
17
  ### Prerequisites[​](#prerequisites "Direct link to Prerequisites")
18
18
 
19
19
  * [Node.js](https://nodejs.org) v22+ environment with `npm`
20
- * Databricks CLI (v0.287.0 or higher): install and configure it according to the [official tutorial](https://docs.databricks.com/aws/en/dev-tools/cli/tutorial).
20
+ * Databricks CLI (v0.295.0 or higher): install and configure it according to the [official tutorial](https://docs.databricks.com/aws/en/dev-tools/cli/tutorial).
21
21
  * A new Databricks app with AppKit installed. See [Bootstrap a new Databricks app](./docs.md#quick-start-options) for more details.
22
22
 
23
23
  ### Steps[​](#steps "Direct link to Steps")
package/docs.md CHANGED
@@ -19,7 +19,7 @@ AppKit simplifies building data applications on Databricks by providing:
19
19
  ## Prerequisites[​](#prerequisites "Direct link to Prerequisites")
20
20
 
21
21
  * [Node.js](https://nodejs.org) v22+ environment with `npm`
22
- * Databricks CLI (v0.287.0 or higher): install and configure it according to the [official tutorial](https://docs.databricks.com/aws/en/dev-tools/cli/tutorial).
22
+ * Databricks CLI (v0.295.0 or higher): install and configure it according to the [official tutorial](https://docs.databricks.com/aws/en/dev-tools/cli/tutorial).
23
23
 
24
24
  ## Quick start options[​](#quick-start-options "Direct link to Quick start options")
25
25
 
@@ -37,7 +37,7 @@ Databricks AppKit is designed to work with AI coding assistants through Agent Sk
37
37
  Install Agent Skills and configure it for use with your preferred AI assistant:
38
38
 
39
39
  ```bash
40
- databricks experimental aitools skills install
40
+ databricks experimental aitools install
41
41
 
42
42
  ```
43
43
 
package/llms.txt CHANGED
@@ -36,6 +36,7 @@ npx @databricks/appkit docs <query>
36
36
  - [Local development](./docs/development/local-development.md): Once your app is bootstrapped according to the Manual quick start guide, you can start the development server with hot reload for both UI and backend code.
37
37
  - [Project setup](./docs/development/project-setup.md): This guide covers the recommended project structure and scaffolding for AppKit applications.
38
38
  - [Remote Bridge](./docs/development/remote-bridge.md): Remote bridge allows you to develop against a deployed backend while keeping your UI and queries local. This is useful for testing against production data or debugging deployed backend code without redeploying your app.
39
+ - [Templates](./docs/development/templates.md): AppKit uses a template system powered by the Databricks CLI's databricks apps init command. Templates define the project structure, and .tmpl files are processed with Go's text/template engine to generate customized output.
39
40
  - [Type generation](./docs/development/type-generation.md): AppKit can automatically generate TypeScript types for your SQL queries, providing end-to-end type safety from database to UI.
40
41
 
41
42
  ## Plugins
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@databricks/appkit-ui",
3
3
  "type": "module",
4
- "version": "0.21.0",
4
+ "version": "0.22.0",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -19,7 +19,8 @@
19
19
  "llms.txt",
20
20
  "README.md",
21
21
  "DCO",
22
- "NOTICE.md"
22
+ "NOTICE.md",
23
+ "sbom.cdx.json"
23
24
  ],
24
25
  "exports": {
25
26
  "./js": "./dist/js/index.js",
@@ -38,55 +39,56 @@
38
39
  "postinstall": "node scripts/postinstall.js"
39
40
  },
40
41
  "dependencies": {
41
- "@radix-ui/react-accordion": "^1.2.12",
42
- "@radix-ui/react-alert-dialog": "^1.1.15",
43
- "@radix-ui/react-aspect-ratio": "^1.1.8",
44
- "@radix-ui/react-avatar": "^1.1.11",
45
- "@radix-ui/react-checkbox": "^1.3.3",
46
- "@radix-ui/react-collapsible": "^1.1.12",
47
- "@radix-ui/react-context-menu": "^2.2.16",
48
- "@radix-ui/react-dialog": "^1.1.15",
49
- "@radix-ui/react-dropdown-menu": "^2.1.16",
50
- "@radix-ui/react-hover-card": "^1.1.15",
51
- "@radix-ui/react-label": "^2.1.8",
52
- "@radix-ui/react-menubar": "^1.1.16",
53
- "@radix-ui/react-navigation-menu": "^1.2.14",
54
- "@radix-ui/react-popover": "^1.1.15",
55
- "@radix-ui/react-progress": "^1.1.8",
56
- "@radix-ui/react-radio-group": "^1.3.8",
57
- "@radix-ui/react-scroll-area": "^1.2.10",
58
- "@radix-ui/react-select": "^2.2.6",
59
- "@radix-ui/react-separator": "^1.1.8",
60
- "@radix-ui/react-slider": "^1.3.6",
61
- "@radix-ui/react-slot": "^1.2.4",
62
- "@radix-ui/react-switch": "^1.2.6",
63
- "@radix-ui/react-tabs": "^1.1.13",
64
- "@radix-ui/react-toggle": "^1.1.10",
65
- "@radix-ui/react-toggle-group": "^1.1.11",
66
- "@radix-ui/react-tooltip": "^1.2.8",
67
- "@tanstack/react-table": "^8.21.3",
68
- "apache-arrow": "^21.1.0",
69
- "class-variance-authority": "^0.7.1",
70
- "clsx": "^2.1.1",
71
- "cmdk": "^1.1.1",
72
- "echarts": "^6.0.0",
73
- "echarts-for-react": "^3.0.5",
74
- "embla-carousel-react": "^8.6.0",
75
- "input-otp": "^1.4.2",
76
- "lucide-react": "^0.554.0",
77
- "marked": "^17.0.3",
78
- "next-themes": "^0.4.6",
79
- "react-day-picker": "^9.11.3",
80
- "react-hook-form": "^7.68.0",
81
- "react-resizable-panels": "^3.0.6",
82
- "sonner": "^2.0.7",
83
- "tailwind-merge": "^3.4.0",
84
- "vaul": "^1.1.2",
85
- "@ast-grep/napi": "^0.37.0",
86
- "ajv": "^8.17.1",
87
- "ajv-formats": "^3.0.1",
88
- "@clack/prompts": "^1.0.1",
89
- "commander": "^12.1.0"
42
+ "@radix-ui/react-accordion": "1.2.12",
43
+ "@radix-ui/react-alert-dialog": "1.1.15",
44
+ "@radix-ui/react-aspect-ratio": "1.1.8",
45
+ "@radix-ui/react-avatar": "1.1.11",
46
+ "@radix-ui/react-checkbox": "1.3.3",
47
+ "@radix-ui/react-collapsible": "1.1.12",
48
+ "@radix-ui/react-context-menu": "2.2.16",
49
+ "@radix-ui/react-dialog": "1.1.15",
50
+ "@radix-ui/react-dropdown-menu": "2.1.16",
51
+ "@radix-ui/react-hover-card": "1.1.15",
52
+ "@radix-ui/react-label": "2.1.8",
53
+ "@radix-ui/react-menubar": "1.1.16",
54
+ "@radix-ui/react-navigation-menu": "1.2.14",
55
+ "@radix-ui/react-popover": "1.1.15",
56
+ "@radix-ui/react-progress": "1.1.8",
57
+ "@radix-ui/react-radio-group": "1.3.8",
58
+ "@radix-ui/react-scroll-area": "1.2.10",
59
+ "@radix-ui/react-select": "2.2.6",
60
+ "@radix-ui/react-separator": "1.1.8",
61
+ "@radix-ui/react-slider": "1.3.6",
62
+ "@radix-ui/react-slot": "1.2.4",
63
+ "@radix-ui/react-switch": "1.2.6",
64
+ "@radix-ui/react-tabs": "1.1.13",
65
+ "@radix-ui/react-toggle": "1.1.10",
66
+ "@radix-ui/react-toggle-group": "1.1.11",
67
+ "@radix-ui/react-tooltip": "1.2.8",
68
+ "@tanstack/react-table": "8.21.3",
69
+ "apache-arrow": "21.1.0",
70
+ "class-variance-authority": "0.7.1",
71
+ "clsx": "2.1.1",
72
+ "cmdk": "1.1.1",
73
+ "dompurify": "3.3.3",
74
+ "echarts": "6.0.0",
75
+ "echarts-for-react": "3.0.5",
76
+ "embla-carousel-react": "8.6.0",
77
+ "input-otp": "1.4.2",
78
+ "lucide-react": "0.554.0",
79
+ "marked": "17.0.3",
80
+ "next-themes": "0.4.6",
81
+ "react-day-picker": "9.12.0",
82
+ "react-hook-form": "7.68.0",
83
+ "react-resizable-panels": "3.0.6",
84
+ "sonner": "2.0.7",
85
+ "tailwind-merge": "3.4.0",
86
+ "vaul": "1.1.2",
87
+ "@ast-grep/napi": "0.37.0",
88
+ "ajv": "8.17.1",
89
+ "ajv-formats": "3.0.1",
90
+ "@clack/prompts": "1.0.1",
91
+ "commander": "12.1.0"
90
92
  },
91
93
  "peerDependencies": {
92
94
  "react": "^18.0.0 || ^19.0.0",
@@ -94,13 +96,13 @@
94
96
  "recharts": "^2.0.0 || ^3.0.0"
95
97
  },
96
98
  "devDependencies": {
97
- "@types/react": "^19.0.0",
98
- "@types/react-dom": "^19.0.0",
99
- "react": "^19.0.0",
100
- "react-dom": "^19.0.0",
101
- "recharts": "^2.15.4",
102
- "tailwindcss": "^4.0.14",
103
- "tw-animate-css": "^1.4.0"
99
+ "@types/react": "19.2.2",
100
+ "@types/react-dom": "19.2.2",
101
+ "react": "19.2.0",
102
+ "react-dom": "19.2.0",
103
+ "recharts": "2.15.4",
104
+ "tailwindcss": "4.1.17",
105
+ "tw-animate-css": "1.4.0"
104
106
  },
105
107
  "publishConfig": {},
106
108
  "bin": {