@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.
- 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 +1677 -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 +112 -0
- package/dist/durable-workflow.js +284 -0
- package/dist/engine.d.ts +377 -6
- package/dist/engine.js +1919 -94
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/mcp-schema.d.ts +286 -0
- package/dist/mcp-schema.js +2580 -0
- package/dist/mcp.d.ts +2 -25
- package/dist/mcp.js +1008 -507
- package/dist/memory-graph.d.ts +45 -0
- package/dist/memory-graph.js +293 -0
- package/dist/nl.js +214 -35
- package/dist/oauth.d.ts +32 -0
- package/dist/oauth.js +134 -0
- package/dist/oss-suite.d.ts +217 -0
- package/dist/oss-suite.js +836 -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 +728 -7
- package/dist/sdk.js +539 -10
- package/dist/server.js +2744 -321
- package/dist/store.d.ts +138 -6
- package/dist/store.js +932 -58
- package/dist/types.d.ts +330 -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 +6 -5
- 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/engine.d.ts
CHANGED
|
@@ -1,13 +1,38 @@
|
|
|
1
1
|
import type { MuxoConfig } from "./config.js";
|
|
2
|
+
import { type DurableWorkflow } from "./durable-workflow.js";
|
|
3
|
+
import { type CommercialPlaybookDefinition, type CommercialRoiReport, type CompiledPolicyAsCodeBundle, type OtelTraceExportBundle, type PolicyAsCodeEvaluationResult } from "./oss-suite.js";
|
|
2
4
|
import { type NaturalLanguageResolution } from "./nl.js";
|
|
5
|
+
import { describePolicyInPlainEnglish, type GuardrailCompileOptions, type LlmPolicyAndGovernanceBrief, type ParsedNaturalLanguageGuardrail, type PolicySimulationResult } from "./policy.js";
|
|
3
6
|
import { ComposioInstantAdapter } from "./providers/composio-instant.js";
|
|
4
7
|
import { ComposioSdkAdapter } from "./providers/composio-sdk.js";
|
|
5
8
|
import { MicrosoftGovernanceAdapter } from "./providers/microsoft-governance.js";
|
|
6
9
|
import { StripeBillingAdapter } from "./providers/stripe-billing.js";
|
|
7
10
|
import { StripeProjectsAdapter } from "./providers/stripe-projects.js";
|
|
8
|
-
import { SupermemoryAdapter } from "./providers/supermemory.js";
|
|
11
|
+
import { SupermemoryAdapter, type ActiveMemoryDefaults } from "./providers/supermemory.js";
|
|
9
12
|
import type { MuxoStore } from "./store.js";
|
|
10
|
-
import type { ActionPlan, ConnectionRecord, ExecutionReceipt, ExecutionRun, GovernanceDecisionRecord, MemoryContextSummary, MuxoTool, ProviderLane, RiskLevel, User, Workspace, WorkspaceMemoryRecord } from "./types.js";
|
|
13
|
+
import type { ActionPlan, ConnectionRecord, ExecutionReceipt, ExecutionRun, GovernanceDecisionRecord, HumanFriendlyExplanation, HumanHandoff, LanguageMode, LlmGuidance, MemoryContextSummary, MemoryKnowledgeGraph, MuxoTool, PortableAgenticReceipt, ProviderLane, RiskLevel, User, Workspace, WorkspaceMemoryRecord } from "./types.js";
|
|
14
|
+
export type RunContextPayload = {
|
|
15
|
+
workspaceId: string;
|
|
16
|
+
workspaceSlug: string;
|
|
17
|
+
projectsEnvironment: string;
|
|
18
|
+
policy: Workspace["policy"];
|
|
19
|
+
plainEnglishPolicy: ReturnType<typeof describePolicyInPlainEnglish>;
|
|
20
|
+
languageMode: LanguageMode;
|
|
21
|
+
customInstructions: string[];
|
|
22
|
+
activeDefaults: ActiveMemoryDefaults;
|
|
23
|
+
activeGuardrails: string[];
|
|
24
|
+
creditsBalance: number;
|
|
25
|
+
monthlyActionsRemaining: number;
|
|
26
|
+
provisionedResources: ReturnType<MuxoStore["listResources"]>;
|
|
27
|
+
environmentVariablesRedacted: Record<string, string>;
|
|
28
|
+
supermemoryBrain: MemoryContextSummary;
|
|
29
|
+
temporalFacts: NonNullable<MemoryContextSummary["temporalFacts"]>;
|
|
30
|
+
governance: ReturnType<MicrosoftGovernanceAdapter["getStatus"]>;
|
|
31
|
+
trustScore: ReturnType<MicrosoftGovernanceAdapter["getWorkspaceTrustScore"]>;
|
|
32
|
+
llmSystemPrompt: string;
|
|
33
|
+
explanation: HumanFriendlyExplanation;
|
|
34
|
+
envPullHint: string;
|
|
35
|
+
};
|
|
11
36
|
export interface ExecutionContext {
|
|
12
37
|
user: User;
|
|
13
38
|
workspace: Workspace;
|
|
@@ -23,6 +48,7 @@ export declare class MuxoEngine {
|
|
|
23
48
|
readonly stripeBilling: StripeBillingAdapter;
|
|
24
49
|
readonly governance: MicrosoftGovernanceAdapter;
|
|
25
50
|
readonly supermemory: SupermemoryAdapter;
|
|
51
|
+
private readonly durableWorkflows;
|
|
26
52
|
constructor(config: MuxoConfig, store: MuxoStore);
|
|
27
53
|
getProfile(ctx: ExecutionContext): Record<string, unknown>;
|
|
28
54
|
getOrganization(ctx: ExecutionContext): Record<string, unknown>;
|
|
@@ -41,6 +67,7 @@ export declare class MuxoEngine {
|
|
|
41
67
|
provider?: string;
|
|
42
68
|
syncLive?: boolean;
|
|
43
69
|
}): Promise<Record<string, unknown>>;
|
|
70
|
+
getHostedSiteHtml(slug: string, filePath?: string): string | null;
|
|
44
71
|
startConnection(ctx: ExecutionContext, params: {
|
|
45
72
|
provider: string;
|
|
46
73
|
lane?: ProviderLane;
|
|
@@ -54,11 +81,16 @@ export declare class MuxoEngine {
|
|
|
54
81
|
timeoutSeconds?: number;
|
|
55
82
|
pollIntervalMs?: number;
|
|
56
83
|
}): Promise<{
|
|
84
|
+
ok: true;
|
|
57
85
|
connected: boolean;
|
|
86
|
+
ready: boolean;
|
|
87
|
+
timedOut: boolean;
|
|
58
88
|
provider: string;
|
|
59
89
|
status: ConnectionRecord["status"];
|
|
60
90
|
connection: ConnectionRecord;
|
|
61
91
|
redirectUrl: string | null;
|
|
92
|
+
polledAttempts: number;
|
|
93
|
+
elapsedMs: number;
|
|
62
94
|
message: string;
|
|
63
95
|
}>;
|
|
64
96
|
handleOAuthCallback(params: {
|
|
@@ -78,6 +110,7 @@ export declare class MuxoEngine {
|
|
|
78
110
|
toolSlug: string;
|
|
79
111
|
input?: Record<string, unknown>;
|
|
80
112
|
reason?: string;
|
|
113
|
+
fundingMode?: "muxo_funded" | "byok";
|
|
81
114
|
}): Promise<{
|
|
82
115
|
plan: ActionPlan;
|
|
83
116
|
tool: MuxoTool;
|
|
@@ -91,42 +124,217 @@ export declare class MuxoEngine {
|
|
|
91
124
|
externalAccountId: string | null;
|
|
92
125
|
instructions: string;
|
|
93
126
|
};
|
|
127
|
+
humanHandoff?: HumanHandoff;
|
|
128
|
+
llmGuidance: LlmGuidance;
|
|
94
129
|
nextStep: string;
|
|
95
130
|
}>;
|
|
96
131
|
getPlan(ctx: ExecutionContext, planId: string): ActionPlan;
|
|
132
|
+
waitForPlanApproval(ctx: ExecutionContext, params: {
|
|
133
|
+
planId: string;
|
|
134
|
+
timeoutSeconds?: number;
|
|
135
|
+
pollIntervalMs?: number;
|
|
136
|
+
}): Promise<{
|
|
137
|
+
ok: true;
|
|
138
|
+
approved: boolean;
|
|
139
|
+
rejected: boolean;
|
|
140
|
+
timedOut: boolean;
|
|
141
|
+
waitedForApproval: true;
|
|
142
|
+
approvalStatus: ActionPlan["approvalStatus"];
|
|
143
|
+
approvalUrl: string;
|
|
144
|
+
waitedMs: number;
|
|
145
|
+
plan: ActionPlan;
|
|
146
|
+
}>;
|
|
97
147
|
approvePlan(ctx: ExecutionContext, planId: string, decision?: "approved" | "rejected"): ActionPlan;
|
|
98
|
-
|
|
148
|
+
private buildApprovalHandoff;
|
|
149
|
+
private buildOAuthHandoff;
|
|
150
|
+
private buildPlanLlmGuidance;
|
|
151
|
+
private enrichMemoryContext;
|
|
152
|
+
getRunContext(ctx: ExecutionContext, query?: string): Promise<{
|
|
153
|
+
explanation: HumanFriendlyExplanation;
|
|
154
|
+
plainEnglishPolicy: ReturnType<typeof describePolicyInPlainEnglish>;
|
|
155
|
+
activeDefaults: ActiveMemoryDefaults;
|
|
156
|
+
activeGuardrails: string[];
|
|
157
|
+
[key: string]: unknown;
|
|
158
|
+
}>;
|
|
99
159
|
getMemoryOverview(ctx: ExecutionContext, query?: string): Promise<{
|
|
100
160
|
enabled: boolean;
|
|
101
161
|
namespace: string;
|
|
162
|
+
fundingSource: string;
|
|
102
163
|
context: MemoryContextSummary;
|
|
164
|
+
activeDefaults: ActiveMemoryDefaults;
|
|
165
|
+
activeGuardrails: string[];
|
|
166
|
+
explanation: HumanFriendlyExplanation;
|
|
103
167
|
recentMemories: WorkspaceMemoryRecord[];
|
|
104
168
|
memories: WorkspaceMemoryRecord[];
|
|
169
|
+
temporalFacts: ReturnType<MuxoStore["listTemporalFacts"]>;
|
|
170
|
+
historicalFacts: ReturnType<MuxoStore["listTemporalFacts"]>;
|
|
105
171
|
}>;
|
|
106
172
|
addWorkspaceMemory(ctx: ExecutionContext, params: {
|
|
107
173
|
title: string;
|
|
108
174
|
content: string;
|
|
109
175
|
kind?: WorkspaceMemoryRecord["kind"];
|
|
110
176
|
metadata?: Record<string, unknown>;
|
|
177
|
+
subject?: string;
|
|
178
|
+
predicate?: string;
|
|
179
|
+
object?: string;
|
|
111
180
|
}): Promise<WorkspaceMemoryRecord>;
|
|
112
181
|
deleteWorkspaceMemory(ctx: ExecutionContext, idOrDocId: string): Promise<{
|
|
113
182
|
deleted: boolean;
|
|
114
183
|
record: WorkspaceMemoryRecord | null;
|
|
115
184
|
}>;
|
|
185
|
+
forgetWorkspaceMemoryMatching(ctx: ExecutionContext, query: string): Promise<{
|
|
186
|
+
query: string;
|
|
187
|
+
deletedLocalCount: number;
|
|
188
|
+
invalidatedFactsCount: number;
|
|
189
|
+
deletedRemoteIds: string[];
|
|
190
|
+
deletedMemories: WorkspaceMemoryRecord[];
|
|
191
|
+
invalidatedFacts: ReturnType<MuxoStore["listTemporalFacts"]>;
|
|
192
|
+
}>;
|
|
193
|
+
/**
|
|
194
|
+
* Synthesizes a Bi-Temporal Knowledge Graph (entities, active relationships, superseded historical relationships,
|
|
195
|
+
* Mermaid diagram, point-in-time `asOf` time-travel, 2-hop BFS subgraph, and human + technical explanations)
|
|
196
|
+
* directly from SQLite temporal_facts, memories, resources, and connections.
|
|
197
|
+
*/
|
|
198
|
+
getMemoryGraph(ctx: ExecutionContext, queryOrOptions?: string | {
|
|
199
|
+
query?: string;
|
|
200
|
+
asOf?: string | null;
|
|
201
|
+
focalEntity?: string | null;
|
|
202
|
+
maxHops?: number;
|
|
203
|
+
}): Promise<MemoryKnowledgeGraph>;
|
|
204
|
+
activateWorkspaceKillSwitch(ctx: ExecutionContext, params: {
|
|
205
|
+
reason: string;
|
|
206
|
+
action?: "terminate" | "quarantine" | "suspend";
|
|
207
|
+
}): Promise<Record<string, unknown>>;
|
|
208
|
+
resumeWorkspaceKillSwitch(ctx: ExecutionContext): Record<string, unknown>;
|
|
116
209
|
executePlanForRisk(ctx: ExecutionContext, planId: string, expectedRisk: RiskLevel): Promise<{
|
|
117
210
|
run: ExecutionRun;
|
|
118
211
|
receipt: ExecutionReceipt;
|
|
119
212
|
}>;
|
|
120
213
|
getRun(ctx: ExecutionContext, runId: string): ExecutionRun;
|
|
121
|
-
cancelRun(ctx: ExecutionContext, runId: string): {
|
|
214
|
+
cancelRun(ctx: ExecutionContext, runId: string, reason?: string): {
|
|
215
|
+
ok: true;
|
|
216
|
+
cancelled: true;
|
|
217
|
+
alreadyCancelled: boolean;
|
|
218
|
+
previousStatus: ExecutionRun["status"];
|
|
122
219
|
run: ExecutionRun;
|
|
123
|
-
receipt: ExecutionReceipt
|
|
220
|
+
receipt: ExecutionReceipt;
|
|
221
|
+
signatureValid: boolean;
|
|
222
|
+
message: string;
|
|
124
223
|
};
|
|
224
|
+
explainReceipt(receipt: ExecutionReceipt, verification: {
|
|
225
|
+
signatureValid: boolean;
|
|
226
|
+
governanceSignatureValid: boolean;
|
|
227
|
+
agenticReceiptValid?: boolean;
|
|
228
|
+
}, policy?: Partial<Workspace["policy"]> | null, languageMode?: LanguageMode): HumanFriendlyExplanation;
|
|
125
229
|
getReceipt(ctx: ExecutionContext, receiptOrRunId: string): {
|
|
126
230
|
receipt: ExecutionReceipt;
|
|
231
|
+
agenticReceipt: PortableAgenticReceipt;
|
|
127
232
|
signatureValid: boolean;
|
|
128
233
|
governanceSignatureValid: boolean;
|
|
234
|
+
agenticReceiptValid: boolean;
|
|
235
|
+
explanation: HumanFriendlyExplanation;
|
|
236
|
+
};
|
|
237
|
+
listReceipts(ctx: ExecutionContext, limit?: number): {
|
|
238
|
+
receipts: Array<ExecutionReceipt & {
|
|
239
|
+
agenticReceipt: PortableAgenticReceipt;
|
|
240
|
+
signatureValid: boolean;
|
|
241
|
+
governanceSignatureValid: boolean;
|
|
242
|
+
agenticReceiptValid: boolean;
|
|
243
|
+
explanation: HumanFriendlyExplanation;
|
|
244
|
+
}>;
|
|
245
|
+
total: number;
|
|
246
|
+
explanation: HumanFriendlyExplanation;
|
|
247
|
+
};
|
|
248
|
+
/**
|
|
249
|
+
* Verifies the entire cryptographic receipt chain (`prevReceiptHash` -> `receiptHash`,
|
|
250
|
+
* HMAC vault signatures, Ed25519 Governance DecisionRecords, and portable Ed25519 AgenticReceipts).
|
|
251
|
+
*/
|
|
252
|
+
verifyReceiptChain(ctx: ExecutionContext, limit?: number): {
|
|
253
|
+
ok: true;
|
|
254
|
+
valid: boolean;
|
|
255
|
+
workspaceId: string;
|
|
256
|
+
agentDid: string;
|
|
257
|
+
publicKeyHex: string;
|
|
258
|
+
chainValid: boolean;
|
|
259
|
+
hashLinksValid: boolean;
|
|
260
|
+
allHmacValid: boolean;
|
|
261
|
+
allEd25519AgenticValid: boolean;
|
|
262
|
+
allGovernanceValid: boolean;
|
|
263
|
+
totalReceipts: number;
|
|
264
|
+
totalChecked: number;
|
|
265
|
+
validCount: number;
|
|
266
|
+
brokenLinks: Array<{
|
|
267
|
+
receiptId: string;
|
|
268
|
+
runId: string;
|
|
269
|
+
reason: string;
|
|
270
|
+
}>;
|
|
271
|
+
genesisHash: string;
|
|
272
|
+
headReceiptHash: string;
|
|
273
|
+
links: Array<{
|
|
274
|
+
index: number;
|
|
275
|
+
receiptId: string;
|
|
276
|
+
runId: string;
|
|
277
|
+
toolSlug: string;
|
|
278
|
+
prevReceiptHash: string;
|
|
279
|
+
receiptHash: string;
|
|
280
|
+
hashLinkValid: boolean;
|
|
281
|
+
hmacValid: boolean;
|
|
282
|
+
ed25519AgenticValid: boolean;
|
|
283
|
+
governanceValid: boolean;
|
|
284
|
+
issuedAt: string;
|
|
285
|
+
}>;
|
|
286
|
+
explanation: HumanFriendlyExplanation;
|
|
287
|
+
};
|
|
288
|
+
getGovernanceOverview(ctx: ExecutionContext): {
|
|
289
|
+
workspaceId: string;
|
|
290
|
+
killSwitch: {
|
|
291
|
+
active: boolean;
|
|
292
|
+
reason: string | null;
|
|
293
|
+
};
|
|
294
|
+
governance: ReturnType<MicrosoftGovernanceAdapter["getStatus"]>;
|
|
295
|
+
trustScore: ReturnType<MicrosoftGovernanceAdapter["getWorkspaceTrustScore"]>;
|
|
296
|
+
policy: Workspace["policy"];
|
|
297
|
+
plainEnglish: ReturnType<typeof describePolicyInPlainEnglish>;
|
|
298
|
+
llmPolicyBrief: LlmPolicyAndGovernanceBrief;
|
|
299
|
+
explanation: HumanFriendlyExplanation;
|
|
300
|
+
};
|
|
301
|
+
resetWorkspaceGuardrails(ctx: ExecutionContext): {
|
|
302
|
+
ok: true;
|
|
303
|
+
action: "reset_guardrails";
|
|
304
|
+
workspace: Workspace;
|
|
305
|
+
policy: Workspace["policy"];
|
|
306
|
+
plainEnglish: ReturnType<typeof describePolicyInPlainEnglish>;
|
|
307
|
+
llmPolicyBrief: LlmPolicyAndGovernanceBrief;
|
|
308
|
+
explanation: HumanFriendlyExplanation;
|
|
309
|
+
};
|
|
310
|
+
checkToolPolicy(ctx: ExecutionContext, params: {
|
|
311
|
+
toolSlug: string;
|
|
312
|
+
input?: Record<string, unknown>;
|
|
313
|
+
}): Promise<PolicySimulationResult>;
|
|
314
|
+
setKillSwitch(ctx: ExecutionContext, active: boolean, reason?: string): Workspace;
|
|
315
|
+
scanForContextPoisoning(workspaceId: string, text: string): {
|
|
316
|
+
poisoned: boolean;
|
|
317
|
+
severity: string;
|
|
318
|
+
matchedPatterns: string[];
|
|
319
|
+
findingsCount: number;
|
|
320
|
+
integrityValid: boolean;
|
|
321
|
+
};
|
|
322
|
+
getGuardrailsSummary(ctx: ExecutionContext): {
|
|
323
|
+
workspaceId: string;
|
|
324
|
+
policy: Workspace["policy"];
|
|
325
|
+
plainEnglish: ReturnType<typeof describePolicyInPlainEnglish>;
|
|
326
|
+
llmPolicyBrief: LlmPolicyAndGovernanceBrief;
|
|
327
|
+
activeDefaults: ActiveMemoryDefaults;
|
|
328
|
+
activeGuardrails: string[];
|
|
129
329
|
};
|
|
330
|
+
applyNaturalLanguageGuardrail(ctx: ExecutionContext, prompt: string, options?: GuardrailCompileOptions): Promise<{
|
|
331
|
+
ok: boolean;
|
|
332
|
+
workspace: Workspace;
|
|
333
|
+
guardrail: ParsedNaturalLanguageGuardrail;
|
|
334
|
+
plainEnglish: ReturnType<typeof describePolicyInPlainEnglish>;
|
|
335
|
+
llmPolicyBrief: LlmPolicyAndGovernanceBrief;
|
|
336
|
+
memoryRecord?: WorkspaceMemoryRecord;
|
|
337
|
+
}>;
|
|
130
338
|
doNaturalLanguage(ctx: ExecutionContext, params: {
|
|
131
339
|
prompt: string;
|
|
132
340
|
input?: Record<string, unknown>;
|
|
@@ -137,13 +345,38 @@ export declare class MuxoEngine {
|
|
|
137
345
|
}): Promise<{
|
|
138
346
|
ok: boolean;
|
|
139
347
|
executed: boolean;
|
|
140
|
-
status: "executed" | "planned_dry_run" | "awaiting_approval" | "awaiting_oauth_connection" | "missing_inputs" | "unresolved";
|
|
348
|
+
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";
|
|
141
349
|
intent: NaturalLanguageResolution;
|
|
142
350
|
resolution: NaturalLanguageResolution;
|
|
143
351
|
plan?: ActionPlan;
|
|
144
352
|
run?: ExecutionRun;
|
|
145
353
|
receipt?: ExecutionReceipt;
|
|
354
|
+
receiptVerification?: {
|
|
355
|
+
receipt: ExecutionReceipt;
|
|
356
|
+
agenticReceipt?: PortableAgenticReceipt;
|
|
357
|
+
signatureValid: boolean;
|
|
358
|
+
governanceSignatureValid: boolean;
|
|
359
|
+
agenticReceiptValid?: boolean;
|
|
360
|
+
explanation: HumanFriendlyExplanation;
|
|
361
|
+
};
|
|
362
|
+
receiptsList?: ReturnType<MuxoEngine["listReceipts"]>;
|
|
363
|
+
receiptChain?: ReturnType<MuxoEngine["verifyReceiptChain"]>;
|
|
364
|
+
guardrail?: ParsedNaturalLanguageGuardrail;
|
|
365
|
+
plainEnglishGuardrails?: ReturnType<typeof describePolicyInPlainEnglish>;
|
|
366
|
+
memoryRecord?: WorkspaceMemoryRecord;
|
|
367
|
+
memoryOverview?: Awaited<ReturnType<MuxoEngine["getMemoryOverview"]>>;
|
|
368
|
+
memoryGraph?: MemoryKnowledgeGraph;
|
|
369
|
+
deletedMemoryId?: string;
|
|
370
|
+
governanceStatus?: ReturnType<MuxoEngine["getGovernanceOverview"]>;
|
|
371
|
+
poisoningScan?: ReturnType<MuxoEngine["scanForContextPoisoning"]>;
|
|
372
|
+
runContext?: Awaited<ReturnType<MuxoEngine["getRunContext"]>>;
|
|
373
|
+
explanation?: HumanFriendlyExplanation;
|
|
374
|
+
activeDefaults?: ActiveMemoryDefaults;
|
|
375
|
+
activeMemoryDefaults?: ActiveMemoryDefaults;
|
|
376
|
+
memoryAutoFilled?: Record<string, unknown>;
|
|
146
377
|
authHandoff?: Record<string, unknown>;
|
|
378
|
+
humanHandoff?: HumanHandoff;
|
|
379
|
+
llmGuidance?: LlmGuidance;
|
|
147
380
|
byokPrompt?: {
|
|
148
381
|
needed: boolean;
|
|
149
382
|
provider: string;
|
|
@@ -153,4 +386,142 @@ export declare class MuxoEngine {
|
|
|
153
386
|
};
|
|
154
387
|
humanMessage: string;
|
|
155
388
|
}>;
|
|
389
|
+
/**
|
|
390
|
+
* Parallel Governed Multi-Tool Batch Execution (`COMPOSIO_MULTI_EXECUTE_TOOL` pattern).
|
|
391
|
+
* Evaluates governance & policy across every item, then executes all approved plans concurrently.
|
|
392
|
+
*/
|
|
393
|
+
executeBatchPlans(ctx: ExecutionContext, params: {
|
|
394
|
+
items: Array<{
|
|
395
|
+
toolSlug: string;
|
|
396
|
+
input: Record<string, unknown>;
|
|
397
|
+
reason: string;
|
|
398
|
+
}>;
|
|
399
|
+
autoApprove?: boolean;
|
|
400
|
+
}): Promise<{
|
|
401
|
+
batchId: string;
|
|
402
|
+
totalRequested: number;
|
|
403
|
+
succeededCount: number;
|
|
404
|
+
blockedOrPendingCount: number;
|
|
405
|
+
results: Array<{
|
|
406
|
+
toolSlug: string;
|
|
407
|
+
status: "succeeded" | "failed" | "awaiting_approval" | "awaiting_oauth";
|
|
408
|
+
planId?: string;
|
|
409
|
+
runId?: string;
|
|
410
|
+
receiptId?: string;
|
|
411
|
+
output?: Record<string, unknown>;
|
|
412
|
+
error?: string;
|
|
413
|
+
}>;
|
|
414
|
+
}>;
|
|
415
|
+
/**
|
|
416
|
+
* Cloudflare Workflows (`step.do`, `step.waitForEvent`, `step.sleep`) Durable Orchestrator
|
|
417
|
+
* for multi-stage async Stripe v2 Cloud Provisioning & Vault Secret Injection.
|
|
418
|
+
*/
|
|
419
|
+
startDurableWorkflow(ctx: ExecutionContext, params: {
|
|
420
|
+
provider?: string;
|
|
421
|
+
serviceRef?: string;
|
|
422
|
+
name?: string;
|
|
423
|
+
region?: string;
|
|
424
|
+
}): Promise<DurableWorkflow>;
|
|
425
|
+
advanceDurableWorkflow(ctx: ExecutionContext, workflowId: string, eventPayload?: Record<string, unknown>): Promise<DurableWorkflow>;
|
|
426
|
+
listDurableWorkflows(workspaceId: string): DurableWorkflow[];
|
|
427
|
+
getDurableWorkflow(ctx: ExecutionContext, workflowId: string): DurableWorkflow;
|
|
428
|
+
getDurableWorkflowHistory(ctx: ExecutionContext, workflowId: string): {
|
|
429
|
+
namespace: string;
|
|
430
|
+
workflowExecution: {
|
|
431
|
+
workflowId: string;
|
|
432
|
+
runId: string;
|
|
433
|
+
};
|
|
434
|
+
workflowType: {
|
|
435
|
+
name: string;
|
|
436
|
+
};
|
|
437
|
+
status: DurableWorkflow["status"];
|
|
438
|
+
eventsCount: number;
|
|
439
|
+
compensationsCount: number;
|
|
440
|
+
events: import("./durable-workflow.js").TemporalHistoryEvent[];
|
|
441
|
+
};
|
|
442
|
+
signalDurableWorkflow(ctx: ExecutionContext, workflowId: string, params: {
|
|
443
|
+
signalName: string;
|
|
444
|
+
payload?: Record<string, unknown>;
|
|
445
|
+
}): DurableWorkflow;
|
|
446
|
+
rollbackDurableWorkflow(ctx: ExecutionContext, workflowId: string, params?: {
|
|
447
|
+
reason?: string;
|
|
448
|
+
failedStep?: string;
|
|
449
|
+
}): DurableWorkflow;
|
|
450
|
+
/**
|
|
451
|
+
* AWS Cedar & Open Policy Agent (OPA / Rego) Policy-as-Code Compiler & Evaluator.
|
|
452
|
+
*/
|
|
453
|
+
getPolicyAsCodeBundle(ctx: ExecutionContext): CompiledPolicyAsCodeBundle;
|
|
454
|
+
evaluatePolicyAsCode(ctx: ExecutionContext, params: {
|
|
455
|
+
toolSlug: string;
|
|
456
|
+
input?: Record<string, unknown>;
|
|
457
|
+
riskLevel?: RiskLevel;
|
|
458
|
+
creditCost?: number;
|
|
459
|
+
lane?: string;
|
|
460
|
+
}): Promise<PolicyAsCodeEvaluationResult>;
|
|
461
|
+
/**
|
|
462
|
+
* OpenTelemetry (OTel GenAI / MCP Semantic Conventions) & Langfuse Trace Exporter.
|
|
463
|
+
*/
|
|
464
|
+
exportOtelTraces(ctx: ExecutionContext, limit?: number): OtelTraceExportBundle;
|
|
465
|
+
/**
|
|
466
|
+
* Turnkey Commercial Business Saga Playbooks.
|
|
467
|
+
*/
|
|
468
|
+
listCommercialPlaybooks(): CommercialPlaybookDefinition[];
|
|
469
|
+
runCommercialPlaybook(ctx: ExecutionContext, params: {
|
|
470
|
+
slug: string;
|
|
471
|
+
input?: Record<string, unknown>;
|
|
472
|
+
}): {
|
|
473
|
+
ok: true;
|
|
474
|
+
playbook: CommercialPlaybookDefinition;
|
|
475
|
+
workflow: DurableWorkflow;
|
|
476
|
+
temporalFact: import("./types.js").TemporalGraphFact;
|
|
477
|
+
};
|
|
478
|
+
/**
|
|
479
|
+
* FinOps & Commercial ROI Unit-Economics Analytics.
|
|
480
|
+
*/
|
|
481
|
+
getCommercialRoiReport(ctx: ExecutionContext): CommercialRoiReport;
|
|
482
|
+
/**
|
|
483
|
+
* Hybrid Semantic Vector + Bi-Temporal Recall (`@cf/baai/bge-base-en-v1.5` + Vectorize model).
|
|
484
|
+
*/
|
|
485
|
+
searchMemoryHybrid(workspaceId: string, query: string, limit?: number): {
|
|
486
|
+
rankedMemories: Array<WorkspaceMemoryRecord & {
|
|
487
|
+
hybridScore: number;
|
|
488
|
+
vectorSimilarity: number;
|
|
489
|
+
lexicalOverlap: number;
|
|
490
|
+
}>;
|
|
491
|
+
vectorDimensions: number;
|
|
492
|
+
embeddingModel: string;
|
|
493
|
+
topScore: number;
|
|
494
|
+
};
|
|
495
|
+
/**
|
|
496
|
+
* Tamper-Evident R2 / WORM Audit Archive Bundle signed by the workspace's Ed25519 AgentIdentity.
|
|
497
|
+
*/
|
|
498
|
+
exportTamperEvidentArchive(workspaceId: string): {
|
|
499
|
+
archiveId: string;
|
|
500
|
+
workspaceId: string;
|
|
501
|
+
storageTarget: string;
|
|
502
|
+
retentionMode: string;
|
|
503
|
+
exportedAt: string;
|
|
504
|
+
chainIntegrity: {
|
|
505
|
+
verified: boolean;
|
|
506
|
+
algorithm: string;
|
|
507
|
+
agentDid: string;
|
|
508
|
+
publicKeyFingerprint: string;
|
|
509
|
+
headMerkleHash: string;
|
|
510
|
+
bundleDigest: string;
|
|
511
|
+
};
|
|
512
|
+
counts: {
|
|
513
|
+
receipts: number;
|
|
514
|
+
governanceDecisions: number;
|
|
515
|
+
auditLogs: number;
|
|
516
|
+
temporalFacts: number;
|
|
517
|
+
};
|
|
518
|
+
merkleChain: {
|
|
519
|
+
sequence: number;
|
|
520
|
+
receiptId: string;
|
|
521
|
+
toolSlug: string;
|
|
522
|
+
prevHash: string;
|
|
523
|
+
entryHash: string;
|
|
524
|
+
createdAt: string;
|
|
525
|
+
}[];
|
|
526
|
+
};
|
|
156
527
|
}
|