dreamboard 0.1.21 → 0.1.23
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/dist/{chunk-EYYWGWTO.js → chunk-2RCUHMGL.js} +343 -1911
- package/dist/chunk-2RCUHMGL.js.map +1 -0
- package/dist/{chunk-MOVHYB6E.js → chunk-GN7232BY.js} +1025 -695
- package/dist/chunk-GN7232BY.js.map +1 -0
- package/dist/{chunk-BMYC6772.js → chunk-H3O43F5P.js} +9765 -3068
- package/dist/chunk-H3O43F5P.js.map +1 -0
- package/dist/dev-host/dev-api-proxy-plugin.ts +330 -0
- package/dist/dev-host/dev-diagnostics.ts +62 -0
- package/dist/dev-host/dev-fallback-stylesheet.ts +50 -0
- package/dist/dev-host/dev-host-controller.ts +686 -0
- package/dist/dev-host/dev-host-player-query.ts +17 -0
- package/dist/dev-host/dev-host-session-transport.ts +52 -0
- package/dist/dev-host/dev-host-storage.ts +56 -0
- package/dist/dev-host/dev-log-relay-plugin.ts +469 -0
- package/dist/dev-host/dev-runtime-config.ts +14 -0
- package/dist/dev-host/dev-runtime-platform.ts +419 -0
- package/dist/dev-host/dev-virtual-modules-plugin.ts +63 -0
- package/dist/dev-host/host-main.css +182 -0
- package/dist/dev-host/host-main.tsx +754 -0
- package/dist/dev-host/index.html +56 -0
- package/dist/dev-host/plugin-main.ts +55 -0
- package/dist/dev-host/plugin.html +24 -0
- package/dist/dev-host/start-dev-server.ts +138 -0
- package/dist/dev-host/virtual-modules.d.ts +27 -0
- package/dist/dist-FEPN3BDN.js +16543 -0
- package/dist/dist-FEPN3BDN.js.map +1 -0
- package/dist/{dist-WJRJNFLI.js → dist-FRURQI7Q.js} +4 -2
- package/dist/index.js +3 -3
- package/dist/internal.js +159 -124
- package/dist/internal.js.map +1 -1
- package/dist/runtime-packages/tailwind-config/shared-styles.css +146 -0
- package/dist/runtime-packages/ui/src/components/.gitkeep +0 -0
- package/dist/runtime-packages/ui/src/components/accordion.tsx +66 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/actions.tsx +65 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/artifact.tsx +147 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/branch.tsx +215 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/canvas.tsx +22 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/chain-of-thought.tsx +228 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/code-block.tsx +179 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/confirmation.tsx +158 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/connection.tsx +28 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/context.tsx +408 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/controls.tsx +18 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/conversation.tsx +97 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/edge.tsx +140 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/image.tsx +24 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/inline-citation.tsx +287 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/loader.tsx +96 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/message.tsx +463 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/node.tsx +71 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/open-in-chat.tsx +365 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/panel.tsx +15 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/plan.tsx +142 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/prompt-input.tsx +1380 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/queue.tsx +274 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/reasoning.tsx +182 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/response.tsx +22 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/shimmer.tsx +64 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/sources.tsx +77 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/suggestion.tsx +53 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/task.tsx +87 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/tool.tsx +165 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/toolbar.tsx +16 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/web-preview.tsx +263 -0
- package/dist/runtime-packages/ui/src/components/alert-dialog.tsx +157 -0
- package/dist/runtime-packages/ui/src/components/alert.tsx +66 -0
- package/dist/runtime-packages/ui/src/components/avatar.tsx +53 -0
- package/dist/runtime-packages/ui/src/components/badge.tsx +46 -0
- package/dist/runtime-packages/ui/src/components/button-group.tsx +83 -0
- package/dist/runtime-packages/ui/src/components/button.tsx +65 -0
- package/dist/runtime-packages/ui/src/components/card.tsx +92 -0
- package/dist/runtime-packages/ui/src/components/carousel.tsx +241 -0
- package/dist/runtime-packages/ui/src/components/collapsible.tsx +33 -0
- package/dist/runtime-packages/ui/src/components/command.tsx +184 -0
- package/dist/runtime-packages/ui/src/components/context-menu.tsx +252 -0
- package/dist/runtime-packages/ui/src/components/counter.tsx +11 -0
- package/dist/runtime-packages/ui/src/components/dialog.tsx +146 -0
- package/dist/runtime-packages/ui/src/components/drawer.tsx +132 -0
- package/dist/runtime-packages/ui/src/components/dropdown-menu.tsx +257 -0
- package/dist/runtime-packages/ui/src/components/form.tsx +168 -0
- package/dist/runtime-packages/ui/src/components/header.tsx +13 -0
- package/dist/runtime-packages/ui/src/components/hover-card.tsx +44 -0
- package/dist/runtime-packages/ui/src/components/input-group.tsx +178 -0
- package/dist/runtime-packages/ui/src/components/input.tsx +21 -0
- package/dist/runtime-packages/ui/src/components/item.tsx +193 -0
- package/dist/runtime-packages/ui/src/components/label.tsx +24 -0
- package/dist/runtime-packages/ui/src/components/navigation-menu.tsx +168 -0
- package/dist/runtime-packages/ui/src/components/popover.tsx +55 -0
- package/dist/runtime-packages/ui/src/components/progress.tsx +31 -0
- package/dist/runtime-packages/ui/src/components/radio-group.tsx +45 -0
- package/dist/runtime-packages/ui/src/components/resizable.tsx +56 -0
- package/dist/runtime-packages/ui/src/components/scroll-area.tsx +58 -0
- package/dist/runtime-packages/ui/src/components/select.tsx +187 -0
- package/dist/runtime-packages/ui/src/components/separator.tsx +28 -0
- package/dist/runtime-packages/ui/src/components/skeleton.tsx +13 -0
- package/dist/runtime-packages/ui/src/components/sonner.tsx +25 -0
- package/dist/runtime-packages/ui/src/components/spinner.tsx +16 -0
- package/dist/runtime-packages/ui/src/components/switch.tsx +31 -0
- package/dist/runtime-packages/ui/src/components/table.tsx +137 -0
- package/dist/runtime-packages/ui/src/components/tabs.tsx +74 -0
- package/dist/runtime-packages/ui/src/components/textarea.tsx +23 -0
- package/dist/runtime-packages/ui/src/components/theme-provider.tsx +73 -0
- package/dist/runtime-packages/ui/src/components/tooltip.tsx +61 -0
- package/dist/runtime-packages/ui/src/components/ui/file-upload.tsx +195 -0
- package/dist/runtime-packages/ui/src/hooks/.gitkeep +0 -0
- package/dist/runtime-packages/ui/src/index.ts +68 -0
- package/dist/runtime-packages/ui/src/lib/utils.ts +6 -0
- package/dist/runtime-packages/ui-host-runtime/src/actor-principal.ts +68 -0
- package/dist/runtime-packages/ui-host-runtime/src/components/host-controls.tsx +359 -0
- package/dist/runtime-packages/ui-host-runtime/src/components/host-feedback-toaster.tsx +274 -0
- package/dist/runtime-packages/ui-host-runtime/src/components/host-feedback.tsx +214 -0
- package/dist/runtime-packages/ui-host-runtime/src/components/host-session-metadata.tsx +135 -0
- package/dist/runtime-packages/ui-host-runtime/src/components/index.ts +5 -0
- package/dist/runtime-packages/ui-host-runtime/src/components/perf-overlay.tsx +194 -0
- package/dist/runtime-packages/ui-host-runtime/src/host-controls.tsx +1 -0
- package/dist/runtime-packages/ui-host-runtime/src/host-feedback.tsx +1 -0
- package/dist/runtime-packages/ui-host-runtime/src/host-session-transport.ts +162 -0
- package/dist/runtime-packages/ui-host-runtime/src/index.ts +2 -0
- package/dist/runtime-packages/ui-host-runtime/src/logger.ts +11 -0
- package/dist/runtime-packages/ui-host-runtime/src/perf.ts +253 -0
- package/dist/runtime-packages/ui-host-runtime/src/plugin-bridge.ts +195 -0
- package/dist/runtime-packages/ui-host-runtime/src/plugin-health-check.ts +138 -0
- package/dist/runtime-packages/ui-host-runtime/src/plugin-messages.ts +159 -0
- package/dist/runtime-packages/ui-host-runtime/src/plugin-session-gateway.ts +524 -0
- package/dist/runtime-packages/ui-host-runtime/src/runtime/index.ts +12 -0
- package/dist/runtime-packages/ui-host-runtime/src/screenshot/projection-to-snapshot.ts +122 -0
- package/dist/runtime-packages/ui-host-runtime/src/screenshot/static-store-api.ts +26 -0
- package/dist/runtime-packages/ui-host-runtime/src/session-ingress-controller.ts +477 -0
- package/dist/runtime-packages/ui-host-runtime/src/session-ingress.ts +209 -0
- package/dist/runtime-packages/ui-host-runtime/src/session-live-runtime.ts +112 -0
- package/dist/runtime-packages/ui-host-runtime/src/session-model.ts +318 -0
- package/dist/runtime-packages/ui-host-runtime/src/session-projection.ts +211 -0
- package/dist/runtime-packages/ui-host-runtime/src/session-state-reducer.ts +814 -0
- package/dist/runtime-packages/ui-host-runtime/src/sse-manager.ts +334 -0
- package/dist/runtime-packages/ui-host-runtime/src/unified-session-store.ts +180 -0
- package/dist/scaffold/assets/static/app/tsconfig.framework.json +3 -1
- package/dist/scaffold/assets/static/ui/tsconfig.framework.json +7 -19
- package/package.json +52 -17
- package/skills/dreamboard/SKILL.md +41 -75
- package/LICENSE +0 -89
- package/NOTICE +0 -1
- package/dist/chunk-BMYC6772.js.map +0 -1
- package/dist/chunk-EYYWGWTO.js.map +0 -1
- package/dist/chunk-MOVHYB6E.js.map +0 -1
- package/dist/scaffold/assets/static/ui/App.tsx +0 -22
- package/dist/src-CUL7EGGG.js +0 -634
- package/dist/src-CUL7EGGG.js.map +0 -1
- package/skills/dreamboard/references/authoring-lifecycle.md +0 -102
- package/skills/dreamboard/references/board-surfaces.md +0 -36
- package/skills/dreamboard/references/board-topology.md +0 -443
- package/skills/dreamboard/references/boards-and-topology.md +0 -100
- package/skills/dreamboard/references/card-actions.md +0 -107
- package/skills/dreamboard/references/cli.md +0 -120
- package/skills/dreamboard/references/core-concepts.md +0 -514
- package/skills/dreamboard/references/custom-renderers.md +0 -26
- package/skills/dreamboard/references/derived-values.md +0 -55
- package/skills/dreamboard/references/effects.md +0 -111
- package/skills/dreamboard/references/game-contract.md +0 -89
- package/skills/dreamboard/references/game-definition.md +0 -89
- package/skills/dreamboard/references/game-shell.md +0 -80
- package/skills/dreamboard/references/hand-surfaces.md +0 -33
- package/skills/dreamboard/references/index.md +0 -112
- package/skills/dreamboard/references/inputs-and-targets.md +0 -160
- package/skills/dreamboard/references/interactions.md +0 -158
- package/skills/dreamboard/references/manifest-fields.md +0 -137
- package/skills/dreamboard/references/manifest.md +0 -81
- package/skills/dreamboard/references/package-surfaces.md +0 -69
- package/skills/dreamboard/references/phases.md +0 -145
- package/skills/dreamboard/references/prompts-and-choices.md +0 -55
- package/skills/dreamboard/references/quickstart.md +0 -71
- package/skills/dreamboard/references/rule-authoring.md +0 -144
- package/skills/dreamboard/references/setup-bootstrap.md +0 -78
- package/skills/dreamboard/references/stages-and-zones.md +0 -59
- package/skills/dreamboard/references/static-views.md +0 -67
- package/skills/dreamboard/references/table-queries-and-ops.md +0 -103
- package/skills/dreamboard/references/testing-bases.md +0 -147
- package/skills/dreamboard/references/testing-generated-contracts.md +0 -142
- package/skills/dreamboard/references/testing-runtime-assertions.md +0 -124
- package/skills/dreamboard/references/testing-scenarios.md +0 -148
- package/skills/dreamboard/references/testing-ui-tests.md +0 -174
- package/skills/dreamboard/references/testing.md +0 -161
- package/skills/dreamboard/references/ui-architecture.md +0 -137
- package/skills/dreamboard/references/ui-components.md +0 -34
- package/skills/dreamboard/references/views.md +0 -72
- package/skills/dreamboard/references/workspace-layout.md +0 -136
- /package/dist/{dist-WJRJNFLI.js.map → dist-FRURQI7Q.js.map} +0 -0
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
# Boards and topology
|
|
2
|
-
|
|
3
|
-
Model generic, hex, and square boards with typed spaces, edges, vertices, containers, and board refs.
|
|
4
|
-
|
|
5
|
-
Boards are manifest-defined topology. They can be generic, hex, or square, shared or per-player, inline or based on a template.
|
|
6
|
-
|
|
7
|
-
## Board layouts
|
|
8
|
-
|
|
9
|
-
| Layout | Use for |
|
|
10
|
-
| --- | --- |
|
|
11
|
-
| `generic` | Free-form spaces and relations, tracks, maps, abstract zones. |
|
|
12
|
-
| `hex` | Hex grids with spaces, edges, and vertices. |
|
|
13
|
-
| `square` | Square grids with rows, columns, spaces, edges, and vertices. |
|
|
14
|
-
|
|
15
|
-
All layouts can have spaces and containers. Tiled layouts also expose typed edge and vertex ids.
|
|
16
|
-
|
|
17
|
-
## Inline board
|
|
18
|
-
|
|
19
|
-
```ts
|
|
20
|
-
boards: [
|
|
21
|
-
{
|
|
22
|
-
id: "action-board",
|
|
23
|
-
name: "Action Board",
|
|
24
|
-
layout: "square",
|
|
25
|
-
scope: "shared",
|
|
26
|
-
spaces: [
|
|
27
|
-
{ id: "plaza", row: 0, col: 0, typeId: "action" },
|
|
28
|
-
],
|
|
29
|
-
},
|
|
30
|
-
];
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
Use inline boards when a board appears once. Use templates when several board instances share topology.
|
|
34
|
-
|
|
35
|
-
## Templates
|
|
36
|
-
|
|
37
|
-
```ts
|
|
38
|
-
boardTemplates: [
|
|
39
|
-
{
|
|
40
|
-
id: "market-template",
|
|
41
|
-
name: "Market Template",
|
|
42
|
-
layout: "generic",
|
|
43
|
-
spaces: [
|
|
44
|
-
{ id: "auction", typeId: "action" },
|
|
45
|
-
{ id: "harvest", typeId: "action" },
|
|
46
|
-
],
|
|
47
|
-
},
|
|
48
|
-
],
|
|
49
|
-
boards: [
|
|
50
|
-
{
|
|
51
|
-
id: "market-board",
|
|
52
|
-
name: "Market Board",
|
|
53
|
-
templateId: "market-template",
|
|
54
|
-
layout: "generic",
|
|
55
|
-
scope: "shared",
|
|
56
|
-
},
|
|
57
|
-
];
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
Template-backed boards still get their own board id. Reducer and UI code should address runtime board data by board id, not by template id.
|
|
61
|
-
|
|
62
|
-
## Shared and per-player boards
|
|
63
|
-
|
|
64
|
-
`scope: "shared"` creates one board instance for the session. `scope: "perPlayer"` creates one board per player.
|
|
65
|
-
|
|
66
|
-
Use shared boards for central maps and markets. Use per-player boards for player mats, personal tracks, and private layouts.
|
|
67
|
-
|
|
68
|
-
## Runtime board queries
|
|
69
|
-
|
|
70
|
-
Inside reducer callbacks, views, derived values, and target rules, read board data through injected `q`:
|
|
71
|
-
|
|
72
|
-
```ts
|
|
73
|
-
const board = q.board.hex("island");
|
|
74
|
-
const edge = q.board.edge("island", edgeId);
|
|
75
|
-
const adjacent = q.board.incidentVertices("island", edgeId);
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
Use `q.board.get` for layout-agnostic access, `q.board.hex` / `q.board.square` for layout-specific topology, and traversal helpers such as `incidentEdges`, `incidentVertices`, `spaceEdges`, `spaceVertices`, and `squareNeighbors` for rules.
|
|
79
|
-
|
|
80
|
-
## Static board projection
|
|
81
|
-
|
|
82
|
-
Static board topology belongs in [Static views](./static-views.md), not in dynamic player views.
|
|
83
|
-
|
|
84
|
-
```ts
|
|
85
|
-
export const boardStatic = defineStaticView<GameContract>()({
|
|
86
|
-
project: ({ q }) => {
|
|
87
|
-
const board = q.board.hex("island");
|
|
88
|
-
return {
|
|
89
|
-
...board,
|
|
90
|
-
portsByVertexId: computePorts(board),
|
|
91
|
-
};
|
|
92
|
-
},
|
|
93
|
-
});
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
Keep game-specific decoration local, but use SDK static board queries for reusable topology access.
|
|
97
|
-
|
|
98
|
-
## Deep topology reference
|
|
99
|
-
|
|
100
|
-
For exact square/hex edge and vertex id rules, see [Board topology](./board-topology.md).
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
# Card actions
|
|
2
|
-
|
|
3
|
-
Use defineCardAction for first-class actions that play a card from a hand zone.
|
|
4
|
-
|
|
5
|
-
Use `defineCardAction` when the player action starts from a concrete card in a hand or card zone: play an action card, reveal a tactic, discard a reaction, trigger a card ability.
|
|
6
|
-
|
|
7
|
-
```ts
|
|
8
|
-
import { cardTypes, zones } from "../shared/manifest-contract";
|
|
9
|
-
|
|
10
|
-
const playBoost = defineCardAction<
|
|
11
|
-
GameContract,
|
|
12
|
-
typeof playerTurnPhaseStateSchema
|
|
13
|
-
>()({
|
|
14
|
-
cardType: cardTypes.boost,
|
|
15
|
-
playFrom: zones.actionHand,
|
|
16
|
-
label: "Play boost",
|
|
17
|
-
step: "main",
|
|
18
|
-
inputs: {
|
|
19
|
-
selectedSpaceId: boardInput.space<GameState, SpaceId>({
|
|
20
|
-
target: selectableSpaceTarget,
|
|
21
|
-
}),
|
|
22
|
-
stealFromPlayerId: formInput(ids.playerId.nullable()),
|
|
23
|
-
},
|
|
24
|
-
rules: [
|
|
25
|
-
{
|
|
26
|
-
id: "can-play-action-card",
|
|
27
|
-
errorCode: "CARD_NOT_PLAYABLE",
|
|
28
|
-
validate: ({ state }) => validateCanPlayActionCard(state),
|
|
29
|
-
},
|
|
30
|
-
],
|
|
31
|
-
reduce({ state, input, accept, ops }) {
|
|
32
|
-
return accept(
|
|
33
|
-
pipe(
|
|
34
|
-
state,
|
|
35
|
-
ops.moveCardFromPlayerZoneToSharedZone({
|
|
36
|
-
playerId: input.playerId,
|
|
37
|
-
fromZoneId: zones.actionHand,
|
|
38
|
-
toZoneId: zones.playedCards,
|
|
39
|
-
cardId: input.params.cardId,
|
|
40
|
-
playedBy: input.playerId,
|
|
41
|
-
}),
|
|
42
|
-
ops.patchPublicState({ selectedSpaceId: input.params.selectedSpaceId }),
|
|
43
|
-
),
|
|
44
|
-
);
|
|
45
|
-
},
|
|
46
|
-
});
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
## How it differs from defineInteraction
|
|
50
|
-
|
|
51
|
-
`defineCardAction` supplies the card-specific contract:
|
|
52
|
-
|
|
53
|
-
| Field | Meaning |
|
|
54
|
-
| --- | --- |
|
|
55
|
-
| `cardType` | Manifest card type that can trigger this action. |
|
|
56
|
-
| `playFrom` | Manifest player zone id the card must be playable from. |
|
|
57
|
-
| `inputs` | Additional params besides the selected card. |
|
|
58
|
-
| `step` / `steps` | Optional phase-step gates, typed from `state.phase.step` when your phase state schema declares a string literal union. |
|
|
59
|
-
| `rules` | Card-specific availability and validation, often shared across a family of cards. |
|
|
60
|
-
| `cost` / `paramsSchema` / `commit` | Same interaction metadata as `defineInteraction`, when the card action needs affordability, cross-field params, or manual draft control. |
|
|
61
|
-
| `reduce` | Receives `input.params.cardId` automatically. |
|
|
62
|
-
|
|
63
|
-
The generated interaction contract treats card actions as card-anchored
|
|
64
|
-
interactions. `Zone` plus `Interaction.CardInput` can show a playable card and
|
|
65
|
-
collect additional inputs without each workspace inventing local card-action
|
|
66
|
-
plumbing.
|
|
67
|
-
|
|
68
|
-
Card actions are always card-anchored interactions. Use `defineInteraction` for
|
|
69
|
-
non-card commands and group them visually in React.
|
|
70
|
-
|
|
71
|
-
## Zone-backed rendering
|
|
72
|
-
|
|
73
|
-
Declare the hand zone once in the phase:
|
|
74
|
-
|
|
75
|
-
```ts
|
|
76
|
-
zones: [zones.actionHand],
|
|
77
|
-
cardActions: {
|
|
78
|
-
playBoost,
|
|
79
|
-
playDrawCards,
|
|
80
|
-
playBuildPath,
|
|
81
|
-
},
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
The reducer projection is keyed by the manifest zone id, such as `action-hand`.
|
|
85
|
-
Import `zones` and `cardTypes` from the generated manifest contract so authoring
|
|
86
|
-
code uses typed handles instead of raw string ids. Cards come from the listed
|
|
87
|
-
manifest player zone; playable descriptors are derived from `cardActions` whose
|
|
88
|
-
`playFrom` matches that zone.
|
|
89
|
-
|
|
90
|
-
## Validation
|
|
91
|
-
|
|
92
|
-
Target validation still runs before authored rules. Use `rules` for
|
|
93
|
-
card-specific business checks: once per turn, bought this turn, enough
|
|
94
|
-
resources, correct phase step, or no pending trade.
|
|
95
|
-
|
|
96
|
-
Move the card in `reduce`. `defineCardAction` makes the card id available; it does not decide whether the card should be discarded, trashed, returned, tucked, or left in play.
|
|
97
|
-
|
|
98
|
-
## When to use defineInteraction instead
|
|
99
|
-
|
|
100
|
-
Use `defineInteraction` when:
|
|
101
|
-
|
|
102
|
-
- the action is not tied to a card instance
|
|
103
|
-
- the player chooses from a board target, form, or panel button first
|
|
104
|
-
- a prompt asks for a response
|
|
105
|
-
- the card is only one optional input among several unrelated choices
|
|
106
|
-
|
|
107
|
-
Use `defineCardAction` when the card is the object being played.
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
# CLI
|
|
2
|
-
|
|
3
|
-
Reference for Dreamboard CLI workflows and commands.
|
|
4
|
-
|
|
5
|
-
Dreamboard CLI manages the authored workspace loop: authenticate, create or
|
|
6
|
-
clone a game, sync authored changes, compile, develop, and test.
|
|
7
|
-
|
|
8
|
-
## What the CLI does
|
|
9
|
-
|
|
10
|
-
Use the CLI for:
|
|
11
|
-
|
|
12
|
-
- authenticating the current machine
|
|
13
|
-
- creating or cloning game workspaces
|
|
14
|
-
- syncing authored files to the remote authoring head
|
|
15
|
-
- compiling the current authored head
|
|
16
|
-
- inspecting local versus remote state
|
|
17
|
-
- pulling remote authored changes into the workspace
|
|
18
|
-
- starting a local dev server to play the game in the browser
|
|
19
|
-
- generating and running reducer-native tests
|
|
20
|
-
|
|
21
|
-
## Install targets
|
|
22
|
-
|
|
23
|
-
Use the published package for normal game work:
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
npm install -g dreamboard
|
|
27
|
-
dreamboard login
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
## Command flow
|
|
31
|
-
|
|
32
|
-
Use this sequence for the normal authored loop:
|
|
33
|
-
|
|
34
|
-
1. `dreamboard login`
|
|
35
|
-
2. `dreamboard new ...` or `dreamboard clone ...`
|
|
36
|
-
3. edit `rule.md`, `manifest.ts`, and authored source files
|
|
37
|
-
4. `dreamboard sync`
|
|
38
|
-
5. `dreamboard compile`
|
|
39
|
-
6. `dreamboard dev` (play in browser)
|
|
40
|
-
7. `dreamboard test generate` (after reducer/manifest shape changes)
|
|
41
|
-
8. `dreamboard test run` (automated tests)
|
|
42
|
-
|
|
43
|
-
When the remote authored head moves first, run `dreamboard pull` before the
|
|
44
|
-
next sync or compile. Use `dreamboard status` to decide whether the workspace is
|
|
45
|
-
ahead, behind, or diverged.
|
|
46
|
-
|
|
47
|
-
## Workspace commands
|
|
48
|
-
|
|
49
|
-
| Command | Use it for |
|
|
50
|
-
| --- | --- |
|
|
51
|
-
| `dreamboard login` | Open browser login and store a refreshable session |
|
|
52
|
-
| `dreamboard new <slug> --description "..."` | Create a new game and scaffold a local workspace |
|
|
53
|
-
| `dreamboard clone <slug>` | Clone an existing game into a new local workspace |
|
|
54
|
-
| `dreamboard config show` | Inspect resolved CLI, backend, compiler, and workspace config |
|
|
55
|
-
| `dreamboard sync` | Upload authored changes and refresh scaffolded files |
|
|
56
|
-
| `dreamboard compile` | Compile the current remote authored head |
|
|
57
|
-
| `dreamboard status` | Compare local authored and compile state with remote |
|
|
58
|
-
| `dreamboard pull` | Reconcile remote authored changes into the workspace |
|
|
59
|
-
| `dreamboard join --player <id>` | Join a playable session as a bot or local player helper |
|
|
60
|
-
|
|
61
|
-
```bash
|
|
62
|
-
dreamboard new race-to-ten --description "A tiny scoring game"
|
|
63
|
-
dreamboard sync
|
|
64
|
-
dreamboard compile
|
|
65
|
-
dreamboard status --json
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
`dreamboard sync` also reconciles local workspace dependencies when `package.json`
|
|
69
|
-
changes, so users should not run a separate install command as part of the
|
|
70
|
-
normal authored workflow.
|
|
71
|
-
|
|
72
|
-
The CLI materializes `.dreamboard/generated/manifest.json` from `manifest.ts`
|
|
73
|
-
for local tooling. Treat that file as generated output, not authored source.
|
|
74
|
-
|
|
75
|
-
## Authentication storage
|
|
76
|
-
|
|
77
|
-
`dreamboard login` stores a refreshable session on the current machine.
|
|
78
|
-
By default the CLI writes credentials to the operating system keychain
|
|
79
|
-
(Keychain on macOS, Credential Vault on Windows, Secret Service on
|
|
80
|
-
Linux), so the refresh token is encrypted at rest and is not readable
|
|
81
|
-
by other tools that scan the home directory.
|
|
82
|
-
|
|
83
|
-
If the native keyring is unavailable (for example in a container
|
|
84
|
-
without libsecret) the CLI falls back to `~/.dreamboard/auth.json`
|
|
85
|
-
owned by the current user. You can pin a specific backend with:
|
|
86
|
-
|
|
87
|
-
```bash
|
|
88
|
-
# Force the file-based backend even when the OS keychain is available.
|
|
89
|
-
export DREAMBOARD_CREDENTIAL_BACKEND=file
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
Run `dreamboard config show` to inspect which API endpoint and workspace
|
|
93
|
-
configuration the CLI resolved.
|
|
94
|
-
|
|
95
|
-
Credentials are only rewritten after a successful token rotation.
|
|
96
|
-
Transient errors during `dreamboard sync` or `dreamboard compile` no
|
|
97
|
-
longer clear the stored refresh token, so a network hiccup will not
|
|
98
|
-
force you to log in again. If you ever need to start fresh, run
|
|
99
|
-
`dreamboard logout` or `dreamboard auth clear` to wipe the session
|
|
100
|
-
explicitly.
|
|
101
|
-
|
|
102
|
-
## Dev server
|
|
103
|
-
|
|
104
|
-
Start a local server to play the compiled game in the browser:
|
|
105
|
-
|
|
106
|
-
```bash
|
|
107
|
-
dreamboard dev
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
## Test commands
|
|
111
|
-
|
|
112
|
-
Use the scaffolded reducer-native test workspace for repeatable game assertions.
|
|
113
|
-
|
|
114
|
-
```bash
|
|
115
|
-
dreamboard test generate
|
|
116
|
-
dreamboard test run
|
|
117
|
-
dreamboard test run --scenario test/scenarios/player-two-wins.scenario.ts
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
See [Testing](./testing.md) for the scenario and base-file format.
|