@hyperscale0/hsx 5.8.0 → 6.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 +14 -0
- package/README.md +3 -4
- package/bin/hsx.ts +0 -5
- package/dist/bin/hsx.d.ts +0 -4
- package/dist/bin/hsx.d.ts.map +1 -1
- package/dist/bin/hsx.js +0 -4
- package/dist/bin/hsx.js.map +1 -1
- package/dist/src/compile.d.ts.map +1 -1
- package/dist/src/compile.js +0 -20
- package/dist/src/compile.js.map +1 -1
- package/dist/src/examples-bundle.d.ts.map +1 -1
- package/dist/src/examples-bundle.js +0 -1
- package/dist/src/examples-bundle.js.map +1 -1
- package/dist/src/headers.d.ts +1 -1
- package/dist/src/headers.d.ts.map +1 -1
- package/dist/src/headers.js +0 -1
- package/dist/src/headers.js.map +1 -1
- package/dist/src/std-bundle.d.ts.map +1 -1
- package/dist/src/std-bundle.js +1 -2
- package/dist/src/std-bundle.js.map +1 -1
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/docs/README.md +16 -19
- package/package.json +5 -6
- package/src/compile.ts +0 -21
- package/src/examples-bundle.ts +0 -1
- package/src/headers.ts +0 -1
- package/src/std-bundle.ts +1 -2
- package/src/version.ts +1 -1
- package/std/reporting.hsx +105 -676
- package/docs/examples.md +0 -22
- package/docs/headers.md +0 -46
- package/examples/travel.hsx +0 -29
- package/std/travel.hsx +0 -123
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# HSX 6.0.0
|
|
2
|
+
|
|
3
|
+
Breaking: the `travel` std header is gone, with its `travel.package` and
|
|
4
|
+
`travel.booking` instruments and the travel agency sample. Programs that
|
|
5
|
+
`use travel` no longer compile; build a booking from `escrow.hold` and an
|
|
6
|
+
authored instrument instead. `reporting.portfolio` drops the
|
|
7
|
+
`origination_cohorts` and `bureau_facility` report definitions, which refused
|
|
8
|
+
every request. The compiler no longer declares `programFines` or `programCosts`;
|
|
9
|
+
`late_charge` routes fines and recovery through its `fines_to` and `costs_to`
|
|
10
|
+
party tunables. `account(owner, cash, external)` is an ordinary keyed account
|
|
11
|
+
instead of a refusal. The package stops generating the header and sample
|
|
12
|
+
index pages and the two llms text files; `hsx headers` prints the instrument
|
|
13
|
+
inventory.
|
|
14
|
+
|
|
1
15
|
# HSX 5.8.0
|
|
2
16
|
|
|
3
17
|
The checker names misspelled fields, parties and states at the misspelled word,
|
package/README.md
CHANGED
|
@@ -21,8 +21,8 @@ Start with the [first program and rental guide](docs/README.md). Save the
|
|
|
21
21
|
It holds 1,000 SAR, charges a one-time 50 SAR late fee, and returns the remainder.
|
|
22
22
|
The guide explains the fixed business binding and the host needed to execute it.
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
The [
|
|
24
|
+
`npx hsx headers` prints every std instrument and its tunables from the bundled
|
|
25
|
+
headers. The [samples](examples/) include both complete action paths and
|
|
26
26
|
compositions that still need child-record actions or adapter bindings. A compile
|
|
27
27
|
pass does not prove that a flow is publicly executable or funded.
|
|
28
28
|
|
|
@@ -56,6 +56,5 @@ Run `bun bin/hsx.ts check examples/rental-deposit.hsx` to use the source CLI.
|
|
|
56
56
|
|
|
57
57
|
Edit prose in `docs/README.md`, programs in `examples/`, and header comments in
|
|
58
58
|
`std/`. Run `bun run generate` after changing these inputs. It emits the header
|
|
59
|
-
and example bundles
|
|
60
|
-
`docs/headers.md`, `docs/examples.md`, `llms.txt` or `llms-full.txt` by hand.
|
|
59
|
+
and example bundles.
|
|
61
60
|
`bun run build` also builds the browser playground.
|
package/bin/hsx.ts
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* The `hsx` executable. Everything it does lives in `runCli`; this file only
|
|
4
|
-
* binds that function to the real filesystem and the real streams.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
2
|
import { readFile, writeFile } from "node:fs/promises";
|
|
8
3
|
import { runCli } from "../src/cli.ts";
|
|
9
4
|
|
package/dist/bin/hsx.d.ts
CHANGED
package/dist/bin/hsx.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hsx.d.ts","sourceRoot":"","sources":["../../bin/hsx.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hsx.d.ts","sourceRoot":"","sources":["../../bin/hsx.ts"],"names":[],"mappings":""}
|
package/dist/bin/hsx.js
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* The `hsx` executable. Everything it does lives in `runCli`; this file only
|
|
4
|
-
* binds that function to the real filesystem and the real streams.
|
|
5
|
-
*/
|
|
6
2
|
import { readFile, writeFile } from "node:fs/promises";
|
|
7
3
|
import { runCli } from "../src/cli.js";
|
|
8
4
|
process.exitCode = await runCli(process.argv.slice(2), {
|
package/dist/bin/hsx.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hsx.js","sourceRoot":"","sources":["../../bin/hsx.ts"],"names":[],"mappings":";AACA
|
|
1
|
+
{"version":3,"file":"hsx.js","sourceRoot":"","sources":["../../bin/hsx.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,OAAO,CAAC,QAAQ,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;IACrD,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,IAAI,CAAC;IAChD,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,IAAI,CAAC;IAChD,QAAQ,EAAE,C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C,YAAY,EAAE,MAAM,CAAA;KAAE,CAAC;CAC3E;AACD,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,eAAe,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;CACnB;AACD,MAAM,WAAW,cAAc;IAC7B,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,eAAe,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC,CAAC;CAClE;AACD,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7B,WAAW,EAAE,iBAAiB,EAAE,CAAC;IACjC,SAAS,CAAC,EAAE;QACV,QAAQ,EAAE,WAAW,CAAC;QACtB,YAAY,EAAE,eAAe,CAAC;QAC9B,SAAS,EAAE,qBAAqB,EAAE,CAAC;KACpC,CAAC;CACH;AAqTD,wBAAgB,OAAO,CACrB,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,cAAmB,GAC3B,aAAa,CAmmHf"}
|
package/dist/src/compile.js
CHANGED
|
@@ -361,8 +361,6 @@ export function compile(source, options = {}) {
|
|
|
361
361
|
parties: Object.assign(Object.create(null), {
|
|
362
362
|
programOperator: { kind: "business", role: "program_operator" },
|
|
363
363
|
programTax: { kind: "business", role: "tax_payable" },
|
|
364
|
-
programFines: { kind: "business", role: "fine_payable" },
|
|
365
|
-
programCosts: { kind: "business", role: "cost_recovery" },
|
|
366
364
|
}),
|
|
367
365
|
objects: [],
|
|
368
366
|
instruments: [],
|
|
@@ -1302,8 +1300,6 @@ export function compile(source, options = {}) {
|
|
|
1302
1300
|
f.book = t.args[1] ? text(t.args[1]) : "cash";
|
|
1303
1301
|
if (t.args[2]) {
|
|
1304
1302
|
const mode = text(t.args[2]);
|
|
1305
|
-
if (mode === "external")
|
|
1306
|
-
fail(t, "external account mode was removed", "use a reservation and instruction-bound evidence");
|
|
1307
1303
|
if (mode === "contra")
|
|
1308
1304
|
f.contra = true;
|
|
1309
1305
|
else
|
|
@@ -2891,22 +2887,6 @@ export function compile(source, options = {}) {
|
|
|
2891
2887
|
fail(objects.get(kind.id), `entry action ${name} must create an attachment as actor`, "expose its create action and bind its acting party to actor");
|
|
2892
2888
|
}
|
|
2893
2889
|
}
|
|
2894
|
-
const usedParties = new Set();
|
|
2895
|
-
const collectParties = (value) => {
|
|
2896
|
-
if (typeof value === "string") {
|
|
2897
|
-
usedParties.add(value);
|
|
2898
|
-
if (value.startsWith("party."))
|
|
2899
|
-
usedParties.add(value.split(".")[1]);
|
|
2900
|
-
}
|
|
2901
|
-
else if (Array.isArray(value))
|
|
2902
|
-
value.forEach(collectParties);
|
|
2903
|
-
else if (value && typeof value === "object")
|
|
2904
|
-
Object.values(value).forEach(collectParties);
|
|
2905
|
-
};
|
|
2906
|
-
collectParties(document.instruments);
|
|
2907
|
-
for (const party of ["programFines", "programCosts"])
|
|
2908
|
-
if (!usedParties.has(party) && !names.has(party))
|
|
2909
|
-
delete document.parties[party];
|
|
2910
2890
|
const validated = validateUdl(document);
|
|
2911
2891
|
if (!validated.ok)
|
|
2912
2892
|
return {
|