feat(agent-bff): scaffold the agent-bff package#1710
Open
Tonours wants to merge 4 commits into
Open
Conversation
4 new issues
|
|
Coverage Impact ⬇️ Merging this pull request will decrease total coverage on Modified Files with Diff Coverage (8)
🛟 Help
|
4fe0022 to
8172dd2
Compare
8172dd2 to
ba43de2
Compare
0487298 to
cb558bb
Compare
cb558bb to
b0f5aa7
Compare
4 tasks
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.

fixes PRD-647
Forest BFF Slice 0: the
@forestadmin/agent-bffpackage skeleton. Bootable, nothing more. The Zod→OpenAPI spike (PRD-648) and the OAuth trace (PRD-649) build on it.What it does
forest-bffbin, modeled onworkflow-executor.GET /health+X-Forest-Bff-Versionheader (version read frompackage.json).*_URL, non-integerHTTP_PORT) → fail-fast, clear exit, never echoes the value;degradedvia/health503.Env vars (named here so PRD-648/649 reuse them):
FOREST_AUTH_SECRET,FOREST_ENV_SECRET,FOREST_SERVER_URL,FOREST_APP_URL,AGENT_URL,HTTP_PORT(default3450).Security
/healthis unauthenticated, so its body is{ status, version }only — it never says which config key is present or missing (that would leak the internal config surface). Missing keys are surfaced to operators via a single startupWarnlog. Secrets are kept verbatim (not trimmed), so a secret with surrounding spaces isn't silently altered.What does NOT change
No auth, no data endpoints, no OpenAPI (later slices). The agent-client call path is not wired — only its URL is read. No other package touched, no
yarn.lockchurn.How to test
Boot it and hit
/health:FOREST_AUTH_SECRET=x FOREST_ENV_SECRET=x FOREST_SERVER_URL=https://a.com \ FOREST_APP_URL=https://b.com AGENT_URL=https://c.com node packages/agent-bff/dist/cli.js curl -i localhost:3450/health # 200 { status, version }, X-Forest-Bff-Version header, port 3450FOREST_SERVER_URL) → boots,/health503degraded, missing key logged at startup (not in the response).AGENT_URL=nope) → exit 1, sanitized message, secret never echoed.Definition of Done
General
Security