@aisa-one/cli 0.6.6 → 0.6.7

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
@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.6.7] — 2026-10-12
11
+
12
+ ### Fixed
13
+
14
+ - Display the subscription plan name in `aisa balance`: Builder Plan for
15
+ `builder` and legacy `hive_growth_30d`, Team Plan for `team`, and
16
+ Subscription Plan when the plan code is missing or unknown.
17
+
10
18
  ## [0.6.6] — 2026-09-30
11
19
 
12
20
  ### Fixed
@@ -514,7 +522,10 @@ supports today; nothing here depends on a backend change.
514
522
  - Config commands (`aisa config get|set|list|reset`) and auth
515
523
  (`aisa login|logout|whoami`).
516
524
 
517
- [Unreleased]: https://github.com/AIsa-team/cli/compare/v0.6.4...HEAD
525
+ [Unreleased]: https://github.com/AIsa-team/cli/compare/v0.6.7...HEAD
526
+ [0.6.7]: https://github.com/AIsa-team/cli/compare/v0.6.6...v0.6.7
527
+ [0.6.6]: https://github.com/AIsa-team/cli/compare/v0.6.5...v0.6.6
528
+ [0.6.5]: https://github.com/AIsa-team/cli/compare/v0.6.4...v0.6.5
518
529
  [0.6.4]: https://github.com/AIsa-team/cli/compare/v0.6.3...v0.6.4
519
530
  [0.6.3]: https://github.com/AIsa-team/cli/compare/v0.6.2...v0.6.3
520
531
  [0.6.2]: https://github.com/AIsa-team/cli/compare/v0.6.1...v0.6.2
@@ -1,4 +1,6 @@
1
1
  export declare function formatMicrosUSD(micros: number | string | bigint): string;
2
+ /** Display name for the balance's plan credit, matching the console's plan catalog. */
3
+ export declare function planName(planCode: string | undefined): string;
2
4
  export declare function balanceAction(options?: {
3
5
  json?: boolean;
4
6
  }): Promise<void>;
@@ -17,6 +17,18 @@ export function formatMicrosUSD(micros) {
17
17
  }
18
18
  return `${negative ? "-" : ""}$${dollars.toString()}.${cents.toString().padStart(2, "0")}`;
19
19
  }
20
+ /** Display name for the balance's plan credit, matching the console's plan catalog. */
21
+ export function planName(planCode) {
22
+ switch (planCode) {
23
+ case "builder":
24
+ case "hive_growth_30d":
25
+ return "Builder Plan";
26
+ case "team":
27
+ return "Team Plan";
28
+ default:
29
+ return "Subscription Plan";
30
+ }
31
+ }
20
32
  export async function balanceAction(options = {}) {
21
33
  const key = await requireAccessToken();
22
34
  const res = await apiRequest(key, "credits/balance");
@@ -30,7 +42,7 @@ export async function balanceAction(options = {}) {
30
42
  const balance = res.data;
31
43
  console.log(` Balance: ${formatMicrosUSD(balance.account_balance_micros_usd)} ${balance.currency}`);
32
44
  console.log(` Available with key: ${formatMicrosUSD(balance.available_balance_micros_usd)} ${balance.currency}`);
33
- console.log(` GTM balance: ${formatMicrosUSD(balance.go_to_market_balance_micros_usd)} ${balance.currency}`);
45
+ console.log(` ${`${planName(balance.gtm?.plan_code)}:`.padEnd(21)}${formatMicrosUSD(balance.go_to_market_balance_micros_usd)} ${balance.currency}`);
34
46
  if (balance.api_key.unlimited) {
35
47
  console.log(" API key limit: Unlimited");
36
48
  }
@@ -1,4 +1,4 @@
1
- export declare const VERSION = "0.6.6";
1
+ export declare const VERSION = "0.6.7";
2
2
  /** Default for chat when no model is configured or supplied explicitly. */
3
3
  export declare const DEFAULT_CHAT_MODEL = "deepseek-v4.1-flash";
4
4
  /** Root of the platform. Per-surface bases are derived in api.ts#resolveBases. */
package/dist/constants.js CHANGED
@@ -1,4 +1,4 @@
1
- export const VERSION = "0.6.6";
1
+ export const VERSION = "0.6.7";
2
2
  /** Default for chat when no model is configured or supplied explicitly. */
3
3
  export const DEFAULT_CHAT_MODEL = "deepseek-v4.1-flash";
4
4
  /** Root of the platform. Per-surface bases are derived in api.ts#resolveBases. */
package/dist/types.d.ts CHANGED
@@ -30,6 +30,10 @@ export interface BalanceResponse {
30
30
  account_balance_micros_usd: number;
31
31
  available_balance_micros_usd: number;
32
32
  go_to_market_balance_micros_usd: number;
33
+ gtm?: {
34
+ /** Plan of the active paid period ("builder", "team"); absent without one or on older gateways. */
35
+ plan_code?: string;
36
+ };
33
37
  api_key: {
34
38
  unlimited: boolean;
35
39
  remaining_micros_usd: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aisa-one/cli",
3
- "version": "0.6.6",
3
+ "version": "0.6.7",
4
4
  "description": "CLI for the AIsa unified AI infrastructure platform - one API key for 80+ LLMs and 900+ endpoints across finance, search, social, and video APIs",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",