tinker-agent 1.0.27 → 1.0.28

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tinker-agent",
3
- "version": "1.0.27",
3
+ "version": "1.0.28",
4
4
  "description": "Tinker Agent Runner",
5
5
  "bin": {
6
6
  "tinker-agent": "./run-tinker-agent.rb"
@@ -194,7 +194,15 @@ def run_agent(agent_type, config)
194
194
  local_setup_script = File.join(File.dirname(__FILE__), "setup-agent.rb")
195
195
 
196
196
  # Check for local agent-bridge binaries (for development)
197
- local_bridge = File.join(Dir.pwd, "bin", "agent-bridge")
197
+ # Priority:
198
+ # 1. Linux binary matching host arch (for proper container execution)
199
+ # 2. Legacy bin/agent-bridge if it's a binary (not script)
200
+
201
+ arch = `uname -m`.strip
202
+ linux_arch = (arch == "x86_64") ? "amd64" : "arm64"
203
+ linux_bridge = File.join(Dir.pwd, "tinker-public", "bin", "agent-bridge-linux-#{linux_arch}")
204
+
205
+ local_bridge_default = File.join(Dir.pwd, "bin", "agent-bridge")
198
206
  local_tmux = File.join(File.dirname(__FILE__), "bin", "agent-bridge-tmux")
199
207
 
200
208
  mounts = []
@@ -203,9 +211,18 @@ def run_agent(agent_type, config)
203
211
  mounts += ["-v", "#{File.expand_path(local_setup_script)}:/tmp/setup-agent.rb:ro"]
204
212
  end
205
213
 
206
- if File.exist?(local_bridge)
207
- puts "🔧 Using local agent-bridge binary"
208
- mounts += ["-v", "#{local_bridge}:/tmp/agent-bridge:ro"]
214
+ if File.exist?(linux_bridge)
215
+ puts "🔧 Using local linux binary: #{linux_bridge}"
216
+ mounts += ["-v", "#{linux_bridge}:/tmp/agent-bridge:ro"]
217
+ elsif File.exist?(local_bridge_default)
218
+ # Check if it's a binary or script
219
+ is_script = File.read(local_bridge_default, 4) == "#!/b"
220
+ if is_script
221
+ puts "⚠️ bin/agent-bridge is a host wrapper script. Please run 'bin/build-bridge' to generate linux binaries."
222
+ else
223
+ puts "🔧 Using local agent-bridge binary"
224
+ mounts += ["-v", "#{local_bridge_default}:/tmp/agent-bridge:ro"]
225
+ end
209
226
  end
210
227
 
211
228
  if File.exist?(local_tmux)