@hyperscale0/hsx 1.0.0-rc.1 → 2.0.0
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.
- package/CHANGELOG.md +32 -4
- package/README.md +58 -36
- package/bin/hsx.ts +2 -0
- package/dist/bin/hsx.js +2 -0
- package/dist/bin/hsx.js.map +1 -1
- package/dist/src/ast.d.ts +10 -2
- package/dist/src/ast.d.ts.map +1 -1
- package/dist/src/ast.js +24 -0
- package/dist/src/ast.js.map +1 -1
- package/dist/src/cli.d.ts +3 -1
- package/dist/src/cli.d.ts.map +1 -1
- package/dist/src/cli.js +25 -5
- package/dist/src/cli.js.map +1 -1
- package/dist/src/compile.d.ts +9 -5
- package/dist/src/compile.d.ts.map +1 -1
- package/dist/src/compile.js +9 -3
- package/dist/src/compile.js.map +1 -1
- package/dist/src/cost.d.ts +3 -1
- package/dist/src/cost.d.ts.map +1 -1
- package/dist/src/cost.js +124 -94
- package/dist/src/cost.js.map +1 -1
- package/dist/src/diagnostics.d.ts.map +1 -1
- package/dist/src/diagnostics.js +89 -5
- package/dist/src/diagnostics.js.map +1 -1
- package/dist/src/emit.d.ts +4 -3
- package/dist/src/emit.d.ts.map +1 -1
- package/dist/src/emit.js +28 -233
- package/dist/src/emit.js.map +1 -1
- package/dist/src/format.js.map +1 -1
- package/dist/src/index.d.ts +4 -3
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +3 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/ir.d.ts.map +1 -1
- package/dist/src/lex.d.ts.map +1 -1
- package/dist/src/lsp/server.d.ts +32 -0
- package/dist/src/lsp/server.d.ts.map +1 -0
- package/dist/src/lsp/server.js +391 -0
- package/dist/src/lsp/server.js.map +1 -0
- package/dist/src/modules.d.ts +2 -0
- package/dist/src/modules.d.ts.map +1 -1
- package/dist/src/modules.js +14 -14
- package/dist/src/modules.js.map +1 -1
- package/dist/src/parse.js +3 -3
- package/dist/src/parse.js.map +1 -1
- package/dist/src/std-bundle.d.ts +2 -0
- package/dist/src/std-bundle.d.ts.map +1 -0
- package/dist/src/std-bundle.js +88 -0
- package/dist/src/std-bundle.js.map +1 -0
- package/dist/src/std-library.d.ts +5 -0
- package/dist/src/std-library.d.ts.map +1 -0
- package/dist/src/std-library.js +9 -0
- package/dist/src/std-library.js.map +1 -0
- package/dist/src/typecheck.d.ts.map +1 -1
- package/dist/src/typecheck.js +859 -156
- package/dist/src/typecheck.js.map +1 -1
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.d.ts.map +1 -1
- package/dist/src/version.js +1 -1
- package/dist/src/version.js.map +1 -1
- package/docs/README.md +12 -0
- package/docs/assets/hsx.svg +18 -0
- package/docs/guide/01-first-program.md +2 -2
- package/docs/guide/02-money.md +1 -1
- package/docs/guide/03-instruments.md +44 -3
- package/docs/guide/04-lifecycles.md +18 -3
- package/docs/guide/05-fees-and-splits.md +2 -2
- package/docs/guide/06-schedules.md +1 -1
- package/docs/guide/07-composition.md +8 -2
- package/docs/guide/08-writing-a-module.md +13 -2
- package/docs/guide/09-cost.md +3 -3
- package/docs/guide/10-diagnostics.md +1 -1
- package/docs/llms-full.txt +458 -194
- package/docs/llms.txt +2 -2
- package/docs/playground.md +55 -0
- package/docs/reference/cli.md +5 -3
- package/docs/reference/diagnostics.md +223 -37
- package/docs/reference/grammar.md +2 -2
- package/docs/reference/std/advance.md +2 -2
- package/docs/reference/std/cancellable_booking.md +10 -10
- package/docs/reference/std/captured_payment.md +14 -14
- package/docs/reference/std/conditional_disbursement.md +3 -3
- package/docs/reference/std/credit_facility.md +2 -2
- package/docs/reference/std/held_payment.md +37 -33
- package/docs/reference/std/instant_transfer.md +8 -8
- package/docs/reference/std/metered.md +2 -2
- package/docs/reference/std/pooled_split.md +2 -2
- package/docs/reference/std/premium_forward.md +13 -13
- package/docs/reference/std/reconciled_payout.md +2 -2
- package/docs/reference/std/recurring_collection.md +2 -2
- package/docs/reference/std/rotating_pool.md +2 -2
- package/docs/reference/std/scheduled.md +18 -18
- package/docs/reference/std/security_deposit.md +14 -14
- package/docs/reference/std/settlement_batch.md +2 -2
- package/docs/reference/std/swap.md +18 -18
- package/docs/reference/std/threshold_pool.md +2 -2
- package/docs/reference/std/weighted_distribution.md +2 -2
- package/docs/reference/types.md +1 -1
- package/docs/reference/udl-output.md +2 -3
- package/examples/01-first-program/README.md +1 -1
- package/examples/01-first-program/tip-jar.hsx +1 -1
- package/examples/02-imports-and-archetypes/README.md +1 -4
- package/examples/02-imports-and-archetypes/photo-booth.hsx +1 -1
- package/examples/03-diagnostics/corner-shop-fixed.hsx +1 -1
- package/examples/03-diagnostics/corner-shop.hsx +1 -1
- package/examples/04-complete-product/README.md +0 -3
- package/examples/04-complete-product/study-hall.hsx +1 -1
- package/examples/05-watch-club/README.md +0 -3
- package/examples/05-watch-club/watch-club.hsx +1 -1
- package/examples/README.md +35 -4
- package/examples/advance/advance.hsx +1 -1
- package/examples/advance/advance.udl +10 -5
- package/examples/cancellable_booking/cancellable_booking.hsx +1 -1
- package/examples/cancellable_booking/cancellable_booking.udl +3 -1
- package/examples/captured_payment/captured_payment.hsx +1 -1
- package/examples/captured_payment/captured_payment.udl +4 -1
- package/examples/conditional_disbursement/conditional_disbursement.hsx +1 -1
- package/examples/conditional_disbursement/conditional_disbursement.udl +5 -3
- package/examples/cost-table.json +1602 -382
- package/examples/credit_facility/credit_facility.hsx +1 -1
- package/examples/credit_facility/credit_facility.udl +16 -9
- package/examples/held_payment/held_payment.hsx +1 -1
- package/examples/held_payment/held_payment.udl +38 -3
- package/examples/instant_transfer/instant_transfer.hsx +1 -1
- package/examples/instant_transfer/instant_transfer.udl +11 -5
- package/examples/metered/metered.hsx +1 -1
- package/examples/metered/metered.udl +4 -2
- package/examples/pooled_split/pooled_split.hsx +1 -1
- package/examples/pooled_split/pooled_split.udl +6 -3
- package/examples/premium_forward/premium_forward.hsx +1 -1
- package/examples/premium_forward/premium_forward.udl +10 -4
- package/examples/reconciled_payout/reconciled_payout.hsx +1 -1
- package/examples/reconciled_payout/reconciled_payout.udl +4 -2
- package/examples/recurring_collection/recurring_collection.hsx +1 -1
- package/examples/recurring_collection/recurring_collection.udl +12 -7
- package/examples/rotating_pool/rotating_pool.hsx +1 -1
- package/examples/rotating_pool/rotating_pool.udl +14 -4
- package/examples/scheduled/scheduled.hsx +1 -1
- package/examples/scheduled/scheduled.udl +9 -4
- package/examples/security_deposit/security_deposit.hsx +1 -1
- package/examples/security_deposit/security_deposit.udl +17 -3
- package/examples/settlement_batch/settlement_batch.hsx +1 -1
- package/examples/swap/swap.hsx +1 -1
- package/examples/swap/swap.udl +12 -6
- package/examples/threshold_pool/threshold_pool.hsx +1 -1
- package/examples/threshold_pool/threshold_pool.udl +4 -2
- package/examples/weighted_distribution/weighted_distribution.hsx +1 -1
- package/examples/weighted_distribution/weighted_distribution.udl +4 -2
- package/package.json +15 -6
- package/skills/hsx/SKILL.md +26 -26
- package/src/ast.ts +34 -2
- package/src/cli.ts +32 -13
- package/src/compile.ts +15 -7
- package/src/cost.ts +176 -104
- package/src/diagnostics.ts +89 -4
- package/src/emit.ts +34 -266
- package/src/index.ts +10 -7
- package/src/lsp/server.ts +460 -0
- package/src/modules.ts +21 -13
- package/src/parse.ts +3 -3
- package/src/std-bundle.ts +91 -0
- package/src/std-library.ts +12 -0
- package/src/typecheck.ts +1147 -235
- package/src/version.ts +1 -1
- package/std/SEMANTICS.md +12 -3
- package/std/{settlements → money_flows}/advance.hsx +1 -1
- package/std/{settlements → money_flows}/cancellable_booking.hsx +4 -3
- package/std/{settlements → money_flows}/captured_payment.hsx +35 -6
- package/std/{settlements → money_flows}/conditional_disbursement.hsx +17 -16
- package/std/{settlements → money_flows}/credit_facility.hsx +1 -2
- package/std/{settlements → money_flows}/held_payment.hsx +59 -25
- package/std/money_flows/index.hsx +3 -0
- package/std/{settlements → money_flows}/instant_transfer.hsx +2 -3
- package/std/{settlements → money_flows}/metered.hsx +1 -1
- package/std/{settlements → money_flows}/pooled_split.hsx +3 -3
- package/std/{settlements → money_flows}/premium_forward.hsx +22 -23
- package/std/{settlements → money_flows}/reconciled_payout.hsx +3 -3
- package/std/{settlements → money_flows}/recurring_collection.hsx +1 -1
- package/std/{settlements → money_flows}/rotating_pool.hsx +8 -6
- package/std/{settlements → money_flows}/scheduled.hsx +22 -27
- package/std/{settlements → money_flows}/security_deposit.hsx +38 -14
- package/std/{settlements → money_flows}/settlement_batch.hsx +3 -3
- package/std/{settlements → money_flows}/swap.hsx +41 -16
- package/std/{settlements → money_flows}/threshold_pool.hsx +5 -5
- package/std/{settlements → money_flows}/weighted_distribution.hsx +6 -6
- package/docs/sessions/2026-09-02-two-instruments.hsx +0 -21
- package/docs/sessions/2026-09-02-two-instruments.md +0 -41
- package/std/settlements/index.hsx +0 -3
package/docs/llms-full.txt
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
<!-- Generated by scripts/docs/build.ts for HSX
|
|
1
|
+
<!-- Generated by scripts/docs/build.ts for HSX 2.0.0. Do not edit. -->
|
|
2
2
|
|
|
3
3
|
# HSX full documentation
|
|
4
4
|
|
|
5
5
|
# Your first program
|
|
6
6
|
|
|
7
|
-
An HSX file declares one program, the parties that take part, and the instruments that define its money rules. A settlement applies a standard-library instrument. The compiler checks the application and emits canonical UDL with
|
|
7
|
+
An HSX file declares one program, the parties that take part, and the instruments that define its money rules. A settlement applies a standard-library instrument. The compiler checks the application and emits canonical UDL with an origin map and a cost manifest.
|
|
8
8
|
|
|
9
9
|
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/
|
|
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
|
|
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/
|
|
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
|
|
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 {
|
|
96
|
-
|
|
97
|
-
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
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 {
|
|
237
|
-
|
|
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/
|
|
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`.
|
|
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. 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/
|
|
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
|
|
377
|
+
hsx 2.0.0, the HSX compiler
|
|
305
378
|
|
|
306
379
|
Usage:
|
|
307
380
|
hsx check <file.hsx> [--strict]
|
|
@@ -309,15 +382,17 @@ Usage:
|
|
|
309
382
|
hsx cost <file.hsx> [--json] [--out <file.json>] [--strict]
|
|
310
383
|
hsx explain <HSX####>
|
|
311
384
|
hsx format <file.hsx>
|
|
385
|
+
hsx lsp
|
|
312
386
|
hsx --version
|
|
313
387
|
hsx --help
|
|
314
388
|
|
|
315
389
|
Commands:
|
|
316
390
|
check Compile and report diagnostics. Prints nothing when the program is clean.
|
|
317
|
-
build Compile and write canonical UDL
|
|
391
|
+
build Compile and write canonical UDL as JSON.
|
|
318
392
|
cost Compile and print the version-pinned cost manifest as a table or JSON.
|
|
319
393
|
explain Print one diagnostic title, fix, and source example.
|
|
320
394
|
format Print the source in the one canonical HSX style.
|
|
395
|
+
lsp Run the language server over stdin and stdout.
|
|
321
396
|
|
|
322
397
|
Options:
|
|
323
398
|
--json Print the cost manifest as JSON instead of a table.
|
|
@@ -362,9 +437,13 @@ Fix: Keep exactly one program declaration.
|
|
|
362
437
|
```hsx expect=HSX1002
|
|
363
438
|
program catalog_probe "Catalog probe"
|
|
364
439
|
instrument probe {
|
|
365
|
-
|
|
440
|
+
agent_description: "Probe instrument for catalog diagnostics.";
|
|
441
|
+
fields { }
|
|
366
442
|
lifecycle { states created; initial created; }
|
|
367
|
-
action create {
|
|
443
|
+
action create {
|
|
444
|
+
agent_description: "Create a probe instance.";
|
|
445
|
+
steps: [];
|
|
446
|
+
}
|
|
368
447
|
|
|
369
448
|
}
|
|
370
449
|
program second "Second"
|
|
@@ -389,9 +468,13 @@ Fix: Keep one declaration or give each declaration a distinct name.
|
|
|
389
468
|
```hsx expect=HSX1004
|
|
390
469
|
program catalog_probe "Catalog probe"
|
|
391
470
|
instrument probe {
|
|
392
|
-
|
|
471
|
+
agent_description: "Probe instrument for catalog diagnostics.";
|
|
472
|
+
fields { }
|
|
393
473
|
lifecycle { states created; initial created; }
|
|
394
|
-
action create {
|
|
474
|
+
action create {
|
|
475
|
+
agent_description: "Create a probe instance.";
|
|
476
|
+
steps: [];
|
|
477
|
+
}
|
|
395
478
|
|
|
396
479
|
}
|
|
397
480
|
instrument probe { fields {}; lifecycle { states created; initial created; }; action create { steps: []; }; }
|
|
@@ -437,9 +520,13 @@ Fix: Complete the declaration and bind every referenced decision port.
|
|
|
437
520
|
```hsx expect=HSX1008
|
|
438
521
|
program catalog_probe "Catalog probe"
|
|
439
522
|
instrument probe {
|
|
440
|
-
|
|
523
|
+
agent_description: "Probe instrument for catalog diagnostics.";
|
|
524
|
+
fields { }
|
|
441
525
|
lifecycle { states created; initial created; }
|
|
442
|
-
action create {
|
|
526
|
+
action create {
|
|
527
|
+
agent_description: "Create a probe instance.";
|
|
528
|
+
steps: [];
|
|
529
|
+
}
|
|
443
530
|
|
|
444
531
|
}
|
|
445
532
|
subject vehicle { title: "Vehicle"; }
|
|
@@ -562,11 +649,11 @@ Fix: Expose an action on an explicitly used published instrument.
|
|
|
562
649
|
|
|
563
650
|
No source-only witness exists. This refusal requires a compiler-host published catalog.
|
|
564
651
|
|
|
565
|
-
## HSX1022: Authored instrument
|
|
652
|
+
## HSX1022: Authored instrument collides with published catalog
|
|
566
653
|
|
|
567
654
|
Stage: `typecheck`
|
|
568
655
|
|
|
569
|
-
Fix:
|
|
656
|
+
Fix: Rename the authored instrument to avoid colliding with published catalog instruments.
|
|
570
657
|
|
|
571
658
|
No source-only witness exists. This refusal requires a compiler-host published catalog.
|
|
572
659
|
|
|
@@ -579,13 +666,61 @@ Fix: List declared, non-optional field names once each.
|
|
|
579
666
|
```hsx expect=HSX1023
|
|
580
667
|
program catalog_probe "Catalog probe"
|
|
581
668
|
instrument probe {
|
|
582
|
-
|
|
669
|
+
agent_description: "Probe instrument for catalog diagnostics.";
|
|
670
|
+
fields { }
|
|
583
671
|
lifecycle { states created; initial created; }
|
|
584
|
-
action create {
|
|
672
|
+
action create {
|
|
673
|
+
agent_description: "Create a probe instance.";
|
|
674
|
+
steps: [];
|
|
675
|
+
}
|
|
585
676
|
required: missing;
|
|
586
677
|
}
|
|
587
678
|
```
|
|
588
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
|
+
|
|
589
724
|
## HSX1101: Currency mismatch
|
|
590
725
|
|
|
591
726
|
Stage: `typecheck`
|
|
@@ -595,9 +730,13 @@ Fix: Use the declared currency because money values never coerce.
|
|
|
595
730
|
```hsx expect=HSX1101
|
|
596
731
|
program catalog_probe "Catalog probe"
|
|
597
732
|
instrument probe {
|
|
598
|
-
|
|
733
|
+
agent_description: "Probe instrument for catalog diagnostics.";
|
|
734
|
+
fields { }
|
|
599
735
|
lifecycle { states created; initial created; }
|
|
600
|
-
action create {
|
|
736
|
+
action create {
|
|
737
|
+
agent_description: "Create a probe instance.";
|
|
738
|
+
steps: [];
|
|
739
|
+
}
|
|
601
740
|
|
|
602
741
|
}
|
|
603
742
|
const fee: money<SAR> = USD 1.00
|
|
@@ -612,9 +751,13 @@ Fix: Round the literal to the currency's minor-unit precision.
|
|
|
612
751
|
```hsx expect=HSX1102
|
|
613
752
|
program catalog_probe "Catalog probe"
|
|
614
753
|
instrument probe {
|
|
615
|
-
|
|
754
|
+
agent_description: "Probe instrument for catalog diagnostics.";
|
|
755
|
+
fields { }
|
|
616
756
|
lifecycle { states created; initial created; }
|
|
617
|
-
action create {
|
|
757
|
+
action create {
|
|
758
|
+
agent_description: "Create a probe instance.";
|
|
759
|
+
steps: [];
|
|
760
|
+
}
|
|
618
761
|
|
|
619
762
|
}
|
|
620
763
|
const fee: money<SAR> = SAR 1.001
|
|
@@ -629,9 +772,13 @@ Fix: Use an integer, percent, bps, or valid fixed-money binding.
|
|
|
629
772
|
```hsx expect=HSX1103
|
|
630
773
|
program catalog_probe "Catalog probe"
|
|
631
774
|
instrument probe {
|
|
632
|
-
|
|
775
|
+
agent_description: "Probe instrument for catalog diagnostics.";
|
|
776
|
+
fields { }
|
|
633
777
|
lifecycle { states created; initial created; }
|
|
634
|
-
action create {
|
|
778
|
+
action create {
|
|
779
|
+
agent_description: "Create a probe instance.";
|
|
780
|
+
steps: [];
|
|
781
|
+
}
|
|
635
782
|
summary: 1.5;
|
|
636
783
|
}
|
|
637
784
|
```
|
|
@@ -645,9 +792,13 @@ Fix: Pass the type declared by the parameter or UDL slot.
|
|
|
645
792
|
```hsx expect=HSX1104
|
|
646
793
|
program catalog_probe "Catalog probe"
|
|
647
794
|
instrument probe {
|
|
648
|
-
|
|
795
|
+
agent_description: "Probe instrument for catalog diagnostics.";
|
|
796
|
+
fields { }
|
|
649
797
|
lifecycle { states created; initial created; }
|
|
650
|
-
action create {
|
|
798
|
+
action create {
|
|
799
|
+
agent_description: "Create a probe instance.";
|
|
800
|
+
steps: [];
|
|
801
|
+
}
|
|
651
802
|
summary: money(SAR, 2500);
|
|
652
803
|
}
|
|
653
804
|
```
|
|
@@ -678,9 +829,13 @@ Fix: Leave exactly one sink for each produced money value.
|
|
|
678
829
|
```hsx expect=HSX1201
|
|
679
830
|
program catalog_probe "Catalog probe"
|
|
680
831
|
instrument probe {
|
|
681
|
-
|
|
832
|
+
agent_description: "Probe instrument for catalog diagnostics.";
|
|
833
|
+
fields { }
|
|
682
834
|
lifecycle { states created; initial created; }
|
|
683
|
-
action create {
|
|
835
|
+
action create {
|
|
836
|
+
agent_description: "Create a probe instance.";
|
|
837
|
+
steps: [];
|
|
838
|
+
}
|
|
684
839
|
fields { amount: money<SAR>; }
|
|
685
840
|
action pay { computes remainder rest { amount_ref: total; on_zero: refuse; total_path: fields.amount; }; moves: [{ amount: rest; }, { amount: rest; }]; }
|
|
686
841
|
}
|
|
@@ -695,9 +850,13 @@ Fix: Route each produced money value to one explicit sink.
|
|
|
695
850
|
```hsx expect=HSX1202
|
|
696
851
|
program catalog_probe "Catalog probe"
|
|
697
852
|
instrument probe {
|
|
698
|
-
|
|
853
|
+
agent_description: "Probe instrument for catalog diagnostics.";
|
|
854
|
+
fields { }
|
|
699
855
|
lifecycle { states created; initial created; }
|
|
700
|
-
action create {
|
|
856
|
+
action create {
|
|
857
|
+
agent_description: "Create a probe instance.";
|
|
858
|
+
steps: [];
|
|
859
|
+
}
|
|
701
860
|
fields { amount: money<SAR>; }
|
|
702
861
|
action pay { computes remainder rest { amount_ref: total; on_zero: refuse; total_path: fields.amount; }; }
|
|
703
862
|
}
|
|
@@ -712,9 +871,13 @@ Fix: Supply a versioned cost table with a row for every emitted effect.
|
|
|
712
871
|
```hsx expect=HSX1301
|
|
713
872
|
program catalog_probe "Catalog probe"
|
|
714
873
|
instrument probe {
|
|
715
|
-
|
|
874
|
+
agent_description: "Probe instrument for catalog diagnostics.";
|
|
875
|
+
fields { }
|
|
716
876
|
lifecycle { states created; initial created; }
|
|
717
|
-
action create {
|
|
877
|
+
action create {
|
|
878
|
+
agent_description: "Create a probe instance.";
|
|
879
|
+
steps: [];
|
|
880
|
+
}
|
|
718
881
|
|
|
719
882
|
}
|
|
720
883
|
```
|
|
@@ -735,6 +898,46 @@ Fix: Use the supported uppercase cost-table currency.
|
|
|
735
898
|
|
|
736
899
|
No source-only witness exists. This refusal requires an invalid compiler-host cost-table currency.
|
|
737
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
|
+
|
|
738
941
|
## HSX1401: Unbounded action
|
|
739
942
|
|
|
740
943
|
Stage: `typecheck`
|
|
@@ -744,9 +947,13 @@ Fix: Replace runtime iteration with a bounded compile-time comprehension.
|
|
|
744
947
|
```hsx expect=HSX1401
|
|
745
948
|
program catalog_probe "Catalog probe"
|
|
746
949
|
instrument probe {
|
|
747
|
-
|
|
950
|
+
agent_description: "Probe instrument for catalog diagnostics.";
|
|
951
|
+
fields { }
|
|
748
952
|
lifecycle { states created; initial created; }
|
|
749
|
-
action create {
|
|
953
|
+
action create {
|
|
954
|
+
agent_description: "Create a probe instance.";
|
|
955
|
+
steps: [];
|
|
956
|
+
}
|
|
750
957
|
action run { while { condition: true; }; }
|
|
751
958
|
}
|
|
752
959
|
```
|
|
@@ -788,9 +995,13 @@ Fix: Reduce the fixed expansion to the compiler limit.
|
|
|
788
995
|
```hsx expect=HSX1404
|
|
789
996
|
program catalog_probe "Catalog probe"
|
|
790
997
|
instrument probe {
|
|
791
|
-
|
|
998
|
+
agent_description: "Probe instrument for catalog diagnostics.";
|
|
999
|
+
fields { }
|
|
792
1000
|
lifecycle { states created; initial created; }
|
|
793
|
-
action create {
|
|
1001
|
+
action create {
|
|
1002
|
+
agent_description: "Create a probe instance.";
|
|
1003
|
+
steps: [];
|
|
1004
|
+
}
|
|
794
1005
|
for item in 257 { action run_[item] { steps: []; } }
|
|
795
1006
|
}
|
|
796
1007
|
```
|
|
@@ -833,9 +1044,13 @@ Fix: Use a clause exported by the targeted UDL vocabulary.
|
|
|
833
1044
|
```hsx expect=HSX1501
|
|
834
1045
|
program catalog_probe "Catalog probe"
|
|
835
1046
|
instrument probe {
|
|
836
|
-
|
|
1047
|
+
agent_description: "Probe instrument for catalog diagnostics.";
|
|
1048
|
+
fields { }
|
|
837
1049
|
lifecycle { states created; initial created; }
|
|
838
|
-
action create {
|
|
1050
|
+
action create {
|
|
1051
|
+
agent_description: "Create a probe instance.";
|
|
1052
|
+
steps: [];
|
|
1053
|
+
}
|
|
839
1054
|
unknown_clause: true;
|
|
840
1055
|
}
|
|
841
1056
|
```
|
|
@@ -881,9 +1096,13 @@ Fix: Keep one occurrence of the clause.
|
|
|
881
1096
|
```hsx expect=HSX1505
|
|
882
1097
|
program catalog_probe "Catalog probe"
|
|
883
1098
|
instrument probe {
|
|
884
|
-
|
|
1099
|
+
agent_description: "Probe instrument for catalog diagnostics.";
|
|
1100
|
+
fields { }
|
|
885
1101
|
lifecycle { states created; initial created; }
|
|
886
|
-
action create {
|
|
1102
|
+
action create {
|
|
1103
|
+
agent_description: "Create a probe instance.";
|
|
1104
|
+
steps: [];
|
|
1105
|
+
}
|
|
887
1106
|
title: "First"; title: "Second";
|
|
888
1107
|
}
|
|
889
1108
|
```
|
|
@@ -897,9 +1116,13 @@ Fix: Keep either public: none or a public action name.
|
|
|
897
1116
|
```hsx expect=HSX1506
|
|
898
1117
|
program catalog_probe "Catalog probe"
|
|
899
1118
|
instrument probe {
|
|
900
|
-
|
|
1119
|
+
agent_description: "Probe instrument for catalog diagnostics.";
|
|
1120
|
+
fields { }
|
|
901
1121
|
lifecycle { states created; initial created; }
|
|
902
|
-
action create {
|
|
1122
|
+
action create {
|
|
1123
|
+
agent_description: "Create a probe instance.";
|
|
1124
|
+
steps: [];
|
|
1125
|
+
}
|
|
903
1126
|
action finish { public: none; public_action: finishProbe; steps: []; }
|
|
904
1127
|
}
|
|
905
1128
|
```
|
|
@@ -916,6 +1139,40 @@ export instrument template() { fields {}; lifecycle { states created; initial cr
|
|
|
916
1139
|
instrument probe = template() { fields: {}; }
|
|
917
1140
|
```
|
|
918
1141
|
|
|
1142
|
+
## HSX1508: Invalid action-level port syntax
|
|
1143
|
+
|
|
1144
|
+
Stage: `typecheck`
|
|
1145
|
+
|
|
1146
|
+
Fix: Use allowed_parties: [...] inside an action-level port clause; allowed: is for top-level port declarations.
|
|
1147
|
+
|
|
1148
|
+
```hsx expect=HSX1508
|
|
1149
|
+
program catalog_probe "Catalog probe"
|
|
1150
|
+
party approver: person
|
|
1151
|
+
instrument probe {
|
|
1152
|
+
fields {}
|
|
1153
|
+
lifecycle { states created; initial created; }
|
|
1154
|
+
action create {
|
|
1155
|
+
steps: [];
|
|
1156
|
+
port { allowed: [approver]; }
|
|
1157
|
+
}
|
|
1158
|
+
}
|
|
1159
|
+
```
|
|
1160
|
+
|
|
1161
|
+
## HSX1509: Callable action without an agent description
|
|
1162
|
+
|
|
1163
|
+
Stage: `typecheck`
|
|
1164
|
+
|
|
1165
|
+
Fix: Add agent_description: "..." to the instrument and to every action a caller can reach; composer.check refuses the program without them.
|
|
1166
|
+
|
|
1167
|
+
```hsx expect=HSX1509
|
|
1168
|
+
program catalog_probe "Catalog probe"
|
|
1169
|
+
instrument probe {
|
|
1170
|
+
fields {}
|
|
1171
|
+
lifecycle { states created; initial created; }
|
|
1172
|
+
action create { steps: []; }
|
|
1173
|
+
}
|
|
1174
|
+
```
|
|
1175
|
+
|
|
919
1176
|
## HSX1601: Invalid UDL shape
|
|
920
1177
|
|
|
921
1178
|
Stage: `lower`
|
|
@@ -941,9 +1198,13 @@ Fix: Correct compile-time block keys or parameter bindings.
|
|
|
941
1198
|
```hsx expect=HSX1603
|
|
942
1199
|
program catalog_probe "Catalog probe"
|
|
943
1200
|
instrument probe {
|
|
944
|
-
|
|
1201
|
+
agent_description: "Probe instrument for catalog diagnostics.";
|
|
1202
|
+
fields { }
|
|
945
1203
|
lifecycle { states created; initial created; }
|
|
946
|
-
action create {
|
|
1204
|
+
action create {
|
|
1205
|
+
agent_description: "Create a probe instance.";
|
|
1206
|
+
steps: [];
|
|
1207
|
+
}
|
|
947
1208
|
title: "__hsx_none__";
|
|
948
1209
|
}
|
|
949
1210
|
```
|
|
@@ -962,7 +1223,7 @@ The parser is hand-written. This page records the exported lexer vocabulary, the
|
|
|
962
1223
|
|
|
963
1224
|
## Typed clause spellings
|
|
964
1225
|
|
|
965
|
-
`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`
|
|
1226
|
+
`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`
|
|
966
1227
|
|
|
967
1228
|
## Standard-library modules
|
|
968
1229
|
|
|
@@ -988,7 +1249,7 @@ The parser is hand-written. This page records the exported lexer vocabulary, the
|
|
|
988
1249
|
|
|
989
1250
|
# advance
|
|
990
1251
|
|
|
991
|
-
Source: [`std/
|
|
1252
|
+
Source: [`std/money_flows/advance.hsx`](../../../std/money_flows/advance.hsx)
|
|
992
1253
|
|
|
993
1254
|
## Export
|
|
994
1255
|
|
|
@@ -1022,7 +1283,7 @@ None.
|
|
|
1022
1283
|
|
|
1023
1284
|
# cancellable_booking
|
|
1024
1285
|
|
|
1025
|
-
Source: [`std/
|
|
1286
|
+
Source: [`std/money_flows/cancellable_booking.hsx`](../../../std/money_flows/cancellable_booking.hsx)
|
|
1026
1287
|
|
|
1027
1288
|
## Export
|
|
1028
1289
|
|
|
@@ -1045,18 +1306,18 @@ None.
|
|
|
1045
1306
|
|
|
1046
1307
|
## Actions and clauses
|
|
1047
1308
|
|
|
1048
|
-
| Action | Clauses lowered
|
|
1049
|
-
| ---------- |
|
|
1050
|
-
| `create` | `agent description`, `moves`, `steps`, `summary`
|
|
1051
|
-
| `take` | `agent description`, `moves`, `steps`, `summary`
|
|
1052
|
-
| `complete` | `due`, `moves`, `steps`, `summary`
|
|
1053
|
-
| `cancel` | `agent description`, `moves`, `quote`, `steps`, `summary`
|
|
1054
|
-
| `confirm` | `agent description`, `commit`, `moves`, `steps`, `summary`
|
|
1055
|
-
| `retain` | `agent description`, `moves`, `steps`, `summary`
|
|
1309
|
+
| Action | Clauses lowered |
|
|
1310
|
+
| ---------- | ------------------------------------------------------------------------- |
|
|
1311
|
+
| `create` | `agent description`, `moves`, `steps`, `summary` |
|
|
1312
|
+
| `take` | `agent description`, `moves`, `sandbox failure point`, `steps`, `summary` |
|
|
1313
|
+
| `complete` | `due`, `moves`, `steps`, `summary` |
|
|
1314
|
+
| `cancel` | `agent description`, `moves`, `quote`, `steps`, `summary` |
|
|
1315
|
+
| `confirm` | `agent description`, `commit`, `moves`, `steps`, `summary` |
|
|
1316
|
+
| `retain` | `agent description`, `moves`, `steps`, `summary` |
|
|
1056
1317
|
|
|
1057
1318
|
# captured_payment
|
|
1058
1319
|
|
|
1059
|
-
Source: [`std/
|
|
1320
|
+
Source: [`std/money_flows/captured_payment.hsx`](../../../std/money_flows/captured_payment.hsx)
|
|
1060
1321
|
|
|
1061
1322
|
## Export
|
|
1062
1323
|
|
|
@@ -1083,22 +1344,22 @@ Source: [`std/settlements/captured_payment.hsx`](../../../std/settlements/captur
|
|
|
1083
1344
|
|
|
1084
1345
|
## Actions and clauses
|
|
1085
1346
|
|
|
1086
|
-
| Action | Clauses lowered
|
|
1087
|
-
| ------------------ |
|
|
1088
|
-
| `create` | `agent description`, `moves`, `steps`, `summary`
|
|
1089
|
-
| `authorize` | `agent description`, `moves`, `steps`, `summary`
|
|
1090
|
-
| `capture` | `agent description`, `deadline`, `description`, `input`, `moves`, `steps`, `summary`
|
|
1091
|
-
| `capture_more` | `agent description`, `deadline`, `description`, `input`, `moves`, `steps`, `summary`
|
|
1092
|
-
| `settle` | `agent description`, `deadline`, `moves`, `steps`, `summary`
|
|
1093
|
-
| `void` | `agent description`, `moves`, `steps`, `summary`
|
|
1094
|
-
| `expire` | `due`, `moves`, `steps`, `summary`
|
|
1095
|
-
| `settle_on_expiry` | `due`, `moves`, `steps`, `summary`
|
|
1096
|
-
| `correction_name` | `agent description`, `moves`, `port`, `steps`, `summary`
|
|
1097
|
-
| `reversal_name` | `agent description`, `
|
|
1347
|
+
| Action | Clauses lowered |
|
|
1348
|
+
| ------------------ | ------------------------------------------------------------------------------------------------------------- |
|
|
1349
|
+
| `create` | `agent description`, `moves`, `steps`, `summary` |
|
|
1350
|
+
| `authorize` | `agent description`, `moves`, `sandbox failure point`, `steps`, `summary` |
|
|
1351
|
+
| `capture` | `agent description`, `deadline`, `description`, `input`, `moves`, `sandbox failure point`, `steps`, `summary` |
|
|
1352
|
+
| `capture_more` | `agent description`, `deadline`, `description`, `input`, `moves`, `steps`, `summary` |
|
|
1353
|
+
| `settle` | `agent description`, `deadline`, `moves`, `steps`, `summary` |
|
|
1354
|
+
| `void` | `agent description`, `moves`, `steps`, `summary` |
|
|
1355
|
+
| `expire` | `due`, `moves`, `steps`, `summary` |
|
|
1356
|
+
| `settle_on_expiry` | `due`, `moves`, `steps`, `summary` |
|
|
1357
|
+
| `correction_name` | `agent description`, `capture input`, `input`, `moves`, `port`, `steps`, `summary` |
|
|
1358
|
+
| `reversal_name` | `agent description`, `capture input`, `deadline`, `input`, `moves`, `port`, `steps`, `summary` |
|
|
1098
1359
|
|
|
1099
1360
|
# conditional_disbursement
|
|
1100
1361
|
|
|
1101
|
-
Source: [`std/
|
|
1362
|
+
Source: [`std/money_flows/conditional_disbursement.hsx`](../../../std/money_flows/conditional_disbursement.hsx)
|
|
1102
1363
|
|
|
1103
1364
|
## Export
|
|
1104
1365
|
|
|
@@ -1123,14 +1384,14 @@ Source: [`std/settlements/conditional_disbursement.hsx`](../../../std/settlement
|
|
|
1123
1384
|
| Action | Clauses lowered |
|
|
1124
1385
|
| --------- | ------------------------------------------------------------------------------------------------- |
|
|
1125
1386
|
| `create` | `agent description`, `moves`, `steps`, `summary` |
|
|
1126
|
-
| `deny` | `agent description`, `capture input`, `
|
|
1387
|
+
| `deny` | `agent description`, `capture input`, `input`, `moves`, `port`, `steps`, `summary` |
|
|
1127
1388
|
| `create` | `agent description`, `moves`, `steps`, `summary` |
|
|
1128
1389
|
| `approve` | `agent description`, `capture input`, `description`, `input`, `moves`, `port`, `steps`, `summary` |
|
|
1129
1390
|
| `pay` | `agent description`, `moves`, `steps`, `summary` |
|
|
1130
1391
|
|
|
1131
1392
|
# credit_facility
|
|
1132
1393
|
|
|
1133
|
-
Source: [`std/
|
|
1394
|
+
Source: [`std/money_flows/credit_facility.hsx`](../../../std/money_flows/credit_facility.hsx)
|
|
1134
1395
|
|
|
1135
1396
|
## Export
|
|
1136
1397
|
|
|
@@ -1164,7 +1425,7 @@ None.
|
|
|
1164
1425
|
|
|
1165
1426
|
# held_payment
|
|
1166
1427
|
|
|
1167
|
-
Source: [`std/
|
|
1428
|
+
Source: [`std/money_flows/held_payment.hsx`](../../../std/money_flows/held_payment.hsx)
|
|
1168
1429
|
|
|
1169
1430
|
## Export
|
|
1170
1431
|
|
|
@@ -1193,41 +1454,45 @@ Source: [`std/settlements/held_payment.hsx`](../../../std/settlements/held_payme
|
|
|
1193
1454
|
|
|
1194
1455
|
## Actions and clauses
|
|
1195
1456
|
|
|
1196
|
-
| Action | Clauses lowered
|
|
1197
|
-
| --------------------- |
|
|
1198
|
-
| `fund_piece_2` | `agent description`, `moves`, `steps`, `summary`
|
|
1199
|
-
| `fund_piece_3` | `agent description`, `moves`, `steps`, `summary`
|
|
1200
|
-
| `collect_service_fee` | `agent description`, `moves`, `steps`, `summary`
|
|
1201
|
-
| `release_piece_2` | `agent description`, `moves`, `steps`, `summary`
|
|
1202
|
-
| `release_piece_3` | `agent description`, `moves`, `steps`, `summary`
|
|
1203
|
-
| `refund_piece_2` | `agent description`, `moves`, `steps`, `summary`
|
|
1204
|
-
| `refund_piece_3` | `agent description`, `moves`, `steps`, `summary`
|
|
1205
|
-
| `unfund_piece_1` | `agent description`, `moves`, `steps`, `summary`
|
|
1206
|
-
| `unfund_piece_2` | `agent description`, `moves`, `steps`, `summary`
|
|
1207
|
-
| `unfund_piece_3` | `agent description`, `moves`, `steps`, `summary`
|
|
1208
|
-
| `create` | `agent description`, `moves`, `steps`, `summary`
|
|
1209
|
-
| `fund_piece_1` | `agent description`, `moves`, `steps`, `summary`
|
|
1210
|
-
| `release_name` | `agent description`, `deadline`, `
|
|
1211
|
-
| `release_on_deadline` | `due`, `moves`, `steps`, `summary`
|
|
1212
|
-
| `cancel` | `agent description`, `deadline`, `moves`, `steps`, `summary`
|
|
1213
|
-
| `fund_piece_2` | `agent description`, `moves`, `steps`, `summary`
|
|
1214
|
-
| `release_piece_2` | `agent description`, `moves`, `steps`, `summary`
|
|
1215
|
-
| `unfund_piece_1` | `agent description`, `moves`, `steps`, `summary`
|
|
1216
|
-
| `fund_piece_2` | `agent description`, `moves`, `steps`, `summary`
|
|
1217
|
-
| `release_piece_2` | `agent description`, `moves`, `steps`, `summary`
|
|
1218
|
-
| `refund_piece_2` | `agent description`, `moves`, `steps`, `summary`
|
|
1219
|
-
| `unfund_piece_1` | `agent description`, `moves`, `steps`, `summary`
|
|
1220
|
-
| `abandon` | `agent description`, `moves`, `steps`, `summary`
|
|
1221
|
-
| `
|
|
1222
|
-
| `
|
|
1223
|
-
| `
|
|
1224
|
-
| `
|
|
1225
|
-
| `
|
|
1226
|
-
| `
|
|
1457
|
+
| Action | Clauses lowered |
|
|
1458
|
+
| --------------------- | ------------------------------------------------------------------------------------------------------ |
|
|
1459
|
+
| `fund_piece_2` | `agent description`, `moves`, `sandbox failure point`, `steps`, `summary` |
|
|
1460
|
+
| `fund_piece_3` | `agent description`, `moves`, `sandbox failure point`, `steps`, `summary` |
|
|
1461
|
+
| `collect_service_fee` | `agent description`, `moves`, `steps`, `summary` |
|
|
1462
|
+
| `release_piece_2` | `agent description`, `moves`, `steps`, `summary` |
|
|
1463
|
+
| `release_piece_3` | `agent description`, `moves`, `steps`, `summary` |
|
|
1464
|
+
| `refund_piece_2` | `agent description`, `moves`, `steps`, `summary` |
|
|
1465
|
+
| `refund_piece_3` | `agent description`, `moves`, `steps`, `summary` |
|
|
1466
|
+
| `unfund_piece_1` | `agent description`, `moves`, `steps`, `summary` |
|
|
1467
|
+
| `unfund_piece_2` | `agent description`, `moves`, `steps`, `summary` |
|
|
1468
|
+
| `unfund_piece_3` | `agent description`, `moves`, `steps`, `summary` |
|
|
1469
|
+
| `create` | `agent description`, `moves`, `steps`, `summary` |
|
|
1470
|
+
| `fund_piece_1` | `agent description`, `moves`, `sandbox failure point`, `steps`, `summary` |
|
|
1471
|
+
| `release_name` | `agent description`, `deadline`, `input`, `moves`, `port`, `sandbox failure point`, `steps`, `summary` |
|
|
1472
|
+
| `release_on_deadline` | `due`, `moves`, `steps`, `summary` |
|
|
1473
|
+
| `cancel` | `agent description`, `deadline`, `moves`, `steps`, `summary` |
|
|
1474
|
+
| `fund_piece_2` | `agent description`, `moves`, `sandbox failure point`, `steps`, `summary` |
|
|
1475
|
+
| `release_piece_2` | `agent description`, `moves`, `steps`, `summary` |
|
|
1476
|
+
| `unfund_piece_1` | `agent description`, `moves`, `steps`, `summary` |
|
|
1477
|
+
| `fund_piece_2` | `agent description`, `moves`, `sandbox failure point`, `steps`, `summary` |
|
|
1478
|
+
| `release_piece_2` | `agent description`, `moves`, `steps`, `summary` |
|
|
1479
|
+
| `refund_piece_2` | `agent description`, `moves`, `steps`, `summary` |
|
|
1480
|
+
| `unfund_piece_1` | `agent description`, `moves`, `steps`, `summary` |
|
|
1481
|
+
| `abandon` | `agent description`, `moves`, `steps`, `summary` |
|
|
1482
|
+
| `dispute` | `agent description`, `description`, `moves`, `steps`, `summary` |
|
|
1483
|
+
| `resume` | `agent description`, `description`, `moves`, `steps`, `summary` |
|
|
1484
|
+
| `create` | `agent description`, `moves`, `steps`, `summary` |
|
|
1485
|
+
| `fund` | `agent description`, `moves`, `sandbox failure point`, `steps`, `summary` |
|
|
1486
|
+
| `release_action` | `agent description`, `deadline`, `moves`, `port`, `sandbox failure point`, `steps`, `summary` |
|
|
1487
|
+
| `release_on_deadline` | `due`, `event name`, `moves`, `steps`, `summary` |
|
|
1488
|
+
| `cancel` | `agent description`, `deadline`, `event name`, `moves`, `steps`, `summary` |
|
|
1489
|
+
| `abandon` | `agent description`, `moves`, `steps`, `summary` |
|
|
1490
|
+
| `dispute` | `agent description`, `description`, `moves`, `steps`, `summary` |
|
|
1491
|
+
| `resume` | `agent description`, `description`, `moves`, `steps`, `summary` |
|
|
1227
1492
|
|
|
1228
1493
|
# instant_transfer
|
|
1229
1494
|
|
|
1230
|
-
Source: [`std/
|
|
1495
|
+
Source: [`std/money_flows/instant_transfer.hsx`](../../../std/money_flows/instant_transfer.hsx)
|
|
1231
1496
|
|
|
1232
1497
|
## Export
|
|
1233
1498
|
|
|
@@ -1247,16 +1512,16 @@ None.
|
|
|
1247
1512
|
|
|
1248
1513
|
## Actions and clauses
|
|
1249
1514
|
|
|
1250
|
-
| Action | Clauses lowered
|
|
1251
|
-
| --------------------- |
|
|
1252
|
-
| `create` | `agent description`, `moves`, `steps`, `summary`
|
|
1253
|
-
| `pay_piece_1` | `agent description`, `moves`, `steps`, `summary` |
|
|
1254
|
-
| `pay_piece_2` | `agent description`, `moves`, `steps`, `summary`
|
|
1255
|
-
| `collect_service_fee` | `agent description`, `moves`, `steps`, `summary`
|
|
1515
|
+
| Action | Clauses lowered |
|
|
1516
|
+
| --------------------- | ------------------------------------------------------------------------- |
|
|
1517
|
+
| `create` | `agent description`, `moves`, `steps`, `summary` |
|
|
1518
|
+
| `pay_piece_1` | `agent description`, `moves`, `sandbox failure point`, `steps`, `summary` |
|
|
1519
|
+
| `pay_piece_2` | `agent description`, `moves`, `steps`, `summary` |
|
|
1520
|
+
| `collect_service_fee` | `agent description`, `moves`, `steps`, `summary` |
|
|
1256
1521
|
|
|
1257
1522
|
# metered
|
|
1258
1523
|
|
|
1259
|
-
Source: [`std/
|
|
1524
|
+
Source: [`std/money_flows/metered.hsx`](../../../std/money_flows/metered.hsx)
|
|
1260
1525
|
|
|
1261
1526
|
## Export
|
|
1262
1527
|
|
|
@@ -1282,7 +1547,7 @@ None.
|
|
|
1282
1547
|
|
|
1283
1548
|
# pooled_split
|
|
1284
1549
|
|
|
1285
|
-
Source: [`std/
|
|
1550
|
+
Source: [`std/money_flows/pooled_split.hsx`](../../../std/money_flows/pooled_split.hsx)
|
|
1286
1551
|
|
|
1287
1552
|
## Export
|
|
1288
1553
|
|
|
@@ -1307,7 +1572,7 @@ None.
|
|
|
1307
1572
|
|
|
1308
1573
|
# premium_forward
|
|
1309
1574
|
|
|
1310
|
-
Source: [`std/
|
|
1575
|
+
Source: [`std/money_flows/premium_forward.hsx`](../../../std/money_flows/premium_forward.hsx)
|
|
1311
1576
|
|
|
1312
1577
|
## Export
|
|
1313
1578
|
|
|
@@ -1331,21 +1596,21 @@ Source: [`std/settlements/premium_forward.hsx`](../../../std/settlements/premium
|
|
|
1331
1596
|
|
|
1332
1597
|
## Actions and clauses
|
|
1333
1598
|
|
|
1334
|
-
| Action | Clauses lowered
|
|
1335
|
-
| ----------------- |
|
|
1336
|
-
| `create` | `agent description`, `steps`, `summary`
|
|
1337
|
-
| `fund_piece_1` | `agent description`, `moves`, `steps`, `summary`
|
|
1338
|
-
| `fund_piece_2` | `agent description`, `moves`, `steps`, `summary`
|
|
1339
|
-
| `bind` | `agent description`, `
|
|
1340
|
-
| `forward_piece_2` | `agent description`, `moves`, `steps`, `summary`
|
|
1341
|
-
| `unfund_piece_1` | `agent description`, `moves`, `steps`, `summary`
|
|
1342
|
-
| `abandon` | `agent description`, `steps`, `summary`
|
|
1343
|
-
| `endorsement` | `agent description`, `capture input`, `
|
|
1344
|
-
| `lapse` | `due`, `steps`, `summary`
|
|
1599
|
+
| Action | Clauses lowered |
|
|
1600
|
+
| ----------------- | ------------------------------------------------------------------------------------------ |
|
|
1601
|
+
| `create` | `agent description`, `steps`, `summary` |
|
|
1602
|
+
| `fund_piece_1` | `agent description`, `moves`, `sandbox failure point`, `steps`, `summary` |
|
|
1603
|
+
| `fund_piece_2` | `agent description`, `moves`, `sandbox failure point`, `steps`, `summary` |
|
|
1604
|
+
| `bind` | `agent description`, `input`, `moves`, `port`, `sandbox failure point`, `steps`, `summary` |
|
|
1605
|
+
| `forward_piece_2` | `agent description`, `moves`, `steps`, `summary` |
|
|
1606
|
+
| `unfund_piece_1` | `agent description`, `moves`, `steps`, `summary` |
|
|
1607
|
+
| `abandon` | `agent description`, `steps`, `summary` |
|
|
1608
|
+
| `endorsement` | `agent description`, `capture input`, `input`, `port`, `steps`, `summary` |
|
|
1609
|
+
| `lapse` | `due`, `steps`, `summary` |
|
|
1345
1610
|
|
|
1346
1611
|
# reconciled_payout
|
|
1347
1612
|
|
|
1348
|
-
Source: [`std/
|
|
1613
|
+
Source: [`std/money_flows/reconciled_payout.hsx`](../../../std/money_flows/reconciled_payout.hsx)
|
|
1349
1614
|
|
|
1350
1615
|
## Export
|
|
1351
1616
|
|
|
@@ -1377,7 +1642,7 @@ None.
|
|
|
1377
1642
|
|
|
1378
1643
|
# recurring_collection
|
|
1379
1644
|
|
|
1380
|
-
Source: [`std/
|
|
1645
|
+
Source: [`std/money_flows/recurring_collection.hsx`](../../../std/money_flows/recurring_collection.hsx)
|
|
1381
1646
|
|
|
1382
1647
|
## Export
|
|
1383
1648
|
|
|
@@ -1401,7 +1666,7 @@ None.
|
|
|
1401
1666
|
|
|
1402
1667
|
# rotating_pool
|
|
1403
1668
|
|
|
1404
|
-
Source: [`std/
|
|
1669
|
+
Source: [`std/money_flows/rotating_pool.hsx`](../../../std/money_flows/rotating_pool.hsx)
|
|
1405
1670
|
|
|
1406
1671
|
## Export
|
|
1407
1672
|
|
|
@@ -1442,7 +1707,7 @@ None.
|
|
|
1442
1707
|
|
|
1443
1708
|
# scheduled
|
|
1444
1709
|
|
|
1445
|
-
Source: [`std/
|
|
1710
|
+
Source: [`std/money_flows/scheduled.hsx`](../../../std/money_flows/scheduled.hsx)
|
|
1446
1711
|
|
|
1447
1712
|
## Export
|
|
1448
1713
|
|
|
@@ -1473,26 +1738,26 @@ Source: [`std/settlements/scheduled.hsx`](../../../std/settlements/scheduled.hsx
|
|
|
1473
1738
|
|
|
1474
1739
|
## Actions and clauses
|
|
1475
1740
|
|
|
1476
|
-
| Action | Clauses lowered
|
|
1477
|
-
| ------------------- |
|
|
1478
|
-
| `create` | `agent description`, `steps`, `summary`
|
|
1479
|
-
| `create` | `agent description`, `moves`, `steps`, `summary`
|
|
1480
|
-
| `approve` | `agent description`, `steps`, `summary`
|
|
1481
|
-
| `advance` | `agent description`, `moves`, `steps`, `summary`
|
|
1482
|
-
| `delinquent_action` | `due`, `sets at`, `steps`, `summary`
|
|
1483
|
-
| `complete` | `due`, `steps`, `summary`
|
|
1484
|
-
| `write_off` | `agent description`, `steps`, `summary`
|
|
1485
|
-
| `create` | `agent description`, `steps`, `summary`
|
|
1486
|
-
| `repay` | `agent description`, `capture input`, `description`, `input`, `moves`, `port`, `steps`, `summary`
|
|
1487
|
-
| `refund` | `agent description`, `moves`, `steps`, `summary`
|
|
1488
|
-
| `create` | `agent description`, `steps`, `summary`
|
|
1489
|
-
| `open_period` | `due`, `steps`, `summary`
|
|
1490
|
-
| `collect_period` | `agent description`, `capture input`, `description`, `input`, `moves`, `port`, `steps`, `summary` |
|
|
1491
|
-
| `until` | `agent description`, `capture input`, `
|
|
1741
|
+
| Action | Clauses lowered |
|
|
1742
|
+
| ------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
|
1743
|
+
| `create` | `agent description`, `steps`, `summary` |
|
|
1744
|
+
| `create` | `agent description`, `moves`, `steps`, `summary` |
|
|
1745
|
+
| `approve` | `agent description`, `steps`, `summary` |
|
|
1746
|
+
| `advance` | `agent description`, `moves`, `steps`, `summary` |
|
|
1747
|
+
| `delinquent_action` | `due`, `sets at`, `steps`, `summary` |
|
|
1748
|
+
| `complete` | `due`, `steps`, `summary` |
|
|
1749
|
+
| `write_off` | `agent description`, `steps`, `summary` |
|
|
1750
|
+
| `create` | `agent description`, `steps`, `summary` |
|
|
1751
|
+
| `repay` | `agent description`, `capture input`, `description`, `input`, `moves`, `port`, `steps`, `summary` |
|
|
1752
|
+
| `refund` | `agent description`, `moves`, `steps`, `summary` |
|
|
1753
|
+
| `create` | `agent description`, `steps`, `summary` |
|
|
1754
|
+
| `open_period` | `due`, `steps`, `summary` |
|
|
1755
|
+
| `collect_period` | `agent description`, `capture input`, `description`, `input`, `moves`, `port`, `sandbox failure point`, `steps`, `summary` |
|
|
1756
|
+
| `until` | `agent description`, `capture input`, `input`, `port`, `steps`, `summary` |
|
|
1492
1757
|
|
|
1493
1758
|
# security_deposit
|
|
1494
1759
|
|
|
1495
|
-
Source: [`std/
|
|
1760
|
+
Source: [`std/money_flows/security_deposit.hsx`](../../../std/money_flows/security_deposit.hsx)
|
|
1496
1761
|
|
|
1497
1762
|
## Export
|
|
1498
1763
|
|
|
@@ -1522,22 +1787,22 @@ Source: [`std/settlements/security_deposit.hsx`](../../../std/settlements/securi
|
|
|
1522
1787
|
|
|
1523
1788
|
## Actions and clauses
|
|
1524
1789
|
|
|
1525
|
-
| Action | Clauses lowered
|
|
1526
|
-
| --------------- |
|
|
1527
|
-
| `create` | `agent description`, `moves`, `steps`, `summary`
|
|
1528
|
-
| `place_deposit` | `agent description`, `moves`, `steps`, `summary` |
|
|
1529
|
-
| `claim_name` | `agent description`, `
|
|
1530
|
-
| `return_name` | `agent description`, `moves`, `steps`, `summary`
|
|
1531
|
-
| `create` | `agent description`, `deadline`, `moves`, `steps`, `summary`
|
|
1532
|
-
| `fund` | `agent description`, `deadline`, `moves`, `sandbox failure point`, `steps`, `summary`
|
|
1533
|
-
| `claim` | `agent description`, `capture input`, `deadline`, `decided amount`, `input`, `moves`, `port`, `steps`, `summary` |
|
|
1534
|
-
| `return` | `agent description`, `deadline`, `moves`, `port`, `steps`, `summary`
|
|
1535
|
-
| `expire` | `due`, `moves`, `steps`, `summary`
|
|
1536
|
-
| `cancel` | `agent description`, `moves`, `steps`, `summary`
|
|
1790
|
+
| Action | Clauses lowered |
|
|
1791
|
+
| --------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1792
|
+
| `create` | `agent description`, `moves`, `steps`, `summary` |
|
|
1793
|
+
| `place_deposit` | `agent description`, `moves`, `sandbox failure point`, `steps`, `summary` |
|
|
1794
|
+
| `claim_name` | `agent description`, `input`, `moves`, `port`, `steps`, `summary` |
|
|
1795
|
+
| `return_name` | `agent description`, `capture input`, `input`, `moves`, `port`, `steps`, `summary` |
|
|
1796
|
+
| `create` | `agent description`, `deadline`, `moves`, `steps`, `summary` |
|
|
1797
|
+
| `fund` | `agent description`, `deadline`, `moves`, `sandbox failure point`, `steps`, `summary` |
|
|
1798
|
+
| `claim` | `agent description`, `capture input`, `deadline`, `decided amount`, `input`, `moves`, `port`, `sandbox failure point`, `steps`, `summary` |
|
|
1799
|
+
| `return` | `agent description`, `deadline`, `moves`, `port`, `steps`, `summary` |
|
|
1800
|
+
| `expire` | `due`, `moves`, `steps`, `summary` |
|
|
1801
|
+
| `cancel` | `agent description`, `moves`, `steps`, `summary` |
|
|
1537
1802
|
|
|
1538
1803
|
# settlement_batch
|
|
1539
1804
|
|
|
1540
|
-
Source: [`std/
|
|
1805
|
+
Source: [`std/money_flows/settlement_batch.hsx`](../../../std/money_flows/settlement_batch.hsx)
|
|
1541
1806
|
|
|
1542
1807
|
## Export
|
|
1543
1808
|
|
|
@@ -1578,7 +1843,7 @@ Source: [`std/settlements/settlement_batch.hsx`](../../../std/settlements/settle
|
|
|
1578
1843
|
|
|
1579
1844
|
# swap
|
|
1580
1845
|
|
|
1581
|
-
Source: [`std/
|
|
1846
|
+
Source: [`std/money_flows/swap.hsx`](../../../std/money_flows/swap.hsx)
|
|
1582
1847
|
|
|
1583
1848
|
## Export
|
|
1584
1849
|
|
|
@@ -1604,26 +1869,26 @@ Source: [`std/settlements/swap.hsx`](../../../std/settlements/swap.hsx)
|
|
|
1604
1869
|
|
|
1605
1870
|
## Actions and clauses
|
|
1606
1871
|
|
|
1607
|
-
| Action | Clauses lowered
|
|
1608
|
-
| --------- |
|
|
1609
|
-
| `abandon` | `agent description`, `moves`, `public action`, `steps`, `summary`
|
|
1610
|
-
| `cancel` | `agent description`, `moves`, `public action`, `steps`, `summary`
|
|
1611
|
-
| `create` | `agent description`, `moves`, `public action`, `steps`, `summary`
|
|
1612
|
-
| `dispute` | `agent description`, `deadline`, `moves`, `port`, `public action`, `steps`, `summary`
|
|
1613
|
-
| `fund` | `agent description`, `moves`, `public action`, `steps`, `summary`
|
|
1614
|
-
| `post` | `due`, `moves`, `steps`, `summary`
|
|
1615
|
-
| `release` | `agent description`, `moves`, `port`, `public action`, `sets at`, `steps`, `summary`
|
|
1616
|
-
| `create` | `agent description`, `moves`, `public action`, `steps`, `summary`
|
|
1617
|
-
| `fund` | `agent description`, `event name`, `moves`, `public action`, `sandbox failure point`, `steps`, `summary`
|
|
1618
|
-
| `release` | `agent description`, `event name`, `moves`, `port`, `public action`, `sandbox failure point`, `sets at`, `steps`, `summary`
|
|
1619
|
-
| `post` | `due`, `event name`, `moves`, `steps`, `summary`
|
|
1620
|
-
| `dispute` | `agent description`, `deadline`, `event name`, `moves`, `port`, `public action`, `steps`, `summary`
|
|
1621
|
-
| `cancel` | `agent description`, `event name`, `moves`, `public action`, `steps`, `summary`
|
|
1622
|
-
| `abandon` | `agent description`, `event name`, `moves`, `public action`, `steps`, `summary`
|
|
1872
|
+
| Action | Clauses lowered |
|
|
1873
|
+
| --------- | ----------------------------------------------------------------------------------------------------------------------------- |
|
|
1874
|
+
| `abandon` | `agent description`, `moves`, `public action`, `steps`, `summary` |
|
|
1875
|
+
| `cancel` | `agent description`, `moves`, `public action`, `steps`, `summary` |
|
|
1876
|
+
| `create` | `agent description`, `moves`, `public action`, `steps`, `summary` |
|
|
1877
|
+
| `dispute` | `agent description`, `capture input`, `deadline`, `input`, `moves`, `port`, `public action`, `steps`, `summary` |
|
|
1878
|
+
| `fund` | `agent description`, `moves`, `public action`, `sandbox failure point`, `steps`, `summary` |
|
|
1879
|
+
| `post` | `due`, `moves`, `steps`, `summary` |
|
|
1880
|
+
| `release` | `agent description`, `moves`, `port`, `public action`, `sandbox failure point`, `sets at`, `steps`, `summary` |
|
|
1881
|
+
| `create` | `agent description`, `moves`, `public action`, `steps`, `summary` |
|
|
1882
|
+
| `fund` | `agent description`, `event name`, `moves`, `public action`, `sandbox failure point`, `steps`, `summary` |
|
|
1883
|
+
| `release` | `agent description`, `event name`, `moves`, `port`, `public action`, `sandbox failure point`, `sets at`, `steps`, `summary` |
|
|
1884
|
+
| `post` | `due`, `event name`, `moves`, `steps`, `summary` |
|
|
1885
|
+
| `dispute` | `agent description`, `capture input`, `deadline`, `event name`, `input`, `moves`, `port`, `public action`, `steps`, `summary` |
|
|
1886
|
+
| `cancel` | `agent description`, `event name`, `moves`, `public action`, `steps`, `summary` |
|
|
1887
|
+
| `abandon` | `agent description`, `event name`, `moves`, `public action`, `steps`, `summary` |
|
|
1623
1888
|
|
|
1624
1889
|
# threshold_pool
|
|
1625
1890
|
|
|
1626
|
-
Source: [`std/
|
|
1891
|
+
Source: [`std/money_flows/threshold_pool.hsx`](../../../std/money_flows/threshold_pool.hsx)
|
|
1627
1892
|
|
|
1628
1893
|
## Export
|
|
1629
1894
|
|
|
@@ -1669,7 +1934,7 @@ None.
|
|
|
1669
1934
|
|
|
1670
1935
|
# weighted_distribution
|
|
1671
1936
|
|
|
1672
|
-
Source: [`std/
|
|
1937
|
+
Source: [`std/money_flows/weighted_distribution.hsx`](../../../std/money_flows/weighted_distribution.hsx)
|
|
1673
1938
|
|
|
1674
1939
|
## Export
|
|
1675
1940
|
|
|
@@ -1726,12 +1991,11 @@ HSX checks types before it emits UDL. Money and account values carry a currency
|
|
|
1726
1991
|
|
|
1727
1992
|
# UDL output
|
|
1728
1993
|
|
|
1729
|
-
An accepted compile returns
|
|
1994
|
+
An accepted compile returns three artifacts.
|
|
1730
1995
|
|
|
1731
1996
|
| Artifact | Contents |
|
|
1732
1997
|
| -------------- | ----------------------------------------------------------------------------------- |
|
|
1733
1998
|
| `document` | The canonical UDL object. Serialize it with `serializeUdl` from `@hyperscale0/udl`. |
|
|
1734
|
-
| `frame` | The Business Frame paired with the document. |
|
|
1735
1999
|
| `originMap` | Canonical UDL paths mapped to authored HSX spans. |
|
|
1736
2000
|
| `costManifest` | The deterministic manifest pinned to the supplied rate card. |
|
|
1737
2001
|
|