connectiq-mcp-server 1.0.3 → 1.1.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.
Files changed (74) hide show
  1. package/.claude/commands/commit.md +2 -3
  2. package/.claude/commands/create-pr.md +6 -6
  3. package/.mcp.json +15 -5
  4. package/.prettierignore +1 -0
  5. package/.serena/memories/code_style.md +64 -0
  6. package/.serena/memories/project_overview.md +71 -0
  7. package/.serena/memories/suggested_commands.md +59 -0
  8. package/.serena/memories/task_completion.md +56 -0
  9. package/.serena/project.yml +89 -0
  10. package/CHANGELOG.md +47 -0
  11. package/CLAUDE.md +7 -5
  12. package/README.md +122 -28
  13. package/build/config/ConfigManager.d.ts +62 -3
  14. package/build/config/ConfigManager.d.ts.map +1 -1
  15. package/build/config/ConfigManager.js +218 -28
  16. package/build/config/ConfigManager.js.map +1 -1
  17. package/build/handlers/promptHandlers.d.ts +3 -2
  18. package/build/handlers/promptHandlers.d.ts.map +1 -1
  19. package/build/handlers/promptHandlers.js +124 -80
  20. package/build/handlers/promptHandlers.js.map +1 -1
  21. package/build/handlers/resourceHandlers.d.ts +5 -4
  22. package/build/handlers/resourceHandlers.d.ts.map +1 -1
  23. package/build/handlers/resourceHandlers.js +34 -12
  24. package/build/handlers/resourceHandlers.js.map +1 -1
  25. package/build/handlers/toolHandlers.d.ts.map +1 -1
  26. package/build/handlers/toolHandlers.js +443 -111
  27. package/build/handlers/toolHandlers.js.map +1 -1
  28. package/build/index.js +17 -11
  29. package/build/index.js.map +1 -1
  30. package/build/parsers/XmlParser.d.ts +1 -0
  31. package/build/parsers/XmlParser.d.ts.map +1 -1
  32. package/build/parsers/XmlParser.js +82 -4
  33. package/build/parsers/XmlParser.js.map +1 -1
  34. package/build/services/ApiDocService.d.ts +35 -24
  35. package/build/services/ApiDocService.d.ts.map +1 -1
  36. package/build/services/ApiDocService.js +278 -182
  37. package/build/services/ApiDocService.js.map +1 -1
  38. package/build/services/DeviceInfoService.d.ts +7 -1
  39. package/build/services/DeviceInfoService.d.ts.map +1 -1
  40. package/build/services/DeviceInfoService.js +55 -21
  41. package/build/services/DeviceInfoService.js.map +1 -1
  42. package/build/services/ProjectInfoService.d.ts +9 -1
  43. package/build/services/ProjectInfoService.d.ts.map +1 -1
  44. package/build/services/ProjectInfoService.js +27 -14
  45. package/build/services/ProjectInfoService.js.map +1 -1
  46. package/build/services/SampleService.d.ts +37 -6
  47. package/build/services/SampleService.d.ts.map +1 -1
  48. package/build/services/SampleService.js +128 -95
  49. package/build/services/SampleService.js.map +1 -1
  50. package/build/types/index.d.ts +12 -0
  51. package/build/types/index.d.ts.map +1 -1
  52. package/build/utils/MarkdownConverter.js.map +1 -1
  53. package/mcp/github/.env.example +1 -0
  54. package/mcp/github/command.sh +20 -0
  55. package/package.json +5 -1
  56. package/server.json +7 -7
  57. package/src/config/ConfigManager.ts +279 -36
  58. package/src/handlers/promptHandlers.ts +169 -115
  59. package/src/handlers/resourceHandlers.ts +36 -8
  60. package/src/handlers/toolHandlers.ts +476 -124
  61. package/src/index.ts +26 -15
  62. package/src/parsers/XmlParser.ts +129 -9
  63. package/src/services/ApiDocService.ts +346 -241
  64. package/src/services/DeviceInfoService.ts +81 -19
  65. package/src/services/ProjectInfoService.ts +27 -17
  66. package/src/services/SampleService.ts +151 -91
  67. package/src/types/index.ts +13 -0
  68. package/src/utils/MarkdownConverter.ts +3 -3
  69. package/test/unit/config/ConfigManager.test.ts +511 -117
  70. package/test/unit/handlers/resourceHandlers.test.ts +18 -2
  71. package/test/unit/parsers/XmlParser.test.ts +25 -0
  72. package/test/unit/services/ApiDocService.test.ts +42 -9
  73. package/test/unit/services/DeviceInfoService.test.ts +63 -52
  74. package/test/unit/services/SampleService.test.ts +40 -31
@@ -10,9 +10,8 @@ description: Create a git commit
10
10
 
11
11
  ## Your task
12
12
 
13
- Based on the above changes, create a single git commit.
13
+ Based on the above changes, create a single conventional git commit.
14
14
 
15
15
  ## Common Notes
16
16
 
17
- - Do not add "Generated with [Claude Code]..." to the commit message.
18
- - Do not mention Claude as a co-author.
17
+ - Do not add "Generated with..." and "Co-authored-by..." to the commit message.
@@ -1,15 +1,16 @@
1
1
  ---
2
- allowed-tools: Bash(git log:*), Bash(gh pr list:*), Bash(gh issue list:*)
2
+ allowed-tools: Bash(git log:*), Bash(git remote get-url:*)
3
3
  description: Create a GitHub pull request with proper description and metadata
4
4
  ---
5
5
 
6
6
  ## Context
7
7
 
8
+ - Git origin url: !`git remote get-url origin`
8
9
  - Current git status: `mcp__git__git_status`
9
10
  - Commits ahead of main: !`git log --oneline main..HEAD`
10
11
  - Changed files: `mcp__git__git_diff` with target `main`
11
- - Existing open PRs: !`gh pr list --state open --limit 5`
12
- - Related issues that can be linked: !`gh issue list --limit 10`
12
+ - Existing open PRs: `mcp__github__list_pull_requests`
13
+ - Related issues that can be linked: `mcp__github__list_issues`
13
14
 
14
15
  ## Your task
15
16
 
@@ -27,7 +28,7 @@ Create a well-structured pull request with proper description, labels, and revie
27
28
  - List any breaking changes
28
29
 
29
30
  3. **Set up PR**
30
- - Create (or update if already exists) PR with descriptive title
31
+ - Create PR with descriptive title using `mcp__github__create_pull_request` (or `mcp__github__update_pull_request` if updating an existing PR)
31
32
  - Add appropriate labels
32
33
  - Assign reviewers
33
34
  - Link related issues
@@ -38,5 +39,4 @@ Create a well-structured pull request with proper description, labels, and revie
38
39
 
39
40
  ## Common Notes
40
41
 
41
- - Do not add "Generated with [Claude Code]..." to the PR description.
42
- - Do not mention Claude as a co-author.
42
+ - Do not add "Generated with..." and "Co-authored-by..." to the PR description.
package/.mcp.json CHANGED
@@ -14,13 +14,23 @@
14
14
  "type": "stdio",
15
15
  "command": "./mcp/github/command.sh"
16
16
  },
17
+ "serena": {
18
+ "type": "stdio",
19
+ "command": "uvx",
20
+ "args": [
21
+ "--from",
22
+ "git+https://github.com/oraios/serena",
23
+ "serena",
24
+ "start-mcp-server",
25
+ "--project",
26
+ ".",
27
+ "--context",
28
+ "claude-code"
29
+ ]
30
+ },
17
31
  "connectiq": {
18
32
  "command": "node",
19
- "args": ["build/index.js"],
20
- "env": {
21
- "CONNECTIQ_SDK_PATH": "/Users/eugenes/Library/Application Support/Garmin/ConnectIQ/Sdks/connectiq-sdk-mac-8.4.0-2025-12-03-5122605dc",
22
- "CONNECTIQ_DEVICES_PATH": "/Users/eugenes/Library/Application Support/Garmin/ConnectIQ/Devices"
23
- }
33
+ "args": ["build/index.js"]
24
34
  }
25
35
  }
26
36
  }
package/.prettierignore CHANGED
@@ -1,2 +1,3 @@
1
1
  node_modules/
2
2
  build/
3
+ .serena/memories/
@@ -0,0 +1,64 @@
1
+ # Code Style and Conventions
2
+
3
+ ## TypeScript Configuration
4
+ - **Target**: ES2022
5
+ - **Module**: NodeNext with NodeNext resolution
6
+ - **Strict mode**: Enabled
7
+ - **Source maps**: Yes
8
+ - **Declarations**: Yes (`.d.ts` files generated)
9
+
10
+ ## Prettier Settings
11
+ - **Semicolons**: Required
12
+ - **Quotes**: Double quotes (`"string"`)
13
+ - **Tab width**: 2 spaces
14
+ - **Tabs**: Spaces (no tabs)
15
+ - **Trailing commas**: ES5 style
16
+ - **Print width**: 80 characters
17
+
18
+ ## ESLint Rules
19
+ - TypeScript recommended rules
20
+ - Prettier integration (eslint-config-prettier)
21
+ - Unused variables: Error (prefix with `_` to ignore, e.g., `_unused`)
22
+ - Tests: `@typescript-eslint/no-explicit-any` disabled (mocking often requires `any`)
23
+
24
+ ## Naming Conventions
25
+ - **Files**: camelCase (e.g., `ApiDocService.ts`, `toolHandlers.ts`)
26
+ - **Classes**: PascalCase (e.g., `ApiDocService`, `ConfigManager`)
27
+ - **Interfaces**: PascalCase (e.g., `DeviceInfo`, `SearchResult`)
28
+ - **Functions**: camelCase (e.g., `registerTools`, `getModule`)
29
+ - **Constants**: SCREAMING_SNAKE_CASE for top-level constants (e.g., `FIELD_WEIGHTS`)
30
+ - **Variables**: camelCase
31
+
32
+ ## Type Definitions
33
+ - All shared types in `src/types/index.ts`
34
+ - Use interfaces for object shapes
35
+ - Use type aliases for unions/complex types
36
+ - Zod schemas for runtime validation (tool parameters)
37
+
38
+ ## Service Pattern
39
+ - Services are classes instantiated once in `src/index.ts`
40
+ - Constructor takes `ConnectIQConfig` for dependency injection
41
+ - Methods are async where file I/O is involved
42
+ - Use LRU caching for expensive operations
43
+
44
+ ## Testing Conventions
45
+ - Framework: Vitest
46
+ - Structure: `describe` blocks for grouping, `it` blocks for individual tests
47
+ - Mocking: `vi.mock()` for module mocking, `vi.fn()` for function mocks
48
+ - Fixtures: Shared fixtures in `test/fixtures/`
49
+ - Test file naming: `*.test.ts` in `test/unit/` mirroring `src/` structure
50
+
51
+ ## Documentation
52
+ - No excessive comments (code should be self-documenting)
53
+ - JSDoc only for complex or non-obvious APIs
54
+ - README.md for user-facing documentation
55
+
56
+ ## Error Handling
57
+ - Use try/catch with descriptive error messages
58
+ - Propagate errors with context (e.g., file paths)
59
+ - Log to stderr for server startup errors
60
+ - Use MCP logging for runtime errors
61
+
62
+ ## Commit Guidelines (from CLAUDE.md)
63
+ - Do NOT add "Generated with [Claude Code]..." to commit messages
64
+ - Do NOT mention Claude as a co-author
@@ -0,0 +1,71 @@
1
+ # Project Overview
2
+
3
+ ## Purpose
4
+ MCP (Model Context Protocol) server that provides Claude Desktop with access to Garmin ConnectIQ SDK documentation, device specifications, sample projects, and project configuration data.
5
+
6
+ ## Tech Stack
7
+ - **Language**: TypeScript (ES2022, NodeNext modules)
8
+ - **Runtime**: Node.js 18+
9
+ - **Build**: TypeScript compiler (`tsc`)
10
+ - **Testing**: Vitest with coverage support
11
+ - **Linting**: ESLint 9 with typescript-eslint
12
+ - **Formatting**: Prettier
13
+
14
+ ## Key Dependencies
15
+ - `@modelcontextprotocol/sdk` - MCP protocol SDK
16
+ - `cheerio` - HTML parsing for Toybox docs
17
+ - `fast-xml-parser` - XML parsing for SDK config files
18
+ - `lru-cache` - LRU caching for module docs
19
+ - `minisearch` - Full-text search indexing
20
+ - `turndown` - HTML to Markdown conversion
21
+ - `zod` - Schema validation for tool parameters
22
+
23
+ ## Architecture
24
+
25
+ **Entry Point**: `src/index.ts` - Creates MCP server, initializes config, registers handlers
26
+
27
+ **Directory Structure**:
28
+ ```
29
+ src/
30
+ ├── index.ts # Entry point, server setup
31
+ ├── config/
32
+ │ └── ConfigManager.ts # SDK path resolution (CLI → env → auto-detect)
33
+ ├── handlers/
34
+ │ ├── toolHandlers.ts # 6 MCP tools with Zod schemas
35
+ │ ├── resourceHandlers.ts # connectiq:// URI resources
36
+ │ └── promptHandlers.ts # 4 MCP prompts
37
+ ├── services/
38
+ │ ├── ApiDocService.ts # Toybox API doc parsing & search
39
+ │ ├── DeviceInfoService.ts # Device spec parsing
40
+ │ ├── SampleService.ts # SDK samples browsing
41
+ │ └── ProjectInfoService.ts # App types, permissions, sports
42
+ ├── parsers/
43
+ │ ├── HtmlParser.ts # Cheerio-based doc parsing
44
+ │ └── XmlParser.ts # fast-xml-parser wrapper
45
+ ├── types/
46
+ │ └── index.ts # Shared TypeScript interfaces
47
+ └── utils/
48
+ ├── logging.ts # MCP protocol logging
49
+ ├── AsyncFileCache.ts # Async file caching with TTL
50
+ └── MarkdownConverter.ts # Turndown-based conversion
51
+ ```
52
+
53
+ **Test Structure**:
54
+ ```
55
+ test/
56
+ ├── unit/ # Unit tests mirroring src/ structure
57
+ │ ├── config/
58
+ │ ├── handlers/
59
+ │ ├── parsers/
60
+ │ ├── services/
61
+ │ └── utils/
62
+ └── fixtures/ # Shared test fixtures
63
+ └── mockConfig.ts
64
+ ```
65
+
66
+ ## Key Patterns
67
+ - All tool parameters validated with Zod schemas (converted to JSON Schema for MCP)
68
+ - Services use LRU caching for performance (module docs, device list, sample list)
69
+ - Path traversal protection in sample file access via `resolve()` + `startsWith()` checks
70
+ - Dependency injection: services instantiated in index.ts, passed to handlers
71
+ - Error handling: try/catch with descriptive messages, console.error for config failures
@@ -0,0 +1,59 @@
1
+ # Suggested Commands
2
+
3
+ ## Development
4
+
5
+ ```bash
6
+ npm install # Install dependencies
7
+ npm run build # Compile TypeScript to build/
8
+ npm run dev # Watch mode compilation
9
+ npm run clean # Remove build/ and coverage/ directories
10
+ npm start # Run the server (requires SDK path)
11
+ ```
12
+
13
+ ## Testing
14
+
15
+ ```bash
16
+ npm test # Run all tests
17
+ npm run test:watch # Run tests in watch mode
18
+ npm run test:coverage # Run tests with coverage report
19
+
20
+ # Run a single test file
21
+ npx vitest run test/unit/services/ApiDocService.test.ts
22
+ ```
23
+
24
+ ## Code Quality
25
+
26
+ ```bash
27
+ npm run lint # Run ESLint
28
+ npm run lint:fix # Run ESLint with auto-fix
29
+ npm run format # Format code with Prettier
30
+ npm run format:check # Check formatting without changes
31
+ ```
32
+
33
+ ## Running the Server
34
+
35
+ The server auto-detects ConnectIQ SDK from OS defaults, or configure via:
36
+
37
+ ```bash
38
+ # Option 1: Auto-detect (uses current-sdk.cfg)
39
+ npx connectiq-mcp
40
+
41
+ # Option 2: Environment variables
42
+ CONNECTIQ_PATH="$HOME/Library/Application Support/Garmin/ConnectIQ" \
43
+ CONNECTIQ_VERSION=8.4 npx connectiq-mcp
44
+
45
+ # Option 3: CLI arguments
46
+ npx connectiq-mcp --connectiq-path="/path/to/ConnectIQ" --version=8.4
47
+ npx connectiq-mcp -c /path/to/ConnectIQ -v 8.4
48
+ ```
49
+
50
+ ## System Utilities (macOS/Darwin)
51
+
52
+ ```bash
53
+ git status # Check git status
54
+ git diff # View changes
55
+ git log --oneline # View commit history
56
+ ls -la # List files
57
+ find . -name "*.ts" # Find TypeScript files
58
+ grep -r "pattern" . # Search in files
59
+ ```
@@ -0,0 +1,56 @@
1
+ # Task Completion Checklist
2
+
3
+ When completing a task, run the following checks:
4
+
5
+ ## 1. Build Check
6
+ ```bash
7
+ npm run build
8
+ ```
9
+ Ensure TypeScript compiles without errors.
10
+
11
+ ## 2. Lint Check
12
+ ```bash
13
+ npm run lint
14
+ ```
15
+ Fix any linting errors. Auto-fix available:
16
+ ```bash
17
+ npm run lint:fix
18
+ ```
19
+
20
+ ## 3. Format Check
21
+ ```bash
22
+ npm run format:check
23
+ ```
24
+ If formatting issues found, fix with:
25
+ ```bash
26
+ npm run format
27
+ ```
28
+
29
+ ## 4. Run Tests
30
+ ```bash
31
+ npm test
32
+ ```
33
+ All tests must pass. For coverage report:
34
+ ```bash
35
+ npm run test:coverage
36
+ ```
37
+
38
+ ## 5. Manual Verification (if applicable)
39
+ If changes affect server behavior, test manually:
40
+ ```bash
41
+ npm start
42
+ # or with specific SDK path
43
+ npx connectiq-mcp -c /path/to/ConnectIQ
44
+ ```
45
+
46
+ ## Summary Command
47
+ Run all checks in sequence:
48
+ ```bash
49
+ npm run build && npm run lint && npm run format:check && npm test
50
+ ```
51
+
52
+ ## Before Committing
53
+ 1. Stage only relevant changes
54
+ 2. Write clear, descriptive commit message
55
+ 3. Do NOT include "Generated with Claude" or Claude co-author attribution
56
+ 4. Verify build/lint/test pass before pushing
@@ -0,0 +1,89 @@
1
+ # list of languages for which language servers are started; choose from:
2
+ # al bash clojure cpp csharp
3
+ # csharp_omnisharp dart elixir elm erlang
4
+ # fortran fsharp go groovy haskell
5
+ # java julia kotlin lua markdown
6
+ # matlab nix pascal perl php
7
+ # powershell python python_jedi r rego
8
+ # ruby ruby_solargraph rust scala swift
9
+ # terraform toml typescript typescript_vts vue
10
+ # yaml zig
11
+ # (This list may be outdated. For the current list, see values of Language enum here:
12
+ # https://github.com/oraios/serena/blob/main/src/solidlsp/ls_config.py
13
+ # For some languages, there are alternative language servers, e.g. csharp_omnisharp, ruby_solargraph.)
14
+ # Note:
15
+ # - For C, use cpp
16
+ # - For JavaScript, use typescript
17
+ # - For Free Pascal/Lazarus, use pascal
18
+ # Special requirements:
19
+ # - csharp: Requires the presence of a .sln file in the project folder.
20
+ # - pascal: Requires Free Pascal Compiler (fpc) and optionally Lazarus.
21
+ # When using multiple languages, the first language server that supports a given file will be used for that file.
22
+ # The first language is the default language and the respective language server will be used as a fallback.
23
+ # Note that when using the JetBrains backend, language servers are not used and this list is correspondingly ignored.
24
+ languages:
25
+ - typescript
26
+
27
+ # the encoding used by text files in the project
28
+ # For a list of possible encodings, see https://docs.python.org/3.11/library/codecs.html#standard-encodings
29
+ encoding: "utf-8"
30
+
31
+ # whether to use project's .gitignore files to ignore files
32
+ ignore_all_files_in_gitignore: true
33
+
34
+ # list of additional paths to ignore in all projects
35
+ # same syntax as gitignore, so you can use * and **
36
+ ignored_paths: []
37
+
38
+ # whether the project is in read-only mode
39
+ # If set to true, all editing tools will be disabled and attempts to use them will result in an error
40
+ # Added on 2025-04-18
41
+ read_only: false
42
+
43
+ # list of tool names to exclude. We recommend not excluding any tools, see the readme for more details.
44
+ # Below is the complete list of tools for convenience.
45
+ # To make sure you have the latest list of tools, and to view their descriptions,
46
+ # execute `uv run scripts/print_tool_overview.py`.
47
+ #
48
+ # * `activate_project`: Activates a project by name.
49
+ # * `check_onboarding_performed`: Checks whether project onboarding was already performed.
50
+ # * `create_text_file`: Creates/overwrites a file in the project directory.
51
+ # * `delete_lines`: Deletes a range of lines within a file.
52
+ # * `delete_memory`: Deletes a memory from Serena's project-specific memory store.
53
+ # * `execute_shell_command`: Executes a shell command.
54
+ # * `find_referencing_code_snippets`: Finds code snippets in which the symbol at the given location is referenced.
55
+ # * `find_referencing_symbols`: Finds symbols that reference the symbol at the given location (optionally filtered by type).
56
+ # * `find_symbol`: Performs a global (or local) search for symbols with/containing a given name/substring (optionally filtered by type).
57
+ # * `get_current_config`: Prints the current configuration of the agent, including the active and available projects, tools, contexts, and modes.
58
+ # * `get_symbols_overview`: Gets an overview of the top-level symbols defined in a given file.
59
+ # * `initial_instructions`: Gets the initial instructions for the current project.
60
+ # Should only be used in settings where the system prompt cannot be set,
61
+ # e.g. in clients you have no control over, like Claude Desktop.
62
+ # * `insert_after_symbol`: Inserts content after the end of the definition of a given symbol.
63
+ # * `insert_at_line`: Inserts content at a given line in a file.
64
+ # * `insert_before_symbol`: Inserts content before the beginning of the definition of a given symbol.
65
+ # * `list_dir`: Lists files and directories in the given directory (optionally with recursion).
66
+ # * `list_memories`: Lists memories in Serena's project-specific memory store.
67
+ # * `onboarding`: Performs onboarding (identifying the project structure and essential tasks, e.g. for testing or building).
68
+ # * `prepare_for_new_conversation`: Provides instructions for preparing for a new conversation (in order to continue with the necessary context).
69
+ # * `read_file`: Reads a file within the project directory.
70
+ # * `read_memory`: Reads the memory with the given name from Serena's project-specific memory store.
71
+ # * `remove_project`: Removes a project from the Serena configuration.
72
+ # * `replace_lines`: Replaces a range of lines within a file with new content.
73
+ # * `replace_symbol_body`: Replaces the full definition of a symbol.
74
+ # * `restart_language_server`: Restarts the language server, may be necessary when edits not through Serena happen.
75
+ # * `search_for_pattern`: Performs a search for a pattern in the project.
76
+ # * `summarize_changes`: Provides instructions for summarizing the changes made to the codebase.
77
+ # * `switch_modes`: Activates modes by providing a list of their names
78
+ # * `think_about_collected_information`: Thinking tool for pondering the completeness of collected information.
79
+ # * `think_about_task_adherence`: Thinking tool for determining whether the agent is still on track with the current task.
80
+ # * `think_about_whether_you_are_done`: Thinking tool for determining whether the task is truly completed.
81
+ # * `write_memory`: Writes a named memory (for future reference) to Serena's project-specific memory store.
82
+ excluded_tools: []
83
+
84
+ # initial prompt for the project. It will always be given to the LLM upon activating the project
85
+ # (contrary to the memories, which are loaded on demand).
86
+ initial_prompt: ""
87
+
88
+ project_name: "connect-iq-mcp"
89
+ included_optional_tools: []
package/CHANGELOG.md ADDED
@@ -0,0 +1,47 @@
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.0.0/)
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [1.1.0] - 2026-01-17
9
+
10
+ ### Changed
11
+
12
+ - Replace CONNECTIQ_SDK_PATH with CONNECTIQ_PATH environment variable (points to ConnectIQ root dir instead of SDK dir)
13
+ - Add CONNECTIQ_VERSION environment variable for optional SDK version selection
14
+ - Replace manual BM25 search implementation with MiniSearch library for improved search quality
15
+ - Migrate to readdirp for efficient recursive directory traversal
16
+
17
+ ### Added
18
+
19
+ - OS-specific auto-detection of ConnectIQ installation (macOS, Windows, Linux defaults)
20
+ - Auto-discover Devices/ folder from ConnectIQ root directory
21
+ - Read current-sdk.cfg for default SDK when no version specified
22
+ - Add SearchFilters type for type/deprecated/minApiLevel filtering
23
+ - Add tool output schemas and annotations in toolHandlers
24
+ - Add mime library for proper MIME type detection in SampleService
25
+
26
+ ## [1.0.3] - 2026-01-16
27
+
28
+ ### Fixed
29
+
30
+ - Fix authentication command for MCP Registry login
31
+
32
+ ## [1.0.2] - 2026-01-16
33
+
34
+ ### Fixed
35
+
36
+ - Fix mcp-publisher download URL in publish workflow
37
+
38
+ ## [1.0.1] - 2026-01-16
39
+
40
+ ### Added
41
+
42
+ - Add MCP Registry publishing workflow and server manifest
43
+ - Add MCP prompts, async file cache, and migrate to McpServer API
44
+ - Add comprehensive test suite and enhance device info support
45
+ - Add ESLint for TypeScript linting
46
+ - Add Prettier for code formatting
47
+ - Initial release with ConnectIQ SDK documentation support
package/CLAUDE.md CHANGED
@@ -28,9 +28,11 @@ npm run test:coverage # Run tests with coverage report
28
28
  npx vitest run test/unit/services/ApiDocService.test.ts
