@neta-art/cohub-cli 3.4.1 → 3.5.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.
@@ -86,6 +86,7 @@ function printProducts(products) {
86
86
  status: product.status,
87
87
  visibility: product.visibility,
88
88
  price: formatUsd(product.pricing.amountUsd),
89
+ balance: product.cohubBalance ? formatUsd(product.cohubBalance.amountUsd) : "",
89
90
  credits: product.display.creditsAmount ?? "",
90
91
  })), [
91
92
  { key: "key", label: "Key" },
@@ -93,6 +94,7 @@ function printProducts(products) {
93
94
  { key: "status", label: "Status" },
94
95
  { key: "visibility", label: "Visibility" },
95
96
  { key: "price", label: "Price" },
97
+ { key: "balance", label: "Cohub Balance" },
96
98
  { key: "credits", label: "Credits" },
97
99
  ]);
98
100
  }
@@ -211,16 +213,25 @@ Examples:
211
213
  .option("--product-key <key>", "Product key override")
212
214
  .option("--name <name>", "Product name")
213
215
  .option("--amount-usd <amount>", "One-time price in USD")
216
+ .option("--cohub-balance-usd <amount>", "Included Cohub Balance in whole USD")
214
217
  .option("--description <text>", "Product description")
215
218
  .option("--status <status>", "Product status: draft, active")
216
219
  .option("--visibility <visibility>", "Product visibility: public, private")
217
220
  .option("--json", "Output as JSON")
218
221
  .action(async (opts) => {
222
+ const amountUsd = parseAmountUsd(opts.amountUsd);
223
+ const cohubBalanceUsd = opts.cohubBalanceUsd === undefined
224
+ ? undefined
225
+ : parseInteger(opts.cohubBalanceUsd, "cohub-balance-usd", { fallback: 0, min: 1 });
226
+ if (cohubBalanceUsd !== undefined && cohubBalanceUsd > amountUsd) {
227
+ return error("Invalid Cohub Balance", "--cohub-balance-usd cannot exceed --amount-usd.");
228
+ }
219
229
  const input = {
220
230
  key: opts.productKey?.trim() || undefined,
221
231
  name: requireText(opts.name, "name", "--name <name>"),
222
232
  description: opts.description,
223
- amountUsd: parseAmountUsd(opts.amountUsd),
233
+ amountUsd,
234
+ cohubBalanceUsd,
224
235
  status: parseChoice(opts.status, "status", PRODUCT_STATUSES),
225
236
  visibility: parseChoice(opts.visibility, "visibility", PRODUCT_VISIBILITIES),
226
237
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neta-art/cohub-cli",
3
- "version": "3.4.1",
3
+ "version": "3.5.1",
4
4
  "description": "CLI for Cohub — spaces, sessions, and agent collaboration.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -19,7 +19,7 @@
19
19
  "commander": "^15.0.0",
20
20
  "pixi.js": "^8.19.0",
21
21
  "sharp": "^0.35.3",
22
- "@neta-art/cohub": "4.7.1"
22
+ "@neta-art/cohub": "4.9.0"
23
23
  },
24
24
  "publishConfig": {
25
25
  "access": "public"