agent-builder-gateway-sdk 0.3.0__py3-none-any.whl → 0.3.2__py3-none-any.whl

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.

Potentially problematic release.


This version of agent-builder-gateway-sdk might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agent-builder-gateway-sdk
3
- Version: 0.3.0
3
+ Version: 0.3.2
4
4
  Summary: Python SDK for Agent Builder Gateway - 用于 AI 构建的程序调用预制件
5
5
  Author: Agent Builder Team
6
6
  License: MIT
@@ -52,8 +52,16 @@ client = GatewayClient(jwt_token="your-jwt-token")
52
52
 
53
53
  # 或使用 API Key
54
54
  client = GatewayClient(api_key="sk-xxx")
55
+
56
+ # 白名单模式(适用于 OpenHands 等白名单环境)
57
+ client = GatewayClient() # 无需提供认证信息
55
58
  ```
56
59
 
60
+ **白名单模式说明**:
61
+ - 如果你的环境已配置白名单(如 OpenHands、内部开发环境),可以直接创建客户端而无需提供认证信息
62
+ - SDK 会以无鉴权模式发送请求,由 Gateway 基于 IP 白名单进行验证
63
+ - 这种模式简化了开发流程,无需管理 token
64
+
57
65
  ### 调用预制件
58
66
 
59
67
  ```python
@@ -1,10 +1,10 @@
1
1
  gateway_sdk/__init__.py,sha256=lgBWm1gkpX8nGx-weoJbpQeHRYygJu5XBhB-ienHq5I,655
2
2
  gateway_sdk/auth.py,sha256=Nx0p9FYZHBoQeN8SO2nn7MKH2y02v3UR3M8bYqhQG0w,1165
3
- gateway_sdk/client.py,sha256=GZh2SyQ_598ex1LebSy6ajN9F3APckn7O1u0TrpmpsU,7708
3
+ gateway_sdk/client.py,sha256=3tk1ns5bqp_HLJGV1mUtiN8h6uo2g9T85hJ25HEyhFg,7790
4
4
  gateway_sdk/exceptions.py,sha256=fIrhKC8vIaocXvyK56OEKPGHn8drvGh6nElnyR0Z71A,1897
5
5
  gateway_sdk/models.py,sha256=ge96k0Qcii7ESEwJQoO5fZwUZBcVbe2Ccgna3kPOAB8,6072
6
6
  gateway_sdk/streaming.py,sha256=nwRWxKP5bU8uIMIv_82DyFws9djnEKdAxW6S4L9KtPI,1092
7
- agent_builder_gateway_sdk-0.3.0.dist-info/METADATA,sha256=Vgp8EOkRYF_Z3ZAtbN7U6fvVNzuXhvx7XI3Hy12l96w,5966
8
- agent_builder_gateway_sdk-0.3.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
9
- agent_builder_gateway_sdk-0.3.0.dist-info/licenses/LICENSE,sha256=C3JXUJe4vPtoVe1lp7O4WeGtH71JWYrRaCufEoJ84K0,1076
10
- agent_builder_gateway_sdk-0.3.0.dist-info/RECORD,,
7
+ agent_builder_gateway_sdk-0.3.2.dist-info/METADATA,sha256=6qI3-VmV4IzBd2DXGRY9KyFhr_4mHJbLF95N55Gora0,6391
8
+ agent_builder_gateway_sdk-0.3.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
9
+ agent_builder_gateway_sdk-0.3.2.dist-info/licenses/LICENSE,sha256=C3JXUJe4vPtoVe1lp7O4WeGtH71JWYrRaCufEoJ84K0,1076
10
+ agent_builder_gateway_sdk-0.3.2.dist-info/RECORD,,
gateway_sdk/client.py CHANGED
@@ -17,7 +17,7 @@ from .exceptions import (
17
17
 
18
18
 
19
19
  # Gateway 地址
20
- DEFAULT_GATEWAY_URL = "http://nodeport.sensedeal.vip:30566"
20
+ DEFAULT_GATEWAY_URL = "http://agent-builder-gateway-test.sensedeal.vip"
21
21
 
22
22
 
23
23
  class GatewayClient:
@@ -38,14 +38,15 @@ class GatewayClient:
38
38
  api_key: API Key(优先级高)
39
39
  jwt_token: JWT Token(用于 AI 构建的程序)
40
40
  timeout: 请求超时时间(秒)
41
+
42
+ Note:
43
+ 如果不提供 api_key 或 jwt_token,客户端将在无鉴权模式下工作。
44
+ 这适用于配置了白名单的环境(如 OpenHands)。
41
45
  """
42
46
  self.base_url = base_url.rstrip("/")
43
47
  self.auth = AuthManager(api_key=api_key, jwt_token=jwt_token)
44
48
  self.timeout = timeout
45
49
 
46
- if not self.auth.is_authenticated():
47
- raise AuthenticationError("必须提供 api_key 或 jwt_token")
48
-
49
50
  def run(
50
51
  self,
51
52
  prefab_id: str,