@kokorolx/ai-sandbox-wrapper 3.0.5 → 3.0.6

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/bin/ai-run CHANGED
@@ -1036,8 +1036,8 @@ show_network_menu() {
1036
1036
  if [[ "$key" == $'\x1b' ]]; then
1037
1037
  read -rsn2 -t 1 escape_seq
1038
1038
  case "$escape_seq" in
1039
- '[A') ((cursor > 0)) && ((cursor--)) ;;
1040
- '[B') ((cursor < ${#all_nets[@]} - 1)) && ((cursor++)) ;;
1039
+ '[A') ((cursor > 0)) && ((cursor--)) || true ;;
1040
+ '[B') ((cursor < ${#all_nets[@]} - 1)) && ((cursor++)) || true ;;
1041
1041
  esac
1042
1042
  else
1043
1043
  case "$key" in
@@ -1083,8 +1083,8 @@ show_network_menu() {
1083
1083
  ''|$'\n'|$'\r')
1084
1084
  break
1085
1085
  ;;
1086
- k) ((cursor > 0)) && ((cursor--)) ;;
1087
- j) ((cursor < ${#all_nets[@]} - 1)) && ((cursor++)) ;;
1086
+ k) ((cursor > 0)) && ((cursor--)) || true ;;
1087
+ j) ((cursor < ${#all_nets[@]} - 1)) && ((cursor++)) || true ;;
1088
1088
  esac
1089
1089
  fi
1090
1090
  done
@@ -1139,14 +1139,14 @@ show_save_prompt() {
1139
1139
  if [[ "$key" == $'\x1b' ]]; then
1140
1140
  read -rsn2 -t 1 escape_seq
1141
1141
  case "$escape_seq" in
1142
- '[A') ((cursor > 0)) && ((cursor--)) ;;
1143
- '[B') ((cursor < 2)) && ((cursor++)) ;;
1142
+ '[A') ((cursor > 0)) && ((cursor--)) || true ;;
1143
+ '[B') ((cursor < 2)) && ((cursor++)) || true ;;
1144
1144
  esac
1145
1145
  else
1146
1146
  case "$key" in
1147
1147
  ''|$'\n'|$'\r') break ;;
1148
- k) ((cursor > 0)) && ((cursor--)) ;;
1149
- j) ((cursor < 2)) && ((cursor++)) ;;
1148
+ k) ((cursor > 0)) && ((cursor--)) || true ;;
1149
+ j) ((cursor < 2)) && ((cursor++)) || true ;;
1150
1150
  esac
1151
1151
  fi
1152
1152
  done
@@ -86,11 +86,10 @@ RUN mkdir -p /opt/playwright-browsers && \
86
86
  npx playwright-core install --no-shell chromium && \
87
87
  npx playwright-core install-deps chromium && \
88
88
  chmod -R 777 /opt/playwright-browsers && \
89
- ln -sf $(ls -d /opt/playwright-browsers/chromium-*/chrome-linux/chrome | head -1) /opt/chromium
89
+ ln -sf $(ls -d /opt/playwright-browsers/chromium-*/chrome-linux/chrome | sort -V | tail -1) /opt/chromium
90
90
  ENV CHROME_DEVTOOLS_MCP_NO_USAGE_STATISTICS=1
91
91
  RUN npm install -g chrome-devtools-mcp@latest && \
92
92
  touch /opt/.mcp-chrome-devtools-installed
93
- RUN touch /opt/.mcp-playwright-installed
94
93
 
95
94
  # Create workspace
96
95
  WORKDIR /workspace
@@ -86,11 +86,10 @@ RUN mkdir -p /opt/playwright-browsers && \
86
86
  npx playwright-core install --no-shell chromium && \
87
87
  npx playwright-core install-deps chromium && \
88
88
  chmod -R 777 /opt/playwright-browsers && \
89
- ln -sf $(ls -d /opt/playwright-browsers/chromium-*/chrome-linux/chrome | head -1) /opt/chromium
89
+ ln -sf $(ls -d /opt/playwright-browsers/chromium-*/chrome-linux/chrome | sort -V | tail -1) /opt/chromium
90
90
  ENV CHROME_DEVTOOLS_MCP_NO_USAGE_STATISTICS=1
91
91
  RUN npm install -g chrome-devtools-mcp@latest && \
92
92
  touch /opt/.mcp-chrome-devtools-installed
93
- RUN touch /opt/.mcp-playwright-installed
94
93
 
95
94
  # Create workspace
96
95
  WORKDIR /workspace
