@hyperscale0/hsx 1.0.0 → 1.0.124

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 (316) hide show
  1. package/CHANGELOG.md +5 -256
  2. package/LICENSE.md +356 -0
  3. package/NOTICE.md +8 -0
  4. package/README.md +44 -44
  5. package/bin/hsx.ts +0 -7
  6. package/dist/bin/hsx.d.ts +0 -4
  7. package/dist/bin/hsx.d.ts.map +1 -1
  8. package/dist/bin/hsx.js +0 -6
  9. package/dist/bin/hsx.js.map +1 -1
  10. package/dist/src/ast.d.ts +113 -308
  11. package/dist/src/ast.d.ts.map +1 -1
  12. package/dist/src/ast.js +7 -71
  13. package/dist/src/ast.js.map +1 -1
  14. package/dist/src/attachment-economics.d.ts +5 -0
  15. package/dist/src/attachment-economics.d.ts.map +1 -0
  16. package/dist/src/attachment-economics.js +55 -0
  17. package/dist/src/attachment-economics.js.map +1 -0
  18. package/dist/src/binding-contract.d.ts +22 -0
  19. package/dist/src/binding-contract.d.ts.map +1 -0
  20. package/dist/src/binding-contract.js +74 -0
  21. package/dist/src/binding-contract.js.map +1 -0
  22. package/dist/src/cli.d.ts +4 -19
  23. package/dist/src/cli.d.ts.map +1 -1
  24. package/dist/src/cli.js +89 -276
  25. package/dist/src/cli.js.map +1 -1
  26. package/dist/src/compile.d.ts +34 -66
  27. package/dist/src/compile.d.ts.map +1 -1
  28. package/dist/src/compile.js +2949 -117
  29. package/dist/src/compile.js.map +1 -1
  30. package/dist/src/cost.d.ts +8 -75
  31. package/dist/src/cost.d.ts.map +1 -1
  32. package/dist/src/cost.js +54 -364
  33. package/dist/src/cost.js.map +1 -1
  34. package/dist/src/diagnostics.d.ts +14 -9
  35. package/dist/src/diagnostics.d.ts.map +1 -1
  36. package/dist/src/diagnostics.js +39 -416
  37. package/dist/src/diagnostics.js.map +1 -1
  38. package/dist/src/examples-bundle.d.ts +3 -0
  39. package/dist/src/examples-bundle.d.ts.map +1 -0
  40. package/dist/src/examples-bundle.js +18 -0
  41. package/dist/src/examples-bundle.js.map +1 -0
  42. package/dist/src/examples.d.ts +10 -0
  43. package/dist/src/examples.d.ts.map +1 -0
  44. package/dist/src/examples.js +2 -0
  45. package/dist/src/examples.js.map +1 -0
  46. package/dist/src/format.d.ts +8 -7
  47. package/dist/src/format.d.ts.map +1 -1
  48. package/dist/src/format.js +9 -175
  49. package/dist/src/format.js.map +1 -1
  50. package/dist/src/header-source.d.ts +3 -0
  51. package/dist/src/header-source.d.ts.map +1 -0
  52. package/dist/src/header-source.js +41 -0
  53. package/dist/src/header-source.js.map +1 -0
  54. package/dist/src/headers.d.ts +64 -0
  55. package/dist/src/headers.d.ts.map +1 -0
  56. package/dist/src/headers.js +167 -0
  57. package/dist/src/headers.js.map +1 -0
  58. package/dist/src/index.d.ts +7 -11
  59. package/dist/src/index.d.ts.map +1 -1
  60. package/dist/src/index.js +4 -9
  61. package/dist/src/index.js.map +1 -1
  62. package/dist/src/keywords.d.ts +56 -0
  63. package/dist/src/keywords.d.ts.map +1 -0
  64. package/dist/src/keywords.js +133 -0
  65. package/dist/src/keywords.js.map +1 -0
  66. package/dist/src/language.d.ts +26 -0
  67. package/dist/src/language.d.ts.map +1 -0
  68. package/dist/src/language.js +440 -0
  69. package/dist/src/language.js.map +1 -0
  70. package/dist/src/lex.d.ts +13 -28
  71. package/dist/src/lex.d.ts.map +1 -1
  72. package/dist/src/lex.js +119 -145
  73. package/dist/src/lex.js.map +1 -1
  74. package/dist/src/parse.d.ts +4 -17
  75. package/dist/src/parse.d.ts.map +1 -1
  76. package/dist/src/parse.js +484 -1036
  77. package/dist/src/parse.js.map +1 -1
  78. package/dist/src/std-bundle.d.ts.map +1 -1
  79. package/dist/src/std-bundle.js +11 -84
  80. package/dist/src/std-bundle.js.map +1 -1
  81. package/dist/src/std-library.d.ts +1 -1
  82. package/dist/src/std-library.d.ts.map +1 -1
  83. package/dist/src/std-library.js +1 -5
  84. package/dist/src/std-library.js.map +1 -1
  85. package/dist/src/tunables.d.ts +7 -0
  86. package/dist/src/tunables.d.ts.map +1 -0
  87. package/dist/src/tunables.js +27 -0
  88. package/dist/src/tunables.js.map +1 -0
  89. package/docs/README.md +528 -26
  90. package/docs/assets/brand/hsx-horizontal-white.svg +1 -0
  91. package/docs/assets/brand/hsx-horizontal.svg +1 -0
  92. package/docs/assets/brand/hsx-stacked-white.svg +1 -0
  93. package/docs/assets/brand/hsx-stacked.svg +1 -0
  94. package/docs/assets/brand/manifest.json +30 -0
  95. package/docs/assets/hsx.svg +11 -0
  96. package/examples/cards.hsx +34 -0
  97. package/examples/collections.hsx +37 -0
  98. package/examples/cost-table.json +633 -385
  99. package/examples/escrow.hsx +24 -0
  100. package/examples/financing.hsx +32 -0
  101. package/examples/insurance.hsx +30 -0
  102. package/examples/lending.hsx +57 -0
  103. package/examples/library.hsx +15 -0
  104. package/examples/marketplace.hsx +32 -0
  105. package/examples/money.hsx +19 -0
  106. package/examples/rental-deposit.hsx +60 -0
  107. package/examples/repair-approval.hsx +44 -0
  108. package/examples/reporting.hsx +28 -0
  109. package/examples/savings.hsx +21 -0
  110. package/examples/serviced.hsx +25 -0
  111. package/examples/wallet.hsx +24 -0
  112. package/package.json +25 -23
  113. package/src/ast.ts +83 -440
  114. package/src/attachment-economics.ts +103 -0
  115. package/src/binding-contract.ts +104 -0
  116. package/src/cli.ts +95 -325
  117. package/src/compile.ts +4063 -209
  118. package/src/cost.ts +71 -574
  119. package/src/diagnostics.ts +57 -437
  120. package/src/examples-bundle.ts +19 -0
  121. package/src/examples.ts +9 -0
  122. package/src/format.ts +12 -256
  123. package/src/header-source.ts +54 -0
  124. package/src/headers.ts +195 -0
  125. package/src/index.ts +18 -33
  126. package/src/keywords.ts +134 -0
  127. package/src/language.ts +629 -0
  128. package/src/lex.ts +131 -192
  129. package/src/parse.ts +489 -1195
  130. package/src/std-bundle.ts +12 -88
  131. package/src/std-library.ts +2 -7
  132. package/src/tunables.ts +36 -0
  133. package/std/cards.hsx +85 -0
  134. package/std/collections.hsx +90 -0
  135. package/std/escrow.hsx +73 -0
  136. package/std/financing.hsx +683 -0
  137. package/std/insurance.hsx +89 -0
  138. package/std/lending.hsx +138 -0
  139. package/std/marketplace.hsx +123 -0
  140. package/std/money.hsx +173 -0
  141. package/std/reporting.hsx +753 -0
  142. package/std/savings.hsx +68 -0
  143. package/std/wallet.hsx +57 -0
  144. package/LICENSE +0 -661
  145. package/LICENSING.md +0 -52
  146. package/TRADEMARKS.md +0 -35
  147. package/dist/src/emit.d.ts +0 -34
  148. package/dist/src/emit.d.ts.map +0 -1
  149. package/dist/src/emit.js +0 -137
  150. package/dist/src/emit.js.map +0 -1
  151. package/dist/src/entry-overrides.d.ts +0 -58
  152. package/dist/src/entry-overrides.d.ts.map +0 -1
  153. package/dist/src/entry-overrides.js +0 -284
  154. package/dist/src/entry-overrides.js.map +0 -1
  155. package/dist/src/ir.d.ts +0 -66
  156. package/dist/src/ir.d.ts.map +0 -1
  157. package/dist/src/ir.js +0 -15
  158. package/dist/src/ir.js.map +0 -1
  159. package/dist/src/limits.d.ts +0 -21
  160. package/dist/src/limits.d.ts.map +0 -1
  161. package/dist/src/limits.js +0 -21
  162. package/dist/src/limits.js.map +0 -1
  163. package/dist/src/lsp/server.d.ts +0 -32
  164. package/dist/src/lsp/server.d.ts.map +0 -1
  165. package/dist/src/lsp/server.js +0 -391
  166. package/dist/src/lsp/server.js.map +0 -1
  167. package/dist/src/modules.d.ts +0 -38
  168. package/dist/src/modules.d.ts.map +0 -1
  169. package/dist/src/modules.js +0 -368
  170. package/dist/src/modules.js.map +0 -1
  171. package/dist/src/typecheck.d.ts +0 -8
  172. package/dist/src/typecheck.d.ts.map +0 -1
  173. package/dist/src/typecheck.js +0 -2958
  174. package/dist/src/typecheck.js.map +0 -1
  175. package/dist/src/version.d.ts +0 -5
  176. package/dist/src/version.d.ts.map +0 -1
  177. package/dist/src/version.js +0 -5
  178. package/dist/src/version.js.map +0 -1
  179. package/docs/guide/01-first-program.md +0 -24
  180. package/docs/guide/02-money.md +0 -25
  181. package/docs/guide/03-instruments.md +0 -22
  182. package/docs/guide/04-lifecycles.md +0 -25
  183. package/docs/guide/05-fees-and-splits.md +0 -45
  184. package/docs/guide/06-schedules.md +0 -22
  185. package/docs/guide/07-composition.md +0 -46
  186. package/docs/guide/08-writing-a-module.md +0 -26
  187. package/docs/guide/09-cost.md +0 -24
  188. package/docs/guide/10-diagnostics.md +0 -27
  189. package/docs/llms-full.txt +0 -1739
  190. package/docs/llms.txt +0 -45
  191. package/docs/playground.md +0 -54
  192. package/docs/reference/cli.md +0 -35
  193. package/docs/reference/diagnostics.md +0 -619
  194. package/docs/reference/grammar.md +0 -39
  195. package/docs/reference/std/advance.md +0 -35
  196. package/docs/reference/std/cancellable_booking.md +0 -35
  197. package/docs/reference/std/captured_payment.md +0 -43
  198. package/docs/reference/std/conditional_disbursement.md +0 -33
  199. package/docs/reference/std/credit_facility.md +0 -35
  200. package/docs/reference/std/held_payment.md +0 -64
  201. package/docs/reference/std/instant_transfer.md +0 -30
  202. package/docs/reference/std/metered.md +0 -27
  203. package/docs/reference/std/pooled_split.md +0 -26
  204. package/docs/reference/std/premium_forward.md +0 -39
  205. package/docs/reference/std/reconciled_payout.md +0 -33
  206. package/docs/reference/std/recurring_collection.md +0 -25
  207. package/docs/reference/std/rotating_pool.md +0 -42
  208. package/docs/reference/std/scheduled.md +0 -51
  209. package/docs/reference/std/security_deposit.md +0 -46
  210. package/docs/reference/std/settlement_batch.md +0 -42
  211. package/docs/reference/std/swap.md +0 -46
  212. package/docs/reference/std/threshold_pool.md +0 -47
  213. package/docs/reference/std/weighted_distribution.md +0 -39
  214. package/docs/reference/types.md +0 -20
  215. package/docs/reference/udl-output.md +0 -13
  216. package/docs/sessions/2026-09-02-two-instruments.hsx +0 -21
  217. package/docs/sessions/2026-09-02-two-instruments.md +0 -41
  218. package/examples/01-first-program/README.md +0 -45
  219. package/examples/01-first-program/tip-jar.hsx +0 -17
  220. package/examples/02-imports-and-archetypes/README.md +0 -96
  221. package/examples/02-imports-and-archetypes/photo-booth.hsx +0 -37
  222. package/examples/03-diagnostics/README.md +0 -68
  223. package/examples/03-diagnostics/corner-shop-fixed.hsx +0 -22
  224. package/examples/03-diagnostics/corner-shop.hsx +0 -19
  225. package/examples/04-complete-product/README.md +0 -84
  226. package/examples/04-complete-product/study-hall.hsx +0 -67
  227. package/examples/05-watch-club/README.md +0 -9
  228. package/examples/05-watch-club/watch-club.hsx +0 -124
  229. package/examples/README.md +0 -18
  230. package/examples/advance/README.md +0 -3
  231. package/examples/advance/advance.hsx +0 -13
  232. package/examples/advance/advance.udl +0 -339
  233. package/examples/cancellable_booking/README.md +0 -3
  234. package/examples/cancellable_booking/cancellable_booking.hsx +0 -14
  235. package/examples/cancellable_booking/cancellable_booking.udl +0 -391
  236. package/examples/captured_payment/README.md +0 -3
  237. package/examples/captured_payment/captured_payment.hsx +0 -21
  238. package/examples/captured_payment/captured_payment.udl +0 -677
  239. package/examples/conditional_disbursement/README.md +0 -3
  240. package/examples/conditional_disbursement/conditional_disbursement.hsx +0 -17
  241. package/examples/conditional_disbursement/conditional_disbursement.udl +0 -412
  242. package/examples/credit_facility/README.md +0 -3
  243. package/examples/credit_facility/credit_facility.hsx +0 -27
  244. package/examples/credit_facility/credit_facility.udl +0 -1373
  245. package/examples/held_payment/README.md +0 -3
  246. package/examples/held_payment/held_payment.hsx +0 -13
  247. package/examples/held_payment/held_payment.udl +0 -507
  248. package/examples/instant_transfer/README.md +0 -3
  249. package/examples/instant_transfer/instant_transfer.hsx +0 -16
  250. package/examples/instant_transfer/instant_transfer.udl +0 -364
  251. package/examples/metered/README.md +0 -3
  252. package/examples/metered/metered.hsx +0 -13
  253. package/examples/metered/metered.udl +0 -247
  254. package/examples/pooled_split/README.md +0 -3
  255. package/examples/pooled_split/pooled_split.hsx +0 -15
  256. package/examples/pooled_split/pooled_split.udl +0 -425
  257. package/examples/premium_forward/README.md +0 -3
  258. package/examples/premium_forward/premium_forward.hsx +0 -19
  259. package/examples/premium_forward/premium_forward.udl +0 -594
  260. package/examples/reconciled_payout/README.md +0 -3
  261. package/examples/reconciled_payout/reconciled_payout.hsx +0 -13
  262. package/examples/reconciled_payout/reconciled_payout.udl +0 -303
  263. package/examples/recurring_collection/README.md +0 -3
  264. package/examples/recurring_collection/recurring_collection.hsx +0 -21
  265. package/examples/recurring_collection/recurring_collection.udl +0 -1130
  266. package/examples/rotating_pool/README.md +0 -3
  267. package/examples/rotating_pool/rotating_pool.hsx +0 -18
  268. package/examples/rotating_pool/rotating_pool.udl +0 -4352
  269. package/examples/scheduled/README.md +0 -3
  270. package/examples/scheduled/scheduled.hsx +0 -12
  271. package/examples/scheduled/scheduled.udl +0 -335
  272. package/examples/security_deposit/README.md +0 -3
  273. package/examples/security_deposit/security_deposit.hsx +0 -21
  274. package/examples/security_deposit/security_deposit.udl +0 -293
  275. package/examples/settlement_batch/README.md +0 -3
  276. package/examples/settlement_batch/settlement_batch.hsx +0 -19
  277. package/examples/settlement_batch/settlement_batch.udl +0 -753
  278. package/examples/swap/README.md +0 -3
  279. package/examples/swap/swap.hsx +0 -19
  280. package/examples/swap/swap.udl +0 -876
  281. package/examples/threshold_pool/README.md +0 -3
  282. package/examples/threshold_pool/threshold_pool.hsx +0 -16
  283. package/examples/threshold_pool/threshold_pool.udl +0 -667
  284. package/examples/weighted_distribution/README.md +0 -3
  285. package/examples/weighted_distribution/weighted_distribution.hsx +0 -20
  286. package/examples/weighted_distribution/weighted_distribution.udl +0 -337
  287. package/skills/hsx/SKILL.md +0 -483
  288. package/src/emit.ts +0 -201
  289. package/src/entry-overrides.ts +0 -428
  290. package/src/ir.ts +0 -99
  291. package/src/limits.ts +0 -20
  292. package/src/lsp/server.ts +0 -460
  293. package/src/modules.ts +0 -446
  294. package/src/typecheck.ts +0 -3876
  295. package/src/version.ts +0 -5
  296. package/std/SEMANTICS.md +0 -130
  297. package/std/settlements/advance.hsx +0 -177
  298. package/std/settlements/cancellable_booking.hsx +0 -87
  299. package/std/settlements/captured_payment.hsx +0 -144
  300. package/std/settlements/conditional_disbursement.hsx +0 -185
  301. package/std/settlements/credit_facility.hsx +0 -167
  302. package/std/settlements/held_payment.hsx +0 -578
  303. package/std/settlements/index.hsx +0 -3
  304. package/std/settlements/instant_transfer.hsx +0 -190
  305. package/std/settlements/metered.hsx +0 -67
  306. package/std/settlements/pooled_split.hsx +0 -68
  307. package/std/settlements/premium_forward.hsx +0 -257
  308. package/std/settlements/reconciled_payout.hsx +0 -77
  309. package/std/settlements/recurring_collection.hsx +0 -27
  310. package/std/settlements/rotating_pool.hsx +0 -252
  311. package/std/settlements/scheduled.hsx +0 -641
  312. package/std/settlements/security_deposit.hsx +0 -166
  313. package/std/settlements/settlement_batch.hsx +0 -122
  314. package/std/settlements/swap.hsx +0 -1114
  315. package/std/settlements/threshold_pool.hsx +0 -221
  316. package/std/settlements/weighted_distribution.hsx +0 -141
