Skip to content

feat(sdk-py): add sync scoped subgraphs#7828

Merged
Nick Hollon (nick-hollon-lc) merged 138 commits into
mainfrom
nh/sdk-py-v3-streaming-pr11-sync-subgraphs
May 27, 2026
Merged

feat(sdk-py): add sync scoped subgraphs#7828
Nick Hollon (nick-hollon-lc) merged 138 commits into
mainfrom
nh/sdk-py-v3-streaming-pr11-sync-subgraphs

Conversation

@nick-hollon-lc

Copy link
Copy Markdown
Contributor

Summary

  • add sync scoped subgraph handles and nested projections
  • wire thread.subgraphs and thread.subagents on the sync stream surface
  • cover scoped sync messages and tool calls in projection tests

Tests

  • make format
  • make lint
  • uv run pytest tests/streaming/test_sync_projections.py

@nick-hollon-lc Nick Hollon (nick-hollon-lc) force-pushed the nh/sdk-py-v3-streaming-pr10-sync-message-tools branch from 5faea08 to 57aff9c Compare May 15, 2026 23:36
@nick-hollon-lc Nick Hollon (nick-hollon-lc) force-pushed the nh/sdk-py-v3-streaming-pr11-sync-subgraphs branch from 53dc482 to a250f0a Compare May 15, 2026 23:36
@nick-hollon-lc Nick Hollon (nick-hollon-lc) force-pushed the nh/sdk-py-v3-streaming-pr10-sync-message-tools branch from 57aff9c to ff5cec8 Compare May 15, 2026 23:58
@nick-hollon-lc Nick Hollon (nick-hollon-lc) force-pushed the nh/sdk-py-v3-streaming-pr11-sync-subgraphs branch from a250f0a to 1d14ab4 Compare May 15, 2026 23:58
@nick-hollon-lc Nick Hollon (nick-hollon-lc) marked this pull request as ready for review May 18, 2026 20:05
When a lifecycle errored event arrives before the tool-call stream ends,
the finally block now waits up to 1 second for _run_done to settle, then
reads the terminal error and fails remaining handles with it. Without this,
handles received the generic "stream closed" message instead of the run
error. Mirrors _ToolCallsProjection in _async/stream.py.

Add test: test_sync_tool_calls_run_error_fails_active_handle
Add comprehensive sync projection tests (namespace filtering, multiple
messages, error events, multiple concurrent tool calls, tool-error event).
…ore yielding

Without pre-dispatch, callers accessing str(stream.text) immediately inside
a for loop would see empty text because only message-start was dispatched.
Add inner read-ahead loop matching the pattern in _SyncMessagesProjection.
Add test: test_sync_drain_messages_inbox_pre_dispatches_before_yield.
@nick-hollon-lc Nick Hollon (nick-hollon-lc) force-pushed the nh/sdk-py-v3-streaming-pr10-sync-message-tools branch from ff5cec8 to ebd51dd Compare May 19, 2026 02:39
@nick-hollon-lc Nick Hollon (nick-hollon-lc) force-pushed the nh/sdk-py-v3-streaming-pr11-sync-subgraphs branch from 1d14ab4 to d95eb5b Compare May 19, 2026 02:49
Base automatically changed from nh/sdk-py-v3-streaming-pr10-sync-message-tools to main May 27, 2026 18:04
@nick-hollon-lc Nick Hollon (nick-hollon-lc) merged commit 3282ac1 into main May 27, 2026
125 of 127 checks passed
@nick-hollon-lc Nick Hollon (nick-hollon-lc) deleted the nh/sdk-py-v3-streaming-pr11-sync-subgraphs branch May 27, 2026 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants