@misterhuydo/sentinel 1.4.90 → 1.4.91
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 +1 -1
- package/.cairn/session.json +2 -2
- package/lib/add.js +8 -20
- package/package.json +1 -1
- package/python/sentinel/config_loader.py +10 -6
- package/python/sentinel/dev_watcher.py +9 -1
- package/python/sentinel/fix_engine.py +1 -1
- package/python/sentinel/main.py +131 -24
- package/python/sentinel/repo_task_engine.py +381 -0
- package/python/sentinel/sentinel_boss.py +275 -23
- package/python/sentinel/sentinel_dev.py +30 -72
- package/templates/log-configs/_example.properties +21 -32
- package/templates/sentinel.properties +5 -6
|
@@ -1,54 +1,43 @@
|
|
|
1
1
|
# log-configs/_example.properties
|
|
2
2
|
#
|
|
3
3
|
# One file per log stream (SSH server or Cloudflare worker).
|
|
4
|
-
#
|
|
5
|
-
#
|
|
4
|
+
# Copy this to e.g. "MyService.properties" — the filename stem must match the
|
|
5
|
+
# corresponding repo-configs/<stem>.properties. Override with TARGET_REPO if they differ.
|
|
6
6
|
#
|
|
7
|
-
# Copy this file to e.g. "elprint-salescore.properties" and fill in the values.
|
|
8
|
-
#
|
|
9
|
-
# ── Source type ───────────────────────────────────────────────────────────────
|
|
10
7
|
|
|
11
8
|
# ssh | cloudflare
|
|
12
9
|
SOURCE_TYPE=ssh
|
|
13
10
|
|
|
14
|
-
# ── SSH source
|
|
11
|
+
# ── SSH source ────────────────────────────────────────────────────────────────
|
|
12
|
+
# Sentinel SSHes in and streams the remote log with grep + tail on each poll.
|
|
15
13
|
|
|
16
|
-
# SSH private key (.pem)
|
|
17
|
-
KEY=
|
|
14
|
+
# SSH private key (.pem) — relative path resolved from this config dir, then ~/.ssh/
|
|
15
|
+
KEY=my-service.pem
|
|
18
16
|
|
|
19
|
-
# Comma-separated
|
|
20
|
-
|
|
21
|
-
HOSTS=ec2-xx-xx-xx-xx.eu-north-1.compute.amazonaws.com, ec2-xx-xx-xx-xx.eu-north-1.compute.amazonaws.com
|
|
17
|
+
# Comma-separated hosts. Hosts without user@ prefix default to ec2-user@<host>
|
|
18
|
+
HOSTS=ec2-xx-xx-xx-xx.eu-north-1.compute.amazonaws.com
|
|
22
19
|
|
|
23
|
-
# Comma-separated
|
|
24
|
-
LOGS=logs/AppService.log, logs/alarm.log
|
|
20
|
+
# Comma-separated log paths relative to /home/<REMOTE_SERVICE_USER>/ on each host
|
|
21
|
+
LOGS=logs/AppService.log, logs/alarm.log
|
|
25
22
|
|
|
26
|
-
#
|
|
23
|
+
# Linux user owning the log files on the remote host (defaults to filename stem)
|
|
27
24
|
REMOTE_SERVICE_USER=MyServiceUser
|
|
28
25
|
|
|
29
|
-
#
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
# Lines to fetch from the top instead (head -n N). Only used if TAIL is not set.
|
|
33
|
-
# HEAD=100
|
|
34
|
-
|
|
35
|
-
# Keep only lines matching this regex (grep -E)
|
|
36
|
-
GREP_FILTER=WARN|ERROR
|
|
26
|
+
# Keep only lines matching this regex (default: WARN|ERROR|FATAL|Exception|Error)
|
|
27
|
+
GREP_FILTER=WARN|ERROR|FATAL
|
|
37
28
|
|
|
38
|
-
# Drop lines matching this regex (
|
|
39
|
-
GREP_EXCLUDE=
|
|
29
|
+
# Drop lines matching this regex (case-insensitive, optional)
|
|
30
|
+
# GREP_EXCLUDE=HealthCheck|actuator
|
|
40
31
|
|
|
41
|
-
#
|
|
32
|
+
# How many lines to read from the end of each log file (default: 1000)
|
|
33
|
+
# TAIL=500
|
|
42
34
|
|
|
43
|
-
#
|
|
44
|
-
# The filename stem is the default match (e.g. "MyService.properties" → "MyService" repo-config).
|
|
45
|
-
# Set TARGET_REPO to override with the exact repo-config filename stem.
|
|
35
|
+
# Override repo routing — exact filename stem of the target repo-config
|
|
46
36
|
# TARGET_REPO=MyService
|
|
47
37
|
|
|
48
|
-
# ── Cloudflare source
|
|
38
|
+
# ── Cloudflare source ─────────────────────────────────────────────────────────
|
|
39
|
+
# Sentinel fetches logs via HTTP GET with cursor pagination — no SSH needed.
|
|
49
40
|
|
|
50
|
-
# Full URL of the Cloudflare Worker log endpoint
|
|
51
41
|
# CF_URL=https://logs.<worker>.workers.dev/<service>
|
|
52
|
-
|
|
53
|
-
# Bearer token for the Cloudflare Worker
|
|
54
42
|
# CF_TOKEN=<bearer-token>
|
|
43
|
+
# TARGET_REPO=MyService
|
|
@@ -42,12 +42,11 @@ WORKSPACE_DIR=./workspace
|
|
|
42
42
|
# this key instead of the shared Claude Pro subscription.
|
|
43
43
|
# ANTHROPIC_API_KEY=sk-ant-...
|
|
44
44
|
|
|
45
|
-
# Private
|
|
46
|
-
#
|
|
47
|
-
#
|
|
48
|
-
#
|
|
49
|
-
# Run `sentinel add` to generate
|
|
50
|
-
# PRIVATE_SLACK=false
|
|
45
|
+
# Private credentials — place any project-specific secrets in private_sentinel.properties
|
|
46
|
+
# in this project directory (gitignored — never committed to the config repo).
|
|
47
|
+
# Sentinel auto-loads it if present. Supported keys: SLACK_BOT_TOKEN, SLACK_APP_TOKEN,
|
|
48
|
+
# GITHUB_TOKEN, ANTHROPIC_API_KEY, and any other sentinel.properties key.
|
|
49
|
+
# Run `sentinel add` to generate private_sentinel.properties interactively.
|
|
51
50
|
|
|
52
51
|
# Boss mode override — overrides the workspace-level BOSS_MODE for this project only.
|
|
53
52
|
# Options: standard (default) | strict | fun
|