hecate_plugin_paths (hecate_sdk v0.6.2)
View SourceStandard directory layout for plugin data.
Replaces per-plugin path modules (e.g., app_scribed_paths.erl). All plugins get the same layout under their data directory:
~/.hecate/plugins/{plugin_name}/ ├── sqlite/ — SQLite read model databases ├── reckon-db/ — ReckonDB event store └── run/ — Runtime files (PID, etc.)
Resolution order for the base directory: 1. application:get_env(hecate, data_dir) — set when running inside hecate-daemon 2. HECATE_HOME env var — set when running as a standalone plugin 3. ~/.hecate — default fallback
Summary
Functions
Root data directory for a plugin.
Create all standard directories for a plugin.
ReckonDB directory for a plugin's event store.
Full path to a named ReckonDB store directory.
Runtime directory for PID files, temp data.
Full path to a named runtime file.
SQLite directory for a plugin's read models.
Full path to a named SQLite database file.
Functions
-spec base_dir(PluginName :: string() | binary()) -> file:filename().
Root data directory for a plugin.
Create all standard directories for a plugin.
-spec reckon_dir(string() | binary()) -> file:filename().
ReckonDB directory for a plugin's event store.
-spec reckon_path(string() | binary(), string()) -> file:filename().
Full path to a named ReckonDB store directory.
-spec run_dir(string() | binary()) -> file:filename().
Runtime directory for PID files, temp data.
-spec run_path(string() | binary(), string()) -> file:filename().
Full path to a named runtime file.
-spec sqlite_dir(string() | binary()) -> file:filename().
SQLite directory for a plugin's read models.
-spec sqlite_path(string() | binary(), string()) -> file:filename().
Full path to a named SQLite database file.