@dbx-tools/appkit-mastra 0.9.153 → 0.9.157
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/README.md +4 -3
- package/index.ts +32 -24
- package/lib/index.d.ts +32 -24
- package/lib/index.js +32 -23
- package/lib/src/agents.d.ts +5 -6
- package/lib/src/agents.js +12 -15
- package/lib/src/chart.js +33 -33
- package/lib/src/chat.js +10 -13
- package/lib/src/config.d.ts +12 -13
- package/lib/src/config.js +4 -4
- package/lib/src/evaluation.js +7 -9
- package/lib/src/feedback-mode.d.ts +1 -1
- package/lib/src/feedback-mode.js +1 -1
- package/lib/src/filesystems.js +6 -6
- package/lib/src/follow-up-suggestions.js +10 -10
- package/lib/src/genie-chat.js +27 -29
- package/lib/src/genie.d.ts +2 -2
- package/lib/src/genie.js +29 -29
- package/lib/src/identity.d.ts +3 -30
- package/lib/src/identity.js +2 -27
- package/lib/src/memory.d.ts +1 -1
- package/lib/src/memory.js +24 -6
- package/lib/src/mlflow.d.ts +4 -4
- package/lib/src/mlflow.js +15 -18
- package/lib/src/model.d.ts +3 -3
- package/lib/src/model.js +6 -6
- package/lib/src/monty-sandbox.js +8 -8
- package/lib/src/observability.d.ts +6 -5
- package/lib/src/observability.js +8 -6
- package/lib/src/plugin.d.ts +1 -1
- package/lib/src/plugin.js +49 -51
- package/lib/src/remote-skills.d.ts +3 -4
- package/lib/src/remote-skills.js +46 -46
- package/lib/src/rest.d.ts +2 -2
- package/lib/src/rest.js +3 -3
- package/lib/src/server.js +17 -20
- package/lib/src/serving.js +10 -11
- package/lib/src/statement.js +7 -7
- package/lib/src/storage-schema.js +4 -4
- package/lib/src/summarize.js +5 -5
- package/lib/src/telemetry.d.ts +0 -6
- package/lib/src/telemetry.js +34 -41
- package/lib/src/validation.js +3 -4
- package/lib/src/workspaces.d.ts +2 -2
- package/lib/src/workspaces.js +34 -36
- package/lib/src/writer.d.ts +2 -2
- package/lib/src/writer.js +3 -3
- package/package.json +17 -305
- package/src/agents.ts +27 -21
- package/src/chart.ts +43 -37
- package/src/chat.ts +10 -12
- package/src/config.ts +14 -15
- package/src/evaluation.ts +6 -8
- package/src/feedback-mode.ts +1 -1
- package/src/filesystems.ts +5 -5
- package/src/follow-up-suggestions.ts +9 -9
- package/src/genie-chat.ts +32 -31
- package/src/genie.ts +29 -29
- package/src/identity.ts +3 -38
- package/src/memory.ts +24 -6
- package/src/mlflow.ts +21 -21
- package/src/model.ts +7 -7
- package/src/monty-sandbox.ts +7 -7
- package/src/observability.ts +8 -6
- package/src/plugin.ts +78 -65
- package/src/remote-skills.ts +63 -55
- package/src/rest.ts +4 -4
- package/src/server.ts +32 -20
- package/src/serving.ts +14 -11
- package/src/statement.ts +10 -6
- package/src/storage-schema.ts +3 -3
- package/src/summarize.ts +4 -4
- package/src/telemetry.ts +49 -55
- package/src/validation.ts +2 -3
- package/src/workspaces.ts +52 -42
- package/src/writer.ts +3 -3
package/lib/src/writer.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* @module
|
|
11
11
|
*/
|
|
12
|
-
import {
|
|
12
|
+
import { type Logger } from "@dbx-tools/shared-core";
|
|
13
13
|
import { type GenieWriterEvent } from "@dbx-tools/shared-mastra";
|
|
14
14
|
import type { ToolExecutionContext } from "@mastra/core/tools";
|
|
15
15
|
/**
|
|
@@ -22,4 +22,4 @@ import type { ToolExecutionContext } from "@mastra/core/tools";
|
|
|
22
22
|
*
|
|
23
23
|
* Returns when the write resolves or rejects; never throws.
|
|
24
24
|
*/
|
|
25
|
-
export declare function safeWriteProgress(log:
|
|
25
|
+
export declare function safeWriteProgress(log: Logger, writer: ToolExecutionContext["writer"], toolCallId: string | undefined, event: GenieWriterEvent, context?: Record<string, unknown>): Promise<void>;
|
package/lib/src/writer.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* @module
|
|
11
11
|
*/
|
|
12
|
-
import {
|
|
12
|
+
import { toError } from "@dbx-tools/shared-core";
|
|
13
13
|
import { GENIE_PROGRESS_PART_TYPE } from "@dbx-tools/shared-mastra";
|
|
14
14
|
/**
|
|
15
15
|
* Best-effort native custom progress write. No-op when the writer or owning
|
|
@@ -36,8 +36,8 @@ export async function safeWriteProgress(log, writer, toolCallId, event, context
|
|
|
36
36
|
catch (err) {
|
|
37
37
|
log.warn("writer:error", {
|
|
38
38
|
...context,
|
|
39
|
-
error:
|
|
39
|
+
error: toError(err),
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
43
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid3JpdGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3dyaXRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7OztHQVVHO0FBRUgsT0FBTyxFQUFFLE9BQU8sRUFBZSxNQUFNLHdCQUF3QixDQUFDO0FBQzlELE9BQU8sRUFBRSx3QkFBd0IsRUFBeUIsTUFBTSwwQkFBMEIsQ0FBQztBQUczRjs7Ozs7Ozs7O0dBU0c7QUFDSCxNQUFNLENBQUMsS0FBSyxVQUFVLGlCQUFpQixDQUNyQyxHQUFXLEVBQ1gsTUFBc0MsRUFDdEMsVUFBOEIsRUFDOUIsS0FBdUIsRUFDdkIsVUFBbUMsRUFBRTtJQUVyQyxJQUFJLENBQUMsTUFBTSxJQUFJLENBQUMsVUFBVSxFQUFFLENBQUM7UUFDM0IsR0FBRyxDQUFDLEtBQUssQ0FBQyxrQkFBa0IsRUFBRSxPQUFPLENBQUMsQ0FBQztRQUN2QyxPQUFPO0lBQ1QsQ0FBQztJQUNELElBQUksQ0FBQztRQUNILE1BQU0sTUFBTSxDQUFDLE1BQU0sQ0FBQztZQUNsQixJQUFJLEVBQUUsd0JBQXdCO1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XCIsIGNvbnRleHQpO1xuICAgIHJldHVybjtcbiAgfVxuICB0cnkge1xuICAgIGF3YWl0IHdyaXRlci5jdXN0b20oe1xuICAgICAgdHlwZTogR0VOSUVfUFJPR1JFU1NfUEFSVF9UWVBFLFxuICAgICAgZGF0YTogeyB0b29sQ2FsbElkLCBldmVudCB9LFxuICAgIH0pO1xuICAgIGxvZy5kZWJ1ZyhcIndyaXRlcjpva1wiLCBjb250ZXh0KTtcbiAgfSBjYXRjaCAoZXJyKSB7XG4gICAgbG9nLndhcm4oXCJ3cml0ZXI6ZXJyb3JcIiwge1xuICAgICAgLi4uY29udGV4dCxcbiAgICAgIGVycm9yOiB0b0Vycm9yKGVyciksXG4gICAgfSk7XG4gIH1cbn1cbiJdfQ==
|
package/package.json
CHANGED
|
@@ -36,21 +36,21 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@databricks/appkit": "0.81.0",
|
|
39
|
-
"@dbx-tools/appkit": "^0.9.
|
|
40
|
-
"@dbx-tools/cache": "^0.9.
|
|
41
|
-
"@dbx-tools/core": "^0.9.
|
|
42
|
-
"@dbx-tools/databricks": "^0.9.
|
|
43
|
-
"@dbx-tools/fs": "^0.9.
|
|
44
|
-
"@dbx-tools/genie": "^0.9.
|
|
45
|
-
"@dbx-tools/model": "^0.9.
|
|
46
|
-
"@dbx-tools/model-protocol": "^0.9.
|
|
47
|
-
"@dbx-tools/path": "^0.9.
|
|
48
|
-
"@dbx-tools/postgres": "^0.9.
|
|
49
|
-
"@dbx-tools/shared-core": "^0.9.
|
|
50
|
-
"@dbx-tools/shared-fs": "^0.9.
|
|
51
|
-
"@dbx-tools/shared-genie": "^0.9.
|
|
52
|
-
"@dbx-tools/shared-mastra": "^0.9.
|
|
53
|
-
"@dbx-tools/shared-model": "^0.9.
|
|
39
|
+
"@dbx-tools/appkit": "^0.9.157",
|
|
40
|
+
"@dbx-tools/cache": "^0.9.157",
|
|
41
|
+
"@dbx-tools/core": "^0.9.157",
|
|
42
|
+
"@dbx-tools/databricks": "^0.9.157",
|
|
43
|
+
"@dbx-tools/fs": "^0.9.157",
|
|
44
|
+
"@dbx-tools/genie": "^0.9.157",
|
|
45
|
+
"@dbx-tools/model": "^0.9.157",
|
|
46
|
+
"@dbx-tools/model-protocol": "^0.9.157",
|
|
47
|
+
"@dbx-tools/path": "^0.9.157",
|
|
48
|
+
"@dbx-tools/postgres": "^0.9.157",
|
|
49
|
+
"@dbx-tools/shared-core": "^0.9.157",
|
|
50
|
+
"@dbx-tools/shared-fs": "^0.9.157",
|
|
51
|
+
"@dbx-tools/shared-genie": "^0.9.157",
|
|
52
|
+
"@dbx-tools/shared-mastra": "^0.9.157",
|
|
53
|
+
"@dbx-tools/shared-model": "^0.9.157",
|
|
54
54
|
"@mastra/ai-sdk": "1.10.5",
|
|
55
55
|
"@mastra/core": "1.71.0",
|
|
56
56
|
"@mastra/express": "1.5.15",
|
|
@@ -84,154 +84,10 @@
|
|
|
84
84
|
"types": "./lib/index.d.ts",
|
|
85
85
|
"default": "./lib/index.js"
|
|
86
86
|
},
|
|
87
|
-
"./agents": {
|
|
88
|
-
"types": "./lib/src/agents.d.ts",
|
|
89
|
-
"default": "./lib/src/agents.js"
|
|
90
|
-
},
|
|
91
|
-
"./chart": {
|
|
92
|
-
"types": "./lib/src/chart.d.ts",
|
|
93
|
-
"default": "./lib/src/chart.js"
|
|
94
|
-
},
|
|
95
|
-
"./chat": {
|
|
96
|
-
"types": "./lib/src/chat.d.ts",
|
|
97
|
-
"default": "./lib/src/chat.js"
|
|
98
|
-
},
|
|
99
|
-
"./config": {
|
|
100
|
-
"types": "./lib/src/config.d.ts",
|
|
101
|
-
"default": "./lib/src/config.js"
|
|
102
|
-
},
|
|
103
|
-
"./defaults": {
|
|
104
|
-
"types": "./lib/src/defaults.d.ts",
|
|
105
|
-
"default": "./lib/src/defaults.js"
|
|
106
|
-
},
|
|
107
|
-
"./evaluation": {
|
|
108
|
-
"types": "./lib/src/evaluation.d.ts",
|
|
109
|
-
"default": "./lib/src/evaluation.js"
|
|
110
|
-
},
|
|
111
|
-
"./feedback-mode": {
|
|
112
|
-
"types": "./lib/src/feedback-mode.d.ts",
|
|
113
|
-
"default": "./lib/src/feedback-mode.js"
|
|
114
|
-
},
|
|
115
|
-
"./filesystems": {
|
|
116
|
-
"types": "./lib/src/filesystems.d.ts",
|
|
117
|
-
"default": "./lib/src/filesystems.js"
|
|
118
|
-
},
|
|
119
|
-
"./follow-up-suggestions": {
|
|
120
|
-
"types": "./lib/src/follow-up-suggestions.d.ts",
|
|
121
|
-
"default": "./lib/src/follow-up-suggestions.js"
|
|
122
|
-
},
|
|
123
|
-
"./genie-chat": {
|
|
124
|
-
"types": "./lib/src/genie-chat.d.ts",
|
|
125
|
-
"default": "./lib/src/genie-chat.js"
|
|
126
|
-
},
|
|
127
|
-
"./genie": {
|
|
128
|
-
"types": "./lib/src/genie.d.ts",
|
|
129
|
-
"default": "./lib/src/genie.js"
|
|
130
|
-
},
|
|
131
|
-
"./identity": {
|
|
132
|
-
"types": "./lib/src/identity.d.ts",
|
|
133
|
-
"default": "./lib/src/identity.js"
|
|
134
|
-
},
|
|
135
|
-
"./mcp": {
|
|
136
|
-
"types": "./lib/src/mcp.d.ts",
|
|
137
|
-
"default": "./lib/src/mcp.js"
|
|
138
|
-
},
|
|
139
|
-
"./memory": {
|
|
140
|
-
"types": "./lib/src/memory.d.ts",
|
|
141
|
-
"default": "./lib/src/memory.js"
|
|
142
|
-
},
|
|
143
|
-
"./mlflow": {
|
|
144
|
-
"types": "./lib/src/mlflow.d.ts",
|
|
145
|
-
"default": "./lib/src/mlflow.js"
|
|
146
|
-
},
|
|
147
|
-
"./model": {
|
|
148
|
-
"types": "./lib/src/model.d.ts",
|
|
149
|
-
"default": "./lib/src/model.js"
|
|
150
|
-
},
|
|
151
|
-
"./monty-sandbox": {
|
|
152
|
-
"types": "./lib/src/monty-sandbox.d.ts",
|
|
153
|
-
"default": "./lib/src/monty-sandbox.js"
|
|
154
|
-
},
|
|
155
|
-
"./observability": {
|
|
156
|
-
"types": "./lib/src/observability.d.ts",
|
|
157
|
-
"default": "./lib/src/observability.js"
|
|
158
|
-
},
|
|
159
|
-
"./plugin": {
|
|
160
|
-
"types": "./lib/src/plugin.d.ts",
|
|
161
|
-
"default": "./lib/src/plugin.js"
|
|
162
|
-
},
|
|
163
|
-
"./processors": {
|
|
164
|
-
"types": "./lib/src/processors.d.ts",
|
|
165
|
-
"default": "./lib/src/processors.js"
|
|
166
|
-
},
|
|
167
|
-
"./remote-skills": {
|
|
168
|
-
"types": "./lib/src/remote-skills.d.ts",
|
|
169
|
-
"default": "./lib/src/remote-skills.js"
|
|
170
|
-
},
|
|
171
|
-
"./request-context": {
|
|
172
|
-
"types": "./lib/src/request-context.d.ts",
|
|
173
|
-
"default": "./lib/src/request-context.js"
|
|
174
|
-
},
|
|
175
|
-
"./rest": {
|
|
176
|
-
"types": "./lib/src/rest.d.ts",
|
|
177
|
-
"default": "./lib/src/rest.js"
|
|
178
|
-
},
|
|
179
|
-
"./server": {
|
|
180
|
-
"types": "./lib/src/server.d.ts",
|
|
181
|
-
"default": "./lib/src/server.js"
|
|
182
|
-
},
|
|
183
|
-
"./serving": {
|
|
184
|
-
"types": "./lib/src/serving.d.ts",
|
|
185
|
-
"default": "./lib/src/serving.js"
|
|
186
|
-
},
|
|
187
|
-
"./skill-paths": {
|
|
188
|
-
"types": "./lib/src/skill-paths.d.ts",
|
|
189
|
-
"default": "./lib/src/skill-paths.js"
|
|
190
|
-
},
|
|
191
|
-
"./statement": {
|
|
192
|
-
"types": "./lib/src/statement.d.ts",
|
|
193
|
-
"default": "./lib/src/statement.js"
|
|
194
|
-
},
|
|
195
|
-
"./storage-schema": {
|
|
196
|
-
"types": "./lib/src/storage-schema.d.ts",
|
|
197
|
-
"default": "./lib/src/storage-schema.js"
|
|
198
|
-
},
|
|
199
|
-
"./style": {
|
|
200
|
-
"types": "./lib/src/style.d.ts",
|
|
201
|
-
"default": "./lib/src/style.js"
|
|
202
|
-
},
|
|
203
|
-
"./summarize": {
|
|
204
|
-
"types": "./lib/src/summarize.d.ts",
|
|
205
|
-
"default": "./lib/src/summarize.js"
|
|
206
|
-
},
|
|
207
|
-
"./telemetry": {
|
|
208
|
-
"types": "./lib/src/telemetry.d.ts",
|
|
209
|
-
"default": "./lib/src/telemetry.js"
|
|
210
|
-
},
|
|
211
|
-
"./trace-attributes": {
|
|
212
|
-
"types": "./lib/src/trace-attributes.d.ts",
|
|
213
|
-
"default": "./lib/src/trace-attributes.js"
|
|
214
|
-
},
|
|
215
|
-
"./validation": {
|
|
216
|
-
"types": "./lib/src/validation.d.ts",
|
|
217
|
-
"default": "./lib/src/validation.js"
|
|
218
|
-
},
|
|
219
|
-
"./workspaces": {
|
|
220
|
-
"types": "./lib/src/workspaces.d.ts",
|
|
221
|
-
"default": "./lib/src/workspaces.js"
|
|
222
|
-
},
|
|
223
|
-
"./writer": {
|
|
224
|
-
"types": "./lib/src/writer.d.ts",
|
|
225
|
-
"default": "./lib/src/writer.js"
|
|
226
|
-
},
|
|
227
|
-
"./*": {
|
|
228
|
-
"types": "./lib/src/*/index.d.ts",
|
|
229
|
-
"default": "./lib/src/*/index.js"
|
|
230
|
-
},
|
|
231
87
|
"./package.json": "./package.json"
|
|
232
88
|
}
|
|
233
89
|
},
|
|
234
|
-
"version": "0.9.
|
|
90
|
+
"version": "0.9.157",
|
|
235
91
|
"types": "./lib/index.d.ts",
|
|
236
92
|
"dbxToolsConfig": {
|
|
237
93
|
"tags": [
|
|
@@ -244,154 +100,10 @@
|
|
|
244
100
|
"types": "./lib/index.d.ts",
|
|
245
101
|
"default": "./lib/index.js"
|
|
246
102
|
},
|
|
247
|
-
"./agents": {
|
|
248
|
-
"types": "./lib/src/agents.d.ts",
|
|
249
|
-
"default": "./lib/src/agents.js"
|
|
250
|
-
},
|
|
251
|
-
"./chart": {
|
|
252
|
-
"types": "./lib/src/chart.d.ts",
|
|
253
|
-
"default": "./lib/src/chart.js"
|
|
254
|
-
},
|
|
255
|
-
"./chat": {
|
|
256
|
-
"types": "./lib/src/chat.d.ts",
|
|
257
|
-
"default": "./lib/src/chat.js"
|
|
258
|
-
},
|
|
259
|
-
"./config": {
|
|
260
|
-
"types": "./lib/src/config.d.ts",
|
|
261
|
-
"default": "./lib/src/config.js"
|
|
262
|
-
},
|
|
263
|
-
"./defaults": {
|
|
264
|
-
"types": "./lib/src/defaults.d.ts",
|
|
265
|
-
"default": "./lib/src/defaults.js"
|
|
266
|
-
},
|
|
267
|
-
"./evaluation": {
|
|
268
|
-
"types": "./lib/src/evaluation.d.ts",
|
|
269
|
-
"default": "./lib/src/evaluation.js"
|
|
270
|
-
},
|
|
271
|
-
"./feedback-mode": {
|
|
272
|
-
"types": "./lib/src/feedback-mode.d.ts",
|
|
273
|
-
"default": "./lib/src/feedback-mode.js"
|
|
274
|
-
},
|
|
275
|
-
"./filesystems": {
|
|
276
|
-
"types": "./lib/src/filesystems.d.ts",
|
|
277
|
-
"default": "./lib/src/filesystems.js"
|
|
278
|
-
},
|
|
279
|
-
"./follow-up-suggestions": {
|
|
280
|
-
"types": "./lib/src/follow-up-suggestions.d.ts",
|
|
281
|
-
"default": "./lib/src/follow-up-suggestions.js"
|
|
282
|
-
},
|
|
283
|
-
"./genie-chat": {
|
|
284
|
-
"types": "./lib/src/genie-chat.d.ts",
|
|
285
|
-
"default": "./lib/src/genie-chat.js"
|
|
286
|
-
},
|
|
287
|
-
"./genie": {
|
|
288
|
-
"types": "./lib/src/genie.d.ts",
|
|
289
|
-
"default": "./lib/src/genie.js"
|
|
290
|
-
},
|
|
291
|
-
"./identity": {
|
|
292
|
-
"types": "./lib/src/identity.d.ts",
|
|
293
|
-
"default": "./lib/src/identity.js"
|
|
294
|
-
},
|
|
295
|
-
"./mcp": {
|
|
296
|
-
"types": "./lib/src/mcp.d.ts",
|
|
297
|
-
"default": "./lib/src/mcp.js"
|
|
298
|
-
},
|
|
299
|
-
"./memory": {
|
|
300
|
-
"types": "./lib/src/memory.d.ts",
|
|
301
|
-
"default": "./lib/src/memory.js"
|
|
302
|
-
},
|
|
303
|
-
"./mlflow": {
|
|
304
|
-
"types": "./lib/src/mlflow.d.ts",
|
|
305
|
-
"default": "./lib/src/mlflow.js"
|
|
306
|
-
},
|
|
307
|
-
"./model": {
|
|
308
|
-
"types": "./lib/src/model.d.ts",
|
|
309
|
-
"default": "./lib/src/model.js"
|
|
310
|
-
},
|
|
311
|
-
"./monty-sandbox": {
|
|
312
|
-
"types": "./lib/src/monty-sandbox.d.ts",
|
|
313
|
-
"default": "./lib/src/monty-sandbox.js"
|
|
314
|
-
},
|
|
315
|
-
"./observability": {
|
|
316
|
-
"types": "./lib/src/observability.d.ts",
|
|
317
|
-
"default": "./lib/src/observability.js"
|
|
318
|
-
},
|
|
319
|
-
"./plugin": {
|
|
320
|
-
"types": "./lib/src/plugin.d.ts",
|
|
321
|
-
"default": "./lib/src/plugin.js"
|
|
322
|
-
},
|
|
323
|
-
"./processors": {
|
|
324
|
-
"types": "./lib/src/processors.d.ts",
|
|
325
|
-
"default": "./lib/src/processors.js"
|
|
326
|
-
},
|
|
327
|
-
"./remote-skills": {
|
|
328
|
-
"types": "./lib/src/remote-skills.d.ts",
|
|
329
|
-
"default": "./lib/src/remote-skills.js"
|
|
330
|
-
},
|
|
331
|
-
"./request-context": {
|
|
332
|
-
"types": "./lib/src/request-context.d.ts",
|
|
333
|
-
"default": "./lib/src/request-context.js"
|
|
334
|
-
},
|
|
335
|
-
"./rest": {
|
|
336
|
-
"types": "./lib/src/rest.d.ts",
|
|
337
|
-
"default": "./lib/src/rest.js"
|
|
338
|
-
},
|
|
339
|
-
"./server": {
|
|
340
|
-
"types": "./lib/src/server.d.ts",
|
|
341
|
-
"default": "./lib/src/server.js"
|
|
342
|
-
},
|
|
343
|
-
"./serving": {
|
|
344
|
-
"types": "./lib/src/serving.d.ts",
|
|
345
|
-
"default": "./lib/src/serving.js"
|
|
346
|
-
},
|
|
347
|
-
"./skill-paths": {
|
|
348
|
-
"types": "./lib/src/skill-paths.d.ts",
|
|
349
|
-
"default": "./lib/src/skill-paths.js"
|
|
350
|
-
},
|
|
351
|
-
"./statement": {
|
|
352
|
-
"types": "./lib/src/statement.d.ts",
|
|
353
|
-
"default": "./lib/src/statement.js"
|
|
354
|
-
},
|
|
355
|
-
"./storage-schema": {
|
|
356
|
-
"types": "./lib/src/storage-schema.d.ts",
|
|
357
|
-
"default": "./lib/src/storage-schema.js"
|
|
358
|
-
},
|
|
359
|
-
"./style": {
|
|
360
|
-
"types": "./lib/src/style.d.ts",
|
|
361
|
-
"default": "./lib/src/style.js"
|
|
362
|
-
},
|
|
363
|
-
"./summarize": {
|
|
364
|
-
"types": "./lib/src/summarize.d.ts",
|
|
365
|
-
"default": "./lib/src/summarize.js"
|
|
366
|
-
},
|
|
367
|
-
"./telemetry": {
|
|
368
|
-
"types": "./lib/src/telemetry.d.ts",
|
|
369
|
-
"default": "./lib/src/telemetry.js"
|
|
370
|
-
},
|
|
371
|
-
"./trace-attributes": {
|
|
372
|
-
"types": "./lib/src/trace-attributes.d.ts",
|
|
373
|
-
"default": "./lib/src/trace-attributes.js"
|
|
374
|
-
},
|
|
375
|
-
"./validation": {
|
|
376
|
-
"types": "./lib/src/validation.d.ts",
|
|
377
|
-
"default": "./lib/src/validation.js"
|
|
378
|
-
},
|
|
379
|
-
"./workspaces": {
|
|
380
|
-
"types": "./lib/src/workspaces.d.ts",
|
|
381
|
-
"default": "./lib/src/workspaces.js"
|
|
382
|
-
},
|
|
383
|
-
"./writer": {
|
|
384
|
-
"types": "./lib/src/writer.d.ts",
|
|
385
|
-
"default": "./lib/src/writer.js"
|
|
386
|
-
},
|
|
387
|
-
"./*": {
|
|
388
|
-
"types": "./lib/src/*/index.d.ts",
|
|
389
|
-
"default": "./lib/src/*/index.js"
|
|
390
|
-
},
|
|
391
103
|
"./package.json": "./package.json"
|
|
392
104
|
},
|
|
393
105
|
"files": [
|
|
394
|
-
"index
|
|
106
|
+
"index*.ts",
|
|
395
107
|
"src",
|
|
396
108
|
"lib"
|
|
397
109
|
],
|
package/src/agents.ts
CHANGED
|
@@ -23,10 +23,20 @@ import type {
|
|
|
23
23
|
ToolkitOptions as AppKitToolkitOptions,
|
|
24
24
|
ToolProvider,
|
|
25
25
|
} from "@databricks/appkit/beta";
|
|
26
|
-
import {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
import {
|
|
27
|
+
toolkitEntries,
|
|
28
|
+
type PluginContextLike,
|
|
29
|
+
AgentToolExecutionContext,
|
|
30
|
+
} from "@dbx-tools/appkit";
|
|
31
|
+
import {
|
|
32
|
+
log,
|
|
33
|
+
toError,
|
|
34
|
+
type Logger,
|
|
35
|
+
sequence,
|
|
36
|
+
toUniqueSlug,
|
|
37
|
+
toIdentifier,
|
|
38
|
+
} from "@dbx-tools/shared-core";
|
|
39
|
+
import { TOOL_PROGRESS_PART_TYPE, ToolProgressEventSchema } from "@dbx-tools/shared-mastra";
|
|
30
40
|
import type {
|
|
31
41
|
AgentConfig,
|
|
32
42
|
AgentExecutionOptions,
|
|
@@ -153,9 +163,6 @@ function loadQuickJsDependency(): Promise<typeof import("@mastra/quickjs")> {
|
|
|
153
163
|
*/
|
|
154
164
|
export type MastraTools = ToolsInput;
|
|
155
165
|
|
|
156
|
-
/** Re-export of Mastra's native `createTool` for full-feature access. */
|
|
157
|
-
export { createTool } from "@mastra/core/tools";
|
|
158
|
-
|
|
159
166
|
/**
|
|
160
167
|
* AppKit-shaped tool factory. Lets users mix-and-match tools across
|
|
161
168
|
* AppKit's `agents` plugin and `mastra` with a single import:
|
|
@@ -235,7 +242,7 @@ export interface AppKitToolOptions {
|
|
|
235
242
|
* words don't collide in traces. Stable across runs.
|
|
236
243
|
*/
|
|
237
244
|
function deriveToolId(description: string): string {
|
|
238
|
-
return
|
|
245
|
+
return toUniqueSlug(description, { fallbackPrefix: "tool" });
|
|
239
246
|
}
|
|
240
247
|
|
|
241
248
|
/**
|
|
@@ -688,7 +695,7 @@ async function tryCodeModeTransport(
|
|
|
688
695
|
} catch (caught) {
|
|
689
696
|
return {
|
|
690
697
|
category: "dependency-unavailable",
|
|
691
|
-
error:
|
|
698
|
+
error: toError(caught),
|
|
692
699
|
provider,
|
|
693
700
|
};
|
|
694
701
|
}
|
|
@@ -697,7 +704,7 @@ async function tryCodeModeTransport(
|
|
|
697
704
|
} catch (caught) {
|
|
698
705
|
return {
|
|
699
706
|
category: "construction-failed",
|
|
700
|
-
error:
|
|
707
|
+
error: toError(caught),
|
|
701
708
|
provider,
|
|
702
709
|
};
|
|
703
710
|
}
|
|
@@ -712,7 +719,7 @@ async function tryCodeModeTransport(
|
|
|
712
719
|
} catch (caught) {
|
|
713
720
|
return {
|
|
714
721
|
category: "dependency-unavailable",
|
|
715
|
-
error:
|
|
722
|
+
error: toError(caught),
|
|
716
723
|
provider,
|
|
717
724
|
};
|
|
718
725
|
}
|
|
@@ -721,7 +728,7 @@ async function tryCodeModeTransport(
|
|
|
721
728
|
} catch (caught) {
|
|
722
729
|
return {
|
|
723
730
|
category: "construction-failed",
|
|
724
|
-
error:
|
|
731
|
+
error: toError(caught),
|
|
725
732
|
provider,
|
|
726
733
|
};
|
|
727
734
|
}
|
|
@@ -867,10 +874,10 @@ function defaultAgentDescription(name: string): string {
|
|
|
867
874
|
*/
|
|
868
875
|
export async function buildAgents(opts: {
|
|
869
876
|
config: MastraPluginConfig;
|
|
870
|
-
context:
|
|
877
|
+
context: PluginContextLike | undefined;
|
|
871
878
|
memoryBuilder?: MemoryBuilder;
|
|
872
879
|
outputProcessorFactories?: readonly MastraOutputProcessorFactory[];
|
|
873
|
-
log:
|
|
880
|
+
log: Logger;
|
|
874
881
|
/**
|
|
875
882
|
* Local skill filesystems mounted into every auto-created default workspace.
|
|
876
883
|
* Skill activation comes from {@link standardSkills}, not workspace search.
|
|
@@ -1040,12 +1047,12 @@ export async function buildAgents(opts: {
|
|
|
1040
1047
|
}
|
|
1041
1048
|
|
|
1042
1049
|
/** Log failed tool calls without changing the chunks returned to the client. */
|
|
1043
|
-
function toolErrorLoggingProcessor(logger:
|
|
1050
|
+
function toolErrorLoggingProcessor(logger: Logger): OutputProcessor {
|
|
1044
1051
|
return {
|
|
1045
1052
|
id: "tool-error-logger",
|
|
1046
1053
|
async processOutputStream({ part }) {
|
|
1047
1054
|
if (part.type === "tool-error") {
|
|
1048
|
-
const error =
|
|
1055
|
+
const error = toError(part.payload.error);
|
|
1049
1056
|
logger.error("tool execution failed", {
|
|
1050
1057
|
toolName: part.payload.toolName,
|
|
1051
1058
|
toolCallId: part.payload.toolCallId,
|
|
@@ -1084,8 +1091,7 @@ function workspaceSkillInputProcessors(
|
|
|
1084
1091
|
export function approvalGatedToolIds(tools: MastraTools): string[] {
|
|
1085
1092
|
if (!tools || typeof tools !== "object") return [];
|
|
1086
1093
|
return [
|
|
1087
|
-
...
|
|
1088
|
-
.sequence(Object.entries(tools))
|
|
1094
|
+
...sequence(Object.entries(tools))
|
|
1089
1095
|
.filter(([, tool]) => isApprovalGatedTool(tool))
|
|
1090
1096
|
.map(([key, tool]) => resolveToolId(tool, key)),
|
|
1091
1097
|
];
|
|
@@ -1202,7 +1208,7 @@ function resolveDefinitions(config: MastraPluginConfig): Record<string, AnyMastr
|
|
|
1202
1208
|
/** Derive a registry id from a definition's `name`, with a fallback. */
|
|
1203
1209
|
function deriveAgentKey(def: AnyMastraAgentDefinition, index?: number): string {
|
|
1204
1210
|
if (def.name) {
|
|
1205
|
-
const slug =
|
|
1211
|
+
const slug = toIdentifier(def.name);
|
|
1206
1212
|
if (slug) return slug;
|
|
1207
1213
|
}
|
|
1208
1214
|
return index === undefined ? FALLBACK_AGENT_ID : `agent_${index}`;
|
|
@@ -1292,7 +1298,7 @@ function resolveAgentWorkspace(
|
|
|
1292
1298
|
*/
|
|
1293
1299
|
function buildPluginsMap(
|
|
1294
1300
|
config: MastraPluginConfig,
|
|
1295
|
-
context:
|
|
1301
|
+
context: PluginContextLike | undefined,
|
|
1296
1302
|
): MastraPlugins {
|
|
1297
1303
|
const cache = new Map<string, MastraPluginToolkitProvider | null>();
|
|
1298
1304
|
return new Proxy({} as MastraPlugins, {
|
|
@@ -1326,7 +1332,7 @@ function buildPluginsMap(
|
|
|
1326
1332
|
*/
|
|
1327
1333
|
function resolveProvider(
|
|
1328
1334
|
config: MastraPluginConfig,
|
|
1329
|
-
context:
|
|
1335
|
+
context: PluginContextLike | undefined,
|
|
1330
1336
|
propName: string,
|
|
1331
1337
|
): MastraPluginToolkitProvider | null {
|
|
1332
1338
|
if (propName === "genie") {
|