@muxoai/platform 0.0.0-stage → 1.2.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.
- package/ARCHITECTURE.md +111 -0
- package/README.md +53 -2
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +527 -0
- package/dist/config.d.ts +20 -0
- package/dist/config.js +89 -0
- package/dist/engine.d.ts +128 -0
- package/dist/engine.js +709 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +7 -0
- package/dist/mcp.d.ts +9 -0
- package/dist/mcp.js +401 -0
- package/dist/providers/composio-instant.d.ts +14 -0
- package/dist/providers/composio-instant.js +372 -0
- package/dist/providers/composio-sdk.d.ts +41 -0
- package/dist/providers/composio-sdk.js +514 -0
- package/dist/providers/microsoft-governance.d.ts +66 -0
- package/dist/providers/microsoft-governance.js +415 -0
- package/dist/providers/stripe-billing.d.ts +31 -0
- package/dist/providers/stripe-billing.js +168 -0
- package/dist/providers/stripe-projects.d.ts +53 -0
- package/dist/providers/stripe-projects.js +607 -0
- package/dist/providers/supermemory.d.ts +64 -0
- package/dist/providers/supermemory.js +224 -0
- package/dist/sdk.d.ts +115 -0
- package/dist/sdk.js +117 -0
- package/dist/server.d.ts +10 -0
- package/dist/server.js +816 -0
- package/dist/store.d.ts +200 -0
- package/dist/store.js +1260 -0
- package/dist/types.d.ts +273 -0
- package/dist/types.js +1 -0
- package/dist/ui/console-html.d.ts +2 -0
- package/dist/ui/console-html.js +2153 -0
- package/package.json +75 -4
- package/plugins/muxo/.app.json +8 -0
- package/plugins/muxo/.claude-plugin/plugin.json +16 -0
- package/plugins/muxo/.codex-plugin/plugin.json +51 -0
- package/plugins/muxo/.mcp.json +8 -0
- package/plugins/muxo/assets/logo.png +0 -0
- package/plugins/muxo/assets/logo.svg +6 -0
- package/plugins/muxo/hooks/hooks.json +27 -0
- package/plugins/muxo/hooks/session-start.sh +85 -0
- package/plugins/muxo/hooks/user-prompt-submit.sh +45 -0
- package/plugins/muxo/skills/muxo/SKILL.md +25 -0
- package/plugins/muxo/skills/muxo/references/cli.md +57 -0
- package/plugins/muxo/skills/muxo/references/mcp.md +25 -0
- package/src/catalogues/stripe-projects-catalog.json +9832 -0
- package/vendor/microsoft-governance/README.md +363 -0
- package/vendor/microsoft-governance/dist/audit.d.ts +26 -0
- package/vendor/microsoft-governance/dist/audit.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/audit.js +107 -0
- package/vendor/microsoft-governance/dist/audit.js.map +1 -0
- package/vendor/microsoft-governance/dist/cascade-containment.d.ts +84 -0
- package/vendor/microsoft-governance/dist/cascade-containment.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/cascade-containment.js +387 -0
- package/vendor/microsoft-governance/dist/cascade-containment.js.map +1 -0
- package/vendor/microsoft-governance/dist/client.d.ts +34 -0
- package/vendor/microsoft-governance/dist/client.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/client.js +112 -0
- package/vendor/microsoft-governance/dist/client.js.map +1 -0
- package/vendor/microsoft-governance/dist/context-poisoning.d.ts +58 -0
- package/vendor/microsoft-governance/dist/context-poisoning.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/context-poisoning.js +410 -0
- package/vendor/microsoft-governance/dist/context-poisoning.js.map +1 -0
- package/vendor/microsoft-governance/dist/credential-vault.d.ts +213 -0
- package/vendor/microsoft-governance/dist/credential-vault.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/credential-vault.js +567 -0
- package/vendor/microsoft-governance/dist/credential-vault.js.map +1 -0
- package/vendor/microsoft-governance/dist/discovery.d.ts +80 -0
- package/vendor/microsoft-governance/dist/discovery.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/discovery.js +404 -0
- package/vendor/microsoft-governance/dist/discovery.js.map +1 -0
- package/vendor/microsoft-governance/dist/encryption/channel.d.ts +29 -0
- package/vendor/microsoft-governance/dist/encryption/channel.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/encryption/channel.js +78 -0
- package/vendor/microsoft-governance/dist/encryption/channel.js.map +1 -0
- package/vendor/microsoft-governance/dist/encryption/index.d.ts +9 -0
- package/vendor/microsoft-governance/dist/encryption/index.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/encryption/index.js +23 -0
- package/vendor/microsoft-governance/dist/encryption/index.js.map +1 -0
- package/vendor/microsoft-governance/dist/encryption/mesh-client.d.ts +267 -0
- package/vendor/microsoft-governance/dist/encryption/mesh-client.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/encryption/mesh-client.js +1001 -0
- package/vendor/microsoft-governance/dist/encryption/mesh-client.js.map +1 -0
- package/vendor/microsoft-governance/dist/encryption/ratchet.d.ts +38 -0
- package/vendor/microsoft-governance/dist/encryption/ratchet.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/encryption/ratchet.js +223 -0
- package/vendor/microsoft-governance/dist/encryption/ratchet.js.map +1 -0
- package/vendor/microsoft-governance/dist/encryption/registry-client.d.ts +136 -0
- package/vendor/microsoft-governance/dist/encryption/registry-client.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/encryption/registry-client.js +369 -0
- package/vendor/microsoft-governance/dist/encryption/registry-client.js.map +1 -0
- package/vendor/microsoft-governance/dist/encryption/x3dh.d.ts +80 -0
- package/vendor/microsoft-governance/dist/encryption/x3dh.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/encryption/x3dh.js +238 -0
- package/vendor/microsoft-governance/dist/encryption/x3dh.js.map +1 -0
- package/vendor/microsoft-governance/dist/framework-adapter.d.ts +63 -0
- package/vendor/microsoft-governance/dist/framework-adapter.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/framework-adapter.js +253 -0
- package/vendor/microsoft-governance/dist/framework-adapter.js.map +1 -0
- package/vendor/microsoft-governance/dist/identity.d.ts +124 -0
- package/vendor/microsoft-governance/dist/identity.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/identity.js +446 -0
- package/vendor/microsoft-governance/dist/identity.js.map +1 -0
- package/vendor/microsoft-governance/dist/index.d.ts +39 -0
- package/vendor/microsoft-governance/dist/index.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/index.js +95 -0
- package/vendor/microsoft-governance/dist/index.js.map +1 -0
- package/vendor/microsoft-governance/dist/kill-switch.d.ts +22 -0
- package/vendor/microsoft-governance/dist/kill-switch.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/kill-switch.js +60 -0
- package/vendor/microsoft-governance/dist/kill-switch.js.map +1 -0
- package/vendor/microsoft-governance/dist/lifecycle.d.ts +50 -0
- package/vendor/microsoft-governance/dist/lifecycle.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/lifecycle.js +113 -0
- package/vendor/microsoft-governance/dist/lifecycle.js.map +1 -0
- package/vendor/microsoft-governance/dist/mcp.d.ts +41 -0
- package/vendor/microsoft-governance/dist/mcp.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/mcp.js +233 -0
- package/vendor/microsoft-governance/dist/mcp.js.map +1 -0
- package/vendor/microsoft-governance/dist/metrics.d.ts +123 -0
- package/vendor/microsoft-governance/dist/metrics.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/metrics.js +289 -0
- package/vendor/microsoft-governance/dist/metrics.js.map +1 -0
- package/vendor/microsoft-governance/dist/oci-manifest.d.ts +49 -0
- package/vendor/microsoft-governance/dist/oci-manifest.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/oci-manifest.js +182 -0
- package/vendor/microsoft-governance/dist/oci-manifest.js.map +1 -0
- package/vendor/microsoft-governance/dist/policy-backends/cedar.d.ts +15 -0
- package/vendor/microsoft-governance/dist/policy-backends/cedar.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/policy-backends/cedar.js +88 -0
- package/vendor/microsoft-governance/dist/policy-backends/cedar.js.map +1 -0
- package/vendor/microsoft-governance/dist/policy-backends/opa.d.ts +17 -0
- package/vendor/microsoft-governance/dist/policy-backends/opa.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/policy-backends/opa.js +74 -0
- package/vendor/microsoft-governance/dist/policy-backends/opa.js.map +1 -0
- package/vendor/microsoft-governance/dist/policy.d.ts +77 -0
- package/vendor/microsoft-governance/dist/policy.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/policy.js +760 -0
- package/vendor/microsoft-governance/dist/policy.js.map +1 -0
- package/vendor/microsoft-governance/dist/prompt-defense.d.ts +37 -0
- package/vendor/microsoft-governance/dist/prompt-defense.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/prompt-defense.js +229 -0
- package/vendor/microsoft-governance/dist/prompt-defense.js.map +1 -0
- package/vendor/microsoft-governance/dist/protocol-facets.d.ts +87 -0
- package/vendor/microsoft-governance/dist/protocol-facets.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/protocol-facets.js +728 -0
- package/vendor/microsoft-governance/dist/protocol-facets.js.map +1 -0
- package/vendor/microsoft-governance/dist/rings.d.ts +17 -0
- package/vendor/microsoft-governance/dist/rings.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/rings.js +61 -0
- package/vendor/microsoft-governance/dist/rings.js.map +1 -0
- package/vendor/microsoft-governance/dist/sandbox.d.ts +61 -0
- package/vendor/microsoft-governance/dist/sandbox.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/sandbox.js +199 -0
- package/vendor/microsoft-governance/dist/sandbox.js.map +1 -0
- package/vendor/microsoft-governance/dist/surface-parity.d.ts +45 -0
- package/vendor/microsoft-governance/dist/surface-parity.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/surface-parity.js +216 -0
- package/vendor/microsoft-governance/dist/surface-parity.js.map +1 -0
- package/vendor/microsoft-governance/dist/trust.d.ts +28 -0
- package/vendor/microsoft-governance/dist/trust.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/trust.js +209 -0
- package/vendor/microsoft-governance/dist/trust.js.map +1 -0
- package/vendor/microsoft-governance/dist/types.d.ts +422 -0
- package/vendor/microsoft-governance/dist/types.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/types.js +29 -0
- package/vendor/microsoft-governance/dist/types.js.map +1 -0
- package/vendor/microsoft-governance/dist/verify.d.ts +135 -0
- package/vendor/microsoft-governance/dist/verify.d.ts.map +1 -0
- package/vendor/microsoft-governance/dist/verify.js +356 -0
- package/vendor/microsoft-governance/dist/verify.js.map +1 -0
- package/vendor/microsoft-governance/package.json +64 -0
package/dist/cli.js
ADDED
|
@@ -0,0 +1,527 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import fs from "node:fs";
|
|
3
|
+
import os from "node:os";
|
|
4
|
+
import path from "node:path";
|
|
5
|
+
import readline from "node:readline";
|
|
6
|
+
import { getConfig } from "./config.js";
|
|
7
|
+
import { MuxoEngine } from "./engine.js";
|
|
8
|
+
import { handleJsonRpcMcpRequest } from "./mcp.js";
|
|
9
|
+
import { MuxoStore } from "./store.js";
|
|
10
|
+
function getCliConfigPath() {
|
|
11
|
+
if (process.env.MUXO_CONFIG_PATH) {
|
|
12
|
+
return path.resolve(process.env.MUXO_CONFIG_PATH);
|
|
13
|
+
}
|
|
14
|
+
return path.join(os.homedir(), ".muxo", "config.json");
|
|
15
|
+
}
|
|
16
|
+
function readCliAuthConfig() {
|
|
17
|
+
try {
|
|
18
|
+
const cfgPath = getCliConfigPath();
|
|
19
|
+
if (!fs.existsSync(cfgPath))
|
|
20
|
+
return null;
|
|
21
|
+
const raw = JSON.parse(fs.readFileSync(cfgPath, "utf8"));
|
|
22
|
+
if (raw && typeof raw.apiKey === "string" && raw.apiKey.trim()) {
|
|
23
|
+
return raw;
|
|
24
|
+
}
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
function writeCliAuthConfig(cfg) {
|
|
32
|
+
const cfgPath = getCliConfigPath();
|
|
33
|
+
fs.mkdirSync(path.dirname(cfgPath), { recursive: true });
|
|
34
|
+
fs.writeFileSync(cfgPath, JSON.stringify(cfg, null, 2) + "\n", { mode: 0o600 });
|
|
35
|
+
return cfgPath;
|
|
36
|
+
}
|
|
37
|
+
function parseFlags(args) {
|
|
38
|
+
const positional = [];
|
|
39
|
+
const flags = {};
|
|
40
|
+
for (let i = 0; i < args.length; i++) {
|
|
41
|
+
const arg = args[i];
|
|
42
|
+
if (arg.startsWith("--")) {
|
|
43
|
+
const key = arg.slice(2);
|
|
44
|
+
const next = args[i + 1];
|
|
45
|
+
if (next && !next.startsWith("--")) {
|
|
46
|
+
flags[key] = next;
|
|
47
|
+
i++;
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
flags[key] = true;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
positional.push(arg);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return { positional, flags };
|
|
58
|
+
}
|
|
59
|
+
async function runCli() {
|
|
60
|
+
const config = getConfig();
|
|
61
|
+
const store = new MuxoStore(config.dbPath, config.vaultMasterKey);
|
|
62
|
+
const engine = new MuxoEngine(config, store);
|
|
63
|
+
const { positional, flags } = parseFlags(process.argv.slice(2));
|
|
64
|
+
const cmd = positional[0] || "help";
|
|
65
|
+
if (cmd === "version" || flags.version) {
|
|
66
|
+
console.log("1.1.0");
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
const savedCliConfig = readCliAuthConfig();
|
|
70
|
+
const apiKeyFlag = (typeof flags["api-key"] === "string" ? flags["api-key"] : "") ||
|
|
71
|
+
process.env.MUXO_API_KEY ||
|
|
72
|
+
savedCliConfig?.apiKey ||
|
|
73
|
+
"";
|
|
74
|
+
const tokenAuth = apiKeyFlag ? store.resolveAuthToken(apiKeyFlag) : null;
|
|
75
|
+
const fallback = store.ensureDefaultWorkspace();
|
|
76
|
+
const ctx = tokenAuth
|
|
77
|
+
? {
|
|
78
|
+
user: tokenAuth.user,
|
|
79
|
+
workspace: tokenAuth.workspace,
|
|
80
|
+
actorId: tokenAuth.actorId,
|
|
81
|
+
authType: tokenAuth.authType,
|
|
82
|
+
}
|
|
83
|
+
: {
|
|
84
|
+
user: fallback.user,
|
|
85
|
+
workspace: fallback.workspace,
|
|
86
|
+
actorId: `cli:${fallback.user.id}`,
|
|
87
|
+
authType: "session",
|
|
88
|
+
};
|
|
89
|
+
if (flags.version || flags.v || cmd === "version") {
|
|
90
|
+
console.log(flags.json
|
|
91
|
+
? JSON.stringify({ ok: true, name: "@muxoai/cli", version: "1.2.1" }, null, 2)
|
|
92
|
+
: "1.2.1");
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
// CLI Login / Autonomous External Signup (`muxo login`)
|
|
96
|
+
if (cmd === "login" || cmd === "signup") {
|
|
97
|
+
const explicitKey = typeof flags["api-key"] === "string"
|
|
98
|
+
? flags["api-key"]
|
|
99
|
+
: positional[1]?.startsWith("mk_")
|
|
100
|
+
? positional[1]
|
|
101
|
+
: "";
|
|
102
|
+
if (explicitKey) {
|
|
103
|
+
const resolved = store.resolveAuthToken(explicitKey);
|
|
104
|
+
if (!resolved) {
|
|
105
|
+
throw new Error("Invalid Muxo API key supplied to 'muxo login'.");
|
|
106
|
+
}
|
|
107
|
+
const authPayload = {
|
|
108
|
+
authenticated: true,
|
|
109
|
+
apiKey: explicitKey,
|
|
110
|
+
workspaceId: resolved.workspace.id,
|
|
111
|
+
workspaceName: resolved.workspace.name,
|
|
112
|
+
agentId: resolved.user.id,
|
|
113
|
+
governanceDid: engine.governance.getStatus(resolved.workspace).agentDid,
|
|
114
|
+
supermemoryNamespace: engine.supermemory.getWorkspaceNamespace(resolved.workspace.id),
|
|
115
|
+
updatedAt: new Date().toISOString(),
|
|
116
|
+
};
|
|
117
|
+
const cfgPath = writeCliAuthConfig(authPayload);
|
|
118
|
+
console.log(JSON.stringify({
|
|
119
|
+
ok: true,
|
|
120
|
+
mode: "api_key",
|
|
121
|
+
configPath: cfgPath,
|
|
122
|
+
...authPayload,
|
|
123
|
+
}, null, 2));
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
// Create an isolated external workspace + mk_live_* key (`muxo login --signup` or `muxo signup`)
|
|
127
|
+
const agentName = typeof flags.name === "string"
|
|
128
|
+
? flags.name
|
|
129
|
+
: positional[1] || "Muxo CLI Agent";
|
|
130
|
+
const harness = typeof flags.harness === "string" ? flags.harness : "muxo-cli";
|
|
131
|
+
const created = store.createAutonomousAgentSignup({
|
|
132
|
+
agentName,
|
|
133
|
+
harness,
|
|
134
|
+
});
|
|
135
|
+
const authPayload = {
|
|
136
|
+
authenticated: true,
|
|
137
|
+
apiKey: created.apiKey,
|
|
138
|
+
workspaceId: created.workspace.id,
|
|
139
|
+
workspaceName: created.workspace.name,
|
|
140
|
+
agentId: created.user.id,
|
|
141
|
+
governanceDid: engine.governance.getStatus(created.workspace).agentDid,
|
|
142
|
+
supermemoryNamespace: engine.supermemory.getWorkspaceNamespace(created.workspace.id),
|
|
143
|
+
updatedAt: new Date().toISOString(),
|
|
144
|
+
};
|
|
145
|
+
const cfgPath = writeCliAuthConfig(authPayload);
|
|
146
|
+
console.log(JSON.stringify({
|
|
147
|
+
ok: true,
|
|
148
|
+
mode: "autonomous_signup",
|
|
149
|
+
configPath: cfgPath,
|
|
150
|
+
...authPayload,
|
|
151
|
+
}, null, 2));
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
if (cmd === "logout") {
|
|
155
|
+
const cfgPath = getCliConfigPath();
|
|
156
|
+
if (fs.existsSync(cfgPath)) {
|
|
157
|
+
fs.unlinkSync(cfgPath);
|
|
158
|
+
}
|
|
159
|
+
console.log(JSON.stringify({ ok: true, authenticated: false, configPath: cfgPath }, null, 2));
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
if (cmd === "claim") {
|
|
163
|
+
const email = positional[1] || (typeof flags.email === "string" ? flags.email : "");
|
|
164
|
+
if (!email || !email.includes("@")) {
|
|
165
|
+
throw new Error("Usage: muxo claim <owner_email>");
|
|
166
|
+
}
|
|
167
|
+
const claim = store.createAgentClaim({
|
|
168
|
+
workspaceId: ctx.workspace.id,
|
|
169
|
+
email,
|
|
170
|
+
baseUrl: config.baseUrl,
|
|
171
|
+
});
|
|
172
|
+
console.log(JSON.stringify({ ok: true, claim, ...claim }, null, 2));
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
// Stdio MCP Server mode (`muxo mcp`)
|
|
176
|
+
if (cmd === "mcp") {
|
|
177
|
+
const rl = readline.createInterface({
|
|
178
|
+
input: process.stdin,
|
|
179
|
+
terminal: false,
|
|
180
|
+
});
|
|
181
|
+
let queue = Promise.resolve();
|
|
182
|
+
rl.on("line", (line) => {
|
|
183
|
+
const trimmed = line.trim();
|
|
184
|
+
if (!trimmed)
|
|
185
|
+
return;
|
|
186
|
+
queue = queue.then(async () => {
|
|
187
|
+
try {
|
|
188
|
+
const rpc = JSON.parse(trimmed);
|
|
189
|
+
const response = await handleJsonRpcMcpRequest(engine, ctx, rpc);
|
|
190
|
+
if (response) {
|
|
191
|
+
process.stdout.write(JSON.stringify(response) + "\n");
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
catch (err) {
|
|
195
|
+
process.stdout.write(JSON.stringify({
|
|
196
|
+
jsonrpc: "2.0",
|
|
197
|
+
id: null,
|
|
198
|
+
error: {
|
|
199
|
+
code: -32700,
|
|
200
|
+
message: String(err?.message || "Parse error"),
|
|
201
|
+
},
|
|
202
|
+
}) + "\n");
|
|
203
|
+
}
|
|
204
|
+
});
|
|
205
|
+
});
|
|
206
|
+
await new Promise((resolve) => {
|
|
207
|
+
rl.on("close", () => {
|
|
208
|
+
queue.finally(() => resolve());
|
|
209
|
+
});
|
|
210
|
+
});
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
if (cmd === "harness") {
|
|
214
|
+
console.log(JSON.stringify({
|
|
215
|
+
ok: true,
|
|
216
|
+
version: "1.2.0",
|
|
217
|
+
workspaceId: ctx.workspace.id,
|
|
218
|
+
data: {
|
|
219
|
+
mcpServers: {
|
|
220
|
+
muxo: {
|
|
221
|
+
command: "npx",
|
|
222
|
+
args: ["-y", "@muxoai/cli@latest", "mcp"],
|
|
223
|
+
},
|
|
224
|
+
},
|
|
225
|
+
remoteMcp: {
|
|
226
|
+
url: "https://api.muxo.ai/mcp",
|
|
227
|
+
transport: "streamable-http",
|
|
228
|
+
},
|
|
229
|
+
},
|
|
230
|
+
}, null, 2));
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
233
|
+
if (cmd === "whoami" || cmd === "status" || cmd === "doctor") {
|
|
234
|
+
const org = engine.getOrganization(ctx);
|
|
235
|
+
console.log(JSON.stringify({
|
|
236
|
+
authenticated: true,
|
|
237
|
+
authSource: tokenAuth
|
|
238
|
+
? savedCliConfig?.apiKey === apiKeyFlag
|
|
239
|
+
? "config_file"
|
|
240
|
+
: "api_key"
|
|
241
|
+
: "local_default",
|
|
242
|
+
profile: engine.getProfile(ctx),
|
|
243
|
+
governanceDid: engine.governance.getStatus(ctx.workspace).agentDid,
|
|
244
|
+
supermemoryNamespace: engine.supermemory.getWorkspaceNamespace(ctx.workspace.id),
|
|
245
|
+
...org,
|
|
246
|
+
}, null, 2));
|
|
247
|
+
return;
|
|
248
|
+
}
|
|
249
|
+
if (cmd === "search") {
|
|
250
|
+
const query = positional.slice(1).join(" ") || flags.query || "";
|
|
251
|
+
const lane = flags.lane || "all";
|
|
252
|
+
const res = await engine.searchTools({
|
|
253
|
+
query,
|
|
254
|
+
lane,
|
|
255
|
+
limit: flags.limit ? Number(flags.limit) : 20,
|
|
256
|
+
});
|
|
257
|
+
if (flags.json) {
|
|
258
|
+
console.log(JSON.stringify(res, null, 2));
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
console.log(`\nFound ${res.total} tools matching '${query || "*"}' (lane: ${lane}):\n`);
|
|
262
|
+
for (const t of res.tools) {
|
|
263
|
+
console.log(` • ${t.slug.padEnd(38)} [${t.lane.padEnd(16)}] (${t.riskLevel}, ${t.creditCost} cr)`);
|
|
264
|
+
console.log(` ${t.description.slice(0, 100)}`);
|
|
265
|
+
}
|
|
266
|
+
return;
|
|
267
|
+
}
|
|
268
|
+
if (cmd === "inspect") {
|
|
269
|
+
const slug = positional[1];
|
|
270
|
+
if (!slug)
|
|
271
|
+
throw new Error("Usage: muxo inspect <tool_slug>");
|
|
272
|
+
const tool = await engine.inspectTool(slug);
|
|
273
|
+
console.log(JSON.stringify(tool, null, 2));
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
if (cmd === "connections") {
|
|
277
|
+
const status = await engine.connectionStatus(ctx, {
|
|
278
|
+
provider: positional[1],
|
|
279
|
+
syncLive: flags.sync !== "false",
|
|
280
|
+
});
|
|
281
|
+
console.log(JSON.stringify(status, null, 2));
|
|
282
|
+
return;
|
|
283
|
+
}
|
|
284
|
+
if (cmd === "connect" || cmd === "link") {
|
|
285
|
+
const provider = positional[1];
|
|
286
|
+
if (!provider)
|
|
287
|
+
throw new Error(`Usage: muxo ${cmd} <provider> [--wait] [--timeout 30]`);
|
|
288
|
+
const res = await engine.startConnection(ctx, {
|
|
289
|
+
provider,
|
|
290
|
+
lane: flags.lane,
|
|
291
|
+
callbackUrl: typeof flags.callback === "string" ? flags.callback : undefined,
|
|
292
|
+
});
|
|
293
|
+
if (flags.wait) {
|
|
294
|
+
const timeoutSeconds = flags.timeout ? Number(flags.timeout) : 15;
|
|
295
|
+
const waited = await engine.waitForConnection(ctx, {
|
|
296
|
+
provider,
|
|
297
|
+
timeoutSeconds,
|
|
298
|
+
});
|
|
299
|
+
console.log(JSON.stringify({ ...res, waitResult: waited }, null, 2));
|
|
300
|
+
return;
|
|
301
|
+
}
|
|
302
|
+
console.log(JSON.stringify(res, null, 2));
|
|
303
|
+
return;
|
|
304
|
+
}
|
|
305
|
+
if (cmd === "wait") {
|
|
306
|
+
const provider = positional[1];
|
|
307
|
+
if (!provider)
|
|
308
|
+
throw new Error("Usage: muxo wait <provider> [--timeout 15]");
|
|
309
|
+
const timeoutSeconds = flags.timeout ? Number(flags.timeout) : 15;
|
|
310
|
+
const waited = await engine.waitForConnection(ctx, {
|
|
311
|
+
provider,
|
|
312
|
+
timeoutSeconds,
|
|
313
|
+
});
|
|
314
|
+
console.log(JSON.stringify(waited, null, 2));
|
|
315
|
+
return;
|
|
316
|
+
}
|
|
317
|
+
if (cmd === "plan") {
|
|
318
|
+
const toolSlug = positional[1];
|
|
319
|
+
if (!toolSlug)
|
|
320
|
+
throw new Error("Usage: muxo plan <tool_slug> [--input '{...}']");
|
|
321
|
+
const input = flags.input ? JSON.parse(String(flags.input)) : {};
|
|
322
|
+
const reason = flags.reason ? String(flags.reason) : "Planned via Muxo CLI";
|
|
323
|
+
const planned = await engine.planAction(ctx, { toolSlug, input, reason });
|
|
324
|
+
console.log(JSON.stringify(planned, null, 2));
|
|
325
|
+
return;
|
|
326
|
+
}
|
|
327
|
+
if (cmd === "approve") {
|
|
328
|
+
const planId = positional[1];
|
|
329
|
+
if (!planId)
|
|
330
|
+
throw new Error("Usage: muxo approve <plan_id>");
|
|
331
|
+
const approved = engine.approvePlan(ctx, planId, "approved");
|
|
332
|
+
console.log(JSON.stringify(approved, null, 2));
|
|
333
|
+
return;
|
|
334
|
+
}
|
|
335
|
+
if (cmd === "run") {
|
|
336
|
+
const planId = positional[1];
|
|
337
|
+
if (!planId)
|
|
338
|
+
throw new Error("Usage: muxo run <plan_id>");
|
|
339
|
+
const plan = engine.getPlan(ctx, planId);
|
|
340
|
+
const result = await engine.executePlanForRisk(ctx, planId, plan.riskLevel);
|
|
341
|
+
console.log(JSON.stringify(result, null, 2));
|
|
342
|
+
return;
|
|
343
|
+
}
|
|
344
|
+
if (cmd === "exec" || cmd === "provision") {
|
|
345
|
+
const toolSlug = positional[1];
|
|
346
|
+
if (!toolSlug)
|
|
347
|
+
throw new Error(`Usage: muxo ${cmd} <tool_slug> [--input '{...}'] [--approve]`);
|
|
348
|
+
const input = flags.input ? JSON.parse(String(flags.input)) : {};
|
|
349
|
+
const planned = await engine.planAction(ctx, {
|
|
350
|
+
toolSlug,
|
|
351
|
+
input,
|
|
352
|
+
reason: `Direct CLI ${cmd}`,
|
|
353
|
+
});
|
|
354
|
+
if (planned.plan.approvalStatus === "pending_approval") {
|
|
355
|
+
if (flags.approve || cmd === "provision") {
|
|
356
|
+
engine.approvePlan(ctx, planned.plan.id, "approved");
|
|
357
|
+
}
|
|
358
|
+
else {
|
|
359
|
+
console.log(JSON.stringify({
|
|
360
|
+
ok: false,
|
|
361
|
+
status: "pending_approval",
|
|
362
|
+
plan: planned.plan,
|
|
363
|
+
hint: `Pass --approve or run 'muxo approve ${planned.plan.id}' to authorize this ${planned.plan.riskLevel} operation.`,
|
|
364
|
+
}, null, 2));
|
|
365
|
+
return;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
const result = await engine.executePlanForRisk(ctx, planned.plan.id, planned.plan.riskLevel);
|
|
369
|
+
console.log(JSON.stringify(result, null, 2));
|
|
370
|
+
return;
|
|
371
|
+
}
|
|
372
|
+
if (cmd === "resources") {
|
|
373
|
+
console.log(JSON.stringify(store.listResources(ctx.workspace.id), null, 2));
|
|
374
|
+
return;
|
|
375
|
+
}
|
|
376
|
+
if (cmd === "env" && positional[1] === "pull") {
|
|
377
|
+
const outFile = String(flags.out || ".env.muxo");
|
|
378
|
+
const workdirSecrets = await engine.stripeProjects
|
|
379
|
+
.pullEnvVarsFromWorkdir()
|
|
380
|
+
.catch(() => ({}));
|
|
381
|
+
const vaultSecrets = store.getDecryptedWorkspaceEnv(ctx.workspace.id);
|
|
382
|
+
const merged = { ...workdirSecrets, ...vaultSecrets };
|
|
383
|
+
const lines = [
|
|
384
|
+
`# Muxo Provisioned Environment (${ctx.workspace.slug})`,
|
|
385
|
+
...Object.entries(merged).map(([k, v]) => `${k}=${JSON.stringify(v)}`),
|
|
386
|
+
"",
|
|
387
|
+
];
|
|
388
|
+
const resolvedPath = path.resolve(process.cwd(), outFile);
|
|
389
|
+
fs.writeFileSync(resolvedPath, lines.join("\n"), { mode: 0o600 });
|
|
390
|
+
console.log(JSON.stringify({
|
|
391
|
+
ok: true,
|
|
392
|
+
outputFile: resolvedPath,
|
|
393
|
+
keysWritten: Object.keys(merged),
|
|
394
|
+
}, null, 2));
|
|
395
|
+
return;
|
|
396
|
+
}
|
|
397
|
+
if (cmd === "receipts") {
|
|
398
|
+
const receiptId = positional[1];
|
|
399
|
+
if (receiptId) {
|
|
400
|
+
console.log(JSON.stringify(engine.getReceipt(ctx, receiptId), null, 2));
|
|
401
|
+
}
|
|
402
|
+
else {
|
|
403
|
+
console.log(JSON.stringify(store.listReceipts(ctx.workspace.id, 20), null, 2));
|
|
404
|
+
}
|
|
405
|
+
return;
|
|
406
|
+
}
|
|
407
|
+
if (cmd === "billing" || cmd === "topup") {
|
|
408
|
+
const sub = cmd === "topup" ? "topup" : positional[1] || "status";
|
|
409
|
+
if (sub === "topup") {
|
|
410
|
+
const credits = Math.max(1, Number(flags.credits || (cmd === "topup" ? positional[1] : positional[2]) || 1000));
|
|
411
|
+
const usdPaid = (credits * 0.01).toFixed(2);
|
|
412
|
+
const refId = `cli_topup_${Date.now()}`;
|
|
413
|
+
const updated = store.addWorkspaceCredits({
|
|
414
|
+
workspaceId: ctx.workspace.id,
|
|
415
|
+
credits,
|
|
416
|
+
referenceId: refId,
|
|
417
|
+
description: `User purchased +${credits.toLocaleString()} Muxo Credits ($${usdPaid} USD -> Muxo Master Wallet)`,
|
|
418
|
+
});
|
|
419
|
+
console.log(JSON.stringify({
|
|
420
|
+
ok: true,
|
|
421
|
+
creditsAdded: credits,
|
|
422
|
+
usdPaid: Number(usdPaid),
|
|
423
|
+
creditsBalance: updated.creditsBalance,
|
|
424
|
+
settlementSummary: store.getSupplierSettlementSummary(ctx.workspace.id),
|
|
425
|
+
}, null, 2));
|
|
426
|
+
return;
|
|
427
|
+
}
|
|
428
|
+
if (sub === "checkout") {
|
|
429
|
+
const kind = flags.kind === "starter_subscription" || positional[2] === "starter"
|
|
430
|
+
? "starter_subscription"
|
|
431
|
+
: "credit_topup";
|
|
432
|
+
const session = await engine.stripeBilling.createCheckoutSession({
|
|
433
|
+
workspace: ctx.workspace,
|
|
434
|
+
customerEmail: ctx.user.email,
|
|
435
|
+
kind,
|
|
436
|
+
returnBaseUrl: config.baseUrl,
|
|
437
|
+
});
|
|
438
|
+
console.log(JSON.stringify({ ok: true, kind, ...session }, null, 2));
|
|
439
|
+
return;
|
|
440
|
+
}
|
|
441
|
+
console.log(JSON.stringify({
|
|
442
|
+
ok: true,
|
|
443
|
+
settlementSummary: store.getSupplierSettlementSummary(ctx.workspace.id),
|
|
444
|
+
recentLedger: store.listLedgerEntries(ctx.workspace.id, 25),
|
|
445
|
+
}, null, 2));
|
|
446
|
+
return;
|
|
447
|
+
}
|
|
448
|
+
if (cmd === "memory") {
|
|
449
|
+
const sub = positional[1];
|
|
450
|
+
if (sub === "add") {
|
|
451
|
+
const content = positional.slice(2).join(" ") || String(flags.content || "");
|
|
452
|
+
if (!content)
|
|
453
|
+
throw new Error("Usage: muxo memory add <text>");
|
|
454
|
+
const entry = await engine.addWorkspaceMemory(ctx, {
|
|
455
|
+
content,
|
|
456
|
+
title: flags.title ? String(flags.title) : content.slice(0, 60),
|
|
457
|
+
});
|
|
458
|
+
console.log(JSON.stringify({ ok: true, memory: entry }, null, 2));
|
|
459
|
+
return;
|
|
460
|
+
}
|
|
461
|
+
const query = sub === "recall" || sub === "search"
|
|
462
|
+
? positional.slice(2).join(" ") || flags.query || undefined
|
|
463
|
+
: positional.slice(1).join(" ") || flags.query || undefined;
|
|
464
|
+
const recall = await engine.getMemoryOverview(ctx, query);
|
|
465
|
+
console.log(JSON.stringify(recall, null, 2));
|
|
466
|
+
return;
|
|
467
|
+
}
|
|
468
|
+
if (cmd === "governance") {
|
|
469
|
+
console.log(JSON.stringify(engine.governance.getGovernanceStatus(ctx.workspace), null, 2));
|
|
470
|
+
return;
|
|
471
|
+
}
|
|
472
|
+
if (cmd === "serve") {
|
|
473
|
+
const { createMuxoServer } = await import("./server.js");
|
|
474
|
+
const port = flags.port ? Number(flags.port) : config.port;
|
|
475
|
+
const baseUrl = `http://localhost:${port}`;
|
|
476
|
+
const srvConfig = { ...config, port, baseUrl };
|
|
477
|
+
const { server } = createMuxoServer(srvConfig);
|
|
478
|
+
await new Promise((resolve) => {
|
|
479
|
+
server.listen(port, () => {
|
|
480
|
+
console.log(`\n⚡ Muxo Platform running at ${baseUrl}`);
|
|
481
|
+
console.log(` ├─ Web Console: ${baseUrl}/`);
|
|
482
|
+
console.log(` ├─ Landing Page: ${baseUrl}/landing`);
|
|
483
|
+
console.log(` ├─ MCP Server: ${baseUrl}/mcp`);
|
|
484
|
+
console.log(` ├─ OAuth Callback: ${baseUrl}/oauth/callback`);
|
|
485
|
+
console.log(` └─ Agent Skill: ${baseUrl}/skill.md\n`);
|
|
486
|
+
});
|
|
487
|
+
process.on("SIGINT", () => {
|
|
488
|
+
server.close(() => resolve());
|
|
489
|
+
});
|
|
490
|
+
process.on("SIGTERM", () => {
|
|
491
|
+
server.close(() => resolve());
|
|
492
|
+
});
|
|
493
|
+
});
|
|
494
|
+
return;
|
|
495
|
+
}
|
|
496
|
+
console.log(`
|
|
497
|
+
Muxo CLI — Unified Execution, Provisioning & Governance Platform
|
|
498
|
+
|
|
499
|
+
Commands:
|
|
500
|
+
muxo login [--api-key <key> | --signup] Sign in or create an autonomous workspace (~/.muxo/config.json)
|
|
501
|
+
muxo logout Remove saved CLI authentication config
|
|
502
|
+
muxo claim <owner_email> Generate a human owner claim link for this workspace
|
|
503
|
+
muxo whoami Show workspace profile, plan, DID, and credit balance
|
|
504
|
+
muxo search <query> [--lane <lane>] Search across Instant, Composio Apps, and Stripe Projects
|
|
505
|
+
muxo inspect <tool_slug> Inspect tool schema, risk level, and credit cost
|
|
506
|
+
muxo connections [--sync true|false] List Composio OAuth & Stripe Projects provider connections
|
|
507
|
+
muxo link <provider> [--wait] Start OAuth handoff for a service and optionally wait
|
|
508
|
+
muxo connect <provider> [--wait] Alias for 'muxo link'
|
|
509
|
+
muxo wait <provider> [--timeout 15] Poll until a pending OAuth connection handoff becomes active
|
|
510
|
+
muxo plan <tool_slug> --input '{...}' Create a governed execution plan (plan_*)
|
|
511
|
+
muxo approve <plan_id> Approve a pending high-risk plan
|
|
512
|
+
muxo run <plan_id> Execute an approved plan and issue a signed receipt
|
|
513
|
+
muxo exec <tool_slug> --input '{...}' Plan and execute in one step (pass --approve for high-risk)
|
|
514
|
+
muxo resources List provisioned Stripe Projects infrastructure resources
|
|
515
|
+
muxo env pull [--out .env.muxo] Decrypt and write provisioned credentials to local .env
|
|
516
|
+
muxo receipts [<receipt_id>] List or cryptographically verify execution receipts
|
|
517
|
+
muxo billing [status|topup|checkout] Buy Muxo credits & inspect User -> Muxo -> Supplier settlements
|
|
518
|
+
muxo memory [<query>] Recall Supermemory v5 workspace brain & hybrid memories
|
|
519
|
+
muxo governance Inspect Microsoft Agent Governance Ed25519 DID & audit chain
|
|
520
|
+
muxo serve [--port 4310] Start unified HTTP Console, Landing, OAuth Callback & MCP server
|
|
521
|
+
muxo mcp Run stdio MCP server (19 canonical tools)
|
|
522
|
+
`);
|
|
523
|
+
}
|
|
524
|
+
runCli().catch((err) => {
|
|
525
|
+
console.error("Error:", err?.message || err);
|
|
526
|
+
process.exit(1);
|
|
527
|
+
});
|
package/dist/config.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const ROOT_DIR: string;
|
|
2
|
+
export interface MuxoConfig {
|
|
3
|
+
port: number;
|
|
4
|
+
baseUrl: string;
|
|
5
|
+
dbPath: string;
|
|
6
|
+
composioApiKey: string;
|
|
7
|
+
composioBaseUrl: string;
|
|
8
|
+
stripeSecretKey: string;
|
|
9
|
+
stripeStarterPriceId: string;
|
|
10
|
+
stripeCreditsPriceId: string;
|
|
11
|
+
stripeWebhookSecret: string;
|
|
12
|
+
stripeProjectsWorkdir: string;
|
|
13
|
+
stripeBinaryPath: string;
|
|
14
|
+
supermemoryApiKey: string;
|
|
15
|
+
supermemoryBaseUrl: string;
|
|
16
|
+
publicWebUrl: string;
|
|
17
|
+
docsUrl: string;
|
|
18
|
+
vaultMasterKey: Buffer;
|
|
19
|
+
}
|
|
20
|
+
export declare function getConfig(): MuxoConfig;
|
package/dist/config.js
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import os from "node:os";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import crypto from "node:crypto";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
6
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
7
|
+
export const ROOT_DIR = path.resolve(__dirname, "..");
|
|
8
|
+
function loadDotEnv(envPath) {
|
|
9
|
+
if (!fs.existsSync(envPath))
|
|
10
|
+
return;
|
|
11
|
+
const raw = fs.readFileSync(envPath, "utf8");
|
|
12
|
+
for (const line of raw.split(/\r?\n/)) {
|
|
13
|
+
const trimmed = line.trim();
|
|
14
|
+
if (!trimmed || trimmed.startsWith("#"))
|
|
15
|
+
continue;
|
|
16
|
+
const eqIdx = trimmed.indexOf("=");
|
|
17
|
+
if (eqIdx <= 0)
|
|
18
|
+
continue;
|
|
19
|
+
const key = trimmed.slice(0, eqIdx).trim();
|
|
20
|
+
const val = trimmed.slice(eqIdx + 1).trim().replace(/^["']|["']$/g, "");
|
|
21
|
+
if (process.env[key] === undefined || process.env[key] === "") {
|
|
22
|
+
process.env[key] = val;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
if (process.env.MUXO_EXTERNAL_MODE !== "1") {
|
|
27
|
+
loadDotEnv(path.join(ROOT_DIR, ".env"));
|
|
28
|
+
}
|
|
29
|
+
function resolveStripeBinary() {
|
|
30
|
+
const candidates = [
|
|
31
|
+
process.env.STRIPE_BINARY_PATH,
|
|
32
|
+
"/Users/test/.local/bin/stripe",
|
|
33
|
+
"/opt/homebrew/bin/stripe",
|
|
34
|
+
"/usr/local/bin/stripe",
|
|
35
|
+
"stripe",
|
|
36
|
+
].filter(Boolean);
|
|
37
|
+
for (const candidate of candidates) {
|
|
38
|
+
if (candidate === "stripe" || fs.existsSync(candidate)) {
|
|
39
|
+
return candidate;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return "stripe";
|
|
43
|
+
}
|
|
44
|
+
function deriveVaultMasterKey() {
|
|
45
|
+
const seed = process.env.MUXO_VAULT_SECRET ||
|
|
46
|
+
process.env.COMPOSIO_API_KEY ||
|
|
47
|
+
"muxo-local-vault-default-seed-v1";
|
|
48
|
+
return crypto.scryptSync(seed, "muxo-aes256gcm-salt-v1", 32);
|
|
49
|
+
}
|
|
50
|
+
export function getConfig() {
|
|
51
|
+
const port = Number(process.env.PORT || 4310);
|
|
52
|
+
const isExternalPackage = process.env.MUXO_EXTERNAL_MODE === "1" ||
|
|
53
|
+
!fs.existsSync(path.join(ROOT_DIR, "src", "server.ts"));
|
|
54
|
+
const dataDir = process.env.MUXO_HOME
|
|
55
|
+
? path.join(process.env.MUXO_HOME, "data")
|
|
56
|
+
: isExternalPackage
|
|
57
|
+
? path.join(os.homedir(), ".muxo", "data")
|
|
58
|
+
: path.join(ROOT_DIR, "data");
|
|
59
|
+
if (!fs.existsSync(dataDir)) {
|
|
60
|
+
fs.mkdirSync(dataDir, { recursive: true });
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
port,
|
|
64
|
+
baseUrl: process.env.MUXO_BASE_URL || `http://localhost:${port}`,
|
|
65
|
+
dbPath: process.env.MUXO_DB_PATH || path.join(dataDir, "muxo.db"),
|
|
66
|
+
composioApiKey: process.env.MUXO_EXTERNAL_MODE === "1"
|
|
67
|
+
? ""
|
|
68
|
+
: process.env.COMPOSIO_API_KEY || "",
|
|
69
|
+
composioBaseUrl: process.env.COMPOSIO_BASE_URL || "https://backend.composio.dev/api/v3",
|
|
70
|
+
stripeSecretKey: process.env.MUXO_EXTERNAL_MODE === "1"
|
|
71
|
+
? ""
|
|
72
|
+
: process.env.STRIPE_SECRET_KEY || "",
|
|
73
|
+
stripeStarterPriceId: process.env.STRIPE_STARTER_PRICE_ID || "",
|
|
74
|
+
stripeCreditsPriceId: process.env.STRIPE_CREDITS_PRICE_ID || "",
|
|
75
|
+
stripeWebhookSecret: process.env.STRIPE_WEBHOOK_SECRET || "",
|
|
76
|
+
stripeProjectsWorkdir: process.env.MUXO_EXTERNAL_MODE === "1"
|
|
77
|
+
? "/nonexistent/external-user-workdir"
|
|
78
|
+
: process.env.STRIPE_PROJECTS_WORKDIR ||
|
|
79
|
+
"/Users/test/Documents/muxo2/muxo-production-qualification",
|
|
80
|
+
stripeBinaryPath: resolveStripeBinary(),
|
|
81
|
+
supermemoryApiKey: process.env.MUXO_EXTERNAL_MODE === "1"
|
|
82
|
+
? ""
|
|
83
|
+
: process.env.SUPERMEMORY_API_KEY || "",
|
|
84
|
+
supermemoryBaseUrl: process.env.SUPERMEMORY_BASE_URL || "https://api.supermemory.ai",
|
|
85
|
+
publicWebUrl: process.env.MUXO_PUBLIC_WEB_URL || "https://muxo.ai",
|
|
86
|
+
docsUrl: process.env.MUXO_DOCS_URL || "https://docs.muxo.ai",
|
|
87
|
+
vaultMasterKey: deriveVaultMasterKey(),
|
|
88
|
+
};
|
|
89
|
+
}
|