Skip to content

✨ feat(sdk): add annotation queue types#344

Merged
codekiln merged 1 commit intomainfrom
claude/337-sdk-annotation-queue-types
Nov 27, 2025
Merged

✨ feat(sdk): add annotation queue types#344
codekiln merged 1 commit intomainfrom
claude/337-sdk-annotation-queue-types

Conversation

@codekiln
Copy link
Owner

Summary

Implements comprehensive Rust type definitions for LangSmith annotation queues API (Phase 1 of #334).

Changes

New Types in sdk/src/annotation_queues.rs

  • QueueType - Enum for single vs pairwise queues
  • AnnotationQueue - Base queue schema with all OpenAPI fields
  • AnnotationQueueWithDetails - Extended queue with rubric details
  • AnnotationQueueRubricItem - Rubric evaluation criteria
  • CreateAnnotationQueueRequest - Queue creation payload
  • UpdateAnnotationQueueRequest - Queue update payload
  • ListAnnotationQueuesParams - Query parameters for listing
  • RunWithAnnotationQueueInfo - Run with queue metadata

Module Integration

  • Exported module in sdk/src/lib.rs
  • Re-exported commonly used types for ergonomic imports

Implementation Details

  • ✅ All types derive Debug, Clone, Serialize, Deserialize
  • ✅ Optional fields use #[serde(skip_serializing_if = "Option::is_none")]
  • ✅ camelCase serialization for JSON API compatibility
  • ✅ Comprehensive doc comments with API references
  • ✅ Follows existing patterns from sdk/src/runs.rs
  • ✅ Matches OpenAPI schemas in reference/api-specs/annotation-queue-schemas.json

Related Issues

Fixes #337

Parent: #334

Test Plan

  • 10 unit tests for serde roundtrip validation
  • cargo check --workspace --all-features passes
  • cargo clippy --package langstar-sdk -- -D warnings passes
  • cargo test --package langstar-sdk --lib annotation_queues::tests passes
  • cargo fmt --check passes

Files Changed

  • sdk/src/annotation_queues.rs - New file (512 lines)
  • sdk/src/lib.rs - Module export and re-exports

🤖 Generated with Claude Code

Implements comprehensive Rust type definitions for LangSmith annotation queues API.

## Types Implemented

- QueueType - Enum for single vs pairwise queues
- AnnotationQueue - Base queue schema
- AnnotationQueueWithDetails - Queue with rubric details
- AnnotationQueueRubricItem - Rubric evaluation criteria
- CreateAnnotationQueueRequest - Queue creation payload
- UpdateAnnotationQueueRequest - Queue update payload
- ListAnnotationQueuesParams - Query parameters for listing
- RunWithAnnotationQueueInfo - Run with queue metadata

## Implementation Details

- All types derive Debug, Clone, Serialize, Deserialize
- camelCase serialization for JSON API compatibility
- Comprehensive doc comments with API references
- 10 unit tests for serde roundtrip validation
- Module exported in sdk/src/lib.rs with re-exports

Follows patterns from sdk/src/runs.rs and matches OpenAPI schemas.

Fixes #337

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings November 27, 2025 20:29
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR implements comprehensive Rust type definitions for the LangSmith annotation queues API, providing Phase 1 of annotation queue support.

  • Adds complete type definitions for annotation queues including request/response types and query parameters
  • Implements serde serialization with proper camelCase naming for API compatibility
  • Includes 10 unit tests validating serialization/deserialization roundtrip behavior

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
sdk/src/annotation_queues.rs New module with complete type definitions for annotation queues API including QueueType enum, request/response structs, and comprehensive unit tests
sdk/src/lib.rs Exports new annotation_queues module and re-exports commonly used types for ergonomic imports

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

@codekiln codekiln merged commit ce4bd61 into main Nov 27, 2025
15 checks passed
@codekiln codekiln deleted the claude/337-sdk-annotation-queue-types branch November 27, 2025 20:46
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.

334.2-sdk-annotation-queue-types SDK annotation queue types (Phase 1)

2 participants