@dizzlkheinz/ynab-mcpb 0.17.1 → 0.18.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 (56) hide show
  1. package/.github/workflows/ci-tests.yml +4 -4
  2. package/.github/workflows/full-integration.yml +2 -2
  3. package/.github/workflows/publish.yml +1 -1
  4. package/.github/workflows/release.yml +2 -2
  5. package/CHANGELOG.md +12 -1
  6. package/CLAUDE.md +10 -7
  7. package/README.md +6 -1
  8. package/dist/bundle/index.cjs +52 -52
  9. package/dist/server/YNABMCPServer.d.ts +7 -2
  10. package/dist/server/YNABMCPServer.js +42 -11
  11. package/dist/server/cacheManager.js +6 -5
  12. package/dist/server/completions.d.ts +25 -0
  13. package/dist/server/completions.js +160 -0
  14. package/dist/server/config.d.ts +2 -2
  15. package/dist/server/errorHandler.js +1 -0
  16. package/dist/server/rateLimiter.js +3 -1
  17. package/dist/server/resources.d.ts +1 -0
  18. package/dist/server/resources.js +33 -16
  19. package/dist/server/securityMiddleware.d.ts +2 -1
  20. package/dist/server/securityMiddleware.js +1 -0
  21. package/dist/server/toolRegistry.d.ts +9 -0
  22. package/dist/server/toolRegistry.js +11 -0
  23. package/dist/tools/adapters.d.ts +3 -1
  24. package/dist/tools/adapters.js +1 -0
  25. package/dist/tools/reconciliation/executor.d.ts +2 -0
  26. package/dist/tools/reconciliation/executor.js +26 -9
  27. package/dist/tools/reconciliation/index.d.ts +3 -2
  28. package/dist/tools/reconciliation/index.js +4 -3
  29. package/docs/reference/API.md +68 -27
  30. package/package.json +2 -2
  31. package/src/__tests__/comprehensive.integration.test.ts +4 -4
  32. package/src/__tests__/performance.test.ts +1 -2
  33. package/src/__tests__/smoke.e2e.test.ts +70 -0
  34. package/src/__tests__/testUtils.ts +2 -113
  35. package/src/server/YNABMCPServer.ts +64 -10
  36. package/src/server/__tests__/completions.integration.test.ts +117 -0
  37. package/src/server/__tests__/completions.test.ts +319 -0
  38. package/src/server/__tests__/resources.template.test.ts +3 -3
  39. package/src/server/__tests__/resources.test.ts +3 -3
  40. package/src/server/__tests__/toolRegistration.test.ts +1 -1
  41. package/src/server/cacheManager.ts +7 -6
  42. package/src/server/completions.ts +279 -0
  43. package/src/server/errorHandler.ts +1 -0
  44. package/src/server/rateLimiter.ts +4 -1
  45. package/src/server/resources.ts +49 -13
  46. package/src/server/securityMiddleware.ts +1 -0
  47. package/src/server/toolRegistry.ts +42 -0
  48. package/src/tools/adapters.ts +22 -1
  49. package/src/tools/reconciliation/__tests__/executor.integration.test.ts +12 -26
  50. package/src/tools/reconciliation/__tests__/executor.progress.test.ts +462 -0
  51. package/src/tools/reconciliation/__tests__/executor.test.ts +36 -31
  52. package/src/tools/reconciliation/executor.ts +56 -27
  53. package/src/tools/reconciliation/index.ts +7 -3
  54. package/vitest.config.ts +2 -0
  55. package/src/__tests__/delta.performance.test.ts +0 -80
  56. package/src/__tests__/workflows.e2e.test.ts +0 -1658
@@ -11,9 +11,9 @@ jobs:
11
11
  runs-on: ubuntu-latest
12
12
  steps:
13
13
  - uses: actions/checkout@v4
14
- - uses: actions/setup-node@v4
14
+ - uses: actions/setup-node@v6
15
15
  with:
16
- node-version: 20
16
+ node-version: 24
17
17
  cache: npm
18
18
  - name: Install dependencies
19
19
  run: npm ci
@@ -31,9 +31,9 @@ jobs:
31
31
  YNAB_ACCESS_TOKEN: ${{ secrets.YNAB_ACCESS_TOKEN }}
32
32
  steps:
33
33
  - uses: actions/checkout@v4
34
- - uses: actions/setup-node@v4
34
+ - uses: actions/setup-node@v6
35
35
  with:
36
- node-version: 20
36
+ node-version: 24
37
37
  cache: npm
38
38
  - name: Install dependencies
39
39
  run: npm ci
@@ -12,9 +12,9 @@ jobs:
12
12
  YNAB_ACCESS_TOKEN: ${{ secrets.YNAB_ACCESS_TOKEN }}
13
13
  steps:
14
14
  - uses: actions/checkout@v4
15
- - uses: actions/setup-node@v4
15
+ - uses: actions/setup-node@v6
16
16
  with:
17
- node-version: 20
17
+ node-version: 24
18
18
  cache: npm
19
19
  - name: Install dependencies
20
20
  run: npm ci
@@ -24,7 +24,7 @@ jobs:
24
24
  with:
25
25
  ref: ${{ inputs.tag || github.ref }}
26
26
 
27
- - uses: actions/setup-node@v4
27
+ - uses: actions/setup-node@v6
28
28
  with:
29
29
  node-version: 24
30
30
  registry-url: https://registry.npmjs.org
@@ -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,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.18.0] - 2025-12-21
11
+
12
+ ### Added
13
+
14
+ - **MCP Completions** - Autocomplete support for budgets, accounts, categories, and payees
15
+ - Improves client-side UX for tools that accept IDs or names
16
+ - Uses cached data to keep suggestions responsive
17
+ - **Progress Notifications** - Long-running operations can emit MCP progress updates
18
+ - Reconciliation workflows now report progress during bulk create/update/unclear steps
19
+ - Clients can surface progress bars when providing a progress token
20
+
10
21
  ## [0.16.0] - 2025-12-01
11
22
 
12
23
  ### Added
@@ -160,7 +171,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
160
171
 
161
172
  ### Added
162
173
 
163
- - **Structured Output Schemas** - Zod-based output validation for all 30 tools
174
+ - **Structured Output Schemas** - Zod-based output validation for all tools
164
175
  - Output schemas in `src/tools/schemas/outputs/` with centralized exports
165
176
  - Automatic validation in ToolRegistry (toolRegistry.ts:401-483) using `z.safeParse()`
166
177
  - Type-safe responses with TypeScript inference
package/CLAUDE.md CHANGED
@@ -6,7 +6,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
6
6
 
7
7
  This is a Model Context Protocol (MCP) server for YNAB (You Need A Budget) integration, enabling AI assistants to interact with YNAB budgets, accounts, transactions, and categories. The codebase uses TypeScript with a modular, service-oriented architecture.
8
8
 
9
- **Current Version:** 0.17.0
9
+ **Current Version:** 0.18.1
10
10
 
11
11
  ## Essential Commands
12
12
 
@@ -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
 
@@ -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):
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