npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@actuarial-ts/interchange

v0.27.0

Published

Language-neutral actuarial-interchange documents for triangles, selections, results, studies, bundles, crosschecks, and portable diagnostic definitions across TypeScript, Python, and R.

Downloads

1,030

Readme

@actuarial-ts/interchange

Portable, integrity-stamped actuarial documents for TypeScript, chainladder-python and R ChainLadder. This package owns document envelopes, conversion, reference bindings and cross-engine comparison; calculation ownership stays in core.

This README describes the 0.27.0 candidate. Use all five SDK packages from the same versioned package set. ESM, Node 20+.

The source repository is private. Repository users can start with docs/sdk-guide.md and docs/migrations/0.27-sdk-cleanup.md for installation, package boundaries and the archive/recalculate path. Those guides are not included in the npm tarball. Candidate documentation is not a publication claim.

Documents and parsing

Document kinds include triangle, selection, method-result, stochastic-result, study, bundle, crosscheck-report, diagnostic-definition, customization-analysis and analysis-review. They share a generator, caller-supplied timestamp, semantic-body integrity tag and optional governance/extensions. Current writers use interchange wire 1.3.0; SDK package versions and document wire versions have different roles.

Given an authentic compiled diagnostic definition:

import {
  diagnosticDefinitionToDoc,
  docToDiagnosticDefinition,
  parseDocument,
} from "@actuarial-ts/interchange";

const document = diagnosticDefinitionToDoc(compiledDefinition, {
  createdAt: "2026-09-03T00:00:00Z",
});
const generic = parseDocument(document);
const executable = docToDiagnosticDefinition(document);

parseDocument validates the document and its integrity, including embedded documents in studies/bundles. Preserved unknown fields remain data. docToDiagnosticDefinition requires the executable vocabulary, recompiles the complete definition and checks formula, calculation and definition identities. Successful generic parsing alone does not authorize execution.

Connected review documents

For a completed current-SDK review run:

import { REVIEW_PLAN_VERIFICATION_LIMITS } from "@actuarial-ts/core";
import {
  analysisReviewToDoc,
  docToAnalysisReview,
  replayAnalysisReview,
} from "@actuarial-ts/interchange";

const document = analysisReviewToDoc({
  run,
  supportingDocuments: [],
  limits: REVIEW_PLAN_VERIFICATION_LIMITS,
}, { createdAt: "2026-10-30T00:00:00Z" });

const checked = docToAnalysisReview(document);
const verification = checked.verification;
// This operation explicitly re-executes the graph:
const replayed = replayAnalysisReview(document);

Authoring preserves the exact authentic execution object through verification. Executable conversion can reuse that current-process evidence; imported or copied runs must reproduce through current-SDK execution. replayAnalysisReview always re-executes. Complete node outputs, references, supporting documents and attached studies retain their own validation and resource limits.

The current analysis-review body /3 already contains the complete shared actuarial-review-evidence-graph/3. Read its structural content with readAnalysisReviewContent(document) and inspect unique definitions with analysisReviewReferences(document). Decoding creates no calculation or source authority. Complete wrapper bindings and exact collision checks remain mandatory.

Interoperability and assurance

Python and R adapters preserve review documents without claiming to execute their TypeScript review graphs. Their supported independent reserving and diagnostic checks are separate capabilities. Generalized diagnostic conformance covers formula and review-rule evaluation over declared aggregate cells; it does not imply arbitrary raw-data ingestion or selection in those languages.

crosscheck compares method-result documents under explicit convention profiles. Its outcomes are agree, disagree, not-comparable and verified-by-value. Mutual agreement is not proof that assumptions or methods are appropriate.

FNV-1a/JCS integrity tags detect drift and support deterministic linking. They are unkeyed integrity aids, not cryptographic signatures or source authentication. The compliance diagnostic-replay/1 stream is a separate format, not a document accepted by parseDocument; use its dedicated reader and resource policy.

Preserve original producing versions and original bytes when archiving old work. A current calculation is a new linked result, not a restamped old document. Runnable cross-engine examples are examples/chain-ladder-typescript, examples/chain-ladder-python, examples/chain-ladder-r and examples/chain-ladder-crosscheck in the private repository.

License

Apache-2.0. See LICENSE and NOTICE. The source repository is private; the published packages retain their Apache-2.0 license.