@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.
Files changed (54) hide show
  1. package/.agents/plugins/marketplace.json +2 -2
  2. package/.claude-plugin/marketplace.json +2 -2
  3. package/ARCHITECTURE.md +16 -6
  4. package/README.md +1 -1
  5. package/dist/cli.js +317 -10
  6. package/dist/composio-catalog.d.ts +58 -0
  7. package/dist/composio-catalog.js +474 -0
  8. package/dist/config.d.ts +10 -0
  9. package/dist/config.js +16 -0
  10. package/dist/durable-workflow.d.ts +45 -0
  11. package/dist/durable-workflow.js +90 -0
  12. package/dist/engine.d.ts +276 -5
  13. package/dist/engine.js +1261 -71
  14. package/dist/mcp-schema.d.ts +125 -0
  15. package/dist/mcp-schema.js +1076 -0
  16. package/dist/mcp.d.ts +2 -30
  17. package/dist/mcp.js +505 -539
  18. package/dist/memory-graph.d.ts +21 -0
  19. package/dist/memory-graph.js +173 -0
  20. package/dist/nl.js +155 -0
  21. package/dist/oauth.d.ts +32 -0
  22. package/dist/oauth.js +134 -0
  23. package/dist/policy.d.ts +75 -1
  24. package/dist/policy.js +1119 -0
  25. package/dist/providers/composio-instant.js +225 -5
  26. package/dist/providers/composio-sdk.d.ts +68 -5
  27. package/dist/providers/composio-sdk.js +683 -78
  28. package/dist/providers/microsoft-governance.d.ts +28 -1
  29. package/dist/providers/microsoft-governance.js +224 -11
  30. package/dist/providers/stripe-billing.d.ts +42 -0
  31. package/dist/providers/stripe-billing.js +230 -1
  32. package/dist/providers/stripe-projects.d.ts +451 -3
  33. package/dist/providers/stripe-projects.js +2106 -87
  34. package/dist/providers/supermemory.d.ts +74 -1
  35. package/dist/providers/supermemory.js +426 -0
  36. package/dist/provisioning-managed.d.ts +50 -0
  37. package/dist/provisioning-managed.js +155 -0
  38. package/dist/sdk.d.ts +440 -3
  39. package/dist/sdk.js +305 -3
  40. package/dist/server.js +1841 -232
  41. package/dist/store.d.ts +113 -6
  42. package/dist/store.js +675 -52
  43. package/dist/types.d.ts +192 -3
  44. package/dist/ui/console-html.d.ts +10 -1
  45. package/dist/ui/console-html.js +1082 -452
  46. package/dist/version.d.ts +1 -1
  47. package/dist/version.js +1 -1
  48. package/package.json +2 -2
  49. package/plugins/muxo/.claude-plugin/plugin.json +1 -1
  50. package/plugins/muxo/.codex-plugin/plugin.json +1 -1
  51. package/plugins/muxo/plugin.json +2 -2
  52. package/plugins/muxo/skills/muxo/SKILL.md +42 -1
  53. package/plugins/muxo/skills/muxo/references/mcp.md +3 -2
  54. package/plugins/muxo/skills/setup/SKILL.md +8 -0
@@ -1,10 +1,225 @@
1
1
  import { type MuxoConfig } from "../config.js";
2
2
  import type { MuxoTool } from "../types.js";
