cf-mcp 0.13.0 → 0.13.1

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: ad39a05c699d135149232079a4fde287ad14f7d9e01f4aac4fac7441c21fdfe6
4
- data.tar.gz: 298af20e5926fe580ba1eef84180a8cb05e319cfb72ea3c3f8cfee475beb106f
3
+ metadata.gz: b6ac6ddc9bfd8c2ba7af914a9abde416092e436ed650ebf153987c2ed6ed5369
4
+ data.tar.gz: 3f573e333e680a2975bc858179911ae45a4b2382b5ceaeed9ab2432dfec070c9
5
5
  SHA512:
6
- metadata.gz: 6a118fd341152bf21b4252e4f9da09a02f937a56b9cf0c279cfa2d90d52dd7c3737e2de41717f6a10a8757449fc01f7f600686525f465789c1f87590e35012d1
7
- data.tar.gz: 5b91f27293ef5b9048f826eb549deeae63ce5bf950311927bfc59cd4f63fcbfe0bdc37a9204d7eef20c9b6f97a61981fa62c18eaee0196a71e8573885bdb1833
6
+ metadata.gz: 9c14eb9de223630781010533916abc12999b7186e06dd476d3737a7e66813827806cd5e6b1f1d5571960ea0e3d05bf6025a097ee6c298eb48d1cb90e4fba91f4
7
+ data.tar.gz: 8427a7e2dd1ccb6cdd785292273199e15afc5644a81eff5ee2904efb464da055449c72b404bb6c6cff56d2f166cc6913011cca82c703ec9aaf1187b20e7b8da5
data/CHANGELOG.md CHANGED
@@ -5,6 +5,25 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.13.1] - 2026-01-16
9
+
10
+ ### Added
11
+
12
+ - RBS type signatures for all classes in `sig/cf/mcp.rbs`
13
+ - `rbs` gem added to development dependencies
14
+ - `rake rbs` task for validating RBS signatures (included in default rake task)
15
+
16
+ ### Changed
17
+
18
+ - Removed title from web UI landing page
19
+
20
+ ## [0.13.0] - 2026-01-16
21
+
22
+ ### Changed
23
+
24
+ - Refactored server to use single `Server` class (merged `HTTPServer` functionality)
25
+ - Updated MCP protocol version to 2024-11-05
26
+
8
27
  ## [0.12.1] - 2026-01-14
9
28
 
10
29
  ### Changed
@@ -148,6 +167,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
148
167
  - `cf_list_category` - List items by category
149
168
  - `cf_get_details` - Get full documentation by name
150
169
 
170
+ [0.13.1]: https://github.com/pusewicz/cf-mcp/compare/v0.13.0...v0.13.1
171
+ [0.13.0]: https://github.com/pusewicz/cf-mcp/compare/v0.12.1...v0.13.0
151
172
  [0.12.1]: https://github.com/pusewicz/cf-mcp/compare/v0.12.0...v0.12.1
152
173
  [0.12.0]: https://github.com/pusewicz/cf-mcp/compare/v0.10.1...v0.12.0
153
174
  [0.10.1]: https://github.com/pusewicz/cf-mcp/compare/v0.10.0...v0.10.1
data/Rakefile CHANGED
@@ -23,7 +23,12 @@ task :manifest do
23
23
  puts "Generated Manifest.txt with #{files.size} files"
24
24
  end
25
25
 
26
- task default: %i[test standard manifest]
26
+ desc "Validate RBS type signatures"
27
+ task :rbs do
28
+ sh "rbs", "-I", "sig", "validate"
29
+ end
30
+
31
+ task default: %i[test standard rbs manifest]
27
32
 
28
33
  desc "Deploy to Fly.io (runs tests and linting first)"
29
34
  task deploy: %i[test standard] do
data/lib/cf/mcp/server.rb CHANGED
@@ -136,8 +136,7 @@ module CF
136
136
  index.topics.map do |topic|
137
137
  ::MCP::Resource.new(
138
138
  uri: "cf://topics/#{topic.name}",
139
- name: topic.name,
140
- title: topic.name.tr("_", " ").split.map(&:capitalize).join(" "),
139
+ name: topic.name.tr("_", " ").split.map(&:capitalize).join(" "),
141
140
  description: topic.brief,
142
141
  mime_type: "text/markdown"
143
142
  )
