SpecBridge v0.6.0: capability-driven runner platform, Codex CLI and Ollama runners#6
Merged
Merged
Conversation
…llama runners
Add the capability-driven runner platform with a frozen adapter contract:
versioned capability/operation/event/result/error/usage schemas (17
capability keys, 6 operations, 24 error codes, snapshot-tested), runner
categories and support levels, and a profile-based registry with
deterministic capability-checked selection that refuses incompatible
operations before any process spawn, HTTP request, run record, or file
change.
Configuration gains a v2 multi-runner schema (runnerProfiles,
operationDefaults, runnerPolicy, fallbacks) with URL/command/credential
safety rules. v1 files stay fully readable through a version-transparent
reader; migration is explicit only ("config doctor",
"config migrate --dry-run|--apply") — atomic, backed up, validated, Claude
behavior preserved, new providers left disabled, trusted verification
commands untouched.
New production adapters:
- codex-cli: read-only probes (never a model request, never credential
files), JSONL event normalization with reasoning redaction, JSON Schema
structured output, read-only sandbox for authoring, workspace-write for
task execution (unrestricted modes rejected at three layers),
explicit-session resume, full failure classification.
- ollama: authoring-only model API (loopback default, HTTPS-by-default for
remote, redirects refused), model listing without inference,
schema-validated structured output with ONE bounded correction retry,
input/output limits, thinking-content redaction; task execution refused
by capability.
The existing Claude Code runner implements the shared contract unchanged
(same process safety, permission modes, resume, prompts, configuration
semantics). Authoring supports explicitly configured bounded fallback
chains with append-only per-invocation attempt records
(.specbridge/runs/<id>/attempts/); task execution never retries or
switches providers. A reusable conformance framework
(detection/structured-output/process-control/authoring/task/resume, chosen
by declared capabilities) backs every production claim; mock, claude-code
(fake), and codex-cli (fake) pass all applicable groups, ollama passes the
authoring groups only.
CLI: runner list/matrix/show/doctor/test/conformance/models,
config doctor/migrate, --show-runner-plan, runner plans in dry runs.
Provider claims remain informational; Git snapshots and trusted
verification stay the only completion authority.
Tests: 772 total (60 files) including a process-level fake Codex CLI and a
real loopback fake Ollama HTTP server; no real providers, network, models,
or credentials in CI. All v0.1-v0.5 suites pass unchanged; lint,
typecheck, build, plugin build/validate, and isolated plugin verification
pass; versions consistently 0.6.0. Gemini CLI, OpenAI-compatible,
Antigravity, MCP runner tools, and the runner Skill are deferred to v0.6.1
(documented, not stubbed).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
v0.6.0 turns the single-runner v0.3 architecture into a capability-driven multi-runner platform while preserving every v0.1–v0.5 guarantee, and ships two new production adapters.
Runner platform (frozen contract)
@specbridge/runners: 17 capability keys, 4 categories, 5 support levels, 6 operations with per-operation capability requirements (task execution additionally requires a safe boundary:sandboxOR the documentedtoolRestrictionequivalent), 17 normalized event types, 13 normalized outcomes, 24 normalized error codes, normalized usage/cost (cost is never computed from hardcoded pricing; local Ollama reportsunavailable, not zero).docs/runner-adapter-contract.md) and guarded by snapshot tests, including a minimal-adapter test proving a new provider registers without touching core orchestration. Core never branches on provider names.claude-code,codex-default,ollama-local,mock) with deterministic selection (explicit--runner→ operation default → global default). Incompatible selections are refused before any process spawn, HTTP request, run record, or file change, listing missing capabilities and compatible configured profiles. Network-backed endpoints are never selected implicitly. The v0.3unsupportedstubs are gone; deferred providers are documentation-only.Configuration v2 + explicit migration
2.0.0:runnerProfiles,operationDefaults,runnerPolicy,fallbacks; argv-array commands only, credential-looking keys rejected, base-URL safety (loopback default, HTTPS-by-default remote, no embedded credentials, no file/ftp), unrestricted Codex modes rejected anywhere in the file.specbridge config doctor(read-only) andconfig migrate --dry-run|--apply(atomic,config.v1.backup.json, validated, rollback on failure). Migration preserves Claude behavior and trusted verification commands, adds Codex/Ollama disabled, and never creates credentials.Codex CLI runner (production)
--version,--help,exec --help,login status) — never a model request, never credential files; capability tokens, not one help layout; honest downgrades (e.g. no workspace-write → authoring preserved, execution incompatible).--sandbox read-only; task execution under--sandbox workspace-write(config can narrow, never broaden).danger-full-access,--dangerously-bypass-approvals-and-sandbox,--yolo,--skip-git-repo-checkare rejected at three layers (config schema, argv builder, pre-spawn assertion). Prompts travel via stdin; JSONL events are normalized with reasoning content redacted; resume uses the explicit recorded session id only..kiro/protected-path writes keep the task unverified and are never rolled back.Ollama runner (production, authoring-only)
thinkingcontent redacted from all artifacts. No repository access exists;spec run --runner ollama-localis refused before any request. Models are never pulled or auto-selected.Shared orchestration
.specbridge/runs/<id>/attempts/) with capability snapshots, boundaries, normalized results, and fallback lineage; explicitly configured authoring fallback chains with bounded retries and hard stop conditions (auth/permission/config/cancellation/quota/repository-modified).specbridge runner conformance <profile> [--network]runs it against throwaway fixture workspaces.Verification
pnpm lintpnpm typecheckpnpm testpnpm buildpnpm build:plugin/validate:plugin/verify:plugin-bundlepnpm smoke(built CLI).kirowrite, claims-not-evidence, explicit-session resume).runner list/doctoroutput tests, and two matching lines inscripts/smoke.mjs.Reviewer notes
tests/fixtures/fake-codex/fake-codex.mjs) and the fake Ollama server is a real loopback HTTP server (tests/helpers-fake-ollama.ts) — adapters are never mocked internally.packages/runners/src/contracts/+docs/runner-adapter-contract.mdare the frozen surface for v0.6.1; changing discriminator values there should failtests/runners/contracts.test.tsby design.dist/artifacts (cli.cjs, mcp-server.cjs, checksums) are rebuilt at 0.6.0, as this repo intentionally commits the self-contained bundle./specbridge:runnersSkill. Deferred to v0.7: templates, plugin/runner/analyzer/verifier SDKs, extension registry.🤖 Generated with Claude Code