paracosm 0.8.669 → 0.8.673

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.
Files changed (2) hide show
  1. package/README.md +19 -1
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -117,6 +117,24 @@ const [a, b] = await Promise.all(
117
117
  console.log(a.fingerprint, b.fingerprint); // diverges visibly within two turns
118
118
  ```
119
119
 
120
+ ### Inspecting the agent swarm
121
+
122
+ 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:
123
+
124
+ ```typescript
125
+ import { getSwarm, swarmByDepartment, moodHistogram, departmentHeadcount } from 'paracosm/swarm';
126
+
127
+ const swarm = getSwarm(a);
128
+ if (swarm) {
129
+ console.log(`T${swarm.turn} · ${swarm.population} alive · ${Math.round((swarm.morale ?? 0) * 100)}% morale`);
130
+ console.log(moodHistogram(swarm)); // { focused: 12, anxious: 5, ... }
131
+ console.log(departmentHeadcount(swarm)); // { engineering: 18, agriculture: 22, ... }
132
+ console.log(swarmByDepartment(a)); // org chart with full roster per dept
133
+ }
134
+ ```
135
+
136
+ 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.
137
+
120
138
  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.
121
139
 
122
140
  ---
@@ -319,7 +337,7 @@ Actors are not always human. Paracosm ships a `TraitModel` registry with two bui
319
337
  | `ai-agent` | exploration, verification-rigor, deference, risk-tolerance, transparency, instruction-following | Frontier-lab release directors, autonomous coordinators, eval subs |
320
338
 
321
339
  ```typescript
322
- import { runSimulation } from 'paracosm';
340
+ import { runSimulation } from 'paracosm/runtime';
323
341
 
324
342
  const releaseDirector = {
325
343
  name: 'Atlas-Bot Release Director',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "paracosm",
3
- "version": "0.8.669",
3
+ "version": "0.8.673",
4
4
  "description": "Agent swarm simulation for structured world modeling with LLMs. Multi-agent worlds with HEXACO personalities, deterministic kernels, runtime tool forging, and reproducible forkable RunArtifacts. Built on AgentOS.",
5
5
  "type": "module",
6
6
  "main": "dist/engine/index.js",