The node-engine owns the composition it alone runs (H1, H2)

ADR 0593 §1 and §7: compose, its bus reader and runtime reader, takein,
validate, the overlay generator, the composer's run and mesh-compose, and
the judgement of a move leave mesh-sdk for the node-engine's internal
packages, so no other module composes and a change to them rebuilds only
the node-engine. The shapes others read (the composer's request and
verdict, the overlay's names, compositions and answers) stay in mesh-sdk.
The node's grant is now a golden file of what the grants part composes,
since the composer of the bus's user list leaves mesh-sdk too.

Claude-Session: https://claude.ai/code/session_01NcbgfJ9Gum47zkFKWRaovL
This commit is contained in:
2026-11-02 18:24:05 +01:00
parent 98fbc490a4
commit 9a12f2851f
218 changed files with 33022 additions and 54 deletions
@@ -0,0 +1,131 @@
{
"module": "mesh-mail-web",
"version": "1",
"slug": "mail-web",
"runs-as": "mesh-mail-web",
"claims": [
{
"name": "mail-webclient",
"scope": "mesh",
"serves": ["open", "status"]
}
],
"invokes": [
"seat:mail-store.accounts",
"seat:mail-store.search",
"seat:mail-store.read",
"seat:mail-store.send",
"seat:mail-store.send-status",
"seat:mail-reading.entries",
"seat:mail-reading.groups",
"seat:mail-reading.status",
"seat:mail-reading.correct",
"seat:mail-reading.lessons",
"seat:mail-reading.undo"
],
"reads": ["mesh-mail.accounts"],
"requires": ["route", "oidc-client"],
"contributes": {
"route": {
"label": "mail",
"endpoint": "web"
},
"oidc-client": {
"label": "mail",
"endpoint": "web",
"callback": "/signed-in"
}
},
"binds": {
"route": "${dir:state}/route.json",
"oidc-client": "${dir:state}/oidc-bound.json"
},
"secrets": {
"oidc-client": "${dir:state}/oidc-bound.secret"
},
"listens": [
{
"name": "web",
"port": 8099,
"protocol": "tcp",
"from": "mesh",
"why": "the mail web client's pages, over http; only the route proxy reaches it, and the operator's own browser through the internal name (novox/hq ADR 0440 §2) — its public name, if any, is a route grant"
}
],
"config": {
"operators": {
"type": "list",
"description": "The Keycloak identities (the ID token's preferred_username) let to sign in; nobody by default (novox/hq ADR 0440 §3).",
"trusted": true,
"default": []
}
},
"tools": [
"mail-webclient.open",
"mail-webclient.status",
"mail_web_health"
],
"own-secrets": {
"broker": "${dir:state}/broker"
},
"secrets-owner": "mesh-mail-web",
"resources": [
{
"id": "account",
"type": "user",
"name": "mesh-mail-web",
"shell": "/usr/bin/nologin",
"home": "/var/lib/mesh-mail-web"
},
{
"id": "state",
"type": "directory",
"mode": "0700",
"owner": "mesh-mail-web",
"place": ".",
"unknown": "program"
},
{
"id": "operators",
"trusted": true,
"type": "file",
"path": "${dir:state}/operators.json",
"mode": "0600",
"owner": "mesh-mail-web",
"merge": "json",
"template": "files/operators.json",
"takes-config": ["operators"]
},
{
"id": "oidc-config",
"type": "file",
"path": "${dir:state}/oidc.json",
"mode": "0600",
"owner": "mesh-mail-web",
"template": "files/oidc.json"
}
],
"build": {
"artifacts": [
{
"name": "tools",
"kind": "bundle",
"language": "go",
"system": "arch",
"from": "cmd/mesh-mail-web",
"binary": "mesh-mail-web",
"loads": ["mesh-mail-web"],
"env": {
"MESH_MAIL_WEB_OPERATORS": "${dir:state}/operators.json",
"MESH_MAIL_WEB_OIDC": "${dir:state}/oidc.json",
"MESH_MAIL_WEB_LISTEN": "${port:8099}"
}
},
{
"name": "files",
"kind": "archive",
"from": "files"
}
]
}
}