Skip to content

Feat/add codex adapter#456

Draft
Enjoykkk wants to merge 6 commits into
TencentCloud:mainfrom
Enjoykkk:feat/add-codex-adapter
Draft

Feat/add codex adapter#456
Enjoykkk wants to merge 6 commits into
TencentCloud:mainfrom
Enjoykkk:feat/add-codex-adapter

Conversation

@Enjoykkk

@Enjoykkk Enjoykkk commented Jul 10, 2026

Copy link
Copy Markdown

Description | 描述

本 PR 依赖 #316,当前仅用于提前展示 Codex 适配方案和代码,暂不请求合并。
#316 合并到 main 后,我会重新变基当前分支、更新 PR 差异并补充 CI 验证,再申请正式 Review。

基于 #316 提供的统一 Gateway Adapter,为 Codex 增加 TencentDB Agent Memory 适配能力。
主要内容:

  • 新增 Codex UserPromptSubmit Hook,自动调用 /recall 召回记忆。
  • 新增 Codex Stop Hook,自动调用 /capture 保存对话。
  • 增加跨进程 prompt cache 和 transcript fallback。
  • 增加 Codex 插件配置、Marketplace 配置和使用文档。
  • 增加 Codex 专用测试和 Vitest 配置。
  • 不重复实现 Gateway Client、Adapter SDK 或 MCP Server。

searchMemories() 和 searchConversations()应基于#372的统一MCP服务器实现 本PR未实现
Codex 当前没有可靠的“整个会话关闭”Hook。Stop 只代表本轮结束,不能当作 endSession() 的触发点,所以未实现 endSession()的适配。

Related Issue | 关联 Issue

Related to#235

Dependency | 依赖关系

本 PR 依赖 #316 提供的统一 Gateway Adapter,
当前基于 feat/cross-platform-adapter-235 分支开发。
#316 合并到 main 后,本 PR 需要将目标分支切换为 main

Change Type | 修改类型

  • Bug fix | Bug 修复
  • New feature | 新功能
  • Documentation update | 文档更新
  • Code optimization | 代码优化

Self-test Checklist | 自测清单

  • Verified locally | 本地验证通过
  • No existing features affected | 无影响现有功能

Verification | 验证

$ npm test
Test Files 5 passed
Tests 70 passed

$ npm run build
结果:构建成功

$ npx vitest run --config codex-plugin/vitest.config.ts
Test Files 2 passed
Tests 14 passed

$ git diff --check
Passed

RerankerGuo and others added 5 commits June 30, 2026 20:40
Signed-off-by: Ziyang Guo <121015044+RerankerGuo@users.noreply.github.com>
Signed-off-by: Ziyang Guo <121015044+RerankerGuo@users.noreply.github.com>
Signed-off-by: Ziyang Guo <121015044+RerankerGuo@users.noreply.github.com>
Signed-off-by: Ke Wang <1002245584@qq.com>
@Enjoykkk Enjoykkk closed this Jul 10, 2026
@Enjoykkk Enjoykkk reopened this Jul 10, 2026
@Enjoykkk Enjoykkk closed this Jul 10, 2026
@Enjoykkk Enjoykkk deleted the feat/add-codex-adapter branch July 10, 2026 06:42
@Enjoykkk Enjoykkk restored the feat/add-codex-adapter branch July 10, 2026 06:43
@Enjoykkk Enjoykkk reopened this Jul 10, 2026
Signed-off-by: Ke Wang <1002245584@qq.com>
@Enjoykkk Enjoykkk force-pushed the feat/add-codex-adapter branch from a1b6e93 to 12fd087 Compare July 10, 2026 07:35
@YOMXXX

YOMXXX commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Duplicate/scope cleanup triage for #235:

Thanks for marking this as a preview rather than requesting merge. As it stands, this PR still carries the #316 shared Gateway client files plus Codex-specific plugin/hook files, while the PR body says it depends on #316 and should be rebased after #316 lands.

Recommendation: keep this out of active merge review until #316 and #372 are resolved. After that, rebase onto main and remove any duplicated #316 Gateway client / adapter-kit changes so the diff contains only the Codex-specific integration layer: hook mapping, prompt/transcript handling, plugin metadata, docs, and focused Codex tests. Search tools should continue to rely on the approved MCP bridge from #372 rather than adding another search path here.

This is a scope/dependency note rather than a rejection of the Codex adapter work.

@Enjoykkk Enjoykkk marked this pull request as draft July 10, 2026 12:37
@Enjoykkk

Copy link
Copy Markdown
Author

感谢说明和范围建议。

我会按建议将该 PR 保持为 Draft,暂不进入正式合并评审流程。待 #316#372 的处理结果明确后,我会将分支 rebase 到最新 main,仅保留 Codex 平台专属集成层。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants