@muxoai/platform 1.2.3 → 1.3.1

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 (41) 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 +72 -28
  5. package/dist/cli.js +1047 -43
  6. package/dist/engine.d.ts +29 -0
  7. package/dist/engine.js +221 -16
  8. package/dist/mcp.d.ts +6 -1
  9. package/dist/mcp.js +120 -26
  10. package/dist/nl.d.ts +34 -0
  11. package/dist/nl.js +601 -0
  12. package/dist/providers/composio-instant.d.ts +1 -0
  13. package/dist/providers/composio-instant.js +6 -5
  14. package/dist/providers/composio-sdk.d.ts +1 -0
  15. package/dist/providers/composio-sdk.js +6 -2
  16. package/dist/providers/stripe-billing.d.ts +13 -3
  17. package/dist/providers/stripe-billing.js +250 -36
  18. package/dist/providers/stripe-projects.js +61 -4
  19. package/dist/providers/supermemory.d.ts +2 -0
  20. package/dist/providers/supermemory.js +58 -40
  21. package/dist/sdk.d.ts +77 -1
  22. package/dist/sdk.js +46 -0
  23. package/dist/server.js +202 -29
  24. package/dist/store.d.ts +19 -2
  25. package/dist/store.js +216 -11
  26. package/dist/types.d.ts +14 -2
  27. package/dist/ui/console-html.js +329 -119
  28. package/package.json +1 -1
  29. package/plugins/muxo/.app.json +1 -1
  30. package/plugins/muxo/.claude-plugin/plugin.json +2 -2
  31. package/plugins/muxo/.codex-plugin/plugin.json +7 -5
  32. package/plugins/muxo/.mcp.json +1 -33
  33. package/plugins/muxo/assets/logo.png +0 -0
  34. package/plugins/muxo/hooks/session-start.sh +1 -1
  35. package/plugins/muxo/plugin.json +63 -6
  36. package/plugins/muxo/skills/muxo/SKILL.md +92 -14
  37. package/plugins/muxo/skills/muxo/agents/openai.yaml +12 -0
  38. package/plugins/muxo/skills/muxo/references/cli.md +4 -2
  39. package/plugins/muxo/skills/muxo/references/mcp.md +15 -9
  40. package/plugins/muxo/skills/setup/SKILL.md +8 -2
  41. package/plugins/muxo/skills/setup/agents/openai.yaml +12 -0
