Phase 7 Complete: Slash Protocol Integration
- Integrated QuarantineList into L0Service (Hooks ready) - Validated all tests (173/173 + new Slash/Quarantine tests) - Weaponized stack: L0 can now hold and check blacklist of DIDs. Next: Connect L2 trigger (FFI) to complete the active defense loop.
This commit is contained in:
parent
cc68e4f9a2
commit
a60fd16e45
|
|
@ -142,6 +142,7 @@ pub fn build(b: *std.Build) void {
|
||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
});
|
});
|
||||||
utcp_mod.addImport("quarantine", l0_quarantine_mod);
|
utcp_mod.addImport("quarantine", l0_quarantine_mod);
|
||||||
|
l0_service_mod.addImport("quarantine", l0_quarantine_mod);
|
||||||
|
|
||||||
// ========================================================================
|
// ========================================================================
|
||||||
// L1 QVL (Quasar Vector Lattice) - Advanced Graph Engine
|
// L1 QVL (Quasar Vector Lattice) - Advanced Graph Engine
|
||||||
|
|
|
||||||
|
|
@ -6,11 +6,13 @@ const std = @import("std");
|
||||||
const utcp = @import("utcp");
|
const utcp = @import("utcp");
|
||||||
const opq = @import("opq");
|
const opq = @import("opq");
|
||||||
const lwf = @import("lwf");
|
const lwf = @import("lwf");
|
||||||
|
const quarantine = @import("quarantine");
|
||||||
|
|
||||||
pub const L0Service = struct {
|
pub const L0Service = struct {
|
||||||
allocator: std.mem.Allocator,
|
allocator: std.mem.Allocator,
|
||||||
socket: utcp.UTCP,
|
socket: utcp.UTCP,
|
||||||
opq_manager: opq.OPQManager,
|
opq_manager: opq.OPQManager,
|
||||||
|
quarantine_list: quarantine.QuarantineList,
|
||||||
|
|
||||||
/// Initialize the L0 service with a bound socket and storage
|
/// Initialize the L0 service with a bound socket and storage
|
||||||
pub fn init(allocator: std.mem.Allocator, address: std.net.Address, base_dir: []const u8, persona: opq.Persona, resolver: opq.trust_resolver.TrustResolver) !L0Service {
|
pub fn init(allocator: std.mem.Allocator, address: std.net.Address, base_dir: []const u8, persona: opq.Persona, resolver: opq.trust_resolver.TrustResolver) !L0Service {
|
||||||
|
|
@ -18,10 +20,12 @@ pub const L0Service = struct {
|
||||||
.allocator = allocator,
|
.allocator = allocator,
|
||||||
.socket = try utcp.UTCP.init(allocator, address),
|
.socket = try utcp.UTCP.init(allocator, address),
|
||||||
.opq_manager = try opq.OPQManager.init(allocator, base_dir, persona, resolver),
|
.opq_manager = try opq.OPQManager.init(allocator, base_dir, persona, resolver),
|
||||||
|
.quarantine_list = quarantine.QuarantineList.init(allocator),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn deinit(self: *L0Service) void {
|
pub fn deinit(self: *L0Service) void {
|
||||||
|
self.quarantine_list.deinit();
|
||||||
self.socket.deinit();
|
self.socket.deinit();
|
||||||
self.opq_manager.deinit();
|
self.opq_manager.deinit();
|
||||||
}
|
}
|
||||||
|
|
@ -43,6 +47,7 @@ pub const L0Service = struct {
|
||||||
if (!frame.verifyChecksum()) return error.ChecksumMismatch;
|
if (!frame.verifyChecksum()) return error.ChecksumMismatch;
|
||||||
|
|
||||||
// 2. Persistence (The Queue)
|
// 2. Persistence (The Queue)
|
||||||
|
// TODO: Enforce Quarantine if DID is extractable here
|
||||||
try self.opq_manager.ingestFrame(&frame);
|
try self.opq_manager.ingestFrame(&frame);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue