process-gpt-agent-sdk 0.2.6__py3-none-any.whl → 0.2.7__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 process-gpt-agent-sdk might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: process-gpt-agent-sdk
3
- Version: 0.2.6
3
+ Version: 0.2.7
4
4
  Summary: Supabase 기반 이벤트/작업 폴링으로 A2A AgentExecutor를 실행하는 SDK
5
5
  License: MIT
6
6
  Project-URL: Homepage, https://github.com/your-org/process-gpt-agent-sdk
@@ -1,7 +1,7 @@
1
1
  processgpt_agent_sdk/__init__.py,sha256=IvAL5WBZhI83LYQogRP6-i04bxZkhmkgmES4FRQY888,185
2
2
  processgpt_agent_sdk/server.py,sha256=4_uifUFuZCGy1HEBpVAilhjlti25iQ0bjbmeFVrFakU,11366
3
3
  processgpt_agent_sdk/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- processgpt_agent_sdk/core/database.py,sha256=Xkd3k_gmLdq3c5_AYYTNIMPm-2UeK7DlY4XdigzL-xU,15891
4
+ processgpt_agent_sdk/core/database.py,sha256=_xZTeMVEz2bvOjLh59zJ8QgiuM8WznLQ9lKk8Trhymk,16370
5
5
  processgpt_agent_sdk/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  processgpt_agent_sdk/tools/human_query_tool.py,sha256=I4Q5AS5YRem0pkIz5_bhMnS5NGlGhKky4_HE22UOdmE,10871
7
7
  processgpt_agent_sdk/tools/knowledge_tools.py,sha256=AOtxvLypu343877ZzzELGq3At-E_2NiAqEw0Njlephg,8937
@@ -12,7 +12,7 @@ processgpt_agent_sdk/utils/crewai_event_listener.py,sha256=MwIMtRjw7L1uV8QRvlNV1
12
12
  processgpt_agent_sdk/utils/event_handler.py,sha256=meyxMaiGH7VvKQJRhlHKRbWhSzxyEzoHGAEGVIxNocA,2879
13
13
  processgpt_agent_sdk/utils/logger.py,sha256=d6Chvwx6qLAyirXRFg4bARzEovo1UYaRgLTaknHad9E,1271
14
14
  processgpt_agent_sdk/utils/summarizer.py,sha256=h2OBfVYq1JB0A2rLqSdYObEDlN54DzsHTmqnStis4XI,5743
15
- process_gpt_agent_sdk-0.2.6.dist-info/METADATA,sha256=Sry4j_NwnQTt0K4WsBgPP2jJYVe562jNSIcyhSKxa9c,12898
16
- process_gpt_agent_sdk-0.2.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
17
- process_gpt_agent_sdk-0.2.6.dist-info/top_level.txt,sha256=Xe6zrj3_3Vv7d0pl5RRtenVUckwOVBVLQn2P03j5REo,21
18
- process_gpt_agent_sdk-0.2.6.dist-info/RECORD,,
15
+ process_gpt_agent_sdk-0.2.7.dist-info/METADATA,sha256=_7Nj1fi-dNq0RLDtV_2MT3i73vUg35s9Z2q2BdlJKKA,12898
16
+ process_gpt_agent_sdk-0.2.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
17
+ process_gpt_agent_sdk-0.2.7.dist-info/top_level.txt,sha256=Xe6zrj3_3Vv7d0pl5RRtenVUckwOVBVLQn2P03j5REo,21
18
+ process_gpt_agent_sdk-0.2.7.dist-info/RECORD,,
@@ -103,16 +103,30 @@ def get_consumer_id() -> str:
103
103
  async def polling_pending_todos(agent_orch: str, consumer: str) -> Optional[Dict[str, Any]]:
104
104
  """TODOLIST 테이블에서 대기중인 워크아이템을 조회"""
105
105
  def _call():
106
- client = get_db_client()
107
- return client.rpc(
108
- "fetch_pending_task",
109
- {"p_agent_orch": agent_orch, "p_consumer": consumer, "p_limit": 1},
110
- ).execute()
106
+ supabase = get_db_client()
107
+ consumer_id = socket.gethostname()
108
+ env = (os.getenv("ENV") or "").lower()
109
+
110
+ if env == "dev":
111
+ # 개발 환경: 특정 테넌트(uengine)만 폴링
112
+ resp = supabase.rpc(
113
+ "fetch_pending_task_dev",
114
+ {"p_limit": 1, "p_consumer": consumer_id, "p_tenant_id": "uengine"},
115
+ ).execute()
116
+ else:
117
+ # 운영/기타 환경: 기존 로직 유지
118
+ resp = supabase.rpc(
119
+ "fetch_pending_task",
120
+ {"p_limit": 1, "p_consumer": consumer_id},
121
+ ).execute()
122
+
123
+ rows = resp.data or []
124
+ return rows[0] if rows else None
111
125
 
112
126
  resp = await _async_retry(_call, name="polling_pending_todos", fallback=lambda: None)
113
- if not resp or not resp.data:
127
+ if not resp:
114
128
  return None
115
- return resp.data[0]
129
+ return resp
116
130
 
117
131
 
118
132
  async def fetch_todo_by_id(todo_id: str) -> Optional[Dict[str, Any]]: