File size: 2,528 Bytes
8970abc
 
 
 
 
 
 
 
 
 
c41bdce
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b0e79f7
 
c41bdce
 
 
 
 
 
 
 
 
86bc248
 
c41bdce
 
 
 
 
 
 
 
 
 
 
 
 
86bc248
c41bdce
86bc248
c41bdce
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
---
title: Membra Liquidity Automation
emoji: 💧
colorFrom: blue
colorTo: green
sdk: docker
pinned: false
license: mit
---

# Membra Liquidity Automation Aggregator + Windsurf Bridge

Generated: 2026-06-11T01:15:09+00:00

This is a local-first automation/control plane for a 24/7 liquidity loop.

It is not a live trading bot.
It is not a Gate.io executor.
It does not place orders.
It does not store private keys.
It does not upload files.

It aggregates events, risk state, task state, evidence, and strategy/repo audit requirements, then emits Windsurf-ready implementation packets and hash-chained receipts.

## What it solves

Your 24/7 liquidity loop needs a supervisor that can continuously answer:

- What should be monitored?
- What changed?
- What is unsafe?
- Which repo/module needs a patch?
- Which task should Windsurf implement next?
- Which order path is unguarded?
- Which capital loop step requires human approval?
- Which evidence packet proves the system state?

This project creates that supervisor layer.

## Architecture

```text
event sources
  -> automation aggregator
  -> risk governor
  -> liquidity loop state machine
  -> receipt ledger
  -> windsurf bridge packet builder
  -> human-reviewed repo patching in Windsurf
```

## Main capabilities

- SQLite event/receipt/task ledger
- Hash-chained receipts
- Local HTTP API
- CLI
- Dry-run by default
- Risk-state gate
- Emergency halt gate
- Windsurf packet generator
- Liquidity loop finite-state machine
- Secret redaction helpers
- JSONL-style event ingestion
- Markdown implementation packets

## Quick start

```bash
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

python3 -m membra_liquidity_agg init
python3 -m membra_liquidity_agg ingest --kind market_signal --source manual --payload '{"symbol":"SOL_USDT","note":"observe only"}'
python3 -m membra_liquidity_agg loop-step
python3 -m membra_liquidity_agg build-windsurf-packet --goal "Guard all Gate.io order paths and verify 24/7 liquidity loop safety"
python3 -m membra_liquidity_agg serve --host 127.0.0.1 --port 8787
```

## API

- `GET /health`
- `POST /events`
- `GET /events`
- `POST /loop/step`
- `GET /loop/state`
- `POST /windsurf/packet`
- `GET /receipts`
- `POST /halt`
- `POST /resume`

## Safety default

The system starts in dry-run/control-plane posture.

To integrate with real trading later, do not put exchange credentials here. Add a separate guarded executor process and expose only a safe command surface that rejects unsafe actions.