@aliyunrds/ctxdb 1.0.8-beta.0 → 1.0.8-beta.2

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 CHANGED
@@ -11,7 +11,7 @@ Unified access layer for RDS ContextDatabase. One `ctxdb` CLI (memory + KB ops),
11
11
  | **claude** | ✅ UserPromptSubmit + Stop + SessionStart | `~/.claude/skills/ctxdb/` | hooks-driven (auto capture/recall) |
12
12
  | **opencode** | Plugin shim (`~/.config/opencode/plugins/ctxdb.ts`) | `~/.config/opencode/skills/` | in-process plugin (auto capture/recall + KB catalog injection) |
13
13
  | **hermes** | ✅ `pre_llm_call` + `post_llm_call` | `~/.hermes/skills/` | shell hooks (auto capture/recall + first-turn warmup) |
14
- | **workbuddy** | ✅ UserPromptSubmit + Stop + SessionStart | `~/.workbuddy/skills/ctxdb/` | hooks-driven (auto capture/recall); Claude-Code-isomorphic (exec form) |
14
+ | **workbuddy** | ✅ UserPromptSubmit + Stop + SessionStart | `~/.workbuddy-ai/skills/ctxdb/` | hooks-driven (auto capture/recall); Claude-Code-isomorphic (exec form) |
15
15
 
16
16
  Config and logs live under `~/.ctxdb/`. `~/.ctxdb/ctxdb.json` is one file, but runtime config is isolated per agent under `agents.qoder`, `agents.qoderwork`, `agents.qwenwork`, `agents.codex`, `agents.claude`, `agents.opencode`, `agents.hermes`, and `agents.workbuddy`. (Pre-2026-05-23 installs used `~/.ctxdb.json` at the home root; running `ctxdb setup --agent <name>` migrates the file into the selected agent section.)
17
17
 
@@ -154,6 +154,8 @@ ctxdb setup --agent qwenwork --api-key ctxdb-...
154
154
  ctxdb setup --agent codex --api-key ctxdb-...
155
155
  # Claude Code (hooks + skill)
156
156
  ctxdb setup --agent claude --api-key ctxdb-...
157
+ # WorkBuddy (Claude-Code-isomorphic hooks + skill)
158
+ ctxdb setup --agent workbuddy --api-key ctxdb-...
157
159
  # OpenCode (plugin shim + skill)
158
160
  ctxdb setup --agent opencode --api-key ctxdb-...
159
161
  # Hermes (pre_llm_call recall/warmup + post_llm_call capture + skill; macOS/Linux)
@@ -208,7 +210,7 @@ ctxdb setup --agent codex --api-key 'ctxdb-new-...'
208
210
  ctxdb status --agent codex --json
209
211
  ```
210
212
 
211
- Setup first checks that the target agent home exists (`~/.qoder`, `~/.qoderwork`, `~/.qwenwork`, `~/.codex`, `~/.claude`, or `~/.workbuddy`; the declared CN variant home also satisfies this check). Setup writes hooks and skills only into homes that already exist, so a CN-only install does not create the international product home, and vice versa. If no home exists, install or start that agent once before running `ctxdb setup --agent <name>`. OpenCode and Hermes are config-dir style: setup creates `~/.config/opencode` / `~/.hermes` when they are missing.
213
+ Setup first checks that the target agent home exists (`~/.qoder`, `~/.qoderwork`, `~/.qwenwork`, `~/.codex`, `~/.claude`, or `~/.workbuddy-ai`; the declared CN variant home also satisfies this check). Setup writes hooks and skills only into homes that already exist, so a CN-only install does not create the international product home, and vice versa. If no home exists, install or start that agent once before running `ctxdb setup --agent <name>`. OpenCode and Hermes are config-dir style: setup creates `~/.config/opencode` / `~/.hermes` when they are missing.
212
214
 
213
215
  For **qoder**, **qoderwork**, **qwenwork**, **codex**, **claude**, and **workbuddy**, restart the harness (CLI: just exit + restart; app: Cmd+R or quit/relaunch) so it picks up the new hooks/skill. For **codex**, setup also writes `[features].hooks = true` into `~/.codex/config.toml` (creating the file if missing) — Codex won't fire any hook entries without it. On first use Codex may prompt you to trust the new hook commands. For **opencode**, restart OpenCode so it loads `~/.config/opencode/plugins/ctxdb.ts`. For **hermes**, setup also checks `~/.hermes/shell-hooks-allowlist.json`; it reports setup as incomplete until both ctxdb hook commands are approved.
214
216
 
@@ -662,7 +664,7 @@ ctxdb uninstall --purge-logs # also deletes ~/.ctxdb/logs/
662
664
 
663
665
  ### What uninstall does (and doesn't) touch
664
666
 
665
- - **Hook entries in `~/.qoder/settings.json`, `~/.qoderwork/settings.json`, `~/.qwenwork/settings.json`, `~/.codex/hooks.json`, `~/.claude/settings.json`, `~/.workbuddy/settings.json`, and `~/.hermes/config.yaml`**: stripped precisely by marker (`_ctxdb = @aliyunrds/ctxdb`, plus legacy keys `_ctxdbQoder` / `_ctxdbPackage` and the legacy `@aliyunrds/ctxdb-qoder` value for installs predating the unified marker). Any hooks you added yourself stay. A timestamped `*.bak-ctxdb-<TS>` is written before each modification (rotation keeps the 5 most recent).
667
+ - **Hook entries in `~/.qoder/settings.json`, `~/.qoderwork/settings.json`, `~/.qwenwork/settings.json`, `~/.codex/hooks.json`, `~/.claude/settings.json`, `~/.workbuddy-ai/settings.json`, and `~/.hermes/config.yaml`**: stripped precisely by marker (`_ctxdb = @aliyunrds/ctxdb`, plus legacy keys `_ctxdbQoder` / `_ctxdbPackage` and the legacy `@aliyunrds/ctxdb-qoder` value for installs predating the unified marker). Any hooks you added yourself stay. A timestamped `*.bak-ctxdb-<TS>` is written before each modification (rotation keeps the 5 most recent).
666
668
  - **Skill directories**: `~/.<agent>/skills/ctxdb/` for each set-up agent, plus legacy dirs (`ctxdb-qoder`, `rds-ctxdb-qoder`, `qoder-ctxdb`) under `~/.qoder/skills/` from older package names.
667
669
  - **`~/.ctxdb/` state**: only with `--purge-config` / `--purge-logs` / `--purge-all`. Defensive: `--purge-all` removes the `~/.ctxdb/` root only if it's empty after the named files are deleted (won't blanket-rm an unknown directory).
668
670
  - **`~/.codex/config.toml` `[features].hooks`**: **NOT** reverted. Setup adds `hooks = true` so Codex will fire ctxdb's hook entries; uninstall leaves the flag alone because (a) the user may have wanted it on for non-ctxdb hooks, and (b) it's harmless when `~/.codex/hooks.json` is empty. If you want it off, edit the file by hand.
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  fetchKbCatalogBlock,
4
4
  recallTurn
5
- } from "./chunk-WSMZOFZQ.js";
5
+ } from "./chunk-H33NUAHP.js";
6
6
 
7
7
  // src/lib/user-prompt-submit-compose.ts
8
8
  async function composeUserPromptSubmit(cfg, agent, client, prompt, sessionId = null) {
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  fetchKbCatalogBlock,
4
4
  recallTurn
5
- } from "./chunk-WSMZOFZQ.js";
5
+ } from "./chunk-H33NUAHP.js";
6
6
  import {
7
7
  debug
8
- } from "./chunk-AAZLOCVB.js";
8
+ } from "./chunk-DMS5YHIK.js";
9
9
 
10
10
  // src/lib/warmup-recall.ts
11
11
  import { execSync } from "child_process";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  CtxdbError
4
- } from "./chunk-AAZLOCVB.js";
4
+ } from "./chunk-DMS5YHIK.js";
5
5
 
6
6
  // src/lib/kb.ts
7
7
  import {
@@ -392,6 +392,8 @@ import { homedir as homedir2 } from "os";
392
392
  import { delimiter, join as join3, sep } from "path";
393
393
  import { accessSync, constants, existsSync, statSync } from "fs";
394
394
  var SUPPORTED_AGENTS = ["qoder", "qoderwork", "qwenwork", "codex", "claude", "opencode", "hermes", "workbuddy"];
395
+ var SUPPORTED_AGENT_CHOICES = SUPPORTED_AGENTS.join("|");
396
+ var AGENT_CHOICES = [...SUPPORTED_AGENTS, "default"].join("|");
395
397
  function isBuiltinAgent(v) {
396
398
  return typeof v === "string" && SUPPORTED_AGENTS.includes(v);
397
399
  }
@@ -416,7 +418,7 @@ function agentHomeDir(agent, home = homedir2()) {
416
418
  case "hermes":
417
419
  return join3(home, ".hermes");
418
420
  case "workbuddy":
419
- return join3(home, ".workbuddy");
421
+ return join3(home, ".workbuddy-ai");
420
422
  }
421
423
  }
422
424
  var AGENT_VARIANT_HOMES = {
@@ -1067,6 +1069,8 @@ export {
1067
1069
  CtxdbError,
1068
1070
  HttpClient,
1069
1071
  SUPPORTED_AGENTS,
1072
+ SUPPORTED_AGENT_CHOICES,
1073
+ AGENT_CHOICES,
1070
1074
  isBuiltinAgent,
1071
1075
  isAgentSlug,
1072
1076
  agentHomeDir,
@@ -1,15 +1,15 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  listKnowledgeBases
4
- } from "./chunk-CAXRYH6E.js";
4
+ } from "./chunk-CULTDVI2.js";
5
5
  import {
6
6
  isConnectionError,
7
7
  resetCircuit,
8
8
  tripCircuit
9
- } from "./chunk-NJJBT52C.js";
9
+ } from "./chunk-X75B57M2.js";
10
10
  import {
11
11
  CtxdbError
12
- } from "./chunk-AAZLOCVB.js";
12
+ } from "./chunk-DMS5YHIK.js";
13
13
 
14
14
  // src/lib/kb-catalog.ts
15
15
  function sanitizeKeyEntities(raw) {
@@ -4,12 +4,12 @@ import {
4
4
  isConnectionError,
5
5
  resetCircuit,
6
6
  tripCircuit
7
- } from "./chunk-NJJBT52C.js";
7
+ } from "./chunk-X75B57M2.js";
8
8
  import {
9
9
  CtxdbError,
10
10
  debug,
11
11
  isDebug
12
- } from "./chunk-AAZLOCVB.js";
12
+ } from "./chunk-DMS5YHIK.js";
13
13
 
14
14
  // src/lib/capture-orchestrator.ts
15
15
  import {
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  configDir
4
- } from "./chunk-AAZLOCVB.js";
4
+ } from "./chunk-DMS5YHIK.js";
5
5
 
6
6
  // src/lib/circuit.ts
7
7
  import { statSync, writeFileSync, unlinkSync, mkdirSync, readdirSync, readFileSync } from "fs";
package/dist/cli/main.js CHANGED
@@ -16,8 +16,9 @@ import {
16
16
  uploadFile,
17
17
  uploadText,
18
18
  validateLocalFile
19
- } from "../chunk-CAXRYH6E.js";
19
+ } from "../chunk-CULTDVI2.js";
20
20
  import {
21
+ AGENT_CHOICES,
21
22
  CtxdbError,
22
23
  DEFAULT_BASE_URL,
23
24
  DEFAULT_USER_ID,
@@ -25,6 +26,7 @@ import {
25
26
  PACKAGE_NAME,
26
27
  PACKAGE_VERSION,
27
28
  SUPPORTED_AGENTS,
29
+ SUPPORTED_AGENT_CHOICES,
28
30
  agentFromEnv,
29
31
  agentHomeDir,
30
32
  agentHomeDirs,
@@ -41,7 +43,7 @@ import {
41
43
  save,
42
44
  updateConfiguredDebug,
43
45
  writeInstalledPkgVersion
44
- } from "../chunk-AAZLOCVB.js";
46
+ } from "../chunk-DMS5YHIK.js";
45
47
  import {
46
48
  beginUpdateNotification,
47
49
  completeUpdateNotification,
@@ -387,7 +389,7 @@ function skillInstallRoot(agent) {
387
389
  case "hermes":
388
390
  return join(homedir(), ".hermes", "skills");
389
391
  case "workbuddy":
390
- return join(homedir(), ".workbuddy", "skills");
392
+ return join(homedir(), ".workbuddy-ai", "skills");
391
393
  }
392
394
  }
393
395
  var SKILL_DIRS = ["contextdb-memory", "contextdb-knowledge"];
@@ -409,7 +411,7 @@ function hookConfigPath(agent) {
409
411
  case "claude":
410
412
  return join(homedir(), ".claude", "settings.json");
411
413
  case "workbuddy":
412
- return join(homedir(), ".workbuddy", "settings.json");
414
+ return join(homedir(), ".workbuddy-ai", "settings.json");
413
415
  case "opencode":
414
416
  case "hermes":
415
417
  return null;
@@ -1471,7 +1473,7 @@ var SKILL_INSTALL_TARGETS = {
1471
1473
  opencode: join(homedir(), ".config", "opencode", "skills"),
1472
1474
  openclaw: join(homedir(), ".openclaw", "skills"),
1473
1475
  hermes: join(homedir(), ".hermes", "skills"),
1474
- workbuddy: join(homedir(), ".workbuddy", "skills")
1476
+ workbuddy: join(homedir(), ".workbuddy-ai", "skills")
1475
1477
  };
1476
1478
  function skillInstallTargetPath(target) {
1477
1479
  return SKILL_INSTALL_TARGETS[target] ?? null;
@@ -2079,7 +2081,7 @@ async function runUpgrade(options = {}) {
2079
2081
  var STATUS_HELP = `ctxdb status \u2014 inspect configuration and connectivity
2080
2082
 
2081
2083
  USAGE
2082
- ctxdb status [--agent <qoder|qoderwork|qwenwork|codex|claude|opencode|hermes|default> | --all] [--json]
2084
+ ctxdb status [--agent <${AGENT_CHOICES}> | --all] [--json]
2083
2085
 
2084
2086
  FLAGS
2085
2087
  --agent <name> Inspect exactly one Agent profile
@@ -2205,7 +2207,7 @@ async function ping(args) {
2205
2207
  var HELP = `ctxdb setup \u2014 configure an agent
2206
2208
 
2207
2209
  USAGE
2208
- ctxdb setup [--agent <qoder|qoderwork|qwenwork|codex|claude|opencode|hermes> | --all]
2210
+ ctxdb setup [--agent <${SUPPORTED_AGENT_CHOICES}> | --all]
2209
2211
  [--api-key=K] [--base-url=URL] [--user-id=ID]
2210
2212
  [--no-install-skill] [--no-validate] [--json]
2211
2213
 
@@ -2226,7 +2228,7 @@ BEHAVIOR
2226
2228
  any running Hermes CLI/gateway process to load the hooks.
2227
2229
 
2228
2230
  FLAGS
2229
- --agent <name> Target agent (qoder|qoderwork|qwenwork|codex|claude|opencode|hermes)
2231
+ --agent <name> Target agent (${SUPPORTED_AGENT_CHOICES})
2230
2232
  --all Target every setup-compatible detected Agent
2231
2233
  --api-key <key> API key (required on first setup)
2232
2234
  --base-url <url> Server URL (default: https://context-database.aliyuncs.com)
@@ -2335,7 +2337,7 @@ ${highlightInlineCode(hint)}
2335
2337
  const agent = parseAgent(args);
2336
2338
  if (agent === "default" && !json && !configuredAgents().includes("default")) {
2337
2339
  process.stderr.write(
2338
- `hint: creating CLI-only "default" agent (no hooks/skills). Use --agent <claude|qoder|qoderwork|qwenwork|codex|opencode|hermes> for full setup.
2340
+ `hint: creating CLI-only "default" agent (no hooks/skills). Use --agent <${SUPPORTED_AGENT_CHOICES}> for full setup.
2339
2341
  `
2340
2342
  );
