@misterhuydo/sentinel 1.4.97 → 1.4.98

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-30T05:44:22.167Z",
3
- "checkpoint_at": "2026-03-30T05:44:22.168Z",
2
+ "message": "Auto-checkpoint at 2026-03-30T05:55:15.774Z",
3
+ "checkpoint_at": "2026-03-30T05:55:15.775Z",
4
4
  "active_files": [],
5
5
  "notes": [],
6
6
  "mtime_snapshot": {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@misterhuydo/sentinel",
3
- "version": "1.4.97",
3
+ "version": "1.4.98",
4
4
  "description": "Sentinel — Autonomous DevOps Agent installer and manager",
5
5
  "bin": {
6
6
  "sentinel": "./bin/sentinel.js"
@@ -38,5 +38,29 @@ def ensure_installed() -> bool:
38
38
 
39
39
 
40
40
  def index_repo(repo: RepoConfig) -> bool:
41
- """No-op: Cairn indexes automatically via hooks when Claude Code runs."""
42
- return True
41
+ """Run `cairn install` in the repo if not already initialised.
42
+
43
+ Cairn indexes automatically via hooks once installed — this just ensures
44
+ the .cairn project file and MCP registration exist before the first fix attempt.
45
+ """
46
+ import os
47
+ cairn_marker = os.path.join(repo.local_path, ".cairn", ".cairn-project")
48
+ if os.path.exists(cairn_marker):
49
+ logger.debug("cairn already installed in %s", repo.local_path)
50
+ return True
51
+ try:
52
+ r = subprocess.run(
53
+ [CAIRN_BIN, "install"],
54
+ cwd=repo.local_path,
55
+ capture_output=True,
56
+ text=True,
57
+ timeout=30,
58
+ )
59
+ if r.returncode == 0:
60
+ logger.info("cairn installed in %s", repo.local_path)
61
+ return True
62
+ logger.warning("cairn install failed in %s: %s", repo.local_path, r.stderr.strip())
63
+ return False
64
+ except Exception as e:
65
+ logger.warning("cairn install error in %s: %s", repo.local_path, e)
66
+ return False