@databricks/appkit-ui 0.82.0 → 0.83.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.
@@ -47,6 +47,7 @@ Documentation merge entry for Typedoc — combines the stable `@databricks/appki
47
47
  | [AutoInheritToolsConfig](./docs/api/appkit/Interface.AutoInheritToolsConfig.md) | Auto-inherit configuration. When enabled for a given agent origin, agents with no explicit `tools:` declaration receive every registered ToolProvider plugin tool whose author marked `autoInheritable: true`. Tools without that flag — destructive, state-mutating, or privilege-sensitive — never spread automatically and must be wired via `tools:` (object or function form in code, `plugin:NAME` entries in markdown frontmatter). |
48
48
  | [BasePluginConfig](./docs/api/appkit/Interface.BasePluginConfig.md) | Base configuration interface for AppKit plugins |
49
49
  | [CacheConfig](./docs/api/appkit/Interface.CacheConfig.md) | Configuration for the CacheInterceptor. Controls TTL, size limits, storage backend, and probabilistic cleanup. |
50
+ | [CallerContext](./docs/api/appkit/Interface.CallerContext.md) | Caller identity and workspace for one immutable execution scope. |
50
51
  | [CustomJudgeSpec](./docs/api/appkit/Interface.CustomJudgeSpec.md) | A custom LLM-judge definition: a prompt template and choice→score mapping. |
51
52
  | [DatabaseCredential](./docs/api/appkit/Interface.DatabaseCredential.md) | Database credentials with OAuth token for Postgres connection |
52
53
  | [DatabaseRegistry](./docs/api/appkit/Interface.DatabaseRegistry.md) | CANONICAL augmentation target. Empty by default; the generated `database.d.ts` augments it via `declare module "@databricks/appkit" { interface DatabaseRegistry { ... } }`. |
@@ -139,6 +140,7 @@ Documentation merge entry for Typedoc — combines the stable `@databricks/appki
139
140
  | [AgentTools](./docs/api/appkit/TypeAlias.AgentTools.md) | Per-agent tool record. String keys map to inline tools, toolkit entries, hosted tools, etc. |
140
141
  | [AgentToolsFn](./docs/api/appkit/TypeAlias.AgentToolsFn.md) | Function form of `AgentDefinition.tools`. Receives the typed [Plugins](./docs/api/appkit/TypeAlias.Plugins.md) map and returns a tool record. Invoked exactly once at setup (or once per `runAgent` call in standalone mode); the result is cached as the agent's resolved tool record. |
141
142
  | [BaseSystemPromptOption](./docs/api/appkit/TypeAlias.BaseSystemPromptOption.md) | - |
143
+ | [CallerPrincipal](./docs/api/appkit/TypeAlias.CallerPrincipal.md) | The caller identity whose permissions authorize execution, not its resources. |
142
144
  | [ConfigSchema](./docs/api/appkit/TypeAlias.ConfigSchema.md) | Configuration schema definition for plugin config. Re-exported from the standard JSON Schema Draft 7 types. |
143
145
  | [DatabaseApiConfig](./docs/api/appkit/TypeAlias.DatabaseApiConfig.md) | Full generated CRUD for every declared table by default. Set false to disable all generated routes, or use an object to restrict tables and writes. Keyed routes require a public primary key; upsert stays programmatic. Route names must start with a letter, contain only letters, digits, `_`, or `-`, be at most 64 characters, and be unique ignoring case. Invalid names fail setup; exclude internal tables with `api.tables` or use `api: false`. |
144
146
  | [DatabaseApiWriteOperation](./docs/api/appkit/TypeAlias.DatabaseApiWriteOperation.md) | Generated HTTP write operations. |
@@ -146,6 +148,7 @@ Documentation merge entry for Typedoc — combines the stable `@databricks/appki
146
148
  | [DatabaseExports](./docs/api/appkit/TypeAlias.DatabaseExports.md) | Typed database API published by the plugin. |
147
149
  | [EntityHooks](./docs/api/appkit/TypeAlias.EntityHooks.md) | Response shaping and mutation lifecycle declared for one table. |
148
150
  | [EvalProgress](./docs/api/appkit/TypeAlias.EvalProgress.md) | - |
151
+ | [ExecutionContext](./docs/api/appkit/TypeAlias.ExecutionContext.md) | - |
149
152
  | [ExecutionResult](./docs/api/appkit/TypeAlias.ExecutionResult.md) | Discriminated union for plugin execution results. |
150
153
  | [FileAction](./docs/api/appkit/TypeAlias.FileAction.md) | Every action the files plugin can perform. |
151
154
  | [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. |
@@ -223,12 +226,15 @@ Documentation merge entry for Typedoc — combines the stable `@databricks/appki
223
226
  | [fromSupervisorApi](./docs/api/appkit/Function.fromSupervisorApi.md) | Creates an [AgentAdapter](./docs/api/appkit/Interface.AgentAdapter.md) backed by the Databricks AI Gateway Responses API (`/ai-gateway/mlflow/v1/responses`). |
