@hyperscale0/udl 3.1.0 → 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/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.1.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",
@@ -78,5 +78,5 @@
78
78
  "Amir Ayub",
79
79
  "Sara AlBakaawi"
80
80
  ],
81
- "gitHead": "a65150e9cc5a0d5506817f0feb9d64ff62b1d964"
81
+ "gitHead": "6f9f3c0315ec07edeafca09596d3cf92c53a25fd"
82
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.