@hyperscale0/udl 4.5.0 → 4.5.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.
- package/CHANGELOG.md +6 -0
- package/README.md +24 -2
- package/docs/README.md +21 -1
- package/package.json +2 -2
- package/spec/README.md +21 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
# UDL 4.5.1
|
|
2
|
+
|
|
3
|
+
Documentation only. The specification README explains how to read the
|
|
4
|
+
contract before the rules, and the generated `docs/README.md` and
|
|
5
|
+
`llms-full.txt` follow it. No validator behaviour changed.
|
|
6
|
+
|
|
1
7
|
# UDL 4.5.0
|
|
2
8
|
|
|
3
9
|
Admission walks own data properties only, refuses properties JSON
|
package/README.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# UDL 4
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
UDL, the Universal Domain Language, describes a company's objects, agreements,
|
|
4
|
+
actions and money rules. HSX compiles to this typed contract. An executor reads
|
|
5
|
+
UDL and enforces its actors, lifecycle transitions, requirements and effects.
|
|
6
|
+
The UDL package parses, validates and serializes contracts; it executes no actions.
|
|
7
|
+
This version supports SAR only.
|
|
4
8
|
|
|
5
|
-
|
|
9
|
+
Read the [specification](spec/README.md) for the contract and its runtime obligations.
|
|
10
|
+
The [JSON schema](spec/udl.schema.json) defines every field and default.
|
|
11
|
+
|
|
12
|
+
Install `@hyperscale0/udl` to use the `udl` executable with Node.js 22 or later.
|
|
13
|
+
Given `rental.udl.json` from `hsx build rental.hsx --out rental.udl.json`:
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
npx udl validate rental.udl.json
|
|
17
|
+
npx udl canon rental.udl.json --digest
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Validation checks the contract, not an account balance or a deployed executor.
|
|
21
|
+
The digest identifies canonical bytes. `udl explain UDL####` explains a diagnostic
|
|
22
|
+
code printed by validation; replace `UDL####` with the reported code.
|
|
23
|
+
|
|
24
|
+
From the public source checkout, run `bun install`, then `bun run build`.
|
|
25
|
+
`bun run check` checks schema freshness, types and package tests. Edit prose in
|
|
26
|
+
`spec/README.md`; `bun run docs:build` copies it to `docs/README.md` and
|
|
27
|
+
`llms-full.txt` and writes the `llms.txt` index. Those copies are generated.
|
package/docs/README.md
CHANGED
|
@@ -1,9 +1,29 @@
|
|
|
1
1
|
# UDL 4
|
|
2
2
|
|
|
3
|
-
UDL is the typed contract between an HSX program
|
|
3
|
+
UDL is the Universal Domain Language, the typed contract between an HSX program
|
|
4
|
+
and its executor. The grammar
|
|
4
5
|
lives in `src/schema.ts`. Generate `udl.schema.json` with
|
|
5
6
|
`bun scripts/emit-spec.ts --write`. There is no migration reader for earlier UDL.
|
|
6
7
|
|
|
8
|
+
## Reading a compiled program
|
|
9
|
+
|
|
10
|
+
Start with `product`, `title` and `currency`. `objects` describes business records
|
|
11
|
+
and their attachments. Follow an attachment's instrument identity into
|
|
12
|
+
`instruments` for its retained fields, lifecycle and actions. `actionOrder`
|
|
13
|
+
preserves authored action order even though canonical JSON sorts object keys.
|
|
14
|
+
An action's `publicAction` supplies its exposed name; its actor and requirements
|
|
15
|
+
still control who may execute it and when.
|
|
16
|
+
|
|
17
|
+
Object metadata describes the subject. Instrument fields retain the agreement's
|
|
18
|
+
terms, account bindings and receipts. Party names identify authenticated or
|
|
19
|
+
configured participants. None of these makes a caller-supplied account ID valid.
|
|
20
|
+
A Build freezes this contract and its bindings for the executor.
|
|
21
|
+
|
|
22
|
+
Business instructions are actions composed from typed requirements and effects.
|
|
23
|
+
The four `internal_transfer` instructions are their money effects. The contract
|
|
24
|
+
expresses valid conditions; execution can still refuse for the current state,
|
|
25
|
+
authority, evidence or balance. Parsing and validation execute nothing.
|
|
26
|
+
|
|
7
27
|
## JSON admission and canonical bytes
|
|
8
28
|
|
|
9
29
|
The parser refuses duplicate JSON member names, including escaped spellings of
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperscale0/udl",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.1",
|
|
4
4
|
"description": "The Universal Domain Language: format spec, parser, validator, canonical serializer, and evolution diff.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"udl",
|
|
@@ -78,5 +78,5 @@
|
|
|
78
78
|
"Amir Ayub",
|
|
79
79
|
"Sara AlBakaawi"
|
|
80
80
|
],
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "7940250e962dc6469ea6b29c4034a92cb2338b28"
|
|
82
82
|
}
|
package/spec/README.md
CHANGED
|
@@ -1,9 +1,29 @@
|
|
|
1
1
|
# UDL 4
|
|
2
2
|
|
|
3
|
-
UDL is the typed contract between an HSX program
|
|
3
|
+
UDL is the Universal Domain Language, the typed contract between an HSX program
|
|
4
|
+
and its executor. The grammar
|
|
4
5
|
lives in `src/schema.ts`. Generate `udl.schema.json` with
|
|
5
6
|
`bun scripts/emit-spec.ts --write`. There is no migration reader for earlier UDL.
|
|
6
7
|
|
|
8
|
+
## Reading a compiled program
|
|
9
|
+
|
|
10
|
+
Start with `product`, `title` and `currency`. `objects` describes business records
|
|
11
|
+
and their attachments. Follow an attachment's instrument identity into
|
|
12
|
+
`instruments` for its retained fields, lifecycle and actions. `actionOrder`
|
|
13
|
+
preserves authored action order even though canonical JSON sorts object keys.
|
|
14
|
+
An action's `publicAction` supplies its exposed name; its actor and requirements
|
|
15
|
+
still control who may execute it and when.
|
|
16
|
+
|
|
17
|
+
Object metadata describes the subject. Instrument fields retain the agreement's
|
|
18
|
+
terms, account bindings and receipts. Party names identify authenticated or
|
|
19
|
+
configured participants. None of these makes a caller-supplied account ID valid.
|
|
20
|
+
A Build freezes this contract and its bindings for the executor.
|
|
21
|
+
|
|
22
|
+
Business instructions are actions composed from typed requirements and effects.
|
|
23
|
+
The four `internal_transfer` instructions are their money effects. The contract
|
|
24
|
+
expresses valid conditions; execution can still refuse for the current state,
|
|
25
|
+
authority, evidence or balance. Parsing and validation execute nothing.
|
|
26
|
+
|
|
7
27
|
## JSON admission and canonical bytes
|
|
8
28
|
|
|
9
29
|
The parser refuses duplicate JSON member names, including escaped spellings of
|