224
227
  | [functionToolToDefinition](./docs/api/appkit/Function.functionToolToDefinition.md) | - |
225
228
  | [generateDatabaseCredential](./docs/api/appkit/Function.generateDatabaseCredential.md) | Generate OAuth credentials for Postgres database connection using the proper Postgres API. |
229
+ | [getCurrentActorId](./docs/api/appkit/Function.getCurrentActorId.md) | The initiating user in a caller scope; no user actor exists in service scope. |
230
+ | [getCurrentPrincipalKey](./docs/api/appkit/Function.getCurrentPrincipalKey.md) | Get the principal key for future cache keying: `app` or `user:<id>`. |
226
231
  | [getExecutionContext](./docs/api/appkit/Function.getExecutionContext.md) | Get the current execution context. |
227
232
  | [getLakebaseOrmConfig](./docs/api/appkit/Function.getLakebaseOrmConfig.md) | Get Lakebase connection configuration for ORMs that don't accept pg.Pool directly. |
228
233
  | [getLakebasePgConfig](./docs/api/appkit/Function.getLakebasePgConfig.md) | Get Lakebase connection configuration for PostgreSQL clients. |
229
234
  | [getPluginManifest](./docs/api/appkit/Function.getPluginManifest.md) | Loads and validates the manifest from a plugin constructor. Normalizes string type/permission to strict ResourceType/ResourcePermission. |
230
235
  | [getResourceRequirements](./docs/api/appkit/Function.getResourceRequirements.md) | Gets the resource requirements from a plugin's manifest. |
231
236
  | [getUsernameWithApiLookup](./docs/api/appkit/Function.getUsernameWithApiLookup.md) | Resolves the PostgreSQL username for a Lakebase connection. |
237
+ | [getWarehouseId](./docs/api/appkit/Function.getWarehouseId.md) | Get the configured SQL warehouse ID after app initialization. The warehouse is an app resource; SP and caller executions use the same binding. Deprecated user-context scopes retain support for explicit warehouse overrides. |
232
238
  | [getWorkspaceClient](./docs/api/appkit/Function.getWorkspaceClient.md) | Get workspace client from config or SDK default auth chain |
233
239
  | [id](./docs/api/appkit/Function.id.md) | - |
234
240
  | [includes](./docs/api/appkit/Function.includes.md) | Passes when the value contains `substring`. |
@@ -33,6 +33,14 @@ await createApp({
33
33
 
34
34
  The execution context is determined by the SQL file name, not by the hook call.
35
35
 
36
+ ### Warehouse binding[​](#warehouse-binding "Direct link to Warehouse binding")
37
+
38
+ The warehouse is an app resource, not part of the caller's identity. After `createApp()` initializes Analytics, custom plugins can read the binding with `getWarehouseId` from `@databricks/appkit`. It returns a `Promise<string>` and uses the same app warehouse for service-principal and caller executions. Credentials still come from the current execution context.
39
+
40
+ `ServiceContextState.warehouseId` and the old context-module `getWarehouseId` helper are deprecated compatibility accessors. Use the package-root helper for new code. Warehouse environment lookup and development discovery are unchanged.
41
+
42
+ The service-context property is retained for one release with a one-time deprecation warning, then scheduled for removal. Internal callers use the resource accessor already.
43
+
36
44
  ## SQL parameters[​](#sql-parameters "Direct link to SQL parameters")
37
45
 
38
46
  Use `:paramName` placeholders and optionally annotate parameter types using SQL comments:
package/llms.txt CHANGED
@@ -122,12 +122,15 @@ npx @databricks/appkit docs <query>
122
122
  - [Function: fromSupervisorApi()](./docs/api/appkit/Function.fromSupervisorApi.md): Creates an AgentAdapter backed by the Databricks AI Gateway
123
123
  - [Function: functionToolToDefinition()](./docs/api/appkit/Function.functionToolToDefinition.md): Parameters
124
124
  - [Function: generateDatabaseCredential()](./docs/api/appkit/Function.generateDatabaseCredential.md): Generate OAuth credentials for Postgres database connection using the proper Postgres API.
125
+ - [Function: getCurrentActorId()](./docs/api/appkit/Function.getCurrentActorId.md): The initiating user in a caller scope; no user actor exists in service scope.
126
+ - [Function: getCurrentPrincipalKey()](./docs/api/appkit/Function.getCurrentPrincipalKey.md): Get the principal key for future cache keying.
125
127
  - [Function: getExecutionContext()](./docs/api/appkit/Function.getExecutionContext.md): Get the current execution context.
126
128
  - [Function: getLakebaseOrmConfig()](./docs/api/appkit/Function.getLakebaseOrmConfig.md): Get Lakebase connection configuration for ORMs that don't accept pg.Pool directly.
127
129
  - [Function: getLakebasePgConfig()](./docs/api/appkit/Function.getLakebasePgConfig.md): Get Lakebase connection configuration for PostgreSQL clients.
128
130
  - [Function: getPluginManifest()](./docs/api/appkit/Function.getPluginManifest.md): Loads and validates the manifest from a plugin constructor.
129
131
  - [Function: getResourceRequirements()](./docs/api/appkit/Function.getResourceRequirements.md): Gets the resource requirements from a plugin's manifest.
130
132
  - [Function: getUsernameWithApiLookup()](./docs/api/appkit/Function.getUsernameWithApiLookup.md): Resolves the PostgreSQL username for a Lakebase connection.
133
+ - [Function: getWarehouseId()](./docs/api/appkit/Function.getWarehouseId.md): Get the configured SQL warehouse ID after app initialization.
131
134
  - [Function: getWorkspaceClient()](./docs/api/appkit/Function.getWorkspaceClient.md): Get workspace client from config or SDK default auth chain
132
135
  - [Function: id()](./docs/api/appkit/Function.id.md): Returns
133
136
  - [Function: includes()](./docs/api/appkit/Function.includes.md): Passes when the value contains substring.
@@ -175,6 +178,7 @@ npx @databricks/appkit docs <query>
175
178
  - [Interface: AutoInheritToolsConfig](./docs/api/appkit/Interface.AutoInheritToolsConfig.md): Auto-inherit configuration. When enabled for a given agent origin, agents
176
179
  - [Interface: BasePluginConfig](./docs/api/appkit/Interface.BasePluginConfig.md): Base configuration interface for AppKit plugins
177
180
  - [Interface: CacheConfig](./docs/api/appkit/Interface.CacheConfig.md): Configuration for the CacheInterceptor. Controls TTL, size limits, storage backend, and probabilistic cleanup.
181
+ - [Interface: CallerContext](./docs/api/appkit/Interface.CallerContext.md): Caller identity and workspace for one immutable execution scope.
178
182
  - [Interface: CustomJudgeSpec](./docs/api/appkit/Interface.CustomJudgeSpec.md): A custom LLM-judge definition: a prompt template and choice→score mapping.
179
183
  - [Interface: DatabaseCredential](./docs/api/appkit/Interface.DatabaseCredential.md): Database credentials with OAuth token for Postgres connection
180
184
  - [Interface: DatabaseRegistry](./docs/api/appkit/Interface.DatabaseRegistry.md): CANONICAL augmentation target. Empty by default; the generated database.d.ts
@@ -262,6 +266,7 @@ npx @databricks/appkit docs <query>
262
266
  - [Type Alias: AgentTools](./docs/api/appkit/TypeAlias.AgentTools.md): Per-agent tool record. String keys map to inline tools, toolkit entries,
263
267
  - [Type Alias: AgentToolsFn()](./docs/api/appkit/TypeAlias.AgentToolsFn.md): Function form of AgentDefinition.tools. Receives the typed
264
268
  - [Type Alias: BaseSystemPromptOption](./docs/api/appkit/TypeAlias.BaseSystemPromptOption.md)
269
+ - [Type Alias: CallerPrincipal](./docs/api/appkit/TypeAlias.CallerPrincipal.md): The caller identity whose permissions authorize execution, not its resources.
265
270
  - [Type Alias: ConfigSchema](./docs/api/appkit/TypeAlias.ConfigSchema.md): Configuration schema definition for plugin config.
266
271
  - [Type Alias: DatabaseApiConfig<TSchema>](./docs/api/appkit/TypeAlias.DatabaseApiConfig.md): Full generated CRUD for every declared table by default. Set false to disable
267
272
  - [Type Alias: DatabaseApiWriteOperation](./docs/api/appkit/TypeAlias.DatabaseApiWriteOperation.md): Generated HTTP write operations.
@@ -269,6 +274,7 @@ npx @databricks/appkit docs <query>
269
274
  - [Type Alias: DatabaseExports](./docs/api/appkit/TypeAlias.DatabaseExports.md): Typed database API published by the plugin.
270
275
  - [Type Alias: EntityHooks<TTable>](./docs/api/appkit/TypeAlias.EntityHooks.md): Response shaping and mutation lifecycle declared for one table.
271
276
  - [Type Alias: EvalProgress](./docs/api/appkit/TypeAlias.EvalProgress.md)
277
+ - [Type Alias: ExecutionContext](./docs/api/appkit/TypeAlias.ExecutionContext.md)
272
278
  - [Type Alias: ExecutionResult<T>](./docs/api/appkit/TypeAlias.ExecutionResult.md): Discriminated union for plugin execution results.
273
279
  - [Type Alias: FileAction](./docs/api/appkit/TypeAlias.FileAction.md): Every action the files plugin can perform.
274
280
  - [Type Alias: FilePolicy()](./docs/api/appkit/TypeAlias.FilePolicy.md): A policy function that decides whether user may perform action on
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@databricks/appkit-ui",
3
3
  "type": "module",
4
- "version": "0.82.0",
4
+ "version": "0.83.0",
5
5
  "license": "Apache-2.0",
6
6
  "sideEffects": [
7
7
  "**/*.css"