Category: spec-conformance Severity: major
Location: src/arcp/_messages/event_bodies.py:18-48
Spec: ARCP v1.1 §8.2
What
Spec §8.2 defines the wire body shapes as tool_call { tool, args, call_id }, tool_result { call_id, result | error }, artifact_ref { uri, content_type, byte_size?, sha256? }, metric { name, value, unit?, dimensions? }. The SDK's declared bodies use name/arguments/tool_call_id, output, media_type/size_bytes/artifact_id, and attributes instead — every field name differs from the normative table. SDK consumers building events from these shapes produce envelopes that do not match §8.2 and will not interoperate with spec-conformant peers.
Evidence
class ToolCallBody(TypedDict, total=False):
tool_call_id: str
name: str
arguments: dict[str, Any]
class ToolResultBody(TypedDict, total=False):
tool_call_id: str
output: Any
error: dict[str, Any]
...
class ArtifactRefBody(TypedDict, total=False):
artifact_id: str
media_type: str
size_bytes: int
uri: str
summary: str
Proposed fix
Rename the TypedDict fields to match §8.2 exactly (tool, args, call_id; result; content_type, byte_size, sha256; dimensions), or amend the spec if the SDK shapes are authoritative. Pick one source of truth and align.
Acceptance criteria
Category: spec-conformance Severity: major
Location:
src/arcp/_messages/event_bodies.py:18-48Spec: ARCP v1.1 §8.2
What
Spec §8.2 defines the wire body shapes as tool_call
{ tool, args, call_id }, tool_result{ call_id, result | error }, artifact_ref{ uri, content_type, byte_size?, sha256? }, metric{ name, value, unit?, dimensions? }. The SDK's declared bodies usename/arguments/tool_call_id,output,media_type/size_bytes/artifact_id, andattributesinstead — every field name differs from the normative table. SDK consumers building events from these shapes produce envelopes that do not match §8.2 and will not interoperate with spec-conformant peers.Evidence
Proposed fix
Rename the TypedDict fields to match §8.2 exactly (
tool,args,call_id;result;content_type,byte_size,sha256;dimensions), or amend the spec if the SDK shapes are authoritative. Pick one source of truth and align.Acceptance criteria
event_bodies.pymatch the §8.2 table (or the spec is amended); a round-trip test validates a §8.2 example body without renaming.