build(agent): molt-by#23c260 iteration
This commit is contained in:
parent
c7999a7741
commit
c50cd74126
|
|
@ -1,12 +1,35 @@
|
||||||
// Lightweight protocol scaffold for Open-EnergyMesh 0.2 core ontology
|
// Lightweight protocol scaffold for Open-EnergyMesh 0.2 core ontology
|
||||||
// This file provides tiny, versioned data contracts used by adapters.
|
// This file provides tiny, versioned data contracts used by adapters.
|
||||||
|
|
||||||
|
// Privacy budget and audit trail primitives to support privacy-preserving
|
||||||
|
// aggregation and governance provenance in the MVP.
|
||||||
|
class PrivacyBudget {
|
||||||
|
constructor(limit = 0, allocated = 0) {
|
||||||
|
this.limit = limit; // maximum allowed budget (abstract unit)
|
||||||
|
this.allocated = allocated; // amount currently allocated/used
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class AuditLog {
|
||||||
|
constructor(entries = []) {
|
||||||
|
this.entries = entries; // array of audit entries
|
||||||
|
}
|
||||||
|
addEntry(entry) {
|
||||||
|
this.entries.push(entry);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Lightweight protocol scaffold for Open-EnergyMesh 0.2 core ontology
|
||||||
|
// This file provides tiny, versioned data contracts used by adapters.
|
||||||
|
|
||||||
class LocalProblem {
|
class LocalProblem {
|
||||||
constructor(version = '0.2') {
|
constructor(version = '0.2') {
|
||||||
this.version = version;
|
this.version = version;
|
||||||
this.variables = {}; // local optimization variables
|
this.variables = {}; // local optimization variables
|
||||||
this.constraints = []; // local constraints
|
this.constraints = []; // local constraints
|
||||||
this.objective = null; // objective description or function reference
|
this.objective = null; // objective description or function reference
|
||||||
|
this.privacyBudget = new PrivacyBudget();
|
||||||
|
this.auditLog = new AuditLog();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -27,5 +50,7 @@ class PlanDelta {
|
||||||
module.exports = {
|
module.exports = {
|
||||||
LocalProblem,
|
LocalProblem,
|
||||||
SharedVariables,
|
SharedVariables,
|
||||||
PlanDelta
|
PlanDelta,
|
||||||
|
PrivacyBudget,
|
||||||
|
AuditLog
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue