Skip to main content

musubi-harness

The host-neutral Musubi memory runtime — the shared core that every musubi-* family host adapter depends on.

Adapter Repo
Claude Code sourceblender/musubi-claude
Codex sourceblender/musubi-codex
Grok Build sourceblender/musubi-grok
LiveKit sourceblender/musubi-livekit
Hermes sourceblender/musubi-hermes
OpenClaw sourceblender/musubi-openclaw

What this package is

musubi-harness is the single source of truth for the host-neutral contract every Musubi seat adapter must honor:

  • Capture policy. What is and is not a load-bearing turn envelope.
  • Outbox. A per-identity, per-zone SQLite store of shadow records. Stage → drain → readback → receipt. shadow, pending, accepted, verified, dead — each is a distinct state and the contract says so.
  • Delivery. Verified delivery only after a canonical readback returns the exact object_id. queued is a durable local promise; verified is the receipt. Never collapse the two.
  • Resolution. Terminalization of legacy ambiguity with versioned operator evidence.
  • Namespace policy. actor == presence-prefix; one seat cannot read or write under another seat's namespace.
  • Identity. Env or $PLUGIN_DATA/config.json — all-or-nothing, never derived from the host.

What it is not: a host binding. There is no MCP server, no Claude hook, no Codex hook, no Grok plugin, no OpenClaw manifest here. Those live in the adapter repos. This package is the substrate they all stand on.

What this package gives you

Three Python imports + two console scripts.

Imports

from musubi_harness import (
    # Capture
    CaptureDecision, CapturePolicy, TurnEnvelope,
    # Outbox + delivery
    Outbox, DeliveryStore, Drainer, DeliveryClient, MemoryDataClient,
    DeliveryJob, Readback, ReceiptLookup, canonical_request_digest,
    DeliveryNonMutatingRejection, DeliveryTerminalError, DeliveryTransientError,
    CAPTURE_CONTENT_TYPE, CAPTURE_OPERATION_ID,
    # Plugin contracts
    PluginRuntime, RuntimeConfig, RuntimeConfigError,
    PluginMcpFacade, PluginContinuity,
    # Resolution
    BoundaryEvidence, LiveReceiptObservation, LiveTypedNonMutatingRejection,
    OperatorAbandon, ProvenNonMutatingRejection, ReceiptObservation,
    ResolutionEvidence, parse_resolution_evidence,
    RESOLUTION_KINDS, LIVE_REJECTION_SCHEMA_VERSION, RESOLUTION_SCHEMA_VERSION,
)

Console scripts

After pip install musubi-harness:

musubi-harness              --db <path> <command> [...]
musubi-harness-conformance  --source <name> [--file <jsonl>]

musubi-harness subcommands: enqueue, status, inspect, stage, remember, delivery-status, resolve, drain.

Installation

pip install musubi-harness

That installs the package, the two console scripts, and nothing else. The harness has no runtime dependencies beyond the Python standard library — every transport-specific dep belongs in the adapter that uses it.

Versioning

Semver. 1.x.y is the long-lived stable line that the host adapters already pin against. Breaking changes to musubi_harness API surface require a 2.0.0.

Cross-adapter invariants

The harness exists so that every seat adapter — Claude Code, Codex, Grok Build, LiveKit, Hermes, OpenClaw — ships the same memory contract. To keep that promise:

  1. Never import from a host adapter in this package. The dependency arrow points one way: adapter → harness, never the reverse.
  2. Never collapse queued and verified. A local row is a promise; a verified row with an exact object_id is a receipt.
  3. Never derive identity from the host. Env or config, all-or-nothing.
  4. Never silently swallow failure. Anything that goes wrong with capture or delivery must be visible (typically in the adapter's degraded.jsonl) but must not break the host session.

Development

git clone https://github.com/sourceblender/musubi-harness
cd musubi-harness
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
ruff check src tests
mypy src
pytest

CI is ruff + mypy --strict + pytest on Python 3.12. Release is managed by release-please; merging a release-please PR publishes to PyPI as musubi-harness.

License

Apache-2.0.

Release files for musubi-harness 1.6.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 musubi-harness 1.6.0
File Size Uploaded
musubi_harness-1.6.0.tar.gz 53.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for musubi-harness 1.6.0
File Interpreter ABI Platform
musubi_harness-1.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 110.7 kB

Release files / musubi_harness-1.6.0.tar.gz

Download URL musubi_harness-1.6.0.tar.gz
Size 53.2 kB
Tags Source
SHA-256 checksum
How to use checksums
7c795f8ae6968f66ea2fa6aa7dd8fd18f2113fd2916d3cc97285d65207f674bc
BLAKE2b-256 checksum
How to use checksums
bb1908e0aeaac340024fd645d0eaff8ee8fb8e6647d48ae90a5b6552e058c18c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Release files / musubi_harness-1.6.0-py3-none-any.whl

Download URL musubi_harness-1.6.0-py3-none-any.whl
Size 57.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bde0f8cf0c2e068305ccbf55d37e76721a793af402e879dc2be66bf9e12331e3
BLAKE2b-256 checksum
How to use checksums
4b0c5b955b8f783713318828178fae85eefeaad3acfe21d9d5d62b21b9cbef7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.6.0 This release

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

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