Skip to content

feat: standardize inbox API parameters with backward compatibility#42

Closed
yubing744 wants to merge 1 commit into
awslabs:mainfrom
yubing744:fix/inbox-api-parameter-standardization-clean
Closed

feat: standardize inbox API parameters with backward compatibility#42
yubing744 wants to merge 1 commit into
awslabs:mainfrom
yubing744:fix/inbox-api-parameter-standardization-clean

Conversation

@yubing744

Copy link
Copy Markdown
Contributor

Summary

This PR standardizes the inbox API parameters while maintaining full backward compatibility.

What changed

  • Terminal ID parameter: Changed from TerminalId to str with Path() validation for better type safety
  • Status parameter: Renamed from status to message_status with alias="status" for backward compatibility
  • Code formatting: Applied proper Black and isort formatting to affected files

Why this PR is needed

  • Improves API design consistency with better parameter naming
  • Resolves potential naming conflicts between API parameters and internal variables
  • Maintains full backward compatibility through FastAPI aliases
  • Follows best practices for API parameter naming and validation

Backward Compatibility

  • The status query parameter continues to work via FastAPI alias
  • No breaking changes for existing API clients
  • Response format remains unchanged

Files changed

  • src/cli_agent_orchestrator/api/main.py - Core API parameter changes
  • test/api/test_inbox_messages.py - Updated test formatting

Test plan

  • All existing tests pass with new parameter structure
  • API documentation reflects parameter changes
  • Backward compatibility maintained through alias
  • Code formatting checks pass

This change improves the API design while ensuring no disruption to existing users.

🤖 Generated with Claude Code
via Happy

- Change terminal_id from TerminalId to str with Path() validation
- Rename status parameter to message_status with alias='status' for backward compatibility
- Update related tests to reflect parameter changes
- Apply proper code formatting

This change improves API design consistency while maintaining full backward compatibility.

🤖 Generated with [Claude Code](https://claude.ai/claude-code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
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