mastra 0.1.57-unstable.56 → 0.1.57-unstable.57
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/commands/deploy/deployer.d.ts +4 -2
- package/dist/commands/deploy/deployer.d.ts.map +1 -1
- package/dist/commands/deploy/deployer.js +4 -4
- package/dist/commands/deploy/index.d.ts +2 -1
- package/dist/commands/deploy/index.d.ts.map +1 -1
- package/dist/commands/deploy/index.js +2 -2
- package/dist/commands/deploy/vercel/index.d.ts +2 -1
- package/dist/commands/deploy/vercel/index.d.ts.map +1 -1
- package/dist/commands/deploy/vercel/index.js +2 -1
- package/dist/commands/dev.d.ts +1 -7
- package/dist/commands/dev.d.ts.map +1 -1
- package/dist/commands/dev.js +33 -15
- package/dist/index.js +3 -1
- package/dist/templates/express-server.d.ts.map +1 -1
- package/dist/templates/express-server.js +42 -14
- package/dist/utils/bundle.d.ts +3 -1
- package/dist/utils/bundle.d.ts.map +1 -1
- package/dist/utils/bundle.js +29 -14
- package/package.json +4 -2
- package/src/playground/dist/assets/dark-plus-C3mMm8J8.js +1 -0
- package/src/playground/dist/assets/erb-BgreK6rt.js +1 -0
- package/src/playground/dist/assets/{gdresource-D_y5yz_M.js → gdresource-NFcQ0Q3Z.js} +1 -1
- package/src/playground/dist/assets/gdscript-BVlVXSjx.js +1 -0
- package/src/playground/dist/assets/index-DY22QVI1.js +389 -0
- package/src/playground/dist/assets/index-Dx4A5Op9.js +13 -0
- package/src/playground/dist/assets/light-plus-B7mTdjB0.js +1 -0
- package/src/playground/dist/assets/{monokai-CQWsIgnU.js → monokai-D4h5O-jR.js} +1 -1
- package/src/playground/dist/assets/prisma-CZzQMiei.js +1 -0
- package/src/playground/dist/assets/red-bN70gL4F.js +1 -0
- package/src/playground/dist/assets/rst-BCmapc_q.js +1 -0
- package/src/playground/dist/assets/ruby-DsC6krmi.js +1 -0
- package/src/playground/dist/assets/{solarized-dark-CmY0Y6Yh.js → solarized-dark-DXbdFlpD.js} +1 -1
- package/src/playground/dist/assets/{solarized-light-DZQMDcrx.js → solarized-light-L9t79GZl.js} +1 -1
- package/src/playground/dist/assets/style-7CS44jOg.css +1 -0
- package/src/playground/dist/assets/twig-CvAdjvFj.js +1 -0
- package/src/playground/dist/index.html +2 -2
- package/src/playground/dist/assets/dark-plus-B74Y8nHz.js +0 -1
- package/src/playground/dist/assets/erb-DuefeV9w.js +0 -1
- package/src/playground/dist/assets/gdscript-BIguuW30.js +0 -1
- package/src/playground/dist/assets/index-CzqDlQul.js +0 -13
- package/src/playground/dist/assets/index-qFy09kRJ.js +0 -360
- package/src/playground/dist/assets/light-plus-w1el_4yc.js +0 -1
- package/src/playground/dist/assets/prisma-DFIOpqzz.js +0 -1
- package/src/playground/dist/assets/red-2pWuV6-S.js +0 -1
- package/src/playground/dist/assets/rst-BtGMdPX_.js +0 -1
- package/src/playground/dist/assets/ruby-C8Yez0Ov.js +0 -1
- package/src/playground/dist/assets/style-x_8NJ6Q9.css +0 -1
- package/src/playground/dist/assets/twig-DN6YEzOP.js +0 -1
|
@@ -15,14 +15,16 @@ export declare abstract class Deployer {
|
|
|
15
15
|
}): Promise<void>;
|
|
16
16
|
writePkgJson(): void;
|
|
17
17
|
writeFiles(): void;
|
|
18
|
-
deployCommand({ scope, siteId }: {
|
|
18
|
+
deployCommand({ scope, siteId, projectName }: {
|
|
19
19
|
scope: string;
|
|
20
20
|
siteId?: string;
|
|
21
|
+
projectName?: string;
|
|
21
22
|
}): Promise<void>;
|
|
22
|
-
deploy({ scope, siteId, dir }: {
|
|
23
|
+
deploy({ scope, siteId, dir, projectName, }: {
|
|
23
24
|
dir?: string;
|
|
24
25
|
scope: string;
|
|
25
26
|
siteId?: string;
|
|
27
|
+
projectName?: string;
|
|
26
28
|
}): Promise<void>;
|
|
27
29
|
}
|
|
28
30
|
//# sourceMappingURL=deployer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deployer.d.ts","sourceRoot":"","sources":["../../../src/commands/deploy/deployer.ts"],"names":[],"mappings":"AAMA,8BAAsB,QAAQ;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAM;gBAEN,EAAE,KAAK,EAAE,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE;IAMlC,UAAU;IAIV,OAAO;IASb,SAAS,CAAC,WAAW,IAAI,MAAM,EAAE;IAOjC,UAAU;IAkBV,SAAS,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE;IAS5C,KAAK,CAAC,EAAE,GAAG,EAAE,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE;IAQpC,YAAY;IAIZ,UAAU;IAIJ,aAAa,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE;
|
|
1
|
+
{"version":3,"file":"deployer.d.ts","sourceRoot":"","sources":["../../../src/commands/deploy/deployer.ts"],"names":[],"mappings":"AAMA,8BAAsB,QAAQ;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAM;gBAEN,EAAE,KAAK,EAAE,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE;IAMlC,UAAU;IAIV,OAAO;IASb,SAAS,CAAC,WAAW,IAAI,MAAM,EAAE;IAOjC,UAAU;IAkBV,SAAS,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE;IAS5C,KAAK,CAAC,EAAE,GAAG,EAAE,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE;IAQpC,YAAY;IAIZ,UAAU;IAIJ,aAAa,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE;IAItG,MAAM,CAAC,EACX,KAAK,EACL,MAAM,EACN,GAAG,EACH,WAAW,GACZ,EAAE;QACD,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB;CAUF"}
|
|
@@ -61,10 +61,10 @@ export class Deployer {
|
|
|
61
61
|
writeFiles() {
|
|
62
62
|
console.log('Writing files...');
|
|
63
63
|
}
|
|
64
|
-
async deployCommand({ scope, siteId }) {
|
|
65
|
-
console.log(`Deploy command ${scope}...${siteId || ''}`);
|
|
64
|
+
async deployCommand({ scope, siteId, projectName }) {
|
|
65
|
+
console.log(`Deploy command ${scope}...${siteId || ''} to ${projectName || 'mastra-starter'}`);
|
|
66
66
|
}
|
|
67
|
-
async deploy({ scope, siteId, dir }) {
|
|
67
|
+
async deploy({ scope, siteId, dir, projectName, }) {
|
|
68
68
|
console.log('Deploying...', scope);
|
|
69
69
|
const dirPath = dir || path.join(process.cwd(), 'src/mastra');
|
|
70
70
|
await this.installCli();
|
|
@@ -72,6 +72,6 @@ export class Deployer {
|
|
|
72
72
|
this.writeFiles();
|
|
73
73
|
await this.install();
|
|
74
74
|
await this.build({ dir: dirPath });
|
|
75
|
-
await this.deployCommand({ scope, siteId });
|
|
75
|
+
await this.deployCommand({ scope, siteId, projectName });
|
|
76
76
|
}
|
|
77
77
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/deploy/index.ts"],"names":[],"mappings":"AAwCA,wBAAsB,YAAY,CAAC,EAAE,GAAG,EAAE,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/deploy/index.ts"],"names":[],"mappings":"AAwCA,wBAAsB,YAAY,CAAC,EAAE,GAAG,EAAE,WAAW,EAAE,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,iBAmD9F;AAoBD,wBAAsB,gBAAgB,CAAC,EAAE,GAAG,EAAE,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,iBAmD/D;AAgFD,wBAAsB,aAAa,CAAC,EAAE,GAAG,EAAE,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,iBAuD5D"}
|
|
@@ -31,7 +31,7 @@ async function fetchVercelTeams(authToken) {
|
|
|
31
31
|
throw error;
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
export async function vercelDeploy({ dir }) {
|
|
34
|
+
export async function vercelDeploy({ dir, projectName }) {
|
|
35
35
|
prompts.intro(color.inverse(' Deploying to Vercel '));
|
|
36
36
|
const creds = getCreds('VERCEL');
|
|
37
37
|
let token;
|
|
@@ -68,7 +68,7 @@ export async function vercelDeploy({ dir }) {
|
|
|
68
68
|
scope = creds.scope;
|
|
69
69
|
}
|
|
70
70
|
const deployer = new VercelDeployer({ token });
|
|
71
|
-
await deployer.deploy({ scope, dir });
|
|
71
|
+
await deployer.deploy({ scope, dir, projectName });
|
|
72
72
|
logger.log('Deployment complete!');
|
|
73
73
|
process.exit(0);
|
|
74
74
|
}
|
|
@@ -8,8 +8,9 @@ export declare class VercelDeployer extends Deployer {
|
|
|
8
8
|
syncEnv({ scope }: {
|
|
9
9
|
scope: string;
|
|
10
10
|
}): Promise<void>;
|
|
11
|
-
deployCommand({ scope }: {
|
|
11
|
+
deployCommand({ scope, projectName, }: {
|
|
12
12
|
scope: string;
|
|
13
|
+
projectName?: string;
|
|
13
14
|
}): Promise<void>;
|
|
14
15
|
}
|
|
15
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/deploy/vercel/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAe1C,qBAAa,cAAe,SAAQ,QAAQ;IAC1C,IAAI,SAAY;IACV,UAAU;IAMV,YAAY;IA4BlB,UAAU;IA4BV,OAAO,CAAC,YAAY;IAUd,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE;IAqDpC,aAAa,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/deploy/vercel/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAe1C,qBAAa,cAAe,SAAQ,QAAQ;IAC1C,IAAI,SAAY;IACV,UAAU;IAMV,YAAY;IA4BlB,UAAU;IA4BV,OAAO,CAAC,YAAY;IAUd,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE;IAqDpC,aAAa,CAAC,EAClB,KAAK,EACL,WAA8B,GAC/B,EAAE;QACD,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,GAAG,OAAO,CAAC,IAAI,CAAC;CA6ClB"}
|
|
@@ -110,7 +110,7 @@ export class VercelDeployer extends Deployer {
|
|
|
110
110
|
throw error;
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
async deployCommand({ scope }) {
|
|
113
|
+
async deployCommand({ scope, projectName = 'mastra-starter', }) {
|
|
114
114
|
// Get env vars for initial deployment
|
|
115
115
|
const envFiles = this.getEnvFiles();
|
|
116
116
|
const envVars = [];
|
|
@@ -128,6 +128,7 @@ export class VercelDeployer extends Deployer {
|
|
|
128
128
|
'--token',
|
|
129
129
|
this.token,
|
|
130
130
|
'--yes',
|
|
131
|
+
...(projectName ? ['--name', projectName] : []),
|
|
131
132
|
];
|
|
132
133
|
// Add env vars to initial deployment
|
|
133
134
|
for (const envVar of envVars) {
|
package/dist/commands/dev.d.ts
CHANGED
|
@@ -3,11 +3,5 @@ export declare function dev({ port, env, dir, toolsDirs, }: {
|
|
|
3
3
|
port: number;
|
|
4
4
|
env: Record<string, any>;
|
|
5
5
|
toolsDirs?: string;
|
|
6
|
-
}): Promise<
|
|
7
|
-
cwd: string;
|
|
8
|
-
env: {
|
|
9
|
-
port: string;
|
|
10
|
-
MASTRA_TOOLS_PATH: string;
|
|
11
|
-
};
|
|
12
|
-
}>>;
|
|
6
|
+
}): Promise<void>;
|
|
13
7
|
//# sourceMappingURL=dev.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../src/commands/dev.ts"],"names":[],"mappings":"AAkBA,wBAAsB,GAAG,CAAC,EACxB,IAAI,EACJ,GAAG,EACH,GAAG,EACH,SAAS,GACV,EAAE;IACD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB
|
|
1
|
+
{"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../src/commands/dev.ts"],"names":[],"mappings":"AAkBA,wBAAsB,GAAG,CAAC,EACxB,IAAI,EACJ,GAAG,EACH,GAAG,EACH,SAAS,GACV,EAAE;IACD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,iBA4GA"}
|
package/dist/commands/dev.js
CHANGED
|
@@ -3,7 +3,7 @@ import { execa } from 'execa';
|
|
|
3
3
|
import { writeFileSync } from 'fs';
|
|
4
4
|
import { join } from 'path';
|
|
5
5
|
import path from 'path';
|
|
6
|
-
import { fileURLToPath } from 'url';
|
|
6
|
+
import { fileURLToPath, pathToFileURL } from 'url';
|
|
7
7
|
import fsExtra from 'fs-extra/esm';
|
|
8
8
|
import fs from 'fs/promises';
|
|
9
9
|
import { FileService } from '../services/service.file.js';
|
|
@@ -55,6 +55,7 @@ export async function dev({ port, env, dir, toolsDirs, }) {
|
|
|
55
55
|
return {
|
|
56
56
|
path: toolPath,
|
|
57
57
|
name,
|
|
58
|
+
fileName,
|
|
58
59
|
};
|
|
59
60
|
});
|
|
60
61
|
}
|
|
@@ -66,27 +67,44 @@ export async function dev({ port, env, dir, toolsDirs, }) {
|
|
|
66
67
|
return [];
|
|
67
68
|
}
|
|
68
69
|
}))).flat();
|
|
69
|
-
for (const { path, name } of toolPathsWithFileNames) {
|
|
70
|
+
for (const { path, name, fileName } of toolPathsWithFileNames) {
|
|
70
71
|
await bundle(path, {
|
|
71
72
|
outfile: join(dotMastraPath, 'tools', `${name}.mjs`),
|
|
73
|
+
entryFile: fileName,
|
|
72
74
|
});
|
|
73
75
|
}
|
|
74
76
|
/*
|
|
75
77
|
Bundle server
|
|
76
78
|
*/
|
|
77
|
-
|
|
78
|
-
|
|
79
|
+
const serverPath = join(dotMastraPath, 'index.mjs');
|
|
80
|
+
writeFileSync(serverPath, EXPRESS_SERVER);
|
|
81
|
+
await bundleServer(serverPath);
|
|
79
82
|
const MASTRA_TOOLS_PATH = toolPathsWithFileNames?.length
|
|
80
|
-
? toolPathsWithFileNames.map(tool =>
|
|
83
|
+
? toolPathsWithFileNames.map(tool => pathToFileURL(join(dotMastraPath, 'tools', `${tool.name}.mjs`)).href).join(',')
|
|
81
84
|
: undefined;
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
85
|
+
try {
|
|
86
|
+
console.log('Starting server...');
|
|
87
|
+
const serverProcess = await execa('node', ['server.mjs'], {
|
|
88
|
+
cwd: dotMastraPath,
|
|
89
|
+
env: {
|
|
90
|
+
PORT: port.toString() || '4111',
|
|
91
|
+
MASTRA_TOOLS_PATH,
|
|
92
|
+
},
|
|
93
|
+
stdio: 'inherit',
|
|
94
|
+
reject: false,
|
|
95
|
+
});
|
|
96
|
+
if (serverProcess.failed) {
|
|
97
|
+
console.error('Server failed to start with error:', serverProcess.stderr);
|
|
98
|
+
process.exit(1);
|
|
99
|
+
}
|
|
100
|
+
console.log('Server started successfully');
|
|
101
|
+
}
|
|
102
|
+
catch (err) {
|
|
103
|
+
const execaError = err;
|
|
104
|
+
if (execaError.stderr)
|
|
105
|
+
console.error('Server error output:', execaError.stderr);
|
|
106
|
+
if (execaError.stdout)
|
|
107
|
+
console.error('Server output:', execaError.stdout);
|
|
108
|
+
process.exit(1);
|
|
109
|
+
}
|
|
92
110
|
}
|
package/dist/index.js
CHANGED
|
@@ -21,6 +21,7 @@ import { getEnv } from './utils/get-env.js';
|
|
|
21
21
|
import { logger } from './utils/logger.js';
|
|
22
22
|
const depsService = new DepsService();
|
|
23
23
|
const version = await depsService.getPackageVersion();
|
|
24
|
+
const projectName = 'mastra-starter';
|
|
24
25
|
const analytics = new PosthogAnalytics({
|
|
25
26
|
apiKey: 'phc_SBLpZVAB6jmHOct9CABq3PF0Yn5FU3G2FgT4xUr2XrT',
|
|
26
27
|
host: 'https://us.posthog.com',
|
|
@@ -203,12 +204,13 @@ deploy
|
|
|
203
204
|
.command('vercel')
|
|
204
205
|
.description('Deploy your Mastra project to Vercel')
|
|
205
206
|
.option('-d, --dir <dir>', 'Path to your mastra folder')
|
|
207
|
+
.option('-n, --name <name>', 'Name of the project')
|
|
206
208
|
.action(async (args) => {
|
|
207
209
|
await analytics.trackCommandExecution({
|
|
208
210
|
command: 'deploy vercel',
|
|
209
211
|
args,
|
|
210
212
|
execution: async () => {
|
|
211
|
-
await vercelDeploy({ dir: args?.dir });
|
|
213
|
+
await vercelDeploy({ dir: args?.dir, projectName: args?.name || projectName });
|
|
212
214
|
},
|
|
213
215
|
});
|
|
214
216
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"express-server.d.ts","sourceRoot":"","sources":["../../src/templates/express-server.ts"],"names":[],"mappings":"AAGA,OAAO,UAAU,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"express-server.d.ts","sourceRoot":"","sources":["../../src/templates/express-server.ts"],"names":[],"mappings":"AAGA,OAAO,UAAU,MAAM,iBAAiB,CAAC;AAmhCzC,eAAO,MAAM,OAAO,oBAAkB,CAAC;AAOvC,eAAe,OAAO,CAAC"}
|
|
@@ -142,7 +142,7 @@ app.post('/api/agents/:agentId/text', async (req, res) => {
|
|
|
142
142
|
try {
|
|
143
143
|
const agentId = req.params.agentId;
|
|
144
144
|
const agent = mastra.getAgent(agentId);
|
|
145
|
-
const messages = req.body
|
|
145
|
+
const { messages, threadId, resourceid } = req.body;
|
|
146
146
|
const { ok, errorResponse } = await validateBody({
|
|
147
147
|
messages,
|
|
148
148
|
});
|
|
@@ -154,7 +154,7 @@ app.post('/api/agents/:agentId/text', async (req, res) => {
|
|
|
154
154
|
res.status(400).json({ error: { messages: 'Messages should be an array' } });
|
|
155
155
|
return;
|
|
156
156
|
}
|
|
157
|
-
const result = await agent.generate(messages);
|
|
157
|
+
const result = await agent.generate(messages, { threadId, resourceid });
|
|
158
158
|
res.json(result);
|
|
159
159
|
}
|
|
160
160
|
catch (error) {
|
|
@@ -178,7 +178,7 @@ app.post('/api/agents/:agentId/stream', async (req, res) => {
|
|
|
178
178
|
try {
|
|
179
179
|
const agentId = req.params.agentId;
|
|
180
180
|
const agent = mastra.getAgent(agentId);
|
|
181
|
-
const messages = req.body
|
|
181
|
+
const { messages, threadId, resourceid } = req.body;
|
|
182
182
|
const { ok, errorResponse } = await validateBody({
|
|
183
183
|
messages,
|
|
184
184
|
});
|
|
@@ -192,6 +192,8 @@ app.post('/api/agents/:agentId/stream', async (req, res) => {
|
|
|
192
192
|
}
|
|
193
193
|
const streamResult = await agent.generate(messages, {
|
|
194
194
|
stream: true,
|
|
195
|
+
threadId,
|
|
196
|
+
resourceid,
|
|
195
197
|
});
|
|
196
198
|
streamResult.pipeDataStreamToResponse(res);
|
|
197
199
|
}
|
|
@@ -216,8 +218,7 @@ app.post('/api/agents/:agentId/text-object', async (req, res) => {
|
|
|
216
218
|
try {
|
|
217
219
|
const agentId = req.params.agentId;
|
|
218
220
|
const agent = mastra.getAgent(agentId);
|
|
219
|
-
const messages = req.body
|
|
220
|
-
const schema = req.body.schema;
|
|
221
|
+
const { messages, schema, threadId, resourceid } = req.body;
|
|
221
222
|
const { ok, errorResponse } = await validateBody({
|
|
222
223
|
messages,
|
|
223
224
|
schema,
|
|
@@ -230,7 +231,7 @@ app.post('/api/agents/:agentId/text-object', async (req, res) => {
|
|
|
230
231
|
res.status(400).json({ error: { messages: 'Messages should be an array' } });
|
|
231
232
|
return;
|
|
232
233
|
}
|
|
233
|
-
const result = await agent.generate(messages, { schema });
|
|
234
|
+
const result = await agent.generate(messages, { schema, threadId, resourceid });
|
|
234
235
|
res.json(result);
|
|
235
236
|
}
|
|
236
237
|
catch (error) {
|
|
@@ -256,8 +257,7 @@ app.post('/api/agents/:agentId/stream-object', async (req, res) => {
|
|
|
256
257
|
try {
|
|
257
258
|
const agentId = req.params.agentId;
|
|
258
259
|
const agent = mastra.getAgent(agentId);
|
|
259
|
-
const messages = req.body
|
|
260
|
-
const schema = req.body.schema;
|
|
260
|
+
const { messages, schema, threadId, resourceid } = req.body;
|
|
261
261
|
const { ok, errorResponse } = await validateBody({
|
|
262
262
|
messages,
|
|
263
263
|
schema,
|
|
@@ -270,7 +270,7 @@ app.post('/api/agents/:agentId/stream-object', async (req, res) => {
|
|
|
270
270
|
res.status(400).json({ error: { messages: 'Messages should be an array' } });
|
|
271
271
|
return;
|
|
272
272
|
}
|
|
273
|
-
const streamResult = await agent.generate(messages, { schema, stream: true });
|
|
273
|
+
const streamResult = await agent.generate(messages, { schema, stream: true, threadId, resourceid });
|
|
274
274
|
streamResult.pipeTextStreamToResponse(res);
|
|
275
275
|
}
|
|
276
276
|
catch (error) {
|
|
@@ -396,22 +396,50 @@ app.post('/api/workflows/:workflowId/execute', async (req, res) => {
|
|
|
396
396
|
}
|
|
397
397
|
});
|
|
398
398
|
/**
|
|
399
|
-
* GET /api/memory/
|
|
400
|
-
* @summary Get
|
|
399
|
+
* GET /api/memory/status
|
|
400
|
+
* @summary Get memory status
|
|
401
401
|
* @tags Memory
|
|
402
|
-
* @
|
|
402
|
+
* @return {object} 200 - Memory status
|
|
403
|
+
* @return {Error} 500 - Server error
|
|
404
|
+
*/
|
|
405
|
+
app.get('/api/memory/status', async (_req, res) => {
|
|
406
|
+
try {
|
|
407
|
+
const memory = mastra.memory;
|
|
408
|
+
if (!memory) {
|
|
409
|
+
res.json({ result: false });
|
|
410
|
+
return;
|
|
411
|
+
}
|
|
412
|
+
res.json({ result: true });
|
|
413
|
+
}
|
|
414
|
+
catch (error) {
|
|
415
|
+
const apiError = error;
|
|
416
|
+
console.error('Error getting memory status', apiError);
|
|
417
|
+
res.status(apiError.status || 500).json({ error: apiError.message || 'Error getting memory status' });
|
|
418
|
+
return;
|
|
419
|
+
}
|
|
420
|
+
});
|
|
421
|
+
/**
|
|
422
|
+
* GET /api/memory/threads
|
|
423
|
+
* @summary Get threads
|
|
424
|
+
* @tags Memory
|
|
425
|
+
* @param {string} resourceid.query.required - Resource identifier
|
|
403
426
|
* @return {Thread[]} 200 - Array of threads
|
|
404
427
|
* @return {Error} 400 - Memory not initialized
|
|
405
428
|
* @return {Error} 500 - Server error
|
|
406
429
|
*/
|
|
407
|
-
app.get('/api/memory/threads
|
|
430
|
+
app.get('/api/memory/threads', async (req, res) => {
|
|
408
431
|
try {
|
|
409
|
-
const resourceid = req.
|
|
432
|
+
const resourceid = req.query.resourceid;
|
|
410
433
|
const memory = mastra.memory;
|
|
411
434
|
if (!memory) {
|
|
412
435
|
res.status(400).json({ error: 'Memory is not initialized' });
|
|
413
436
|
return;
|
|
414
437
|
}
|
|
438
|
+
const { ok, errorResponse } = await validateBody({ resourceid });
|
|
439
|
+
if (!ok) {
|
|
440
|
+
res.status(400).json({ error: errorResponse });
|
|
441
|
+
return;
|
|
442
|
+
}
|
|
415
443
|
const threads = await memory.getThreadsByResourceId({ resourceid });
|
|
416
444
|
res.json(threads);
|
|
417
445
|
}
|
package/dist/utils/bundle.d.ts
CHANGED
|
@@ -12,16 +12,18 @@ export declare function bundleServer(entryPoint: string): Promise<esbuild.BuildR
|
|
|
12
12
|
metafile: true;
|
|
13
13
|
logLevel: "error";
|
|
14
14
|
nodePaths: string[];
|
|
15
|
-
|
|
15
|
+
conditions: string[];
|
|
16
16
|
banner: {
|
|
17
17
|
js: string;
|
|
18
18
|
};
|
|
19
|
+
external: string[];
|
|
19
20
|
logOverride: {
|
|
20
21
|
'commonjs-variable-in-esm': "silent";
|
|
21
22
|
};
|
|
22
23
|
}>>;
|
|
23
24
|
export declare function bundle(dirPath: string, options?: {
|
|
24
25
|
outfile?: string;
|
|
26
|
+
entryFile?: string;
|
|
25
27
|
}): Promise<esbuild.BuildResult<{
|
|
26
28
|
entryPoints: string[];
|
|
27
29
|
bundle: true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["../../src/utils/bundle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAanC,wBAAsB,YAAY,CAAC,UAAU,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["../../src/utils/bundle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAanC,wBAAsB,YAAY,CAAC,UAAU,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;IA0FpD;AAED,wBAAsB,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE;;;;;;;;;;;;;;;;;;;;IAyG/F"}
|
package/dist/utils/bundle.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as esbuild from 'esbuild';
|
|
2
2
|
import { join } from 'path';
|
|
3
3
|
import path from 'path';
|
|
4
|
-
import { fileURLToPath } from 'url';
|
|
4
|
+
import { fileURLToPath, pathToFileURL } from 'url';
|
|
5
5
|
import { upsertMastraDir } from '../commands/deploy/utils.js';
|
|
6
6
|
import { FileService } from '../services/service.file.js';
|
|
7
7
|
import { logger } from './logger.js';
|
|
@@ -11,10 +11,12 @@ export async function bundleServer(entryPoint) {
|
|
|
11
11
|
try {
|
|
12
12
|
// Ensure .mastra directory exists
|
|
13
13
|
upsertMastraDir();
|
|
14
|
+
// Convert server entry point to file URL
|
|
15
|
+
const serverEntryPoint = pathToFileURL(entryPoint).href;
|
|
14
16
|
const outfile = join(process.cwd(), '.mastra', 'server.mjs');
|
|
15
17
|
const cliNodeModules = join(path.dirname(path.dirname(__dirname)), 'node_modules');
|
|
16
18
|
const result = await esbuild.build({
|
|
17
|
-
entryPoints: [
|
|
19
|
+
entryPoints: [serverEntryPoint],
|
|
18
20
|
bundle: true,
|
|
19
21
|
platform: 'node',
|
|
20
22
|
format: 'esm',
|
|
@@ -26,6 +28,17 @@ export async function bundleServer(entryPoint) {
|
|
|
26
28
|
metafile: true, // Generates build metadata
|
|
27
29
|
logLevel: 'error',
|
|
28
30
|
nodePaths: [cliNodeModules],
|
|
31
|
+
conditions: ['import', 'node'],
|
|
32
|
+
banner: {
|
|
33
|
+
js: `
|
|
34
|
+
import { createRequire } from "module";
|
|
35
|
+
import { fileURLToPath } from 'url';
|
|
36
|
+
import path from 'path';
|
|
37
|
+
const require = createRequire(import.meta.url);
|
|
38
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
39
|
+
const __dirname = path.dirname(__filename);
|
|
40
|
+
`,
|
|
41
|
+
},
|
|
29
42
|
external: [
|
|
30
43
|
// Mark node built-ins as external
|
|
31
44
|
'fs',
|
|
@@ -59,17 +72,9 @@ export async function bundleServer(entryPoint) {
|
|
|
59
72
|
'@mastra/engine',
|
|
60
73
|
'@mastra/firecrawl',
|
|
61
74
|
'@mastra/github',
|
|
75
|
+
'@mastra/rag',
|
|
76
|
+
'@mastra/stabilityai',
|
|
62
77
|
],
|
|
63
|
-
banner: {
|
|
64
|
-
js: `
|
|
65
|
-
import { createRequire } from "module";
|
|
66
|
-
import { fileURLToPath } from 'url';
|
|
67
|
-
import path from 'path';
|
|
68
|
-
const require = createRequire(import.meta.url);
|
|
69
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
70
|
-
const __dirname = path.dirname(__filename);
|
|
71
|
-
`,
|
|
72
|
-
},
|
|
73
78
|
logOverride: {
|
|
74
79
|
'commonjs-variable-in-esm': 'silent',
|
|
75
80
|
},
|
|
@@ -95,7 +100,9 @@ export async function bundle(dirPath, options) {
|
|
|
95
100
|
// Ensure .mastra directory exists
|
|
96
101
|
upsertMastraDir();
|
|
97
102
|
const fileService = new FileService();
|
|
98
|
-
const
|
|
103
|
+
const entryPointPath = join(dirPath, `${options?.entryFile || 'index'}.ts`);
|
|
104
|
+
// Convert to file URL for ESM imports
|
|
105
|
+
const entryPoint = pathToFileURL(fileService.getFirstExistingFile([entryPointPath])).href;
|
|
99
106
|
const outfile = options?.outfile || join(process.cwd(), '.mastra', 'mastra.mjs');
|
|
100
107
|
const result = await esbuild.build({
|
|
101
108
|
entryPoints: [entryPoint],
|
|
@@ -112,8 +119,12 @@ export async function bundle(dirPath, options) {
|
|
|
112
119
|
conditions: ['import', 'node'],
|
|
113
120
|
banner: {
|
|
114
121
|
js: `
|
|
115
|
-
import { createRequire } from
|
|
122
|
+
import { createRequire } from "module";
|
|
123
|
+
import { fileURLToPath } from 'url';
|
|
124
|
+
import path from 'path';
|
|
116
125
|
const require = createRequire(import.meta.url);
|
|
126
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
127
|
+
const __dirname = path.dirname(__filename);
|
|
117
128
|
`,
|
|
118
129
|
},
|
|
119
130
|
logOverride: {
|
|
@@ -156,12 +167,16 @@ export async function bundle(dirPath, options) {
|
|
|
156
167
|
'wasi',
|
|
157
168
|
'worker_threads',
|
|
158
169
|
'zlib',
|
|
170
|
+
'chromium-bidi/lib/cjs/bidiMapper/BidiMapper',
|
|
171
|
+
'chromium-bidi/lib/cjs/cdp/CdpConnection',
|
|
159
172
|
// Your packages
|
|
160
173
|
'@mastra/core',
|
|
161
174
|
'@mastra/memory',
|
|
162
175
|
'@mastra/engine',
|
|
163
176
|
'@mastra/firecrawl',
|
|
164
177
|
'@mastra/github',
|
|
178
|
+
'@mastra/rag',
|
|
179
|
+
'@mastra/stabilityai',
|
|
165
180
|
],
|
|
166
181
|
});
|
|
167
182
|
// Log build results
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mastra",
|
|
3
|
-
"version": "0.1.57-unstable.
|
|
3
|
+
"version": "0.1.57-unstable.57",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "cli for mastra",
|
|
6
6
|
"type": "module",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"@clack/prompts": "^0.8.2",
|
|
26
26
|
"@dagrejs/dagre": "^1.1.4",
|
|
27
27
|
"@hookform/resolvers": "^3.9.0",
|
|
28
|
+
"@radix-ui/react-alert-dialog": "^1.1.2",
|
|
28
29
|
"@radix-ui/react-checkbox": "^1.1.1",
|
|
29
30
|
"@radix-ui/react-collapsible": "^1.1.0",
|
|
30
31
|
"@radix-ui/react-dialog": "^1.1.3",
|
|
@@ -82,6 +83,7 @@
|
|
|
82
83
|
"shiki": "^1.24.2",
|
|
83
84
|
"sonner": "^1.7.1",
|
|
84
85
|
"superjson": "^2.2.2",
|
|
86
|
+
"swr": "^2.2.5",
|
|
85
87
|
"tailwind-merge": "^2.5.5",
|
|
86
88
|
"tailwindcss-animate": "^1.0.7",
|
|
87
89
|
"tcp-port-used": "^1.0.2",
|
|
@@ -93,7 +95,7 @@
|
|
|
93
95
|
"yocto-spinner": "^0.1.1",
|
|
94
96
|
"zod": "^3.24.1",
|
|
95
97
|
"zod-to-json-schema": "^3.24.1",
|
|
96
|
-
"@mastra/core": "0.1.27-alpha.
|
|
98
|
+
"@mastra/core": "0.1.27-alpha.44"
|
|
97
99
|
},
|
|
98
100
|
"devDependencies": {
|
|
99
101
|
"@types/express": "^5.0.0",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=Object.freeze(JSON.parse('{"colors":{"actionBar.toggledBackground":"#383a49","activityBarBadge.background":"#007ACC","checkbox.border":"#6B6B6B","editor.background":"#1E1E1E","editor.foreground":"#D4D4D4","editor.inactiveSelectionBackground":"#3A3D41","editor.selectionHighlightBackground":"#ADD6FF26","editorIndentGuide.activeBackground1":"#707070","editorIndentGuide.background1":"#404040","input.placeholderForeground":"#A6A6A6","list.activeSelectionIconForeground":"#FFF","list.dropBackground":"#383B3D","menu.background":"#252526","menu.border":"#454545","menu.foreground":"#CCCCCC","menu.selectionBackground":"#0078d4","menu.separatorBackground":"#454545","ports.iconRunningProcessForeground":"#369432","sideBarSectionHeader.background":"#0000","sideBarSectionHeader.border":"#ccc3","sideBarTitle.foreground":"#BBBBBB","statusBarItem.remoteBackground":"#16825D","statusBarItem.remoteForeground":"#FFF","tab.lastPinnedBorder":"#ccc3","tab.selectedBackground":"#222222","tab.selectedForeground":"#ffffffa0","terminal.inactiveSelectionBackground":"#3A3D41","widget.border":"#303031"},"displayName":"Dark Plus","name":"dark-plus","semanticHighlighting":true,"semanticTokenColors":{"customLiteral":"#DCDCAA","newOperator":"#C586C0","numberLiteral":"#b5cea8","stringLiteral":"#ce9178"},"tokenColors":[{"scope":["meta.embedded","source.groovy.embedded","string meta.image.inline.markdown","variable.legacy.builtin.python"],"settings":{"foreground":"#D4D4D4"}},{"scope":"emphasis","settings":{"fontStyle":"italic"}},{"scope":"strong","settings":{"fontStyle":"bold"}},{"scope":"header","settings":{"foreground":"#000080"}},{"scope":"comment","settings":{"foreground":"#6A9955"}},{"scope":"constant.language","settings":{"foreground":"#569cd6"}},{"scope":["constant.numeric","variable.other.enummember","keyword.operator.plus.exponent","keyword.operator.minus.exponent"],"settings":{"foreground":"#b5cea8"}},{"scope":"constant.regexp","settings":{"foreground":"#646695"}},{"scope":"entity.name.tag","settings":{"foreground":"#569cd6"}},{"scope":["entity.name.tag.css","entity.name.tag.less"],"settings":{"foreground":"#d7ba7d"}},{"scope":"entity.other.attribute-name","settings":{"foreground":"#9cdcfe"}},{"scope":["entity.other.attribute-name.class.css","source.css entity.other.attribute-name.class","entity.other.attribute-name.id.css","entity.other.attribute-name.parent-selector.css","entity.other.attribute-name.parent.less","source.css entity.other.attribute-name.pseudo-class","entity.other.attribute-name.pseudo-element.css","source.css.less entity.other.attribute-name.id","entity.other.attribute-name.scss"],"settings":{"foreground":"#d7ba7d"}},{"scope":"invalid","settings":{"foreground":"#f44747"}},{"scope":"markup.underline","settings":{"fontStyle":"underline"}},{"scope":"markup.bold","settings":{"fontStyle":"bold","foreground":"#569cd6"}},{"scope":"markup.heading","settings":{"fontStyle":"bold","foreground":"#569cd6"}},{"scope":"markup.italic","settings":{"fontStyle":"italic"}},{"scope":"markup.strikethrough","settings":{"fontStyle":"strikethrough"}},{"scope":"markup.inserted","settings":{"foreground":"#b5cea8"}},{"scope":"markup.deleted","settings":{"foreground":"#ce9178"}},{"scope":"markup.changed","settings":{"foreground":"#569cd6"}},{"scope":"punctuation.definition.quote.begin.markdown","settings":{"foreground":"#6A9955"}},{"scope":"punctuation.definition.list.begin.markdown","settings":{"foreground":"#6796e6"}},{"scope":"markup.inline.raw","settings":{"foreground":"#ce9178"}},{"scope":"punctuation.definition.tag","settings":{"foreground":"#808080"}},{"scope":["meta.preprocessor","entity.name.function.preprocessor"],"settings":{"foreground":"#569cd6"}},{"scope":"meta.preprocessor.string","settings":{"foreground":"#ce9178"}},{"scope":"meta.preprocessor.numeric","settings":{"foreground":"#b5cea8"}},{"scope":"meta.structure.dictionary.key.python","settings":{"foreground":"#9cdcfe"}},{"scope":"meta.diff.header","settings":{"foreground":"#569cd6"}},{"scope":"storage","settings":{"foreground":"#569cd6"}},{"scope":"storage.type","settings":{"foreground":"#569cd6"}},{"scope":["storage.modifier","keyword.operator.noexcept"],"settings":{"foreground":"#569cd6"}},{"scope":["string","meta.embedded.assembly"],"settings":{"foreground":"#ce9178"}},{"scope":"string.tag","settings":{"foreground":"#ce9178"}},{"scope":"string.value","settings":{"foreground":"#ce9178"}},{"scope":"string.regexp","settings":{"foreground":"#d16969"}},{"scope":["punctuation.definition.template-expression.begin","punctuation.definition.template-expression.end","punctuation.section.embedded"],"settings":{"foreground":"#569cd6"}},{"scope":["meta.template.expression"],"settings":{"foreground":"#d4d4d4"}},{"scope":["support.type.vendored.property-name","support.type.property-name","source.css variable","source.coffee.embedded"],"settings":{"foreground":"#9cdcfe"}},{"scope":"keyword","settings":{"foreground":"#569cd6"}},{"scope":"keyword.control","settings":{"foreground":"#569cd6"}},{"scope":"keyword.operator","settings":{"foreground":"#d4d4d4"}},{"scope":["keyword.operator.new","keyword.operator.expression","keyword.operator.cast","keyword.operator.sizeof","keyword.operator.alignof","keyword.operator.typeid","keyword.operator.alignas","keyword.operator.instanceof","keyword.operator.logical.python","keyword.operator.wordlike"],"settings":{"foreground":"#569cd6"}},{"scope":"keyword.other.unit","settings":{"foreground":"#b5cea8"}},{"scope":["punctuation.section.embedded.begin.php","punctuation.section.embedded.end.php"],"settings":{"foreground":"#569cd6"}},{"scope":"support.function.git-rebase","settings":{"foreground":"#9cdcfe"}},{"scope":"constant.sha.git-rebase","settings":{"foreground":"#b5cea8"}},{"scope":["storage.modifier.import.java","variable.language.wildcard.java","storage.modifier.package.java"],"settings":{"foreground":"#d4d4d4"}},{"scope":"variable.language","settings":{"foreground":"#569cd6"}},{"scope":["entity.name.function","support.function","support.constant.handlebars","source.powershell variable.other.member","entity.name.operator.custom-literal"],"settings":{"foreground":"#DCDCAA"}},{"scope":["support.class","support.type","entity.name.type","entity.name.namespace","entity.other.attribute","entity.name.scope-resolution","entity.name.class","storage.type.numeric.go","storage.type.byte.go","storage.type.boolean.go","storage.type.string.go","storage.type.uintptr.go","storage.type.error.go","storage.type.rune.go","storage.type.cs","storage.type.generic.cs","storage.type.modifier.cs","storage.type.variable.cs","storage.type.annotation.java","storage.type.generic.java","storage.type.java","storage.type.object.array.java","storage.type.primitive.array.java","storage.type.primitive.java","storage.type.token.java","storage.type.groovy","storage.type.annotation.groovy","storage.type.parameters.groovy","storage.type.generic.groovy","storage.type.object.array.groovy","storage.type.primitive.array.groovy","storage.type.primitive.groovy"],"settings":{"foreground":"#4EC9B0"}},{"scope":["meta.type.cast.expr","meta.type.new.expr","support.constant.math","support.constant.dom","support.constant.json","entity.other.inherited-class","punctuation.separator.namespace.ruby"],"settings":{"foreground":"#4EC9B0"}},{"scope":["keyword.control","source.cpp keyword.operator.new","keyword.operator.delete","keyword.other.using","keyword.other.directive.using","keyword.other.operator","entity.name.operator"],"settings":{"foreground":"#C586C0"}},{"scope":["variable","meta.definition.variable.name","support.variable","entity.name.variable","constant.other.placeholder"],"settings":{"foreground":"#9CDCFE"}},{"scope":["variable.other.constant","variable.other.enummember"],"settings":{"foreground":"#4FC1FF"}},{"scope":["meta.object-literal.key"],"settings":{"foreground":"#9CDCFE"}},{"scope":["support.constant.property-value","support.constant.font-name","support.constant.media-type","support.constant.media","constant.other.color.rgb-value","constant.other.rgb-value","support.constant.color"],"settings":{"foreground":"#CE9178"}},{"scope":["punctuation.definition.group.regexp","punctuation.definition.group.assertion.regexp","punctuation.definition.character-class.regexp","punctuation.character.set.begin.regexp","punctuation.character.set.end.regexp","keyword.operator.negation.regexp","support.other.parenthesis.regexp"],"settings":{"foreground":"#CE9178"}},{"scope":["constant.character.character-class.regexp","constant.other.character-class.set.regexp","constant.other.character-class.regexp","constant.character.set.regexp"],"settings":{"foreground":"#d16969"}},{"scope":["keyword.operator.or.regexp","keyword.control.anchor.regexp"],"settings":{"foreground":"#DCDCAA"}},{"scope":"keyword.operator.quantifier.regexp","settings":{"foreground":"#d7ba7d"}},{"scope":["constant.character","constant.other.option"],"settings":{"foreground":"#569cd6"}},{"scope":"constant.character.escape","settings":{"foreground":"#d7ba7d"}},{"scope":"entity.name.label","settings":{"foreground":"#C8C8C8"}}],"type":"dark"}'));export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"./html-DG1TtFnM.js";import n from"./ruby-DsC6krmi.js";import"./javascript-DNgb01dh.js";import"./css-u4bm_LMz.js";import"./haml-B1jT_oKV.js";import"./xml-BOQ9RtXF.js";import"./java-BN40hmum.js";import"./sql-D8nBeWSR.js";import"./graphql-DqgCZ2sd.js";import"./typescript-CVESyXxo.js";import"./jsx-CM4fc1WH.js";import"./tsx-DqpEK-75.js";import"./cpp-IRqjNdQP.js";import"./regexp-DoiKbUTj.js";import"./glsl-bwZ1_LLM.js";import"./c-BhsLqr-4.js";import"./shellscript-HNM5thJl.js";import"./lua-B2--UKVN.js";import"./yaml-CIiI48o2.js";const t=Object.freeze(JSON.parse('{"displayName":"ERB","fileTypes":["erb","rhtml","html.erb"],"injections":{"text.html.erb - (meta.embedded.block.erb | meta.embedded.line.erb | comment)":{"patterns":[{"begin":"(^\\\\s*)(?=<%+#(?![^%]*%>))","beginCaptures":{"0":{"name":"punctuation.whitespace.comment.leading.erb"}},"end":"(?!\\\\G)(\\\\s*$\\\\n)?","endCaptures":{"0":{"name":"punctuation.whitespace.comment.trailing.erb"}},"patterns":[{"include":"#comment"}]},{"begin":"(^\\\\s*)(?=<%(?![^%]*%>))","beginCaptures":{"0":{"name":"punctuation.whitespace.embedded.leading.erb"}},"end":"(?!\\\\G)(\\\\s*$\\\\n)?","endCaptures":{"0":{"name":"punctuation.whitespace.embedded.trailing.erb"}},"patterns":[{"include":"#tags"}]},{"include":"#comment"},{"include":"#tags"}]}},"name":"erb","patterns":[{"include":"text.html.basic"}],"repository":{"comment":{"patterns":[{"begin":"<%+#","beginCaptures":{"0":{"name":"punctuation.definition.comment.begin.erb"}},"end":"%>","endCaptures":{"0":{"name":"punctuation.definition.comment.end.erb"}},"name":"comment.block.erb"}]},"tags":{"patterns":[{"begin":"<%+(?!>)[-=]?(?![^%]*%>)","beginCaptures":{"0":{"name":"punctuation.section.embedded.begin.erb"}},"contentName":"source.ruby","end":"(-?%)>","endCaptures":{"0":{"name":"punctuation.section.embedded.end.erb"},"1":{"name":"source.ruby"}},"name":"meta.embedded.block.erb","patterns":[{"captures":{"1":{"name":"punctuation.definition.comment.erb"}},"match":"(#).*?(?=-?%>)","name":"comment.line.number-sign.erb"},{"include":"source.ruby"}]},{"begin":"<%+(?!>)[-=]?","beginCaptures":{"0":{"name":"punctuation.section.embedded.begin.erb"}},"contentName":"source.ruby","end":"(-?%)>","endCaptures":{"0":{"name":"punctuation.section.embedded.end.erb"},"1":{"name":"source.ruby"}},"name":"meta.embedded.line.erb","patterns":[{"captures":{"1":{"name":"punctuation.definition.comment.erb"}},"match":"(#).*?(?=-?%>)","name":"comment.line.number-sign.erb"},{"include":"source.ruby"}]}]}},"scopeName":"text.html.erb","embeddedLangs":["html","ruby"]}')),x=[...e,...n,t];export{x as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"./gdshader-BSHf-0eb.js";import r from"./gdscript-
|
|
1
|
+
import e from"./gdshader-BSHf-0eb.js";import r from"./gdscript-BVlVXSjx.js";const a=Object.freeze(JSON.parse(`{"displayName":"GDResource","name":"gdresource","patterns":[{"include":"#embedded_shader"},{"include":"#embedded_gdscript"},{"include":"#comment"},{"include":"#heading"},{"include":"#key_value"}],"repository":{"comment":{"captures":{"1":{"name":"punctuation.definition.comment.gdresource"}},"match":"(;).*$\\\\n?","name":"comment.line.gdresource"},"data":{"patterns":[{"include":"#comment"},{"begin":"(?<!\\\\w)(\\\\{)\\\\s*","beginCaptures":{"1":{"name":"punctuation.definition.table.inline.gdresource"}},"end":"\\\\s*(\\\\})(?!\\\\w)","endCaptures":{"1":{"name":"punctuation.definition.table.inline.gdresource"}},"patterns":[{"include":"#key_value"},{"include":"#data"}]},{"begin":"(?<!\\\\w)(\\\\[)\\\\s*","beginCaptures":{"1":{"name":"punctuation.definition.array.gdresource"}},"end":"\\\\s*(\\\\])(?!\\\\w)","endCaptures":{"1":{"name":"punctuation.definition.array.gdresource"}},"patterns":[{"include":"#data"}]},{"begin":"\\"\\"\\"","end":"\\"\\"\\"","name":"string.quoted.triple.basic.block.gdresource","patterns":[{"match":"\\\\\\\\([btnfr\\"\\\\\\\\\\\\n/ ]|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})","name":"constant.character.escape.gdresource"},{"match":"\\\\\\\\[^btnfr/\\"\\\\\\\\\\\\n]","name":"invalid.illegal.escape.gdresource"}]},{"match":"\\"res:\\\\/\\\\/[^\\"\\\\\\\\]*(?:\\\\\\\\.[^\\"\\\\\\\\]*)*\\"","name":"support.function.any-method.gdresource"},{"match":"(?<=type=)\\"[^\\"\\\\\\\\]*(?:\\\\\\\\.[^\\"\\\\\\\\]*)*\\"","name":"support.class.library.gdresource"},{"match":"(?<=NodePath\\\\(|parent=|name=)\\"[^\\"\\\\\\\\]*(?:\\\\\\\\.[^\\"\\\\\\\\]*)*\\"","name":"constant.character.escape.gdresource"},{"begin":"\\"","end":"\\"","name":"string.quoted.double.basic.line.gdresource","patterns":[{"match":"\\\\\\\\([btnfr\\"\\\\\\\\\\\\n/ ]|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})","name":"constant.character.escape.gdresource"},{"match":"\\\\\\\\[^btnfr/\\"\\\\\\\\\\\\n]","name":"invalid.illegal.escape.gdresource"}]},{"match":"'.*?'","name":"string.quoted.single.literal.line.gdresource"},{"match":"(?<!\\\\w)(true|false)(?!\\\\w)","name":"constant.language.gdresource"},{"match":"(?<!\\\\w)([+\\\\-]?(0|([1-9]((\\\\d|_\\\\d)+)?))(?:(?:\\\\.(0|([1-9]((\\\\d|_\\\\d)+)?)))?[eE][+\\\\-]?[1-9]_?\\\\d*|(?:\\\\.[0-9_]*)))(?!\\\\w)","name":"constant.numeric.float.gdresource"},{"match":"(?<!\\\\w)((?:[+\\\\-]?(0|([1-9]((\\\\d|_\\\\d)+)?))))(?!\\\\w)","name":"constant.numeric.integer.gdresource"},{"match":"(?<!\\\\w)([+\\\\-]?inf)(?!\\\\w)","name":"constant.numeric.inf.gdresource"},{"match":"(?<!\\\\w)([+\\\\-]?nan)(?!\\\\w)","name":"constant.numeric.nan.gdresource"},{"match":"(?<!\\\\w)((?:0x(([0-9a-fA-F](([0-9a-fA-F]|_[0-9a-fA-F])+)?))))(?!\\\\w)","name":"constant.numeric.hex.gdresource"},{"match":"(?<!\\\\w)(0o[0-7](_?[0-7])*)(?!\\\\w)","name":"constant.numeric.oct.gdresource"},{"match":"(?<!\\\\w)(0b[01](_?[01])*)(?!\\\\w)","name":"constant.numeric.bin.gdresource"},{"begin":"(?<!\\\\w)(Vector2|Vector2i|Vector3|Vector3i|Color|Rect2|Rect2i|Array|Basis|Dictionary|Plane|Quat|RID|Rect3|Transform|Transform2D|Transform3D|AABB|String|Color|NodePath|Object|PoolByteArray|PoolIntArray|PoolRealArray|PoolStringArray|PoolVector2Array|PoolVector3Array|PoolColorArray|bool|int|float|StringName|Quaternion|PackedByteArray|PackedInt32Array|PackedInt64Array|PackedFloat32Array|PackedFloat64Array|PackedStringArray|PackedVector2Array|PackedVector2iArray|PackedVector3Array|PackedVector3iArray|PackedColorArray)(\\\\()\\\\s?","beginCaptures":{"1":{"name":"support.class.library.gdresource"}},"end":"\\\\s?(\\\\))","patterns":[{"include":"#key_value"},{"include":"#data"}]},{"begin":"(?<!\\\\w)(ExtResource|SubResource)(\\\\()\\\\s?","beginCaptures":{"1":{"name":"keyword.control.gdresource"}},"end":"\\\\s?(\\\\))","patterns":[{"include":"#key_value"},{"include":"#data"}]}]},"embedded_gdscript":{"begin":"(script/source) = \\"","beginCaptures":{"1":{"name":"variable.other.property.gdresource"}},"comment":"meta.embedded.block.gdscript","end":"\\"","patterns":[{"include":"source.gdscript"}]},"embedded_shader":{"begin":"(code) = \\"","beginCaptures":{"1":{"name":"variable.other.property.gdresource"}},"end":"\\"","name":"meta.embedded.block.gdshader","patterns":[{"include":"source.gdshader"}]},"heading":{"begin":"\\\\[([a-z_]*)\\\\s?","beginCaptures":{"1":{"name":"keyword.control.gdresource"}},"end":"\\\\]","patterns":[{"include":"#heading_properties"},{"include":"#data"}]},"heading_properties":{"patterns":[{"match":"(\\\\s*[A-Za-z_\\\\-][A-Za-z0-9_\\\\-]*\\\\s*=)(?=\\\\s*$)","name":"invalid.illegal.noValue.gdresource"},{"begin":"\\\\s*([A-Za-z_-][^\\\\s]*|\\".+\\"|'.+'|\\\\d+)\\\\s*(=)\\\\s*","beginCaptures":{"1":{"name":"variable.other.property.gdresource"},"2":{"name":"punctuation.definition.keyValue.gdresource"}},"end":"($|(?==)|\\\\,?|\\\\s*(?=\\\\}))","patterns":[{"include":"#data"}]}]},"key_value":{"patterns":[{"match":"(\\\\s*[A-Za-z_\\\\-][A-Za-z0-9_\\\\-]*\\\\s*=)(?=\\\\s*$)","name":"invalid.illegal.noValue.gdresource"},{"begin":"\\\\s*([A-Za-z_-][^\\\\s]*|\\".+\\"|'.+'|\\\\d+)\\\\s*(=)\\\\s*","beginCaptures":{"1":{"name":"variable.other.property.gdresource"},"2":{"name":"punctuation.definition.keyValue.gdresource"}},"end":"($|(?==)|\\\\,|\\\\s*(?=\\\\}))","patterns":[{"include":"#data"}]}]}},"scopeName":"source.gdresource","embeddedLangs":["gdshader","gdscript"]}`)),c=[...e,...r,a];export{c as default};
|