3
+ export declare const DEFAULT_STRIPE_PROVISIONING_API_VERSION = "2026-09-30.preview";
4
+ export interface StripeV2ListResponse<T> {
5
+ object: "v2.list";
6
+ data: T[];
7
+ next_page_url: string | null;
8
+ previous_page_url: string | null;
9
+ }
10
+ export interface StripeV2Eligibility {
11
+ object: "v2.provisioning.eligibility";
12
+ is_eligible: boolean;
13
+ livemode: boolean;
14
+ requirements: string[];
15
+ }
16
+ export interface StripeV2Provider {
17
+ id: string;
18
+ object: "v2.provisioning.provider";
19
+ name: string;
20
+ description: string | null;
21
+ categories: string[];
22
+ capabilities?: {
23
+ custom_configuration?: boolean;
24
+ link_existing_resources?: boolean;
25
+ };
26
+ configuration_schema?: Record<string, unknown> | null;
27
+ llm_context?: string | null;
28
+ tos_url?: string | null;
29
+ website_url?: string | null;
30
+ privacy_policy_url?: string | null;
31
+ created?: string;
32
+ }
33
+ export interface StripeV2ProviderServiceDetail {
34
+ id: string;
35
+ object: "v2.provisioning.provider_service_detail";
36
+ provider: string;
37
+ provider_name: string;
38
+ service_id: string;
39
+ description: string | null;
40
+ categories: string[];
41
+ kind: "deployable" | "plan";
42
+ availability: "available" | "coming_soon" | "unavailable" | string;
43
+ scope?: "account" | "project" | string;
44
+ configuration_schema?: Record<string, unknown> | null;
45
+ pricing?: Record<string, unknown> | null;
46
+ allowed_updates?: Record<string, unknown> | null;
47
+ constraints?: Record<string, unknown> | null;
48
+ llm_context?: string | null;
49
+ }
50
+ export interface StripeV2UsageLimit {
51
+ max_amount: string | number;
52
+ currency: string;
53
+ recurring_interval: "day" | "week" | "month" | "year" | string;
54
+ }
55
+ export interface StripeV2PaymentProfile {
56
+ object?: "v2.provisioning.payment_profile";
57
+ card_last4: string | null;
58
+ usage_limits: StripeV2UsageLimit | null;
59
+ providers: Array<{
60
+ provider: string;
61
+ usage_limits: StripeV2UsageLimit | null;
62
+ }>;
63
+ payment_method_owner: "platform" | string | null;
64
+ livemode: boolean;
65
+ has_payment_method?: boolean;
66
+ }
67
+ export interface StripeV2PaymentMethodRequest {
68
+ object?: "v2.provisioning.payment_method_request";
69
+ checkout_session_url: string;
70
+ status: "checkout_initiated" | "complete" | string;
71
+ livemode?: boolean;
72
+ }
73
+ export interface StripeV2Project {
74
+ id: string;
75
+ object?: "v2.provisioning.project";
76
+ name: string;
77
+ catalog: "dev" | "prod" | "testing" | string;
78
+ created: string;
79
+ project_profile?: string | null;
80
+ livemode?: boolean;
81
+ }
82
+ export interface StripeV2ProviderConnection {
83
+ id: string;
84
+ object?: "v2.provisioning.provider_connection";
85
+ provider: string;
86
+ provider_account?: string | null;
87
+ provider_account_details?: Record<string, unknown> | null;
88
+ status: "active" | "expired" | "unknown" | string;
89
+ created?: string | null;
90
+ livemode?: boolean;
91
+ }
92
+ export interface StripeV2ProviderConnectionRequest {
93
+ id: string;
94
+ object?: "v2.provisioning.provider_connection_request";
95
+ provider: string;
96
+ request_status?: "complete" | "error" | "needs_information" | "pending_auth" | "requested" | string;
97
+ redirect_url?: string | null;
98
+ needs_information_schema?: Record<string, unknown> | null;
99
+ provider_connection?: StripeV2ProviderConnection | null;
100
+ error?: Record<string, unknown> | null;
101
+ scopes?: string[];
102
+ created?: string | null;
103
+ livemode?: boolean;
104
+ }
105
+ export interface StripeV2Resource {
106
+ id: string;
107
+ object?: "v2.provisioning.resource";
108
+ provider?: string;
109
+ service_ref?: string;
110
+ project?: string | null;
111
+ status: "pending" | "needs_information" | "complete" | "errored" | "removed" | "provisioning" | "active" | "ready" | "pending_user_action" | string;
112
+ name?: string | null;
113
+ environment?: "dev" | "prod" | string;
114
+ catalog?: "dev" | "prod" | "testing" | string;
115
+ needs_information_schema?: Record<string, unknown> | null;
116
+ pending_action?: {
117
+ type?: string;
118
+ redirect_url?: string | null;
119
+ required_information_schema?: Record<string, unknown> | null;
120
+ [key: string]: unknown;
121
+ } | null;
122
+ error_message?: string | null;
123
+ user_message?: Record<string, unknown> | null;
124
+ created?: string;
125
+ livemode?: boolean;
126
+ }
127
+ export interface StripeV2AccessConfiguration {
128
+ object: "v2.provisioning.resource_access_configuration" | "v2.provisioning.resource.access_configuration" | string;
129
+ resource: string;
130
+ configuration: Record<string, string>;
131
+ created: string;
132
+ expires_at?: string | null;
133
+ livemode: boolean;
134
+ }
135
+ export interface StripeV2ConnectedAccount {
136
+ id: string;
137
+ object?: "v2.core.account" | string;
138
+ contact_email?: string | null;
139
+ display_name?: string | null;
140
+ identity?: {
141
+ country?: string;
142
+ entity_type?: "individual" | "company" | string;
143
+ } | null;
144
+ configuration?: {
145
+ developer?: {
146
+ capabilities?: {
147
+ projects?: {
148
+ requested?: boolean;
149
+ status?: "active" | "pending" | "inactive" | "unrequested" | string;
150
+ };
151
+ };
152
+ };
153
+ } | null;
154
+ requirements?: Record<string, unknown> | null;
155
+ livemode?: boolean;
156
+ }
157
+ export interface StripeV2AccountLink {
158
+ object?: "v2.core.account_link" | string;
159
+ account: string;
160
+ url: string;
161
+ created?: string;
162
+ expires_at?: string;
163
+ livemode?: boolean;
164
+ }
165
+ export interface StripeConnectedAccountSession {
166
+ object: "account_session" | string;
167
+ account: string;
168
+ client_secret: string;
169
+ components: {
170
+ account_onboarding?: {
171
+ enabled: boolean;
172
+ features?: {
173
+ external_account_collection?: boolean;
174
+ disable_stripe_user_authentication?: boolean;
175
+ };
176
+ };
177
+ account_management?: {
178
+ enabled: boolean;
179
+ features?: {
180
+ external_account_collection?: boolean;
181
+ disable_stripe_user_authentication?: boolean;
182
+ };
183
+ };
184
+ [key: string]: unknown;
185
+ };
186
+ expires_at: number;
187
+ livemode: boolean;
188
+ source?: "stripe_v2_api" | "muxo_managed";
189
+ }
190
+ export interface StripeProvisioningAuditEntry {
191
+ id: string;
192
+ method: "GET" | "POST";
193
+ endpoint: string;
194
+ stripeContext: string | null;
195
+ intendedWrite: Record<string, unknown> | null;
196
+ requestId: string | null;
197
+ objectId: string | null;
198
+ objectStatus: string | null;
199
+ httpStatus: number | null;
200
+ errorCode: string | null;
201
+ requestLogUrl: string | null;
202
+ workflowStatus: "pending" | "completed" | "requires_review" | "errored";
203
+ startedAt: string;
204
+ completedAt: string | null;
205
+ }
206
+ export declare function redactProvisioningSecrets(value: unknown): Record<string, unknown> | null;
207
+ export declare function classifyStripeProvisioningError(err: {
208
+ code?: string;
209
+ status?: number;
210
+ message?: string;
211
+ }): {
212
+ platformAction: string;
213
+ workflowStatus: "errored" | "requires_review";
214
+ retryable: boolean;
215
+ };
3
216
  export declare function isPaidCloudProvisioning(tool: MuxoTool, input?: Record<string, unknown>): boolean;
4
217
  export declare class StripeProjectsAdapter {
5
218
  private readonly config;
6
219
  private readonly tools;
7
220
  private readonly providerByName;
221
+ private readonly seededProviders;
222
+ private readonly seededServices;
8
223
  constructor(config: MuxoConfig);
9
224
  private loadCatalogSeed;
10
225
  getTools(): MuxoTool[];
@@ -12,11 +227,240 @@ export declare class StripeProjectsAdapter {
12
227
  inspectTool(slug: string): MuxoTool | null;
13
228
  private runStripeProjectsCli;
14
229
  private get hasLocalProjectsWorkdir();
15
- getLiveStatus(): Promise<{
230
+ private provisioningAuditLog;
231
+ getProvisioningAuditLog(limit?: number): StripeProvisioningAuditEntry[];
232
+ private resolveStripeSecretKey;
233
+ isLivemodeKey(apiKeyOverride?: string | null): boolean;
234
+ resolveStripeContext(stripeContextOverride?: string | null): string | null;
235
+ hasStripeV2ApiKey(apiKeyOverride?: string | null): boolean;
236
+ get provisioningApiVersion(): string;
237
+ get stripeApiBaseUrl(): string;
238
+ requestV2Provisioning<T = Record<string, unknown>>(method: "GET" | "POST", endpointPath: string, options?: {
239
+ query?: Record<string, string | number | boolean | undefined>;
240
+ body?: Record<string, unknown>;
241
+ apiKeyOverride?: string | null;
242
+ stripeContext?: string | null;
243
+ apiVersionOverride?: string;
244
+ idempotencyKey?: string;
245
+ timeoutMs?: number;
246
+ maxRateLimitRetries?: number;
247
+ }): Promise<T>;
248
+ paginateV2List<T>(initialPath: string, options?: {
249
+ query?: Record<string, string | number | boolean | undefined>;
250
+ maxPages?: number;
251
+ apiKeyOverride?: string | null;
252
+ stripeContext?: string | null;
253
+ }): Promise<StripeV2ListResponse<T>>;
254
+ createConnectedAccount(params: {
255
+ contact_email: string;
256
+ display_name: string;
257
+ country?: string;
258
+ entity_type?: "individual" | "company";
259
+ apiKeyOverride?: string | null;
260
+ }): Promise<StripeV2ConnectedAccount>;
261
+ createConnectedAccountLink(params: {
262
+ account: string;
263
+ type?: "account_onboarding" | "account_update";
264
+ fields?: "currently_due" | "eventually_due";
265
+ future_requirements?: "include" | "omit";
266
+ refresh_url: string;
267
+ return_url: string;
268
+ apiKeyOverride?: string | null;
269
+ }): Promise<StripeV2AccountLink>;
270
+ createConnectedAccountSession(params: {
271
+ account: string;
272
+ enableAccountManagement?: boolean;
273
+ enableNotificationBanner?: boolean;
274
+ disableStripeUserAuthentication?: boolean;
275
+ externalAccountCollection?: boolean;
276
+ apiKeyOverride?: string | null;
277
+ }): Promise<StripeConnectedAccountSession>;
278
+ retrieveConnectedAccount(accountId: string, apiKeyOverride?: string | null): Promise<StripeV2ConnectedAccount>;
279
+ checkEligibility(apiKeyOverride?: string | null, stripeContext?: string | null): Promise<StripeV2Eligibility & {
280
+ ready: boolean;
281
+ platform_action: string;
282
+ source: "stripe_v2_api" | "muxo_managed";
283
+ }>;
284
+ listCatalogProviders(params?: {
285
+ catalog?: "dev" | "prod" | "testing";
286
+ development?: boolean;
287
+ limit?: number;
288
+ page?: string;
289
+ page_url?: string;
290
+ apiKeyOverride?: string | null;
291
+ stripeContext?: string | null;
292
+ }): Promise<StripeV2ListResponse<StripeV2Provider> & {
293
+ source: "stripe_v2_api" | "muxo_catalog_seed";
294
+ }>;
295
+ listCatalogServices(params?: {
296
+ catalog?: "dev" | "prod" | "testing";
297
+ development?: boolean;
298
+ limit?: number;
299
+ page?: string;
300
+ page_url?: string;
301
+ provider_id?: string;
302
+ provider_name?: string;
303
+ apiKeyOverride?: string | null;
304
+ stripeContext?: string | null;
305
+ }): Promise<StripeV2ListResponse<StripeV2ProviderServiceDetail> & {
306
+ source: "stripe_v2_api" | "muxo_catalog_seed";
307
+ }>;
308
+ getPaymentProfile(params?: {
309
+ provider?: string;
310
+ livemode?: boolean;
311
+ apiKeyOverride?: string | null;
312
+ stripeContext?: string | null;
313
+ }): Promise<StripeV2PaymentProfile & {
314
+ source: "stripe_v2_api" | "muxo_managed";
315
+ }>;
316
+ updatePaymentProfileLimit(params: {
317
+ usage_limits: StripeV2UsageLimit;
318
+ provider?: string;
319
+ livemode?: boolean;
320
+ apiKeyOverride?: string | null;
321
+ stripeContext?: string | null;
322
+ }): Promise<StripeV2PaymentProfile & {
323
+ source: "stripe_v2_api" | "muxo_managed";
324
+ }>;
325
+ createPaymentMethodRequest(params?: {
326
+ usage_limits?: StripeV2UsageLimit;
327
+ payment_method_owner?: "platform" | "provider";
328
+ provider?: string;
329
+ source_account?: string;
330
+ source_customer?: string;
331
+ source_payment_method?: string;
332
+ livemode?: boolean;
333
+ apiKeyOverride?: string | null;
334
+ stripeContext?: string | null;
335
+ }): Promise<StripeV2PaymentMethodRequest & {
336
+ source: "stripe_v2_api" | "muxo_managed";
337
+ }>;
338
+ createProject(params: {
339
+ name: string;
340
+ catalog?: "dev" | "prod" | "testing";
341
+ project_profile?: string;
342
+ apiKeyOverride?: string | null;
343
+ stripeContext?: string | null;
344
+ }): Promise<StripeV2Project & {
345
+ source: "stripe_v2_api" | "muxo_managed";
346
+ }>;
347
+ listProviderConnections(params?: {
348
+ limit?: number;
349
+ page?: string;
350
+ page_url?: string;
351
+ provider?: string;
352
+ apiKeyOverride?: string | null;
353
+ stripeContext?: string | null;
354
+ }): Promise<StripeV2ListResponse<StripeV2ProviderConnection>>;
355
+ unlinkProviderConnection(connectionId: string, apiKeyOverride?: string | null, stripeContext?: string | null): Promise<StripeV2ProviderConnection>;
356
+ createProviderConnectionRequest(params: {
357
+ provider: string;
358
+ configuration?: Record<string, unknown>;
359
+ project?: string;
360
+ code_challenge?: string;
361
+ code_challenge_method?: "S256";
362
+ apiKeyOverride?: string | null;
363
+ stripeContext?: string | null;
364
+ }): Promise<StripeV2ProviderConnectionRequest>;
365
+ retrieveProviderConnectionRequest(requestId: string, apiKeyOverride?: string | null, stripeContext?: string | null): Promise<StripeV2ProviderConnectionRequest>;
366
+ submitProviderConnectionRequestInformation(requestId: string, paramsOrInfo: {
367
+ information?: Record<string, unknown>;
368
+ confirmation_secret?: string;
369
+ apiKeyOverride?: string | null;
370
+ stripeContext?: string | null;
371
+ [key: string]: unknown;
372
+ }, apiKeyOverride?: string | null): Promise<StripeV2ProviderConnectionRequest>;
373
+ createResource(params: {
374
+ provider: string;
375
+ service_ref: string;
376
+ configuration: Record<string, unknown>;
377
+ project?: string;
378
+ scope?: "account" | "project" | string;
379
+ name?: string;
380
+ environment?: string;
381
+ catalog?: "dev" | "prod" | "testing";
382
+ livemode?: boolean;
383
+ idempotencyKey?: string;
384
+ apiKeyOverride?: string | null;
385
+ stripeContext?: string | null;
386
+ }): Promise<StripeV2Resource>;
387
+ retrieveResource(resourceId: string, apiKeyOverride?: string | null, stripeContext?: string | null): Promise<StripeV2Resource>;
388
+ waitForResourceReady(resourceId: string, options?: {
389
+ timeoutMs?: number;
390
+ pollIntervalMs?: number;
391
+ apiKeyOverride?: string | null;
392
+ stripeContext?: string | null;
393
+ }): Promise<StripeV2Resource>;
394
+ updateResource(resourceId: string, paramsOrConfig: {
395
+ configuration?: Record<string, unknown>;
396
+ service_ref?: string;
397
+ catalog?: "dev" | "prod" | "testing";
398
+ apiKeyOverride?: string | null;
399
+ stripeContext?: string | null;
400
+ [key: string]: unknown;
401
+ }, apiKeyOverride?: string | null): Promise<StripeV2Resource>;
402
+ linkResource(params: {
403
+ provider: string;
404
+ service_ref: string;
405
+ provider_resource_id?: string;
406
+ project?: string;
407
+ environment?: string;
408
+ catalog?: "dev" | "prod" | "testing";
409
+ livemode?: boolean;
410
+ apiKeyOverride?: string | null;
411
+ stripeContext?: string | null;
412
+ }): Promise<StripeV2Resource>;
413
+ removeResource(resourceId: string, apiKeyOverride?: string | null, stripeContext?: string | null): Promise<StripeV2Resource>;
414
+ unlinkResource(resourceId: string, apiKeyOverride?: string | null, stripeContext?: string | null): Promise<StripeV2Resource>;
415
+ rotateResourceCredentials(resourceId: string, apiKeyOverride?: string | null, stripeContext?: string | null): Promise<StripeV2Resource>;
416
+ submitResourceInformation(resourceId: string, submittedInformation: Record<string, unknown>, apiKeyOverride?: string | null, stripeContext?: string | null): Promise<StripeV2Resource>;
417
+ revealAccessConfiguration(resourceId: string, apiKeyOverride?: string | null, stripeContext?: string | null): Promise<StripeV2AccessConfiguration>;
418
+ createV2EventDestination(params: {
419
+ name?: string;
420
+ url: string;
421
+ events?: string[];
422
+ apiKeyOverride?: string | null;
423
+ }): Promise<{
424
+ id: string;
425
+ object: "v2.core.event_destination";
426
+ name: string;
427
+ status: "enabled" | "disabled";
428
+ enabled_events: string[];
429
+ webhook_endpoint: {
430
+ url: string;
431
+ };
432
+ livemode: boolean;
433
+ source: "stripe_v2_api" | "muxo_managed";
434
+ }>;
435
+ handleV2ProvisioningEvent(params: {
436
+ event: {
437
+ id?: string;
438
+ type: string;
439
+ context?: string;
440
+ related_object?: {
441
+ id: string;
442
+ type: string;
443
+ url?: string;
444
+ };
445
+ data?: Record<string, unknown>;
446
+ };
447
+ apiKeyOverride?: string | null;
448
+ stripeContext?: string | null;
449
+ }): Promise<{
450
+ eventId: string;
451
+ eventType: string;
452
+ relatedObjectId: string | null;
453
+ actionTaken: string;
454
+ revealedConfiguration?: Record<string, string>;
455
+ resource?: Partial<StripeV2Resource>;
456
+ }>;
457
+ getLiveStatus(apiKeyOverride?: string | null): Promise<{
16
458
  authenticated: boolean;
17
459
  projectInitialized: boolean;
18
460
  projectId: string | null;
19
461
  projectName: string | null;
462
+ apiVersion?: string;
463
+ eligibility?: StripeV2Eligibility;
20
464
  providers: Array<{
21
465
  id: string;
22
466
  name: string;
@@ -27,10 +471,14 @@ export declare class StripeProjectsAdapter {
27
471
  services: Array<Record<string, unknown>>;
28
472
  plans: Array<Record<string, unknown>>;
29
473
  }>;
30
- linkProvider(providerSlug: string): Promise<{
474
+ linkProvider(providerSlug: string, apiKeyOverride?: string | null, stripeContext?: string | null): Promise<{
31
475
  providerSlug: string;
32
- status: "active" | "pending";
476
+ status: "active" | "pending" | "requires_review";
33
477
  redirectUrl: string | null;
478
+ connectionId?: string | null;
479
+ connectionRequestId?: string | null;
480
+ needsInformationSchema?: Record<string, unknown> | null;
481
+ workflowStatus?: string;
34
482
  message: string;
35
483
  }>;
36
484
  pullEnvVarsFromWorkdir(syncFromCli?: boolean): Promise<Record<string, string>>;