@runuai/host 0.9.3 → 0.9.4

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.
@@ -207,14 +207,26 @@ fi
207
207
  editor_root="$WORKSPACE"
208
208
  [ -d "$editor_root" ] || editor_root="/home/node"
209
209
 
210
- # Seed the curated code-server defaults (slim chrome, telemetry off, trust
211
- # off) into the User settings dir when the task hasn't written its own yet.
212
- cs_user_dir="$HOME/.local/share/code-server/User"
210
+ # Keep code-server on Uai's managed data path even when a project declares
211
+ # XDG_DATA_HOME. Otherwise code-server starts with a fresh profile elsewhere,
212
+ # which restores the light theme and Workspace Trust prompt.
213
+ cs_data_dir="$HOME/.local/share/code-server"
214
+ cs_user_dir="$cs_data_dir/User"
213
215
  cs_seed="/usr/local/share/uai/code-server-settings.json"
214
- if [ -f "$cs_seed" ] && [ ! -f "$cs_user_dir/settings.json" ]; then
215
- mkdir -p "$cs_user_dir"
216
- cp "$cs_seed" "$cs_user_dir/settings.json"
217
- log "seeded code-server settings"
216
+ # The source-tree sibling keeps direct smoke tests and development runs on the
217
+ # same seed as the packaged image; the image always uses the root-owned path.
218
+ cs_source_seed="$(dirname "${BASH_SOURCE[0]}")/code-server-settings.json"
219
+ if [ ! -f "$cs_seed" ] && [ -f "$cs_source_seed" ]; then
220
+ cs_seed="$cs_source_seed"
221
+ fi
222
+ if [ ! -f "$cs_user_dir/settings.json" ]; then
223
+ if [ ! -f "$cs_seed" ]; then
224
+ log "warning: code-server settings seed missing at $cs_seed"
225
+ elif mkdir -p "$cs_user_dir" && cp "$cs_seed" "$cs_user_dir/settings.json"; then
226
+ log "seeded code-server settings"
227
+ else
228
+ log "warning: could not seed code-server settings at $cs_user_dir/settings.json"
229
+ fi
218
230
  fi
219
231
 
220
232
  if pgrep -f 'code-server.*--bind-addr' >/dev/null 2>&1; then
@@ -222,6 +234,8 @@ if pgrep -f 'code-server.*--bind-addr' >/dev/null 2>&1; then
222
234
  else
223
235
  log "launching code-server on 0.0.0.0:8080"
224
236
  nohup code-server \
237
+ --user-data-dir "$cs_data_dir" \
238
+ --disable-workspace-trust \
225
239
  --auth none \
226
240
  --disable-telemetry \
227
241
  --bind-addr 0.0.0.0:8080 \
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runuai/host",
3
- "version": "0.9.3",
3
+ "version": "0.9.4",
4
4
  "description": "Uai host — runs ephemeral AI coding tasks in Docker on a machine you control.",
5
5
  "license": "MIT",
6
6
  "author": "Diogo Perillo <diogo.perillo@gmail.com>",
@@ -1091,7 +1091,7 @@ fi
1091
1091
  GIT_CONFIG* | GIT_DIR | GIT_WORK_TREE | GIT_COMMON_DIR | \
1092
1092
  GIT_OBJECT_DIRECTORY | GIT_ALTERNATE_OBJECT_DIRECTORIES | \
1093
1093
  GIT_INDEX_FILE | GIT_EXEC_PATH | GIT_ASKPASS | SSH_ASKPASS | \
1094
- GIT_SSH | GIT_SSH_COMMAND | HOME | XDG_CONFIG_HOME | \
1094
+ GIT_SSH | GIT_SSH_COMMAND | HOME | XDG_CONFIG_HOME | XDG_DATA_HOME | \
1095
1095
  BASH_ENV | ENV | UAI_GIT_TRANSPORT | \
1096
1096
  CLAUDE_CODE_OAUTH_TOKEN | ANTHROPIC_API_KEY | \
1097
1097
  ANTHROPIC_AUTH_TOKEN | XAI_API_KEY | PLAYWRIGHT_BROWSERS_PATH) continue ;;
@@ -1180,6 +1180,7 @@ compose_env_override=$(printf '%s' "$project_env_json" | jq -c \
1180
1180
  .GIT_SSH_COMMAND,
1181
1181
  .HOME,
1182
1182
  .XDG_CONFIG_HOME,
1183
+ .XDG_DATA_HOME,
1183
1184
  .BASH_ENV,
1184
1185
  .ENV,
1185
1186
  .UAI_GIT_TRANSPORT,
@@ -1216,6 +1217,7 @@ managed_exec_env=(
1216
1217
  -e "GH_CONFIG_DIR=$managed_gh_config_dir"
1217
1218
  -e "PATH=/usr/bin:/bin"
1218
1219
  -e "XDG_CONFIG_HOME="
1220
+ -e "XDG_DATA_HOME="
1219
1221
  -e "LD_PRELOAD="
1220
1222
  -e "LD_LIBRARY_PATH="
1221
1223
  -e "DYLD_INSERT_LIBRARIES="