@dreamboard-games/cli 0.1.30-alpha.0 → 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.
- package/README.md +179 -22
- package/dist/{chunk-TSJVWTJO.js → chunk-N7XPNNUI.js} +14 -12
- package/dist/chunk-N7XPNNUI.js.map +1 -0
- package/dist/chunk-SEGVTWSK.js +44 -0
- package/dist/{chunk-3XNJT3RK.js → chunk-TAQKH67O.js} +21279 -35845
- package/dist/chunk-TAQKH67O.js.map +1 -0
- package/dist/{global-config-UKSWNDTX.js → global-config-S4ZIPECE.js} +3 -3
- package/dist/index.js +955 -230
- package/dist/index.js.map +1 -1
- package/dist/internal.js +3 -4
- package/dist/{agent-verifier/keychain-backend-TNOPQV3Z.mjs → keychain-backend-HDF4TZDL.js} +2 -1
- package/dist/{agent-verifier/prompt-3BAINGAQ.mjs → prompt-NDV3AE5L.js} +2 -1
- package/package.json +6 -6
- package/skills/dreamboard/references/building-your-first-game.md +510 -0
- package/skills/dreamboard/references/cli.md +104 -0
- package/skills/dreamboard/references/game-interface.md +548 -0
- package/skills/dreamboard/references/manifest-authoring.md +597 -0
- package/skills/dreamboard/references/quickstart.md +66 -0
- package/skills/dreamboard/references/reducer.md +864 -0
- package/skills/dreamboard/references/rule-authoring.md +147 -0
- package/skills/dreamboard/references/testing.md +249 -0
- package/skills/dreamboard/scripts/events-extract.mjs +218 -0
- package/dist/agent-verifier/agent-workspace-verifier.mjs +0 -227
- package/dist/agent-verifier/chunk-2E5P5NWG.mjs +0 -835
- package/dist/agent-verifier/chunk-2GBBP27W.mjs +0 -301
- package/dist/agent-verifier/chunk-2NZNKIND.mjs +0 -166
- package/dist/agent-verifier/chunk-2QMNAVV4.mjs +0 -14522
- package/dist/agent-verifier/chunk-2SZHMP6F.mjs +0 -264
- package/dist/agent-verifier/chunk-54TAYXUD.mjs +0 -12
- package/dist/agent-verifier/chunk-6A5HRJMQ.mjs +0 -3174
- package/dist/agent-verifier/chunk-6UUJEYDV.mjs +0 -213
- package/dist/agent-verifier/chunk-7653FPGJ.mjs +0 -381
- package/dist/agent-verifier/chunk-BVVNBJM4.mjs +0 -221
- package/dist/agent-verifier/chunk-CEDUHGNH.mjs +0 -74
- package/dist/agent-verifier/chunk-CEQ2VJWN.mjs +0 -149
- package/dist/agent-verifier/chunk-CFU5EWIC.mjs +0 -69
- package/dist/agent-verifier/chunk-DTMJCPS4.mjs +0 -730
- package/dist/agent-verifier/chunk-EIQWDQWJ.mjs +0 -186
- package/dist/agent-verifier/chunk-EOQIV6PS.mjs +0 -649
- package/dist/agent-verifier/chunk-HBNDKQT5.mjs +0 -8381
- package/dist/agent-verifier/chunk-HJFQDSTU.mjs +0 -225
- package/dist/agent-verifier/chunk-LI3ZR3BI.mjs +0 -41
- package/dist/agent-verifier/chunk-LM3OZLZG.mjs +0 -48
- package/dist/agent-verifier/chunk-MINCYHXN.mjs +0 -106
- package/dist/agent-verifier/chunk-MRCUP5SW.mjs +0 -128
- package/dist/agent-verifier/chunk-PM3SVG6R.mjs +0 -38
- package/dist/agent-verifier/chunk-RBDDIIPM.mjs +0 -19
- package/dist/agent-verifier/chunk-RJBLBYHX.mjs +0 -1681
- package/dist/agent-verifier/chunk-SHUMAVAP.mjs +0 -59
- package/dist/agent-verifier/chunk-SYPLYRGB.mjs +0 -2812
- package/dist/agent-verifier/chunk-U6OJN7XS.mjs +0 -8092
- package/dist/agent-verifier/chunk-VYJTHSYR.mjs +0 -44
- package/dist/agent-verifier/chunk-XYDL7GY6.mjs +0 -10
- package/dist/agent-verifier/compile-WNCQQVOF.mjs +0 -313
- package/dist/agent-verifier/global-config-WX3ZZIVU.mjs +0 -17
- package/dist/agent-verifier/local-files-MTPLP62S.mjs +0 -46
- package/dist/agent-verifier/local-typecheck-QFYYAZOK.mjs +0 -9
- package/dist/agent-verifier/materialize-workspace-EWGZIVOY.mjs +0 -90
- package/dist/agent-verifier/project-state-7GR6BQTQ.mjs +0 -32
- package/dist/agent-verifier/reducer-bundle-preflight-C73LEXI2.mjs +0 -23
- package/dist/agent-verifier/reducer-contract-preflight-22X7DSZW.mjs +0 -10
- package/dist/agent-verifier/reducer-native-test-harness-GMWBUISX.mjs +0 -53
- package/dist/agent-verifier/static-scaffold-4YEQME5N.mjs +0 -28
- package/dist/agent-verifier/sync-LOQAH4RC.mjs +0 -594
- package/dist/agent-verifier/test-YOJERVHN.mjs +0 -356
- package/dist/agent-verifier/testing-5K2BJYF2.mjs +0 -674
- package/dist/agent-verifier/workspace-codegen-JDZJRSDV.mjs +0 -11
- package/dist/agent-verifier/workspace-dependencies-HZ6VVS4G.mjs +0 -14
- package/dist/chunk-2H7UOFLK.js +0 -11
- package/dist/chunk-3XNJT3RK.js.map +0 -1
- package/dist/chunk-7FOO4AJI.js +0 -50
- package/dist/chunk-7FOO4AJI.js.map +0 -1
- package/dist/chunk-TSJVWTJO.js.map +0 -1
- package/dist/internal.d.ts +0 -311
- package/dist/keychain-backend-JHTXAKWC.js +0 -135
- package/dist/prompt-GMZABCJC.js +0 -756
- package/dist/runtime-packages/ui-host-runtime/src/actor-principal.ts +0 -71
- package/dist/runtime-packages/ui-host-runtime/src/browser-interaction.ts +0 -139
- package/dist/runtime-packages/ui-host-runtime/src/components/host-controls.tsx +0 -374
- package/dist/runtime-packages/ui-host-runtime/src/components/host-feedback-toaster.tsx +0 -266
- package/dist/runtime-packages/ui-host-runtime/src/components/host-feedback.tsx +0 -212
- package/dist/runtime-packages/ui-host-runtime/src/components/host-primitives.tsx +0 -271
- package/dist/runtime-packages/ui-host-runtime/src/components/host-session-metadata.tsx +0 -135
- package/dist/runtime-packages/ui-host-runtime/src/components/index.ts +0 -5
- package/dist/runtime-packages/ui-host-runtime/src/components/perf-overlay.tsx +0 -194
- package/dist/runtime-packages/ui-host-runtime/src/gameplay-authority-transport.ts +0 -626
- package/dist/runtime-packages/ui-host-runtime/src/host-controls.tsx +0 -1
- package/dist/runtime-packages/ui-host-runtime/src/host-feedback.tsx +0 -1
- package/dist/runtime-packages/ui-host-runtime/src/host-session-transport.ts +0 -294
- package/dist/runtime-packages/ui-host-runtime/src/index.ts +0 -3
- package/dist/runtime-packages/ui-host-runtime/src/logger.ts +0 -11
- package/dist/runtime-packages/ui-host-runtime/src/perf.ts +0 -324
- package/dist/runtime-packages/ui-host-runtime/src/plugin-bridge.ts +0 -195
- package/dist/runtime-packages/ui-host-runtime/src/plugin-health-check.ts +0 -138
- package/dist/runtime-packages/ui-host-runtime/src/plugin-messages.ts +0 -159
- package/dist/runtime-packages/ui-host-runtime/src/plugin-session-gateway.ts +0 -551
- package/dist/runtime-packages/ui-host-runtime/src/runtime/index.ts +0 -13
- package/dist/runtime-packages/ui-host-runtime/src/screenshot/projection-to-snapshot.ts +0 -122
- package/dist/runtime-packages/ui-host-runtime/src/screenshot/static-store-api.ts +0 -26
- package/dist/runtime-packages/ui-host-runtime/src/session-ingress-controller.ts +0 -583
- package/dist/runtime-packages/ui-host-runtime/src/session-ingress.ts +0 -219
- package/dist/runtime-packages/ui-host-runtime/src/session-live-runtime.ts +0 -117
- package/dist/runtime-packages/ui-host-runtime/src/session-model.ts +0 -431
- package/dist/runtime-packages/ui-host-runtime/src/session-projection.ts +0 -211
- package/dist/runtime-packages/ui-host-runtime/src/session-recovery.ts +0 -80
- package/dist/runtime-packages/ui-host-runtime/src/session-state-reducer.ts +0 -1034
- package/dist/runtime-packages/ui-host-runtime/src/sse-manager.ts +0 -416
- package/dist/runtime-packages/ui-host-runtime/src/unified-session-store.ts +0 -184
- package/dist/testing-KLSV6CPJ.js +0 -674
- package/dist/testing-KLSV6CPJ.js.map +0 -1
- /package/dist/{chunk-2H7UOFLK.js.map → chunk-SEGVTWSK.js.map} +0 -0
- /package/dist/{global-config-UKSWNDTX.js.map → global-config-S4ZIPECE.js.map} +0 -0
- /package/dist/{keychain-backend-JHTXAKWC.js.map → keychain-backend-HDF4TZDL.js.map} +0 -0
- /package/dist/{prompt-GMZABCJC.js.map → prompt-NDV3AE5L.js.map} +0 -0
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
hashContent,
|
|
4
|
-
materializeManifest,
|
|
5
|
-
writeManifestSource
|
|
6
|
-
} from "./chunk-SYPLYRGB.mjs";
|
|
7
|
-
import {
|
|
8
|
-
atomicWriteFile
|
|
9
|
-
} from "./chunk-MINCYHXN.mjs";
|
|
10
|
-
import {
|
|
11
|
-
isAllowedGamePath,
|
|
12
|
-
isAuthoritativeGeneratedPath,
|
|
13
|
-
isLibraryPath
|
|
14
|
-
} from "./chunk-U6OJN7XS.mjs";
|
|
15
|
-
import {
|
|
16
|
-
readJsonFile,
|
|
17
|
-
readTextFile,
|
|
18
|
-
readTextFileIfExists,
|
|
19
|
-
writeTextFile
|
|
20
|
-
} from "./chunk-LM3OZLZG.mjs";
|
|
21
|
-
import {
|
|
22
|
-
LOCAL_IGNORE_DIRS,
|
|
23
|
-
MANIFEST_FILE,
|
|
24
|
-
PROJECT_DIR_NAME,
|
|
25
|
-
RULE_FILE,
|
|
26
|
-
SNAPSHOT_FILE
|
|
27
|
-
} from "./chunk-SHUMAVAP.mjs";
|
|
28
|
-
|
|
29
|
-
// src/services/project/local-files.ts
|
|
30
|
-
import { readdir, unlink } from "fs/promises";
|
|
31
|
-
import path from "path";
|
|
32
|
-
function isAllowedGamePath2(filePath) {
|
|
33
|
-
return isAllowedGamePath(filePath);
|
|
34
|
-
}
|
|
35
|
-
function isLibraryPath2(filePath) {
|
|
36
|
-
return isLibraryPath(filePath);
|
|
37
|
-
}
|
|
38
|
-
function shouldWriteScaffoldFile(filePath, existingContent) {
|
|
39
|
-
if (isLibraryPath2(filePath)) return "write";
|
|
40
|
-
const hasContent = existingContent !== null && existingContent.trim().length > 0;
|
|
41
|
-
return hasContent ? "skip" : "write";
|
|
42
|
-
}
|
|
43
|
-
async function writeSourceFiles(rootDir, files) {
|
|
44
|
-
for (const [relativePath, content] of Object.entries(files)) {
|
|
45
|
-
if (content === null || content === void 0) continue;
|
|
46
|
-
const filePath = path.join(rootDir, relativePath);
|
|
47
|
-
await writeTextFile(filePath, content);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
async function writeScaffoldFiles(rootDir, files) {
|
|
51
|
-
const written = [];
|
|
52
|
-
const skipped = [];
|
|
53
|
-
for (const [relativePath, content] of Object.entries(files)) {
|
|
54
|
-
if (content === null || content === void 0) continue;
|
|
55
|
-
const fullPath = path.join(rootDir, relativePath);
|
|
56
|
-
const existingContent = await readTextFileIfExists(fullPath);
|
|
57
|
-
const decision = shouldWriteScaffoldFile(relativePath, existingContent);
|
|
58
|
-
if (decision === "skip") {
|
|
59
|
-
skipped.push(relativePath);
|
|
60
|
-
continue;
|
|
61
|
-
}
|
|
62
|
-
await writeTextFile(fullPath, content);
|
|
63
|
-
if (existingContent !== content) {
|
|
64
|
-
written.push(relativePath);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
written.sort();
|
|
68
|
-
skipped.sort();
|
|
69
|
-
return { written, skipped };
|
|
70
|
-
}
|
|
71
|
-
async function removeExtraneousFiles(rootDir, keep) {
|
|
72
|
-
const localFiles = await collectLocalFiles(rootDir);
|
|
73
|
-
for (const filePath of Object.keys(localFiles)) {
|
|
74
|
-
if (filePath === MANIFEST_FILE || filePath === RULE_FILE) continue;
|
|
75
|
-
if (!keep.has(filePath)) {
|
|
76
|
-
await unlink(path.join(rootDir, filePath));
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
async function collectLocalFiles(rootDir) {
|
|
81
|
-
const result = {};
|
|
82
|
-
await walkDir(rootDir, rootDir, result);
|
|
83
|
-
return result;
|
|
84
|
-
}
|
|
85
|
-
async function walkDir(rootDir, currentDir, result) {
|
|
86
|
-
const entries = await readdir(currentDir, { withFileTypes: true });
|
|
87
|
-
for (const entry of entries) {
|
|
88
|
-
if (entry.isDirectory()) {
|
|
89
|
-
if (LOCAL_IGNORE_DIRS.has(entry.name)) continue;
|
|
90
|
-
await walkDir(rootDir, path.join(currentDir, entry.name), result);
|
|
91
|
-
} else if (entry.isFile()) {
|
|
92
|
-
const filePath = path.join(currentDir, entry.name);
|
|
93
|
-
const relativePath = path.relative(rootDir, filePath);
|
|
94
|
-
result[relativePath] = await readTextFile(filePath);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
async function writeManifest(rootDir, manifest) {
|
|
99
|
-
await writeManifestSource(rootDir, manifest);
|
|
100
|
-
}
|
|
101
|
-
async function writeRule(rootDir, ruleText) {
|
|
102
|
-
const filePath = path.join(rootDir, RULE_FILE);
|
|
103
|
-
await writeTextFile(filePath, ruleText);
|
|
104
|
-
}
|
|
105
|
-
async function loadManifest(rootDir) {
|
|
106
|
-
return materializeManifest(rootDir);
|
|
107
|
-
}
|
|
108
|
-
async function loadRule(rootDir) {
|
|
109
|
-
const filePath = path.join(rootDir, RULE_FILE);
|
|
110
|
-
return readTextFile(filePath);
|
|
111
|
-
}
|
|
112
|
-
async function writeSnapshot(rootDir) {
|
|
113
|
-
const files = await collectLocalFiles(rootDir);
|
|
114
|
-
await writeSnapshotFromFiles(rootDir, files);
|
|
115
|
-
}
|
|
116
|
-
async function writeSnapshotFromFiles(rootDir, files) {
|
|
117
|
-
const snapshot = {
|
|
118
|
-
files: {}
|
|
119
|
-
};
|
|
120
|
-
for (const [filePath, content] of Object.entries(files)) {
|
|
121
|
-
if (filePath.startsWith(`${PROJECT_DIR_NAME}/`)) continue;
|
|
122
|
-
if (isAuthoritativeGeneratedPath(filePath)) continue;
|
|
123
|
-
snapshot.files[filePath] = hashContent(content);
|
|
124
|
-
}
|
|
125
|
-
const snapshotPath = path.join(rootDir, PROJECT_DIR_NAME, SNAPSHOT_FILE);
|
|
126
|
-
await atomicWriteFile(
|
|
127
|
-
snapshotPath,
|
|
128
|
-
`${JSON.stringify(snapshot, null, 2)}
|
|
129
|
-
`,
|
|
130
|
-
{ mode: 420 }
|
|
131
|
-
);
|
|
132
|
-
}
|
|
133
|
-
function isIgnorableLocalDiffPath(filePath) {
|
|
134
|
-
return filePath.startsWith("test/generated/") || filePath.startsWith(".playwright-cli/");
|
|
135
|
-
}
|
|
136
|
-
async function getLocalDiff(rootDir) {
|
|
137
|
-
const snapshotPath = path.join(rootDir, PROJECT_DIR_NAME, SNAPSHOT_FILE);
|
|
138
|
-
const snapshot = await readJsonFile(snapshotPath).catch(() => null);
|
|
139
|
-
if (!snapshot) {
|
|
140
|
-
return { modified: [], added: [], deleted: [] };
|
|
141
|
-
}
|
|
142
|
-
const files = await collectLocalFiles(rootDir);
|
|
143
|
-
const currentHashes = {};
|
|
144
|
-
for (const [filePath, content] of Object.entries(files)) {
|
|
145
|
-
if (filePath.startsWith(`${PROJECT_DIR_NAME}/`)) continue;
|
|
146
|
-
if (isIgnorableLocalDiffPath(filePath)) continue;
|
|
147
|
-
if (isAuthoritativeGeneratedPath(filePath)) continue;
|
|
148
|
-
currentHashes[filePath] = hashContent(content);
|
|
149
|
-
}
|
|
150
|
-
const modified = [];
|
|
151
|
-
const added = [];
|
|
152
|
-
const deleted = [];
|
|
153
|
-
for (const [filePath, hash] of Object.entries(currentHashes)) {
|
|
154
|
-
const prevHash = snapshot.files[filePath];
|
|
155
|
-
if (!prevHash) {
|
|
156
|
-
added.push(filePath);
|
|
157
|
-
} else if (prevHash !== hash) {
|
|
158
|
-
modified.push(filePath);
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
for (const filePath of Object.keys(snapshot.files)) {
|
|
162
|
-
if (isIgnorableLocalDiffPath(filePath)) continue;
|
|
163
|
-
if (isAuthoritativeGeneratedPath(filePath)) continue;
|
|
164
|
-
if (!currentHashes[filePath]) {
|
|
165
|
-
deleted.push(filePath);
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
return { modified, added, deleted };
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
export {
|
|
172
|
-
isAllowedGamePath2 as isAllowedGamePath,
|
|
173
|
-
isLibraryPath2 as isLibraryPath,
|
|
174
|
-
writeSourceFiles,
|
|
175
|
-
writeScaffoldFiles,
|
|
176
|
-
removeExtraneousFiles,
|
|
177
|
-
collectLocalFiles,
|
|
178
|
-
walkDir,
|
|
179
|
-
writeManifest,
|
|
180
|
-
writeRule,
|
|
181
|
-
loadManifest,
|
|
182
|
-
loadRule,
|
|
183
|
-
writeSnapshot,
|
|
184
|
-
writeSnapshotFromFiles,
|
|
185
|
-
getLocalDiff
|
|
186
|
-
};
|