process-gpt-agent-sdk 0.2.6__tar.gz → 0.2.8__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.2.6/process_gpt_agent_sdk.egg-info → process_gpt_agent_sdk-0.2.8}/PKG-INFO +1 -1
  2. {process_gpt_agent_sdk-0.2.6 → process_gpt_agent_sdk-0.2.8}/function.sql +105 -0
  3. {process_gpt_agent_sdk-0.2.6 → process_gpt_agent_sdk-0.2.8/process_gpt_agent_sdk.egg-info}/PKG-INFO +1 -1
  4. {process_gpt_agent_sdk-0.2.6 → process_gpt_agent_sdk-0.2.8}/processgpt_agent_sdk/core/database.py +20 -7
  5. {process_gpt_agent_sdk-0.2.6 → process_gpt_agent_sdk-0.2.8}/pyproject.toml +1 -1
  6. {process_gpt_agent_sdk-0.2.6 → process_gpt_agent_sdk-0.2.8}/MANIFEST.in +0 -0
  7. {process_gpt_agent_sdk-0.2.6 → process_gpt_agent_sdk-0.2.8}/README.md +0 -0
  8. {process_gpt_agent_sdk-0.2.6 → process_gpt_agent_sdk-0.2.8}/process_gpt_agent_sdk.egg-info/SOURCES.txt +0 -0
  9. {process_gpt_agent_sdk-0.2.6 → process_gpt_agent_sdk-0.2.8}/process_gpt_agent_sdk.egg-info/dependency_links.txt +0 -0
  10. {process_gpt_agent_sdk-0.2.6 → process_gpt_agent_sdk-0.2.8}/process_gpt_agent_sdk.egg-info/requires.txt +0 -0
  11. {process_gpt_agent_sdk-0.2.6 → process_gpt_agent_sdk-0.2.8}/process_gpt_agent_sdk.egg-info/top_level.txt +0 -0
  12. {process_gpt_agent_sdk-0.2.6 → process_gpt_agent_sdk-0.2.8}/processgpt_agent_sdk/__init__.py +0 -0
  13. {process_gpt_agent_sdk-0.2.6 → process_gpt_agent_sdk-0.2.8}/processgpt_agent_sdk/core/__init__.py +0 -0
  14. {process_gpt_agent_sdk-0.2.6 → process_gpt_agent_sdk-0.2.8}/processgpt_agent_sdk/server.py +0 -0
  15. {process_gpt_agent_sdk-0.2.6 → process_gpt_agent_sdk-0.2.8}/processgpt_agent_sdk/tools/__init__.py +0 -0
  16. {process_gpt_agent_sdk-0.2.6 → process_gpt_agent_sdk-0.2.8}/processgpt_agent_sdk/tools/human_query_tool.py +0 -0
  17. {process_gpt_agent_sdk-0.2.6 → process_gpt_agent_sdk-0.2.8}/processgpt_agent_sdk/tools/knowledge_tools.py +0 -0
  18. {process_gpt_agent_sdk-0.2.6 → process_gpt_agent_sdk-0.2.8}/processgpt_agent_sdk/tools/safe_tool_loader.py +0 -0
  19. {process_gpt_agent_sdk-0.2.6 → process_gpt_agent_sdk-0.2.8}/processgpt_agent_sdk/utils/__init__.py +0 -0
  20. {process_gpt_agent_sdk-0.2.6 → process_gpt_agent_sdk-0.2.8}/processgpt_agent_sdk/utils/context_manager.py +0 -0
  21. {process_gpt_agent_sdk-0.2.6 → process_gpt_agent_sdk-0.2.8}/processgpt_agent_sdk/utils/crewai_event_listener.py +0 -0
  22. {process_gpt_agent_sdk-0.2.6 → process_gpt_agent_sdk-0.2.8}/processgpt_agent_sdk/utils/event_handler.py +0 -0
  23. {process_gpt_agent_sdk-0.2.6 → process_gpt_agent_sdk-0.2.8}/processgpt_agent_sdk/utils/logger.py +0 -0
  24. {process_gpt_agent_sdk-0.2.6 → process_gpt_agent_sdk-0.2.8}/processgpt_agent_sdk/utils/summarizer.py +0 -0
  25. {process_gpt_agent_sdk-0.2.6 → process_gpt_agent_sdk-0.2.8}/setup.cfg +0 -0
@@ -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.8
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
@@ -100,6 +100,110 @@ BEGIN
100
100
  END;
101
101
  $$ LANGUAGE plpgsql VOLATILE;
102
102
 
