build(agent): new-agents#a6e6ec iteration
This commit is contained in:
parent
88f9ec21d7
commit
4388247d56
|
|
@ -0,0 +1,12 @@
|
|||
// Minimal EnergiBridge implementation: convert DeltaMesh primitives into a CatOpt-like structure.
|
||||
#include "EnergiBridge.h"
|
||||
|
||||
void EnergiBridge_map_LocalMarket_to_CatOpt(const LocalMarket* lm, CatOpt_Object* out) {
|
||||
if (!lm || !out) return;
|
||||
// Direct field mapping for toy MVP; in a real bridge this would be richer and versioned
|
||||
out->venue = lm->venue;
|
||||
out->inventory = lm->inventory;
|
||||
out->risk_budget = lm->risk_budget;
|
||||
// Best-effort: initialize a simple static version; in a real system this would be a per-message counter
|
||||
out->version = 1;
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
// Minimal EnergiBridge: bridge DeltaMesh primitives to a vendor-agnostic CatOpt representation
|
||||
// This is a tiny, production-friendly adapter skeleton to demonstrate a canonical bridge
|
||||
// and deterministic data-plane mappings for MVP instrumentation.
|
||||
|
||||
#ifndef ENERGY_BRIDGE_H
|
||||
#define ENERGY_BRIDGE_H
|
||||
|
||||
#include "LocalMarket.h"
|
||||
#include "SharedSignals.h"
|
||||
#include "PlanDelta.h"
|
||||
|
||||
// Canonical CatOpt-like object representation
|
||||
typedef struct CatOpt_Object {
|
||||
const char* venue; // venue identifier
|
||||
double inventory; // per-venue inventory proxy
|
||||
double risk_budget; // risk budget allocated to this venue
|
||||
unsigned long version; // per-message version for replayability
|
||||
} CatOpt_Object;
|
||||
|
||||
// Canonical CatOpt-like signal representation (aggregated signals)
|
||||
typedef struct CatOpt_Signal {
|
||||
double aggregated_greeks;
|
||||
double implied_vol;
|
||||
unsigned long version;
|
||||
} CatOpt_Signal;
|
||||
|
||||
// Canonical CatOpt-like plan delta representation (routing/hedge plan)
|
||||
typedef struct CatOpt_PlanDelta {
|
||||
double quote;
|
||||
double hedge;
|
||||
unsigned long timestamp; // monotonic timestamp for replay
|
||||
unsigned long version;
|
||||
} CatOpt_PlanDelta;
|
||||
|
||||
// Map a LocalMarket instance to a CatOpt_Object. This is intentionally simple and side-effect free.
|
||||
void EnergiBridge_map_LocalMarket_to_CatOpt(const LocalMarket* lm, CatOpt_Object* out);
|
||||
|
||||
#endif
|
||||
Binary file not shown.
BIN
delta_mesh/demo
BIN
delta_mesh/demo
Binary file not shown.
3
test.sh
3
test.sh
|
|
@ -12,7 +12,8 @@ $cc $CCFLAGS -c delta_mesh/admm_lite.c -o delta_mesh/admm_lite.o
|
|||
$cc $CCFLAGS -c delta_mesh/LocalMarket.c -o delta_mesh/LocalMarket.o || true
|
||||
$cc $CCFLAGS -c delta_mesh/SharedSignals.c -o delta_mesh/SharedSignals.o || true
|
||||
$cc $CCFLAGS -c delta_mesh/PlanDelta.c -o delta_mesh/PlanDelta.o || true
|
||||
$cc $CCFLAGS -o delta_mesh/demo delta_mesh/demo_main.o delta_mesh/admm_lite.o delta_mesh/LocalMarket.o delta_mesh/SharedSignals.o delta_mesh/PlanDelta.o
|
||||
$cc $CCFLAGS -c delta_mesh/EnergiBridge.c -o delta_mesh/EnergiBridge.o
|
||||
$cc $CCFLAGS -o delta_mesh/demo delta_mesh/demo_main.o delta_mesh/admm_lite.o delta_mesh/LocalMarket.o delta_mesh/SharedSignals.o delta_mesh/PlanDelta.o delta_mesh/EnergiBridge.o
|
||||
|
||||
echo "Running demo..."
|
||||
./delta_mesh/demo
|
||||
|
|
|
|||
Loading…
Reference in New Issue