spatialbridge
The protocol SCIMAP Pro (analysis) and Plexora (viewer, image processing) speak to share one dataset. Either application can hand work to the other, with or without an AI agent in between, and a third tool can join later without either package changing.
Neither application imports the other. Both depend on this package, which defines:
| Module | What it is |
|---|---|
schema |
Exchange objects: Ref, Dataset, Regions, Gates, Selection, QCResult, CapabilityDescriptor, Provenance, Handoff. JSON Schema copies are in schema/. |
workspace |
The on-disk record both sides read: identity, revision, per-section stamps, external-change detection, leases. |
peers |
Who is running: peers.json, plus Plexora's servers.json and sidecars.json. |
client |
Reaches a peer by the highest rung available: in-process, HTTP, a spawned MCP stdio server, MCP over HTTP. |
tools |
The bridge_* tools each application mounts on its own MCP server. |
handoff |
Hands work to the peer in five steps: ensure_visible, ensure_bound, invoke, collect, record. |
registry |
The merged catalogue, the role vocabulary, and the routing rule. |
anndata |
Readers and writers for the shared keys (uns["gates"], selections, regions). |
conformance |
A pytest plugin a third tool runs to prove it speaks protocol 1.0. |
There is no daemon. The shared state is a directory:
$SPATIAL_WORKSPACE_DIR if set, otherwise the platform user-data directory
(.../nirmallab/spatialbridge/workspaces).
Development
The repository lives in a Dropbox-synced folder, and a virtual environment inside it gets corrupted. Keep the environment outside the folder:
export UV_PROJECT_ENVIRONMENT=$HOME/.venvs/spatialbridge
uv sync --all-groups
$UV_PROJECT_ENVIRONMENT/bin/python -m pytest
After changing a model in schema/, regenerate the committed JSON Schemas:
$UV_PROJECT_ENVIRONMENT/bin/python -m spatialbridge.schema export schema
A third tool joins by
- depending on
spatialbridge; - subclassing
spatialbridge.adapter.Adapter(the capabilities with roles, plusinvoke,bind,collect,on_event); - calling
spatialbridge.tools.mount(server, adapter)on its MCP server; - passing
pytest --peer "<its mcp command>" --pyargs spatialbridge.conformance.
Metadata
Release files for spatialbridge 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| spatialbridge-0.1.0.tar.gz | 144.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| spatialbridge-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 197.7 kB
Release files / spatialbridge-0.1.0.tar.gz
| Download URL | spatialbridge-0.1.0.tar.gz |
|---|---|
| Size | 144.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ee5ccd74b826e18fe9fcceb910a491c9a86ec5ef1cc089d293f7b9d2c7124121
|
|
BLAKE2b-256 checksum How to use checksums |
7fbb9ea311cea9098bf535e68a8895fec7649dadddb2e65ee2e3a705152641ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.14
|
Release files / spatialbridge-0.1.0-py3-none-any.whl
| Download URL | spatialbridge-0.1.0-py3-none-any.whl |
|---|---|
| Size | 53.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ecf88bab0452d883abd412ac032d2b17e98d5a0b89ee16ad7ed73987a9a6ad44
|
|
BLAKE2b-256 checksum How to use checksums |
442f1ea43be720f6e8f3dbccb4c5fdeba057b92a1d2ad017d837ddf974e65090
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.14
|