Concepts
| Term | Meaning |
|---|---|
| District | Container for bees, tasks, and settings. Shown as a node on the Bridges page graph. |
| Bridge | Edge between two districts with label, optional dataFlow, and direction. |
one_way | Used for pipeline traversal: forward edges only. Only active one-way bridges participate. |
two_way | Not followed by pipeline BFS. For documentation or bidirectional UI semantics. |
| Start district | Where a pipeline run begins. Stored in bridgeGraphMeta.startDistrictId. |
Export
- Open the web app Bridges page (
/bridges). - Select at least one district node on the graph.
- Click Export selection. A JSON file downloads (
bridge-settings-*.json).
Included: format (beebridge.bridge-settings.v1), exportedAt, startDistrictId (if in selection), full district bundles (bees + tasks), and bridges whose endpoints are both in the selection.
Import
- On Bridges, click Import and choose a
.jsonfile. - The gateway parses and validates the
beebridge.bridge-settings.v1format.
Districts, bees, and tasks are upserted by id. Bridges are applied only when both endpoints exist. dependsOn references to unknown tasks are dropped. Import merges with existing data.
Pipeline Run
From a chosen start district, run all tasks (not done) in every district reachable along active one_way bridges going forward (BFS).
- API:
POST /api/bridge-graph/runwith{ "districtId": "<id>" } - The request blocks until the pipeline finishes.
History
GET /api/bridge-pipeline/history— list of past runs (newest first).GET /api/bridge-pipeline/history/:runId— one run record.
Upstream Context & {{bridgeOut:taskId}}
Tasks in upstream districts (one-way edges into the current district) can be listed via:
GET /api/bridge-graph/upstream-tasks?districtId=...GET /api/bridge-graph/upstream-overview?districtId=...
Placeholders like {{bridgeOut:<taskId>}} in prompts are resolved using completed outputs from the same pipeline run.
Minimal JSON Shape
{
"format": "beebridge.bridge-settings.v1",
"exportedAt": "2026-04-13T12:00:00.000Z",
"startDistrictId": "district-abc",
"districts": [
{
"district": { "id": "...", "title": "...", "objective": "..." },
"bees": [ { "id": "...", "name": "...", "systemPrompt": "..." } ],
"tasks": [ { "id": "...", "title": "...", "dependsOn": [] } ]
}
],
"bridges": [
{
"id": "...",
"fromDistrictId": "...",
"toDistrictId": "...",
"direction": "one_way",
"status": "active"
}
]
}