2341
2343
  }
@@ -2367,11 +2369,11 @@ var PACKAGE_UNINSTALL_TARGETS2 = DISTRIBUTION_MANIFEST.id === "internal" ? DISTR
2367
2369
  var HELP2 = `ctxdb uninstall \u2014 remove hooks + skills
2368
2370
 
2369
2371
  USAGE
2370
- ctxdb uninstall [--agent <qoder|qoderwork|qwenwork|codex|claude|opencode|hermes>] [--purge-config] [--purge-logs] [--purge-all] [--json]
2372
+ ctxdb uninstall [--agent <${SUPPORTED_AGENT_CHOICES}>] [--purge-config] [--purge-logs] [--purge-all] [--json]
2371
2373
 
2372
2374
  DEFAULT BEHAVIOR (no --agent, no purge flags)
2373
- Strips ctxdb hook entries and skill directories for ALL agents (qoder,
2374
- qoderwork, qwenwork, codex, claude, opencode, hermes). Keeps ~/.ctxdb/ctxdb.json (credentials) and ~/.ctxdb/logs/
2375
+ Strips ctxdb hook entries and skill directories for ALL agents
2376
+ (${SUPPORTED_AGENTS.join(", ")}). Keeps ~/.ctxdb/ctxdb.json (credentials) and ~/.ctxdb/logs/
2375
2377
  so you can re-run \`ctxdb setup\` later without losing configuration.
2376
2378
 
2377
2379
  WITH --agent <name>
@@ -2379,7 +2381,7 @@ WITH --agent <name>
2379
2381
  Other agents remain untouched.
2380
2382
 
2381
2383
  FLAGS
2382
- --agent <name> Target a single agent (qoder|qoderwork|qwenwork|codex|claude|opencode|hermes)
2384
+ --agent <name> Target a single agent (${SUPPORTED_AGENT_CHOICES})
2383
2385
  --purge-config Also delete ~/.ctxdb/ctxdb.json
2384
2386
  --purge-logs Also delete ~/.ctxdb/logs/
2385
2387
  --purge-all Delete everything under ~/.ctxdb/
@@ -2433,7 +2435,7 @@ var UPDATE_REGISTRY_ARG = DISTRIBUTION_MANIFEST.packageRegistry ? ` --registry $
2433
2435
  var HELP3 = `ctxdb upgrade \u2014 refresh skills + hooks
2434
2436
 
2435
2437
  USAGE
2436
- ctxdb upgrade [--agent <qoder|qoderwork|qwenwork|codex|claude|opencode|hermes>] [--no-self-update] [--json]
2438
+ ctxdb upgrade [--agent <${SUPPORTED_AGENT_CHOICES}>] [--no-self-update] [--json]
2437
2439
 
2438
2440
  BEHAVIOR
2439
2441
  Pulls the latest ${UPDATE_PACKAGE_NAME} package from npm, then re-runs setup
@@ -2443,7 +2445,7 @@ BEHAVIOR
2443
2445
  With --agent: sets up only the specified agent.
2444
2446
 
2445
2447
  FLAGS
2446
- --agent <name> Target a single agent (qoder|qoderwork|qwenwork|codex|claude|opencode|hermes)
2448
+ --agent <name> Target a single agent (${SUPPORTED_AGENT_CHOICES})
2447
2449
  --self-update Pull latest package from npm (enabled by default)
2448
2450
  --no-self-update Skip the npm package update and only re-run setup
2449
2451
  --json Machine-readable JSON output
@@ -2528,6 +2530,7 @@ ${h}
2528
2530
 
2529
2531
  // src/cli/skill-cli.ts
2530
2532
  var SUPPORTED_TARGETS = Object.keys(SKILL_INSTALL_TARGETS);
2533
+ var SUPPORTED_TARGET_CHOICES = SUPPORTED_TARGETS.join("|");
2531
2534
  var HELP4 = `ctxdb skill install \u2014 install skill files to an agent's skill directory
2532
2535
 
2533
2536
  USAGE
@@ -4296,18 +4299,20 @@ USAGE
4296
4299
  ctxdb <command> [args] [--flags]
4297
4300
 
4298
4301
  COMMANDS
4299
- setup [--agent <qoder|qoderwork|qwenwork|codex|claude|opencode|hermes> | --all]
4302
+ setup [--agent <${SUPPORTED_AGENT_CHOICES}> | --all]
4300
4303
  [--api-key=K] [--base-url=URL] [--user-id=ID]
4301
4304
  [--no-install-skill] [--no-validate] [--json]
4302
4305
  Without --agent \u2192 writes agents.default (CLI-only, no hooks/skills)
4303
4306
  Qoder \u2192 writes agents.qoder config + ~/.qoder/settings.json hooks + skill
4304
4307
  QoderWork \u2192 writes agents.qoderwork config + ~/.qoderwork/settings.json hooks + skill
4308
+ QwenWork \u2192 writes agents.qwenwork config + ~/.qwenwork/settings.json hooks + skill
4305
4309
  Codex \u2192 writes agents.codex config + ~/.codex/hooks.json hooks + skill
4306
4310
  Claude \u2192 writes agents.claude config + ~/.claude/settings.json hooks + skill
4307
4311
  OpenCode \u2192 writes agents.opencode config + ~/.config/opencode/plugins/ctxdb.ts shim + skill
