imperal-sdk 5.0.3__tar.gz → 5.2.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 (280) hide show
  1. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/.github/workflows/identity-contract.yml +1 -1
  2. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/.gitignore +2 -0
  3. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/CHANGELOG.md +90 -0
  4. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/PKG-INFO +1 -1
  5. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/api_surface.json +1 -2
  6. imperal_sdk-5.2.0/docs/sdl-facets.md +502 -0
  7. imperal_sdk-5.2.0/sdk_claims.json +27 -0
  8. imperal_sdk-5.2.0/sdl_roles.json +3389 -0
  9. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/__init__.py +4 -1
  10. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/billing/client.py +20 -11
  11. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/chat/extension.py +20 -86
  12. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/chat/filters.py +2 -2
  13. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/context.py +1 -18
  14. imperal_sdk-5.2.0/src/imperal_sdk/devtools/__init__.py +25 -0
  15. imperal_sdk-5.2.0/src/imperal_sdk/devtools/contract_checks.py +96 -0
  16. {imperal_sdk-5.0.3/src/imperal_sdk/tools → imperal_sdk-5.2.0/src/imperal_sdk/devtools}/generate_api_surface.py +1 -1
  17. imperal_sdk-5.2.0/src/imperal_sdk/devtools/generate_sdk_claims.py +71 -0
  18. {imperal_sdk-5.0.3/src/imperal_sdk/tools → imperal_sdk-5.2.0/src/imperal_sdk/devtools}/validate_identity_contract.py +1 -1
  19. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/extensions/client.py +8 -1
  20. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/manifest.py +5 -2
  21. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/manifest_schema.py +18 -10
  22. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/schemas/chat_result.schema.json +2 -2
  23. imperal_sdk-5.2.0/src/imperal_sdk/sdl/__init__.py +26 -0
  24. imperal_sdk-5.2.0/src/imperal_sdk/sdl/_generate_roles_json.py +49 -0
  25. imperal_sdk-5.2.0/src/imperal_sdk/sdl/entity.py +96 -0
  26. imperal_sdk-5.2.0/src/imperal_sdk/sdl/facets/__init__.py +60 -0
  27. imperal_sdk-5.2.0/src/imperal_sdk/sdl/facets/catalog.py +49 -0
  28. imperal_sdk-5.2.0/src/imperal_sdk/sdl/facets/comm.py +60 -0
  29. imperal_sdk-5.2.0/src/imperal_sdk/sdl/facets/content.py +47 -0
  30. imperal_sdk-5.2.0/src/imperal_sdk/sdl/facets/device.py +110 -0
  31. imperal_sdk-5.2.0/src/imperal_sdk/sdl/facets/event.py +74 -0
  32. imperal_sdk-5.2.0/src/imperal_sdk/sdl/facets/geo.py +72 -0
  33. imperal_sdk-5.2.0/src/imperal_sdk/sdl/facets/identity.py +46 -0
  34. imperal_sdk-5.2.0/src/imperal_sdk/sdl/facets/media.py +68 -0
  35. imperal_sdk-5.2.0/src/imperal_sdk/sdl/facets/metric.py +52 -0
  36. imperal_sdk-5.2.0/src/imperal_sdk/sdl/facets/money.py +57 -0
  37. imperal_sdk-5.2.0/src/imperal_sdk/sdl/facets/net.py +101 -0
  38. imperal_sdk-5.2.0/src/imperal_sdk/sdl/facets/people.py +66 -0
  39. imperal_sdk-5.2.0/src/imperal_sdk/sdl/facets/quantity.py +75 -0
  40. imperal_sdk-5.2.0/src/imperal_sdk/sdl/facets/rating.py +35 -0
  41. imperal_sdk-5.2.0/src/imperal_sdk/sdl/facets/security.py +111 -0
  42. imperal_sdk-5.2.0/src/imperal_sdk/sdl/facets/task.py +79 -0
  43. imperal_sdk-5.2.0/src/imperal_sdk/sdl/facets/time.py +45 -0
  44. imperal_sdk-5.2.0/src/imperal_sdk/sdl/field.py +58 -0
  45. imperal_sdk-5.2.0/src/imperal_sdk/sdl/roles.py +64 -0
  46. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/testing/mock_context.py +8 -10
  47. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/types/chat_result.py +5 -4
  48. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/types/contracts.py +3 -3
  49. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/validator.py +5 -3
  50. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/validator_v1_6_0.py +30 -60
  51. imperal_sdk-5.2.0/tests/contract/test_contract_checks_selftest.py +53 -0
  52. imperal_sdk-5.2.0/tests/contract/test_generate_sdk_claims.py +33 -0
  53. imperal_sdk-5.2.0/tests/contract/test_sample_contract_shape.py +17 -0
  54. imperal_sdk-5.2.0/tests/contract/test_sdk_matches_kernel_contract.py +96 -0
  55. imperal_sdk-5.2.0/tests/fixtures/contract/kernel-contract.sample.json +28 -0
  56. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_context.py +0 -1
  57. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_mock_context.py +3 -12
  58. imperal_sdk-5.2.0/tests/test_phase_a_dead_removal.py +50 -0
  59. imperal_sdk-5.2.0/tests/test_phase_a_drift.py +58 -0
  60. imperal_sdk-5.2.0/tests/test_phase_a_text.py +74 -0
  61. imperal_sdk-5.2.0/tests/test_sdl_entity.py +81 -0
  62. imperal_sdk-5.2.0/tests/test_sdl_entity_marker.py +20 -0
  63. imperal_sdk-5.2.0/tests/test_sdl_exports.py +27 -0
  64. imperal_sdk-5.2.0/tests/test_sdl_facet_catalog.py +92 -0
  65. imperal_sdk-5.2.0/tests/test_sdl_facet_collisions.py +20 -0
  66. imperal_sdk-5.2.0/tests/test_sdl_facet_comm.py +108 -0
  67. imperal_sdk-5.2.0/tests/test_sdl_facet_content.py +76 -0
  68. imperal_sdk-5.2.0/tests/test_sdl_facet_device.py +144 -0
  69. imperal_sdk-5.2.0/tests/test_sdl_facet_event.py +82 -0
  70. imperal_sdk-5.2.0/tests/test_sdl_facet_exports.py +30 -0
  71. imperal_sdk-5.2.0/tests/test_sdl_facet_field.py +32 -0
  72. imperal_sdk-5.2.0/tests/test_sdl_facet_geo.py +72 -0
  73. imperal_sdk-5.2.0/tests/test_sdl_facet_identity.py +64 -0
  74. imperal_sdk-5.2.0/tests/test_sdl_facet_media.py +72 -0
  75. imperal_sdk-5.2.0/tests/test_sdl_facet_metric.py +72 -0
  76. imperal_sdk-5.2.0/tests/test_sdl_facet_money.py +86 -0
  77. imperal_sdk-5.2.0/tests/test_sdl_facet_net.py +105 -0
  78. imperal_sdk-5.2.0/tests/test_sdl_facet_people.py +90 -0
  79. imperal_sdk-5.2.0/tests/test_sdl_facet_quantity.py +71 -0
  80. imperal_sdk-5.2.0/tests/test_sdl_facet_rating.py +60 -0
  81. imperal_sdk-5.2.0/tests/test_sdl_facet_security.py +113 -0
  82. imperal_sdk-5.2.0/tests/test_sdl_facet_task.py +77 -0
  83. imperal_sdk-5.2.0/tests/test_sdl_facet_time.py +38 -0
  84. imperal_sdk-5.2.0/tests/test_sdl_facets_catalog.py +39 -0
  85. imperal_sdk-5.2.0/tests/test_sdl_facets_doc.py +20 -0
  86. imperal_sdk-5.2.0/tests/test_sdl_facets_pkg.py +8 -0
  87. imperal_sdk-5.2.0/tests/test_sdl_field.py +48 -0
  88. imperal_sdk-5.2.0/tests/test_sdl_roles.py +54 -0
  89. imperal_sdk-5.2.0/tests/test_sdl_roles_json.py +35 -0
  90. imperal_sdk-5.2.0/tests/test_sdl_roles_of_facets.py +22 -0
  91. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_validator_drift.py +7 -7
  92. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_validator_v1_6_0_rules.py +10 -47
  93. imperal_sdk-5.2.0/tests/tools/__init__.py +0 -0
  94. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/tools/test_generate_api_surface.py +1 -1
  95. imperal_sdk-5.0.3/src/imperal_sdk/db/__init__.py +0 -4
  96. imperal_sdk-5.0.3/src/imperal_sdk/db/client.py +0 -36
  97. imperal_sdk-5.0.3/src/imperal_sdk/tools/__init__.py +0 -3
  98. imperal_sdk-5.0.3/src/imperal_sdk/tools/client.py +0 -105
  99. imperal_sdk-5.0.3/tests/test_tools_client.py +0 -95
  100. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/.github/workflows/publish.yml +0 -0
  101. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/.github/workflows/test.yml +0 -0
  102. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/LICENSE +0 -0
  103. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/README.md +0 -0
  104. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/pyproject.toml +0 -0
  105. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/.codebase-index-cache.pkl +0 -0
  106. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/ai/__init__.py +0 -0
  107. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/ai/client.py +0 -0
  108. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/auth/__init__.py +0 -0
  109. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/auth/client.py +0 -0
  110. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/auth/middleware.py +0 -0
  111. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/billing/__init__.py +0 -0
  112. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/cache/__init__.py +0 -0
  113. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/cache/client.py +0 -0
  114. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/cache/protocol.py +0 -0
  115. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/chat/__init__.py +0 -0
  116. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/chat/action_result.py +0 -0
  117. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/chat/error_codes.py +0 -0
  118. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/chat/exceptions.py +0 -0
  119. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/chat/guards.py +0 -0
  120. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/chat/kernel_primitives.py +0 -0
  121. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/chat/narration.py +0 -0
  122. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/chat/narration_guard.py +0 -0
  123. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/chat/prompt.py +0 -0
  124. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/chat/refusal.py +0 -0
  125. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/cli/__init__.py +0 -0
  126. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/cli/main.py +0 -0
  127. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/config/__init__.py +0 -0
  128. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/config/client.py +0 -0
  129. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/errors.py +0 -0
  130. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/extension.py +0 -0
  131. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/extensions/__init__.py +0 -0
  132. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/http/__init__.py +0 -0
  133. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/http/client.py +0 -0
  134. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/notify/__init__.py +0 -0
  135. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/notify/client.py +0 -0
  136. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/prompts/__init__.py +0 -0
  137. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/prompts/icnli_integrity_rules.txt +0 -0
  138. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/prompts/kernel_formatting_rule.txt +0 -0
  139. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/prompts/kernel_proactivity_rule.txt +0 -0
  140. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/protocols.py +0 -0
  141. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/rpc/__init__.py +0 -0
  142. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/rpc/codec.py +0 -0
  143. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/rpc/contract.py +0 -0
  144. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/runtime/__init__.py +0 -0
  145. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/runtime/executor.py +0 -0
  146. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/runtime/llm_provider.py +0 -0
  147. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/runtime/message_adapter.py +0 -0
  148. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/schemas/action_result.schema.json +0 -0
  149. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/schemas/balance_info.schema.json +0 -0
  150. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/schemas/completion_result.schema.json +0 -0
  151. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/schemas/document.schema.json +0 -0
  152. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/schemas/event.schema.json +0 -0
  153. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/schemas/file_info.schema.json +0 -0
  154. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/schemas/function_call.schema.json +0 -0
  155. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/schemas/http_response.schema.json +0 -0
  156. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/schemas/imperal.schema.json +0 -0
  157. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/schemas/limits_result.schema.json +0 -0
  158. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/schemas/subscription_info.schema.json +0 -0
  159. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/secrets/__init__.py +0 -0
  160. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/secrets/client.py +0 -0
  161. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/secrets/exceptions.py +0 -0
  162. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/secrets/panel_handler.py +0 -0
  163. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/secrets/spec.py +0 -0
  164. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/security/__init__.py +0 -0
  165. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/security/call_token.py +0 -0
  166. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/skeleton/__init__.py +0 -0
  167. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/skeleton/client.py +0 -0
  168. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/storage/__init__.py +0 -0
  169. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/storage/client.py +0 -0
  170. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/store/__init__.py +0 -0
  171. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/store/client.py +0 -0
  172. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/store/exceptions.py +0 -0
  173. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/testing/__init__.py +0 -0
  174. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/testing/mock_secrets.py +0 -0
  175. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/types/__init__.py +0 -0
  176. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/types/action_result.py +0 -0
  177. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/types/client_contracts.py +0 -0
  178. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/types/contributions.py +0 -0
  179. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/types/events.py +0 -0
  180. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/types/health.py +0 -0
  181. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/types/identity.py +0 -0
  182. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/types/models.py +0 -0
  183. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/types/pagination.py +0 -0
  184. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/types/store_contracts.py +0 -0
  185. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/ui/__init__.py +0 -0
  186. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/ui/actions.py +0 -0
  187. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/ui/base.py +0 -0
  188. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/ui/data.py +0 -0
  189. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/ui/display.py +0 -0
  190. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/ui/feedback.py +0 -0
  191. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/ui/graph.py +0 -0
  192. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/ui/input_components.py +0 -0
  193. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/ui/interactive.py +0 -0
  194. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/ui/layout.py +0 -0
  195. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/src/imperal_sdk/ui/theme.py +0 -0
  196. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/conftest.py +0 -0
  197. {imperal_sdk-5.0.3/tests/contracts → imperal_sdk-5.2.0/tests/contract}/__init__.py +0 -0
  198. {imperal_sdk-5.0.3/tests/rpc → imperal_sdk-5.2.0/tests/contracts}/__init__.py +0 -0
  199. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/contracts/test_store_contracts.py +0 -0
  200. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/fixtures/openapi/auth-gateway.json +0 -0
  201. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/fixtures/openapi/registry.json +0 -0
  202. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/fixtures/openapi/sharelock-cases.json +0 -0
  203. {imperal_sdk-5.0.3/tests/runtime → imperal_sdk-5.2.0/tests/rpc}/__init__.py +0 -0
  204. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/rpc/test_codec.py +0 -0
  205. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/rpc/test_contract.py +0 -0
  206. {imperal_sdk-5.0.3/tests/store → imperal_sdk-5.2.0/tests/runtime}/__init__.py +0 -0
  207. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/runtime/test_llm_provider_config_store.py +0 -0
  208. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/runtime/test_llm_provider_ctx_injection.py +0 -0
  209. {imperal_sdk-5.0.3/tests/tools → imperal_sdk-5.2.0/tests/store}/__init__.py +0 -0
  210. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/store/test_list_users_client.py +0 -0
  211. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/store/test_query_all_client.py +0 -0
  212. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_action_result_typed.py +0 -0
  213. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_as_user.py +0 -0
  214. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_auth.py +0 -0
  215. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_billing.py +0 -0
  216. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_cache_client.py +0 -0
  217. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_cache_model.py +0 -0
  218. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_call_token.py +0 -0
  219. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_chat_extension_deprecation.py +0 -0
  220. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_chat_extension_no_llm_router.py +0 -0
  221. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_chat_filters.py +0 -0
  222. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_chat_function_background_flag.py +0 -0
  223. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_chat_guards.py +0 -0
  224. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_chat_guards_bleed.py +0 -0
  225. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_chat_prompt.py +0 -0
  226. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_chat_result.py +0 -0
  227. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_cli.py +0 -0
  228. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_client_contracts.py +0 -0
  229. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_config_client.py +0 -0
  230. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_context_background_task.py +0 -0
  231. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_context_deliver_chat_message.py +0 -0
  232. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_context_guards.py +0 -0
  233. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_contracts.py +0 -0
  234. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_contracts_live.py +0 -0
  235. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_contributions.py +0 -0
  236. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_data_model_kwarg.py +0 -0
  237. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_document_contract.py +0 -0
  238. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_emits_decorator.py +0 -0
  239. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_error_codes.py +0 -0
  240. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_errors.py +0 -0
  241. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_event_schema_v2.py +0 -0
  242. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_events_health.py +0 -0
  243. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_extension.py +0 -0
  244. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_extension_v2.py +0 -0
  245. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_extensions_emit.py +0 -0
  246. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_http_timeout_override.py +0 -0
  247. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_id_shape_guard.py +0 -0
  248. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_identity_contract.py +0 -0
  249. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_imperal_schema_v2.py +0 -0
  250. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_kernel_primitives.py +0 -0
  251. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_manifest.py +0 -0
  252. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_manifest_no_orchestrator_tool.py +0 -0
  253. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_manifest_roundtrip_gate.py +0 -0
  254. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_manifest_schema.py +0 -0
  255. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_manifest_v2_events.py +0 -0
  256. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_manifest_v2_other_sections.py +0 -0
  257. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_manifest_v2_webhooks.py +0 -0
  258. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_manifest_validator_v2.py +0 -0
  259. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_models.py +0 -0
  260. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_narration_emission.py +0 -0
  261. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_narration_guard.py +0 -0
  262. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_openai_max_completion_tokens.py +0 -0
  263. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_pagination.py +0 -0
  264. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_panel_rendering_contract.py +0 -0
  265. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_panels.py +0 -0
  266. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_sdk_version_stamp.py +0 -0
  267. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_skeleton_decorator.py +0 -0
  268. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_spec_validation.py +0 -0
  269. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_ui.py +0 -0
  270. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_ui_fileupload_enhanced.py +0 -0
  271. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_ui_html.py +0 -0
  272. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_ui_image_enhanced.py +0 -0
  273. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_ui_open.py +0 -0
  274. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_ui_theme.py +0 -0
  275. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_user.py +0 -0
  276. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_v7_emit_refusal.py +0 -0
  277. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_validator.py +0 -0
  278. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_validator_pep563.py +0 -0
  279. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_validator_v25.py +0 -0
  280. {imperal_sdk-5.0.3 → imperal_sdk-5.2.0}/tests/test_write_arg_bleed.py +0 -0
@@ -77,7 +77,7 @@ jobs:
77
77
  if: steps.authgw_checkout.outcome == 'success'
78
78
  working-directory: sdk
79
79
  run: |
80
- python -m imperal_sdk.tools.validate_identity_contract \
80
+ python -m imperal_sdk.devtools.validate_identity_contract \
81
81
  --authgw-path=../auth-gw/releases/initial/app
82
82
 
83
83
  - name: Note when auth-gw parity skipped
@@ -7,6 +7,8 @@ build/
7
7
  .eggs/
8
8
  *.egg
9
9
  .venv/
10
+ .venv311/
11
+ .venv*/
10
12
  venv/
11
13
  .env
12
14
  .env.local
@@ -2,6 +2,96 @@
2
2
 
3
3
  All notable changes to `imperal-sdk` are documented here.
4
4
 
5
+ ## 5.2.0 — 2026-05-31 — Structured Data Layer (SDL) foundation
6
+
7
+ Introduces the **SDL (`imperal_sdk.sdl`)** — a typed, semantic vocabulary for the
8
+ data an extension returns, so the platform can read an entity's id / title / kind
9
+ and its facets directly instead of inferring them from field names. This release
10
+ ships the SDK foundation (canonical types + the standard facet library + a schema
11
+ marker for platform detection); the platform begins reading SDL behind a rollout
12
+ flag in a later release. Fully **additive** — the existing API and existing
13
+ extensions are unchanged; adopting SDL is opt-in via `data_model=`.
14
+
15
+ ### Added
16
+
17
+ - **SDL — Structured Data Layer (Phase 1: Core).** New `imperal_sdk.sdl` module
18
+ for returning *typed* entities whose field meanings the platform reads directly
19
+ instead of inferring from field names:
20
+ - `sdl.Entity` — canonical base with `id` / `title` / `kind` (+ optional
21
+ `subtitle` / `description` / `status` / `url`). `kind` defaults to the
22
+ subclass name.
23
+ - `sdl.Ref` — lightweight reference (id / kind / title / app_id) for relations
24
+ and list items.
25
+ - `sdl.EntityList[T]` — typed list with `items` / `total` / `page` / `has_more`.
26
+ - `sdl.field(role="...")` — declare a custom semantic role on a field; roles
27
+ follow a dotted grammar and reserved namespaces are protected.
28
+ - `sdl.roles_of(model)` — introspect a model's field→role map.
29
+
30
+ Use it via `data_model=` on `@chat.function` (e.g.
31
+ `class Note(sdl.Entity): ...` → `data_model=Note`). Full platform integration
32
+ arrives in a later phase. Not yet wired into the platform.
33
+ - **SDL — Standard Facet Library (Phase 2).** 123 composable facet mixins across
34
+ 17 families (Identity, Time, People, Content, Communication, Media, Quantities,
35
+ Money, Catalog, Tasks, Location, Tech/Network, Analytics, Events, Ratings,
36
+ Security, Devices/Health). Compose the facets an entity needs and every field
37
+ carries a standard semantic role:
38
+
39
+ ```python
40
+ class Task(sdl.Entity, sdl.Schedulable, sdl.Prioritized, sdl.Progress):
41
+ estimate_s: int | None = None
42
+ ```
43
+
44
+ 564 standard roles are catalogued in `sdl_roles.json`. Every facet field is
45
+ optional; for anything not covered, use `sdl.field(role="yourapp.x")` with a
46
+ non-reserved namespace. Full guide: `docs/sdl-facets.md`. Still not wired into
47
+ the platform — extensions can adopt the types now; the platform begins reading
48
+ them in a later phase.
49
+ - **SDL — schema marker on `Entity` / `EntityList`.** Both stamp
50
+ `x-sdl: "entity"` / `"entity-list"` into their JSON schema so the platform can
51
+ detect an SDL-typed result from a function's return schema alone. Inherited by
52
+ subclasses — no extension action needed beyond subclassing `sdl.Entity`.
53
+
54
+ ## 5.1.0 — 2026-05-30 — Accuracy & correctness pass
55
+
56
+ This release makes the SDK faithful to current platform behavior: a billing
57
+ fix, removal of unused surface, a corrected limit, and documentation that now
58
+ matches what the platform actually does. Everything removed was unused (never
59
+ wired by the platform); the single signature change is on a method that
60
+ previously could not record usage correctly.
61
+
62
+ ### Fixed
63
+
64
+ - **`ctx.billing.track_usage(...)` now records the requested amount.** Previously
65
+ every call was recorded as a single unit regardless of the amount passed, and
66
+ one code path could not reach the platform at all. The method now sends the
67
+ correct request. **Signature changed** to
68
+ `track_usage(meter: str, quantity: int = 1, user=None) -> bool`
69
+ (previously `track_usage(tokens, resource)`).
70
+ - **Inter-extension call-depth limit** now matches the platform's actual nesting
71
+ allowance, so a legitimate chain of nested `ctx.extensions.call(...)` hops is no
72
+ longer rejected one level too early.
73
+ - **Manifest pre-flight validation** now reports an `sdk_version` below `5.0.0`
74
+ as an error. The platform rejects such extensions at load, so this is now
75
+ caught before deploy instead of after.
76
+
77
+ ### Removed (unused — never wired by the platform)
78
+
79
+ - `ctx.db` and `ctx.tools` — use `ctx.extensions` for inter-extension calls.
80
+ - The `event_schema=` parameter on `@chat.function`.
81
+ - `ctx.config.require()` — use `ctx.config.get(...)`.
82
+ - Internal LLM-router methods left over from the 5.0.0 refactor.
83
+
84
+ ### Documentation & test doubles
85
+
86
+ - `effects`, `background`, and `long_running` are now documented as advisory,
87
+ declared-intent metadata. Declare them for convention; the long-running
88
+ runtime path remains `ctx.background_task(long_running=...)`.
89
+ - Corrected the documented behavior of `data_model`, `chain_callable`, and
90
+ `validate_manifest_dict` (which raises on duplicate webhook paths,
91
+ cross-namespace event types, and duplicate exposed names).
92
+ - `MockSkeleton` is read-only, matching the real skeleton client; tests prime
93
+ sections via the test-only `_seed(...)` helper.
94
+
5
95
  ## 5.0.3 — 2026-05-27 — Manifest `hidden_in_sidebar` field (system-only)
6
96
 
7
97
  System apps may opt out of the Imperal Panel sidebar tile by declaring
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: imperal-sdk
3
- Version: 5.0.3
3
+ Version: 5.2.0
4
4
  Summary: SDK for building Imperal Cloud extensions
5
5
  Author: Valentin Scerbacov, Imperal, Inc.
6
6
  License-Expression: AGPL-3.0-or-later
@@ -24,8 +24,7 @@
24
24
  "send"
25
25
  ],
26
26
  "skeleton": [
27
- "get",
28
- "update"
27
+ "get"
29
28
  ],
30
29
  "storage": [
31
30
  "delete",
@@ -0,0 +1,502 @@
1
+ # SDL Facet Library — Developer Guide
2
+
3
+ The **Structured Data Layer (SDL)** lets your `@chat.function` return typed entities that the platform can read, render, and act on — without any name-guessing. You compose `sdl.Entity` with one or more **facets**: thin mixins that add optional, semantically-tagged fields to your entity class. Every facet field carries a standard role (e.g. `time.created_at`, `task.priority`) so the platform knows exactly what each field means regardless of your extension's naming conventions.
4
+
5
+ ## Quick start
6
+
7
+ ```python
8
+ from imperal_sdk import sdl
9
+ from imperal_sdk.chat import ChatExtension, ActionResult
10
+
11
+ chat = ChatExtension(...)
12
+
13
+ class Task(sdl.Entity, sdl.Schedulable, sdl.Prioritized, sdl.Progress):
14
+ estimate_s: int | None = None
15
+
16
+ @chat.function("get_task", "Open a task", action_type="read", data_model=Task)
17
+ async def get_task(ctx, params) -> ActionResult:
18
+ return ActionResult.success(
19
+ Task(id=7, title="Ship SDL", priority="high", progress=0.5),
20
+ summary="Task loaded.",
21
+ )
22
+ ```
23
+
24
+ ## Rules
25
+
26
+ - **All facet fields are optional** — every field defaults to `None` (or `[]` for list fields). Facets add capability; they never introduce required fields beyond the `Entity` core (`id`, `title`, `kind`, plus optional `subtitle`, `description`, `status`, `url`).
27
+ - **The platform reads roles directly** — you do not need to match a specific field name. Mix in `Schedulable` and the platform knows `start_at` means `time.start_at`, regardless of your entity's class name.
28
+ - **Custom fields** — for anything not covered by a standard facet, use `sdl.field(role="yourapp.something")` where `yourapp` is a namespace you own (any non-reserved namespace). Do not use reserved namespaces (`core`, `time`, `people`, `content`, `comm`, `media`, `quantity`, `money`, `catalog`, `task`, `geo`, `net`, `metric`, `event`, `rating`, `sec`, `device`) for custom fields.
29
+ - **Collision-safe composition** — all 123 standard facets are designed to be mixed into the same entity without field-name conflicts.
30
+
31
+ ---
32
+
33
+ ## Family reference
34
+
35
+ ### Identity & Provenance (`core.*`)
36
+
37
+ Use these facets to describe localization, versioning, iconography, and lifecycle state of an entity.
38
+
39
+ **Localized** — multi-language metadata:
40
+ `language`, `languages`, `text_direction`, `locale`, `localized_title`, `localized_description`, `available_locales`
41
+
42
+ **Versioned** — release and revision tracking:
43
+ `version`, `semver`, `revision`, `revision_of`, `is_latest`, `content_hash`, `channel`, `released_at`
44
+
45
+ **Iconified** — visual identity:
46
+ `icon`, `emoji`, `color_hex`, `avatar_url`
47
+
48
+ **Lifecycle** — soft-delete, pin, favourite, and visibility state:
49
+ `is_archived`, `is_pinned`, `is_favorite`, `is_deleted`, `visibility`
50
+
51
+ ---
52
+
53
+ ### Time (`time.*`)
54
+
55
+ Use these facets to describe timestamps, schedules, durations, recurrence patterns, and booking windows.
56
+
57
+ **Timestamped** — creation and modification times:
58
+ `created_at`, `updated_at`, `deleted_at`
59
+
60
+ **Schedulable** — start/end/due windows and timezone:
61
+ `start_at`, `end_at`, `due_at`, `all_day`, `timezone`
62
+
63
+ **Duration** — how long something takes:
64
+ `duration_s`, `duration_display_unit`
65
+
66
+ **Recurring** — repeating occurrences:
67
+ `recurrence_rule`, `recurrence_until`, `recurrence_count`, `is_recurring_master`, `next_occurrence_at`, `recurrence_anchor`
68
+
69
+ **Booked** — reservation lifecycle:
70
+ `booked_at`, `check_in_at`, `check_out_at`, `cancelled_at`, `cancellation_deadline`
71
+
72
+ ---
73
+
74
+ ### People & Identity (`people.*`)
75
+
76
+ Use these facets to associate people, teams, and contact information with an entity.
77
+
78
+ **Authorship** — who created or owns it:
79
+ `creator`, `author`, `owner`, `last_editor`, `editors`, `contributors`
80
+
81
+ **Assignable** — who is responsible for it:
82
+ `assignee`, `assignees`, `reviewer`, `reviewers`, `team`, `delegated_by`, `assigned_at`
83
+
84
+ **Participants** — group membership and presence:
85
+ `members`, `admins`, `host`, `organizer`, `participant_count`, `active_now`, `typing`, `join_state`
86
+
87
+ **Correspondents** — email/message addressing:
88
+ `sender`, `recipients_to`, `recipients_cc`, `recipients_bcc`, `reply_to`, `recipient_count`
89
+
90
+ **ContactPoints** — contact channels:
91
+ `emails`, `phones`, `social_handles`, `website_url`, `preferred_channel`
92
+
93
+ **Presence** — real-time availability:
94
+ `online_status`, `status_message`, `status_emoji`, `last_seen_at`, `active_until`
95
+
96
+ ---
97
+
98
+ ### Content & Documents (`content.*`)
99
+
100
+ Use these facets for entities that carry body text, summaries, categories, attachments, or editorial workflow state.
101
+
102
+ **Bodied** — rich body content:
103
+ `body`, `body_format`, `raw_body`
104
+
105
+ **Excerptable** — preview and readability metadata:
106
+ `excerpt`, `summary`, `word_count`, `reading_time_s`
107
+
108
+ **Categorized** — tags, categories, topics, and labels:
109
+ `tags`, `categories`, `topics`, `keywords`, `labels`
110
+
111
+ **Attached** — file and image attachments:
112
+ `attachments`, `attachment_count`, `has_attachments`, `inline_images`
113
+
114
+ **Editorial** — publishing workflow:
115
+ `editorial_state`, `editorial_is_draft`, `published_at`, `first_published_at`
116
+
117
+ ---
118
+
119
+ ### Communication (`comm.*`)
120
+
121
+ Use these facets for messaging, conversation threads, delivery state, reactions, calls, and drafts.
122
+
123
+ **Conversational** — conversation-level metadata:
124
+ `conversation_ref`, `conversation_type`, `channel_name`, `is_group`, `conversation_participant_count`, `last_message_at`, `last_preview`
125
+
126
+ **Threaded** — reply chains and nesting:
127
+ `thread_ref`, `reply_to_message`, `root`, `depth`
128
+
129
+ **MessageState** — delivery and read state:
130
+ `direction`, `is_read`, `delivery_state`, `sent_at`, `edited_at`, `is_from_me`
131
+
132
+ **Reactable** — emoji reactions:
133
+ `reactions`, `reaction_count`, `my_reactions`
134
+
135
+ **Callable** — voice/video call metadata:
136
+ `call_direction`, `call_type`, `call_state`, `answered`, `end_reason`, `ring_duration_s`
137
+
138
+ **Draftable** — draft and scheduled-send state:
139
+ `is_draft`, `scheduled_send_at`, `last_saved_at`, `is_auto_generated`
140
+
141
+ ---
142
+
143
+ ### Media & Files (`media.*`)
144
+
145
+ Use these facets for files, images, audio/video tracks, archives, content safety scanning, and transcription.
146
+
147
+ **FileObject** — generic file descriptor:
148
+ `filename`, `extension`, `mime_type`, `size_bytes`, `media_class`, `path`, `checksum_sha256`, `permissions`
149
+
150
+ **ImageMedia** — image dimensions and metadata:
151
+ `width`, `height`, `color_space`, `exif`, `blurhash`
152
+
153
+ **AudioTrack** — audio encoding properties:
154
+ `audio_codec`, `bitrate_kbps`, `sample_rate_hz`, `channels`, `bit_depth`, `loudness_lufs`
155
+
156
+ **VideoTrack** — video encoding properties:
157
+ `video_codec`, `video_resolution`, `fps`, `video_bitrate_kbps`, `hdr`
158
+
159
+ **Archive** — compressed archive metadata:
160
+ `archive_format`, `entry_count`, `uncompressed_size_bytes`, `compression_ratio`, `is_encrypted`
161
+
162
+ **ContentSafety** — moderation and virus scan results:
163
+ `scan_state`, `is_nsfw`, `moderation_labels`, `virus_name`, `scanned_at`
164
+
165
+ **Transcribable** — speech-to-text output:
166
+ `transcript`, `captions_url`, `transcript_language`
167
+
168
+ ---
169
+
170
+ ### Quantities & Units (`quantity.*`)
171
+
172
+ Use these facets for measured values with units, ranges, physical dimensions, and common physical quantities.
173
+
174
+ **Measured** — a generic scalar measurement:
175
+ `value`, `unit`, `dimension`, `unit_family`, `value_type`, `uncertainty`, `formatted_value`
176
+
177
+ **Range** — a bounded numeric range with optional target:
178
+ `min_value`, `max_value`, `target`
179
+
180
+ **Dimensions3D** — physical width/height/depth:
181
+ `dim_width`, `dim_height`, `dim_depth`, `dim_unit`
182
+
183
+ **Area** — surface area:
184
+ `area_m2`, `area_unit`
185
+
186
+ **Angle** — angular measurement:
187
+ `angle_deg`, `angle_unit`
188
+
189
+ **Bitrate** — data transfer rate:
190
+ `bitrate_bps`, `bitrate_unit`
191
+
192
+ **DataSize** — storage size in bytes:
193
+ `bytes`, `data_size_unit`
194
+
195
+ **Temperature** — temperature reading:
196
+ `temp_c`, `temp_unit`
197
+
198
+ **Length** — linear measurement:
199
+ `length_m`, `length_unit`
200
+
201
+ **Weight** — mass measurement:
202
+ `weight_kg`, `weight_unit`
203
+
204
+ **Speed** — velocity measurement:
205
+ `speed_mps`, `speed_unit`
206
+
207
+ **Percentage** — a fractional percentage value:
208
+ `percent`
209
+
210
+ ---
211
+
212
+ ### Money & Commerce (`money.*`)
213
+
214
+ Use these facets for monetary values, pricing, discounts, subscriptions, account balances, and invoices.
215
+
216
+ **Monetary** — a simple currency amount:
217
+ `amount`, `currency`
218
+
219
+ **Priced** — product pricing with list/compare prices:
220
+ `unit_price`, `list_price`, `compare_at_price`, `price_currency`, `price_includes_tax`
221
+
222
+ **Discountable** — sale pricing and discount percentage:
223
+ `sale_price`, `discount_pct`, `is_on_sale`
224
+
225
+ **Subscribable** — subscription billing state and intervals:
226
+ `subscription_status`, `billing_interval`, `billing_interval_count`, `current_period_start`, `current_period_end`, `trial_end`, `recurring_amount`, `cancel_at_period_end`
227
+
228
+ **Balanced** — account balance breakdown:
229
+ `balance`, `balance_currency`, `available_balance`, `pending_balance`, `credit_limit`
230
+
231
+ **Invoiced** — invoice and payment state:
232
+ `invoice_number`, `total`, `tax`, `payment_status`, `paid_at`, `invoice_due_at`
233
+
234
+ ---
235
+
236
+ ### Catalog, Products & Inventory (`catalog.*`)
237
+
238
+ Use these facets for product catalog entities: brand identity, stock levels, bundles, materials, and compliance.
239
+
240
+ **Branded** — brand and manufacturer identity:
241
+ `brand`, `manufacturer`, `model_name`, `model_year`, `country_of_origin`
242
+
243
+ **Inventory** — stock availability:
244
+ `in_stock`, `availability`, `low_stock_threshold`, `is_low_stock`, `backorderable`, `preorder`
245
+
246
+ **Bundle** — product bundle composition:
247
+ `is_bundle`, `bundle_items`, `bundle_type`
248
+
249
+ **ColorMaterial** — visual and material attributes:
250
+ `color`, `material_color_hex`, `material`, `pattern`, `finish`
251
+
252
+ **ProductCompliance** — regulatory and age-restriction metadata:
253
+ `certifications`, `hs_code`, `age_restriction`, `restricted_regions`, `requires_prescription`
254
+
255
+ ---
256
+
257
+ ### Tasks & Workflow (`task.*`)
258
+
259
+ Use these facets for task management: priority, progress, completion, blockers, dependencies, kanban boards, checklists, workflow states, approvals, and time estimates.
260
+
261
+ **Prioritized** — priority, urgency, and severity levels:
262
+ `priority`, `urgency`, `severity`
263
+
264
+ **Progress** — completion percentage and item counts:
265
+ `progress`, `done_count`, `total_count`
266
+
267
+ **Completable** — done state and resolution:
268
+ `is_done`, `completed_at`, `completed_by`, `resolution`
269
+
270
+ **Blockable** — blocker state and reason:
271
+ `is_blocked`, `blocked_reason`, `blocked_since`, `waiting_on`
272
+
273
+ **Dependencies** — upstream and downstream task links:
274
+ `blocks`, `blocked_by`, `related`
275
+
276
+ **Boarded** — kanban board and column placement:
277
+ `board`, `column`, `swimlane`, `position`
278
+
279
+ **Checklist** — subtask checklists:
280
+ `checklist_items`, `checked_count`, `checklist_total`
281
+
282
+ **WorkflowState** — state machine position and transitions:
283
+ `state`, `allowed_transitions`, `entered_state_at`
284
+
285
+ **Approvable** — approval workflow:
286
+ `approval_status`, `approver`, `decided_at`, `decision_note`
287
+
288
+ **Estimable** — time estimates and actuals:
289
+ `estimate_s`, `spent_s`, `remaining_s`
290
+
291
+ ---
292
+
293
+ ### Location & Geo (`geo.*`)
294
+
295
+ Use these facets for geographic coordinates, postal addresses, administrative regions, bounding boxes, geofences, routing, and named places.
296
+
297
+ **Geolocated** — GPS/GNSS coordinates with accuracy:
298
+ `lat`, `lon`, `altitude_m`, `accuracy_m`, `heading_deg`, `geo_speed_mps`, `located_at`
299
+
300
+ **PostalAddress** — mailing address:
301
+ `street`, `city`, `postal_code`, `region`, `country`
302
+
303
+ **AdminRegion** — administrative hierarchy:
304
+ `country_code`, `region_code`, `county`, `locality`, `neighborhood`, `continent`
305
+
306
+ **BoundingBox** — geographic bounding rectangle:
307
+ `min_lat`, `min_lon`, `max_lat`, `max_lon`
308
+
309
+ **Geofence** — circular geofence with trigger conditions:
310
+ `center_lat`, `center_lon`, `radius_m`, `trigger`, `dwell_s`
311
+
312
+ **Routed** — origin/destination routing:
313
+ `origin`, `destination`, `distance_m`, `route_duration_s`, `waypoints`
314
+
315
+ **Placed** — named place identity:
316
+ `place_name`, `place_type`, `plus_code`
317
+
318
+ ---
319
+
320
+ ### Tech / Infra / Network / Data (`net.*`)
321
+
322
+ Use these facets for infrastructure entities: network assets, API endpoints, hosts, compute specs, containers, service health, TLS certificates, data records, config settings, and backups.
323
+
324
+ **NetAsset** — a DNS/IP network resource:
325
+ `domain`, `ip`, `port`, `protocol`, `record_type`
326
+
327
+ **ApiEndpoint** — an HTTP API operation:
328
+ `method`, `api_path`, `operation_id`, `auth_required`, `deprecated`
329
+
330
+ **HostResource** — a named host or cloud resource:
331
+ `hostname`, `resource_id`, `environment`, `host_region`
332
+
333
+ **ComputeSpec** — CPU/memory/disk/GPU capacity:
334
+ `vcpus`, `memory_bytes`, `disk_bytes`, `gpu_count`, `arch`
335
+
336
+ **Container** — a running container or service:
337
+ `container_id`, `container_name`, `image`, `image_digest`, `runtime`, `compose_project`
338
+
339
+ **ServiceHealth** — health check and uptime:
340
+ `health`, `uptime_s`, `last_check_at`
341
+
342
+ **Certificated** — TLS/X.509 certificate metadata:
343
+ `cert_issuer`, `cert_subject`, `not_after`, `fingerprint`, `cert_is_valid`
344
+
345
+ **DataRecord** — a database row or query result:
346
+ `table`, `row_id`, `query`, `schema_ref`
347
+
348
+ **ConfigSetting** — a configuration key/value pair:
349
+ `config_key`, `config_value`, `config_value_type`, `is_secret`, `config_source`, `default_value`
350
+
351
+ **Backup** — a point-in-time backup snapshot:
352
+ `snapshot_id`, `source_resource`, `taken_at`, `backup_size_bytes`, `retain_until`, `backup_kind`, `backup_is_verified`
353
+
354
+ ---
355
+
356
+ ### Analytics & Metrics (`metric.*`)
357
+
358
+ Use these facets for aggregated metrics, time series points, trends, statistical confidence, thresholds, and multi-dimensional data.
359
+
360
+ **Aggregated** — a windowed aggregation:
361
+ `aggregation`, `window_start`, `window_end`, `granularity`, `fill_policy`
362
+
363
+ **TimeSeriesPoint** — a single time series data point:
364
+ `ts_timestamp`, `ts_value`
365
+
366
+ **Trended** — delta and trend direction:
367
+ `delta`, `change_pct`, `trend`, `trend_period`
368
+
369
+ **Confident** — statistical confidence interval:
370
+ `confidence_level`, `ci_lower`, `ci_upper`, `margin_of_error`, `p_value`, `is_significant`
371
+
372
+ **Threshold** — alert threshold and breach state:
373
+ `threshold_target`, `threshold`, `breached`
374
+
375
+ **Dimensioned** — arbitrary dimension labels for a metric:
376
+ `dimensions`
377
+
378
+ ---
379
+
380
+ ### Events & Tickets (`event.*`)
381
+
382
+ Use these facets for calendar events, venue capacity, RSVPs, tickets, admission policies, agenda slots, cancellations, and calendar feed integration.
383
+
384
+ **Eventful** — event venue and organizer:
385
+ `venue`, `event_organizer`, `event_host`, `event_type`
386
+
387
+ **Capacity** — attendee capacity and availability:
388
+ `capacity_total`, `capacity_remaining`, `registered_count`, `waitlist_count`, `is_sold_out`
389
+
390
+ **RSVP** — a person's RSVP and check-in state:
391
+ `rsvp_state`, `checked_in`, `is_no_show`, `check_in_method`
392
+
393
+ **Ticketed** — ticket and seat assignment:
394
+ `ticket_type`, `seat`, `barcode`, `ticket_price`
395
+
396
+ **AdmissionPolicy** — entry requirements:
397
+ `min_age`, `dress_code`, `requires_id`, `prohibited_items`, `doors_open_at`
398
+
399
+ **AgendaSlot** — a session within an event program:
400
+ `parent_event`, `track`, `session_type`, `order_index`, `speakers`
401
+
402
+ **Cancellation** — event or booking cancellation and refund policy:
403
+ `is_cancelled`, `refund_policy`, `refund_deadline`, `is_refundable`
404
+
405
+ **CalendarFeed** — iCal/ICS feed integration:
406
+ `ical_uid`, `ics_url`, `feed_url`, `calendar_name`, `calendar_color`
407
+
408
+ ---
409
+
410
+ ### Ratings & Feedback (`rating.*`)
411
+
412
+ Use these facets for star ratings, written reviews, sentiment analysis, and voting.
413
+
414
+ **Rated** — aggregate star/score rating:
415
+ `rating`, `max_score`, `rating_count`, `distribution`
416
+
417
+ **Reviewed** — a written review with verification:
418
+ `review_body`, `is_verified`, `helpfulness`, `would_recommend`
419
+
420
+ **Sentiment** — NLP sentiment classification:
421
+ `sentiment`, `sentiment_score`, `magnitude`
422
+
423
+ **Voted** — upvote/downvote counts:
424
+ `upvotes`, `downvotes`, `score`, `my_vote`
425
+
426
+ ---
427
+
428
+ ### Security / Legal / Compliance / Audit (`sec.*`)
429
+
430
+ Use these facets for access classification, permissions, audit logs, consent records, compliance controls, attestations, digital signatures, retention policies, alerts, case management, and risk scoring.
431
+
432
+ **AccessLeveled** — data classification and access visibility:
433
+ `classification`, `clearance_required`, `access_visibility`, `handling_caveats`
434
+
435
+ **Permissioned** — RBAC and CRUD permission flags:
436
+ `sec_permissions`, `role`, `can_read`, `can_write`, `can_delete`, `can_share`
437
+
438
+ **Auditable** — an audit trail entry:
439
+ `actor`, `action`, `audit_target`, `occurred_at`, `outcome`, `source_ip`, `changes`
440
+
441
+ **Consented** — a data consent record:
442
+ `consent_purpose`, `consent_state`, `consent_subject`, `granted_at`, `legal_basis`, `consent_proof`
443
+
444
+ **Compliant** — a compliance control assessment:
445
+ `framework`, `control_id`, `compliance_status`, `last_assessed_at`, `assessed_by`
446
+
447
+ **Attested** — a verification attestation:
448
+ `attestation_type`, `attestation_result`, `attested_by`, `attestation_confidence`
449
+
450
+ **Signed** — a digital signature:
451
+ `signature`, `signer`, `algorithm`, `signature_is_valid`, `signed_at`
452
+
453
+ **Retained** — data retention and legal hold:
454
+ `retention_class`, `sec_retain_until`, `legal_hold`
455
+
456
+ **Alertable** — a monitoring alert:
457
+ `alert_severity`, `alert_state`, `fired_at`, `resolved_at`, `rule_name`, `alert_threshold`
458
+
459
+ **Caseable** — a legal or support case:
460
+ `case_number`, `case_type`, `case_stage`, `opened_at`, `closed_at`, `case_resolution`, `jurisdiction`
461
+
462
+ **RiskScored** — a risk score and level:
463
+ `risk_score`, `risk_level`, `risk_factors`
464
+
465
+ ---
466
+
467
+ ### Devices / IoT / Sensors / Health (`device.*`)
468
+
469
+ Use these facets for IoT devices, sensors, actuators, consumables, fitness activity, body composition, vital signs, biometrics, sleep records, and AI provenance.
470
+
471
+ **DeviceIdentity** — device hardware identity:
472
+ `device_id`, `device_model`, `device_manufacturer`, `firmware_version`, `serial`
473
+
474
+ **DeviceState** — battery, signal, and connectivity state:
475
+ `online`, `battery_pct`, `signal_strength`, `device_last_seen_at`
476
+
477
+ **SensorReading** — a sensor measurement:
478
+ `sensor_type`, `sensor_value`, `sensor_unit`, `measured_at`, `quality`
479
+
480
+ **ActuatorState** — the state of a controllable device:
481
+ `on`, `level_pct`, `mode`, `locked`, `actuator_position`, `color_temp_k`, `actuator_color_hex`
482
+
483
+ **Consumable** — a replaceable consumable (ink, filter, battery):
484
+ `consumable_type`, `remaining_pct`, `replace_after_at`, `low`
485
+
486
+ **ActivityMetrics** — fitness activity summary:
487
+ `steps`, `activity_distance_m`, `active_calories_kcal`, `active_minutes`, `floors_climbed`
488
+
489
+ **BodyComposition** — body measurement snapshot:
490
+ `body_weight_kg`, `bmi`, `body_fat_pct`, `muscle_mass_kg`, `body_measured_at`
491
+
492
+ **VitalSign** — clinical vital signs:
493
+ `heart_rate_bpm`, `blood_pressure`, `spo2_pct`, `body_temp_c`, `respiratory_rate`
494
+
495
+ **Biometric** — a biometric measurement:
496
+ `biometric_type`, `biometric_value`, `biometric_unit`, `biometric_measured_at`, `biometric_context`, `reference_low`, `reference_high`
497
+
498
+ **SleepRecord** — a sleep session:
499
+ `sleep_duration_s`, `sleep_stages`, `sleep_quality_score`, `in_bed_at`, `awake_at`
500
+
501
+ **AIProvenance** — AI generation metadata:
502
+ `generated_by_ai`, `ai_model`, `ai_confidence`, `prompt_ref`, `reviewed_by_human`
@@ -0,0 +1,27 @@
1
+ {
2
+ "_sdk_version": "5.1.0",
3
+ "constants": {
4
+ "max_call_depth": {
5
+ "counts_root": true,
6
+ "value": 7
7
+ }
8
+ },
9
+ "decorator_roles": {
10
+ "action_type": "consumed",
11
+ "background": "advisory",
12
+ "chain_callable": "consumed",
13
+ "data_model": "consumed",
14
+ "effects": "advisory",
15
+ "event": "consumed",
16
+ "id_projection": "consumed",
17
+ "long_running": "advisory"
18
+ },
19
+ "http_payloads": {
20
+ "POST /v1/billing/internal/usage/track": [
21
+ "meter",
22
+ "quantity",
23
+ "user_id",
24
+ "tenant_id"
25
+ ]
26
+ }
27
+ }