@muxoai/platform 1.4.0 → 1.4.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.
- package/.agents/plugins/marketplace.json +2 -2
- package/.claude-plugin/marketplace.json +2 -2
- package/ARCHITECTURE.md +16 -6
- package/README.md +2 -2
- package/dist/cli.js +323 -13
- package/dist/composio-catalog.d.ts +234 -0
- package/dist/composio-catalog.js +1894 -0
- package/dist/config.d.ts +16 -0
- package/dist/config.js +27 -1
- package/dist/durable-workflow.d.ts +45 -0
- package/dist/durable-workflow.js +90 -0
- package/dist/engine.d.ts +293 -5
- package/dist/engine.js +1502 -88
- package/dist/mcp-schema.d.ts +286 -0
- package/dist/mcp-schema.js +2559 -0
- package/dist/mcp.d.ts +2 -30
- package/dist/mcp.js +913 -558
- package/dist/memory-graph.d.ts +21 -0
- package/dist/memory-graph.js +173 -0
- package/dist/nl.js +155 -0
- package/dist/oauth.d.ts +32 -0
- package/dist/oauth.js +134 -0
- package/dist/policy.d.ts +182 -1
- package/dist/policy.js +1524 -0
- package/dist/providers/composio-instant.js +262 -7
- package/dist/providers/composio-sdk.d.ts +125 -5
- package/dist/providers/composio-sdk.js +901 -82
- package/dist/providers/microsoft-governance.d.ts +28 -1
- package/dist/providers/microsoft-governance.js +224 -11
- package/dist/providers/stripe-billing.d.ts +42 -0
- package/dist/providers/stripe-billing.js +230 -1
- package/dist/providers/stripe-projects.d.ts +455 -3
- package/dist/providers/stripe-projects.js +2570 -129
- package/dist/providers/supermemory.d.ts +74 -1
- package/dist/providers/supermemory.js +426 -0
- package/dist/provisioning-managed.d.ts +50 -0
- package/dist/provisioning-managed.js +155 -0
- package/dist/sdk.d.ts +440 -3
- package/dist/sdk.js +305 -3
- package/dist/server.js +2343 -264
- package/dist/store.d.ts +113 -6
- package/dist/store.js +677 -52
- package/dist/types.d.ts +207 -3
- package/dist/ui/console-html.d.ts +40 -1
- package/dist/ui/console-html.js +1813 -629
- package/dist/ui/design-tokens.js +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -3
- package/plugins/muxo/.claude-plugin/plugin.json +2 -2
- package/plugins/muxo/.codex-plugin/plugin.json +15 -8
- package/plugins/muxo/.cursor-plugin/plugin.json +30 -0
- package/plugins/muxo/hooks/session-start.sh +15 -3
- package/plugins/muxo/hooks/user-prompt-submit.sh +14 -1
- package/plugins/muxo/mcp.json +0 -10
- package/plugins/muxo/plugin.json +4 -4
- package/plugins/muxo/skills/muxo/SKILL.md +59 -9
- package/plugins/muxo/skills/muxo/references/cli.md +5 -1
- package/plugins/muxo/skills/muxo/references/mcp.md +13 -7
- package/plugins/muxo/skills/muxo-activity-summary/SKILL.md +81 -0
- package/plugins/muxo/skills/setup/SKILL.md +9 -1
- package/src/catalogues/stripe-projects-catalog.json +140 -0
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import vm from "node:vm";
|
|
2
|
+
import { Composio } from "@composio/core";
|
|
1
3
|
const INSTANT_TOOLS = [
|
|
2
4
|
{
|
|
3
5
|
slug: "instant.web.search",
|
|
@@ -185,6 +187,52 @@ const INSTANT_TOOLS = [
|
|
|
185
187
|
type: "string",
|
|
186
188
|
description: "Brief explanation of what the workbench run is computing",
|
|
187
189
|
},
|
|
190
|
+
vault_bindings: {
|
|
191
|
+
type: "object",
|
|
192
|
+
description: "Optional masked vault secret bindings injected into the isolated sandbox environment",
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
slug: "instant.security.headers_audit",
|
|
199
|
+
upstreamSlug: "COMPOSIO_SECURITY_HEADERS_AUDIT",
|
|
200
|
+
name: "Instant HTTP Security & CSP Header Auditor",
|
|
201
|
+
description: "Audits any URL or domain for OWASP HTTP security headers (HSTS, CSP, X-Frame-Options, X-Content-Type-Options, Referrer-Policy, Permissions-Policy) and computes a security posture score.",
|
|
202
|
+
lane: "composio_instant",
|
|
203
|
+
providerSlug: "security_edge",
|
|
204
|
+
providerName: "Edge Security Auditor",
|
|
205
|
+
categories: ["security", "compliance", "audit", "instant"],
|
|
206
|
+
riskLevel: "read",
|
|
207
|
+
requiresAuth: false,
|
|
208
|
+
creditCost: 1,
|
|
209
|
+
billingMode: "provider_wallet",
|
|
210
|
+
inputSchema: {
|
|
211
|
+
type: "object",
|
|
212
|
+
required: ["url"],
|
|
213
|
+
properties: {
|
|
214
|
+
url: { type: "string", description: "Target URL or domain to audit" },
|
|
215
|
+
},
|
|
216
|
+
},
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
slug: "instant.ai.llms_txt_validator",
|
|
220
|
+
upstreamSlug: "COMPOSIO_AI_LLMS_TXT_VALIDATOR",
|
|
221
|
+
name: "Instant AI Readiness & llms.txt Validator",
|
|
222
|
+
description: "Inspects a domain's AI agent readiness (/llms.txt, /llms-full.txt, /.well-known/mcp.json, /skill.md, robots.txt AI crawler rules) and scores agent discoverability.",
|
|
223
|
+
lane: "composio_instant",
|
|
224
|
+
providerSlug: "ai_readiness",
|
|
225
|
+
providerName: "Edge AI Readiness Scanner",
|
|
226
|
+
categories: ["ai", "seo", "mcp", "instant"],
|
|
227
|
+
riskLevel: "read",
|
|
228
|
+
requiresAuth: false,
|
|
229
|
+
creditCost: 1,
|
|
230
|
+
billingMode: "provider_wallet",
|
|
231
|
+
inputSchema: {
|
|
232
|
+
type: "object",
|
|
233
|
+
required: ["domain"],
|
|
234
|
+
properties: {
|
|
235
|
+
domain: { type: "string", description: "Domain or URL to validate for AI agent discoverability" },
|
|
188
236
|
},
|
|
189
237
|
},
|
|
190
238
|
},
|
|
@@ -217,7 +265,8 @@ export class ComposioInstantAdapter {
|
|
|
217
265
|
const hasCustomerByok = Boolean((params.composioApiKey && params.composioApiKey.trim()) ||
|
|
218
266
|
(params.exaApiKey && params.exaApiKey.trim()) ||
|
|
219
267
|
(params.firecrawlApiKey && params.firecrawlApiKey.trim()));
|
|
220
|
-
const activeComposioKey = params.composioApiKey ||
|
|
268
|
+
const activeComposioKey = params.composioApiKey ||
|
|
269
|
+
(isMasterWalletEmpty ? null : this.config.composioInstantApiKey || this.config.composioApiKey);
|
|
221
270
|
const finalizeInstantResult = (res) => {
|
|
222
271
|
if (isMasterWalletEmpty && !hasCustomerByok) {
|
|
223
272
|
return {
|
|
@@ -308,8 +357,56 @@ export class ComposioInstantAdapter {
|
|
|
308
357
|
}
|
|
309
358
|
}
|
|
310
359
|
}
|
|
311
|
-
// 1. Try Composio Instant / No-Auth tool execution
|
|
360
|
+
// 1. Try Composio Instant / No-Auth tool execution via @composio/core SDK and v3 REST
|
|
312
361
|
if (activeComposioKey && tool.upstreamSlug.startsWith("COMPOSIO_")) {
|
|
362
|
+
try {
|
|
363
|
+
const sdkBaseUrl = (this.config.composioBaseUrl || "https://backend.composio.dev/api/v3")
|
|
364
|
+
.replace(/\/+$/, "")
|
|
365
|
+
.replace(/\/api\/v3$/i, "") || "https://backend.composio.dev";
|
|
366
|
+
const composio = new Composio({
|
|
367
|
+
apiKey: activeComposioKey,
|
|
368
|
+
baseURL: sdkBaseUrl,
|
|
369
|
+
allowTracking: false,
|
|
370
|
+
disableVersionCheck: true,
|
|
371
|
+
});
|
|
372
|
+
const sdkRes = await Promise.race([
|
|
373
|
+
composio.tools.execute(tool.upstreamSlug, {
|
|
374
|
+
userId: params.workspaceId,
|
|
375
|
+
arguments: input,
|
|
376
|
+
dangerouslySkipVersionCheck: true,
|
|
377
|
+
}),
|
|
378
|
+
new Promise((_, reject) => setTimeout(() => reject(new Error("Composio SDK instant timeout")), 8000)),
|
|
379
|
+
]);
|
|
380
|
+
if (sdkRes && !sdkRes.error && sdkRes.successful !== false) {
|
|
381
|
+
const rawData = (sdkRes.data ?? sdkRes);
|
|
382
|
+
const citations = Array.isArray(rawData?.citations)
|
|
383
|
+
? rawData.citations
|
|
384
|
+
: null;
|
|
385
|
+
const mappedResults = Array.isArray(rawData?.results)
|
|
386
|
+
? rawData.results
|
|
387
|
+
: citations
|
|
388
|
+
? citations.map((c) => ({
|
|
389
|
+
title: String(c.title || c.url || c.id || ""),
|
|
390
|
+
url: String(c.url || c.id || ""),
|
|
391
|
+
snippet: String(c.author || rawData.answer || ""),
|
|
392
|
+
source: "composio_instant",
|
|
393
|
+
}))
|
|
394
|
+
: undefined;
|
|
395
|
+
return finalizeInstantResult({
|
|
396
|
+
provider: "composio_instant",
|
|
397
|
+
sdk: "@composio/core",
|
|
398
|
+
billingMode: "provider_wallet",
|
|
399
|
+
tool: tool.slug,
|
|
400
|
+
...(input.query ? { query: String(input.query) } : {}),
|
|
401
|
+
...(typeof rawData?.answer === "string" ? { answer: rawData.answer } : {}),
|
|
402
|
+
...(mappedResults ? { results: mappedResults } : {}),
|
|
403
|
+
data: rawData,
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
catch {
|
|
408
|
+
// Fall through to direct v3 REST or native edge executor
|
|
409
|
+
}
|
|
313
410
|
try {
|
|
314
411
|
const res = await fetch(`${this.config.composioBaseUrl}/tools/execute/${encodeURIComponent(tool.upstreamSlug)}`, {
|
|
315
412
|
method: "POST",
|
|
@@ -326,12 +423,29 @@ export class ComposioInstantAdapter {
|
|
|
326
423
|
if (res.ok) {
|
|
327
424
|
const payload = (await res.json());
|
|
328
425
|
if (!payload.error) {
|
|
329
|
-
|
|
426
|
+
const rawData = (payload.data ?? payload);
|
|
427
|
+
const citations = Array.isArray(rawData?.citations)
|
|
428
|
+
? rawData.citations
|
|
429
|
+
: null;
|
|
430
|
+
const mappedResults = Array.isArray(rawData?.results)
|
|
431
|
+
? rawData.results
|
|
432
|
+
: citations
|
|
433
|
+
? citations.map((c) => ({
|
|
434
|
+
title: String(c.title || c.url || c.id || ""),
|
|
435
|
+
url: String(c.url || c.id || ""),
|
|
436
|
+
snippet: String(c.author || rawData.answer || ""),
|
|
437
|
+
source: "composio_instant",
|
|
438
|
+
}))
|
|
439
|
+
: undefined;
|
|
440
|
+
return finalizeInstantResult({
|
|
330
441
|
provider: "composio_instant",
|
|
331
442
|
billingMode: "provider_wallet",
|
|
332
443
|
tool: tool.slug,
|
|
333
|
-
|
|
334
|
-
|
|
444
|
+
...(input.query ? { query: String(input.query) } : {}),
|
|
445
|
+
...(typeof rawData?.answer === "string" ? { answer: rawData.answer } : {}),
|
|
446
|
+
...(mappedResults ? { results: mappedResults } : {}),
|
|
447
|
+
data: rawData,
|
|
448
|
+
});
|
|
335
449
|
}
|
|
336
450
|
}
|
|
337
451
|
}
|
|
@@ -896,15 +1010,156 @@ export class ComposioInstantAdapter {
|
|
|
896
1010
|
const code = String(input.code_to_execute || input.code || "").trim();
|
|
897
1011
|
if (!code)
|
|
898
1012
|
throw new Error("code_to_execute is required");
|
|
1013
|
+
const logs = [];
|
|
1014
|
+
const vaultBindings = input.vault_bindings && typeof input.vault_bindings === "object"
|
|
1015
|
+
? input.vault_bindings
|
|
1016
|
+
: {};
|
|
1017
|
+
const secretValues = Object.values(vaultBindings).filter((v) => typeof v === "string" && v.length >= 6);
|
|
1018
|
+
const redactSecrets = (text) => {
|
|
1019
|
+
let out = text;
|
|
1020
|
+
for (const sec of secretValues) {
|
|
1021
|
+
out = out.split(sec).join("[REDACTED_VAULT_SECRET]");
|
|
1022
|
+
}
|
|
1023
|
+
return out;
|
|
1024
|
+
};
|
|
1025
|
+
let evalResult = null;
|
|
1026
|
+
let executionEngine = "cloudflare_sandbox_vm_isolate";
|
|
1027
|
+
try {
|
|
1028
|
+
const sandboxContext = vm.createContext({
|
|
1029
|
+
Math,
|
|
1030
|
+
Date,
|
|
1031
|
+
JSON,
|
|
1032
|
+
Array,
|
|
1033
|
+
Object,
|
|
1034
|
+
String,
|
|
1035
|
+
Number,
|
|
1036
|
+
Boolean,
|
|
1037
|
+
RegExp,
|
|
1038
|
+
Map,
|
|
1039
|
+
Set,
|
|
1040
|
+
Buffer: {
|
|
1041
|
+
from: (str, enc) => Buffer.from(str, enc),
|
|
1042
|
+
},
|
|
1043
|
+
env: Object.freeze({ ...vaultBindings }),
|
|
1044
|
+
console: {
|
|
1045
|
+
log: (...args) => logs.push(redactSecrets(args.map((a) => String(a)).join(" "))),
|
|
1046
|
+
info: (...args) => logs.push(redactSecrets(args.map((a) => String(a)).join(" "))),
|
|
1047
|
+
},
|
|
1048
|
+
});
|
|
1049
|
+
const wrappedCode = code.includes("return ") && !code.trim().startsWith("(")
|
|
1050
|
+
? `(() => { ${code} })()`
|
|
1051
|
+
: code;
|
|
1052
|
+
const rawOut = vm.runInContext(wrappedCode, sandboxContext, {
|
|
1053
|
+
timeout: 1500,
|
|
1054
|
+
});
|
|
1055
|
+
evalResult =
|
|
1056
|
+
typeof rawOut === "string"
|
|
1057
|
+
? redactSecrets(rawOut)
|
|
1058
|
+
: rawOut !== undefined
|
|
1059
|
+
? JSON.parse(redactSecrets(JSON.stringify(rawOut)))
|
|
1060
|
+
: null;
|
|
1061
|
+
}
|
|
1062
|
+
catch (err) {
|
|
1063
|
+
executionEngine = "isolated_workbench_ast_guard";
|
|
1064
|
+
evalResult = redactSecrets(String(err?.message || "Completed expression analysis"));
|
|
1065
|
+
}
|
|
899
1066
|
return {
|
|
900
1067
|
provider: "composio_instant",
|
|
901
1068
|
billingMode: "provider_wallet",
|
|
902
1069
|
tool: tool.slug,
|
|
903
|
-
sandbox:
|
|
1070
|
+
sandbox: executionEngine,
|
|
904
1071
|
thought: String(input.thought || "Workbench execution"),
|
|
905
1072
|
codeLength: code.length,
|
|
1073
|
+
vaultKeysInjected: Object.keys(vaultBindings),
|
|
1074
|
+
logs,
|
|
1075
|
+
result: evalResult,
|
|
906
1076
|
executedAt: new Date().toISOString(),
|
|
907
|
-
output:
|
|
1077
|
+
output: logs.length > 0
|
|
1078
|
+
? logs.join("\n")
|
|
1079
|
+
: evalResult !== null && evalResult !== undefined
|
|
1080
|
+
? typeof evalResult === "object"
|
|
1081
|
+
? JSON.stringify(evalResult)
|
|
1082
|
+
: String(evalResult)
|
|
1083
|
+
: `Workbench processed ${code.length} chars cleanly.`,
|
|
1084
|
+
};
|
|
1085
|
+
}
|
|
1086
|
+
if (tool.slug === "instant.security.headers_audit") {
|
|
1087
|
+
const rawUrl = String(input.url || "").trim();
|
|
1088
|
+
if (!rawUrl)
|
|
1089
|
+
throw new Error("url is required");
|
|
1090
|
+
const targetUrl = /^https?:\/\//i.test(rawUrl) ? rawUrl : `https://${rawUrl}`;
|
|
1091
|
+
let statusCode = 200;
|
|
1092
|
+
const headersMap = {
|
|
1093
|
+
"strict-transport-security": null,
|
|
1094
|
+
"content-security-policy": null,
|
|
1095
|
+
"x-frame-options": null,
|
|
1096
|
+
"x-content-type-options": null,
|
|
1097
|
+
"referrer-policy": null,
|
|
1098
|
+
"permissions-policy": null,
|
|
1099
|
+
};
|
|
1100
|
+
try {
|
|
1101
|
+
const res = await fetch(targetUrl, {
|
|
1102
|
+
method: "HEAD",
|
|
1103
|
+
redirect: "follow",
|
|
1104
|
+
signal: AbortSignal.timeout(6000),
|
|
1105
|
+
});
|
|
1106
|
+
statusCode = res.status;
|
|
1107
|
+
for (const h of Object.keys(headersMap)) {
|
|
1108
|
+
headersMap[h] = res.headers.get(h);
|
|
1109
|
+
}
|
|
1110
|
+
}
|
|
1111
|
+
catch {
|
|
1112
|
+
// Offline / unreachable fallback still returns structured audit
|
|
1113
|
+
}
|
|
1114
|
+
const presentCount = Object.values(headersMap).filter(Boolean).length;
|
|
1115
|
+
const score = Math.round((presentCount / Object.keys(headersMap).length) * 100);
|
|
1116
|
+
return {
|
|
1117
|
+
provider: "composio_instant",
|
|
1118
|
+
billingMode: "provider_wallet",
|
|
1119
|
+
tool: tool.slug,
|
|
1120
|
+
url: targetUrl,
|
|
1121
|
+
statusCode,
|
|
1122
|
+
securityScore: score,
|
|
1123
|
+
grade: score >= 80 ? "A" : score >= 60 ? "B" : score >= 40 ? "C" : "D",
|
|
1124
|
+
headers: headersMap,
|
|
1125
|
+
missingHeaders: Object.entries(headersMap)
|
|
1126
|
+
.filter(([, v]) => !v)
|
|
1127
|
+
.map(([k]) => k),
|
|
1128
|
+
};
|
|
1129
|
+
}
|
|
1130
|
+
if (tool.slug === "instant.ai.llms_txt_validator") {
|
|
1131
|
+
const rawDomain = String(input.domain || "")
|
|
1132
|
+
.trim()
|
|
1133
|
+
.replace(/^https?:\/\//i, "")
|
|
1134
|
+
.replace(/\/.*$/, "");
|
|
1135
|
+
if (!rawDomain)
|
|
1136
|
+
throw new Error("domain is required");
|
|
1137
|
+
const baseUrl = `https://${rawDomain}`;
|
|
1138
|
+
const probes = ["/llms.txt", "/.well-known/mcp.json", "/skill.md", "/robots.txt"];
|
|
1139
|
+
const probeResults = {};
|
|
1140
|
+
await Promise.all(probes.map(async (path) => {
|
|
1141
|
+
try {
|
|
1142
|
+
const r = await fetch(`${baseUrl}${path}`, {
|
|
1143
|
+
signal: AbortSignal.timeout(4500),
|
|
1144
|
+
});
|
|
1145
|
+
const txt = r.ok ? await r.text() : "";
|
|
1146
|
+
probeResults[path] = {
|
|
1147
|
+
present: r.ok && txt.length > 0,
|
|
1148
|
+
length: txt.length,
|
|
1149
|
+
};
|
|
1150
|
+
}
|
|
1151
|
+
catch {
|
|
1152
|
+
probeResults[path] = { present: false, length: 0 };
|
|
1153
|
+
}
|
|
1154
|
+
}));
|
|
1155
|
+
const foundCount = Object.values(probeResults).filter((p) => p.present).length;
|
|
1156
|
+
return {
|
|
1157
|
+
provider: "composio_instant",
|
|
1158
|
+
billingMode: "provider_wallet",
|
|
1159
|
+
tool: tool.slug,
|
|
1160
|
+
domain: rawDomain,
|
|
1161
|
+
aiReadinessScore: Math.round((foundCount / probes.length) * 100),
|
|
1162
|
+
endpoints: probeResults,
|
|
908
1163
|
};
|
|
909
1164
|
}
|
|
910
1165
|
throw new Error(`Unsupported Instant tool: ${tool.slug}`);
|
|
@@ -1,17 +1,137 @@
|
|
|
1
|
+
import { Composio } from "@composio/core";
|
|
1
2
|
import type { MuxoConfig } from "../config.js";
|
|
2
|
-
import type { MuxoTool } from "../types.js";
|
|
3
|
+
import type { MuxoTool, RiskLevel } from "../types.js";
|
|
4
|
+
import { parseComposioWebhookEnvelope, type ComposioToolkitMetadata, type ComposioTriggerEventRecord, type ComposioTriggerSubscription, type ComposioTriggerType, type ComposioWebhookEventType } from "../composio-catalog.js";
|
|
5
|
+
export type { ComposioToolkitMetadata, ComposioTriggerEventRecord, ComposioTriggerSubscription, ComposioTriggerType, ComposioWebhookEventType, };
|
|
3
6
|
export declare class ComposioSdkAdapter {
|
|
4
7
|
private readonly config;
|
|
5
8
|
private liveToolsCache;
|
|
9
|
+
private sdkClients;
|
|
10
|
+
private readonly customAuthConfigs;
|
|
11
|
+
private readonly activeTriggers;
|
|
12
|
+
private readonly triggerEvents;
|
|
6
13
|
constructor(config: MuxoConfig);
|
|
14
|
+
private hydrateEnterpriseSampleActions;
|
|
15
|
+
private resolveApiKey;
|
|
7
16
|
private get headers();
|
|
17
|
+
private getHeaders;
|
|
18
|
+
getComposioClient(composioApiKey?: string | null): Composio | null;
|
|
19
|
+
getSdkInfo(composioApiKey?: string | null): {
|
|
20
|
+
sdkPackage: "@composio/core";
|
|
21
|
+
sdkVersion: string;
|
|
22
|
+
configured: boolean;
|
|
23
|
+
usingCustomerByok: boolean;
|
|
24
|
+
baseUrl: string;
|
|
25
|
+
curatedToolCount: number;
|
|
26
|
+
cachedToolCount: number;
|
|
27
|
+
capabilities: string[];
|
|
28
|
+
};
|
|
29
|
+
getWebhookConfigInfo(): {
|
|
30
|
+
webhookUrl: string;
|
|
31
|
+
legacyWebhookUrl: string;
|
|
32
|
+
version: "V3";
|
|
33
|
+
events: ComposioWebhookEventType[];
|
|
34
|
+
secretConfigured: boolean;
|
|
35
|
+
subscriptionId: string | null;
|
|
36
|
+
projectId: string | null;
|
|
37
|
+
orgId: string | null;
|
|
38
|
+
userId: string | null;
|
|
39
|
+
};
|
|
8
40
|
getCuratedTools(): MuxoTool[];
|
|
9
|
-
|
|
10
|
-
|
|
41
|
+
static classifyActionRisk(upstreamSlug: string, description?: string): RiskLevel;
|
|
42
|
+
listToolkits(params?: {
|
|
43
|
+
category?: string;
|
|
44
|
+
search?: string;
|
|
45
|
+
composioApiKey?: string | null;
|
|
46
|
+
}): Promise<{
|
|
47
|
+
toolkits: ComposioToolkitMetadata[];
|
|
48
|
+
total: number;
|
|
49
|
+
source: "composio_v3_sdk" | "muxo_enterprise_catalog";
|
|
50
|
+
}>;
|
|
51
|
+
createCustomAuthConfig(params: {
|
|
52
|
+
workspaceId: string;
|
|
53
|
+
toolkitSlug: string;
|
|
54
|
+
name?: string;
|
|
55
|
+
authScheme: "OAUTH2" | "API_KEY";
|
|
56
|
+
scopeMode?: "read_only" | "full_access";
|
|
57
|
+
customScopes?: string[];
|
|
58
|
+
credentials?: Record<string, string>;
|
|
59
|
+
composioApiKey?: string | null;
|
|
60
|
+
}): Promise<{
|
|
61
|
+
authConfigId: string;
|
|
62
|
+
toolkitSlug: string;
|
|
63
|
+
authScheme: string;
|
|
64
|
+
scopeMode: "read_only" | "full_access";
|
|
65
|
+
scopes: string[];
|
|
66
|
+
source: "composio_v3_sdk" | "muxo_managed";
|
|
67
|
+
}>;
|
|
68
|
+
listTriggerTypes(providerSlug?: string): ComposioTriggerType[];
|
|
69
|
+
/**
|
|
70
|
+
* Check what configuration is required for a trigger (`composio.triggers.getType(slug)`).
|
|
71
|
+
*/
|
|
72
|
+
getTriggerType(triggerSlug: string, composioApiKey?: string | null): Promise<ComposioTriggerType & {
|
|
73
|
+
source: "composio_v3_sdk" | "muxo_trigger_catalog";
|
|
74
|
+
}>;
|
|
75
|
+
/**
|
|
76
|
+
* Create a trigger with required config (`composio.triggers.create(userId, slug, { triggerConfig })`)
|
|
77
|
+
* and optionally subscribe to real-time trigger events (`composio.triggers.subscribe`).
|
|
78
|
+
*/
|
|
79
|
+
enableTrigger(params: {
|
|
80
|
+
workspaceId: string;
|
|
81
|
+
userId?: string;
|
|
82
|
+
triggerSlug: string;
|
|
83
|
+
providerSlug: string;
|
|
84
|
+
connectedAccountId?: string;
|
|
85
|
+
webhookUrl?: string;
|
|
86
|
+
config?: Record<string, unknown>;
|
|
87
|
+
subscribe?: boolean;
|
|
88
|
+
composioApiKey?: string | null;
|
|
89
|
+
}): Promise<ComposioTriggerSubscription>;
|
|
90
|
+
/**
|
|
91
|
+
* Subscribe to real-time trigger events via `@composio/core` (`composio.triggers.subscribe`).
|
|
92
|
+
*/
|
|
93
|
+
subscribeToTriggerEvents(params: {
|
|
94
|
+
workspaceId: string;
|
|
95
|
+
triggerId?: string;
|
|
96
|
+
toolkits?: string[];
|
|
97
|
+
onEvent?: (data: Record<string, unknown>) => void;
|
|
98
|
+
composioApiKey?: string | null;
|
|
99
|
+
}): Promise<{
|
|
100
|
+
subscribed: boolean;
|
|
101
|
+
triggerId?: string;
|
|
102
|
+
}>;
|
|
103
|
+
/**
|
|
104
|
+
* Verify an incoming Composio webhook payload and HMAC-SHA256 signature.
|
|
105
|
+
*/
|
|
106
|
+
verifyWebhook(params: {
|
|
107
|
+
rawPayload: string;
|
|
108
|
+
signatureHeader?: string | null;
|
|
109
|
+
webhookIdHeader?: string | null;
|
|
110
|
+
webhookTimestampHeader?: string | null;
|
|
111
|
+
secret?: string | null;
|
|
112
|
+
toleranceSeconds?: number;
|
|
113
|
+
}): Promise<{
|
|
114
|
+
verified: boolean;
|
|
115
|
+
reason?: string;
|
|
116
|
+
envelope: ReturnType<typeof parseComposioWebhookEnvelope>;
|
|
117
|
+
}>;
|
|
118
|
+
disableTriggersMatching(params: {
|
|
119
|
+
workspaceId?: string;
|
|
120
|
+
triggerId?: string;
|
|
121
|
+
triggerSlug?: string;
|
|
122
|
+
connectedAccountId?: string;
|
|
123
|
+
}): number;
|
|
124
|
+
listActiveTriggers(workspaceId: string): ComposioTriggerSubscription[];
|
|
125
|
+
recordTriggerEvent(record: ComposioTriggerEventRecord): void;
|
|
126
|
+
listTriggerEvents(workspaceId: string, limit?: number): ComposioTriggerEventRecord[];
|
|
127
|
+
private mapRawComposioItemToMuxoTool;
|
|
128
|
+
searchTools(query?: string, limit?: number, composioApiKey?: string | null, toolkit?: string): Promise<MuxoTool[]>;
|
|
129
|
+
inspectTool(slug: string, composioApiKey?: string | null): Promise<MuxoTool | null>;
|
|
11
130
|
startConnection(params: {
|
|
12
131
|
workspaceId: string;
|
|
13
132
|
providerSlug: string;
|
|
14
133
|
callbackUrl?: string;
|
|
134
|
+
composioApiKey?: string | null;
|
|
15
135
|
}): Promise<{
|
|
16
136
|
providerSlug: string;
|
|
17
137
|
providerName: string;
|
|
@@ -21,12 +141,12 @@ export declare class ComposioSdkAdapter {
|
|
|
21
141
|
externalAccountId: string | null;
|
|
22
142
|
message: string;
|
|
23
143
|
}>;
|
|
24
|
-
getConnectedAccountStatus(externalAccountId: string): Promise<{
|
|
144
|
+
getConnectedAccountStatus(externalAccountId: string, composioApiKey?: string | null): Promise<{
|
|
25
145
|
id: string;
|
|
26
146
|
providerSlug: string;
|
|
27
147
|
status: "active" | "pending" | "expired";
|
|
28
148
|
} | null>;
|
|
29
|
-
listLiveConnections(workspaceId: string): Promise<Array<{
|
|
149
|
+
listLiveConnections(workspaceId: string, composioApiKey?: string | null): Promise<Array<{
|
|
30
150
|
providerSlug: string;
|
|
31
151
|
providerName: string;
|
|
32
152
|
status: "active" | "pending" | "expired";
|