You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
658 B
Python
16 lines
658 B
Python
# backend/app/agents/tools/calendar_write.py
|
|
from .base import Tool, ToolResult
|
|
|
|
|
|
class CalendarWriteTool(Tool):
|
|
name = "calendar_write"
|
|
description = "여행/리서치 일정 → event(phase-8) 쓰기. (stub; phase-8 연동점)"
|
|
schema = {"type": "object", "properties": {"ev": {"type": "object"}}}
|
|
|
|
def __init__(self, session=None):
|
|
self.session = session
|
|
|
|
def run(self, ev: dict | None = None, **kw) -> ToolResult:
|
|
# stub: 결과만 기록(실제 event 쓰기는 routers.calendar.create_event_from_extract 사용 가능).
|
|
return ToolResult(ok=True, data={"written": False, "ev": ev or {}}, meta={"stub": True})
|