@dreamboard-games/cli 0.1.30-alpha.1 → 0.1.30-alpha.2
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 +179 -22
- package/dist/{chunk-C6UAT6EH.js → chunk-N7XPNNUI.js} +9 -12
- package/dist/chunk-N7XPNNUI.js.map +1 -0
- package/dist/chunk-SEGVTWSK.js +44 -0
- package/dist/{chunk-RS7UXJZV.js → chunk-TAQKH67O.js} +21300 -35881
- package/dist/chunk-TAQKH67O.js.map +1 -0
- package/dist/{global-config-AGFBDFYD.js → global-config-S4ZIPECE.js} +3 -3
- package/dist/index.js +415 -37
- package/dist/index.js.map +1 -1
- package/dist/internal.js +3 -4
- package/dist/{agent-verifier/keychain-backend-TNOPQV3Z.mjs → keychain-backend-HDF4TZDL.js} +2 -1
- package/dist/{agent-verifier/prompt-3BAINGAQ.mjs → prompt-NDV3AE5L.js} +2 -1
- package/package.json +6 -6
- package/skills/dreamboard/references/building-your-first-game.md +510 -0
- package/skills/dreamboard/references/cli.md +104 -0
- package/skills/dreamboard/references/game-interface.md +548 -0
- package/skills/dreamboard/references/manifest-authoring.md +597 -0
- package/skills/dreamboard/references/quickstart.md +66 -0
- package/skills/dreamboard/references/reducer.md +864 -0
- package/skills/dreamboard/references/rule-authoring.md +147 -0
- package/skills/dreamboard/references/testing.md +249 -0
- package/skills/dreamboard/scripts/events-extract.mjs +218 -0
- package/dist/agent-verifier/agent-workspace-verifier.mjs +0 -227
- package/dist/agent-verifier/chunk-2E5P5NWG.mjs +0 -835
- package/dist/agent-verifier/chunk-2GBBP27W.mjs +0 -301
- package/dist/agent-verifier/chunk-2QMNAVV4.mjs +0 -14522
- package/dist/agent-verifier/chunk-2SZHMP6F.mjs +0 -264
- package/dist/agent-verifier/chunk-4WD3YU2E.mjs +0 -166
- package/dist/agent-verifier/chunk-54TAYXUD.mjs +0 -12
- package/dist/agent-verifier/chunk-6A5HRJMQ.mjs +0 -3174
- package/dist/agent-verifier/chunk-6UUJEYDV.mjs +0 -213
- package/dist/agent-verifier/chunk-7653FPGJ.mjs +0 -381
- package/dist/agent-verifier/chunk-7E65UQLY.mjs +0 -38
- package/dist/agent-verifier/chunk-BVVNBJM4.mjs +0 -221
- package/dist/agent-verifier/chunk-CEDUHGNH.mjs +0 -74
- package/dist/agent-verifier/chunk-CEQ2VJWN.mjs +0 -149
- package/dist/agent-verifier/chunk-CFU5EWIC.mjs +0 -69
- package/dist/agent-verifier/chunk-CJEEA6NJ.mjs +0 -730
- package/dist/agent-verifier/chunk-EIQWDQWJ.mjs +0 -186
- package/dist/agent-verifier/chunk-EOQIV6PS.mjs +0 -649
- package/dist/agent-verifier/chunk-HBNDKQT5.mjs +0 -8381
- package/dist/agent-verifier/chunk-HJFQDSTU.mjs +0 -225
- package/dist/agent-verifier/chunk-JH22JNYD.mjs +0 -1681
- package/dist/agent-verifier/chunk-LI3ZR3BI.mjs +0 -41
- package/dist/agent-verifier/chunk-LM3OZLZG.mjs +0 -48
- package/dist/agent-verifier/chunk-MINCYHXN.mjs +0 -106
- package/dist/agent-verifier/chunk-MRCUP5SW.mjs +0 -128
- package/dist/agent-verifier/chunk-RBDDIIPM.mjs +0 -19
- package/dist/agent-verifier/chunk-SHUMAVAP.mjs +0 -59
- package/dist/agent-verifier/chunk-SYPLYRGB.mjs +0 -2812
- package/dist/agent-verifier/chunk-U6OJN7XS.mjs +0 -8092
- package/dist/agent-verifier/chunk-VYJTHSYR.mjs +0 -44
- package/dist/agent-verifier/chunk-XYDL7GY6.mjs +0 -10
- package/dist/agent-verifier/compile-5QSPIOUT.mjs +0 -313
- package/dist/agent-verifier/global-config-WX3ZZIVU.mjs +0 -17
- package/dist/agent-verifier/local-files-MTPLP62S.mjs +0 -46
- package/dist/agent-verifier/local-typecheck-QFYYAZOK.mjs +0 -9
- package/dist/agent-verifier/materialize-workspace-FKALAE2T.mjs +0 -90
- package/dist/agent-verifier/project-state-7GR6BQTQ.mjs +0 -32
- package/dist/agent-verifier/reducer-bundle-preflight-C73LEXI2.mjs +0 -23
- package/dist/agent-verifier/reducer-contract-preflight-22X7DSZW.mjs +0 -10
- package/dist/agent-verifier/reducer-native-test-harness-GMWBUISX.mjs +0 -53
- package/dist/agent-verifier/static-scaffold-AJMZZQWS.mjs +0 -28
- package/dist/agent-verifier/sync-3DUQH32H.mjs +0 -594
- package/dist/agent-verifier/test-P4U5INTD.mjs +0 -356
- package/dist/agent-verifier/testing-5K2BJYF2.mjs +0 -674
- package/dist/agent-verifier/workspace-codegen-JDZJRSDV.mjs +0 -11
- package/dist/agent-verifier/workspace-dependencies-HZ6VVS4G.mjs +0 -14
- package/dist/chunk-2H7UOFLK.js +0 -11
- package/dist/chunk-7FOO4AJI.js +0 -50
- package/dist/chunk-7FOO4AJI.js.map +0 -1
- package/dist/chunk-C6UAT6EH.js.map +0 -1
- package/dist/chunk-RS7UXJZV.js.map +0 -1
- package/dist/internal.d.ts +0 -311
- package/dist/keychain-backend-JHTXAKWC.js +0 -135
- package/dist/prompt-GMZABCJC.js +0 -756
- package/dist/runtime-packages/ui-host-runtime/src/actor-principal.ts +0 -71
- package/dist/runtime-packages/ui-host-runtime/src/browser-interaction.ts +0 -139
- package/dist/runtime-packages/ui-host-runtime/src/components/host-controls.tsx +0 -374
- package/dist/runtime-packages/ui-host-runtime/src/components/host-feedback-toaster.tsx +0 -266
- package/dist/runtime-packages/ui-host-runtime/src/components/host-feedback.tsx +0 -212
- package/dist/runtime-packages/ui-host-runtime/src/components/host-primitives.tsx +0 -271
- package/dist/runtime-packages/ui-host-runtime/src/components/host-session-metadata.tsx +0 -135
- package/dist/runtime-packages/ui-host-runtime/src/components/index.ts +0 -5
- package/dist/runtime-packages/ui-host-runtime/src/components/perf-overlay.tsx +0 -194
- package/dist/runtime-packages/ui-host-runtime/src/gameplay-authority-transport.ts +0 -626
- package/dist/runtime-packages/ui-host-runtime/src/host-controls.tsx +0 -1
- package/dist/runtime-packages/ui-host-runtime/src/host-feedback.tsx +0 -1
- package/dist/runtime-packages/ui-host-runtime/src/host-session-transport.ts +0 -294
- package/dist/runtime-packages/ui-host-runtime/src/index.ts +0 -3
- package/dist/runtime-packages/ui-host-runtime/src/logger.ts +0 -11
- package/dist/runtime-packages/ui-host-runtime/src/perf.ts +0 -324
- package/dist/runtime-packages/ui-host-runtime/src/plugin-bridge.ts +0 -195
- package/dist/runtime-packages/ui-host-runtime/src/plugin-health-check.ts +0 -138
- package/dist/runtime-packages/ui-host-runtime/src/plugin-messages.ts +0 -159
- package/dist/runtime-packages/ui-host-runtime/src/plugin-session-gateway.ts +0 -551
- package/dist/runtime-packages/ui-host-runtime/src/runtime/index.ts +0 -13
- package/dist/runtime-packages/ui-host-runtime/src/screenshot/projection-to-snapshot.ts +0 -122
- package/dist/runtime-packages/ui-host-runtime/src/screenshot/static-store-api.ts +0 -26
- package/dist/runtime-packages/ui-host-runtime/src/session-ingress-controller.ts +0 -583
- package/dist/runtime-packages/ui-host-runtime/src/session-ingress.ts +0 -219
- package/dist/runtime-packages/ui-host-runtime/src/session-live-runtime.ts +0 -117
- package/dist/runtime-packages/ui-host-runtime/src/session-model.ts +0 -431
- package/dist/runtime-packages/ui-host-runtime/src/session-projection.ts +0 -211
- package/dist/runtime-packages/ui-host-runtime/src/session-recovery.ts +0 -80
- package/dist/runtime-packages/ui-host-runtime/src/session-state-reducer.ts +0 -1034
- package/dist/runtime-packages/ui-host-runtime/src/sse-manager.ts +0 -416
- package/dist/runtime-packages/ui-host-runtime/src/unified-session-store.ts +0 -184
- package/dist/testing-KLSV6CPJ.js +0 -674
- package/dist/testing-KLSV6CPJ.js.map +0 -1
- /package/dist/{chunk-2H7UOFLK.js.map → chunk-SEGVTWSK.js.map} +0 -0
- /package/dist/{global-config-AGFBDFYD.js.map → global-config-S4ZIPECE.js.map} +0 -0
- /package/dist/{keychain-backend-JHTXAKWC.js.map → keychain-backend-HDF4TZDL.js.map} +0 -0
- /package/dist/{prompt-GMZABCJC.js.map → prompt-NDV3AE5L.js.map} +0 -0
|
@@ -0,0 +1,597 @@
|
|
|
1
|
+
<!-- Generated by apps/dreamboard-cli/scripts/sync-skill-docs.ts. -->
|
|
2
|
+
<!-- Source: docs/reference/manifest-authoring.mdx -->
|
|
3
|
+
|
|
4
|
+
# Manifest authoring
|
|
5
|
+
|
|
6
|
+
Reference for authoring Dreamboard manifest.json files.
|
|
7
|
+
|
|
8
|
+
`manifest.json` defines the stable structure of your game: player counts, card
|
|
9
|
+
sets, zones, boards, pieces, dice, resources, and setup metadata.
|
|
10
|
+
|
|
11
|
+
Boards describe positions, connections, and structural sites. Randomized setup
|
|
12
|
+
contents still belong in reducer setup code. In a Catan-style game, the
|
|
13
|
+
manifest should define stable hex spaces such as `cell-01`, `cell-02`, and
|
|
14
|
+
`cell-03`, while the reducer shuffles terrain pieces and number tokens onto
|
|
15
|
+
those spaces at runtime.
|
|
16
|
+
|
|
17
|
+
## Top-level shape
|
|
18
|
+
|
|
19
|
+
```json
|
|
20
|
+
{
|
|
21
|
+
"players": { "...": "..." },
|
|
22
|
+
"cardSets": [{ "...": "..." }],
|
|
23
|
+
"zones": [{ "...": "..." }],
|
|
24
|
+
"boardTemplates": [{ "...": "..." }],
|
|
25
|
+
"boards": [{ "...": "..." }],
|
|
26
|
+
"pieceTypes": [{ "...": "..." }],
|
|
27
|
+
"pieceSeeds": [{ "...": "..." }],
|
|
28
|
+
"dieTypes": [{ "...": "..." }],
|
|
29
|
+
"dieSeeds": [{ "...": "..." }],
|
|
30
|
+
"resources": [{ "...": "..." }],
|
|
31
|
+
"setupOptions": [{ "...": "..." }],
|
|
32
|
+
"setupProfiles": [{ "...": "..." }]
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
| Field | Required | Notes |
|
|
37
|
+
| --- | --- | --- |
|
|
38
|
+
| `players` | Yes | Supported player counts |
|
|
39
|
+
| `cardSets` | Yes | Manual or preset card catalogs |
|
|
40
|
+
| `zones` | No | Shared and per-player containers; defaults to `[]` |
|
|
41
|
+
| `boardTemplates` | No | Reusable board topology; defaults to `[]` |
|
|
42
|
+
| `boards` | No | Shared and per-player board instances; defaults to `[]` |
|
|
43
|
+
| `pieceTypes` | No | Piece type definitions; defaults to `[]` |
|
|
44
|
+
| `pieceSeeds` | No | Seeded pieces; defaults to `[]` |
|
|
45
|
+
| `dieTypes` | No | Die type definitions; defaults to `[]` |
|
|
46
|
+
| `dieSeeds` | No | Seeded dice; defaults to `[]` |
|
|
47
|
+
| `resources` | No | Resource types; defaults to `[]` |
|
|
48
|
+
| `setupOptions` | No | Setup axes; defaults to `[]` |
|
|
49
|
+
| `setupProfiles` | No | Setup profiles; defaults to `[]` |
|
|
50
|
+
|
|
51
|
+
Top-level keys outside this schema are rejected when the manifest is loaded.
|
|
52
|
+
|
|
53
|
+
## Shared schema types
|
|
54
|
+
|
|
55
|
+
### `PropertySchema`
|
|
56
|
+
|
|
57
|
+
Use `PropertySchema` inside card schemas and board, space, relation, container,
|
|
58
|
+
edge, vertex, piece, or die field schemas.
|
|
59
|
+
|
|
60
|
+
| Field | Required | Notes |
|
|
61
|
+
| --- | --- | --- |
|
|
62
|
+
| `type` | Yes | One of `string`, `integer`, `number`, `boolean`, `zoneId`, `cardId`, `playerId`, `boardId`, `edgeId`, `vertexId`, `spaceId`, `pieceId`, `dieId`, `resourceId`, `array`, `object`, `record`, `enum` |
|
|
63
|
+
| `description` | No | Short help text |
|
|
64
|
+
| `optional` | No | When `true`, the authored field may be omitted |
|
|
65
|
+
| `nullable` | No | When `true`, the authored field may be `null` |
|
|
66
|
+
| `items` | No | Required when `type` is `array` |
|
|
67
|
+
| `properties` | No | Required when `type` is `object` |
|
|
68
|
+
| `values` | No | Required when `type` is `record` |
|
|
69
|
+
| `enums` | No | Required when `type` is `enum` |
|
|
70
|
+
|
|
71
|
+
### `ObjectSchema`
|
|
72
|
+
|
|
73
|
+
`ObjectSchema` is a map of property names to `PropertySchema`. Properties are
|
|
74
|
+
required unless their schema sets `optional: true`.
|
|
75
|
+
|
|
76
|
+
```json
|
|
77
|
+
{
|
|
78
|
+
"properties": {
|
|
79
|
+
"cost": { "type": "integer" },
|
|
80
|
+
"terrain": {
|
|
81
|
+
"type": "enum",
|
|
82
|
+
"enums": ["forest", "hill", "field"]
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
`properties` and `fields` values in `manifest.json` are stored as authored JSON
|
|
89
|
+
values. Keep those values consistent with the schema you declare.
|
|
90
|
+
|
|
91
|
+
### `ComponentHomeSpec`
|
|
92
|
+
|
|
93
|
+
Use `home` on cards, piece seeds, and die seeds to place authored inventory.
|
|
94
|
+
|
|
95
|
+
| `type` | Extra fields | Meaning |
|
|
96
|
+
| --- | --- | --- |
|
|
97
|
+
| `detached` | None | Start unattached |
|
|
98
|
+
| `zone` | `zoneId` | Place into a zone |
|
|
99
|
+
| `space` | `boardId`, `spaceId` | Place onto a board space or hex space |
|
|
100
|
+
| `container` | `boardId`, `containerId` | Place into a board container |
|
|
101
|
+
| `edge` | `boardId`, `ref` | Place onto a hex edge identified by two spaces |
|
|
102
|
+
| `vertex` | `boardId`, `ref` | Place onto a hex vertex identified by three spaces |
|
|
103
|
+
| `slot` | `hostComponentId`, `slotId` | Place into a component-owned slot |
|
|
104
|
+
|
|
105
|
+
### `ComponentVisibilitySpec`
|
|
106
|
+
|
|
107
|
+
| Field | Required | Notes |
|
|
108
|
+
| --- | --- | --- |
|
|
109
|
+
| `faceUp` | No | Defaults to `true` |
|
|
110
|
+
| `visibleTo` | No | Player IDs that can see the component; omitted means visible to all players |
|
|
111
|
+
|
|
112
|
+
## `players`
|
|
113
|
+
|
|
114
|
+
### `PlayersDefinition`
|
|
115
|
+
|
|
116
|
+
| Field | Required | Notes |
|
|
117
|
+
| --- | --- | --- |
|
|
118
|
+
| `minPlayers` | Yes | Integer from `1` to `10` |
|
|
119
|
+
| `maxPlayers` | Yes | Integer from `1` to `10` |
|
|
120
|
+
| `optimalPlayers` | No | Recommended player count |
|
|
121
|
+
|
|
122
|
+
## `cardSets`
|
|
123
|
+
|
|
124
|
+
`cardSets` define the cards that exist. They do not place cards into zones by themselves.
|
|
125
|
+
|
|
126
|
+
### `CardSetDefinition`
|
|
127
|
+
|
|
128
|
+
| Variant | Required fields | Notes |
|
|
129
|
+
| --- | --- | --- |
|
|
130
|
+
| `type: "manual"` | `id`, `name`, `cardSchema`, `cards` | Define your own cards |
|
|
131
|
+
| `type: "preset"` | `id`, `name` | Use a built-in set |
|
|
132
|
+
|
|
133
|
+
Current supported preset ID: `standard_52_deck`.
|
|
134
|
+
|
|
135
|
+
### `BoardCard`
|
|
136
|
+
|
|
137
|
+
| Field | Required | Notes |
|
|
138
|
+
| --- | --- | --- |
|
|
139
|
+
| `type` | Yes | Card type and single-copy runtime ID seed |
|
|
140
|
+
| `name` | Yes | Display name |
|
|
141
|
+
| `count` | Yes | Integer `>= 1` |
|
|
142
|
+
| `properties` | Yes | JSON-valued property map matching `cardSchema` |
|
|
143
|
+
| `imageUrl` | No | Image URL |
|
|
144
|
+
| `text` | No | Card text |
|
|
145
|
+
| `cardType` | No | Category or subtype |
|
|
146
|
+
| `home` | No | `ComponentHomeSpec` |
|
|
147
|
+
| `visibility` | No | `ComponentVisibilitySpec` |
|
|
148
|
+
|
|
149
|
+
```json
|
|
150
|
+
{
|
|
151
|
+
"cardSets": [
|
|
152
|
+
{
|
|
153
|
+
"type": "manual",
|
|
154
|
+
"id": "project-cards",
|
|
155
|
+
"name": "Project cards",
|
|
156
|
+
"cardSchema": {
|
|
157
|
+
"properties": {
|
|
158
|
+
"cost": { "type": "integer" },
|
|
159
|
+
"tag": {
|
|
160
|
+
"type": "enum",
|
|
161
|
+
"enums": ["building", "science", "space"]
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
"cards": [
|
|
166
|
+
{
|
|
167
|
+
"type": "power-plant",
|
|
168
|
+
"name": "Power Plant",
|
|
169
|
+
"count": 1,
|
|
170
|
+
"properties": {
|
|
171
|
+
"cost": 11,
|
|
172
|
+
"tag": "building"
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
]
|
|
176
|
+
}
|
|
177
|
+
]
|
|
178
|
+
}
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
## `zones`
|
|
182
|
+
|
|
183
|
+
Use `zones` for shared piles, per-player hands, pools, bags, and other table-level containers.
|
|
184
|
+
|
|
185
|
+
| Field | Required | Notes |
|
|
186
|
+
| --- | --- | --- |
|
|
187
|
+
| `id` | Yes | Pattern: `^[a-zA-Z][a-zA-Z0-9_-]*$` |
|
|
188
|
+
| `name` | Yes | Display name |
|
|
189
|
+
| `scope` | Yes | `shared` or `perPlayer` |
|
|
190
|
+
| `allowedCardSetIds` | No | Allowed card sets; enforced for card movement |
|
|
191
|
+
| `visibility` | No | `ownerOnly`, `public`, or `hidden`; defaults to `public` |
|
|
192
|
+
|
|
193
|
+
```json
|
|
194
|
+
{
|
|
195
|
+
"zones": [
|
|
196
|
+
{
|
|
197
|
+
"id": "project-deck",
|
|
198
|
+
"name": "Project deck",
|
|
199
|
+
"scope": "shared",
|
|
200
|
+
"allowedCardSetIds": ["project-cards"],
|
|
201
|
+
"visibility": "hidden"
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"id": "project-discard",
|
|
205
|
+
"name": "Project discard",
|
|
206
|
+
"scope": "shared",
|
|
207
|
+
"allowedCardSetIds": ["project-cards"],
|
|
208
|
+
"visibility": "public"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"id": "project-hand",
|
|
212
|
+
"name": "Project hand",
|
|
213
|
+
"scope": "perPlayer",
|
|
214
|
+
"allowedCardSetIds": ["project-cards"],
|
|
215
|
+
"visibility": "ownerOnly"
|
|
216
|
+
}
|
|
217
|
+
]
|
|
218
|
+
}
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
## `boardTemplates` and `boards`
|
|
222
|
+
|
|
223
|
+
Use templates when multiple boards share the same topology. Use boards for authored board instances that exist at runtime.
|
|
224
|
+
|
|
225
|
+
`layout` is the engine-level discriminator. `typeId` is the reducer-facing
|
|
226
|
+
category. For example, a Monopoly board would usually be `layout: "generic"`
|
|
227
|
+
with `typeId: "track"`.
|
|
228
|
+
|
|
229
|
+
### `BoardTemplateSpec`
|
|
230
|
+
|
|
231
|
+
| Variant | Required fields | Notes |
|
|
232
|
+
| --- | --- | --- |
|
|
233
|
+
| Generic | `id`, `name`, `layout: "generic"` | Optional `typeId` for authored board category |
|
|
234
|
+
| Hex | `id`, `name`, `layout: "hex"` | Optional `typeId`; `orientation` defaults to `pointy-top` |
|
|
235
|
+
|
|
236
|
+
Generic templates can include `boardFieldsSchema`, `spaceFieldsSchema`,
|
|
237
|
+
`relationFieldsSchema`, `containerFieldsSchema`, and `spaces`, `relations`,
|
|
238
|
+
`containers`. Those arrays default to `[]`.
|
|
239
|
+
|
|
240
|
+
Hex templates can include `boardFieldsSchema`, `spaceFieldsSchema`,
|
|
241
|
+
`edgeFieldsSchema`, `vertexFieldsSchema`, and `spaces`, `edges`, `vertices`.
|
|
242
|
+
Those arrays default to `[]`.
|
|
243
|
+
|
|
244
|
+
```json
|
|
245
|
+
{
|
|
246
|
+
"boardTemplates": [
|
|
247
|
+
{
|
|
248
|
+
"id": "catan-island",
|
|
249
|
+
"name": "Catan island",
|
|
250
|
+
"layout": "hex",
|
|
251
|
+
"orientation": "pointy-top",
|
|
252
|
+
"spaces": [
|
|
253
|
+
{ "id": "cell-01", "q": 0, "r": 0, "typeId": "land" },
|
|
254
|
+
{ "id": "cell-02", "q": 1, "r": 0, "typeId": "land" },
|
|
255
|
+
{ "id": "cell-03", "q": 0, "r": 1, "typeId": "land" }
|
|
256
|
+
],
|
|
257
|
+
"edges": [
|
|
258
|
+
{
|
|
259
|
+
"ref": { "spaces": ["cell-01", "cell-02"] },
|
|
260
|
+
"typeId": "harbor"
|
|
261
|
+
}
|
|
262
|
+
],
|
|
263
|
+
"vertices": [
|
|
264
|
+
{
|
|
265
|
+
"ref": { "spaces": ["cell-01", "cell-02", "cell-03"] },
|
|
266
|
+
"typeId": "settlement-site"
|
|
267
|
+
}
|
|
268
|
+
]
|
|
269
|
+
}
|
|
270
|
+
],
|
|
271
|
+
"boards": [
|
|
272
|
+
{
|
|
273
|
+
"id": "main-island",
|
|
274
|
+
"name": "Main island",
|
|
275
|
+
"layout": "hex",
|
|
276
|
+
"scope": "shared",
|
|
277
|
+
"templateId": "catan-island"
|
|
278
|
+
}
|
|
279
|
+
]
|
|
280
|
+
}
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
### `BoardSpec`
|
|
284
|
+
|
|
285
|
+
| Field | Required | Notes |
|
|
286
|
+
| --- | --- | --- |
|
|
287
|
+
| `id` | Yes | Pattern: `^[a-zA-Z][a-zA-Z0-9_-]*$` |
|
|
288
|
+
| `name` | Yes | Display name |
|
|
289
|
+
| `layout` | Yes | `generic` or `hex` |
|
|
290
|
+
| `typeId` | No | Authored board category used by reducer/UI code |
|
|
291
|
+
| `scope` | Yes | `shared` or `perPlayer` |
|
|
292
|
+
| `templateId` | No | Clone a template before applying inline additions |
|
|
293
|
+
| `fields` | No | JSON-valued board field map |
|
|
294
|
+
|
|
295
|
+
Generic boards can add `boardFieldsSchema`, `spaceFieldsSchema`,
|
|
296
|
+
`relationFieldsSchema`, `containerFieldsSchema`, plus `spaces`, `relations`,
|
|
297
|
+
and `containers`. Those arrays default to `[]`.
|
|
298
|
+
|
|
299
|
+
Hex boards can add `orientation`, `boardFieldsSchema`, `spaceFieldsSchema`,
|
|
300
|
+
`edgeFieldsSchema`, `vertexFieldsSchema`, plus `spaces`, `edges`, and
|
|
301
|
+
`vertices`. Those arrays default to `[]`.
|
|
302
|
+
|
|
303
|
+
### `BoardSpaceSpec`
|
|
304
|
+
|
|
305
|
+
| Field | Required | Notes |
|
|
306
|
+
| --- | --- | --- |
|
|
307
|
+
| `id` | Yes | Board-local space ID |
|
|
308
|
+
| `name` | No | Display label |
|
|
309
|
+
| `typeId` | No | Authored space category used by reducer/UI code |
|
|
310
|
+
| `fields` | No | JSON-valued field map |
|
|
311
|
+
|
|
312
|
+
### `BoardRelationSpec`
|
|
313
|
+
|
|
314
|
+
| Field | Required | Notes |
|
|
315
|
+
| --- | --- | --- |
|
|
316
|
+
| `typeId` | Yes | Relation category such as `adjacent` or `next` |
|
|
317
|
+
| `fromSpaceId` | Yes | Source space |
|
|
318
|
+
| `toSpaceId` | Yes | Target space |
|
|
319
|
+
| `id` | No | Stable relation ID |
|
|
320
|
+
| `directed` | No | Defaults to `false` |
|
|
321
|
+
| `fields` | No | JSON-valued field map |
|
|
322
|
+
|
|
323
|
+
### `BoardContainerSpec`
|
|
324
|
+
|
|
325
|
+
| Field | Required | Notes |
|
|
326
|
+
| --- | --- | --- |
|
|
327
|
+
| `id` | Yes | Board-local container ID |
|
|
328
|
+
| `name` | Yes | Display name |
|
|
329
|
+
| `host` | Yes | `{ "type": "board" }` or `{ "type": "space", "spaceId": "..." }` |
|
|
330
|
+
| `allowedCardSetIds` | No | Allowed card sets |
|
|
331
|
+
| `fields` | No | JSON-valued field map |
|
|
332
|
+
|
|
333
|
+
Board containers are for attached holding areas such as market rows, discard
|
|
334
|
+
trays, or board-level displays. Board spaces are topology nodes in the board
|
|
335
|
+
graph such as squares, hexes, map locations, or action spots.
|
|
336
|
+
|
|
337
|
+
### `HexSpaceSpec`, `HexEdgeSpec`, and `HexVertexSpec`
|
|
338
|
+
|
|
339
|
+
| Type | Required fields | Notes |
|
|
340
|
+
| --- | --- | --- |
|
|
341
|
+
| `HexSpaceSpec` | `id`, `q`, `r` | Optional `typeId`, `label`, `fields` |
|
|
342
|
+
| `HexEdgeSpec` | `ref` | `ref.spaces` must contain exactly 2 adjacent space IDs; optional `typeId`, `label`, `tags`, `fields` |
|
|
343
|
+
| `HexVertexSpec` | `ref` | `ref.spaces` must contain exactly 3 touching space IDs; optional `typeId`, `label`, `tags`, `fields` |
|
|
344
|
+
|
|
345
|
+
Use hex spaces for stable board positions. Use edges and vertices for
|
|
346
|
+
structural sites such as roads, borders, settlements, checkpoints, or other
|
|
347
|
+
game-specific metadata.
|
|
348
|
+
|
|
349
|
+
For a single real-game example that also lines up with `PieceSeedSpec` and `DieSeedSpec`, a Monopoly-style `track` board is the best fit.
|
|
350
|
+
|
|
351
|
+
```json
|
|
352
|
+
{
|
|
353
|
+
"boards": [
|
|
354
|
+
{
|
|
355
|
+
"id": "main-board",
|
|
356
|
+
"name": "Monopoly board",
|
|
357
|
+
"layout": "generic",
|
|
358
|
+
"typeId": "track",
|
|
359
|
+
"scope": "shared",
|
|
360
|
+
"spaces": [
|
|
361
|
+
{ "id": "go", "name": "GO", "typeId": "corner" },
|
|
362
|
+
{
|
|
363
|
+
"id": "mediterranean-avenue",
|
|
364
|
+
"name": "Mediterranean Avenue",
|
|
365
|
+
"typeId": "property"
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
"id": "income-tax",
|
|
369
|
+
"name": "Income Tax",
|
|
370
|
+
"typeId": "tax"
|
|
371
|
+
}
|
|
372
|
+
],
|
|
373
|
+
"relations": [
|
|
374
|
+
{
|
|
375
|
+
"typeId": "next",
|
|
376
|
+
"fromSpaceId": "go",
|
|
377
|
+
"toSpaceId": "mediterranean-avenue",
|
|
378
|
+
"directed": true
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
"typeId": "next",
|
|
382
|
+
"fromSpaceId": "mediterranean-avenue",
|
|
383
|
+
"toSpaceId": "income-tax",
|
|
384
|
+
"directed": true
|
|
385
|
+
}
|
|
386
|
+
]
|
|
387
|
+
}
|
|
388
|
+
]
|
|
389
|
+
}
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
## `pieceTypes`, `pieceSeeds`, `dieTypes`, and `dieSeeds`
|
|
393
|
+
|
|
394
|
+
### `PieceTypeSpec` and `DieTypeSpec`
|
|
395
|
+
|
|
396
|
+
| Type | Core fields | Notes |
|
|
397
|
+
| --- | --- | --- |
|
|
398
|
+
| `PieceTypeSpec` | `id`, `name` | Optional `fieldsSchema` |
|
|
399
|
+
| `DieTypeSpec` | `id`, `name` | Optional `sides` defaults to `6`; optional `fieldsSchema` |
|
|
400
|
+
|
|
401
|
+
### `PieceSeedSpec` and `DieSeedSpec`
|
|
402
|
+
|
|
403
|
+
| Field | Required | Notes |
|
|
404
|
+
| --- | --- | --- |
|
|
405
|
+
| `typeId` | Yes | Piece type or die type ID |
|
|
406
|
+
| `id` | No | Runtime ID seed; falls back to `typeId` when omitted |
|
|
407
|
+
| `name` | No | Display label |
|
|
408
|
+
| `count` | No | Integer `>= 1`; defaults to `1` |
|
|
409
|
+
| `ownerId` | No | Player ID such as `player-1` |
|
|
410
|
+
| `home` | No | `ComponentHomeSpec` |
|
|
411
|
+
| `visibility` | No | `ComponentVisibilitySpec` |
|
|
412
|
+
| `fields` | No | JSON-valued field map |
|
|
413
|
+
|
|
414
|
+
```json
|
|
415
|
+
{
|
|
416
|
+
"pieceTypes": [
|
|
417
|
+
{
|
|
418
|
+
"id": "player-token",
|
|
419
|
+
"name": "Player token"
|
|
420
|
+
}
|
|
421
|
+
],
|
|
422
|
+
"pieceSeeds": [
|
|
423
|
+
{
|
|
424
|
+
"id": "top-hat",
|
|
425
|
+
"name": "Top Hat",
|
|
426
|
+
"typeId": "player-token",
|
|
427
|
+
"ownerId": "player-1",
|
|
428
|
+
"home": {
|
|
429
|
+
"type": "space",
|
|
430
|
+
"boardId": "main-board",
|
|
431
|
+
"spaceId": "go"
|
|
432
|
+
}
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
"id": "dog",
|
|
436
|
+
"name": "Dog",
|
|
437
|
+
"typeId": "player-token",
|
|
438
|
+
"ownerId": "player-2",
|
|
439
|
+
"home": {
|
|
440
|
+
"type": "space",
|
|
441
|
+
"boardId": "main-board",
|
|
442
|
+
"spaceId": "go"
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
],
|
|
446
|
+
"dieTypes": [
|
|
447
|
+
{
|
|
448
|
+
"id": "standard-d6",
|
|
449
|
+
"name": "Standard d6",
|
|
450
|
+
"sides": 6
|
|
451
|
+
}
|
|
452
|
+
],
|
|
453
|
+
"dieSeeds": [
|
|
454
|
+
{
|
|
455
|
+
"id": "die-a",
|
|
456
|
+
"name": "Die A",
|
|
457
|
+
"typeId": "standard-d6"
|
|
458
|
+
},
|
|
459
|
+
{
|
|
460
|
+
"id": "die-b",
|
|
461
|
+
"name": "Die B",
|
|
462
|
+
"typeId": "standard-d6"
|
|
463
|
+
}
|
|
464
|
+
]
|
|
465
|
+
}
|
|
466
|
+
```
|
|
467
|
+
|
|
468
|
+
## `resources`, `setupOptions`, and `setupProfiles`
|
|
469
|
+
|
|
470
|
+
### `ResourceDefinition`
|
|
471
|
+
|
|
472
|
+
| Field | Required | Notes |
|
|
473
|
+
| --- | --- | --- |
|
|
474
|
+
| `id` | Yes | Pattern: `^[a-zA-Z][a-zA-Z0-9_]*$` |
|
|
475
|
+
| `name` | Yes | Display name |
|
|
476
|
+
|
|
477
|
+
```json
|
|
478
|
+
{
|
|
479
|
+
"resources": [
|
|
480
|
+
{ "id": "megacredits", "name": "MegaCredits" },
|
|
481
|
+
{ "id": "steel", "name": "Steel" },
|
|
482
|
+
{ "id": "plants", "name": "Plants" }
|
|
483
|
+
]
|
|
484
|
+
}
|
|
485
|
+
```
|
|
486
|
+
|
|
487
|
+
### `SetupOptionSpec`
|
|
488
|
+
|
|
489
|
+
| Field | Required | Notes |
|
|
490
|
+
| --- | --- | --- |
|
|
491
|
+
| `id` | Yes | Stable option ID |
|
|
492
|
+
| `name` | Yes | Display name |
|
|
493
|
+
| `description` | No | Help text |
|
|
494
|
+
| `choices` | No | Array of `SetupOptionChoiceSpec`; defaults to `[]` |
|
|
495
|
+
|
|
496
|
+
### `SetupOptionChoiceSpec`
|
|
497
|
+
|
|
498
|
+
| Field | Required | Notes |
|
|
499
|
+
| --- | --- | --- |
|
|
500
|
+
| `id` | Yes | Stable choice ID |
|
|
501
|
+
| `label` | Yes | Display label |
|
|
502
|
+
| `description` | No | Help text |
|
|
503
|
+
|
|
504
|
+
### `SetupProfileSpec`
|
|
505
|
+
|
|
506
|
+
| Field | Required | Notes |
|
|
507
|
+
| --- | --- | --- |
|
|
508
|
+
| `id` | Yes | Stable profile ID |
|
|
509
|
+
| `name` | Yes | Display name |
|
|
510
|
+
| `description` | No | Help text |
|
|
511
|
+
| `optionValues` | No | Map from setup option ID to selected choice ID |
|
|
512
|
+
|
|
513
|
+
`setupOptions` and `setupProfiles.optionValues` are metadata for UI and future
|
|
514
|
+
interactive setup composition. The runtime still selects setup by
|
|
515
|
+
`setupProfileId`, and actual setup execution stays in reducer-owned
|
|
516
|
+
`app/setup-profiles.ts`.
|
|
517
|
+
|
|
518
|
+
```json
|
|
519
|
+
{
|
|
520
|
+
"setupOptions": [
|
|
521
|
+
{
|
|
522
|
+
"id": "map",
|
|
523
|
+
"name": "Map",
|
|
524
|
+
"choices": [
|
|
525
|
+
{ "id": "tharsis", "label": "Tharsis" },
|
|
526
|
+
{ "id": "hellas", "label": "Hellas" },
|
|
527
|
+
{ "id": "elysium", "label": "Elysium" }
|
|
528
|
+
]
|
|
529
|
+
},
|
|
530
|
+
{
|
|
531
|
+
"id": "starting-corporations",
|
|
532
|
+
"name": "Starting corporations",
|
|
533
|
+
"choices": [
|
|
534
|
+
{ "id": "beginner", "label": "Beginner corporation" },
|
|
535
|
+
{ "id": "draft", "label": "Draft corporations" }
|
|
536
|
+
]
|
|
537
|
+
},
|
|
538
|
+
{
|
|
539
|
+
"id": "expansion",
|
|
540
|
+
"name": "Expansion",
|
|
541
|
+
"choices": [
|
|
542
|
+
{ "id": "base", "label": "Base game" },
|
|
543
|
+
{ "id": "prelude", "label": "Prelude" }
|
|
544
|
+
]
|
|
545
|
+
}
|
|
546
|
+
],
|
|
547
|
+
"setupProfiles": [
|
|
548
|
+
{
|
|
549
|
+
"id": "terraforming-mars-standard",
|
|
550
|
+
"name": "Terraforming Mars standard setup",
|
|
551
|
+
"optionValues": {
|
|
552
|
+
"map": "tharsis",
|
|
553
|
+
"starting-corporations": "draft",
|
|
554
|
+
"expansion": "prelude"
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
]
|
|
558
|
+
}
|
|
559
|
+
```
|
|
560
|
+
|
|
561
|
+
## Derived behavior
|
|
562
|
+
|
|
563
|
+
- Player IDs are generated as `player-1` through `player-{maxPlayers}`.
|
|
564
|
+
- Optional top-level arrays default to `[]`.
|
|
565
|
+
- `ZoneSpec.visibility` defaults to `public`.
|
|
566
|
+
- `BoardRelationSpec.directed` defaults to `false`.
|
|
567
|
+
- `HexBoardTemplateSpec.orientation` defaults to `pointy-top`.
|
|
568
|
+
- `ComponentVisibilitySpec.faceUp` defaults to `true`.
|
|
569
|
+
- `PieceSeedSpec.count` and `DieSeedSpec.count` default to `1`.
|
|
570
|
+
- `DieTypeSpec.sides` defaults to `6`.
|
|
571
|
+
- `SetupOptionSpec.choices` defaults to `[]`.
|
|
572
|
+
- A manual card with `count > 1` expands to runtime card IDs like `{type}-1`,
|
|
573
|
+
`{type}-2`, and so on. A single-copy card keeps `type` as its runtime ID.
|
|
574
|
+
- A piece or die seed with `count > 1` expands to runtime IDs like `{id}-1`,
|
|
575
|
+
`{id}-2`, or `{typeId}-1`, `{typeId}-2` when `id` is omitted.
|
|
576
|
+
- A board with `scope: "perPlayer"` expands to runtime board IDs like
|
|
577
|
+
`{boardId}:player-1`.
|
|
578
|
+
- Home references use authored board base IDs. Per-player boards resolve to the
|
|
579
|
+
matching runtime board for the owning player.
|
|
580
|
+
- For hex boards, authored `spaces` are the stable topology positions. Runtime
|
|
581
|
+
`edgeId` and `vertexId` values are derived from those spaces. Authors attach
|
|
582
|
+
metadata by referencing `ref.spaces`, not by writing edge or vertex IDs
|
|
583
|
+
directly.
|
|
584
|
+
- Preset card sets are materialized into authored cards before code generation.
|
|
585
|
+
The current supported preset is `standard_52_deck`.
|
|
586
|
+
- `setupProfiles.optionValues` must reference declared setup options and
|
|
587
|
+
declared choice IDs.
|
|
588
|
+
- Dreamboard generates literal unions and Zod schemas for authored categories
|
|
589
|
+
such as `BoardLayout`, `BoardTypeId`, `SpaceTypeId`, `RelationTypeId`,
|
|
590
|
+
`EdgeTypeId`, and `VertexTypeId`.
|
|
591
|
+
- Dreamboard generates typed runtime ID literals, authored category unions, Zod
|
|
592
|
+
schemas, and lookup helpers from the manifest for players, cards, zones,
|
|
593
|
+
boards, resources, setup options, setup profiles, and schema-backed fields.
|
|
594
|
+
|
|
595
|
+
If you are deciding between one shared zone and one copy per player, use this
|
|
596
|
+
rule: `scope: "shared"` means exactly one table-wide container, and
|
|
597
|
+
`scope: "perPlayer"` means Dreamboard materializes one container per player.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
<!-- Generated by apps/dreamboard-cli/scripts/sync-skill-docs.ts. -->
|
|
2
|
+
<!-- Source: docs/quickstart.mdx -->
|
|
3
|
+
|
|
4
|
+
# Quickstart
|
|
5
|
+
|
|
6
|
+
Install Dreamboard CLI, create a game, and iterate on manifest-driven scaffolding.
|
|
7
|
+
|
|
8
|
+
Install the CLI:
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm install -g dreamboard
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Log in:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
dreamboard login
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Create a game:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
dreamboard new my-game --description "A trick-taking card game"
|
|
24
|
+
cd my-game
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Edit `rule.md` and `manifest.json`. Use
|
|
28
|
+
[CLI](./cli.md) for command behavior,
|
|
29
|
+
[Rule authoring](./rule-authoring.md) for the rules document and
|
|
30
|
+
[Manifest authoring](./manifest-authoring.md) for the manifest
|
|
31
|
+
schema.
|
|
32
|
+
|
|
33
|
+
Regenerate scaffolded files from your authored source:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
dreamboard sync
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Compile the current authored head:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
dreamboard compile
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Run the game locally:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
dreamboard run
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Start a local server to play the compiled game
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
dreamboard dev
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Useful follow-up commands:
|
|
58
|
+
|
|
59
|
+
- `dreamboard pull` reconciles authored changes when the remote has advanced.
|
|
60
|
+
- `dreamboard status` compares local and remote state.
|
|
61
|
+
- `dreamboard clone <game-slug>` pulls an existing game into a local workspace.
|
|
62
|
+
|
|
63
|
+
For a concise command reference, see [CLI](./cli.md).
|
|
64
|
+
|
|
65
|
+
For a full walkthrough, continue with
|
|
66
|
+
[Building your first game](./building-your-first-game.md).
|