29
29
  ```
30
30
 
31
- The server requires the ConnectIQ SDK path via `CONNECTIQ_SDK_PATH` environment variable or `--sdk-path`/`-s` argument.
31
+ The server auto-detects the ConnectIQ SDK based on OS defaults, or can be configured via:
32
+ - `CONNECTIQ_PATH` environment variable or `--connectiq-path`/`-c` argument (ConnectIQ root directory)
33
+ - `CONNECTIQ_VERSION` environment variable or `--version`/`-v` argument (optional, e.g., "8.4")
32
34
 
33
- Optionally, set `CONNECTIQ_DEVICES_PATH` (or `--devices-path`/`-d`) for richer device data including fonts and display details.
35
+ If no version is specified, the server reads `current-sdk.cfg` to find the default SDK. The `Devices/` folder is automatically discovered for richer device data.
34
36
 
35
37
  ## Architecture
36
38
 
@@ -43,15 +45,15 @@ Optionally, set `CONNECTIQ_DEVICES_PATH` (or `--devices-path`/`-d`) for richer d
43
45
  - `resourceHandlers.ts` - Handles `connectiq://` URI resources
44
46
  - `promptHandlers.ts` - Registers 4 prompts (review-connectiq-code, explain-api, device-compatibility, optimize-memory)