@@ -2,6 +2,6 @@
2
2
 
3
3
  module CF
4
4
  module MCP
5
- VERSION = "0.13.0"
5
+ VERSION = "0.13.1"
6
6
  end
7
7
  end
data/sig/cf/mcp.rbs CHANGED
@@ -2,31 +2,79 @@ module CF
2
2
  module MCP
3
3
  VERSION: String
4
4
 
5
+ def self.root: () -> Pathname
6
+
5
7
  class Error < StandardError
6
8
  end
7
9
 
8
10
  class Parser
11
+ DOC_BLOCK_PATTERN: Regexp
12
+ TAG_PATTERN: Regexp
13
+ MEMBER_COMMENT_PATTERN: Regexp
14
+ ENTRY_COMMENT_PATTERN: Regexp
15
+ CF_ENUM_PATTERN: Regexp
16
+ SIGNATURE_CLEANUP: Regexp
17
+ END_MARKER_PATTERN: Regexp
18
+
9
19
  def parse_file: (String path) -> Array[Models::DocItem]
10
20
  def parse_directory: (String path) -> Array[Models::DocItem]
11
21
  end
12
22
 
23
+ class TopicParser
24
+ API_LINK_PATTERN: Regexp
25
+ TOPIC_LINK_PATTERN: Regexp
26
+ SECTION_PATTERN: Regexp
27
+ CATEGORY_MAP: Hash[String, String]
28
+
29
+ def parse_file: (String path) -> Models::TopicDoc?
30
+ def parse_directory: (String path) -> Array[Models::TopicDoc]
31
+ def parse_reading_order: (String index_path) -> Hash[String, Integer]
32
+ end
33
+
13
34
  class Index
14
35
  attr_reader items: Hash[String, Models::DocItem]
15
36
  attr_reader by_type: Hash[Symbol, Array[Models::DocItem]]
16
37
  attr_reader by_category: Hash[String, Array[Models::DocItem]]
38
+ attr_reader topic_references: Hash[String, Array[String]]
17
39
 
40
+ def initialize: () -> void
18
41
  def add: (Models::DocItem item) -> void
19
42
  def find: (String name) -> Models::DocItem?
43
+ def brief_for: (String name) -> Hash[Symbol, untyped]?
20
44
  def search: (String query, ?type: Symbol?, ?category: String?, ?limit: Integer) -> Array[Models::DocItem]
21
45
  def functions: () -> Array[Models::DocItem]
22
46
  def structs: () -> Array[Models::DocItem]
23
47
  def enums: () -> Array[Models::DocItem]
48
+ def topics: () -> Array[Models::DocItem]
49
+ def topics_ordered: () -> Array[Models::DocItem]
50
+ def topics_for: (String api_name) -> Array[Models::DocItem]
24
51
  def categories: () -> Array[String]
25
52
  def items_in_category: (String category) -> Array[Models::DocItem]
26
53
  def size: () -> Integer
27
54
  def stats: () -> Hash[Symbol, Integer]
28
55
  end
29
56
 
57
+ class IndexBuilder
58
+ DEFAULT_HEADERS_PATH: String
59
+
60
+ attr_reader headers_path: String
61
+
62
+ def initialize: (?root: String?, ?download: bool) -> void
63
+ def build: () ?{ (Symbol, String, Integer) -> void } -> Index
64
+ def valid?: () -> bool
65
+ end
66
+
67
+ class Downloader
68
+ CUTE_FRAMEWORK_ZIP_URL: String
69
+ DEFAULT_DOWNLOAD_DIR: String
70
+
71
+ class DownloadError < StandardError
72
+ end
73
+
74
+ def initialize: (?download_dir: String) -> void
75
+ def download_and_extract: () -> String
76
+ end
77
+
30
78
  class CLI
31
79
  def initialize: (Array[String] args) -> void
32
80
  def run: () -> void
@@ -36,14 +84,41 @@ module CF
36
84
  attr_reader server: untyped
37
85
  attr_reader index: Index
38
86
 
87
+ TOOLS: Array[Class]
88
+ CORS_HEADERS: Hash[String, String]
89
+
90
+ def self.build_rack_app: (?root: String?, ?download: bool) -> untyped
39
91
  def initialize: (Index index) -> void
40
92
  def run_stdio: () -> void
41
- def run_http: (?port: Integer) -> void
42
- def run_sse: (?port: Integer) -> void
93
+ def rack_app: () -> untyped
94
+
95
+ class TemplateContext
96
+ TEMPLATES_DIR: String
97
+
98
+ attr_reader version: String
99
+ attr_reader stats: Hash[Symbol, Integer]
100
+ attr_reader categories: Array[String]
101
+ attr_reader topics: Array[Hash[Symbol, String?]]
102
+ attr_reader tools: Array[Hash[Symbol, String]]
103
+ attr_reader tool_schemas_json: String
104
+
105
+ def initialize: (version: String, stats: Hash[Symbol, Integer], categories: Array[String], topics: Array[Hash[Symbol, String?]], tools: Array[Hash[Symbol, String]], tool_schemas_json: String) -> void
106
+ def categories_json: () -> String
107
+ def topics_json: () -> String
108
+ def css_content: () -> String
109
+ def changelog_content: () -> String
110
+ def changelog_json: () -> String
111
+ def js_content: () -> String
112
+ def h: (untyped text) -> String
113
+ def get_binding: () -> Binding
114
+ end
43
115
  end
44
116
 
45
117
  module Models
46
118
  class DocItem
119
+ GITHUB_REPO: String
120
+ GITHUB_RAW_BASE: String
121
+
47
122
  attr_accessor name: String?
48
123
  attr_accessor type: Symbol?
49
124
  attr_accessor category: String?
@@ -53,11 +128,16 @@ module CF
53
128
  attr_accessor example_brief: String?
54
129
  attr_accessor related: Array[String]
55
130
  attr_accessor source_file: String?
131
+ attr_accessor source_line: Integer?
56
132
 
57
- def matches?: (String query) -> bool
133
+ def initialize: (?name: String?, ?type: Symbol?, ?category: String?, ?brief: String?, ?remarks: String?, ?example: String?, ?example_brief: String?, ?related: Array[String], ?source_file: String?, ?source_line: Integer?) -> void
134
+ def matches?: (String? query) -> bool
135
+ def relevance_score: (String? query) -> Integer
136
+ def source_urls: () -> Hash[Symbol, String]?
58
137
  def to_h: () -> Hash[Symbol, untyped]
59
138
  def to_summary: () -> String
60
- def to_text: (?detailed: bool) -> String
139
+ def to_text: (?detailed: bool, ?index: Index?) -> String
140
+ def format_related_items: (Index? index) -> String
61
141
  end
62
142
 
63
143
  class FunctionDoc < DocItem
@@ -65,19 +145,154 @@ module CF
65
145
  attr_accessor parameters: Array[Parameter]
66
146
  attr_accessor return_value: String?
67
147
 
68
- Parameter: untyped
148
+ class Parameter < Data
149
+ attr_reader name: String
150
+ attr_reader description: String
151
+ end
152
+
153
+ def initialize: (?signature: String?, ?parameters: Array[Parameter], ?return_value: String?, **untyped) -> void
154
+ def to_h: () -> Hash[Symbol, untyped]
155
+ def to_summary: () -> String
156
+ def to_text: (?detailed: bool, ?index: Index?) -> String
69
157
  end
70
158
 
71
159
  class StructDoc < DocItem
72
160
  attr_accessor members: Array[Member]
73
161
 
74
- Member: untyped
162
+ class Member < Data
163
+ attr_reader declaration: String
164
+ attr_reader description: String
165
+ end
166
+
167
+ def initialize: (?members: Array[Member], **untyped) -> void
168
+ def to_h: () -> Hash[Symbol, untyped]
75
169
  end
76
170
 
77
171
  class EnumDoc < DocItem
78
172
  attr_accessor entries: Array[Entry]
79
173
 
80
- Entry: untyped
174
+ class Entry < Data
175
+ attr_reader name: String
176
+ attr_reader value: String
177
+ attr_reader description: String
178
+ end
179
+
180
+ def initialize: (?entries: Array[Entry], **untyped) -> void
181
+ def to_h: () -> Hash[Symbol, untyped]
182
+ end
183
+
184
+ class TopicDoc < DocItem
185
+ attr_accessor content: String?
186
+ attr_accessor sections: Array[Section]
187
+ attr_accessor function_references: Array[String]
188
+ attr_accessor struct_references: Array[String]
189
+ attr_accessor enum_references: Array[String]
190
+ attr_accessor topic_references: Array[String]
191
+ attr_accessor reading_order: Integer?
192
+
193
+ class Section < Data
194
+ attr_reader title: String
195
+ attr_reader content: String
196
+ end
197
+
198
+ def initialize: (?content: String?, ?sections: Array[Section], ?function_references: Array[String], ?struct_references: Array[String], ?enum_references: Array[String], ?topic_references: Array[String], ?reading_order: Integer?, **untyped) -> void
199
+ def all_api_references: () -> Array[String]
200
+ def to_h: () -> Hash[Symbol, untyped]
201
+ def to_summary: () -> String
202
+ def to_text: (?detailed: bool, ?index: Index?) -> String
203
+ end
204
+ end
205
+
206
+ module Tools
207
+ module ResponseHelpers
208
+ def text_response: (String text) -> untyped
209
+ def error_response: (String message) -> untyped
210
+ end
211
+
212
+ module SearchResultFormatter
213
+ def format_search_results: (Array[Models::DocItem] results, query: String, type_label: String, limit: Integer, details_tip: String, ?filter_suggestion: String?) -> String
214
+ end
215
+
216
+ class SearchTool
217
+ extend ResponseHelpers
218
+ extend SearchResultFormatter
219
+
220
+ DETAILS_TIP: String
221
+
222
+ def self.call: (query: String, ?type: String?, ?category: String?, ?limit: Integer, ?server_context: Hash[Symbol, untyped]) -> untyped
223
+ end
224
+
225
+ class SearchFunctions
226
+ extend ResponseHelpers
227
+ extend SearchResultFormatter
228
+
229
+ DETAILS_TIP: String
230
+
231
+ def self.call: (query: String, ?category: String?, ?limit: Integer, ?server_context: Hash[Symbol, untyped]) -> untyped
232
+ end
233
+
234
+ class SearchStructs
235
+ extend ResponseHelpers
236
+ extend SearchResultFormatter
237
+
238
+ DETAILS_TIP: String
239
+
240
+ def self.call: (query: String, ?category: String?, ?limit: Integer, ?server_context: Hash[Symbol, untyped]) -> untyped
241
+ end
242
+
243
+ class SearchEnums
244
+ extend ResponseHelpers
245
+ extend SearchResultFormatter
246
+
247
+ DETAILS_TIP: String
248
+
249
+ def self.call: (query: String, ?category: String?, ?limit: Integer, ?server_context: Hash[Symbol, untyped]) -> untyped
250
+ end
251
+
252
+ class ListCategory
253
+ extend ResponseHelpers
254
+
255
+ def self.call: (?category: String?, ?type: String?, ?server_context: Hash[Symbol, untyped]) -> untyped
256
+ end
257
+
258
+ class GetDetails
259
+ extend ResponseHelpers
260
+
261
+ NAMING_TIP: String
262
+
263
+ def self.call: (name: String, ?server_context: Hash[Symbol, untyped]) -> untyped
264
+ end
265
+
266
+ class FindRelated
267
+ extend ResponseHelpers
268
+
269
+ def self.call: (name: String, ?server_context: Hash[Symbol, untyped]) -> untyped
270
+ end
271
+
272
+ class ParameterSearch
273
+ extend ResponseHelpers
274
+
275
+ def self.call: (type: String, ?direction: String, ?server_context: Hash[Symbol, untyped]) -> untyped
276
+ end
277
+
278
+ class MemberSearch
279
+ extend ResponseHelpers
280
+
281
+ def self.call: (query: String, ?limit: Integer, ?server_context: Hash[Symbol, untyped]) -> untyped
282
+ end
283
+
284
+ class ListTopics
285
+ extend ResponseHelpers
286
+
287
+ CATEGORY_TIP: String
288
+
289
+ def self.call: (?category: String?, ?ordered: bool, ?server_context: Hash[Symbol, untyped]) -> untyped
290
+ end
291
+
292
+ class GetTopic
293
+ extend ResponseHelpers
294
+
295
+ def self.call: (name: String, ?server_context: Hash[Symbol, untyped]) -> untyped
81
296
  end
82
297
  end
83
298
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cf-mcp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.0
4
+ version: 0.13.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Usewicz