@muxoai/sdk 1.3.0 → 1.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/plugins/marketplace.json +2 -2
- package/.claude-plugin/marketplace.json +19 -4
- package/.codex/config.toml +9 -2
- package/ARCHITECTURE.md +16 -6
- package/README.md +69 -24
- package/dist/clerk.d.ts +35 -0
- package/dist/clerk.js +201 -0
- package/dist/cli.js +1589 -103
- package/dist/composio-catalog.d.ts +234 -0
- package/dist/composio-catalog.js +1894 -0
- package/dist/config.d.ts +16 -0
- package/dist/config.js +27 -1
- package/dist/durable-workflow.d.ts +45 -0
- package/dist/durable-workflow.js +90 -0
- package/dist/engine.d.ts +315 -6
- package/dist/engine.js +1778 -94
- package/dist/mcp-schema.d.ts +286 -0
- package/dist/mcp-schema.js +2559 -0
- package/dist/mcp.d.ts +2 -25
- package/dist/mcp.js +949 -507
- package/dist/memory-graph.d.ts +21 -0
- package/dist/memory-graph.js +173 -0
- package/dist/nl.js +214 -35
- package/dist/oauth.d.ts +32 -0
- package/dist/oauth.js +134 -0
- package/dist/policy.d.ts +190 -0
- package/dist/policy.js +1597 -0
- package/dist/providers/composio-instant.d.ts +4 -0
- package/dist/providers/composio-instant.js +890 -535
- package/dist/providers/composio-sdk.d.ts +126 -5
- package/dist/providers/composio-sdk.js +902 -79
- package/dist/providers/microsoft-governance.d.ts +89 -3
- package/dist/providers/microsoft-governance.js +673 -26
- package/dist/providers/stripe-billing.d.ts +42 -0
- package/dist/providers/stripe-billing.js +244 -5
- package/dist/providers/stripe-projects.d.ts +459 -4
- package/dist/providers/stripe-projects.js +2674 -122
- package/dist/providers/supermemory.d.ts +102 -6
- package/dist/providers/supermemory.js +609 -55
- package/dist/provisioning-managed.d.ts +50 -0
- package/dist/provisioning-managed.js +155 -0
- package/dist/sdk.d.ts +705 -7
- package/dist/sdk.js +488 -10
- package/dist/server.js +2646 -348
- package/dist/store.d.ts +138 -6
- package/dist/store.js +932 -58
- package/dist/types.d.ts +312 -4
- package/dist/ui/console-html.d.ts +62 -0
- package/dist/ui/console-html.js +3742 -2228
- package/dist/ui/design-tokens.d.ts +177 -0
- package/dist/ui/design-tokens.js +210 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +1 -0
- package/package.json +5 -4
- package/plugins/muxo/.app.json +1 -1
- package/plugins/muxo/.claude-plugin/plugin.json +3 -3
- package/plugins/muxo/.codex-plugin/plugin.json +19 -10
- package/plugins/muxo/.cursor-plugin/plugin.json +30 -0
- package/plugins/muxo/.mcp.json +1 -33
- package/plugins/muxo/assets/logo.png +0 -0
- package/plugins/muxo/hooks/session-start.sh +16 -4
- package/plugins/muxo/hooks/user-prompt-submit.sh +14 -1
- package/plugins/muxo/mcp.json +0 -10
- package/plugins/muxo/plugin.json +65 -8
- package/plugins/muxo/skills/muxo/SKILL.md +142 -14
- package/plugins/muxo/skills/muxo/agents/openai.yaml +12 -0
- package/plugins/muxo/skills/muxo/references/cli.md +9 -3
- package/plugins/muxo/skills/muxo/references/mcp.md +22 -10
- package/plugins/muxo/skills/muxo-activity-summary/SKILL.md +81 -0
- package/plugins/muxo/skills/setup/SKILL.md +17 -3
- package/plugins/muxo/skills/setup/agents/openai.yaml +12 -0
- package/src/catalogues/stripe-projects-catalog.json +140 -0
|
@@ -1,17 +1,137 @@
|
|
|
1
|
+
import { Composio } from "@composio/core";
|
|
1
2
|
import type { MuxoConfig } from "../config.js";
|
|
2
|
-
import type { MuxoTool } from "../types.js";
|
|
3
|
+
import type { MuxoTool, RiskLevel } from "../types.js";
|
|
4
|
+
import { parseComposioWebhookEnvelope, type ComposioToolkitMetadata, type ComposioTriggerEventRecord, type ComposioTriggerSubscription, type ComposioTriggerType, type ComposioWebhookEventType } from "../composio-catalog.js";
|
|
5
|
+
export type { ComposioToolkitMetadata, ComposioTriggerEventRecord, ComposioTriggerSubscription, ComposioTriggerType, ComposioWebhookEventType, };
|
|
3
6
|
export declare class ComposioSdkAdapter {
|
|
4
7
|
private readonly config;
|
|
5
8
|
private liveToolsCache;
|
|
9
|
+
private sdkClients;
|
|
10
|
+
private readonly customAuthConfigs;
|
|
11
|
+
private readonly activeTriggers;
|
|
12
|
+
private readonly triggerEvents;
|
|
6
13
|
constructor(config: MuxoConfig);
|
|
14
|
+
private hydrateEnterpriseSampleActions;
|
|
15
|
+
private resolveApiKey;
|
|
7
16
|
private get headers();
|
|
17
|
+
private getHeaders;
|
|
18
|
+
getComposioClient(composioApiKey?: string | null): Composio | null;
|
|
19
|
+
getSdkInfo(composioApiKey?: string | null): {
|
|
20
|
+
sdkPackage: "@composio/core";
|
|
21
|
+
sdkVersion: string;
|
|
22
|
+
configured: boolean;
|
|
23
|
+
usingCustomerByok: boolean;
|
|
24
|
+
baseUrl: string;
|
|
25
|
+
curatedToolCount: number;
|
|
26
|
+
cachedToolCount: number;
|
|
27
|
+
capabilities: string[];
|
|
28
|
+
};
|
|
29
|
+
getWebhookConfigInfo(): {
|
|
30
|
+
webhookUrl: string;
|
|
31
|
+
legacyWebhookUrl: string;
|
|
32
|
+
version: "V3";
|
|
33
|
+
events: ComposioWebhookEventType[];
|
|
34
|
+
secretConfigured: boolean;
|
|
35
|
+
subscriptionId: string | null;
|
|
36
|
+
projectId: string | null;
|
|
37
|
+
orgId: string | null;
|
|
38
|
+
userId: string | null;
|
|
39
|
+
};
|
|
8
40
|
getCuratedTools(): MuxoTool[];
|
|
9
|
-
|
|
10
|
-
|
|
41
|
+
static classifyActionRisk(upstreamSlug: string, description?: string): RiskLevel;
|
|
42
|
+
listToolkits(params?: {
|
|
43
|
+
category?: string;
|
|
44
|
+
search?: string;
|
|
45
|
+
composioApiKey?: string | null;
|
|
46
|
+
}): Promise<{
|
|
47
|
+
toolkits: ComposioToolkitMetadata[];
|
|
48
|
+
total: number;
|
|
49
|
+
source: "composio_v3_sdk" | "muxo_enterprise_catalog";
|
|
50
|
+
}>;
|
|
51
|
+
createCustomAuthConfig(params: {
|
|
52
|
+
workspaceId: string;
|
|
53
|
+
toolkitSlug: string;
|
|
54
|
+
name?: string;
|
|
55
|
+
authScheme: "OAUTH2" | "API_KEY";
|
|
56
|
+
scopeMode?: "read_only" | "full_access";
|
|
57
|
+
customScopes?: string[];
|
|
58
|
+
credentials?: Record<string, string>;
|
|
59
|
+
composioApiKey?: string | null;
|
|
60
|
+
}): Promise<{
|
|
61
|
+
authConfigId: string;
|
|
62
|
+
toolkitSlug: string;
|
|
63
|
+
authScheme: string;
|
|
64
|
+
scopeMode: "read_only" | "full_access";
|
|
65
|
+
scopes: string[];
|
|
66
|
+
source: "composio_v3_sdk" | "muxo_managed";
|
|
67
|
+
}>;
|
|
68
|
+
listTriggerTypes(providerSlug?: string): ComposioTriggerType[];
|
|
69
|
+
/**
|
|
70
|
+
* Check what configuration is required for a trigger (`composio.triggers.getType(slug)`).
|
|
71
|
+
*/
|
|
72
|
+
getTriggerType(triggerSlug: string, composioApiKey?: string | null): Promise<ComposioTriggerType & {
|
|
73
|
+
source: "composio_v3_sdk" | "muxo_trigger_catalog";
|
|
74
|
+
}>;
|
|
75
|
+
/**
|
|
76
|
+
* Create a trigger with required config (`composio.triggers.create(userId, slug, { triggerConfig })`)
|
|
77
|
+
* and optionally subscribe to real-time trigger events (`composio.triggers.subscribe`).
|
|
78
|
+
*/
|
|
79
|
+
enableTrigger(params: {
|
|
80
|
+
workspaceId: string;
|
|
81
|
+
userId?: string;
|
|
82
|
+
triggerSlug: string;
|
|
83
|
+
providerSlug: string;
|
|
84
|
+
connectedAccountId?: string;
|
|
85
|
+
webhookUrl?: string;
|
|
86
|
+
config?: Record<string, unknown>;
|
|
87
|
+
subscribe?: boolean;
|
|
88
|
+
composioApiKey?: string | null;
|
|
89
|
+
}): Promise<ComposioTriggerSubscription>;
|
|
90
|
+
/**
|
|
91
|
+
* Subscribe to real-time trigger events via `@composio/core` (`composio.triggers.subscribe`).
|
|
92
|
+
*/
|
|
93
|
+
subscribeToTriggerEvents(params: {
|
|
94
|
+
workspaceId: string;
|
|
95
|
+
triggerId?: string;
|
|
96
|
+
toolkits?: string[];
|
|
97
|
+
onEvent?: (data: Record<string, unknown>) => void;
|
|
98
|
+
composioApiKey?: string | null;
|
|
99
|
+
}): Promise<{
|
|
100
|
+
subscribed: boolean;
|
|
101
|
+
triggerId?: string;
|
|
102
|
+
}>;
|
|
103
|
+
/**
|
|
104
|
+
* Verify an incoming Composio webhook payload and HMAC-SHA256 signature.
|
|
105
|
+
*/
|
|
106
|
+
verifyWebhook(params: {
|
|
107
|
+
rawPayload: string;
|
|
108
|
+
signatureHeader?: string | null;
|
|
109
|
+
webhookIdHeader?: string | null;
|
|
110
|
+
webhookTimestampHeader?: string | null;
|
|
111
|
+
secret?: string | null;
|
|
112
|
+
toleranceSeconds?: number;
|
|
113
|
+
}): Promise<{
|
|
114
|
+
verified: boolean;
|
|
115
|
+
reason?: string;
|
|
116
|
+
envelope: ReturnType<typeof parseComposioWebhookEnvelope>;
|
|
117
|
+
}>;
|
|
118
|
+
disableTriggersMatching(params: {
|
|
119
|
+
workspaceId?: string;
|
|
120
|
+
triggerId?: string;
|
|
121
|
+
triggerSlug?: string;
|
|
122
|
+
connectedAccountId?: string;
|
|
123
|
+
}): number;
|
|
124
|
+
listActiveTriggers(workspaceId: string): ComposioTriggerSubscription[];
|
|
125
|
+
recordTriggerEvent(record: ComposioTriggerEventRecord): void;
|
|
126
|
+
listTriggerEvents(workspaceId: string, limit?: number): ComposioTriggerEventRecord[];
|
|
127
|
+
private mapRawComposioItemToMuxoTool;
|
|
128
|
+
searchTools(query?: string, limit?: number, composioApiKey?: string | null, toolkit?: string): Promise<MuxoTool[]>;
|
|
129
|
+
inspectTool(slug: string, composioApiKey?: string | null): Promise<MuxoTool | null>;
|
|
11
130
|
startConnection(params: {
|
|
12
131
|
workspaceId: string;
|
|
13
132
|
providerSlug: string;
|
|
14
133
|
callbackUrl?: string;
|
|
134
|
+
composioApiKey?: string | null;
|
|
15
135
|
}): Promise<{
|
|
16
136
|
providerSlug: string;
|
|
17
137
|
providerName: string;
|
|
@@ -21,12 +141,12 @@ export declare class ComposioSdkAdapter {
|
|
|
21
141
|
externalAccountId: string | null;
|
|
22
142
|
message: string;
|
|
23
143
|
}>;
|
|
24
|
-
getConnectedAccountStatus(externalAccountId: string): Promise<{
|
|
144
|
+
getConnectedAccountStatus(externalAccountId: string, composioApiKey?: string | null): Promise<{
|
|
25
145
|
id: string;
|
|
26
146
|
providerSlug: string;
|
|
27
147
|
status: "active" | "pending" | "expired";
|
|
28
148
|
} | null>;
|
|
29
|
-
listLiveConnections(workspaceId: string): Promise<Array<{
|
|
149
|
+
listLiveConnections(workspaceId: string, composioApiKey?: string | null): Promise<Array<{
|
|
30
150
|
providerSlug: string;
|
|
31
151
|
providerName: string;
|
|
32
152
|
status: "active" | "pending" | "expired";
|
|
@@ -37,5 +157,6 @@ export declare class ComposioSdkAdapter {
|
|
|
37
157
|
tool: MuxoTool;
|
|
38
158
|
input: Record<string, unknown>;
|
|
39
159
|
connectedAccountId?: string | null;
|
|
160
|
+
composioApiKey?: string | null;
|
|
40
161
|
}): Promise<Record<string, unknown>>;
|
|
41
162
|
}
|