imperal-sdk 4.2.5__tar.gz → 4.2.7__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 (206) hide show
  1. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/CHANGELOG.md +111 -0
  2. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/PKG-INFO +1 -1
  3. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/__init__.py +1 -1
  4. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/context.py +41 -1
  5. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/ui/__init__.py +2 -2
  6. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/ui/input_components.py +40 -1
  7. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/.github/workflows/identity-contract.yml +0 -0
  8. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/.github/workflows/publish.yml +0 -0
  9. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/.github/workflows/test.yml +0 -0
  10. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/.gitignore +0 -0
  11. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/LICENSE +0 -0
  12. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/README.md +0 -0
  13. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/api_surface.json +0 -0
  14. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/pyproject.toml +0 -0
  15. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/.codebase-index-cache.pkl +0 -0
  16. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/ai/__init__.py +0 -0
  17. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/ai/client.py +0 -0
  18. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/auth/__init__.py +0 -0
  19. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/auth/client.py +0 -0
  20. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/auth/middleware.py +0 -0
  21. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/billing/__init__.py +0 -0
  22. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/billing/client.py +0 -0
  23. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/cache/__init__.py +0 -0
  24. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/cache/client.py +0 -0
  25. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/cache/protocol.py +0 -0
  26. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/chat/__init__.py +0 -0
  27. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/chat/action_result.py +0 -0
  28. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/chat/error_codes.py +0 -0
  29. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/chat/extension.py +0 -0
  30. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/chat/filters.py +0 -0
  31. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/chat/guards.py +0 -0
  32. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/chat/handler.py +0 -0
  33. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/chat/kernel_primitives.py +0 -0
  34. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/chat/narration.py +0 -0
  35. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/chat/narration_guard.py +0 -0
  36. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/chat/prompt.py +0 -0
  37. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/chat/refusal.py +0 -0
  38. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/chat/retry.py +0 -0
  39. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/cli/__init__.py +0 -0
  40. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/cli/main.py +0 -0
  41. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/config/__init__.py +0 -0
  42. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/config/client.py +0 -0
  43. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/db/__init__.py +0 -0
  44. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/db/client.py +0 -0
  45. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/errors.py +0 -0
  46. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/extension.py +0 -0
  47. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/extensions/__init__.py +0 -0
  48. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/extensions/client.py +0 -0
  49. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/http/__init__.py +0 -0
  50. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/http/client.py +0 -0
  51. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/manifest.py +0 -0
  52. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/manifest_schema.py +0 -0
  53. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/notify/__init__.py +0 -0
  54. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/notify/client.py +0 -0
  55. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/prompts/__init__.py +0 -0
  56. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/prompts/icnli_integrity_rules.txt +0 -0
  57. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/prompts/kernel_formatting_rule.txt +0 -0
  58. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/prompts/kernel_proactivity_rule.txt +0 -0
  59. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/protocols.py +0 -0
  60. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/rpc/__init__.py +0 -0
  61. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/rpc/codec.py +0 -0
  62. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/rpc/contract.py +0 -0
  63. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/runtime/__init__.py +0 -0
  64. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/runtime/executor.py +0 -0
  65. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/runtime/llm_provider.py +0 -0
  66. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/runtime/message_adapter.py +0 -0
  67. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/schemas/action_result.schema.json +0 -0
  68. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/schemas/balance_info.schema.json +0 -0
  69. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/schemas/chat_result.schema.json +0 -0
  70. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/schemas/completion_result.schema.json +0 -0
  71. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/schemas/document.schema.json +0 -0
  72. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/schemas/event.schema.json +0 -0
  73. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/schemas/file_info.schema.json +0 -0
  74. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/schemas/function_call.schema.json +0 -0
  75. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/schemas/http_response.schema.json +0 -0
  76. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/schemas/imperal.schema.json +0 -0
  77. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/schemas/limits_result.schema.json +0 -0
  78. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/schemas/subscription_info.schema.json +0 -0
  79. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/secrets/__init__.py +0 -0
  80. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/secrets/client.py +0 -0
  81. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/secrets/exceptions.py +0 -0
  82. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/secrets/panel_handler.py +0 -0
  83. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/secrets/spec.py +0 -0
  84. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/security/__init__.py +0 -0
  85. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/security/call_token.py +0 -0
  86. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/skeleton/__init__.py +0 -0
  87. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/skeleton/client.py +0 -0
  88. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/storage/__init__.py +0 -0
  89. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/storage/client.py +0 -0
  90. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/store/__init__.py +0 -0
  91. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/store/client.py +0 -0
  92. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/store/exceptions.py +0 -0
  93. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/testing/__init__.py +0 -0
  94. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/testing/mock_context.py +0 -0
  95. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/testing/mock_secrets.py +0 -0
  96. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/tools/__init__.py +0 -0
  97. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/tools/client.py +0 -0
  98. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/tools/generate_api_surface.py +0 -0
  99. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/tools/validate_identity_contract.py +0 -0
  100. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/types/__init__.py +0 -0
  101. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/types/action_result.py +0 -0
  102. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/types/chat_result.py +0 -0
  103. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/types/client_contracts.py +0 -0
  104. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/types/contracts.py +0 -0
  105. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/types/contributions.py +0 -0
  106. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/types/events.py +0 -0
  107. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/types/health.py +0 -0
  108. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/types/identity.py +0 -0
  109. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/types/models.py +0 -0
  110. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/types/pagination.py +0 -0
  111. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/types/store_contracts.py +0 -0
  112. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/ui/actions.py +0 -0
  113. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/ui/base.py +0 -0
  114. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/ui/data.py +0 -0
  115. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/ui/display.py +0 -0
  116. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/ui/feedback.py +0 -0
  117. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/ui/graph.py +0 -0
  118. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/ui/interactive.py +0 -0
  119. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/ui/layout.py +0 -0
  120. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/ui/theme.py +0 -0
  121. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/validator.py +0 -0
  122. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/src/imperal_sdk/validator_v1_6_0.py +0 -0
  123. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/conftest.py +0 -0
  124. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/contracts/__init__.py +0 -0
  125. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/contracts/test_store_contracts.py +0 -0
  126. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/fixtures/openapi/auth-gateway.json +0 -0
  127. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/fixtures/openapi/registry.json +0 -0
  128. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/fixtures/openapi/sharelock-cases.json +0 -0
  129. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/rpc/__init__.py +0 -0
  130. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/rpc/test_codec.py +0 -0
  131. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/rpc/test_contract.py +0 -0
  132. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/runtime/__init__.py +0 -0
  133. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/runtime/test_llm_provider_config_store.py +0 -0
  134. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/runtime/test_llm_provider_ctx_injection.py +0 -0
  135. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/store/__init__.py +0 -0
  136. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/store/test_list_users_client.py +0 -0
  137. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/store/test_query_all_client.py +0 -0
  138. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_action_result_typed.py +0 -0
  139. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_as_user.py +0 -0
  140. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_auth.py +0 -0
  141. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_billing.py +0 -0
  142. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_cache_client.py +0 -0
  143. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_cache_model.py +0 -0
  144. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_call_token.py +0 -0
  145. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_chat_extension_deprecation.py +0 -0
  146. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_chat_filters.py +0 -0
  147. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_chat_guards.py +0 -0
  148. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_chat_guards_bleed.py +0 -0
  149. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_chat_prompt.py +0 -0
  150. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_chat_pydantic_retry.py +0 -0
  151. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_chat_result.py +0 -0
  152. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_cli.py +0 -0
  153. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_client_contracts.py +0 -0
  154. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_config_client.py +0 -0
  155. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_context.py +0 -0
  156. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_context_guards.py +0 -0
  157. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_contracts.py +0 -0
  158. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_contracts_live.py +0 -0
  159. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_contributions.py +0 -0
  160. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_document_contract.py +0 -0
  161. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_emits_decorator.py +0 -0
  162. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_error_codes.py +0 -0
  163. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_errors.py +0 -0
  164. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_event_schema_v2.py +0 -0
  165. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_events_health.py +0 -0
  166. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_extension.py +0 -0
  167. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_extension_v2.py +0 -0
  168. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_extensions_emit.py +0 -0
  169. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_handler_p2.py +0 -0
  170. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_id_shape_guard.py +0 -0
  171. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_identity_contract.py +0 -0
  172. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_imperal_schema_v2.py +0 -0
  173. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_kernel_primitives.py +0 -0
  174. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_manifest.py +0 -0
  175. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_manifest_roundtrip_gate.py +0 -0
  176. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_manifest_schema.py +0 -0
  177. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_manifest_v2_events.py +0 -0
  178. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_manifest_v2_other_sections.py +0 -0
  179. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_manifest_v2_webhooks.py +0 -0
  180. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_manifest_validator_v2.py +0 -0
  181. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_mock_context.py +0 -0
  182. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_models.py +0 -0
  183. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_narration_emission.py +0 -0
  184. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_narration_guard.py +0 -0
  185. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_openai_max_completion_tokens.py +0 -0
  186. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_pagination.py +0 -0
  187. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_panel_rendering_contract.py +0 -0
  188. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_panels.py +0 -0
  189. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_skeleton_decorator.py +0 -0
  190. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_spec_validation.py +0 -0
  191. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_tools_client.py +0 -0
  192. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_ui.py +0 -0
  193. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_ui_fileupload_enhanced.py +0 -0
  194. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_ui_html.py +0 -0
  195. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_ui_image_enhanced.py +0 -0
  196. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_ui_open.py +0 -0
  197. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_ui_theme.py +0 -0
  198. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_user.py +0 -0
  199. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_v7_emit_refusal.py +0 -0
  200. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_validator.py +0 -0
  201. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_validator_drift.py +0 -0
  202. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_validator_pep563.py +0 -0
  203. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_validator_v1_6_0_rules.py +0 -0
  204. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/test_write_arg_bleed.py +0 -0
  205. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/tools/__init__.py +0 -0
  206. {imperal_sdk-4.2.5 → imperal_sdk-4.2.7}/tests/tools/test_generate_api_surface.py +0 -0
@@ -2,6 +2,117 @@
2
2
 
3
3
  All notable changes to `imperal-sdk` are documented here.
4
4
 
5
+ ## 4.2.7 — 2026-05-13
6
+
7
+ **OAuth callback infrastructure + `ctx.webhook_url()` helper**
8
+
9
+ Closes the architectural gap that made `@ext.webhook("/callback", method="GET")`
10
+ non-functional for OAuth providers (Spotify, GitHub, Google). Before this
11
+ release: hardcoded redirect URIs in `*_config.py` landed users on a Next.js
12
+ 404 (no nginx route for `/v1/ext/*`), and even if they reached auth-gw the
13
+ `ext_router` was POST-only.
14
+
15
+ ### Added
16
+
17
+ - **`Context.webhook_url(path)`** — builds the canonical public callback
18
+ URL from kernel-authoritative `_extension_id` (folder/manifest name, not
19
+ the drift-prone Python `Extension("X", ...)` value). Returns
20
+ `https://{IMPERAL_PUBLIC_HOST}/v1/ext/{app_id}/webhook/{path}` — default
21
+ host `panel.imperal.io`. Path leading slash is normalised. Use this
22
+ instead of hardcoding the URL in config files; hardcoded URLs are the
23
+ #1 cause of OAuth-callback drift bugs.
24
+
25
+ - **Federal `ctx.secrets` inject moved to `ContextFactory._build_context`** —
26
+ every dispatch path (chat tool, panel, skeleton, schedule, webhook,
27
+ lifecycle, health check) now gets `ctx.secrets` uniformly. Previously
28
+ the inject lived in `pipeline/extension_runner.py` and only fired for
29
+ chat tool dispatch; panel handlers and others crashed with
30
+ `AttributeError` when reading `ctx.secrets` despite the documented
31
+ federal contract. `_HealthCheckCtx` gained a `_StubSecrets` graceful
32
+ no-op so `@ext.health_check` handlers that read `ctx.secrets` don't
33
+ crash with `AttributeError`.
34
+
35
+ - **Kernel-authoritative `app_id` in `ctx.cache`** — `CacheClient` is now
36
+ constructed with `self._extension_id` (kernel parameter) instead of
37
+ `getattr(self._extension, "app_id", ...)` (Python runtime). Fixes the
38
+ 401 class observed in production when an ext author writes
39
+ `Extension("X-extension", ...)` while the deployed folder/manifest is
40
+ `X` — auth-gw extcache row uses the deployed app_id and would never
41
+ authorise the drifted Python value.
42
+
43
+ ### Platform changes (live, not in the package)
44
+
45
+ - **nginx** on `panel.imperal.io` now routes `/v1/ext/*` to Imperal Auth
46
+ Gateway (was: caught by Next.js catch-all → 404). Renamed config from
47
+ `sharelock-panel*` → `imperal-panel`.
48
+ - **Auth-gw `ext_router`** accepts both `GET` (OAuth callbacks,
49
+ verification challenges) and `POST` (server-to-server hooks) on the
50
+ same `/v1/ext/{app_id}/webhook/{path}` endpoint.
51
+ - **Auth-gw `marketplace/router.py`** new public endpoint
52
+ `GET /v1/marketplace/apps/{app_id}/webhooks` returns `[{path, method}]`
53
+ for each declared `@ext.webhook`. Strips `secret_header`.
54
+ - **Imperal Panel** Secrets tab renders a blue info card listing every
55
+ webhook URL with Copy buttons so end-users know what to paste into
56
+ OAuth provider developer consoles.
57
+ - **Dev Portal App Details** gained a Webhooks tab (`imperal-ext-developer`
58
+ v1.3.0) showing the per-app callback URLs with method badges.
59
+
60
+ ### Migration notes
61
+
62
+ - Replace `SP_REDIRECT_URI = "https://..."` hardcodes with
63
+ `ctx.webhook_url("/callback")` at runtime. Existing hardcoded URLs that
64
+ match the canonical shape keep working — but new extensions should
65
+ prefer the helper. No SDK-blocking change in this release.
66
+ - `@ext.health_check` handlers that call `await ctx.secrets.list()` /
67
+ `.get(...)` now receive a graceful no-op stub instead of
68
+ `AttributeError`. Reads return `None`/`[]`/`False`; writes raise
69
+ `RuntimeError` (health checks have no per-user context).
70
+ - All shadow patches applied on 2026-05-13 to platform-worker and
71
+ session-worker venvs are superseded by this release. Run
72
+ `pip install --upgrade imperal-sdk==4.2.7` to clear them.
73
+
74
+ ### Federal invariants
75
+
76
+ | Invariant | What it pins |
77
+ |---|---|
78
+ | `I-SECRETS-HANDLER-SCOPE-MEMORY` | Already pinned; the ContextFactory move preserves it — plaintext stays a local variable in the handler call. |
79
+ | `I-EXT-CACHE-APP-ID-KERNEL-AUTHORITATIVE` | (new) `CacheClient.app_id` sourced from kernel `_extension_id`, never from Python `ext.app_id`. |
80
+ | `I-WEBHOOK-URL-CANONICAL` | (new) `ctx.webhook_url(path)` returns `https://{IMPERAL_PUBLIC_HOST}/v1/ext/{kernel-authoritative-app_id}/webhook/{path}`. Source-inspection-friendly: env var lookup + no Python-instance attribute drift. |
81
+
82
+ ## 4.2.6 — 2026-05-13
83
+
84
+ **New: `ui.Password` primitive + `ui.Input(type=)` kwarg**
85
+
86
+ Adds a browser-blind credential-entry primitive for EXT-SECRETS-V1 Panel UIs.
87
+ Renders as `<input type="password" autocomplete="new-password" spellcheck="false">`
88
+ so values are visually masked while the user types and don't get saved into
89
+ the browser's autofill database.
90
+
91
+ ### Added
92
+
93
+ - **`ui.Password(placeholder=, on_submit=, value=, param_name=)`** — canonical
94
+ credential-entry component. Federal EXT-SECRETS-V1 entry surfaces (Dev Portal
95
+ Secrets tab, Panel SecretManagerCard equivalents) MUST use this instead of
96
+ `ui.Input` for write_mode='user'/'both' secrets.
97
+ - **`ui.Input(type=)` kwarg** — accepts `"text"` (default), `"password"`,
98
+ `"email"`, `"number"`, `"url"`. Backward-compatible: existing `ui.Input(...)`
99
+ calls without `type=` continue rendering as text. The `type` prop is only
100
+ emitted into manifest when != `"text"`.
101
+
102
+ ### Panel rendering
103
+
104
+ `DInput.tsx` now reads `type` from props and applies to the native
105
+ `<input type={...}>` element. When `type === "password"` it also sets
106
+ `autoComplete="new-password"` (suppresses browser autofill/save prompts) and
107
+ `spellCheck={false}` (no red squiggle on opaque base64 / hex values).
108
+
109
+ ### Federal note
110
+
111
+ `type="password"` is a defence against shoulder-surfing, not a security
112
+ control. The plaintext still travels in the POST body to the server, which
113
+ is the only correctness boundary. Audit chokepoint + Vault transit are what
114
+ make this federal-grade — see EXT-SECRETS-V1 spec for the contract.
115
+
5
116
  ## 4.2.5 — 2026-05-13
6
117
 
7
118
  **Fix: synthetic `__panel__*` tools excluded from validator tool_count + tests**
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: imperal-sdk
3
- Version: 4.2.5
3
+ Version: 4.2.7
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
@@ -39,7 +39,7 @@ from imperal_sdk.secrets import (
39
39
  SecretValueTooLarge, SecretDeclarationConflict,
40
40
  )
41
41
 
42
- __version__ = "4.2.5"
42
+ __version__ = "4.2.7"
43
43
 
44
44
  __all__ = [
45
45
  # Core
@@ -218,7 +218,14 @@ class Context:
218
218
  try:
219
219
  from imperal_sdk.cache.client import CacheClient
220
220
  self._cache = CacheClient(
221
- app_id=getattr(self._extension, "app_id", self._extension_id),
221
+ # 2026-05-13: kernel-authoritative app_id (folder/manifest
222
+ # name passed by ContextFactory). ext.app_id is the Python
223
+ # runtime value and can drift from the deployed app_id
224
+ # (e.g. Extension("spotify-extension") in app.py while
225
+ # /opt/extensions/spotify/ + Dev Portal row are "spotify"
226
+ # — auth-gw extcache 401'd every request). Fall back to
227
+ # ext.app_id only when factory didn't pass _extension_id.
228
+ app_id=self._extension_id or getattr(self._extension, "app_id", ""),
222
229
  user_id=self.user.imperal_id,
223
230
  gw_url=gw,
224
231
  service_token=svc,
@@ -289,6 +296,39 @@ class Context:
289
296
  logger = logging.getLogger(f"ext.{self._extension_id}")
290
297
  getattr(logger, level, logger.info)(message)
291
298
 
299
+ def webhook_url(self, path: str) -> str:
300
+ """Build the public OAuth/webhook callback URL for this extension.
301
+
302
+ Returns the URL the extension author must register in the OAuth
303
+ provider's developer console (Spotify, GitHub, Google, etc.).
304
+
305
+ Path is the same string passed to ``@ext.webhook("/path")``. Both
306
+ forms work — leading slash is normalised:
307
+
308
+ ctx.webhook_url("/callback") # → .../webhook/callback
309
+ ctx.webhook_url("callback") # → .../webhook/callback
310
+ ctx.webhook_url("/oauth/return") # → .../webhook/oauth/return
311
+
312
+ Host comes from the ``IMPERAL_PUBLIC_HOST`` env var (default
313
+ ``panel.imperal.io``). Path-component ``{app_id}`` comes from the
314
+ kernel-authoritative ``_extension_id`` (folder/manifest name),
315
+ not from ``ext.app_id`` (Python runtime, can drift).
316
+
317
+ Use this instead of hardcoding the URL in ``spotify_config.py``
318
+ et al. — that pattern is what caused the 2026-05-13 Spotify 401
319
+ class (auth-gw never saw the drifted `spotify-extension` row).
320
+ """
321
+ import os as _os_wh
322
+ host = _os_wh.environ.get("IMPERAL_PUBLIC_HOST", "panel.imperal.io")
323
+ clean_path = (path or "").lstrip("/")
324
+ app_id = self._extension_id or getattr(self._extension, "app_id", "")
325
+ if not app_id:
326
+ raise RuntimeError(
327
+ "ctx.webhook_url() called without an extension_id — "
328
+ "kernel must build ctx via ContextFactory."
329
+ )
330
+ return f"https://{host}/v1/ext/{app_id}/webhook/{clean_path}"
331
+
292
332
  def as_user(self, user_id: str) -> "Context":
293
333
  """Return scoped Context for target user_id.
294
334
 
@@ -24,7 +24,7 @@ from .display import Text, Icon, Header, Image, Code, Markdown, Empty, Divider,
24
24
  from .interactive import Button, Card, Menu, Dialog, Tooltip, Link, SlideOver
25
25
  from .feedback import Alert, Progress, Chart, Loading, Error
26
26
  from .input_components import (
27
- Input, Form, Select, MultiSelect, Toggle,
27
+ Input, Password, Form, Select, MultiSelect, Toggle,
28
28
  Slider, DatePicker, FileUpload, TextArea, RichEditor, TagInput,
29
29
  )
30
30
  from .graph import Graph
@@ -44,7 +44,7 @@ __all__ = [
44
44
  # Feedback
45
45
  "Alert", "Progress", "Chart", "Loading", "Error",
46
46
  # Input
47
- "Input", "Form", "Select", "MultiSelect", "Toggle",
47
+ "Input", "Password", "Form", "Select", "MultiSelect", "Toggle",
48
48
  "Slider", "DatePicker", "FileUpload", "TextArea", "RichEditor", "TagInput",
49
49
  # Graph (Cytoscape-backed)
50
50
  "Graph",
@@ -10,13 +10,52 @@ def Input(
10
10
  on_submit: UIAction | None = None,
11
11
  value: str = "",
12
12
  param_name: str = "value",
13
+ type: str = "text",
13
14
  ) -> UINode:
14
- """Text input field. on_submit fires on Enter, value merged as param_name."""
15
+ """Text input field. on_submit fires on Enter, value merged as param_name.
16
+
17
+ ``type`` (v4.2.6+) is a hint to the Panel renderer for native HTML input
18
+ behaviour: ``"text"`` (default), ``"password"`` (browser-blind, no echo),
19
+ ``"email"``, ``"number"``, ``"url"``. Prefer ``ui.Password(...)`` for
20
+ credential entry — it's a thin convenience wrapper that pins type for
21
+ federal EXT-SECRETS-V1 UIs.
22
+ """
15
23
  props: dict[str, Any] = {"placeholder": placeholder, "value": value, "param_name": param_name}
24
+ if type and type != "text":
25
+ props["type"] = type
16
26
  if on_submit: props["on_submit"] = on_submit
17
27
  return UINode(type="Input", props=props)
18
28
 
19
29
 
30
+ def Password(
31
+ placeholder: str = "paste value…",
32
+ on_submit: UIAction | None = None,
33
+ value: str = "",
34
+ param_name: str = "value",
35
+ ) -> UINode:
36
+ """Password input — browser-blind, no echo, autocomplete='new-password'.
37
+
38
+ EXT-SECRETS-V1 (federal v4.2.6+) — the canonical credential-entry primitive.
39
+ Renders as ``<input type="password" autocomplete="new-password">`` in the
40
+ Panel UI so values are visually masked while the user types. Submitted
41
+ value rides into the action as ``param_name`` (default ``"value"``); use
42
+ inside ``ui.Form(defaults={...})`` to attach hidden context fields like
43
+ ``app_id`` and ``name``.
44
+
45
+ Federal note: type=password is a defence against shoulder-surfing, NOT a
46
+ security control. The plaintext still travels in the POST body to the
47
+ server, which is the only correctness boundary. Audit chokepoint + Vault
48
+ transit are what make this federal-grade.
49
+ """
50
+ return Input(
51
+ placeholder=placeholder,
52
+ on_submit=on_submit,
53
+ value=value,
54
+ param_name=param_name,
55
+ type="password",
56
+ )
57
+
58
+
20
59
  def Form(
21
60
  children: list[UINode],
22
61
  action: str = "",
File without changes
File without changes
File without changes
File without changes