cf-mcp 0.9.2 → 0.10.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: 4fdaf411a4f3224a85c8399b9bd6964688ad3a6e8ce68ab61abbd76c32833c8e
4
- data.tar.gz: b23b96e53d98c56b9fc3364ec76a3a67c50df807b152d8b0e43f1f07db626d2e
3
+ metadata.gz: fa40d95e95c2179eeaa55f22e374232510ee6857aec12ca73ab5c438d9808f16
4
+ data.tar.gz: 1047aa59ffc741fb792778037a9e958ee3af42fec332a0653882a351277ef10f
5
5
  SHA512:
6
- metadata.gz: 23b5cfa8ed27a9f71d8c031cefabad9b12c83ae5e109f9306b2456fcc0979c305287bcfde0e0dd2581009f84683b78b0e16630a52e8c665aba15c0dc26639453
7
- data.tar.gz: 1e1785c0bac762cf2b77dfa4bf26faa4e9093124ccf2be74972cc34552e315ca20dbe9a530136b8b34f485d6b1ae727bd617028e5ef3bdad3feb6684787d1fb6
6
+ metadata.gz: dac224a9ccf242b04a8d8a801b148f71bf1e9326bf8550560045b2e34ef8501e60f44a7bfd0ea14b06d762c0ddde9b82e50e4896dd2dd7a2489ee823658f9fa3
7
+ data.tar.gz: 8ebd60174ed5d853121255db222fb34ee4baa7c033d2ebfdd0fc246d9f5cdfe5cf824a18926e49591c34b052154fdd78623e5b25675bcf4b09521f6107260796
data/CHANGELOG.md ADDED
@@ -0,0 +1,128 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [0.10.0] - 2026-01-14
9
+
10
+ ### Added
11
+
12
+ - Multi-keyword search support: queries like "draw circle rectangle" now match items containing any keyword
13
+ - Items matching more keywords rank higher in search results
14
+
15
+ ## [0.9.3] - 2026-01-14
16
+
17
+ ### Added
18
+
19
+ - Claude Code slash commands for version bumping and releases
20
+ - Documentation for changelog and slash commands in CLAUDE.md
21
+
22
+ ### Changed
23
+
24
+ - Include CHANGELOG.md in gem manifest
25
+
26
+ ## [0.9.2] - 2026-01-14
27
+
28
+ ### Added
29
+
30
+ - Changelog display in the web UI
31
+
32
+ ## [0.9.1] - 2026-01-14
33
+
34
+ ### Changed
35
+
36
+ - Version bump release
37
+
38
+ ## [0.9.0] - 2026-01-14
39
+
40
+ ### Changed
41
+
42
+ - Rewrote web UI with Preact for better interactivity
43
+ - Form now remembers the last search value
44
+ - Refactored internal code structure
45
+
46
+ ## [0.8.0] - 2026-01-14
47
+
48
+ ### Changed
49
+
50
+ - Downloader now caches headers per version, avoiding re-downloads
51
+
52
+ ## [0.7.0] - 2026-01-14
53
+
54
+ ### Added
55
+
56
+ - Added topics/categories display in search results
57
+ - Added links to source code in documentation output
58
+
59
+ ## [0.6.0] - 2026-01-14
60
+
61
+ ### Added
62
+
63
+ - New `cf_find_related` tool to find related functions, structs, and enums
64
+ - New `cf_member_search` tool to search struct/enum members
65
+ - New `cf_parameter_search` tool to search function parameters
66
+
67
+ ## [0.5.0] - 2026-01-14
68
+
69
+ ### Changed
70
+
71
+ - Search results now sorted by relevance score
72
+
73
+ ## [0.4.0] - 2026-01-14
74
+
75
+ ### Changed
76
+
77
+ - Extracted CSS and JavaScript assets to separate template files
78
+
79
+ ## [0.3.0] - 2026-01-14
80
+
81
+ ### Changed
82
+
83
+ - Improved tool output formatting for better readability
84
+
85
+ ## [0.2.0] - 2026-01-14
86
+
87
+ ### Added
88
+
89
+ - Tool explorer web interface for testing MCP tools interactively
90
+
91
+ ## [0.1.3] - 2026-01-14
92
+
93
+ ### Added
94
+
95
+ - Combined server mode (`cf-mcp combined`) with SSE, HTTP, and web UI
96
+ - Fly.io deployment configuration
97
+
98
+ ## [0.1.0] - 2026-01-14
99
+
100
+ ### Added
101
+
102
+ - Initial release
103
+ - MCP server with STDIO, HTTP, and SSE modes
104
+ - Header file parser for Cute Framework documentation
105
+ - In-memory search index with relevance scoring
106
+ - GitHub header downloader with `--download` flag
107
+ - Six MCP tools:
108
+ - `cf_search` - Search all documentation types
109
+ - `cf_search_functions` - Search functions
110
+ - `cf_search_structs` - Search structs
111
+ - `cf_search_enums` - Search enums
112
+ - `cf_list_category` - List items by category
113
+ - `cf_get_details` - Get full documentation by name
114
+
115
+ [0.10.0]: https://github.com/pusewicz/cf-mcp/compare/v0.9.3...v0.10.0
116
+ [0.9.3]: https://github.com/pusewicz/cf-mcp/compare/v0.9.2...v0.9.3
117
+ [0.9.2]: https://github.com/pusewicz/cf-mcp/compare/v0.9.1...v0.9.2
118
+ [0.9.1]: https://github.com/pusewicz/cf-mcp/compare/v0.9.0...v0.9.1
119
+ [0.9.0]: https://github.com/pusewicz/cf-mcp/compare/v0.8.0...v0.9.0
120
+ [0.8.0]: https://github.com/pusewicz/cf-mcp/compare/v0.7.0...v0.8.0
121
+ [0.7.0]: https://github.com/pusewicz/cf-mcp/compare/v0.6.0...v0.7.0
122
+ [0.6.0]: https://github.com/pusewicz/cf-mcp/compare/v0.5.0...v0.6.0
123
+ [0.5.0]: https://github.com/pusewicz/cf-mcp/compare/v0.4.0...v0.5.0
124
+ [0.4.0]: https://github.com/pusewicz/cf-mcp/compare/v0.3.0...v0.4.0
125
+ [0.3.0]: https://github.com/pusewicz/cf-mcp/compare/v0.2.0...v0.3.0
126
+ [0.2.0]: https://github.com/pusewicz/cf-mcp/compare/v0.1.3...v0.2.0
127
+ [0.1.3]: https://github.com/pusewicz/cf-mcp/compare/v0.1.0...v0.1.3
128
+ [0.1.0]: https://github.com/pusewicz/cf-mcp/releases/tag/v0.1.0
data/Manifest.txt CHANGED
@@ -1,3 +1,4 @@
1
+ CHANGELOG.md
1
2
  LICENSE.txt
