@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,44 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- importTypeScriptModule
4
- } from "./chunk-CEDUHGNH.mjs";
5
-
6
- // src/services/project/reducer-contract-preflight.ts
7
- import path from "path";
8
- var GAME_CONTRACT_ENTRY_PATH = path.join("app", "game-contract.ts");
9
- function normalizeErrorMessage(error) {
10
- const rawMessage = error instanceof Error ? error.message : String(error ?? "Unknown error");
11
- return rawMessage.split("\n").map((line) => line.trim()).find(Boolean)?.replace(/^Error:\s*/u, "") ?? "Unknown error";
12
- }
13
- function isManifestScopedIdBrandingError(message) {
14
- return message.includes("defineGameContract:") && message.includes("manifest-scoped") && (message.includes("uses a raw z.string()") || message.includes("uses z.array(z.string())"));
15
- }
16
- async function assertReducerContractPreflight(projectRoot) {
17
- const entryPath = path.join(projectRoot, GAME_CONTRACT_ENTRY_PATH);
18
- try {
19
- await importTypeScriptModule(entryPath);
20
- } catch (error) {
21
- const message = normalizeErrorMessage(error);
22
- if (isManifestScopedIdBrandingError(message)) {
23
- throw new Error(
24
- [
25
- `Dreamboard could not validate \`${GAME_CONTRACT_ENTRY_PATH}\` during \`dreamboard sync\`.`,
26
- "This happens because a state field name looks like a manifest-scoped id, but the schema uses a plain string instead of the manifest-backed id schema.",
27
- "Workaround: use `gameContract.schemas.<id>` (or `manifest.ids.<id>`) for manifest ids. If the field is intentionally free-form text, rename it so it does not look like a manifest id field.",
28
- `Original error: ${message}`
29
- ].join(" ")
30
- );
31
- }
32
- throw new Error(
33
- [
34
- `Dreamboard could not validate \`${GAME_CONTRACT_ENTRY_PATH}\` during \`dreamboard sync\`.`,
35
- "Fix the authored reducer contract module so it can be imported locally, then run `dreamboard sync` again.",
36
- `Original error: ${message}`
37
- ].join(" ")
38
- );
39
- }
40
- }
41
-
42
- export {
43
- assertReducerContractPreflight
44
- };
@@ -1,10 +0,0 @@
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
- };
@@ -1,313 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- resolveRemoteProject
4
- } from "./chunk-7E65UQLY.mjs";
5
- import {
6
- CONFIG_FLAG_ARGS,
7
- findProjectCompiledResultsForRevision,
8
- parseCompileCommandArgs,
9
- queueProjectRevisionCompileSdk,
10
- waitForCompiledResultJobSdk
11
- } from "./chunk-EOQIV6PS.mjs";
12
- import {
13
- formatCliError
14
- } from "./chunk-BVVNBJM4.mjs";
15
- import {
16
- getProjectAuthoringState,
17
- getProjectPendingAuthoringSync,
18
- setLatestCompileAttempt
19
- } from "./chunk-MRCUP5SW.mjs";
20
- import {
21
- runLocalTypecheck
22
- } from "./chunk-CEQ2VJWN.mjs";
23
- import {
24
- assertCompilerPortableDependencies,
25
- assertReleaseEnvironmentPortableDependencies,
26
- consola,
27
- resolveProjectContext
28
- } from "./chunk-JH22JNYD.mjs";
29
- import "./chunk-HJFQDSTU.mjs";
30
- import {
31
- getLocalDiff
32
- } from "./chunk-EIQWDQWJ.mjs";
33
- import {
34
- assertCliStaticScaffoldComplete
35
- } from "./chunk-CJEEA6NJ.mjs";
36
- import "./chunk-2GBBP27W.mjs";
37
- import {
38
- updateProjectState
39
- } from "./chunk-4WD3YU2E.mjs";
40
- import "./chunk-SYPLYRGB.mjs";
41
- import "./chunk-2QMNAVV4.mjs";
42
- import "./chunk-6UUJEYDV.mjs";
43
- import "./chunk-2E5P5NWG.mjs";
44
- import "./chunk-MINCYHXN.mjs";
45
- import "./chunk-U6OJN7XS.mjs";
46
- import "./chunk-54TAYXUD.mjs";
47
- import "./chunk-LM3OZLZG.mjs";
48
- import "./chunk-RBDDIIPM.mjs";
49
- import "./chunk-SHUMAVAP.mjs";
50
- import "./chunk-XYDL7GY6.mjs";
51
-
52
- // src/commands/compile.ts
53
- import { defineCommand } from "citty";
54
- function formatDiagnosticsSummary(diagnostics) {
55
- const firstMessage = diagnostics?.find(
56
- (diagnostic) => diagnostic.message
57
- )?.message;
58
- return firstMessage?.trim() || void 0;
59
- }
60
- function formatCompileJobProgressMessage(job) {
61
- const phase = job.phase ? ` [${job.phase}]` : "";
62
- const detail = job.message ? ` ${job.message}` : "";
63
- if (job.status === "PENDING") {
64
- const queue = typeof job.queuePosition === "number" ? ` (queue ${job.queuePosition + 1})` : "";
65
- return `Compile queued${queue}${phase}${detail}`.trim();
66
- }
67
- if (job.status === "RUNNING") {
68
- return `Compile running${phase}${detail}`.trim();
69
- }
70
- if (job.status === "FAILED") {
71
- return `Compile failed${phase}${detail}`.trim();
72
- }
73
- return `Compile ${job.status.toLowerCase()}${phase}${detail}`.trim();
74
- }
75
- function formatFailedCompileJobSummary(job) {
76
- return formatCompileJobProgressMessage({
77
- status: "FAILED",
78
- phase: job.phase,
79
- message: job.errorMessage ?? job.message ?? void 0
80
- });
81
- }
82
- function formatFailedCompileJobWithCompiledResultMessage(options) {
83
- return `${formatFailedCompileJobSummary(options.job)}. The backend created compiled result ${options.compiledResultId}, but the compile job did not complete cleanly. Run 'dreamboard compile' again after fixing the backend/compiler issue.`;
84
- }
85
- function formatRemoteCompileCommandError(options) {
86
- const detail = options.message.trim();
87
- const hasActionableTerminalContext = /^Compile\s+(failed|completed|cancelled|interrupted)\b/i.test(detail);
88
- if (options.jobId) {
89
- if (hasActionableTerminalContext) {
90
- return `Remote compile job ${options.jobId} could not be completed. ${detail}`;
91
- }
92
- return `Remote compile job ${options.jobId} could not be completed. ${detail} Check backend health and try 'dreamboard compile' again.`;
93
- }
94
- return `Remote compile could not be started. ${detail} Check backend health and try 'dreamboard compile' again.`;
95
- }
96
- async function persistFailedCompileAttempt(options) {
97
- const nextProjectConfig = setLatestCompileAttempt(options.projectConfig, {
98
- resultId: void 0,
99
- jobId: options.jobId,
100
- revisionDigest: options.revisionDigest,
101
- authoringStateId: options.authoringStateId ?? options.revisionDigest,
102
- status: "failed",
103
- diagnosticsSummary: options.diagnosticsSummary
104
- });
105
- await updateProjectState(options.projectRoot, nextProjectConfig);
106
- }
107
- var compile_default = defineCommand({
108
- meta: {
109
- name: "compile",
110
- description: "Compile the current remote authoring head"
111
- },
112
- args: {
113
- debug: {
114
- type: "boolean",
115
- description: "Print additional compile progress context",
116
- default: false
117
- },
118
- "skip-local-check": {
119
- type: "boolean",
120
- description: "Skip the best-effort local typecheck before compiling",
121
- default: false
122
- },
123
- ...CONFIG_FLAG_ARGS
124
- },
125
- async run({ args }) {
126
- const parsedArgs = parseCompileCommandArgs(args);
127
- const { projectRoot, projectConfig, config } = await resolveProjectContext(parsedArgs);
128
- let nextProjectConfig = projectConfig;
129
- await assertReleaseEnvironmentPortableDependencies({
130
- projectRoot,
131
- projectConfig: nextProjectConfig,
132
- environment: config.environment
133
- });
134
- await assertCompilerPortableDependencies({
135
- projectRoot,
136
- projectConfig: nextProjectConfig
137
- });
138
- const diff = await getLocalDiff(projectRoot);
139
- await assertCliStaticScaffoldComplete(projectRoot, diff.deleted);
140
- if (diff.modified.length > 0 || diff.added.length > 0 || diff.deleted.length > 0) {
141
- throw new Error(
142
- "Local authored changes are not synced yet. Run 'dreamboard sync' before compiling."
143
- );
144
- }
145
- const remoteProject = await resolveRemoteProject({
146
- projectRoot,
147
- projectConfig: nextProjectConfig,
148
- config
149
- });
150
- nextProjectConfig = remoteProject.projectConfig;
151
- const localAuthoring = getProjectAuthoringState(nextProjectConfig);
152
- const pendingSync = getProjectPendingAuthoringSync(nextProjectConfig);
153
- if (pendingSync) {
154
- if (pendingSync.phase === "authoring_state_created") {
155
- throw new Error(
156
- "Previous sync reached the remote authored head, but local scaffold finalization did not complete. Run 'dreamboard sync' again before compiling."
157
- );
158
- }
159
- throw new Error(
160
- "Previous sync uploaded source changes but did not finish creating the authored head. Run 'dreamboard sync' again before compiling."
161
- );
162
- }
163
- const localRevisionDigest = localAuthoring.revisionDigest ?? nextProjectConfig.remoteHeadDigest;
164
- if (!localRevisionDigest) {
165
- throw new Error(
166
- "This workspace does not know its authored revision yet. Run 'dreamboard sync' first."
167
- );
168
- }
169
- const remoteRevisionDigest = remoteProject.project.head?.revisionDigest;
170
- if (!remoteRevisionDigest) {
171
- throw new Error("Remote has no authored project revision to compile yet.");
172
- }
173
- if (remoteRevisionDigest !== localRevisionDigest) {
174
- throw new Error(
175
- `Remote project head is ${remoteRevisionDigest} but this workspace is based on ${localRevisionDigest}. Run 'dreamboard pull' before compiling.`
176
- );
177
- }
178
- if (!parsedArgs["skip-local-check"]) {
179
- consola.start("Running local typecheck...");
180
- const typecheckResult = await runLocalTypecheck(projectRoot);
181
- if (typecheckResult.skipped) {
182
- if (typecheckResult.output) {
183
- consola.warn(typecheckResult.output);
184
- }
185
- } else if (!typecheckResult.success) {
186
- if (typecheckResult.output) {
187
- consola.error(typecheckResult.output);
188
- }
189
- throw new Error(
190
- "Local typecheck failed. Fix the diagnostics or re-run with --skip-local-check."
191
- );
192
- } else {
193
- consola.success("Local typecheck passed.");
194
- }
195
- }
196
- const existingCompiledResult = (await findProjectCompiledResultsForRevision({
197
- projectId: nextProjectConfig.projectId,
198
- revisionDigest: localRevisionDigest
199
- })).find((result) => result.success);
200
- if (existingCompiledResult) {
201
- nextProjectConfig = setLatestCompileAttempt(nextProjectConfig, {
202
- resultId: existingCompiledResult.id,
203
- jobId: void 0,
204
- revisionDigest: localRevisionDigest,
205
- authoringStateId: existingCompiledResult.authoringStateId ?? localRevisionDigest,
206
- status: "successful",
207
- diagnosticsSummary: void 0
208
- });
209
- await updateProjectState(projectRoot, nextProjectConfig);
210
- consola.success(
211
- `Reusing compiled ${existingCompiledResult.id} for authored state ${existingCompiledResult.authoringStateId}.`
212
- );
213
- return;
214
- }
215
- let compileJobId;
216
- let compileJobStatus;
217
- let compileJobPhase;
218
- let compileJobMessage;
219
- let compileJobErrorMessage;
220
- let compiledResult;
221
- try {
222
- const compileJob = await queueProjectRevisionCompileSdk({
223
- projectId: nextProjectConfig.projectId,
224
- revisionDigest: localRevisionDigest
225
- });
226
- compileJobId = compileJob.jobId;
227
- if (!compileJobId) {
228
- throw new Error("Failed to create compile job: missing jobId.");
229
- }
230
- ({
231
- job: {
232
- status: compileJobStatus,
233
- phase: compileJobPhase,
234
- message: compileJobMessage,
235
- errorMessage: compileJobErrorMessage
236
- },
237
- compiledResult
238
- } = await waitForCompiledResultJobSdk({
239
- projectId: nextProjectConfig.projectId,
240
- jobId: compileJobId,
241
- onProgress: (job) => {
242
- const message = formatCompileJobProgressMessage(job);
243
- if (parsedArgs.debug) {
244
- consola.info(message);
245
- } else {
246
- consola.start(message);
247
- }
248
- }
249
- }));
250
- } catch (error) {
251
- const message = formatCliError(error);
252
- if (compileJobId) {
253
- await persistFailedCompileAttempt({
254
- projectRoot,
255
- projectConfig: nextProjectConfig,
256
- revisionDigest: localRevisionDigest,
257
- authoringStateId: localAuthoring.authoringStateId,
258
- diagnosticsSummary: message,
259
- jobId: compileJobId
260
- });
261
- }
262
- throw new Error(
263
- formatRemoteCompileCommandError({
264
- message,
265
- jobId: compileJobId
266
- })
267
- );
268
- }
269
- const failedJobProducedCompiledResult = compileJobStatus === "FAILED" && compiledResult.success;
270
- const failedJobWithCompiledResultSummary = failedJobProducedCompiledResult ? formatFailedCompileJobSummary({
271
- phase: compileJobPhase,
272
- message: compileJobMessage,
273
- errorMessage: compileJobErrorMessage
274
- }) : void 0;
275
- nextProjectConfig = setLatestCompileAttempt(nextProjectConfig, {
276
- resultId: compiledResult.id,
277
- jobId: compileJobId,
278
- revisionDigest: localRevisionDigest,
279
- authoringStateId: compiledResult.authoringStateId ?? localRevisionDigest,
280
- status: compiledResult.success && !failedJobProducedCompiledResult ? "successful" : "failed",
281
- diagnosticsSummary: failedJobWithCompiledResultSummary ?? formatDiagnosticsSummary(compiledResult.diagnostics)
282
- });
283
- await updateProjectState(projectRoot, nextProjectConfig);
284
- if (failedJobProducedCompiledResult) {
285
- throw new Error(
286
- formatFailedCompileJobWithCompiledResultMessage({
287
- compiledResultId: compiledResult.id,
288
- job: {
289
- phase: compileJobPhase,
290
- message: compileJobMessage,
291
- errorMessage: compileJobErrorMessage
292
- }
293
- })
294
- );
295
- }
296
- if (!compiledResult.success) {
297
- for (const diagnostic of compiledResult.diagnostics ?? []) {
298
- if (diagnostic.message) {
299
- consola.error(diagnostic.message);
300
- }
301
- }
302
- throw new Error(
303
- "Remote compile failed, but your authored state is synced. Fix the diagnostics and run 'dreamboard compile' again."
304
- );
305
- }
306
- consola.success(
307
- `Compiled ${compiledResult.id} for revision ${localRevisionDigest}.`
308
- );
309
- }
310
- });
311
- export {
312
- compile_default as default
313
- };
@@ -1,17 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- getGlobalAuthPath,
4
- getGlobalConfigPath,
5
- loadGlobalConfig,
6
- saveGlobalConfig
7
- } from "./chunk-HJFQDSTU.mjs";
8
- import "./chunk-MINCYHXN.mjs";
9
- import "./chunk-LM3OZLZG.mjs";
10
- import "./chunk-SHUMAVAP.mjs";
11
- import "./chunk-XYDL7GY6.mjs";
12
- export {
13
- getGlobalAuthPath,
14
- getGlobalConfigPath,
15
- loadGlobalConfig,
16
- saveGlobalConfig
17
- };
@@ -1,46 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- collectLocalFiles,
4
- getLocalDiff,
5
- isAllowedGamePath,
6
- isLibraryPath,
7
- loadManifest,
8
- loadRule,
9
- removeExtraneousFiles,
10
- walkDir,
11
- writeManifest,
12
- writeRule,
13
- writeScaffoldFiles,
14
- writeSnapshot,
15
- writeSnapshotFromFiles,
16
- writeSourceFiles
17
- } from "./chunk-EIQWDQWJ.mjs";
18
- import {
19
- computeManifestHash
20
- } from "./chunk-SYPLYRGB.mjs";
21
- import "./chunk-2QMNAVV4.mjs";
22
- import "./chunk-6UUJEYDV.mjs";
23
- import "./chunk-2E5P5NWG.mjs";
24
- import "./chunk-MINCYHXN.mjs";
25
- import "./chunk-U6OJN7XS.mjs";
26
- import "./chunk-54TAYXUD.mjs";
27
- import "./chunk-LM3OZLZG.mjs";
28
- import "./chunk-SHUMAVAP.mjs";
29
- import "./chunk-XYDL7GY6.mjs";
30
- export {
31
- collectLocalFiles,
32
- computeManifestHash,
33
- getLocalDiff,
34
- isAllowedGamePath,
35
- isLibraryPath,
36
- loadManifest,
37
- loadRule,
38
- removeExtraneousFiles,
39
- walkDir,
40
- writeManifest,
41
- writeRule,
42
- writeScaffoldFiles,
43
- writeSnapshot,
44
- writeSnapshotFromFiles,
45
- writeSourceFiles
46
- };
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- runLocalTypecheck
4
- } from "./chunk-CEQ2VJWN.mjs";
5
- import "./chunk-SHUMAVAP.mjs";
6
- import "./chunk-XYDL7GY6.mjs";
7
- export {
8
- runLocalTypecheck
9
- };
@@ -1,90 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- updateProjectAuthoringState,
4
- updateProjectLocalMaintainerRegistry
5
- } from "./chunk-MRCUP5SW.mjs";
6
- import {
7
- writeManifest,
8
- writeRule,
9
- writeSnapshot
10
- } from "./chunk-EIQWDQWJ.mjs";
11
- import {
12
- scaffoldStaticWorkspace
13
- } from "./chunk-CJEEA6NJ.mjs";
14
- import "./chunk-2GBBP27W.mjs";
15
- import {
16
- updateProjectState
17
- } from "./chunk-4WD3YU2E.mjs";
18
- import "./chunk-SYPLYRGB.mjs";
19
- import "./chunk-2QMNAVV4.mjs";
20
- import "./chunk-6UUJEYDV.mjs";
21
- import "./chunk-2E5P5NWG.mjs";
22
- import "./chunk-MINCYHXN.mjs";
23
- import {
24
- applyWorkspaceCodegen
25
- } from "./chunk-CFU5EWIC.mjs";
26
- import "./chunk-U6OJN7XS.mjs";
27
- import "./chunk-54TAYXUD.mjs";
28
- import {
29
- ensureDir
30
- } from "./chunk-LM3OZLZG.mjs";
31
- import {
32
- installWorkspaceDependencies
33
- } from "./chunk-7653FPGJ.mjs";
34
- import "./chunk-RBDDIIPM.mjs";
35
- import "./chunk-SHUMAVAP.mjs";
36
- import "./chunk-XYDL7GY6.mjs";
37
-
38
- // src/services/project/materialize-workspace.ts
39
- import path from "path";
40
- async function materializeWorkspaceProject(input) {
41
- const targetDir = path.resolve(input.targetDir);
42
- await ensureDir(targetDir);
43
- await writeManifest(targetDir, input.manifest);
44
- await writeRule(targetDir, input.ruleText);
45
- await scaffoldStaticWorkspace(targetDir, "new", {
46
- localMaintainerRegistry: input.localMaintainerRegistry
47
- });
48
- await applyWorkspaceCodegen({
49
- projectRoot: targetDir,
50
- manifest: input.manifest
51
- });
52
- if (input.installDependencies ?? true) {
53
- await installWorkspaceDependencies(targetDir);
54
- }
55
- const authoringConfig = input.ruleId && input.manifestId && input.manifestContentHash ? updateProjectAuthoringState(baseProjectConfig(input), {
56
- ruleId: input.ruleId,
57
- manifestId: input.manifestId,
58
- manifestContentHash: input.manifestContentHash
59
- }) : baseProjectConfig(input);
60
- const projectConfig = updateProjectLocalMaintainerRegistry(
61
- authoringConfig,
62
- input.localMaintainerRegistry ?? void 0
63
- );
64
- await updateProjectState(targetDir, projectConfig);
65
- await writeSnapshot(targetDir);
66
- return projectConfig;
67
- }
68
- function baseProjectConfig(input) {
69
- return {
70
- schemaVersion: 2,
71
- projectId: input.projectId ?? input.gameId,
72
- gameId: input.gameId,
73
- deploymentId: input.deploymentId ?? "legacy",
74
- ownerScopeId: input.ownerScopeId ?? "default",
75
- bindingKey: input.bindingKey,
76
- remoteHeadDigest: input.remoteHeadDigest,
77
- slug: input.slug,
78
- jobId: input.jobId,
79
- agentManaged: input.agentManaged,
80
- workspacePrepared: input.workspacePrepared,
81
- allowCreateGame: input.allowCreateGame,
82
- apiBaseUrl: input.apiBaseUrl,
83
- webBaseUrl: input.webBaseUrl,
84
- packageManifest: input.packageManifest,
85
- environmentManifest: input.environmentManifest
86
- };
87
- }
88
- export {
89
- materializeWorkspaceProject
90
- };
@@ -1,32 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- clearProjectCompileState,
4
- clearProjectPendingAuthoringSync,
5
- finalizeProjectPendingAuthoringSync,
6
- getProjectAuthoringState,
7
- getProjectCompileState,
8
- getProjectLocalMaintainerRegistry,
9
- getProjectPendingAuthoringSync,
10
- sanitizeProjectLocalMaintainerRegistry,
11
- setLatestCompileAttempt,
12
- setProjectPendingAuthoringSync,
13
- updateProjectAuthoringState,
14
- updateProjectCompileState,
15
- updateProjectLocalMaintainerRegistry
16
- } from "./chunk-MRCUP5SW.mjs";
17
- import "./chunk-XYDL7GY6.mjs";
18
- export {
19
- clearProjectCompileState,
20
- clearProjectPendingAuthoringSync,
21
- finalizeProjectPendingAuthoringSync,
22
- getProjectAuthoringState,
23
- getProjectCompileState,
24
- getProjectLocalMaintainerRegistry,
25
- getProjectPendingAuthoringSync,
26
- sanitizeProjectLocalMaintainerRegistry,
27
- setLatestCompileAttempt,
28
- setProjectPendingAuthoringSync,
29
- updateProjectAuthoringState,
30
- updateProjectCompileState,
31
- updateProjectLocalMaintainerRegistry
32
- };
@@ -1,23 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- assertReducerBundleSmoke,
4
- assertViewPerPlayerSeatsValid,
5
- buildScenarios,
6
- driveReducerBundleThroughScenarios,
7
- runReducerBundleSmoke
8
- } from "./chunk-2SZHMP6F.mjs";
9
- import "./chunk-HBNDKQT5.mjs";
10
- import "./chunk-CEDUHGNH.mjs";
11
- import "./chunk-LI3ZR3BI.mjs";
12
- import "./chunk-2QMNAVV4.mjs";
13
- import "./chunk-6UUJEYDV.mjs";
14
- import "./chunk-U6OJN7XS.mjs";
15
- import "./chunk-54TAYXUD.mjs";
16
- import "./chunk-XYDL7GY6.mjs";
17
- export {
18
- assertReducerBundleSmoke,
19
- assertViewPerPlayerSeatsValid,
20
- buildScenarios,
21
- driveReducerBundleThroughScenarios,
22
- runReducerBundleSmoke
23
- };
@@ -1,10 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- assertReducerContractPreflight
4
- } from "./chunk-VYJTHSYR.mjs";
5
- import "./chunk-CEDUHGNH.mjs";
6
- import "./chunk-6UUJEYDV.mjs";
7
- import "./chunk-XYDL7GY6.mjs";
8
- export {
9
- assertReducerContractPreflight
10
- };
@@ -1,53 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- assertDispatchResultWireContract,
4
- createActionPlanReplaySession,
5
- createScenarioActionPlan,
6
- createSessionFromScenario,
7
- ensureReducerNativeTestingFiles,
8
- formatScenarioErrorForDisplay,
9
- generateReducerNativeArtifacts,
10
- isReducerNativeTestingWorkspace,
11
- loadTypedBases,
12
- loadTypedScenarios,
13
- materializeScenarioReducerState,
14
- replayActionPlanInSession,
15
- replayActionPlanThroughBackend,
16
- replayScenarioThroughBackend,
17
- runReducerNativeScenarios,
18
- writeReducerNativeGeneratedFiles
19
- } from "./chunk-6A5HRJMQ.mjs";
20
- import "./chunk-HBNDKQT5.mjs";
21
- import "./chunk-CEDUHGNH.mjs";
22
- import "./chunk-BVVNBJM4.mjs";
23
- import "./chunk-LI3ZR3BI.mjs";
24
- import "./chunk-EIQWDQWJ.mjs";
25
- import "./chunk-2GBBP27W.mjs";
26
- import "./chunk-SYPLYRGB.mjs";
27
- import "./chunk-2QMNAVV4.mjs";
28
- import "./chunk-6UUJEYDV.mjs";
29
- import "./chunk-2E5P5NWG.mjs";
30
- import "./chunk-MINCYHXN.mjs";
31
- import "./chunk-U6OJN7XS.mjs";
32
- import "./chunk-54TAYXUD.mjs";
33
- import "./chunk-LM3OZLZG.mjs";
34
- import "./chunk-SHUMAVAP.mjs";
35
- import "./chunk-XYDL7GY6.mjs";
36
- export {
37
- assertDispatchResultWireContract,
38
- createActionPlanReplaySession,
39
- createScenarioActionPlan,
40
- createSessionFromScenario,
41
- ensureReducerNativeTestingFiles,
42
- formatScenarioErrorForDisplay,
43
- generateReducerNativeArtifacts,
44
- isReducerNativeTestingWorkspace,
45
- loadTypedBases,
46
- loadTypedScenarios,
47
- materializeScenarioReducerState,
48
- replayActionPlanInSession,
49
- replayActionPlanThroughBackend,
50
- replayScenarioThroughBackend,
51
- runReducerNativeScenarios,
52
- writeReducerNativeGeneratedFiles
53
- };
@@ -1,28 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- assertCliStaticScaffoldComplete,
4
- migrateLegacyScenarioImports,
5
- resolveSdkDependencyRange,
6
- resolveStaticAssetRoot,
7
- scaffoldStaticWorkspace
8
- } from "./chunk-CJEEA6NJ.mjs";
9
- import "./chunk-2GBBP27W.mjs";
10
- import "./chunk-4WD3YU2E.mjs";
11
- import "./chunk-SYPLYRGB.mjs";
12
- import "./chunk-2QMNAVV4.mjs";
13
- import "./chunk-6UUJEYDV.mjs";
14
- import "./chunk-2E5P5NWG.mjs";
15
- import "./chunk-MINCYHXN.mjs";
16
- import "./chunk-U6OJN7XS.mjs";
17
- import "./chunk-54TAYXUD.mjs";
18
- import "./chunk-LM3OZLZG.mjs";
19
- import "./chunk-RBDDIIPM.mjs";
20
- import "./chunk-SHUMAVAP.mjs";
21
- import "./chunk-XYDL7GY6.mjs";
22
- export {
23
- assertCliStaticScaffoldComplete,
24
- migrateLegacyScenarioImports,
25
- resolveSdkDependencyRange,
26
- resolveStaticAssetRoot,
27
- scaffoldStaticWorkspace
28
- };