# agent-watcher Collector configuration # # Lives at: ~/.config/agent-watcher/collector.yaml # Override with --config or AGENT_WATCHER_CONFIG. # # At least one source (webhook OR drop_folder) must be configured. # This host's identity. Used in logs only; the inbox writer routes by # the recipient field on each event, not this. agent: foreman # Optional. Where to write .inbox files. Default shown. # inbox_dir: ~/Nyx/workspace/pings sources: # HTTP webhook source. # v1 binds loopback only — Caddy + bearer-token reverse-proxy is the # v2 upgrade path for accepting webhooks from external producers. webhook: listen: 127.0.0.1:18790 routes: # Path → which inbox to land in, with a Go text/template payload. # Variables come from the request body decoded as JSON. /forgejo/push: recipient: bob type: INFO payload_template: "forgejo push to {{ .repo }} by {{ .actor }}" # Empty-body posts work too — fixed-string templates render without # any data. /openrouter/billing-alert: recipient: bob type: NEEDS-RESPONSE priority: urgent payload_template: "billing alert: {{ .message }}" # Drop-folder source. # Watches a directory via inotify for *.json files matching the spec # §3.1.2 schema: # { # "recipient": "bob", # "type": "INFO" | "NEEDS-RESPONSE" | "ACK-REQUEST", # "priority": "normal" | "urgent", # optional # "payload": "...", # "sentinel": "/path/optional" # optional # } # Valid → emit + delete. Invalid → moved to .dead-letter/ with reason. drop_folder: path: ~/Nyx/workspace/incoming/ # Safety net if inotify misses an event. 0 (or unset) = use the # 30-second default. There is no "disable polling" option in v1 — # if you don't want polling, leave inotify to do its job and ignore # the cost (a periodic readdir is microseconds). poll_fallback_seconds: 30