@muxoai/platform 1.2.3 → 1.3.1
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 +19 -4
- package/.codex/config.toml +9 -2
- package/README.md +72 -28
- package/dist/cli.js +1047 -43
- package/dist/engine.d.ts +29 -0
- package/dist/engine.js +221 -16
- package/dist/mcp.d.ts +6 -1
- package/dist/mcp.js +120 -26
- package/dist/nl.d.ts +34 -0
- package/dist/nl.js +601 -0
- package/dist/providers/composio-instant.d.ts +1 -0
- package/dist/providers/composio-instant.js +6 -5
- package/dist/providers/composio-sdk.d.ts +1 -0
- package/dist/providers/composio-sdk.js +6 -2
- package/dist/providers/stripe-billing.d.ts +13 -3
- package/dist/providers/stripe-billing.js +250 -36
- package/dist/providers/stripe-projects.js +61 -4
- package/dist/providers/supermemory.d.ts +2 -0
- package/dist/providers/supermemory.js +58 -40
- package/dist/sdk.d.ts +77 -1
- package/dist/sdk.js +46 -0
- package/dist/server.js +202 -29
- package/dist/store.d.ts +19 -2
- package/dist/store.js +216 -11
- package/dist/types.d.ts +14 -2
- package/dist/ui/console-html.js +329 -119
- package/package.json +1 -1
- package/plugins/muxo/.app.json +1 -1
- package/plugins/muxo/.claude-plugin/plugin.json +2 -2
- package/plugins/muxo/.codex-plugin/plugin.json +7 -5
- package/plugins/muxo/.mcp.json +1 -33
- package/plugins/muxo/assets/logo.png +0 -0
- package/plugins/muxo/hooks/session-start.sh +1 -1
- package/plugins/muxo/plugin.json +63 -6
- package/plugins/muxo/skills/muxo/SKILL.md +92 -14
- package/plugins/muxo/skills/muxo/agents/openai.yaml +12 -0
- package/plugins/muxo/skills/muxo/references/cli.md +4 -2
- package/plugins/muxo/skills/muxo/references/mcp.md +15 -9
- package/plugins/muxo/skills/setup/SKILL.md +8 -2
- package/plugins/muxo/skills/setup/agents/openai.yaml +12 -0
package/dist/mcp.js
CHANGED
|
@@ -2,11 +2,18 @@ import crypto from "node:crypto";
|
|
|
2
2
|
import fs from "node:fs";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { ROOT_DIR } from "./config.js";
|
|
5
|
+
const DEFAULT_TOOL_SECURITY_SCHEMES = [
|
|
6
|
+
{ type: "noauth" },
|
|
7
|
+
{
|
|
8
|
+
type: "oauth2",
|
|
9
|
+
scopes: ["muxo:mcp", "muxo:read", "muxo:execute", "muxo:provision"],
|
|
10
|
+
},
|
|
11
|
+
];
|
|
5
12
|
/**
|
|
6
13
|
* Concise server instructions (<512 chars) per OpenAI Plugin MCP Server specification:
|
|
7
14
|
* https://developers.openai.com/plugins/build/mcp-server
|
|
8
15
|
*/
|
|
9
|
-
export const MUXO_MCP_SERVER_INSTRUCTIONS = "Muxo governs SaaS actions (
|
|
16
|
+
export const MUXO_MCP_SERVER_INSTRUCTIONS = "Muxo governs SaaS actions (Connected Apps: app.*), Instant tools (instant.*), Cloud Infrastructure (resource.*), Workspace Memory recall, and verifiable audit records. Workflow: 1) search_tools & inspect_tool. 2) plan_action to get a plan_*. 3) If authHandoff.required is true, show redirectUrl and call wait_for_connection. 4) Execute via the matching risk tool (execute_read/write/admin/financial/provisioning/destructive). 5) Verify via get_receipt.";
|
|
10
17
|
export const MUXO_MCP_TOOLS = [
|
|
11
18
|
{
|
|
12
19
|
name: "get_profile",
|
|
@@ -18,17 +25,59 @@ export const MUXO_MCP_TOOLS = [
|
|
|
18
25
|
additionalProperties: false,
|
|
19
26
|
},
|
|
20
27
|
outputSchema: {
|
|
28
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
21
29
|
type: "object",
|
|
22
30
|
properties: {
|
|
23
|
-
id: {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
31
|
+
id: {
|
|
32
|
+
type: "string",
|
|
33
|
+
minLength: 1,
|
|
34
|
+
pattern: "\\S",
|
|
35
|
+
description: "Unique identifier for the user.",
|
|
36
|
+
},
|
|
37
|
+
name: {
|
|
38
|
+
type: "string",
|
|
39
|
+
description: "Full name of the user.",
|
|
40
|
+
},
|
|
41
|
+
email: {
|
|
42
|
+
type: "string",
|
|
43
|
+
description: "Email address of the user.",
|
|
44
|
+
},
|
|
45
|
+
nickname: {
|
|
46
|
+
type: "string",
|
|
47
|
+
description: "Handle or username of the user.",
|
|
48
|
+
},
|
|
49
|
+
workspaceId: {
|
|
50
|
+
type: "string",
|
|
51
|
+
description: "Active workspace ID.",
|
|
52
|
+
},
|
|
53
|
+
workspaceName: {
|
|
54
|
+
type: "string",
|
|
55
|
+
description: "Active workspace name.",
|
|
56
|
+
},
|
|
57
|
+
tier: {
|
|
58
|
+
type: "string",
|
|
59
|
+
description: "Workspace subscription tier.",
|
|
60
|
+
},
|
|
61
|
+
authType: {
|
|
62
|
+
type: "string",
|
|
63
|
+
description: "Authentication type (session or api_key).",
|
|
64
|
+
},
|
|
65
|
+
actorId: {
|
|
66
|
+
type: "string",
|
|
67
|
+
description: "Actor identifier.",
|
|
68
|
+
},
|
|
69
|
+
user: {
|
|
70
|
+
type: "object",
|
|
71
|
+
description: "User profile record.",
|
|
72
|
+
},
|
|
29
73
|
},
|
|
30
74
|
required: ["id"],
|
|
75
|
+
additionalProperties: false,
|
|
31
76
|
},
|
|
77
|
+
securitySchemes: [
|
|
78
|
+
{ type: "noauth" },
|
|
79
|
+
{ type: "oauth2", scopes: ["muxo:read"] },
|
|
80
|
+
],
|
|
32
81
|
annotations: {
|
|
33
82
|
readOnlyHint: true,
|
|
34
83
|
destructiveHint: false,
|
|
@@ -56,7 +105,7 @@ export const MUXO_MCP_TOOLS = [
|
|
|
56
105
|
{
|
|
57
106
|
name: "search_tools",
|
|
58
107
|
title: "Search Unified Tool Catalog",
|
|
59
|
-
description: "Search the unified Muxo catalog across Connected Apps (
|
|
108
|
+
description: "Search the unified Muxo catalog across Connected Apps (app.*), Instant Tools (instant.*), and Cloud Infrastructure (resource.*).",
|
|
60
109
|
inputSchema: {
|
|
61
110
|
type: "object",
|
|
62
111
|
properties: {
|
|
@@ -114,7 +163,7 @@ export const MUXO_MCP_TOOLS = [
|
|
|
114
163
|
{
|
|
115
164
|
name: "connection_status",
|
|
116
165
|
title: "Check Connection Status",
|
|
117
|
-
description: "Check connection status across
|
|
166
|
+
description: "Check connection status across Connected Apps, Instant Tools, and linked Cloud Infrastructure providers.",
|
|
118
167
|
inputSchema: {
|
|
119
168
|
type: "object",
|
|
120
169
|
properties: {
|
|
@@ -125,7 +174,7 @@ export const MUXO_MCP_TOOLS = [
|
|
|
125
174
|
sync_live: {
|
|
126
175
|
type: "boolean",
|
|
127
176
|
default: true,
|
|
128
|
-
description: "Whether to sync live status from upstream
|
|
177
|
+
description: "Whether to sync live connection status from upstream providers",
|
|
129
178
|
},
|
|
130
179
|
},
|
|
131
180
|
additionalProperties: false,
|
|
@@ -139,7 +188,7 @@ export const MUXO_MCP_TOOLS = [
|
|
|
139
188
|
{
|
|
140
189
|
name: "start_connection",
|
|
141
190
|
title: "Start OAuth Connection Handoff",
|
|
142
|
-
description: "Initiate a managed OAuth connection handoff for a Connected App
|
|
191
|
+
description: "Initiate a managed OAuth connection handoff for a Connected App or link a Cloud Infrastructure provider.",
|
|
143
192
|
inputSchema: {
|
|
144
193
|
type: "object",
|
|
145
194
|
required: ["provider"],
|
|
@@ -195,15 +244,18 @@ export const MUXO_MCP_TOOLS = [
|
|
|
195
244
|
{
|
|
196
245
|
name: "plan_action",
|
|
197
246
|
title: "Create Governed Action Plan",
|
|
198
|
-
description: "Create a governed execution plan (plan_*) for any tool or infrastructure provisioning operation. Evaluates workspace policy, risk level,
|
|
247
|
+
description: "Create a governed execution plan (plan_*) for any tool, billing operation, or infrastructure provisioning operation. Accepts either an exact tool_slug (e.g. 'instant.seo.audit', 'billing.credits.topup', 'resource.turso.database') or a natural-language instruction (e.g. 'audit seo for https://muxo.ai'). Evaluates workspace policy, risk level, Workspace Memory recall, safety guardrails, BYOK vs Muxo-funded mode, and credit balance.",
|
|
199
248
|
inputSchema: {
|
|
200
249
|
type: "object",
|
|
201
250
|
required: ["tool_slug"],
|
|
202
251
|
properties: {
|
|
203
|
-
tool_slug: {
|
|
252
|
+
tool_slug: {
|
|
253
|
+
type: "string",
|
|
254
|
+
description: "Muxo tool slug (e.g. 'instant.seo.audit', 'billing.credits.topup') or natural-language request",
|
|
255
|
+
},
|
|
204
256
|
input: {
|
|
205
257
|
type: "object",
|
|
206
|
-
description: "Arguments matching the tool's inputSchema",
|
|
258
|
+
description: "Arguments matching the tool's inputSchema (auto-extracted when tool_slug is natural language)",
|
|
207
259
|
},
|
|
208
260
|
reason: {
|
|
209
261
|
type: "string",
|
|
@@ -523,6 +575,8 @@ description: Guided onboarding skill for setting up the Muxo plugin in OpenAI Ch
|
|
|
523
575
|
|
|
524
576
|
Call \`get_profile\` and \`get_organization\` to verify your workspace connection, or run \`npx -y @muxoai/cli@latest login --signup\` in a terminal.
|
|
525
577
|
`);
|
|
578
|
+
const muxoOpenaiYaml = readSkillFileOrDefault("muxo/agents/openai.yaml", `interface:\n display_name: "Muxo"\n short_description: "Governed SaaS, Instant Web/SEO tools, Cloud Infrastructure, and Workspace Memory"\n default_prompt: "Audit https://muxo.ai for technical SEO and crawl its top pages."\n\ndependencies:\n tools:\n - type: "mcp"\n value: "muxo"\n description: "Muxo Governed Execution, Instant Web/SEO Tools, Connected Apps, and Cloud Infrastructure MCP Server"\n transport: "streamable_http"\n url: "https://api.muxo.ai/mcp"\n`);
|
|
579
|
+
const setupOpenaiYaml = readSkillFileOrDefault("setup/agents/openai.yaml", `interface:\n display_name: "Muxo Setup"\n short_description: "Guided onboarding and connection verification for Muxo in ChatGPT and Codex"\n default_prompt: "Check my Muxo profile and organization status."\n\ndependencies:\n tools:\n - type: "mcp"\n value: "muxo"\n description: "Muxo Governed Execution, Instant Web/SEO Tools, Connected Apps, and Cloud Infrastructure MCP Server"\n transport: "streamable_http"\n url: "https://api.muxo.ai/mcp"\n`);
|
|
526
580
|
const muxoFm = parseFrontmatter(muxoSkillMd);
|
|
527
581
|
const setupFm = parseFrontmatter(setupSkillMd);
|
|
528
582
|
const muxoFiles = [
|
|
@@ -534,6 +588,14 @@ Call \`get_profile\` and \`get_organization\` to verify your workspace connectio
|
|
|
534
588
|
mimeType: "text/markdown",
|
|
535
589
|
content: muxoSkillMd,
|
|
536
590
|
},
|
|
591
|
+
{
|
|
592
|
+
path: "agents/openai.yaml",
|
|
593
|
+
uri: "skill://muxo/muxo/agents/openai.yaml",
|
|
594
|
+
size: Buffer.byteLength(muxoOpenaiYaml, "utf8"),
|
|
595
|
+
digest: sha256Digest(muxoOpenaiYaml),
|
|
596
|
+
mimeType: "application/yaml",
|
|
597
|
+
content: muxoOpenaiYaml,
|
|
598
|
+
},
|
|
537
599
|
{
|
|
538
600
|
path: "references/cli.md",
|
|
539
601
|
uri: "skill://muxo/muxo/references/cli.md",
|
|
@@ -560,6 +622,14 @@ Call \`get_profile\` and \`get_organization\` to verify your workspace connectio
|
|
|
560
622
|
mimeType: "text/markdown",
|
|
561
623
|
content: setupSkillMd,
|
|
562
624
|
},
|
|
625
|
+
{
|
|
626
|
+
path: "agents/openai.yaml",
|
|
627
|
+
uri: "skill://muxo/setup/agents/openai.yaml",
|
|
628
|
+
size: Buffer.byteLength(setupOpenaiYaml, "utf8"),
|
|
629
|
+
digest: sha256Digest(setupOpenaiYaml),
|
|
630
|
+
mimeType: "application/yaml",
|
|
631
|
+
content: setupOpenaiYaml,
|
|
632
|
+
},
|
|
563
633
|
];
|
|
564
634
|
const muxoName = muxoFm.name || "muxo";
|
|
565
635
|
const muxoDesc = muxoFm.description ||
|
|
@@ -627,8 +697,13 @@ export async function dispatchMcpToolCall(engine, ctx, toolName, args = {}) {
|
|
|
627
697
|
});
|
|
628
698
|
case "plan_action":
|
|
629
699
|
return engine.planAction(ctx, {
|
|
630
|
-
toolSlug: String(args.tool_slug ||
|
|
631
|
-
|
|
700
|
+
toolSlug: String(args.tool_slug ||
|
|
701
|
+
args.slug ||
|
|
702
|
+
args.tool_id ||
|
|
703
|
+
args.prompt ||
|
|
704
|
+
args.instruction ||
|
|
705
|
+
""),
|
|
706
|
+
input: (args.input || args.arguments) || {},
|
|
632
707
|
reason: args.reason ? String(args.reason) : undefined,
|
|
633
708
|
});
|
|
634
709
|
case "get_plan":
|
|
@@ -738,7 +813,7 @@ export async function handleJsonRpcMcpRequest(engine, ctx, rpc) {
|
|
|
738
813
|
instructions: MUXO_MCP_SERVER_INSTRUCTIONS,
|
|
739
814
|
serverInfo: {
|
|
740
815
|
name: "muxo-mcp-server",
|
|
741
|
-
version: "1.
|
|
816
|
+
version: "1.3.1",
|
|
742
817
|
},
|
|
743
818
|
capabilities: {
|
|
744
819
|
tools: { listChanged: false },
|
|
@@ -758,7 +833,10 @@ export async function handleJsonRpcMcpRequest(engine, ctx, rpc) {
|
|
|
758
833
|
jsonrpc: "2.0",
|
|
759
834
|
id,
|
|
760
835
|
result: {
|
|
761
|
-
tools: MUXO_MCP_TOOLS
|
|
836
|
+
tools: MUXO_MCP_TOOLS.map((t) => ({
|
|
837
|
+
...t,
|
|
838
|
+
securitySchemes: t.securitySchemes || DEFAULT_TOOL_SECURITY_SCHEMES,
|
|
839
|
+
})),
|
|
762
840
|
},
|
|
763
841
|
};
|
|
764
842
|
}
|
|
@@ -787,9 +865,14 @@ export async function handleJsonRpcMcpRequest(engine, ctx, rpc) {
|
|
|
787
865
|
// SEP-2640 Skills Import Extension (`io.modelcontextprotocol/skills`)
|
|
788
866
|
if (method === "skills/list") {
|
|
789
867
|
const skills = getMuxoMcpSkills().map((s) => ({
|
|
868
|
+
uri: s.uri,
|
|
869
|
+
frontmatter: s.frontmatter,
|
|
870
|
+
resources: s.files.map((f) => ({
|
|
871
|
+
uri: f.uri,
|
|
872
|
+
digest: f.digest,
|
|
873
|
+
})),
|
|
790
874
|
name: s.name,
|
|
791
875
|
description: s.description,
|
|
792
|
-
uri: s.uri,
|
|
793
876
|
version: s.version,
|
|
794
877
|
digest: s.files[0]?.digest || "",
|
|
795
878
|
files: s.files.length,
|
|
@@ -801,30 +884,39 @@ export async function handleJsonRpcMcpRequest(engine, ctx, rpc) {
|
|
|
801
884
|
};
|
|
802
885
|
}
|
|
803
886
|
if (method === "skills/get") {
|
|
887
|
+
const requestedUri = String(params.uri || "").trim();
|
|
804
888
|
const requestedName = String(params.name || "muxo").trim();
|
|
805
|
-
const skill = getMuxoMcpSkills().find((s) => s.name === requestedName);
|
|
889
|
+
const skill = getMuxoMcpSkills().find((s) => s.uri === requestedUri || s.name === requestedName);
|
|
806
890
|
if (!skill) {
|
|
807
891
|
return {
|
|
808
892
|
jsonrpc: "2.0",
|
|
809
893
|
id,
|
|
810
894
|
error: {
|
|
811
895
|
code: -32602,
|
|
812
|
-
message: `Skill not found: ${requestedName}`,
|
|
896
|
+
message: `Skill not found: ${requestedUri || requestedName}`,
|
|
813
897
|
},
|
|
814
898
|
};
|
|
815
899
|
}
|
|
900
|
+
const resources = skill.files.map((f) => ({
|
|
901
|
+
uri: f.uri,
|
|
902
|
+
digest: f.digest,
|
|
903
|
+
}));
|
|
816
904
|
return {
|
|
817
905
|
jsonrpc: "2.0",
|
|
818
906
|
id,
|
|
819
907
|
result: {
|
|
820
908
|
skill: {
|
|
909
|
+
uri: skill.uri,
|
|
910
|
+
frontmatter: skill.frontmatter,
|
|
911
|
+
resources,
|
|
821
912
|
name: skill.name,
|
|
822
913
|
description: skill.description,
|
|
823
|
-
uri: skill.uri,
|
|
824
914
|
version: skill.version,
|
|
825
915
|
digest: skill.files[0]?.digest || "",
|
|
826
916
|
},
|
|
917
|
+
uri: skill.uri,
|
|
827
918
|
frontmatter: skill.frontmatter,
|
|
919
|
+
resources,
|
|
828
920
|
files: skill.files.map((f) => ({
|
|
829
921
|
path: f.path,
|
|
830
922
|
uri: f.uri,
|
|
@@ -886,17 +978,19 @@ export async function handleJsonRpcMcpRequest(engine, ctx, rpc) {
|
|
|
886
978
|
};
|
|
887
979
|
}
|
|
888
980
|
catch (err) {
|
|
981
|
+
const errPayload = {
|
|
982
|
+
ok: false,
|
|
983
|
+
error: String(err?.message || err || "MCP tool execution failed"),
|
|
984
|
+
};
|
|
889
985
|
return {
|
|
890
986
|
jsonrpc: "2.0",
|
|
891
987
|
id,
|
|
892
988
|
result: {
|
|
989
|
+
structuredContent: errPayload,
|
|
893
990
|
content: [
|
|
894
991
|
{
|
|
895
992
|
type: "text",
|
|
896
|
-
text: JSON.stringify(
|
|
897
|
-
ok: false,
|
|
898
|
-
error: String(err?.message || err || "MCP tool execution failed"),
|
|
899
|
-
}, null, 2),
|
|
993
|
+
text: JSON.stringify(errPayload, null, 2),
|
|
900
994
|
},
|
|
901
995
|
],
|
|
902
996
|
isError: true,
|
package/dist/nl.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { ToolDescriptor } from "./types.js";
|
|
2
|
+
export interface NaturalLanguageResolution {
|
|
3
|
+
resolved: boolean;
|
|
4
|
+
tool: ToolDescriptor | null;
|
|
5
|
+
toolSlug: string | null;
|
|
6
|
+
input: Record<string, unknown>;
|
|
7
|
+
extractedInput: Record<string, unknown>;
|
|
8
|
+
reason: string;
|
|
9
|
+
confidence: number;
|
|
10
|
+
resolutionMethod: "exact_slug" | "byok_llm" | "semantic_router";
|
|
11
|
+
byokUsed: string | null;
|
|
12
|
+
humanSummary: string;
|
|
13
|
+
missingInputs: string[];
|
|
14
|
+
needsConnection: boolean;
|
|
15
|
+
suggestedByokProvider: string | null;
|
|
16
|
+
alternatives: Array<{
|
|
17
|
+
slug: string;
|
|
18
|
+
name: string;
|
|
19
|
+
riskLevel: string;
|
|
20
|
+
creditCost: number;
|
|
21
|
+
}>;
|
|
22
|
+
}
|
|
23
|
+
export declare function extractParametersFromNaturalLanguage(prompt: string, tool: ToolDescriptor, explicitInput?: Record<string, unknown>): {
|
|
24
|
+
input: Record<string, unknown>;
|
|
25
|
+
missingInputs: string[];
|
|
26
|
+
};
|
|
27
|
+
export declare function resolveNaturalLanguageIntent(params: {
|
|
28
|
+
prompt: string;
|
|
29
|
+
tools: ToolDescriptor[];
|
|
30
|
+
explicitInput?: Record<string, unknown>;
|
|
31
|
+
byokKeys?: Record<string, string>;
|
|
32
|
+
activeConnectionProviders?: Set<string>;
|
|
33
|
+
preferByokLlm?: boolean;
|
|
34
|
+
}): Promise<NaturalLanguageResolution>;
|