foobara-mcp-connector 0.0.3 → 0.0.4
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/CHANGELOG.md +4 -0
- data/src/mcp_connector.rb +1 -17
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9887a812a0026b235492eaf1c5c4af194bc11b784211baaeb3e742a5c4377aca
|
4
|
+
data.tar.gz: 242f3614112c8a58613e7773421356a888a7214a2e235341efdfdc871425e23a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86a3e8605855df453482e0ac38b7bdf329b6afcaab574bea1061e8931cec9051cdcc032cf53a8c062d1422b83251ba5a32d1f71f0448bbf4df5f2cabf9f0685e
|
7
|
+
data.tar.gz: df1d38a223b69e48f009881b3e4b4ecca9768c6b6a21030326e4d8310e4f23ec1c3c77e8725632bdbf4fb7dce65bde45731a656c294d1be22a3421d6132da5e8
|
data/CHANGELOG.md
CHANGED
data/src/mcp_connector.rb
CHANGED
@@ -32,24 +32,8 @@ module Foobara
|
|
32
32
|
"This is a Foobara MCP command connector which exposes Foobara commands to you as tools that you can invoke."
|
33
33
|
end
|
34
34
|
|
35
|
-
# TODO: how to stream content out instead of buffering it up?
|
36
35
|
def run(*args, **opts, &)
|
37
|
-
|
38
|
-
f.puts("#{Time.now}: Request: #{args.first.strip}")
|
39
|
-
f.flush
|
40
|
-
end
|
41
|
-
super.body.tap do |response|
|
42
|
-
File.open("mcp-connector.log", "a") do |f|
|
43
|
-
f.puts("#{Time.now}: Response: #{response&.strip}")
|
44
|
-
f.flush
|
45
|
-
end
|
46
|
-
end
|
47
|
-
rescue => e
|
48
|
-
File.open("mcp-connector.log", "a") do |f|
|
49
|
-
f.puts("#{Time.now}: Error: #{e}")
|
50
|
-
f.flush
|
51
|
-
end
|
52
|
-
raise
|
36
|
+
super.body
|
53
37
|
end
|
54
38
|
|
55
39
|
def run_stdio_server(io_in: $stdin, io_out: $stdout, io_err: $stderr)
|