tillbooks 0.1.0 → 1.0.0-beta.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 (893) hide show
  1. package/README.md +131 -30
  2. package/bin/till.mjs +32 -4
  3. package/dist/api/accrual-actions.d.ts +2 -1
  4. package/dist/api/accrual-actions.js +12 -12
  5. package/dist/api/accrual-actions.js.map +1 -1
  6. package/dist/api/actionKind.d.ts +42 -0
  7. package/dist/api/actionKind.js +28 -0
  8. package/dist/api/actionKind.js.map +1 -0
  9. package/dist/api/agent-actions.d.ts +2 -1
  10. package/dist/api/agent-actions.js +5 -5
  11. package/dist/api/agent-actions.js.map +1 -1
  12. package/dist/api/agent-gate.d.ts +6 -0
  13. package/dist/api/agent-gate.js +272 -69
  14. package/dist/api/agent-gate.js.map +1 -1
  15. package/dist/api/agent-oversight-actions.d.ts +2 -1
  16. package/dist/api/agent-oversight-actions.js.map +1 -1
  17. package/dist/api/approval-pointer.d.ts +63 -0
  18. package/dist/api/approval-pointer.js +105 -0
  19. package/dist/api/approval-pointer.js.map +1 -0
  20. package/dist/api/asset-actions.d.ts +2 -1
  21. package/dist/api/asset-actions.js +18 -18
  22. package/dist/api/asset-actions.js.map +1 -1
  23. package/dist/api/asset-reports-actions.d.ts +2 -1
  24. package/dist/api/asset-reports-actions.js.map +1 -1
  25. package/dist/api/attention-actions.d.ts +2 -1
  26. package/dist/api/attention-actions.js +1 -1
  27. package/dist/api/attention-actions.js.map +1 -1
  28. package/dist/api/automation-actions.d.ts +2 -1
  29. package/dist/api/automation-actions.js +9 -9
  30. package/dist/api/automation-actions.js.map +1 -1
  31. package/dist/api/bank-actions.d.ts +2 -1
  32. package/dist/api/bank-actions.js +5 -5
  33. package/dist/api/bank-actions.js.map +1 -1
  34. package/dist/api/bank-inbox-actions.d.ts +28 -0
  35. package/dist/api/bank-inbox-actions.js +45 -0
  36. package/dist/api/bank-inbox-actions.js.map +1 -0
  37. package/dist/api/bank-sync-offload.d.ts +71 -0
  38. package/dist/api/bank-sync-offload.js +137 -0
  39. package/dist/api/bank-sync-offload.js.map +1 -0
  40. package/dist/api/bank-sync-worker.d.ts +51 -0
  41. package/dist/api/bank-sync-worker.js +111 -0
  42. package/dist/api/bank-sync-worker.js.map +1 -0
  43. package/dist/api/billing-actions.d.ts +2 -1
  44. package/dist/api/billing-actions.js +2 -2
  45. package/dist/api/billing-actions.js.map +1 -1
  46. package/dist/api/camt-actions.d.ts +2 -1
  47. package/dist/api/camt-actions.js +12 -6
  48. package/dist/api/camt-actions.js.map +1 -1
  49. package/dist/api/capture-actions.d.ts +2 -1
  50. package/dist/api/capture-actions.js +5 -5
  51. package/dist/api/capture-actions.js.map +1 -1
  52. package/dist/api/checklist-actions.d.ts +2 -1
  53. package/dist/api/checklist-actions.js +5 -5
  54. package/dist/api/checklist-actions.js.map +1 -1
  55. package/dist/api/compose-actions.d.ts +39 -0
  56. package/dist/api/compose-actions.js +44 -0
  57. package/dist/api/compose-actions.js.map +1 -0
  58. package/dist/api/contact-actions.d.ts +2 -1
  59. package/dist/api/contact-actions.js +5 -5
  60. package/dist/api/contact-actions.js.map +1 -1
  61. package/dist/api/costing-actions.d.ts +2 -1
  62. package/dist/api/costing-actions.js.map +1 -1
  63. package/dist/api/customization-actions.d.ts +2 -1
  64. package/dist/api/customization-actions.js +7 -7
  65. package/dist/api/customization-actions.js.map +1 -1
  66. package/dist/api/dashboard-actions.d.ts +2 -1
  67. package/dist/api/dashboard-actions.js +21 -2
  68. package/dist/api/dashboard-actions.js.map +1 -1
  69. package/dist/api/data-actions.d.ts +3 -2
  70. package/dist/api/data-actions.js +48 -8
  71. package/dist/api/data-actions.js.map +1 -1
  72. package/dist/api/db-path.d.ts +4 -0
  73. package/dist/api/db-path.js +6 -2
  74. package/dist/api/db-path.js.map +1 -1
  75. package/dist/api/deal-actions.d.ts +2 -1
  76. package/dist/api/deal-actions.js +8 -8
  77. package/dist/api/deal-actions.js.map +1 -1
  78. package/dist/api/debtor-actions.d.ts +2 -1
  79. package/dist/api/debtor-actions.js +1 -1
  80. package/dist/api/debtor-actions.js.map +1 -1
  81. package/dist/api/delivery-actions.d.ts +2 -1
  82. package/dist/api/delivery-actions.js.map +1 -1
  83. package/dist/api/dispatch-actions.d.ts +5 -4
  84. package/dist/api/dispatch-actions.js +6 -5
  85. package/dist/api/dispatch-actions.js.map +1 -1
  86. package/dist/api/document-template-actions.d.ts +2 -1
  87. package/dist/api/document-template-actions.js +4 -4
  88. package/dist/api/document-template-actions.js.map +1 -1
  89. package/dist/api/draft-actions.d.ts +2 -1
  90. package/dist/api/draft-actions.js +2 -2
  91. package/dist/api/draft-actions.js.map +1 -1
  92. package/dist/api/dunning-actions.d.ts +6 -4
  93. package/dist/api/dunning-actions.js +10 -8
  94. package/dist/api/dunning-actions.js.map +1 -1
  95. package/dist/api/ebics-actions.d.ts +13 -13
  96. package/dist/api/ebics-actions.js +38 -18
  97. package/dist/api/ebics-actions.js.map +1 -1
  98. package/dist/api/ebill-actions.d.ts +2 -1
  99. package/dist/api/ebill-actions.js +3 -3
  100. package/dist/api/ebill-actions.js.map +1 -1
  101. package/dist/api/egress-actions.d.ts +2 -1
  102. package/dist/api/egress-actions.js.map +1 -1
  103. package/dist/api/env-actions.d.ts +2 -1
  104. package/dist/api/env-actions.js +19 -6
  105. package/dist/api/env-actions.js.map +1 -1
  106. package/dist/api/file-actions.d.ts +2 -1
  107. package/dist/api/file-actions.js +11 -11
  108. package/dist/api/file-actions.js.map +1 -1
  109. package/dist/api/forecast-actions.d.ts +2 -1
  110. package/dist/api/forecast-actions.js.map +1 -1
  111. package/dist/api/fx-actions.d.ts +2 -1
  112. package/dist/api/fx-actions.js +5 -5
  113. package/dist/api/fx-actions.js.map +1 -1
  114. package/dist/api/gl-archive-actions.d.ts +2 -1
  115. package/dist/api/gl-archive-actions.js +2 -2
  116. package/dist/api/gl-archive-actions.js.map +1 -1
  117. package/dist/api/guidance-actions.d.ts +2 -1
  118. package/dist/api/guidance-actions.js.map +1 -1
  119. package/dist/api/host-runtime.d.ts +103 -4
  120. package/dist/api/host-runtime.js +95 -26
  121. package/dist/api/host-runtime.js.map +1 -1
  122. package/dist/api/hr-actions.d.ts +2 -1
  123. package/dist/api/hr-actions.js +9 -9
  124. package/dist/api/hr-actions.js.map +1 -1
  125. package/dist/api/inventory-actions.d.ts +2 -1
  126. package/dist/api/inventory-actions.js +9 -9
  127. package/dist/api/inventory-actions.js.map +1 -1
  128. package/dist/api/inventory-adjust-actions.d.ts +2 -1
  129. package/dist/api/inventory-adjust-actions.js +6 -6
  130. package/dist/api/inventory-adjust-actions.js.map +1 -1
  131. package/dist/api/inventory-agent-actions.d.ts +2 -1
  132. package/dist/api/inventory-agent-actions.js.map +1 -1
  133. package/dist/api/item-actions.d.ts +2 -1
  134. package/dist/api/item-actions.js +7 -7
  135. package/dist/api/item-actions.js.map +1 -1
  136. package/dist/api/landed-cost-actions.d.ts +2 -1
  137. package/dist/api/landed-cost-actions.js +3 -3
  138. package/dist/api/landed-cost-actions.js.map +1 -1
  139. package/dist/api/liquidity-actions.d.ts +30 -0
  140. package/dist/api/liquidity-actions.js +52 -0
  141. package/dist/api/liquidity-actions.js.map +1 -0
  142. package/dist/api/local-http.d.ts +18 -5
  143. package/dist/api/local-http.js +62 -16
  144. package/dist/api/local-http.js.map +1 -1
  145. package/dist/api/mail-actions.d.ts +2 -1
  146. package/dist/api/mail-actions.js +3 -3
  147. package/dist/api/mail-actions.js.map +1 -1
  148. package/dist/api/maintenance-actions.d.ts +2 -1
  149. package/dist/api/maintenance-actions.js +3 -3
  150. package/dist/api/maintenance-actions.js.map +1 -1
  151. package/dist/api/mcp-http.d.ts +12 -3
  152. package/dist/api/mcp-http.js +113 -7
  153. package/dist/api/mcp-http.js.map +1 -1
  154. package/dist/api/mcp.d.ts +55 -4
  155. package/dist/api/mcp.js +106 -16
  156. package/dist/api/mcp.js.map +1 -1
  157. package/dist/api/migration-actions.d.ts +2 -1
  158. package/dist/api/migration-actions.js +8 -8
  159. package/dist/api/migration-actions.js.map +1 -1
  160. package/dist/api/migration-check-actions.d.ts +2 -1
  161. package/dist/api/migration-check-actions.js +3 -3
  162. package/dist/api/migration-check-actions.js.map +1 -1
  163. package/dist/api/migration-extraction-actions.d.ts +3 -2
  164. package/dist/api/migration-extraction-actions.js +2 -2
  165. package/dist/api/migration-extraction-actions.js.map +1 -1
  166. package/dist/api/migration-map-actions.d.ts +3 -2
  167. package/dist/api/migration-map-actions.js +3 -3
  168. package/dist/api/migration-map-actions.js.map +1 -1
  169. package/dist/api/migration-open-items-actions.d.ts +2 -1
  170. package/dist/api/migration-open-items-actions.js +1 -1
  171. package/dist/api/migration-open-items-actions.js.map +1 -1
  172. package/dist/api/migration-project-actions.d.ts +2 -1
  173. package/dist/api/migration-project-actions.js +8 -8
  174. package/dist/api/migration-project-actions.js.map +1 -1
  175. package/dist/api/migration-testmandant-actions.d.ts +5 -2
  176. package/dist/api/migration-testmandant-actions.js +10 -5
  177. package/dist/api/migration-testmandant-actions.js.map +1 -1
  178. package/dist/api/move-actions.d.ts +2 -1
  179. package/dist/api/move-actions.js +1 -1
  180. package/dist/api/move-actions.js.map +1 -1
  181. package/dist/api/movement-actions.d.ts +2 -1
  182. package/dist/api/movement-actions.js +3 -3
  183. package/dist/api/movement-actions.js.map +1 -1
  184. package/dist/api/notification-actions.d.ts +2 -1
  185. package/dist/api/notification-actions.js +6 -6
  186. package/dist/api/notification-actions.js.map +1 -1
  187. package/dist/api/onboarding-actions.d.ts +3 -2
  188. package/dist/api/onboarding-actions.js +3 -3
  189. package/dist/api/onboarding-actions.js.map +1 -1
  190. package/dist/api/opening-actions.d.ts +4 -1
  191. package/dist/api/opening-actions.js +11 -6
  192. package/dist/api/opening-actions.js.map +1 -1
  193. package/dist/api/pain001-actions.d.ts +2 -1
  194. package/dist/api/pain001-actions.js +5 -5
  195. package/dist/api/pain001-actions.js.map +1 -1
  196. package/dist/api/payment-actions.d.ts +2 -1
  197. package/dist/api/payment-actions.js +4 -4
  198. package/dist/api/payment-actions.js.map +1 -1
  199. package/dist/api/payroll-actions.d.ts +2 -1
  200. package/dist/api/payroll-actions.js +2 -2
  201. package/dist/api/payroll-actions.js.map +1 -1
  202. package/dist/api/permission-actions.d.ts +3 -2
  203. package/dist/api/permission-actions.js +6 -6
  204. package/dist/api/permission-actions.js.map +1 -1
  205. package/dist/api/plugin-actions.d.ts +2 -1
  206. package/dist/api/plugin-actions.js +5 -5
  207. package/dist/api/plugin-actions.js.map +1 -1
  208. package/dist/api/plugin-sandbox-host.js +49 -0
  209. package/dist/api/plugin-sandbox-host.js.map +1 -1
  210. package/dist/api/po-amendment-actions.d.ts +2 -1
  211. package/dist/api/po-amendment-actions.js +6 -6
  212. package/dist/api/po-amendment-actions.js.map +1 -1
  213. package/dist/api/portal-actions.d.ts +3 -2
  214. package/dist/api/portal-actions.js +5 -5
  215. package/dist/api/portal-actions.js.map +1 -1
  216. package/dist/api/procurement-analytics-actions.d.ts +2 -1
  217. package/dist/api/procurement-analytics-actions.js.map +1 -1
  218. package/dist/api/project-actions.d.ts +2 -1
  219. package/dist/api/project-actions.js +7 -7
  220. package/dist/api/project-actions.js.map +1 -1
  221. package/dist/api/purchase-actions.d.ts +2 -1
  222. package/dist/api/purchase-actions.js +5 -5
  223. package/dist/api/purchase-actions.js.map +1 -1
  224. package/dist/api/purchase-order-actions.d.ts +2 -1
  225. package/dist/api/purchase-order-actions.js +8 -8
  226. package/dist/api/purchase-order-actions.js.map +1 -1
  227. package/dist/api/qr-match-actions.d.ts +2 -1
  228. package/dist/api/qr-match-actions.js +4 -4
  229. package/dist/api/qr-match-actions.js.map +1 -1
  230. package/dist/api/quote-actions.d.ts +2 -1
  231. package/dist/api/quote-actions.js +8 -8
  232. package/dist/api/quote-actions.js.map +1 -1
  233. package/dist/api/receipt-actions.d.ts +2 -1
  234. package/dist/api/receipt-actions.js +8 -8
  235. package/dist/api/receipt-actions.js.map +1 -1
  236. package/dist/api/recurring-actions.d.ts +2 -1
  237. package/dist/api/recurring-actions.js +6 -6
  238. package/dist/api/recurring-actions.js.map +1 -1
  239. package/dist/api/registry.d.ts +92 -2
  240. package/dist/api/registry.js +437 -71
  241. package/dist/api/registry.js.map +1 -1
  242. package/dist/api/report-actions.d.ts +2 -1
  243. package/dist/api/report-actions.js.map +1 -1
  244. package/dist/api/report-builder-actions.d.ts +2 -1
  245. package/dist/api/report-builder-actions.js +6 -6
  246. package/dist/api/report-builder-actions.js.map +1 -1
  247. package/dist/api/requisition-actions.d.ts +2 -1
  248. package/dist/api/requisition-actions.js +8 -8
  249. package/dist/api/requisition-actions.js.map +1 -1
  250. package/dist/api/rest.d.ts +6 -0
  251. package/dist/api/rest.js +14 -1
  252. package/dist/api/rest.js.map +1 -1
  253. package/dist/api/retainer-actions.d.ts +2 -1
  254. package/dist/api/retainer-actions.js +5 -5
  255. package/dist/api/retainer-actions.js.map +1 -1
  256. package/dist/api/review-actions.d.ts +2 -1
  257. package/dist/api/review-actions.js +4 -4
  258. package/dist/api/review-actions.js.map +1 -1
  259. package/dist/api/runtime-state.d.ts +5 -2
  260. package/dist/api/runtime-state.js +6 -2
  261. package/dist/api/runtime-state.js.map +1 -1
  262. package/dist/api/sales-order-actions.d.ts +2 -1
  263. package/dist/api/sales-order-actions.js +8 -8
  264. package/dist/api/sales-order-actions.js.map +1 -1
  265. package/dist/api/scheduler.d.ts +43 -0
  266. package/dist/api/scheduler.js +158 -0
  267. package/dist/api/scheduler.js.map +1 -1
  268. package/dist/api/search-actions.d.ts +2 -1
  269. package/dist/api/search-actions.js.map +1 -1
  270. package/dist/api/serve.js +13 -5
  271. package/dist/api/serve.js.map +1 -1
  272. package/dist/api/session.d.ts +99 -28
  273. package/dist/api/session.js +120 -45
  274. package/dist/api/session.js.map +1 -1
  275. package/dist/api/sign-actions.d.ts +2 -1
  276. package/dist/api/sign-actions.js +6 -6
  277. package/dist/api/sign-actions.js.map +1 -1
  278. package/dist/api/stock-actions.d.ts +2 -1
  279. package/dist/api/stock-actions.js +6 -6
  280. package/dist/api/stock-actions.js.map +1 -1
  281. package/dist/api/stocktake-actions.d.ts +2 -1
  282. package/dist/api/stocktake-actions.js +6 -6
  283. package/dist/api/stocktake-actions.js.map +1 -1
  284. package/dist/api/supplier-performance-actions.d.ts +2 -1
  285. package/dist/api/supplier-performance-actions.js.map +1 -1
  286. package/dist/api/support-actions.d.ts +2 -1
  287. package/dist/api/support-actions.js +24 -4
  288. package/dist/api/support-actions.js.map +1 -1
  289. package/dist/api/sync-actions.d.ts +2 -1
  290. package/dist/api/sync-actions.js +2 -2
  291. package/dist/api/sync-actions.js.map +1 -1
  292. package/dist/api/task-actions.d.ts +2 -1
  293. package/dist/api/task-actions.js +5 -5
  294. package/dist/api/task-actions.js.map +1 -1
  295. package/dist/api/three-way-match-actions.d.ts +2 -1
  296. package/dist/api/three-way-match-actions.js +3 -3
  297. package/dist/api/three-way-match-actions.js.map +1 -1
  298. package/dist/api/time-actions.d.ts +2 -1
  299. package/dist/api/time-actions.js +10 -10
  300. package/dist/api/time-actions.js.map +1 -1
  301. package/dist/api/tracking-actions.d.ts +2 -1
  302. package/dist/api/tracking-actions.js +10 -10
  303. package/dist/api/tracking-actions.js.map +1 -1
  304. package/dist/api/up-lock.d.ts +6 -0
  305. package/dist/api/up-lock.js +2 -1
  306. package/dist/api/up-lock.js.map +1 -1
  307. package/dist/api/up.d.ts +45 -5
  308. package/dist/api/up.js +157 -22
  309. package/dist/api/up.js.map +1 -1
  310. package/dist/api/valuation-actions.d.ts +2 -1
  311. package/dist/api/valuation-actions.js +3 -3
  312. package/dist/api/valuation-actions.js.map +1 -1
  313. package/dist/api/valuation-run-actions.d.ts +2 -1
  314. package/dist/api/valuation-run-actions.js +4 -4
  315. package/dist/api/valuation-run-actions.js.map +1 -1
  316. package/dist/api/vendor-portal-actions.d.ts +2 -1
  317. package/dist/api/vendor-portal-actions.js +3 -3
  318. package/dist/api/vendor-portal-actions.js.map +1 -1
  319. package/dist/api/voice-actions.d.ts +2 -1
  320. package/dist/api/voice-actions.js +2 -2
  321. package/dist/api/voice-actions.js.map +1 -1
  322. package/dist/api/workspace-actions.d.ts +3 -2
  323. package/dist/api/workspace-actions.js +4 -3
  324. package/dist/api/workspace-actions.js.map +1 -1
  325. package/dist/core/access/actionCapabilities.js +60 -1
  326. package/dist/core/access/actionCapabilities.js.map +1 -1
  327. package/dist/core/access/capability.d.ts +4 -0
  328. package/dist/core/access/capability.js +7 -0
  329. package/dist/core/access/capability.js.map +1 -1
  330. package/dist/core/access/members.d.ts +8 -0
  331. package/dist/core/access/members.js +44 -5
  332. package/dist/core/access/members.js.map +1 -1
  333. package/dist/core/access/roles.js +3 -1
  334. package/dist/core/access/roles.js.map +1 -1
  335. package/dist/core/access/schema.d.ts +1 -1
  336. package/dist/core/access/schema.js +4 -2
  337. package/dist/core/access/schema.js.map +1 -1
  338. package/dist/core/accounts/accounts.d.ts +11 -0
  339. package/dist/core/accounts/accounts.js +28 -1
  340. package/dist/core/accounts/accounts.js.map +1 -1
  341. package/dist/core/accounts/index.d.ts +1 -1
  342. package/dist/core/accounts/index.js +1 -1
  343. package/dist/core/accounts/index.js.map +1 -1
  344. package/dist/core/accounts/kmuSeed.d.ts +8 -0
  345. package/dist/core/accounts/kmuSeed.js +8 -0
  346. package/dist/core/accounts/kmuSeed.js.map +1 -1
  347. package/dist/core/accruals/accrual.js +5 -5
  348. package/dist/core/accruals/accrual.js.map +1 -1
  349. package/dist/core/accruals/provision.js +3 -2
  350. package/dist/core/accruals/provision.js.map +1 -1
  351. package/dist/core/accruals/vatSettlement.js +4 -3
  352. package/dist/core/accruals/vatSettlement.js.map +1 -1
  353. package/dist/core/agent/consequenceTag.d.ts +36 -0
  354. package/dist/core/agent/consequenceTag.js +33 -0
  355. package/dist/core/agent/consequenceTag.js.map +1 -0
  356. package/dist/core/agent/consequences.d.ts +68 -0
  357. package/dist/core/agent/consequences.js +1218 -0
  358. package/dist/core/agent/consequences.js.map +1 -0
  359. package/dist/core/agent/dial.d.ts +10 -0
  360. package/dist/core/agent/dial.js +33 -1
  361. package/dist/core/agent/dial.js.map +1 -1
  362. package/dist/core/agent/dialMap.d.ts +92 -5
  363. package/dist/core/agent/dialMap.js +707 -85
  364. package/dist/core/agent/dialMap.js.map +1 -1
  365. package/dist/core/agent/draftedActions.d.ts +3 -17
  366. package/dist/core/agent/draftedActions.js +123 -10
  367. package/dist/core/agent/draftedActions.js.map +1 -1
  368. package/dist/core/agent/index.d.ts +7 -2
  369. package/dist/core/agent/index.js +5 -2
  370. package/dist/core/agent/index.js.map +1 -1
  371. package/dist/core/agent/reviewSeam.js +7 -4
  372. package/dist/core/agent/reviewSeam.js.map +1 -1
  373. package/dist/core/agent/ruleTier.d.ts +65 -0
  374. package/dist/core/agent/ruleTier.js +202 -0
  375. package/dist/core/agent/ruleTier.js.map +1 -0
  376. package/dist/core/agent/schema.d.ts +9 -1
  377. package/dist/core/agent/schema.js +11 -1
  378. package/dist/core/agent/schema.js.map +1 -1
  379. package/dist/core/agent/vorschlagPin.d.ts +830 -0
  380. package/dist/core/agent/vorschlagPin.js +1245 -0
  381. package/dist/core/agent/vorschlagPin.js.map +1 -0
  382. package/dist/core/agent/wayBack.d.ts +81 -0
  383. package/dist/core/agent/wayBack.js +534 -0
  384. package/dist/core/agent/wayBack.js.map +1 -0
  385. package/dist/core/assets/depreciationRun.js +9 -6
  386. package/dist/core/assets/depreciationRun.js.map +1 -1
  387. package/dist/core/attention/compose.js +7 -1
  388. package/dist/core/attention/compose.js.map +1 -1
  389. package/dist/core/attention/providers.js +59 -19
  390. package/dist/core/attention/providers.js.map +1 -1
  391. package/dist/core/attention/types.d.ts +19 -0
  392. package/dist/core/attention/types.js.map +1 -1
  393. package/dist/core/automation/denylist.d.ts +25 -0
  394. package/dist/core/automation/denylist.js +207 -3
  395. package/dist/core/automation/denylist.js.map +1 -1
  396. package/dist/core/automation/fire.js +27 -7
  397. package/dist/core/automation/fire.js.map +1 -1
  398. package/dist/core/automation/rules.js +4 -1
  399. package/dist/core/automation/rules.js.map +1 -1
  400. package/dist/core/banking/attentionProviders.d.ts +37 -0
  401. package/dist/core/banking/attentionProviders.js +343 -0
  402. package/dist/core/banking/attentionProviders.js.map +1 -0
  403. package/dist/core/banking/automationGuard.d.ts +18 -0
  404. package/dist/core/banking/automationGuard.js +27 -0
  405. package/dist/core/banking/automationGuard.js.map +1 -0
  406. package/dist/core/banking/bankAccounts.d.ts +7 -0
  407. package/dist/core/banking/bankAccounts.js +32 -4
  408. package/dist/core/banking/bankAccounts.js.map +1 -1
  409. package/dist/core/banking/bankBooking.d.ts +144 -0
  410. package/dist/core/banking/bankBooking.js +1104 -0
  411. package/dist/core/banking/bankBooking.js.map +1 -0
  412. package/dist/core/banking/bankInbox.d.ts +234 -0
  413. package/dist/core/banking/bankInbox.js +589 -0
  414. package/dist/core/banking/bankInbox.js.map +1 -0
  415. package/dist/core/banking/bankInboxSchema.d.ts +57 -0
  416. package/dist/core/banking/bankInboxSchema.js +204 -0
  417. package/dist/core/banking/bankInboxSchema.js.map +1 -0
  418. package/dist/core/banking/bankLines.d.ts +240 -0
  419. package/dist/core/banking/bankLines.js +346 -0
  420. package/dist/core/banking/bankLines.js.map +1 -0
  421. package/dist/core/banking/bankModelRung.d.ts +118 -0
  422. package/dist/core/banking/bankModelRung.js +260 -0
  423. package/dist/core/banking/bankModelRung.js.map +1 -0
  424. package/dist/core/banking/bankModelSuggest.d.ts +66 -0
  425. package/dist/core/banking/bankModelSuggest.js +274 -0
  426. package/dist/core/banking/bankModelSuggest.js.map +1 -0
  427. package/dist/core/banking/bankProposals.d.ts +85 -0
  428. package/dist/core/banking/bankProposals.js +530 -0
  429. package/dist/core/banking/bankProposals.js.map +1 -0
  430. package/dist/core/banking/camt.d.ts +42 -0
  431. package/dist/core/banking/camt.js +169 -29
  432. package/dist/core/banking/camt.js.map +1 -1
  433. package/dist/core/banking/camtReconcile.d.ts +86 -43
  434. package/dist/core/banking/camtReconcile.js +371 -456
  435. package/dist/core/banking/camtReconcile.js.map +1 -1
  436. package/dist/core/banking/camtSchema.d.ts +9 -4
  437. package/dist/core/banking/camtSchema.js +50 -6
  438. package/dist/core/banking/camtSchema.js.map +1 -1
  439. package/dist/core/banking/debitRanking.d.ts +51 -0
  440. package/dist/core/banking/debitRanking.js +192 -0
  441. package/dist/core/banking/debitRanking.js.map +1 -0
  442. package/dist/core/banking/ebics/activationCheck.d.ts +105 -0
  443. package/dist/core/banking/ebics/activationCheck.js +205 -0
  444. package/dist/core/banking/ebics/activationCheck.js.map +1 -0
  445. package/dist/core/banking/ebics/attentionProvider.d.ts +49 -0
  446. package/dist/core/banking/ebics/attentionProvider.js +185 -0
  447. package/dist/core/banking/ebics/attentionProvider.js.map +1 -0
  448. package/dist/core/banking/ebics/autoSync.d.ts +173 -0
  449. package/dist/core/banking/ebics/autoSync.js +313 -0
  450. package/dist/core/banking/ebics/autoSync.js.map +1 -0
  451. package/dist/core/banking/ebics/banks.d.ts +11 -0
  452. package/dist/core/banking/ebics/banks.js +24 -0
  453. package/dist/core/banking/ebics/banks.js.map +1 -1
  454. package/dist/core/banking/ebics/certificates.d.ts +48 -0
  455. package/dist/core/banking/ebics/certificates.js +160 -0
  456. package/dist/core/banking/ebics/certificates.js.map +1 -0
  457. package/dist/core/banking/ebics/channel.d.ts +150 -85
  458. package/dist/core/banking/ebics/channel.js +1360 -782
  459. package/dist/core/banking/ebics/channel.js.map +1 -1
  460. package/dist/core/banking/ebics/enums.d.ts +14 -15
  461. package/dist/core/banking/ebics/enums.js +14 -15
  462. package/dist/core/banking/ebics/enums.js.map +1 -1
  463. package/dist/core/banking/ebics/feed.d.ts +174 -0
  464. package/dist/core/banking/ebics/feed.js +318 -0
  465. package/dist/core/banking/ebics/feed.js.map +1 -0
  466. package/dist/core/banking/ebics/hash-format.d.ts +19 -0
  467. package/dist/core/banking/ebics/hash-format.js +32 -0
  468. package/dist/core/banking/ebics/hash-format.js.map +1 -0
  469. package/dist/core/banking/ebics/index.d.ts +19 -7
  470. package/dist/core/banking/ebics/index.js +14 -6
  471. package/dist/core/banking/ebics/index.js.map +1 -1
  472. package/dist/core/banking/ebics/key-hashes.d.ts +38 -0
  473. package/dist/core/banking/ebics/key-hashes.js +51 -0
  474. package/dist/core/banking/ebics/key-hashes.js.map +1 -0
  475. package/dist/core/banking/ebics/keystore-file.d.ts +13 -0
  476. package/dist/core/banking/ebics/keystore-file.js +111 -56
  477. package/dist/core/banking/ebics/keystore-file.js.map +1 -1
  478. package/dist/core/banking/ebics/keystore.d.ts +13 -19
  479. package/dist/core/banking/ebics/keystore.js +28 -76
  480. package/dist/core/banking/ebics/keystore.js.map +1 -1
  481. package/dist/core/banking/ebics/schema.d.ts +1 -1
  482. package/dist/core/banking/ebics/schema.js +78 -3
  483. package/dist/core/banking/ebics/schema.js.map +1 -1
  484. package/dist/core/banking/ebics/stored-pair.d.ts +64 -0
  485. package/dist/core/banking/ebics/stored-pair.js +114 -0
  486. package/dist/core/banking/ebics/stored-pair.js.map +1 -0
  487. package/dist/core/banking/ebics/transport-https.d.ts +63 -58
  488. package/dist/core/banking/ebics/transport-https.js +212 -104
  489. package/dist/core/banking/ebics/transport-https.js.map +1 -1
  490. package/dist/core/banking/importCamtFiles.d.ts +51 -0
  491. package/dist/core/banking/importCamtFiles.js +160 -0
  492. package/dist/core/banking/importCamtFiles.js.map +1 -0
  493. package/dist/core/banking/index.d.ts +22 -0
  494. package/dist/core/banking/index.js +16 -0
  495. package/dist/core/banking/index.js.map +1 -1
  496. package/dist/core/banking/managed/channel.js +5 -1
  497. package/dist/core/banking/managed/channel.js.map +1 -1
  498. package/dist/core/banking/pain001.d.ts +27 -29
  499. package/dist/core/banking/pain001.js +169 -116
  500. package/dist/core/banking/pain001.js.map +1 -1
  501. package/dist/core/banking/pain001Refs.d.ts +96 -0
  502. package/dist/core/banking/pain001Refs.js +128 -0
  503. package/dist/core/banking/pain001Refs.js.map +1 -0
  504. package/dist/core/banking/pain001Schema.d.ts +1 -1
  505. package/dist/core/banking/pain001Schema.js +39 -1
  506. package/dist/core/banking/pain001Schema.js.map +1 -1
  507. package/dist/core/banking/qrMatch.d.ts +55 -0
  508. package/dist/core/banking/qrMatch.js +152 -27
  509. package/dist/core/banking/qrMatch.js.map +1 -1
  510. package/dist/core/banking/statementGapAck.d.ts +41 -0
  511. package/dist/core/banking/statementGapAck.js +154 -0
  512. package/dist/core/banking/statementGapAck.js.map +1 -0
  513. package/dist/core/banking/statementGaps.d.ts +136 -0
  514. package/dist/core/banking/statementGaps.js +381 -0
  515. package/dist/core/banking/statementGaps.js.map +1 -0
  516. package/dist/core/checklists/attentionProvider.d.ts +7 -0
  517. package/dist/core/checklists/attentionProvider.js +14 -2
  518. package/dist/core/checklists/attentionProvider.js.map +1 -1
  519. package/dist/core/checklists/checks.d.ts +3 -1
  520. package/dist/core/checklists/checks.js +14 -24
  521. package/dist/core/checklists/checks.js.map +1 -1
  522. package/dist/core/checklists/index.d.ts +3 -3
  523. package/dist/core/checklists/index.js +2 -2
  524. package/dist/core/checklists/index.js.map +1 -1
  525. package/dist/core/checklists/periods.d.ts +47 -0
  526. package/dist/core/checklists/periods.js +44 -1
  527. package/dist/core/checklists/periods.js.map +1 -1
  528. package/dist/core/checklists/prompt.js +8 -2
  529. package/dist/core/checklists/prompt.js.map +1 -1
  530. package/dist/core/checklists/runs.d.ts +34 -3
  531. package/dist/core/checklists/runs.js +126 -9
  532. package/dist/core/checklists/runs.js.map +1 -1
  533. package/dist/core/context.d.ts +99 -55
  534. package/dist/core/context.js.map +1 -1
  535. package/dist/core/customization/dispatch.d.ts +17 -0
  536. package/dist/core/customization/dispatch.js +37 -63
  537. package/dist/core/customization/dispatch.js.map +1 -1
  538. package/dist/core/customization/dispatchDefaults.d.ts +26 -0
  539. package/dist/core/customization/dispatchDefaults.js +80 -0
  540. package/dist/core/customization/dispatchDefaults.js.map +1 -0
  541. package/dist/core/customization/fields.js +4 -1
  542. package/dist/core/customization/fields.js.map +1 -1
  543. package/dist/core/customization/index.d.ts +2 -2
  544. package/dist/core/customization/index.js +1 -1
  545. package/dist/core/customization/index.js.map +1 -1
  546. package/dist/core/dashboards/dashboards.d.ts +4 -0
  547. package/dist/core/dashboards/dashboards.js +83 -1
  548. package/dist/core/dashboards/dashboards.js.map +1 -1
  549. package/dist/core/dashboards/tiles.d.ts +1 -1
  550. package/dist/core/dashboards/tiles.js +5 -0
  551. package/dist/core/dashboards/tiles.js.map +1 -1
  552. package/dist/core/data/catalog.d.ts +6 -5
  553. package/dist/core/data/catalog.js +7 -5
  554. package/dist/core/data/catalog.js.map +1 -1
  555. package/dist/core/data/idRemap.d.ts +119 -0
  556. package/dist/core/data/idRemap.js +366 -0
  557. package/dist/core/data/idRemap.js.map +1 -0
  558. package/dist/core/data/portability.d.ts +101 -5
  559. package/dist/core/data/portability.js +663 -89
  560. package/dist/core/data/portability.js.map +1 -1
  561. package/dist/core/data/restorable.d.ts +15 -3
  562. package/dist/core/data/restorable.js +21 -3
  563. package/dist/core/data/restorable.js.map +1 -1
  564. package/dist/core/deals/deals.js +12 -2
  565. package/dist/core/deals/deals.js.map +1 -1
  566. package/dist/core/drafting/draft.d.ts +9 -0
  567. package/dist/core/drafting/draft.js +54 -6
  568. package/dist/core/drafting/draft.js.map +1 -1
  569. package/dist/core/dunning/index.d.ts +2 -2
  570. package/dist/core/dunning/index.js +1 -1
  571. package/dist/core/dunning/index.js.map +1 -1
  572. package/dist/core/dunning/pdf.js +22 -10
  573. package/dist/core/dunning/pdf.js.map +1 -1
  574. package/dist/core/dunning/run.d.ts +21 -0
  575. package/dist/core/dunning/run.js +85 -5
  576. package/dist/core/dunning/run.js.map +1 -1
  577. package/dist/core/files/files.d.ts +5 -0
  578. package/dist/core/files/files.js +21 -2
  579. package/dist/core/files/files.js.map +1 -1
  580. package/dist/core/files/index.d.ts +2 -2
  581. package/dist/core/files/index.js +2 -2
  582. package/dist/core/files/index.js.map +1 -1
  583. package/dist/core/files/retention.d.ts +15 -0
  584. package/dist/core/files/retention.js +38 -2
  585. package/dist/core/files/retention.js.map +1 -1
  586. package/dist/core/fx/importRates.d.ts +5 -0
  587. package/dist/core/fx/importRates.js +25 -2
  588. package/dist/core/fx/importRates.js.map +1 -1
  589. package/dist/core/fx/revaluation.js +6 -5
  590. package/dist/core/fx/revaluation.js.map +1 -1
  591. package/dist/core/hr/claims.js +10 -0
  592. package/dist/core/hr/claims.js.map +1 -1
  593. package/dist/core/inventory/movement.d.ts +2 -0
  594. package/dist/core/inventory/movement.js +54 -3
  595. package/dist/core/inventory/movement.js.map +1 -1
  596. package/dist/core/inventory/reconciliation.js +8 -8
  597. package/dist/core/inventory/reconciliation.js.map +1 -1
  598. package/dist/core/landscape/copy.js +89 -31
  599. package/dist/core/landscape/copy.js.map +1 -1
  600. package/dist/core/landscape/operations.d.ts +15 -1
  601. package/dist/core/landscape/operations.js +96 -10
  602. package/dist/core/landscape/operations.js.map +1 -1
  603. package/dist/core/landscape/sanitize.js +27 -1
  604. package/dist/core/landscape/sanitize.js.map +1 -1
  605. package/dist/core/landscape/secrets.js +6 -0
  606. package/dist/core/landscape/secrets.js.map +1 -1
  607. package/dist/core/ledger/auditLog.d.ts +9 -0
  608. package/dist/core/ledger/auditLog.js +15 -0
  609. package/dist/core/ledger/auditLog.js.map +1 -1
  610. package/dist/core/ledger/compose.d.ts +142 -0
  611. package/dist/core/ledger/compose.js +566 -0
  612. package/dist/core/ledger/compose.js.map +1 -0
  613. package/dist/core/ledger/draft.js +18 -3
  614. package/dist/core/ledger/draft.js.map +1 -1
  615. package/dist/core/ledger/importMigration.d.ts +8 -0
  616. package/dist/core/ledger/importMigration.js +36 -5
  617. package/dist/core/ledger/importMigration.js.map +1 -1
  618. package/dist/core/ledger/index.d.ts +2 -2
  619. package/dist/core/ledger/index.js +2 -2
  620. package/dist/core/ledger/index.js.map +1 -1
  621. package/dist/core/ledger/innerPosting.d.ts +29 -0
  622. package/dist/core/ledger/innerPosting.js +46 -0
  623. package/dist/core/ledger/innerPosting.js.map +1 -0
  624. package/dist/core/ledger/openingBalances.d.ts +6 -0
  625. package/dist/core/ledger/openingBalances.js +85 -40
  626. package/dist/core/ledger/openingBalances.js.map +1 -1
  627. package/dist/core/ledger/periods.d.ts +36 -4
  628. package/dist/core/ledger/periods.js +70 -4
  629. package/dist/core/ledger/periods.js.map +1 -1
  630. package/dist/core/ledger/postEntry.d.ts +68 -0
  631. package/dist/core/ledger/postEntry.js +98 -37
  632. package/dist/core/ledger/postEntry.js.map +1 -1
  633. package/dist/core/ledger/reads.d.ts +6 -0
  634. package/dist/core/ledger/reads.js +1 -0
  635. package/dist/core/ledger/reads.js.map +1 -1
  636. package/dist/core/ledger/reverseEntry.d.ts +61 -1
  637. package/dist/core/ledger/reverseEntry.js +93 -3
  638. package/dist/core/ledger/reverseEntry.js.map +1 -1
  639. package/dist/core/ledger/yearClose.d.ts +29 -0
  640. package/dist/core/ledger/yearClose.js +86 -5
  641. package/dist/core/ledger/yearClose.js.map +1 -1
  642. package/dist/core/liquidity/calendar.d.ts +45 -0
  643. package/dist/core/liquidity/calendar.js +115 -0
  644. package/dist/core/liquidity/calendar.js.map +1 -0
  645. package/dist/core/liquidity/delay.d.ts +43 -0
  646. package/dist/core/liquidity/delay.js +78 -0
  647. package/dist/core/liquidity/delay.js.map +1 -0
  648. package/dist/core/liquidity/flows.d.ts +172 -0
  649. package/dist/core/liquidity/flows.js +705 -0
  650. package/dist/core/liquidity/flows.js.map +1 -0
  651. package/dist/core/liquidity/forecast.d.ts +26 -0
  652. package/dist/core/liquidity/forecast.js +190 -0
  653. package/dist/core/liquidity/forecast.js.map +1 -0
  654. package/dist/core/liquidity/index.d.ts +20 -0
  655. package/dist/core/liquidity/index.js +13 -0
  656. package/dist/core/liquidity/index.js.map +1 -0
  657. package/dist/core/liquidity/optimise.d.ts +248 -0
  658. package/dist/core/liquidity/optimise.js +1092 -0
  659. package/dist/core/liquidity/optimise.js.map +1 -0
  660. package/dist/core/liquidity/plan.d.ts +141 -0
  661. package/dist/core/liquidity/plan.js +576 -0
  662. package/dist/core/liquidity/plan.js.map +1 -0
  663. package/dist/core/liquidity/plannedFlows.d.ts +75 -0
  664. package/dist/core/liquidity/plannedFlows.js +151 -0
  665. package/dist/core/liquidity/plannedFlows.js.map +1 -0
  666. package/dist/core/liquidity/schema.d.ts +26 -0
  667. package/dist/core/liquidity/schema.js +186 -0
  668. package/dist/core/liquidity/schema.js.map +1 -0
  669. package/dist/core/liquidity/terms.d.ts +54 -0
  670. package/dist/core/liquidity/terms.js +179 -0
  671. package/dist/core/liquidity/terms.js.map +1 -0
  672. package/dist/core/liquidity/vat.d.ts +105 -0
  673. package/dist/core/liquidity/vat.js +248 -0
  674. package/dist/core/liquidity/vat.js.map +1 -0
  675. package/dist/core/mail/index.d.ts +1 -1
  676. package/dist/core/mail/index.js +1 -1
  677. package/dist/core/mail/index.js.map +1 -1
  678. package/dist/core/mail/mailstore.d.ts +14 -0
  679. package/dist/core/mail/mailstore.js +93 -7
  680. package/dist/core/mail/mailstore.js.map +1 -1
  681. package/dist/core/migration/crudCommit.js +8 -3
  682. package/dist/core/migration/crudCommit.js.map +1 -1
  683. package/dist/core/migration/index.d.ts +2 -2
  684. package/dist/core/migration/index.js +1 -1
  685. package/dist/core/migration/index.js.map +1 -1
  686. package/dist/core/migration/maps.js +3 -1
  687. package/dist/core/migration/maps.js.map +1 -1
  688. package/dist/core/migration/plan.d.ts +12 -4
  689. package/dist/core/migration/plan.js +57 -8
  690. package/dist/core/migration/plan.js.map +1 -1
  691. package/dist/core/migration/project.d.ts +11 -2
  692. package/dist/core/migration/project.js +13 -5
  693. package/dist/core/migration/project.js.map +1 -1
  694. package/dist/core/migration/steps.d.ts +1 -1
  695. package/dist/core/migration/steps.js +9 -4
  696. package/dist/core/migration/steps.js.map +1 -1
  697. package/dist/core/migration/testmandant.d.ts +85 -2
  698. package/dist/core/migration/testmandant.js +201 -20
  699. package/dist/core/migration/testmandant.js.map +1 -1
  700. package/dist/core/migration/trialReset.d.ts +59 -0
  701. package/dist/core/migration/trialReset.js +113 -0
  702. package/dist/core/migration/trialReset.js.map +1 -0
  703. package/dist/core/notifications/notifications.js +10 -0
  704. package/dist/core/notifications/notifications.js.map +1 -1
  705. package/dist/core/onboarding/demo.js +6 -3
  706. package/dist/core/onboarding/demo.js.map +1 -1
  707. package/dist/core/onboarding/index.d.ts +2 -2
  708. package/dist/core/onboarding/index.js +1 -1
  709. package/dist/core/onboarding/index.js.map +1 -1
  710. package/dist/core/onboarding/progress.d.ts +22 -0
  711. package/dist/core/onboarding/progress.js +12 -0
  712. package/dist/core/onboarding/progress.js.map +1 -1
  713. package/dist/core/payments/payment.d.ts +2 -0
  714. package/dist/core/payments/payment.js +13 -5
  715. package/dist/core/payments/payment.js.map +1 -1
  716. package/dist/core/payroll/handoff.js +14 -6
  717. package/dist/core/payroll/handoff.js.map +1 -1
  718. package/dist/core/plugins/callScope.d.ts +22 -0
  719. package/dist/core/plugins/callScope.js +34 -0
  720. package/dist/core/plugins/callScope.js.map +1 -0
  721. package/dist/core/plugins/sandbox.d.ts +28 -10
  722. package/dist/core/plugins/sandbox.js +32 -8
  723. package/dist/core/plugins/sandbox.js.map +1 -1
  724. package/dist/core/portal/grants.d.ts +50 -12
  725. package/dist/core/portal/grants.js +151 -39
  726. package/dist/core/portal/grants.js.map +1 -1
  727. package/dist/core/portal/schema.d.ts +12 -1
  728. package/dist/core/portal/schema.js +12 -0
  729. package/dist/core/portal/schema.js.map +1 -1
  730. package/dist/core/portal/vendorPortal.d.ts +9 -7
  731. package/dist/core/portal/vendorPortal.js +19 -31
  732. package/dist/core/portal/vendorPortal.js.map +1 -1
  733. package/dist/core/procurement/landed_cost.js +5 -5
  734. package/dist/core/procurement/landed_cost.js.map +1 -1
  735. package/dist/core/procurement/requisition.js +35 -6
  736. package/dist/core/procurement/requisition.js.map +1 -1
  737. package/dist/core/purchase/billMerge.d.ts +156 -0
  738. package/dist/core/purchase/billMerge.js +329 -0
  739. package/dist/core/purchase/billMerge.js.map +1 -0
  740. package/dist/core/purchase/capture.d.ts +17 -1
  741. package/dist/core/purchase/capture.js +220 -122
  742. package/dist/core/purchase/capture.js.map +1 -1
  743. package/dist/core/purchase/captureEnums.d.ts +11 -1
  744. package/dist/core/purchase/captureEnums.js +15 -0
  745. package/dist/core/purchase/captureEnums.js.map +1 -1
  746. package/dist/core/purchase/captureParse.d.ts +17 -0
  747. package/dist/core/purchase/captureParse.js +16 -4
  748. package/dist/core/purchase/captureParse.js.map +1 -1
  749. package/dist/core/purchase/captureSchema.d.ts +5 -3
  750. package/dist/core/purchase/captureSchema.js +26 -2
  751. package/dist/core/purchase/captureSchema.js.map +1 -1
  752. package/dist/core/purchase/qrbill/decode.d.ts +94 -0
  753. package/dist/core/purchase/qrbill/decode.js +456 -0
  754. package/dist/core/purchase/qrbill/decode.js.map +1 -0
  755. package/dist/core/purchase/qrbill/fields.d.ts +25 -0
  756. package/dist/core/purchase/qrbill/fields.js +47 -0
  757. package/dist/core/purchase/qrbill/fields.js.map +1 -0
  758. package/dist/core/purchase/qrbill/identity.d.ts +45 -0
  759. package/dist/core/purchase/qrbill/identity.js +80 -0
  760. package/dist/core/purchase/qrbill/identity.js.map +1 -0
  761. package/dist/core/purchase/qrbill/iso3166.d.ts +12 -0
  762. package/dist/core/purchase/qrbill/iso3166.js +20 -0
  763. package/dist/core/purchase/qrbill/iso3166.js.map +1 -0
  764. package/dist/core/purchase/qrbill/notification.d.ts +10 -0
  765. package/dist/core/purchase/qrbill/notification.js +16 -0
  766. package/dist/core/purchase/qrbill/notification.js.map +1 -0
  767. package/dist/core/purchase/vendorBill.js +11 -14
  768. package/dist/core/purchase/vendorBill.js.map +1 -1
  769. package/dist/core/recurring/recurring.d.ts +7 -0
  770. package/dist/core/recurring/recurring.js +97 -9
  771. package/dist/core/recurring/recurring.js.map +1 -1
  772. package/dist/core/recurring/schema.d.ts +1 -1
  773. package/dist/core/recurring/schema.js +5 -1
  774. package/dist/core/recurring/schema.js.map +1 -1
  775. package/dist/core/reportbuilder/reports.js +5 -0
  776. package/dist/core/reportbuilder/reports.js.map +1 -1
  777. package/dist/core/review/preparePeriod.js +12 -15
  778. package/dist/core/review/preparePeriod.js.map +1 -1
  779. package/dist/core/sales/contact.d.ts +10 -4
  780. package/dist/core/sales/contact.js +57 -4
  781. package/dist/core/sales/contact.js.map +1 -1
  782. package/dist/core/sales/contactImport.js +3 -1
  783. package/dist/core/sales/contactImport.js.map +1 -1
  784. package/dist/core/sales/contactMerge.d.ts +27 -0
  785. package/dist/core/sales/contactMerge.js +90 -2
  786. package/dist/core/sales/contactMerge.js.map +1 -1
  787. package/dist/core/sales/creditNote.js +11 -7
  788. package/dist/core/sales/creditNote.js.map +1 -1
  789. package/dist/core/sales/document.d.ts +8 -0
  790. package/dist/core/sales/document.js +60 -13
  791. package/dist/core/sales/document.js.map +1 -1
  792. package/dist/core/sales/index.d.ts +2 -2
  793. package/dist/core/sales/index.js +2 -2
  794. package/dist/core/sales/index.js.map +1 -1
  795. package/dist/core/sales/invoice.d.ts +8 -0
  796. package/dist/core/sales/invoice.js +41 -25
  797. package/dist/core/sales/invoice.js.map +1 -1
  798. package/dist/core/sales/item.js +7 -0
  799. package/dist/core/sales/item.js.map +1 -1
  800. package/dist/core/sales/qrRules.d.ts +39 -0
  801. package/dist/core/sales/qrRules.js +43 -0
  802. package/dist/core/sales/qrRules.js.map +1 -0
  803. package/dist/core/sales/qrbill.d.ts +4 -0
  804. package/dist/core/sales/qrbill.js +9 -17
  805. package/dist/core/sales/qrbill.js.map +1 -1
  806. package/dist/core/sales/quotes.d.ts +15 -0
  807. package/dist/core/sales/quotes.js +31 -1
  808. package/dist/core/sales/quotes.js.map +1 -1
  809. package/dist/core/sales/salesOrderSchema.d.ts +1 -1
  810. package/dist/core/sales/salesOrderSchema.js +4 -0
  811. package/dist/core/sales/salesOrderSchema.js.map +1 -1
  812. package/dist/core/sales/salesOrders.d.ts +8 -0
  813. package/dist/core/sales/salesOrders.js +21 -7
  814. package/dist/core/sales/salesOrders.js.map +1 -1
  815. package/dist/core/sales/supplyDate.d.ts +20 -0
  816. package/dist/core/sales/supplyDate.js +19 -0
  817. package/dist/core/sales/supplyDate.js.map +1 -0
  818. package/dist/core/setup/bootstrap.js +5 -2
  819. package/dist/core/setup/bootstrap.js.map +1 -1
  820. package/dist/core/setup/companyProfile.d.ts +9 -2
  821. package/dist/core/setup/companyProfile.js +60 -3
  822. package/dist/core/setup/companyProfile.js.map +1 -1
  823. package/dist/core/setup/index.d.ts +2 -0
  824. package/dist/core/setup/index.js +1 -0
  825. package/dist/core/setup/index.js.map +1 -1
  826. package/dist/core/setup/paymentTerms.d.ts +72 -0
  827. package/dist/core/setup/paymentTerms.js +101 -0
  828. package/dist/core/setup/paymentTerms.js.map +1 -0
  829. package/dist/core/setup/workspace.d.ts +7 -0
  830. package/dist/core/setup/workspace.js +36 -5
  831. package/dist/core/setup/workspace.js.map +1 -1
  832. package/dist/core/stock/movements.js +40 -0
  833. package/dist/core/stock/movements.js.map +1 -1
  834. package/dist/core/stock/stocktake.js +7 -0
  835. package/dist/core/stock/stocktake.js.map +1 -1
  836. package/dist/core/store/generation.d.ts +135 -0
  837. package/dist/core/store/generation.js +167 -0
  838. package/dist/core/store/generation.js.map +1 -0
  839. package/dist/core/store/migrations.d.ts +17 -0
  840. package/dist/core/store/migrations.js +411 -0
  841. package/dist/core/store/migrations.js.map +1 -1
  842. package/dist/core/store/schema.d.ts +2 -2
  843. package/dist/core/store/schema.js +115 -11
  844. package/dist/core/store/schema.js.map +1 -1
  845. package/dist/core/store/schemaShape.d.ts +99 -0
  846. package/dist/core/store/schemaShape.js +144 -0
  847. package/dist/core/store/schemaShape.js.map +1 -0
  848. package/dist/core/store/sqlite-store.d.ts +263 -12
  849. package/dist/core/store/sqlite-store.js +882 -38
  850. package/dist/core/store/sqlite-store.js.map +1 -1
  851. package/dist/core/sync/publishReset.d.ts +33 -0
  852. package/dist/core/sync/publishReset.js +44 -0
  853. package/dist/core/sync/publishReset.js.map +1 -0
  854. package/dist/core/vat/abrechnung.d.ts +4 -2
  855. package/dist/core/vat/abrechnung.js +39 -17
  856. package/dist/core/vat/abrechnung.js.map +1 -1
  857. package/dist/core/vat/applyVat.d.ts +66 -0
  858. package/dist/core/vat/applyVat.js +78 -27
  859. package/dist/core/vat/applyVat.js.map +1 -1
  860. package/dist/core/vat/config.d.ts +29 -0
  861. package/dist/core/vat/config.js +35 -17
  862. package/dist/core/vat/config.js.map +1 -1
  863. package/dist/core/vat/ech0217.d.ts +16 -0
  864. package/dist/core/vat/ech0217.js +66 -5
  865. package/dist/core/vat/ech0217.js.map +1 -1
  866. package/dist/core/version.d.ts +19 -0
  867. package/dist/core/version.js +30 -0
  868. package/dist/core/version.js.map +1 -0
  869. package/dist/core/voice/decide.d.ts +98 -0
  870. package/dist/core/voice/decide.js +197 -0
  871. package/dist/core/voice/decide.js.map +1 -0
  872. package/dist/core/voice/decisionTrace.d.ts +97 -0
  873. package/dist/core/voice/decisionTrace.js +84 -0
  874. package/dist/core/voice/decisionTrace.js.map +1 -0
  875. package/dist/core/voice/enums.d.ts +9 -0
  876. package/dist/core/voice/enums.js +10 -0
  877. package/dist/core/voice/enums.js.map +1 -1
  878. package/dist/core/voice/index.d.ts +8 -3
  879. package/dist/core/voice/index.js +4 -1
  880. package/dist/core/voice/index.js.map +1 -1
  881. package/dist/core/voice/runtime.d.ts +36 -0
  882. package/dist/core/voice/runtime.js +56 -1
  883. package/dist/core/voice/runtime.js.map +1 -1
  884. package/dist/core/voice/schema.d.ts +2 -2
  885. package/dist/core/voice/schema.js +52 -1
  886. package/dist/core/voice/schema.js.map +1 -1
  887. package/dist/studio/assets/client-XEFnnrFs.js +8 -0
  888. package/dist/studio/assets/index-BXb17Dhh.css +1 -0
  889. package/dist/studio/assets/index-BhyU_uAT.js +343 -0
  890. package/dist/studio/assets/streamableHttp-9O4Zms5A.js +10 -0
  891. package/dist/studio/assets/types-DjZup_x_.js +64 -0
  892. package/dist/studio/index.html +13 -0
  893. package/package.json +16 -9
package/README.md CHANGED
@@ -1,31 +1,56 @@
1
1
  # TILL
2
2
 
3
- **Trusted Independent Ledger Library.** Swiss accounting your agent can actually use.
4
-
5
- TILL is a free, open-source (MIT), local-first accounting app built for Switzerland. Your books live
6
- in a single SQLite file on your own machine. They never leave the country, because they never leave
7
- your laptop.
8
-
9
- The difference is the interface. Most accounting software is a GUI with an AI button bolted on. TILL
10
- is built the other way around: an **MCP server is a first-class interface**, so an agent can post
11
- entries, categorize transactions, draft and chase invoices, prepare the MWST-Abrechnung, and answer
12
- "how did my quarter go" by talking to the ledger directly. A minimalist Studio gives you human
13
- oversight of everything the agent did. Agent and human share one ledger.
14
-
15
- > **Status: pre-alpha.** The engine, the MCP verbs and the Studio are built across the numbered
16
- > capabilities. Nothing here is ready to keep real books yet. Do not run your business on it.
3
+ **Trusted Independent Ledger Library.** The agent-first ERP for Swiss SMEs.
4
+
5
+ TILL is a free, open-source (MIT) ERP for Swiss small businesses: sales, purchasing, payments, stock,
6
+ projects, books and MWST. Every function is exposed as an MCP tool, 800 of them, so your AI agent runs
7
+ it and the Studio (the app you work in) shows you what it did. It works with Claude Desktop, Cursor
8
+ and other MCP clients that can start a local stdio server. TILL runs on your own computer, or on a
9
+ server you host yourself. Your books are a single SQLite file on that machine, and no server of ours
10
+ holds a copy.
11
+
12
+ By default, the agent waits for your OK before it books anything, moves your money, grants access
13
+ or deletes your data for good: it drafts, and you approve. For each of
14
+ those areas you decide whether it may act on its own. Much of what you can change back, such
15
+ as drafts and contact details, runs without asking, and every call the agent makes is recorded.
16
+ The dial covers agents that connect to TILL. An agent that can drive your browser or run commands on
17
+ your computer can act as you: give your agent TILL, not your browser or your shell.
18
+
19
+ > **Public beta, version 1.0.0-beta.1.** Nomadik GmbH, the company behind TILL, keeps its own books
20
+ > in it. If you move your books to TILL, keep your old system running until the figures match, and
21
+ > read [what the beta does not do yet](#what-the-beta-does-not-do-yet) first.
17
22
 
18
23
  ## Why
19
24
 
20
- Switzerland has accounting software. It does not have accounting software an agent can drive, and
21
- the open-source option (Gäld) is AGPL, which forecloses an open-core model. TILL is a clean-room
22
- MIT rebuild aimed at the things that actually make Swiss books Swiss:
25
+ TILL is MIT licensed and costs nothing. You can run it, change it and keep it, with no limit on
26
+ users, companies or bookings, and your books stay on a computer you control. It is built for what
27
+ makes Swiss books Swiss:
23
28
 
24
29
  - **QR-bill** (Swiss QR-Rechnung) with the structured-address standard
25
- - **Three MWST rates** (8.1%, 3.8%, 2.6%) and the MWST-Abrechnung that falls out of them
30
+ - **MWST** at 8.1%, 3.8% and 2.6%, with the effective and the Saldosteuersatz method, and the
31
+ MWST-Abrechnung drawn straight from the ledger
26
32
  - **Kontenrahmen KMU** seeded out of the box
27
- - **ISO 20022** (camt/pain) for banking
28
- - de-CH and en from day one
33
+ - **ISO 20022** banking: camt.053 statements in, pain.001 payment files out
34
+ - de-CH and en
35
+
36
+ ## What TILL covers
37
+
38
+ - Accounting: double-entry ledger, period locks and year close, foreign currencies and revaluation,
39
+ accruals, fixed assets, and several companies in one install.
40
+ - MWST: the MWST-Abrechnung per period, reconciled to the ledger, and the eCH-0217 file you upload
41
+ to the ESTV ePortal.
42
+ - Sales: quotes, orders, delivery notes, invoices with the QR-bill, credit notes, recurring invoices,
43
+ reminder letters and the open-items list.
44
+ - Purchasing: supplier bills with input VAT, purchase orders, goods receipt, expense claims, and
45
+ pain.001 payment files that you release in your eBanking. TILL never sends a payment.
46
+ - Bank: import the camt.053 statements from your eBanking. The bank inbox proposes a booking for
47
+ each line it can place, and you confirm it.
48
+ - Contacts and CRM, products and stock (warehouses, lots and serial numbers, stock valuation),
49
+ projects and time tracking, documents, reports.
50
+ - Moving in: import from bexio's CSV and Excel exports (there is no bexio API connection), a trial
51
+ company to try the import on, and a parallel run that checks TILL's figures against your old
52
+ system. Fixed assets, stock and payroll history do not come over, and last year's journal lands
53
+ in a read-only archive beside the live books.
29
54
 
30
55
  ## The ledger is not negotiable
31
56
 
@@ -33,29 +58,105 @@ Posted entries are append-only and immutable. A correction is a **reversing entr
33
58
  destructive edit, exactly as real accounting works. Posting is idempotent: a double-post does not
34
59
  double-count. These are asserted in the test suite, not merely promised in a README.
35
60
 
36
- ## Install
61
+ ## Install and run
37
62
 
38
- TILL is not installable yet. The package name `tillbooks` is reserved but unpublished, so
39
- `npm install -g tillbooks` does not resolve, and there are no downloads. The source opens and the
40
- package ships when the ledger can keep real books, not before.
63
+ You need Node.js 22 or newer on macOS or Linux.
41
64
 
42
- Once it ships, the package will be `tillbooks` and the command will be `till`:
65
+ <!-- TODO(publish): this block is true once tillbooks@1.0.0-beta.1, with the Studio vendored into
66
+ the package (launch plan P0.1), is on npm under the beta dist-tag (`npm publish --tag beta`;
67
+ `latest` stays 0.1.0, and `npm deprecate tillbooks@0.1.0` points bare installs at the beta).
68
+ The 0.1.0 on npm today ships no Studio, and its `till up` answers "The Studio is not built into
69
+ this install". -->
70
+
71
+ ```bash
72
+ npm install -g tillbooks@beta
73
+ till up
74
+ ```
43
75
 
76
+ Keep the `@beta`. Until the beta ends, a plain `tillbooks` on npm is the old 0.1.0, which has no
77
+ Studio.
78
+
79
+ `till up` starts the Studio at `http://127.0.0.1:8788` and opens it in your browser. It listens on
80
+ your own machine only. The first screen offers three ways in: create a new ledger, restore a backup,
81
+ or restart TILL on an existing database file. Beneath them, **Try the demo** sets up a demo workspace
82
+ with sample postings. Your books go to `~/.till/till.db`; set `TILL_DB_PATH` to put them somewhere
83
+ else.
84
+
85
+ To connect an MCP client such as Claude Desktop or Cursor, point it at the stdio server. No account
86
+ and no API key are needed:
87
+
88
+ ```json
89
+ {
90
+ "mcpServers": {
91
+ "tillbooks": {
92
+ "command": "npx",
93
+ "args": ["-y", "tillbooks@beta", "mcp"]
94
+ }
95
+ }
96
+ }
44
97
  ```
45
- npm install -g tillbooks
46
- till --help
98
+
99
+ The agent and the Studio work on the same file, so what the agent does shows up in the Studio.
100
+
101
+ To work on TILL itself, build it from a checkout:
102
+
103
+ ```bash
104
+ npm run setup # installs the core and the Studio dependencies
105
+ npm run build:all # builds the core into dist/ and the Studio into app/dist/
106
+ node bin/till.mjs up
47
107
  ```
48
108
 
109
+ [CONTRIBUTING.md](CONTRIBUTING.md) has the full dev setup, and
110
+ [the quickstart](site-docs/quickstart.mdx) walks through the first run.
111
+
112
+ ## Your data
113
+
114
+ - Your books are one SQLite file. You can copy it, back it up and open it with standard tools.
115
+ - No account, no sign-up, no telemetry. TILL does not report on you or on how you use it. Error
116
+ details are recorded only if you switch that on, they stay on your machine, and they leave it only
117
+ in a feedback mail you send yourself.
118
+ - You can export a whole company at any time in an open, documented format, and a backup restores
119
+ into a fresh workspace without touching the ones you have.
120
+
121
+ ## What the beta does not do yet
122
+
123
+ - No payroll. TILL exports your employee data for your payroll provider and posts the wage journal
124
+ you bring back. Pay slips, AHV and Swissdec stay with the provider.
125
+ - No MWST filing. TILL prepares the MWST-Abrechnung and writes the eCH-0217 file. You upload it and
126
+ file in the ESTV ePortal yourself.
127
+ - No MWST on received consideration (vereinnahmte Entgelte). TILL computes the Abrechnung on agreed
128
+ consideration (vereinbarte Entgelte) and refuses a period set up the other way.
129
+ - No email sending yet. TILL makes the PDF of an invoice, quote or reminder, and you send it from
130
+ your own mail program. Sending through your own mail account is planned for a later beta
131
+ release.
132
+ - German (de-CH) and English only. No French or Italian yet.
133
+ - No mobile app, and no Windows app. We do not test on Windows; the documented route there is
134
+ [running TILL inside an agent](site-docs/mcp/run-inside-agent.mdx).
135
+ - No direct bank connection in this release. The EBICS client is built and has been tested with
136
+ ZKB's test platform, but the module that connects it to the bank is not published yet (it will
137
+ be, under MIT).
138
+ Until then you download camt.053 statements from your eBanking and import them.
139
+ - On your own computer, backups run when you start them (Data & Backup, "Back up now"), not on a
140
+ schedule. Keep a copy of the backup file somewhere other than the computer the books are on. (The
141
+ self-hosting recipe replicates the book continuously with Litestream.)
142
+ - Several people in one book only on a server you host yourself. The local app is for one computer.
143
+ - No eBill sending, e-signature or online customer portal.
144
+
49
145
  ## Documentation
