@databricks/appkit-ui 0.88.1 → 0.90.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 (150) hide show
  1. package/CLAUDE.md +7 -2
  2. package/dist/cli/commands/doctor/checks-existence.js +16 -16
  3. package/dist/cli/commands/doctor/checks-existence.js.map +1 -1
  4. package/dist/cli/commands/doctor/checks.js +15 -18
  5. package/dist/cli/commands/doctor/checks.js.map +1 -1
  6. package/dist/cli/commands/doctor/databricks-client.js +8 -6
  7. package/dist/cli/commands/doctor/databricks-client.js.map +1 -1
  8. package/dist/cli/commands/registry/add.js +6 -9
  9. package/dist/cli/commands/registry/add.js.map +1 -1
  10. package/dist/cli/commands/registry/client.js +9 -31
  11. package/dist/cli/commands/registry/client.js.map +1 -1
  12. package/dist/cli/commands/registry/constants.js +2 -41
  13. package/dist/cli/commands/registry/constants.js.map +1 -1
  14. package/dist/cli/commands/registry/info.js +1 -3
  15. package/dist/cli/commands/registry/info.js.map +1 -1
  16. package/dist/cli/commands/registry/list.js +5 -13
  17. package/dist/cli/commands/registry/list.js.map +1 -1
  18. package/dist/cli/commands/registry/workspace-picker.js +34 -24
  19. package/dist/cli/commands/registry/workspace-picker.js.map +1 -1
  20. package/dist/react/genie/genie-chart-inference.js.map +1 -1
  21. package/dist/react/genie/genie-query-transform.d.ts +5 -2
  22. package/dist/react/genie/genie-query-transform.d.ts.map +1 -1
  23. package/dist/react/genie/genie-query-transform.js +14 -8
  24. package/dist/react/genie/genie-query-transform.js.map +1 -1
  25. package/dist/react/ui/button.d.ts +1 -1
  26. package/dist/shared/src/genie.d.ts +9 -3
  27. package/dist/shared/src/genie.d.ts.map +1 -1
  28. package/dist/shared/src/workspace-client/factory.d.ts +0 -1
  29. package/dist/shared/src/workspace-client/index.d.ts +1 -2
  30. package/dist/shared/src/workspace-client/modular.d.ts +19 -0
  31. package/dist/shared/src/workspace-client/types.d.ts +1 -2
  32. package/dist/workspace-client/client.js +81 -23
  33. package/dist/workspace-client/client.js.map +1 -1
  34. package/dist/workspace-client/errors.d.ts +14 -2
  35. package/dist/workspace-client/errors.d.ts.map +1 -0
  36. package/dist/workspace-client/errors.js +45 -2
  37. package/dist/workspace-client/errors.js.map +1 -0
  38. package/dist/workspace-client/factory.d.ts +1 -1
  39. package/dist/workspace-client/factory.js.map +1 -1
  40. package/dist/workspace-client/index.d.ts +4 -3
  41. package/dist/workspace-client/index.js +2 -2
  42. package/dist/workspace-client/modular.d.ts +109 -0
  43. package/dist/workspace-client/modular.d.ts.map +1 -0
  44. package/dist/workspace-client/modular.js +447 -0
  45. package/dist/workspace-client/modular.js.map +1 -0
  46. package/dist/workspace-client/options.d.ts +29 -0
  47. package/dist/workspace-client/options.d.ts.map +1 -0
  48. package/dist/workspace-client/types.d.ts +35 -38
  49. package/dist/workspace-client/types.d.ts.map +1 -1
  50. package/docs/api/appkit/Class.ApiError.md +110 -0
  51. package/docs/api/appkit/Class.DatabricksAdapter.md +2 -2
  52. package/docs/api/appkit/Class.SupervisorApiAdapter.md +1 -1
  53. package/docs/api/appkit/Function.generateDatabaseCredential.md +2 -2
  54. package/docs/api/appkit/Function.getWorkspaceClient.md +2 -2
  55. package/docs/api/appkit/Interface.DirectoryEntry.md +62 -0
  56. package/docs/api/appkit/Interface.DownloadResponse.md +45 -0
  57. package/docs/api/appkit/Interface.JobAPI.md +20 -12
  58. package/docs/api/appkit/Interface.LakebasePoolConfig.md +1 -1
  59. package/docs/api/appkit/Interface.WorkspaceClient.md +168 -26
  60. package/docs/api/appkit/Interface.WorkspaceClientOptions.md +1 -14
  61. package/docs/api/appkit/TypeAlias.FilesDirectoryEntry.md +8 -0
  62. package/docs/api/appkit/TypeAlias.FilesDownloadResponse.md +8 -0
  63. package/docs/api/appkit/TypeAlias.IDatabaseConfig.md +12 -0
  64. package/docs/api/appkit/TypeAlias.JobsExport.md +1 -1
  65. package/docs/api/appkit/TypeAlias.WorkspaceClientLike.md +16 -0
  66. package/docs/api/appkit.md +7 -2
  67. package/docs/plugins/database.md +11 -0
  68. package/docs/plugins/files.md +20 -3
  69. package/docs/plugins/jobs.md +9 -9
  70. package/docs/plugins/lakebase.md +3 -1
  71. package/docs/plugins/testing.md +10 -8
  72. package/llms.txt +7 -2
  73. package/node_modules/@databricks/sdk-genie/LICENSE +203 -0
  74. package/node_modules/@databricks/sdk-genie/README.md +23 -0
  75. package/node_modules/@databricks/sdk-genie/dist/package.js +7 -0
  76. package/node_modules/@databricks/sdk-genie/dist/package.js.map +1 -0
  77. package/node_modules/@databricks/sdk-genie/dist/v1/client.d.ts +175 -0
  78. package/node_modules/@databricks/sdk-genie/dist/v1/client.d.ts.map +1 -0
  79. package/node_modules/@databricks/sdk-genie/dist/v1/client.js +829 -0
  80. package/node_modules/@databricks/sdk-genie/dist/v1/client.js.map +1 -0
  81. package/node_modules/@databricks/sdk-genie/dist/v1/index.d.ts +3 -0
  82. package/node_modules/@databricks/sdk-genie/dist/v1/index.js +4 -0
  83. package/node_modules/@databricks/sdk-genie/dist/v1/model.d.ts +1799 -0
  84. package/node_modules/@databricks/sdk-genie/dist/v1/model.d.ts.map +1 -0
  85. package/node_modules/@databricks/sdk-genie/dist/v1/model.js +1097 -0
  86. package/node_modules/@databricks/sdk-genie/dist/v1/model.js.map +1 -0
  87. package/node_modules/@databricks/sdk-genie/dist/v1/transport.d.ts +37 -0
  88. package/node_modules/@databricks/sdk-genie/dist/v1/transport.d.ts.map +1 -0
  89. package/node_modules/@databricks/sdk-genie/dist/v1/transport.js +73 -0
  90. package/node_modules/@databricks/sdk-genie/dist/v1/transport.js.map +1 -0
  91. package/node_modules/@databricks/sdk-genie/dist/v1/utils.d.ts +43 -0
  92. package/node_modules/@databricks/sdk-genie/dist/v1/utils.d.ts.map +1 -0
  93. package/node_modules/@databricks/sdk-genie/dist/v1/utils.js +130 -0
  94. package/node_modules/@databricks/sdk-genie/dist/v1/utils.js.map +1 -0
  95. package/node_modules/@databricks/sdk-genie/package.json +46 -0
  96. package/node_modules/@databricks/sdk-statementexecution/LICENSE +203 -0
  97. package/node_modules/@databricks/sdk-statementexecution/README.md +23 -0
  98. package/node_modules/@databricks/sdk-statementexecution/dist/package.js +7 -0
  99. package/node_modules/@databricks/sdk-statementexecution/dist/package.js.map +1 -0
  100. package/node_modules/@databricks/sdk-statementexecution/dist/v1/client.d.ts +91 -0
  101. package/node_modules/@databricks/sdk-statementexecution/dist/v1/client.d.ts.map +1 -0
  102. package/node_modules/@databricks/sdk-statementexecution/dist/v1/client.js +183 -0
  103. package/node_modules/@databricks/sdk-statementexecution/dist/v1/client.js.map +1 -0
  104. package/node_modules/@databricks/sdk-statementexecution/dist/v1/index.d.ts +3 -0
  105. package/node_modules/@databricks/sdk-statementexecution/dist/v1/index.js +4 -0
  106. package/node_modules/@databricks/sdk-statementexecution/dist/v1/model.d.ts +506 -0
  107. package/node_modules/@databricks/sdk-statementexecution/dist/v1/model.d.ts.map +1 -0
  108. package/node_modules/@databricks/sdk-statementexecution/dist/v1/model.js +302 -0
  109. package/node_modules/@databricks/sdk-statementexecution/dist/v1/model.js.map +1 -0
  110. package/node_modules/@databricks/sdk-statementexecution/dist/v1/transport.d.ts +37 -0
  111. package/node_modules/@databricks/sdk-statementexecution/dist/v1/transport.d.ts.map +1 -0
  112. package/node_modules/@databricks/sdk-statementexecution/dist/v1/transport.js +73 -0
  113. package/node_modules/@databricks/sdk-statementexecution/dist/v1/transport.js.map +1 -0
  114. package/node_modules/@databricks/sdk-statementexecution/dist/v1/utils.d.ts +25 -0
  115. package/node_modules/@databricks/sdk-statementexecution/dist/v1/utils.d.ts.map +1 -0
  116. package/node_modules/@databricks/sdk-statementexecution/dist/v1/utils.js +87 -0
  117. package/node_modules/@databricks/sdk-statementexecution/dist/v1/utils.js.map +1 -0
  118. package/node_modules/@databricks/sdk-statementexecution/package.json +46 -0
  119. package/node_modules/@databricks/sdk-vectorsearch/LICENSE +203 -0
  120. package/node_modules/@databricks/sdk-vectorsearch/README.md +23 -0
  121. package/node_modules/@databricks/sdk-vectorsearch/dist/package.js +7 -0
  122. package/node_modules/@databricks/sdk-vectorsearch/dist/package.js.map +1 -0
  123. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/client.d.ts +70 -0
  124. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/client.d.ts.map +1 -0
  125. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/client.js +474 -0
  126. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/client.js.map +1 -0
  127. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/index.d.ts +3 -0
  128. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/index.js +4 -0
  129. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/model.d.ts +704 -0
  130. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/model.d.ts.map +1 -0
  131. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/model.js +635 -0
  132. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/model.js.map +1 -0
  133. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/transport.d.ts +37 -0
  134. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/transport.d.ts.map +1 -0
  135. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/transport.js +73 -0
  136. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/transport.js.map +1 -0
  137. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/utils.d.ts +37 -0
  138. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/utils.d.ts.map +1 -0
  139. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/utils.js +104 -0
  140. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/utils.js.map +1 -0
  141. package/node_modules/@databricks/sdk-vectorsearch/package.json +46 -0
  142. package/package.json +29 -4
  143. package/sbom.cdx.json +1 -1
  144. package/dist/shared/src/workspace-client/errors.d.ts +0 -1
  145. package/dist/shared/src/workspace-client/legacy.d.ts +0 -3
  146. package/dist/workspace-client/legacy.d.ts +0 -34
  147. package/dist/workspace-client/legacy.d.ts.map +0 -1
  148. package/dist/workspace-client/legacy.js +0 -23
  149. package/dist/workspace-client/legacy.js.map +0 -1
  150. package/docs/api/appkit/Interface.WorkspaceClientLike.md +0 -67
