tinker-agent 1.0.7 → 1.0.8

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 +14 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tinker-agent",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "Tinker Agent Runner",
5
5
  "bin": {
6
6
  "tinker-agent": "./run-tinker-agent.rb"
package/setup-agent.rb CHANGED
@@ -191,10 +191,21 @@ def setup_mcp_config!
191
191
  existing_config["mcpServers"] ||= {}
192
192
 
193
193
  if rails_api_url && !rails_api_url.empty? && rails_api_key && !rails_api_key.empty?
194
- # Use published tinker-mcp package
194
+ # Install tinker-mcp locally to ensure we can run it with node (bypassing shebang issues)
195
+ tools_dir = File.expand_path("~/tinker-tools")
196
+ FileUtils.mkdir_p(tools_dir)
197
+
198
+ puts "📦 Installing tinker-mcp..."
199
+ # Redirect output to avoid cluttering logs, unless it fails
200
+ unless system("npm install --prefix #{tools_dir} tinker-mcp > /dev/null 2>&1")
201
+ puts "❌ Failed to install tinker-mcp"
202
+ end
203
+
204
+ script_path = "#{tools_dir}/node_modules/tinker-mcp/dist/index.js"
205
+
195
206
  tinker_server_config = {
196
- "command" => "npx",
197
- "args" => ["-y", "tinker-mcp"],
207
+ "command" => "node",
208
+ "args" => [script_path],
198
209
  "env" => {
199
210
  "RAILS_API_URL" => rails_api_url,
200
211
  "RAILS_API_KEY" => rails_api_key