You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(mcp): preserve POST across gateway redirect + unwrap MCP envelope (#19) (#20)
* fix(mcp): preserve POST across gateway redirect + unwrap MCP envelope
QA #18 surfaced a P0: the default host https://askpraxis.ai 301-redirects
to www, and Go's default http.Client downgrades the invoke POST->GET and
drops the body on a 301, so every MCP invoke hits a body-less GET that
404s and is misreported as "unknown mcp/fn" — a fresh install can't call
any MCP function.
- callMCP: custom CheckRedirect preserves method, body, and Authorization
across redirects (fixes invokes against any redirecting host, including
already-stored stale URLs).
- credentials.DefaultURL: default to the canonical https://www.askpraxis.ai
so fresh logins don't redirect at all.
- mcp pretty output: new prettyMCPOutput unwraps single-text
{content:[{type:text,text}]} envelopes for human output (E3); --json
output is unchanged.
Tests (TDD, watched each fail first): TestCallMCP_PreservesPOSTAcrossRedirect,
TestDefaultURL_IsCanonicalHost, TestPrettyMCPOutput_*. go test -race + vet +
gofmt clean.
Refs #19.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(login): persist the canonical post-redirect host (#19)
fetchAuthMe already follows the apex → www 301; capture the URL it
landed on and store that, so neither fresh logins nor stale stored
profiles force every later MCP invoke through the redirect. Reuse
logins self-heal an apex URL already in the store.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* fix(mcp): forward Authorization only to same-domain redirect targets (#19)
The CheckRedirect that preserves POST + body across the gateway's 301
cloned all headers unconditionally, so a redirect to a foreign host
would carry the bearer token with it. Mirror net/http's own
sensitive-header rule: forward Authorization only when the target is
the original host or a subdomain of it (apex → www stays covered).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* docs(readme): raptor surface is read-write, RBAC enforced server-side (#19)
Corrects the read-only framing from the #18 QA brief per the decision
recorded in #19-B.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: nachiket0310 <nachiket.warhade@facets.cloud>
Co-authored-by: Anuj Hydrabadi <129152617+anujhydrabadi@users.noreply.github.com>
0 commit comments