@mastra/core 0.9.0 → 0.9.1-alpha.1
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/agent/index.cjs +2 -2
- package/dist/agent/index.d.cts +4 -2
- package/dist/agent/index.d.ts +4 -2
- package/dist/agent/index.js +1 -1
- package/dist/{base-oP3DoUrm.d.cts → base-CZmT-p10.d.cts} +524 -53
- package/dist/{base-Bk5V1doj.d.ts → base-DDoWFpFc.d.ts} +524 -53
- package/dist/{chunk-NTHHPNOW.js → chunk-34622N67.js} +1 -1
- package/dist/{chunk-ATXF6TIO.cjs → chunk-422BXQRT.cjs} +24 -677
- package/dist/{chunk-HARYMLZH.js → chunk-4K4DHXRF.js} +6 -658
- package/dist/{chunk-N2ONCUUS.js → chunk-6AHC67YY.js} +132 -12
- package/dist/chunk-7AGAXO6B.cjs +588 -0
- package/dist/{chunk-GEIPVIW4.js → chunk-BFF2O6RO.js} +1 -1
- package/dist/{chunk-RASVJ3TR.js → chunk-BU45BMXY.js} +55 -1
- package/dist/{chunk-DIZZQ3E5.cjs → chunk-CEXM6WP5.cjs} +2 -2
- package/dist/chunk-HNEE7IF4.js +60 -0
- package/dist/{chunk-NZDXKMDP.cjs → chunk-LABUWBKX.cjs} +1 -1
- package/dist/chunk-MUNFCOMB.cjs +62 -0
- package/dist/{chunk-GJWCFDFN.js → chunk-PS2ZF6MA.js} +1 -1
- package/dist/{chunk-M472GIT6.js → chunk-SGGPJWRQ.js} +1 -1
- package/dist/{chunk-7CSNWYGJ.cjs → chunk-U5DGGGS2.cjs} +2 -2
- package/dist/{chunk-W5IA5OGL.cjs → chunk-V7IE36YV.cjs} +58 -4
- package/dist/chunk-VMVXIPGW.js +586 -0
- package/dist/{chunk-53P5ZBJE.cjs → chunk-YTTBFAQJ.cjs} +2 -2
- package/dist/{chunk-KZWBYRXW.cjs → chunk-YZFNMXY4.cjs} +135 -14
- package/dist/di/index.cjs +2 -2
- package/dist/di/index.d.cts +1 -52
- package/dist/di/index.d.ts +1 -52
- package/dist/di/index.js +1 -1
- package/dist/eval/index.d.cts +4 -2
- package/dist/eval/index.d.ts +4 -2
- package/dist/index.cjs +60 -55
- package/dist/index.d.cts +5 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.js +10 -9
- package/dist/integration/index.cjs +3 -3
- package/dist/integration/index.d.cts +4 -2
- package/dist/integration/index.d.ts +4 -2
- package/dist/integration/index.js +1 -1
- package/dist/llm/index.cjs +8 -0
- package/dist/llm/index.d.cts +4 -2
- package/dist/llm/index.d.ts +4 -2
- package/dist/llm/index.js +1 -1
- package/dist/mastra/index.cjs +2 -2
- package/dist/mastra/index.d.cts +4 -2
- package/dist/mastra/index.d.ts +4 -2
- package/dist/mastra/index.js +1 -1
- package/dist/memory/index.cjs +7 -3
- package/dist/memory/index.d.cts +4 -2
- package/dist/memory/index.d.ts +4 -2
- package/dist/memory/index.js +1 -1
- package/dist/network/index.cjs +4 -4
- package/dist/network/index.d.cts +4 -2
- package/dist/network/index.d.ts +4 -2
- package/dist/network/index.js +2 -2
- package/dist/relevance/index.cjs +4 -4
- package/dist/relevance/index.d.cts +4 -2
- package/dist/relevance/index.d.ts +4 -2
- package/dist/relevance/index.js +1 -1
- package/dist/runtime-context/index.cjs +7 -68
- package/dist/runtime-context/index.js +1 -69
- package/dist/server/index.d.cts +4 -2
- package/dist/server/index.d.ts +4 -2
- package/dist/storage/index.d.cts +4 -2
- package/dist/storage/index.d.ts +4 -2
- package/dist/storage/libsql/index.cjs +19 -0
- package/dist/storage/libsql/index.d.cts +7 -8
- package/dist/storage/libsql/index.d.ts +7 -8
- package/dist/storage/libsql/index.js +19 -0
- package/dist/telemetry/index.d.cts +4 -2
- package/dist/telemetry/index.d.ts +4 -2
- package/dist/tools/index.cjs +4 -4
- package/dist/tools/index.d.cts +4 -2
- package/dist/tools/index.d.ts +4 -2
- package/dist/tools/index.js +1 -1
- package/dist/utils.cjs +14 -14
- package/dist/utils.d.cts +6 -4
- package/dist/utils.d.ts +6 -4
- package/dist/utils.js +1 -1
- package/dist/voice/index.d.cts +5 -3
- package/dist/voice/index.d.ts +5 -3
- package/dist/workflows/index.cjs +22 -26
- package/dist/workflows/index.d.cts +5 -3
- package/dist/workflows/index.d.ts +5 -3
- package/dist/workflows/index.js +1 -1
- package/dist/workflows/vNext/index.cjs +1058 -0
- package/dist/workflows/vNext/index.d.cts +180 -0
- package/dist/workflows/vNext/index.d.ts +180 -0
- package/dist/workflows/vNext/index.js +1046 -0
- package/package.json +11 -1
- package/workflows/vNext.d.ts +1 -0
- /package/dist/{chunk-WEYWYKLG.cjs → chunk-27PAET7X.cjs} +0 -0
- /package/dist/{chunk-FRQFWZDN.cjs → chunk-HSVOEWAM.cjs} +0 -0
- /package/dist/{chunk-ZDWFBE5L.js → chunk-NH5WJNNS.js} +0 -0
- /package/dist/{chunk-LANFNMEE.js → chunk-SGTFVHOZ.js} +0 -0
package/dist/memory/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { H as MastraMemory, an as MemoryConfig, aq as MemoryProcessor, ap as MemoryProcessorOpts, am as MessageResponse, g as MessageType, ao as SharedMemoryConfig, f as StorageThreadType, ar as memoryDefaultOptions } from '../base-CZmT-p10.cjs';
|
|
2
2
|
export { Message as AiMessageType } from 'ai';
|
|
3
3
|
import '../base-BihKcqDY.cjs';
|
|
4
4
|
import '@opentelemetry/api';
|
|
@@ -10,14 +10,16 @@ import '../types-BtMyV38I.cjs';
|
|
|
10
10
|
import 'sift';
|
|
11
11
|
import 'zod';
|
|
12
12
|
import 'json-schema';
|
|
13
|
-
import '../
|
|
13
|
+
import '../runtime-context/index.cjs';
|
|
14
14
|
import 'xstate';
|
|
15
15
|
import 'node:events';
|
|
16
16
|
import '../vector/index.cjs';
|
|
17
17
|
import '../vector/filter/index.cjs';
|
|
18
18
|
import '../tts/index.cjs';
|
|
19
|
+
import 'events';
|
|
19
20
|
import '../deployer/index.cjs';
|
|
20
21
|
import '../bundler/index.cjs';
|
|
21
22
|
import 'hono';
|
|
22
23
|
import 'hono/cors';
|
|
23
24
|
import 'hono-openapi';
|
|
25
|
+
import 'ai/test';
|
package/dist/memory/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { H as MastraMemory, an as MemoryConfig, aq as MemoryProcessor, ap as MemoryProcessorOpts, am as MessageResponse, g as MessageType, ao as SharedMemoryConfig, f as StorageThreadType, ar as memoryDefaultOptions } from '../base-DDoWFpFc.js';
|
|
2
2
|
export { Message as AiMessageType } from 'ai';
|
|
3
3
|
import '../base-DT2poiVK.js';
|
|
4
4
|
import '@opentelemetry/api';
|
|
@@ -10,14 +10,16 @@ import '../types-BtMyV38I.js';
|
|
|
10
10
|
import 'sift';
|
|
11
11
|
import 'zod';
|
|
12
12
|
import 'json-schema';
|
|
13
|
-
import '../
|
|
13
|
+
import '../runtime-context/index.js';
|
|
14
14
|
import 'xstate';
|
|
15
15
|
import 'node:events';
|
|
16
16
|
import '../vector/index.js';
|
|
17
17
|
import '../vector/filter/index.js';
|
|
18
18
|
import '../tts/index.js';
|
|
19
|
+
import 'events';
|
|
19
20
|
import '../deployer/index.js';
|
|
20
21
|
import '../bundler/index.js';
|
|
21
22
|
import 'hono';
|
|
22
23
|
import 'hono/cors';
|
|
23
24
|
import 'hono-openapi';
|
|
25
|
+
import 'ai/test';
|
package/dist/memory/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { MastraMemory, MemoryProcessor } from '../chunk-
|
|
1
|
+
export { MastraMemory, MemoryProcessor, memoryDefaultOptions } from '../chunk-6AHC67YY.js';
|
package/dist/network/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunk422BXQRT_cjs = require('../chunk-422BXQRT.cjs');
|
|
4
|
+
var chunkYTTBFAQJ_cjs = require('../chunk-YTTBFAQJ.cjs');
|
|
5
5
|
var chunkD63P5O4Q_cjs = require('../chunk-D63P5O4Q.cjs');
|
|
6
6
|
var chunkO7IW545H_cjs = require('../chunk-O7IW545H.cjs');
|
|
7
7
|
var zod = require('zod');
|
|
@@ -17,7 +17,7 @@ var AgentNetwork = class extends chunkD63P5O4Q_cjs.MastraBase {
|
|
|
17
17
|
this.#instructions = config.instructions;
|
|
18
18
|
this.#agents = config.agents;
|
|
19
19
|
this.#model = config.model;
|
|
20
|
-
this.#routingAgent = new
|
|
20
|
+
this.#routingAgent = new chunk422BXQRT_cjs.Agent({
|
|
21
21
|
name: config.name,
|
|
22
22
|
instructions: this.getInstructions(),
|
|
23
23
|
model: this.#model,
|
|
@@ -29,7 +29,7 @@ var AgentNetwork = class extends chunkD63P5O4Q_cjs.MastraBase {
|
|
|
29
29
|
}
|
|
30
30
|
getTools() {
|
|
31
31
|
return {
|
|
32
|
-
transmit:
|
|
32
|
+
transmit: chunkYTTBFAQJ_cjs.createTool({
|
|
33
33
|
id: "transmit",
|
|
34
34
|
description: "Call one or more specialized agents to handle specific tasks",
|
|
35
35
|
inputSchema: zod.z.object({
|
package/dist/network/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { b5 as AgentNetwork, b6 as AgentNetworkConfig } from '../base-CZmT-p10.cjs';
|
|
2
2
|
import 'ai';
|
|
3
3
|
import '../base-BihKcqDY.cjs';
|
|
4
4
|
import '@opentelemetry/api';
|
|
@@ -10,14 +10,16 @@ import '../types-BtMyV38I.cjs';
|
|
|
10
10
|
import 'sift';
|
|
11
11
|
import 'zod';
|
|
12
12
|
import 'json-schema';
|
|
13
|
-
import '../
|
|
13
|
+
import '../runtime-context/index.cjs';
|
|
14
14
|
import 'xstate';
|
|
15
15
|
import 'node:events';
|
|
16
16
|
import '../vector/index.cjs';
|
|
17
17
|
import '../vector/filter/index.cjs';
|
|
18
18
|
import '../tts/index.cjs';
|
|
19
|
+
import 'events';
|
|
19
20
|
import '../deployer/index.cjs';
|
|
20
21
|
import '../bundler/index.cjs';
|
|
21
22
|
import 'hono';
|
|
22
23
|
import 'hono/cors';
|
|
23
24
|
import 'hono-openapi';
|
|
25
|
+
import 'ai/test';
|
package/dist/network/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { b5 as AgentNetwork, b6 as AgentNetworkConfig } from '../base-DDoWFpFc.js';
|
|
2
2
|
import 'ai';
|
|
3
3
|
import '../base-DT2poiVK.js';
|
|
4
4
|
import '@opentelemetry/api';
|
|
@@ -10,14 +10,16 @@ import '../types-BtMyV38I.js';
|
|
|
10
10
|
import 'sift';
|
|
11
11
|
import 'zod';
|
|
12
12
|
import 'json-schema';
|
|
13
|
-
import '../
|
|
13
|
+
import '../runtime-context/index.js';
|
|
14
14
|
import 'xstate';
|
|
15
15
|
import 'node:events';
|
|
16
16
|
import '../vector/index.js';
|
|
17
17
|
import '../vector/filter/index.js';
|
|
18
18
|
import '../tts/index.js';
|
|
19
|
+
import 'events';
|
|
19
20
|
import '../deployer/index.js';
|
|
20
21
|
import '../bundler/index.js';
|
|
21
22
|
import 'hono';
|
|
22
23
|
import 'hono/cors';
|
|
23
24
|
import 'hono-openapi';
|
|
25
|
+
import 'ai/test';
|
package/dist/network/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Agent } from '../chunk-
|
|
2
|
-
import { createTool } from '../chunk-
|
|
1
|
+
import { Agent } from '../chunk-4K4DHXRF.js';
|
|
2
|
+
import { createTool } from '../chunk-34622N67.js';
|
|
3
3
|
import { MastraBase } from '../chunk-CLJQYXNM.js';
|
|
4
4
|
import { RegisteredLogger } from '../chunk-2BVZNKLX.js';
|
|
5
5
|
import { z } from 'zod';
|
package/dist/relevance/index.cjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkCEXM6WP5_cjs = require('../chunk-CEXM6WP5.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "CohereRelevanceScorer", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkCEXM6WP5_cjs.CohereRelevanceScorer; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "MastraAgentRelevanceScorer", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkCEXM6WP5_cjs.MastraAgentRelevanceScorer; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "createSimilarityPrompt", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkCEXM6WP5_cjs.createSimilarityPrompt; }
|
|
18
18
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '../base-BihKcqDY.cjs';
|
|
2
|
-
import {
|
|
2
|
+
import { b2 as MastraLanguageModel } from '../base-CZmT-p10.cjs';
|
|
3
3
|
import '@opentelemetry/api';
|
|
4
4
|
import '../index-CquI0inB.cjs';
|
|
5
5
|
import 'stream';
|
|
@@ -10,17 +10,19 @@ import '../types-BtMyV38I.cjs';
|
|
|
10
10
|
import 'sift';
|
|
11
11
|
import 'zod';
|
|
12
12
|
import 'json-schema';
|
|
13
|
-
import '../
|
|
13
|
+
import '../runtime-context/index.cjs';
|
|
14
14
|
import 'xstate';
|
|
15
15
|
import 'node:events';
|
|
16
16
|
import '../vector/index.cjs';
|
|
17
17
|
import '../vector/filter/index.cjs';
|
|
18
18
|
import '../tts/index.cjs';
|
|
19
|
+
import 'events';
|
|
19
20
|
import '../deployer/index.cjs';
|
|
20
21
|
import '../bundler/index.cjs';
|
|
21
22
|
import 'hono';
|
|
22
23
|
import 'hono/cors';
|
|
23
24
|
import 'hono-openapi';
|
|
25
|
+
import 'ai/test';
|
|
24
26
|
|
|
25
27
|
interface RelevanceScoreProvider {
|
|
26
28
|
getRelevanceScore(text1: string, text2: string): Promise<number>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '../base-DT2poiVK.js';
|
|
2
|
-
import {
|
|
2
|
+
import { b2 as MastraLanguageModel } from '../base-DDoWFpFc.js';
|
|
3
3
|
import '@opentelemetry/api';
|
|
4
4
|
import '../index-CquI0inB.js';
|
|
5
5
|
import 'stream';
|
|
@@ -10,17 +10,19 @@ import '../types-BtMyV38I.js';
|
|
|
10
10
|
import 'sift';
|
|
11
11
|
import 'zod';
|
|
12
12
|
import 'json-schema';
|
|
13
|
-
import '../
|
|
13
|
+
import '../runtime-context/index.js';
|
|
14
14
|
import 'xstate';
|
|
15
15
|
import 'node:events';
|
|
16
16
|
import '../vector/index.js';
|
|
17
17
|
import '../vector/filter/index.js';
|
|
18
18
|
import '../tts/index.js';
|
|
19
|
+
import 'events';
|
|
19
20
|
import '../deployer/index.js';
|
|
20
21
|
import '../bundler/index.js';
|
|
21
22
|
import 'hono';
|
|
22
23
|
import 'hono/cors';
|
|
23
24
|
import 'hono-openapi';
|
|
25
|
+
import 'ai/test';
|
|
24
26
|
|
|
25
27
|
interface RelevanceScoreProvider {
|
|
26
28
|
getRelevanceScore(text1: string, text2: string): Promise<number>;
|
package/dist/relevance/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { CohereRelevanceScorer, MastraAgentRelevanceScorer, createSimilarityPrompt } from '../chunk-
|
|
1
|
+
export { CohereRelevanceScorer, MastraAgentRelevanceScorer, createSimilarityPrompt } from '../chunk-PS2ZF6MA.js';
|
|
@@ -1,71 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
var RuntimeContext = class {
|
|
5
|
-
registry = /* @__PURE__ */ new Map();
|
|
6
|
-
constructor(iterable) {
|
|
7
|
-
this.registry = new Map(iterable);
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* set a value with strict typing if `Values` is a Record and the key exists in it.
|
|
11
|
-
*/
|
|
12
|
-
set(key, value) {
|
|
13
|
-
this.registry.set(key, value);
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Get a value with its type
|
|
17
|
-
*/
|
|
18
|
-
get(key) {
|
|
19
|
-
return this.registry.get(key);
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Check if a key exists in the container
|
|
23
|
-
*/
|
|
24
|
-
has(key) {
|
|
25
|
-
return this.registry.has(key);
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Delete a value by key
|
|
29
|
-
*/
|
|
30
|
-
delete(key) {
|
|
31
|
-
return this.registry.delete(key);
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Clear all values from the container
|
|
35
|
-
*/
|
|
36
|
-
clear() {
|
|
37
|
-
this.registry.clear();
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Get all keys in the container
|
|
41
|
-
*/
|
|
42
|
-
keys() {
|
|
43
|
-
return this.registry.keys();
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Get all values in the container
|
|
47
|
-
*/
|
|
48
|
-
values() {
|
|
49
|
-
return this.registry.values();
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Get all entries in the container
|
|
53
|
-
*/
|
|
54
|
-
entries() {
|
|
55
|
-
return this.registry.entries();
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Get the size of the container
|
|
59
|
-
*/
|
|
60
|
-
size() {
|
|
61
|
-
return this.registry.size;
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Execute a function for each entry in the container
|
|
65
|
-
*/
|
|
66
|
-
forEach(callbackfn) {
|
|
67
|
-
this.registry.forEach(callbackfn);
|
|
68
|
-
}
|
|
69
|
-
};
|
|
3
|
+
var chunkLABUWBKX_cjs = require('../chunk-LABUWBKX.cjs');
|
|
70
4
|
|
|
71
|
-
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "RuntimeContext", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () { return chunkLABUWBKX_cjs.RuntimeContext; }
|
|
10
|
+
});
|
|
@@ -1,69 +1 @@
|
|
|
1
|
-
|
|
2
|
-
var RuntimeContext = class {
|
|
3
|
-
registry = /* @__PURE__ */ new Map();
|
|
4
|
-
constructor(iterable) {
|
|
5
|
-
this.registry = new Map(iterable);
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* set a value with strict typing if `Values` is a Record and the key exists in it.
|
|
9
|
-
*/
|
|
10
|
-
set(key, value) {
|
|
11
|
-
this.registry.set(key, value);
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Get a value with its type
|
|
15
|
-
*/
|
|
16
|
-
get(key) {
|
|
17
|
-
return this.registry.get(key);
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Check if a key exists in the container
|
|
21
|
-
*/
|
|
22
|
-
has(key) {
|
|
23
|
-
return this.registry.has(key);
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Delete a value by key
|
|
27
|
-
*/
|
|
28
|
-
delete(key) {
|
|
29
|
-
return this.registry.delete(key);
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Clear all values from the container
|
|
33
|
-
*/
|
|
34
|
-
clear() {
|
|
35
|
-
this.registry.clear();
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Get all keys in the container
|
|
39
|
-
*/
|
|
40
|
-
keys() {
|
|
41
|
-
return this.registry.keys();
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Get all values in the container
|
|
45
|
-
*/
|
|
46
|
-
values() {
|
|
47
|
-
return this.registry.values();
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Get all entries in the container
|
|
51
|
-
*/
|
|
52
|
-
entries() {
|
|
53
|
-
return this.registry.entries();
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Get the size of the container
|
|
57
|
-
*/
|
|
58
|
-
size() {
|
|
59
|
-
return this.registry.size;
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Execute a function for each entry in the container
|
|
63
|
-
*/
|
|
64
|
-
forEach(callbackfn) {
|
|
65
|
-
this.registry.forEach(callbackfn);
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
export { RuntimeContext };
|
|
1
|
+
export { RuntimeContext } from '../chunk-SGGPJWRQ.js';
|
package/dist/server/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Handler, MiddlewareHandler } from 'hono';
|
|
2
2
|
import { DescribeRouteOptions } from 'hono-openapi';
|
|
3
|
-
import { M as Methods, a as Mastra, A as ApiRoute } from '../base-
|
|
3
|
+
import { M as Methods, a as Mastra, A as ApiRoute } from '../base-CZmT-p10.cjs';
|
|
4
4
|
import 'ai';
|
|
5
5
|
import '../base-BihKcqDY.cjs';
|
|
6
6
|
import '@opentelemetry/api';
|
|
@@ -12,15 +12,17 @@ import '../types-BtMyV38I.cjs';
|
|
|
12
12
|
import 'sift';
|
|
13
13
|
import 'zod';
|
|
14
14
|
import 'json-schema';
|
|
15
|
-
import '../
|
|
15
|
+
import '../runtime-context/index.cjs';
|
|
16
16
|
import 'xstate';
|
|
17
17
|
import 'node:events';
|
|
18
18
|
import '../vector/index.cjs';
|
|
19
19
|
import '../vector/filter/index.cjs';
|
|
20
20
|
import '../tts/index.cjs';
|
|
21
|
+
import 'events';
|
|
21
22
|
import '../deployer/index.cjs';
|
|
22
23
|
import '../bundler/index.cjs';
|
|
23
24
|
import 'hono/cors';
|
|
25
|
+
import 'ai/test';
|
|
24
26
|
|
|
25
27
|
type ParamsFromPath<P extends string> = {
|
|
26
28
|
[K in P extends `${string}:${infer Param}/${string}` | `${string}:${infer Param}` ? Param : never]: string;
|
package/dist/server/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Handler, MiddlewareHandler } from 'hono';
|
|
2
2
|
import { DescribeRouteOptions } from 'hono-openapi';
|
|
3
|
-
import { M as Methods, a as Mastra, A as ApiRoute } from '../base-
|
|
3
|
+
import { M as Methods, a as Mastra, A as ApiRoute } from '../base-DDoWFpFc.js';
|
|
4
4
|
import 'ai';
|
|
5
5
|
import '../base-DT2poiVK.js';
|
|
6
6
|
import '@opentelemetry/api';
|
|
@@ -12,15 +12,17 @@ import '../types-BtMyV38I.js';
|
|
|
12
12
|
import 'sift';
|
|
13
13
|
import 'zod';
|
|
14
14
|
import 'json-schema';
|
|
15
|
-
import '../
|
|
15
|
+
import '../runtime-context/index.js';
|
|
16
16
|
import 'xstate';
|
|
17
17
|
import 'node:events';
|
|
18
18
|
import '../vector/index.js';
|
|
19
19
|
import '../vector/filter/index.js';
|
|
20
20
|
import '../tts/index.js';
|
|
21
|
+
import 'events';
|
|
21
22
|
import '../deployer/index.js';
|
|
22
23
|
import '../bundler/index.js';
|
|
23
24
|
import 'hono/cors';
|
|
25
|
+
import 'ai/test';
|
|
24
26
|
|
|
25
27
|
type ParamsFromPath<P extends string> = {
|
|
26
28
|
[K in P extends `${string}:${infer Param}/${string}` | `${string}:${infer Param}` ? Param : never]: string;
|
package/dist/storage/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { E as EvalRow, e as MastraStorage, S as StorageColumn, h as StorageGetMessagesArg,
|
|
1
|
+
export { E as EvalRow, e as MastraStorage, S as StorageColumn, h as StorageGetMessagesArg, bb as TABLE_EVALS, bc as TABLE_MESSAGES, T as TABLE_NAMES, bf as TABLE_SCHEMAS, bd as TABLE_THREADS, be as TABLE_TRACES, ba as TABLE_WORKFLOW_SNAPSHOT, Q as WorkflowRow, U as WorkflowRuns } from '../base-CZmT-p10.cjs';
|
|
2
2
|
import 'ai';
|
|
3
3
|
import '../base-BihKcqDY.cjs';
|
|
4
4
|
import '@opentelemetry/api';
|
|
@@ -10,14 +10,16 @@ import '../types-BtMyV38I.cjs';
|
|
|
10
10
|
import 'sift';
|
|
11
11
|
import 'zod';
|
|
12
12
|
import 'json-schema';
|
|
13
|
-
import '../
|
|
13
|
+
import '../runtime-context/index.cjs';
|
|
14
14
|
import 'xstate';
|
|
15
15
|
import 'node:events';
|
|
16
16
|
import '../vector/index.cjs';
|
|
17
17
|
import '../vector/filter/index.cjs';
|
|
18
18
|
import '../tts/index.cjs';
|
|
19
|
+
import 'events';
|
|
19
20
|
import '../deployer/index.cjs';
|
|
20
21
|
import '../bundler/index.cjs';
|
|
21
22
|
import 'hono';
|
|
22
23
|
import 'hono/cors';
|
|
23
24
|
import 'hono-openapi';
|
|
25
|
+
import 'ai/test';
|
package/dist/storage/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { E as EvalRow, e as MastraStorage, S as StorageColumn, h as StorageGetMessagesArg,
|
|
1
|
+
export { E as EvalRow, e as MastraStorage, S as StorageColumn, h as StorageGetMessagesArg, bb as TABLE_EVALS, bc as TABLE_MESSAGES, T as TABLE_NAMES, bf as TABLE_SCHEMAS, bd as TABLE_THREADS, be as TABLE_TRACES, ba as TABLE_WORKFLOW_SNAPSHOT, Q as WorkflowRow, U as WorkflowRuns } from '../base-DDoWFpFc.js';
|
|
2
2
|
import 'ai';
|
|
3
3
|
import '../base-DT2poiVK.js';
|
|
4
4
|
import '@opentelemetry/api';
|
|
@@ -10,14 +10,16 @@ import '../types-BtMyV38I.js';
|
|
|
10
10
|
import 'sift';
|
|
11
11
|
import 'zod';
|
|
12
12
|
import 'json-schema';
|
|
13
|
-
import '../
|
|
13
|
+
import '../runtime-context/index.js';
|
|
14
14
|
import 'xstate';
|
|
15
15
|
import 'node:events';
|
|
16
16
|
import '../vector/index.js';
|
|
17
17
|
import '../vector/filter/index.js';
|
|
18
18
|
import '../tts/index.js';
|
|
19
|
+
import 'events';
|
|
19
20
|
import '../deployer/index.js';
|
|
20
21
|
import '../bundler/index.js';
|
|
21
22
|
import 'hono';
|
|
22
23
|
import 'hono/cors';
|
|
23
24
|
import 'hono-openapi';
|
|
25
|
+
import 'ai/test';
|
|
@@ -12,6 +12,23 @@ function safelyParseJSON(jsonString) {
|
|
|
12
12
|
return {};
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
+
var hasWarned = false;
|
|
16
|
+
function warnDeprecation(logger) {
|
|
17
|
+
if (hasWarned) return;
|
|
18
|
+
hasWarned = true;
|
|
19
|
+
logger?.warn(`The default storage is deprecated, please add any storage to Mastra itself.
|
|
20
|
+
|
|
21
|
+
In \`src/mastra/index.ts\` add:
|
|
22
|
+
Import { LibSQLStore } from \`@mastra/libsql\`.
|
|
23
|
+
|
|
24
|
+
export const mastra = new Mastra({
|
|
25
|
+
// other config
|
|
26
|
+
storage: new LibSQLStore({
|
|
27
|
+
url: 'file:../mastra.db',
|
|
28
|
+
}),
|
|
29
|
+
}
|
|
30
|
+
`);
|
|
31
|
+
}
|
|
15
32
|
var LibSQLStore = class extends chunkFPM2XCMS_cjs.MastraStorage {
|
|
16
33
|
client;
|
|
17
34
|
constructor({ config }) {
|
|
@@ -111,6 +128,7 @@ var LibSQLStore = class extends chunkFPM2XCMS_cjs.MastraStorage {
|
|
|
111
128
|
};
|
|
112
129
|
}
|
|
113
130
|
async insert({ tableName, record }) {
|
|
131
|
+
warnDeprecation(this.logger);
|
|
114
132
|
try {
|
|
115
133
|
await this.client.execute(
|
|
116
134
|
this.prepareStatement({
|
|
@@ -125,6 +143,7 @@ var LibSQLStore = class extends chunkFPM2XCMS_cjs.MastraStorage {
|
|
|
125
143
|
}
|
|
126
144
|
async batchInsert({ tableName, records }) {
|
|
127
145
|
if (records.length === 0) return;
|
|
146
|
+
warnDeprecation(this.logger);
|
|
128
147
|
try {
|
|
129
148
|
const batchStatements = records.map((r) => this.prepareStatement({ tableName, record: r }));
|
|
130
149
|
await this.client.batch(batchStatements, "write");
|
|
@@ -1,35 +1,34 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Config } from '@libsql/client';
|
|
2
|
+
import { e as MastraStorage, T as TABLE_NAMES, S as StorageColumn, f as StorageThreadType, g as MessageType, h as StorageGetMessagesArg, E as EvalRow, W as WorkflowRunState } from '../../base-CZmT-p10.cjs';
|
|
2
3
|
import '../../base-BihKcqDY.cjs';
|
|
3
4
|
import 'ai';
|
|
4
5
|
import '../../types-BtMyV38I.cjs';
|
|
5
6
|
import 'sift';
|
|
6
7
|
import 'zod';
|
|
7
8
|
import 'json-schema';
|
|
8
|
-
import '../../di/index.cjs';
|
|
9
9
|
import '../../index-CquI0inB.cjs';
|
|
10
10
|
import 'stream';
|
|
11
11
|
import 'pino';
|
|
12
|
+
import '../../runtime-context/index.cjs';
|
|
12
13
|
import '@opentelemetry/api';
|
|
13
14
|
import 'xstate';
|
|
14
15
|
import 'node:events';
|
|
15
16
|
import '../../vector/index.cjs';
|
|
16
17
|
import '../../vector/filter/index.cjs';
|
|
17
18
|
import '../../tts/index.cjs';
|
|
19
|
+
import 'events';
|
|
18
20
|
import '../../deployer/index.cjs';
|
|
19
21
|
import '../../bundler/index.cjs';
|
|
20
22
|
import 'hono';
|
|
21
23
|
import 'hono/cors';
|
|
22
24
|
import 'hono-openapi';
|
|
25
|
+
import 'ai/test';
|
|
23
26
|
import '@opentelemetry/sdk-trace-base';
|
|
24
27
|
|
|
25
|
-
interface LibSQLConfig {
|
|
26
|
-
url: string;
|
|
27
|
-
authToken?: string;
|
|
28
|
-
}
|
|
29
28
|
declare class LibSQLStore extends MastraStorage {
|
|
30
29
|
private client;
|
|
31
30
|
constructor({ config }: {
|
|
32
|
-
config:
|
|
31
|
+
config: Config;
|
|
33
32
|
});
|
|
34
33
|
protected rewriteDbUrl(url: string): string;
|
|
35
34
|
private getCreateTableSQL;
|
|
@@ -103,4 +102,4 @@ declare class LibSQLStore extends MastraStorage {
|
|
|
103
102
|
}>;
|
|
104
103
|
}
|
|
105
104
|
|
|
106
|
-
export { LibSQLStore as DefaultStorage,
|
|
105
|
+
export { LibSQLStore as DefaultStorage, LibSQLStore };
|
|
@@ -1,35 +1,34 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Config } from '@libsql/client';
|
|
2
|
+
import { e as MastraStorage, T as TABLE_NAMES, S as StorageColumn, f as StorageThreadType, g as MessageType, h as StorageGetMessagesArg, E as EvalRow, W as WorkflowRunState } from '../../base-DDoWFpFc.js';
|
|
2
3
|
import '../../base-DT2poiVK.js';
|
|
3
4
|
import 'ai';
|
|
4
5
|
import '../../types-BtMyV38I.js';
|
|
5
6
|
import 'sift';
|
|
6
7
|
import 'zod';
|
|
7
8
|
import 'json-schema';
|
|
8
|
-
import '../../di/index.js';
|
|
9
9
|
import '../../index-CquI0inB.js';
|
|
10
10
|
import 'stream';
|
|
11
11
|
import 'pino';
|
|
12
|
+
import '../../runtime-context/index.js';
|
|
12
13
|
import '@opentelemetry/api';
|
|
13
14
|
import 'xstate';
|
|
14
15
|
import 'node:events';
|
|
15
16
|
import '../../vector/index.js';
|
|
16
17
|
import '../../vector/filter/index.js';
|
|
17
18
|
import '../../tts/index.js';
|
|
19
|
+
import 'events';
|
|
18
20
|
import '../../deployer/index.js';
|
|
19
21
|
import '../../bundler/index.js';
|
|
20
22
|
import 'hono';
|
|
21
23
|
import 'hono/cors';
|
|
22
24
|
import 'hono-openapi';
|
|
25
|
+
import 'ai/test';
|
|
23
26
|
import '@opentelemetry/sdk-trace-base';
|
|
24
27
|
|
|
25
|
-
interface LibSQLConfig {
|
|
26
|
-
url: string;
|
|
27
|
-
authToken?: string;
|
|
28
|
-
}
|
|
29
28
|
declare class LibSQLStore extends MastraStorage {
|
|
30
29
|
private client;
|
|
31
30
|
constructor({ config }: {
|
|
32
|
-
config:
|
|
31
|
+
config: Config;
|
|
33
32
|
});
|
|
34
33
|
protected rewriteDbUrl(url: string): string;
|
|
35
34
|
private getCreateTableSQL;
|
|
@@ -103,4 +102,4 @@ declare class LibSQLStore extends MastraStorage {
|
|
|
103
102
|
}>;
|
|
104
103
|
}
|
|
105
104
|
|
|
106
|
-
export { LibSQLStore as DefaultStorage,
|
|
105
|
+
export { LibSQLStore as DefaultStorage, LibSQLStore };
|
|
@@ -10,6 +10,23 @@ function safelyParseJSON(jsonString) {
|
|
|
10
10
|
return {};
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
+
var hasWarned = false;
|
|
14
|
+
function warnDeprecation(logger) {
|
|
15
|
+
if (hasWarned) return;
|
|
16
|
+
hasWarned = true;
|
|
17
|
+
logger?.warn(`The default storage is deprecated, please add any storage to Mastra itself.
|
|
18
|
+
|
|
19
|
+
In \`src/mastra/index.ts\` add:
|
|
20
|
+
Import { LibSQLStore } from \`@mastra/libsql\`.
|
|
21
|
+
|
|
22
|
+
export const mastra = new Mastra({
|
|
23
|
+
// other config
|
|
24
|
+
storage: new LibSQLStore({
|
|
25
|
+
url: 'file:../mastra.db',
|
|
26
|
+
}),
|
|
27
|
+
}
|
|
28
|
+
`);
|
|
29
|
+
}
|
|
13
30
|
var LibSQLStore = class extends MastraStorage {
|
|
14
31
|
client;
|
|
15
32
|
constructor({ config }) {
|
|
@@ -109,6 +126,7 @@ var LibSQLStore = class extends MastraStorage {
|
|
|
109
126
|
};
|
|
110
127
|
}
|
|
111
128
|
async insert({ tableName, record }) {
|
|
129
|
+
warnDeprecation(this.logger);
|
|
112
130
|
try {
|
|
113
131
|
await this.client.execute(
|
|
114
132
|
this.prepareStatement({
|
|
@@ -123,6 +141,7 @@ var LibSQLStore = class extends MastraStorage {
|
|
|
123
141
|
}
|
|
124
142
|
async batchInsert({ tableName, records }) {
|
|
125
143
|
if (records.length === 0) return;
|
|
144
|
+
warnDeprecation(this.logger);
|
|
126
145
|
try {
|
|
127
146
|
const batchStatements = records.map((r) => this.prepareStatement({ tableName, record: r }));
|
|
128
147
|
await this.client.batch(batchStatements, "write");
|