@dizzlkheinz/ynab-mcpb 0.17.0 → 0.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/.env.example +33 -33
  2. package/.github/workflows/ci-tests.yml +45 -45
  3. package/.github/workflows/claude-code-review.yml +57 -57
  4. package/.github/workflows/claude.yml +50 -50
  5. package/.github/workflows/full-integration.yml +22 -22
  6. package/.github/workflows/publish.yml +11 -2
  7. package/CLAUDE.md +7 -6
  8. package/dist/bundle/index.cjs +52 -52
  9. package/dist/server/YNABMCPServer.d.ts +120 -54
  10. package/dist/server/securityMiddleware.d.ts +37 -8
  11. package/dist/tools/schemas/outputs/index.d.ts +2 -2
  12. package/dist/tools/schemas/outputs/index.js +2 -2
  13. package/dist/tools/schemas/outputs/utilityOutputs.d.ts +0 -15
  14. package/dist/tools/schemas/outputs/utilityOutputs.js +0 -9
  15. package/dist/tools/utilityTools.d.ts +0 -7
  16. package/dist/tools/utilityTools.js +1 -50
  17. package/docs/maintainers/npm-publishing.md +27 -0
  18. package/docs/reference/API.md +15 -70
  19. package/docs/technical/reconciliation-system-architecture.md +2251 -2251
  20. package/package.json +5 -5
  21. package/scripts/analyze-bundle.mjs +41 -41
  22. package/scripts/generate-mcpb.ps1 +95 -95
  23. package/scripts/watch-and-restart.ps1 +49 -49
  24. package/src/__tests__/comprehensive.integration.test.ts +0 -28
  25. package/src/__tests__/performance.test.ts +4 -12
  26. package/src/__tests__/setup.ts +45 -14
  27. package/src/__tests__/workflows.e2e.test.ts +0 -44
  28. package/src/server/__tests__/YNABMCPServer.test.ts +0 -1
  29. package/src/server/__tests__/toolRegistration.test.ts +2 -2
  30. package/src/tools/__tests__/transactionTools.integration.test.ts +63 -3
  31. package/src/tools/__tests__/utilityTools.integration.test.ts +1 -85
  32. package/src/tools/__tests__/utilityTools.test.ts +1 -123
  33. package/src/tools/schemas/outputs/index.ts +0 -3
  34. package/src/tools/schemas/outputs/utilityOutputs.ts +2 -43
  35. package/src/tools/toolCategories.ts +0 -1
  36. package/src/tools/utilityTools.ts +5 -76
  37. package/vitest.config.ts +2 -1
  38. package/.chunkhound.json +0 -11
  39. package/.code/agents/0098661e-0fa3-4990-beb9-c0cbf3f123aa/status.txt +0 -1
  40. package/.code/agents/01a13ef4-3f23-4f52-b33b-3585b73cfa60/error.txt +0 -3
  41. package/.code/agents/084fd32f-e298-4728-9103-a78d7dc39613/error.txt +0 -3
  42. package/.code/agents/0fed51e1-a943-4b97-a2a8-a6f0f27c844d/status.txt +0 -1
  43. package/.code/agents/1059b6bd-5ccd-4d83-a12c-7c9d89137399/error.txt +0 -5
  44. package/.code/agents/110/exec-call_F9BDNG7JfxKkq7Vc8ESAvdft.txt +0 -1569
  45. package/.code/agents/11ebcef3-b13f-4e44-ad80-d94a866804b7/error.txt +0 -3
  46. package/.code/agents/1324/exec-call_tIpx9uV1TpARbAMZonRQm8AO.txt +0 -757
  47. package/.code/agents/1398/exec-call_CjItcWMU1G6JoPshX62QvpaR.txt +0 -2832
  48. package/.code/agents/1398/exec-call_SUVq2ivmONQ5LMCmd7ngmOqr.txt +0 -2709
  49. package/.code/agents/1398/exec-call_SdNY4NOffdcC5pRYjVXHjPCK.txt +0 -2832
  50. package/.code/agents/1398/exec-call_qblJo9et1gsFFB63TtLOiji2.txt +0 -2832
  51. package/.code/agents/1398/exec-call_zaRrzlGz7GJcNzVfkAmML7Zg.txt +0 -2709
  52. package/.code/agents/1572/exec-call_GjVFBFOWcY7lE0idc5nWlLNh.txt +0 -781
  53. package/.code/agents/171834fd-5905-42fc-bbcc-2c755145b0fc/status.txt +0 -1
  54. package/.code/agents/1724/exec-call_HvHQe0w5CCG3T7Q3ULT6MO3g.txt +0 -5217
  55. package/.code/agents/1724/exec-call_QwUNESVzfxxk78K1frh1Vahb.txt +0 -2594
  56. package/.code/agents/1724/exec-call_aJ1Xwz71XmIpD4SBxSHERzLe.txt +0 -2594
  57. package/.code/agents/1846/exec-call_1YNAVD18RjrMN7JnfkkQhUP3.txt +0 -766
  58. package/.code/agents/1846/exec-call_lh3lDzE4WJAh1lFiomiiZ73D.txt +0 -766
  59. package/.code/agents/1d7d7ab7-7473-4b69-8b97-6e914f56056a/result.txt +0 -231
  60. package/.code/agents/2038/exec-call_DYwOukaYsL8VCONWmV2rUW5u.txt +0 -766
  61. package/.code/agents/2038/exec-call_c7fOQ7UrpVcTtvdfGBRM146V.txt +0 -652
  62. package/.code/agents/2038/exec-call_ySNyq9Mm55jWE480s54r5QcA.txt +0 -766
  63. package/.code/agents/210/exec-call_0tQCsKNJ1WTuIchb8wlcFJpW.txt +0 -2590
  64. package/.code/agents/210/exec-call_8ZlY9cUc8Ft1twi4ch8UJ6IN.txt +0 -5195
  65. package/.code/agents/2188/exec-call_5HqayBxIteJtoI8oPTiLWgvJ.txt +0 -286
  66. package/.code/agents/2188/exec-call_XRbBKBq3adZe6dcppAvQtM7G.txt +0 -218
  67. package/.code/agents/2188/exec-call_ehA0SjpYtrUi6GJXmibLjp4i.txt +0 -180
  68. package/.code/agents/21902821-ecaf-4759-bb9d-222b90921af5/error.txt +0 -3
  69. package/.code/agents/2256/exec-call_AtPcRWPmFPMcmX6qOFm1fCEY.txt +0 -766
  70. package/.code/agents/232073be-aa0e-46da-b478-5b64dbf03cf5/status.txt +0 -1
  71. package/.code/agents/234ff534-2336-4771-a8d9-aa04421a63be/result.txt +0 -747
  72. package/.code/agents/2454/exec-call_aFJpupwjfZeOBm7ixI5Vc8z2.txt +0 -766
  73. package/.code/agents/2454/exec-call_wogZ4HfXTodTEXvdgXlVUBpv.txt +0 -766
  74. package/.code/agents/253e2695-dc36-4022-b436-27655e0fc6c7/status.txt +0 -1
  75. package/.code/agents/2583/exec-call_M59I4eDjpjlBIWBiSxyS0YlJ.txt +0 -2594
  76. package/.code/agents/2583/exec-call_usLRGh7OhVHtsRBL4iUwRhjq.txt +0 -2594
  77. package/.code/agents/292aa3ff-dbab-470f-97c9-e7e8fd65e0db/result.txt +0 -144
  78. package/.code/agents/2e905864-aa07-4314-bcf9-c5b32277e4ac/result.txt +0 -36
  79. package/.code/agents/3073/exec-call_Peeagc9DxGYLgE6pNdMZhqIE.txt +0 -766
  80. package/.code/agents/3073/exec-call_d2YSE3hXF08KRSoUM3qd8Z3x.txt +0 -766
  81. package/.code/agents/3134/exec-call_IgCAMGx19lWfuo8zfYIt5FFC.txt +0 -416
  82. package/.code/agents/3134/exec-call_IxvLR2Oo7kba2QTsI1gHVko8.txt +0 -2590
  83. package/.code/agents/3134/exec-call_jYvc8hksZChSiysbzKjl2ZbB.txt +0 -2590
  84. package/.code/agents/329/exec-call_4QdP3SfSO7HGPCwVcqZIth6s.txt +0 -2590
  85. package/.code/agents/335aa031-466d-4fb7-925f-3cd864e264d0/result.txt +0 -191
  86. package/.code/agents/3364/exec-call_NbhIrsM5HhyDZDmJZG5CuCYL.txt +0 -766
  87. package/.code/agents/3364/exec-call_cKtJg0NrXiwXEFwlsE3uPZRA.txt +0 -766
  88. package/.code/agents/36d98414-5cde-4d9d-9a67-a240a18c1f07/result.txt +0 -189
  89. package/.code/agents/4604e866-b7b8-44f5-992f-2f683b0a523b/status.txt +0 -1
  90. package/.code/agents/472/exec-call_4AxzEEcWwkKhpqRB3bE8Ha4L.txt +0 -790
  91. package/.code/agents/472/exec-call_CB3LPYQA8QIZRi8I6kj4J17A.txt +0 -766
  92. package/.code/agents/472/exec-call_YeoUWvaFoktay2nqVUsa9KKX.txt +0 -790
  93. package/.code/agents/472/exec-call_jPWgKVquBBXTg0T3Lks5ZfkK.txt +0 -2594
  94. package/.code/agents/472/exec-call_qBkvunpGBDEHph2jPmTwtcsb.txt +0 -1000
  95. package/.code/agents/472/exec-call_v0ffRV1p0kTckBmJPzzHAEy0.txt +0 -3489
  96. package/.code/agents/472/exec-call_xAX5FXqWIlk02d9WubHbHWh8.txt +0 -766
  97. package/.code/agents/5346/exec-call_9q0muXUuLaucwEqI51Pt7idT.txt +0 -2594
  98. package/.code/agents/5346/exec-call_B2el3B79rVkq9LhWTI2VYlz7.txt +0 -2456
  99. package/.code/agents/5346/exec-call_BfX08f02qkZI9uJD5dvCvuoj.txt +0 -2594
  100. package/.code/agents/543328d0-61d6-4fd1-a723-bb168656e2e2/error.txt +0 -18
  101. package/.code/agents/5580c02c-1383-4d18-9cbd-cc8a06e3408d/result.txt +0 -48
  102. package/.code/agents/5f8dc01c-47b3-4163-b0b3-aa31be89fcdc/status.txt +0 -1
  103. package/.code/agents/60ce1a22-5126-44b2-b977-1d5b56142a7b/status.txt +0 -1
  104. package/.code/agents/6215d9db-7fa9-4429-aeec-3835c3212291/error.txt +0 -1
  105. package/.code/agents/6743db55-30e5-4b4e-9366-a8214fc7f714/error.txt +0 -1
  106. package/.code/agents/6bf9591b-b9c9-422c-b0a5-e968c7d8422a/status.txt +0 -1
  107. package/.code/agents/7/exec-call_HltHpkDox0Zm1vGEjdksUgpE.txt +0 -1120
  108. package/.code/agents/7/exec-call_LCATrOPPAgbxW9Q1z0XaVi2E.txt +0 -2646
  109. package/.code/agents/7/exec-call_W8DeRfNG9hvbgVFvf0clBf6R.txt +0 -2646
  110. package/.code/agents/7/exec-call_eww3GfdEiJZx61sJEQ9wNmt3.txt +0 -1271
  111. package/.code/agents/70/exec-call_owUtDMYiVgqDf8vsz1i32PFf.txt +0 -1570
  112. package/.code/agents/8/exec-call_UtrjAcLbhYLatxR4O97fZgnm.txt +0 -2590
  113. package/.code/agents/82490bc9-f34e-4b1b-8a8e-bccc2e6254f5/error.txt +0 -3
  114. package/.code/agents/841/exec-call_7nTNhSBCNjTDUIJv7py6CepO.txt +0 -3299
  115. package/.code/agents/841/exec-call_TLI0yUdUijuUAvI4o3DXEvHO.txt +0 -3299
  116. package/.code/agents/9/exec-call_XaABQT1hIlRpnKZ2uyBMWsTC.txt +0 -1882
  117. package/.code/agents/941/exec-call_GuGHRx7NNXWIDAnxUG2NEWPa.txt +0 -2594
  118. package/.code/agents/94a0ddf3-a304-4ec3-913e-3cceef509948/error.txt +0 -1
  119. package/.code/agents/95d9fbab-19a2-48af-83f9-c792566a347f/error.txt +0 -1
  120. package/.code/agents/b0098cb8-cb32-4ada-9bc4-37c587518896/result.txt +0 -170
  121. package/.code/agents/b4fe59a4-81df-42e2-a112-0153e504faca/error.txt +0 -1
  122. package/.code/agents/bf4ce152-f623-49d7-aa52-c18631625c3c/error.txt +0 -3
  123. package/.code/agents/d7d1db75-d7eb-468e-adea-4ef4d916d187/status.txt +0 -1
  124. package/.code/agents/e2baa9c8-bac3-49e3-a39d-024333e6a990/status.txt +0 -1
  125. package/.code/agents/e2c752b7-711d-423a-af57-f53c809deb84/result.txt +0 -160
  126. package/.code/agents/e350b8c3-8483-408c-b2bb-94515f492a11/error.txt +0 -3
  127. package/.code/agents/e63f9919-719f-4ad0-bccf-01b1a596e1e9/status.txt +0 -1
  128. package/.code/agents/e6601719-c31f-4a0e-8c71-d70787d0ab71/status.txt +0 -1
  129. package/.code/agents/e71695a8-3044-478d-8f12-ed13d02884c7/status.txt +0 -1
  130. package/.code/agents/f250b7ed-5bd5-4036-aa8c-ce63caee7d61/result.txt +0 -20
  131. package/.code/agents/f95b7464-3e25-4897-b153-c8dfd63fd605/error.txt +0 -5
  132. package/.code/agents/fa3c5ddf-cdf7-47a2-930a-b806c6363689/status.txt +0 -1
  133. package/AGENTS.md +0 -1
  134. package/NUL +0 -0
  135. package/package.json.tmp +0 -105
  136. package/temp-recon.ts +0 -126
  137. package/test-exports/ynab_account_e9ddc2a6_minimal_1items_2025-11-19_09-04-53.json +0 -23
  138. package/test-exports/ynab_account_e9ddc2a6_minimal_1items_2025-11-19_10-37-42.json +0 -23
  139. package/test-exports/ynab_account_e9ddc2a6_minimal_4items_2025-11-19_09-02-09.json +0 -44
  140. package/test-exports/ynab_account_e9ddc2a6_minimal_6items_2025-11-19_10-37-52.json +0 -58
  141. package/test-exports/ynab_since_2025-10-16_account_53298e13_238items_2025-11-28_13-46-20.json +0 -3662
  142. package/test-exports/ynab_since_2025-11-01_account_4c18e9f0_minimal_14items_2025-11-16_10-07-10.json +0 -115
@@ -1,144 +0,0 @@
1
- Note: I’m running in a read‑only sandbox with no escalation, so I can’t execute `node "$HOME/.codex/superpowers/.codex/superpowers-codex" bootstrap` here; you’ll need to run that manually outside this environment.
2
-
3
- Below is a concrete implementation plan for the next iteration, focused on tightening type safety for mutation dry‑run outputs and exercising them via tests. Tasks are sized to ~2–5 minutes each and follow a TDD flow.
4
-
5
- **Iteration Theme**
6
-
7
- - Strengthen type safety for transaction mutation dry‑run responses by replacing `z.record(z.string(), z.unknown())` with strongly‑typed request schemas, and ensure handlers + tests are aligned.
8
-
9
- ---
10
-
11
- **Phase 0 – Context & Scoping**
12
-
13
- - Skim `SCHEMA_IMPROVEMENT_SUMMARY.md` again to align with the existing discriminated‑union pattern used for reconciliation outputs.
14
- - Review current output schemas in `src/tools/schemas/outputs/transactionMutationOutputs.ts` (dry‑run branches for `CreateTransactionOutputSchema`, `UpdateTransactionOutputSchema`, `DeleteTransactionOutputSchema`).
15
- - Review corresponding handlers in `src/tools/transactionTools.ts` (dry‑run branches in `handleCreateTransaction`, `handleUpdateTransaction`, `handleDeleteTransaction`).
16
- - Review existing tests touching these areas:
17
- - Schema tests: `src/tools/schemas/outputs/__tests__/transactionMutationSchemas.test.ts`
18
- - Tool unit tests: `src/tools/__tests__/transactionTools.test.ts`
19
- - E2E transaction workflow: `src/__tests__/workflows.e2e.test.ts`
20
-
21
- ---
22
-
23
- **Phase 1 – TDD for New Dry‑Run Request Schemas (Schemas Layer)**
24
-
25
- 1. In `src/tools/schemas/outputs/transactionMutationOutputs.ts`, identify the three dry‑run `request` fields that still use `z.record(z.string(), z.unknown())`.
26
- 2. Design target request shapes:
27
- - `CreateTransactionDryRunRequestSchema`: mirror `CreateTransactionSchema` from `src/tools/transactionTools.ts` but omit `budget_id` and `dry_run`, and keep only fields that actually affect the YNAB API call (`account_id`, `amount`, `date`, `payee_*`, `category_id`, `memo`, `cleared`, `approved`, `flag_color`, `import_id`, `subtransactions`).
28
- - `UpdateTransactionDryRunRequestSchema`: mirror `UpdateTransactionSchema` but omit `budget_id`, `dry_run`; keep `transaction_id` plus the updatable fields (`account_id`, `amount`, `date`, `payee_*`, `category_id`, `memo`, `cleared`, `approved`, `flag_color`).
29
- - `DeleteTransactionDryRunRequestSchema`: mirror `DeleteTransactionSchema` but omit `budget_id`, `dry_run`; keep `transaction_id`.
30
- 3. In `src/tools/schemas/outputs/__tests__/transactionMutationSchemas.test.ts`, add new `describe` blocks (or extend existing ones) for:
31
- - `CreateTransactionOutputSchema` dry‑run branch:
32
- - Accepts a `request` object matching `CreateTransactionDryRunRequestSchema` (no `budget_id`, no `dry_run`).
33
- - Rejects payloads where `request` is missing required fields (e.g., no `account_id`, no `date`, or missing `amount`).
34
- - Rejects payloads where `request` includes obviously wrong shapes (e.g., non‑ISO `date`), using schema’s existing validation.
35
- - `UpdateTransactionOutputSchema` dry‑run branch:
36
- - Accepts minimal valid request (`transaction_id` only) and one with optional fields.
37
- - Rejects requests missing `transaction_id`.
38
- - `DeleteTransactionOutputSchema` dry‑run branch:
39
- - Accepts `{ transaction_id: '...' }` and no extra required fields.
40
- - Rejects requests missing `transaction_id`.
41
- 4. Add negative tests in the same file asserting that generic `z.record`‑style payloads (e.g., arbitrary key/value maps or requests including `budget_id`, `dry_run`) are rejected by the new schemas.
42
- 5. Run only the schema tests to see them fail initially:
43
- - `npm run test:unit -- src/tools/schemas/outputs/__tests__/transactionMutationSchemas.test.ts`
44
-
45
- ---
46
-
47
- **Phase 2 – Implement Strongly‑Typed Dry‑Run Request Schemas**
48
-
49
- 6. In `src/tools/schemas/outputs/transactionMutationOutputs.ts`, define:
50
- - `CreateTransactionDryRunRequestSchema` using `z.object({ ... })` or `CreateTransactionSchema.omit({ budget_id: true, dry_run: true })` (import `CreateTransactionSchema` if you prefer reuse).
51
- - `UpdateTransactionDryRunRequestSchema` similarly from `UpdateTransactionSchema` or a dedicated `z.object`.
52
- - `DeleteTransactionDryRunRequestSchema` similarly from `DeleteTransactionSchema`.
53
- - Export TypeScript types using `z.infer<...>` for each new schema.
54
- 7. Replace the dry‑run `request` fields:
55
- - `CreateTransactionOutputSchema` dry‑run branch: `request: CreateTransactionDryRunRequestSchema`.
56
- - `UpdateTransactionOutputSchema` dry‑run branch: `request: UpdateTransactionDryRunRequestSchema`.
57
- - `DeleteTransactionOutputSchema` dry‑run branch: `request: DeleteTransactionDryRunRequestSchema`.
58
- 8. Ensure unions remain backward compatible:
59
- - Keep the non‑dry‑run branches unchanged.
60
- - Preserve `.passthrough()` where it’s used for forward‑compatible metadata.
61
- 9. Re‑run the schema tests:
62
- - `npm run test:unit -- src/tools/schemas/outputs/__tests__/transactionMutationSchemas.test.ts`
63
- - Fix any mismatches between tests and actual schema shapes until green.
64
-
65
- ---
66
-
67
- **Phase 3 – TDD for Handler Output Shape Changes (Tools Layer)**
68
-
69
- 10. In `src/tools/__tests__/transactionTools.test.ts`, locate the `handleCreateTransaction` dry‑run test (`should not invalidate cache on dry_run transaction creation`).
70
- 11. Update that test so it asserts:
71
- - `parsedContent.dry_run === true` and `parsedContent.action === 'create_transaction'`.
72
- - `parsedContent.request`:
73
- - Does not include `budget_id` or `dry_run`.
74
- - Contains only the transaction fields expected by `CreateTransactionDryRunRequestSchema`.
75
- 12. Add a new unit test for `handleUpdateTransaction` dry‑run behavior:
76
- - Call `handleUpdateTransaction(mockYnabAPI, { budget_id, transaction_id, amount, dry_run: true })`.
77
- - Assert:
78
- - No API calls are made.
79
- - Parsed JSON has `dry_run: true`, `action: 'update_transaction'`.
80
- - `request` includes `transaction_id` and any optional fields you passed, but not `budget_id` or `dry_run`.
81
- 13. Add a complementary unit test for `handleDeleteTransaction` dry‑run behavior:
82
- - Call `handleDeleteTransaction(mockYnabAPI, { budget_id, transaction_id, dry_run: true })`.
83
- - Assert:
84
- - No API calls are made.
85
- - Parsed JSON has `dry_run: true`, `action: 'delete_transaction'`.
86
- - `request` is `{ transaction_id: '...' }` only.
87
- 14. Run only the transaction tool unit tests to see failures before implementation:
88
- - `npm run test:unit -- src/tools/__tests__/transactionTools.test.ts`
89
-
90
- ---
91
-
92
- **Phase 4 – Implement Handler Changes to Match New Schemas**
93
-
94
- 15. In `src/tools/transactionTools.ts`, update the dry‑run branch of `handleCreateTransaction`:
95
- - Instead of `request: params`, construct a new object that:
96
- - Copies only transaction‑related fields: `account_id`, `amount`, `date`, `payee_*`, `category_id`, `memo`, `cleared`, `approved`, `flag_color`, `import_id`, `subtransactions`.
97
- - Excludes `budget_id` and `dry_run`.
98
- - Ensure this object’s shape matches `CreateTransactionDryRunRequestSchema`.
99
- 16. Update the dry‑run branch of `handleUpdateTransaction`:
100
- - Build `request` containing `transaction_id` plus any provided update fields (`account_id`, `amount`, `date`, etc.).
101
- - Exclude `budget_id` and `dry_run` from the `request` object.
102
- 17. Update the dry‑run branch of `handleDeleteTransaction`:
103
- - Set `request: { transaction_id: params.transaction_id }` (and nothing else).
104
- 18. Re‑run the relevant unit tests:
105
- - `npm run test:unit -- src/tools/__tests__/transactionTools.test.ts`
106
- - Iterate until the dry‑run shape tests pass.
107
-
108
- ---
109
-
110
- **Phase 5 – Integration & E2E Validation**
111
-
112
- 19. In `src/tools/__tests__/transactionTools.integration.test.ts`, optionally add a focused integration test (if not already covered) that:
113
- - Calls each of the three handlers in dry‑run mode with realistic params.
114
- - Parses the output and asserts it validates against `CreateTransactionOutputSchema`, `UpdateTransactionOutputSchema`, `DeleteTransactionOutputSchema` using the shared validation helper (if available).
115
- 20. In `src/__tests__/workflows.e2e.test.ts`, add a small E2E segment under “Complete Transaction Management Workflow” that:
116
- - Calls `ynab:create_transaction` with `dry_run: true`.
117
- - Uses `validateOutputSchema(server, 'create_transaction', result)` and asserts `valid === true`.
118
- - Asserts the `data` payload contains the new, typed `request` shape (no `budget_id` / `dry_run` in `request`).
119
- 21. Run narrower test suites first:
120
- - `npm run test:unit`
121
- - `npm run test:integration`
122
- 22. When green, run the full test suite + build to ensure no regressions:
123
- - `npm test`
124
- - `npm run lint`
125
- - `npm run build`
126
- - Optionally: `npm run build:prod` and `npm run package:mcpb` if this will cut a new release.
127
-
128
- ---
129
-
130
- **Phase 6 – Documentation & Release Hygiene**
131
-
132
- 23. Update any internal docs referencing dry‑run shapes:
133
- - Check `docs/reference/API.md` and any tool‑specific docs for transaction mutation tools; adjust examples so `request` shows the new, typed payloads.
134
- 24. In `CHANGELOG.md`, add an entry for the next patch version (e.g., `0.13.5`) summarizing:
135
- - “Improve transaction mutation dry‑run output typing for create/update/delete_transaction tools; no breaking changes to success payloads.”
136
- 25. Run quick formatting checks:
137
- - `npm run format:check`
138
- - `npm run lint` (again if needed).
139
- 26. If everything is green, prepare the PR:
140
- - Ensure `TESTING_NOTES.md` / `.pr-description.md` mention:
141
- - Tests run (`npm run test:unit`, `npm run test:integration`, `npm test`, `npm run build`).
142
- - That changes are backward‑compatible for non‑dry‑run responses and tool contracts.
143
-
144
- If you’d like, I can next draft the actual Zod schema snippets and handler code for these changes so you can drop them into the repo.
@@ -1,36 +0,0 @@
1
- **Tool Catalogue (src/server/YNABMCPServer.ts)**
2
- - list_budgets — budgets; delta adapter; input inline `emptyObjectSchema`; output `ListBudgetsOutputSchema` (`src/tools/schemas/outputs/budgetOutputs.ts` via index).
3
- - get_budget — budgets; read adapter; input `GetBudgetSchema` (`src/tools/budgetTools.ts`); output `GetBudgetOutputSchema` (`src/tools/schemas/outputs/utilityOutputs.ts` via index).
4
- - set_default_budget — budgets/local; custom inline write; input inline `setDefaultBudgetSchema`; output `SetDefaultBudgetOutputSchema` (`src/tools/schemas/outputs/utilityOutputs.ts` via index).
5
- - get_default_budget — budgets/local; inline no-input; input inline `emptyObjectSchema`; output `GetDefaultBudgetOutputSchema` (`src/tools/schemas/outputs/utilityOutputs.ts` via index).
6
- - list_accounts — accounts; delta adapter; input `ListAccountsSchema` (`src/tools/accountTools.ts`); output `ListAccountsOutputSchema` (`src/tools/schemas/outputs/accountOutputs.ts` via index).
7
- - get_account — accounts; read adapter; input `GetAccountSchema` (`src/tools/accountTools.ts`); output `GetAccountOutputSchema` (`src/tools/schemas/outputs/accountOutputs.ts` via index).
8
- - create_account — accounts; write adapter; input `CreateAccountSchema` (`src/tools/accountTools.ts`); output inline `LooseObjectSchema` (catch-all, typed `CreateAccountOutputSchema` exists in `src/tools/schemas/outputs/transactionMutationOutputs.ts`).
9
- - list_transactions — transactions; delta adapter; input `ListTransactionsSchema` (`src/tools/transactionTools.ts`); output inline `LooseObjectSchema` (typed `ListTransactionsOutputSchema` exists in `src/tools/schemas/outputs/transactionOutputs.ts`).
10
- - export_transactions — transactions/export; read adapter; input `ExportTransactionsSchema` (`src/tools/exportTransactions.ts`); output `ExportTransactionsOutputSchema` (`src/tools/schemas/outputs/comparisonOutputs.ts` via index).
11
- - compare_transactions — transactions/compare; read adapter; input `CompareTransactionsSchema` (`src/tools/compareTransactions/index.ts`); output `CompareTransactionsOutputSchema` (`src/tools/schemas/outputs/comparisonOutputs.ts` via index).
12
- - reconcile_account — reconciliation; delta adapter; input `ReconcileAccountSchema` (`src/tools/reconciliation/index.ts`); output inline `LooseObjectSchema` (typed `ReconcileAccountOutputSchema` exists in `src/tools/schemas/outputs/reconciliationOutputs.ts`).
13
- - get_transaction — transactions; read adapter; input `GetTransactionSchema` (`src/tools/transactionTools.ts`); output `GetTransactionOutputSchema` (`src/tools/schemas/outputs/transactionOutputs.ts` via index).
14
- - create_transaction — transactions; write adapter; input `CreateTransactionSchema` (`src/tools/transactionTools.ts`); output inline `LooseObjectSchema` (typed `CreateTransactionOutputSchema` exists in `src/tools/schemas/outputs/transactionMutationOutputs.ts`).
15
- - create_transactions — transactions; write adapter; input `CreateTransactionsSchema` (`src/tools/transactionTools.ts`); output inline `LooseObjectSchema` (typed `CreateTransactionsOutputSchema` exists in `src/tools/schemas/outputs/transactionMutationOutputs.ts`).
16
- - update_transactions — transactions; write adapter; input `UpdateTransactionsSchema` (`src/tools/transactionTools.ts`); output inline `LooseObjectSchema` (typed `UpdateTransactionsOutputSchema` exists in `src/tools/schemas/outputs/transactionMutationOutputs.ts`).
17
- - create_receipt_split_transaction — transactions; write adapter; input `CreateReceiptSplitTransactionSchema` (`src/tools/transactionTools.ts`); output inline `LooseObjectSchema` (typed `CreateReceiptSplitTransactionOutputSchema` exists in `src/tools/schemas/outputs/transactionMutationOutputs.ts`).
18
- - update_transaction — transactions; write adapter; input `UpdateTransactionSchema` (`src/tools/transactionTools.ts`); output inline `LooseObjectSchema` (typed `UpdateTransactionOutputSchema` exists in `src/tools/schemas/outputs/transactionMutationOutputs.ts`).
19
- - delete_transaction — transactions; write adapter; input `DeleteTransactionSchema` (`src/tools/transactionTools.ts`); output inline `LooseObjectSchema` (typed `DeleteTransactionOutputSchema` exists in `src/tools/schemas/outputs/transactionMutationOutputs.ts`).
20
- - list_categories — categories; delta adapter; input `ListCategoriesSchema` (`src/tools/categoryTools.ts`); output `ListCategoriesOutputSchema` (`src/tools/schemas/outputs/categoryOutputs.ts` via index).
21
- - get_category — categories; read adapter; input `GetCategorySchema` (`src/tools/categoryTools.ts`); output `GetCategoryOutputSchema` (`src/tools/schemas/outputs/categoryOutputs.ts` via index).
22
- - update_category — categories; write adapter; input `UpdateCategorySchema` (`src/tools/categoryTools.ts`); output inline `LooseObjectSchema` (typed `UpdateCategoryOutputSchema` exists in `src/tools/schemas/outputs/transactionMutationOutputs.ts`).
23
- - list_payees — payees; delta adapter; input `ListPayeesSchema` (`src/tools/payeeTools.ts`); output `ListPayeesOutputSchema` (`src/tools/schemas/outputs/payeeOutputs.ts` via index).
24
- - get_payee — payees; read adapter; input `GetPayeeSchema` (`src/tools/payeeTools.ts`); output `GetPayeeOutputSchema` (`src/tools/schemas/outputs/payeeOutputs.ts` via index).
25
- - get_month — months; read adapter; input `GetMonthSchema` (`src/tools/monthTools.ts`); output `GetMonthOutputSchema` (`src/tools/schemas/outputs/monthOutputs.ts` via index).
26
- - list_months — months; delta adapter; input `ListMonthsSchema` (`src/tools/monthTools.ts`); output `ListMonthsOutputSchema` (`src/tools/schemas/outputs/monthOutputs.ts` via index).
27
- - get_user — utility; no-input adapter; input inline `emptyObjectSchema`; output `GetUserOutputSchema` (`src/tools/schemas/outputs/utilityOutputs.ts` via index).
28
- - convert_amount — utility; inline local (no YNAB); input `ConvertAmountSchema` (`src/tools/utilityTools.ts`); output `ConvertAmountOutputSchema` (`src/tools/schemas/outputs/utilityOutputs.ts` via index).
29
- - diagnostic_info — utility/diagnostics; inline local; input inline `diagnosticInfoSchema`; output `DiagnosticInfoOutputSchema` (`src/tools/schemas/outputs/utilityOutputs.ts` via index).
30
- - clear_cache — utility/cache; inline local; input inline `emptyObjectSchema`; output `ClearCacheOutputSchema` (`src/tools/schemas/outputs/utilityOutputs.ts` via index).
31
- - set_output_format — utility/output; inline local; input inline `setOutputFormatSchema`; output `SetOutputFormatOutputSchema` (`src/tools/schemas/outputs/utilityOutputs.ts` via index).
32
-
33
- **Schema Notes**
34
- - Inline inputs in `src/server/YNABMCPServer.ts` that could move to a shared module: `emptyObjectSchema`, `LooseObjectSchema`, `setDefaultBudgetSchema`, `diagnosticInfoSchema`, `setOutputFormatSchema`. A small `src/tools/schemas/shared/baseInputs.ts` would centralize these.
35
- - Several tools use inline `LooseObjectSchema` despite typed outputs existing in `src/tools/schemas/outputs/transactionOutputs.ts` and `transactionMutationOutputs.ts`; swapping to the typed schemas would reduce lax validation for transactions, account creation, reconciliation, and category updates.
36
- - Server-owned/stateful tools that likely stay inline even after schema extraction: `set_default_budget` (default state + cache warm), `get_default_budget` (local state), `diagnostic_info` (uses `DiagnosticManager`), `clear_cache` (cacheManager), `set_output_format` (responseFormatter).