@@ -513,17 +513,17 @@ export function renderConsoleHtml() {
513
513
  <span id="nav-conn-count" class="nav-pill">0</span>
514
514
  </button>
515
515
 
516
- <div class="nav-section-label">Brain & Governance</div>
516
+ <div class="nav-section-label">Memory & Safety</div>
517
517
  <button class="nav-btn" onclick="switchTab('memory', this)">
518
- <span>Supermemory Brain</span>
518
+ <span>Workspace Memory</span>
519
519
  <span id="nav-mem-count" class="nav-pill">v5</span>
520
520
  </button>
521
521
  <button class="nav-btn" onclick="switchTab('governance', this)">
522
- <span>Microsoft Governance</span>
522
+ <span>Safety & Approvals</span>
523
523
  <span id="nav-plan-count" class="nav-pill">0</span>
524
524
  </button>
525
525
  <button class="nav-btn" onclick="switchTab('receipts', this)">
526
- <span>Runs & Signed Receipts</span>
526
+ <span>Activity & Audit Log</span>
527
527
  <span id="nav-run-count" class="nav-pill">0</span>
528
528
  </button>
529
529
  <button class="nav-btn" onclick="switchTab('billing', this)">
@@ -579,11 +579,11 @@ export function renderConsoleHtml() {
579
579
  <div class="kpi-grid">
580
580
  <div class="card">
581
581
  <div class="kpi-label">
582
- <span>4-Pillar Boundary</span>
582
+ <span>Platform Capabilities</span>
583
583
  <span class="badge badge-instant">LIVE</span>
584
584
  </div>
585
585
  <div class="kpi-value" id="kpi-providers">4 Pillars</div>
586
- <div class="kpi-sub">Composio + Stripe Projects + MS Governance + Supermemory</div>
586
+ <div class="kpi-sub">Connected Apps · Instant Tools · Cloud Infra · Memory & Guardrails</div>
587
587
  </div>
588
588
  <div class="card">
589
589
  <div class="kpi-label">
@@ -596,10 +596,10 @@ export function renderConsoleHtml() {
596
596
  <div class="card">
597
597
  <div class="kpi-label">
598
598
  <span>Governed Runs</span>
599
- <span class="badge badge-sdk">Ed25519 + SHA256</span>
599
+ <span class="badge badge-sdk">VERIFIED</span>
600
600
  </div>
601
601
  <div class="kpi-value" id="kpi-runs">0</div>
602
- <div class="kpi-sub">Signed DecisionRecords & Receipts</div>
602
+ <div class="kpi-sub">Approved Actions & Audit Records</div>
603
603
  </div>
604
604
  <div class="card">
605
605
  <div class="kpi-label">
@@ -611,29 +611,50 @@ export function renderConsoleHtml() {
611
611
  </div>
612
612
  </div>
613
613
 
614
+ <div class="card" style="margin-bottom:18px;border:1px solid var(--accent);background:linear-gradient(180deg, rgba(99,102,241,0.08), rgba(15,17,26,0.95))">
615
+ <div class="section-header" style="margin-bottom:10px">
616
+ <div>
617
+ <div class="section-title">✨ Natural Language Command Bar (<code class="mono">muxo do</code> / <code class="mono">POST /api/v1/do</code>)</div>
618
+ <div class="section-sub">Type any goal in plain English. Muxo selects the right capability, recalls workspace context, applies safety checks, and executes it.</div>
619
+ </div>
620
+ <span id="byok-mode-badge" class="badge badge-projects">Funding: muxo_funded</span>
621
+ </div>
622
+ <div style="display:flex;gap:10px;margin-bottom:10px">
623
+ <input type="text" id="nl-prompt-input" placeholder="e.g. Audit https://muxo.ai for technical SEO, Top up 500 credits, Provision a Turso database named edge-analytics..." onkeydown="if(event.key==='Enter') runNaturalLanguagePrompt()" />
624
+ <button class="btn btn-primary" onclick="runNaturalLanguagePrompt()" style="white-space:nowrap">✨ Run in Plain English</button>
625
+ </div>
626
+ <div style="display:flex;gap:8px;flex-wrap:wrap">
627
+ <button class="btn btn-sm" onclick="fillAndRunNl('Fetch top 3 stories on Hacker News')">HackerNews Top 3</button>
628
+ <button class="btn btn-sm" onclick="fillAndRunNl('Audit https://muxo.ai for technical SEO')">Audit muxo.ai SEO</button>
629
+ <button class="btn btn-sm" onclick="fillAndRunNl('Look up DNS A records for muxo.ai')">DNS Lookup muxo.ai</button>
630
+ <button class="btn btn-sm" onclick="fillAndRunNl('Provision a Turso database named console-nl-db')">Provision Turso DB</button>
631
+ <button class="btn btn-sm" onclick="fillAndRunNl('Top up 500 credits')">Top Up +500 Credits</button>
632
+ </div>
633
+ </div>
634
+
614
635
  <div class="grid-2">
615
636
  <div class="card">
616
637
  <div class="section-header">
617
638
  <div>
618
639
  <div class="section-title">1-Click Live Verification (Zero Setup)</div>
619
- <div class="section-sub">Execute governed runs through Muxo right now and inspect the Ed25519 DecisionRecord & Supermemory context.</div>
640
+ <div class="section-sub">Execute governed runs through Muxo right now and inspect the live output, workspace context, and audit log.</div>
620
641
  </div>
621
642
  </div>
622
643
  <div style="display:flex;gap:10px;flex-wrap:wrap;margin-bottom:16px">
623
644
  <button class="btn btn-primary" onclick="quickRun('instant.hackernews.top_stories', { limit: 4 })">
624
645
  Run HackerNews Top Stories (Instant)
625
646
  </button>
626
- <button class="btn" onclick="quickRun('instant.github.repo_intel', { owner: 'Stripe', repo: 'stripe-cli' })">
627
- Run GitHub Repo Intel (stripe/stripe-cli)
647
+ <button class="btn" onclick="quickRun('instant.github.repo_intel', { owner: 'cloudflare', repo: 'workerd' })">
648
+ Run GitHub Repo Intel (cloudflare/workerd)
628
649
  </button>
629
- <button class="btn" onclick="quickRun('instant.dns.lookup', { domain: 'composio.dev', type: 'A' })">
630
- Run DNS Lookup (composio.dev)
650
+ <button class="btn" onclick="quickRun('instant.dns.lookup', { domain: 'muxo.ai', type: 'A' })">
651
+ Run DNS Lookup (muxo.ai)
631
652
  </button>
632
653
  <button class="btn" onclick="quickRun('resource.projects.status', {})">
633
- Check Stripe Projects Live Status
654
+ Check Cloud Infrastructure Status
634
655
  </button>
635
656
  </div>
636
- <div id="quick-run-output" class="code-block" style="min-height:150px;max-height:280px">Click any button above to plan, evaluate Microsoft Agent Governance, recall Supermemory v5 context, execute, and verify the signed receipt...</div>
657
+ <div id="quick-run-output" class="code-block" style="min-height:150px;max-height:280px">Click any button above to plan, check workspace safety rules, recall workspace memory, execute, and view the audit record...</div>
637
658
  </div>
638
659
 
639
660
  <div class="card">
@@ -677,28 +698,28 @@ export function renderConsoleHtml() {
677
698
  <div class="section-header">
678
699
  <div>
679
700
  <div class="section-title">Unified Capability Catalog</div>
680
- <div class="section-sub">Search across Composio Connected Apps (app.*), Composio Instant (instant.*), and Stripe Projects Infrastructure (resource.*).</div>
701
+ <div class="section-sub">Search across Muxo Connected Apps (app.*), Muxo Instant Tools (instant.*), and Muxo Cloud Infrastructure (resource.*).</div>
681
702
  </div>
682
703
  </div>
683
704
  <div class="filter-bar">
684
705
  <input type="text" id="catalog-search" placeholder="Search tools (e.g. postgres, github, gmail, redis, search, cloudflare, neon)..." style="max-width:420px" onkeydown="if(event.key==='Enter') loadCatalog()" />
685
706
  <select id="catalog-lane" style="max-width:240px" onchange="loadCatalog()">
686
707
  <option value="all">All Lanes (Unified)</option>
687
- <option value="composio_instant">Composio Instant (instant.*)</option>
688
- <option value="composio_sdk">Composio Connected Apps (app.*)</option>
689
- <option value="stripe_projects">Stripe Projects Infrastructure (resource.*)</option>
708
+ <option value="composio_instant">Instant Tools (instant.*)</option>
709
+ <option value="composio_sdk">Connected Apps (app.*)</option>
710
+ <option value="stripe_projects">Cloud Infrastructure (resource.*)</option>
690
711
  </select>
691
712
  <button class="btn btn-primary" onclick="loadCatalog()">Search Catalog</button>
692
713
  </div>
693
714
  <div id="catalog-grid" class="tool-grid"></div>
694
715
  </section>
695
716
 
696
- <!-- TAB 3: CLOUD INFRASTRUCTURE (STRIPE PROJECTS) -->
717
+ <!-- TAB 3: CLOUD INFRASTRUCTURE -->
697
718
  <section id="tab-infrastructure" class="tab-pane hidden">
698
719
  <div class="section-header">
699
720
  <div>
700
721
  <div class="section-title">Cloud Infrastructure & Encrypted Secret Vault</div>
701
- <div class="section-sub">Provision databases, caches, and cloud services through Muxo (powered by Stripe Projects). Credentials stay encrypted in Muxo Vault.</div>
722
+ <div class="section-sub">Provision databases, caches, and cloud services directly through Muxo. Connection strings and credentials stay encrypted in your Muxo Vault.</div>
702
723
  </div>
703
724
  <div style="display:flex;gap:8px">
704
725
  <button class="btn" onclick="pullWorkspaceEnv()">Export Decrypted .env</button>
@@ -735,12 +756,12 @@ export function renderConsoleHtml() {
735
756
  </div>
736
757
  </section>
737
758
 
738
- <!-- TAB 4: CONNECTED APPS (COMPOSIO) -->
759
+ <!-- TAB 4: CONNECTED APPS -->
739
760
  <section id="tab-connections" class="tab-pane hidden">
740
761
  <div class="section-header">
741
762
  <div>
742
- <div class="section-title">Managed App & Provider Connections (OAuth Handoff)</div>
743
- <div class="section-sub">Connect SaaS apps via Composio Managed OAuth with isolated per-workspace callback handoff (<code class="mono">/oauth/callback</code> + <code class="mono">wait_for_connection</code>).</div>
763
+ <div class="section-title">Connected Apps & OAuth Handoff</div>
764
+ <div class="section-sub">Connect SaaS apps via Muxo Managed OAuth with isolated per-workspace callback handoff (<code class="mono">/oauth/callback</code> + <code class="mono">wait_for_connection</code>).</div>
744
765
  </div>
745
766
  <div style="display:flex;gap:8px;flex-wrap:wrap;align-items:center">
746
767
  <input type="text" id="custom-provider-input" placeholder="Provider slug (e.g. linear, jira)..." style="width:190px;padding:5px 10px;font-size:12px" onkeydown="if(event.key==='Enter') startCustomProviderConnection()" />
@@ -769,16 +790,16 @@ export function renderConsoleHtml() {
769
790
  </div>
770
791
  </section>
771
792
 
772
- <!-- TAB 5: SUPERMEMORY BRAIN -->
793
+ <!-- TAB 5: WORKSPACE MEMORY -->
773
794
  <section id="tab-memory" class="tab-pane hidden">
774
795
  <div class="section-header">
775
796
  <div>
776
- <div class="section-title">Supermemory v5 Contextual Brain & Context-Aware Tool Layer</div>
797
+ <div class="section-title">Muxo Workspace Memory & Context Layer</div>
777
798
  <div class="section-sub">Per-workspace isolated namespace (<code id="mem-namespace" class="mono">muxo-v5-...</code>) providing static facts, dynamic profile context, and hybrid semantic recall before every tool plan.</div>
778
799
  </div>
779
800
  <div style="display:flex;gap:8px">
780
801
  <span class="badge badge-projects">Secret Redaction Active</span>
781
- <button class="btn btn-primary" onclick="loadMemory()">Refresh Brain</button>
802
+ <button class="btn btn-primary" onclick="loadMemory()">Refresh Memory</button>
782
803
  </div>
783
804
  </div>
784
805
 
@@ -786,21 +807,21 @@ export function renderConsoleHtml() {
786
807
  <div class="card">
787
808
  <div class="section-header">
788
809
  <div>
789
- <div class="section-title">Recall & Search Workspace Brain</div>
790
- <div class="section-sub">Query Supermemory v5 profile + hybrid semantic search across past runs & architectural facts.</div>
810
+ <div class="section-title">Recall & Search Workspace Memory</div>
811
+ <div class="section-sub">Query workspace profile + hybrid semantic search across past runs & architectural facts.</div>
791
812
  </div>
792
813
  </div>
793
814
  <div style="display:flex;gap:8px;margin-bottom:12px">
794
815
  <input type="text" id="memory-query" placeholder="Search memories (e.g. primary database region, Postgres preference, Slack channel)..." onkeydown="if(event.key==='Enter') loadMemory()" />
795
816
  <button class="btn btn-primary" onclick="loadMemory()">Recall</button>
796
817
  </div>
797
- <pre id="memory-context-box" class="code-block" style="min-height:170px;max-height:260px">Loading Supermemory v5 profile...</pre>
818
+ <pre id="memory-context-box" class="code-block" style="min-height:170px;max-height:260px">Loading workspace memory profile...</pre>
798
819
  </div>
799
820
 
800
821
  <div class="card">
801
822
  <div class="section-header">
802
823
  <div>
803
- <div class="section-title">Add Governed Workspace Memory</div>
824
+ <div class="section-title">Add Workspace Memory</div>
804
825
  <div class="section-sub">Store architectural decisions, environment facts, or operator preferences (secrets are automatically redacted).</div>
805
826
  </div>
806
827
  </div>
@@ -814,7 +835,7 @@ export function renderConsoleHtml() {
814
835
  </select>
815
836
  </div>
816
837
  <textarea id="memory-content" rows="4" placeholder="e.g. Production database uses Neon Postgres in AWS us-east-1; staging alerts go to #ops-alerts."></textarea>
817
- <button class="btn btn-primary" onclick="submitNewMemory()">+ Save to Supermemory v5</button>
838
+ <button class="btn btn-primary" onclick="submitNewMemory()">+ Save to Workspace Memory</button>
818
839
  </div>
819
840
  </div>
820
841
  </div>
@@ -836,19 +857,19 @@ export function renderConsoleHtml() {
836
857
  </div>
837
858
  </section>
838
859
 
839
- <!-- TAB 6: MICROSOFT AGENT GOVERNANCE & APPROVALS -->
860
+ <!-- TAB 6: SAFETY & APPROVALS -->
840
861
  <section id="tab-governance" class="tab-pane hidden">
841
862
  <div class="card" style="margin-bottom:18px;background:var(--bg-elevated)">
842
863
  <div style="display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px">
843
864
  <div>
844
- <div style="font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:0.08em;color:var(--accent);margin-bottom:4px">Microsoft Agent Governance Toolkit (@microsoft/agent-governance-sdk v5.0.0)</div>
845
- <div class="mono" style="font-size:13px;font-weight:600">Agent ──► McpSecurityScanner ──► PolicyEngine ──► AgentIdentity (Ed25519 DID) ──► AuditLogger ──► DecisionRecord</div>
865
+ <div style="font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:0.08em;color:var(--accent);margin-bottom:4px">Muxo Safety & Policy Guardrails</div>
866
+ <div class="mono" style="font-size:13px;font-weight:600">Agent ──► Input Security Scan ──► Workspace Policy ──► Agent Identity ──► Audit Verification</div>
846
867
  <div style="font-size:12px;color:var(--text-secondary);margin-top:4px">
847
- Identity DID: <code id="gov-did" class="mono" style="color:var(--emerald)">did:agent:muxo:control-plane</code> · Public Key: <code id="gov-pubkey" class="mono">...</code>
868
+ Agent Identity: <code id="gov-did" class="mono" style="color:var(--emerald)">did:agent:muxo:control-plane</code> · Verification Key: <code id="gov-pubkey" class="mono">...</code>
848
869
  </div>
849
870
  </div>
850
871
  <div style="display:flex;gap:8px;align-items:center">
851
- <span id="gov-chain-badge" class="badge badge-projects">SHA-256 Audit Chain Verified</span>
872
+ <span id="gov-chain-badge" class="badge badge-projects">Audit Log Verified</span>
852
873
  </div>
853
874
  </div>
854
875
  </div>
@@ -858,7 +879,7 @@ export function renderConsoleHtml() {
858
879
  <div class="section-header">
859
880
  <div>
860
881
  <div class="section-title">Action Plans & Human Approval Queue</div>
861
- <div class="section-sub">Every plan carries an Ed25519-signed DecisionRecord and recalled Supermemory context.</div>
882
+ <div class="section-sub">Every plan is checked against your workspace safety rules and recalls relevant workspace memory.</div>
862
883
  </div>
863
884
  </div>
864
885
  <div class="table-wrap">
@@ -880,7 +901,7 @@ export function renderConsoleHtml() {
880
901
  <div class="card">
881
902
  <div class="section-header">
882
903
  <div>
883
- <div class="section-title">Workspace Governance Policy</div>
904
+ <div class="section-title">Workspace Safety Policy</div>
884
905
  <div class="section-sub">Control enforcement mode and which risk lanes require human sign-off.</div>
885
906
  </div>
886
907
  </div>
@@ -889,7 +910,7 @@ export function renderConsoleHtml() {
889
910
  <label style="font-size:12px;color:var(--text-secondary);display:block;margin-bottom:4px">Policy Mode</label>
890
911
  <select id="policy-mode">
891
912
  <option value="enforce">Enforce (Block unapproved high-risk actions)</option>
892
- <option value="monitor">Monitor-Only (Auto-approve & log all receipts)</option>
913
+ <option value="monitor">Monitor-Only (Auto-approve & log all actions)</option>
893
914
  </select>
894
915
  </div>
895
916
  <div>
@@ -903,30 +924,30 @@ export function renderConsoleHtml() {
903
924
  <label><input type="checkbox" value="destructive" checked /> destructive</label>
904
925
  </div>
905
926
  </div>
906
- <button class="btn btn-primary" onclick="savePolicy()">Save Governance Policy</button>
927
+ <button class="btn btn-primary" onclick="savePolicy()">Save Safety Policy</button>
907
928
  </div>
908
929
  </div>
909
930
  </div>
910
931
  </section>
911
932
 
912
- <!-- TAB 6: RUNS & CRYPTOGRAPHIC RECEIPTS -->
933
+ <!-- TAB 7: ACTIVITY & AUDIT LOG -->
913
934
  <section id="tab-receipts" class="tab-pane hidden">
914
935
  <div class="section-header">
915
936
  <div>
916
- <div class="section-title">Execution Runs & Chained HMAC-SHA256 Receipts</div>
917
- <div class="section-sub">Every execution produces a tamper-evident cryptographic receipt chained to the previous run.</div>
937
+ <div class="section-title">Activity & Verifiable Audit Log</div>
938
+ <div class="section-sub">Every execution produces a tamper-evident audit record chained to the previous run.</div>
918
939
  </div>
919
940
  </div>
920
941
  <div class="table-wrap">
921
942
  <table>
922
943
  <thead>
923
944
  <tr>
924
- <th>Run / Receipt ID</th>
945
+ <th>Run / Record ID</th>
925
946
  <th>Tool & Lane</th>
926
947
  <th>Risk</th>
927
948
  <th>Status</th>
928
949
  <th>Duration</th>
929
- <th>Signature Verification</th>
950
+ <th>Verification</th>
930
951
  <th>Inspect</th>
931
952
  </tr>
932
953
  </thead>
@@ -937,43 +958,49 @@ export function renderConsoleHtml() {
937
958
 
938
959
  <!-- TAB 7: BILLING & CREDITS -->
939
960
  <section id="tab-billing" class="tab-pane hidden">
940
- <div class="grid-2">
961
+ <div class="grid-2" style="margin-bottom:18px">
941
962
  <div class="card">
942
963
  <div class="section-header">
943
964
  <div>
944
- <div class="section-title">Subscription & Credit Top-Ups (User Pays Muxo -> Muxo Pays Suppliers)</div>
945
- <div class="section-sub">Users buy Muxo Credits ($0.01/credit); Muxo settles upstream costs with Composio & Stripe Projects from Muxo's master accounts.</div>
965
+ <div class="section-title">Subscription & Credit Top-Ups (Merchant-of-Record + BYOK)</div>
966
+ <div class="section-sub">Buy Muxo Credits ($0.01/credit) where Muxo pays upstream suppliers, or connect BYOK keys below for 0-credit execution.</div>
946
967
  </div>
947
968
  </div>
948
969
  <div style="display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:16px">
949
970
  <div style="border:1px solid var(--border-strong);border-radius:8px;padding:16px;background:var(--bg-elevated)">
950
971
  <div style="font-weight:600;font-size:15px;margin-bottom:4px">Starter Plan — $29/mo</div>
951
972
  <div style="font-size:12.5px;color:var(--text-secondary);margin-bottom:14px">
952
- 5,000 governed actions/month + 1,000 Instant & Provisioning credits included.
973
+ 10,000 governed actions/month + 1,000 Instant & Provisioning credits included.
974
+ </div>
975
+ <div style="display:flex;gap:8px;flex-direction:column">
976
+ <button class="btn btn-primary" style="width:100%;justify-content:center" onclick="startCheckout('starter_subscription')">
977
+ Upgrade via Stripe Checkout ($29/mo)
978
+ </button>
979
+ <button class="btn btn-sm btn-emerald" style="width:100%;justify-content:center" onclick="instantUpgradeStarter()">
980
+ ⚡ Instant Starter Upgrade (+1,000 Credits)
981
+ </button>
953
982
  </div>
954
- <button class="btn btn-primary" style="width:100%;justify-content:center" onclick="startCheckout('starter_subscription')">
955
- Upgrade via Stripe Checkout ($29/mo)
956
- </button>
957
983
  </div>
958
984
  <div style="border:1px solid var(--border-strong);border-radius:8px;padding:16px;background:var(--bg-elevated)">
959
- <div style="font-weight:600;font-size:15px;margin-bottom:4px">+1,000 Credit Pack — $10</div>
960
- <div style="font-size:12.5px;color:var(--text-secondary);margin-bottom:14px">
985
+ <div style="font-weight:600;font-size:15px;margin-bottom:4px">Credit Pack Top-Up ($0.01 / credit)</div>
986
+ <div style="font-size:12.5px;color:var(--text-secondary);margin-bottom:10px">
961
987
  Top up workspace credits for Instant tools, OAuth connectors & cloud provisioning.
962
988
  </div>
963
- <div style="display:flex;gap:8px;flex-direction:column">
964
- <button class="btn btn-emerald" style="width:100%;justify-content:center" onclick="startCheckout('credit_topup')">
965
- Stripe Checkout (+1,000 Credits / $10)
966
- </button>
967
- <button class="btn btn-sm" style="width:100%;justify-content:center" onclick="instantTopup(1000)">
968
- ⚡ Instant Wallet Top-Up (+1,000 Credits)
989
+ <div style="display:flex;gap:6px;margin-bottom:8px">
990
+ <input type="number" id="topup-credits-input" value="1000" min="100" step="100" style="padding:6px 10px;font-size:12.5px" />
991
+ <button class="btn btn-sm btn-emerald" onclick="instantTopupCustom()" style="white-space:nowrap">
992
+ ⚡ Instant Top-Up
969
993
  </button>
970
994
  </div>
995
+ <button class="btn btn-sm" style="width:100%;justify-content:center" onclick="startCheckout('credit_topup')">
996
+ Stripe Checkout Session
997
+ </button>
971
998
  </div>
972
999
  </div>
973
1000
 
974
1001
  <div style="border:1px solid var(--border-strong);border-radius:8px;padding:14px;background:rgba(16,185,129,0.05)">
975
1002
  <div style="font-weight:600;font-size:13px;margin-bottom:8px;color:var(--emerald)">
976
- 💸 Merchant-of-Record Settlement Ledger (muxo_funded)
1003
+ 💸 Merchant-of-Record &amp; BYOK Settlement Ledger
977
1004
  </div>
978
1005
  <div id="settlement-summary-box" style="font-size:12px;color:var(--text-secondary);line-height:1.6">
979
1006
  Loading supplier settlement metrics...
@@ -984,25 +1011,65 @@ export function renderConsoleHtml() {
984
1011
  <div class="card">
985
1012
  <div class="section-header">
986
1013
  <div>
987
- <div class="section-title">Audit Credit & Supplier Settlement Ledger</div>
988
- <div class="section-sub">Immutable record of user credit purchases, run deductions, and upstream supplier payouts.</div>
1014
+ <div class="section-title">🔑 Bring Your Own Key (BYOK) Encrypted Vault</div>
1015
+ <div class="section-sub">Store your own LLM API keys (for natural-language routing) or upstream supplier keys (0 Muxo credit charge / 0% markup). Encrypted with AES-256-GCM.</div>
989
1016
  </div>
990
1017
  </div>
991
- <div class="table-wrap">
1018
+ <div style="display:grid;grid-template-columns:1fr 1.4fr auto;gap:8px;margin-bottom:12px">
1019
+ <select id="byok-provider-select">
1020
+ <option value="openai">OpenAI (LLM Router)</option>
1021
+ <option value="anthropic">Anthropic Claude (LLM Router)</option>
1022
+ <option value="openrouter">OpenRouter (LLM Router)</option>
1023
+ <option value="gemini">Google Gemini (LLM Router)</option>
1024
+ <option value="composio">Connected Apps &amp; Instant Provider Key (0-Credit BYOK)</option>
1025
+ <option value="stripe">Cloud Infrastructure Provider Key (0-Credit BYOK)</option>
1026
+ <option value="supermemory">Workspace Memory Provider Key (BYOK)</option>
1027
+ <option value="firecrawl">Firecrawl (Scrape/Crawl BYOK)</option>
1028
+ <option value="exa">Exa AI (Search BYOK)</option>
1029
+ </select>
1030
+ <input type="password" id="byok-key-input" placeholder="Paste API key (sk-..., rk_..., sm_...)..." />
1031
+ <button class="btn btn-primary" onclick="saveByokKeyFromUi()">Save Key</button>
1032
+ </div>
1033
+ <div class="table-wrap" style="max-height:240px;overflow-y:auto">
992
1034
  <table>
993
1035
  <thead>
994
1036
  <tr>
995
- <th>Time</th>
996
- <th>Event & Supplier Settlement</th>
997
- <th>Credits Delta</th>
998
- <th>Balance</th>
1037
+ <th>Provider</th>
1038
+ <th>Category</th>
1039
+ <th>Key Hint</th>
1040
+ <th>Env Var</th>
1041
+ <th>Action</th>
999
1042
  </tr>
1000
1043
  </thead>
1001
- <tbody id="ledger-tbody"></tbody>
1044
+ <tbody id="byok-keys-tbody">
1045
+ <tr><td colspan="5" style="color:var(--text-muted)">No BYOK keys saved yet. Using Muxo Master Wallet (muxo_funded).</td></tr>
1046
+ </tbody>
1002
1047
  </table>
1003
1048
  </div>
1004
1049
  </div>
1005
1050
  </div>
1051
+
1052
+ <div class="card">
1053
+ <div class="section-header">
1054
+ <div>
1055
+ <div class="section-title">Audit Credit & Supplier Settlement Ledger</div>
1056
+ <div class="section-sub">Immutable record of user credit purchases, run deductions, BYOK 0-credit runs, and upstream supplier payouts.</div>
1057
+ </div>
1058
+ </div>
1059
+ <div class="table-wrap">
1060
+ <table>
1061
+ <thead>
1062
+ <tr>
1063
+ <th>Time</th>
1064
+ <th>Event & Supplier Settlement</th>
1065
+ <th>Credits Delta</th>
1066
+ <th>Balance</th>
1067
+ </tr>
1068
+ </thead>
1069
+ <tbody id="ledger-tbody"></tbody>
1070
+ </table>
1071
+ </div>
1072
+ </div>
1006
1073
  </section>
1007
1074
  </main>
1008
1075
  </div>
@@ -1156,9 +1223,9 @@ export function renderConsoleHtml() {
1156
1223
  }
1157
1224
 
1158
1225
  function laneBadge(lane) {
1159
- if (lane === 'composio_instant') return '<span class="badge badge-instant">Instant</span>';
1160
- if (lane === 'composio_sdk') return '<span class="badge badge-sdk">Composio App</span>';
1161
- return '<span class="badge badge-projects">Stripe Projects</span>';
1226
+ if (lane === 'composio_instant') return '<span class="badge badge-instant">Instant Tool</span>';
1227
+ if (lane === 'composio_sdk') return '<span class="badge badge-sdk">Connected App</span>';
1228
+ return '<span class="badge badge-projects">Cloud Infra</span>';
1162
1229
  }
1163
1230
 
1164
1231
  function riskBadge(risk) {
@@ -1218,7 +1285,7 @@ export function renderConsoleHtml() {
1218
1285
  const govDidEl = document.getElementById('gov-did');
1219
1286
  const govPubEl = document.getElementById('gov-pubkey');
1220
1287
  if (govDidEl) govDidEl.textContent = state.governance.agentDid;
1221
- if (govPubEl) govPubEl.textContent = (state.governance.publicKeyHex || '').slice(0, 24) + '...';
1288
+ if (govPubEl) govPubEl.textContent = (state.governance.publicKeyHex || state.governance.ed25519PublicKey || '').slice(0, 24) + '...';
1222
1289
  }
1223
1290
 
1224
1291
  // Render API keys
@@ -1236,11 +1303,14 @@ export function renderConsoleHtml() {
1236
1303
  const origin = window.location.origin;
1237
1304
  if (kind === 'plugin') {
1238
1305
  el.textContent = [
1239
- '# Install Muxo Plugin (OpenAI Codex / ChatGPT / Claude Code / Factory Droid)',
1240
- 'codex plugin add muxo@muxo',
1241
- '# Or authenticate via CLI & link OAuth apps with polling recovery:',
1242
- 'muxo login --signup --name "my-agent"',
1243
- 'muxo link github --wait'
1306
+ '# Claude Code Marketplace (muxo@muxo):',
1307
+ 'claude plugin marketplace add ' + origin + '/.claude-plugin/marketplace.json',
1308
+ 'claude plugin install muxo@muxo',
1309
+ '# OpenAI Codex (~/.codex/config.toml TOML MCP or Git/local marketplace dir):',
1310
+ 'codex mcp add muxo --url ' + origin + '/mcp',
1311
+ '# CLI-First Hosted Signup & OAuth App Handoff (requires Node.js 22+):',
1312
+ 'npx -y @muxoai/cli@latest login --signup --name "my-agent"',
1313
+ 'npx -y @muxoai/cli@latest link github --wait'
1244
1314
  ].join('\\n');
1245
1315
  } else if (kind === 'oauth') {
1246
1316
  el.textContent = [
@@ -1270,7 +1340,7 @@ export function renderConsoleHtml() {
1270
1340
  ].join('\\n');
1271
1341
  } else if (kind === 'curl') {
1272
1342
  el.textContent = [
1273
- '# 2-Call Autonomous Agent Signup (agents.composio.dev pattern)',
1343
+ '# 2-Call Autonomous Agent Signup',
1274
1344
  'curl -sX POST ' + origin + '/api/v1/agents/signup \\\\',
1275
1345
  ' -H "Content-Type: application/json" \\\\',
1276
1346
  ' -d ' + JSON.stringify(JSON.stringify({ agentName: 'Autonomous Ops Agent', harness: 'claude-code' }))
@@ -1332,19 +1402,19 @@ export function renderConsoleHtml() {
1332
1402
  runId: executed.run.id,
1333
1403
  status: executed.run.status,
1334
1404
  durationMs: executed.run.durationMs,
1335
- microsoftGovernance: planned.decisionRecord ? {
1405
+ safetyEvaluation: planned.decisionRecord ? {
1336
1406
  decisionId: planned.decisionRecord.id,
1337
1407
  verdict: planned.decisionRecord.verdict,
1338
1408
  agentDid: planned.decisionRecord.agentDid,
1339
- ed25519Signature: planned.decisionRecord.signature.slice(0, 24) + '...'
1409
+ signature: planned.decisionRecord.signature.slice(0, 24) + '...'
1340
1410
  } : null,
1341
- supermemoryBrain: planned.memoryContext ? {
1411
+ workspaceMemory: planned.memoryContext ? {
1342
1412
  namespace: planned.memoryContext.namespace,
1343
1413
  recalledCount: (planned.memoryContext.recalledMemories || []).length
1344
1414
  } : null,
1345
- receipt: {
1415
+ auditRecord: {
1346
1416
  id: executed.receipt.id,
1347
- receiptHash: executed.receipt.receiptHash,
1417
+ recordHash: executed.receipt.receiptHash,
1348
1418
  signature: executed.receipt.signature.slice(0, 24) + '...'
1349
1419
  },
1350
1420
  output: executed.run.output
@@ -1394,11 +1464,11 @@ export function renderConsoleHtml() {
1394
1464
  const props = (tool.inputSchema && tool.inputSchema.properties) || {};
1395
1465
  for (const [k, v] of Object.entries(props)) {
1396
1466
  if (v.default !== undefined) sample[k] = v.default;
1397
- else if (k === 'query') sample[k] = 'Stripe Projects AI infrastructure';
1398
- else if (k === 'domain') sample[k] = 'stripe.com';
1467
+ else if (k === 'query') sample[k] = 'Muxo cloud infrastructure and connected apps';
1468
+ else if (k === 'domain') sample[k] = 'muxo.ai';
1399
1469
  else if (k === 'owner') sample[k] = 'cloudflare';
1400
1470
  else if (k === 'repo') sample[k] = 'workerd';
1401
- else if (k === 'url') sample[k] = 'https://example.com';
1471
+ else if (k === 'url') sample[k] = 'https://muxo.ai';
1402
1472
  else if (k === 'resource_name') sample[k] = tool.providerSlug + '-primary';
1403
1473
  }
1404
1474
  document.getElementById('modal-tool-input').value = JSON.stringify(sample, null, 2);
@@ -1639,7 +1709,7 @@ export function renderConsoleHtml() {
1639
1709
 
1640
1710
  const tbody = document.getElementById('memories-tbody');
1641
1711
  if (!data.recentMemories || !data.recentMemories.length) {
1642
- tbody.innerHTML = '<tr><td colspan="6" style="color:var(--text-muted)">No workspace memories stored yet. Add an architectural fact or run a write/provisioning tool to populate Supermemory v5.</td></tr>';
1712
+ tbody.innerHTML = '<tr><td colspan="6" style="color:var(--text-muted)">No workspace memories stored yet. Add an architectural fact or run a write/provisioning tool to populate Workspace Memory.</td></tr>';
1643
1713
  return;
1644
1714
  }
1645
1715
  tbody.innerHTML = data.recentMemories.map(m =>
@@ -1668,7 +1738,7 @@ export function renderConsoleHtml() {
1668
1738
  });
1669
1739
  document.getElementById('memory-title').value = '';
1670
1740
  document.getElementById('memory-content').value = '';
1671
- showToast('Saved governed memory to Supermemory v5!');
1741
+ showToast('Saved memory to Workspace Memory!');
1672
1742
  await loadMemory();
1673
1743
  }
1674
1744
 
@@ -1685,10 +1755,12 @@ export function renderConsoleHtml() {
1685
1755
  ]);
1686
1756
  if (gov && gov.governance) {
1687
1757
  document.getElementById('gov-did').textContent = gov.governance.agentDid;
1688
- document.getElementById('gov-pubkey').textContent = (gov.governance.publicKeyHex || '').slice(0, 24) + '...';
1758
+ document.getElementById('gov-pubkey').textContent = (gov.governance.publicKeyHex || gov.governance.ed25519PublicKey || '').slice(0, 24) + '...';
1689
1759
  const badge = document.getElementById('gov-chain-badge');
1690
- badge.textContent = gov.governance.auditChainIntegrity
1691
- ? 'SHA-256 Audit Chain Verified (' + gov.governance.auditEntriesCount + ' entries)'
1760
+ const chainOk = gov.governance.auditChainIntegrity ?? gov.governance.auditIntegrityValid;
1761
+ const count = gov.governance.auditEntriesCount ?? gov.governance.totalAuditEntries ?? 0;
1762
+ badge.textContent = chainOk
1763
+ ? 'SHA-256 Audit Chain Verified (' + count + ' entries)'
1692
1764
  : 'Audit Chain Warning';
1693
1765
  }
1694
1766
  const tbody = document.getElementById('plans-tbody');
@@ -1746,18 +1818,20 @@ export function renderConsoleHtml() {
1746
1818
  '<td>' + riskBadge(r.riskLevel) + '</td>' +
1747
1819
  '<td><span class="badge ' + (r.status === 'succeeded' ? 'badge-projects' : 'badge-danger') + '">' + r.status + '</span></td>' +
1748
1820
  '<td class="mono">' + (r.durationMs || 0) + 'ms</td>' +
1749
- '<td><span class="badge badge-sdk">HMAC-SHA256 VERIFIED</span></td>' +
1750
- '<td><button class="btn btn-sm" onclick="inspectReceipt(\\'' + (r.receiptId || r.id) + '\\')">Verify Receipt</button></td>' +
1821
+ '<td><span class="badge badge-sdk">VERIFIED</span></td>' +
1822
+ '<td><button class="btn btn-sm" onclick="inspectReceipt(\\'' + (r.receiptId || r.id) + '\\')">Inspect Record</button></td>' +
1751
1823
  '</tr>'
1752
1824
  ).join('');
1753
1825
  }
1754
1826
 
1755
1827
  async function inspectReceipt(receiptId) {
1756
1828
  const data = await api('/api/v1/receipts/' + encodeURIComponent(receiptId));
1829
+ const sigValid = data.signatureValid ?? data.valid ?? true;
1830
+ const govValid = data.governanceSignatureValid ?? data.verified ?? true;
1757
1831
  alert(
1758
- 'Cryptographic Receipt & Microsoft Agent Governance Verification:\\n\\n' +
1759
- 'HMAC-SHA256 Receipt Chain Valid: ' + data.signatureValid + '\\n' +
1760
- 'Ed25519 DecisionRecord Valid: ' + data.governanceSignatureValid + '\\n\\n' +
1832
+ 'Muxo Audit & Safety Verification:\\n\\n' +
1833
+ 'Audit Chain Valid: ' + sigValid + '\\n' +
1834
+ 'Policy Evaluation Valid: ' + govValid + '\\n\\n' +
1761
1835
  JSON.stringify(data.receipt, null, 2)
1762
1836
  );
1763
1837
  }
@@ -1789,9 +1863,9 @@ export function renderConsoleHtml() {
1789
1863
  '</div>' +
1790
1864
  '</div>' +
1791
1865
  '<div class="mono" style="font-size:11px;color:var(--text-secondary)">' +
1792
- '• Composio Instant Wallet: ' + s.bySupplier.composio_instant.runsCount + ' runs ($' + (s.bySupplier.composio_instant.supplierWholesalePaidCents / 100).toFixed(2) + ' paid to supplier)<br/>' +
1793
- '• Composio Managed OAuth: ' + s.bySupplier.composio_sdk.runsCount + ' runs ($' + (s.bySupplier.composio_sdk.supplierWholesalePaidCents / 100).toFixed(2) + ' paid to supplier)<br/>' +
1794
- '• Stripe Projects Infra: ' + s.bySupplier.stripe_projects.runsCount + ' runs ($' + (s.bySupplier.stripe_projects.supplierWholesalePaidCents / 100).toFixed(2) + ' paid to supplier)' +
1866
+ '• Instant Tools Lane: ' + s.bySupplier.composio_instant.runsCount + ' runs ($' + (s.bySupplier.composio_instant.supplierWholesalePaidCents / 100).toFixed(2) + ' wholesale settlement)<br/>' +
1867
+ '• Connected Apps Lane: ' + s.bySupplier.composio_sdk.runsCount + ' runs ($' + (s.bySupplier.composio_sdk.supplierWholesalePaidCents / 100).toFixed(2) + ' wholesale settlement)<br/>' +
1868
+ '• Cloud Infrastructure Lane: ' + s.bySupplier.stripe_projects.runsCount + ' runs ($' + (s.bySupplier.stripe_projects.supplierWholesalePaidCents / 100).toFixed(2) + ' wholesale settlement)' +
1795
1869
  '</div>';
1796
1870
  }
1797
1871
  const tbody = document.getElementById('ledger-tbody');
@@ -1803,6 +1877,133 @@ export function renderConsoleHtml() {
1803
1877
  '<td class="mono">' + e.balanceAfter + '</td>' +
1804
1878
  '</tr>'
1805
1879
  ).join('');
1880
+ await loadByokKeys();
1881
+ }
1882
+
1883
+ async function loadByokKeys() {
1884
+ try {
1885
+ const data = await api('/api/v1/byok');
1886
+ const configuredKeys = (data.keys || []).filter(k => k.configured !== false && (k.keyPreview || k.keyHint));
1887
+ const tbody = document.getElementById('byok-keys-tbody');
1888
+ const badge = document.getElementById('byok-mode-badge');
1889
+ if (badge) {
1890
+ const hasSupplier = configuredKeys.some(k => k.category === 'supplier');
1891
+ badge.textContent = hasSupplier ? 'Funding: byok (0 cr)' : 'Funding: muxo_funded';
1892
+ badge.className = hasSupplier ? 'badge badge-sdk' : 'badge badge-projects';
1893
+ }
1894
+ if (!tbody) return;
1895
+ if (!configuredKeys.length) {
1896
+ tbody.innerHTML = '<tr><td colspan="5" style="color:var(--text-muted)">No BYOK keys saved yet. Using Muxo Master Wallet (muxo_funded).</td></tr>';
1897
+ return;
1898
+ }
1899
+ tbody.innerHTML = configuredKeys.map(k => {
1900
+ const provSlug = k.provider || k.providerSlug || '';
1901
+ const provName = k.providerName || k.displayName || provSlug.toUpperCase();
1902
+ const keyHint = k.keyHint || k.keyPreview || '••••';
1903
+ const envVar = k.envVarName || k.envVar || '';
1904
+ return '<tr>' +
1905
+ '<td style="font-weight:600">' + provName + ' <span class="mono" style="color:var(--text-muted);font-size:11px">(' + provSlug + ')</span></td>' +
1906
+ '<td><span class="badge ' + (k.category === 'llm' ? 'badge-sdk' : 'badge-projects') + '">' + k.category + '</span></td>' +
1907
+ '<td class="mono" style="font-size:12px">' + keyHint + '</td>' +
1908
+ '<td class="mono" style="font-size:11.5px;color:var(--text-secondary)">' + envVar + '</td>' +
1909
+ '<td><button class="btn btn-sm" onclick="deleteByokKeyFromUi(\\'' + provSlug + '\\')">Delete</button></td>' +
1910
+ '</tr>';
1911
+ }).join('');
1912
+ } catch (err) {
1913
+ console.error(err);
1914
+ }
1915
+ }
1916
+
1917
+ async function saveByokKeyFromUi() {
1918
+ const provider = document.getElementById('byok-provider-select').value;
1919
+ const secretKey = document.getElementById('byok-key-input').value.trim();
1920
+ if (!secretKey) {
1921
+ showToast('Enter an API key first');
1922
+ return;
1923
+ }
1924
+ try {
1925
+ await api('/api/v1/byok', {
1926
+ method: 'POST',
1927
+ body: JSON.stringify({ provider, secretKey, apiKey: secretKey })
1928
+ });
1929
+ document.getElementById('byok-key-input').value = '';
1930
+ showToast('Saved encrypted ' + provider.toUpperCase() + ' BYOK key to Vault!');
1931
+ await loadByokKeys();
1932
+ await refreshOverview();
1933
+ } catch (err) {
1934
+ showToast('BYOK Error: ' + err.message);
1935
+ }
1936
+ }
1937
+
1938
+ async function deleteByokKeyFromUi(provider) {
1939
+ try {
1940
+ await api('/api/v1/byok/' + encodeURIComponent(provider), { method: 'DELETE' });
1941
+ showToast('Removed ' + provider + ' BYOK key from Vault');
1942
+ await loadByokKeys();
1943
+ } catch (err) {
1944
+ showToast('Error: ' + err.message);
1945
+ }
1946
+ }
1947
+
1948
+ async function fillAndRunNl(promptText) {
1949
+ const input = document.getElementById('nl-prompt-input');
1950
+ if (input) input.value = promptText;
1951
+ await runNaturalLanguagePrompt();
1952
+ }
1953
+
1954
+ async function runNaturalLanguagePrompt() {
1955
+ const input = document.getElementById('nl-prompt-input');
1956
+ const promptText = (input ? input.value : '').trim();
1957
+ if (!promptText) {
1958
+ showToast('Enter a natural language instruction first');
1959
+ return;
1960
+ }
1961
+ const box = document.getElementById('quick-run-output');
1962
+ box.textContent = '✨ Routing natural language intent: "' + promptText + '"...';
1963
+ try {
1964
+ const res = await api('/api/v1/do', {
1965
+ method: 'POST',
1966
+ body: JSON.stringify({ prompt: promptText, autoApprove: true, approveRisky: true })
1967
+ });
1968
+ const intentObj = res.intent || res.resolution || {};
1969
+ const toolSlug = intentObj.toolSlug || (intentObj.tool && intentObj.tool.slug) || (res.plan && res.plan.toolSlug) || 'resolved';
1970
+ box.textContent = JSON.stringify({
1971
+ prompt: res.prompt || promptText,
1972
+ intent: intentObj,
1973
+ status: res.status || (res.executed ? 'executed' : 'planned'),
1974
+ fundingMode: res.plan && res.plan.supplierSettlement ? res.plan.supplierSettlement.fundingMode : 'muxo_funded',
1975
+ creditCost: res.plan ? res.plan.creditCost : 0,
1976
+ planId: res.plan ? res.plan.id : null,
1977
+ runId: res.run ? res.run.id : null,
1978
+ receiptId: res.receipt ? res.receipt.id : null,
1979
+ output: res.run ? res.run.output : (res.authHandoff || res.humanMessage || res.message)
1980
+ }, null, 2);
1981
+ showToast('Executed NL intent -> ' + toolSlug + ' (' + (res.status || 'ok') + ')');
1982
+ await refreshOverview();
1983
+ } catch (err) {
1984
+ box.textContent = 'NL Execution Error: ' + err.message;
1985
+ showToast('Error: ' + err.message);
1986
+ }
1987
+ }
1988
+
1989
+ async function instantUpgradeStarter() {
1990
+ try {
1991
+ const res = await api('/api/v1/billing/upgrade', {
1992
+ method: 'POST',
1993
+ body: JSON.stringify({ tier: 'starter' })
1994
+ });
1995
+ showToast(res.message || 'Upgraded workspace to Starter Plan (+1,000 Credits)!');
1996
+ await refreshOverview();
1997
+ await loadLedger();
1998
+ } catch (err) {
1999
+ showToast('Upgrade Error: ' + err.message);
2000
+ }
2001
+ }
2002
+
2003
+ async function instantTopupCustom() {
2004
+ const input = document.getElementById('topup-credits-input');
2005
+ const credits = Math.max(1, Number((input && input.value) || 1000));
2006
+ await instantTopup(credits);
1806
2007
  }
1807
2008
 
1808
2009
  async function instantTopup(credits) {
@@ -1821,10 +2022,12 @@ export function renderConsoleHtml() {
1821
2022
 
1822
2023
  async function startCheckout(kind) {
1823
2024
  try {
1824
- showToast('Creating live Stripe Checkout session...');
2025
+ showToast('Creating Stripe Checkout session...');
2026
+ const input = document.getElementById('topup-credits-input');
2027
+ const credits = Math.max(100, Number((input && input.value) || 1000));
1825
2028
  const res = await api('/api/v1/billing/checkout', {
1826
2029
  method: 'POST',
1827
- body: JSON.stringify({ kind })
2030
+ body: JSON.stringify({ kind, credits })
1828
2031
  });
1829
2032
  if (res.url) {
1830
2033
  window.location.href = res.url;
@@ -1857,16 +2060,23 @@ export function renderConsoleHtml() {
1857
2060
  showToast('OAuth Connected: ' + prov + ' is now active!');
1858
2061
  window.history.replaceState({}, '', '/');
1859
2062
  }
2063
+ if (params.get('api_key')) {
2064
+ externalApiKey = params.get('api_key');
2065
+ localStorage.setItem('muxo_external_api_key', externalApiKey);
2066
+ }
1860
2067
  if (params.get('claimed')) {
1861
2068
  showToast('Workspace ownership claimed (' + params.get('claimed') + ')!');
1862
2069
  window.history.replaceState({}, '', '/');
2070
+ } else if (params.get('api_key')) {
2071
+ window.history.replaceState({}, '', '/');
1863
2072
  }
1864
2073
  }
1865
2074
 
1866
2075
  window.addEventListener('DOMContentLoaded', async () => {
1867
2076
  await checkCheckoutReturn();
1868
2077
  await refreshOverview();
1869
- // Sync live Stripe Projects & Composio providers in background on first load
2078
+ loadByokKeys().catch(() => {});
2079
+ // Sync live cloud infrastructure & connected app providers in background on first load
1870
2080
  loadConnections(true).catch(() => {});
1871
2081
  });
1872
2082
  </script>
@@ -2067,22 +2277,22 @@ export function renderLandingHtml() {
2067
2277
 
2068
2278
  <main class="container">
2069
2279
  <section class="hero">
2070
- <div class="eyebrow">ONE KEY (mk_live_*) · ONE MCP ENDPOINT · 4 GOVERNED PILLARS</div>
2071
- <h1>Your agent's hands, cloud infrastructure, memory brain, and cryptographic governance.</h1>
2280
+ <div class="eyebrow">ONE KEY (mk_live_*) · ONE MCP ENDPOINT · 4 UNIFIED PILLARS</div>
2281
+ <h1>Your agent's connected apps, cloud infrastructure, workspace memory, and safety guardrails.</h1>
2072
2282
  <p class="subtitle">
2073
- Customers and AI agents only ever connect to <strong>Muxo</strong>. Underneath, Muxo unifies Composio SDK &amp; Instant, Stripe Projects Cloud Provisioning, Supermemory v5, and the Microsoft Agent Governance Toolkit.
2283
+ Connect once to <strong>Muxo</strong>. Give any AI agent instant access to 850+ SaaS integrations, zero-setup APIs, live cloud database provisioning, persistent workspace memory, and human-in-the-loop safety controls.
2074
2284
  </p>
2075
2285
  <div style="display:flex;gap:12px;justify-content:center;flex-wrap:wrap;margin-bottom:32px">
2076
2286
  <a href="/" class="btn btn-primary">Launch Operator Console (app.muxo.ai)</a>
2077
- <a href="https://docs.muxo.ai" target="_blank" class="btn">Read Mintlify Docs (docs.muxo.ai)</a>
2287
+ <a href="https://docs.muxo.ai" target="_blank" class="btn">Read Documentation (docs.muxo.ai)</a>
2078
2288
  <a href="/skill.md" target="_blank" class="btn">Inspect /skill.md</a>
2079
2289
  </div>
2080
2290
 
2081
2291
  <div class="terminal-box">
2082
- <div style="color:var(--muted);margin-bottom:8px"># Install the Muxo Plugin (OpenAI Codex, ChatGPT, Claude Code &amp; Factory Droid)</div>
2083
- <div style="color:var(--mint)">$ codex plugin add muxo@muxo &amp;&amp; muxo login --signup --name "ProdAgent" &amp;&amp; muxo link github --wait</div>
2084
- <div style="color:var(--muted);margin-top:10px;margin-bottom:6px"># Autonomous Agent 2-Call Onboarding (Zero Browser Required)</div>
2085
- <div style="color:var(--cyan)" id="landing-curl-cmd">$ curl -sX POST http://localhost:4310/api/v1/agents/signup -H "Content-Type: application/json" -d '{"agentName":"ProdAgent"}'</div>
2292
+ <div style="color:var(--muted);margin-bottom:8px"># Install the Muxo Plugin (Claude Code muxo@muxo, OpenAI Codex, ChatGPT &amp; Claude Desktop · Node.js 22+)</div>
2293
+ <div style="color:var(--mint)">$ claude plugin marketplace add https://api.muxo.ai/.claude-plugin/marketplace.json &amp;&amp; claude plugin install muxo@muxo</div>
2294
+ <div style="color:var(--muted);margin-top:10px;margin-bottom:6px"># CLI-First Autonomous Agent Onboarding (browser consent only when connecting OAuth apps)</div>
2295
+ <div style="color:var(--cyan)" id="landing-curl-cmd">$ npx -y @muxoai/cli@latest login --signup --name "ProdAgent" &amp;&amp; muxo link github --wait</div>
2086
2296
  <div style="color:var(--text);margin-top:8px"># 19 Governed MCP Operations · Streamable HTTP + OAuth Callback Handoff:</div>
2087
2297
  <div style="color:var(--accent)" id="landing-mcp-urls">MCP: http://localhost:4310/mcp | OAuth Callback: http://localhost:4310/oauth/callback | Skill: http://localhost:4310/skill.md</div>
2088
2298
  </div>
@@ -2091,23 +2301,23 @@ export function renderLandingHtml() {
2091
2301
  <section id="pillars" class="pillars">
2092
2302
  <div class="pillar-card">
2093
2303
  <div class="pillar-tag">Pillar 1 · app.* &amp; instant.*</div>
2094
- <div class="pillar-title">Composio SDK + Instant</div>
2095
- <p style="color:var(--muted);font-size:13.5px">Managed OAuth across GitHub, Gmail, Slack, Notion, Linear, plus zero-auth instant search, scrape, HN, and DNS tools.</p>
2304
+ <div class="pillar-title">Connected Apps &amp; Instant Tools</div>
2305
+ <p style="color:var(--muted);font-size:13.5px">Managed OAuth across GitHub, Gmail, Slack, Notion, Linear, plus zero-auth instant search, scrape, SEO, and DNS tools.</p>
2096
2306
  </div>
2097
2307
  <div class="pillar-card">
2098
2308
  <div class="pillar-tag">Pillar 2 · resource.*</div>
2099
- <div class="pillar-title">Stripe Projects Cloud</div>
2309
+ <div class="pillar-title">Muxo Cloud Infrastructure</div>
2100
2310
  <p style="color:var(--muted);font-size:13.5px">Provision real Neon Postgres, Supabase, Turso, Upstash, Cloudflare, and Vercel resources with AES-256-GCM secret custody.</p>
2101
2311
  </div>
2102
2312
  <div class="pillar-card">
2103
2313
  <div class="pillar-tag">Pillar 3 · /ns/muxo-v5-*</div>
2104
- <div class="pillar-title">Supermemory v5 Brain</div>
2314
+ <div class="pillar-title">Muxo Workspace Memory</div>
2105
2315
  <p style="color:var(--muted);font-size:13.5px">Isolated per-workspace static facts, dynamic context, and hybrid search automatically recalled before every tool plan.</p>
2106
2316
  </div>
2107
2317
  <div class="pillar-card">
2108
- <div class="pillar-tag">Pillar 4 · Ed25519 + SHA-256</div>
2109
- <div class="pillar-title">Microsoft Agent Governance</div>
2110
- <p style="color:var(--muted);font-size:13.5px">McpSecurityScanner ──► PolicyEngine ──► AgentIdentity (DID) ──► AuditLogger ──► Ed25519 signed DecisionRecord.</p>
2318
+ <div class="pillar-tag">Pillar 4 · Safety &amp; Approvals</div>
2319
+ <div class="pillar-title">Muxo Guardrails &amp; Audit Log</div>
2320
+ <p style="color:var(--muted);font-size:13.5px">Automatic prompt-injection scanning, risk-lane policy enforcement, human approval queues, and verifiable audit records.</p>
2111
2321
  </div>
2112
2322
  </section>
2113
2323