通过 AI-HIVE 完成Codex 桌面智能体全能工作台的规划、路由与验收
编程
codex-juxingyi-setup
试用安装 Codex 桌面版/CLI 并接入聚星逸网关,配置 Agent 感知 Codex 工作状态。三步:install → configure → perceive。
它能做什么
安装 Codex 桌面版/CLI 并接入聚星逸网关,配置 Agent 感知 Codex 工作状态。三步:install → configure → perceive。
技能文档
Codex 接入聚星逸 · OpenClaw Skill
让 Codex 桌面版/CLI 使用聚星逸网关调用 50+ 大模型,并让 AI Agent 感知 Codex 的工作状态。
前置条件
- macOS(ChatGPT 桌面版仅支持 macOS/Windows)
jq已安装(brew install jq)curl已安装(macOS 自带)- 聚星逸 API Key(在
https://fireworks-simulator.huo15.com/app/控制台创建,fsk-开头)
环境变量
| 变量 | 默认值 | 说明 |
|---|---|---|
JUXINGYI_API_BASE | https://fireworks-simulator-api.huo15.com/v1 | 聚星逸网关地址 |
CODEX_HOME | ~/.codex | Codex 配置目录 |
使用方式
步骤 1:安装 Codex
bash skills/codex-juxingyi-setup/scripts/install.sh
检测并安装:
- ChatGPT 桌面版(含 Codex 面板):检测
/Applications/ChatGPT.app,未安装则引导brew install --cask chatgpt或手动下载 - Codex CLI:检测
which codex,未安装则npm install -g @openai/codex
已安装则报告版本并跳过。
步骤 2:配置聚星逸接入
# 交互式配置(会询问 API Key 和模型选择)
bash skills/codex-juxingyi-setup/scripts/configure.sh
# 非交互式(CI/自动化场景)
JUXINGYI_API_KEY="fsk-xxxx" JUXINGYI_MODEL="deepseek-v4-flash" \
bash skills/codex-juxingyi-setup/scripts/configure.sh
配置过程:
- 备份现有
~/.codex/config.toml - 从聚星逸
GET /v1/models拉可用模型列表 - 写入聚星逸 provider 配置(保留原有 plugins/mcp_servers/projects 段)
- 验证连通性(用配置的 key 调一次
/v1/models)
写入的配置段:
model_provider = "juxingyi"
openai_base_url = "https://fireworks-simulator-api.huo15.com/v1"
model = "deepseek-v4-flash"
步骤 3:Agent 感知 Codex 工作
# 查看 Codex 当前状态(模型、provider、最近会话、活跃项目)
bash skills/codex-juxingyi-setup/scripts/codex-status.sh
# 列出最近 10 条会话
bash skills/codex-juxingyi-setup/scripts/codex-sessions.sh --limit 10
# 查看某条会话详情
bash skills/codex-juxingyi-setup/scripts/codex-sessions.sh --detail
# 聚合全部上下文(供 Agent 一次性读取)
bash skills/codex-juxingyi-setup/scripts/codex-context.sh
Agent 感知内容:
| 数据 | 来源 | 用途 |
|---|---|---|
| 当前模型/provider | config.toml | 知道 Codex 在用哪个模型 |
| 最近会话列表 | session_index.jsonl | 知道用户最近和 Codex 聊了什么 |
| 会话详情 | sessions/**/*.jsonl | 读取完整对话内容 |
| 活跃项目 | config.toml [projects.*] | 知道 Codex 在操作哪些项目 |
| 工作目录 | session payload.cwd | 知道每个会话的工作目录 |
复用说明
其他 OpenClaw 实例复用本 skill:
- 复制目录:
cp -r skills/codex-juxingyi-setup /目标路径/ - 设置环境变量(可选):
export JUXINGYI_API_BASE="https://your-gateway.example.com/v1" # 自定义网关 export CODEX_HOME="$HOME/.codex" # 自定义 Codex 目录 - 运行:按上述三步执行即可
- 无需修改:脚本不硬编码任何用户私有信息,所有参数通过环境变量/交互输入
Codex 配置参考
聚星逸网关已原生支持 Responses API(POST /v1/responses),Codex v0.84+ 强制要求该协议,无需额外代理。
完整 config.toml 示例:
model = "deepseek-v4-flash"
model_provider = "juxingyi"
openai_base_url = "https://fireworks-simulator-api.huo15.com/v1"
model_reasoning_effort = "medium"
approval_policy = "on-request"
sandbox_mode = "workspace-write"
[sandbox_workspace_write]
network_access = true
故障排查
| 问题 | 原因 | 解决 |
|---|---|---|
codex 命令找不到 | CLI 未安装或不在 PATH | npm install -g @openai/codex |
/v1/models 返回 401 | API Key 无效 | 在聚星逸控制台重新创建 Key |
| Codex 报 "wire_api" 错误 | 旧版本不支持 Responses API | 升级 Codex:npm update -g @openai/codex |
| 会话列表为空 | 从未用过 Codex | 先用 Codex 创建一次会话 |
相关技能
用聚星逸 fsk- 密钥调 /v1/models 接口,把最新模型列表写入 openclaw.json。模型列表完全来自接口实时返回,不依赖本地硬编码数据。支持日常更新(--update 保留主模型)、切换、查看。一个 Key 调 50+ 顶级大模型。
多 IDE / 多 AI 编程 Agent 统一调度 Skill,连接 Codex/Claude Code/QoerCN(Lingma 兼容)/Trae/VS Code/Cursor/Qoder 完成代码开发、Git Diff 分析、EF Core 实体识别、Migration 生成、数据库变更交接单产出、测试构...
Configure, repair, and validate agentmemory integration for Codex App on Windows. Use when Codex needs to set up agentmemory hooks, fix Windows PowerShell ho...
Launch unpacked Codex Desktop builds with debug ports and optional SSH host autostart using launch_codex_unpacked.sh. Use when asked to run Codex from extrac...
Turn any keyword—animal, character, brand, object, or style—into a complete installable Codex pet package. Use when a user says ‘生成 Codex 宠物’, ‘做一个宠物包’, ‘Cod...