
Search by name, tag, category or type
Source and install need .
pnpm dlx shadcn@latest add @assembli/mail-rule-builderWrite a mail rule as a sentence and get it compiled into editable parts: when, if, then, ask first, and the agent that runs it. Every condition and step is a token you can change or remove. A dry run over recent mail shows what it would have matched, with the matching phrase highlighted and which emails it would ask about, and the agent view shows the same rule as a create_rule call.
Other props pass through to the root element.
defaultSentence
string
Default ""
defaultRule
Rule
compile
(sentence: string) => Rule | Promise<Rule>
Turn a sentence into a rule, e.g. with a model. Defaults to compileRule, a small deterministic parser.
history
RuleTestMail[]
Default []
Recent mail for the dry run.
historyLabel
string
Default "last 30 days"
onAction
(action: MailAction) => void
create_rule with rule: ruleToJSON(rule) on save, the person as the actor.
agents
MailAgent[]
Default DEFAULT_AGENTS
user
string
Default "Ines Moreau"
domain
string
Default "larkspur.co"
Domain for bare forwarding names ("forward to accounting").
| Description | |||
|---|---|---|---|
| defaultSentence | string | "" | |
| defaultRule | Rule | – | |
| compile | (sentence: string) => Rule | Promise<Rule> | – | Turn a sentence into a rule, e.g. with a model. Defaults to |
| history | RuleTestMail[] | [] | Recent mail for the dry run. |
| historyLabel | string | "last 30 days" | |
| onAction | (action: MailAction) => void | – |
|
| agents | MailAgent[] | DEFAULT_AGENTS | |
| user | string | "Ines Moreau" | |
| domain | string | "larkspur.co" | Domain for bare forwarding names ("forward to accounting"). |