4308
4312
  Hermes \u2192 writes agents.hermes config + ~/.hermes/config.yaml pre/post_llm_call hooks + skill
4309
4313
  Approve pre_llm_call + post_llm_call with \`hermes --accept-hooks chat\`
4310
4314
  (exit chat, rerun setup, then restart any running Hermes CLI/gateway)
4315
+ WorkBuddy \u2192 writes agents.workbuddy config + ~/.workbuddy-ai/settings.json hooks + skill
4311
4316
  --all \u2192 detects and configures every setup-compatible built-in Agent
4312
4317
  status [--agent <name> | --all] [--json]
4313
4318
  Inspect configuration, connectivity, and integration health.
@@ -4456,7 +4461,7 @@ COMMANDS
4456
4461
  All kb review commands accept --json.
4457
4462
 
4458
4463
 
4459
- skill install --target <qoder|qoderwork|qwenwork|codex|claude|opencode|openclaw|hermes> [--json]
4464
+ skill install --target <${SUPPORTED_TARGET_CHOICES}> [--json]
4460
4465
  skill install --path <dir> [--json]
4461
4466
  Install skill files (contextdb-memory,
4462
4467
  contextdb-knowledge) to an agent's skill directory.
@@ -4478,7 +4483,7 @@ HOOK ENV VARS:
4478
4483
  CTXDB_SKIP_HOOKS=TRUE Hook/plugin entrypoints exit immediately.
4479
4484
  Direct ctxdb CLI commands are unchanged.
4480
4485
 
4481
- CONFIG: ~/.ctxdb/ctxdb.json (agents.default / agents.qoder / agents.qoderwork / agents.codex / agents.claude / agents.opencode / agents.hermes)
4486
+ CONFIG: ~/.ctxdb/ctxdb.json (agents.default / ${SUPPORTED_AGENTS.map((agent) => `agents.${agent}`).join(" / ")})
4482
4487
  LOGS: ~/.ctxdb/logs/ctxdb.log, ~/.ctxdb/logs/recall-trace.jsonl
4483
4488
  `;
4484
4489
  var ROUTES = {
@@ -1,15 +1,15 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  captureParsedMessages
4
- } from "../chunk-HF2CWTRU.js";
5
- import "../chunk-NJJBT52C.js";
4
+ } from "../chunk-LYHGJOHM.js";
5
+ import "../chunk-X75B57M2.js";
6
6
  import {
7
7
  HttpClient,
8
8
  agentFromArgvWithFallback,
9
9
  debug,
10
10
  load,
11
11
  setDebug
12
- } from "../chunk-AAZLOCVB.js";
12
+ } from "../chunk-DMS5YHIK.js";
13
13
  import {
14
14
  shouldSkipHooks
15
15
  } from "../chunk-5ML4VSXN.js";
@@ -2,17 +2,17 @@
2
2
  import {
3
3
  HOOK_TIMEOUT_MS,
4
4
  composeSessionStart
5
- } from "../chunk-24CNB3XJ.js";
5
+ } from "../chunk-5ZSZMN2T.js";
6
6
  import {
7
7
  composeUserPromptSubmit
8
- } from "../chunk-BBTXHFMD.js";
8
+ } from "../chunk-4FCZ2TZM.js";
9
9
  import {
10
10
  fetchKbCatalogBlock
11
- } from "../chunk-WSMZOFZQ.js";
12
- import "../chunk-CAXRYH6E.js";
11
+ } from "../chunk-H33NUAHP.js";
12
+ import "../chunk-CULTDVI2.js";
13
13
  import {
14
14
  isCircuitOpen
15
- } from "../chunk-NJJBT52C.js";
15
+ } from "../chunk-X75B57M2.js";
16
16
  import {
17
17
  HttpClient,
18
18
  agentFromArgvWithFallback,
@@ -20,7 +20,7 @@ import {
20
20
  isComplete,
21
21
  load,
22
22
  setDebug
23
- } from "../chunk-AAZLOCVB.js";
23
+ } from "../chunk-DMS5YHIK.js";
24
24
  import {
25
25
  shouldSkipHooks
26
26
  } from "../chunk-5ML4VSXN.js";
