Northeastern-Electric-Racing / Northeastern-Electric-Racing/Calypso

[SIM] - Unified calypso-sim binary with JSON-RPC streaming control plane

Open
#305 0 comments 0 reactions 1 assignee View on GitHub

@bracyw is already working on this.

Since Apr 26, 2026.

Dominant language
Rust
Stars
2
Forks
2
Avg merge
6d 20h
Merged PRs (30d)
3

Description

Current Features

Two separate simulator binaries:

  • manual-sim (#292) — interactive keypress injector.
  • simulate — autonomous heartbeat for every topic with sim_freq.

They duplicate the MQTT setup and publish path, they can't run at the same time, and there's no way for an agent to control either one.

Desired Additional Features

Replace both with a single calypso-sim binary (folder layout under src/bin/calypso-sim/) with four modes that can run together:

Flag Mode
--auto Autonomous heartbeat (default when no other mode is chosen)
--key-map FILE Interactive raw-mode keypress
--script FILE Replay keymap keys from a text file
--stream JSON-RPC 2.0 over stdio, for an agent

A per-topic owner field (auto / stream / silenced) lets stream and keymap modes claim / release / silence topics, and the autonomous loop skips topics it doesn't own. Stream methods: publish, claim, release, silence, status, list_topics, ping.

Acceptance Criteria
  • manual-sim and simulate are deleted; replaced by src/bin/calypso-sim/ modules.
  • All four modes work and can run together (--auto runs in the background while --key-map or --stream is active).
  • TopicRegistry tracks ownership; the autonomous tick checks it before publishing.
  • Stream mode implements the seven methods with JSON-RPC 2.0 errors.
  • Tracing goes to stderr; stdout is reserved for JSON-RPC and keymap logs.
  • Startup prints a list of topics with no sim_freq.
  • README documents the modes, keymap formats, and the stream protocol.
  • cargo clippy --bin calypso-sim is clean.
Out of Scope

Stream subscribe for observing other programs, VCU-style request/response, Unix-socket transport, compile-time unsim list.

Builds on #292.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.