50
146
 
147
+ - [Quickstart](site-docs/quickstart.mdx) : install, first run, and connecting your agent
148
+ - [Run inside an agent](site-docs/mcp/run-inside-agent.mdx) : drive TILL over MCP with no machine of your own
149
+ - [Self-hosting in under an hour](site-docs/self-hosting/under-an-hour.mdx) : stand up a served instance
51
150
  - [Documentation](https://docs.tillbooks.ch) : the product guides and capability reference
52
151
  - [Design](brand/DESIGN.md) : the design law this project builds to
53
152
 
54
153
  ## Before you use it
55
154
 
56
- TILL is pre-alpha and it keeps books. [DISCLAIMER.md](DISCLAIMER.md) is worth two minutes: TILL is
57
- not tax advice, you stay responsible for your own filings, and you should not point it at real
58
- accounts yet.
155
+ TILL keeps books, so [DISCLAIMER.md](DISCLAIMER.md) is worth two minutes: TILL is not tax advice,
156
+ you stay responsible for your own filings, and a beta deserves a parallel run before you rely on it.
157
+
158
+ Help is free and best effort during the beta, and paid help with setup and with moving from bexio is
159
+ available. [SUPPORT.md](SUPPORT.md) has the details.
59
160
 
60
161
  ## Contributing
61
162
 
package/bin/till.mjs CHANGED
@@ -8,7 +8,12 @@
8
8
  * The `mcp` command starts the real MCP stdio server (Phase E) from the built core.
9
9
  */
10
10
 
11
- const VERSION = '0.0.0';
11
+ import { readFileSync } from 'node:fs';
12
+
13
+ // The single source of truth for the version is package.json; the release bump touches that, and
14
+ // `till --version` / the help header follow automatically. Works from source and from the
15
+ // published package (bin/till.mjs and package.json sit at the package root together).
16
+ const VERSION = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8')).version;
12
17
 
13
18
  const USAGE = `till ${VERSION} - Swiss accounting your agent can actually use
14
19
 
@@ -30,7 +35,9 @@ const USAGE = `till ${VERSION} - Swiss accounting your agent can actually use
30
35
 
31
36
  The MCP server reads its SQLite path from TILL_DB_PATH, defaulting to
32
37
  ~/.till/till.db. The Studio resolves the SAME path, so the agent and the human
33
- work on one ledger. Set TILL_DB_PATH=:memory: for a throwaway run.
38
+ work on one ledger. Set TILL_DB_PATH=:memory: for a throwaway run. On start,
39
+ mcp prints on stderr the ledger it opened and the Studio where a human approves
40
+ what the agent drafts (Agent > Vorschläge), or that none runs and till up starts it.
34
41
 
35
42
  serve binds 127.0.0.1:8788. TILL_PORT takes decimal digits, 1 to 65535, and
36
43
  refuses anything else instead of reinterpreting it. TILL_HOST accepts loopback
@@ -62,7 +69,27 @@ switch (command) {
62
69
  const { ensureDbPath } = await import(new URL('../dist/api/db-path.js', import.meta.url));
63
70
  // Always a resolved path, never an implicit in-memory database: an agent that posts into a
64
71
  // ledger nobody else can see is worse than one that refuses to start.
65
- const { store } = await startMcpServer({ dbPath: ensureDbPath() });
72
+ let store;
73
+ let dbPath;
74
+ try {
75
+ dbPath = ensureDbPath();
76
+ ({ store } = await startMcpServer({ dbPath }));
77
+ } catch (e) {
78
+ // A refused open (a book written by a newer TILL, `schema_newer_than_runtime`) is a sentence for
79
+ // the human on stderr and a non-zero exit, the way `up` and `serve` fail below, never a stack
80
+ // trace. stdout stays clean: it is the MCP channel.
81
+ console.error(e instanceof Error ? e.message : String(e));
82
+ process.exit(1);
83
+ }
84
+ // P0.5c: on STDERR only (stdout is the MCP channel): which ledger this agent opened, and the
85
+ // Studio where a human approves what it drafts, or how to start one. A banner that cannot be
86
+ // computed is never a reason to stop serving.
87
+ try {
88
+ const { mcpStartLines } = await import(new URL('../dist/api/approval-pointer.js', import.meta.url));
89
+ for (const line of mcpStartLines({ dbPath })) console.error(line);
90
+ } catch {
91
+ // Serving matters more than the banner.
92
+ }
66
93
  // Closing the store is what checkpoints the write-ahead log. Without this the process exits with
67
94
  // its WAL still holding the last writes, and `till.db-wal` grows every run.
68
95
  let closing = false;
@@ -105,7 +132,8 @@ switch (command) {
105
132
  }
106
133
  process.exit(0);
107
134
  }
108
- console.error(`till up: Studio${result.studioServed ? '' : ' (not built)'} at ${result.url}`);
135
+ // The Studio itself opens only through the #k= link `startUp` logged (D162); the bare URL is the engine.
136
+ console.error(`till up: engine at ${result.url}${result.studioServed ? '' : ' (Studio not built)'}`);
109
137
  console.error(`till up: MCP over HTTP at ${result.url}/mcp, REST at ${result.url}/api`);
110
138
  let closingUp = false;
111
139
  const shutdownUp = () => {
@@ -19,8 +19,9 @@
19
19
  import type { ActionDef, ActionInput, JsonSchema } from './registry.js';
20
20
  import type { WorkspaceContext } from '../core/context.js';
21
21
  import type { Result } from '../core/result.js';
22
+ import type { ActionKind } from './actionKind.js';
22
23
  export interface AccrualActionHelpers {
23
- ctxAction(name: string, kind: 'read' | 'write', summary: string, inputSchema: JsonSchema, call: (ctx: WorkspaceContext, input: ActionInput) => Result): ActionDef;
24
+ ctxAction(name: string, kind: ActionKind, summary: string, inputSchema: JsonSchema, call: (ctx: WorkspaceContext, input: ActionInput) => Result): ActionDef;
24
25
  ctxSchema(props?: Record<string, unknown>, required?: string[]): JsonSchema;
25
26
  STR: {
26
27
  readonly type: 'string';
@@ -22,7 +22,7 @@ export function accrualActions(h) {
22
22
  const { ctxAction, ctxSchema, STR, INT } = h;
23
23
  return [
24
24
  // --- N2: accruals (OR 958b) -------------------------------------------------------------------
25
- ctxAction('accrual_create', 'write', "Describe an Abgrenzung (OR Art. 958b) and save it as a DRAFT: `kind` is one of prepaid_expense (Aufwand vorausbezahlt, Dr 1300), accrued_income (Ertrag noch nicht fakturiert, Dr 1300), accrued_expense (Aufwand noch nicht fakturiert, Cr 2300) or deferred_income (Ertrag vorausbezahlt erhalten, Cr 2300); `contraAccount` is the P&L account (number or id, income for the income kinds, expense for the expense kinds); `amountMinor` is integer Rappen; `periodEnd` is the balance-sheet date. Returns the draft with the exact lines the post will write and the reversal lines dated the day after. Nothing is posted.", ctxSchema({
25
+ ctxAction('accrual_create', 'write:reversible:internal', "Describe an Abgrenzung (OR Art. 958b) and save it as a DRAFT: `kind` is one of prepaid_expense (Aufwand vorausbezahlt, Dr 1300), accrued_income (Ertrag noch nicht fakturiert, Dr 1300), accrued_expense (Aufwand noch nicht fakturiert, Cr 2300) or deferred_income (Ertrag vorausbezahlt erhalten, Cr 2300); `contraAccount` is the P&L account (number or id, income for the income kinds, expense for the expense kinds); `amountMinor` is integer Rappen; `periodEnd` is the balance-sheet date. Returns the draft with the exact lines the post will write and the reversal lines dated the day after. Nothing is posted.", ctxSchema({
26
26
  kind: STR,
27
27
  periodEnd: STR,
28
28
  amountMinor: INT,
@@ -33,13 +33,13 @@ export function accrualActions(h) {
33
33
  currency: STR,
34
34
  idempotencyKey: STR,
35
35
  }, ['kind', 'periodEnd', 'amountMinor', 'contraAccount', 'description', 'idempotencyKey']), (ctx, input) => accrualCreate(ctx, input)),
36
- ctxAction('accrual_post', 'write', "Post a drafted Abgrenzung as an atomic PAIR: the accrual entry dated `periodEnd` (source `accrual`) and its automatic Rückbuchung dated the first day after (a real reversal, linked). A locked reversal date rolls the whole pair back, so the books never carry an accrual without the reversal that backs it out. Idempotent per accrual: the same key replays, a different key on a posted accrual is `already_posted`, a discarded draft is `draft_discarded`.", ctxSchema({ accrualId: STR, idempotencyKey: STR }, ['accrualId', 'idempotencyKey']), (ctx, input) => accrualPost(ctx, input)),
37
- ctxAction('accrual_reverse', 'write', "Revert a posted Abgrenzung without editing history: posts the MIRROR pair (the Storno dated `periodEnd`, its own reversal dated the day after), so all four entries net to zero on every account in both periods. Refuses `already_reversed` a second time and `not_posted` on a draft.", ctxSchema({ accrualId: STR, reason: STR, idempotencyKey: STR }, ['accrualId', 'idempotencyKey']), (ctx, input) => accrualReverse(ctx, input)),
38
- ctxAction('accrual_discard', 'write', 'Retire a drafted Abgrenzung before it posts. The row stays on record as `discarded` with its reason; a posted accrual cannot be discarded (`already_posted`), reverse it instead.', ctxSchema({ accrualId: STR, reason: STR, idempotencyKey: STR }, ['accrualId', 'idempotencyKey']), (ctx, input) => accrualDiscard(ctx, input)),
36
+ ctxAction('accrual_post', 'write:correctable:books', "Post a drafted Abgrenzung as an atomic PAIR: the accrual entry dated `periodEnd` (source `accrual`) and its automatic Rückbuchung dated the first day after (a real reversal, linked). A locked reversal date rolls the whole pair back, so the books never carry an accrual without the reversal that backs it out. Idempotent per accrual: the same key replays, a different key on a posted accrual is `already_posted`, a discarded draft is `draft_discarded`.", ctxSchema({ accrualId: STR, idempotencyKey: STR }, ['accrualId', 'idempotencyKey']), (ctx, input) => accrualPost(ctx, input)),
37
+ ctxAction('accrual_reverse', 'write:correctable:books', "Revert a posted Abgrenzung without editing history: posts the MIRROR pair (the Storno dated `periodEnd`, its own reversal dated the day after), so all four entries net to zero on every account in both periods. Refuses `already_reversed` a second time and `not_posted` on a draft.", ctxSchema({ accrualId: STR, reason: STR, idempotencyKey: STR }, ['accrualId', 'idempotencyKey']), (ctx, input) => accrualReverse(ctx, input)),
38
+ ctxAction('accrual_discard', 'write:correctable:internal', 'Retire a drafted Abgrenzung before it posts. The row stays on record as `discarded` with its reason; a posted accrual cannot be discarded (`already_posted`), reverse it instead.', ctxSchema({ accrualId: STR, reason: STR, idempotencyKey: STR }, ['accrualId', 'idempotencyKey']), (ctx, input) => accrualDiscard(ctx, input)),
39
39
  ctxAction('accrual_get', 'read', 'Read one Abgrenzung: the row, its lines and reversal lines (from the same function the post uses), and the journal entries it has produced (the accrual, its reversal, the Storno pair).', ctxSchema({ accrualId: STR }, ['accrualId']), (ctx, input) => accrualGet(ctx, input)),
40
40
  ctxAction('accrual_list', 'read', 'List Abgrenzungen, newest period first, filtered by periodEnd, status (draft | posted | reversed | discarded) or kind. `totalMinor` sums the drafts and the posted ones. savedViewId applies a saved view (G00).', ctxSchema({ periodEnd: STR, status: STR, kind: STR, savedViewId: STR }), (ctx, input) => accrualList(ctx, input)),
41
41
  // --- N2: provisions (OR 960e) -----------------------------------------------------------------
42
- ctxAction('provision_create', 'write', "Describe a Rückstellung (OR Art. 960e) and save it as a DRAFT: `reason` is one of the eight statutory ids (Garantie, Ferien und Überzeit, Prozess, Grossreparatur, Sanierung, Restrukturierung, Steuern, Sonstige; `invalid_reason` names the exact ids, and `sonstige` needs a description of at least 10 characters); `provisionAccount` is 2330, 2600 or a liability numbered 23xx/26xx; `expenseAccount` is the P&L account the formation is charged to. Returns the draft with its lines (Dr expense / Cr provision). Nothing is posted.", ctxSchema({
42
+ ctxAction('provision_create', 'write:reversible:internal', "Describe a Rückstellung (OR Art. 960e) and save it as a DRAFT: `reason` is one of the eight statutory ids (Garantie, Ferien und Überzeit, Prozess, Grossreparatur, Sanierung, Restrukturierung, Steuern, Sonstige; `invalid_reason` names the exact ids, and `sonstige` needs a description of at least 10 characters); `provisionAccount` is 2330, 2600 or a liability numbered 23xx/26xx; `expenseAccount` is the P&L account the formation is charged to. Returns the draft with its lines (Dr expense / Cr provision). Nothing is posted.", ctxSchema({
43
43
  reason: STR,
44
44
  periodEnd: STR,
45
45
  amountMinor: INT,
@@ -48,11 +48,11 @@ export function accrualActions(h) {
48
48
  description: STR,
49
49
  idempotencyKey: STR,
50
50
  }, ['reason', 'periodEnd', 'amountMinor', 'provisionAccount', 'expenseAccount', 'description', 'idempotencyKey']), (ctx, input) => provisionCreate(ctx, input)),
51
- ctxAction('provision_post', 'write', 'Post a drafted Rückstellung as ONE entry (Dr expense / Cr provision, source `provision`) dated `periodEnd`. No automatic reversal: OR 960e Abs. 4 does not release a provision by the calendar. Idempotent per provision; a different key on a posted one is `already_posted`.', ctxSchema({ provisionId: STR, idempotencyKey: STR }, ['provisionId', 'idempotencyKey']), (ctx, input) => provisionPost(ctx, input)),
52
- ctxAction('provision_release', 'write', 'Release part or all of a posted Rückstellung: posts Dr provision / Cr `targetAccount` (the original expense account, or an income account) for `amountMinor` on `date`. Refuses `release_exceeds_balance` above the open balance; the provision reads `released` at zero. Idempotent on `idempotencyKey` for as long as the release that key booked still stands; a key whose release was undone refuses `already_reversed_key` (release again under a new key). A release is undone only with `provision_release_reverse`; the raw `reverse_entry` refuses its entry with `owned_by`.', ctxSchema({ provisionId: STR, date: STR, amountMinor: INT, targetAccount: STR, idempotencyKey: STR }, ['provisionId', 'date', 'amountMinor', 'targetAccount', 'idempotencyKey']), (ctx, input) => provisionRelease(ctx, input)),
53
- ctxAction('provision_reverse', 'write', 'Reverse the formation entry of a posted Rückstellung (a real reversing entry, dated `periodEnd` unless `date` names another open day). Refuses `release_blocked` while any release stands unreversed (undo the releases first through `provision_release_reverse`, newest first) and `already_reversed` a second time. This is the ONLY way to reverse the formation: the raw `reverse_entry` refuses it with `owned_by`.', ctxSchema({ provisionId: STR, date: STR, reason: STR, idempotencyKey: STR }, ['provisionId', 'idempotencyKey']), (ctx, input) => provisionReverse(ctx, input)),
54
- ctxAction('provision_release_reverse', 'write', 'Undo one release of a Rückstellung with a real reversing entry (dated the release date unless `date` names another open day), so the open balance and the `posted` / `released` reading follow from the journal again. This is the ONLY way to reverse a release entry: the raw `reverse_entry` refuses it with `owned_by`, and so it refuses the undo itself. Refuses `not_found` and `already_reversed`. Idempotent on `idempotencyKey`.', ctxSchema({ releaseId: STR, date: STR, reason: STR, idempotencyKey: STR }, ['releaseId', 'idempotencyKey']), (ctx, input) => provisionReleaseReverse(ctx, input)),
55
- ctxAction('provision_discard', 'write', 'Retire a drafted Rückstellung before it posts. The row stays on record as `discarded` with its reason; a posted provision cannot be discarded (`already_posted`), reverse or release it instead.', ctxSchema({ provisionId: STR, reason: STR, idempotencyKey: STR }, ['provisionId', 'idempotencyKey']), (ctx, input) => provisionDiscard(ctx, input)),
51
+ ctxAction('provision_post', 'write:correctable:books', 'Post a drafted Rückstellung as ONE entry (Dr expense / Cr provision, source `provision`) dated `periodEnd`. No automatic reversal: OR 960e Abs. 4 does not release a provision by the calendar. Idempotent per provision; a different key on a posted one is `already_posted`.', ctxSchema({ provisionId: STR, idempotencyKey: STR }, ['provisionId', 'idempotencyKey']), (ctx, input) => provisionPost(ctx, input)),
52
+ ctxAction('provision_release', 'write:correctable:books', 'Release part or all of a posted Rückstellung: posts Dr provision / Cr `targetAccount` (the original expense account, or an income account) for `amountMinor` on `date`. Refuses `release_exceeds_balance` above the open balance; the provision reads `released` at zero. Idempotent on `idempotencyKey` for as long as the release that key booked still stands; a key whose release was undone refuses `already_reversed_key` (release again under a new key). A release is undone only with `provision_release_reverse`; the raw `reverse_entry` refuses its entry with `owned_by`.', ctxSchema({ provisionId: STR, date: STR, amountMinor: INT, targetAccount: STR, idempotencyKey: STR }, ['provisionId', 'date', 'amountMinor', 'targetAccount', 'idempotencyKey']), (ctx, input) => provisionRelease(ctx, input)),
53
+ ctxAction('provision_reverse', 'write:correctable:books', 'Reverse the formation entry of a posted Rückstellung (a real reversing entry, dated `periodEnd` unless `date` names another open day). Refuses `release_blocked` while any release stands unreversed (undo the releases first through `provision_release_reverse`, newest first) and `already_reversed` a second time. This is the ONLY way to reverse the formation: the raw `reverse_entry` refuses it with `owned_by`.', ctxSchema({ provisionId: STR, date: STR, reason: STR, idempotencyKey: STR }, ['provisionId', 'idempotencyKey']), (ctx, input) => provisionReverse(ctx, input)),
54
+ ctxAction('provision_release_reverse', 'write:correctable:books', 'Undo one release of a Rückstellung with a real reversing entry (dated the release date unless `date` names another open day), so the open balance and the `posted` / `released` reading follow from the journal again. This is the ONLY way to reverse a release entry: the raw `reverse_entry` refuses it with `owned_by`, and so it refuses the undo itself. Refuses `not_found` and `already_reversed`. Idempotent on `idempotencyKey`.', ctxSchema({ releaseId: STR, date: STR, reason: STR, idempotencyKey: STR }, ['releaseId', 'idempotencyKey']), (ctx, input) => provisionReleaseReverse(ctx, input)),
55
+ ctxAction('provision_discard', 'write:correctable:internal', 'Retire a drafted Rückstellung before it posts. The row stays on record as `discarded` with its reason; a posted provision cannot be discarded (`already_posted`), reverse or release it instead.', ctxSchema({ provisionId: STR, reason: STR, idempotencyKey: STR }, ['provisionId', 'idempotencyKey']), (ctx, input) => provisionDiscard(ctx, input)),
56
56
  ctxAction('provision_get', 'read', 'Read one Rückstellung: the row, its formation lines, every release with its entry (and the reversal of that entry, when one exists) and the open balance, derived as the formation amount minus the live releases.', ctxSchema({ provisionId: STR }, ['provisionId']), (ctx, input) => provisionGet(ctx, input)),
57
57
  ctxAction('provision_list', 'read', 'List Rückstellungen, newest period first, each with its open balance, filtered by periodEnd, status (draft | posted | released | reversed | discarded) or reason. `openTotalMinor` sums the open balances. savedViewId applies a saved view (G00).', ctxSchema({ periodEnd: STR, status: STR, reason: STR, savedViewId: STR }), (ctx, input) => provisionList(ctx, input)),
58
58
  ctxAction('tax_provision_preview', 'read', "Propose the Steuerrückstellung for the fiscal year to `periodEnd` the way Kanton Zürich ZStB 27/1 computes it: profit before tax times s/(1+s) at `rateBp` (default 2000 = 20 %, the rate is cantonal and yours to set), minus the instalments already charged to 8900, never below zero. Returns the figures and a ready `provision_create` draft (reason steuern, Dr 8900 / Cr 2330). On an Einzelfirma answers applicable:false. A read: nothing is posted.", ctxSchema({ periodEnd: STR, rateBp: INT }, ['periodEnd']), (ctx, input) => taxProvisionPreview(ctx, input)),
@@ -70,8 +70,8 @@ export function vatSettlementActions(h) {
70
70
  const { ctxAction, ctxSchema, STR } = h;
71
71
  return [
72
72
  ctxAction('vat_settlement_preview', 'read', "Preview the MWST-Saldierung of one filed period (`period` is the A07 label, `2026-Q3` or `2026-H1`): the booked movement on 2200 (Umsatzsteuer), 1170 and 1171 (Vorsteuer) over the period beside the return's Ziffer 399 and 400 + 405 with the differences, and the exact lines the post would book (Dr 2200 / Cr 2201, Dr 2201 / Cr 1170, Dr 2201 / Cr 1171; under the Saldosteuersatz the flat-rate tax due against 3809). Settlement entries and their reversals are excluded from the read, so a settled period previews as settled, never twice. A read: nothing is posted.", ctxSchema({ period: STR }, ['period']), (ctx, input) => vatSettlementPreview(ctx, input)),
73
- ctxAction('vat_settlement_post', 'write', "Book the MWST-Saldierung the preview showed: transfer the filed period's balances on 2200, 1170 and 1171 to 2201 (MWST-Abrechnungskonto), dated the period end, `source='vat_settlement'`, so the three tax accounts read zero and 2201 carries what the ESTV is owed. Admitted inside the filed, hard-locked period under three enforced conditions (no VAT trace, only the tax accounts, never into a year-close seal); the filed return and the Abstimmung are unchanged by it. Refuses `period_not_filed` before the filing, `nothing_to_settle` on an empty period, `already_posted` while a settlement of the period stands, `period_locked` with reason `year_close` on a sealed year. Idempotent on `idempotencyKey` for as long as the settlement that key booked still stands; a key whose settlement was reversed refuses `already_reversed_key` (post again under a new key, which books a new settlement). The correction is `vat_settlement_reverse`.", ctxSchema({ period: STR, idempotencyKey: STR }, ['period', 'idempotencyKey']), (ctx, input) => vatSettlementPost(ctx, input)),
74
- ctxAction('vat_settlement_reverse', 'write', 'Reverse a posted MWST-Saldierung with a reversing entry dated the period end, so 2200, 1170, 1171 and 2201 net to zero again inside the settled period; the settlement row reads `reversed` and keeps its history, and a later `vat_settlement_post` for the period books a new settlement. This is the ONLY way to reverse a settlement entry: the generic `reverse_entry` refuses it with `owned_by`, because the settlement row must move with the mirror. Refuses `not_found` and `already_reversed`. Idempotent on `idempotencyKey`.', ctxSchema({ settlementId: STR, idempotencyKey: STR }, ['settlementId', 'idempotencyKey']), (ctx, input) => vatSettlementReverse(ctx, input)),
73
+ ctxAction('vat_settlement_post', 'write:correctable:books', "Book the MWST-Saldierung the preview showed: transfer the filed period's balances on 2200, 1170 and 1171 to 2201 (MWST-Abrechnungskonto), dated the period end, `source='vat_settlement'`, so the three tax accounts read zero and 2201 carries what the ESTV is owed. Admitted inside the filed, hard-locked period under three enforced conditions (no VAT trace, only the tax accounts, never into a year-close seal); the filed return and the Abstimmung are unchanged by it. Refuses `period_not_filed` before the filing, `nothing_to_settle` on an empty period, `already_posted` while a settlement of the period stands, `period_locked` with reason `year_close` on a sealed year. Idempotent on `idempotencyKey` for as long as the settlement that key booked still stands; a key whose settlement was reversed refuses `already_reversed_key` (post again under a new key, which books a new settlement). The correction is `vat_settlement_reverse`.", ctxSchema({ period: STR, idempotencyKey: STR }, ['period', 'idempotencyKey']), (ctx, input) => vatSettlementPost(ctx, input)),
74
+ ctxAction('vat_settlement_reverse', 'write:correctable:books', 'Reverse a posted MWST-Saldierung with a reversing entry dated the period end, so 2200, 1170, 1171 and 2201 net to zero again inside the settled period; the settlement row reads `reversed` and keeps its history, and a later `vat_settlement_post` for the period books a new settlement. This is the ONLY way to reverse a settlement entry: the generic `reverse_entry` refuses it with `owned_by`, because the settlement row must move with the mirror. Refuses `not_found` and `already_reversed`. Idempotent on `idempotencyKey`.', ctxSchema({ settlementId: STR, idempotencyKey: STR }, ['settlementId', 'idempotencyKey']), (ctx, input) => vatSettlementReverse(ctx, input)),
75
75
  ctxAction('vat_settlement_list', 'read', 'List the MWST-Saldierungen on record, newest period first, posted and reversed, with the moved figures and the entry ids. `year` (YYYY) narrows to one Steuerperiode. A read.', ctxSchema({ year: STR }), (ctx, input) => vatSettlementList(ctx, input)),
76
76
  ctxAction('vat_annual_reconciliation', 'read', "The two annual MWST reconciliations of a calendar year as figures (Art. 128 Abs. 2 and 3 MWSTV, the ESTV's Umsatz- and Vorsteuerabstimmung): the class-3 revenue per the books adjusted for the accruals and disposal proceeds the ledger can name against the sum of Ziffer 200 of the year's returns, and the booked Vorsteuer on 1170 + 1171 against the sum of Ziffer 400 + 405, each with its difference and a status (`match`, `warn`, or `unavailable` naming the periods not yet filed). Under the Saldosteuersatz the Vorsteuer half is not applicable; a workspace with no MWST method answers `applicable: false`. A read.", ctxSchema({ year: STR }, ['year']), (ctx, input) => vatAnnualReconciliation(ctx, input)),
77
77
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"accrual-actions.js","sourceRoot":"","sources":["../../src/api/accrual-actions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAKH,OAAO,EACL,aAAa,EACb,UAAU,EACV,WAAW,EACX,cAAc,EACd,WAAW,EACX,cAAc,EACd,eAAe,EACf,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,aAAa,EACb,gBAAgB,EAChB,uBAAuB,EACvB,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,uBAAuB,GACxB,MAAM,2BAA2B,CAAC;AAenC,mFAAmF;AACnF,MAAM,UAAU,cAAc,CAAC,CAAuB;IACpD,MAAM,EAAE,SAA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CACvD;QACD,SAAS,CACP,2BAA2B,EAC3B,MAAM,EACN,umBAAumB,EACvmB,SAAS,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,EAClC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,uBAAuB,CAAC,GAAG,EAAE,KAAc,CAAC,CAC7D;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * D159/D160: THE KIND A VERB IS REGISTERED UNDER. A write declares how far it can be undone AND what it
3
+ * touches, on its own registration line:
4
+ *
5
+ * ctxAction('archive_account', 'write:reversible:internal', ...)
6
+ * ctxAction('post_entry', 'write:correctable:books', ...)
7
+ * ctxAction('contacts_anonymise', 'write:final:erase', ...)
8
+ *
9
+ * The class is one of the catalogue's three words (`src/core/agent/consequences.ts`); the tag is one of
10
+ * the closed D160 consequence tags (`src/core/agent/consequenceTag.ts`). `ctxAction` / `depsAction`
11
+ * (`registry.ts`) split the string: `ActionDef.kind` stays `'read' | 'write'`, so the agent seam, A24 and
12
+ * every suite read exactly what they read before, the class lands on `ActionDef.reversibility` and the
13
+ * tag on `ActionDef.consequenceTag`. A malformed kind throws at load with the verb named.
14
+ *
15
+ * WHY THE TAG LIVES IN THE KIND STRING (and not in a sidecar map or a sixth argument): it is the only
16
+ * place where a write with no tag is a COMPILE error. A sidecar keyed by verb name can only be checked
17
+ * at load, because no type knows the set of verb names; a separate argument would be a second positional
18
+ * slot on 449 call sites that a reader has to pair with the first. One literal carries the whole D159/D160
19
+ * declaration, and `splitActionKind` is the runtime belt for a cast or a plain-JS caller.
20
+ *
21
+ * STRICT since the D159 codemod: a bare `'write'` (or a class with no tag) no longer compiles, and the
22
+ * registry asserts at load that every write carries both (`assertEveryWriteIsClassified`).
23
+ * `test/types/write-kind.neg.ts` holds the refusals.
24
+ *
25
+ * Type only: nothing here exists at runtime.
26
+ */
27
+ import type { Reversibility as CatalogueReversibility } from '../core/agent/consequences.js';
28
+ import type { ConsequenceTag } from '../core/agent/consequenceTag.js';
29
+ export type { ConsequenceTag, ExemptConsequenceTag, GatedConsequenceTag } from '../core/agent/consequenceTag.js';
30
+ /**
31
+ * How far a write can be undone (D158.3 / D159.3). One definition: this is the catalogue's own type.
32
+ * - `reversible`: a verb changes it back (a setting, an archive, a pause);
33
+ * - `correctable`: the act stands and a mistake is fixed by a new linked entry or document;
34
+ * - `final`: there is no way back inside TILL.
35
+ */
36
+ export type Reversibility = CatalogueReversibility;
37
+ /** A classified, tagged write: `write:<class>:<tag>`, e.g. `write:correctable:books`. */
38
+ export type ClassifiedWriteKind = `write:${Reversibility}:${ConsequenceTag}`;
39
+ /** The kind set the registry accepts: a read, or a write WITH its class and its consequence tag. */
40
+ export type STRICT_ACTION_KIND = 'read' | ClassifiedWriteKind;
41
+ /** What `ctxAction` / `depsAction` accept: the strict set, and nothing else. */
42
+ export type ActionKind = STRICT_ACTION_KIND;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * D159/D160: THE KIND A VERB IS REGISTERED UNDER. A write declares how far it can be undone AND what it
3
+ * touches, on its own registration line:
4
+ *
5
+ * ctxAction('archive_account', 'write:reversible:internal', ...)
6
+ * ctxAction('post_entry', 'write:correctable:books', ...)
7
+ * ctxAction('contacts_anonymise', 'write:final:erase', ...)
8
+ *
9
+ * The class is one of the catalogue's three words (`src/core/agent/consequences.ts`); the tag is one of
10
+ * the closed D160 consequence tags (`src/core/agent/consequenceTag.ts`). `ctxAction` / `depsAction`
11
+ * (`registry.ts`) split the string: `ActionDef.kind` stays `'read' | 'write'`, so the agent seam, A24 and
12
+ * every suite read exactly what they read before, the class lands on `ActionDef.reversibility` and the
13
+ * tag on `ActionDef.consequenceTag`. A malformed kind throws at load with the verb named.
14
+ *
15
+ * WHY THE TAG LIVES IN THE KIND STRING (and not in a sidecar map or a sixth argument): it is the only
16
+ * place where a write with no tag is a COMPILE error. A sidecar keyed by verb name can only be checked
17
+ * at load, because no type knows the set of verb names; a separate argument would be a second positional
18
+ * slot on 449 call sites that a reader has to pair with the first. One literal carries the whole D159/D160
19
+ * declaration, and `splitActionKind` is the runtime belt for a cast or a plain-JS caller.
20
+ *
21
+ * STRICT since the D159 codemod: a bare `'write'` (or a class with no tag) no longer compiles, and the
22
+ * registry asserts at load that every write carries both (`assertEveryWriteIsClassified`).
23
+ * `test/types/write-kind.neg.ts` holds the refusals.
24
+ *
25
+ * Type only: nothing here exists at runtime.
26
+ */
27
+ export {};
28
+ //# sourceMappingURL=actionKind.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actionKind.js","sourceRoot":"","sources":["../../src/api/actionKind.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG"}
@@ -23,8 +23,9 @@ import type { ActionDef, ActionInput, ApiDeps, JsonSchema } from './registry.js'
23
23
  import type { WorkspaceContext } from '../core/context.js';
24
24
  import type { Result } from '../core/result.js';
25
25
  import type { ActionInvoker } from '../core/automation/index.js';
26
+ import type { ActionKind } from './actionKind.js';
26
27
  export interface AgentActionHelpers {
27
- ctxAction(name: string, kind: 'read' | 'write', summary: string, inputSchema: JsonSchema, call: (ctx: WorkspaceContext, input: ActionInput, deps: ApiDeps) => Result): ActionDef;
28
+ ctxAction(name: string, kind: ActionKind, summary: string, inputSchema: JsonSchema, call: (ctx: WorkspaceContext, input: ActionInput, deps: ApiDeps) => Result): ActionDef;
28
29
  ctxSchema(props?: Record<string, unknown>, required?: string[]): JsonSchema;
29
30
  /** Builds the invoker that reaches the shared dispatch. Supplied by `registry.ts`, which owns it. */
30
31
  invokerFor(deps: ApiDeps): ActionInvoker;
@@ -33,13 +33,13 @@ export function agentActions(h) {
33
33
  ctxAction('month_end_checklist', 'read', 'A month-end close checklist (period YYYY-MM): dangling drafts (A02), open debtors (A16), open creditor bills (A17) and a MWST preview (A07), each with drill-down ids. Writes nothing; FX revaluation is reported as not_available until A22 builds it.', ctxSchema({ period: STR }, ['period']), (ctx, input) => monthEndChecklist(ctx, as(input))),
34
34
  ctxAction('detect_anomalies', 'read', 'Surface likely mistakes as flags, never auto-corrections: probable duplicate entries, stale drafts, missing tax codes and round-number outliers over the posted ledger (optional period YYYY or YYYY-MM). Writes nothing; the user confirms before any fix is drafted.', ctxSchema({ period: STR }), (ctx, input) => detectAnomalies(ctx, as(input))),
35
35
  ctxAction('get_agent_dial', 'read', 'Read the raw approval-dial levels for every governed capability (post, issue, send, dun, pay, vat-file, customize, plugin-install, close-period, go-live). Each defaults to ask when never set. Owner-facing view of what the agent may auto-execute versus draft.', ctxSchema(), (ctx) => getAgentDial(ctx)),
36
- ctxAction('set_agent_dial', 'write', 'Set one approval-dial level to ask or auto for one governed capability (post/issue/send/dun/pay/vat-file/customize/plugin-install/close-period/go-live). ask drafts the agent write for human approval; auto executes it when RBAC also permits. An unknown capability or level is rejected. Owner-only (manage_agent_dial).', ctxSchema({ capability: STR, level: STR, idempotencyKey: STR }, ['capability', 'level', 'idempotencyKey']), (ctx, input) => setAgentDial(ctx, as(input))),
36
+ ctxAction('set_agent_dial', 'write:reversible:access', 'Set one approval-dial level to ask or auto for one governed capability (post/issue/send/dun/pay/vat-file/customize/plugin-install/close-period/go-live). ask drafts the agent write for human approval; auto executes it when RBAC also permits. An unknown capability or level is rejected. Owner-only (manage_agent_dial).', ctxSchema({ capability: STR, level: STR, idempotencyKey: STR }, ['capability', 'level', 'idempotencyKey']), (ctx, input) => setAgentDial(ctx, as(input))),
37
37
  ctxAction('list_drafted_actions', 'read', 'List the drafted agent actions (Vorschläge) of a workspace: pending by default (oldest first), or executed/rejected via status. Each row carries its verb, parsed payload, dial capability, proposer and resolution, so the approval queue renders from one read on every face.', ctxSchema({ status: STR }), (ctx, input) => listDraftedActions(ctx, as(input))),
38
38
  // The one A26 verb holding an invoker: registered through the same handshake G01/A12 use, below.
39
- ctxAction('approve_drafted_action', 'write', 'Approve a drafted agent action from the inbox: replay its verb through the shared dispatch as the approver (RBAC re-checked, idempotent on the stored key, so approve-twice never double-posts) and mark it executed. allowFuture additionally records the standing per-capability grant to auto (D103): the same attributed, revocable dial write set_agent_dial performs. The agent can never self-approve; a second, independent actor must review. Owner-gated (manage_agent_dial).', ctxSchema({ actionId: STR, allowFuture: BOOL }, ['actionId']), (ctx, input, deps) => approveDraftedAction(ctx, invokerFor(deps), as(input))),
40
- ctxAction('reject_drafted_action', 'write', 'Reject a drafted agent action from the inbox: drop it unexecuted (idempotent on actionId; an already-executed action refuses). reason is the human\'s optional sentence on why, stored on the proposal and shown in the trace beside the drafting call, so the next session reads it. Owner-gated (manage_agent_dial).', ctxSchema({ actionId: STR, reason: STR }, ['actionId']), (ctx, input) => rejectDraftedAction(ctx, as(input))),
41
- ctxAction('agent_ask', 'write', 'Ask the books a question in prose (the Studio composer, D90 D-1). Needs a registered E05 local runtime (needs_local_runtime otherwise); the runtime only classifies the question onto one of the three A26 read models and the executed verb is ALWAYS a read, so no write is reachable from prose. Persists the sentence as a turn (D-5) and records the answering call in the trace.', ctxSchema({ text: STR, periodStart: STR, periodEnd: STR, idempotencyKey: STR }, ['text', 'idempotencyKey']), (ctx, input) => agentAsk(ctx, as(input))),
42
- ctxAction('agent_prose_delete', 'write', 'Delete one agent session’s stored prose (D90 D-5): every turn text of the session is cleared, the call trace stays. The words are the user’s to remove; what actually ran is the trust view’s substrate and remains. Owner-gated (manage_agent_dial); idempotent per key.', ctxSchema({ sessionId: STR, idempotencyKey: STR }, ['sessionId', 'idempotencyKey']), (ctx, input) => agentProseDelete(ctx, as(input))),
39
+ ctxAction('approve_drafted_action', 'write:final:access', 'Approve a drafted agent action from the inbox: replay its verb through the shared dispatch as the approver (RBAC re-checked, idempotent on the stored key, so approve-twice never double-posts) and mark it executed. allowFuture additionally records the standing per-capability grant to auto (D103): the same attributed, revocable dial write set_agent_dial performs. The agent can never self-approve; a second, independent actor must review. Owner-gated (manage_agent_dial).', ctxSchema({ actionId: STR, allowFuture: BOOL }, ['actionId']), (ctx, input, deps) => approveDraftedAction(ctx, invokerFor(deps), as(input))),
40
+ ctxAction('reject_drafted_action', 'write:correctable:human-only', 'Reject a drafted agent action from the inbox: drop it unexecuted (idempotent on actionId; an already-executed action refuses). reason is the human\'s optional sentence on why, stored on the proposal and shown in the trace beside the drafting call, so the next session reads it. Owner-gated (manage_agent_dial).', ctxSchema({ actionId: STR, reason: STR }, ['actionId']), (ctx, input) => rejectDraftedAction(ctx, as(input))),
41
+ ctxAction('agent_ask', 'write:correctable:internal', 'Ask the books a question in prose (the Studio composer, D90 D-1). Needs a registered E05 local runtime (needs_local_runtime otherwise); the runtime only classifies the question onto one of the three A26 read models and the executed verb is ALWAYS a read, so no write is reachable from prose. Persists the sentence as a turn (D-5) and records the answering call in the trace.', ctxSchema({ text: STR, periodStart: STR, periodEnd: STR, idempotencyKey: STR }, ['text', 'idempotencyKey']), (ctx, input) => agentAsk(ctx, as(input))),
42
+ ctxAction('agent_prose_delete', 'write:final:erase', 'Delete one agent session’s stored prose (D90 D-5): every turn text of the session is cleared, the call trace stays. The words are the user’s to remove; what actually ran is the trust view’s substrate and remains. Owner-gated (manage_agent_dial); idempotent per key.', ctxSchema({ sessionId: STR, idempotencyKey: STR }, ['sessionId', 'idempotencyKey']), (ctx, input) => agentProseDelete(ctx, as(input))),
43
43
  ];
44
44
  // The load-time handshake (A24): a verb that can invoke another verb as a different actor may never
45
45
  // be ungated. The fact is supplied here, the rule lives in `actionCapabilities.ts`.
@@ -1 +1 @@
1
- {"version":3,"file":"agent-actions.js","sourceRoot":"","sources":["../../src/api/agent-actions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAMH,OAAO,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EACL,QAAQ,EACR,iBAAiB,EACjB,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACnB,QAAQ,EACR,gBAAgB,GACjB,MAAM,wBAAwB,CAAC;AAiBhC,iGAAiG;A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,CAAC,CACjD;KACF,CAAC;IAEF,oGAAoG;IACpG,oFAAoF;IACpF,4BAA4B,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC;IACzD,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -27,3 +27,9 @@ import type { ActionDef, ActionInput, ApiDeps } from './registry.js';
27
27
  * the agent seat it records the call, and for a dial-governed write it routes execute/draft/deny.
28
28
  */
29
29
  export declare function runGoverned(deps: ApiDeps, action: ActionDef, input: ActionInput): Result;
30
+ /**
31
+ * D142: the same dispatch for a door that can await. A verb with a `runAsync` (the host may run it off
32
+ * the main thread, `bank_sync` under `till up`) is awaited; every other verb runs exactly as in
33
+ * `runGoverned`. The trace, the dial and the refusals are the ones `planGoverned` decides for both.
34
+ */
35
+ export declare function runGovernedAsync(deps: ApiDeps, action: ActionDef, input: ActionInput): Promise<Result>;