shared_tools 0.2.1 → 0.2.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9d0991c07dd51594c282e4b36e87ce880ad602dad0344ce9cc052d57744d8704
4
- data.tar.gz: 3664d06d6088aa4c1bb95cc66af68c057ce2191fe370e6a69e64375ce1d00f2d
3
+ metadata.gz: ed20a7f612a782d85ee23a5aa20d67170b5aa72f99588af0af2a8606dba6c8be
4
+ data.tar.gz: f33a0de470155c604b8b76a0fc9c7f12680c76c0d37aa36f515ebcf3ad003dcd
5
5
  SHA512:
6
- metadata.gz: a7d2dfa5ccb2ca7179675d62ba2e2fa236835447ef391d56b7c428ff36e013ad489adb7553dd37a9f688ceff8be18164ca6d37092a88a7c75031bebb1e35c373
7
- data.tar.gz: 4e808b5ea643bd41b2a19d1a643e1bff774c80b37377b63760857c7b3b38b846d9bc3713803f39af573a2718462ac2d33114be0a9b849759ac5b92d90ea9c625
6
+ metadata.gz: a11202bd167180f04ed7db1b057dc916b3bab1c873113021b05a55283ed8a7a44aa93dd351b77a7ebcc47ab93c1248d9e78271bc38918d4dfe82fdd841fe25c5
7
+ data.tar.gz: 64f75f69015de591e4351126849665c227d718140634ba96f3fe8ac686abf7bbd5a1f7b917d4c6ee06ca131ba2c44d5ee93eae47abb493a8c21628052ef95105
@@ -1,27 +1,17 @@
1
1
  # shared_tools/ruby_llm/mcp/github_mcp_server.rb
2
2
  # brew install github_mcp_server
3
3
 
4
- require 'debug_me'
5
- include DebugMe
6
-
7
- require 'ruby_llm'
8
- require 'ruby_llm/mcp'
9
-
10
- require_relative '../../../shared_tools'
11
-
12
- module SharedTools
13
- verify_gem :ruby_llm
14
-
15
- mcp_servers << RubyLLM::MCP.client(
16
- name: "github-mcp-server",
17
- transport_type: :stdio,
18
- config: {
19
- command: "/opt/homebrew/bin/github-mcp-server", # brew install github-mcp-server
20
- args: %w[stdio],
21
- env: { "GITHUB_PERSONAL_ACCESS_TOKEN" => ENV.fetch('GITHUB_PERSONAL_ACCESS_TOKEN') }
22
- }
23
- )
24
- end
4
+ require "ruby_llm/mcp"
5
+
6
+ RubyLLM::MCP.add_client(
7
+ name: "github-mcp-server",
8
+ transport_type: :stdio,
9
+ config: {
10
+ command: "/opt/homebrew/bin/github-mcp-server", # brew install github-mcp-server
11
+ args: %w[stdio],
12
+ env: { "GITHUB_PERSONAL_ACCESS_TOKEN" => ENV.fetch("GITHUB_PERSONAL_ACCESS_TOKEN") },
13
+ },
14
+ )
25
15
 
26
16
 
27
17
  __END__
@@ -3,31 +3,13 @@
3
3
  # See: https://github.com/loopwork/iMCP
4
4
  # brew install --cask loopwork/tap/iMCP
5
5
  #
6
- # CAUTION: AIA is getting an exception when trying to use this MCP client. Its returning to
7
- # do a to_sym on a nil value. This is due to a lack of a nil guard in the
8
- # version 0.3.1 of the ruby_llm-mpc Parameter#item_type method.
9
- #
10
- # NOTE: iMCP's server is a noisy little thing shooting all its log messages to STDERR.
11
- # To silence it, redirect STDERR to /dev/null.
12
- # If you messages then you might want to redirect STDERR to a file.
13
- #
14
-
15
- require 'debug_me'
16
- include DebugMe
17
6
 
18
- require 'ruby_llm'
19
7
  require 'ruby_llm/mcp'
20
8
 
21
- require_relative '../../../shared_tools'
22
-
23
- module SharedTools
24
- verify_gem :ruby_llm
25
-
26
- mcp_servers << RubyLLM::MCP.client(
27
- name: "imcp-server",
28
- transport_type: :stdio,
29
- config: {
30
- command: "/Applications/iMCP.app/Contents/MacOS/imcp-server 2> /dev/null"
31
- }
32
- )
33
- end
9
+ RubyLLM::MCP.add_client(
10
+ name: "imcp-server",
11
+ transport_type: :stdio,
12
+ config: {
13
+ command: "/Applications/iMCP.app/Contents/MacOS/imcp-server 2> /dev/null"
14
+ }
15
+ )
@@ -1,6 +1,8 @@
1
1
  # shared_tools/ruby_llm/mcp.rb
2
2
  # This file loads all Ruby files in the mcp directory
3
3
 
4
+ require_relative '../../shared_tools'
5
+
4
6
  # Get the directory path
5
7
  mcp_dir = File.join(__dir__, 'mcp')
6
8
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SharedTools
4
- VERSION = "0.2.1"
4
+ VERSION = "0.2.3"
5
5
  end
data/lib/shared_tools.rb CHANGED
@@ -14,16 +14,7 @@ loader.setup
14
14
  module SharedTools
15
15
  SUPPORTED_GEMS ||= %i(ruby_llm llm_rb omniai raix)
16
16
  @auto_execute ||= false # Human in the loop
17
- @mcp_servers ||= []
18
-
19
17
  class << self
20
- def mcp_servers
21
- @mcp_servers
22
- end
23
-
24
- def mcp_servers=(client)
25
- @mcp_servers << client
26
- end
27
18
 
28
19
  def auto_execute(wildwest=true)
29
20
  @auto_execute = wildwest
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shared_tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - MadBomber Team
@@ -99,14 +99,14 @@ dependencies:
99
99
  requirements:
100
100
  - - "~>"
101
101
  - !ruby/object:Gem::Version
102
- version: 0.3.1
102
+ version: 0.5.1
103
103
  type: :development
104
104
  prerelease: false
105
105
  version_requirements: !ruby/object:Gem::Requirement
106
106
  requirements:
107
107
  - - "~>"
108
108
  - !ruby/object:Gem::Version
109
- version: 0.3.1
109
+ version: 0.5.1
110
110
  - !ruby/object:Gem::Dependency
111
111
  name: bundler
112
112
  requirement: !ruby/object:Gem::Requirement