avartha-python-sdk 0.0.1__tar.gz → 0.0.3__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.
- avartha_python_sdk-0.0.3/.github/workflows/ci.yml +102 -0
- avartha_python_sdk-0.0.3/.github/workflows/preview-behavior.yml +80 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/.github/workflows/publish.yml +11 -4
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/.gitignore +2 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/AGENTS.md +5 -0
- avartha_python_sdk-0.0.3/CONTRIBUTING.md +62 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/MANIFEST.in +3 -1
- avartha_python_sdk-0.0.3/Makefile +30 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/PKG-INFO +134 -110
- avartha_python_sdk-0.0.3/README.md +408 -0
- avartha_python_sdk-0.0.3/THIRD_PARTY_NOTICES +241 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/docs/audit/report.md +7 -0
- avartha_python_sdk-0.0.3/docs/compatibility.md +380 -0
- avartha_python_sdk-0.0.3/docs/migration.md +306 -0
- avartha_python_sdk-0.0.3/docs/platform.md +161 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/docs/preview-testing.md +33 -15
- avartha_python_sdk-0.0.3/docs/tts-reception-validation.md +78 -0
- avartha_python_sdk-0.0.3/docs/websocket-behavior.md +140 -0
- avartha_python_sdk-0.0.3/docs/websocket-fuzz.md +107 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/examples/realtime_asr.py +1 -4
- avartha_python_sdk-0.0.3/examples/tts.py +62 -0
- avartha_python_sdk-0.0.3/examples/tts_multi_context.py +63 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/pyproject.toml +6 -9
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/scripts/audit/catalog.py +17 -26
- avartha_python_sdk-0.0.3/scripts/freeze_realtime_types.py +157 -0
- avartha_python_sdk-0.0.3/scripts/preview_behavior.py +1355 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/scripts/preview_smoke.py +33 -30
- avartha_python_sdk-0.0.3/src/avartha/__init__.py +97 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/src/avartha/_config.py +25 -15
- avartha_python_sdk-0.0.3/src/avartha/_exceptions.py +50 -0
- avartha_python_sdk-0.0.3/src/avartha/_http_errors.py +16 -0
- avartha_python_sdk-0.0.3/src/avartha/_models.py +187 -0
- avartha_python_sdk-0.0.3/src/avartha/_openai_http.py +284 -0
- avartha_python_sdk-0.0.3/src/avartha/_openai_http_errors.py +82 -0
- avartha_python_sdk-0.0.3/src/avartha/_pacing.py +54 -0
- avartha_python_sdk-0.0.3/src/avartha/_realtime_asr.py +318 -0
- avartha_python_sdk-0.0.3/src/avartha/_realtime_openai.py +640 -0
- avartha_python_sdk-0.0.3/src/avartha/_realtime_resources.py +210 -0
- avartha_python_sdk-0.0.3/src/avartha/_realtime_tts.py +824 -0
- avartha_python_sdk-0.0.3/src/avartha/_sentinels.py +25 -0
- avartha_python_sdk-0.0.3/src/avartha/_speech_config.py +59 -0
- avartha_python_sdk-0.0.3/src/avartha/_speech_http.py +294 -0
- avartha_python_sdk-0.0.3/src/avartha/_speech_resources.py +478 -0
- avartha_python_sdk-0.0.3/src/avartha/_unsupported.py +20 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/src/avartha/_version.py +3 -3
- avartha_python_sdk-0.0.3/src/avartha/_websocket.py +22 -0
- avartha_python_sdk-0.0.3/src/avartha/_ws_state.py +149 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/src/avartha/client.py +0 -10
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/src/avartha/control.py +251 -23
- avartha_python_sdk-0.0.3/src/avartha/conversational_ai/__init__.py +5 -0
- avartha_python_sdk-0.0.3/src/avartha/elevenlabs.py +160 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/src/avartha/errors.py +1 -1
- avartha_python_sdk-0.0.3/src/avartha/openai.py +339 -0
- avartha_python_sdk-0.0.3/src/avartha/pagination.py +54 -0
- avartha_python_sdk-0.0.3/src/avartha/realtime/__init__.py +31 -0
- avartha_python_sdk-0.0.3/src/avartha/realtime/speech.py +31 -0
- avartha_python_sdk-0.0.3/src/avartha/resources/__init__.py +1 -0
- avartha_python_sdk-0.0.3/src/avartha/resources/models.py +201 -0
- avartha_python_sdk-0.0.3/src/avartha/resources/realtime/__init__.py +19 -0
- avartha_python_sdk-0.0.3/src/avartha/resources/realtime/realtime.py +37 -0
- avartha_python_sdk-0.0.3/src/avartha/types/__init__.py +4 -0
- avartha_python_sdk-0.0.3/src/avartha/types/audio/__init__.py +3 -0
- avartha_python_sdk-0.0.3/src/avartha/types/audio/transcription_language.py +9 -0
- avartha_python_sdk-0.0.3/src/avartha/types/model.py +13 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/__init__.py +305 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/audio_transcription.py +29 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/audio_transcription_param.py +32 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/conversation_created_event.py +18 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/conversation_item.py +40 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/conversation_item_added.py +15 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/conversation_item_create_event.py +15 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/conversation_item_create_event_param.py +18 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/conversation_item_created_event.py +15 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/conversation_item_delete_event.py +13 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/conversation_item_delete_event_param.py +15 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/conversation_item_deleted_event.py +13 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/conversation_item_done.py +15 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/conversation_item_input_audio_transcription_completed_event.py +47 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/conversation_item_input_audio_transcription_delta_event.py +17 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/conversation_item_input_audio_transcription_failed_event.py +22 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/conversation_item_input_audio_transcription_segment.py +19 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/conversation_item_param.py +42 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/conversation_item_retrieve_event.py +13 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/conversation_item_retrieve_event_param.py +15 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/conversation_item_truncate_event.py +15 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/conversation_item_truncate_event_param.py +17 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/conversation_item_truncated_event.py +15 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/input_audio_buffer_append_event.py +13 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/input_audio_buffer_append_event_param.py +15 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/input_audio_buffer_clear_event.py +12 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/input_audio_buffer_clear_event_param.py +14 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/input_audio_buffer_cleared_event.py +12 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/input_audio_buffer_commit_event.py +12 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/input_audio_buffer_commit_event_param.py +14 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/input_audio_buffer_committed_event.py +14 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/input_audio_buffer_dtmf_event_received_event.py +13 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/input_audio_buffer_speech_started_event.py +14 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/input_audio_buffer_speech_stopped_event.py +14 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/input_audio_buffer_timeout_triggered.py +15 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/log_prob_properties.py +11 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/mcp_list_tools_completed.py +13 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/mcp_list_tools_failed.py +13 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/mcp_list_tools_in_progress.py +13 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/noise_reduction_type.py +6 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/output_audio_buffer_clear_event.py +12 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/output_audio_buffer_clear_event_param.py +14 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/rate_limits_updated_event.py +20 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_audio_config.py +12 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_audio_config_input.py +22 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_audio_config_input_param.py +25 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_audio_config_output.py +27 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_audio_config_output_param.py +30 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_audio_config_param.py +15 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_audio_formats.py +25 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_audio_formats_param.py +25 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_audio_input_turn_detection.py +29 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_audio_input_turn_detection_param.py +29 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_client_event.py +34 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_client_event_param.py +48 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_conversation_item_assistant_message.py +23 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_conversation_item_assistant_message_param.py +26 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_conversation_item_function_call.py +17 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_conversation_item_function_call_output.py +16 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_conversation_item_function_call_output_param.py +18 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_conversation_item_function_call_param.py +19 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_conversation_item_system_message.py +21 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_conversation_item_system_message_param.py +24 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_conversation_item_user_message.py +25 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_conversation_item_user_message_param.py +28 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_error.py +13 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_error_event.py +14 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_function_tool.py +14 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_function_tool_param.py +16 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_mcp_approval_request.py +15 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_mcp_approval_request_param.py +17 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_mcp_approval_response.py +15 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_mcp_approval_response_param.py +17 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_mcp_list_tools.py +21 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_mcp_list_tools_param.py +24 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_mcp_protocol_error.py +13 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_mcp_protocol_error_param.py +15 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_mcp_tool_call.py +25 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_mcp_tool_call_param.py +29 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_mcp_tool_execution_error.py +12 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_mcp_tool_execution_error_param.py +14 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_mcphttp_error.py +13 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_mcphttp_error_param.py +15 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_reasoning.py +10 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_reasoning_effort.py +6 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_reasoning_param.py +13 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_response.py +41 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_response_create_audio_output.py +30 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_response_create_audio_output_param.py +33 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_response_create_mcp_tool.py +70 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_response_create_mcp_tool_param.py +69 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_response_create_params.py +36 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_response_create_params_param.py +42 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_response_status.py +20 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_response_usage.py +19 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_response_usage_input_token_details.py +19 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_response_usage_output_token_details.py +10 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_server_event.py +157 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_session_create_request.py +55 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_session_create_request_param.py +57 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_tool_choice_config.py +10 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_tool_choice_config_param.py +14 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_tools_config.py +8 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_tools_config_param.py +78 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_tools_config_union.py +77 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_tracing_config.py +16 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_tracing_config_param.py +18 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_transcription_session_audio.py +12 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_transcription_session_audio_input.py +22 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_transcription_session_audio_input_param.py +25 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_transcription_session_audio_input_turn_detection.py +29 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_transcription_session_audio_input_turn_detection_param.py +29 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_transcription_session_audio_param.py +15 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_transcription_session_create_request.py +16 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_transcription_session_create_request_param.py +19 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_truncation.py +10 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_truncation_param.py +14 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_truncation_retention_ratio.py +17 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/realtime_truncation_retention_ratio_param.py +19 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/response_audio_delta_event.py +17 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/response_audio_done_event.py +16 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/response_audio_transcript_delta_event.py +17 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/response_audio_transcript_done_event.py +17 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/response_cancel_event.py +13 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/response_cancel_event_param.py +15 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/response_content_part_added_event.py +24 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/response_content_part_done_event.py +24 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/response_create_event.py +14 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/response_create_event_param.py +19 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/response_created_event.py +14 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/response_done_event.py +14 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/response_function_call_arguments_delta_event.py +17 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/response_function_call_arguments_done_event.py +18 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/response_mcp_call_arguments_delta.py +17 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/response_mcp_call_arguments_done.py +16 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/response_mcp_call_completed.py +14 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/response_mcp_call_failed.py +14 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/response_mcp_call_in_progress.py +14 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/response_output_item_added_event.py +16 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/response_output_item_done_event.py +16 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/response_text_delta_event.py +17 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/response_text_done_event.py +17 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/session_created_event.py +18 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/session_update_event.py +18 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/session_update_event_param.py +25 -0
- avartha_python_sdk-0.0.3/src/avartha/types/realtime/session_updated_event.py +18 -0
- avartha_python_sdk-0.0.3/src/avartha/types/responses/__init__.py +16 -0
- avartha_python_sdk-0.0.3/src/avartha/types/responses/image_detail.py +6 -0
- avartha_python_sdk-0.0.3/src/avartha/types/responses/response_input_file.py +21 -0
- avartha_python_sdk-0.0.3/src/avartha/types/responses/response_input_file_param.py +23 -0
- avartha_python_sdk-0.0.3/src/avartha/types/responses/response_input_image.py +20 -0
- avartha_python_sdk-0.0.3/src/avartha/types/responses/response_input_image_param.py +23 -0
- avartha_python_sdk-0.0.3/src/avartha/types/responses/response_input_text.py +17 -0
- avartha_python_sdk-0.0.3/src/avartha/types/responses/response_input_text_param.py +19 -0
- avartha_python_sdk-0.0.3/src/avartha/types/responses/response_prompt.py +17 -0
- avartha_python_sdk-0.0.3/src/avartha/types/responses/response_prompt_param.py +22 -0
- avartha_python_sdk-0.0.3/src/avartha/types/responses/tool_choice_function.py +12 -0
- avartha_python_sdk-0.0.3/src/avartha/types/responses/tool_choice_function_param.py +14 -0
- avartha_python_sdk-0.0.3/src/avartha/types/responses/tool_choice_mcp.py +13 -0
- avartha_python_sdk-0.0.3/src/avartha/types/responses/tool_choice_mcp_param.py +15 -0
- avartha_python_sdk-0.0.3/src/avartha/types/responses/tool_choice_options.py +6 -0
- avartha_python_sdk-0.0.3/src/avartha/types/shared/__init__.py +3 -0
- avartha_python_sdk-0.0.3/src/avartha/types/shared/metadata.py +6 -0
- avartha_python_sdk-0.0.3/src/avartha/types/shared_params/__init__.py +3 -0
- avartha_python_sdk-0.0.3/src/avartha/types/shared_params/metadata.py +8 -0
- avartha_python_sdk-0.0.3/src/avartha/types/speech/__init__.py +50 -0
- avartha_python_sdk-0.0.3/src/avartha/types/speech/alignment.py +25 -0
- avartha_python_sdk-0.0.3/src/avartha/types/speech/audio_output_multi.py +26 -0
- avartha_python_sdk-0.0.3/src/avartha/types/speech/close_context.py +15 -0
- avartha_python_sdk-0.0.3/src/avartha/types/speech/close_socket.py +14 -0
- avartha_python_sdk-0.0.3/src/avartha/types/speech/final_output_multi.py +20 -0
- avartha_python_sdk-0.0.3/src/avartha/types/speech/fine_tuning_response.py +31 -0
- avartha_python_sdk-0.0.3/src/avartha/types/speech/fine_tuning_response_state_value.py +8 -0
- avartha_python_sdk-0.0.3/src/avartha/types/speech/flush_context.py +16 -0
- avartha_python_sdk-0.0.3/src/avartha/types/speech/generation_config.py +14 -0
- avartha_python_sdk-0.0.3/src/avartha/types/speech/get_voices_response.py +15 -0
- avartha_python_sdk-0.0.3/src/avartha/types/speech/get_voices_v_2_response.py +18 -0
- avartha_python_sdk-0.0.3/src/avartha/types/speech/initialize_connection_multi.py +25 -0
- avartha_python_sdk-0.0.3/src/avartha/types/speech/language_response.py +15 -0
- avartha_python_sdk-0.0.3/src/avartha/types/speech/manual_verification_file_response.py +18 -0
- avartha_python_sdk-0.0.3/src/avartha/types/speech/manual_verification_response.py +17 -0
- avartha_python_sdk-0.0.3/src/avartha/types/speech/model.py +32 -0
- avartha_python_sdk-0.0.3/src/avartha/types/speech/model_rates_response_model.py +15 -0
- avartha_python_sdk-0.0.3/src/avartha/types/speech/normalized_alignment.py +25 -0
- avartha_python_sdk-0.0.3/src/avartha/types/speech/output_format.py +20 -0
- avartha_python_sdk-0.0.3/src/avartha/types/speech/pronunciation_dictionary_locator.py +15 -0
- avartha_python_sdk-0.0.3/src/avartha/types/speech/reader_resource_response_model.py +18 -0
- avartha_python_sdk-0.0.3/src/avartha/types/speech/reader_resource_response_model_resource_type.py +7 -0
- avartha_python_sdk-0.0.3/src/avartha/types/speech/realtime_voice_settings.py +18 -0
- avartha_python_sdk-0.0.3/src/avartha/types/speech/recording_response.py +18 -0
- avartha_python_sdk-0.0.3/src/avartha/types/speech/review_status.py +8 -0
- avartha_python_sdk-0.0.3/src/avartha/types/speech/send_text_multi.py +16 -0
- avartha_python_sdk-0.0.3/src/avartha/types/speech/speaker_response_model.py +17 -0
- avartha_python_sdk-0.0.3/src/avartha/types/speech/speaker_separation_response_model.py +22 -0
- avartha_python_sdk-0.0.3/src/avartha/types/speech/speaker_separation_response_model_status.py +7 -0
- avartha_python_sdk-0.0.3/src/avartha/types/speech/utterance_response_model.py +15 -0
- avartha_python_sdk-0.0.3/src/avartha/types/speech/verification_attempt_response.py +20 -0
- avartha_python_sdk-0.0.3/src/avartha/types/speech/verified_voice_language_response_model.py +18 -0
- avartha_python_sdk-0.0.3/src/avartha/types/speech/voice.py +53 -0
- avartha_python_sdk-0.0.3/src/avartha/types/speech/voice_category.py +8 -0
- avartha_python_sdk-0.0.3/src/avartha/types/speech/voice_labelling_status.py +5 -0
- avartha_python_sdk-0.0.3/src/avartha/types/speech/voice_recording_quality.py +7 -0
- avartha_python_sdk-0.0.3/src/avartha/types/speech/voice_safety_control.py +7 -0
- avartha_python_sdk-0.0.3/src/avartha/types/speech/voice_sample.py +26 -0
- avartha_python_sdk-0.0.3/src/avartha/types/speech/voice_settings.py +18 -0
- avartha_python_sdk-0.0.3/src/avartha/types/speech/voice_sharing_moderation_check_response_model.py +22 -0
- avartha_python_sdk-0.0.3/src/avartha/types/speech/voice_sharing_response.py +53 -0
- avartha_python_sdk-0.0.3/src/avartha/types/speech/voice_sharing_response_category.py +8 -0
- avartha_python_sdk-0.0.3/src/avartha/types/speech/voice_sharing_state.py +7 -0
- avartha_python_sdk-0.0.3/src/avartha/types/speech/voice_verification_response.py +20 -0
- avartha_python_sdk-0.0.3/src/avartha/types/speech_language.py +17 -0
- avartha_python_sdk-0.0.3/src/avartha/types/websocket_connection_options.py +25 -0
- avartha_python_sdk-0.0.3/src/avartha/types/websocket_reconnection.py +26 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/src/avartha_python_sdk.egg-info/PKG-INFO +134 -110
- avartha_python_sdk-0.0.3/src/avartha_python_sdk.egg-info/SOURCES.txt +344 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/src/avartha_python_sdk.egg-info/requires.txt +1 -5
- avartha_python_sdk-0.0.3/tests/fixtures/elevenlabs-2.68.0.json +1542 -0
- avartha_python_sdk-0.0.3/tests/fixtures/openai/realtime.json +2791 -0
- avartha_python_sdk-0.0.3/tests/fixtures/openai-models-3.13.0.json +325 -0
- avartha_python_sdk-0.0.3/tests/fixtures/preview/constraints.txt +4 -0
- avartha_python_sdk-0.0.3/tests/fixtures/preview/contract.json +255 -0
- avartha_python_sdk-0.0.3/tests/fixtures/speech-contract.md +46 -0
- avartha_python_sdk-0.0.3/tests/fixtures/speech-http-2.68.0.json +1081 -0
- avartha_python_sdk-0.0.3/tests/test_clients.py +124 -0
- avartha_python_sdk-0.0.3/tests/test_control_workspaces.py +458 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/tests/test_fence.py +18 -0
- avartha_python_sdk-0.0.3/tests/test_openai_client.py +263 -0
- avartha_python_sdk-0.0.3/tests/test_openai_http.py +434 -0
- avartha_python_sdk-0.0.3/tests/test_owned_asr.py +354 -0
- avartha_python_sdk-0.0.3/tests/test_owned_contract.py +197 -0
- avartha_python_sdk-0.0.3/tests/test_pacing.py +42 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/tests/test_platform_e2e.py +28 -14
- avartha_python_sdk-0.0.3/tests/test_preview_behavior_runner.py +325 -0
- avartha_python_sdk-0.0.3/tests/test_preview_fuzz.py +299 -0
- avartha_python_sdk-0.0.3/tests/test_realtime_lifecycle.py +307 -0
- avartha_python_sdk-0.0.3/tests/test_realtime_model_discovery.py +253 -0
- avartha_python_sdk-0.0.3/tests/test_speech_contract.py +178 -0
- avartha_python_sdk-0.0.3/tests/test_speech_http.py +485 -0
- avartha_python_sdk-0.0.3/tests/test_tts_context_errors.py +188 -0
- avartha_python_sdk-0.0.3/tests/test_tts_iteration.py +199 -0
- avartha_python_sdk-0.0.3/tests/test_tts_reception.py +394 -0
- avartha_python_sdk-0.0.3/tests/test_tts_send_cancellation.py +431 -0
- avartha_python_sdk-0.0.3/tests/test_websockets.py +714 -0
- avartha_python_sdk-0.0.1/.github/workflows/ci.yml +0 -37
- avartha_python_sdk-0.0.1/CONTRIBUTING.md +0 -14
- avartha_python_sdk-0.0.1/Makefile +0 -17
- avartha_python_sdk-0.0.1/README.md +0 -382
- avartha_python_sdk-0.0.1/docs/compatibility.md +0 -112
- avartha_python_sdk-0.0.1/docs/migration.md +0 -192
- avartha_python_sdk-0.0.1/docs/platform.md +0 -78
- avartha_python_sdk-0.0.1/examples/agents.py +0 -66
- avartha_python_sdk-0.0.1/examples/chat.py +0 -28
- avartha_python_sdk-0.0.1/examples/conversation.py +0 -51
- avartha_python_sdk-0.0.1/examples/tts.py +0 -39
- avartha_python_sdk-0.0.1/src/avartha/__init__.py +0 -42
- avartha_python_sdk-0.0.1/src/avartha/_realtime_tts.py +0 -138
- avartha_python_sdk-0.0.1/src/avartha/conversational_ai/__init__.py +0 -19
- avartha_python_sdk-0.0.1/src/avartha/conversational_ai/conversation.py +0 -19
- avartha_python_sdk-0.0.1/src/avartha/conversational_ai/default_audio_interface.py +0 -5
- avartha_python_sdk-0.0.1/src/avartha/elevenlabs.py +0 -120
- avartha_python_sdk-0.0.1/src/avartha/openai.py +0 -106
- avartha_python_sdk-0.0.1/src/avartha_python_sdk.egg-info/SOURCES.txt +0 -78
- avartha_python_sdk-0.0.1/tests/test_clients.py +0 -325
- avartha_python_sdk-0.0.1/tests/test_websockets.py +0 -364
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/.github/CODEOWNERS +0 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/LICENSE +0 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/docs/audit/category-c-validation.md +0 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/docs/audit/findings.csv +0 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/docs/audit/findings.json +0 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/docs/audit/fuzz-coverage.csv +0 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/docs/audit/http-coverage.csv +0 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/docs/audit/http-results.json +0 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/docs/audit/invariants.json +0 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/docs/audit/inventory.csv +0 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/docs/audit/inventory.json +0 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/docs/audit/live-coverage.csv +0 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/docs/audit/live-results.json +0 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/docs/audit/source-fuzz-results.json +0 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/docs/audit/source-manifest.json +0 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/docs/audit/state-fuzz-results.json +0 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/docs/audit/summary.json +0 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/docs/audit/surface-matrix.csv +0 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/docs/audit/wire-schema-results.json +0 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/docs/github-policies.md +0 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/docs/preview-results.json +0 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/examples/endpoints.py +0 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/examples/realtime.py +0 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/scripts/audit/fetch_sources.py +0 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/scripts/audit/http_probe.py +0 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/scripts/audit/invariants.py +0 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/scripts/audit/probe.py +0 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/scripts/audit/report.py +0 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/scripts/audit/source_fuzz.py +0 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/scripts/audit/state_fuzz.py +0 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/scripts/audit/state_model.py +0 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/setup.cfg +0 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/setup.py +0 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/src/avartha/py.typed +0 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/src/avartha_python_sdk.egg-info/dependency_links.txt +0 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/src/avartha_python_sdk.egg-info/top_level.txt +0 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/tests/conftest.py +0 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/tests/test_control.py +0 -0
- {avartha_python_sdk-0.0.1 → avartha_python_sdk-0.0.3}/tests/test_websocket_urls.py +0 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
pull_request:
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
inputs:
|
|
8
|
+
fuzz_seed:
|
|
9
|
+
description: Optional seed to replay speech HTTP and WebSocket fuzz inputs
|
|
10
|
+
type: string
|
|
11
|
+
default: ''
|
|
12
|
+
merge_group:
|
|
13
|
+
types: [checks_requested]
|
|
14
|
+
|
|
15
|
+
permissions:
|
|
16
|
+
contents: read
|
|
17
|
+
|
|
18
|
+
concurrency:
|
|
19
|
+
group: ci-${{ github.ref }}
|
|
20
|
+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
21
|
+
|
|
22
|
+
jobs:
|
|
23
|
+
check:
|
|
24
|
+
name: Python ${{ matrix.python }}
|
|
25
|
+
runs-on: ubuntu-24.04
|
|
26
|
+
timeout-minutes: 20
|
|
27
|
+
strategy:
|
|
28
|
+
fail-fast: false
|
|
29
|
+
matrix:
|
|
30
|
+
python: ['3.12', '3.13', '3.14']
|
|
31
|
+
steps:
|
|
32
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
|
33
|
+
with:
|
|
34
|
+
fetch-depth: 0 # setuptools_scm derives the version from git tags
|
|
35
|
+
fetch-tags: true
|
|
36
|
+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
|
37
|
+
with:
|
|
38
|
+
python-version: ${{ matrix.python }}
|
|
39
|
+
cache: pip
|
|
40
|
+
cache-dependency-path: pyproject.toml
|
|
41
|
+
- run: python -m pip install -e '.[dev]'
|
|
42
|
+
- name: Check SDK and local HTTP/WebSocket contracts
|
|
43
|
+
run: make check PYTEST_ARGS='--junitxml=artifacts/tests/results.xml'
|
|
44
|
+
- name: Upload test results
|
|
45
|
+
if: always()
|
|
46
|
+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
|
47
|
+
with:
|
|
48
|
+
name: tests-python-${{ matrix.python }}
|
|
49
|
+
path: artifacts/tests/results.xml
|
|
50
|
+
if-no-files-found: warn
|
|
51
|
+
retention-days: 14
|
|
52
|
+
|
|
53
|
+
preview-fuzz:
|
|
54
|
+
name: Preview WebSocket compatibility fuzz
|
|
55
|
+
# Fork and Dependabot PRs cannot access repository secrets. Keep their
|
|
56
|
+
# offline checks above; never use pull_request_target to run PR code.
|
|
57
|
+
# Feature branches use the PR run so pushes don't duplicate live workloads.
|
|
58
|
+
if: >-
|
|
59
|
+
github.actor != 'dependabot[bot]' &&
|
|
60
|
+
(github.event_name != 'push' ||
|
|
61
|
+
github.ref == format('refs/heads/{0}', github.event.repository.default_branch)) &&
|
|
62
|
+
(github.event_name != 'pull_request' ||
|
|
63
|
+
github.event.pull_request.head.repo.full_name == github.repository)
|
|
64
|
+
runs-on: ubuntu-24.04
|
|
65
|
+
timeout-minutes: 40
|
|
66
|
+
concurrency:
|
|
67
|
+
group: preview-websocket-live
|
|
68
|
+
cancel-in-progress: false
|
|
69
|
+
steps:
|
|
70
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
|
71
|
+
with:
|
|
72
|
+
fetch-depth: 0
|
|
73
|
+
persist-credentials: false
|
|
74
|
+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
|
75
|
+
with:
|
|
76
|
+
python-version: '3.12'
|
|
77
|
+
cache: pip
|
|
78
|
+
cache-dependency-path: |
|
|
79
|
+
pyproject.toml
|
|
80
|
+
tests/fixtures/preview/constraints.txt
|
|
81
|
+
- run: python -m pip install -c tests/fixtures/preview/constraints.txt .
|
|
82
|
+
- name: Fuzz supported speech HTTP and WebSocket workflows
|
|
83
|
+
env:
|
|
84
|
+
AVARTHA_API_KEY: ${{ secrets.AVARTHA_API_KEY }}
|
|
85
|
+
FUZZ_SEED: ${{ inputs.fuzz_seed || github.run_id }}
|
|
86
|
+
run: >-
|
|
87
|
+
python scripts/preview_behavior.py
|
|
88
|
+
--fuzz-rounds 1 --fuzz-seed "$FUZZ_SEED"
|
|
89
|
+
--output artifacts/preview-fuzz
|
|
90
|
+
- name: Publish fuzz summary
|
|
91
|
+
if: always()
|
|
92
|
+
run: |
|
|
93
|
+
if [[ -f artifacts/preview-fuzz/summary.md ]]; then
|
|
94
|
+
cat artifacts/preview-fuzz/summary.md >> "$GITHUB_STEP_SUMMARY"
|
|
95
|
+
fi
|
|
96
|
+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
|
97
|
+
if: always()
|
|
98
|
+
with:
|
|
99
|
+
name: preview-websocket-fuzz-${{ github.run_id }}-${{ github.run_attempt }}
|
|
100
|
+
path: artifacts/preview-fuzz/
|
|
101
|
+
if-no-files-found: warn
|
|
102
|
+
retention-days: 14
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
name: Preview WebSocket behavior
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
scenario:
|
|
7
|
+
description: Optional exact scenario ID from the contract; empty runs all
|
|
8
|
+
type: string
|
|
9
|
+
default: ''
|
|
10
|
+
llm_model:
|
|
11
|
+
description: Optional text Realtime model; blank selects the first available
|
|
12
|
+
type: string
|
|
13
|
+
default: ''
|
|
14
|
+
tts_model:
|
|
15
|
+
description: Preview PCM24k TTS model
|
|
16
|
+
type: string
|
|
17
|
+
default: qwen/qwen3-tts-12hz-1.7b-base
|
|
18
|
+
asr_model:
|
|
19
|
+
description: Preview PCM16k ASR model
|
|
20
|
+
type: string
|
|
21
|
+
default: mistralai/voxtral-mini-4b-realtime-2602
|
|
22
|
+
voice:
|
|
23
|
+
description: Voice supported by the selected TTS model
|
|
24
|
+
type: string
|
|
25
|
+
default: carol
|
|
26
|
+
|
|
27
|
+
permissions:
|
|
28
|
+
contents: read
|
|
29
|
+
|
|
30
|
+
concurrency:
|
|
31
|
+
group: preview-websocket-live
|
|
32
|
+
cancel-in-progress: false
|
|
33
|
+
|
|
34
|
+
jobs:
|
|
35
|
+
behavior:
|
|
36
|
+
runs-on: ubuntu-24.04
|
|
37
|
+
timeout-minutes: 40
|
|
38
|
+
steps:
|
|
39
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
|
40
|
+
with:
|
|
41
|
+
fetch-depth: 0
|
|
42
|
+
persist-credentials: false
|
|
43
|
+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
|
44
|
+
with:
|
|
45
|
+
python-version: '3.12'
|
|
46
|
+
cache: pip
|
|
47
|
+
cache-dependency-path: |
|
|
48
|
+
pyproject.toml
|
|
49
|
+
tests/fixtures/preview/constraints.txt
|
|
50
|
+
- run: python -m pip install -c tests/fixtures/preview/constraints.txt .
|
|
51
|
+
- name: Exercise supported preview WebSocket behaviors
|
|
52
|
+
env:
|
|
53
|
+
AVARTHA_API_KEY: ${{ secrets.AVARTHA_API_KEY }}
|
|
54
|
+
SCENARIO: ${{ inputs.scenario }}
|
|
55
|
+
LLM_MODEL: ${{ inputs.llm_model }}
|
|
56
|
+
TTS_MODEL: ${{ inputs.tts_model }}
|
|
57
|
+
ASR_MODEL: ${{ inputs.asr_model }}
|
|
58
|
+
VOICE: ${{ inputs.voice }}
|
|
59
|
+
run: |
|
|
60
|
+
args=(--tts-model "$TTS_MODEL" --asr-model "$ASR_MODEL" --voice "$VOICE")
|
|
61
|
+
if [[ -n "$LLM_MODEL" ]]; then
|
|
62
|
+
args+=(--llm-model "$LLM_MODEL")
|
|
63
|
+
fi
|
|
64
|
+
if [[ -n "$SCENARIO" ]]; then
|
|
65
|
+
args+=(--scenario "$SCENARIO")
|
|
66
|
+
fi
|
|
67
|
+
python scripts/preview_behavior.py "${args[@]}"
|
|
68
|
+
- name: Publish behavioral summary
|
|
69
|
+
if: always()
|
|
70
|
+
run: |
|
|
71
|
+
if [[ -f artifacts/preview-behavior/summary.md ]]; then
|
|
72
|
+
cat artifacts/preview-behavior/summary.md >> "$GITHUB_STEP_SUMMARY"
|
|
73
|
+
fi
|
|
74
|
+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
|
75
|
+
if: always()
|
|
76
|
+
with:
|
|
77
|
+
name: preview-websocket-behavior
|
|
78
|
+
path: artifacts/preview-behavior/
|
|
79
|
+
if-no-files-found: warn
|
|
80
|
+
retention-days: 14
|
|
@@ -28,7 +28,7 @@ jobs:
|
|
|
28
28
|
python-version: '3.12'
|
|
29
29
|
cache: pip
|
|
30
30
|
cache-dependency-path: pyproject.toml
|
|
31
|
-
- run: python -m pip install --upgrade pip build twine
|
|
31
|
+
- run: python -m pip install --upgrade pip build twine "setuptools-scm>=8,<9"
|
|
32
32
|
- name: Verify version from tag
|
|
33
33
|
# Refuse to build off an untagged commit: setuptools_scm would guess the
|
|
34
34
|
# next version and we would publish a release nobody tagged.
|
|
@@ -53,10 +53,15 @@ jobs:
|
|
|
53
53
|
environment:
|
|
54
54
|
name: pypi
|
|
55
55
|
url: https://pypi.org/p/avartha-python-sdk
|
|
56
|
-
permissions:
|
|
57
|
-
# Required for Trusted Publishing; no API token is stored in this repo.
|
|
58
|
-
id-token: write
|
|
59
56
|
steps:
|
|
57
|
+
- name: Check PyPI token
|
|
58
|
+
env:
|
|
59
|
+
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
|
|
60
|
+
run: |
|
|
61
|
+
if [ -z "$PYPI_API_TOKEN" ]; then
|
|
62
|
+
echo "::error::Set PYPI_API_TOKEN in the pypi environment before publishing."
|
|
63
|
+
exit 1
|
|
64
|
+
fi
|
|
60
65
|
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
|
|
61
66
|
with:
|
|
62
67
|
name: python-package-distributions
|
|
@@ -64,3 +69,5 @@ jobs:
|
|
|
64
69
|
- uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # release/v1
|
|
65
70
|
with:
|
|
66
71
|
packages-dir: dist/
|
|
72
|
+
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
73
|
+
attestations: false
|
|
@@ -13,4 +13,9 @@ Only expose platform endpoints verified against avartha/platform. Document
|
|
|
13
13
|
server prerequisites separately from SDK support. Keep private SDK attribute
|
|
14
14
|
access isolated and pin the dependency range it was tested against.
|
|
15
15
|
|
|
16
|
+
Keep customer-facing docs free of internal commit IDs, private source links,
|
|
17
|
+
and internal issue references. Record verification provenance with the tests.
|
|
18
|
+
Preserve existing audit and validation records, including their evidence, when
|
|
19
|
+
updating customer-facing guides.
|
|
20
|
+
|
|
16
21
|
Run `make check` before finishing. Do not add bot attribution to commits or docs.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Use Python 3.12+ and run `make install-dev` in a virtual environment.
|
|
4
|
+
`make format` applies formatting; `make check` runs lint, type checking, tests,
|
|
5
|
+
and wheel/source builds. Read AGENTS.md for compatibility rules.
|
|
6
|
+
|
|
7
|
+
Owned protocol primitives must preserve the frozen WebSocket behavior.
|
|
8
|
+
OpenAI and ElevenLabs compatibility is captured in protocol fixtures; neither
|
|
9
|
+
package is needed for development or runtime. Exercise new behavior with real
|
|
10
|
+
local WebSocket tests and those frozen contracts. OpenAI declarations are
|
|
11
|
+
maintained in this repository. To regenerate speech schemas, use
|
|
12
|
+
`make freeze-types FREEZE_ARGS=--elevenlabs-wheel=/path/to/elevenlabs-2.68.0-py3-none-any.whl`;
|
|
13
|
+
the tool reads declarations from that offline wheel without installing or
|
|
14
|
+
importing ElevenLabs. Review changes and third-party notices. Update the
|
|
15
|
+
compatibility matrix when platform support changes; SDK support is separate.
|
|
16
|
+
|
|
17
|
+
## WebSocket tests in GitHub Actions
|
|
18
|
+
|
|
19
|
+
The **CI** workflow runs `make check` on Python 3.12, 3.13, and 3.14 for every
|
|
20
|
+
push and pull request. Its **Check SDK and local WebSocket contracts** step
|
|
21
|
+
includes the real loopback socket tests and saves per-test JUnit results in
|
|
22
|
+
`tests-python-*` artifacts. These tests need no live credentials.
|
|
23
|
+
|
|
24
|
+
Run the full live preview suite on a specific branch with:
|
|
25
|
+
|
|
26
|
+
```sh
|
|
27
|
+
gh workflow run preview-behavior.yml --ref YOUR_BRANCH
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
The repository secret `AVARTHA_API_KEY` supplies credentials. The workflow fails
|
|
31
|
+
if any selected scenario fails, and publishes the scenario summary and JSON/JUnit
|
|
32
|
+
reports even on failure. See the [live contract](docs/websocket-behavior.md) for
|
|
33
|
+
its supported scenarios and limits.
|
|
34
|
+
|
|
35
|
+
## Publishing a release
|
|
36
|
+
|
|
37
|
+
Versions are derived from Git tags by `setuptools_scm`; a tag such as `v0.0.2`
|
|
38
|
+
produces package version `0.0.2`. Do not edit `pyproject.toml` or
|
|
39
|
+
`avartha.__version__` to set a release version.
|
|
40
|
+
|
|
41
|
+
Configure publishing once:
|
|
42
|
+
|
|
43
|
+
1. Create a PyPI API token scoped to the existing `avartha-python-sdk` project.
|
|
44
|
+
2. In the GitHub repository's Settings → Environments, create the `pypi`
|
|
45
|
+
environment and add an environment secret named `PYPI_API_TOKEN` containing
|
|
46
|
+
the token. Store the token only as a secret, never in repository files.
|
|
47
|
+
|
|
48
|
+
For each release:
|
|
49
|
+
|
|
50
|
+
1. Merge the release changes into `main` and wait for CI on Python 3.12, 3.13,
|
|
51
|
+
and 3.14 to pass. Run `make check` locally and review the wheel/source archive.
|
|
52
|
+
2. Create and publish a GitHub release with a new version tag targeting the
|
|
53
|
+
tested commit. For example, use `v0.0.2` for the release after `v0.0.1`.
|
|
54
|
+
3. Wait for **Publish Release to PyPI** to succeed, then verify installation
|
|
55
|
+
with `python -m pip install avartha-python-sdk==0.0.2`.
|
|
56
|
+
|
|
57
|
+
Publishing a GitHub release starts the workflow. Pushing a branch or tag alone
|
|
58
|
+
does not publish. Manual workflow runs must select a release tag; the build
|
|
59
|
+
requires its checked-out commit to have an exact tag. Each release must use a
|
|
60
|
+
new version because PyPI does not allow existing distribution files to be
|
|
61
|
+
replaced. The GitHub repository can remain private; uploaded PyPI artifacts
|
|
62
|
+
are public.
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
include LICENSE README.md CONTRIBUTING.md Makefile AGENTS.md
|
|
1
|
+
include LICENSE THIRD_PARTY_NOTICES README.md CONTRIBUTING.md Makefile AGENTS.md
|
|
2
2
|
recursive-include docs *.md *.json *.csv
|
|
3
3
|
recursive-include examples *.py
|
|
4
4
|
recursive-include tests *.py
|
|
5
|
+
recursive-include tests/fixtures *.json *.txt *.md
|
|
5
6
|
include .github/workflows/ci.yml
|
|
6
7
|
include .github/workflows/publish.yml
|
|
8
|
+
include .github/workflows/preview-behavior.yml
|
|
7
9
|
include setup.py
|
|
8
10
|
recursive-include scripts *.py
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
PYTHON ?= python
|
|
2
|
+
BUILD_FLAGS ?=
|
|
3
|
+
PREVIEW_ARGS ?=
|
|
4
|
+
FREEZE_ARGS ?=
|
|
5
|
+
PYTEST_ARGS ?=
|
|
6
|
+
.PHONY: install-dev lint format test test-preview test-preview-fuzz build check freeze-types
|
|
7
|
+
install-dev:
|
|
8
|
+
$(PYTHON) -m pip install -e '.[dev]'
|
|
9
|
+
lint:
|
|
10
|
+
$(PYTHON) -m ruff check .
|
|
11
|
+
$(PYTHON) -m ruff format --check .
|
|
12
|
+
$(PYTHON) -m mypy
|
|
13
|
+
format:
|
|
14
|
+
$(PYTHON) -m ruff check --fix .
|
|
15
|
+
$(PYTHON) -m ruff format .
|
|
16
|
+
test:
|
|
17
|
+
$(PYTHON) -m pytest $(PYTEST_ARGS)
|
|
18
|
+
test-preview:
|
|
19
|
+
$(PYTHON) scripts/preview_behavior.py $(PREVIEW_ARGS)
|
|
20
|
+
test-preview-fuzz:
|
|
21
|
+
$(PYTHON) scripts/preview_behavior.py --fuzz-rounds 1 $(PREVIEW_ARGS)
|
|
22
|
+
build:
|
|
23
|
+
$(PYTHON) -m build $(BUILD_FLAGS)
|
|
24
|
+
check: lint test build
|
|
25
|
+
|
|
26
|
+
freeze-types:
|
|
27
|
+
$(PYTHON) scripts/freeze_realtime_types.py $(FREEZE_ARGS)
|
|
28
|
+
$(PYTHON) -m ruff format src/avartha/types
|
|
29
|
+
$(PYTHON) -m ruff check --fix --ignore E501 src/avartha/types
|
|
30
|
+
$(PYTHON) -m ruff format src/avartha/types
|