Merge PR #3360 from c01dsummer/claw-code (fix/roadmap-835-838)
Four fixes addressing issues #3361 and #3360:
1. Parallel tool-result pairing (835): The Anthropic Messages API requires all
tool results of a turn to be in a single message. When a turn issued two tool
calls at once, the results were sent in separate messages, causing a 400 error.
Fixed by merging adjacent tool-result-only messages into one.
2. Terminal-scope path limit (836): Correlation keys up to 512 bytes expanded to
1024+ hex characters, exceeding APFS's 1024-byte total path limit. Fixed by
using SHA256 digest (32 hex chars) for path components while storing the full
key in the record for exact matching.
3. Credential hint (838): When ANTHROPIC_BASE_URL points to a non-Anthropic
endpoint (DeepSeek, corporate gateways), the missing-credentials error now
explains that the endpoint expects its own credentials, not Anthropic's.
4. ROADMAP entries: Documents all three fixes with verification details.
All tests pass (370+ for rusty-claude-cli, 240+ for sdk, 122+ for tools, 209+ for
api). Formatting verified with cargo fmt. CI checks approved and passed.
Fixes#3361, #3360
- Implement OperationRegistry with standard query, control, and event operations
- Add Schema struct for defining input/output schemas
- Add OperationMetadata for rich operation descriptions
- Add Frame methods to extract operation and input from broker requests
- Add comprehensive tests demonstrating the gap and the fix
- Operations can be discovered, validated, and customized
This addresses issue #3321 (Slice 1.2): SDK operation registry & schema validation.
The gap: The original SDK allowed any operation name with no validation.
The fix: A registry-based system that defines valid operations and their schemas.