Skip to content

Add recording, episode version, and replay options to streaming - #199

Merged
Mo-Elshenawy1 merged 4 commits into
mainfrom
mostafa/api-sync-d3b02d4-stream
Nov 3, 2026
Merged

Mo-Elshenawy1 merged 4 commits into
mainfrom
mostafa/api-sync-d3b02d4-stream

Conversation

@Mo-Elshenawy1

Copy link
Copy Markdown
Contributor

Changelog

download_data and iter_messages can stream by recording, pin an episode version, and replay the last message per channel before start; download_recording_data accepts topics, a time range, compression, and replay options.

Docs

None

Description

The client couldn't send several public POST /v1/data/stream fields:

  • download_data and iter_messages gain recording_id, recording_key, episode_version, replay_policy, and replay_lookback_seconds. download_data also gains include_attachments. Streaming by recording no longer requires start/end.
  • download_recording_data sends recordingKey instead of the deprecated key, and accepts topics, start/end, compression_format, and the replay options.

All new arguments are optional, so existing calls send the same requests as before (apart from recordingKey, which the API treats the same as key). The spec's includeAttachments description says it needs a recording ID, but the API also accepts it for session and episode streams, which dataset exports already rely on; the docstring reflects the API's behavior.

Validated with black, flake8, pyright, and the test suite, including the iter_messages tests.

BeforeAfter
client.download_data(episode_id="ep_1")
# streams the episode's latest version
client.download_data(
    episode_id="ep_1",
    episode_version=2,
    include_attachments=True,
)
# streams the pinned version, with attachments

Generated by Claude Code

download_data and iter_messages can stream by recording_id or recording_key,
pin an episode_version, and use replay_policy with replay_lookback_seconds;
download_data can also include attachments. download_recording_data sends
recordingKey instead of the deprecated key and accepts topics, a time range,
compression, and replay options. Streaming by recording no longer requires
start and end.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012yf4xphn6VfthBaKLpn2Xu
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012yf4xphn6VfthBaKLpn2Xu
foxglove-beefcake[bot]

This comment was marked as outdated.

foxglove-beefcake[bot]

This comment was marked as outdated.

Reject a recording combined with a session, as the API does, and require start
and end when a recording is combined with a device. download_recording_data
builds its request with _make_stream_link.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012yf4xphn6VfthBaKLpn2Xu

@foxglove-beefcake foxglove-beefcake Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Risk: moderate. The change adds optional parameters to public SDK streaming methods and sends recordingKey instead of key, and a revert fully undoes both.

@foxglove-beefcake foxglove-beefcake Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Risk: moderate. The change adds optional parameters to public SDK streaming methods and sends recordingKey instead of key, and a revert fully undoes both.

@Mo-Elshenawy1
Mo-Elshenawy1 merged commit 52c0ec8 into main Nov 3, 2026
2 checks passed
@Mo-Elshenawy1
Mo-Elshenawy1 deleted the mostafa/api-sync-d3b02d4-stream branch November 3, 2026 23:41
@mguida22 mguida22 mentioned this pull request Nov 4, 2026
@linear-code

linear-code Bot commented Nov 5, 2026

Copy link
Copy Markdown

DC-2076

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants