@muxoai/platform 1.3.3 → 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 +7 -5
- package/dist/cli.js +393 -13
- 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 +538 -8
- package/dist/sdk.js +377 -10
- package/dist/server.js +1841 -232
- package/dist/store.d.ts +113 -6
- package/dist/store.js +675 -52
- package/dist/types.d.ts +212 -5
- package/dist/ui/console-html.d.ts +10 -1
- package/dist/ui/console-html.js +1188 -462
- 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
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/** Cloud provisioning pipeline modelled on Cloudflare Workflows primitives, shared by the Node engine and the edge worker. */
|
|
2
|
+
import { MuxoToolError } from "./mcp-schema.js";
|
|
3
|
+
export const WORKFLOW_RESOURCE_COMPLETED_EVENT = "v2.provisioning.resource.completed";
|
|
4
|
+
export function workflowNotFoundError(workflowId) {
|
|
5
|
+
return new MuxoToolError(`Durable workflow not found: ${workflowId}`, {
|
|
6
|
+
code: "workflow_not_found",
|
|
7
|
+
statusCode: 404,
|
|
8
|
+
payload: { workflowId },
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
export function normalizeWorkflowTarget(params) {
|
|
12
|
+
return {
|
|
13
|
+
provider: (params.provider || "neon").toLowerCase().trim(),
|
|
14
|
+
serviceRef: (params.serviceRef || "postgres").toLowerCase().trim(),
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export function createCloudProvisioningWorkflow(params) {
|
|
18
|
+
const now = new Date().toISOString();
|
|
19
|
+
return {
|
|
20
|
+
id: params.id,
|
|
21
|
+
workspaceId: params.workspaceId,
|
|
22
|
+
workflowType: "cloud_provisioning_pipeline",
|
|
23
|
+
status: "waiting_for_event",
|
|
24
|
+
provider: params.provider,
|
|
25
|
+
serviceRef: params.serviceRef,
|
|
26
|
+
resourceId: params.resourceId,
|
|
27
|
+
steps: [
|
|
28
|
+
{
|
|
29
|
+
name: "check_stripe_v2_eligibility",
|
|
30
|
+
primitive: "step.do",
|
|
31
|
+
status: "completed",
|
|
32
|
+
output: { status: "eligible", apiVersion: params.apiVersion || "2026-09-30.preview" },
|
|
33
|
+
completedAt: now,
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
name: "ensure_payment_profile_and_provider_connection",
|
|
37
|
+
primitive: "step.do",
|
|
38
|
+
status: "completed",
|
|
39
|
+
output: { provider: params.provider, paymentProfileStatus: "active" },
|
|
40
|
+
completedAt: now,
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: "create_v2_provisioning_resource",
|
|
44
|
+
primitive: "step.do",
|
|
45
|
+
status: "completed",
|
|
46
|
+
output: {
|
|
47
|
+
resourceId: params.resourceId,
|
|
48
|
+
provider: params.provider,
|
|
49
|
+
service_ref: params.serviceRef,
|
|
50
|
+
region: params.region || "aws-us-east-1",
|
|
51
|
+
},
|
|
52
|
+
completedAt: now,
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: "wait_for_v2_provisioning_resource_completed",
|
|
56
|
+
primitive: "step.waitForEvent",
|
|
57
|
+
status: "waiting",
|
|
58
|
+
output: { expectedEvent: WORKFLOW_RESOURCE_COMPLETED_EVENT, resourceId: params.resourceId },
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: "reveal_access_configuration_and_seal_vault",
|
|
62
|
+
primitive: "step.do",
|
|
63
|
+
status: "pending",
|
|
64
|
+
},
|
|
65
|
+
],
|
|
66
|
+
createdAt: now,
|
|
67
|
+
updatedAt: now,
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
/** Completes every outstanding step once the resource-completed event (or a manual advance) arrives. */
|
|
71
|
+
export function completeCloudProvisioningWorkflow(wf, params) {
|
|
72
|
+
const now = new Date().toISOString();
|
|
73
|
+
for (const step of wf.steps) {
|
|
74
|
+
if (step.status === "completed")
|
|
75
|
+
continue;
|
|
76
|
+
step.status = "completed";
|
|
77
|
+
step.completedAt = now;
|
|
78
|
+
if (step.name === "reveal_access_configuration_and_seal_vault") {
|
|
79
|
+
step.output = {
|
|
80
|
+
vaultEncrypted: true,
|
|
81
|
+
cipher: "AES-256-GCM",
|
|
82
|
+
secretKeys: params.secretKeys,
|
|
83
|
+
triggerEvent: params.triggerEvent || WORKFLOW_RESOURCE_COMPLETED_EVENT,
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
wf.status = "completed";
|
|
88
|
+
wf.updatedAt = now;
|
|
89
|
+
return wf;
|
|
90
|
+
}
|
package/dist/engine.d.ts
CHANGED
|
@@ -1,13 +1,37 @@
|
|
|
1
1
|
import type { MuxoConfig } from "./config.js";
|
|
2
|
+
import { type DurableWorkflow } from "./durable-workflow.js";
|
|
2
3
|
import { type NaturalLanguageResolution } from "./nl.js";
|
|
4
|
+
import { describePolicyInPlainEnglish, type GuardrailCompileOptions, type ParsedNaturalLanguageGuardrail } from "./policy.js";
|
|
3
5
|
import { ComposioInstantAdapter } from "./providers/composio-instant.js";
|
|
4
6
|
import { ComposioSdkAdapter } from "./providers/composio-sdk.js";
|
|
5
7
|
import { MicrosoftGovernanceAdapter } from "./providers/microsoft-governance.js";
|
|
6
8
|
import { StripeBillingAdapter } from "./providers/stripe-billing.js";
|
|
7
9
|
import { StripeProjectsAdapter } from "./providers/stripe-projects.js";
|
|
8
|
-
import { SupermemoryAdapter } from "./providers/supermemory.js";
|
|
10
|
+
import { SupermemoryAdapter, type ActiveMemoryDefaults } from "./providers/supermemory.js";
|
|
9
11
|
import type { MuxoStore } from "./store.js";
|
|
10
|
-
import type { ActionPlan, ConnectionRecord, ExecutionReceipt, ExecutionRun, GovernanceDecisionRecord, MemoryContextSummary, MuxoTool, ProviderLane, RiskLevel, User, Workspace, WorkspaceMemoryRecord } from "./types.js";
|
|
12
|
+
import type { ActionPlan, ConnectionRecord, ExecutionReceipt, ExecutionRun, GovernanceDecisionRecord, HumanFriendlyExplanation, HumanHandoff, LanguageMode, LlmGuidance, MemoryContextSummary, MemoryKnowledgeGraph, MuxoTool, PortableAgenticReceipt, ProviderLane, RiskLevel, User, Workspace, WorkspaceMemoryRecord } from "./types.js";
|
|
13
|
+
export type RunContextPayload = {
|
|
14
|
+
workspaceId: string;
|
|
15
|
+
workspaceSlug: string;
|
|
16
|
+
projectsEnvironment: string;
|
|
17
|
+
policy: Workspace["policy"];
|
|
18
|
+
plainEnglishPolicy: ReturnType<typeof describePolicyInPlainEnglish>;
|
|
19
|
+
languageMode: LanguageMode;
|
|
20
|
+
customInstructions: string[];
|
|
21
|
+
activeDefaults: ActiveMemoryDefaults;
|
|
22
|
+
activeGuardrails: string[];
|
|
23
|
+
creditsBalance: number;
|
|
24
|
+
monthlyActionsRemaining: number;
|
|
25
|
+
provisionedResources: ReturnType<MuxoStore["listResources"]>;
|
|
26
|
+
environmentVariablesRedacted: Record<string, string>;
|
|
27
|
+
supermemoryBrain: MemoryContextSummary;
|
|
28
|
+
temporalFacts: NonNullable<MemoryContextSummary["temporalFacts"]>;
|
|
29
|
+
governance: ReturnType<MicrosoftGovernanceAdapter["getStatus"]>;
|
|
30
|
+
trustScore: ReturnType<MicrosoftGovernanceAdapter["getWorkspaceTrustScore"]>;
|
|
31
|
+
llmSystemPrompt: string;
|
|
32
|
+
explanation: HumanFriendlyExplanation;
|
|
33
|
+
envPullHint: string;
|
|
34
|
+
};
|
|
11
35
|
export interface ExecutionContext {
|
|
12
36
|
user: User;
|
|
13
37
|
workspace: Workspace;
|
|
@@ -23,6 +47,7 @@ export declare class MuxoEngine {
|
|
|
23
47
|
readonly stripeBilling: StripeBillingAdapter;
|
|
24
48
|
readonly governance: MicrosoftGovernanceAdapter;
|
|
25
49
|
readonly supermemory: SupermemoryAdapter;
|
|
50
|
+
private readonly durableWorkflows;
|
|
26
51
|
constructor(config: MuxoConfig, store: MuxoStore);
|
|
27
52
|
getProfile(ctx: ExecutionContext): Record<string, unknown>;
|
|
28
53
|
getOrganization(ctx: ExecutionContext): Record<string, unknown>;
|
|
@@ -54,11 +79,16 @@ export declare class MuxoEngine {
|
|
|
54
79
|
timeoutSeconds?: number;
|
|
55
80
|
pollIntervalMs?: number;
|
|
56
81
|
}): Promise<{
|
|
82
|
+
ok: true;
|
|
57
83
|
connected: boolean;
|
|
84
|
+
ready: boolean;
|
|
85
|
+
timedOut: boolean;
|
|
58
86
|
provider: string;
|
|
59
87
|
status: ConnectionRecord["status"];
|
|
60
88
|
connection: ConnectionRecord;
|
|
61
89
|
redirectUrl: string | null;
|
|
90
|
+
polledAttempts: number;
|
|
91
|
+
elapsedMs: number;
|
|
62
92
|
message: string;
|
|
63
93
|
}>;
|
|
64
94
|
handleOAuthCallback(params: {
|
|
@@ -92,17 +122,46 @@ export declare class MuxoEngine {
|
|
|
92
122
|
externalAccountId: string | null;
|
|
93
123
|
instructions: string;
|
|
94
124
|
};
|
|
125
|
+
humanHandoff?: HumanHandoff;
|
|
126
|
+
llmGuidance: LlmGuidance;
|
|
95
127
|
nextStep: string;
|
|
96
128
|
}>;
|
|
97
129
|
getPlan(ctx: ExecutionContext, planId: string): ActionPlan;
|
|
130
|
+
waitForPlanApproval(ctx: ExecutionContext, params: {
|
|
131
|
+
planId: string;
|
|
132
|
+
timeoutSeconds?: number;
|
|
133
|
+
pollIntervalMs?: number;
|
|
134
|
+
}): Promise<{
|
|
135
|
+
ok: true;
|
|
136
|
+
approved: boolean;
|
|
137
|
+
rejected: boolean;
|
|
138
|
+
timedOut: boolean;
|
|
139
|
+
waitedForApproval: true;
|
|
140
|
+
approvalStatus: ActionPlan["approvalStatus"];
|
|
141
|
+
approvalUrl: string;
|
|
142
|
+
waitedMs: number;
|
|
143
|
+
plan: ActionPlan;
|
|
144
|
+
}>;
|
|
98
145
|
approvePlan(ctx: ExecutionContext, planId: string, decision?: "approved" | "rejected"): ActionPlan;
|
|
146
|
+
private buildApprovalHandoff;
|
|
147
|
+
private buildOAuthHandoff;
|
|
148
|
+
private buildPlanLlmGuidance;
|
|
99
149
|
private enrichMemoryContext;
|
|
100
|
-
getRunContext(ctx: ExecutionContext, query?: string): Promise<
|
|
150
|
+
getRunContext(ctx: ExecutionContext, query?: string): Promise<{
|
|
151
|
+
explanation: HumanFriendlyExplanation;
|
|
152
|
+
plainEnglishPolicy: ReturnType<typeof describePolicyInPlainEnglish>;
|
|
153
|
+
activeDefaults: ActiveMemoryDefaults;
|
|
154
|
+
activeGuardrails: string[];
|
|
155
|
+
[key: string]: unknown;
|
|
156
|
+
}>;
|
|
101
157
|
getMemoryOverview(ctx: ExecutionContext, query?: string): Promise<{
|
|
102
158
|
enabled: boolean;
|
|
103
159
|
namespace: string;
|
|
104
160
|
fundingSource: string;
|
|
105
161
|
context: MemoryContextSummary;
|
|
162
|
+
activeDefaults: ActiveMemoryDefaults;
|
|
163
|
+
activeGuardrails: string[];
|
|
164
|
+
explanation: HumanFriendlyExplanation;
|
|
106
165
|
recentMemories: WorkspaceMemoryRecord[];
|
|
107
166
|
memories: WorkspaceMemoryRecord[];
|
|
108
167
|
temporalFacts: ReturnType<MuxoStore["listTemporalFacts"]>;
|
|
@@ -129,6 +188,11 @@ export declare class MuxoEngine {
|
|
|
129
188
|
deletedMemories: WorkspaceMemoryRecord[];
|
|
130
189
|
invalidatedFacts: ReturnType<MuxoStore["listTemporalFacts"]>;
|
|
131
190
|
}>;
|
|
191
|
+
/**
|
|
192
|
+
* Synthesizes a Bi-Temporal Knowledge Graph (entities, active relationships, superseded historical relationships,
|
|
193
|
+
* Mermaid diagram, and human + technical explanations) directly from SQLite temporal_facts, memories, resources, and connections.
|
|
194
|
+
*/
|
|
195
|
+
getMemoryGraph(ctx: ExecutionContext, query?: string): Promise<MemoryKnowledgeGraph>;
|
|
132
196
|
activateWorkspaceKillSwitch(ctx: ExecutionContext, params: {
|
|
133
197
|
reason: string;
|
|
134
198
|
action?: "terminate" | "quarantine" | "suspend";
|
|
@@ -140,14 +204,113 @@ export declare class MuxoEngine {
|
|
|
140
204
|
}>;
|
|
141
205
|
getRun(ctx: ExecutionContext, runId: string): ExecutionRun;
|
|
142
206
|
cancelRun(ctx: ExecutionContext, runId: string, reason?: string): {
|
|
207
|
+
ok: true;
|
|
208
|
+
cancelled: true;
|
|
209
|
+
alreadyCancelled: boolean;
|
|
210
|
+
previousStatus: ExecutionRun["status"];
|
|
143
211
|
run: ExecutionRun;
|
|
144
|
-
receipt: ExecutionReceipt
|
|
212
|
+
receipt: ExecutionReceipt;
|
|
213
|
+
signatureValid: boolean;
|
|
214
|
+
message: string;
|
|
145
215
|
};
|
|
216
|
+
explainReceipt(receipt: ExecutionReceipt, verification: {
|
|
217
|
+
signatureValid: boolean;
|
|
218
|
+
governanceSignatureValid: boolean;
|
|
219
|
+
agenticReceiptValid?: boolean;
|
|
220
|
+
}, policy?: Partial<Workspace["policy"]> | null, languageMode?: LanguageMode): HumanFriendlyExplanation;
|
|
146
221
|
getReceipt(ctx: ExecutionContext, receiptOrRunId: string): {
|
|
147
222
|
receipt: ExecutionReceipt;
|
|
223
|
+
agenticReceipt: PortableAgenticReceipt;
|
|
148
224
|
signatureValid: boolean;
|
|
149
225
|
governanceSignatureValid: boolean;
|
|
226
|
+
agenticReceiptValid: boolean;
|
|
227
|
+
explanation: HumanFriendlyExplanation;
|
|
228
|
+
};
|
|
229
|
+
listReceipts(ctx: ExecutionContext, limit?: number): {
|
|
230
|
+
receipts: Array<ExecutionReceipt & {
|
|
231
|
+
agenticReceipt: PortableAgenticReceipt;
|
|
232
|
+
signatureValid: boolean;
|
|
233
|
+
governanceSignatureValid: boolean;
|
|
234
|
+
agenticReceiptValid: boolean;
|
|
235
|
+
explanation: HumanFriendlyExplanation;
|
|
236
|
+
}>;
|
|
237
|
+
total: number;
|
|
238
|
+
explanation: HumanFriendlyExplanation;
|
|
150
239
|
};
|
|
240
|
+
/**
|
|
241
|
+
* Verifies the entire cryptographic receipt chain (`prevReceiptHash` -> `receiptHash`,
|
|
242
|
+
* HMAC vault signatures, Ed25519 Governance DecisionRecords, and portable Ed25519 AgenticReceipts).
|
|
243
|
+
*/
|
|
244
|
+
verifyReceiptChain(ctx: ExecutionContext, limit?: number): {
|
|
245
|
+
ok: true;
|
|
246
|
+
valid: boolean;
|
|
247
|
+
workspaceId: string;
|
|
248
|
+
agentDid: string;
|
|
249
|
+
publicKeyHex: string;
|
|
250
|
+
chainValid: boolean;
|
|
251
|
+
hashLinksValid: boolean;
|
|
252
|
+
allHmacValid: boolean;
|
|
253
|
+
allEd25519AgenticValid: boolean;
|
|
254
|
+
allGovernanceValid: boolean;
|
|
255
|
+
totalReceipts: number;
|
|
256
|
+
totalChecked: number;
|
|
257
|
+
validCount: number;
|
|
258
|
+
brokenLinks: Array<{
|
|
259
|
+
receiptId: string;
|
|
260
|
+
runId: string;
|
|
261
|
+
reason: string;
|
|
262
|
+
}>;
|
|
263
|
+
genesisHash: string;
|
|
264
|
+
headReceiptHash: string;
|
|
265
|
+
links: Array<{
|
|
266
|
+
index: number;
|
|
267
|
+
receiptId: string;
|
|
268
|
+
runId: string;
|
|
269
|
+
toolSlug: string;
|
|
270
|
+
prevReceiptHash: string;
|
|
271
|
+
receiptHash: string;
|
|
272
|
+
hashLinkValid: boolean;
|
|
273
|
+
hmacValid: boolean;
|
|
274
|
+
ed25519AgenticValid: boolean;
|
|
275
|
+
governanceValid: boolean;
|
|
276
|
+
issuedAt: string;
|
|
277
|
+
}>;
|
|
278
|
+
explanation: HumanFriendlyExplanation;
|
|
279
|
+
};
|
|
280
|
+
getGovernanceOverview(ctx: ExecutionContext): {
|
|
281
|
+
workspaceId: string;
|
|
282
|
+
killSwitch: {
|
|
283
|
+
active: boolean;
|
|
284
|
+
reason: string | null;
|
|
285
|
+
};
|
|
286
|
+
governance: ReturnType<MicrosoftGovernanceAdapter["getStatus"]>;
|
|
287
|
+
trustScore: ReturnType<MicrosoftGovernanceAdapter["getWorkspaceTrustScore"]>;
|
|
288
|
+
policy: Workspace["policy"];
|
|
289
|
+
plainEnglish: ReturnType<typeof describePolicyInPlainEnglish>;
|
|
290
|
+
explanation: HumanFriendlyExplanation;
|
|
291
|
+
};
|
|
292
|
+
setKillSwitch(ctx: ExecutionContext, active: boolean, reason?: string): Workspace;
|
|
293
|
+
scanForContextPoisoning(workspaceId: string, text: string): {
|
|
294
|
+
poisoned: boolean;
|
|
295
|
+
severity: string;
|
|
296
|
+
matchedPatterns: string[];
|
|
297
|
+
findingsCount: number;
|
|
298
|
+
integrityValid: boolean;
|
|
299
|
+
};
|
|
300
|
+
getGuardrailsSummary(ctx: ExecutionContext): {
|
|
301
|
+
workspaceId: string;
|
|
302
|
+
policy: Workspace["policy"];
|
|
303
|
+
plainEnglish: ReturnType<typeof describePolicyInPlainEnglish>;
|
|
304
|
+
activeDefaults: ActiveMemoryDefaults;
|
|
305
|
+
activeGuardrails: string[];
|
|
306
|
+
};
|
|
307
|
+
applyNaturalLanguageGuardrail(ctx: ExecutionContext, prompt: string, options?: GuardrailCompileOptions): Promise<{
|
|
308
|
+
ok: boolean;
|
|
309
|
+
workspace: Workspace;
|
|
310
|
+
guardrail: ParsedNaturalLanguageGuardrail;
|
|
311
|
+
plainEnglish: ReturnType<typeof describePolicyInPlainEnglish>;
|
|
312
|
+
memoryRecord?: WorkspaceMemoryRecord;
|
|
313
|
+
}>;
|
|
151
314
|
doNaturalLanguage(ctx: ExecutionContext, params: {
|
|
152
315
|
prompt: string;
|
|
153
316
|
input?: Record<string, unknown>;
|
|
@@ -158,13 +321,38 @@ export declare class MuxoEngine {
|
|
|
158
321
|
}): Promise<{
|
|
159
322
|
ok: boolean;
|
|
160
323
|
executed: boolean;
|
|
161
|
-
status: "executed" | "planned_dry_run" | "awaiting_approval" | "awaiting_oauth_connection" | "missing_inputs" | "unresolved";
|
|
324
|
+
status: "executed" | "planned_dry_run" | "awaiting_approval" | "awaiting_oauth_connection" | "missing_inputs" | "guardrail_applied" | "memory_saved" | "memory_forgotten" | "memory_recalled" | "memory_graph" | "governance_updated" | "governance_scanned" | "governance_status" | "context_inspected" | "receipt_explained" | "receipt_chain_verified" | "unresolved";
|
|
162
325
|
intent: NaturalLanguageResolution;
|
|
163
326
|
resolution: NaturalLanguageResolution;
|
|
164
327
|
plan?: ActionPlan;
|
|
165
328
|
run?: ExecutionRun;
|
|
166
329
|
receipt?: ExecutionReceipt;
|
|
330
|
+
receiptVerification?: {
|
|
331
|
+
receipt: ExecutionReceipt;
|
|
332
|
+
agenticReceipt?: PortableAgenticReceipt;
|
|
333
|
+
signatureValid: boolean;
|
|
334
|
+
governanceSignatureValid: boolean;
|
|
335
|
+
agenticReceiptValid?: boolean;
|
|
336
|
+
explanation: HumanFriendlyExplanation;
|
|
337
|
+
};
|
|
338
|
+
receiptsList?: ReturnType<MuxoEngine["listReceipts"]>;
|
|
339
|
+
receiptChain?: ReturnType<MuxoEngine["verifyReceiptChain"]>;
|
|
340
|
+
guardrail?: ParsedNaturalLanguageGuardrail;
|
|
341
|
+
plainEnglishGuardrails?: ReturnType<typeof describePolicyInPlainEnglish>;
|
|
342
|
+
memoryRecord?: WorkspaceMemoryRecord;
|
|
343
|
+
memoryOverview?: Awaited<ReturnType<MuxoEngine["getMemoryOverview"]>>;
|
|
344
|
+
memoryGraph?: MemoryKnowledgeGraph;
|
|
345
|
+
deletedMemoryId?: string;
|
|
346
|
+
governanceStatus?: ReturnType<MuxoEngine["getGovernanceOverview"]>;
|
|
347
|
+
poisoningScan?: ReturnType<MuxoEngine["scanForContextPoisoning"]>;
|
|
348
|
+
runContext?: Awaited<ReturnType<MuxoEngine["getRunContext"]>>;
|
|
349
|
+
explanation?: HumanFriendlyExplanation;
|
|
350
|
+
activeDefaults?: ActiveMemoryDefaults;
|
|
351
|
+
activeMemoryDefaults?: ActiveMemoryDefaults;
|
|
352
|
+
memoryAutoFilled?: Record<string, unknown>;
|
|
167
353
|
authHandoff?: Record<string, unknown>;
|
|
354
|
+
humanHandoff?: HumanHandoff;
|
|
355
|
+
llmGuidance?: LlmGuidance;
|
|
168
356
|
byokPrompt?: {
|
|
169
357
|
needed: boolean;
|
|
170
358
|
provider: string;
|
|
@@ -174,4 +362,87 @@ export declare class MuxoEngine {
|
|
|
174
362
|
};
|
|
175
363
|
humanMessage: string;
|
|
176
364
|
}>;
|
|
365
|
+
/**
|
|
366
|
+
* Parallel Governed Multi-Tool Batch Execution (`COMPOSIO_MULTI_EXECUTE_TOOL` pattern).
|
|
367
|
+
* Evaluates governance & policy across every item, then executes all approved plans concurrently.
|
|
368
|
+
*/
|
|
369
|
+
executeBatchPlans(ctx: ExecutionContext, params: {
|
|
370
|
+
items: Array<{
|
|
371
|
+
toolSlug: string;
|
|
372
|
+
input: Record<string, unknown>;
|
|
373
|
+
reason: string;
|
|
374
|
+
}>;
|
|
375
|
+
autoApprove?: boolean;
|
|
376
|
+
}): Promise<{
|
|
377
|
+
batchId: string;
|
|
378
|
+
totalRequested: number;
|
|
379
|
+
succeededCount: number;
|
|
380
|
+
blockedOrPendingCount: number;
|
|
381
|
+
results: Array<{
|
|
382
|
+
toolSlug: string;
|
|
383
|
+
status: "succeeded" | "failed" | "awaiting_approval" | "awaiting_oauth";
|
|
384
|
+
planId?: string;
|
|
385
|
+
runId?: string;
|
|
386
|
+
receiptId?: string;
|
|
387
|
+
output?: Record<string, unknown>;
|
|
388
|
+
error?: string;
|
|
389
|
+
}>;
|
|
390
|
+
}>;
|
|
391
|
+
/**
|
|
392
|
+
* Cloudflare Workflows (`step.do`, `step.waitForEvent`, `step.sleep`) Durable Orchestrator
|
|
393
|
+
* for multi-stage async Stripe v2 Cloud Provisioning & Vault Secret Injection.
|
|
394
|
+
*/
|
|
395
|
+
startDurableWorkflow(ctx: ExecutionContext, params: {
|
|
396
|
+
provider?: string;
|
|
397
|
+
serviceRef?: string;
|
|
398
|
+
name?: string;
|
|
399
|
+
region?: string;
|
|
400
|
+
}): Promise<DurableWorkflow>;
|
|
401
|
+
advanceDurableWorkflow(ctx: ExecutionContext, workflowId: string, eventPayload?: Record<string, unknown>): Promise<DurableWorkflow>;
|
|
402
|
+
listDurableWorkflows(workspaceId: string): DurableWorkflow[];
|
|
403
|
+
/**
|
|
404
|
+
* Hybrid Semantic Vector + Bi-Temporal Recall (`@cf/baai/bge-base-en-v1.5` + Vectorize model).
|
|
405
|
+
*/
|
|
406
|
+
searchMemoryHybrid(workspaceId: string, query: string, limit?: number): {
|
|
407
|
+
rankedMemories: Array<WorkspaceMemoryRecord & {
|
|
408
|
+
hybridScore: number;
|
|
409
|
+
vectorSimilarity: number;
|
|
410
|
+
lexicalOverlap: number;
|
|
411
|
+
}>;
|
|
412
|
+
vectorDimensions: number;
|
|
413
|
+
embeddingModel: string;
|
|
414
|
+
topScore: number;
|
|
415
|
+
};
|
|
416
|
+
/**
|
|
417
|
+
* Tamper-Evident R2 / WORM Audit Archive Bundle signed by the workspace's Ed25519 AgentIdentity.
|
|
418
|
+
*/
|
|
419
|
+
exportTamperEvidentArchive(workspaceId: string): {
|
|
420
|
+
archiveId: string;
|
|
421
|
+
workspaceId: string;
|
|
422
|
+
storageTarget: string;
|
|
423
|
+
retentionMode: string;
|
|
424
|
+
exportedAt: string;
|
|
425
|
+
chainIntegrity: {
|
|
426
|
+
verified: boolean;
|
|
427
|
+
algorithm: string;
|
|
428
|
+
agentDid: string;
|
|
429
|
+
publicKeyFingerprint: string;
|
|
430
|
+
headMerkleHash: string;
|
|
431
|
+
bundleDigest: string;
|
|
432
|
+
};
|
|
433
|
+
counts: {
|
|
434
|
+
receipts: number;
|
|
435
|
+
governanceDecisions: number;
|
|
436
|
+
auditLogs: number;
|
|
437
|
+
temporalFacts: number;
|
|
438
|
+
};
|
|
439
|
+
merkleChain: {
|
|
440
|
+
sequence: number;
|
|
441
|
+
receiptId: string;
|
|
442
|
+
toolSlug: string;
|
|
443
|
+
prevHash: string;
|
|
444
|
+
entryHash: string;
|
|
445
|
+
createdAt: string;
|
|
446
|
+
}[];
|
|
447
|
+
};
|
|
177
448
|
}
|