@mastra/connect 0.7.0-alpha.1 → 1.0.0-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.
Files changed (83) hide show
  1. package/README.md +47 -42
  2. package/dist/channels.d.ts +40 -22
  3. package/dist/channels.d.ts.map +1 -1
  4. package/dist/client.d.ts +21 -0
  5. package/dist/client.d.ts.map +1 -1
  6. package/dist/errors.d.ts +23 -0
  7. package/dist/errors.d.ts.map +1 -1
  8. package/dist/index.cjs +821 -465
  9. package/dist/index.cjs.map +1 -1
  10. package/dist/index.d.ts +4 -10
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/index.js +822 -458
  13. package/dist/index.js.map +1 -1
  14. package/dist/instrumentation.d.ts +48 -0
  15. package/dist/instrumentation.d.ts.map +1 -0
  16. package/dist/multi-connection.d.ts +1 -1
  17. package/dist/multi-connection.d.ts.map +1 -1
  18. package/dist/providers/channels.d.ts +5 -1
  19. package/dist/providers/channels.d.ts.map +1 -1
  20. package/dist/providers/clerk/tools/create-organization-domain.d.ts +9 -9
  21. package/dist/providers/clerk/tools/create-organization-domain.d.ts.map +1 -1
  22. package/dist/providers/clerk/tools/create-organization-invitation.d.ts +3 -3
  23. package/dist/providers/clerk/tools/create-user.d.ts.map +1 -1
  24. package/dist/providers/clerk/tools/delete-email-address.d.ts.map +1 -1
  25. package/dist/providers/clerk/tools/delete-organization-domain.d.ts.map +1 -1
  26. package/dist/providers/clerk/tools/delete-organization-membership.d.ts.map +1 -1
  27. package/dist/providers/clerk/tools/delete-organization-role.d.ts.map +1 -1
  28. package/dist/providers/clerk/tools/delete-phone-number.d.ts.map +1 -1
  29. package/dist/providers/clerk/tools/get-email-address.d.ts.map +1 -1
  30. package/dist/providers/clerk/tools/get-organization-invitation.d.ts +3 -3
  31. package/dist/providers/clerk/tools/get-organization-role.d.ts.map +1 -1
  32. package/dist/providers/clerk/tools/get-phone-number.d.ts.map +1 -1
  33. package/dist/providers/clerk/tools/get-session.d.ts +3 -3
  34. package/dist/providers/clerk/tools/get-session.d.ts.map +1 -1
  35. package/dist/providers/clerk/tools/list-organization-domains.d.ts +9 -9
  36. package/dist/providers/clerk/tools/list-organization-domains.d.ts.map +1 -1
  37. package/dist/providers/clerk/tools/list-organization-invitations.d.ts +3 -3
  38. package/dist/providers/clerk/tools/list-organization-invitations.d.ts.map +1 -1
  39. package/dist/providers/clerk/tools/list-organization-memberships.d.ts.map +1 -1
  40. package/dist/providers/clerk/tools/list-organization-roles.d.ts.map +1 -1
  41. package/dist/providers/clerk/tools/list-organizations.d.ts.map +1 -1
  42. package/dist/providers/clerk/tools/list-sessions.d.ts +3 -5
  43. package/dist/providers/clerk/tools/list-sessions.d.ts.map +1 -1
  44. package/dist/providers/clerk/tools/list-users.d.ts +12 -0
  45. package/dist/providers/clerk/tools/list-users.d.ts.map +1 -1
  46. package/dist/providers/clerk/tools/revoke-organization-invitation.d.ts +3 -3
  47. package/dist/providers/clerk/tools/revoke-session.d.ts +3 -3
  48. package/dist/providers/clerk/tools/revoke-session.d.ts.map +1 -1
  49. package/dist/providers/clerk/tools/update-organization-domain.d.ts +9 -9
  50. package/dist/providers/clerk/tools/update-organization-domain.d.ts.map +1 -1
  51. package/dist/providers/clerk/tools/update-organization-role.d.ts.map +1 -1
  52. package/dist/providers/clerk/tools/update-organization.d.ts +2 -0
  53. package/dist/providers/clerk/tools/update-organization.d.ts.map +1 -1
  54. package/dist/providers/clerk/tools/update-user.d.ts +10 -10
  55. package/dist/providers/clerk/tools/verify-organization-domain.d.ts +12 -7
  56. package/dist/providers/clerk/tools/verify-organization-domain.d.ts.map +1 -1
  57. package/dist/providers/discord/tools/list-channels.d.ts +2 -2
  58. package/dist/providers/discord/tools/list-channels.d.ts.map +1 -1
  59. package/dist/providers/jira/tools/get-create-issue-metadata.d.ts +42 -0
  60. package/dist/providers/jira/tools/get-create-issue-metadata.d.ts.map +1 -1
  61. package/dist/providers/jira/tools/list-issue-types.d.ts +6 -2
  62. package/dist/providers/jira/tools/list-issue-types.d.ts.map +1 -1
  63. package/dist/providers/resend/tools/cancel-email.d.ts +2 -2
  64. package/dist/providers/resend/tools/get-email.d.ts +2 -2
  65. package/dist/providers/resend/tools/get-received-email.d.ts +2 -2
  66. package/dist/providers/resend/tools/get-template.d.ts +2 -2
  67. package/dist/providers/resend/tools/list-emails.d.ts +2 -2
  68. package/dist/providers/resend/tools/list-received-emails.d.ts +2 -2
  69. package/dist/providers/resend/tools/update-contact-topics.d.ts.map +1 -1
  70. package/dist/registry.d.ts +1 -8
  71. package/dist/registry.d.ts.map +1 -1
  72. package/dist/resolution.d.ts +3 -11
  73. package/dist/resolution.d.ts.map +1 -1
  74. package/dist/runtime/platform-proxy.d.ts.map +1 -1
  75. package/dist/tools.d.ts +94 -33
  76. package/dist/tools.d.ts.map +1 -1
  77. package/dist/toolset.d.ts +39 -13
  78. package/dist/toolset.d.ts.map +1 -1
  79. package/package.json +12 -8
  80. package/dist/connect.d.ts +0 -22
  81. package/dist/connect.d.ts.map +0 -1
  82. package/dist/environment.d.ts +0 -48
  83. package/dist/environment.d.ts.map +0 -1
@@ -6,6 +6,7 @@ export declare const updateOrganizationInputSchema: z.ZodObject<{
6
6
  slug: z.ZodOptional<z.ZodString>;
7
7
  admin_delete_enabled: z.ZodOptional<z.ZodBoolean>;
8
8
  max_allowed_memberships: z.ZodOptional<z.ZodNumber>;
9
+ public_metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
9
10
  }, z.core.$strip>;
10
11
  export declare const updateOrganizationOutputSchema: z.ZodObject<{
11
12
  id: z.ZodString;
@@ -29,6 +30,7 @@ export declare function updateOrganizationTool(proxy: PlatformProxy): import("@m
29
30
  slug?: string | undefined;
30
31
  admin_delete_enabled?: boolean | undefined;
31
32
  max_allowed_memberships?: number | undefined;
33
+ public_metadata?: Record<string, unknown> | undefined;
32
34
  }, {
33
35
  [x: string]: unknown;
34
36
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"update-organization.d.ts","sourceRoot":"","sources":["../../../../src/providers/clerk/tools/update-organization.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAExE,eAAO,MAAM,6BAA6B;;;;;;iBAMxC,CAAC;AAqBH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;iBAAqB,CAAC;AAEjE,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,aAAa;;;;;;;;;;;;;;;;;;;;;;yIAwB1D"}
1
+ {"version":3,"file":"update-organization.d.ts","sourceRoot":"","sources":["../../../../src/providers/clerk/tools/update-organization.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAExE,eAAO,MAAM,6BAA6B;;;;;;;iBAOxC,CAAC;AAqBH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;iBAAqB,CAAC;AAEjE,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,aAAa;;;;;;;;;;;;;;;;;;;;;;;yIAyB1D"}
@@ -2,14 +2,14 @@ import { z } from 'zod';
2
2
  import type { PlatformProxy } from '../../../runtime/platform-proxy.js';
3
3
  export declare const updateUserInputSchema: z.ZodObject<{
4
4
  user_id: z.ZodString;
5
- first_name: z.ZodOptional<z.ZodString>;
6
- last_name: z.ZodOptional<z.ZodString>;
7
- username: z.ZodOptional<z.ZodString>;
5
+ first_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6
+ last_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7
+ username: z.ZodOptional<z.ZodNullable<z.ZodString>>;
8
8
  password: z.ZodOptional<z.ZodString>;
9
9
  skip_password_checks: z.ZodOptional<z.ZodBoolean>;
10
10
  sign_out_of_other_sessions: z.ZodOptional<z.ZodBoolean>;
11
- external_id: z.ZodOptional<z.ZodString>;
12
- locale: z.ZodOptional<z.ZodString>;
11
+ external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
12
+ locale: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13
13
  }, z.core.$strip>;
14
14
  export declare const updateUserOutputSchema: z.ZodObject<{
15
15
  id: z.ZodString;
@@ -29,14 +29,14 @@ export declare const updateUserOutputSchema: z.ZodObject<{
29
29
  }, z.core.$loose>;
30
30
  export declare function updateUserTool(proxy: PlatformProxy): import("@mastra/core/tools").Tool<{
31
31
  user_id: string;
32
- first_name?: string | undefined;
33
- last_name?: string | undefined;
34
- username?: string | undefined;
32
+ first_name?: string | null | undefined;
33
+ last_name?: string | null | undefined;
34
+ username?: string | null | undefined;
35
35
  password?: string | undefined;
36
36
  skip_password_checks?: boolean | undefined;
37
37
  sign_out_of_other_sessions?: boolean | undefined;
38
- external_id?: string | undefined;
39
- locale?: string | undefined;
38
+ external_id?: string | null | undefined;
39
+ locale?: string | null | undefined;
40
40
  }, {
41
41
  [x: string]: unknown;
42
42
  id: string;
@@ -9,15 +9,20 @@ export declare const verifyOrganizationDomainOutputSchema: z.ZodObject<{
9
9
  object: z.ZodOptional<z.ZodString>;
10
10
  organization_id: z.ZodOptional<z.ZodString>;
11
11
  name: z.ZodString;
12
- enrollment_mode: z.ZodOptional<z.ZodString>;
13
- affiliation_verification: z.ZodOptional<z.ZodObject<{
12
+ enrollment_mode: z.ZodOptional<z.ZodUnion<[z.ZodEnum<{
13
+ automatic_invitation: "automatic_invitation";
14
+ automatic_suggestion: "automatic_suggestion";
15
+ enterprise_sso: "enterprise_sso";
16
+ manual_invitation: "manual_invitation";
17
+ }>, z.ZodString]>>;
18
+ affiliation_verification: z.ZodOptional<z.ZodNullable<z.ZodObject<{
14
19
  attempts: z.ZodOptional<z.ZodNumber>;
15
20
  status: z.ZodOptional<z.ZodString>;
16
- }, z.core.$loose>>;
17
- verification: z.ZodOptional<z.ZodObject<{
21
+ }, z.core.$loose>>>;
22
+ verification: z.ZodOptional<z.ZodNullable<z.ZodObject<{
18
23
  attempts: z.ZodOptional<z.ZodNumber>;
19
24
  status: z.ZodOptional<z.ZodString>;
20
- }, z.core.$loose>>;
25
+ }, z.core.$loose>>>;
21
26
  verified: z.ZodOptional<z.ZodBoolean>;
22
27
  created_at: z.ZodOptional<z.ZodNumber>;
23
28
  updated_at: z.ZodOptional<z.ZodNumber>;
@@ -36,12 +41,12 @@ export declare function verifyOrganizationDomainTool(proxy: PlatformProxy): impo
36
41
  [x: string]: unknown;
37
42
  attempts?: number | undefined;
38
43
  status?: string | undefined;
39
- } | undefined;
44
+ } | null | undefined;
40
45
  verification?: {
41
46
  [x: string]: unknown;
42
47
  attempts?: number | undefined;
43
48
  status?: string | undefined;
44
- } | undefined;
49
+ } | null | undefined;
45
50
  verified?: boolean | undefined;
46
51
  created_at?: number | undefined;
47
52
  updated_at?: number | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"verify-organization-domain.d.ts","sourceRoot":"","sources":["../../../../src/providers/clerk/tools/verify-organization-domain.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAExE,eAAO,MAAM,mCAAmC;;;iBAAmE,CAAC;AAoBpH,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;iBAAiB,CAAC;AAEnE,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,aAAa;;;;;;;;;;;;;;;;;;;;;;;gJAiBhE"}
1
+ {"version":3,"file":"verify-organization-domain.d.ts","sourceRoot":"","sources":["../../../../src/providers/clerk/tools/verify-organization-domain.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAMxE,eAAO,MAAM,mCAAmC;;;iBAG9C,CAAC;AAyBH,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;iBAAiB,CAAC;AAEnE,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,aAAa;;;;;;;;;;;;;;;;;;;;;;;gJAiBhE"}
@@ -19,7 +19,7 @@ export declare const listChannelsOutputSchema: z.ZodObject<{
19
19
  recipients: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
20
20
  icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
21
21
  owner_id: z.ZodOptional<z.ZodString>;
22
- application_id: z.ZodOptional<z.ZodString>;
22
+ application_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
23
23
  managed: z.ZodOptional<z.ZodBoolean>;
24
24
  parent_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
25
25
  last_pin_timestamp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -52,7 +52,7 @@ export declare function listChannelsTool(proxy: PlatformProxy): import("@mastra/
52
52
  recipients?: unknown[] | undefined;
53
53
  icon?: string | null | undefined;
54
54
  owner_id?: string | undefined;
55
- application_id?: string | undefined;
55
+ application_id?: string | null | undefined;
56
56
  managed?: boolean | undefined;
57
57
  parent_id?: string | null | undefined;
58
58
  last_pin_timestamp?: string | null | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"list-channels.d.ts","sourceRoot":"","sources":["../../../../src/providers/discord/tools/list-channels.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAGxE,eAAO,MAAM,uBAAuB;;iBAElC,CAAC;AAgCH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAEnC,CAAC;AAEH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qIAmDpD"}
1
+ {"version":3,"file":"list-channels.d.ts","sourceRoot":"","sources":["../../../../src/providers/discord/tools/list-channels.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAGxE,eAAO,MAAM,uBAAuB;;iBAElC,CAAC;AAkCH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAEnC,CAAC;AAEH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qIAmDpD"}
@@ -13,6 +13,27 @@ export declare const getCreateIssueMetadataOutputSchema: z.ZodObject<{
13
13
  name: z.ZodString;
14
14
  self: z.ZodOptional<z.ZodString>;
15
15
  avatarUrls: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
16
+ issuetypes: z.ZodOptional<z.ZodArray<z.ZodObject<{
17
+ id: z.ZodString;
18
+ name: z.ZodString;
19
+ self: z.ZodOptional<z.ZodString>;
20
+ description: z.ZodOptional<z.ZodString>;
21
+ iconUrl: z.ZodOptional<z.ZodString>;
22
+ avatarId: z.ZodOptional<z.ZodNumber>;
23
+ subtask: z.ZodOptional<z.ZodBoolean>;
24
+ hierarchyLevel: z.ZodOptional<z.ZodNumber>;
25
+ fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
26
+ required: z.ZodOptional<z.ZodBoolean>;
27
+ schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
28
+ name: z.ZodOptional<z.ZodString>;
29
+ key: z.ZodOptional<z.ZodString>;
30
+ hasDefaultValue: z.ZodOptional<z.ZodBoolean>;
31
+ operations: z.ZodOptional<z.ZodArray<z.ZodString>>;
32
+ allowedValues: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
33
+ defaultValue: z.ZodOptional<z.ZodUnknown>;
34
+ autoCompleteUrl: z.ZodOptional<z.ZodString>;
35
+ }, z.core.$strip>>>;
36
+ }, z.core.$strip>>>;
16
37
  }, z.core.$strip>>>;
17
38
  }, z.core.$strip>;
18
39
  export declare function getCreateIssueMetadataTool(proxy: PlatformProxy): import("@mastra/core/tools").Tool<{
@@ -27,6 +48,27 @@ export declare function getCreateIssueMetadataTool(proxy: PlatformProxy): import
27
48
  name: string;
28
49
  self?: string | undefined;
29
50
  avatarUrls?: Record<string, string> | undefined;
51
+ issuetypes?: {
52
+ id: string;
53
+ name: string;
54
+ self?: string | undefined;
55
+ description?: string | undefined;
56
+ iconUrl?: string | undefined;
57
+ avatarId?: number | undefined;
58
+ subtask?: boolean | undefined;
59
+ hierarchyLevel?: number | undefined;
60
+ fields?: Record<string, {
61
+ required?: boolean | undefined;
62
+ schema?: Record<string, unknown> | undefined;
63
+ name?: string | undefined;
64
+ key?: string | undefined;
65
+ hasDefaultValue?: boolean | undefined;
66
+ operations?: string[] | undefined;
67
+ allowedValues?: unknown[] | undefined;
68
+ defaultValue?: unknown;
69
+ autoCompleteUrl?: string | undefined;
70
+ }> | undefined;
71
+ }[] | undefined;
30
72
  }[] | undefined;
31
73
  }, unknown, unknown, import("@mastra/core/tools").ToolExecutionContext<unknown, unknown, unknown>, "jira_get_create_issue_metadata", unknown>;
32
74
  //# sourceMappingURL=get-create-issue-metadata.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-create-issue-metadata.d.ts","sourceRoot":"","sources":["../../../../src/providers/jira/tools/get-create-issue-metadata.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAExE,eAAO,MAAM,iCAAiC;;;;;iBAa5C,CAAC;AAcH,eAAO,MAAM,kCAAkC;;;;;;;;iBAE7C,CAAC;AAEH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,aAAa;;;;;;;;;;;;;8IA8D9D"}
1
+ {"version":3,"file":"get-create-issue-metadata.d.ts","sourceRoot":"","sources":["../../../../src/providers/jira/tools/get-create-issue-metadata.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAExE,eAAO,MAAM,iCAAiC;;;;;iBAa5C,CAAC;AAuCH,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAE7C,CAAC;AAEH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8IA8D9D"}
@@ -1,6 +1,8 @@
1
1
  import { z } from 'zod';
2
2
  import type { PlatformProxy } from '../../../runtime/platform-proxy.js';
3
- export declare const listIssueTypesInputSchema: z.ZodObject<{}, z.core.$strip>;
3
+ export declare const listIssueTypesInputSchema: z.ZodObject<{
4
+ projectId: z.ZodOptional<z.ZodString>;
5
+ }, z.core.$strip>;
4
6
  export declare const listIssueTypesOutputSchema: z.ZodObject<{
5
7
  issueTypes: z.ZodArray<z.ZodObject<{
6
8
  id: z.ZodString;
@@ -12,7 +14,9 @@ export declare const listIssueTypesOutputSchema: z.ZodObject<{
12
14
  hierarchyLevel: z.ZodOptional<z.ZodNumber>;
13
15
  }, z.core.$strip>>;
14
16
  }, z.core.$strip>;
15
- export declare function listIssueTypesTool(proxy: PlatformProxy): import("@mastra/core/tools").Tool<Record<string, never>, {
17
+ export declare function listIssueTypesTool(proxy: PlatformProxy): import("@mastra/core/tools").Tool<{
18
+ projectId?: string | undefined;
19
+ }, {
16
20
  issueTypes: {
17
21
  id: string;
18
22
  name: string;
@@ -1 +1 @@
1
- {"version":3,"file":"list-issue-types.d.ts","sourceRoot":"","sources":["../../../../src/providers/jira/tools/list-issue-types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,aAAa,EAAwB,MAAM,oCAAoC,CAAC;AAO9F,eAAO,MAAM,yBAAyB,gCAEpC,CAAC;AAYH,eAAO,MAAM,0BAA0B;;;;;;;;;;iBAYrC,CAAC;AAUH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,aAAa;;;;;;;;;;qIA0FtD"}
1
+ {"version":3,"file":"list-issue-types.d.ts","sourceRoot":"","sources":["../../../../src/providers/jira/tools/list-issue-types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,aAAa,EAAwB,MAAM,oCAAoC,CAAC;AAO9F,eAAO,MAAM,yBAAyB;;iBAEpC,CAAC;AAYH,eAAO,MAAM,0BAA0B;;;;;;;;;;iBAYrC,CAAC;AAUH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,aAAa;;;;;;;;;;;;qIAsGtD"}
@@ -6,7 +6,7 @@ export declare const cancelEmailInputSchema: z.ZodObject<{
6
6
  export declare const cancelEmailOutputSchema: z.ZodObject<{
7
7
  object: z.ZodOptional<z.ZodString>;
8
8
  id: z.ZodOptional<z.ZodString>;
9
- message_id: z.ZodOptional<z.ZodString>;
9
+ message_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10
10
  to: z.ZodOptional<z.ZodArray<z.ZodString>>;
11
11
  from: z.ZodOptional<z.ZodString>;
12
12
  created_at: z.ZodOptional<z.ZodString>;
@@ -37,7 +37,7 @@ export declare function cancelEmailTool(proxy: PlatformProxy): import("@mastra/c
37
37
  [x: string]: unknown;
38
38
  object?: string | undefined;
39
39
  id?: string | undefined;
40
- message_id?: string | undefined;
40
+ message_id?: string | null | undefined;
41
41
  to?: string[] | undefined;
42
42
  from?: string | undefined;
43
43
  created_at?: string | undefined;
@@ -6,7 +6,7 @@ export declare const getEmailInputSchema: z.ZodObject<{
6
6
  export declare const getEmailOutputSchema: z.ZodObject<{
7
7
  object: z.ZodOptional<z.ZodString>;
8
8
  id: z.ZodOptional<z.ZodString>;
9
- message_id: z.ZodOptional<z.ZodString>;
9
+ message_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10
10
  to: z.ZodOptional<z.ZodArray<z.ZodString>>;
11
11
  from: z.ZodOptional<z.ZodString>;
12
12
  created_at: z.ZodOptional<z.ZodString>;
@@ -37,7 +37,7 @@ export declare function getEmailTool(proxy: PlatformProxy): import("@mastra/core
37
37
  [x: string]: unknown;
38
38
  object?: string | undefined;
39
39
  id?: string | undefined;
40
- message_id?: string | undefined;
40
+ message_id?: string | null | undefined;
41
41
  to?: string[] | undefined;
42
42
  from?: string | undefined;
43
43
  created_at?: string | undefined;
@@ -9,7 +9,7 @@ export declare const getReceivedEmailOutputSchema: z.ZodObject<{
9
9
  to: z.ZodOptional<z.ZodArray<z.ZodString>>;
10
10
  from: z.ZodOptional<z.ZodString>;
11
11
  subject: z.ZodOptional<z.ZodString>;
12
- message_id: z.ZodOptional<z.ZodString>;
12
+ message_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13
13
  bcc: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
14
14
  cc: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
15
15
  reply_to: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
@@ -40,7 +40,7 @@ export declare function getReceivedEmailTool(proxy: PlatformProxy): import("@mas
40
40
  to?: string[] | undefined;
41
41
  from?: string | undefined;
42
42
  subject?: string | undefined;
43
- message_id?: string | undefined;
43
+ message_id?: string | null | undefined;
44
44
  bcc?: string[] | null | undefined;
45
45
  cc?: string[] | null | undefined;
46
46
  reply_to?: string[] | null | undefined;
@@ -9,7 +9,7 @@ export declare const getTemplateOutputSchema: z.ZodObject<{
9
9
  current_version_id: z.ZodOptional<z.ZodString>;
10
10
  name: z.ZodOptional<z.ZodString>;
11
11
  alias: z.ZodOptional<z.ZodString>;
12
- from: z.ZodOptional<z.ZodString>;
12
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13
13
  subject: z.ZodOptional<z.ZodString>;
14
14
  reply_to: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
15
15
  html: z.ZodOptional<z.ZodString>;
@@ -47,7 +47,7 @@ export declare function getTemplateTool(proxy: PlatformProxy): import("@mastra/c
47
47
  current_version_id?: string | undefined;
48
48
  name?: string | undefined;
49
49
  alias?: string | undefined;
50
- from?: string | undefined;
50
+ from?: string | null | undefined;
51
51
  subject?: string | undefined;
52
52
  reply_to?: string[] | null | undefined;
53
53
  html?: string | undefined;
@@ -11,7 +11,7 @@ export declare const listEmailsOutputSchema: z.ZodObject<{
11
11
  data: z.ZodOptional<z.ZodArray<z.ZodObject<{
12
12
  object: z.ZodOptional<z.ZodString>;
13
13
  id: z.ZodOptional<z.ZodString>;
14
- message_id: z.ZodOptional<z.ZodString>;
14
+ message_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15
15
  to: z.ZodOptional<z.ZodArray<z.ZodString>>;
16
16
  from: z.ZodOptional<z.ZodString>;
17
17
  created_at: z.ZodOptional<z.ZodString>;
@@ -50,7 +50,7 @@ export declare function listEmailsTool(proxy: PlatformProxy): import("@mastra/co
50
50
  [x: string]: unknown;
51
51
  object?: string | undefined;
52
52
  id?: string | undefined;
53
- message_id?: string | undefined;
53
+ message_id?: string | null | undefined;
54
54
  to?: string[] | undefined;
55
55
  from?: string | undefined;
56
56
  created_at?: string | undefined;
@@ -13,7 +13,7 @@ export declare const listReceivedEmailsOutputSchema: z.ZodObject<{
13
13
  to: z.ZodOptional<z.ZodArray<z.ZodString>>;
14
14
  from: z.ZodOptional<z.ZodString>;
15
15
  subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16
- message_id: z.ZodOptional<z.ZodString>;
16
+ message_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
17
17
  bcc: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
18
18
  cc: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
19
19
  reply_to: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
@@ -47,7 +47,7 @@ export declare function listReceivedEmailsTool(proxy: PlatformProxy): import("@m
47
47
  to?: string[] | undefined;
48
48
  from?: string | undefined;
49
49
  subject?: string | null | undefined;
50
- message_id?: string | undefined;
50
+ message_id?: string | null | undefined;
51
51
  bcc?: string[] | null | undefined;
52
52
  cc?: string[] | null | undefined;
53
53
  reply_to?: string[] | null | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"update-contact-topics.d.ts","sourceRoot":"","sources":["../../../../src/providers/resend/tools/update-contact-topics.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,aAAa,EAAwB,MAAM,oCAAoC,CAAC;AAE9F,eAAO,MAAM,8BAA8B;;;;;;;;;;;iBAS3B,CAAC;AAgBjB,eAAO,MAAM,+BAA+B;;;;;;;;;;iBAAyB,CAAC;AAEtE,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,aAAa;;;;;;;;;;;;;;;;;;;;4IAmB3D"}
1
+ {"version":3,"file":"update-contact-topics.d.ts","sourceRoot":"","sources":["../../../../src/providers/resend/tools/update-contact-topics.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,aAAa,EAAwB,MAAM,oCAAoC,CAAC;AAE9F,eAAO,MAAM,8BAA8B;;;;;;;;;;;iBAS3B,CAAC;AAgBjB,eAAO,MAAM,+BAA+B;;;;;;;;;;iBAAyB,CAAC;AAEtE,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,aAAa;;;;;;;;;;;;;;;;;;;;4IAsB3D"}
@@ -4,7 +4,7 @@ import type { ProviderToolsOptions } from './toolset.js';
4
4
  interface ProviderRegistrationBase {
5
5
  /** Platform catalog id used to match project connections. */
6
6
  integrationId: string;
7
- /** Fallback connection-id environment variable when more than one active connection exists. */
7
+ /** Legacy connection-id env fallback; kept working but intentionally undocumented. */
8
8
  envVar: string;
9
9
  }
10
10
  /** A provider whose checked-in tools call the Platform HTTP proxy. */
@@ -21,19 +21,12 @@ export type ProviderRegistration = ProxyProviderRegistration | McpProviderRegist
21
21
  * Providers with checked-in HTTP toolsets. MCP-backed providers are discovered
22
22
  * from the Platform integration catalog at runtime.
23
23
  */
24
- export declare const TOOLS: readonly ProviderRegistration[];
25
- /**
26
- * @deprecated Use `TOOLS`. This alias is retained for one release cycle so
27
- * downstream consumers keep working; it will be removed in the next minor.
28
- */
29
24
  export declare const PROVIDERS: readonly ProviderRegistration[];
30
- export declare function findRegistration(integrationId: string): ProviderRegistration | undefined;
31
25
  /**
32
26
  * Channel-capable providers with a hand-maintained `channels()` registration.
33
27
  * The launch ships three (Slack, Telegram, Discord); the provider generator
34
28
  * grows to cover new entries when a fourth lands.
35
29
  */
36
30
  export declare const CHANNELS: readonly ChannelProviderRegistration[];
37
- export declare function findChannelRegistration(integrationId: string): ChannelProviderRegistration | undefined;
38
31
  export {};
39
32
  //# sourceMappingURL=registry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAGnF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAEzD,UAAU,wBAAwB;IAChC,6DAA6D;IAC7D,aAAa,EAAE,MAAM,CAAC;IACtB,+FAA+F;IAC/F,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,sEAAsE;AACtE,MAAM,WAAW,yBAA0B,SAAQ,wBAAwB;IACzE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,CAAC,OAAO,CAAC,EAAE,oBAAoB,KAAK,UAAU,CAAC;CAC7D;AAED,iFAAiF;AACjF,MAAM,WAAW,uBAA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EAAwB,CAAC;AAE9E;;;;GAIG;AACH,eAAO,MAAM,QAAQ,EAAE,SAAS,2BAA2B,EAAkB,CAAC"}
@@ -3,22 +3,14 @@ import type { NamedConnection } from './multi-connection.js';
3
3
  /** Identifies one provider's connection-resolution inputs. */
4
4
  export interface ConnectionRequest {
5
5
  integrationId: string;
6
- /** Fallback connection-id environment variable when more than one active connection exists. */
6
+ /** Legacy connection-id env fallback; kept working but intentionally undocumented. */
7
7
  envVar: string;
8
8
  /** Pinned connection id from per-integration options. */
9
9
  connectionId?: string;
10
10
  }
11
- export declare function validateIntegrationOverrides(integrations: Record<string, unknown> | undefined): void;
11
+ export declare function validateProviderIds(providers: Record<string, unknown> | undefined): void;
12
12
  export declare function connectionIdEnvVar(integrationId: string): string;
13
13
  export declare function groupByIntegrationId(connections: ProjectConnection[]): Map<string, ProjectConnection[]>;
14
- /**
15
- * Resolves the connection to use for one provider, per the contract:
16
- * option/env var wins; else a single active connection; anything else
17
- * (ambiguity, needs_reauth, no usable candidate) warns and skips so one bad
18
- * integration never takes down the whole resolution. A needs_reauth
19
- * connection is never silently mapped.
20
- */
21
- export declare function resolveConnection(request: ConnectionRequest, candidates: ProjectConnection[]): string | undefined;
22
14
  /**
23
15
  * Discriminated resolution of one provider request against its candidate
24
16
  * connections. `single` maps to unwrapped tools with the connection id baked
@@ -36,7 +28,7 @@ export type ProviderResolution = {
36
28
  };
37
29
  /**
38
30
  * Resolves how to configure one provider given its candidate connections:
39
- * - An explicit pin (option or env var) forces `single` at that id.
31
+ * - An explicit pin (`connectionId`) forces `single` at that id.
40
32
  * - Exactly one active connection → `single`.
41
33
  * - Two or more active connections → `multi`; the caller wraps tools with
42
34
  * `connection_name` so the agent chooses per call at execute time.
@@ -1 +1 @@
1
- {"version":3,"file":"resolution.d.ts","sourceRoot":"","sources":["../src/resolution.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,OAAO,KAAK,EAAE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EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QAAC,KAAK,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,CAAC,CAAA;KAAE,CAAC,CAAC;IACjG,WAAW,EAAE,OAAO,eAAe,CAAC;IACpC,GAAG,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IAClC;;;;OAIG;IACH,QAAQ,CAAC,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
@@ -1,16 +1,19 @@
1
1
  import type { ConnectClientOptions } from './client.js';
2
- interface ToolsIntegrationOptionsBase {
2
+ interface ToolsProviderOptionsBase {
3
3
  /** Pin a specific connection id (bypasses env-var fallback and single-active-connection resolution). */
4
4
  connectionId?: string;
5
5
  /**
6
- * MCP tool keys that may run without tool approval. Every other discovered
7
- * MCP tool requires approval, whatever the server's annotations claim, since
8
- * a remote catalog cannot be trusted to classify its own tools. An unknown
9
- * name skips the provider with a warning, so a typo never widens access.
6
+ * Tool-approval policy for this provider, applied to discovered MCP tools
7
+ * and checked-in HTTP tools alike. Tools do not require approval by
8
+ * default, matching `@mastra/mcp`'s own default. Pass `true` to require
9
+ * approval for every tool on this provider, or an array of tool keys to
10
+ * require approval only for those tools; entries containing `*` are globs
11
+ * (e.g. `'linear_delete_*'`). Unknown names and globs that match nothing
12
+ * fail resolution with an `invalid_options` error so a typo never
13
+ * silently widens access. (Explicit `false` is equivalent to omitting the
14
+ * option.)
10
15
  */
11
- autoApproveTools?: string[];
12
- /** Exclude this provider entirely, even if a connection exists. */
13
- disabled?: boolean;
16
+ requireApproval?: boolean | string[];
14
17
  }
15
18
  /**
16
19
  * Per-provider overrides. `allowTools` and `disallowTools` are mutually
@@ -18,30 +21,65 @@ interface ToolsIntegrationOptionsBase {
18
21
  * accidental co-occurrence in typed object literals; `tools()` also
19
22
  * validates at build time so loosely typed callers get a clear error.
20
23
  */
21
- export type ToolsIntegrationOptions = ToolsIntegrationOptionsBase & ({
22
- /** Restrict the returned toolset to these tool keys. Unknown names throw at build time. */
24
+ export type ToolsProviderOptions = ToolsProviderOptionsBase & ({
25
+ /**
26
+ * Restrict the returned toolset to these tool keys. Entries containing
27
+ * `*` are globs (e.g. `'linear_get_*'`). Unknown names and globs that
28
+ * match nothing throw at build time.
29
+ */
23
30
  allowTools?: string[];
24
31
  disallowTools?: never;
25
32
  } | {
26
33
  allowTools?: never;
27
- /** Remove these tool keys from the returned toolset. Unknown names throw at build time. */
34
+ /**
35
+ * Remove these tool keys from the returned toolset. Entries containing
36
+ * `*` are globs (e.g. `'linear_delete_*'`). Unknown names and globs
37
+ * that match nothing throw at build time.
38
+ */
28
39
  disallowTools?: string[];
29
40
  });
30
41
  export interface ToolsOptions {
31
42
  /** Platform project whose connections to discover. Falls back to MASTRA_PROJECT_ID. */
32
43
  projectId?: string;
33
44
  /**
34
- * Providers to enable, in one of two shapes:
35
- * - `["linear", "github"]` — string array shorthand for enabling providers
36
- * with no per-provider options.
37
- * - `{ linear: { allowTools: [...] }, github: { disallowTools: [...] } }` —
38
- * object form for per-provider overrides. Each provider may set at most
39
- * one of `allowTools` and `disallowTools`; supplying both throws.
45
+ * Which providers to resolve, in one of two shapes:
46
+ * - `["linear", "github"]` — an allowlist: only the listed providers
47
+ * resolve, with default options. Anything else connected to the project
48
+ * is ignored.
49
+ * - `{ linear: true, github: { allowTools: [...] }, notion: false }` —
50
+ * per-provider configuration. Every connected provider still resolves
51
+ * unless excluded: `true` (or `{}`) enables with defaults, `false`
52
+ * excludes, and an options object configures tool filters, approval
53
+ * policy, or a pinned connection. Each provider may set at most one of
54
+ * `allowTools` and `disallowTools`; supplying both throws.
40
55
  *
41
- * Both forms may be combined by passing the object form; use the array
42
- * shorthand only when no overrides are needed.
56
+ * Omit the option entirely to resolve every provider the project has a
57
+ * connection for.
58
+ */
59
+ providers?: string[] | Record<string, boolean | ToolsProviderOptions>;
60
+ /**
61
+ * Default tool filter applied to every provider that does not set its own
62
+ * `allowTools`/`disallowTools`. Entries containing `*` are globs. Unlike
63
+ * the per-provider filters, defaults apply leniently: an entry that
64
+ * matches nothing on a given provider simply does not apply there (the
65
+ * provider set is live, so a default like `['*_get_*']` must tolerate
66
+ * providers without matching tools). An entry that matches nothing across
67
+ * the whole resolution logs a warning. Mutually exclusive with
68
+ * `disallowTools`. A provider that sets either filter option opts out of
69
+ * both defaults.
70
+ */
71
+ allowTools?: string[];
72
+ /** Default disallow filter; see {@link ToolsOptions.allowTools} for semantics. */
73
+ disallowTools?: string[];
74
+ /**
75
+ * Default tool-approval policy applied to every provider that does not set
76
+ * its own `requireApproval`. `true` gates every tool (except the synthetic
77
+ * `<provider>__list_connections` wrappers); an array gates matching keys,
78
+ * with the same lenient glob semantics as the default filters. A provider
79
+ * can opt out of a global `requireApproval: true` with
80
+ * `requireApproval: false`.
43
81
  */
44
- integrations?: string[] | Record<string, ToolsIntegrationOptions>;
82
+ requireApproval?: boolean | string[];
45
83
  client?: ConnectClientOptions;
46
84
  /** How long a resolved snapshot stays fresh, in milliseconds. Default 30_000. `0` revalidates every resolution. */
47
85
  ttlMs?: number;
@@ -49,37 +87,60 @@ export interface ToolsOptions {
49
87
  type ResolvedToolsRecord = Record<string, {
50
88
  id: string;
51
89
  }>;
90
+ /** Context Mastra passes when invoking the resolver as a dynamic `tools` argument. */
91
+ export interface ToolsResolverContext {
92
+ requestContext?: unknown;
93
+ mastra?: unknown;
94
+ }
95
+ /**
96
+ * Tools accepted by {@link ToolsResolver.with}: a static tool record (e.g.
97
+ * `createTool()` outputs) or a function — sync or async, optionally reading
98
+ * the per-request context — returning one.
99
+ */
100
+ export type ToolsWithInput = Record<string, {
101
+ id: string;
102
+ }> | ((ctx?: ToolsResolverContext) => Record<string, {
103
+ id: string;
104
+ }> | Promise<Record<string, {
105
+ id: string;
106
+ }>>);
52
107
  /**
53
108
  * Live tool resolver returned by `tools()`. Pass it straight to an agent's
54
- * dynamic `tools` argument: Mastra calls it per generate/stream, so project
55
- * integrations attached or detached on the platform are reflected without
109
+ * dynamic `tools` argument: Mastra calls it per generate/stream, so providers
110
+ * connected or disconnected on the platform are reflected without
56
111
  * restarting the server. Call it directly (`await tools()`) when you need the
57
112
  * current flat tool record.
58
113
  */
59
114
  export interface ToolsResolver {
60
- (ctx?: {
61
- requestContext?: unknown;
62
- mastra?: unknown;
63
- }): Promise<ResolvedToolsRecord>;
64
- /** Drops the cached snapshot; the next resolution fetches fresh from the platform. */
65
- invalidate(): void;
115
+ (ctx?: ToolsResolverContext): Promise<ResolvedToolsRecord>;
66
116
  /** Fetches tools from the platform now and updates the cache. Rejects if the platform fetch fails. */
67
117
  refresh(): Promise<ResolvedToolsRecord>;
68
118
  /** Closes MCP transports owned by this resolver and clears its cached snapshot. */
69
119
  disconnect(): Promise<void>;
120
+ /**
121
+ * Returns a new resolver that merges `extra` tools into every resolution,
122
+ * so an agent can combine its own tools with connect tools in one
123
+ * expression: `tools: connectTools.with({ weatherTool })`. On a key
124
+ * collision the extra tools win — connect keys are provider-prefixed, so
125
+ * collisions only happen deliberately. The cache handles (`refresh`,
126
+ * `disconnect`) delegate to the base resolver, and `.with()` calls chain.
127
+ */
128
+ with(extra: ToolsWithInput): ToolsResolver;
70
129
  }
71
130
  /**
72
131
  * Returns a live toolset resolver over the project's Platform connections.
73
- * HTTP providers are loaded from the shipped `TOOLS` registry. MCP providers
132
+ * HTTP providers are loaded from the shipped `PROVIDERS` registry. MCP providers
74
133
  * are discovered from the Platform integration catalog. Tools from every supported
75
134
  * provider with a matching project connection are merged into one flat record
76
135
  * (matched by `integrationId`). The resolver serves a cached snapshot,
77
- * revalidating from the platform every `ttlMs`, so integrations attached
78
- * to (or detached from) the project are picked up (or dropped) without a
136
+ * revalidating from the platform every `ttlMs`, so providers connected
137
+ * to (or disconnected from) the project are picked up (or dropped) without a
79
138
  * restart.
80
139
  *
81
- * Configuration errors (missing project id, bad ttlMs, malformed integration id)
82
- * throw here — at call time — so they surface at startup.
140
+ * Configuration errors (missing project id, bad ttlMs, malformed integration id,
141
+ * the removed `autoApproveTools` key) throw here — at call time — so they
142
+ * surface at startup. Configuration errors that need discovery to detect
143
+ * (an unknown tool name in `requireApproval`) fail the resolution instead.
83
144
  * Expected provider absence is silently skipped. Actionable per-integration
84
145
  * problems during resolution (needs re-auth or ambiguity) are downgraded to
85
146
  * warn-and-skip so one bad integration never takes down the whole toolset.