@@ -2,118 +2,260 @@
2
2
 
3
3
  AppKit's workspace client facade. Mirrors the multi-client shape of the modular Databricks SDK: each service is its own accessor, so services can be migrated one at a time behind this stable interface.
4
4
 
5
- Accessors are legacy-typed for now (delegated to the underlying legacy SDK client); see the module docblock.
5
+ ## Extends[​](#extends "Direct link to Extends")
6
+
7
+ * `WorkspaceAuth`
6
8
 
7
9
  ## Properties[​](#properties "Direct link to Properties")
8
10
 
9
- ### apiClient[​](#apiclient "Direct link to apiClient")
11
+ ### apps[​](#apps "Direct link to apps")
10
12
 
11
13
  ```ts
12
- readonly apiClient: ApiClient;
14
+ readonly apps: AppsClient;
13
15
 
14
16
  ```
15
17
 
16
- Low-level HTTP transport (`apiClient.request(...)`). Used for endpoints without a typed service method: SCIM header probe, warehouse listing, serving SSE streaming, vector search, internal telemetry.
18
+ Databricks Apps (modular SDK).
17
19
 
18
20
  ***
19
21
 
20
- ### config[​](#config "Direct link to config")
22
+ ### connections[​](#connections "Direct link to connections")
21
23
 
