No description
Find a file
bob-boat 2183850c03 Collector milestone 4: config loader + main wiring (binary builds)
internal/config loads ~/.config/agent-watcher/collector.yaml with strict
validation (KnownFields=true, so typos fail loud), applies sensible
defaults, and expands ~/ in path fields. Either source can be omitted
but at least one must be configured.

cmd/agent-watcher is the entry point: load config, build inbox.Writer,
build configured sources, run them concurrently with a shared Emit
closure, wait for SIGINT/SIGTERM, shut down. Logs to stderr — text by
default, JSON via --json-log for journald structured fields per spec
§3.4.

SIGHUP reload is a v2 item; for now restart the systemd unit to pick
up config changes.

10 config tests passing — full happy path, defaults applied, ~/
expansion, and a table of 9 invalid configs that must all reject
(missing agent, no sources, empty webhook routes, route missing
recipient/type/template, route path without leading /, unknown
top-level field, negative poll seconds).

Binary builds clean: 10.8M single static binary on Linux/amd64.
go.mod stays at Go 1.22 to match VPS toolchain.

Total: 41 tests across 4 packages, all passing. Build clean. go vet
clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-06 16:22:03 -04:00
cmd/agent-watcher Collector milestone 4: config loader + main wiring (binary builds) 2026-05-06 16:22:03 -04:00
docs/channels Add Channels reference docs snapshot for Layer 2 implementation 2026-05-06 16:04:32 -04:00
internal Collector milestone 4: config loader + main wiring (binary builds) 2026-05-06 16:22:03 -04:00
spec Initial: README, spec/agent-watcher.md v1 (signed off by Bob 2026-05-06), .gitignore 2026-05-06 14:36:45 -04:00
.gitignore Initial: README, spec/agent-watcher.md v1 (signed off by Bob 2026-05-06), .gitignore 2026-05-06 14:36:45 -04:00
go.mod Collector milestone 4: config loader + main wiring (binary builds) 2026-05-06 16:22:03 -04:00
go.sum Collector milestone 4: config loader + main wiring (binary builds) 2026-05-06 16:22:03 -04:00
README.md Initial: README, spec/agent-watcher.md v1 (signed off by Bob 2026-05-06), .gitignore 2026-05-06 14:36:45 -04:00

agent-watcher

Push-delivery layer for agent-ping. The "secondary nervous system" for Claude Code agents on this network.

agent-ping queues messages in inbox files; agent-watcher notices them (and other external events) and wakes the recipient agent without a human in the loop.

Two layers:

  • Collector — small Go daemon, systemd --user, always on, brain-blind. Converts external events (HTTP webhooks, drop-folder file arrivals) into ping inbox writes. Runs whether or not any agent is alive.
  • MCP Watcher — Claude Code MCP subprocess, declared in each agent's mcp.json. Watches the agent's inbox via inotify and surfaces events into the live session via Channels (research preview). Provides reply tools (ack, respond, mark_handled).

Filesystem is the queue. OpenBrain is not involved.

Spec

spec/agent-watcher.md. Read that for architecture, decisions, scope.

Status

v1 spec signed off by Bob (VPS) 2026-05-06. Implementation pending.

Install

Per CLAUDE.md rule #2, Angus runs the install commands — agents do not modify their own configuration. Install script will land alongside INSTALL.md once the binaries are built.