@dizzlkheinz/ynab-mcpb 0.18.2 → 0.18.4

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 (34) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/dist/bundle/index.cjs +40 -40
  3. package/dist/tools/reconcileAdapter.js +3 -0
  4. package/dist/tools/reconciliation/analyzer.js +72 -7
  5. package/dist/tools/reconciliation/reportFormatter.js +26 -2
  6. package/dist/tools/reconciliation/types.d.ts +3 -0
  7. package/dist/tools/transactionSchemas.d.ts +309 -0
  8. package/dist/tools/transactionSchemas.js +215 -0
  9. package/dist/tools/transactionTools.d.ts +3 -281
  10. package/dist/tools/transactionTools.js +36 -568
  11. package/dist/tools/transactionUtils.d.ts +31 -0
  12. package/dist/tools/transactionUtils.js +349 -0
  13. package/docs/plans/2025-12-25-transaction-tools-refactor-design.md +211 -0
  14. package/docs/plans/2025-12-25-transaction-tools-refactor.md +905 -0
  15. package/package.json +4 -2
  16. package/scripts/run-all-tests.js +196 -0
  17. package/src/tools/__tests__/transactionSchemas.test.ts +1188 -0
  18. package/src/tools/__tests__/transactionTools.test.ts +83 -0
  19. package/src/tools/__tests__/transactionUtils.test.ts +989 -0
  20. package/src/tools/reconcileAdapter.ts +6 -0
  21. package/src/tools/reconciliation/__tests__/adapter.causes.test.ts +22 -8
  22. package/src/tools/reconciliation/__tests__/adapter.test.ts +3 -0
  23. package/src/tools/reconciliation/__tests__/analyzer.test.ts +65 -0
  24. package/src/tools/reconciliation/__tests__/recommendationEngine.test.ts +3 -0
  25. package/src/tools/reconciliation/__tests__/reportFormatter.test.ts +4 -1
  26. package/src/tools/reconciliation/__tests__/scenarios/adapterCurrency.scenario.test.ts +3 -0
  27. package/src/tools/reconciliation/__tests__/scenarios/extremes.scenario.test.ts +5 -1
  28. package/src/tools/reconciliation/__tests__/schemaUrl.test.ts +22 -8
  29. package/src/tools/reconciliation/analyzer.ts +127 -11
  30. package/src/tools/reconciliation/reportFormatter.ts +39 -2
  31. package/src/tools/reconciliation/types.ts +6 -0
  32. package/src/tools/transactionSchemas.ts +453 -0
  33. package/src/tools/transactionTools.ts +152 -835
  34. package/src/tools/transactionUtils.ts +536 -0
package/CHANGELOG.md CHANGED
@@ -7,6 +7,47 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.18.4] - 2025-12-26
11
+
12
+ ### Fixed
13
+
14
+ - **Reconciliation Date Range Filtering** - Fix bug where transactions outside the bank statement period were incorrectly flagged as "missing from bank"
15
+ - Now filters YNAB transactions to statement period ± 7 days tolerance before matching
16
+ - New summary fields: `ynab_in_range_count`, `ynab_outside_range_count`
17
+ - Transactions outside the date range are reported separately in `ynab_outside_date_range`
18
+ - Uses `Date.UTC()` for timezone-safe date calculations (prevents off-by-one-day errors)
19
+
20
+ ### Changed
21
+
22
+ - **Code Organization** - Refactored `transactionTools.ts` for better maintainability
23
+ - Extracted Zod schemas to `transactionSchemas.ts` (453 lines)
24
+ - Extracted utility functions to `transactionUtils.ts` (536 lines)
25
+ - Main file reduced from 2,995 to 2,274 lines (24% reduction)
26
+
27
+ ## [0.18.3] - 2025-12-24
28
+
29
+ ### Fixed
30
+
31
+ - **Receipt Itemization** - Truncate long item names to 150 characters in memos
32
+ - Itemized mode: truncates name with "..." suffix
33
+ - Collapsed mode: truncates name while preserving amount (e.g., "AAA... $10.00")
34
+
35
+ ## [0.18.2] - 2025-12-24
36
+
37
+ ### Added
38
+
39
+ - **Smart Collapse Logic** - Intelligent receipt itemization based on item count
40
+ - Items >= 5: collapse into category-grouped subtransactions
41
+ - Big ticket items (>$50): always shown separately
42
+ - Returns/discounts: preserved as individual line items
43
+ - Tax allocation: proportional distribution across positive categories
44
+
45
+ ## [0.18.1] - 2025-12-23
46
+
47
+ ### Fixed
48
+
49
+ - **Reconciliation** - Remove import_id from reconciliation to enable bank matching
50
+
10
51
  ## [0.18.0] - 2025-12-21
11
52
 
12
53
  ### Added