@hyperscale0/hsx 1.0.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/AUTHORS +8 -0
  2. package/CHANGELOG.md +59 -0
  3. package/LICENSE +661 -0
  4. package/LICENSING.md +52 -0
  5. package/README.md +170 -0
  6. package/SECURITY.md +47 -0
  7. package/TRADEMARKS.md +35 -0
  8. package/bin/hsx.ts +15 -0
  9. package/dist/bin/hsx.d.ts +7 -0
  10. package/dist/bin/hsx.d.ts.map +1 -0
  11. package/dist/bin/hsx.js +14 -0
  12. package/dist/bin/hsx.js.map +1 -0
  13. package/dist/src/ast.d.ts +172 -0
  14. package/dist/src/ast.d.ts.map +1 -0
  15. package/dist/src/ast.js +22 -0
  16. package/dist/src/ast.js.map +1 -0
  17. package/dist/src/check.d.ts +11 -0
  18. package/dist/src/check.d.ts.map +1 -0
  19. package/dist/src/check.js +1214 -0
  20. package/dist/src/check.js.map +1 -0
  21. package/dist/src/cli.d.ts +20 -0
  22. package/dist/src/cli.d.ts.map +1 -0
  23. package/dist/src/cli.js +137 -0
  24. package/dist/src/cli.js.map +1 -0
  25. package/dist/src/compile.d.ts +39 -0
  26. package/dist/src/compile.d.ts.map +1 -0
  27. package/dist/src/compile.js +59 -0
  28. package/dist/src/compile.js.map +1 -0
  29. package/dist/src/index.d.ts +9 -0
  30. package/dist/src/index.d.ts.map +1 -0
  31. package/dist/src/index.js +7 -0
  32. package/dist/src/index.js.map +1 -0
  33. package/dist/src/lex.d.ts +23 -0
  34. package/dist/src/lex.d.ts.map +1 -0
  35. package/dist/src/lex.js +125 -0
  36. package/dist/src/lex.js.map +1 -0
  37. package/dist/src/lower.d.ts +93 -0
  38. package/dist/src/lower.d.ts.map +1 -0
  39. package/dist/src/lower.js +2081 -0
  40. package/dist/src/lower.js.map +1 -0
  41. package/dist/src/model.d.ts +307 -0
  42. package/dist/src/model.d.ts.map +1 -0
  43. package/dist/src/model.js +15 -0
  44. package/dist/src/model.js.map +1 -0
  45. package/dist/src/parse.d.ts +19 -0
  46. package/dist/src/parse.d.ts.map +1 -0
  47. package/dist/src/parse.js +484 -0
  48. package/dist/src/parse.js.map +1 -0
  49. package/dist/src/version.d.ts +16 -0
  50. package/dist/src/version.d.ts.map +1 -0
  51. package/dist/src/version.js +16 -0
  52. package/dist/src/version.js.map +1 -0
  53. package/package.json +79 -0
  54. package/spec/hsx-ir.schema.json +522 -0
  55. package/src/ast.ts +231 -0
  56. package/src/check.ts +1699 -0
  57. package/src/cli.ts +173 -0
  58. package/src/compile.ts +98 -0
  59. package/src/index.ts +16 -0
  60. package/src/lex.ts +161 -0
  61. package/src/lower.ts +2619 -0
  62. package/src/model.ts +340 -0
  63. package/src/parse.ts +580 -0
  64. package/src/version.ts +17 -0
package/AUTHORS ADDED
@@ -0,0 +1,8 @@
1
+ Hyperscale LLC holds the copyright in this repository.
2
+
3
+ HSX was created at Hyperscale by the three founders of Hyperscale LLC, who
4
+ also created the UDL format and the Hyperscale platform:
5
+
6
+ Meshael AlBakaawi
7
+ Amir Ayub
8
+ Sara AlBakaawi
package/CHANGELOG.md ADDED
@@ -0,0 +1,59 @@
1
+ # Changelog
2
+
3
+ All notable changes to this package are documented here. The format follows
4
+ [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this package
5
+ follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+
7
+ The IR format version (`"hsx": 1`, exported as `HSX_IR_VERSION`) moves
8
+ independently of the package version. While the package is below 1.0.0, an
9
+ alpha release may change what IR version 1 contains; every such change is
10
+ listed here.
11
+
12
+ ## [Unreleased]
13
+
14
+ ### Changed
15
+
16
+ - Licensed AGPL-3.0-only with a commercial license from Hyperscale LLC;
17
+ copyright holder Hyperscale LLC; repository renamed to
18
+ `hyperscale0/hyperscale-hsx`.
19
+
20
+ ## [1.0.0-alpha.1] - 2026-08-22
21
+
22
+ First public release. The compiler is not new, it has been in production use.
23
+ This is the first version published as a package anyone can install.
24
+
25
+ ### Added
26
+
27
+ - `compile(source)`, the three-verdict driver: `valid`, `warning`, and
28
+ `invalid`, with diagnostics carrying 1-indexed line and column, a severity,
29
+ and the stage that raised them.
30
+ - The stage entry points `parseProgram`, `checkProgram`, and `lowerProgram`,
31
+ for tools that need one stage rather than the whole compile.
32
+ - `HSX_IR_VERSION`, exported and stamped into every compiled document as its
33
+ `hsx` field, so a consumer can decide from one integer whether it
34
+ understands the document. `HSX_VERSION` carries the package version.
35
+ - The `hsx` command: `hsx check <file> [--strict]` and
36
+ `hsx build <file> [--out <file>] [--strict]`. Exit codes are `0` compiled,
37
+ `1` refused, `2` unusable command line or input.
38
+ - `spec/hsx-ir.schema.json`, JSON Schema 2020-12 for the HSX-JSON IR document
39
+ and the Business Frame. Every `.hsx` file in the repository is validated
40
+ against it in CI.
41
+ - `docs/reference.md`: the lexical grammar, the EBNF the parser accepts, what
42
+ each stage does, the diagnostic model, and all nine `settlement` archetypes
43
+ with their parameters and constraints.
44
+ - `examples/`, four teaching programs compiled by the test suite.
45
+ - `editors/vscode/`, a TextMate grammar for syntax highlighting.
46
+
47
+ ### Known limitations
48
+
49
+ - **Diagnostics have no stable codes.** Match on `severity` and `stage`, which
50
+ are stable; do not pattern-match on message text. Codes would be additive
51
+ and are the obvious next step.
52
+ - **There is no formatter.** `hsx fmt` does not exist rather than existing
53
+ badly.
54
+ - **One program carries at most 14 money events** (`MONEY_EVENT_BUDGET`). A
55
+ program that needs more is refused with a diagnostic saying so.
56
+ - **`party` takes no attribute block yet**, though the grammar parses one.
57
+
58
+ [Unreleased]: https://github.com/hyperscale0/hyperscale-hsx/compare/v1.0.0-alpha.1...HEAD
59
+ [1.0.0-alpha.1]: https://github.com/hyperscale0/hyperscale-hsx/releases/tag/v1.0.0-alpha.1