Files
mesh-delivery/modules/mesh-grants/module.json
T
jschoubben fcfaa41348 The grants part takes a first view of every binding from the seat mesh-broker's list
At each start and on grants_first_view_again with state bindings, the part asks
list, writes the bindings the answer carries that it holds none of or another of,
keeps and raises binding-unlisted for those the answer omits, never writes over
an event heard since the ask, holds the seat's events until the answer or the
bound, and raises first-view-unanswered naming mesh-broker and list past two
minutes while composing as before. grants_first_views shows the first view
beside the others. Cases are rows and subtests of the existing tests.

Builds: design 25 bindings-first-view §1, §3, §4, §5, §6, §7, §8 (hq d0760629, PR 543)

Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
2026-11-11 10:30:22 +01:00

146 lines
3.1 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",
"mesh-broker.created",
"mesh-broker.dropped",
"mesh-broker.recreated",
"mesh-delivery-assigner.views.assignments",
"mesh-delivery-assigner.views.wants",
"mesh-delivery-indexer.views.manifests",
"mesh-delivery-indexer.views.modules",
"mesh-catalog.manifest-accepted",
"mesh-catalog.manifest-refused",
"mesh-catalog.seat-definition-changed",
"mesh-catalog.seat-definition-removed"
],
"uses": [
"operator-channel"
],
"invokes": [
"nats.nats_streams",
"nats.nats_user_can",
"nats.nats_users",
"seat:node-engine.root-free",
"mesh-delivery-assigner.assignments",
"mesh-delivery-assigner.wants",
"mesh-delivery-indexer.manifests",
"mesh-delivery-indexer.modules",
"mesh-delivery-indexer.verdicts",
"seat:mesh-catalog.seat-definitions",
"seat:mesh-hand-acts.hand-act",
"seat:mesh-broker.list"
],
"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",
"grants_seat_list",
"grants_seat_list_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"
]
}
]
}
}