Skip to main content

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

  1. depending on spatialbridge;
  2. subclassing spatialbridge.adapter.Adapter (the capabilities with roles, plus invoke, bind, collect, on_event);
  3. calling spatialbridge.tools.mount(server, adapter) on its MCP server;
  4. 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)

Source distribution for spatialbridge 0.1.0
File Size Uploaded
spatialbridge-0.1.0.tar.gz 144.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for spatialbridge 0.1.0
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page