@muxoai/sdk 1.2.3 → 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 +22 -0
- package/.claude-plugin/marketplace.json +32 -0
- package/.codex/config.toml +12 -0
- package/ARCHITECTURE.md +121 -0
- package/README.md +85 -31
- package/dist/clerk.d.ts +35 -0
- package/dist/clerk.js +201 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +2380 -0
- package/dist/composio-catalog.d.ts +234 -0
- package/dist/composio-catalog.js +1894 -0
- package/dist/config.d.ts +36 -0
- package/dist/config.js +115 -0
- package/dist/durable-workflow.d.ts +45 -0
- package/dist/durable-workflow.js +90 -0
- package/dist/engine.d.ts +465 -0
- package/dist/engine.js +2560 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +7 -0
- package/dist/mcp-schema.d.ts +286 -0
- package/dist/mcp-schema.js +2559 -0
- package/dist/mcp.d.ts +22 -0
- package/dist/mcp.js +1356 -0
- package/dist/memory-graph.d.ts +21 -0
- package/dist/memory-graph.js +173 -0
- package/dist/nl.d.ts +34 -0
- package/dist/nl.js +756 -0
- 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 +18 -0
- package/dist/providers/composio-instant.js +1169 -0
- package/dist/providers/composio-sdk.d.ts +162 -0
- package/dist/providers/composio-sdk.js +1395 -0
- package/dist/providers/microsoft-governance.d.ts +152 -0
- package/dist/providers/microsoft-governance.js +1062 -0
- package/dist/providers/stripe-billing.d.ts +83 -0
- package/dist/providers/stripe-billing.js +611 -0
- package/dist/providers/stripe-projects.d.ts +508 -0
- package/dist/providers/stripe-projects.js +3188 -0
- package/dist/providers/supermemory.d.ts +160 -0
- package/dist/providers/supermemory.js +778 -0
- package/dist/provisioning-managed.d.ts +50 -0
- package/dist/provisioning-managed.js +155 -0
- package/dist/sdk.d.ts +951 -0
- package/dist/sdk.js +748 -0
- package/dist/server.d.ts +10 -0
- package/dist/server.js +3575 -0
- package/dist/store.d.ts +348 -0
- package/dist/store.js +2323 -0
- package/dist/types.d.ts +593 -0
- package/dist/types.js +1 -0
- package/dist/ui/console-html.d.ts +64 -0
- package/dist/ui/console-html.js +3857 -0
- 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 +68 -7
- package/plugins/muxo/.app.json +8 -0
- package/plugins/muxo/.claude-plugin/plugin.json +16 -0
- package/plugins/muxo/.codex-plugin/plugin.json +64 -0
- package/plugins/muxo/.cursor-plugin/plugin.json +30 -0
- package/plugins/muxo/.mcp.json +8 -0
- package/plugins/muxo/assets/logo.png +0 -0
- package/plugins/muxo/assets/logo.svg +6 -0
- package/plugins/muxo/hooks/hooks.json +27 -0
- package/plugins/muxo/hooks/session-start.sh +97 -0
- package/plugins/muxo/hooks/user-prompt-submit.sh +58 -0
- package/plugins/muxo/mcp.json +28 -0
- package/plugins/muxo/plugin.json +116 -0
- package/plugins/muxo/skills/muxo/SKILL.md +153 -0
- package/plugins/muxo/skills/muxo/agents/openai.yaml +12 -0
- package/plugins/muxo/skills/muxo/references/cli.md +63 -0
- package/plugins/muxo/skills/muxo/references/mcp.md +37 -0
- package/plugins/muxo/skills/muxo-activity-summary/SKILL.md +81 -0
- package/plugins/muxo/skills/setup/SKILL.md +42 -0
- package/plugins/muxo/skills/setup/agents/openai.yaml +12 -0
- package/src/catalogues/stripe-projects-catalog.json +9972 -0
- package/vendor/microsoft-governance/README.md +363 -0
- package/vendor/microsoft-governance/dist/audit.d.ts +26 -0
- package/vendor/microsoft-governance/dist/audit.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/audit.js +107 -0
- package/vendor/microsoft-governance/dist/audit.js.map +1 -0
- package/vendor/microsoft-governance/dist/cascade-containment.d.ts +84 -0
- package/vendor/microsoft-governance/dist/cascade-containment.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/cascade-containment.js +387 -0
- package/vendor/microsoft-governance/dist/cascade-containment.js.map +1 -0
- package/vendor/microsoft-governance/dist/client.d.ts +34 -0
- package/vendor/microsoft-governance/dist/client.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/client.js +112 -0
- package/vendor/microsoft-governance/dist/client.js.map +1 -0
- package/vendor/microsoft-governance/dist/context-poisoning.d.ts +58 -0
- package/vendor/microsoft-governance/dist/context-poisoning.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/context-poisoning.js +410 -0
- package/vendor/microsoft-governance/dist/context-poisoning.js.map +1 -0
- package/vendor/microsoft-governance/dist/credential-vault.d.ts +213 -0
- package/vendor/microsoft-governance/dist/credential-vault.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/credential-vault.js +567 -0
- package/vendor/microsoft-governance/dist/credential-vault.js.map +1 -0
- package/vendor/microsoft-governance/dist/discovery.d.ts +80 -0
- package/vendor/microsoft-governance/dist/discovery.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/discovery.js +404 -0
- package/vendor/microsoft-governance/dist/discovery.js.map +1 -0
- package/vendor/microsoft-governance/dist/encryption/channel.d.ts +29 -0
- package/vendor/microsoft-governance/dist/encryption/channel.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/encryption/channel.js +78 -0
- package/vendor/microsoft-governance/dist/encryption/channel.js.map +1 -0
- package/vendor/microsoft-governance/dist/encryption/index.d.ts +9 -0
- package/vendor/microsoft-governance/dist/encryption/index.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/encryption/index.js +23 -0
- package/vendor/microsoft-governance/dist/encryption/index.js.map +1 -0
- package/vendor/microsoft-governance/dist/encryption/mesh-client.d.ts +267 -0
- package/vendor/microsoft-governance/dist/encryption/mesh-client.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/encryption/mesh-client.js +1001 -0
- package/vendor/microsoft-governance/dist/encryption/mesh-client.js.map +1 -0
- package/vendor/microsoft-governance/dist/encryption/ratchet.d.ts +38 -0
- package/vendor/microsoft-governance/dist/encryption/ratchet.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/encryption/ratchet.js +223 -0
- package/vendor/microsoft-governance/dist/encryption/ratchet.js.map +1 -0
- package/vendor/microsoft-governance/dist/encryption/registry-client.d.ts +136 -0
- package/vendor/microsoft-governance/dist/encryption/registry-client.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/encryption/registry-client.js +369 -0
- package/vendor/microsoft-governance/dist/encryption/registry-client.js.map +1 -0
- package/vendor/microsoft-governance/dist/encryption/x3dh.d.ts +80 -0
- package/vendor/microsoft-governance/dist/encryption/x3dh.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/encryption/x3dh.js +238 -0
- package/vendor/microsoft-governance/dist/encryption/x3dh.js.map +1 -0
- package/vendor/microsoft-governance/dist/framework-adapter.d.ts +63 -0
- package/vendor/microsoft-governance/dist/framework-adapter.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/framework-adapter.js +253 -0
- package/vendor/microsoft-governance/dist/framework-adapter.js.map +1 -0
- package/vendor/microsoft-governance/dist/identity.d.ts +124 -0
- package/vendor/microsoft-governance/dist/identity.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/identity.js +446 -0
- package/vendor/microsoft-governance/dist/identity.js.map +1 -0
- package/vendor/microsoft-governance/dist/index.d.ts +39 -0
- package/vendor/microsoft-governance/dist/index.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/index.js +95 -0
- package/vendor/microsoft-governance/dist/index.js.map +1 -0
- package/vendor/microsoft-governance/dist/kill-switch.d.ts +22 -0
- package/vendor/microsoft-governance/dist/kill-switch.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/kill-switch.js +60 -0
- package/vendor/microsoft-governance/dist/kill-switch.js.map +1 -0
- package/vendor/microsoft-governance/dist/lifecycle.d.ts +50 -0
- package/vendor/microsoft-governance/dist/lifecycle.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/lifecycle.js +113 -0
- package/vendor/microsoft-governance/dist/lifecycle.js.map +1 -0
- package/vendor/microsoft-governance/dist/mcp.d.ts +41 -0
- package/vendor/microsoft-governance/dist/mcp.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/mcp.js +233 -0
- package/vendor/microsoft-governance/dist/mcp.js.map +1 -0
- package/vendor/microsoft-governance/dist/metrics.d.ts +123 -0
- package/vendor/microsoft-governance/dist/metrics.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/metrics.js +289 -0
- package/vendor/microsoft-governance/dist/metrics.js.map +1 -0
- package/vendor/microsoft-governance/dist/oci-manifest.d.ts +49 -0
- package/vendor/microsoft-governance/dist/oci-manifest.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/oci-manifest.js +182 -0
- package/vendor/microsoft-governance/dist/oci-manifest.js.map +1 -0
- package/vendor/microsoft-governance/dist/policy-backends/cedar.d.ts +15 -0
- package/vendor/microsoft-governance/dist/policy-backends/cedar.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/policy-backends/cedar.js +88 -0
- package/vendor/microsoft-governance/dist/policy-backends/cedar.js.map +1 -0
- package/vendor/microsoft-governance/dist/policy-backends/opa.d.ts +17 -0
- package/vendor/microsoft-governance/dist/policy-backends/opa.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/policy-backends/opa.js +74 -0
- package/vendor/microsoft-governance/dist/policy-backends/opa.js.map +1 -0
- package/vendor/microsoft-governance/dist/policy.d.ts +77 -0
- package/vendor/microsoft-governance/dist/policy.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/policy.js +760 -0
- package/vendor/microsoft-governance/dist/policy.js.map +1 -0
- package/vendor/microsoft-governance/dist/prompt-defense.d.ts +37 -0
- package/vendor/microsoft-governance/dist/prompt-defense.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/prompt-defense.js +229 -0
- package/vendor/microsoft-governance/dist/prompt-defense.js.map +1 -0
- package/vendor/microsoft-governance/dist/protocol-facets.d.ts +87 -0
- package/vendor/microsoft-governance/dist/protocol-facets.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/protocol-facets.js +728 -0
- package/vendor/microsoft-governance/dist/protocol-facets.js.map +1 -0
- package/vendor/microsoft-governance/dist/rings.d.ts +17 -0
- package/vendor/microsoft-governance/dist/rings.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/rings.js +61 -0
- package/vendor/microsoft-governance/dist/rings.js.map +1 -0
- package/vendor/microsoft-governance/dist/sandbox.d.ts +61 -0
- package/vendor/microsoft-governance/dist/sandbox.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/sandbox.js +199 -0
- package/vendor/microsoft-governance/dist/sandbox.js.map +1 -0
- package/vendor/microsoft-governance/dist/surface-parity.d.ts +45 -0
- package/vendor/microsoft-governance/dist/surface-parity.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/surface-parity.js +216 -0
- package/vendor/microsoft-governance/dist/surface-parity.js.map +1 -0
- package/vendor/microsoft-governance/dist/trust.d.ts +28 -0
- package/vendor/microsoft-governance/dist/trust.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/trust.js +209 -0
- package/vendor/microsoft-governance/dist/trust.js.map +1 -0
- package/vendor/microsoft-governance/dist/types.d.ts +422 -0
- package/vendor/microsoft-governance/dist/types.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/types.js +29 -0
- package/vendor/microsoft-governance/dist/types.js.map +1 -0
- package/vendor/microsoft-governance/dist/verify.d.ts +135 -0
- package/vendor/microsoft-governance/dist/verify.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/verify.js +356 -0
- package/vendor/microsoft-governance/dist/verify.js.map +1 -0
- package/vendor/microsoft-governance/package.json +64 -0
- package/index.d.ts +0 -177
- package/index.js +0 -1
package/dist/engine.d.ts
ADDED
|
@@ -0,0 +1,465 @@
|
|
|
1
|
+
import type { MuxoConfig } from "./config.js";
|
|
2
|
+
import { type DurableWorkflow } from "./durable-workflow.js";
|
|
3
|
+
import { type NaturalLanguageResolution } from "./nl.js";
|
|
4
|
+
import { describePolicyInPlainEnglish, type GuardrailCompileOptions, type LlmPolicyAndGovernanceBrief, type ParsedNaturalLanguageGuardrail, type PolicySimulationResult } from "./policy.js";
|
|
5
|
+
import { ComposioInstantAdapter } from "./providers/composio-instant.js";
|
|
6
|
+
import { ComposioSdkAdapter } from "./providers/composio-sdk.js";
|
|
7
|
+
import { MicrosoftGovernanceAdapter } from "./providers/microsoft-governance.js";
|
|
8
|
+
import { StripeBillingAdapter } from "./providers/stripe-billing.js";
|
|
9
|
+
import { StripeProjectsAdapter } from "./providers/stripe-projects.js";
|
|
10
|
+
import { SupermemoryAdapter, type ActiveMemoryDefaults } from "./providers/supermemory.js";
|
|
11
|
+
import type { MuxoStore } from "./store.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
|
+
};
|
|
35
|
+
export interface ExecutionContext {
|
|
36
|
+
user: User;
|
|
37
|
+
workspace: Workspace;
|
|
38
|
+
actorId: string;
|
|
39
|
+
authType: "session" | "api_key";
|
|
40
|
+
}
|
|
41
|
+
export declare class MuxoEngine {
|
|
42
|
+
readonly config: MuxoConfig;
|
|
43
|
+
readonly store: MuxoStore;
|
|
44
|
+
readonly composioSdk: ComposioSdkAdapter;
|
|
45
|
+
readonly composioInstant: ComposioInstantAdapter;
|
|
46
|
+
readonly stripeProjects: StripeProjectsAdapter;
|
|
47
|
+
readonly stripeBilling: StripeBillingAdapter;
|
|
48
|
+
readonly governance: MicrosoftGovernanceAdapter;
|
|
49
|
+
readonly supermemory: SupermemoryAdapter;
|
|
50
|
+
private readonly durableWorkflows;
|
|
51
|
+
constructor(config: MuxoConfig, store: MuxoStore);
|
|
52
|
+
getProfile(ctx: ExecutionContext): Record<string, unknown>;
|
|
53
|
+
getOrganization(ctx: ExecutionContext): Record<string, unknown>;
|
|
54
|
+
searchTools(params: {
|
|
55
|
+
query?: string;
|
|
56
|
+
lane?: ProviderLane | "all";
|
|
57
|
+
riskLevel?: RiskLevel;
|
|
58
|
+
limit?: number;
|
|
59
|
+
}): Promise<{
|
|
60
|
+
tools: MuxoTool[];
|
|
61
|
+
total: number;
|
|
62
|
+
}>;
|
|
63
|
+
listAllCatalogTools(): Promise<MuxoTool[]>;
|
|
64
|
+
inspectTool(slug: string): Promise<MuxoTool>;
|
|
65
|
+
connectionStatus(ctx: ExecutionContext, params?: {
|
|
66
|
+
provider?: string;
|
|
67
|
+
syncLive?: boolean;
|
|
68
|
+
}): Promise<Record<string, unknown>>;
|
|
69
|
+
getHostedSiteHtml(slug: string, filePath?: string): string | null;
|
|
70
|
+
startConnection(ctx: ExecutionContext, params: {
|
|
71
|
+
provider: string;
|
|
72
|
+
lane?: ProviderLane;
|
|
73
|
+
callbackUrl?: string;
|
|
74
|
+
}): Promise<ConnectionRecord & {
|
|
75
|
+
message: string;
|
|
76
|
+
callbackUrl?: string;
|
|
77
|
+
}>;
|
|
78
|
+
waitForConnection(ctx: ExecutionContext, params: {
|
|
79
|
+
provider: string;
|
|
80
|
+
timeoutSeconds?: number;
|
|
81
|
+
pollIntervalMs?: number;
|
|
82
|
+
}): Promise<{
|
|
83
|
+
ok: true;
|
|
84
|
+
connected: boolean;
|
|
85
|
+
ready: boolean;
|
|
86
|
+
timedOut: boolean;
|
|
87
|
+
provider: string;
|
|
88
|
+
status: ConnectionRecord["status"];
|
|
89
|
+
connection: ConnectionRecord;
|
|
90
|
+
redirectUrl: string | null;
|
|
91
|
+
polledAttempts: number;
|
|
92
|
+
elapsedMs: number;
|
|
93
|
+
message: string;
|
|
94
|
+
}>;
|
|
95
|
+
handleOAuthCallback(params: {
|
|
96
|
+
workspaceId: string;
|
|
97
|
+
provider: string;
|
|
98
|
+
connectedAccountId?: string;
|
|
99
|
+
status?: string;
|
|
100
|
+
}): Promise<{
|
|
101
|
+
ok: boolean;
|
|
102
|
+
workspaceId: string;
|
|
103
|
+
providerSlug: string;
|
|
104
|
+
providerName: string;
|
|
105
|
+
status: ConnectionRecord["status"];
|
|
106
|
+
externalAccountId: string | null;
|
|
107
|
+
}>;
|
|
108
|
+
planAction(ctx: ExecutionContext, params: {
|
|
109
|
+
toolSlug: string;
|
|
110
|
+
input?: Record<string, unknown>;
|
|
111
|
+
reason?: string;
|
|
112
|
+
fundingMode?: "muxo_funded" | "byok";
|
|
113
|
+
}): Promise<{
|
|
114
|
+
plan: ActionPlan;
|
|
115
|
+
tool: MuxoTool;
|
|
116
|
+
decisionRecord: GovernanceDecisionRecord;
|
|
117
|
+
memoryContext: MemoryContextSummary;
|
|
118
|
+
authHandoff?: {
|
|
119
|
+
required: boolean;
|
|
120
|
+
provider: string;
|
|
121
|
+
status: ConnectionRecord["status"];
|
|
122
|
+
redirectUrl: string | null;
|
|
123
|
+
externalAccountId: string | null;
|
|
124
|
+
instructions: string;
|
|
125
|
+
};
|
|
126
|
+
humanHandoff?: HumanHandoff;
|
|
127
|
+
llmGuidance: LlmGuidance;
|
|
128
|
+
nextStep: string;
|
|
129
|
+
}>;
|
|
130
|
+
getPlan(ctx: ExecutionContext, planId: string): ActionPlan;
|
|
131
|
+
waitForPlanApproval(ctx: ExecutionContext, params: {
|
|
132
|
+
planId: string;
|
|
133
|
+
timeoutSeconds?: number;
|
|
134
|
+
pollIntervalMs?: number;
|
|
135
|
+
}): Promise<{
|
|
136
|
+
ok: true;
|
|
137
|
+
approved: boolean;
|
|
138
|
+
rejected: boolean;
|
|
139
|
+
timedOut: boolean;
|
|
140
|
+
waitedForApproval: true;
|
|
141
|
+
approvalStatus: ActionPlan["approvalStatus"];
|
|
142
|
+
approvalUrl: string;
|
|
143
|
+
waitedMs: number;
|
|
144
|
+
plan: ActionPlan;
|
|
145
|
+
}>;
|
|
146
|
+
approvePlan(ctx: ExecutionContext, planId: string, decision?: "approved" | "rejected"): ActionPlan;
|
|
147
|
+
private buildApprovalHandoff;
|
|
148
|
+
private buildOAuthHandoff;
|
|
149
|
+
private buildPlanLlmGuidance;
|
|
150
|
+
private enrichMemoryContext;
|
|
151
|
+
getRunContext(ctx: ExecutionContext, query?: string): Promise<{
|
|
152
|
+
explanation: HumanFriendlyExplanation;
|
|
153
|
+
plainEnglishPolicy: ReturnType<typeof describePolicyInPlainEnglish>;
|
|
154
|
+
activeDefaults: ActiveMemoryDefaults;
|
|
155
|
+
activeGuardrails: string[];
|
|
156
|
+
[key: string]: unknown;
|
|
157
|
+
}>;
|
|
158
|
+
getMemoryOverview(ctx: ExecutionContext, query?: string): Promise<{
|
|
159
|
+
enabled: boolean;
|
|
160
|
+
namespace: string;
|
|
161
|
+
fundingSource: string;
|
|
162
|
+
context: MemoryContextSummary;
|
|
163
|
+
activeDefaults: ActiveMemoryDefaults;
|
|
164
|
+
activeGuardrails: string[];
|
|
165
|
+
explanation: HumanFriendlyExplanation;
|
|
166
|
+
recentMemories: WorkspaceMemoryRecord[];
|
|
167
|
+
memories: WorkspaceMemoryRecord[];
|
|
168
|
+
temporalFacts: ReturnType<MuxoStore["listTemporalFacts"]>;
|
|
169
|
+
historicalFacts: ReturnType<MuxoStore["listTemporalFacts"]>;
|
|
170
|
+
}>;
|
|
171
|
+
addWorkspaceMemory(ctx: ExecutionContext, params: {
|
|
172
|
+
title: string;
|
|
173
|
+
content: string;
|
|
174
|
+
kind?: WorkspaceMemoryRecord["kind"];
|
|
175
|
+
metadata?: Record<string, unknown>;
|
|
176
|
+
subject?: string;
|
|
177
|
+
predicate?: string;
|
|
178
|
+
object?: string;
|
|
179
|
+
}): Promise<WorkspaceMemoryRecord>;
|
|
180
|
+
deleteWorkspaceMemory(ctx: ExecutionContext, idOrDocId: string): Promise<{
|
|
181
|
+
deleted: boolean;
|
|
182
|
+
record: WorkspaceMemoryRecord | null;
|
|
183
|
+
}>;
|
|
184
|
+
forgetWorkspaceMemoryMatching(ctx: ExecutionContext, query: string): Promise<{
|
|
185
|
+
query: string;
|
|
186
|
+
deletedLocalCount: number;
|
|
187
|
+
invalidatedFactsCount: number;
|
|
188
|
+
deletedRemoteIds: string[];
|
|
189
|
+
deletedMemories: WorkspaceMemoryRecord[];
|
|
190
|
+
invalidatedFacts: ReturnType<MuxoStore["listTemporalFacts"]>;
|
|
191
|
+
}>;
|
|
192
|
+
/**
|
|
193
|
+
* Synthesizes a Bi-Temporal Knowledge Graph (entities, active relationships, superseded historical relationships,
|
|
194
|
+
* Mermaid diagram, and human + technical explanations) directly from SQLite temporal_facts, memories, resources, and connections.
|
|
195
|
+
*/
|
|
196
|
+
getMemoryGraph(ctx: ExecutionContext, query?: string): Promise<MemoryKnowledgeGraph>;
|
|
197
|
+
activateWorkspaceKillSwitch(ctx: ExecutionContext, params: {
|
|
198
|
+
reason: string;
|
|
199
|
+
action?: "terminate" | "quarantine" | "suspend";
|
|
200
|
+
}): Promise<Record<string, unknown>>;
|
|
201
|
+
resumeWorkspaceKillSwitch(ctx: ExecutionContext): Record<string, unknown>;
|
|
202
|
+
executePlanForRisk(ctx: ExecutionContext, planId: string, expectedRisk: RiskLevel): Promise<{
|
|
203
|
+
run: ExecutionRun;
|
|
204
|
+
receipt: ExecutionReceipt;
|
|
205
|
+
}>;
|
|
206
|
+
getRun(ctx: ExecutionContext, runId: string): ExecutionRun;
|
|
207
|
+
cancelRun(ctx: ExecutionContext, runId: string, reason?: string): {
|
|
208
|
+
ok: true;
|
|
209
|
+
cancelled: true;
|
|
210
|
+
alreadyCancelled: boolean;
|
|
211
|
+
previousStatus: ExecutionRun["status"];
|
|
212
|
+
run: ExecutionRun;
|
|
213
|
+
receipt: ExecutionReceipt;
|
|
214
|
+
signatureValid: boolean;
|
|
215
|
+
message: string;
|
|
216
|
+
};
|
|
217
|
+
explainReceipt(receipt: ExecutionReceipt, verification: {
|
|
218
|
+
signatureValid: boolean;
|
|
219
|
+
governanceSignatureValid: boolean;
|
|
220
|
+
agenticReceiptValid?: boolean;
|
|
221
|
+
}, policy?: Partial<Workspace["policy"]> | null, languageMode?: LanguageMode): HumanFriendlyExplanation;
|
|
222
|
+
getReceipt(ctx: ExecutionContext, receiptOrRunId: string): {
|
|
223
|
+
receipt: ExecutionReceipt;
|
|
224
|
+
agenticReceipt: PortableAgenticReceipt;
|
|
225
|
+
signatureValid: boolean;
|
|
226
|
+
governanceSignatureValid: boolean;
|
|
227
|
+
agenticReceiptValid: boolean;
|
|
228
|
+
explanation: HumanFriendlyExplanation;
|
|
229
|
+
};
|
|
230
|
+
listReceipts(ctx: ExecutionContext, limit?: number): {
|
|
231
|
+
receipts: Array<ExecutionReceipt & {
|
|
232
|
+
agenticReceipt: PortableAgenticReceipt;
|
|
233
|
+
signatureValid: boolean;
|
|
234
|
+
governanceSignatureValid: boolean;
|
|
235
|
+
agenticReceiptValid: boolean;
|
|
236
|
+
explanation: HumanFriendlyExplanation;
|
|
237
|
+
}>;
|
|
238
|
+
total: number;
|
|
239
|
+
explanation: HumanFriendlyExplanation;
|
|
240
|
+
};
|
|
241
|
+
/**
|
|
242
|
+
* Verifies the entire cryptographic receipt chain (`prevReceiptHash` -> `receiptHash`,
|
|
243
|
+
* HMAC vault signatures, Ed25519 Governance DecisionRecords, and portable Ed25519 AgenticReceipts).
|
|
244
|
+
*/
|
|
245
|
+
verifyReceiptChain(ctx: ExecutionContext, limit?: number): {
|
|
246
|
+
ok: true;
|
|
247
|
+
valid: boolean;
|
|
248
|
+
workspaceId: string;
|
|
249
|
+
agentDid: string;
|
|
250
|
+
publicKeyHex: string;
|
|
251
|
+
chainValid: boolean;
|
|
252
|
+
hashLinksValid: boolean;
|
|
253
|
+
allHmacValid: boolean;
|
|
254
|
+
allEd25519AgenticValid: boolean;
|
|
255
|
+
allGovernanceValid: boolean;
|
|
256
|
+
totalReceipts: number;
|
|
257
|
+
totalChecked: number;
|
|
258
|
+
validCount: number;
|
|
259
|
+
brokenLinks: Array<{
|
|
260
|
+
receiptId: string;
|
|
261
|
+
runId: string;
|
|
262
|
+
reason: string;
|
|
263
|
+
}>;
|
|
264
|
+
genesisHash: string;
|
|
265
|
+
headReceiptHash: string;
|
|
266
|
+
links: Array<{
|
|
267
|
+
index: number;
|
|
268
|
+
receiptId: string;
|
|
269
|
+
runId: string;
|
|
270
|
+
toolSlug: string;
|
|
271
|
+
prevReceiptHash: string;
|
|
272
|
+
receiptHash: string;
|
|
273
|
+
hashLinkValid: boolean;
|
|
274
|
+
hmacValid: boolean;
|
|
275
|
+
ed25519AgenticValid: boolean;
|
|
276
|
+
governanceValid: boolean;
|
|
277
|
+
issuedAt: string;
|
|
278
|
+
}>;
|
|
279
|
+
explanation: HumanFriendlyExplanation;
|
|
280
|
+
};
|
|
281
|
+
getGovernanceOverview(ctx: ExecutionContext): {
|
|
282
|
+
workspaceId: string;
|
|
283
|
+
killSwitch: {
|
|
284
|
+
active: boolean;
|
|
285
|
+
reason: string | null;
|
|
286
|
+
};
|
|
287
|
+
governance: ReturnType<MicrosoftGovernanceAdapter["getStatus"]>;
|
|
288
|
+
trustScore: ReturnType<MicrosoftGovernanceAdapter["getWorkspaceTrustScore"]>;
|
|
289
|
+
policy: Workspace["policy"];
|
|
290
|
+
plainEnglish: ReturnType<typeof describePolicyInPlainEnglish>;
|
|
291
|
+
llmPolicyBrief: LlmPolicyAndGovernanceBrief;
|
|
292
|
+
explanation: HumanFriendlyExplanation;
|
|
293
|
+
};
|
|
294
|
+
resetWorkspaceGuardrails(ctx: ExecutionContext): {
|
|
295
|
+
ok: true;
|
|
296
|
+
action: "reset_guardrails";
|
|
297
|
+
workspace: Workspace;
|
|
298
|
+
policy: Workspace["policy"];
|
|
299
|
+
plainEnglish: ReturnType<typeof describePolicyInPlainEnglish>;
|
|
300
|
+
llmPolicyBrief: LlmPolicyAndGovernanceBrief;
|
|
301
|
+
explanation: HumanFriendlyExplanation;
|
|
302
|
+
};
|
|
303
|
+
checkToolPolicy(ctx: ExecutionContext, params: {
|
|
304
|
+
toolSlug: string;
|
|
305
|
+
input?: Record<string, unknown>;
|
|
306
|
+
}): Promise<PolicySimulationResult>;
|
|
307
|
+
setKillSwitch(ctx: ExecutionContext, active: boolean, reason?: string): Workspace;
|
|
308
|
+
scanForContextPoisoning(workspaceId: string, text: string): {
|
|
309
|
+
poisoned: boolean;
|
|
310
|
+
severity: string;
|
|
311
|
+
matchedPatterns: string[];
|
|
312
|
+
findingsCount: number;
|
|
313
|
+
integrityValid: boolean;
|
|
314
|
+
};
|
|
315
|
+
getGuardrailsSummary(ctx: ExecutionContext): {
|
|
316
|
+
workspaceId: string;
|
|
317
|
+
policy: Workspace["policy"];
|
|
318
|
+
plainEnglish: ReturnType<typeof describePolicyInPlainEnglish>;
|
|
319
|
+
llmPolicyBrief: LlmPolicyAndGovernanceBrief;
|
|
320
|
+
activeDefaults: ActiveMemoryDefaults;
|
|
321
|
+
activeGuardrails: string[];
|
|
322
|
+
};
|
|
323
|
+
applyNaturalLanguageGuardrail(ctx: ExecutionContext, prompt: string, options?: GuardrailCompileOptions): Promise<{
|
|
324
|
+
ok: boolean;
|
|
325
|
+
workspace: Workspace;
|
|
326
|
+
guardrail: ParsedNaturalLanguageGuardrail;
|
|
327
|
+
plainEnglish: ReturnType<typeof describePolicyInPlainEnglish>;
|
|
328
|
+
llmPolicyBrief: LlmPolicyAndGovernanceBrief;
|
|
329
|
+
memoryRecord?: WorkspaceMemoryRecord;
|
|
330
|
+
}>;
|
|
331
|
+
doNaturalLanguage(ctx: ExecutionContext, params: {
|
|
332
|
+
prompt: string;
|
|
333
|
+
input?: Record<string, unknown>;
|
|
334
|
+
autoApprove?: boolean;
|
|
335
|
+
dryRun?: boolean;
|
|
336
|
+
planOnly?: boolean;
|
|
337
|
+
fundingMode?: "muxo_funded" | "byok";
|
|
338
|
+
}): Promise<{
|
|
339
|
+
ok: boolean;
|
|
340
|
+
executed: boolean;
|
|
341
|
+
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";
|
|
342
|
+
intent: NaturalLanguageResolution;
|
|
343
|
+
resolution: NaturalLanguageResolution;
|
|
344
|
+
plan?: ActionPlan;
|
|
345
|
+
run?: ExecutionRun;
|
|
346
|
+
receipt?: ExecutionReceipt;
|
|
347
|
+
receiptVerification?: {
|
|
348
|
+
receipt: ExecutionReceipt;
|
|
349
|
+
agenticReceipt?: PortableAgenticReceipt;
|
|
350
|
+
signatureValid: boolean;
|
|
351
|
+
governanceSignatureValid: boolean;
|
|
352
|
+
agenticReceiptValid?: boolean;
|
|
353
|
+
explanation: HumanFriendlyExplanation;
|
|
354
|
+
};
|
|
355
|
+
receiptsList?: ReturnType<MuxoEngine["listReceipts"]>;
|
|
356
|
+
receiptChain?: ReturnType<MuxoEngine["verifyReceiptChain"]>;
|
|
357
|
+
guardrail?: ParsedNaturalLanguageGuardrail;
|
|
358
|
+
plainEnglishGuardrails?: ReturnType<typeof describePolicyInPlainEnglish>;
|
|
359
|
+
memoryRecord?: WorkspaceMemoryRecord;
|
|
360
|
+
memoryOverview?: Awaited<ReturnType<MuxoEngine["getMemoryOverview"]>>;
|
|
361
|
+
memoryGraph?: MemoryKnowledgeGraph;
|
|
362
|
+
deletedMemoryId?: string;
|
|
363
|
+
governanceStatus?: ReturnType<MuxoEngine["getGovernanceOverview"]>;
|
|
364
|
+
poisoningScan?: ReturnType<MuxoEngine["scanForContextPoisoning"]>;
|
|
365
|
+
runContext?: Awaited<ReturnType<MuxoEngine["getRunContext"]>>;
|
|
366
|
+
explanation?: HumanFriendlyExplanation;
|
|
367
|
+
activeDefaults?: ActiveMemoryDefaults;
|
|
368
|
+
activeMemoryDefaults?: ActiveMemoryDefaults;
|
|
369
|
+
memoryAutoFilled?: Record<string, unknown>;
|
|
370
|
+
authHandoff?: Record<string, unknown>;
|
|
371
|
+
humanHandoff?: HumanHandoff;
|
|
372
|
+
llmGuidance?: LlmGuidance;
|
|
373
|
+
byokPrompt?: {
|
|
374
|
+
needed: boolean;
|
|
375
|
+
provider: string;
|
|
376
|
+
envVarName: string;
|
|
377
|
+
cliCommand: string;
|
|
378
|
+
message: string;
|
|
379
|
+
};
|
|
380
|
+
humanMessage: string;
|
|
381
|
+
}>;
|
|
382
|
+
/**
|
|
383
|
+
* Parallel Governed Multi-Tool Batch Execution (`COMPOSIO_MULTI_EXECUTE_TOOL` pattern).
|
|
384
|
+
* Evaluates governance & policy across every item, then executes all approved plans concurrently.
|
|
385
|
+
*/
|
|
386
|
+
executeBatchPlans(ctx: ExecutionContext, params: {
|
|
387
|
+
items: Array<{
|
|
388
|
+
toolSlug: string;
|
|
389
|
+
input: Record<string, unknown>;
|
|
390
|
+
reason: string;
|
|
391
|
+
}>;
|
|
392
|
+
autoApprove?: boolean;
|
|
393
|
+
}): Promise<{
|
|
394
|
+
batchId: string;
|
|
395
|
+
totalRequested: number;
|
|
396
|
+
succeededCount: number;
|
|
397
|
+
blockedOrPendingCount: number;
|
|
398
|
+
results: Array<{
|
|
399
|
+
toolSlug: string;
|
|
400
|
+
status: "succeeded" | "failed" | "awaiting_approval" | "awaiting_oauth";
|
|
401
|
+
planId?: string;
|
|
402
|
+
runId?: string;
|
|
403
|
+
receiptId?: string;
|
|
404
|
+
output?: Record<string, unknown>;
|
|
405
|
+
error?: string;
|
|
406
|
+
}>;
|
|
407
|
+
}>;
|
|
408
|
+
/**
|
|
409
|
+
* Cloudflare Workflows (`step.do`, `step.waitForEvent`, `step.sleep`) Durable Orchestrator
|
|
410
|
+
* for multi-stage async Stripe v2 Cloud Provisioning & Vault Secret Injection.
|
|
411
|
+
*/
|
|
412
|
+
startDurableWorkflow(ctx: ExecutionContext, params: {
|
|
413
|
+
provider?: string;
|
|
414
|
+
serviceRef?: string;
|
|
415
|
+
name?: string;
|
|
416
|
+
region?: string;
|
|
417
|
+
}): Promise<DurableWorkflow>;
|
|
418
|
+
advanceDurableWorkflow(ctx: ExecutionContext, workflowId: string, eventPayload?: Record<string, unknown>): Promise<DurableWorkflow>;
|
|
419
|
+
listDurableWorkflows(workspaceId: string): DurableWorkflow[];
|
|
420
|
+
/**
|
|
421
|
+
* Hybrid Semantic Vector + Bi-Temporal Recall (`@cf/baai/bge-base-en-v1.5` + Vectorize model).
|
|
422
|
+
*/
|
|
423
|
+
searchMemoryHybrid(workspaceId: string, query: string, limit?: number): {
|
|
424
|
+
rankedMemories: Array<WorkspaceMemoryRecord & {
|
|
425
|
+
hybridScore: number;
|
|
426
|
+
vectorSimilarity: number;
|
|
427
|
+
lexicalOverlap: number;
|
|
428
|
+
}>;
|
|
429
|
+
vectorDimensions: number;
|
|
430
|
+
embeddingModel: string;
|
|
431
|
+
topScore: number;
|
|
432
|
+
};
|
|
433
|
+
/**
|
|
434
|
+
* Tamper-Evident R2 / WORM Audit Archive Bundle signed by the workspace's Ed25519 AgentIdentity.
|
|
435
|
+
*/
|
|
436
|
+
exportTamperEvidentArchive(workspaceId: string): {
|
|
437
|
+
archiveId: string;
|
|
438
|
+
workspaceId: string;
|
|
439
|
+
storageTarget: string;
|
|
440
|
+
retentionMode: string;
|
|
441
|
+
exportedAt: string;
|
|
442
|
+
chainIntegrity: {
|
|
443
|
+
verified: boolean;
|
|
444
|
+
algorithm: string;
|
|
445
|
+
agentDid: string;
|
|
446
|
+
publicKeyFingerprint: string;
|
|
447
|
+
headMerkleHash: string;
|
|
448
|
+
bundleDigest: string;
|
|
449
|
+
};
|
|
450
|
+
counts: {
|
|
451
|
+
receipts: number;
|
|
452
|
+
governanceDecisions: number;
|
|
453
|
+
auditLogs: number;
|
|
454
|
+
temporalFacts: number;
|
|
455
|
+
};
|
|
456
|
+
merkleChain: {
|
|
457
|
+
sequence: number;
|
|
458
|
+
receiptId: string;
|
|
459
|
+
toolSlug: string;
|
|
460
|
+
prevHash: string;
|
|
461
|
+
entryHash: string;
|
|
462
|
+
createdAt: string;
|
|
463
|
+
}[];
|
|
464
|
+
};
|
|
465
|
+
}
|