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. |
grouping |
Which images, masks and tables under a folder belong together: one project per image, each pairing scored with its reasons and confidence, corrections as overrides. Stdlib only. |
The MCP SDK is the [mcp] extra (pip install 'spatialbridge[mcp]'). Without
it, grouping, schema, workspace and the in-process and HTTP rungs work;
reaching a peer over MCP raises peer_unavailable with that install as the hint.
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 --all-extras
$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>" -o python_files=__init__.py --pyargs spatialbridge.conformance(the check lives in the package's__init__.py, which pytest collects only when told to).
Metadata
Release files for spatialbridge 0.2.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 | Provenance | Actions |
|---|---|---|---|---|
| spatialbridge-0.2.0.tar.gz | 172.3 kB | Without provenance | Details for spatialbridge-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| spatialbridge-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for spatialbridge-0.2.0-py3-none-any.whl |
Total release size: 248.8 kB
Release files / spatialbridge-0.2.0.tar.gz
| Download URL | spatialbridge-0.2.0.tar.gz |
|---|---|
| Size | 172.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
59e9bafe1c9971c89271db00ada8eb91319a4cbb46c30df3f5426e28bc4b2007
|
|
BLAKE2b-256 checksum How to use checksums |
77fcb992009f2f0fd9ccfea0562e67eed0b72e11a4b40cf0d7daf5f7f6bc9f33
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.14
|
Release files / spatialbridge-0.2.0-py3-none-any.whl
| Download URL | spatialbridge-0.2.0-py3-none-any.whl |
|---|---|
| Size | 76.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7877fa3b520ce3dce7f90d2ddcac3a6590bb8d910c7b1ad62477378e5da7c609
|
|
BLAKE2b-256 checksum How to use checksums |
302f87677b5a440313aed30cab21d38779b99d49d39485af582bb69d61d79d88
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.14
|
Security for spatialbridge 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.