@kirjapro/mcp-server 0.8.2 → 0.8.5

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 (66) hide show
  1. package/CHANGELOG.md +58 -3
  2. package/dist/index.js +144 -142
  3. package/package.json +1 -1
  4. package/server.json +1 -1
  5. package/tool-fingerprints.json +4 -4
  6. package/dist/accounts.d.ts +0 -40
  7. package/dist/accounts.js +0 -45
  8. package/dist/auth.d.ts +0 -17
  9. package/dist/auth.js +0 -245
  10. package/dist/compliance/rates.d.ts +0 -53
  11. package/dist/compliance/rates.js +0 -57
  12. package/dist/database.types.d.ts +0 -6525
  13. package/dist/database.types.js +0 -20
  14. package/dist/index.d.ts +0 -2
  15. package/dist/lib/incomeStatementSynthesis.d.ts +0 -47
  16. package/dist/lib/incomeStatementSynthesis.js +0 -140
  17. package/dist/resources/company.d.ts +0 -2
  18. package/dist/resources/company.js +0 -75
  19. package/dist/resources/compliance.d.ts +0 -2
  20. package/dist/resources/compliance.js +0 -338
  21. package/dist/resources/index.d.ts +0 -2
  22. package/dist/resources/index.js +0 -10
  23. package/dist/resources/schema.d.ts +0 -2
  24. package/dist/resources/schema.js +0 -63
  25. package/dist/resources/security.d.ts +0 -2
  26. package/dist/resources/security.js +0 -33
  27. package/dist/schemas.d.ts +0 -12
  28. package/dist/schemas.js +0 -12
  29. package/dist/tools/accounts.d.ts +0 -2
  30. package/dist/tools/accounts.js +0 -48
  31. package/dist/tools/banking.d.ts +0 -2
  32. package/dist/tools/banking.js +0 -196
  33. package/dist/tools/bookings.d.ts +0 -2
  34. package/dist/tools/bookings.js +0 -294
  35. package/dist/tools/customers.d.ts +0 -2
  36. package/dist/tools/customers.js +0 -320
  37. package/dist/tools/financialNotes.d.ts +0 -2
  38. package/dist/tools/financialNotes.js +0 -255
  39. package/dist/tools/fingerprints.d.ts +0 -6
  40. package/dist/tools/fingerprints.js +0 -28
  41. package/dist/tools/fiscal-years.d.ts +0 -2
  42. package/dist/tools/fiscal-years.js +0 -35
  43. package/dist/tools/index.d.ts +0 -9
  44. package/dist/tools/index.js +0 -105
  45. package/dist/tools/invoices.d.ts +0 -2
  46. package/dist/tools/invoices.js +0 -489
  47. package/dist/tools/offers.d.ts +0 -2
  48. package/dist/tools/offers.js +0 -443
  49. package/dist/tools/received-invoices.d.ts +0 -2
  50. package/dist/tools/received-invoices.js +0 -134
  51. package/dist/tools/recurring-invoices.d.ts +0 -2
  52. package/dist/tools/recurring-invoices.js +0 -348
  53. package/dist/tools/reports.d.ts +0 -2
  54. package/dist/tools/reports.js +0 -869
  55. package/dist/tools/templates.d.ts +0 -89
  56. package/dist/tools/templates.js +0 -636
  57. package/dist/tools/transactions.d.ts +0 -2
  58. package/dist/tools/transactions.js +0 -597
  59. package/dist/tools/validation.d.ts +0 -26
  60. package/dist/tools/validation.js +0 -127
  61. package/dist/types.d.ts +0 -388
  62. package/dist/types.js +0 -34
  63. package/dist/utils.d.ts +0 -276
  64. package/dist/utils.js +0 -637
  65. package/dist/version.d.ts +0 -1
  66. package/dist/version.js +0 -3
package/CHANGELOG.md CHANGED
@@ -1,6 +1,62 @@
1
1
  # Changelog
2
2
 
