Record the owner's acceptance of the templates plan
Security / Vulnerability check (push) Successful in 41s
Test / Lint and test (push) Successful in 2m12s

The owner accepted every proposed default of docs/plans/templates.md on
2026-12-01. Its open questions become numbered decisions, without the
alternatives, and design.md's Planned next item 5 records them.

The plan's acceptance edits are made: formatters.md's phase 5 points to
the plan for user templates and webhook sources; printers.md's rules
package also exports the shared compile options, its environment gains
template and the source hook:<name>, and its rule-visibility and reload
questions name the templates plan; blocks.md says templates do not need
the group; job-store.md's duplicate check takes webhook deliveries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
57_WolveandClaude Opus 5.5 committed 2026-12-01 09:30:08 -06:00
1 parent 4012018e96
commit c778c3f983
6 files changed
+111 -129

No files matched your search

+25 -4
View File
@@ -519,10 +519,31 @@ not yet written is described here until it is.
example receipt prints with the owner's OK and is pinned once he
passes it.
5. **Templates and rules for webhooks and ntfy subscriptions**:
`docs/plans/templates.md` (written; its open questions await the
owner). Templates and rule actions use Expr, as in Kanrisha, sharing
the routing engine. Webhooks come after templates, since a webhook
needs a template to become a receipt.
`docs/plans/templates.md` (written; the owner accepted every proposed
default, 2026-12-01). Templates and rule actions use Expr, as in
Kanrisha, sharing the routing engine. Webhooks come after templates,
since a webhook needs a template to become a receipt.
- A template is one Expr expression in `[[templates]]`, checked at load
on the sample payload it carries. It returns a notification card's
fields or a list of elements, and every template is also a module,
with its own print and preview routes.
- Expr reads no clock, variable or file, and a run is bounded in nodes,
memory and iterations. Its output takes the strict job decoder: `raw`
and `hex` are refused, images are optional, and each job is laid out
before it is queued. Expr's messages quote the payload and are never
logged.
- `[[ntfy.rules]]` print a message through a template or as today's
card, drop it, or hold it for a digest of its own after `digest_wait`.
They run after the updates check; quiet hours and the paper budget
still apply, unless a rule sets `bypass`. A template that fails
prints the card instead. A rule's digest does not hold later
messages, which narrows the paper budget decision from stage 3 on.
- Webhooks arrive at `POST /hooks/{name}`, outside `/api/v1`. Each hook
has a secret and a preset for its sender's signature (`github`,
`gitea`, `forgejo`, `gitlab`, `standard` or `header`), checked on the
raw body first. A repeated delivery gets its first answer, and a
template that fails prints a fallback receipt.
- Templates do not need the `group` block.
6. **ntfy**: `docs/plans/ntfy.md` (not yet written).
- The subscriber prefers ntfy's WebSocket endpoint (`/<topics>/ws`),
falls back to the JSON stream, and the transport is chosen per