@mastra/connect 1.4.0 → 1.4.1-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.
@@ -1,4 +1,6 @@
1
+ import type { RequestContext } from '@mastra/core/request-context';
1
2
  import type { ApiRoute } from '@mastra/core/server';
3
+ import type { MastraUser } from '@mastra/core/types';
2
4
  import type { ConnectClientOptions } from './client.js';
3
5
  /**
4
6
  * Identity context handed to the optional {@link UserConnectRoutesOptions.resourceId}
@@ -6,11 +8,13 @@ import type { ConnectClientOptions } from './client.js';
6
8
  */
7
9
  export interface UserConnectIdentityContext {
8
10
  /** Request-scoped context populated by the server (auth middleware, custom middleware). */
9
- requestContext?: {
10
- get(key: string): unknown;
11
- };
12
- /** The authenticated user the server's auth pipeline stored on the request context, when present. */
13
- user?: unknown;
11
+ requestContext?: RequestContext;
12
+ /**
13
+ * Authenticated end user, normalized via the auth provider's `toMastraUser()`
14
+ * (the same `user` a `DynamicArgument` callback receives). `undefined` when
15
+ * the request is unauthenticated.
16
+ */
17
+ user?: MastraUser;
14
18
  }
15
19
  export interface UserConnectRoutesOptions {
16
20
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"user-connect-routes.d.ts","sourceRoot":"","sources":["../src/user-connect-routes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAYpD,OAAO,KAAK,EAAE,oBAAoB,EAA8D,MAAM,aAAa,CAAC;AAKpH;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IACzC,2FAA2F;IAC3F,cAAc,CAAC,EAAE;QAAE,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IAC/C,qGAAqG;IACrG,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,wBAAwB;IACvC;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB;;;;;;OA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H,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,0BAA0B,KAAK,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACnG,wDAAwD;IACxD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6FAA6F;IAC7F,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qGAAqG;IACrG,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,QAAQ,CAAC,EAAE;QACT;;;;WAIG;QACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;KAC3B,CAAC;CACH;AA4FD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,MAAM,GAAG,SAAS,EACvB,cAAc,EAAE,MAAM,EAAE,GACvB;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAA;CAAE,CAkCpD;AAMD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,wBAAwB,GAAG,QAAQ,EAAE,CAyW/E"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/connect",
3
- "version": "1.4.0",
3
+ "version": "1.4.1-alpha.1",
4
4
  "description": "Use Mastra platform integration connections as agent toolsets",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -58,15 +58,15 @@
58
58
  "zod": "^4.6.7",
59
59
  "@internal/ai-sdk-v5": "0.0.96",
60
60
  "@internal/lint": "0.0.149",
61
- "@internal/types-builder": "0.0.124",
62
- "@mastra/core": "1.83.0"
61
+ "@mastra/core": "1.84.0-alpha.3",
62
+ "@internal/types-builder": "0.0.124"
63
63
  },
64
64
  "dependencies": {
65
- "@mastra/discord": "^1.3.4",
66
- "@mastra/mcp": "^2.9.0",
65
+ "@mastra/mcp": "^2.10.0-alpha.0",
67
66
  "@mastra/slack": "^1.9.0",
68
67
  "@mastra/teams": "^0.1.5",
69
- "@mastra/telegram": "^0.2.5"
68
+ "@mastra/telegram": "^0.2.5",
69
+ "@mastra/discord": "^1.3.4"
70
70
  },
71
71
  "scripts": {
72
72
  "add-provider": "tsx scripts/add-provider.ts",