@misterhuydo/sentinel 1.0.55 → 1.0.56
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.
|
File without changes
|
package/.cairn/.hint-lock
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2026-03-
|
|
1
|
+
2026-03-22T14:06:29.625Z
|
package/.cairn/session.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"message": "Auto-checkpoint at 2026-03-
|
|
3
|
-
"checkpoint_at": "2026-03-
|
|
2
|
+
"message": "Auto-checkpoint at 2026-03-22T14:06:41.424Z",
|
|
3
|
+
"checkpoint_at": "2026-03-22T14:06:41.425Z",
|
|
4
4
|
"active_files": [],
|
|
5
5
|
"notes": [],
|
|
6
6
|
"mtime_snapshot": {}
|
package/package.json
CHANGED
|
@@ -919,7 +919,7 @@ async def _run_tool(name: str, inputs: dict, cfg_loader, store, slack_client=Non
|
|
|
919
919
|
start_sh = project_dir / "start.sh"
|
|
920
920
|
if stop_sh.exists() and start_sh.exists():
|
|
921
921
|
def _restart_scripts():
|
|
922
|
-
import time; time.sleep(
|
|
922
|
+
import time; time.sleep(10)
|
|
923
923
|
subprocess.Popen(
|
|
924
924
|
f"bash {stop_sh} && sleep 2 && bash {start_sh}",
|
|
925
925
|
shell=True,
|
|
@@ -928,7 +928,8 @@ async def _run_tool(name: str, inputs: dict, cfg_loader, store, slack_client=Non
|
|
|
928
928
|
restart_method = "stop.sh + start.sh"
|
|
929
929
|
else:
|
|
930
930
|
# SIGTERM self — systemd (Restart=always) will bring it back up
|
|
931
|
-
|
|
931
|
+
# 10s delay gives Claude time to generate + post the reply before we die
|
|
932
|
+
threading.Timer(10.0, lambda: os.kill(os.getpid(), _sig.SIGTERM)).start()
|
|
932
933
|
restart_method = "SIGTERM → systemd restart"
|
|
933
934
|
|
|
934
935
|
steps.append({"step": "restart", "status": "scheduled", "method": restart_method})
|
|
@@ -1032,6 +1033,8 @@ async def _handle_with_cli(
|
|
|
1032
1033
|
reply = _ACTION_RE.sub("", output).strip()
|
|
1033
1034
|
is_done = "[DONE]" in reply
|
|
1034
1035
|
reply = reply.replace("[DONE]", "").strip()
|
|
1036
|
+
if not reply:
|
|
1037
|
+
reply = "Done."
|
|
1035
1038
|
|
|
1036
1039
|
history.append({"role": "user", "content": message})
|
|
1037
1040
|
history.append({"role": "assistant", "content": reply})
|
|
@@ -1114,6 +1117,8 @@ async def handle_message(
|
|
|
1114
1117
|
reply = " ".join(text_parts).strip()
|
|
1115
1118
|
is_done = "[DONE]" in reply
|
|
1116
1119
|
reply = reply.replace("[DONE]", "").strip()
|
|
1120
|
+
if not reply:
|
|
1121
|
+
reply = "Done."
|
|
1117
1122
|
history.append({"role": "assistant", "content": response.content})
|
|
1118
1123
|
return reply, is_done
|
|
1119
1124
|
|
|
@@ -324,6 +324,8 @@ async def _run_turn(session: _Session, message: str, client, cfg_loader, store)
|
|
|
324
324
|
# Typing indicator
|
|
325
325
|
await _post(client, channel, "_thinking..._")
|
|
326
326
|
|
|
327
|
+
reply = ""
|
|
328
|
+
is_done = True
|
|
327
329
|
try:
|
|
328
330
|
reply, is_done = await handle_message(
|
|
329
331
|
message, session.history, cfg_loader, store,
|
|
@@ -331,8 +333,7 @@ async def _run_turn(session: _Session, message: str, client, cfg_loader, store)
|
|
|
331
333
|
)
|
|
332
334
|
except Exception as e:
|
|
333
335
|
logger.exception("Sentinel Boss error: %s", e)
|
|
334
|
-
|
|
335
|
-
is_done = True
|
|
336
|
+
reply = f":warning: Unhandled error: {e}"
|
|
336
337
|
|
|
337
338
|
await _post(client, channel, reply)
|
|
338
339
|
|
|
@@ -353,6 +354,8 @@ async def _run_turn(session: _Session, message: str, client, cfg_loader, store)
|
|
|
353
354
|
# ── Helpers ───────────────────────────────────────────────────────────────────
|
|
354
355
|
|
|
355
356
|
async def _post(client, channel: str, text: str) -> None:
|
|
357
|
+
if not text:
|
|
358
|
+
return
|
|
356
359
|
try:
|
|
357
360
|
await client.chat_postMessage(channel=channel, text=text)
|
|
358
361
|
except Exception as e:
|