@misterhuydo/sentinel 1.0.43 → 1.0.44
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 +1 -1
- package/.cairn/session.json +2 -2
- package/package.json +1 -1
- package/python/sentinel/sentinel_boss.py +43 -0
package/.cairn/.hint-lock
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2026-03-
|
|
1
|
+
2026-03-22T05:33:05.646Z
|
package/.cairn/session.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"message": "Auto-checkpoint at 2026-03-
|
|
3
|
-
"checkpoint_at": "2026-03-
|
|
2
|
+
"message": "Auto-checkpoint at 2026-03-21T23:30:09.918Z",
|
|
3
|
+
"checkpoint_at": "2026-03-21T23:30:09.918Z",
|
|
4
4
|
"active_files": [],
|
|
5
5
|
"notes": [],
|
|
6
6
|
"mtime_snapshot": {}
|
package/package.json
CHANGED
|
@@ -69,6 +69,9 @@ What you can do (tools available):
|
|
|
69
69
|
11. list_errors — List recent errors from the state store, optionally filtered by repo or source.
|
|
70
70
|
e.g. "show all errors today", "what errors hit elprint this week?"
|
|
71
71
|
|
|
72
|
+
12. pull_repo — Run git pull on one or all managed repos.
|
|
73
|
+
e.g. "pull changes for sentinel-1881", "git pull all repos", "update the code"
|
|
74
|
+
|
|
72
75
|
Tone: direct, professional, like a senior engineer who owns the system.
|
|
73
76
|
Don't pad responses. Don't say "Great question!" or "Certainly!".
|
|
74
77
|
If you don't know something, use a tool to find out before saying you don't know.
|
|
@@ -229,6 +232,22 @@ _TOOLS = [
|
|
|
229
232
|
},
|
|
230
233
|
},
|
|
231
234
|
},
|
|
235
|
+
{
|
|
236
|
+
"name": "pull_repo",
|
|
237
|
+
"description": (
|
|
238
|
+
"Run git pull on one or all managed repos to fetch latest changes from GitHub. "
|
|
239
|
+
"Use for: 'pull changes', 'git pull', 'update repo X', 'fetch latest code'."
|
|
240
|
+
),
|
|
241
|
+
"input_schema": {
|
|
242
|
+
"type": "object",
|
|
243
|
+
"properties": {
|
|
244
|
+
"repo": {
|
|
245
|
+
"type": "string",
|
|
246
|
+
"description": "Repo name to pull (omit to pull all configured repos)",
|
|
247
|
+
},
|
|
248
|
+
},
|
|
249
|
+
},
|
|
250
|
+
},
|
|
232
251
|
]
|
|
233
252
|
|
|
234
253
|
|
|
@@ -439,6 +458,30 @@ def _run_tool(name: str, inputs: dict, cfg_loader, store) -> str:
|
|
|
439
458
|
pass
|
|
440
459
|
return json.dumps({"sentinel_commits": results})
|
|
441
460
|
|
|
461
|
+
if name == "pull_repo":
|
|
462
|
+
target = inputs.get("repo", "").lower()
|
|
463
|
+
results = []
|
|
464
|
+
for repo_name, repo in cfg_loader.repos.items():
|
|
465
|
+
if target and target not in repo_name.lower():
|
|
466
|
+
continue
|
|
467
|
+
local = Path(repo.local_path)
|
|
468
|
+
if not local.exists():
|
|
469
|
+
results.append({"repo": repo_name, "status": "error", "detail": "local path not found"})
|
|
470
|
+
continue
|
|
471
|
+
try:
|
|
472
|
+
r = subprocess.run(
|
|
473
|
+
["git", "pull", "--rebase", "origin", repo.branch],
|
|
474
|
+
cwd=str(local), capture_output=True, text=True, timeout=60,
|
|
475
|
+
)
|
|
476
|
+
last_line = r.stdout.strip().splitlines()[-1] if r.stdout.strip() else "already up to date"
|
|
477
|
+
if r.returncode == 0:
|
|
478
|
+
results.append({"repo": repo_name, "status": "ok", "detail": last_line})
|
|
479
|
+
else:
|
|
480
|
+
results.append({"repo": repo_name, "status": "error", "detail": r.stderr.strip()})
|
|
481
|
+
except Exception as e:
|
|
482
|
+
results.append({"repo": repo_name, "status": "error", "detail": str(e)})
|
|
483
|
+
return json.dumps({"results": results})
|
|
484
|
+
|
|
442
485
|
return json.dumps({"error": f"unknown tool: {name}"})
|
|
443
486
|
|
|
444
487
|
|