@aigne/cli 1.48.1 → 1.48.3-beta

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/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.48.3-beta](https://github.com/AIGNE-io/aigne-framework/compare/cli-v1.48.2...cli-v1.48.3-beta) (2025-09-22)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * improved number formatting for credit balance display in hub commands ([c5ec419](https://github.com/AIGNE-io/aigne-framework/commit/c5ec41910435b58957611fe48105ed3c69c56e17))
9
+
10
+ ## [1.48.2](https://github.com/AIGNE-io/aigne-framework/compare/cli-v1.48.1...cli-v1.48.2) (2025-09-18)
11
+
12
+
13
+ ### Dependencies
14
+
15
+ * The following workspace dependencies were updated
16
+ * dependencies
17
+ * @aigne/aigne-hub bumped to 0.9.6
18
+
3
19
  ## [1.48.1](https://github.com/AIGNE-io/aigne-framework/compare/cli-v1.48.0...cli-v1.48.1) (2025-09-18)
4
20
 
5
21
 
@@ -1,2 +1,3 @@
1
1
  import type { CommandModule } from "yargs";
2
+ export declare const formatNumber: (balance: string) => string;
2
3
  export declare function createHubCommand(): CommandModule;
@@ -9,9 +9,16 @@ import { AIGNE_ENV_FILE, isTest } from "../utils/aigne-hub/constants.js";
9
9
  import { connectToAIGNEHub } from "../utils/aigne-hub/credential.js";
10
10
  import { getUserInfo } from "../utils/aigne-hub-user.js";
11
11
  import { getUrlOrigin } from "../utils/get-url-origin.js";
12
- const formatNumber = (balance) => {
13
- const balanceNum = String(balance).split(".")[0];
14
- return chalk.yellow((balanceNum || "").replace(/\B(?=(\d{3})+(?!\d))/g, ","));
12
+ export const formatNumber = (balance) => {
13
+ const cleanNumber = String(balance).replace(/[^\d.-]/g, "");
14
+ const balanceNum = cleanNumber.split(".")[0];
15
+ if (!balanceNum) {
16
+ return "0";
17
+ }
18
+ return (balanceNum || "").trim().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
19
+ };
20
+ const formatNumberWithColor = (balance) => {
21
+ return chalk.yellow(formatNumber(balance));
15
22
  };
16
23
  function formatHubInfoName(name) {
17
24
  return chalk.bold(`${name}:`.padEnd(10));
@@ -32,9 +39,9 @@ function printHubStatus(data) {
32
39
  console.log("");
33
40
  if (data.enableCredit) {
34
41
  console.log(chalk.bold("Credits:"));
35
- console.log(` ${formatHubInfoName("Total")} ${formatNumber(data.credits.total)}`);
36
- console.log(` ${formatHubInfoName("Used")} ${formatNumber(data.credits.used)}`);
37
- console.log(` ${formatHubInfoName("Available")} ${formatNumber(data.credits.available)}`);
42
+ console.log(` ${formatHubInfoName("Total")} ${formatNumberWithColor(data.credits.total)}`);
43
+ console.log(` ${formatHubInfoName("Used")} ${formatNumberWithColor(data.credits.used)}`);
44
+ console.log(` ${formatHubInfoName("Available")} ${formatNumberWithColor(data.credits.available)}`);
38
45
  console.log("");
39
46
  console.log(chalk.bold("Links:"));
40
47
  if (data.links.payment) {
@@ -282,10 +289,10 @@ async function printHubDetails(url) {
282
289
  email: userInfo?.user.email || "",
283
290
  },
284
291
  credits: {
285
- available: formatNumber(userInfo?.creditBalance?.balance || "0"),
286
- total: formatNumber(userInfo?.creditBalance?.total || "0"),
287
- used: formatNumber(String(parseFloat(userInfo?.creditBalance?.total || "0") -
288
- parseFloat(userInfo?.creditBalance?.balance || "0"))),
292
+ available: userInfo?.creditBalance?.balance || "0",
293
+ total: userInfo?.creditBalance?.total || "0",
294
+ used: String(parseFloat(userInfo?.creditBalance?.total || "0") -
295
+ parseFloat(userInfo?.creditBalance?.balance || "0")),
289
296
  },
290
297
  links: {
291
298
  payment: userInfo?.paymentLink || "",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aigne/cli",
3
- "version": "1.48.1",
3
+ "version": "1.48.3-beta",
4
4
  "description": "Your command center for agent development",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -82,12 +82,12 @@
82
82
  "yoctocolors-cjs": "^2.1.3",
83
83
  "zod": "^3.25.67",
84
84
  "@aigne/agent-library": "^1.21.45",
85
- "@aigne/agentic-memory": "^1.0.45",
86
- "@aigne/aigne-hub": "^0.9.5",
87
85
  "@aigne/core": "^1.60.3",
86
+ "@aigne/aigne-hub": "^0.9.6",
88
87
  "@aigne/default-memory": "^1.2.8",
89
- "@aigne/openai": "^0.15.4",
90
- "@aigne/observability-api": "^0.10.4"
88
+ "@aigne/agentic-memory": "^1.0.45",
89
+ "@aigne/observability-api": "^0.10.4",
90
+ "@aigne/openai": "^0.15.4"
91
91
  },
92
92
  "devDependencies": {
93
93
  "@inquirer/testing": "^2.1.50",