You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Shared stdlib leaf utilities (internal/fileutil, internal/jsonstore, internal/ids, internal/yamlx) — four zero-dependency leaf packages that
consolidate helpers previously duplicated across the codebase (issue #3,
phase 1 of the ROADMAP "Shared library extraction" track):
fileutil: Exists, AtomicWriteFile, AtomicWriteFileFunc — atomic
temp-rename writes with automatic parent-dir creation and cleanup on failure.
jsonstore: Save / Load — marshal+atomic-write and read+unmarshal with
a (found bool, err error) return so a missing file is (false, nil).
ids: TimestampHex(prefix) — <prefix>_<YYYYMMDD_HHMM>_<hex> IDs used
by artifacts, queue items, and hides; RandHex(n) — crypto-random hex for
bearer tokens.
yamlx: ParseBlock, ParseFlat, StripQuotes, SplitKV — the
stdlib-only flat-YAML parser moved out of internal/config and available
to all packages without import cycles.
All duplicated inline copies replaced: internal/scheduler, internal/cache, internal/queue, internal/artifact, internal/hide, internal/cli
migrated onto the new packages. internal/config/yaml.go deleted; its YAML
tests moved to internal/yamlx.
internal/httpx — WriteJSON(w, status, v) and WriteError(w, status, msg):
shared HTTP response helpers extracted from internal/cli. Eliminates 25+
inline w.Header().Set("Content-Type", "application/json") + json.NewEncoder(w).Encode(…) clusters across cmd_serve.go, api_tannery.go, and api_devtools.go (issue #17, phase 2).
yamlx.ParseFlatLines — like ParseFlat but also returns a map[string]int of field name → 1-indexed source line number, enabling file:line prefixes in schema violation output (issue #17, phase 2).
schema.Violation.Line — new Line int field (0 = unknown) populated
by ValidateFlat when line data is available. leather validate now emits schema: file:N: field "…": … for config/skill/toolset/worker YAML files.
leather snapshot save / restore — built-in point-in-time backup and
restore for runtime state (issue #6). save archives queues/, runs/,
and cache/ (plus tannery hide_dir/ and artifact_dir/ when configured)
into a tar.gz file, skipping transient files (leather.lock, devtools.token). restore extracts into the configured state directory
with a non-empty-dir guard (--force to override). Both commands verify
that leather serve is not running before proceeding.
DevTools queue.run event — when the scheduler dequeues an item and
begins a direct agent run, a queue.run event is emitted on the DevTools
bus with queue name, item ID, hide ID, attempt count, and payload key names
(values are never exposed). Each subsequent runner event is causally linked
to the queue.run event via AppendCause, making the queue→agent lineage
visible in the DevTools DAG view (issue #11).
leather attach — new subcommand that joins a running serve instance
and streams pretty-printed DevTools events to the terminal (issue #19).
Reads the DevTools token from the state directory, connects to the /api/devtools/events SSE endpoint, and renders each event with
color-coded kind labels, entity references, and payload key-value pairs.
Supports --filter to scope output by event kind or source, and --no-reconnect to exit on stream close instead of reconnecting with
exponential backoff.