package/dist/src/ir.d.ts DELETED
@@ -1,66 +0,0 @@
1
- import type { Span } from "./ast.ts";
2
- import type { UdlEffectKind } from "@hyperscale0/udl";
3
- export type JsonValue = boolean | number | string | null | readonly JsonValue[] | {
4
- readonly [key: string]: JsonValue;
5
- };
6
- export declare const HSX_TYPE_KINDS: readonly ["account", "boolean", "bps", "condition", "date", "integer", "money", "party", "percent", "ref", "text", "unknown"];
7
- export interface HsxType {
8
- readonly currency?: string;
9
- /** Positive safe integer minor units fixed by money(CUR, amount). */
10
- readonly fixedAmount?: string;
11
- readonly kind: (typeof HSX_TYPE_KINDS)[number];
12
- readonly target?: string;
13
- }
14
- export interface TypedField {
15
- readonly name: string;
16
- readonly origin: Span;
17
- readonly required: boolean;
18
- readonly schema: Readonly<Record<string, JsonValue>>;
19
- readonly type: HsxType;
20
- }
21
- export interface TypedAction {
22
- readonly effects: Readonly<Partial<Record<UdlEffectKind, readonly {
23
- readonly signature: string;
24
- readonly source: string;
25
- readonly channel?: string;
26
- readonly role?: string;
27
- }[]>>>;
28
- readonly name: string;
29
- readonly origin: Span;
30
- readonly slots: Readonly<Record<string, JsonValue>>;
31
- }
32
- export interface TypedInstrument {
33
- readonly actions: readonly TypedAction[];
34
- readonly fields: readonly TypedField[];
35
- readonly id: string;
36
- readonly origin: Span;
37
- readonly slots: Readonly<Record<string, JsonValue>>;
38
- }
39
- export interface TypedSubject {
40
- readonly declaredValue: "none" | "optional" | "required";
41
- readonly kind: string;
42
- readonly origin: Span;
43
- readonly schema: Readonly<Record<string, JsonValue>>;
44
- readonly title: string;
45
- readonly version: number;
46
- }
47
- export interface TypedProgram {
48
- readonly instruments: readonly TypedInstrument[];
49
- readonly kind: "typed_program";
50
- readonly name: string;
51
- readonly origin: Span;
52
- readonly subjects: readonly TypedSubject[];
53
- readonly title: string;
54
- }
55
- export interface GeneralDiagnostic {
56
- readonly code: string;
57
- readonly fix: string;
58
- readonly message: string;
59
- readonly severity: "error" | "warning";
60
- readonly span: Span;
61
- }
62
- export interface GeneralCheckResult {
63
- readonly diagnostics: readonly GeneralDiagnostic[];
64
- readonly program?: TypedProgram;
65
- }
66
- //# sourceMappingURL=ir.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ir.d.ts","sourceRoot":"","sources":["../../src/ir.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,MAAM,MAAM,SAAS,GACjB,OAAO,GACP,MAAM,GACN,MAAM,GACN,IAAI,GACJ,SAAS,SAAS,EAAE,GACpB;IAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AAE1C,eAAO,MAAM,cAAc,+HAajB,CAAC;AAEX,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,qEAAqE;IACrE,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9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er",
8
- "money",
9
- "party",
10
- "percent",
11
- "ref",
12
- "text",
13
- "unknown",
14
- ];
15
- //# sourceMappingURL=ir.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ir.js","sourceRoot":"","sources":["../../src/ir.ts"],"names":[],"mappings":"AAWA,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS;IACT,SAAS;IACT,KAAK;IACL,WAAW;IACX,MAAM;IACN,SAAS;IACT,OAAO;IACP,OAAO;IACP,SAAS;IACT,KAAK;IACL,MAAM;IACN,SAAS;CACD,CAAC"}
@@ -1,21 +0,0 @@
1
- /**
2
- * What the compiler refuses to read, as opposed to what it refuses to emit.
3
- * These bounds cap the input side an attacker controls.
4
- *
5
- * Both numbers are set against the 34 real programs this compiler is tested
6
- * on. The deepest nests 5 levels; the largest is 13,934 bytes.
7
- */
8
- export declare const HSX_LIMITS: Readonly<{
9
- /**
10
- * How deep the recursive-descent productions may nest. Measured on this
11
- * machine, the parser exhausted the call stack at 9,217 nested blocks and
12
- * threw a RangeError out of `compile`, which SECURITY.md promises never
13
- * happens. The crash point moves with whatever stack the process has left,
14
- * so the ceiling is declared here instead of discovered at runtime. 64 is
15
- * 12x the deepest real program and 144x below that measured crash.
16
- */
17
- maxNestingDepth: 64;
18
- /** 18x the largest real HSX program. */
19
- maxSourceBytes: number;
20
- }>;
21
- //# sourceMappingURL=limits.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"limits.d.ts","sourceRoot":"","sources":["../../src/limits.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,UAAU;IACrB;;;;;;;OAOG;;IAEH,wCAAwC;;EAExC,CAAC"}
@@ -1,21 +0,0 @@
1
- /**
2
- * What the compiler refuses to read, as opposed to what it refuses to emit.
3
- * These bounds cap the input side an attacker controls.
4
- *
5
- * Both numbers are set against the 34 real programs this compiler is tested
6
- * on. The deepest nests 5 levels; the largest is 13,934 bytes.
7
- */
8
- export const HSX_LIMITS = Object.freeze({
9
- /**
10
- * How deep the recursive-descent productions may nest. Measured on this
11
- * machine, the parser exhausted the call stack at 9,217 nested blocks and
12
- * threw a RangeError out of `compile`, which SECURITY.md promises never
13
- * happens. The crash point moves with whatever stack the process has left,
14
- * so the ceiling is declared here instead of discovered at runtime. 64 is
15
- * 12x the deepest real program and 144x below that measured crash.
16
- */
17
- maxNestingDepth: 64,
18
- /** 18x the largest real HSX program. */
19
- maxSourceBytes: 256 * 1_024,
20
- });
21
- //# sourceMappingURL=limits.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"limits.js","sourceRoot":"","sources":["../../src/limits.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC;IACtC;;;;;;;OAOG;IACH,eAAe,EAAE,EAAE;IACnB,wCAAwC;IACxC,cAAc,EAAE,GAAG,GAAG,KAAK;CAC5B,CAAC,CAAC"}
@@ -1,32 +0,0 @@
1
- import { type LineIndex } from "../ast.ts";
2
- import type { HsxCompilerHost } from "../modules.ts";
3
- export interface LspPosition {
4
- readonly character: number;
5
- readonly line: number;
6
- }
7
- export interface LspRange {
8
- readonly end: LspPosition;
9
- readonly start: LspPosition;
10
- }
11
- export interface LspDiagnostic {
12
- readonly code?: string;
13
- readonly message: string;
14
- readonly range: LspRange;
15
- readonly severity: 1 | 2;
16
- readonly source: "hsx";
17
- }
18
- export interface LspServerOptions {
19
- readonly host?: HsxCompilerHost;
20
- readonly onExit?: (code: number) => void;
21
- }
22
- export interface LspServer {
23
- readonly stop: () => void;
24
- }
25
- export declare function offsetToPosition(index: LineIndex, offset: number): LspPosition;
26
- export declare function spanToRange(index: LineIndex, span: {
27
- readonly end: number;
28
- readonly start: number;
29
- }): LspRange;
30
- export declare function createHostForUri(uri: string, fallbackHost?: HsxCompilerHost): HsxCompilerHost;
31
- export declare function startLspServer(input: NodeJS.ReadableStream, output: NodeJS.WritableStream, options?: LspServerOptions): LspServer;
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KV;AAED,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,MAAM,EACX,YAAY,CAAC,EAAE,eAAe,GAC7B,eAAe,CA8CjB;AASD,wBAAgB,cAAc,CAC5B,KAAK,EAAE,MAAM,CAAC,cAAc,EAC5B,MAAM,EAAE,MAAM,CAAC,cAAc,EAC7B,OAAO,GAAE,gBAAqB,GAC7B,SAAS,CA2UX"}
@@ -1,391 +0,0 @@
1
- import { existsSync, readFileSync, statSync } from "node:fs";
2
- import { dirname, isAbsolute, resolve } from "node:path";
3
- import { fileURLToPath } from "node:url";
4
- import { lineIndex } from "../ast.js";
5
- import { format } from "../format.js";
6
- import { resolveProgramModules } from "../modules.js";
7
- import { parseProgram } from "../parse.js";
8
- import { checkGeneralProgram } from "../typecheck.js";
9
- export function offsetToPosition(index, offset) {
10
- const clamped = Math.max(0, Math.min(offset, index.length));
11
- let low = 0;
12
- let high = index.starts.length - 1;
13
- while (low < high) {
14
- const middle = Math.floor((low + high + 1) / 2);
15
- if (index.starts[middle] <= clamped)
16
- low = middle;
17
- else
18
- high = middle - 1;
19
- }
20
- const lineStart = index.starts[low];
21
- return {
22
- character: clamped - lineStart,
23
- line: low,
24
- };
25
- }
26
- export function spanToRange(index, span) {
27
- return {
28
- end: offsetToPosition(index, Math.max(span.start, span.end)),
29
- start: offsetToPosition(index, span.start),
30
- };
31
- }
32
- export function createHostForUri(uri, fallbackHost) {
33
- let docDir;
34
- try {
35
- if (uri.startsWith("file://")) {
36
- docDir = dirname(fileURLToPath(uri));
37
- }
38
- }
39
- catch {
40
- docDir = undefined;
41
- }
42
- return {
43
- resolveModule(specifier, from) {
44
- if (fallbackHost?.resolveModule) {
45
- const custom = fallbackHost.resolveModule(specifier, from);
46
- if (custom)
47
- return custom;
48
- }
49
- if (!docDir)
50
- return undefined;
51
- const baseDir = from
52
- ? isAbsolute(from)
53
- ? dirname(from)
54
- : resolve(docDir, dirname(from))
55
- : docDir;
56
- const candidates = [
57
- resolve(baseDir, specifier),
58
- resolve(baseDir, `${specifier}.hsx`),
59
- resolve(docDir, specifier),
60
- resolve(docDir, `${specifier}.hsx`),
61
- ];
62
- for (const candidate of candidates) {
63
- if (existsSync(candidate)) {
64
- try {
65
- const stat = statSync(candidate);
66
- if (stat.isFile()) {
67
- return {
68
- name: candidate,
69
- source: readFileSync(candidate, "utf8"),
70
- };
71
- }
72
- }
73
- catch {
74
- // Ignore filesystem errors and check subsequent candidates.
75
- }
76
- }
77
- }
78
- return undefined;
79
- },
80
- };
81
- }
82
- export function startLspServer(input, output, options = {}) {
83
- const documents = new Map();
84
- let isInitialized = false;
85
- let isShutdown = false;
86
- let buffer = Buffer.alloc(0);
87
- const send = (message) => {
88
- const json = JSON.stringify(message);
89
- const bytes = Buffer.from(json, "utf8");
90
- output.write(`Content-Length: ${bytes.length}\r\n\r\n${json}`);
91
- };
92
- const validateAndPublish = (uri, source) => {
93
- const lineIdx = lineIndex(source);
94
- const diagnostics = [];
95
- const parsed = parseProgram(source);
96
- for (const diag of parsed.diagnostics) {
97
- diagnostics.push({
98
- ...(diag.code ? { code: diag.code } : {}),
99
- message: diag.message,
100
- range: spanToRange(lineIdx, diag.span),
101
- severity: 1,
102
- source: "hsx",
103
- });
104
- }
105
- if (parsed.diagnostics.length === 0) {
106
- const host = createHostForUri(uri, options.host);
107
- const resolved = resolveProgramModules(parsed.program, host);
108
- if (!resolved.ok) {
109
- for (const issue of resolved.issues) {
110
- diagnostics.push({
111
- code: issue.code,
112
- message: issue.message,
113
- range: spanToRange(lineIdx, issue.span),
114
- severity: 1,
115
- source: "hsx",
116
- });
117
- }
118
- }
119
- else {
120
- const checked = checkGeneralProgram(resolved.program);
121
- for (const diag of checked.diagnostics) {
122
- if (!resolved.origins.has(diag.span)) {
123
- diagnostics.push({
124
- code: diag.code,
125
- message: diag.message,
126
- range: spanToRange(lineIdx, diag.span),
127
- severity: diag.severity === "warning" ? 2 : 1,
128
- source: "hsx",
129
- });
130
- }
131
- }
132
- }
133
- }
134
- send({
135
- jsonrpc: "2.0",
136
- method: "textDocument/publishDiagnostics",
137
- params: {
138
- diagnostics,
139
- uri,
140
- },
141
- });
142
- };
143
- const handleMessage = (msg) => {
144
- const { id, method, params } = msg;
145
- // Requests (id is present)
146
- if (id !== undefined) {
147
- if (isShutdown) {
148
- send({
149
- error: {
150
- code: -32600,
151
- message: "Invalid request: server is shutting down",
152
- },
153
- id,
154
- jsonrpc: "2.0",
155
- });
156
- return;
157
- }
158
- if (!isInitialized) {
159
- if (method !== "initialize") {
160
- send({
161
- error: {
162
- code: -32002,
163
- message: "Server not initialized",
164
- },
165
- id,
166
- jsonrpc: "2.0",
167
- });
168
- return;
169
- }
170
- isInitialized = true;
171
- send({
172
- id,
173
- jsonrpc: "2.0",
174
- result: {
175
- capabilities: {
176
- documentFormattingProvider: true,
177
- textDocumentSync: 1,
178
- },
179
- serverInfo: {
180
- name: "hsx-lsp",
181
- version: "1.0.0",
182
- },
183
- },
184
- });
185
- return;
186
- }
187
- if (method === "initialize") {
188
- send({
189
- id,
190
- jsonrpc: "2.0",
191
- result: {
192
- capabilities: {
193
- documentFormattingProvider: true,
194
- textDocumentSync: 1,
195
- },
196
- serverInfo: {
197
- name: "hsx-lsp",
198
- version: "1.0.0",
199
- },
200
- },
201
- });
202
- return;
203
- }
204
- if (method === "shutdown") {
205
- isShutdown = true;
206
- send({
207
- id,
208
- jsonrpc: "2.0",
209
- result: null,
210
- });
211
- return;
212
- }
213
- if (method === "textDocument/formatting") {
214
- const uri = params?.textDocument?.uri;
215
- const source = uri ? documents.get(uri) : undefined;
216
- if (!source) {
217
- send({ id, jsonrpc: "2.0", result: null });
218
- return;
219
- }
220
- const formatted = format(source);
221
- if (!formatted.ok) {
222
- send({ id, jsonrpc: "2.0", result: null });
223
- return;
224
- }
225
- if (formatted.formatted === source) {
226
- send({ id, jsonrpc: "2.0", result: [] });
227
- return;
228
- }
229
- const lines = lineIndex(source);
230
- send({
231
- id,
232
- jsonrpc: "2.0",
233
- result: [
234
- {
235
- newText: formatted.formatted,
236
- range: {
237
- end: offsetToPosition(lines, source.length),
238
- start: { character: 0, line: 0 },
239
- },
240
- },
241
- ],
242
- });
243
- return;
244
- }
245
- send({
246
- error: {
247
- code: -32601,
248
- message: `Method not found: ${method ?? "unknown"}`,
249
- },
250
- id,
251
- jsonrpc: "2.0",
252
- });
253
- return;
254
- }
255
- // Notifications (id is undefined)
256
- if (method === "exit") {
257
- const code = isShutdown ? 0 : 1;
258
- if (options.onExit) {
259
- options.onExit(code);
260
- }
261
- else {
262
- process.exit(code);
263
- }
264
- return;
265
- }
266
- if (isShutdown || !isInitialized) {
267
- return;
268
- }
269
- if (method === "initialized") {
270
- return;
271
- }
272
- if (method === "textDocument/didOpen") {
273
- const doc = params?.textDocument;
274
- if (doc?.uri && typeof doc.text === "string") {
275
- documents.set(doc.uri, doc.text);
276
- validateAndPublish(doc.uri, doc.text);
277
- }
278
- return;
279
- }
280
- if (method === "textDocument/didChange") {
281
- const uri = params?.textDocument?.uri;
282
- const changes = params?.contentChanges;
283
- if (!uri || !Array.isArray(changes) || changes.length === 0) {
284
- // Empty contentChanges keeps the document and republishes nothing.
285
- return;
286
- }
287
- // Full sync only; an incremental entry would replace the document with a fragment.
288
- const hasIncremental = changes.some((change) => change && typeof change === "object" && "range" in change);
289
- if (hasIncremental) {
290
- return;
291
- }
292
- const lastChange = changes[changes.length - 1];
293
- if (lastChange && typeof lastChange.text === "string") {
294
- documents.set(uri, lastChange.text);
295
- validateAndPublish(uri, lastChange.text);
296
- }
297
- return;
298
- }
299
- if (method === "textDocument/didClose") {
300
- const uri = params?.textDocument?.uri;
301
- if (uri) {
302
- documents.delete(uri);
303
- send({
304
- jsonrpc: "2.0",
305
- method: "textDocument/publishDiagnostics",
306
- params: {
307
- diagnostics: [],
308
- uri,
309
- },
310
- });
311
- }
312
- return;
313
- }
314
- };
315
- const processBuffer = () => {
316
- while (true) {
317
- const headerEnd = buffer.indexOf("\r\n\r\n");
318
- if (headerEnd === -1)
319
- break;
320
- const headerText = buffer.subarray(0, headerEnd).toString("ascii");
321
- const match = /content-length:\s*(\d+)/i.exec(headerText);
322
- if (!match) {
323
- buffer = buffer.subarray(headerEnd + 4);
324
- continue;
325
- }
326
- const contentLength = parseInt(match[1], 10);
327
- if (Number.isNaN(contentLength) || contentLength < 0) {
328
- buffer = buffer.subarray(headerEnd + 4);
329
- continue;
330
- }
331
- const totalLength = headerEnd + 4 + contentLength;
332
- if (buffer.length < totalLength) {
333
- break;
334
- }
335
- const bodyBytes = buffer.subarray(headerEnd + 4, totalLength);
336
- buffer = buffer.subarray(totalLength);
337
- const bodyStr = bodyBytes.toString("utf8");
338
- try {
339
- const msg = JSON.parse(bodyStr);
340
- handleMessage(msg);
341
- }
342
- catch {
343
- // Ignore unparseable JSON payload.
344
- }
345
- }
346
- };
347
- const flushPending = () => {
348
- const headerEnd = buffer.indexOf("\r\n\r\n");
349
- if (headerEnd !== -1) {
350
- const bodyStr = buffer
351
- .subarray(headerEnd + 4)
352
- .toString("utf8")
353
- .trim();
354
- if (bodyStr.length > 0) {
355
- try {
356
- const msg = JSON.parse(bodyStr);
357
- handleMessage(msg);
358
- }
359
- catch {
360
- // Ignore unparseable body.
361
- }
362
- }
363
- }
364
- };
365
- const onData = (chunk) => {
366
- const incoming = typeof chunk === "string" ? Buffer.from(chunk, "utf8") : chunk;
367
- buffer = Buffer.concat([buffer, incoming]);
368
- processBuffer();
369
- };
370
- const onEnd = () => {
371
- processBuffer();
372
- if (buffer.length > 0) {
373
- flushPending();
374
- }
375
- if (options.onExit) {
376
- options.onExit(0);
377
- }
378
- else {
379
- process.exit(0);
380
- }
381
- };
382
- input.on("data", onData);
383
- input.on("end", onEnd);
384
- return {
385
- stop() {
386
- input.removeListener("data", onData);
387
- input.removeListener("end", onEnd);
388
- },
389
- };
390
- }
391
- //# sourceMappingURL=server.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"server.js","sourceRoot":"","sources":["../../../src/lsp/server.ts"],"names":[],"mappings":"AAAA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;IACH,CAAC,CAAC;IAEF,MAAM,MAAM,GAAG,CAAC,KAAsB,EAAQ,EAAE;QAC9C,MAAM,QAAQ,GACZ,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;QACjE,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;QAC3C,aAAa,EAAE,CAAC;IAClB,CAAC,CAAC;IAEF,MAAM,KAAK,GAAG,GAAS,EAAE;QACvB,aAAa,EAAE,CAAC;QAChB,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACtB,YAAY,EAAE,CAAC;QACjB,CAAC;QACD,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;YACnB,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QACpB,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC;IAEF,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzB,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAEvB,OAAO;QACL,IAAI;YACF,KAAK,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;YACrC,KAAK,CAAC,cAAc,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QACrC,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -1,38 +0,0 @@
1
- import type { UdlDocument } from "@hyperscale0/udl";
2
- import type { Program } from "./ast.ts";
3
- import { type StandardLibrary } from "./std-library.ts";
4
- export interface ModuleSource {
5
- readonly name: string;
6
- readonly source: string;
7
- }
8
- export interface HsxCompilerHost {
9
- readonly moduleName?: string;
10
- /** Published canonical UDL available to `use` declarations. */
11
- readonly publishedCatalog?: UdlDocument;
12
- readonly resolveModule?: (specifier: string, from: string) => ModuleSource | undefined;
13
- readonly standardLibrary?: StandardLibrary;
14
- }
15
- export interface ModuleIssue {
16
- readonly code: string;
17
- readonly fix: string;
18
- readonly message: string;
19
- readonly span: {
20
- readonly end: number;
21
- readonly start: number;
22
- };
23
- }
24
- export interface ModuleOrigin {
25
- readonly column: number;
26
- readonly line: number;
27
- readonly moduleName: string;
28
- }
29
- export type ModuleResolution = {
30
- readonly issues: readonly ModuleIssue[];
31
- readonly ok: false;
32
- } | {
33
- readonly ok: true;
34
- readonly origins: ReadonlyMap<object, ModuleOrigin>;
35
- readonly program: Program;
36
- };
37
- export declare function resolveProgramModules(program: Program, host?: HsxCompilerHost): ModuleResolution;
38
- //# sourceMappingURL=modules.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"modules.d.ts","sourceRoot":"","sources":["../../src/modules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAMV,OAAO,EACR,MAAM,UAAU,CAAC;AAGlB,OAAO,EAA0B,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEhF,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,+DAA+D;IAC/D,QAAQ,CAAC,gBAAgB,CAAC,EAAE,WAAW,CAAC;IACxC,QAAQ,CAAC,aAAa,CAAC,EAAE,CACvB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,KACT,YAAY,GAAG,SAAS,CAAC;IAC9B,QAAQ,CAAC,eAAe,CAAC,EAAE,eAAe,CAAC;CAC5C;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;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