@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
package/dist/types.d.ts
CHANGED
|
@@ -1,6 +1,74 @@
|
|
|
1
1
|
export type RiskLevel = "read" | "write" | "admin" | "financial" | "provisioning" | "destructive";
|
|
2
2
|
export type ProviderLane = "composio_sdk" | "composio_instant" | "stripe_projects";
|
|
3
|
-
export type SubscriptionTier = "free" | "starter";
|
|
3
|
+
export type SubscriptionTier = "free" | "starter" | "pro";
|
|
4
|
+
export type SubscriptionStatus = "none" | "active" | "trialing" | "past_due" | "unpaid" | "canceled" | "incomplete" | "comped";
|
|
5
|
+
export interface WorkspaceBilling {
|
|
6
|
+
interval: "month" | "year" | null;
|
|
7
|
+
status: SubscriptionStatus;
|
|
8
|
+
cancelAtPeriodEnd: boolean;
|
|
9
|
+
/** When Stripe next renews or ends the subscription. */
|
|
10
|
+
currentPeriodEnd: string | null;
|
|
11
|
+
/** Monthly usage periods are counted from this moment. */
|
|
12
|
+
usagePeriodAnchor: string;
|
|
13
|
+
usagePeriodStart: string;
|
|
14
|
+
usagePeriodEnd: string;
|
|
15
|
+
/** usagePeriodStart of the last period whose plan credits were granted. */
|
|
16
|
+
creditsGrantedFor: string | null;
|
|
17
|
+
paymentFailedAt?: string | null;
|
|
18
|
+
/** Subscription whose start (fresh usage period and first credits) was already applied. */
|
|
19
|
+
startedSubscriptionId?: string | null;
|
|
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
|
+
brand?: string;
|
|
37
|
+
url: string | null;
|
|
38
|
+
ctaLabel: string;
|
|
39
|
+
headline: string;
|
|
40
|
+
instructions: string;
|
|
41
|
+
markdownForUser?: string;
|
|
42
|
+
planId?: string;
|
|
43
|
+
provider?: string;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Machine-readable guidance for LLM harnesses on exactly which Muxo tool to
|
|
47
|
+
* call next once a handoff or gate clears.
|
|
48
|
+
*/
|
|
49
|
+
export interface LlmGuidance {
|
|
50
|
+
summary: string;
|
|
51
|
+
nextToolCalls: Array<{
|
|
52
|
+
tool: string;
|
|
53
|
+
input: Record<string, unknown>;
|
|
54
|
+
when: string;
|
|
55
|
+
}>;
|
|
56
|
+
}
|
|
57
|
+
export type WorkspaceRole = "owner" | "admin" | "operator" | "member";
|
|
58
|
+
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";
|
|
59
|
+
export type ParameterRuleAction = "block" | "require_approval" | "allow" | "auto_approve";
|
|
60
|
+
export interface ParameterPolicyRule {
|
|
61
|
+
id: string;
|
|
62
|
+
toolPattern?: string;
|
|
63
|
+
parameter: string;
|
|
64
|
+
operator: ParameterRuleOperator;
|
|
65
|
+
value: string | number | string[];
|
|
66
|
+
unit?: "usd" | "cents" | "credits" | "raw";
|
|
67
|
+
action: ParameterRuleAction;
|
|
68
|
+
elseAction?: ParameterRuleAction;
|
|
69
|
+
description: string;
|
|
70
|
+
source?: "deterministic" | "llm" | "mcp_harness" | "user";
|
|
71
|
+
}
|
|
4
72
|
export interface GovernancePolicy {
|
|
5
73
|
mode: "monitor" | "enforce";
|
|
6
74
|
requireApprovalFor: RiskLevel[];
|
|
@@ -8,15 +76,65 @@ export interface GovernancePolicy {
|
|
|
8
76
|
allowProvisioning: boolean;
|
|
9
77
|
maxCreditsPerRun: number;
|
|
10
78
|
blockedToolSlugs?: string[];
|
|
79
|
+
parameterRules?: ParameterPolicyRule[];
|
|
80
|
+
executionRing?: 0 | 1 | 2 | 3;
|
|
81
|
+
killSwitchActive?: boolean;
|
|
82
|
+
killSwitchReason?: string | null;
|
|
83
|
+
blockDestructiveSql?: boolean;
|
|
84
|
+
naturalLanguageRules?: string[];
|
|
85
|
+
languageMode?: LanguageMode;
|
|
86
|
+
customInstructions?: string[];
|
|
11
87
|
}
|
|
12
88
|
export interface User {
|
|
13
89
|
id: string;
|
|
14
90
|
email: string;
|
|
15
91
|
name: string;
|
|
16
92
|
workspaceId: string;
|
|
17
|
-
role:
|
|
93
|
+
role: WorkspaceRole;
|
|
94
|
+
createdAt: string;
|
|
95
|
+
}
|
|
96
|
+
export interface WorkspaceMembership {
|
|
97
|
+
id: string;
|
|
98
|
+
workspaceId: string;
|
|
99
|
+
userId: string;
|
|
100
|
+
role: WorkspaceRole;
|
|
101
|
+
teamName: string | null;
|
|
102
|
+
joinedViaKeyId?: string | null;
|
|
103
|
+
joinedVia?: "owner" | "created" | "api_key" | "team_key" | "invite" | "claim" | string;
|
|
104
|
+
apiKeyId?: string | null;
|
|
105
|
+
createdAt: string;
|
|
106
|
+
}
|
|
107
|
+
export interface WorkspaceSummary {
|
|
108
|
+
id: string;
|
|
109
|
+
name: string;
|
|
110
|
+
slug: string;
|
|
111
|
+
tier: SubscriptionTier;
|
|
112
|
+
creditsBalance: number;
|
|
113
|
+
monthlyActionsUsed: number;
|
|
114
|
+
monthlyActionsLimit: number;
|
|
115
|
+
role: WorkspaceRole;
|
|
116
|
+
teamName: string | null;
|
|
117
|
+
joinedVia?: "owner" | "created" | "api_key" | "team_key" | "invite" | "claim" | string;
|
|
118
|
+
isCurrent: boolean;
|
|
18
119
|
createdAt: string;
|
|
19
120
|
}
|
|
121
|
+
export interface TeamOnboardingKit {
|
|
122
|
+
ok?: boolean;
|
|
123
|
+
mode: "shared_workspace" | "dedicated_workspace";
|
|
124
|
+
workspace: Workspace | Pick<Workspace, "id" | "name" | "slug" | "tier" | "creditsBalance">;
|
|
125
|
+
teamName: string;
|
|
126
|
+
role: WorkspaceRole;
|
|
127
|
+
apiKey: string;
|
|
128
|
+
keyRecord: ApiKeyRecord;
|
|
129
|
+
claimUrl?: string | null;
|
|
130
|
+
consoleUrl?: string;
|
|
131
|
+
consoleJoinUrl?: string;
|
|
132
|
+
mcpEndpoint?: string;
|
|
133
|
+
cliSetupCommand: string;
|
|
134
|
+
mcpConfig?: Record<string, unknown>;
|
|
135
|
+
mcpConfigSnippet?: string;
|
|
136
|
+
instructions: string[];
|
|
137
|
+
}
|
|
20
138
|
export interface Workspace {
|
|
21
139
|
id: string;
|
|
22
140
|
name: string;
|
|
@@ -28,6 +146,8 @@ export interface Workspace {
|
|
|
28
146
|
creditsBalance: number;
|
|
29
147
|
stripeCustomerId: string | null;
|
|
30
148
|
stripeSubscriptionId: string | null;
|
|
149
|
+
stripeConnectedAccountId?: string | null;
|
|
150
|
+
billing?: WorkspaceBilling;
|
|
31
151
|
projectsEnvName: string;
|
|
32
152
|
policy: GovernancePolicy;
|
|
33
153
|
createdAt: string;
|
|
@@ -40,6 +160,9 @@ export interface ApiKeyRecord {
|
|
|
40
160
|
keyPrefix: string;
|
|
41
161
|
environment: "live" | "test";
|
|
42
162
|
scopes: string[];
|
|
163
|
+
teamName?: string | null;
|
|
164
|
+
role?: WorkspaceRole;
|
|
165
|
+
createdByEmail?: string | null;
|
|
43
166
|
lastUsedAt: string | null;
|
|
44
167
|
revokedAt: string | null;
|
|
45
168
|
createdAt: string;
|
|
@@ -56,7 +179,7 @@ export interface MuxoTool {
|
|
|
56
179
|
riskLevel: RiskLevel;
|
|
57
180
|
requiresAuth: boolean;
|
|
58
181
|
creditCost: number;
|
|
59
|
-
billingMode: "customer_oauth" | "provider_wallet" | "resource_provisioning";
|
|
182
|
+
billingMode: "customer_oauth" | "customer_byok" | "provider_wallet" | "resource_provisioning";
|
|
60
183
|
inputSchema: Record<string, unknown>;
|
|
61
184
|
llmContextUrl?: string;
|
|
62
185
|
providerUrl?: string;
|
|
@@ -126,15 +249,128 @@ export interface GovernanceDecisionRecord {
|
|
|
126
249
|
previousHash: string;
|
|
127
250
|
chainVerified: boolean;
|
|
128
251
|
};
|
|
252
|
+
protocolFacets?: {
|
|
253
|
+
sql?: {
|
|
254
|
+
verb: string;
|
|
255
|
+
target: string;
|
|
256
|
+
tables: string;
|
|
257
|
+
functions: string;
|
|
258
|
+
destructive?: boolean;
|
|
259
|
+
};
|
|
260
|
+
k8s?: {
|
|
261
|
+
verb: string;
|
|
262
|
+
resource: string;
|
|
263
|
+
namespace: string;
|
|
264
|
+
name: string;
|
|
265
|
+
subresource: string;
|
|
266
|
+
};
|
|
267
|
+
infra?: {
|
|
268
|
+
provider: string;
|
|
269
|
+
service: string;
|
|
270
|
+
action: string;
|
|
271
|
+
destructive: boolean;
|
|
272
|
+
};
|
|
273
|
+
};
|
|
274
|
+
ringEnforcement?: {
|
|
275
|
+
agentRing: number;
|
|
276
|
+
requiredRing: number;
|
|
277
|
+
allowed: boolean;
|
|
278
|
+
ringLabel: string;
|
|
279
|
+
};
|
|
280
|
+
trustScore?: {
|
|
281
|
+
overall: number;
|
|
282
|
+
tier: "Untrusted" | "Provisional" | "Trusted" | "Verified";
|
|
283
|
+
reliability: number;
|
|
284
|
+
consistency: number;
|
|
285
|
+
};
|
|
286
|
+
contextPoisoning?: {
|
|
287
|
+
safe: boolean;
|
|
288
|
+
riskLevel: "none" | "low" | "medium" | "high" | "critical";
|
|
289
|
+
findingsCount: number;
|
|
290
|
+
findings: Array<{
|
|
291
|
+
patternId: string;
|
|
292
|
+
patternName: string;
|
|
293
|
+
severity: string;
|
|
294
|
+
description: string;
|
|
295
|
+
}>;
|
|
296
|
+
};
|
|
297
|
+
killSwitch?: {
|
|
298
|
+
active: boolean;
|
|
299
|
+
killedAt?: string | null;
|
|
300
|
+
reason?: string | null;
|
|
301
|
+
};
|
|
129
302
|
ed25519Signature: string;
|
|
130
303
|
signature: string;
|
|
131
304
|
bindingHash: string;
|
|
132
305
|
decidedAt: string;
|
|
306
|
+
explanation?: HumanFriendlyExplanation;
|
|
133
307
|
}
|
|
134
308
|
export type MemoryRecordKind = "fact" | "preference" | "resource_note" | "operator_note" | "execution_outcome" | "resource_topology" | "policy_decision";
|
|
309
|
+
export interface TemporalGraphFact {
|
|
310
|
+
id: string;
|
|
311
|
+
workspaceId: string;
|
|
312
|
+
subject: string;
|
|
313
|
+
predicate: string;
|
|
314
|
+
object: string;
|
|
315
|
+
summary: string;
|
|
316
|
+
confidence: number;
|
|
317
|
+
validFrom: string;
|
|
318
|
+
validTo: string | null;
|
|
319
|
+
supersededById?: string | null;
|
|
320
|
+
sourceKind: MemoryRecordKind | "system" | "manual";
|
|
321
|
+
sourceReferenceId?: string | null;
|
|
322
|
+
metadata: Record<string, unknown>;
|
|
323
|
+
createdAt: string;
|
|
324
|
+
}
|
|
325
|
+
export interface MemoryGraphNode {
|
|
326
|
+
id: string;
|
|
327
|
+
kind: "workspace" | "entity" | "preference" | "guardrail" | "connection" | "resource" | "tool" | "memory";
|
|
328
|
+
label: string;
|
|
329
|
+
summary: string;
|
|
330
|
+
status: "active" | "historical";
|
|
331
|
+
metadata?: Record<string, unknown>;
|
|
332
|
+
}
|
|
333
|
+
export interface MemoryGraphEdge {
|
|
334
|
+
id: string;
|
|
335
|
+
source: string;
|
|
336
|
+
target: string;
|
|
337
|
+
subject?: string;
|
|
338
|
+
object?: string;
|
|
339
|
+
predicate: string;
|
|
340
|
+
summary: string;
|
|
341
|
+
confidence: number;
|
|
342
|
+
status: "active" | "historical";
|
|
343
|
+
validFrom: string;
|
|
344
|
+
validTo: string | null;
|
|
345
|
+
supersededById: string | null;
|
|
346
|
+
sourceKind: TemporalGraphFact["sourceKind"];
|
|
347
|
+
sourceReferenceId: string | null;
|
|
348
|
+
}
|
|
349
|
+
export interface MemoryKnowledgeGraph {
|
|
350
|
+
workspaceId: string;
|
|
351
|
+
workspaceSlug: string;
|
|
352
|
+
namespace: string;
|
|
353
|
+
generatedAt: string;
|
|
354
|
+
query: string | null;
|
|
355
|
+
nodes: MemoryGraphNode[];
|
|
356
|
+
edges: MemoryGraphEdge[];
|
|
357
|
+
activeEdges: MemoryGraphEdge[];
|
|
358
|
+
historicalEdges: MemoryGraphEdge[];
|
|
359
|
+
stats: {
|
|
360
|
+
nodesCount: number;
|
|
361
|
+
activeEdgesCount: number;
|
|
362
|
+
historicalEdgesCount: number;
|
|
363
|
+
memoriesCount: number;
|
|
364
|
+
resourcesCount: number;
|
|
365
|
+
connectionsCount: number;
|
|
366
|
+
};
|
|
367
|
+
mermaid: string;
|
|
368
|
+
explanation: HumanFriendlyExplanation;
|
|
369
|
+
}
|
|
135
370
|
export interface MemoryContextSummary {
|
|
136
371
|
enabled: boolean;
|
|
137
372
|
namespace: string;
|
|
373
|
+
fundingSource?: "muxo_funded" | "customer_byok_supermemory" | "local_fallback";
|
|
138
374
|
staticFacts: string[];
|
|
139
375
|
dynamicContext: string[];
|
|
140
376
|
recalledMemories: Array<{
|
|
@@ -145,6 +381,7 @@ export interface MemoryContextSummary {
|
|
|
145
381
|
createdAt?: string;
|
|
146
382
|
}>;
|
|
147
383
|
formattedPromptContext: string;
|
|
384
|
+
profileMarkdown?: string;
|
|
148
385
|
profile: {
|
|
149
386
|
static: string[];
|
|
150
387
|
dynamic: string[];
|
|
@@ -157,6 +394,16 @@ export interface MemoryContextSummary {
|
|
|
157
394
|
similarity: number;
|
|
158
395
|
createdAt?: string;
|
|
159
396
|
}>;
|
|
397
|
+
temporalFacts?: TemporalGraphFact[];
|
|
398
|
+
activeDefaults?: Record<string, unknown>;
|
|
399
|
+
autoFilledInput?: Record<string, unknown>;
|
|
400
|
+
activeGuardrails?: string[];
|
|
401
|
+
contextPoisoningScan?: {
|
|
402
|
+
safe: boolean;
|
|
403
|
+
riskLevel: "none" | "low" | "medium" | "high" | "critical";
|
|
404
|
+
findingsCount: number;
|
|
405
|
+
};
|
|
406
|
+
explanation?: HumanFriendlyExplanation;
|
|
160
407
|
}
|
|
161
408
|
export interface WorkspaceMemoryRecord {
|
|
162
409
|
id: string;
|
|
@@ -167,6 +414,7 @@ export interface WorkspaceMemoryRecord {
|
|
|
167
414
|
content: string;
|
|
168
415
|
kind: MemoryRecordKind;
|
|
169
416
|
metadata: Record<string, unknown>;
|
|
417
|
+
fundingSource?: string;
|
|
170
418
|
createdAt: string;
|
|
171
419
|
}
|
|
172
420
|
export interface ByokKeyRecord {
|
|
@@ -209,6 +457,29 @@ export interface SupplierSettlementSummary {
|
|
|
209
457
|
supplierWholesalePaidCents: number;
|
|
210
458
|
muxoNetMarginCents: number;
|
|
211
459
|
}>;
|
|
460
|
+
masterWalletProtection?: {
|
|
461
|
+
status: "healthy" | "failover_active";
|
|
462
|
+
zeroChargeOnFailure: boolean;
|
|
463
|
+
instantFailoverMode: "zero_cost_native_edge";
|
|
464
|
+
paidProvisioningPolicy: "muxo_master_wallet_or_customer_stripe_byok";
|
|
465
|
+
retailToWholesaleCoverageRatio: number;
|
|
466
|
+
};
|
|
467
|
+
}
|
|
468
|
+
export interface HumanHandoffDescriptor {
|
|
469
|
+
required: boolean;
|
|
470
|
+
kind: "none" | "oauth_connection" | "human_approval" | "oauth_and_approval";
|
|
471
|
+
status: "ready" | "awaiting_oauth" | "awaiting_approval" | "awaiting_oauth_and_approval" | "connected" | "approved" | "rejected";
|
|
472
|
+
headline: string;
|
|
473
|
+
markdownForUser: string;
|
|
474
|
+
agentNextToolCall: {
|
|
475
|
+
tool: string;
|
|
476
|
+
arguments: Record<string, unknown>;
|
|
477
|
+
description: string;
|
|
478
|
+
};
|
|
479
|
+
actionUrl: string | null;
|
|
480
|
+
approvalUrl: string | null;
|
|
481
|
+
oauthRedirectUrl: string | null;
|
|
482
|
+
consoleUrl: string;
|
|
212
483
|
}
|
|
213
484
|
export interface ActionPlan {
|
|
214
485
|
id: string;
|
|
@@ -228,6 +499,19 @@ export interface ActionPlan {
|
|
|
228
499
|
decisionRecord?: GovernanceDecisionRecord | null;
|
|
229
500
|
memoryContext?: MemoryContextSummary | null;
|
|
230
501
|
supplierSettlement?: SupplierSettlement | null;
|
|
502
|
+
surfaceVersion?: string;
|
|
503
|
+
surfaceAudience?: string;
|
|
504
|
+
surfaceConnectionId?: string | null;
|
|
505
|
+
surfaceContext?: Array<{
|
|
506
|
+
recordId: string;
|
|
507
|
+
revision: number;
|
|
508
|
+
contentHash: string;
|
|
509
|
+
}>;
|
|
510
|
+
surfaceFunding?: {
|
|
511
|
+
resource_id: string;
|
|
512
|
+
mode: "customer_funded" | "muxo_funded";
|
|
513
|
+
} | null;
|
|
514
|
+
surfaceOperationId?: string;
|
|
231
515
|
createdAt: string;
|
|
232
516
|
expiresAt: string;
|
|
233
517
|
}
|
|
@@ -243,6 +527,7 @@ export interface ExecutionRun {
|
|
|
243
527
|
input: Record<string, unknown>;
|
|
244
528
|
output: Record<string, unknown> | null;
|
|
245
529
|
error: string | null;
|
|
530
|
+
errorMessage?: string | null;
|
|
246
531
|
actionsMetered: number;
|
|
247
532
|
creditsMetered: number;
|
|
248
533
|
durationMs: number | null;
|
|
@@ -250,6 +535,27 @@ export interface ExecutionRun {
|
|
|
250
535
|
startedAt: string;
|
|
251
536
|
completedAt: string | null;
|
|
252
537
|
}
|
|
538
|
+
export type AgenticReceiptActionType = "ToolCall" | "ModelInference" | "GpuWorkload" | "RagRetrieval" | "ApiCall" | "DistributedJob";
|
|
539
|
+
export interface PortableAgenticReceipt {
|
|
540
|
+
version: string;
|
|
541
|
+
receipt_id: string;
|
|
542
|
+
agent_id: string;
|
|
543
|
+
task_id: string;
|
|
544
|
+
action_type: AgenticReceiptActionType;
|
|
545
|
+
tool_name: string | null;
|
|
546
|
+
model_id: string | null;
|
|
547
|
+
input_hash: string;
|
|
548
|
+
output_hash: string;
|
|
549
|
+
started_at: string;
|
|
550
|
+
completed_at: string;
|
|
551
|
+
latency_ms: number;
|
|
552
|
+
nonce: string;
|
|
553
|
+
previous_receipt_hash: string | null;
|
|
554
|
+
receipt_hash: string;
|
|
555
|
+
signature_algorithm: "Ed25519";
|
|
556
|
+
public_key_hex: string;
|
|
557
|
+
signature_hex: string;
|
|
558
|
+
}
|
|
253
559
|
export interface ExecutionReceipt {
|
|
254
560
|
id: string;
|
|
255
561
|
runId: string;
|
|
@@ -268,13 +574,15 @@ export interface ExecutionReceipt {
|
|
|
268
574
|
receiptHash: string;
|
|
269
575
|
signature: string;
|
|
270
576
|
decisionRecord?: GovernanceDecisionRecord | null;
|
|
577
|
+
agenticReceipt?: PortableAgenticReceipt | null;
|
|
271
578
|
supplierSettlement?: SupplierSettlement | null;
|
|
272
579
|
issuedAt: string;
|
|
580
|
+
explanation?: HumanFriendlyExplanation;
|
|
273
581
|
}
|
|
274
582
|
export interface LedgerEntry {
|
|
275
583
|
id: string;
|
|
276
584
|
workspaceId: string;
|
|
277
|
-
kind: "plan_grant" | "credit_topup" | "run_deduction" | "subscription_upgrade" | "manual_adjustment";
|
|
585
|
+
kind: "plan_grant" | "credit_topup" | "run_deduction" | "subscription_upgrade" | "plan_change" | "refund" | "manual_adjustment";
|
|
278
586
|
actionsDelta: number;
|
|
279
587
|
creditsDelta: number;
|
|
280
588
|
balanceAfter: number;
|
|
@@ -1,2 +1,64 @@
|
|
|
1
|
+
export type ConsoleView = "overview" | "catalog" | "setup" | "workspaces" | "activity" | "billing" | "login" | "signup";
|
|
2
|
+
/** Every path that serves the console shell, mapped to the view it opens. */
|
|
3
|
+
export declare const CONSOLE_ROUTES: Readonly<Record<string, ConsoleView>>;
|
|
4
|
+
export declare function isConsolePath(pathname: string): boolean;
|
|
1
5
|
export declare function renderConsoleHtml(): string;
|
|
2
6
|
export declare function renderLandingHtml(): string;
|
|
7
|
+
export interface OAuthConsentOptions {
|
|
8
|
+
error?: string;
|
|
9
|
+
clientName?: string;
|
|
10
|
+
redirectOrigin?: string;
|
|
11
|
+
clerk?: {
|
|
12
|
+
publishableKey: string;
|
|
13
|
+
frontendApi: string;
|
|
14
|
+
} | null;
|
|
15
|
+
request?: Record<string, string>;
|
|
16
|
+
/** Renders the workspace-claim variant, which posts to `action` instead of /oauth/authorize. */
|
|
17
|
+
claim?: {
|
|
18
|
+
workspaceName: string;
|
|
19
|
+
targetEmail: string;
|
|
20
|
+
action: string;
|
|
21
|
+
cancelUrl: string;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
/** Consent screen for MCP clients (ChatGPT, Claude, CLIs) asking to use a Muxo workspace. */
|
|
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;
|
|
35
|
+
export interface OAuthConnectPageField {
|
|
36
|
+
name: string;
|
|
37
|
+
type?: string;
|
|
38
|
+
label?: string;
|
|
39
|
+
description?: string;
|
|
40
|
+
required?: boolean;
|
|
41
|
+
default?: string | null;
|
|
42
|
+
}
|
|
43
|
+
export interface OAuthConnectPageOptions {
|
|
44
|
+
token: string;
|
|
45
|
+
toolkitSlug: string;
|
|
46
|
+
toolkitName: string;
|
|
47
|
+
workspaceId?: string;
|
|
48
|
+
authMode?: string;
|
|
49
|
+
status?: string;
|
|
50
|
+
callbackUrl?: string | null;
|
|
51
|
+
expectedInputFields?: OAuthConnectPageField[];
|
|
52
|
+
error?: string | null;
|
|
53
|
+
}
|
|
54
|
+
/** Muxo-branded OAuth connection handoff screen (`/oauth/connect/:token`). */
|
|
55
|
+
export declare function renderOAuthConnectPageHtml(opts: OAuthConnectPageOptions): string;
|
|
56
|
+
export interface OAuthCallbackPageOptions {
|
|
57
|
+
providerSlug: string;
|
|
58
|
+
providerName: string;
|
|
59
|
+
status: string;
|
|
60
|
+
workspaceId: string;
|
|
61
|
+
externalAccountId?: string | null;
|
|
62
|
+
}
|
|
63
|
+
/** Muxo-branded OAuth callback completion screen (`/oauth/callback`). */
|
|
64
|
+
export declare function renderOAuthCallbackPageHtml(opts: OAuthCallbackPageOptions): string;
|