@mastra/deployer 0.1.6-alpha.1 → 0.1.6-alpha.4
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/.turbo/turbo-build.log +26 -14
- package/CHANGELOG.md +30 -0
- package/dist/_tsup-dts-rollup.d.cts +375 -0
- package/dist/build/analyze.cjs +364 -0
- package/dist/build/analyze.d.cts +1 -0
- package/dist/build/analyze.js +2 -2
- package/dist/build/bundler.cjs +350 -0
- package/dist/build/bundler.d.cts +2 -0
- package/dist/build/bundler.js +2 -2
- package/dist/build/index.cjs +1144 -0
- package/dist/build/index.d.cts +10 -0
- package/dist/build/index.js +5 -5
- package/dist/bundler/index.cjs +997 -0
- package/dist/bundler/index.d.cts +1 -0
- package/dist/bundler/index.js +5 -5
- package/dist/{chunk-KXS4XYEJ.js → chunk-AC67BJSW.js} +24 -15
- package/dist/{chunk-VANRMAOD.js → chunk-AV33GZ7F.js} +3 -3
- package/dist/{chunk-AXS5WSIK.js → chunk-NSQJ2X7J.js} +36 -34
- package/dist/{chunk-YNXJO2XU.js → chunk-PT5XTSU2.js} +9 -12
- package/dist/{chunk-BTUQ6UBB.js → chunk-UTCL3MQF.js} +3 -3
- package/dist/{chunk-SESHBX76.js → chunk-X5EDXVOK.js} +10 -3
- package/dist/index.cjs +1228 -0
- package/dist/index.d.cts +6 -0
- package/dist/index.js +37 -35
- package/dist/server/index.cjs +5164 -0
- package/dist/server/index.d.cts +2 -0
- package/dist/server/index.js +13 -7
- package/package.json +39 -11
- package/src/build/analyze.ts +10 -2
- package/src/build/babel/get-deployer.ts +29 -32
- package/src/build/babel/get-telemetry-config.ts +38 -41
- package/src/build/babel/remove-deployer.ts +12 -19
- package/src/build/bundler.ts +23 -14
- package/src/build/deployer.ts +9 -2
- package/src/build/telemetry.ts +9 -3
- package/src/server/handlers/agents.ts +10 -4
- package/src/server/handlers/vector.ts +3 -3
- package/src/server/openapi.json +10 -2
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,29 +1,41 @@
|
|
|
1
1
|
|
|
2
|
-
> @mastra/deployer@0.1.6-alpha.
|
|
3
|
-
> tsup src/index.ts src/build/index.ts src/server/index.ts src/build/bundler.ts src/build/analyze.ts src/bundler/index.ts --format esm --clean --experimental-dts --treeshake --publicDir
|
|
2
|
+
> @mastra/deployer@0.1.6-alpha.4 build /home/runner/work/mastra/mastra/packages/deployer
|
|
3
|
+
> tsup src/index.ts src/build/index.ts src/server/index.ts src/build/bundler.ts src/build/analyze.ts src/bundler/index.ts --format esm,cjs --clean --experimental-dts --treeshake --publicDir
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts, src/build/analyze.ts, src/build/bundler.ts, src/build/index.ts, src/bundler/index.ts, src/server/index.ts
|
|
6
6
|
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
7
7
|
[34mCLI[39m tsup v8.3.6
|
|
8
8
|
[34mTSC[39m Build start
|
|
9
|
-
[32mTSC[39m ⚡️ Build success in
|
|
9
|
+
[32mTSC[39m ⚡️ Build success in 18147ms
|
|
10
10
|
[34mDTS[39m Build start
|
|
11
11
|
[34mCLI[39m Target: es2022
|
|
12
12
|
Analysis will use the bundled TypeScript version 5.7.3
|
|
13
13
|
[36mWriting package typings: /home/runner/work/mastra/mastra/packages/deployer/dist/_tsup-dts-rollup.d.ts[39m
|
|
14
|
-
|
|
14
|
+
Analysis will use the bundled TypeScript version 5.7.3
|
|
15
|
+
[36mWriting package typings: /home/runner/work/mastra/mastra/packages/deployer/dist/_tsup-dts-rollup.d.cts[39m
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 12265ms
|
|
15
17
|
[34mCLI[39m Cleaning output folder
|
|
16
18
|
[34mESM[39m Build start
|
|
17
|
-
[
|
|
19
|
+
[34mCJS[39m Build start
|
|
20
|
+
"nodeResolve" is imported from external module "@rollup/plugin-node-resolve" but never used in "dist/index.cjs".
|
|
21
|
+
"watch" is imported from external module "rollup" but never used in "dist/index.cjs".
|
|
22
|
+
[32mESM[39m [1mdist/index.js [22m[32m3.74 KB[39m
|
|
18
23
|
[32mESM[39m [1mdist/build/analyze.js [22m[32m85.00 B[39m
|
|
19
|
-
[32mESM[39m [1mdist/build/bundler.js [22m[32m102.00 B[39m
|
|
20
24
|
[32mESM[39m [1mdist/build/index.js [22m[32m383.00 B[39m
|
|
21
|
-
[32mESM[39m [1mdist/chunk-
|
|
25
|
+
[32mESM[39m [1mdist/chunk-UTCL3MQF.js [22m[32m7.41 KB[39m
|
|
26
|
+
[32mESM[39m [1mdist/build/bundler.js [22m[32m102.00 B[39m
|
|
22
27
|
[32mESM[39m [1mdist/bundler/index.js [22m[32m172.00 B[39m
|
|
23
|
-
[32mESM[39m [1mdist/chunk-
|
|
24
|
-
[32mESM[39m [1mdist/chunk-
|
|
25
|
-
[32mESM[39m [1mdist/chunk-
|
|
26
|
-
[32mESM[39m [1mdist/chunk-
|
|
27
|
-
[32mESM[39m [1mdist/chunk-
|
|
28
|
-
[32mESM[39m [1mdist/server/index.js [22m[
|
|
29
|
-
[32mESM[39m ⚡️ Build success in
|
|
28
|
+
[32mESM[39m [1mdist/chunk-AV33GZ7F.js [22m[32m4.40 KB[39m
|
|
29
|
+
[32mESM[39m [1mdist/chunk-NSQJ2X7J.js [22m[32m8.26 KB[39m
|
|
30
|
+
[32mESM[39m [1mdist/chunk-X5EDXVOK.js [22m[32m8.45 KB[39m
|
|
31
|
+
[32mESM[39m [1mdist/chunk-AC67BJSW.js [22m[32m7.44 KB[39m
|
|
32
|
+
[32mESM[39m [1mdist/chunk-PT5XTSU2.js [22m[32m1.86 KB[39m
|
|
33
|
+
[32mESM[39m [1mdist/server/index.js [22m[32m155.05 KB[39m
|
|
34
|
+
[32mESM[39m ⚡️ Build success in 4685ms
|
|
35
|
+
[32mCJS[39m [1mdist/build/bundler.cjs [22m[32m10.25 KB[39m
|
|
36
|
+
[32mCJS[39m [1mdist/bundler/index.cjs [22m[32m31.39 KB[39m
|
|
37
|
+
[32mCJS[39m [1mdist/build/analyze.cjs [22m[32m11.21 KB[39m
|
|
38
|
+
[32mCJS[39m [1mdist/build/index.cjs [22m[32m34.84 KB[39m
|
|
39
|
+
[32mCJS[39m [1mdist/server/index.cjs [22m[32m156.10 KB[39m
|
|
40
|
+
[32mCJS[39m [1mdist/index.cjs [22m[32m38.28 KB[39m
|
|
41
|
+
[32mCJS[39m ⚡️ Build success in 4686ms
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# @mastra/deployer
|
|
2
2
|
|
|
3
|
+
## 0.1.6-alpha.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [dabecf4]
|
|
8
|
+
- @mastra/core@0.4.3-alpha.4
|
|
9
|
+
|
|
10
|
+
## 0.1.6-alpha.3
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- 0fd78ac: Update vector store functions to use object params
|
|
15
|
+
- 0d25b75: Add all agent stream,generate option to cliend-js sdk
|
|
16
|
+
- bb4f447: Add support for commonjs
|
|
17
|
+
- Updated dependencies [0fd78ac]
|
|
18
|
+
- Updated dependencies [0d25b75]
|
|
19
|
+
- Updated dependencies [fd14a3f]
|
|
20
|
+
- Updated dependencies [3f369a2]
|
|
21
|
+
- Updated dependencies [4d4e1e1]
|
|
22
|
+
- Updated dependencies [bb4f447]
|
|
23
|
+
- @mastra/core@0.4.3-alpha.3
|
|
24
|
+
|
|
25
|
+
## 0.1.6-alpha.2
|
|
26
|
+
|
|
27
|
+
### Patch Changes
|
|
28
|
+
|
|
29
|
+
- Updated dependencies [2512a93]
|
|
30
|
+
- Updated dependencies [e62de74]
|
|
31
|
+
- @mastra/core@0.4.3-alpha.2
|
|
32
|
+
|
|
3
33
|
## 0.1.6-alpha.1
|
|
4
34
|
|
|
5
35
|
### Patch Changes
|
|
@@ -0,0 +1,375 @@
|
|
|
1
|
+
import { default as babel_2 } from '@babel/core';
|
|
2
|
+
import { BlankSchema } from 'hono/types';
|
|
3
|
+
import { ContentfulStatusCode } from 'hono/utils/http-status';
|
|
4
|
+
import type { Context } from 'hono';
|
|
5
|
+
import { Hono } from 'hono';
|
|
6
|
+
import type { IDeployer } from '@mastra/core/deployer';
|
|
7
|
+
import { InputOption } from 'rollup';
|
|
8
|
+
import { InputOptions } from 'rollup';
|
|
9
|
+
import type { Logger } from '@mastra/core/logger';
|
|
10
|
+
import type { Logger as Logger_2 } from '@mastra/core';
|
|
11
|
+
import type { Mastra } from '@mastra/core';
|
|
12
|
+
import { MastraBase } from '@mastra/core/base';
|
|
13
|
+
import { MastraBundler } from '@mastra/core/bundler';
|
|
14
|
+
import type { MastraDeployer } from '@mastra/core';
|
|
15
|
+
import type { MastraVector } from '@mastra/core/vector';
|
|
16
|
+
import { OutputOptions } from 'rollup';
|
|
17
|
+
import { Plugin } from 'rollup';
|
|
18
|
+
import { PluginContext } from 'rollup';
|
|
19
|
+
import { RenderedChunk } from 'rollup';
|
|
20
|
+
import { RollupBuild } from 'rollup';
|
|
21
|
+
import { RollupOutput } from 'rollup';
|
|
22
|
+
import { RollupWatcher } from 'rollup';
|
|
23
|
+
import { ServerType } from '@hono/node-server';
|
|
24
|
+
import { Transform } from 'stream';
|
|
25
|
+
import { TypedResponse } from 'hono';
|
|
26
|
+
|
|
27
|
+
export declare function aliasHono(): Plugin;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Main bundle analysis function that orchestrates the three-step process:
|
|
31
|
+
* 1. Analyze dependencies
|
|
32
|
+
* 2. Bundle dependencies modules
|
|
33
|
+
* 3. Validate generated bundles
|
|
34
|
+
*
|
|
35
|
+
* This helps identify which dependencies need to be externalized vs bundled.
|
|
36
|
+
*/
|
|
37
|
+
declare function analyzeBundle(entry: string, mastraEntry: string, outputDir: string, platform: 'node' | 'browser', logger: Logger_2): Promise<{
|
|
38
|
+
invalidChunks: Set<string>;
|
|
39
|
+
dependencies: Map<string, string>;
|
|
40
|
+
externalDependencies: Set<string>;
|
|
41
|
+
}>;
|
|
42
|
+
export { analyzeBundle }
|
|
43
|
+
export { analyzeBundle as analyzeBundle_alias_1 }
|
|
44
|
+
|
|
45
|
+
export declare interface ApiError extends Error {
|
|
46
|
+
message: string;
|
|
47
|
+
status?: number;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
declare type Bindings = {};
|
|
51
|
+
|
|
52
|
+
export declare abstract class Bundler extends MastraBundler {
|
|
53
|
+
protected analyzeOutputDir: string;
|
|
54
|
+
protected outputDir: string;
|
|
55
|
+
constructor(name: string, component?: 'BUNDLER' | 'DEPLOYER');
|
|
56
|
+
prepare(outputDirectory: string): Promise<void>;
|
|
57
|
+
writeInstrumentationFile(outputDirectory: string): Promise<void>;
|
|
58
|
+
writePackageJson(outputDirectory: string, dependencies: Map<string, string>): Promise<void>;
|
|
59
|
+
protected createBundler(inputOptions: InputOptions, outputOptions: Partial<OutputOptions> & {
|
|
60
|
+
dir: string;
|
|
61
|
+
}): Promise<{
|
|
62
|
+
write: () => Promise<RollupOutput>;
|
|
63
|
+
close: () => Promise<void>;
|
|
64
|
+
}>;
|
|
65
|
+
protected analyze(entry: string, mastraFile: string, outputDirectory: string): Promise<{
|
|
66
|
+
invalidChunks: Set<string>;
|
|
67
|
+
dependencies: Map<string, string>;
|
|
68
|
+
externalDependencies: Set<string>;
|
|
69
|
+
}>;
|
|
70
|
+
protected installDependencies(outputDirectory: string, rootDir?: string): Promise<void>;
|
|
71
|
+
protected _bundle(serverFile: string, mastraEntryFile: string, outputDirectory: string, bundleLocation?: string): Promise<void>;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
declare function createBundler(inputOptions: InputOptions, outputOptions: Partial<OutputOptions> & {
|
|
75
|
+
dir: string;
|
|
76
|
+
}): Promise<{
|
|
77
|
+
write: () => Promise<RollupOutput>;
|
|
78
|
+
close: () => Promise<void>;
|
|
79
|
+
}>;
|
|
80
|
+
export { createBundler }
|
|
81
|
+
export { createBundler as createBundler_alias_1 }
|
|
82
|
+
|
|
83
|
+
declare function createChildProcessLogger({ logger, root }: {
|
|
84
|
+
logger: Logger;
|
|
85
|
+
root: string;
|
|
86
|
+
}): ({ cmd, args, env }: {
|
|
87
|
+
cmd: string;
|
|
88
|
+
args: string[];
|
|
89
|
+
env: Record<string, string>;
|
|
90
|
+
}) => Promise<unknown>;
|
|
91
|
+
export { createChildProcessLogger }
|
|
92
|
+
export { createChildProcessLogger as createChildProcessLogger_alias_1 }
|
|
93
|
+
export { createChildProcessLogger as createChildProcessLogger_alias_2 }
|
|
94
|
+
|
|
95
|
+
export declare function createHonoServer(mastra: Mastra, options?: {
|
|
96
|
+
playground?: boolean;
|
|
97
|
+
swaggerUI?: boolean;
|
|
98
|
+
apiReqLogs?: boolean;
|
|
99
|
+
}): Promise<Hono<{
|
|
100
|
+
Bindings: Bindings;
|
|
101
|
+
Variables: Variables;
|
|
102
|
+
}, BlankSchema, "/">>;
|
|
103
|
+
|
|
104
|
+
export declare function createIndex(c: Context): Promise<Response>;
|
|
105
|
+
|
|
106
|
+
export declare function createNodeServer(mastra: Mastra, options?: {
|
|
107
|
+
playground?: boolean;
|
|
108
|
+
swaggerUI?: boolean;
|
|
109
|
+
apiReqLogs?: boolean;
|
|
110
|
+
}): Promise<ServerType>;
|
|
111
|
+
|
|
112
|
+
declare const createPinoStream: (logger: Logger) => Transform;
|
|
113
|
+
export { createPinoStream }
|
|
114
|
+
export { createPinoStream as createPinoStream_alias_1 }
|
|
115
|
+
export { createPinoStream as createPinoStream_alias_2 }
|
|
116
|
+
|
|
117
|
+
export declare function createThreadHandler(c: Context): Promise<Response>;
|
|
118
|
+
|
|
119
|
+
declare function createWatcher(inputOptions: InputOptions, outputOptions: OutputOptions): Promise<RollupWatcher>;
|
|
120
|
+
export { createWatcher }
|
|
121
|
+
export { createWatcher as createWatcher_alias_1 }
|
|
122
|
+
|
|
123
|
+
export declare function deleteIndex(c: Context): Promise<Response>;
|
|
124
|
+
|
|
125
|
+
export declare function deleteThreadHandler(c: Context): Promise<Response>;
|
|
126
|
+
|
|
127
|
+
declare abstract class Deployer extends Bundler implements IDeployer {
|
|
128
|
+
deps: Deps;
|
|
129
|
+
constructor(args: {
|
|
130
|
+
name: string;
|
|
131
|
+
});
|
|
132
|
+
getEnvFiles(): Promise<string[]>;
|
|
133
|
+
abstract deploy(outputDirectory: string): Promise<void>;
|
|
134
|
+
}
|
|
135
|
+
export { Deployer }
|
|
136
|
+
export { Deployer as Deployer_alias_1 }
|
|
137
|
+
export { Deployer as Deployer_alias_2 }
|
|
138
|
+
|
|
139
|
+
declare class Deps extends MastraBase {
|
|
140
|
+
private packageManager;
|
|
141
|
+
private rootDir;
|
|
142
|
+
constructor(rootDir?: string);
|
|
143
|
+
private findLockFile;
|
|
144
|
+
private getPackageManager;
|
|
145
|
+
install({ dir, packages }: {
|
|
146
|
+
dir?: string;
|
|
147
|
+
packages?: string[];
|
|
148
|
+
}): Promise<unknown>;
|
|
149
|
+
installPackages(packages: string[]): Promise<unknown>;
|
|
150
|
+
checkDependencies(dependencies: string[]): Promise<string>;
|
|
151
|
+
getProjectName(): Promise<any>;
|
|
152
|
+
getPackageVersion(): Promise<string | undefined>;
|
|
153
|
+
addScriptsToPackageJson(scripts: Record<string, string>): Promise<void>;
|
|
154
|
+
}
|
|
155
|
+
export { Deps }
|
|
156
|
+
export { Deps as Deps_alias_1 }
|
|
157
|
+
export { Deps as Deps_alias_2 }
|
|
158
|
+
|
|
159
|
+
export declare function describeIndex(c: Context): Promise<Response>;
|
|
160
|
+
|
|
161
|
+
export declare abstract class EnvService {
|
|
162
|
+
abstract getEnvValue(key: string): Promise<string | null>;
|
|
163
|
+
abstract setEnvValue(key: string, value: string): Promise<void>;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export declare function errorHandler(err: Error, c: Context): Response;
|
|
167
|
+
|
|
168
|
+
export declare function executeAgentToolHandler(c: Context): Promise<Response>;
|
|
169
|
+
|
|
170
|
+
export declare function executeToolHandler(tools: Record<string, any>): (c: Context) => Promise<Response>;
|
|
171
|
+
|
|
172
|
+
export declare function executeWorkflowHandler(c: Context): Promise<Response>;
|
|
173
|
+
|
|
174
|
+
export declare class FileEnvService extends EnvService {
|
|
175
|
+
private filePath;
|
|
176
|
+
constructor(filePath: string);
|
|
177
|
+
private readFile;
|
|
178
|
+
private writeFile;
|
|
179
|
+
private updateEnvData;
|
|
180
|
+
getEnvValue(key: string): Promise<string | null>;
|
|
181
|
+
setEnvValue(key: string, value: string): Promise<void>;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
declare class FileService {
|
|
185
|
+
/**
|
|
186
|
+
*
|
|
187
|
+
* @param inputFile the file in the starter files directory to copy
|
|
188
|
+
* @param outputFilePath the destination path
|
|
189
|
+
* @param replaceIfExists flag to replace if it exists
|
|
190
|
+
* @returns
|
|
191
|
+
*/
|
|
192
|
+
copyStarterFile(inputFile: string, outputFilePath: string, replaceIfExists?: boolean): Promise<boolean>;
|
|
193
|
+
setupEnvFile({ dbUrl }: {
|
|
194
|
+
dbUrl: string;
|
|
195
|
+
}): Promise<void>;
|
|
196
|
+
getFirstExistingFile(files: string[]): string;
|
|
197
|
+
replaceValuesInFile({ filePath, replacements, }: {
|
|
198
|
+
filePath: string;
|
|
199
|
+
replacements: {
|
|
200
|
+
search: string;
|
|
201
|
+
replace: string;
|
|
202
|
+
}[];
|
|
203
|
+
}): void;
|
|
204
|
+
}
|
|
205
|
+
export { FileService }
|
|
206
|
+
export { FileService as FileService_alias_1 }
|
|
207
|
+
export { FileService as FileService_alias_2 }
|
|
208
|
+
|
|
209
|
+
export declare function generateHandler(c: Context): Promise<Response>;
|
|
210
|
+
|
|
211
|
+
export declare function generateSystemPromptHandler(c: Context): Promise<Response>;
|
|
212
|
+
|
|
213
|
+
export declare function getAgentByIdHandler(c: Context): Promise<Response>;
|
|
214
|
+
|
|
215
|
+
export declare function getAgentsHandler(c: Context): Promise<Response>;
|
|
216
|
+
|
|
217
|
+
declare function getBundler(inputOptions: NormalizedInputOptions, args?: {
|
|
218
|
+
platform?: 'node' | 'browser';
|
|
219
|
+
dir?: string;
|
|
220
|
+
}): Promise<RollupBuild>;
|
|
221
|
+
export { getBundler }
|
|
222
|
+
export { getBundler as getBundler_alias_1 }
|
|
223
|
+
|
|
224
|
+
declare function getDeployer(entryFile: string, outputDir: string): Promise<MastraDeployer>;
|
|
225
|
+
export { getDeployer }
|
|
226
|
+
export { getDeployer as getDeployer_alias_1 }
|
|
227
|
+
|
|
228
|
+
export declare function getEvalsByAgentIdHandler(c: Context): Promise<Response>;
|
|
229
|
+
|
|
230
|
+
declare function getInputOptions(entryFile: string, analyzedBundleInfo: Awaited<ReturnType<typeof analyzeBundle>>, platform: 'node' | 'browser'): Promise<InputOptions>;
|
|
231
|
+
export { getInputOptions as getBundlerInputOptions }
|
|
232
|
+
export { getInputOptions }
|
|
233
|
+
|
|
234
|
+
declare function getInputOptions_2(entryFile: string, platform: 'node' | 'browser'): Promise<InputOptions>;
|
|
235
|
+
export { getInputOptions_2 as getInputOptions_alias_1 }
|
|
236
|
+
export { getInputOptions_2 as getWatcherInputOptions }
|
|
237
|
+
|
|
238
|
+
export declare function getLiveEvalsByAgentIdHandler(c: Context): Promise<Response>;
|
|
239
|
+
|
|
240
|
+
export declare function getLogsByRunIdHandler(c: Context): Promise<Response>;
|
|
241
|
+
|
|
242
|
+
export declare function getLogsHandler(c: Context): Promise<Response>;
|
|
243
|
+
|
|
244
|
+
export declare function getLogTransports(c: Context): Promise<Response>;
|
|
245
|
+
|
|
246
|
+
export declare function getMemoryStatusHandler(c: Context): Promise<Response>;
|
|
247
|
+
|
|
248
|
+
export declare function getMessagesHandler(c: Context): Promise<Response>;
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* Get available speakers for an agent
|
|
252
|
+
*/
|
|
253
|
+
export declare function getSpeakersHandler(c: Context): Promise<Response>;
|
|
254
|
+
|
|
255
|
+
export declare function getTelemetryHandler(c: Context): Promise<Response>;
|
|
256
|
+
|
|
257
|
+
export declare function getThreadByIdHandler(c: Context): Promise<Response>;
|
|
258
|
+
|
|
259
|
+
export declare function getThreadsHandler(c: Context): Promise<Response>;
|
|
260
|
+
|
|
261
|
+
export declare function getToolByIdHandler(c: Context): Promise<Response>;
|
|
262
|
+
|
|
263
|
+
export declare function getToolsHandler(c: Context): Promise<Response>;
|
|
264
|
+
|
|
265
|
+
export declare const getVector: (c: Context, vectorName: string) => MastraVector;
|
|
266
|
+
|
|
267
|
+
declare function getWatcher(inputOptions: NormalizedInputOptions, args?: {
|
|
268
|
+
platform?: 'node' | 'browser';
|
|
269
|
+
dir?: string;
|
|
270
|
+
}): Promise<RollupWatcher>;
|
|
271
|
+
export { getWatcher }
|
|
272
|
+
export { getWatcher as getWatcher_alias_1 }
|
|
273
|
+
|
|
274
|
+
export declare function getWorkflowByIdHandler(c: Context): Promise<Response>;
|
|
275
|
+
|
|
276
|
+
export declare function getWorkflowsHandler(c: Context): Promise<Response>;
|
|
277
|
+
|
|
278
|
+
export declare function handleClientsRefresh(c: Context): Response;
|
|
279
|
+
|
|
280
|
+
export declare function handleError(error: unknown, defaultMessage: string): Promise<Response>;
|
|
281
|
+
|
|
282
|
+
export declare function handleTriggerClientsRefresh(c: Context): Response & TypedResponse< {
|
|
283
|
+
success: true;
|
|
284
|
+
clients: number;
|
|
285
|
+
}, ContentfulStatusCode, "json">;
|
|
286
|
+
|
|
287
|
+
export declare const html = "\n<!doctype html>\n<html lang=\"en\">\n <head>\n <meta charset=\"UTF-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n <title>Welcome to Mastra</title>\n <link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/inter-ui/3.19.3/inter.min.css\" />\n <style>\n body {\n margin: 0;\n padding: 0;\n background-color: #0d0d0d;\n color: #ffffff;\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n system-ui,\n sans-serif;\n min-height: 100vh;\n display: flex;\n flex-direction: column;\n }\n\n main {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 2rem;\n text-align: center;\n }\n\n h1 {\n font-size: 4rem;\n font-weight: 600;\n margin: 0 0 1rem 0;\n background: linear-gradient(to right, #fff, #ccc);\n -webkit-background-clip: text;\n -webkit-text-fill-color: transparent;\n line-height: 1.2;\n }\n\n .subtitle {\n color: #9ca3af;\n font-size: 1.25rem;\n max-width: 600px;\n margin: 0 auto 3rem auto;\n line-height: 1.6;\n }\n\n .docs-link {\n background-color: #1a1a1a;\n padding: 1rem 2rem;\n border-radius: 0.5rem;\n display: flex;\n align-items: center;\n gap: 1rem;\n font-family: monospace;\n font-size: 1rem;\n color: #ffffff;\n text-decoration: none;\n transition: background-color 0.2s;\n }\n\n .docs-link:hover {\n background-color: #252525;\n }\n\n .arrow-icon {\n transition: transform 0.2s;\n }\n\n .docs-link:hover .arrow-icon {\n transform: translateX(4px);\n }\n </style>\n </head>\n <body>\n <main>\n <h1>Welcome to Mastra</h1>\n <p class=\"subtitle\">\n From the team that brought you Gatsby: prototype and productionize AI features with a modern JS/TS stack.\n </p>\n\n <a href=\"https://mastra.ai/docs\" class=\"docs-link\">\n Browse the docs\n <svg\n class=\"arrow-icon\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n >\n <path d=\"M5 12h14M12 5l7 7-7 7\" />\n </svg>\n </a>\n </main>\n </body>\n</html>\n";
|
|
288
|
+
|
|
289
|
+
export declare function isNodeBuiltin(dep: string): boolean;
|
|
290
|
+
|
|
291
|
+
export declare function libSqlFix(): Plugin;
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* Convert speech to text using the agent's voice provider
|
|
295
|
+
*/
|
|
296
|
+
export declare function listenHandler(c: Context): Promise<Response>;
|
|
297
|
+
|
|
298
|
+
export declare function listIndexes(c: Context): Promise<Response>;
|
|
299
|
+
|
|
300
|
+
declare type NormalizedInputOptions = Omit<Partial<InputOptions>, 'plugins' | 'input' | 'external'> & {
|
|
301
|
+
plugins?: Plugin[];
|
|
302
|
+
input: InputOption;
|
|
303
|
+
external?: (string | RegExp)[];
|
|
304
|
+
};
|
|
305
|
+
|
|
306
|
+
export declare function notFoundHandler(): void;
|
|
307
|
+
|
|
308
|
+
export declare function pino(): {
|
|
309
|
+
name: string;
|
|
310
|
+
resolveId(this: PluginContext, id: string, importee: string | undefined): Promise<void>;
|
|
311
|
+
renderChunk(this: PluginContext, code: string, chunk: RenderedChunk): {
|
|
312
|
+
code: string;
|
|
313
|
+
map: null;
|
|
314
|
+
} | undefined;
|
|
315
|
+
};
|
|
316
|
+
|
|
317
|
+
export declare function queryVectors(c: Context): Promise<Response>;
|
|
318
|
+
|
|
319
|
+
export declare function removeAllExceptDeployer(): babel_2.PluginObj;
|
|
320
|
+
|
|
321
|
+
export declare function removeAllExceptTelemetryConfig(result: {
|
|
322
|
+
hasCustomConfig: boolean;
|
|
323
|
+
}): babel_2.PluginObj;
|
|
324
|
+
|
|
325
|
+
export declare function removeDeployer(): babel_2.PluginObj;
|
|
326
|
+
|
|
327
|
+
export declare function removeDeployer_alias_1(mastraEntry: string): Plugin;
|
|
328
|
+
|
|
329
|
+
export declare function resumeWorkflowHandler(c: Context): Promise<Response>;
|
|
330
|
+
|
|
331
|
+
export declare function rewriteLibsqlImport(): babel_2.PluginObj;
|
|
332
|
+
|
|
333
|
+
export declare function rootHandler(c: Context): Promise<Response & TypedResponse<"Hello to the Mastra API!", ContentfulStatusCode, "text">>;
|
|
334
|
+
|
|
335
|
+
export declare function saveMessagesHandler(c: Context): Promise<Response>;
|
|
336
|
+
|
|
337
|
+
export declare function setAgentInstructionsHandler(c: Context): Promise<Response>;
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* Convert text to speech using the agent's voice provider
|
|
341
|
+
*/
|
|
342
|
+
export declare function speakHandler(c: Context): Promise<Response>;
|
|
343
|
+
|
|
344
|
+
export declare function streamGenerateHandler(c: Context): Promise<Response | undefined>;
|
|
345
|
+
|
|
346
|
+
export declare function telemetryFix(): Plugin;
|
|
347
|
+
|
|
348
|
+
export declare function updateThreadHandler(c: Context): Promise<Response>;
|
|
349
|
+
|
|
350
|
+
export declare function upsertMastraDir({ dir }: {
|
|
351
|
+
dir?: string;
|
|
352
|
+
}): void;
|
|
353
|
+
|
|
354
|
+
export declare function upsertVectors(c: Context): Promise<Response>;
|
|
355
|
+
|
|
356
|
+
export declare function validateBody(body: Record<string, unknown>): void;
|
|
357
|
+
|
|
358
|
+
declare type Variables = {
|
|
359
|
+
mastra: Mastra;
|
|
360
|
+
clients: Set<{
|
|
361
|
+
controller: ReadableStreamDefaultController;
|
|
362
|
+
}>;
|
|
363
|
+
tools: Record<string, any>;
|
|
364
|
+
playground: boolean;
|
|
365
|
+
};
|
|
366
|
+
|
|
367
|
+
export declare function watchWorkflowHandler(c: Context): Promise<Response>;
|
|
368
|
+
|
|
369
|
+
declare function writeTelemetryConfig(entryFile: string, outputDir: string): Promise<{
|
|
370
|
+
hasCustomConfig: boolean;
|
|
371
|
+
}>;
|
|
372
|
+
export { writeTelemetryConfig }
|
|
373
|
+
export { writeTelemetryConfig as writeTelemetryConfig_alias_1 }
|
|
374
|
+
|
|
375
|
+
export { }
|