@mastra/deployer 0.3.4 → 0.4.0-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/_tsup-dts-rollup.d.cts +179 -23
- package/dist/_tsup-dts-rollup.d.ts +179 -23
- package/dist/build/analyze.cjs +2 -2
- package/dist/build/analyze.js +1 -1
- package/dist/build/index.cjs +6 -6
- package/dist/build/index.js +2 -2
- package/dist/bundler/index.cjs +2 -2
- package/dist/bundler/index.js +1 -1
- package/dist/{chunk-FA7LXQU6.cjs → chunk-BQAYAQTU.cjs} +4 -4
- package/dist/{chunk-QJQ2V3Z2.js → chunk-EHPJDSR3.js} +11 -1
- package/dist/{chunk-6J52IX4J.cjs → chunk-HHZDRBPV.cjs} +11 -1
- package/dist/{chunk-ABTWXYGO.js → chunk-U5VNUAES.js} +1 -1
- package/dist/{chunk-KCX3UGHY.cjs → chunk-WHD7NHLX.cjs} +2 -2
- package/dist/{chunk-37LFSIVL.js → chunk-YU2QBGOU.js} +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +1 -1
- package/dist/server/index.cjs +791 -395
- package/dist/server/index.js +792 -396
- package/dist/templates/instrumentation-template.js +5 -2
- package/package.json +8 -5
|
@@ -3,16 +3,18 @@ import { BlankSchema } from 'hono/types';
|
|
|
3
3
|
import type { Config } from '@mastra/core';
|
|
4
4
|
import { ContentfulStatusCode } from 'hono/utils/http-status';
|
|
5
5
|
import type { Context } from 'hono';
|
|
6
|
+
import type { ContextWithMastra } from '@mastra/core/server';
|
|
6
7
|
import { Hono } from 'hono';
|
|
7
8
|
import type { IDeployer } from '@mastra/core/deployer';
|
|
9
|
+
import type { IMastraLogger } from '@mastra/core/logger';
|
|
8
10
|
import { InputOptions } from 'rollup';
|
|
9
|
-
import type { Logger } from '@mastra/core';
|
|
10
|
-
import type { Logger as Logger_2 } from '@mastra/core/logger';
|
|
11
11
|
import type { Mastra } from '@mastra/core';
|
|
12
|
+
import type { MastraAuthConfig } from '@mastra/core/server';
|
|
12
13
|
import { MastraBase } from '@mastra/core/base';
|
|
13
14
|
import { MastraBundler } from '@mastra/core/bundler';
|
|
14
15
|
import type { MastraDeployer } from '@mastra/core';
|
|
15
16
|
import type { MastraVector } from '@mastra/core/vector';
|
|
17
|
+
import type { Next } from 'hono';
|
|
16
18
|
import { OutputOptions } from 'rollup';
|
|
17
19
|
import type { Plugin } from 'rollup';
|
|
18
20
|
import { PluginContext } from 'rollup';
|
|
@@ -39,7 +41,7 @@ export declare function aliasHono(): Plugin;
|
|
|
39
41
|
*
|
|
40
42
|
* This helps identify which dependencies need to be externalized vs bundled.
|
|
41
43
|
*/
|
|
42
|
-
declare function analyzeBundle(entry: string, mastraEntry: string, outputDir: string, platform: 'node' | 'browser', logger:
|
|
44
|
+
declare function analyzeBundle(entry: string, mastraEntry: string, outputDir: string, platform: 'node' | 'browser', logger: IMastraLogger): Promise<{
|
|
43
45
|
invalidChunks: Set<string>;
|
|
44
46
|
dependencies: Map<string, string>;
|
|
45
47
|
externalDependencies: Set<string>;
|
|
@@ -60,6 +62,16 @@ declare interface ArchitectureOptions {
|
|
|
60
62
|
libc?: string[];
|
|
61
63
|
}
|
|
62
64
|
|
|
65
|
+
export declare const authenticationMiddleware: (c: ContextWithMastra, next: Next) => Promise<void | (Response & TypedResponse< {
|
|
66
|
+
error: string;
|
|
67
|
+
}, 401, "json">)>;
|
|
68
|
+
|
|
69
|
+
export declare const authorizationMiddleware: (c: ContextWithMastra, next: Next) => Promise<void | (Response & TypedResponse< {
|
|
70
|
+
error: string;
|
|
71
|
+
}, 403, "json">) | (Response & TypedResponse< {
|
|
72
|
+
error: string;
|
|
73
|
+
}, 500, "json">)>;
|
|
74
|
+
|
|
63
75
|
declare type Bindings = {};
|
|
64
76
|
|
|
65
77
|
export declare abstract class Bundler extends MastraBundler {
|
|
@@ -88,13 +100,17 @@ export declare abstract class Bundler extends MastraBundler {
|
|
|
88
100
|
lint(_entryFile: string, _outputDirectory: string, toolsPaths: string[]): Promise<void>;
|
|
89
101
|
}
|
|
90
102
|
|
|
103
|
+
export declare const canAccessPublicly: (path: string, method: string, authConfig: MastraAuthConfig) => boolean;
|
|
104
|
+
|
|
105
|
+
export declare const checkRules: (rules: MastraAuthConfig["rules"], path: string, method: string, user: unknown) => Promise<boolean>;
|
|
106
|
+
|
|
91
107
|
/**
|
|
92
108
|
* Collects all transitive workspace dependencies and their TGZ paths
|
|
93
109
|
*/
|
|
94
110
|
export declare const collectTransitiveWorkspaceDependencies: ({ workspaceMap, initialDependencies, logger, }: {
|
|
95
111
|
workspaceMap: Map<string, WorkspacePackageInfo>;
|
|
96
112
|
initialDependencies: Set<string>;
|
|
97
|
-
logger:
|
|
113
|
+
logger: IMastraLogger;
|
|
98
114
|
}) => TransitiveDependencyResult;
|
|
99
115
|
|
|
100
116
|
declare function createBundler(inputOptions: InputOptions, outputOptions: Partial<OutputOptions> & {
|
|
@@ -107,7 +123,7 @@ export { createBundler }
|
|
|
107
123
|
export { createBundler as createBundler_alias_1 }
|
|
108
124
|
|
|
109
125
|
declare function createChildProcessLogger({ logger, root }: {
|
|
110
|
-
logger:
|
|
126
|
+
logger: IMastraLogger;
|
|
111
127
|
root: string;
|
|
112
128
|
}): ({ cmd, args, env }: {
|
|
113
129
|
cmd: string;
|
|
@@ -125,23 +141,23 @@ export declare function createHonoServer(mastra: Mastra, options?: ServerBundleO
|
|
|
125
141
|
|
|
126
142
|
export declare function createIndex(c: Context): Promise<Response>;
|
|
127
143
|
|
|
144
|
+
export declare function createLegacyWorkflowRunHandler(c: Context): Promise<Response>;
|
|
145
|
+
|
|
128
146
|
export declare function createNodeServer(mastra: Mastra, options?: ServerBundleOptions): Promise<ServerType>;
|
|
129
147
|
|
|
130
|
-
declare const createPinoStream: (logger:
|
|
148
|
+
declare const createPinoStream: (logger: IMastraLogger) => Transform;
|
|
131
149
|
export { createPinoStream }
|
|
132
150
|
export { createPinoStream as createPinoStream_alias_1 }
|
|
133
151
|
export { createPinoStream as createPinoStream_alias_2 }
|
|
134
152
|
|
|
135
|
-
export declare function createRunHandler(c: Context): Promise<Response>;
|
|
136
|
-
|
|
137
153
|
export declare function createThreadHandler(c: Context): Promise<Response>;
|
|
138
154
|
|
|
139
|
-
export declare function createVNextWorkflowRunHandler(c: Context): Promise<Response>;
|
|
140
|
-
|
|
141
155
|
declare function createWatcher(inputOptions: InputOptions, outputOptions: OutputOptions): Promise<RollupWatcher>;
|
|
142
156
|
export { createWatcher }
|
|
143
157
|
export { createWatcher as createWatcher_alias_1 }
|
|
144
158
|
|
|
159
|
+
export declare function createWorkflowRunHandler(c: Context): Promise<Response>;
|
|
160
|
+
|
|
145
161
|
/**
|
|
146
162
|
* Creates a map of workspace packages with their metadata for dependency resolution
|
|
147
163
|
* @returns Map of package names to their location, dependencies and version
|
|
@@ -152,6 +168,8 @@ export declare const createWorkspacePackageMap: () => Promise<Map<string, {
|
|
|
152
168
|
version: string | undefined;
|
|
153
169
|
}>>;
|
|
154
170
|
|
|
171
|
+
export declare const defaultAuthConfig: MastraAuthConfig;
|
|
172
|
+
|
|
155
173
|
export declare function deleteIndex(c: Context): Promise<Response>;
|
|
156
174
|
|
|
157
175
|
export declare function deleteThreadHandler(c: Context): Promise<Response>;
|
|
@@ -217,6 +235,11 @@ export declare function errorHandler(err: Error, c: Context): Response;
|
|
|
217
235
|
|
|
218
236
|
export declare function executeAgentToolHandler(c: Context): Promise<Response>;
|
|
219
237
|
|
|
238
|
+
/**
|
|
239
|
+
* Handler for POST /api/mcp/:serverId/tools/:toolId/execute - Execute a tool on an MCP Server
|
|
240
|
+
*/
|
|
241
|
+
export declare const executeMcpServerToolHandler: (c: Context) => Promise<Response>;
|
|
242
|
+
|
|
220
243
|
export declare function executeToolHandler(tools: Record<string, any>): (c: Context) => Promise<Response>;
|
|
221
244
|
|
|
222
245
|
export declare class FileEnvService extends EnvService {
|
|
@@ -348,6 +371,12 @@ declare function getInputOptions_2(entryFile: string, platform: 'node' | 'browse
|
|
|
348
371
|
export { getInputOptions_2 as getInputOptions_alias_1 }
|
|
349
372
|
export { getInputOptions_2 as getWatcherInputOptions }
|
|
350
373
|
|
|
374
|
+
export declare function getLegacyWorkflowByIdHandler(c: Context): Promise<Response>;
|
|
375
|
+
|
|
376
|
+
export declare function getLegacyWorkflowRunsHandler(c: Context): Promise<Response>;
|
|
377
|
+
|
|
378
|
+
export declare function getLegacyWorkflowsHandler(c: Context): Promise<Response>;
|
|
379
|
+
|
|
351
380
|
export declare function getLiveEvalsByAgentIdHandler(c: Context): Promise<Response & TypedResponse< {
|
|
352
381
|
id: string;
|
|
353
382
|
name: any;
|
|
@@ -381,7 +410,99 @@ export declare function getLogsHandler(c: Context): Promise<Response>;
|
|
|
381
410
|
export declare function getLogTransports(c: Context): Promise<Response>;
|
|
382
411
|
|
|
383
412
|
/**
|
|
384
|
-
* Handler for
|
|
413
|
+
* Handler for GET /api/mcp/v0/servers/:id - Get MCP Server Details (Registry Style)
|
|
414
|
+
*/
|
|
415
|
+
export declare const getMcpRegistryServerDetailHandler: (c: Context) => Promise<(Response & TypedResponse< {
|
|
416
|
+
error: string;
|
|
417
|
+
}, 500, "json">) | (Response & TypedResponse< {
|
|
418
|
+
error: string;
|
|
419
|
+
}, 404, "json">) | (Response & TypedResponse< {
|
|
420
|
+
package_canonical?: string | undefined;
|
|
421
|
+
packages?: {
|
|
422
|
+
registry_name: "npm" | "docker" | "pypi" | "homebrew" | string;
|
|
423
|
+
name: string;
|
|
424
|
+
version: string;
|
|
425
|
+
command?: {
|
|
426
|
+
name: "npx" | "docker" | "pypi" | "uvx" | string;
|
|
427
|
+
subcommands?: {
|
|
428
|
+
name: string;
|
|
429
|
+
description: string;
|
|
430
|
+
is_required?: boolean | undefined;
|
|
431
|
+
subcommands?: /*elided*/ any[] | undefined;
|
|
432
|
+
positional_arguments?: {
|
|
433
|
+
position: number;
|
|
434
|
+
name: string;
|
|
435
|
+
description: string;
|
|
436
|
+
is_required: boolean;
|
|
437
|
+
is_repeatable?: boolean | undefined;
|
|
438
|
+
is_editable?: boolean | undefined;
|
|
439
|
+
choices?: string[] | undefined;
|
|
440
|
+
default_value?: string | number | boolean | undefined;
|
|
441
|
+
}[] | undefined;
|
|
442
|
+
named_arguments?: {
|
|
443
|
+
short_flag?: string | undefined;
|
|
444
|
+
long_flag?: string | undefined;
|
|
445
|
+
requires_value?: boolean | undefined;
|
|
446
|
+
name: string;
|
|
447
|
+
description: string;
|
|
448
|
+
is_required: boolean;
|
|
449
|
+
is_repeatable?: boolean | undefined;
|
|
450
|
+
is_editable?: boolean | undefined;
|
|
451
|
+
choices?: string[] | undefined;
|
|
452
|
+
default_value?: string | number | boolean | undefined;
|
|
453
|
+
}[] | undefined;
|
|
454
|
+
}[] | undefined;
|
|
455
|
+
positional_arguments?: {
|
|
456
|
+
position: number;
|
|
457
|
+
name: string;
|
|
458
|
+
description: string;
|
|
459
|
+
is_required: boolean;
|
|
460
|
+
is_repeatable?: boolean | undefined;
|
|
461
|
+
is_editable?: boolean | undefined;
|
|
462
|
+
choices?: string[] | undefined;
|
|
463
|
+
default_value?: string | number | boolean | undefined;
|
|
464
|
+
}[] | undefined;
|
|
465
|
+
named_arguments?: {
|
|
466
|
+
short_flag?: string | undefined;
|
|
467
|
+
long_flag?: string | undefined;
|
|
468
|
+
requires_value?: boolean | undefined;
|
|
469
|
+
name: string;
|
|
470
|
+
description: string;
|
|
471
|
+
is_required: boolean;
|
|
472
|
+
is_repeatable?: boolean | undefined;
|
|
473
|
+
is_editable?: boolean | undefined;
|
|
474
|
+
choices?: string[] | undefined;
|
|
475
|
+
default_value?: string | number | boolean | undefined;
|
|
476
|
+
}[] | undefined;
|
|
477
|
+
} | undefined;
|
|
478
|
+
environment_variables?: {
|
|
479
|
+
name: string;
|
|
480
|
+
description: string;
|
|
481
|
+
required?: boolean | undefined;
|
|
482
|
+
default_value?: string | undefined;
|
|
483
|
+
}[] | undefined;
|
|
484
|
+
}[] | undefined;
|
|
485
|
+
remotes?: {
|
|
486
|
+
transport_type: "streamable" | "sse" | string;
|
|
487
|
+
url: string;
|
|
488
|
+
}[] | undefined;
|
|
489
|
+
id: string;
|
|
490
|
+
name: string;
|
|
491
|
+
description?: string | undefined;
|
|
492
|
+
repository?: {
|
|
493
|
+
url: string;
|
|
494
|
+
source: "github" | "gitlab" | string;
|
|
495
|
+
id: string;
|
|
496
|
+
} | undefined;
|
|
497
|
+
version_detail: {
|
|
498
|
+
version: string;
|
|
499
|
+
release_date: string;
|
|
500
|
+
is_latest: boolean;
|
|
501
|
+
};
|
|
502
|
+
}, ContentfulStatusCode, "json">)>;
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* Handler for POST /api/mcp/:serverId/mcp
|
|
385
506
|
*/
|
|
386
507
|
export declare const getMcpServerMessageHandler: (c: Context) => Promise<Response>;
|
|
387
508
|
|
|
@@ -392,6 +513,11 @@ export declare const getMcpServerMessageHandler: (c: Context) => Promise<Respons
|
|
|
392
513
|
*/
|
|
393
514
|
export declare const getMcpServerSseHandler: (c: Context) => Promise<Response | undefined>;
|
|
394
515
|
|
|
516
|
+
/**
|
|
517
|
+
* Handler for GET /api/mcp/:serverId/tools/:toolId - Get details for a specific tool on an MCP Server
|
|
518
|
+
*/
|
|
519
|
+
export declare const getMcpServerToolDetailHandler: (c: Context) => Promise<Response>;
|
|
520
|
+
|
|
395
521
|
export declare function getMemoryStatusHandler(c: Context): Promise<Response>;
|
|
396
522
|
|
|
397
523
|
export declare function getMessagesHandler(c: Context): Promise<Response>;
|
|
@@ -429,12 +555,6 @@ export declare function getToolsHandler(c: Context): Promise<Response>;
|
|
|
429
555
|
|
|
430
556
|
export declare const getVector: (c: Context, vectorName: string) => MastraVector;
|
|
431
557
|
|
|
432
|
-
export declare function getVNextWorkflowByIdHandler(c: Context): Promise<Response>;
|
|
433
|
-
|
|
434
|
-
export declare function getVNextWorkflowRunsHandler(c: Context): Promise<Response>;
|
|
435
|
-
|
|
436
|
-
export declare function getVNextWorkflowsHandler(c: Context): Promise<Response>;
|
|
437
|
-
|
|
438
558
|
export declare function getWorkflowByIdHandler(c: Context): Promise<Response>;
|
|
439
559
|
|
|
440
560
|
export declare function getWorkflowRunsHandler(c: Context): Promise<Response>;
|
|
@@ -461,16 +581,52 @@ export declare function listenHandler(c: Context): Promise<Response>;
|
|
|
461
581
|
|
|
462
582
|
export declare function listIndexes(c: Context): Promise<Response>;
|
|
463
583
|
|
|
584
|
+
/**
|
|
585
|
+
* Handler for GET /api/mcp/v0/servers - List MCP Servers (Registry Style)
|
|
586
|
+
*/
|
|
587
|
+
export declare const listMcpRegistryServersHandler: (c: Context) => Promise<(Response & TypedResponse< {
|
|
588
|
+
error: string;
|
|
589
|
+
}, 500, "json">) | (Response & TypedResponse< {
|
|
590
|
+
servers: {
|
|
591
|
+
id: string;
|
|
592
|
+
name: string;
|
|
593
|
+
description?: string | undefined;
|
|
594
|
+
repository?: {
|
|
595
|
+
url: string;
|
|
596
|
+
source: "github" | "gitlab" | string;
|
|
597
|
+
id: string;
|
|
598
|
+
} | undefined;
|
|
599
|
+
version_detail: {
|
|
600
|
+
version: string;
|
|
601
|
+
release_date: string;
|
|
602
|
+
is_latest: boolean;
|
|
603
|
+
};
|
|
604
|
+
}[];
|
|
605
|
+
next: string | null;
|
|
606
|
+
total_count: number;
|
|
607
|
+
}, ContentfulStatusCode, "json">)>;
|
|
608
|
+
|
|
609
|
+
/**
|
|
610
|
+
* Handler for GET /api/mcp/:serverId/tools - List tools for a specific MCP Server
|
|
611
|
+
*/
|
|
612
|
+
export declare const listMcpServerToolsHandler: (c: Context) => Promise<Response>;
|
|
613
|
+
|
|
614
|
+
export declare const matchesOrIncludes: (values: string | string[], value: string) => boolean;
|
|
615
|
+
|
|
464
616
|
/**
|
|
465
617
|
* Creates TGZ packages for workspace dependencies in the workspace-module directory
|
|
466
618
|
*/
|
|
467
619
|
export declare const packWorkspaceDependencies: ({ workspaceMap, usedWorkspacePackages, bundleOutputDir, logger, }: {
|
|
468
620
|
workspaceMap: Map<string, WorkspacePackageInfo>;
|
|
469
621
|
bundleOutputDir: string;
|
|
470
|
-
logger:
|
|
622
|
+
logger: IMastraLogger;
|
|
471
623
|
usedWorkspacePackages: Set<string>;
|
|
472
624
|
}) => Promise<void>;
|
|
473
625
|
|
|
626
|
+
export declare const pathMatchesPattern: (path: string, pattern: string) => boolean;
|
|
627
|
+
|
|
628
|
+
export declare const pathMatchesRule: (path: string, rulePath: string | RegExp | string[] | undefined) => boolean;
|
|
629
|
+
|
|
474
630
|
export declare function pino(): {
|
|
475
631
|
name: string;
|
|
476
632
|
resolveId(this: PluginContext, id: string, importee: string | undefined): Promise<{
|
|
@@ -519,11 +675,11 @@ export declare function resolve(specifier: string, context: ResolveHookContext,
|
|
|
519
675
|
url: string;
|
|
520
676
|
}>;
|
|
521
677
|
|
|
522
|
-
export declare function
|
|
678
|
+
export declare function resumeAsyncLegacyWorkflowHandler(c: Context): Promise<Response>;
|
|
523
679
|
|
|
524
680
|
export declare function resumeAsyncWorkflowHandler(c: Context): Promise<Response>;
|
|
525
681
|
|
|
526
|
-
export declare function
|
|
682
|
+
export declare function resumeLegacyWorkflowHandler(c: Context): Promise<Response>;
|
|
527
683
|
|
|
528
684
|
export declare function resumeWorkflowHandler(c: Context): Promise<Response>;
|
|
529
685
|
|
|
@@ -545,11 +701,11 @@ export declare function setAgentInstructionsHandler(c: Context): Promise<Respons
|
|
|
545
701
|
*/
|
|
546
702
|
export declare function speakHandler(c: Context): Promise<Response>;
|
|
547
703
|
|
|
548
|
-
export declare function
|
|
704
|
+
export declare function startAsyncLegacyWorkflowHandler(c: Context): Promise<Response>;
|
|
549
705
|
|
|
550
706
|
export declare function startAsyncWorkflowHandler(c: Context): Promise<Response>;
|
|
551
707
|
|
|
552
|
-
export declare function
|
|
708
|
+
export declare function startLegacyWorkflowRunHandler(c: Context): Promise<Response>;
|
|
553
709
|
|
|
554
710
|
export declare function startWorkflowRunHandler(c: Context): Promise<Response>;
|
|
555
711
|
|
|
@@ -589,7 +745,7 @@ declare type Variables = {
|
|
|
589
745
|
isDev: boolean;
|
|
590
746
|
};
|
|
591
747
|
|
|
592
|
-
export declare function
|
|
748
|
+
export declare function watchLegacyWorkflowHandler(c: Context): Response | Promise<Response>;
|
|
593
749
|
|
|
594
750
|
export declare function watchWorkflowHandler(c: Context): Response | Promise<Response>;
|
|
595
751
|
|