embed-client 4.0.63__tar.gz → 4.0.87__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 (242) hide show
  1. {embed_client-4.0.63/embed_client.egg-info → embed_client-4.0.87}/PKG-INFO +25 -32
  2. {embed_client-4.0.63 → embed_client-4.0.87}/README.md +17 -15
  3. {embed_client-4.0.63 → embed_client-4.0.87}/embed_client/__init__.py +1 -7
  4. embed_client-4.0.87/embed_client/_version.py +3 -0
  5. {embed_client-4.0.63 → embed_client-4.0.87}/embed_client/cli.py +14 -4
  6. {embed_client-4.0.63 → embed_client-4.0.87}/embed_client/cli_core.py +1 -1
  7. {embed_client-4.0.63 → embed_client-4.0.87}/embed_client/demo_security_cli.py +12 -12
  8. {embed_client-4.0.63 → embed_client-4.0.87}/embed_client/embedding_client.py +6 -2
  9. {embed_client-4.0.63 → embed_client-4.0.87}/embed_client/exceptions.py +1 -1
  10. {embed_client-4.0.63 → embed_client-4.0.87/embed_client.egg-info}/PKG-INFO +25 -32
  11. embed_client-4.0.87/embed_client.egg-info/SOURCES.txt +68 -0
  12. embed_client-4.0.87/embed_client.egg-info/requires.txt +10 -0
  13. {embed_client-4.0.63 → embed_client-4.0.87}/examples/README.md +10 -2
  14. {embed_client-4.0.63 → embed_client-4.0.87}/examples/async_testing_client_example.py +12 -5
  15. {embed_client-4.0.63 → embed_client-4.0.87}/examples/canonical_mtls_localhost_8001.py +5 -2
  16. embed_client-4.0.63/configs/http_correct.json → embed_client-4.0.87/examples/configs/http_simple.json +0 -4
  17. {embed_client-4.0.63 → embed_client-4.0.87}/examples/configs/https_token.json +1 -5
  18. {embed_client-4.0.63 → embed_client-4.0.87}/examples/configs/mtls_roles.json +1 -5
  19. {embed_client-4.0.63 → embed_client-4.0.87}/examples/embed_file_json_local.py +12 -0
  20. {embed_client-4.0.63 → embed_client-4.0.87}/examples/security_examples.py +65 -40
  21. {embed_client-4.0.63 → embed_client-4.0.87}/examples/security_examples_ru.py +65 -40
  22. {embed_client-4.0.63 → embed_client-4.0.87}/pyproject.toml +11 -29
  23. embed_client-4.0.63/configs/basic_auth.json +0 -52
  24. embed_client-4.0.63/configs/http.json +0 -38
  25. embed_client-4.0.63/configs/http_8001_test.json +0 -6
  26. embed_client-4.0.63/configs/http_simple.json +0 -52
  27. embed_client-4.0.63/configs/http_test.json +0 -12
  28. embed_client-4.0.63/configs/http_token.json +0 -41
  29. embed_client-4.0.63/configs/http_token_correct.json +0 -15
  30. embed_client-4.0.63/configs/http_token_roles.json +0 -58
  31. embed_client-4.0.63/configs/http_token_roles_token_roles.json +0 -56
  32. embed_client-4.0.63/configs/http_token_token_roles.json +0 -56
  33. embed_client-4.0.63/configs/https.json +0 -38
  34. embed_client-4.0.63/configs/https_8001_test.json +0 -12
  35. embed_client-4.0.63/configs/https_api_test.json +0 -16
  36. embed_client-4.0.63/configs/https_simple.json +0 -52
  37. embed_client-4.0.63/configs/https_test.json +0 -15
  38. embed_client-4.0.63/configs/https_token.json +0 -41
  39. embed_client-4.0.63/configs/https_token_8001.json +0 -26
  40. embed_client-4.0.63/configs/https_token_roles.json +0 -58
  41. embed_client-4.0.63/configs/https_token_roles_token_roles.json +0 -56
  42. embed_client-4.0.63/configs/https_token_token_roles.json +0 -56
  43. embed_client-4.0.63/configs/jwt.json +0 -52
  44. embed_client-4.0.63/configs/mtls.json +0 -40
  45. embed_client-4.0.63/configs/mtls_8001.json +0 -38
  46. embed_client-4.0.63/configs/mtls_8001_test.json +0 -22
  47. embed_client-4.0.63/configs/mtls_correct.json +0 -23
  48. embed_client-4.0.63/configs/mtls_roles.json +0 -53
  49. embed_client-4.0.63/configs/mtls_roles_token_roles.json +0 -56
  50. embed_client-4.0.63/configs/mtls_test.json +0 -22
  51. embed_client-4.0.63/configs/mtls_token_roles.json +0 -86
  52. embed_client-4.0.63/configs/mtls_via_adapter.json +0 -40
  53. embed_client-4.0.63/configs/roles.json +0 -62
  54. embed_client-4.0.63/configs/test_http_simple.json +0 -38
  55. embed_client-4.0.63/configs/test_http_token.json +0 -56
  56. embed_client-4.0.63/configs/test_http_token_roles.json +0 -35
  57. embed_client-4.0.63/configs/test_https_simple.json +0 -46
  58. embed_client-4.0.63/configs/test_https_token.json +0 -58
  59. embed_client-4.0.63/configs/test_https_token_roles.json +0 -39
  60. embed_client-4.0.63/configs/test_mtls_roles.json +0 -55
  61. embed_client-4.0.63/configs/test_mtls_simple.json +0 -41
  62. embed_client-4.0.63/configs/test_server_http.json +0 -16
  63. embed_client-4.0.63/configs/test_server_https.json +0 -16
  64. embed_client-4.0.63/configs/test_server_mtls.json +0 -51
  65. embed_client-4.0.63/docs/BUGREPORT_queue_manager_daemonic.md +0 -119
  66. embed_client-4.0.63/docs/IDENTIFIER_ANALYSIS_REPORT.md +0 -383
  67. embed_client-4.0.63/docs/PROPOSAL_SERVER_REQUEST_COALESCING.md +0 -88
  68. embed_client-4.0.63/docs/PROPOSAL_TWO_CHANNEL_OR_PUSH.md +0 -79
  69. embed_client-4.0.63/docs/coverage_report.md +0 -119
  70. embed_client-4.0.63/docs/error_500_analysis.md +0 -213
  71. embed_client-4.0.63/docs/error_handling_issue.md +0 -96
  72. embed_client-4.0.63/docs/specs/_template/README.md +0 -25
  73. embed_client-4.0.63/docs/specs/_template/example_global_step/example_tactical_step/example_atomic_step.md +0 -17
  74. embed_client-4.0.63/docs/specs/_template/example_global_step/example_tactical_step/spec.md +0 -21
  75. embed_client-4.0.63/docs/specs/_template/example_global_step/spec.md +0 -19
  76. embed_client-4.0.63/docs/specs/_template/spec.md +0 -33
  77. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/baseline_audit_and_contract_capture/migration_baseline_deliverable/ATOMIC_STEPS_INDEX.md +0 -49
  78. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/baseline_audit_and_contract_capture/migration_baseline_deliverable/freeze-migration-baseline-evidence-links.md +0 -63
  79. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/baseline_audit_and_contract_capture/migration_baseline_deliverable/spec.md +0 -42
  80. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/baseline_audit_and_contract_capture/spec.md +0 -27
  81. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/documentation_normalization/spec.md +0 -30
  82. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/ATOMIC_STEPS_INDEX.md +0 -76
  83. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-01.md +0 -114
  84. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-02.md +0 -102
  85. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-03.md +0 -94
  86. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-04.md +0 -93
  87. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-05.md +0 -75
  88. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-06.md +0 -71
  89. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-07.md +0 -86
  90. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-08.md +0 -63
  91. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-09.md +0 -58
  92. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-10.md +0 -54
  93. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-11.md +0 -56
  94. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-12.md +0 -89
  95. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-13.md +0 -69
  96. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-14.md +0 -61
  97. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-15.md +0 -85
  98. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-16.md +0 -73
  99. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-17.md +0 -73
  100. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-18.md +0 -65
  101. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-19.md +0 -142
  102. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-20.md +0 -82
  103. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-21.md +0 -71
  104. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-22.md +0 -105
  105. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/plan.md +0 -28
  106. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/production_migration_and_legacy_removal/canonical_client_migration/ATOMIC_STEPS_INDEX.md +0 -47
  107. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/production_migration_and_legacy_removal/canonical_client_migration/PARALLEL_WAVES.md +0 -26
  108. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/production_migration_and_legacy_removal/canonical_client_migration/atomic-01-port-constants-and-exceptions.md +0 -57
  109. embed_client-4.0.63/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 -56
  110. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/production_migration_and_legacy_removal/canonical_client_migration/atomic-03-port-embedding-client-core.md +0 -58
  111. embed_client-4.0.63/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 -57
  112. embed_client-4.0.63/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 -67
  113. embed_client-4.0.63/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 -53
  114. embed_client-4.0.63/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 -63
  115. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/production_migration_and_legacy_removal/canonical_client_migration/spec.md +0 -58
  116. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/production_migration_and_legacy_removal/spec.md +0 -26
  117. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/README.md +0 -43
  118. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/rv_automated_security_matrix/spec.md +0 -117
  119. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/rv_canonical_mtls_real_server_gate/spec.md +0 -125
  120. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/rv_localhost_vectorization/spec.md +0 -113
  121. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/rv_packaging_and_prereqs/spec.md +0 -107
  122. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/rv_pypi_publication/spec.md +0 -101
  123. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/rv_surviving_examples_executable/spec.md +0 -106
  124. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/spec.md +0 -58
  125. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/steps/ATOMIC_STEPS_INDEX.md +0 -80
  126. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/steps/placeholder-corrective-rv01-security-matrix.md +0 -89
  127. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/steps/placeholder-corrective-rv02-vectorization.md +0 -47
  128. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/steps/placeholder-corrective-rv03-broken-example.md +0 -46
  129. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/steps/placeholder-corrective-rv04-canonical-gate.md +0 -46
  130. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/steps/placeholder-corrective-rv05-packaging.md +0 -45
  131. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/steps/placeholder-corrective-rv06-duplicate-version-or-auth.md +0 -50
  132. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/steps/rv01-execute-automated-security-matrix.md +0 -129
  133. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/steps/rv02-execute-localhost-vectorization-mtls-8001.md +0 -107
  134. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/steps/rv03-execute-surviving-examples-sweep.md +0 -110
  135. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/steps/rv04-execute-canonical-mtls-real-server-gate.md +0 -110
  136. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/steps/rv04-supplementary-pytest-canonical-example-contract.md +0 -89
  137. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/steps/rv05-build-artifacts-twine-version-gate.md +0 -125
  138. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/steps/rv06-pypi-upload.md +0 -101
  139. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/spec.md +0 -66
  140. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/tests_scripts_and_dependency_cleanup/spec.md +0 -72
  141. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/tests_scripts_and_dependency_cleanup/steps/ATOMIC_STEPS_INDEX.md +0 -72
  142. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/tests_scripts_and_dependency_cleanup/steps/align-package-version-with-pyproject-metadata.md +0 -62
  143. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/tests_scripts_and_dependency_cleanup/steps/canonical-localhost-8001-mtls-example-and-execution-tests.md +0 -72
  144. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/tests_scripts_and_dependency_cleanup/steps/consolidate-pytest-configuration-single-source.md +0 -58
  145. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/tests_scripts_and_dependency_cleanup/steps/consolidate-redundant-coverage-test-modules.md +0 -58
  146. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/tests_scripts_and_dependency_cleanup/steps/delete-or-replace-skipped-auth-and-ssl-test-modules.md +0 -59
  147. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/tests_scripts_and_dependency_cleanup/steps/extract-async-client-adapter-tests-remove-legacy-aiohttp.md +0 -62
  148. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/tests_scripts_and_dependency_cleanup/steps/fix-or-remove-embed-client-auth-examples.md +0 -58
  149. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/tests_scripts_and_dependency_cleanup/steps/normalize-pyproject-runtime-deps-and-optional-extras.md +0 -61
  150. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/tests_scripts_and_dependency_cleanup/steps/replace-hardcoded-venv-site-packages-in-scripts-and-tests.md +0 -57
  151. embed_client-4.0.63/docs/specs/server_client_convergence_and_release/tests_scripts_and_dependency_cleanup/tasks/tsc_linter_exclusions_and_migration_inventory.md +0 -83
  152. embed_client-4.0.63/docs/tech_spec/branches/documentation_normalization/README.md +0 -47
  153. embed_client-4.0.63/docs/tech_spec/branches/documentation_normalization/tasks/doc_alignment_verification_and_closure.md +0 -222
  154. embed_client-4.0.63/docs/tech_spec/branches/documentation_normalization/tasks/doc_guides_examples_canonical_mtls.md +0 -274
  155. embed_client-4.0.63/docs/tech_spec/branches/documentation_normalization/tasks/doc_legacy_tree_prune_and_governance.md +0 -126
  156. embed_client-4.0.63/docs/tech_spec/branches/documentation_normalization/tasks/doc_root_metadata_and_pypi_surface.md +0 -254
  157. embed_client-4.0.63/embed_client.egg-info/SOURCES.txt +0 -237
  158. embed_client-4.0.63/embed_client.egg-info/requires.txt +0 -20
  159. embed_client-4.0.63/examples/configs/http_simple.json +0 -12
  160. embed_client-4.0.63/tests/test_adapter_integration.py +0 -73
  161. embed_client-4.0.63/tests/test_adapter_phase1.py +0 -166
  162. embed_client-4.0.63/tests/test_adapter_phase2.py +0 -263
  163. embed_client-4.0.63/tests/test_all_security_modes.py +0 -627
  164. embed_client-4.0.63/tests/test_async_client_adapter.py +0 -84
  165. embed_client-4.0.63/tests/test_async_client_real.py +0 -311
  166. embed_client-4.0.63/tests/test_async_client_real_fixtures.py +0 -123
  167. embed_client-4.0.63/tests/test_async_client_stress.py +0 -346
  168. embed_client-4.0.63/tests/test_async_client_stress_new.py +0 -326
  169. embed_client-4.0.63/tests/test_async_client_stress_updated.py +0 -326
  170. embed_client-4.0.63/tests/test_auth_manager.py +0 -187
  171. embed_client-4.0.63/tests/test_canonical_mtls_example.py +0 -145
  172. embed_client-4.0.63/tests/test_cli_embed_file_json.py +0 -66
  173. embed_client-4.0.63/tests/test_cli_exit_codes_insecure.py +0 -295
  174. embed_client-4.0.63/tests/test_client_factory.py +0 -461
  175. embed_client-4.0.63/tests/test_client_factory_convenience.py +0 -65
  176. embed_client-4.0.63/tests/test_client_factory_integration.py +0 -115
  177. embed_client-4.0.63/tests/test_config.py +0 -384
  178. embed_client-4.0.63/tests/test_config_explicit_host_not_overridden.py +0 -34
  179. embed_client-4.0.63/tests/test_embed_file_aggregation_method.py +0 -62
  180. embed_client-4.0.63/tests/test_embed_file_output_validate.py +0 -147
  181. embed_client-4.0.63/tests/test_embed_immediate_mode.py +0 -125
  182. embed_client-4.0.63/tests/test_example_async_usage.py +0 -100
  183. embed_client-4.0.63/tests/test_input_limit_commands_client.py +0 -232
  184. embed_client-4.0.63/tests/test_json_embed_file_preflight.py +0 -63
  185. embed_client-4.0.63/tests/test_local_json_embed_file.py +0 -100
  186. embed_client-4.0.63/tests/test_md_embed_file_prep.py +0 -78
  187. embed_client-4.0.63/tests/test_security_matrix.py +0 -421
  188. embed_client-4.0.63/tests/test_ssl_manager.py +0 -58
  189. embed_client-4.0.63/tests/test_structured_terminal_error.py +0 -477
  190. embed_client-4.0.63/tests/test_terminal_delivery_events.py +0 -130
  191. embed_client-4.0.63/tests/test_vectorization_modes_client.py +0 -245
  192. embed_client-4.0.63/tests/test_wait_for_job_poll_queue_shape.py +0 -122
  193. embed_client-4.0.63/tests/test_wait_for_job_ws_fallback.py +0 -113
  194. embed_client-4.0.63/tests/test_with_auth.py +0 -260
  195. {embed_client-4.0.63 → embed_client-4.0.87}/CONFIGURATION.md +0 -0
  196. {embed_client-4.0.63 → embed_client-4.0.87}/LICENSE +0 -0
  197. {embed_client-4.0.63 → embed_client-4.0.87}/MANIFEST.in +0 -0
  198. {embed_client-4.0.63 → embed_client-4.0.87}/docs/SERVER_MODES_AND_CLIENT.md +0 -0
  199. {embed_client-4.0.63 → embed_client-4.0.87}/docs/api_format.md +0 -0
  200. {embed_client-4.0.63 → embed_client-4.0.87}/docs/client_integration_guide.md +0 -0
  201. {embed_client-4.0.63 → embed_client-4.0.87}/docs/error_handling_complete.md +0 -0
  202. {embed_client-4.0.63 → embed_client-4.0.87}/embed_client/__main__.py +0 -0
  203. {embed_client-4.0.63 → embed_client-4.0.87}/embed_client/adapter_config_factory.py +0 -0
  204. {embed_client-4.0.63 → embed_client-4.0.87}/embed_client/adapter_config_normalizer.py +0 -0
  205. {embed_client-4.0.63 → embed_client-4.0.87}/embed_client/adapter_generator_bridge.py +0 -0
  206. {embed_client-4.0.63 → embed_client-4.0.87}/embed_client/auth.py +0 -0
  207. {embed_client-4.0.63 → embed_client-4.0.87}/embed_client/client_factory.py +0 -0
  208. {embed_client-4.0.63 → embed_client-4.0.87}/embed_client/client_factory_examples.py +0 -0
  209. {embed_client-4.0.63 → embed_client-4.0.87}/embed_client/client_factory_helpers.py +0 -0
  210. {embed_client-4.0.63 → embed_client-4.0.87}/embed_client/config.py +0 -0
  211. {embed_client-4.0.63 → embed_client-4.0.87}/embed_client/config_defaults.py +0 -0
  212. {embed_client-4.0.63 → embed_client-4.0.87}/embed_client/config_examples.py +0 -0
  213. {embed_client-4.0.63 → embed_client-4.0.87}/embed_client/config_generator.py +0 -0
  214. {embed_client-4.0.63 → embed_client-4.0.87}/embed_client/config_generator_cli.py +0 -0
  215. {embed_client-4.0.63 → embed_client-4.0.87}/embed_client/config_presets.py +0 -0
  216. {embed_client-4.0.63 → embed_client-4.0.87}/embed_client/config_validator.py +0 -0
  217. {embed_client-4.0.63 → embed_client-4.0.87}/embed_client/config_validator_cli.py +0 -0
  218. {embed_client-4.0.63 → embed_client-4.0.87}/embed_client/constants.py +0 -0
  219. {embed_client-4.0.63 → embed_client-4.0.87}/embed_client/demo_cli.py +0 -0
  220. {embed_client-4.0.63 → embed_client-4.0.87}/embed_client/embed_file_output_validate.py +0 -0
  221. {embed_client-4.0.63 → embed_client-4.0.87}/embed_client/embed_file_status_store.py +0 -0
  222. {embed_client-4.0.63 → embed_client-4.0.87}/embed_client/embedding_client_helpers.py +0 -0
  223. {embed_client-4.0.63 → embed_client-4.0.87}/embed_client/example_async_usage.py +0 -0
  224. {embed_client-4.0.63 → embed_client-4.0.87}/embed_client/example_async_usage_demo.py +0 -0
  225. {embed_client-4.0.63 → embed_client-4.0.87}/embed_client/example_async_usage_ru.py +0 -0
  226. {embed_client-4.0.63 → embed_client-4.0.87}/embed_client/example_async_usage_ru_demo.py +0 -0
  227. {embed_client-4.0.63 → embed_client-4.0.87}/embed_client/identifier_types.py +0 -0
  228. {embed_client-4.0.63 → embed_client-4.0.87}/embed_client/json_embed_file_preflight.py +0 -0
  229. {embed_client-4.0.63 → embed_client-4.0.87}/embed_client/local_json_embed_file.py +0 -0
  230. {embed_client-4.0.63 → embed_client-4.0.87}/embed_client/md_embed_file_prep.py +0 -0
  231. {embed_client-4.0.63 → embed_client-4.0.87}/embed_client/response_normalizer.py +0 -0
  232. {embed_client-4.0.63 → embed_client-4.0.87}/embed_client/response_parsers.py +0 -0
  233. {embed_client-4.0.63 → embed_client-4.0.87}/embed_client/security_cli.py +0 -0
  234. {embed_client-4.0.63 → embed_client-4.0.87}/embed_client/security_cli_core.py +0 -0
  235. {embed_client-4.0.63 → embed_client-4.0.87}/embed_client/ssl_examples.py +0 -0
  236. {embed_client-4.0.63 → embed_client-4.0.87}/embed_client/ssl_manager.py +0 -0
  237. {embed_client-4.0.63 → embed_client-4.0.87}/embed_client.egg-info/dependency_links.txt +0 -0
  238. {embed_client-4.0.63 → embed_client-4.0.87}/embed_client.egg-info/entry_points.txt +0 -0
  239. {embed_client-4.0.63 → embed_client-4.0.87}/embed_client.egg-info/top_level.txt +0 -0
  240. {embed_client-4.0.63 → embed_client-4.0.87}/examples/__init__.py +0 -0
  241. {embed_client-4.0.63 → embed_client-4.0.87}/examples/data/embed_file_json_array_sample.json +0 -0
  242. {embed_client-4.0.63 → embed_client-4.0.87}/setup.cfg +0 -0
@@ -1,14 +1,14 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: embed-client
3
- Version: 4.0.63
4
- Summary: Async client for the Embedding Service API. Canonical class: EmbeddingClient (JSON-RPC via mcp-proxy-adapter >=8.10).
3
+ Version: 4.0.87
4
+ Summary: Async client for the Embedding Service API. Canonical class: EmbeddingClient (JSON-RPC via mcp-proxy-adapter >=8.11.16).
5
5
  Author-email: Vasiliy Zdanovskiy <vasilyvz@gmail.com>
6
6
  License-Expression: MIT
7
- Project-URL: Homepage, https://github.com/vasilyvz/embed-client
8
- Project-URL: Repository, https://github.com/vasilyvz/embed-client
9
- Project-URL: Documentation, https://github.com/vasilyvz/embed-client#readme
10
- Project-URL: Bug Tracker, https://github.com/vasilyvz/embed-client/issues
11
- Project-URL: Configuration Reference, https://github.com/vasilyvz/embed-client/blob/main/CONFIGURATION.md
7
+ Project-URL: Homepage, https://github.com/maverikod/ai-embed
8
+ Project-URL: Repository, https://github.com/maverikod/ai-embed
9
+ Project-URL: Documentation, https://github.com/maverikod/ai-embed/tree/main/client#readme
10
+ Project-URL: Bug Tracker, https://github.com/maverikod/ai-embed/issues
11
+ Project-URL: Configuration Reference, https://github.com/maverikod/ai-embed/blob/main/client/CONFIGURATION.md
12
12
  Keywords: embedding,async,client,api,authentication,ssl,tls,mtls,config,generator,validator,configuration
