@misterhuydo/sentinel 1.4.15 → 1.4.17

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/lib/add.js CHANGED
@@ -125,7 +125,10 @@ function fetchUrl(url) {
125
125
  // ── SSH deploy key helpers ────────────────────────────────────────────────────
126
126
 
127
127
  function ensureKnownHosts() {
128
- const knownHosts = path.join(os.homedir(), '.ssh', 'known_hosts');
128
+ const sshDir = path.join(os.homedir(), '.ssh');
129
+ const knownHosts = path.join(sshDir, 'known_hosts');
130
+ fs.ensureDirSync(sshDir);
131
+ try { fs.chmodSync(sshDir, 0o700); } catch (_) {}
129
132
  const content = fs.existsSync(knownHosts) ? fs.readFileSync(knownHosts, 'utf8') : '';
130
133
  if (content.includes('github.com')) return;
131
134
  info('Adding GitHub to known_hosts…');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@misterhuydo/sentinel",
3
- "version": "1.4.15",
3
+ "version": "1.4.17",
4
4
  "description": "Sentinel — Autonomous DevOps Agent installer and manager",
5
5
  "bin": {
6
6
  "sentinel": "./bin/sentinel.js"
@@ -6,6 +6,7 @@ Invokes: claude --print "<prompt>" 2>&1
6
6
  Cairn MCP context is fetched automatically by Claude Code via its MCP tool
7
7
  connection — Sentinel does not need to query or inject it explicitly.
8
8
  """
9
+ from __future__ import annotations
9
10
 
10
11
  import logging
11
12
  import re
@@ -5,6 +5,7 @@ Supports two modes (driven by repo.auto_publish):
5
5
  True → apply fix directly to main branch and push
6
6
  False → push to sentinel/fix-<fp> branch and open a GitHub PR
7
7
  """
8
+ from __future__ import annotations
8
9
 
9
10
  import logging
10
11
  import os
@@ -4,7 +4,8 @@ log_parser.py — Parse fetched log files into ErrorEvent objects.
4
4
  Handles Java-style logs (Spring Boot / Logback format):
5
5
  2024-01-15 12:34:56.789 ERROR [thread] class.ClassName - Message
6
6
  followed by optional stack trace lines (^\tat ...)
7
- """
7
+ """
8
+ from __future__ import annotations
8
9
 
9
10
  import hashlib
10
11
  import re
@@ -6,6 +6,7 @@ Synced location: workspace/synced/<source-name>/<logname>-node<N>.log
6
6
  Uses rsync --append-verify (delta sync — only new bytes transferred).
7
7
  Full log history is preserved locally for instant grep without SSH.
8
8
  """
9
+ from __future__ import annotations
9
10
  import logging
10
11
  import shutil
11
12
  import subprocess
@@ -4,7 +4,8 @@ main.py — Sentinel entry point and watch loop.
4
4
  Usage:
5
5
  python -m sentinel.main # run watch loop
6
6
  python -m sentinel.main --init # first-time setup
7
- """
7
+ """
8
+ from __future__ import annotations
8
9
 
9
10
  import argparse
10
11
  import asyncio
@@ -5,6 +5,7 @@ Convention: log-configs/<name>.properties links to repo-configs/<name>.propertie
5
5
  If no repo-config exists for a given log-config stem, the error is unroutable
6
6
  and the fix is skipped.
7
7
  """
8
+ from __future__ import annotations
8
9
 
9
10
  import logging
10
11
  from .log_parser import ErrorEvent
@@ -4,7 +4,8 @@ sentinel_boss.py — Claude-backed Sentinel Boss.
4
4
  Claude acts as the boss: reads project state, decides on actions,
5
5
  executes them via tool use, and responds naturally. One agentic loop
6
6
  per turn — Claude may call multiple tools before replying.
7
- """
7
+ """
8
+ from __future__ import annotations
8
9
 
9
10
  import json
10
11
  import logging
@@ -14,6 +14,7 @@ Setup (api.slack.com):
14
14
  SLACK_BOT_TOKEN=xoxb-...
15
15
  SLACK_APP_TOKEN=xapp-...
16
16
  """
17
+ from __future__ import annotations
17
18
 
18
19
  import asyncio
19
20
  import base64
@@ -1,6 +1,7 @@
1
1
  """
2
2
  state_store.py — SQLite-backed persistence for errors, fixes, and reports.
3
- """
3
+ """
4
+ from __future__ import annotations
4
5
 
5
6
  import json
6
7
  import sqlite3