@misterhuydo/sentinel 1.3.2 → 1.3.3

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-23T17:50:08.240Z
1
+ 2026-03-23T18:20:09.151Z
@@ -1,6 +1,6 @@
1
1
  {
2
- "message": "Auto-checkpoint at 2026-03-23T17:56:42.485Z",
3
- "checkpoint_at": "2026-03-23T17:56:42.486Z",
2
+ "message": "Auto-checkpoint at 2026-03-23T18:08:05.159Z",
3
+ "checkpoint_at": "2026-03-23T18:08:05.160Z",
4
4
  "active_files": [],
5
5
  "notes": [],
6
6
  "mtime_snapshot": {}
package/lib/add.js CHANGED
@@ -129,7 +129,7 @@ function ensureKnownHosts() {
129
129
  const content = fs.existsSync(knownHosts) ? fs.readFileSync(knownHosts, 'utf8') : '';
130
130
  if (content.includes('github.com')) return;
131
131
  info('Adding GitHub to known_hosts…');
132
- const r = spawnSync('ssh-keyscan', ['github.com'], { encoding: 'utf8', timeout: 10000 });
132
+ const r = spawnSync('ssh-keyscan', ['github.com'], { encoding: 'utf8', timeout: 10000, env: gitEnv() });
133
133
  if (r.stdout) fs.appendFileSync(knownHosts, r.stdout);
134
134
  }
135
135
 
@@ -175,6 +175,15 @@ function printDeployKeyInstructions(orgRepo, keyFile) {
175
175
  console.log('');
176
176
  }
177
177
 
178
+ // Ensure git/ssh are findable regardless of how Node was launched
179
+ function gitEnv(extra = {}) {
180
+ const PATH = [
181
+ process.env.PATH || '',
182
+ '/usr/bin', '/usr/local/bin', '/bin', '/usr/sbin',
183
+ ].filter(Boolean).join(':');
184
+ return { ...process.env, PATH, GIT_TERMINAL_PROMPT: '0', ...extra };
185
+ }
186
+
178
187
  // ── repo discovery helpers ────────────────────────────────────────────────────
179
188
 
180
189
  function gitUrlToOrgRepo(gitUrl) {
@@ -191,16 +200,18 @@ function toHttpsUrl(gitUrl) {
191
200
  function isPublicRepo(gitUrl) {
192
201
  const r = spawnSync('git', ['ls-remote', '--heads', toHttpsUrl(gitUrl)], {
193
202
  encoding: 'utf8', timeout: 10000, stdio: ['pipe', 'pipe', 'pipe'],
194
- env: { ...process.env, GIT_TERMINAL_PROMPT: '0' },
203
+ env: gitEnv(),
195
204
  });
196
205
  return r.status === 0;
197
206
  }
198
207
 
199
208
  function validateAccess(repoUrl, keyFile) {
200
- const env = { ...process.env, GIT_TERMINAL_PROMPT: '0' };
201
- if (keyFile) env.GIT_SSH_COMMAND = `ssh -i ${keyFile} -o StrictHostKeyChecking=no -o BatchMode=yes`;
209
+ const extra = keyFile
210
+ ? { GIT_SSH_COMMAND: `ssh -i ${keyFile} -o StrictHostKeyChecking=no -o BatchMode=yes` }
211
+ : {};
202
212
  const r = spawnSync('git', ['ls-remote', '--heads', repoUrl], {
203
- encoding: 'utf8', timeout: 15000, stdio: ['pipe', 'pipe', 'pipe'], env,
213
+ encoding: 'utf8', timeout: 15000, stdio: ['pipe', 'pipe', 'pipe'],
214
+ env: gitEnv(extra),
204
215
  });
205
216
  return { ok: r.status === 0, stderr: (r.stderr || r.error?.message || '').trim() };
206
217
  }
@@ -258,10 +269,10 @@ async function addFromGit(gitUrl, workspace) {
258
269
  step(`[2/3] Scanning repo-configs in ${repoSlug}…`);
259
270
 
260
271
  if (!fs.existsSync(localPath)) {
261
- const cloneEnv = { ...process.env, GIT_TERMINAL_PROMPT: '0',
262
- GIT_SSH_COMMAND: `ssh -i ${keyFile} -o StrictHostKeyChecking=no -o BatchMode=yes` };
263
- spawnSync('git', ['clone', '--depth', '1', gitUrl, localPath],
264
- { stdio: 'inherit', env: cloneEnv });
272
+ spawnSync('git', ['clone', '--depth', '1', gitUrl, localPath], {
273
+ stdio: 'inherit',
274
+ env: gitEnv({ GIT_SSH_COMMAND: `ssh -i ${keyFile} -o StrictHostKeyChecking=no -o BatchMode=yes` }),
275
+ });
265
276
  }
266
277
 
267
278
  const discovered = discoverReposFromClone(localPath);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@misterhuydo/sentinel",
3
- "version": "1.3.2",
3
+ "version": "1.3.3",
4
4
  "description": "Sentinel — Autonomous DevOps Agent installer and manager",
5
5
  "bin": {
6
6
  "sentinel": "./bin/sentinel.js"