Skip to main content
monolex-niia-watcher is the cross-platform filesystem daemon behind NIIA’s event freshness path. It persists accepted file events in order, reloads effective Monogram and Monomento policies when their registry state changes, and triggers niia index --dirty only after a settled batch. Published contract: monolex-niia-watcher 0.4.0, OpenCLIs build 2026-07-12-192934. The executing binary, registry, and public CDN metadata agree on this release.

Quick Start

Normal lifecycle ownership belongs to the Monolex/OpenCLIs service bootstrap. Run the watcher directly only when foreground logs are needed for diagnosis.

Complete Command Reference

Lifecycle commands intentionally live in the service owner rather than this binary. The watcher’s small argv surface prevents a second configuration and supervision plane.

NIIA Control Surface

The daemon binary owns only foreground execution. NIIA owns the operator surface around it: niia watcher --help shows the compact Clap entry point, while niia watcher help prints the full action list above.

Freshness Contract

Only one in-process trigger runs at once, and NIIA’s cross-process lock prevents overlap with manual or service runs. Deferred, failed, spawn-error, and hard-timeout results retry with exponential backoff capped at five minutes. New file events reset the backoff and arm a new settle window. Because .git is excluded from native filesystem events, startup and a 60-second periodic probe arm the same dirty driver. NIIA fingerprints the refs and returns a no-op when nothing changed. This is how ref-only changes remain fresh without watching Git internals.

Environment Controls

The daemon resolves ~/.openclis/bin/niia (or niia.exe on Windows) before falling back to PATH. Registry policies can refine filtering only inside roots that already have filesystem subscriptions; they never create a new subscription implicitly.

Durable Verification

A complete live check proves all four layers: the lifecycle/control owner, a fresh one-minute worker_status.last_ping heartbeat, a persisted file_events row from a real project edit, and the matching index_cursors advance. niia watcher status intentionally reports the row with the newest last_ping; it does not prove that no older duplicate process exists. Pair it with the OS service status or process listing and require one expected owner. A running process alone is insufficient. During this audit niia watcher status reported five active roots, a current file event, and the OpenCLIs watcher PID with a 25-second heartbeat. That is a point-in-time proof of the newest owner row, not a substitute for the duplicate owner check above.

Release Platforms

Relationships