@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.
Files changed (72) hide show
  1. package/.agents/plugins/marketplace.json +2 -2
  2. package/.claude-plugin/marketplace.json +19 -4
  3. package/.codex/config.toml +9 -2
  4. package/ARCHITECTURE.md +16 -6
  5. package/README.md +69 -24
  6. package/dist/clerk.d.ts +35 -0
  7. package/dist/clerk.js +201 -0
  8. package/dist/cli.js +1589 -103
  9. package/dist/composio-catalog.d.ts +234 -0
  10. package/dist/composio-catalog.js +1894 -0
  11. package/dist/config.d.ts +16 -0
  12. package/dist/config.js +27 -1
  13. package/dist/durable-workflow.d.ts +45 -0
  14. package/dist/durable-workflow.js +90 -0
  15. package/dist/engine.d.ts +315 -6
  16. package/dist/engine.js +1778 -94
  17. package/dist/mcp-schema.d.ts +286 -0
  18. package/dist/mcp-schema.js +2559 -0
  19. package/dist/mcp.d.ts +2 -25
  20. package/dist/mcp.js +949 -507
  21. package/dist/memory-graph.d.ts +21 -0
  22. package/dist/memory-graph.js +173 -0
  23. package/dist/nl.js +214 -35
  24. package/dist/oauth.d.ts +32 -0
  25. package/dist/oauth.js +134 -0
  26. package/dist/policy.d.ts +190 -0
  27. package/dist/policy.js +1597 -0
  28. package/dist/providers/composio-instant.d.ts +4 -0
  29. package/dist/providers/composio-instant.js +890 -535
  30. package/dist/providers/composio-sdk.d.ts +126 -5
  31. package/dist/providers/composio-sdk.js +902 -79
  32. package/dist/providers/microsoft-governance.d.ts +89 -3
  33. package/dist/providers/microsoft-governance.js +673 -26
  34. package/dist/providers/stripe-billing.d.ts +42 -0
  35. package/dist/providers/stripe-billing.js +244 -5
  36. package/dist/providers/stripe-projects.d.ts +459 -4
  37. package/dist/providers/stripe-projects.js +2674 -122
  38. package/dist/providers/supermemory.d.ts +102 -6
  39. package/dist/providers/supermemory.js +609 -55
  40. package/dist/provisioning-managed.d.ts +50 -0
  41. package/dist/provisioning-managed.js +155 -0
  42. package/dist/sdk.d.ts +705 -7
  43. package/dist/sdk.js +488 -10
  44. package/dist/server.js +2646 -348
  45. package/dist/store.d.ts +138 -6
  46. package/dist/store.js +932 -58
  47. package/dist/types.d.ts +312 -4
  48. package/dist/ui/console-html.d.ts +62 -0
  49. package/dist/ui/console-html.js +3742 -2228
  50. package/dist/ui/design-tokens.d.ts +177 -0
  51. package/dist/ui/design-tokens.js +210 -0
  52. package/dist/version.d.ts +1 -0
  53. package/dist/version.js +1 -0
  54. package/package.json +5 -4
  55. package/plugins/muxo/.app.json +1 -1
  56. package/plugins/muxo/.claude-plugin/plugin.json +3 -3
  57. package/plugins/muxo/.codex-plugin/plugin.json +19 -10
  58. package/plugins/muxo/.cursor-plugin/plugin.json +30 -0
  59. package/plugins/muxo/.mcp.json +1 -33
  60. package/plugins/muxo/assets/logo.png +0 -0
  61. package/plugins/muxo/hooks/session-start.sh +16 -4
  62. package/plugins/muxo/hooks/user-prompt-submit.sh +14 -1
  63. package/plugins/muxo/mcp.json +0 -10
  64. package/plugins/muxo/plugin.json +65 -8
  65. package/plugins/muxo/skills/muxo/SKILL.md +142 -14
  66. package/plugins/muxo/skills/muxo/agents/openai.yaml +12 -0
  67. package/plugins/muxo/skills/muxo/references/cli.md +9 -3
  68. package/plugins/muxo/skills/muxo/references/mcp.md +22 -10
  69. package/plugins/muxo/skills/muxo-activity-summary/SKILL.md +81 -0
  70. package/plugins/muxo/skills/setup/SKILL.md +17 -3
  71. package/plugins/muxo/skills/setup/agents/openai.yaml +12 -0
  72. package/src/catalogues/stripe-projects-catalog.json +140 -0
