Adapte Codex and Claude Code (腾讯犀牛鸟开源)#392
Open
soongao wants to merge 8 commits into
Open
Conversation
added 3 commits
July 4, 2026 18:08
Author
|
补充说明:本次在已有 PR 上追加 SDK adapter 相关改动。 范围:
验证:
真实 Codex SDK 场景已跑通,并在用户目录生成文件:
|
Collaborator
|
Thank you for submitting this PR and participating in Tencent Rhino-bird Open-source Training Program! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
关联 Issue
Part of #235
概述
本 PR 新增 Codex 与 Claude Code Plugin适配。
实现前先拆解了现有 Memory Core/Gateway、OpenClaw、Hermes 的接入路径,并基于平台差异做了适配层拆分:
主要改动
新增共用 MCP server:
packages/tdai-memory-mcptdai_memory_search和tdai_conversation_search。新增共用 CLI 能力层:
packages/tdai-memory-clisession-start、prefetch、sync-turn、end-session。新增 Codex plugin:
plugins/tdai-memory.codex-plugin/plugin.json、.mcp.json、hooks/hooks.json、skills/tdai-memory/SKILL.md。scripts/install-codex.sh负责安装共用包、注册 plugin/MCP、写 Gateway 配置和~/.codex/AGENTS.md。新增 Claude Code plugin:
plugins/tdai-memory-claude-code.claude-plugin/plugin.json、.mcp.json、hooks/hooks.json、skills/tdai-memory/SKILL.md。scripts/install-claude-code.sh负责安装共用包、写 Gateway 配置和~/.claude/CLAUDE.md。新增 Rhino-Bird 文档
设计说明
SessionStart、UserPromptSubmit、Stop等事件中调用 CLI。AGENTS.mdCLAUDE.mdGateway 作为旁路进程运行,session end 只 flush 当前 session,不等于关闭 Gateway。
自测清单
scripts/install-codex.shscripts/install-claude-code.sh~/.codex/AGENTS.md~/.claude/CLAUDE.md~/.codex/tdai-memory/tdai-gateway.yaml~/.claude/tdai-memory/tdai-gateway.yamltdai-memory-mcp。tdai_memory_search,tdai_conversation_searchtdai_memory_search,tdai_conversation_searchplugins/tdai-memory/hooks/hooks.jsonplugins/tdai-memory-claude-code/hooks/hooks.jsonSessionStart、UserPromptSubmit、Stop分别调用对应 hook wrapper。SessionStart或 MCP 调用SessionStart或 MCP 调用ok或degraded。prefetchprepared/completed。sync-turnprepared/completed。~/.codex/tdai-memory/data/conversations~/.claude/tdai-memory/data/conversationsrecords/*.jsonlrecords/*.jsonlscene_blocks/*.mdscene_blocks/*.mdpersona.mdpersona.mdtools/listtools/list单元测试记录
已在本地执行与本次改动相关的 Python unit tests:
python3 -m pytest packages/tdai-memory-mcp/tests/unit -qpython3 -m pytest packages/tdai-memory-cli/tests/unit -q本次单测覆盖 MCP protocol/tools/session config/supervisor/side-channel,以及 CLI、hook parsing、Gateway HTTP/start/watchdog/session config 等适配层逻辑。