posthog 8.2.4__tar.gz → 8.2.5__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 (306) hide show
  1. {posthog-8.2.4/posthog.egg-info → posthog-8.2.5}/PKG-INFO +1 -1
  2. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/anthropic/anthropic_converter.py +28 -7
  3. posthog-8.2.5/posthog/version.py +1 -0
  4. {posthog-8.2.4 → posthog-8.2.5/posthog.egg-info}/PKG-INFO +1 -1
  5. {posthog-8.2.4 → posthog-8.2.5}/pyproject.toml +1 -1
  6. posthog-8.2.4/posthog/version.py +0 -1
  7. {posthog-8.2.4 → posthog-8.2.5}/LICENSE +0 -0
  8. {posthog-8.2.4 → posthog-8.2.5}/MANIFEST.in +0 -0
  9. {posthog-8.2.4 → posthog-8.2.5}/README.md +0 -0
  10. {posthog-8.2.4 → posthog-8.2.5}/posthog/__init__.py +0 -0
  11. {posthog-8.2.4 → posthog-8.2.5}/posthog/_async_consumer.py +0 -0
  12. {posthog-8.2.4 → posthog-8.2.5}/posthog/_async_request.py +0 -0
  13. {posthog-8.2.4 → posthog-8.2.5}/posthog/_async_utils.py +0 -0
  14. {posthog-8.2.4 → posthog-8.2.5}/posthog/_disabled_lane_queue.py +0 -0
  15. {posthog-8.2.4 → posthog-8.2.5}/posthog/_logging.py +0 -0
  16. {posthog-8.2.4 → posthog-8.2.5}/posthog/_metrics_autocapture.py +0 -0
  17. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/__init__.py +0 -0
  18. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/anthropic/__init__.py +0 -0
  19. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/anthropic/_anthropic_stream.py +0 -0
  20. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/anthropic/anthropic.py +0 -0
  21. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/anthropic/anthropic_async.py +0 -0
  22. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/anthropic/anthropic_providers.py +0 -0
  23. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/claude_agent_sdk/__init__.py +0 -0
  24. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/claude_agent_sdk/client.py +0 -0
  25. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/claude_agent_sdk/formatting.py +0 -0
  26. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/claude_agent_sdk/processor.py +0 -0
  27. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/evaluations/__init__.py +0 -0
  28. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/evaluations/_async_datasets.py +0 -0
  29. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/evaluations/_client.py +0 -0
  30. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/evaluations/_dataset_serialization.py +0 -0
  31. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/evaluations/_dataset_types.py +0 -0
  32. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/evaluations/_datasets.py +0 -0
  33. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/evaluations/_errors.py +0 -0
  34. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/evaluations/_mutations.py +0 -0
  35. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/evaluations/_scorer_types.py +0 -0
  36. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/evaluations/_scorers.py +0 -0
  37. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/evaluations/_serialization.py +0 -0
  38. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/evaluations/_tags.py +0 -0
  39. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/evaluations/_transport.py +0 -0
  40. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/evaluations/_types.py +0 -0
  41. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/gateway.py +0 -0
  42. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/gemini/__init__.py +0 -0
  43. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/gemini/_shared.py +0 -0
  44. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/gemini/gemini.py +0 -0
  45. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/gemini/gemini_async.py +0 -0
  46. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/gemini/gemini_converter.py +0 -0
  47. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/langchain/__init__.py +0 -0
  48. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/langchain/callbacks.py +0 -0
  49. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/langchain/middleware.py +0 -0
  50. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/media.py +0 -0
  51. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/openai/__init__.py +0 -0
  52. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/openai/_embeddings.py +0 -0
  53. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/openai/_streaming.py +0 -0
  54. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/openai/openai.py +0 -0
  55. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/openai/openai_async.py +0 -0
  56. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/openai/openai_converter.py +0 -0
  57. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/openai/openai_providers.py +0 -0
  58. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/openai/wrapper_utils.py +0 -0
  59. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/openai_agents/__init__.py +0 -0
  60. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/openai_agents/processor.py +0 -0
  61. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/otel/__init__.py +0 -0
  62. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/otel/_privacy.py +0 -0
  63. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/otel/_request_context.py +0 -0
  64. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/otel/exporter.py +0 -0
  65. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/otel/processor.py +0 -0
  66. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/otel/spans.py +0 -0
  67. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/prompts.py +0 -0
  68. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/sanitization.py +0 -0
  69. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/stream.py +0 -0
  70. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/types.py +0 -0
  71. {posthog-8.2.4 → posthog-8.2.5}/posthog/ai/utils.py +0 -0
  72. {posthog-8.2.4 → posthog-8.2.5}/posthog/args.py +0 -0
  73. {posthog-8.2.4 → posthog-8.2.5}/posthog/async_client.py +0 -0
  74. {posthog-8.2.4 → posthog-8.2.5}/posthog/bucketed_rate_limiter.py +0 -0
  75. {posthog-8.2.4 → posthog-8.2.5}/posthog/capture_compression.py +0 -0
  76. {posthog-8.2.4 → posthog-8.2.5}/posthog/capture_event.py +0 -0
  77. {posthog-8.2.4 → posthog-8.2.5}/posthog/capture_send.py +0 -0
  78. {posthog-8.2.4 → posthog-8.2.5}/posthog/client.py +0 -0
  79. {posthog-8.2.4 → posthog-8.2.5}/posthog/consumer.py +0 -0
  80. {posthog-8.2.4 → posthog-8.2.5}/posthog/contexts.py +0 -0
  81. {posthog-8.2.4 → posthog-8.2.5}/posthog/emails.py +0 -0
  82. {posthog-8.2.4 → posthog-8.2.5}/posthog/exception_capture.py +0 -0
  83. {posthog-8.2.4 → posthog-8.2.5}/posthog/exception_utils.py +0 -0
  84. {posthog-8.2.4 → posthog-8.2.5}/posthog/feature_flag_evaluations.py +0 -0
  85. {posthog-8.2.4 → posthog-8.2.5}/posthog/feature_flags.py +0 -0
  86. {posthog-8.2.4 → posthog-8.2.5}/posthog/flag_definition_cache.py +0 -0
  87. {posthog-8.2.4 → posthog-8.2.5}/posthog/integrations/__init__.py +0 -0
  88. {posthog-8.2.4 → posthog-8.2.5}/posthog/integrations/_tracing_headers.py +0 -0
  89. {posthog-8.2.4 → posthog-8.2.5}/posthog/integrations/asgi.py +0 -0
  90. {posthog-8.2.4 → posthog-8.2.5}/posthog/integrations/celery.py +0 -0
  91. {posthog-8.2.4 → posthog-8.2.5}/posthog/integrations/django.py +0 -0
  92. {posthog-8.2.4 → posthog-8.2.5}/posthog/integrations/drf.py +0 -0
  93. {posthog-8.2.4 → posthog-8.2.5}/posthog/integrations/flask.py +0 -0
  94. {posthog-8.2.4 → posthog-8.2.5}/posthog/integrations/otel.py +0 -0
  95. {posthog-8.2.4 → posthog-8.2.5}/posthog/mcp/__init__.py +0 -0
  96. {posthog-8.2.4 → posthog-8.2.5}/posthog/mcp/_argument_ownership.py +0 -0
  97. {posthog-8.2.4 → posthog-8.2.5}/posthog/mcp/_capture.py +0 -0
  98. {posthog-8.2.4 → posthog-8.2.5}/posthog/mcp/_compatibility.py +0 -0
  99. {posthog-8.2.4 → posthog-8.2.5}/posthog/mcp/_context_parameters.py +0 -0
  100. {posthog-8.2.4 → posthog-8.2.5}/posthog/mcp/_conversation_id.py +0 -0
  101. {posthog-8.2.4 → posthog-8.2.5}/posthog/mcp/_event_types.py +0 -0
  102. {posthog-8.2.4 → posthog-8.2.5}/posthog/mcp/_exceptions.py +0 -0
  103. {posthog-8.2.4 → posthog-8.2.5}/posthog/mcp/_ids.py +0 -0
  104. {posthog-8.2.4 → posthog-8.2.5}/posthog/mcp/_instrument_fastmcp.py +0 -0
  105. {posthog-8.2.4 → posthog-8.2.5}/posthog/mcp/_instrument_lowlevel.py +0 -0
  106. {posthog-8.2.4 → posthog-8.2.5}/posthog/mcp/_instrument_v2.py +0 -0
  107. {posthog-8.2.4 → posthog-8.2.5}/posthog/mcp/_instrumentation.py +0 -0
  108. {posthog-8.2.4 → posthog-8.2.5}/posthog/mcp/_intent.py +0 -0
  109. {posthog-8.2.4 → posthog-8.2.5}/posthog/mcp/_internal.py +0 -0
  110. {posthog-8.2.4 → posthog-8.2.5}/posthog/mcp/_model_parameters.py +0 -0
  111. {posthog-8.2.4 → posthog-8.2.5}/posthog/mcp/_output_instructions.py +0 -0
  112. {posthog-8.2.4 → posthog-8.2.5}/posthog/mcp/_posthog_events.py +0 -0
  113. {posthog-8.2.4 → posthog-8.2.5}/posthog/mcp/_raised_tool_error.py +0 -0
  114. {posthog-8.2.4 → posthog-8.2.5}/posthog/mcp/_sanitization.py +0 -0
  115. {posthog-8.2.4 → posthog-8.2.5}/posthog/mcp/_server_build.py +0 -0
  116. {posthog-8.2.4 → posthog-8.2.5}/posthog/mcp/_sink.py +0 -0
  117. {posthog-8.2.4 → posthog-8.2.5}/posthog/mcp/_tool_input.py +0 -0
  118. {posthog-8.2.4 → posthog-8.2.5}/posthog/mcp/_transport_identity.py +0 -0
  119. {posthog-8.2.4 → posthog-8.2.5}/posthog/mcp/_truncation.py +0 -0
  120. {posthog-8.2.4 → posthog-8.2.5}/posthog/mcp/asgi.py +0 -0
  121. {posthog-8.2.4 → posthog-8.2.5}/posthog/mcp/constants.py +0 -0
  122. {posthog-8.2.4 → posthog-8.2.5}/posthog/mcp/feedback.py +0 -0
  123. {posthog-8.2.4 → posthog-8.2.5}/posthog/mcp/logger.py +0 -0
  124. {posthog-8.2.4 → posthog-8.2.5}/posthog/mcp/posthog_mcp.py +0 -0
  125. {posthog-8.2.4 → posthog-8.2.5}/posthog/mcp/request_headers.py +0 -0
  126. {posthog-8.2.4 → posthog-8.2.5}/posthog/mcp/session.py +0 -0
  127. {posthog-8.2.4 → posthog-8.2.5}/posthog/mcp/session_token.py +0 -0
  128. {posthog-8.2.4 → posthog-8.2.5}/posthog/mcp/tools.py +0 -0
  129. {posthog-8.2.4 → posthog-8.2.5}/posthog/mcp/types.py +0 -0
  130. {posthog-8.2.4 → posthog-8.2.5}/posthog/mcp/version.py +0 -0
  131. {posthog-8.2.4 → posthog-8.2.5}/posthog/metrics_capture.py +0 -0
  132. {posthog-8.2.4 → posthog-8.2.5}/posthog/poller.py +0 -0
  133. {posthog-8.2.4 → posthog-8.2.5}/posthog/py.typed +0 -0
  134. {posthog-8.2.4 → posthog-8.2.5}/posthog/release_id.py +0 -0
  135. {posthog-8.2.4 → posthog-8.2.5}/posthog/request.py +0 -0
  136. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/__init__.py +0 -0
  137. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/ai/__init__.py +0 -0
  138. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/ai/claude_agent_sdk/__init__.py +0 -0
  139. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/ai/claude_agent_sdk/test_client.py +0 -0
  140. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/ai/claude_agent_sdk/test_processor.py +0 -0
  141. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/ai/claude_agent_sdk/test_processor_content.py +0 -0
  142. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/ai/openai_agents/__init__.py +0 -0
  143. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/ai/openai_agents/test_processor.py +0 -0
  144. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/ai/otel/__init__.py +0 -0
  145. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/ai/otel/conftest.py +0 -0
  146. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/ai/otel/test_exporter.py +0 -0
  147. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/ai/otel/test_processor.py +0 -0
  148. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/ai/otel/test_spans.py +0 -0
  149. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/ai/test_async_cancellation.py +0 -0
  150. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/ai/test_async_stream_wrapper.py +0 -0
  151. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/ai/test_capture_contract.py +0 -0
  152. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/ai/test_capture_pipeline.py +0 -0
  153. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/ai/test_evaluations.py +0 -0
  154. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/ai/test_evaluations_datasets.py +0 -0
  155. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/ai/test_evaluations_mutations.py +0 -0
  156. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/ai/test_evaluations_scorers.py +0 -0
  157. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/ai/test_evaluations_transport.py +0 -0
  158. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/ai/test_gateway.py +0 -0
  159. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/ai/test_http_status.py +0 -0
  160. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/ai/test_media.py +0 -0
  161. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/ai/test_privacy_mode.py +0 -0
  162. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/ai/test_prompts.py +0 -0
  163. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/ai/test_sanitization.py +0 -0
  164. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/ai/test_stream_midstream_error.py +0 -0
  165. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/ai/test_system_prompts.py +0 -0
  166. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/ai/test_token_reporting.py +0 -0
  167. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/ai/test_tokens_source.py +0 -0
  168. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/ai/test_utils.py +0 -0
  169. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/ai/utils.py +0 -0
  170. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/capture_helpers.py +0 -0
  171. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/conftest.py +0 -0
  172. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/logging_helpers.py +0 -0
  173. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/mcp/__init__.py +0 -0
  174. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/mcp/_helpers.py +0 -0
  175. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/mcp/_helpers_lowlevel.py +0 -0
  176. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/mcp/_helpers_v2.py +0 -0
  177. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/mcp/conftest.py +0 -0
  178. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/mcp/test_asgi.py +0 -0
  179. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/mcp/test_capture.py +0 -0
  180. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/mcp/test_conversation_session.py +0 -0
  181. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/mcp/test_defaults.py +0 -0
  182. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/mcp/test_error_properties.py +0 -0
  183. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/mcp/test_error_status.py +0 -0
  184. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/mcp/test_fastmcp.py +0 -0
  185. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/mcp/test_fastmcp_tool_errors.py +0 -0
  186. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/mcp/test_fastmcp_v2.py +0 -0
  187. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/mcp/test_fastmcp_v4.py +0 -0
  188. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/mcp/test_features_m4.py +0 -0
  189. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/mcp/test_feedback.py +0 -0
  190. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/mcp/test_initialize_handshake.py +0 -0
  191. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/mcp/test_instrument_lowlevel_ownership.py +0 -0
  192. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/mcp/test_instrument_v2.py +0 -0
  193. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/mcp/test_instrumentation_fork.py +0 -0
  194. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/mcp/test_lib_label.py +0 -0
  195. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/mcp/test_lowlevel.py +0 -0
  196. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/mcp/test_model_parameters.py +0 -0
  197. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/mcp/test_no_crash.py +0 -0
  198. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/mcp/test_output_instructions.py +0 -0
  199. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/mcp/test_pending_tasks.py +0 -0
  200. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/mcp/test_pipeline.py +0 -0
  201. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/mcp/test_posthog_mcp.py +0 -0
  202. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/mcp/test_request_headers.py +0 -0
  203. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/mcp/test_resources.py +0 -0
  204. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/mcp/test_review_fixes.py +0 -0
  205. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/mcp/test_send_tools_list_event.py +0 -0
  206. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/mcp/test_session_token.py +0 -0
  207. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/mcp/test_tool_input.py +0 -0
  208. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/mcp/test_transport_identity.py +0 -0
  209. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/mcp/test_truncation.py +0 -0
  210. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/mcp/test_types.py +0 -0
  211. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/mcp/test_units.py +0 -0
  212. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/mcp/test_unknown_tool.py +0 -0
  213. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/mcp/test_v2_lowlevel.py +0 -0
  214. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/mcp/test_v2_mcpserver.py +0 -0
  215. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/mcp/test_v2_wire_dual_era.py +0 -0
  216. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/mcp/test_virtual_tools.py +0 -0
  217. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/released_flags_scenarios.py +0 -0
  218. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_ai_capture_lane.py +0 -0
  219. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_async_client.py +0 -0
  220. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_async_consumer.py +0 -0
  221. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_async_feature_flags.py +0 -0
  222. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_async_request.py +0 -0
  223. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_async_utils.py +0 -0
  224. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_before_send.py +0 -0
  225. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_bucketed_rate_limiter.py +0 -0
  226. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_capture_compression.py +0 -0
  227. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_capture_event.py +0 -0
  228. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_capture_invariants.py +0 -0
  229. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_capture_send.py +0 -0
  230. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_client.py +0 -0
  231. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_client_crap_flags.py +0 -0
  232. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_client_fork.py +0 -0
  233. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_code_variables.py +0 -0
  234. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_consumer.py +0 -0
  235. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_contexts.py +0 -0
  236. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_emails.py +0 -0
  237. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_evaluate_flags.py +0 -0
  238. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_event_options.py +0 -0
  239. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_exception_capture.py +0 -0
  240. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_exception_utils.py +0 -0
  241. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_experiment_exposure.py +0 -0
  242. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_failed_flag_records.py +0 -0
  243. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_feature_flag.py +0 -0
  244. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_feature_flag_called_minimization.py +0 -0
  245. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_feature_flag_has_experiment.py +0 -0
  246. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_feature_flag_result.py +0 -0
  247. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_feature_flags.py +0 -0
  248. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_feature_flags_regex.py +0 -0
  249. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_flag_cache_eviction_reads.py +0 -0
  250. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_flag_cache_publication.py +0 -0
  251. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_flag_definition_cache.py +0 -0
  252. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_flag_payload_parsing.py +0 -0
  253. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_flags_released_behaviour.py +0 -0
  254. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_flags_v4_response.py +0 -0
  255. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_gevent_compat.py +0 -0
  256. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_metrics.py +0 -0
  257. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_metrics_autocapture.py +0 -0
  258. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_module.py +0 -0
  259. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_posthog_upgrade_workflow.py +0 -0
  260. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_property_matching_version.py +0 -0
  261. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_redis_flag_cache_snapshot.py +0 -0
  262. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_reference_markdown.py +0 -0
  263. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_release_id.py +0 -0
  264. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_request.py +0 -0
  265. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_server_payload_snapshots.py +0 -0
  266. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_size_limited_dict.py +0 -0
  267. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_types.py +0 -0
  268. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_utils.py +0 -0
  269. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/test_utils_acceptance.py +0 -0
  270. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/tracing/__init__.py +0 -0
  271. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/tracing/conftest.py +0 -0
  272. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/tracing/helpers.py +0 -0
  273. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/tracing/test_client_traces.py +0 -0
  274. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/tracing/test_config.py +0 -0
  275. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/tracing/test_export.py +0 -0
  276. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/tracing/test_ids.py +0 -0
  277. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/tracing/test_limits.py +0 -0
  278. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/tracing/test_otlp.py +0 -0
  279. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/tracing/test_pipeline.py +0 -0
  280. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/tracing/test_sanitize.py +0 -0
  281. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/tracing/test_span.py +0 -0
  282. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/tracing/test_traceparent.py +0 -0
  283. {posthog-8.2.4 → posthog-8.2.5}/posthog/test/tracing/test_transport.py +0 -0
  284. {posthog-8.2.4 → posthog-8.2.5}/posthog/tracing/__init__.py +0 -0
  285. {posthog-8.2.4 → posthog-8.2.5}/posthog/tracing/_before_span_send.py +0 -0
  286. {posthog-8.2.4 → posthog-8.2.5}/posthog/tracing/_config.py +0 -0
  287. {posthog-8.2.4 → posthog-8.2.5}/posthog/tracing/_context.py +0 -0
  288. {posthog-8.2.4 → posthog-8.2.5}/posthog/tracing/_drops.py +0 -0
  289. {posthog-8.2.4 → posthog-8.2.5}/posthog/tracing/_export.py +0 -0
  290. {posthog-8.2.4 → posthog-8.2.5}/posthog/tracing/_ids.py +0 -0
  291. {posthog-8.2.4 → posthog-8.2.5}/posthog/tracing/_limits.py +0 -0
  292. {posthog-8.2.4 → posthog-8.2.5}/posthog/tracing/_otlp.py +0 -0
  293. {posthog-8.2.4 → posthog-8.2.5}/posthog/tracing/_pipeline.py +0 -0
  294. {posthog-8.2.4 → posthog-8.2.5}/posthog/tracing/_sanitize.py +0 -0
  295. {posthog-8.2.4 → posthog-8.2.5}/posthog/tracing/_span.py +0 -0
  296. {posthog-8.2.4 → posthog-8.2.5}/posthog/tracing/_traceparent.py +0 -0
  297. {posthog-8.2.4 → posthog-8.2.5}/posthog/tracing/_transport.py +0 -0
  298. {posthog-8.2.4 → posthog-8.2.5}/posthog/tracing/span.py +0 -0
  299. {posthog-8.2.4 → posthog-8.2.5}/posthog/types.py +0 -0
  300. {posthog-8.2.4 → posthog-8.2.5}/posthog/utils.py +0 -0
  301. {posthog-8.2.4 → posthog-8.2.5}/posthog.egg-info/SOURCES.txt +0 -0
  302. {posthog-8.2.4 → posthog-8.2.5}/posthog.egg-info/dependency_links.txt +0 -0
  303. {posthog-8.2.4 → posthog-8.2.5}/posthog.egg-info/requires.txt +0 -0
  304. {posthog-8.2.4 → posthog-8.2.5}/posthog.egg-info/top_level.txt +0 -0
  305. {posthog-8.2.4 → posthog-8.2.5}/setup.cfg +0 -0
  306. {posthog-8.2.4 → posthog-8.2.5}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: posthog
