SkillEx.Manifest (SkillEx v0.1.0)

View Source

Manifest utilities for the skill aggregator.

Functions here are purposely left unimplemented so the failing tests define the behaviour we need to build.

Summary

Functions

Load and decode the manifest JSON file from disk.

Insert or replace a skill entry.

Save the manifest map back to disk as JSON.

Update the generated_at timestamp.

Types

manifest()

@type manifest() :: map()

Functions

load!(path)

@spec load!(Path.t()) :: manifest()

Load and decode the manifest JSON file from disk.

put_skill(manifest, skill_map)

@spec put_skill(manifest(), map()) :: manifest()

Insert or replace a skill entry.

save!(path, manifest)

@spec save!(Path.t(), manifest()) :: :ok

Save the manifest map back to disk as JSON.

touch_generated_at(manifest, datetime)

@spec touch_generated_at(manifest(), DateTime.t()) :: manifest()

Update the generated_at timestamp.