@hyperscale0/hsx 1.0.0 → 2.0.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 (166) hide show
  1. package/CHANGELOG.md +28 -4
  2. package/README.md +58 -38
  3. package/dist/src/ast.d.ts +4 -2
  4. package/dist/src/ast.d.ts.map +1 -1
  5. package/dist/src/cli.d.ts +1 -1
  6. package/dist/src/cli.js.map +1 -1
  7. package/dist/src/compile.d.ts +8 -2
  8. package/dist/src/compile.d.ts.map +1 -1
  9. package/dist/src/compile.js +8 -1
  10. package/dist/src/compile.js.map +1 -1
  11. package/dist/src/cost.d.ts +3 -1
  12. package/dist/src/cost.d.ts.map +1 -1
  13. package/dist/src/cost.js +124 -94
  14. package/dist/src/cost.js.map +1 -1
  15. package/dist/src/diagnostics.d.ts.map +1 -1
  16. package/dist/src/diagnostics.js +96 -5
  17. package/dist/src/diagnostics.js.map +1 -1
  18. package/dist/src/emit.d.ts +3 -1
  19. package/dist/src/emit.d.ts.map +1 -1
  20. package/dist/src/emit.js +27 -10
  21. package/dist/src/emit.js.map +1 -1
  22. package/dist/src/format.js.map +1 -1
  23. package/dist/src/index.d.ts +2 -2
  24. package/dist/src/index.d.ts.map +1 -1
  25. package/dist/src/index.js +1 -1
  26. package/dist/src/index.js.map +1 -1
  27. package/dist/src/ir.d.ts.map +1 -1
  28. package/dist/src/lex.d.ts.map +1 -1
  29. package/dist/src/lsp/server.js.map +1 -1
  30. package/dist/src/modules.js +7 -3
  31. package/dist/src/modules.js.map +1 -1
  32. package/dist/src/parse.js +3 -3
  33. package/dist/src/parse.js.map +1 -1
  34. package/dist/src/std-bundle.js +41 -41
  35. package/dist/src/std-bundle.js.map +1 -1
  36. package/dist/src/std-library.js +2 -2
  37. package/dist/src/typecheck.d.ts.map +1 -1
  38. package/dist/src/typecheck.js +948 -157
  39. package/dist/src/typecheck.js.map +1 -1
  40. package/dist/src/version.d.ts +1 -1
  41. package/dist/src/version.js +1 -1
  42. package/docs/README.md +10 -1
  43. package/docs/assets/hsx.svg +18 -0
  44. package/docs/guide/01-first-program.md +1 -1
  45. package/docs/guide/02-money.md +1 -1
  46. package/docs/guide/03-instruments.md +44 -3
  47. package/docs/guide/04-lifecycles.md +18 -3
  48. package/docs/guide/05-fees-and-splits.md +2 -2
  49. package/docs/guide/06-schedules.md +1 -1
  50. package/docs/guide/07-composition.md +8 -2
  51. package/docs/guide/08-writing-a-module.md +13 -2
  52. package/docs/guide/09-cost.md +3 -3
  53. package/docs/guide/10-diagnostics.md +1 -1
  54. package/docs/llms-full.txt +473 -190
  55. package/docs/llms.txt +2 -2
  56. package/docs/playground.md +4 -3
  57. package/docs/reference/cli.md +2 -2
  58. package/docs/reference/diagnostics.md +243 -37
  59. package/docs/reference/grammar.md +2 -2
  60. package/docs/reference/std/advance.md +2 -2
  61. package/docs/reference/std/cancellable_booking.md +10 -10
  62. package/docs/reference/std/captured_payment.md +14 -14
  63. package/docs/reference/std/conditional_disbursement.md +3 -3
  64. package/docs/reference/std/credit_facility.md +2 -2
  65. package/docs/reference/std/held_payment.md +37 -33
  66. package/docs/reference/std/instant_transfer.md +8 -8
  67. package/docs/reference/std/metered.md +2 -2
  68. package/docs/reference/std/pooled_split.md +2 -2
  69. package/docs/reference/std/premium_forward.md +13 -13
  70. package/docs/reference/std/reconciled_payout.md +2 -2
  71. package/docs/reference/std/recurring_collection.md +2 -2
  72. package/docs/reference/std/rotating_pool.md +2 -2
  73. package/docs/reference/std/scheduled.md +18 -18
  74. package/docs/reference/std/security_deposit.md +14 -14
  75. package/docs/reference/std/settlement_batch.md +2 -2
  76. package/docs/reference/std/swap.md +18 -18
  77. package/docs/reference/std/threshold_pool.md +2 -2
  78. package/docs/reference/std/weighted_distribution.md +2 -2
  79. package/docs/reference/types.md +1 -1
  80. package/docs/reference/udl-output.md +1 -1
  81. package/examples/01-first-program/README.md +1 -1
  82. package/examples/01-first-program/tip-jar.hsx +1 -1
  83. package/examples/02-imports-and-archetypes/photo-booth.hsx +1 -1
  84. package/examples/03-diagnostics/corner-shop-fixed.hsx +1 -1
  85. package/examples/03-diagnostics/corner-shop.hsx +1 -1
  86. package/examples/04-complete-product/study-hall.hsx +1 -1
  87. package/examples/05-watch-club/README.md +0 -3
  88. package/examples/05-watch-club/watch-club.hsx +1 -1
  89. package/examples/README.md +35 -4
  90. package/examples/advance/advance.hsx +1 -1
  91. package/examples/advance/advance.udl +16 -11
  92. package/examples/cancellable_booking/cancellable_booking.hsx +1 -1
  93. package/examples/cancellable_booking/cancellable_booking.udl +13 -11
  94. package/examples/captured_payment/captured_payment.hsx +1 -1
  95. package/examples/captured_payment/captured_payment.udl +10 -7
  96. package/examples/conditional_disbursement/conditional_disbursement.hsx +1 -1
  97. package/examples/conditional_disbursement/conditional_disbursement.udl +7 -5
  98. package/examples/cost-table.json +1542 -382
  99. package/examples/credit_facility/credit_facility.hsx +1 -1
  100. package/examples/credit_facility/credit_facility.udl +26 -19
  101. package/examples/held_payment/held_payment.hsx +1 -1
  102. package/examples/held_payment/held_payment.udl +61 -15
  103. package/examples/instant_transfer/instant_transfer.hsx +1 -1
  104. package/examples/instant_transfer/instant_transfer.udl +17 -11
  105. package/examples/metered/metered.hsx +1 -1
  106. package/examples/metered/metered.udl +8 -6
  107. package/examples/pooled_split/pooled_split.hsx +1 -1
  108. package/examples/pooled_split/pooled_split.udl +16 -13
  109. package/examples/premium_forward/premium_forward.hsx +1 -1
  110. package/examples/premium_forward/premium_forward.udl +22 -16
  111. package/examples/reconciled_payout/reconciled_payout.hsx +1 -1
  112. package/examples/reconciled_payout/reconciled_payout.udl +4 -2
  113. package/examples/recurring_collection/recurring_collection.hsx +1 -1
  114. package/examples/recurring_collection/recurring_collection.udl +20 -15
  115. package/examples/rotating_pool/rotating_pool.hsx +1 -1
  116. package/examples/rotating_pool/rotating_pool.udl +92 -82
  117. package/examples/scheduled/scheduled.hsx +1 -1
  118. package/examples/scheduled/scheduled.udl +15 -10
  119. package/examples/security_deposit/security_deposit.hsx +1 -1
  120. package/examples/security_deposit/security_deposit.udl +19 -5
  121. package/examples/settlement_batch/settlement_batch.hsx +1 -1
  122. package/examples/swap/swap.hsx +1 -1
  123. package/examples/swap/swap.udl +34 -28
  124. package/examples/threshold_pool/threshold_pool.hsx +1 -1
  125. package/examples/threshold_pool/threshold_pool.udl +14 -12
  126. package/examples/weighted_distribution/weighted_distribution.hsx +1 -1
  127. package/examples/weighted_distribution/weighted_distribution.udl +6 -4
  128. package/package.json +6 -5
  129. package/skills/hsx/SKILL.md +26 -26
  130. package/src/ast.ts +4 -2
  131. package/src/cli.ts +4 -4
  132. package/src/compile.ts +14 -3
  133. package/src/cost.ts +176 -104
  134. package/src/diagnostics.ts +99 -4
  135. package/src/emit.ts +32 -18
  136. package/src/index.ts +2 -1
  137. package/src/modules.ts +9 -3
  138. package/src/parse.ts +3 -3
  139. package/src/std-bundle.ts +41 -41
  140. package/src/std-library.ts +2 -2
  141. package/src/typecheck.ts +1251 -235
  142. package/src/version.ts +1 -1
  143. package/std/SEMANTICS.md +12 -3
  144. package/std/{settlements → money_flows}/advance.hsx +1 -1
  145. package/std/{settlements → money_flows}/cancellable_booking.hsx +4 -3
  146. package/std/{settlements → money_flows}/captured_payment.hsx +35 -6
  147. package/std/{settlements → money_flows}/conditional_disbursement.hsx +17 -16
  148. package/std/{settlements → money_flows}/credit_facility.hsx +1 -2
  149. package/std/{settlements → money_flows}/held_payment.hsx +61 -25
  150. package/std/money_flows/index.hsx +3 -0
  151. package/std/{settlements → money_flows}/instant_transfer.hsx +2 -3
  152. package/std/{settlements → money_flows}/metered.hsx +1 -1
  153. package/std/{settlements → money_flows}/pooled_split.hsx +3 -3
  154. package/std/{settlements → money_flows}/premium_forward.hsx +22 -23
  155. package/std/{settlements → money_flows}/reconciled_payout.hsx +3 -3
  156. package/std/{settlements → money_flows}/recurring_collection.hsx +1 -1
  157. package/std/{settlements → money_flows}/rotating_pool.hsx +8 -6
  158. package/std/{settlements → money_flows}/scheduled.hsx +22 -27
  159. package/std/{settlements → money_flows}/security_deposit.hsx +38 -14
  160. package/std/{settlements → money_flows}/settlement_batch.hsx +3 -3
  161. package/std/{settlements → money_flows}/swap.hsx +41 -16
  162. package/std/{settlements → money_flows}/threshold_pool.hsx +5 -5
  163. package/std/{settlements → money_flows}/weighted_distribution.hsx +6 -6
  164. package/docs/sessions/2026-09-02-two-instruments.hsx +0 -21
  165. package/docs/sessions/2026-09-02-two-instruments.md +0 -41
  166. package/std/settlements/index.hsx +0 -3
@@ -1,4 +1,4 @@
1
- <!-- Generated by scripts/docs/build.ts for HSX 1.0.0. Do not edit. -->
1
+ <!-- Generated by scripts/docs/build.ts for HSX 2.0.1. Do not edit. -->
2
2
 
3
3
  # HSX full documentation
4
4
 
@@ -10,7 +10,7 @@ This program sends a tip from a listener to a host:
10
10
 
11
11
  ```hsx
12
12
  program tip_jar "Tip jar"
13
- import { instant_transfer } from "std/settlements"
13
+ import { instant_transfer } from "std/money_flows"
14
14
  party listener: person
15
15
  party host: business
16
16
  settlement tip = instant_transfer {
@@ -29,7 +29,7 @@ After package installation, run `npx hsx check product.hsx` while editing and `n
29
29
 
30
30
  # Money
31
31
 
32
- HSX indexes money by currency. `money<SAR>` is the field type inside a general instrument. `amount: total: money(SAR)` binds a settlement parameter to a new SAR money field. Values use integer minor units, so `1250` means SAR 12.50.
32
+ HSX indexes money by currency. `money<SAR>` is the field type inside a general instrument. `amount: total: money(SAR)` binds a settlement parameter to a new SAR money field. Values use integer minor units, so `1250` means SAR 12.50. The emitted UDL field keeps the currency as `x-hyperscale-currency`, which is how the platform learns a program's ledger currency.
33
33
 
34
34
  Money of different currencies never unifies. Percent literals use basis-point precision: `2%` is 200 basis points and `2.5%` is 250 basis points. The compiler floors percentage-derived minor units and assigns any declared remainder according to the selected instrument.
35
35
 
@@ -55,11 +55,11 @@ Do not use free arithmetic to repair a linearity refusal. Choose a standard-libr
55
55
 
56
56
  # Instruments
57
57
 
58
- Start with the standard library. Import a settlement module by export name from `std/settlements`, then apply it under a local settlement name. The local name becomes the emitted instrument id.
58
+ Start with the money flows library (open/hsx/std). Import a money flow by export name from `std/money_flows`, then apply it under a local settlement name. The local name becomes the emitted instrument id.
59
59
 
60
60
  ```hsx
61
61
  program equipment_hire "Equipment hire"
62
- import { scheduled } from "std/settlements"
62
+ import { scheduled } from "std/money_flows"
63
63
  party renter: person
64
64
  party owner: business
65
65
  settlement installments = scheduled {
@@ -74,7 +74,48 @@ settlement installments = scheduled {
74
74
 
75
75
  Required parameters state the instrument's core contract. Optional parameters add bounded behavior such as a deadline, cancellation allocation, fee, or policy. Omit an optional block when the product does not need it. Do not pass an empty block as a substitute unless the module documents that form.
76
76
 
77
- The generated standard-library reference lists every module, parameter, action, port, and emitted clause. Read that page before choosing a module. Prefer one module that already states the required lifecycle over a custom instrument with copied mechanics.
77
+ The generated money flows reference lists every module, parameter, action, port, and emitted clause. Read that page before choosing a module. Prefer one module that already states the required lifecycle over a custom instrument with copied mechanics.
78
+
79
+ ## Account fields
80
+
81
+ When declaring fields of type `account<C>`, the HSX compiler automatically lowers the field schema with the UDL2002 account pattern (`^acct_(sandbox|live)_[a-z0-9]{8,64}$`). Authors do not need to write an explicit `pattern` clause on account fields.
82
+
83
+ ```hsx
84
+ fields {
85
+ customerAccountId: account<SAR>;
86
+ amount: money<SAR>;
87
+ }
88
+ ```
89
+
90
+ ## Port declarations and action clauses
91
+
92
+ HSX supports two distinct port syntaxes depending on scope:
93
+
94
+ 1. **Top-level port declarations** declare a named port at program scope using `allowed: [...]`.
95
+ 2. **Action-level port clauses** define caller permissions directly inside an instrument action using `allowed_parties: [...]`.
96
+
97
+ Top-level port declaration:
98
+
99
+ ```hsx
100
+ port confirm_delivery {
101
+ allowed: [buyer];
102
+ }
103
+ ```
104
+
105
+ Action-level port clause:
106
+
107
+ ```hsx
108
+ action release {
109
+ agent_description: "Release escrowed funds to the payee."
110
+ steps: [];
111
+ moves: [];
112
+ port {
113
+ allowed_parties: [payer];
114
+ }
115
+ }
116
+ ```
117
+
118
+ Writing `allowed:` inside an action-level `port` clause triggers diagnostic `HSX1508`. Use `allowed_parties: [...]` inside action clauses, and reserve `allowed: [...]` for top-level port declarations.
78
119
 
79
120
  # Lifecycles
80
121
 
@@ -83,6 +124,7 @@ A lifecycle lists every state, names one initial state, and declares action tran
83
124
  ```hsx
84
125
  program approvals "Approvals"
85
126
  instrument approval {
127
+ agent_description: "Manage a bounded approval decision across pending, approved, and rejected states."
86
128
  title: "Approval"
87
129
  summary: "A bounded approval decision"
88
130
  fields {}
@@ -92,12 +134,26 @@ instrument approval {
92
134
  on approve: pending -> approved;
93
135
  on reject: pending -> rejected;
94
136
  }
95
- action create { steps: []; moves: []; }
96
- action approve { steps: []; moves: []; }
97
- action reject { steps: []; moves: []; }
137
+ action create {
138
+ agent_description: "Create an approval record in pending state."
139
+ steps: [];
140
+ moves: [];
141
+ }
142
+ action approve {
143
+ agent_description: "Approve the pending decision."
144
+ steps: [];
145
+ moves: [];
146
+ }
147
+ action reject {
148
+ agent_description: "Reject the pending decision."
149
+ steps: [];
150
+ moves: [];
151
+ }
98
152
  }
99
153
  ```
100
154
 
155
+ Every callable custom instrument action becomes an agent tool and requires an `agent_description` string. Instruments that declare callable actions also require an `agent_description` string. Actions that declare a `due` clause are exempt system actions that run on a schedule instead of an agent call. The compiler emits `HSX1509` when an author omits `agent_description` on an instrument or callable action.
156
+
101
157
  Standard-library instruments bind ports to caller decisions. A deadline appears as stored date data and a `due` clause on the action that may run at that date. An unwind states how a failed or cancelled path drains held value. The compiler refuses a reachable exit that strands money.
102
158
 
103
159
  Keep lifecycle changes additive after composition. Add a new action or state when old instances can still obey the previous contract. Do not rename a state or tighten an active transition in place.
@@ -108,7 +164,7 @@ Standard-library payment modules accept bounded fee forms. A payer fee sits on t
108
164
 
109
165
  ```hsx
110
166
  program lesson_market "Lesson market"
111
- import { instant_transfer, pooled_split } from "std/settlements"
167
+ import { instant_transfer, pooled_split } from "std/money_flows"
112
168
  party student: person
113
169
  party tutor: business
114
170
  party assistant: business
@@ -133,7 +189,7 @@ Every percentage partition must total 100 percent. `pooled_split` distributes a
133
189
 
134
190
  ```hsx
135
191
  program studio_booking "Studio booking"
136
- import { cancellable_booking } from "std/settlements"
192
+ import { cancellable_booking } from "std/money_flows"
137
193
  party guest: person
138
194
  party studio: business
139
195
  settlement session = cancellable_booking {
@@ -154,7 +210,7 @@ HSX schedules are finite. A literal `count`, an interval, and a first due date l
154
210
 
155
211
  ```hsx
156
212
  program installments "Installments"
157
- import { scheduled } from "std/settlements"
213
+ import { scheduled } from "std/money_flows"
158
214
  party buyer: person
159
215
  party seller: business
160
216
  settlement plan = scheduled {
@@ -177,7 +233,7 @@ One program can apply several instruments. Each instrument keeps its own lifecyc
177
233
 
178
234
  ```hsx
179
235
  program studio_sales "Studio sales"
180
- import { instant_transfer, scheduled } from "std/settlements"
236
+ import { instant_transfer, scheduled } from "std/money_flows"
181
237
  party buyer: person
182
238
  party studio: business
183
239
  settlement purchase = instant_transfer {
@@ -204,7 +260,7 @@ Keep each money route in one instrument. Connect instruments with evidence and r
204
260
 
205
261
  ```hsx
206
262
  program supplier_payment "Supplier payment"
207
- import { reconciled_payout } from "std/settlements"
263
+ import { reconciled_payout } from "std/money_flows"
208
264
  party treasury: business
209
265
  party supplier: business
210
266
  settlement payout = reconciled_payout {
@@ -218,6 +274,12 @@ settlement payout = reconciled_payout {
218
274
  }
219
275
  ```
220
276
 
277
+ ## Recomposition and exposed actions
278
+
279
+ When evolving an existing Product with new instruments or flows, the composer plans the candidate program against the active Product Build.
280
+
281
+ Public action exposures preserve stable semantic identities across builds. Unchanged authored instruments and catalog instruments retain their exposures without false removal and re-addition churn. Only genuinely new, removed, or rebound action aliases appear in the exposure delta.
282
+
221
283
  # Writing a module
222
284
 
223
285
  A module is ordinary HSX source. It declares a dotted module name and exports templates, types, constants, subjects, or applications. The compiler does not branch on a standard-library module name.
@@ -225,6 +287,7 @@ A module is ordinary HSX source. It declares a dotted module name and exports te
225
287
  ```hsx
226
288
  program approval_example "Approval example"
227
289
  instrument approval() {
290
+ agent_description: "Reusable approval lifecycle template."
228
291
  title: "Approval"
229
292
  summary: "A reusable approval lifecycle"
230
293
  fields {}
@@ -233,12 +296,22 @@ instrument approval() {
233
296
  initial pending;
234
297
  on approve: pending -> approved;
235
298
  }
236
- action create { steps: []; moves: []; }
237
- action approve { steps: []; moves: []; }
299
+ action create {
300
+ agent_description: "Create a pending approval record."
301
+ steps: [];
302
+ moves: [];
303
+ }
304
+ action approve {
305
+ agent_description: "Approve the pending decision."
306
+ steps: [];
307
+ moves: [];
308
+ }
238
309
  }
239
310
  instrument review = approval()
240
311
  ```
241
312
 
313
+ Custom instruments and callable actions require `agent_description: "..."`. An agent uses these descriptions as tool instructions when invoking actions on an instance. Actions that declare a `due` clause run without an agent call and remain exempt from this requirement. Omitting `agent_description` on callable actions or their containing instruments triggers `HSX1509`.
314
+
242
315
  A parameter list makes an instrument a template, including an empty list. A concrete instrument without a parameter list emits directly when its file compiles. Export only the declarations that callers need.
243
316
 
244
317
  Imported exports carry the local declarations they reference. Identical declarations unify. Conflicting declarations report `HSX1009`. Keep module parameters typed, keep loops finite, and use UDL clause vocabulary for instrument and action mechanics.
@@ -251,7 +324,7 @@ Compilation emits a deterministic cost manifest beside the UDL document. The man
251
324
 
252
325
  ```hsx
253
326
  program direct_sale "Direct sale"
254
- import { instant_transfer } from "std/settlements"
327
+ import { instant_transfer } from "std/money_flows"
255
328
  party buyer: person
256
329
  party seller: business
257
330
  settlement sale = instant_transfer {
@@ -264,9 +337,9 @@ settlement sale = instant_transfer {
264
337
 
265
338
  Read an action line as `instrument.action`, followed by the effect signature and its count. The payer tells whether the product or end customer bears the row. `perEventMinor` prices one occurrence in the cost table's billing currency. A row with `bps` also names a volume meter.
266
339
 
267
- The monthly estimate is an expression over declared meter variables. Billing supplies observed readings to that frozen expression. Recomposition emits a new manifest for the next commercial snapshot. It does not rewrite a prior manifest.
340
+ The monthly estimate is an expression over declared meter variables. Billing supplies observed readings to that frozen expression. Recomposition emits a new manifest for the next commercial snapshot. It does not rewrite a prior manifest. During recomposition planning, compose plan calculates the candidate program's proposed estimate and reconciles it against the current Build's frozen pricing quote. The existing Product retains its frozen quote until the recomposition is applied.
268
341
 
269
- An effect without a price row reports `HSX1301`. An invalid price reports `HSX1302`. A missing cost table also reports `HSX1301`. Use the single rate card shipped at `examples/cost-table.json`; do not create a second table for documentation.
342
+ An effect without a price row reports `HSX1301`. An invalid price reports `HSX1302`. A missing cost table also reports `HSX1301`. `examples/cost-table.json` ships one rate card per priced billing currency; the compiler picks the card whose currency the program's money fields move. Money in a currency no card prices reports `HSX1304`, and money in two currencies reports `HSX1305`: a program bills in one ledger currency. A move of a `money<SAR>` field moves SAR whatever the caller wrote in the instance currency field: the compiler pins the move's currency binding to the constant, and a binding it cannot pin reports `HSX1306`. Do not create another table for documentation.
270
343
 
271
344
  Do not confuse an action `quote` with the commercial cost manifest. `cancellable_booking.cancel` quotes a customer-visible cancellation penalty and `confirm` commits it. The compiler counts an instrument that carries a quote as unwind work because an expired or abandoned offer still needs bounded cleanup. The cost manifest prices that runtime work from the shipped rate card. It does not replace, spend, or alter the quoted financial amount.
272
345
 
@@ -285,7 +358,7 @@ Use one loop: compile, find the first error code in the diagnostics reference, a
285
358
 
286
359
  ```hsx
287
360
  program repaired_transfer "Repaired transfer"
288
- import { instant_transfer } from "std/settlements"
361
+ import { instant_transfer } from "std/money_flows"
289
362
  party sender: person
290
363
  party recipient: business
291
364
  settlement transfer = instant_transfer {
@@ -301,7 +374,7 @@ Exit code `0` means the command accepted the program. Exit code `1` means compil
301
374
  # CLI
302
375
 
303
376
  ```text
304
- hsx 1.0.0, the HSX compiler
377
+ hsx 2.0.1, the HSX compiler
305
378
 
306
379
  Usage:
307
380
  hsx check <file.hsx> [--strict]
@@ -364,9 +437,13 @@ Fix: Keep exactly one program declaration.
364
437
  ```hsx expect=HSX1002
365
438
  program catalog_probe "Catalog probe"
366
439
  instrument probe {
367
- fields {}
440
+ agent_description: "Probe instrument for catalog diagnostics.";
441
+ fields { }
368
442
  lifecycle { states created; initial created; }
369
- action create { steps: []; }
443
+ action create {
444
+ agent_description: "Create a probe instance.";
445
+ steps: [];
446
+ }
370
447
 
371
448
  }
372
449
  program second "Second"
@@ -391,9 +468,13 @@ Fix: Keep one declaration or give each declaration a distinct name.
391
468
  ```hsx expect=HSX1004
392
469
  program catalog_probe "Catalog probe"
393
470
  instrument probe {
394
- fields {}
471
+ agent_description: "Probe instrument for catalog diagnostics.";
472
+ fields { }
395
473
  lifecycle { states created; initial created; }
396
- action create { steps: []; }
474
+ action create {
475
+ agent_description: "Create a probe instance.";
476
+ steps: [];
477
+ }
397
478
 
398
479
  }
399
480
  instrument probe { fields {}; lifecycle { states created; initial created; }; action create { steps: []; }; }
@@ -439,9 +520,13 @@ Fix: Complete the declaration and bind every referenced decision port.
439
520
  ```hsx expect=HSX1008
440
521
  program catalog_probe "Catalog probe"
441
522
  instrument probe {
442
- fields {}
523
+ agent_description: "Probe instrument for catalog diagnostics.";
524
+ fields { }
443
525
  lifecycle { states created; initial created; }
444
- action create { steps: []; }
526
+ action create {
527
+ agent_description: "Create a probe instance.";
528
+ steps: [];
529
+ }
445
530
 
446
531
  }
447
532
  subject vehicle { title: "Vehicle"; }
@@ -564,11 +649,11 @@ Fix: Expose an action on an explicitly used published instrument.
564
649
 
565
650
  No source-only witness exists. This refusal requires a compiler-host published catalog.
566
651
 
567
- ## HSX1022: Authored instrument in a composition
652
+ ## HSX1022: Authored instrument collides with published catalog
568
653
 
569
654
  Stage: `typecheck`
570
655
 
571
- Fix: Publish the instrument separately, then select it with use.
656
+ Fix: Rename the authored instrument to avoid colliding with published catalog instruments.
572
657
 
573
658
  No source-only witness exists. This refusal requires a compiler-host published catalog.
574
659
 
@@ -581,13 +666,61 @@ Fix: List declared, non-optional field names once each.
581
666
  ```hsx expect=HSX1023
582
667
  program catalog_probe "Catalog probe"
583
668
  instrument probe {
584
- fields {}
669
+ agent_description: "Probe instrument for catalog diagnostics.";
670
+ fields { }
585
671
  lifecycle { states created; initial created; }
586
- action create { steps: []; }
672
+ action create {
673
+ agent_description: "Create a probe instance.";
674
+ steps: [];
675
+ }
587
676
  required: missing;
588
677
  }
589
678
  ```
590
679
 
680
+ ## HSX1024: Decision party has no matching account binding
681
+
682
+ Stage: `typecheck`
683
+
684
+ Fix: Bind the allowed party to an account field and use that binding in the decision action.
685
+
686
+ ```hsx expect=HSX1024
687
+ program decision_binding "Decision binding"
688
+ party buyer: person
689
+ party seller: business
690
+ port approve { allowed: [buyer] }
691
+ instrument gated(decision: condition) {
692
+ fields {}
693
+ parties { payer: seller }
694
+ lifecycle { states created done; initial created; on approve: created -> done; }
695
+ action create { steps: []; }
696
+ action [decision] { steps: []; port { allowed_parties: [payer]; } }
697
+ }
698
+ instrument gate = gated(decision: port approve)
699
+ ```
700
+
701
+ ## HSX1025: Unknown decision port shape type
702
+
703
+ Stage: `typecheck`
704
+
705
+ Fix: Declare the shape field as text, money(CUR), date, integer, boolean, account(CUR), ref<instrument_id>, id(instrument_id), bps, or percent.
706
+
707
+ ```hsx expect=HSX1025
708
+ program catalog_probe "Catalog probe"
709
+ import { security_deposit } from "std/money_flows"
710
+ party buyer: person
711
+ party seller: business
712
+ settlement hold = security_deposit {
713
+ payer: buyer
714
+ holder: seller
715
+ amount: depositAmount: money(SAR)
716
+ claim: port report_damage
717
+ claim_amount: { field: damageAmount, bound: depositAmount, remainder: return }
718
+ return: port pass_inspection
719
+ }
720
+ port report_damage { allowed: [seller] shape { damageAmount: money(SAR) } }
721
+ port pass_inspection { allowed: [seller] shape { invalidField: mystery_type } }
722
+ ```
723
+
591
724
  ## HSX1101: Currency mismatch
592
725
 
593
726
  Stage: `typecheck`
@@ -597,9 +730,13 @@ Fix: Use the declared currency because money values never coerce.
597
730
  ```hsx expect=HSX1101
598
731
  program catalog_probe "Catalog probe"
599
732
  instrument probe {
600
- fields {}
733
+ agent_description: "Probe instrument for catalog diagnostics.";
734
+ fields { }
601
735
  lifecycle { states created; initial created; }
602
- action create { steps: []; }
736
+ action create {
737
+ agent_description: "Create a probe instance.";
738
+ steps: [];
739
+ }
603
740
 
604
741
  }
605
742
  const fee: money<SAR> = USD 1.00
@@ -614,9 +751,13 @@ Fix: Round the literal to the currency's minor-unit precision.
614
751
  ```hsx expect=HSX1102
615
752
  program catalog_probe "Catalog probe"
616
753
  instrument probe {
617
- fields {}
754
+ agent_description: "Probe instrument for catalog diagnostics.";
755
+ fields { }
618
756
  lifecycle { states created; initial created; }
619
- action create { steps: []; }
757
+ action create {
758
+ agent_description: "Create a probe instance.";
759
+ steps: [];
760
+ }
620
761
 
621
762
  }
622
763
  const fee: money<SAR> = SAR 1.001
@@ -631,9 +772,13 @@ Fix: Use an integer, percent, bps, or valid fixed-money binding.
631
772
  ```hsx expect=HSX1103
632
773
  program catalog_probe "Catalog probe"
633
774
  instrument probe {
634
- fields {}
775
+ agent_description: "Probe instrument for catalog diagnostics.";
776
+ fields { }
635
777
  lifecycle { states created; initial created; }
636
- action create { steps: []; }
778
+ action create {
779
+ agent_description: "Create a probe instance.";
780
+ steps: [];
781
+ }
637
782
  summary: 1.5;
638
783
  }
639
784
  ```
@@ -647,9 +792,13 @@ Fix: Pass the type declared by the parameter or UDL slot.
647
792
  ```hsx expect=HSX1104
648
793
  program catalog_probe "Catalog probe"
649
794
  instrument probe {
650
- fields {}
795
+ agent_description: "Probe instrument for catalog diagnostics.";
796
+ fields { }
651
797
  lifecycle { states created; initial created; }
652
- action create { steps: []; }
798
+ action create {
799
+ agent_description: "Create a probe instance.";
800
+ steps: [];
801
+ }
653
802
  summary: money(SAR, 2500);
654
803
  }
655
804
  ```
@@ -680,9 +829,13 @@ Fix: Leave exactly one sink for each produced money value.
680
829
  ```hsx expect=HSX1201
681
830
  program catalog_probe "Catalog probe"
682
831
  instrument probe {
683
- fields {}
832
+ agent_description: "Probe instrument for catalog diagnostics.";
833
+ fields { }
684
834
  lifecycle { states created; initial created; }
685
- action create { steps: []; }
835
+ action create {
836
+ agent_description: "Create a probe instance.";
837
+ steps: [];
838
+ }
686
839
  fields { amount: money<SAR>; }
687
840
  action pay { computes remainder rest { amount_ref: total; on_zero: refuse; total_path: fields.amount; }; moves: [{ amount: rest; }, { amount: rest; }]; }
688
841
  }
@@ -697,9 +850,13 @@ Fix: Route each produced money value to one explicit sink.
697
850
  ```hsx expect=HSX1202
698
851
  program catalog_probe "Catalog probe"
699
852
  instrument probe {
700
- fields {}
853
+ agent_description: "Probe instrument for catalog diagnostics.";
854
+ fields { }
701
855
  lifecycle { states created; initial created; }
702
- action create { steps: []; }
856
+ action create {
857
+ agent_description: "Create a probe instance.";
858
+ steps: [];
859
+ }
703
860
  fields { amount: money<SAR>; }
704
861
  action pay { computes remainder rest { amount_ref: total; on_zero: refuse; total_path: fields.amount; }; }
705
862
  }
@@ -714,9 +871,13 @@ Fix: Supply a versioned cost table with a row for every emitted effect.
714
871
  ```hsx expect=HSX1301
715
872
  program catalog_probe "Catalog probe"
716
873
  instrument probe {
717
- fields {}
874
+ agent_description: "Probe instrument for catalog diagnostics.";
875
+ fields { }
718
876
  lifecycle { states created; initial created; }
719
- action create { steps: []; }
877
+ action create {
878
+ agent_description: "Create a probe instance.";
879
+ steps: [];
880
+ }
720
881
 
721
882
  }
722
883
  ```
@@ -737,6 +898,66 @@ Fix: Use the supported uppercase cost-table currency.
737
898
 
738
899
  No source-only witness exists. This refusal requires an invalid compiler-host cost-table currency.
739
900
 
901
+ ## HSX1304: Unpriced ledger currency
902
+
903
+ Stage: `typecheck`
904
+
905
+ Fix: Move money in a currency the shipped cost tables price.
906
+
907
+ ```hsx expect=HSX1304
908
+ program catalog_probe "Catalog probe"
909
+ instrument probe {
910
+ agent_description: "Probe instrument for catalog diagnostics.";
911
+ fields { amount: money<JPY>; }
912
+ lifecycle { states created; initial created; }
913
+ action create {
914
+ agent_description: "Create a probe instance.";
915
+ steps: [];
916
+ }
917
+
918
+ }
919
+ ```
920
+
921
+ ## HSX1305: More than one ledger currency
922
+
923
+ Stage: `typecheck`
924
+
925
+ Fix: Move all money in one currency; a program bills in one ledger currency.
926
+
927
+ ```hsx expect=HSX1305
928
+ program catalog_probe "Catalog probe"
929
+ instrument probe {
930
+ agent_description: "Probe instrument for catalog diagnostics.";
931
+ fields { amount: money<SAR>; fee: money<USD>; }
932
+ lifecycle { states created; initial created; }
933
+ action create {
934
+ agent_description: "Create a probe instance.";
935
+ steps: [];
936
+ }
937
+
938
+ }
939
+ ```
940
+
941
+ ## HSX1306: Fixed-currency amount moved in another currency
942
+
943
+ Stage: `typecheck`
944
+
945
+ Fix: Bind the currency of a money<CUR> move or account step as the constant CUR; the compiler pins a binding that reads the instrument's currency field.
946
+
947
+ ```hsx expect=HSX1306
948
+ program catalog_probe "Catalog probe"
949
+ instrument probe {
950
+ agent_description: "Probe instrument for catalog diagnostics.";
951
+ fields { amount: money<SAR>; payeeAccountId: account<SAR>; payerAccountId: account<SAR>; }
952
+ lifecycle { states created; initial created; }
953
+ action create {
954
+ agent_description: "Create a probe instance.";
955
+ steps: [];
956
+ }
957
+ action pay { agent_description: "Pay the amount."; moves: [{ "bind": { "amount": { "from": "instance"; "path": "fields.amount"; }; "currency": { "from": "const"; "value": "USD"; }; "destinationAccountId": { "from": "instance"; "path": "fields.payeeAccountId"; }; "sourceAccountId": { "from": "instance"; "path": "fields.payerAccountId"; }; }; "key": "transfer"; "operation": "internal_transfer.create"; }]; steps: []; }
958
+ }
959
+ ```
960
+
740
961
  ## HSX1401: Unbounded action
741
962
 
742
963
  Stage: `typecheck`
@@ -746,9 +967,13 @@ Fix: Replace runtime iteration with a bounded compile-time comprehension.
746
967
  ```hsx expect=HSX1401
747
968
  program catalog_probe "Catalog probe"
748
969
  instrument probe {
749
- fields {}
970
+ agent_description: "Probe instrument for catalog diagnostics.";
971
+ fields { }
750
972
  lifecycle { states created; initial created; }
751
- action create { steps: []; }
973
+ action create {
974
+ agent_description: "Create a probe instance.";
975
+ steps: [];
976
+ }
752
977
  action run { while { condition: true; }; }
753
978
  }
754
979
  ```
@@ -790,9 +1015,13 @@ Fix: Reduce the fixed expansion to the compiler limit.
790
1015
  ```hsx expect=HSX1404
791
1016
  program catalog_probe "Catalog probe"
792
1017
  instrument probe {
793
- fields {}
1018
+ agent_description: "Probe instrument for catalog diagnostics.";
1019
+ fields { }
794
1020
  lifecycle { states created; initial created; }
795
- action create { steps: []; }
1021
+ action create {
1022
+ agent_description: "Create a probe instance.";
1023
+ steps: [];
1024
+ }
796
1025
  for item in 257 { action run_[item] { steps: []; } }
797
1026
  }
798
1027
  ```
@@ -835,9 +1064,13 @@ Fix: Use a clause exported by the targeted UDL vocabulary.
835
1064
  ```hsx expect=HSX1501
836
1065
  program catalog_probe "Catalog probe"
837
1066
  instrument probe {
838
- fields {}
1067
+ agent_description: "Probe instrument for catalog diagnostics.";
1068
+ fields { }
839
1069
  lifecycle { states created; initial created; }
840
- action create { steps: []; }
1070
+ action create {
1071
+ agent_description: "Create a probe instance.";
1072
+ steps: [];
1073
+ }
841
1074
  unknown_clause: true;
842
1075
  }
843
1076
  ```
@@ -883,9 +1116,13 @@ Fix: Keep one occurrence of the clause.
883
1116
  ```hsx expect=HSX1505
884
1117
  program catalog_probe "Catalog probe"
885
1118
  instrument probe {
886
- fields {}
1119
+ agent_description: "Probe instrument for catalog diagnostics.";
1120
+ fields { }
887
1121
  lifecycle { states created; initial created; }
888
- action create { steps: []; }
1122
+ action create {
1123
+ agent_description: "Create a probe instance.";
1124
+ steps: [];
1125
+ }
889
1126
  title: "First"; title: "Second";
890
1127
  }
891
1128
  ```
@@ -899,9 +1136,13 @@ Fix: Keep either public: none or a public action name.
899
1136
  ```hsx expect=HSX1506
900
1137
  program catalog_probe "Catalog probe"
901
1138
  instrument probe {
902
- fields {}
1139
+ agent_description: "Probe instrument for catalog diagnostics.";
1140
+ fields { }
903
1141
  lifecycle { states created; initial created; }
904
- action create { steps: []; }
1142
+ action create {
1143
+ agent_description: "Create a probe instance.";
1144
+ steps: [];
1145
+ }
905
1146
  action finish { public: none; public_action: finishProbe; steps: []; }
906
1147
  }
907
1148
  ```
@@ -918,6 +1159,40 @@ export instrument template() { fields {}; lifecycle { states created; initial cr
918
1159
  instrument probe = template() { fields: {}; }
919
1160
  ```
920
1161
 
1162
+ ## HSX1508: Invalid action-level port syntax
1163
+
1164
+ Stage: `typecheck`
1165
+
1166
+ Fix: Use allowed_parties: [...] inside an action-level port clause; allowed: is for top-level port declarations.
1167
+
1168
+ ```hsx expect=HSX1508
1169
+ program catalog_probe "Catalog probe"
1170
+ party approver: person
1171
+ instrument probe {
1172
+ fields {}
1173
+ lifecycle { states created; initial created; }
1174
+ action create {
1175
+ steps: [];
1176
+ port { allowed: [approver]; }
1177
+ }
1178
+ }
1179
+ ```
1180
+
1181
+ ## HSX1509: Callable action without an agent description
1182
+
1183
+ Stage: `typecheck`
1184
+
1185
+ Fix: Add agent_description: "..." to the instrument and to every action a caller can reach; composer.check refuses the program without them.
1186
+
1187
+ ```hsx expect=HSX1509
1188
+ program catalog_probe "Catalog probe"
1189
+ instrument probe {
1190
+ fields {}
1191
+ lifecycle { states created; initial created; }
1192
+ action create { steps: []; }
1193
+ }
1194
+ ```
1195
+
921
1196
  ## HSX1601: Invalid UDL shape
922
1197
 
923
1198
  Stage: `lower`
@@ -943,9 +1218,13 @@ Fix: Correct compile-time block keys or parameter bindings.
943
1218
  ```hsx expect=HSX1603
944
1219
  program catalog_probe "Catalog probe"
945
1220
  instrument probe {
946
- fields {}
1221
+ agent_description: "Probe instrument for catalog diagnostics.";
1222
+ fields { }
947
1223
  lifecycle { states created; initial created; }
948
- action create { steps: []; }
1224
+ action create {
1225
+ agent_description: "Create a probe instance.";
1226
+ steps: [];
1227
+ }
949
1228
  title: "__hsx_none__";
950
1229
  }
951
1230
  ```
@@ -964,7 +1243,7 @@ The parser is hand-written. This page records the exported lexer vocabulary, the
964
1243
 
965
1244
  ## Typed clause spellings
966
1245
 
967
- `agent description`, `capture input`, `commit`, `quote`, `decided amount`, `deadline`, `decision`, `computes distribute`, `description`, `due`, `earnable`, `event name`, `examples`, `input`, `moves`, `payout`, `port`, `principal`, `public action`, `reconcile`, `computes remainder`, `requires aggregate`, `requires checks`, `requires drained`, `requires exposure`, `requires refs`, `sandbox failure point`, `sets at`, `computes signed_sum`, `steps`, `summary`, `updates`, `notify`, `agent description`, `aggregate invariants`, `caller parked states`, `description`, `dials`, `distinct parties`, `computes derived`, `computes fees`, `id prefix`, `nav`, `partitions`, `subject`, `summary`, `surface visibility`, `template id`, `title`, `update`
1246
+ `agent description`, `capture input`, `commit`, `quote`, `decided amount`, `deadline`, `decision`, `computes distribute`, `description`, `due`, `earnable`, `event name`, `examples`, `input`, `moves`, `payout`, `port`, `principal`, `public action`, `reconcile`, `computes remainder`, `requires aggregate`, `requires checks`, `requires drained`, `requires exposure`, `requires refs`, `sandbox failure point`, `sets at`, `computes signed_sum`, `steps`, `summary`, `updates`, `notify`, `agent description`, `aggregate invariants`, `caller parked states`, `description`, `dials`, `distinct parties`, `computes derived`, `computes fees`, `id prefix`, `journeys`, `nav`, `partitions`, `subject`, `summary`, `surface visibility`, `template id`, `title`, `update`
968
1247
 
969
1248
  ## Standard-library modules
970
1249
 
@@ -990,7 +1269,7 @@ The parser is hand-written. This page records the exported lexer vocabulary, the
990
1269
 
991
1270
  # advance
992
1271
 
993
- Source: [`std/settlements/advance.hsx`](../../../std/settlements/advance.hsx)
1272
+ Source: [`std/money_flows/advance.hsx`](../../../std/money_flows/advance.hsx)
994
1273
 
995
1274
  ## Export
996
1275
 
@@ -1024,7 +1303,7 @@ None.
1024
1303
 
1025
1304
  # cancellable_booking
1026
1305
 
1027
- Source: [`std/settlements/cancellable_booking.hsx`](../../../std/settlements/cancellable_booking.hsx)
1306
+ Source: [`std/money_flows/cancellable_booking.hsx`](../../../std/money_flows/cancellable_booking.hsx)
1028
1307
 
1029
1308
  ## Export
1030
1309
 
@@ -1047,18 +1326,18 @@ None.
1047
1326
 
1048
1327
  ## Actions and clauses
1049
1328
 
1050
- | Action | Clauses lowered |
1051
- | ---------- | ---------------------------------------------------------- |
1052
- | `create` | `agent description`, `moves`, `steps`, `summary` |
1053
- | `take` | `agent description`, `moves`, `steps`, `summary` |
1054
- | `complete` | `due`, `moves`, `steps`, `summary` |
1055
- | `cancel` | `agent description`, `moves`, `quote`, `steps`, `summary` |
1056
- | `confirm` | `agent description`, `commit`, `moves`, `steps`, `summary` |
1057
- | `retain` | `agent description`, `moves`, `steps`, `summary` |
1329
+ | Action | Clauses lowered |
1330
+ | ---------- | ------------------------------------------------------------------------- |
1331
+ | `create` | `agent description`, `moves`, `steps`, `summary` |
1332
+ | `take` | `agent description`, `moves`, `sandbox failure point`, `steps`, `summary` |
1333
+ | `complete` | `due`, `moves`, `steps`, `summary` |
1334
+ | `cancel` | `agent description`, `moves`, `quote`, `steps`, `summary` |
1335
+ | `confirm` | `agent description`, `commit`, `moves`, `steps`, `summary` |
1336
+ | `retain` | `agent description`, `moves`, `steps`, `summary` |
1058
1337
 
1059
1338
  # captured_payment
1060
1339
 
1061
- Source: [`std/settlements/captured_payment.hsx`](../../../std/settlements/captured_payment.hsx)
1340
+ Source: [`std/money_flows/captured_payment.hsx`](../../../std/money_flows/captured_payment.hsx)
1062
1341
 
1063
1342
  ## Export
1064
1343
 
@@ -1085,22 +1364,22 @@ Source: [`std/settlements/captured_payment.hsx`](../../../std/settlements/captur
1085
1364
 
1086
1365
  ## Actions and clauses
1087
1366
 
1088
- | Action | Clauses lowered |
1089
- | ------------------ | -------------------------------------------------------------------------------------------- |
1090
- | `create` | `agent description`, `moves`, `steps`, `summary` |
1091
- | `authorize` | `agent description`, `moves`, `steps`, `summary` |
1092
- | `capture` | `agent description`, `deadline`, `description`, `input`, `moves`, `steps`, `summary` |
1093
- | `capture_more` | `agent description`, `deadline`, `description`, `input`, `moves`, `steps`, `summary` |
1094
- | `settle` | `agent description`, `deadline`, `moves`, `steps`, `summary` |
1095
- | `void` | `agent description`, `moves`, `steps`, `summary` |
1096
- | `expire` | `due`, `moves`, `steps`, `summary` |
1097
- | `settle_on_expiry` | `due`, `moves`, `steps`, `summary` |
1098
- | `correction_name` | `agent description`, `moves`, `port`, `steps`, `summary` |
1099
- | `reversal_name` | `agent description`, `deadline`, `description`, `input`, `moves`, `port`, `steps`, `summary` |
1367
+ | Action | Clauses lowered |
1368
+ | ------------------ | ------------------------------------------------------------------------------------------------------------- |
1369
+ | `create` | `agent description`, `moves`, `steps`, `summary` |
1370
+ | `authorize` | `agent description`, `moves`, `sandbox failure point`, `steps`, `summary` |
1371
+ | `capture` | `agent description`, `deadline`, `description`, `input`, `moves`, `sandbox failure point`, `steps`, `summary` |
1372
+ | `capture_more` | `agent description`, `deadline`, `description`, `input`, `moves`, `steps`, `summary` |
1373
+ | `settle` | `agent description`, `deadline`, `moves`, `steps`, `summary` |
1374
+ | `void` | `agent description`, `moves`, `steps`, `summary` |
1375
+ | `expire` | `due`, `moves`, `steps`, `summary` |
1376
+ | `settle_on_expiry` | `due`, `moves`, `steps`, `summary` |
1377
+ | `correction_name` | `agent description`, `capture input`, `input`, `moves`, `port`, `steps`, `summary` |
1378
+ | `reversal_name` | `agent description`, `capture input`, `deadline`, `input`, `moves`, `port`, `steps`, `summary` |
1100
1379
 
1101
1380
  # conditional_disbursement
1102
1381
 
1103
- Source: [`std/settlements/conditional_disbursement.hsx`](../../../std/settlements/conditional_disbursement.hsx)
1382
+ Source: [`std/money_flows/conditional_disbursement.hsx`](../../../std/money_flows/conditional_disbursement.hsx)
1104
1383
 
1105
1384
  ## Export
1106
1385
 
@@ -1125,14 +1404,14 @@ Source: [`std/settlements/conditional_disbursement.hsx`](../../../std/settlement
1125
1404
  | Action | Clauses lowered |
1126
1405
  | --------- | ------------------------------------------------------------------------------------------------- |
1127
1406
  | `create` | `agent description`, `moves`, `steps`, `summary` |
1128
- | `deny` | `agent description`, `capture input`, `description`, `input`, `moves`, `port`, `steps`, `summary` |
1407
+ | `deny` | `agent description`, `capture input`, `input`, `moves`, `port`, `steps`, `summary` |
1129
1408
  | `create` | `agent description`, `moves`, `steps`, `summary` |
1130
1409
  | `approve` | `agent description`, `capture input`, `description`, `input`, `moves`, `port`, `steps`, `summary` |
1131
1410
  | `pay` | `agent description`, `moves`, `steps`, `summary` |
1132
1411
 
1133
1412
  # credit_facility
1134
1413
 
1135
- Source: [`std/settlements/credit_facility.hsx`](../../../std/settlements/credit_facility.hsx)
1414
+ Source: [`std/money_flows/credit_facility.hsx`](../../../std/money_flows/credit_facility.hsx)
1136
1415
 
1137
1416
  ## Export
1138
1417
 
@@ -1166,7 +1445,7 @@ None.
1166
1445
 
1167
1446
  # held_payment
1168
1447
 
1169
- Source: [`std/settlements/held_payment.hsx`](../../../std/settlements/held_payment.hsx)
1448
+ Source: [`std/money_flows/held_payment.hsx`](../../../std/money_flows/held_payment.hsx)
1170
1449
 
1171
1450
  ## Export
1172
1451
 
@@ -1195,41 +1474,45 @@ Source: [`std/settlements/held_payment.hsx`](../../../std/settlements/held_payme
1195
1474
 
1196
1475
  ## Actions and clauses
1197
1476
 
1198
- | Action | Clauses lowered |
1199
- | --------------------- | --------------------------------------------------------------------------------------------- |
1200
- | `fund_piece_2` | `agent description`, `moves`, `steps`, `summary` |
1201
- | `fund_piece_3` | `agent description`, `moves`, `steps`, `summary` |
1202
- | `collect_service_fee` | `agent description`, `moves`, `steps`, `summary` |
1203
- | `release_piece_2` | `agent description`, `moves`, `steps`, `summary` |
1204
- | `release_piece_3` | `agent description`, `moves`, `steps`, `summary` |
1205
- | `refund_piece_2` | `agent description`, `moves`, `steps`, `summary` |
1206
- | `refund_piece_3` | `agent description`, `moves`, `steps`, `summary` |
1207
- | `unfund_piece_1` | `agent description`, `moves`, `steps`, `summary` |
1208
- | `unfund_piece_2` | `agent description`, `moves`, `steps`, `summary` |
1209
- | `unfund_piece_3` | `agent description`, `moves`, `steps`, `summary` |
1210
- | `create` | `agent description`, `moves`, `steps`, `summary` |
1211
- | `fund_piece_1` | `agent description`, `moves`, `steps`, `summary` |
1212
- | `release_name` | `agent description`, `deadline`, `description`, `input`, `moves`, `port`, `steps`, `summary` |
1213
- | `release_on_deadline` | `due`, `moves`, `steps`, `summary` |
1214
- | `cancel` | `agent description`, `deadline`, `moves`, `steps`, `summary` |
1215
- | `fund_piece_2` | `agent description`, `moves`, `steps`, `summary` |
1216
- | `release_piece_2` | `agent description`, `moves`, `steps`, `summary` |
1217
- | `unfund_piece_1` | `agent description`, `moves`, `steps`, `summary` |
1218
- | `fund_piece_2` | `agent description`, `moves`, `steps`, `summary` |
1219
- | `release_piece_2` | `agent description`, `moves`, `steps`, `summary` |
1220
- | `refund_piece_2` | `agent description`, `moves`, `steps`, `summary` |
1221
- | `unfund_piece_1` | `agent description`, `moves`, `steps`, `summary` |
1222
- | `abandon` | `agent description`, `moves`, `steps`, `summary` |
1223
- | `create` | `agent description`, `moves`, `steps`, `summary` |
1224
- | `fund` | `agent description`, `moves`, `sandbox failure point`, `steps`, `summary` |
1225
- | `release_action` | `agent description`, `deadline`, `moves`, `port`, `sandbox failure point`, `steps`, `summary` |
1226
- | `release_on_deadline` | `due`, `event name`, `moves`, `steps`, `summary` |
1227
- | `cancel` | `agent description`, `deadline`, `event name`, `moves`, `steps`, `summary` |
1228
- | `abandon` | `agent description`, `moves`, `steps`, `summary` |
1477
+ | Action | Clauses lowered |
1478
+ | --------------------- | ------------------------------------------------------------------------------------------------------ |
1479
+ | `fund_piece_2` | `agent description`, `moves`, `sandbox failure point`, `steps`, `summary` |
1480
+ | `fund_piece_3` | `agent description`, `moves`, `sandbox failure point`, `steps`, `summary` |
1481
+ | `collect_service_fee` | `agent description`, `moves`, `steps`, `summary` |
1482
+ | `release_piece_2` | `agent description`, `moves`, `steps`, `summary` |
1483
+ | `release_piece_3` | `agent description`, `moves`, `steps`, `summary` |
1484
+ | `refund_piece_2` | `agent description`, `moves`, `steps`, `summary` |
1485
+ | `refund_piece_3` | `agent description`, `moves`, `steps`, `summary` |
1486
+ | `unfund_piece_1` | `agent description`, `moves`, `steps`, `summary` |
1487
+ | `unfund_piece_2` | `agent description`, `moves`, `steps`, `summary` |
1488
+ | `unfund_piece_3` | `agent description`, `moves`, `steps`, `summary` |
1489
+ | `create` | `agent description`, `moves`, `steps`, `summary` |
1490
+ | `fund_piece_1` | `agent description`, `moves`, `sandbox failure point`, `steps`, `summary` |
1491
+ | `release_name` | `agent description`, `deadline`, `input`, `moves`, `port`, `sandbox failure point`, `steps`, `summary` |
1492
+ | `release_on_deadline` | `due`, `moves`, `steps`, `summary` |
1493
+ | `cancel` | `agent description`, `deadline`, `moves`, `steps`, `summary` |
1494
+ | `fund_piece_2` | `agent description`, `moves`, `sandbox failure point`, `steps`, `summary` |
1495
+ | `release_piece_2` | `agent description`, `moves`, `steps`, `summary` |
1496
+ | `unfund_piece_1` | `agent description`, `moves`, `steps`, `summary` |
1497
+ | `fund_piece_2` | `agent description`, `moves`, `sandbox failure point`, `steps`, `summary` |
1498
+ | `release_piece_2` | `agent description`, `moves`, `steps`, `summary` |
1499
+ | `refund_piece_2` | `agent description`, `moves`, `steps`, `summary` |
1500
+ | `unfund_piece_1` | `agent description`, `moves`, `steps`, `summary` |
1501
+ | `abandon` | `agent description`, `moves`, `steps`, `summary` |
1502
+ | `dispute` | `agent description`, `deadline`, `description`, `moves`, `steps`, `summary` |
1503
+ | `resume` | `agent description`, `description`, `moves`, `steps`, `summary` |
1504
+ | `create` | `agent description`, `moves`, `steps`, `summary` |
1505
+ | `fund` | `agent description`, `moves`, `sandbox failure point`, `steps`, `summary` |
1506
+ | `release_action` | `agent description`, `deadline`, `moves`, `port`, `sandbox failure point`, `steps`, `summary` |
1507
+ | `release_on_deadline` | `due`, `event name`, `moves`, `steps`, `summary` |
1508
+ | `cancel` | `agent description`, `deadline`, `event name`, `moves`, `steps`, `summary` |
1509
+ | `abandon` | `agent description`, `moves`, `steps`, `summary` |
1510
+ | `dispute` | `agent description`, `deadline`, `description`, `moves`, `steps`, `summary` |
1511
+ | `resume` | `agent description`, `description`, `moves`, `steps`, `summary` |
1229
1512
 
1230
1513
  # instant_transfer
1231
1514
 
1232
- Source: [`std/settlements/instant_transfer.hsx`](../../../std/settlements/instant_transfer.hsx)
1515
+ Source: [`std/money_flows/instant_transfer.hsx`](../../../std/money_flows/instant_transfer.hsx)
1233
1516
 
1234
1517
  ## Export
1235
1518
 
@@ -1249,16 +1532,16 @@ None.
1249
1532
 
1250
1533
  ## Actions and clauses
1251
1534
 
1252
- | Action | Clauses lowered |
1253
- | --------------------- | ------------------------------------------------ |
1254
- | `create` | `agent description`, `moves`, `steps`, `summary` |
1255
- | `pay_piece_1` | `agent description`, `moves`, `steps`, `summary` |
1256
- | `pay_piece_2` | `agent description`, `moves`, `steps`, `summary` |
1257
- | `collect_service_fee` | `agent description`, `moves`, `steps`, `summary` |
1535
+ | Action | Clauses lowered |
1536
+ | --------------------- | ------------------------------------------------------------------------- |
1537
+ | `create` | `agent description`, `moves`, `steps`, `summary` |
1538
+ | `pay_piece_1` | `agent description`, `moves`, `sandbox failure point`, `steps`, `summary` |
1539
+ | `pay_piece_2` | `agent description`, `moves`, `steps`, `summary` |
1540
+ | `collect_service_fee` | `agent description`, `moves`, `steps`, `summary` |
1258
1541
 
1259
1542
  # metered
1260
1543
 
1261
- Source: [`std/settlements/metered.hsx`](../../../std/settlements/metered.hsx)
1544
+ Source: [`std/money_flows/metered.hsx`](../../../std/money_flows/metered.hsx)
1262
1545
 
1263
1546
  ## Export
1264
1547
 
@@ -1284,7 +1567,7 @@ None.
1284
1567
 
1285
1568
  # pooled_split
1286
1569
 
1287
- Source: [`std/settlements/pooled_split.hsx`](../../../std/settlements/pooled_split.hsx)
1570
+ Source: [`std/money_flows/pooled_split.hsx`](../../../std/money_flows/pooled_split.hsx)
1288
1571
 
1289
1572
  ## Export
1290
1573
 
@@ -1309,7 +1592,7 @@ None.
1309
1592
 
1310
1593
  # premium_forward
1311
1594
 
1312
- Source: [`std/settlements/premium_forward.hsx`](../../../std/settlements/premium_forward.hsx)
1595
+ Source: [`std/money_flows/premium_forward.hsx`](../../../std/money_flows/premium_forward.hsx)
1313
1596
 
1314
1597
  ## Export
1315
1598
 
@@ -1333,21 +1616,21 @@ Source: [`std/settlements/premium_forward.hsx`](../../../std/settlements/premium
1333
1616
 
1334
1617
  ## Actions and clauses
1335
1618
 
1336
- | Action | Clauses lowered |
1337
- | ----------------- | ---------------------------------------------------------------------------------------- |
1338
- | `create` | `agent description`, `steps`, `summary` |
1339
- | `fund_piece_1` | `agent description`, `moves`, `steps`, `summary` |
1340
- | `fund_piece_2` | `agent description`, `moves`, `steps`, `summary` |
1341
- | `bind` | `agent description`, `description`, `input`, `moves`, `port`, `steps`, `summary` |
1342
- | `forward_piece_2` | `agent description`, `moves`, `steps`, `summary` |
1343
- | `unfund_piece_1` | `agent description`, `moves`, `steps`, `summary` |
1344
- | `abandon` | `agent description`, `steps`, `summary` |
1345
- | `endorsement` | `agent description`, `capture input`, `description`, `input`, `port`, `steps`, `summary` |
1346
- | `lapse` | `due`, `steps`, `summary` |
1619
+ | Action | Clauses lowered |
1620
+ | ----------------- | ------------------------------------------------------------------------------------------ |
1621
+ | `create` | `agent description`, `steps`, `summary` |
1622
+ | `fund_piece_1` | `agent description`, `moves`, `sandbox failure point`, `steps`, `summary` |
1623
+ | `fund_piece_2` | `agent description`, `moves`, `sandbox failure point`, `steps`, `summary` |
1624
+ | `bind` | `agent description`, `input`, `moves`, `port`, `sandbox failure point`, `steps`, `summary` |
1625
+ | `forward_piece_2` | `agent description`, `moves`, `steps`, `summary` |
1626
+ | `unfund_piece_1` | `agent description`, `moves`, `steps`, `summary` |
1627
+ | `abandon` | `agent description`, `steps`, `summary` |
1628
+ | `endorsement` | `agent description`, `capture input`, `input`, `port`, `steps`, `summary` |
1629
+ | `lapse` | `due`, `steps`, `summary` |
1347
1630
 
1348
1631
  # reconciled_payout
1349
1632
 
1350
- Source: [`std/settlements/reconciled_payout.hsx`](../../../std/settlements/reconciled_payout.hsx)
1633
+ Source: [`std/money_flows/reconciled_payout.hsx`](../../../std/money_flows/reconciled_payout.hsx)
1351
1634
 
1352
1635
  ## Export
1353
1636
 
@@ -1379,7 +1662,7 @@ None.
1379
1662
 
1380
1663
  # recurring_collection
1381
1664
 
1382
- Source: [`std/settlements/recurring_collection.hsx`](../../../std/settlements/recurring_collection.hsx)
1665
+ Source: [`std/money_flows/recurring_collection.hsx`](../../../std/money_flows/recurring_collection.hsx)
1383
1666
 
1384
1667
  ## Export
1385
1668
 
@@ -1403,7 +1686,7 @@ None.
1403
1686
 
1404
1687
  # rotating_pool
1405
1688
 
1406
- Source: [`std/settlements/rotating_pool.hsx`](../../../std/settlements/rotating_pool.hsx)
1689
+ Source: [`std/money_flows/rotating_pool.hsx`](../../../std/money_flows/rotating_pool.hsx)
1407
1690
 
1408
1691
  ## Export
1409
1692
 
@@ -1444,7 +1727,7 @@ None.
1444
1727
 
1445
1728
  # scheduled
1446
1729
 
1447
- Source: [`std/settlements/scheduled.hsx`](../../../std/settlements/scheduled.hsx)
1730
+ Source: [`std/money_flows/scheduled.hsx`](../../../std/money_flows/scheduled.hsx)
1448
1731
 
1449
1732
  ## Export
1450
1733
 
@@ -1475,26 +1758,26 @@ Source: [`std/settlements/scheduled.hsx`](../../../std/settlements/scheduled.hsx
1475
1758
 
1476
1759
  ## Actions and clauses
1477
1760
 
1478
- | Action | Clauses lowered |
1479
- | ------------------- | ------------------------------------------------------------------------------------------------- |
1480
- | `create` | `agent description`, `steps`, `summary` |
1481
- | `create` | `agent description`, `moves`, `steps`, `summary` |
1482
- | `approve` | `agent description`, `steps`, `summary` |
1483
- | `advance` | `agent description`, `moves`, `steps`, `summary` |
1484
- | `delinquent_action` | `due`, `sets at`, `steps`, `summary` |
1485
- | `complete` | `due`, `steps`, `summary` |
1486
- | `write_off` | `agent description`, `steps`, `summary` |
1487
- | `create` | `agent description`, `steps`, `summary` |
1488
- | `repay` | `agent description`, `capture input`, `description`, `input`, `moves`, `port`, `steps`, `summary` |
1489
- | `refund` | `agent description`, `moves`, `steps`, `summary` |
1490
- | `create` | `agent description`, `steps`, `summary` |
1491
- | `open_period` | `due`, `steps`, `summary` |
1492
- | `collect_period` | `agent description`, `capture input`, `description`, `input`, `moves`, `port`, `steps`, `summary` |
1493
- | `until` | `agent description`, `capture input`, `description`, `input`, `port`, `steps`, `summary` |
1761
+ | Action | Clauses lowered |
1762
+ | ------------------- | -------------------------------------------------------------------------------------------------------------------------- |
1763
+ | `create` | `agent description`, `steps`, `summary` |
1764
+ | `create` | `agent description`, `moves`, `steps`, `summary` |
1765
+ | `approve` | `agent description`, `steps`, `summary` |
1766
+ | `advance` | `agent description`, `moves`, `steps`, `summary` |
1767
+ | `delinquent_action` | `due`, `sets at`, `steps`, `summary` |
1768
+ | `complete` | `due`, `steps`, `summary` |
1769
+ | `write_off` | `agent description`, `steps`, `summary` |
1770
+ | `create` | `agent description`, `steps`, `summary` |
1771
+ | `repay` | `agent description`, `capture input`, `description`, `input`, `moves`, `port`, `steps`, `summary` |
1772
+ | `refund` | `agent description`, `moves`, `steps`, `summary` |
1773
+ | `create` | `agent description`, `steps`, `summary` |
1774
+ | `open_period` | `due`, `steps`, `summary` |
1775
+ | `collect_period` | `agent description`, `capture input`, `description`, `input`, `moves`, `port`, `sandbox failure point`, `steps`, `summary` |
1776
+ | `until` | `agent description`, `capture input`, `input`, `port`, `steps`, `summary` |
1494
1777
 
1495
1778
  # security_deposit
1496
1779
 
1497
- Source: [`std/settlements/security_deposit.hsx`](../../../std/settlements/security_deposit.hsx)
1780
+ Source: [`std/money_flows/security_deposit.hsx`](../../../std/money_flows/security_deposit.hsx)
1498
1781
 
1499
1782
  ## Export
1500
1783
 
@@ -1524,22 +1807,22 @@ Source: [`std/settlements/security_deposit.hsx`](../../../std/settlements/securi
1524
1807
 
1525
1808
  ## Actions and clauses
1526
1809
 
1527
- | Action | Clauses lowered |
1528
- | --------------- | ---------------------------------------------------------------------------------------------------------------- |
1529
- | `create` | `agent description`, `moves`, `steps`, `summary` |
1530
- | `place_deposit` | `agent description`, `moves`, `steps`, `summary` |
1531
- | `claim_name` | `agent description`, `description`, `input`, `moves`, `port`, `steps`, `summary` |
1532
- | `return_name` | `agent description`, `moves`, `steps`, `summary` |
1533
- | `create` | `agent description`, `deadline`, `moves`, `steps`, `summary` |
1534
- | `fund` | `agent description`, `deadline`, `moves`, `sandbox failure point`, `steps`, `summary` |
1535
- | `claim` | `agent description`, `capture input`, `deadline`, `decided amount`, `input`, `moves`, `port`, `steps`, `summary` |
1536
- | `return` | `agent description`, `deadline`, `moves`, `port`, `steps`, `summary` |
1537
- | `expire` | `due`, `moves`, `steps`, `summary` |
1538
- | `cancel` | `agent description`, `moves`, `steps`, `summary` |
1810
+ | Action | Clauses lowered |
1811
+ | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
1812
+ | `create` | `agent description`, `moves`, `steps`, `summary` |
1813
+ | `place_deposit` | `agent description`, `moves`, `sandbox failure point`, `steps`, `summary` |
1814
+ | `claim_name` | `agent description`, `input`, `moves`, `port`, `steps`, `summary` |
1815
+ | `return_name` | `agent description`, `capture input`, `input`, `moves`, `port`, `steps`, `summary` |
1816
+ | `create` | `agent description`, `deadline`, `moves`, `steps`, `summary` |
1817
+ | `fund` | `agent description`, `deadline`, `moves`, `sandbox failure point`, `steps`, `summary` |
1818
+ | `claim` | `agent description`, `capture input`, `deadline`, `decided amount`, `input`, `moves`, `port`, `sandbox failure point`, `steps`, `summary` |
1819
+ | `return` | `agent description`, `deadline`, `moves`, `port`, `steps`, `summary` |
1820
+ | `expire` | `due`, `moves`, `steps`, `summary` |
1821
+ | `cancel` | `agent description`, `moves`, `steps`, `summary` |
1539
1822
 
1540
1823
  # settlement_batch
1541
1824
 
1542
- Source: [`std/settlements/settlement_batch.hsx`](../../../std/settlements/settlement_batch.hsx)
1825
+ Source: [`std/money_flows/settlement_batch.hsx`](../../../std/money_flows/settlement_batch.hsx)
1543
1826
 
1544
1827
  ## Export
1545
1828
 
@@ -1580,7 +1863,7 @@ Source: [`std/settlements/settlement_batch.hsx`](../../../std/settlements/settle
1580
1863
 
1581
1864
  # swap
1582
1865
 
1583
- Source: [`std/settlements/swap.hsx`](../../../std/settlements/swap.hsx)
1866
+ Source: [`std/money_flows/swap.hsx`](../../../std/money_flows/swap.hsx)
1584
1867
 
1585
1868
  ## Export
1586
1869
 
@@ -1606,26 +1889,26 @@ Source: [`std/settlements/swap.hsx`](../../../std/settlements/swap.hsx)
1606
1889
 
1607
1890
  ## Actions and clauses
1608
1891
 
1609
- | Action | Clauses lowered |
1610
- | --------- | --------------------------------------------------------------------------------------------------------------------------- |
1611
- | `abandon` | `agent description`, `moves`, `public action`, `steps`, `summary` |
1612
- | `cancel` | `agent description`, `moves`, `public action`, `steps`, `summary` |
1613
- | `create` | `agent description`, `moves`, `public action`, `steps`, `summary` |
1614
- | `dispute` | `agent description`, `deadline`, `moves`, `port`, `public action`, `steps`, `summary` |
1615
- | `fund` | `agent description`, `moves`, `public action`, `steps`, `summary` |
1616
- | `post` | `due`, `moves`, `steps`, `summary` |
1617
- | `release` | `agent description`, `moves`, `port`, `public action`, `sets at`, `steps`, `summary` |
1618
- | `create` | `agent description`, `moves`, `public action`, `steps`, `summary` |
1619
- | `fund` | `agent description`, `event name`, `moves`, `public action`, `sandbox failure point`, `steps`, `summary` |
1620
- | `release` | `agent description`, `event name`, `moves`, `port`, `public action`, `sandbox failure point`, `sets at`, `steps`, `summary` |
1621
- | `post` | `due`, `event name`, `moves`, `steps`, `summary` |
1622
- | `dispute` | `agent description`, `deadline`, `event name`, `moves`, `port`, `public action`, `steps`, `summary` |
1623
- | `cancel` | `agent description`, `event name`, `moves`, `public action`, `steps`, `summary` |
1624
- | `abandon` | `agent description`, `event name`, `moves`, `public action`, `steps`, `summary` |
1892
+ | Action | Clauses lowered |
1893
+ | --------- | ----------------------------------------------------------------------------------------------------------------------------- |
1894
+ | `abandon` | `agent description`, `moves`, `public action`, `steps`, `summary` |
1895
+ | `cancel` | `agent description`, `moves`, `public action`, `steps`, `summary` |
1896
+ | `create` | `agent description`, `moves`, `public action`, `steps`, `summary` |
1897
+ | `dispute` | `agent description`, `capture input`, `deadline`, `input`, `moves`, `port`, `public action`, `steps`, `summary` |
1898
+ | `fund` | `agent description`, `moves`, `public action`, `sandbox failure point`, `steps`, `summary` |
1899
+ | `post` | `due`, `moves`, `steps`, `summary` |
1900
+ | `release` | `agent description`, `moves`, `port`, `public action`, `sandbox failure point`, `sets at`, `steps`, `summary` |
1901
+ | `create` | `agent description`, `moves`, `public action`, `steps`, `summary` |
1902
+ | `fund` | `agent description`, `event name`, `moves`, `public action`, `sandbox failure point`, `steps`, `summary` |
1903
+ | `release` | `agent description`, `event name`, `moves`, `port`, `public action`, `sandbox failure point`, `sets at`, `steps`, `summary` |
1904
+ | `post` | `due`, `event name`, `moves`, `steps`, `summary` |
1905
+ | `dispute` | `agent description`, `capture input`, `deadline`, `event name`, `input`, `moves`, `port`, `public action`, `steps`, `summary` |
1906
+ | `cancel` | `agent description`, `event name`, `moves`, `public action`, `steps`, `summary` |
1907
+ | `abandon` | `agent description`, `event name`, `moves`, `public action`, `steps`, `summary` |
1625
1908
 
1626
1909
  # threshold_pool
1627
1910
 
1628
- Source: [`std/settlements/threshold_pool.hsx`](../../../std/settlements/threshold_pool.hsx)
1911
+ Source: [`std/money_flows/threshold_pool.hsx`](../../../std/money_flows/threshold_pool.hsx)
1629
1912
 
1630
1913
  ## Export
1631
1914
 
@@ -1671,7 +1954,7 @@ None.
1671
1954
 
1672
1955
  # weighted_distribution
1673
1956
 
1674
- Source: [`std/settlements/weighted_distribution.hsx`](../../../std/settlements/weighted_distribution.hsx)
1957
+ Source: [`std/money_flows/weighted_distribution.hsx`](../../../std/money_flows/weighted_distribution.hsx)
1675
1958
 
1676
1959
  ## Export
1677
1960