24 lines
3.5 KiB
YAML
24 lines
3.5 KiB
YAML
name: "babysit"
|
|
repo: "https://github.com/aarav1656/babysit"
|
|
sha: "7e9a4c17842d4fca5affe77701e75c3f69101a60"
|
|
subdir: "babysit"
|
|
description: "Watches a long job's log (training run, build, migration) with zero model calls, keeps one chat message updated in place, and wakes the agent only when the job hits a non-finite value, out-of-memory error, traceback, stall, process exit or a line containing your alert text. With `on_failure: pause` it freezes the job on a non-finite value, out-of-memory error, memory pressure or traceback, and a restart linked with `resume_of` gets a recovered or relapsed verdict once it passes the old failure step. Disclosure — Babysit reads the selected log file through one read-only handle, opened without following symlinks and checked again from the handle itself, so replacing the path afterwards changes nothing it reads. It accepts absolute paths only and refuses files inside the active profile's Hermes home, the Hermes root that holds every profile, `~/.ssh`, `~/.aws`, `~/.gnupg`, `~/.kube`, `~/.docker`, `~/.config`, `/etc`, `/proc`, `/sys` and `/dev`, files with credential-looking names such as `.env`, `id_*`, `*.pem`, `*.key` and `auth.json`, shell and database history files (`.bash_history`, `.zsh_history`, `.python_history`, `.psql_history` and every other `.*_history`), `~/.pgpass`, `~/.netrc`, `~/.git-credentials`, hard-linked files, and anything that is not a regular file. When a PID is given, every 4 seconds it reads that process's resident memory through psutil, plus the cgroup memory limit from `/sys/fs/cgroup` or the system's available memory, and when the process ends it reads its exit status without reaping it. It never writes to the log, makes no network requests of its own, spawns no child processes, and sends no signals unless a watch sets `on_failure: pause`: then it sends `SIGSTOP` to the one PID the watch was given, and `SIGCONT` on `babysit_resume` or `/babysit resume`, each only after re-checking that PID's uid and start time. It never kills a process, never signals a process group or another PID, and refuses Hermes' own process and its parents. `checkpoint_dir` reports the newest checkpoint's name, size and age without reading its contents. For the Desktop pane it writes one JSON file per watch, `<hermes home>/plugin-data/babysit/watches/<watch id>.json`, owner-only and replaced atomically whenever the state changes and at least every 4 seconds. Each file holds the watch's file name, log path, PID, metric series, memory samples, events, counters and the last 12 log lines (200 characters each). Files of watches that ended a day ago, and all but the newest 24, are removed when a watch starts. The read-only dashboard route `GET /api/plugins/babysit/watches` reads those files and writes nothing. Its one runtime dependency beyond the standard library is psutil, which Hermes pins. It creates one daemon thread per watch. Babysit and Hermes read the plugin's `allow_gateway_injection` setting in the profile Babysit runs in to check injection permission. The watch loop makes no model calls. Detected events are sent to the current session, which may start an agent turn."
|
|
maintainer: "aarav1656"
|
|
tier: "community"
|
|
category: "automation"
|
|
requires_hermes: ">=0.23.0"
|
|
docs_url: "https://github.com/aarav1656/babysit"
|
|
version: "0.3.0"
|
|
title: "Babysit"
|
|
readme: true
|
|
capabilities:
|
|
provides_tools:
|
|
- "babysit_watch"
|
|
- "babysit_stop"
|
|
- "babysit_list"
|
|
- "babysit_resume"
|
|
provides_hooks:
|
|
- "on_session_finalize"
|
|
provides_middleware: []
|
|
requires_env: []
|