Files
mesh-delivery/modules/mesh-grants/module.json
T
jschoubben 2cb19c6415 DLV-F4r, DLV-R1: the grants part reads placement, wants, manifests, modules and verdicts by their owners' first views, then their views families; an answer empty at revision 0 drops no login (ADR 0615 §4 to §6, ADR 0621, ADR 0622)
Each first view is asked at the start until answered, past two minutes raising
first-view-unanswered naming the owner and the tool; an empty answer at revision 0 reads as
a failed read, so the user list stays in force, and first-view-empty names the operator's
step until an answer above 0. Each owner's views event applies one change with no ask; a gap
asks once more. The reads of the five buckets leave the manifest, and the tools ask the
first views too. Tools grants_first_views and grants_first_view_again (a hand act).

The verdicts are followed on the indexer's views family (views.verdicts), not on
manifest-accepted and manifest-refused as ADR 0622 §2 words it: those carry no revision.

Claude-Session: https://claude.ai/code/session_01JG73KJNrH5EgFXMKKYSrig
2026-11-04 12:34:50 +01:00

139 lines
2.8 KiB
JSON

{
"module": "mesh-grants",
"version": "1",
"slug": "grants",
"reads": [
"mesh-config.resolved",
"mesh-delivery-builder.builds",
"node-engine.have",
"mesh-vault.bus-accounts",
"mesh-enrolment.enrolments",
"mesh-vault.node-logins"
],
"consumes": [
"mesh-conditions.condition-raised",
"mesh-conditions.condition-cleared",
"mesh-vault.account-issued",
"nats.created",
"nats.dropped",
"nats.recreated",
"mesh-delivery-assigner.views.placement",
"mesh-delivery-assigner.views.wants",
"mesh-delivery-indexer.views.manifests",
"mesh-delivery-indexer.views.modules",
"mesh-delivery-indexer.views.verdicts"
],
"uses": [
"operator-channel"
],
"invokes": [
"nats.nats_streams",
"nats.nats_user_can",
"nats.nats_users",
"seat:node-engine.root-free",
"mesh-delivery-assigner.placement",
"mesh-delivery-assigner.wants",
"mesh-delivery-indexer.manifests",
"mesh-delivery-indexer.modules",
"mesh-delivery-indexer.verdicts",
"seat:mesh-hand-acts.hand-act"
],
"emits": [
"asserted",
"grant-written",
"hashes-accepted",
"membership-changed",
"user-list-changed"
],
"tools": [
"grants_grants",
"grants_membership",
"grants_user_list",
"grants_compose_now",
"grants_assert",
"grants_accounts",
"grants_consumer_match",
"grants_accept_hashes",
"grants_first_views",
"grants_first_view_again"
],
"state": [
{
"name": "accounts",
"history": 5
},
{
"name": "assertions",
"history": 5
},
{
"name": "grants",
"history": 5
},
{
"name": "memberships",
"history": 5
},
{
"name": "user-list",
"history": 20
},
{
"name": "withheld",
"history": 5
}
],
"own-secrets": {
"broker": "${dir:state}/broker"
},
"secrets-owner": "mesh-grants",
"resources": [
{
"id": "account",
"type": "user",
"name": "mesh-grants",
"shell": "/usr/bin/nologin",
"home": "/var/lib/mesh-grants"
},
{
"id": "state",
"type": "directory",
"mode": "0700",
"owner": "mesh-grants",
"place": ".",
"unknown": "program"
},
{
"id": "grants",
"type": "process",
"name": "mesh-grants",
"artifact": "program",
"run": [
"./mesh-grants"
],
"env": {
"MESH_BROKER_FILE": "${dir:state}/broker"
},
"user": "mesh-grants",
"health": {
"kind": "unit"
}
}
],
"build": {
"artifacts": [
{
"name": "program",
"kind": "bundle",
"language": "go",
"system": "arch",
"from": "cmd/mesh-grants",
"binary": "mesh-grants",
"loads": [
"mesh-grants"
]
}
]
}
}