@misterhuydo/sentinel 1.0.90 → 1.0.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.
@@ -1,6 +1,6 @@
1
1
  {
2
- "message": "Auto-checkpoint at 2026-03-23T06:09:59.037Z",
3
- "checkpoint_at": "2026-03-23T06:09:59.038Z",
2
+ "message": "Auto-checkpoint at 2026-03-23T06:18:02.115Z",
3
+ "checkpoint_at": "2026-03-23T06:18:02.116Z",
4
4
  "active_files": [],
5
5
  "notes": [],
6
6
  "mtime_snapshot": {}
package/lib/init.js CHANGED
@@ -54,8 +54,10 @@ module.exports = async function init() {
54
54
  {
55
55
  type: prev => (prev === 'apikey' || prev === 'both') ? 'password' : null,
56
56
  name: 'anthropicKey',
57
- message: 'Anthropic API key (sk-ant-...)',
58
- validate: v => v.startsWith('sk-ant-') ? true : 'Key should start with sk-ant-',
57
+ message: existing.ANTHROPIC_API_KEY
58
+ ? 'Anthropic API key (press Enter to keep current)'
59
+ : 'Anthropic API key (sk-ant-...)',
60
+ validate: v => !v || v.startsWith('sk-ant-') ? true : 'Key should start with sk-ant-',
59
61
  },
60
62
  {
61
63
  type: 'confirm',
@@ -107,9 +109,10 @@ module.exports = async function init() {
107
109
  ], { onCancel: () => process.exit(0) });
108
110
 
109
111
  const { workspace, authMode, anthropicKey, example, systemd, smtpUser, smtpPassword, smtpHost, setupSlack, slackBotToken, slackAppToken } = answers;
110
- const effectiveSmtpPassword = smtpPassword || existing.SMTP_PASSWORD || '';
111
- const effectiveSlackBotToken = slackBotToken || existing.SLACK_BOT_TOKEN || '';
112
- const effectiveSlackAppToken = slackAppToken || existing.SLACK_APP_TOKEN || '';
112
+ const effectiveAnthropicKey = anthropicKey || existing.ANTHROPIC_API_KEY || '';
113
+ const effectiveSmtpPassword = smtpPassword || existing.SMTP_PASSWORD || '';
114
+ const effectiveSlackBotToken = slackBotToken || existing.SLACK_BOT_TOKEN || '';
115
+ const effectiveSlackAppToken = slackAppToken || existing.SLACK_APP_TOKEN || '';
113
116
  const codeDir = path.join(workspace, 'code');
114
117
 
115
118
  // ── Python ──────────────────────────────────────────────────────────────────
@@ -158,12 +161,12 @@ module.exports = async function init() {
158
161
 
159
162
  // ── Claude Code auth ─────────────────────────────────────────────────────────
160
163
  step('Claude Code authentication…');
161
- if (authMode === 'both' && anthropicKey) {
164
+ if (authMode === 'both' && effectiveAnthropicKey) {
162
165
  ok('API key → Sentinel Boss (full tools, structured responses)');
163
166
  ok('Claude Pro → Fix Engine + Ask Codebase (heavy coding, Pro subscription)');
164
167
  info('Run `claude login` on this server now (or before starting projects)');
165
168
  info('CLAUDE_PRO_FOR_TASKS=true written to workspace sentinel.properties');
166
- } else if (authMode === 'apikey' && anthropicKey) {
169
+ } else if (authMode === 'apikey' && effectiveAnthropicKey) {
167
170
  ok('API key → all Claude usage (Boss + Fix Engine billed to your API quota)');
168
171
  info('CLAUDE_PRO_FOR_TASKS=false written — Fix Engine will use API key');
169
172
  warn('Heavy fix tasks will consume API tokens. Claude Pro is cheaper for those.');
@@ -194,14 +197,14 @@ module.exports = async function init() {
194
197
  if (example) {
195
198
  step('Creating example project…');
196
199
  const exampleDir = path.join(workspace, 'my-project');
197
- writeExampleProject(exampleDir, codeDir, pythonBin, anthropicKey || '', { botToken: effectiveSlackBotToken, appToken: effectiveSlackAppToken });
200
+ writeExampleProject(exampleDir, codeDir, pythonBin, effectiveAnthropicKey, { botToken: effectiveSlackBotToken, appToken: effectiveSlackAppToken });
198
201
  ok(`Example project: ${exampleDir}`);
199
202
  }
200
203
 
201
204
  // ── Workspace start/stop scripts ─────────────────────────────────────────────
202
205
  step('Generating scripts…');
203
206
  const authConfig = {};
204
- if (anthropicKey) authConfig.apiKey = anthropicKey;
207
+ if (effectiveAnthropicKey) authConfig.apiKey = effectiveAnthropicKey;
205
208
  if (authMode === 'both' || authMode === 'oauth') authConfig.claudeProForTasks = true;
206
209
  if (authMode === 'apikey') authConfig.claudeProForTasks = false;
207
210
  generateWorkspaceScripts(workspace, { host: smtpHost, user: smtpUser, password: effectiveSmtpPassword }, { botToken: effectiveSlackBotToken, appToken: effectiveSlackAppToken }, authConfig);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@misterhuydo/sentinel",
3
- "version": "1.0.90",
3
+ "version": "1.0.91",
4
4
  "description": "Sentinel — Autonomous DevOps Agent installer and manager",
5
5
  "bin": {
6
6
  "sentinel": "./bin/sentinel.js"