@misterhuydo/sentinel 1.4.54 → 1.4.55
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/.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-25T12:06:52.775Z",
|
|
3
|
+
"checkpoint_at": "2026-03-25T12:06:52.777Z",
|
|
4
4
|
"active_files": [],
|
|
5
5
|
"notes": [],
|
|
6
6
|
"mtime_snapshot": {}
|
package/package.json
CHANGED
|
@@ -2697,12 +2697,14 @@ async def _handle_with_cli(
|
|
|
2697
2697
|
logger.error("Boss CLI call failed: %s", e)
|
|
2698
2698
|
return f":warning: Boss unavailable: {e}", True
|
|
2699
2699
|
|
|
2700
|
+
tools_ran = []
|
|
2700
2701
|
for m in _ACTION_RE.finditer(output):
|
|
2701
2702
|
try:
|
|
2702
2703
|
action = json.loads(m.group(1))
|
|
2703
2704
|
name = action.pop("action", "")
|
|
2704
2705
|
if name:
|
|
2705
2706
|
result_str = await _run_tool(name, action, cfg_loader, store, user_id=user_id)
|
|
2707
|
+
tools_ran.append(name)
|
|
2706
2708
|
logger.info("Boss CLI action: %s → %s", name, result_str[:80])
|
|
2707
2709
|
except Exception as e:
|
|
2708
2710
|
logger.warning("Boss action parse error: %s", e)
|
|
@@ -2711,8 +2713,11 @@ async def _handle_with_cli(
|
|
|
2711
2713
|
is_done = "[DONE]" in reply
|
|
2712
2714
|
reply = reply.replace("[DONE]", "").strip()
|
|
2713
2715
|
if not reply:
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
+
if tools_ran:
|
|
2717
|
+
reply = f":white_check_mark: Done ({', '.join(tools_ran)})."
|
|
2718
|
+
else:
|
|
2719
|
+
greeting = f"Hi {user_name}! " if user_name else "Hi! "
|
|
2720
|
+
reply = f"{greeting}I'm Sentinel, your autonomous DevOps agent. How can I help you?"
|
|
2716
2721
|
|
|
2717
2722
|
history.append({"role": "user", "content": message})
|
|
2718
2723
|
history.append({"role": "assistant", "content": reply})
|
|
@@ -2878,8 +2883,17 @@ async def _handle_with_api(
|
|
|
2878
2883
|
is_done = "[DONE]" in reply
|
|
2879
2884
|
reply = reply.replace("[DONE]", "").strip()
|
|
2880
2885
|
if not reply:
|
|
2881
|
-
|
|
2882
|
-
|
|
2886
|
+
# Only greet on a truly empty/hello message — not after tool execution
|
|
2887
|
+
tools_ran_this_session = any(
|
|
2888
|
+
m.get("role") == "user" and isinstance(m.get("content"), list)
|
|
2889
|
+
and any(r.get("type") == "tool_result" for r in m["content"])
|
|
2890
|
+
for m in messages
|
|
2891
|
+
)
|
|
2892
|
+
if tools_ran_this_session:
|
|
2893
|
+
reply = ":white_check_mark: Done."
|
|
2894
|
+
else:
|
|
2895
|
+
greeting = f"Hi {user_name}! " if user_name else "Hi! "
|
|
2896
|
+
reply = f"{greeting}I'm Sentinel, your autonomous DevOps agent. How can I help you?"
|
|
2883
2897
|
# Heuristic override: if reply ends with a question, Claude is waiting for input
|
|
2884
2898
|
if is_done and re.search(r'\?\s*$', reply):
|
|
2885
2899
|
is_done = False
|