embed-client 4.0.0__tar.gz → 4.0.11__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 (288) hide show
  1. {embed_client-4.0.0/embed_client.egg-info → embed_client-4.0.11}/PKG-INFO +2 -2
  2. {embed_client-4.0.0 → embed_client-4.0.11}/embed_client/__init__.py +1 -1
  3. {embed_client-4.0.0 → embed_client-4.0.11}/embed_client/embedding_client.py +117 -18
  4. {embed_client-4.0.0 → embed_client-4.0.11/embed_client.egg-info}/PKG-INFO +2 -2
  5. {embed_client-4.0.0 → embed_client-4.0.11}/embed_client.egg-info/requires.txt +1 -1
  6. {embed_client-4.0.0 → embed_client-4.0.11}/pyproject.toml +2 -2
  7. {embed_client-4.0.0 → embed_client-4.0.11}/tests/test_adapter_phase2.py +15 -13
  8. {embed_client-4.0.0 → embed_client-4.0.11}/tests/test_async_client_real.py +9 -3
  9. {embed_client-4.0.0 → embed_client-4.0.11}/tests/test_async_client_real_fixtures.py +33 -36
  10. {embed_client-4.0.0 → embed_client-4.0.11}/CONFIGURATION.md +0 -0
  11. {embed_client-4.0.0 → embed_client-4.0.11}/LICENSE +0 -0
  12. {embed_client-4.0.0 → embed_client-4.0.11}/MANIFEST.in +0 -0
  13. {embed_client-4.0.0 → embed_client-4.0.11}/README.md +0 -0
  14. {embed_client-4.0.0 → embed_client-4.0.11}/configs/basic_auth.json +0 -0
  15. {embed_client-4.0.0 → embed_client-4.0.11}/configs/http.json +0 -0
  16. {embed_client-4.0.0 → embed_client-4.0.11}/configs/http_8001_test.json +0 -0
  17. {embed_client-4.0.0 → embed_client-4.0.11}/configs/http_correct.json +0 -0
  18. {embed_client-4.0.0 → embed_client-4.0.11}/configs/http_simple.json +0 -0
  19. {embed_client-4.0.0 → embed_client-4.0.11}/configs/http_test.json +0 -0
  20. {embed_client-4.0.0 → embed_client-4.0.11}/configs/http_token.json +0 -0
  21. {embed_client-4.0.0 → embed_client-4.0.11}/configs/http_token_correct.json +0 -0
  22. {embed_client-4.0.0 → embed_client-4.0.11}/configs/http_token_roles.json +0 -0
  23. {embed_client-4.0.0 → embed_client-4.0.11}/configs/http_token_roles_token_roles.json +0 -0
  24. {embed_client-4.0.0 → embed_client-4.0.11}/configs/http_token_token_roles.json +0 -0
  25. {embed_client-4.0.0 → embed_client-4.0.11}/configs/https.json +0 -0
  26. {embed_client-4.0.0 → embed_client-4.0.11}/configs/https_8001_test.json +0 -0
  27. {embed_client-4.0.0 → embed_client-4.0.11}/configs/https_api_test.json +0 -0
  28. {embed_client-4.0.0 → embed_client-4.0.11}/configs/https_simple.json +0 -0
  29. {embed_client-4.0.0 → embed_client-4.0.11}/configs/https_test.json +0 -0
  30. {embed_client-4.0.0 → embed_client-4.0.11}/configs/https_token.json +0 -0
  31. {embed_client-4.0.0 → embed_client-4.0.11}/configs/https_token_8001.json +0 -0
  32. {embed_client-4.0.0 → embed_client-4.0.11}/configs/https_token_roles.json +0 -0
  33. {embed_client-4.0.0 → embed_client-4.0.11}/configs/https_token_roles_token_roles.json +0 -0
  34. {embed_client-4.0.0 → embed_client-4.0.11}/configs/https_token_token_roles.json +0 -0
  35. {embed_client-4.0.0 → embed_client-4.0.11}/configs/jwt.json +0 -0
  36. {embed_client-4.0.0 → embed_client-4.0.11}/configs/mtls.json +0 -0
  37. {embed_client-4.0.0 → embed_client-4.0.11}/configs/mtls_8001.json +0 -0
  38. {embed_client-4.0.0 → embed_client-4.0.11}/configs/mtls_8001_test.json +0 -0
  39. {embed_client-4.0.0 → embed_client-4.0.11}/configs/mtls_correct.json +0 -0
  40. {embed_client-4.0.0 → embed_client-4.0.11}/configs/mtls_roles.json +0 -0
  41. {embed_client-4.0.0 → embed_client-4.0.11}/configs/mtls_roles_token_roles.json +0 -0
  42. {embed_client-4.0.0 → embed_client-4.0.11}/configs/mtls_test.json +0 -0
  43. {embed_client-4.0.0 → embed_client-4.0.11}/configs/mtls_token_roles.json +0 -0
  44. {embed_client-4.0.0 → embed_client-4.0.11}/configs/mtls_via_adapter.json +0 -0
  45. {embed_client-4.0.0 → embed_client-4.0.11}/configs/roles.json +0 -0
  46. {embed_client-4.0.0 → embed_client-4.0.11}/configs/test_http_simple.json +0 -0
  47. {embed_client-4.0.0 → embed_client-4.0.11}/configs/test_http_token.json +0 -0
  48. {embed_client-4.0.0 → embed_client-4.0.11}/configs/test_http_token_roles.json +0 -0
  49. {embed_client-4.0.0 → embed_client-4.0.11}/configs/test_https_simple.json +0 -0
  50. {embed_client-4.0.0 → embed_client-4.0.11}/configs/test_https_token.json +0 -0
  51. {embed_client-4.0.0 → embed_client-4.0.11}/configs/test_https_token_roles.json +0 -0
  52. {embed_client-4.0.0 → embed_client-4.0.11}/configs/test_mtls_roles.json +0 -0
  53. {embed_client-4.0.0 → embed_client-4.0.11}/configs/test_mtls_simple.json +0 -0
  54. {embed_client-4.0.0 → embed_client-4.0.11}/configs/test_server_http.json +0 -0
  55. {embed_client-4.0.0 → embed_client-4.0.11}/configs/test_server_https.json +0 -0
  56. {embed_client-4.0.0 → embed_client-4.0.11}/configs/test_server_mtls.json +0 -0
  57. {embed_client-4.0.0 → embed_client-4.0.11}/docs/BUGREPORT_queue_manager_daemonic.md +0 -0
  58. {embed_client-4.0.0 → embed_client-4.0.11}/docs/IDENTIFIER_ANALYSIS_REPORT.md +0 -0
  59. {embed_client-4.0.0 → embed_client-4.0.11}/docs/PROJECT_RULES.md +0 -0
  60. {embed_client-4.0.0 → embed_client-4.0.11}/docs/PROPOSAL_SERVER_REQUEST_COALESCING.md +0 -0
  61. {embed_client-4.0.0 → embed_client-4.0.11}/docs/PROPOSAL_TWO_CHANNEL_OR_PUSH.md +0 -0
  62. {embed_client-4.0.0 → embed_client-4.0.11}/docs/SERVER_MODES_AND_CLIENT.md +0 -0
  63. {embed_client-4.0.0 → embed_client-4.0.11}/docs/agents/MAINTAINERS.md +0 -0
  64. {embed_client-4.0.0 → embed_client-4.0.11}/docs/agents/README.md +0 -0
  65. {embed_client-4.0.0 → embed_client-4.0.11}/docs/agents/_scratch/coder_auto_7d00_live_acceptance_run.md +0 -0
  66. {embed_client-4.0.0 → embed_client-4.0.11}/docs/agents/_scratch/coder_auto_live_file_vec_validation_handoff.md +0 -0
  67. {embed_client-4.0.0 → embed_client-4.0.11}/docs/agents/_scratch/coder_auto_release_3_1_9_1_handoff.md +0 -0
  68. {embed_client-4.0.0 → embed_client-4.0.11}/docs/agents/_scratch/coder_auto_release_3_1_9_2_handoff.md +0 -0
  69. {embed_client-4.0.0 → embed_client-4.0.11}/docs/agents/_scratch/doc_writer_file_prep_paragraph_rule_sync.md +0 -0
  70. {embed_client-4.0.0 → embed_client-4.0.11}/docs/agents/_scratch/orch_tactical_debug_7d00_acceptance_research_code.md +0 -0
  71. {embed_client-4.0.0 → embed_client-4.0.11}/docs/agents/_scratch/orch_tactical_debug_7d00_acceptance_research_doc.md +0 -0
  72. {embed_client-4.0.0 → embed_client-4.0.11}/docs/agents/_scratch/orch_tactical_debug_7d00_embed_file_vectorization.md +0 -0
  73. {embed_client-4.0.0 → embed_client-4.0.11}/docs/agents/_scratch/orch_tactical_debug_7d00_research_code.md +0 -0
  74. {embed_client-4.0.0 → embed_client-4.0.11}/docs/agents/_scratch/orch_tactical_debug_embed_compare_research_code.md +0 -0
  75. {embed_client-4.0.0 → embed_client-4.0.11}/docs/agents/_scratch/orch_tactical_debug_embed_compare_research_doc.md +0 -0
  76. {embed_client-4.0.0 → embed_client-4.0.11}/docs/agents/_scratch/orch_tactical_debug_file_vec_adapter_audit_code.md +0 -0
  77. {embed_client-4.0.0 → embed_client-4.0.11}/docs/agents/_scratch/orch_tactical_debug_file_vec_adapter_audit_doc.md +0 -0
  78. {embed_client-4.0.0 → embed_client-4.0.11}/docs/agents/_scratch/orch_tactical_debug_release_research_code.md +0 -0
  79. {embed_client-4.0.0 → embed_client-4.0.11}/docs/agents/_scratch/orch_tactical_debug_release_research_doc.md +0 -0
  80. {embed_client-4.0.0 → embed_client-4.0.11}/docs/agents/_scratch/orch_tactical_debug_tester_verdict.md +0 -0
  81. {embed_client-4.0.0 → embed_client-4.0.11}/docs/agents/_scratch/researcher_code_7d00_e2e_flow.md +0 -0
  82. {embed_client-4.0.0 → embed_client-4.0.11}/docs/agents/_scratch/researcher_code_embed_file_contract_alignment.md +0 -0
  83. {embed_client-4.0.0 → embed_client-4.0.11}/docs/agents/_scratch/researcher_code_file_prep_paragraph_rule.md +0 -0
  84. {embed_client-4.0.0 → embed_client-4.0.11}/docs/agents/_scratch/researcher_code_file_vectorization_client_network_audit.md +0 -0
  85. {embed_client-4.0.0 → embed_client-4.0.11}/docs/agents/_scratch/researcher_code_live_file_vec_validation_metrics.md +0 -0
  86. {embed_client-4.0.0 → embed_client-4.0.11}/docs/agents/_scratch/researcher_code_pypi_version_locations_3_1_9_2.md +0 -0
  87. {embed_client-4.0.0 → embed_client-4.0.11}/docs/agents/_scratch/researcher_code_vectorization_adapter_chain.md +0 -0
  88. {embed_client-4.0.0 → embed_client-4.0.11}/docs/agents/_scratch/researcher_code_vectorization_flow_debug.md +0 -0
  89. {embed_client-4.0.0 → embed_client-4.0.11}/docs/agents/_scratch/researcher_doc_7d00_e2e.md +0 -0
  90. {embed_client-4.0.0 → embed_client-4.0.11}/docs/agents/_scratch/researcher_doc_file_prep_paragraph_rule_audit.md +0 -0
  91. {embed_client-4.0.0 → embed_client-4.0.11}/docs/agents/_scratch/researcher_doc_file_vectorization_adapter_audit.md +0 -0
  92. {embed_client-4.0.0 → embed_client-4.0.11}/docs/agents/_scratch/researcher_doc_file_vectorization_code_docs_alignment.md +0 -0
  93. {embed_client-4.0.0 → embed_client-4.0.11}/docs/agents/_scratch/researcher_doc_file_vectorization_docs_examples_report.md +0 -0
  94. {embed_client-4.0.0 → embed_client-4.0.11}/docs/agents/_scratch/researcher_doc_live_file_vec_validation.md +0 -0
  95. {embed_client-4.0.0 → embed_client-4.0.11}/docs/agents/_scratch/researcher_doc_vectorization_adapter_alignment.md +0 -0
  96. {embed_client-4.0.0 → embed_client-4.0.11}/docs/agents/_scratch/researcher_doc_vectorization_flow_debug.md +0 -0
  97. {embed_client-4.0.0 → embed_client-4.0.11}/docs/agents/_scratch/researcher_doc_vectorization_mtls_manual_checks.md +0 -0
  98. {embed_client-4.0.0 → embed_client-4.0.11}/docs/agents/_scratch/tester_auto_7d00_acceptance_verdict.md +0 -0
  99. {embed_client-4.0.0 → embed_client-4.0.11}/docs/agents/_scratch/tester_auto_live_file_vec_validation_verdict.md +0 -0
  100. {embed_client-4.0.0 → embed_client-4.0.11}/docs/agents/_scratch/tester_auto_release_3_1_9_1_verdict.md +0 -0
  101. {embed_client-4.0.0 → embed_client-4.0.11}/docs/agents/_scratch/tester_auto_release_3_1_9_2_verdict.md +0 -0
  102. {embed_client-4.0.0 → embed_client-4.0.11}/docs/agents/_scratch/vectorization_commands_research.md +0 -0
  103. {embed_client-4.0.0 → embed_client-4.0.11}/docs/agents/common_agent_rules.md +0 -0
  104. {embed_client-4.0.0 → embed_client-4.0.11}/docs/agents/project_overlay.md +0 -0
  105. {embed_client-4.0.0 → embed_client-4.0.11}/docs/agents/universal_project_context.md +0 -0
  106. {embed_client-4.0.0 → embed_client-4.0.11}/docs/ai_reports/baseline_audit_code_research.md +0 -0
  107. {embed_client-4.0.0 → embed_client-4.0.11}/docs/ai_reports/baseline_audit_doc_research.md +0 -0
  108. {embed_client-4.0.0 → embed_client-4.0.11}/docs/ai_reports/documentation_normalization_closure_report.md +0 -0
  109. {embed_client-4.0.0 → embed_client-4.0.11}/docs/ai_reports/production_migration_code_research.md +0 -0
  110. {embed_client-4.0.0 → embed_client-4.0.11}/docs/ai_reports/production_migration_completion_report.md +0 -0
  111. {embed_client-4.0.0 → embed_client-4.0.11}/docs/ai_reports/production_migration_doc_research.md +0 -0
  112. {embed_client-4.0.0 → embed_client-4.0.11}/docs/ai_reports/release_validation_and_pypi_publication_closure_report.md +0 -0
  113. {embed_client-4.0.0 → embed_client-4.0.11}/docs/ai_reports/tests_scripts_and_dependency_cleanup_closure_report.md +0 -0
  114. {embed_client-4.0.0 → embed_client-4.0.11}/docs/ai_reports/tests_scripts_and_dependency_cleanup_tactical_status.md +0 -0
  115. {embed_client-4.0.0 → embed_client-4.0.11}/docs/ai_reports/tests_scripts_and_dependency_migration_inventory.md +0 -0
  116. {embed_client-4.0.0 → embed_client-4.0.11}/docs/ai_reports/tests_scripts_dependency_cleanup_code_research.md +0 -0
  117. {embed_client-4.0.0 → embed_client-4.0.11}/docs/ai_reports/tests_scripts_dependency_cleanup_doc_research.md +0 -0
  118. {embed_client-4.0.0 → embed_client-4.0.11}/docs/api_format.md +0 -0
  119. {embed_client-4.0.0 → embed_client-4.0.11}/docs/client_integration_guide.md +0 -0
  120. {embed_client-4.0.0 → embed_client-4.0.11}/docs/coverage_report.md +0 -0
  121. {embed_client-4.0.0 → embed_client-4.0.11}/docs/error_500_analysis.md +0 -0
  122. {embed_client-4.0.0 → embed_client-4.0.11}/docs/error_handling_complete.md +0 -0
  123. {embed_client-4.0.0 → embed_client-4.0.11}/docs/error_handling_issue.md +0 -0
  124. {embed_client-4.0.0 → embed_client-4.0.11}/docs/rules_bundle_README.md +0 -0
  125. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/_template/README.md +0 -0
  126. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/_template/example_global_step/example_tactical_step/example_atomic_step.md +0 -0
  127. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/_template/example_global_step/example_tactical_step/spec.md +0 -0
  128. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/_template/example_global_step/spec.md +0 -0
  129. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/_template/spec.md +0 -0
  130. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/baseline_audit_and_contract_capture/migration_baseline_deliverable/ATOMIC_STEPS_INDEX.md +0 -0
  131. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/baseline_audit_and_contract_capture/migration_baseline_deliverable/freeze-migration-baseline-evidence-links.md +0 -0
  132. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/baseline_audit_and_contract_capture/migration_baseline_deliverable/spec.md +0 -0
  133. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/baseline_audit_and_contract_capture/spec.md +0 -0
  134. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/documentation_normalization/spec.md +0 -0
  135. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/ATOMIC_STEPS_INDEX.md +0 -0
  136. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-01.md +0 -0
  137. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-02.md +0 -0
  138. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-03.md +0 -0
  139. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-04.md +0 -0
  140. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-05.md +0 -0
  141. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-06.md +0 -0
  142. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-07.md +0 -0
  143. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-08.md +0 -0
  144. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-09.md +0 -0
  145. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-10.md +0 -0
  146. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-11.md +0 -0
  147. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-12.md +0 -0
  148. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-13.md +0 -0
  149. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-14.md +0 -0
  150. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-15.md +0 -0
  151. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-16.md +0 -0
  152. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-17.md +0 -0
  153. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-18.md +0 -0
  154. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-19.md +0 -0
  155. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-20.md +0 -0
  156. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-21.md +0 -0
  157. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-22.md +0 -0
  158. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/plan.md +0 -0
  159. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/production_migration_and_legacy_removal/canonical_client_migration/ATOMIC_STEPS_INDEX.md +0 -0
  160. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/production_migration_and_legacy_removal/canonical_client_migration/PARALLEL_WAVES.md +0 -0
  161. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/production_migration_and_legacy_removal/canonical_client_migration/atomic-01-port-constants-and-exceptions.md +0 -0
  162. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/production_migration_and_legacy_removal/canonical_client_migration/atomic-02-port-embedding-client-helpers-and-status-store.md +0 -0
  163. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/production_migration_and_legacy_removal/canonical_client_migration/atomic-03-port-embedding-client-core.md +0 -0
  164. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/production_migration_and_legacy_removal/canonical_client_migration/atomic-04-package-init-version-and-canonical-exports.md +0 -0
  165. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/production_migration_and_legacy_removal/canonical_client_migration/atomic-05-remove-legacy-async-stack-and-adapter-transport.md +0 -0
  166. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/production_migration_and_legacy_removal/canonical_client_migration/atomic-06-remove-testing-client-and-duplicate-helpers.md +0 -0
  167. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/production_migration_and_legacy_removal/canonical_client_migration/atomic-07-rewire-cli-factory-and-minimal-entry-points.md +0 -0
  168. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/production_migration_and_legacy_removal/canonical_client_migration/spec.md +0 -0
  169. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/production_migration_and_legacy_removal/spec.md +0 -0
  170. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/README.md +0 -0
  171. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/rv_automated_security_matrix/spec.md +0 -0
  172. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/rv_canonical_mtls_real_server_gate/spec.md +0 -0
  173. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/rv_localhost_vectorization/spec.md +0 -0
  174. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/rv_packaging_and_prereqs/spec.md +0 -0
  175. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/rv_pypi_publication/spec.md +0 -0
  176. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/rv_surviving_examples_executable/spec.md +0 -0
  177. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/spec.md +0 -0
  178. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/steps/ATOMIC_STEPS_INDEX.md +0 -0
  179. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/steps/placeholder-corrective-rv01-security-matrix.md +0 -0
  180. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/steps/placeholder-corrective-rv02-vectorization.md +0 -0
  181. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/steps/placeholder-corrective-rv03-broken-example.md +0 -0
  182. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/steps/placeholder-corrective-rv04-canonical-gate.md +0 -0
  183. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/steps/placeholder-corrective-rv05-packaging.md +0 -0
  184. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/steps/placeholder-corrective-rv06-duplicate-version-or-auth.md +0 -0
  185. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/steps/rv01-execute-automated-security-matrix.md +0 -0
  186. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/steps/rv02-execute-localhost-vectorization-mtls-8001.md +0 -0
  187. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/steps/rv03-execute-surviving-examples-sweep.md +0 -0
  188. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/steps/rv04-execute-canonical-mtls-real-server-gate.md +0 -0
  189. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/steps/rv04-supplementary-pytest-canonical-example-contract.md +0 -0
  190. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/steps/rv05-build-artifacts-twine-version-gate.md +0 -0
  191. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/steps/rv06-pypi-upload.md +0 -0
  192. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/spec.md +0 -0
  193. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/tests_scripts_and_dependency_cleanup/spec.md +0 -0
  194. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/tests_scripts_and_dependency_cleanup/steps/ATOMIC_STEPS_INDEX.md +0 -0
  195. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/tests_scripts_and_dependency_cleanup/steps/align-package-version-with-pyproject-metadata.md +0 -0
  196. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/tests_scripts_and_dependency_cleanup/steps/canonical-localhost-8001-mtls-example-and-execution-tests.md +0 -0
  197. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/tests_scripts_and_dependency_cleanup/steps/consolidate-pytest-configuration-single-source.md +0 -0
  198. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/tests_scripts_and_dependency_cleanup/steps/consolidate-redundant-coverage-test-modules.md +0 -0
  199. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/tests_scripts_and_dependency_cleanup/steps/delete-or-replace-skipped-auth-and-ssl-test-modules.md +0 -0
  200. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/tests_scripts_and_dependency_cleanup/steps/extract-async-client-adapter-tests-remove-legacy-aiohttp.md +0 -0
  201. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/tests_scripts_and_dependency_cleanup/steps/fix-or-remove-embed-client-auth-examples.md +0 -0
  202. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/tests_scripts_and_dependency_cleanup/steps/normalize-pyproject-runtime-deps-and-optional-extras.md +0 -0
  203. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/tests_scripts_and_dependency_cleanup/steps/replace-hardcoded-venv-site-packages-in-scripts-and-tests.md +0 -0
  204. {embed_client-4.0.0 → embed_client-4.0.11}/docs/specs/server_client_convergence_and_release/tests_scripts_and_dependency_cleanup/tasks/tsc_linter_exclusions_and_migration_inventory.md +0 -0
  205. {embed_client-4.0.0 → embed_client-4.0.11}/docs/tech_spec/branches/documentation_normalization/README.md +0 -0
  206. {embed_client-4.0.0 → embed_client-4.0.11}/docs/tech_spec/branches/documentation_normalization/tasks/doc_alignment_verification_and_closure.md +0 -0
  207. {embed_client-4.0.0 → embed_client-4.0.11}/docs/tech_spec/branches/documentation_normalization/tasks/doc_guides_examples_canonical_mtls.md +0 -0
  208. {embed_client-4.0.0 → embed_client-4.0.11}/docs/tech_spec/branches/documentation_normalization/tasks/doc_legacy_tree_prune_and_governance.md +0 -0
  209. {embed_client-4.0.0 → embed_client-4.0.11}/docs/tech_spec/branches/documentation_normalization/tasks/doc_root_metadata_and_pypi_surface.md +0 -0
  210. {embed_client-4.0.0 → embed_client-4.0.11}/embed_client/__main__.py +0 -0
  211. {embed_client-4.0.0 → embed_client-4.0.11}/embed_client/adapter_config_factory.py +0 -0
  212. {embed_client-4.0.0 → embed_client-4.0.11}/embed_client/adapter_config_normalizer.py +0 -0
  213. {embed_client-4.0.0 → embed_client-4.0.11}/embed_client/adapter_generator_bridge.py +0 -0
  214. {embed_client-4.0.0 → embed_client-4.0.11}/embed_client/auth.py +0 -0
  215. {embed_client-4.0.0 → embed_client-4.0.11}/embed_client/cli.py +0 -0
  216. {embed_client-4.0.0 → embed_client-4.0.11}/embed_client/cli_core.py +0 -0
  217. {embed_client-4.0.0 → embed_client-4.0.11}/embed_client/client_factory.py +0 -0
  218. {embed_client-4.0.0 → embed_client-4.0.11}/embed_client/client_factory_examples.py +0 -0
  219. {embed_client-4.0.0 → embed_client-4.0.11}/embed_client/client_factory_helpers.py +0 -0
  220. {embed_client-4.0.0 → embed_client-4.0.11}/embed_client/config.py +0 -0
  221. {embed_client-4.0.0 → embed_client-4.0.11}/embed_client/config_defaults.py +0 -0
  222. {embed_client-4.0.0 → embed_client-4.0.11}/embed_client/config_examples.py +0 -0
  223. {embed_client-4.0.0 → embed_client-4.0.11}/embed_client/config_generator.py +0 -0
  224. {embed_client-4.0.0 → embed_client-4.0.11}/embed_client/config_generator_cli.py +0 -0
  225. {embed_client-4.0.0 → embed_client-4.0.11}/embed_client/config_presets.py +0 -0
  226. {embed_client-4.0.0 → embed_client-4.0.11}/embed_client/config_validator.py +0 -0
  227. {embed_client-4.0.0 → embed_client-4.0.11}/embed_client/config_validator_cli.py +0 -0
  228. {embed_client-4.0.0 → embed_client-4.0.11}/embed_client/constants.py +0 -0
  229. {embed_client-4.0.0 → embed_client-4.0.11}/embed_client/demo_cli.py +0 -0
  230. {embed_client-4.0.0 → embed_client-4.0.11}/embed_client/demo_security_cli.py +0 -0
  231. {embed_client-4.0.0 → embed_client-4.0.11}/embed_client/embed_file_output_validate.py +0 -0
  232. {embed_client-4.0.0 → embed_client-4.0.11}/embed_client/embed_file_status_store.py +0 -0
  233. {embed_client-4.0.0 → embed_client-4.0.11}/embed_client/embedding_client_helpers.py +0 -0
  234. {embed_client-4.0.0 → embed_client-4.0.11}/embed_client/example_async_usage.py +0 -0
  235. {embed_client-4.0.0 → embed_client-4.0.11}/embed_client/example_async_usage_demo.py +0 -0
  236. {embed_client-4.0.0 → embed_client-4.0.11}/embed_client/example_async_usage_ru.py +0 -0
  237. {embed_client-4.0.0 → embed_client-4.0.11}/embed_client/example_async_usage_ru_demo.py +0 -0
  238. {embed_client-4.0.0 → embed_client-4.0.11}/embed_client/exceptions.py +0 -0
  239. {embed_client-4.0.0 → embed_client-4.0.11}/embed_client/identifier_types.py +0 -0
  240. {embed_client-4.0.0 → embed_client-4.0.11}/embed_client/json_embed_file_preflight.py +0 -0
  241. {embed_client-4.0.0 → embed_client-4.0.11}/embed_client/local_json_embed_file.py +0 -0
  242. {embed_client-4.0.0 → embed_client-4.0.11}/embed_client/md_embed_file_prep.py +0 -0
  243. {embed_client-4.0.0 → embed_client-4.0.11}/embed_client/response_normalizer.py +0 -0
  244. {embed_client-4.0.0 → embed_client-4.0.11}/embed_client/response_parsers.py +0 -0
  245. {embed_client-4.0.0 → embed_client-4.0.11}/embed_client/security_cli.py +0 -0
  246. {embed_client-4.0.0 → embed_client-4.0.11}/embed_client/security_cli_core.py +0 -0
  247. {embed_client-4.0.0 → embed_client-4.0.11}/embed_client/ssl_examples.py +0 -0
  248. {embed_client-4.0.0 → embed_client-4.0.11}/embed_client/ssl_manager.py +0 -0
  249. {embed_client-4.0.0 → embed_client-4.0.11}/embed_client.egg-info/SOURCES.txt +0 -0
  250. {embed_client-4.0.0 → embed_client-4.0.11}/embed_client.egg-info/dependency_links.txt +0 -0
  251. {embed_client-4.0.0 → embed_client-4.0.11}/embed_client.egg-info/entry_points.txt +0 -0
  252. {embed_client-4.0.0 → embed_client-4.0.11}/embed_client.egg-info/top_level.txt +0 -0
  253. {embed_client-4.0.0 → embed_client-4.0.11}/examples/README.md +0 -0
  254. {embed_client-4.0.0 → embed_client-4.0.11}/examples/__init__.py +0 -0
  255. {embed_client-4.0.0 → embed_client-4.0.11}/examples/async_testing_client_example.py +0 -0
  256. {embed_client-4.0.0 → embed_client-4.0.11}/examples/canonical_mtls_localhost_8001.py +0 -0
  257. {embed_client-4.0.0 → embed_client-4.0.11}/examples/configs/http_simple.json +0 -0
  258. {embed_client-4.0.0 → embed_client-4.0.11}/examples/configs/https_token.json +0 -0
  259. {embed_client-4.0.0 → embed_client-4.0.11}/examples/configs/mtls_roles.json +0 -0
  260. {embed_client-4.0.0 → embed_client-4.0.11}/examples/data/embed_file_json_array_sample.json +0 -0
  261. {embed_client-4.0.0 → embed_client-4.0.11}/examples/embed_file_json_local.py +0 -0
  262. {embed_client-4.0.0 → embed_client-4.0.11}/examples/security_examples.py +0 -0
  263. {embed_client-4.0.0 → embed_client-4.0.11}/examples/security_examples_ru.py +0 -0
  264. {embed_client-4.0.0 → embed_client-4.0.11}/setup.cfg +0 -0
  265. {embed_client-4.0.0 → embed_client-4.0.11}/tests/test_adapter_integration.py +0 -0
  266. {embed_client-4.0.0 → embed_client-4.0.11}/tests/test_adapter_phase1.py +0 -0
  267. {embed_client-4.0.0 → embed_client-4.0.11}/tests/test_all_security_modes.py +0 -0
  268. {embed_client-4.0.0 → embed_client-4.0.11}/tests/test_async_client_adapter.py +0 -0
  269. {embed_client-4.0.0 → embed_client-4.0.11}/tests/test_async_client_stress.py +0 -0
  270. {embed_client-4.0.0 → embed_client-4.0.11}/tests/test_async_client_stress_new.py +0 -0
  271. {embed_client-4.0.0 → embed_client-4.0.11}/tests/test_async_client_stress_updated.py +0 -0
  272. {embed_client-4.0.0 → embed_client-4.0.11}/tests/test_auth_manager.py +0 -0
  273. {embed_client-4.0.0 → embed_client-4.0.11}/tests/test_canonical_mtls_example.py +0 -0
  274. {embed_client-4.0.0 → embed_client-4.0.11}/tests/test_cli_embed_file_json.py +0 -0
  275. {embed_client-4.0.0 → embed_client-4.0.11}/tests/test_cli_exit_codes_insecure.py +0 -0
  276. {embed_client-4.0.0 → embed_client-4.0.11}/tests/test_client_factory.py +0 -0
  277. {embed_client-4.0.0 → embed_client-4.0.11}/tests/test_client_factory_convenience.py +0 -0
  278. {embed_client-4.0.0 → embed_client-4.0.11}/tests/test_client_factory_integration.py +0 -0
  279. {embed_client-4.0.0 → embed_client-4.0.11}/tests/test_config.py +0 -0
  280. {embed_client-4.0.0 → embed_client-4.0.11}/tests/test_embed_file_output_validate.py +0 -0
  281. {embed_client-4.0.0 → embed_client-4.0.11}/tests/test_embed_immediate_mode.py +0 -0
  282. {embed_client-4.0.0 → embed_client-4.0.11}/tests/test_example_async_usage.py +0 -0
  283. {embed_client-4.0.0 → embed_client-4.0.11}/tests/test_json_embed_file_preflight.py +0 -0
  284. {embed_client-4.0.0 → embed_client-4.0.11}/tests/test_local_json_embed_file.py +0 -0
  285. {embed_client-4.0.0 → embed_client-4.0.11}/tests/test_md_embed_file_prep.py +0 -0
  286. {embed_client-4.0.0 → embed_client-4.0.11}/tests/test_security_matrix.py +0 -0
  287. {embed_client-4.0.0 → embed_client-4.0.11}/tests/test_ssl_manager.py +0 -0
  288. {embed_client-4.0.0 → embed_client-4.0.11}/tests/test_with_auth.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: embed-client