2
3
  Manifest.txt
3
4
  README.md
data/Rakefile CHANGED
@@ -50,4 +50,4 @@ task "release:tag" => %i[test standard tag] do
50
50
  tag = "v#{CF::MCP::VERSION}"
51
51
  sh "git", "push", "origin", tag
52
52
  puts "Pushed #{tag} to origin"
53
- end
53
+ end
@@ -37,45 +37,62 @@ module CF
37
37
  def matches?(query)
38
38
  return true if query.nil? || query.empty?
39
39
 
40
- pattern = Regexp.new(Regexp.escape(query), Regexp::IGNORECASE)
41
- [name, brief, remarks, category].any? { |field| field&.match?(pattern) }
40
+ keywords = query.split(/\s+/).reject(&:empty?)
41
+ return true if keywords.empty?
42
+
43
+ keywords.any? do |keyword|
44
+ pattern = Regexp.new(Regexp.escape(keyword), Regexp::IGNORECASE)
45
+ [name, brief, remarks, category].any? { |field| field&.match?(pattern) }
46
+ end
42
47
  end
43
48
 
44
49
  # Returns a relevance score for ranking search results.
45
50
  # Higher scores indicate better matches.
51
+ # Supports multi-keyword queries - scores are summed across all keywords.
46
52
  def relevance_score(query)
47
53
  return 0 if query.nil? || query.empty?
48
54
 
55
+ keywords = query.split(/\s+/).reject(&:empty?)
56
+ return 0 if keywords.empty?
57
+
58
+ keywords.sum { |keyword| keyword_score(keyword) }
59
+ end
60
+
61
+ private
62
+
63
+ def keyword_score(keyword)
49
64
  score = 0
50
- query_downcase = query.downcase
65
+ keyword_downcase = keyword.downcase
51
66
  name_downcase = name&.downcase || ""
52
67
 
53
68
  # Exact name match (highest priority)
54
- if name_downcase == query_downcase
69
+ if name_downcase == keyword_downcase
55
70
  score += 1000
56
- # Name starts with query (prefix match)
57
- elsif name_downcase.start_with?(query_downcase)
71
+ # Name starts with keyword (prefix match)
72
+ elsif name_downcase.start_with?(keyword_downcase)
58
73
  score += 500
59
- # Name ends with query (suffix match, e.g., "make_app" matches "cf_make_app")
60
- elsif name_downcase.end_with?(query_downcase)
74
+ # Name ends with keyword (suffix match)
75
+ elsif name_downcase.end_with?(keyword_downcase)
61
76
  score += 400
62
- # Name contains query
63
- elsif name_downcase.include?(query_downcase)
77
+ # Name contains keyword
78
+ elsif name_downcase.include?(keyword_downcase)
64
79
  score += 100
65
80
  end
66
81
 
67
- # Brief contains query
68
- score += 50 if brief&.downcase&.include?(query_downcase)
82
+ # Brief contains keyword
83
+ score += 50 if brief&.downcase&.include?(keyword_downcase)
69
84
 
70
- # Category contains query
71
- score += 30 if category&.downcase&.include?(query_downcase)
85
+ # Category contains keyword
86
+ score += 30 if category&.downcase&.include?(keyword_downcase)
72
87
 
73
- # Remarks contains query
74
- score += 10 if remarks&.downcase&.include?(query_downcase)
88
+ # Remarks contains keyword
89
+ score += 10 if remarks&.downcase&.include?(keyword_downcase)
75
90
 
76
91
  score
77
92
  end
78
93
 
94
+ public
95
+
79
96
  def source_urls
80
97
  return nil unless source_file
81
98
  # Header file URLs (include/cute_xxx.h)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module CF
4
4
  module MCP
5
- VERSION = "0.9.2"
5
+ VERSION = "0.10.0"
6
6
  end
7
7
  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.9.2
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Usewicz
@@ -88,6 +88,7 @@ executables:
88
88
  extensions: []
89
89
  extra_rdoc_files: []
90
90
  files:
91
+ - CHANGELOG.md
91
92
  - LICENSE.txt
92
93
  - Manifest.txt
93
94
  - README.md