diff --git a/Gemfile b/Gemfile index ba8aff9..d9396a3 100644 --- a/Gemfile +++ b/Gemfile @@ -6,11 +6,11 @@ source 'https://rubygems.org' gemspec gem 'irb' -gem 'rake', '~> 13.0' +gem 'rake', '~> 13.4' -gem 'rspec', '~> 3.0' +gem 'rspec', '~> 3.13' -gem 'rubocop', '~> 1.21' +gem 'rubocop', '~> 1.88' gem 'rubocop-performance' gem 'rubocop-sorbet' -gem 'sorbet', '~> 0.5' +gem 'sorbet', '~> 0.6' diff --git a/Gemfile.lock b/Gemfile.lock index 29bee43..2dd37cc 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -47,27 +47,34 @@ GEM connection_pool (2.5.0) constant_resolver (0.2.0) crass (1.0.6) - date (3.4.1) - diff-lcs (1.6.1) + date (3.5.1) + diff-lcs (1.6.2) drb (2.2.1) + erb (6.0.4) erubi (1.13.1) + hana (1.3.7) i18n (1.14.7) concurrent-ruby (~> 1.0) - io-console (0.8.0) - irb (1.15.1) + io-console (0.8.2) + irb (1.18.0) pp (>= 0.6.0) + prism (>= 1.3.0) rdoc (>= 4.0.0) reline (>= 0.4.2) - json (2.10.2) - json_rpc_handler (0.1.1) - language_server-protocol (3.17.0.4) + json (2.20.0) + json_schemer (2.5.0) + bigdecimal + hana (~> 1.3) + regexp_parser (~> 2.0) + simpleidn (~> 0.2) + language_server-protocol (3.17.0.5) lint_roller (1.1.0) logger (1.7.0) loofah (2.24.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) - mcp (0.1.0) - json_rpc_handler (~> 0.1) + mcp (0.21.0) + json_schemer (>= 2.4) minitest (6.0.6) drb (~> 2.0) prism (~> 1.5) @@ -94,18 +101,18 @@ GEM prism (>= 0.25.0) sorbet-runtime (>= 0.5.9914) zeitwerk (>= 2.6.1) - parallel (1.26.3) + parallel (2.1.0) parse_packwerk (0.26.0) bigdecimal sorbet-runtime - parser (3.3.7.4) + parser (3.3.11.1) ast (~> 2.4.1) racc - pp (0.6.2) + pp (0.6.4) prettyprint prettyprint (0.2.0) prism (1.9.0) - psych (5.2.3) + psych (5.4.0) date stringio query_packwerk (0.1.0) @@ -124,63 +131,68 @@ GEM loofah (~> 2.21) nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) rainbow (3.1.1) - rake (13.2.1) - rdoc (6.13.1) + rake (13.4.2) + rdoc (7.2.0) + erb psych (>= 4.0.0) - regexp_parser (2.10.0) - reline (0.6.0) + tsort + regexp_parser (2.12.0) + reline (0.6.3) io-console (~> 0.5) - rspec (3.13.0) + rspec (3.13.2) rspec-core (~> 3.13.0) rspec-expectations (~> 3.13.0) rspec-mocks (~> 3.13.0) - rspec-core (3.13.3) + rspec-core (3.13.6) rspec-support (~> 3.13.0) - rspec-expectations (3.13.3) + rspec-expectations (3.13.5) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-mocks (3.13.2) + rspec-mocks (3.13.8) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-support (3.13.2) - rubocop (1.75.1) + rspec-support (3.13.7) + rubocop (1.88.0) json (~> 2.3) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.1.0) - parallel (~> 1.10) + parallel (>= 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.9.3, < 3.0) - rubocop-ast (>= 1.43.0, < 2.0) + rubocop-ast (>= 1.49.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 4.0) - rubocop-ast (1.43.0) + rubocop-ast (1.49.1) parser (>= 3.3.7.2) - prism (~> 1.4) - rubocop-performance (1.25.0) + prism (~> 1.7) + rubocop-performance (1.26.1) lint_roller (~> 1.1) rubocop (>= 1.75.0, < 2.0) - rubocop-ast (>= 1.38.0, < 2.0) - rubocop-sorbet (0.10.0) - rubocop (>= 1) + rubocop-ast (>= 1.47.1, < 2.0) + rubocop-sorbet (0.12.0) + lint_roller + rubocop (>= 1.75.2) ruby-progressbar (1.13.0) securerandom (0.4.1) + simpleidn (0.2.3) smart_properties (1.17.0) - sorbet (0.5.11971) - sorbet-static (= 0.5.11971) - sorbet-runtime (0.5.11971) - sorbet-static (0.5.11971-aarch64-linux) - sorbet-static (0.5.11971-universal-darwin) - sorbet-static (0.5.11971-x86_64-linux) - stringio (3.1.6) - thor (1.3.2) + sorbet (0.6.13312) + sorbet-static (= 0.6.13312) + sorbet-runtime (0.6.13312) + sorbet-static (0.6.13312-aarch64-linux) + sorbet-static (0.6.13312-universal-darwin) + sorbet-static (0.6.13312-x86_64-linux) + stringio (3.2.0) + thor (1.5.0) + tsort (0.2.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - unicode-display_width (3.1.4) - unicode-emoji (~> 4.0, >= 4.0.4) + unicode-display_width (3.2.0) + unicode-emoji (~> 4.1) unicode-emoji (4.2.0) uri (1.0.3) - zeitwerk (2.7.2) + zeitwerk (2.8.2) PLATFORMS aarch64-linux @@ -196,12 +208,12 @@ PLATFORMS DEPENDENCIES chatwerk! irb - rake (~> 13.0) - rspec (~> 3.0) - rubocop (~> 1.21) + rake (~> 13.4) + rspec (~> 3.13) + rubocop (~> 1.88) rubocop-performance rubocop-sorbet - sorbet (~> 0.5) + sorbet (~> 0.6) BUNDLED WITH 4.0.15 diff --git a/lib/chatwerk/tools/packages_tool.rb b/lib/chatwerk/tools/packages_tool.rb index 7798b23..df45dba 100644 --- a/lib/chatwerk/tools/packages_tool.rb +++ b/lib/chatwerk/tools/packages_tool.rb @@ -17,8 +17,7 @@ class PackagesTool < MCP::Tool type: 'string', description: "A partial package path name to constrain the results (e.g. 'packs/product_services/payments/banks' or 'payments/banks')." } - }, - required: [] + } ) class << self diff --git a/lib/chatwerk/tools/print_env_tool.rb b/lib/chatwerk/tools/print_env_tool.rb index 360ad92..b797552 100644 --- a/lib/chatwerk/tools/print_env_tool.rb +++ b/lib/chatwerk/tools/print_env_tool.rb @@ -10,8 +10,7 @@ class PrintEnvTool < MCP::Tool description 'Get the current working directory and environment path of the MCP server, ensuring correct directory context' input_schema( - properties: {}, - required: [] + properties: {} ) class << self diff --git a/spec/chatwerk/mcp_tools_spec.rb b/spec/chatwerk/mcp_tools_spec.rb index c671b67..5c7029f 100644 --- a/spec/chatwerk/mcp_tools_spec.rb +++ b/spec/chatwerk/mcp_tools_spec.rb @@ -37,7 +37,7 @@ it 'has no required arguments' do schema = described_class.input_schema - expect(schema.required).to be_empty + expect(schema.to_h.fetch(:required, [])).to be_empty end end @@ -65,8 +65,8 @@ it 'has package_path as optional argument' do schema = described_class.input_schema - expect(schema.properties).to have_key(:package_path) - expect(schema.required).not_to include(:package_path) + expect(schema.to_h[:properties]).to have_key(:package_path) + expect(schema.to_h.fetch(:required, [])).not_to include('package_path') end end @@ -86,8 +86,8 @@ it 'has package_path as required argument' do schema = described_class.input_schema - expect(schema.properties).to have_key(:package_path) - expect(schema.required).to include(:package_path) + expect(schema.to_h[:properties]).to have_key(:package_path) + expect(schema.to_h.fetch(:required, [])).to include('package_path') end end @@ -123,10 +123,10 @@ it 'has correct argument requirements' do schema = described_class.input_schema - expect(schema.properties).to have_key(:package_path) - expect(schema.properties).to have_key(:constant_name) - expect(schema.required).to include(:package_path) - expect(schema.required).not_to include(:constant_name) + expect(schema.to_h[:properties]).to have_key(:package_path) + expect(schema.to_h[:properties]).to have_key(:constant_name) + expect(schema.to_h.fetch(:required, [])).to include('package_path') + expect(schema.to_h.fetch(:required, [])).not_to include('constant_name') end end @@ -162,10 +162,10 @@ it 'has correct argument requirements' do schema = described_class.input_schema - expect(schema.properties).to have_key(:package_path) - expect(schema.properties).to have_key(:constant_name) - expect(schema.required).to include(:package_path) - expect(schema.required).not_to include(:constant_name) + expect(schema.to_h[:properties]).to have_key(:package_path) + expect(schema.to_h[:properties]).to have_key(:constant_name) + expect(schema.to_h.fetch(:required, [])).to include('package_path') + expect(schema.to_h.fetch(:required, [])).not_to include('constant_name') end end end