22
24
  ```ts
23
- readonly config: Config;
25
+ readonly connections: ConnectionsClient;
24
26
 
25
27
  ```
26
28
 
27
- SDK `Config` — exposes `host` and `authenticate(headers)`. Used by the files-upload path and agents auth-header stamping, which bypass the typed services.
29
+ Unity Catalog Connections (modular SDK).
28
30
 
29
31
  ***
30
32
 
31
33
  ### currentUser[​](#currentuser "Direct link to currentUser")
32
34
 
33
35
  ```ts
34
- readonly currentUser: CurrentUserService;
36
+ readonly currentUser: ScimClient;
37
+
38
+ ```
39
+
40
+ Current user (modular SDK SCIM client; `me({})` returns the caller).
41
+
42
+ ***
43
+
44
+ ### database[​](#database "Direct link to database")
45
+
46
+ ```ts
47
+ readonly database: DatabaseClient;
48
+
49
+ ```
50
+
51
+ Lakebase provisioned database instances + credentials (modular SDK).
52
+
53
+ ***
54
+
55
+ ### experiments[​](#experiments "Direct link to experiments")
56
+
57
+ ```ts
58
+ readonly experiments: ExperimentsClient;
35
59
 
36
60
  ```
37
61
 
38
- Current user.
62
+ MLflow Experiments (modular SDK).
39
63
 
40
64
  ***
41
65
 
42
66
  ### files[​](#files "Direct link to files")
43
67
 
44
68
  ```ts
45
- readonly files: FilesService;
69
+ readonly files: FilesClient;
70
+
71
+ ```
72
+
73
+ UC Volumes / Files API (modular SDK).
74
+
75
+ ***
76
+
77
+ ### functions[​](#functions "Direct link to functions")
78
+
79
+ ```ts
80
+ readonly functions: FunctionsClient;
46
81
 
47
82
  ```
48
83
 
49
- UC Volumes / Files API.
84
+ Unity Catalog Functions (modular SDK).
50
85
 
51
86
  ***
52
87
 
53
88
  ### genie[​](#genie "Direct link to genie")
54
89
 
55
90
  ```ts
56
- readonly genie: GenieService;
91
+ readonly genie: GenieClient;
57
92
 
58
93
  ```
59
94
 
60
- Genie / dashboards.
95
+ Genie (modular SDK).
61
96
 
62
97
  ***
63
98
 
64
99
  ### jobs[​](#jobs "Direct link to jobs")
65
100
 
66
101
  ```ts
67
- readonly jobs: JobsService;
102
+ readonly jobs: JobsClient;
103
+
104
+ ```
105
+
106
+ Jobs (modular SDK, Jobs API 2.2).
107
+
108
+ ***
109
+
110
+ ### modelServing[​](#modelserving "Direct link to modelServing")
111
+
112
+ ```ts
113
+ readonly modelServing: ModelServingClient;
68
114
 
69
115
  ```
70
116
 
71
- Jobs.
117
+ Serving endpoints (modular SDK).
72
118
 
73
119
  ***
74
120
 
75
- ### servingEndpoints[​](#servingendpoints "Direct link to servingEndpoints")
121
+ ### postgres[​](#postgres "Direct link to postgres")
76
122
 
77
123
  ```ts
78
- readonly servingEndpoints: ServingEndpointsService;
124
+ readonly postgres: PostgresClient;
79
125
 
80
126
  ```
81
127
 
