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

Files changed (25) hide show
  1. {process_gpt_agent_sdk-0.1.7/process_gpt_agent_sdk.egg-info → process_gpt_agent_sdk-0.1.9}/PKG-INFO +1 -1
  2. {process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9/process_gpt_agent_sdk.egg-info}/PKG-INFO +1 -1
  3. {process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9}/processgpt_agent_sdk/core/database.py +12 -12
  4. {process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9}/processgpt_agent_sdk/utils/summarizer.py +5 -5
  5. {process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9}/pyproject.toml +1 -1
  6. {process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9}/MANIFEST.in +0 -0
  7. {process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9}/README.md +0 -0
  8. {process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9}/function.sql +0 -0
  9. {process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9}/process_gpt_agent_sdk.egg-info/SOURCES.txt +0 -0
  10. {process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9}/process_gpt_agent_sdk.egg-info/dependency_links.txt +0 -0
  11. {process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9}/process_gpt_agent_sdk.egg-info/requires.txt +0 -0
  12. {process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9}/process_gpt_agent_sdk.egg-info/top_level.txt +0 -0
  13. {process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9}/processgpt_agent_sdk/__init__.py +0 -0
  14. {process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9}/processgpt_agent_sdk/core/__init__.py +0 -0
  15. {process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9}/processgpt_agent_sdk/server.py +0 -0
  16. {process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9}/processgpt_agent_sdk/tools/__init__.py +0 -0
  17. {process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9}/processgpt_agent_sdk/tools/human_query_tool.py +0 -0
  18. {process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9}/processgpt_agent_sdk/tools/knowledge_tools.py +0 -0
  19. {process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9}/processgpt_agent_sdk/tools/safe_tool_loader.py +0 -0
  20. {process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9}/processgpt_agent_sdk/utils/__init__.py +0 -0
  21. {process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9}/processgpt_agent_sdk/utils/context_manager.py +0 -0
  22. {process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9}/processgpt_agent_sdk/utils/crewai_event_listener.py +0 -0
  23. {process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9}/processgpt_agent_sdk/utils/event_handler.py +0 -0
  24. {process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9}/processgpt_agent_sdk/utils/logger.py +0 -0
  25. {process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: process-gpt-agent-sdk
3
- Version: 0.1.7
3
+ Version: 0.1.9
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.1.7
3
+ Version: 0.1.9
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
@@ -27,7 +27,7 @@ from typing import Callable, TypeVar
27
27
 
28
28
  T = TypeVar("T")
29
29
 
30
- from ..utils.logger import handle_application_error as _emit_error, write_log_message as _emit_log
30
+ from ..utils.logger import handle_application_error, write_log_message
31
31
 
32
32
 
33
33
  async def _async_retry(
@@ -52,16 +52,16 @@ async def _async_retry(
52
52
  last_err = e
53
53
  jitter = random.uniform(0, 0.3)
54
54
  delay = base_delay * (2 ** (attempt - 1)) + jitter
55
- _emit_log(f"{name} 재시도 {attempt}/{retries} (delay={delay:.2f}s): {e}", level=logging.WARNING)
55
+ write_log_message(f"{name} 재시도 {attempt}/{retries} (delay={delay:.2f}s): {e}", level=logging.WARNING)
56
56
  await asyncio.sleep(delay)
57
- _emit_log(f"{name} 최종 실패: {last_err}", level=logging.ERROR)
57
+ write_log_message(f"{name} 최종 실패: {last_err}", level=logging.ERROR)
58
58
  if fallback is not None:
59
59
  try:
60
60
  fb_val = fallback()
61
- _emit_log(f"{name} 폴백 사용", level=logging.WARNING)
61
+ write_log_message(f"{name} 폴백 사용", level=logging.WARNING)
62
62
  return fb_val
63
63
  except Exception as e:
64
- _emit_log(f"{name} 폴백 실패: {e}", level=logging.ERROR)
64
+ write_log_message(f"{name} 폴백 실패: {e}", level=logging.ERROR)
65
65
  return None
66
66
 
67
67
 
@@ -161,7 +161,7 @@ async def record_event(todo: Dict[str, Any], data: Dict[str, Any], event_type: O
161
161
 
162
162
  resp = await _async_retry(_call, name="record_event", fallback=lambda: None)
163
163
  if resp is None:
164
- _emit_log("record_event 최종 실패(무시)", level=logging.WARNING)
164
+ write_log_message("record_event 최종 실패(무시)", level=logging.WARNING)
165
165
 
166
166
 
167
167
  # ------------------------------
@@ -349,7 +349,7 @@ async def fetch_tenant_mcp_config(tenant_id: str) -> Optional[Dict[str, Any]]:
349
349
  resp = await _async_retry(_call, name="fetch_tenant_mcp_config", fallback=lambda: None)
350
350
  return resp.data.get("mcp") if resp and resp.data else None
351
351
  except Exception as e:
352
- _emit_error("fetch_tenant_mcp_config 실패", e, raise_error=False)
352
+ handle_application_error("fetch_tenant_mcp_config 실패", e, raise_error=False)
353
353
  return None
354
354
 
355
355
 
@@ -395,14 +395,14 @@ def save_notification(
395
395
  try:
396
396
  # 대상 사용자가 없으면 작업 생략
397
397
  if not user_ids_csv:
398
- _emit_log(f"알림 저장 생략: 대상 사용자 없음 (user_ids_csv={user_ids_csv})")
398
+ write_log_message(f"알림 저장 생략: 대상 사용자 없음 (user_ids_csv={user_ids_csv})")
399
399
  return
400
400
 
401
401
  supabase = get_db_client()
402
402
 
403
403
  user_ids: List[str] = [uid.strip() for uid in user_ids_csv.split(',') if uid and uid.strip()]
404
404
  if not user_ids:
405
- _emit_log(f"알림 저장 생략: 유효한 사용자 ID 없음 (user_ids_csv={user_ids_csv})")
405
+ write_log_message(f"알림 저장 생략: 유효한 사용자 ID 없음 (user_ids_csv={user_ids_csv})")
406
406
  return
407
407
 
408
408
  rows: List[Dict[str, Any]] = []
@@ -421,10 +421,10 @@ def save_notification(
421
421
  )
422
422
 
423
423
  supabase.table("notifications").insert(rows).execute()
424
- _emit_log(f"알림 저장 완료: {len(rows)}건")
424
+ write_log_message(f"알림 저장 완료: {len(rows)}건")
425
425
  except Exception as e:
426
426
  # 알림 저장 실패는 치명적이지 않으므로 오류만 로깅
427
- _emit_error("알림저장오류", e, raise_error=False)
427
+ handle_application_error("알림저장오류", e, raise_error=False)
428
428
 
429
429
 
430
430
  def _is_valid_uuid(value: str) -> bool:
@@ -502,7 +502,7 @@ async def fetch_human_users_by_proc_inst_id(proc_inst_id: str) -> str:
502
502
  return ','.join(human_user_emails)
503
503
 
504
504
  except Exception as e:
505
- _emit_error("사용자조회오류", e, raise_error=False)
505
+ handle_application_error("사용자조회오류", e, raise_error=False)
506
506
  return ""
507
507
 
508
508
  return await asyncio.to_thread(_sync)
@@ -6,7 +6,7 @@ import asyncio
6
6
  from typing import Any, Tuple
7
7
 
8
8
  import openai
9
- from .logger import handle_error as _emit_error, log as _emit_log
9
+ from .logger import handle_application_error, write_log_message
10
10
 
11
11
 
12
12
  async def summarize_async(outputs: Any, feedbacks: Any, contents: Any = None) -> Tuple[str, str]:
@@ -24,12 +24,12 @@ async def summarize_async(outputs: Any, feedbacks: Any, contents: Any = None) ->
24
24
  feedback_summary = ""
25
25
 
26
26
  if outputs_str:
27
- _emit_log("요약 호출(이전결과물)")
27
+ write_log_message("요약 호출(이전결과물)")
28
28
  output_prompt = _create_output_summary_prompt(outputs_str)
29
29
  output_summary = await _call_openai_api_async(output_prompt, task_name="output")
30
30
 
31
31
  if feedbacks_str or contents_str:
32
- _emit_log("요약 호출(피드백)")
32
+ write_log_message("요약 호출(피드백)")
33
33
  feedback_prompt = _create_feedback_summary_prompt(feedbacks_str, contents_str)
34
34
  feedback_summary = await _call_openai_api_async(feedback_prompt, task_name="feedback")
35
35
 
@@ -113,10 +113,10 @@ async def _call_openai_api_async(prompt: str, task_name: str) -> str:
113
113
  raise
114
114
  except Exception as e:
115
115
  if attempt < 3:
116
- _emit_error("요약 호출 오류(재시도)", e, raise_error=False, extra={"attempt": attempt})
116
+ handle_application_error("요약 호출 오류(재시도)", e, raise_error=False, extra={"attempt": attempt})
117
117
  # 간단한 지수 백오프
118
118
  await asyncio.sleep(0.8 * (2 ** (attempt - 1)))
119
119
  continue
120
120
  # 최종 실패 시 빈 문자열로 폴백
121
- _emit_error("요약 호출 최종 실패", e, raise_error=False)
121
+ handle_application_error("요약 호출 최종 실패", e, raise_error=False)
122
122
  return ""
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "process-gpt-agent-sdk"
7
- version = "0.1.7"
7
+ version = "0.1.9"
8
8
  description = "Supabase 기반 이벤트/작업 폴링으로 A2A AgentExecutor를 실행하는 SDK"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"