@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.
- package/README.md +179 -22
- package/dist/{chunk-C6UAT6EH.js → chunk-N7XPNNUI.js} +9 -12
- package/dist/chunk-N7XPNNUI.js.map +1 -0
- package/dist/chunk-SEGVTWSK.js +44 -0
- package/dist/{chunk-RS7UXJZV.js → chunk-TAQKH67O.js} +21300 -35881
- package/dist/chunk-TAQKH67O.js.map +1 -0
- package/dist/{global-config-AGFBDFYD.js → global-config-S4ZIPECE.js} +3 -3
- package/dist/index.js +415 -37
- 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-2QMNAVV4.mjs +0 -14522
- package/dist/agent-verifier/chunk-2SZHMP6F.mjs +0 -264
- package/dist/agent-verifier/chunk-4WD3YU2E.mjs +0 -166
- 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-7E65UQLY.mjs +0 -38
- 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-CJEEA6NJ.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-JH22JNYD.mjs +0 -1681
- 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-RBDDIIPM.mjs +0 -19
- 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-5QSPIOUT.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-FKALAE2T.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-AJMZZQWS.mjs +0 -28
- package/dist/agent-verifier/sync-3DUQH32H.mjs +0 -594
- package/dist/agent-verifier/test-P4U5INTD.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-7FOO4AJI.js +0 -50
- package/dist/chunk-7FOO4AJI.js.map +0 -1
- package/dist/chunk-C6UAT6EH.js.map +0 -1
- package/dist/chunk-RS7UXJZV.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-AGFBDFYD.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,225 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
atomicWriteFile,
|
|
4
|
-
withFileLock
|
|
5
|
-
} from "./chunk-MINCYHXN.mjs";
|
|
6
|
-
import {
|
|
7
|
-
ensureDir,
|
|
8
|
-
readJsonFile
|
|
9
|
-
} from "./chunk-LM3OZLZG.mjs";
|
|
10
|
-
import {
|
|
11
|
-
PROJECT_DIR_NAME
|
|
12
|
-
} from "./chunk-SHUMAVAP.mjs";
|
|
13
|
-
|
|
14
|
-
// src/config/global-config.ts
|
|
15
|
-
import os2 from "os";
|
|
16
|
-
import path2 from "path";
|
|
17
|
-
|
|
18
|
-
// src/config/credential-store.ts
|
|
19
|
-
import os from "os";
|
|
20
|
-
import path from "path";
|
|
21
|
-
import { promises as fs } from "fs";
|
|
22
|
-
function getCredentialFilePath() {
|
|
23
|
-
return path.join(os.homedir(), PROJECT_DIR_NAME, "auth.json");
|
|
24
|
-
}
|
|
25
|
-
function getCredentialLockPath() {
|
|
26
|
-
return `${getCredentialFilePath()}.lock`;
|
|
27
|
-
}
|
|
28
|
-
async function fileRead() {
|
|
29
|
-
const filePath = getCredentialFilePath();
|
|
30
|
-
let data;
|
|
31
|
-
try {
|
|
32
|
-
data = await fs.readFile(filePath, "utf8");
|
|
33
|
-
} catch (err) {
|
|
34
|
-
if (err.code === "ENOENT") return null;
|
|
35
|
-
throw err;
|
|
36
|
-
}
|
|
37
|
-
if (data.trim().length === 0) {
|
|
38
|
-
return null;
|
|
39
|
-
}
|
|
40
|
-
let parsed;
|
|
41
|
-
try {
|
|
42
|
-
parsed = JSON.parse(data);
|
|
43
|
-
} catch {
|
|
44
|
-
return null;
|
|
45
|
-
}
|
|
46
|
-
const accessToken = parsed.accessToken ?? parsed.authToken;
|
|
47
|
-
const refreshToken = parsed.refreshToken;
|
|
48
|
-
if (!accessToken && !refreshToken) return null;
|
|
49
|
-
return {
|
|
50
|
-
accessToken: accessToken || void 0,
|
|
51
|
-
refreshToken: refreshToken || void 0,
|
|
52
|
-
tokenExpiresAt: parsed.tokenExpiresAt || void 0,
|
|
53
|
-
clerkOAuthIssuer: parsed.clerkOAuthIssuer || void 0,
|
|
54
|
-
clerkOAuthClientId: parsed.clerkOAuthClientId || void 0,
|
|
55
|
-
clerkOAuthTokenUrl: parsed.clerkOAuthTokenUrl || void 0,
|
|
56
|
-
environment: parsed.environment || void 0
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
async function writeFilePayload(payload) {
|
|
60
|
-
await atomicWriteFile(
|
|
61
|
-
getCredentialFilePath(),
|
|
62
|
-
`${JSON.stringify(payload, null, 2)}
|
|
63
|
-
`,
|
|
64
|
-
{ mode: 384 }
|
|
65
|
-
);
|
|
66
|
-
}
|
|
67
|
-
async function fileWriteFull(creds) {
|
|
68
|
-
if (!creds.accessToken || !creds.refreshToken) {
|
|
69
|
-
throw new Error(
|
|
70
|
-
"Refusing to persist credentials with an empty accessToken or refreshToken."
|
|
71
|
-
);
|
|
72
|
-
}
|
|
73
|
-
await writeFilePayload({
|
|
74
|
-
authToken: creds.accessToken,
|
|
75
|
-
refreshToken: creds.refreshToken,
|
|
76
|
-
tokenExpiresAt: creds.tokenExpiresAt,
|
|
77
|
-
clerkOAuthIssuer: creds.clerkOAuthIssuer,
|
|
78
|
-
clerkOAuthClientId: creds.clerkOAuthClientId,
|
|
79
|
-
clerkOAuthTokenUrl: creds.clerkOAuthTokenUrl,
|
|
80
|
-
environment: creds.environment
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
async function fileWriteAccessOnly(accessToken) {
|
|
84
|
-
if (!accessToken) {
|
|
85
|
-
throw new Error("Refusing to persist an empty access token.");
|
|
86
|
-
}
|
|
87
|
-
await writeFilePayload({ authToken: accessToken });
|
|
88
|
-
}
|
|
89
|
-
async function fileClear() {
|
|
90
|
-
const filePath = getCredentialFilePath();
|
|
91
|
-
try {
|
|
92
|
-
await fs.unlink(filePath);
|
|
93
|
-
} catch (err) {
|
|
94
|
-
if (err.code !== "ENOENT") throw err;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
var fileCredentialBackend = {
|
|
98
|
-
name: "file",
|
|
99
|
-
read: fileRead,
|
|
100
|
-
writeFull: fileWriteFull,
|
|
101
|
-
writeAccessOnly: fileWriteAccessOnly,
|
|
102
|
-
clear: fileClear
|
|
103
|
-
};
|
|
104
|
-
var cachedBackend = null;
|
|
105
|
-
var migrationCompleted = false;
|
|
106
|
-
var backendResolver = defaultBackendResolver;
|
|
107
|
-
async function defaultBackendResolver() {
|
|
108
|
-
const override = (process.env.DREAMBOARD_CREDENTIAL_BACKEND ?? "").trim().toLowerCase();
|
|
109
|
-
if (override === "file") {
|
|
110
|
-
return fileCredentialBackend;
|
|
111
|
-
}
|
|
112
|
-
if (override && override !== "keychain" && override !== "auto") {
|
|
113
|
-
throw new Error(
|
|
114
|
-
`Unknown DREAMBOARD_CREDENTIAL_BACKEND value "${override}" (expected "file", "keychain", or "auto").`
|
|
115
|
-
);
|
|
116
|
-
}
|
|
117
|
-
const useKeychain = override === "keychain" || await readCredentialBackendPreference();
|
|
118
|
-
if (!useKeychain) {
|
|
119
|
-
return fileCredentialBackend;
|
|
120
|
-
}
|
|
121
|
-
const { tryKeychainBackend } = await import("./keychain-backend-TNOPQV3Z.mjs");
|
|
122
|
-
const keychain = await tryKeychainBackend();
|
|
123
|
-
if (keychain.available) {
|
|
124
|
-
return keychain.backend;
|
|
125
|
-
}
|
|
126
|
-
return fileCredentialBackend;
|
|
127
|
-
}
|
|
128
|
-
async function readCredentialBackendPreference() {
|
|
129
|
-
try {
|
|
130
|
-
const { loadGlobalConfig: loadGlobalConfig2 } = await import("./global-config-WX3ZZIVU.mjs");
|
|
131
|
-
const config = await loadGlobalConfig2();
|
|
132
|
-
return config.credentialBackend === "keychain";
|
|
133
|
-
} catch {
|
|
134
|
-
return false;
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
async function getCredentialBackend() {
|
|
138
|
-
if (cachedBackend === null) {
|
|
139
|
-
cachedBackend = await backendResolver();
|
|
140
|
-
if (!migrationCompleted && cachedBackend.name !== "file") {
|
|
141
|
-
await migrateFromFileBackendIfNeeded(cachedBackend);
|
|
142
|
-
}
|
|
143
|
-
migrationCompleted = true;
|
|
144
|
-
}
|
|
145
|
-
return cachedBackend;
|
|
146
|
-
}
|
|
147
|
-
async function migrateFromFileBackendIfNeeded(target) {
|
|
148
|
-
try {
|
|
149
|
-
const [onDisk, onTarget] = await Promise.all([
|
|
150
|
-
fileCredentialBackend.read(),
|
|
151
|
-
target.read()
|
|
152
|
-
]);
|
|
153
|
-
if (!onDisk) return;
|
|
154
|
-
if (onTarget) {
|
|
155
|
-
await fileCredentialBackend.clear();
|
|
156
|
-
return;
|
|
157
|
-
}
|
|
158
|
-
if (onDisk.accessToken && onDisk.refreshToken) {
|
|
159
|
-
await target.writeFull({
|
|
160
|
-
accessToken: onDisk.accessToken,
|
|
161
|
-
refreshToken: onDisk.refreshToken
|
|
162
|
-
});
|
|
163
|
-
} else if (onDisk.accessToken) {
|
|
164
|
-
await target.writeAccessOnly(onDisk.accessToken);
|
|
165
|
-
} else {
|
|
166
|
-
return;
|
|
167
|
-
}
|
|
168
|
-
await fileCredentialBackend.clear();
|
|
169
|
-
} catch {
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
async function getStoredSession() {
|
|
173
|
-
const backend = await getCredentialBackend();
|
|
174
|
-
return backend.read();
|
|
175
|
-
}
|
|
176
|
-
async function setCredentials(creds) {
|
|
177
|
-
await withFileLock(getCredentialLockPath(), async () => {
|
|
178
|
-
const backend = await getCredentialBackend();
|
|
179
|
-
await backend.writeFull(creds);
|
|
180
|
-
});
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
// src/config/global-config.ts
|
|
184
|
-
function normalizeCredentialBackend(value) {
|
|
185
|
-
if (value === "file" || value === "keychain") return value;
|
|
186
|
-
return void 0;
|
|
187
|
-
}
|
|
188
|
-
function getGlobalConfigPath() {
|
|
189
|
-
return path2.join(os2.homedir(), PROJECT_DIR_NAME, "config.json");
|
|
190
|
-
}
|
|
191
|
-
function getGlobalAuthPath() {
|
|
192
|
-
return getCredentialFilePath();
|
|
193
|
-
}
|
|
194
|
-
async function loadGlobalConfig() {
|
|
195
|
-
const config = await readJsonFile(getGlobalConfigPath()).catch(
|
|
196
|
-
() => ({})
|
|
197
|
-
);
|
|
198
|
-
return {
|
|
199
|
-
environment: config.environment,
|
|
200
|
-
credentialBackend: normalizeCredentialBackend(config.credentialBackend)
|
|
201
|
-
};
|
|
202
|
-
}
|
|
203
|
-
async function saveGlobalConfig(config) {
|
|
204
|
-
const configDir = path2.join(os2.homedir(), PROJECT_DIR_NAME);
|
|
205
|
-
await ensureDir(configDir);
|
|
206
|
-
const normalized = {
|
|
207
|
-
environment: config.environment,
|
|
208
|
-
credentialBackend: normalizeCredentialBackend(config.credentialBackend)
|
|
209
|
-
};
|
|
210
|
-
await atomicWriteFile(
|
|
211
|
-
getGlobalConfigPath(),
|
|
212
|
-
`${JSON.stringify(normalized, null, 2)}
|
|
213
|
-
`,
|
|
214
|
-
{ mode: 384 }
|
|
215
|
-
);
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
export {
|
|
219
|
-
getStoredSession,
|
|
220
|
-
setCredentials,
|
|
221
|
-
getGlobalConfigPath,
|
|
222
|
-
getGlobalAuthPath,
|
|
223
|
-
loadGlobalConfig,
|
|
224
|
-
saveGlobalConfig
|
|
225
|
-
};
|