Scan your whole stack
From OX Research Newsroom
Are you using paracosm?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.9.1174
paracosm was last scanned on 27 Nov 2026 at version 0.9.1174. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.9.1174 LATEST | 27 Nov 2026 | No rules fired |
| 0.9.1173 | 26 Nov 2026 | No rules fired |
| 0.9.1171 | 26 Nov 2026 | No rules fired |
| 0.9.1170 | 25 Nov 2026 | Not shown |
| 0.9.1169 | 25 Nov 2026 | Not shown |
Findings for v0.9.1174. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.9.1174; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
Paracosm compiles a JSON scenario draft (or a prompt, or an extracted document) into a runnable multi-agent world, plays it through a deterministic seeded kernel, and lets actors with HEXACO personality profiles decide turn by turn how the world unfolds. The kernel reproduces byte-for-byte. The LLM Event Director reads each actor's HEXACO profile and accumulated state, so events diverge from turn 1. Snapshot any turn, fork with a different actor, seed, or custom event, and the branch streams alongside the trunk: the contrast is visible in the artifact, not promised in copy.
"In all fictions, each time a man meets diverse alternatives, he chooses one and eliminates the others. In the work of Ts'ui Pên, he chooses, simultaneously, all of them."
Jorge Luis Borges, The Garden of Forking Paths, 1941
A world model that can be forked needs three things: a deterministic substrate that can be rewound, an LLM reasoner that can be replayed against the same state, and a contract for what state actually means. Paracosm carries all three. Snapshots are JSON, the kernel round-trips through JSON.stringify, and every fork resumes from the captured state without recomputing the prefix.
import { WorldModel } from 'paracosm';
import worldJson from './my-world.json' with { type: 'json' };
const wm = await WorldModel.fromJson(worldJson);
// Trunk run, snapshots captured at every turn
const trunk = await wm.simulate(visionaryActor, {
maxTurns: 6, seed: 42, captureSnapshots: true,
});
// Fork at turn 3 with a different actor; turns 1 to 3 are reused, not rerun
const branch = await (await wm.forkFromArtifact(trunk, 3)).simulate(
pragmatistActor,
{ maxTurns: 6, seed: 42 },
);
console.log(trunk.metadata.runId); // parent run id
console.log(branch.metadata.forkedFrom); // { parentRunId, atTurn: 3 }
console.log(trunk.fingerprint, branch.fingerprint);
captureSnapshots defaults to false so that ordinary runs stay lean. The dashboard flips it on for every UI run; the Reports tab shows a fork button on each completed turn but the last, posts to /setup with the parent artifact (a fork runs in its parent's scenario, so a run loaded from another scenario's file shows a note to switch to that scenario instead of the buttons), and routes the new run into a Branches tab where forks accumulate as cards with per-metric deltas as they stream. Those buttons fork the session's trunk run: opening a branch card shows the Reports tab without moving them to that branch.
const replay = await wm.replay(storedArtifact);
console.log(replay.matches); // true when each between-turn step reproduces the state the run saved after it
console.log(replay.divergence); // first path that differs, from the artifact's root, when matches=false
With captureSnapshots: true the turn loop saves, beside each turn's end-of-turn snapshot, the state its first between-turn step starts from and the state right after each turn's step, before the turn's decisions move it. Replay restores the kernel from the state each step started from, re-runs the step (ageing, dose, deaths, births, food and morale), and compares the result with the state the run saved after it. It calls no model, so it is fast and free. It does not re-apply a turn's decisions. A run saved before the turn loop kept those snapshots gets a WorldModelReplayError saying replay cannot verify it, never a match or a mismatch (#235). What replay checks, what the seed fixes and what the model decides: FAQ.
"We don't want to conquer the cosmos, we only want to extend the boundaries of Earth to the frontiers of the cosmos. We don't want other worlds; we want mirrors."
Stanislaw Lem, Solaris, 1961
Two simulation runs against an identical compiled scenario, starting from the same kernel state, produce divergent trajectories when the only thing that changes is the actor's personality. The kernel is reproducible. The divergence comes from the LLM stages reading a HEXACO profile and deciding accordingly. Both runs roll the same dice for the same person, so the people who die on one side and not the other are the ones whose world that run changed: a habitat that shields more of the dose, supplies held above what the colony landed with, morale that holds, a department that keeps them off the airlock. On Mars Genesis, which keeps one death die for each person and cause for a life, a person both sides lose dies no earlier on the side that gave them better chances in every year.
Actors do not need to be people. The same authoring contract handles colony commanders, ship captains, AI release directors, governing councils, faction leaders, autonomous coordinators, or any entity whose decisions shape the world after a chain of inputs. Paracosm does not care what an actor represents. It cares how the actor decides.
import { compileScenario, WorldModel } from 'paracosm';
import worldJson from './my-world.json' with { type: 'json' };
const scenario = await compileScenario(worldJson, {
provider: 'anthropic',
model: 'claude-sonnet-4-6',
});
const wm = WorldModel.fromScenario(scenario);
const reyes = {
name: 'Captain Reyes', archetype: 'The Pragmatist', unit: 'Station Alpha',
hexaco: { openness: 0.4, conscientiousness: 0.9, extraversion: 0.3,
agreeableness: 0.6, emotionality: 0.5, honestyHumility: 0.8 },
instructions: 'You lead by protocol. Safety margins first.',
};
const okafor = {
name: 'Captain Okafor', archetype: 'The Innovator', unit: 'Station Beta',
hexaco: { openness: 0.9, conscientiousness: 0.4, extraversion: 0.8,
agreeableness: 0.5, emotionality: 0.3, honestyHumility: 0.6 },
description: 'Test one small change before expanding it.',
};
const [a, b] = await Promise.all(
[reyes, okafor].map((actor) =>
wm.simulate({ actor, maxTurns: 6, seed: 42 }),
),
);
console.log(a.fingerprint, b.fingerprint); // diverges visibly within two turns
The library uses written leader orders as provided. Omit instructions or leave it blank to have Paracosm fill it from the leader's name, archetype, optional description and trait scores. The same inputs produce the same orders without a model call. All ten built-in leader presets include their own written orders.
Each run carries a swarm of ~100 personality-typed agents (cells with departments, roles, mood, family edges, and persistent memory) on RunArtifact.finalSwarm. The dedicated paracosm/swarm subpath ships pure-projection helpers for the common shapes:
import { getSwarm, swarmByDepartment, moodHistogram, departmentHeadcount } from 'paracosm/swarm';
const swarm = getSwarm(a);
if (swarm) {
console.log(`T${swarm.turn} · ${swarm.population} alive · ${Math.round((swarm.morale ?? 0) * 100)}% morale`);
console.log(moodHistogram(swarm)); // { focused: 12, anxious: 5, ... }
console.log(departmentHeadcount(swarm)); // { engineering: 18, agriculture: 22, ... }
console.log(swarmByDepartment(a)); // org chart with full roster per dept
}
Same data is on WorldModel.swarm(artifact) if you already have the WorldModel façade imported, and at GET /api/v1/runs/:runId/swarm for HTTP consumers. The dashboard's living-swarm grid streams the same shape per-turn via SSE.
Six turns is enough to surface the contrast. The fingerprint is a stable hash over the trajectory, decisions, and final metrics, so two runs are easy to diff.
WorldModel.fromPrompt compiles a scenario from seed source material (paste, URL, or extracted PDF text), and wm.quickstart then generates N contextual HEXACO actors and runs them in parallel. Both paths validate against DraftScenarioSchema and route into compileScenario. The canonical ScenarioPackage contract is never bypassed. The compiled scenario declares each score's start and range and the category tables its events use, so a run holds every score the scenario declares.
import { WorldModel } from 'paracosm';
const wm = await WorldModel.fromPrompt({
seedText: 'Q3 board brief: the company must decide between...',
domainHint: 'corporate strategic decision',
});
const { actors, artifacts } = await wm.quickstart({ actorCount: 3 });
artifacts.forEach((a, i) => console.log(actors[i].name, a.fingerprint));
Run is the default dashboard tab. It shows the loaded scenario, two leaders and their HEXACO scores and written orders, the colony's living grid at turn 0, and one Start button. Under it, Other scenarios loads another scenario, and Write your own scenario takes a pasted brief, a URL or a PDF, compiles it through the same path and runs it. A curated library of HEXACO archetypes ships at paracosm.ACTOR_PRESETS for programmatic wm.batch sweeps.
npm install paracosm # also: pnpm add paracosm · bun add paracosm
Paracosm ships as pure ESM. The root export covers most use cases (run, runMany, WorldModel, compileScenario, marsScenario, lunarScenario, ACTOR_PRESETS, all public types). Subpath escape hatches are kept for power users: paracosm/compiler, paracosm/schema, paracosm/swarm, paracosm/digital-twin, paracosm/core. Node 22+, Bun 1.x, and any TypeScript runner with ESM and import-attributes support resolve them out of the box.
The authoring contract is JSON because JSON validates, diffs, caches, and snapshots. A draft can be hand-written, generated from a prompt, or grounded with seedText / seedUrl.
{
"id": "submarine-habitat",
"labels": {
"name": "Deep Ocean Habitat",
"populationNoun": "crew",
"settlementNoun": "habitat",
"timeUnitNoun": "day",
"currency": "credits"
},
"setup": {
"defaultTurns": 8,
"defaultPopulation": 50,
"defaultStartTime": 2040,
"defaultSeed": 42
},
"departments": [
{
"id": "life-support",
"label": "Life Support",
"role": "Chief Life Support Officer",
"instructions": "Analyze O2 levels, CO2 scrubbing capacity, water recycling."
},
{
"id": "engineering",
"label": "Engineering",
"role": "Chief Engineer",
"instructions": "Analyze hull integrity, pressure systems, power generation."
}
],
"metrics": [
{ "id": "population", "format": "number" },
{ "id": "morale", "format": "percent" }
]
}
Every scenario declares its own vocabulary via labels.populationNoun (plural), labels.settlementNoun (singular), and labels.timeUnitNoun. The dashboard, kernel, and progression hooks pick those up everywhere user-facing copy renders. Without overrides, paracosm falls back to colonists / colony / tick. labels.actorNoun names the leader (release director, CEO); the run's prompts say leader without it. A run carries only the metrics and politics its scenario declares in world, plus population and morale, so the kernel's Mars-heritage values (power, food, water, earthDependencyPct) stay out of the state, stream, outcome effects, prompts and saved runs of a scenario that does not declare them.
Time is unit-agnostic. setup.defaultTimePerTurn and setup.defaultStartTime are plain numbers; whether they represent years, quarters, hours, or ticks is decided by timeUnitNoun. The dashboard turn header reads Quarter 5, Day 22, or Year 2043 straight from the label.
Ages, experience and the kernel's yearly rates (births, deaths, partnerships, recovery, promotions) are in years. Between turns the kernel converts the elapsed units to years with setup.yearsPerTimeUnit, or, when the scenario declares none, with the length of the unit timeUnitNoun names: year 1, quarter 1/4, month 1/12, week 1/52, day 1/365, hour 1/8760, and 1 for any other word (tick, turn). A month of Atlas Lab ages its people a twelfth of a year and rolls a twelfth of a year's births and deaths; an eight-year Mars turn runs as eight one-year steps, so it ages its colonists eight years, gives the chances eight one-year turns give and settles the colony's morale once a year. Progression hooks get the step as timeDelta (the scenario's unit) and as yearsDelta, with yearsSinceStart and yearsPerUnit beside them.
import { compileScenario, WorldModel } from 'paracosm';
import worldJson from './my-world.json' with { type: 'json' };
// First compile is roughly $0.10 and caches to disk; reruns are free
const scenario = await compileScenario(worldJson, {
provider: 'anthropic',
model: 'claude-sonnet-4-6',
});
const wm = WorldModel.fromScenario(scenario);
const result = await wm.simulate({
actor,
maxTurns: 6,
seed: 42,
// costPreset: 'economy', // ~5-10× cheaper iteration on OpenAI
onEvent(e) { console.log(actor.name, e.type, e.data.summary); },
});
console.log(result.metadata.scenario.name, '→', result.fingerprint);
console.log('cost $', result.cost?.totalUSD.toFixed(2));
console.log('final ', result.finalState?.metrics);
console.log('forged tools ', result.forgedTools?.length ?? 0);
console.log('citations ', result.citations?.length ?? 0);
Each call to wm.simulate takes one actor. The dashboard fans cohorts out side-by-side and auto-switches to a constellation view past 50; the API has no limit.
git clone https://github.com/framerslab/paracosm
cd paracosm && npm install
(cd src/dashboard && npm install) && npm run dashboard:build
cp .env.example .env # add OPENAI_API_KEY or ANTHROPIC_API_KEY
npm run dashboard # opens http://localhost:3456
The dashboard ships a scenario editor for writing, importing, compiling, and running custom worlds from the browser, plus the live Branches view for forks.
npm install -g paracosm
paracosm run # actors.json + default scenario
paracosm run --name "Reyes" --openness 0.85 --turns 6
paracosm dashboard 6 # auto-launch with 6 turns
paracosm compile scenarios/lunar.json --seed-url <url> --max-searches 5
paracosm init my-app --domain "Submarine crew of 8" --actors 3
The CLI looks for actors.json via --actors, then ./actors.json, then ./config/actors.json, then a bundled example. --name renames the chosen actor, and its written orders take the new name wherever they name the old one. A back-compat paracosm-dashboard alias is shipped for existing scripts and Docker invocations.
The dashboard ships two ways to produce a shareable run link, both landing the viewer on the Visualization tab with no upload step.
From the dashboard UI — four places copy paracosm.agentos.sh/sim?replay=<sessionId>&tab=viz to the clipboard:
All four routes hit the public /sessions/:id/replay SSE endpoint so the viewer streams the stored run directly. Anyone who has the link and can reach the dashboard that made it can watch the run; a link made on a dashboard served at localhost opens only on that computer. Every one of these keys shows the link in a field after the press, with whether it was copied and who can open it; when the browser refuses the clipboard or does not answer within three seconds, the note says so and the link stays in the field to copy by hand.
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.