langchain-trigger-server 0.2.5__tar.gz → 0.2.6rc2__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 langchain-trigger-server might be problematic. Click here for more details.
- {langchain_trigger_server-0.2.5 → langchain_trigger_server-0.2.6rc2}/PKG-INFO +1 -1
- {langchain_trigger_server-0.2.5 → langchain_trigger_server-0.2.6rc2}/langchain_triggers/app.py +11 -11
- {langchain_trigger_server-0.2.5 → langchain_trigger_server-0.2.6rc2}/langchain_triggers/triggers/cron_trigger.py +2 -2
- {langchain_trigger_server-0.2.5 → langchain_trigger_server-0.2.6rc2}/pyproject.toml +1 -1
- {langchain_trigger_server-0.2.5 → langchain_trigger_server-0.2.6rc2}/.github/workflows/release.yml +0 -0
- {langchain_trigger_server-0.2.5 → langchain_trigger_server-0.2.6rc2}/.vscode/settings.json +0 -0
- {langchain_trigger_server-0.2.5 → langchain_trigger_server-0.2.6rc2}/README.md +0 -0
- {langchain_trigger_server-0.2.5 → langchain_trigger_server-0.2.6rc2}/langchain_triggers/__init__.py +0 -0
- {langchain_trigger_server-0.2.5 → langchain_trigger_server-0.2.6rc2}/langchain_triggers/core.py +0 -0
- {langchain_trigger_server-0.2.5 → langchain_trigger_server-0.2.6rc2}/langchain_triggers/cron_manager.py +0 -0
- {langchain_trigger_server-0.2.5 → langchain_trigger_server-0.2.6rc2}/langchain_triggers/database/__init__.py +0 -0
- {langchain_trigger_server-0.2.5 → langchain_trigger_server-0.2.6rc2}/langchain_triggers/database/interface.py +0 -0
- {langchain_trigger_server-0.2.5 → langchain_trigger_server-0.2.6rc2}/langchain_triggers/database/supabase.py +0 -0
- {langchain_trigger_server-0.2.5 → langchain_trigger_server-0.2.6rc2}/langchain_triggers/decorators.py +0 -0
- {langchain_trigger_server-0.2.5 → langchain_trigger_server-0.2.6rc2}/langchain_triggers/triggers/__init__.py +0 -0
- {langchain_trigger_server-0.2.5 → langchain_trigger_server-0.2.6rc2}/test_framework.py +0 -0
- {langchain_trigger_server-0.2.5 → langchain_trigger_server-0.2.6rc2}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: langchain-trigger-server
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.6rc2
|
|
4
4
|
Summary: Generic event-driven triggers framework
|
|
5
5
|
Project-URL: Homepage, https://github.com/langchain-ai/open-agent-platform
|
|
6
6
|
Project-URL: Repository, https://github.com/langchain-ai/open-agent-platform
|
{langchain_trigger_server-0.2.5 → langchain_trigger_server-0.2.6rc2}/langchain_triggers/app.py
RENAMED
|
@@ -29,7 +29,7 @@ class AuthenticationMiddleware(BaseHTTPMiddleware):
|
|
|
29
29
|
|
|
30
30
|
async def dispatch(self, request: Request, call_next):
|
|
31
31
|
# Skip auth for webhooks, health/root endpoints, and OPTIONS requests
|
|
32
|
-
if (request.url.path.startswith("/webhooks/") or
|
|
32
|
+
if (request.url.path.startswith("/v1/triggers/webhooks/") or
|
|
33
33
|
request.url.path in ["/", "/health"] or
|
|
34
34
|
request.method == "OPTIONS"):
|
|
35
35
|
return await call_next(request)
|
|
@@ -174,7 +174,7 @@ class TriggerServer:
|
|
|
174
174
|
async def handler_endpoint(request: Request) -> Dict[str, Any]:
|
|
175
175
|
return await self._handle_request(trigger, request)
|
|
176
176
|
|
|
177
|
-
handler_path = f"/webhooks/{trigger.id}"
|
|
177
|
+
handler_path = f"/v1/triggers/webhooks/{trigger.id}"
|
|
178
178
|
self.app.post(handler_path)(handler_endpoint)
|
|
179
179
|
logger.info(f"Added handler route: POST {handler_path}")
|
|
180
180
|
|
|
@@ -213,7 +213,7 @@ class TriggerServer:
|
|
|
213
213
|
async def health() -> Dict[str, str]:
|
|
214
214
|
return {"status": "healthy"}
|
|
215
215
|
|
|
216
|
-
@self.app.get("/
|
|
216
|
+
@self.app.get("/v1/triggers")
|
|
217
217
|
async def api_list_triggers() -> Dict[str, Any]:
|
|
218
218
|
"""List available trigger templates."""
|
|
219
219
|
templates = await self.database.get_trigger_templates()
|
|
@@ -224,7 +224,7 @@ class TriggerServer:
|
|
|
224
224
|
"provider": template["provider"],
|
|
225
225
|
"displayName": template["name"],
|
|
226
226
|
"description": template["description"],
|
|
227
|
-
"path": "/
|
|
227
|
+
"path": "/v1/triggers/registrations",
|
|
228
228
|
"method": "POST",
|
|
229
229
|
"payloadSchema": template.get("registration_schema", {}),
|
|
230
230
|
})
|
|
@@ -234,7 +234,7 @@ class TriggerServer:
|
|
|
234
234
|
"data": trigger_list
|
|
235
235
|
}
|
|
236
236
|
|
|
237
|
-
@self.app.get("/
|
|
237
|
+
@self.app.get("/v1/triggers/registrations")
|
|
238
238
|
async def api_list_registrations(current_user: Dict[str, Any] = Depends(get_current_user)) -> Dict[str, Any]:
|
|
239
239
|
"""List user's trigger registrations (user-scoped)."""
|
|
240
240
|
try:
|
|
@@ -266,7 +266,7 @@ class TriggerServer:
|
|
|
266
266
|
logger.error(f"Error listing registrations: {e}")
|
|
267
267
|
raise HTTPException(status_code=500, detail=str(e))
|
|
268
268
|
|
|
269
|
-
@self.app.post("/
|
|
269
|
+
@self.app.post("/v1/triggers/registrations")
|
|
270
270
|
async def api_create_registration(request: Request, current_user: Dict[str, Any] = Depends(get_current_user)) -> Dict[str, Any]:
|
|
271
271
|
"""Create a new trigger registration."""
|
|
272
272
|
try:
|
|
@@ -345,14 +345,14 @@ class TriggerServer:
|
|
|
345
345
|
logger.exception(f"Error creating trigger registration: {e}")
|
|
346
346
|
raise HTTPException(status_code=500, detail=str(e))
|
|
347
347
|
|
|
348
|
-
@self.app.get("/
|
|
348
|
+
@self.app.get("/v1/triggers/registrations/{registration_id}/agents")
|
|
349
349
|
async def api_list_registration_agents(registration_id: str, current_user: Dict[str, Any] = Depends(get_current_user)) -> Dict[str, Any]:
|
|
350
350
|
"""List agents linked to this registration."""
|
|
351
351
|
try:
|
|
352
352
|
user_id = current_user["identity"]
|
|
353
353
|
|
|
354
354
|
# Get the specific trigger registration
|
|
355
|
-
trigger = await self.database.
|
|
355
|
+
trigger = await self.database.get_trigger_registration(registration_id, user_id)
|
|
356
356
|
if not trigger:
|
|
357
357
|
raise HTTPException(status_code=404, detail="Trigger registration not found or access denied")
|
|
358
358
|
|
|
@@ -368,7 +368,7 @@ class TriggerServer:
|
|
|
368
368
|
logger.error(f"Error getting registration agents: {e}")
|
|
369
369
|
raise HTTPException(status_code=500, detail=str(e))
|
|
370
370
|
|
|
371
|
-
@self.app.post("/
|
|
371
|
+
@self.app.post("/v1/triggers/registrations/{registration_id}/agents/{agent_id}")
|
|
372
372
|
async def api_add_agent_to_trigger(registration_id: str, agent_id: str, request: Request, current_user: Dict[str, Any] = Depends(get_current_user)) -> Dict[str, Any]:
|
|
373
373
|
"""Add an agent to a trigger registration."""
|
|
374
374
|
try:
|
|
@@ -412,7 +412,7 @@ class TriggerServer:
|
|
|
412
412
|
logger.error(f"Error linking agent to trigger: {e}")
|
|
413
413
|
raise HTTPException(status_code=500, detail=str(e))
|
|
414
414
|
|
|
415
|
-
@self.app.delete("/
|
|
415
|
+
@self.app.delete("/v1/triggers/registrations/{registration_id}/agents/{agent_id}")
|
|
416
416
|
async def api_remove_agent_from_trigger(registration_id: str, agent_id: str, current_user: Dict[str, Any] = Depends(get_current_user)) -> Dict[str, Any]:
|
|
417
417
|
"""Remove an agent from a trigger registration."""
|
|
418
418
|
try:
|
|
@@ -447,7 +447,7 @@ class TriggerServer:
|
|
|
447
447
|
logger.error(f"Error unlinking agent from trigger: {e}")
|
|
448
448
|
raise HTTPException(status_code=500, detail=str(e))
|
|
449
449
|
|
|
450
|
-
@self.app.post("/
|
|
450
|
+
@self.app.post("/v1/triggers/registrations/{registration_id}/execute")
|
|
451
451
|
async def api_execute_trigger_now(registration_id: str, current_user: Dict[str, Any] = Depends(get_current_user)) -> Dict[str, Any]:
|
|
452
452
|
"""Manually execute a cron trigger registration immediately."""
|
|
453
453
|
try:
|
|
@@ -17,8 +17,8 @@ from langchain_triggers.decorators import TriggerTemplate
|
|
|
17
17
|
|
|
18
18
|
logger = logging.getLogger(__name__)
|
|
19
19
|
|
|
20
|
-
# Global constant for cron trigger ID
|
|
21
|
-
CRON_TRIGGER_ID = "
|
|
20
|
+
# Global constant for cron trigger ID (UUID format to match database schema)
|
|
21
|
+
CRON_TRIGGER_ID = "c809e66e-0000-4000-8000-000000000001"
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
class CronRegistration(TriggerRegistrationModel):
|
{langchain_trigger_server-0.2.5 → langchain_trigger_server-0.2.6rc2}/.github/workflows/release.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{langchain_trigger_server-0.2.5 → langchain_trigger_server-0.2.6rc2}/langchain_triggers/__init__.py
RENAMED
|
File without changes
|
{langchain_trigger_server-0.2.5 → langchain_trigger_server-0.2.6rc2}/langchain_triggers/core.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|