45
47
  - `services/` - Business logic with caching
46
- - `ApiDocService.ts` - Parses Toybox API HTML docs, search with relevance scoring, LRU cache (50 modules, 5 min TTL)
47
- - `DeviceInfoService.ts` - Parses device XML from SDK `bin/devices/` directory
48
+ - `ApiDocService.ts` - Parses Toybox API HTML docs, MiniSearch full-text index with BM25+ scoring and fuzzy matching (built lazily on first search)
49
+ - `DeviceInfoService.ts` - Parses device data from SDK `resources/device-reference/` and optional `Devices/` folder
48
50
  - `SampleService.ts` - Browses SDK `samples/` directory with path traversal protection
49
51
  - `ProjectInfoService.ts` - Parses `bin/projectInfo.xml` for app types, permissions, sports
50
52
  - `parsers/` - Data extraction
51
53
  - `HtmlParser.ts` - Cheerio-based Toybox doc parsing
52
54
  - `XmlParser.ts` - fast-xml-parser wrapper for SDK config files
53
55
  - `types/index.ts` - Shared TypeScript interfaces
54
- - `utils/` - Shared utilities
56
+ - `utils/` - Shared utilities (barrel export in `index.ts`)
55
57
  - `logging.ts` - MCP protocol logging wrapper (sends logs to client as notifications)
56
58
  - `AsyncFileCache.ts` - Generic async file caching with TTL
57
59
  - `MarkdownConverter.ts` - Turndown-based HTML to Markdown conversion