Repository navigation
feat: add generated TypeScript client surface - #16
Conversation
🤖 Automated Review PanelReviewer A — GPT-5.6 (OpenAI Codex)Verdict: APPROVE No S0–S3 findings in the final reviewed artifact. The review confirmed:
Reviewer B — Gemini 3 Flash (OpenRouter)Verdict: APPROVE No major findings. The review confirmed the zero-runtime-dependency fetch design, explicit surface/location mapping, deterministic generated artifacts, collision protection, documented numeric precision boundary, strict TypeScript consumer fixture, and SSE safety. The only minor observations were addressed in the final tree: generation validation now has a structured CLI preflight, and the TypeScript example pins Both reviewers inspected the task goal, Hydra conventions, source diff, generated TypeScript artifact, Iris fixture, and CI/config changes. Reviewers ran no commands and made no file changes. |
Auto-Merge GateConfidence: 0.84 Rationale: COD-515 has a clear, implemented goal: generate a deterministic, zero-runtime-dependency TypeScript fetch client from Hydra's explicit API definition. The diff adds the fourth surface, validates generated-identifier collisions and SSE exclusion, commits generated artifacts, documents the wire/precision boundary, and includes strict TypeScript consumer coverage plus a local Iris acceptance fixture. The linked Linear issue contains no manual-review or do-not-merge instruction, and the existing dual-model review panel found no unresolved correctness issue. Checks observed: Scope limits: This merge delivers Hydra's generator and checked-in fixture only. It does not publish or wire an Iris consumer SDK; that remains COD-516. |
Summary
Implements COD-515's fourth Hydra surface: a deterministic, zero-runtime-dependency TypeScript client generated from the same explicit API definition as CLI/HTTP/MCP.
Surface::TsClientandgenerated/ts-client/index.tsfreshness checking.ApiErrorresponses, numeric precision documentation, and collision validation.examples/ts-clientwith strict TypeScript checking and a real acceptance script.tsc --noEmitcoverage for the TypeScript example.Review / verification
cargo build --all-targetscargo test --all-targets— 58 codegen tests, 14 Notes surface tests, 6 Security Scan tests, all passingcargo clippy --all-targets -- -D warningscargo fmt --all -- --checkcreed diffcargo run -p hydra-codegen --bin hydra-codegen -- checkinexamples/notesandexamples/security-scannpm ci --ignore-scripts --no-audit --no-fundinexamples/ts-clientnpm run typecheck,npm run build, andnpm run check:generatedinexamples/ts-clientIRIS_URL=http://127.0.0.1:19876 npm run acceptancereturned{"health":{"status":"ok"},"threadCount":1}; the local server was stopped after the check.The generated Iris fixture is a checked-in snapshot; COD-516 is the follow-up consumer wiring/publication ticket.
Closes COD-515.