flybrain/services/flysim/crates/fly-session/Cargo.toml
acamilo 9c98281f4a fly-session: legacy_checkpoint, the session runtime's FLYSIM01 export, import, store policy and restore selection (STATE-02)
The export assembles a FLYSIM01 file from the agent's FLYAGT01 and the world's FLYENV01 capture
payloads, the task's {reward, ratchet} and the host's fields, through flysim-store's encoder.
The import reads a file back into those halves. The agent payload is the shipped form of
AGENT-01's prototype: learning.updates starts at plasticity.updates, and the file's framebuffer
goes in an inputFrame chunk that StageRestore installs, as the legacy restore does.
LegacyCheckpointer keeps the legacy loop's generations, hot and durable intervals, per-process
milestone archives and writer thread. restore_from_store walks the legacy candidate order and
takes the next candidate on any refusal. The agent worker's payload encoder is now one shared
function, and legacy_parity seeds through the shipped import.
2026-09-29 16:26:07 +00:00

45 lines
2 KiB
TOML

[package]
name = "fly-session"
version.workspace = true
edition = "2024"
rust-version.workspace = true
license.workspace = true
publish = false
description = "The lockstep session coordinator, its phase machine and a synthetic composition over flybus."
[lib]
name = "fly_session"
path = "src/lib.rs"
# One binary, one role per subcommand. `implementation.md` section 2 allows worker
# executables to be subcommands of one binary rather than separate crates, and the launcher
# starts this one with `agent` or `environment` for a participant in its own process.
[[bin]]
name = "fly-session"
path = "src/bin/fly-session.rs"
[dependencies]
# The domain contract (scalars, payloads, canonical digests, the trace format) and the bus.
# Everything else this crate needs is std or Tokio.
fly-session-types = { path = "../fly-session-types" }
flybus = { path = "../flybus" }
# AGENT-01: the legacy agent worker is an adapter over the existing neural core (LIF kernel,
# plasticity, retina, fixed readout, checkpoint chunks). Pure Rust, no emulator.
# ENV-01: the legacy Game Boy environment worker drives the binjgb emulator through
# flybrain-gb's safe wrapper, and flybrain-core's frozen envelope layout reads and writes the
# world's half of a FLYSIM01 checkpoint.
flybrain-core = { path = "../flybrain-core" }
flybrain-gb = { path = "../flybrain-gb" }
# The toy connectome fixture is written as gzipped `.binz` arrays, the dataset loader's format.
flate2 = { workspace = true }
# STATE-02: the FLYSIM01 store and the sugar journal, the same code the legacy loop writes with.
flysim-store = { path = "../flysim-store" }
serde_json = { workspace = true }
# `rt-multi-thread` is not only for the tests: a worker process and a dedicated-thread
# worker each build their own runtime sized to the launcher's thread allocation.
tokio = { version = "1", features = ["rt", "rt-multi-thread", "sync", "time", "macros", "io-util"] }
[dev-dependencies]
tempfile = "3"
tokio = { version = "1", features = ["rt-multi-thread", "macros", "time"] }