@actuarial-ts/core 0.7.0 → 0.7.1

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/README.md CHANGED
@@ -7,7 +7,7 @@ The package is designed to support the actuary's compliance with the ASOPs; it d
7
7
  ## Install
8
8
 
9
9
  ```bash
10
- npm install @actuarial-ts/core@0.7.0
10
+ npm install @actuarial-ts/core@0.7.1
11
11
  ```
12
12
 
13
13
  ESM, TypeScript-first, zero runtime dependencies, Node 20+.
@@ -73,6 +73,39 @@ const prepared = prepareDiagnosticData({ definition: compiled, losses, exposures
73
73
  const result = runMetricDiagnostics({ prepared, groupMap: { fleet: "all-fleet" } });
74
74
  ```
75
75
 
76
+ ### Eager and compact paths
77
+
78
+ The example above uses the retained eager APIs. The additive compact APIs,
79
+ introduced in 0.7.0, expose the same numeric views while retaining complete audit
80
+ and identity evidence behind authenticated owners instead of eagerly expanding
81
+ it. Choose matching preparation, calculation, and maturity functions:
82
+
83
+ | Operation | Eager | Compact |
84
+ |---|---|---|
85
+ | Prepare inputs | `prepareDiagnosticData` | `prepareDiagnosticDataCompact` |
86
+ | Calculate metric views | `runMetricDiagnostics` | `runMetricDiagnosticsCompact` |
87
+ | Select one development age | `sameMaturity` | `sameMaturityCompact` |
88
+ | Select the latest common age across output groups | `commonMaturity` | `commonMaturityCompact` |
89
+
90
+ The original maturity signatures remain unchanged; compact results use the
91
+ separately named helpers, not casts to eager results. Development ages use the
92
+ result's declared age unit. Review evaluations are available through
93
+ `pageDiagnosticReviewEvaluations`, with source references separately available
94
+ through `pageDiagnosticReviewEvaluationSources`. Passing and not-evaluated
95
+ evaluations remain available; paging is not sampling.
96
+
97
+ Use owner-controlled identity documents and `iterateDiagnosticIdentityJson`
98
+ when complete canonical text is needed. `materializePreparedDiagnosticData` and
99
+ `materializeMetricDiagnosticsResult` intentionally expand the eager evidence;
100
+ they are explicit compatibility choices, not a memory-saving export path.
101
+ Cloning or parsing an owner does not recreate its authority. Compact storage is
102
+ not a dataset-capacity or bounded-memory guarantee for an entire application.
103
+
104
+ These are lower-level calculation APIs. For a host import or analysis boundary
105
+ that enforces both review and metric execution policy, use the validated gateway
106
+ in `@actuarial-ts/data`. The runnable [compact adoption guide](https://github.com/yerromnitsuj/actng/blob/v0.7.1/docs/migrations/0.7-compact-diagnostics.md)
107
+ covers the complete workflow and [streamed replay](https://github.com/yerromnitsuj/actng/blob/v0.7.1/docs/reference/diagnostic-replay-stream.md).
108
+
76
109
  The six built-in formulas are basis-independent. The factory creates ten count instances plus six per amount basis (`10 + 6 × basisCount`): one basis produces 16, two produce 22. A `$250K`, primary, gross, net, or ceded calculation is represented by caller-declared amount measures and a structured `AmountBasisDefinition`; it does not need a separate capped formula. Claim-level caps use `claim-layer` derivations before aggregation. Pre-limited external values record their source/transformation instead of implying the SDK recreated an unavailable claim-level operation.
77
110
 
78
111
  All metrics are ratio-of-sums: measures are aggregated at source-group/origin/valuation, groups are mapped and merged, then division happens once. Measure-local `missing: "unknown" | "zero"` is explicit. Exposure timing is either `origin-static` or `valuation-specific`. Calendar and ordered axes derive normalized origins, valuations, development ages, and units; input rows cannot assert a trusted age.
@@ -88,7 +121,7 @@ numeric exposure values. This is a bounded capacity, not an unlimited scale clai
88
121
 
89
122
  Compilation validates the whole graph atomically: IDs, sources, role types, compatibility groups, development semantics, derivation acyclicity, expression limits, rule operands, basis/population references, and period coordinates. Authentic compiled/prepared objects are owner-branded and frozen. Formula, calculation, definition, preparation, and result identities are deterministic FNV-1a/JCS integrity aids—not cryptographic signatures.
90
123
 
91
- See the generated [formula and instance catalog](https://github.com/yerromnitsuj/actng/blob/v0.7.0/docs/reference/diagnostic-formulas.md) and [0.6 migration guide](https://github.com/yerromnitsuj/actng/blob/v0.7.0/docs/migrations/0.6-generalized-diagnostics.md).
124
+ See the generated [formula and instance catalog](https://github.com/yerromnitsuj/actng/blob/v0.7.1/docs/reference/diagnostic-formulas.md) and [0.6 migration guide](https://github.com/yerromnitsuj/actng/blob/v0.7.1/docs/migrations/0.6-generalized-diagnostics.md).
92
125
 
93
126
  ## Main method families
94
127
 
package/dist/version.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  /** This package's runtime version. A test pins it to package.json. */
2
- export declare const CORE_PACKAGE_VERSION = "0.7.0";
2
+ export declare const CORE_PACKAGE_VERSION = "0.7.1";
3
3
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js CHANGED
@@ -1,3 +1,3 @@
1
1
  /** This package's runtime version. A test pins it to package.json. */
2
- export const CORE_PACKAGE_VERSION = "0.7.0";
2
+ export const CORE_PACKAGE_VERSION = "0.7.1";
3
3
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@actuarial-ts/core",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "description": "Pure, zero-dependency P&C actuarial math for TypeScript: reserving, generalized definition-driven diagnostics, trends, limits, discounting, and seeded stochastic methods with published-value validation.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
package/src/version.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  /** This package's runtime version. A test pins it to package.json. */
2
- export const CORE_PACKAGE_VERSION = "0.7.0";
2
+ export const CORE_PACKAGE_VERSION = "0.7.1";