@misterhuydo/sentinel 1.0.1 → 1.0.2
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/lib/generate.js +11 -1
- package/lib/init.js +20 -4
- package/package.json +1 -1
package/lib/generate.js
CHANGED
|
@@ -31,7 +31,17 @@ function generateProjectScripts(projectDir, codeDir, pythonBin) {
|
|
|
31
31
|
|
|
32
32
|
// init.sh
|
|
33
33
|
fs.writeFileSync(path.join(projectDir, 'init.sh'), `#!/usr/bin/env bash
|
|
34
|
-
# First-time setup
|
|
34
|
+
# First-time setup for this Sentinel project instance.
|
|
35
|
+
#
|
|
36
|
+
# What this does:
|
|
37
|
+
# - Clones any repos defined in config/repo-configs/ that don't exist locally yet
|
|
38
|
+
# (skips repos that are already cloned — safe to run multiple times)
|
|
39
|
+
# - Indexes each repo with Cairn MCP for codebase context
|
|
40
|
+
# - Tests SSH connectivity to each configured log source
|
|
41
|
+
# - Sends a test email to verify SMTP settings
|
|
42
|
+
#
|
|
43
|
+
# Note: ongoing repo management (git pull, conflict resolution) is handled
|
|
44
|
+
# automatically by Sentinel on each fix cycle — you don't need to do it manually.
|
|
35
45
|
set -euo pipefail
|
|
36
46
|
cd "$(dirname "$0")"
|
|
37
47
|
PYTHONPATH="${codeDir}" "${pythonBin}" -m sentinel.main --config ./config --init
|
package/lib/init.js
CHANGED
|
@@ -101,11 +101,19 @@ module.exports = async function init() {
|
|
|
101
101
|
if (authMode === 'apikey' && anthropicKey) {
|
|
102
102
|
ok('API key will be written to each project\'s sentinel.properties');
|
|
103
103
|
} else if (authMode === 'oauth') {
|
|
104
|
-
console.log(chalk.yellow(
|
|
105
|
-
|
|
106
|
-
|
|
104
|
+
console.log(chalk.yellow(
|
|
105
|
+
'\n Claude Code OAuth requires an interactive step.\n' +
|
|
106
|
+
' After setup completes, run this command on the server:\n\n' +
|
|
107
|
+
chalk.bold(' claude\n\n') +
|
|
108
|
+
' It will print a URL like:\n' +
|
|
109
|
+
' https://claude.ai/oauth/authorize?...\n\n' +
|
|
110
|
+
' Open that URL in any browser, log in with your Claude Pro account,\n' +
|
|
111
|
+
' and the server will be authenticated. The token is stored in ~/.claude/\n' +
|
|
112
|
+
' and persists across restarts.\n'
|
|
113
|
+
));
|
|
114
|
+
warn('OAuth not completed yet — run "claude" after setup to authenticate');
|
|
107
115
|
} else {
|
|
108
|
-
warn('Skipping auth — run "claude"
|
|
116
|
+
warn('Skipping auth — set ANTHROPIC_API_KEY in sentinel.properties or run "claude" to authenticate');
|
|
109
117
|
}
|
|
110
118
|
|
|
111
119
|
// ── Workspace structure ─────────────────────────────────────────────────────
|
|
@@ -160,6 +168,14 @@ module.exports = async function init() {
|
|
|
160
168
|
${chalk.cyan('journalctl -u sentinel -f')}
|
|
161
169
|
`);
|
|
162
170
|
}
|
|
171
|
+
if (authMode === 'oauth') {
|
|
172
|
+
console.log(
|
|
173
|
+
chalk.bold.yellow(' ⚠ Complete Claude Code login now:\n') +
|
|
174
|
+
` ${chalk.bold.cyan('claude')}\n` +
|
|
175
|
+
' Open the URL it prints in any browser → log in with Claude Pro.\n'
|
|
176
|
+
);
|
|
177
|
+
}
|
|
178
|
+
|
|
163
179
|
console.log(` Add another project anytime:
|
|
164
180
|
${chalk.cyan('sentinel add <project-name>')}
|
|
165
181
|
`);
|