x4d-devkit 0.63.0__tar.gz → 0.64.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (186) hide show
  1. {x4d_devkit-0.63.0/x4d_devkit.egg-info → x4d_devkit-0.64.0}/PKG-INFO +1 -1
  2. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/pyproject.toml +1 -1
  3. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_sdk_api.py +1 -1
  4. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_work_items.py +95 -0
  5. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/accounts.py +11 -0
  6. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/client/__init__.py +2 -1
  7. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/client/client.py +40 -5
  8. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/client/work_items.py +56 -9
  9. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/work_items.py +74 -0
  10. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0/x4d_devkit.egg-info}/PKG-INFO +1 -1
  11. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/LICENSE +0 -0
  12. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/README.md +0 -0
  13. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/setup.cfg +0 -0
  14. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_accounts.py +0 -0
  15. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_annotation_contract.py +0 -0
  16. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_annotation_document_hash.py +0 -0
  17. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_annotation_reference.py +0 -0
  18. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_assets_client.py +0 -0
  19. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_boundary.py +0 -0
  20. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_box.py +0 -0
  21. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_build_info.py +0 -0
  22. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_category_audit.py +0 -0
  23. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_clean_basemap.py +0 -0
  24. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_clean_basemap_client.py +0 -0
  25. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_cli_auth.py +0 -0
  26. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_client_json_contract.py +0 -0
  27. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_client_projects.py +0 -0
  28. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_clip_archives.py +0 -0
  29. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_contract_validation.py +0 -0
  30. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_contracts.py +0 -0
  31. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_coordinate_frames.py +0 -0
  32. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_current_state.py +0 -0
  33. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_current_state_identity_consumers_example.py +0 -0
  34. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_dataset_contract.py +0 -0
  35. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_dataset_identity.py +0 -0
  36. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_detection_eval.py +0 -0
  37. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_evaluate.py +0 -0
  38. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_export_bundle.py +0 -0
  39. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_image_clip.py +0 -0
  40. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_image_conditional_rules.py +0 -0
  41. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_image_enum_set.py +0 -0
  42. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_image_export.py +0 -0
  43. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_image_external_predictions.py +0 -0
  44. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_image_geometry.py +0 -0
  45. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_image_groups.py +0 -0
  46. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_image_polygon.py +0 -0
  47. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_image_preannotation.py +0 -0
  48. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_image_reference.py +0 -0
  49. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_image_review.py +0 -0
  50. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_image_schema_migration.py +0 -0
  51. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_image_schema_registry_client.py +0 -0
  52. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_image_schema_upgrade.py +0 -0
  53. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_image_source.py +0 -0
  54. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_image_work_session.py +0 -0
  55. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_inference_input.py +0 -0
  56. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_inference_schemas.py +0 -0
  57. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_inference_service.py +0 -0
  58. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_label_schemas.py +0 -0
  59. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_lidar_materialization.py +0 -0
  60. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_loader.py +0 -0
  61. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_matching.py +0 -0
  62. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_metrics.py +0 -0
  63. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_models.py +0 -0
  64. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_parse_equivalence.py +0 -0
  65. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_platform_pose.py +0 -0
  66. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_preannotation_client.py +0 -0
  67. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_project_discovery.py +0 -0
  68. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_reconstruction_client.py +0 -0
  69. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_release_gate.py +0 -0
  70. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_roadmark_preview.py +0 -0
  71. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_semantic_scene_authoring.py +0 -0
  72. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_semantic_scene_client.py +0 -0
  73. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_semantic_scene_contract.py +0 -0
  74. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_semantic_scene_independent.py +0 -0
  75. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_semantic_scene_native_clip.py +0 -0
  76. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_source_attributes.py +0 -0
  77. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_source_content.py +0 -0
  78. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_time_contract.py +0 -0
  79. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_token.py +0 -0
  80. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_tracking_eval.py +0 -0
  81. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_training_identity.py +0 -0
  82. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_transform.py +0 -0
  83. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_transform_chain.py +0 -0
  84. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_validation.py +0 -0
  85. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_vector_map.py +0 -0
  86. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_vector_map_geometry.py +0 -0
  87. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_vector_map_session.py +0 -0
  88. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_work_facts.py +0 -0
  89. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_work_session.py +0 -0
  90. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/tests/test_work_session_validation_reuse.py +0 -0
  91. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/__init__.py +0 -0
  92. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/_image_contract.py +0 -0
  93. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/annotation_contract.py +0 -0
  94. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/annotation_reference.py +0 -0
  95. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/audit.py +0 -0
  96. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/build_info.py +0 -0
  97. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/clean_basemap.py +0 -0
  98. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/cli.py +0 -0
  99. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/client/_origin.py +0 -0
  100. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/client/accounts.py +0 -0
  101. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/client/annotation_reference.py +0 -0
  102. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/client/assets.py +0 -0
  103. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/client/bags.py +0 -0
  104. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/client/capabilities.py +0 -0
  105. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/client/checkpoints.py +0 -0
  106. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/client/clean_basemap.py +0 -0
  107. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/client/clip_work_sessions.py +0 -0
  108. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/client/clips.py +0 -0
  109. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/client/dataset_identity.py +0 -0
  110. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/client/image_clips.py +0 -0
  111. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/client/image_exports.py +0 -0
  112. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/client/image_preannotations.py +0 -0
  113. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/client/image_review.py +0 -0
  114. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/client/image_schemas.py +0 -0
  115. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/client/image_work_sessions.py +0 -0
  116. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/client/label_schemas.py +0 -0
  117. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/client/preannotation.py +0 -0
  118. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/client/projects.py +0 -0
  119. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/client/reconstruction.py +0 -0
  120. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/client/semantic_scene.py +0 -0
  121. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/client/semantic_scene_authoring.py +0 -0
  122. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/client/services.py +0 -0
  123. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/client/test_sets.py +0 -0
  124. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/client/work_facts.py +0 -0
  125. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/consumer_identity.py +0 -0
  126. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/contracts.py +0 -0
  127. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/coordinate_contract.py +0 -0
  128. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/core/__init__.py +0 -0
  129. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/core/loader.py +0 -0
  130. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/core/models.py +0 -0
  131. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/core/token.py +0 -0
  132. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/core/transform.py +0 -0
  133. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/current_state.py +0 -0
  134. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/dataset_contract.py +0 -0
  135. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/dataset_identity.py +0 -0
  136. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/eval/__init__.py +0 -0
  137. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/eval/api.py +0 -0
  138. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/eval/box.py +0 -0
  139. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/eval/detection.py +0 -0
  140. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/eval/matching.py +0 -0
  141. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/eval/metrics.py +0 -0
  142. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/eval/tracking.py +0 -0
  143. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/export_bundle.py +0 -0
  144. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/image_clip.py +0 -0
  145. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/image_export.py +0 -0
  146. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/image_geometry.py +0 -0
  147. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/image_groups.py +0 -0
  148. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/image_preannotation.py +0 -0
  149. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/image_reference.py +0 -0
  150. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/image_review.py +0 -0
  151. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/image_schema.py +0 -0
  152. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/image_schema_migration.py +0 -0
  153. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/image_schema_upgrade.py +0 -0
  154. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/image_source.py +0 -0
  155. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/image_work_session.py +0 -0
  156. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/inference/__init__.py +0 -0
  157. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/inference/input.py +0 -0
  158. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/inference/models.py +0 -0
  159. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/inference/schemas.py +0 -0
  160. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/inference/service.py +0 -0
  161. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/inference/tasks.py +0 -0
  162. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/json_contract.py +0 -0
  163. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/label_schema.py +0 -0
  164. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/lidar_materialization.py +0 -0
  165. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/materialize.py +0 -0
  166. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/project_discovery.py +0 -0
  167. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/roadmark_preview.py +0 -0
  168. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/semantic_scene_authoring.py +0 -0
  169. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/semantic_scene_contract.py +0 -0
  170. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/source_content.py +0 -0
  171. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/time_contract.py +0 -0
  172. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/training_identity.py +0 -0
  173. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/validation/__init__.py +0 -0
  174. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/validation/contract.py +0 -0
  175. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/validation/platform_pose.py +0 -0
  176. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/validation/report.py +0 -0
  177. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/validation/validator.py +0 -0
  178. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/vector_map.py +0 -0
  179. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/vector_map_geometry.py +0 -0
  180. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/work_facts.py +0 -0
  181. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit/work_session.py +0 -0
  182. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit.egg-info/SOURCES.txt +0 -0
  183. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit.egg-info/dependency_links.txt +0 -0
  184. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit.egg-info/entry_points.txt +0 -0
  185. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit.egg-info/requires.txt +0 -0
  186. {x4d_devkit-0.63.0 → x4d_devkit-0.64.0}/x4d_devkit.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: x4d-devkit