13
13
  Classifier: Development Status :: 5 - Production/Stable
14
14
  Classifier: Intended Audience :: Developers
@@ -26,20 +26,11 @@ 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.11.3
29
+ Requires-Dist: mcp-proxy-adapter>=8.11.16
30
30
  Requires-Dist: mcp_security_framework>=2.3.2
31
31
  Provides-Extra: scripts
32
32
  Requires-Dist: pydantic>=2.0.0; extra == "scripts"
33
- Provides-Extra: test
34
- Requires-Dist: pytest; extra == "test"
35
- Requires-Dist: pytest-asyncio; extra == "test"
36
- Requires-Dist: pytest-xdist; extra == "test"
37
- Requires-Dist: pytest-timeout; extra == "test"
38
33
  Provides-Extra: dev
39
- Requires-Dist: pytest; extra == "dev"
40
- Requires-Dist: pytest-asyncio; extra == "dev"
41
- Requires-Dist: pytest-xdist; extra == "dev"
42
- Requires-Dist: pytest-timeout; extra == "dev"
43
34
  Requires-Dist: black; extra == "dev"
44
35
  Requires-Dist: flake8; extra == "dev"
45
36
  Requires-Dist: mypy; extra == "dev"
@@ -47,7 +38,9 @@ Dynamic: license-file
47
38
 
48
39
  # embed-client
49
40
 
50
- Python **async** client for the Embedding Service API. The canonical public client is **`EmbeddingClient`**, aligned with the migrated server-side contract (JSON-RPC via **`mcp-proxy-adapter`**).
41
+ Python **async** client bundled with the Embedding Service in this repository's
42
+ `client/` directory. The canonical public client is **`EmbeddingClient`** (JSON-RPC
43
+ via **`mcp-proxy-adapter`**). The distribution and import names are unchanged.
51
44
 
52
45
  ```python
53
46
  from embed_client import EmbeddingClient
@@ -62,9 +55,9 @@ pip install embed-client
62
55
  Editable development checkout:
63
56
 
64
57
  ```bash
65
- git clone <repository-url>
66
- cd embed-client
67
- pip install -e .
58
+ git clone https://github.com/maverikod/ai-embed.git
59
+ cd ai-embed
60
+ pip install -e ./client
68
61
  ```
69
62
 
70
63
  ## Canonical real-server E2E (localhost:8001, mTLS)
@@ -108,7 +101,7 @@ Public queue-oriented helpers include **`embed`**, **`wait_for_job`**, **`job_st
108
101
 
109
102
  Resolution order (server): provider given -> must be known, model omitted -> the default model of that provider (it must be the default provider's, else `UNKNOWN_MODEL`); provider and model omitted -> the default pair; provider omitted and model given -> the default provider first (if it lists the model it is used and macsc is not consulted for a local default), else the other providers are searched: exactly one offers it -> used, several -> `PROVIDER_REQUIRED`, none -> `UNKNOWN_MODEL`. Dimension omitted -> the entry's default; given -> must satisfy `supported_dimensions` else `UNSUPPORTED_DIMENSION`.
110
103
 
111
- Error codes (`error.data.code` / `error.data.kind`, surfaced unchanged): `-32602` `UNKNOWN_PROVIDER`, `UNKNOWN_MODEL`, `UNSUPPORTED_DIMENSION`, `PROVIDER_REQUIRED`; `-32003` `EXTERNAL_UNAVAILABLE`, `EXTERNAL_UPSTREAM_FAILURE`, `EXTERNAL_BAD_RESPONSE`, `EXTERNAL_INVALID_REQUEST`; `-32001` `MODEL_LOADING` (retry); `-32004` `OWN_MODEL_DISABLED`; `-32005` `GPU_DISABLED`; `-32603` `MODEL_LOAD_FAILED`, `NO_GPU_AVAILABLE`. **`model_offload()`** moves the resident local model VRAM -> RAM (pinned against the GPU watcher) and **`model_load(model=None, device=None, wait=None)`** moves it back (`wait=False` returns at once while the load continues, `wait=True` blocks until it is in VRAM); neither takes a provider. Refusals of `model_offload`/`model_load`/`default_model` arrive as **`EmbedAPIError`** carrying the server error object. Every embed result carries `provider`, `model`, `dimension` and `backend`; external results also carry `usage`.
104
+ Error codes (`error.data.code` / `error.data.kind`, surfaced unchanged): `-32602` `UNKNOWN_PROVIDER`, `UNKNOWN_MODEL`, `UNSUPPORTED_DIMENSION`, `PROVIDER_REQUIRED`; `-32003` `EXTERNAL_UNAVAILABLE`, `EXTERNAL_UPSTREAM_FAILURE`, `EXTERNAL_PAYMENT_REQUIRED` (`error.data.payment_required` true: the provider account needs payment or credit), `EXTERNAL_BAD_RESPONSE`, `EXTERNAL_INVALID_REQUEST`; `-32001` `MODEL_LOADING` (retry); `-32004` `OWN_MODEL_DISABLED`; `-32005` `GPU_DISABLED`; `-32603` `MODEL_LOAD_FAILED`, `NO_GPU_AVAILABLE`. **`model_offload()`** moves the resident local model VRAM -> RAM (pinned against the GPU watcher) and **`model_load(model=None, device=None, wait=None)`** moves it back (`wait=False` returns at once while the load continues, `wait=True` blocks until it is in VRAM); neither takes a provider. Refusals of `model_offload`/`model_load`/`default_model` arrive as **`EmbedAPIError`** carrying the server error object. Every embed result carries `provider`, `model`, `dimension` and `backend`; external results also carry `usage`.
112
105
 
113
106
  **Input-limit table (server input_limit_* commands):** **`input_limit_add(provider, model, max_input_tokens, tokenizer, max_inputs_per_request=None, max_total_tokens_per_request=None, source=None)`** adds a manual row (`-32602` `INPUT_LIMIT_EXISTS`, `LOCAL_LIMIT_FROM_MODEL`); **`input_limit_delete(provider, model)`** removes a row (`-32602` `INPUT_LIMIT_NOT_FOUND`); **`input_limit_update(provider, model, *, <named cells>)`** changes only the cells passed explicitly (`None` sends null, which only the three nullable cells accept; `-32602` `INPUT_LIMIT_NOT_FOUND`, `INPUT_LIMIT_EMPTY_UPDATE`, `LOCAL_LIMIT_FROM_MODEL`); **`input_limit_list(provider=None)`** returns `{rows: [...]}` sorted by `(provider, model)` with each row's `origin` (`module` | `manual`). Mutating commands may also return `-32603` `INPUT_LIMIT_PERSIST_FAILED`. Refusals arrive as **`EmbedAPIError`**. The client does not validate these parameters.
114
107
 
@@ -126,23 +119,23 @@ The server supports multiple HTTP/HTTPS/mTLS and auth combinations. For deploy-t
126
119
 
127
120
  ## Development and tests
128
121
 
129
- Run the test suite with **pytest**; configuration lives in **`pyproject.toml`** (`[tool.pytest.ini_options]`). There is **no** `pytest.ini` at the repository root.
122
+ The original client test modules are preserved under `client/tests/`; the shared
123
+ project pipeline owns executable acceptance from the repository root.
130
124
 
131
125
  ```bash
132
- pytest -q
126
+ python -m pipeline
133
127
  ```
134
128
 
135
129
  ### Release
136
130
 
137
- The client is released together with the server (`embed`) as one unit and always carries the same
138
- version. Releases are run **only** by the server script `docker/build.sh` in the `embed` repository,
139
- which computes the next version, writes it into both trees, and calls this repository's scripts:
131
+ The server and client read one version from `embed_client/_version.py` here.
132
+ The root `../build.sh` builds the client wheel and sdist, checks their metadata,
133
+ publishes only the client to PyPI and pushes the server image to Docker Hub on
134
+ every successful run. It accepts no arguments or skip options and invokes no
135
+ pipeline. Run the shared pipeline separately before releasing the candidate.
140
136
 
141
- - `build.sh <release-version>` - client tests, sdist/wheel, `twine check`; never uploads
142
- - `publish.sh <release-version>` - `twine upload` of the built files, run only after the Docker Hub push succeeded
143
-
144
- Both scripts have no options and no skip switches, accept exactly one argument, and refuse a
145
- version that differs from `pyproject.toml` / `embed_client/__init__.py` (exit code 3).
137
+ For isolated package artifacts without publishing, run `python -m build client`
138
+ from the repository root. This is packaging only, not service acceptance.
146
139
 
147
140
  ## License
148
141
 
@@ -1,6 +1,8 @@
1
1
  # embed-client
2
2
 
3
- Python **async** client for the Embedding Service API. The canonical public client is **`EmbeddingClient`**, aligned with the migrated server-side contract (JSON-RPC via **`mcp-proxy-adapter`**).
3
+ Python **async** client bundled with the Embedding Service in this repository's
4
+ `client/` directory. The canonical public client is **`EmbeddingClient`** (JSON-RPC
5
+ via **`mcp-proxy-adapter`**). The distribution and import names are unchanged.
4
6
 
5
7
  ```python
6
8
  from embed_client import EmbeddingClient
@@ -15,9 +17,9 @@ pip install embed-client
15
17
  Editable development checkout:
16
18
 
17
19
  ```bash
18
- git clone <repository-url>
19
- cd embed-client
20
- pip install -e .
20
+ git clone https://github.com/maverikod/ai-embed.git
21
+ cd ai-embed
22
+ pip install -e ./client
21
23
  ```
22
24
 
23
25
  ## Canonical real-server E2E (localhost:8001, mTLS)
@@ -61,7 +63,7 @@ Public queue-oriented helpers include **`embed`**, **`wait_for_job`**, **`job_st
61
63
 
62
64
  Resolution order (server): provider given -> must be known, model omitted -> the default model of that provider (it must be the default provider's, else `UNKNOWN_MODEL`); provider and model omitted -> the default pair; provider omitted and model given -> the default provider first (if it lists the model it is used and macsc is not consulted for a local default), else the other providers are searched: exactly one offers it -> used, several -> `PROVIDER_REQUIRED`, none -> `UNKNOWN_MODEL`. Dimension omitted -> the entry's default; given -> must satisfy `supported_dimensions` else `UNSUPPORTED_DIMENSION`.
63
65
 
64
- Error codes (`error.data.code` / `error.data.kind`, surfaced unchanged): `-32602` `UNKNOWN_PROVIDER`, `UNKNOWN_MODEL`, `UNSUPPORTED_DIMENSION`, `PROVIDER_REQUIRED`; `-32003` `EXTERNAL_UNAVAILABLE`, `EXTERNAL_UPSTREAM_FAILURE`, `EXTERNAL_BAD_RESPONSE`, `EXTERNAL_INVALID_REQUEST`; `-32001` `MODEL_LOADING` (retry); `-32004` `OWN_MODEL_DISABLED`; `-32005` `GPU_DISABLED`; `-32603` `MODEL_LOAD_FAILED`, `NO_GPU_AVAILABLE`. **`model_offload()`** moves the resident local model VRAM -> RAM (pinned against the GPU watcher) and **`model_load(model=None, device=None, wait=None)`** moves it back (`wait=False` returns at once while the load continues, `wait=True` blocks until it is in VRAM); neither takes a provider. Refusals of `model_offload`/`model_load`/`default_model` arrive as **`EmbedAPIError`** carrying the server error object. Every embed result carries `provider`, `model`, `dimension` and `backend`; external results also carry `usage`.
66
+ Error codes (`error.data.code` / `error.data.kind`, surfaced unchanged): `-32602` `UNKNOWN_PROVIDER`, `UNKNOWN_MODEL`, `UNSUPPORTED_DIMENSION`, `PROVIDER_REQUIRED`; `-32003` `EXTERNAL_UNAVAILABLE`, `EXTERNAL_UPSTREAM_FAILURE`, `EXTERNAL_PAYMENT_REQUIRED` (`error.data.payment_required` true: the provider account needs payment or credit), `EXTERNAL_BAD_RESPONSE`, `EXTERNAL_INVALID_REQUEST`; `-32001` `MODEL_LOADING` (retry); `-32004` `OWN_MODEL_DISABLED`; `-32005` `GPU_DISABLED`; `-32603` `MODEL_LOAD_FAILED`, `NO_GPU_AVAILABLE`. **`model_offload()`** moves the resident local model VRAM -> RAM (pinned against the GPU watcher) and **`model_load(model=None, device=None, wait=None)`** moves it back (`wait=False` returns at once while the load continues, `wait=True` blocks until it is in VRAM); neither takes a provider. Refusals of `model_offload`/`model_load`/`default_model` arrive as **`EmbedAPIError`** carrying the server error object. Every embed result carries `provider`, `model`, `dimension` and `backend`; external results also carry `usage`.
65
67
 
66
68
  **Input-limit table (server input_limit_* commands):** **`input_limit_add(provider, model, max_input_tokens, tokenizer, max_inputs_per_request=None, max_total_tokens_per_request=None, source=None)`** adds a manual row (`-32602` `INPUT_LIMIT_EXISTS`, `LOCAL_LIMIT_FROM_MODEL`); **`input_limit_delete(provider, model)`** removes a row (`-32602` `INPUT_LIMIT_NOT_FOUND`); **`input_limit_update(provider, model, *, <named cells>)`** changes only the cells passed explicitly (`None` sends null, which only the three nullable cells accept; `-32602` `INPUT_LIMIT_NOT_FOUND`, `INPUT_LIMIT_EMPTY_UPDATE`, `LOCAL_LIMIT_FROM_MODEL`); **`input_limit_list(provider=None)`** returns `{rows: [...]}` sorted by `(provider, model)` with each row's `origin` (`module` | `manual`). Mutating commands may also return `-32603` `INPUT_LIMIT_PERSIST_FAILED`. Refusals arrive as **`EmbedAPIError`**. The client does not validate these parameters.
67
69
 
@@ -79,23 +81,23 @@ The server supports multiple HTTP/HTTPS/mTLS and auth combinations. For deploy-t
79
81
 
80
82
  ## Development and tests
81
83
 
82
- Run the test suite with **pytest**; configuration lives in **`pyproject.toml`** (`[tool.pytest.ini_options]`). There is **no** `pytest.ini` at the repository root.
84
+ The original client test modules are preserved under `client/tests/`; the shared
85
+ project pipeline owns executable acceptance from the repository root.
83
86
 
84
87
  ```bash
85
- pytest -q
88
+ python -m pipeline
86
89
  ```
87
90
 
88
91
  ### Release
89
92
 
90
- The client is released together with the server (`embed`) as one unit and always carries the same
91
- version. Releases are run **only** by the server script `docker/build.sh` in the `embed` repository,
92
- which computes the next version, writes it into both trees, and calls this repository's scripts:
93
+ The server and client read one version from `embed_client/_version.py` here.
94
+ The root `../build.sh` builds the client wheel and sdist, checks their metadata,
95
+ publishes only the client to PyPI and pushes the server image to Docker Hub on
96
+ every successful run. It accepts no arguments or skip options and invokes no
97
+ pipeline. Run the shared pipeline separately before releasing the candidate.
93
98
 
94
- - `build.sh <release-version>` - client tests, sdist/wheel, `twine check`; never uploads
95
- - `publish.sh <release-version>` - `twine upload` of the built files, run only after the Docker Hub push succeeded
96
-
97
- Both scripts have no options and no skip switches, accept exactly one argument, and refuse a
98
- version that differs from `pyproject.toml` / `embed_client/__init__.py` (exit code 3).
99
+ For isolated package artifacts without publishing, run `python -m build client`
100
+ from the repository root. This is packaging only, not service acceptance.
99
101
 
100
102
  ## License
101
103
 
@@ -9,7 +9,7 @@ Author: Vasiliy Zdanovskiy
9
9
  email: vasilyvz@gmail.com
10
10
  """
11
11
 
12
- from importlib.metadata import PackageNotFoundError, version
12
+ from embed_client._version import __version__
13
13
 
14
14
  from embed_client.auth import ClientAuthManager
15
15
  from embed_client.config import ClientConfig
@@ -23,12 +23,6 @@ from embed_client.embedding_client_helpers import (
23
23
  from embed_client.ssl_manager import ClientSSLManager
24
24
  from embed_client.client_factory import ClientFactory
25
25
 
26
- try:
27
- __version__ = version("embed-client")
28
- except PackageNotFoundError:
29
- # Editable checkout without install metadata (e.g. some unit-test sandboxes).
30
- __version__ = "4.0.63"
31
-
32
26
  __all__ = [
33
27
  "EmbeddingClient",
34
28
  "wait_for_job_poll",
@@ -0,0 +1,3 @@
1
+ """Authoritative release version for the bundled server and client."""
2
+
3
+ __version__ = "4.0.87"
@@ -16,6 +16,7 @@ email: vasilyvz@gmail.com
16
16
 
17
17
  import argparse
18
18
  import asyncio
19
+ import re
19
20
  import sys
20
21
  from typing import Any, Dict # noqa: F401
21
22
 
@@ -24,6 +25,15 @@ from embed_client.cli_core import VectorizationCLI, create_config_from_args
24
25
  from embed_client.constants import DEFAULT_POLL_INTERVAL
25
26
 
26
27
 
28
+ def _device_arg(value: str) -> str:
29
+ """argparse type of --device: auto, cpu, cuda or cuda:N (N a device index)."""
30
+ if re.fullmatch(r"auto|cpu|cuda|cuda:[0-9]+", value) is None:
31
+ raise argparse.ArgumentTypeError(
32
+ f"invalid device {value!r}: expected auto, cpu, cuda or cuda:N"
33
+ )
34
+ return value
35
+
36
+
27
37
  async def main():
28
38
  """Main CLI function."""
29
39
  parser = argparse.ArgumentParser(
@@ -161,8 +171,8 @@ Examples:
161
171
  )
162
172
  vectorize_parser.add_argument(
163
173
  "--device",
164
- choices=["auto", "cpu", "cuda", "cuda:0"],
165
- help="Device for embedding (server-side: auto, cpu, cuda, cuda:0)",
174
+ type=_device_arg,
175
+ help="Device for embedding (server-side: auto, cpu, cuda, cuda:N)",
166
176
  )
167
177
  vectorize_parser.add_argument(
168
178
  "--wait-timeout",
@@ -222,8 +232,8 @@ Examples:
222
232
  )
223
233
  embed_file_json.add_argument(
224
234
  "--device",
225
- choices=["auto", "cpu", "cuda", "cuda:0"],
226
- help="Device for embedding (server-side)",
235
+ type=_device_arg,
236
+ help="Device for embedding (server-side: auto, cpu, cuda, cuda:N)",
227
237
  )
228
238
  embed_file_json.add_argument(
229
239
  "--error-policy",
@@ -220,7 +220,7 @@ class VectorizationCLI:
220
220
  model: Optional model name (server-side).
221
221
  dimension: Optional expected vector dimension (server-side).
222
222
  error_policy: "continue" or "fail_fast" (default: "continue").
223
- device: Optional device: "auto", "cpu", "cuda", "cuda:0" (server-side).
223
+ device: Optional device: "auto", "cpu", "cuda", "cuda:N" (server-side).
224
224
 
225
225
  Returns:
226
226
  A list of embedding vectors on success (possibly empty when
@@ -114,8 +114,8 @@ async def demo_all_security_modes():
114
114
  "mode": "https",
115
115
  "host": "localhost",
116
116
  "port": 10011,
117
- "cert_file": "/home/vasilyvz/projects/embed-client/mtls_certificates/server/embedding-service.crt",
118
- "key_file": "/home/vasilyvz/projects/embed-client/mtls_certificates/server/embedding-service.key",
117
+ "cert_file": "/home/vasilyvz/projects/tools/embed/mtls_certificates/server/embedding-service.crt",
118
+ "key_file": "/home/vasilyvz/projects/tools/embed/mtls_certificates/server/embedding-service.key",
119
119
  "description": "HTTPS with server certificate verification",
120
120
  },
121
121
  {
@@ -123,8 +123,8 @@ async def demo_all_security_modes():
123
123
  "host": "localhost",
124
124
  "port": 10012,
125
125
  "api_key": "admin-secret-key",
126
- "cert_file": "/home/vasilyvz/projects/embed-client/mtls_certificates/server/embedding-service.crt",
127
- "key_file": "/home/vasilyvz/projects/embed-client/mtls_certificates/server/embedding-service.key",
126
+ "cert_file": "/home/vasilyvz/projects/tools/embed/mtls_certificates/server/embedding-service.crt",
127
+ "key_file": "/home/vasilyvz/projects/tools/embed/mtls_certificates/server/embedding-service.key",
128
128
  "description": "HTTPS with server certificates + authentication",
129
129
  },
130
130
  {
@@ -132,26 +132,26 @@ async def demo_all_security_modes():
132
132
  "host": "localhost",
133
133
  "port": 10013,
134
134
  "api_key": "admin-secret-key",
135
- "cert_file": "/home/vasilyvz/projects/embed-client/mtls_certificates/server/embedding-service.crt",
136
- "key_file": "/home/vasilyvz/projects/embed-client/mtls_certificates/server/embedding-service.key",
135
+ "cert_file": "/home/vasilyvz/projects/tools/embed/mtls_certificates/server/embedding-service.crt",
136
+ "key_file": "/home/vasilyvz/projects/tools/embed/mtls_certificates/server/embedding-service.key",
137
137
  "description": "HTTPS with server certificates + authentication + roles",
138
138
  },
139
139
  {
140
140
  "mode": "mtls",
141
141
  "host": "localhost",
142
142
  "port": 10021,
143
- "cert_file": "/home/vasilyvz/projects/embed-client/mtls_certificates/client/embedding-service.crt",
144
- "key_file": "/home/vasilyvz/projects/embed-client/mtls_certificates/client/embedding-service.key",
145
- "ca_cert_file": "/home/vasilyvz/projects/embed-client/mtls_certificates/ca/ca.crt",
143
+ "cert_file": "/home/vasilyvz/projects/tools/embed/mtls_certificates/client/embedding-service.crt",
144
+ "key_file": "/home/vasilyvz/projects/tools/embed/mtls_certificates/client/embedding-service.key",
145
+ "ca_cert_file": "/home/vasilyvz/projects/tools/embed/mtls_certificates/ca/ca.crt",
146
146
  "description": "Mutual TLS with client and server certificates",
147
147
  },
148
148
  {
149
149
  "mode": "mtls_roles",
150
150
  "host": "localhost",
151
151
  "port": 10022,
152
- "cert_file": "/home/vasilyvz/projects/embed-client/mtls_certificates/client/embedding-service.crt",
153
- "key_file": "/home/vasilyvz/projects/embed-client/mtls_certificates/client/embedding-service.key",
154
- "ca_cert_file": "/home/vasilyvz/projects/embed-client/mtls_certificates/ca/ca.crt",
152
+ "cert_file": "/home/vasilyvz/projects/tools/embed/mtls_certificates/client/embedding-service.crt",
153
+ "key_file": "/home/vasilyvz/projects/tools/embed/mtls_certificates/client/embedding-service.key",
154
+ "ca_cert_file": "/home/vasilyvz/projects/tools/embed/mtls_certificates/ca/ca.crt",
155
155
  "description": "mTLS with role-based access control",
156
156
  },
157
157
  ]
@@ -686,7 +686,7 @@ class EmbeddingClient:
686
686
  dimension: Optional expected vector dimension
687
687
  job_id: Optional custom job ID (server may ignore and generate own)
688
688
  error_policy: 'fail_fast' or 'continue'; default from server
689
- device: 'auto', 'cpu', 'cuda', 'cuda:0'; default from server
689
+ device: 'auto', 'cpu', 'cuda' or 'cuda:N'; default from server
690
690
  aggregation_method: How to combine part vectors when a text is
691
691
  longer than the model can read. For the local model, when
692
692
  neither the call nor the server config sets it, the default is
@@ -722,6 +722,8 @@ class EmbeddingClient:
722
722
  and ``error.data.kind`` unchanged: -32602 UNKNOWN_PROVIDER,
723
723
  UNKNOWN_MODEL, UNSUPPORTED_DIMENSION, PROVIDER_REQUIRED;
724
724
  -32003 EXTERNAL_UNAVAILABLE, EXTERNAL_UPSTREAM_FAILURE,
725
+ EXTERNAL_PAYMENT_REQUIRED (error.data.payment_required true: the
726
+ provider account needs payment or credit; top up and repeat),
725
727
  EXTERNAL_BAD_RESPONSE, EXTERNAL_INVALID_REQUEST; -32001
726
728
  MODEL_LOADING (retry); -32004 OWN_MODEL_DISABLED; -32005
727
729
  GPU_DISABLED; -32603 MODEL_LOAD_FAILED, NO_GPU_AVAILABLE,
@@ -1464,7 +1466,9 @@ class EmbeddingClient:
1464
1466
  List available models (shape matches server models command result.data).
1465
1467
 
1466
1468
  Returns:
1467
- ``{"use_own_model": "none"|"ram"|"gpu", "default": {provider,
1469
+ ``{"use_own_model": "none"|"ram"|"gpu" (the effective mode derived
1470
+ from the server flags use_own_model false / true + device cpu /
1471
+ true + device gpu), "default": {provider,
1468
1472
  model}, "external": {configured, service}, "models": [...]}``; each
1469
1473
  entry has name, provider, dimension, supported_dimensions,
1470
1474
  max_tokens, backend and (local entries) residency. For the local
@@ -68,7 +68,7 @@ class ModelServerUnavailableError(EmbedError):
68
68
  class EmbedGpuOutOfMemoryError(EmbedError):
69
69
  """
70
70
  GPU ran out of memory while loading or running the embedding model.
71
- User message suggests using CPU (embedding.device=cpu) or freeing GPU memory.
71
+ User message suggests using CPU (vectorization.device=cpu) or freeing GPU memory.
72
72
  """
73
73
 
74
74
 
@@ -1,14 +1,14 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: embed-client
3
- Version: 4.0.63
4
- Summary: Async client for the Embedding Service API. Canonical class: EmbeddingClient (JSON-RPC via mcp-proxy-adapter >=8.10).
3
+ Version: 4.0.87
4
+ Summary: Async client for the Embedding Service API. Canonical class: EmbeddingClient (JSON-RPC via mcp-proxy-adapter >=8.11.16).
5
5
  Author-email: Vasiliy Zdanovskiy <vasilyvz@gmail.com>
6
6
  License-Expression: MIT
7
- Project-URL: Homepage, https://github.com/vasilyvz/embed-client
8
- Project-URL: Repository, https://github.com/vasilyvz/embed-client
9
- Project-URL: Documentation, https://github.com/vasilyvz/embed-client#readme
10
- Project-URL: Bug Tracker, https://github.com/vasilyvz/embed-client/issues
11
- Project-URL: Configuration Reference, https://github.com/vasilyvz/embed-client/blob/main/CONFIGURATION.md
7
+ Project-URL: Homepage, https://github.com/maverikod/ai-embed
8
+ Project-URL: Repository, https://github.com/maverikod/ai-embed
9
+ Project-URL: Documentation, https://github.com/maverikod/ai-embed/tree/main/client#readme
10
+ Project-URL: Bug Tracker, https://github.com/maverikod/ai-embed/issues
11
+ Project-URL: Configuration Reference, https://github.com/maverikod/ai-embed/blob/main/client/CONFIGURATION.md
12
12
  Keywords: embedding,async,client,api,authentication,ssl,tls,mtls,config,generator,validator,configuration
13
13
  Classifier: Development Status :: 5 - Production/Stable
14
14
  Classifier: Intended Audience :: Developers
@@ -26,20 +26,11 @@ 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.11.3
29
+ Requires-Dist: mcp-proxy-adapter>=8.11.16
30
30
  Requires-Dist: mcp_security_framework>=2.3.2
31
31
  Provides-Extra: scripts
32
32
  Requires-Dist: pydantic>=2.0.0; extra == "scripts"
33
- Provides-Extra: test
34
- Requires-Dist: pytest; extra == "test"
35
- Requires-Dist: pytest-asyncio; extra == "test"
36
- Requires-Dist: pytest-xdist; extra == "test"
37
- Requires-Dist: pytest-timeout; extra == "test"
38
33
  Provides-Extra: dev
39
- Requires-Dist: pytest; extra == "dev"
40
- Requires-Dist: pytest-asyncio; extra == "dev"
41
- Requires-Dist: pytest-xdist; extra == "dev"
42
- Requires-Dist: pytest-timeout; extra == "dev"
43
34
  Requires-Dist: black; extra == "dev"
44
35
  Requires-Dist: flake8; extra == "dev"
45
36
  Requires-Dist: mypy; extra == "dev"
@@ -47,7 +38,9 @@ Dynamic: license-file
47
38
 
48
39
  # embed-client
49
40
 
50
- Python **async** client for the Embedding Service API. The canonical public client is **`EmbeddingClient`**, aligned with the migrated server-side contract (JSON-RPC via **`mcp-proxy-adapter`**).
41
+ Python **async** client bundled with the Embedding Service in this repository's
42
+ `client/` directory. The canonical public client is **`EmbeddingClient`** (JSON-RPC
43
+ via **`mcp-proxy-adapter`**). The distribution and import names are unchanged.
51
44
 
52
45
  ```python
53
46
  from embed_client import EmbeddingClient
@@ -62,9 +55,9 @@ pip install embed-client
62
55
  Editable development checkout:
63
56
 
64
57
  ```bash
65
- git clone <repository-url>
66
- cd embed-client
67
- pip install -e .
58
+ git clone https://github.com/maverikod/ai-embed.git
59
+ cd ai-embed
60
+ pip install -e ./client
68
61
  ```
69
62
 
70
63
  ## Canonical real-server E2E (localhost:8001, mTLS)
@@ -108,7 +101,7 @@ Public queue-oriented helpers include **`embed`**, **`wait_for_job`**, **`job_st
108
101
 
109
102
  Resolution order (server): provider given -> must be known, model omitted -> the default model of that provider (it must be the default provider's, else `UNKNOWN_MODEL`); provider and model omitted -> the default pair; provider omitted and model given -> the default provider first (if it lists the model it is used and macsc is not consulted for a local default), else the other providers are searched: exactly one offers it -> used, several -> `PROVIDER_REQUIRED`, none -> `UNKNOWN_MODEL`. Dimension omitted -> the entry's default; given -> must satisfy `supported_dimensions` else `UNSUPPORTED_DIMENSION`.
110
103
 
111
- Error codes (`error.data.code` / `error.data.kind`, surfaced unchanged): `-32602` `UNKNOWN_PROVIDER`, `UNKNOWN_MODEL`, `UNSUPPORTED_DIMENSION`, `PROVIDER_REQUIRED`; `-32003` `EXTERNAL_UNAVAILABLE`, `EXTERNAL_UPSTREAM_FAILURE`, `EXTERNAL_BAD_RESPONSE`, `EXTERNAL_INVALID_REQUEST`; `-32001` `MODEL_LOADING` (retry); `-32004` `OWN_MODEL_DISABLED`; `-32005` `GPU_DISABLED`; `-32603` `MODEL_LOAD_FAILED`, `NO_GPU_AVAILABLE`. **`model_offload()`** moves the resident local model VRAM -> RAM (pinned against the GPU watcher) and **`model_load(model=None, device=None, wait=None)`** moves it back (`wait=False` returns at once while the load continues, `wait=True` blocks until it is in VRAM); neither takes a provider. Refusals of `model_offload`/`model_load`/`default_model` arrive as **`EmbedAPIError`** carrying the server error object. Every embed result carries `provider`, `model`, `dimension` and `backend`; external results also carry `usage`.
104
+ Error codes (`error.data.code` / `error.data.kind`, surfaced unchanged): `-32602` `UNKNOWN_PROVIDER`, `UNKNOWN_MODEL`, `UNSUPPORTED_DIMENSION`, `PROVIDER_REQUIRED`; `-32003` `EXTERNAL_UNAVAILABLE`, `EXTERNAL_UPSTREAM_FAILURE`, `EXTERNAL_PAYMENT_REQUIRED` (`error.data.payment_required` true: the provider account needs payment or credit), `EXTERNAL_BAD_RESPONSE`, `EXTERNAL_INVALID_REQUEST`; `-32001` `MODEL_LOADING` (retry); `-32004` `OWN_MODEL_DISABLED`; `-32005` `GPU_DISABLED`; `-32603` `MODEL_LOAD_FAILED`, `NO_GPU_AVAILABLE`. **`model_offload()`** moves the resident local model VRAM -> RAM (pinned against the GPU watcher) and **`model_load(model=None, device=None, wait=None)`** moves it back (`wait=False` returns at once while the load continues, `wait=True` blocks until it is in VRAM); neither takes a provider. Refusals of `model_offload`/`model_load`/`default_model` arrive as **`EmbedAPIError`** carrying the server error object. Every embed result carries `provider`, `model`, `dimension` and `backend`; external results also carry `usage`.
112
105
 
113
106
  **Input-limit table (server input_limit_* commands):** **`input_limit_add(provider, model, max_input_tokens, tokenizer, max_inputs_per_request=None, max_total_tokens_per_request=None, source=None)`** adds a manual row (`-32602` `INPUT_LIMIT_EXISTS`, `LOCAL_LIMIT_FROM_MODEL`); **`input_limit_delete(provider, model)`** removes a row (`-32602` `INPUT_LIMIT_NOT_FOUND`); **`input_limit_update(provider, model, *, <named cells>)`** changes only the cells passed explicitly (`None` sends null, which only the three nullable cells accept; `-32602` `INPUT_LIMIT_NOT_FOUND`, `INPUT_LIMIT_EMPTY_UPDATE`, `LOCAL_LIMIT_FROM_MODEL`); **`input_limit_list(provider=None)`** returns `{rows: [...]}` sorted by `(provider, model)` with each row's `origin` (`module` | `manual`). Mutating commands may also return `-32603` `INPUT_LIMIT_PERSIST_FAILED`. Refusals arrive as **`EmbedAPIError`**. The client does not validate these parameters.
114
107
 
@@ -126,23 +119,23 @@ The server supports multiple HTTP/HTTPS/mTLS and auth combinations. For deploy-t
126
119
 
127
120
  ## Development and tests
128
121
 
129
- Run the test suite with **pytest**; configuration lives in **`pyproject.toml`** (`[tool.pytest.ini_options]`). There is **no** `pytest.ini` at the repository root.
122
+ The original client test modules are preserved under `client/tests/`; the shared
123
+ project pipeline owns executable acceptance from the repository root.
130
124
 
131
125
  ```bash
132
- pytest -q
126
+ python -m pipeline
133
127
  ```
134
128
 
135
129
  ### Release
136
130
 
137
- The client is released together with the server (`embed`) as one unit and always carries the same
138
- version. Releases are run **only** by the server script `docker/build.sh` in the `embed` repository,
139
- which computes the next version, writes it into both trees, and calls this repository's scripts:
131
+ The server and client read one version from `embed_client/_version.py` here.
132
+ The root `../build.sh` builds the client wheel and sdist, checks their metadata,
133
+ publishes only the client to PyPI and pushes the server image to Docker Hub on
134
+ every successful run. It accepts no arguments or skip options and invokes no
135
+ pipeline. Run the shared pipeline separately before releasing the candidate.
140
136
 
141
- - `build.sh <release-version>` - client tests, sdist/wheel, `twine check`; never uploads
142
- - `publish.sh <release-version>` - `twine upload` of the built files, run only after the Docker Hub push succeeded
143
-
144
- Both scripts have no options and no skip switches, accept exactly one argument, and refuse a
145
- version that differs from `pyproject.toml` / `embed_client/__init__.py` (exit code 3).
137
+ For isolated package artifacts without publishing, run `python -m build client`
138
+ from the repository root. This is packaging only, not service acceptance.
146
139
 
147
140
  ## License
148
141
 
@@ -0,0 +1,68 @@
1
+ CONFIGURATION.md
2
+ LICENSE
3
+ MANIFEST.in
4
+ README.md
5
+ pyproject.toml
6
+ docs/SERVER_MODES_AND_CLIENT.md
7
+ docs/api_format.md
8
+ docs/client_integration_guide.md
9
+ docs/error_handling_complete.md
10
+ embed_client/__init__.py
11
+ embed_client/__main__.py
12
+ embed_client/_version.py
13
+ embed_client/adapter_config_factory.py
14
+ embed_client/adapter_config_normalizer.py
15
+ embed_client/adapter_generator_bridge.py
16
+ embed_client/auth.py
17
+ embed_client/cli.py
18
+ embed_client/cli_core.py
19
+ embed_client/client_factory.py
20
+ embed_client/client_factory_examples.py
21
+ embed_client/client_factory_helpers.py
22
+ embed_client/config.py
23
+ embed_client/config_defaults.py
24
+ embed_client/config_examples.py
25
+ embed_client/config_generator.py
26
+ embed_client/config_generator_cli.py
27
+ embed_client/config_presets.py
28
+ embed_client/config_validator.py
29
+ embed_client/config_validator_cli.py
30
+ embed_client/constants.py
31
+ embed_client/demo_cli.py
32
+ embed_client/demo_security_cli.py
33
+ embed_client/embed_file_output_validate.py
34
+ embed_client/embed_file_status_store.py
35
+ embed_client/embedding_client.py
36
+ embed_client/embedding_client_helpers.py
37
+ embed_client/example_async_usage.py
38
+ embed_client/example_async_usage_demo.py
39
+ embed_client/example_async_usage_ru.py
40
+ embed_client/example_async_usage_ru_demo.py
41
+ embed_client/exceptions.py
42
+ embed_client/identifier_types.py
43
+ embed_client/json_embed_file_preflight.py
44
+ embed_client/local_json_embed_file.py
45
+ embed_client/md_embed_file_prep.py
46
+ embed_client/response_normalizer.py
47
+ embed_client/response_parsers.py
48
+ embed_client/security_cli.py
49
+ embed_client/security_cli_core.py
50
+ embed_client/ssl_examples.py
51
+ embed_client/ssl_manager.py
52
+ embed_client.egg-info/PKG-INFO
53
+ embed_client.egg-info/SOURCES.txt
54
+ embed_client.egg-info/dependency_links.txt
55
+ embed_client.egg-info/entry_points.txt
56
+ embed_client.egg-info/requires.txt
57
+ embed_client.egg-info/top_level.txt
58
+ examples/README.md
59
+ examples/__init__.py
60
+ examples/async_testing_client_example.py
61
+ examples/canonical_mtls_localhost_8001.py
62
+ examples/embed_file_json_local.py
63
+ examples/security_examples.py
64
+ examples/security_examples_ru.py
65
+ examples/configs/http_simple.json
66
+ examples/configs/https_token.json
67
+ examples/configs/mtls_roles.json
68
+ examples/data/embed_file_json_array_sample.json
@@ -0,0 +1,10 @@
1
+ mcp-proxy-adapter>=8.11.16
2
+ mcp_security_framework>=2.3.2
3
+
4
+ [dev]
5
+ black
6
+ flake8
7
+ mypy
8
+
9
+ [scripts]
10
+ pydantic>=2.0.0
@@ -1,8 +1,16 @@
1
1
  # Examples index
2
2
 
3
- ## 1. Canonical mTLS tour (localhost:8001)
3
+ The runnable examples select their target through the repository's single
4
+ `pipeline/endpoints.env` loader and branch-derived `PIPELINE_ENV`. They refuse
5
+ direct production calls and conflicting explicit targets. Historical filenames
6
+ retain `localhost_8001`; live targets now come from the paired table. Transport
7
+ demonstrations fail before connecting if that transport is unavailable. Security
8
+ JSON files are auth/trust fragments filled by their runner, not standalone
9
+ connection profiles. See [pipeline configuration](../../docs/PIPELINE_ENVIRONMENT.md).
4
10
 
5
- **[`canonical_mtls_localhost_8001.py`](canonical_mtls_localhost_8001.py)** — full operational walkthrough of **`EmbeddingClient`** against **localhost:8001** with **mTLS**, using **`mtls_certificates/client/`** and **`mtls_certificates/ca/`** (see **`mtls_certificates/README.md`** if present).
11
+ ## 1. Canonical mTLS tour (historical filename)
12
+
13
+ **[`canonical_mtls_localhost_8001.py`](canonical_mtls_localhost_8001.py)** — operational walkthrough of **`EmbeddingClient`** against the paired DEV endpoint with **mTLS**, using matching DEV client and CA files (see **`mtls_certificates/README.md`** if present).
6
14
 
7
15
  | Environment | Purpose |
8
16
  |-------------|---------|
@@ -50,17 +50,24 @@ from embed_client.embedding_client import EmbeddingClient # noqa: E402
50
50
 
51
51
 
52
52
  async def run_example(
53
- host: str = "localhost",
54
- port: int = 8001,
55
- protocol: str = "http",
53
+ host: Optional[str] = None,
54
+ port: Optional[int] = None,
55
+ protocol: Optional[str] = None,
56
56
  ca_path: Optional[str] = None,
57
57
  output_dir: Optional[Path] = None,
58
58
  ) -> Dict[str, Any]:
59
59
  """Generate, validate and use a client config; return the ``health()`` result.
60
60
 
61
- ``protocol`` is ``http`` or ``https`` (``https`` takes *ca_path*). Defaults reproduce the original behaviour: localhost, 8001, http,
62
- config written under ``<repo>/configs``.
61
+ Defaults come from the branch-selected pipeline endpoint. Explicit values
62
+ must match it; HTTPS takes *ca_path*. Configuration stays in the output directory.
63
63
  """
64
+ from pipeline.environment import example_target
65
+ from urllib.parse import urlsplit
66
+ base_url, selected_port = example_target(protocol)
67
+ selected = urlsplit(base_url)
68
+ if host is not None and host != selected.hostname or port is not None and port != selected_port:
69
+ raise ValueError("example host/port conflicts with the pipeline endpoint")
70
+ host, port, protocol = selected.hostname, selected_port, protocol or selected.scheme
64
71
  gen = ClientConfigGenerator()
65
72
  out_dir = Path(output_dir) if output_dir is not None else _ROOT / "configs"
66
73
  out = out_dir / "_example_generated_http.json"