actionmcp 0.200.1 → 0.200.2

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: 118756ad7f1d96015639b84e552f84b48c960cafc984eac27ca983239369334e
4
- data.tar.gz: 109bec7847cac78e0b5436c5cf990b37873241d94e8ee067d5f2448e8f851180
3
+ metadata.gz: 7dac4b9579940d54637f45cb616df8e38aab4ea042a259c86da2ecc469f56a10
4
+ data.tar.gz: 1192d89e7a2e058e61ba666062bebde24477b17d0a8b72a4ccbf59d49baad166
5
5
  SHA512:
6
- metadata.gz: 2ca91637228275486f5a8d58fb21f7c2459445545a5cde0695c5b4a855b8328132f1b56e35b1846307357c8394e9f5a1c25e782ec52b2456d4faf61aa2d3ce5a
7
- data.tar.gz: 60a172fc7b6d20fe82b7a55ebc95c5cc8f63b45012d397b5f0dae6d6f5499d345ac336542029919ecfff49bda2669c1d728b23d661ad39a65aa201a2163a6e19
6
+ metadata.gz: f84277e60ce16d683d82401db10537ebf01d37e9d7d2cba25b423fdeac1a3b2d251e9226ec83f18fea1df00efaa560bfbb3626466415a24900aacadb650c221a
7
+ data.tar.gz: 71ee7caf64872c3a05ae25cb70c07af01f86a433f43206a139d48d86199d2dc0fec297efd73f65818aa66a114a76544dcdd3e9f3f0ff3eeb5929e6bc1a1d1e6a
@@ -69,8 +69,8 @@ module ActionMCP
69
69
  # Convert string payloads to JSON
70
70
  if payload.is_a?(String)
71
71
  begin
72
- @data = MultiJson.load(payload)
73
- rescue MultiJson::ParseError
72
+ @data = MultiJSON.parse(payload)
73
+ rescue MultiJSON::ParseError
74
74
  # Handle invalid JSON by creating an error object
75
75
  self.message_json = { "error" => "Invalid JSON", "raw" => payload }
76
76
  self.message_type = "invalid_json"
@@ -84,7 +84,7 @@ module ActionMCP
84
84
  if data.is_a?(JSON_RPC::Request) || data.is_a?(JSON_RPC::Response) || data.is_a?(JSON_RPC::Notification)
85
85
  data = data.to_json
86
86
  end
87
- data = MultiJson.dump(data) if data.is_a?(Hash)
87
+ data = MultiJSON.generate(data) if data.is_a?(Hash)
88
88
 
89
89
  messages.create!(data: data, direction: writer_role)
90
90
  end
@@ -33,7 +33,7 @@ module ActionMCP
33
33
  #
34
34
  # @return [String] The JSON representation.
35
35
  def to_json(*)
36
- MultiJson.dump(to_h, *)
36
+ MultiJSON.generate(to_h, *)
37
37
  end
38
38
  end
39
39
  end
@@ -55,7 +55,7 @@ module ActionMCP
55
55
  end
56
56
 
57
57
  def to_json(*)
58
- MultiJson.dump(to_h, *)
58
+ MultiJSON.generate(to_h, *)
59
59
  end
60
60
 
61
61
  def ==(other)
@@ -24,7 +24,7 @@ module ActionMCP
24
24
  pretty = json_normalise(line)
25
25
  log_with_tags("MCP", "RX") { ActionMCP.logger.debug("#{GREEN_RX}#{pretty}#{CLR}") }
26
26
  super
27
- rescue MultiJson::ParseError => e
27
+ rescue MultiJSON::ParseError => e
28
28
  log_with_tags("MCP", "RX") { ActionMCP.logger.warn("#{YELLOW_ERR}Bad JSON → #{e.message}#{CLR}") }
29
29
  raise
30
30
  rescue StandardError => e
@@ -57,7 +57,7 @@ module ActionMCP
57
57
 
58
58
  # Accepts String, Hash, or any #to_json‑able object.
59
59
  def json_normalise(obj)
60
- str = obj.is_a?(String) ? obj.strip : MultiJson.dump(obj)
60
+ str = obj.is_a?(String) ? obj.strip : MultiJSON.generate(obj)
61
61
  str.empty? ? "<empty frame>" : str
62
62
  end
63
63
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  require_relative "gem_version"
4
4
  module ActionMCP
5
- VERSION = "0.200.1"
5
+ VERSION = "0.200.2"
6
6
 
7
7
  class << self
8
8
  alias version gem_version
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: actionmcp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.200.1
4
+ version: 0.200.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Abdelkader Boudih
@@ -99,14 +99,14 @@ dependencies:
99
99
  requirements:
100
100
  - - ">="
101
101
  - !ruby/object:Gem::Version
102
- version: '0'
102
+ version: '1.21'
103
103
  type: :runtime
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'
109
+ version: '1.21'
110
110
  - !ruby/object:Gem::Dependency
111
111
  name: railties
112
112
  requirement: !ruby/object:Gem::Requirement