Add CI workflow and hermes-agent integration recipe#2
Conversation
Introduce a minimal GitHub Actions workflow that runs the existing test suite and TypeScript build on every push and pull request, so regressions to the rewriter or proxy paths surface automatically. Also document how to route hermes-agent-spawned Claude Code sessions through cc-gateway, since downstream sibling projects (hermes-agent, claw-orchestrator) need a stable integration story for the alpha.
Move the npm ci comment to the line above the step name so the YAML parser does not see a sibling key at an unexpected indent level.
Second-eye adversarial review (independent of authoring session)Fresh-eyes review for Codex. New challenges beyond the 5-item self-authored checklist. New substantive challenges
Cross-PR consistency
Suggested Codex priority order
— Posted by Claude Code (independent review session). No code or merge changes. Generated by Claude Code |
Summary
Two small, independent improvements that unblock downstream work on this fork:
.github/workflows/ci.yml— runsnpm ci,npm run build, andnpm teston every push tomainand every PR, across Node 22.x and 24.x. The repo already has a green 16-test suite (tests/rewriter.test.ts) but no automation was running it; a regression in the rewriter would only surface on a human's laptop.docs/integrations/hermes-agent.md— documents how to route Claude Code sessions that hermes-agent spawns through cc-gateway, so AIBC sibling repos (hermes-agent, claw-orchestrator) have a stable integration story. Pure docs.What and why
.github/workflows/ci.ymlis the lowest-risk way to harden the alpha. Matrix covers Node 22 (the minimum perpackage.jsonengines posture) and 24 (whatconfig.example.yamladvertises as the canonicalnode_version).ANTHROPIC_BASE_URL,ANTHROPIC_API_KEYpointing at a gateway client token), shows two integration styles (PATH wrapper and explicit hermes config block), and includes a troubleshooting table sourced from the actual error strings insrc/proxy.ts(401 Unauthorized - provide client token via x-api-key header,503 OAuth token not available - gateway is refreshing,502 Bad gateway).Risks
npm ciornpm testfails in clean Ubuntu (e.g., a missing dev dependency or a test that reads a host-specific path), the first PR run will go red. That is the point of adding CI, but it does mean this PR's own check could fail and need a follow-up. The risk is bounded to "CI surfaces an existing latent bug"; nothing is deleted or rewritten./_health,/_verify) and error strings that I verified againstsrc/proxy.tsat5b6f727. The exact hermes-agent config key (claude_code.env) is marked as version-dependent — this is honest given hermes's launcher API is still in flux.motiful/cc-gatewaycurrently uses. Future upstream CI (if added) would land at the same path; resolution is a trivial accept-theirs or merge-both.Test plan
scripts/add-client.shto confirm the token-minting command is current.Codex adversarial review checklist
name: CIworkflow only triggers on pushes tomainand PRs targetingmain. If this fork later adopts adevelopor release branch, will the matrix silently stop covering them? Should this usebranches: ['**']for push events, or is the current scoping intentional?NODE_TLS_REJECT_UNAUTHORIZED=0as a workaround for self-signed gateway certs on private networks. Given cc-gateway is explicitly a privacy tool, is normalizing this env var in an official doc inviting users to footgun themselves? Should it be removed and replaced with "add the gateway CA to the hermes host trust store" only?22.xand24.x.package.jsondoes not pin anengines.nodefield. If a user is on Node 20 LTS, the test job won't catch syntax/API regressions for them. Is the right move to (a) addengines.node: ">=22", (b) widen the matrix to include 20.x, or (c) leave as-is because the README already says "Node 22+"?/_verifyto confirm rewriting works. That endpoint exposes a synthetic before/after of the rewriter against a fake payload — it does not exercise the real hermes payload. Is a recipe that ends at/_verifygiving operators false confidence?actions/setup-node's built-incache: npm. For a repo this small that's fine, but iftsx-driven test invocation gets slow, should we layer inactions/cachekeyed ontsconfig.jsonfor the tsx transform cache?Generated by Claude Code