feat(brolga): point the client at Brolga's shipped API - #102
Conversation
Brolga's HTTP API now exists and serves the context pack this client was written against. It versions routes in the path under `/api/v1`, not `/v1`, so the two path constants move. `normaliseBaseUrl` reduces the configured URL to an origin on purpose, so the prefix belongs here rather than in the base URL. Verified against a real instance: health 200, a context lookup for an ingested address returning `disposition: "malicious"` with a source object to cite, and an unauthenticated request refused with 401. Driven through `safeFetch`, not bare `fetch`, so the SSRF guard and DNS pinning are on the tested path. Two notes for whoever deploys this: - A self-hosted Brolga on a tailnet or LAN resolves to a non-public address and the outbound guard blocks it. `KELPIE_ALLOW_PRIVATE_NETWORKS` must be the literal string "true" — "1" silently does nothing. Documented in .env.example. - Brolga serves detail level L1 and reports the level it actually served, with the shortfall in `exclusions`. A pack never claims more depth than it has. `disposition: "unknown"` means Brolga has not heard of the subject. It is not benign and must not be rendered as one. `scripts/live-brolga-check.ts` is deliberately not wired into npm test: it needs a reachable instance and a token, which CI has neither of. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 35 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
Comment |
The comment said Brolga's HTTP API was planned and that calls report "unavailable" until then. It ships, and they do not. Also records that KELPIE_ALLOW_PRIVATE_NETWORKS must be the literal "true": "1" leaves the guard on and the call fails with a message about a non-public address, which reads like a network fault rather than a config one. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The repo's tsconfig does not set allowImportingTsExtensions, so the .ts suffixes failed the typecheck job even though tsx ran the script fine. Uses @/lib/brolga like the other scripts do. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Brolga's HTTP API now exists and serves the context pack this client was written against.
The change
Brolga versions its routes in the path under
/api/v1, not/v1.normaliseBaseUrlreduces the configured URL to an origin on purpose ("path stripped so we control /v1/…"), so the full prefix belongs in the path constants, not in the base URL.That is the whole functional change. The consumer contract in
src/lib/brolga/types.tswas written well and needed no reshaping — Brolga's pack fillsdisposition,entities,claims,relationships,evidence,gaps,exclusions, andbudgetas the types already expected.Verified against a real instance
Not mocked — a Brolga container on the homelab, reached over Tailscale, through
safeFetchso the SSRF guard and DNS pinning are on the tested path:Two deployment notes
The SSRF guard blocks a self-hosted Brolga. A tailnet or LAN address is non-public, so
assertSafeOutboundUrlrejects it.KELPIE_ALLOW_PRIVATE_NETWORKSmust be the literal string"true"—"1"silently does nothing, which cost me a debugging cycle. Now documented in.env.example.disposition: "unknown"is not benign. It means Brolga has not heard of the subject. Rendering it as benign would close alerts that should be raised. Noted in the types.Scope
scripts/live-brolga-check.tsis deliberately not wired intonpm test: it needs a reachable instance and a token, which CI has neither of.npm run test:brolga-contractstill passes and stays the no-network check.🤖 Generated with Claude Code