fix(providers): install codex dual-mode adapter + provider-list corrections - #22
Merged
Merged
Conversation
…--dual ruflo init --dual aborts with 'The @claude-flow/codex package is not installed' when the dual-mode adapter (a separate npm global from the codex CLI) is missing. ak detected the codex CLI and ran dual-init but never installed the adapter, so setup/pick surfaced a bare 'ruflo init --dual failed' warning and ak sync never healed it. Treat @claude-flow/codex as a managed prerequisite of dual-mode: install it before dual-init, guarded so it only runs when the codex host is opted-in AND the codex CLI is actually detected. Absent CLI or already-installed adapter are no-ops. Decision logic factored into pure codexAdapterAction() for hermetic tests.
… docs The aqe provider list mixes subscription, local, and metered-API providers with no visual cue which is which — the costly-if-wrong ambiguity being claude-code ($0 subscription) vs claude (metered key). Add one shared AQE_BILLING_HINT line to the interactive prompt, status output, and per-command help, and a docs paragraph explaining why claude-code is the only subscription option (codex/gemini OAuth live on the host axis, not as aqe provider types). Grounded in agentic-qe ALL_PROVIDER_TYPES + codex login modes.
aqe's ALL_PROVIDER_TYPES (dist/shared/llm/router/types.js) exposes 10 provider types including onnx (a local, $0 on-device runtime, default model phi-4), but ak listed only 9 — so ak wrongly rejected --aqe-provider onnx as unknown even though aqe accepts it. Add onnx, fold it into the local ($0) billing category alongside ollama across help/status/docs/README, and add a drift-guard test pinning AQE_PROVIDER_TYPES to aqe's set.
Adds a full static-quality toolchain (devDependencies only — the published package stays zero-runtime-dependency) plus scripts and CI wiring: package.json scripts: typecheck (tsc --checkJs + @types/node), lint / lint:fix (eslint flat config), lint:md / lint:md:fix (markdownlint-cli2), lint:links (+ :internal offline variant, lychee), build (packaging + load validation), audit / audit:fix, outdated / upgrade (pnpm), and an umbrella 'check'. Configs scope every linter to OUR code: eslint/markdownlint/lychee all ignore vendored ruflo/aqe trees (.claude, .agentic-qe, .agents) and docs/archive. The emitted statusline template keeps its var/ANSI idioms via a narrow eslint override; MD060 (cosmetic table-pipe alignment) disabled. CI (ci.yml): existing zero-install test matrix (3 OS x 3 node) unchanged; new 'quality' job (typecheck/lint/lint:md/build/audit, the only job that installs devDeps) and internal 'links' job (offline, deterministic). External link checking moved to nightly (network + rate-limits make it flaky per-PR). Fixes surfaced by the new gates: - selfDrift(): JSDoc @PARAM documenting the pkgRoot option (3 tsc errors) - bin command table: @type annotation for the porcelain/plumbing union - setup.mjs let->const, heal.mjs drop unused assignment (eslint) - PROVIDERS.md code-fence languages + table reflow (markdownlint) All gates green locally: typecheck, eslint, markdownlint, build (27 files), 66+20 tests, links (20 OK), audit (0 vulns).
…t dupes ruflo init --dual writes codex-side artifacts. Mirror the existing claude convention (.claude/ ignored, CLAUDE.md tracked): ignore the generated .agents/ dir and .codex/ local overrides under the dogfooding-artifacts section. Also remove the redundant lines dual-init auto-appended (.claude-flow/data|logs are covered by .claude-flow/; .env/.env.local/.env.*.local by .env + .env.*).
ruflo init --dual generated a 172-line AGENTS.md of stock boilerplate with facts that are false for this repo (TypeScript/DDD tech stack, npm run build/dev scripts that don't exist, a Co-Authored-By trailer that violates the project rule, swarm numbers contradicting CLAUDE.md). Replace it with a short, accurate file mirroring CLAUDE.md: correct swarm config, real pnpm commands, the no-trailer rule, and a pointer to machine-wide guidance. Codex reads AGENTS.md the way Claude Code reads CLAUDE.md. Add it to the markdownlint globs + link-check inputs; it stays out of the published tarball (dev-facing, like CLAUDE.md).
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.
Summary
Started as a fix for the
ruflo init --dual failedwarning fromak x provider pick, and grew into a cleanup of codex dual-mode support plus a full static-quality CI pipeline. Every provider/tooling claim is grounded in the installed ruflo/agentic-qe source, not assumptions. The published package stays zero-runtime-dependency throughout — all new tooling is devDependencies + CI only.Commits & deliverables
ff9fd98@claude-flow/codexbeforeruflo init --dual. Dual-init aborts when the adapter (a separate npm global from the codex CLI) is missing. Now treated as a managed prerequisite, installed only when codex is opted-in inkit.jsonAND the codex CLI is detected. Decision logic in a purecodexAdapterAction()for hermetic tests.a2e5692status, and--helpvia one sharedAQE_BILLING_HINT, plus aPROVIDERS.mdparagraph. Explains whyclaude-codeis the only subscription option (codex/gemini OAuth live on the host axis, not as aqe provider types).1267a02onnxprovider type. aqe'sALL_PROVIDER_TYPEShas 10 entries incl.onnx(local, $0);aklisted 9 and wrongly rejected--aqe-provider onnx. Added, folded into the local billing category, with a drift-guard test.7101bbdc47713a.gitignoreconsistency for codex. Ignore the generated.agents/dir +.codex/overrides (mirroring.claude/); drop the redundant linesruflo init --dualauto-appended.5916f22AGENTS.md. The generated 172-line boilerplate had false facts (TypeScript/DDD, nonexistent scripts, aCo-Authored-Bytrailer violating the project rule, swarm numbers contradicting CLAUDE.md). Replaced with a short mirror of CLAUDE.md; kept out of the published tarball.CI + tooling detail (
7101bbd)Scripts (
package.json):typecheck(tsc--checkJs+@types/node),lint/lint:fix(eslint flat),lint:md/lint:md:fix(markdownlint-cli2),lint:links(+ offline:internal, lychee),build(packaging + CLI-load validation),audit/audit:fix,outdated/upgrade(pnpm, compatible), and an umbrellacheck.Scoped ignores — eslint / markdownlint / lychee all skip vendored ruflo/aqe trees (
.claude,.agentic-qe,.agents) anddocs/archive; the emitted statusline template keeps itsvar/ANSI idioms via a narrow eslint override.Where each gate runs:
ci.yml)nightly.yml)qualityjob)linksjob)Bugs the new gates caught & fixed: an undocumented
pkgRootoption (selfDriftJSDoc, 3 tsc errors), a bin command-table type gap, alet→const, a dead assignment inheal.mjs, and untagged code fences inPROVIDERS.md.Test plan
pnpm run check(typecheck + lint + md + build + test): greenpnpm audit: 0 vulnerabilities;pnpm outdated: all currentquality,links)Grounding
ENABLE_CODEX/ dual-mode) +@claude-flow/codexadapter error pathALL_PROVIDER_TYPES(dist/shared/llm/router/types.js),onnxlocal classification (config-store.js,interfaces.d.ts), ADR-123 billing modescodex login/codex login --with-api-key(subscription vs key — host axis, not an aqe provider type)🤖 Generated with Claude Code