82
- Serving Endpoints.
128
+ Lakebase Postgres: autoscaling projects, branches, endpoints (modular SDK).
83
129
 
84
130
  ***
85
131
 
86
132
  ### statementExecution[​](#statementexecution "Direct link to statementExecution")
87
133
 
88
134
  ```ts
89
- readonly statementExecution: StatementExecutionService;
135
+ readonly statementExecution: StatementExecutionClient;
136
+
137
+ ```
138
+
139
+ Statement Execution (modular SDK).
140
+
141
+ ***
142
+
143
+ ### tables[​](#tables "Direct link to tables")
144
+
145
+ ```ts
146
+ readonly tables: TablesClient;
147
+
148
+ ```
149
+
150
+ Unity Catalog Tables (modular SDK).
151
+
152
+ ***
153
+
154
+ ### vectorSearch[​](#vectorsearch "Direct link to vectorSearch")
155
+
156
+ ```ts
157
+ readonly vectorSearch: VectorSearchClient;
158
+
159
+ ```
160
+
161
+ Vector Search (modular SDK; index metadata only, queries use `request()`).
162
+
163
+ ***
164
+
165
+ ### volumes[​](#volumes "Direct link to volumes")
166
+
167
+ ```ts
168
+ readonly volumes: VolumesClient;
90
169
 
91
170
  ```
92
171
 
93
- Statement Execution.
172
+ Unity Catalog Volumes (modular SDK).
94
173
 
95
174
  ***
96
175
 
97
176
  ### warehouses[​](#warehouses "Direct link to warehouses")
98
177
 
99
178
  ```ts
100
- readonly warehouses: WarehousesService;
179
+ readonly warehouses: WarehousesClient;
101
180
 
102
181
  ```
103
182
 
104
- SQL Warehouses.
183
+ SQL Warehouses (modular SDK).
105
184
 
106
185
  ## Methods[​](#methods "Direct link to Methods")
107
186
 
108
- ### toLegacyWorkspaceClient()[​](#tolegacyworkspaceclient "Direct link to toLegacyWorkspaceClient()")
187
+ ### authenticate()[​](#authenticate "Direct link to authenticate()")
109
188
 
110
189
  ```ts
111
- toLegacyWorkspaceClient(): WorkspaceClient;
190
+ authenticate(headers: Headers): Promise<void>;
112
191
 
113
192
  ```
114
193
 
115
- Returns the underlying legacy `@databricks/sdk-experimental` `WorkspaceClient`, for handoff to code still typed against the old SDK (`@databricks/lakebase`). Transitional.
194
+ Set the auth header(s) (e.g. `Authorization`) on `headers`.
195
+
196
+ #### Parameters[​](#parameters "Direct link to Parameters")
197
+
198
+ | Parameter | Type |
199
+ | --------- | --------- |
200
+ | `headers` | `Headers` |
116
201
 
117
202
  #### Returns[​](#returns "Direct link to Returns")
118
203
 
119
- `WorkspaceClient`
204
+ `Promise`<`void`>
205
+
206
+ #### Inherited from[​](#inherited-from "Direct link to Inherited from")
207
+
208
+ ```ts
209
+ WorkspaceAuth.authenticate
210
+
211
+ ```
212
+
213
+ ***
214
+
215
+ ### getHost()[​](#gethost "Direct link to getHost()")
216
+
217
+ ```ts
218
+ getHost(): Promise<string>;
219
+
220
+ ```
221
+
222
+ Scheme-normalized workspace host, without a trailing slash.
223
+
224
+ #### Returns[​](#returns-1 "Direct link to Returns")
225
+
226
+ `Promise`<`string`>
227
+
228
+ #### Inherited from[​](#inherited-from-1 "Direct link to Inherited from")
229
+
230
+ ```ts
231
+ WorkspaceAuth.getHost
232
+
233
+ ```
234
+
235
+ ***
236
+
237
+ ### request()[​](#request "Direct link to request()")
238
+
239
+ ```ts
240
+ request(req: WorkspaceRequest): Promise<Response>;
241
+
242
+ ```
243
+
244
+ Send a request through the modular transport (AppKit User-Agent + auth). Returns the raw `Response` (body unread, so it can stream); throws [ApiError](./docs/api/appkit/Class.ApiError.md) on a non-2xx status.
245
+
246
+ #### Parameters[​](#parameters-1 "Direct link to Parameters")
247
+
248
+ | Parameter | Type |
249
+ | --------- | ------------------ |
250
+ | `req` | `WorkspaceRequest` |
251
+
252
+ #### Returns[​](#returns-2 "Direct link to Returns")
253
+
254
+ `Promise`<`Response`>
255
+
256
+ #### Inherited from[​](#inherited-from-2 "Direct link to Inherited from")
257
+
258
+ ```ts
259
+ WorkspaceAuth.request
260
+
261
+ ```
@@ -1,20 +1,7 @@
1
1
  # Interface: WorkspaceClientOptions
2
2
 
3
- Options used to construct the wrapper. Mirrors the subset of the old SDK's `Config` + `ClientOptions` that AppKit relies on today; we deliberately do NOT re-expose every old-SDK config knob.
4
-
5
3
  ## Properties[​](#properties "Direct link to Properties")
6
4
 
7
- ### authType?[​](#authtype "Direct link to authType?")
8
-
9
- ```ts
10
- optional authType: "pat";
11
-
12
- ```
13
-
14
- Authentication strategy passed to the legacy client.
15
-
16
- ***
17
-
18
5
  ### clientOptions?[​](#clientoptions "Direct link to clientOptions?")
