How hamzatekin/pergent works
pergent runs configured research tasks through a headless Claude agent, archives each run and presents the resulting morning paper in a web reader. The main workflow is task configuration → run preparation and fetching → agent-generated paper → optional rating → persisted run → rendered reading view; scheduling and an authenticated admin dashboard support that workflow. README capabilities also include manual runs, cost/log inspection, preview images, and an installable offline-capable reader. Some source excerpts are partial, so uncertain internal call links are omitted; documented fetch and optional rating integrations are shown separately.
Main entry points: runner.ts Task runner · server.ts HTTP server · scheduler.ts Cron scheduler · admin.ts Admin dashboard
Components 18
Task inputs
- Task prompts and config
tasks - Input fetchers
scripts
Run execution
- Task runner
src/runner.ts - Cron scheduler
src/scheduler.ts - Story rating
src/rate.ts - Preview images
src/images.ts
Run history
- SQLite run index
src/db.ts - Run archive files
Reader and admin
- Paper parser and renderer
src/paper.ts - HTTP server
src/server.ts - Admin dashboard
src/admin.ts - Reader browser app
web/app.js - Offline app shell
web/public/sw.js
Other components
- Reader
- Task operator
- Research sources
- Claude subscription
- TypeSafe Jev
Connections 23
- Task operator → Task runner: starts task
- Task operator → HTTP server: opens dashboard
- Reader → HTTP server: requests paper
- Task prompts and config → Task runner: configures run
- Task runner → Input fetchers: runs fetch scripts
- Input fetchers → Research sources: fetches inputs
- Task runner → Claude subscription: executes prompt
- Task runner → Run archive files: writes run files
- Task runner → SQLite run index: saves run index
- Task runner → Story rating: rates paper
- Story rating → TypeSafe Jev: requests scores
- Task runner → Preview images: adds previews
- Cron scheduler → Task runner: starts scheduled runs
- Cron scheduler → Task prompts and config: reads schedules
- Cron scheduler → SQLite run index: reads and writes state
- HTTP server → Task runner: loads tasks and runs
- HTTP server → SQLite run index: records read state
- HTTP server → Paper parser and renderer: renders paper
- HTTP server → Admin dashboard: mounts dashboard
- Admin dashboard → Task runner: starts and inspects runs
- Admin dashboard → Run archive files: reads logs
- Reader browser app → HTTP server: marks paper read
- Reader browser app → Offline app shell: registers worker