@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 CHANGED
@@ -1 +1 @@
1
- 2026-03-22T17:26:44.035Z
1
+ 2026-03-23T05:01:48.297Z
@@ -1,6 +1,6 @@
1
1
  {
2
- "message": "Auto-checkpoint at 2026-03-22T17:38:14.261Z",
3
- "checkpoint_at": "2026-03-22T17:38:14.262Z",
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');