@muxoai/platform 1.4.0 → 1.4.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 +2 -2
- package/.claude-plugin/marketplace.json +2 -2
- package/ARCHITECTURE.md +16 -6
- package/README.md +1 -1
- package/dist/cli.js +317 -10
- package/dist/composio-catalog.d.ts +58 -0
- package/dist/composio-catalog.js +474 -0
- package/dist/config.d.ts +10 -0
- package/dist/config.js +16 -0
- package/dist/durable-workflow.d.ts +45 -0
- package/dist/durable-workflow.js +90 -0
- package/dist/engine.d.ts +276 -5
- package/dist/engine.js +1261 -71
- package/dist/mcp-schema.d.ts +125 -0
- package/dist/mcp-schema.js +1076 -0
- package/dist/mcp.d.ts +2 -30
- package/dist/mcp.js +505 -539
- 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 +75 -1
- package/dist/policy.js +1119 -0
- package/dist/providers/composio-instant.js +225 -5
- package/dist/providers/composio-sdk.d.ts +68 -5
- package/dist/providers/composio-sdk.js +683 -78
- 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 +451 -3
- package/dist/providers/stripe-projects.js +2106 -87
- 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 +1841 -232
- package/dist/store.d.ts +113 -6
- package/dist/store.js +675 -52
- package/dist/types.d.ts +192 -3
- package/dist/ui/console-html.d.ts +10 -1
- package/dist/ui/console-html.js +1082 -452
- 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 +1 -1
- package/plugins/muxo/plugin.json +2 -2
- package/plugins/muxo/skills/muxo/SKILL.md +42 -1
- package/plugins/muxo/skills/muxo/references/mcp.md +3 -2
- package/plugins/muxo/skills/setup/SKILL.md +8 -0
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
export interface McpToolAnnotations {
|
|
2
|
+
readOnlyHint: boolean;
|
|
3
|
+
destructiveHint: boolean;
|
|
4
|
+
openWorldHint: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface McpToolSecurityScheme {
|
|
7
|
+
type: "noauth" | "oauth2";
|
|
8
|
+
scopes?: string[];
|
|
9
|
+
}
|
|
10
|
+
export interface McpToolDefinition {
|
|
11
|
+
name: string;
|
|
12
|
+
title: string;
|
|
13
|
+
description: string;
|
|
14
|
+
inputSchema: Record<string, unknown>;
|
|
15
|
+
outputSchema?: Record<string, unknown>;
|
|
16
|
+
securitySchemes?: McpToolSecurityScheme[];
|
|
17
|
+
annotations: McpToolAnnotations;
|
|
18
|
+
_meta?: Record<string, unknown>;
|
|
19
|
+
}
|
|
20
|
+
export declare const MCP_TOOLS_OAUTH_SCOPE = "mcp:tools";
|
|
21
|
+
/** Workspace-bound tools require an OAuth bearer token (or workspace API key). */
|
|
22
|
+
export declare const DEFAULT_TOOL_SECURITY_SCHEMES: McpToolSecurityScheme[];
|
|
23
|
+
/** Catalog discovery tools work anonymously and also accept OAuth. */
|
|
24
|
+
export declare const PUBLIC_TOOL_SECURITY_SCHEMES: McpToolSecurityScheme[];
|
|
25
|
+
export declare const PUBLIC_MCP_TOOL_NAMES: ReadonlySet<string>;
|
|
26
|
+
/** Stable per-workspace agent identity returned at agent signup on both runtimes. */
|
|
27
|
+
export declare function workspaceAgentDid(workspaceId: string): string;
|
|
28
|
+
/** JSON-RPC methods that anonymous MCP clients may call for discovery. */
|
|
29
|
+
export declare const PUBLIC_MCP_METHODS: ReadonlySet<string>;
|
|
30
|
+
/** True when a single JSON-RPC MCP request only needs public discovery access. */
|
|
31
|
+
export declare function isPublicMcpRequest(rpc: unknown): boolean;
|
|
32
|
+
export declare function securitySchemesForTool(name: string): McpToolSecurityScheme[];
|
|
33
|
+
/** Maximum in-turn polling window for wait_for_connection and get_plan(wait_for_approval). */
|
|
34
|
+
export declare const MAX_MCP_WAIT_SECONDS = 120;
|
|
35
|
+
export declare const DEFAULT_MCP_WAIT_SECONDS = 15;
|
|
36
|
+
export declare function clampWaitSeconds(raw: unknown, fallback?: number, max?: number): number;
|
|
37
|
+
/** Matches explicit catalog slugs (e.g. 'app.github.create_issue') as opposed to natural-language requests. */
|
|
38
|
+
export declare function looksLikeToolSlug(raw: string): boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Picks the live Composio search hit for a requested `app.<toolkit>.<action>` slug: an exact
|
|
41
|
+
* slug/upstream match, else a same-toolkit tool whose slug contains every action word. Returns
|
|
42
|
+
* null rather than an unrelated top search result.
|
|
43
|
+
*/
|
|
44
|
+
export declare function matchAppToolSlug<T extends {
|
|
45
|
+
slug: string;
|
|
46
|
+
upstreamSlug: string;
|
|
47
|
+
providerSlug: string;
|
|
48
|
+
}>(requestedSlug: string, candidates: T[]): T | null;
|
|
49
|
+
export declare const DEFAULT_MCP_SKILL_NAME = "muxo";
|
|
50
|
+
/**
|
|
51
|
+
* SEP-2640 `skills/get` lookup. A `uri` takes precedence over `name`, and a miss returns
|
|
52
|
+
* `skill: undefined` so callers answer with JSON-RPC -32602 rather than a default skill.
|
|
53
|
+
*/
|
|
54
|
+
export declare function findMcpSkill<T extends {
|
|
55
|
+
uri: string;
|
|
56
|
+
name: string;
|
|
57
|
+
}>(skills: readonly T[], params: {
|
|
58
|
+
uri?: unknown;
|
|
59
|
+
name?: unknown;
|
|
60
|
+
}): {
|
|
61
|
+
skill: T | undefined;
|
|
62
|
+
requested: string;
|
|
63
|
+
};
|
|
64
|
+
export declare const APPROVED_PLAN_STATUSES: ReadonlySet<string>;
|
|
65
|
+
export declare const GET_RUN_CONTEXT_ACTIONS: readonly ["inspect", "remember", "recall", "forget", "memory_graph", "set_guardrail", "governance_status", "scan_context", "list_workspaces", "switch_workspace", "onboard_team"];
|
|
66
|
+
/** Error carrying a structured MCP/REST payload (merged into structuredContent / JSON body). */
|
|
67
|
+
export declare class MuxoToolError extends Error {
|
|
68
|
+
readonly code: string;
|
|
69
|
+
readonly statusCode: number;
|
|
70
|
+
readonly payload: Record<string, unknown>;
|
|
71
|
+
constructor(message: string, options: {
|
|
72
|
+
code: string;
|
|
73
|
+
statusCode?: number;
|
|
74
|
+
payload?: Record<string, unknown>;
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
export declare function unknownToolError(slug: string): MuxoToolError;
|
|
78
|
+
export interface ApprovalGatePlan {
|
|
79
|
+
id: string;
|
|
80
|
+
toolSlug: string;
|
|
81
|
+
riskLevel: string;
|
|
82
|
+
approvalStatus: string;
|
|
83
|
+
}
|
|
84
|
+
export declare function buildApprovalUrl(baseUrl: string, planId: string): string;
|
|
85
|
+
/** Structured response returned when execute_<risk> is called on a plan still awaiting approval. */
|
|
86
|
+
export declare function buildApprovalRequiredPayload(baseUrl: string, plan: ApprovalGatePlan): Record<string, unknown>;
|
|
87
|
+
export declare function approvalRequiredError(baseUrl: string, plan: ApprovalGatePlan): MuxoToolError;
|
|
88
|
+
export declare function errorPayloadFrom(err: unknown, fallback?: string): Record<string, unknown>;
|
|
89
|
+
export interface OnboardTeamGuideInput {
|
|
90
|
+
baseUrl: string;
|
|
91
|
+
workspaceId: string;
|
|
92
|
+
workspaceName: string;
|
|
93
|
+
teamName?: string;
|
|
94
|
+
workspaces?: unknown[];
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* MCP onboard_team never mints credentials in-band; it returns the human handoff
|
|
98
|
+
* (Console / CLI / REST) that issues a Team API key so secrets stay out of agent transcripts.
|
|
99
|
+
*/
|
|
100
|
+
export declare function buildOnboardTeamGuide(input: OnboardTeamGuideInput): Record<string, unknown>;
|
|
101
|
+
/**
|
|
102
|
+
* Concise server instructions (<512 chars) per OpenAI Plugin MCP Server specification:
|
|
103
|
+
* https://developers.openai.com/plugins/build/mcp-server
|
|
104
|
+
*/
|
|
105
|
+
export declare const MUXO_MCP_SERVER_INSTRUCTIONS = "Muxo governs SaaS actions (app.*), Instant tools (instant.*), Cloud Infrastructure (resource.*), Memory, and Guardrails. Workflow: 1) search_tools & inspect_tool. 2) plan_action to get a plan_*. 3) If authHandoff.required, show humanHandoff.url and call wait_for_connection. 4) If approvalStatus is pending_approval, send humanHandoff.url or call get_plan(wait_for_approval:true). 5) Execute via execute_<risk>. 6) Manage memory/guardrails via get_run_context.";
|
|
106
|
+
export declare const MUXO_MCP_TOOLS: McpToolDefinition[];
|
|
107
|
+
/**
|
|
108
|
+
* OpenAI Company Knowledge standard `search` and `fetch` tool definitions
|
|
109
|
+
* per https://developers.openai.com/plugins/build/mcp-server#company-knowledge-compatibility
|
|
110
|
+
*/
|
|
111
|
+
export declare const OPENAI_COMPANY_KNOWLEDGE_TOOLS: McpToolDefinition[];
|
|
112
|
+
export interface McpNextToolCallHint {
|
|
113
|
+
tool: string;
|
|
114
|
+
input: Record<string, unknown>;
|
|
115
|
+
when: string;
|
|
116
|
+
}
|
|
117
|
+
export interface McpHarnessGuidance {
|
|
118
|
+
summary: string;
|
|
119
|
+
nextToolCalls: McpNextToolCallHint[];
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Enriches any MCP tool output object with structured `llmGuidance` so agent harnesses
|
|
123
|
+
* (Claude Code, Cursor, Codex, OpenAI MCP, Windsurf) always know the exact next tool call.
|
|
124
|
+
*/
|
|
125
|
+
export declare function attachMcpHarnessGuidance<T>(toolName: string, toolArgs: Record<string, unknown>, output: T): T;
|