feat: 新增前沿信号聚合页面与Webhook入库能力

This commit is contained in:
2026-02-24 09:38:29 +08:00
parent 4e30ddefc5
commit f157174341
12 changed files with 1560 additions and 1 deletions
+2
View File
@@ -19,6 +19,7 @@ docs/
├── n8n/ # n8n workflow documentation
│ ├── historical-workflow-design.md
│ ├── incremental-workflow-design.md
│ ├── frontier-signals-workflow.md
│ ├── tag-janitor-workflow.json
│ ├── project-tag-reset-workflow.json
│ ├── project-tag-reset-workflow.md
@@ -45,6 +46,7 @@ docs/
| `discovery-workflow.md` | Project discovery architecture |
| `plans/*.md` | Feature design & implementation specs |
| `n8n/*.md` | n8n workflow design docs |
| `n8n/frontier-signals-workflow.md` | Multi-source frontier signals ingestion workflow (AI Agent filter) |
| `n8n/project-tag-reset-workflow.json` | Project tag reset workflow (multi-AI category classification) |
## FOR AI AGENTS
+79
View File
@@ -0,0 +1,79 @@
# Frontier Signals Workflow
## Goal
Aggregate frontier discussions from multiple platforms, keep only **AI Agent-related** signals via AI filtering, and ingest into `POST /api/webhook/signals`.
## Workflow
- Workflow name: `前沿信号聚合(多源+AI Agent过滤)`
- Workflow ID: `bAxNZKGq2ApUUiw9`
- Status: `active`
- Trigger: every 4 hours (`Schedule Trigger`)
- Activated at: `2026-02-23`
## Source Research (Endpoints + Extracted Elements)
| Source | Endpoint | Node Type | Extracted Elements |
| --- | --- | --- | --- |
| Hacker News | `https://hacker-news.firebaseio.com/v0/topstories.json` + `.../item/{id}.json` | HTTP Request | `title`, `url`, `text`, `score`, `descendants`, `time` |
| GitHub | `https://api.github.com/search/repositories` | HTTP Request | `full_name`, `html_url`, `description`, `topics`, `stargazers_count`, `pushed_at` |
| arXiv | `https://export.arxiv.org/api/query?...` | RSS Read | `title`, `link`, `content/contentSnippet`, `pubDate/isoDate`, `categories` |
| Reddit | `https://www.reddit.com/r/LocalLLaMA/new.json?limit=40` | HTTP Request | `title`, `permalink`, `selftext/url`, `ups`, `num_comments`, `created_utc` |
| Product Hunt | `https://www.producthunt.com/feed` | RSS Read | `title`, `link`, `content/contentSnippet`, `published/updated` |
| Hugging Face | `https://huggingface.co/blog/feed.xml` | RSS Read | `title`, `link`, `content/contentSnippet`, `published/updated` |
## Why These Nodes
- `Schedule Trigger`: periodic ingestion
- `HTTP Request` / `RSS Read`: source fetching with stable machine-readable endpoints
- `Code`: per-source normalization and schema-safe cleanup
- `Merge (append)`: multi-source union
- `Remove Duplicates`: `source + sourceUrl` dedupe before/after AI
- `Limit`: cap candidate volume before AI
- `LLM Chain + Structured Output Parser`: relevance filtering + structured sections
- `If`: keep only `shouldKeep=true`
- `HTTP Request` (POST): write to `/api/webhook/signals`
## Target Contract Mapping
The workflow emits payload compatible with `SignalWebhookPayloadSchema`:
- `apiKey`: from `$env.WEBHOOK_API_KEY`
- `signals[]`:
- `source` -> one of:
- `hacker_news`
- `github`
- `arxiv`
- `hugging_face`
- `reddit`
- `product_hunt`
- `sourceUrl`, `title`, `summary`, `topic`, `tags`, `sections`, `engagement`, `publishedAt`, `isActive`
Sections are constrained to:
- style: `focus | debate | evidence | action | risk`
- max 6 sections, max 6 items per section
## AI Filtering Policy
The AI node does **not** score ideas by novelty/reliability/feasibility.
It only decides whether a signal is about AI Agent topics and then structures content for reading efficiency.
- Keep (`shouldKeep=true`) if discussion is materially agent-related
- Drop (`shouldKeep=false`) if clearly unrelated to AI Agent
- Ambiguous cases bias to keep
## Manual Configuration (No Env)
This workflow is intentionally configured without `$env` usage.
- Node `构建 Webhook Payload`:
- set `apiKey` to your real webhook key (replace placeholder string)
- Node `发送到 Signals Webhook`:
- set the target URL to your actual API base (current default is `https://agentpark.fun/api/webhook/signals`)
## Notes
- Reddit source uses JSON API with explicit `User-Agent` headers to reduce 403 blocking risk.
- `n8n_test_workflow` cannot trigger schedule-only workflows via API; runtime verification should be done by waiting for scheduled execution or manual run in n8n UI.