Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
430b1c7
refactor: vendor shared companion modules from one source
okisdev Oct 15, 2026
9db3222
feat(codex): wind down by job id, ingress deadline, two tier retention
okisdev Oct 15, 2026
e2668f7
feat(grok): quota cooldown, footer contract, cached probes, one deadline
okisdev Oct 15, 2026
6aa1bab
feat(cursor): reclaim private homes, share the npm cache, fail fast
okisdev Oct 15, 2026
bb0ef1e
feat(fusion): one hook process, visible advisories, calibrated budgets
okisdev Oct 15, 2026
3403d6e
feat(fusion): compact stats, cheaper monitors, stricter config
okisdev Oct 15, 2026
3f04fb9
docs(fusion): shrink the always loaded rules and resolve contradictions
okisdev Oct 15, 2026
3b0275a
feat(bench): bound every child, refuse mixed pins, propose rescores
okisdev Oct 15, 2026
209ab2c
ci: two job push matrix, weekly full matrix, pinned validator
okisdev Oct 15, 2026
7e9f934
docs: sync the readme and bump to 0.0.65
okisdev Oct 15, 2026
2456ed7
test(cursor): wait for the killed worker before probing died detection
okisdev Oct 15, 2026
f9c9bff
fix: zombie aware group probes in grok and cursor
okisdev Oct 15, 2026
66ec991
fix(codex): review deadlines, live leader slots, held output
okisdev Oct 15, 2026
fa2aaa0
fix: keep cursor drift on cancel and key monitor caches by inode
okisdev Oct 15, 2026
dcbe0ea
fix(grok): quota cooldown evidence, missing cli, refresh backoff
okisdev Oct 15, 2026
58781de
docs: changelog for the review fixes
okisdev Oct 15, 2026
ec834ef
refactor: flat shared lock and transport modules
okisdev Oct 15, 2026
8ef9ea6
refactor(cursor): drop record compat and nested helpers
okisdev Oct 15, 2026
a5c042b
refactor(grok): drop record compat and nested helpers
okisdev Oct 15, 2026
92da76f
refactor(fusion): drop compat paths and nested helpers
okisdev Oct 15, 2026
080e7e7
refactor(codex): drop record compat and nested helpers
okisdev Oct 15, 2026
36e9d30
refactor: run supervisors keep state in one context
okisdev Oct 15, 2026
5d8b0b6
docs: changelog and rules for the compat removal
okisdev Oct 15, 2026
7330f6f
refactor(codex): export the event stream parser itself
okisdev Oct 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
"email": "hi@okis.dev"
},
"description": "Multi-model orchestration marketplace for Claude Code.",
"version": "0.0.64",
"version": "0.0.65",
"plugins": [
{
"name": "grok",
"source": "./plugins/grok",
"displayName": "Grok Companion",
"description": "Local Grok CLI delegation: task, review, resumable history, best-of-n tournaments, background jobs, stats, and setup health checks.",
"version": "0.0.64",
"version": "0.0.65",
"author": {
"name": "Harry Yep"
},
Expand All @@ -34,7 +34,7 @@
"source": "./plugins/codex",
"displayName": "Codex Companion",
"description": "First party local Codex CLI delegation for tasks, reviews, resumable threads, and durable background jobs.",
"version": "0.0.64",
"version": "0.0.65",
"author": {
"name": "Harry Yep"
},
Expand All @@ -55,7 +55,7 @@
"source": "./plugins/cursor",
"displayName": "Cursor Companion",
"description": "Local Cursor Agent CLI delegation: multi family consults, Composer implementation in owned worktrees, review, resumable history, background jobs, and setup health checks.",
"version": "0.0.64",
"version": "0.0.65",
"author": {
"name": "Harry Yep"
},
Expand All @@ -76,7 +76,7 @@
"source": "./plugins/fusion",
"displayName": "Fusion Orchestrator",
"description": "Multi-model orchestration: tier agents, routing rules, blind panel, ultra fleet, model config, and drift doctor.",
"version": "0.0.64",
"version": "0.0.65",
"author": {
"name": "Harry Yep"
},
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ on:
push:
branches: [main]
pull_request:
schedule:
- cron: '0 3 * * 0'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
validate:
runs-on: ubuntu-latest
Expand All @@ -11,15 +17,14 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 22
- run: npm install -g @anthropic-ai/claude-code
- run: npm install -g @anthropic-ai/claude-code@2.1.300
- run: claude plugin validate . --strict
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
node-version: [22, 24]
include: ${{ fromJSON((github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && '[{"os":"ubuntu-latest","node-version":22},{"os":"ubuntu-latest","node-version":24},{"os":"macos-latest","node-version":22},{"os":"macos-latest","node-version":24}]' || '[{"os":"ubuntu-latest","node-version":22},{"os":"macos-latest","node-version":24}]') }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand Down
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# changelog

## 0.0.65

- this release acts on a full audit of the codebase and of local run history: 2,812 codex, 952 grok, and 12 cursor jobs, 1,079 claude worker records, 33,649 inline guard events, and 12,526 claude code transcripts.
- the always loaded orchestration rules shrink from 76.8 kb to about 44 kb. engine runtime internals, the full routing notes, and lifecycle detail move verbatim into an orchestration reference section of the troubleshooting rules, which load on demand, and the rendered routing table drops its notes column (notes stay in `model-routing.json` and `/fusion:config`). the rules also resolve four contradictions: the collector engine enum includes cursor, panel briefs explicitly carry no `--cwd` prefix, the 600, 570, and 540 second clocks are named separately, and the grok tested interval reads `[1.0.14, 1.0.42)` everywhere.
- the peer rescue wrappers and the job collector set `omitClaudeMd: true` and `effort: low`. transcripts showed 99% of 2,855 wrappers loading the rules file they are told to ignore, at 29% of codex-rescue and 42% of grok-rescue cache reads.
- the codex rescue wrapper no longer runs a command copied from companion output. a job that ends in timeout, policy, patch thrash, or died is wound down through `codex-companion.mjs wind-down --job <id>`, which derives the resume from the stored record and allows it once.
- codex foreground runs and reviews measure one deadline from command ingress and stop the timer when the child closes (a run that finished just before 570 s could be recorded as a timeout); a child that exited while an escaped helper still holds its output settles on its own exit status at the deadline, acknowledge stdout before marking a result collected, batch event and stderr writes, and persist the heartbeat every 30 s instead of every 5 s.
- codex retention is two tiered: heavy artifacts keep the 256 job and 512 mib caps, while job records and briefs stay for 5,000 jobs or 90 days, so verdicts outlive artifacts. locally only 3.9 days of records survived, with event logs at 94.5% of the bytes. gc runs at most once a minute, deletes under the record lock, and sweeps crash orphans.
- grok: a quota failure that carries payment evidence (402, balance exhausted) opens a one hour fast-fail cooldown (`GROK_QUOTA_COOLDOWN_MS`, `/grok:setup --clear-quota-cooldown`); 24 of 35 local quota failures had launched after an earlier one. quota errors keep the readable message instead of `Internal error: {`. an unparseable version fails closed while a missing binary stays `missing_cli`, and builds past the tested interval report ready with a verification warning. one deadline covers preflight, refresh, retry, and cleanup; the sandbox handshake reads incrementally; capability probes are cached on disk; identity capture retries; relative `GROK_HOME` and `GROK_AUTH_PATH` resolve before the cwd changes; a failed mtime refresh backs off for 30 minutes; footers carry `delivery` and `semantic`; the monitor parses only changed records.
- cursor: a private home is pruned to its resume chat when the job ends and removed after 30 days, and run directories without a record are swept; locally runs held 283 mb across 46 directories for 12 jobs, 77% of it per-home npm caches. failure classification keeps quota and rate limits pool scoped, stops calling a stray ENOENT a missing cli, and checks auth and quota before setup. task and review fail fast without a sandbox helper, the resume lease is claimed before a record exists, and records carry `companionVersion` and `modelDrift`.
- fusion hooks: inline guard advisories reach the model as `additionalContext` instead of a permission reason only the debug log saw (2,058 advisories had never reached the model), and they no longer auto-approve the write they annotate. advisories space out at 5, 10, 20, and 40 writes, verification needs a clean exit code and recognizes more runners, failed writes leave the window, only the guard emits the narrow-wave advisory, and every hook command fails open without `node`.
- fusion lifecycle: worker budgets follow observed p95 usage (regular output 192k, uncached 960k, 100 turns, 40 minutes; 75% of the 215 token_limit deaths had been accepted anyway), every limit records its `limitKind`, the job collector gets 660 s, the stop gate releases after three identical blocks, acceptance advisories wait for the whole wave, parent reads use an output path index, records cap their ring buffers, and the retention sweep runs every six hours and writes `workers/rollup.jsonl` before deleting.
- fusion stats and monitors: the default report drops the identity map and per-day lines (`--identities`, `--by-day` bring them back), lane drift uses the last 30 days of routed skus, untracked peer jobs split into unsettled and direct cohorts, transport-labelled rejections count as infrastructure, retired rollups appear under `--all`, malformed arguments get one usage line, `--prune-dead` covers observation sidecars and orphan cursor runs, monitors parse only changed records, `fusion-config` rejects duplicate rows and models absent from a live listing, and the brief sensor is hard-bounded at 1.5 s.
- shared code: `shared/companion/` is the single source for process identity, argument parsing, and the record lock, vendored into each plugin by `node shared/sync.mjs` and drift checked by the suite. all three companions use the shared zombie-aware process identity, and their process group probes agree with it, so a group that holds only an unreaped zombie reads as gone; grok and cursor also gain fsynced writes and the reaper ownership recheck.
- one hook process instead of two: `fusion-hook.mjs` runs the lifecycle and inline guard handlers in process for every event where both apply and merges their outputs (deny wins, contexts join, digests intact). a PreToolUse Edit event measured 36 ms through the dispatcher against 64 ms for the two scripts.
- the large scripts are split behind their existing entry points and exports: `fusion-stats.mjs` into `lib/stats/` (byte-identical output), `worker-lifecycle.mjs` into `lib/lifecycle/`, `inline-delegation-guard.mjs` into `lib/guard/`, codex `runCodex` into supervisor, events, rollout, outcome, and usage modules, and `grok-companion.mjs` into `lib/companion/`.
- the raw-args transport is one shared module for all three companions; codex prune now refuses a group- or world-readable request file like the others.
- cursor private homes link `.npm` to one shared cache under the data root (bounded at 256 mib), and the two generated sandbox configs agree on network access; a live consult confirmed both.
- a codex job whose process group outlived its leader stops blocking its workspace after ten minutes, with a warning that names the group and never signals it; a live leader whose identity was never captured keeps blocking.
- `bench/lanes/summarize.mjs --propose` turns lane runs into reviewable `/fusion:config rescore` suggestions.
- no backward compatibility is kept for data or invocations from older releases. job records must carry the current schema or take the unreadable path, so read-time defaults, aliases, and migrations are gone: codex records lose the `sessionId` alias, grok's legacy process state folds into unverified, and history drops a malformed record instead of narrowing it. the retired guard `allow` subcommand, the codex monitor's terminal ledger migration, the plain directory lock reclaim for companions older than 0.0.23, and the acceptance epoch with its pre-tracking cohort are removed.
- no function is nested inside another for shared state: the record lock and raw-args transport are module level functions configured once per companion instead of closure factories, the codex, grok, and cursor run supervisors keep their run state in one context object passed to module level functions, and pass-through wrappers are inlined.
- tests and ci: pushes run ubuntu with node 22 and macos with node 24 while the full matrix runs weekly, superseded runs cancel, the validator pins claude code 2.1.300, the jev calibration tests stop reading the host's ledgers, the bench harness bounds every child, and timing-sensitive tests use readiness barriers.

## 0.0.64

- the codex companion is verified on codex-cli 0.162.1 (#72). the source diff from rust-v0.157.1 changes none of the flags, jsonl events, resume, output schema, review path, login status, models cache, or rollout layout the companion relies on, and setup, `--output-schema`, thread resume, and native review pass live on 0.162.1. the tested interval moves to `[0.154.0, 0.163.0)` and `verified-versions.json` to 0.162.1. `Flex capacity unavailable.` now classifies as `rate_limited`, and the content filter and stock cybersecurity and biological risk refusals classify as `refused` instead of `error`.
Expand Down
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,5 @@ Tests use Node's built in runner (`node --test`) and live under `tests/`. Keep t
## Releases

Bump all plugin versions and the marketplace versions together: `plugins/codex/.claude-plugin/plugin.json`, `plugins/cursor/.claude-plugin/plugin.json`, `plugins/fusion/.claude-plugin/plugin.json`, `plugins/grok/.claude-plugin/plugin.json`, and `.claude-plugin/marketplace.json` (marketplace root version plus each plugin entry). Add a `CHANGELOG.md` entry at the top in the repo's existing lowercase bullet style (lowercase prose, proper nouns and acronyms kept, one bullet per behavioral change, motivation clauses when a change was forced by measured regression).

Edit shared companion code under `shared/companion`, then run `node shared/sync.mjs` before committing. CI fails if the vendored plugin copies drift from the shared sources.
Loading
Loading