Files
wehub-resource-sync 7a0da7932b
OSV-Scanner (Scheduled) / scan-scheduled (push) Failing after 0s
Create Release / test-gate (push) Has been cancelled
Create Release / release-gate (push) Has been cancelled
Create Release / ci-gate (push) Has been cancelled
Create Release / version-check (push) Has been cancelled
Create Release / e2e-test-gate (push) Has been cancelled
Create Release / responsive-test-gate (push) Has been cancelled
Create Release / compat-test-gate (push) Has been cancelled
Create Release / compose-integration-gate (push) Has been cancelled
Create Release / vulture-gate (push) Has been cancelled
Create Release / build (push) Has been cancelled
Create Release / provenance (push) Has been cancelled
Create Release / prerelease-docker (push) Has been cancelled
Create Release / publish-docker (push) Has been cancelled
Create Release / create-release (push) Has been cancelled
Create Release / cleanup-changelog (push) Has been cancelled
Create Release / trigger-pypi (push) Has been cancelled
Create Release / monitor-pypi (push) Has been cancelled
Create Release / Clean up orphan prerelease tags and signatures (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [research-form] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [research-metrics] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [research-workflow] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [settings-core] (push) Has been cancelled
CodeQL Advanced / Analyze (javascript-typescript) (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [history-news] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [library] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [link-analytics] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [chat-core] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [chat-lifecycle] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [error-benchmark] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [settings-pages] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) (push) Has been cancelled
Docker Tests (Consolidated) / Accessibility Tests (push) Has been cancelled
Docker Tests (Consolidated) / LLM Unit Tests (push) Has been cancelled
Docker Tests (Consolidated) / LLM Example Tests (push) Has been cancelled
Docker Tests (Consolidated) / Production Image Smoke Test (push) Has been cancelled
Docker Tests (Consolidated) / Infrastructure Tests (push) Has been cancelled
OSSF Scorecard / OSSF Security Scorecard Analysis (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [mobile] (push) Has been cancelled
Backwards Compatibility / Verify Encryption Constants (push) Has been cancelled
Backwards Compatibility / PyPI Version Compatibility (push) Has been cancelled
Backwards Compatibility / Database Migration Tests (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Docker Tests (Consolidated) / detect-changes (push) Has been cancelled
Docker Tests (Consolidated) / Build Test Image (push) Has been cancelled
Docker Tests (Consolidated) / All Pytest Tests + Coverage (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [accessibility] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [api-crud] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [auth-login] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [auth-pages] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [auth-register] (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:08:55 +08:00

299 lines
7.4 KiB
Markdown

# News Subscriptions Guide
This guide covers the News Subscription system for automated research monitoring and news tracking.
## Table of Contents
- [Overview](#overview)
- [Creating Subscriptions](#creating-subscriptions)
- [Managing Subscriptions](#managing-subscriptions)
- [Update Frequency](#update-frequency)
- [Subscription History](#subscription-history)
- [Scheduler](#scheduler)
- [Notifications](#notifications)
- [API Reference](#api-reference)
---
## Overview
News Subscriptions allow you to:
- **Monitor topics** with automatic periodic research
- **Track search queries** as living news feeds
- **Get notifications** when new content is found
- **Organize subscriptions** into folders
Access subscriptions at: `http://localhost:5000/news/subscriptions`
### Subscription Types
| Type | Description | Use Case |
|------|-------------|----------|
| **Search** | Recurring search query | "AI regulations news" |
| **Topic** | Topic monitoring with evolution tracking | "Machine Learning" |
---
## Creating Subscriptions
### From the Web UI
1. Navigate to **News****Subscriptions**
2. Click **New Subscription**
3. Configure your subscription:
#### Basic Settings
| Field | Description |
|-------|-------------|
| **Query/Topic** | What to search for |
| **Name** | Friendly name (optional) |
| **Frequency** | How often to update |
| **Folder** | Organization folder (optional) |
#### Research Settings
| Field | Default | Description |
|-------|---------|-------------|
| Model Provider | OLLAMA | LLM provider to use |
| Model | (varies) | Specific model |
| Search Engine | (your default search tool) | Search engine to use |
| Iterations | 3 | Research depth |
| Questions per Iteration | 5 | Breadth per cycle |
| Strategy | source-based | Research approach |
#### Submit Options
- **Create & Run Now** - Save and immediately execute
- **Test Run** - Test configuration without saving
- **Create Subscription** - Save for scheduled execution
### From Research Results
When viewing research results, click **Subscribe** to create a subscription based on that query.
---
## Managing Subscriptions
### Dashboard Overview
The subscriptions dashboard shows:
| Metric | Description |
|--------|-------------|
| Total | All subscriptions |
| Active | Currently running |
| Paused | Temporarily stopped |
| Updates Today | Refreshes in last 24h |
### Subscription Actions
| Action | Description |
|--------|-------------|
| **Run Now** | Execute immediately |
| **Pause** | Stop scheduled updates |
| **Resume** | Restart paused subscription |
| **Edit** | Modify settings |
| **View History** | See past research runs |
| **Delete** | Remove subscription |
### Filtering & Search
- **Search** - Filter by name or query text
- **Status** - Show active, paused, or all
- **Frequency** - Filter by update interval
- **Folder** - Filter by organization folder
### Folders
Organize subscriptions into folders:
1. Click **Manage Folders**
2. Create folders with names
3. Assign subscriptions to folders
4. Filter view by folder
---
## Update Frequency
### Preset Intervals
| Frequency | Interval |
|-----------|----------|
| Hourly | 60 minutes |
| Every 3 hours | 180 minutes |
| Every 6 hours | 360 minutes |
| Every 12 hours | 720 minutes |
| Daily | 1440 minutes |
| Weekly | 10080 minutes |
### Custom Intervals
Set any interval between 1 hour and 30 days (in minutes).
### Jitter
A small random delay (up to 5 minutes) is added to prevent all subscriptions from running simultaneously.
---
## Subscription History
View the research history for any subscription:
1. Click on a subscription
2. Select **View History**
### History Details
| Field | Description |
|-------|-------------|
| **Research Title** | Query that was executed |
| **Timestamp** | When it ran |
| **Status** | Completed or failed |
| **Duration** | How long it took |
| **Topics** | Extracted topics |
Click on any research run to view full results.
---
## Scheduler
The scheduler runs subscriptions automatically in the background.
### Scheduler Status
The status bar shows:
- Whether scheduler is running
- Number of active jobs
- Whether your subscriptions are tracked
### Starting the Scheduler
The scheduler starts automatically when you log in. Your session remains active for 48 hours.
### Manual Control
- **Run Now** - Execute any subscription immediately
- **Pause** - Stop a subscription temporarily
- **Resume** - Restart a paused subscription
### Error Handling
If a subscription fails:
1. It retries with exponential backoff
2. After 10 consecutive failures, it's automatically disabled
3. You receive a notification about the error
4. You can manually resume it anytime
---
## Notifications
Get notified when subscriptions update or encounter errors.
### Notification Events
| Event | Description |
|-------|-------------|
| **subscription_update** | New content found |
| **subscription_error** | Update failed |
### Setup
Configure notifications in **Settings****Notifications**:
1. Add notification service URLs (Discord, Slack, Email, etc.)
2. Enable subscription notifications
3. Test your configuration
See [NOTIFICATIONS.md](NOTIFICATIONS.md) for supported services.
---
## API Reference
### Subscription Endpoints
| Endpoint | Method | Description |
|----------|--------|-------------|
| `/news/api/subscriptions` | GET | List all subscriptions |
| `/news/api/subscriptions` | POST | Create subscription |
| `/news/api/subscriptions/<id>` | GET | Get subscription details |
| `/news/api/subscriptions/<id>` | PUT | Update subscription |
| `/news/api/subscriptions/<id>` | DELETE | Delete subscription |
| `/news/api/subscriptions/<id>/history` | GET | Get subscription history |
### Folder Endpoints
| Endpoint | Method | Description |
|----------|--------|-------------|
| `/news/api/subscription/folders` | GET | List folders |
| `/news/api/subscription/folders` | POST | Create folder |
### Scheduler Endpoints
| Endpoint | Method | Description |
|----------|--------|-------------|
| `/news/api/scheduler/status` | GET | Get scheduler status |
| `/news/api/scheduler/start` | POST | Start scheduler |
### Example: Create Subscription
```python
import requests
response = requests.post(
"http://localhost:5000/news/api/subscriptions",
json={
"query": "AI safety news",
"name": "AI Safety Updates",
"refresh_minutes": 1440, # Daily
"model_provider": "ollama",
"search_engine": "searxng",
"iterations": 3
},
cookies={"session": your_session_cookie}
)
```
---
## Troubleshooting
### Subscription Not Updating
1. Check scheduler status (should be "Running")
2. Verify subscription is not paused
3. Check for errors in subscription history
4. Try "Run Now" to test manually
### Too Many Updates
- Increase the update frequency (e.g., daily instead of hourly)
- Pause subscriptions you don't need actively
### Missing Notifications
1. Verify notification service is configured
2. Test notification URL in settings
3. Check subscription notification events are enabled
### Scheduler Not Starting
- Log out and log back in
- Check browser console for errors
- Verify server is running
---
## See Also
- [NOTIFICATIONS.md](NOTIFICATIONS.md) - Notification service setup
- [Full Configuration Reference](CONFIGURATION.md) - All settings, defaults, and environment variables
- [API Quickstart](api-quickstart.md) - API authentication
- [Features](features.md) - Feature overview