Prepare dependency generations before selecting them. Keep shipped tool bytes separate from writable additions, and store facts beside their entries. Validate proposed plugin sets before config publication. Restore the previous config if the facts write fails. Consolidate duplicate updater, backup, setup, and voice helpers. Repair launcher selection, dependency consumers, download ownership, update feeds, and native Windows process and file handling. Verification: 206 changed/prior-failing Python files reported 4630 passed, one failed, and 330 skipped. Fix the remaining Hindsight fixture boundary. The final targeted rerun reported 234 passed and two skipped. The store review regression batch reported 83 passed and one skipped. Desktop TypeScript checks, 56 selected Electron tests, 24 release tests, and the removed-import/compatibility guards passed. This is an integration checkpoint, not full audit acceptance. The complete Python suite has not run on this fixed tree. Crash-atomic plugin publication, generation cleanup, receipt correlation, and packaged lifecycle acceptance remain open in docs/pm-audit-status.md.
53 lines
1.5 KiB
Python
53 lines
1.5 KiB
Python
"""Where the store, lockfile, and installed-state file live."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from pathlib import Path
|
|
|
|
|
|
def repo_root() -> Path:
|
|
return Path(__file__).resolve().parent.parent
|
|
|
|
|
|
def lockfile_path() -> Path:
|
|
return Path(__file__).resolve().parent / "lock.json"
|
|
|
|
|
|
def store_root() -> Path:
|
|
from hermes_cli.runtime_paths import store_root as resolve
|
|
|
|
return resolve(repo_root())
|
|
|
|
|
|
def partials_root() -> Path:
|
|
"""The downloader's managed partials area: machine-scoped and shared
|
|
(keyed by sha256(url), so two callers or two profiles reuse one
|
|
partial), but anchored to the DEFAULT hermes root — NOT the byte
|
|
store. The store can live inside a read-only sealed payload
|
|
(WindowsApps/agent-payload), and partials are mutable state the
|
|
downloader writes continuously, so they must land somewhere writable
|
|
on every install kind: ``%LOCALAPPDATA%\\hermes\\cache\\partials`` on
|
|
Windows, ``~/.hermes/cache/partials`` on POSIX.
|
|
"""
|
|
from hermes_constants import get_default_hermes_root
|
|
|
|
return get_default_hermes_root() / "cache" / "partials"
|
|
|
|
|
|
def facts_path() -> Path:
|
|
return store_root() / "facts.json"
|
|
|
|
|
|
def writable_store_root() -> Path:
|
|
if not (store_root().parent / "manifest.json").is_file():
|
|
return store_root()
|
|
from hermes_constants import get_default_hermes_root
|
|
|
|
return get_default_hermes_root() / "tools"
|
|
|
|
|
|
def runtime_facts_path() -> Path:
|
|
from hermes_cli.runtime_paths import runtime_facts_path as resolve
|
|
|
|
return resolve(repo_root())
|