PARACOSM AGENTOS | API Reference v0.9.1035
Home Simulation API Docs GitHub npm
Home Simulation API Docs GitHub npm AgentOS Discord
paracosm - v0.9.1035
    Preparing search index...

    Interface ScenarioPackage

    The top-level contract for a Paracosm scenario. Defines everything the engine needs to run a closed-state, turn-based settlement simulation: world schema, departments, effects, UI metadata, research knowledge, policies, presets, and lifecycle hooks.

    import type { ScenarioPackage } from 'paracosm';
    import { marsScenario } from 'paracosm';

    const myScenario: ScenarioPackage = { ... };
    interface ScenarioPackage {
        departments: DepartmentDefinition[];
        effects: EffectDefinition[];
        engineArchetype: "closed_turn_based_settlement";
        events: EventDefinition[];
        hooks: ScenarioHooks;
        id: string;
        knowledge: KnowledgeBundle;
        labels: ScenarioLabels;
        metrics: MetricDefinition[];
        policies: ScenarioPolicies;
        presets: ScenarioPreset[];
        setup: ScenarioSetupSchema;
        sourceUrl?: string;
        theme: ScenarioTheme;
        ui: ScenarioUiDefinition;
        version: string;
        world: ScenarioWorldSchema;
    }
    Index
    departments: DepartmentDefinition[]
    effects: EffectDefinition[]
    engineArchetype: "closed_turn_based_settlement"

    Engine archetype this scenario targets

    events: EventDefinition[]
    hooks: ScenarioHooks
    id: string

    Unique scenario identifier (e.g., "mars-genesis", "lunar-outpost")

    knowledge: KnowledgeBundle
    labels: ScenarioLabels
    metrics: MetricDefinition[]
    policies: ScenarioPolicies
    presets: ScenarioPreset[]
    setup: ScenarioSetupSchema
    sourceUrl?: string

    Optional permalink to the scenario JSON in the public repo (e.g. https://github.com/framerslab/paracosm/blob/master/scenarios/mars.json). Surfaced in the dashboard so users can read or fork the scenario source from the settings panel without leaving the app.

    theme: ScenarioTheme
    ui: ScenarioUiDefinition
    version: string

    Semantic version of this scenario definition

    world: ScenarioWorldSchema