@hyperscale0/udl 3.0.2 → 3.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 +8 -0
- package/LICENSE.md +356 -0
- package/NOTICE.md +8 -0
- package/dist/finance.js +2 -1
- package/dist/finance.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/reporting-validation.d.ts +8 -0
- package/dist/reporting-validation.d.ts.map +1 -0
- package/dist/reporting-validation.js +245 -0
- package/dist/reporting-validation.js.map +1 -0
- package/dist/reporting.d.ts +478 -0
- package/dist/reporting.d.ts.map +1 -0
- package/dist/reporting.js +170 -0
- package/dist/reporting.js.map +1 -0
- package/dist/schema.d.ts +1104 -3
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +60 -8
- package/dist/schema.js.map +1 -1
- package/dist/validation.d.ts.map +1 -1
- package/dist/validation.js +89 -12
- package/dist/validation.js.map +1 -1
- package/docs/README.md +26 -0
- package/package.json +5 -6
- package/spec/README.md +26 -0
- package/spec/udl.schema.json +1960 -4
- package/src/finance.ts +1 -1
- package/src/index.ts +6 -0
- package/src/reporting-validation.ts +381 -0
- package/src/reporting.ts +179 -0
- package/src/schema.ts +61 -8
- package/src/validation.ts +100 -10
- package/LICENSE +0 -661
- package/LICENSING.md +0 -50
- package/TRADEMARKS.md +0 -35
package/docs/README.md
CHANGED
|
@@ -150,3 +150,29 @@ Typed fields, calculations, account ownership and linear captures replace them.
|
|
|
150
150
|
`calculate.aggregate` reads a typed selection and yields its count or a money sum. `calculate.ratio` computes floor(amount * numerator / denominator) with arbitrary-precision intermediates and refuses a zero denominator. Numerator and denominator share a numeric type. Selection order is a list of typed ascending paths, followed by identity as the final tie-break. `invoke {instrument, action: "create", input}` creates a child record in the same transaction; its inputs resolve in the caller, and the ordinary create actor and requirements still apply.
|
|
151
151
|
|
|
152
152
|
`calculate.at` reads a typed list at a one-based position and refuses an out-of-range index. Its result has the list item type. Integer divide accepts integer operands and rounds down. Every move may capture its transfer identity into a declared self text field; reserve requires a capture. Captures and their status paths are executor-owned.
|
|
153
|
+
|
|
154
|
+
## Reporting definitions
|
|
155
|
+
|
|
156
|
+
An instrument may declare `reports`, a bounded array of strict ReportDefinition
|
|
157
|
+
values. Each definition contains identity/version, scope, datasets, time,
|
|
158
|
+
selection, calculation, validation, output and authority. The JSON schema defines
|
|
159
|
+
all fields. Expressions form an ordered graph with backward references, typed
|
|
160
|
+
money in integer minor units, explicit ratios and date operations. Source fields
|
|
161
|
+
must exist in every bound instrument. Company instrument reports require
|
|
162
|
+
cross-Build bindings and are not admitted in this version.
|
|
163
|
+
|
|
164
|
+
Joins declare one-or-many cardinality, missing-record policy and aggregates;
|
|
165
|
+
implicit row multiplication is forbidden. Compilation checks currencies, column
|
|
166
|
+
and expression types, output columns and sort keys. Execution must check complete
|
|
167
|
+
source populations, required facts, unique row and sort identities, reconciliation
|
|
168
|
+
and declared limits before publishing any result. Empty-population behavior and
|
|
169
|
+
unavailable facts are definition data. Request, read and release roles are
|
|
170
|
+
separate. Independent activation and retained deterministic replay belong to the
|
|
171
|
+
host; language acceptance alone does not authorize an artifact or external release.
|
|
172
|
+
|
|
173
|
+
Reporting source selections and foreign join keys must be computable from
|
|
174
|
+
PostgreSQL facts; ledger balances and ratios belong after capture. Aggregate
|
|
175
|
+
names are unique across stages. `average` requires an explicit `rounding` policy
|
|
176
|
+
(`floor` or `halfUp`) to retain integer and money minor-unit types. Numeric and
|
|
177
|
+
min/max aggregates skip nulls, return null for all-null inputs, and emit per-row
|
|
178
|
+
`_skippedNulls_<name>` counters in JSON and CSV. Required facts still refuse nulls.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperscale0/udl",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "The Universal Domain Language: format spec, parser, validator, canonical serializer, and evolution diff.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"udl",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"type": "git",
|
|
20
20
|
"url": "git+https://github.com/hyperscale0/hyperscale-udl.git"
|
|
21
21
|
},
|
|
22
|
-
"license": "
|
|
22
|
+
"license": "SEE LICENSE IN LICENSE.md",
|
|
23
23
|
"author": "Hyperscale LLC",
|
|
24
24
|
"type": "module",
|
|
25
25
|
"sideEffects": false,
|
|
@@ -38,13 +38,12 @@
|
|
|
38
38
|
"./package.json": "./package.json"
|
|
39
39
|
},
|
|
40
40
|
"files": [
|
|
41
|
+
"LICENSE.md",
|
|
42
|
+
"NOTICE.md",
|
|
41
43
|
"AUTHORS",
|
|
42
44
|
"CHANGELOG.md",
|
|
43
|
-
"LICENSE",
|
|
44
|
-
"LICENSING.md",
|
|
45
45
|
"README.md",
|
|
46
46
|
"SECURITY.md",
|
|
47
|
-
"TRADEMARKS.md",
|
|
48
47
|
"docs",
|
|
49
48
|
"dist",
|
|
50
49
|
"spec",
|
|
@@ -79,5 +78,5 @@
|
|
|
79
78
|
"Amir Ayub",
|
|
80
79
|
"Sara AlBakaawi"
|
|
81
80
|
],
|
|
82
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "6f9f3c0315ec07edeafca09596d3cf92c53a25fd"
|
|
83
82
|
}
|
package/spec/README.md
CHANGED
|
@@ -150,3 +150,29 @@ Typed fields, calculations, account ownership and linear captures replace them.
|
|
|
150
150
|
`calculate.aggregate` reads a typed selection and yields its count or a money sum. `calculate.ratio` computes floor(amount * numerator / denominator) with arbitrary-precision intermediates and refuses a zero denominator. Numerator and denominator share a numeric type. Selection order is a list of typed ascending paths, followed by identity as the final tie-break. `invoke {instrument, action: "create", input}` creates a child record in the same transaction; its inputs resolve in the caller, and the ordinary create actor and requirements still apply.
|
|
151
151
|
|
|
152
152
|
`calculate.at` reads a typed list at a one-based position and refuses an out-of-range index. Its result has the list item type. Integer divide accepts integer operands and rounds down. Every move may capture its transfer identity into a declared self text field; reserve requires a capture. Captures and their status paths are executor-owned.
|
|
153
|
+
|
|
154
|
+
## Reporting definitions
|
|
155
|
+
|
|
156
|
+
An instrument may declare `reports`, a bounded array of strict ReportDefinition
|
|
157
|
+
values. Each definition contains identity/version, scope, datasets, time,
|
|
158
|
+
selection, calculation, validation, output and authority. The JSON schema defines
|
|
159
|
+
all fields. Expressions form an ordered graph with backward references, typed
|
|
160
|
+
money in integer minor units, explicit ratios and date operations. Source fields
|
|
161
|
+
must exist in every bound instrument. Company instrument reports require
|
|
162
|
+
cross-Build bindings and are not admitted in this version.
|
|
163
|
+
|
|
164
|
+
Joins declare one-or-many cardinality, missing-record policy and aggregates;
|
|
165
|
+
implicit row multiplication is forbidden. Compilation checks currencies, column
|
|
166
|
+
and expression types, output columns and sort keys. Execution must check complete
|
|
167
|
+
source populations, required facts, unique row and sort identities, reconciliation
|
|
168
|
+
and declared limits before publishing any result. Empty-population behavior and
|
|
169
|
+
unavailable facts are definition data. Request, read and release roles are
|
|
170
|
+
separate. Independent activation and retained deterministic replay belong to the
|
|
171
|
+
host; language acceptance alone does not authorize an artifact or external release.
|
|
172
|
+
|
|
173
|
+
Reporting source selections and foreign join keys must be computable from
|
|
174
|
+
PostgreSQL facts; ledger balances and ratios belong after capture. Aggregate
|
|
175
|
+
names are unique across stages. `average` requires an explicit `rounding` policy
|
|
176
|
+
(`floor` or `halfUp`) to retain integer and money minor-unit types. Numeric and
|
|
177
|
+
min/max aggregates skip nulls, return null for all-null inputs, and emit per-row
|
|
178
|
+
`_skippedNulls_<name>` counters in JSON and CSV. Required facts still refuse nulls.
|