Expand description
Job directory management for agent-exec v0.1.
Resolution order for the jobs root:
--rootCLI flagAGENT_EXEC_ROOTenvironment variable$XDG_DATA_HOME/agent-exec/jobs~/.local/share/agent-exec/jobs
Structs§
- Ambiguous
JobId - Sentinel error type when a job ID prefix matches multiple job directories.
Used by callers to emit
error.code = "ambiguous_job_id"instead ofinternal_error. - Head
Metrics - Metrics for the head slice of a log file.
- Invalid
JobState - Sentinel error type for invalid job state transitions.
Used by callers to emit
error.code = "invalid_state"instead ofinternal_error. - JobDir
- Handle to a specific job’s directory.
- JobId
Collision Exhausted - Sentinel error type when job ID generation exhausts all retry attempts.
Used by callers to emit
error.code = "io_error"instead ofinternal_error. - JobNot
Found - Sentinel error type to distinguish “job not found” from other I/O errors.
Used by callers to emit
error.code = "job_not_found"instead ofinternal_error. - Tail
Metrics - Metrics returned by
JobDir::read_tail_metrics.
Constants§
Functions§
- generate_
job_ id - Generate a new hash-like job ID (
[0-9a-f], fixed-length) that is unique underroot. - resolve_
root - short_
job_ id - Human-facing short job ID for list-like displays.