@misterhuydo/sentinel 1.3.8 → 1.3.9

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-24T06:20:19.272Z
1
+ 2026-03-24T07:49:55.081Z
@@ -1,6 +1,6 @@
1
1
  {
2
- "message": "Auto-checkpoint at 2026-03-24T06:46:37.910Z",
3
- "checkpoint_at": "2026-03-24T06:46:37.911Z",
2
+ "message": "Auto-checkpoint at 2026-03-24T07:05:17.941Z",
3
+ "checkpoint_at": "2026-03-24T07:05:17.942Z",
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.3.8",
3
+ "version": "1.3.9",
4
4
  "description": "Sentinel — Autonomous DevOps Agent installer and manager",
5
5
  "bin": {
6
6
  "sentinel": "./bin/sentinel.js"
@@ -31,20 +31,17 @@ and opens GitHub PRs for admin review (or pushes directly if AUTO_PUBLISH=true).
31
31
  Your job:
32
32
  - Understand what the DevOps engineer needs in natural language
33
33
  - Query Sentinel's live state (errors, fixes, open PRs) on their behalf
34
- - Deliver tasks/issues to the right project — you know all projects in this workspace
34
+ - Deliver tasks/issues to this project — you are scoped exclusively to this project
35
35
  - Control Sentinel (pause/resume) when asked
36
36
  - Give honest, concise answers — you know this system inside out
37
- - If a project name is unclear or ambiguous, ask the engineer to clarify — never guess
38
37
 
39
38
  What you can do (tools available):
40
39
 
41
40
  1. get_status — Show recent errors detected, fixes applied/pending, open PRs.
42
41
  e.g. "what happened today?", "any issues?", "show open PRs"
43
42
 
44
- 2. create_issue — Deliver a fix/task to any project in this workspace by short name.
45
- You know all project names use list_projects if you're unsure.
46
- If the project name is ambiguous or not found, ask to clarify.
47
- e.g. "tell 1881 to fix X", "look into Y in elprint", "investigate Z"
43
+ 2. create_issue — Deliver a fix/task to this project.
44
+ e.g. "fix X", "look into Y", "investigate Z"
48
45
 
49
46
  3. pause_sentinel — Create SENTINEL_PAUSE file to halt all auto-fix activity.
50
47
  e.g. "pause sentinel", "stop auto-fixing"
@@ -145,8 +142,8 @@ reply with a short summary grouped by category:
145
142
  • `check_auth_status` — Claude auth health, rate-limit circuit state, fix engine 24 h stats — "is Claude working?", "any rate limits?", "auth issues?"
146
143
 
147
144
  *Project & task delivery*
148
- • `list_projects` — all projects and repos Sentinel manages — "what projects do you manage?"
149
- • `create_issue` — deliver a task to any project by name — "tell 1881 to fix X"
145
+ • `list_projects` — repos and log sources this Sentinel instance manages — "what repos do you watch?"
146
+ • `create_issue` — deliver a fix/task to this project — "fix X", "investigate Y"
150
147
  • `trigger_poll` — run a log-fetch + fix cycle right now — "check now"
151
148
  • `pause_sentinel` / `resume_sentinel` — halt or resume all auto-fix activity — "pause Sentinel"
152
149
 
@@ -900,7 +897,8 @@ _TOOLS = [
900
897
  # ── Workspace helpers ─────────────────────────────────────────────────────────
901
898
 
902
899
  def _workspace_dir() -> Path:
903
- return Path(".").resolve().parent
900
+ """Return the current project directory (each process is scoped to one project)."""
901
+ return Path(".").resolve()
904
902
 
905
903
  def _short_name(dir_name: str) -> str:
906
904
  """'sentinel-1881' → '1881', 'sentinel-elprint' → 'elprint', others unchanged."""
@@ -925,25 +923,21 @@ def _read_project_name(project_dir: Path) -> str:
925
923
  return _short_name(project_dir.name)
926
924
 
927
925
  def _find_project_dirs(target: str = "") -> list[Path]:
928
- """Return project dirs matching target (PROJECT_NAME, short name, or full dir name), or all if target empty."""
929
- workspace = _workspace_dir()
930
- results = []
931
- try:
932
- for d in sorted(workspace.iterdir()):
933
- if not d.is_dir() or d.name in ("code", ".git"):
934
- continue
935
- if not (d / "config").exists():
936
- continue
937
- if target:
938
- t = target.lower()
939
- if (t not in d.name.lower()
940
- and t not in _short_name(d.name).lower()
941
- and t not in _read_project_name(d).lower()):
942
- continue
943
- results.append(d)
944
- except Exception:
945
- pass
946
- return results
926
+ """Return the current project dir (optionally filtered by target name).
927
+ Each sentinel process is scoped to one project — cross-project visibility is
928
+ intentionally disabled to prevent information leakage across Slack workspaces.
929
+ """
930
+ current = Path(".").resolve()
931
+ if not (current / "config").exists():
932
+ return []
933
+ if target:
934
+ t = target.lower()
935
+ name = _read_project_name(current)
936
+ if (t not in current.name.lower()
937
+ and t not in _short_name(current.name).lower()
938
+ and t not in name.lower()):
939
+ return []
940
+ return [current]
947
941
 
948
942
  def _git_pull(path: Path) -> dict:
949
943
  try: