fetch_ml/cli/src/server.zig
Jeremie Fraeys 551597b5df
feat(cli): Add core infrastructure for local mode support
- mode.zig: Automatic online/offline mode detection with API ping
- manifest.zig: Run manifest read/write/update operations
- core/: Common flags, output formatting, and context management
- local.zig + local/: Local mode experiment operations
- server.zig + server/: Server mode API client
- db.zig: Add pid column to ml_runs table for process tracking
- config.zig: Add force_local, [experiment] section with name/entrypoint
- utils/native_bridge.zig: Native library integration
2026-02-20 21:28:06 -05:00

22 lines
654 B
Zig

//! Server mode operations module
//!
//! Provides implementations for CLI commands when running in server mode (WebSocket).
//! These functions are called by the command routers in `src/commands/` when
//! `Context.isServer()` returns true.
//!
//! ## Usage
//!
//! ```zig
//! const server = @import("../server.zig");
//!
//! if (ctx.isServer()) {
//! return try server.experiment.list(ctx.allocator, ctx.json_output);
//! }
//! ```
//!
//! ## Module Structure
//!
//! - `experiment_api.zig` - Experiment API operations via WebSocket
//! - Future: `run_api.zig`, `metrics_api.zig`, etc.
pub const experiment = @import("server/experiment_api.zig");