@dizzlkheinz/ynab-mcpb 0.12.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.
- package/.chunkhound.json +11 -0
- package/.code/agents/0427d95e-edca-431f-a214-5e53264e29c4/error.txt +8 -0
- package/.code/agents/0d675174-d1e1-41c3-9975-4c2e275819a9/error.txt +3 -0
- package/.code/agents/0d8c5afd-4787-422b-abf8-2e5943fc7e67/error.txt +3 -0
- package/.code/agents/0ec34a70-ed5d-4b9e-bee4-bb0e4cccbc4b/error.txt +1 -0
- package/.code/agents/0ef51a21-1ab1-49d7-9561-0eaa43875ebc/error.txt +12 -0
- package/.code/agents/15db95d7-abad-4b4d-9c3b-8446089cb61d/error.txt +1 -0
- package/.code/agents/19ab9acb-f675-4ff0-902a-09a5476f8149/error.txt +1 -0
- package/.code/agents/1ef7e12d-f6ff-4897-8a9b-152d523d898e/error.txt +5 -0
- package/.code/agents/2465/exec-call_lroN9KKzJVWC7t5423DK1nT9.txt +1453 -0
- package/.code/agents/28edb6fe-95a9-41a0-ae69-aa0100d26c0c/error.txt +8 -0
- package/.code/agents/2ae40cf5-b4bf-42e2-92bf-7ea350a7755e/error.txt +9 -0
- package/.code/agents/2bfc4e1f-ac4b-45a5-b6df-bf89d4dbb54c/error.txt +1 -0
- package/.code/agents/2e2e1134-eff0-49be-ba25-8e2c3468a564/error.txt +5 -0
- package/.code/agents/3/exec-call_203OC4TNVkLxW7z2HCVEQ1cM.txt +81 -0
- package/.code/agents/3/exec-call_SS5T0XSiXB4LSNzUKTl75wkh.txt +610 -0
- package/.code/agents/3322c003-ce5e-48e3-a342-f5049c5bf9a2/error.txt +1 -0
- package/.code/agents/391e9b08-1ebc-468c-9bcd-6d0cc3193b37/error.txt +1 -0
- package/.code/agents/3ab0aa84-b7bb-4054-afa3-40b8fd7d3be0/error.txt +1 -0
- package/.code/agents/3bed368d-50fe-477e-aee3-a6707eaa1ab9/error.txt +3 -0
- package/.code/agents/3e40b925-db12-442f-8d7a-a25fc69a6672/error.txt +8 -0
- package/.code/agents/414d5776-cf58-41f3-9328-a6daed503a50/error.txt +5 -0
- package/.code/agents/42687751-4565-4610-b240-67835b17d861/error.txt +1 -0
- package/.code/agents/46b98876-1a39-43c9-9e2f-507ca6d47335/error.txt +9 -0
- package/.code/agents/4a7d9491-b26f-43dd-850d-2ecdc49b5d1b/error.txt +1 -0
- package/.code/agents/4e60f00a-1b3e-447f-87f3-7faf9deddec3/error.txt +13 -0
- package/.code/agents/5138fc1c-4d49-4b74-a7da-ccdb3a8e44e7/error.txt +14 -0
- package/.code/agents/521cff39-a7a3-42e5-a557-134f0f7daaa0/error.txt +5 -0
- package/.code/agents/53302dc5-3857-4413-9a47-9e0f64a51dc4/error.txt +5 -0
- package/.code/agents/567c7c2e-6a6f-4761-a08d-d36deeb2e0ac/error.txt +5 -0
- package/.code/agents/57b00845-80dc-47c9-953c-3028d16275d6/error.txt +3 -0
- package/.code/agents/593d9005-c2a5-48fd-8813-ece0d3f2de96/error.txt +1 -0
- package/.code/agents/5a112e66-0e1a-42f9-877c-53af56ea3551/error.txt +1 -0
- package/.code/agents/5b05e8ed-7788-4738-b7ee-9faa8180f992/error.txt +5 -0
- package/.code/agents/5f888d6f-d7ca-4ac8-be23-9ea1bf753951/error.txt +5 -0
- package/.code/agents/607db3ab-e4b0-435b-b497-93e9aa525549/error.txt +8 -0
- package/.code/agents/67dcb2a2-900f-4c78-b3fc-80b5213e0ddf/error.txt +8 -0
- package/.code/agents/69ad848c-4e98-49b3-b16c-0094ac2d1759/error.txt +5 -0
- package/.code/agents/6c9cfc5f-0d0b-445c-b121-9f60082c4f70/error.txt +1 -0
- package/.code/agents/6f6f8f77-4ab0-4f6e-9f30-40e8be0bd8f5/error.txt +1 -0
- package/.code/agents/72a7cde4-fa8a-4024-9038-27faa550539b/error.txt +1 -0
- package/.code/agents/7b48335c-8247-43aa-9949-5f820ba8e199/error.txt +1 -0
- package/.code/agents/80944249-bea9-4ac5-87de-a666c4df306e/error.txt +1 -0
- package/.code/agents/826099df-1b66-4186-a915-7eb59f9db19d/error.txt +5 -0
- package/.code/agents/8291d158-18a8-4a92-b799-4e9a4d9cce88/error.txt +1 -0
- package/.code/agents/82fb71a3-20fb-4341-804a-a2fc900f95bc/error.txt +1 -0
- package/.code/agents/855790ea-54ee-43e4-8209-a66994e37590/error.txt +1 -0
- package/.code/agents/88ce3a2e-04f2-42be-9062-bf97aa798da0/error.txt +3 -0
- package/.code/agents/9a17e398-b6ed-4218-bb55-bc64a8d38ce8/error.txt +8 -0
- package/.code/agents/9a4f4bfc-a2a6-4f40-a896-9335b41a7ed1/error.txt +1 -0
- package/.code/agents/9b633e55-ef84-47d6-94bb-fd3dd172ad97/error.txt +1 -0
- package/.code/agents/9b81f3ab-c72b-4a81-9a8f-28a49ddba84a/error.txt +8 -0
- package/.code/agents/a35daf29-b2d1-4aef-9b42-dad63a76bd47/error.txt +3 -0
- package/.code/agents/a81990cc-69ee-44d2-b907-17403c9bc5d7/error.txt +5 -0
- package/.code/agents/ab56260a-4a83-4ad4-9410-f88a23d6520a/error.txt +1 -0
- package/.code/agents/ad722c31-2d1d-45f7-bae2-3f02ca455b60/error.txt +1 -0
- package/.code/agents/b62e8690-3324-4b97-9309-731bee79416b/error.txt +5 -0
- package/.code/agents/baf60a3a-752b-4ad8-99d6-df32423ed2eb/error.txt +1 -0
- package/.code/agents/be049042-7dcb-4ac8-9beb-c8f1aea67742/error.txt +14 -0
- package/.code/agents/bed1dcb4-bfce-4a9f-8594-0f994962aafd/error.txt +1 -0
- package/.code/agents/c324a6cf-e935-4ede-9529-b3ebc18e8d6b/error.txt +5 -0
- package/.code/agents/c37c06ff-dfe3-43f2-9bbc-3ec73ec8f41d/error.txt +5 -0
- package/.code/agents/c8cd6671-433a-456b-9f88-e51cb2df6bfc/error.txt +11 -0
- package/.code/agents/ca2ccb67-2f24-428e-b27d-9365beadd140/error.txt +1 -0
- package/.code/agents/cf08c0c8-e7f0-423e-93ba-547e8e818340/error.txt +8 -0
- package/.code/agents/d579c74f-874b-40a4-9d56-ced1eb6a701d/error.txt +1 -0
- package/.code/agents/df412c98-7378-4deb-8e1e-76c416931181/error.txt +3 -0
- package/.code/agents/e5134eb3-2af4-45b0-8998-051cb4afdb45/error.txt +3 -0
- package/.code/agents/e6308471-aa45-4e9e-9496-2e9404164d97/error.txt +8 -0
- package/.code/agents/e7bd8bc7-23fb-4f46-98dc-b0dcf11b75a1/error.txt +1 -0
- package/.code/agents/e92bec35-378d-4fe1-8ac0-6e1bb3c86911/error.txt +5 -0
- package/.code/agents/ed918fbf-2dc4-4aa2-bfc5-04b65d9471ea/error.txt +1 -0
- package/.code/agents/ef1d756f-b272-48fc-8729-f05c494674f7/error.txt +1 -0
- package/.code/agents/ef359853-0249-4e41-a804-c0fc459fe456/error.txt +1 -0
- package/.code/agents/effc7b4a-4b90-40a0-8c86-a7a99d2d5fd2/error.txt +1 -0
- package/.code/agents/fa15f8d5-8359-4a8b-83a3-2f2056b3ff40/error.txt +3 -0
- package/.code/agents/fbef4193-eadf-4c8a-83ff-4878a6310f25/error.txt +8 -0
- package/.code/agents/fd0a4b4a-fda4-4964-a6d6-2b8a2da387c6/error.txt +1 -0
- package/.dxtignore +57 -0
- package/.env.example +44 -0
- package/.gemini/settings.json +8 -0
- package/.github/ISSUE_TEMPLATE/bug_report.md +41 -0
- package/.github/ISSUE_TEMPLATE/config.yml +5 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +24 -0
- package/.github/ISSUE_TEMPLATE/release_checklist.md +31 -0
- package/.github/pull_request_template.md +41 -0
- package/.github/workflows/ci-tests.yml +41 -0
- package/.github/workflows/claude-code-review.yml +57 -0
- package/.github/workflows/claude.yml +50 -0
- package/.github/workflows/full-integration.yml +22 -0
- package/.github/workflows/pr-description-check.yml +88 -0
- package/.github/workflows/publish.yml +33 -0
- package/.github/workflows/release.yml +89 -0
- package/.mcpbignore +58 -0
- package/.prettierignore +10 -0
- package/.prettierrc.json +10 -0
- package/ADOS-2-Module-1-Complete-Manual.md +757 -0
- package/AGENTS.md +36 -0
- package/CHANGELOG.md +187 -0
- package/CLAUDE.md +414 -0
- package/CODEREVIEW_RESPONSE.md +128 -0
- package/LICENSE +17 -0
- package/NUL +1 -0
- package/README.md +222 -0
- package/SCHEMA_IMPROVEMENT_SUMMARY.md +120 -0
- package/TESTING_NOTES.md +217 -0
- package/WARP.md +245 -0
- package/accountactivity-merged.csv +149 -0
- package/bin/ynab-mcp-server.cjs +4 -0
- package/bin/ynab-mcp-server.js +8 -0
- package/bundle-analysis.html +13110 -0
- package/dist/bundle/index.cjs +124 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +85 -0
- package/dist/server/YNABMCPServer.d.ts +264 -0
- package/dist/server/YNABMCPServer.js +845 -0
- package/dist/server/budgetResolver.d.ts +15 -0
- package/dist/server/budgetResolver.js +99 -0
- package/dist/server/cacheManager.d.ts +74 -0
- package/dist/server/cacheManager.js +306 -0
- package/dist/server/config.d.ts +3 -0
- package/dist/server/config.js +19 -0
- package/dist/server/deltaCache.d.ts +61 -0
- package/dist/server/deltaCache.js +206 -0
- package/dist/server/deltaCache.merge.d.ts +9 -0
- package/dist/server/deltaCache.merge.js +111 -0
- package/dist/server/diagnostics.d.ts +90 -0
- package/dist/server/diagnostics.js +163 -0
- package/dist/server/errorHandler.d.ts +69 -0
- package/dist/server/errorHandler.js +524 -0
- package/dist/server/prompts.d.ts +31 -0
- package/dist/server/prompts.js +205 -0
- package/dist/server/rateLimiter.d.ts +27 -0
- package/dist/server/rateLimiter.js +82 -0
- package/dist/server/requestLogger.d.ts +62 -0
- package/dist/server/requestLogger.js +190 -0
- package/dist/server/resources.d.ts +39 -0
- package/dist/server/resources.js +85 -0
- package/dist/server/responseFormatter.d.ts +14 -0
- package/dist/server/responseFormatter.js +42 -0
- package/dist/server/securityMiddleware.d.ts +87 -0
- package/dist/server/securityMiddleware.js +117 -0
- package/dist/server/serverKnowledgeStore.d.ts +11 -0
- package/dist/server/serverKnowledgeStore.js +42 -0
- package/dist/server/toolRegistry.d.ts +85 -0
- package/dist/server/toolRegistry.js +272 -0
- package/dist/tools/__tests__/deltaTestUtils.d.ts +18 -0
- package/dist/tools/__tests__/deltaTestUtils.js +26 -0
- package/dist/tools/accountTools.d.ts +37 -0
- package/dist/tools/accountTools.js +175 -0
- package/dist/tools/budgetTools.d.ts +10 -0
- package/dist/tools/budgetTools.js +68 -0
- package/dist/tools/categoryTools.d.ts +27 -0
- package/dist/tools/categoryTools.js +232 -0
- package/dist/tools/compareTransactions/formatter.d.ts +71 -0
- package/dist/tools/compareTransactions/formatter.js +97 -0
- package/dist/tools/compareTransactions/index.d.ts +30 -0
- package/dist/tools/compareTransactions/index.js +160 -0
- package/dist/tools/compareTransactions/matcher.d.ts +12 -0
- package/dist/tools/compareTransactions/matcher.js +140 -0
- package/dist/tools/compareTransactions/parser.d.ts +14 -0
- package/dist/tools/compareTransactions/parser.js +430 -0
- package/dist/tools/compareTransactions/types.d.ts +27 -0
- package/dist/tools/compareTransactions/types.js +1 -0
- package/dist/tools/compareTransactions.d.ts +1 -0
- package/dist/tools/compareTransactions.js +1 -0
- package/dist/tools/deltaFetcher.d.ts +22 -0
- package/dist/tools/deltaFetcher.js +137 -0
- package/dist/tools/deltaSupport.d.ts +20 -0
- package/dist/tools/deltaSupport.js +176 -0
- package/dist/tools/exportTransactions.d.ts +17 -0
- package/dist/tools/exportTransactions.js +191 -0
- package/dist/tools/monthTools.d.ts +16 -0
- package/dist/tools/monthTools.js +107 -0
- package/dist/tools/payeeTools.d.ts +17 -0
- package/dist/tools/payeeTools.js +82 -0
- package/dist/tools/reconcileAdapter.d.ts +25 -0
- package/dist/tools/reconcileAdapter.js +167 -0
- package/dist/tools/reconciliation/analyzer.d.ts +3 -0
- package/dist/tools/reconciliation/analyzer.js +567 -0
- package/dist/tools/reconciliation/executor.d.ts +94 -0
- package/dist/tools/reconciliation/executor.js +611 -0
- package/dist/tools/reconciliation/index.d.ts +54 -0
- package/dist/tools/reconciliation/index.js +249 -0
- package/dist/tools/reconciliation/matcher.d.ts +3 -0
- package/dist/tools/reconciliation/matcher.js +160 -0
- package/dist/tools/reconciliation/payeeNormalizer.d.ts +6 -0
- package/dist/tools/reconciliation/payeeNormalizer.js +77 -0
- package/dist/tools/reconciliation/recommendationEngine.d.ts +2 -0
- package/dist/tools/reconciliation/recommendationEngine.js +273 -0
- package/dist/tools/reconciliation/reportFormatter.d.ts +13 -0
- package/dist/tools/reconciliation/reportFormatter.js +214 -0
- package/dist/tools/reconciliation/types.d.ts +172 -0
- package/dist/tools/reconciliation/types.js +7 -0
- package/dist/tools/schemas/outputs/accountOutputs.d.ts +58 -0
- package/dist/tools/schemas/outputs/accountOutputs.js +24 -0
- package/dist/tools/schemas/outputs/budgetOutputs.d.ts +48 -0
- package/dist/tools/schemas/outputs/budgetOutputs.js +15 -0
- package/dist/tools/schemas/outputs/categoryOutputs.d.ts +93 -0
- package/dist/tools/schemas/outputs/categoryOutputs.js +37 -0
- package/dist/tools/schemas/outputs/comparisonOutputs.d.ts +269 -0
- package/dist/tools/schemas/outputs/comparisonOutputs.js +181 -0
- package/dist/tools/schemas/outputs/index.d.ts +14 -0
- package/dist/tools/schemas/outputs/index.js +14 -0
- package/dist/tools/schemas/outputs/monthOutputs.d.ts +122 -0
- package/dist/tools/schemas/outputs/monthOutputs.js +51 -0
- package/dist/tools/schemas/outputs/payeeOutputs.d.ts +34 -0
- package/dist/tools/schemas/outputs/payeeOutputs.js +16 -0
- package/dist/tools/schemas/outputs/reconciliationOutputs.d.ts +1275 -0
- package/dist/tools/schemas/outputs/reconciliationOutputs.js +377 -0
- package/dist/tools/schemas/outputs/transactionMutationOutputs.d.ts +717 -0
- package/dist/tools/schemas/outputs/transactionMutationOutputs.js +260 -0
- package/dist/tools/schemas/outputs/transactionOutputs.d.ts +98 -0
- package/dist/tools/schemas/outputs/transactionOutputs.js +49 -0
- package/dist/tools/schemas/outputs/utilityOutputs.d.ts +219 -0
- package/dist/tools/schemas/outputs/utilityOutputs.js +120 -0
- package/dist/tools/schemas/shared/commonOutputs.d.ts +24 -0
- package/dist/tools/schemas/shared/commonOutputs.js +27 -0
- package/dist/tools/toolCategories.d.ts +32 -0
- package/dist/tools/toolCategories.js +32 -0
- package/dist/tools/transactionTools.d.ts +315 -0
- package/dist/tools/transactionTools.js +1722 -0
- package/dist/tools/utilityTools.d.ts +10 -0
- package/dist/tools/utilityTools.js +56 -0
- package/dist/types/index.d.ts +20 -0
- package/dist/types/index.js +16 -0
- package/dist/types/toolAnnotations.d.ts +7 -0
- package/dist/types/toolAnnotations.js +1 -0
- package/dist/utils/amountUtils.d.ts +3 -0
- package/dist/utils/amountUtils.js +10 -0
- package/dist/utils/dateUtils.d.ts +9 -0
- package/dist/utils/dateUtils.js +43 -0
- package/dist/utils/money.d.ts +21 -0
- package/dist/utils/money.js +51 -0
- package/docs/README.md +72 -0
- package/docs/assets/examples/reconciliation-with-recommendations.json +68 -0
- package/docs/assets/schemas/reconciliation-v2.json +338 -0
- package/docs/getting-started/CONFIGURATION.md +175 -0
- package/docs/getting-started/INSTALLATION.md +333 -0
- package/docs/getting-started/QUICKSTART.md +282 -0
- package/docs/guides/ARCHITECTURE.md +650 -0
- package/docs/guides/DEPLOYMENT.md +189 -0
- package/docs/guides/INTEGRATION_TESTING.md +730 -0
- package/docs/guides/TESTING.md +591 -0
- package/docs/reconciliation-flow.md +83 -0
- package/docs/reference/API.md +1450 -0
- package/docs/reference/EXAMPLES.md +946 -0
- package/docs/reference/TOOLS.md +348 -0
- package/docs/reference/TROUBLESHOOTING.md +481 -0
- package/esbuild.config.mjs +68 -0
- package/eslint.config.js +49 -0
- package/fix-types.sh +17 -0
- package/meta.json +12550 -0
- package/package.json +105 -0
- package/package.json.tmp +105 -0
- package/scripts/analyze-bundle.mjs +41 -0
- package/scripts/create-pr-description.js +203 -0
- package/scripts/generate-mcpb.ps1 +96 -0
- package/scripts/run-domain-integration-tests.js +33 -0
- package/scripts/run-generate-mcpb.js +29 -0
- package/scripts/run-throttled-integration-tests.js +116 -0
- package/scripts/test-delta-params.mjs +140 -0
- package/scripts/test-recommendations.ts +53 -0
- package/scripts/tmpTransaction.ts +48 -0
- package/scripts/validate-env.js +122 -0
- package/scripts/verify-build.js +105 -0
- package/scripts/watch-and-restart.ps1 +50 -0
- package/src/__tests__/comprehensive.integration.test.ts +1196 -0
- package/src/__tests__/delta.performance.test.ts +80 -0
- package/src/__tests__/performance.test.ts +725 -0
- package/src/__tests__/setup.ts +449 -0
- package/src/__tests__/testRunner.ts +444 -0
- package/src/__tests__/testUtils.ts +563 -0
- package/src/__tests__/workflows.e2e.test.ts +1675 -0
- package/src/index.ts +124 -0
- package/src/server/.gitkeep +1 -0
- package/src/server/YNABMCPServer.ts +1188 -0
- package/src/server/__tests__/YNABMCPServer.integration.test.ts +903 -0
- package/src/server/__tests__/YNABMCPServer.test.ts +894 -0
- package/src/server/__tests__/budgetResolver.test.ts +425 -0
- package/src/server/__tests__/cacheManager.test.ts +880 -0
- package/src/server/__tests__/config.test.ts +166 -0
- package/src/server/__tests__/deltaCache.merge.test.ts +724 -0
- package/src/server/__tests__/deltaCache.swr.test.ts +168 -0
- package/src/server/__tests__/deltaCache.test.ts +774 -0
- package/src/server/__tests__/diagnostics.test.ts +823 -0
- package/src/server/__tests__/errorHandler.integration.test.ts +466 -0
- package/src/server/__tests__/errorHandler.test.ts +416 -0
- package/src/server/__tests__/prompts.test.ts +354 -0
- package/src/server/__tests__/rateLimiter.test.ts +314 -0
- package/src/server/__tests__/requestLogger.test.ts +408 -0
- package/src/server/__tests__/resources.test.ts +299 -0
- package/src/server/__tests__/security.integration.test.ts +426 -0
- package/src/server/__tests__/securityMiddleware.test.ts +449 -0
- package/src/server/__tests__/server-startup.integration.test.ts +477 -0
- package/src/server/__tests__/serverKnowledgeStore.test.ts +174 -0
- package/src/server/__tests__/toolRegistry.test.ts +855 -0
- package/src/server/budgetResolver.ts +235 -0
- package/src/server/cacheManager.ts +503 -0
- package/src/server/config.ts +41 -0
- package/src/server/deltaCache.merge.ts +149 -0
- package/src/server/deltaCache.ts +341 -0
- package/src/server/diagnostics.ts +338 -0
- package/src/server/errorHandler.ts +756 -0
- package/src/server/prompts.ts +291 -0
- package/src/server/rateLimiter.ts +156 -0
- package/src/server/requestLogger.ts +344 -0
- package/src/server/resources.ts +168 -0
- package/src/server/responseFormatter.ts +51 -0
- package/src/server/securityMiddleware.ts +236 -0
- package/src/server/serverKnowledgeStore.ts +91 -0
- package/src/server/toolRegistry.ts +489 -0
- package/src/tools/.gitkeep +1 -0
- package/src/tools/__tests__/accountTools.delta.integration.test.ts +128 -0
- package/src/tools/__tests__/accountTools.integration.test.ts +117 -0
- package/src/tools/__tests__/accountTools.test.ts +653 -0
- package/src/tools/__tests__/budgetTools.delta.integration.test.ts +90 -0
- package/src/tools/__tests__/budgetTools.integration.test.ts +134 -0
- package/src/tools/__tests__/budgetTools.test.ts +423 -0
- package/src/tools/__tests__/categoryTools.delta.integration.test.ts +80 -0
- package/src/tools/__tests__/categoryTools.integration.test.ts +295 -0
- package/src/tools/__tests__/categoryTools.test.ts +622 -0
- package/src/tools/__tests__/compareTransactions/formatter.test.ts +486 -0
- package/src/tools/__tests__/compareTransactions/index.test.ts +383 -0
- package/src/tools/__tests__/compareTransactions/matcher.test.ts +410 -0
- package/src/tools/__tests__/compareTransactions/parser.test.ts +764 -0
- package/src/tools/__tests__/compareTransactions.test.ts +342 -0
- package/src/tools/__tests__/compareTransactions.window.test.ts +147 -0
- package/src/tools/__tests__/deltaFetcher.scheduled.integration.test.ts +76 -0
- package/src/tools/__tests__/deltaFetcher.test.ts +270 -0
- package/src/tools/__tests__/deltaSupport.test.ts +188 -0
- package/src/tools/__tests__/deltaTestUtils.ts +46 -0
- package/src/tools/__tests__/exportTransactions.test.ts +213 -0
- package/src/tools/__tests__/monthTools.delta.integration.test.ts +80 -0
- package/src/tools/__tests__/monthTools.integration.test.ts +174 -0
- package/src/tools/__tests__/monthTools.test.ts +523 -0
- package/src/tools/__tests__/payeeTools.delta.integration.test.ts +80 -0
- package/src/tools/__tests__/payeeTools.integration.test.ts +150 -0
- package/src/tools/__tests__/payeeTools.test.ts +445 -0
- package/src/tools/__tests__/transactionTools.integration.test.ts +762 -0
- package/src/tools/__tests__/transactionTools.test.ts +3521 -0
- package/src/tools/__tests__/utilityTools.integration.test.ts +128 -0
- package/src/tools/__tests__/utilityTools.test.ts +205 -0
- package/src/tools/accountTools.ts +283 -0
- package/src/tools/budgetTools.ts +112 -0
- package/src/tools/categoryTools.ts +366 -0
- package/src/tools/compareTransactions/formatter.ts +163 -0
- package/src/tools/compareTransactions/index.ts +228 -0
- package/src/tools/compareTransactions/matcher.ts +240 -0
- package/src/tools/compareTransactions/parser.ts +557 -0
- package/src/tools/compareTransactions/types.ts +60 -0
- package/src/tools/compareTransactions.ts +3 -0
- package/src/tools/deltaFetcher.ts +278 -0
- package/src/tools/deltaSupport.ts +293 -0
- package/src/tools/exportTransactions.ts +273 -0
- package/src/tools/monthTools.ts +164 -0
- package/src/tools/payeeTools.ts +140 -0
- package/src/tools/reconcileAdapter.ts +312 -0
- package/src/tools/reconciliation/__tests__/adapter.causes.test.ts +122 -0
- package/src/tools/reconciliation/__tests__/adapter.test.ts +234 -0
- package/src/tools/reconciliation/__tests__/analyzer.test.ts +406 -0
- package/src/tools/reconciliation/__tests__/executor.integration.test.ts +366 -0
- package/src/tools/reconciliation/__tests__/executor.test.ts +779 -0
- package/src/tools/reconciliation/__tests__/matcher.test.ts +650 -0
- package/src/tools/reconciliation/__tests__/payeeNormalizer.test.ts +278 -0
- package/src/tools/reconciliation/__tests__/recommendationEngine.integration.test.ts +658 -0
- package/src/tools/reconciliation/__tests__/recommendationEngine.test.ts +1000 -0
- package/src/tools/reconciliation/__tests__/reconciliation.delta.integration.test.ts +151 -0
- package/src/tools/reconciliation/__tests__/reportFormatter.test.ts +573 -0
- package/src/tools/reconciliation/__tests__/scenarios/adapterCurrency.scenario.test.ts +78 -0
- package/src/tools/reconciliation/__tests__/scenarios/extremes.scenario.test.ts +47 -0
- package/src/tools/reconciliation/__tests__/scenarios/repeatAmount.scenario.test.ts +61 -0
- package/src/tools/reconciliation/__tests__/schemaUrl.test.ts +49 -0
- package/src/tools/reconciliation/analyzer.ts +824 -0
- package/src/tools/reconciliation/executor.ts +880 -0
- package/src/tools/reconciliation/index.ts +400 -0
- package/src/tools/reconciliation/matcher.ts +269 -0
- package/src/tools/reconciliation/payeeNormalizer.ts +167 -0
- package/src/tools/reconciliation/recommendationEngine.ts +506 -0
- package/src/tools/reconciliation/reportFormatter.ts +363 -0
- package/src/tools/reconciliation/types.ts +314 -0
- package/src/tools/schemas/outputs/__tests__/accountOutputs.test.ts +424 -0
- package/src/tools/schemas/outputs/__tests__/budgetOutputs.test.ts +310 -0
- package/src/tools/schemas/outputs/__tests__/categoryOutputs.test.ts +448 -0
- package/src/tools/schemas/outputs/__tests__/comparisonOutputs.test.ts +519 -0
- package/src/tools/schemas/outputs/__tests__/dateValidation.test.ts +155 -0
- package/src/tools/schemas/outputs/__tests__/discrepancyDirection.test.ts +288 -0
- package/src/tools/schemas/outputs/__tests__/monthOutputs.test.ts +478 -0
- package/src/tools/schemas/outputs/__tests__/payeeOutputs.test.ts +370 -0
- package/src/tools/schemas/outputs/__tests__/reconciliationOutputs.test.ts +401 -0
- package/src/tools/schemas/outputs/__tests__/transactionMutationSchemas.test.ts +213 -0
- package/src/tools/schemas/outputs/__tests__/transactionOutputs.test.ts +474 -0
- package/src/tools/schemas/outputs/__tests__/utilityOutputs.test.ts +333 -0
- package/src/tools/schemas/outputs/accountOutputs.ts +137 -0
- package/src/tools/schemas/outputs/budgetOutputs.ts +86 -0
- package/src/tools/schemas/outputs/categoryOutputs.ts +194 -0
- package/src/tools/schemas/outputs/comparisonOutputs.ts +600 -0
- package/src/tools/schemas/outputs/index.ts +270 -0
- package/src/tools/schemas/outputs/monthOutputs.ts +243 -0
- package/src/tools/schemas/outputs/payeeOutputs.ts +105 -0
- package/src/tools/schemas/outputs/reconciliationOutputs.ts +796 -0
- package/src/tools/schemas/outputs/transactionMutationOutputs.ts +758 -0
- package/src/tools/schemas/outputs/transactionOutputs.ts +243 -0
- package/src/tools/schemas/outputs/utilityOutputs.ts +411 -0
- package/src/tools/schemas/shared/commonOutputs.ts +140 -0
- package/src/tools/toolCategories.ts +140 -0
- package/src/tools/transactionTools.ts +2509 -0
- package/src/tools/utilityTools.ts +90 -0
- package/src/types/.gitkeep +1 -0
- package/src/types/__tests__/index.test.ts +52 -0
- package/src/types/index.ts +67 -0
- package/src/types/integration-tests.d.ts +35 -0
- package/src/types/toolAnnotations.ts +44 -0
- package/src/utils/__tests__/dateUtils.test.ts +170 -0
- package/src/utils/__tests__/money.test.ts +189 -0
- package/src/utils/amountUtils.ts +32 -0
- package/src/utils/dateUtils.ts +108 -0
- package/src/utils/money.ts +123 -0
- package/test-csv-sample.csv +28 -0
- package/test-exports/sample_bank_statement.csv +7 -0
- package/test-exports/ynab_account_e9ddc2a6_minimal_1items_2025-11-19_09-04-53.json +23 -0
- package/test-exports/ynab_account_e9ddc2a6_minimal_1items_2025-11-19_10-37-42.json +23 -0
- package/test-exports/ynab_account_e9ddc2a6_minimal_4items_2025-11-19_09-02-09.json +44 -0
- package/test-exports/ynab_account_e9ddc2a6_minimal_6items_2025-11-19_10-37-52.json +58 -0
- package/test-exports/ynab_since_2025-11-01_account_4c18e9f0_minimal_14items_2025-11-16_10-07-10.json +115 -0
- package/test-reconcile-autodetect.js +40 -0
- package/test-reconcile-tool.js +152 -0
- package/test-reconcile-with-csv.cjs +89 -0
- package/test-statement.csv +8 -0
- package/test_debug.js +47 -0
- package/test_simple.mjs +16 -0
- package/tsconfig.json +31 -0
- package/tsconfig.prod.json +18 -0
- package/vitest-reporters/split-json-reporter.ts +211 -0
- package/vitest.config.ts +96 -0
|
@@ -0,0 +1,610 @@
|
|
|
1
|
+
src/tools/reconciliation\types.ts:3: * Based on the 2025-10-31 reconciliation redesign specification
|
|
2
|
+
src/tools/reconciliation\types.ts:19: /** Transaction date in YYYY-MM-DD format */
|
|
3
|
+
src/tools/reconciliation\types.ts:67: /** Confidence score 0-100 */
|
|
4
|
+
src/tools/reconciliation\types.ts:119: * Reconciliation insight - highlights important findings that help explain discrepancies
|
|
5
|
+
src/tools/reconciliation\types.ts:173: /** Description similarity threshold (0-1) */
|
|
6
|
+
src/tools/reconciliation\types.ts:175: /** Confidence threshold for auto-matching (0-100) */
|
|
7
|
+
src/tools/reconciliation\types.ts:177: /** Confidence threshold for suggestions (0-100) */
|
|
8
|
+
src/tools/reconciliation\types.ts:182: * Default matching configuration (not type-only for use in code)
|
|
9
|
+
src/tools/reconciliation\types.ts:217: /** Confidence score 0-1 (higher = more confident) */
|
|
10
|
+
src/tools/reconciliation\types.ts:219: /** Human-readable message describing the recommendation */
|
|
11
|
+
src/tools/reconciliation\payeeNormalizer.ts:3: * Implements two-tier matching: normalized string comparison + fuzzy matching
|
|
12
|
+
src/tools/reconciliation\payeeNormalizer.ts:8: * - Lowercase
|
|
13
|
+
src/tools/reconciliation\payeeNormalizer.ts:9: * - Remove spaces, punctuation, special characters
|
|
14
|
+
src/tools/reconciliation\payeeNormalizer.ts:10: * - Keep only alphanumeric characters
|
|
15
|
+
src/tools/reconciliation\payeeNormalizer.ts:19: return payee.toLowerCase().replace(/[^a-z0-9]/g, ''); // Remove all non-alphanumeric
|
|
16
|
+
src/tools/reconciliation\payeeNormalizer.ts:60: const cost = str1[i - 1] === str2[j - 1] ? 0 : 1;
|
|
17
|
+
src/tools/reconciliation\payeeNormalizer.ts:62: matrix[i - 1]![j]! + 1, // deletion
|
|
18
|
+
src/tools/reconciliation\payeeNormalizer.ts:63: matrix[i]![j - 1]! + 1, // insertion
|
|
19
|
+
src/tools/reconciliation\payeeNormalizer.ts:64: matrix[i - 1]![j - 1]! + cost, // substitution
|
|
20
|
+
src/tools/reconciliation\payeeNormalizer.ts:74: * Returns similarity score 0-100
|
|
21
|
+
src/tools/reconciliation\payeeNormalizer.ts:94: const similarity = (1 - distance / maxLen) * 100;
|
|
22
|
+
src/tools/reconciliation\payeeNormalizer.ts:99: * Token-based similarity for better handling of word order differences
|
|
23
|
+
src/tools/reconciliation\payeeNormalizer.ts:115: const tokens1 = norm1.match(/[a-z]+|[0-9]+/g) || [];
|
|
24
|
+
src/tools/reconciliation\payeeNormalizer.ts:116: const tokens2 = norm2.match(/[a-z]+|[0-9]+/g) || [];
|
|
25
|
+
src/tools/reconciliation\payeeNormalizer.ts:137: * - Normalized exact match (100 if matches)
|
|
26
|
+
src/tools/reconciliation\payeeNormalizer.ts:138: * - Fuzzy match (Levenshtein distance)
|
|
27
|
+
src/tools/reconciliation\payeeNormalizer.ts:139: * - Token-based match
|
|
28
|
+
src/tools/reconciliation\payeeNormalizer.ts:148: // Tier 2: Fuzzy and token-based matching
|
|
29
|
+
src/tools/reconciliation\executor.ts:82: let clearedDeltaMilli = addMilli(initialAccount.cleared_balance ?? 0, -statementTargetMilli);
|
|
30
|
+
src/tools/reconciliation\executor.ts:104: reason: `Cleared delta ${deltaDisplay} within ±${toleranceDisplay} after ${trigger} - halting newest-to-oldest pass`,
|
|
31
|
+
src/tools/reconciliation\executor.ts:120: // STEP 1: Auto-create missing transactions (bank -> YNAB)
|
|
32
|
+
src/tools/reconciliation\executor.ts:148: memo: bankTxn.memo ?? 'Auto-reconciled from bank statement',
|
|
33
|
+
src/tools/reconciliation\executor.ts:237: // STEP 3: Auto-unclear YNAB transactions missing from bank
|
|
34
|
+
src/tools/reconciliation\executor.ts:249: reason: `Would mark transaction ${ynabTxn.id} as uncleared - not present on statement`,
|
|
35
|
+
src/tools/reconciliation\executor.ts:251: applyClearedDelta(-ynabTxn.amount);
|
|
36
|
+
src/tools/reconciliation\executor.ts:268: reason: `Marked transaction ${ynabTxn.id} as uncleared - not found on statement`,
|
|
37
|
+
src/tools/reconciliation\executor.ts:271: applyClearedDelta(-ynabTxn.amount);
|
|
38
|
+
src/tools/reconciliation\executor.ts:297: params.dry_run || !accountSnapshotDirty ? 0 : afterAccount.balance - initialAccount.balance;
|
|
39
|
+
src/tools/reconciliation\executor.ts:366: const discrepancy = bankMilli - ynabMilli;
|
|
40
|
+
src/tools/reconciliation\executor.ts:509: recommendations.push('Dry run only — re-run with dry_run=false to apply these changes');
|
|
41
|
+
src/tools/reconciliation\executor.ts:564: return toChronoValue(dateA) - toChronoValue(dateB);
|
|
42
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:23: date: '2025-10-15',
|
|
43
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:24: amount: -45.23,
|
|
44
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:29: date: '2025-10-16',
|
|
45
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:30: amount: -100.0,
|
|
46
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:45: date: '2025-10-15',
|
|
47
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:46: amount: -45230,
|
|
48
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:54: date: '2025-10-16',
|
|
49
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:55: amount: -100000,
|
|
50
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:67: -145.23, // Target balance
|
|
51
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:81: it('should categorize high-confidence matches as auto-matches', () => {
|
|
52
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:85: date: '2025-10-15',
|
|
53
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:86: amount: -50.0,
|
|
54
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:101: date: '2025-10-15',
|
|
55
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:102: amount: -50000,
|
|
56
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:110: const result = analyzeReconciliation('csv', undefined, ynabTxns, -50.0);
|
|
57
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:116: it('should categorize medium-confidence matches as suggested', () => {
|
|
58
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:120: date: '2025-10-15',
|
|
59
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:121: amount: -50.0,
|
|
60
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:136: date: '2025-10-18', // 3 days difference
|
|
61
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:137: amount: -50000,
|
|
62
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:145: const result = analyzeReconciliation('csv', undefined, ynabTxns, -50.0);
|
|
63
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:155: date: '2025-10-15',
|
|
64
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:156: amount: -15.99,
|
|
65
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:189: date: '2025-10-15',
|
|
66
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:190: amount: -50000,
|
|
67
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:208: date: '2025-10-20',
|
|
68
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:209: amount: -30.0,
|
|
69
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:223: id: 'y-combo-1',
|
|
70
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:224: date: '2025-10-19',
|
|
71
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:225: amount: -20000,
|
|
72
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:232: id: 'y-combo-2',
|
|
73
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:233: date: '2025-10-20',
|
|
74
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:234: amount: -10000,
|
|
75
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:241: id: 'y-extra',
|
|
76
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:242: date: '2025-10-22',
|
|
77
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:243: amount: -5000,
|
|
78
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:251: const result = analyzeReconciliation('csv', undefined, ynabTxns, -30.0);
|
|
79
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:259: const comboInsight = result.insights.find((insight) => insight.id.startsWith('combination-'));
|
|
80
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:277: date: '2025-10-15',
|
|
81
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:278: amount: -50000, // -$50.00 cleared
|
|
82
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:286: date: '2025-10-16',
|
|
83
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:287: amount: -30000, // -$30.00 uncleared
|
|
84
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:295: const result = analyzeReconciliation('csv', undefined, ynabTxns, -50.0);
|
|
85
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:297: expect(result.balance_info.current_cleared.value).toBe(-50.0);
|
|
86
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:298: expect(result.balance_info.current_uncleared.value).toBe(-30.0);
|
|
87
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:299: expect(result.balance_info.current_total.value).toBe(-80.0);
|
|
88
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:300: expect(result.balance_info.target_statement.value).toBe(-50.0);
|
|
89
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:308: { date: '2025-10-15', amount: -50.0, payee: 'Store', memo: '' },
|
|
90
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:309: { date: '2025-10-20', amount: -30.0, payee: 'Restaurant', memo: '' },
|
|
91
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:321: date: '2025-10-15',
|
|
92
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:322: amount: -50000,
|
|
93
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:330: const result = analyzeReconciliation('csv', undefined, ynabTxns, -80.0);
|
|
94
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:334: expect(result.summary.statement_date_range).toContain('2025-10-15');
|
|
95
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:335: expect(result.summary.statement_date_range).toContain('2025-10-20');
|
|
96
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:340: transactions: [{ date: '2025-10-15', amount: -50.0, payee: 'Store', memo: '' }],
|
|
97
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:351: date: '2025-10-15',
|
|
98
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:352: amount: -50000,
|
|
99
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:360: const result = analyzeReconciliation('csv', undefined, ynabTxns, -50.0);
|
|
100
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:369: transactions: [{ date: '2025-10-15', amount: -50.0, payee: 'Store', memo: '' }],
|
|
101
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:388: { date: '2025-10-15', amount: -50.0, payee: 'Store1', memo: '' },
|
|
102
|
+
src/tools/reconciliation\__tests__\analyzer.test.ts:389: { date: '2025-10-16', amount: -30.0, payee: 'Store2', memo: '' },
|
|
103
|
+
src/tools/reconciliation\analyzer.ts:75: return Math.abs(a - b) / DAYS_IN_MS;
|
|
104
|
+
src/tools/reconciliation\analyzer.ts:101: base -= 5;
|
|
105
|
+
src/tools/reconciliation\analyzer.ts:139: const diff = Math.abs(sum - bankTxn.amount);
|
|
106
|
+
src/tools/reconciliation\analyzer.ts:147: for (let i = 0; i < n - 1; i++) {
|
|
107
|
+
src/tools/reconciliation\analyzer.ts:154: for (let i = 0; i < n - 2; i++) {
|
|
108
|
+
src/tools/reconciliation\analyzer.ts:155: for (let j = i + 1; j < n - 1; j++) {
|
|
109
|
+
src/tools/reconciliation\analyzer.ts:165: evaluated.sort((a, b) => a.diff - b.diff);
|
|
110
|
+
src/tools/reconciliation\analyzer.ts:177: const candidateConfidence = Math.max(60, score - 5);
|
|
111
|
+
src/tools/reconciliation\analyzer.ts:199: const insightId = `combination-${bankTxn.id}-${comboIds.join('+')}`;
|
|
112
|
+
src/tools/reconciliation\analyzer.ts:425: const discrepancy = clearedBalance - statementBalance;
|
|
113
|
+
src/tools/reconciliation\analyzer.ts:451: const dateRange = dates.length > 0 ? `${dates[0]} to ${dates[dates.length - 1]}` : 'Unknown';
|
|
114
|
+
src/tools/reconciliation\analyzer.ts:495: steps.push(`Review ${summary.auto_matched} auto-matched transactions for approval`);
|
|
115
|
+
src/tools/reconciliation\analyzer.ts:520: const formatter = new Intl.NumberFormat('en-US', {
|
|
116
|
+
src/tools/reconciliation\analyzer.ts:546: .sort((a, b) => b.txns.length - a.txns.length);
|
|
117
|
+
src/tools/reconciliation\analyzer.ts:554: id: `repeat-${top.amount.toFixed(2)}`,
|
|
118
|
+
src/tools/reconciliation\analyzer.ts:585: (match.confidence === 'medium' && score >= config.autoMatchThreshold - 5) ||
|
|
119
|
+
src/tools/reconciliation\analyzer.ts:595: id: `near-${bankTxn.id}`,
|
|
120
|
+
src/tools/reconciliation\analyzer.ts:633: id: 'balance-gap',
|
|
121
|
+
src/tools/reconciliation\analyzer.ts:650: id: 'bulk-missing-bank',
|
|
122
|
+
src/tools/reconciliation\analyzer.ts:720: * @param csvContent - CSV file content or file path
|
|
123
|
+
src/tools/reconciliation\analyzer.ts:721: * @param csvFilePath - Optional file path (if csvContent is a path)
|
|
124
|
+
src/tools/reconciliation\analyzer.ts:722: * @param ynabTransactions - YNAB transactions from API
|
|
125
|
+
src/tools/reconciliation\analyzer.ts:723: * @param statementBalance - Expected cleared balance from statement
|
|
126
|
+
src/tools/reconciliation\analyzer.ts:724: * @param config - Matching configuration
|
|
127
|
+
src/tools/reconciliation\analyzer.ts:725: * @param currency - Currency code (default: USD)
|
|
128
|
+
src/tools/reconciliation\analyzer.ts:726: * @param accountId - Account ID for recommendation context
|
|
129
|
+
src/tools/reconciliation\analyzer.ts:727: * @param budgetId - Budget ID for recommendation context
|
|
130
|
+
src/tools/reconciliation\analyzer.ts:728: * @param isLiabilityAccount - Whether this is a credit card/liability account (inverts transaction signs)
|
|
131
|
+
src/tools/reconciliation\analyzer.ts:749: amount: -txn.amount,
|
|
132
|
+
src/tools/reconciliation\reportFormatter.ts:2: * Human-readable report formatting for reconciliation results
|
|
133
|
+
src/tools/reconciliation\reportFormatter.ts:3: * Implements Phase 3 of dual-channel output improvements
|
|
134
|
+
src/tools/reconciliation\reportFormatter.ts:30: * Format the main human-readable reconciliation report
|
|
135
|
+
src/tools/reconciliation\reportFormatter.ts:141: lines.push(` ... and ${analysis.unmatched_bank.length - maxToShow} more`);
|
|
136
|
+
src/tools/reconciliation\reportFormatter.ts:157: lines.push(` ... and ${analysis.suggested_matches.length - maxToShow} more suggestions`);
|
|
137
|
+
src/tools/reconciliation\reportFormatter.ts:169: return ` ${txn.date} - ${txn.payee.substring(0, 40).padEnd(40)} ${amountStr}`;
|
|
138
|
+
src/tools/reconciliation\reportFormatter.ts:179: return ` ${bankTxn.date} - ${bankTxn.payee.substring(0, 35).padEnd(35)} ${amountStr} (${confidenceStr} confidence)`;
|
|
139
|
+
src/tools/reconciliation\reportFormatter.ts:186: const sign = amount >= 0 ? '+' : '-';
|
|
140
|
+
src/tools/reconciliation\reportFormatter.ts:217: lines.push(`... and ${insights.length - maxToShow} more insights (see structured output)`);
|
|
141
|
+
src/tools/reconciliation\reportFormatter.ts:280: lines.push(` ... and ${execution.recommendations.length - maxRecs} more`);
|
|
142
|
+
src/tools/reconciliation\reportFormatter.ts:354: lines.push(` ${txn.date} - ${payee.substring(0, 40).padEnd(40)} ${formatAmount(amount)}`);
|
|
143
|
+
src/tools/reconciliation\reportFormatter.ts:359: lines.push(` ... and ${transactions.length - maxItems} more`);
|
|
144
|
+
src/tools/reconciliation\matcher.ts:3: * Implements confidence-based matching with auto-match and suggestion tiers
|
|
145
|
+
src/tools/reconciliation\matcher.ts:24: const difference = Math.round(Math.abs(bankAmount - ynabDollars) * 100) / 100;
|
|
146
|
+
src/tools/reconciliation\matcher.ts:37: const diffMs = Math.abs(d1.getTime() - d2.getTime());
|
|
147
|
+
src/tools/reconciliation\matcher.ts:45: * Returns score 0-100 and match reasons
|
|
148
|
+
src/tools/reconciliation\matcher.ts:55: // Amount match (40% weight) - REQUIRED
|
|
149
|
+
src/tools/reconciliation\matcher.ts:68: (new Date(bankTxn.date).getTime() - new Date(ynabTxn.date).getTime()) / (1000 * 60 * 60 * 24),
|
|
150
|
+
src/tools/reconciliation\matcher.ts:124: // Skip opposite-signed transactions (refunds vs purchases)
|
|
151
|
+
src/tools/reconciliation\matcher.ts:144: return b.confidence - a.confidence;
|
|
152
|
+
src/tools/reconciliation\matcher.ts:146: const priorityDiff = getPriority(b.ynab_transaction) - getPriority(a.ynab_transaction);
|
|
153
|
+
src/tools/reconciliation\matcher.ts:151: new Date(bankTxn.date).getTime() - new Date(a.ynab_transaction.date).getTime(),
|
|
154
|
+
src/tools/reconciliation\matcher.ts:154: new Date(bankTxn.date).getTime() - new Date(b.ynab_transaction.date).getTime(),
|
|
155
|
+
src/tools/reconciliation\matcher.ts:156: return dateProximityA - dateProximityB;
|
|
156
|
+
src/tools/reconciliation\matcher.ts:163: * Build human-readable explanation for a match
|
|
157
|
+
src/tools/reconciliation\matcher.ts:177: parts.push('(Uncleared - awaiting confirmation)');
|
|
158
|
+
src/tools/reconciliation\matcher.ts:209: // HIGH confidence: Auto-match candidate (≥90%)
|
|
159
|
+
src/tools/reconciliation\matcher.ts:220: // MEDIUM confidence: Suggested match (60-89%)
|
|
160
|
+
src/tools/reconciliation\matcher.ts:234: // LOW confidence: Show as possible match but don't auto-suggest (30-59%)
|
|
161
|
+
src/tools/reconciliation\matcher.ts:262: // Mark high-confidence matches as used to prevent duplicate matching
|
|
162
|
+
src/tools/reconciliation\recommendationEngine.ts:42: * @param context - The recommendation context containing analysis results, IDs, and config
|
|
163
|
+
src/tools/reconciliation\recommendationEngine.ts:43: * @param context.account_id - The YNAB account ID for transaction operations
|
|
164
|
+
src/tools/reconciliation\recommendationEngine.ts:44: * @param context.budget_id - The YNAB budget ID (reserved for future category suggestions)
|
|
165
|
+
src/tools/reconciliation\recommendationEngine.ts:45: * @param context.analysis - The complete reconciliation analysis results
|
|
166
|
+
src/tools/reconciliation\recommendationEngine.ts:46: * @param context.matching_config - The matching configuration used during analysis
|
|
167
|
+
src/tools/reconciliation\recommendationEngine.ts:52: * budget_id: 'budget-456',
|
|
168
|
+
src/tools/reconciliation\recommendationEngine.ts:113: * @param match - The transaction match containing bank transaction and optional YNAB candidates
|
|
169
|
+
src/tools/reconciliation\recommendationEngine.ts:114: * @param context - The recommendation context for account/budget IDs and analysis data
|
|
170
|
+
src/tools/reconciliation\recommendationEngine.ts:392: // Suggested matches → review as potential duplicates or auto-match
|
|
171
|
+
src/tools/reconciliation\recommendationEngine.ts:414: * @param txn - The unmatched bank transaction
|
|
172
|
+
src/tools/reconciliation\recommendationEngine.ts:415: * @param context - The recommendation context for account ID and currency
|
|
173
|
+
src/tools/reconciliation\recommendationEngine.ts:460: * correspond to a bank statement entry. This is a low-priority suggestion since the
|
|
174
|
+
src/tools/reconciliation\recommendationEngine.ts:463: * @param txn - The unmatched YNAB transaction (must have cleared status of 'uncleared')
|
|
175
|
+
src/tools/reconciliation\recommendationEngine.ts:464: * @param context - The recommendation context for account ID and currency
|
|
176
|
+
src/tools/reconciliation\recommendationEngine.ts:500: const priorityDiff = PRIORITY_ORDER[b.priority] - PRIORITY_ORDER[a.priority];
|
|
177
|
+
src/tools/reconciliation\recommendationEngine.ts:504: return b.confidence - a.confidence;
|
|
178
|
+
src/tools/reconciliation\__tests__\adapter.causes.test.ts:10: statement_date_range: '2025-10-01 to 2025-10-31',
|
|
179
|
+
src/tools/reconciliation\__tests__\adapter.causes.test.ts:17: current_cleared_balance: -899.02,
|
|
180
|
+
src/tools/reconciliation\__tests__\adapter.causes.test.ts:18: target_statement_balance: -921.24,
|
|
181
|
+
src/tools/reconciliation\__tests__\adapter.causes.test.ts:27: current_cleared: -899.02,
|
|
182
|
+
src/tools/reconciliation\__tests__\adapter.causes.test.ts:29: current_total: -899.02,
|
|
183
|
+
src/tools/reconciliation\__tests__\adapter.causes.test.ts:30: target_statement: -921.24,
|
|
184
|
+
src/tools/reconciliation\__tests__\adapter.causes.test.ts:51: before: { balance: -899020, cleared_balance: -899020, uncleared_balance: 0 },
|
|
185
|
+
src/tools/reconciliation\__tests__\adapter.causes.test.ts:52: after: { balance: -921240, cleared_balance: -921240, uncleared_balance: 0 },
|
|
186
|
+
src/tools/reconciliation\__tests__\adapter.causes.test.ts:59: bank_statement_balance_milliunits: -921240,
|
|
187
|
+
src/tools/reconciliation\__tests__\adapter.causes.test.ts:60: ynab_calculated_balance_milliunits: -899020,
|
|
188
|
+
src/tools/reconciliation\__tests__\adapter.causes.test.ts:61: discrepancy_milliunits: -22220,
|
|
189
|
+
src/tools/reconciliation\__tests__\adapter.causes.test.ts:62: discrepancy_dollars: -22.22,
|
|
190
|
+
src/tools/reconciliation\__tests__\adapter.causes.test.ts:72: amount_milliunits: -1500,
|
|
191
|
+
src/tools/reconciliation\__tests__\adapter.causes.test.ts:100: accountId: 'acct-123',
|
|
192
|
+
src/tools/reconciliation\__tests__\schemaUrl.test.ts:9: statement_date_range: '2025-10-01 to 2025-10-31',
|
|
193
|
+
src/tools/reconciliation\__tests__\schemaUrl.test.ts:40: accountId: 'acct-id',
|
|
194
|
+
src/tools/reconciliation\__tests__\schemaUrl.test.ts:47: expect(schemaUrl).toContain('/docs/schemas/reconciliation-v2.json');
|
|
195
|
+
src/tools/reconciliation\__tests__\adapter.test.ts:11: value_display: value < 0 ? `-$${Math.abs(value).toFixed(2)}` : `$${value.toFixed(2)}`,
|
|
196
|
+
src/tools/reconciliation\__tests__\adapter.test.ts:23: statement_date_range: '2025-10-01 to 2025-10-31',
|
|
197
|
+
src/tools/reconciliation\__tests__\adapter.test.ts:30: current_cleared_balance: makeMoney(-899.02),
|
|
198
|
+
src/tools/reconciliation\__tests__\adapter.test.ts:31: target_statement_balance: makeMoney(-921.24),
|
|
199
|
+
src/tools/reconciliation\__tests__\adapter.test.ts:38: id: 'bank-1',
|
|
200
|
+
src/tools/reconciliation\__tests__\adapter.test.ts:39: date: '2025-10-15',
|
|
201
|
+
src/tools/reconciliation\__tests__\adapter.test.ts:40: amount: -45.23,
|
|
202
|
+
src/tools/reconciliation\__tests__\adapter.test.ts:45: id: 'ynab-1',
|
|
203
|
+
src/tools/reconciliation\__tests__\adapter.test.ts:46: date: '2025-10-14',
|
|
204
|
+
src/tools/reconciliation\__tests__\adapter.test.ts:47: amount: -45230,
|
|
205
|
+
src/tools/reconciliation\__tests__\adapter.test.ts:64: id: 'bank-2',
|
|
206
|
+
src/tools/reconciliation\__tests__\adapter.test.ts:65: date: '2025-10-20',
|
|
207
|
+
src/tools/reconciliation\__tests__\adapter.test.ts:66: amount: -60,
|
|
208
|
+
src/tools/reconciliation\__tests__\adapter.test.ts:73: id: 'ynab-2',
|
|
209
|
+
src/tools/reconciliation\__tests__\adapter.test.ts:74: date: '2025-10-19',
|
|
210
|
+
src/tools/reconciliation\__tests__\adapter.test.ts:75: amount: -60000,
|
|
211
|
+
src/tools/reconciliation\__tests__\adapter.test.ts:94: id: 'bank-3',
|
|
212
|
+
src/tools/reconciliation\__tests__\adapter.test.ts:95: date: '2025-10-25',
|
|
213
|
+
src/tools/reconciliation\__tests__\adapter.test.ts:103: id: 'ynab-3',
|
|
214
|
+
src/tools/reconciliation\__tests__\adapter.test.ts:104: date: '2025-10-26',
|
|
215
|
+
src/tools/reconciliation\__tests__\adapter.test.ts:105: amount: -15000,
|
|
216
|
+
src/tools/reconciliation\__tests__\adapter.test.ts:113: current_cleared: makeMoney(-899.02),
|
|
217
|
+
src/tools/reconciliation\__tests__\adapter.test.ts:114: current_uncleared: makeMoney(-45.23),
|
|
218
|
+
src/tools/reconciliation\__tests__\adapter.test.ts:115: current_total: makeMoney(-944.25),
|
|
219
|
+
src/tools/reconciliation\__tests__\adapter.test.ts:116: target_statement: makeMoney(-921.24),
|
|
220
|
+
src/tools/reconciliation\__tests__\adapter.test.ts:120: next_steps: ['Review 2 auto-matched transactions', 'Add missing bank transaction'],
|
|
221
|
+
src/tools/reconciliation\__tests__\adapter.test.ts:123: id: 'repeat-22.22',
|
|
222
|
+
src/tools/reconciliation\__tests__\adapter.test.ts:137: accountId: 'account-123',
|
|
223
|
+
src/tools/reconciliation\__tests__\adapter.test.ts:146: expect(structured.summary.current_cleared_balance.value_display).toBe('-$899.02');
|
|
224
|
+
src/tools/reconciliation\__tests__\adapter.test.ts:149: expect(structured.matches.auto[0].bank_transaction.amount_money.value_milliunits).toBe(-45230);
|
|
225
|
+
src/tools/reconciliation\__tests__\adapter.test.ts:166: before: { balance: -899020, cleared_balance: -899020, uncleared_balance: 0 },
|
|
226
|
+
src/tools/reconciliation\__tests__\adapter.test.ts:167: after: { balance: -921240, cleared_balance: -921240, uncleared_balance: 0 },
|
|
227
|
+
src/tools/reconciliation\__tests__\adapter.test.ts:172: transaction: { id: 'txn-1' },
|
|
228
|
+
src/tools/reconciliation\__tests__\adapter.test.ts:183: bank_statement_balance_milliunits: -921240,
|
|
229
|
+
src/tools/reconciliation\__tests__\adapter.test.ts:184: ynab_calculated_balance_milliunits: -899020,
|
|
230
|
+
src/tools/reconciliation\__tests__\adapter.test.ts:185: discrepancy_milliunits: -22220,
|
|
231
|
+
src/tools/reconciliation\__tests__\adapter.test.ts:186: discrepancy_dollars: -22.22,
|
|
232
|
+
src/tools/reconciliation\__tests__\adapter.test.ts:215: accountId: 'account-123',
|
|
233
|
+
src/tools/reconciliation\__tests__\adapter.test.ts:225: -921240,
|
|
234
|
+
src/tools/reconciliation\__tests__\adapter.test.ts:231: ).toBe('-CA$22.22');
|
|
235
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:30: account_id: 'test-account',
|
|
236
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:35: category_id: 'test-category',
|
|
237
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:36: payee_id: 'test-payee',
|
|
238
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:52: const csvContent = 'Date,Description,Amount\n2024-01-15,Coffee Shop,22.22';
|
|
239
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:68: 'test-account-id',
|
|
240
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:69: 'test-budget-id',
|
|
241
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:80: expect(rec.account_id).toBe('test-account-id');
|
|
242
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:85: expect(rec.parameters.date).toBe('2024-01-15');
|
|
243
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:95: // Should generate high-priority create_transaction recommendation
|
|
244
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:97: const csvContent = 'Date,Description,Amount\n2024-01-15,EvoCarShare,22.22\n2024-01-10,Grocery Store,100.00';
|
|
245
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:100: createYNABTransaction('ynab-1', '2024-01-10', 100000, 'Grocery Store', 'cleared'),
|
|
246
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:116: 'test-account-id',
|
|
247
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:117: 'test-budget-id',
|
|
248
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:134: expect(evoCarShareRec!.parameters.date).toBe('2024-01-15');
|
|
249
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:140: const csvContent = 'Date,Description,Amount\n2024-01-15,Coffee Shop,10.00';
|
|
250
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:143: createYNABTransaction('ynab-1', '2024-01-15', 10000, 'Coffee Shop', 'uncleared'),
|
|
251
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:159: 'test-account-id',
|
|
252
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:160: 'test-budget-id',
|
|
253
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:170: // Depending on matching score, this could be an auto-match (no recommendation)
|
|
254
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:185: // Create a near match that should be suggested but not auto-matched
|
|
255
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:186: const csvContent = 'Date,Description,Amount\n2024-01-15,Amazon Online Purchase,49.99';
|
|
256
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:190: 'ynab-1',
|
|
257
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:191: '2024-01-14', // 1 day off
|
|
258
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:211: 'test-account-id',
|
|
259
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:212: 'test-budget-id',
|
|
260
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:231: const csvContent = 'Date,Description,Amount\n2024-01-15,Test Transaction,10.00';
|
|
261
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:258: 'Date,Description,Amount\n2024-01-15,Store A,25.00\n2024-01-16,Store B,35.00';
|
|
262
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:261: createYNABTransaction('ynab-1', '2024-01-15', 25000, 'Store A', 'cleared'),
|
|
263
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:295:2024-01-15,Coffee Shop,5.00
|
|
264
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:296:2024-01-16,Gas Station,45.00
|
|
265
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:297:2024-01-17,Restaurant,25.00`;
|
|
266
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:314: 'test-account-id',
|
|
267
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:315: 'test-budget-id',
|
|
268
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:330:2024-01-15,Netflix,15.99
|
|
269
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:331:2024-02-15,Netflix,15.99
|
|
270
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:332:2024-03-15,Netflix,15.99`;
|
|
271
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:349: 'test-account-id',
|
|
272
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:350: 'test-budget-id',
|
|
273
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:370:2024-01-15,New Store,25.00
|
|
274
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:371:2024-01-16,Coffee,5.00
|
|
275
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:372:2024-01-17,Gas Station,45.00`;
|
|
276
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:375: // Near match - might be Coffee
|
|
277
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:376: createYNABTransaction('ynab-1', '2024-01-16', 4500, 'Starbucks Coffee', 'uncleared'),
|
|
278
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:377: // Exact amount but different payee - might be Gas Station
|
|
279
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:378: createYNABTransaction('ynab-2', '2024-01-17', 45000, 'Shell', 'uncleared'),
|
|
280
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:380: createYNABTransaction('ynab-3', '2024-01-10', 10000, 'Grocery', 'uncleared'),
|
|
281
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:396: 'test-account-id',
|
|
282
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:397: 'test-budget-id',
|
|
283
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:418: expect(rec.account_id).toBe('test-account-id');
|
|
284
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:427:2024-01-15,Important Transaction,100.00
|
|
285
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:428:2024-01-16,Small Purchase,5.00
|
|
286
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:429:2024-01-17,Medium Transaction,25.00`;
|
|
287
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:446: 'test-account-id',
|
|
288
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:447: 'test-budget-id',
|
|
289
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:457: for (let i = 0; i < priorities.length - 1; i++) {
|
|
290
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:466:2024-01-15,Large Transaction A,500.00
|
|
291
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:467:2024-01-16,Large Transaction B,750.00
|
|
292
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:468:2024-01-17,Large Transaction C,1000.00`;
|
|
293
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:471: createYNABTransaction('ynab-1', '2024-01-15', 500000, 'Transaction A', 'cleared'),
|
|
294
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:487: 'test-account-id',
|
|
295
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:488: 'test-budget-id',
|
|
296
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:514: const csvContent = 'Date,Description,Amount\n2024-01-15,Test,10.00';
|
|
297
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:530: 'test-account-id',
|
|
298
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:531: 'test-budget-id',
|
|
299
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:552: expect(rec.account_id).toBe('test-account-id');
|
|
300
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:560: // Action-specific fields
|
|
301
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:569: const csvContent = 'Date,Description,Amount\n2024-01-15,Test Store,25.50';
|
|
302
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:585: 'test-account-id',
|
|
303
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:586: 'test-budget-id',
|
|
304
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:594: expect(createRec!.parameters.account_id).toBe('test-account-id');
|
|
305
|
+
src/tools/reconciliation\__tests__\recommendationEngine.integration.test.ts:595: expect(createRec!.parameters.date).toBe('2024-01-15');
|
|
306
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:23: date: '2025-10-15',
|
|
307
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:24: amount: -45.23,
|
|
308
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:32: date: '2025-10-15',
|
|
309
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:33: amount: -45230, // milliunits
|
|
310
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:51: date: '2025-10-15',
|
|
311
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:52: amount: -100.0,
|
|
312
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:60: date: '2025-10-15',
|
|
313
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:61: amount: -100000,
|
|
314
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:78: date: '2025-10-15',
|
|
315
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:79: amount: -50.0,
|
|
316
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:87: date: '2025-10-14', // 1 day difference
|
|
317
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:88: amount: -50000,
|
|
318
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:103: describe('medium confidence matches (60-89%)', () => {
|
|
319
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:107: date: '2025-10-20',
|
|
320
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:108: amount: -127.43,
|
|
321
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:116: date: '2025-10-20',
|
|
322
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:117: amount: -127430,
|
|
323
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:137: date: '2025-10-15',
|
|
324
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:138: amount: -50.0,
|
|
325
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:146: date: '2025-10-15',
|
|
326
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:147: amount: -50000,
|
|
327
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:155: date: '2025-10-16',
|
|
328
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:156: amount: -50000,
|
|
329
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:176: date: '2025-10-15',
|
|
330
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:177: amount: -45.23,
|
|
331
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:185: date: '2025-10-15',
|
|
332
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:186: amount: -100000, // Different amount
|
|
333
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:201: it('should not match opposite-signed transactions', () => {
|
|
334
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:204: date: '2025-10-15',
|
|
335
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:213: date: '2025-10-15',
|
|
336
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:214: amount: -50000, // Negative (purchase)
|
|
337
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:233: date: '2025-10-15',
|
|
338
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:234: amount: -50.0,
|
|
339
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:242: date: '2025-10-15',
|
|
340
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:243: amount: -50000,
|
|
341
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:251: date: '2025-10-15',
|
|
342
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:252: amount: -50000,
|
|
343
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:269: date: '2025-10-15',
|
|
344
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:270: amount: -50.0,
|
|
345
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:278: date: '2025-10-13', // 2 days away
|
|
346
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:279: amount: -50000,
|
|
347
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:287: date: '2025-10-14', // 1 day away
|
|
348
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:288: amount: -50000,
|
|
349
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:307: date: '2025-10-15',
|
|
350
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:308: amount: -45.23,
|
|
351
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:316: date: '2025-10-15',
|
|
352
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:317: amount: -45240, // $45.24 - within 1 cent tolerance
|
|
353
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:336: date: '2025-10-15',
|
|
354
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:337: amount: -45.0,
|
|
355
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:345: date: '2025-10-15',
|
|
356
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:346: amount: -45050, // $45.05 - outside 1 cent tolerance
|
|
357
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:361: it('should skip already-used YNAB transaction IDs', () => {
|
|
358
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:364: date: '2025-10-15',
|
|
359
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:365: amount: -50.0,
|
|
360
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:373: date: '2025-10-15',
|
|
361
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:374: amount: -50000,
|
|
362
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:396: date: '2025-10-15',
|
|
363
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:397: amount: -45.23,
|
|
364
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:403: date: '2025-10-16',
|
|
365
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:404: amount: -100.0,
|
|
366
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:413: date: '2025-10-15',
|
|
367
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:414: amount: -45230,
|
|
368
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:422: date: '2025-10-16',
|
|
369
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:423: amount: -100000,
|
|
370
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:442: date: '2025-10-15',
|
|
371
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:443: amount: -50.0,
|
|
372
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:449: date: '2025-10-15',
|
|
373
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:450: amount: -50.0,
|
|
374
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:459: date: '2025-10-15',
|
|
375
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:460: amount: -50000,
|
|
376
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:484: date: '2025-10-15',
|
|
377
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:485: amount: -45.23,
|
|
378
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:491: date: '2025-10-16',
|
|
379
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:492: amount: -15.99,
|
|
380
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:501: date: '2025-10-15',
|
|
381
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:502: amount: -45230,
|
|
382
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:530: date: '2025-10-15',
|
|
383
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:531: amount: -50.0,
|
|
384
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:540: date: '2025-10-11', // 4 days difference (within custom tolerance)
|
|
385
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:541: amount: -50090, // $50.09 (within custom tolerance)
|
|
386
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:559: date: '2025-10-15',
|
|
387
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:560: amount: -50.0,
|
|
388
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:574: date: '2025-10-15',
|
|
389
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:575: amount: -50.0,
|
|
390
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:583: date: '2025-10-15',
|
|
391
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:584: amount: -50000,
|
|
392
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:601: date: '2025-10-15',
|
|
393
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:602: amount: -0.01,
|
|
394
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:610: date: '2025-10-15',
|
|
395
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:611: amount: -10, // 1 cent in milliunits
|
|
396
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:627: date: '2025-10-15',
|
|
397
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:628: amount: -10000.0,
|
|
398
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:636: date: '2025-10-15',
|
|
399
|
+
src/tools/reconciliation\__tests__\matcher.test.ts:637: amount: -10000000, // $10,000 in milliunits
|
|
400
|
+
src/tools/reconciliation\__tests__\executor.test.ts:10: statement_date_range: '2025-10-01 to 2025-10-31',
|
|
401
|
+
src/tools/reconciliation\__tests__\executor.test.ts:17: current_cleared_balance: -899.02,
|
|
402
|
+
src/tools/reconciliation\__tests__\executor.test.ts:18: target_statement_balance: -921.24,
|
|
403
|
+
src/tools/reconciliation\__tests__\executor.test.ts:25: id: 'bank-1',
|
|
404
|
+
src/tools/reconciliation\__tests__\executor.test.ts:26: date: '2025-10-15',
|
|
405
|
+
src/tools/reconciliation\__tests__\executor.test.ts:27: amount: -45.23,
|
|
406
|
+
src/tools/reconciliation\__tests__\executor.test.ts:32: id: 'ynab-1',
|
|
407
|
+
src/tools/reconciliation\__tests__\executor.test.ts:33: date: '2025-10-14',
|
|
408
|
+
src/tools/reconciliation\__tests__\executor.test.ts:34: amount: -45230,
|
|
409
|
+
src/tools/reconciliation\__tests__\executor.test.ts:50: id: 'bank-2',
|
|
410
|
+
src/tools/reconciliation\__tests__\executor.test.ts:51: date: '2025-10-25',
|
|
411
|
+
src/tools/reconciliation\__tests__\executor.test.ts:59: id: 'ynab-2',
|
|
412
|
+
src/tools/reconciliation\__tests__\executor.test.ts:60: date: '2025-10-10',
|
|
413
|
+
src/tools/reconciliation\__tests__\executor.test.ts:61: amount: -15000,
|
|
414
|
+
src/tools/reconciliation\__tests__\executor.test.ts:70: current_cleared: -899.02,
|
|
415
|
+
src/tools/reconciliation\__tests__\executor.test.ts:71: current_uncleared: -45.23,
|
|
416
|
+
src/tools/reconciliation\__tests__\executor.test.ts:72: current_total: -944.25,
|
|
417
|
+
src/tools/reconciliation\__tests__\executor.test.ts:73: target_statement: -921.24,
|
|
418
|
+
src/tools/reconciliation\__tests__\executor.test.ts:85: budget_id: 'budget-1',
|
|
419
|
+
src/tools/reconciliation\__tests__\executor.test.ts:86: account_id: 'account-1',
|
|
420
|
+
src/tools/reconciliation\__tests__\executor.test.ts:88: statement_balance: -921.24,
|
|
421
|
+
src/tools/reconciliation\__tests__\executor.test.ts:104: balance: -899020,
|
|
422
|
+
src/tools/reconciliation\__tests__\executor.test.ts:105: cleared_balance: -899020,
|
|
423
|
+
src/tools/reconciliation\__tests__\executor.test.ts:113: budgetId: 'budget-1',
|
|
424
|
+
src/tools/reconciliation\__tests__\executor.test.ts:114: accountId: 'account-1',
|
|
425
|
+
src/tools/reconciliation\__tests__\executor.test.ts:124: 'Dry run only — re-run with dry_run=false to apply these changes',
|
|
426
|
+
src/tools/reconciliation\__tests__\executor.test.ts:133: budget_id: 'budget-apply',
|
|
427
|
+
src/tools/reconciliation\__tests__\executor.test.ts:134: account_id: 'account-apply',
|
|
428
|
+
src/tools/reconciliation\__tests__\executor.test.ts:136: statement_balance: -921.24,
|
|
429
|
+
src/tools/reconciliation\__tests__\executor.test.ts:137: statement_date: '2025-10-31',
|
|
430
|
+
src/tools/reconciliation\__tests__\executor.test.ts:153: balance: -899020,
|
|
431
|
+
src/tools/reconciliation\__tests__\executor.test.ts:154: cleared_balance: -899020,
|
|
432
|
+
src/tools/reconciliation\__tests__\executor.test.ts:158: const mockCreate = vi.fn().mockResolvedValue({ data: { transaction: { id: 'created-1' } } });
|
|
433
|
+
src/tools/reconciliation\__tests__\executor.test.ts:159: const mockUpdate = vi.fn().mockResolvedValue({ data: { transaction: { id: 'updated-1' } } });
|
|
434
|
+
src/tools/reconciliation\__tests__\executor.test.ts:161: data: { account: { balance: -921240, cleared_balance: -921240, uncleared_balance: 0 } },
|
|
435
|
+
src/tools/reconciliation\__tests__\executor.test.ts:183: budgetId: 'budget-apply',
|
|
436
|
+
src/tools/reconciliation\__tests__\executor.test.ts:184: accountId: 'account-apply',
|
|
437
|
+
src/tools/reconciliation\__tests__\executor.test.ts:206: statement_date_range: '2025-09-01 to 2025-10-31',
|
|
438
|
+
src/tools/reconciliation\__tests__\executor.test.ts:215: discrepancy: -10,
|
|
439
|
+
src/tools/reconciliation\__tests__\executor.test.ts:221: id: 'bank-older',
|
|
440
|
+
src/tools/reconciliation\__tests__\executor.test.ts:222: date: '2025-09-15',
|
|
441
|
+
src/tools/reconciliation\__tests__\executor.test.ts:228: id: 'ynab-older',
|
|
442
|
+
src/tools/reconciliation\__tests__\executor.test.ts:229: date: '2025-09-14',
|
|
443
|
+
src/tools/reconciliation\__tests__\executor.test.ts:244: id: 'bank-newer',
|
|
444
|
+
src/tools/reconciliation\__tests__\executor.test.ts:245: date: '2025-10-25',
|
|
445
|
+
src/tools/reconciliation\__tests__\executor.test.ts:251: id: 'ynab-newer',
|
|
446
|
+
src/tools/reconciliation\__tests__\executor.test.ts:252: date: '2025-10-24',
|
|
447
|
+
src/tools/reconciliation\__tests__\executor.test.ts:274: discrepancy: -10,
|
|
448
|
+
src/tools/reconciliation\__tests__\executor.test.ts:282: budget_id: 'budget-ordered',
|
|
449
|
+
src/tools/reconciliation\__tests__\executor.test.ts:283: account_id: 'account-ordered',
|
|
450
|
+
src/tools/reconciliation\__tests__\executor.test.ts:310: budgetId: 'budget-ordered',
|
|
451
|
+
src/tools/reconciliation\__tests__\executor.test.ts:311: accountId: 'account-ordered',
|
|
452
|
+
src/tools/reconciliation\__tests__\executor.test.ts:320: expect((updateActions[0]?.transaction as any)?.transaction_id).toBe('ynab-newer');
|
|
453
|
+
src/tools/reconciliation\__tests__\payeeNormalizer.test.ts:26: expect(normalizePayee('Shell #1234 - Oakville, ON')).toBe('shell1234oakvilleon');
|
|
454
|
+
src/tools/reconciliation\__tests__\payeeNormalizer.test.ts:31: expect(normalizePayee('Hello_World-2024')).toBe('helloworld2024');
|
|
455
|
+
src/tools/reconciliation\__tests__\payeeNormalizer.test.ts:43: it('should handle real-world examples', () => {
|
|
456
|
+
src/tools/reconciliation\__tests__\payeeNormalizer.test.ts:57: expect(normalizedMatch('Amazon Prime', 'amazon-prime')).toBe(true);
|
|
457
|
+
src/tools/reconciliation\__tests__\payeeNormalizer.test.ts:81: it('should match real-world examples', () => {
|
|
458
|
+
src/tools/reconciliation\__tests__\payeeNormalizer.test.ts:117: // 'shell' -> 'shells' requires 1 insertion
|
|
459
|
+
src/tools/reconciliation\__tests__\payeeNormalizer.test.ts:121: // 'kitten' -> 'sitting' requires 3 operations
|
|
460
|
+
src/tools/reconciliation\__tests__\payeeNormalizer.test.ts:127: it('should handle real-world payee variations', () => {
|
|
461
|
+
src/tools/reconciliation\__tests__\payeeNormalizer.test.ts:153: // After normalization: 'amazonprime123' -> tokens ['amazonprime', '123']
|
|
462
|
+
src/tools/reconciliation\__tests__\payeeNormalizer.test.ts:154: // 'amazonprime456' -> tokens ['amazonprime', '456']
|
|
463
|
+
src/tools/reconciliation\__tests__\payeeNormalizer.test.ts:174: it('should handle real-world examples', () => {
|
|
464
|
+
src/tools/reconciliation\__tests__\payeeNormalizer.test.ts:207: describe('real-world examples from design spec', () => {
|
|
465
|
+
src/tools/reconciliation\__tests__\payeeNormalizer.test.ts:265: expect(normalizePayee('Café René')).toBe('cafren'); // Non-ASCII normalized
|
|
466
|
+
src/tools/reconciliation\__tests__\payeeNormalizer.test.ts:266: expect(normalizePayee('日本語')).toBe(''); // All non-alphanumeric removed
|
|
467
|
+
src/tools/reconciliation\index.ts:2: * Reconciliation tool - Phase 1: Analysis Only
|
|
468
|
+
src/tools/reconciliation\index.ts:21:// Re-export types for external use
|
|
469
|
+
src/tools/reconciliation\index.ts:105: * execution of reconciliation actions. Returns human-readable narrative and
|
|
470
|
+
src/tools/reconciliation\index.ts:148: ? -Math.abs(params.statement_balance)
|
|
471
|
+
src/tools/reconciliation\index.ts:155: // Auto-detect date range from CSV if not explicitly provided
|
|
472
|
+
src/tools/reconciliation\index.ts:162: // Auto-detect from CSV content
|
|
473
|
+
src/tools/reconciliation\index.ts:181: // Add 7-day buffer before min date for pending transactions
|
|
474
|
+
src/tools/reconciliation\index.ts:183: minDateObj.setDate(minDateObj.getDate() - 7);
|
|
475
|
+
src/tools/reconciliation\index.ts:187: sinceDate = new Date(Date.now() - 90 * 24 * 60 * 60 * 1000);
|
|
476
|
+
src/tools/reconciliation\index.ts:253: // Build response content - always include human narrative
|
|
477
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:22: value_display: value < 0 ? `-$${Math.abs(value).toFixed(2)}` : `$${value.toFixed(2)}`,
|
|
478
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:39: statement_date_range: '2025-10-01 to 2025-10-31',
|
|
479
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:46: current_cleared_balance: makeMoney(-899.02),
|
|
480
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:47: target_statement_balance: makeMoney(-921.24),
|
|
481
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:56: current_cleared: makeMoney(-899.02),
|
|
482
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:57: current_uncleared: makeMoney(-50.0),
|
|
483
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:58: current_total: makeMoney(-949.02),
|
|
484
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:59: target_statement: makeMoney(-921.24),
|
|
485
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:75: date = '2025-10-15',
|
|
486
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:91: date = '2025-10-15',
|
|
487
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:133: balance: -899020,
|
|
488
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:134: cleared_balance: -899020,
|
|
489
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:138: balance: -899020,
|
|
490
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:139: cleared_balance: -899020,
|
|
491
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:169: expect(report).toContain('Statement Period: 2025-10-01 to 2025-10-31');
|
|
492
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:175: current_cleared: makeMoney(-921.24),
|
|
493
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:177: current_total: makeMoney(-921.24),
|
|
494
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:178: target_statement: makeMoney(-921.24),
|
|
495
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:197: current_cleared: makeMoney(-900.0),
|
|
496
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:199: current_total: makeMoney(-900.0),
|
|
497
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:200: target_statement: makeMoney(-920.0),
|
|
498
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:219: current_cleared: makeMoney(-920.0),
|
|
499
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:221: current_total: makeMoney(-920.0),
|
|
500
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:222: target_statement: makeMoney(-900.0),
|
|
501
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:223: discrepancy: makeMoney(-20.0), // Negative means bank higher
|
|
502
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:228: discrepancy: makeMoney(-20.0),
|
|
503
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:234: expect(report).toContain('❌ DISCREPANCY: -$20.00');
|
|
504
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:251: createBankTransaction('bank-1', -22.22, 'EvoCarShare', '2025-10-25'),
|
|
505
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:252: createBankTransaction('bank-2', -15.0, 'Coffee Shop', '2025-10-26'),
|
|
506
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:259: expect(report).toContain('2025-10-25');
|
|
507
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:261: expect(report).toContain('-$22.22');
|
|
508
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:268: unmatchedBank.push(createBankTransaction(`bank-${i}`, -10.0, `Payee ${i}`, '2025-10-15'));
|
|
509
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:281: bank_transaction: createBankTransaction('bank-1', -60.0, 'Amazon', '2025-10-20'),
|
|
510
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:442: current_cleared: makeMoney(-899.02),
|
|
511
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:443: current_uncleared: makeMoney(-50.0),
|
|
512
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:444: current_total: makeMoney(-949.02),
|
|
513
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:445: target_statement: makeMoney(-921.24),
|
|
514
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:452: expect(formatted).toContain('Current Cleared: -$899.02');
|
|
515
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:453: expect(formatted).toContain('Current Total: -$949.02');
|
|
516
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:454: expect(formatted).toContain('Target Statement: -$921.24');
|
|
517
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:462: createBankTransaction('1', -45.23, 'Shell Gas', '2025-10-15'),
|
|
518
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:463: createBankTransaction('2', -60.0, 'Amazon', '2025-10-20'),
|
|
519
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:468: expect(formatted).toContain('2025-10-15');
|
|
520
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:470: expect(formatted).toContain('-$45.23');
|
|
521
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:476: createYNABTransaction('1', -45230, 'Shell', '2025-10-15'),
|
|
522
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:477: createYNABTransaction('2', -60000, 'Amazon', '2025-10-20'),
|
|
523
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:482: expect(formatted).toContain('2025-10-15');
|
|
524
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:484: expect(formatted).toContain('-$45.23');
|
|
525
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:486: expect(formatted).toContain('-$60.00');
|
|
526
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:492: transactions.push(createBankTransaction(`${i}`, -10.0, `Payee ${i}`, '2025-10-15'));
|
|
527
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:509: unmatched_bank: [createBankTransaction('1', -123.45, 'Test', '2025-10-15')],
|
|
528
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:513: expect(report).toContain('-$123.45');
|
|
529
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:518: unmatched_bank: [createBankTransaction('1', 123.45, 'Refund', '2025-10-15')],
|
|
530
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:528: unmatched_bank: [createBankTransaction('1', -10.0, longPayee, '2025-10-15')],
|
|
531
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:540: current_cleared: makeMoney(-921.24),
|
|
532
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:542: current_total: makeMoney(-921.24),
|
|
533
|
+
src/tools/reconciliation\__tests__\reportFormatter.test.ts:543: target_statement: makeMoney(-921.24),
|
|
534
|
+
src/tools/reconciliation\__tests__\recommendationEngine.test.ts:43: statement_date_range: '2024-01-01 to 2024-01-31',
|
|
535
|
+
src/tools/reconciliation\__tests__\recommendationEngine.test.ts:60: account_id: 'test-account-id',
|
|
536
|
+
src/tools/reconciliation\__tests__\recommendationEngine.test.ts:61: budget_id: 'test-budget-id',
|
|
537
|
+
src/tools/reconciliation\__tests__\recommendationEngine.test.ts:76: id: 'bank-txn-1',
|
|
538
|
+
src/tools/reconciliation\__tests__\recommendationEngine.test.ts:77: date: '2024-01-15',
|
|
539
|
+
src/tools/reconciliation\__tests__\recommendationEngine.test.ts:78: amount: -50.0,
|
|
540
|
+
src/tools/reconciliation\__tests__\recommendationEngine.test.ts:87: id: 'ynab-txn-1',
|
|
541
|
+
src/tools/reconciliation\__tests__\recommendationEngine.test.ts:88: date: '2024-01-15',
|
|
542
|
+
src/tools/reconciliation\__tests__\recommendationEngine.test.ts:89: amount: -50000,
|
|
543
|
+
src/tools/reconciliation\__tests__\recommendationEngine.test.ts:103: id: `insight-${type}-1`,
|
|
544
|
+
src/tools/reconciliation\__tests__\recommendationEngine.test.ts:239: id: 'bank-1',
|
|
545
|
+
src/tools/reconciliation\__tests__\recommendationEngine.test.ts:240: amount: -75.5,
|
|
546
|
+
src/tools/reconciliation\__tests__\recommendationEngine.test.ts:242: date: '2024-01-20',
|
|
547
|
+
src/tools/reconciliation\__tests__\recommendationEngine.test.ts:259: expect(rec.parameters.account_id).toBe('test-account-id');
|
|
548
|
+
src/tools/reconciliation\__tests__\recommendationEngine.test.ts:260: expect(rec.parameters.date).toBe('2024-01-20');
|
|
549
|
+
src/tools/reconciliation\__tests__\recommendationEngine.test.ts:261: expect(rec.parameters.amount).toBe(-75500); // In milliunits
|
|
550
|
+
src/tools/reconciliation\__tests__\recommendationEngine.test.ts:304: createBankTransaction({ id: 'b1', amount: -10.0 }),
|
|
551
|
+
src/tools/reconciliation\__tests__\recommendationEngine.test.ts:305: createBankTransaction({ id: 'b2', amount: -20.0 }),
|
|
552
|
+
src/tools/reconciliation\__tests__\recommendationEngine.test.ts:306: createBankTransaction({ id: 'b3', amount: -30.0 }),
|
|
553
|
+
src/tools/reconciliation\__tests__\recommendationEngine.test.ts:326: id: 'ynab-1',
|
|
554
|
+
src/tools/reconciliation\__tests__\recommendationEngine.test.ts:345: expect(rec.parameters.transaction_id).toBe('ynab-1');
|
|
555
|
+
src/tools/reconciliation\__tests__\recommendationEngine.test.ts:436: const bankTxn = createBankTransaction({ amount: -45.0 });
|
|
556
|
+
src/tools/reconciliation\__tests__\recommendationEngine.test.ts:459: expect(rec.parameters.amount).toBe(-45000); // In milliunits
|
|
557
|
+
src/tools/reconciliation\__tests__\recommendationEngine.test.ts:463: const bankTxn = createBankTransaction({ amount: -100.0, payee: 'Split Payment' });
|
|
558
|
+
src/tools/reconciliation\__tests__\recommendationEngine.test.ts:464: const ynabTxn1 = createYNABTransaction({ id: 'y1', amount: -50000, payee_name: 'Vendor A' });
|
|
559
|
+
src/tools/reconciliation\__tests__\recommendationEngine.test.ts:465: const ynabTxn2 = createYNABTransaction({ id: 'y2', amount: -50000, payee_name: 'Vendor B' });
|
|
560
|
+
src/tools/reconciliation\__tests__\recommendationEngine.test.ts:517: expect(rec.metadata?.bank_transaction_amount.value).toBe(-100.0);
|
|
561
|
+
src/tools/reconciliation\__tests__\recommendationEngine.test.ts:519: expect(rec.metadata?.candidate_total_amount.value).toBe(-100.0); // -50 + -50
|
|
562
|
+
src/tools/reconciliation\__tests__\recommendationEngine.test.ts:527: amount: -123.45,
|
|
563
|
+
src/tools/reconciliation\__tests__\recommendationEngine.test.ts:541: expect(rec.parameters.amount).toBe(-123450); // In milliunits
|
|
564
|
+
src/tools/reconciliation\__tests__\recommendationEngine.test.ts:543: expect(rec.estimated_impact.value).toBe(-123.45); // Estimated impact stays in dollars
|
|
565
|
+
src/tools/reconciliation\__tests__\recommendationEngine.test.ts:568: const bankTxn = createBankTransaction({ amount: -99.99 });
|
|
566
|
+
src/tools/reconciliation\__tests__\recommendationEngine.test.ts:587: expect(rec.parameters.amount).toBe(-99990); // In milliunits
|
|
567
|
+
src/tools/reconciliation\__tests__\recommendationEngine.test.ts:705: expect(rec.account_id).toBe('test-account-id');
|
|
568
|
+
src/tools/reconciliation\__tests__\recommendationEngine.test.ts:733: const bankTxn = createBankTransaction({ amount: -50.0 });
|
|
569
|
+
src/tools/reconciliation\__tests__\recommendationEngine.test.ts:751: it('should include enhanced metadata in insight-based manual review recommendations', () => {
|
|
570
|
+
src/tools/reconciliation\__tests__\recommendationEngine.test.ts:759: discrepancy: makeMoney(-100, 'USD'),
|
|
571
|
+
src/tools/reconciliation\__tests__\recommendationEngine.test.ts:772: expect(rec.metadata?.current_discrepancy.value).toBe(-100);
|
|
572
|
+
src/tools/reconciliation\__tests__\recommendationEngine.test.ts:777: it('should include enhanced metadata for all insight-based recommendation types', () => {
|
|
573
|
+
src/tools/reconciliation\__tests__\recommendationEngine.test.ts:788: discrepancy: makeMoney(-250.75, 'CAD'),
|
|
574
|
+
src/tools/reconciliation\__tests__\recommendationEngine.test.ts:797: // All insight-based recommendations should have enhanced metadata
|
|
575
|
+
src/tools/reconciliation\__tests__\recommendationEngine.test.ts:803: expect(manualRec.metadata?.current_discrepancy.value).toBe(-250.75);
|
|
576
|
+
src/tools/reconciliation\__tests__\recommendationEngine.test.ts:863: createBankTransaction({ id: `b${i}`, amount: -10.0 - i }),
|
|
577
|
+
src/tools/reconciliation\__tests__\recommendationEngine.test.ts:877: for (let i = 0; i < recommendations.length - 1; i++) {
|
|
578
|
+
src/tools/reconciliation\__tests__\recommendationEngine.test.ts:900: const bankTxn = createBankTransaction({ amount: -0.01 });
|
|
579
|
+
src/tools/reconciliation\__tests__\recommendationEngine.test.ts:912: expect(rec.parameters.amount).toBe(-10); // In milliunits (0.01 * 1000)
|
|
580
|
+
src/tools/reconciliation\__tests__\recommendationEngine.test.ts:916: const bankTxn = createBankTransaction({ amount: -999999.99 });
|
|
581
|
+
src/tools/reconciliation\__tests__\recommendationEngine.test.ts:928: expect(rec.parameters.amount).toBe(-999999990); // In milliunits
|
|
582
|
+
src/tools/reconciliation\__tests__\scenarios\repeatAmount.scenario.test.ts:16: it('prioritizes repeat-amount insight when multiple bank rows share totals', () => {
|
|
583
|
+
src/tools/reconciliation\__tests__\scenarios\repeatAmount.scenario.test.ts:19: // Three -22.22 transactions: one will match YNAB, two will remain unmatched
|
|
584
|
+
src/tools/reconciliation\__tests__\scenarios\repeatAmount.scenario.test.ts:20: { date: '2025-10-20', amount: -22.22, payee: 'RideShare', memo: '' },
|
|
585
|
+
src/tools/reconciliation\__tests__\scenarios\repeatAmount.scenario.test.ts:21: { date: '2025-10-21', amount: -22.22, payee: 'RideShare', memo: '' },
|
|
586
|
+
src/tools/reconciliation\__tests__\scenarios\repeatAmount.scenario.test.ts:22: { date: '2025-10-25', amount: -22.22, payee: 'RideShare', memo: '' },
|
|
587
|
+
src/tools/reconciliation\__tests__\scenarios\repeatAmount.scenario.test.ts:23: { date: '2025-10-23', amount: -15.0, payee: 'Cafe', memo: '' },
|
|
588
|
+
src/tools/reconciliation\__tests__\scenarios\repeatAmount.scenario.test.ts:34: id: 'yn-1',
|
|
589
|
+
src/tools/reconciliation\__tests__\scenarios\repeatAmount.scenario.test.ts:35: date: '2025-10-19',
|
|
590
|
+
src/tools/reconciliation\__tests__\scenarios\repeatAmount.scenario.test.ts:36: amount: -22220,
|
|
591
|
+
src/tools/reconciliation\__tests__\scenarios\repeatAmount.scenario.test.ts:43: id: 'yn-2',
|
|
592
|
+
src/tools/reconciliation\__tests__\scenarios\repeatAmount.scenario.test.ts:44: date: '2025-10-22',
|
|
593
|
+
src/tools/reconciliation\__tests__\scenarios\repeatAmount.scenario.test.ts:45: amount: -15000,
|
|
594
|
+
src/tools/reconciliation\__tests__\scenarios\repeatAmount.scenario.test.ts:53: // Statement balance now accounts for 3 x -22.22 + 1 x -15.00 = -81.66
|
|
595
|
+
src/tools/reconciliation\__tests__\scenarios\repeatAmount.scenario.test.ts:54: const result = analyzeReconciliation('csv', undefined, ynabTxns, -81.66);
|
|
596
|
+
src/tools/reconciliation\__tests__\scenarios\repeatAmount.scenario.test.ts:56: const repeatInsight = result.insights.find((insight) => insight.id.startsWith('repeat--22.22')); // Note: double dash for negative
|
|
597
|
+
src/tools/reconciliation\__tests__\scenarios\extremes.scenario.test.ts:19: { date: '2025-11-01', amount: 0, payee: 'Zero Adjustment', memo: '' },
|
|
598
|
+
src/tools/reconciliation\__tests__\scenarios\extremes.scenario.test.ts:20: { date: '2025-11-02', amount: 2500, payee: 'Interest', memo: '' },
|
|
599
|
+
src/tools/reconciliation\__tests__\scenarios\extremes.scenario.test.ts:31: id: 'yn-neg',
|
|
600
|
+
src/tools/reconciliation\__tests__\scenarios\extremes.scenario.test.ts:32: date: '2025-10-31',
|
|
601
|
+
src/tools/reconciliation\__tests__\scenarios\extremes.scenario.test.ts:33: amount: -1000000,
|
|
602
|
+
src/tools/reconciliation\__tests__\scenarios\adapterCurrency.scenario.test.ts:8: value_display: value < 0 ? `-$${Math.abs(value).toFixed(2)}` : `$${value.toFixed(2)}`,
|
|
603
|
+
src/tools/reconciliation\__tests__\scenarios\adapterCurrency.scenario.test.ts:17: statement_date_range: '2025-10-01 to 2025-10-31',
|
|
604
|
+
src/tools/reconciliation\__tests__\scenarios\adapterCurrency.scenario.test.ts:24: current_cleared_balance: makeMoney(-899.02, currency),
|
|
605
|
+
src/tools/reconciliation\__tests__\scenarios\adapterCurrency.scenario.test.ts:25: target_statement_balance: makeMoney(-899.02, currency),
|
|
606
|
+
src/tools/reconciliation\__tests__\scenarios\adapterCurrency.scenario.test.ts:34: current_cleared: makeMoney(-899.02, currency),
|
|
607
|
+
src/tools/reconciliation\__tests__\scenarios\adapterCurrency.scenario.test.ts:36: current_total: makeMoney(-899.02, currency),
|
|
608
|
+
src/tools/reconciliation\__tests__\scenarios\adapterCurrency.scenario.test.ts:37: target_statement: makeMoney(-899.02, currency),
|
|
609
|
+
src/tools/reconciliation\__tests__\scenarios\adapterCurrency.scenario.test.ts:45:describe('scenario: non-USD formatting in adapter payload', () => {
|
|
610
|
+
src/tools/reconciliation\__tests__\scenarios\adapterCurrency.scenario.test.ts:49: accountId: 'acct-123',
|