@dizzlkheinz/ynab-mcpb 0.17.0 → 0.18.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.
Files changed (182) hide show
  1. package/.env.example +33 -33
  2. package/.github/workflows/ci-tests.yml +45 -45
  3. package/.github/workflows/claude-code-review.yml +57 -57
  4. package/.github/workflows/claude.yml +50 -50
  5. package/.github/workflows/full-integration.yml +22 -22
  6. package/.github/workflows/publish.yml +12 -3
  7. package/.github/workflows/release.yml +2 -2
  8. package/CHANGELOG.md +10 -1
  9. package/CLAUDE.md +16 -12
  10. package/README.md +6 -1
  11. package/dist/bundle/index.cjs +49 -49
  12. package/dist/server/YNABMCPServer.d.ts +125 -54
  13. package/dist/server/YNABMCPServer.js +42 -11
  14. package/dist/server/cacheManager.js +6 -5
  15. package/dist/server/completions.d.ts +25 -0
  16. package/dist/server/completions.js +160 -0
  17. package/dist/server/config.d.ts +2 -2
  18. package/dist/server/errorHandler.js +1 -0
  19. package/dist/server/rateLimiter.js +3 -1
  20. package/dist/server/resources.d.ts +1 -0
  21. package/dist/server/resources.js +33 -16
  22. package/dist/server/securityMiddleware.d.ts +38 -8
  23. package/dist/server/securityMiddleware.js +1 -0
  24. package/dist/server/toolRegistry.d.ts +9 -0
  25. package/dist/server/toolRegistry.js +11 -0
  26. package/dist/tools/adapters.d.ts +3 -1
  27. package/dist/tools/adapters.js +1 -0
  28. package/dist/tools/reconciliation/executor.d.ts +2 -0
  29. package/dist/tools/reconciliation/executor.js +26 -1
  30. package/dist/tools/reconciliation/index.d.ts +3 -2
  31. package/dist/tools/reconciliation/index.js +4 -3
  32. package/dist/tools/schemas/outputs/index.d.ts +2 -2
  33. package/dist/tools/schemas/outputs/index.js +2 -2
  34. package/dist/tools/schemas/outputs/utilityOutputs.d.ts +0 -15
  35. package/dist/tools/schemas/outputs/utilityOutputs.js +0 -9
  36. package/dist/tools/utilityTools.d.ts +0 -7
  37. package/dist/tools/utilityTools.js +1 -50
  38. package/docs/maintainers/npm-publishing.md +27 -0
  39. package/docs/reference/API.md +83 -97
  40. package/docs/technical/reconciliation-system-architecture.md +2251 -2251
  41. package/package.json +6 -6
  42. package/scripts/analyze-bundle.mjs +41 -41
  43. package/scripts/generate-mcpb.ps1 +95 -95
  44. package/scripts/watch-and-restart.ps1 +49 -49
  45. package/src/__tests__/comprehensive.integration.test.ts +4 -32
  46. package/src/__tests__/performance.test.ts +5 -14
  47. package/src/__tests__/setup.ts +45 -14
  48. package/src/__tests__/smoke.e2e.test.ts +70 -0
  49. package/src/__tests__/testUtils.ts +2 -113
  50. package/src/server/YNABMCPServer.ts +64 -10
  51. package/src/server/__tests__/YNABMCPServer.test.ts +0 -1
  52. package/src/server/__tests__/completions.integration.test.ts +117 -0
  53. package/src/server/__tests__/completions.test.ts +319 -0
  54. package/src/server/__tests__/resources.template.test.ts +3 -3
  55. package/src/server/__tests__/resources.test.ts +3 -3
  56. package/src/server/__tests__/toolRegistration.test.ts +3 -3
  57. package/src/server/cacheManager.ts +7 -6
  58. package/src/server/completions.ts +279 -0
  59. package/src/server/errorHandler.ts +1 -0
  60. package/src/server/rateLimiter.ts +4 -1
  61. package/src/server/resources.ts +49 -13
  62. package/src/server/securityMiddleware.ts +1 -0
  63. package/src/server/toolRegistry.ts +42 -0
  64. package/src/tools/__tests__/transactionTools.integration.test.ts +63 -3
  65. package/src/tools/__tests__/utilityTools.integration.test.ts +1 -85
  66. package/src/tools/__tests__/utilityTools.test.ts +1 -123
  67. package/src/tools/adapters.ts +22 -1
  68. package/src/tools/reconciliation/__tests__/executor.progress.test.ts +462 -0
  69. package/src/tools/reconciliation/executor.ts +55 -1
  70. package/src/tools/reconciliation/index.ts +7 -3
  71. package/src/tools/schemas/outputs/index.ts +0 -3
  72. package/src/tools/schemas/outputs/utilityOutputs.ts +2 -43
  73. package/src/tools/toolCategories.ts +0 -1
  74. package/src/tools/utilityTools.ts +5 -76
  75. package/vitest.config.ts +4 -1
  76. package/.chunkhound.json +0 -11
  77. package/.code/agents/0098661e-0fa3-4990-beb9-c0cbf3f123aa/status.txt +0 -1
  78. package/.code/agents/01a13ef4-3f23-4f52-b33b-3585b73cfa60/error.txt +0 -3
  79. package/.code/agents/084fd32f-e298-4728-9103-a78d7dc39613/error.txt +0 -3
  80. package/.code/agents/0fed51e1-a943-4b97-a2a8-a6f0f27c844d/status.txt +0 -1
  81. package/.code/agents/1059b6bd-5ccd-4d83-a12c-7c9d89137399/error.txt +0 -5
  82. package/.code/agents/110/exec-call_F9BDNG7JfxKkq7Vc8ESAvdft.txt +0 -1569
  83. package/.code/agents/11ebcef3-b13f-4e44-ad80-d94a866804b7/error.txt +0 -3
  84. package/.code/agents/1324/exec-call_tIpx9uV1TpARbAMZonRQm8AO.txt +0 -757
  85. package/.code/agents/1398/exec-call_CjItcWMU1G6JoPshX62QvpaR.txt +0 -2832
  86. package/.code/agents/1398/exec-call_SUVq2ivmONQ5LMCmd7ngmOqr.txt +0 -2709
  87. package/.code/agents/1398/exec-call_SdNY4NOffdcC5pRYjVXHjPCK.txt +0 -2832
  88. package/.code/agents/1398/exec-call_qblJo9et1gsFFB63TtLOiji2.txt +0 -2832
  89. package/.code/agents/1398/exec-call_zaRrzlGz7GJcNzVfkAmML7Zg.txt +0 -2709
  90. package/.code/agents/1572/exec-call_GjVFBFOWcY7lE0idc5nWlLNh.txt +0 -781
  91. package/.code/agents/171834fd-5905-42fc-bbcc-2c755145b0fc/status.txt +0 -1
  92. package/.code/agents/1724/exec-call_HvHQe0w5CCG3T7Q3ULT6MO3g.txt +0 -5217
  93. package/.code/agents/1724/exec-call_QwUNESVzfxxk78K1frh1Vahb.txt +0 -2594
  94. package/.code/agents/1724/exec-call_aJ1Xwz71XmIpD4SBxSHERzLe.txt +0 -2594
  95. package/.code/agents/1846/exec-call_1YNAVD18RjrMN7JnfkkQhUP3.txt +0 -766
  96. package/.code/agents/1846/exec-call_lh3lDzE4WJAh1lFiomiiZ73D.txt +0 -766
  97. package/.code/agents/1d7d7ab7-7473-4b69-8b97-6e914f56056a/result.txt +0 -231
  98. package/.code/agents/2038/exec-call_DYwOukaYsL8VCONWmV2rUW5u.txt +0 -766
  99. package/.code/agents/2038/exec-call_c7fOQ7UrpVcTtvdfGBRM146V.txt +0 -652
  100. package/.code/agents/2038/exec-call_ySNyq9Mm55jWE480s54r5QcA.txt +0 -766
  101. package/.code/agents/210/exec-call_0tQCsKNJ1WTuIchb8wlcFJpW.txt +0 -2590
  102. package/.code/agents/210/exec-call_8ZlY9cUc8Ft1twi4ch8UJ6IN.txt +0 -5195
  103. package/.code/agents/2188/exec-call_5HqayBxIteJtoI8oPTiLWgvJ.txt +0 -286
  104. package/.code/agents/2188/exec-call_XRbBKBq3adZe6dcppAvQtM7G.txt +0 -218
  105. package/.code/agents/2188/exec-call_ehA0SjpYtrUi6GJXmibLjp4i.txt +0 -180
  106. package/.code/agents/21902821-ecaf-4759-bb9d-222b90921af5/error.txt +0 -3
  107. package/.code/agents/2256/exec-call_AtPcRWPmFPMcmX6qOFm1fCEY.txt +0 -766
  108. package/.code/agents/232073be-aa0e-46da-b478-5b64dbf03cf5/status.txt +0 -1
  109. package/.code/agents/234ff534-2336-4771-a8d9-aa04421a63be/result.txt +0 -747
  110. package/.code/agents/2454/exec-call_aFJpupwjfZeOBm7ixI5Vc8z2.txt +0 -766
  111. package/.code/agents/2454/exec-call_wogZ4HfXTodTEXvdgXlVUBpv.txt +0 -766
  112. package/.code/agents/253e2695-dc36-4022-b436-27655e0fc6c7/status.txt +0 -1
  113. package/.code/agents/2583/exec-call_M59I4eDjpjlBIWBiSxyS0YlJ.txt +0 -2594
  114. package/.code/agents/2583/exec-call_usLRGh7OhVHtsRBL4iUwRhjq.txt +0 -2594
  115. package/.code/agents/292aa3ff-dbab-470f-97c9-e7e8fd65e0db/result.txt +0 -144
  116. package/.code/agents/2e905864-aa07-4314-bcf9-c5b32277e4ac/result.txt +0 -36
  117. package/.code/agents/3073/exec-call_Peeagc9DxGYLgE6pNdMZhqIE.txt +0 -766
  118. package/.code/agents/3073/exec-call_d2YSE3hXF08KRSoUM3qd8Z3x.txt +0 -766
  119. package/.code/agents/3134/exec-call_IgCAMGx19lWfuo8zfYIt5FFC.txt +0 -416
  120. package/.code/agents/3134/exec-call_IxvLR2Oo7kba2QTsI1gHVko8.txt +0 -2590
  121. package/.code/agents/3134/exec-call_jYvc8hksZChSiysbzKjl2ZbB.txt +0 -2590
  122. package/.code/agents/329/exec-call_4QdP3SfSO7HGPCwVcqZIth6s.txt +0 -2590
  123. package/.code/agents/335aa031-466d-4fb7-925f-3cd864e264d0/result.txt +0 -191
  124. package/.code/agents/3364/exec-call_NbhIrsM5HhyDZDmJZG5CuCYL.txt +0 -766
  125. package/.code/agents/3364/exec-call_cKtJg0NrXiwXEFwlsE3uPZRA.txt +0 -766
  126. package/.code/agents/36d98414-5cde-4d9d-9a67-a240a18c1f07/result.txt +0 -189
  127. package/.code/agents/4604e866-b7b8-44f5-992f-2f683b0a523b/status.txt +0 -1
  128. package/.code/agents/472/exec-call_4AxzEEcWwkKhpqRB3bE8Ha4L.txt +0 -790
  129. package/.code/agents/472/exec-call_CB3LPYQA8QIZRi8I6kj4J17A.txt +0 -766
  130. package/.code/agents/472/exec-call_YeoUWvaFoktay2nqVUsa9KKX.txt +0 -790
  131. package/.code/agents/472/exec-call_jPWgKVquBBXTg0T3Lks5ZfkK.txt +0 -2594
  132. package/.code/agents/472/exec-call_qBkvunpGBDEHph2jPmTwtcsb.txt +0 -1000
  133. package/.code/agents/472/exec-call_v0ffRV1p0kTckBmJPzzHAEy0.txt +0 -3489
  134. package/.code/agents/472/exec-call_xAX5FXqWIlk02d9WubHbHWh8.txt +0 -766
  135. package/.code/agents/5346/exec-call_9q0muXUuLaucwEqI51Pt7idT.txt +0 -2594
  136. package/.code/agents/5346/exec-call_B2el3B79rVkq9LhWTI2VYlz7.txt +0 -2456
  137. package/.code/agents/5346/exec-call_BfX08f02qkZI9uJD5dvCvuoj.txt +0 -2594
  138. package/.code/agents/543328d0-61d6-4fd1-a723-bb168656e2e2/error.txt +0 -18
  139. package/.code/agents/5580c02c-1383-4d18-9cbd-cc8a06e3408d/result.txt +0 -48
  140. package/.code/agents/5f8dc01c-47b3-4163-b0b3-aa31be89fcdc/status.txt +0 -1
  141. package/.code/agents/60ce1a22-5126-44b2-b977-1d5b56142a7b/status.txt +0 -1
  142. package/.code/agents/6215d9db-7fa9-4429-aeec-3835c3212291/error.txt +0 -1
  143. package/.code/agents/6743db55-30e5-4b4e-9366-a8214fc7f714/error.txt +0 -1
  144. package/.code/agents/6bf9591b-b9c9-422c-b0a5-e968c7d8422a/status.txt +0 -1
  145. package/.code/agents/7/exec-call_HltHpkDox0Zm1vGEjdksUgpE.txt +0 -1120
  146. package/.code/agents/7/exec-call_LCATrOPPAgbxW9Q1z0XaVi2E.txt +0 -2646
  147. package/.code/agents/7/exec-call_W8DeRfNG9hvbgVFvf0clBf6R.txt +0 -2646
  148. package/.code/agents/7/exec-call_eww3GfdEiJZx61sJEQ9wNmt3.txt +0 -1271
  149. package/.code/agents/70/exec-call_owUtDMYiVgqDf8vsz1i32PFf.txt +0 -1570
  150. package/.code/agents/8/exec-call_UtrjAcLbhYLatxR4O97fZgnm.txt +0 -2590
  151. package/.code/agents/82490bc9-f34e-4b1b-8a8e-bccc2e6254f5/error.txt +0 -3
  152. package/.code/agents/841/exec-call_7nTNhSBCNjTDUIJv7py6CepO.txt +0 -3299
  153. package/.code/agents/841/exec-call_TLI0yUdUijuUAvI4o3DXEvHO.txt +0 -3299
  154. package/.code/agents/9/exec-call_XaABQT1hIlRpnKZ2uyBMWsTC.txt +0 -1882
  155. package/.code/agents/941/exec-call_GuGHRx7NNXWIDAnxUG2NEWPa.txt +0 -2594
  156. package/.code/agents/94a0ddf3-a304-4ec3-913e-3cceef509948/error.txt +0 -1
  157. package/.code/agents/95d9fbab-19a2-48af-83f9-c792566a347f/error.txt +0 -1
  158. package/.code/agents/b0098cb8-cb32-4ada-9bc4-37c587518896/result.txt +0 -170
  159. package/.code/agents/b4fe59a4-81df-42e2-a112-0153e504faca/error.txt +0 -1
  160. package/.code/agents/bf4ce152-f623-49d7-aa52-c18631625c3c/error.txt +0 -3
  161. package/.code/agents/d7d1db75-d7eb-468e-adea-4ef4d916d187/status.txt +0 -1
  162. package/.code/agents/e2baa9c8-bac3-49e3-a39d-024333e6a990/status.txt +0 -1
  163. package/.code/agents/e2c752b7-711d-423a-af57-f53c809deb84/result.txt +0 -160
  164. package/.code/agents/e350b8c3-8483-408c-b2bb-94515f492a11/error.txt +0 -3
  165. package/.code/agents/e63f9919-719f-4ad0-bccf-01b1a596e1e9/status.txt +0 -1
  166. package/.code/agents/e6601719-c31f-4a0e-8c71-d70787d0ab71/status.txt +0 -1
  167. package/.code/agents/e71695a8-3044-478d-8f12-ed13d02884c7/status.txt +0 -1
  168. package/.code/agents/f250b7ed-5bd5-4036-aa8c-ce63caee7d61/result.txt +0 -20
  169. package/.code/agents/f95b7464-3e25-4897-b153-c8dfd63fd605/error.txt +0 -5
  170. package/.code/agents/fa3c5ddf-cdf7-47a2-930a-b806c6363689/status.txt +0 -1
  171. package/AGENTS.md +0 -1
  172. package/NUL +0 -0
  173. package/package.json.tmp +0 -105
  174. package/src/__tests__/delta.performance.test.ts +0 -80
  175. package/src/__tests__/workflows.e2e.test.ts +0 -1702
  176. package/temp-recon.ts +0 -126
  177. package/test-exports/ynab_account_e9ddc2a6_minimal_1items_2025-11-19_09-04-53.json +0 -23
  178. package/test-exports/ynab_account_e9ddc2a6_minimal_1items_2025-11-19_10-37-42.json +0 -23
  179. package/test-exports/ynab_account_e9ddc2a6_minimal_4items_2025-11-19_09-02-09.json +0 -44
  180. package/test-exports/ynab_account_e9ddc2a6_minimal_6items_2025-11-19_10-37-52.json +0 -58
  181. package/test-exports/ynab_since_2025-10-16_account_53298e13_238items_2025-11-28_13-46-20.json +0 -3662
  182. package/test-exports/ynab_since_2025-11-01_account_4c18e9f0_minimal_14items_2025-11-16_10-07-10.json +0 -115
package/.env.example CHANGED
@@ -1,36 +1,36 @@
1
- # YNAB MCP Server Environment Configuration
2
- # Copy this file to .env and fill in your actual values
3
-
4
- # Required: Your YNAB Personal Access Token
5
- # Get this from: https://app.youneedabudget.com/settings/developer
6
- YNAB_ACCESS_TOKEN=your_ynab_personal_access_token_here
7
-
8
- # Optional: Node.js environment (development, production, test)
9
- NODE_ENV=development
10
-
11
- # Optional: Logging level (error, warn, info, debug)
12
- LOG_LEVEL=info
13
-
14
- # Output formatting controls
15
- # Minify JSON output returned by tools (default: true)
16
- YNAB_MCP_MINIFY_OUTPUT=true
17
- # Number of spaces when pretty printing (used when minify=false)
18
- YNAB_MCP_PRETTY_SPACES=2
19
-
20
- # Export settings
21
- # Directory where exported transaction files are saved
22
- # Default: Windows/Mac = ~/Downloads, Linux/Unix = ~/Documents (or $XDG_DOCUMENTS_DIR)
23
- # Examples: C:\Users\YourName\Desktop, /home/user/exports, ./data, ~/Desktop
24
- YNAB_EXPORT_PATH=
25
-
26
- # Cache configuration
27
- # Maximum number of entries in the in-memory cache (default: 1000)
28
- # Set to 0 to disable caching entirely
29
- YNAB_MCP_CACHE_MAX_ENTRIES=1000
30
-
31
- # Default time-to-live for cache entries in milliseconds (default: 300000 = 5 minutes)
32
- YNAB_MCP_CACHE_DEFAULT_TTL_MS=300000
33
-
1
+ # YNAB MCP Server Environment Configuration
2
+ # Copy this file to .env and fill in your actual values
3
+
4
+ # Required: Your YNAB Personal Access Token
5
+ # Get this from: https://app.youneedabudget.com/settings/developer
6
+ YNAB_ACCESS_TOKEN=your_ynab_personal_access_token_here
7
+
8
+ # Optional: Node.js environment (development, production, test)
9
+ NODE_ENV=development
10
+
11
+ # Optional: Logging level (error, warn, info, debug)
12
+ LOG_LEVEL=info
13
+
14
+ # Output formatting controls
15
+ # Minify JSON output returned by tools (default: true)
16
+ YNAB_MCP_MINIFY_OUTPUT=true
17
+ # Number of spaces when pretty printing (used when minify=false)
18
+ YNAB_MCP_PRETTY_SPACES=2
19
+
20
+ # Export settings
21
+ # Directory where exported transaction files are saved
22
+ # Default: Windows/Mac = ~/Downloads, Linux/Unix = ~/Documents (or $XDG_DOCUMENTS_DIR)
23
+ # Examples: C:\Users\YourName\Desktop, /home/user/exports, ./data, ~/Desktop
24
+ YNAB_EXPORT_PATH=
25
+
26
+ # Cache configuration
27
+ # Maximum number of entries in the in-memory cache (default: 1000)
28
+ # Set to 0 to disable caching entirely
29
+ YNAB_MCP_CACHE_MAX_ENTRIES=1000
30
+
31
+ # Default time-to-live for cache entries in milliseconds (default: 300000 = 5 minutes)
32
+ YNAB_MCP_CACHE_DEFAULT_TTL_MS=300000
33
+
34
34
  # Default stale-while-revalidate window in milliseconds (default: 120000 = 2 minutes)
35
35
  # Used when stale-while-revalidate is explicitly requested but not specified
36
36
  YNAB_MCP_CACHE_STALE_MS=120000
@@ -1,45 +1,45 @@
1
- name: CI Tests
2
-
3
- on:
4
- push:
5
- branches:
6
- - master
7
- pull_request:
8
-
9
- jobs:
10
- unit-tests:
11
- runs-on: ubuntu-latest
12
- steps:
13
- - uses: actions/checkout@v4
14
- - uses: actions/setup-node@v4
15
- with:
16
- node-version: 20
17
- cache: npm
18
- - name: Install dependencies
19
- run: npm ci
20
- - name: Run unit tests
21
- # Temporarily allow failures while DeltaFetcher architecture tests are updated
22
- # See: docs/plans/2025-11-15-cache-test-alignment.md
23
- continue-on-error: true
24
- run: npm run test:unit
25
-
26
- integration-core:
27
- runs-on: ubuntu-latest
28
- needs: unit-tests
29
- if: always()
30
- env:
31
- YNAB_ACCESS_TOKEN: ${{ secrets.YNAB_ACCESS_TOKEN }}
32
- steps:
33
- - uses: actions/checkout@v4
34
- - uses: actions/setup-node@v4
35
- with:
36
- node-version: 20
37
- cache: npm
38
- - name: Install dependencies
39
- run: npm ci
40
- - name: Run core integration tests (throttled)
41
- # Integration tests with real YNAB API may hit rate limits (200/hour)
42
- # causing 60-minute waits. Tests provide visibility but don't block merges.
43
- continue-on-error: true
44
- run: npm run test:integration:full
45
- timeout-minutes: 90
1
+ name: CI Tests
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ pull_request:
8
+
9
+ jobs:
10
+ unit-tests:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+ - uses: actions/setup-node@v6
15
+ with:
16
+ node-version: 24
17
+ cache: npm
18
+ - name: Install dependencies
19
+ run: npm ci
20
+ - name: Run unit tests
21
+ # Temporarily allow failures while DeltaFetcher architecture tests are updated
22
+ # See: docs/plans/2025-11-15-cache-test-alignment.md
23
+ continue-on-error: true
24
+ run: npm run test:unit
25
+
26
+ integration-core:
27
+ runs-on: ubuntu-latest
28
+ needs: unit-tests
29
+ if: always()
30
+ env:
31
+ YNAB_ACCESS_TOKEN: ${{ secrets.YNAB_ACCESS_TOKEN }}
32
+ steps:
33
+ - uses: actions/checkout@v4
34
+ - uses: actions/setup-node@v6
35
+ with:
36
+ node-version: 24
37
+ cache: npm
38
+ - name: Install dependencies
39
+ run: npm ci
40
+ - name: Run core integration tests (throttled)
41
+ # Integration tests with real YNAB API may hit rate limits (200/hour)
42
+ # causing 60-minute waits. Tests provide visibility but don't block merges.
43
+ continue-on-error: true
44
+ run: npm run test:integration:full
45
+ timeout-minutes: 90
@@ -1,57 +1,57 @@
1
- name: Claude Code Review
2
-
3
- on:
4
- pull_request:
5
- types: [opened, synchronize]
6
- # Optional: Only run on specific file changes
7
- # paths:
8
- # - "src/**/*.ts"
9
- # - "src/**/*.tsx"
10
- # - "src/**/*.js"
11
- # - "src/**/*.jsx"
12
-
13
- jobs:
14
- claude-review:
15
- # Optional: Filter by PR author
16
- # if: |
17
- # github.event.pull_request.user.login == 'external-contributor' ||
18
- # github.event.pull_request.user.login == 'new-developer' ||
19
- # github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'
20
-
21
- runs-on: ubuntu-latest
22
- permissions:
23
- contents: read
24
- pull-requests: read
25
- issues: read
26
- id-token: write
27
-
28
- steps:
29
- - name: Checkout repository
30
- uses: actions/checkout@v4
31
- with:
32
- fetch-depth: 1
33
-
34
- - name: Run Claude Code Review
35
- id: claude-review
36
- uses: anthropics/claude-code-action@v1
37
- with:
38
- claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
39
- prompt: |
40
- REPO: ${{ github.repository }}
41
- PR NUMBER: ${{ github.event.pull_request.number }}
42
-
43
- Please review this pull request and provide feedback on:
44
- - Code quality and best practices
45
- - Potential bugs or issues
46
- - Performance considerations
47
- - Security concerns
48
- - Test coverage
49
-
50
- Use the repository's CLAUDE.md for guidance on style and conventions. Be constructive and helpful in your feedback.
51
-
52
- Use `gh pr comment` with your Bash tool to leave your review as a comment on the PR.
53
-
54
- # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
55
- # or https://docs.claude.com/en/docs/claude-code/cli-reference for available options
56
- claude_args: '--allowed-tools "Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*)"'
57
-
1
+ name: Claude Code Review
2
+
3
+ on:
4
+ pull_request:
5
+ types: [opened, synchronize]
6
+ # Optional: Only run on specific file changes
7
+ # paths:
8
+ # - "src/**/*.ts"
9
+ # - "src/**/*.tsx"
10
+ # - "src/**/*.js"
11
+ # - "src/**/*.jsx"
12
+
13
+ jobs:
14
+ claude-review:
15
+ # Optional: Filter by PR author
16
+ # if: |
17
+ # github.event.pull_request.user.login == 'external-contributor' ||
18
+ # github.event.pull_request.user.login == 'new-developer' ||
19
+ # github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'
20
+
21
+ runs-on: ubuntu-latest
22
+ permissions:
23
+ contents: read
24
+ pull-requests: read
25
+ issues: read
26
+ id-token: write
27
+
28
+ steps:
29
+ - name: Checkout repository
30
+ uses: actions/checkout@v4
31
+ with:
32
+ fetch-depth: 1
33
+
34
+ - name: Run Claude Code Review
35
+ id: claude-review
36
+ uses: anthropics/claude-code-action@v1
37
+ with:
38
+ claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
39
+ prompt: |
40
+ REPO: ${{ github.repository }}
41
+ PR NUMBER: ${{ github.event.pull_request.number }}
42
+
43
+ Please review this pull request and provide feedback on:
44
+ - Code quality and best practices
45
+ - Potential bugs or issues
46
+ - Performance considerations
47
+ - Security concerns
48
+ - Test coverage
49
+
50
+ Use the repository's CLAUDE.md for guidance on style and conventions. Be constructive and helpful in your feedback.
51
+
52
+ Use `gh pr comment` with your Bash tool to leave your review as a comment on the PR.
53
+
54
+ # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
55
+ # or https://docs.claude.com/en/docs/claude-code/cli-reference for available options
56
+ claude_args: '--allowed-tools "Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*)"'
57
+
@@ -1,50 +1,50 @@
1
- name: Claude Code
2
-
3
- on:
4
- issue_comment:
5
- types: [created]
6
- pull_request_review_comment:
7
- types: [created]
8
- issues:
9
- types: [opened, assigned]
10
- pull_request_review:
11
- types: [submitted]
12
-
13
- jobs:
14
- claude:
15
- if: |
16
- (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
17
- (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
18
- (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
19
- (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
20
- runs-on: ubuntu-latest
21
- permissions:
22
- contents: read
23
- pull-requests: read
24
- issues: read
25
- id-token: write
26
- actions: read # Required for Claude to read CI results on PRs
27
- steps:
28
- - name: Checkout repository
29
- uses: actions/checkout@v4
30
- with:
31
- fetch-depth: 1
32
-
33
- - name: Run Claude Code
34
- id: claude
35
- uses: anthropics/claude-code-action@v1
36
- with:
37
- claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
38
-
39
- # This is an optional setting that allows Claude to read CI results on PRs
40
- additional_permissions: |
41
- actions: read
42
-
43
- # Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it.
44
- # prompt: 'Update the pull request description to include a summary of changes.'
45
-
46
- # Optional: Add claude_args to customize behavior and configuration
47
- # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
48
- # or https://docs.claude.com/en/docs/claude-code/cli-reference for available options
49
- # claude_args: '--allowed-tools Bash(gh pr:*)'
50
-
1
+ name: Claude Code
2
+
3
+ on:
4
+ issue_comment:
5
+ types: [created]
6
+ pull_request_review_comment:
7
+ types: [created]
8
+ issues:
9
+ types: [opened, assigned]
10
+ pull_request_review:
11
+ types: [submitted]
12
+
13
+ jobs:
14
+ claude:
15
+ if: |
16
+ (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
17
+ (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
18
+ (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
19
+ (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
20
+ runs-on: ubuntu-latest
21
+ permissions:
22
+ contents: read
23
+ pull-requests: read
24
+ issues: read
25
+ id-token: write
26
+ actions: read # Required for Claude to read CI results on PRs
27
+ steps:
28
+ - name: Checkout repository
29
+ uses: actions/checkout@v4
30
+ with:
31
+ fetch-depth: 1
32
+
33
+ - name: Run Claude Code
34
+ id: claude
35
+ uses: anthropics/claude-code-action@v1
36
+ with:
37
+ claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
38
+
39
+ # This is an optional setting that allows Claude to read CI results on PRs
40
+ additional_permissions: |
41
+ actions: read
42
+
43
+ # Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it.
44
+ # prompt: 'Update the pull request description to include a summary of changes.'
45
+
46
+ # Optional: Add claude_args to customize behavior and configuration
47
+ # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
48
+ # or https://docs.claude.com/en/docs/claude-code/cli-reference for available options
49
+ # claude_args: '--allowed-tools Bash(gh pr:*)'
50
+
@@ -1,22 +1,22 @@
1
- name: Full Integration Suite
2
-
3
- on:
4
- schedule:
5
- - cron: '0 2 * * *'
6
- workflow_dispatch:
7
-
8
- jobs:
9
- run-full-suite:
10
- runs-on: ubuntu-latest
11
- env:
12
- YNAB_ACCESS_TOKEN: ${{ secrets.YNAB_ACCESS_TOKEN }}
13
- steps:
14
- - uses: actions/checkout@v4
15
- - uses: actions/setup-node@v4
16
- with:
17
- node-version: 20
18
- cache: npm
19
- - name: Install dependencies
20
- run: npm ci
21
- - name: Run throttled full integration suite
22
- run: npm run test:integration:full
1
+ name: Full Integration Suite
2
+
3
+ on:
4
+ schedule:
5
+ - cron: '0 2 * * *'
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ run-full-suite:
10
+ runs-on: ubuntu-latest
11
+ env:
12
+ YNAB_ACCESS_TOKEN: ${{ secrets.YNAB_ACCESS_TOKEN }}
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ - uses: actions/setup-node@v6
16
+ with:
17
+ node-version: 24
18
+ cache: npm
19
+ - name: Install dependencies
20
+ run: npm ci
21
+ - name: Run throttled full integration suite
22
+ run: npm run test:integration:full
@@ -1,11 +1,18 @@
1
1
  name: Publish to npm
2
2
 
3
3
  on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ tag:
7
+ description: 'Tag or ref to publish (e.g., v0.17.0)'
8
+ required: true
4
9
  release:
5
10
  types: [published]
6
11
 
7
12
  jobs:
8
13
  publish:
14
+ # Required to satisfy npm Trusted Publisher matching (environment name left blank in npm)
15
+ environment: npm-publish
9
16
  runs-on: ubuntu-latest
10
17
  permissions:
11
18
  contents: read
@@ -14,11 +21,14 @@ jobs:
14
21
  YNAB_ACCESS_TOKEN: ${{ secrets.YNAB_ACCESS_TOKEN }}
15
22
  steps:
16
23
  - uses: actions/checkout@v4
24
+ with:
25
+ ref: ${{ inputs.tag || github.ref }}
17
26
 
18
- - uses: actions/setup-node@v4
27
+ - uses: actions/setup-node@v6
19
28
  with:
20
- node-version: 18
29
+ node-version: 24
21
30
  registry-url: https://registry.npmjs.org
31
+ scope: '@dizzlkheinz'
22
32
 
23
33
  - name: Install dependencies
24
34
  run: npm ci
@@ -28,6 +38,5 @@ jobs:
28
38
 
29
39
  - name: Publish to npm
30
40
  run: |
31
- echo "Using npm Trusted Publishing (OIDC)"
32
41
  npm run test:unit
33
42
  npm publish --provenance --access public
@@ -42,9 +42,9 @@ jobs:
42
42
  ref: ${{ inputs.ref }}
43
43
 
44
44
  - name: Setup Node.js
45
- uses: actions/setup-node@v4
45
+ uses: actions/setup-node@v6
46
46
  with:
47
- node-version: 18
47
+ node-version: 24
48
48
  cache: npm
49
49
 
50
50
  - name: Install dependencies (no scripts)
package/CHANGELOG.md CHANGED
@@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ### Added
11
+
12
+ - **MCP Completions** - Autocomplete support for budgets, accounts, categories, and payees
13
+ - Improves client-side UX for tools that accept IDs or names
14
+ - Uses cached data to keep suggestions responsive
15
+ - **Progress Notifications** - Long-running operations can emit MCP progress updates
16
+ - Reconciliation workflows now report progress during bulk create/update/unclear steps
17
+ - Clients can surface progress bars when providing a progress token
18
+
10
19
  ## [0.16.0] - 2025-12-01
11
20
 
12
21
  ### Added
@@ -160,7 +169,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
160
169
 
161
170
  ### Added
162
171
 
163
- - **Structured Output Schemas** - Zod-based output validation for all 30 tools
172
+ - **Structured Output Schemas** - Zod-based output validation for all tools
164
173
  - Output schemas in `src/tools/schemas/outputs/` with centralized exports
165
174
  - Automatic validation in ToolRegistry (toolRegistry.ts:401-483) using `z.safeParse()`
166
175
  - Type-safe responses with TypeScript inference
package/CLAUDE.md CHANGED
@@ -172,11 +172,14 @@ return cacheManager.wrap('cache_key', {
172
172
 
173
173
  Cache TTL constants are defined in `cacheManager.ts`:
174
174
 
175
- - `CACHE_TTLS.BUDGETS` - 1 hour (rarely changes)
176
- - `CACHE_TTLS.ACCOUNTS` - 30 minutes
177
- - `CACHE_TTLS.CATEGORIES` - 30 minutes
178
- - `CACHE_TTLS.SHORT` - 5 minutes (transactions)
179
- - `CACHE_TTLS.LONG` - 1 hour
175
+ - `CACHE_TTLS.BUDGETS` - 10 minutes (rarely changes)
176
+ - `CACHE_TTLS.ACCOUNTS` - 5 minutes
177
+ - `CACHE_TTLS.CATEGORIES` - 5 minutes
178
+ - `CACHE_TTLS.PAYEES` - 10 minutes
179
+ - `CACHE_TTLS.TRANSACTIONS` - 2 minutes
180
+ - `CACHE_TTLS.SCHEDULED_TRANSACTIONS` - 5 minutes
181
+ - `CACHE_TTLS.USER_INFO` - 30 minutes
182
+ - `CACHE_TTLS.MONTHS` - 5 minutes
180
183
 
181
184
  ### Delta Caching Pattern
182
185
 
@@ -286,12 +289,12 @@ The system defines 5 preset annotation patterns in `src/tools/toolCategories.ts`
286
289
  - Characteristics: Write operations, destructive, idempotent, external API
287
290
 
288
291
  - **UTILITY_LOCAL** - Local utility tools without external API calls
289
- - Examples: `convert_amount`, `clear_cache`, `diagnostic_info`
292
+ - Examples: `clear_cache`, `diagnostic_info`, `set_output_format`
290
293
  - Characteristics: Local operations, no external API dependencies
291
294
 
292
295
  ### Complete Tool Classification
293
296
 
294
- All 30 tools are classified into the following categories:
297
+ All 29 tools are classified into the following categories:
295
298
 
296
299
  **Read-Only External (15 tools):**
297
300
 
@@ -309,9 +312,9 @@ All 30 tools are classified into the following categories:
309
312
 
310
313
  - `delete_transaction` ⚠️
311
314
 
312
- **Utility Local (5 tools):**
315
+ **Utility Local (4 tools):**
313
316
 
314
- - `get_default_budget`, `convert_amount`, `diagnostic_info`, `clear_cache`, `set_output_format`
317
+ - `get_default_budget`, `diagnostic_info`, `clear_cache`, `set_output_format`
315
318
 
316
319
  ### Usage Example
317
320
 
@@ -387,7 +390,7 @@ Required:
387
390
  Optional (Caching):
388
391
 
389
392
  - `YNAB_MCP_CACHE_MAX_ENTRIES` (default: 1000)
390
- - `YNAB_MCP_CACHE_DEFAULT_TTL_MS` (default: 1800000 / 30 min)
393
+ - `YNAB_MCP_CACHE_DEFAULT_TTL_MS` (default: 300000 / 5 min)
391
394
  - `YNAB_MCP_CACHE_STALE_MS` (default: 120000 / 2 min)
392
395
 
393
396
  Optional (Output):
@@ -429,7 +432,8 @@ Strict mode enabled with extensive safety checks:
429
432
 
430
433
  1. Create Zod schema in appropriate tool file (e.g., `src/tools/myTools.ts`)
431
434
  2. Implement handler function following existing patterns
432
- 3. Register tool in `YNABMCPServer.ts` using `ToolRegistry`
435
+ 3. Register the tool in the appropriate domain factory (e.g., `registerBudgetTools` in
436
+ `src/tools/budgetTools.ts`) using `ToolRegistry`
433
437
  4. Add unit tests in `src/tools/__tests__/myTools.test.ts`
434
438
  5. Add integration tests in `src/tools/__tests__/myTools.integration.test.ts`
435
439
  6. Update API documentation in `docs/reference/API.md`
@@ -480,7 +484,7 @@ See `docs/technical/reconciliation-system-architecture.md` for detailed document
480
484
 
481
485
  - ✅ **Always do**: Run `npm test` before commits, use milliunits for YNAB amounts, follow existing patterns
482
486
  - ✅ **Always do**: Use `.js` extensions in imports, validate inputs with Zod schemas
483
- - ⚠️ **Ask first**: Adding new dependencies, changing API response formats, modifying cache TTLs
487
+ - ⚠️ **Ask first**: Adding new dependencies, changing API response formats, modifying cache TTLs (see `src/server/cacheManager.ts`)
484
488
  - 🚫 **Never do**: Commit `.env` or secrets, edit `dist/` or `node_modules/`, skip type checking
485
489
  - 🚫 **Never do**: Remove failing tests without fixing, use `any` type without justification
486
490
 
package/README.md CHANGED
@@ -162,7 +162,7 @@ For advanced configuration options (caching, output formatting), see the `.env.e
162
162
 
163
163
  ## What's Available
164
164
 
165
- The server gives Claude access to 30 tools organized by function. You don't need to know the tool names - just ask Claude in natural language and it will use the right tools.
165
+ The server gives Claude access to 29 tools organized by function. You don't need to know the tool names - just ask Claude in natural language and it will use the right tools.
166
166
 
167
167
  **Budget & Account Info**
168
168
 
@@ -190,6 +190,11 @@ The server gives Claude access to 30 tools organized by function. You don't need
190
190
 
191
191
  For the complete list with technical details, see the [API Reference](docs/reference/API.md).
192
192
 
193
+ ## MCP Client Features
194
+
195
+ - **Autocomplete (Completions)**: Clients that support MCP completions can suggest budgets, accounts, categories, and payees while filling tool arguments.
196
+ - **Progress Notifications**: Long-running operations (notably reconciliation) emit progress updates when the client provides a progress token.
197
+
193
198
  ## Need Help?
194
199
 
195
200
  - **[API Reference](docs/reference/API.md)** - Complete tool documentation