@muxoai/sdk 1.4.3 → 1.4.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.
- package/.agents/plugins/marketplace.json +1 -1
- package/.claude-plugin/marketplace.json +2 -2
- package/README.md +15 -1
- package/dist/cli.js +167 -38
- package/dist/composio-catalog.d.ts +25 -0
- package/dist/composio-catalog.js +145 -0
- package/dist/config.d.ts +1 -0
- package/dist/config.js +1 -0
- package/dist/engine.d.ts +49 -5
- package/dist/engine.js +464 -26
- package/dist/mcp-schema.d.ts +14 -0
- package/dist/mcp-schema.js +65 -8
- package/dist/mcp.js +264 -3
- package/dist/oss-suite.d.ts +188 -4
- package/dist/oss-suite.js +1249 -20
- package/dist/policy.js +59 -0
- package/dist/providers/composio-instant.js +54 -36
- package/dist/providers/composio-sdk.d.ts +10 -1
- package/dist/providers/composio-sdk.js +144 -31
- package/dist/sdk.d.ts +19 -0
- package/dist/sdk.js +32 -0
- package/dist/server.js +105 -2
- package/dist/skills-catalog.d.ts +66 -0
- package/dist/skills-catalog.js +801 -0
- package/dist/types.d.ts +32 -0
- package/dist/ui/console-html.js +23 -8
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/plugins/muxo/.claude-plugin/plugin.json +1 -1
- package/plugins/muxo/.codex-plugin/plugin.json +2 -2
- package/plugins/muxo/.cursor-plugin/plugin.json +1 -1
- package/plugins/muxo/plugin.json +2 -2
- package/plugins/muxo/skills/muxo/SKILL.md +13 -3
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"plugins": [
|
|
7
7
|
{
|
|
8
8
|
"name": "muxo",
|
|
9
|
-
"version": "1.4.
|
|
9
|
+
"version": "1.4.4",
|
|
10
10
|
"description": "Governed execution across 1,000+ Connected Apps, Instant Tools (search, scrape, crawl, SEO audit), Cloud Infrastructure provisioning, Workspace Memory recall, and cryptographic execution receipts.",
|
|
11
11
|
"source": {
|
|
12
12
|
"source": "local",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"metadata": {
|
|
10
10
|
"description": "Official Muxo plugin marketplace for governed execution across Connected Apps, Instant Tools, Cloud Infrastructure, and Workspace Memory.",
|
|
11
|
-
"version": "1.4.
|
|
11
|
+
"version": "1.4.4"
|
|
12
12
|
},
|
|
13
13
|
"plugins": [
|
|
14
14
|
{
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
},
|
|
20
20
|
"strict": false,
|
|
21
21
|
"description": "Governed execution across 1,000+ Connected Apps, Instant Tools (search, scrape, crawl, SEO audit), Cloud Infrastructure provisioning, Workspace Memory recall, and verifiable audit records.",
|
|
22
|
-
"version": "1.4.
|
|
22
|
+
"version": "1.4.4",
|
|
23
23
|
"category": "Productivity",
|
|
24
24
|
"skills": [
|
|
25
25
|
"./plugins/muxo/skills/muxo",
|
package/README.md
CHANGED
|
@@ -1,9 +1,23 @@
|
|
|
1
1
|
# Muxo (`@muxoai/platform` / `@muxoai/cli` / `@muxoai/sdk`)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> **Let your AI agents take action across business apps, with approvals, spending controls, and proof of what happened.**
|
|
4
|
+
|
|
5
|
+
Muxo (`v1.4.4`) is the governed action, workflow automation, cloud provisioning, and business-receipt platform for AI agents and B2B SaaS teams. Before any external write or provisioning action runs, Muxo shows **what changes**, **who is affected**, **the estimated USD cost (`$X.XX` alongside credits or `$0.00` BYOK)**, and **which guardrail triggered approval**. After execution, Muxo issues both a **business-facing receipt** (*what changed, who authorized it, what succeeded, what remains unresolved, and exact USD/credit cost*) and a **cryptographic Ed25519 + SHA-256 audit receipt**.
|
|
6
|
+
|
|
7
|
+
Customers and their agents interact exclusively with **Muxo** — either via tested workflow packs, structured tool slugs, or free-form **Natural Language** (`muxo do`, `POST /api/v1/do`, `client.do()`, and MCP `plan_action`).
|
|
4
8
|
|
|
5
9
|
See [`ARCHITECTURE.md`](./ARCHITECTURE.md) for the complete internal engineering blueprint, open-source ecosystem Keep/Adopt/Drop matrix, and 4-pillar architecture.
|
|
6
10
|
|
|
11
|
+
### Tested Commercial Workflow Packs (`muxo playbooks` / `POST /api/v1/playbooks/:slug/run`)
|
|
12
|
+
Muxo ships **7 tested workflow templates** with explicit required connections, permissions, approval rules, upfront USD/credit cost estimates, failure & compensation behavior, and structured business deliverables:
|
|
13
|
+
1. **`customer-operations-agent`** — *Customer Operations Account Change, Approval & Receipt Saga* (`$0.05 USD` / 5 credits; reads support request, looks up customer context, proposes governed CRM/billing update with approval preview, posts verified receipt).
|
|
14
|
+
2. **`customer-onboarding-automation`** — *Agent-Powered Customer Onboarding & Tenant Provisioning* (`$0.30 USD` / 30 credits; provisions dedicated tenant database, configures workspace tracker, sends onboarding confirmation with rollback protection).
|
|
15
|
+
3. **`agency-workspace-automation`** — *Multi-Client Agency Workspace, Budget & Reporting Pack* (`$0.06 USD` / 6 credits; runs client audit, updates client deliverable board, and dispatches itemized USD/credit usage & receipt digest).
|
|
16
|
+
4. **`fullstack-cloud-bootstrap`** — *Full-Stack Cloud Database, Cache & Edge Bootstrap* (`$0.52 USD` / 52 credits).
|
|
17
|
+
5. **`competitor-seo-growth-brief`** — *Autonomous Competitor & SEO Executive Brief* (`$0.06 USD` / 6 credits).
|
|
18
|
+
6. **`incident-containment-audit`** — *Zero-Trust Incident Containment & WORM Forensic Audit* (`$0.05 USD` / 5 credits).
|
|
19
|
+
7. **`customer-release-readiness`** — *Customer Release Readiness & Security Sign-Off* (`$0.05 USD` / 5 credits).
|
|
20
|
+
|
|
7
21
|
Under the hood, Muxo unifies **four core pillars** plus **Natural Language Routing** and **BYOK (Bring Your Own Key) 0-Credit Execution** behind one **19-operation MCP contract**, OpenAI Plugin (`agent-plugins.org/1.0.0`), REST API, Interactive CLI/TUI (`@muxoai/cli`), TypeScript SDK (`@muxoai/sdk`), and Web Console (`https://app.muxo.ai`):
|
|
8
22
|
|
|
9
23
|
1. **Connected Apps (`app.*`) & Instant Tools (`instant.*`)** — Managed OAuth SaaS integrations (`app.github.*`, `app.gmail.*`, `app.slack.*`, `app.notion.*`, `app.linear.*`) with live browser OAuth handoff (`wait_for_connection`), zero-OAuth instant capabilities (`instant.web.search`, `instant.web.scrape`, `instant.web.crawl`, `instant.seo.audit`, `instant.hackernews.top_stories`, `instant.github.repo_intel`, `instant.dns.lookup`, `instant.composio.workbench`), plus **CLI-first Autonomous 2-Call Agent Signup & Claim** (`POST /api/v1/agents/signup` + `POST /api/v1/agents/claim`).
|
package/dist/cli.js
CHANGED
|
@@ -9,6 +9,7 @@ import { handleJsonRpcMcpRequest, LATEST_MCP_PROTOCOL_VERSION } from "./mcp.js";
|
|
|
9
9
|
import { DEFAULT_WORKSPACE_POLICY, describePolicyInPlainEnglish, sanitizePolicyPatch, } from "./policy.js";
|
|
10
10
|
import { RING_LABELS } from "./providers/microsoft-governance.js";
|
|
11
11
|
import { BYOK_PROVIDER_CATALOG, MuxoStore } from "./store.js";
|
|
12
|
+
import { buildMuxoMcpSkillBundles, getMuxoSkill, listMuxoSkills, renderMuxoSkillMarkdown, } from "./skills-catalog.js";
|
|
12
13
|
import { MUXO_VERSION } from "./version.js";
|
|
13
14
|
function promptUserLine(question) {
|
|
14
15
|
return new Promise((resolve) => {
|
|
@@ -578,6 +579,30 @@ async function runCli() {
|
|
|
578
579
|
return;
|
|
579
580
|
}
|
|
580
581
|
if (cmd === "harness") {
|
|
582
|
+
const sub = positional[1];
|
|
583
|
+
if (sub === "configure" ||
|
|
584
|
+
sub === "config" ||
|
|
585
|
+
sub === "preset" ||
|
|
586
|
+
sub === "presets" ||
|
|
587
|
+
Boolean(flags.preset)) {
|
|
588
|
+
const preset = (typeof flags.preset === "string" ? flags.preset : undefined) ||
|
|
589
|
+
(sub === "preset" || sub === "configure" || sub === "config"
|
|
590
|
+
? positional[2]
|
|
591
|
+
: undefined);
|
|
592
|
+
const harness = typeof flags.harness === "string" ? flags.harness : positional[3];
|
|
593
|
+
const prompt = typeof flags.prompt === "string" ? flags.prompt : undefined;
|
|
594
|
+
if (remoteUrl) {
|
|
595
|
+
const res = await remoteFetch("/api/v1/harness/configure", {
|
|
596
|
+
method: "POST",
|
|
597
|
+
body: { preset, harness, prompt },
|
|
598
|
+
});
|
|
599
|
+
console.log(JSON.stringify(res, null, 2));
|
|
600
|
+
return;
|
|
601
|
+
}
|
|
602
|
+
const { engine, ctx } = getLocalContext();
|
|
603
|
+
console.log(JSON.stringify(engine.configureHarness(ctx, { preset, harness, prompt }), null, 2));
|
|
604
|
+
return;
|
|
605
|
+
}
|
|
581
606
|
const checks = [];
|
|
582
607
|
const skip = (reason) => ({ skip: reason });
|
|
583
608
|
const runCheck = async (id, name, fn) => {
|
|
@@ -2285,44 +2310,26 @@ async function runCli() {
|
|
|
2285
2310
|
});
|
|
2286
2311
|
return;
|
|
2287
2312
|
}
|
|
2288
|
-
// Natural Language fallback: if user passed plain English directly (`muxo "Audit https://muxo.ai for SEO"`)
|
|
2289
|
-
if (cmd !== "help" && !flags.help && !flags.h && positional.length > 0) {
|
|
2290
|
-
const promptText = positional.join(" ").trim();
|
|
2291
|
-
const planOnly = flags["plan-only"] === true || flags.plan === true;
|
|
2292
|
-
const autoApprove = flags["no-approve"] ? false : true;
|
|
2293
|
-
const fundingMode = flags.byok || flags.funding === "byok"
|
|
2294
|
-
? "byok"
|
|
2295
|
-
: flags.funding === "muxo_funded"
|
|
2296
|
-
? "muxo_funded"
|
|
2297
|
-
: undefined;
|
|
2298
|
-
if (remoteUrl) {
|
|
2299
|
-
const data = await remoteFetch("/api/v1/do", {
|
|
2300
|
-
method: "POST",
|
|
2301
|
-
body: {
|
|
2302
|
-
prompt: promptText,
|
|
2303
|
-
dryRun: planOnly,
|
|
2304
|
-
planOnly,
|
|
2305
|
-
autoApprove,
|
|
2306
|
-
autoExecute: !planOnly,
|
|
2307
|
-
approveRisky: autoApprove,
|
|
2308
|
-
fundingMode,
|
|
2309
|
-
},
|
|
2310
|
-
});
|
|
2311
|
-
console.log(JSON.stringify(data, null, 2));
|
|
2312
|
-
return;
|
|
2313
|
-
}
|
|
2314
|
-
const { engine, ctx } = getLocalContext();
|
|
2315
|
-
const result = await engine.doNaturalLanguage(ctx, {
|
|
2316
|
-
prompt: promptText,
|
|
2317
|
-
autoApprove,
|
|
2318
|
-
planOnly,
|
|
2319
|
-
fundingMode,
|
|
2320
|
-
});
|
|
2321
|
-
console.log(JSON.stringify(result, null, 2));
|
|
2322
|
-
return;
|
|
2323
|
-
}
|
|
2324
2313
|
if (cmd === "playbooks" || cmd === "playbook") {
|
|
2325
2314
|
const sub = positional[1];
|
|
2315
|
+
if (sub === "create" || sub === "add" || sub === "define") {
|
|
2316
|
+
const prompt = positional.slice(2).join(" ").trim();
|
|
2317
|
+
const input = flags.input
|
|
2318
|
+
? JSON.parse(String(flags.input))
|
|
2319
|
+
: {};
|
|
2320
|
+
if (remoteUrl) {
|
|
2321
|
+
const res = await remoteFetch("/api/v1/playbooks", {
|
|
2322
|
+
method: "POST",
|
|
2323
|
+
body: { prompt, ...input },
|
|
2324
|
+
});
|
|
2325
|
+
console.log(JSON.stringify(res, null, 2));
|
|
2326
|
+
return;
|
|
2327
|
+
}
|
|
2328
|
+
const { engine, ctx } = getLocalContext();
|
|
2329
|
+
const res = engine.createCustomPlaybook(ctx, { prompt, input });
|
|
2330
|
+
console.log(JSON.stringify(res, null, 2));
|
|
2331
|
+
return;
|
|
2332
|
+
}
|
|
2326
2333
|
if (sub === "run") {
|
|
2327
2334
|
const slug = positional[2] ||
|
|
2328
2335
|
flags.slug ||
|
|
@@ -2348,8 +2355,8 @@ async function runCli() {
|
|
|
2348
2355
|
console.log(JSON.stringify(res, null, 2));
|
|
2349
2356
|
return;
|
|
2350
2357
|
}
|
|
2351
|
-
const { engine } = getLocalContext();
|
|
2352
|
-
const playbooks = engine.listCommercialPlaybooks();
|
|
2358
|
+
const { engine, ctx } = getLocalContext();
|
|
2359
|
+
const playbooks = engine.listCommercialPlaybooks(ctx);
|
|
2353
2360
|
console.log(JSON.stringify({ ok: true, count: playbooks.length, playbooks }, null, 2));
|
|
2354
2361
|
return;
|
|
2355
2362
|
}
|
|
@@ -2405,6 +2412,127 @@ async function runCli() {
|
|
|
2405
2412
|
console.log(JSON.stringify({ ok: true, ...engine.exportOtelTraces(ctx, limit) }, null, 2));
|
|
2406
2413
|
return;
|
|
2407
2414
|
}
|
|
2415
|
+
if (cmd === "skills" || cmd === "skill") {
|
|
2416
|
+
const sub = (positional[1] || "list").toLowerCase();
|
|
2417
|
+
const baseUrlForSkill = remoteUrl || "https://api.muxo.ai";
|
|
2418
|
+
if (sub === "list" || sub === "ls") {
|
|
2419
|
+
const category = typeof flags.category === "string" ? flags.category : undefined;
|
|
2420
|
+
const provider = typeof flags.provider === "string" ? flags.provider : undefined;
|
|
2421
|
+
const query = typeof flags.query === "string"
|
|
2422
|
+
? flags.query
|
|
2423
|
+
: typeof flags.q === "string"
|
|
2424
|
+
? flags.q
|
|
2425
|
+
: positional[2];
|
|
2426
|
+
const skills = listMuxoSkills({ category, provider, query }, baseUrlForSkill);
|
|
2427
|
+
console.log(JSON.stringify({
|
|
2428
|
+
ok: true,
|
|
2429
|
+
count: skills.length,
|
|
2430
|
+
skills: skills.map((s) => ({
|
|
2431
|
+
slug: s.slug,
|
|
2432
|
+
title: s.title,
|
|
2433
|
+
category: s.category,
|
|
2434
|
+
lane: s.lane,
|
|
2435
|
+
providerSlug: s.providerSlug,
|
|
2436
|
+
recommendedTools: s.recommendedTools,
|
|
2437
|
+
skillUrl: `${baseUrlForSkill}/skills/${s.slug}/SKILL.md`,
|
|
2438
|
+
mcpResourceUri: `muxo://skills/${s.slug}`,
|
|
2439
|
+
})),
|
|
2440
|
+
}, null, 2));
|
|
2441
|
+
return;
|
|
2442
|
+
}
|
|
2443
|
+
if (sub === "show" || sub === "get" || sub === "inspect") {
|
|
2444
|
+
const slug = positional[2] || "github-automation";
|
|
2445
|
+
const skill = getMuxoSkill(slug, baseUrlForSkill);
|
|
2446
|
+
const markdown = renderMuxoSkillMarkdown(slug, baseUrlForSkill);
|
|
2447
|
+
if (!skill || !markdown) {
|
|
2448
|
+
console.error(`Skill not found: ${slug}`);
|
|
2449
|
+
process.exitCode = 1;
|
|
2450
|
+
return;
|
|
2451
|
+
}
|
|
2452
|
+
if (flags.json) {
|
|
2453
|
+
console.log(JSON.stringify({ ok: true, skill, markdown }, null, 2));
|
|
2454
|
+
}
|
|
2455
|
+
else {
|
|
2456
|
+
console.log(markdown);
|
|
2457
|
+
}
|
|
2458
|
+
return;
|
|
2459
|
+
}
|
|
2460
|
+
if (sub === "install" || sub === "add") {
|
|
2461
|
+
const targetRoot = typeof flags.dir === "string"
|
|
2462
|
+
? path.resolve(flags.dir)
|
|
2463
|
+
: flags.agents
|
|
2464
|
+
? path.resolve(process.cwd(), ".agents", "skills")
|
|
2465
|
+
: path.resolve(process.cwd(), ".claude", "skills");
|
|
2466
|
+
const slugsToInstall = flags["all-curated"]
|
|
2467
|
+
? buildMuxoMcpSkillBundles(baseUrlForSkill).map((b) => b.name)
|
|
2468
|
+
: [positional[2] || "github-automation"];
|
|
2469
|
+
const installed = [];
|
|
2470
|
+
for (const rawSlug of slugsToInstall) {
|
|
2471
|
+
const skill = getMuxoSkill(rawSlug, baseUrlForSkill);
|
|
2472
|
+
const markdown = renderMuxoSkillMarkdown(rawSlug, baseUrlForSkill);
|
|
2473
|
+
if (!skill || !markdown) {
|
|
2474
|
+
console.error(`Skill not found: ${rawSlug}`);
|
|
2475
|
+
process.exitCode = 1;
|
|
2476
|
+
return;
|
|
2477
|
+
}
|
|
2478
|
+
const skillDir = path.join(targetRoot, skill.slug);
|
|
2479
|
+
fs.mkdirSync(skillDir, { recursive: true });
|
|
2480
|
+
const filePath = path.join(skillDir, "SKILL.md");
|
|
2481
|
+
fs.writeFileSync(filePath, markdown, "utf8");
|
|
2482
|
+
installed.push({ slug: skill.slug, path: filePath });
|
|
2483
|
+
}
|
|
2484
|
+
console.log(JSON.stringify({
|
|
2485
|
+
ok: true,
|
|
2486
|
+
installedCount: installed.length,
|
|
2487
|
+
targetRoot,
|
|
2488
|
+
installed,
|
|
2489
|
+
}, null, 2));
|
|
2490
|
+
return;
|
|
2491
|
+
}
|
|
2492
|
+
// Default: if `muxo skills <slug>` was called directly
|
|
2493
|
+
const directSkill = getMuxoSkill(sub, baseUrlForSkill);
|
|
2494
|
+
const directMd = renderMuxoSkillMarkdown(sub, baseUrlForSkill);
|
|
2495
|
+
if (directSkill && directMd) {
|
|
2496
|
+
console.log(flags.json ? JSON.stringify({ ok: true, skill: directSkill, markdown: directMd }, null, 2) : directMd);
|
|
2497
|
+
return;
|
|
2498
|
+
}
|
|
2499
|
+
}
|
|
2500
|
+
// Natural Language fallback: if user passed plain English directly (`muxo "Audit https://muxo.ai for SEO"`)
|
|
2501
|
+
if (cmd !== "help" && !flags.help && !flags.h && positional.length > 0) {
|
|
2502
|
+
const promptText = positional.join(" ").trim();
|
|
2503
|
+
const planOnly = flags["plan-only"] === true || flags.plan === true;
|
|
2504
|
+
const autoApprove = flags["no-approve"] ? false : true;
|
|
2505
|
+
const fundingMode = flags.byok || flags.funding === "byok"
|
|
2506
|
+
? "byok"
|
|
2507
|
+
: flags.funding === "muxo_funded"
|
|
2508
|
+
? "muxo_funded"
|
|
2509
|
+
: undefined;
|
|
2510
|
+
if (remoteUrl) {
|
|
2511
|
+
const data = await remoteFetch("/api/v1/do", {
|
|
2512
|
+
method: "POST",
|
|
2513
|
+
body: {
|
|
2514
|
+
prompt: promptText,
|
|
2515
|
+
dryRun: planOnly,
|
|
2516
|
+
planOnly,
|
|
2517
|
+
autoApprove,
|
|
2518
|
+
autoExecute: !planOnly,
|
|
2519
|
+
approveRisky: autoApprove,
|
|
2520
|
+
fundingMode,
|
|
2521
|
+
},
|
|
2522
|
+
});
|
|
2523
|
+
console.log(JSON.stringify(data, null, 2));
|
|
2524
|
+
return;
|
|
2525
|
+
}
|
|
2526
|
+
const { engine, ctx } = getLocalContext();
|
|
2527
|
+
const result = await engine.doNaturalLanguage(ctx, {
|
|
2528
|
+
prompt: promptText,
|
|
2529
|
+
autoApprove,
|
|
2530
|
+
planOnly,
|
|
2531
|
+
fundingMode,
|
|
2532
|
+
});
|
|
2533
|
+
console.log(JSON.stringify(result, null, 2));
|
|
2534
|
+
return;
|
|
2535
|
+
}
|
|
2408
2536
|
console.log(`
|
|
2409
2537
|
Muxo CLI — Unified Agent Execution, Cloud Infrastructure, Memory & Safety Platform
|
|
2410
2538
|
|
|
@@ -2452,6 +2580,7 @@ Core Commands:
|
|
|
2452
2580
|
muxo cedar [evaluate <tool_slug>] Compile or evaluate AWS Cedar 4.x & OPA Rego v1 policy-as-code
|
|
2453
2581
|
muxo telemetry [--limit 25] Export OpenTelemetry GenAI / MCP OTLP & Langfuse trace spans
|
|
2454
2582
|
muxo playbooks [run <slug>] List or execute Temporal-compatible commercial Saga playbooks
|
|
2583
|
+
muxo skills [list|show|install] [<slug>] Browse or install governed domain & workflow SKILL.md playbooks
|
|
2455
2584
|
muxo roi Compute FinOps unit economics, BYOK savings, and engineering ROI
|
|
2456
2585
|
muxo harness Check API, MCP, auth, governance and catalog; print MCP config
|
|
2457
2586
|
muxo serve [--port 4310] Start unified HTTP Console, Landing, OAuth Callback & MCP server
|
|
@@ -232,3 +232,28 @@ export declare function renderDefaultHostedSiteHtml(params: {
|
|
|
232
232
|
providerSlug: string;
|
|
233
233
|
liveUrl: string;
|
|
234
234
|
}): string;
|
|
235
|
+
export type ComposioMcpGatewayMetaTool = "COMPOSIO_SEARCH_TOOLS" | "COMPOSIO_GET_TOOL_SCHEMAS" | "COMPOSIO_MANAGE_CONNECTIONS" | "COMPOSIO_MULTI_EXECUTE_TOOL" | "COMPOSIO_REMOTE_WORKBENCH" | "COMPOSIO_WAIT_FOR_CONNECTIONS";
|
|
236
|
+
export interface ComposioMcpGatewayCallOptions {
|
|
237
|
+
apiKey: string;
|
|
238
|
+
gatewayUrl?: string | null;
|
|
239
|
+
workspaceId?: string;
|
|
240
|
+
sessionId?: string;
|
|
241
|
+
usingCustomerByok?: boolean;
|
|
242
|
+
isReadOnly?: boolean;
|
|
243
|
+
timeoutMs?: number;
|
|
244
|
+
fetchImpl?: typeof fetch;
|
|
245
|
+
}
|
|
246
|
+
export interface ComposioMcpGatewayResult {
|
|
247
|
+
ok: boolean;
|
|
248
|
+
gatewayUrl: string;
|
|
249
|
+
metaTool: ComposioMcpGatewayMetaTool | string;
|
|
250
|
+
data: Record<string, unknown> | null;
|
|
251
|
+
error?: string;
|
|
252
|
+
}
|
|
253
|
+
export declare function canUseComposioMcpGatewayForExecution(opts: {
|
|
254
|
+
apiKey?: string | null;
|
|
255
|
+
gatewayUrl?: string | null;
|
|
256
|
+
usingCustomerByok?: boolean;
|
|
257
|
+
isReadOnly?: boolean;
|
|
258
|
+
}): boolean;
|
|
259
|
+
export declare function callComposioMcpGatewayRpc(metaTool: ComposioMcpGatewayMetaTool | string, toolArgs: Record<string, unknown>, options: ComposioMcpGatewayCallOptions): Promise<ComposioMcpGatewayResult>;
|
package/dist/composio-catalog.js
CHANGED
|
@@ -1892,3 +1892,148 @@ export function renderDefaultHostedSiteHtml(params) {
|
|
|
1892
1892
|
</body>
|
|
1893
1893
|
</html>`;
|
|
1894
1894
|
}
|
|
1895
|
+
export function canUseComposioMcpGatewayForExecution(opts) {
|
|
1896
|
+
const key = String(opts.apiKey || "").trim();
|
|
1897
|
+
if (!key)
|
|
1898
|
+
return false;
|
|
1899
|
+
const url = String(opts.gatewayUrl || "").trim();
|
|
1900
|
+
const isCustomTeamGateway = Boolean(url) &&
|
|
1901
|
+
url !== "https://connect.composio.dev/mcp" &&
|
|
1902
|
+
(url.includes("mcp.composio.dev/t/") || !url.includes("connect.composio.dev"));
|
|
1903
|
+
const isConsumerKey = key.startsWith("ck_");
|
|
1904
|
+
if (isCustomTeamGateway || isConsumerKey || opts.usingCustomerByok) {
|
|
1905
|
+
return true;
|
|
1906
|
+
}
|
|
1907
|
+
return Boolean(opts.isReadOnly);
|
|
1908
|
+
}
|
|
1909
|
+
export async function callComposioMcpGatewayRpc(metaTool, toolArgs, options) {
|
|
1910
|
+
const gatewayUrl = (options.gatewayUrl || "").trim() || "https://connect.composio.dev/mcp";
|
|
1911
|
+
const apiKey = (options.apiKey || "").trim();
|
|
1912
|
+
if (!apiKey) {
|
|
1913
|
+
return {
|
|
1914
|
+
ok: false,
|
|
1915
|
+
gatewayUrl,
|
|
1916
|
+
metaTool,
|
|
1917
|
+
data: null,
|
|
1918
|
+
error: "Missing Composio API key for MCP Gateway call",
|
|
1919
|
+
};
|
|
1920
|
+
}
|
|
1921
|
+
const fetchFn = options.fetchImpl || fetch;
|
|
1922
|
+
const timeoutMs = options.timeoutMs ?? 6000;
|
|
1923
|
+
try {
|
|
1924
|
+
const res = await fetchFn(gatewayUrl, {
|
|
1925
|
+
method: "POST",
|
|
1926
|
+
headers: {
|
|
1927
|
+
"Content-Type": "application/json",
|
|
1928
|
+
Accept: "application/json, text/event-stream",
|
|
1929
|
+
"x-consumer-api-key": apiKey,
|
|
1930
|
+
"x-api-key": apiKey,
|
|
1931
|
+
...(options.workspaceId ? { "x-user-id": options.workspaceId } : {}),
|
|
1932
|
+
},
|
|
1933
|
+
body: JSON.stringify({
|
|
1934
|
+
jsonrpc: "2.0",
|
|
1935
|
+
id: `muxo_gw_${Date.now()}`,
|
|
1936
|
+
method: "tools/call",
|
|
1937
|
+
params: {
|
|
1938
|
+
name: metaTool,
|
|
1939
|
+
arguments: toolArgs,
|
|
1940
|
+
},
|
|
1941
|
+
}),
|
|
1942
|
+
signal: AbortSignal.timeout(timeoutMs),
|
|
1943
|
+
});
|
|
1944
|
+
if (!res.ok) {
|
|
1945
|
+
return {
|
|
1946
|
+
ok: false,
|
|
1947
|
+
gatewayUrl,
|
|
1948
|
+
metaTool,
|
|
1949
|
+
data: null,
|
|
1950
|
+
error: `Composio MCP Gateway returned HTTP ${res.status}`,
|
|
1951
|
+
};
|
|
1952
|
+
}
|
|
1953
|
+
const rawText = await res.text();
|
|
1954
|
+
let rpcPayload = null;
|
|
1955
|
+
const trimmed = rawText.trim();
|
|
1956
|
+
if (trimmed.startsWith("{")) {
|
|
1957
|
+
rpcPayload = JSON.parse(trimmed);
|
|
1958
|
+
}
|
|
1959
|
+
else {
|
|
1960
|
+
for (const line of trimmed.split(/\r?\n/)) {
|
|
1961
|
+
const clean = line.trim();
|
|
1962
|
+
if (clean.startsWith("data:")) {
|
|
1963
|
+
const dataStr = clean.slice(5).trim();
|
|
1964
|
+
if (dataStr && dataStr.startsWith("{")) {
|
|
1965
|
+
rpcPayload = JSON.parse(dataStr);
|
|
1966
|
+
}
|
|
1967
|
+
}
|
|
1968
|
+
}
|
|
1969
|
+
}
|
|
1970
|
+
if (!rpcPayload || rpcPayload.error) {
|
|
1971
|
+
const errObj = rpcPayload?.error;
|
|
1972
|
+
return {
|
|
1973
|
+
ok: false,
|
|
1974
|
+
gatewayUrl,
|
|
1975
|
+
metaTool,
|
|
1976
|
+
data: null,
|
|
1977
|
+
error: String(errObj?.message || "Invalid JSON-RPC response from Composio MCP Gateway"),
|
|
1978
|
+
};
|
|
1979
|
+
}
|
|
1980
|
+
const resultObj = (rpcPayload.result || {});
|
|
1981
|
+
if (resultObj.isError === true) {
|
|
1982
|
+
return {
|
|
1983
|
+
ok: false,
|
|
1984
|
+
gatewayUrl,
|
|
1985
|
+
metaTool,
|
|
1986
|
+
data: null,
|
|
1987
|
+
error: "Composio MCP Gateway tool returned isError=true",
|
|
1988
|
+
};
|
|
1989
|
+
}
|
|
1990
|
+
if (resultObj.structuredContent && typeof resultObj.structuredContent === "object") {
|
|
1991
|
+
return {
|
|
1992
|
+
ok: true,
|
|
1993
|
+
gatewayUrl,
|
|
1994
|
+
metaTool,
|
|
1995
|
+
data: resultObj.structuredContent,
|
|
1996
|
+
};
|
|
1997
|
+
}
|
|
1998
|
+
const contentArr = Array.isArray(resultObj.content)
|
|
1999
|
+
? resultObj.content
|
|
2000
|
+
: [];
|
|
2001
|
+
const firstText = contentArr.find((c) => typeof c.text === "string")?.text;
|
|
2002
|
+
if (firstText) {
|
|
2003
|
+
try {
|
|
2004
|
+
const parsed = JSON.parse(firstText);
|
|
2005
|
+
if (parsed && typeof parsed === "object") {
|
|
2006
|
+
return {
|
|
2007
|
+
ok: true,
|
|
2008
|
+
gatewayUrl,
|
|
2009
|
+
metaTool,
|
|
2010
|
+
data: parsed,
|
|
2011
|
+
};
|
|
2012
|
+
}
|
|
2013
|
+
}
|
|
2014
|
+
catch {
|
|
2015
|
+
return {
|
|
2016
|
+
ok: true,
|
|
2017
|
+
gatewayUrl,
|
|
2018
|
+
metaTool,
|
|
2019
|
+
data: { text: firstText },
|
|
2020
|
+
};
|
|
2021
|
+
}
|
|
2022
|
+
}
|
|
2023
|
+
return {
|
|
2024
|
+
ok: true,
|
|
2025
|
+
gatewayUrl,
|
|
2026
|
+
metaTool,
|
|
2027
|
+
data: resultObj,
|
|
2028
|
+
};
|
|
2029
|
+
}
|
|
2030
|
+
catch (err) {
|
|
2031
|
+
return {
|
|
2032
|
+
ok: false,
|
|
2033
|
+
gatewayUrl,
|
|
2034
|
+
metaTool,
|
|
2035
|
+
data: null,
|
|
2036
|
+
error: String(err?.message || err || "Composio MCP Gateway request failed"),
|
|
2037
|
+
};
|
|
2038
|
+
}
|
|
2039
|
+
}
|
package/dist/config.d.ts
CHANGED
package/dist/config.js
CHANGED
|
@@ -70,6 +70,7 @@ export function getConfig() {
|
|
|
70
70
|
? ""
|
|
71
71
|
: process.env.COMPOSIO_INSTANT_API_KEY || process.env.COMPOSIO_API_KEY || "",
|
|
72
72
|
composioBaseUrl: process.env.COMPOSIO_BASE_URL || "https://backend.composio.dev/api/v3",
|
|
73
|
+
composioMcpGatewayUrl: process.env.COMPOSIO_MCP_GATEWAY_URL || "https://connect.composio.dev/mcp",
|
|
73
74
|
composioWebhookSecret: process.env.MUXO_EXTERNAL_MODE === "1"
|
|
74
75
|
? ""
|
|
75
76
|
: process.env.COMPOSIO_WEBHOOK_SECRET || "",
|
package/dist/engine.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { MuxoConfig } from "./config.js";
|
|
2
|
-
import { type DurableWorkflow } from "./durable-workflow.js";
|
|
3
|
-
import { type CommercialPlaybookDefinition, type CommercialRoiReport, type CompiledPolicyAsCodeBundle, type OtelTraceExportBundle, type PolicyAsCodeEvaluationResult } from "./oss-suite.js";
|
|
2
|
+
import { exportTemporalEventHistory, type DurableWorkflow } from "./durable-workflow.js";
|
|
3
|
+
import { type CommercialPlaybookDefinition, type CommercialRoiReport, type CompiledPolicyAsCodeBundle, type HarnessConfigurationBundle, type OtelTraceExportBundle, type PolicyAsCodeEvaluationResult, type RunReconciliationReport } from "./oss-suite.js";
|
|
4
4
|
import { type NaturalLanguageResolution } from "./nl.js";
|
|
5
5
|
import { describePolicyInPlainEnglish, type GuardrailCompileOptions, type LlmPolicyAndGovernanceBrief, type ParsedNaturalLanguageGuardrail, type PolicySimulationResult } from "./policy.js";
|
|
6
6
|
import { ComposioInstantAdapter } from "./providers/composio-instant.js";
|
|
@@ -49,6 +49,7 @@ export declare class MuxoEngine {
|
|
|
49
49
|
readonly governance: MicrosoftGovernanceAdapter;
|
|
50
50
|
readonly supermemory: SupermemoryAdapter;
|
|
51
51
|
private readonly durableWorkflows;
|
|
52
|
+
private readonly customPlaybooks;
|
|
52
53
|
constructor(config: MuxoConfig, store: MuxoStore);
|
|
53
54
|
getProfile(ctx: ExecutionContext): Record<string, unknown>;
|
|
54
55
|
getOrganization(ctx: ExecutionContext): Record<string, unknown>;
|
|
@@ -233,7 +234,9 @@ export declare class MuxoEngine {
|
|
|
233
234
|
governanceSignatureValid: boolean;
|
|
234
235
|
agenticReceiptValid: boolean;
|
|
235
236
|
explanation: HumanFriendlyExplanation;
|
|
237
|
+
businessSummary: NonNullable<ExecutionReceipt["businessSummary"]>;
|
|
236
238
|
};
|
|
239
|
+
reconcileRun(ctx: ExecutionContext, runOrPlanId: string): RunReconciliationReport;
|
|
237
240
|
listReceipts(ctx: ExecutionContext, limit?: number): {
|
|
238
241
|
receipts: Array<ExecutionReceipt & {
|
|
239
242
|
agenticReceipt: PortableAgenticReceipt;
|
|
@@ -345,7 +348,7 @@ export declare class MuxoEngine {
|
|
|
345
348
|
}): Promise<{
|
|
346
349
|
ok: boolean;
|
|
347
350
|
executed: boolean;
|
|
348
|
-
status: "executed" | "planned_dry_run" | "awaiting_approval" | "awaiting_oauth_connection" | "missing_inputs" | "guardrail_applied" | "memory_saved" | "memory_forgotten" | "memory_recalled" | "memory_graph" | "governance_updated" | "governance_scanned" | "governance_status" | "context_inspected" | "receipt_explained" | "receipt_chain_verified" | "unresolved";
|
|
351
|
+
status: "executed" | "planned_dry_run" | "awaiting_approval" | "awaiting_oauth_connection" | "missing_inputs" | "guardrail_applied" | "memory_saved" | "memory_forgotten" | "memory_recalled" | "memory_graph" | "governance_updated" | "governance_scanned" | "governance_status" | "context_inspected" | "receipt_explained" | "receipt_chain_verified" | "playbook_listed" | "playbook_created" | "playbook_executed" | "workflow_rolled_back" | "workflow_signaled" | "workflow_history" | "cedar_compiled" | "cedar_evaluated" | "otel_exported" | "roi_analyzed" | "harness_configured" | "unresolved";
|
|
349
352
|
intent: NaturalLanguageResolution;
|
|
350
353
|
resolution: NaturalLanguageResolution;
|
|
351
354
|
plan?: ActionPlan;
|
|
@@ -366,6 +369,15 @@ export declare class MuxoEngine {
|
|
|
366
369
|
memoryRecord?: WorkspaceMemoryRecord;
|
|
367
370
|
memoryOverview?: Awaited<ReturnType<MuxoEngine["getMemoryOverview"]>>;
|
|
368
371
|
memoryGraph?: MemoryKnowledgeGraph;
|
|
372
|
+
playbooks?: CommercialPlaybookDefinition[];
|
|
373
|
+
playbook?: CommercialPlaybookDefinition;
|
|
374
|
+
workflow?: DurableWorkflow;
|
|
375
|
+
workflowHistory?: ReturnType<typeof exportTemporalEventHistory>;
|
|
376
|
+
cedarBundle?: CompiledPolicyAsCodeBundle;
|
|
377
|
+
cedarEvaluation?: PolicyAsCodeEvaluationResult;
|
|
378
|
+
otelTraces?: OtelTraceExportBundle;
|
|
379
|
+
roiReport?: CommercialRoiReport;
|
|
380
|
+
harnessConfig?: HarnessConfigurationBundle;
|
|
369
381
|
deletedMemoryId?: string;
|
|
370
382
|
governanceStatus?: ReturnType<MuxoEngine["getGovernanceOverview"]>;
|
|
371
383
|
poisoningScan?: ReturnType<MuxoEngine["scanForContextPoisoning"]>;
|
|
@@ -463,9 +475,18 @@ export declare class MuxoEngine {
|
|
|
463
475
|
*/
|
|
464
476
|
exportOtelTraces(ctx: ExecutionContext, limit?: number): OtelTraceExportBundle;
|
|
465
477
|
/**
|
|
466
|
-
* Turnkey Commercial Business Saga Playbooks.
|
|
478
|
+
* Turnkey & Custom Commercial Business Saga Playbooks.
|
|
467
479
|
*/
|
|
468
|
-
listCommercialPlaybooks(): CommercialPlaybookDefinition[];
|
|
480
|
+
listCommercialPlaybooks(ctx?: ExecutionContext): CommercialPlaybookDefinition[];
|
|
481
|
+
createCustomPlaybook(ctx: ExecutionContext, params: {
|
|
482
|
+
prompt?: string;
|
|
483
|
+
input?: Record<string, unknown>;
|
|
484
|
+
}): {
|
|
485
|
+
ok: true;
|
|
486
|
+
playbook: CommercialPlaybookDefinition;
|
|
487
|
+
playbooks: CommercialPlaybookDefinition[];
|
|
488
|
+
humanMessage: string;
|
|
489
|
+
};
|
|
469
490
|
runCommercialPlaybook(ctx: ExecutionContext, params: {
|
|
470
491
|
slug: string;
|
|
471
492
|
input?: Record<string, unknown>;
|
|
@@ -474,7 +495,30 @@ export declare class MuxoEngine {
|
|
|
474
495
|
playbook: CommercialPlaybookDefinition;
|
|
475
496
|
workflow: DurableWorkflow;
|
|
476
497
|
temporalFact: import("./types.js").TemporalGraphFact;
|
|
498
|
+
usableResult: {
|
|
499
|
+
playbookSlug: string;
|
|
500
|
+
playbookName: string;
|
|
501
|
+
status: "completed";
|
|
502
|
+
summary: string;
|
|
503
|
+
deliverableOutcome: string;
|
|
504
|
+
targetProvider: string;
|
|
505
|
+
targetEntity: string;
|
|
506
|
+
completedStepsCount: number;
|
|
507
|
+
registeredCompensationsCount: number;
|
|
508
|
+
estimatedCostUsd: number;
|
|
509
|
+
creditsMetered: number;
|
|
510
|
+
estimatedMinutesSaved: number;
|
|
511
|
+
recoveryGuarantee: string;
|
|
512
|
+
};
|
|
477
513
|
};
|
|
514
|
+
/**
|
|
515
|
+
* Turnkey Harness Preset & One-Shot Agent Configurator.
|
|
516
|
+
*/
|
|
517
|
+
configureHarness(ctx: ExecutionContext, params?: {
|
|
518
|
+
preset?: string | null;
|
|
519
|
+
harness?: string | null;
|
|
520
|
+
prompt?: string | null;
|
|
521
|
+
}): Promise<HarnessConfigurationBundle>;
|
|
478
522
|
/**
|
|
479
523
|
* FinOps & Commercial ROI Unit-Economics Analytics.
|
|
480
524
|
*/
|