@aliyunrds/ctxdb 1.0.4 → 1.0.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.
@@ -1,18 +1,18 @@
1
1
  ---
2
2
  name: contextdb-knowledge
3
- description: contextdb 知识库高频操作(查询 / 浏览 KB / 上传文档)和命令速查。当用户提到"查知识库 / 查 KB / 搜知识库 / 查 KB chunks / 上传到 KB / 灌进知识库 / 列出知识库 / 列出 KB / 看文档 / 建知识库 / 建 KB"等场景时使用。配套 contextdb-memory 处理长期记忆。
3
+ description: contextdb 知识库高频操作(查询 / 浏览 KB / 上传或更新文档)和命令速查。当用户提到"查知识库 / 查 KB / 搜知识库 / 查 KB chunks / 上传到 KB / 灌进知识库 / 更新 KB 文档 / 列出知识库 / 列出 KB / 看文档 / 建知识库 / 建 KB"等场景时使用。配套 contextdb-memory 处理长期记忆。
4
4
  ---
5
5
 
6
6
  # contextdb Knowledge Base 操作
7
7
 
8
8
  ## 1. 什么时候用这个 skill
9
9
 
10
- 用户在做"查/灌/列知识库"的任何动作时进这个 skill。触发关键词:**查知识库 / 查 KB / 搜知识库 / 查 KB chunks / 上传到 KB / 灌进知识库 / 列出知识库 / 列出 KB / 看文档 / 建知识库**。
10
+ 用户在做"查/灌/列/更新知识库"的任何动作时进这个 skill。触发关键词:**查知识库 / 查 KB / 搜知识库 / 查 KB chunks / 上传到 KB / 灌进知识库 / 更新 KB 文档 / 列出知识库 / 列出 KB / 看文档 / 建知识库**。
11
11
 
12
12
  - 用户想**找已有 KB 里的内容** → §2 recipe 1
13
13
  - 用户**不知道有哪些 KB** → §2 recipe 2
14
14
  - 用户想**了解某个 KB 收了哪些文档** → §2 recipe 3
15
- - 用户要**写入/上传内容** → §2 recipe 4/5
15
+ - 用户要**写入/上传/更新内容** → §2 recipe 4/5
16
16
 
17
17
  配套 skill:**contextdb-memory**(长期记忆操作)。两者用同一份 `~/.ctxdb/ctxdb.json` 配置和同一个 `--agent` 路由。
18
18
 
@@ -101,6 +101,8 @@ ctxdb kb upload-file <kb-name> <local-path> --agent={{agent}}
101
101
 
102
102
  **何时不适用**:要上传的内容是字符串而非本地文件 → recipe 4。
103
103
 
104
+ > **同名文档更新**:同一 KB、同一 `--file-path` 下,以相同文档名再次上传,服务端按更新(替换)语义处理;继续调用对应的 `kb upload-text` / `kb upload-file` 命令即可(`upload-file` 必要时用 `--doc-name` 保持文档名不变)。
105
+
104
106
  ## 3. 命令速查
105
107
 
106
108
  `--agent=<name>` 必填;详细解析链见 §6。其他 advanced flag 见 §6。
@@ -178,7 +180,7 @@ ctxdb kb upload-file <kb-name> <local-path> --agent={{agent}}
178
180
  | 参数 | 说明 |
179
181
  |------|------|
180
182
  | `--doc-name` | (`upload-file`)服务端文档名,默认取本地文件名 |
181
- | `--file-path` | 服务端逻辑路径(归档/分类用) |
183
+ | `--file-path` | KB 内的逻辑父目录,不包含文档名/文件名 |
182
184
  | `--wait` | 等到 ingest 成功、失败或达到原有超时;用于迁移旧的默认等待行为 |
183
185
  | `--no-wait` | 兼容参数;与新的“受理后立即返回”默认行为相同 |
184
186
 
@@ -205,7 +207,7 @@ ctxdb kb upload-file <kb-name> <local-path> --agent={{agent}}
205
207
  1. 命令行显式 `--agent=<name>` → 用它
206
208
  2. 缺省 → 读 `CTXDB_AGENT` 环境变量
207
209
  3. env 也没有 → 落到 `"default"` 桶
208
- 4. 新版本 `ctxdb setup --agent <qoder|qoderwork|codex|claude|opencode|hermes>` 会在 `agents.default` 缺失时复制当前 agent 配置作为兜底
210
+ 4. 新版本 `ctxdb setup --agent <qoder|qoderwork|qwenwork|codex|claude|opencode|hermes>` 会在 `agents.default` 缺失时复制当前 agent 配置作为兜底
209
211
  5. 若 `"default"` 桶仍不存在或未配置完整 → exit 2 "config incomplete for agent default"
210
212
 
211
213
  ## 7. 配置
@@ -171,7 +171,7 @@ ctxdb memory delete <memory-id> --agent={{agent}}
171
171
  1. 命令行显式 `--agent=<name>` → 用它
172
172
  2. 缺省 → 读 `CTXDB_AGENT` 环境变量
173
173
  3. env 也没有 → 落到 `"default"` 桶
174
- 4. 新版本 `ctxdb setup --agent <qoder|qoderwork|codex|claude|opencode|hermes>` 会在 `agents.default` 缺失时复制当前 agent 配置作为兜底
174
+ 4. 新版本 `ctxdb setup --agent <qoder|qoderwork|qwenwork|codex|claude|opencode|hermes>` 会在 `agents.default` 缺失时复制当前 agent 配置作为兜底
175
175
  5. 若 `"default"` 桶仍不存在或未配置完整 → exit 2 "config incomplete for agent default"
176
176
 
177
177
  ## 7. 配置
@@ -4,7 +4,7 @@ import {
4
4
  recordVersionCheckFailure,
5
5
  recordVersionCheckSuccess,
6
6
  releaseVersionCheckLock
7
- } from "../chunk-BQA7YSXT.js";
7
+ } from "../chunk-Z6OHSEF2.js";
8
8
 
9
9
  // src/workers/version-check.ts
10
10
  import { fileURLToPath } from "url";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aliyunrds/ctxdb",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "type": "module",
5
5
  "description": "Unified access layer for RDS ContextDatabase: `ctxdb` CLI (memory + KB ops), one-shot `setup --agent <qoder|qoderwork|codex|claude|opencode|hermes>` installer, per-agent config, hooks/plugins, and SKILL.md.",
6
6
  "license": "Apache-2.0",
@@ -32,7 +32,7 @@
32
32
  "dependencies": {
33
33
  "semver": "^7.8.5",
34
34
  "yaml": "^2.9.0",
35
- "@aliyunrds/ctxdb-shared": "~0.0.5"
35
+ "@aliyunrds/ctxdb-shared": "~0.0.6"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@types/node": "^22.15.0",