@misterhuydo/sentinel 1.4.39 → 1.4.40

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-25T08:01:16.107Z",
3
- "checkpoint_at": "2026-03-25T08:01:16.109Z",
2
+ "message": "Auto-checkpoint at 2026-03-25T08:05:30.425Z",
3
+ "checkpoint_at": "2026-03-25T08:05:30.426Z",
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.4.39",
3
+ "version": "1.4.40",
4
4
  "description": "Sentinel — Autonomous DevOps Agent installer and manager",
5
5
  "bin": {
6
6
  "sentinel": "./bin/sentinel.js"
@@ -60,6 +60,7 @@ class SentinelConfig:
60
60
  slack_bot_token: str = "" # xoxb-...
61
61
  slack_app_token: str = "" # xapp-... (Socket Mode)
62
62
  slack_channel: str = "" # optional: restrict to one channel ID or name
63
+ slack_dm_submitter: bool = True # DM the submitter when a fix is applied or blocked
63
64
  slack_watch_bot_ids: list[str] = field(default_factory=list) # pre-configured bot IDs to watch passively
64
65
  slack_allowed_users: list[str] = field(default_factory=list) # if set, only these Slack user IDs can talk to Boss
65
66
  slack_admin_users: list[str] = field(default_factory=list) # subset of allowed users with admin privileges
@@ -171,6 +172,7 @@ class ConfigLoader:
171
172
  c.slack_bot_token = d.get("SLACK_BOT_TOKEN", "")
172
173
  c.slack_app_token = d.get("SLACK_APP_TOKEN", "")
173
174
  c.slack_channel = d.get("SLACK_CHANNEL", "")
175
+ c.slack_dm_submitter = d.get("SLACK_DM_SUBMITTER", "true").lower() not in ("false", "0", "no")
174
176
  c.slack_watch_bot_ids = _csv(d.get("SLACK_WATCH_BOT_IDS", ""))
175
177
  c.slack_allowed_users = _csv(d.get("SLACK_ALLOWED_USERS", ""))
176
178
  c.slack_admin_users = _csv(d.get("SLACK_ADMIN_USERS", ""))
@@ -205,7 +205,9 @@ def notify_fix_blocked(
205
205
  )
206
206
 
207
207
  if submitter_user_id:
208
- slack_dm(cfg.slack_bot_token, submitter_user_id, slack_text)
208
+ if getattr(cfg, "slack_dm_submitter", True):
209
+ slack_dm(cfg.slack_bot_token, submitter_user_id, slack_text)
210
+ slack_alert(cfg.slack_bot_token, cfg.slack_channel, f"<@{submitter_user_id}> {slack_text}")
209
211
  else:
210
212
  # No known submitter — broadcast to the whole channel
211
213
  slack_alert(
@@ -256,8 +258,8 @@ def notify_fix_applied(
256
258
  ).rstrip()
257
259
 
258
260
  if submitter_user_id:
259
- slack_dm(cfg.slack_bot_token, submitter_user_id, slack_text)
260
- # Also mention them in the channel
261
+ if getattr(cfg, "slack_dm_submitter", True):
262
+ slack_dm(cfg.slack_bot_token, submitter_user_id, slack_text)
261
263
  channel_text = f"<@{submitter_user_id}> {slack_text}"
262
264
  slack_alert(cfg.slack_bot_token, cfg.slack_channel, channel_text)
263
265
  else:
@@ -43,6 +43,10 @@ WORKSPACE_DIR=./workspace
43
43
  # Note: requires conversations:read scope on the Slack App if using channel name
44
44
  # SLACK_CHANNEL=devops-sentinel
45
45
 
46
+ # DM the submitter directly when a fix is applied or blocked (default: true).
47
+ # Set to false to only mention them in the channel, without a private DM.
48
+ # SLACK_DM_SUBMITTER=true
49
+
46
50
  # Allowlist of Slack user IDs permitted to give Sentinel Boss commands (RECOMMENDED).
47
51
  # If set, all other users are silently ignored — even in the configured channel.
48
52
  # Find a user ID in Slack: click their profile → ⋯ More → Copy member ID (starts with U).