@misterhuydo/sentinel 1.0.99 → 1.1.1

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-23T07:27:36.554Z
1
+ 2026-03-23T08:08:15.205Z
@@ -1,6 +1,6 @@
1
1
  {
2
- "message": "Auto-checkpoint at 2026-03-23T07:47:01.705Z",
3
- "checkpoint_at": "2026-03-23T07:47:01.706Z",
2
+ "message": "Auto-checkpoint at 2026-03-23T08:28:23.743Z",
3
+ "checkpoint_at": "2026-03-23T08:28:23.744Z",
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.99",
3
+ "version": "1.1.1",
4
4
  "description": "Sentinel — Autonomous DevOps Agent installer and manager",
5
5
  "bin": {
6
6
  "sentinel": "./bin/sentinel.js"
@@ -379,9 +379,9 @@ async def _run_turn(session: _Session, message: str, client, cfg_loader, store,
379
379
  if len(session.history) > _MAX_HISTORY_TURNS * 2:
380
380
  session.history = session.history[-(_MAX_HISTORY_TURNS * 2):]
381
381
 
382
- # Typing indicator
382
+ # Post "thinking..." and keep its ts so we can replace it with the real reply
383
383
  session.busy = True
384
- await _post(client, channel, "_thinking..._")
384
+ thinking_ts = await _post(client, channel, "_thinking..._")
385
385
 
386
386
  reply = ""
387
387
  is_done = True
@@ -401,20 +401,36 @@ async def _run_turn(session: _Session, message: str, client, cfg_loader, store,
401
401
  finally:
402
402
  session.busy = False
403
403
 
404
- await _post(client, channel, reply)
404
+ if thinking_ts:
405
+ await _update(client, channel, thinking_ts, reply)
406
+ else:
407
+ await _post(client, channel, reply)
405
408
  # If session ended, save current history; if history was just cleared it will already be [] in DB
406
409
  store.save_conversation(session.user_id, session.history)
407
410
 
408
411
 
409
412
  # ── Helpers ───────────────────────────────────────────────────────────────────
410
413
 
411
- async def _post(client, channel: str, text: str) -> None:
414
+ async def _post(client, channel: str, text: str) -> str:
415
+ """Post a message and return its ts (for later update), or '' on failure."""
412
416
  if not text:
413
- return
417
+ return ""
414
418
  try:
415
- await client.chat_postMessage(channel=channel, text=text)
419
+ resp = await client.chat_postMessage(channel=channel, text=text)
420
+ return resp.get("ts", "")
416
421
  except Exception as e:
417
422
  logger.warning("Slack post failed: %s", e)
423
+ return ""
424
+
425
+
426
+ async def _update(client, channel: str, ts: str, text: str) -> None:
427
+ """Delete the 'thinking...' message then post the real reply as a clean message."""
428
+ if ts:
429
+ try:
430
+ await client.chat_delete(channel=channel, ts=ts)
431
+ except Exception as e:
432
+ logger.debug("Could not delete thinking message: %s", e)
433
+ await _post(client, channel, text)
418
434
 
419
435
 
420
436
  async def _resolve_name(client, user_id: str) -> str: