@saadnvd1/agent-os 0.3.644 → 0.3.647

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saadnvd1/agent-os",
3
- "version": "0.3.644",
3
+ "version": "0.3.647",
4
4
  "description": "Self-hosted web UI for managing Claude Code sessions",
5
5
  "bin": {
6
6
  "agent-os": "scripts/agent-os"
@@ -48,7 +48,7 @@
48
48
  "lint": "eslint .",
49
49
  "format": "prettier --write .",
50
50
  "format:check": "prettier --check .",
51
- "test": "vitest run",
51
+ "test": "scripts/test",
52
52
  "test:watch": "vitest",
53
53
  "check": "scripts/check",
54
54
  "screenshots": "tsx scripts/screenshots/run.ts",
package/scripts/check CHANGED
@@ -56,7 +56,7 @@ if has static; then
56
56
  fi
57
57
  fi
58
58
  if has test; then
59
- step "test"; npx vitest run ${vitest_args[@]+"${vitest_args[@]}"}
59
+ step "test"; scripts/test ${vitest_args[@]+"${vitest_args[@]}"}
60
60
  fi
61
61
  if has build; then
62
62
  # The build imports the generated migrations index, so it needs it even
package/scripts/redeploy CHANGED
@@ -39,14 +39,16 @@ if [ -n "${AGENTOS_RESTART:-}" ]; then
39
39
  echo "::phase restarting"
40
40
  eval "$AGENTOS_RESTART"
41
41
  port="${PORT:-3011}"
42
- for _ in $(seq 1 40); do
42
+ # Startup runs migrations, and one that copies the database first took 4.5
43
+ # minutes on a loaded Mac; a 40s wait called that a failure while it worked.
44
+ for _ in $(seq 1 "${AGENTOS_UP_WAIT:-600}"); do
43
45
  if [ "$(curl -s -o /dev/null -w '%{http_code}' "http://127.0.0.1:$port/")" = 200 ]; then
44
46
  echo "AgentOS is up on $port"
45
47
  exit 0
46
48
  fi
47
49
  sleep 1
48
50
  done
49
- echo "AgentOS did not come back on $port; scripts/redeploy --rollback puts the last build back" >&2
51
+ echo "AgentOS did not come back on $port within ${AGENTOS_UP_WAIT:-600}s; scripts/redeploy --rollback puts the last build back" >&2
50
52
  exit 1
51
53
  fi
52
54
  echo "Built. Restart your AgentOS server to run it."
package/scripts/test ADDED
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env bash
2
+ # The full suite, kindly: through `aos heavy` (so other sessions are told) and
3
+ # at low priority on a Mac. CI and machines without aos run plain vitest.
4
+ set -euo pipefail
5
+ cd "$(dirname "$0")/.."
6
+ cmd=(npx vitest run "$@")
7
+ [ "$(uname)" = Darwin ] && [ -z "${CI:-}" ] && cmd=(nice -n 10 "${cmd[@]}")
8
+ if [ -z "${CI:-}" ] && command -v aos >/dev/null 2>&1; then
9
+ exec aos heavy -- "${cmd[@]}"
10
+ fi
11
+ exec "${cmd[@]}"