⚙️ OMP(oh-my-pi)运行环境笔记

8/17 定案:OMP = 批量/快速任务专用(research/调查/原型/文档),非默认。路由见 agent-task-routing,选型依据见 2026-08-17 §1、OMP_Graph

包名澄清(重要,别搞混)

命令/包身份用途
pi@earendil-works/pi-coding-agent v0.84.2(★91K)默认主力pi -p --provider deepseek --model deepseek-v4-flash --thinking max --session-id <域>
omp@oh-my-pi/pi-coding-agent v17.3.5(can1357,★25.2K)批量/快速任务;没有安装成命令,用 bun 跑完整路径
  • 两个包都叫 pi-coding-agent,pi --version 显示的是 earendil 版本——查版本/路径不能区分
  • 昨晚评测链:PI(earendil)读任务书 → 部署 omp(npm 局部装)→ omp 执行(session 写 ~/.omp/

安装位置与运行方式

  • 可运行版本~/omp-dist/node_modules/@oh-my-pi/pi-coding-agent/dist/cli.js(npm 装的完整版,含原生模块 pi-natives)
  • 必须用 bun 跑(该包用 Bun.spawn API,node 跑不了):~/.bun/bin/bun <cli.js> ...
  • ⚠️ bun cache 版(~/.bun/install/cache/@oh-my-pi/...)缺 pi-natives,加载失败不可用
  • 64K 输出钳制 patch(必做,升级/重装要重打):bundle 硬编码 var Nq=64000(DeepSeek 路径通用钳制),models.yml 覆盖被 Math.min() 压死 → sed -i "s/var Nq=64000/var Nq=393216/" <cli.js> + 备份 .bak-Nq64000。上游 #6499 只修了 xAI 路径。Ho0=64000 是 Claude SDK 专用(不动)
  • thinking=high 档有 229K 无限规划病理 → 只用 --thinking max 或 low

配置

  • ~/.omp/agent/models.yml(注意:在 ~/.omp/agent/ 不是 ~/.omp/):
    deepseek-v4-flash:
      contextWindow: 1048576   # 1M input
      maxTokens: 393216        # 384K output
  • profile 隔离--profile <域> → 独立 agent 根目录 ~/.omp/profiles/<域>/(models.db / agent.db / sessions / logs 全隔离)
  • 记忆 backend 默认 off(零污染);需要时 mnemopi(per-project-tagged)/ hindsight(bank 级)
  • 视觉:catalog 有 1987 个视觉模型(gemini 等)可切,当前跑 deepseek 纯文本

派发模板(8/17 起统一)

~/.bun/bin/bun ~/omp-dist/node_modules/@oh-my-pi/pi-coding-agent/dist/cli.js \
  --profile <> -p --provider deepseek --model deepseek-v4-flash \
  --thinking max --approval-mode yolo --cwd <域目> "$(cat running/$TASK)"
  • --approval-mode yolo = 无人值守必需;--cwd 指向域目录(AGENTS.md/UPDATES.md 注入)
  • 临时/一次性任务可省 --profile(默认 profile 公共区,不污染域)

监控(webwatch)

  • 运行中活跃信号 = agent.db WAL 写入(jsonl 不实时写,仅历史——按 jsonl 判断会误判卡住)
  • session 目录:~/.omp/agent/sessions/(默认 profile)或 ~/.omp/profiles/<域>/agent/sessions/(profile 化)
  • 遗留适配:webwatch OMP 卡需扫 ~/.omp/profiles/*/(8/17 排队任务)
  • intent 字段:tool_execution_start 事件自带 agent 自述意图(webwatch 已消费做摘要层)

已知坑清单

  1. 64K 钳制 patch 升级/重装要重打(上游未修 DeepSeek 路径)
  2. thinking=high 229K 无限规划(只用 max/low)
  3. bun cache 版 natives 缺失(只有 npm 版能跑)
  4. 盲评 60 分短板:零文档 + FK 裸 500(任务书要强制要求 README/文档 + 错误处理模板)
  5. OMP+DeepSeek 社区零公开体验帖(需自建 anchor 适配,见 omp-deepseek-anchor)
  6. 派发前必须确认任务书已移入 running/(空跑白烧 token 教训)

相关