# `core/worldmodel/normalize.ts`

<p class="generated-note">Generated from the exports of <a href="https://github.com/altasystem-ai/alta/blob/main/core/worldmodel/normalize.ts"><code>core/worldmodel/normalize.ts</code></a> · <code>npm run docs:gen</code></p>

Reads a system map (schema alta.map/1, written by alta-map) into the neutral WorldState. Read only. Nothing is invented: an element with no source is kept with prov "mock" and counted.

**Standards that cite this file**: No standard page cites this file yet.

## Exports

### `roleOf` 
The map names the main agent "main"; the game calls its role "daemon".

```ts
function roleOf(agent: unknown): AgentRole | undefined
```

### `normalize` 
`extra`: entities that come from another real source than the map (the store's catalog, lot S1): each keeps its own
provenance; one with the id of a map entity is left out (the map wins).

```ts
function normalize(map: Json, opts: { demo?: boolean; extra?: Entity[] } = {}): WorldState
```
