@misterhuydo/sentinel 1.3.4 → 1.3.5

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-23T18:21:42.702Z",
3
- "checkpoint_at": "2026-03-23T18:21:42.703Z",
2
+ "message": "Auto-checkpoint at 2026-03-23T18:27:21.579Z",
3
+ "checkpoint_at": "2026-03-23T18:27:21.580Z",
4
4
  "active_files": [],
5
5
  "notes": [],
6
6
  "mtime_snapshot": {}
package/lib/add.js CHANGED
@@ -484,6 +484,7 @@ async function addFromGit(gitUrl, workspace) {
484
484
  }
485
485
  ok(`Project "${name}" ready at ${localPath}`);
486
486
  printNextSteps(localPath, autoPublish);
487
+ await offerToStart(localPath);
487
488
  } else {
488
489
  // No existing repo-configs — scaffold fresh project
489
490
  fs.ensureDirSync(projectDir);
@@ -503,6 +504,7 @@ async function addFromGit(gitUrl, workspace) {
503
504
  generateWorkspaceScripts(workspace, {}, {}, {}, effectiveToken);
504
505
  ok(`Project "${name}" created at ${projectDir}`);
505
506
  printNextSteps(projectDir, autoPublish);
507
+ await offerToStart(projectDir);
506
508
  }
507
509
  }
508
510
 
@@ -650,21 +652,36 @@ async function addFromUrl(url, workspace) {
650
652
  // ── printNextSteps ────────────────────────────────────────────────────────────
651
653
 
652
654
  function printNextSteps(projectDir, autoPublish) {
655
+ const logFile = path.join(projectDir, 'logs', 'sentinel.log');
653
656
  const mode = autoPublish === true
654
- ? chalk.yellow(' ⚠ Fixes push directly to main — ensure CI blocks bad pushes')
657
+ ? chalk.yellow('\n ⚠ Fixes push directly to main — ensure CI blocks bad pushes')
655
658
  : autoPublish === false
656
- ? chalk.cyan(' → Sentinel will open a GitHub PR for each fix — review and merge at github.com')
659
+ ? chalk.cyan('\n → Sentinel opens a GitHub PR for each fix — review and merge at github.com')
657
660
  : '';
658
661
  console.log(`
659
- Next steps:
660
- 1. Edit config/log-configs/ to add your log sources
661
- ${chalk.cyan(`${projectDir}/config/`)}
662
- 2. Start Sentinel:
663
- ${chalk.cyan(`${projectDir}/start.sh`)}
664
- ${mode ? ' ' + mode : ''}
662
+ Config: ${chalk.cyan(path.join(projectDir, 'config', ''))}
663
+ Start: ${chalk.cyan(path.join(projectDir, 'start.sh'))}${mode}
664
+ Logs: ${chalk.cyan(logFile)}
665
+ ${chalk.gray(`tail -f ${logFile}`)}
665
666
  `);
666
667
  }
667
668
 
669
+ async function offerToStart(projectDir) {
670
+ const startSh = path.join(projectDir, 'start.sh');
671
+ if (!fs.existsSync(startSh)) return;
672
+ const { startNow } = await prompts({
673
+ type: 'confirm', name: 'startNow',
674
+ message: 'Start Sentinel now?', initial: true,
675
+ }, { onCancel: () => {} });
676
+ if (!startNow) return;
677
+ const { status } = spawnSync('bash', [startSh], { stdio: 'inherit', env: gitEnv() });
678
+ if (status === 0) {
679
+ const logFile = path.join(projectDir, 'logs', 'sentinel.log');
680
+ ok('Sentinel started');
681
+ info(`Logs: tail -f ${logFile}`);
682
+ }
683
+ }
684
+
668
685
  // ── entry point ───────────────────────────────────────────────────────────────
669
686
 
670
687
  module.exports = async function add(arg) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@misterhuydo/sentinel",
3
- "version": "1.3.4",
3
+ "version": "1.3.5",
4
4
  "description": "Sentinel — Autonomous DevOps Agent installer and manager",
5
5
  "bin": {
6
6
  "sentinel": "./bin/sentinel.js"