docs: add n8n integration context
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
# 每日Github Trending项目计划新增
|
||||
|
||||
- Registry ID: `github-trending-discovery`
|
||||
- n8n Workflow ID: `hughGsWismCpk7jd`
|
||||
- Status: `external-upstream`
|
||||
- 角色: 抓取 GitHub Trending,筛出值得跟踪的新项目,并写入 discovery 任务队列。
|
||||
|
||||
## 触发方式
|
||||
|
||||
- 定时触发
|
||||
- 当前已核查行为:每日约 `01:00` 运行
|
||||
|
||||
## 外部输入
|
||||
|
||||
- [GitHub Trending](https://github.com/trending)
|
||||
- 页面抓取结果
|
||||
- AI 保留或丢弃判断
|
||||
|
||||
## 主流程
|
||||
|
||||
1. 抓取 GitHub Trending 页面,提取仓库 URL 和基础描述。
|
||||
2. 规范化候选项目数据。
|
||||
3. 调用 discovery 去重接口,判断当前候选是否已经存在。
|
||||
4. 使用 LLM 对候选项目做保留或丢弃判断。
|
||||
5. 把保留候选写入 discovery 任务队列。
|
||||
|
||||
## 输出结果
|
||||
|
||||
- `GitHub trending repository URL`
|
||||
- `tasks[].sourceUrl`
|
||||
- `tasks[].sourceType`
|
||||
- `dedupe shouldCreate`
|
||||
- `task creation result`
|
||||
|
||||
## 与仓库的关系
|
||||
|
||||
这条流程不直接写当前仓库数据库。它只生成“待分析任务”,真正的项目详情写入由 `项目分析入库(多源)` 完成。
|
||||
|
||||
最终影响到当前仓库的展示结果:
|
||||
|
||||
- [route.ts](D:/Code/AI/agent-park/src/app/api/projects/route.ts)
|
||||
- [route.ts](D:/Code/AI/agent-park/src/app/api/projects/[slug]/route.ts)
|
||||
|
||||
## 系统边界
|
||||
|
||||
当前仓库没有实现以下接口:
|
||||
|
||||
- `POST /api/discovery/check-duplicates`
|
||||
- `POST /api/discovery/tasks`
|
||||
|
||||
因此它是当前仓库的外部上游,而不是仓库内闭环的一部分。
|
||||
|
||||
## 已确认要点
|
||||
|
||||
- 已通过 live n8n MCP 核查 workflow 元数据与职责。
|
||||
- 该流程从 Trending 抓取候选,再由 AI 过滤,避免把纯噪声仓库直接入库。
|
||||
- 当前仓库只能看到最终被入库后的项目,不能独立重放这条发现链路。
|
||||
|
||||
## 维护要求
|
||||
|
||||
- Trending 抓取逻辑、筛选规则、入队字段变更时,同步更新 [registry.json](D:/Code/AI/agent-park/docs/integrations/n8n/registry.json)。
|
||||
- 若后续保留了 workflow 导出文件,应在 registry 中补上 `exportFile`。
|
||||
Reference in New Issue
Block a user