# `core/quests/sources/system.ts`

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

System quests generated from the server's probes (lot Q2): a probe that fails (the Gateway does not answer, the system map is missing or old, …) opens one system quest, proven by the same probe (check `probe`, answered by the server, never declarable). Same life cycle as a repair: the probe passes again → done, 20 xp once per incident, shown done for 24 h; a failure again within 24 h is the same incident.

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

## Exports

### `SYSTEM_BRANCH` 
```ts
const SYSTEM_BRANCH = "_system"
```

### `Probe` 
One probe as the server measured it: ok, failing, or not measurable here (null: no quest).

```ts
interface Probe { id: string; ok: boolean | null; giver?: string }
```

### `probeRef` 
```ts
const probeRef = (id: string) => …
```

### `systemUid` 
```ts
const systemUid = (id: string) => …
```

### `systemQuest` 
```ts
function systemQuest(p: Probe, say: Say, since?: string): QuestDef
```

### `systemBranch` 
The system branch: a quest for each failing probe, and for each probe whose incident is open or just solved.

```ts
function systemBranch(probes: Probe[], save: Save, now: number, say: Say): Branch | null
```
