@muxoai/sdk 1.3.0 → 1.4.3

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.
Files changed (76) hide show
  1. package/.agents/plugins/marketplace.json +2 -2
  2. package/.claude-plugin/marketplace.json +19 -4
  3. package/.codex/config.toml +9 -2
  4. package/ARCHITECTURE.md +16 -6
  5. package/README.md +69 -24
  6. package/dist/clerk.d.ts +35 -0
  7. package/dist/clerk.js +201 -0
  8. package/dist/cli.js +1677 -103
  9. package/dist/composio-catalog.d.ts +234 -0
  10. package/dist/composio-catalog.js +1894 -0
  11. package/dist/config.d.ts +16 -0
  12. package/dist/config.js +27 -1
  13. package/dist/durable-workflow.d.ts +112 -0
  14. package/dist/durable-workflow.js +284 -0
  15. package/dist/engine.d.ts +377 -6
  16. package/dist/engine.js +1919 -94
  17. package/dist/index.d.ts +3 -0
  18. package/dist/index.js +3 -0
  19. package/dist/mcp-schema.d.ts +286 -0
  20. package/dist/mcp-schema.js +2580 -0
  21. package/dist/mcp.d.ts +2 -25
  22. package/dist/mcp.js +1008 -507
  23. package/dist/memory-graph.d.ts +45 -0
  24. package/dist/memory-graph.js +293 -0
  25. package/dist/nl.js +214 -35
  26. package/dist/oauth.d.ts +32 -0
  27. package/dist/oauth.js +134 -0
  28. package/dist/oss-suite.d.ts +217 -0
  29. package/dist/oss-suite.js +836 -0
  30. package/dist/policy.d.ts +190 -0
  31. package/dist/policy.js +1597 -0
  32. package/dist/providers/composio-instant.d.ts +4 -0
  33. package/dist/providers/composio-instant.js +890 -535
  34. package/dist/providers/composio-sdk.d.ts +126 -5
  35. package/dist/providers/composio-sdk.js +902 -79
  36. package/dist/providers/microsoft-governance.d.ts +89 -3
  37. package/dist/providers/microsoft-governance.js +673 -26
  38. package/dist/providers/stripe-billing.d.ts +42 -0
  39. package/dist/providers/stripe-billing.js +244 -5
  40. package/dist/providers/stripe-projects.d.ts +459 -4
  41. package/dist/providers/stripe-projects.js +2674 -122
  42. package/dist/providers/supermemory.d.ts +102 -6
  43. package/dist/providers/supermemory.js +609 -55
  44. package/dist/provisioning-managed.d.ts +50 -0
  45. package/dist/provisioning-managed.js +155 -0
  46. package/dist/sdk.d.ts +728 -7
  47. package/dist/sdk.js +539 -10
  48. package/dist/server.js +2744 -321
  49. package/dist/store.d.ts +138 -6
  50. package/dist/store.js +932 -58
  51. package/dist/types.d.ts +330 -4
  52. package/dist/ui/console-html.d.ts +62 -0
  53. package/dist/ui/console-html.js +3742 -2228
  54. package/dist/ui/design-tokens.d.ts +177 -0
  55. package/dist/ui/design-tokens.js +210 -0
  56. package/dist/version.d.ts +1 -0
  57. package/dist/version.js +1 -0
  58. package/package.json +6 -5
  59. package/plugins/muxo/.app.json +1 -1
  60. package/plugins/muxo/.claude-plugin/plugin.json +3 -3
  61. package/plugins/muxo/.codex-plugin/plugin.json +19 -10
  62. package/plugins/muxo/.cursor-plugin/plugin.json +30 -0
  63. package/plugins/muxo/.mcp.json +1 -33
  64. package/plugins/muxo/assets/logo.png +0 -0
  65. package/plugins/muxo/hooks/session-start.sh +16 -4
  66. package/plugins/muxo/hooks/user-prompt-submit.sh +14 -1
  67. package/plugins/muxo/mcp.json +0 -10
  68. package/plugins/muxo/plugin.json +65 -8
  69. package/plugins/muxo/skills/muxo/SKILL.md +142 -14
  70. package/plugins/muxo/skills/muxo/agents/openai.yaml +12 -0
  71. package/plugins/muxo/skills/muxo/references/cli.md +9 -3
  72. package/plugins/muxo/skills/muxo/references/mcp.md +22 -10
  73. package/plugins/muxo/skills/muxo-activity-summary/SKILL.md +81 -0
  74. package/plugins/muxo/skills/setup/SKILL.md +17 -3
  75. package/plugins/muxo/skills/setup/agents/openai.yaml +12 -0
  76. package/src/catalogues/stripe-projects-catalog.json +140 -0
