---
title: "Pack file: fields"
description: "Every field of a Yumina pack file (YuminaBundle): the seven a file must have, the parts it can carry, the interface, the settings form and asset links."
---

# Pack File: Fields

A pack is one JSON object, saved as `name.bundle.json`. Yumina calls the type `YuminaBundle`.

## Top-Level Structure

```json
{
  "bundleVersion": "3.0.0",
  "name": "Mood Meter",
  "description": "What the pack does, for people browsing the market",
  "tags": ["interface", "relationship"],
  "createdAt": "2026-11-30T00:00:00.000Z",

  "entries": [],
  "variables": [],
  "rules": [],
  "reactions": [],
  "audioTracks": [],
  "worldbooks": [],
  "entryFolders": [],
  "customTags": [],

  "rootComponent": null,
  "settings": []
}
```

## The Seven Fields a File Must Have

A file is read as a pack only when all seven are there, with these types. Empty arrays are fine.

| Field | Type | Notes |
|-------|------|-------|
| `bundleVersion` | string | Write `"3.0.0"` |
| `name` | string | 1 to 100 characters. Also names the interface folder on install |
| `createdAt` | string | Any ISO date, e.g. `"2026-11-30T00:00:00.000Z"` |
| `tags` | string[] | Up to 10 are kept |
| `entries` | array | Can be `[]` |
| `variables` | array | Can be `[]` |
| `rules` | array | Can be `[]`. Write `[]` even when the behaviors are in `reactions` |

::: warning Missing a field
Studio's **⋮ → Import Bundle → From File** reads a file that lacks any of the seven as a whole card, and loads it in place of the card you have open (the card is renamed after the pack and its own entries disappear). Check the seven fields before importing there, or import on **Library → Bundles** first, which only adds a pack to your library.
:::

## Field Reference

| Field | Type | Description |
|-------|------|-------------|
| `description` | string | Shown on the pack's page and in the install dialog. Up to 3,000 characters |
| `entries` | WorldEntry[] | Lore, rules for the AI, character sheets, openings. Same shape as a world's [entries](/world-spec/entries) |
| `variables` | Variable[] | The state the pack keeps. Same shape as a world's [variables](/world-spec/variables) |
| `reactions` | Reaction[] | Behaviors, the current form. See [Rules & Reactions](/world-spec/rules) |
| `rules` | Rule[] | Behaviors, the older form. Use `reactions` for a new pack |
| `audioTracks` | AudioTrack[] | Music and sounds. Same shape as a world's [audio](/world-spec/audio). Each track gets a new id on install, and references to the old id are not rewritten |
| `worldbooks` | Worldbook[] | Situations the pack's entries belong to. Optional |
| `entryFolders` | EntryFolder[] | Folders the pack's entries sit in. Optional |
| `customTags` | string[] | Entry tags the pack uses. Optional |
| `rootComponent` | RootComponent | The pack's interface code. Optional; leave it out for a pack with no screen |
| `settings` | BundleSettingField[] | A form the installer fills in (a name, a voice, a picture). Optional |
| `version` | number | Set by Yumina when a version is published. Leave it out; a file's value is ignored |

Put each behavior in `reactions` or in `rules`, never both: a behavior in both arrays fires twice.

## Ids Inside a Pack

Inside the file, parts point at each other by id, the same way they do in a world: a behavior's condition names a variable id, a `toggle-entry` names an entry id, an entry's `folderId` names a folder. Pick any unique strings. Yumina rewrites them on install (see [Installing into a card](/pack-spec/installing)), so they never clash with the card's own.

Variable ids are the exception: they are kept as written unless the card already has a variable with the same name. Use `snake_case` ids, so entries can read them as <code v-pre>{{mood}}</code> macros.

## The Interface (`rootComponent`)

```json
"rootComponent": {
  "id": "mood-meter-ui",
  "name": "Mood Meter",
  "entryFile": "index.tsx",
  "files": {
    "index.tsx": "export default function MoodMeter() { ... }",
    "bar.tsx": "export default function Bar({ value }) { ... }"
  },
  "updatedAt": "2026-11-30T00:00:00.000Z"
}
```

The files are React/TSX and run in the same sandbox as a card's own interface, with the same `useYumina()` API. See [Custom UI](/world-spec/custom-ui). The entry file's default export is what gets drawn. Files can import each other with relative paths (`./bar`); they are copied into one folder together.

A pack's interface is drawn in one of three ways:

| Form | How to write it | What the player sees |
|------|-----------------|---------------------|
| **Overlay** (default) | Default export only | Drawn on top of the card's own screen. Use `position: "fixed"`, keep it small, and leave the chat usable |
| **App** | Also `export const app = { id, icon, name, variable, accent }` | A button in the shared App dock on the right. The default export is drawn in the App panel and gets a `close` prop |
| **Whole screen** | Draw the full screen yourself, e.g. with `<Chat />` | Used when the installer picks **Replace the current screen** |

`app` fields: `id` (unique, one dock button per id), `icon` (an emoji), `name`, `variable` (the variable id the App shows; the dock marks the button when it changes), `accent` and optional `accent2` (colors), optional `badge(value)` returning a number to show on the button.

Read state as `api.variables.<id>` or `api.variables["<id>"]`. When the installer keeps the pack's variable under another id, Yumina rewrites both forms in the pack's files, along with any string literal that is exactly the old id. Choose variable ids that do not also appear in the code as plain text.

## Settings Form (`settings`)

A list of fields the installer fills in right after installing, or later from the pack's frame on the canvas. Each value is written into a variable's `defaultValue`. Studio's pack maker has no editor for this form: write it in the file.

```json
"settings": [
  { "id": "char-name", "label": "Character name", "type": "text", "variableId": "companion", "path": "name" },
  { "id": "char-voice", "label": "Voice", "type": "voice", "variableId": "companion", "path": "voice.id" }
]
```

| Field | Description |
|-------|-------------|
| `id`, `label`, `hint` | The field's id, its label and a short hint |
| `type` | `text`, `textarea`, `number`, `toggle`, `select`, `asset`, `voice`, `liveCharacter` |
| `variableId` | The variable that receives the value |
| `path` | Dot path inside a `json` variable, e.g. `voice.id`. Leave it out to replace the whole value |
| `options` | For `select`: `[{ "value": "...", "label": "..." }]` |
| `accept`, `extensionRules` | For `asset`: which files the picker accepts, and extra values to write per file extension |
| `also` | Other `{ path, value }` pairs written with a `voice` or `liveCharacter` pick |

## Pictures and Sounds

Point at a file as `@asset:<id>`, where the id is a file in your own **Library → Assets**. The easiest way to get these links right is to place the pictures in a card first (Studio writes the `@asset:` links for you) and make the pack from that card. When someone installs your pack from the market or their library, Yumina copies every file the pack points at into their own assets and rewrites the links, so your later edits or deletions never break their card. A file from someone else's library cannot be used this way.

## What a Pack Cannot Carry

A pack has no card settings (model, temperature, context size), cover, scene images, reply processing rules, 3D scenes or Player interface builder layout. To share a whole card, export or publish the card instead.
