@misterhuydo/sentinel 1.2.3 → 1.2.5

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/.hint-lock CHANGED
@@ -1 +1 @@
1
- 2026-03-23T09:25:27.661Z
1
+ 2026-03-23T09:57:32.803Z
@@ -1,6 +1,6 @@
1
1
  {
2
- "message": "Auto-checkpoint at 2026-03-23T09:45:10.463Z",
3
- "checkpoint_at": "2026-03-23T09:45:10.464Z",
2
+ "message": "Auto-checkpoint at 2026-03-23T10:00:51.585Z",
3
+ "checkpoint_at": "2026-03-23T10:00:51.586Z",
4
4
  "active_files": [],
5
5
  "notes": [],
6
6
  "mtime_snapshot": {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@misterhuydo/sentinel",
3
- "version": "1.2.3",
3
+ "version": "1.2.5",
4
4
  "description": "Sentinel — Autonomous DevOps Agent installer and manager",
5
5
  "bin": {
6
6
  "sentinel": "./bin/sentinel.js"
@@ -1111,8 +1111,12 @@ async def _run_tool(name: str, inputs: dict, cfg_loader, store, slack_client=Non
1111
1111
  ["bash", str(script), str(props)],
1112
1112
  capture_output=True, text=True, timeout=60, env=env,
1113
1113
  )
1114
+ try:
1115
+ _qpat = re.compile(query, re.IGNORECASE)
1116
+ except re.error:
1117
+ _qpat = re.compile(re.escape(query), re.IGNORECASE)
1114
1118
  lines = (r.stdout or "").strip().splitlines()
1115
- matches = [ln[:300] for ln in lines if ln.strip()][:max_matches]
1119
+ matches = [ln[:300] for ln in lines if _qpat.search(ln)][:max_matches]
1116
1120
  if matches:
1117
1121
  live_results.append({"source": props.stem, "matches": matches})
1118
1122
  logger.info("Boss search_logs live %s rc=%d found=%d", props.stem, r.returncode, len(matches))
@@ -1126,6 +1130,11 @@ async def _run_tool(name: str, inputs: dict, cfg_loader, store, slack_client=Non
1126
1130
  "mode": "live",
1127
1131
  "total_matches": total,
1128
1132
  "results": live_results,
1133
+ "note": (
1134
+ "Results already include a per-source breakdown. "
1135
+ "Do NOT call search_logs again with a source filter to 'refine' — "
1136
+ "use these results directly."
1137
+ ) if total > 0 else None,
1129
1138
  })
1130
1139
 
1131
1140
  # ── Fallback: search locally-cached log files ──────────────────────────
@@ -1168,9 +1177,8 @@ async def _run_tool(name: str, inputs: dict, cfg_loader, store, slack_client=Non
1168
1177
  }
1169
1178
  if files_searched == 0:
1170
1179
  result["warning"] = (
1171
- "No cached log files found for this source filter. "
1172
- "This means the source name was not recognised not that there are no log entries. "
1173
- "Try search_logs without a source filter to search all sources."
1180
+ "Source name not recognised in cached files this is a lookup failure, not 'no results'. "
1181
+ "If you already have results from a broader search_logs call, use those. Stop retrying."
1174
1182
  )
1175
1183
  return json.dumps(result)
1176
1184