@dylanrussell/agent-router 1.1.0 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -2
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/plugin.js +1 -1
- package/dist/plugin.js.map +1 -1
- package/dist/tui.js +41 -7
- package/dist/tui.js.map +1 -1
- package/package.json +1 -6
package/README.md
CHANGED
|
@@ -81,6 +81,8 @@ npx -y @dylanrussell/agent-router init
|
|
|
81
81
|
|
|
82
82
|
Then **restart opencode** so it picks up the plugin.
|
|
83
83
|
|
|
84
|
+
`@opencode-ai/plugin` is a required peer dependency: the server bundle imports it at runtime. npm installs it on a clean install; do not omit peer dependencies when installing the plugin.
|
|
85
|
+
|
|
84
86
|
## Quickstart
|
|
85
87
|
|
|
86
88
|
```bash
|
|
@@ -171,7 +173,7 @@ Duplicate/concurrent error events advance only once per user turn. Selection and
|
|
|
171
173
|
|
|
172
174
|
**Verified boundary:** inspected opencode **v1.17.15** `packages/opencode/src/session/prompt.ts`: `chat.message` mutates the message before `sessions.updateMessage(info)` and the legacy session loop resolves `lastUser.model`. A deterministic in-process provider harness tests those hook semantics, explicit next-turn continuation, variant selection, and no replay/persistent writes. This is **not a real-server end-to-end provider test** and does not prove that every new v2 execution path invokes these legacy hooks. Hosts that bypass them receive no failover. There is no transparent same-turn continuation guarantee, no automatic recovery of a failed `task` invocation, and no guarantee that an LLM will not choose to repeat a tool when explicitly asked to continue.
|
|
173
175
|
|
|
174
|
-
The installed SDK exposes `/v2` `client.v2.session.switchModel` for subsequent turns, but no atomic compare-and-switch/retry contract was verified. Router deliberately does **not** call it: an asynchronous model write could race a manual selection or cancellation. No direct SDK dependency is needed; plugin hooks are the integration boundary. The TUI model picker and router status
|
|
176
|
+
The installed SDK exposes `/v2` `client.v2.session.switchModel` for subsequent turns, but no atomic compare-and-switch/retry contract was verified. Router deliberately does **not** call it: an asynchronous model write could race a manual selection or cancellation. No direct SDK dependency is needed; plugin hooks are the integration boundary. The sidebar displays configured primary and fallback chains; the TUI model picker and router status display primary assignments. None of these indicate session-local runtime candidates.
|
|
175
177
|
|
|
176
178
|
### Install This Checkout
|
|
177
179
|
|
|
@@ -202,7 +204,8 @@ The plugin exposes six tools the agent (or you, by asking it) can call:
|
|
|
202
204
|
|
|
203
205
|
On opencode ≥ 1.17 the plugin also ships a TUI half (loaded from `tui.json`, wired up by `init`):
|
|
204
206
|
|
|
205
|
-
- **Sidebar panel** —
|
|
207
|
+
- **Sidebar panel** — lists available stacks with the active one checked. Under **Current Stack → Configured routing**, each agent has an indented **Primary** model and ordered **Fallback 1**, **Fallback 2**, … rows. Explicit variants appear in brackets; agents without fallbacks show only their primary. Model IDs are kept in full. A `⟳ restart required` badge appears when the active stack differs from the one at TUI startup. Updates live (≤1.5s), including fallback-only and variant-only edits.
|
|
208
|
+
- **Configuration, not live failover** — sidebar chains come from the active stack file, not session-local routing or the applied `state.json.fallbackAgents` snapshot. Editing a stack changes this preview but does not apply it: use the stack and restart opencode to activate changes. A fallback row is a configured candidate, not a claim that failover is enabled or that the model is currently running.
|
|
206
209
|
- **Commands** — type `/` or open the command palette:
|
|
207
210
|
|
|
208
211
|
| command | what it does |
|
package/dist/cli.js
CHANGED
|
@@ -16951,7 +16951,7 @@ async function exportStack(paths, name, toFile) {
|
|
|
16951
16951
|
}
|
|
16952
16952
|
|
|
16953
16953
|
// src/version.ts
|
|
16954
|
-
var VERSION = "1.1.
|
|
16954
|
+
var VERSION = "1.1.2";
|
|
16955
16955
|
|
|
16956
16956
|
// src/cli.ts
|
|
16957
16957
|
var log = (...args) => console.log(...args);
|