65 lines
4.0 KiB
Markdown
65 lines
4.0 KiB
Markdown
# omp-advisor
|
|
|
|
[oh-my-pi](https://github.com/can1357/oh-my-pi)'s **advisor** for the DeepSeek Harness (DSH). A second model reads every step the main agent takes and adds notes inline: a quiet aside, a concern, or a hard blocker. It runs on its own context and can use its own model, so it catches what the main agent misses while focused on the task.
|
|
|
|
## How it works
|
|
|
|
- **When it reviews:** after each completed step (the agent's message, tool calls and tool results). It gets a compact digest of the conversation: the task at the head, the latest steps at the tail, and long tool output clipped. The digest also lists the advice it already gave, so it doesn't repeat itself.
|
|
- **What it answers:** `{"verdict": "ok" | "note" | "concern" | "blocker", "message": "…"}`. `ok` is the common case, and nothing is shown.
|
|
- **How advice reaches the agent:**
|
|
- **note / concern** is appended to the agent's next request as a system reminder.
|
|
- **blocker** gets the same reminder, marked *stop and address this*. If it arrives as the agent tries to end its turn, the advisor **steers** the agent into one more step to deal with it.
|
|
- **Cost to the main loop:** reviews run in the background and add no latency, unless you set `blocking: true`.
|
|
- **Subagents:** skipped by default (`skipSubagents`).
|
|
|
|
Blockers are for real damage or clear wrong turns: destructive commands, secret leaks, pushing broken code, ignoring explicit instructions, going in circles. Concerns cover likely bugs, wrong assumptions, unverified claims, or a much better approach.
|
|
|
|
## Per session, off by default
|
|
|
|
The advisor is chosen **per session**. Every session, new or existing, starts with the advisor **off**. Turning it on, or picking a model, in one session doesn't affect any other.
|
|
|
|
The plugin adds an **Advisor** control to the composer bar, next to the model picker:
|
|
- **Off**: no reviews. This is the default.
|
|
- **Same model as the agent**: turns it on with the session's own model.
|
|
- **Any model from DSH's model picker**: the same provider-grouped list. **Hover** a model that has reasoning efforts to open a side menu and pick its effort; clicking the model uses its default effort. The keyboard works too (→ opens the effort menu, ← goes back, Esc closes).
|
|
|
|
The trigger shows this session's choice, e.g. `Claude Haiku · Low` or `Advisor off`.
|
|
- **Where it's saved:** on the host in `<profile>/omp-advisor/sessions.json`, keyed by session id, through `GET`/`POST /omp-advisor/settings?session=<id>`. The newest 2,000 sessions are kept.
|
|
- **When it applies:** from that session's next review, with no restart.
|
|
- **What it overrides:** `enabled`, `provider`, `model`, `reasoningEffort` and `minLevel` from the config below, for that session only.
|
|
- **What it never touches:** the agent's own model.
|
|
|
|
Upgrading from 1.1: the old global `<profile>/omp-advisor.json` is ignored, so no session stays on without being turned on again.
|
|
|
|
## Installation
|
|
|
|
```bash
|
|
dsh plugin --profile web add git+https://git.rizzy.dev/DSH-Plugins/omp-advisor.git
|
|
```
|
|
|
|
Or in the Web UI, go to **Settings → Plugins → Install**. For development, use `link:` to a clone. Restart DSH afterwards, then turn the advisor on in the sessions where you want it.
|
|
|
|
## Configuration
|
|
|
|
```yaml
|
|
- id: omp-advisor
|
|
config:
|
|
enabled: false # default for sessions that haven't been switched on in the composer
|
|
provider: '' # advisor model route; empty = same as the agent
|
|
model: '' # e.g. provider: omni, model: claude-haiku-4-5 for a cheap fast reviewer
|
|
reasoningEffort: '' # optional effort for the advisor model
|
|
minLevel: note # lowest verdict delivered: note | concern | blocker
|
|
everyNSteps: 1 # review every Nth step
|
|
blocking: false # true = wait for each review before the next request
|
|
maxDigestChars: 24000
|
|
maxToolResultChars: 1500
|
|
timeoutMs: 60000
|
|
skipSubagents: true
|
|
```
|
|
|
|
To pause it, disable the plugin in **Settings → Plugins → OMP Advisor**.
|
|
|
|
## Tests
|
|
|
|
`npm test`: verdict parsing, injection, ok-silence, blocker steering, minLevel and duplicate suppression (mocked model).
|