@databricks/appkit 0.78.0 → 0.80.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.
- package/dist/agents/databricks.d.ts +65 -0
- package/dist/agents/databricks.d.ts.map +1 -1
- package/dist/agents/databricks.js +77 -2
- package/dist/agents/databricks.js.map +1 -1
- package/dist/appkit/package.js +1 -1
- package/dist/connectors/serving/client.js +17 -1
- package/dist/connectors/serving/client.js.map +1 -1
- package/dist/core/agent/run-agent.js +6 -6
- package/dist/core/agent/run-agent.js.map +1 -1
- package/dist/plugins/agents/agents.d.ts.map +1 -1
- package/dist/plugins/agents/agents.js +4 -11
- package/dist/plugins/agents/agents.js.map +1 -1
- package/dist/plugins/database/database.d.ts +2 -0
- package/dist/plugins/database/database.d.ts.map +1 -1
- package/dist/plugins/database/database.js +34 -0
- package/dist/plugins/database/database.js.map +1 -1
- package/dist/plugins/server/index.js +2 -2
- package/dist/plugins/server/index.js.map +1 -1
- package/dist/plugins/server/remote-tunnel/remote-tunnel-manager.js +3 -3
- package/dist/plugins/server/remote-tunnel/remote-tunnel-manager.js.map +1 -1
- package/dist/plugins/server/static-server.js +3 -3
- package/dist/plugins/server/static-server.js.map +1 -1
- package/dist/plugins/server/utils.js +88 -8
- package/dist/plugins/server/utils.js.map +1 -1
- package/dist/plugins/server/vite-dev-server.js +4 -4
- package/dist/plugins/server/vite-dev-server.js.map +1 -1
- package/dist/shared/src/schemas/manifest.d.ts +33 -33
- package/dist/type-generator/database/generate.js +3 -3
- package/dist/type-generator/database/generate.js.map +1 -1
- package/dist/type-generator/migration.js +2 -2
- package/dist/type-generator/migration.js.map +1 -1
- package/dist/type-generator/serving/server-file-extractor.js +3 -3
- package/dist/type-generator/serving/server-file-extractor.js.map +1 -1
- package/docs/api/appkit/Class.DatabricksAdapter.md +56 -8
- package/package.json +1 -1
- package/sbom.cdx.json +1 -1
|
@@ -89,6 +89,54 @@ run(input: AgentInput, context: AgentRunContext): AsyncGenerator<AgentEvent, voi
|
|
|
89
89
|
|
|
90
90
|
***
|
|
91
91
|
|
|
92
|
+
### fromAiGateway()[](#fromaigateway "Direct link to fromAiGateway()")
|
|
93
|
+
|
|
94
|
+
```ts
|
|
95
|
+
static fromAiGateway(options: AiGatewayOptions): Promise<DatabricksAdapter>;
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Creates a DatabricksAdapter that talks to the Databricks AI Gateway Chat Completions endpoint (`/ai-gateway/mlflow/v1/chat/completions`).
|
|
100
|
+
|
|
101
|
+
Unlike [fromModelServing](#frommodelserving), the target model is named in the request body (`model`, e.g. `"system.ai.claude-opus-5-5"`) rather than in the URL: the gateway is a single fixed path that routes by the body's `model`. Auth and transport reuse the SDK's `apiClient.request`, same as the serving path, so no bespoke `fetch()` + token handling. The request/response wire format and tool-calling loop are identical to the serving path.
|
|
102
|
+
|
|
103
|
+
#### Parameters[](#parameters-2 "Direct link to Parameters")
|
|
104
|
+
|
|
105
|
+
| Parameter | Type |
|
|
106
|
+
| --------- | ------------------ |
|
|
107
|
+
| `options` | `AiGatewayOptions` |
|
|
108
|
+
|
|
109
|
+
#### Returns[](#returns-2 "Direct link to Returns")
|
|
110
|
+
|
|
111
|
+
`Promise`<`DatabricksAdapter`>
|
|
112
|
+
|
|
113
|
+
#### Example[](#example "Direct link to Example")
|
|
114
|
+
|
|
115
|
+
```ts
|
|
116
|
+
import { createApp, createAgent } from "@databricks/appkit";
|
|
117
|
+
import { agents, DatabricksAdapter } from "@databricks/appkit/beta";
|
|
118
|
+
|
|
119
|
+
const adapter = await DatabricksAdapter.fromAiGateway({
|
|
120
|
+
model: "system.ai.claude-opus-5-5",
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
await createApp({
|
|
124
|
+
plugins: [
|
|
125
|
+
agents({
|
|
126
|
+
agents: {
|
|
127
|
+
assistant: createAgent({
|
|
128
|
+
instructions: "You are a helpful assistant.",
|
|
129
|
+
model: adapter,
|
|
130
|
+
}),
|
|
131
|
+
},
|
|
132
|
+
}),
|
|
133
|
+
],
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
***
|
|
139
|
+
|
|
92
140
|
### fromModelServing()[](#frommodelserving "Direct link to fromModelServing()")
|
|
93
141
|
|
|
94
142
|
```ts
|
|
@@ -98,18 +146,18 @@ static fromModelServing(endpointName?: string, options?: ModelServingOptions): P
|
|
|
98
146
|
|
|
99
147
|
Creates a DatabricksAdapter from a Model Serving endpoint name. Auto-creates a WorkspaceClient internally. Reads the endpoint name from the argument or the `DATABRICKS_SERVING_ENDPOINT_NAME` env var.
|
|
100
148
|
|
|
101
|
-
#### Parameters[](#parameters-
|
|
149
|
+
#### Parameters[](#parameters-3 "Direct link to Parameters")
|
|
102
150
|
|
|
103
151
|
| Parameter | Type |
|
|
104
152
|
| --------------- | --------------------- |
|
|
105
153
|
| `endpointName?` | `string` |
|
|
106
154
|
| `options?` | `ModelServingOptions` |
|
|
107
155
|
|
|
108
|
-
#### Returns[](#returns-
|
|
156
|
+
#### Returns[](#returns-3 "Direct link to Returns")
|
|
109
157
|
|
|
110
158
|
`Promise`<`DatabricksAdapter`>
|
|
111
159
|
|
|
112
|
-
#### Example[](#example "Direct link to Example")
|
|
160
|
+
#### Example[](#example-1 "Direct link to Example")
|
|
113
161
|
|
|
114
162
|
```ts
|
|
115
163
|
// Reads endpoint from DATABRICKS_SERVING_ENDPOINT_NAME env var
|
|
@@ -139,13 +187,13 @@ Creates a DatabricksAdapter for a Databricks Model Serving endpoint.
|
|
|
139
187
|
|
|
140
188
|
Routes through the shared `connectors/serving/stream` helper, which delegates to the SDK's `apiClient.request({ raw: true })`. That gives the adapter centralised URL encoding + authentication with the rest of the serving surface — no bespoke `fetch()` + `authenticate()` plumbing.
|
|
141
189
|
|
|
142
|
-
#### Parameters[](#parameters-
|
|
190
|
+
#### Parameters[](#parameters-4 "Direct link to Parameters")
|
|
143
191
|
|
|
144
192
|
| Parameter | Type |
|
|
145
193
|
| --------- | ------------------------ |
|
|
146
194
|
| `options` | `ServingEndpointOptions` |
|
|
147
195
|
|
|
148
|
-
#### Returns[](#returns-
|
|
196
|
+
#### Returns[](#returns-4 "Direct link to Returns")
|
|
149
197
|
|
|
150
198
|
`Promise`<`DatabricksAdapter`>
|
|
151
199
|
|
|
@@ -162,17 +210,17 @@ Discoverability shim for the Supervisor API adapter. Returns an [AgentAdapter](.
|
|
|
162
210
|
|
|
163
211
|
Dynamic-imports `./supervisor-api` to avoid forming a load-time cycle: both files share `connectors/serving/client.ts`.
|
|
164
212
|
|
|
165
|
-
#### Parameters[](#parameters-
|
|
213
|
+
#### Parameters[](#parameters-5 "Direct link to Parameters")
|
|
166
214
|
|
|
167
215
|
| Parameter | Type |
|
|
168
216
|
| --------- | ------------------------------------------------------------------------------------------------- |
|
|
169
217
|
| `options` | [`SupervisorApiAdapterOptions`](./docs/api/appkit/Interface.SupervisorApiAdapterOptions.md) |
|
|
170
218
|
|
|
171
|
-
#### Returns[](#returns-
|
|
219
|
+
#### Returns[](#returns-5 "Direct link to Returns")
|
|
172
220
|
|
|
173
221
|
`Promise`<[`AgentAdapter`](./docs/api/appkit/Interface.AgentAdapter.md)>
|
|
174
222
|
|
|
175
|
-
#### Example[](#example-
|
|
223
|
+
#### Example[](#example-2 "Direct link to Example")
|
|
176
224
|
|
|
177
225
|
```ts
|
|
178
226
|
import { DatabricksAdapter } from "@databricks/appkit/beta";
|