tinker-agent 1.0.31 → 1.0.32

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.
@@ -78,16 +78,6 @@ sudo chown -R ${AGENT_USER}:${GROUP_NAME} ${AGENT_HOME} || echo "⚠️ Failed t
78
78
  # This ensures the agent can write CLAUDE.md and .mcp.json
79
79
  sudo chown ${AGENT_USER}:${GROUP_NAME} $(pwd) || echo "⚠️ Failed to chown project root"
80
80
 
81
- # Set GitHub App Key Path if not set
82
- if [ -z "\$GITHUB_APP_PRIVATE_KEY_PATH" ]; then
83
- export GITHUB_APP_PRIVATE_KEY_PATH="${AGENT_HOME}/.github-app-privkey.pem"
84
- else
85
- # If it was set to /home/claude/... but we are /home/node, fix it
86
- if [[ "\$GITHUB_APP_PRIVATE_KEY_PATH" == *"/home/claude/"* ]] && [ "${AGENT_HOME}" != "/home/claude" ]; then
87
- export GITHUB_APP_PRIVATE_KEY_PATH="${AGENT_HOME}/.github-app-privkey.pem"
88
- fi
89
- fi
90
-
91
81
  # Execute command as agent user
92
82
  exec sudo -E -u ${AGENT_USER} env "HOME=${AGENT_HOME}" "\$@"
93
83
  EOF
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tinker-agent",
3
- "version": "1.0.31",
3
+ "version": "1.0.32",
4
4
  "description": "Tinker Agent Runner",
5
5
  "bin": {
6
6
  "tinker-agent": "./run-tinker-agent.rb"
package/setup-agent.rb CHANGED
@@ -213,7 +213,15 @@ end
213
213
  def setup_github_auth!
214
214
  app_id = ENV["GITHUB_APP_ID"] || ENV["GITHUB_APP_CLIENT_ID"]
215
215
 
216
- if app_id && ENV["GITHUB_APP_INSTALLATION_ID"] && ENV["GITHUB_APP_PRIVATE_KEY_PATH"]
216
+ # Check for private key in typical locations
217
+ # 1. In the home directory (copied by entrypoint)
218
+ # 2. In /tmp (mounted by docker)
219
+ private_key_path = [
220
+ File.expand_path("~/.github-app-privkey.pem"),
221
+ "/tmp/github-app-privkey.pem"
222
+ ].find { |path| File.exist?(path) }
223
+
224
+ if app_id && ENV["GITHUB_APP_INSTALLATION_ID"] && private_key_path
217
225
  puts "🔐 Configuring GitHub App authentication..."
218
226
 
219
227
  # Create helper script
@@ -278,7 +286,7 @@ def setup_github_auth!
278
286
 
279
287
  app_id = ENV['GITHUB_APP_CLIENT_ID'] || ENV['GITHUB_APP_ID']
280
288
  installation_id = ENV['GITHUB_APP_INSTALLATION_ID']
281
- key_path = ENV['GITHUB_APP_PRIVATE_KEY_PATH']
289
+ key_path = "#{private_key_path}"
282
290
 
283
291
  puts find_or_create_cached_token(app_id, installation_id, key_path)
284
292
  RUBY