Files
mesh-catalog/modules/mesh-mail-reader/module.json
T
jochen fac091756e issue 1858: answer the operator's list for a mode (1858.3)
ADR 0517 §4, ADR 0515 §1: list gives tasks under today, this week and later by due date in the operator's
zone, promises by kind, good to know, read later, handled today with its undo and the scam warnings, for the
mode's accounts, and when the operator last looked.
2026-10-22 19:53:47 +02:00

147 lines
3.5 KiB
JSON

{
"module": "mesh-mail-reader",
"version": "1",
"runs-as": "mesh-mail-reader",
"claims": [
{
"name": "mail-reading",
"scope": "mesh",
"serves": ["entries", "groups", "correct", "lessons", "undo", "status", "list", "handle", "unhandle", "remind"]
}
],
"consumes": [
"mesh-mail.mail.*.message.added"
],
"invokes": [
"seat:mail-store.read",
"seat:mail-store.accounts",
"seat:mail-store.search",
"claude-code.claude_code_judge",
"claude-code.claude_code_judged",
"messenger.messenger_check",
"seat:operator-channel.tell"
],
"requires": ["postgres-database"],
"contributes": {
"postgres-database": {
"name": "mail-reader"
}
},
"binds": {
"postgres-database": "${dir:state}/database.json"
},
"secrets": {
"postgres-database": "${dir:state}/database.secret"
},
"config": {
"callers": {
"type": "list",
"description": "Who may call one of mail-reading's six verbs (entries, groups, correct, lessons, undo, status): a module's name (on every machine), <machine>.<module>, or person.<name> (novox/hq ADR 0459 §2). mesh-mail-web alone by default.",
"trusted": true,
"default": ["mesh-mail-web"]
}
},
"tools": [
"mail-reading.entries",
"mail-reading.groups",
"mail-reading.correct",
"mail-reading.lessons",
"mail-reading.undo",
"mail-reading.status",
"mail-reading.list",
"mail-reading.handle",
"mail-reading.unhandle",
"mail-reading.remind",
"mail_reader_health"
],
"runtime-health": {
"kind": "tool",
"tool": "mail_reader_health",
"interval": "60s",
"timeout": "10s",
"looks": 2,
"grace": "60s"
},
"own-secrets": {
"broker": "${dir:state}/broker"
},
"secrets-owner": "mesh-mail-reader",
"resources": [
{
"id": "account",
"type": "user",
"name": "mesh-mail-reader",
"shell": "/usr/bin/nologin",
"home": "/var/lib/mesh-mail-reader"
},
{
"id": "state",
"type": "directory",
"mode": "0700",
"owner": "mesh-mail-reader",
"place": ".",
"unknown": "program"
},
{
"id": "callers",
"trusted": true,
"type": "file",
"path": "${dir:state}/callers.json",
"mode": "0600",
"owner": "mesh-mail-reader",
"merge": "json",
"template": "files/callers.json",
"takes-config": ["callers"]
},
{
"id": "database-url",
"type": "file",
"path": "${dir:state}/database.url",
"mode": "0600",
"owner": "mesh-mail-reader",
"template": "files/database-url"
},
{
"id": "prepare",
"type": "process",
"name": "mesh-mail-reader-prepare",
"artifact": "tools",
"run": [
"./mesh-mail-reader",
"prepare"
],
"run-once": true,
"env": {
"DATABASE_URL_FILE": "${dir:state}/database.url"
},
"restart-on": [
"database-url"
]
}
],
"build": {
"artifacts": [
{
"name": "tools",
"kind": "bundle",
"language": "go",
"system": "arch",
"from": "cmd/mesh-mail-reader",
"binary": "mesh-mail-reader",
"loads": [
"mesh-mail-reader"
],
"env": {
"DATABASE_URL_FILE": "${dir:state}/database.url",
"MESH_MAIL_READER_CALLERS": "${dir:state}/callers.json"
}
},
{
"name": "files",
"kind": "archive",
"from": "files"
}
]
}
}