process-gpt-agent-sdk 0.2.5__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.
- {process_gpt_agent_sdk-0.2.5.dist-info → process_gpt_agent_sdk-0.2.7.dist-info}/METADATA +1 -1
- {process_gpt_agent_sdk-0.2.5.dist-info → process_gpt_agent_sdk-0.2.7.dist-info}/RECORD +8 -8
- processgpt_agent_sdk/core/database.py +22 -8
- processgpt_agent_sdk/server.py +1 -0
- processgpt_agent_sdk/utils/event_handler.py +1 -1
- processgpt_agent_sdk/utils/summarizer.py +2 -2
- {process_gpt_agent_sdk-0.2.5.dist-info → process_gpt_agent_sdk-0.2.7.dist-info}/WHEEL +0 -0
- {process_gpt_agent_sdk-0.2.5.dist-info → process_gpt_agent_sdk-0.2.7.dist-info}/top_level.txt +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
processgpt_agent_sdk/__init__.py,sha256=IvAL5WBZhI83LYQogRP6-i04bxZkhmkgmES4FRQY888,185
|
|
2
|
-
processgpt_agent_sdk/server.py,sha256=
|
|
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=
|
|
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
|
|
@@ -9,10 +9,10 @@ processgpt_agent_sdk/tools/safe_tool_loader.py,sha256=18aT1M9FqCecu-JJvKxikYpl7n
|
|
|
9
9
|
processgpt_agent_sdk/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
10
|
processgpt_agent_sdk/utils/context_manager.py,sha256=efNUGxMMJi8Nxy5bOpfYAk2AIjgWoXS0tz6zkROZKrs,1804
|
|
11
11
|
processgpt_agent_sdk/utils/crewai_event_listener.py,sha256=MwIMtRjw7L1uV8QRvlNV1agxRzjL3hC5EYBQIsMX2XA,9155
|
|
12
|
-
processgpt_agent_sdk/utils/event_handler.py,sha256=
|
|
12
|
+
processgpt_agent_sdk/utils/event_handler.py,sha256=meyxMaiGH7VvKQJRhlHKRbWhSzxyEzoHGAEGVIxNocA,2879
|
|
13
13
|
processgpt_agent_sdk/utils/logger.py,sha256=d6Chvwx6qLAyirXRFg4bARzEovo1UYaRgLTaknHad9E,1271
|
|
14
|
-
processgpt_agent_sdk/utils/summarizer.py,sha256=
|
|
15
|
-
process_gpt_agent_sdk-0.2.
|
|
16
|
-
process_gpt_agent_sdk-0.2.
|
|
17
|
-
process_gpt_agent_sdk-0.2.
|
|
18
|
-
process_gpt_agent_sdk-0.2.
|
|
14
|
+
processgpt_agent_sdk/utils/summarizer.py,sha256=h2OBfVYq1JB0A2rLqSdYObEDlN54DzsHTmqnStis4XI,5743
|
|
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
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
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
|
|
127
|
+
if not resp:
|
|
114
128
|
return None
|
|
115
|
-
return resp
|
|
129
|
+
return resp
|
|
116
130
|
|
|
117
131
|
|
|
118
132
|
async def fetch_todo_by_id(todo_id: str) -> Optional[Dict[str, Any]]:
|
|
@@ -142,7 +156,7 @@ async def fetch_done_data(proc_inst_id: Optional[str]) -> List[Any]:
|
|
|
142
156
|
resp = await _async_retry(_call, name="fetch_done_data", fallback=lambda: None)
|
|
143
157
|
if not resp:
|
|
144
158
|
return []
|
|
145
|
-
return [row.get("output") for row in (resp.data or [])]
|
|
159
|
+
return [row.get("output") for row in (resp.data or []) if row.get("output")]
|
|
146
160
|
|
|
147
161
|
|
|
148
162
|
def fetch_human_response_sync(job_id: str) -> Optional[Dict[str, Any]]:
|
processgpt_agent_sdk/server.py
CHANGED
|
@@ -114,6 +114,7 @@ class ProcessGPTAgentServer:
|
|
|
114
114
|
"agent_list": agent_list or [],
|
|
115
115
|
"mcp_config": mcp_config,
|
|
116
116
|
"form_id": form_id,
|
|
117
|
+
"todo_id": str(task_record.get("id")),
|
|
117
118
|
"form_types": form_types or [],
|
|
118
119
|
"form_html": form_html or "",
|
|
119
120
|
"activity_name": str(task_record.get("activity_name", "")),
|
|
@@ -56,7 +56,7 @@ async def process_event_message(todo: Dict[str, Any], event: Event) -> None:
|
|
|
56
56
|
if evt_type == "output":
|
|
57
57
|
payload = data.get("data") or {}
|
|
58
58
|
is_final = bool(payload.get("final") or payload.get("is_final")) if isinstance(payload, dict) else False
|
|
59
|
-
content = payload.get("content") if isinstance(payload, dict) else payload
|
|
59
|
+
content = payload.get("content") or payload.get("data") if isinstance(payload, dict) else payload
|
|
60
60
|
await save_task_result(str(todo.get("id")), content, final=is_final)
|
|
61
61
|
return
|
|
62
62
|
|
|
@@ -24,12 +24,12 @@ async def summarize_async(outputs: Any, feedbacks: Any, contents: Any = None) ->
|
|
|
24
24
|
output_summary = ""
|
|
25
25
|
feedback_summary = ""
|
|
26
26
|
|
|
27
|
-
if outputs_str:
|
|
27
|
+
if outputs_str and outputs_str not in ("[]", "{}", "[{}]"):
|
|
28
28
|
write_log_message("요약 호출(이전결과물)")
|
|
29
29
|
output_prompt = _create_output_summary_prompt(outputs_str)
|
|
30
30
|
output_summary = await _call_openai_api_async(output_prompt, task_name="output")
|
|
31
31
|
|
|
32
|
-
if feedbacks_str
|
|
32
|
+
if feedbacks_str and feedbacks_str not in ("[]", "{}"):
|
|
33
33
|
write_log_message("요약 호출(피드백)")
|
|
34
34
|
feedback_prompt = _create_feedback_summary_prompt(feedbacks_str, contents_str)
|
|
35
35
|
feedback_summary = await _call_openai_api_async(feedback_prompt, task_name="feedback")
|
|
File without changes
|
{process_gpt_agent_sdk-0.2.5.dist-info → process_gpt_agent_sdk-0.2.7.dist-info}/top_level.txt
RENAMED
|
File without changes
|