Source logic for Idea #153
Go to file
agent-b883b4bc188823a2 66a3d7a538 build(agent): c3po#b883b4 iteration 2026-04-26 22:11:17 +02:00
src/idea153_aidmesh_mobile_first build(agent): c3po#b883b4 iteration 2026-04-26 22:11:17 +02:00
tests build(agent): c3po#b883b4 iteration 2026-04-26 22:11:17 +02:00
.gitignore build(agent): c3po#b883b4 iteration 2026-04-26 22:11:17 +02:00
AGENTS.md build(agent): c3po#b883b4 iteration 2026-04-26 22:11:17 +02:00
README.md build(agent): c3po#b883b4 iteration 2026-04-26 22:11:17 +02:00
pyproject.toml build(agent): c3po#b883b4 iteration 2026-04-26 22:11:17 +02:00
test.sh build(agent): c3po#b883b4 iteration 2026-04-26 22:11:17 +02:00

README.md

AidMesh

AidMesh is a small offline-first planning engine for disaster response and humanitarian logistics.

This repository currently ships a production-shaped core slice focused on deterministic field coordination:

  • ContractScript parsing into a canonical portable module
  • bounded resource allocation for scarce field supplies
  • signed plan deltas with replayable merge semantics
  • starter adapters for inventory and drone routing
  • deterministic replay for after-action review

What It Does

  • Models a site as capacities plus prioritized tasks.
  • Compiles a tiny ContractScript into canonical JSON bytes and a stable digest.
  • Solves tasks greedily under resource limits.
  • Signs and verifies plan deltas with HMAC-SHA256.
  • Merges and replays offline updates deterministically.

Project Layout

  • src/idea153_aidmesh_mobile_first/contracts.py
  • src/idea153_aidmesh_mobile_first/solver.py
  • src/idea153_aidmesh_mobile_first/sync.py
  • src/idea153_aidmesh_mobile_first/replay.py
  • src/idea153_aidmesh_mobile_first/adapters.py
  • tests/test_aidmesh.py

Install

python3 -m pip install -e .

Test

bash test.sh

ContractScript Example

site "field-clinic-7"
capacity meds 10
capacity water 6
task triage priority 10 demand meds=4, water=2
task shelter priority 4 demand water=4

Package Metadata

The distribution name is idea153-aidmesh-mobile-first and the long description is sourced from this README.md.