@aliyunrds/ctxdb 0.0.9 → 1.0.0-beta.1

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.
@@ -18,7 +18,7 @@ description: contextdb 长期记忆高频操作(主动记忆 / 搜索过往 /
18
18
 
19
19
  ## 2. 高频 recipes
20
20
 
21
- > 命令里的 `--agent={{agent}}` 是当前 skill 安装目标。不要把示例改成 `qoder`;如果读到未替换的双花括号 agent 模板,先按 §6 判定真实 agent,再替换成 `qoder` / `qoderwork` / `codex` / `claude` / `default`。
21
+ > 命令里的 `--agent={{agent}}` 是当前 skill 安装目标。不要把示例改成 `qoder`;如果读到未替换的双花括号 agent 模板,先按 §6 判定真实 agent,再替换成 `qoder` / `qoderwork` / `codex` / `claude` / `opencode` / `default`。
22
22
 
23
23
  ### Recipe 1:主动记忆("记住 X")
24
24
 
@@ -165,18 +165,18 @@ ctxdb memory delete <memory-id> --agent={{agent}}
165
165
 
166
166
  | 参数 | 说明 |
167
167
  |------|------|
168
- | `--agent=<name>` | **必填**。指定操作哪个 agent 的配置桶(`qoder` / `qoderwork` / `codex` / `claude` / `default`) |
168
+ | `--agent=<name>` | **必填**。指定操作哪个 agent 的配置桶(`qoder` / `qoderwork` / `codex` / `claude` / `opencode` / `default`) |
169
169
 
170
170
  `--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>` 会在 `agents.default` 缺失时复制当前 agent 配置作为兜底
174
+ 4. 新版本 `ctxdb setup --agent <qoder|qoderwork|codex|claude|opencode>` 会在 `agents.default` 缺失时复制当前 agent 配置作为兜底
175
175
  5. 若 `"default"` 桶仍不存在或未配置完整 → exit 2 "config incomplete for agent default"
176
176
 
177
177
  ## 7. 配置
178
178
 
179
- - 配置文件:`~/.ctxdb/ctxdb.json`,分 `agents.<name>` 段(`qoder` / `qoderwork` / `codex` / `claude` / `default`),互不复用
179
+ - 配置文件:`~/.ctxdb/ctxdb.json`,分 `agents.<name>` 段(`qoder` / `qoderwork` / `codex` / `claude` / `opencode` / `default`),互不复用
180
180
  - 配置命令:`ctxdb setup --agent <name> --api-key=<key> --base-url=<url> [--user-id=<id>]`
181
181
  - 带 `--agent` 时还会装 hooks + skill;若 `agents.default` 缺失,会复制当前 agent 配置作为 CLI 兜底
182
182
  - `--agent default` 只写 `agents.default` 段(仅 CLI 用,不装 hooks / skill)
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@aliyunrds/ctxdb",
3
- "version": "0.0.9",
3
+ "version": "1.0.0-beta.1",
4
4
  "type": "module",
5
- "description": "Unified access layer for RDS ContextDatabase: `ctxdb` CLI (memory + KB ops), one-shot `setup --agent <qoder|codex|claude>` installer, per-agent config, hooks, and SKILL.md.",
5
+ "description": "Unified access layer for RDS ContextDatabase: `ctxdb` CLI (memory + KB ops), one-shot `setup --agent <qoder|qoderwork|codex|claude|opencode>` installer, per-agent config, hooks/plugins, and SKILL.md.",
6
6
  "license": "Apache-2.0",
7
7
  "keywords": [
8
8
  "rds-context-database",
@@ -12,6 +12,7 @@
12
12
  "qoder",
13
13
  "codex",
14
14
  "claude-code",
15
+ "opencode",
15
16
  "hooks"
16
17
  ],
17
18
  "main": "./dist/cli/main.js",
@@ -38,7 +39,7 @@
38
39
  "vitest": "^4.0.18"
39
40
  },
40
41
  "scripts": {
41
- "build": "tsup && mkdir -p dist/setup && cp -r src/setup/skills dist/setup/ && chmod +x dist/hooks/*.js dist/cli/main.js",
42
+ "build": "tsup && pnpm --dir ../opencode build && mkdir -p dist/setup dist/opencode && cp ../opencode/dist/index.js dist/opencode/index.js && cp -r src/setup/skills dist/setup/ && chmod +x dist/hooks/*.js dist/cli/main.js",
42
43
  "test": "vitest run"
43
44
  }
44
45
  }