feat: define Mango-native HTTP transport contract - #166
Merged
Conversation
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.
What changed
Authorization: Bearer <workspace-key>on protected Mango routes and stop accepting inboundx-api-keymango serve -strictplus Anthropic version/beta middlewarerequest-idresponse contractAnthropic-Worker-IDwith the optionalworker_idpolling query parameterCloses #165.
Verification
make verifymake docs-checkmake securitymake local-configmake image-smokegit diff --checkAPI impact and design provenance
This intentionally changes the pre-release
/v1transport contract in place. Clients must use bearer authentication; no compatibility alias,/v2, deprecation window, or strict-mode dual behavior is retained. Environment Work clients pass operational correlation asworker_id; it is not a credential.Claude Managed Agents documentation and public SDK behavior informed the former authentication, rollout, and worker header choices. Mango adopts standard bearer/content-type semantics and retains the sound generic request correlation shape, while rejecting provider rollout headers and provider-named worker correlation. The decision is recorded in
docs/provenance.md. Anthropic headers remain only in the outbound Messages adapter.Durability and security
No persistence, Session lifecycle, workflow, retry, or side-effect semantics change. Authentication still resolves exactly one Workspace before a protected handler runs. Content-type validation runs before request decoding, and request IDs remain available on error paths. There is no data migration; pre-release clients must update their request headers and Environment Work poll URL.
Checklist