@muxoai/sdk 1.4.3 → 1.4.5
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 +25 -1
- package/dist/cli.js +167 -38
- package/dist/composio-catalog.d.ts +26 -0
- package/dist/composio-catalog.js +157 -0
- package/dist/config.d.ts +1 -0
- package/dist/config.js +1 -0
- package/dist/engine.d.ts +51 -5
- package/dist/engine.js +484 -30
- package/dist/mcp-schema.d.ts +14 -0
- package/dist/mcp-schema.js +77 -8
- package/dist/mcp.js +300 -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 +119 -7
- package/dist/skills-catalog.d.ts +66 -0
- package/dist/skills-catalog.js +840 -0
- package/dist/store.d.ts +4 -1
- package/dist/store.js +37 -3
- package/dist/types.d.ts +33 -0
- package/dist/ui/console-html.js +35 -9
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/plugins/muxo/.claude-plugin/plugin.json +2 -2
- package/plugins/muxo/.codex-plugin/plugin.json +3 -3
- package/plugins/muxo/.cursor-plugin/plugin.json +2 -2
- package/plugins/muxo/plugin.json +3 -3
- 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.5",
|
|
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.5"
|
|
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.5",
|
|
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.5`) 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`).
|
|
@@ -107,6 +121,16 @@ Muxo ships a portable OpenAI Plugin (`plugins/muxo/plugin.json` & `plugins/muxo/
|
|
|
107
121
|
|
|
108
122
|
## Architecture & Source Layout
|
|
109
123
|
|
|
124
|
+
### Domain skills and workspace gateways
|
|
125
|
+
|
|
126
|
+
Tool inspection and action planning include a `domainSkill` hint when a matching playbook exists. Read its provider pitfalls and required execution lane before planning:
|
|
127
|
+
|
|
128
|
+
- List skills: `GET /api/v1/skills` or MCP `get_run_context({ action: "skills", provider: "github", category: "app_automation" })`.
|
|
129
|
+
- Read a skill: MCP `get_run_context({ action: "get_skill", slug: "github-automation" })`, `muxo://skills/github-automation`, or `GET /skills/github-automation/SKILL.md`.
|
|
130
|
+
- Reconcile an existing run without replaying it: `get_run_context({ action: "reconcile_run", run_id: "<original-run-id>" })`. Reconciliation reports available run and receipt evidence; it does not guarantee an external effect.
|
|
131
|
+
|
|
132
|
+
For Composio BYOK, `POST /api/v1/byok` accepts an optional `mcpGatewayUrl` alongside the privately supplied key. Only HTTPS `connect.composio.dev` and `mcp.composio.dev` URLs without embedded credentials, query parameters, or fragments are accepted. Key rotation preserves the workspace gateway; deleting the Composio key removes it. Configure it in the console's BYOK form or through the API. Skills and gateways never grant OAuth consent, approval, or execution authority.
|
|
133
|
+
|
|
110
134
|
| File / Directory | Responsibility |
|
|
111
135
|
| --- | --- |
|
|
112
136
|
| `ARCHITECTURE.md` | Internal engineering blueprint, Keep/Adopt/Drop ecosystem matrix, and Stripe Projects analysis |
|
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,29 @@ 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 normalizeComposioByokGatewayUrl(value: string): string;
|
|
254
|
+
export declare function canUseComposioMcpGatewayForExecution(opts: {
|
|
255
|
+
apiKey?: string | null;
|
|
256
|
+
gatewayUrl?: string | null;
|
|
257
|
+
usingCustomerByok?: boolean;
|
|
258
|
+
isReadOnly?: boolean;
|
|
259
|
+
}): boolean;
|
|
260
|
+
export declare function callComposioMcpGatewayRpc(metaTool: ComposioMcpGatewayMetaTool | string, toolArgs: Record<string, unknown>, options: ComposioMcpGatewayCallOptions): Promise<ComposioMcpGatewayResult>;
|
package/dist/composio-catalog.js
CHANGED
|
@@ -1892,3 +1892,160 @@ export function renderDefaultHostedSiteHtml(params) {
|
|
|
1892
1892
|
</body>
|
|
1893
1893
|
</html>`;
|
|
1894
1894
|
}
|
|
1895
|
+
export function normalizeComposioByokGatewayUrl(value) {
|
|
1896
|
+
try {
|
|
1897
|
+
const url = new URL(value.trim());
|
|
1898
|
+
if (url.protocol === "https:" &&
|
|
1899
|
+
["connect.composio.dev", "mcp.composio.dev"].includes(url.hostname) &&
|
|
1900
|
+
!url.port && !url.username && !url.password && !url.search && !url.hash) {
|
|
1901
|
+
return url.href;
|
|
1902
|
+
}
|
|
1903
|
+
}
|
|
1904
|
+
catch { }
|
|
1905
|
+
throw new Error("MCP gateway must be an HTTPS Composio URL without credentials, query parameters, or fragments.");
|
|
1906
|
+
}
|
|
1907
|
+
export function canUseComposioMcpGatewayForExecution(opts) {
|
|
1908
|
+
const key = String(opts.apiKey || "").trim();
|
|
1909
|
+
if (!key)
|
|
1910
|
+
return false;
|
|
1911
|
+
const url = String(opts.gatewayUrl || "").trim();
|
|
1912
|
+
const isCustomTeamGateway = Boolean(url) &&
|
|
1913
|
+
url !== "https://connect.composio.dev/mcp" &&
|
|
1914
|
+
(url.includes("mcp.composio.dev/t/") || !url.includes("connect.composio.dev"));
|
|
1915
|
+
const isConsumerKey = key.startsWith("ck_");
|
|
1916
|
+
if (isCustomTeamGateway || isConsumerKey || opts.usingCustomerByok) {
|
|
1917
|
+
return true;
|
|
1918
|
+
}
|
|
1919
|
+
return Boolean(opts.isReadOnly);
|
|
1920
|
+
}
|
|
1921
|
+
export async function callComposioMcpGatewayRpc(metaTool, toolArgs, options) {
|
|
1922
|
+
const gatewayUrl = (options.gatewayUrl || "").trim() || "https://connect.composio.dev/mcp";
|
|
1923
|
+
const apiKey = (options.apiKey || "").trim();
|
|
1924
|
+
if (!apiKey) {
|
|
1925
|
+
return {
|
|
1926
|
+
ok: false,
|
|
1927
|
+
gatewayUrl,
|
|
1928
|
+
metaTool,
|
|
1929
|
+
data: null,
|
|
1930
|
+
error: "Missing Composio API key for MCP Gateway call",
|
|
1931
|
+
};
|
|
1932
|
+
}
|
|
1933
|
+
const fetchFn = options.fetchImpl || fetch;
|
|
1934
|
+
const timeoutMs = options.timeoutMs ?? 6000;
|
|
1935
|
+
try {
|
|
1936
|
+
const res = await fetchFn(gatewayUrl, {
|
|
1937
|
+
method: "POST",
|
|
1938
|
+
headers: {
|
|
1939
|
+
"Content-Type": "application/json",
|
|
1940
|
+
Accept: "application/json, text/event-stream",
|
|
1941
|
+
"x-consumer-api-key": apiKey,
|
|
1942
|
+
"x-api-key": apiKey,
|
|
1943
|
+
...(options.workspaceId ? { "x-user-id": options.workspaceId } : {}),
|
|
1944
|
+
},
|
|
1945
|
+
body: JSON.stringify({
|
|
1946
|
+
jsonrpc: "2.0",
|
|
1947
|
+
id: `muxo_gw_${Date.now()}`,
|
|
1948
|
+
method: "tools/call",
|
|
1949
|
+
params: {
|
|
1950
|
+
name: metaTool,
|
|
1951
|
+
arguments: toolArgs,
|
|
1952
|
+
},
|
|
1953
|
+
}),
|
|
1954
|
+
signal: AbortSignal.timeout(timeoutMs),
|
|
1955
|
+
});
|
|
1956
|
+
if (!res.ok) {
|
|
1957
|
+
return {
|
|
1958
|
+
ok: false,
|
|
1959
|
+
gatewayUrl,
|
|
1960
|
+
metaTool,
|
|
1961
|
+
data: null,
|
|
1962
|
+
error: `Composio MCP Gateway returned HTTP ${res.status}`,
|
|
1963
|
+
};
|
|
1964
|
+
}
|
|
1965
|
+
const rawText = await res.text();
|
|
1966
|
+
let rpcPayload = null;
|
|
1967
|
+
const trimmed = rawText.trim();
|
|
1968
|
+
if (trimmed.startsWith("{")) {
|
|
1969
|
+
rpcPayload = JSON.parse(trimmed);
|
|
1970
|
+
}
|
|
1971
|
+
else {
|
|
1972
|
+
for (const line of trimmed.split(/\r?\n/)) {
|
|
1973
|
+
const clean = line.trim();
|
|
1974
|
+
if (clean.startsWith("data:")) {
|
|
1975
|
+
const dataStr = clean.slice(5).trim();
|
|
1976
|
+
if (dataStr && dataStr.startsWith("{")) {
|
|
1977
|
+
rpcPayload = JSON.parse(dataStr);
|
|
1978
|
+
}
|
|
1979
|
+
}
|
|
1980
|
+
}
|
|
1981
|
+
}
|
|
1982
|
+
if (!rpcPayload || rpcPayload.error) {
|
|
1983
|
+
const errObj = rpcPayload?.error;
|
|
1984
|
+
return {
|
|
1985
|
+
ok: false,
|
|
1986
|
+
gatewayUrl,
|
|
1987
|
+
metaTool,
|
|
1988
|
+
data: null,
|
|
1989
|
+
error: String(errObj?.message || "Invalid JSON-RPC response from Composio MCP Gateway"),
|
|
1990
|
+
};
|
|
1991
|
+
}
|
|
1992
|
+
const resultObj = (rpcPayload.result || {});
|
|
1993
|
+
if (resultObj.isError === true) {
|
|
1994
|
+
return {
|
|
1995
|
+
ok: false,
|
|
1996
|
+
gatewayUrl,
|
|
1997
|
+
metaTool,
|
|
1998
|
+
data: null,
|
|
1999
|
+
error: "Composio MCP Gateway tool returned isError=true",
|
|
2000
|
+
};
|
|
2001
|
+
}
|
|
2002
|
+
if (resultObj.structuredContent && typeof resultObj.structuredContent === "object") {
|
|
2003
|
+
return {
|
|
2004
|
+
ok: true,
|
|
2005
|
+
gatewayUrl,
|
|
2006
|
+
metaTool,
|
|
2007
|
+
data: resultObj.structuredContent,
|
|
2008
|
+
};
|
|
2009
|
+
}
|
|
2010
|
+
const contentArr = Array.isArray(resultObj.content)
|
|
2011
|
+
? resultObj.content
|
|
2012
|
+
: [];
|
|
2013
|
+
const firstText = contentArr.find((c) => typeof c.text === "string")?.text;
|
|
2014
|
+
if (firstText) {
|
|
2015
|
+
try {
|
|
2016
|
+
const parsed = JSON.parse(firstText);
|
|
2017
|
+
if (parsed && typeof parsed === "object") {
|
|
2018
|
+
return {
|
|
2019
|
+
ok: true,
|
|
2020
|
+
gatewayUrl,
|
|
2021
|
+
metaTool,
|
|
2022
|
+
data: parsed,
|
|
2023
|
+
};
|
|
2024
|
+
}
|
|
2025
|
+
}
|
|
2026
|
+
catch {
|
|
2027
|
+
return {
|
|
2028
|
+
ok: true,
|
|
2029
|
+
gatewayUrl,
|
|
2030
|
+
metaTool,
|
|
2031
|
+
data: { text: firstText },
|
|
2032
|
+
};
|
|
2033
|
+
}
|
|
2034
|
+
}
|
|
2035
|
+
return {
|
|
2036
|
+
ok: true,
|
|
2037
|
+
gatewayUrl,
|
|
2038
|
+
metaTool,
|
|
2039
|
+
data: resultObj,
|
|
2040
|
+
};
|
|
2041
|
+
}
|
|
2042
|
+
catch (err) {
|
|
2043
|
+
return {
|
|
2044
|
+
ok: false,
|
|
2045
|
+
gatewayUrl,
|
|
2046
|
+
metaTool,
|
|
2047
|
+
data: null,
|
|
2048
|
+
error: String(err?.message || err || "Composio MCP Gateway request failed"),
|
|
2049
|
+
};
|
|
2050
|
+
}
|
|
2051
|
+
}
|
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,7 @@
|
|
|
1
1
|
import type { MuxoConfig } from "./config.js";
|
|
2
|
-
import { type
|
|
3
|
-
import {
|
|
2
|
+
import { type MuxoDomainSkillHint } from "./skills-catalog.js";
|
|
3
|
+
import { exportTemporalEventHistory, type DurableWorkflow } from "./durable-workflow.js";
|
|
4
|
+
import { type CommercialPlaybookDefinition, type CommercialRoiReport, type CompiledPolicyAsCodeBundle, type HarnessConfigurationBundle, type OtelTraceExportBundle, type PolicyAsCodeEvaluationResult, type RunReconciliationReport } from "./oss-suite.js";
|
|
4
5
|
import { type NaturalLanguageResolution } from "./nl.js";
|
|
5
6
|
import { describePolicyInPlainEnglish, type GuardrailCompileOptions, type LlmPolicyAndGovernanceBrief, type ParsedNaturalLanguageGuardrail, type PolicySimulationResult } from "./policy.js";
|
|
6
7
|
import { ComposioInstantAdapter } from "./providers/composio-instant.js";
|
|
@@ -49,6 +50,7 @@ export declare class MuxoEngine {
|
|
|
49
50
|
readonly governance: MicrosoftGovernanceAdapter;
|
|
50
51
|
readonly supermemory: SupermemoryAdapter;
|
|
51
52
|
private readonly durableWorkflows;
|
|
53
|
+
private readonly customPlaybooks;
|
|
52
54
|
constructor(config: MuxoConfig, store: MuxoStore);
|
|
53
55
|
getProfile(ctx: ExecutionContext): Record<string, unknown>;
|
|
54
56
|
getOrganization(ctx: ExecutionContext): Record<string, unknown>;
|
|
@@ -125,6 +127,7 @@ export declare class MuxoEngine {
|
|
|
125
127
|
instructions: string;
|
|
126
128
|
};
|
|
127
129
|
humanHandoff?: HumanHandoff;
|
|
130
|
+
domainSkill?: MuxoDomainSkillHint;
|
|
128
131
|
llmGuidance: LlmGuidance;
|
|
129
132
|
nextStep: string;
|
|
130
133
|
}>;
|
|
@@ -233,7 +236,9 @@ export declare class MuxoEngine {
|
|
|
233
236
|
governanceSignatureValid: boolean;
|
|
234
237
|
agenticReceiptValid: boolean;
|
|
235
238
|
explanation: HumanFriendlyExplanation;
|
|
239
|
+
businessSummary: NonNullable<ExecutionReceipt["businessSummary"]>;
|
|
236
240
|
};
|
|
241
|
+
reconcileRun(ctx: ExecutionContext, runOrPlanId: string): RunReconciliationReport;
|
|
237
242
|
listReceipts(ctx: ExecutionContext, limit?: number): {
|
|
238
243
|
receipts: Array<ExecutionReceipt & {
|
|
239
244
|
agenticReceipt: PortableAgenticReceipt;
|
|
@@ -345,7 +350,7 @@ export declare class MuxoEngine {
|
|
|
345
350
|
}): Promise<{
|
|
346
351
|
ok: boolean;
|
|
347
352
|
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";
|
|
353
|
+
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
354
|
intent: NaturalLanguageResolution;
|
|
350
355
|
resolution: NaturalLanguageResolution;
|
|
351
356
|
plan?: ActionPlan;
|
|
@@ -366,6 +371,15 @@ export declare class MuxoEngine {
|
|
|
366
371
|
memoryRecord?: WorkspaceMemoryRecord;
|
|
367
372
|
memoryOverview?: Awaited<ReturnType<MuxoEngine["getMemoryOverview"]>>;
|
|
368
373
|
memoryGraph?: MemoryKnowledgeGraph;
|
|
374
|
+
playbooks?: CommercialPlaybookDefinition[];
|
|
375
|
+
playbook?: CommercialPlaybookDefinition;
|
|
376
|
+
workflow?: DurableWorkflow;
|
|
377
|
+
workflowHistory?: ReturnType<typeof exportTemporalEventHistory>;
|
|
378
|
+
cedarBundle?: CompiledPolicyAsCodeBundle;
|
|
379
|
+
cedarEvaluation?: PolicyAsCodeEvaluationResult;
|
|
380
|
+
otelTraces?: OtelTraceExportBundle;
|
|
381
|
+
roiReport?: CommercialRoiReport;
|
|
382
|
+
harnessConfig?: HarnessConfigurationBundle;
|
|
369
383
|
deletedMemoryId?: string;
|
|
370
384
|
governanceStatus?: ReturnType<MuxoEngine["getGovernanceOverview"]>;
|
|
371
385
|
poisoningScan?: ReturnType<MuxoEngine["scanForContextPoisoning"]>;
|
|
@@ -463,9 +477,18 @@ export declare class MuxoEngine {
|
|
|
463
477
|
*/
|
|
464
478
|
exportOtelTraces(ctx: ExecutionContext, limit?: number): OtelTraceExportBundle;
|
|
465
479
|
/**
|
|
466
|
-
* Turnkey Commercial Business Saga Playbooks.
|
|
480
|
+
* Turnkey & Custom Commercial Business Saga Playbooks.
|
|
467
481
|
*/
|
|
468
|
-
listCommercialPlaybooks(): CommercialPlaybookDefinition[];
|
|
482
|
+
listCommercialPlaybooks(ctx?: ExecutionContext): CommercialPlaybookDefinition[];
|
|
483
|
+
createCustomPlaybook(ctx: ExecutionContext, params: {
|
|
484
|
+
prompt?: string;
|
|
485
|
+
input?: Record<string, unknown>;
|
|
486
|
+
}): {
|
|
487
|
+
ok: true;
|
|
488
|
+
playbook: CommercialPlaybookDefinition;
|
|
489
|
+
playbooks: CommercialPlaybookDefinition[];
|
|
490
|
+
humanMessage: string;
|
|
491
|
+
};
|
|
469
492
|
runCommercialPlaybook(ctx: ExecutionContext, params: {
|
|
470
493
|
slug: string;
|
|
471
494
|
input?: Record<string, unknown>;
|
|
@@ -474,7 +497,30 @@ export declare class MuxoEngine {
|
|
|
474
497
|
playbook: CommercialPlaybookDefinition;
|
|
475
498
|
workflow: DurableWorkflow;
|
|
476
499
|
temporalFact: import("./types.js").TemporalGraphFact;
|
|
500
|
+
usableResult: {
|
|
501
|
+
playbookSlug: string;
|
|
502
|
+
playbookName: string;
|
|
503
|
+
status: "completed";
|
|
504
|
+
summary: string;
|
|
505
|
+
deliverableOutcome: string;
|
|
506
|
+
targetProvider: string;
|
|
507
|
+
targetEntity: string;
|
|
508
|
+
completedStepsCount: number;
|
|
509
|
+
registeredCompensationsCount: number;
|
|
510
|
+
estimatedCostUsd: number;
|
|
511
|
+
creditsMetered: number;
|
|
512
|
+
estimatedMinutesSaved: number;
|
|
513
|
+
recoveryGuarantee: string;
|
|
514
|
+
};
|
|
477
515
|
};
|
|
516
|
+
/**
|
|
517
|
+
* Turnkey Harness Preset & One-Shot Agent Configurator.
|
|
518
|
+
*/
|
|
519
|
+
configureHarness(ctx: ExecutionContext, params?: {
|
|
520
|
+
preset?: string | null;
|
|
521
|
+
harness?: string | null;
|
|
522
|
+
prompt?: string | null;
|
|
523
|
+
}): Promise<HarnessConfigurationBundle>;
|
|
478
524
|
/**
|
|
479
525
|
* FinOps & Commercial ROI Unit-Economics Analytics.
|
|
480
526
|
*/
|