@agentskit/harness 0.6.0 → 0.8.0

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/docs/LOOP.md CHANGED
@@ -84,6 +84,25 @@ Optional SessionStart hook for Claude Code (`.claude/settings.json` of the targe
84
84
 
85
85
  It prints `loop: installed (2/2, last run …)` or the install command; it never installs or changes anything.
86
86
 
87
+ ## Worker handoff
88
+
89
+ When a worker goes idle past `delivery.workerIdleTimeoutMin` (or its terminal disappears) **and** its provider is unavailable (exhausted usage, cooldown, missing binary), deliver does **not** immediately mark the issue stuck. Instead it:
90
+
91
+ 1. Picks the next available builder via the current routing mode (catalog/hybrid/…)
92
+ 2. Opens a **new terminal in the same worktree** (same Orca branch)
93
+ 3. Sends a continuation brief (`renderHandoffBrief`) — resume from `git status` / existing commits; do not recreate the branch
94
+ 4. Updates `dispatch.json` (`terminal`, `provider`, `model`) and appends `delivery.handoffs[]`
95
+
96
+ Config (`delivery.handoff`, enabled by default):
97
+
98
+ ```yaml
99
+ delivery:
100
+ handoff:
101
+ enabled: true
102
+ maxHandoffs: 2
103
+ onlyWhenProviderUnavailable: true
104
+ ```
105
+
87
106
  ## Deliver
88
107
 
89
108
  For every issue the loop dispatched (`<stateDir>/issues/<id>/dispatch.json`) and has not finished:
@@ -139,6 +158,20 @@ Start from [`loop.config.example.yaml`](../loop.config.example.yaml) at the pack
139
158
  | `machine.slots` | `sampleMachine` + `adaptiveConcurrency`, free RAM reserve, WSL cap, running worktrees | no — 0 free slots is a warning, not a failure |
140
159
  | `linear.queue` | `orca linear list-issues` per configured state, filtered and ordered locally | yes — an unreachable Linear blocks |
141
160
 
161
+
162
+ ## Dynamic model routing
163
+
164
+ `models.routing.mode` controls how the loop picks `provider/model` for each role:
165
+
166
+ | Mode | Behaviour |
167
+ |---|---|
168
+ | `tiers` (default) | YAML declaration order; usage only as available/unavailable (0.6 behaviour). |
169
+ | `hybrid` | Keep tier bands (quality policy); **inside a tier** pick the provider with the most remaining Orca usage. |
170
+ | `dynamic` | Flatten all YAML candidates; rank by remaining usage (YAML order is a soft tie-break). |
171
+ | `catalog` | Discover models from CLI lists (`grok models`), builtin catalog, and optional [Artificial Analysis](https://artificialanalysis.ai/) (cached under `stateDir/catalog/`), then rank by usage + quality band (`models.roles.*.quality`). |
172
+
173
+ Providers still need a `models.providers.<id>` block (`bin` / `tui` / `headless`) — Orca cannot invent argv. The doctor warns when Orca shows an integration that is not declared.
174
+
142
175
  ## Model routing
143
176
 
144
177
  `models.<role>` is a list of tiers; each tier is a list of `provider/model`. Tiers are tried in order and, inside a
@@ -37,6 +37,15 @@ linear:
37
37
  needsInfoLabel: needs-info
38
38
 
39
39
  models:
40
+ # routing.mode: tiers (default) | hybrid | dynamic | catalog
41
+ # hybrid = keep quality tiers, pick highest remaining usage inside each tier
42
+ # catalog = discover models via CLI/builtin/(optional) Artificial Analysis + usage
43
+ routing:
44
+ mode: hybrid
45
+ usageMetric: max
46
+ preferKnownUsage: true
47
+ # roles: { orchestrator: { quality: frontier }, builder: { quality: balanced }, watcher: { quality: fast } }
48
+ # catalog: { sources: [cli, builtin], artificialAnalysis: { enabled: false } }
40
49
  # Tiers, in order. Inside a tier the first provider with usage available wins.
41
50
  # Tier 1 = subscriptions, tier 2 = cheap hosted, tier 3 = last resort.
42
51
  orchestrator: [[codex/gpt-5.6-sol, claude/opus], [opencode/opencode-go/glm-5.3], [grok/grok-4-fast]]
@@ -103,6 +112,7 @@ delivery:
103
112
  requireChecks: true
104
113
  maxFixRounds: 2
105
114
  workerIdleTimeoutMin: 45
115
+ handoff: { enabled: true, maxHandoffs: 2, onlyWhenProviderUnavailable: true }
106
116
  selfEditPaths: [loop.config.yaml, ".github/**"] # PRs touching these never auto-merge
107
117
  ignoreChecks: [] # advisory check names that never block
108
118
  requiredChecks: [] # empty = every reported check must be green
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentskit/harness",
3
- "version": "0.6.0",
3
+ "version": "0.8.0",
4
4
  "description": "Portable, evidence-backed development harness for coding agents.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -2,7 +2,7 @@
2
2
  "type": "agentskit-harness-release-manifest",
3
3
  "schemaVersion": 1,
4
4
  "package": "@agentskit/harness",
5
- "version": "0.6.0",
5
+ "version": "0.8.0",
6
6
  "channel": "latest",
7
7
  "sourceRevision": "b8cfe596e5f30f2c373b89f00f271079b296feaf",
8
8
  "requiredChecks": [
package/release/notes.md CHANGED
@@ -1,3 +1,11 @@
1
+ # 0.8.0 release candidate
2
+
3
+ Worker handoff: continue in-flight tickets on the same Orca worktree/branch with another provider when usage runs out.
4
+
5
+ # 0.7.0 release candidate
6
+
7
+ Dynamic Orca-aware model routing (hybrid/dynamic/catalog) with remaining-usage ranking and a living model catalog (CLI + builtin + optional Artificial Analysis).
8
+
1
9
  # 0.6.0 release candidate
2
10
 
3
11
  Keep-pushing loop gains approved memory (token reduction + continuous improvement), Doc Bridge freshness/review doctor probes, brief guidance scopes, optional deliver smoke, agent registry YAML, RAG context provider, MCP adapter seam (ADR-0028), Docker verify config, and weekly Linear retro automation. Config defaults preserve 0.5.0 behaviour.