@misterhuydo/sentinel 1.0.33 → 1.0.34

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.
@@ -1,6 +1,6 @@
1
1
  {
2
- "message": "Auto-checkpoint at 2026-03-21T21:06:39.325Z",
3
- "checkpoint_at": "2026-03-21T21:06:39.326Z",
2
+ "message": "Auto-checkpoint at 2026-03-21T21:16:28.480Z",
3
+ "checkpoint_at": "2026-03-21T21:16:28.481Z",
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.0.33",
3
+ "version": "1.0.34",
4
4
  "description": "Sentinel — Autonomous DevOps Agent installer and manager",
5
5
  "bin": {
6
6
  "sentinel": "./bin/sentinel.js"
@@ -421,16 +421,15 @@ async def _handle_with_cli(
421
421
  status_json = _run_tool("get_status", {"hours": 24}, cfg_loader, store)
422
422
  prs_json = _run_tool("list_pending_prs", {}, cfg_loader, store)
423
423
 
424
- # Pre-fetch log search results if message looks like a search query
424
+ # Pre-fetch log search if the message is a search request.
425
+ # Use quoted strings as the query, or fall back to the full message.
426
+ # Never hardcode field names — the query is whatever the user said.
425
427
  search_json = ""
426
- _search_kws = ("search", "find", "look for", "show me log", "activity from",
427
- "appid", "userid", "sessionid", "grep", "entries for", "trace")
428
+ _search_kws = ("search", "find", "look for", "show me log", "grep", "entries for")
428
429
  if any(kw in message.lower() for kw in _search_kws):
429
430
  quoted = re.findall(r'"([^"]+)"', message)
430
- kv = re.findall(r'(\w+)[=:]\s*(\S+)', message)
431
- terms = quoted or ([f"{k}={v}" for k, v in kv] if kv else None)
432
- if terms:
433
- search_json = _run_tool("search_logs", {"query": terms[0]}, cfg_loader, store)
431
+ query = quoted[0] if quoted else message
432
+ search_json = _run_tool("search_logs", {"query": query}, cfg_loader, store)
434
433
 
435
434
  paused = Path("SENTINEL_PAUSE").exists()
436
435
  repos = list(cfg_loader.repos.keys())
@@ -464,7 +463,7 @@ async def _handle_with_cli(
464
463
  + " ACTION: {\"action\": \"resume_sentinel\"}\n"
465
464
  + " ACTION: {\"action\": \"trigger_poll\"}\n"
466
465
  + " ACTION: {\"action\": \"create_issue\", \"description\": \"...\", \"target_repo\": \"\"}\n"
467
- + " ACTION: {\"action\": \"search_logs\", \"query\": \"appid=xxx\"}\n"
466
+ + " ACTION: {\"action\": \"search_logs\", \"query\": \"<whatever the user asked to find>\"}\n"
468
467
  + "End with [DONE] if the request is fully handled."
469
468
  )
470
469