Something went wrong. Try again.
small gleam coding and (not yet) persistent agent daemon with a detachable cli forked from okami.mom/albedo
Something went wrong. Try again.
1234567891011121314151617181920212223"""Content hash of the packaged python tree.
The remote plugin stages a bundle under this hash, and a detached kernel andits bridge announce it, so the daemon can tell when a kernel runs older codethan the daemon's own tree."""
from __future__ import annotations
import hashlibfrom pathlib import Path
ROOT = Path(__file__).resolve().parent
def digest(root: Path = ROOT) -> str: """sha256 over every .py file's relative path and bytes, in path order.""" hasher = hashlib.sha256() for path in sorted(root.rglob("*.py")): hasher.update(str(path.relative_to(root)).encode()) hasher.update(path.read_bytes()) return hasher.hexdigest()