@contractspec/integration.providers-impls 3.7.6 → 3.7.7
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/README.md +80 -241
- package/dist/impls/composio-fallback-resolver.d.ts +4 -4
- package/dist/impls/composio-fallback-resolver.js +73 -73
- package/dist/impls/composio-mcp.d.ts +1 -1
- package/dist/impls/composio-proxies.d.ts +5 -5
- package/dist/impls/composio-sdk.d.ts +1 -1
- package/dist/impls/elevenlabs-voice.d.ts +1 -1
- package/dist/impls/fal-voice.d.ts +1 -1
- package/dist/impls/gcs-storage.d.ts +1 -1
- package/dist/impls/gmail-inbound.d.ts +1 -1
- package/dist/impls/gradium-voice.d.ts +2 -2
- package/dist/impls/health/base-health-provider.d.ts +1 -1
- package/dist/impls/health/official-health-providers.d.ts +1 -1
- package/dist/impls/health/providers.d.ts +1 -1
- package/dist/impls/health-provider-factory.d.ts +1 -1
- package/dist/impls/index.d.ts +30 -30
- package/dist/impls/index.js +2150 -2150
- package/dist/impls/mistral-conversational.d.ts +1 -1
- package/dist/impls/mistral-conversational.js +159 -159
- package/dist/impls/posthog-reader.d.ts +1 -1
- package/dist/impls/provider-factory.d.ts +11 -11
- package/dist/impls/provider-factory.js +2073 -2073
- package/dist/index.d.ts +12 -12
- package/dist/index.js +2057 -2057
- package/dist/node/impls/composio-fallback-resolver.js +73 -73
- package/dist/node/impls/index.js +2150 -2150
- package/dist/node/impls/mistral-conversational.js +159 -159
- package/dist/node/impls/provider-factory.js +2073 -2073
- package/dist/node/index.js +2057 -2057
- package/dist/node/secrets/provider.js +2 -2
- package/dist/secrets/provider.d.ts +2 -2
- package/dist/secrets/provider.js +2 -2
- package/package.json +11 -11
|
@@ -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;
|