## Documentation & Organization - Moved copilot_issues.txt → 00_MASTER_ROADMAP.md (phases folder) - Created Phase 9.79b.1 & 9.79b.2 plans for unified Box implementation - Updated unified-box-design-deep-analysis.md with ChatGPT5 insights - Added P2P documentation and examples (ping-pong, self-ping) ## Code Updates - P2PBox: Reverted to original error state for demonstration - VM: Enhanced BoxCall dispatch for unified approach - Updated box factory, interpreter calls, and transport layer ## Cleanup & Privacy - Removed private/ and private_test/ from git tracking - Added private folders to .gitignore for security - Cleaned root directory: moved backups, removed temp files - Moved consultation files to docs/archive/consultations/ ## Other Improvements - Added object literal syntax improvement idea - Updated CLAUDE.md with master roadmap reference - Updated CURRENT_TASK.md with latest progress 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1.4 KiB
1.4 KiB
P2PBox - Modern P2P Node (InProcess)
Status: Experimental (Phase 9.79a)
Overview
- Structured messaging with
IntentBox(name, payload) - Local in-process routing via
MessageBus - Deterministic smoke demo available without timers
API
new P2PBox(nodeId: String, transport: String)send(to: String|Box, intent: IntentBox) -> ResultBoxon(name: String, handler: MethodRef) -> ResultBoxonOnce(name: String, handler: MethodRef) -> ResultBoxoff(name: String) -> ResultBoxgetNodeId() -> StringisReachable(nodeId: String) -> BoolgetTransportType() -> StringdebugNodes() -> String(inprocess only)debugBusId() -> String(inprocess only)getLastFrom() -> String(loopback trace)getLastIntentName() -> String(loopback trace)
Notes:
- Handlers currently accept a method reference (
MethodBox) rather than an inline function literal. - For quick loopback smoke without handlers, send to self and read
getLast*().
Quick Smoke (No Handlers)
alice = new P2PBox("alice", "inprocess")
msg = new IntentBox("ping", { })
res = alice.send("alice", msg)
print("last.from=" + alice.getLastFrom())
print("last.intent=" + alice.getLastIntentName())
Two-Node Ping-Pong (Concept)
This is covered in unit tests; handler wiring uses MethodBox internally. A higher-level sugar for method references will arrive in later phases.