npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

patch-for-omo

v1.0.2

Published

Enhancement plugin for Oh My OpenCode - Adds Receptionist and Secretary agents for cost optimization and workflow management

Readme

Patch for Oh My OpenCode


概述

patch-for-omo 是为 Oh My OpenCode 开发的增强插件,旨在通过智能代理协调和成本优化机制,提升 OpenCode 的使用效率和经济效益。

核心价值

  • 💰 成本优化: 通过智能任务分级和代理调度,减少高价模型的不必要调用
  • 🎯 智能评估: 自动评估任务复杂度,选择最适合的代理团队组合
  • 🔄 持续监控: Secretary 代理持续监控任务进度,避免顶级模型闲置消耗
  • 🚀 工作流增强: 实现 N-1 递减式协作层级体系,适应不同复杂度的工程需求

特性

🤵 Receptionist - 智能接待员

  • 需求理解与初步分析
  • 任务复杂度等级评估(1-10级)
  • 动态代理团队组建
  • 成本控制与优化建议

推荐模型: bailian-coding-plan/glm-5 - 平衡性能与成本

📋 Secretary - 持续监控秘书

  • 实时监控各代理任务进度
  • 事件驱动而非轮询(节省调用次数)
  • 结果聚合与摘要生成
  • 智能决策何时唤醒 Sisyphus

推荐模型: zishuijin/grok-4.1-fast - 低成本、高效率

安装

npm install patch-for-omo
# 或
yarn add patch-for-omo
# 或
pnpm add patch-for-omo

快速开始

1. 配置插件

在你的 OpenCode 配置文件中添加:

{
  "plugins": ["patch-for-omo"],
  
  "patch-for-omo": {
    "receptionist": {
      "model": "bailian-coding-plan/glm-5",
      "enabled": true
    },
    "secretary": {
      "model": "zishuijin/grok-4.1-fast",
      "monitoring_interval": 30000,
      "enabled": true
    }
  }
}

2. 使用方法

启动 OpenCode 后,Receptionist 会自动作为默认接待代理:

用户:实现一个用户登录功能
Receptionist:正在分析您的需求...
  - 需求明确性:8/10
  - 技术难度:6/10
  - 涉及模块:3个
  - 建议复杂度等级:第7级(轻量级功能实现模式)
  - 推荐代理团队:Sisyphus, Atlas, explore, Hephaestus

配置

完整配置选项

{
  "patch-for-omo": {
    // Receptionist 配置
    "receptionist": {
      "model": "bailian-coding-plan/glm-5",
      "enabled": true,
      "complexity_thresholds": {
        "level_1": 90,   // 90分以上启动10人团队
        "level_2": 80,
        "level_3": 70,
        "level_4": 60,
        "level_5": 50,
        "level_6": 40,
        "level_7": 30,
        "level_8": 20,
        "level_9": 15,
        "level_10": 10   // 10-19分启动单人模式
      }
    },
    
    // Secretary 配置
    "secretary": {
      "model": "zishuijin/grok-4.1-fast",
      "enabled": true,
      "monitoring_interval": 30000,     // 监控间隔(毫秒)
      "max_idle_time": 300000,          // 最大空闲时间
      "event_driven": true,             // 事件驱动模式
      "auto_report_threshold": 3        // 自动汇报阈值
    },
    
    // Sisyphus 隔离配置
    "sisyphus_isolation": {
      "enabled": true,
      "activation_conditions": [
        "secretary_report_received",
        "all_background_tasks_completed",
        "context_ready"
      ],
      "max_concurrent_tasks": 3
    }
  }
}

工作流程

用户请求
    ↓
Receptionist(接待员)
    ├─ 需求分析
    ├─ 复杂度评估
    └─ 团队组建
    ↓
启动背景任务
    ├─ task(explore, run_in_background=true)
    └─ task(librarian, run_in_background=true)
    ↓
Secretary(秘书)
    ├─ 监听任务完成事件
    ├─ 聚合结果
    └─ 触发 Sisyphus 接管
    ↓
Sisyphus(编排器)
    ├─ 接收整理好的上下文
    ├─ 做出编排决策
    └─ 委派执行

成本优化效果

传统模式 vs 优化模式

| 项目 | 传统 Ultrawork | 优化后 | |------|---------------|--------| | Sisyphus 调用次数 | 100+ turns | 10-20 turns | | 高价模型使用比例 | ~80% | ~20% | | 低成本模型使用 | ~20% | ~80% | | 总体成本节省 | - | 60-80% |

文档

开发

# 克隆仓库
git clone https://github.com/yourusername/patch-for-omo.git

# 安装依赖
npm install

# 构建
npm run build

# 测试
npm test

贡献

欢迎贡献代码、报告问题或提出建议!请查看 贡献指南

许可证

MIT License - 详见 LICENSE 文件

致谢

本项目基于 Oh My OpenCode 开发,感谢原作者的杰出工作。