AGENTS.md@apps/worker · diff
git:20261006.9ddd0d5 to git:20261015.c8ecbd8
1 added, 1 removed. Audit A to A.
# worker (cloud)
## Purpose
Cloud background worker. Processes jobs from a queue (pg-boss) — visibility sweeps, data syncs, and scheduled tasks. The cloud equivalent of the in-process job runner in `packages/canonry`.
## Key Files
| File | Role |
|------|------|
| `src/index.ts` | Entry point — connects to job queue and starts processing |
| `src/health-server.ts` | HTTP health check endpoint for container orchestration |
- | `src/audit-client.ts` | Describes the pinned audit package in the worker startup log; no worker audit execution path |
| `src/jobs/` | Job handler implementations |
## Patterns
- Jobs are dispatched by the API (via `packages/api-routes`) and consumed by this worker.
- Each job type has a handler in `src/jobs/`.
- The health server exposes a `/health` endpoint for liveness probes.
- Local equivalent is `packages/canonry/src/job-runner.ts` (in-process, no queue).
+ - Audit execution belongs to `packages/canonry`; this worker does not depend on the audit engine.
## See Also
- `packages/api-routes/` — dispatches jobs that this worker consumes
- `docs/architecture.md` — local vs. cloud process model