@muxoai/platform 1.3.0 → 1.3.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 (51) hide show
  1. package/.agents/plugins/marketplace.json +1 -1
  2. package/.claude-plugin/marketplace.json +19 -4
  3. package/.codex/config.toml +9 -2
  4. package/README.md +63 -20
  5. package/dist/clerk.d.ts +33 -0
  6. package/dist/clerk.js +198 -0
  7. package/dist/cli.js +1181 -99
  8. package/dist/engine.d.ts +22 -1
  9. package/dist/engine.js +284 -14
  10. package/dist/mcp.d.ts +6 -1
  11. package/dist/mcp.js +109 -22
  12. package/dist/nl.js +60 -36
  13. package/dist/policy.d.ts +9 -0
  14. package/dist/policy.js +73 -0
  15. package/dist/providers/composio-instant.d.ts +4 -0
  16. package/dist/providers/composio-instant.js +634 -534
  17. package/dist/providers/composio-sdk.d.ts +1 -0
  18. package/dist/providers/composio-sdk.js +6 -2
  19. package/dist/providers/microsoft-governance.d.ts +61 -2
  20. package/dist/providers/microsoft-governance.js +458 -24
  21. package/dist/providers/stripe-billing.js +14 -4
  22. package/dist/providers/stripe-projects.d.ts +4 -1
  23. package/dist/providers/stripe-projects.js +123 -12
  24. package/dist/providers/supermemory.d.ts +28 -5
  25. package/dist/providers/supermemory.js +183 -55
  26. package/dist/sdk.d.ts +167 -1
  27. package/dist/sdk.js +113 -2
  28. package/dist/server.js +258 -40
  29. package/dist/store.d.ts +26 -1
  30. package/dist/store.js +255 -6
  31. package/dist/types.d.ts +86 -0
  32. package/dist/ui/console-html.d.ts +16 -0
  33. package/dist/ui/console-html.js +2427 -2206
  34. package/dist/ui/design-tokens.d.ts +177 -0
  35. package/dist/ui/design-tokens.js +210 -0
  36. package/dist/version.d.ts +1 -0
  37. package/dist/version.js +1 -0
  38. package/package.json +2 -2
  39. package/plugins/muxo/.app.json +1 -1
  40. package/plugins/muxo/.claude-plugin/plugin.json +2 -2
  41. package/plugins/muxo/.codex-plugin/plugin.json +7 -5
  42. package/plugins/muxo/.mcp.json +1 -33
  43. package/plugins/muxo/assets/logo.png +0 -0
  44. package/plugins/muxo/hooks/session-start.sh +1 -1
  45. package/plugins/muxo/plugin.json +63 -6
  46. package/plugins/muxo/skills/muxo/SKILL.md +92 -14
  47. package/plugins/muxo/skills/muxo/agents/openai.yaml +12 -0
  48. package/plugins/muxo/skills/muxo/references/cli.md +4 -2
  49. package/plugins/muxo/skills/muxo/references/mcp.md +15 -9
  50. package/plugins/muxo/skills/setup/SKILL.md +8 -2
  51. package/plugins/muxo/skills/setup/agents/openai.yaml +12 -0
package/dist/sdk.js CHANGED
@@ -52,6 +52,26 @@ export class MuxoClient {
52
52
  harness: params.harness || "muxo-sdk",
53
53
  });
54
54
  }
55
+ static async register(params, baseUrl = "https://app.muxo.ai") {
56
+ const client = new MuxoClient({ baseUrl });
57
+ return client.register(params);
58
+ }
59
+ static async login(params, baseUrl = "https://app.muxo.ai") {
60
+ const client = new MuxoClient({ baseUrl });
61
+ return client.login(params);
62
+ }
63
+ async register(params) {
64
+ return this.request("/api/v1/auth/register", {
65
+ method: "POST",
66
+ body: params,
67
+ });
68
+ }
69
+ async login(params) {
70
+ return this.request("/api/v1/auth/login", {
71
+ method: "POST",
72
+ body: params,
73
+ });
74
+ }
55
75
  async signupAgent(params) {
56
76
  return this.request("/api/v1/agents/signup", {
57
77
  method: "POST",
@@ -80,6 +100,10 @@ export class MuxoClient {
80
100
  if (rpcRes.error) {
81
101
  throw new Error(rpcRes.error.message || "MCP call failed");
82
102
  }
103
+ if (rpcRes.result?.isError) {
104
+ const errObj = rpcRes.result.structuredContent;
105
+ throw new Error(String(errObj?.error || rpcRes.result.content?.[0]?.text || "MCP tool execution failed"));
106
+ }
83
107
  if (rpcRes.result?.structuredContent) {
84
108
  return rpcRes.result.structuredContent;
85
109
  }
@@ -111,6 +135,9 @@ export class MuxoClient {
111
135
  body: params,
112
136
  });
113
137
  }
138
+ async getPlan(planId) {
139
+ return this.request(`/api/v1/plans/${encodeURIComponent(planId)}`);
140
+ }
114
141
  async approvePlan(planId) {
115
142
  return this.request(`/api/v1/plans/${encodeURIComponent(planId)}/approve`, {
116
143
  method: "POST",
@@ -121,11 +148,21 @@ export class MuxoClient {
121
148
  method: "POST",
122
149
  });
123
150
  }
151
+ async getRun(runId) {
152
+ return this.request(`/api/v1/runs/${encodeURIComponent(runId)}`);
153
+ }
154
+ async cancelRun(runId, reason) {
155
+ return this.request(`/api/v1/runs/${encodeURIComponent(runId)}/cancel`, {
156
+ method: "POST",
157
+ body: reason ? { reason } : {},
158
+ });
159
+ }
124
160
  async exec(toolSlug, input = {}, options = {}) {
125
161
  const planned = await this.planAction({
126
162
  toolSlug,
127
163
  input,
128
164
  reason: options.reason,
165
+ fundingMode: options.fundingMode,
129
166
  });
130
167
  let plan = planned.plan;
131
168
  if (plan.approvalStatus === "pending_approval" && options.approve) {
@@ -199,7 +236,13 @@ export class MuxoClient {
199
236
  };
200
237
  }
201
238
  async getBillingStatus() {
202
- return this.getSettlements();
239
+ const res = await this.request("/api/v1/billing/status");
240
+ if (res.settlementSummary &&
241
+ res.settlementSummary.totalCustomerChargedCredits === undefined) {
242
+ res.settlementSummary.totalCustomerChargedCredits =
243
+ res.settlementSummary.totalCreditsConsumed;
244
+ }
245
+ return res;
203
246
  }
204
247
  async settlements() {
205
248
  const res = await this.getSettlements();
@@ -221,14 +264,82 @@ export class MuxoClient {
221
264
  const suffix = query ? `?query=${encodeURIComponent(query)}` : "";
222
265
  return this.request(`/api/v1/memory${suffix}`);
223
266
  }
267
+ async addMemory(paramsOrContent) {
268
+ const body = typeof paramsOrContent === "string"
269
+ ? { title: paramsOrContent.slice(0, 60), content: paramsOrContent }
270
+ : paramsOrContent;
271
+ return this.request("/api/v1/memory", {
272
+ method: "POST",
273
+ body,
274
+ });
275
+ }
276
+ async deleteMemory(id) {
277
+ return this.request(`/api/v1/memory/${encodeURIComponent(id)}`, {
278
+ method: "DELETE",
279
+ });
280
+ }
281
+ async getMemoryFacts(options = {}) {
282
+ const opts = typeof options === "boolean" ? { includeHistorical: options } : options;
283
+ const params = new URLSearchParams();
284
+ params.set("historical", opts.includeHistorical === false ? "false" : "true");
285
+ if (opts.query)
286
+ params.set("query", opts.query);
287
+ if (opts.subject)
288
+ params.set("subject", opts.subject);
289
+ if (opts.predicate)
290
+ params.set("predicate", opts.predicate);
291
+ if (opts.limit)
292
+ params.set("limit", String(opts.limit));
293
+ return this.request(`/api/v1/memory/facts?${params.toString()}`);
294
+ }
295
+ async listTemporalFacts(options) {
296
+ return this.getMemoryFacts(options);
297
+ }
298
+ async forgetMemory(queryOrParams) {
299
+ const query = (typeof queryOrParams === "string" ? queryOrParams : queryOrParams.query)?.trim();
300
+ if (!query) {
301
+ throw new Error("forgetMemory requires a non-empty query");
302
+ }
303
+ return this.request("/api/v1/memory/forget", {
304
+ method: "POST",
305
+ body: { query },
306
+ });
307
+ }
308
+ async getGovernanceStatus() {
309
+ return this.request("/api/v1/governance");
310
+ }
311
+ async setKillSwitch(action, reason) {
312
+ return this.request("/api/v1/governance/kill-switch", {
313
+ method: "POST",
314
+ body: reason ? { action, reason } : { action },
315
+ });
316
+ }
317
+ async scanContext(contentOrParams) {
318
+ const body = typeof contentOrParams === "string"
319
+ ? { content: contentOrParams }
320
+ : contentOrParams;
321
+ return this.request("/api/v1/governance/scan-context", {
322
+ method: "POST",
323
+ body,
324
+ });
325
+ }
326
+ async updatePolicy(policy) {
327
+ return this.request("/api/v1/policy", {
328
+ method: "POST",
329
+ body: policy,
330
+ });
331
+ }
224
332
  async do(prompt, options = {}) {
333
+ const isDryRun = options.dryRun === true || options.planOnly === true;
225
334
  return this.request("/api/v1/do", {
226
335
  method: "POST",
227
336
  body: {
228
337
  prompt,
229
338
  input: options.input,
230
339
  autoApprove: options.autoApprove !== false,
231
- dryRun: options.dryRun === true,
340
+ dryRun: isDryRun,
341
+ planOnly: isDryRun,
342
+ fundingMode: options.fundingMode,
232
343
  },
233
344
  });
234
345
  }