feat: add Codex plugin compatibility layer (MCP + skills + hooks) - #135
Closed
laserduor wants to merge 1 commit into
Closed
feat: add Codex plugin compatibility layer (MCP + skills + hooks)#135laserduor wants to merge 1 commit into
laserduor wants to merge 1 commit into
Conversation
Add full Codex plugin support alongside existing OpenCode plugin: - .codex-plugin/plugin.json — Codex plugin manifest (skills + MCP server) - .mcp.json — MCP server config wrapping 5 lifecycle tools - src/mcp-server.ts — MCP stdio server exposing setup_control, flow_control, task_control, tdd_checkpoint, release_control as MCP tools - skills/ — Symlinks to existing flow-* skills, also usable by Codex - hooks/hooks.json + hooks/session-start.ts — SessionStart lifecycle hook - .agents/plugins/marketplace.json — Personal marketplace entry for local testing The MCP server dynamically imports kernel functions and presents them as Codex-compatible tools with full JSON Schema argument definitions. The dev-lifecycle agent prompt and skills are shared between OpenCode and Codex. tsconfig: relaxed strict mode, added esModuleInterop + downlevelIteration for compatibility with kernel code's discriminated union patterns.
Author
|
Superseded by PR #136 (codex-compat-v2) |
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.
概述
在现有 OpenCode 插件的基础上,增加 Codex 插件兼容层,使 的 5 个生命周期工具和 8 个 flow skills 也能在 Codex 中使用。
新增文件
Codex 插件核心
.codex-plugin/plugin.json.mcp.jsonsrc/mcp-server.tsSkills & Hooks
skills/skills/目录)hooks/hooks.jsonhooks/session-start.ts市场配置
.agents/plugins/marketplace.json修改文件
package.jsontsconfig.json架构说明
双平台兼容
@opencode-ai/plugin插件流程不变,通过index.ts→plugin.ts→plugin/server.ts注入skills/目录暴露技能,通过hooks/注入 agent promptMCP 工具
MCP server 暴露 5 个工具(setup_control, flow_control, task_control, tdd_checkpoint, release_control),
每个工具完整保留所有 op 和参数,通过 JSON Schema 定义。
使用方式
Resolves: #1