Referencia Zigmedia-daemon: identidad del binario (--version, --interfaces)

media-daemon/ipc/build_info.zig

Declaraciones públicas de media-daemon/ipc/build_info.zig (media-daemon: identidad del binario (--version, --interfaces)).

ImplementadoSin versión del tren todavía· generada desde apps/docs/generated/zig/media-daemon-ipc-build-info.json

Página generada desde native/zig/media-daemon/ipc/build_info.zig. No se edita a mano: bun run docs:gen la regenera y bun run docs:check falla si difiere.

Identity of the daemon binary (dec-0123 D4, track/release-engineering#02).

styx-media-daemon --version prints the component, its SemVer, the train and the commit the build was made from; --interfaces prints, as one JSON line, every wire version this binary speaks. The values come from the build (-Dversion, -Dcommit, -Dtrain, see releaseInfo in build.zig) and from the protocol modules themselves (spire envelope/handshake/SCT, conduit wire, the generated bus contracts), so they cannot drift from the code. styx update and playback-svc compare this output with the release manifest before trusting a daemon.

component

const · línea 19

pub const component = "media-daemon"

Release component name (release/components.yml).

version

const · línea 21

pub const version: []const u8 = build_options.version

SemVer of the component (-Dversion).

commit

const · línea 23

pub const commit: []const u8 = build_options.commit

Commit the binary was built from (-Dcommit).

train

const · línea 25

pub const train: []const u8 = build_options.train

Release train this build belongs to (-Dtrain).

session_ipc_version

const · línea 30

pub const session_ipc_version: u8 = 0x02

Frame version of the control socket (protocols/session-ipc/version-history.md: 0x02 = spire over unix, dec-0120). test/release-daemon-identity.test.ts checks it against the last row of that history.

writeVersion

fn · línea 33

pub fn writeVersion(w: *std.Io.Writer) std.Io.Writer.Error!void

--version: one human line.

writeInterfaces

fn · línea 38

pub fn writeInterfaces(w: *std.Io.Writer) std.Io.Writer.Error!void

--interfaces: one JSON line with every wire version of this binary.

handleFlag

fn · línea 64

pub fn handleFlag(arg: []const u8, out: []u8) ?[]const u8

Handles --version / --interfaces (the only flags the daemon takes; its configuration is the environment). Returns true when it printed and the process must exit 0 without starting.