From 846a4423d4adc8a9d0c20737b715347da9b86722 Mon Sep 17 00:00:00 2001 From: ctrlcakepro <291766549+ctrlcakepro@users.noreply.github.com> Date: Sat, 5 Sep 2026 12:17:33 +0800 Subject: [PATCH 1/3] feat: add Qoder IDE compatibility Qoder loads MCP servers from its own IDE settings and reads project-level skills from .qoder/skills and rules from .qoder/rules. Render all three from the existing stdio server and bundled skill definitions instead of duplicating the retrieval engine. - src/qoder.mjs generates .qoder/mcp.json, per-skill SKILL.md copies, and a retrieval rule file; credentials stay in the environment and only a RAG_MANAGER_CONFIG placeholder is written. - The generated rule covers the 0.1.3 index tools: rag_sync for incremental refresh, rag_build for a deliberate full rebuild, and the preview/execute confirmation both share with rag_clear_index and rag_restore_index. - scripts/cli.mjs exposes `chilon-recall qoder [--force]`. - tests cover the rendered server entry, skill parity with skills/, absence of secrets in generated files, and the overwrite guard. - Both READMEs document the setup against the 0.1.3 npx pin and note that .qoder/mcp.json is a snippet to paste into Qoder settings, not a file Qoder loads on its own. Co-Authored-By: Claude Opus 5 --- CHANGELOG.md | 5 ++ README.md | 47 ++++++++++++-- README.zh-CN.md | 35 ++++++++++- scripts/cli.mjs | 13 ++++ src/qoder.mjs | 129 ++++++++++++++++++++++++++++++++++++++ tests/node/qoder.test.mjs | 65 +++++++++++++++++++ 6 files changed, 288 insertions(+), 6 deletions(-) create mode 100644 src/qoder.mjs create mode 100644 tests/node/qoder.test.mjs diff --git a/CHANGELOG.md b/CHANGELOG.md index d6caad1..7b03c68 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to this project will be documented in this file. +## [Unreleased] + +- Add Qoder IDE compatibility: `chilon-recall qoder ` generates `.qoder/mcp.json`, project-level skills, and a retrieval rule file from the bundled definitions. +- Document the Qoder client setup in both READMEs; the generated files stay credential-free. + ## [0.1.3] - 2026-09-05 - Add `rag_sync`: a staged, content-hash incremental synchronization of the knowledge index. Unchanged files reuse their existing vectors; added, modified, and deleted files are reconciled. diff --git a/README.md b/README.md index f356981..c7803b5 100644 --- a/README.md +++ b/README.md @@ -44,9 +44,9 @@ It is an independent retrieval companion in the [Chilon Knowledge Work Harness]( npx -y chilon-recall@0.1.3 doctor ``` -3. **Connect one client / 连接一个客户端。** Start with [Codex](#codex--codex-配置) or [Claude Desktop](#claude-desktop--claude-desktop-配置). The client starts the local server for you; you do not need to keep a separate terminal open. +3. **Connect one client / 连接一个客户端。** Start with [Codex](#codex--codex-配置), [Claude Desktop](#claude-desktop--claude-desktop-配置), or [Qoder](#qoder--qoder-配置). The client starts the local server for you; you do not need to keep a separate terminal open. - **从 [Codex](#codex--codex-配置) 或 [Claude Desktop](#claude-desktop--claude-desktop-配置) 开始即可。** 客户端会替你启动本地 server,无需另开终端长期运行。 + **从 [Codex](#codex--codex-配置)、[Claude Desktop](#claude-desktop--claude-desktop-配置) 或 [Qoder](#qoder--qoder-配置) 开始即可。** 客户端会替你启动本地 server,无需另开终端长期运行。 ## Why Chilon Recall? / 为什么使用 Chilon Recall? @@ -58,8 +58,8 @@ It is an independent retrieval companion in the [Chilon Knowledge Work Harness]( - **本地优先控制**——文档和 FAISS 索引保留在你的设备上;只有发送给自选 embedding/reranking provider 的文本会离开设备。 - **Safe operations** — builds happen in staging; clear and restore actions use previews, short-lived confirmation tokens, and recoverable backups. - **安全操作**——建库在 staging 目录中完成;清理和恢复使用预览、短期确认 token 与可恢复备份。 -- **MCP portability** — one `stdio` server works with Codex, Claude Desktop, and other MCP-compatible local clients. -- **MCP 可移植性**——同一个 `stdio` server 可用于 Codex、Claude Desktop 及其他兼容的本地客户端。 +- **MCP portability** — one `stdio` server works with Codex, Claude Desktop, Qoder, and other MCP-compatible local clients. +- **MCP 可移植性**——同一个 `stdio` server 可用于 Codex、Claude Desktop、Qoder 及其他兼容的本地客户端。 ## Built for learning and knowledge work / 为学习与知识工作而设计 @@ -269,6 +269,45 @@ Set `RAG_API_KEY` in the environment inherited by Claude Desktop, or add it only 应在 Claude Desktop 可继承的系统环境中设置 `RAG_API_KEY`;若操作系统无法提供,只能把它加入本机私有 client 配置。Claude Desktop 会将 `env` 值存入本地 JSON,因此应限制文件权限,且绝不能提交该文件。Windows 用户应指向虚拟环境中的 `python.exe`。 +### Qoder / Qoder 配置 + +Qoder IDE loads MCP servers from its own settings, and project-level skills and rules from the `.qoder/` directory. Generate all three from a checkout or an npm install: + +Qoder IDE 从自身设置中加载 MCP server,并从项目内的 `.qoder/` 目录加载项目级 skills 与 rules。可用一条命令生成这三部分: + +```powershell +npx -y chilon-recall@0.1.3 qoder C:\path\to\your\project +``` + +This writes `.qoder/mcp.json`, `.qoder/skills//SKILL.md` for every bundled skill, and `.qoder/rules/chilon-recall.md`. Add `--force` to regenerate over existing files. + +该命令会写入 `.qoder/mcp.json`、每个内置 skill 对应的 `.qoder/skills//SKILL.md`,以及 `.qoder/rules/chilon-recall.md`。若要覆盖已有文件,请加 `--force`。 + +Qoder does not read `.qoder/mcp.json` automatically; it is a shareable snippet. Open **Qoder IDE Settings → MCP → My Servers → + Add**, paste its contents, and replace the `RAG_MANAGER_CONFIG` placeholder with your private configuration path: + +Qoder 不会自动读取 `.qoder/mcp.json`,它只是一份可共享的配置片段。请打开 **Qoder IDE Settings → MCP → My Servers → + Add**,粘贴其内容,并把 `RAG_MANAGER_CONFIG` 占位符替换为你的私有配置路径: + +```json +{ + "mcpServers": { + "chilon-recall": { + "command": "node", + "args": [ + "/absolute/path/to/chilon-recall/scripts/cli.mjs", + "mcp" + ], + "env": { + "RAG_MANAGER_CONFIG": "" + } + } + } +} +``` + +Set `RAG_API_KEY` (and `RAG_RERANK_API_KEY` when reranking is enabled) in the environment Qoder inherits. The generated files are safe to commit; credentials never belong in them. Restart Qoder IDE so the generated skills and rules load, then confirm the tools under **My Servers**. + +请在 Qoder 可继承的系统环境中设置 `RAG_API_KEY`(启用 reranking 时还需 `RAG_RERANK_API_KEY`)。生成的文件可以提交到版本库,其中绝不应写入凭据。重启 Qoder IDE 以加载生成的 skills 与 rules,并在 **My Servers** 中确认工具已出现。 + ## How it works / 工作原理 ```text diff --git a/README.zh-CN.md b/README.zh-CN.md index b4e8fb8..44f70dd 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -28,7 +28,7 @@ Chilon Recall 可将你自己的文本资料转换为私有、来源可追溯的 npx -y chilon-recall@0.1.3 doctor ``` -3. **连接一个客户端。** 从 [Codex](#codex) 或 [Claude Desktop](#claude-desktop) 开始即可。客户端会替你启动本地 server,无需另开终端长期运行。 +3. **连接一个客户端。** 从 [Codex](#codex)、[Claude Desktop](#claude-desktop) 或 [Qoder](#qoder) 开始即可。客户端会替你启动本地 server,无需另开终端长期运行。 ## 为什么使用 Chilon Recall? @@ -36,7 +36,7 @@ Chilon Recall 可将你自己的文本资料转换为私有、来源可追溯的 - **答案可追溯**:每条结果包含相对路径、标题层级、近似行号和检索分数。 - **本地优先控制**:文档和 FAISS 索引留在本机;只有发送给自选 embedding/reranker 服务的文本会离开设备。 - **安全索引操作**:新索引先在 staging 完成;清理和恢复需要预览、短期确认 token,并保留可恢复备份。 -- **跨 MCP 客户端**:同一 `stdio` MCP server 可用于 Codex、Claude Desktop 及其他兼容客户端。 +- **跨 MCP 客户端**:同一 `stdio` MCP server 可用于 Codex、Claude Desktop、Qoder 及其他兼容客户端。 ## 面向学习与知识工作的能力 @@ -196,6 +196,37 @@ bundle 会在 `CHILON_RECALL_ROOT` 中运行 `node scripts/cli.mjs mcp`。如果 应在 Claude Desktop 能继承的系统环境中设置 `RAG_API_KEY`;若操作系统无法提供,只能把它加入你本机的私有客户端配置。Claude Desktop 会把 `env` 值保存在本地 JSON 中,因此请限制文件权限,且绝不能提交该配置。Windows 用户应指向虚拟环境中的 `python.exe`。 +### Qoder + +Qoder IDE 从自身设置中加载 MCP server,并从项目内的 `.qoder/` 目录加载项目级 skills 与 rules。可用一条命令生成这三部分: + +```powershell +npx -y chilon-recall@0.1.3 qoder C:\path\to\your\project +``` + +该命令会写入 `.qoder/mcp.json`、每个内置 skill 对应的 `.qoder/skills//SKILL.md`,以及 `.qoder/rules/chilon-recall.md`。若要覆盖已有文件,请加 `--force`。 + +Qoder 不会自动读取 `.qoder/mcp.json`,它只是一份可共享的配置片段。请打开 **Qoder IDE Settings → MCP → My Servers → + Add**,粘贴其内容,并把 `RAG_MANAGER_CONFIG` 占位符替换为你的私有配置路径: + +```json +{ + "mcpServers": { + "chilon-recall": { + "command": "node", + "args": [ + "/absolute/path/to/chilon-recall/scripts/cli.mjs", + "mcp" + ], + "env": { + "RAG_MANAGER_CONFIG": "" + } + } + } +} +``` + +请在 Qoder 可继承的系统环境中设置 `RAG_API_KEY`(启用 reranking 时还需 `RAG_RERANK_API_KEY`)。生成的文件可以提交到版本库,其中绝不应写入凭据。重启 Qoder IDE 以加载生成的 skills 与 rules,并在 **My Servers** 中确认工具已出现。 + ## 工作原理 ```text diff --git a/scripts/cli.mjs b/scripts/cli.mjs index 4e6aed7..fac2851 100644 --- a/scripts/cli.mjs +++ b/scripts/cli.mjs @@ -15,6 +15,7 @@ import { setupEngine, venvPython } from "../src/runtime.mjs"; +import { installQoder } from "../src/qoder.mjs"; import { startStdioServer } from "../src/server.mjs"; const help = `Chilon Recall — local-first MCP knowledge retrieval @@ -24,6 +25,8 @@ Usage: Create a private config and install the Python engine. chilon-recall init [--force] Create a private config in a document directory. + chilon-recall qoder [--force] + Generate the Qoder IDE surface (.qoder/mcp.json, skills, rules). chilon-recall setup Create or update the isolated Python engine. chilon-recall doctor Check Node, Python engine, and private configuration. chilon-recall mcp Start the stdio MCP server (the default command). @@ -173,6 +176,16 @@ export async function main(argv = process.argv.slice(2)) { writeJson({ config: configPath, next: "Set RAG_MANAGER_CONFIG to this path, then configure your provider environment variables." }); return 0; } + if (command === "qoder") { + const args = argv.slice(1); + const force = args.includes("--force"); + const positional = args.filter((arg) => arg !== "--force"); + if (positional.length > 1) { + throw new Error("`qoder` accepts at most one project directory."); + } + writeJson(await installQoder(positional[0], { force })); + return 0; + } if (command === "doctor") return doctor(); if (command === "mcp") { process.env.CHILON_RECALL_PYTHON = await resolveEnginePython(); diff --git a/src/qoder.mjs b/src/qoder.mjs new file mode 100644 index 0000000..087ce18 --- /dev/null +++ b/src/qoder.mjs @@ -0,0 +1,129 @@ +// Qoder IDE compatibility layer. +// +// Qoder reads MCP servers from its own IDE settings (Settings -> MCP), and reads +// project-level skills from `.qoder/skills//SKILL.md` and project rules from +// `.qoder/rules/`. This module renders those artifacts for a target project from the +// same stdio server and skill definitions the other clients use, so the retrieval +// engine is never duplicated and credentials are never written into shared files. + +import { promises as fs } from "node:fs"; +import path from "node:path"; + +import { packageRoot } from "./runtime.mjs"; + +export const QODER_SERVER_NAME = "chilon-recall"; + +// Only names are listed here. Values stay in the operating system environment. +export const QODER_ENV_VARS = [ + "RAG_MANAGER_CONFIG", + "RAG_API_KEY", + "RAG_RERANK_API_KEY", + "CHILON_RECALL_HOME", + "CHILON_RECALL_PYTHON" +]; + +const RULE_FILE = "chilon-recall.md"; + +const RULE_BODY = `# Chilon Recall retrieval rules + +Apply when a request depends on the local Chilon Recall knowledge base. + +1. Call \`rag_status\` before answering from sources when index readiness or source scope is unknown. +2. Use \`textbook_qa\`, \`concept_compare\`, \`chapter_summary\`, or \`review_outline\` instead of answering + document questions from general knowledge. +3. Cite the relative source paths and headings returned by the tools. +4. Keep retrieved source claims separate from your own explanation or outside knowledge. +5. State what the evidence does not establish. A high retrieval score is not proof of completeness. +6. To refresh the index after documents change, call \`rag_sync\`, which reuses vectors for unchanged + files. Use \`rag_build\` only for a deliberate full rebuild. +7. \`rag_build\`, \`rag_sync\`, \`rag_clear_index\`, and \`rag_restore_index\` require \`action: "preview"\` first. + Show the preview to the user, then pass its token once with \`action: "execute"\`. +8. Never pass API keys as tool arguments. Credentials come from the environment only. +`; + +/** + * Render the MCP server entry to paste into Qoder IDE Settings -> MCP. + * `env` carries placeholders only; real secrets belong in the OS environment. + */ +export function qoderMcpConfig({ node = process.execPath, root = packageRoot } = {}) { + return { + mcpServers: { + [QODER_SERVER_NAME]: { + command: node, + args: [path.join(root, "scripts", "cli.mjs"), "mcp"], + env: { + RAG_MANAGER_CONFIG: "" + } + } + } + }; +} + +async function skillNames(root) { + const directory = path.join(root, "skills"); + const entries = await fs.readdir(directory, { withFileTypes: true }); + const names = []; + for (const entry of entries) { + if (!entry.isDirectory()) continue; + try { + await fs.access(path.join(directory, entry.name, "SKILL.md")); + names.push(entry.name); + } catch (error) { + if (error.code !== "ENOENT") throw error; + } + } + return names.sort(); +} + +async function writeFile(target, content, force) { + await fs.mkdir(path.dirname(target), { recursive: true }); + await fs.writeFile(target, content, { encoding: "utf8", flag: force ? "w" : "wx" }); + return target; +} + +/** + * Install the Qoder project surface into `directory`: + * `.qoder/mcp.json`, `.qoder/skills//SKILL.md`, and `.qoder/rules/chilon-recall.md`. + */ +export async function installQoder(directory, { force = false, root = packageRoot, node = process.execPath } = {}) { + const targetDirectory = path.resolve(directory || process.cwd()); + const qoderDirectory = path.join(targetDirectory, ".qoder"); + const written = []; + + try { + written.push( + await writeFile( + path.join(qoderDirectory, "mcp.json"), + `${JSON.stringify(qoderMcpConfig({ node, root }), null, 2)}\n`, + force + ) + ); + + const names = await skillNames(root); + for (const name of names) { + const content = await fs.readFile(path.join(root, "skills", name, "SKILL.md"), "utf8"); + written.push(await writeFile(path.join(qoderDirectory, "skills", name, "SKILL.md"), content, force)); + } + + written.push(await writeFile(path.join(qoderDirectory, "rules", RULE_FILE), RULE_BODY, force)); + } catch (error) { + if (error.code === "EEXIST") { + throw new Error( + `${error.path} already exists. Re-run with --force only if you intend to replace the generated Qoder files.` + ); + } + throw error; + } + + return { + directory: qoderDirectory, + written, + mcp_server: QODER_SERVER_NAME, + forwarded_env: QODER_ENV_VARS, + next: [ + "Open Qoder IDE Settings -> MCP -> My Servers -> + Add and paste .qoder/mcp.json, replacing the RAG_MANAGER_CONFIG placeholder.", + "Provide RAG_API_KEY (and RAG_RERANK_API_KEY when reranking is enabled) through the environment Qoder inherits; never commit them.", + "Restart Qoder IDE so the generated skills and rules are loaded." + ] + }; +} diff --git a/tests/node/qoder.test.mjs b/tests/node/qoder.test.mjs new file mode 100644 index 0000000..bf1c56a --- /dev/null +++ b/tests/node/qoder.test.mjs @@ -0,0 +1,65 @@ +import assert from "node:assert/strict"; +import { promises as fs } from "node:fs"; +import os from "node:os"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; +import test from "node:test"; + +import { installQoder, qoderMcpConfig, QODER_SERVER_NAME } from "../../src/qoder.mjs"; + +const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../.."); + +async function temporaryDirectory() { + return fs.mkdtemp(path.join(os.tmpdir(), "chilon-qoder-")); +} + +test("renders a stdio server entry Qoder can load", () => { + const config = qoderMcpConfig({ node: "node", root: "/opt/chilon-recall" }); + const server = config.mcpServers[QODER_SERVER_NAME]; + + assert.equal(server.command, "node"); + assert.deepEqual(server.args, [path.join("/opt/chilon-recall", "scripts", "cli.mjs"), "mcp"]); + assert.match(server.env.RAG_MANAGER_CONFIG, /^ { + const directory = await temporaryDirectory(); + try { + const result = await installQoder(directory, { node: "node" }); + const bundled = (await fs.readdir(path.join(root, "skills"), { withFileTypes: true })) + .filter((entry) => entry.isDirectory()) + .map((entry) => entry.name) + .sort(); + const installed = (await fs.readdir(path.join(directory, ".qoder", "skills"))).sort(); + + assert.deepEqual(installed, bundled); + for (const name of bundled) { + const source = await fs.readFile(path.join(root, "skills", name, "SKILL.md"), "utf8"); + const copied = await fs.readFile(path.join(directory, ".qoder", "skills", name, "SKILL.md"), "utf8"); + assert.equal(copied, source); + } + + const rule = await fs.readFile(path.join(directory, ".qoder", "rules", "chilon-recall.md"), "utf8"); + assert.match(rule, /rag_status/); + + for (const file of result.written) { + const content = await fs.readFile(file, "utf8"); + assert.doesNotMatch(content, /\b(?:sk|sf)-[A-Za-z0-9_-]{20,}\b/); + } + assert.ok(result.written.length >= bundled.length + 2); + } finally { + await fs.rm(directory, { recursive: true, force: true }); + } +}); + +test("refuses to overwrite generated files without --force", async () => { + const directory = await temporaryDirectory(); + try { + await installQoder(directory, { node: "node" }); + await assert.rejects(() => installQoder(directory, { node: "node" }), /already exists/); + await installQoder(directory, { node: "node", force: true }); + } finally { + await fs.rm(directory, { recursive: true, force: true }); + } +}); From 101bf54c44474e216519e3f44386dd89f2bd5da4 Mon Sep 17 00:00:00 2001 From: ctrlcakepro <291766549+ctrlcakepro@users.noreply.github.com> Date: Fri, 18 Sep 2026 14:08:57 +0800 Subject: [PATCH 2/3] fix: bump transitive deps to clear npm audit findings fast-uri, qs, and hono were pulled in by @modelcontextprotocol/sdk and tripped the CI audit-level=high gate even though all tests pass. --- package-lock.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index bc7190a..1866807 100644 --- a/package-lock.json +++ b/package-lock.json @@ -453,9 +453,9 @@ "license": "MIT" }, "node_modules/fast-uri": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.5.tgz", - "integrity": "sha512-gHwA1O9LDIcKunMKhObS/HimwtehO1nPUECKAu5TpKgaO19fcWEl4bliWe1jWxVFvIXztJjjQ4L8XQ1EU9f7Jw==", + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.8.tgz", + "integrity": "sha512-GZMtZUTNRpOVIECoXwLNZS5xUGE+mVNbTB8h/7Rwh2TFWcBQiPzTgyZi05BF9UMZKkLJv8XBRJTlU7zg8+ZfMg==", "funding": [ { "type": "github", @@ -590,9 +590,9 @@ } }, "node_modules/hono": { - "version": "4.13.1", - "resolved": "https://registry.npmjs.org/hono/-/hono-4.13.1.tgz", - "integrity": "sha512-kdJoFVv2xmayw6cY09H7AbMJMt8Jn5jdlEdXsP7AGBdF2DIptVlKlOLKXP41yPip4/a3yQPv9gVcJYI8YY04dw==", + "version": "4.13.8", + "resolved": "https://registry.npmjs.org/hono/-/hono-4.13.8.tgz", + "integrity": "sha512-/Gng7NfoykZl2pjukW5Z6+8Yxm3BPRf86GTbQnt0SbySkvax4fyL4H3HhY1cCpBGmiW9XDRFzRV+CXK2W8QudQ==", "license": "MIT", "engines": { "node": ">=16.9.0" @@ -858,9 +858,9 @@ } }, "node_modules/qs": { - "version": "6.15.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.3.tgz", - "integrity": "sha512-O9gl3zCl5h5blw1KGUzQKhA5oUXSl8rwUIM5o0S3nCXMliSvy5Dzx7/DJcI+SwgICv+IneSZwhBh1oSyEHA71A==", + "version": "6.16.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.16.0.tgz", + "integrity": "sha512-h6fhOIaRrID2CbEY2fqs+7t+UXZo+MLAnU5gRIq85uFtdiUPCdsApMlHhXogKVM4HM2DVbIjGNTTYH2OcmP1vA==", "license": "BSD-3-Clause", "dependencies": { "es-define-property": "^1.0.1", From 8894eadca8dffbc0f6dd6d6b3c863aad25d4b2a4 Mon Sep 17 00:00:00 2001 From: ctrlcakepro <291766549+ctrlcakepro@users.noreply.github.com> Date: Fri, 18 Sep 2026 14:38:06 +0800 Subject: [PATCH 3/3] docs: call Qoder a client, not an IDE, in the compatibility docs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Qoder brands itself as an IDE, but this project consistently refers to MCP-connected tools (Codex, Claude Desktop) as clients — align the Qoder wording with that so the docs and CLI help read consistently. --- CHANGELOG.md | 2 +- README.md | 12 ++++++------ README.zh-CN.md | 6 +++--- scripts/cli.mjs | 2 +- src/qoder.mjs | 10 +++++----- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b03c68..3e26eca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file. ## [Unreleased] -- Add Qoder IDE compatibility: `chilon-recall qoder ` generates `.qoder/mcp.json`, project-level skills, and a retrieval rule file from the bundled definitions. +- Add Qoder client compatibility: `chilon-recall qoder ` generates `.qoder/mcp.json`, project-level skills, and a retrieval rule file from the bundled definitions. - Document the Qoder client setup in both READMEs; the generated files stay credential-free. ## [0.1.3] - 2026-09-05 diff --git a/README.md b/README.md index c7803b5..76b7458 100644 --- a/README.md +++ b/README.md @@ -271,9 +271,9 @@ Set `RAG_API_KEY` in the environment inherited by Claude Desktop, or add it only ### Qoder / Qoder 配置 -Qoder IDE loads MCP servers from its own settings, and project-level skills and rules from the `.qoder/` directory. Generate all three from a checkout or an npm install: +The Qoder client loads MCP servers from its own settings, and project-level skills and rules from the `.qoder/` directory. Generate all three from a checkout or an npm install: -Qoder IDE 从自身设置中加载 MCP server,并从项目内的 `.qoder/` 目录加载项目级 skills 与 rules。可用一条命令生成这三部分: +Qoder 客户端从自身设置中加载 MCP server,并从项目内的 `.qoder/` 目录加载项目级 skills 与 rules。可用一条命令生成这三部分: ```powershell npx -y chilon-recall@0.1.3 qoder C:\path\to\your\project @@ -283,9 +283,9 @@ This writes `.qoder/mcp.json`, `.qoder/skills//SKILL.md` for every bundled 该命令会写入 `.qoder/mcp.json`、每个内置 skill 对应的 `.qoder/skills//SKILL.md`,以及 `.qoder/rules/chilon-recall.md`。若要覆盖已有文件,请加 `--force`。 -Qoder does not read `.qoder/mcp.json` automatically; it is a shareable snippet. Open **Qoder IDE Settings → MCP → My Servers → + Add**, paste its contents, and replace the `RAG_MANAGER_CONFIG` placeholder with your private configuration path: +Qoder does not read `.qoder/mcp.json` automatically; it is a shareable snippet. Open **Qoder client Settings → MCP → My Servers → + Add**, paste its contents, and replace the `RAG_MANAGER_CONFIG` placeholder with your private configuration path: -Qoder 不会自动读取 `.qoder/mcp.json`,它只是一份可共享的配置片段。请打开 **Qoder IDE Settings → MCP → My Servers → + Add**,粘贴其内容,并把 `RAG_MANAGER_CONFIG` 占位符替换为你的私有配置路径: +Qoder 不会自动读取 `.qoder/mcp.json`,它只是一份可共享的配置片段。请打开 **Qoder 客户端 Settings → MCP → My Servers → + Add**,粘贴其内容,并把 `RAG_MANAGER_CONFIG` 占位符替换为你的私有配置路径: ```json { @@ -304,9 +304,9 @@ Qoder 不会自动读取 `.qoder/mcp.json`,它只是一份可共享的配置 } ``` -Set `RAG_API_KEY` (and `RAG_RERANK_API_KEY` when reranking is enabled) in the environment Qoder inherits. The generated files are safe to commit; credentials never belong in them. Restart Qoder IDE so the generated skills and rules load, then confirm the tools under **My Servers**. +Set `RAG_API_KEY` (and `RAG_RERANK_API_KEY` when reranking is enabled) in the environment Qoder inherits. The generated files are safe to commit; credentials never belong in them. Restart the Qoder client so the generated skills and rules load, then confirm the tools under **My Servers**. -请在 Qoder 可继承的系统环境中设置 `RAG_API_KEY`(启用 reranking 时还需 `RAG_RERANK_API_KEY`)。生成的文件可以提交到版本库,其中绝不应写入凭据。重启 Qoder IDE 以加载生成的 skills 与 rules,并在 **My Servers** 中确认工具已出现。 +请在 Qoder 可继承的系统环境中设置 `RAG_API_KEY`(启用 reranking 时还需 `RAG_RERANK_API_KEY`)。生成的文件可以提交到版本库,其中绝不应写入凭据。重启 Qoder 客户端以加载生成的 skills 与 rules,并在 **My Servers** 中确认工具已出现。 ## How it works / 工作原理 diff --git a/README.zh-CN.md b/README.zh-CN.md index 44f70dd..8e53feb 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -198,7 +198,7 @@ bundle 会在 `CHILON_RECALL_ROOT` 中运行 `node scripts/cli.mjs mcp`。如果 ### Qoder -Qoder IDE 从自身设置中加载 MCP server,并从项目内的 `.qoder/` 目录加载项目级 skills 与 rules。可用一条命令生成这三部分: +Qoder 客户端从自身设置中加载 MCP server,并从项目内的 `.qoder/` 目录加载项目级 skills 与 rules。可用一条命令生成这三部分: ```powershell npx -y chilon-recall@0.1.3 qoder C:\path\to\your\project @@ -206,7 +206,7 @@ npx -y chilon-recall@0.1.3 qoder C:\path\to\your\project 该命令会写入 `.qoder/mcp.json`、每个内置 skill 对应的 `.qoder/skills//SKILL.md`,以及 `.qoder/rules/chilon-recall.md`。若要覆盖已有文件,请加 `--force`。 -Qoder 不会自动读取 `.qoder/mcp.json`,它只是一份可共享的配置片段。请打开 **Qoder IDE Settings → MCP → My Servers → + Add**,粘贴其内容,并把 `RAG_MANAGER_CONFIG` 占位符替换为你的私有配置路径: +Qoder 不会自动读取 `.qoder/mcp.json`,它只是一份可共享的配置片段。请打开 **Qoder 客户端 Settings → MCP → My Servers → + Add**,粘贴其内容,并把 `RAG_MANAGER_CONFIG` 占位符替换为你的私有配置路径: ```json { @@ -225,7 +225,7 @@ Qoder 不会自动读取 `.qoder/mcp.json`,它只是一份可共享的配置 } ``` -请在 Qoder 可继承的系统环境中设置 `RAG_API_KEY`(启用 reranking 时还需 `RAG_RERANK_API_KEY`)。生成的文件可以提交到版本库,其中绝不应写入凭据。重启 Qoder IDE 以加载生成的 skills 与 rules,并在 **My Servers** 中确认工具已出现。 +请在 Qoder 可继承的系统环境中设置 `RAG_API_KEY`(启用 reranking 时还需 `RAG_RERANK_API_KEY`)。生成的文件可以提交到版本库,其中绝不应写入凭据。重启 Qoder 客户端以加载生成的 skills 与 rules,并在 **My Servers** 中确认工具已出现。 ## 工作原理 diff --git a/scripts/cli.mjs b/scripts/cli.mjs index fac2851..50ee2dc 100644 --- a/scripts/cli.mjs +++ b/scripts/cli.mjs @@ -26,7 +26,7 @@ Usage: chilon-recall init [--force] Create a private config in a document directory. chilon-recall qoder [--force] - Generate the Qoder IDE surface (.qoder/mcp.json, skills, rules). + Generate the Qoder client surface (.qoder/mcp.json, skills, rules). chilon-recall setup Create or update the isolated Python engine. chilon-recall doctor Check Node, Python engine, and private configuration. chilon-recall mcp Start the stdio MCP server (the default command). diff --git a/src/qoder.mjs b/src/qoder.mjs index 087ce18..bce2907 100644 --- a/src/qoder.mjs +++ b/src/qoder.mjs @@ -1,6 +1,6 @@ -// Qoder IDE compatibility layer. +// Qoder client compatibility layer. // -// Qoder reads MCP servers from its own IDE settings (Settings -> MCP), and reads +// Qoder reads MCP servers from its own client settings (Settings -> MCP), and reads // project-level skills from `.qoder/skills//SKILL.md` and project rules from // `.qoder/rules/`. This module renders those artifacts for a target project from the // same stdio server and skill definitions the other clients use, so the retrieval @@ -42,7 +42,7 @@ Apply when a request depends on the local Chilon Recall knowledge base. `; /** - * Render the MCP server entry to paste into Qoder IDE Settings -> MCP. + * Render the MCP server entry to paste into Qoder client Settings -> MCP. * `env` carries placeholders only; real secrets belong in the OS environment. */ export function qoderMcpConfig({ node = process.execPath, root = packageRoot } = {}) { @@ -121,9 +121,9 @@ export async function installQoder(directory, { force = false, root = packageRoo mcp_server: QODER_SERVER_NAME, forwarded_env: QODER_ENV_VARS, next: [ - "Open Qoder IDE Settings -> MCP -> My Servers -> + Add and paste .qoder/mcp.json, replacing the RAG_MANAGER_CONFIG placeholder.", + "Open Qoder client Settings -> MCP -> My Servers -> + Add and paste .qoder/mcp.json, replacing the RAG_MANAGER_CONFIG placeholder.", "Provide RAG_API_KEY (and RAG_RERANK_API_KEY when reranking is enabled) through the environment Qoder inherits; never commit them.", - "Restart Qoder IDE so the generated skills and rules are loaded." + "Restart the Qoder client so the generated skills and rules are loaded." ] }; }