@mastra/connect 1.1.0-alpha.1 → 1.1.0-alpha.3
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/index.cjs +295 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +295 -19
- package/dist/index.js.map +1 -1
- package/dist/providers/fireflies/tools/get-transcript.d.ts +4 -4
- package/dist/providers/fireflies/tools/get-transcript.d.ts.map +1 -1
- package/dist/providers/google-drive/tools/create-folder.d.ts.map +1 -1
- package/dist/providers/google-drive/tools/export-file.d.ts +32 -0
- package/dist/providers/google-drive/tools/export-file.d.ts.map +1 -0
- package/dist/providers/google-drive/tools/list-revisions.d.ts +44 -0
- package/dist/providers/google-drive/tools/list-revisions.d.ts.map +1 -0
- package/dist/providers/google-drive/tools/move-file.d.ts.map +1 -1
- package/dist/providers/google-drive/tools/upload-document.d.ts.map +1 -1
- package/dist/providers/google-drive/tools.d.ts.map +1 -1
- package/dist/runtime/platform-proxy.d.ts +1 -1
- package/dist/runtime/platform-proxy.d.ts.map +1 -1
- package/dist/tools.d.ts +16 -1
- package/dist/tools.d.ts.map +1 -1
- package/package.json +8 -8
|
@@ -11,8 +11,8 @@ export declare const getTranscriptOutputSchema: z.ZodObject<{
|
|
|
11
11
|
speaker_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
12
12
|
speaker_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
13
13
|
raw_text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
14
|
-
start_time: z.ZodOptional<z.ZodNullable<z.
|
|
15
|
-
end_time: z.ZodOptional<z.ZodNullable<z.
|
|
14
|
+
start_time: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
15
|
+
end_time: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
16
16
|
text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
17
17
|
}, z.core.$strip>>>;
|
|
18
18
|
summary: z.ZodOptional<z.ZodObject<{
|
|
@@ -84,8 +84,8 @@ export declare function getTranscriptTool(proxy: PlatformProxy): import("@mastra
|
|
|
84
84
|
speaker_name?: string | null | undefined;
|
|
85
85
|
speaker_id?: string | null | undefined;
|
|
86
86
|
raw_text?: string | null | undefined;
|
|
87
|
-
start_time?:
|
|
88
|
-
end_time?:
|
|
87
|
+
start_time?: number | null | undefined;
|
|
88
|
+
end_time?: number | null | undefined;
|
|
89
89
|
text?: string | null | undefined;
|
|
90
90
|
}[] | undefined;
|
|
91
91
|
summary?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-transcript.d.ts","sourceRoot":"","sources":["../../../../src/providers/fireflies/tools/get-transcript.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAExE,eAAO,MAAM,wBAAwB;;iBAEnC,CAAC;
|
|
1
|
+
{"version":3,"file":"get-transcript.d.ts","sourceRoot":"","sources":["../../../../src/providers/fireflies/tools/get-transcript.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAExE,eAAO,MAAM,wBAAwB;;iBAEnC,CAAC;AAyHH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBASpC,CAAC;AAwBH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wIAsIrD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-folder.d.ts","sourceRoot":"","sources":["../../../../src/providers/google-drive/tools/create-folder.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAUxE,eAAO,MAAM,uBAAuB;;;iBAQlC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;iBAMnC,CAAC;AAEH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,aAAa;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"create-folder.d.ts","sourceRoot":"","sources":["../../../../src/providers/google-drive/tools/create-folder.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAUxE,eAAO,MAAM,uBAAuB;;;iBAQlC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;iBAMnC,CAAC;AAEH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,aAAa;;;;;;;;;0IAuCpD"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { PlatformProxy } from '../../../runtime/platform-proxy.js';
|
|
3
|
+
export declare const exportFileInputSchema: z.ZodObject<{
|
|
4
|
+
fileId: z.ZodString;
|
|
5
|
+
mimeType: z.ZodEnum<{
|
|
6
|
+
"application/epub+zip": "application/epub+zip";
|
|
7
|
+
"application/pdf": "application/pdf";
|
|
8
|
+
"application/rtf": "application/rtf";
|
|
9
|
+
"application/vnd.openxmlformats-officedocument.presentationml.presentation": "application/vnd.openxmlformats-officedocument.presentationml.presentation";
|
|
10
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
|
11
|
+
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
|
12
|
+
"text/csv": "text/csv";
|
|
13
|
+
"text/html": "text/html";
|
|
14
|
+
"text/plain": "text/plain";
|
|
15
|
+
}>;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
export declare const exportFileOutputSchema: z.ZodObject<{
|
|
18
|
+
fileId: z.ZodString;
|
|
19
|
+
mimeType: z.ZodString;
|
|
20
|
+
data: z.ZodString;
|
|
21
|
+
size: z.ZodNumber;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
export declare function exportFileTool(proxy: PlatformProxy): import("@mastra/core/tools").Tool<{
|
|
24
|
+
fileId: string;
|
|
25
|
+
mimeType: "application/epub+zip" | "application/pdf" | "application/rtf" | "application/vnd.openxmlformats-officedocument.presentationml.presentation" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" | "application/vnd.openxmlformats-officedocument.wordprocessingml.document" | "text/csv" | "text/html" | "text/plain";
|
|
26
|
+
}, {
|
|
27
|
+
fileId: string;
|
|
28
|
+
mimeType: string;
|
|
29
|
+
data: string;
|
|
30
|
+
size: number;
|
|
31
|
+
}, unknown, unknown, import("@mastra/core/tools").ToolExecutionContext<unknown, unknown, unknown>, "google_drive_export_file", unknown>;
|
|
32
|
+
//# sourceMappingURL=export-file.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"export-file.d.ts","sourceRoot":"","sources":["../../../../src/providers/google-drive/tools/export-file.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAExE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;iBAmBhC,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;iBAKjC,CAAC;AAEH,wBAAgB,cAAc,CAAC,KAAK,EAAE,aAAa;;;;;;;;wIAoClD"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { PlatformProxy } from '../../../runtime/platform-proxy.js';
|
|
3
|
+
export declare const listRevisionsInputSchema: z.ZodObject<{
|
|
4
|
+
fileId: z.ZodString;
|
|
5
|
+
pageToken: z.ZodOptional<z.ZodString>;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export declare const listRevisionsOutputSchema: z.ZodObject<{
|
|
8
|
+
revisions: z.ZodArray<z.ZodObject<{
|
|
9
|
+
id: z.ZodString;
|
|
10
|
+
modifiedTime: z.ZodOptional<z.ZodString>;
|
|
11
|
+
lastModifyingUser: z.ZodOptional<z.ZodObject<{
|
|
12
|
+
kind: z.ZodOptional<z.ZodString>;
|
|
13
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
14
|
+
photoLink: z.ZodOptional<z.ZodString>;
|
|
15
|
+
me: z.ZodOptional<z.ZodBoolean>;
|
|
16
|
+
permissionId: z.ZodOptional<z.ZodString>;
|
|
17
|
+
emailAddress: z.ZodOptional<z.ZodString>;
|
|
18
|
+
}, z.core.$strip>>;
|
|
19
|
+
keepForever: z.ZodOptional<z.ZodBoolean>;
|
|
20
|
+
published: z.ZodOptional<z.ZodBoolean>;
|
|
21
|
+
}, z.core.$strip>>;
|
|
22
|
+
nextPageToken: z.ZodOptional<z.ZodString>;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
export declare function listRevisionsTool(proxy: PlatformProxy): import("@mastra/core/tools").Tool<{
|
|
25
|
+
fileId: string;
|
|
26
|
+
pageToken?: string | undefined;
|
|
27
|
+
}, {
|
|
28
|
+
revisions: {
|
|
29
|
+
id: string;
|
|
30
|
+
modifiedTime?: string | undefined;
|
|
31
|
+
lastModifyingUser?: {
|
|
32
|
+
kind?: string | undefined;
|
|
33
|
+
displayName?: string | undefined;
|
|
34
|
+
photoLink?: string | undefined;
|
|
35
|
+
me?: boolean | undefined;
|
|
36
|
+
permissionId?: string | undefined;
|
|
37
|
+
emailAddress?: string | undefined;
|
|
38
|
+
} | undefined;
|
|
39
|
+
keepForever?: boolean | undefined;
|
|
40
|
+
published?: boolean | undefined;
|
|
41
|
+
}[];
|
|
42
|
+
nextPageToken?: string | undefined;
|
|
43
|
+
}, unknown, unknown, import("@mastra/core/tools").ToolExecutionContext<unknown, unknown, unknown>, "google_drive_list_revisions", unknown>;
|
|
44
|
+
//# sourceMappingURL=list-revisions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-revisions.d.ts","sourceRoot":"","sources":["../../../../src/providers/google-drive/tools/list-revisions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAExE,eAAO,MAAM,wBAAwB;;;iBAGnC,CAAC;AAmBH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;iBAGpC,CAAC;AAOH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,aAAa;;;;;;;;;;;;;;;;;;;2IA0CrD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"move-file.d.ts","sourceRoot":"","sources":["../../../../src/providers/google-drive/tools/move-file.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAExE,eAAO,MAAM,mBAAmB;;;;iBAM9B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;iBAK/B,CAAC;AAEH,wBAAgB,YAAY,CAAC,KAAK,EAAE,aAAa;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"move-file.d.ts","sourceRoot":"","sources":["../../../../src/providers/google-drive/tools/move-file.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAExE,eAAO,MAAM,mBAAmB;;;;iBAM9B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;iBAK/B,CAAC;AAEH,wBAAgB,YAAY,CAAC,KAAK,EAAE,aAAa;;;;;;;;;sIAoChD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload-document.d.ts","sourceRoot":"","sources":["../../../../src/providers/google-drive/tools/upload-document.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAExE,eAAO,MAAM,yBAAyB;;;;;;;iBAYpC,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;iBAMrC,CAAC;AAEH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,aAAa;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"upload-document.d.ts","sourceRoot":"","sources":["../../../../src/providers/google-drive/tools/upload-document.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAExE,eAAO,MAAM,yBAAyB;;;;;;;iBAYpC,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;iBAMrC,CAAC;AAEH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,aAAa;;;;;;;;;;;;;4IA8GtD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../src/providers/google-drive/tools.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../src/providers/google-drive/tools.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAmC7D,wBAAgB,sBAAsB,CAAC,OAAO,CAAC,EAAE,oBAAoB,2CAqCpE"}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* rather than exploding at runtime.
|
|
11
11
|
*/
|
|
12
12
|
import type { RequestContext } from '@mastra/core/request-context';
|
|
13
|
-
import {
|
|
13
|
+
import type { ConnectClientOptions, ProxyRequestOptions } from '../client.js';
|
|
14
14
|
/**
|
|
15
15
|
* The shape of an individual request as templates author them — a strict
|
|
16
16
|
* subset of the upstream proxy configuration containing only the fields the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform-proxy.d.ts","sourceRoot":"","sources":["../../src/runtime/platform-proxy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"platform-proxy.d.ts","sourceRoot":"","sources":["../../src/runtime/platform-proxy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAGnE,OAAO,KAAK,EAAE,oBAAoB,EAA2C,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAGvH;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,WAAW,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC,CAAC;IACnD,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iFAAiF;IACjF,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,aAAa,CAAC;CAC9B;AAED,yFAAyF;AACzF,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC;AAE1D;;;;;;GAMG;AACH,MAAM,W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C,cAAc,CAAC,EAAE,cAAc,CAAC;IACzC,mEAAmE;IACnE,kBAAkB,CAAC,cAAc,EAAE,cAAc,GAAG,aAAa,CAAC;CACnE;AAKD,UAAU,0BAA0B;IAClC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC;;;;;OAKG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC3C;AAsED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,0BAA0B,GAAG,aAAa,CAoDtF"}
|
package/dist/tools.d.ts
CHANGED
|
@@ -127,6 +127,16 @@ export interface ToolsResolver {
|
|
|
127
127
|
*/
|
|
128
128
|
with(extra: ToolsWithInput): ToolsResolver;
|
|
129
129
|
}
|
|
130
|
+
/**
|
|
131
|
+
* Options accepted by {@link tools}: a static {@link ToolsOptions} object, or
|
|
132
|
+
* a callback — sync or async, reading the per-request context — returning
|
|
133
|
+
* one. The callback form is the preferred way to vary options per request
|
|
134
|
+
* (e.g. role-based `allowTools` / `requireApproval`): it is invoked on every
|
|
135
|
+
* resolution and snapshots are memoized per distinct options value, so
|
|
136
|
+
* requests producing the same options share one cached snapshot with the
|
|
137
|
+
* usual TTL / stale-while-revalidate semantics.
|
|
138
|
+
*/
|
|
139
|
+
export type ToolsOptionsInput = ToolsOptions | ((ctx?: ToolsResolverContext) => ToolsOptions | Promise<ToolsOptions>);
|
|
130
140
|
/**
|
|
131
141
|
* Returns a live toolset resolver over the project's Platform connections.
|
|
132
142
|
* HTTP providers are loaded from the shipped `PROVIDERS` registry. MCP providers
|
|
@@ -144,7 +154,12 @@ export interface ToolsResolver {
|
|
|
144
154
|
* Expected provider absence is silently skipped. Actionable per-integration
|
|
145
155
|
* problems during resolution (needs re-auth or ambiguity) are downgraded to
|
|
146
156
|
* warn-and-skip so one bad integration never takes down the whole toolset.
|
|
157
|
+
*
|
|
158
|
+
* Pass a callback instead of an options object to vary options per request
|
|
159
|
+
* (see {@link ToolsOptionsInput}). With the callback form, configuration
|
|
160
|
+
* validation runs at the first resolution that produces a given options
|
|
161
|
+
* value — still failing loudly — instead of at call time.
|
|
147
162
|
*/
|
|
148
|
-
export declare function tools(options?:
|
|
163
|
+
export declare function tools(options?: ToolsOptionsInput): ToolsResolver;
|
|
149
164
|
export {};
|
|
150
165
|
//# sourceMappingURL=tools.d.ts.map
|
package/dist/tools.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,oBAAoB,EAA8D,MAAM,aAAa,CAAC;AAkBpH,UAAU,wBAAwB;IAChC,wGAAwG;IACxG,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;;;;;;;OAUG;IACH,eAAe,CAAC,EAAE,OAAO,GAAG,MAAM,EAAE,CAAC;CACtC;AAED;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG,wBAAwB,GACzD,CACI;IACE;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,aAAa,CAAC,EAAE,KAAK,CAAC;CACvB,GACD;IACE,UAAU,CAAC,EAAE,KAAK,CAAC;IACnB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B,CACJ,CAAC;AAEJ,MAAM,WAAW,YAAY;IAC3B,uFAAuF;IACvF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;;;;;;;;;OAcG;IACH,SAAS,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,oBAAoB,CAAC,CAAC;IACtE;;;;;;;;;;OAUG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,kFAAkF;IAClF,aAAa,CAAC,EAAE,MAAM,EAA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,CAAC,EAAE,oBAAoB,KAAK,MAAM,CAAC,MAAM,EAAE;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC,CAAC,CAAC;AAE/G;;;;;;GAMG;AACH,MAAM,WAAW,aAAa;IAC5B,CAAC,GAAG,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAC3D,sGAAsG;IACtG,OAAO,IAAI,OAAO,CAAC,mBAAmB,CAAC,CAAC;IACxC,mFAAmF;IACnF,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5B;;;;;;;OAOG;IACH,IAAI,CAAC,KAAK,EAAE,cAAc,GAAG,aAAa,CAAC;CAC5C;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,oBAAoB,KAAK,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC;AAYtH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,KAAK,CAAC,OAAO,GAAE,iBAAsB,GAAG,aAAa,CAyKpE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/connect",
|
|
3
|
-
"version": "1.1.0-alpha.
|
|
3
|
+
"version": "1.1.0-alpha.3",
|
|
4
4
|
"description": "Use Mastra platform integration connections as agent toolsets",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -55,16 +55,16 @@
|
|
|
55
55
|
"tsx": "^4.23.1",
|
|
56
56
|
"typescript": "^7.0.2",
|
|
57
57
|
"vitest": "4.1.11",
|
|
58
|
-
"zod": "^4.6.
|
|
59
|
-
"@internal/lint": "0.0.144",
|
|
58
|
+
"zod": "^4.6.7",
|
|
60
59
|
"@internal/types-builder": "0.0.119",
|
|
61
|
-
"@
|
|
60
|
+
"@internal/lint": "0.0.144",
|
|
61
|
+
"@mastra/core": "1.79.0-alpha.4"
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@mastra/mcp": "^2.
|
|
64
|
+
"@mastra/mcp": "^2.5.0-alpha.1",
|
|
65
|
+
"@mastra/teams": "^0.1.2-alpha.1",
|
|
65
66
|
"@mastra/slack": "^1.7.3-alpha.0",
|
|
66
67
|
"@mastra/discord": "^1.3.1-alpha.0",
|
|
67
|
-
"@mastra/teams": "^0.1.2-alpha.1",
|
|
68
68
|
"@mastra/telegram": "^0.2.3-alpha.0"
|
|
69
69
|
},
|
|
70
70
|
"scripts": {
|
|
@@ -74,8 +74,8 @@
|
|
|
74
74
|
"generate-provider": "tsx scripts/generate-provider.ts",
|
|
75
75
|
"generate:provider-docs": "tsx scripts/generate-provider-docs.ts && pnpm format:provider-docs",
|
|
76
76
|
"format:provider-docs": "cd ../../docs && pnpm oxfmt-mdx --write src/content/en/reference/connect/providers.mdx",
|
|
77
|
-
"lint": "oxlint
|
|
78
|
-
"lint:fix": "oxlint --
|
|
77
|
+
"lint": "oxlint --type-aware .",
|
|
78
|
+
"lint:fix": "oxlint --type-aware --fix .",
|
|
79
79
|
"list-providers": "tsx scripts/list-providers.ts",
|
|
80
80
|
"remove-provider": "tsx scripts/remove-provider.ts",
|
|
81
81
|
"smoke-test": "tsx scripts/smoke-test/index.ts",
|