How csp911/poke works
POKE is a hub-and-edge system that turns natural-language requests into ephemeral machine code for bare-metal devices. The main path runs from a user request through hub routing, code generation and compilation, then transport to an edge kernel for execution and a result back to the hub. Other documented capabilities include persona caching, voice and event handling, distributed compute, and autonomous multi-hub operation. Some branches are supported only by the README and source index; their detailed runtime wiring is not shown in the excerpts.
Main entry points: server.js HTTP API · transport.js Edge transport · agent.js Agent loop · index.js Hub entry
Components 25
Hub runtime
- Hub entry
index.js - HTTP API
hub/server.js - Agent loop
hub/agent.js - LLM planning
hub/llm.js - Code compiler
hub/compiler.js - Persona cache
hub/asmcache.js - Edge registry
hub/nodes.js - Edge transport
hub/transport.js - Serial transport
hub/frame-transport.js - Edge context
hub/context.js - Conversation memory
hub/memory.js
Bare-metal edges
- x86 edge
edge/kernel/x86/kernel.c - Pi 4 edge
edge/kernel/pi4/kernel.c - ARM64 edge
edge/kernel/arm64/kernel.c - RISC-V edge
edge/kernel/rv32/kernel.c - ESP32-C3 edge
edge/kernel/esp32c3/kernel.c - Pi Zero edge
edge/kernel/pi0w/kernel.c
User interfaces
- POKE CLI
lib/cli/persona.js - Distributed compute
lib/cli/burst.js
Distributed operation
- Federation modes
orchestration/autonomous.js - Edge simulator
orchestration/simulator.js
Body simulation
- Voice skill coaching
sim/body/coach.py - Edge skill store
sim/body/edgestore.py - Simulated edge
sim/body/pokeedge.py
Other components
- User
Connections 22
- User → HTTP API: sends request
- Hub entry → HTTP API: starts API
index.js - Hub entry → Edge registry: loads profiles
index.js - Hub entry → Agent loop: routes edge events
index.js - HTTP API → Agent loop: invokes agent
hub/server.js - HTTP API → LLM planning: generates assembly
hub/server.js - Agent loop → Code compiler: compiles code
hub/agent.js - Agent loop → Edge transport: sends binary
hub/agent.js - Agent loop → Edge registry: selects edge
hub/agent.js - HTTP API → Edge context: reads context
hub/server.js - Edge context → Edge transport: reads and writes
hub/context.js - Edge transport → x86 edge: sends machine code
- Edge transport → Pi 4 edge: sends machine code
- Edge transport → RISC-V edge: sends machine code
- Edge transport → Pi Zero edge: sends machine code
- Serial transport → ESP32-C3 edge: frames commands
- HTTP API → Persona cache: uses persona cache
hub/server.js - POKE CLI → HTTP API: requests transformation
- Distributed compute → x86 edge: dispatches workers
- Federation modes → Edge simulator: runs federation
- Voice skill coaching → Edge skill store: stores learned skills
sim/body/coach.py - Voice skill coaching → Simulated edge: trains simulated edge
sim/body/coach.py