@dizzlkheinz/ynab-mcpb 0.25.0 → 0.26.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 (40) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/CLAUDE.md +1 -1
  3. package/dist/bundle/index.cjs +71 -64
  4. package/dist/tools/reconciliation/csvParser.js +5 -0
  5. package/dist/tools/reconciliation/index.d.ts +5 -0
  6. package/dist/tools/reconciliation/index.js +29 -3
  7. package/dist/tools/reconciliation/matcher.d.ts +5 -2
  8. package/dist/tools/reconciliation/matcher.js +8 -1
  9. package/dist/tools/reconciliation/outputBuilder.d.ts +65 -3
  10. package/dist/tools/reconciliation/outputBuilder.js +3 -2
  11. package/dist/tools/reconciliation/reportFormatter.d.ts +1 -0
  12. package/dist/tools/reconciliation/reportFormatter.js +16 -6
  13. package/dist/tools/reconciliation/types.d.ts +1 -0
  14. package/dist/tools/schemas/outputs/comparisonOutputs.d.ts +7 -7
  15. package/dist/tools/schemas/outputs/comparisonOutputs.js +3 -3
  16. package/dist/tools/schemas/outputs/reconciliationOutputs.d.ts +838 -197
  17. package/dist/tools/schemas/outputs/reconciliationOutputs.js +43 -13
  18. package/dist/tools/transactionReadTools.js +4 -0
  19. package/dist/tools/transactionSchemas.d.ts +5 -0
  20. package/dist/tools/transactionSchemas.js +1 -0
  21. package/package.json +1 -1
  22. package/src/tools/__tests__/transactionSchemas.test.ts +8 -0
  23. package/src/tools/__tests__/transactionTools.test.ts +45 -0
  24. package/src/tools/reconciliation/__tests__/adapter.test.ts +43 -1
  25. package/src/tools/reconciliation/__tests__/index.test.ts +119 -0
  26. package/src/tools/reconciliation/__tests__/matcher.test.ts +168 -24
  27. package/src/tools/reconciliation/__tests__/reportFormatter.test.ts +1 -1
  28. package/src/tools/reconciliation/csvParser.ts +5 -0
  29. package/src/tools/reconciliation/index.ts +35 -4
  30. package/src/tools/reconciliation/matcher.ts +20 -3
  31. package/src/tools/reconciliation/outputBuilder.ts +77 -5
  32. package/src/tools/reconciliation/reportFormatter.ts +18 -6
  33. package/src/tools/reconciliation/types.ts +2 -0
  34. package/src/tools/schemas/outputs/__tests__/comparisonOutputs.test.ts +52 -0
  35. package/src/tools/schemas/outputs/__tests__/discrepancyDirection.test.ts +65 -54
  36. package/src/tools/schemas/outputs/__tests__/reconciliationOutputs.test.ts +87 -0
  37. package/src/tools/schemas/outputs/comparisonOutputs.ts +3 -3
  38. package/src/tools/schemas/outputs/reconciliationOutputs.ts +53 -16
  39. package/src/tools/transactionReadTools.ts +8 -0
  40. package/src/tools/transactionSchemas.ts +1 -0
package/CHANGELOG.md CHANGED
@@ -7,6 +7,39 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.26.1] - 2026-04-01
11
+
12
+ ### Fixed
13
+
14
+ - **Reconciliation output schema** - Corrected `MoneyValueSchema`, `BankTransactionSchema`, and `YNABTransactionSimpleSchema` to match actual runtime data shapes (`value_milliunits`/`value`/`value_display`/`direction`, `sourceRow`, `categoryName`), resolving `include_structured_data: true` output schema validation failures
15
+ - **CSV payee detection** - Expanded description column candidates to include `"Details"`, `"Transaction Details"`, `"Memo"`, `"Narration"`, and `"Reference"`, resolving payees showing as "Unknown" for banks that use non-standard column names
16
+ - **Reconciliation auto-match rate** - Two-pass matching: when a bank transaction has exactly one candidate with an exact date match, auto-match threshold lowers to 65 (from 85), significantly improving match rates when bank payee strings are opaque (e.g. `"CARD 8472 AUTH 5521"`)
17
+ - **Execution summary shown on 0 changes** - "N change(s) applied to YNAB" message now only appears when `N > 0`; zero-change runs show "No changes were needed" instead
18
+
19
+ ### Changed
20
+
21
+ - **Liability-aware discrepancy wording** - Credit card and other liability accounts now show "YNAB under-cleared / over-cleared" instead of the asset-oriented "YNAB shows MORE/LESS than statement"
22
+ - **`max_suggestions_in_output` default raised to 20** - Previously defaulted to 10; now documented in the tool description alongside `auto_match_threshold`
23
+ - **Tool description for `ynab_reconcile_account`** - Documents statement balance sign convention for liability accounts, `auto_match_threshold` parameter, and `max_suggestions_in_output` default
24
+
25
+ ## [0.26.0] - 2026-03-31
26
+
27
+ ### Added
28
+
29
+ - **`cleared` filter on `ynab_list_transactions`** - New optional `cleared` parameter (`"cleared"` | `"uncleared"` | `"reconciled"`) filters transactions before pagination; applied in-memory with no API changes required
30
+ - **`max_suggestions_in_output` on `ynab_reconcile_account`** - Controls how many unmatched items and suggestions appear in the human narrative (default: 10, previously hardcoded at 5)
31
+ - **`structured_content` filter on `ynab_reconcile_account`** - New `"full"` | `"unmatched_only"` option (default `"full"`); `"unmatched_only"` limits the structured payload to `unmatched_bank`, `unmatched_ynab`, and `suggestions` to avoid exceeding MCP tool result size limits
32
+
33
+ ### Fixed
34
+
35
+ - **memo crash in `ynab_compare_transactions`** - Output schemas for `MissingInBankItemSchema`, `YNABTransactionComparisonSchema`, and `ExportedTransactionFullSchema` changed `memo` from `z.string().nullable()` to `z.string().nullish()`, preventing validation errors when YNAB returns `memo: undefined`
36
+ - **`csv_data` validation error message** - Replaced cryptic refine error with an actionable message explaining both input options and suggesting `ynab_list_transactions` with the new `cleared` filter as an alternative for balance-only workflows
37
+
38
+ ### Changed
39
+
40
+ - **Reconciliation typed interfaces exported** - `StructuredReconciliationPayload`, `DualChannelPayload`, and related view interfaces are now exported from `outputBuilder.ts`, replacing an unsafe `as` cast in the structured content filter
41
+ - **Reconciliation output schema strictness** - All `Filtered*` schemas and `StructuredReconciliationUnmatchedOnlySchema` in `reconciliationOutputs.ts` now use `.strict()`, consistent with the project-wide convention
42
+
10
43
  ## [0.25.0] - 2026-03-29
11
44
 
12
45
  ### Changed
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.25.0
9
+ **Current Version:** 0.26.1
10
10
 
11
11
  ## Essential Commands
12
12