3
- Version: 8.2.4
3
+ Version: 8.2.5
4
4
  Summary: Integrate PostHog into any python application.
5
5
  Home-page: https://github.com/posthog/posthog-python
6
6
  Author: Posthog
@@ -6,7 +6,7 @@ into standardized formats for PostHog tracking.
6
6
  """
7
7
 
8
8
  import json
9
- from typing import Any, Dict, List, Literal, Optional, Tuple
9
+ from typing import Any, Dict, List, Literal, Optional, Tuple, cast
10
10
 
11
11
  from posthog.ai.media import to_plain
12
12
  from posthog.ai.types import (
@@ -160,6 +160,11 @@ def format_anthropic_streaming_content(
160
160
  }
161
161
  )
162
162
 
163
+ elif block.get("type"):
164
+ # Server tool blocks (server_tool_use, web_search_tool_result, ...) pass
165
+ # through as-is, matching what the non-streaming path records.
166
+ formatted.append(cast(FormattedContentItem, dict(block)))
167
+
163
168
  return formatted
164
169
 
165
170
 
@@ -388,16 +393,21 @@ def finalize_anthropic_tool_input(
388
393
  if hasattr(event, "index") and event.index < len(content_blocks):
389
394
  block = content_blocks[event.index]
390
395
 
391
- if block.get("type") == "function" and block.get("id") in tools_in_progress:
392
- tool = tools_in_progress[block["id"]]
396
+ block_id = block.get("id")
397
+ if block_id is not None and block_id in tools_in_progress:
398
+ tool = tools_in_progress[block_id]
393
399
 
394
400
  try:
395
- block["function"]["arguments"] = json.loads(tool["input_string"])
401
+ parsed = json.loads(tool["input_string"])
402
+ if block.get("type") == "function":
403
+ block["function"]["arguments"] = parsed
404
+ elif tool["input_string"]:
405
+ cast(Dict[str, Any], block)["input"] = parsed
396
406
  except (json.JSONDecodeError, Exception):
397
407
  # Keep empty dict if parsing fails
398
408
  pass
399
409
 
400
- del tools_in_progress[block["id"]]
410
+ del tools_in_progress[block_id]
401
411
 
402
412
 
403
413
  def format_anthropic_streaming_input(kwargs: Dict[str, Any]) -> Any:
@@ -569,6 +579,16 @@ def _start_anthropic_block(
569
579
  }
570
580
  return redacted_block, None
571
581
 
582
+ # Keep other blocks (server_tool_use, web_search_tool_result, ...) in their
583
+ # plain form, as format_anthropic_response does. A server tool's input streams
584
+ # in through input_json_delta events like a client tool's.
585
+ plain = to_plain(block)
586
+ if isinstance(plain, dict) and plain.get("type"):
587
+ other_block = cast(StreamingContentBlock, plain)
588
+ if "input" in plain and plain.get("id"):
589
+ return other_block, {"block": other_block, "input_string": ""}
590
+ return other_block, None
591
+
572
592
  return None, None
573
593
 
574
594
 
@@ -592,7 +612,8 @@ def _append_anthropic_tool_json(
592
612
  if hasattr(event, "index") and event.index < len(content_blocks):
593
613
  block = content_blocks[event.index]
594
614
 
595
- if block.get("type") == "function" and block.get("id") in tools_in_progress:
596
- tool = tools_in_progress[block["id"]]
615
+ block_id = block.get("id")
616
+ if block_id is not None and block_id in tools_in_progress:
617
+ tool = tools_in_progress[block_id]
597
618
  partial_json = getattr(event.delta, "partial_json", "")
598
619
  tool["input_string"] += partial_json
@@ -0,0 +1 @@
1
+ VERSION = "8.2.5"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: posthog
3
- Version: 8.2.4
3
+ Version: 8.2.5
4
4
  Summary: Integrate PostHog into any python application.
5
5
  Home-page: https://github.com/posthog/posthog-python
6
6
  Author: Posthog
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "posthog"
7
- version = "8.2.4"
7
+ version = "8.2.5"
8
8
  description = "Integrate PostHog into any python application."
9
9
  authors = [{ name = "PostHog", email = "engineering@posthog.com" }]
10
10
  maintainers = [{ name = "PostHog", email = "engineering@posthog.com" }]
@@ -1 +0,0 @@
1
- VERSION = "8.2.4"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes