@muxoai/cli 0.1.2 → 0.1.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/index.js +52 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1116,6 +1116,45 @@ async function creditsCommand(action, packId, opts) {
|
|
|
1116
1116
|
});
|
|
1117
1117
|
}
|
|
1118
1118
|
|
|
1119
|
+
// src/commands/payments.ts
|
|
1120
|
+
async function paymentsCommand(action, opts) {
|
|
1121
|
+
const api = makeApi({
|
|
1122
|
+
baseUrl: baseUrl(),
|
|
1123
|
+
key: await resolveKey(),
|
|
1124
|
+
debug: opts.debug
|
|
1125
|
+
});
|
|
1126
|
+
if (action === "onboard") {
|
|
1127
|
+
const env2 = await api.post("/payments/onboard");
|
|
1128
|
+
return renderEnvelope(env2, !!opts.json, (data2) => {
|
|
1129
|
+
const d = data2;
|
|
1130
|
+
if (d?.stubbed) {
|
|
1131
|
+
console.log("payouts: stubbed \u2014 set STRIPE_PAYMENTS_SECRET_KEY on the runtime for real onboarding");
|
|
1132
|
+
return;
|
|
1133
|
+
}
|
|
1134
|
+
if (d?.status === "active") {
|
|
1135
|
+
console.log("payouts: already active");
|
|
1136
|
+
return;
|
|
1137
|
+
}
|
|
1138
|
+
if (d?.onboarding_url) {
|
|
1139
|
+
console.log(`payout setup: ${d.onboarding_url}`);
|
|
1140
|
+
console.log("open the link to finish setup, then run `muxo payments status`");
|
|
1141
|
+
return;
|
|
1142
|
+
}
|
|
1143
|
+
console.log(`payouts: ${d?.status ?? "pending"}`);
|
|
1144
|
+
});
|
|
1145
|
+
}
|
|
1146
|
+
const env = await api.get("/payments");
|
|
1147
|
+
return renderEnvelope(env, !!opts.json, (data2) => {
|
|
1148
|
+
const d = data2;
|
|
1149
|
+
console.log(`payouts: ${d?.status ?? "none"}`);
|
|
1150
|
+
if (d?.status === "none") {
|
|
1151
|
+
console.log("run `muxo payments onboard` to accept payments from agents");
|
|
1152
|
+
} else if (d?.status === "pending" || d?.status === "restricted") {
|
|
1153
|
+
console.log("run `muxo payments onboard` to resume setup");
|
|
1154
|
+
}
|
|
1155
|
+
});
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1119
1158
|
// src/commands/login.ts
|
|
1120
1159
|
import { createInterface } from "node:readline";
|
|
1121
1160
|
function promptHidden(promptText) {
|
|
@@ -1498,6 +1537,19 @@ Docs: https://api.muxo.ai/docs/quickstart`);
|
|
|
1498
1537
|
creditsBuy.action(async (pack, opts, cmd) => {
|
|
1499
1538
|
process.exitCode = await creditsCommand("buy", pack, { ...cmd.parent.opts(), ...opts });
|
|
1500
1539
|
});
|
|
1540
|
+
const payments = program.command("payments");
|
|
1541
|
+
flags(payments);
|
|
1542
|
+
payments.description("Payout setup for accepting payments from agents");
|
|
1543
|
+
const paymentsOnboard = payments.command("onboard");
|
|
1544
|
+
flags(paymentsOnboard);
|
|
1545
|
+
paymentsOnboard.action(async (opts, cmd) => {
|
|
1546
|
+
process.exitCode = await paymentsCommand("onboard", { ...cmd.parent.opts(), ...opts });
|
|
1547
|
+
});
|
|
1548
|
+
const paymentsStatus = payments.command("status");
|
|
1549
|
+
flags(paymentsStatus);
|
|
1550
|
+
paymentsStatus.action(async (opts, cmd) => {
|
|
1551
|
+
process.exitCode = await paymentsCommand("status", { ...cmd.parent.opts(), ...opts });
|
|
1552
|
+
});
|
|
1501
1553
|
const rollbackCmd = program.command("rollback [version]");
|
|
1502
1554
|
flags(rollbackCmd);
|
|
1503
1555
|
rollbackCmd.description("Re-apply a previous manifest snapshot").action(async (version, opts) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@muxoai/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Muxo CLI: one key for your whole stack — scaffold, validate, apply, run, and monitor agent workflows.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"prepublishOnly": "npm run build"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@muxoai/core": "^0.1.
|
|
43
|
-
"@muxoai/tui": "^0.1.
|
|
42
|
+
"@muxoai/core": "^0.1.3",
|
|
43
|
+
"@muxoai/tui": "^0.1.1",
|
|
44
44
|
"commander": "^12.0.0",
|
|
45
45
|
"yaml": "^2.4.0",
|
|
46
46
|
"zod": "^3.23.0"
|