v0.0.13¶
New: lyth CLI¶
Command-line interface for running the lythonic compose engine.
lyth start— loadlyth.yaml, activate triggers, run poll loop with PID file and SIGTERM handling.lyth stop— send SIGTERM to a running engine instance.lyth run <nsref>— one-shot DAG or callable execution.lyth fire <trigger>— manually fire a trigger.lyth status— show running state, trigger activations, last runs.- File logging —
data/lyth.logwithNodeRunLogFilterinjectingrun_idandnode_labelinto every log record.
New: Namespace Serialization¶
Namespace.to_dict()— serialize all node configs to a list of dicts (YAML/JSON-ready).Namespace.from_dict(entries)— build a namespace from serialized node configs, resolving grefs.
Changed¶
- Flat Namespace — removed hierarchical branches. Namespace is now a
flat
dict[str, NamespaceNode]keyed by full nsref. Dot-access matches by leaf name only. NsNodeConfigalways present — everyNamespaceNodehas aconfig: NsNodeConfig(auto-created if not provided).nsrefandtagsare now properties delegating toconfig.NsCacheConfig— structured config for cached callables, replaces ad-hocmetadata["cache"]dict.- Type discriminator —
NsNodeConfig.typefield ("auto","cache") for Pydantic deserialization to the right subclass. - Triggers on nodes —
TriggerConfigis now a list onNsNodeConfig.triggers(zero or many per node). RemovedNamespace.register_trigger(),TriggerDef. TriggerConfig.payload— optional default payload for triggers.fire(payload=None)uses config default; explicit payload overrides.engine.py—StorageConfig(cache_db, dag_db, trigger_db, log_file) andEngineConfig(storage + namespace entries).
Fixes¶
GRefaccepts bothstrandGlobalRefin Pydantic models.TriggerManager.fire()handles non-DAG callables (wraps result in syntheticDagRunResult).- CLI help handles string annotations from
from __future__ import annotations.
Removed¶
namespace_config.py— deleted along with tests and reference page. Replaced byNsNodeConfig+Namespace.to_dict()/from_dict().- Namespace branches —
_branches,_get_or_create_branch,_get_branchremoved.
Documentation¶
- Rewritten README and index page with data-flow framing.
- Added
lythquickstart tutorial. - Added
make docsto default make target.