@misterhuydo/sentinel 1.2.2 → 1.2.3
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-23T09:
|
|
3
|
-
"checkpoint_at": "2026-03-23T09:
|
|
2
|
+
"message": "Auto-checkpoint at 2026-03-23T09:45:10.463Z",
|
|
3
|
+
"checkpoint_at": "2026-03-23T09:45:10.464Z",
|
|
4
4
|
"active_files": [],
|
|
5
5
|
"notes": [],
|
|
6
6
|
"mtime_snapshot": {}
|
package/package.json
CHANGED
|
@@ -368,6 +368,14 @@ _TOOLS = [
|
|
|
368
368
|
"description": "Max matching lines to return per source (default 30)",
|
|
369
369
|
"default": 30,
|
|
370
370
|
},
|
|
371
|
+
"tail": {
|
|
372
|
+
"type": "integer",
|
|
373
|
+
"description": (
|
|
374
|
+
"Number of log lines to fetch from the server before grepping (default: config value, typically 500). "
|
|
375
|
+
"Increase when the user asks for a longer time window — e.g. 'yesterday up to now' → use 5000-10000. "
|
|
376
|
+
"Higher values take longer but cover more history."
|
|
377
|
+
),
|
|
378
|
+
},
|
|
371
379
|
},
|
|
372
380
|
"required": ["query"],
|
|
373
381
|
},
|
|
@@ -1084,6 +1092,7 @@ async def _run_tool(name: str, inputs: dict, cfg_loader, store, slack_client=Non
|
|
|
1084
1092
|
query = inputs.get("query", "")
|
|
1085
1093
|
source = inputs.get("source", "").lower()
|
|
1086
1094
|
max_matches = int(inputs.get("max_matches", 30))
|
|
1095
|
+
tail_override = inputs.get("tail")
|
|
1087
1096
|
|
|
1088
1097
|
# ── Live fetch path: SSH to servers and grep in real time ──────────────
|
|
1089
1098
|
script = Path(__file__).resolve().parent.parent / "scripts" / "fetch_log.sh"
|
|
@@ -1095,6 +1104,8 @@ async def _run_tool(name: str, inputs: dict, cfg_loader, store, slack_client=Non
|
|
|
1095
1104
|
for props in props_files:
|
|
1096
1105
|
env = os.environ.copy()
|
|
1097
1106
|
env["GREP_FILTER"] = query
|
|
1107
|
+
if tail_override:
|
|
1108
|
+
env["TAIL"] = str(tail_override)
|
|
1098
1109
|
try:
|
|
1099
1110
|
r = subprocess.run(
|
|
1100
1111
|
["bash", str(script), str(props)],
|