fa-mcp-sdk 0.4.37 → 0.4.40

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.
package/README.md CHANGED
@@ -211,6 +211,7 @@ Note: The `dist/` directory (compiled JavaScript) is created after running `npm
211
211
  | `npm run generate-token` | Generate JWT tokens (Web UI) |
212
212
  | `node scripts/generate-jwt.js` | Generate JWT token (CLI) |
213
213
  | `/gen-jwt` | Generate JWT token (Claude Code skill) |
214
+ | `/upgrade-guide` | Generate upgrade guide for downstream projects (Claude Code skill) |
214
215
  | `npm run consul:unreg` | Deregister from Consul |
215
216
 
216
217
 
@@ -244,6 +245,23 @@ agentTester:
244
245
  The tester UI is available at `http://localhost:<port>/agent-tester` and auto-connects to the local MCP server.
245
246
  Supports custom LLM endpoints, configurable system prompts, and dynamic HTTP headers. Recommended model for testing: **gpt-5.2**.
246
247
 
248
+ ## Upgrade Guide Skill
249
+
250
+ Claude Code skill that generates a step-by-step upgrade guide for projects built on fa-mcp-sdk.
251
+ Analyzes git diff between two versions/commits and produces an MD file covering config changes, template file updates, script changes, API changes, and dependency updates.
252
+
253
+ **Usage in Claude Code:**
254
+ ```
255
+ /upgrade-guide 0.4.30 0.4.37
256
+ /upgrade-guide 0.4.30
257
+ /upgrade-guide abc1234
258
+ /upgrade-guide 0.4.30 0.4.37 на русском
259
+ ```
260
+
261
+ Output language is English by default. Add a natural-language hint (e.g., "на русском", "in German") to change it.
262
+
263
+ Skill location: `.claude/skills/upgrade-guide/SKILL.md`
264
+
247
265
  ## Directory Requirements
248
266
 
249
267
  - Use absolute paths for target directory
