NETWORK TOPOLOGY (SYNDICATE MODE)
To support SYNDICATE PROTOCOL, the underlying Node.js daemon requires state expansion from a localized array to a multi-client mesh.
1. STATE MANAGEMENT SCHEMA
The dbState object must evolve to handle multi-tenant tracking and global integrity pools.
// Proposed Architecture Upgrade (server.js)
let networkState = {
mode: 'SYNDICATE', // LONE_WOLF | SYNDICATE
squadIntegrity: 3, // Starts at 3. Reaching 0 triggers Global Wipe.
nodes: {
"socket-id-1": { opId: "GHOST", ip: "192.168.1.5", activeTaskCount: 2 },
"socket-id-2": { opId: "VIPER", ip: "192.168.1.9", activeTaskCount: 5 }
},
tasks: [
{
id: "uuid-1",
text: "Reboot the mainframe",
owner: "VIPER", // The node currently holding the task
handler: "GHOST", // Who assigned it (requires their confirmation)
status: "ACTIVE", // ACTIVE | PENDING_VERIFICATION | NEUTRALIZED
createdAt: 1690000000,
updatedAt: 1690000000,
deletedAt: null
}
]
}
2. SOCKET EVENT LIFECYCLES
New WebSocket events will be required to handle the Two-Key Turn and Cross-Node routing.
A. Connection & Discovery
join_syndicate (opId): Client registers their codename. Server responds by broadcastingsquad_updatecontaining the new radar list.squad_update: Broadcasts thenetworkState.nodesto all clients to populate the Squad Radar UI.
B. The Delegation Loop
delegate_directive (payload): Emitted by Handler (GHOST). Server checks if Assignee (VIPER) is at capacity (5).- If Full: Emits
delegation_rejectedback toGHOST. - If Available: Emits
incoming_directivespecifically toVIPER's socket ID.
- If Full: Emits
accept_directive (taskId): Emitted byVIPER. Server writes task to DB and syncs state.
C. The Two-Key Turn Loop
request_verification (taskId): Emitted byVIPERwhen checking the box. Server changes status toPENDING_VERIFICATION. Server emitsverify_requiredtoGHOST.confirm_kill (taskId): Emitted byGHOST. Server permanently purges task, frees slots, updates stats.deny_kill (taskId): Emitted byGHOST. Server flips status back toACTIVE.
D. Mutually Assured Destruction
- Server's
setIntervalruns every minute checkingcreatedAtvsEXPIRY_MS(7 days). - If task expires:
networkState.squadIntegrity -= 1. - Server broadcasts
integrity_strike. - If
networkState.squadIntegrity === 0: Server immediately broadcastsglobal_scorched_earth. All local storages are wiped, DB is zeroed out.
3. SECURITY & CHEATING
Because CIPHER.SYS runs locally, the "server" is just whichever team member booted the Node.js process first.
* There are no user accounts. Identity is based on OP-ID string claiming.
* If the host computer goes offline, the Syndicate drops. Operatives will fall back to LONE WOLF mode with whatever tasks were last synced to their browser's localStorage.