feat(maestro): stamp the daemon with its build commit
`GET /api/info` now carries `build` (commit hash, commit date, dirty flag) and `instance`, a fresh uuid per daemon process. Together they let a client name the release it is talking to and, after losing its socket, tell an upgrade from a plain restart from a network blip. The stamp comes from `maestro-daemon/build.rs`, which reads the git checkout it compiles in. The Nix build has no `.git` in the crane-filtered source, so `flake.nix` passes the flake's own revision and last-modified date through `MAESTRO_BUILD_*` instead. Neither available leaves the fields empty. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
f89be4a716
commit
eaf60d9dac
@@ -86,6 +86,24 @@ export interface DaemonInfo {
|
||||
home_dir?: string;
|
||||
/** Command presets (claude/opencode/zsh + custom), config-resolved. */
|
||||
presets: SpawnPreset[];
|
||||
/** Which commit the daemon was built from. Absent on older daemons. */
|
||||
build?: BuildInfo;
|
||||
/** Identity of the daemon *process*, regenerated on every start — a changed
|
||||
* value across a reconnect means the daemon restarted. Absent on older
|
||||
* daemons, which the restart flow treats as "cannot tell". */
|
||||
instance?: string;
|
||||
}
|
||||
|
||||
/** Build provenance of the running daemon: what the status indicator names in
|
||||
* its tooltip, and what tells an upgrade apart from a plain restart. Every
|
||||
* field is empty when the binary was built outside a git checkout. */
|
||||
export interface BuildInfo {
|
||||
/** Abbreviated commit hash. */
|
||||
commit: string;
|
||||
/** Commit date, RFC 3339. */
|
||||
commit_date: string;
|
||||
/** Whether the tree had uncommitted changes at build time. */
|
||||
dirty: boolean;
|
||||
}
|
||||
|
||||
/** One deduplicated recent working dir for the spawn form's recents picker
|
||||
|
||||
Reference in New Issue
Block a user