Files
mesh-delivery/modules/mesh-delivery-forge-bridge/module.json
T
jschoubben dce4d01a58 FB1, FB9, FB10: the forge bridge writes one message per move of every watched branch
The bridge watches the registrations' branches by origin (a first view of registrations, then registration-changed),
before the first registration the gate's source's (source-moved); no branch is named in its code, Trunk goes. Every
move is heard on the seat git's branch-moved through the bridge's durable on SEAT_git_branch-moved, its head read by
the seat's verb branch, never the event's: merged with its pull request and `base` (the watched branch) when the
seat's pull names the head a pull request's merge, else `pushed` with branch, head and `before`, both with the
take-in inputs at the head. The last head written per watched branch is kept in the state heads under
branch.<owner>.<name>.<escaped branch>, so a move heard twice writes once, and each watched branch's head is read at
the start and when a branch is registered. A move of an unprotected branch writes nothing. pull.merged into a watched
branch writes nothing (its message is the move's); the forge-made merge's trunk filter goes.

Builds: design 47 G §4, §7, §11, §20, §41, §507, §509, §532, §714, A-227, A-236

Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
2026-11-12 09:15:04 +01:00

123 lines
2.8 KiB
JSON

{
"module": "mesh-delivery-forge-bridge",
"version": "0.1",
"slug": "forge-bridge",
"consumes": [
"git.pull-updated",
"git.pull-merged",
"git.pull-closed",
"git.forge-delete",
"git.branch-moved",
"mesh-catalog.registration-changed",
"mesh-delivery.source-moved",
"mesh-delivery.owed",
"mesh-delivery-checker.owed",
"mesh-broker.recreated",
"mesh-broker.dropped"
],
"streams": [
{ "name": "forge", "events": ["forge.**", "owed.ended"] }
],
"state": [
{ "name": "heads", "history": 1 },
{ "name": "inputs", "history": 1 },
{ "name": "end-asks", "history": 1 },
{ "name": "owed-asks", "history": 1 }
],
"tools": [
"bridge_tags",
"bridge_groups",
"bridge_group_end_again",
"bridge_merged_message",
"bridge_owed",
"bridge_owed_again",
"bridge_owed_drop"
],
"invokes": [
"seat:git.status",
"seat:git.comment",
"seat:git.view",
"seat:git.note",
"seat:git.merge-pull",
"seat:mesh-delivery.groups",
"seat:mesh-hand-acts.hand-act",
"seat:git.open-pulls",
"seat:git.trees",
"seat:git.file",
"seat:git.pull",
"seat:git.tags",
"seat:git.branch",
"seat:mesh-catalog.registrations",
"seat:mesh-delivery.source",
"seat:mesh-broker.show"
],
"requires": [
{
"name": "performed",
"storage": "key-value",
"template": "state",
"options": { "history": 1, "ttl-seconds": 604800 }
}
],
"own-secrets": {
"broker": "${dir:state}/broker"
},
"secrets-owner": "mesh-delivery-forge-bridge",
"resources": [
{
"id": "account",
"type": "user",
"name": "mesh-delivery-forge-bridge",
"shell": "/usr/bin/nologin",
"home": "/var/lib/mesh-delivery-forge-bridge"
},
{
"id": "state",
"type": "directory",
"mode": "0700",
"owner": "mesh-delivery-forge-bridge",
"place": ".",
"unknown": "program"
},
{
"id": "bridge",
"type": "process",
"name": "mesh-delivery-forge-bridge",
"artifact": "program",
"run": [
"./mesh-delivery-forge-bridge"
],
"env": {
"MESH_BROKER_FILE": "${dir:state}/broker"
},
"user": "mesh-delivery-forge-bridge",
"health": {
"kind": "unit"
}
}
],
"build": {
"artifacts": [
{
"name": "program",
"kind": "bundle",
"language": "go",
"system": "arch",
"from": "cmd/mesh-delivery-forge-bridge",
"binary": "mesh-delivery-forge-bridge"
},
{
"name": "tools",
"kind": "bundle",
"language": "go",
"system": "arch",
"from": "cmd/mesh-delivery-forge-bridge-tools",
"binary": "mesh-delivery-forge-bridge-tools",
"loads": [
"mesh-delivery-forge-bridge-tools"
]
}
]
}
}