caproom 0.7.5 → 0.7.6

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.
Files changed (2) hide show
  1. package/bin/caproom +4 -0
  2. package/package.json +1 -1
package/bin/caproom CHANGED
@@ -925,6 +925,7 @@ run_watchdog() {
925
925
  if [[ ! -f "$_cap_bin" ]]; then
926
926
  _cap_bin="$(command -v caproom 2>/dev/null || echo "$_cap_bin")"
927
927
  fi
928
+ set +m 2>/dev/null || true
928
929
  "$@" &
929
930
  local _tui_pid=$!
930
931
  # Fire-and-forget watch; it exits when _tui_pid exits. Suppressed so it
@@ -932,6 +933,7 @@ run_watchdog() {
932
933
  bash "$_cap_bin" watch --threshold-mb "$LIMIT_MB" --interval "$INTERVAL" --auto-park --json "$_tui_pid" >/dev/null 2>&1 &
933
934
  local _watch_pid=$!
934
935
  wait "$_tui_pid"
936
+ set -m 2>/dev/null || true
935
937
  local _rc=$?
936
938
  # Best-effort cleanup of the detached watcher (it should already exit
937
939
  # via all-exited, but kill is cheap if TUI exited fast).
@@ -959,6 +961,7 @@ run_watchdog() {
959
961
  || { [[ -t 0 ]] && stty sane </dev/tty 2>/dev/null || true; }
960
962
  printf '\033[?1049l\033[?1000l\033[?1002l\033[?1003l\033[?1006l\033[?2004l\033[?25h' >/dev/tty 2>/dev/null || true
961
963
  }
964
+ set +m 2>/dev/null || true
962
965
  "$@" &
963
966
  local pid=$!
964
967
  local exit_code=0
@@ -1003,6 +1006,7 @@ run_watchdog() {
1003
1006
  sleep "$INTERVAL"
1004
1007
  done
1005
1008
  wait "$pid" || exit_code=$?
1009
+ set -m 2>/dev/null || true
1006
1010
  exit "$exit_code"
1007
1011
  }
1008
1012
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "caproom",
3
- "version": "0.7.5",
3
+ "version": "0.7.6",
4
4
  "description": "Memory-cap any command (AI coding agents, builds, background jobs) on macOS, Linux, and Windows \u2014 real enforcement via Docker cgroups, Windows Job Objects, or a polling watchdog, plus park/wake to reclaim idle process memory without killing.",
5
5
  "bin": {
6
6
  "caproom": "bin/caproom.js",