Skip to main content

ya-agent-stream-protocol

Shared stream protocol adapters between ya-agent-sdk and applications.

The Python import package is ya_agent_stream_protocol.

Compact AGUI replay drops redundant text/reasoning and tool-end scaffolding, but retains TOOL_CALL_START as an observed execution fact. A run interrupted before its first tool argument chunk must still be able to reconstruct the visible invocation.

The package owns the shared protocol boundary between ya-agent-sdk and applications:

  • AGUI event adaptation
  • compact replay buffers
  • message artifact validation
  • SSE framing helpers

YAACLI, YA Claw, and future applications configure their own event namespaces through AguiAdapterConfig instead of embedding application-specific names in this package.

SDK lifecycle projections use canonical snake-case names such as ya_agent.subagent_start, ya_agent.subagent_complete, and ya_agent.model_request_complete. The adapter is also a fail-closed public-data boundary: only explicitly allowlisted lifecycle DTOs are emitted, and unknown or future SDK events are dropped rather than generically serialized. Subagent projections omit parent logical-run IDs, native enqueue projections expose only a message count, model-request projections omit internal event/run IDs, file changes omit replacement content, and execution start/resume events omit prompt and deferred-result content. Full injected messages, durable input/enqueue identities, idempotency keys, raw lifecycle event IDs/timestamps, resumable state, and other host-owned data must remain outside AGUI replay and SSE.

Tool display identity

Provider toolCallId values remain unchanged. Adapted tool start/chunk/end/result events carry a separate toolCallKey, scoped to the display run and invocation. The adapter retains that key across deferred-result segments and allocates a new key when another invocation starts, even if an agent reuses a provider ID. Result messageId derives from this display key. Replay, rendering, and argument budgets use toolCallKey; older stored events without it retain their original ID-based behavior.

Native ToolReturnPart outcomes (success, failed, denied, interrupted, and retried) are carried as an outcome extension on TOOL_CALL_RESULT, including compact replay. A result event closes a call; it does not by itself imply success. Tool-less RetryFeedbackPart remains native model-history feedback, not a fabricated tool event.

Replay delta fragments are geometrically coalesced rather than retaining one string per incoming token. snapshot() shares immutable joined text with the buffer; later appends preserve earlier snapshots. Complete payloads and event ordering remain intact.

Metadata

Release files for ya-agent-stream-protocol 2.13.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ya-agent-stream-protocol 2.13.0
File Size Uploaded Provenance Actions
ya_agent_stream_protocol-2.13.0.tar.gz 15.2 kB Without provenance Details for ya_agent_stream_protocol-2.13.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ya-agent-stream-protocol 2.13.0
File Interpreter ABI Platform Actions
ya_agent_stream_protocol-2.13.0-py3-none-any.whl Python 3 none any Details for ya_agent_stream_protocol-2.13.0-py3-none-any.whl

Total release size: 27.9 kB

Release files / ya_agent_stream_protocol-2.13.0.tar.gz

Download URL ya_agent_stream_protocol-2.13.0.tar.gz
Size 15.2 kB
Tags Source
SHA-256 checksum
How to use checksums
d59cfbdfc4b434a3311974b82adedc3753fb75294b92ec5d470106fbb63ea1a9
BLAKE2b-256 checksum
How to use checksums
56cd0e441fad2be0ee591651f803b69a745716ad97e670605440a15a224b8a9e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / ya_agent_stream_protocol-2.13.0-py3-none-any.whl

Download URL ya_agent_stream_protocol-2.13.0-py3-none-any.whl
Size 12.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1a3bfee400be1772ef71fa07b61b418f04349f7d57dc2679905b3f6c6f056b08
BLAKE2b-256 checksum
How to use checksums
741df0f0539b42dad77c2fca4ef63d627f82f49e93b7391c698330642e4a8322
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for ya-agent-stream-protocol 2.13.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.13.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page