@muxoai/platform 1.4.2 → 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/dist/sdk.d.ts CHANGED
@@ -281,7 +281,12 @@ export declare class MuxoClient {
281
281
  publicKeyHex: string;
282
282
  explanation: HumanFriendlyExplanation;
283
283
  }>;
284
- getMemoryGraph(query?: string): Promise<{
284
+ getMemoryGraph(queryOrOptions?: string | {
285
+ query?: string;
286
+ asOf?: string;
287
+ focalEntity?: string;
288
+ maxHops?: number;
289
+ }): Promise<{
285
290
  ok: true;
286
291
  } & MemoryKnowledgeGraph>;
287
292
  startConnection(paramsOrProvider: string | {
@@ -948,4 +953,22 @@ export declare class MuxoClient {
948
953
  }): Promise<Record<string, unknown>>;
949
954
  advanceDurableWorkflow(workflowId: string, eventPayload?: Record<string, unknown>): Promise<Record<string, unknown>>;
950
955
  exportGovernanceArchive(): Promise<Record<string, unknown>>;
956
+ getWorkflowHistory(workflowId: string): Promise<Record<string, unknown>>;
957
+ signalDurableWorkflow(workflowId: string, signalName: string, payload?: Record<string, unknown>): Promise<Record<string, unknown>>;
958
+ rollbackDurableWorkflow(workflowId: string, params?: {
959
+ reason?: string;
960
+ failedStep?: string;
961
+ }): Promise<Record<string, unknown>>;
962
+ getCedarPolicy(): Promise<Record<string, unknown>>;
963
+ evaluateCedarPolicy(params: {
964
+ toolSlug: string;
965
+ input?: Record<string, unknown>;
966
+ riskLevel?: RiskLevel;
967
+ creditCost?: number;
968
+ lane?: string;
969
+ }): Promise<Record<string, unknown>>;
970
+ getOtelTraces(limit?: number): Promise<Record<string, unknown>>;
971
+ listPlaybooks(): Promise<Record<string, unknown>>;
972
+ runPlaybook(slug: string, input?: Record<string, unknown>): Promise<Record<string, unknown>>;
973
+ getRoiAnalytics(): Promise<Record<string, unknown>>;
951
974
  }
package/dist/sdk.js CHANGED
@@ -240,8 +240,20 @@ export class MuxoClient {
240
240
  async verifyReceiptChain(limit = 100) {
241
241
  return this.request(`/api/v1/receipts/verify-chain?limit=${encodeURIComponent(String(limit))}`);
242
242
  }
243
- async getMemoryGraph(query) {
244
- const suffix = query ? `?query=${encodeURIComponent(query)}` : "";
243
+ async getMemoryGraph(queryOrOptions) {
244
+ const opts = typeof queryOrOptions === "string"
245
+ ? { query: queryOrOptions }
246
+ : queryOrOptions || {};
247
+ const qs = new URLSearchParams();
248
+ if (opts.query)
249
+ qs.set("query", opts.query);
250
+ if (opts.asOf)
251
+ qs.set("as_of", opts.asOf);
252
+ if (opts.focalEntity)
253
+ qs.set("focal_entity", opts.focalEntity);
254
+ if (opts.maxHops !== undefined)
255
+ qs.set("max_hops", String(opts.maxHops));
256
+ const suffix = qs.toString() ? `?${qs.toString()}` : "";
245
257
  return this.request(`/api/v1/memory/graph${suffix}`);
246
258
  }
247
259
  async startConnection(paramsOrProvider) {
@@ -745,4 +757,43 @@ export class MuxoClient {
745
757
  async exportGovernanceArchive() {
746
758
  return this.request("/api/v1/governance/archive");
747
759
  }
760
+ async getWorkflowHistory(workflowId) {
761
+ return this.request(`/api/v1/workflows/${encodeURIComponent(workflowId)}/history`);
762
+ }
763
+ async signalDurableWorkflow(workflowId, signalName, payload) {
764
+ return this.request(`/api/v1/workflows/${encodeURIComponent(workflowId)}/signal`, {
765
+ method: "POST",
766
+ body: { signalName, payload: payload || {} },
767
+ });
768
+ }
769
+ async rollbackDurableWorkflow(workflowId, params) {
770
+ return this.request(`/api/v1/workflows/${encodeURIComponent(workflowId)}/rollback`, {
771
+ method: "POST",
772
+ body: params || {},
773
+ });
774
+ }
775
+ async getCedarPolicy() {
776
+ return this.request("/api/v1/governance/cedar");
777
+ }
778
+ async evaluateCedarPolicy(params) {
779
+ return this.request("/api/v1/governance/cedar/evaluate", {
780
+ method: "POST",
781
+ body: params,
782
+ });
783
+ }
784
+ async getOtelTraces(limit = 25) {
785
+ return this.request(`/api/v1/telemetry/otlp?limit=${limit}`);
786
+ }
787
+ async listPlaybooks() {
788
+ return this.request("/api/v1/playbooks");
789
+ }
790
+ async runPlaybook(slug, input) {
791
+ return this.request(`/api/v1/playbooks/${encodeURIComponent(slug)}/run`, {
792
+ method: "POST",
793
+ body: { input: input || {} },
794
+ });
795
+ }
796
+ async getRoiAnalytics() {
797
+ return this.request("/api/v1/analytics/roi");
798
+ }
748
799
  }
package/dist/server.js CHANGED
@@ -1948,11 +1948,35 @@ Users purchase Muxo Credits (\`POST /api/v1/billing/topup\` or \`muxo billing to
1948
1948
  });
1949
1949
  return;
1950
1950
  }
1951
- if (pathname === "/api/v1/memory/graph" && req.method === "GET") {
1951
+ if (pathname === "/api/v1/memory/graph" &&
1952
+ (req.method === "GET" || req.method === "POST")) {
1953
+ const body = req.method === "POST"
1954
+ ? JSON.parse((await readBody(req)) || "{}")
1955
+ : {};
1952
1956
  const query = url.searchParams.get("query") ||
1953
1957
  url.searchParams.get("q") ||
1954
- undefined;
1955
- const graph = await engine.getMemoryGraph(ctx, query);
1958
+ (body.query ? String(body.query) : undefined);
1959
+ const asOf = url.searchParams.get("as_of") ||
1960
+ url.searchParams.get("asOf") ||
1961
+ (body.as_of || body.asOf ? String(body.as_of || body.asOf) : null);
1962
+ const focalEntity = url.searchParams.get("focal_entity") ||
1963
+ url.searchParams.get("focalEntity") ||
1964
+ (body.focal_entity || body.focalEntity
1965
+ ? String(body.focal_entity || body.focalEntity)
1966
+ : null);
1967
+ const rawMaxHops = url.searchParams.get("max_hops") ??
1968
+ url.searchParams.get("maxHops") ??
1969
+ body.max_hops ??
1970
+ body.maxHops;
1971
+ const maxHops = rawMaxHops !== undefined && rawMaxHops !== null && rawMaxHops !== ""
1972
+ ? Number(rawMaxHops)
1973
+ : undefined;
1974
+ const graph = await engine.getMemoryGraph(ctx, {
1975
+ query,
1976
+ asOf,
1977
+ focalEntity,
1978
+ maxHops,
1979
+ });
1956
1980
  sendJson(res, 200, { ok: true, ...graph });
1957
1981
  return;
1958
1982
  }
@@ -3543,6 +3567,107 @@ Users purchase Muxo Credits (\`POST /api/v1/billing/topup\` or \`muxo billing to
3543
3567
  sendJson(res, 200, { ok: true, workflow });
3544
3568
  return;
3545
3569
  }
3570
+ const wfHistoryMatch = pathname.match(/^\/api\/v1\/workflows\/([^/]+)\/history$/);
3571
+ if (wfHistoryMatch && req.method === "GET") {
3572
+ const wfId = decodeURIComponent(wfHistoryMatch[1]);
3573
+ const history = engine.getDurableWorkflowHistory(ctx, wfId);
3574
+ sendJson(res, 200, { ok: true, ...history });
3575
+ return;
3576
+ }
3577
+ const wfSignalMatch = pathname.match(/^\/api\/v1\/workflows\/([^/]+)\/signal$/);
3578
+ if (wfSignalMatch && req.method === "POST") {
3579
+ const wfId = decodeURIComponent(wfSignalMatch[1]);
3580
+ const body = JSON.parse((await readBody(req)) || "{}");
3581
+ const signalName = String(body.signalName || body.signal_name || body.name || "workflow.signal");
3582
+ const workflow = engine.signalDurableWorkflow(ctx, wfId, {
3583
+ signalName,
3584
+ payload: body.payload && typeof body.payload === "object"
3585
+ ? body.payload
3586
+ : body,
3587
+ });
3588
+ sendJson(res, 200, { ok: true, workflow });
3589
+ return;
3590
+ }
3591
+ const wfRollbackMatch = pathname.match(/^\/api\/v1\/workflows\/([^/]+)\/rollback$/);
3592
+ if (wfRollbackMatch && req.method === "POST") {
3593
+ const wfId = decodeURIComponent(wfRollbackMatch[1]);
3594
+ const body = JSON.parse((await readBody(req)) || "{}");
3595
+ const workflow = engine.rollbackDurableWorkflow(ctx, wfId, {
3596
+ reason: body.reason ? String(body.reason) : undefined,
3597
+ failedStep: body.failedStep || body.failed_step
3598
+ ? String(body.failedStep || body.failed_step)
3599
+ : undefined,
3600
+ });
3601
+ sendJson(res, 200, { ok: true, workflow });
3602
+ return;
3603
+ }
3604
+ if ((pathname === "/api/v1/governance/cedar" ||
3605
+ pathname === "/api/v1/policy/cedar") &&
3606
+ req.method === "GET") {
3607
+ const bundle = engine.getPolicyAsCodeBundle(ctx);
3608
+ sendJson(res, 200, { ok: true, ...bundle });
3609
+ return;
3610
+ }
3611
+ if ((pathname === "/api/v1/governance/cedar/evaluate" ||
3612
+ pathname === "/api/v1/policy/cedar/evaluate") &&
3613
+ req.method === "POST") {
3614
+ const body = JSON.parse((await readBody(req)) || "{}");
3615
+ const evaluated = await engine.evaluatePolicyAsCode(ctx, {
3616
+ toolSlug: String(body.toolSlug || body.tool_slug || body.action || "instant.web.search"),
3617
+ input: body.input && typeof body.input === "object"
3618
+ ? body.input
3619
+ : {},
3620
+ riskLevel: (body.riskLevel || body.risk_level),
3621
+ creditCost: typeof body.creditCost === "number"
3622
+ ? body.creditCost
3623
+ : typeof body.credit_cost === "number"
3624
+ ? body.credit_cost
3625
+ : undefined,
3626
+ lane: body.lane ? String(body.lane) : undefined,
3627
+ });
3628
+ sendJson(res, 200, { ok: true, ...evaluated });
3629
+ return;
3630
+ }
3631
+ if ((pathname === "/api/v1/telemetry/otlp" ||
3632
+ pathname === "/api/v1/governance/telemetry") &&
3633
+ req.method === "GET") {
3634
+ const limit = Number(url.searchParams.get("limit") || 25);
3635
+ const otel = engine.exportOtelTraces(ctx, limit);
3636
+ sendJson(res, 200, { ok: true, ...otel });
3637
+ return;
3638
+ }
3639
+ if (pathname === "/api/v1/playbooks" && req.method === "GET") {
3640
+ const playbooks = engine.listCommercialPlaybooks();
3641
+ sendJson(res, 200, {
3642
+ ok: true,
3643
+ count: playbooks.length,
3644
+ playbooks,
3645
+ });
3646
+ return;
3647
+ }
3648
+ const playbookRunMatch = pathname.match(/^\/api\/v1\/playbooks\/([^/]+)\/run$/);
3649
+ if ((playbookRunMatch || pathname === "/api/v1/playbooks/run") &&
3650
+ req.method === "POST") {
3651
+ const body = JSON.parse((await readBody(req)) || "{}");
3652
+ const slug = playbookRunMatch
3653
+ ? decodeURIComponent(playbookRunMatch[1])
3654
+ : String(body.slug || body.playbook || "");
3655
+ const result = engine.runCommercialPlaybook(ctx, {
3656
+ slug,
3657
+ input: body.input && typeof body.input === "object"
3658
+ ? body.input
3659
+ : body,
3660
+ });
3661
+ sendJson(res, 201, result);
3662
+ return;
3663
+ }
3664
+ if ((pathname === "/api/v1/analytics/roi" ||
3665
+ pathname === "/api/v1/billing/roi") &&
3666
+ req.method === "GET") {
3667
+ const roi = engine.getCommercialRoiReport(ctx);
3668
+ sendJson(res, 200, { ok: true, ...roi });
3669
+ return;
3670
+ }
3546
3671
  if (pathname === "/api/v1/governance/archive" && req.method === "GET") {
3547
3672
  const archive = engine.exportTamperEvidentArchive(ctx.workspace.id);
3548
3673
  sendJson(res, 200, { ok: true, ...archive });
package/dist/types.d.ts CHANGED
@@ -316,6 +316,9 @@ export interface TemporalGraphFact {
316
316
  confidence: number;
317
317
  validFrom: string;
318
318
  validTo: string | null;
319
+ transactionFrom?: string;
320
+ transactionTo?: string | null;
321
+ episodeId?: string | null;
319
322
  supersededById?: string | null;
320
323
  sourceKind: MemoryRecordKind | "system" | "manual";
321
324
  sourceReferenceId?: string | null;
@@ -324,10 +327,11 @@ export interface TemporalGraphFact {
324
327
  }
325
328
  export interface MemoryGraphNode {
326
329
  id: string;
327
- kind: "workspace" | "entity" | "preference" | "guardrail" | "connection" | "resource" | "tool" | "memory";
330
+ kind: "workspace" | "entity" | "preference" | "guardrail" | "connection" | "resource" | "tool" | "memory" | "episode";
328
331
  label: string;
329
332
  summary: string;
330
333
  status: "active" | "historical";
334
+ hopDistance?: number;
331
335
  metadata?: Record<string, unknown>;
332
336
  }
333
337
  export interface MemoryGraphEdge {
@@ -342,6 +346,9 @@ export interface MemoryGraphEdge {
342
346
  status: "active" | "historical";
343
347
  validFrom: string;
344
348
  validTo: string | null;
349
+ transactionFrom?: string;
350
+ transactionTo?: string | null;
351
+ episodeId?: string | null;
345
352
  supersededById: string | null;
346
353
  sourceKind: TemporalGraphFact["sourceKind"];
347
354
  sourceReferenceId: string | null;
@@ -351,11 +358,21 @@ export interface MemoryKnowledgeGraph {
351
358
  workspaceSlug: string;
352
359
  namespace: string;
353
360
  generatedAt: string;
361
+ asOf?: string | null;
362
+ focalEntity?: string | null;
363
+ maxHops?: number;
354
364
  query: string | null;
355
365
  nodes: MemoryGraphNode[];
356
366
  edges: MemoryGraphEdge[];
357
367
  activeEdges: MemoryGraphEdge[];
358
368
  historicalEdges: MemoryGraphEdge[];
369
+ subgraph?: {
370
+ focalEntity: string;
371
+ maxHops: number;
372
+ nodes: MemoryGraphNode[];
373
+ edges: MemoryGraphEdge[];
374
+ hopDistances: Record<string, number>;
375
+ } | null;
359
376
  stats: {
360
377
  nodesCount: number;
361
378
  activeEdgesCount: number;
@@ -363,6 +380,7 @@ export interface MemoryKnowledgeGraph {
363
380
  memoriesCount: number;
364
381
  resourcesCount: number;
365
382
  connectionsCount: number;
383
+ episodesCount?: number;
366
384
  };
367
385
  mermaid: string;
368
386
  explanation: HumanFriendlyExplanation;
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const MUXO_VERSION = "1.4.2";
1
+ export declare const MUXO_VERSION = "1.4.3";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const MUXO_VERSION = "1.4.2";
1
+ export const MUXO_VERSION = "1.4.3";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@muxoai/platform",
3
- "version": "1.4.2",
3
+ "version": "1.4.3",
4
4
  "description": "Muxo — Unified Execution, Provisioning & Governance Platform over Composio, Stripe Projects, Microsoft Agent Governance & Supermemory",
5
5
  "private": false,
6
6
  "license": "MIT",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "muxo",
3
- "version": "1.4.2",
3
+ "version": "1.4.3",
4
4
  "description": "Governed agent execution across 1,000+ Connected Apps (managed OAuth handoff), Instant Tools (search, scrape, crawl, SEO audit), live Cloud Infrastructure provisioning, Workspace Memory recall, and verifiable audit records.",
5
5
  "author": {
6
6
  "name": "Muxo AI LLC",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "muxo",
3
- "version": "1.4.2",
3
+ "version": "1.4.3",
4
4
  "description": "Your agent decides what to do — Muxo governs, provisions, remembers, and executes it. Unified access to 1,000+ Connected Apps (managed OAuth handoff), Instant Tools (search, scrape, crawl, SEO audit), live Cloud Infrastructure provisioning (Postgres, Redis, SQLite, Storage), Workspace Memory recall, and verifiable audit records.",
5
5
  "author": {
6
6
  "name": "Muxo AI LLC",
@@ -33,7 +33,7 @@
33
33
  "com.openai": {
34
34
  "onboardingSkill": "./skills/setup/SKILL.md",
35
35
  "publication": {
36
- "release_notes": "Muxo v1.4.2: Unified governed execution across 1,000+ Connected Apps, Instant web/SEO tools, 94 Stripe Projects Cloud Infrastructure services, MCP 2026-07-28 compliance, and Workspace Memory."
36
+ "release_notes": "Muxo v1.4.3: Unified governed execution across 1,000+ Connected Apps, Instant web/SEO tools, 94 Stripe Projects Cloud Infrastructure services, MCP 2026-07-28 compliance, and Workspace Memory."
37
37
  }
38
38
  }
39
39
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "muxo",
3
3
  "description": "Your agent decides what to do — Muxo governs, provisions, remembers, and executes it. Connect and operate 1,000+ external apps via managed OAuth, zero-auth Instant Tools (web search, scrape, crawl, SEO audit, remote workbench), live Cloud Infrastructure provisioning (Stripe Projects), and Workspace Memory from Cursor.",
4
- "version": "1.4.2",
4
+ "version": "1.4.3",
5
5
  "mcpServers": "../mcp.json",
6
6
  "skills": "../skills/",
7
7
  "author": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
3
3
  "name": "muxo",
4
- "version": "1.4.2",
4
+ "version": "1.4.3",
5
5
  "description": "Your agent decides what to do — Muxo governs, provisions, remembers, and executes it. Unified access to 1,000+ Connected Apps (managed OAuth handoff), Instant Tools (search, scrape, crawl, SEO audit), live Cloud Infrastructure provisioning (Postgres, Redis, SQLite, Storage), Workspace Memory recall, and verifiable audit records.",
6
6
  "author": {
7
7
  "name": "Muxo AI LLC",
@@ -109,7 +109,7 @@
109
109
  "commerce_description": "This plugin does not sell retail products or process consumer checkout inside ChatGPT."
110
110
  },
111
111
  "publication": {
112
- "release_notes": "Muxo v1.4.2: Unified governed execution across 1,000+ Connected Apps, Instant web/SEO tools, 94 Stripe Projects Cloud Infrastructure services, MCP 2026-07-28 compliance, and Workspace Memory."
112
+ "release_notes": "Muxo v1.4.3: Unified governed execution across 1,000+ Connected Apps, Instant web/SEO tools, 94 Stripe Projects Cloud Infrastructure services, MCP 2026-07-28 compliance, and Workspace Memory."
113
113
  }
114
114
  }
115
115
  }