103
+ DROP FUNCTION IF EXISTS public.fetch_pending_task_dev(text, text, integer, text);
104
+
105
+ CREATE OR REPLACE FUNCTION public.fetch_pending_task_dev(
106
+ p_agent_orch text,
107
+ p_consumer text,
108
+ p_limit integer,
109
+ p_tenant_id text
110
+ )
111
+ RETURNS TABLE (
112
+ id uuid,
113
+ user_id text,
114
+ proc_inst_id text,
115
+ proc_def_id text,
116
+ activity_id text,
117
+ activity_name text,
118
+ start_date timestamp without time zone,
119
+ end_date timestamp without time zone,
120
+ description text,
121
+ tool text,
122
+ due_date timestamp without time zone,
123
+ tenant_id text,
124
+ reference_ids text[],
125
+ adhoc boolean,
126
+ assignees jsonb,
127
+ duration integer,
128
+ output jsonb,
129
+ retry integer,
130
+ consumer text,
131
+ log text,
132
+ draft jsonb,
133
+ project_id uuid,
134
+ feedback jsonb,
135
+ updated_at timestamp with time zone,
136
+ username text,
137
+ status public.todo_status,
138
+ agent_mode public.agent_mode,
139
+ agent_orch public.agent_orch,
140
+ temp_feedback text,
141
+ draft_status public.draft_status,
142
+ task_type public.draft_status
143
+ )
144
+ AS $$
145
+ BEGIN
146
+ RETURN QUERY
147
+ WITH cte AS (
148
+ SELECT
149
+ t.*,
150
+ t.draft_status AS task_type
151
+ FROM todolist AS t
152
+ WHERE t.status = 'IN_PROGRESS'
153
+ AND t.tenant_id = p_tenant_id
154
+ AND (p_agent_orch IS NULL OR p_agent_orch = '' OR t.agent_orch::text = p_agent_orch)
155
+ AND (
156
+ (t.agent_mode IN ('DRAFT','COMPLETE') AND t.draft IS NULL AND t.draft_status IS NULL)
157
+ OR t.draft_status = 'FB_REQUESTED'
158
+ )
159
+ ORDER BY t.start_date
160
+ LIMIT p_limit
161
+ FOR UPDATE SKIP LOCKED
162
+ ),
163
+ upd AS (
164
+ UPDATE todolist AS t
165
+ SET draft_status = 'STARTED',
166
+ consumer = p_consumer
167
+ FROM cte
168
+ WHERE t.id = cte.id
169
+ RETURNING
170
+ t.id,
171
+ t.user_id,
172
+ t.proc_inst_id,
173
+ t.proc_def_id,
174
+ t.activity_id,
175
+ t.activity_name,
176
+ t.start_date,
177
+ t.end_date,
178
+ t.description,
179
+ t.tool,
180
+ t.due_date,
181
+ t.tenant_id,
182
+ t.reference_ids,
183
+ t.adhoc,
184
+ t.assignees,
185
+ t.duration,
186
+ t.output,
187
+ t.retry,
188
+ t.consumer,
189
+ t.log,
190
+ t.draft,
191
+ t.project_id,
192
+ t.feedback,
193
+ t.updated_at,
194
+ t.username,
195
+ t.status,
196
+ t.agent_mode,
197
+ t.agent_orch,
198
+ t.temp_feedback,
199
+ t.draft_status,
200
+ cte.task_type
201
+ )
202
+ SELECT * FROM upd;
203
+ END;
204
+ $$ LANGUAGE plpgsql VOLATILE;
205
+
206
+
103
207
 
104
208
  -- 2) 완료된 데이터(output/feedback) 조회
105
209
  DROP FUNCTION IF EXISTS public.fetch_done_data(text);
@@ -160,5 +264,6 @@ $$ LANGUAGE plpgsql VOLATILE;
160
264
 
161
265
  -- 익명(anon) 역할에 실행 권한 부여
162
266
  GRANT EXECUTE ON FUNCTION public.fetch_pending_task(text, text, integer) TO anon;
267
+ GRANT EXECUTE ON FUNCTION public.fetch_pending_task_dev(text, text, integer, text) TO anon;
163
268
  GRANT EXECUTE ON FUNCTION public.fetch_done_data(text) TO anon;
164
269
  GRANT EXECUTE ON FUNCTION public.save_task_result(uuid, jsonb, boolean) TO anon;
@@ -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.8
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
@@ -103,16 +103,29 @@ 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
+ env = (os.getenv("ENV") or "").lower()
108
+
109
+ if env == "dev":
110
+ # 개발 환경: 특정 테넌트(uengine)만 폴링
111
+ resp = supabase.rpc(
112
+ "fetch_pending_task_dev",
113
+ {"p_agent_orch": agent_orch, "p_limit": 1, "p_consumer": consumer, "p_tenant_id": "uengine"},
114
+ ).execute()
115
+ else:
116
+ # 운영/기타 환경: 기존 로직 유지
117
+ resp = supabase.rpc(
118
+ "fetch_pending_task",
119
+ {"p_agent_orch": agent_orch, "p_limit": 1, "p_consumer": consumer},
120
+ ).execute()
121
+
122
+ rows = resp.data or []
123
+ return rows[0] if rows else None
111
124
 
112
125
  resp = await _async_retry(_call, name="polling_pending_todos", fallback=lambda: None)
113
- if not resp or not resp.data:
126
+ if not resp:
114
127
  return None
115
- return resp.data[0]
128
+ return resp
116
129
 
117
130
 
118
131
  async def fetch_todo_by_id(todo_id: str) -> Optional[Dict[str, Any]]:
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "process-gpt-agent-sdk"
7
- version = "0.2.6"
7
+ version = "0.2.8"
8
8
  description = "Supabase 기반 이벤트/작업 폴링으로 A2A AgentExecutor를 실행하는 SDK"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"