tinker-agent 1.0.4 → 1.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/agent-bridge-tmux +1 -1
- package/package.json +1 -1
- package/setup-agent.rb +16 -12
package/bin/agent-bridge-tmux
CHANGED
|
@@ -43,7 +43,7 @@ tmux set-option -t "$SESSION" remain-on-exit off
|
|
|
43
43
|
tmux set-option -t "$SESSION" mouse on
|
|
44
44
|
|
|
45
45
|
# Run agent-bridge in tmux session
|
|
46
|
-
tmux send-keys -t "$SESSION" "export STATUS_FILE='$STATUS_FILE' AGENT_TYPE='$AGENT_TYPE' && agent-bridge" C-m
|
|
46
|
+
tmux send-keys -t "$SESSION" "export STATUS_FILE='$STATUS_FILE' AGENT_TYPE='$AGENT_TYPE' && export INSIDE_TMUX=1 && agent-bridge" C-m
|
|
47
47
|
|
|
48
48
|
# Attach or wait
|
|
49
49
|
if [ -t 0 ]; then
|
package/package.json
CHANGED
package/setup-agent.rb
CHANGED
|
@@ -364,23 +364,27 @@ def download_agent_bridge!
|
|
|
364
364
|
puts "✅ agent-bridge installed to #{target_dir}"
|
|
365
365
|
|
|
366
366
|
# Patch agent-bridge-tmux to force INSIDE_TMUX=1
|
|
367
|
+
# Note: This is now fixed in the repo, but we keep this for backward compatibility
|
|
368
|
+
# with older agent-bridge-tmux scripts if cached
|
|
367
369
|
puts "🔧 Patching agent-bridge-tmux to force INSIDE_TMUX=1..."
|
|
368
370
|
|
|
369
371
|
# Read the file (we can read /usr/local/bin files usually)
|
|
370
372
|
content = File.read("#{target_dir}/agent-bridge-tmux")
|
|
371
373
|
|
|
372
|
-
# Replace the command
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
374
|
+
# Replace the command if not already present
|
|
375
|
+
unless content.include?("export INSIDE_TMUX=1")
|
|
376
|
+
new_content = content.gsub(
|
|
377
|
+
"&& agent-bridge\"",
|
|
378
|
+
"&& export INSIDE_TMUX=1 && agent-bridge\""
|
|
379
|
+
)
|
|
380
|
+
|
|
381
|
+
# Write to temp file
|
|
382
|
+
File.write("/tmp/agent-bridge-tmux-patched", new_content)
|
|
383
|
+
|
|
384
|
+
# Move to destination with sudo
|
|
385
|
+
system("sudo mv /tmp/agent-bridge-tmux-patched #{target_dir}/agent-bridge-tmux")
|
|
386
|
+
system("sudo chmod +x #{target_dir}/agent-bridge-tmux")
|
|
387
|
+
end
|
|
384
388
|
|
|
385
389
|
return target_dir
|
|
386
390
|
end
|