@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,5 +1,5 @@
1
1
  import type { MuxoConfig } from "../config.js";
2
- import type { MemoryContextSummary, MemoryRecordKind } from "../types.js";
2
+ import type { GovernancePolicy, HumanFriendlyExplanation, LanguageMode, MemoryContextSummary, MemoryRecordKind, TemporalGraphFact, WorkspaceMemoryRecord } from "../types.js";
3
3
  /**
4
4
  * Supermemory v5 Contextual Brain & Context-Aware Tool Call Adapter.
5
5
  * Uses deterministic per-workspace namespaces (`/ns/muxo-v5-<hash>/...`)
@@ -8,8 +8,12 @@ import type { MemoryContextSummary, MemoryRecordKind } from "../types.js";
8
8
  export declare class SupermemoryAdapter {
9
9
  private readonly config;
10
10
  private readonly client;
11
+ private readonly byokClients;
12
+ private unavailableUntil;
11
13
  constructor(config: MuxoConfig);
12
- isEnabled(): boolean;
14
+ private resolveClient;
15
+ private withTimeout;
16
+ isEnabled(apiKeyOverride?: string | null): boolean;
13
17
  /**
14
18
  * Derives a strict Supermemory v5 namespace (`^[a-zA-Z0-9_:-]+$`) scoped to a workspace.
15
19
  */
@@ -22,15 +26,17 @@ export declare class SupermemoryAdapter {
22
26
  sanitizeContent(raw: string): string;
23
27
  /**
24
28
  * Fetches the workspace's static + dynamic profile and optionally semantic search results
25
- * in a single fail-open call.
29
+ * in a single fail-open call. Supports customer BYOK `supermemory` keys via `apiKeyOverride`.
26
30
  */
27
31
  getContextForWorkspace(workspaceIdOrParams: string | {
28
32
  workspaceId: string;
29
33
  query?: string;
30
34
  limit?: number;
31
- }, optionalQuery?: string): Promise<MemoryContextSummary>;
35
+ apiKeyOverride?: string | null;
36
+ }, optionalQuery?: string, optionalApiKeyOverride?: string | null): Promise<MemoryContextSummary>;
32
37
  /**
33
- * Stores a governed, secret-sanitized document/memory in the workspace's Supermemory v5 namespace.
38
+ * Stores a governed, secret-sanitized document/memory in the workspace's Supermemory v5 namespace
39
+ * with `dreaming: "instant"` so profile facts are synthesized immediately.
34
40
  */
35
41
  addMemory(params: {
36
42
  workspaceId: string;
@@ -39,11 +45,14 @@ export declare class SupermemoryAdapter {
39
45
  content: string;
40
46
  kind: MemoryRecordKind;
41
47
  metadata?: Record<string, unknown>;
48
+ apiKeyOverride?: string | null;
49
+ dreaming?: "auto" | "instant";
42
50
  }): Promise<{
43
51
  documentId: string;
44
52
  namespace: string;
45
53
  status: string;
46
54
  sanitizedContent: string;
55
+ fundingSource: "muxo_funded" | "customer_byok_supermemory" | "local_fallback";
47
56
  }>;
48
57
  recordExecutionMemory(params: {
49
58
  workspaceId: string;
@@ -53,12 +62,99 @@ export declare class SupermemoryAdapter {
53
62
  reason: string;
54
63
  status: string;
55
64
  summary: string;
65
+ apiKeyOverride?: string | null;
56
66
  }): Promise<string | null>;
57
67
  /**
58
68
  * Deletes/forgets a memory document from the workspace's Supermemory v5 namespace.
59
69
  */
60
- deleteMemory(workspaceId: string, documentId: string): Promise<{
70
+ deleteMemory(workspaceId: string, documentId: string, apiKeyOverride?: string | null): Promise<{
61
71
  deleted: boolean;
62
72
  namespace: string;
63
73
  }>;
74
+ /**
75
+ * Semantically searches and forgets/prunes outdated memories in Supermemory v5 matching a query.
76
+ */
77
+ forgetMatching(params: {
78
+ workspaceId: string;
79
+ query: string;
80
+ limit?: number;
81
+ apiKeyOverride?: string | null;
82
+ }): Promise<{
83
+ namespace: string;
84
+ deletedRemoteIds: string[];
85
+ fundingSource: "muxo_funded" | "customer_byok_supermemory" | "local_fallback";
86
+ }>;
64
87
  }
88
+ export interface ActiveMemoryDefaults {
89
+ defaultRegion?: string;
90
+ defaultGithubOwner?: string;
91
+ defaultGithubRepo?: string;
92
+ defaultGithubFullRepo?: string;
93
+ defaultSlackChannel?: string;
94
+ defaultEmail?: string;
95
+ defaultDomain?: string;
96
+ defaultUrl?: string;
97
+ defaultPlan?: string;
98
+ [key: string]: unknown;
99
+ }
100
+ export declare function extractActiveMemoryDefaults(params: {
101
+ memories?: WorkspaceMemoryRecord[];
102
+ temporalFacts?: TemporalGraphFact[];
103
+ preferences?: string[];
104
+ staticFacts?: string[];
105
+ }): {
106
+ activeDefaults: ActiveMemoryDefaults;
107
+ activeGuardrails: string[];
108
+ };
109
+ export declare function applyActiveMemoryToToolInput(params: {
110
+ toolSlug: string;
111
+ input: Record<string, unknown>;
112
+ activeDefaults?: ActiveMemoryDefaults;
113
+ }): {
114
+ mergedInput: Record<string, unknown>;
115
+ autoFilledInput: Record<string, unknown>;
116
+ explanations: string[];
117
+ };
118
+ export declare function parseNaturalLanguageMemoryInstruction(prompt: string): {
119
+ isMemoryInstruction: boolean;
120
+ title: string;
121
+ content: string;
122
+ kind: MemoryRecordKind;
123
+ extractedDefaults: ActiveMemoryDefaults;
124
+ temporalFacts: Array<{
125
+ subject: string;
126
+ predicate: string;
127
+ object: string;
128
+ summary: string;
129
+ }>;
130
+ humanSummary: string;
131
+ };
132
+ export declare function explainMemoryContext(params: {
133
+ memory: MemoryContextSummary;
134
+ localCount?: number;
135
+ activeTemporalCount?: number;
136
+ historicalTemporalCount?: number;
137
+ policy?: Partial<GovernancePolicy> | null;
138
+ languageMode?: LanguageMode;
139
+ }): HumanFriendlyExplanation;
140
+ /**
141
+ * Deterministic 64-dimensional semantic feature-hashing embedding vector
142
+ * compatible with Cloudflare Vectorize / Workers AI (`@cf/baai/bge-base-en-v1.5`) hybrid recall.
143
+ */
144
+ export declare function computeSemanticEmbedding(text: string, dimensions?: number): number[];
145
+ export declare function cosineSimilarity(vecA: number[], vecB: number[]): number;
146
+ export declare function rankMemoriesHybrid(params: {
147
+ query: string;
148
+ memories: WorkspaceMemoryRecord[];
149
+ temporalFacts?: TemporalGraphFact[];
150
+ limit?: number;
151
+ }): {
152
+ rankedMemories: Array<WorkspaceMemoryRecord & {
153
+ hybridScore: number;
154
+ vectorSimilarity: number;
155
+ lexicalOverlap: number;
156
+ }>;
157
+ vectorDimensions: number;
158
+ embeddingModel: string;
159
+ topScore: number;
160
+ };