feat: parity with Python SDK v0.1.35 - #16
Merged
Merged
Conversation
Port 4 feature commits from Python v0.1.26 → v0.1.35: - Fix AssistantMessage error field parsing from outer data object (94eaf75) - Add 3 new HookEvent values (Notification, SubagentStart, PermissionRequest), typed hook input structs for all events (PreToolUse, PostToolUse, PostToolUseFailure, Notification, SubagentStart, SubagentStop, PermissionRequest), and hook-specific output structs (1a832b8) - Add ThinkingConfig types (Adaptive, Enabled, Disabled), EffortLevel constants, and CLI flag resolution - Add MCP tool annotations (ToolAnnotations struct with 5 hint fields, included in tools/list response) (451f2f4) - Send agents via initialize control request instead of CLI args, always use streaming mode internally (8a7c0a7) - Add 21 new unit tests (165 total, up from 144)
Unit tests (12 new): - ThinkingConfig resolution: adaptive default (32000), adaptive with existing, enabled override, disabled (0), precedence over deprecated max_thinking_tokens - EffortLevel: all 4 values, combined with ThinkingConfig - Agents via initialize: JSON structure, empty agents produces null Integration tests (8 new, require live CLI): - ThinkingConfig adaptive/enabled/disabled with live CLI (all pass) - EffortLevel low/max/combined (gracefully skip if CLI < 2.2.0) - One-shot query via always-streaming mode (critical protocol test) - Prompt with dashes (edge case for streaming mode) 177 unit tests passing. 5/8 integration tests pass, 3 skipped (--effort flag requires CLI >= 2.2.0, current is 2.1.34).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
from_json()parsingto_json()serializationTest plan