Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Smart Codex

Smart Codex 提供主窗口和菜单栏两个入口,在任务启动前通过本地、确定性规则选择 Codex 模型:

  • Luna / low:明确、重复、低风险任务
  • Terra / medium:日常分析、实现和排错
  • Sol / high:复杂、开放或高风险任务

分类过程不调用模型,不修改 ~/.codex/config.toml,并复用当前 Codex/ChatGPT 登录。

桌面应用

构建并打包:

./scripts/package_app.sh ./dist
open ./dist/SmartCodex.app

双击应用即可打开主窗口,也可以从菜单栏使用 Smart Codex。选择工作目录、输入任务并检查自动路由结果;你也可以手动覆盖档位。点击“在终端启动”后,应用会用所选模型启动交互式 Codex。

应用内置蓝紫色连接节点图标,桌面快捷方式会沿用该图标。

首次启动 Terminal 时,macOS 可能询问是否允许 Smart Codex 控制 Terminal;这是启动交互式任务所必需的权限。

CLI

swift run smart-codex --dry-run "把 README 翻译成中文"
swift run smart-codex -C ~/code/app "排查登录接口的 500 错误"
swift run smart-codex --tier sol "审查生产数据库迁移方案"

运行 smart-codex --help 查看全部参数。

隐私与记录

路由历史保存在:

~/Library/Application Support/SmartCodex/history.jsonl

记录包含模型、推理强度、路由原因和提示词长度,不保存提示词正文。

安全边界

  • 路由器只选择模型,不扩大 Codex 权限。
  • 启动任务时使用 on-request 审批策略。
  • 命令参数经过 shell 引号处理,避免提示词被当作 shell 命令执行。
  • 模糊任务默认选择 Terra,不会静默降到 Luna。

About

Local Smart Codex router for automatic Luna, Terra, and Sol model selection

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages