aixxai 1.7.14 → 1.7.16
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/package.json
CHANGED
package/src/commands/balance.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* 数据来源:
|
|
7
7
|
* 1. GET {model}/dashboard/billing/subscription → hard_limit_usd(总额度,美元)
|
|
8
8
|
* 2. GET {model}/dashboard/billing/usage → 已用量(多格式兜底)
|
|
9
|
-
* 3. GET
|
|
9
|
+
* 3. GET aixx.ai/api/v1/account/usage → 数据API免费额度(1121千问终检③接入)
|
|
10
10
|
*
|
|
11
11
|
* 1121终验四修:三路并发(5.7s→~2s)·指引走stdout(PowerShell不再包NativeCommandError)·
|
|
12
12
|
* 耗尽态隐藏"省着用"通用提示·lifetime与daily文案分流。
|
|
@@ -43,12 +43,12 @@ export async function balance(subArgs) {
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
console.log(`使用Key: ${maskKey(apiKey)}`);
|
|
46
|
-
console.log(`模型接口: ${baseUrl} · 数据接口:
|
|
46
|
+
console.log(`模型接口: ${baseUrl} · 数据接口: aixx.ai/api/v1\n`);
|
|
47
47
|
|
|
48
48
|
// 1121终验: 三路并发(数据API额度 / 订阅总额度 / 已用量)——串行5.7s→并发~2s
|
|
49
49
|
const pData = (async () => {
|
|
50
50
|
try {
|
|
51
|
-
const u = await fetch('https://
|
|
51
|
+
const u = await fetch('https://aixx.ai/api/v1/account/usage', {
|
|
52
52
|
headers: { Authorization: `Bearer ${apiKey}` },
|
|
53
53
|
signal: AbortSignal.timeout(FETCH_TIMEOUT),
|
|
54
54
|
});
|
package/src/commands/install.js
CHANGED
|
@@ -113,6 +113,11 @@ function printNakedIdentity(nj) {
|
|
|
113
113
|
console.log('🪪 你的萬安云身份编号:' + nj.id);
|
|
114
114
|
console.log(' 登录密码:' + nj.password + ' (请妥善保管,可在个人中心登录并修改)');
|
|
115
115
|
console.log(' 个人中心:https://console.aixx.ai/console-app.html');
|
|
116
|
+
console.log('');
|
|
117
|
+
console.log(' 💡 当前是临时身份:数据API免费 10 次。');
|
|
118
|
+
console.log(' 打开 https://aixx.ai/data-api-start.html 获取你的专属码,然后重新运行:');
|
|
119
|
+
console.log(' npx aixxai install <你的专属码>');
|
|
120
|
+
console.log(' 免费额度即升级到 80 次,并并入你的萬安云账户(余额/订阅通用)。');
|
|
116
121
|
}
|
|
117
122
|
|
|
118
123
|
async function autoRegister(baseUrl, refCode, bindCode) {
|
|
@@ -605,7 +610,7 @@ export async function install(subArgs) {
|
|
|
605
610
|
|
|
606
611
|
/**
|
|
607
612
|
* Agent直连卡(K哥拍板形态+双地址优化): 身份行取裸注册编号(config.AIXX_USER_ID·静默失败无身份则整行不显)。
|
|
608
|
-
* 文档域名用
|
|
613
|
+
* 文档域名用 aixx.ai/data-api.html(1125 K哥令全家搬.ai·www.aixx.vip保留解析兜底老版本CLI)。
|
|
609
614
|
*/
|
|
610
615
|
function printAgentCard(apiKey) {
|
|
611
616
|
let userId = '';
|
|
@@ -618,9 +623,9 @@ function printAgentCard(apiKey) {
|
|
|
618
623
|
console.log(`🔑 API Key: ${apiKey || '(未配置·跑 aixx config 查看)'}`);
|
|
619
624
|
if (userId) console.log(`🪪 萬安云身份: ${userId}(个人中心登录用·密码在本机config)`);
|
|
620
625
|
console.log('🤖 模型API: https://console.aixx.ai/v1');
|
|
621
|
-
console.log('📡 数据API: https://
|
|
622
|
-
console.log('📚 数据文档: https://
|
|
623
|
-
console.log('💡 查行情(免费80次): curl -H "Authorization: Bearer <API Key>" https://
|
|
626
|
+
console.log('📡 数据API: https://aixx.ai/api/v1');
|
|
627
|
+
console.log('📚 数据文档: https://aixx.ai/data-api.html');
|
|
628
|
+
console.log('💡 查行情(免费80次): curl -H "Authorization: Bearer <API Key>" https://aixx.ai/api/v1/market/bulk');
|
|
624
629
|
console.log('💡 调模型(需充值): curl https://console.aixx.ai/v1/chat/completions -H "Authorization: Bearer <API Key>" -d \'{"model":"glm-4-air","messages":[{"role":"user","content":"你好"}]}\'');
|
|
625
630
|
console.log(' (<API Key> 换成上面的key即可;环境变量一行配好: aixx env)');
|
|
626
631
|
console.log('──────────────────────────────────────────\n');
|
package/src/commands/market.js
CHANGED
|
@@ -54,7 +54,7 @@ async function mFetch(path) {
|
|
|
54
54
|
const token = loadToken();
|
|
55
55
|
if (!token) {
|
|
56
56
|
console.error('尚未配置访问令牌。');
|
|
57
|
-
console.error('开通: https://
|
|
57
|
+
console.error('开通: https://aixx.ai/data-api.html#price | 或设置环境变量 AIXX_API_KEY');
|
|
58
58
|
process.exit(1);
|
|
59
59
|
}
|
|
60
60
|
// 1122质检窗P3: 计量操作头行亮明所用key——多key机器上用户/agent知道烧的谁的配额(仅每命令首fetch显一次)
|
|
@@ -102,11 +102,11 @@ async function mFetch(path) {
|
|
|
102
102
|
// 误导用户去重新登录绕死圈。无鉴权探活端点200=网络真通=才可能是token问题。
|
|
103
103
|
let netOk = false;
|
|
104
104
|
try {
|
|
105
|
-
const pv = await fetch('https://
|
|
105
|
+
const pv = await fetch('https://aixx.ai/api/v1/docs.json', { signal: AbortSignal.timeout(8000) });
|
|
106
106
|
netOk = pv.ok;
|
|
107
107
|
} catch {}
|
|
108
108
|
if (!netOk) {
|
|
109
|
-
console.error('网络不可达(无法连接
|
|
109
|
+
console.error('网络不可达(无法连接 aixx.ai)——若在公司内网/代理环境,请配置 HTTPS_PROXY 环境变量后重试;本次失败与令牌无关。');
|
|
110
110
|
} else {
|
|
111
111
|
console.error('令牌无效或已过期,请重新登录: aixx market login --token <T>');
|
|
112
112
|
}
|
package/src/commands/status.js
CHANGED
|
@@ -16,7 +16,7 @@ import { join } from 'path';
|
|
|
16
16
|
|
|
17
17
|
const DEFAULT_BASE_URL = 'https://baodan.run/v1';
|
|
18
18
|
const CLOUD_BASE = 'https://console.aixx.ai';
|
|
19
|
-
const DATA_BASE = 'https://
|
|
19
|
+
const DATA_BASE = 'https://aixx.ai';
|
|
20
20
|
const FETCH_TIMEOUT = 12000;
|
|
21
21
|
|
|
22
22
|
function loadApiKey() {
|
|
@@ -69,7 +69,10 @@ export async function status() {
|
|
|
69
69
|
const apiKey = loadApiKey();
|
|
70
70
|
console.log('── 安装身份 ──');
|
|
71
71
|
if (id) {
|
|
72
|
-
console.log(`🪪 萬安云身份编号:${id.id}${id.kind === 'naked' ? '
|
|
72
|
+
console.log(`🪪 萬安云身份编号:${id.id}${id.kind === 'naked' ? '(临时身份·数据API免费10次)' : ''}`);
|
|
73
|
+
if (id.kind === 'naked') {
|
|
74
|
+
console.log(' 💡 打开 https://aixx.ai/data-api-start.html 拿专属码重装 → 免费额度升到80次+并入你的云账户');
|
|
75
|
+
}
|
|
73
76
|
console.log(' 可在个人中心「账号设置 → 绑定安装身份」并入你的账户');
|
|
74
77
|
} else {
|
|
75
78
|
console.log('🪪 未找到本地身份(尚未安装?运行 npx aixxai install)');
|