fix: fixed the missing agents bug

This commit is contained in:
robcholz
2026-02-06 22:30:14 -05:00
parent 197207db76
commit a49606e712
3 changed files with 42 additions and 35 deletions
-26
View File
@@ -48,31 +48,5 @@ systemctl poweroff
sleep 100 # sleep here so that we don't see the login screen flash up before the shutdown.
EOF
# Install Mise
curl https://mise.run | sh
echo 'eval "$(~/.local/bin/mise activate bash)"' >> .bashrc
export PATH="$HOME/.local/bin:$PATH"
eval "$(mise activate bash)"
mkdir -p .config/mise/
cat > .config/mise/config.toml <<MISE
[settings]
# Always use the venv created by uv, if available in directory
python.uv_venv_auto = true
experimental = true
idiomatic_version_file_enable_tools = ["rust"]
[tools]
uv = "0.9.25"
node = "24.13.0"
"npm:@openai/codex" = "latest"
"npm:@anthropic-ai/claude-code" = "latest"
MISE
touch .config/mise/mise.lock
mise install
# Done provisioning, power off the VM
systemctl poweroff
+39
View File
@@ -63,6 +63,45 @@ fi
install -d -m 700 -o "$SSH_USER" -g "$SSH_USER" "/home/${SSH_USER}/.ssh"
install -m 600 -o "$SSH_USER" -g "$SSH_USER" "$KEY_PATH" "/home/${SSH_USER}/.ssh/authorized_keys"
# Ensure codex/claude are visible in the user's HOME
USER_HOME="$(getent passwd "$SSH_USER" | cut -d: -f6 2>/dev/null || true)"
if [ -z "$USER_HOME" ]; then
USER_HOME="/home/${SSH_USER}"
fi
install -d -m 755 /usr/local/codex /usr/local/claude
if [ ! -e "${USER_HOME}/.codex" ]; then
ln -s /usr/local/codex "${USER_HOME}/.codex"
fi
if [ ! -e "${USER_HOME}/.claude" ]; then
ln -s /usr/local/claude "${USER_HOME}/.claude"
fi
chown -h "${SSH_USER}:${SSH_USER}" "${USER_HOME}/.codex" "${USER_HOME}/.claude" 2>/dev/null || true
# Install Mise
curl https://mise.run | sh
echo 'eval "$(~/.local/bin/mise activate bash)"' >> "${USER_HOME}/.bashrc"
export PATH="${USER_HOME}/.local/bin:$PATH"
mkdir -p "${USER_HOME}/.config/mise"
cat > "${USER_HOME}/.config/mise/config.toml" <<MISE
[settings]
# Always use the venv created by uv, if available in directory
python.uv_venv_auto = true
experimental = true
idiomatic_version_file_enable_tools = ["rust"]
[tools]
uv = "0.9.25"
node = "24.13.0"
"npm:@openai/codex" = "latest"
"npm:@anthropic-ai/claude-code" = "latest"
MISE
touch "${USER_HOME}/.config/mise/mise.lock"
mise install
# 3) start ssh (don't swallow failures)
# If ssh is already active, don't force start/restart.
if ! systemctl is-active --quiet ssh; then
+3 -9
View File
@@ -209,17 +209,11 @@ where
// Add default shares, if they exist
for share in [
DirectoryShare::new(home.join(".m2"), "/root/.m2".into(), false),
DirectoryShare::new(
home.join(".cargo/registry"),
"/root/.cargo/registry".into(),
false,
),
DirectoryShare::new(home.join(".codex"), "/root/.codex".into(), false),
DirectoryShare::new(home.join(".claude"), "/root/.claude".into(), false),
DirectoryShare::new(home.join(".codex"), "/usr/local/codex".into(), false),
DirectoryShare::new(home.join(".claude"), "/usr/local/claude".into(), false),
DirectoryShare::new(
"/Users/zhangjie/Documents/Code/CompletePrograms/vibebox/.ssh".into(),
"/root/.ssh".into(),
"/usr/local/ssh".into(),
true,
),
]