@contractspec/integration.providers-impls 3.7.6 → 3.8.2

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 (36) hide show
  1. package/README.md +80 -241
  2. package/dist/impls/composio-fallback-resolver.d.ts +4 -4
  3. package/dist/impls/composio-fallback-resolver.js +73 -73
  4. package/dist/impls/composio-mcp.d.ts +1 -1
  5. package/dist/impls/composio-proxies.d.ts +5 -5
  6. package/dist/impls/composio-sdk.d.ts +1 -1
  7. package/dist/impls/elevenlabs-voice.d.ts +1 -1
  8. package/dist/impls/fal-voice.d.ts +1 -1
  9. package/dist/impls/gcs-storage.d.ts +1 -1
  10. package/dist/impls/gmail-inbound.d.ts +1 -1
  11. package/dist/impls/gradium-voice.d.ts +2 -2
  12. package/dist/impls/health/base-health-provider.d.ts +1 -1
  13. package/dist/impls/health/official-health-providers.d.ts +1 -1
  14. package/dist/impls/health/providers.d.ts +1 -1
  15. package/dist/impls/health-provider-factory.d.ts +1 -1
  16. package/dist/impls/index.d.ts +31 -30
  17. package/dist/impls/index.js +2189 -2138
  18. package/dist/impls/messaging-telegram.d.ts +13 -0
  19. package/dist/impls/messaging-telegram.js +49 -0
  20. package/dist/impls/mistral-conversational.d.ts +1 -1
  21. package/dist/impls/mistral-conversational.js +159 -159
  22. package/dist/impls/posthog-reader.d.ts +1 -1
  23. package/dist/impls/provider-factory.d.ts +11 -11
  24. package/dist/impls/provider-factory.js +2116 -2066
  25. package/dist/index.d.ts +12 -12
  26. package/dist/index.js +2197 -2146
  27. package/dist/node/impls/composio-fallback-resolver.js +73 -73
  28. package/dist/node/impls/index.js +2189 -2138
  29. package/dist/node/impls/messaging-telegram.js +49 -0
  30. package/dist/node/impls/mistral-conversational.js +159 -159
  31. package/dist/node/impls/provider-factory.js +2116 -2066
  32. package/dist/node/index.js +2197 -2146
  33. package/dist/node/secrets/provider.js +2 -2
  34. package/dist/secrets/provider.d.ts +2 -2
  35. package/dist/secrets/provider.js +2 -2
  36. package/package.json +25 -13
@@ -160,79 +160,6 @@ class ComposioMcpProvider {
160
160
  }
161
161
  }
162
162
 
163
- // src/impls/composio-sdk.ts
164
- class ComposioSdkProvider {
165
- config;
166
- client;
167
- constructor(config) {
168
- this.config = config;
169
- }
170
- async executeTool(toolName, args) {
171
- const client = await this.getClient();
172
- const userId = args._userId ?? "default";
173
- try {
174
- const entity = await client.getEntity(userId);
175
- const result = await entity.execute(toolName, args);
176
- return { success: true, data: result };
177
- } catch (error) {
178
- return {
179
- success: false,
180
- error: error instanceof Error ? error.message : String(error)
181
- };
182
- }
183
- }
184
- async searchTools(query) {
185
- const client = await this.getClient();
186
- try {
187
- const tools = await client.actions.list({ query, limit: 20 });
188
- return tools.map((t) => ({
189
- name: t.name,
190
- description: t.description ?? "",
191
- toolkit: t.appName ?? "",
192
- parameters: t.parameters ?? {}
193
- }));
194
- } catch {
195
- return [];
196
- }
197
- }
198
- async getConnectedAccounts(userId) {
199
- const client = await this.getClient();
200
- try {
201
- const entity = await client.getEntity(userId);
202
- const connections = await entity.getConnections();
203
- return connections.map((c) => ({
204
- id: c.id,
205
- appName: c.appName,
206
- status: c.status
207
- }));
208
- } catch {
209
- return [];
210
- }
211
- }
212
- async getMcpConfig(userId) {
213
- const client = await this.getClient();
214
- try {
215
- const entity = await client.getEntity(userId);
216
- return {
217
- url: entity.getMcpUrl(),
218
- headers: entity.getMcpHeaders()
219
- };
220
- } catch {
221
- return;
222
- }
223
- }
224
- async getClient() {
225
- if (this.client)
226
- return this.client;
227
- const { Composio } = await import("@composio/core");
228
- this.client = new Composio({
229
- apiKey: this.config.apiKey,
230
- ...this.config.baseUrl ? { baseUrl: this.config.baseUrl } : {}
231
- });
232
- return this.client;
233
- }
234
- }
235
-
236
163
  // src/impls/composio-proxies.ts
237
164
  function composioToolName(toolkit, action) {
238
165
  return `${toolkit.toUpperCase()}_${action.toUpperCase()}`;
@@ -534,6 +461,79 @@ class ComposioGenericProxy {
534
461
  }
535
462
  }
536
463
 
464
+ // src/impls/composio-sdk.ts
465
+ class ComposioSdkProvider {
466
+ config;
467
+ client;
468
+ constructor(config) {
469
+ this.config = config;
470
+ }
471
+ async executeTool(toolName, args) {
472
+ const client = await this.getClient();
473
+ const userId = args._userId ?? "default";
474
+ try {
475
+ const entity = await client.getEntity(userId);
476
+ const result = await entity.execute(toolName, args);
477
+ return { success: true, data: result };
478
+ } catch (error) {
479
+ return {
480
+ success: false,
481
+ error: error instanceof Error ? error.message : String(error)
482
+ };
483
+ }
484
+ }
485
+ async searchTools(query) {
486
+ const client = await this.getClient();
487
+ try {
488
+ const tools = await client.actions.list({ query, limit: 20 });
489
+ return tools.map((t) => ({
490
+ name: t.name,
491
+ description: t.description ?? "",
492
+ toolkit: t.appName ?? "",
493
+ parameters: t.parameters ?? {}
494
+ }));
495
+ } catch {
496
+ return [];
497
+ }
498
+ }
499
+ async getConnectedAccounts(userId) {
500
+ const client = await this.getClient();
501
+ try {
502
+ const entity = await client.getEntity(userId);
503
+ const connections = await entity.getConnections();
504
+ return connections.map((c) => ({
505
+ id: c.id,
506
+ appName: c.appName,
507
+ status: c.status
508
+ }));
509
+ } catch {
510
+ return [];
511
+ }
512
+ }
513
+ async getMcpConfig(userId) {
514
+ const client = await this.getClient();
515
+ try {
516
+ const entity = await client.getEntity(userId);
517
+ return {
518
+ url: entity.getMcpUrl(),
519
+ headers: entity.getMcpHeaders()
520
+ };
521
+ } catch {
522
+ return;
523
+ }
524
+ }
525
+ async getClient() {
526
+ if (this.client)
527
+ return this.client;
528
+ const { Composio } = await import("@composio/core");
529
+ this.client = new Composio({
530
+ apiKey: this.config.apiKey,
531
+ ...this.config.baseUrl ? { baseUrl: this.config.baseUrl } : {}
532
+ });
533
+ return this.client;
534
+ }
535
+ }
536
+
537
537
  // src/impls/composio-fallback-resolver.ts
538
538
  class ComposioFallbackResolver {
539
539
  mcpProvider;