tinker-agent 1.0.13 → 1.0.14

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.13",
3
+ "version": "1.0.14",
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