ADR-0042: relayr's commands: the tracker connector's reads, gated by reflexr's actions¶
Status: Accepted Date: 2026-11-01 Deciders: Alex Nodeland Implements: lattice RFC-0014's relayr catalog (phase 1, #916); on lattice ADR-0041
Context¶
RFC-0014 gives each package a static catalog of commands, which portr, portalr's client and the parity test read without a database. Its table gives relayr's "chat rules, trackers' reads".
relayr asks no grantr action of its own. Its two reads for the portal, the items a workspace's runs filed in its tracker and how the tracker connector is doing, ask reflexr's authorize with reflexr:read_runs and reflexr:read_dead_letters, as reflexr's own reads would. A rule drafted in a chat is an artifactr artifact, accepted through artifactr's proposals, and installed as a reflexr stored rule by relayr's own rule. So each step is an artifactr or reflexr command already.
Decision¶
relayr.commands, a layer of its own, imports pydantic and lattice-core'scapabilitiesandcommands.CATALOGreads no database and opens no workspace.- Two commands, version 1.0.0, both
readwithreads_private, in theautomationstoolset, routed to the workspace's runs in portalr's app, where both show:relayr.list_filed_items, gated byreflexr:read_runs;relayr.tracker_status, gated byreflexr:read_dead_letters.
- Each is gated by the action its route asks, a reflexr action, so a person who may read a workspace's runs reads what they filed, wherever they ask.
- Chat rules have no relayr command: drafting is the thread's agent's tool, accepting is
artifactr.respond_to_proposal, and the rule is then reflexr's. LISTEDis empty, since relayr has no action of its own. The parity test reads it as every catalog's.- Published as
schemas/relayr.commands.json, regenerated byrelayr:schemaand checked for drift.
Options considered¶
Option A: Gated by reflexr's actions (chosen)¶
Pros: what the routes already ask, so a command and its route never disagree; no new grant to give anyone. Cons: relayr's catalog names another package's actions, which the parity test must accept.
Option B: relayr actions of its own (relayr:read_tracker)¶
Cons: a new action for each person to be granted, which duplicates what reading runs and dead letters already decides.
Consequences¶
- Easier: the parity test, portalr's
CommandNameand portr's tools read relayr's reads with every other catalog's. - Harder: relayr no longer imports at lattice-core-ai 0.2.0, the newest on PyPI, which lacks
capabilitiesandcommands.scripts/lowest_direct.pyexpects that until its floor rises with the next lattice-core release. - To revisit: relayr's provider, with portr (#917).
Action items¶
-
relayr.commandsand its schema, tested against the routes' actions. - The bound provider, with portr (#917).