@hyperscale0/udl 2.0.4 → 2.2.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 +23 -0
- package/README.md +15 -1
- package/conformance/invalid/call-binds-results.expected.json +10 -0
- package/conformance/invalid/call-binds-results.udl +314 -0
- package/conformance/invalid/call-unknown-action.expected.json +10 -0
- package/conformance/invalid/call-unknown-action.udl +314 -0
- package/conformance/invalid/leaf-effect-mismatch.expected.json +10 -0
- package/conformance/invalid/leaf-effect-mismatch.udl +314 -0
- package/conformance/invalid/piece-plan-without-partition.expected.json +10 -0
- package/conformance/invalid/piece-plan-without-partition.udl +305 -0
- package/conformance/invalid/private-action-independent-approval.expected.json +10 -0
- package/conformance/invalid/private-action-independent-approval.udl +314 -0
- package/conformance/invalid/unfund-order-not-reversed.expected.json +10 -0
- package/conformance/invalid/unfund-order-not-reversed.udl +314 -0
- package/conformance/valid/piece-plan-calls.expected.json +6 -0
- package/conformance/valid/piece-plan-calls.udl +314 -0
- package/dist/diagnostics.d.ts +36 -0
- package/dist/diagnostics.d.ts.map +1 -1
- package/dist/diagnostics.js +36 -0
- package/dist/diagnostics.js.map +1 -1
- package/dist/effects.d.ts +26 -3
- package/dist/effects.d.ts.map +1 -1
- package/dist/effects.js +962 -8
- package/dist/effects.js.map +1 -1
- package/dist/index.d.ts +2 -2
- 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 +2 -0
- package/dist/limits.d.ts.map +1 -1
- package/dist/limits.js +2 -0
- package/dist/limits.js.map +1 -1
- package/dist/schema.d.ts +594 -11
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +111 -1
- package/dist/schema.js.map +1 -1
- package/dist/validation.d.ts.map +1 -1
- package/dist/validation.js +289 -4
- package/dist/validation.js.map +1 -1
- package/docs/assets/brand/manifest.json +30 -0
- package/docs/assets/brand/udl-horizontal-white.svg +1 -0
- package/docs/assets/brand/udl-horizontal.svg +1 -0
- package/docs/assets/brand/udl-stacked-white.svg +1 -0
- package/docs/assets/brand/udl-stacked.svg +1 -0
- package/docs/assets/udl.svg +7 -14
- package/docs/llms-full.txt +199 -32
- package/docs/llms.txt +1 -1
- package/docs/reference/clauses.md +162 -1
- package/docs/reference/cli.md +1 -1
- package/docs/reference/diagnostics.md +38 -32
- package/package.json +2 -2
- package/spec/udl.schema.json +321 -1
- package/src/diagnostics.ts +36 -0
- package/src/effects.ts +1672 -9
- package/src/index.ts +15 -0
- package/src/limits.ts +2 -0
- package/src/schema.ts +149 -2
- package/src/validation.ts +470 -5
|
@@ -1,37 +1,43 @@
|
|
|
1
|
-
<!-- Generated by scripts/docs/build.ts from @hyperscale0/udl 2.0.
|
|
1
|
+
<!-- Generated by scripts/docs/build.ts from @hyperscale0/udl 2.2.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 | Family | Category | Title | Fix
|
|
8
|
-
| ---------------------------- | --------- | ----------------- | ------------------------------------------------------- |
|
|
9
|
-
| `journey_duplicate_step_id` | journey | invalid_semantics | Journey step id is duplicated | Give every named step in the journey a unique id.
|
|
10
|
-
| `journey_invalid_transition` | journey | invalid_semantics | Journey lifecycle transition is invalid | Order the steps so each action starts from the state produced by earlier steps.
|
|
11
|
-
| `journey_unbound_reference` | journey | invalid_semantics | Journey reference is unbound or has the wrong kind | Bind every reference input to an earlier step that creates the required kind.
|
|
12
|
-
| `journey_unknown_example` | journey | invalid_semantics | Journey example does not exist | Name an authored example on the journey operation.
|
|
13
|
-
| `journey_unknown_operation` | journey | invalid_semantics | Journey operation is not in the composition | Name an operation in the composition closure.
|
|
14
|
-
| `UDL1001` | admission | invalid_utf8 | Invalid UTF-8 | Encode the document as valid UTF-8.
|
|
15
|
-
| `UDL1002` | admission | invalid_json | Invalid JSON | Repair the JSON syntax before validation.
|
|
16
|
-
| `UDL1003` | admission | invalid_shape | Invalid document shape | Match the published UDL JSON Schema.
|
|
17
|
-
| `UDL1004` | admission | resource_limit | Resource limit exceeded | Reduce the source size, nesting, values, strings, references, or financial paths named by the message.
|
|
18
|
-
| `UDL2001` | document | invalid_semantics | Duplicate declaration | Give each declaration a unique name.
|
|
19
|
-
| `UDL2002` | document | invalid_semantics | Document law violation | Repair the declaration, subject contract, or derived effects named by the message.
|
|
20
|
-
| `UDL2005` | document | invalid_semantics | Derived effects mismatch | Regenerate the action effects from its clauses.
|
|
21
|
-
| `
|
|
22
|
-
| `
|
|
23
|
-
| `
|
|
24
|
-
| `
|
|
25
|
-
| `
|
|
26
|
-
| `
|
|
27
|
-
| `
|
|
28
|
-
| `
|
|
29
|
-
| `
|
|
30
|
-
| `
|
|
31
|
-
| `
|
|
32
|
-
| `
|
|
33
|
-
| `
|
|
34
|
-
| `
|
|
35
|
-
| `
|
|
36
|
-
| `
|
|
37
|
-
| `
|
|
7
|
+
| Code | Family | Category | Title | Fix |
|
|
8
|
+
| ---------------------------- | --------- | ----------------- | ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
|
|
9
|
+
| `journey_duplicate_step_id` | journey | invalid_semantics | Journey step id is duplicated | Give every named step in the journey a unique id. |
|
|
10
|
+
| `journey_invalid_transition` | journey | invalid_semantics | Journey lifecycle transition is invalid | Order the steps so each action starts from the state produced by earlier steps. |
|
|
11
|
+
| `journey_unbound_reference` | journey | invalid_semantics | Journey reference is unbound or has the wrong kind | Bind every reference input to an earlier step that creates the required kind. |
|
|
12
|
+
| `journey_unknown_example` | journey | invalid_semantics | Journey example does not exist | Name an authored example on the journey operation. |
|
|
13
|
+
| `journey_unknown_operation` | journey | invalid_semantics | Journey operation is not in the composition | Name an operation in the composition closure. |
|
|
14
|
+
| `UDL1001` | admission | invalid_utf8 | Invalid UTF-8 | Encode the document as valid UTF-8. |
|
|
15
|
+
| `UDL1002` | admission | invalid_json | Invalid JSON | Repair the JSON syntax before validation. |
|
|
16
|
+
| `UDL1003` | admission | invalid_shape | Invalid document shape | Match the published UDL JSON Schema. |
|
|
17
|
+
| `UDL1004` | admission | resource_limit | Resource limit exceeded | Reduce the source size, nesting, values, strings, references, or financial paths named by the message. |
|
|
18
|
+
| `UDL2001` | document | invalid_semantics | Duplicate declaration | Give each declaration a unique name. |
|
|
19
|
+
| `UDL2002` | document | invalid_semantics | Document law violation | Repair the declaration, subject contract, or derived effects named by the message. |
|
|
20
|
+
| `UDL2005` | document | invalid_semantics | Derived effects mismatch | Regenerate the action effects from its clauses. |
|
|
21
|
+
| `UDL2010` | document | invalid_semantics | Action graph violation | Order all actions and calls without cycles or collisions, within depth and count limits. |
|
|
22
|
+
| `UDL2011` | document | invalid_semantics | Action binding violation | Bind parameters to declared instance, piece, or caller variables without forward references or duplicate captures. |
|
|
23
|
+
| `UDL2012` | document | invalid_semantics | Action authority violation | Match principal, approval, and recovery policies and keep field paths within tenant boundary. |
|
|
24
|
+
| `UDL2013` | document | invalid_semantics | Action effect or evidence violation | Provide valid effect kind, matching effect signature, and non-empty evidence for every leaf. |
|
|
25
|
+
| `UDL3001` | lifecycle | invalid_semantics | Lifecycle is not closed | Declare every state and action transition, and make every state reachable. |
|
|
26
|
+
| `UDL4001` | finance | invalid_semantics | Money graph violation | Balance every funded amount and close every hold on each lifecycle path. |
|
|
27
|
+
| `UDL4002` | finance | invalid_semantics | Piece partition violation | Match piece plan total, amounts, and payees to required immutable fields and declared partition. |
|
|
28
|
+
| `UDL5001` | gates | invalid_semantics | Reference gate violation | Point the gate at a declared instrument, action, state, field, and reference. |
|
|
29
|
+
| `UDL5002` | gates | invalid_semantics | Check requirement violation | Use a declared check with compatible evidence and recurrence. |
|
|
30
|
+
| `UDL5003` | gates | invalid_semantics | Exposure gate violation | Use declared account and money fields for the exposure gate. |
|
|
31
|
+
| `UDL5004` | gates | invalid_semantics | Aggregate law violation | Point the aggregate at compatible parent and child fields. |
|
|
32
|
+
| `UDL5005` | gates | invalid_semantics | Settlement or payout violation | Use a declared settlement account and a compatible payout statement line. |
|
|
33
|
+
| `UDL5006` | gates | invalid_semantics | Quote and commit violation | Declare one complete quote freeze set and one matching commit action. |
|
|
34
|
+
| `UDL5007` | gates | invalid_semantics | Reconcile exception child violation | Name a declared child whose reference points back to this instrument. |
|
|
35
|
+
| `UDL5008` | gates | invalid_semantics | Action clause violation | Repair the clause fields and keep incompatible clauses separate. |
|
|
36
|
+
| `UDL5009` | gates | invalid_semantics | Reconcile exception amount field is missing or optional | Name the exception child's required money field in amountField. |
|
|
37
|
+
| `UDL5010` | gates | invalid_semantics | Reconcile exception amount field has the wrong type | Point amountField at a money field declared by the exception child. |
|
|
38
|
+
| `UDL5011` | gates | invalid_semantics | Reconcile exception reason field is missing or optional | Name the exception child's required text field in reasonField. |
|
|
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. |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperscale0/udl",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "The Universal Domain Language: format spec, parser, validator, canonical serializer, and evolution diff.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"udl",
|
|
@@ -84,5 +84,5 @@
|
|
|
84
84
|
"Amir Ayub",
|
|
85
85
|
"Sara AlBakaawi"
|
|
86
86
|
],
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "982ff68eee44e481944fe0bc50c6eee6fee17059"
|
|
88
88
|
}
|
package/spec/udl.schema.json
CHANGED
|
@@ -41,6 +41,202 @@
|
|
|
41
41
|
"items": {
|
|
42
42
|
"type": "object",
|
|
43
43
|
"properties": {
|
|
44
|
+
"actionLibrary": {
|
|
45
|
+
"type": "object",
|
|
46
|
+
"propertyNames": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"pattern": "^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$"
|
|
49
|
+
},
|
|
50
|
+
"additionalProperties": {
|
|
51
|
+
"type": "object",
|
|
52
|
+
"properties": {
|
|
53
|
+
"actionOrder": {
|
|
54
|
+
"type": "array",
|
|
55
|
+
"items": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"pattern": "^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"actions": {
|
|
61
|
+
"type": "object",
|
|
62
|
+
"propertyNames": {
|
|
63
|
+
"type": "string",
|
|
64
|
+
"pattern": "^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$"
|
|
65
|
+
},
|
|
66
|
+
"additionalProperties": {
|
|
67
|
+
"type": "object",
|
|
68
|
+
"properties": {
|
|
69
|
+
"approval": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"enum": ["inherit", "independent"]
|
|
72
|
+
},
|
|
73
|
+
"calls": {
|
|
74
|
+
"type": "array",
|
|
75
|
+
"items": {
|
|
76
|
+
"type": "object",
|
|
77
|
+
"properties": {
|
|
78
|
+
"action": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"pattern": "^[a-z][a-z0-9_]*\\.[a-z][a-z0-9_]*$"
|
|
81
|
+
},
|
|
82
|
+
"bind": {
|
|
83
|
+
"type": "object",
|
|
84
|
+
"propertyNames": {
|
|
85
|
+
"type": "string",
|
|
86
|
+
"pattern": "^[a-z][A-Za-z0-9]*$"
|
|
87
|
+
},
|
|
88
|
+
"additionalProperties": {
|
|
89
|
+
"type": "string"
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"id": {
|
|
93
|
+
"type": "string",
|
|
94
|
+
"pattern": "^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"required": ["action", "bind", "id"],
|
|
98
|
+
"additionalProperties": false
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"leaves": {
|
|
102
|
+
"type": "array",
|
|
103
|
+
"items": {
|
|
104
|
+
"type": "object",
|
|
105
|
+
"properties": {
|
|
106
|
+
"bind": {
|
|
107
|
+
"type": "object",
|
|
108
|
+
"propertyNames": {
|
|
109
|
+
"type": "string",
|
|
110
|
+
"pattern": "^[a-z][A-Za-z0-9]*(?:\\.[a-z][A-Za-z0-9]*)*$"
|
|
111
|
+
},
|
|
112
|
+
"additionalProperties": {
|
|
113
|
+
"type": "string"
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"capture": {
|
|
117
|
+
"type": "object",
|
|
118
|
+
"propertyNames": {
|
|
119
|
+
"type": "string"
|
|
120
|
+
},
|
|
121
|
+
"additionalProperties": {
|
|
122
|
+
"type": "string"
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"effects": {
|
|
126
|
+
"minItems": 1,
|
|
127
|
+
"type": "array",
|
|
128
|
+
"items": {
|
|
129
|
+
"type": "object",
|
|
130
|
+
"properties": {
|
|
131
|
+
"kind": {
|
|
132
|
+
"type": "string",
|
|
133
|
+
"enum": [
|
|
134
|
+
"decides",
|
|
135
|
+
"holds",
|
|
136
|
+
"moves",
|
|
137
|
+
"notifies",
|
|
138
|
+
"reads",
|
|
139
|
+
"schedules"
|
|
140
|
+
]
|
|
141
|
+
},
|
|
142
|
+
"signature": {
|
|
143
|
+
"type": "string"
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
"required": ["kind", "signature"],
|
|
147
|
+
"additionalProperties": false
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
"evidence": {
|
|
151
|
+
"type": "string"
|
|
152
|
+
},
|
|
153
|
+
"id": {
|
|
154
|
+
"type": "string",
|
|
155
|
+
"pattern": "^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$"
|
|
156
|
+
},
|
|
157
|
+
"operation": {
|
|
158
|
+
"type": "string",
|
|
159
|
+
"enum": [
|
|
160
|
+
"account.escrow.provision",
|
|
161
|
+
"account.freeze",
|
|
162
|
+
"account.unfreeze",
|
|
163
|
+
"internal_transfer.create",
|
|
164
|
+
"internal_transfer.reserve",
|
|
165
|
+
"internal_transfer.post",
|
|
166
|
+
"internal_transfer.void"
|
|
167
|
+
]
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"required": [
|
|
171
|
+
"bind",
|
|
172
|
+
"effects",
|
|
173
|
+
"evidence",
|
|
174
|
+
"id",
|
|
175
|
+
"operation"
|
|
176
|
+
],
|
|
177
|
+
"additionalProperties": false
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
"order": {
|
|
181
|
+
"type": "array",
|
|
182
|
+
"items": {
|
|
183
|
+
"type": "string",
|
|
184
|
+
"pattern": "^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$"
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
"parameters": {
|
|
188
|
+
"type": "object",
|
|
189
|
+
"propertyNames": {
|
|
190
|
+
"type": "string",
|
|
191
|
+
"pattern": "^[a-z][A-Za-z0-9]*$"
|
|
192
|
+
},
|
|
193
|
+
"additionalProperties": {
|
|
194
|
+
"type": "object",
|
|
195
|
+
"properties": {
|
|
196
|
+
"currency": {
|
|
197
|
+
"type": "string"
|
|
198
|
+
},
|
|
199
|
+
"kind": {
|
|
200
|
+
"type": "string",
|
|
201
|
+
"enum": [
|
|
202
|
+
"account",
|
|
203
|
+
"instance",
|
|
204
|
+
"money",
|
|
205
|
+
"piece",
|
|
206
|
+
"text"
|
|
207
|
+
]
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
"required": ["kind"],
|
|
211
|
+
"additionalProperties": false
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
"principal": {
|
|
215
|
+
"type": "string",
|
|
216
|
+
"enum": ["api_key", "user_session"]
|
|
217
|
+
},
|
|
218
|
+
"recovery": {
|
|
219
|
+
"type": "string",
|
|
220
|
+
"enum": ["local", "external"]
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
"required": [
|
|
224
|
+
"approval",
|
|
225
|
+
"calls",
|
|
226
|
+
"leaves",
|
|
227
|
+
"order",
|
|
228
|
+
"parameters",
|
|
229
|
+
"principal",
|
|
230
|
+
"recovery"
|
|
231
|
+
],
|
|
232
|
+
"additionalProperties": false
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
"required": ["actionOrder", "actions"],
|
|
237
|
+
"additionalProperties": false
|
|
238
|
+
}
|
|
239
|
+
},
|
|
44
240
|
"actionOrder": {
|
|
45
241
|
"minItems": 1,
|
|
46
242
|
"type": "array",
|
|
@@ -647,6 +843,85 @@
|
|
|
647
843
|
"additionalProperties": false
|
|
648
844
|
}
|
|
649
845
|
},
|
|
846
|
+
"piecePlan": {
|
|
847
|
+
"type": "object",
|
|
848
|
+
"properties": {
|
|
849
|
+
"fund_order": {
|
|
850
|
+
"type": "array",
|
|
851
|
+
"items": {
|
|
852
|
+
"type": "string",
|
|
853
|
+
"pattern": "^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$"
|
|
854
|
+
}
|
|
855
|
+
},
|
|
856
|
+
"id": {
|
|
857
|
+
"type": "string",
|
|
858
|
+
"pattern": "^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$"
|
|
859
|
+
},
|
|
860
|
+
"pieces": {
|
|
861
|
+
"minItems": 1,
|
|
862
|
+
"maxItems": 256,
|
|
863
|
+
"type": "array",
|
|
864
|
+
"items": {
|
|
865
|
+
"type": "object",
|
|
866
|
+
"properties": {
|
|
867
|
+
"amount": {
|
|
868
|
+
"type": "string",
|
|
869
|
+
"pattern": "^[a-z][A-Za-z0-9]*$"
|
|
870
|
+
},
|
|
871
|
+
"id": {
|
|
872
|
+
"type": "string",
|
|
873
|
+
"pattern": "^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$"
|
|
874
|
+
},
|
|
875
|
+
"refund_to": {
|
|
876
|
+
"type": "string",
|
|
877
|
+
"pattern": "^[a-z][A-Za-z0-9]*$"
|
|
878
|
+
},
|
|
879
|
+
"release_to": {
|
|
880
|
+
"type": "string",
|
|
881
|
+
"pattern": "^[a-z][A-Za-z0-9]*$"
|
|
882
|
+
}
|
|
883
|
+
},
|
|
884
|
+
"required": ["amount", "id", "refund_to", "release_to"],
|
|
885
|
+
"additionalProperties": false
|
|
886
|
+
}
|
|
887
|
+
},
|
|
888
|
+
"refund_order": {
|
|
889
|
+
"type": "array",
|
|
890
|
+
"items": {
|
|
891
|
+
"type": "string",
|
|
892
|
+
"pattern": "^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$"
|
|
893
|
+
}
|
|
894
|
+
},
|
|
895
|
+
"release_order": {
|
|
896
|
+
"type": "array",
|
|
897
|
+
"items": {
|
|
898
|
+
"type": "string",
|
|
899
|
+
"pattern": "^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$"
|
|
900
|
+
}
|
|
901
|
+
},
|
|
902
|
+
"total": {
|
|
903
|
+
"type": "string",
|
|
904
|
+
"pattern": "^[a-z][A-Za-z0-9]*$"
|
|
905
|
+
},
|
|
906
|
+
"unfund_order": {
|
|
907
|
+
"type": "array",
|
|
908
|
+
"items": {
|
|
909
|
+
"type": "string",
|
|
910
|
+
"pattern": "^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$"
|
|
911
|
+
}
|
|
912
|
+
}
|
|
913
|
+
},
|
|
914
|
+
"required": [
|
|
915
|
+
"fund_order",
|
|
916
|
+
"id",
|
|
917
|
+
"pieces",
|
|
918
|
+
"refund_order",
|
|
919
|
+
"release_order",
|
|
920
|
+
"total",
|
|
921
|
+
"unfund_order"
|
|
922
|
+
],
|
|
923
|
+
"additionalProperties": false
|
|
924
|
+
},
|
|
650
925
|
"required": {
|
|
651
926
|
"type": "array",
|
|
652
927
|
"items": {
|
|
@@ -747,6 +1022,35 @@
|
|
|
747
1022
|
"type": "string",
|
|
748
1023
|
"maxLength": 400
|
|
749
1024
|
},
|
|
1025
|
+
"calls": {
|
|
1026
|
+
"minItems": 1,
|
|
1027
|
+
"type": "array",
|
|
1028
|
+
"items": {
|
|
1029
|
+
"type": "object",
|
|
1030
|
+
"properties": {
|
|
1031
|
+
"action": {
|
|
1032
|
+
"type": "string",
|
|
1033
|
+
"pattern": "^[a-z][a-z0-9_]*\\.[a-z][a-z0-9_]*$"
|
|
1034
|
+
},
|
|
1035
|
+
"bind": {
|
|
1036
|
+
"type": "object",
|
|
1037
|
+
"propertyNames": {
|
|
1038
|
+
"type": "string",
|
|
1039
|
+
"pattern": "^[a-z][A-Za-z0-9]*$"
|
|
1040
|
+
},
|
|
1041
|
+
"additionalProperties": {
|
|
1042
|
+
"type": "string"
|
|
1043
|
+
}
|
|
1044
|
+
},
|
|
1045
|
+
"id": {
|
|
1046
|
+
"type": "string",
|
|
1047
|
+
"pattern": "^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$"
|
|
1048
|
+
}
|
|
1049
|
+
},
|
|
1050
|
+
"required": ["action", "bind", "id"],
|
|
1051
|
+
"additionalProperties": false
|
|
1052
|
+
}
|
|
1053
|
+
},
|
|
750
1054
|
"captureInput": {
|
|
751
1055
|
"type": "object",
|
|
752
1056
|
"propertyNames": {
|
|
@@ -1272,6 +1576,21 @@
|
|
|
1272
1576
|
],
|
|
1273
1577
|
"additionalProperties": false
|
|
1274
1578
|
},
|
|
1579
|
+
"pieceStage": {
|
|
1580
|
+
"type": "object",
|
|
1581
|
+
"properties": {
|
|
1582
|
+
"plan": {
|
|
1583
|
+
"type": "string",
|
|
1584
|
+
"pattern": "^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$"
|
|
1585
|
+
},
|
|
1586
|
+
"stage": {
|
|
1587
|
+
"type": "string",
|
|
1588
|
+
"enum": ["fund", "release", "refund", "unfund"]
|
|
1589
|
+
}
|
|
1590
|
+
},
|
|
1591
|
+
"required": ["plan", "stage"],
|
|
1592
|
+
"additionalProperties": false
|
|
1593
|
+
},
|
|
1275
1594
|
"port": {
|
|
1276
1595
|
"type": "object",
|
|
1277
1596
|
"properties": {
|
|
@@ -2250,6 +2569,7 @@
|
|
|
2250
2569
|
"additionalProperties": false
|
|
2251
2570
|
},
|
|
2252
2571
|
"steps": {
|
|
2572
|
+
"default": [],
|
|
2253
2573
|
"type": "array",
|
|
2254
2574
|
"items": {
|
|
2255
2575
|
"type": "object",
|
|
@@ -2343,7 +2663,7 @@
|
|
|
2343
2663
|
}
|
|
2344
2664
|
}
|
|
2345
2665
|
},
|
|
2346
|
-
"required": ["
|
|
2666
|
+
"required": ["summary"],
|
|
2347
2667
|
"additionalProperties": false
|
|
2348
2668
|
}
|
|
2349
2669
|
}
|
package/src/diagnostics.ts
CHANGED
|
@@ -60,6 +60,30 @@ const diagnosticDefinitions = {
|
|
|
60
60
|
title: "Derived effects mismatch",
|
|
61
61
|
fix: "Regenerate the action effects from its clauses.",
|
|
62
62
|
},
|
|
63
|
+
UDL2010: {
|
|
64
|
+
category: "invalid_semantics",
|
|
65
|
+
family: "document",
|
|
66
|
+
title: "Action graph violation",
|
|
67
|
+
fix: "Order all actions and calls without cycles or collisions, within depth and count limits.",
|
|
68
|
+
},
|
|
69
|
+
UDL2011: {
|
|
70
|
+
category: "invalid_semantics",
|
|
71
|
+
family: "document",
|
|
72
|
+
title: "Action binding violation",
|
|
73
|
+
fix: "Bind parameters to declared instance, piece, or caller variables without forward references or duplicate captures.",
|
|
74
|
+
},
|
|
75
|
+
UDL2012: {
|
|
76
|
+
category: "invalid_semantics",
|
|
77
|
+
family: "document",
|
|
78
|
+
title: "Action authority violation",
|
|
79
|
+
fix: "Match principal, approval, and recovery policies and keep field paths within tenant boundary.",
|
|
80
|
+
},
|
|
81
|
+
UDL2013: {
|
|
82
|
+
category: "invalid_semantics",
|
|
83
|
+
family: "document",
|
|
84
|
+
title: "Action effect or evidence violation",
|
|
85
|
+
fix: "Provide valid effect kind, matching effect signature, and non-empty evidence for every leaf.",
|
|
86
|
+
},
|
|
63
87
|
|
|
64
88
|
UDL3001: {
|
|
65
89
|
category: "invalid_semantics",
|
|
@@ -74,6 +98,12 @@ const diagnosticDefinitions = {
|
|
|
74
98
|
title: "Money graph violation",
|
|
75
99
|
fix: "Balance every funded amount and close every hold on each lifecycle path.",
|
|
76
100
|
},
|
|
101
|
+
UDL4002: {
|
|
102
|
+
category: "invalid_semantics",
|
|
103
|
+
family: "finance",
|
|
104
|
+
title: "Piece partition violation",
|
|
105
|
+
fix: "Match piece plan total, amounts, and payees to required immutable fields and declared partition.",
|
|
106
|
+
},
|
|
77
107
|
|
|
78
108
|
UDL5001: {
|
|
79
109
|
category: "invalid_semantics",
|
|
@@ -147,6 +177,12 @@ const diagnosticDefinitions = {
|
|
|
147
177
|
title: "Reconcile exception reason field has the wrong type",
|
|
148
178
|
fix: "Point reasonField at a required plain text field declared by the exception child.",
|
|
149
179
|
},
|
|
180
|
+
UDL5013: {
|
|
181
|
+
category: "invalid_semantics",
|
|
182
|
+
family: "gates",
|
|
183
|
+
title: "Piece stage violation",
|
|
184
|
+
fix: "Reference a declared piece plan and stage in the containing instrument.",
|
|
185
|
+
},
|
|
150
186
|
|
|
151
187
|
UDL6001: {
|
|
152
188
|
category: "invalid_semantics",
|