@hyperscale0/udl 2.3.0 → 2.4.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 +26 -0
- package/README.md +5 -1
- package/conformance/invalid/invalid-journeys.expected.json +3 -19
- package/conformance/invalid/invalid-journeys.udl +47 -49
- package/conformance/valid/attested.expected.json +6 -0
- package/conformance/valid/attested.udl +251 -0
- package/conformance/valid/hand-edited.expected.json +1 -1
- package/conformance/valid/hand-edited.udl +1 -1
- package/conformance/valid/minimal.expected.json +1 -1
- package/conformance/valid/minimal.udl +0 -15
- package/conformance/valid/vocabulary.expected.json +6 -0
- package/conformance/valid/vocabulary.udl +1999 -0
- package/dist/allocation.d.ts +60 -0
- package/dist/allocation.d.ts.map +1 -0
- package/dist/allocation.js +177 -0
- package/dist/allocation.js.map +1 -0
- package/dist/diagnostics.d.ts +1 -31
- package/dist/diagnostics.d.ts.map +1 -1
- package/dist/diagnostics.js +0 -30
- package/dist/diagnostics.js.map +1 -1
- package/dist/distribution.d.ts +15 -0
- package/dist/distribution.d.ts.map +1 -0
- package/dist/distribution.js +49 -0
- package/dist/distribution.js.map +1 -0
- package/dist/effects.d.ts.map +1 -1
- package/dist/effects.js +23 -1
- package/dist/effects.js.map +1 -1
- package/dist/evolution.d.ts +12 -0
- package/dist/evolution.d.ts.map +1 -1
- package/dist/evolution.js +42 -1
- package/dist/evolution.js.map +1 -1
- package/dist/finance.d.ts +18 -1
- package/dist/finance.d.ts.map +1 -1
- package/dist/finance.js +158 -27
- package/dist/finance.js.map +1 -1
- package/dist/index.d.ts +8 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/instrument-references.d.ts +5 -0
- package/dist/instrument-references.d.ts.map +1 -0
- package/dist/instrument-references.js +69 -0
- package/dist/instrument-references.js.map +1 -0
- package/dist/limits.d.ts +3 -3
- package/dist/limits.d.ts.map +1 -1
- package/dist/limits.js +3 -7
- package/dist/limits.js.map +1 -1
- package/dist/reference.d.ts +3 -0
- package/dist/reference.d.ts.map +1 -0
- package/dist/reference.js +28 -0
- package/dist/reference.js.map +1 -0
- package/dist/schema.d.ts +1232 -83
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +398 -60
- package/dist/schema.js.map +1 -1
- package/dist/validation.d.ts +14 -0
- package/dist/validation.d.ts.map +1 -1
- package/dist/validation.js +75 -131
- package/dist/validation.js.map +1 -1
- package/dist/vocabulary.d.ts +23 -0
- package/dist/vocabulary.d.ts.map +1 -0
- package/dist/vocabulary.js +965 -0
- package/dist/vocabulary.js.map +1 -0
- package/docs/README.md +2 -1
- package/docs/funding-custody.md +165 -0
- package/docs/guide/09-schedules-and-allocation.md +130 -0
- package/docs/llms-full.txt +620 -101
- package/docs/llms.txt +1 -1
- package/docs/reference/clauses.md +451 -63
- package/docs/reference/cli.md +3 -1
- package/docs/reference/diagnostics.md +33 -38
- package/package.json +5 -6
- package/spec/udl.schema.json +1095 -118
- package/src/allocation.ts +259 -0
- package/src/diagnostics.ts +0 -32
- package/src/distribution.ts +61 -0
- package/src/effects.ts +27 -1
- package/src/evolution.ts +63 -3
- package/src/finance.ts +218 -24
- package/src/index.ts +30 -3
- package/src/instrument-references.ts +98 -0
- package/src/limits.ts +3 -7
- package/src/reference.ts +31 -0
- package/src/schema.ts +417 -66
- package/src/validation.ts +112 -182
- package/src/vocabulary.ts +1508 -0
package/docs/reference/cli.md
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
<!-- Generated by scripts/docs/build.ts from @hyperscale0/udl 2.
|
|
1
|
+
<!-- Generated by scripts/docs/build.ts from @hyperscale0/udl 2.4.0. Edit the source, not cli.md. -->
|
|
2
2
|
|
|
3
3
|
# Command reference
|
|
4
4
|
|
|
5
|
+
In the full repository checkout, run `bun open/udl/src/cli.ts validate <file.udl.json>` from the repository root. The entrypoint is `open/udl/src/cli.ts`; in a standalone package checkout it is `src/cli.ts`. Use this local validator for local HSX output.
|
|
6
|
+
|
|
5
7
|
The installed `udl` binary exposes the following commands and exit codes.
|
|
6
8
|
|
|
7
9
|
```text
|
|
@@ -1,43 +1,38 @@
|
|
|
1
|
-
<!-- Generated by scripts/docs/build.ts from @hyperscale0/udl 2.
|
|
1
|
+
<!-- Generated by scripts/docs/build.ts from @hyperscale0/udl 2.4.0. Edit the source, not diagnostics.md. -->
|
|
2
2
|
|
|
3
3
|
# Diagnostic reference
|
|
4
4
|
|
|
5
5
|
Codes are stable. Titles and messages may become clearer without changing the code. Apply the listed fix, then validate the whole document again.
|
|
6
6
|
|
|
7
|
-
| Code
|
|
8
|
-
|
|
|
9
|
-
| `
|
|
10
|
-
| `
|
|
11
|
-
| `
|
|
12
|
-
| `
|
|
13
|
-
| `
|
|
14
|
-
| `
|
|
15
|
-
| `
|
|
16
|
-
| `
|
|
17
|
-
| `
|
|
18
|
-
| `
|
|
19
|
-
| `
|
|
20
|
-
| `
|
|
21
|
-
| `
|
|
22
|
-
| `
|
|
23
|
-
| `
|
|
24
|
-
| `
|
|
25
|
-
| `
|
|
26
|
-
| `
|
|
27
|
-
| `
|
|
28
|
-
| `
|
|
29
|
-
| `
|
|
30
|
-
| `
|
|
31
|
-
| `
|
|
32
|
-
| `
|
|
33
|
-
| `
|
|
34
|
-
| `
|
|
35
|
-
| `
|
|
36
|
-
| `
|
|
37
|
-
| `
|
|
38
|
-
| `
|
|
39
|
-
| `UDL5012` | gates | invalid_semantics | Reconcile exception reason field has the wrong type | Point reasonField at a required plain text field declared by the exception child. |
|
|
40
|
-
| `UDL5013` | gates | invalid_semantics | Piece stage violation | Reference a declared piece plan and stage in the containing instrument. |
|
|
41
|
-
| `UDL6001` | schema | invalid_semantics | Unsupported JSON Schema | Use only the sealed UDL JSON Schema subset. |
|
|
42
|
-
| `UDL7001` | evolution | invalid_evolution | Stored contract changed | Keep stored identities and contracts unchanged, and add only allowed optional declarations. |
|
|
43
|
-
| `UDL7002` | evolution | invalid_evolution | Version was not increased | Increase the product version for every semantic change. |
|
|
7
|
+
| Code | Family | Category | Title | Fix |
|
|
8
|
+
| --------- | --------- | ----------------- | ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
|
|
9
|
+
| `UDL1001` | admission | invalid_utf8 | Invalid UTF-8 | Encode the document as valid UTF-8. |
|
|
10
|
+
| `UDL1002` | admission | invalid_json | Invalid JSON | Repair the JSON syntax before validation. |
|
|
11
|
+
| `UDL1003` | admission | invalid_shape | Invalid document shape | Match the published UDL JSON Schema. |
|
|
12
|
+
| `UDL1004` | admission | resource_limit | Resource limit exceeded | Reduce the source size, nesting, values, strings, references, or financial paths named by the message. |
|
|
13
|
+
| `UDL2001` | document | invalid_semantics | Duplicate declaration | Give each declaration a unique name. |
|
|
14
|
+
| `UDL2002` | document | invalid_semantics | Document law violation | Repair the declaration, subject contract, or derived effects named by the message. |
|
|
15
|
+
| `UDL2005` | document | invalid_semantics | Derived effects mismatch | Regenerate the action effects from its clauses. |
|
|
16
|
+
| `UDL2010` | document | invalid_semantics | Action graph violation | Order all actions and calls without cycles or collisions, within depth and count limits. |
|
|
17
|
+
| `UDL2011` | document | invalid_semantics | Action binding violation | Bind parameters to declared instance, piece, or caller variables without forward references or duplicate captures. |
|
|
18
|
+
| `UDL2012` | document | invalid_semantics | Action authority violation | Match principal, approval, and recovery policies and keep field paths within tenant boundary. |
|
|
19
|
+
| `UDL2013` | document | invalid_semantics | Action effect or evidence violation | Provide valid effect kind, matching effect signature, and non-empty evidence for every leaf. |
|
|
20
|
+
| `UDL3001` | lifecycle | invalid_semantics | Lifecycle is not closed | Declare every state and action transition, and make every state reachable. |
|
|
21
|
+
| `UDL4001` | finance | invalid_semantics | Money graph violation | Balance every funded amount and close every hold on each lifecycle path. |
|
|
22
|
+
| `UDL4002` | finance | invalid_semantics | Piece partition violation | Match piece plan total, amounts, and payees to required immutable fields and declared partition. |
|
|
23
|
+
| `UDL5001` | gates | invalid_semantics | Reference gate violation | Point the gate at a declared instrument, action, state, field, and reference. |
|
|
24
|
+
| `UDL5002` | gates | invalid_semantics | Check requirement violation | Use a declared check with compatible evidence and recurrence. |
|
|
25
|
+
| `UDL5003` | gates | invalid_semantics | Exposure gate violation | Use declared account and money fields for the exposure gate. |
|
|
26
|
+
| `UDL5004` | gates | invalid_semantics | Aggregate law violation | Point the aggregate at compatible parent and child fields. |
|
|
27
|
+
| `UDL5005` | gates | invalid_semantics | Settlement or payout violation | Use a declared settlement account and a compatible payout statement line. |
|
|
28
|
+
| `UDL5006` | gates | invalid_semantics | Quote and commit violation | Declare one complete quote freeze set and one matching commit action. |
|
|
29
|
+
| `UDL5007` | gates | invalid_semantics | Reconcile exception child violation | Name a declared child whose reference points back to this instrument. |
|
|
30
|
+
| `UDL5008` | gates | invalid_semantics | Action clause violation | Repair the clause fields and keep incompatible clauses separate. |
|
|
31
|
+
| `UDL5009` | gates | invalid_semantics | Reconcile exception amount field is missing or optional | Name the exception child's required money field in amountField. |
|
|
32
|
+
| `UDL5010` | gates | invalid_semantics | Reconcile exception amount field has the wrong type | Point amountField at a money field declared by the exception child. |
|
|
33
|
+
| `UDL5011` | gates | invalid_semantics | Reconcile exception reason field is missing or optional | Name the exception child's required text field in reasonField. |
|
|
34
|
+
| `UDL5012` | gates | invalid_semantics | Reconcile exception reason field has the wrong type | Point reasonField at a required plain text field declared by the exception child. |
|
|
35
|
+
| `UDL5013` | gates | invalid_semantics | Piece stage violation | Reference a declared piece plan and stage in the containing instrument. |
|
|
36
|
+
| `UDL6001` | schema | invalid_semantics | Unsupported JSON Schema | Use only the sealed UDL JSON Schema subset. |
|
|
37
|
+
| `UDL7001` | evolution | invalid_evolution | Stored contract changed | Keep stored identities and contracts unchanged, and add only allowed optional declarations. |
|
|
38
|
+
| `UDL7002` | evolution | invalid_evolution | Version was not increased | Increase the product version for every semantic change. |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperscale0/udl",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"description": "The Universal Domain Language: format spec, parser, validator, canonical serializer, and evolution diff.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"udl",
|
|
@@ -60,10 +60,9 @@
|
|
|
60
60
|
"access": "public"
|
|
61
61
|
},
|
|
62
62
|
"scripts": {
|
|
63
|
-
"build": "tsc -p tsconfig.build.json",
|
|
64
|
-
"check": "bun run spec:check && bun run docs:
|
|
65
|
-
"docs:build": "bun scripts/docs/build.ts
|
|
66
|
-
"docs:check": "bun scripts/docs/build.ts --check",
|
|
63
|
+
"build": "bun run docs:build && tsc -p tsconfig.build.json",
|
|
64
|
+
"check": "bun run spec:check && bun run docs:build && bun test && tsc -p tsconfig.json && bun run build && bun scripts/check-bin.ts",
|
|
65
|
+
"docs:build": "bun scripts/docs/build.ts",
|
|
67
66
|
"postpack": "bun scripts/pack-exports.ts restore",
|
|
68
67
|
"prepack": "bun run build && bun scripts/pack-exports.ts apply",
|
|
69
68
|
"spec": "bun scripts/emit-spec.ts --write",
|
|
@@ -84,5 +83,5 @@
|
|
|
84
83
|
"Amir Ayub",
|
|
85
84
|
"Sara AlBakaawi"
|
|
86
85
|
],
|
|
87
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "b2d3d1954db0038f654894b1be983ad2bae7c2d0"
|
|
88
87
|
}
|