tinker-agent 1.0.13 → 1.0.15

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.
@@ -4,7 +4,7 @@
4
4
  set -e
5
5
 
6
6
  AGENT_TYPE="${AGENT_TYPE:-worker}"
7
- STATUS_FILE="/tmp/agent-bridge-status-$AGENT_TYPE"
7
+ STATUS_FILE="/tmp/agent-bridge-status"
8
8
 
9
9
  # Check if we're already inside tmux
10
10
  if [ -n "$TMUX" ]; then
@@ -41,14 +41,14 @@ tmux set-option -g status-right-length 300
41
41
  tmux set-option -t "$SESSION" status-left-length 30
42
42
  tmux set-option -t "$SESSION" status-right-length 300
43
43
  tmux set-option -t "$SESSION" status-left "#[fg=cyan,bold]🤖 $AGENT_TYPE #[fg=cyan]│ "
44
- tmux set-option -t "$SESSION" status-right "#[fg=green]#(cat $STATUS_FILE 2>/dev/null || echo '❓') #[fg=cyan]│ #[fg=white]%H:%M:%S"
44
+ tmux set-option -t "$SESSION" status-right "#[fg=yellow]#(cat ${STATUS_FILE}.cmd 2>/dev/null) #[fg=cyan]│ #[fg=green]#(cat $STATUS_FILE 2>/dev/null || echo '❓') #[fg=cyan]│ #[fg=white]%H:%M:%S"
45
45
  tmux set-option -t "$SESSION" window-status-format ""
46
46
  tmux set-option -t "$SESSION" window-status-current-format ""
47
47
  tmux set-option -t "$SESSION" remain-on-exit off
48
48
  tmux set-option -t "$SESSION" mouse on
49
49
 
50
50
  # Run agent-bridge in tmux session
51
- tmux send-keys -t "$SESSION" "export STATUS_FILE='$STATUS_FILE' AGENT_TYPE='$AGENT_TYPE' && export INSIDE_TMUX=1 && agent-bridge" C-m
51
+ tmux send-keys -t "$SESSION" "export AGENT_TYPE='$AGENT_TYPE' && export INSIDE_TMUX=1 && agent-bridge" C-m
52
52
 
53
53
  # Attach or wait
54
54
  if [ -t 0 ]; then
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tinker-agent",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "description": "Tinker Agent Runner",
5
5
  "bin": {
6
6
  "tinker-agent": "./run-tinker-agent.rb"
@@ -115,18 +115,28 @@ def run_agent(agent_type, config)
115
115
  # Add GitHub auth
116
116
  github = config["github"] || {}
117
117
  if github["method"] == "app"
118
+ key_path = File.expand_path(github["app_private_key_path"].to_s)
119
+
120
+ unless File.exist?(key_path) && !File.directory?(key_path)
121
+ puts "❌ Error: GitHub App private key not found at: #{key_path}"
122
+ puts " Please check 'app_private_key_path' in tinker.env.json"
123
+ exit 1
124
+ end
125
+
118
126
  docker_cmd += [
119
127
  "-e", "GITHUB_APP_CLIENT_ID=#{github['app_client_id']}",
120
128
  "-e", "GITHUB_APP_INSTALLATION_ID=#{github['app_installation_id']}",
121
129
  # Path is set dynamically in entrypoint.sh based on user home
122
- "-v", "#{github['app_private_key_path']}:/tmp/github-app-privkey.pem:ro"
130
+ "-v", "#{key_path}:/tmp/github-app-privkey.pem:ro"
123
131
  ]
124
132
  puts "🔐 Using GitHub App authentication"
125
133
  elsif github["token"]
126
134
  docker_cmd += ["-e", "GH_TOKEN=#{github['token']}"]
127
135
  puts "🔑 Using GitHub token authentication"
128
136
  else
129
- puts "⚠️ Warning: No GitHub authentication configured"
137
+ puts "❌ Error: No GitHub authentication configured"
138
+ puts " Please configure 'github' in tinker.env.json"
139
+ exit 1
130
140
  end
131
141
 
132
142
  # Add git config