3
- Version: 0.63.0
3
+ Version: 0.64.0
4
4
  Summary: Official X-4D external SDK and CLI for datasets, platform APIs, training bridges, and automation
5
5
  Author: windzu
6
6
  License-Expression: Apache-2.0
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "x4d-devkit"
7
- version = "0.63.0"
7
+ version = "0.64.0"
8
8
  description = "Official X-4D external SDK and CLI for datasets, platform APIs, training bridges, and automation"
9
9
  readme = "README.md"
10
10
  license = "Apache-2.0"
@@ -11,7 +11,7 @@ from x4d_devkit.eval.matching import MetricData
11
11
 
12
12
 
13
13
  def test_package_version_is_current_release():
14
- assert x4d_devkit.__version__ == "0.63.0"
14
+ assert x4d_devkit.__version__ == "0.64.0"
15
15
 
16
16
 
17
17
  def test_loader_exposes_and_enforces_only_current_schema(tmp_path):
@@ -346,3 +346,98 @@ def test_client_rejects_invalid_requests_before_sending(kwargs):
346
346
  client.work_items.return_for_rework(
347
347
  project_id=3, clip_id="clip-001", expected_revision=0, reason=" "
348
348
  )
349
+
350
+
351
+ # ── request receipts and auth error codes (x4d-devkit#258) ───────────────
352
+
353
+ from x4d_devkit.accounts import AUTH_ERROR_CODES # noqa: E402
354
+ from x4d_devkit.client import X4DAuthError # noqa: E402
355
+ from x4d_devkit.work_items import ( # noqa: E402
356
+ WORK_RECEIPT_CONTRACT,
357
+ new_work_request_id,
358
+ parse_work_receipt,
359
+ validate_request_id,
360
+ )
361
+
362
+ REQUEST = "0b7c2f3e-5d1a-4c8e-9f00-1234567890ab"
363
+
364
+
365
+ def receipt(**changes):
366
+ value = {
367
+ "contract_version": WORK_RECEIPT_CONTRACT, "request_id": REQUEST, "project_id": 3,
368
+ "clip_id": "clip-001", "action": "submit_for_review", "from_state": "annotating",
369
+ "to_state": "review_pending", "round": 1, "item_revision": 1, "annotation_revision": REV,
370
+ "at": "2026-11-17T01:00:00Z",
371
+ }
372
+ value.update(changes)
373
+ return value
374
+
375
+
376
+ def test_receipt_grammar_binds_states_action_and_annotation_identity():
377
+ assert parse_work_receipt(receipt()).to_dict() == receipt()
378
+ parse_work_receipt(receipt(action="claim_review", from_state="review_pending", to_state="reviewing",
379
+ annotation_revision=None, item_revision=2))
380
+ for broken in (
381
+ receipt(to_state="reviewing"),
382
+ receipt(action="assign"),
383
+ receipt(annotation_revision=None),
384
+ receipt(action="claim_review", from_state="review_pending", to_state="reviewing"),
385
+ receipt(request_id="0B7C2F3E-5D1A-4C8E-9F00-1234567890AB"),
386
+ receipt(item_revision=0),
387
+ {**receipt(), "actor_id": 4},
388
+ ):
389
+ with pytest.raises(ValueError):
390
+ parse_work_receipt(broken)
391
+ assert validate_request_id(new_work_request_id())
392
+
393
+
394
+ def test_transitions_send_request_ids_and_expose_already_applied_receipts():
395
+ seen = []
396
+
397
+ def handler(request):
398
+ body = json.loads(request.content) if request.content else None
399
+ seen.append((request.url.path, body))
400
+ if request.url.path.endswith("/submit-for-review"):
401
+ return httpx.Response(409, json={"detail": {
402
+ "code": "work_request_already_applied", "message": "applied earlier",
403
+ "extra": {"receipt": receipt()}}})
404
+ if request.url.path == f"/api/v1/work-items/receipts/{REQUEST}":
405
+ return httpx.Response(200, json=receipt())
406
+ if request.url.path.endswith("/claim-review"):
407
+ return httpx.Response(200, json=item(state="reviewing", reviewer_id=8, revision=2))
408
+ return httpx.Response(404, json={"detail": {"code": "work_receipt_not_found", "message": "none"}})
409
+
410
+ with _client(handler) as client:
411
+ api = client.work_items
412
+ with pytest.raises(WorkItemError) as caught:
413
+ api.submit_for_review(project_id=3, clip_id="clip-001", expected_revision=0, request_id=REQUEST)
414
+ assert caught.value.code == "work_request_already_applied"
415
+ assert caught.value.receipt.item_revision == 1 and caught.value.receipt.request_id == REQUEST
416
+ assert api.receipt(REQUEST).to_state == "review_pending"
417
+ api.claim_review(project_id=3, clip_id="clip-001", expected_revision=1)
418
+ with pytest.raises(WorkItemError) as missing:
419
+ api.receipt("1b7c2f3e-5d1a-4c8e-9f00-1234567890ab")
420
+ assert missing.value.code == "work_receipt_not_found" and missing.value.receipt is None
421
+ with pytest.raises(ValueError):
422
+ api.claim_review(project_id=3, clip_id="clip-001", expected_revision=1, request_id="not-a-uuid")
423
+ assert seen[0][1]["request_id"] == REQUEST
424
+ assert validate_request_id(seen[2][1]["request_id"]), "a fresh identity is sent when none is given"
425
+
426
+
427
+ @pytest.mark.parametrize("code", AUTH_ERROR_CODES)
428
+ def test_401_with_a_documented_code_raises_a_typed_auth_error(code):
429
+ def handler(request):
430
+ return httpx.Response(401, json={"detail": {"code": code, "message": "sign in again"}})
431
+
432
+ with _client(handler) as client:
433
+ with pytest.raises(X4DAuthError) as caught:
434
+ client.work_items.access(project_id=3)
435
+ assert caught.value.code == code and caught.value.to_dict()["status_code"] == 401
436
+ assert isinstance(caught.value, httpx.HTTPStatusError), "existing handlers keep working"
437
+
438
+
439
+ def test_untyped_401_stays_a_plain_http_error():
440
+ with _client(lambda request: httpx.Response(401, json={"detail": "Not authenticated"})) as client:
441
+ with pytest.raises(httpx.HTTPStatusError) as caught:
442
+ client.work_items.access(project_id=3)
443
+ assert not isinstance(caught.value, X4DAuthError)
@@ -147,3 +147,14 @@ def parse_account_page(value: Any) -> dict:
147
147
  "total": total,
148
148
  "items": items,
149
149
  }
150
+
151
+
152
+ # 401 ``detail.code`` values (x4d-devkit#258). Revocation and version conflicts
153
+ # keep their 403/409 ``work_*`` codes.
154
+ AUTH_ERROR_CODES = (
155
+ "account_credentials_changed",
156
+ "account_disabled",
157
+ "auth_required",
158
+ "auth_token_expired",
159
+ "auth_token_invalid",
160
+ )
@@ -8,7 +8,7 @@ from x4d_devkit.client.clip_work_sessions import (
8
8
  WorkSessionConflict,
9
9
  WorkSessionConflictError,
10
10
  )
11
- from x4d_devkit.client.client import X4DClient
11
+ from x4d_devkit.client.client import X4DAuthError, X4DClient
12
12
  from x4d_devkit.client.image_work_sessions import ImageWorkSessionsAPI
13
13
  from x4d_devkit.client.image_exports import ImageExportsAPI
14
14
  from x4d_devkit.client.clips import ClipsAPI
@@ -54,6 +54,7 @@ from x4d_devkit.client.image_schemas import (
54
54
  __all__ = [
55
55
  "WorkItemError",
56
56
  "WorkFactError",
57
+ "X4DAuthError",
57
58
  "WorkFactsAPI",
58
59
  "WorkItemsAPI",
59
60
  "ImageProjectSchemaEntry",
@@ -46,6 +46,41 @@ if TYPE_CHECKING:
46
46
  from x4d_devkit.client.preannotation import PreannotationAPI
47
47
 
48
48
 
49
+ class X4DAuthError(httpx.HTTPStatusError):
50
+ """A 401 carrying one documented ``AUTH_ERROR_CODES`` value (x4d-devkit#258).
51
+
52
+ Subclasses ``httpx.HTTPStatusError``, so existing handlers keep working.
53
+ """
54
+
55
+ def __init__(self, code: str, message: str, *, request, response):
56
+ super().__init__(message, request=request, response=response)
57
+ self.code = code
58
+ self.message = message
59
+ self.status_code = 401
60
+
61
+ def to_dict(self) -> dict:
62
+ return {"code": self.code, "message": self.message, "status_code": self.status_code}
63
+
64
+
65
+ def _raise_for_status(resp: "httpx.Response") -> None:
66
+ if resp.status_code == 401:
67
+ from x4d_devkit.accounts import AUTH_ERROR_CODES
68
+
69
+ try:
70
+ detail = resp.json().get("detail")
71
+ except Exception:
72
+ detail = None
73
+ if isinstance(detail, dict) and detail.get("code") in AUTH_ERROR_CODES:
74
+ message = detail.get("message")
75
+ raise X4DAuthError(
76
+ detail["code"],
77
+ message if isinstance(message, str) and message else detail["code"],
78
+ request=resp.request,
79
+ response=resp,
80
+ )
81
+ resp.raise_for_status()
82
+
83
+
49
84
  class X4DClient:
50
85
  """Client for the X-4D platform REST API.
51
86
 
@@ -169,23 +204,23 @@ class X4DClient:
169
204
 
170
205
  def get(self, path: str, **kwargs):
171
206
  resp = self._http.get(self._url(path), **kwargs)
172
- resp.raise_for_status()
207
+ _raise_for_status(resp)
173
208
  return parse_i_json(resp.content, path=f"GET {self._url(path)} response")
174
209
 
175
210
  def post(self, path: str, **kwargs):
176
211
  resp = self._http.post(self._url(path), **kwargs)
177
- resp.raise_for_status()
212
+ _raise_for_status(resp)
178
213
  return parse_i_json(resp.content, path=f"POST {self._url(path)} response")
179
214
 
180
215
  def put(self, path: str, **kwargs):
181
216
  resp = self._http.put(self._url(path), **kwargs)
182
- resp.raise_for_status()
217
+ _raise_for_status(resp)
183
218
  return parse_i_json(resp.content, path=f"PUT {self._url(path)} response")
184
219
 
185
220
  def exchange(self, method: str, path: str, **kwargs):
186
221
  """One request returning ``(strict JSON or None for 204, ETag or None)``."""
187
222
  resp = self._http.request(method, self._url(path), **kwargs)
188
- resp.raise_for_status()
223
+ _raise_for_status(resp)
189
224
  value = (
190
225
  parse_i_json(resp.content, path=f"{method} {self._url(path)} response")
191
226
  if resp.content
@@ -195,7 +230,7 @@ class X4DClient:
195
230
 
196
231
  def delete(self, path: str, **kwargs):
197
232
  resp = self._http.delete(self._url(path), **kwargs)
198
- resp.raise_for_status()
233
+ _raise_for_status(resp)
199
234
  return parse_i_json(resp.content, path=f"DELETE {self._url(path)} response")
200
235
 
201
236
  def close(self):
@@ -17,6 +17,8 @@ from x4d_devkit.work_items import (
17
17
  parse_work_access,
18
18
  parse_work_item,
19
19
  parse_work_item_page,
20
+ parse_work_receipt,
21
+ validate_request_id,
20
22
  validate_annotation_revision,
21
23
  validate_clip_id,
22
24
  validate_platform_reference,
@@ -28,11 +30,20 @@ from x4d_devkit.work_items import (
28
30
  class WorkItemError(RuntimeError):
29
31
  """A platform rejection carrying one documented ``work_*`` error code."""
30
32
 
31
- def __init__(self, code: str, message: str, status_code: int):
33
+ def __init__(self, code: str, message: str, status_code: int, extra: dict | None = None):
32
34
  super().__init__(message)
33
35
  self.code = code
34
36
  self.message = message
35
37
  self.status_code = status_code
38
+ self.extra = extra
39
+
40
+ @property
41
+ def receipt(self):
42
+ """The original request's receipt on ``work_request_already_applied``."""
43
+
44
+ if self.code != "work_request_already_applied" or not isinstance(self.extra, dict):
45
+ return None
46
+ return parse_work_receipt(self.extra.get("receipt"))
36
47
 
37
48
  def to_dict(self) -> dict[str, Any]:
38
49
  return {"code": self.code, "message": self.message, "status_code": self.status_code}
@@ -47,10 +58,12 @@ def _work_error(exc: httpx.HTTPStatusError) -> WorkItemError | None:
47
58
  if not isinstance(detail, dict) or detail.get("code") not in WORK_ERROR_CODES:
48
59
  return None
49
60
  message = detail.get("message")
61
+ extra = detail.get("extra")
50
62
  return WorkItemError(
51
63
  detail["code"],
52
64
  message if isinstance(message, str) and message else detail["code"],
53
65
  int(exc.response.status_code),
66
+ extra if isinstance(extra, dict) else None,
54
67
  )
55
68
 
56
69
 
@@ -97,13 +110,13 @@ class WorkItemsAPI:
97
110
  raise ValueError("work access belongs to another request")
98
111
  return result
99
112
 
100
- def submit_for_review(self, *, project_id, clip_id, expected_revision):
101
- return self._transition("submit_for_review", project_id, clip_id, expected_revision, {})
113
+ def submit_for_review(self, *, project_id, clip_id, expected_revision, request_id=None):
114
+ return self._transition("submit_for_review", project_id, clip_id, expected_revision, {}, request_id)
102
115
 
103
- def claim_review(self, *, project_id, clip_id, expected_revision):
104
- return self._transition("claim_review", project_id, clip_id, expected_revision, {})
116
+ def claim_review(self, *, project_id, clip_id, expected_revision, request_id=None):
117
+ return self._transition("claim_review", project_id, clip_id, expected_revision, {}, request_id)
105
118
 
106
- def accept(self, *, project_id, clip_id, expected_revision, expected_annotation_revision):
119
+ def accept(self, *, project_id, clip_id, expected_revision, expected_annotation_revision, request_id=None):
107
120
  item = self._transition(
108
121
  "accept",
109
122
  project_id,
@@ -114,12 +127,15 @@ class WorkItemsAPI:
114
127
  expected_annotation_revision, "expected_annotation_revision"
115
128
  )
116
129
  },
130
+ request_id,
117
131
  )
118
132
  if item.accepted_annotation_revision != expected_annotation_revision:
119
133
  raise ValueError("accepted work item binds another annotation revision")
120
134
  return item
121
135
 
122
- def return_for_rework(self, *, project_id, clip_id, expected_revision, reason, platform_reference=None):
136
+ def return_for_rework(
137
+ self, *, project_id, clip_id, expected_revision, reason, platform_reference=None, request_id=None
138
+ ):
123
139
  item = self._transition(
124
140
  "return",
125
141
  project_id,
@@ -129,18 +145,49 @@ class WorkItemsAPI:
129
145
  "reason": validate_return_reason(reason),
130
146
  "platform_reference": validate_platform_reference(platform_reference),
131
147
  },
148
+ request_id,
132
149
  )
133
150
  if item.return_reason != reason or item.platform_reference != platform_reference:
134
151
  raise ValueError("returned work item belongs to another request")
135
152
  return item
136
153
 
137
- def _transition(self, action, project_id, clip_id, expected_revision, extra):
154
+ def receipt(self, request_id):
155
+ """The caller's own receipt for ``request_id``.
156
+
157
+ Raises ``WorkItemError`` with ``work_receipt_not_found`` when the request
158
+ was never applied; resending it with the same ``request_id`` is then safe.
159
+ Reading a receipt grants no Clip access.
160
+ """
161
+
162
+ validate_request_id(request_id)
163
+ receipt = parse_work_receipt(self._call("get", f"/work-items/receipts/{request_id}"))
164
+ if receipt.request_id != request_id:
165
+ raise ValueError("work receipt belongs to another request")
166
+ return receipt
167
+
168
+ def _transition(self, action, project_id, clip_id, expected_revision, extra, request_id=None):
169
+ """Apply one execution action.
170
+
171
+ Pass a ``request_id`` (``new_work_request_id()``) persisted before the
172
+ call to make a retry after a lost response exact: the platform answers
173
+ from the original request, or raises ``work_request_already_applied``
174
+ whose ``receipt`` describes it when the item has since moved on. Without
175
+ one, a fresh identity is used for this call only.
176
+ """
177
+
138
178
  work_integer(project_id, "project_id", minimum=1)
139
179
  validate_clip_id(clip_id)
140
180
  work_integer(expected_revision, "expected_revision")
181
+ if request_id is None:
182
+ from x4d_devkit.work_items import new_work_request_id
183
+
184
+ request_id = new_work_request_id()
185
+ validate_request_id(request_id)
141
186
  path = f"/projects/{project_id}/clips/{clip_id}/work-item/{action.replace('_', '-')}"
142
187
  item = parse_work_item(
143
- self._call("post", path, json={"expected_revision": expected_revision, **extra})
188
+ self._call(
189
+ "post", path, json={"expected_revision": expected_revision, **extra, "request_id": request_id}
190
+ )
144
191
  )
145
192
  expected_state = {
146
193
  "submit_for_review": "review_pending",
@@ -20,6 +20,7 @@ WORK_ITEM_PAGE_CONTRACT = "x4d-work-item-page-v1"
20
20
  WORK_EVENT_CONTRACT = "x4d-work-event-v1"
21
21
  WORK_MEMBER_CONTRACT = "x4d-work-member-v2"
22
22
  WORK_ACCESS_CONTRACT = "x4d-work-access-v2"
23
+ WORK_RECEIPT_CONTRACT = "x4d-work-receipt-v1"
23
24
 
24
25
  WORK_ROLES = ("annotator", "manager", "reviewer")
25
26
  WORK_STATES = ("accepted", "annotating", "returned", "review_pending", "reviewing")
@@ -70,9 +71,16 @@ WORK_ERROR_CODES = (
70
71
  "work_revision_conflict",
71
72
  "work_role_required",
72
73
  "work_self_review_forbidden",
74
+ # Request receipts (x4d-devkit#258): a replayed request_id whose item has
75
+ # since moved on, a request_id reused for another action or Clip, and an
76
+ # unknown receipt (the request was never applied; resend it).
77
+ "work_receipt_not_found",
78
+ "work_request_already_applied",
79
+ "work_request_conflict",
73
80
  )
74
81
 
75
82
  _SHA256_RE = re.compile(r"^sha256:[0-9a-f]{64}$")
83
+ _REQUEST_ID_RE = re.compile(r"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$")
76
84
  _UTC_RE = re.compile(r"^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,6})?Z$")
77
85
  _MAX_INT = 2**53 - 1
78
86
 
@@ -457,3 +465,69 @@ def parse_work_access(value: Any) -> WorkAccess:
457
465
  )
458
466
  _require(clip_id is not None or not actions, "actions require a clip_id")
459
467
  return WorkAccess(project_id, value["is_admin"], tuple(roles), clip_id, item, tuple(actions))
468
+
469
+
470
+ def validate_request_id(value: Any) -> str:
471
+ """A client-chosen execution request identity: a lowercase canonical UUID."""
472
+
473
+ _require(
474
+ type(value) is str and _REQUEST_ID_RE.fullmatch(value) is not None,
475
+ "request_id must be a lowercase canonical UUID",
476
+ )
477
+ return value
478
+
479
+
480
+ def new_work_request_id() -> str:
481
+ """A fresh request identity; persist it before sending so a retry can reuse it."""
482
+
483
+ import uuid
484
+
485
+ return str(uuid.uuid4())
486
+
487
+
488
+ @dataclass(frozen=True)
489
+ class WorkReceipt:
490
+ """What one execution request did, readable only by the account that sent it."""
491
+
492
+ request_id: str
493
+ project_id: int
494
+ clip_id: str
495
+ action: str
496
+ from_state: str
497
+ to_state: str
498
+ round: int
499
+ item_revision: int
500
+ annotation_revision: str | None
501
+ at: str
502
+
503
+ def to_dict(self) -> dict:
504
+ value = {"contract_version": WORK_RECEIPT_CONTRACT}
505
+ value.update({name: getattr(self, name) for name in self.__dataclass_fields__})
506
+ return value
507
+
508
+
509
+ def parse_work_receipt(value: Any) -> WorkReceipt:
510
+ ensure_i_json(value, path="work_receipt")
511
+ _fields(value, set(WorkReceipt.__dataclass_fields__) | {"contract_version"}, "work receipt")
512
+ _require(value["contract_version"] == WORK_RECEIPT_CONTRACT, "unsupported work receipt contract")
513
+ receipt = WorkReceipt(
514
+ request_id=validate_request_id(value["request_id"]),
515
+ project_id=work_integer(value["project_id"], "project_id", minimum=1),
516
+ clip_id=validate_clip_id(value["clip_id"]),
517
+ action=_enum(value["action"], EXECUTION_ACTIONS, "action"),
518
+ from_state=_enum(value["from_state"], WORK_STATES, "from_state"),
519
+ to_state=_enum(value["to_state"], WORK_STATES, "to_state"),
520
+ round=work_integer(value["round"], "round", minimum=1),
521
+ item_revision=work_integer(value["item_revision"], "item_revision", minimum=1),
522
+ annotation_revision=_optional_revision(value["annotation_revision"], "annotation_revision"),
523
+ at=_utc(value["at"], "at"),
524
+ )
525
+ _require(
526
+ work_transition(receipt.from_state, receipt.action) == receipt.to_state,
527
+ "work receipt states do not match its action",
528
+ )
529
+ _require(
530
+ (receipt.action in ("submit_for_review", "accept")) == (receipt.annotation_revision is not None),
531
+ "annotation_revision is present exactly on submit_for_review and accept receipts",
532
+ )
533
+ return receipt
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: x4d-devkit
3
- Version: 0.63.0
3
+ Version: 0.64.0
4
4
  Summary: Official X-4D external SDK and CLI for datasets, platform APIs, training bridges, and automation
5
5
  Author: windzu
6
6
  License-Expression: Apache-2.0
File without changes
File without changes
File without changes