3
- ## [0.8.2] - Unreleased
3
+ ## [0.8.5] - 2026-09-29
4
+
5
+ - `kirjapro_match_bank_transaction` returns the server's Finnish reason when
6
+ the bank confirmation rejects a match, for example a draft invoice, a
7
+ foreign-currency line, or a missing or closed fiscal year. Such confirmations
8
+ are no longer recorded with a skipped-journal warning. Postgres's own CHECK
9
+ violations keep the generic constraint message. The rejections come from
10
+ migration `20260928100000`, applied in production on 2026-09-28.
11
+ - `kirjapro_record_payment` and `kirjapro_match_bank_transaction` return
12
+ `IDEMPOTENCY_OUTCOME_UNKNOWN` when the payment RPC's response is lost in
13
+ transit (a network failure, or a gateway 5xx without a database error code).
14
+ The request may have committed, so the idempotency claim stays unresolved
15
+ instead of caching a failure that invited a retry with a new key and a
16
+ second payment. The same key never records the payment again; the message
17
+ names the read tool to check first. Database errors with a code are still
18
+ cached as the operation's result.
19
+ - Searches in `kirjapro_list_bank_transactions`, `kirjapro_list_customers`,
20
+ `kirjapro_list_received_invoices` and `kirjapro_list_accounts` find text
21
+ containing a comma or parentheses, such as "Virtanen, Matti". The search
22
+ value is now quoted in the PostgREST filter; it was percent-encoded twice
23
+ and matched nothing.
24
+ - `kirjapro_update_invoice_status` offers only the changes the database
25
+ accepts without a dedicated command: a draft to `cancelled`, and a sent or
26
+ partially paid invoice to `overdue`. The `status` input no longer accepts
27
+ `sent`, `paid`, `partial` or `draft`; the invoice trigger rejected those
28
+ updates and sent/partial/overdue→cancelled as "Value violates a constraint".
29
+ Paid and partial statuses come from `kirjapro_record_payment` or
30
+ `kirjapro_match_bank_transaction`, also for an invoice paid outside Kirjapro.
31
+ `kirjapro_delete_invoice` and the server instructions now send a sent invoice
32
+ to a credit note in the web app instead of a cancellation that always failed.
33
+ - `kirjapro_list_bank_transactions` returns each transaction's `currency` and
34
+ says that only EUR transactions can be matched to invoices. Its description
35
+ now lists `counterparty_iban` among the wrapped payer fields.
36
+ - Server instructions: the bank-matching workflow looks for the open invoice
37
+ among `sent`, `overdue` and `partial` invoices and confirms its remaining
38
+ balance, and says only EUR transactions can be matched. The untrusted-data
39
+ rule no longer claims IBANs are unwrapped; payer and sender IBANs are
40
+ wrapped, as `kirjapro://security/data-handling` states.
41
+ - External text can no longer close its `<untrusted-external>` wrapper early.
42
+ Embedded wrapper tags, including spaced variants, are stripped until none
43
+ remain, because removing one tag could join its neighbours into another
44
+ (`</untrusted-ext</untrusted-external>ernal>`). Prompt-injection markers are
45
+ redacted after the tags are gone, so a tag can no longer split one.
46
+ - Review the fingerprints of `kirjapro_list_bank_transactions`,
47
+ `kirjapro_update_invoice_status` and `kirjapro_delete_invoice` for their
48
+ changed descriptions and status input.
49
+
50
+ ## [0.8.4] - 2026-09-25
51
+
52
+ - Return the latest company-scoped financial-statement preparation snapshot in
53
+ the separate `preparation` field, including its profile, topic assessments,
54
+ revision and review status. This is a read-only view of preparation work;
55
+ a reviewed assessment does not mean a complete or signed financial statement.
56
+ - Clarify the limitations of the existing financial-statement notes worksheet.
57
+ - Synchronize generated database types with the deployed preparation schema.
58
+
59
+ ## [0.8.2] - 2026-09-23
4
60
 
5
61
  - Subtract finalized same-company credit notes from invoice-detail balances and
6
62
  manual/bank payment preflight. Preserve signed detail/manual-payment results,
@@ -19,8 +75,7 @@
19
75
  Preserve the company-scoped customer check and return errors for unavailable
20
76
  or invalid aggregate metrics instead of a zero summary.
21
77
  - Review affected tool fingerprints for the additive output fields and corrected
22
- balance/payment descriptions. This work is local, accompanies the pending
23
- credit-aware payment migrations, and has not been deployed or published.
78
+ balance/payment descriptions.
24
79
 
25
80
  ## [0.8.1] - 2026-09-05
26
81