3
- Version: 4.0.0
3
+ Version: 4.0.11
4
4
  Summary: Async client for the Embedding Service API. Canonical class: EmbeddingClient (JSON-RPC via mcp-proxy-adapter >=8.10).
5
5
  Author-email: Vasiliy Zdanovskiy <vasilyvz@gmail.com>
6
6
  License-Expression: MIT
@@ -26,7 +26,7 @@ Classifier: Topic :: System :: Networking
26
26
  Requires-Python: >=3.8
27
27
  Description-Content-Type: text/markdown
28
28
  License-File: LICENSE
29
- Requires-Dist: mcp-proxy-adapter>=8.10.18
29
+ Requires-Dist: mcp-proxy-adapter>=8.10.19
30
30
  Provides-Extra: scripts
31
31
  Requires-Dist: pydantic>=2.0.0; extra == "scripts"
32
32
  Provides-Extra: test
@@ -27,7 +27,7 @@ try:
27
27
  __version__ = version("embed-client")
28
28
  except PackageNotFoundError:
29
29
  # Editable checkout without install metadata (e.g. some unit-test sandboxes).
30
- __version__ = "4.0.0"
30
+ __version__ = "4.0.11"
31
31
 
32
32
  __all__ = [
33
33
  "EmbeddingClient",
@@ -27,7 +27,7 @@ from embed_client.embedding_client_helpers import (
27
27
  wait_for_job_poll,
28
28
  )
29
29
  from embed_client.constants import EMBED_COMMAND_SCHEMA_DEFAULT_ERROR_POLICY
30
- from embed_client.exceptions import EmbedClientError
30
+ from embed_client.exceptions import EmbedAPIError, EmbedClientError, EmbedError
31
31
 
32
32
  logger = logging.getLogger(__name__)
33
33
 
@@ -128,12 +128,53 @@ def _normalize_terminal_job_payload(payload: Dict[str, Any]) -> Dict[str, Any]:
128
128
  raise EmbedClientError(f"Job failed: {err}")
129
129
  if ev in ("job_completed", "job_completed_success", "delivery_completed"):
130
130
  raw = payload.get("result") or {}
131
+ error = _find_failed_command_result(raw)
132
+ if error is not None:
133
+ raise EmbedClientError(f"Job command failed: {error}")
131
134
  return _merge_jsonrpc_result_data_layers(raw)
132
135
  raise EmbedClientError(
133
136
  f"Unexpected WebSocket event: {ev} (payload keys: {list(payload.keys())})"
134
137
  )
135
138
 
136
139
 
140
+ def _missing_from_worker_registry(exc: Exception) -> bool:
141
+ """Whether a queued command failed because the worker has no such command.
142
+
143
+ The adapter runs a queued command in a child process whose registry is
144
+ rebuilt from the project's own modules, so the adapter's own builtins —
145
+ help, health, echo — are absent there even though they answer over
146
+ JSON-RPC. Those commands are not broken and must not be reported as such.
147
+ """
148
+ details = getattr(exc, "details", None)
149
+ if not isinstance(details, dict):
150
+ return False
151
+ status = details.get("result_status")
152
+ if not isinstance(status, dict):
153
+ return False
154
+ return "not found" in str(status.get("description") or "").lower()
155
+
156
+
157
+ def _find_failed_command_result(value: Any) -> Optional[str]:
158
+ """Return the first nested command error from a completed queue envelope.
159
+
160
+ A queue job whose command failed still arrives as ``job_completed``: the
161
+ refusal sits inside the envelope with ``success: False``. Without this the
162
+ caller would read a failed command as a successful job.
163
+ """
164
+ if not isinstance(value, dict):
165
+ return None
166
+ if value.get("success") is False:
167
+ error = value.get("error")
168
+ if isinstance(error, dict):
169
+ return str(error.get("message") or error)
170
+ return str(error or "Unknown command error")
171
+ for key in ("result", "data"):
172
+ nested = _find_failed_command_result(value.get(key))
173
+ if nested is not None:
174
+ return nested
175
+ return None
176
+
177
+
137
178
  class EmbeddingClient:
138
179
  """
139
180
  Client for embedding service API.
@@ -557,6 +598,8 @@ class EmbeddingClient:
557
598
  job_id: Optional[str] = None,
558
599
  error_policy: Optional[str] = None,
559
600
  device: Optional[str] = None,
601
+ aggregation_method: Optional[str] = None,
602
+ parts: Optional[List[Optional[List[str]]]] = None,
560
603
  wait: bool = False,
561
604
  wait_timeout: int = 60,
562
605
  poll_interval: float = 1.0,
@@ -576,6 +619,11 @@ class EmbeddingClient:
576
619
  job_id: Optional custom job ID (server may ignore and generate own)
577
620
  error_policy: 'fail_fast' or 'continue'; default from server
578
621
  device: 'auto', 'cpu', 'cuda', 'cuda:0'; default from server
622
+ aggregation_method: How to combine part vectors when a text is
623
+ longer than the model can read. ``None`` embeds directly, and a
624
+ text past the limit is refused rather than truncated.
625
+ parts: One entry per text: a list of parts to combine, or ``None``
626
+ to let the server derive the parts from the text itself.
579
627
  wait: If True, wait for job completion and return results (via /ws).
580
628
  wait_timeout: Max time to wait (seconds); 0 = no timeout.
581
629
  poll_interval: Unused (kept for API compatibility).
@@ -626,6 +674,10 @@ class EmbeddingClient:
626
674
  params["error_policy"] = EMBED_COMMAND_SCHEMA_DEFAULT_ERROR_POLICY
627
675
  if device is not None:
628
676
  params["device"] = device
677
+ if aggregation_method is not None:
678
+ params["aggregation_method"] = aggregation_method
679
+ if parts is not None:
680
+ params["parts"] = parts
629
681
 
630
682
  # When wait=True use execute_async("embed_execute") for in-process execution
631
683
  # (no queue, no worker spawn) to avoid large per-request delay.
@@ -1219,29 +1271,76 @@ class EmbeddingClient:
1219
1271
  *,
1220
1272
  auto_poll: bool = True,
1221
1273
  ) -> Dict[str, Any]:
1222
- """Execute a command via the adapter unified path (CLI and legacy callers)."""
1223
- return await self.client.execute_command_unified(
1224
- command=command,
1225
- params=params or {},
1226
- use_cmd_endpoint=False,
1227
- auto_poll=auto_poll,
1228
- )
1274
+ """Execute a command via the adapter unified path (CLI and legacy callers).
1275
+
1276
+ Callers of this package depend on its own error type, not on whichever
1277
+ exception the transport happens to raise, so an adapter failure and a
1278
+ command that answered with a refusal both arrive as
1279
+ :class:`EmbedAPIError` carrying the server's own error.
1280
+ """
1281
+ try:
1282
+ result = await self.client.execute_command_unified(
1283
+ command=command,
1284
+ params=params or {},
1285
+ use_cmd_endpoint=False,
1286
+ auto_poll=auto_poll,
1287
+ )
1288
+ except EmbedError:
1289
+ raise
1290
+ except Exception as exc:
1291
+ if _missing_from_worker_registry(exc):
1292
+ try:
1293
+ return await self._cmd_over_jsonrpc(command, params or {})
1294
+ except EmbedError:
1295
+ raise
1296
+ except Exception as direct_exc:
1297
+ raise EmbedAPIError(str(direct_exc)) from direct_exc
1298
+ raise EmbedAPIError(str(exc)) from exc
1299
+ failure = _find_failed_command_result(result)
1300
+ if failure is not None:
1301
+ raise EmbedAPIError(failure)
1302
+ return result
1303
+
1304
+ async def _cmd_over_jsonrpc(
1305
+ self, command: str, params: Dict[str, Any]
1306
+ ) -> Dict[str, Any]:
1307
+ """Run *command* over plain JSON-RPC and return its payload."""
1308
+ response = await self.client.jsonrpc_call(command, params)
1309
+ if isinstance(response, dict) and response.get("error") is not None:
1310
+ raise EmbedAPIError(response["error"])
1311
+ payload = response.get("result") if isinstance(response, dict) else None
1312
+ if not isinstance(payload, dict):
1313
+ raise EmbedAPIError(f"Command {command!r} returned {response!r}")
1314
+ failure = _find_failed_command_result(payload)
1315
+ if failure is not None:
1316
+ raise EmbedAPIError(failure)
1317
+ return payload
1229
1318
 
1230
1319
  async def list_queued_commands(
1231
1320
  self,
1232
1321
  status: Optional[str] = None,
1233
1322
  limit: Optional[int] = None,
1234
1323
  ) -> Dict[str, Any]:
1235
- """List queued jobs (adapter queue_list_jobs)."""
1236
- result = await self.client.queue_list_jobs(
1237
- status=status,
1238
- job_type="command_execution",
1239
- )
1240
- if limit and isinstance(result, dict) and "data" in result:
1241
- jobs = result.get("data", {}).get("jobs", [])
1242
- if len(jobs) > limit:
1243
- result["data"]["jobs"] = jobs[:limit]
1244
- result["data"]["total_count"] = limit
1324
+ """List queued jobs (adapter ``queue_list_jobs``).
1325
+
1326
+ The command takes ``status_filter`` and ``limit``; the transport helper
1327
+ of the same name sends ``status``/``job_type`` instead and the server
1328
+ rejects the call, so the request is made directly.
1329
+ """
1330
+ params: Dict[str, Any] = {}
1331
+ if status:
1332
+ params["status_filter"] = status
1333
+ if limit:
1334
+ params["limit"] = int(limit)
1335
+ response = await self.client.jsonrpc_call("queue_list_jobs", params)
1336
+ if isinstance(response, dict) and response.get("error") is not None:
1337
+ raise EmbedAPIError(response["error"])
1338
+ result = response.get("result") if isinstance(response, dict) else None
1339
+ if not isinstance(result, dict):
1340
+ raise EmbedAPIError(f"queue_list_jobs returned {response!r}")
1341
+ failure = _find_failed_command_result(result)
1342
+ if failure is not None:
1343
+ raise EmbedAPIError(failure)
1245
1344
  return result
1246
1345
 
1247
1346
  async def cancel_command(self, job_id: str) -> Dict[str, Any]:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: embed-client
3
- Version: 4.0.0
3
+ Version: 4.0.11
4
4
  Summary: Async client for the Embedding Service API. Canonical class: EmbeddingClient (JSON-RPC via mcp-proxy-adapter >=8.10).
5
5
  Author-email: Vasiliy Zdanovskiy <vasilyvz@gmail.com>
6
6
  License-Expression: MIT
@@ -26,7 +26,7 @@ Classifier: Topic :: System :: Networking
26
26
  Requires-Python: >=3.8
27
27
  Description-Content-Type: text/markdown
28
28
  License-File: LICENSE
29
- Requires-Dist: mcp-proxy-adapter>=8.10.18
29
+ Requires-Dist: mcp-proxy-adapter>=8.10.19
30
30
  Provides-Extra: scripts
31
31
  Requires-Dist: pydantic>=2.0.0; extra == "scripts"
32
32
  Provides-Extra: test
@@ -1,4 +1,4 @@
1
- mcp-proxy-adapter>=8.10.18
1
+ mcp-proxy-adapter>=8.10.19
2
2
 
3
3
  [dev]
4
4
  pytest
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "embed-client"
7
- version = "4.0.0"
7
+ version = "4.0.11"
8
8
  description = """Async client for the Embedding Service API. Canonical class: EmbeddingClient (JSON-RPC via mcp-proxy-adapter >=8.10).
9
9
 
10
10
  Public API highlights:
@@ -37,7 +37,7 @@ classifiers = [
37
37
  "Topic :: System :: Networking",
38
38
  ]
39
39
  dependencies = [
40
- "mcp-proxy-adapter>=8.10.18",
40
+ "mcp-proxy-adapter>=8.10.19",
41
41
  ]
42
42
 
43
43
  [project.optional-dependencies]
@@ -164,16 +164,18 @@ class TestQueueOperations:
164
164
 
165
165
  with patch.object(
166
166
  client.client,
167
- "queue_list_jobs",
167
+ "jsonrpc_call",
168
168
  new_callable=AsyncMock,
169
- ) as mock_list:
170
- mock_list.return_value = mock_result
169
+ ) as mock_call:
170
+ mock_call.return_value = {"result": mock_result}
171
171
 
