From c286f9e6dc660ce8863b7b6bff60fa955635842e Mon Sep 17 00:00:00 2001 From: shuxueshuxue Date: Fri, 23 Jan 2026 23:00:08 +0800 Subject: [PATCH] Add runtime proto blocks and fix join init --- docs/proto.md | 11 ++++++++++- src/handler.js | 1 + src/proto.js | 9 +++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/docs/proto.md b/docs/proto.md index 67c19b9..2017212 100644 --- a/docs/proto.md +++ b/docs/proto.md @@ -56,7 +56,11 @@ Example: "macos.codex": "~/.codex/AGENTS.md", "windows.codex": "%USERPROFILE%\\.codex\\AGENTS.md", - "linux.codex": "~/.codex/AGENTS.md" + "linux.codex": "~/.codex/AGENTS.md", + + "macos.claude": "~/.claude/CLAUDE.md", + "windows.claude": "%USERPROFILE%\\.claude\\CLAUDE.md", + "linux.claude": "~/.claude/CLAUDE.md" }, "cueme.proto.prefix": { "vscode": [ @@ -65,12 +69,16 @@ Example: "---" ], "codex": [], + "claude": [], "windsurf": [] }, "cueme.proto.runtime": { "codex": [ "When calling cueme cue/pause, set the tool wait timeout to 24h to avoid premature tool timeouts.", "不要误解“更新 todo_list”的指令,因为你是 codex,你需要做的是:把 update_plan 当作 todo_list 来维护任务,而不是创建本地 todo_list 文件。" + ], + "claude": [ + "When calling cueme cue/pause, set the tool wait timeout to 24h to avoid premature tool timeouts." ] }, "cueme.proto.protocol_path": "~/path/to/protocol.md" @@ -131,6 +139,7 @@ Auto-detect (current platform only): - `vscode`: `.vscode/prompts/human_proto.md` (workspace) then platform user path - `windsurf`: `.codeium/windsurf/memories/global_rules.md` (workspace) then platform user path - `codex`: uses `~/.codex/AGENTS.md` by default (not auto-detected) +- `claude`: uses `~/.claude/CLAUDE.md` by default (not auto-detected) ### Helpers diff --git a/src/handler.js b/src/handler.js index 5ede605..ccca8e3 100644 --- a/src/handler.js +++ b/src/handler.js @@ -135,6 +135,7 @@ function detectAgentTerminal() { } async function handleJoin(db, agent_runtime) { + await initSchema(db); const agent_id = generateName(); const project_dir = process.cwd(); const agent_terminal = detectAgentTerminal(); diff --git a/src/proto.js b/src/proto.js index a4935d5..2ed6953 100644 --- a/src/proto.js +++ b/src/proto.js @@ -155,6 +155,11 @@ function defaultPathMapTemplate() { out['windows.codex'] = path.join(userProfile, '.codex', 'AGENTS.md'); out['linux.codex'] = path.join(home, '.codex', 'AGENTS.md'); + // Claude Code (global) + out['macos.claude'] = path.join(home, '.claude', 'CLAUDE.md'); + out['windows.claude'] = path.join(userProfile, '.claude', 'CLAUDE.md'); + out['linux.claude'] = path.join(home, '.claude', 'CLAUDE.md'); + return out; } @@ -164,6 +169,7 @@ function defaultConfigTemplate() { 'cueme.proto.path': defaultPathMapTemplate(), 'cueme.proto.prefix': { codex: [], + claude: [], windsurf: [], vscode: ['---', 'applyTo: "**"', '---'], kiro: [], @@ -173,6 +179,9 @@ function defaultConfigTemplate() { 'When calling cueme cue/pause, set the tool wait timeout to 24h to avoid premature tool timeouts.', '不要误解“更新 todo_list”的指令,因为你是 codex,你需要做的是:把 update_plan 当作 todo_list 来维护任务,而不是创建本地 todo_list 文件。', ], + claude: [ + 'When calling cueme cue/pause, set the tool wait timeout to 24h to avoid premature tool timeouts.', + ], }, 'cueme.proto.protocol_path': protocolPath, };