@@ -101,34 +100,12 @@ RUN useradd -m -u ${AGENT_UID} -d /home/agent agent && \
101
100
  chown -R agent:agent /home/agent/.cache /home/agent/.npm /home/agent/.opencode /home/agent/.config /workspace && \
102
101
  ([ -d /opt/playwright-browsers ] && chown -R agent:agent /opt/playwright-browsers || true)
103
102
 
104
- # === amp ===
105
- USER root
106
- RUN mkdir -p /usr/local/lib/amp && \
107
- cd /usr/local/lib/amp && \
108
- bun init -y && \
109
- bun add @sourcegraph/amp && \
110
- ln -s /usr/local/lib/amp/node_modules/.bin/amp /usr/local/bin/amp
111
-
112
103
  # === opencode ===
113
104
  USER root
114
105
  RUN curl -fsSL https://opencode.ai/install | bash && \
115
106
  mv /root/.opencode/bin/opencode /usr/local/bin/opencode && \
116
107
  rm -rf /root/.opencode
117
108
 
118
- # === claude ===
119
- USER root
120
- RUN apt-get update && apt-get install -y --no-install-recommends tmux && rm -rf /var/lib/apt/lists/*
121
- RUN npm install -g @kaitranntt/ccs --ignore-scripts && \
122
- mkdir -p /home/agent/.ccs && \
123
- chown -R agent:agent /home/agent/.ccs && \
124
- which ccs && ccs --version && \
125
- sed -i 's/fs\.symlinkSync(sourcePath, targetPath, symlinkType)/fs\.symlinkSync(require("path").relative(require("path").dirname(targetPath), sourcePath), targetPath, symlinkType)/g' /usr/local/lib/node_modules/@kaitranntt/ccs/dist/utils/claude-symlink-manager.js
126
- RUN export HOME=/root && curl -fsSL https://claude.ai/install.sh | bash && \
127
- mkdir -p /usr/local/share && \
128
- mv /root/.local/share/claude /usr/local/share/claude && \
129
- ln -sf /usr/local/share/claude/versions/$(ls /usr/local/share/claude/versions | head -1) /usr/local/bin/claude
130
- USER agent
131
-
132
109
  USER agent
133
110
  ENV HOME=/home/agent
134
111
  CMD ["bash"]
@@ -127,10 +127,10 @@ select_ssh_keys() {
127
127
  read -rsn1 -t 1 next2
128
128
  case "$next1$next2" in
129
129
  '[A') # Up arrow
130
- ((cursor--))
130
+ ((cursor--)) || true
131
131
  ;;
132
132
  '[B') # Down arrow
133
- ((cursor++))
133
+ ((cursor++)) || true
134
134
  ;;
135
135
  esac
136
136
  # Handle regular keys
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kokorolx/ai-sandbox-wrapper",
3
- "version": "3.0.5",
3
+ "version": "3.0.6",
4
4
  "description": "Docker-based security sandbox for AI coding agents. Isolate Claude, Gemini, Aider, and other AI tools from your host system.",
5
5
  "keywords": [
6
6
  "ai",
package/setup.sh CHANGED
@@ -63,13 +63,13 @@ multi_select() {
63
63
  read -rsn1 -t 1 next1
64
64
  read -rsn1 -t 1 next2
65
65
  case "$next1$next2" in
66
- '[A') ((cursor--)) ;; # Up
67
- '[B') ((cursor++)) ;; # Down
66
+ '[A') ((cursor--)) || true ;; # Up
67
+ '[B') ((cursor++)) || true ;; # Down
68
68
  esac
69
69
  else
70
70
  case "$key" in
71
- k) ((cursor--)) ;; # k for Up
72
- j) ((cursor++)) ;; # j for Down
71
+ k) ((cursor--)) || true ;; # k for Up
72
+ j) ((cursor++)) || true ;; # j for Down
73
73
  " ") # Space (toggle)
74
74
  if [ "${selected[$cursor]}" -eq 1 ]; then
75
75
  selected[$cursor]=0
@@ -137,13 +137,13 @@ single_select() {
137
137
  read -rsn1 -t 1 next1
138
138
  read -rsn1 -t 1 next2
139
139
  case "$next1$next2" in
140
- '[A') ((cursor--)) ;;
141
- '[B') ((cursor++)) ;;
140
+ '[A') ((cursor--)) || true ;;
141
+ '[B') ((cursor++)) || true ;;
142
142
  esac
143
143
  else
144
144
  case "$key" in
145
- k) ((cursor--)) ;;
146
- j) ((cursor++)) ;;
145
+ k) ((cursor--)) || true ;;
146
+ j) ((cursor++)) || true ;;
147
147
  "") break ;;
148
148
  $'\n'|$'\r') break ;;
149
149
  esac