@@ -3,12 +3,12 @@ import {
3
3
  HOOK_TIMEOUT_MS,
4
4
  composeSessionStart,
5
5
  formatSessionStartStdout
6
- } from "../chunk-24CNB3XJ.js";
7
- import "../chunk-WSMZOFZQ.js";
8
- import "../chunk-CAXRYH6E.js";
6
+ } from "../chunk-5ZSZMN2T.js";
7
+ import "../chunk-H33NUAHP.js";
8
+ import "../chunk-CULTDVI2.js";
9
9
  import {
10
10
  isCircuitOpen
11
- } from "../chunk-NJJBT52C.js";
11
+ } from "../chunk-X75B57M2.js";
12
12
  import {
13
13
  HttpClient,
14
14
  agentFromArgvWithFallback,
@@ -16,7 +16,7 @@ import {
16
16
  isComplete,
17
17
  load,
18
18
  setDebug
19
- } from "../chunk-AAZLOCVB.js";
19
+ } from "../chunk-DMS5YHIK.js";
20
20
  import {
21
21
  shouldSkipHooks
22
22
  } from "../chunk-5ML4VSXN.js";
@@ -1,15 +1,15 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  captureTurn
4
- } from "../chunk-HF2CWTRU.js";
5
- import "../chunk-NJJBT52C.js";
4
+ } from "../chunk-LYHGJOHM.js";
5
+ import "../chunk-X75B57M2.js";
6
6
  import {
7
7
  HttpClient,
8
8
  agentFromArgvWithFallback,
9
9
  debug,
10
10
  load,
11
11
  setDebug
12
- } from "../chunk-AAZLOCVB.js";
12
+ } from "../chunk-DMS5YHIK.js";
13
13
  import {
14
14
  shouldSkipHooks
15
15
  } from "../chunk-5ML4VSXN.js";
@@ -2,12 +2,12 @@
2
2
  import {
3
3
  composeUserPromptSubmit,
4
4
  formatUserPromptSubmitStdout
5
- } from "../chunk-BBTXHFMD.js";
6
- import "../chunk-WSMZOFZQ.js";
7
- import "../chunk-CAXRYH6E.js";
5
+ } from "../chunk-4FCZ2TZM.js";
6
+ import "../chunk-H33NUAHP.js";
7
+ import "../chunk-CULTDVI2.js";
8
8
  import {
9
9
  isCircuitOpen
10
- } from "../chunk-NJJBT52C.js";
10
+ } from "../chunk-X75B57M2.js";
11
11
  import {
12
12
  HttpClient,
13
13
  agentFromArgvWithFallback,
@@ -15,7 +15,7 @@ import {
15
15
  isComplete,
16
16
  load,
17
17
  setDebug
18
- } from "../chunk-AAZLOCVB.js";
18
+ } from "../chunk-DMS5YHIK.js";
19
19
  import {
20
20
  shouldSkipHooks
21
21
  } from "../chunk-5ML4VSXN.js";
