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
feat(runtime): surface INVALID_REQUEST on malformed envelopes (§12)
`WebSocketTransport.TryDeserialize` and the equivalent path in
`StdioTransport` previously swallowed `ArcpException`/`JsonException`
and returned null, so the misbehaving peer kept sending bad envelopes
with no feedback. Spec §12 explicitly defines `INVALID_REQUEST` as the
response.
Introduce an internal `arcp.invalid_envelope` sentinel envelope plus
the matching `InvalidEnvelopePayload` that transports yield on parse
failure. `SessionState.Dispatch` recognizes the sentinel and throws
`InvalidRequestException`, which the existing receiver-loop catch
converts into an outbound `session.error{INVALID_REQUEST}`. The
sentinel is never put on the wire.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments