@actuarial-ts/interchange 0.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/LICENSE +202 -0
- package/NOTICE +5 -0
- package/README.md +52 -0
- package/dist/convert/result.d.ts +45 -0
- package/dist/convert/result.d.ts.map +1 -0
- package/dist/convert/result.js +122 -0
- package/dist/convert/result.js.map +1 -0
- package/dist/convert/selection.d.ts +114 -0
- package/dist/convert/selection.d.ts.map +1 -0
- package/dist/convert/selection.js +383 -0
- package/dist/convert/selection.js.map +1 -0
- package/dist/convert/triangle.d.ts +49 -0
- package/dist/convert/triangle.d.ts.map +1 -0
- package/dist/convert/triangle.js +111 -0
- package/dist/convert/triangle.js.map +1 -0
- package/dist/envelope.d.ts +113 -0
- package/dist/envelope.d.ts.map +1 -0
- package/dist/envelope.js +139 -0
- package/dist/envelope.js.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -0
- package/dist/parse.d.ts +38 -0
- package/dist/parse.d.ts.map +1 -0
- package/dist/parse.js +48 -0
- package/dist/parse.js.map +1 -0
- package/dist/referee/crosscheck.d.ts +38 -0
- package/dist/referee/crosscheck.d.ts.map +1 -0
- package/dist/referee/crosscheck.js +212 -0
- package/dist/referee/crosscheck.js.map +1 -0
- package/dist/referee/profiles.d.ts +36 -0
- package/dist/referee/profiles.d.ts.map +1 -0
- package/dist/referee/profiles.js +80 -0
- package/dist/referee/profiles.js.map +1 -0
- package/dist/schemas/bundle.d.ts +45 -0
- package/dist/schemas/bundle.d.ts.map +1 -0
- package/dist/schemas/bundle.js +20 -0
- package/dist/schemas/bundle.js.map +1 -0
- package/dist/schemas/crosscheck.d.ts +3567 -0
- package/dist/schemas/crosscheck.d.ts.map +1 -0
- package/dist/schemas/crosscheck.js +72 -0
- package/dist/schemas/crosscheck.js.map +1 -0
- package/dist/schemas/manifest.d.ts +43 -0
- package/dist/schemas/manifest.d.ts.map +1 -0
- package/dist/schemas/manifest.js +39 -0
- package/dist/schemas/manifest.js.map +1 -0
- package/dist/schemas/result.d.ts +2163 -0
- package/dist/schemas/result.d.ts.map +1 -0
- package/dist/schemas/result.js +95 -0
- package/dist/schemas/result.js.map +1 -0
- package/dist/schemas/selection.d.ts +10388 -0
- package/dist/schemas/selection.d.ts.map +1 -0
- package/dist/schemas/selection.js +138 -0
- package/dist/schemas/selection.js.map +1 -0
- package/dist/schemas/study.d.ts +62 -0
- package/dist/schemas/study.d.ts.map +1 -0
- package/dist/schemas/study.js +35 -0
- package/dist/schemas/study.js.map +1 -0
- package/dist/schemas/triangle.d.ts +1260 -0
- package/dist/schemas/triangle.d.ts.map +1 -0
- package/dist/schemas/triangle.js +120 -0
- package/dist/schemas/triangle.js.map +1 -0
- package/package.json +66 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"crosscheck.d.ts","sourceRoot":"","sources":["../../src/schemas/crosscheck.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;;;;;;;;;;;;;GAeG;AAEH,eAAO,MAAM,mBAAmB,uEAKtB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAErE,qFAAqF;AACrF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;gCAMhB,CAAC;AAEjB,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;gCAElB,CAAC;AASjB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAG7B,kEAAkE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;QAAlE,kEAAkE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAAlE,kEAAkE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCA4BtD,CAAC;AAEjB,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { envelopeShape } from "../envelope.js";
|
|
3
|
+
import { engineStampSchema, resultAppliesToSchema } from "./result.js";
|
|
4
|
+
/**
|
|
5
|
+
* CrosscheckReportDoc (spec 3.2 / 5) — the referee's output: engines
|
|
6
|
+
* compared (with versions and profiles), the appliesTo tags matched,
|
|
7
|
+
* requested and effective parameter sets, per-origin and total relative
|
|
8
|
+
* deviations, the tolerance applied, and the verdict.
|
|
9
|
+
*
|
|
10
|
+
* Verdicts:
|
|
11
|
+
* - `agree` / `disagree`: independent recomputations inside/outside the
|
|
12
|
+
* tolerance.
|
|
13
|
+
* - `not-comparable`: the inputs do not describe the same computation
|
|
14
|
+
* (mismatched appliesTo tags, differing convention profiles, differing
|
|
15
|
+
* origin sets, or a failed injection on either shore).
|
|
16
|
+
* - `verified-by-value`: the results match but the selection was
|
|
17
|
+
* value-only, so no independent recomputation occurred — disclosure
|
|
18
|
+
* renders it distinctly so nothing overstates what was checked.
|
|
19
|
+
*/
|
|
20
|
+
export const CROSSCHECK_VERDICTS = [
|
|
21
|
+
"agree",
|
|
22
|
+
"disagree",
|
|
23
|
+
"not-comparable",
|
|
24
|
+
"verified-by-value",
|
|
25
|
+
];
|
|
26
|
+
/** Relative deviations per metric; null = not compared (metric absent on a side). */
|
|
27
|
+
export const deviationCellSchema = z
|
|
28
|
+
.object({
|
|
29
|
+
ultimate: z.number().nullable(),
|
|
30
|
+
unpaid: z.number().nullable(),
|
|
31
|
+
standardError: z.number().nullable(),
|
|
32
|
+
})
|
|
33
|
+
.passthrough();
|
|
34
|
+
export const originDeviationSchema = deviationCellSchema
|
|
35
|
+
.extend({ origin: z.string().min(1) })
|
|
36
|
+
.passthrough();
|
|
37
|
+
const parameterSetSchema = z
|
|
38
|
+
.object({
|
|
39
|
+
requested: z.record(z.unknown()),
|
|
40
|
+
effective: z.record(z.unknown()).nullable(),
|
|
41
|
+
})
|
|
42
|
+
.passthrough();
|
|
43
|
+
export const crosscheckBodySchema = z
|
|
44
|
+
.object({
|
|
45
|
+
engines: z.object({ a: engineStampSchema, b: engineStampSchema }).passthrough(),
|
|
46
|
+
/** The matched tags; null when the inputs' tags did not match. */
|
|
47
|
+
appliesTo: resultAppliesToSchema.nullable(),
|
|
48
|
+
parameters: z.object({ a: parameterSetSchema, b: parameterSetSchema }).passthrough(),
|
|
49
|
+
tolerance: z
|
|
50
|
+
.object({
|
|
51
|
+
central: z.number().positive(),
|
|
52
|
+
standardError: z.number().positive().nullable(),
|
|
53
|
+
})
|
|
54
|
+
.passthrough(),
|
|
55
|
+
deviations: z
|
|
56
|
+
.object({
|
|
57
|
+
perOrigin: z.array(originDeviationSchema),
|
|
58
|
+
totals: deviationCellSchema,
|
|
59
|
+
})
|
|
60
|
+
.passthrough(),
|
|
61
|
+
verdict: z.enum(CROSSCHECK_VERDICTS),
|
|
62
|
+
warnings: z.array(z.string()),
|
|
63
|
+
})
|
|
64
|
+
.passthrough();
|
|
65
|
+
export const crosscheckReportDocSchema = z
|
|
66
|
+
.object({
|
|
67
|
+
...envelopeShape("crosscheck-report"),
|
|
68
|
+
/** Semantic body key per spec rev 2.1: `report` (the head-noun rule). */
|
|
69
|
+
report: crosscheckBodySchema,
|
|
70
|
+
})
|
|
71
|
+
.passthrough();
|
|
72
|
+
//# sourceMappingURL=crosscheck.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"crosscheck.js","sourceRoot":"","sources":["../../src/schemas/crosscheck.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEvE;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,OAAO;IACP,UAAU;IACV,gBAAgB;IAChB,mBAAmB;CACX,CAAC;AAIX,qFAAqF;AACrF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC;KACjC,MAAM,CAAC;IACN,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACrC,CAAC;KACD,WAAW,EAAE,CAAC;AAEjB,MAAM,CAAC,MAAM,qBAAqB,GAAG,mBAAmB;KACrD,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;KACrC,WAAW,EAAE,CAAC;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AAa,CAAC,mBAAmB,CAAC;IACrC,yEAAyE;IACzE,MAAM,EAAE,oBAAoB;CAC7B,CAAC;KACD,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { z } from "zod";
|
|
2
|
+
import type { DocumentKind } from "../envelope.js";
|
|
3
|
+
/**
|
|
4
|
+
* Schema publication manifest (spec 3.4). The zod schemas here are the
|
|
5
|
+
* single source of truth; they are mechanically emitted to JSON Schema
|
|
6
|
+
* under `schema/interchange/1.0/` (committed, URL-referenced by the
|
|
7
|
+
* Python/R validators). A vitest regenerates and diffs — drift fails the
|
|
8
|
+
* build; `scripts/emit-schema.ts` rewrites the committed files.
|
|
9
|
+
*
|
|
10
|
+
* `emitJsonSchema` takes the zod→JSON-Schema converter as an argument so
|
|
11
|
+
* `zod-to-json-schema` stays a devDependency (emission is build-time
|
|
12
|
+
* only; the published package depends on core + zod, nothing else).
|
|
13
|
+
*
|
|
14
|
+
* The emitted schemas are the STRUCTURAL contract. TS-side refinements
|
|
15
|
+
* (rationale-required-for-judgmental, medial-trim scoping, grid shape)
|
|
16
|
+
* are enforced by the zod schemas and restated in the spec; non-TS
|
|
17
|
+
* validators implement them as semantic checks beside the JSON Schema.
|
|
18
|
+
*/
|
|
19
|
+
export interface SchemaManifestEntry {
|
|
20
|
+
kind: DocumentKind;
|
|
21
|
+
fileName: string;
|
|
22
|
+
schema: z.ZodTypeAny;
|
|
23
|
+
}
|
|
24
|
+
export declare const INTERCHANGE_SCHEMA_MANIFEST: readonly SchemaManifestEntry[];
|
|
25
|
+
/** Options both the emit script and the drift test must pass to the converter. */
|
|
26
|
+
export declare function emitOptionsFor(kind: DocumentKind): {
|
|
27
|
+
name: string;
|
|
28
|
+
[key: string]: unknown;
|
|
29
|
+
};
|
|
30
|
+
export interface EmittedSchema {
|
|
31
|
+
kind: DocumentKind;
|
|
32
|
+
fileName: string;
|
|
33
|
+
/** The serialized file content, byte-exact (2-space indent + trailing newline). */
|
|
34
|
+
content: string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Emits every document kind's JSON Schema through the supplied converter
|
|
38
|
+
* (pass `zod-to-json-schema`'s default export). Build-time only.
|
|
39
|
+
*/
|
|
40
|
+
export declare function emitJsonSchema(convert: (schema: z.ZodTypeAny, options: {
|
|
41
|
+
name: string;
|
|
42
|
+
}) => unknown): EmittedSchema[];
|
|
43
|
+
//# sourceMappingURL=manifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/schemas/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAQnD;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,YAAY,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,CAAC,CAAC,UAAU,CAAC;CACtB;AAED,eAAO,MAAM,2BAA2B,EAAE,SAAS,mBAAmB,EAgBrE,CAAC;AAEF,kFAAkF;AAClF,wBAAgB,cAAc,CAAC,IAAI,EAAE,YAAY,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,CAE3F;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,YAAY,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,mFAAmF;IACnF,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,UAAU,EAAE,OAAO,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,KAAK,OAAO,GACpE,aAAa,EAAE,CAMjB"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { triangleDocSchema } from "./triangle.js";
|
|
2
|
+
import { selectionDocSchema } from "./selection.js";
|
|
3
|
+
import { methodResultDocSchema, stochasticResultDocSchema } from "./result.js";
|
|
4
|
+
import { studyDocSchema } from "./study.js";
|
|
5
|
+
import { bundleDocSchema } from "./bundle.js";
|
|
6
|
+
import { crosscheckReportDocSchema } from "./crosscheck.js";
|
|
7
|
+
export const INTERCHANGE_SCHEMA_MANIFEST = [
|
|
8
|
+
{ kind: "triangle", fileName: "triangle.schema.json", schema: triangleDocSchema },
|
|
9
|
+
{ kind: "selection", fileName: "selection.schema.json", schema: selectionDocSchema },
|
|
10
|
+
{ kind: "method-result", fileName: "method-result.schema.json", schema: methodResultDocSchema },
|
|
11
|
+
{
|
|
12
|
+
kind: "stochastic-result",
|
|
13
|
+
fileName: "stochastic-result.schema.json",
|
|
14
|
+
schema: stochasticResultDocSchema,
|
|
15
|
+
},
|
|
16
|
+
{ kind: "study", fileName: "study.schema.json", schema: studyDocSchema },
|
|
17
|
+
{ kind: "bundle", fileName: "bundle.schema.json", schema: bundleDocSchema },
|
|
18
|
+
{
|
|
19
|
+
kind: "crosscheck-report",
|
|
20
|
+
fileName: "crosscheck-report.schema.json",
|
|
21
|
+
schema: crosscheckReportDocSchema,
|
|
22
|
+
},
|
|
23
|
+
];
|
|
24
|
+
/** Options both the emit script and the drift test must pass to the converter. */
|
|
25
|
+
export function emitOptionsFor(kind) {
|
|
26
|
+
return { name: kind, target: "jsonSchema7", $refStrategy: "none" };
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Emits every document kind's JSON Schema through the supplied converter
|
|
30
|
+
* (pass `zod-to-json-schema`'s default export). Build-time only.
|
|
31
|
+
*/
|
|
32
|
+
export function emitJsonSchema(convert) {
|
|
33
|
+
return INTERCHANGE_SCHEMA_MANIFEST.map(({ kind, fileName, schema }) => ({
|
|
34
|
+
kind,
|
|
35
|
+
fileName,
|
|
36
|
+
content: `${JSON.stringify(convert(schema, emitOptionsFor(kind)), null, 2)}\n`,
|
|
37
|
+
}));
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=manifest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../src/schemas/manifest.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAC/E,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAyB5D,MAAM,CAAC,MAAM,2BAA2B,GAAmC;IACzE,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,sBAAsB,EAAE,MAAM,EAAE,iBAAiB,EAAE;IACjF,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,uBAAuB,EAAE,MAAM,EAAE,kBAAkB,EAAE;IACpF,EAAE,IAAI,EAAE,eAAe,EAAE,QAAQ,EAAE,2BAA2B,EAAE,MAAM,EAAE,qBAAqB,EAAE;IAC/F;QACE,IAAI,EAAE,mBAAmB;QACzB,QAAQ,EAAE,+BAA+B;QACzC,MAAM,EAAE,yBAAyB;KAClC;IACD,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,EAAE,cAAc,EAAE;IACxE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,EAAE,eAAe,EAAE;IAC3E;QACE,IAAI,EAAE,mBAAmB;QACzB,QAAQ,EAAE,+BAA+B;QACzC,MAAM,EAAE,yBAAyB;KAClC;CACF,CAAC;AAEF,kFAAkF;AAClF,MAAM,UAAU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