@@ -0,0 +1,234 @@
1
+ /** SDK-free Composio enterprise toolkit and trigger catalogue shared by the Node server and the edge worker. */
2
+ export interface ComposioToolkitMetadata {
3
+ slug: string;
4
+ name: string;
5
+ description: string;
6
+ categories: string[];
7
+ authSchemes: Array<"OAUTH2" | "API_KEY" | "BEARER_TOKEN" | "NO_AUTH">;
8
+ pinnedVersion: string;
9
+ readOnlyScopes: string[];
10
+ fullAccessScopes: string[];
11
+ lane?: "composio_sdk" | "stripe_projects" | "composio_instant" | "stripe_billing";
12
+ sampleActions: Array<{
13
+ upstreamSlug: string;
14
+ muxoSlug: string;
15
+ name: string;
16
+ riskLevel: "read" | "write" | "destructive" | "financial" | "provisioning" | "admin";
17
+ }>;
18
+ }
19
+ export type ComposioWebhookEventType = "composio.trigger.message" | "composio.trigger.disabled" | "composio.connected_account.expired" | "composio.connected_account.activated";
20
+ export declare const COMPOSIO_V3_WEBHOOK_EVENTS: ComposioWebhookEventType[];
21
+ export interface ComposioTriggerSubscription {
22
+ id: string;
23
+ upstreamTriggerId?: string;
24
+ workspaceId: string;
25
+ userId?: string;
26
+ triggerSlug: string;
27
+ providerSlug: string;
28
+ connectedAccountId: string;
29
+ webhookUrl: string;
30
+ config: Record<string, unknown>;
31
+ status: "active" | "paused" | "disabled";
32
+ source?: "composio_v3_sdk" | "muxo_managed";
33
+ createdAt: string;
34
+ }
35
+ export interface ComposioTriggerEventRecord {
36
+ id: string;
37
+ workspaceId: string;
38
+ eventType?: ComposioWebhookEventType | string;
39
+ webhookVersion?: "V3" | "V2" | "V1" | "direct";
40
+ signatureVerified?: boolean;
41
+ webhookId?: string;
42
+ triggerId?: string;
43
+ triggerSlug: string;
44
+ providerSlug: string;
45
+ connectedAccountId?: string;
46
+ userId?: string;
47
+ projectId?: string;
48
+ orgId?: string;
49
+ receivedAt: string;
50
+ promptInjectionScan: {
51
+ safe: boolean;
52
+ riskScore: number;
53
+ findings: string[];
54
+ };
55
+ disposition: "dispatched" | "quarantined";
56
+ payloadPreview: Record<string, unknown>;
57
+ }
58
+ export declare const ENTERPRISE_TOOLKITS_CATALOG: ComposioToolkitMetadata[];
59
+ export declare function getSampleActionSchema(muxoSlug: string, upstreamSlug?: string): Record<string, unknown>;
60
+ export interface ComposioTriggerType {
61
+ slug: string;
62
+ providerSlug: string;
63
+ name: string;
64
+ description: string;
65
+ config: Record<string, unknown>;
66
+ }
67
+ export declare const COMPOSIO_TRIGGER_CATALOGUE: ComposioTriggerType[];
68
+ export declare function listComposioTriggerTypes(providerSlug?: string): ComposioTriggerType[];
69
+ export declare function getComposioTriggerType(slug: string): ComposioTriggerType | null;
70
+ /**
71
+ * Verifies a Composio V3 webhook HMAC-SHA256 signature (`v1,<base64>`) across Node and Cloudflare Workers.
72
+ * Signing input: `${webhookId}.${webhookTimestamp}.${rawPayload}`
73
+ */
74
+ export declare function verifyComposioWebhookSignature(params: {
75
+ rawPayload: string;
76
+ signatureHeader?: string | null;
77
+ webhookIdHeader?: string | null;
78
+ webhookTimestampHeader?: string | null;
79
+ secret?: string | null;
80
+ toleranceSeconds?: number;
81
+ }): Promise<{
82
+ verified: boolean;
83
+ reason?: string;
84
+ }>;
85
+ export interface ParsedComposioWebhookEnvelope {
86
+ eventType: ComposioWebhookEventType | string;
87
+ webhookVersion: "V3" | "V2" | "V1" | "direct";
88
+ webhookId?: string;
89
+ timestamp?: string;
90
+ triggerId?: string;
91
+ triggerSlug: string;
92
+ providerSlug: string;
93
+ connectedAccountId?: string;
94
+ connectionStatus?: "active" | "expired" | "disabled";
95
+ userId?: string;
96
+ projectId?: string;
97
+ orgId?: string;
98
+ payloadObj: Record<string, unknown>;
99
+ }
100
+ /**
101
+ * Normalizes Composio V3 webhook events (`composio.trigger.message`, `composio.trigger.disabled`,
102
+ * `composio.connected_account.expired`, `composio.connected_account.activated`) as well as direct
103
+ * trigger webhook payloads into a single canonical envelope.
104
+ */
105
+ export declare function parseComposioWebhookEnvelope(body: Record<string, unknown>, headers?: {
106
+ webhookId?: string | null;
107
+ webhookTimestamp?: string | null;
108
+ webhookVersion?: string | null;
109
+ }): ParsedComposioWebhookEnvelope;
110
+ export declare function filterComposioToolkits(params?: {
111
+ category?: string;
112
+ search?: string;
113
+ }): ComposioToolkitMetadata[];
114
+ /** Least-privilege scopes for a custom auth config: explicit scopes win, then the toolkit's read-only or full set. */
115
+ export declare function composioAuthConfigScopes(toolkitSlug: string, scopeMode: "read_only" | "full_access", customScopes?: string[]): string[];
116
+ export interface MuxoConnectInputField {
117
+ name: string;
118
+ type?: string;
119
+ label?: string;
120
+ description?: string;
121
+ required?: boolean;
122
+ default?: string | null;
123
+ }
124
+ export interface MuxoConnectLinkMetadata {
125
+ token: string;
126
+ toolkitSlug: string;
127
+ toolkitName: string;
128
+ connectedAccountId: string | null;
129
+ authMode: string;
130
+ status: string;
131
+ callbackUrl: string | null;
132
+ expectedInputFields: MuxoConnectInputField[];
133
+ }
134
+ export declare function ensureOAuthCallbackParams(callbackUrl: string, workspaceId: string, providerSlug: string): string;
135
+ /**
136
+ * Normalizes upstream Composio hosted link URLs (`connect.composio.dev/link/lk_...`,
137
+ * `dashboard.composio.dev/link/lk_...`, `backend.composio.dev/api/v3/s/...`, or
138
+ * legacy `/oauth/connect/lk_...`) directly to Composio's native hosted OAuth URL
139
+ * (`https://connect.composio.dev/link/<token>`), avoiding intermediate custom pages.
140
+ */
141
+ export declare function wrapMuxoConnectUrl(rawUrl: string | null | undefined, _baseUrl?: string, _params?: {
142
+ workspaceId?: string;
143
+ providerSlug?: string;
144
+ callbackUrl?: string | null;
145
+ externalAccountId?: string | null;
146
+ }): string | null;
147
+ export declare function fetchMuxoConnectLinkMetadata(token: string, fallback?: {
148
+ workspaceId?: string;
149
+ providerSlug?: string;
150
+ callbackUrl?: string | null;
151
+ connectedAccountId?: string | null;
152
+ }): Promise<MuxoConnectLinkMetadata>;
153
+ export declare function submitMuxoConnectLink(token: string, input?: Record<string, unknown>, fallback?: {
154
+ workspaceId?: string;
155
+ providerSlug?: string;
156
+ callbackUrl?: string | null;
157
+ connectedAccountId?: string | null;
158
+ }): Promise<{
159
+ ok: boolean;
160
+ status: string;
161
+ redirectUrl: string | null;
162
+ connectedAccountId: string | null;
163
+ error?: string;
164
+ }>;
165
+ /**
166
+ * Canonical Stripe Projects Cloud Infrastructure providers (`stripe_projects` lane).
167
+ * These providers are provisioned and deployed directly through Stripe Projects
168
+ * (and/or Muxo instant cloud provisioning) without Composio OAuth handoffs.
169
+ */
170
+ export declare const STRIPE_PROJECTS_PROVIDER_SLUGS: Set<string>;
171
+ export declare const STRIPE_PROJECTS_HOSTING_PROVIDERS: Set<string>;
172
+ export declare const STRIPE_PROJECTS_DATABASE_PROVIDERS: ReadonlySet<string>;
173
+ export declare const STRIPE_PROJECTS_MESSAGING_PROVIDERS: ReadonlySet<string>;
174
+ export declare const STRIPE_PROJECTS_AI_SEARCH_PROVIDERS: ReadonlySet<string>;
175
+ export declare const STRIPE_PROJECTS_SANDBOX_BROWSER_PROVIDERS: ReadonlySet<string>;
176
+ export declare const STRIPE_PROJECTS_CANONICAL_RESOURCE_SLUG: Record<string, string>;
177
+ /**
178
+ * Multi-service deployable slugs supported per Stripe Projects provider.
179
+ */
180
+ export declare const STRIPE_PROJECTS_MULTI_SERVICE_MAP: Record<string, Record<string, string>>;
181
+ export interface StripeProjectsDeployableCatalogEntry {
182
+ slug: string;
183
+ upstreamSlug: string;
184
+ providerSlug: string;
185
+ providerName: string;
186
+ serviceId: string;
187
+ name: string;
188
+ description: string;
189
+ categories: string[];
190
+ defaultPlan: string;
191
+ availablePlans: string[];
192
+ providerUrl: string;
193
+ llmContextUrl?: string;
194
+ }
195
+ export declare const STRIPE_PROJECTS_DEPLOYABLE_CATALOG: StripeProjectsDeployableCatalogEntry[];
196
+ /**
197
+ * Stripe Projects Toolkits Catalog exposed alongside Enterprise Connected Apps in `/api/v1/toolkits`
198
+ * and `filterComposioToolkits` so every Stripe Projects provider and its services are discoverable as toolkits.
199
+ */
200
+ export declare const STRIPE_PROJECTS_TOOLKITS_CATALOG: ComposioToolkitMetadata[];
201
+ export declare function normalizeStripeProjectsProviderSlug(raw: string): string;
202
+ export declare function isStripeProjectsExclusiveProvider(rawSlug: string): boolean;
203
+ export declare function isStripeProjectsHostingProvider(rawSlug: string): boolean;
204
+ export declare function isStripeProjectsDatabaseProvider(rawSlug: string): boolean;
205
+ /**
206
+ * Resolves any tool or provider reference targeting a Stripe Projects provider
207
+ * (including `app.vercel.deploy`, `app.vercel.create_deployment`, `resource.vercel.deploy`,
208
+ * `vercel/deploy`, `app.netlify.deploy`, `app.turso.create_database`, `supabase_migration`,
209
+ * `resource.cloudflare.d1`, `resource.upstash.vector`, `resource.railway.postgres`, etc.)
210
+ * to its canonical `resource.<provider>.<service>` tool slug on the `stripe_projects` lane.
211
+ */
212
+ export declare function resolveStripeProjectsCanonicalToolSlug(rawSlug: string): string | null;
213
+ export declare function extractHostedHtmlFromInput(input: Record<string, unknown>): {
214
+ html: string | null;
215
+ files: Record<string, string>;
216
+ envVars: Record<string, string>;
217
+ };
218
+ export declare function extractDatabaseMigrationsFromInput(input: Record<string, unknown>): {
219
+ hasMigrations: boolean;
220
+ sqlStatements: string[];
221
+ tablesCreated: string[];
222
+ };
223
+ export declare function buildStandardStripeProjectsSecrets(params: {
224
+ providerSlug: string;
225
+ resourceName: string;
226
+ workspaceSlug?: string;
227
+ liveUrl?: string;
228
+ }): Record<string, string>;
229
+ export declare function renderDefaultHostedSiteHtml(params: {
230
+ resourceName: string;
231
+ providerName: string;
232
+ providerSlug: string;
233
+ liveUrl: string;
234
+ }): string;