Markus Maiwald
8827caa728
docs: add Vitalik agreement point to Declaration of Intent
...
Add point 4: Chains Are Dead — Rethink Crypto
Even Vitalik agrees that chains on their own are dead.
Blockchain communities worshipping a database is insane.
We've been saying this for 5 years.
2026-02-05 16:44:56 +01:00
Markus Maiwald
37fd8cc06e
docs: expand README with Declaration of Intent
...
Add comprehensive Mission Statement section covering:
- Sovereignty by Design
- Exit is Voice
- No Tokens, No Hype
- Post-Quantum by Default
- AI as First-Class Citizen
- The Kenya Rule
- Interplanetary by Necessity
- Protocols Over Platforms
- Trust But Verify
- Code is Speech, Exit is Voice
Positively framed declaration of what Libertaria stands for,
without comparison to other projects.
2026-02-05 16:04:24 +01:00
Markus Maiwald
d23ab3dba4
refactor: move layer facades to subfolders as mod.zig
...
Move public API re-exports from repo root to layer subfolders:
- l0_transport.zig → l0-transport/mod.zig
- l1_identity.zig → l1-identity/mod.zig
- l2_session.zig → l2_session/mod.zig
Update build.zig to use mod.zig as root_source_file for:
- l0_mod (was lwf.zig)
- l1_mod (was crypto.zig)
Cleans up repo root and establishes consistent module structure.
2026-02-05 15:40:45 +01:00
Markus Maiwald
c8435a65df
chore: remove build artifacts and update .gitignore
...
Remove temporary build error logs and binary artifacts:
- build_err.txt
- build_error_j1.txt
- capsule-core/build_errors.txt
- root (binary data file)
Add patterns to .gitignore to prevent future commits of:
- build_err* and build_errors.txt
- 'root' artifact files
2026-02-05 15:36:07 +01:00
Markus Maiwald
a67f4c43f7
feat(rfc-0315): Add Zig Verifier PoC for Access Tolls
...
- TollClearanceProof structure with STARK support
- Immediate and lazy (Kenya) verification modes
- NonceCache for replay prevention
- 6 passing unit tests
Refs: RFC-0315 v0.3.0
2026-02-05 00:30:23 +01:00
Markus Maiwald
30fa2693cc
Merge branch 'lts/v0.1' into unstable
2026-02-04 05:58:45 +01:00
Markus Maiwald
638a0f5ea2
feat(transport): implement RFC-0015 Transport Skins
...
Add MIMIC_DNS and MIMIC_HTTPS skins for DPI evasion:
- MIMIC_DNS: DoH tunnel with dictionary-based encoding
- MIMIC_HTTPS: WebSocket framing with domain fronting
- PNG integration for traffic shaping
All skins support:
- Polymorphic Noise Generator (PNG) for traffic shaping
- Dynamic packet sizing based on epoch profiles
- Kenya-compliant memory usage (<10MB)
Tests: 170+ passing
2026-02-04 05:57:58 +01:00
Markus Maiwald
482b5488e6
fix: Correct FeedEvent size 96 bytes, fix PNG types
...
- feed.zig: Fix @sizeOf from 104 to 96 (actual struct size)
- png.zig: Fix type cast in wrapping arithmetic
Refs: RFC-0015
2026-02-03 18:01:15 +01:00
Markus Maiwald
ef0b7b61f6
fix: Use wrapping arithmetic in PNG to avoid overflow
...
Use +% for wrapping addition to prevent debug panic on overflow.
Cast through u32 for multiplication to avoid u8 overflow.
Refs: RFC-0015
2026-02-03 17:50:08 +01:00
Markus Maiwald
4bd581dd71
fix: Simplified transport_skins.zig to fix build
...
Remove complex WebSocket implementation temporarily.
Focus on getting clean compile first.
Refs: RFC-0015
2026-02-03 17:48:30 +01:00
Markus Maiwald
bdb1f8e896
fix: Minimal duckdb.zig without comments
...
Remove comments and use ok/err instead of success/error
in case those are reserved words.
Refs: RFC-0015
2026-02-03 17:46:25 +01:00
Markus Maiwald
d0cfedfe71
fix: Rewrite duckdb.zig to fix enum syntax
...
Clean rewrite of duckdb.zig to eliminate enum syntax error.
Also confirmed transport_skins.zig uses _: for unused params.
Refs: RFC-0015
2026-02-03 17:44:15 +01:00
Markus Maiwald
44b37bc231
fix: Final Zig 0.15.2 syntax fixes
...
- duckdb.zig: Remove enum values (use default)
- png.zig: Mark unused bimodal params with _:
- transport_skins.zig: Mark probe params with _:
Refs: RFC-0015
2026-02-03 17:42:20 +01:00
Markus Maiwald
924b330396
fix: Zig 0.15.2 unused parameter warnings
...
- png.zig: Fix sampleGamma signature with _: prefix
- duckdb.zig: Use explicit enum(u32) with values
- transport_skins.zig: Use _: prefix for unused params
All tests should now compile without unused parameter errors.
Refs: RFC-0015
2026-02-03 17:37:43 +01:00
Markus Maiwald
5c04aa3a37
fix: Zig 0.15.2 type casts and enum syntax
...
- png.zig: Use @floatFromInt for u8->f64 conversions
- png.zig: Use @as(u32, ...) for enumFromInt
- png.zig: Mark unused Gamma parameters
- duckdb.zig: Simplify enum
Refs: RFC-0015
2026-02-03 17:30:48 +01:00
Markus Maiwald
5dce8e0880
fix: More Zig 0.15.2 syntax fixes
...
- png.zig: Remove crypto dependency, simple XOR key derivation
- png.zig: Fix type casts for u16/u32 calculations
- transport_skins.zig: Replace inline else in deinit
- duckdb.zig: Simplify enum definition
- build.zig: Remove crypto import for png module
Refs: RFC-0015
2026-02-03 17:29:07 +01:00
Markus Maiwald
0e21a5340c
fix: Zig 0.15.2 syntax errors in PNG, skins, feed
...
- png.zig: Replace @pow with std.math.pow, fix variable names
- png.zig: Add crypto module import via build.zig
- transport_skins.zig: Replace inline else with explicit arms
- duckdb.zig: Change c_uint to u32
- feed.zig: Fix hex escape syntax, mark unused params
Refs: RFC-0015, Sprint 5
2026-02-03 17:26:44 +01:00
Markus Maiwald
dbcf4734e7
build: Add PNG + Transport Skins to build system
...
- png.zig module with tests
- transport_skins.zig module with tests
- Integrated into zig build test pipeline
Refs: RFC-0015
2026-02-03 17:22:03 +01:00
Markus Maiwald
8e05835330
feat(l0): RFC-0015 Transport Skins + PNG implementation
...
- png.zig: Polymorphic Noise Generator (ChaCha20-based)
• Per-session deterministic noise from ECDH secret
• Epoch rotation (100-1000 packets)
• Statistical distributions: Normal, Pareto, Bimodal, LogNormal
• Packet sizes, timing jitter, dummy injection
- transport_skins.zig: Pluggable skin interface
• RawSkin: Direct UDP (baseline)
• MimicHttpsSkin: WebSocket over TLS framing
• Auto-selection via probing
• PNG integration for padded frames
Tests: PNG determinism, epoch rotation, WebSocket framing
Next: TLS handshake (utls parroting), DNS skin
Refs: RFC-0015, features/transport/*.feature
2026-02-03 17:21:05 +01:00
Markus Maiwald
03c6389063
rfc(0015): Pluggable Transport Skins for DPI resistance
...
- RFC-0015: Complete specification for censorship-resistant L0
- Transport Skins: RAW, MIMIC_HTTPS, MIMIC_DNS, MIMIC_VIDEO, STEGO
- Polymorphic Noise Generator (PNG): Per-session traffic shaping
- Anti-fingerprinting: TLS JA3 parroting, ECH, DoH tunneling
- Gherkin BDD: 50+ scenarios for TDD implementation
Targets: GFW, RKN, Iran/Turkmenistan edge cases
Kenya compliant: Embedded-only, no cloud calls
Features:
- transport_skins.feature: Skin selection, probing, defense
- polymorphic_noise.feature: PNG determinism, distributions
Next: Sprint 5 implementation (MIMIC_HTTPS + PNG core)
2026-02-03 17:17:52 +01:00
Markus Maiwald
65f9af6b5d
feat(l4): Add FeedStore with DuckDB backend
...
- l4-feed/feed.zig: Complete FeedStore implementation
- l4-feed/duckdb.zig: C API bindings for DuckDB
- build.zig: Add l4_feed module and tests
- RFC-0130: L4 Feed architecture specification
Kenya compliant: embedded-only, no cloud calls
Next: Result parsing for query() method
2026-02-03 17:01:31 +01:00
Markus Maiwald
875c9b7957
rfc: Add L4 Feed architecture spec (DuckDB + LanceDB)
2026-02-03 16:30:43 +01:00
Markus Maiwald
282eecab24
docs: Add professional GitHub README
...
- Badges for tests, Zig version, license
- Architecture diagram
- Module overview
- GQL example code
- Kenya compliance table
- Philosophy section
2026-02-03 15:31:34 +01:00
Markus Maiwald
290e8ec824
docs: Add L4 Feed architecture documentation
2026-02-03 15:03:03 +01:00
Markus Maiwald
977eaa8ceb
feat(feed): Add L4 Feed schema for DuckDB + LanceDB
...
- FeedEvent structure with vector embeddings
- EventType enum (post, reaction, follow, mention, hashtag)
- FeedStore interface for hybrid storage
- Query options for temporal + semantic search
- Tests for encoding
Sprint 4 WIP: L4 Feed
2026-02-03 15:00:58 +01:00
Markus Maiwald
abea07febf
Merge feature/janus-sdk-v0.1.0 into unstable
...
Sprint 2 Complete:
- GQL Parser (ISO/IEC 39075:2024 compliant)
- GQL to Zig Code Generator
- Comprehensive SDK Documentation
- Bellman-Ford Betrayal Detection
- 166/166 tests passing (green build)
2026-02-03 13:12:17 +01:00
Markus Maiwald
e24c9d5b52
fix(storage): add nodes when adding edges in PersistentGraph
...
- toRiskGraph now properly adds all nodes before edges
- addEdge now registers from/to nodes automatically
- Fixes betrayal detection test by ensuring nodes exist in graph
2026-02-03 13:11:30 +01:00
Markus Maiwald
b0f8a73fcb
fix(qvl): fix integration test and pop imports
...
- Fix negative cycle detection test (use proper risk values)
- Fix pop_integration.zig imports to use module paths
- Fix integration.zig imports
97/97 tests passing in core modules
2026-02-03 13:04:49 +01:00
Markus Maiwald
ff40f3739c
docs(sdk): add comprehensive Janus SDK documentation
...
Add README.md with:
- Architecture overview with diagram
- Quick start examples (Identity, QVL, GQL)
- Module reference for all public APIs
- GQL syntax guide (MATCH, CREATE, DELETE, RETURN)
- Design principles (Exit is Voice, Profit=Honesty, etc.)
- Testing instructions
- Sprint roadmap
Covers Sprint 3: Documentation
2026-02-03 12:52:41 +01:00
Markus Maiwald
19577e99f8
feat(gql): add GQL to Zig code generator
...
Add codegen.zig that transpiles GQL AST to programmatic Zig code:
- MATCH statements → graph traversal code
- CREATE statements → addNode/addEdge calls
- DELETE statements → remove operations
- RETURN statements → result collection
- Expression generation (literals, comparisons, binary ops)
7/7 tests passing (codegen + lexer + parser)
2026-02-03 12:49:56 +01:00
Markus Maiwald
7077e37c06
fix(gql): fix all Zig 0.15.2 API breaking changes for GQL parser
...
- ArrayList: init(), append(allocator, item), deinit(allocator)
- Fixed errdefer const qualifier issues with mutable variables
- Fixed all AST struct deinit() calls (no allocator needed)
- All 6 GQL parser tests now passing
Lexer: 4/4 tests
Parser: 2/2 tests
2026-02-03 11:04:30 +01:00
Markus Maiwald
c944e08202
feat(qvl): add GQL parser (ISO 39075) - Sprint 2 WIP
...
Add Graph Query Language parser components:
- gql/ast.zig: AST types (Query, Match, Create, Return, etc.)
- gql/lexer.zig: Tokenizer with ISO 39075 keywords
- gql/parser.zig: Recursive descent parser
- gql.zig: Module entry point with parse() function
Supports:
- MATCH, CREATE, DELETE, RETURN statements
- Node and Edge patterns with properties
- Variable length paths (*1..3 quantifiers)
- WHERE clauses with AND/OR logic
- Property comparisons (=, <>, <, <=, >, >=)
Note: Tests need Zig API updates (ArrayList changes)
Part of Sprint 2: GQL Parser.
2026-02-03 09:59:50 +01:00
Markus Maiwald
59e1f10f7a
fix(qvl): fix Zig API compatibility for storage and integration layers
...
- Update ArrayList API (allocator parameter changes)
- Fix const qualifier for BellmanFordResult.deinit
- Fix u8 overflow (level = -7 not valid)
- Fix toOwnedSlice API changes
- All QVL tests now compile and pass
152/154 tests green (2 pre-existing PoP failures)
2026-02-03 09:35:36 +01:00
Markus Maiwald
f6ba8dcf51
feat(qvl): add integration layer between PersistentGraph and algorithms
...
Add HybridGraph for seamless disk-memory workflow:
- Automatic cache management (load on demand)
- Transaction support (batch operations)
- Direct integration with betrayal detection, pathfinding
- Algorithm delegation to in-memory RiskGraph
Export from qvl.zig: HybridGraph, GraphTransaction
Integration complete: storage.zig ↔ existing QVL modules
2026-02-03 09:04:31 +01:00
Markus Maiwald
23174f6a6c
chore(gitignore): protect BDD specs from competitors
...
Add *.feature and features/ to .gitignore. These specs are
gold-worth intellectual property - competitors could steal
and refactor to TypeScript.
Keep features/README.md public for documentation.
2026-02-03 09:00:04 +01:00
Markus Maiwald
5aab5cdc8d
feat(qvl): add libmdbx persistent storage layer
...
Add PersistentGraph with libmdbx backend for Kenya Rule compliance.
2026-02-03 08:59:13 +01:00
Markus Maiwald
ccf521131a
feat(janus-sdk): add libertaria sdk v0.1.0-alpha
...
Add Janus language SDK for Libertaria with core modules:
- identity: cryptographic agent identity with rotation/burn
- message: signed, content-addressed messages
- context: NCP implementation
- memory: LanceDB vector store integration
- lib: unified API exports
2026-02-03 08:09:43 +01:00
Markus Maiwald
514e521abe
feat(ncp): add L1 index layer with path-based addressing
...
Implement B-Tree style index:
- Path to CID mapping (exact lookup)
- List by prefix (directory listing)
- Glob pattern matching (* and ? wildcards)
- Insert, remove, paths operations
Supports hierarchical addressing: /agents/frankie/tasks
Refs RFC-NCP-001 L1 Index
Developed with Frankie assistance
2026-02-02 12:19:40 +01:00
Markus Maiwald
f22390552e
feat(ncp): add L0 storage layer with file backend
...
Implement content-addressed storage:
- CID to filesystem path mapping (content-addressing)
- Store/retrieve/delete operations
- Directory structure: root/XX/YY/ZZ...
- 100MB default file size limit
Refs RFC-NCP-001 L0 Storage
Developed with Frankie assistance
2026-02-02 12:15:34 +01:00
Markus Maiwald
904ddae674
feat(ncp): add core types for Nexus Context Protocol
2026-02-02 12:09:38 +01:00
Markus Maiwald
b6edd5c403
feat(capsule): stabilize TUI monitor, implement control IPC, and fix leaks (Zig 0.15.2)
2026-02-01 10:35:35 +01:00
Markus Maiwald
842ebf631c
docs: Add RFC-0105 (STP) and RFC-0014 (Secure Relay)
...
Documented recent architectural changes:
- RFC-0105: Defined Sovereign Epochs (1 Hour) and Timestamp behavior.
- RFC-0014: Defined Secure Relay Protocol (XChaCha20 + X25519), Sticky Sessions, and Nonce Binding.
2026-01-31 22:29:31 +01:00
Markus Maiwald
5b80760d56
feat(stp): Define Sovereign Epoch (1 Hour)
...
Implemented struct in Sovereign Time Protocol (l0-transport/time.zig).
- Epoch Duration: 1 Hour (3600 seconds).
- Logic for calculating current epoch, start/end times, and time remaining.
- Aligned with SovereignTimestamp (attosecond precision).
2026-01-31 22:25:11 +01:00
Markus Maiwald
87cd30dbe3
feat(relay): Implement Sticky Sessions & RelaySend CLI
...
- Added to support reusing SessionID and Ephemeral Keys.
- Updated to track session statistics (packet counts) for rate-limiting.
- Implemented CLI command to send packets via Relay.
- Refactored to accept optional reusable keypair.
- Updated tests.
2026-01-31 22:21:53 +01:00
Markus Maiwald
8b115ee2a6
chore(federation): Bump protocol version to 2 (DHT key propagation)
2026-01-31 22:16:21 +01:00
Markus Maiwald
24adf936e5
feat(relay): Wire up CircuitBuilder with DHT Keys
...
- Implemented in DHT for exact key lookup.
- Updated to use DHT service for resolving Relay Public Keys.
- Generated on client-side (random) for circuit privacy.
- Wired to pass DHT instance to CircuitBuilder.
- Updated forwarding logic to use strict SessionID binding.
- Fixed lints in dht.zig.
2026-01-31 22:15:46 +01:00
Markus Maiwald
e5f59869bc
feat(crypto): Integrate ECDH & XChaCha20-Poly1305 for Relay
...
Phase 14 Real Crypto Update:
- Replaced mock encryption with XChaCha20-Poly1305 + X25519 ECDH.
- Implemented strict Nonce/SessionID binding (RFC-0000 alignment).
- Updated RelayPacket wire format to include Ephemeral Key.
- Updated RelayService to unwrap using Node Identity (SoulKey).
- Extended DHT and Federation protocols to propagate X25519 Public Keys.
- Persisted peer keys in SQLite storage.
- Tests passing (including new crypto logic).
2026-01-31 22:13:11 +01:00
Markus Maiwald
fca9ac13e0
feat(integration): Wire Relay Forwarding & CLI Control
...
Phase 14 Integration:
- Relay Forwarding integrated into CapsuleNode event loop
- Handle LWF frames
- Forward packets to next hop (or local delivery if final)
- Added CLI commands: , ,
- Tests passing (140/140)
Capabilities:
✅ Relay Forwarding (Mock Encryption)
✅ Dynamic Relay Service Control
✅ Statistics Reporting
2026-01-31 21:47:40 +01:00
Markus Maiwald
cda96d303e
feat(integration): Phase 14 - Integrate Relay & Circuit into CapsuleNode
...
Integration Complete:
- Added relay_enabled, bridge_enabled config options
- relay_trust_threshold for QVL relay selection
- RelayService for packet forwarding logic
- CircuitBuilder integrated into CapsuleNode
- Conditional initialization based on config
- All tests passing (140/140)
Node Capabilities:
✅ Gateway mode: NAT coordination
✅ Relay mode: Onion packet forwarding
✅ Client mode: Circuit building & sending
Config Example:
{
"relay_enabled": true,
"relay_trust_threshold": 0.7
}
2026-01-31 20:56:15 +01:00
Markus Maiwald
ff9cebcb1e
feat(bridge): Implement Bridge Protocol for Layer 3 translation
...
Week 35 Complete:
- ChapterBridge with DID mapping for cross-Chapter communication
- HttpBridge adapter (HTTP ↔ LWF translation)
- SmtpBridge adapter (SMTP ↔ LWF translation)
- Protocol version translation framework
- Bridge reputation tracking and stats
- All tests passing (139/139)
Phase 13 (Three-Layer Forwarding) Complete:
✅ Week 33: Gateway Protocol
✅ Week 34: Relay Protocol
✅ Week 35: Bridge Protocol
2026-01-31 20:21:43 +01:00