replicas-engine 0.1.275 → 0.1.276

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/dist/src/index.js CHANGED
@@ -286,7 +286,7 @@ var WORKSPACE_SIZES = ["small", "large"];
286
286
  var INVALID_WORKSPACE_SIZE_ERROR = `Invalid size: must be one of ${WORKSPACE_SIZES.join(", ")}`;
287
287
 
288
288
  // ../shared/src/e2b.ts
289
- var E2B_TEMPLATE_NAME = "replicas-sandbox-2026-06-06-v6";
289
+ var E2B_TEMPLATE_NAME = "replicas-sandbox-2026-06-07-v1";
290
290
 
291
291
  // ../shared/src/runtime-env.ts
292
292
  function parsePosixEnvFile(content) {
@@ -6746,7 +6746,7 @@ var AspClient = class {
6746
6746
  // src/managers/codex-asp/app-server-process.ts
6747
6747
  var DEFAULT_CODEX_BINARY = "codex";
6748
6748
  var DEFAULT_CODEX_ARGS = ["app-server", "--listen", "stdio://"];
6749
- var ENGINE_PACKAGE_VERSION = "0.1.275";
6749
+ var ENGINE_PACKAGE_VERSION = "0.1.276";
6750
6750
  var INITIALIZE_METHOD = "initialize";
6751
6751
  var INITIALIZED_NOTIFICATION = "initialized";
6752
6752
  var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-engine",
3
- "version": "0.1.275",
3
+ "version": "0.1.276",
4
4
  "description": "Lightweight API server for Replicas workspaces",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",
@@ -53,6 +53,28 @@ else
53
53
  ENGINE_LD_PRELOAD=""
54
54
  fi
55
55
 
56
+ ENGINE_BIN=$(command -v replicas-engine || true)
57
+ if [ -z "$ENGINE_BIN" ]; then
58
+ log "replicas-engine not found on PATH"
59
+ exit 127
60
+ fi
61
+
62
+ ENGINE_CMD=("$ENGINE_BIN")
63
+ if [ -r "$ENGINE_BIN" ]; then
64
+ IFS= read -r ENGINE_SHEBANG < "$ENGINE_BIN" || ENGINE_SHEBANG=""
65
+ if [[ "$ENGINE_SHEBANG" == \#!*node* ]]; then
66
+ NODE_BIN=$(command -v node || true)
67
+ if [ -z "$NODE_BIN" ]; then
68
+ log "node not found on PATH for Node shebang engine: $ENGINE_BIN"
69
+ exit 127
70
+ fi
71
+ ENGINE_CMD=("$NODE_BIN" "$ENGINE_BIN")
72
+ fi
73
+ fi
74
+ if [ -n "$WARMING_FLAG" ]; then
75
+ ENGINE_CMD+=("$WARMING_FLAG")
76
+ fi
77
+
56
78
  while true; do
57
79
  if [ "$RESTART_COUNT" -ge "$MAX_RESTARTS" ]; then
58
80
  log "Exceeded max restarts ($MAX_RESTARTS). Giving up."
@@ -64,9 +86,9 @@ while true; do
64
86
 
65
87
  START_TIME=$(date +%s)
66
88
  if [ -n "$ENGINE_LD_PRELOAD" ]; then
67
- LD_PRELOAD="$ENGINE_LD_PRELOAD" replicas-engine $WARMING_FLAG >> "$BOOTSTRAP_LOG" 2>&1 &
89
+ LD_PRELOAD="$ENGINE_LD_PRELOAD" "${ENGINE_CMD[@]}" >> "$BOOTSTRAP_LOG" 2>&1 &
68
90
  else
69
- replicas-engine $WARMING_FLAG >> "$BOOTSTRAP_LOG" 2>&1 &
91
+ "${ENGINE_CMD[@]}" >> "$BOOTSTRAP_LOG" 2>&1 &
70
92
  fi
71
93
  ENGINE_PID=$!
72
94
  echo "$ENGINE_PID" > "$PIDFILE"