tinker-agent 1.0.16 → 1.0.17

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/setup-agent.rb +19 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tinker-agent",
3
- "version": "1.0.16",
3
+ "version": "1.0.17",
4
4
  "description": "Tinker Agent Runner",
5
5
  "bin": {
6
6
  "tinker-agent": "./run-tinker-agent.rb"
package/setup-agent.rb CHANGED
@@ -341,6 +341,24 @@ def setup_github_auth!
341
341
  end
342
342
  end
343
343
 
344
+ def setup_git_config!
345
+ # Configure identity if provided
346
+ if ENV["GIT_USER_NAME"] && !ENV["GIT_USER_NAME"].empty?
347
+ system("git config --global user.name \"#{ENV['GIT_USER_NAME']}\"")
348
+ puts "✅ Git user.name configured"
349
+ end
350
+
351
+ if ENV["GIT_USER_EMAIL"] && !ENV["GIT_USER_EMAIL"].empty?
352
+ system("git config --global user.email \"#{ENV['GIT_USER_EMAIL']}\"")
353
+ puts "✅ Git user.email configured"
354
+ end
355
+
356
+ # Force HTTPS instead of SSH to ensure our token auth works
357
+ # This fixes "Permission denied (publickey)" when the repo uses git@github.com remote
358
+ system("git config --global url.\"https://github.com/\".insteadOf \"git@github.com:\"")
359
+ puts "✅ Git configured to force HTTPS for GitHub"
360
+ end
361
+
344
362
  def download_agent_bridge!
345
363
  # Detect architecture
346
364
  arch = `uname -m`.strip
@@ -426,5 +444,6 @@ setup_mcp_config!
426
444
  setup_claude_config!
427
445
  setup_claude_md!
428
446
  setup_github_auth!
447
+ setup_git_config!
429
448
  bin_dir = download_agent_bridge!
430
449
  run_agent!(bin_dir)