actionmcp 0.200.2 → 0.201.0

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: 7dac4b9579940d54637f45cb616df8e38aab4ea042a259c86da2ecc469f56a10
4
- data.tar.gz: 1192d89e7a2e058e61ba666062bebde24477b17d0a8b72a4ccbf59d49baad166
3
+ metadata.gz: f43c9c7b1a96891c28d29f5c3c9e292d6eed0404540f0bc5c32b502c5d617106
4
+ data.tar.gz: 806b9bec986aa74568aca0a9fc5959f1734638297f0c4318e2d4d324ffe0455b
5
5
  SHA512:
6
- metadata.gz: f84277e60ce16d683d82401db10537ebf01d37e9d7d2cba25b423fdeac1a3b2d251e9226ec83f18fea1df00efaa560bfbb3626466415a24900aacadb650c221a
7
- data.tar.gz: 71ee7caf64872c3a05ae25cb70c07af01f86a433f43206a139d48d86199d2dc0fec297efd73f65818aa66a114a76544dcdd3e9f3f0ff3eeb5929e6bc1a1d1e6a
6
+ metadata.gz: 1a3bcc5e984b69d10826170410506ea996f26a145552fbc608b228e72b1c6787370bbe7d5c1a3d6967a6f1c2a72b0f520a1e9566067a207ab33a46caab4722e7
7
+ data.tar.gz: 7f15b59458d2fd70bcc86cd8ef545b12a0ad4467523a72a4461d664ae2610d10305c89355414e450adf5d479a97aa2d583bbc36085ba7a3696d872fc5d187ad7
@@ -117,10 +117,12 @@ module ActionMCP
117
117
  # Preserve Current attributes across reloader boundary
118
118
  current_user = ActionMCP::Current.user
119
119
  current_gateway = ActionMCP::Current.gateway
120
+ current_session_data = ActionMCP::Current.session_data
120
121
 
121
122
  Rails.application.reloader.wrap do
122
123
  ActionMCP::Current.user = current_user
123
124
  ActionMCP::Current.gateway = current_gateway
125
+ ActionMCP::Current.session_data = current_session_data
124
126
  tool.call
125
127
  end
126
128
  else
@@ -4,6 +4,11 @@ module ActionMCP
4
4
  class Current < ActiveSupport::CurrentAttributes
5
5
  attribute :user
6
6
  attribute :gateway
7
+ attribute :session_data
8
+
9
+ def session_data
10
+ super || (self.session_data = {})
11
+ end
7
12
 
8
13
  def user=(user)
9
14
  super
@@ -15,5 +15,10 @@ module ActionMCP
15
15
  def current_gateway
16
16
  ActionMCP::Current.gateway
17
17
  end
18
+
19
+ # Access the current session data from ActionMCP::Current
20
+ def current_session_data
21
+ ActionMCP::Current.session_data
22
+ end
18
23
  end
19
24
  end
@@ -105,11 +105,13 @@ module ActionMCP
105
105
  # Preserve Current attributes across reloader boundary
106
106
  current_user = ActionMCP::Current.user
107
107
  current_gateway = ActionMCP::Current.gateway
108
+ current_session_data = ActionMCP::Current.session_data
108
109
 
109
110
  Rails.application.reloader.wrap do
110
111
  # Restore Current attributes inside reloader
111
112
  ActionMCP::Current.user = current_user
112
113
  ActionMCP::Current.gateway = current_gateway
114
+ ActionMCP::Current.session_data = current_session_data
113
115
  tool.call
114
116
  end
115
117
  else
@@ -2,7 +2,7 @@
2
2
 
3
3
  require_relative "gem_version"
4
4
  module ActionMCP
5
- VERSION = "0.200.2"
5
+ VERSION = "0.201.0"
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.2
4
+ version: 0.201.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Abdelkader Boudih