@@ -1,7 +1,13 @@
1
- import { AgentIdentity, AuditLogger } from "../../vendor/microsoft-governance/dist/index.js";
2
- import type { ActionPlan, GovernanceDecisionRecord, MuxoTool, Workspace } from "../types.js";
1
+ import { AgentIdentity, AuditLogger, type ContextPoisoningScanResult, type KillSwitchResult, type TrustScore } from "../../vendor/microsoft-governance/dist/index.js";
2
+ import type { ActionPlan, ExecutionReceipt, ExecutionRun, GovernanceDecisionRecord, GovernancePolicy, HumanFriendlyExplanation, LanguageMode, MuxoTool, PortableAgenticReceipt, Workspace } from "../types.js";
3
+ export declare const RING_LABELS: Record<number, string>;
3
4
  export declare class MicrosoftGovernanceAdapter {
4
5
  private readonly scanner;
6
+ private readonly contextPoisoningDetector;
7
+ private readonly facetRegistry;
8
+ private readonly trustManager;
9
+ private readonly killSwitch;
10
+ private readonly activeKillSwitches;
5
11
  private readonly seedMaterial;
6
12
  private readonly auditLoggers;
7
13
  private readonly identities;
@@ -15,13 +21,66 @@ export declare class MicrosoftGovernanceAdapter {
15
21
  * Returns (or lazily initializes) the SHA-256 hash-chained AuditLogger for a workspace.
16
22
  */
17
23
  getWorkspaceAuditLogger(workspaceId: string): AuditLogger;
24
+ /**
25
+ * Scans memory or prompt context for OWASP ASI-06 Context Poisoning (prompt injection,
26
+ * roleplay overrides, delimiter injection, high-entropy exfiltration payloads, and session isolation).
27
+ */
28
+ scanMemoryContent(params: {
29
+ workspaceId: string;
30
+ sessionId?: string;
31
+ entryId?: string;
32
+ role?: "user" | "assistant" | "tool" | "system";
33
+ content: string;
34
+ recordInDetector?: boolean;
35
+ }): {
36
+ safe: boolean;
37
+ riskLevel: "none" | "low" | "medium" | "high" | "critical";
38
+ findingsCount: number;
39
+ findings: Array<{
40
+ patternId: string;
41
+ patternName: string;
42
+ severity: string;
43
+ description: string;
44
+ }>;
45
+ integrityValid: boolean;
46
+ };
47
+ getContextPoisoningReport(workspaceId: string, sessionId?: string): ContextPoisoningScanResult;
48
+ /**
49
+ * Extracts structured SQL, Kubernetes, and Infrastructure protocol facets from tool input.
50
+ */
51
+ extractActionFacets(tool: MuxoTool, input: Record<string, unknown>): NonNullable<GovernanceDecisionRecord["protocolFacets"]>;
52
+ /**
53
+ * Evaluates hardware-style privilege rings (Ring 0..Ring 3) via Microsoft RingEnforcer.
54
+ */
55
+ evaluateRingEnforcement(workspace: Workspace, tool: MuxoTool, ownerApproved: boolean): NonNullable<GovernanceDecisionRecord["ringEnforcement"]>;
56
+ /**
57
+ * Records an agent execution outcome in the Bayesian TrustManager and returns the updated TrustScore.
58
+ */
59
+ recordAgentOutcome(workspaceId: string, succeeded: boolean, weight?: number): TrustScore;
60
+ /**
61
+ * Returns the current Bayesian TrustScore for a workspace agent boundary.
62
+ */
63
+ getWorkspaceTrustScore(workspaceId: string): NonNullable<GovernanceDecisionRecord["trustScore"]>;
64
+ /**
65
+ * Activates the emergency KillSwitch for a workspace agent boundary.
66
+ */
67
+ activateKillSwitch(workspaceId: string, reason: string, action?: "terminate" | "quarantine" | "suspend"): Promise<KillSwitchResult>;
68
+ /**
69
+ * Resumes a workspace agent boundary after a KillSwitch quarantine/suspension.
70
+ */
71
+ resumeKillSwitch(workspaceId: string): {
72
+ resumed: boolean;
73
+ workspaceId: string;
74
+ resumedAt: string;
75
+ };
76
+ isKillSwitchActive(workspaceId: string): KillSwitchResult | null;
18
77
  /**
19
78
  * Compiles the workspace's GovernancePolicy into a declarative Microsoft PolicyEngine instance.
20
79
  */
21
80
  private createPolicyEngine;
22
81
  /**
23
82
  * Runs the full Microsoft Agent Governance pipeline:
24
- * Agent ──► McpSecurityScanner ──► PolicyEngine ──► AgentIdentity (Ed25519 DID) ──► AuditLogger ──► DecisionRecord
83
+ * Agent ──► KillSwitch ──► McpSecurityScanner & ContextPoisoningDetector (ASI-06) ──► ProtocolFacets (SQL/K8s/Infra) ──► RingEnforcer ──► PolicyEngine ──► TrustManager ──► AgentIdentity (Ed25519 DID) ──► AuditLogger ──► DecisionRecord
25
84
  */
26
85
  evaluateAction(params: {
27
86
  workspace: Workspace;
@@ -49,6 +108,20 @@ export declare class MicrosoftGovernanceAdapter {
49
108
  * Verifies a DecisionRecord's Ed25519 signature and the workspace's SHA-256 audit hash chain.
50
109
  */
51
110
  verifyDecisionRecord(workspaceOrRecord: Workspace | GovernanceDecisionRecord, maybeRecord?: GovernanceDecisionRecord): boolean;
111
+ /**
112
+ * Builds a portable Ed25519-signed AgenticReceipt envelope (compatible with the `agentic-receipts` spec)
113
+ * so external verifiers can validate input/output SHA-256 hashes, hash chaining, and Ed25519 signature
114
+ * using only the workspace's public key and DID without needing the internal vault HMAC key.
115
+ */
116
+ buildPortableAgenticReceipt(params: {
117
+ receipt: ExecutionReceipt;
118
+ run?: ExecutionRun | null;
119
+ workspace?: Workspace | null;
120
+ }): PortableAgenticReceipt;
121
+ /**
122
+ * Verifies a PortableAgenticReceipt's Ed25519 signature over its canonical hash-chained payload.
123
+ */
124
+ verifyPortableAgenticReceipt(agenticReceipt: PortableAgenticReceipt, workspace?: Workspace | null): boolean;
52
125
  getStatus(workspace?: Workspace): {
53
126
  sdk: string;
54
127
  sdkVersion: string;
@@ -64,3 +137,16 @@ export declare class MicrosoftGovernanceAdapter {
64
137
  */
65
138
  getGovernanceStatus(workspace: Workspace): Record<string, unknown>;
66
139
  }
140
+ export declare function explainDecisionRecord(record: GovernanceDecisionRecord, policy?: Partial<GovernancePolicy> | null, languageMode?: LanguageMode): HumanFriendlyExplanation;
141
+ export declare function explainGovernanceStatus(params: {
142
+ workspace: Workspace;
143
+ agentDid: string;
144
+ trustScore: NonNullable<GovernanceDecisionRecord["trustScore"]>;
145
+ killSwitchActive: boolean;
146
+ killSwitchReason: string | null;
147
+ poisoned: boolean;
148
+ findingsCount: number;
149
+ auditEntriesCount: number;
150
+ chainVerified: boolean;
151
+ languageMode?: LanguageMode;
152
+ }): HumanFriendlyExplanation;