replit-tools 1.2.29 → 1.2.35
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/package.json
CHANGED
|
@@ -514,10 +514,10 @@ claude_prompt() {
|
|
|
514
514
|
[ -z "$num" ] && continue
|
|
515
515
|
recent_tools[$num]="$tool"
|
|
516
516
|
recent_ids[$num]="$id"
|
|
517
|
-
local label_color="\033[1;38;5;
|
|
517
|
+
local label_color="\033[1;38;5;208m"
|
|
518
518
|
local label="cld"
|
|
519
519
|
if [ "$tool" = "codex" ]; then
|
|
520
|
-
label_color="\033[1;38;5;
|
|
520
|
+
label_color="\033[1;38;5;44m"
|
|
521
521
|
label="cdx"
|
|
522
522
|
fi
|
|
523
523
|
printf " \033[1;97m[%s]\033[0m ${label_color}%s\033[0m \033[2m%-8s\033[0m %s\n" "$num" "$label" "$when" "$snippet"
|
|
@@ -563,7 +563,7 @@ claude_prompt() {
|
|
|
563
563
|
local sel_id="${recent_ids[$choice]}"
|
|
564
564
|
if [ -n "$sel_id" ]; then
|
|
565
565
|
if [ "$sel_tool" = "codex" ]; then
|
|
566
|
-
run_tool_with_retry "codex resume '$sel_id'" "Resuming codex session ${sel_id:0:8}" "codex"
|
|
566
|
+
run_tool_with_retry "codex --dangerously-bypass-approvals-and-sandbox resume '$sel_id'" "Resuming codex session ${sel_id:0:8}" "codex"
|
|
567
567
|
else
|
|
568
568
|
run_tool_with_retry "claude -r '$sel_id' --dangerously-skip-permissions" "Resuming claude session ${sel_id:0:8}" "claude"
|
|
569
569
|
fi
|
|
@@ -579,7 +579,7 @@ claude_prompt() {
|
|
|
579
579
|
# Continue whichever tool was most recent in this shell
|
|
580
580
|
if [ -n "$last_session" ]; then
|
|
581
581
|
if [ "$last_tool" = "codex" ]; then
|
|
582
|
-
run_tool_with_retry "codex resume '$last_session'" "Resuming codex session ${last_session:0:8}" "codex"
|
|
582
|
+
run_tool_with_retry "codex --dangerously-bypass-approvals-and-sandbox resume '$last_session'" "Resuming codex session ${last_session:0:8}" "codex"
|
|
583
583
|
else
|
|
584
584
|
run_tool_with_retry "claude -r '$last_session' --dangerously-skip-permissions" "Resuming claude session ${last_session:0:8}" "claude"
|
|
585
585
|
fi
|
|
@@ -612,7 +612,7 @@ claude_prompt() {
|
|
|
612
612
|
local selected_id=$(echo "$ids_list" | sed -n "${session_num}p")
|
|
613
613
|
if [ -n "$selected_id" ]; then
|
|
614
614
|
if [ "$selected_tool" = "codex" ]; then
|
|
615
|
-
run_tool_with_retry "codex resume '$selected_id'" "Resuming codex session $selected_id" "codex"
|
|
615
|
+
run_tool_with_retry "codex --dangerously-bypass-approvals-and-sandbox resume '$selected_id'" "Resuming codex session $selected_id" "codex"
|
|
616
616
|
else
|
|
617
617
|
run_tool_with_retry "claude -r '$selected_id' --dangerously-skip-permissions" "Resuming claude session $selected_id" "claude"
|
|
618
618
|
fi
|
|
@@ -630,7 +630,7 @@ claude_prompt() {
|
|
|
630
630
|
sleep 1
|
|
631
631
|
;;
|
|
632
632
|
m|M)
|
|
633
|
-
run_tool_with_retry "codex" "Starting new Codex session" "codex"
|
|
633
|
+
run_tool_with_retry "codex --dangerously-bypass-approvals-and-sandbox" "Starting new Codex session" "codex"
|
|
634
634
|
echo ""
|
|
635
635
|
echo " Exited. Returning to menu..."
|
|
636
636
|
sleep 1
|
|
@@ -677,8 +677,8 @@ alias j='claude /login --dangerously-skip-permissions'
|
|
|
677
677
|
alias claude-login='claude /login --dangerously-skip-permissions'
|
|
678
678
|
alias k='codex login'
|
|
679
679
|
alias codex-login='codex login'
|
|
680
|
-
alias codex-new='codex'
|
|
681
|
-
alias codex-resume='codex resume'
|
|
680
|
+
alias codex-new='codex --dangerously-bypass-approvals-and-sandbox'
|
|
681
|
+
alias codex-resume='codex --dangerously-bypass-approvals-and-sandbox resume'
|
|
682
682
|
|
|
683
683
|
# Export for manual use
|
|
684
684
|
export -f get_recent_sessions
|
|
@@ -24,12 +24,16 @@ REPLIT_TOOLS="${WORKSPACE}/.replit-tools"
|
|
|
24
24
|
# Note: Credentials are at workspace root (.claude-persistent), NOT inside .replit-tools
|
|
25
25
|
CLAUDE_PERSISTENT="${CLAUDE_CONFIG_DIR:-${WORKSPACE}/.claude-persistent}"
|
|
26
26
|
CLAUDE_VERSIONS="${REPLIT_TOOLS}/.claude-versions"
|
|
27
|
+
CODEX_PERSISTENT="${CODEX_HOME:-${REPLIT_TOOLS}/.codex-persistent}"
|
|
28
|
+
SSH_PERSISTENT="${REPLIT_TOOLS}/.ssh-persistent"
|
|
27
29
|
LOGS_DIR="${REPLIT_TOOLS}/.logs"
|
|
28
30
|
SCRIPTS_DIR="${REPLIT_TOOLS}/scripts"
|
|
29
31
|
AUTH_REFRESH_SCRIPT="${SCRIPTS_DIR}/claude-auth-refresh.sh"
|
|
30
32
|
|
|
31
33
|
# Target locations (ephemeral, need symlinks)
|
|
32
34
|
CLAUDE_SYMLINK="${HOME}/.claude"
|
|
35
|
+
CODEX_SYMLINK="${HOME}/.codex"
|
|
36
|
+
SSH_SYMLINK="${HOME}/.ssh"
|
|
33
37
|
LOCAL_BIN="${HOME}/.local/bin"
|
|
34
38
|
LOCAL_SHARE_CLAUDE="${HOME}/.local/share/claude"
|
|
35
39
|
|
|
@@ -129,6 +133,43 @@ if [ ! -L "${CLAUDE_SYMLINK}" ] || [ "$(readlink -f "${CLAUDE_SYMLINK}")" != "${
|
|
|
129
133
|
log "✅ Claude history symlink: ~/.claude -> ${CLAUDE_PERSISTENT}"
|
|
130
134
|
fi
|
|
131
135
|
|
|
136
|
+
# =============================================================================
|
|
137
|
+
# Step 2.5: Create ~/.codex and ~/.ssh symlinks (persistent across container restarts)
|
|
138
|
+
# =============================================================================
|
|
139
|
+
mkdir -p "${CODEX_PERSISTENT}"
|
|
140
|
+
if [ ! -L "${CODEX_SYMLINK}" ] || [ "$(readlink -f "${CODEX_SYMLINK}")" != "${CODEX_PERSISTENT}" ]; then
|
|
141
|
+
if [ -d "${CODEX_SYMLINK}" ] && [ ! -L "${CODEX_SYMLINK}" ]; then
|
|
142
|
+
cp -rn "${CODEX_SYMLINK}"/. "${CODEX_PERSISTENT}/" 2>/dev/null || true
|
|
143
|
+
rm -rf "${CODEX_SYMLINK}" 2>/dev/null || true
|
|
144
|
+
else
|
|
145
|
+
rm -rf "${CODEX_SYMLINK}" 2>/dev/null || true
|
|
146
|
+
fi
|
|
147
|
+
ln -sf "${CODEX_PERSISTENT}" "${CODEX_SYMLINK}"
|
|
148
|
+
log "✅ Codex symlink: ~/.codex -> ${CODEX_PERSISTENT}"
|
|
149
|
+
fi
|
|
150
|
+
|
|
151
|
+
mkdir -p "${SSH_PERSISTENT}"
|
|
152
|
+
chmod 700 "${SSH_PERSISTENT}" 2>/dev/null
|
|
153
|
+
if [ ! -L "${SSH_SYMLINK}" ] || [ "$(readlink -f "${SSH_SYMLINK}")" != "${SSH_PERSISTENT}" ]; then
|
|
154
|
+
if [ -d "${SSH_SYMLINK}" ] && [ ! -L "${SSH_SYMLINK}" ]; then
|
|
155
|
+
cp -rn "${SSH_SYMLINK}"/. "${SSH_PERSISTENT}/" 2>/dev/null || true
|
|
156
|
+
rm -rf "${SSH_SYMLINK}" 2>/dev/null || true
|
|
157
|
+
else
|
|
158
|
+
rm -rf "${SSH_SYMLINK}" 2>/dev/null || true
|
|
159
|
+
fi
|
|
160
|
+
ln -sf "${SSH_PERSISTENT}" "${SSH_SYMLINK}"
|
|
161
|
+
log "✅ SSH symlink: ~/.ssh -> ${SSH_PERSISTENT}"
|
|
162
|
+
fi
|
|
163
|
+
# Re-tighten SSH key permissions (SSH refuses keys with loose perms)
|
|
164
|
+
for f in "${SSH_PERSISTENT}"/*; do
|
|
165
|
+
[ -f "$f" ] || continue
|
|
166
|
+
bn=$(basename "$f")
|
|
167
|
+
case "$bn" in
|
|
168
|
+
known_hosts|config|*.pub) chmod 644 "$f" 2>/dev/null ;;
|
|
169
|
+
*) chmod 600 "$f" 2>/dev/null ;;
|
|
170
|
+
esac
|
|
171
|
+
done
|
|
172
|
+
|
|
132
173
|
# =============================================================================
|
|
133
174
|
# Step 3: Create ~/.local/share/claude symlink for installed versions
|
|
134
175
|
# =============================================================================
|