@hyperscale0/udl 1.0.0 → 2.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 +19 -4
- package/README.md +24 -36
- package/conformance/invalid/invalid-journeys.expected.json +26 -0
- package/conformance/invalid/invalid-journeys.udl +79 -0
- package/conformance/valid/commerce-escrow.expected.json +1 -1
- package/conformance/valid/commerce-escrow.udl +1 -1
- 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 +23 -0
- package/dist/check-profiles.d.ts.map +1 -1
- package/dist/diagnostics.d.ts +31 -1
- package/dist/diagnostics.d.ts.map +1 -1
- package/dist/diagnostics.js +30 -0
- package/dist/diagnostics.js.map +1 -1
- package/dist/effects.d.ts.map +1 -1
- package/dist/evolution.js +30 -9
- package/dist/evolution.js.map +1 -1
- package/dist/finance.d.ts.map +1 -1
- package/dist/finance.js +37 -18
- package/dist/finance.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/limits.d.ts +1 -1
- package/dist/limits.d.ts.map +1 -1
- package/dist/limits.js +7 -4
- package/dist/limits.js.map +1 -1
- package/dist/schema.d.ts +258 -147
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +33 -10
- package/dist/schema.js.map +1 -1
- package/dist/validation.d.ts +5 -1
- package/dist/validation.d.ts.map +1 -1
- package/dist/validation.js +176 -7
- package/dist/validation.js.map +1 -1
- package/docs/assets/udl.svg +18 -0
- package/docs/guide/03-laws.md +1 -1
- package/docs/guide/08-implementing.md +1 -1
- package/docs/llms-full.txt +62 -29
- package/docs/llms.txt +1 -1
- package/docs/reference/clauses.md +29 -1
- package/docs/reference/cli.md +1 -1
- package/docs/reference/diagnostics.md +32 -27
- package/package.json +6 -5
- package/spec/README.md +8 -16
- package/spec/udl.schema.json +83 -15
- package/src/diagnostics.ts +32 -0
- package/src/evolution.ts +31 -13
- package/src/finance.ts +53 -20
- package/src/index.ts +6 -0
- package/src/limits.ts +7 -4
- package/src/schema.ts +48 -10
- package/src/validation.ts +252 -6
package/CHANGELOG.md
CHANGED
|
@@ -4,15 +4,30 @@ All notable changes to this package are documented here. The format follows
|
|
|
4
4
|
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this package
|
|
5
5
|
follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
-
Format version and package version are different numbers.
|
|
8
|
-
until the package reaches 1.0.0; any change to what format 1 accepts is listed
|
|
9
|
-
here under the release that made it.
|
|
7
|
+
Format version and package version are different numbers.
|
|
10
8
|
|
|
11
9
|
## [Unreleased]
|
|
12
10
|
|
|
11
|
+
## [2.0.0] - 2026-09-10
|
|
12
|
+
|
|
13
|
+
Published in lockstep with HSX 2.0.0.
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- Money field schemas may carry `x-hyperscale-currency`; `UDL6001` refuses any value that is not a three-letter uppercase code on a string schema.
|
|
18
|
+
- `dateComparison` reference laws compare a local date field against a referenced instrument's date field with a matched-field guard.
|
|
19
|
+
- Aggregate invariants sum integer supply fields, not only money fields, so share allocations cannot exceed an offering's supply.
|
|
20
|
+
- `validateUdl` takes options, and the document schema gains `journey` and composition dial definitions.
|
|
21
|
+
- Evolution comparison reports a changed `sandboxFailurePoint`.
|
|
22
|
+
|
|
23
|
+
### Changed
|
|
24
|
+
|
|
25
|
+
- Finance laws know the declared parties: distinct declared parties never alias, and terminal stranding applies only to `ref:` accounts.
|
|
26
|
+
- Field descriptions are prose and no longer part of the frozen schema; the migration plan says recompose is refused when a frozen field changes.
|
|
27
|
+
|
|
13
28
|
## [1.0.0] - 2026-09-04
|
|
14
29
|
|
|
15
|
-
This release is byte-identical to 1.0.0-rc.1.
|
|
30
|
+
This release is byte-identical to 1.0.0-rc.1.
|
|
16
31
|
|
|
17
32
|
## [1.0.0-rc.1] - 2026-09-02
|
|
18
33
|
|
package/README.md
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
UDL is the Universal Domain Language, the canonical JSON contract for a financial product. One `.udl` file declares subjects, instruments, lifecycles, actions, and money movement. An engine can admit that document without reading the source language that produced it.
|
|
1
|
+

