跳到正文

OnlyTerp

opengrok

Run any model in Grok Bot — one-command setup, model picker UI, evidence-based provider wire maps, and an update-proof doctor. Not farming you, arming you.

README 已保存到本站,可直接阅读

Documentation snapshot

README 快照

这篇是英文原文

下面正文是项目自己的英文 README。想读全文就用浏览器自带的整页翻译: Chrome / Edge 点地址栏右侧的翻译图标,或用右键菜单里的「翻译成中文」; 手机浏览器一般在菜单里。

本页保存的是公开项目资料快照,阅读过程不需要连接 GitHub。

Pick a model per agent. Save. It talks native and survives Grok Bot updates. Keys never leave your machine. Every wire claim in this repo is probe-verified, not vibed.


⚡ Quick start

git clone https://github.com/OnlyTerp/opengrok
cd opengrok
python setup.py

That’s the whole install: it detects your Grok Bot install and live services, adopts existing bindings or asks 3 questions, writes its config, baselines your machine, and opens the picker. Then:

  1. pick a model for each agent in the dropdown
  2. test it live (one click, real request)
  3. save — done
python tools/doctor.py        # anytime: is everything still healthy?
python tools/qa.py            # repo self-check: leaks, refs, tests

🤖 What it gives each model

Dropping a foreign model into Grok Bot usually “works” and feels off — slower, dumber, token-hungry. That’s harness mismatch: the model was RL-trained on its own harness’s wire shape, and gets a generic prompt shape plus wrong reasoning knobs. opengrok fixes the wire:

Model familyWhat goes wrong vanillaWhat opengrok does
Grok (xAI)effort knob is xhigh, not max; fast has no fieldliteral token mapping, always-on reasoning documented
GLM (Zhipu)thinks by default — silence is expensive; max is realverified token table + true off-switch via thinking:disabled
Claudethinking is owned by the auth shim; body-painting it 400sshim-owned thinking, effort passes clean
Gemini”fast” was decorative — the knob is the slug, not a fieldfast lane rerouting, measured 1.5s → 0.9s first token
DeepSeekthinking lives in the model slug, not the bodyslug-owns-thinking mapping
local modelscontext/recovery edgesdedicated route, fail-closed

Every row of that table is backed by a capture in wire-captures/ (see glm-5.3-flash for the full ladder — bare request thinks by default, disabled really switches it off, max is a real token).

🧩 How it fits together

 Grok Bot agent
      │  modelId + parameters (thinking/effort/fast)
      ▼
 provider-maps ──► per-provider wire truth (verified, versioned, tested)
      │
      ▼
 upstream (xAI / Zhipu / Anthropic / Google / DeepSeek / local llama.cpp)

Two contracts, one story:

  • provider-maps.cjs — Contract A: direct body maps (client-side lanes)
  • provider-maps-hop.cjs — Contract B: applyHarnessControls() for hop lanes — this is what ships on the box

Cloud agents need one more step. Stock Grok Bot cloud hosts do not read model-bindings.json — a saved binding is ignored until you install the binding consumer into the host. tools/apply-box-patch.py does that (anchored, idempotent, backs up first), and tools/file-relay.py is the box-side file relay the picker pushes bindings to. See CLOUD-HOST for the full local → push → patch → bounce → verify flow.

🛡️ Update-proof by design

Grok Bot updates silently rewrite its bundle. Instead of hoping:

  • doctor.py baselines your machine on setup and watches files, services, and caches — after any update it tells you exactly what moved
  • --quiet mode stays silent when clean (cron-friendly), complains only on drift
  • maps hot-reload; no restart needed to fix a route

📚 The laws

Hard-won rules this repo encodes — each one earned by a real failure:

  • Evidence or it doesn’t ship. No map lands without a wire capture (tools/wire-probe.py).
  • 200-accepted ≠ honored. A field that 200s and does nothing is worse than a 400. Behavior-prove every knob.
  • Silence is not cheap. Several providers think by default; a bare request burns reasoning tokens.
  • Shared connection pools break under load; fresh-connection-per-call triggers throttling. Thread-local keep-alive or nothing.
  • Fail-closed over fake success. If a control can’t be expressed on the wire, document the noop — never pretend.

🧪 Testing (how we know it’s true)

node tools/test-provider-maps.cjs       # 23/23 — Contract A
node tools/test-provider-maps-hop.cjs   #  6/6 — Contract B
python tools/qa.py                      # leak scan, ref integrity, suites

CI runs all three on every push and PR. The QA tool is itself negative-control-tested: plant a fake key or break a file and it fails loudly — a green that can’t fail is decoration.

➕ Adding a provider

python tools/wire-probe.py --base https://api.example.com/v1 --model their-model --key-env THEIR_API_KEY

Run it, paste the verdict into a PR with the capture attached. CONTRIBUTING.md has the contract — no capture, no merge.

🎙️ Voice assistant (voice/)

A full local realtime voice assistant built on the same wire-truth philosophy:

  • Ears — streaming STT (Grok/xAI), energy-gated turn detection
  • Captain — OpenAI realtime brain (gpt-realtime-2.1) with consult/dispatch tools
  • Mouth — ElevenLabs TTS (any voice, including your own clone), never-flush queue, barge-in

Browser panel UI, zero native audio deps, all lanes localhost-only. Setup is a guided walkthrough (ElevenLabs key + Codex CLI login + Grok CLI login), with a doctor that tells you exactly what’s missing:

node voice/doctor.js                      # pre-flight check
voice\scripts\start-voice.ps1             # start everything, open the panel

See voice/README.md · voice/SETUP.md.

🗺️ Status

  • ✅ Working today: Grok, GLM, Claude plans, Gemini (incl. fast lane), DeepSeek, local llama.cpp
  • 🧪 Pattern proven, capture pending: OpenRouter, Groq, Mistral, xAI OAuth
  • 📄 Docs: MODEL-GUIDELINES · BYOK vs hop · FAILURE-MODES · CLOUD-HOST · ROADMAP

not farming you, arming you.

Official distribution

获取与安装

暂未发现可确认的官方软件包地址

当前 README 快照没有出现 npm、PyPI、Crates.io、pub.dev 等官方包页链接。本站不会根据仓库名称猜测下载地址。

本站不托管项目文件;需要安装时,请以项目维护者发布的官方文档为准。

使用前核验

本站保存公开资料用于阅读,不代表安全审计或功能背书。安装前请核对许可证、依赖来源和发布签名,不要直接运行来源不明的二进制文件或高权限脚本。