Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 7 additions & 7 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.85",
"version": "0.0.86",
"plugins": [
{
"name": "grok",
"source": "./plugins/grok",
"displayName": "Grok Companion",
"description": "Local Grok CLI delegation: task, review, resumable history, background jobs, stats, and setup health checks.",
"version": "0.0.85",
"version": "0.0.86",
"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.85",
"version": "0.0.86",
"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.85",
"version": "0.0.86",
"author": {
"name": "Harry Yep"
},
Expand All @@ -76,7 +76,7 @@
"source": "./plugins/devin",
"displayName": "Devin Companion",
"description": "Local Devin CLI delegation: multi family consults, SWE implementation in owned worktrees, review, resumable history, background jobs, and setup health checks.",
"version": "0.0.85",
"version": "0.0.86",
"author": {
"name": "Harry Yep"
},
Expand All @@ -97,7 +97,7 @@
"source": "./plugins/agy",
"displayName": "Antigravity Companion",
"description": "Local Antigravity CLI delegation: Google family consults, large context reading, edit only implementation in owned worktrees, review, resumable history, background jobs, and setup health checks.",
"version": "0.0.85",
"version": "0.0.86",
"author": {
"name": "Harry Yep"
},
Expand All @@ -118,7 +118,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.85",
"version": "0.0.86",
"author": {
"name": "Harry Yep"
},
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# changelog

## 0.0.86

- a peer wrapper that hands its report back through `SubagentHandback` no longer gets a relay retry when SubagentStop runs before the handback reaches the wrapper transcript. the PostToolUse hook keeps the handback text on the worker record and SubagentStop uses it when the transcript has nothing yet, so the task completes with its job footer instead of staying `pending_async` with no peer job. the 0.0.85 smoke wave left the Antigravity probe uncollected this way on a host running auto mode (#113).
- a Devin run whose effort setting moves the model to another variant now records the variant Devin serves, so `muse-wonder` at `xhigh` reports `muse-wonder-1-0-xhigh` with no false `model_mismatch` (#114).
- the `/fusion:smoke` worker probe and the ultra skill name the `claude-fallback:` line the dispatch hook requires, so the smoke wave no longer burns a blocked dispatch before its worker probe (#115).
- the model table tests no longer read the host's real Devin model cache, which made two routing default tests fail once a Devin run had refreshed it.

## 0.0.85

- quota is now a routing input. the codex companion answers `quota --json` from the `rate_limits` in its rollout log, every shared companion answers the same contract, and session start plus the fleet report name any pool that is over pace. while Codex is over pace, quick and volume packages go to the breadth engine's prepaid `burst` pool before a second Codex worktree, and no rule picks a metered pool unless the user named it. one host had burned 79 percent of its Codex weekly window in two days while its Devin plan sat almost unused (72 jobs and 2.6M tokens in three weeks against 3291 Codex jobs).
Expand Down
2 changes: 1 addition & 1 deletion plugins/agy/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
"name": "agy",
"displayName": "Antigravity Companion",
"version": "0.0.85",
"version": "0.0.86",
"engines": {
"claude-code": ">=2.1.300"
},
Expand Down
2 changes: 1 addition & 1 deletion plugins/codex/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
"name": "codex",
"displayName": "Codex Companion",
"version": "0.0.85",
"version": "0.0.86",
"engines": {
"claude-code": ">=2.1.300"
},
Expand Down
2 changes: 1 addition & 1 deletion plugins/cursor/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
"name": "cursor",
"displayName": "Cursor Companion",
"version": "0.0.85",
"version": "0.0.86",
"engines": {
"claude-code": ">=2.1.300"
},
Expand Down
2 changes: 1 addition & 1 deletion plugins/devin/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
"name": "devin",
"displayName": "Devin Companion",
"version": "0.0.85",
"version": "0.0.86",
"engines": {
"claude-code": ">=2.1.300"
},
Expand Down
11 changes: 4 additions & 7 deletions plugins/devin/scripts/devin-companion.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -53,23 +53,20 @@ async function runJob({ record, source, dataDir, brief, signal, timeoutMs, exitG
const { homeDir } = ensurePrivateHome({ dataDir, realHome: realUserHome() });
buildJobConfig({ configDir: record.configDir, mode: record.mode, cwd: record.cwd, realHome: realUserHome(), homeDir, gitDirs: record.mode === "write" ? worktreeGitDirs(record.cwd) : {} });
const resolver = record.request?.model ? createSelectionResolver({ family: record.request.family, effort: record.request.effort }) : createSpeedResolver();
let selectedDisplayName = null;
let billingPool = record.billingPool;
const selection = (context) => {
const changes = resolver(context);
if (context.stage === "model" && changes[0]) {
selectedDisplayName = context.configOptions.find((item) => item.id === "model")?.options?.find((item) => item.value === changes[0].value)?.name ?? null;
if ([record.request.family.slug, ...record.request.family.aliases].some((name) => name.toLowerCase() === record.request.model.toLowerCase())) {
billingPool = billingPoolForModel({ families: [record.request.family] }, changes[0].value);
}
if (context.stage === "model" && changes[0]
&& [record.request.family.slug, ...record.request.family.aliases].some((name) => name.toLowerCase() === record.request.model.toLowerCase())) {
billingPool = billingPoolForModel({ families: [record.request.family] }, changes[0].value);
}
return changes;
};
const outcome = await runDevin({ bin: record.devinBuildPath, cwd: record.cwd, version: record.devinVersion,
env: buildDevinChildEnv({ homeDir, configDir: record.configDir, mode: record.mode }),
brief, mode: record.mode, resumeSessionId: source?.sessionId, resolveSelection: selection,
signal, timeoutMs, exitGraceMs, onSpawn: (child) => onProcess(child.pid), launchProcess });
return { ...outcome, effortApplied: resolver?.effortApplied ?? false, selectedDisplayName, billingPool };
return { ...outcome, effortApplied: resolver?.effortApplied ?? false, billingPool };
}

function outcomeFields(outcome) {
Expand Down
5 changes: 5 additions & 0 deletions plugins/devin/scripts/lib/devin-exec.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,11 @@ async function initializeSession(run) {
run.outcome.sessionId = sessionId;
run.configOptions = session.configOptions;
await configureSession(run);
const modelOption = run.configOptions?.find((option) => option?.id === "model");
if (modelOption?.currentValue && Object.hasOwn(run.outcome.appliedOptions, "model")) {
run.outcome.appliedOptions.model = modelOption.currentValue;
run.outcome.selectedDisplayName = modelOption.options?.find((option) => option?.value === modelOption.currentValue)?.name ?? null;
}
run.outcome.resolvedEffort = run.configOptions?.find((option) => option?.id === "thought_level")?.currentValue ?? null;
await requestDevin(run, "session/prompt", { sessionId: run.outcome.sessionId, prompt: [{ type: "text", text: brief ?? "" }] });
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/fusion/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
"name": "fusion",
"displayName": "Fusion Orchestrator",
"version": "0.0.85",
"version": "0.0.86",
"engines": {
"claude-code": ">=2.1.300"
},
Expand Down
3 changes: 2 additions & 1 deletion plugins/fusion/scripts/lib/lifecycle/subagents.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ function handleSubagentStop(input, env) {
let refreshed = refreshRecord(record, input, env);
const lastMessage = typeof input.last_assistant_message === "string" && input.last_assistant_message.trim() ? input.last_assistant_message : "";
const recoverHandback = !lastMessage || HANDBACK_PLACEHOLDER_PATTERN.test(lastMessage) || HANDBACK_ALREADY_DELIVERED_PATTERN.test(lastMessage) || !completedReport(refreshed, lastMessage) || refreshed.transcriptOffset !== record.transcriptOffset;
const report = recoverHandback ? finalReportFromTranscript(refreshed.transcriptPath) : null;
const transcriptReport = recoverHandback ? finalReportFromTranscript(refreshed.transcriptPath) : null;
const report = recoverHandback && !transcriptReport && refreshed.handbackReport ? { text: refreshed.handbackReport, handback: true } : transcriptReport;
const handedBack = report?.handback === true;
const stranded = recoverHandback && !handedBack && strandedHandbackFromTranscript(refreshed.transcriptPath);
const message = handedBack || (stranded && report?.text) ? report.text : [lastMessage, report?.text].find((text) => typeof text === "string" && text.trim() && !HANDBACK_PLACEHOLDER_PATTERN.test(text)) ?? "";
Expand Down
4 changes: 3 additions & 1 deletion plugins/fusion/scripts/lib/lifecycle/tools.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { reconcileTaskNotifications, taskNotificationTransition } from "./notifi
import { denyTool, hookOutput, writeOutput } from "./output.mjs";
import { activeSessionRecords, clearContinuationRequest, findSessionWorkerRecord, isAttributedTranscriptPath, parentTranscriptByteSize, recordForAgent, refreshRecord, sendMessageResumed, updateLifecycleWorkerRecord } from "./records.mjs";
import { canonicalToolResponseUsage } from "./usage.mjs";
import { CODEX_WRITE_SIZING_ADVISORY_BYTES, HANDBACK_PLACEHOLDER_PATTERN, READ_ONLY_TOOLS, SIZING_ADVISORY_BYTES, SUBAGENT_HANDBACK_TOOL } from "./constants.mjs";
import { CODEX_WRITE_SIZING_ADVISORY_BYTES, FINAL_TEXT_MAX_BYTES, HANDBACK_PLACEHOLDER_PATTERN, READ_ONLY_TOOLS, SIZING_ADVISORY_BYTES, SUBAGENT_HANDBACK_TOOL } from "./constants.mjs";

function handlePreToolUse(input, env) {
return withEngineHealthRecords(() => preToolUse(input, env));
Expand Down Expand Up @@ -424,6 +424,7 @@ function handlePostToolUse(input, env, failed = false) {
return;
}
const now = new Date().toISOString();
const handbackMessage = !failed && input.tool_name === SUBAGENT_HANDBACK_TOOL && typeof input.tool_input?.message === "string" && input.tool_input.message.trim() && !HANDBACK_PLACEHOLDER_PATTERN.test(input.tool_input.message) ? input.tool_input.message.slice(-FINAL_TEXT_MAX_BYTES) : null;
let emitTurnWindDown = false;
let emitTokenWindDown = false;
let emitUncachedWindDown = false;
Expand All @@ -447,6 +448,7 @@ function handlePostToolUse(input, env, failed = false) {
inFlightSince: undefined,
...(!failed ? { lastLivenessAt: now } : {}),
...(progress ? { lastProgressAt: now, progressEvents: (refreshed.progressEvents ?? 0) + 1 } : {}),
...(handbackMessage ? { handbackReport: handbackMessage } : {}),
...(emitTurnWindDown ? { windDownContextSentAt: now } : {}),
...(emitTokenWindDown ? { tokenWindDownSentAt: now } : {}),
...(emitUncachedWindDown ? { uncachedWindDownSentAt: now } : {})
Expand Down
1 change: 1 addition & 0 deletions plugins/fusion/scripts/lib/worker-state.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@ export function reopenWorkerContinuation(record, at = new Date().toISOString(),
collectedAt: null,
collectionMethod: null,
awaitingBackgroundCommand: undefined,
handbackReport: undefined,
outputFile: null,
transcriptPath: fusionWorker ? record.transcriptPath ?? null : null,
transcriptOffset: fusionWorker ? record.transcriptOffset ?? 0 : 0,
Expand Down
2 changes: 1 addition & 1 deletion plugins/fusion/skills/smoke/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Verify the update landed, then prove the dispatch chain end to end with five tin
- a `grok:grok-rescue` task whose direct prompt passes `--effort low --cwd "<absolute repository root>" --` followed by a brief whose header line is `grok-role: burst | effort low | read only | acceptance: exact marker line` and whose body asks for exactly the line FUSION-SMOKE-GROK-OK;
- an `agy:agy-rescue` task whose direct prompt passes `--cwd "<absolute repository root>" --` followed by a brief whose header line is `agy-role: independence | read only | acceptance: exact marker line` and whose body asks for exactly the line FUSION-SMOKE-AGY-OK;
- a selected `<breadth>:<breadth>-rescue` task whose direct prompt passes `--cwd "<absolute repository root>" --` followed by a brief whose header line is `<breadth>-role: diversity | acceptance: exact marker line` and whose body asks for exactly the line FUSION-SMOKE-CURSOR-OK or FUSION-SMOKE-DEVIN-OK, according to the selected breadth engine;
- a `fusion:trivial-worker` brief in the `fusion-brief: v1` envelope with `context-mode: isolated`, a goal of returning exactly the line FUSION-SMOKE-WORKER-OK, a scope of no file access, and an acceptance of the exact marker line.
- a `fusion:trivial-worker` brief in the `fusion-brief: v1` envelope with `context-mode: isolated` and `claude-fallback: claude-surface`, a goal of returning exactly the line FUSION-SMOKE-WORKER-OK, a scope of no file access, and an acceptance of the exact marker line.
3. Collect all five, then settle them in one `/fusion:stats` call carrying one `--record <id>=<verdict>` flag per probe: accepted only when the exact marker line came back, rejected otherwise.
4. Report one PASS or FAIL line per gate: version parity, codex dispatch and envelope, grok dispatch and sandbox handshake, agy dispatch and private Gemini directory, breadth dispatch and private home, worker dispatch and deliverable, settlement write. The codex, grok, agy, and breadth gates also require the lane default notice naming the filled model, and the breadth gate also requires the selected engine's isolation evidence: Cursor job records have `homeDir` under its `runs/` directory; Devin job records have `configDir` under its `runs/` directory and `devinVersion`. The agy gate requires `agyVersion`, `resolvedModel` from the Google family, `resolvedEffort`, `billingPool: subscription`, and private `gemini/agy/settings.json` and empty `gemini/config/mcp_config.json` under its data directory while keychain authentication uses the real `HOME`. A FAIL names the failing surface and advises holding real dispatches on that lane until repaired.

Expand Down
2 changes: 1 addition & 1 deletion plugins/fusion/skills/ultra/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Size gate first (cheap, in the main loop):

Compose one self contained brief per facet:

- Each brief states its facet's goal, the shared context needed to work it alone, the relevant paths, and what a good result must cover. Claude worker facets use the `fusion-brief: v1` isolated envelope. Implementation facets carry a verification command. Consult and research facets instead carry explicit coverage or acceptance criteria, with collection review as their verification. A facet brief never depends on another facet's output. Pass every brief directly as the Agent prompt; do not write transport files. Companion adapters own any private staging required by their transports.
- Each brief states its facet's goal, the shared context needed to work it alone, the relevant paths, and what a good result must cover. Claude worker facets use the `fusion-brief: v1` isolated envelope with the required `claude-fallback: <reason>` line. Implementation facets carry a verification command. Consult and research facets instead carry explicit coverage or acceptance criteria, with collection review as their verification. A facet brief never depends on another facet's output. Pass every brief directly as the Agent prompt; do not write transport files. Companion adapters own any private staging required by their transports.
- Every Grok facet brief begins with a single routing header line containing exactly one `grok-role: <role>` field, choosing one of `burst`, `independence`, `live-web`, or `large-context` from the facet's actual purpose. Do not include a second Grok role anywhere in that brief.
- Every Antigravity facet brief starts with `agy-role: independence`, `agy-role: large-context`, or `agy-role: burst`. Consult roles are read only; burst edits files only in an orchestrator owned worktree, with verification in the main session.
- Every breadth engine facet brief begins with a single routing header line containing exactly one `<breadth>-role: <role>` field: `diversity` for a read only consult that needs a model family no other lane carries, or `burst` for a bounded implementation facet in its own orchestrator owned worktree.
Expand Down
2 changes: 1 addition & 1 deletion plugins/grok/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
"name": "grok",
"displayName": "Grok Companion",
"version": "0.0.85",
"version": "0.0.86",
"engines": {
"claude-code": ">=2.1.300"
},
Expand Down
Loading
Loading