@mastra/server 1.0.0-beta.15 → 1.0.0-beta.16
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/CHANGELOG.md +55 -0
- package/dist/{chunk-QD5JZUZR.cjs → chunk-6RQUU6C6.cjs} +36 -55
- package/dist/chunk-6RQUU6C6.cjs.map +1 -0
- package/dist/{chunk-CTOZHWSD.js → chunk-JXPRNYUC.js} +12 -27
- package/dist/chunk-JXPRNYUC.js.map +1 -0
- package/dist/{chunk-SKVOSYY5.js → chunk-K3LMK4KU.js} +5 -3
- package/dist/chunk-K3LMK4KU.js.map +1 -0
- package/dist/{chunk-XWNPRPEW.cjs → chunk-V3RILBZM.cjs} +5 -3
- package/dist/chunk-V3RILBZM.cjs.map +1 -0
- package/dist/{chunk-Q43HGWK7.cjs → chunk-VJNZJAIO.cjs} +12 -27
- package/dist/chunk-VJNZJAIO.cjs.map +1 -0
- package/dist/{chunk-ER232COB.js → chunk-VN3XWLTP.js} +36 -55
- package/dist/chunk-VN3XWLTP.js.map +1 -0
- package/dist/server/handlers/agent-builder.cjs +19 -19
- package/dist/server/handlers/agent-builder.js +1 -1
- package/dist/server/handlers/observability.cjs +5 -5
- package/dist/server/handlers/observability.d.ts.map +1 -1
- package/dist/server/handlers/observability.js +1 -1
- package/dist/server/handlers/stored-agents.cjs +6 -6
- package/dist/server/handlers/stored-agents.d.ts.map +1 -1
- package/dist/server/handlers/stored-agents.js +1 -1
- package/dist/server/handlers.cjs +4 -4
- package/dist/server/handlers.js +2 -2
- package/dist/server/server-adapter/index.cjs +30 -30
- package/dist/server/server-adapter/index.js +3 -3
- package/package.json +4 -4
- package/dist/chunk-CTOZHWSD.js.map +0 -1
- package/dist/chunk-ER232COB.js.map +0 -1
- package/dist/chunk-Q43HGWK7.cjs.map +0 -1
- package/dist/chunk-QD5JZUZR.cjs.map +0 -1
- package/dist/chunk-SKVOSYY5.js.map +0 -1
- package/dist/chunk-XWNPRPEW.cjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,60 @@
|
|
|
1
1
|
# @mastra/server
|
|
2
2
|
|
|
3
|
+
## 1.0.0-beta.16
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fix workflow observability view broken by invalid entityType parameter ([#11427](https://github.com/mastra-ai/mastra/pull/11427))
|
|
8
|
+
|
|
9
|
+
The UI workflow observability view was failing with a Zod validation error when trying to filter traces by workflow. The UI was sending `entityType=workflow`, but the backend's `EntityType` enum only accepts `workflow_run`.
|
|
10
|
+
|
|
11
|
+
**Root Cause**: The legacy value transformation was happening in the handler (after validation), but Zod validation occurred earlier in the request pipeline, rejecting the request before it could be transformed.
|
|
12
|
+
|
|
13
|
+
**Solution**:
|
|
14
|
+
- Added `z.preprocess()` to the query schema to transform `workflow` → `workflow_run` before validation
|
|
15
|
+
- Kept handler transformation for defense in depth
|
|
16
|
+
- Updated UI to use `EntityType.WORKFLOW_RUN` enum value for type safety
|
|
17
|
+
|
|
18
|
+
This maintains backward compatibility with legacy clients while fixing the validation error.
|
|
19
|
+
|
|
20
|
+
Fixes #11412
|
|
21
|
+
|
|
22
|
+
- Add storage composition to MastraStorage ([#11401](https://github.com/mastra-ai/mastra/pull/11401))
|
|
23
|
+
|
|
24
|
+
`MastraStorage` can now compose storage domains from different adapters. Use it when you need different databases for different purposes - for example, PostgreSQL for memory and workflows, but a different database for observability.
|
|
25
|
+
|
|
26
|
+
```typescript
|
|
27
|
+
import { MastraStorage } from '@mastra/core/storage';
|
|
28
|
+
import { MemoryPG, WorkflowsPG, ScoresPG } from '@mastra/pg';
|
|
29
|
+
import { MemoryLibSQL } from '@mastra/libsql';
|
|
30
|
+
|
|
31
|
+
// Compose domains from different stores
|
|
32
|
+
const storage = new MastraStorage({
|
|
33
|
+
id: 'composite',
|
|
34
|
+
domains: {
|
|
35
|
+
memory: new MemoryLibSQL({ url: 'file:./local.db' }),
|
|
36
|
+
workflows: new WorkflowsPG({ connectionString: process.env.DATABASE_URL }),
|
|
37
|
+
scores: new ScoresPG({ connectionString: process.env.DATABASE_URL }),
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
**Breaking changes:**
|
|
43
|
+
- `storage.supports` property no longer exists
|
|
44
|
+
- `StorageSupports` type is no longer exported from `@mastra/core/storage`
|
|
45
|
+
|
|
46
|
+
All stores now support the same features. For domain availability, use `getStore()`:
|
|
47
|
+
|
|
48
|
+
```typescript
|
|
49
|
+
const store = await storage.getStore('memory');
|
|
50
|
+
if (store) {
|
|
51
|
+
// domain is available
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
- Updated dependencies [[`3d93a15`](https://github.com/mastra-ai/mastra/commit/3d93a15796b158c617461c8b98bede476ebb43e2), [`efe406a`](https://github.com/mastra-ai/mastra/commit/efe406a1353c24993280ebc2ed61dd9f65b84b26), [`119e5c6`](https://github.com/mastra-ai/mastra/commit/119e5c65008f3e5cfca954eefc2eb85e3bf40da4), [`74e504a`](https://github.com/mastra-ai/mastra/commit/74e504a3b584eafd2f198001c6a113bbec589fd3), [`e33fdbd`](https://github.com/mastra-ai/mastra/commit/e33fdbd07b33920d81e823122331b0c0bee0bb59), [`929f69c`](https://github.com/mastra-ai/mastra/commit/929f69c3436fa20dd0f0e2f7ebe8270bd82a1529), [`8a73529`](https://github.com/mastra-ai/mastra/commit/8a73529ca01187f604b1f3019d0a725ac63ae55f)]:
|
|
56
|
+
- @mastra/core@1.0.0-beta.16
|
|
57
|
+
|
|
3
58
|
## 1.0.0-beta.15
|
|
4
59
|
|
|
5
60
|
### Minor Changes
|
|
@@ -21263,20 +21263,6 @@ var Memory = class extends memory.MastraMemory {
|
|
|
21263
21263
|
);
|
|
21264
21264
|
}
|
|
21265
21265
|
}
|
|
21266
|
-
checkStorageFeatureSupport(config) {
|
|
21267
|
-
const resourceScope = typeof config.semanticRecall === "object" && config.semanticRecall.scope !== "thread" || // resource scope is now default
|
|
21268
|
-
config.semanticRecall === true;
|
|
21269
|
-
if (resourceScope && !this.storage.supports.selectByIncludeResourceScope) {
|
|
21270
|
-
throw new Error(
|
|
21271
|
-
`Memory error: Attached storage adapter "${this.storage.name || "unknown"}" doesn't support semanticRecall: { scope: "resource" } yet and currently only supports per-thread semantic recall.`
|
|
21272
|
-
);
|
|
21273
|
-
}
|
|
21274
|
-
if (config.workingMemory?.enabled && config.workingMemory.scope === `resource` && !this.storage.supports.resourceWorkingMemory) {
|
|
21275
|
-
throw new Error(
|
|
21276
|
-
`Memory error: Attached storage adapter "${this.storage.name || "unknown"}" doesn't support workingMemory: { scope: "resource" } yet and currently only supports per-thread working memory. Supported adapters: LibSQL, PostgreSQL, Upstash.`
|
|
21277
|
-
);
|
|
21278
|
-
}
|
|
21279
|
-
}
|
|
21280
21266
|
async recall(args) {
|
|
21281
21267
|
const { threadId, resourceId, perPage: perPageArg, page, orderBy, threadConfig, vectorSearchString, filter: filter32 } = args;
|
|
21282
21268
|
const config = this.getMergedThreadConfig(threadConfig || {});
|
|
@@ -21294,7 +21280,6 @@ var Memory = class extends memory.MastraMemory {
|
|
|
21294
21280
|
workingMemoryEnabled: config.workingMemory?.enabled,
|
|
21295
21281
|
semanticRecallEnabled: Boolean(config.semanticRecall)
|
|
21296
21282
|
});
|
|
21297
|
-
this.checkStorageFeatureSupport(config);
|
|
21298
21283
|
const defaultRange = DEFAULT_MESSAGE_RANGE;
|
|
21299
21284
|
const defaultTopK = DEFAULT_TOP_K;
|
|
21300
21285
|
const vectorConfig = typeof config?.semanticRecall === `boolean` ? {
|
|
@@ -21372,7 +21357,6 @@ var Memory = class extends memory.MastraMemory {
|
|
|
21372
21357
|
}) {
|
|
21373
21358
|
const config = this.getMergedThreadConfig(memoryConfig || {});
|
|
21374
21359
|
if (config.workingMemory?.enabled) {
|
|
21375
|
-
this.checkStorageFeatureSupport(config);
|
|
21376
21360
|
const scope = config.workingMemory.scope || "resource";
|
|
21377
21361
|
if (scope === "resource" && resourceId) {
|
|
21378
21362
|
const memoryStore = await this.getMemoryStore();
|
|
@@ -21433,7 +21417,6 @@ var Memory = class extends memory.MastraMemory {
|
|
|
21433
21417
|
if (!config.workingMemory?.enabled) {
|
|
21434
21418
|
throw new Error("Working memory is not enabled for this memory instance");
|
|
21435
21419
|
}
|
|
21436
|
-
this.checkStorageFeatureSupport(config);
|
|
21437
21420
|
const scope = config.workingMemory.scope || "resource";
|
|
21438
21421
|
if (scope === "resource" && !resourceId) {
|
|
21439
21422
|
throw new Error(
|
|
@@ -21476,7 +21459,6 @@ var Memory = class extends memory.MastraMemory {
|
|
|
21476
21459
|
if (!config.workingMemory?.enabled) {
|
|
21477
21460
|
throw new Error("Working memory is not enabled for this memory instance");
|
|
21478
21461
|
}
|
|
21479
|
-
this.checkStorageFeatureSupport(config);
|
|
21480
21462
|
const mutexKey = memoryConfig?.workingMemory?.scope === `resource` ? `resource-${resourceId}` : `thread-${threadId}`;
|
|
21481
21463
|
const mutex = this.updateWorkingMemoryMutexes.has(mutexKey) ? this.updateWorkingMemoryMutexes.get(mutexKey) : new Mutex();
|
|
21482
21464
|
this.updateWorkingMemoryMutexes.set(mutexKey, mutex);
|
|
@@ -21718,7 +21700,6 @@ ${workingMemory}`;
|
|
|
21718
21700
|
if (!config.workingMemory?.enabled) {
|
|
21719
21701
|
return null;
|
|
21720
21702
|
}
|
|
21721
|
-
this.checkStorageFeatureSupport(config);
|
|
21722
21703
|
const scope = config.workingMemory.scope || "resource";
|
|
21723
21704
|
let workingMemoryData = null;
|
|
21724
21705
|
if (scope === "resource" && !resourceId) {
|
|
@@ -23026,7 +23007,7 @@ export const mastra = new Mastra({
|
|
|
23026
23007
|
encoding: z18.z.string(),
|
|
23027
23008
|
lastModified: z18.z.string()
|
|
23028
23009
|
}).optional(),
|
|
23029
|
-
|
|
23010
|
+
errorMessage: z18.z.string().optional()
|
|
23030
23011
|
}),
|
|
23031
23012
|
execute: async (inputData) => {
|
|
23032
23013
|
return await _AgentBuilderDefaults.readFile({ ...inputData, projectPath });
|
|
@@ -23046,7 +23027,7 @@ export const mastra = new Mastra({
|
|
|
23046
23027
|
filePath: z18.z.string(),
|
|
23047
23028
|
bytesWritten: z18.z.number().optional(),
|
|
23048
23029
|
message: z18.z.string(),
|
|
23049
|
-
|
|
23030
|
+
errorMessage: z18.z.string().optional()
|
|
23050
23031
|
}),
|
|
23051
23032
|
execute: async (inputData) => {
|
|
23052
23033
|
return await _AgentBuilderDefaults.writeFile({ ...inputData, projectPath });
|
|
@@ -23078,7 +23059,7 @@ export const mastra = new Mastra({
|
|
|
23078
23059
|
totalItems: z18.z.number(),
|
|
23079
23060
|
path: z18.z.string(),
|
|
23080
23061
|
message: z18.z.string(),
|
|
23081
|
-
|
|
23062
|
+
errorMessage: z18.z.string().optional()
|
|
23082
23063
|
}),
|
|
23083
23064
|
execute: async (inputData) => {
|
|
23084
23065
|
return await _AgentBuilderDefaults.listDirectory({ ...inputData, projectPath });
|
|
@@ -23103,7 +23084,7 @@ export const mastra = new Mastra({
|
|
|
23103
23084
|
command: z18.z.string(),
|
|
23104
23085
|
workingDirectory: z18.z.string().optional(),
|
|
23105
23086
|
executionTime: z18.z.number().optional(),
|
|
23106
|
-
|
|
23087
|
+
errorMessage: z18.z.string().optional()
|
|
23107
23088
|
}),
|
|
23108
23089
|
execute: async (inputData) => {
|
|
23109
23090
|
return await _AgentBuilderDefaults.executeCommand({
|
|
@@ -23204,7 +23185,7 @@ export const mastra = new Mastra({
|
|
|
23204
23185
|
message: z18.z.string(),
|
|
23205
23186
|
linesReplaced: z18.z.number().optional(),
|
|
23206
23187
|
backup: z18.z.string().optional(),
|
|
23207
|
-
|
|
23188
|
+
errorMessage: z18.z.string().optional()
|
|
23208
23189
|
}),
|
|
23209
23190
|
execute: async (inputData) => {
|
|
23210
23191
|
return await _AgentBuilderDefaults.replaceLines({ ...inputData, projectPath });
|
|
@@ -23233,7 +23214,7 @@ export const mastra = new Mastra({
|
|
|
23233
23214
|
),
|
|
23234
23215
|
totalLines: z18.z.number(),
|
|
23235
23216
|
message: z18.z.string(),
|
|
23236
|
-
|
|
23217
|
+
errorMessage: z18.z.string().optional()
|
|
23237
23218
|
}),
|
|
23238
23219
|
execute: async (inputData) => {
|
|
23239
23220
|
return await _AgentBuilderDefaults.showFileLines({ ...inputData, projectPath });
|
|
@@ -23351,7 +23332,7 @@ export const mastra = new Mastra({
|
|
|
23351
23332
|
totalResults: z18.z.number(),
|
|
23352
23333
|
searchTime: z18.z.number(),
|
|
23353
23334
|
suggestions: z18.z.array(z18.z.string()).optional(),
|
|
23354
|
-
|
|
23335
|
+
errorMessage: z18.z.string().optional()
|
|
23355
23336
|
}),
|
|
23356
23337
|
execute: async (inputData) => {
|
|
23357
23338
|
return await _AgentBuilderDefaults.webSearch(inputData);
|
|
@@ -23407,7 +23388,7 @@ export const mastra = new Mastra({
|
|
|
23407
23388
|
warnings: z18.z.array(z18.z.string()).optional(),
|
|
23408
23389
|
message: z18.z.string().optional(),
|
|
23409
23390
|
details: z18.z.string().optional(),
|
|
23410
|
-
|
|
23391
|
+
errorMessage: z18.z.string().optional()
|
|
23411
23392
|
}),
|
|
23412
23393
|
execute: async (inputData) => {
|
|
23413
23394
|
const { action, features, packages } = inputData;
|
|
@@ -23469,7 +23450,7 @@ export const mastra = new Mastra({
|
|
|
23469
23450
|
url: z18.z.string().optional(),
|
|
23470
23451
|
message: z18.z.string().optional(),
|
|
23471
23452
|
stdout: z18.z.array(z18.z.string()).optional().describe("Server output lines captured during startup"),
|
|
23472
|
-
|
|
23453
|
+
errorMessage: z18.z.string().optional()
|
|
23473
23454
|
}),
|
|
23474
23455
|
execute: async (inputData) => {
|
|
23475
23456
|
const { action, port } = inputData;
|
|
@@ -23495,7 +23476,7 @@ export const mastra = new Mastra({
|
|
|
23495
23476
|
success: false,
|
|
23496
23477
|
status: "unknown",
|
|
23497
23478
|
message: `Failed to restart: could not stop server on port ${port}`,
|
|
23498
|
-
|
|
23479
|
+
errorMessage: stopResult.errorMessage || "Unknown stop error"
|
|
23499
23480
|
};
|
|
23500
23481
|
}
|
|
23501
23482
|
await new Promise((resolve5) => setTimeout(resolve5, 500));
|
|
@@ -23508,7 +23489,7 @@ export const mastra = new Mastra({
|
|
|
23508
23489
|
success: false,
|
|
23509
23490
|
status: "stopped",
|
|
23510
23491
|
message: `Failed to restart: server stopped successfully but failed to start on port ${port}`,
|
|
23511
|
-
|
|
23492
|
+
errorMessage: startResult.errorMessage || "Unknown start error"
|
|
23512
23493
|
};
|
|
23513
23494
|
}
|
|
23514
23495
|
return {
|
|
@@ -23553,7 +23534,7 @@ export const mastra = new Mastra({
|
|
|
23553
23534
|
statusText: z18.z.string().optional(),
|
|
23554
23535
|
headers: z18.z.record(z18.z.string()).optional(),
|
|
23555
23536
|
data: z18.z.any().optional(),
|
|
23556
|
-
|
|
23537
|
+
errorMessage: z18.z.string().optional(),
|
|
23557
23538
|
url: z18.z.string(),
|
|
23558
23539
|
method: z18.z.string()
|
|
23559
23540
|
}),
|
|
@@ -23573,7 +23554,7 @@ export const mastra = new Mastra({
|
|
|
23573
23554
|
success: false,
|
|
23574
23555
|
url: baseUrl ? `${baseUrl}${url}` : url,
|
|
23575
23556
|
method,
|
|
23576
|
-
|
|
23557
|
+
errorMessage: error instanceof Error ? error.message : String(error)
|
|
23577
23558
|
};
|
|
23578
23559
|
}
|
|
23579
23560
|
}
|
|
@@ -23637,7 +23618,7 @@ export const mastra = new Mastra({
|
|
|
23637
23618
|
projectPath: `./${projectName}`,
|
|
23638
23619
|
message: `Successfully created Mastra project: ${projectName}.`,
|
|
23639
23620
|
details: stdout,
|
|
23640
|
-
|
|
23621
|
+
errorMessage: stderr
|
|
23641
23622
|
};
|
|
23642
23623
|
} catch (error) {
|
|
23643
23624
|
console.error(error);
|
|
@@ -23765,7 +23746,7 @@ export const mastra = new Mastra({
|
|
|
23765
23746
|
return {
|
|
23766
23747
|
success: false,
|
|
23767
23748
|
status: "stopped",
|
|
23768
|
-
|
|
23749
|
+
errorMessage: error instanceof Error ? error.message : String(error)
|
|
23769
23750
|
};
|
|
23770
23751
|
}
|
|
23771
23752
|
}
|
|
@@ -23777,7 +23758,7 @@ export const mastra = new Mastra({
|
|
|
23777
23758
|
return {
|
|
23778
23759
|
success: false,
|
|
23779
23760
|
status: "error",
|
|
23780
|
-
|
|
23761
|
+
errorMessage: `Invalid port value: ${String(port)}`
|
|
23781
23762
|
};
|
|
23782
23763
|
}
|
|
23783
23764
|
try {
|
|
@@ -23809,7 +23790,7 @@ export const mastra = new Mastra({
|
|
|
23809
23790
|
success: false,
|
|
23810
23791
|
status: "unknown",
|
|
23811
23792
|
message: `Failed to stop any processes on port ${port}`,
|
|
23812
|
-
|
|
23793
|
+
errorMessage: `Could not kill PIDs: ${failedPids.join(", ")}`
|
|
23813
23794
|
};
|
|
23814
23795
|
}
|
|
23815
23796
|
if (failedPids.length > 0) {
|
|
@@ -23840,7 +23821,7 @@ export const mastra = new Mastra({
|
|
|
23840
23821
|
success: false,
|
|
23841
23822
|
status: "unknown",
|
|
23842
23823
|
message: `Server processes still running on port ${port} after stop attempts`,
|
|
23843
|
-
|
|
23824
|
+
errorMessage: `Remaining PIDs: ${finalCheck.trim()}`
|
|
23844
23825
|
};
|
|
23845
23826
|
}
|
|
23846
23827
|
}
|
|
@@ -23856,7 +23837,7 @@ export const mastra = new Mastra({
|
|
|
23856
23837
|
return {
|
|
23857
23838
|
success: false,
|
|
23858
23839
|
status: "unknown",
|
|
23859
|
-
|
|
23840
|
+
errorMessage: error instanceof Error ? error.message : String(error)
|
|
23860
23841
|
};
|
|
23861
23842
|
}
|
|
23862
23843
|
}
|
|
@@ -24339,7 +24320,7 @@ export const mastra = new Mastra({
|
|
|
24339
24320
|
success: false,
|
|
24340
24321
|
url: baseUrl ? `${baseUrl}${url}` : url,
|
|
24341
24322
|
method,
|
|
24342
|
-
|
|
24323
|
+
errorMessage: error instanceof Error ? error.message : String(error)
|
|
24343
24324
|
};
|
|
24344
24325
|
}
|
|
24345
24326
|
}
|
|
@@ -24522,21 +24503,21 @@ export const mastra = new Mastra({
|
|
|
24522
24503
|
return {
|
|
24523
24504
|
success: false,
|
|
24524
24505
|
message: `Line numbers must be 1 or greater. Got startLine: ${startLine}, endLine: ${endLine}`,
|
|
24525
|
-
|
|
24506
|
+
errorMessage: "Invalid line range"
|
|
24526
24507
|
};
|
|
24527
24508
|
}
|
|
24528
24509
|
if (startLine > lines.length || endLine > lines.length) {
|
|
24529
24510
|
return {
|
|
24530
24511
|
success: false,
|
|
24531
24512
|
message: `Line range ${startLine}-${endLine} is out of bounds. File has ${lines.length} lines. Remember: lines are 1-indexed, so valid range is 1-${lines.length}.`,
|
|
24532
|
-
|
|
24513
|
+
errorMessage: "Invalid line range"
|
|
24533
24514
|
};
|
|
24534
24515
|
}
|
|
24535
24516
|
if (startLine > endLine) {
|
|
24536
24517
|
return {
|
|
24537
24518
|
success: false,
|
|
24538
24519
|
message: `Start line (${startLine}) cannot be greater than end line (${endLine}).`,
|
|
24539
|
-
|
|
24520
|
+
errorMessage: "Invalid line range"
|
|
24540
24521
|
};
|
|
24541
24522
|
}
|
|
24542
24523
|
let backup;
|
|
@@ -24563,7 +24544,7 @@ export const mastra = new Mastra({
|
|
|
24563
24544
|
return {
|
|
24564
24545
|
success: false,
|
|
24565
24546
|
message: `Failed to replace lines: ${error instanceof Error ? error.message : String(error)}`,
|
|
24566
|
-
|
|
24547
|
+
errorMessage: error instanceof Error ? error.message : String(error)
|
|
24567
24548
|
};
|
|
24568
24549
|
}
|
|
24569
24550
|
}
|
|
@@ -24608,7 +24589,7 @@ export const mastra = new Mastra({
|
|
|
24608
24589
|
lines: [],
|
|
24609
24590
|
totalLines: 0,
|
|
24610
24591
|
message: `Failed to read file: ${error instanceof Error ? error.message : String(error)}`,
|
|
24611
|
-
|
|
24592
|
+
errorMessage: error instanceof Error ? error.message : String(error)
|
|
24612
24593
|
};
|
|
24613
24594
|
}
|
|
24614
24595
|
}
|
|
@@ -24758,7 +24739,7 @@ export const mastra = new Mastra({
|
|
|
24758
24739
|
} catch (error) {
|
|
24759
24740
|
return {
|
|
24760
24741
|
success: false,
|
|
24761
|
-
|
|
24742
|
+
errorMessage: error instanceof Error ? error.message : String(error)
|
|
24762
24743
|
};
|
|
24763
24744
|
}
|
|
24764
24745
|
}
|
|
@@ -24785,7 +24766,7 @@ export const mastra = new Mastra({
|
|
|
24785
24766
|
success: false,
|
|
24786
24767
|
filePath: context.filePath,
|
|
24787
24768
|
message: `Failed to write file: ${error instanceof Error ? error.message : String(error)}`,
|
|
24788
|
-
|
|
24769
|
+
errorMessage: error instanceof Error ? error.message : String(error)
|
|
24789
24770
|
};
|
|
24790
24771
|
}
|
|
24791
24772
|
}
|
|
@@ -24876,7 +24857,7 @@ export const mastra = new Mastra({
|
|
|
24876
24857
|
totalItems: 0,
|
|
24877
24858
|
path: context.path,
|
|
24878
24859
|
message: `Failed to list directory: ${error instanceof Error ? error.message : String(error)}`,
|
|
24879
|
-
|
|
24860
|
+
errorMessage: error instanceof Error ? error.message : String(error)
|
|
24880
24861
|
};
|
|
24881
24862
|
}
|
|
24882
24863
|
}
|
|
@@ -24918,7 +24899,7 @@ export const mastra = new Mastra({
|
|
|
24918
24899
|
command: context.command,
|
|
24919
24900
|
workingDirectory: context.workingDirectory,
|
|
24920
24901
|
executionTime,
|
|
24921
|
-
|
|
24902
|
+
errorMessage: error instanceof Error ? error.message : String(error)
|
|
24922
24903
|
};
|
|
24923
24904
|
}
|
|
24924
24905
|
}
|
|
@@ -24981,7 +24962,7 @@ export const mastra = new Mastra({
|
|
|
24981
24962
|
results: [],
|
|
24982
24963
|
totalResults: 0,
|
|
24983
24964
|
searchTime: 0,
|
|
24984
|
-
|
|
24965
|
+
errorMessage: error instanceof Error ? error.message : String(error)
|
|
24985
24966
|
};
|
|
24986
24967
|
}
|
|
24987
24968
|
}
|
|
@@ -25975,7 +25956,7 @@ var intelligentMergeStep = workflows.createStep({
|
|
|
25975
25956
|
outputSchema: z18.z.object({
|
|
25976
25957
|
success: z18.z.boolean(),
|
|
25977
25958
|
message: z18.z.string(),
|
|
25978
|
-
|
|
25959
|
+
errorMessage: z18.z.string().optional()
|
|
25979
25960
|
}),
|
|
25980
25961
|
execute: async (input) => {
|
|
25981
25962
|
try {
|
|
@@ -25990,11 +25971,11 @@ var intelligentMergeStep = workflows.createStep({
|
|
|
25990
25971
|
success: true,
|
|
25991
25972
|
message: `Successfully copied file from ${sourcePath} to ${destinationPath}`
|
|
25992
25973
|
};
|
|
25993
|
-
} catch (
|
|
25974
|
+
} catch (err) {
|
|
25994
25975
|
return {
|
|
25995
25976
|
success: false,
|
|
25996
|
-
message: `Failed to copy file: ${
|
|
25997
|
-
|
|
25977
|
+
message: `Failed to copy file: ${err instanceof Error ? err.message : String(err)}`,
|
|
25978
|
+
errorMessage: err instanceof Error ? err.message : String(err)
|
|
25998
25979
|
};
|
|
25999
25980
|
}
|
|
26000
25981
|
}
|
|
@@ -32906,5 +32887,5 @@ exports.STREAM_AGENT_BUILDER_ACTION_ROUTE = STREAM_AGENT_BUILDER_ACTION_ROUTE;
|
|
|
32906
32887
|
exports.STREAM_LEGACY_AGENT_BUILDER_ACTION_ROUTE = STREAM_LEGACY_AGENT_BUILDER_ACTION_ROUTE;
|
|
32907
32888
|
exports.STREAM_VNEXT_AGENT_BUILDER_ACTION_ROUTE = STREAM_VNEXT_AGENT_BUILDER_ACTION_ROUTE;
|
|
32908
32889
|
exports.agent_builder_exports = agent_builder_exports;
|
|
32909
|
-
//# sourceMappingURL=chunk-
|
|
32910
|
-
//# sourceMappingURL=chunk-
|
|
32890
|
+
//# sourceMappingURL=chunk-6RQUU6C6.cjs.map
|
|
32891
|
+
//# sourceMappingURL=chunk-6RQUU6C6.cjs.map
|