acp-sdk 0.10.0__tar.gz → 0.10.1__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 (56) hide show
  1. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/PKG-INFO +1 -1
  2. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/pyproject.toml +1 -1
  3. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/src/acp_sdk/server/server.py +14 -2
  4. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/.gitignore +0 -0
  5. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/.python-version +0 -0
  6. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/README.md +0 -0
  7. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/docs/.gitignore +0 -0
  8. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/docs/Makefile +0 -0
  9. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/docs/conf.py +0 -0
  10. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/docs/index.rst +0 -0
  11. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/docs/make.bat +0 -0
  12. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/pytest.ini +0 -0
  13. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/src/acp_sdk/__init__.py +0 -0
  14. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/src/acp_sdk/client/__init__.py +0 -0
  15. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/src/acp_sdk/client/client.py +0 -0
  16. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/src/acp_sdk/client/types.py +0 -0
  17. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/src/acp_sdk/client/utils.py +0 -0
  18. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/src/acp_sdk/instrumentation.py +0 -0
  19. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/src/acp_sdk/models/__init__.py +0 -0
  20. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/src/acp_sdk/models/errors.py +0 -0
  21. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/src/acp_sdk/models/models.py +0 -0
  22. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/src/acp_sdk/models/schemas.py +0 -0
  23. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/src/acp_sdk/py.typed +0 -0
  24. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/src/acp_sdk/server/__init__.py +0 -0
  25. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/src/acp_sdk/server/agent.py +0 -0
  26. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/src/acp_sdk/server/app.py +0 -0
  27. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/src/acp_sdk/server/context.py +0 -0
  28. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/src/acp_sdk/server/errors.py +0 -0
  29. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/src/acp_sdk/server/executor.py +0 -0
  30. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/src/acp_sdk/server/logging.py +0 -0
  31. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/src/acp_sdk/server/session.py +0 -0
  32. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/src/acp_sdk/server/store/__init__.py +0 -0
  33. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/src/acp_sdk/server/store/memory_store.py +0 -0
  34. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/src/acp_sdk/server/store/postgresql_store.py +0 -0
  35. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/src/acp_sdk/server/store/redis_store.py +0 -0
  36. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/src/acp_sdk/server/store/store.py +0 -0
  37. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/src/acp_sdk/server/store/utils.py +0 -0
  38. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/src/acp_sdk/server/telemetry.py +0 -0
  39. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/src/acp_sdk/server/types.py +0 -0
  40. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/src/acp_sdk/server/utils.py +0 -0
  41. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/src/acp_sdk/version.py +0 -0
  42. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/tests/conftest.py +0 -0
  43. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/tests/e2e/__init__.py +0 -0
  44. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/tests/e2e/config.py +0 -0
  45. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/tests/e2e/fixtures/__init__.py +0 -0
  46. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/tests/e2e/fixtures/client.py +0 -0
  47. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/tests/e2e/fixtures/server.py +0 -0
  48. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/tests/e2e/test_suites/__init__.py +0 -0
  49. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/tests/e2e/test_suites/test_discovery.py +0 -0
  50. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/tests/e2e/test_suites/test_runs.py +0 -0
  51. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/tests/unit/client/test_client.py +0 -0
  52. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/tests/unit/client/test_utils.py +0 -0
  53. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/tests/unit/models/__init__.py +0 -0
  54. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/tests/unit/models/test_models.py +0 -0
  55. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/tests/unit/server/__init__.py +0 -0
  56. {acp_sdk-0.10.0 → acp_sdk-0.10.1}/tests/unit/server/test_server.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: acp-sdk
3
- Version: 0.10.0
3
+ Version: 0.10.1
4
4
  Summary: Agent Communication Protocol SDK
5
5
  Author: IBM Corp.
6
6
  Maintainer-email: Tomas Pilar <thomas7pilar@gmail.com>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "acp-sdk"
3
- version = "0.10.0"
3
+ version = "0.10.1"
4
4
  description = "Agent Communication Protocol SDK"
5
5
  license = "Apache-2.0"
6
6
  readme = "README.md"
@@ -1,5 +1,6 @@
1
1
  import asyncio
2
2
  import os
3
+ import re
3
4
  from collections.abc import AsyncGenerator, Awaitable
4
5
  from contextlib import asynccontextmanager
5
6
  from typing import Any, Callable
@@ -313,22 +314,33 @@ class Server:
313
314
  return
314
315
 
315
316
  url = os.getenv("PLATFORM_URL", "http://127.0.0.1:8333")
317
+ host = re.sub(r"localhost|127\.0\.0\.1", "host.docker.internal", self.server.config.host)
316
318
  request_data = {
317
- "location": f"http://{self.server.config.host}:{self.server.config.port}",
319
+ "location": f"http://{host}:{self.server.config.port}",
318
320
  }
321
+ await async_request_with_retry(lambda client, data=request_data: client.get(f"{url}/api/v1/providers"))
319
322
  try:
320
323
  await async_request_with_retry(
321
- lambda client, data=request_data: client.post(f"{url}/api/v1/providers/register/unmanaged", json=data)
324
+ lambda client, data=request_data: client.post(
325
+ f"{url}/api/v1/providers", json=data, params={"auto_remove": True}
326
+ )
322
327
  )
323
328
  logger.info("Agent registered to the beeai server.")
324
329
 
325
330
  # check missing env keyes
326
331
  envs_request = await async_request_with_retry(lambda client: client.get(f"{url}/api/v1/variables"))
327
332
  envs = envs_request.get("env")
333
+ os.environ["LLM_MODEL"] = "dummy"
334
+ os.environ["LLM_API_KEY"] = "dummy"
335
+ os.environ["LLM_API_BASE"] = f"{url.rstrip('/')}/api/v1/llm"
336
+
328
337
  for agent in self.agents:
329
338
  # register all available envs
330
339
  missing_keyes = []
331
340
  for env in agent.metadata.model_dump().get("env", []):
341
+ # Those envs are set to use LLM gateway from platform server
342
+ if env["name"] in {"LLM_MODEL", "LLM_API_KEY", "LLM_API_BASE"}:
343
+ continue
332
344
  server_env = envs.get(env.get("name"))
333
345
  if server_env:
334
346
  logger.debug(f"Env variable {env['name']} = '{server_env}' added dynamically")
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes