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.
- {process_gpt_agent_sdk-0.1.7/process_gpt_agent_sdk.egg-info → process_gpt_agent_sdk-0.1.9}/PKG-INFO +1 -1
- {process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9/process_gpt_agent_sdk.egg-info}/PKG-INFO +1 -1
- {process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9}/processgpt_agent_sdk/core/database.py +12 -12
- {process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9}/processgpt_agent_sdk/utils/summarizer.py +5 -5
- {process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9}/pyproject.toml +1 -1
- {process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9}/MANIFEST.in +0 -0
- {process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9}/README.md +0 -0
- {process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9}/function.sql +0 -0
- {process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9}/process_gpt_agent_sdk.egg-info/SOURCES.txt +0 -0
- {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
- {process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9}/process_gpt_agent_sdk.egg-info/requires.txt +0 -0
- {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
- {process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9}/processgpt_agent_sdk/__init__.py +0 -0
- {process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9}/processgpt_agent_sdk/core/__init__.py +0 -0
- {process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9}/processgpt_agent_sdk/server.py +0 -0
- {process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9}/processgpt_agent_sdk/tools/__init__.py +0 -0
- {process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9}/processgpt_agent_sdk/tools/human_query_tool.py +0 -0
- {process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9}/processgpt_agent_sdk/tools/knowledge_tools.py +0 -0
- {process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9}/processgpt_agent_sdk/tools/safe_tool_loader.py +0 -0
- {process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9}/processgpt_agent_sdk/utils/__init__.py +0 -0
- {process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9}/processgpt_agent_sdk/utils/context_manager.py +0 -0
- {process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9}/processgpt_agent_sdk/utils/crewai_event_listener.py +0 -0
- {process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9}/processgpt_agent_sdk/utils/event_handler.py +0 -0
- {process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9}/processgpt_agent_sdk/utils/logger.py +0 -0
- {process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9}/setup.cfg +0 -0
{process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9}/processgpt_agent_sdk/core/database.py
RENAMED
|
@@ -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
|
|
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
|
-
|
|
55
|
+
write_log_message(f"{name} 재시도 {attempt}/{retries} (delay={delay:.2f}s): {e}", level=logging.WARNING)
|
|
56
56
|
await asyncio.sleep(delay)
|
|
57
|
-
|
|
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
|
-
|
|
61
|
+
write_log_message(f"{name} 폴백 사용", level=logging.WARNING)
|
|
62
62
|
return fb_val
|
|
63
63
|
except Exception as e:
|
|
64
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
424
|
+
write_log_message(f"알림 저장 완료: {len(rows)}건")
|
|
425
425
|
except Exception as e:
|
|
426
426
|
# 알림 저장 실패는 치명적이지 않으므로 오류만 로깅
|
|
427
|
-
|
|
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
|
-
|
|
505
|
+
handle_application_error("사용자조회오류", e, raise_error=False)
|
|
506
506
|
return ""
|
|
507
507
|
|
|
508
508
|
return await asyncio.to_thread(_sync)
|
{process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9}/processgpt_agent_sdk/utils/summarizer.py
RENAMED
|
@@ -6,7 +6,7 @@ import asyncio
|
|
|
6
6
|
from typing import Any, Tuple
|
|
7
7
|
|
|
8
8
|
import openai
|
|
9
|
-
from .logger import
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
121
|
+
handle_application_error("요약 호출 최종 실패", e, raise_error=False)
|
|
122
122
|
return ""
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9}/processgpt_agent_sdk/__init__.py
RENAMED
|
File without changes
|
{process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9}/processgpt_agent_sdk/core/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9}/processgpt_agent_sdk/tools/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9}/processgpt_agent_sdk/utils/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{process_gpt_agent_sdk-0.1.7 → process_gpt_agent_sdk-0.1.9}/processgpt_agent_sdk/utils/logger.py
RENAMED
|
File without changes
|
|
File without changes
|