Skip to main content

Crate studio_worker

Crate studio_worker 

Source
Expand description

Library surface for the studio-worker binary.

Exposes the worker’s modules so integration tests (and downstream tooling) can drive the contract without going through the CLI.

Modules§

auto_register
Auto-register state machine — the only registration path.
cli
Clap CLI definitions, kept out of main.rs so they’re testable.
config
Persistent config in ~/.config/minis-studio-worker/config.toml (Linux/macOS) or %APPDATA%\minis-studio-worker\config.toml (Windows).
engine
Pluggable inference engines, generalised to all task kinds.
http
Thin reqwest wrapper around the studio API.
runtime
Long-running auto-update task + one-shot CLI helpers.
service
OS service install/uninstall. Linux: systemd –user. macOS: launchd plist template (written but not loaded — operator runs launchctl load). Windows: schtasks template (written but not registered — operator runs the printed command).
sys
Host-system probes: hostname, OS user, VRAM.
telemetry
Sentry telemetry — opt-in error/panic reporting.
types
Shared wire-format mirrors of the studio API.
update
Auto-update: poll a GitHub Releases feed, download cargo-dist’s platform installer when a newer semver is available, and re-exec ourselves so the new binary takes over.
ws
WebSocket worker-channel module.

Constants§

AGENT_VERSION
RELEASE_NAME
Sentry release identifier in the <pkg>@<version> form expected by Sentry’s organisation-wide Releases feature. Bare version strings collide across projects in the same org, so we namespace with the crate name. Matches what sentry::release_name!() would expand to.

Functions§

run_cli
Dispatch table for the CLI subcommands. Lives in the library so we can drive it from tests without invoking the binary.