@validflow/ccneed-cli 0.1.5 → 0.1.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/INSTALL.md +2 -0
- package/checksums.json +7 -7
- package/package.json +4 -1
- package/scripts/npm/install.mjs +10 -2
package/INSTALL.md
CHANGED
|
@@ -17,6 +17,8 @@ npx @validflow/ccneed-cli@latest install --agent codex
|
|
|
17
17
|
|
|
18
18
|
Requires Node.js 22.14+ and npm. The installer places `ccneed` in npm's global command directory, which must be on the Agent's PATH. A local install does not automatically make it available inside a remote sandbox. The installer does not read CCNeed account data, create tasks, or change Agent security settings.
|
|
19
19
|
|
|
20
|
+
If GitHub downloads require a proxy, set `HTTPS_PROXY` (or `HTTP_PROXY`) in the terminal before installing. The binary downloader honors these variables and `NO_PROXY`, including their lowercase forms; no machine-specific proxy address is built into the package.
|
|
21
|
+
|
|
20
22
|
`@latest` is npm's current stable release; replace it with an exact version if reproducibility matters. The installer globally installs that exact CLI and Skill version. Selected hosts receive links to the one installed Skill directory:
|
|
21
23
|
|
|
22
24
|
| Host | Current-user Skill path |
|
package/checksums.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.1.
|
|
2
|
+
"version": "0.1.6",
|
|
3
3
|
"assets": {
|
|
4
|
-
"ccneed-0.1.
|
|
5
|
-
"ccneed-0.1.
|
|
6
|
-
"ccneed-0.1.
|
|
7
|
-
"ccneed-0.1.
|
|
8
|
-
"ccneed-0.1.
|
|
9
|
-
"ccneed-0.1.
|
|
4
|
+
"ccneed-0.1.6-linux-amd64": "7f9f2657720f6199793cc9a5c647891ae4946f7f597934bfbf259beb9fd9284a",
|
|
5
|
+
"ccneed-0.1.6-linux-arm64": "5caf91d3c22b211275354ca744f3250d8a941cf250b1733deeec33ebe9e00f36",
|
|
6
|
+
"ccneed-0.1.6-darwin-amd64": "77e7b8fc5f881194837831b79614ba6fdce40ab181d0fd2fff501bb201fb49ce",
|
|
7
|
+
"ccneed-0.1.6-darwin-arm64": "dd3055ea6c7b928b3d73538c1758448f7ae7905cac73e3180def671eaaa3c235",
|
|
8
|
+
"ccneed-0.1.6-windows-amd64.exe": "c2705edd83a7d3d4b01748f10d5d01bdac9757213085f869ab83b5947c9c59f9",
|
|
9
|
+
"ccneed-0.1.6-windows-arm64.exe": "4c1192b2277933290c287082d52176d01ec8529d71588149452d425c56a424ac"
|
|
10
10
|
},
|
|
11
11
|
"skill_sha256": "b72d69b63ee8772ef3a8cbe30c3eaa02cd32702ff9c47a75f656250cbdee4d0f"
|
|
12
12
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@validflow/ccneed-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "CCNeed cloud agent command-line integration",
|
|
6
6
|
"license": "MIT",
|
|
@@ -8,6 +8,9 @@
|
|
|
8
8
|
"engines": {
|
|
9
9
|
"node": ">=22.14.0"
|
|
10
10
|
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"undici": "7.30.1"
|
|
13
|
+
},
|
|
11
14
|
"repository": {
|
|
12
15
|
"type": "git",
|
|
13
16
|
"url": "git+https://github.com/validflow/ccneed-cli.git"
|
package/scripts/npm/install.mjs
CHANGED
|
@@ -4,10 +4,12 @@ import { pipeline } from 'node:stream/promises';
|
|
|
4
4
|
import { createHash, randomUUID } from 'node:crypto';
|
|
5
5
|
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
6
6
|
import { dirname, resolve, join } from 'node:path';
|
|
7
|
+
import { EnvHttpProxyAgent } from 'undici';
|
|
7
8
|
|
|
8
9
|
const versionPattern = /^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(?:-rc\.(0|[1-9][0-9]*))?$/;
|
|
9
10
|
const hosts = new Set(['github.com', 'release-assets.githubusercontent.com', 'objects.githubusercontent.com']);
|
|
10
11
|
export const packageRoot = resolve(dirname(fileURLToPath(import.meta.url)), '../..');
|
|
12
|
+
let downloadDispatcher;
|
|
11
13
|
|
|
12
14
|
/** assetName 将受支持的平台映射到精确版本的二进制名称。
|
|
13
15
|
* Args:
|
|
@@ -29,7 +31,7 @@ export function assetName(version, platform, arch) {
|
|
|
29
31
|
|
|
30
32
|
/** downloadAsset 下载公开 GitHub 产物,限制重定向来源、响应大小和总耗时。
|
|
31
33
|
* Args:
|
|
32
|
-
* address: 安装器生成的固定 Release
|
|
34
|
+
* address: 安装器生成的固定 Release 下载地址;代理来自用户既有 HTTP_PROXY、HTTPS_PROXY 和 NO_PROXY 配置。
|
|
33
35
|
* Returns:
|
|
34
36
|
* 共享下载超时的响应流;安装器在写入时限制为 64 MiB。
|
|
35
37
|
* Errors:
|
|
@@ -40,7 +42,13 @@ export async function downloadAsset(address) {
|
|
|
40
42
|
let url = new URL(address);
|
|
41
43
|
for (let hop = 0; hop < 4; hop++) {
|
|
42
44
|
if (url.protocol !== 'https:' || url.username || url.password || url.port || !hosts.has(url.hostname)) throw new Error('Untrusted release redirect');
|
|
43
|
-
|
|
45
|
+
downloadDispatcher ??= new EnvHttpProxyAgent();
|
|
46
|
+
let response;
|
|
47
|
+
try {
|
|
48
|
+
response = await fetch(url, { redirect: 'manual', signal, dispatcher: downloadDispatcher });
|
|
49
|
+
} catch {
|
|
50
|
+
throw new Error('Release download failed. Check HTTPS_PROXY/HTTP_PROXY settings and access to GitHub.');
|
|
51
|
+
}
|
|
44
52
|
if ([301, 302, 303, 307, 308].includes(response.status)) {
|
|
45
53
|
await response.body?.cancel();
|
|
46
54
|
const location = response.headers.get('location');
|