172
172
  async with client:
173
173
  result = await client.list_queued_commands(status="pending")
174
174
 
175
- mock_list.assert_called_once_with(
176
- status="pending", job_type="command_execution"
175
+ # The command declares status_filter/limit; anything else is
176
+ # rejected by the server outright.
177
+ mock_call.assert_called_once_with(
178
+ "queue_list_jobs", {"status_filter": "pending"}
177
179
  )
178
180
  assert len(result["data"]["jobs"]) == 2
179
181
 
@@ -184,24 +186,24 @@ class TestQueueOperations:
184
186
  mock_result = {
185
187
  "data": {
186
188
  "jobs": [
187
- {"job_id": f"job-{i}", "status": "pending"} for i in range(10)
189
+ {"job_id": f"job-{i}", "status": "pending"} for i in range(5)
188
190
  ],
189
- "total_count": 10,
191
+ "total_count": 5,
190
192
  }
191
193
  }
192
194
 
193
195
  with patch.object(
194
196
  client.client,
195
- "queue_list_jobs",
197
+ "jsonrpc_call",
196
198
  new_callable=AsyncMock,
197
- ) as mock_list:
198
- mock_list.return_value = mock_result
199
+ ) as mock_call:
200
+ mock_call.return_value = {"result": mock_result}
199
201
 
