Skip to content

feat: parity with Python SDK v0.1.35 - #16

Merged
0xeb merged 2 commits into
mainfrom
feature/parity-v0.1.35
Feb 13, 2026
Merged

feat: parity with Python SDK v0.1.35#16
0xeb merged 2 commits into
mainfrom
feature/parity-v0.1.35

Conversation

@0xeb

@0xeb 0xeb commented Feb 13, 2026

Copy link
Copy Markdown
Owner

Summary

  • Fix AssistantMessage error field parsing: read from outer data object, not inner message (port of Python commit 94eaf75)
  • Add 3 new HookEvent values: Notification, SubagentStart, PermissionRequest (now 10 total)
  • Add typed hook input structs for all 7 tool/agent/notification events with from_json() parsing
  • Add hook-specific output structs (PreToolUseHookOutput, PostToolUseHookOutput, etc.) with to_json() serialization
  • Add ThinkingConfig types (Adaptive, Enabled with budget, Disabled) and EffortLevel constants
  • Add MCP tool annotations (ToolAnnotations with 5 hint fields, included in tools/list responses)
  • Send agents via initialize control request instead of CLI arguments
  • Always use streaming mode internally (prompt sent via stdin)
  • 21 new unit tests (165 total, up from 144)

Test plan

  • All 165 unit tests pass
  • All examples build
  • CTest suite 100% (2/2 test binaries)
  • Integration tests (require live Claude CLI)

0xeb added 2 commits February 13, 2026 15:04
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).
@0xeb
0xeb merged commit 8e152f2 into main Feb 13, 2026
6 of 7 checks passed
@0xeb
0xeb deleted the feature/parity-v0.1.35 branch February 13, 2026 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant