fa-mcp-sdk 0.4.39 → 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.
@@ -39,27 +39,57 @@ After stripping the language hint, the remaining arguments are version or commit
39
39
  An argument is a **commit hash** if it contains 7+ hex characters and does not match semver pattern.
40
40
  Otherwise it is treated as a **version** (with or without `v` prefix — `0.4.30` and `v0.4.30` are equivalent).
41
41
 
42
- **Two arguments** explicit FROM and TO:
43
- - `/upgrade-guide 0.4.30 0.4.37` — from version 0.4.30 to 0.4.37
44
- - `/upgrade-guide abc1234 def5678` — from commit to commit
42
+ #### Scope of references: PROJECT (default) vs SDK
45
43
 
46
- **One argument** FROM is the current installed version, TO is the argument:
47
- - `/upgrade-guide 0.5.0` — upgrade from current to 0.5.0
48
- - `/upgrade-guide abc1234` — upgrade from current to that commit
44
+ **By default, all versions and commit hashes refer to THIS project** (the repository where the skill is invoked), NOT to fa-mcp-sdk.
49
45
 
50
- **No arguments** FROM is the current installed version, TO is the latest published version.
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"
51
49
 
52
- ## Step 1: Determine Versions
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)
53
55
 
54
- 1. Read the current project's `package.json` and extract the installed `fa-mcp-sdk` version — this is the **default FROM**.
55
- 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**.
56
- 3. Apply argument parsing rules above to determine the actual FROM and TO.
57
- 4. If FROM equals TO — inform the user and stop.
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.
58
88
 
59
89
  Display to the user:
60
90
  ```
61
- From: X.Y.Z (or commit hash)
62
- To: A.B.C (or commit hash)
91
+ From: <project or SDK ref> → SDK <version-or-commit>
92
+ To: <project or SDK ref> → SDK <version-or-commit>
63
93
  ```
64
94
 
65
95
  ## Step 2: Upgrade the Dependency
@@ -108,12 +108,15 @@ Add to `claude_desktop_config.json`:
108
108
 
109
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
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
+
111
113
  ```
112
- /upgrade-guide # current → latest
113
- /upgrade-guide 0.5.0 # current → 0.5.0
114
- /upgrade-guide 0.4.30 0.5.0 # 0.4.30 → 0.5.0
115
- /upgrade-guide abc1234 def5678 # commit commit
116
- /upgrade-guide 0.4.30 0.5.0 на русском
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 на русском
117
120
  ```
118
121
 
119
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.39"
53
+ "fa-mcp-sdk": "^0.4.40"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@types/express": "^5.0.6",
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.39",
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",