@@ -0,0 +1,306 @@
1
+ ---
2
+ name: upgrade-guide
3
+ description: "Generate a migration guide for upgrading fa-mcp-sdk to the latest version. Use when user asks to upgrade/update fa-mcp-sdk, mentions 'обновить sdk', 'upgrade sdk', 'migration guide', 'обновление fa-mcp-sdk', or wants to see what changed between SDK versions."
4
+ disable-model-invocation: true
5
+ allowed-tools: Bash(yarn *) Bash(npm *) Bash(node *) Bash(git *) Bash(cat *) Bash(diff *) Bash(ls *) Bash(find *) Bash(mkdir *) Read Write Glob Grep WebFetch Agent
6
+ argument-hint: "[from-version] [to-version] [language hint]"
7
+ ---
8
+
9
+ # FA-MCP-SDK Upgrade Guide Generator
10
+
11
+ Generate a comprehensive migration guide for upgrading the fa-mcp-sdk dependency in the current project.
12
+
13
+ ## Overview
14
+
15
+ This skill analyzes the differences between the currently installed version of `fa-mcp-sdk` and the latest (or specified) version, then produces a detailed migration guide as a markdown file.
16
+
17
+ ## Argument Parsing
18
+
19
+ Parse `$ARGUMENTS` to extract a target version and an optional language hint.
20
+
21
+ ### Language detection
22
+
23
+ Look for a natural-language phrase anywhere in the arguments that indicates the desired output language. Examples:
24
+ - "на русском", "по-русски", "in Russian", "ru" → Russian
25
+ - "in English", "en" → English
26
+ - Any similar phrase or ISO 639-1 code
27
+
28
+ Remove the language hint from the arguments before parsing the target version.
29
+
30
+ **Default: English** if no language hint is found.
31
+
32
+ The detected language determines ALL human-readable text in the generated guide (headings, descriptions, recommendations).
33
+ Technical content (file paths, YAML keys, code snippets, commands) stays as-is regardless of language.
34
+
35
+ ### Version/commit references
36
+
37
+ After stripping the language hint, the remaining arguments are version or commit references.
38
+
39
+ An argument is a **commit hash** if it contains 7+ hex characters and does not match semver pattern.
40
+ Otherwise it is treated as a **version** (with or without `v` prefix — `0.4.30` and `v0.4.30` are equivalent).
41
+
42
+ #### Scope of references: PROJECT (default) vs SDK
43
+
44
+ **By default, all versions and commit hashes refer to THIS project** (the repository where the skill is invoked), NOT to fa-mcp-sdk.
45
+
46
+ A reference is treated as referring to **fa-mcp-sdk** ONLY if the user's phrasing explicitly says so. Trigger phrases for SDK scope (case-insensitive, English or Russian):
47
+ - "sdk", "fa-mcp-sdk", "of sdk", "sdk commit", "sdk version"
48
+ - "sdk", "fa-mcp-sdk", "версия sdk", "комит sdk", "коммит sdk", "хеш sdk"
49
+
50
+ Examples:
51
+ - `/upgrade-guide 1.2.3 1.2.7` → project versions (look up which SDK version was used in each)
52
+ - `/upgrade-guide от версии 0.2.3 SDK до 0.4.5 SDK` → SDK versions directly
53
+ - `/upgrade-guide от комита sdk abc1234 до комита sdk def5678` → SDK commits directly
54
+ - `/upgrade-guide abc1234 def5678` → project commits (look up which SDK version was pinned in each)
55
+
56
+ #### Resolving PROJECT references to SDK versions
57
+
58
+ When a reference is PROJECT-scoped (the default), resolve it to an SDK version/commit before computing the diff:
59
+
60
+ 1. **Project commit hash** — run `git show <hash>:package.json` and extract the `fa-mcp-sdk` dependency value.
61
+ 2. **Project version** (e.g. `1.2.3`) — find the project git tag (`v1.2.3` or `1.2.3`), then `git show <tag>:package.json` and extract the `fa-mcp-sdk` value.
62
+ 3. If the dependency value is a semver (e.g. `^0.4.30`, `~0.4.30`, `0.4.30`), strip range operators to get the exact SDK version.
63
+ 4. If the dependency value is a git URL with a commit hash (e.g. `github:Bazilio-san/fa-mcp-sdk#abc1234`), extract the commit hash as the SDK ref.
64
+ 5. If the project tag/commit cannot be found, report an error and stop.
65
+
66
+ Show the user the resolution result before proceeding:
67
+ ```
68
+ Resolved project references to SDK:
69
+ FROM: project <ref> → SDK <version-or-commit>
70
+ TO: project <ref> → SDK <version-or-commit>
71
+ ```
72
+
73
+ #### Argument count
74
+
75
+ **Two arguments** — explicit FROM and TO.
76
+
77
+ **One argument** — FROM is the current installed SDK version (read from the project's current `package.json`), TO is the argument (resolved per scope rules above).
78
+
79
+ **No arguments** — FROM is the current installed SDK version, TO is the latest published SDK version.
80
+
81
+ ## Step 1: Determine SDK Versions
82
+
83
+ 1. Read the current project's `package.json` and extract the installed `fa-mcp-sdk` version — this is the **default FROM (SDK)**.
84
+ 2. Run `yarn info fa-mcp-sdk version` (or `npm view fa-mcp-sdk version`) to get the latest published version — this is the **default TO (SDK)**.
85
+ 3. Apply argument parsing rules above (scope, count) to determine FROM and TO.
86
+ 4. If any argument is PROJECT-scoped, resolve it to an SDK version/commit by reading the project's git history (see "Resolving PROJECT references to SDK versions").
87
+ 5. If FROM-SDK equals TO-SDK — inform the user (e.g. "Both project commits pin the same SDK version X.Y.Z — nothing to diff") and stop.
88
+
89
+ Display to the user:
90
+ ```
91
+ From: <project or SDK ref> → SDK <version-or-commit>
92
+ To: <project or SDK ref> → SDK <version-or-commit>
93
+ ```
94
+
95
+ ## Step 2: Upgrade the Dependency
96
+
97
+ If TO is a published version (not a commit hash), run:
98
+ ```bash
99
+ yarn add fa-mcp-sdk@<TO-version>
100
+ ```
101
+
102
+ If TO is a commit hash, run:
103
+ ```bash
104
+ yarn add fa-mcp-sdk@https://github.com/Bazilio-san/fa-mcp-sdk#<TO-commit>
105
+ ```
106
+
107
+ Wait for completion. If it fails, report the error and stop.
108
+
109
+ ## Step 3: Update SDK Documentation
110
+
111
+ Run:
112
+ ```bash
113
+ node ./node_modules/fa-mcp-sdk/scripts/update-doc.js
114
+ ```
115
+
116
+ This copies the latest `FA-MCP-SDK-DOC/` from the SDK into the project.
117
+
118
+ ## Step 4: Analyze Changes in SDK Between Versions
119
+
120
+ Use the public GitHub repository `https://github.com/Bazilio-san/fa-mcp-sdk` to analyze what changed.
121
+
122
+ ### 4.1 Get the commit log between versions
123
+
124
+ Fetch the GitHub compare URL to understand what changed:
125
+
126
+ ```
127
+ https://api.github.com/repos/Bazilio-san/fa-mcp-sdk/compare/<FROM-ref>...<TO-ref>
128
+ ```
129
+
130
+ Where `<FROM-ref>` and `<TO-ref>` are version tags (try both `v0.4.30` and `0.4.30` formats) or commit hashes.
131
+
132
+ If version tags don't exist, use the commits API to find commits between versions, or search `git log` for version bump commit messages.
133
+
134
+ Alternative approach — use the npm registry to get git metadata, or simply read the changelog if available.
135
+
136
+ ### 4.2 Analyze changes in config files
137
+
138
+ These config files in the SDK may have changed and require corresponding updates in the project:
139
+
140
+ - `config/default.yaml` — main configuration defaults
141
+ - `config/custom-environment-variables.yaml` — env var mappings
142
+ - `config/development.yaml` — dev overrides
143
+ - `config/production.yaml` — production overrides
144
+ - `config/local.yaml` — local secrets template
145
+
146
+ For each config file, compare the SDK's version (at `node_modules/fa-mcp-sdk/config/<file>`) with the project's version (at `config/<file>`).
147
+
148
+ Identify:
149
+ - **New keys** added in the SDK that are missing in the project
150
+ - **Removed keys** that existed in the old SDK but are gone now
151
+ - **Changed defaults** where the SDK's default value has changed
152
+ - **New sections** that represent new features
153
+
154
+ ### 4.3 Analyze changes in cli-template files
155
+
156
+ These directories in the SDK template may have changed:
157
+
158
+ - `node_modules/fa-mcp-sdk/cli-template/` — the project template
159
+
160
+ Compare template files with their project counterparts. Key files to check:
161
+
162
+ - `package.json` — new scripts, dependency changes
163
+ - `tsconfig.json` — compiler option changes
164
+ - `eslint.config.js` — linting rule changes
165
+ - `CLAUDE.md` — project instructions updates
166
+ - `deploy/` — deployment configuration changes
167
+ - `jest.config.js` — test configuration changes
168
+ - `.claude/skills/` — new or updated skills
169
+
170
+ ### 4.4 Analyze changes in scripts
171
+
172
+ Check `node_modules/fa-mcp-sdk/scripts/` for new or modified scripts that may need to be copied or adapted in the project.
173
+
174
+ ### 4.5 Analyze changes in core library exports
175
+
176
+ Read `node_modules/fa-mcp-sdk/dist/core/index.js` (or `.d.ts`) to identify:
177
+ - New exports that may be useful
178
+ - Removed/renamed exports that may break existing code
179
+ - Changed type signatures
180
+
181
+ ### 4.6 Check project code for breaking changes
182
+
183
+ Scan the project's `src/` directory for:
184
+ - Imports from `fa-mcp-sdk` that reference removed/renamed exports
185
+ - Usage of deprecated APIs
186
+ - Config keys that have been renamed or restructured
187
+
188
+ ## Step 5: Generate Migration Guide
189
+
190
+ Write ALL headings, descriptions, and prose in the detected language (default: English).
191
+ Technical content (file paths, YAML keys, code blocks, shell commands) is always in English.
192
+
193
+ Create a file `upgrade-guide-<old>-to-<new>.md` in the project root with the following structure:
194
+
195
+ ```markdown
196
+ # FA-MCP-SDK Migration Guide: v<old> -> v<new>
197
+
198
+ Generated: <timestamp>
199
+
200
+ ## Summary
201
+
202
+ <Brief overview of what changed and the scope of required updates>
203
+
204
+ ## Breaking Changes
205
+
206
+ <List any breaking changes that MUST be addressed. For each:>
207
+ - What changed
208
+ - What code/config is affected
209
+ - Exact fix with code snippets
210
+
211
+ ## Config Changes
212
+
213
+ ### New Configuration Keys
214
+
215
+ <For each new key, provide:>
216
+ - Key path (e.g., `webServer.adminAuth.type`)
217
+ - Default value
218
+ - Description
219
+ - Whether it needs to be added to the project's config
220
+
221
+ ### Changed Defaults
222
+
223
+ <Keys where default values changed>
224
+
225
+ ### Removed Keys
226
+
227
+ <Keys that were removed>
228
+
229
+ ### Recommended config/default.yaml additions
230
+
231
+ ```yaml
232
+ # Add these sections to your config/default.yaml:
233
+ <actual YAML snippets to add>
234
+ ```
235
+
236
+ ### Recommended config/custom-environment-variables.yaml additions
237
+
238
+ ```yaml
239
+ # Add these mappings:
240
+ <actual YAML snippets>
241
+ ```
242
+
243
+ ## Template File Changes
244
+
245
+ ### package.json
246
+
247
+ <New scripts, changed dependencies, etc.>
248
+
249
+ ### Other Template Files
250
+
251
+ <Changes in tsconfig.json, eslint.config.js, deploy/, etc.>
252
+
253
+ ## New Features
254
+
255
+ <New SDK features that the project can now use>
256
+
257
+ ## New/Updated Scripts
258
+
259
+ <Scripts that should be copied or updated>
260
+
261
+ ## Code Changes Required
262
+
263
+ <Specific code changes needed in the project's src/ files, with before/after examples>
264
+
265
+ ## Recommended Actions
266
+
267
+ <Ordered checklist of actions to complete the upgrade>
268
+
269
+ 1. [ ] ...
270
+ 2. [ ] ...
271
+ ```
272
+
273
+ ## Step 6: Assess Impact on the Project
274
+
275
+ After generating the guide, scan the current project's source code (`src/`, `config/`, `tests/`) to evaluate how the changes specifically affect THIS project. Add a section to the guide:
276
+
277
+ ```markdown
278
+ ## Impact Assessment for This Project
279
+
280
+ ### Affected Files
281
+
282
+ <List of project files that need modification, with specific changes>
283
+
284
+ ### Risk Level
285
+
286
+ <Low / Medium / High — based on the number and nature of breaking changes>
287
+
288
+ ### Estimated Effort
289
+
290
+ <Brief assessment of the work required>
291
+ ```
292
+
293
+ ## Step 7: Present Results
294
+
295
+ 1. Display a summary of the key findings to the user.
296
+ 2. Tell the user the full guide has been saved to `upgrade-guide-<old>-to-<new>.md`.
297
+ 3. Ask if they want you to apply any of the recommended changes automatically.
298
+
299
+ ## Important Rules
300
+
301
+ - ALWAYS read the actual files to compare — do not guess or assume what changed.
302
+ - When comparing YAML configs, preserve comments and structure.
303
+ - Do not modify project files other than `package.json` (via yarn add) and `FA-MCP-SDK-DOC/` (via update-doc.js) unless the user explicitly asks.
304
+ - The migration guide must contain ACTIONABLE instructions with exact code/config snippets — not vague recommendations.
305
+ - If GitHub API is unavailable or rate-limited, fall back to comparing files directly from `node_modules/fa-mcp-sdk/` against project files.
306
+ - Write the guide in the language detected from the user's arguments (default: **English**). Translate all headings, prose, and descriptions. Keep file paths, YAML keys, code blocks, and shell commands in English.
@@ -102,4 +102,21 @@ Add to `claude_desktop_config.json`:
102
102
  - **/sse** - Server-Sent Events
103
103
  - **/mcp** - JSON-RPC 2.0
104
104
 
105
+ ## Claude Code Skills
106
+
107
+ ### `/upgrade-guide`
108
+
109
+ Generates a migration guide for upgrading `fa-mcp-sdk` to the latest (or specified) version. Analyzes config changes, template diffs, new exports, and breaking changes, then saves a step-by-step guide to `upgrade-guide-<old>-to-<new>.md`.
110
+
111
+ By default versions and commit hashes refer to THIS project — the skill looks up which SDK version was used in each project commit/tag. To pass SDK references directly, mention "SDK" explicitly.
112
+
113
+ ```
114
+ /upgrade-guide # current SDK → latest SDK
115
+ /upgrade-guide 1.2.3 1.2.7 # project versions
116
+ /upgrade-guide abc1234 def5678 # project commits
117
+ /upgrade-guide от версии 0.4.30 SDK до 0.5.0 SDK # SDK versions directly
118
+ /upgrade-guide от комита sdk abc1234 до комита sdk def5678
119
+ /upgrade-guide 1.2.3 1.2.7 на русском
120
+ ```
121
+
105
122
  ## Security
@@ -50,7 +50,7 @@
50
50
  "dependencies": {
51
51
  "@modelcontextprotocol/sdk": "^1.29.0",
52
52
  "dotenv": "^17.4.1",
53
- "fa-mcp-sdk": "^0.4.37"
53
+ "fa-mcp-sdk": "^0.4.40"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@types/express": "^5.0.6",
@@ -1483,8 +1483,8 @@ textarea.prompt-modified {
1483
1483
  border: 1px solid var(--border);
1484
1484
  border-radius: var(--radius-lg);
1485
1485
  width: 100%;
1486
- max-width: 900px;
1487
- max-height: 85vh;
1486
+ max-width: 90vw;
1487
+ height: 90vh;
1488
1488
  display: flex;
1489
1489
  flex-direction: column;
1490
1490
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "fa-mcp-sdk",
3
3
  "productName": "FA MCP SDK",
4
- "version": "0.4.37",
4
+ "version": "0.4.40",
5
5
  "description": "Core infrastructure and templates for building Model Context Protocol (MCP) servers with TypeScript",
6
6
  "type": "module",
7
7
  "main": "dist/core/index.js",