fa-mcp-sdk 0.4.93 → 0.4.96

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 (33) hide show
  1. package/cli-template/.claude/skills/readme-generator/reference/satellite-templates.md +1 -1
  2. package/cli-template/.claude/skills/upgrade-sdk/SKILL.md +554 -0
  3. package/cli-template/CLAUDE.md +1 -1
  4. package/cli-template/FA-MCP-SDK-DOC/03-configuration.md +9 -5
  5. package/cli-template/FA-MCP-SDK-DOC/04-authentication.md +4 -4
  6. package/cli-template/FA-MCP-SDK-DOC/08-agent-tester-and-headless-api.md +1 -1
  7. package/cli-template/package.json +1 -1
  8. package/config/_local.yaml +13 -6
  9. package/config/custom-environment-variables.yaml +1 -0
  10. package/config/default.yaml +14 -6
  11. package/dist/core/_types_/config.d.ts +1 -0
  12. package/dist/core/_types_/config.d.ts.map +1 -1
  13. package/dist/core/auth/admin-auth.d.ts.map +1 -1
  14. package/dist/core/auth/admin-auth.js +9 -10
  15. package/dist/core/auth/admin-auth.js.map +1 -1
  16. package/dist/core/auth/jwt.d.ts +18 -9
  17. package/dist/core/auth/jwt.d.ts.map +1 -1
  18. package/dist/core/auth/jwt.js +185 -51
  19. package/dist/core/auth/jwt.js.map +1 -1
  20. package/dist/core/auth/multi-auth.d.ts +4 -2
  21. package/dist/core/auth/multi-auth.d.ts.map +1 -1
  22. package/dist/core/auth/multi-auth.js +43 -31
  23. package/dist/core/auth/multi-auth.js.map +1 -1
  24. package/dist/core/auth/revocation.d.ts +1 -0
  25. package/dist/core/auth/revocation.d.ts.map +1 -1
  26. package/dist/core/auth/revocation.js +9 -2
  27. package/dist/core/auth/revocation.js.map +1 -1
  28. package/dist/core/auth/types.d.ts +5 -0
  29. package/dist/core/auth/types.d.ts.map +1 -1
  30. package/package.json +6 -2
  31. package/scripts/generate-jwt.js +61 -35
  32. package/scripts/update-sdk.js +16 -0
  33. package/cli-template/.claude/skills/upgrade-guide/SKILL.md +0 -456
@@ -1,456 +0,0 @@
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 (resolved per scope rules above).
76
-
77
- **One argument** — it is treated as **FROM**; TO defaults to the **latest published fa-mcp-sdk version** (fetched via `yarn info fa-mcp-sdk version` / `npm view fa-mcp-sdk version`). The point is to upgrade to the newest existing SDK release.
78
-
79
- **Alternative TO=HEAD mode.** If the user explicitly says "to HEAD", "до HEAD", "до последнего коммита SDK", "to latest commit", "до master", or supplies the literal `HEAD`/`master` as the second argument, TO becomes the **tip of `master` on `Bazilio-san/fa-mcp-sdk`** (resolved via `https://api.github.com/repos/Bazilio-san/fa-mcp-sdk/commits/master`), not the latest **published** version. This is useful for diffing against unreleased commits. In this mode `yarn add` must use the git-URL form with the resolved commit hash (see Step 2).
80
-
81
- **No arguments** — FROM is the current installed SDK version (from the project's current `package.json`); TO is the latest published SDK version.
82
-
83
- ## Step 1: Determine SDK Versions
84
-
85
- 1. Read the current project's `package.json` and extract the installed `fa-mcp-sdk` version — this is the **default FROM (SDK)**.
86
- 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)**.
87
- 3. Apply argument parsing rules above (scope, count) to determine FROM and TO.
88
- 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").
89
- 5. **Validate that both SDK refs actually exist** before doing any diff work — fail fast with a clear message instead of letting a later GitHub API call return 404. For each of FROM-SDK and TO-SDK:
90
- - If it's a **version** (e.g. `0.4.30` / `v0.4.30`) — probe the GitHub tag endpoint:
91
- `https://api.github.com/repos/Bazilio-san/fa-mcp-sdk/git/refs/tags/v<version>` (also try without
92
- the `v` prefix). Fall back to `yarn info fa-mcp-sdk@<version> version` — if that also fails,
93
- report `Cannot resolve SDK version <X>: not found on GitHub or npm` and stop.
94
- - If it's a **commit hash** — probe `https://api.github.com/repos/Bazilio-san/fa-mcp-sdk/commits/<hash>`.
95
- If it returns 404, report `Cannot resolve SDK commit <hash>: not found in repo` and stop.
96
- - If GitHub API is rate-limited, fall back to `git ls-remote https://github.com/Bazilio-san/fa-mcp-sdk.git`
97
- for tag/branch existence, and skip commit-hash validation with a warning.
98
- 6. 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.
99
-
100
- Display to the user:
101
- ```
102
- From: <project or SDK ref> → SDK <version-or-commit> ✓ validated
103
- To: <project or SDK ref> → SDK <version-or-commit> ✓ validated
104
- ```
105
-
106
- ## Step 2: Upgrade the Dependency
107
-
108
- If TO is a published version (not a commit hash), run:
109
- ```bash
110
- yarn add fa-mcp-sdk@<TO-version>
111
- ```
112
-
113
- If TO is a commit hash, run:
114
- ```bash
115
- yarn add fa-mcp-sdk@https://github.com/Bazilio-san/fa-mcp-sdk#<TO-commit>
116
- ```
117
-
118
- Wait for completion. If it fails, report the error and stop.
119
-
120
- ## Step 3: Update SDK Documentation
121
-
122
- Run:
123
- ```bash
124
- node ./node_modules/fa-mcp-sdk/scripts/update-sdk.js
125
- ```
126
-
127
- This copies the latest `FA-MCP-SDK-DOC/` and `.claude/` from the SDK into the project.
128
-
129
- **Pinned folders.** Any folder under the project's `.claude/` that contains a direct file named
130
- `pin` is preserved as-is — the script neither deletes it nor overwrites it with template content.
131
- Drop a `pin` file into `.claude/skills/<your-skill>/` (or any other `.claude/` subdirectory) to
132
- protect local customizations from being reset on upgrade.
133
-
134
- ## Step 4: Analyze Changes in SDK Between Versions
135
-
136
- Use the public GitHub repository `https://github.com/Bazilio-san/fa-mcp-sdk` to analyze what changed.
137
-
138
- ### 4.1 Get the commit log between versions
139
-
140
- Fetch the GitHub compare URL to understand what changed:
141
-
142
- ```
143
- https://api.github.com/repos/Bazilio-san/fa-mcp-sdk/compare/<FROM-ref>...<TO-ref>
144
- ```
145
-
146
- Where `<FROM-ref>` and `<TO-ref>` are version tags (try both `v0.4.30` and `0.4.30` formats) or commit hashes.
147
-
148
- If version tags don't exist, use the commits API to find commits between versions, or search `git log` for version bump commit messages.
149
-
150
- Alternative approach — use the npm registry to get git metadata, or simply read the changelog if available.
151
-
152
- **Explicit commit-message review.** The compare endpoint returns a `commits[]` array — extract `commit.message` (subject + body) for **every** commit in the range, not just the file diffs. Commit messages capture the **why** of each change (motivation, fixed issue, design rationale) which is invisible from file diffs alone. In the generated guide, include a "Changelog" subsection that lists each commit's short hash + first line of its message in chronological order. Use these messages to:
153
- - Spot intent (e.g. "fix: ...", "BREAKING CHANGE: ...", "refactor: ...") — flag any conventional-commit BREAKING markers prominently in the Breaking Changes section.
154
- - Group related file changes under a single narrative ("These three files changed because of <reason from commit>").
155
- - Reach out for missing context: if a file diff is non-obvious and the commit message is terse, note it in the guide as "rationale unclear — check commit `<hash>` directly".
156
-
157
- If the compare API is rate-limited, fall back to fetching commits one page at a time via
158
- `https://api.github.com/repos/Bazilio-san/fa-mcp-sdk/commits?sha=<TO>&until=<TO-date>&since=<FROM-date>`.
159
-
160
- ### 4.2 Analyze changes in config files
161
-
162
- These config files in the SDK may have changed and require corresponding updates in the project:
163
-
164
- - `config/default.yaml` — main configuration defaults
165
- - `config/_local.yaml` — local config template (the CLI scaffolder copies this to the project's `config/_local.yaml` and derives `config/local.yaml` from it with `{{param}}` substitutions)
166
- - `config/custom-environment-variables.yaml` — env var mappings
167
- - `config/development.yaml` — dev overrides
168
- - `config/production.yaml` — production overrides
169
- - `config/local.yaml` (SDK's own) — reference only, not shipped to projects
170
-
171
- 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>`).
172
-
173
- Identify:
174
- - **New keys** added in the SDK that are missing in the project
175
- - **Removed keys** that existed in the old SDK but are gone now
176
- - **Changed defaults** where the SDK's default value has changed
177
- - **New sections** that represent new features
178
-
179
- **Correlate changes across config files.** When `config/default.yaml` has changes (new keys, restructured sections, changed defaults), you MUST also check `config/_local.yaml` for analogous changes. The `_local.yaml` file mirrors the structure of `default.yaml` but contains local-override values — if a section was added or restructured in `default.yaml`, the same section likely needs updating in `_local.yaml`.
180
-
181
- Compare both files in the SDK's `node_modules/fa-mcp-sdk/config/`:
182
- - `node_modules/fa-mcp-sdk/config/default.yaml` — the canonical defaults
183
- - `node_modules/fa-mcp-sdk/config/_local.yaml` — the template that was used to generate the project's `config/local.yaml`
184
-
185
- If `default.yaml` changed but `_local.yaml` did NOT, explicitly note this in the guide: the project's `config/_local.yaml` may still need manual updates to stay consistent with the new `default.yaml` structure.
186
-
187
- **Config file mapping (SDK source → project destination):**
188
-
189
- | SDK source (in `config/`) | Project destination | Action |
190
- |--------------------------------------|---------------------------------|--------|
191
- | `config/default.yaml` | `config/default.yaml` | Add new keys; do NOT remove existing keys the project may have customized |
192
- | `config/_local.yaml` | `config/_local.yaml` | Update to match SDK — this is the template users derive their `local.yaml` from |
193
- | `config/_local.yaml` (via CLI) | `config/local.yaml` | Derived by CLI from `_local.yaml` with `{{param}}` substitutions — check for needed adjustments |
194
- | `config/custom-environment-variables.yaml` | `config/custom-environment-variables.yaml` | Add new env var mappings |
195
- | `config/local.yaml` (SDK's own) | *(not shipped — reference only)* | Use as reference for what the SDK itself overrides locally |
196
-
197
- ### 4.3 Analyze changes in cli-template files
198
-
199
- The SDK ships a project template at `node_modules/fa-mcp-sdk/cli-template/` (after `yarn add fa-mcp-sdk@<TO>`). This is the **canonical source** for any template files in the project — when generating instructions for the user, always point to this path as the place to copy the latest version from.
200
-
201
- Map of template file → project file (the CLI `bin/fa-mcp.js` applies these transformations when creating new projects — upgrades must respect the same mapping):
202
-
203
- | Template (source of truth) | Project (destination) | Notes |
204
- |-------------------------------------------------------------------|---------------------------------------------|-------|
205
- | `node_modules/fa-mcp-sdk/cli-template/package.json` | `package.json` | **Merge carefully** — see rule below |
206
- | `node_modules/fa-mcp-sdk/cli-template/tsconfig.json` | `tsconfig.json` | overwrite (unless customized) |
207
- | `node_modules/fa-mcp-sdk/cli-template/.oxlintrc.json` | `.oxlintrc.json` | overwrite (unless customized) |
208
- | `node_modules/fa-mcp-sdk/cli-template/.oxfmtrc.json` | `.oxfmtrc.json` | overwrite (unless customized) |
209
- | `node_modules/fa-mcp-sdk/cli-template/CLAUDE.md` | `CLAUDE.md` | merge — project may add custom sections |
210
- | `node_modules/fa-mcp-sdk/cli-template/jest.config.js` | `jest.config.js` | overwrite (unless customized) |
211
- | `node_modules/fa-mcp-sdk/cli-template/deploy/` | `deploy/` | merge per file |
212
- | `node_modules/fa-mcp-sdk/cli-template/.claude/skills/<skill>/` | `.claude/skills/<skill>/` | overwrite unless locally customized |
213
- | `node_modules/fa-mcp-sdk/cli-template/r/<name>.xml` | `.run/<name>.run.xml` | **Renamed** — see rule below |
214
- | `node_modules/fa-mcp-sdk/cli-template/gitignore` | `.gitignore` | source has no leading dot |
215
- | `node_modules/fa-mcp-sdk/cli-template/FA-MCP-SDK-DOC/` | `FA-MCP-SDK-DOC/` | auto-updated by `update-sdk.js` |
216
-
217
- #### Rule: package.json — ADD ONLY new dependencies, do NOT touch anything else
218
-
219
- The project's `package.json` has evolved since generation (project-specific name, version, scripts, dependencies the team has added). When the SDK's template `package.json` changes:
220
-
221
- 1. Diff `node_modules/fa-mcp-sdk/cli-template/package.json` (TO) against the same file at the FROM version.
222
- 2. Identify ONLY dependencies/devDependencies that were **added** (not changed versions of existing ones, not removed).
223
- 3. The generated guide must instruct the user: "Add these NEW entries to your `package.json` `dependencies`/`devDependencies` sections. Do NOT touch any other field — name, version, scripts, existing deps stay as they are."
224
- 4. If a dep was **removed** from the template, mention it as informational only — do not instruct deletion from the project (it may still be in use).
225
- 5. Do NOT suggest overwriting `scripts`, `engines`, `type`, or any other field.
226
-
227
- Provide a copy-pasteable JSON snippet with only the new keys:
228
- ```json
229
- {
230
- "dependencies": {
231
- "<new-dep>": "<version>"
232
- }
233
- }
234
- ```
235
-
236
- #### Rule: `r/` → `.run/` with filename transformation
237
-
238
- The project has no `r/` directory — it was renamed to `.run/` at project generation, and each `<name>.xml` inside was
239
- renamed to `<name>.run.xml`. When the SDK template ships new or changed files in `cli-template/r/`:
240
-
241
- - Source: `node_modules/fa-mcp-sdk/cli-template/r/<name>.xml`
242
- - Destination: `.run/<name>.run.xml`
243
- - Action for NEW files: copy `<name>.xml` → `.run/<name>.run.xml`
244
- - Action for CHANGED files: copy with the same rename, overwriting the existing `.run.xml` file (warn the user to back up any customizations)
245
- - Action for REMOVED files: informational only — do not delete the project's `.run/<name>.run.xml` automatically
246
-
247
- The generated guide must show the exact source → destination mapping for each changed file, with the filename transformation applied.
248
-
249
- #### Rule: `.claude/skills/<skill>/SKILL.md`
250
-
251
- This is a Claude Code skill that the project owns a copy of. If the SDK ships an updated version, instruct the user to
252
- overwrite their local copy from `node_modules/fa-mcp-sdk/cli-template/.claude/skills/<skill>/SKILL.md` — unless they've
253
- customized it locally, in which case manual merge.
254
-
255
- For any other changed template file, the generated guide must include:
256
- - The exact source path under `node_modules/fa-mcp-sdk/cli-template/...`
257
- - The exact destination path in the project
258
- - Whether to **overwrite** or **merge carefully** (because the project may have local customizations)
259
-
260
- ### 4.4 Analyze changes in scripts
261
-
262
- The CLI copies scripts from `node_modules/fa-mcp-sdk/scripts/` (NOT from `cli-template/scripts/`) into the project's
263
- `scripts/` directory, and then removes `copy-static.js`, `publish.js`, `scripts/publish-README.md` (SDK-internal, not needed in downstream projects).
264
-
265
- - Canonical source: `node_modules/fa-mcp-sdk/scripts/<name>.js`
266
- - Project destination: `scripts/<name>.js`
267
- - Exclude from upgrade suggestions: `copy-static.js`, `publish.js`, `scripts/publish-README.md` (SDK-only)
268
-
269
- The generated guide must specify the exact source path under `node_modules/fa-mcp-sdk/scripts/...` for any script the
270
- user should copy into their project's `scripts/` directory, and skip the excluded SDK-only scripts.
271
-
272
- ### 4.5 Analyze changes in core library exports
273
-
274
- **Prefer the TypeScript source over the compiled output.** Fetch `src/core/index.ts` (and any
275
- re-exported `_types_/` files it references) at both FROM and TO via GitHub raw:
276
-
277
- ```
278
- https://raw.githubusercontent.com/Bazilio-san/fa-mcp-sdk/<FROM-ref>/src/core/index.ts
279
- https://raw.githubusercontent.com/Bazilio-san/fa-mcp-sdk/<TO-ref>/src/core/index.ts
280
- ```
281
-
282
- Compare them to identify:
283
- - New exports that may be useful
284
- - Removed/renamed exports that may break existing code
285
- - Changed type signatures
286
- - Type-level changes (generics, conditional types, union narrowing) that don't survive `.d.ts`
287
- emission cleanly
288
-
289
- Why source over `dist/`:
290
- - Original JSDoc comments and inline rationale are preserved in `.ts` but stripped/compressed in `dist/*.js`.
291
- - Renames are visible as renames in the source diff; in `dist/` they may appear as unrelated
292
- add+remove pairs because of import-order shuffling or minification.
293
- - TS `export *` chains resolve naturally in source; in `.d.ts` they may be flattened, hiding which
294
- module a symbol came from originally.
295
-
296
- **Fallback** — if GitHub raw is unavailable (rate-limited, network blocked), use
297
- `node_modules/fa-mcp-sdk/dist/core/index.js` and the matching `.d.ts`. State explicitly in the
298
- generated guide that the analysis was made from the compiled artifacts and recommend that the user
299
- double-check via the GitHub source viewer for any flagged change.
300
-
301
- ### 4.6 Check project code for breaking changes
302
-
303
- Scan the project's `src/` directory for:
304
- - Imports from `fa-mcp-sdk` that reference removed/renamed exports
305
- - Usage of deprecated APIs
306
- - Config keys that have been renamed or restructured
307
-
308
- ## Step 5: Generate Migration Guide
309
-
310
- Write ALL headings, descriptions, and prose in the detected language (default: English).
311
- Technical content (file paths, YAML keys, code blocks, shell commands) is always in English.
312
-
313
- Create a file `upgrade-guide-<old>-to-<new>.md` in the project root with the following structure:
314
-
315
- ```markdown
316
- # FA-MCP-SDK Migration Guide: v<old> -> v<new>
317
-
318
- Generated: <timestamp>
319
-
320
- ## Summary
321
-
322
- <Brief overview of what changed and the scope of required updates>
323
-
324
- ## Breaking Changes
325
-
326
- <List any breaking changes that MUST be addressed. For each:>
327
- - What changed
328
- - What code/config is affected
329
- - Exact fix with code snippets
330
-
331
- ## Config Changes
332
-
333
- ### New Configuration Keys
334
-
335
- <For each new key, provide:>
336
- - Key path (e.g., `webServer.auth.enabled`)
337
- - Default value
338
- - Description
339
- - Whether it needs to be added to the project's config
340
-
341
- ### Changed Defaults
342
-
343
- <Keys where default values changed>
344
-
345
- ### Removed Keys
346
-
347
- <Keys that were removed>
348
-
349
- ### Recommended config/default.yaml additions
350
-
351
- ```yaml
352
- # Add these sections to your config/default.yaml:
353
- <actual YAML snippets to add>
354
- ```
355
-
356
- ### config/_local.yaml
357
-
358
- <If `default.yaml` changed, check whether `_local.yaml` in the SDK also changed. If it did: describe what changed. If it did NOT but the `default.yaml` changes affect keys that also exist in `_local.yaml` (because `_local.yaml` overrides those keys), explicitly warn that the project's `config/_local.yaml` may need manual updates to stay consistent with the new `default.yaml` structure.>
359
-
360
- ### config/local.yaml (project-local overrides)
361
-
362
- <Check whether the project's `config/local.yaml` overrides keys that changed in `default.yaml` or `_local.yaml`. This is especially important when: a new key is added to `default.yaml` that the project's `local.yaml` doesn't override (user just needs to know it exists); a key's meaning or structure changed and `local.yaml` has a stale override; `local.yaml` was derived from the old `_local.yaml` and needs re-derivation from the updated template.>
363
-
364
- ### Recommended config/custom-environment-variables.yaml additions
365
-
366
- ```yaml
367
- # Add these mappings:
368
- <actual YAML snippets>
369
- ```
370
-
371
- ## Template File Changes
372
-
373
- > **Source of truth**: all updated template files live under `node_modules/fa-mcp-sdk/cli-template/` (after `yarn add fa-mcp-sdk@<TO>`). Copy from there into the project.
374
-
375
- ### package.json
376
-
377
- > **Only ADD new dependencies. Do NOT touch anything else** (name, version, scripts, existing deps — all stay untouched). Source: `node_modules/fa-mcp-sdk/cli-template/package.json`.
378
-
379
- <List only dependencies/devDependencies that were newly added in the SDK template. Provide a copy-pasteable JSON snippet
380
- with only the new keys. Mention removed deps as informational only — do not instruct deletion.>
381
-
382
- ### `.run/` (from `cli-template/r/`)
383
-
384
- <For each changed `cli-template/r/<name>.xml`, show the mapping:>
385
- - Source: `node_modules/fa-mcp-sdk/cli-template/r/<name>.xml`
386
- - Destination: `.run/<name>.run.xml` (note the rename)
387
- - Action: copy + rename (overwrite, warn about local customizations)
388
-
389
- ### Claude Code Skills (`.claude/skills/`)
390
-
391
- <For each updated skill, e.g. `upgrade-guide`:>
392
- - Source: `node_modules/fa-mcp-sdk/cli-template/.claude/skills/<skill-name>/SKILL.md`
393
- - Destination: `.claude/skills/<skill-name>/SKILL.md`
394
- - Action: overwrite (unless locally customized — then manual merge)
395
-
396
- ### Other Template Files
397
-
398
- <For each: source path under `node_modules/fa-mcp-sdk/cli-template/...`, destination, overwrite or merge.>
399
-
400
- ## New Features
401
-
402
- <New SDK features that the project can now use>
403
-
404
- ## New/Updated Scripts
405
-
406
- <Scripts that should be copied or updated>
407
-
408
- ## Code Changes Required
409
-
410
- <Specific code changes needed in the project's src/ files, with before/after examples>
411
-
412
- ## Recommended Actions
413
-
414
- <Ordered checklist of actions to complete the upgrade>
415
-
416
- 1. [ ] ...
417
- 2. [ ] ...
418
- ```
419
-
420
- ## Step 6: Assess Impact on the Project
421
-
422
- After generating the guide, scan the current project's source code (`src/`, `config/`, `tests/`) to evaluate how the
423
- changes specifically affect THIS project. Add a section to the guide:
424
-
425
- ```markdown
426
- ## Impact Assessment for This Project
427
-
428
- ### Affected Files
429
-
430
- <List of project files that need modification, with specific changes>
431
-
432
- ### Risk Level
433
-
434
- <Low / Medium / High — based on the number and nature of breaking changes>
435
-
436
- ### Estimated Effort
437
-
438
- <Brief assessment of the work required>
439
- ```
440
-
441
- ## Step 7: Present Results
442
-
443
- 1. Display a summary of the key findings to the user.
444
- 2. Tell the user the full guide has been saved to `upgrade-guide-<old>-to-<new>.md`.
445
- 3. Ask if they want you to apply any of the recommended changes automatically.
446
-
447
- ## Important Rules
448
-
449
- - ALWAYS read the actual files to compare — do not guess or assume what changed.
450
- - When comparing YAML configs, preserve comments and structure.
451
- - **Correlate config file changes**: when `config/default.yaml` changes, ALWAYS also check `config/_local.yaml` in the SDK. Report whether `_local.yaml` has analogous changes or needs manual updates. Also advise checking the project's `config/local.yaml` for stale overrides that may conflict with the new defaults.
452
- - **Do not forget `config/local.yaml` in the project**: the project's `config/local.yaml` overrides `config/default.yaml`. When new keys are added or sections restructured in `default.yaml`, explicitly instruct the user to verify that their `config/local.yaml` doesn't have stale overrides that conflict with the new structure, and to add any new keys there too if they want non-default values.
453
- - Do not modify project files other than `package.json` (via yarn add) and `FA-MCP-SDK-DOC/` (via update-sdk.js) unless the user explicitly asks.
454
- - The migration guide must contain ACTIONABLE instructions with exact code/config snippets — not vague recommendations.
455
- - If GitHub API is unavailable or rate-limited, fall back to comparing files directly from `node_modules/fa-mcp-sdk/` against project files.
456
- - 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.