on main help sign in
fix: fixed the missing agents bug
a49606erobcholz
src/provision.sh−26
@@ -48,31 +48,5 @@ systemctl poweroff
48sleep 100 # sleep here so that we don't see the login screen flash up before the shutdown.
48sleep 100 # sleep here so that we don't see the login screen flash up before the shutdown.
49EOF
49EOF
50
50
51−# Install Mise
52−curl https://mise.run | sh
53−echo 'eval "$(~/.local/bin/mise activate bash)"' >> .bashrc
54−
55−export PATH="$HOME/.local/bin:$PATH"
56−eval "$(mise activate bash)"
57−
58−mkdir -p .config/mise/
59−
60−cat > .config/mise/config.toml <<MISE
61− [settings]
62− # Always use the venv created by uv, if available in directory
63− python.uv_venv_auto = true
64− experimental = true
65− idiomatic_version_file_enable_tools = ["rust"]
66−
67− [tools]
68− uv = "0.9.25"
69− node = "24.13.0"
70− "npm:@openai/codex" = "latest"
71− "npm:@anthropic-ai/claude-code" = "latest"
72−MISE
73−
74−touch .config/mise/mise.lock
75−mise install
76−
77# Done provisioning, power off the VM
51# Done provisioning, power off the VM
78systemctl poweroff
52systemctl poweroff
src/ssh.sh+39
@@ -63,6 +63,45 @@ fi
63install -d -m 700 -o "$SSH_USER" -g "$SSH_USER" "/home/${SSH_USER}/.ssh"
63install -d -m 700 -o "$SSH_USER" -g "$SSH_USER" "/home/${SSH_USER}/.ssh"
64install -m 600 -o "$SSH_USER" -g "$SSH_USER" "$KEY_PATH" "/home/${SSH_USER}/.ssh/authorized_keys"
64install -m 600 -o "$SSH_USER" -g "$SSH_USER" "$KEY_PATH" "/home/${SSH_USER}/.ssh/authorized_keys"
65
65
66+# Ensure codex/claude are visible in the user's HOME
67+USER_HOME="$(getent passwd "$SSH_USER" | cut -d: -f6 2>/dev/null || true)"
68+if [ -z "$USER_HOME" ]; then
69+ USER_HOME="/home/${SSH_USER}"
70+fi
71+install -d -m 755 /usr/local/codex /usr/local/claude
72+if [ ! -e "${USER_HOME}/.codex" ]; then
73+ ln -s /usr/local/codex "${USER_HOME}/.codex"
74+fi
75+if [ ! -e "${USER_HOME}/.claude" ]; then
76+ ln -s /usr/local/claude "${USER_HOME}/.claude"
77+fi
78+chown -h "${SSH_USER}:${SSH_USER}" "${USER_HOME}/.codex" "${USER_HOME}/.claude" 2>/dev/null || true
79+
80+# Install Mise
81+curl https://mise.run | sh
82+echo 'eval "$(~/.local/bin/mise activate bash)"' >> "${USER_HOME}/.bashrc"
83+
84+export PATH="${USER_HOME}/.local/bin:$PATH"
85+
86+mkdir -p "${USER_HOME}/.config/mise"
87+
88+cat > "${USER_HOME}/.config/mise/config.toml" <<MISE
89+ [settings]
90+ # Always use the venv created by uv, if available in directory
91+ python.uv_venv_auto = true
92+ experimental = true
93+ idiomatic_version_file_enable_tools = ["rust"]
94+
95+ [tools]
96+ uv = "0.9.25"
97+ node = "24.13.0"
98+ "npm:@openai/codex" = "latest"
99+ "npm:@anthropic-ai/claude-code" = "latest"
100+MISE
101+
102+touch "${USER_HOME}/.config/mise/mise.lock"
103+mise install
104+
66# 3) start ssh (don't swallow failures)
105# 3) start ssh (don't swallow failures)
67# If ssh is already active, don't force start/restart.
106# If ssh is already active, don't force start/restart.
68if ! systemctl is-active --quiet ssh; then
107if ! systemctl is-active --quiet ssh; then
src/vm.rs+3−9
@@ -209,17 +209,11 @@ where
209
209
210 // Add default shares, if they exist
210 // Add default shares, if they exist
211 for share in [
211 for share in [
212− DirectoryShare::new(home.join(".m2"), "/root/.m2".into(), false),
212+ DirectoryShare::new(home.join(".codex"), "/usr/local/codex".into(), false),
213− DirectoryShare::new(
214− home.join(".cargo/registry"),
215− "/root/.cargo/registry".into(),
216− false,
217− ),
218− DirectoryShare::new(home.join(".codex"), "/root/.codex".into(), false),
219− DirectoryShare::new(home.join(".claude"), "/root/.claude".into(), false),
213+ DirectoryShare::new(home.join(".claude"), "/usr/local/claude".into(), false),
220 DirectoryShare::new(
214 DirectoryShare::new(
221 "/Users/zhangjie/Documents/Code/CompletePrograms/vibebox/.ssh".into(),
215 "/Users/zhangjie/Documents/Code/CompletePrograms/vibebox/.ssh".into(),
222− "/root/.ssh".into(),
216+ "/usr/local/ssh".into(),
223 true,
217 true,
224 ),
218 ),
225 ]
219 ]