@@ -19,7 +19,7 @@ description: contextdb 知识库高频操作(查询 / 浏览 KB / 上传或更
19
19
 
20
20
  ## 2. 高频 recipes
21
21
 
22
- > 命令里的 `--agent={{agent}}` 是当前 skill 安装目标。不要把示例改成 `qoder`;如果读到未替换的双花括号 agent 模板,先按 §6 判定真实 agent,再替换成 `qoder` / `qoderwork` / `codex` / `claude` / `opencode` / `hermes` / `default`。
22
+ > 命令里的 `--agent={{agent}}` 是当前 skill 安装目标。不要把示例改成 `qoder`;如果读到未替换的双花括号 agent 模板,先按 §6 判定真实 agent,再替换成 `qoder` / `qoderwork` / `qwenwork` / `codex` / `claude` / `opencode` / `hermes` / `workbuddy` / `default`。
23
23
 
24
24
  ### Recipe 1:在已知 KB 中查内容(最常见)
25
25
 
@@ -239,18 +239,18 @@ init 使用 PUT,part/complete 保持原协议;网络结果不明确时不自
239
239
 
240
240
  | 参数 | 说明 |
241
241
  |------|------|
242
- | `--agent=<name>` | **必填**。指定操作哪个 agent 的配置桶(`qoder` / `qoderwork` / `codex` / `claude` / `opencode` / `hermes` / `default`) |
242
+ | `--agent=<name>` | **必填**。指定操作哪个 agent 的配置桶(`qoder` / `qoderwork` / `qwenwork` / `codex` / `claude` / `opencode` / `hermes` / `workbuddy` / `default`) |
243
243
 
244
244
  `--agent` 解析顺序:
245
245
  1. 命令行显式 `--agent=<name>` → 用它
246
246
  2. 缺省 → 读 `CTXDB_AGENT` 环境变量
247
247
  3. env 也没有 → 落到 `"default"` 桶
248
- 4. 新版本 `ctxdb setup --agent <qoder|qoderwork|qwenwork|codex|claude|opencode|hermes>` 会在 `agents.default` 缺失时复制当前 agent 配置作为兜底
248
+ 4. 新版本 `ctxdb setup --agent <qoder|qoderwork|qwenwork|codex|claude|opencode|hermes|workbuddy>` 会在 `agents.default` 缺失时复制当前 agent 配置作为兜底
249
249
  5. 若 `"default"` 桶仍不存在或未配置完整 → exit 2 "config incomplete for agent default"
250
250
 
251
251
  ## 7. 配置
252
252
 
253
- - 配置文件:`~/.ctxdb/ctxdb.json`,分 `agents.<name>` 段(`qoder` / `qoderwork` / `codex` / `claude` / `opencode` / `hermes` / `default`),互不复用
253
+ - 配置文件:`~/.ctxdb/ctxdb.json`,分 `agents.<name>` 段(`qoder` / `qoderwork` / `qwenwork` / `codex` / `claude` / `opencode` / `hermes` / `workbuddy` / `default`),互不复用
254
254
  - 配置命令:`ctxdb setup --agent <name> --api-key=<key> --base-url=<url> [--user-id=<id>]`
255
255
  - 带 `--agent` 时还会装 hooks + skill;若 `agents.default` 缺失,会复制当前 agent 配置作为 CLI 兜底
256
256
  - `--agent default` 只写 `agents.default` 段(仅 CLI 用,不装 hooks / skill)
@@ -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` / `opencode` / `hermes` / `default`。
21
+ > 命令里的 `--agent={{agent}}` 是当前 skill 安装目标。不要把示例改成 `qoder`;如果读到未替换的双花括号 agent 模板,先按 §6 判定真实 agent,再替换成 `qoder` / `qoderwork` / `qwenwork` / `codex` / `claude` / `opencode` / `hermes` / `workbuddy` / `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` / `opencode` / `hermes` / `default`) |
168
+ | `--agent=<name>` | **必填**。指定操作哪个 agent 的配置桶(`qoder` / `qoderwork` / `qwenwork` / `codex` / `claude` / `opencode` / `hermes` / `workbuddy` / `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|qwenwork|codex|claude|opencode|hermes>` 会在 `agents.default` 缺失时复制当前 agent 配置作为兜底
174
+ 4. 新版本 `ctxdb setup --agent <qoder|qoderwork|qwenwork|codex|claude|opencode|hermes|workbuddy>` 会在 `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` / `opencode` / `hermes` / `default`),互不复用
179
+ - 配置文件:`~/.ctxdb/ctxdb.json`,分 `agents.<name>` 段(`qoder` / `qoderwork` / `qwenwork` / `codex` / `claude` / `opencode` / `hermes` / `workbuddy` / `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": "1.0.8-beta.0",
3
+ "version": "1.0.8-beta.2",
4
4
  "type": "module",
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.",
5
+ "description": "Unified access layer for RDS ContextDatabase: `ctxdb` CLI (memory + KB ops), one-shot multi-agent installer, per-agent config, hooks/plugins, and SKILL.md.",
6
6
  "license": "Apache-2.0",
7
7
  "keywords": [
8
8
  "rds-context-database",
@@ -10,8 +10,10 @@
10
10
  "memory",
11
11
  "knowledge-base",
12
12
  "qoder",
13
+ "qwenwork",
13
14
  "codex",
14
15
  "claude-code",
16
+ "workbuddy",
15
17
  "opencode",
16
18
  "hermes",
17
19
  "hooks"