diff --git a/README.md b/README.md index 7b89c5e..40c6af1 100644 --- a/README.md +++ b/README.md @@ -76,6 +76,8 @@ Both handler constructors take the following parameters: `config` frontmatter value. - `maxAttempts`: How many times to attempt the `callback` before giving up. Defaults to `1` (no retries). If all attempts fail, the webhook is dropped. +- `watch`: If `true`, Lure watches `luresDir` for changes and reloads lures as + they are added, modified, or removed. Defaults to `false`. ## Generating lures @@ -154,6 +156,12 @@ AND WHAT THE LLM RECEIVING THE PROMPT SHOULD DO IN RESPONSE] 2. Lure traverses the specified directory and discovers any `.lure` files. 3. Each `.lure` file has their frontmatter validated. The parsed config and template content are cached. +4. If `watch` is enabled, a filesystem watcher is started on `luresDir`. When + a `.lure` file is added or modified, it is re-validated and its cache entry + updated. If validation fails, the previous cached version is retained and an + error is logged. When a `.lure` file is removed, its cache entry is + discarded. Changes take effect immediately — queue processing always uses the + current cache, so a reload applies to any items already in the queue as well. ### Per Request