This document defines the operational protocols that keep CIPHER deterministic.
Purpose: Guarantee clean startup with one command.
Entry: cipher up
Sequence:
- Stop existing local daemon/MCP if present.
- Kill stale listeners if needed.
- Remove runtime artifacts (
pid/state/log/lock). - Probe LAN for authoritative host.
- If host found: enter
JOINmode and open host URL. - If host not found: start fresh local host daemon.
Success criteria: Single active authoritative host target, no duplicate local daemons.
Purpose: Keep discovery resilient when mDNS is blocked.
Priority:
cipher.local(best effort)- direct host IP (
http://<host-ip>:4040)
Contract: CIPHER must still be usable via IP when cipher.local fails.
Purpose: Enforce real priority by expiration pressure.
Policy: Tasks older than 7 days are purged.
In Syndicate mode: Expiry causes integrity strike against shared squad pool.
Purpose: Exit condition by design, not endless engagement.
Triggers:
- Mission completion pathway.
- Manual burn pathway.
- Global integrity collapse in Syndicate mode.
Effects:
- Task wipe.
- Mission debrief export.
- Host termination sequence.
Purpose: Cross-node task assignment with capacity constraints.
Mechanics:
@OPID payloaddelegation style.- Reject if target is at max capacity.
- Target receives incoming directive modal.
Purpose: Prevent fake completion in collaborative mode.
State path:
ACTIVE -> PENDING_VERIFICATION -> NEUTRALIZED
Rules:
- Assignee can request verification.
- Handler confirms or denies kill.
Purpose: Synchronize shutdown-aware UI behavior.
Event: host_terminating
Client response:
- Enter destructed state path.
- Clear local active state.
- Continue mission-close UX.
Purpose: Prevent split-brain task timelines across devices.
Rules:
- Server
sync_stateis authoritative. - Clients do not push full local state on initial connect.
- Mutations are locked when disconnected from authority.
Purpose: Produce post-run artifact for human tracking.
Output: Downloadable .txt report with:
- operator id
- outcome reason
- session task summary
- cumulative telemetry stats
Purpose: Avoid ghost identity/session leakage after terminal burn.
Behavior: Remove CIPHER-owned local storage keys on destructive exit path.
Purpose: Make state changes legible under focus mode.
Engine: WebAudio procedural synthesis.
Signals include:
- keystroke clicks
- success ping
- alarm/warning
- purge static burst
- incoming directive ringtone
Purpose: Keep motivational pressure local and private.
Transport: Ollama on 127.0.0.1:11434
Flow:
- Poll available models.
- Build contextual prompt from host/task telemetry.
- Emit handler message back to UI.
No cloud dependency required.
Purpose: Continue operations from another device without accounts.
Composition:
- socket state sync
- LAN discovery (
cipher.localbest effort) - mandatory manual IP fallback
- browser-local persistence for reconnect continuity