19
6
 
20
7
  ```ts
@@ -55,4 +42,4 @@ optional token: string;
55
42
 
56
43
  ```
57
44
 
58
- Bearer token. When set, `authType` defaults to "pat".
45
+ Bearer token (PAT, or the user's OBO token).
@@ -0,0 +1,8 @@
1
+ # Type Alias: FilesDirectoryEntry
2
+
3
+ ```ts
4
+ type FilesDirectoryEntry = WorkspaceFilesDirectoryEntry;
5
+
6
+ ```
7
+
8
+ A single directory entry in the modular SDK shape (camelCase). `list()` and the `/list` route still return the legacy [DirectoryEntry](./docs/api/appkit/Interface.DirectoryEntry.md); they move to this type in a future release.
@@ -0,0 +1,8 @@
1
+ # Type Alias: FilesDownloadResponse
2
+
3
+ ```ts
4
+ type FilesDownloadResponse = WorkspaceFilesDownloadResponse;
5
+
6
+ ```
7
+
8
+ Download response in the modular SDK shape (`contentLength` is a `bigint`). `download()` still returns the legacy [DownloadResponse](./docs/api/appkit/Interface.DownloadResponse.md); it moves to this type in a future release.
@@ -4,6 +4,7 @@
4
4
  type IDatabaseConfig<TSchema> = {
5
5
  api?: DatabaseApiConfig<TSchema>;
6
6
  hooks?: { readonly [TTable in SchemaTableName<TSchema>]?: EntityHooks<TTable> };
7
+ pool?: DatabasePoolConfig;
7
8
  schema?: TSchema;
8
9
  };
9
10
 
@@ -48,6 +49,17 @@ readonly optional hooks: { readonly [TTable in SchemaTableName<TSchema>]?: Entit
48
49
 
49
50
  ***
50
51
 
52
+ ### pool?[​](#pool "Direct link to pool?")
53
+
54
+ ```ts
55
+ readonly optional pool: DatabasePoolConfig;
56
+
57
+ ```
58
+
59
+ Overrides for the connection pool. A warning is logged when callers queue because every connection is in use.
60
+
61
+ ***
62
+
51
63
  ### schema?[​](#schema "Direct link to schema?")
52
64
 
53
65
  ```ts
@@ -21,7 +21,7 @@ Public API shape of the jobs plugin. Callable to select a job by key.
21
21
 
22
22
  ```ts
23
23
  // Trigger a configured job
24
- const { run_id } = await appkit.jobs("etl").runNow();
24
+ const { runId } = await appkit.jobs("etl").runNow();
25
25
 
26
26
  // Trigger and poll until completion
27
27
  for await (const status of appkit.jobs("etl").runAndWait()) {
@@ -0,0 +1,16 @@
1
+ # Type Alias: WorkspaceClientLike
2
+
3
+ ```ts
4
+ type WorkspaceClientLike =
5
+ | WorkspaceRequestClientLike
6
+ | ApiClientLike & {
7
+ config: {
8
+ ensureResolved: Promise<void>;
9
+ };
10
+ };
11
+
12
+ ```
13
+
14
+ Structural shape of a Databricks SDK client used by [fromSupervisorApi](./docs/api/appkit/Function.fromSupervisorApi.md). Only what we need: `request` for streaming. A legacy SDK client (`apiClient.request` + `config.ensureResolved`) is still accepted (deprecated).
15
+
16
+ Exported because [SupervisorApiAdapterOptions.workspaceClient](./docs/api/appkit/Interface.SupervisorApiAdapterOptions.md#workspaceclient) (a public type) references it — callers passing their own client can name the shape they need to satisfy.
@@ -13,6 +13,7 @@ Documentation merge entry for Typedoc — combines the stable `@databricks/appki
13
13
 
14
14
  | Class | Description |
15
15
  | ----------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
16
+ | [ApiError](./docs/api/appkit/Class.ApiError.md) | - |
16
17
  | [AppKitError](./docs/api/appkit/Class.AppKitError.md) | Base error class for all AppKit errors. Provides a consistent structure for error handling across the framework. |
17
18
  | [AppKitMcpClient](./docs/api/appkit/Class.AppKitMcpClient.md) | Lightweight MCP client for Databricks-hosted MCP servers. |
18
19
  | [AuthenticationError](./docs/api/appkit/Class.AuthenticationError.md) | Error thrown when authentication fails. Use for missing tokens, invalid credentials, or authorization failures. |
@@ -56,8 +57,10 @@ Documentation merge entry for Typedoc — combines the stable `@databricks/appki
56
57
  | [DatabaseValidationIssue](./docs/api/appkit/Interface.DatabaseValidationIssue.md) | One rejected field; `path` names public columns, never their values. |
57
58
  | [DatabricksAuth](./docs/api/appkit/Interface.DatabricksAuth.md) | Resolved Databricks host + bearer token for the eval runner's REST calls. |
58
59
  | [DatasetRow](./docs/api/appkit/Interface.DatasetRow.md) | One row of a managed evaluation dataset. `inputs` are the kwargs passed to the agent for the turn; `expectations` (when present) is the row's ground truth / guidelines. Mirrors the `{inputs, expectations}` shape of `mlflow.genai` datasets and of the Unity Catalog table backing a managed eval dataset. |
60
+ | [~~DirectoryEntry~~](./docs/api/appkit/Interface.DirectoryEntry.md) | A single entry returned when listing a directory (Files API wire shape). |
59
61
  | [DiscoveredEval](./docs/api/appkit/Interface.DiscoveredEval.md) | An eval file found under `server/agents/<agent>/evals/`. |
60
62
  | [DiscoveredEvalConfig](./docs/api/appkit/Interface.DiscoveredEvalConfig.md) | A per-agent `evals.config.ts` found under `server/agents/<agent>/evals/`. |
63
+ | [~~DownloadResponse~~](./docs/api/appkit/Interface.DownloadResponse.md) | Response object for file downloads containing a readable stream. |
61
64
  | [DriveResult](./docs/api/appkit/Interface.DriveResult.md) | What a driver returns for a single `t.send`. |
62
65
  | [EndpointConfig](./docs/api/appkit/Interface.EndpointConfig.md) | - |
63
66
  | [EntityMutationHooks](./docs/api/appkit/Interface.EntityMutationHooks.md) | Mutation lifecycle for one entity. A before hook may return a replacement payload, which is revalidated against the trusted schema before it is persisted. Every hook, the mutation, and any write a hook issues through `ctx.app.database` share one transaction, so a rejection anywhere rolls all of them back. Throw `DatabaseValidationError` to answer a generated route with `422`; any other failure stays an opaque server error. |
@@ -130,8 +133,7 @@ Documentation merge entry for Typedoc — combines the stable `@databricks/appki
130
133
  | [ToolProvider](./docs/api/appkit/Interface.ToolProvider.md) | - |
131
134
  | [ValidationResult](./docs/api/appkit/Interface.ValidationResult.md) | Result of validating all registered resources against the environment. |
132
135
  | [WorkspaceClient](./docs/api/appkit/Interface.WorkspaceClient.md) | AppKit's workspace client facade. Mirrors the multi-client shape of the modular Databricks SDK: each service is its own accessor, so services can be migrated one at a time behind this stable interface. |
133
- | [WorkspaceClientLike](./docs/api/appkit/Interface.WorkspaceClientLike.md) | Structural shape of a Databricks SDK client used by [fromSupervisorApi](./docs/api/appkit/Function.fromSupervisorApi.md). Only what we need: `apiClient.request` for streaming and `config.ensureResolved` to materialise the host/credentials. |
134
- | [WorkspaceClientOptions](./docs/api/appkit/Interface.WorkspaceClientOptions.md) | Options used to construct the wrapper. Mirrors the subset of the old SDK's `Config` + `ClientOptions` that AppKit relies on today; we deliberately do NOT re-expose every old-SDK config knob. |
136
+ | [WorkspaceClientOptions](./docs/api/appkit/Interface.WorkspaceClientOptions.md) | - |
135
137
 
136
138
  ## Type Aliases[​](#type-aliases "Direct link to Type Aliases")
137
139
 
@@ -156,6 +158,8 @@ Documentation merge entry for Typedoc — combines the stable `@databricks/appki
156
158
  | [ExecutionResult](./docs/api/appkit/TypeAlias.ExecutionResult.md) | Discriminated union for plugin execution results. |
157
159
  | [FileAction](./docs/api/appkit/TypeAlias.FileAction.md) | Every action the files plugin can perform. |
158
160
  | [FilePolicy](./docs/api/appkit/TypeAlias.FilePolicy.md) | A policy function that decides whether `user` may perform `action` on `resource`. Return `true` to allow, `false` to deny. |
161
+ | [FilesDirectoryEntry](./docs/api/appkit/TypeAlias.FilesDirectoryEntry.md) | A single directory entry in the modular SDK shape (camelCase). `list()` and the `/list` route still return the legacy [DirectoryEntry](./docs/api/appkit/Interface.DirectoryEntry.md); they move to this type in a future release. |
162
+ | [FilesDownloadResponse](./docs/api/appkit/TypeAlias.FilesDownloadResponse.md) | Download response in the modular SDK shape (`contentLength` is a `bigint`). `download()` still returns the legacy [DownloadResponse](./docs/api/appkit/Interface.DownloadResponse.md); it moves to this type in a future release. |
159
163
  | [HostedTool](./docs/api/appkit/TypeAlias.HostedTool.md) | - |
160
164
  | [IAppRouter](./docs/api/appkit/TypeAlias.IAppRouter.md) | Express router type for plugin route registration |
161
165
  | [IDatabaseConfig](./docs/api/appkit/TypeAlias.IDatabaseConfig.md) | Configuration for one schema-bound DatabasePlugin instance. |
@@ -177,6 +181,7 @@ Documentation merge entry for Typedoc — combines the stable `@databricks/appki
177
181
  | [TransactionClient](./docs/api/appkit/TypeAlias.TransactionClient.md) | Entity and SQL capabilities bound to one transaction. |
178
182
  | [~~UserContext~~](./docs/api/appkit/TypeAlias.UserContext.md) | - |
179
183
  | [UserScopedApp](./docs/api/appkit/TypeAlias.UserScopedApp.md) | - |
184
+ | [WorkspaceClientLike](./docs/api/appkit/TypeAlias.WorkspaceClientLike.md) | Structural shape of a Databricks SDK client used by [fromSupervisorApi](./docs/api/appkit/Function.fromSupervisorApi.md). Only what we need: `request` for streaming. A legacy SDK client (`apiClient.request` + `config.ensureResolved`) is still accepted (deprecated). |
180
185
 
181
186
  ## Variables[​](#variables "Direct link to Variables")
182
187
 
@@ -77,6 +77,17 @@ An explicit schema always takes precedence and skips file discovery. An invalid
77
77
 
78
78
  Run `appkit generate-types` to generate the database registry. With that registry, configuration without an explicit schema still infers table names and hook payloads. An explicitly supplied schema also checks configuration keys against its own table names.
79
79
 
80
+ ## Connection pool[​](#connection-pool "Direct link to Connection pool")
81
+
82
+ The plugin keeps one pool of up to 105 connections, the whole direct-connection budget of a 0.5 CU compute, the smallest size. Other pools on the same compute, such as `lakebase()`, every replica of the app, and any other client share that budget, so lower `max` until the sum fits. Larger computes allow more. Check **Max Connections** in the compute's *Edit compute* drawer.
83
+
84
+ ```ts
85
+ database({ pool: { max: 20, connectionTimeoutMillis: 5000 } });
86
+
87
+ ```
88
+
89
+ Only `max`, `idleTimeoutMillis`, and `connectionTimeoutMillis` can be set. When callers queue because every connection is in use, the plugin logs a warning at most once a minute.
90
+
80
91
  ## Restrict the generated API[​](#restrict-the-generated-api "Direct link to Restrict the generated API")
81
92
 
82
93
  Omitting `api`, or setting it to `true` or `{}`, enables full CRUD. Restrictions are optional. There is no separate write opt-in.
@@ -494,9 +494,26 @@ The `list()` method with no arguments lists the volume root.
494
494
  ## Types[​](#types "Direct link to Types")
495
495
 
496
496
  ```ts
497
- // Re-exported from @databricks/sdk-experimental
498
- type DirectoryEntry = files.DirectoryEntry;
499
- type DownloadResponse = files.DownloadResponse;
497
+ /** @deprecated Use FilesDirectoryEntry. Still returned by list() and /list. */
498
+ interface DirectoryEntry {
499
+ file_size?: number;
500
+ is_directory?: boolean;
501
+ last_modified?: number;
502
+ name?: string;
503
+ path?: string;
504
+ }
505
+
506
+ /** @deprecated Use FilesDownloadResponse. Still returned by download(). */
507
+ interface DownloadResponse {
508
+ "content-length"?: number;
509
+ "content-type"?: string;
510
+ contents?: ReadableStream;
511
+ "last-modified"?: string;
512
+ }
513
+
514
+ // Modular SDK shapes (camelCase; contentLength is bigint)
515
+ type FilesDirectoryEntry = { fileSize?: number; isDirectory?: boolean; lastModified?: number; name?: string; path?: string };
516
+ type FilesDownloadResponse = { contentLength?: bigint; contentType?: string; contents?: ReadableStream; lastModified?: string };
500
517
 
501
518
  interface FileMetadata {
502
519
  /** File size in bytes. */
@@ -98,14 +98,14 @@ jobs({
98
98
 
99
99
  When `taskType` is set, the plugin maps validated parameters to the correct SDK request fields automatically:
100
100
 
101
- | Task type | SDK field | Parameter shape |
102
- | --------------- | --------------------- | --------------------------------------------------- |
103
- | `notebook` | `notebook_params` | `Record<string, string>` — values coerced to string |
104
- | `python_wheel` | `python_named_params` | `Record<string, string>` — values coerced to string |
105
- | `python_script` | `python_params` | `{ args: string[] }` — positional args |
106
- | `spark_jar` | `jar_params` | `{ args: string[] }` — positional args |
107
- | `sql` | `sql_params` | `Record<string, string>` — values coerced to string |
108
- | `dbt` | — | No parameters accepted |
101
+ | Task type | SDK field | Parameter shape |
102
+ | --------------- | ------------------- | --------------------------------------------------- |
103
+ | `notebook` | `notebookParams` | `Record<string, string>` — values coerced to string |
104
+ | `python_wheel` | `pythonNamedParams` | `Record<string, string>` — values coerced to string |
105
+ | `python_script` | `pythonParams` | `{ args: string[] }` — positional args |
106
+ | `spark_jar` | `jarParams` | `{ args: string[] }` — positional args |
107
+ | `sql` | `sqlParams` | `Record<string, string>` — values coerced to string |
108
+ | `dbt` | — | No parameters accepted |
109
109
 
110
110
  ```ts
111
111
  jobs({
@@ -208,7 +208,7 @@ const etl = AppKit.jobs("etl");
208
208
  // Trigger a run
209
209
  const result = await etl.runNow({ startDate: "2025-01-01" });
210
210
  if (result.ok) {
211
- console.log("Run ID:", result.data.run_id);
211
+ console.log("Run ID:", result.data.runId);
212
212
  }
213
213
 
214
214
  // Trigger and poll until completion
@@ -107,7 +107,7 @@ await createApp({
107
107
  plugins: [
108
108
  lakebase({
109
109
  pool: {
110
- max: 10, // Max pool connections (default: 10)
110
+ max: 105, // Max pool connections (default: 105)
111
111
  connectionTimeoutMillis: 5000, // Connection timeout ms (default: 10000)
112
112
  idleTimeoutMillis: 30000, // Idle connection timeout ms (default: 30000)
113
113
  },
@@ -117,6 +117,8 @@ await createApp({
117
117
 
118
118
  ```
119
119
 
120
+ The default `max` of 105 is the whole direct-connection budget of a 0.5 CU compute. The SP pool, the legacy per-user OBO pools (3 connections each), a `database()` pool, every replica of the app, and any other client share that budget. Lower `max` until the sum fits the compute. When callers queue because every connection is in use, the plugin logs a warning at most once a minute.
121
+
120
122
  ## On-Behalf-Of (OBO)[​](#on-behalf-of-obo--per-user-connections "Direct link to On-Behalf-Of (OBO)")
121
123
 
122
124
  Lakebase is app-only through the new `appkit.asUser` and `runInCallerContext` APIs. Operations in those scopes fail with a clear error. For a connector call without a manifest alias:
@@ -63,7 +63,8 @@ const app = await createTestApp({
63
63
  responses: {
64
64
  "jobs.getRun": { state: "TERMINATED", result_state: "SUCCESS" },
65
65
  "statementExecution.executeStatement": { status: { state: "SUCCEEDED" } },
66
- "apiClient.request": { results: [] },
66
+ // Raw REST calls through the request() seam answer with a Response.
67
+ request: () => Response.json({ results: [] }),
67
68
  },
68
69
  });
69
70
 
@@ -211,7 +212,8 @@ const app = await createTestApp({
211
212
  responses: {
212
213
  "jobs.getRun": { state: "TERMINATED", result_state: "SUCCESS" },
213
214
  "statementExecution.executeStatement": { status: { state: "SUCCEEDED" } },
214
- "apiClient.request": { results: [] },
215
+ // Raw REST calls through the request() seam answer with a Response.
216
+ request: () => Response.json({ results: [] }),
215
217
  },
216
218
  });
217
219
 
@@ -343,7 +345,7 @@ Instantiate the plugin **class** directly (`new MyAgentPlugin(...)`). The `analy
343
345
  const mock = createTestPluginContext({}, {
344
346
  responses: {
345
347
  "jobs.getRun": { state: "TERMINATED" },
346
- "servingEndpoints.query": (args, signal) => runFakeQuery(args),
348
+ "jobs.listRuns": (args) => runFakeListRuns(args),
347
349
  },
348
350
  env: { MY_VAR: "test-value" },
349
351
  strict: true,
@@ -356,7 +358,7 @@ await mock.attach(plugin);
356
358
 
357
359
  `options` is:
358
360
 
359
- * `responses` — seed the mock workspace client with responses keyed by dotted path (`"jobs.getRun"`, `"genie.getMessage"`). A value can be static or a function of call arguments and the abort signal.
361
+ * `responses` — seed the mock workspace client with responses keyed by dotted path (`"jobs.getRun"`, `"genie.genieGetConversationMessage"`). A value can be static or a function of call arguments and the abort signal.
360
362
  * `env` — set environment variables scoped to the test; they are restored on plugin detach.
361
363
  * `strict` — throw if a handler calls an undeclared workspace-client path (instead of silently resolving `undefined`). The built-in defaults still count as declared.
362
364
 
@@ -535,7 +537,7 @@ The kit re-exports the request/response/context fixtures AppKit uses internally:
535
537
 
536
538
  ## Mocking Databricks services[​](#mocking-databricks-services "Direct link to Mocking Databricks services")
537
539
 
538
- Every core plugin's real work goes through `getWorkspaceClient()`. `createMockWorkspaceClient()` fakes that whole surface, so a plugin touching `jobs`, `genie`, `servingEndpoints`, or `files` is testable without hand-building a nested client:
540
+ Every core plugin's real work goes through `getWorkspaceClient()`. `createMockWorkspaceClient()` fakes that whole surface, so a plugin touching `jobs`, `genie`, `modelServing`, or `files` is testable without hand-building a nested client:
539
541
 
540
542
  ```ts
541
543
  import { createMockWorkspaceClient, getMock } from "@databricks/appkit/testing";
@@ -546,7 +548,7 @@ const client = createMockWorkspaceClient({
546
548
  });
547
549
 
548
550
  await client.jobs.getRun({ run_id: 1 }); // → { state: "TERMINATED" }
549
- await client.genie.getMessage({ id: "m-1" }); // → undefined, does not throw
551
+ await client.genie.genieGetConversationMessage({ messageId: "m-1" }); // → undefined, does not throw
550
552
 
551
553
  ```
552
554
 
@@ -555,8 +557,8 @@ await client.genie.getMessage({ id: "m-1" }); // → undefined, does not throw
555
557
  How it works, and what to expect:
556
558
 
557
559
  * The **facade is typed**, so `client.jbos` is a compile error. AppKit owns the interface, so it's a closed set, not an open-ended chase of the SDK.
558
- * Each **service** is a proxy that mints a memoized mock per method. `client.jobs.getRun === client.jobs.getRun`, so call assertions are stable, and `toLegacyWorkspaceClient()` shares the same functions — one `responses` entry covers both views.
559
- * `config.host` is a real **string** (not a mock), because AppKit builds URLs from it. `apiClient.userAgent()` is synchronous for the same reason, and `apiClient.request` resolves `{}` so destructuring its result doesn't throw.
560
+ * Each **service** is a proxy that mints a memoized mock per method. `client.jobs.getRun === client.jobs.getRun`, so call assertions are stable.
561
+ * `getHost()` resolves a real **string** (seed it with the `config: { host }` option or a `"config.host"` response), because AppKit builds URLs from it. `authenticate(headers)` stamps a test `Authorization` header, and `request(...)` resolves a `Response` with a `{}` JSON body unless you seed `request`.
560
562
  * Sensible defaults are built in: SQL statements succeed, warehouses report `RUNNING`, and `currentUser.me()` returns a service user. Pass `defaults: false` to script everything yourself.
561
563
 
562
564
  Undeclared methods return undefined