type: reference title: "Studio AI proxy event casing" description: "The signed stop-reason spelling, SSE event discriminants, and bounded aliases in the Studio agent contract." resource: "https://www.npmjs.com/package/@honua/sdk-js"
Studio AI proxy event casing
@honua/sdk-js/studio-agent preserves the server's stop-reason spelling. The
public StudioAiStopReason type accepts these established values:
| Meaning | Honua server value | Existing SDK alias |
|---|---|---|
| Normal turn completion | EndTurn |
endTurn |
| Tool call | ToolCall |
toolCall |
| Token limit | MaxTokens |
maxTokens |
| Content filtering | ContentFilter |
contentFilter |
| Cancellation | Cancelled |
cancelled |
| Failure | Error |
error |
The server's JSON property naming policy makes object keys camelCase, such as
stopReason. Its string enum converter preserves enum identifiers, such as
EndTurn. These are separate rules. The
server JSON context
and enum definitions
define that wire format.
SseChatTransport obtains the SDK's camelCase event type from the separate
snake_case SSE event name: event: message_stop becomes type: "messageStop".
It leaves stopReason and other payload values unchanged.
Signed transcripts bind the original provider-event values. Do not lowercase or rewrite an event before verification. A consumer may compare known aliases without mutating the received payload:
import type { StudioAiChatEvent } from "@honua/sdk-js/studio-agent";
function endedNormally(event: StudioAiChatEvent): boolean {
return event.stopReason === "EndTurn" || event.stopReason === "endTurn";
}
A recognized value is not proof of successful completion or authorization to
execute tools. Token limits, filtering, cancellation, and errors retain their
separate meanings; signed action rounds still require transcript verification
and replay protection. Changing signed ToolCall to toolCall is a transcript
mismatch even though both spellings belong to the public type.