@smilintux/skcapstone 0.5.5 → 0.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -80,17 +80,23 @@ def initialize_consciousness(home: Path) -> ConsciousnessState:
|
|
|
80
80
|
except (json.JSONDecodeError, OSError):
|
|
81
81
|
pass
|
|
82
82
|
|
|
83
|
-
# Check if daemon is running (systemd)
|
|
83
|
+
# Check if consciousness daemon is running (systemd)
|
|
84
|
+
# Accept either the legacy skwhisper service or the skcapstone service
|
|
84
85
|
try:
|
|
85
86
|
import subprocess
|
|
86
87
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
88
|
+
for service_name in ("skcapstone", "skwhisper"):
|
|
89
|
+
result = subprocess.run(
|
|
90
|
+
["systemctl", "--user", "is-active", service_name],
|
|
91
|
+
capture_output=True,
|
|
92
|
+
text=True,
|
|
93
|
+
timeout=3,
|
|
94
|
+
)
|
|
95
|
+
if result.stdout.strip() == "active":
|
|
96
|
+
state.whisper_active = True
|
|
97
|
+
break
|
|
98
|
+
else:
|
|
99
|
+
state.whisper_active = False
|
|
94
100
|
except (FileNotFoundError, subprocess.TimeoutExpired, OSError):
|
|
95
101
|
state.whisper_active = False
|
|
96
102
|
|
|
@@ -105,6 +111,9 @@ def initialize_consciousness(home: Path) -> ConsciousnessState:
|
|
|
105
111
|
state.status = PillarStatus.ACTIVE
|
|
106
112
|
else:
|
|
107
113
|
state.status = PillarStatus.DEGRADED
|
|
114
|
+
elif state.whisper_active:
|
|
115
|
+
# Daemon is running but no sessions digested yet — consciousness is live
|
|
116
|
+
state.status = PillarStatus.DEGRADED
|
|
108
117
|
elif state.sessions_digested > 0 or state.whisper_md is not None:
|
|
109
118
|
state.status = PillarStatus.DEGRADED
|
|
110
119
|
else:
|