paracosm 0.9.1130 → 0.9.1132

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/README.md CHANGED
@@ -441,7 +441,7 @@ Numbers assume 6 turns, 5 departments, 100 agents, up to 3 events per turn. Forg
441
441
 
442
442
  ## How a turn runs
443
443
 
444
- Director event → Kernel advance (deterministic, seeded) → Department analysis in parallel (with optional runtime tool forging in an in-process `node:vm` context; an LLM judge approves each forge) → Commander decision (HEXACO-weighted) → Outcome classification → Kernel effects → Agent reactions → Memory consolidation → Personality drift.
444
+ Director event → Kernel advance (deterministic, seeded) → Department analysis in parallel (with optional runtime tool forging, each call in a QuickJS WebAssembly instance of its own; an LLM judge approves each forge) → Commander decision (HEXACO-weighted) → Outcome classification → Kernel effects → Agent reactions → Memory consolidation → Personality drift.
445
445
 
446
446
  Every structured LLM call (director, departments, commander, reactions, verdict) is Zod-validated with retry-with-feedback. Schemas under [`src/runtime/validators/`](src/runtime/validators/). Full per-stage breakdown in [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md).
447
447
 
@@ -520,7 +520,7 @@ Paracosm uses [AgentOS](https://agentos.sh/en) for agent orchestration, LLM disp
520
520
  |------------------------------|-----------------------------------------------------------------------|
521
521
  | `agent()` | Commander, department, and Event Director agents |
522
522
  | `generateText()` | LLM calls for event generation and tool evaluation |
523
- | `EmergentCapabilityEngine` | Runtime tool forging in a node:vm context of its own, in process |
523
+ | `EmergentCapabilityEngine` | Runtime tool forging; forged code runs in AgentOS's `QuickJSExecutor` |
524
524
  | `EmergentJudge` | LLM-as-judge safety review of forged tools |
525
525
  | `WebSearchService` | Multi-provider seed enrichment with Firecrawl, Tavily, Serper, Brave |
526
526
  | `AgentMemory` | Per-run citation memory with full-text recall |
@@ -1,7 +1,7 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 1180" role="img" aria-labelledby="paracosm-flow-title paracosm-flow-desc" preserveAspectRatio="xMidYMid meet">
3
3
  <title id="paracosm-flow-title">Paracosm system flow: world source to forked futures</title>
4
- <desc id="paracosm-flow-desc">A vertical flow diagram of the Paracosm pipeline. Prompts, briefs, URLs, PDFs, or JSON drafts feed into the Scenario Compiler, producing a typed ScenarioPackage. A deterministic seeded kernel and the Runtime Orchestrator run a per-turn pipeline of Director, Departments, Commander, and Reactions, with side modules for runtime tool forging in a V8 sandbox, an LLM judge, HEXACO personality drift, and AgentMemory. The result is an agent swarm of personality-typed cells and a Zod-validated RunArtifact that can be replayed byte-for-byte or forked at any past turn.</desc>
4
+ <desc id="paracosm-flow-desc">A vertical flow diagram of the Paracosm pipeline. Prompts, briefs, URLs, PDFs, or JSON drafts feed into the Scenario Compiler, producing a typed ScenarioPackage. A deterministic seeded kernel and the Runtime Orchestrator run a per-turn pipeline of Director, Departments, Commander, and Reactions, with side modules for runtime tool forging in a QuickJS WebAssembly sandbox, an LLM judge, HEXACO personality drift, and AgentMemory. The result is an agent swarm of personality-typed cells and a Zod-validated RunArtifact that can be replayed byte-for-byte or forked at any past turn.</desc>
5
5
 
6
6
  <style><![CDATA[
7
7
  :root {
@@ -342,7 +342,7 @@
342
342
  <rect width="190" height="100" rx="8" class="elevated-fill" stroke="var(--rust)" stroke-width="1.2" stroke-dasharray="4 2"/>
343
343
  <text x="14" y="18" class="rust-fill tiny mono">TOOL FORGE · sandbox</text>
344
344
  <text x="14" y="38" class="t1 small">Department invents a tool</text>
345
- <text x="14" y="56" class="t2 small">node:vm V8 sandbox</text>
345
+ <text x="14" y="56" class="t2 small">QuickJS WebAssembly</text>
346
346
  <text x="14" y="70" class="t2 small">Zod-validated function</text>
347
347
  <text x="14" y="86" class="t3 small">10s timeout · 128MB cap</text>
348
348
  </g>
@@ -224,10 +224,10 @@ export declare const DEFAULT_EXECUTION: SimulationExecutionConfig;
224
224
  * The forged-code time limit a run holds: what the request names when
225
225
  * that is a positive number no greater than the default, and the default
226
226
  * (which is also the most the server allows) for anything else. A call of
227
- * forged code is synchronous, so a longer limit would let one run hold
228
- * the event loop for every other request. The engine applies the same
229
- * bound again where it builds the executor
230
- * (src/runtime/orchestrator/forged-code-executor.ts).
227
+ * forged code that computes holds the event loop until it returns or its
228
+ * deadline, so a longer limit would let one run hold it for every other
229
+ * request. The executor applies the same bound again, and caps a call's
230
+ * memory (src/runtime/orchestrator/forged-code-executor.ts).
231
231
  */
232
232
  export declare function boundedSandboxTimeoutMs(asked: unknown): number;
233
233
  /**
@@ -103,10 +103,10 @@ export const DEFAULT_EXECUTION = {
103
103
  * The forged-code time limit a run holds: what the request names when
104
104
  * that is a positive number no greater than the default, and the default
105
105
  * (which is also the most the server allows) for anything else. A call of
106
- * forged code is synchronous, so a longer limit would let one run hold
107
- * the event loop for every other request. The engine applies the same
108
- * bound again where it builds the executor
109
- * (src/runtime/orchestrator/forged-code-executor.ts).
106
+ * forged code that computes holds the event loop until it returns or its
107
+ * deadline, so a longer limit would let one run hold it for every other
108
+ * request. The executor applies the same bound again, and caps a call's
109
+ * memory (src/runtime/orchestrator/forged-code-executor.ts).
110
110
  */
111
111
  export function boundedSandboxTimeoutMs(asked) {
112
112
  const most = DEFAULT_EXECUTION.sandboxTimeoutMs;