200
202
  async with client:
201
- result = await client.list_queued_commands(limit=5)
203
+ await client.list_queued_commands(limit=5)
202
204
 
203
- assert len(result["data"]["jobs"]) == 5
204
- assert result["data"]["total_count"] == 5
205
+ # The limit is applied by the server, not trimmed afterwards.
206
+ mock_call.assert_called_once_with("queue_list_jobs", {"limit": 5})
205
207
 
206
208
 
207
209
  class TestCommandExecution:
@@ -161,7 +161,9 @@ async def test_real_embed_high_level_error_policy_continue(real_client):
161
161
  pytest.skip("Real service on localhost:8001 is not available.")
162
162
 
163
163
  texts = ["valid text", " ", "!!!"]
164
- data = await real_client.embed(texts, error_policy="continue")
164
+ data = await real_client.embed(
165
+ texts, error_policy="continue", wait=True
166
+ )
165
167
 
166
168
  # data should contain results aligned with input texts
167
169
  assert isinstance(data, dict)
@@ -208,7 +210,9 @@ async def test_real_embed_high_level_error_policy_continue_https(
208
210
  pytest.skip("Real HTTPS service on localhost:8443 is not available.")
209
211
 
210
212
  texts = ["valid text", " "]
211
- data = await real_https_client.embed(texts, error_policy="continue")
213
+ data = await real_https_client.embed(
214
+ texts, error_policy="continue", wait=True
215
+ )
212
216
 
213
217
  assert isinstance(data, dict)
214
218
  assert "results" in data
@@ -250,7 +254,9 @@ async def test_real_embed_high_level_error_policy_continue_mtls(
250
254
  pytest.skip("Real mTLS service on localhost:8001 is not available.")
251
255
 
252
256
  texts = ["valid text", " "]
253
- data = await real_mtls_client.embed(texts, error_policy="continue")
257
+ data = await real_mtls_client.embed(
258
+ texts, error_policy="continue", wait=True
259
+ )
254
260
 
255
261
  assert isinstance(data, dict)
256
262
  assert "results" in data
@@ -87,40 +87,37 @@ async def real_mtls_client():
87
87
 
88
88
 
89
89
  def extract_vectors(result):
90
- """Extract vectors from API response, supporting both old and new formats."""
91
- # Handle direct embeddings field (old format compatibility)
92
- if "embeddings" in result:
93
- return result["embeddings"]
94
-
95
- # Handle result wrapper
96
- if "result" in result:
97
- res = result["result"]
98
-
99
- # Handle direct list in result (old format)
100
- if isinstance(res, list):
101
- return res
102
-
103
- if isinstance(res, dict):
104
- # Handle old format: result.embeddings
105
- if "embeddings" in res:
106
- return res["embeddings"]
107
-
108
- # Handle old format: result.data.embeddings
109
- if (
110
- "data" in res
111
- and isinstance(res["data"], dict)
112
- and "embeddings" in res["data"] # noqa: W503
90
+ """Extract vectors from an API response, whatever envelope it arrives in.
91
+
92
+ A queued command answers inside nested ``result``/``data`` layers, a
93
+ synchronous one answers with the payload directly, and older servers
94
+ answered with a flat ``embeddings`` list. Rather than enumerate the shapes,
95
+ this walks down to the first vector-carrying payload it finds.
96
+ """
97
+
98
+ def walk(value):
99
+ if isinstance(value, dict):
100
+ if isinstance(value.get("embeddings"), list):
101
+ return value["embeddings"]
102
+ rows = value.get("results")
103
+ if isinstance(rows, list) and all(
104
+ isinstance(row, dict) and "embedding" in row for row in rows
113
105
  ):
114
- return res["data"]["embeddings"]
115
-
116
- # Handle new format: result.data[].embedding
117
- if "data" in res and isinstance(res["data"], list):
118
- embeddings = []
119
- for item in res["data"]:
120
- if isinstance(item, dict) and "embedding" in item:
121
- embeddings.append(item["embedding"])
122
- else:
123
- pytest.fail(f"Invalid item format in new API response: {item}")
124
- return embeddings
125
-
126
- pytest.fail(f"Cannot extract embeddings from response: {result}")
106
+ return [row["embedding"] for row in rows]
107
+ for key in ("result", "data"):
108
+ if key in value:
109
+ found = walk(value[key])
110
+ if found is not None:
111
+ return found
112
+ return None
113
+ if isinstance(value, list) and value:
114
+ if all(isinstance(item, dict) and "embedding" in item for item in value):
115
+ return [item["embedding"] for item in value]
116
+ if all(isinstance(item, list) for item in value):
117
+ return value
118
+ return None
119
+
120
+ vectors = walk(result)
121
+ if vectors is None:
122
+ pytest.fail(f"Cannot extract embeddings from response: {result}")
123
+ return vectors
File without changes
File without changes
File without changes