@misterhuydo/sentinel 1.0.68 → 1.0.69

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-22T16:22:20.785Z",
3
- "checkpoint_at": "2026-03-22T16:22:20.786Z",
2
+ "message": "Auto-checkpoint at 2026-03-22T16:26:17.040Z",
3
+ "checkpoint_at": "2026-03-22T16:26:17.042Z",
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.68",
3
+ "version": "1.0.69",
4
4
  "description": "Sentinel — Autonomous DevOps Agent installer and manager",
5
5
  "bin": {
6
6
  "sentinel": "./bin/sentinel.js"
@@ -318,9 +318,15 @@ async def _dispatch(event: dict, client, cfg_loader, store) -> None:
318
318
 
319
319
  # ── Turn processor ────────────────────────────────────────────────────────────
320
320
 
321
+ _MAX_HISTORY_TURNS = 20 # keep last 20 exchanges (~40 messages) to stay well within context limits
322
+
321
323
  async def _run_turn(session: _Session, message: str, client, cfg_loader, store) -> None:
322
324
  channel = session.channel
323
325
 
326
+ # Trim history to avoid context overflow on long conversations
327
+ if len(session.history) > _MAX_HISTORY_TURNS * 2:
328
+ session.history = session.history[-(_MAX_HISTORY_TURNS * 2):]
329
+
324
330
  # Typing indicator
325
331
  await _post(client, channel, "_thinking..._")
326
332