SDK code usage docs

See real usage in your language without fighting the page.

These public docs focus on practical code usage: install, graph generation, discrete reasoning, layout, continuous causal workflows, and package manifests. Full licensed API reference is provided with purchased SDK packages.

Install and import

Start with the package and import path that match your stack.

These public pages are code usage documentation for evaluation and adoption. Licensed SDK packages include the deeper API reference after purchase.

Inputs

Choose the package source, import path, and modules that match your app, service, or notebook environment.

Outputs

You get the concrete constructors and helper functions used by the later samples, so installation is tied directly to usage.

Package / module

@rocketvector/darkstar

TypeScript/JavaScript

Install the package from your private registry, then initialize the engine with your commercial license before using any reasoning logic.

Discrete BBN graph generation

Generate singly connected and multi-connected graphs.

Use the generator helpers when you want deterministic seed-driven graph creation for demos, tests, and benchmarking before you hand-tune a production model.

Inputs

Pass graph-size controls such as node count, edge density, state count, and a seed so the generated shape is reproducible.

Outputs

The generator returns a graph plus starter parameters that can flow directly into model construction and benchmark fixtures.

Package / module

@rocketvector/darkstar

TypeScript/JavaScript

Discrete BBN

Build a small discrete model from a graph and CPTs.

Every language now starts from explicit graph structure and CPT definitions so the first model is created in code instead of being waved in from a file.

Inputs

Provide a directed graph and one CPT per node, including root distributions and any parent-conditioned rows.

Outputs

The constructor returns a reasoning model that can answer exact associational, interventional, and counterfactual queries.

Package / module

darkstar.discrete

TypeScript/JavaScript

Discrete BBN evidence

Run probability queries with hard, soft-finding, and virtual evidence.

Darkstar uses pquery as the short alias for a probability query: it returns posterior distributions after conditioning on evidence. Start with an observed state, then move to weighted finding and virtual evidence when you want softer beliefs.

Inputs

Choose the queried nodes, then provide either a hard observed value, a weighted finding over the node states, or a virtual evidence vector over the same states.

Outputs

Each pquery call returns the posterior distribution for the requested nodes, making it easy to compare how different evidence styles shift the result.

Package / module

darkstar.discrete

TypeScript/JavaScript

Use the discrete model built above; observation evidence is hard evidence, while finding and virtual helpers create weighted evidence maps for pquery.

Discrete BBN

Run associational, interventional, and counterfactual queries.

The discrete quickstart now covers marginals, joints, conditionals, evidence probabilities, interventions, and counterfactual mirrors instead of stopping at a single posterior call.

Inputs

Choose the nodes or target you want, then add factual evidence, optional given variables, and hypothetical interventions when you move into counterfactual analysis.

Outputs

Associational calls return potentials or scalar evidence probabilities, iquery returns causal effects, and the counterfactual helpers mirror the same marginal, joint, conditional, and evidence forms.

Package / module

darkstar.discrete

TypeScript/JavaScript

Graph layout

Lay out the graph for explorer, editor, and dashboard UIs.

Layout helpers give you deterministic node coordinates for customer-facing graph views without forcing you into one front-end framework.

Inputs

Pass the graph you already built plus a named layout algorithm supported by the wrapper or runtime.

Outputs

You get stable node coordinates that can be fed into canvases, SVGs, editors, and dashboard components.

Package / module

@rocketvector/darkstar

TypeScript/JavaScript

Use the graph you built above and feed the returned coordinates into your own canvas, SVG, or framework UI.

Continuous Gaussian SCM

Build a linear-Gaussian SCM in code.

The continuous examples mirror the discrete ones: define the graph, provide ordered parameters, and construct the model in code.

Inputs

Define the graph, the ordered variable list, and the Gaussian parameters such as means and covariance terms expected by the wrapper.

Outputs

You get a continuous reasoning model ready for posterior, intervention, and counterfactual workflows.

Package / module

darkstar.continuous

TypeScript/JavaScript

Continuous Gaussian SCM

Run posterior, interventional, and counterfactual SCM queries.

For continuous SCMs, pquery is the probability-query alias for conditioning on observed numeric values. Use iquery for interventions and cquery for abduction-action-prediction workflows.

Inputs

Use observed numeric values for conditioning, then provide interventions or counterfactual scenarios when you want to compare worlds.

Outputs

The calls return posterior moments, interventional summaries, and counterfactual estimates that you can chart or feed into downstream analysis.

Package / module

darkstar.continuous

TypeScript/JavaScript

Download manifest

Review the exact SDK package contents before you install.

Every SDK archive includes a manifest at the zip root, and the account page provides the same manifest as a separate download for that archive.

Inputs

Choose a language, platform, and SDK version from your account page, then download the archive and its matching manifest.

Outputs

The manifest identifies the release, platform, package descriptor snapshots, included docs, native runtime files, and per-file SHA-256 hashes.

Package / module

TypeScript/JavaScript download manifest

TypeScript/JavaScript

The account page also provides the same manifest as a separate download so you can review file names, sizes, and hashes before installing the archive.