process-gpt-agent-sdk 0.3.6__tar.gz → 0.3.7__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.

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.3.6
3
+ Version: 0.3.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,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: process-gpt-agent-sdk
3
- Version: 0.3.6
3
+ Version: 0.3.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
@@ -82,6 +82,7 @@ def initialize_db() -> None:
82
82
  load_dotenv()
83
83
  supabase_url = os.getenv("SUPABASE_URL") or os.getenv("SUPABASE_KEY_URL")
84
84
  supabase_key = os.getenv("SERVICE_ROLE_KEY") or os.getenv("SUPABASE_KEY") or os.getenv("SUPABASE_ANON_KEY")
85
+ print("supabase_url: %s\n, supabase_key: %s\n", supabase_url, supabase_key)
85
86
  if not supabase_url or not supabase_key:
86
87
  raise RuntimeError("SUPABASE_URL 및 SUPABASE_KEY가 필요합니다")
87
88
  _supabase_client = create_client(supabase_url, supabase_key)
@@ -129,7 +130,7 @@ async def polling_pending_todos(agent_orch: str, consumer: str) -> Optional[Dict
129
130
  "p_env": p_env,
130
131
  },
131
132
  ).execute()
132
-
133
+ print("polling_pending_todos resp: %s", resp)
133
134
  rows = resp.data or []
134
135
  if not rows:
135
136
  return None
@@ -152,7 +153,9 @@ async def fetch_any_task(limit: int = 1) -> Optional[Dict[str, Any]]:
152
153
 
153
154
  def _call():
154
155
  client = get_db_client()
155
- resp = client.rpc("fetch_any_task", {"p_limit": limit}).execute()
156
+ resp = client.table("todolist").select("*").limit(limit).execute()
157
+ print("fetch_any_task resp: %s", resp)
158
+ # resp = client.rpc("fetch_any_task", {"p_limit": limit}).execute()
156
159
  rows = resp.data or []
157
160
  if not rows:
158
161
  return None
@@ -394,12 +394,15 @@ class ProcessGPTAgentServer:
394
394
  logger.info("🔍 [폴링 시작] 작업 대기 중... (agent_orch=%s)", self.agent_orch)
395
395
 
396
396
  # 테스트: 조건 없이 레코드 확인
397
+
397
398
  test_row = await fetch_any_task(limit=1)
398
399
  if test_row:
399
400
  logger.info("📋 [테스트 조회] 조건 없이 발견된 작업: ID=%s, status=%s, agent_mode=%s, draft=%s, draft_status=%s, agent_orch=%s, tenant_id=%s",
400
401
  test_row.get('id'), test_row.get('status'), test_row.get('agent_mode'),
401
402
  test_row.get('draft'), test_row.get('draft_status'), test_row.get('agent_orch'), test_row.get('tenant_id'))
402
-
403
+ else:
404
+ logger.info("📋 [테스트 조회] todolist 테이블에 레코드가 없음 %s", str(test_row))
405
+
403
406
  row = await polling_pending_todos(self.agent_orch, get_consumer_id())
404
407
 
405
408
  if row:
@@ -416,7 +419,9 @@ class ProcessGPTAgentServer:
416
419
  self._current_todo_id = None
417
420
  # 작업이 있었으므로 슬립 생략 → 즉시 다음 폴링
418
421
  continue
419
-
422
+ else:
423
+ logger.info("⏸️ [폴링 결과 없음] 조건에 맞는 작업이 없음 - 10초 대기 %s", str(row))
424
+
420
425
  # 작업 없을 때만 10초 대기
421
426
  await asyncio.sleep(10)
422
427
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "process-gpt-agent-sdk"
7
- version = "0.3.6"
7
+ version = "0.3.7"
8
8
  description = "Supabase 기반 이벤트/작업 폴링으로 A2A AgentExecutor를 실행하는 SDK"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"