@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
package/dist/types.d.ts
CHANGED
|
@@ -18,6 +18,55 @@ export interface WorkspaceBilling {
|
|
|
18
18
|
/** Subscription whose start (fresh usage period and first credits) was already applied. */
|
|
19
19
|
startedSubscriptionId?: string | null;
|
|
20
20
|
}
|
|
21
|
+
export type LanguageMode = "non_technical" | "technical" | "hybrid";
|
|
22
|
+
export interface HumanFriendlyExplanation {
|
|
23
|
+
headline: string;
|
|
24
|
+
preferred: string;
|
|
25
|
+
nonTechnical: string;
|
|
26
|
+
technical: string;
|
|
27
|
+
languageMode: LanguageMode;
|
|
28
|
+
customInstructions?: string[];
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* A structured handoff telling the caller (LLM or human) that a person must
|
|
32
|
+
* complete a step in the browser before the plan can proceed.
|
|
33
|
+
*/
|
|
34
|
+
export interface HumanHandoff {
|
|
35
|
+
kind: "approval" | "oauth" | "byok";
|
|
36
|
+
url: string | null;
|
|
37
|
+
ctaLabel: string;
|
|
38
|
+
headline: string;
|
|
39
|
+
instructions: string;
|
|
40
|
+
planId?: string;
|
|
41
|
+
provider?: string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Machine-readable guidance for LLM harnesses on exactly which Muxo tool to
|
|
45
|
+
* call next once a handoff or gate clears.
|
|
46
|
+
*/
|
|
47
|
+
export interface LlmGuidance {
|
|
48
|
+
summary: string;
|
|
49
|
+
nextToolCalls: Array<{
|
|
50
|
+
tool: string;
|
|
51
|
+
input: Record<string, unknown>;
|
|
52
|
+
when: string;
|
|
53
|
+
}>;
|
|
54
|
+
}
|
|
55
|
+
export type WorkspaceRole = "owner" | "admin" | "operator" | "member";
|
|
56
|
+
export type ParameterRuleOperator = "equals" | "must_equal" | "not_equals" | "contains" | "not_contains" | "starts_with" | "must_start_with" | "ends_with" | "must_end_with" | "domain_in" | "domain_not_in" | "max_number" | "min_number" | "gt" | "gte" | "lt" | "lte" | "in" | "not_in" | "regex";
|
|
57
|
+
export type ParameterRuleAction = "block" | "require_approval" | "allow" | "auto_approve";
|
|
58
|
+
export interface ParameterPolicyRule {
|
|
59
|
+
id: string;
|
|
60
|
+
toolPattern?: string;
|
|
61
|
+
parameter: string;
|
|
62
|
+
operator: ParameterRuleOperator;
|
|
63
|
+
value: string | number | string[];
|
|
64
|
+
unit?: "usd" | "cents" | "credits" | "raw";
|
|
65
|
+
action: ParameterRuleAction;
|
|
66
|
+
elseAction?: ParameterRuleAction;
|
|
67
|
+
description: string;
|
|
68
|
+
source?: "deterministic" | "llm" | "mcp_harness" | "user";
|
|
69
|
+
}
|
|
21
70
|
export interface GovernancePolicy {
|
|
22
71
|
mode: "monitor" | "enforce";
|
|
23
72
|
requireApprovalFor: RiskLevel[];
|
|
@@ -25,19 +74,65 @@ export interface GovernancePolicy {
|
|
|
25
74
|
allowProvisioning: boolean;
|
|
26
75
|
maxCreditsPerRun: number;
|
|
27
76
|
blockedToolSlugs?: string[];
|
|
77
|
+
parameterRules?: ParameterPolicyRule[];
|
|
28
78
|
executionRing?: 0 | 1 | 2 | 3;
|
|
29
79
|
killSwitchActive?: boolean;
|
|
30
80
|
killSwitchReason?: string | null;
|
|
31
81
|
blockDestructiveSql?: boolean;
|
|
82
|
+
naturalLanguageRules?: string[];
|
|
83
|
+
languageMode?: LanguageMode;
|
|
84
|
+
customInstructions?: string[];
|
|
32
85
|
}
|
|
33
86
|
export interface User {
|
|
34
87
|
id: string;
|
|
35
88
|
email: string;
|
|
36
89
|
name: string;
|
|
37
90
|
workspaceId: string;
|
|
38
|
-
role:
|
|
91
|
+
role: WorkspaceRole;
|
|
92
|
+
createdAt: string;
|
|
93
|
+
}
|
|
94
|
+
export interface WorkspaceMembership {
|
|
95
|
+
id: string;
|
|
96
|
+
workspaceId: string;
|
|
97
|
+
userId: string;
|
|
98
|
+
role: WorkspaceRole;
|
|
99
|
+
teamName: string | null;
|
|
100
|
+
joinedViaKeyId?: string | null;
|
|
101
|
+
joinedVia?: "owner" | "created" | "api_key" | "team_key" | "invite" | "claim" | string;
|
|
102
|
+
apiKeyId?: string | null;
|
|
103
|
+
createdAt: string;
|
|
104
|
+
}
|
|
105
|
+
export interface WorkspaceSummary {
|
|
106
|
+
id: string;
|
|
107
|
+
name: string;
|
|
108
|
+
slug: string;
|
|
109
|
+
tier: SubscriptionTier;
|
|
110
|
+
creditsBalance: number;
|
|
111
|
+
monthlyActionsUsed: number;
|
|
112
|
+
monthlyActionsLimit: number;
|
|
113
|
+
role: WorkspaceRole;
|
|
114
|
+
teamName: string | null;
|
|
115
|
+
joinedVia?: "owner" | "created" | "api_key" | "team_key" | "invite" | "claim" | string;
|
|
116
|
+
isCurrent: boolean;
|
|
39
117
|
createdAt: string;
|
|
40
118
|
}
|
|
119
|
+
export interface TeamOnboardingKit {
|
|
120
|
+
ok?: boolean;
|
|
121
|
+
mode: "shared_workspace" | "dedicated_workspace";
|
|
122
|
+
workspace: Workspace | Pick<Workspace, "id" | "name" | "slug" | "tier" | "creditsBalance">;
|
|
123
|
+
teamName: string;
|
|
124
|
+
role: WorkspaceRole;
|
|
125
|
+
apiKey: string;
|
|
126
|
+
keyRecord: ApiKeyRecord;
|
|
127
|
+
claimUrl?: string | null;
|
|
128
|
+
consoleUrl?: string;
|
|
129
|
+
consoleJoinUrl?: string;
|
|
130
|
+
mcpEndpoint?: string;
|
|
131
|
+
cliSetupCommand: string;
|
|
132
|
+
mcpConfig?: Record<string, unknown>;
|
|
133
|
+
mcpConfigSnippet?: string;
|
|
134
|
+
instructions: string[];
|
|
135
|
+
}
|
|
41
136
|
export interface Workspace {
|
|
42
137
|
id: string;
|
|
43
138
|
name: string;
|
|
@@ -49,6 +144,7 @@ export interface Workspace {
|
|
|
49
144
|
creditsBalance: number;
|
|
50
145
|
stripeCustomerId: string | null;
|
|
51
146
|
stripeSubscriptionId: string | null;
|
|
147
|
+
stripeConnectedAccountId?: string | null;
|
|
52
148
|
billing?: WorkspaceBilling;
|
|
53
149
|
projectsEnvName: string;
|
|
54
150
|
policy: GovernancePolicy;
|
|
@@ -62,6 +158,9 @@ export interface ApiKeyRecord {
|
|
|
62
158
|
keyPrefix: string;
|
|
63
159
|
environment: "live" | "test";
|
|
64
160
|
scopes: string[];
|
|
161
|
+
teamName?: string | null;
|
|
162
|
+
role?: WorkspaceRole;
|
|
163
|
+
createdByEmail?: string | null;
|
|
65
164
|
lastUsedAt: string | null;
|
|
66
165
|
revokedAt: string | null;
|
|
67
166
|
createdAt: string;
|
|
@@ -78,7 +177,7 @@ export interface MuxoTool {
|
|
|
78
177
|
riskLevel: RiskLevel;
|
|
79
178
|
requiresAuth: boolean;
|
|
80
179
|
creditCost: number;
|
|
81
|
-
billingMode: "customer_oauth" | "provider_wallet" | "resource_provisioning";
|
|
180
|
+
billingMode: "customer_oauth" | "customer_byok" | "provider_wallet" | "resource_provisioning";
|
|
82
181
|
inputSchema: Record<string, unknown>;
|
|
83
182
|
llmContextUrl?: string;
|
|
84
183
|
providerUrl?: string;
|
|
@@ -202,6 +301,7 @@ export interface GovernanceDecisionRecord {
|
|
|
202
301
|
signature: string;
|
|
203
302
|
bindingHash: string;
|
|
204
303
|
decidedAt: string;
|
|
304
|
+
explanation?: HumanFriendlyExplanation;
|
|
205
305
|
}
|
|
206
306
|
export type MemoryRecordKind = "fact" | "preference" | "resource_note" | "operator_note" | "execution_outcome" | "resource_topology" | "policy_decision";
|
|
207
307
|
export interface TemporalGraphFact {
|
|
@@ -215,11 +315,56 @@ export interface TemporalGraphFact {
|
|
|
215
315
|
validFrom: string;
|
|
216
316
|
validTo: string | null;
|
|
217
317
|
supersededById?: string | null;
|
|
218
|
-
sourceKind: MemoryRecordKind | "system";
|
|
318
|
+
sourceKind: MemoryRecordKind | "system" | "manual";
|
|
219
319
|
sourceReferenceId?: string | null;
|
|
220
320
|
metadata: Record<string, unknown>;
|
|
221
321
|
createdAt: string;
|
|
222
322
|
}
|
|
323
|
+
export interface MemoryGraphNode {
|
|
324
|
+
id: string;
|
|
325
|
+
kind: "workspace" | "entity" | "preference" | "guardrail" | "connection" | "resource" | "tool" | "memory";
|
|
326
|
+
label: string;
|
|
327
|
+
summary: string;
|
|
328
|
+
status: "active" | "historical";
|
|
329
|
+
metadata?: Record<string, unknown>;
|
|
330
|
+
}
|
|
331
|
+
export interface MemoryGraphEdge {
|
|
332
|
+
id: string;
|
|
333
|
+
source: string;
|
|
334
|
+
target: string;
|
|
335
|
+
subject?: string;
|
|
336
|
+
object?: string;
|
|
337
|
+
predicate: string;
|
|
338
|
+
summary: string;
|
|
339
|
+
confidence: number;
|
|
340
|
+
status: "active" | "historical";
|
|
341
|
+
validFrom: string;
|
|
342
|
+
validTo: string | null;
|
|
343
|
+
supersededById: string | null;
|
|
344
|
+
sourceKind: TemporalGraphFact["sourceKind"];
|
|
345
|
+
sourceReferenceId: string | null;
|
|
346
|
+
}
|
|
347
|
+
export interface MemoryKnowledgeGraph {
|
|
348
|
+
workspaceId: string;
|
|
349
|
+
workspaceSlug: string;
|
|
350
|
+
namespace: string;
|
|
351
|
+
generatedAt: string;
|
|
352
|
+
query: string | null;
|
|
353
|
+
nodes: MemoryGraphNode[];
|
|
354
|
+
edges: MemoryGraphEdge[];
|
|
355
|
+
activeEdges: MemoryGraphEdge[];
|
|
356
|
+
historicalEdges: MemoryGraphEdge[];
|
|
357
|
+
stats: {
|
|
358
|
+
nodesCount: number;
|
|
359
|
+
activeEdgesCount: number;
|
|
360
|
+
historicalEdgesCount: number;
|
|
361
|
+
memoriesCount: number;
|
|
362
|
+
resourcesCount: number;
|
|
363
|
+
connectionsCount: number;
|
|
364
|
+
};
|
|
365
|
+
mermaid: string;
|
|
366
|
+
explanation: HumanFriendlyExplanation;
|
|
367
|
+
}
|
|
223
368
|
export interface MemoryContextSummary {
|
|
224
369
|
enabled: boolean;
|
|
225
370
|
namespace: string;
|
|
@@ -248,11 +393,15 @@ export interface MemoryContextSummary {
|
|
|
248
393
|
createdAt?: string;
|
|
249
394
|
}>;
|
|
250
395
|
temporalFacts?: TemporalGraphFact[];
|
|
396
|
+
activeDefaults?: Record<string, unknown>;
|
|
397
|
+
autoFilledInput?: Record<string, unknown>;
|
|
398
|
+
activeGuardrails?: string[];
|
|
251
399
|
contextPoisoningScan?: {
|
|
252
400
|
safe: boolean;
|
|
253
401
|
riskLevel: "none" | "low" | "medium" | "high" | "critical";
|
|
254
402
|
findingsCount: number;
|
|
255
403
|
};
|
|
404
|
+
explanation?: HumanFriendlyExplanation;
|
|
256
405
|
}
|
|
257
406
|
export interface WorkspaceMemoryRecord {
|
|
258
407
|
id: string;
|
|
@@ -263,6 +412,7 @@ export interface WorkspaceMemoryRecord {
|
|
|
263
412
|
content: string;
|
|
264
413
|
kind: MemoryRecordKind;
|
|
265
414
|
metadata: Record<string, unknown>;
|
|
415
|
+
fundingSource?: string;
|
|
266
416
|
createdAt: string;
|
|
267
417
|
}
|
|
268
418
|
export interface ByokKeyRecord {
|
|
@@ -313,6 +463,22 @@ export interface SupplierSettlementSummary {
|
|
|
313
463
|
retailToWholesaleCoverageRatio: number;
|
|
314
464
|
};
|
|
315
465
|
}
|
|
466
|
+
export interface HumanHandoffDescriptor {
|
|
467
|
+
required: boolean;
|
|
468
|
+
kind: "none" | "oauth_connection" | "human_approval" | "oauth_and_approval";
|
|
469
|
+
status: "ready" | "awaiting_oauth" | "awaiting_approval" | "awaiting_oauth_and_approval" | "connected" | "approved" | "rejected";
|
|
470
|
+
headline: string;
|
|
471
|
+
markdownForUser: string;
|
|
472
|
+
agentNextToolCall: {
|
|
473
|
+
tool: string;
|
|
474
|
+
arguments: Record<string, unknown>;
|
|
475
|
+
description: string;
|
|
476
|
+
};
|
|
477
|
+
actionUrl: string | null;
|
|
478
|
+
approvalUrl: string | null;
|
|
479
|
+
oauthRedirectUrl: string | null;
|
|
480
|
+
consoleUrl: string;
|
|
481
|
+
}
|
|
316
482
|
export interface ActionPlan {
|
|
317
483
|
id: string;
|
|
318
484
|
workspaceId: string;
|
|
@@ -354,6 +520,27 @@ export interface ExecutionRun {
|
|
|
354
520
|
startedAt: string;
|
|
355
521
|
completedAt: string | null;
|
|
356
522
|
}
|
|
523
|
+
export type AgenticReceiptActionType = "ToolCall" | "ModelInference" | "GpuWorkload" | "RagRetrieval" | "ApiCall" | "DistributedJob";
|
|
524
|
+
export interface PortableAgenticReceipt {
|
|
525
|
+
version: string;
|
|
526
|
+
receipt_id: string;
|
|
527
|
+
agent_id: string;
|
|
528
|
+
task_id: string;
|
|
529
|
+
action_type: AgenticReceiptActionType;
|
|
530
|
+
tool_name: string | null;
|
|
531
|
+
model_id: string | null;
|
|
532
|
+
input_hash: string;
|
|
533
|
+
output_hash: string;
|
|
534
|
+
started_at: string;
|
|
535
|
+
completed_at: string;
|
|
536
|
+
latency_ms: number;
|
|
537
|
+
nonce: string;
|
|
538
|
+
previous_receipt_hash: string | null;
|
|
539
|
+
receipt_hash: string;
|
|
540
|
+
signature_algorithm: "Ed25519";
|
|
541
|
+
public_key_hex: string;
|
|
542
|
+
signature_hex: string;
|
|
543
|
+
}
|
|
357
544
|
export interface ExecutionReceipt {
|
|
358
545
|
id: string;
|
|
359
546
|
runId: string;
|
|
@@ -372,8 +559,10 @@ export interface ExecutionReceipt {
|
|
|
372
559
|
receiptHash: string;
|
|
373
560
|
signature: string;
|
|
374
561
|
decisionRecord?: GovernanceDecisionRecord | null;
|
|
562
|
+
agenticReceipt?: PortableAgenticReceipt | null;
|
|
375
563
|
supplierSettlement?: SupplierSettlement | null;
|
|
376
564
|
issuedAt: string;
|
|
565
|
+
explanation?: HumanFriendlyExplanation;
|
|
377
566
|
}
|
|
378
567
|
export interface LedgerEntry {
|
|
379
568
|
id: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type ConsoleView = "overview" | "setup" | "
|
|
1
|
+
export type ConsoleView = "overview" | "setup" | "activity" | "billing" | "login" | "signup";
|
|
2
2
|
/** Every path that serves the console shell, mapped to the view it opens. */
|
|
3
3
|
export declare const CONSOLE_ROUTES: Readonly<Record<string, ConsoleView>>;
|
|
4
4
|
export declare function isConsolePath(pathname: string): boolean;
|
|
@@ -23,3 +23,12 @@ export interface OAuthConsentOptions {
|
|
|
23
23
|
}
|
|
24
24
|
/** Consent screen for MCP clients (ChatGPT, Claude, CLIs) asking to use a Muxo workspace. */
|
|
25
25
|
export declare function renderOAuthConsentHtml(opts: OAuthConsentOptions): string;
|
|
26
|
+
export interface ApprovalPageOptions {
|
|
27
|
+
planId: string;
|
|
28
|
+
clerk?: {
|
|
29
|
+
publishableKey: string;
|
|
30
|
+
frontendApi: string;
|
|
31
|
+
} | null;
|
|
32
|
+
}
|
|
33
|
+
/** One-click approval screen for plans held by workspace guardrails (`/approve/:planId`). */
|
|
34
|
+
export declare function renderApprovalPageHtml(opts: ApprovalPageOptions): string;
|