@misterhuydo/sentinel 1.0.77 → 1.0.83
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/generate.js +15 -1
- package/lib/init.js +381 -319
- package/lib/upgrade.js +40 -0
- package/package.json +21 -21
- package/python/scripts/patch_notify.js +200 -0
- package/python/sentinel/config_loader.py +6 -0
- package/python/sentinel/fix_engine.py +177 -160
- package/python/sentinel/main.py +35 -0
- package/python/sentinel/notify.py +88 -0
- package/python/sentinel/sentinel_boss.py +1605 -1371
- package/python/sentinel/slack_bot.py +427 -384
- package/python/sentinel/state_store.py +423 -341
- package/templates/sentinel.properties +3 -1
- package/templates/workspace-sentinel.properties +33 -0
- package/.cairn/views/2a85cc_init.js +0 -273
package/.cairn/.hint-lock
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2026-03-
|
|
1
|
+
2026-03-23T05:01:48.297Z
|
package/.cairn/session.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"message": "Auto-checkpoint at 2026-03-
|
|
3
|
-
"checkpoint_at": "2026-03-
|
|
2
|
+
"message": "Auto-checkpoint at 2026-03-23T05:07:15.110Z",
|
|
3
|
+
"checkpoint_at": "2026-03-23T05:07:15.111Z",
|
|
4
4
|
"active_files": [],
|
|
5
5
|
"notes": [],
|
|
6
6
|
"mtime_snapshot": {}
|
package/lib/generate.js
CHANGED
|
@@ -96,7 +96,7 @@ rm -f "$PID_FILE"
|
|
|
96
96
|
|
|
97
97
|
// ── Workspace-level startAll / stopAll ────────────────────────────────────────
|
|
98
98
|
|
|
99
|
-
function generateWorkspaceScripts(workspace, smtpConfig = {}, slackConfig = {}) {
|
|
99
|
+
function generateWorkspaceScripts(workspace, smtpConfig = {}, slackConfig = {}, authConfig = {}) {
|
|
100
100
|
// Write shared sentinel.properties once (never overwrite existing)
|
|
101
101
|
const workspaceProps = path.join(workspace, 'sentinel.properties');
|
|
102
102
|
if (!fs.existsSync(workspaceProps)) {
|
|
@@ -108,6 +108,20 @@ function generateWorkspaceScripts(workspace, smtpConfig = {}, slackConfig = {})
|
|
|
108
108
|
if (smtpConfig.password) tpl = tpl.replace('SMTP_PASSWORD=<app-password>', 'SMTP_PASSWORD=' + smtpConfig.password);
|
|
109
109
|
fs.writeFileSync(workspaceProps, tpl);
|
|
110
110
|
}
|
|
111
|
+
// Always upsert auth config so re-runs persist it
|
|
112
|
+
if (authConfig.apiKey || authConfig.claudeProForTasks !== undefined) {
|
|
113
|
+
let props = fs.readFileSync(workspaceProps, 'utf8');
|
|
114
|
+
if (authConfig.apiKey) {
|
|
115
|
+
const replaced = props.replace(/^#?\s*ANTHROPIC_API_KEY=.*/m, 'ANTHROPIC_API_KEY=' + authConfig.apiKey);
|
|
116
|
+
props = replaced !== props ? replaced : props.trimEnd() + '\nANTHROPIC_API_KEY=' + authConfig.apiKey + '\n';
|
|
117
|
+
}
|
|
118
|
+
if (authConfig.claudeProForTasks !== undefined) {
|
|
119
|
+
const val = authConfig.claudeProForTasks ? 'true' : 'false';
|
|
120
|
+
const replaced = props.replace(/^CLAUDE_PRO_FOR_TASKS=.*/m, 'CLAUDE_PRO_FOR_TASKS=' + val);
|
|
121
|
+
props = replaced !== props ? replaced : props.trimEnd() + '\nCLAUDE_PRO_FOR_TASKS=' + val + '\n';
|
|
122
|
+
}
|
|
123
|
+
fs.writeFileSync(workspaceProps, props);
|
|
124
|
+
}
|
|
111
125
|
// Always upsert Slack tokens so re-runs persist them
|
|
112
126
|
if (slackConfig.botToken || slackConfig.appToken) {
|
|
113
127
|
let props = fs.readFileSync(workspaceProps, 'utf8');
|