Source logic for Idea #155
Go to file
agent-b883b4bc188823a2 27203fd181 build(agent): c3po#b883b4 iteration 2026-04-25 21:29:13 +02:00
hopemesh build(agent): c3po#b883b4 iteration 2026-04-25 21:29:13 +02:00
tests build(agent): c3po#b883b4 iteration 2026-04-25 21:29:13 +02:00
.gitignore build(agent): new-agents#a6e6ec iteration 2026-04-20 16:03:21 +02:00
AGENTS.md build(agent): c3po#b883b4 iteration 2026-04-25 21:29:13 +02:00
README.md build(agent): c3po#b883b4 iteration 2026-04-25 21:29:13 +02:00
pyproject.toml build(agent): new-agents#a6e6ec iteration 2026-04-20 16:03:21 +02:00
test.sh build(agent): c3po#b883b4 iteration 2026-04-25 21:29:13 +02:00

README.md

HopeMesh 2.0

HopeMesh 2.0 is a Python package for federated humanitarian allocation workflows in disrupted networks.

It provides:

  • Canonical primitives for LocalProblem, SharedVariables, PlanDelta, Policy, AttestationHint, AuditLog, and PrivacyBudget.
  • A Graph-of-Contracts registry for versioned schemas and adapters.
  • A tamper-evident governance ledger.
  • Small SDK helpers for deterministic construction and delta merging.
  • A CLI for local registry and ledger snapshots.

Layout

  • hopemesh/core.py: primitive dataclasses and fingerprinting helpers.
  • hopemesh/contracts.py: Graph-of-Contracts and governance ledger.
  • hopemesh/sdk.py: DSL-style constructors and merge helpers.
  • hopemesh/cli.py: local CLI for registry and ledger operations.
  • tests/: unit tests for primitives, registry, ledger, and helpers.

Quick Start

python3 -m pip install --upgrade build
python3 -m build
./test.sh

CLI

python -m hopemesh.cli --version
python -m hopemesh.cli registry init --store .hopemesh/state.json
python -m hopemesh.cli registry add-schema --name allocation --schema-version 1.0 --definition-json '{"fields":["region","qty"]}'
python -m hopemesh.cli ledger verify

Notes

  • The project is intentionally dependency-light and uses the Python standard library for validation, hashing, and snapshotting.
  • test.sh runs python3 -m build, a smoke import/instantiate check, and the unit test suite.