mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-31 19:45:15 +02:00
feat(automations): wire agent_task to multi_agent_chat with auto-approve loop
This commit is contained in:
parent
7ec3468113
commit
ce45e11009
9 changed files with 285 additions and 31 deletions
|
|
@ -2,31 +2,18 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from app.automations.actions.agent_task import build_handler
|
||||
from app.automations.schemas.actions import AgentTaskActionParams
|
||||
|
||||
from .store import register_action
|
||||
from .types import ActionContext, ActionDefinition, ActionHandler
|
||||
|
||||
|
||||
def _build_handler(ctx: ActionContext) -> ActionHandler:
|
||||
"""Bind run/session context to the agent_task handler. Real wiring lands in Phase 4b."""
|
||||
del ctx # ignored by the stub; real handler will consume it
|
||||
|
||||
async def handle(params: dict[str, Any]) -> dict[str, Any]:
|
||||
AgentTaskActionParams.model_validate(params)
|
||||
return {"status": "stubbed"}
|
||||
|
||||
return handle
|
||||
|
||||
from .types import ActionDefinition
|
||||
|
||||
AGENT_TASK_ACTION = ActionDefinition(
|
||||
type="agent_task",
|
||||
name="Agent task",
|
||||
description="Run an agent task with a scoped tool allowlist.",
|
||||
description="Run a multi_agent_chat turn from an automation step.",
|
||||
params_schema=AgentTaskActionParams.model_json_schema(),
|
||||
build_handler=_build_handler,
|
||||
build_handler=build_handler,
|
||||
)
|
||||
|
||||
register_action(AGENT_TASK_ACTION)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue