@keruyun/agent-cli 1.4.4-beta.4 → 1.4.4-beta.6
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/README.md +5 -5
- package/binaries.json +30 -30
- package/install.cjs +31 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,12 +17,12 @@ npm i @keruyun/agent-cli@latest -g --registry=https://registry.npmmirror.com
|
|
|
17
17
|
|
|
18
18
|
| 平台 | 解压后体积 |
|
|
19
19
|
| --- | --- |
|
|
20
|
-
| darwin-arm64 | 65.
|
|
21
|
-
| darwin-x64(baseline 变体,兼容无 AVX2 的老 CPU) | 71.
|
|
22
|
-
| linux-x64 | 95.
|
|
20
|
+
| darwin-arm64 | 65.78 MB |
|
|
21
|
+
| darwin-x64(baseline 变体,兼容无 AVX2 的老 CPU) | 71.2 MB |
|
|
22
|
+
| linux-x64 | 95.44 MB |
|
|
23
23
|
| linux-arm64 | 94.54 MB |
|
|
24
|
-
| linux-x64-musl | 92.
|
|
25
|
-
| win32-x64 | 99.
|
|
24
|
+
| linux-x64-musl | 92.18 MB |
|
|
25
|
+
| win32-x64 | 99.15 MB |
|
|
26
26
|
|
|
27
27
|
## 校验
|
|
28
28
|
|
package/binaries.json
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.4.4-beta.
|
|
2
|
+
"version": "1.4.4-beta.6",
|
|
3
3
|
"targets": {
|
|
4
4
|
"darwin-arm64": {
|
|
5
|
-
"url": "https://s.koubei.com/
|
|
6
|
-
"sha256": "
|
|
7
|
-
"brSha256": "
|
|
8
|
-
"brBytes":
|
|
9
|
-
"bytes":
|
|
5
|
+
"url": "https://s.koubei.com/rr6hMa6JE5EBwhsyaNP4ChtHACn8QWsK.br",
|
|
6
|
+
"sha256": "382843090190f2ec2566a602a78cc7ee8b11b80bb688ffe51dc36864414bc84c",
|
|
7
|
+
"brSha256": "ebb7c92c0607bdf4e0f276e50684825c245def6f1cd8a4c833b13b44dc319e45",
|
|
8
|
+
"brBytes": 19908985,
|
|
9
|
+
"bytes": 68977634
|
|
10
10
|
},
|
|
11
11
|
"darwin-x64": {
|
|
12
|
-
"url": "https://s.koubei.com/
|
|
13
|
-
"sha256": "
|
|
14
|
-
"brSha256": "
|
|
15
|
-
"brBytes":
|
|
16
|
-
"bytes":
|
|
12
|
+
"url": "https://s.koubei.com/Pi75QAH6RDesJhc52mNf86iT8KktJy33.br",
|
|
13
|
+
"sha256": "a4261551fa0dfe5b0d401471b96ea86d0dc1449f671d911a3a687a0bc3ec12e4",
|
|
14
|
+
"brSha256": "d60969cab65dab871d97865b7dc1634b08e7409ca05b119a248461044be21d89",
|
|
15
|
+
"brBytes": 22339891,
|
|
16
|
+
"bytes": 74661968
|
|
17
17
|
},
|
|
18
18
|
"linux-x64": {
|
|
19
|
-
"url": "https://s.koubei.com/
|
|
20
|
-
"sha256": "
|
|
21
|
-
"brSha256": "
|
|
22
|
-
"brBytes":
|
|
23
|
-
"bytes":
|
|
19
|
+
"url": "https://s.koubei.com/NbK8pBZ5zKEjMcajBkRW5faartby7csE.br",
|
|
20
|
+
"sha256": "2a9b096d0b520839bd050d314f995e5dfce434c51719b37b1d86e4285177fe05",
|
|
21
|
+
"brSha256": "7836b99d46991f8dfe404ff273aba61953048286f1f3a239f05deeca8e1586d9",
|
|
22
|
+
"brBytes": 30765416,
|
|
23
|
+
"bytes": 100075648
|
|
24
24
|
},
|
|
25
25
|
"linux-arm64": {
|
|
26
|
-
"url": "https://s.koubei.com/
|
|
27
|
-
"sha256": "
|
|
28
|
-
"brSha256": "
|
|
29
|
-
"brBytes":
|
|
26
|
+
"url": "https://s.koubei.com/npFFn3bFFFtaXyAn28C3MiZAFK2NhQYd.br",
|
|
27
|
+
"sha256": "d43d9e12e45000ab7ef63ee9efac5d53f350458af57cd45a517c48fbdd01311d",
|
|
28
|
+
"brSha256": "971a214b3433abc3c3dadd14c5a38c4a59807a1770cf7f7e13e6b346ec619ee2",
|
|
29
|
+
"brBytes": 30159020,
|
|
30
30
|
"bytes": 99133584
|
|
31
31
|
},
|
|
32
32
|
"linux-x64-musl": {
|
|
33
|
-
"url": "https://s.koubei.com/
|
|
34
|
-
"sha256": "
|
|
35
|
-
"brSha256": "
|
|
36
|
-
"brBytes":
|
|
37
|
-
"bytes":
|
|
33
|
+
"url": "https://s.koubei.com/AiDMeJmeNXABmW5mJPZatwkSjYBwpbc8.br",
|
|
34
|
+
"sha256": "f53a79715dd60277d2964dacaf79e2672dd305aa81c86300e70e3b65bd62f97e",
|
|
35
|
+
"brSha256": "0cd56e628b81be3cf07eed496f7fa13ad3d1f1496464a610941425422a638c4a",
|
|
36
|
+
"brBytes": 29957920,
|
|
37
|
+
"bytes": 96655648
|
|
38
38
|
},
|
|
39
39
|
"win32-x64": {
|
|
40
|
-
"url": "https://s.koubei.com/
|
|
41
|
-
"sha256": "
|
|
42
|
-
"brSha256": "
|
|
43
|
-
"brBytes":
|
|
44
|
-
"bytes":
|
|
40
|
+
"url": "https://s.koubei.com/RJhAYTdzmRwecryrTcAHsDeDjZbkDnAN.br",
|
|
41
|
+
"sha256": "6a90afb13b2016fff5279d23cd3609986cd4e496154ce9f25aaec4355989bb4e",
|
|
42
|
+
"brSha256": "c8b0413e7832706197d6cbf55922cc8ae2ee6dca00e8644c444bf4bc1c6ebb36",
|
|
43
|
+
"brBytes": 32629132,
|
|
44
|
+
"bytes": 103965184
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
}
|
package/install.cjs
CHANGED
|
@@ -110,12 +110,41 @@ function downloadFailedHelp(entry, target) {
|
|
|
110
110
|
].join('\n');
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
/**
|
|
113
|
+
/**
|
|
114
|
+
* 下载 .br 到内存,失败重试一次。engines 声明 node>=18,全局 fetch 可用。
|
|
115
|
+
* 流式读出来才有进度可报:TTY 单行 \r 刷新;非 TTY(npm 的管道输出)每跨 25% 打一行,
|
|
116
|
+
* 20~30 MB 的下载不至于毫无动静。
|
|
117
|
+
*/
|
|
114
118
|
async function download(url) {
|
|
119
|
+
const mb = (n) => (n / 1048576).toFixed(1);
|
|
120
|
+
const isTTY = Boolean(process.stdout.isTTY);
|
|
115
121
|
const once = async () => {
|
|
116
122
|
const r = await fetch(url, { signal: AbortSignal.timeout(DOWNLOAD_TIMEOUT_MS) });
|
|
117
123
|
if (!r.ok) throw new Error(`HTTP ${r.status}`);
|
|
118
|
-
return Buffer.from(await r.arrayBuffer());
|
|
124
|
+
if (!r.body) return Buffer.from(await r.arrayBuffer());
|
|
125
|
+
const total = Number(r.headers.get('content-length')) || 0;
|
|
126
|
+
const chunks = [];
|
|
127
|
+
let received = 0;
|
|
128
|
+
let lastBucket = -1;
|
|
129
|
+
let ttyActive = false;
|
|
130
|
+
for await (const chunk of r.body) {
|
|
131
|
+
const buf = Buffer.from(chunk);
|
|
132
|
+
chunks.push(buf);
|
|
133
|
+
received += buf.length;
|
|
134
|
+
if (isTTY) {
|
|
135
|
+
ttyActive = true;
|
|
136
|
+
const pct = total ? ` (${Math.floor((received / total) * 100)}%)` : '';
|
|
137
|
+
process.stdout.write(`\r${LOG_PREFIX} 下载中 ${mb(received)}${total ? `/${mb(total)}` : ''} MB${pct} `);
|
|
138
|
+
} else if (total) {
|
|
139
|
+
const bucket = Math.floor((received / total) * 4);
|
|
140
|
+
if (bucket > lastBucket) {
|
|
141
|
+
lastBucket = bucket;
|
|
142
|
+
log(`下载中 ${Math.min(bucket * 25, 100)}%(共 ${mb(total)} MB)`);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
if (ttyActive) process.stdout.write('\n');
|
|
147
|
+
return Buffer.concat(chunks);
|
|
119
148
|
};
|
|
120
149
|
try {
|
|
121
150
|
return await once();
|