@hyperscale0/hsx 1.0.0-rc.1 → 1.0.123

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 (311) hide show
  1. package/CHANGELOG.md +5 -239
  2. package/LICENSE.md +356 -0
  3. package/NOTICE.md +8 -0
  4. package/README.md +45 -43
  5. package/bin/hsx.ts +0 -5
  6. package/dist/bin/hsx.d.ts +0 -4
  7. package/dist/bin/hsx.d.ts.map +1 -1
  8. package/dist/bin/hsx.js +0 -4
  9. package/dist/bin/hsx.js.map +1 -1
  10. package/dist/src/ast.d.ts +113 -302
  11. package/dist/src/ast.d.ts.map +1 -1
  12. package/dist/src/ast.js +7 -47
  13. package/dist/src/ast.js.map +1 -1
  14. package/dist/src/attachment-economics.d.ts +5 -0
  15. package/dist/src/attachment-economics.d.ts.map +1 -0
  16. package/dist/src/attachment-economics.js +55 -0
  17. package/dist/src/attachment-economics.js.map +1 -0
  18. package/dist/src/binding-contract.d.ts +22 -0
  19. package/dist/src/binding-contract.d.ts.map +1 -0
  20. package/dist/src/binding-contract.js +74 -0
  21. package/dist/src/binding-contract.js.map +1 -0
  22. package/dist/src/cli.d.ts +4 -17
  23. package/dist/src/cli.d.ts.map +1 -1
  24. package/dist/src/cli.js +92 -259
  25. package/dist/src/cli.js.map +1 -1
  26. package/dist/src/compile.d.ts +34 -68
  27. package/dist/src/compile.d.ts.map +1 -1
  28. package/dist/src/compile.js +2949 -118
  29. package/dist/src/compile.js.map +1 -1
  30. package/dist/src/cost.d.ts +8 -75
  31. package/dist/src/cost.d.ts.map +1 -1
  32. package/dist/src/cost.js +54 -364
  33. package/dist/src/cost.js.map +1 -1
  34. package/dist/src/diagnostics.d.ts +14 -9
  35. package/dist/src/diagnostics.d.ts.map +1 -1
  36. package/dist/src/diagnostics.js +39 -416
  37. package/dist/src/diagnostics.js.map +1 -1
  38. package/dist/src/examples-bundle.d.ts +3 -0
  39. package/dist/src/examples-bundle.d.ts.map +1 -0
  40. package/dist/src/examples-bundle.js +18 -0
  41. package/dist/src/examples-bundle.js.map +1 -0
  42. package/dist/src/examples.d.ts +10 -0
  43. package/dist/src/examples.d.ts.map +1 -0
  44. package/dist/src/examples.js +2 -0
  45. package/dist/src/examples.js.map +1 -0
  46. package/dist/src/format.d.ts +8 -7
  47. package/dist/src/format.d.ts.map +1 -1
  48. package/dist/src/format.js +9 -175
  49. package/dist/src/format.js.map +1 -1
  50. package/dist/src/header-source.d.ts +3 -0
  51. package/dist/src/header-source.d.ts.map +1 -0
  52. package/dist/src/header-source.js +41 -0
  53. package/dist/src/header-source.js.map +1 -0
  54. package/dist/src/headers.d.ts +64 -0
  55. package/dist/src/headers.d.ts.map +1 -0
  56. package/dist/src/headers.js +167 -0
  57. package/dist/src/headers.js.map +1 -0
  58. package/dist/src/index.d.ts +8 -11
  59. package/dist/src/index.d.ts.map +1 -1
  60. package/dist/src/index.js +5 -8
  61. package/dist/src/index.js.map +1 -1
  62. package/dist/src/keywords.d.ts +56 -0
  63. package/dist/src/keywords.d.ts.map +1 -0
  64. package/dist/src/keywords.js +133 -0
  65. package/dist/src/keywords.js.map +1 -0
  66. package/dist/src/language.d.ts +26 -0
  67. package/dist/src/language.d.ts.map +1 -0
  68. package/dist/src/language.js +440 -0
  69. package/dist/src/language.js.map +1 -0
  70. package/dist/src/lex.d.ts +13 -28
  71. package/dist/src/lex.d.ts.map +1 -1
  72. package/dist/src/lex.js +119 -145
  73. package/dist/src/lex.js.map +1 -1
  74. package/dist/src/parse.d.ts +4 -17
  75. package/dist/src/parse.d.ts.map +1 -1
  76. package/dist/src/parse.js +484 -1036
  77. package/dist/src/parse.js.map +1 -1
  78. package/dist/src/std-bundle.d.ts +2 -0
  79. package/dist/src/std-bundle.d.ts.map +1 -0
  80. package/dist/src/std-bundle.js +15 -0
  81. package/dist/src/std-bundle.js.map +1 -0
  82. package/dist/src/std-library.d.ts +5 -0
  83. package/dist/src/std-library.d.ts.map +1 -0
  84. package/dist/src/std-library.js +5 -0
  85. package/dist/src/std-library.js.map +1 -0
  86. package/dist/src/tunables.d.ts +7 -0
  87. package/dist/src/tunables.d.ts.map +1 -0
  88. package/dist/src/tunables.js +27 -0
  89. package/dist/src/tunables.js.map +1 -0
  90. package/docs/README.md +528 -23
  91. package/docs/assets/brand/hsx-horizontal-white.svg +1 -0
  92. package/docs/assets/brand/hsx-horizontal.svg +1 -0
  93. package/docs/assets/brand/hsx-stacked-white.svg +1 -0
  94. package/docs/assets/brand/hsx-stacked.svg +1 -0
  95. package/docs/assets/brand/manifest.json +30 -0
  96. package/docs/assets/hsx.svg +11 -0
  97. package/examples/cards.hsx +34 -0
  98. package/examples/collections.hsx +37 -0
  99. package/examples/cost-table.json +633 -385
  100. package/examples/escrow.hsx +24 -0
  101. package/examples/financing.hsx +32 -0
  102. package/examples/insurance.hsx +30 -0
  103. package/examples/lending.hsx +57 -0
  104. package/examples/library.hsx +15 -0
  105. package/examples/marketplace.hsx +32 -0
  106. package/examples/money.hsx +19 -0
  107. package/examples/rental-deposit.hsx +60 -0
  108. package/examples/repair-approval.hsx +44 -0
  109. package/examples/reporting.hsx +28 -0
  110. package/examples/savings.hsx +21 -0
  111. package/examples/serviced.hsx +25 -0
  112. package/examples/wallet.hsx +24 -0
  113. package/package.json +27 -17
  114. package/src/ast.ts +84 -411
  115. package/src/attachment-economics.ts +103 -0
  116. package/src/binding-contract.ts +104 -0
  117. package/src/cli.ts +98 -309
  118. package/src/compile.ts +4063 -212
  119. package/src/cost.ts +71 -574
  120. package/src/diagnostics.ts +57 -437
  121. package/src/examples-bundle.ts +19 -0
  122. package/src/examples.ts +9 -0
  123. package/src/format.ts +12 -256
  124. package/src/header-source.ts +54 -0
  125. package/src/headers.ts +195 -0
  126. package/src/index.ts +16 -29
  127. package/src/keywords.ts +134 -0
  128. package/src/language.ts +629 -0
  129. package/src/lex.ts +131 -192
  130. package/src/parse.ts +489 -1195
  131. package/src/std-bundle.ts +15 -0
  132. package/src/std-library.ts +7 -0
  133. package/src/tunables.ts +36 -0
  134. package/std/cards.hsx +85 -0
  135. package/std/collections.hsx +90 -0
  136. package/std/escrow.hsx +73 -0
  137. package/std/financing.hsx +683 -0
  138. package/std/insurance.hsx +89 -0
  139. package/std/lending.hsx +138 -0
  140. package/std/marketplace.hsx +123 -0
  141. package/std/money.hsx +173 -0
  142. package/std/reporting.hsx +753 -0
  143. package/std/savings.hsx +68 -0
  144. package/std/wallet.hsx +57 -0
  145. package/LICENSE +0 -661
  146. package/LICENSING.md +0 -52
  147. package/TRADEMARKS.md +0 -35
  148. package/dist/src/emit.d.ts +0 -35
  149. package/dist/src/emit.d.ts.map +0 -1
  150. package/dist/src/emit.js +0 -359
  151. package/dist/src/emit.js.map +0 -1
  152. package/dist/src/entry-overrides.d.ts +0 -58
  153. package/dist/src/entry-overrides.d.ts.map +0 -1
  154. package/dist/src/entry-overrides.js +0 -284
  155. package/dist/src/entry-overrides.js.map +0 -1
  156. package/dist/src/ir.d.ts +0 -66
  157. package/dist/src/ir.d.ts.map +0 -1
  158. package/dist/src/ir.js +0 -15
  159. package/dist/src/ir.js.map +0 -1
  160. package/dist/src/limits.d.ts +0 -21
  161. package/dist/src/limits.d.ts.map +0 -1
  162. package/dist/src/limits.js +0 -21
  163. package/dist/src/limits.js.map +0 -1
  164. package/dist/src/modules.d.ts +0 -36
  165. package/dist/src/modules.d.ts.map +0 -1
  166. package/dist/src/modules.js +0 -372
  167. package/dist/src/modules.js.map +0 -1
  168. package/dist/src/typecheck.d.ts +0 -8
  169. package/dist/src/typecheck.d.ts.map +0 -1
  170. package/dist/src/typecheck.js +0 -2958
  171. package/dist/src/typecheck.js.map +0 -1
  172. package/dist/src/version.d.ts +0 -5
  173. package/dist/src/version.d.ts.map +0 -1
  174. package/dist/src/version.js +0 -5
  175. package/dist/src/version.js.map +0 -1
  176. package/docs/guide/01-first-program.md +0 -24
  177. package/docs/guide/02-money.md +0 -25
  178. package/docs/guide/03-instruments.md +0 -22
  179. package/docs/guide/04-lifecycles.md +0 -25
  180. package/docs/guide/05-fees-and-splits.md +0 -45
  181. package/docs/guide/06-schedules.md +0 -22
  182. package/docs/guide/07-composition.md +0 -46
  183. package/docs/guide/08-writing-a-module.md +0 -26
  184. package/docs/guide/09-cost.md +0 -24
  185. package/docs/guide/10-diagnostics.md +0 -27
  186. package/docs/llms-full.txt +0 -1738
  187. package/docs/llms.txt +0 -45
  188. package/docs/reference/cli.md +0 -33
  189. package/docs/reference/diagnostics.md +0 -619
  190. package/docs/reference/grammar.md +0 -39
  191. package/docs/reference/std/advance.md +0 -35
  192. package/docs/reference/std/cancellable_booking.md +0 -35
  193. package/docs/reference/std/captured_payment.md +0 -43
  194. package/docs/reference/std/conditional_disbursement.md +0 -33
  195. package/docs/reference/std/credit_facility.md +0 -35
  196. package/docs/reference/std/held_payment.md +0 -64
  197. package/docs/reference/std/instant_transfer.md +0 -30
  198. package/docs/reference/std/metered.md +0 -27
  199. package/docs/reference/std/pooled_split.md +0 -26
  200. package/docs/reference/std/premium_forward.md +0 -39
  201. package/docs/reference/std/reconciled_payout.md +0 -33
  202. package/docs/reference/std/recurring_collection.md +0 -25
  203. package/docs/reference/std/rotating_pool.md +0 -42
  204. package/docs/reference/std/scheduled.md +0 -51
  205. package/docs/reference/std/security_deposit.md +0 -46
  206. package/docs/reference/std/settlement_batch.md +0 -42
  207. package/docs/reference/std/swap.md +0 -46
  208. package/docs/reference/std/threshold_pool.md +0 -47
  209. package/docs/reference/std/weighted_distribution.md +0 -39
  210. package/docs/reference/types.md +0 -20
  211. package/docs/reference/udl-output.md +0 -14
  212. package/docs/sessions/2026-09-02-two-instruments.hsx +0 -21
  213. package/docs/sessions/2026-09-02-two-instruments.md +0 -41
  214. package/examples/01-first-program/README.md +0 -45
  215. package/examples/01-first-program/tip-jar.hsx +0 -17
  216. package/examples/02-imports-and-archetypes/README.md +0 -99
  217. package/examples/02-imports-and-archetypes/photo-booth.hsx +0 -37
  218. package/examples/03-diagnostics/README.md +0 -68
  219. package/examples/03-diagnostics/corner-shop-fixed.hsx +0 -22
  220. package/examples/03-diagnostics/corner-shop.hsx +0 -19
  221. package/examples/04-complete-product/README.md +0 -87
  222. package/examples/04-complete-product/study-hall.hsx +0 -67
  223. package/examples/05-watch-club/README.md +0 -9
  224. package/examples/05-watch-club/watch-club.hsx +0 -124
  225. package/examples/README.md +0 -18
  226. package/examples/advance/README.md +0 -3
  227. package/examples/advance/advance.hsx +0 -13
  228. package/examples/advance/advance.udl +0 -339
  229. package/examples/cancellable_booking/README.md +0 -3
  230. package/examples/cancellable_booking/cancellable_booking.hsx +0 -14
  231. package/examples/cancellable_booking/cancellable_booking.udl +0 -391
  232. package/examples/captured_payment/README.md +0 -3
  233. package/examples/captured_payment/captured_payment.hsx +0 -21
  234. package/examples/captured_payment/captured_payment.udl +0 -677
  235. package/examples/conditional_disbursement/README.md +0 -3
  236. package/examples/conditional_disbursement/conditional_disbursement.hsx +0 -17
  237. package/examples/conditional_disbursement/conditional_disbursement.udl +0 -412
  238. package/examples/credit_facility/README.md +0 -3
  239. package/examples/credit_facility/credit_facility.hsx +0 -27
  240. package/examples/credit_facility/credit_facility.udl +0 -1373
  241. package/examples/held_payment/README.md +0 -3
  242. package/examples/held_payment/held_payment.hsx +0 -13
  243. package/examples/held_payment/held_payment.udl +0 -507
  244. package/examples/instant_transfer/README.md +0 -3
  245. package/examples/instant_transfer/instant_transfer.hsx +0 -16
  246. package/examples/instant_transfer/instant_transfer.udl +0 -364
  247. package/examples/metered/README.md +0 -3
  248. package/examples/metered/metered.hsx +0 -13
  249. package/examples/metered/metered.udl +0 -247
  250. package/examples/pooled_split/README.md +0 -3
  251. package/examples/pooled_split/pooled_split.hsx +0 -15
  252. package/examples/pooled_split/pooled_split.udl +0 -425
  253. package/examples/premium_forward/README.md +0 -3
  254. package/examples/premium_forward/premium_forward.hsx +0 -19
  255. package/examples/premium_forward/premium_forward.udl +0 -594
  256. package/examples/reconciled_payout/README.md +0 -3
  257. package/examples/reconciled_payout/reconciled_payout.hsx +0 -13
  258. package/examples/reconciled_payout/reconciled_payout.udl +0 -303
  259. package/examples/recurring_collection/README.md +0 -3
  260. package/examples/recurring_collection/recurring_collection.hsx +0 -21
  261. package/examples/recurring_collection/recurring_collection.udl +0 -1130
  262. package/examples/rotating_pool/README.md +0 -3
  263. package/examples/rotating_pool/rotating_pool.hsx +0 -18
  264. package/examples/rotating_pool/rotating_pool.udl +0 -4352
  265. package/examples/scheduled/README.md +0 -3
  266. package/examples/scheduled/scheduled.hsx +0 -12
  267. package/examples/scheduled/scheduled.udl +0 -335
  268. package/examples/security_deposit/README.md +0 -3
  269. package/examples/security_deposit/security_deposit.hsx +0 -21
  270. package/examples/security_deposit/security_deposit.udl +0 -293
  271. package/examples/settlement_batch/README.md +0 -3
  272. package/examples/settlement_batch/settlement_batch.hsx +0 -19
  273. package/examples/settlement_batch/settlement_batch.udl +0 -753
  274. package/examples/swap/README.md +0 -3
  275. package/examples/swap/swap.hsx +0 -19
  276. package/examples/swap/swap.udl +0 -876
  277. package/examples/threshold_pool/README.md +0 -3
  278. package/examples/threshold_pool/threshold_pool.hsx +0 -16
  279. package/examples/threshold_pool/threshold_pool.udl +0 -667
  280. package/examples/weighted_distribution/README.md +0 -3
  281. package/examples/weighted_distribution/weighted_distribution.hsx +0 -20
  282. package/examples/weighted_distribution/weighted_distribution.udl +0 -337
  283. package/skills/hsx/SKILL.md +0 -483
  284. package/src/emit.ts +0 -447
  285. package/src/entry-overrides.ts +0 -428
  286. package/src/ir.ts +0 -99
  287. package/src/limits.ts +0 -20
  288. package/src/modules.ts +0 -444
  289. package/src/typecheck.ts +0 -3876
  290. package/src/version.ts +0 -5
  291. package/std/SEMANTICS.md +0 -130
  292. package/std/settlements/advance.hsx +0 -177
  293. package/std/settlements/cancellable_booking.hsx +0 -87
  294. package/std/settlements/captured_payment.hsx +0 -144
  295. package/std/settlements/conditional_disbursement.hsx +0 -185
  296. package/std/settlements/credit_facility.hsx +0 -167
  297. package/std/settlements/held_payment.hsx +0 -578
  298. package/std/settlements/index.hsx +0 -3
  299. package/std/settlements/instant_transfer.hsx +0 -190
  300. package/std/settlements/metered.hsx +0 -67
  301. package/std/settlements/pooled_split.hsx +0 -68
  302. package/std/settlements/premium_forward.hsx +0 -257
  303. package/std/settlements/reconciled_payout.hsx +0 -77
  304. package/std/settlements/recurring_collection.hsx +0 -27
  305. package/std/settlements/rotating_pool.hsx +0 -252
  306. package/std/settlements/scheduled.hsx +0 -641
  307. package/std/settlements/security_deposit.hsx +0 -166
  308. package/std/settlements/settlement_batch.hsx +0 -122
  309. package/std/settlements/swap.hsx +0 -1114
  310. package/std/settlements/threshold_pool.hsx +0 -221
  311. package/std/settlements/weighted_distribution.hsx +0 -141
@@ -1,1130 +0,0 @@
1
- {
2
- "instruments": [
3
- {
4
- "actionOrder": [
5
- "create",
6
- "approve",
7
- "collect_installment_1",
8
- "mark_installment_1_delinquent",
9
- "collect_installment_2",
10
- "mark_installment_2_delinquent",
11
- "complete",
12
- "write_off"
13
- ],
14
- "actions": {
15
- "approve": {
16
- "agentDescription": "Approve the draft obligation and freeze its principal partition and due anchors. The obligation must be in draft. No money moves. Where the product advances funds, approve is what makes advance available.",
17
- "moves": [],
18
- "publicAction": "approveObligation",
19
- "steps": [],
20
- "summary": "Approve the immutable principal partition and stored anchors"
21
- },
22
- "collect_installment_1": {
23
- "due": {
24
- "field": "firstDueAt"
25
- },
26
- "effects": {
27
- "reads": [
28
- {
29
- "signature": "reads.requires_aggregate",
30
- "source": "requiresAggregate"
31
- }
32
- ],
33
- "schedules": [
34
- {
35
- "signature": "schedules.due",
36
- "source": "due"
37
- }
38
- ]
39
- },
40
- "moves": [],
41
- "requiresAggregate": [
42
- {
43
- "check": {
44
- "amountField": "amount",
45
- "kind": "sum_exactly",
46
- "targetField": "installment1Amount"
47
- },
48
- "instrumentId": "obligation_installment_1_payment",
49
- "over": "children",
50
- "refField": "obligationId",
51
- "statuses": [
52
- "paid"
53
- ]
54
- }
55
- ],
56
- "steps": [],
57
- "summary": "Close delinquent installment 1 after linked payments reach its stored amount"
58
- },
59
- "collect_installment_2": {
60
- "due": {
61
- "field": "firstDueAt",
62
- "offset": "P30D"
63
- },
64
- "effects": {
65
- "reads": [
66
- {
67
- "signature": "reads.requires_aggregate",
68
- "source": "requiresAggregate"
69
- }
70
- ],
71
- "schedules": [
72
- {
73
- "signature": "schedules.due",
74
- "source": "due"
75
- }
76
- ]
77
- },
78
- "moves": [],
79
- "requiresAggregate": [
80
- {
81
- "check": {
82
- "amountField": "amount",
83
- "kind": "sum_exactly",
84
- "targetField": "installment2Amount"
85
- },
86
- "instrumentId": "obligation_installment_2_payment",
87
- "over": "children",
88
- "refField": "obligationId",
89
- "statuses": [
90
- "paid"
91
- ]
92
- }
93
- ],
94
- "steps": [],
95
- "summary": "Close delinquent installment 2 after linked payments reach its stored amount"
96
- },
97
- "complete": {
98
- "due": {
99
- "field": "firstDueAt",
100
- "offset": "P30D"
101
- },
102
- "effects": {
103
- "reads": [
104
- {
105
- "signature": "reads.requires_aggregate",
106
- "source": "requiresAggregate"
107
- }
108
- ],
109
- "schedules": [
110
- {
111
- "signature": "schedules.due",
112
- "source": "due"
113
- }
114
- ]
115
- },
116
- "moves": [],
117
- "requiresAggregate": [
118
- {
119
- "check": {
120
- "amountField": "amount",
121
- "kind": "sum_exactly",
122
- "targetField": "installment1Amount"
123
- },
124
- "instrumentId": "obligation_installment_1_payment",
125
- "over": "children",
126
- "refField": "obligationId",
127
- "statuses": [
128
- "paid"
129
- ]
130
- },
131
- {
132
- "check": {
133
- "amountField": "amount",
134
- "kind": "sum_exactly",
135
- "targetField": "installment2Amount"
136
- },
137
- "instrumentId": "obligation_installment_2_payment",
138
- "over": "children",
139
- "refField": "obligationId",
140
- "statuses": [
141
- "paid"
142
- ]
143
- }
144
- ],
145
- "steps": [],
146
- "summary": "Close the obligation only after every stored anchor is paid exactly"
147
- },
148
- "create": {
149
- "agentDescription": "Create the obligation in draft with its principal split across stored installment anchors. Approve is the next call. Where the product declares a derived fee, creating the obligation also moves that fee from its bearer to the platform account.",
150
- "moves": [],
151
- "publicAction": "createObligation",
152
- "steps": [],
153
- "summary": "Create a obligation obligation"
154
- },
155
- "mark_installment_1_delinquent": {
156
- "due": {
157
- "field": "firstDueAt"
158
- },
159
- "effects": {
160
- "reads": [
161
- {
162
- "signature": "reads.requires_aggregate",
163
- "source": "requiresAggregate"
164
- }
165
- ],
166
- "schedules": [
167
- {
168
- "signature": "schedules.due",
169
- "source": "due"
170
- }
171
- ]
172
- },
173
- "moves": [],
174
- "requiresAggregate": [
175
- {
176
- "check": {
177
- "amountField": "amount",
178
- "kind": "sum_below",
179
- "targetField": "installment1Amount"
180
- },
181
- "instrumentId": "obligation_installment_1_payment",
182
- "over": "children",
183
- "refField": "obligationId",
184
- "statuses": [
185
- "paid"
186
- ]
187
- }
188
- ],
189
- "setsAt": {
190
- "field": "installment1DelinquentAfter",
191
- "marker": true,
192
- "offset": "PT1S"
193
- },
194
- "steps": [],
195
- "summary": "Mark installment 1 delinquent only when its due anchor is unmet"
196
- },
197
- "mark_installment_2_delinquent": {
198
- "due": {
199
- "field": "firstDueAt",
200
- "offset": "P30D"
201
- },
202
- "effects": {
203
- "reads": [
204
- {
205
- "signature": "reads.requires_aggregate",
206
- "source": "requiresAggregate"
207
- }
208
- ],
209
- "schedules": [
210
- {
211
- "signature": "schedules.due",
212
- "source": "due"
213
- }
214
- ]
215
- },
216
- "moves": [],
217
- "requiresAggregate": [
218
- {
219
- "check": {
220
- "amountField": "amount",
221
- "kind": "sum_below",
222
- "targetField": "installment2Amount"
223
- },
224
- "instrumentId": "obligation_installment_2_payment",
225
- "over": "children",
226
- "refField": "obligationId",
227
- "statuses": [
228
- "paid"
229
- ]
230
- }
231
- ],
232
- "setsAt": {
233
- "field": "installment2DelinquentAfter",
234
- "marker": true,
235
- "offset": "PT1S"
236
- },
237
- "steps": [],
238
- "summary": "Mark installment 2 delinquent only when its due anchor is unmet"
239
- },
240
- "write_off": {
241
- "agentDescription": "Write off the remaining exposure and stop the obligation. No money moves and nothing is refunded. This is the bookkeeping exit for debt that will not be collected. A written-off obligation never returns to repayment.",
242
- "moves": [],
243
- "publicAction": "writeOffObligation",
244
- "steps": [],
245
- "summary": "Write off the remaining exposure without moving money"
246
- }
247
- },
248
- "agentDescription": "Reach for scheduled when one payer owes one payee on a calendar. It covers a plan of fixed installments partitioning one total, an obligation whose installments are paid through child payment records and can go delinquent, and an open period charge that repeats until a cancel port fires. Rotating pool is for a group taking turns.",
249
- "aggregateInvariants": [
250
- {
251
- "childField": "amount",
252
- "childInstrumentId": "obligation_installment_1_payment",
253
- "childRefField": "obligationId",
254
- "childStatuses": [
255
- "paid"
256
- ],
257
- "parentField": "installment1Amount"
258
- },
259
- {
260
- "childField": "amount",
261
- "childInstrumentId": "obligation_installment_2_payment",
262
- "childRefField": "obligationId",
263
- "childStatuses": [
264
- "paid"
265
- ],
266
- "parentField": "installment2Amount"
267
- }
268
- ],
269
- "description": "Installment obligation for debtor; repayment source pays recipient against exact stored anchors",
270
- "fields": {
271
- "currency": {
272
- "description": "ISO 4217 currency code",
273
- "maxLength": 3,
274
- "minLength": 3,
275
- "pattern": "^[A-Z]{3}$",
276
- "type": "string"
277
- },
278
- "debtorAccountId": {
279
- "description": "The debtor account",
280
- "pattern": "^acct_(sandbox|live)_[a-z0-9]{8,64}$",
281
- "type": "string",
282
- "x-hyperscale-reference-filter": {
283
- "column": "role",
284
- "values": [
285
- "customer_balance"
286
- ]
287
- }
288
- },
289
- "firstDueAt": {
290
- "description": "Due date of the first installment; later anchors use fixed offsets of P30D",
291
- "format": "hyperscale-date-time",
292
- "type": "string"
293
- },
294
- "installment1Amount": {
295
- "description": "Stored amount for installment 1 of 2 (carries the integer-division remainder)",
296
- "pattern": "^[1-9][0-9]{0,17}$",
297
- "type": "string"
298
- },
299
- "installment1DelinquentAfter": {
300
- "description": "Machine-set marker proving installment 1 reached its stored due date while unpaid",
301
- "format": "hyperscale-date-time",
302
- "type": "string"
303
- },
304
- "installment2Amount": {
305
- "description": "Stored amount for installment 2 of 2",
306
- "pattern": "^[1-9][0-9]{0,17}$",
307
- "type": "string"
308
- },
309
- "installment2DelinquentAfter": {
310
- "description": "Machine-set marker proving installment 2 reached its stored due date while unpaid",
311
- "format": "hyperscale-date-time",
312
- "type": "string"
313
- },
314
- "principal": {
315
- "description": "The principal in SAR minor units; the stored installment anchors partition it exactly",
316
- "pattern": "^[1-9][0-9]{0,17}$",
317
- "type": "string"
318
- },
319
- "recipientAccountId": {
320
- "description": "The recipient account",
321
- "pattern": "^acct_(sandbox|live)_[a-z0-9]{8,64}$",
322
- "type": "string",
323
- "x-hyperscale-reference-filter": {
324
- "column": "role",
325
- "values": [
326
- "customer_balance"
327
- ]
328
- }
329
- },
330
- "repaymentSourceAccountId": {
331
- "description": "The repayment source account",
332
- "pattern": "^acct_(sandbox|live)_[a-z0-9]{8,64}$",
333
- "type": "string",
334
- "x-hyperscale-reference-filter": {
335
- "column": "role",
336
- "values": [
337
- "customer_balance"
338
- ]
339
- }
340
- }
341
- },
342
- "id": "obligation",
343
- "idPrefix": "obli",
344
- "lifecycle": {
345
- "initial": "draft",
346
- "states": [
347
- "draft",
348
- "active",
349
- "installment_1_delinquent",
350
- "installment_2_delinquent",
351
- "written_off",
352
- "repaid"
353
- ],
354
- "transitions": {
355
- "approve": {
356
- "from": [
357
- "draft"
358
- ],
359
- "to": "active"
360
- },
361
- "collect_installment_1": {
362
- "from": [
363
- "installment_1_delinquent",
364
- "installment_2_delinquent"
365
- ],
366
- "to": "active"
367
- },
368
- "collect_installment_2": {
369
- "from": [
370
- "installment_1_delinquent",
371
- "installment_2_delinquent"
372
- ],
373
- "to": "active"
374
- },
375
- "complete": {
376
- "from": [
377
- "active",
378
- "installment_1_delinquent",
379
- "installment_2_delinquent"
380
- ],
381
- "to": "repaid"
382
- },
383
- "mark_installment_1_delinquent": {
384
- "from": [
385
- "active",
386
- "installment_2_delinquent"
387
- ],
388
- "to": "installment_1_delinquent"
389
- },
390
- "mark_installment_2_delinquent": {
391
- "from": [
392
- "active",
393
- "installment_1_delinquent"
394
- ],
395
- "to": "installment_2_delinquent"
396
- },
397
- "write_off": {
398
- "from": [
399
- "draft",
400
- "active",
401
- "installment_1_delinquent",
402
- "installment_2_delinquent"
403
- ],
404
- "to": "written_off"
405
- }
406
- }
407
- },
408
- "parties": {
409
- "beneficiary": "recipientAccountId",
410
- "payer": "repaymentSourceAccountId"
411
- },
412
- "partitions": [
413
- {
414
- "pieceFields": [
415
- "installment1Amount",
416
- "installment2Amount"
417
- ],
418
- "totalField": "principal"
419
- }
420
- ],
421
- "required": [
422
- "recipientAccountId",
423
- "repaymentSourceAccountId",
424
- "debtorAccountId",
425
- "currency",
426
- "principal",
427
- "firstDueAt",
428
- "installment1Amount",
429
- "installment2Amount"
430
- ],
431
- "summary": "2-anchor obligation for debtor",
432
- "title": "Obligation"
433
- },
434
- {
435
- "actionOrder": [
436
- "create",
437
- "repay",
438
- "refund"
439
- ],
440
- "actions": {
441
- "create": {
442
- "agentDescription": "Open a payment record against installment 1. The parent obligation must be live. No money moves yet. Repay is what pays.",
443
- "effects": {
444
- "reads": [
445
- {
446
- "signature": "reads.requires_refs",
447
- "source": "requiresRefs"
448
- }
449
- ]
450
- },
451
- "moves": [],
452
- "publicAction": "createObligationInstallment1Payment",
453
- "requiresRefs": [
454
- {
455
- "bind": {
456
- "currency": "fields.currency",
457
- "recipientAccountId": "fields.recipientAccountId",
458
- "repaymentSourceAccountId": "fields.repaymentSourceAccountId"
459
- },
460
- "field": "obligationId",
461
- "statuses": [
462
- "active",
463
- "installment_1_delinquent",
464
- "installment_2_delinquent"
465
- ]
466
- }
467
- ],
468
- "steps": [],
469
- "summary": "Create a payment record for installment 1"
470
- },
471
- "refund": {
472
- "agentDescription": "Return one whole installment 1 payment to the payer. The record must be paid, and the refund is always its full amount, so split a payment across records when a partial refund could be needed. This moves money back.",
473
- "effects": {
474
- "moves": [
475
- {
476
- "signature": "moves.transfer.internal",
477
- "source": "moves[0]"
478
- }
479
- ],
480
- "reads": [
481
- {
482
- "signature": "reads.requires_refs",
483
- "source": "requiresRefs"
484
- }
485
- ]
486
- },
487
- "moves": [
488
- {
489
- "bind": {
490
- "amount": {
491
- "from": "instance",
492
- "path": "fields.amount"
493
- },
494
- "currency": {
495
- "from": "instance",
496
- "path": "fields.currency"
497
- },
498
- "destinationAccountId": {
499
- "from": "instance",
500
- "path": "fields.repaymentSourceAccountId"
501
- },
502
- "metadata.instrumentId": {
503
- "from": "const",
504
- "value": "obligation_installment_1_payment"
505
- },
506
- "metadata.instrumentInstanceId": {
507
- "from": "instance",
508
- "path": "instrumentInstanceId"
509
- },
510
- "metadata.phase": {
511
- "from": "const",
512
- "value": "refund"
513
- },
514
- "productId": {
515
- "from": "instance",
516
- "path": "productId"
517
- },
518
- "sourceAccountId": {
519
- "from": "instance",
520
- "path": "fields.recipientAccountId"
521
- }
522
- },
523
- "capture": {
524
- "refundRefundTransferId": "transferId"
525
- },
526
- "key": "refund",
527
- "operation": "internal_transfer.create"
528
- }
529
- ],
530
- "publicAction": "refundObligationInstallment1Payment",
531
- "requiresRefs": [
532
- {
533
- "field": "obligationId",
534
- "match": {
535
- "fields.currency": "fields.currency",
536
- "fields.recipientAccountId": "fields.recipientAccountId",
537
- "fields.repaymentSourceAccountId": "fields.repaymentSourceAccountId"
538
- },
539
- "statuses": [
540
- "active",
541
- "installment_1_delinquent",
542
- "installment_2_delinquent"
543
- ]
544
- }
545
- ],
546
- "steps": [],
547
- "summary": "Refund this one stored installment 1 payment whole"
548
- },
549
- "repay": {
550
- "agentDescription": "Pay this record's amount toward installment 1. The record must be created and its obligation live. Refused when this amount plus the records already paid against that installment would pass the stored amount. This moves the payer's money. Where a mandate applies, only the payer may call it and an evidence reference is required.",
551
- "captureInput": {
552
- "mandateEvidenceReference": "evidenceReference"
553
- },
554
- "effects": {
555
- "decides": [
556
- {
557
- "signature": "decides.tenant_port",
558
- "source": "port"
559
- }
560
- ],
561
- "moves": [
562
- {
563
- "signature": "moves.transfer.internal",
564
- "source": "moves[0]"
565
- }
566
- ],
567
- "reads": [
568
- {
569
- "signature": "reads.requires_refs",
570
- "source": "requiresRefs"
571
- }
572
- ]
573
- },
574
- "input": {
575
- "additionalProperties": false,
576
- "properties": {
577
- "evidenceReference": {
578
- "description": "Required decision reference retained in the operation receipt",
579
- "maxLength": 180,
580
- "minLength": 1,
581
- "type": "string"
582
- }
583
- },
584
- "required": [
585
- "evidenceReference"
586
- ],
587
- "type": "object"
588
- },
589
- "moves": [
590
- {
591
- "bind": {
592
- "amount": {
593
- "from": "instance",
594
- "path": "fields.amount"
595
- },
596
- "currency": {
597
- "from": "instance",
598
- "path": "fields.currency"
599
- },
600
- "destinationAccountId": {
601
- "from": "instance",
602
- "path": "fields.recipientAccountId"
603
- },
604
- "metadata.instrumentId": {
605
- "from": "const",
606
- "value": "obligation_installment_1_payment"
607
- },
608
- "metadata.instrumentInstanceId": {
609
- "from": "instance",
610
- "path": "instrumentInstanceId"
611
- },
612
- "metadata.phase": {
613
- "from": "const",
614
- "value": "repay"
615
- },
616
- "productId": {
617
- "from": "instance",
618
- "path": "productId"
619
- },
620
- "sourceAccountId": {
621
- "from": "instance",
622
- "path": "fields.repaymentSourceAccountId"
623
- }
624
- },
625
- "capture": {
626
- "repayRepaymentTransferId": "transferId"
627
- },
628
- "key": "repayment",
629
- "operation": "internal_transfer.create"
630
- }
631
- ],
632
- "port": {
633
- "allowedParties": [
634
- "payer"
635
- ]
636
- },
637
- "publicAction": "repayObligationInstallment1Payment",
638
- "requiresExposure": [
639
- {
640
- "amountField": "amount",
641
- "anchorField": "obligationId",
642
- "capField": "installment1Amount",
643
- "capOnAnchor": true,
644
- "childInstrumentId": "obligation_installment_1_payment",
645
- "statuses": [
646
- "paid"
647
- ]
648
- }
649
- ],
650
- "requiresRefs": [
651
- {
652
- "field": "obligationId",
653
- "match": {
654
- "fields.currency": "fields.currency",
655
- "fields.recipientAccountId": "fields.recipientAccountId",
656
- "fields.repaymentSourceAccountId": "fields.repaymentSourceAccountId"
657
- },
658
- "statuses": [
659
- "active",
660
- "installment_1_delinquent",
661
- "installment_2_delinquent"
662
- ]
663
- }
664
- ],
665
- "steps": [],
666
- "summary": "Pay a partial or full amount against installment 1"
667
- }
668
- },
669
- "agentDescription": "One payment against installment 1 of the obligation. Payments can be partial, so create a record, repay it, and the parent installment closes once its paid records sum to the stored anchor amount.",
670
- "description": "One partial or full payment bound to installment 1 of obligation; the operation name fixes the anchor and obligationId fixes the obligation",
671
- "fields": {
672
- "amount": {
673
- "description": "Positive payment amount capped with its paid siblings at installment1Amount",
674
- "pattern": "^[1-9][0-9]{0,17}$",
675
- "type": "string"
676
- },
677
- "currency": {
678
- "description": "ISO 4217 currency code",
679
- "maxLength": 3,
680
- "minLength": 3,
681
- "pattern": "^[A-Z]{3}$",
682
- "type": "string"
683
- },
684
- "obligationId": {
685
- "description": "The exact obligation this payment belongs to",
686
- "pattern": "^obli_(sandbox|live)_[a-z0-9]{8,64}$",
687
- "type": "string"
688
- },
689
- "recipientAccountId": {
690
- "description": "The recipient account",
691
- "pattern": "^acct_(sandbox|live)_[a-z0-9]{8,64}$",
692
- "type": "string",
693
- "x-hyperscale-reference-filter": {
694
- "column": "role",
695
- "values": [
696
- "customer_balance"
697
- ]
698
- }
699
- },
700
- "repaymentSourceAccountId": {
701
- "description": "The repayment source account",
702
- "pattern": "^acct_(sandbox|live)_[a-z0-9]{8,64}$",
703
- "type": "string",
704
- "x-hyperscale-reference-filter": {
705
- "column": "role",
706
- "values": [
707
- "customer_balance"
708
- ]
709
- }
710
- }
711
- },
712
- "id": "obligation_installment_1_payment",
713
- "idPrefix": "zzaa",
714
- "lifecycle": {
715
- "initial": "created",
716
- "states": [
717
- "created",
718
- "paid",
719
- "refunded"
720
- ],
721
- "transitions": {
722
- "refund": {
723
- "from": [
724
- "paid"
725
- ],
726
- "to": "refunded"
727
- },
728
- "repay": {
729
- "from": [
730
- "created"
731
- ],
732
- "to": "paid"
733
- }
734
- }
735
- },
736
- "parties": {
737
- "beneficiary": "recipientAccountId",
738
- "payer": "repaymentSourceAccountId"
739
- },
740
- "required": [
741
- "recipientAccountId",
742
- "repaymentSourceAccountId",
743
- "amount",
744
- "currency",
745
- "obligationId"
746
- ],
747
- "summary": "Anchor-bound payment for installment 1",
748
- "title": "Obligation Installment 1 Payment"
749
- },
750
- {
751
- "actionOrder": [
752
- "create",
753
- "repay",
754
- "refund"
755
- ],
756
- "actions": {
757
- "create": {
758
- "agentDescription": "Open a payment record against installment 2. The parent obligation must be live. No money moves yet. Repay is what pays.",
759
- "effects": {
760
- "reads": [
761
- {
762
- "signature": "reads.requires_refs",
763
- "source": "requiresRefs"
764
- }
765
- ]
766
- },
767
- "moves": [],
768
- "publicAction": "createObligationInstallment2Payment",
769
- "requiresRefs": [
770
- {
771
- "bind": {
772
- "currency": "fields.currency",
773
- "recipientAccountId": "fields.recipientAccountId",
774
- "repaymentSourceAccountId": "fields.repaymentSourceAccountId"
775
- },
776
- "field": "obligationId",
777
- "statuses": [
778
- "active",
779
- "installment_1_delinquent",
780
- "installment_2_delinquent"
781
- ]
782
- }
783
- ],
784
- "steps": [],
785
- "summary": "Create a payment record for installment 2"
786
- },
787
- "refund": {
788
- "agentDescription": "Return one whole installment 2 payment to the payer. The record must be paid, and the refund is always its full amount, so split a payment across records when a partial refund could be needed. This moves money back.",
789
- "effects": {
790
- "moves": [
791
- {
792
- "signature": "moves.transfer.internal",
793
- "source": "moves[0]"
794
- }
795
- ],
796
- "reads": [
797
- {
798
- "signature": "reads.requires_refs",
799
- "source": "requiresRefs"
800
- }
801
- ]
802
- },
803
- "moves": [
804
- {
805
- "bind": {
806
- "amount": {
807
- "from": "instance",
808
- "path": "fields.amount"
809
- },
810
- "currency": {
811
- "from": "instance",
812
- "path": "fields.currency"
813
- },
814
- "destinationAccountId": {
815
- "from": "instance",
816
- "path": "fields.repaymentSourceAccountId"
817
- },
818
- "metadata.instrumentId": {
819
- "from": "const",
820
- "value": "obligation_installment_2_payment"
821
- },
822
- "metadata.instrumentInstanceId": {
823
- "from": "instance",
824
- "path": "instrumentInstanceId"
825
- },
826
- "metadata.phase": {
827
- "from": "const",
828
- "value": "refund"
829
- },
830
- "productId": {
831
- "from": "instance",
832
- "path": "productId"
833
- },
834
- "sourceAccountId": {
835
- "from": "instance",
836
- "path": "fields.recipientAccountId"
837
- }
838
- },
839
- "capture": {
840
- "refundRefundTransferId": "transferId"
841
- },
842
- "key": "refund",
843
- "operation": "internal_transfer.create"
844
- }
845
- ],
846
- "publicAction": "refundObligationInstallment2Payment",
847
- "requiresRefs": [
848
- {
849
- "field": "obligationId",
850
- "match": {
851
- "fields.currency": "fields.currency",
852
- "fields.recipientAccountId": "fields.recipientAccountId",
853
- "fields.repaymentSourceAccountId": "fields.repaymentSourceAccountId"
854
- },
855
- "statuses": [
856
- "active",
857
- "installment_1_delinquent",
858
- "installment_2_delinquent"
859
- ]
860
- }
861
- ],
862
- "steps": [],
863
- "summary": "Refund this one stored installment 2 payment whole"
864
- },
865
- "repay": {
866
- "agentDescription": "Pay this record's amount toward installment 2. The record must be created and its obligation live. Refused when this amount plus the records already paid against that installment would pass the stored amount. This moves the payer's money. Where a mandate applies, only the payer may call it and an evidence reference is required.",
867
- "captureInput": {
868
- "mandateEvidenceReference": "evidenceReference"
869
- },
870
- "effects": {
871
- "decides": [
872
- {
873
- "signature": "decides.tenant_port",
874
- "source": "port"
875
- }
876
- ],
877
- "moves": [
878
- {
879
- "signature": "moves.transfer.internal",
880
- "source": "moves[0]"
881
- }
882
- ],
883
- "reads": [
884
- {
885
- "signature": "reads.requires_refs",
886
- "source": "requiresRefs"
887
- }
888
- ]
889
- },
890
- "input": {
891
- "additionalProperties": false,
892
- "properties": {
893
- "evidenceReference": {
894
- "description": "Required decision reference retained in the operation receipt",
895
- "maxLength": 180,
896
- "minLength": 1,
897
- "type": "string"
898
- }
899
- },
900
- "required": [
901
- "evidenceReference"
902
- ],
903
- "type": "object"
904
- },
905
- "moves": [
906
- {
907
- "bind": {
908
- "amount": {
909
- "from": "instance",
910
- "path": "fields.amount"
911
- },
912
- "currency": {
913
- "from": "instance",
914
- "path": "fields.currency"
915
- },
916
- "destinationAccountId": {
917
- "from": "instance",
918
- "path": "fields.recipientAccountId"
919
- },
920
- "metadata.instrumentId": {
921
- "from": "const",
922
- "value": "obligation_installment_2_payment"
923
- },
924
- "metadata.instrumentInstanceId": {
925
- "from": "instance",
926
- "path": "instrumentInstanceId"
927
- },
928
- "metadata.phase": {
929
- "from": "const",
930
- "value": "repay"
931
- },
932
- "productId": {
933
- "from": "instance",
934
- "path": "productId"
935
- },
936
- "sourceAccountId": {
937
- "from": "instance",
938
- "path": "fields.repaymentSourceAccountId"
939
- }
940
- },
941
- "capture": {
942
- "repayRepaymentTransferId": "transferId"
943
- },
944
- "key": "repayment",
945
- "operation": "internal_transfer.create"
946
- }
947
- ],
948
- "port": {
949
- "allowedParties": [
950
- "payer"
951
- ]
952
- },
953
- "publicAction": "repayObligationInstallment2Payment",
954
- "requiresExposure": [
955
- {
956
- "amountField": "amount",
957
- "anchorField": "obligationId",
958
- "capField": "installment2Amount",
959
- "capOnAnchor": true,
960
- "childInstrumentId": "obligation_installment_2_payment",
961
- "statuses": [
962
- "paid"
963
- ]
964
- }
965
- ],
966
- "requiresRefs": [
967
- {
968
- "field": "obligationId",
969
- "match": {
970
- "fields.currency": "fields.currency",
971
- "fields.recipientAccountId": "fields.recipientAccountId",
972
- "fields.repaymentSourceAccountId": "fields.repaymentSourceAccountId"
973
- },
974
- "statuses": [
975
- "active",
976
- "installment_1_delinquent",
977
- "installment_2_delinquent"
978
- ]
979
- }
980
- ],
981
- "steps": [],
982
- "summary": "Pay a partial or full amount against installment 2"
983
- }
984
- },
985
- "agentDescription": "One payment against installment 2 of the obligation. Payments can be partial, so create a record, repay it, and the parent installment closes once its paid records sum to the stored anchor amount.",
986
- "description": "One partial or full payment bound to installment 2 of obligation; the operation name fixes the anchor and obligationId fixes the obligation",
987
- "fields": {
988
- "amount": {
989
- "description": "Positive payment amount capped with its paid siblings at installment2Amount",
990
- "pattern": "^[1-9][0-9]{0,17}$",
991
- "type": "string"
992
- },
993
- "currency": {
994
- "description": "ISO 4217 currency code",
995
- "maxLength": 3,
996
- "minLength": 3,
997
- "pattern": "^[A-Z]{3}$",
998
- "type": "string"
999
- },
1000
- "obligationId": {
1001
- "description": "The exact obligation this payment belongs to",
1002
- "pattern": "^obli_(sandbox|live)_[a-z0-9]{8,64}$",
1003
- "type": "string"
1004
- },
1005
- "recipientAccountId": {
1006
- "description": "The recipient account",
1007
- "pattern": "^acct_(sandbox|live)_[a-z0-9]{8,64}$",
1008
- "type": "string",
1009
- "x-hyperscale-reference-filter": {
1010
- "column": "role",
1011
- "values": [
1012
- "customer_balance"
1013
- ]
1014
- }
1015
- },
1016
- "repaymentSourceAccountId": {
1017
- "description": "The repayment source account",
1018
- "pattern": "^acct_(sandbox|live)_[a-z0-9]{8,64}$",
1019
- "type": "string",
1020
- "x-hyperscale-reference-filter": {
1021
- "column": "role",
1022
- "values": [
1023
- "customer_balance"
1024
- ]
1025
- }
1026
- }
1027
- },
1028
- "id": "obligation_installment_2_payment",
1029
- "idPrefix": "zzab",
1030
- "lifecycle": {
1031
- "initial": "created",
1032
- "states": [
1033
- "created",
1034
- "paid",
1035
- "refunded"
1036
- ],
1037
- "transitions": {
1038
- "refund": {
1039
- "from": [
1040
- "paid"
1041
- ],
1042
- "to": "refunded"
1043
- },
1044
- "repay": {
1045
- "from": [
1046
- "created"
1047
- ],
1048
- "to": "paid"
1049
- }
1050
- }
1051
- },
1052
- "parties": {
1053
- "beneficiary": "recipientAccountId",
1054
- "payer": "repaymentSourceAccountId"
1055
- },
1056
- "required": [
1057
- "recipientAccountId",
1058
- "repaymentSourceAccountId",
1059
- "amount",
1060
- "currency",
1061
- "obligationId"
1062
- ],
1063
- "summary": "Anchor-bound payment for installment 2",
1064
- "title": "Obligation Installment 2 Payment"
1065
- },
1066
- {
1067
- "actionOrder": [
1068
- "create",
1069
- "collect",
1070
- "end"
1071
- ],
1072
- "actions": {
1073
- "collect": {
1074
- "agentDescription": "Record one due installment as collected. The collection must still be active, and it stays active afterwards so the next installment can follow. It moves no money.",
1075
- "moves": [],
1076
- "publicAction": "collectCollection",
1077
- "steps": [],
1078
- "summary": "Collect one due installment"
1079
- },
1080
- "create": {
1081
- "agentDescription": "Open the collection so installments can be recorded against it. This is the first call and the collection starts active. It moves no money.",
1082
- "moves": [],
1083
- "publicAction": "createCollection",
1084
- "steps": [],
1085
- "summary": "Create a bounded recurring collection"
1086
- },
1087
- "end": {
1088
- "agentDescription": "Close the collection so no further installment can be recorded. Only an active collection can end, and ended is final. It moves no money.",
1089
- "moves": [],
1090
- "publicAction": "endCollection",
1091
- "steps": [],
1092
- "summary": "End future collections"
1093
- }
1094
- },
1095
- "agentDescription": "Reach for collection to track a bounded run of scheduled collections, one call per recorded installment. It carries no amount and no account, and every action only advances its own state. A settlement that debits an account on a schedule is a different shape.",
1096
- "fields": {},
1097
- "id": "collection",
1098
- "idPrefix": "coll",
1099
- "lifecycle": {
1100
- "initial": "active",
1101
- "states": [
1102
- "active",
1103
- "ended"
1104
- ],
1105
- "transitions": {
1106
- "collect": {
1107
- "from": [
1108
- "active"
1109
- ],
1110
- "to": "active"
1111
- },
1112
- "end": {
1113
- "from": [
1114
- "active"
1115
- ],
1116
- "to": "ended"
1117
- }
1118
- }
1119
- },
1120
- "required": [],
1121
- "summary": "Collection instrument",
1122
- "title": "Collection"
1123
- }
1124
- ],
1125
- "product": "recurring_collection_example",
1126
- "subjects": [],
1127
- "title": "Recurring collection example",
1128
- "udl": 1,
1129
- "version": 1
1130
- }