@mastra/core 0.6.0 → 0.6.1-alpha.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.
|
@@ -6,20 +6,20 @@ var chunk43Y7WG5W_cjs = require('./chunk-43Y7WG5W.cjs');
|
|
|
6
6
|
var chunkIIWRJFLQ_cjs = require('./chunk-IIWRJFLQ.cjs');
|
|
7
7
|
var fs = require('fs');
|
|
8
8
|
var path = require('path');
|
|
9
|
+
var fsp = require('fs/promises');
|
|
10
|
+
var os = require('os');
|
|
9
11
|
var ai = require('ai');
|
|
10
|
-
var node_modulesPath = require('node_modules-path');
|
|
11
12
|
|
|
12
13
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
14
|
|
|
14
15
|
var path__default = /*#__PURE__*/_interopDefault(path);
|
|
15
|
-
var
|
|
16
|
+
var fsp__default = /*#__PURE__*/_interopDefault(fsp);
|
|
17
|
+
var os__default = /*#__PURE__*/_interopDefault(os);
|
|
16
18
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
cachedPath = path__default.default.join(firstNodeModules, "node_modules", ".fastembed-model-cache");
|
|
22
|
-
return cachedPath;
|
|
19
|
+
async function getModelCachePath() {
|
|
20
|
+
const cachePath = path__default.default.join(os__default.default.homedir(), ".cache", "mastra", "fastembed-models");
|
|
21
|
+
await fsp__default.default.mkdir(cachePath, { recursive: true });
|
|
22
|
+
return cachePath;
|
|
23
23
|
}
|
|
24
24
|
function unbundleableImport(name) {
|
|
25
25
|
const nonStaticallyAnalyzableName = `${name}?d=${Date.now()}`;
|
|
@@ -70,7 +70,7 @@ const memory = new Memory({
|
|
|
70
70
|
const { FlagEmbedding, EmbeddingModel } = mod;
|
|
71
71
|
const model = await FlagEmbedding.init({
|
|
72
72
|
model: EmbeddingModel[modelType],
|
|
73
|
-
cacheDir: getModelCachePath()
|
|
73
|
+
cacheDir: await getModelCachePath()
|
|
74
74
|
});
|
|
75
75
|
const embeddings = await model.embed(values);
|
|
76
76
|
const allResults = [];
|
|
@@ -3,16 +3,16 @@ import { DefaultProxyStorage } from './chunk-GMAMAKLH.js';
|
|
|
3
3
|
import { deepMerge } from './chunk-4Y74D74B.js';
|
|
4
4
|
import { MastraBase } from './chunk-4VHCCQ7P.js';
|
|
5
5
|
import { existsSync } from 'fs';
|
|
6
|
-
import
|
|
6
|
+
import { join } from 'path';
|
|
7
|
+
import fsp from 'node:fs/promises';
|
|
8
|
+
import os from 'node:os';
|
|
9
|
+
import path from 'node:path';
|
|
7
10
|
import { experimental_customProvider } from 'ai';
|
|
8
|
-
import node_modulesPath from 'node_modules-path';
|
|
9
11
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
cachedPath = path.join(firstNodeModules, "node_modules", ".fastembed-model-cache");
|
|
15
|
-
return cachedPath;
|
|
12
|
+
async function getModelCachePath() {
|
|
13
|
+
const cachePath = path.join(os.homedir(), ".cache", "mastra", "fastembed-models");
|
|
14
|
+
await fsp.mkdir(cachePath, { recursive: true });
|
|
15
|
+
return cachePath;
|
|
16
16
|
}
|
|
17
17
|
function unbundleableImport(name) {
|
|
18
18
|
const nonStaticallyAnalyzableName = `${name}?d=${Date.now()}`;
|
|
@@ -63,7 +63,7 @@ const memory = new Memory({
|
|
|
63
63
|
const { FlagEmbedding, EmbeddingModel } = mod;
|
|
64
64
|
const model = await FlagEmbedding.init({
|
|
65
65
|
model: EmbeddingModel[modelType],
|
|
66
|
-
cacheDir: getModelCachePath()
|
|
66
|
+
cacheDir: await getModelCachePath()
|
|
67
67
|
});
|
|
68
68
|
const embeddings = await model.embed(values);
|
|
69
69
|
const allResults = [];
|
package/dist/index.cjs
CHANGED
|
@@ -4,7 +4,7 @@ var chunkHJPMYDWO_cjs = require('./chunk-HJPMYDWO.cjs');
|
|
|
4
4
|
var chunkN2G5ZI42_cjs = require('./chunk-N2G5ZI42.cjs');
|
|
5
5
|
var chunkXLSROQ26_cjs = require('./chunk-XLSROQ26.cjs');
|
|
6
6
|
var chunkXLZRGA3F_cjs = require('./chunk-XLZRGA3F.cjs');
|
|
7
|
-
var
|
|
7
|
+
var chunkJTCW5OLP_cjs = require('./chunk-JTCW5OLP.cjs');
|
|
8
8
|
var chunkENT7U27Y_cjs = require('./chunk-ENT7U27Y.cjs');
|
|
9
9
|
var chunkL5BNMAC3_cjs = require('./chunk-L5BNMAC3.cjs');
|
|
10
10
|
var chunkFL3GQXQ2_cjs = require('./chunk-FL3GQXQ2.cjs');
|
|
@@ -75,7 +75,7 @@ function createLogger2(options) {
|
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
// src/memory/index.warning.ts
|
|
78
|
-
var MastraMemory2 = class extends
|
|
78
|
+
var MastraMemory2 = class extends chunkJTCW5OLP_cjs.MastraMemory {
|
|
79
79
|
constructor(_arg) {
|
|
80
80
|
super({ name: `Deprecated memory` });
|
|
81
81
|
this.logger.warn('Please import "MastraMemory" from "@mastra/core/memory" instead of "@mastra/core"');
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { Workflow } from './chunk-6ZHR5KIP.js';
|
|
|
3
3
|
export { Step, WhenConditionReturnValue, createStep, getActivePathsAndStatus, getResultActivePaths, getStepResult, getSuspendedPaths, isErrorEvent, isFinalState, isLimboState, isTransitionEvent, isVariableReference, mergeChildValue, recursivelyCheckForFinalState, updateStepInHierarchy } from './chunk-6ZHR5KIP.js';
|
|
4
4
|
import { Integration, OpenAPIToolset } from './chunk-PNZK456O.js';
|
|
5
5
|
export { Mastra } from './chunk-22HQQDJZ.js';
|
|
6
|
-
import { MastraMemory } from './chunk-
|
|
6
|
+
import { MastraMemory } from './chunk-KTOKI3ZO.js';
|
|
7
7
|
import { MastraVector } from './chunk-QLYZGX5Z.js';
|
|
8
8
|
export { CohereRelevanceScorer, MastraAgentRelevanceScorer, createSimilarityPrompt } from './chunk-DGYFNGOC.js';
|
|
9
9
|
import { MastraStorage } from './chunk-7TZAPEAT.js';
|
package/dist/memory/index.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkJTCW5OLP_cjs = require('../chunk-JTCW5OLP.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "MastraMemory", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkJTCW5OLP_cjs.MastraMemory; }
|
|
10
10
|
});
|
package/dist/memory/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { MastraMemory } from '../chunk-
|
|
1
|
+
export { MastraMemory } from '../chunk-KTOKI3ZO.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/core",
|
|
3
|
-
"version": "0.6.0",
|
|
3
|
+
"version": "0.6.1-alpha.0",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -114,7 +114,6 @@
|
|
|
114
114
|
"fastembed": "^1.14.1",
|
|
115
115
|
"json-schema": "^0.4.0",
|
|
116
116
|
"json-schema-to-zod": "^2.6.0",
|
|
117
|
-
"node_modules-path": "^2.0.8",
|
|
118
117
|
"pino": "^9.6.0",
|
|
119
118
|
"pino-pretty": "^13.0.0",
|
|
120
119
|
"radash": "^12.1.0",
|