@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.
Files changed (114) hide show
  1. package/README.md +179 -22
  2. package/dist/{chunk-C6UAT6EH.js → chunk-N7XPNNUI.js} +9 -12
  3. package/dist/chunk-N7XPNNUI.js.map +1 -0
  4. package/dist/chunk-SEGVTWSK.js +44 -0
  5. package/dist/{chunk-RS7UXJZV.js → chunk-TAQKH67O.js} +21300 -35881
  6. package/dist/chunk-TAQKH67O.js.map +1 -0
  7. package/dist/{global-config-AGFBDFYD.js → global-config-S4ZIPECE.js} +3 -3
  8. package/dist/index.js +415 -37
  9. package/dist/index.js.map +1 -1
  10. package/dist/internal.js +3 -4
  11. package/dist/{agent-verifier/keychain-backend-TNOPQV3Z.mjs → keychain-backend-HDF4TZDL.js} +2 -1
  12. package/dist/{agent-verifier/prompt-3BAINGAQ.mjs → prompt-NDV3AE5L.js} +2 -1
  13. package/package.json +6 -6
  14. package/skills/dreamboard/references/building-your-first-game.md +510 -0
  15. package/skills/dreamboard/references/cli.md +104 -0
  16. package/skills/dreamboard/references/game-interface.md +548 -0
  17. package/skills/dreamboard/references/manifest-authoring.md +597 -0
  18. package/skills/dreamboard/references/quickstart.md +66 -0
  19. package/skills/dreamboard/references/reducer.md +864 -0
  20. package/skills/dreamboard/references/rule-authoring.md +147 -0
  21. package/skills/dreamboard/references/testing.md +249 -0
  22. package/skills/dreamboard/scripts/events-extract.mjs +218 -0
  23. package/dist/agent-verifier/agent-workspace-verifier.mjs +0 -227
  24. package/dist/agent-verifier/chunk-2E5P5NWG.mjs +0 -835
  25. package/dist/agent-verifier/chunk-2GBBP27W.mjs +0 -301
  26. package/dist/agent-verifier/chunk-2QMNAVV4.mjs +0 -14522
  27. package/dist/agent-verifier/chunk-2SZHMP6F.mjs +0 -264
  28. package/dist/agent-verifier/chunk-4WD3YU2E.mjs +0 -166
  29. package/dist/agent-verifier/chunk-54TAYXUD.mjs +0 -12
  30. package/dist/agent-verifier/chunk-6A5HRJMQ.mjs +0 -3174
  31. package/dist/agent-verifier/chunk-6UUJEYDV.mjs +0 -213
  32. package/dist/agent-verifier/chunk-7653FPGJ.mjs +0 -381
  33. package/dist/agent-verifier/chunk-7E65UQLY.mjs +0 -38
  34. package/dist/agent-verifier/chunk-BVVNBJM4.mjs +0 -221
  35. package/dist/agent-verifier/chunk-CEDUHGNH.mjs +0 -74
  36. package/dist/agent-verifier/chunk-CEQ2VJWN.mjs +0 -149
  37. package/dist/agent-verifier/chunk-CFU5EWIC.mjs +0 -69
  38. package/dist/agent-verifier/chunk-CJEEA6NJ.mjs +0 -730
  39. package/dist/agent-verifier/chunk-EIQWDQWJ.mjs +0 -186
  40. package/dist/agent-verifier/chunk-EOQIV6PS.mjs +0 -649
  41. package/dist/agent-verifier/chunk-HBNDKQT5.mjs +0 -8381
  42. package/dist/agent-verifier/chunk-HJFQDSTU.mjs +0 -225
  43. package/dist/agent-verifier/chunk-JH22JNYD.mjs +0 -1681
  44. package/dist/agent-verifier/chunk-LI3ZR3BI.mjs +0 -41
  45. package/dist/agent-verifier/chunk-LM3OZLZG.mjs +0 -48
  46. package/dist/agent-verifier/chunk-MINCYHXN.mjs +0 -106
  47. package/dist/agent-verifier/chunk-MRCUP5SW.mjs +0 -128
  48. package/dist/agent-verifier/chunk-RBDDIIPM.mjs +0 -19
  49. package/dist/agent-verifier/chunk-SHUMAVAP.mjs +0 -59
  50. package/dist/agent-verifier/chunk-SYPLYRGB.mjs +0 -2812
  51. package/dist/agent-verifier/chunk-U6OJN7XS.mjs +0 -8092
  52. package/dist/agent-verifier/chunk-VYJTHSYR.mjs +0 -44
  53. package/dist/agent-verifier/chunk-XYDL7GY6.mjs +0 -10
  54. package/dist/agent-verifier/compile-5QSPIOUT.mjs +0 -313
  55. package/dist/agent-verifier/global-config-WX3ZZIVU.mjs +0 -17
  56. package/dist/agent-verifier/local-files-MTPLP62S.mjs +0 -46
  57. package/dist/agent-verifier/local-typecheck-QFYYAZOK.mjs +0 -9
  58. package/dist/agent-verifier/materialize-workspace-FKALAE2T.mjs +0 -90
  59. package/dist/agent-verifier/project-state-7GR6BQTQ.mjs +0 -32
  60. package/dist/agent-verifier/reducer-bundle-preflight-C73LEXI2.mjs +0 -23
  61. package/dist/agent-verifier/reducer-contract-preflight-22X7DSZW.mjs +0 -10
  62. package/dist/agent-verifier/reducer-native-test-harness-GMWBUISX.mjs +0 -53
  63. package/dist/agent-verifier/static-scaffold-AJMZZQWS.mjs +0 -28
  64. package/dist/agent-verifier/sync-3DUQH32H.mjs +0 -594
  65. package/dist/agent-verifier/test-P4U5INTD.mjs +0 -356
  66. package/dist/agent-verifier/testing-5K2BJYF2.mjs +0 -674
  67. package/dist/agent-verifier/workspace-codegen-JDZJRSDV.mjs +0 -11
  68. package/dist/agent-verifier/workspace-dependencies-HZ6VVS4G.mjs +0 -14
  69. package/dist/chunk-2H7UOFLK.js +0 -11
  70. package/dist/chunk-7FOO4AJI.js +0 -50
  71. package/dist/chunk-7FOO4AJI.js.map +0 -1
  72. package/dist/chunk-C6UAT6EH.js.map +0 -1
  73. package/dist/chunk-RS7UXJZV.js.map +0 -1
  74. package/dist/internal.d.ts +0 -311
  75. package/dist/keychain-backend-JHTXAKWC.js +0 -135
  76. package/dist/prompt-GMZABCJC.js +0 -756
  77. package/dist/runtime-packages/ui-host-runtime/src/actor-principal.ts +0 -71
  78. package/dist/runtime-packages/ui-host-runtime/src/browser-interaction.ts +0 -139
  79. package/dist/runtime-packages/ui-host-runtime/src/components/host-controls.tsx +0 -374
  80. package/dist/runtime-packages/ui-host-runtime/src/components/host-feedback-toaster.tsx +0 -266
  81. package/dist/runtime-packages/ui-host-runtime/src/components/host-feedback.tsx +0 -212
  82. package/dist/runtime-packages/ui-host-runtime/src/components/host-primitives.tsx +0 -271
  83. package/dist/runtime-packages/ui-host-runtime/src/components/host-session-metadata.tsx +0 -135
  84. package/dist/runtime-packages/ui-host-runtime/src/components/index.ts +0 -5
  85. package/dist/runtime-packages/ui-host-runtime/src/components/perf-overlay.tsx +0 -194
  86. package/dist/runtime-packages/ui-host-runtime/src/gameplay-authority-transport.ts +0 -626
  87. package/dist/runtime-packages/ui-host-runtime/src/host-controls.tsx +0 -1
  88. package/dist/runtime-packages/ui-host-runtime/src/host-feedback.tsx +0 -1
  89. package/dist/runtime-packages/ui-host-runtime/src/host-session-transport.ts +0 -294
  90. package/dist/runtime-packages/ui-host-runtime/src/index.ts +0 -3
  91. package/dist/runtime-packages/ui-host-runtime/src/logger.ts +0 -11
  92. package/dist/runtime-packages/ui-host-runtime/src/perf.ts +0 -324
  93. package/dist/runtime-packages/ui-host-runtime/src/plugin-bridge.ts +0 -195
  94. package/dist/runtime-packages/ui-host-runtime/src/plugin-health-check.ts +0 -138
  95. package/dist/runtime-packages/ui-host-runtime/src/plugin-messages.ts +0 -159
  96. package/dist/runtime-packages/ui-host-runtime/src/plugin-session-gateway.ts +0 -551
  97. package/dist/runtime-packages/ui-host-runtime/src/runtime/index.ts +0 -13
  98. package/dist/runtime-packages/ui-host-runtime/src/screenshot/projection-to-snapshot.ts +0 -122
  99. package/dist/runtime-packages/ui-host-runtime/src/screenshot/static-store-api.ts +0 -26
  100. package/dist/runtime-packages/ui-host-runtime/src/session-ingress-controller.ts +0 -583
  101. package/dist/runtime-packages/ui-host-runtime/src/session-ingress.ts +0 -219
  102. package/dist/runtime-packages/ui-host-runtime/src/session-live-runtime.ts +0 -117
  103. package/dist/runtime-packages/ui-host-runtime/src/session-model.ts +0 -431
  104. package/dist/runtime-packages/ui-host-runtime/src/session-projection.ts +0 -211
  105. package/dist/runtime-packages/ui-host-runtime/src/session-recovery.ts +0 -80
  106. package/dist/runtime-packages/ui-host-runtime/src/session-state-reducer.ts +0 -1034
  107. package/dist/runtime-packages/ui-host-runtime/src/sse-manager.ts +0 -416
  108. package/dist/runtime-packages/ui-host-runtime/src/unified-session-store.ts +0 -184
  109. package/dist/testing-KLSV6CPJ.js +0 -674
  110. package/dist/testing-KLSV6CPJ.js.map +0 -1
  111. /package/dist/{chunk-2H7UOFLK.js.map → chunk-SEGVTWSK.js.map} +0 -0
  112. /package/dist/{global-config-AGFBDFYD.js.map → global-config-S4ZIPECE.js.map} +0 -0
  113. /package/dist/{keychain-backend-JHTXAKWC.js.map → keychain-backend-HDF4TZDL.js.map} +0 -0
  114. /package/dist/{prompt-GMZABCJC.js.map → prompt-NDV3AE5L.js.map} +0 -0
@@ -1,219 +0,0 @@
1
- import type {
2
- HostSessionEvent,
3
- HostSessionSnapshot,
4
- } from "@dreamboard-games/api-client";
5
- import type {
6
- GameplayPerspective,
7
- GameplayViewport,
8
- SessionContext,
9
- } from "./session-model.js";
10
- import {
11
- contextFromHostEventContext,
12
- contextFromHostSnapshot,
13
- gameplayViewportFromSnapshot,
14
- } from "./session-model.js";
15
-
16
- type WireSessionIngressSnapshot = HostSessionSnapshot;
17
- type WireSessionIngressEvent = HostSessionEvent;
18
- interface WireSessionIngressActionSubmitResponse {
19
- success: boolean;
20
- version: number;
21
- actionSetVersion: string;
22
- accepted?: boolean | null;
23
- durabilityStatus?: "COMMITTED" | null;
24
- update?: WireSessionIngressEvent | null;
25
- errorCode?: string | null;
26
- message?: string | null;
27
- clientActionId?: string | null;
28
- }
29
-
30
- export type HostSessionWireSnapshot = WireSessionIngressSnapshot;
31
- export type HostSessionWireEvent = WireSessionIngressEvent;
32
- export type HostActionSubmitWireResponse =
33
- WireSessionIngressActionSubmitResponse;
34
-
35
- export type NormalizedSessionSnapshot =
36
- | {
37
- type: "lobby";
38
- context: SessionContext;
39
- gameplay: null;
40
- preferredPlayerId: string | null;
41
- }
42
- | {
43
- type: "gameplay";
44
- context: SessionContext;
45
- perspective: GameplayPerspective;
46
- gameplay: GameplayViewport;
47
- }
48
- | {
49
- type: "ended";
50
- context: SessionContext;
51
- gameplay: null;
52
- preferredPlayerId: string | null;
53
- };
54
-
55
- export type NormalizedSessionEvent =
56
- | {
57
- type: "session.snapshot";
58
- snapshot: NormalizedSessionSnapshot;
59
- context: SessionContext;
60
- gameplay: GameplayViewport | null;
61
- }
62
- | {
63
- type: "session.lobbyUpdated";
64
- context: SessionContext | null;
65
- gameplay: GameplayViewport | null;
66
- }
67
- | {
68
- type: "session.gameplayUpdated";
69
- context: SessionContext | null;
70
- gameplay: GameplayViewport;
71
- perspective: GameplayPerspective;
72
- }
73
- | {
74
- type: "session.historyUpdated";
75
- context: SessionContext | null;
76
- gameplay: GameplayViewport | null;
77
- }
78
- | {
79
- type: "session.ended";
80
- context: SessionContext | null;
81
- gameplay: GameplayViewport | null;
82
- }
83
- | {
84
- type: "session.error";
85
- message: string;
86
- code?: string;
87
- context: SessionContext | null;
88
- gameplay: GameplayViewport | null;
89
- };
90
-
91
- export type NormalizedSubmitResponse = NormalizedSessionEvent | null;
92
-
93
- export function normalizeSnapshot(
94
- snapshot: HostSessionWireSnapshot,
95
- options: {
96
- userId: string | null;
97
- previousGameplay?: GameplayViewport | null;
98
- },
99
- ): NormalizedSessionSnapshot {
100
- const context = contextFromHostSnapshot(snapshot, options.userId);
101
- if (snapshot.type !== "gameplay") {
102
- return {
103
- type: snapshot.type,
104
- context,
105
- gameplay: null,
106
- preferredPlayerId: null,
107
- };
108
- }
109
- return {
110
- type: "gameplay",
111
- context,
112
- perspective: { playerId: snapshot.gameplay.perspectivePlayerId },
113
- gameplay: gameplayViewportFromSnapshot(
114
- snapshot.gameplay,
115
- options.previousGameplay,
116
- ),
117
- };
118
- }
119
-
120
- export function normalizeEvent(
121
- event: HostSessionWireEvent,
122
- options: {
123
- currentContext: SessionContext | null;
124
- currentGameplay: GameplayViewport | null;
125
- userId: string | null;
126
- },
127
- ): NormalizedSessionEvent {
128
- const context = options.currentContext;
129
- switch (event.type) {
130
- case "session.snapshot": {
131
- const normalized = normalizeSnapshot(event.snapshot, {
132
- userId: options.userId,
133
- previousGameplay: options.currentGameplay,
134
- });
135
- return {
136
- type: "session.snapshot",
137
- snapshot: normalized,
138
- context: normalized.context,
139
- gameplay: normalized.gameplay,
140
- };
141
- }
142
- case "session.lobbyUpdated":
143
- return {
144
- type: "session.lobbyUpdated",
145
- context: context
146
- ? contextFromHostEventContext(
147
- { ...context, userId: options.userId },
148
- event.context,
149
- event.lobby,
150
- )
151
- : null,
152
- gameplay: options.currentGameplay,
153
- };
154
- case "session.gameplayUpdated":
155
- return {
156
- type: "session.gameplayUpdated",
157
- context: context
158
- ? contextFromHostEventContext(
159
- { ...context, userId: options.userId },
160
- event.context,
161
- )
162
- : null,
163
- gameplay: gameplayViewportFromSnapshot(
164
- event.gameplay,
165
- options.currentGameplay,
166
- ),
167
- perspective: { playerId: event.gameplay.perspectivePlayerId },
168
- };
169
- case "session.historyUpdated":
170
- return {
171
- type: "session.historyUpdated",
172
- context: context
173
- ? contextFromHostEventContext(
174
- { ...context, userId: options.userId },
175
- event.context,
176
- )
177
- : null,
178
- gameplay: options.currentGameplay,
179
- };
180
- case "session.ended":
181
- return {
182
- type: "session.ended",
183
- context: context
184
- ? contextFromHostEventContext(
185
- { ...context, userId: options.userId },
186
- event.context,
187
- event.lobby,
188
- )
189
- : null,
190
- gameplay: options.currentGameplay,
191
- };
192
- case "session.error":
193
- return {
194
- type: "session.error",
195
- message: event.message,
196
- code: event.code,
197
- context,
198
- gameplay: options.currentGameplay,
199
- };
200
- }
201
- }
202
-
203
- export function normalizeSubmitResponse(
204
- response: HostActionSubmitWireResponse,
205
- options: {
206
- currentContext: SessionContext | null;
207
- currentGameplay: GameplayViewport | null;
208
- userId: string | null;
209
- },
210
- ): NormalizedSubmitResponse {
211
- if (!response.accepted || !response.update) {
212
- return null;
213
- }
214
- return normalizeEvent(response.update, {
215
- currentContext: options.currentContext,
216
- currentGameplay: options.currentGameplay,
217
- userId: options.userId,
218
- });
219
- }
@@ -1,117 +0,0 @@
1
- import type { HostSessionWireEvent } from "./session-ingress.js";
2
- import type { SSEManager, SSERecoveryEvent } from "./sse-manager.js";
3
-
4
- export interface SSEManagerLike {
5
- connect: (
6
- sessionId: string,
7
- options: {
8
- source?: string;
9
- playerId?: string;
10
- },
11
- ) => Promise<void> | void;
12
- disconnect: () => void;
13
- on: SSEManager["on"];
14
- onAnyMessage: SSEManager["onAnyMessage"];
15
- }
16
-
17
- export interface SessionLiveRuntime {
18
- connectSession: (
19
- sessionId: string,
20
- options: { source?: string; playerId?: string },
21
- ) => void;
22
- reconnectGameplay: (
23
- sessionId: string,
24
- playerId: string,
25
- source: string,
26
- ) => void;
27
- requestGameplayResync: (
28
- sessionId: string,
29
- playerId: string,
30
- source: string,
31
- ) => void;
32
- closeStreams: () => void;
33
- getConnectedSessionId: () => string | null;
34
- }
35
-
36
- export function createSessionLiveRuntime(options: {
37
- createSseManager: () => SSEManagerLike;
38
- onConnectionChange: (
39
- channel: "lobby" | "gameplay",
40
- connected: boolean,
41
- ) => void;
42
- onConnectionError: (error: unknown) => void;
43
- onConnectionRecovering: (details: SSERecoveryEvent) => void;
44
- onLiveMessage: (message: HostSessionWireEvent) => void;
45
- }): SessionLiveRuntime {
46
- let connectedSessionId: string | null = null;
47
- let sessionManager: SSEManagerLike | null = null;
48
- let unsubscribeSession: (() => void) | null = null;
49
-
50
- const attachConnectionHandlers = (
51
- manager: SSEManagerLike,
52
- channel: "lobby" | "gameplay",
53
- ) => {
54
- manager.on("connected", () => options.onConnectionChange(channel, true));
55
- manager.on("disconnected", () =>
56
- options.onConnectionChange(channel, false),
57
- );
58
- manager.on("error", (error) => {
59
- options.onConnectionChange(channel, false);
60
- options.onConnectionError(error);
61
- });
62
- manager.on("recovering", (details) => {
63
- options.onConnectionChange(channel, false);
64
- options.onConnectionRecovering(details);
65
- });
66
- };
67
-
68
- const closeStreams = () => {
69
- unsubscribeSession?.();
70
- unsubscribeSession = null;
71
- sessionManager?.disconnect();
72
- sessionManager = null;
73
- connectedSessionId = null;
74
- options.onConnectionChange("lobby", false);
75
- options.onConnectionChange("gameplay", false);
76
- };
77
-
78
- const openSession = (
79
- sessionId: string,
80
- playerId: string | undefined,
81
- source: string,
82
- ) => {
83
- closeStreams();
84
- connectedSessionId = sessionId;
85
- sessionManager = options.createSseManager();
86
- attachConnectionHandlers(sessionManager, playerId ? "gameplay" : "lobby");
87
- unsubscribeSession = sessionManager.onAnyMessage(options.onLiveMessage);
88
- void sessionManager.connect(sessionId, {
89
- source,
90
- playerId,
91
- });
92
- };
93
-
94
- return {
95
- connectSession: (sessionId, connectOptions) => {
96
- openSession(
97
- sessionId,
98
- connectOptions.playerId,
99
- connectOptions.source ?? "connect-session",
100
- );
101
- },
102
- reconnectGameplay: (sessionId, playerId, source) => {
103
- openSession(sessionId, playerId, source);
104
- },
105
- requestGameplayResync: (sessionId, playerId, source) => {
106
- if (!sessionManager) {
107
- return;
108
- }
109
- void sessionManager.connect(sessionId, {
110
- source,
111
- playerId,
112
- });
113
- },
114
- closeStreams,
115
- getConnectedSessionId: () => connectedSessionId,
116
- };
117
- }