@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,227 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- assertCompilerPortableDependencies,
4
- consola,
5
- resolveProjectContext
6
- } from "./chunk-JH22JNYD.mjs";
7
- import "./chunk-HJFQDSTU.mjs";
8
- import "./chunk-4WD3YU2E.mjs";
9
- import "./chunk-2E5P5NWG.mjs";
10
- import "./chunk-MINCYHXN.mjs";
11
- import "./chunk-LM3OZLZG.mjs";
12
- import "./chunk-SHUMAVAP.mjs";
13
- import "./chunk-XYDL7GY6.mjs";
14
-
15
- // src/agent-workspace-verifier.ts
16
- import { readFile } from "fs/promises";
17
- main().catch((error) => {
18
- console.error(error instanceof Error ? error.message : String(error));
19
- process.exit(1);
20
- });
21
- async function main() {
22
- const [command, ...args] = process.argv.slice(2);
23
- if (command === "--help" || command === "help") {
24
- printHelp();
25
- return;
26
- }
27
- if (command === "materialize-prepared-workspace") {
28
- if (args.includes("--help")) {
29
- printHelp();
30
- return;
31
- }
32
- await materializePreparedWorkspace(args);
33
- return;
34
- }
35
- await verifyAgentWorkspace(command ?? "verify", args);
36
- }
37
- function printHelp() {
38
- console.log(`Dreamboard agent workspace verifier
39
-
40
- Usage:
41
- agent-workspace-verifier materialize-prepared-workspace --input <path>
42
- agent-workspace-verifier preflight [--env local|dev|prod]
43
- agent-workspace-verifier verify [--env local|dev|prod]
44
- agent-workspace-verifier fin [--env local|dev|prod]
45
- `);
46
- }
47
- async function materializePreparedWorkspace(args) {
48
- const inputPath = readRequiredOption(args, "--input");
49
- const input = JSON.parse(await readFile(inputPath, "utf8"));
50
- const { materializeWorkspaceProject } = await import("./materialize-workspace-FKALAE2T.mjs");
51
- await materializeWorkspaceProject({
52
- ...input,
53
- agentManaged: true,
54
- workspacePrepared: true,
55
- allowCreateGame: false,
56
- installDependencies: false
57
- });
58
- consola.success(`Prepared workspace in ${input.targetDir}`);
59
- }
60
- async function verifyAgentWorkspace(rawMode, args) {
61
- const requestedMode = parseVerificationMode(rawMode);
62
- const parsedFlags = parseConfigArgs(args);
63
- const { projectRoot, projectConfig, config } = await resolveProjectContext(parsedFlags);
64
- await assertCompilerPortableDependencies({ projectRoot, projectConfig });
65
- if (requestedMode === "preflight") {
66
- consola.success("Agent workspace preflight passed.");
67
- return;
68
- }
69
- if (process.env.DREAMBOARD_AGENT_FINAL_SYNC_VERIFY === "1") {
70
- await runFullBackendConnectedVerification(parsedFlags);
71
- return;
72
- }
73
- if (requestedMode === "cloud-local" || requestedMode === "verify" || requestedMode === "fin") {
74
- await runCloudLocalVerification(projectRoot, projectConfig, config);
75
- return;
76
- }
77
- throw new Error(
78
- "Agent workspaces now run cloud-local verification directly. Use `fin` only through the generated wrapper."
79
- );
80
- }
81
- async function runFullBackendConnectedVerification(parsedFlags) {
82
- const [{ default: cmdSync }, { default: cmdCompile }, { default: cmdTest }] = await Promise.all([
83
- import("./sync-3DUQH32H.mjs"),
84
- import("./compile-5QSPIOUT.mjs"),
85
- import("./test-P4U5INTD.mjs")
86
- ]);
87
- await runCommandDefinition(cmdSync, { ...parsedFlags, force: true });
88
- await runCommandDefinition(cmdCompile, parsedFlags);
89
- await runCommandDefinition(
90
- resolveTestSubCommand(cmdTest, "generate"),
91
- parsedFlags
92
- );
93
- await runCommandDefinition(
94
- resolveTestSubCommand(cmdTest, "run"),
95
- parsedFlags
96
- );
97
- }
98
- async function runCommandDefinition(command, args) {
99
- if (!command.run) {
100
- throw new Error("Verifier command is missing a runnable step.");
101
- }
102
- await command.run({ args, rawArgs: [], cmd: command });
103
- }
104
- function resolveTestSubCommand(cmdTest, name) {
105
- const subCommands = cmdTest.subCommands;
106
- const command = subCommands?.[name];
107
- if (!command) {
108
- throw new Error(`Verifier command is missing test ${name}.`);
109
- }
110
- return command;
111
- }
112
- function parseVerificationMode(value) {
113
- if (value === "preflight" || value === "verify" || value === "fin" || value === "cloud-local") {
114
- return value;
115
- }
116
- throw new Error(
117
- `Expected mode to be one of preflight, verify, fin, or cloud-local. Received: ${String(value)}`
118
- );
119
- }
120
- function parseConfigArgs(args) {
121
- const flags = {};
122
- for (let index = 0; index < args.length; index += 1) {
123
- const arg = args[index];
124
- if (arg === "--env") {
125
- const value = args[++index];
126
- if (value === "local" || value === "staging" || value === "prod") {
127
- flags.env = value;
128
- continue;
129
- }
130
- throw new Error(`Invalid --env value: ${String(value)}`);
131
- }
132
- if (arg === "--token") {
133
- flags.token = args[++index];
134
- continue;
135
- }
136
- if (arg === "--skip-install") {
137
- continue;
138
- }
139
- throw new Error(`Unknown verifier argument: ${arg}`);
140
- }
141
- return flags;
142
- }
143
- async function runCloudLocalVerification(projectRoot, projectConfig, config) {
144
- const [
145
- { scaffoldStaticWorkspace },
146
- { loadManifest },
147
- { applyWorkspaceCodegen },
148
- { reconcileWorkspaceDependencies },
149
- { assertReducerContractPreflight },
150
- { getProjectLocalMaintainerRegistry }
151
- ] = await Promise.all([
152
- import("./static-scaffold-AJMZZQWS.mjs"),
153
- import("./local-files-MTPLP62S.mjs"),
154
- import("./workspace-codegen-JDZJRSDV.mjs"),
155
- import("./workspace-dependencies-HZ6VVS4G.mjs"),
156
- import("./reducer-contract-preflight-22X7DSZW.mjs"),
157
- import("./project-state-7GR6BQTQ.mjs")
158
- ]);
159
- consola.start("Refreshing static scaffold...");
160
- await scaffoldStaticWorkspace(projectRoot, "update", {
161
- localMaintainerRegistry: getProjectLocalMaintainerRegistry(projectConfig)
162
- });
163
- consola.start("Applying workspace codegen...");
164
- const manifest = await loadManifest(projectRoot);
165
- await applyWorkspaceCodegen({ projectRoot, manifest });
166
- consola.start("Reconciling workspace dependencies...");
167
- await reconcileWorkspaceDependencies(projectRoot);
168
- consola.start("Validating reducer contract...");
169
- await assertReducerContractPreflight(projectRoot);
170
- const [{ runLocalTypecheck }, { assertReducerBundleSmoke }] = await Promise.all([
171
- import("./local-typecheck-QFYYAZOK.mjs"),
172
- import("./reducer-bundle-preflight-C73LEXI2.mjs")
173
- ]);
174
- consola.start("Running local typecheck...");
175
- const typecheckResult = await runLocalTypecheck(projectRoot);
176
- if (typecheckResult.skipped) {
177
- if (typecheckResult.output) consola.warn(typecheckResult.output);
178
- } else if (!typecheckResult.success) {
179
- if (typecheckResult.output) consola.error(typecheckResult.output);
180
- throw new Error(
181
- "Local typecheck failed. Fix the diagnostics before syncing."
182
- );
183
- }
184
- consola.start("Smoke-testing reducer bundle...");
185
- await assertReducerBundleSmoke({ projectRoot, manifest });
186
- const {
187
- generateReducerNativeArtifacts,
188
- isReducerNativeTestingWorkspace,
189
- runReducerNativeScenarios
190
- } = await import("./reducer-native-test-harness-GMWBUISX.mjs");
191
- if (await isReducerNativeTestingWorkspace(projectRoot)) {
192
- const { bases } = await generateReducerNativeArtifacts({
193
- projectRoot,
194
- gameId: projectConfig.gameId,
195
- compiledResultId: projectConfig.compile?.latestSuccessful?.resultId
196
- });
197
- const summary = await runReducerNativeScenarios({
198
- projectRoot,
199
- projectConfig,
200
- resolvedConfig: config,
201
- runner: "reducer",
202
- gameId: projectConfig.gameId,
203
- compiledResultId: projectConfig.compile?.latestSuccessful?.resultId
204
- });
205
- if (summary.failed > 0) {
206
- const failures = summary.results.filter((result) => !result.success).map(
207
- (result) => result.error ? `FAIL ${result.id}: ${result.error}` : `FAIL ${result.id}`
208
- );
209
- throw new Error(
210
- [
211
- `Reducer-native verification failed: ${summary.failed} failed, ${summary.passed} passed.`,
212
- ...failures
213
- ].join("\n")
214
- );
215
- }
216
- consola.success(`Generated ${bases.length} reducer-native base state(s).`);
217
- }
218
- consola.success("Agent workspace cloud-local verification passed.");
219
- }
220
- function readRequiredOption(args, name) {
221
- const index = args.indexOf(name);
222
- const value = index >= 0 ? args[index + 1] : void 0;
223
- if (!value) {
224
- throw new Error(`${name} is required.`);
225
- }
226
- return value;
227
- }