solid_mcp 0.2.3 → 0.5.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 +4 -4
- data/ext/solid_mcp_native/Cargo.toml +12 -0
- data/ext/solid_mcp_native/core/Cargo.toml +32 -0
- data/ext/solid_mcp_native/core/src/config.rs +133 -0
- data/ext/solid_mcp_native/core/src/db/mod.rs +154 -0
- data/ext/solid_mcp_native/core/src/db/postgres.rs +242 -0
- data/ext/solid_mcp_native/core/src/db/sqlite.rs +276 -0
- data/ext/solid_mcp_native/core/src/error.rs +38 -0
- data/ext/solid_mcp_native/core/src/lib.rs +25 -0
- data/ext/solid_mcp_native/core/src/message.rs +191 -0
- data/ext/solid_mcp_native/core/src/pubsub.rs +309 -0
- data/ext/solid_mcp_native/core/src/subscriber.rs +298 -0
- data/ext/solid_mcp_native/core/src/writer.rs +252 -0
- data/ext/solid_mcp_native/extconf.rb +3 -0
- data/ext/solid_mcp_native/ffi/Cargo.toml +20 -0
- data/ext/solid_mcp_native/ffi/extconf.rb +67 -0
- data/ext/solid_mcp_native/ffi/src/lib.rs +224 -0
- data/lib/solid_mcp/configuration.rb +5 -2
- data/lib/solid_mcp/message_writer.rb +80 -45
- data/lib/solid_mcp/native_speedup.rb +140 -0
- data/lib/solid_mcp/pub_sub.rb +10 -8
- data/lib/solid_mcp/subscriber.rb +18 -7
- data/lib/solid_mcp/version.rb +1 -1
- data/lib/solid_mcp.rb +3 -0
- metadata +57 -19
- data/.release-please-manifest.json +0 -1
- data/CHANGELOG.md +0 -34
- data/Gemfile +0 -11
- data/Gemfile.lock +0 -140
- data/Rakefile +0 -8
- data/app/models/solid_mcp/message.rb +0 -25
- data/app/models/solid_mcp/record.rb +0 -10
- data/bin/console +0 -11
- data/bin/rails +0 -15
- data/bin/setup +0 -8
- data/bin/test +0 -8
- data/db/migrate/20250624000001_create_solid_mcp_messages.rb +0 -28
- data/release-please-config.json +0 -8
- data/solid_mcp.gemspec +0 -39
data/Gemfile.lock
DELETED
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
PATH
|
|
2
|
-
remote: .
|
|
3
|
-
specs:
|
|
4
|
-
solid_mcp (0.2.3)
|
|
5
|
-
activejob (>= 8.0)
|
|
6
|
-
activerecord (>= 8.0)
|
|
7
|
-
concurrent-ruby (~> 1.0)
|
|
8
|
-
railties (>= 8.0)
|
|
9
|
-
|
|
10
|
-
GEM
|
|
11
|
-
remote: https://rubygems.org/
|
|
12
|
-
specs:
|
|
13
|
-
actionpack (8.0.2)
|
|
14
|
-
actionview (= 8.0.2)
|
|
15
|
-
activesupport (= 8.0.2)
|
|
16
|
-
nokogiri (>= 1.8.5)
|
|
17
|
-
rack (>= 2.2.4)
|
|
18
|
-
rack-session (>= 1.0.1)
|
|
19
|
-
rack-test (>= 0.6.3)
|
|
20
|
-
rails-dom-testing (~> 2.2)
|
|
21
|
-
rails-html-sanitizer (~> 1.6)
|
|
22
|
-
useragent (~> 0.16)
|
|
23
|
-
actionview (8.0.2)
|
|
24
|
-
activesupport (= 8.0.2)
|
|
25
|
-
builder (~> 3.1)
|
|
26
|
-
erubi (~> 1.11)
|
|
27
|
-
rails-dom-testing (~> 2.2)
|
|
28
|
-
rails-html-sanitizer (~> 1.6)
|
|
29
|
-
activejob (8.0.2)
|
|
30
|
-
activesupport (= 8.0.2)
|
|
31
|
-
globalid (>= 0.3.6)
|
|
32
|
-
activemodel (8.0.2)
|
|
33
|
-
activesupport (= 8.0.2)
|
|
34
|
-
activerecord (8.0.2)
|
|
35
|
-
activemodel (= 8.0.2)
|
|
36
|
-
activesupport (= 8.0.2)
|
|
37
|
-
timeout (>= 0.4.0)
|
|
38
|
-
activesupport (8.0.2)
|
|
39
|
-
base64
|
|
40
|
-
benchmark (>= 0.3)
|
|
41
|
-
bigdecimal
|
|
42
|
-
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
43
|
-
connection_pool (>= 2.2.5)
|
|
44
|
-
drb
|
|
45
|
-
i18n (>= 1.6, < 2)
|
|
46
|
-
logger (>= 1.4.2)
|
|
47
|
-
minitest (>= 5.1)
|
|
48
|
-
securerandom (>= 0.3)
|
|
49
|
-
tzinfo (~> 2.0, >= 2.0.5)
|
|
50
|
-
uri (>= 0.13.1)
|
|
51
|
-
base64 (0.2.0)
|
|
52
|
-
benchmark (0.4.0)
|
|
53
|
-
bigdecimal (3.1.9)
|
|
54
|
-
builder (3.3.0)
|
|
55
|
-
concurrent-ruby (1.3.5)
|
|
56
|
-
connection_pool (2.5.3)
|
|
57
|
-
crass (1.0.6)
|
|
58
|
-
date (3.4.1)
|
|
59
|
-
drb (2.2.1)
|
|
60
|
-
erb (5.0.1)
|
|
61
|
-
erubi (1.13.1)
|
|
62
|
-
globalid (1.2.1)
|
|
63
|
-
activesupport (>= 6.1)
|
|
64
|
-
i18n (1.14.7)
|
|
65
|
-
concurrent-ruby (~> 1.0)
|
|
66
|
-
io-console (0.8.0)
|
|
67
|
-
irb (1.15.2)
|
|
68
|
-
pp (>= 0.6.0)
|
|
69
|
-
rdoc (>= 4.0.0)
|
|
70
|
-
reline (>= 0.4.2)
|
|
71
|
-
logger (1.7.0)
|
|
72
|
-
loofah (2.24.1)
|
|
73
|
-
crass (~> 1.0.2)
|
|
74
|
-
nokogiri (>= 1.12.0)
|
|
75
|
-
minitest (5.25.5)
|
|
76
|
-
nokogiri (1.18.8-arm64-darwin)
|
|
77
|
-
racc (~> 1.4)
|
|
78
|
-
nokogiri (1.18.8-x86_64-linux-gnu)
|
|
79
|
-
racc (~> 1.4)
|
|
80
|
-
pp (0.6.2)
|
|
81
|
-
prettyprint
|
|
82
|
-
prettyprint (0.2.0)
|
|
83
|
-
psych (5.2.6)
|
|
84
|
-
date
|
|
85
|
-
stringio
|
|
86
|
-
racc (1.8.1)
|
|
87
|
-
rack (3.1.15)
|
|
88
|
-
rack-session (2.1.1)
|
|
89
|
-
base64 (>= 0.1.0)
|
|
90
|
-
rack (>= 3.0.0)
|
|
91
|
-
rack-test (2.2.0)
|
|
92
|
-
rack (>= 1.3)
|
|
93
|
-
rackup (2.2.1)
|
|
94
|
-
rack (>= 3)
|
|
95
|
-
rails-dom-testing (2.2.0)
|
|
96
|
-
activesupport (>= 5.0.0)
|
|
97
|
-
minitest
|
|
98
|
-
nokogiri (>= 1.6)
|
|
99
|
-
rails-html-sanitizer (1.6.2)
|
|
100
|
-
loofah (~> 2.21)
|
|
101
|
-
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)
|
|
102
|
-
railties (8.0.2)
|
|
103
|
-
actionpack (= 8.0.2)
|
|
104
|
-
activesupport (= 8.0.2)
|
|
105
|
-
irb (~> 1.13)
|
|
106
|
-
rackup (>= 1.0.0)
|
|
107
|
-
rake (>= 12.2)
|
|
108
|
-
thor (~> 1.0, >= 1.2.2)
|
|
109
|
-
zeitwerk (~> 2.6)
|
|
110
|
-
rake (13.2.1)
|
|
111
|
-
rdoc (6.14.0)
|
|
112
|
-
erb
|
|
113
|
-
psych (>= 4.0.0)
|
|
114
|
-
reline (0.6.1)
|
|
115
|
-
io-console (~> 0.5)
|
|
116
|
-
securerandom (0.4.1)
|
|
117
|
-
sqlite3 (2.7.0-arm64-darwin)
|
|
118
|
-
sqlite3 (2.7.0-x86_64-linux-gnu)
|
|
119
|
-
stringio (3.1.7)
|
|
120
|
-
thor (1.3.2)
|
|
121
|
-
timeout (0.4.3)
|
|
122
|
-
tzinfo (2.0.6)
|
|
123
|
-
concurrent-ruby (~> 1.0)
|
|
124
|
-
uri (1.0.3)
|
|
125
|
-
useragent (0.16.11)
|
|
126
|
-
zeitwerk (2.7.3)
|
|
127
|
-
|
|
128
|
-
PLATFORMS
|
|
129
|
-
arm64-darwin-24
|
|
130
|
-
x86_64-linux
|
|
131
|
-
|
|
132
|
-
DEPENDENCIES
|
|
133
|
-
irb
|
|
134
|
-
minitest (~> 5.16)
|
|
135
|
-
rake (~> 13.0)
|
|
136
|
-
solid_mcp!
|
|
137
|
-
sqlite3 (~> 2.0)
|
|
138
|
-
|
|
139
|
-
BUNDLED WITH
|
|
140
|
-
2.6.9
|
data/Rakefile
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module SolidMCP
|
|
4
|
-
class Message < Record
|
|
5
|
-
self.table_name = "solid_mcp_messages"
|
|
6
|
-
|
|
7
|
-
scope :for_session, ->(session_id) { where(session_id: session_id) }
|
|
8
|
-
scope :undelivered, -> { where(delivered_at: nil) }
|
|
9
|
-
scope :delivered, -> { where.not(delivered_at: nil) }
|
|
10
|
-
scope :after_id, ->(id) { where("id > ?", id) }
|
|
11
|
-
scope :old_delivered, ->(age) { delivered.where("delivered_at < ?", age.ago) }
|
|
12
|
-
scope :old_undelivered, ->(age) { undelivered.where("created_at < ?", age.ago) }
|
|
13
|
-
|
|
14
|
-
# Mark messages as delivered
|
|
15
|
-
def self.mark_delivered(ids)
|
|
16
|
-
where(id: ids).update_all(delivered_at: Time.current)
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
# Cleanup old messages
|
|
20
|
-
def self.cleanup(delivered_retention: 1.hour, undelivered_retention: 24.hours)
|
|
21
|
-
old_delivered(delivered_retention).delete_all
|
|
22
|
-
old_undelivered(undelivered_retention).delete_all
|
|
23
|
-
end
|
|
24
|
-
end
|
|
25
|
-
end
|
data/bin/console
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
2
|
-
# frozen_string_literal: true
|
|
3
|
-
|
|
4
|
-
require "bundler/setup"
|
|
5
|
-
require "solid_mcp"
|
|
6
|
-
|
|
7
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
|
8
|
-
# with your gem easier. You can also use a different console, if you like.
|
|
9
|
-
|
|
10
|
-
require "irb"
|
|
11
|
-
IRB.start(__FILE__)
|
data/bin/rails
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
2
|
-
# frozen_string_literal: true
|
|
3
|
-
|
|
4
|
-
# This command will automatically be run when you run "rails" with Rails gems
|
|
5
|
-
# installed from the root of your application.
|
|
6
|
-
|
|
7
|
-
ENGINE_ROOT = File.expand_path('..', __dir__)
|
|
8
|
-
APP_PATH = File.expand_path('../test/dummy/config/application', __dir__)
|
|
9
|
-
|
|
10
|
-
# Set up gems listed in the Gemfile.
|
|
11
|
-
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
|
|
12
|
-
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
|
|
13
|
-
|
|
14
|
-
require 'rails/all'
|
|
15
|
-
require 'rails/engine/commands'
|
data/bin/setup
DELETED
data/bin/test
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
class CreateSolidMCPMessages < ActiveRecord::Migration[7.0]
|
|
4
|
-
def change
|
|
5
|
-
create_table :solid_mcp_messages do |t|
|
|
6
|
-
# Session this message belongs to
|
|
7
|
-
t.string :session_id, null: false, limit: 36
|
|
8
|
-
|
|
9
|
-
# Type of event (e.g., 'message', 'ping', 'connection_closed')
|
|
10
|
-
t.string :event_type, null: false, limit: 50
|
|
11
|
-
|
|
12
|
-
# The actual data payload
|
|
13
|
-
t.text :data
|
|
14
|
-
|
|
15
|
-
# Timestamp when message was created
|
|
16
|
-
t.datetime :created_at, null: false
|
|
17
|
-
|
|
18
|
-
# Timestamp when message was delivered
|
|
19
|
-
t.datetime :delivered_at
|
|
20
|
-
|
|
21
|
-
# Composite index for efficient polling
|
|
22
|
-
t.index [:session_id, :id], name: 'idx_solid_mcp_messages_on_session_and_id'
|
|
23
|
-
|
|
24
|
-
# Index for cleanup
|
|
25
|
-
t.index [:delivered_at, :created_at], name: 'idx_solid_mcp_messages_on_delivered_and_created'
|
|
26
|
-
end
|
|
27
|
-
end
|
|
28
|
-
end
|
data/release-please-config.json
DELETED
data/solid_mcp.gemspec
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require_relative "lib/solid_mcp/version"
|
|
4
|
-
|
|
5
|
-
Gem::Specification.new do |spec|
|
|
6
|
-
spec.name = "solid_mcp"
|
|
7
|
-
spec.version = SolidMCP::VERSION
|
|
8
|
-
spec.authors = ["Abdelkader Boudih"]
|
|
9
|
-
spec.email = ["terminale@gmail.com"]
|
|
10
|
-
|
|
11
|
-
spec.summary = "Streaming Pub/Sub transport for ActionMCP."
|
|
12
|
-
spec.description = "SolidMCP implements a high-performance, bidirectional Pub/Sub transport for ActionMCP."
|
|
13
|
-
spec.homepage = "https://github.com/seuros/solid_mcp"
|
|
14
|
-
spec.license = "MIT"
|
|
15
|
-
spec.required_ruby_version = ">= 3.4.0"
|
|
16
|
-
|
|
17
|
-
spec.metadata["homepage_uri"] = spec.homepage
|
|
18
|
-
spec.metadata["source_code_uri"] = "https://github.com/seuros/solid_mcp"
|
|
19
|
-
spec.metadata["changelog_uri"] = "https://github.com/seuros/solid_mcp/blob/main/CHANGELOG.md"
|
|
20
|
-
|
|
21
|
-
spec.files = IO.popen(%w[git ls-files -z], chdir: __dir__, err: IO::NULL) do |ls|
|
|
22
|
-
ls.readlines("\x0", chomp: true).reject do |f|
|
|
23
|
-
f.start_with?(*%w[test/ .git .github])
|
|
24
|
-
end
|
|
25
|
-
end
|
|
26
|
-
|
|
27
|
-
spec.bindir = "exe"
|
|
28
|
-
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
|
29
|
-
spec.require_paths = ["lib"]
|
|
30
|
-
|
|
31
|
-
spec.add_dependency "activerecord", ">= 8.0"
|
|
32
|
-
spec.add_dependency "railties", ">= 8.0"
|
|
33
|
-
spec.add_dependency "activejob", ">= 8.0"
|
|
34
|
-
spec.add_dependency "concurrent-ruby", "~> 1.0"
|
|
35
|
-
|
|
36
|
-
spec.add_development_dependency "minitest", "~> 5.0"
|
|
37
|
-
spec.add_development_dependency "sqlite3", "~> 2.0"
|
|
38
|
-
spec.add_development_dependency "rake", "~> 13.0"
|
|
39
|
-
end
|