[Feature]: 通用 Webhook 触发 LOOP,并向脚本节点传递请求

Abierto
#1,514 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
18/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
go, python, shell
Área
api, backend, ci-cd

Línea de trabajo

The payload names no source files. Start from the existing POST /api/runs path and the artifact handoff that gives script nodes files under .agentflow/inputs/, and check how the Run records its trigger source. Done means the three acceptance checkboxes hold: a valid JSON request starts a Run, duplicate event IDs create one Run, and sandbox and remote Runner scripts read the same archived body. The open questions on where entries are configured and which auth method ships first need a maintainer decision before coding.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Problem

LoopForge 已有手动、定时和 REST API 启动 LOOP 的方式。接入 CI、Git 托管或告警系统时,可以通过中转服务把事件转成 POST /api/runs 的参数。现有 input 主要用于运行说明和 Agent 上下文。Shell 和 Python 节点已经能处理业务数据,但还缺少一个稳定的文件入口来读取外部服务发来的原始请求。

Proposed behavior

为已发布的 LOOP 配置一个通用 Webhook。每个入口绑定项目、LOOP 和具备项目权限的执行身份。外部系统提交请求后,平台验证入口凭据、限制请求大小,按入口和事件 ID 去重,再通过现有执行路径创建 Run 并返回运行 ID。

原始请求体和用户选定的请求头随 Run 归档。建议复用现有产物存储和文件交接,让脚本在 .agentflow/inputs/ 下读取这些文件。本机沙箱和远程 Runner 使用同一套输入约定,节点重试时可以重新读取首次接收的请求。入口凭据用于接收时的认证,执行历史记录触发来源和事件 ID。

首版可用 CI 结果验证整个流程。CI 发送一份 JSON,Python 节点提取失败作业和日志链接并输出摘要,后续节点按现有方式读取摘要产物。Git 托管事件和告警数据可以通过相同的接口交给各自的脚本处理。

首版验收
  • 合法的 JSON 请求启动目标 LOOP 并返回运行 ID,执行历史显示触发来源。
  • 同一入口用相同事件 ID 重送时只创建一次 Run,认证失败的请求被拒绝。
  • 本机沙箱和远程 Runner 中的脚本能读取同一份原始请求体,节点重试沿用已归档的输入。
想听听社区的意见
  • 触发入口适合放在各 LOOP 的设置里,还是在项目设置中集中管理?
  • 首版以 JSON 和一种入口认证方式跑通,大家最需要接入的事件源和请求头有哪些?
Scope

Platform — workflows / collaboration

Alternatives considered

通过外部中转调用现有 REST API,可以满足单个固定场景。原生入口的价值是把接收、触发记录和可重放的原始输入留在同一个 Run 下,并用已有脚本节点处理业务规则。相关场景包括 GitLab 实时事件同步和脚本产物驱动的分支选择。 GitLab 集成需求 #1142 · 条件分支 PR #398

Checks
  • This proposal does not require organization-specific infrastructure or credentials.
  • I searched existing issues and discussions for similar proposals.
Lenguaje dominante
Go
Estrellas
6.1k
Forks
886
Merge medio
20 h 10 min
PR fusionados (30 d)
274

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Tencent/LoopForge

Todos los issues de Tencent/LoopForge

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.