@validflow/ccneed-cli 0.1.4 → 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/README.md +3 -0
- package/checksums.json +8 -8
- package/package.json +4 -1
- package/scripts/npm/install.mjs +10 -2
- package/skills/ccneed/references/resources.md +4 -1
- package/skills/ccneed/references/tasks.md +12 -1
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/README.md
CHANGED
|
@@ -101,10 +101,13 @@ The [Agent Skill](skills/ccneed/SKILL.md) covers the remaining commands, includi
|
|
|
101
101
|
| 💬 Find conversations | `ccneed threads list` |
|
|
102
102
|
| 🚀 Start research | `ccneed run "Your question" --kb-id KB_ID` |
|
|
103
103
|
| 📚 Explore knowledge bases | `ccneed kb list` |
|
|
104
|
+
| 📊 Check a knowledge base's data mix | `ccneed kb stats --kb-id KB_ID` |
|
|
104
105
|
| ➕ Create a knowledge base in the browser | `ccneed kb create` |
|
|
105
106
|
| 📎 List or upload your own files | `ccneed files list` / `ccneed files upload ./research-brief.pdf` |
|
|
106
107
|
| 🗂️ View or add conversation resources | `ccneed threads resources` / `ccneed threads append` |
|
|
107
108
|
| 🕘 Review task history | `ccneed tasks list --thread-id THREAD_UUID` |
|
|
109
|
+
| 🔎 Follow a research turn | `ccneed tasks get --thread-id THREAD_UUID --turn-id TURN_UUID` |
|
|
110
|
+
| ⏳ Wait for a result or question | `ccneed tasks watch --thread-id THREAD_UUID --turn-id TURN_UUID --timeout 60s` |
|
|
108
111
|
| 🚪 Sign out | `ccneed auth logout` |
|
|
109
112
|
|
|
110
113
|
Knowledge-base and file bindings can be added, but not removed. Use `ccneed <command> --help` for the required arguments.
|
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
|
-
"skill_sha256": "
|
|
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');
|
|
@@ -7,11 +7,14 @@
|
|
|
7
7
|
```bash
|
|
8
8
|
ccneed kb list
|
|
9
9
|
ccneed kb get --kb-id 7
|
|
10
|
+
ccneed kb stats --kb-id 7
|
|
10
11
|
ccneed kb create
|
|
11
12
|
```
|
|
12
13
|
|
|
13
14
|
`list/get` 显示归属当前用户的采集状态、已发布数据和可选择性。绑定前检查 `can_select`;不可选时说明 `disabled_reason` 或采集状态,不自行猜测可用。
|
|
14
15
|
|
|
16
|
+
`stats` 只返回已发布、可分析内容的总数、平台与情绪分布、最多八个主话题,以及同环境的 `web_url`。它不返回帖子正文、单条来源或批量数据。用于选库和判断覆盖范围;如果用户要研究结论,仍需 `ccneed run ... --kb-id 7` 交给 CCNeed 云端分析。需要在网页浏览具体内容时,把 `web_url` 交给用户,不通过其他网页接口绕过 CLI 的聚合边界。采集中的数据尚未发布时,统计可能暂时为零,不把零解释为采集失败。
|
|
17
|
+
|
|
15
18
|
`kb create` 只返回 `status: website_required` 和当前 origin 的官网入口 `url`,**没有创建知识库或启动采集**。向用户展示链接,把意图优化、平台/配额选择和确认交给网页;完成后重新 `kb list/get` 获取真实 ID 和状态,不伪造知识库。
|
|
16
19
|
|
|
17
20
|
## 文件:先上传,再绑定
|
|
@@ -23,7 +26,7 @@ ccneed files upload ./research-brief.pdf
|
|
|
23
26
|
|
|
24
27
|
列表 `--limit` 范围 1–500,关注 `has_more_possible`,不宣称完整历史。上传只接受非空普通支持文件,最大 100 MiB,不跟随符号链接;支持 csv、txt、md、json、ipynb、pdf、docx、xlsx 及 png/jpg/jpeg/webp/gif。
|
|
25
28
|
|
|
26
|
-
|
|
29
|
+
这里上传的是用户自己的文件。成功返回 `library_file_id`、`display_name`、`size_bytes`、`status`,**尚未绑定会话或启动任务**。接收未知先查 `files list`/网站核对,不自动重传制造重复资料。
|
|
27
30
|
|
|
28
31
|
开启会话时用第一句话绑定已有资源:
|
|
29
32
|
|
|
@@ -50,7 +50,18 @@ ccneed tasks get --thread-id THREAD_UUID --turn-id TURN_UUID
|
|
|
50
50
|
ccneed tasks watch --thread-id THREAD_UUID --turn-id TURN_UUID --timeout 60s
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
-
两者返回目标回合的 `status`、`cloud_status`、公开 `answer`、`answer_truncated`、`pending_action`、`artifacts`、`artifacts_has_more`,并保留会话/回合标识。`watch` 额外返回 `stop_reason
|
|
53
|
+
两者返回目标回合的 `status`、`cloud_status`、公开 `answer`、`answer_truncated`、`pending_action`、`artifacts`、`artifacts_has_more`、`progress` 和 `web_url`,并保留会话/回合标识。`watch` 额外返回 `stop_reason`。`web_url` 是当前登录环境中这个会话的网页入口;用户想仔细查看完整分析过程时,优先建议打开这个链接。
|
|
54
|
+
|
|
55
|
+
`progress.events` 只含本轮的安全里程碑(`seq`、时间、阶段、状态、固定摘要),不含原始工具输入输出、知识库正文或思维链。`get` 默认返回最近 20 条,按 `seq` 升序展示;如需从首条顺序读取,用 `--after-seq 0`;需要更多历史时,用返回的 `next_before_seq` 继续向前翻页;只要新增进度时,记住最新的 `next_after_seq`,稍后再查询。两个游标不能同时使用,`--limit` 范围 1–100:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
ccneed tasks get --thread-id THREAD_UUID --turn-id TURN_UUID --limit 20
|
|
59
|
+
ccneed tasks get --thread-id THREAD_UUID --turn-id TURN_UUID --after-seq 0
|
|
60
|
+
ccneed tasks get --thread-id THREAD_UUID --turn-id TURN_UUID --before-seq 120
|
|
61
|
+
ccneed tasks get --thread-id THREAD_UUID --turn-id TURN_UUID --after-seq 140
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
没有新增事件时,`progress.events` 可以为空;仍以同一响应的 `status`、`pending_action` 和产出判断任务当前状态,不把空事件误认为完成。`after-seq` 返回空页时保留原游标,下次继续查;多轮会话先用 `tasks list --thread-id` 选定 `turn_id`,不要跨轮复用游标。`watch` 返回截止时最近的一页进度,不是持续向宿主 Agent 推送的事件流。
|
|
54
65
|
|
|
55
66
|
- `waiting_user`:立即把待确认项交给用户,不继续等待。
|
|
56
67
|
- `completed`:交付这一轮的公开回答与关联产出;`answer_truncated` 为真时不能声称回答完整。
|