|
4 | 4 |
|
5 | 5 | import os |
6 | 6 | from pathlib import Path |
7 | | -import shutil |
8 | 7 | import sys |
9 | 8 | from typing import Any |
10 | 9 |
|
11 | | -from src.ulysses_jobs import RuntimeJobError, RuntimeJobStore, native_host_environment |
| 10 | +from src.ulysses_jobs import RuntimeJobError, RuntimeJobStore |
12 | 11 |
|
13 | 12 |
|
14 | 13 | class SandwichControl: |
15 | | - ACTIONS = {"hermes-update", "system-update", "audit", "self-update"} |
| 14 | + ACTIONS = {"system-update", "audit", "self-update"} |
16 | 15 |
|
17 | 16 | def __init__(self, root: Path | None = None) -> None: |
18 | 17 | from src.constants import DATA_DIR |
@@ -48,14 +47,6 @@ def _sandwich_root(cls) -> Path: |
48 | 47 | raise RuntimeJobError("ULYSSES_SANDWICH_ROOT must be absolute") |
49 | 48 | return path.resolve() |
50 | 49 |
|
51 | | - @staticmethod |
52 | | - def _binary(name: str, fallback: Path) -> str: |
53 | | - found = shutil.which(name, path=native_host_environment()["PATH"]) |
54 | | - path = Path(found) if found else fallback |
55 | | - if not path.is_file(): |
56 | | - raise RuntimeJobError(f"{name} is not installed on the host PATH") |
57 | | - return str(path.absolute()) |
58 | | - |
59 | 50 | @staticmethod |
60 | 51 | def _diogenes_source() -> Path: |
61 | 52 | configured = os.environ.get("DIOGENES_SOURCE_ROOT", "").strip() |
@@ -136,46 +127,6 @@ def create_plan( |
136 | 127 | ] |
137 | 128 | summary = "Update detected Bun projects without pulling Git" |
138 | 129 | phrase = "UPDATE JAVASCRIPT SYSTEM" |
139 | | - elif action == "hermes-update": |
140 | | - hermes = self._binary( |
141 | | - "hermes", |
142 | | - Path.home() / ".local" / "bin" / "hermes", |
143 | | - ) |
144 | | - reconcile = sandwich / "scripts" / "reconcile-hermes-runtime.sh" |
145 | | - if not reconcile.is_file(): |
146 | | - raise RuntimeJobError( |
147 | | - f"Sandwich Hermes helper is missing: {reconcile}" |
148 | | - ) |
149 | | - steps = [ |
150 | | - { |
151 | | - "label": "Update Hermes canonically", |
152 | | - "argv": [hermes, "update", "--no-backup", "--yes"], |
153 | | - "cwd": str(Path.home() / ".hermes" / "hermes-agent"), |
154 | | - "timeout": 3600, |
155 | | - }, |
156 | | - { |
157 | | - "label": "Reconcile frozen Hermes Bun workspaces", |
158 | | - "argv": [str(reconcile)], |
159 | | - "timeout": 1800, |
160 | | - }, |
161 | | - { |
162 | | - "label": "Restart Hermes gateway", |
163 | | - "argv": [hermes, "gateway", "restart"], |
164 | | - "timeout": 300, |
165 | | - }, |
166 | | - { |
167 | | - "label": "Check Hermes gateway", |
168 | | - "argv": [hermes, "gateway", "status"], |
169 | | - "timeout": 120, |
170 | | - }, |
171 | | - { |
172 | | - "label": "Run Hermes deep health check", |
173 | | - "argv": [hermes, "status", "--deep"], |
174 | | - "timeout": 300, |
175 | | - }, |
176 | | - ] |
177 | | - summary = "Update, reconcile, and restart Hermes" |
178 | | - phrase = "UPDATE HERMES" |
179 | 130 | else: |
180 | 131 | source = self._diogenes_source() |
181 | 132 | steps = [ |
|
0 commit comments