@hyperscale0/hsx 1.0.0-beta.1 → 1.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.
Files changed (255) hide show
  1. package/CHANGELOG.md +58 -9
  2. package/LICENSING.md +3 -3
  3. package/README.md +39 -149
  4. package/TRADEMARKS.md +4 -4
  5. package/bin/hsx.ts +2 -0
  6. package/dist/bin/hsx.js +2 -0
  7. package/dist/bin/hsx.js.map +1 -1
  8. package/dist/src/ast.d.ts +135 -10
  9. package/dist/src/ast.d.ts.map +1 -1
  10. package/dist/src/ast.js +24 -0
  11. package/dist/src/ast.js.map +1 -1
  12. package/dist/src/cli.d.ts +4 -1
  13. package/dist/src/cli.d.ts.map +1 -1
  14. package/dist/src/cli.js +172 -16
  15. package/dist/src/cli.js.map +1 -1
  16. package/dist/src/compile.d.ts +42 -7
  17. package/dist/src/compile.d.ts.map +1 -1
  18. package/dist/src/compile.js +82 -16
  19. package/dist/src/compile.js.map +1 -1
  20. package/dist/src/cost.d.ts +78 -0
  21. package/dist/src/cost.d.ts.map +1 -0
  22. package/dist/src/cost.js +369 -0
  23. package/dist/src/cost.js.map +1 -0
  24. package/dist/src/diagnostics.d.ts +11 -0
  25. package/dist/src/diagnostics.d.ts.map +1 -0
  26. package/dist/src/diagnostics.js +420 -0
  27. package/dist/src/diagnostics.js.map +1 -0
  28. package/dist/src/emit.d.ts +34 -0
  29. package/dist/src/emit.d.ts.map +1 -0
  30. package/dist/src/emit.js +137 -0
  31. package/dist/src/emit.js.map +1 -0
  32. package/dist/src/entry-overrides.d.ts +17 -3
  33. package/dist/src/entry-overrides.d.ts.map +1 -1
  34. package/dist/src/entry-overrides.js +180 -35
  35. package/dist/src/entry-overrides.js.map +1 -1
  36. package/dist/src/format.d.ts +10 -0
  37. package/dist/src/format.d.ts.map +1 -0
  38. package/dist/src/format.js +183 -0
  39. package/dist/src/format.js.map +1 -0
  40. package/dist/src/index.d.ts +11 -4
  41. package/dist/src/index.d.ts.map +1 -1
  42. package/dist/src/index.js +10 -3
  43. package/dist/src/index.js.map +1 -1
  44. package/dist/src/ir.d.ts +66 -0
  45. package/dist/src/ir.d.ts.map +1 -0
  46. package/dist/src/ir.js +15 -0
  47. package/dist/src/ir.js.map +1 -0
  48. package/dist/src/lex.d.ts +9 -1
  49. package/dist/src/lex.d.ts.map +1 -1
  50. package/dist/src/lex.js +50 -4
  51. package/dist/src/lex.js.map +1 -1
  52. package/dist/src/limits.d.ts +2 -3
  53. package/dist/src/limits.d.ts.map +1 -1
  54. package/dist/src/limits.js +2 -3
  55. package/dist/src/limits.js.map +1 -1
  56. package/dist/src/lsp/server.d.ts +32 -0
  57. package/dist/src/lsp/server.d.ts.map +1 -0
  58. package/dist/src/lsp/server.js +391 -0
  59. package/dist/src/lsp/server.js.map +1 -0
  60. package/dist/src/modules.d.ts +38 -0
  61. package/dist/src/modules.d.ts.map +1 -0
  62. package/dist/src/modules.js +368 -0
  63. package/dist/src/modules.js.map +1 -0
  64. package/dist/src/parse.d.ts.map +1 -1
  65. package/dist/src/parse.js +590 -17
  66. package/dist/src/parse.js.map +1 -1
  67. package/dist/src/std-bundle.d.ts +2 -0
  68. package/dist/src/std-bundle.d.ts.map +1 -0
  69. package/dist/src/std-bundle.js +88 -0
  70. package/dist/src/std-bundle.js.map +1 -0
  71. package/dist/src/std-library.d.ts +5 -0
  72. package/dist/src/std-library.d.ts.map +1 -0
  73. package/dist/src/std-library.js +9 -0
  74. package/dist/src/std-library.js.map +1 -0
  75. package/dist/src/typecheck.d.ts +8 -0
  76. package/dist/src/typecheck.d.ts.map +1 -0
  77. package/dist/src/typecheck.js +2958 -0
  78. package/dist/src/typecheck.js.map +1 -0
  79. package/dist/src/version.d.ts +4 -15
  80. package/dist/src/version.d.ts.map +1 -1
  81. package/dist/src/version.js +4 -15
  82. package/dist/src/version.js.map +1 -1
  83. package/docs/README.md +26 -0
  84. package/docs/guide/01-first-program.md +24 -0
  85. package/docs/guide/02-money.md +25 -0
  86. package/docs/guide/03-instruments.md +22 -0
  87. package/docs/guide/04-lifecycles.md +25 -0
  88. package/docs/guide/05-fees-and-splits.md +45 -0
  89. package/docs/guide/06-schedules.md +22 -0
  90. package/docs/guide/07-composition.md +46 -0
  91. package/docs/guide/08-writing-a-module.md +26 -0
  92. package/docs/guide/09-cost.md +24 -0
  93. package/docs/guide/10-diagnostics.md +27 -0
  94. package/docs/llms-full.txt +1739 -0
  95. package/docs/llms.txt +45 -0
  96. package/docs/playground.md +54 -0
  97. package/docs/reference/cli.md +35 -0
  98. package/docs/reference/diagnostics.md +619 -0
  99. package/docs/reference/grammar.md +39 -0
  100. package/docs/reference/std/advance.md +35 -0
  101. package/docs/reference/std/cancellable_booking.md +35 -0
  102. package/docs/reference/std/captured_payment.md +43 -0
  103. package/docs/reference/std/conditional_disbursement.md +33 -0
  104. package/docs/reference/std/credit_facility.md +35 -0
  105. package/docs/reference/std/held_payment.md +64 -0
  106. package/docs/reference/std/instant_transfer.md +30 -0
  107. package/docs/reference/std/metered.md +27 -0
  108. package/docs/reference/std/pooled_split.md +26 -0
  109. package/docs/reference/std/premium_forward.md +39 -0
  110. package/docs/reference/std/reconciled_payout.md +33 -0
  111. package/docs/reference/std/recurring_collection.md +25 -0
  112. package/docs/reference/std/rotating_pool.md +42 -0
  113. package/docs/reference/std/scheduled.md +51 -0
  114. package/docs/reference/std/security_deposit.md +46 -0
  115. package/docs/reference/std/settlement_batch.md +42 -0
  116. package/docs/reference/std/swap.md +46 -0
  117. package/docs/reference/std/threshold_pool.md +47 -0
  118. package/docs/reference/std/weighted_distribution.md +39 -0
  119. package/docs/reference/types.md +20 -0
  120. package/docs/reference/udl-output.md +13 -0
  121. package/docs/sessions/2026-09-02-two-instruments.hsx +21 -0
  122. package/docs/sessions/2026-09-02-two-instruments.md +41 -0
  123. package/examples/01-first-program/README.md +45 -0
  124. package/examples/01-first-program/tip-jar.hsx +17 -0
  125. package/examples/02-imports-and-archetypes/README.md +96 -0
  126. package/examples/02-imports-and-archetypes/photo-booth.hsx +37 -0
  127. package/examples/03-diagnostics/README.md +68 -0
  128. package/examples/03-diagnostics/corner-shop-fixed.hsx +22 -0
  129. package/examples/03-diagnostics/corner-shop.hsx +19 -0
  130. package/examples/04-complete-product/README.md +84 -0
  131. package/examples/04-complete-product/study-hall.hsx +67 -0
  132. package/examples/05-watch-club/README.md +9 -0
  133. package/examples/05-watch-club/watch-club.hsx +124 -0
  134. package/examples/README.md +18 -0
  135. package/examples/advance/README.md +3 -0
  136. package/examples/advance/advance.hsx +13 -0
  137. package/examples/advance/advance.udl +339 -0
  138. package/examples/cancellable_booking/README.md +3 -0
  139. package/examples/cancellable_booking/cancellable_booking.hsx +14 -0
  140. package/examples/cancellable_booking/cancellable_booking.udl +391 -0
  141. package/examples/captured_payment/README.md +3 -0
  142. package/examples/captured_payment/captured_payment.hsx +21 -0
  143. package/examples/captured_payment/captured_payment.udl +677 -0
  144. package/examples/conditional_disbursement/README.md +3 -0
  145. package/examples/conditional_disbursement/conditional_disbursement.hsx +17 -0
  146. package/examples/conditional_disbursement/conditional_disbursement.udl +412 -0
  147. package/examples/cost-table.json +386 -0
  148. package/examples/credit_facility/README.md +3 -0
  149. package/examples/credit_facility/credit_facility.hsx +27 -0
  150. package/examples/credit_facility/credit_facility.udl +1373 -0
  151. package/examples/held_payment/README.md +3 -0
  152. package/examples/held_payment/held_payment.hsx +13 -0
  153. package/examples/held_payment/held_payment.udl +507 -0
  154. package/examples/instant_transfer/README.md +3 -0
  155. package/examples/instant_transfer/instant_transfer.hsx +16 -0
  156. package/examples/instant_transfer/instant_transfer.udl +364 -0
  157. package/examples/metered/README.md +3 -0
  158. package/examples/metered/metered.hsx +13 -0
  159. package/examples/metered/metered.udl +247 -0
  160. package/examples/pooled_split/README.md +3 -0
  161. package/examples/pooled_split/pooled_split.hsx +15 -0
  162. package/examples/pooled_split/pooled_split.udl +425 -0
  163. package/examples/premium_forward/README.md +3 -0
  164. package/examples/premium_forward/premium_forward.hsx +19 -0
  165. package/examples/premium_forward/premium_forward.udl +594 -0
  166. package/examples/reconciled_payout/README.md +3 -0
  167. package/examples/reconciled_payout/reconciled_payout.hsx +13 -0
  168. package/examples/reconciled_payout/reconciled_payout.udl +303 -0
  169. package/examples/recurring_collection/README.md +3 -0
  170. package/examples/recurring_collection/recurring_collection.hsx +21 -0
  171. package/examples/recurring_collection/recurring_collection.udl +1130 -0
  172. package/examples/rotating_pool/README.md +3 -0
  173. package/examples/rotating_pool/rotating_pool.hsx +18 -0
  174. package/examples/rotating_pool/rotating_pool.udl +4352 -0
  175. package/examples/scheduled/README.md +3 -0
  176. package/examples/scheduled/scheduled.hsx +12 -0
  177. package/examples/scheduled/scheduled.udl +335 -0
  178. package/examples/security_deposit/README.md +3 -0
  179. package/examples/security_deposit/security_deposit.hsx +21 -0
  180. package/examples/security_deposit/security_deposit.udl +293 -0
  181. package/examples/settlement_batch/README.md +3 -0
  182. package/examples/settlement_batch/settlement_batch.hsx +19 -0
  183. package/examples/settlement_batch/settlement_batch.udl +753 -0
  184. package/examples/swap/README.md +3 -0
  185. package/examples/swap/swap.hsx +19 -0
  186. package/examples/swap/swap.udl +876 -0
  187. package/examples/threshold_pool/README.md +3 -0
  188. package/examples/threshold_pool/threshold_pool.hsx +16 -0
  189. package/examples/threshold_pool/threshold_pool.udl +667 -0
  190. package/examples/weighted_distribution/README.md +3 -0
  191. package/examples/weighted_distribution/weighted_distribution.hsx +20 -0
  192. package/examples/weighted_distribution/weighted_distribution.udl +337 -0
  193. package/package.json +27 -6
  194. package/skills/hsx/SKILL.md +483 -0
  195. package/src/ast.ts +193 -9
  196. package/src/cli.ts +191 -20
  197. package/src/compile.ts +160 -23
  198. package/src/cost.ts +579 -0
  199. package/src/diagnostics.ts +442 -0
  200. package/src/emit.ts +201 -0
  201. package/src/entry-overrides.ts +263 -48
  202. package/src/format.ts +261 -0
  203. package/src/index.ts +34 -4
  204. package/src/ir.ts +99 -0
  205. package/src/lex.ts +59 -4
  206. package/src/limits.ts +2 -3
  207. package/src/lsp/server.ts +460 -0
  208. package/src/modules.ts +446 -0
  209. package/src/parse.ts +655 -21
  210. package/src/std-bundle.ts +91 -0
  211. package/src/std-library.ts +12 -0
  212. package/src/typecheck.ts +3876 -0
  213. package/src/version.ts +4 -16
  214. package/std/SEMANTICS.md +130 -0
  215. package/std/settlements/advance.hsx +177 -0
  216. package/std/settlements/cancellable_booking.hsx +87 -0
  217. package/std/settlements/captured_payment.hsx +144 -0
  218. package/std/settlements/conditional_disbursement.hsx +185 -0
  219. package/std/settlements/credit_facility.hsx +167 -0
  220. package/std/settlements/held_payment.hsx +578 -0
  221. package/std/settlements/index.hsx +3 -0
  222. package/std/settlements/instant_transfer.hsx +190 -0
  223. package/std/settlements/metered.hsx +67 -0
  224. package/std/settlements/pooled_split.hsx +68 -0
  225. package/std/settlements/premium_forward.hsx +257 -0
  226. package/std/settlements/reconciled_payout.hsx +77 -0
  227. package/std/settlements/recurring_collection.hsx +27 -0
  228. package/std/settlements/rotating_pool.hsx +252 -0
  229. package/std/settlements/scheduled.hsx +641 -0
  230. package/std/settlements/security_deposit.hsx +166 -0
  231. package/std/settlements/settlement_batch.hsx +122 -0
  232. package/std/settlements/swap.hsx +1114 -0
  233. package/std/settlements/threshold_pool.hsx +221 -0
  234. package/std/settlements/weighted_distribution.hsx +141 -0
  235. package/dist/src/archetypes.d.ts +0 -17
  236. package/dist/src/archetypes.d.ts.map +0 -1
  237. package/dist/src/archetypes.js +0 -327
  238. package/dist/src/archetypes.js.map +0 -1
  239. package/dist/src/check.d.ts +0 -12
  240. package/dist/src/check.d.ts.map +0 -1
  241. package/dist/src/check.js +0 -1910
  242. package/dist/src/check.js.map +0 -1
  243. package/dist/src/lower.d.ts +0 -146
  244. package/dist/src/lower.d.ts.map +0 -1
  245. package/dist/src/lower.js +0 -4570
  246. package/dist/src/lower.js.map +0 -1
  247. package/dist/src/model.d.ts +0 -467
  248. package/dist/src/model.d.ts.map +0 -1
  249. package/dist/src/model.js +0 -15
  250. package/dist/src/model.js.map +0 -1
  251. package/spec/hsx-ir.schema.json +0 -920
  252. package/src/archetypes.ts +0 -340
  253. package/src/check.ts +0 -2938
  254. package/src/lower.ts +0 -5416
  255. package/src/model.ts +0 -519
@@ -1,467 +0,0 @@
1
- /**
2
- * The checked program model: what an HSX program MEANS once every name
3
- * resolves and every archetype's parameter surface is validated. This is the
4
- * only input the lowering consumes, it never re-reads the AST, and every
5
- * node keeps its source span so later stages report at source coordinates.
6
- */
7
- import type { Span } from "./ast.ts";
8
- import type { ArchetypeName } from "./archetypes.ts";
9
- export declare const PARTY_KINDS: readonly ["business", "person"];
10
- export type PartyKind = (typeof PARTY_KINDS)[number];
11
- export declare const ASSET_KINDS: readonly ["access", "claim", "good", "service", "ticket"];
12
- export type AssetKind = (typeof ASSET_KINDS)[number];
13
- export interface CheckedParty {
14
- readonly kind: PartyKind;
15
- readonly name: string;
16
- readonly origin: Span;
17
- }
18
- export interface CheckedAsset {
19
- readonly kind: AssetKind;
20
- readonly name: string;
21
- readonly origin: Span;
22
- /** Where ownership of the asset itself changes hands. Money stays on-platform either way. */
23
- readonly titleTransfer: "off_platform" | "on_platform";
24
- }
25
- /** A typed money amount the program declares, e.g. `price: money(SAR)`. */
26
- export interface MoneyField {
27
- readonly currency: string;
28
- readonly name: string;
29
- readonly origin: Span;
30
- }
31
- /** One platform fee term: `buyer: 1%`, the named party bears bps to the platform. */
32
- export interface FeeTerm {
33
- readonly bearer: string;
34
- readonly bps: number;
35
- readonly origin: Span;
36
- }
37
- /** One share of a cancellation split: `buyer: 99.5%`. */
38
- export interface SplitShare {
39
- readonly bps: number;
40
- readonly origin: Span;
41
- readonly to: string;
42
- }
43
- /** `on_cancel(funded) { ... }`, how the held amount unwinds, summing to 100%. */
44
- export interface CancelPolicy {
45
- readonly origin: Span;
46
- readonly shares: readonly SplitShare[];
47
- readonly when: "funded";
48
- }
49
- /**
50
- * A finite payment schedule: `count` anchors, one every `every` (a fixed
51
- * calendar-free ISO duration in days or weeks), the first anchored on the
52
- * stored date field `firstDueField`. Finiteness is by construction: count is
53
- * a literal, so the schedule can never be unbounded.
54
- */
55
- export interface ScheduleTerms {
56
- readonly count: number;
57
- /** Fixed ISO duration between anchors, single unit: P<n>D or P<n>W. */
58
- readonly every: {
59
- readonly days: number;
60
- readonly raw: string;
61
- };
62
- /** camelCase date field carrying the first anchor's due date. */
63
- readonly firstDueField: string;
64
- readonly origin: Span;
65
- }
66
- /** One checked reference to an exit that the target archetype exposes. */
67
- export interface CheckedSettlementReference {
68
- readonly exit: string;
69
- readonly origin: Span;
70
- readonly settlement: string;
71
- readonly targetArchetype: ArchetypeName;
72
- }
73
- /**
74
- * The checked `held_payment` instantiation: payer funds `amount` into the
75
- * settlement's own custody; a decision port releases it to the payee; fees
76
- * accrue to the platform; cancellation splits the held amount exactly.
77
- */
78
- export interface CheckedHeldPayment {
79
- readonly amount: MoneyField;
80
- readonly archetype: "held_payment";
81
- readonly fees: readonly FeeTerm[];
82
- readonly name: string;
83
- readonly onCancel?: CancelPolicy;
84
- readonly origin: Span;
85
- readonly payee: string;
86
- readonly payer: string;
87
- readonly release: PortRelease;
88
- /**
89
- * `release: port <p> | at(<field>)`, the camelCase stored date field the
90
- * hold releases to the payee on when no decision was recorded, and the
91
- * cutoff both caller exits share. Absent when the port is the only way out.
92
- */
93
- readonly releaseDeadlineField?: string;
94
- }
95
- /** A fixed, calendar-free decision window. */
96
- interface FixedWindow {
97
- readonly days: number;
98
- readonly raw: string;
99
- }
100
- /**
101
- * A payer reservation that the payee captures in strict partial slices before
102
- * posting the remainder. A full payee correction and a full externally decided
103
- * reversal are separate post-settlement exits. The checked policies refuse
104
- * partial corrections, negative positions, and timeout-driven movement.
105
- */
106
- export interface CheckedCaptureReservation {
107
- readonly amount: MoneyField;
108
- readonly archetype: "captured_payment";
109
- readonly correction: PortRelease;
110
- readonly externalReversal: PortRelease & {
111
- readonly window: FixedWindow;
112
- };
113
- readonly name: string;
114
- readonly origin: Span;
115
- readonly payee: string;
116
- readonly payer: string;
117
- /** Camel-case date field passed to the reservation as its expiry. */
118
- readonly reserveUntilField: string;
119
- }
120
- /**
121
- * A payout batch whose capture entries and signed adjustments freeze at close.
122
- * The checked field names become lineage columns on generated child nouns.
123
- */
124
- export interface CheckedSettlementBatch {
125
- readonly archetype: "settlement_batch";
126
- readonly closeTriggerField: string;
127
- readonly externalReversalReferenceField: string;
128
- readonly feeReferenceField: string;
129
- readonly name: string;
130
- readonly origin: Span;
131
- readonly payoutDestination: string;
132
- readonly payoutAcknowledgement: PortRelease;
133
- /** Camel-case field carrying the external payout beneficiary reference. */
134
- readonly payoutBeneficiaryReferenceField: string;
135
- readonly settlementAccount: string;
136
- readonly sourceCaptureReferenceField: string;
137
- }
138
- /** HSX authoring for the existing all-or-nothing round and commitment pair. */
139
- export interface CheckedFundingRound {
140
- readonly archetype: "funding_round";
141
- readonly beneficiary: string;
142
- readonly cancelPolicy: "before_close";
143
- readonly closeByField: string;
144
- readonly closePolicy: "threshold";
145
- readonly commitment: MoneyField;
146
- readonly contributor: string;
147
- readonly failPolicy: "whole_commitment_refund";
148
- readonly maxContributors: number;
149
- readonly name: string;
150
- readonly origin: Span;
151
- readonly overfundPolicy: "reject";
152
- readonly target: MoneyField;
153
- }
154
- /** A frozen claimant set distributed by deterministic largest remainder. */
155
- export interface CheckedWeightedDistribution {
156
- readonly amount: MoneyField;
157
- readonly archetype: "weighted_distribution";
158
- readonly correctionPolicy: "new_distribution";
159
- readonly maxRecipients: number;
160
- readonly name: string;
161
- readonly origin: Span;
162
- readonly recipient: string;
163
- readonly recordAtField: string;
164
- readonly roundingPolicy: "largest_remainder";
165
- readonly snapshot: PortRelease;
166
- readonly source: string;
167
- readonly weight: MoneyField;
168
- readonly withholdingPolicy: "refuse";
169
- }
170
- /** A reusable draw cap whose linked scheduled obligation owns repayment. */
171
- export interface CheckedCreditFacility {
172
- readonly archetype: "credit_facility";
173
- readonly availabilityPolicy: "revolving" | "non_revolving";
174
- readonly borrower: string;
175
- readonly closePolicy: "no_open_draws";
176
- readonly drawDestination: string;
177
- readonly expiresAtField: string;
178
- readonly expiryPolicy: "freeze_draws";
179
- readonly lender: string;
180
- readonly limit: MoneyField;
181
- readonly name: string;
182
- readonly obligation: CheckedSettlementReference;
183
- readonly origin: Span;
184
- }
185
- /** A mandate and explicit-attempt policy layered onto scheduled obligation payments. */
186
- export interface CheckedRecurringCollection {
187
- readonly archetype: "recurring_collection";
188
- readonly attemptPolicy: "explicit";
189
- readonly failurePolicy: "parent_delinquency";
190
- readonly mandate: PortRelease;
191
- readonly name: string;
192
- readonly obligation: CheckedSettlementReference;
193
- readonly origin: Span;
194
- readonly periodIdempotency: "obligation_and_anchor";
195
- readonly retryPolicy: "explicit_attempt";
196
- }
197
- /** A capped payout decided through stored evidence, with no premium inflow. */
198
- export interface CheckedConditionalDisbursement {
199
- readonly amount: MoneyField;
200
- readonly archetype: "conditional_disbursement";
201
- readonly cap: MoneyField;
202
- readonly decision: PortRelease;
203
- readonly destination: string;
204
- readonly name: string;
205
- readonly origin: Span;
206
- readonly recoveryPolicy: "separate_transfer";
207
- readonly reopenPolicy: "refuse";
208
- readonly source: string;
209
- }
210
- /** A fixed roster whose stored order rotates one exact shared pot per cycle. */
211
- export interface CheckedRotatingPool {
212
- readonly archetype: "rotating_pool";
213
- readonly contribution: MoneyField;
214
- readonly defaultPolicy: "due_condition";
215
- readonly exitPolicy: "before_activation_only";
216
- readonly guaranteePolicy: "funded_only";
217
- readonly guarantor?: string;
218
- readonly members: readonly string[];
219
- readonly name: string;
220
- readonly origin: Span;
221
- readonly payoutOrder: readonly string[];
222
- readonly schedule: ScheduleTerms;
223
- }
224
- /** An exact on-top service fee declared as money, never a caller-computed rate. */
225
- export interface SwapFee {
226
- readonly amount: MoneyField;
227
- readonly bearer: string;
228
- }
229
- /** One side of a strict two-party atomic swap. */
230
- interface SwapSide {
231
- readonly amount: MoneyField;
232
- readonly fee?: SwapFee;
233
- readonly party: string;
234
- }
235
- /**
236
- * The checked `swap`: exactly two parties fund one amount each into the same
237
- * escrow, then the entire exchange releases, settles, cancels, or claws back
238
- * as one indivisible lifecycle.
239
- */
240
- export interface CheckedSwap {
241
- readonly archetype: "swap";
242
- readonly dispute?: PortRelease & {
243
- readonly window: FixedWindow;
244
- };
245
- readonly name: string;
246
- readonly origin: Span;
247
- readonly release: PortRelease;
248
- readonly sides: readonly [SwapSide, SwapSide];
249
- }
250
- /**
251
- * The checked `instant_transfer`: payer pays `amount` straight through to the
252
- * payee, no custody. Fees partition the amount (payee side) or ride on top
253
- * (payer side); the pieces conserve the amount exactly.
254
- */
255
- export interface CheckedInstantTransfer {
256
- readonly amount: MoneyField;
257
- readonly archetype: "instant_transfer";
258
- readonly fees: readonly FeeTerm[];
259
- readonly name: string;
260
- readonly origin: Span;
261
- readonly payee: string;
262
- readonly payer: string;
263
- }
264
- /**
265
- * The checked `premium_forward`: payer funds the premium into custody; a
266
- * decision port binds the policy, which forwards the premium to the carrier
267
- * exactly once, minus the platform's commission. Pre-binding cancellation
268
- * splits the held premium.
269
- */
270
- export interface CheckedPremiumForward {
271
- readonly amount: MoneyField;
272
- readonly archetype: "premium_forward";
273
- /** `bind: port confirm_policy`, the binding condition. */
274
- readonly bind: PortRelease;
275
- readonly carrier: string;
276
- /** Platform commission carved from the premium at forwarding, in bps. */
277
- readonly commissionBps: number;
278
- readonly endorsement?: PortRelease;
279
- readonly endorsementPolicy?: "non_money_only";
280
- readonly lapsePolicy?: "due_condition";
281
- readonly name: string;
282
- readonly onCancel?: CancelPolicy;
283
- readonly origin: Span;
284
- readonly payer: string;
285
- readonly policyReferenceField?: string;
286
- readonly renewalDueField?: string;
287
- readonly renewalPolicy?: "explicit_new_forward";
288
- }
289
- /**
290
- * The checked `deposit`: the held amount is a reservation on the payer's own
291
- * account in the holder's favor, placed as a hold, then either claimed
292
- * (posted to the holder) or returned (voided back to the payer). The hold
293
- * pairing law accounts for the full amount on both exits.
294
- */
295
- export interface CheckedDeposit {
296
- readonly amount: MoneyField;
297
- readonly archetype: "deposit";
298
- /** Port that claims the deposit for the holder. */
299
- readonly claim: PortRelease;
300
- readonly holder: string;
301
- readonly name: string;
302
- readonly origin: Span;
303
- readonly payer: string;
304
- /** Port that returns the deposit to the payer. */
305
- readonly return: PortRelease;
306
- }
307
- /**
308
- * The checked `scheduled`: the total partitions into `count` installments,
309
- * each collected on its own stored-date anchor. The schedule is finite by
310
- * construction and every anchor is its own idempotent verb.
311
- */
312
- interface CheckedScheduledBase {
313
- readonly amount: MoneyField;
314
- readonly archetype: "scheduled";
315
- readonly name: string;
316
- readonly origin: Span;
317
- readonly payee: string;
318
- readonly payer: string;
319
- readonly schedule: ScheduleTerms;
320
- }
321
- /** The original fixed transfer schedule. */
322
- export interface CheckedScheduledTransfer extends CheckedScheduledBase {
323
- readonly mode: "transfer";
324
- }
325
- /**
326
- * The obligation mode of `scheduled`. Each payment names one generated anchor.
327
- * Refunds reverse one stored payment whole. The checker refuses rescheduling
328
- * until the runtime can prove an outstanding-balance carry into a new version.
329
- */
330
- export interface CheckedScheduledObligation extends CheckedScheduledBase {
331
- readonly advanceTo?: string;
332
- readonly debtor: string;
333
- readonly mode: "obligation";
334
- }
335
- export type CheckedScheduled = CheckedScheduledObligation | CheckedScheduledTransfer;
336
- /**
337
- * Where an advance's repayment comes from. `schedule` collects it from the
338
- * advanced party over finite anchors; `carve` takes it out of the release of a
339
- * hold the advanced party is already owed, so the advance never mints money it
340
- * is not secured by.
341
- */
342
- export type AdvanceSource = {
343
- readonly kind: "schedule";
344
- readonly schedule: ScheduleTerms;
345
- } | ({
346
- readonly kind: "carve";
347
- } & CheckedSettlementReference);
348
- /**
349
- * The checked `advance`: the funder disburses the advance to the advanced
350
- * party, who repays it from the source below. Conservation on the advance
351
- * itself is one partition law, the repayable total equals advance + fee, and
352
- * a scheduled source adds a second, that the repayments sum to it.
353
- */
354
- export interface CheckedAdvance {
355
- readonly advanced: string;
356
- readonly amount: MoneyField;
357
- readonly archetype: "advance";
358
- /** The funder's discount on the advance, in bps of the advance amount. */
359
- readonly feeBps: number;
360
- readonly funder: string;
361
- readonly name: string;
362
- readonly origin: Span;
363
- readonly source: AdvanceSource;
364
- }
365
- /** One rate-card line of a metered settlement: a named meter and its unit price. */
366
- export interface MeterRate {
367
- readonly field: MoneyField;
368
- readonly meter: string;
369
- readonly origin: Span;
370
- }
371
- /**
372
- * The checked `metered`: per-unit charges on a committed rate card, each
373
- * usage emission being the ledger transfer itself, until the period closes on
374
- * its stored end date. Emission matches ledger by construction because the
375
- * meter event and the transfer are the same admission.
376
- */
377
- export interface CheckedMetered {
378
- readonly archetype: "metered";
379
- /** camelCase date field carrying the period's close date. */
380
- readonly closeByField: string;
381
- readonly name: string;
382
- readonly origin: Span;
383
- readonly payee: string;
384
- readonly payer: string;
385
- readonly rates: readonly MeterRate[];
386
- }
387
- /**
388
- * The checked `pooled_split`: one instance per payout period. The funder
389
- * pools the period total piece-wise (one piece per recipient share), and the
390
- * pool distributes to the named recipients on the stored payout date. The
391
- * shares sum to 100% and the integer remainder goes to `remainderTo`.
392
- */
393
- export interface CheckedPooledSplit {
394
- readonly amount: MoneyField;
395
- readonly archetype: "pooled_split";
396
- /** camelCase date field carrying the period's payout date. */
397
- readonly distributeDueField: string;
398
- readonly name: string;
399
- readonly origin: Span;
400
- readonly payer: string;
401
- /** The recipient whose piece carries the integer-division remainder. */
402
- readonly remainderTo: string;
403
- readonly shares: readonly SplitShare[];
404
- }
405
- /** Release decided through a decision port: `release: port confirm_handover`. */
406
- interface PortRelease {
407
- readonly origin: Span;
408
- readonly port: string;
409
- }
410
- export type CheckedSettlement = CheckedAdvance | CheckedCaptureReservation | CheckedConditionalDisbursement | CheckedCreditFacility | CheckedDeposit | CheckedFundingRound | CheckedHeldPayment | CheckedInstantTransfer | CheckedMetered | CheckedPooledSplit | CheckedPremiumForward | CheckedRecurringCollection | CheckedRotatingPool | CheckedScheduled | CheckedSettlementBatch | CheckedSwap | CheckedWeightedDistribution;
411
- export type PortFieldType = {
412
- readonly asset: string;
413
- readonly kind: "asset_id";
414
- } | {
415
- readonly currency: string;
416
- readonly kind: "money";
417
- } | {
418
- readonly kind: "date";
419
- } | {
420
- readonly kind: "text";
421
- };
422
- export interface PortField {
423
- readonly name: string;
424
- readonly origin: Span;
425
- readonly type: PortFieldType;
426
- }
427
- /** A decision port: the typed seam where the tenant's own backend decides. */
428
- export interface CheckedPort {
429
- readonly allowed: readonly string[];
430
- readonly fields: readonly PortField[];
431
- readonly name: string;
432
- readonly origin: Span;
433
- }
434
- export interface CheckedProgram {
435
- readonly derivedAmounts: readonly CheckedDerivedAmount[];
436
- readonly assets: readonly CheckedAsset[];
437
- readonly name: string;
438
- readonly parties: readonly CheckedParty[];
439
- readonly ports: readonly CheckedPort[];
440
- readonly settlements: readonly CheckedSettlement[];
441
- readonly title: string;
442
- }
443
- /** One machine-computed percentage of a stored money field. */
444
- export interface CheckedDerivedAmount {
445
- readonly baseField: string;
446
- readonly bearer: string;
447
- readonly bps: number;
448
- readonly field: string;
449
- readonly origin: Span;
450
- readonly settlement: string;
451
- }
452
- /**
453
- * A semantic problem. `error` blocks lowering; `warning` is the compiler's
454
- * lint voice, the program is legal but the author should look.
455
- */
456
- export interface CheckDiagnostic {
457
- readonly message: string;
458
- readonly severity: "error" | "warning";
459
- readonly span: Span;
460
- }
461
- export interface CheckResult {
462
- readonly diagnostics: readonly CheckDiagnostic[];
463
- /** Present exactly when no error-severity diagnostic exists. */
464
- readonly program?: CheckedProgram;
465
- }
466
- export {};
467
- //# sourceMappingURL=model.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../src/model.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,eAAO,MAAM,WAAW,iCAAkC,CAAC;AAC3D,MA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AQ,CAAC,IAAI,EAAE,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,WAAW,EAAE,SAAS,eAAe,EAAE,CAAC;IACjD,gEAAgE;IAChE,QAAQ,CAAC,OAAO,CAAC,EAAE,cAAc,CAAC;CACnC"}
package/dist/src/model.js DELETED
@@ -1,15 +0,0 @@
1
- /**
2
- * The checked program model: what an HSX program MEANS once every name
3
- * resolves and every archetype's parameter surface is validated. This is the
4
- * only input the lowering consumes, it never re-reads the AST, and every
5
- * node keeps its source span so later stages report at source coordinates.
6
- */
7
- export const PARTY_KINDS = ["business", "person"];
8
- export const ASSET_KINDS = [
9
- "access",
10
- "claim",
11
- "good",
12
- "service",
13
- "ticket",
14
- ];
15
- //# sourceMappingURL=model.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"model.js","sourceRoot":"","sources":["../../src/model.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,UAAU,EAAE,QAAQ,CAAU,CAAC;AAG3D,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,QAAQ;IACR,OAAO;IACP,MAAM;IACN,SAAS;IACT,QAAQ;CACA,CAAC"}