Files
mesh-catalog/modules/mesh-mail-reader/module.json
T
jochen 0e9004664c issue 1858: write correct's line in its own transaction, and guard who writes the log (1858.6)
ADR 0517 §5: correct keeps the entry's change, its reading lesson and one corrected line together, or none
of them; a test reads the source to prove only the acts write the action log, and each new verb refuses an
ungranted caller. The README and the callers setting name the twelve verbs.
2026-10-22 19:56:16 +02:00

149 lines
3.6 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", "record", "actions"]
}
],
"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 verbs (entries, groups, correct, lessons, undo, status, list, handle, unhandle, remind, record, actions): 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-reading.record",
"mail-reading.actions",
"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"
}
]
}
}