omnilane 0.41.1 → 0.42.1

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.
@@ -9,21 +9,16 @@ You (the main loop) may be Claude, GPT, Grok, or Gemini. The procedure is identi
9
9
 
10
10
  1. **Identify the main model from current runtime metadata.** If the identity is unavailable, report it as unverified instead of guessing from a skill name or prior session.
11
11
  2. **Split the work into subtasks and classify each into a lane** (table below).
12
- 3. **Dispatch every task by default — even when the lane's model is you:**
13
- implementation, search, investigation, file reads, verification, tests,
14
- builds, deploys. The commander self-executes only: planning and
15
- decomposition, writing task briefs, reading worker reports and job files
16
- (`out.txt`, `events.jsonl`, inbox records), acceptance judgment, replies to
17
- the operator, git commit/push, and edits to governance files. Read-only
18
- work goes out in advise mode: `triage` for high-volume scans, `long-context`
19
- for large documents, `live-search` for web or X, `hard-judgment` for second
20
- opinions. Editing work uses `--mode work --workdir <repo> --timeout 3600`
21
- or more. Re-verify a worker's claim by reading its attached evidence or by
22
- dispatching a second worker (change `--vendor`); the commander runs no
23
- commands itself. Invalid reasons to skip dispatch: "this lane is mine",
24
- "I am not dispatching so the rule does not apply", "it is only a file
25
- read", "dispatch is slower", "it is one line". Dispatch:
26
- `<repo>/scripts/dispatch.sh [--vendor V] [--mode work] [--workdir DIR] <lane> "<task>"`
12
+ 3. **Delegate every task by default, even to the commander's exact model.**
13
+ Native agents count as delegation; a model match is not permission for
14
+ commander self-execution. Resolve vendor/model/effort separately from
15
+ executor selection. Terminal `auto` without capabilities stays legacy CLI.
16
+ The commander owns planning, task briefs, handoff/completion orchestration,
17
+ reading public results, acceptance, operator replies, git commit/push and
18
+ governance edits. Workers execute the assigned task and never delegate again.
19
+ Read-only work uses advise; edits require `--mode work --workdir <repo>`.
20
+ `<repo>/scripts/dispatch.sh [--executor auto|native|cli] [--native-context FILE] [--vendor V] [--mode work] [--workdir DIR] <lane> "<task>"`
21
+
27
22
  Add `--background` for long tasks; poll with `scripts/jobs.sh status|result <id>`.
28
23
  Use `--thread NAME` when later claude, codex, grok or gemini dispatches
29
24
  must retain earlier context. Threads in 0.33.0 pin vendor, model, effort and
@@ -58,9 +53,59 @@ Doctor remains offline unless the operator explicitly adds `--probe V`; that
58
53
  bounded probe returns metadata only. Use `bin/omnilane benchmark` for a fixed
59
54
  no-call route plan, and add `--run` only when actual advise-mode comparison calls
60
55
  were explicitly requested. Neither command changes routing.
61
- Lanes are fallback chains — dispatch uses the first vendor CLI actually installed,
56
+ Without native context, fallback chains use the first vendor CLI installed,
62
57
  so the same table works with any subset of subscriptions.
63
58
 
