feat: support 2026-09-01 gateway API - #378
Conversation
|
Claude-assisted review - I ran Checklist so we can track what gets picked up. Tick as they land, or push back on any of them. Edited after posting: the Blocking
Worth fixing
Tests
Not blocking
Open question on namingNot blocking, and I may be missing context from the API side. Verified while reviewing: I can put the non-blocking fixes and the test gaps into a PR against this branch if that's easier than folding them in yourself. |
|
Follow-up PR with the fixes from the review above: #379 (targets this branch, so merge / cherry-pick / close as you prefer). Covers everything on the checklist except the
Left alone: the 99 hardcoded version literals in tests, and the CLI-destination delivery-policy validation - both judgement calls that are yours rather than mine. |
core `origin/staging` now names the field `type` on GET /projects and
`team_type` on the CLI auth endpoints, with the same event_gateway | console |
outpost values. The CLI followed the wire rename and the internal vocabulary
with it, so it speaks the same word as the API it calls.
That word was already taken. The CLI used ProjectType for the display label -
"Gateway", "Console", "Outpost" - so the two meanings had to be separated:
ProjectType event_gateway | console | outpost what the API calls type
TypeLabel() Gateway | Console | Outpost derived at print time
The label is presentation and is no longer stored. project_type on disk now
holds the API value, project_product is gone entirely (it only ever existed on
this unreleased branch, so nothing has written it), and project_mode is still
written for older CLIs reading the same file.
NormalizeProjectType is the single door every value goes through. It accepts an
API type, a display label written by an older CLI, or a legacy mode, and returns
the API type - so the three vocabularies converge in one place instead of at
each call site.
The auth structs read team_type, then team_product, then team_mode. Prod
currently serves team_product while staging serves team_type, so without that
chain a CLI shipping ahead of the deploy would blank the project type and fail
every gateway command. Verified against prod, which still serves the old field:
whoami resolves Gateway from a config stripped of all type information.
Two things deliberately unchanged, both user-facing: `--output json` still emits
gateway | outpost | console, and the `--type` filter still accepts them. The
API type is not used there - changing it would break anyone parsing that output.
Tests caught two regressions worth naming: the gateway error message printed the
wire value ("current project type is outpost") instead of the label the user was
shown, and saving local config dropped an unrecognized mode instead of carrying
it through. Both fixed.
Refs #378
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BnrKWZQASV7bFJ4oGWwmo9
Summary
2026-09-01mode/team_modehandling withproduct/team_product, while retaining local config compatibilityconfig.delivery_policyand add delivery-group flags for standalone and inline destinationsTesting
env -u GOMODCACHE go test ./...env -u GOMODCACHE go run ./tools/generate-reference --checkCredentialed destination and connection acceptance tests were not run because
HOOKDECK_CLI_TESTING_API_KEYis not configured in this environment.