dreamboard 0.1.0

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.
Files changed (35) hide show
  1. package/README.md +239 -0
  2. package/dist/chunk-2H7UOFLK.js +11 -0
  3. package/dist/chunk-2H7UOFLK.js.map +1 -0
  4. package/dist/chunk-FK6CWXQR.js +3479 -0
  5. package/dist/chunk-FK6CWXQR.js.map +1 -0
  6. package/dist/chunk-MP7IBNWW.js +13289 -0
  7. package/dist/chunk-MP7IBNWW.js.map +1 -0
  8. package/dist/dist-B3R64F6G.js +99 -0
  9. package/dist/dist-B3R64F6G.js.map +1 -0
  10. package/dist/embedded-harness-PF2LCIWC.js +345 -0
  11. package/dist/embedded-harness-PF2LCIWC.js.map +1 -0
  12. package/dist/index.js +25773 -0
  13. package/dist/index.js.map +1 -0
  14. package/dist/prompt-GMZABCJC.js +756 -0
  15. package/dist/prompt-GMZABCJC.js.map +1 -0
  16. package/package.json +40 -0
  17. package/skills/dreamboard/SKILL.md +119 -0
  18. package/skills/dreamboard/references/adversarial-testing.md +113 -0
  19. package/skills/dreamboard/references/all-players-tracking.md +75 -0
  20. package/skills/dreamboard/references/api-reference.md +193 -0
  21. package/skills/dreamboard/references/app-best-practices.md +86 -0
  22. package/skills/dreamboard/references/hands-vs-decks.md +86 -0
  23. package/skills/dreamboard/references/manifest-authoring.md +590 -0
  24. package/skills/dreamboard/references/phase-handlers.md +134 -0
  25. package/skills/dreamboard/references/rule-authoring.md +142 -0
  26. package/skills/dreamboard/references/scenario-format.md +99 -0
  27. package/skills/dreamboard/references/test-harness.md +225 -0
  28. package/skills/dreamboard/references/tts-migration-and-extractor.md +91 -0
  29. package/skills/dreamboard/references/ui-best-practices.md +158 -0
  30. package/skills/dreamboard/references/ui-genre-resource-management.md +187 -0
  31. package/skills/dreamboard/references/ui-genre-trick-taking.md +110 -0
  32. package/skills/dreamboard/references/ui-genre-worker-placement.md +143 -0
  33. package/skills/dreamboard/references/ui-style-guide.md +54 -0
  34. package/skills/dreamboard/scripts/events-extract.mjs +218 -0
  35. package/skills/dreamboard/scripts/extract_tts.py +1178 -0
package/README.md ADDED
@@ -0,0 +1,239 @@
1
+ # dreamboard
2
+
3
+ Dreamboard CLI for working with Dreamboard games from your own editor/tooling.
4
+
5
+ Dreamboard is built to take you from napkin sketch to playable prototype without the paper cuts:
6
+
7
+ - Describe the game you want to make.
8
+ - Generate the rules, components, and scaffolding.
9
+ - Playtest instantly with a frictionless lobby and live iteration loops.
10
+
11
+ The platform’s core promise is the same one described on the landing page: digital prototyping for everyone, with AI helping you move from idea to playable faster.
12
+
13
+ ## Install
14
+
15
+ Published npm package:
16
+
17
+ ```bash
18
+ npm install -g dreamboard
19
+ ```
20
+
21
+ The published CLI targets Node 20+.
22
+
23
+ ## Why Dreamboard
24
+
25
+ - `Describe`: start from theme, mechanics, and player experience instead of boilerplate setup.
26
+ - `Generate`: Dreamboard handles the sandbox primitives like turns, hands, and structured scaffolding.
27
+ - `Playtest`: share a live prototype instead of printing fresh paper every time a rule changes.
28
+ - `Iterate live`: keep testing momentum by changing values and flows without resetting the whole process.
29
+
30
+ ## Authentication
31
+
32
+ Use browser login:
33
+
34
+ ```bash
35
+ dreamboard login
36
+ ```
37
+
38
+ The published CLI stores your refreshable session in:
39
+
40
+ ```bash
41
+ ~/.dreamboard/config.json
42
+ ```
43
+
44
+ That stored session includes the refresh token the CLI needs to renew access automatically. Direct JWT injection is intentionally not part of the published CLI flow.
45
+
46
+ ## Source Checkout Setup
47
+
48
+ For local source-checkout development, install workspace dependencies with pnpm and keep Bun available for local embedded-harness workflows:
49
+
50
+ ```bash
51
+ pnpm install
52
+ ```
53
+
54
+ Playwright (for `dreamboard run`):
55
+
56
+ ```bash
57
+ npx playwright install
58
+ ```
59
+
60
+ ## Commands
61
+
62
+ Create a new game:
63
+
64
+ ```bash
65
+ dreamboard new my-game --description "A trick-taking card game"
66
+ ```
67
+
68
+ Clone an existing game:
69
+
70
+ ```bash
71
+ dreamboard clone my-game
72
+ ```
73
+
74
+ Update local manifest/rule changes and regenerate scaffolded files:
75
+
76
+ ```bash
77
+ dreamboard update
78
+ dreamboard update --update-sdk
79
+ ```
80
+
81
+ If the remote has advanced unexpectedly, `dreamboard update` fails fast and keeps the local workspace as the source of truth. Reconcile explicitly with:
82
+
83
+ ```bash
84
+ dreamboard update --pull
85
+ ```
86
+
87
+ Push local edits (recompile):
88
+
89
+ ```bash
90
+ dreamboard push
91
+ dreamboard push --force
92
+ ```
93
+
94
+ Inspect local vs remote state:
95
+
96
+ ```bash
97
+ dreamboard status
98
+ dreamboard status --json
99
+ ```
100
+
101
+ Run the game locally (server-compiled UI):
102
+
103
+ ```bash
104
+ dreamboard run
105
+ dreamboard run --players 4
106
+ dreamboard run --seed 1337
107
+ dreamboard run --new-session
108
+ ```
109
+
110
+ If no successful compile exists yet, `dreamboard run` will compile from the latest scaffolded snapshot automatically.
111
+ By default, the CLI uses `manifest.json`'s `playerConfig.minPlayers` to decide how many seats to create.
112
+
113
+ `dreamboard run` now defaults to a wait-and-observe loop when no scenario is provided:
114
+
115
+ 1. Reuse the previous active session (`--resume` defaults to true) unless `--new-session` is set.
116
+ 2. Subscribe to session SSE events.
117
+ 3. Exit when `YOUR_TURN` (default `--until`) or `GAME_ENDED` is received.
118
+ 4. Persist artifacts in `.dreamboard/run/`:
119
+ - `session.json`
120
+ - `events.ndjson`
121
+ - `latest-your-turn.json`
122
+ - `last-run-summary.json`
123
+
124
+ `dreamboard run` is deterministic-by-default for new sessions: if `--seed` is not provided, it uses `1337`.
125
+
126
+ Useful flags:
127
+
128
+ - `--until YOUR_TURN|GAME_ENDED|ANY`
129
+ - `--observe-events turns|all` (default `turns`; persist `YOUR_TURN` and `ACTION_REJECTED` messages)
130
+ - `--seed <int>` (deterministic RNG seed for new sessions, default `1337`)
131
+ - `--timeout-ms <ms>`
132
+ - `--max-events <count>`
133
+ - `--screenshot` (capture one Playwright screenshot for the selected run session)
134
+ - `--output <path>`
135
+ - `--delay <ms>`
136
+ - `--width <px>`
137
+ - `--height <px>`
138
+ - `--scenario-driver api|ui` (default `api`)
139
+
140
+ Playwright launch is now optional:
141
+
142
+ 1. It is launched when `--scenario-driver ui` is used.
143
+ 2. It is launched when `--screenshot` is used.
144
+ 3. Default API scenarios (`--scenario` with `--scenario-driver api`) do not require Playwright.
145
+ 4. Pure observe runs (`dreamboard run` without scenario/screenshot) do not require a browser session.
146
+
147
+ ## Scenario Files
148
+
149
+ `dreamboard run --scenario <file>` supports scenario JSON (API driver by default):
150
+
151
+ ```json
152
+ {
153
+ "steps": [
154
+ {
155
+ "playerId": "player-1",
156
+ "actionType": "playCard",
157
+ "parameters": { "cardId": "hearts-7" },
158
+ "turns": 1
159
+ },
160
+ {
161
+ "playerId": "player-1",
162
+ "actionType": "endTurn",
163
+ "parameters": {},
164
+ "turns": 1
165
+ }
166
+ ]
167
+ }
168
+ ```
169
+
170
+ `playerId` is required on every scenario step. The CLI executes all steps in order per invocation:
171
+
172
+ ```bash
173
+ dreamboard run
174
+ dreamboard run --scenario path/to/scenario.json
175
+ dreamboard run --scenario path/to/scenario.json --scenario-driver ui
176
+ ```
177
+
178
+ If there is no current `.dreamboard/run/latest-your-turn.json` for the active session (for example with `--new-session`), `dreamboard run --scenario ...` first observes SSE until it receives the initial `YOUR_TURN`, then starts executing scenario steps.
179
+
180
+ API-driven scenarios are strict per step: after each `submitAction`, the CLI waits for either `ACTION_EXECUTED` or `ACTION_REJECTED`. On rejection, it stops immediately with `stopReason=scenario_rejected`.
181
+
182
+ Screenshots are saved to `.dreamboard/screenshots/` by default. The CLI captures the same session selected by `--resume` / `--new-session`.
183
+
184
+ To capture a screenshot during observe or scenario runs:
185
+
186
+ ```bash
187
+ dreamboard run --screenshot
188
+ dreamboard run --scenario path/to/scenario.json --screenshot
189
+ dreamboard run --screenshot --output ./shot.png --delay 1500 --width 1440 --height 900
190
+ ```
191
+
192
+ ## Notes
193
+
194
+ - Project state lives in `.dreamboard/project.json`.
195
+ - Snapshots for `status` are stored in `.dreamboard/snapshot.json`.
196
+ - Published/public CLI installs target Node 20+ and support remote workflows.
197
+ - Published/public CLI builds are production-only; they do not support environment overrides or direct JWT injection.
198
+ - Local embedded-harness testing remains Bun-only and requires a source checkout with local backend support.
199
+ - Internal source-checkout builds may expose extra auth and environment helpers, but those are not part of the published CLI contract.
200
+
201
+ ## Skill Source
202
+
203
+ - Public skill source lives under `skills/dreamboard/`.
204
+ - `dreamboard new` installs the bundled skill into `.agents/skills/dreamboard/` in the generated game project.
205
+ - The Node helper script for run-artifact inspection is `.agents/skills/dreamboard/scripts/events-extract.mjs`.
206
+
207
+ ## Publish Prep
208
+
209
+ Build a staged public package:
210
+
211
+ ```bash
212
+ pnpm run stage:publish
213
+ pnpm run pack:publish
214
+ ```
215
+
216
+ `stage:publish` creates `.publish/package` as the public npm artifact for package name `dreamboard`, including the public `skills/dreamboard` tree.
217
+
218
+ Optional public metadata env vars for staging:
219
+
220
+ ```bash
221
+ export DREAMBOARD_PUBLIC_REPOSITORY_URL="https://github.com/<org>/<repo>.git"
222
+ export DREAMBOARD_PUBLIC_HOMEPAGE="https://github.com/<org>/<repo>"
223
+ export DREAMBOARD_PUBLIC_BUGS_URL="https://github.com/<org>/<repo>/issues"
224
+ export DREAMBOARD_PUBLIC_LICENSE="MIT"
225
+ ```
226
+
227
+ If the source package already defines `repository`, `homepage`, `bugs`, or `license`, `stage:publish` will reuse those fields automatically.
228
+
229
+ Before creating GitHub PRs or releases for the public CLI flow, verify `gh` is using account `ctan1345`:
230
+
231
+ ```bash
232
+ pnpm run verify:gh-auth
233
+ ```
234
+
235
+ If the account is logged in but inactive, switch first:
236
+
237
+ ```bash
238
+ gh auth switch -u ctan1345
239
+ ```
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env node
2
+ var __defProp = Object.defineProperty;
3
+ var __export = (target, all) => {
4
+ for (var name in all)
5
+ __defProp(target, name, { get: all[name], enumerable: true });
6
+ };
7
+
8
+ export {
9
+ __export
10
+ };
11
+ //# sourceMappingURL=chunk-2H7UOFLK.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}