59
+ ## Caller-owned native delegation
60
+
61
+ Use explicit current-harness capabilities from the real agent-tool contract:
62
+ active harness/vendor, exact supported model/effort combinations, optional known
63
+ current model, task modes/workdirs, tools, isolation, and lifecycle. Codex
64
+ `collaboration.spawn_agent` has no sandbox/tool/workdir restriction parameters;
65
+ it inherits the parent's tools and filesystem. Advertise `shared-inherited` in
66
+ both request and matching capability row, with empty tool arrays. Treat
67
+ `advise`/`work` and workdir as task intent, not an OS sandbox. Hard isolation is
68
+ CLI-only. Same vendor is not same model. Unknown capabilities do not match.
69
+ Never inspect credentials or infer support from installed CLIs. Explicit
70
+ vendor/model/effort survive native fallback; no next-vendor substitution.
71
+
72
+ ```sh
73
+ omnilane route --executor native --native-context /absolute/capability.json --workdir /absolute/repo hardest-coding "Review the change"
74
+ omnilane jobs --json complete-native JOB_ID /absolute/completion.json
75
+ omnilane jobs --json status JOB_ID
76
+ omnilane jobs --json result JOB_ID
77
+ ```
78
+
79
+ For explicit reuse, the capability must prove the exact existing agent and its
80
+ idle state, and explicitly preserve its existing context. Recheck idle immediately
81
+ before `collaboration.followup_task`; completion must match the reuse strategy,
82
+ agent ID and backend. Do not substitute an unknown inherited model or reuse a busy
83
+ agent. New-agent capacity exhaustion is not success; see `docs/native-executor.md`.
84
+
85
+ Route returns **pending handoff JSON**, not a successful agent run. The host calls
86
+ its own agent tool with the resolved exact model and effort, passes workdir,
87
+ mode, task, and deadline as intent, then ingests the actual agent ID, runtime
88
+ vendor/model/effort/harness/backend, outcome, public result, and evidence. An
89
+ explicit model override uses `fork_turns: "none"` or bounded positive history;
90
+ never combine a model override with `fork_turns: "all"`. An unknown caller
91
+ current model may be omitted when the route explicitly selects an exact model
92
+ declared by the matching capability row. Never report completion before
93
+ ingestion. Native is not a shell executable. The host
94
+ passes **no nested delegation** to native workers; shell workers retain their
95
+ depth guard. Workers do not create handoffs or call agent-spawn tools.
96
+
97
+ Forced CLI retains external workers. Auto explains its CLI fallback reason;
98
+ forced native rejects missing/incompatible capability. CLI sessions (background,
99
+ live, named threads, explicit single-shot), durable/multi-round work,
100
+ vote/arbitration, sysops and unsupported isolation remain CLI-only. The native
101
+ deadline is host-enforced, not a shell watchdog. Native cancellation changes
102
+ pending state without PID signals; the host separately stops any spawned agent.
103
+ Native goal-loop, retry, mailbox, CLI wait and managed-block sync are not included.
104
+
105
+ See [native protocol](../../docs/native-executor.md) for strict schemas, terminal
106
+ examples, lifecycle and public-data boundaries. The parent alone backs up and
107
+ syncs the host's managed `~/.codex/AGENTS.md` block after review.
108
+
64
109
  ## Lanes (defaults; see routing.yaml for the live values)
65
110
 
66
111
  Each lane's **backup** is the next candidate in its `routing.yaml` chain —
@@ -161,10 +206,21 @@ dispatch stay in this skill and the CLI. Manage the local board with
161
206
 
162
207
  ## Job lifecycle defaults
163
208
 
164
- - **Completion inbox**: with the Claude Code plugin's hooks installed, a
165
- finished `--background` job is delivered into the foreman's next prompt by
166
- the bundled `UserPromptSubmit` hook, so do not poll for it. Outside Claude
167
- Code, block on `scripts/jobs.sh wait <id> [--timeout N]` instead.
209
+ - **Active completion (Codex)**: after background CLI dispatch, use
210
+ `scripts/completion-wakeup.py prepare` with the actual controller app thread,
211
+ host, unique run ID and exact job allowlist. Use the returned handoff with the
212
+ app `automation_update` heartbeat tool (reuse an existing monitor), then record
213
+ the actual registration receipt. Do this before ending a turn with unobserved
214
+ jobs. On callback, `poll`, keep unchanged state quiet, acknowledge delivery,
215
+ inspect public results and verify, then acknowledge acceptance with evidence.
216
+ Pause the real automation and record `closed` after all tracked events are
217
+ handled. Never reuse a historical run ID or infer delivery from registration.
218
+ See `docs/completion-wakeup.md` for exact commands and receipt schemas.
219
+ - **Other completion surfaces**: native agent callbacks provide the host result;
220
+ still ingest and verify it. Claude's `UserPromptSubmit` inbox is passive and
221
+ requires another prompt; it does not wake an idle controller. If no supported
222
+ active callback exists, keep the controller active with `scripts/jobs.sh wait`
223
+ and resume acceptance on return rather than asking the user to check again.
168
224
  - **Live mailbox**: Claude and Gemini retain automatic resident background
169
225
  sessions for supported modes. Codex and Grok remain single-shot by default;
170
226
  explicit `--live` opts in. Grok live requires explicit `--mode sysops` because
@@ -226,8 +282,8 @@ dispatch stay in this skill and the CLI. Manage the local board with
226
282
  `OMNILANE_DEPTH`). Escalate back to the main loop instead.
227
283
  - **Same-directory codex dispatches are serialized automatically** (lock);
228
284
  do not try to parallelize them yourself.
229
- - Escalate without asking: two failed attempts on a lane → move one lane up
230
- (triage → bulk-mechanical → hardest-coding).
285
+ - After two failed attempts, reassess scope and retry only an eligible exact configuration.
286
+ An upward AA move requires the human to take over; a model cannot approve its own uplift.
231
287
  - Vendor quota exhausted (429 / "stream disconnected" / usage-limit message):
232
288
  send mid-tier coding through coding-overflow instead; never silently downgrade
233
289
  hardest-coding — wait or escalate to the user.
@@ -248,15 +304,14 @@ These notes never expand the commander's reserved self-execution scope. If the v
248
304
  - **Claude Sonnet main**: coordination/tools/mid-tier coding only, plus fallback
249
305
  duty in bulk-mechanical and live-search; never self-assign top judgment or
250
306
  hardest implementation.
251
- - **GPT Astra main**: prompt-level controller backup and independent reviewer.
252
- Default to xhigh for hardest coding/judgment and consult/taste; use
253
- `--vendor codex --effort max` only for an explicitly requested upgrade. Explicit
254
- model and effort always outrank these defaults.
255
- - **GPT Sol main**: bulk mechanical work and constrained UI drafts are yours at
256
- high; escalate hardest coding and judgment to Fable/Astra.
257
- - **GPT Terra main**: long-context Codex fallback work is yours at max; bulk
258
- stays on Sol high and hard work escalates to Fable/Astra.
259
- - **GPT Luna main**: high-volume triage is yours at high; do not promote its
307
+ - **GPT Astra main**: controller backup and independent reviewer. Resolve the
308
+ actual caller effort first; select only an exact target at or below its ceiling.
309
+ An explicit higher-effort request does not bypass model-level AA policy.
310
+ - **GPT Sol main**: mechanical work and constrained UI drafts only within the
311
+ exact effective ceiling; return higher-score needs to the operator.
312
+ - **GPT Terra main**: long-context and mechanical work only within the exact
313
+ effective ceiling; do not infer eligibility from the Terra family label.
314
+ - **GPT Luna main**: high-volume triage is delegated at high; do not promote its
260
315
  low price into correctness-critical or controller work.
261
316
  - **Grok 4.6 main**: live-search and coding-overflow are yours, plus fallback
262
317
  duty in hard lanes. Grok effort remains ignored; verify API signatures and
@@ -266,3 +321,37 @@ These notes never expand the commander's reserved self-execution scope. If the v
266
321
  or controller authority from agent/coding benchmarks.
267
322
  - **Gemini 3.1 Pro main**: remains directly selectable, but is not promoted by
268
323
  this refresh; route hard coding and judgment to the stronger configured lanes.
324
+
325
+ ## Frozen exact-AA downward gate
326
+
327
+ All lane and per-model preferences above are subordinate to this gate, including
328
+ explicit vendor/model/effort requests. Supply `--caller-context /absolute/context.json`
329
+ with schema_version=1, snapshot_id, kind=model, caller containing exact vendor/model/
330
+ effort/reasoning/fallback, and inherited_ceiling. Effective ceiling is the minimum of
331
+ that exact frozen score and the inherited ceiling. Targets at or below it are allowed;
332
+ unknown identities and unresolved request-selector mappings fail closed. No family,
333
+ displayed grade, highest-effort assumption, retry or fallback grants an uplift.
334
+
335
+ A `--transport-overlay /absolute/overlay.json` may prove a small set of host-local
336
+ request selectors using exact identities and hashed local contract evidence. It does
337
+ not change frozen AA scores or certify upstream provider identity. The explicit
338
+ `--operator-asserted-human` exemption is cooperative operator metadata, not automatic
339
+ model detection or OS authentication; model callers must not assert it for themselves.
340
+
341
+ CLI jobs atomically save an original authorizer, exact child caller context, decision,
342
+ and registry snapshot. Provider processes receive the child identity, not the parent's.
343
+ Retries preserve original target config, check stored hashes, and intersect the
344
+ current exact caller score/inherited ceiling with the original authorizer ceiling.
345
+ Use `omnilane jobs retry ID --caller-context FILE`; missing current identity fails
346
+ closed, and a model retry never inherits an earlier human exemption. Native handoffs carry the same decision plus a job-owned
347
+ `worker_contract.caller_context_path`; pass that context to the native child together
348
+ with the no-nested-dispatch requirement. `OMNILANE_DEPTH` remains an independent guard.
349
+
350
+ A background job or PENDING native handoff is not completion. Observe its terminal
351
+ result and acceptance evidence before closing the controller task. Completion wakeup
352
+ availability must be separately verified; never claim delivery from scheduling alone.
353
+
354
+ For Gemini `model_id_encoded_effort` selectors, the proven native model ID encodes
355
+ the AA effort. An absent parity effort or the matching effort is accepted; a conflicting
356
+ parity effort is rejected. Do not represent a discarded EFFORT parameter as an active
357
+ provider setting. Frozen reasoning=`unspecified` remains a literal, not a wildcard.