|
|
4
2
|
|
|
5
|
-
UDL
|
|
3
|
+
# UDL
|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
UDL is the Universal Domain Language, the canonical JSON contract for a financial product. One `.udl` file declares subjects, instruments, lifecycles, actions, and money movement. An engine admits that document without reading the source language that produced it. UDL keeps provider machinery below the format: it has no file drops, polling loops, cutoff jobs, scheme messages, or provider statement schemas. The `reconcile` clause names settlement evidence against a declared provider-side row; it does not model provider transport or matching machinery.
|
|
8
6
|
|
|
9
7
|
## Install
|
|
10
8
|
|
|
@@ -12,11 +10,11 @@ This package contains the parser, semantic validator, canonical serializer, appe
|
|
|
12
10
|
npm install @hyperscale0/udl
|
|
13
11
|
```
|
|
14
12
|
|
|
15
|
-
|
|
13
|
+
This package contains the parser, semantic validator, canonical serializer, append-only evolution diff, JSON Schema, and conformance corpus.
|
|
16
14
|
|
|
17
|
-
##
|
|
15
|
+
## First document
|
|
18
16
|
|
|
19
|
-
|
|
17
|
+
Save this document as `note.udl`:
|
|
20
18
|
|
|
21
19
|
```json
|
|
22
20
|
{
|
|
@@ -48,6 +46,18 @@ npm install @hyperscale0/udl
|
|
|
48
46
|
}
|
|
49
47
|
```
|
|
50
48
|
|
|
49
|
+
Check the document with the CLI:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
npx udl validate note.udl
|
|
53
|
+
npx udl fmt note.udl --write
|
|
54
|
+
npx udl canon note.udl --digest
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Exit code `0` means success. Exit code `1` means the validator refused the document. Exit code `2` means the invocation or file read failed.
|
|
58
|
+
|
|
59
|
+
In TypeScript, parse, validate, and compare documents directly:
|
|
60
|
+
|
|
51
61
|
```ts
|
|
52
62
|
import { readFile, writeFile } from "node:fs/promises";
|
|
53
63
|
import {
|
|
@@ -69,26 +79,7 @@ const previous = parseUdl(await readFile("note.previous.udl"));
|
|
|
69
79
|
const violations = diffValidatedUdlEvolution(previous, document);
|
|
70
80
|
```
|
|
71
81
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
`parseUdl` accepts a string or `Uint8Array` and rejects malformed UTF-8. `serializeUdl` validates before writing. It sorts object keys by UTF-16 code unit, keeps array order, uses two-space indentation, and writes one final line feed. `canonicalDigest` hashes those UTF-8 bytes with SHA-256 and returns a promise for the lowercase hexadecimal digest.
|
|
75
|
-
|
|
76
|
-
The seven kernel operations are `internal_transfer.create`, `internal_transfer.reserve`, `internal_transfer.post`, `internal_transfer.void`, `account.escrow.provision`, `account.freeze`, and `account.unfreeze`. A `payout` is an execution intent, not another kernel operation.
|
|
77
|
-
|
|
78
|
-
The compiler derives action `effects` from clauses. The validator rejects a supplied effects object unless every row and its order match. Derived effects do not consume the authored node budget.
|
|
79
|
-
|
|
80
|
-
## Command line
|
|
81
|
-
|
|
82
|
-
```bash
|
|
83
|
-
udl validate product.udl
|
|
84
|
-
udl fmt product.udl --write
|
|
85
|
-
udl canon product.udl
|
|
86
|
-
udl canon product.udl --digest
|
|
87
|
-
udl diff frozen.udl product.udl
|
|
88
|
-
udl explain UDL5001
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
Exit code `0` means success. Exit code `1` means the validator or evolution law refused the document. Exit code `2` means the invocation or file read failed.
|
|
82
|
+
The evolution diff API (`diffValidatedUdlEvolution`, `diffInstrumentEvolution`, and `npx udl diff`) verifies that changes between two product versions are append-only. Adding optional fields, states, transitions, and actions is permitted; removing, renaming, or tightening existing structures returns `UDL7xxx` violation issues.
|
|
92
83
|
|
|
93
84
|
## Documentation
|
|
94
85
|
|
|
@@ -96,15 +87,12 @@ Exit code `0` means success. Exit code `1` means the validator or evolution law
|
|
|
96
87
|
- [Format specification](spec/README.md)
|
|
97
88
|
- [Canonical bytes law](docs/reference/canonical.md)
|
|
98
89
|
- [Stable diagnostics](docs/reference/diagnostics.md)
|
|
99
|
-
- [Conformance
|
|
90
|
+
- [Conformance suite](conformance/README.md)
|
|
100
91
|
- [Agent skill](skills/udl/SKILL.md)
|
|
92
|
+
- [Contributing](CONTRIBUTING.md)
|
|
101
93
|
|
|
102
|
-
##
|
|
103
|
-
|
|
104
|
-
The literal `"udl": 1` is the format version. The version in `package.json` is the package version. They move independently. After package version `1.0.0`, an incompatible format change uses a new format literal and keeps an explicit reader for stored format 1 documents during its stated support window.
|
|
105
|
-
|
|
106
|
-
## Contributing and license
|
|
94
|
+
## License and security
|
|
107
95
|
|
|
108
|
-
|
|
96
|
+
UDL is licensed under AGPL-3.0-only, with a commercial license available from Hyperscale LLC. See [LICENSE](LICENSE), [LICENSING.md](LICENSING.md), and [TRADEMARKS.md](TRADEMARKS.md).
|
|
109
97
|
|
|
110
|
-
|
|
98
|
+
Vulnerability reports go through private disclosure as described in [SECURITY.md](SECURITY.md).
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"summary": "Authored journeys reject unknown operations, unknown examples, missing bindings, invalid transitions, and duplicate step ids.",
|
|
3
|
+
"verdict": "invalid",
|
|
4
|
+
"issues": [
|
|
5
|
+
{
|
|
6
|
+
"code": "journey_unknown_operation",
|
|
7
|
+
"path": "$.instruments[0].journeys[0].steps[0].operation"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"code": "journey_unknown_example",
|
|
11
|
+
"path": "$.instruments[0].journeys[1].steps[0].example"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"code": "journey_unbound_reference",
|
|
15
|
+
"path": "$.instruments[0].journeys[2].steps[1].bind.noteId"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"code": "journey_invalid_transition",
|
|
19
|
+
"path": "$.instruments[0].journeys[3].steps[2].operation"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"code": "journey_duplicate_step_id",
|
|
23
|
+
"path": "$.instruments[0].journeys[4].steps[1].id"
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
{
|
|
2
|
+
"instruments": [
|
|
3
|
+
{
|
|
4
|
+
"actionOrder": ["create", "close"],
|
|
5
|
+
"actions": {
|
|
6
|
+
"create": {
|
|
7
|
+
"examples": [{ "input": { "reference": "example" }, "name": "default" }],
|
|
8
|
+
"moves": [],
|
|
9
|
+
"steps": [],
|
|
10
|
+
"summary": "File the note."
|
|
11
|
+
},
|
|
12
|
+
"close": {
|
|
13
|
+
"examples": [{ "input": {}, "name": "default" }],
|
|
14
|
+
"moves": [],
|
|
15
|
+
"steps": [],
|
|
16
|
+
"summary": "Close the note."
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"fields": { "reference": { "type": "string" } },
|
|
20
|
+
"id": "note",
|
|
21
|
+
"idPrefix": "note",
|
|
22
|
+
"journeys": [
|
|
23
|
+
{
|
|
24
|
+
"id": "unknown_operation",
|
|
25
|
+
"label": "Unknown operation",
|
|
26
|
+
"steps": [{ "bind": {}, "example": "default", "operation": "note.missing" }],
|
|
27
|
+
"summary": "Refuse an unknown operation."
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"id": "unknown_example",
|
|
31
|
+
"label": "Unknown example",
|
|
32
|
+
"steps": [{ "bind": {}, "example": "missing", "operation": "note.create" }],
|
|
33
|
+
"summary": "Refuse an unknown example."
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"id": "unbound_reference",
|
|
37
|
+
"label": "Unbound reference",
|
|
38
|
+
"steps": [
|
|
39
|
+
{ "bind": {}, "example": "default", "id": "note", "operation": "note.create" },
|
|
40
|
+
{ "bind": {}, "example": "default", "operation": "note.close" }
|
|
41
|
+
],
|
|
42
|
+
"summary": "Refuse an unbound reference."
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"id": "invalid_transition",
|
|
46
|
+
"label": "Invalid transition",
|
|
47
|
+
"steps": [
|
|
48
|
+
{ "bind": {}, "example": "default", "id": "note", "operation": "note.create" },
|
|
49
|
+
{ "bind": { "noteId": "note" }, "example": "default", "operation": "note.close" },
|
|
50
|
+
{ "bind": { "noteId": "note" }, "example": "default", "operation": "note.close" }
|
|
51
|
+
],
|
|
52
|
+
"summary": "Refuse an invalid transition."
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"id": "duplicate_step_id",
|
|
56
|
+
"label": "Duplicate step id",
|
|
57
|
+
"steps": [
|
|
58
|
+
{ "bind": {}, "example": "default", "id": "duplicate", "operation": "note.create" },
|
|
59
|
+
{ "bind": {}, "example": "default", "id": "duplicate", "operation": "note.create" }
|
|
60
|
+
],
|
|
61
|
+
"summary": "Refuse a duplicate step id."
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
"lifecycle": {
|
|
65
|
+
"initial": "open",
|
|
66
|
+
"states": ["open", "closed"],
|
|
67
|
+
"transitions": { "close": { "from": ["open"], "to": "closed" } }
|
|
68
|
+
},
|
|
69
|
+
"required": ["reference"],
|
|
70
|
+
"summary": "A note a tenant files and later closes.",
|
|
71
|
+
"title": "Note"
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
"product": "invalid_journeys",
|
|
75
|
+
"subjects": [],
|
|
76
|
+
"title": "Invalid journeys",
|
|
77
|
+
"udl": 1,
|
|
78
|
+
"version": 1
|
|
79
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"canonical": "commerce-escrow.udl",
|
|
3
|
-
"digest": "
|
|
3
|
+
"digest": "93d7507312044665d50b9913350ab6ed54c6733af044840e133b263b10224daf",
|
|
4
4
|
"summary": "Marketplace escrow: funds held on order, released to the seller on delivery.",
|
|
5
5
|
"verdict": "valid"
|
|
6
6
|
}
|
|
@@ -841,7 +841,7 @@
|
|
|
841
841
|
},
|
|
842
842
|
"create": {
|
|
843
843
|
"agentDescription": "Open escrow against an active listing and provision its dedicated escrow account. No money moves yet. The listing must be active, and its asking price, currency, and seller account are copied onto the escrow, so passing an amount is neither needed nor allowed.",
|
|
844
|
-
"description": "Opens escrow against an active listing and provisions its dedicated product escrow account. The held amount is always the listing's askingPrice and is not caller supplied. For a security deposit use the standard library module security_deposit, and for a rental or booking fee use cancellable_booking. Both live under open/hsx/std/
|
|
844
|
+
"description": "Opens escrow against an active listing and provisions its dedicated product escrow account. The held amount is always the listing's askingPrice and is not caller supplied. For a security deposit use the standard library module security_deposit, and for a rental or booking fee use cancellable_booking. Both live under open/hsx/std/money_flows.",
|
|
845
845
|
"effects": {
|
|
846
846
|
"reads": [
|
|
847
847
|
{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"canonical": "minimal.udl",
|
|
3
|
-
"digest": "
|
|
3
|
+
"digest": "d7a742548bf559eaa3101e09e0c404190957e34854b220ca010d145d4fd9cae6",
|
|
4
4
|
"summary": "Compact, reverse-ordered bytes canonicalize to minimal.udl.",
|
|
5
5
|
"verdict": "valid"
|
|
6
6
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":1,"udl":1,"title":"Minimal","subjects":[],"product":"minimal","instruments":[{"fields":{"reference":{"type":"string"}},"id":"note","idPrefix":"note","lifecycle":{"initial":"open","states":["open","closed"],"transitions":{"close":{"from":["open"],"to":"closed"}}},"required":["reference"],"summary":"A note a tenant files and later closes.","title":"Note","actionOrder":["close","create"],"actions":{"close":{"moves":[],"steps":[],"summary":"Close the note."},"create":{"moves":[],"steps":[],"summary":"File the note."}}}]}
|
|
1
|
+
{"version":1,"udl":1,"title":"Minimal","subjects":[],"product":"minimal","instruments":[{"fields":{"reference":{"type":"string"}},"id":"note","idPrefix":"note","journeys":[{"id":"file_note","label":"File a note","steps":[{"bind":{},"example":"default","id":"note","operation":"note.create"}],"summary":"File a note."}],"lifecycle":{"initial":"open","states":["open","closed"],"transitions":{"close":{"from":["open"],"to":"closed"}}},"required":["reference"],"summary":"A note a tenant files and later closes.","title":"Note","actionOrder":["close","create"],"actions":{"close":{"moves":[],"steps":[],"summary":"Close the note."},"create":{"examples":[{"input":{"reference":"example"},"name":"default"}],"moves":[],"steps":[],"summary":"File the note."}}}]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"canonical": "minimal.udl",
|
|
3
|
-
"digest": "
|
|
3
|
+
"digest": "d7a742548bf559eaa3101e09e0c404190957e34854b220ca010d145d4fd9cae6",
|
|
4
4
|
"summary": "The smallest document the grammar and the semantic laws both accept.",
|
|
5
5
|
"verdict": "valid"
|
|
6
6
|
}
|
|
@@ -12,6 +12,14 @@
|
|
|
12
12
|
"summary": "Close the note."
|
|
13
13
|
},
|
|
14
14
|
"create": {
|
|
15
|
+
"examples": [
|
|
16
|
+
{
|
|
17
|
+
"input": {
|
|
18
|
+
"reference": "example"
|
|
19
|
+
},
|
|
20
|
+
"name": "default"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
15
23
|
"moves": [],
|
|
16
24
|
"steps": [],
|
|
17
25
|
"summary": "File the note."
|
|
@@ -24,6 +32,21 @@
|
|
|
24
32
|
},
|
|
25
33
|
"id": "note",
|
|
26
34
|
"idPrefix": "note",
|
|
35
|
+
"journeys": [
|
|
36
|
+
{
|
|
37
|
+
"id": "file_note",
|
|
38
|
+
"label": "File a note",
|
|
39
|
+
"steps": [
|
|
40
|
+
{
|
|
41
|
+
"bind": {},
|
|
42
|
+
"example": "default",
|
|
43
|
+
"id": "note",
|
|
44
|
+
"operation": "note.create"
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"summary": "File a note."
|
|
48
|
+
}
|
|
49
|
+
],
|
|
27
50
|
"lifecycle": {
|
|
28
51
|
"initial": "open",
|
|
29
52
|
"states": [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-profiles.d.ts","sourceRoot":"","sources":["../src/check-profiles.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;CACtC;AAED,eAAO,MAAM,wBAAwB
|
|
1
|
+
{"version":3,"file":"check-profiles.d.ts","sourceRoot":"","sources":["../src/check-profiles.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;CACtC;AAED,eAAO,MAAM,wBAAwB;qBAEzB,mBAAmB;wBAChB,uBAAuB;wBACvB,WAAW;0BACT,oBAAoB;;;qBAWzB,mBAAmB;wBAChB,gCAAgC;wBAChC,WAAW;0BACT,aAAa;;;qBAIlB,eAAe;wBACZ,kBAAkB;wBAClB,aAAa;0BACX,cAAc;;;qBAInB,eAAe;wBACZ,oBAAoB;wBACpB,aAAa;0BACX,cAAc;;;qBAInB,eAAe;wBACZ,iBAAiB;wBACjB,aAAa;0BACX,cAAc;;;qBAInB,qBAAqB;wBAClB,QAAQ;wBACR,WAAW;0BACT,iBAAiB;;;qBAItB,wBAAwB;wBACrB,cAAc;0BACZ,eAAe;;EAGuB,CAAC;AAExD,6EAA6E;AAC7E,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,GAChB,uBAAuB,GAAG,SAAS,CAIrC"}
|
package/dist/diagnostics.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type UdlIssueCategory = "invalid_evolution" | "invalid_json" | "invalid_semantics" | "invalid_shape" | "invalid_utf8" | "resource_limit";
|
|
2
|
-
export type UdlDiagnosticFamily = "admission" | "document" | "evolution" | "finance" | "gates" | "lifecycle" | "schema";
|
|
2
|
+
export type UdlDiagnosticFamily = "admission" | "document" | "evolution" | "finance" | "gates" | "journey" | "lifecycle" | "schema";
|
|
3
3
|
declare const diagnosticDefinitions: {
|
|
4
4
|
readonly UDL1001: {
|
|
5
5
|
readonly category: "invalid_utf8";
|
|
@@ -133,6 +133,36 @@ declare const diagnosticDefinitions: {
|
|
|
133
133
|
readonly title: "Unsupported JSON Schema";
|
|
134
134
|
readonly fix: "Use only the sealed UDL JSON Schema subset.";
|
|
135
135
|
};
|
|
136
|
+
readonly journey_unknown_operation: {
|
|
137
|
+
readonly category: "invalid_semantics";
|
|
138
|
+
readonly family: "journey";
|
|
139
|
+
readonly title: "Journey operation is not in the composition";
|
|
140
|
+
readonly fix: "Name an operation in the composition closure.";
|
|
141
|
+
};
|
|
142
|
+
readonly journey_unknown_example: {
|
|
143
|
+
readonly category: "invalid_semantics";
|
|
144
|
+
readonly family: "journey";
|
|
145
|
+
readonly title: "Journey example does not exist";
|
|
146
|
+
readonly fix: "Name an authored example on the journey operation.";
|
|
147
|
+
};
|
|
148
|
+
readonly journey_invalid_transition: {
|
|
149
|
+
readonly category: "invalid_semantics";
|
|
150
|
+
readonly family: "journey";
|
|
151
|
+
readonly title: "Journey lifecycle transition is invalid";
|
|
152
|
+
readonly fix: "Order the steps so each action starts from the state produced by earlier steps.";
|
|
153
|
+
};
|
|
154
|
+
readonly journey_unbound_reference: {
|
|
155
|
+
readonly category: "invalid_semantics";
|
|
156
|
+
readonly family: "journey";
|
|
157
|
+
readonly title: "Journey reference is unbound or has the wrong kind";
|
|
158
|
+
readonly fix: "Bind every reference input to an earlier step that creates the required kind.";
|
|
159
|
+
};
|
|
160
|
+
readonly journey_duplicate_step_id: {
|
|
161
|
+
readonly category: "invalid_semantics";
|
|
162
|
+
readonly family: "journey";
|
|
163
|
+
readonly title: "Journey step id is duplicated";
|
|
164
|
+
readonly fix: "Give every named step in the journey a unique id.";
|
|
165
|
+
};
|
|
136
166
|
readonly UDL7001: {
|
|
137
167
|
readonly category: "invalid_evolution";
|
|
138
168
|
readonly family: "evolution";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../src/diagnostics.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GACxB,mBAAmB,GACnB,cAAc,GACd,mBAAmB,GACnB,eAAe,GACf,cAAc,GACd,gBAAgB,CAAC;AAErB,MAAM,MAAM,mBAAmB,GAC3B,WAAW,GACX,UAAU,GACV,WAAW,GACX,SAAS,GACT,OAAO,GACP,WAAW,GACX,QAAQ,CAAC;AAEb,QAAA,MAAM,qBAAqB
|
|
1
|
+
{"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../src/diagnostics.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GACxB,mBAAmB,GACnB,cAAc,GACd,mBAAmB,GACnB,eAAe,GACf,cAAc,GACd,gBAAgB,CAAC;AAErB,MAAM,MAAM,mBAAmB,GAC3B,WAAW,GACX,UAAU,GACV,WAAW,GACX,SAAS,GACT,OAAO,GACP,SAAS,GACT,WAAW,GACX,QAAQ,CAAC;AAEb,QAAA,MAAM,qBAAqB;;iBAEvB,QAAQ,EAAE,cAAc;iBACxB,MAAM,EAAE,WAAW;iBACnB,KAAK,EAAE,eAAe;iBACtB,GAAG,EAAE,qCAAqC;;;iBAG1C,QAAQ,EAAE,cAAc;iBACxB,MAAM,EAAE,WAAW;iBACnB,KAAK,EAAE,cAAc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C,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,KAAK,CACnB,IAAI,EAAE,YAAY,EAClB,IAAI,EAAE,MAAM,EACZ,aAAa,CAAC,EAAE,MAAM,GACrB,QAAQ,CASV"}
|
package/dist/diagnostics.js
CHANGED
|
@@ -131,6 +131,36 @@ const diagnosticDefinitions = {
|
|
|
131
131
|
title: "Unsupported JSON Schema",
|
|
132
132
|
fix: "Use only the sealed UDL JSON Schema subset.",
|
|
133
133
|
},
|
|
134
|
+
journey_unknown_operation: {
|
|
135
|
+
category: "invalid_semantics",
|
|
136
|
+
family: "journey",
|
|
137
|
+
title: "Journey operation is not in the composition",
|
|
138
|
+
fix: "Name an operation in the composition closure.",
|
|
139
|
+
},
|
|
140
|
+
journey_unknown_example: {
|
|
141
|
+
category: "invalid_semantics",
|
|
142
|
+
family: "journey",
|
|
143
|
+
title: "Journey example does not exist",
|
|
144
|
+
fix: "Name an authored example on the journey operation.",
|
|
145
|
+
},
|
|
146
|
+
journey_invalid_transition: {
|
|
147
|
+
category: "invalid_semantics",
|
|
148
|
+
family: "journey",
|
|
149
|
+
title: "Journey lifecycle transition is invalid",
|
|
150
|
+
fix: "Order the steps so each action starts from the state produced by earlier steps.",
|
|
151
|
+
},
|
|
152
|
+
journey_unbound_reference: {
|
|
153
|
+
category: "invalid_semantics",
|
|
154
|
+
family: "journey",
|
|
155
|
+
title: "Journey reference is unbound or has the wrong kind",
|
|
156
|
+
fix: "Bind every reference input to an earlier step that creates the required kind.",
|
|
157
|
+
},
|
|
158
|
+
journey_duplicate_step_id: {
|
|
159
|
+
category: "invalid_semantics",
|
|
160
|
+
family: "journey",
|
|
161
|
+
title: "Journey step id is duplicated",
|
|
162
|
+
fix: "Give every named step in the journey a unique id.",
|
|
163
|
+
},
|
|
134
164
|
UDL7001: {
|
|
135
165
|
category: "invalid_evolution",
|
|
136
166
|
family: "evolution",
|
package/dist/diagnostics.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnostics.js","sourceRoot":"","sources":["../src/diagnostics.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"diagnostics.js","sourceRoot":"","sources":["../src/diagnostics.ts"],"names":[],"mappings":"AAkBA,MAAM,qBAAqB,GAAG;IAC5B,OAAO,EAAE;QACP,QAAQ,EAAE,cAAc;QACxB,MAAM,EAAE,WAAW;QACnB,KAAK,EAAE,eAAe;QACtB,GAAG,EAAE,qCAAqC;KAC3C;IACD,OAAO,EAAE;QACP,QAAQ,EAAE,cAAc;QACxB,MAAM,EAAE,WAAW;QACnB,KAAK,EAAE,cAAc;QACrB,GAAG,EAAE,2CAA2C;KACjD;IACD,OAAO,EAAE;QACP,QAAQ,EAAE,eAAe;QACzB,MAAM,EAAE,WAAW;QACnB,KAAK,EAAE,wBAAwB;QAC/B,GAAG,EAAE,sCAAsC;KAC5C;IACD,OAAO,EAAE;QACP,QAAQ,EAAE,gBAAgB;QAC1B,MAAM,EAAE,WAAW;QACnB,KAAK,EAAE,yBAAyB;QAChC,GAAG,EAAE,wGAAwG;KAC9G;IAED,OAAO,EAAE;QACP,QAAQ,EAAE,mBAAmB;QAC7B,MAAM,EAAE,UAAU;QAClB,KAAK,EAAE,uBAAuB;QAC9B,GAAG,EAAE,sCAAsC;KAC5C;IACD,OAAO,EAAE;QACP,QAAQ,EAAE,mBAAmB;QAC7B,MAAM,EAAE,UAAU;QAClB,KAAK,EAAE,wBAAwB;QAC/B,GAAG,EAAE,oFAAoF;KAC1F;IACD,OAAO,EAAE;QACP,QAAQ,EAAE,mBAAmB;QAC7B,MAAM,EAAE,UAAU;QAClB,KAAK,EAAE,0BAA0B;QACjC,GAAG,EAAE,iDAAiD;KACvD;IAED,OAAO,EAAE;QACP,QAAQ,EAAE,mBAAmB;QAC7B,MAAM,EAAE,WAAW;QACnB,KAAK,EAA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AAE,mDAAmD;KACzD;IAED,OAAO,EAAE;QACP,QAAQ,EAAE,mBAAmB;QAC7B,MAAM,EAAE,WAAW;QACnB,KAAK,EAAE,yBAAyB;QAChC,GAAG,EAAE,6FAA6F;KACnG;IACD,OAAO,EAAE;QACP,QAAQ,EAAE,mBAAmB;QAC7B,MAAM,EAAE,WAAW;QACnB,KAAK,EAAE,2BAA2B;QAClC,GAAG,EAAE,yDAAyD;KAC/D;CASF,CAAC;AAYF,MAAM,CAAC,MAAM,cAAc,GAA6B,MAAM,CAAC,OAAO,CACpE,qBAAqB,CACtB,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,UAAU,CAAC,EAAE,EAAE,CAAC,CAAC;IAC7B,IAAI,EAAE,IAAoB;IAC1B,GAAG,UAAU;CACd,CAAC,CAAC,CAAC;AAEJ,MAAM,UAAU,aAAa,CAAC,IAAY;IACxC,OAAO,cAAc,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;AACvE,CAAC;AAUD,MAAM,UAAU,KAAK,CACnB,IAAkB,EAClB,IAAY,EACZ,aAAsB;IAEtB,MAAM,UAAU,GAAG,qBAAqB,CAAC,IAAI,CAAC,CAAC;IAC/C,OAAO;QACL,QAAQ,EAAE,UAAU,CAAC,QAAQ;QAC7B,IAAI;QACJ,GAAG,EAAE,UAAU,CAAC,GAAG;QACnB,OAAO,EAAE,aAAa,IAAI,UAAU,CAAC,KAAK;QAC1C,IAAI;KACL,CAAC;AACJ,CAAC"}
|
package/dist/effects.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"effects.d.ts","sourceRoot":"","sources":["../src/effects.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"effects.d.ts","sourceRoot":"","sources":["../src/effects.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,YACzB,SAAS,E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C,CAAC;IAClD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AASD;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,QAAQ,GAAG,gBAAgB,CAsB9D;AAED,2EAA2E;AAC3E,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EACzC,UAAU,EAAE,SAAS,sBAAsB,EAAE,GAC5C,iBAAiB,CAqCnB"}
|
package/dist/evolution.js
CHANGED
|
@@ -31,7 +31,7 @@ export function snapshotUdlInstrument(instrument) {
|
|
|
31
31
|
: {}),
|
|
32
32
|
fields: Object.fromEntries(Object.entries(instrument.fields).map(([field, schema]) => [
|
|
33
33
|
field,
|
|
34
|
-
{ required: required.has(field), schema },
|
|
34
|
+
{ required: required.has(field), schema: withoutProse(schema) },
|
|
35
35
|
])),
|
|
36
36
|
id: instrument.id,
|
|
37
37
|
idPrefix: instrument.idPrefix,
|
|
@@ -301,9 +301,30 @@ function snapshotJsonSchemaFields(schema) {
|
|
|
301
301
|
: []);
|
|
302
302
|
return Object.fromEntries(Object.entries(properties).map(([field, fieldSchema]) => [
|
|
303
303
|
field,
|
|
304
|
-
{ required: required.has(field), schema: fieldSchema },
|
|
304
|
+
{ required: required.has(field), schema: withoutProse(fieldSchema) },
|
|
305
305
|
]));
|
|
306
306
|
}
|
|
307
|
+
/**
|
|
308
|
+
* Descriptions are prose for readers, not shape: a wording fix in a std
|
|
309
|
+
* template must land on a live flow as an extension, never as a refusal.
|
|
310
|
+
*/
|
|
311
|
+
function withoutProse(value, depth = 1) {
|
|
312
|
+
if (depth > UDL_LIMITS.maxDepth)
|
|
313
|
+
throw nestingExceeded();
|
|
314
|
+
if (Array.isArray(value)) {
|
|
315
|
+
return value.map((item) => withoutProse(item, depth + 1));
|
|
316
|
+
}
|
|
317
|
+
if (value === null || typeof value !== "object")
|
|
318
|
+
return value;
|
|
319
|
+
return Object.fromEntries(Object.entries(value)
|
|
320
|
+
.filter(([key]) => key !== "description")
|
|
321
|
+
.map(([key, entry]) => [key, withoutProse(entry, depth + 1)]));
|
|
322
|
+
}
|
|
323
|
+
function nestingExceeded() {
|
|
324
|
+
return new UdlError([
|
|
325
|
+
issue("UDL1004", "$", `UDL nesting exceeds ${UDL_LIMITS.maxDepth} levels`),
|
|
326
|
+
]);
|
|
327
|
+
}
|
|
307
328
|
function snapshotJsonSchemaConstraints(schema) {
|
|
308
329
|
const { properties: _properties, required: _required, ...constraints } = schema;
|
|
309
330
|
return constraints;
|
|
@@ -424,8 +445,11 @@ function diffActions(previous, next) {
|
|
|
424
445
|
stableStringify(current.requiresChecks ?? [])) {
|
|
425
446
|
violations.push(`action ${action} changed its check prerequisites`);
|
|
426
447
|
}
|
|
427
|
-
|
|
428
|
-
|
|
448
|
+
// A failure point only adds a sandbox refusal for one documented amount, so
|
|
449
|
+
// declaring one on an action that had none is additive; changing or
|
|
450
|
+
// removing a declared one rewrites what a sandbox integration relies on.
|
|
451
|
+
if (descriptor.sandboxFailurePoint &&
|
|
452
|
+
descriptor.sandboxFailurePoint !== (current.sandboxFailurePoint ?? null)) {
|
|
429
453
|
violations.push(`action ${action} changed its sandbox failure point`);
|
|
430
454
|
}
|
|
431
455
|
if (stableStringify(descriptor.updates ?? []) !==
|
|
@@ -545,11 +569,8 @@ function recordValue(value) {
|
|
|
545
569
|
* and lands here rather than exhausting the call stack.
|
|
546
570
|
*/
|
|
547
571
|
function stableStringify(value, depth = 1) {
|
|
548
|
-
if (depth > UDL_LIMITS.maxDepth)
|
|
549
|
-
throw
|
|
550
|
-
issue("UDL1004", "$", `UDL nesting exceeds ${UDL_LIMITS.maxDepth} levels`),
|
|
551
|
-
]);
|
|
552
|
-
}
|
|
572
|
+
if (depth > UDL_LIMITS.maxDepth)
|
|
573
|
+
throw nestingExceeded();
|
|
553
574
|
if (value === null || typeof value !== "object") {
|
|
554
575
|
return JSON.stringify(value) ?? "null";
|
|
555
576
|
}
|