@air-jam/devtools 0.0.0-stage → 0.9.3
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/LICENSE +21 -0
- package/README.md +52 -2
- package/dist/agent.d.ts +15 -0
- package/dist/agent.js +19 -0
- package/dist/agent.js.map +1 -0
- package/dist/chunk-5YAARMW5.js +36 -0
- package/dist/chunk-5YAARMW5.js.map +1 -0
- package/dist/chunk-6WQODT37.js +1019 -0
- package/dist/chunk-6WQODT37.js.map +1 -0
- package/dist/chunk-CKFT2ZJE.js +801 -0
- package/dist/chunk-CKFT2ZJE.js.map +1 -0
- package/dist/chunk-ER3Q2C4G.js +358 -0
- package/dist/chunk-ER3Q2C4G.js.map +1 -0
- package/dist/chunk-GUEZP773.js +851 -0
- package/dist/chunk-GUEZP773.js.map +1 -0
- package/dist/chunk-HIDNI56E.js +33 -0
- package/dist/chunk-HIDNI56E.js.map +1 -0
- package/dist/chunk-QKXS5D35.js +43 -0
- package/dist/chunk-QKXS5D35.js.map +1 -0
- package/dist/chunk-S4LSCEVE.js +261 -0
- package/dist/chunk-S4LSCEVE.js.map +1 -0
- package/dist/chunk-VKMJO6VN.js +360 -0
- package/dist/chunk-VKMJO6VN.js.map +1 -0
- package/dist/chunk-WFUR3MXY.js +67 -0
- package/dist/chunk-WFUR3MXY.js.map +1 -0
- package/dist/chunk-XEMR7KUE.js +361 -0
- package/dist/chunk-XEMR7KUE.js.map +1 -0
- package/dist/chunk-ZLPD7FY5.js +191 -0
- package/dist/chunk-ZLPD7FY5.js.map +1 -0
- package/dist/context.d.ts +13 -0
- package/dist/context.js +9 -0
- package/dist/context.js.map +1 -0
- package/dist/controller.d.ts +41 -0
- package/dist/controller.js +30 -0
- package/dist/controller.js.map +1 -0
- package/dist/dev.d.ts +15 -0
- package/dist/dev.js +20 -0
- package/dist/dev.js.map +1 -0
- package/dist/game-session-broker.d.ts +57 -0
- package/dist/game-session-broker.js +235 -0
- package/dist/game-session-broker.js.map +1 -0
- package/dist/game-session.d.ts +13 -0
- package/dist/game-session.js +24 -0
- package/dist/game-session.js.map +1 -0
- package/dist/games.d.ts +21 -0
- package/dist/games.js +14 -0
- package/dist/games.js.map +1 -0
- package/dist/harness/visual.d.ts +321 -0
- package/dist/harness/visual.js +41 -0
- package/dist/harness/visual.js.map +1 -0
- package/dist/logs.d.ts +9 -0
- package/dist/logs.js +58 -0
- package/dist/logs.js.map +1 -0
- package/dist/mcp-config.d.ts +63 -0
- package/dist/mcp-config.js +190 -0
- package/dist/mcp-config.js.map +1 -0
- package/dist/platform-auth.d.ts +112 -0
- package/dist/platform-auth.js +37 -0
- package/dist/platform-auth.js.map +1 -0
- package/dist/platform-game-media.d.ts +309 -0
- package/dist/platform-game-media.js +168 -0
- package/dist/platform-game-media.js.map +1 -0
- package/dist/platform-games.d.ts +65 -0
- package/dist/platform-games.js +251 -0
- package/dist/platform-games.js.map +1 -0
- package/dist/quality.d.ts +10 -0
- package/dist/quality.js +63 -0
- package/dist/quality.js.map +1 -0
- package/dist/release.d.ts +1094 -0
- package/dist/release.js +1347 -0
- package/dist/release.js.map +1 -0
- package/dist/tooling/agent-contract.d.ts +2 -0
- package/dist/tooling/agent-contract.js +193 -0
- package/dist/tooling/agent-contract.js.map +1 -0
- package/dist/tooling/hold-runtime-host.d.ts +2 -0
- package/dist/tooling/hold-runtime-host.js +229 -0
- package/dist/tooling/hold-runtime-host.js.map +1 -0
- package/dist/tooling/inspect-airjam-agent.d.ts +2 -0
- package/dist/tooling/inspect-airjam-agent.js +37 -0
- package/dist/tooling/inspect-airjam-agent.js.map +1 -0
- package/dist/tooling/list-visual-scenarios.d.ts +2 -0
- package/dist/tooling/list-visual-scenarios.js +62 -0
- package/dist/tooling/list-visual-scenarios.js.map +1 -0
- package/dist/tooling/managed-dev-supervisor.d.ts +2 -0
- package/dist/tooling/managed-dev-supervisor.js +51 -0
- package/dist/tooling/managed-dev-supervisor.js.map +1 -0
- package/dist/tooling/run-visual-capture.d.ts +2 -0
- package/dist/tooling/run-visual-capture.js +167 -0
- package/dist/tooling/run-visual-capture.js.map +1 -0
- package/dist/types-C6NrHt88.d.ts +775 -0
- package/dist/visual.d.ts +15 -0
- package/dist/visual.js +263 -0
- package/dist/visual.js.map +1 -0
- package/package.json +113 -3
- package/src/agent.ts +380 -0
- package/src/commands.ts +40 -0
- package/src/context.ts +229 -0
- package/src/controller.ts +1376 -0
- package/src/dev.ts +999 -0
- package/src/fs-utils.ts +93 -0
- package/src/game-action-observation.ts +96 -0
- package/src/game-session-broker.ts +301 -0
- package/src/game-session.ts +459 -0
- package/src/games.ts +266 -0
- package/src/harness/visual/prefab-contract.ts +29 -0
- package/src/harness/visual/prefab-runner.ts +178 -0
- package/src/harness/visual/runner.ts +546 -0
- package/src/harness/visual/scenario-contract.ts +9 -0
- package/src/harness/visual/scenario-helpers.ts +63 -0
- package/src/harness/visual/session.ts +369 -0
- package/src/harness/visual/types.ts +181 -0
- package/src/harness/visual.ts +7 -0
- package/src/helper-scripts.ts +49 -0
- package/src/logs.ts +67 -0
- package/src/mcp-config.ts +262 -0
- package/src/platform-auth.ts +455 -0
- package/src/platform-game-media.ts +209 -0
- package/src/platform-games.ts +315 -0
- package/src/quality.ts +82 -0
- package/src/release.ts +1697 -0
- package/src/runtime-owner-protocol.ts +130 -0
- package/src/tooling/agent-contract.ts +232 -0
- package/src/tooling/agent-declaration.ts +36 -0
- package/src/tooling/airjam-agent-inspection.ts +45 -0
- package/src/tooling/airjam-agent.ts +118 -0
- package/src/tooling/hold-runtime-host.ts +224 -0
- package/src/tooling/inspect-airjam-agent.ts +20 -0
- package/src/tooling/list-visual-scenarios.ts +64 -0
- package/src/tooling/managed-dev-supervisor.ts +71 -0
- package/src/tooling/run-visual-capture.ts +217 -0
- package/src/tooling/runtime-owner-actions.ts +42 -0
- package/src/tooling/visual-pack.ts +46 -0
- package/src/types.ts +951 -0
- package/src/visual.ts +304 -0
- package/src/workspace-contract.ts +32 -0
package/dist/visual.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { aD as CaptureVisualsOptions, aE as AirJamVisualArtifactMode, F as AirJamSurfaceUrlSummary, aF as ListVisualScenariosOptions, aG as AirJamVisualScenarioList, aH as CaptureVisualsResult } from './types-C6NrHt88.js';
|
|
2
|
+
export { _ as AirJamVisualCaptureInspection, $ as AirJamVisualCaptureSummary, aI as AirJamVisualScenarioMetadata } from './types-C6NrHt88.js';
|
|
3
|
+
import '@air-jam/sdk';
|
|
4
|
+
import '@air-jam/sdk/platform-machine';
|
|
5
|
+
|
|
6
|
+
type CaptureVisualsAtRuntimeOptions = Pick<CaptureVisualsOptions, "cwd" | "gameId" | "scenarioId" | "secure"> & {
|
|
7
|
+
mode: AirJamVisualArtifactMode;
|
|
8
|
+
urls: AirJamSurfaceUrlSummary;
|
|
9
|
+
artifactRoot: string;
|
|
10
|
+
};
|
|
11
|
+
declare const listVisualScenarios: ({ cwd, gameId, }?: ListVisualScenariosOptions) => Promise<AirJamVisualScenarioList>;
|
|
12
|
+
declare const captureVisualsAtRuntime: ({ cwd, gameId, ...runtime }: CaptureVisualsAtRuntimeOptions) => Promise<CaptureVisualsResult>;
|
|
13
|
+
declare const captureVisuals: ({ cwd, gameId, scenarioId, mode, secure, }?: CaptureVisualsOptions) => Promise<CaptureVisualsResult>;
|
|
14
|
+
|
|
15
|
+
export { AirJamVisualArtifactMode, AirJamVisualScenarioList, type CaptureVisualsAtRuntimeOptions, CaptureVisualsOptions, CaptureVisualsResult, ListVisualScenariosOptions, captureVisuals, captureVisualsAtRuntime, listVisualScenarios };
|
package/dist/visual.js
ADDED
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
import {
|
|
2
|
+
resolveDevtoolsHelperArgs,
|
|
3
|
+
resolveDevtoolsHelperScript,
|
|
4
|
+
startDev,
|
|
5
|
+
stopDev,
|
|
6
|
+
tryAttachToRunningDev
|
|
7
|
+
} from "./chunk-CKFT2ZJE.js";
|
|
8
|
+
import {
|
|
9
|
+
inspectGame
|
|
10
|
+
} from "./chunk-ZLPD7FY5.js";
|
|
11
|
+
import {
|
|
12
|
+
runCommandResult
|
|
13
|
+
} from "./chunk-5YAARMW5.js";
|
|
14
|
+
import {
|
|
15
|
+
pathExists,
|
|
16
|
+
readJsonFile
|
|
17
|
+
} from "./chunk-S4LSCEVE.js";
|
|
18
|
+
|
|
19
|
+
// src/visual.ts
|
|
20
|
+
import path2 from "path";
|
|
21
|
+
import { z } from "zod";
|
|
22
|
+
|
|
23
|
+
// src/tooling/airjam-agent-inspection.ts
|
|
24
|
+
import path from "path";
|
|
25
|
+
var parseHelperJson = (output) => {
|
|
26
|
+
const startIndex = output.indexOf("{");
|
|
27
|
+
const endIndex = output.lastIndexOf("}");
|
|
28
|
+
if (startIndex === -1 || endIndex === -1 || endIndex < startIndex) {
|
|
29
|
+
throw new Error(`Expected JSON helper output but received:
|
|
30
|
+
${output}`);
|
|
31
|
+
}
|
|
32
|
+
return JSON.parse(output.slice(startIndex, endIndex + 1));
|
|
33
|
+
};
|
|
34
|
+
var inspectAirJamAgentConfig = async (configPath) => {
|
|
35
|
+
const result = runCommandResult({
|
|
36
|
+
command: process.execPath,
|
|
37
|
+
args: [
|
|
38
|
+
...resolveDevtoolsHelperArgs(
|
|
39
|
+
resolveDevtoolsHelperScript("inspect-airjam-agent.ts")
|
|
40
|
+
),
|
|
41
|
+
"--config",
|
|
42
|
+
configPath
|
|
43
|
+
],
|
|
44
|
+
cwd: path.dirname(configPath)
|
|
45
|
+
});
|
|
46
|
+
if (!result.ok) {
|
|
47
|
+
throw new Error(
|
|
48
|
+
`Air Jam agent config helper failed.
|
|
49
|
+
|
|
50
|
+
${result.stderr || result.stdout}`
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
return parseHelperJson(result.stdout);
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
// src/visual.ts
|
|
57
|
+
var captureUrlsSchema = z.object({
|
|
58
|
+
appOrigin: z.url(),
|
|
59
|
+
hostUrl: z.url(),
|
|
60
|
+
controllerBaseUrl: z.url(),
|
|
61
|
+
publicHost: z.url(),
|
|
62
|
+
localBuildUrl: z.url().nullable(),
|
|
63
|
+
browserBuildUrl: z.url().nullable()
|
|
64
|
+
});
|
|
65
|
+
var resolveVisualArtifactRoot = (rootDir) => path2.join(rootDir, ".airjam", "artifacts", "visual");
|
|
66
|
+
var parseHelperJson2 = (output) => {
|
|
67
|
+
const startIndex = output.indexOf("{");
|
|
68
|
+
const endIndex = output.lastIndexOf("}");
|
|
69
|
+
if (startIndex === -1 || endIndex === -1 || endIndex < startIndex) {
|
|
70
|
+
throw new Error(`Expected JSON helper output but received:
|
|
71
|
+
${output}`);
|
|
72
|
+
}
|
|
73
|
+
return JSON.parse(output.slice(startIndex, endIndex + 1));
|
|
74
|
+
};
|
|
75
|
+
var runTsxHelper = ({
|
|
76
|
+
helperFile,
|
|
77
|
+
args,
|
|
78
|
+
cwd
|
|
79
|
+
}) => {
|
|
80
|
+
const result = runCommandResult({
|
|
81
|
+
command: process.execPath,
|
|
82
|
+
args: [...resolveDevtoolsHelperArgs(helperFile), ...args],
|
|
83
|
+
cwd
|
|
84
|
+
});
|
|
85
|
+
if (!result.ok) {
|
|
86
|
+
throw new Error(
|
|
87
|
+
`Air Jam visual helper failed.
|
|
88
|
+
|
|
89
|
+
${result.stderr || result.stdout}`
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
return parseHelperJson2(result.stdout);
|
|
93
|
+
};
|
|
94
|
+
var resolveVisualSource = async (configPath) => {
|
|
95
|
+
if (!configPath) {
|
|
96
|
+
return null;
|
|
97
|
+
}
|
|
98
|
+
const scenarioModulePath = await inspectAirJamAgentConfig(configPath).then(
|
|
99
|
+
(inspection) => inspection.visualScenariosModulePath
|
|
100
|
+
);
|
|
101
|
+
return scenarioModulePath ? { configPath, scenarioModulePath } : null;
|
|
102
|
+
};
|
|
103
|
+
var readScenarioMetadata = async ({
|
|
104
|
+
artifactRoot,
|
|
105
|
+
summary
|
|
106
|
+
}) => {
|
|
107
|
+
const entries = await Promise.all(
|
|
108
|
+
summary.scenarios.map(async (scenario) => {
|
|
109
|
+
const metadataPath = path2.join(
|
|
110
|
+
artifactRoot,
|
|
111
|
+
scenario.relativeDir,
|
|
112
|
+
"metadata.json"
|
|
113
|
+
);
|
|
114
|
+
return await pathExists(metadataPath) ? readJsonFile(metadataPath) : null;
|
|
115
|
+
})
|
|
116
|
+
);
|
|
117
|
+
return entries.filter(
|
|
118
|
+
(entry) => entry !== null
|
|
119
|
+
);
|
|
120
|
+
};
|
|
121
|
+
var listVisualScenarios = async ({
|
|
122
|
+
cwd = process.cwd(),
|
|
123
|
+
gameId
|
|
124
|
+
} = {}) => {
|
|
125
|
+
const game = await inspectGame({ cwd, gameId });
|
|
126
|
+
const source = await resolveVisualSource(game.configPath);
|
|
127
|
+
if (!source) {
|
|
128
|
+
throw new Error(
|
|
129
|
+
`No visual scenarios published for "${game.id}" in ${game.rootDir}.`
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
const result = runTsxHelper({
|
|
133
|
+
helperFile: resolveDevtoolsHelperScript("list-visual-scenarios.ts"),
|
|
134
|
+
cwd: game.rootDir,
|
|
135
|
+
args: [`--config=${source.configPath}`]
|
|
136
|
+
});
|
|
137
|
+
return {
|
|
138
|
+
gameId: result.gameId,
|
|
139
|
+
scenarioModulePath: source.scenarioModulePath,
|
|
140
|
+
scenarios: result.scenarios
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
var withVisualSession = async ({
|
|
144
|
+
cwd = process.cwd(),
|
|
145
|
+
gameId,
|
|
146
|
+
mode = "standalone-dev",
|
|
147
|
+
secure = false,
|
|
148
|
+
run
|
|
149
|
+
}) => {
|
|
150
|
+
const game = await inspectGame({ cwd, gameId });
|
|
151
|
+
const visualSource = await resolveVisualSource(game.configPath);
|
|
152
|
+
if (!visualSource) {
|
|
153
|
+
throw new Error(
|
|
154
|
+
`No visual scenarios published for "${game.id}" in ${game.rootDir}.`
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
const attachedTopology = await tryAttachToRunningDev({
|
|
158
|
+
cwd,
|
|
159
|
+
gameId: game.id,
|
|
160
|
+
mode,
|
|
161
|
+
secure
|
|
162
|
+
});
|
|
163
|
+
const session = attachedTopology ? {
|
|
164
|
+
topology: attachedTopology,
|
|
165
|
+
reusedExistingProcess: true,
|
|
166
|
+
managedProcessId: attachedTopology.process?.id ?? null
|
|
167
|
+
} : await startDev({ cwd, gameId: game.id, mode, secure }).then(
|
|
168
|
+
(started) => ({
|
|
169
|
+
topology: started.topology,
|
|
170
|
+
reusedExistingProcess: started.reusedExistingProcess,
|
|
171
|
+
managedProcessId: started.process.id
|
|
172
|
+
})
|
|
173
|
+
);
|
|
174
|
+
try {
|
|
175
|
+
return await run({ game, visualSource, topology: session.topology });
|
|
176
|
+
} finally {
|
|
177
|
+
if (!session.reusedExistingProcess && session.managedProcessId) {
|
|
178
|
+
await stopDev({ cwd, processId: session.managedProcessId });
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
var captureGameAtRuntime = async ({
|
|
183
|
+
game,
|
|
184
|
+
visualSource,
|
|
185
|
+
scenarioId,
|
|
186
|
+
mode,
|
|
187
|
+
secure,
|
|
188
|
+
urls,
|
|
189
|
+
artifactRoot
|
|
190
|
+
}) => {
|
|
191
|
+
const resolvedUrls = captureUrlsSchema.parse(urls);
|
|
192
|
+
runTsxHelper({
|
|
193
|
+
helperFile: resolveDevtoolsHelperScript("run-visual-capture.ts"),
|
|
194
|
+
cwd: game.rootDir,
|
|
195
|
+
args: [
|
|
196
|
+
`--game-id=${game.id}`,
|
|
197
|
+
`--config=${visualSource.configPath}`,
|
|
198
|
+
`--module-path=${visualSource.scenarioModulePath}`,
|
|
199
|
+
`--artifact-root=${artifactRoot}`,
|
|
200
|
+
`--mode=${mode === "arcade-built" ? "arcade-test" : "standalone-dev"}`,
|
|
201
|
+
`--app-origin=${resolvedUrls.appOrigin}`,
|
|
202
|
+
`--host-url=${resolvedUrls.hostUrl}`,
|
|
203
|
+
`--controller-base-url=${resolvedUrls.controllerBaseUrl}`,
|
|
204
|
+
`--public-host=${resolvedUrls.publicHost}`,
|
|
205
|
+
...resolvedUrls.localBuildUrl ? [`--local-build-url=${resolvedUrls.localBuildUrl}`] : [],
|
|
206
|
+
...resolvedUrls.browserBuildUrl ? [`--browser-build-url=${resolvedUrls.browserBuildUrl}`] : [],
|
|
207
|
+
...scenarioId ? [`--scenario-id=${scenarioId}`] : [],
|
|
208
|
+
...secure ? ["--secure"] : []
|
|
209
|
+
]
|
|
210
|
+
});
|
|
211
|
+
const summaryPath = path2.join(artifactRoot, game.id, "capture-summary.json");
|
|
212
|
+
const summary = await readJsonFile(summaryPath);
|
|
213
|
+
return {
|
|
214
|
+
gameId: game.id,
|
|
215
|
+
artifactRoot,
|
|
216
|
+
summaryPath,
|
|
217
|
+
summary,
|
|
218
|
+
scenarios: await readScenarioMetadata({ artifactRoot, summary })
|
|
219
|
+
};
|
|
220
|
+
};
|
|
221
|
+
var captureVisualsAtRuntime = async ({
|
|
222
|
+
cwd = process.cwd(),
|
|
223
|
+
gameId,
|
|
224
|
+
...runtime
|
|
225
|
+
}) => {
|
|
226
|
+
const game = await inspectGame({ cwd, gameId });
|
|
227
|
+
const visualSource = await resolveVisualSource(game.configPath);
|
|
228
|
+
if (!visualSource) {
|
|
229
|
+
throw new Error(
|
|
230
|
+
`No visual scenarios published for "${game.id}" in ${game.rootDir}.`
|
|
231
|
+
);
|
|
232
|
+
}
|
|
233
|
+
return captureGameAtRuntime({ game, visualSource, ...runtime });
|
|
234
|
+
};
|
|
235
|
+
var captureVisuals = async ({
|
|
236
|
+
cwd = process.cwd(),
|
|
237
|
+
gameId,
|
|
238
|
+
scenarioId,
|
|
239
|
+
mode = "standalone-dev",
|
|
240
|
+
secure = false
|
|
241
|
+
} = {}) => withVisualSession({
|
|
242
|
+
cwd,
|
|
243
|
+
gameId,
|
|
244
|
+
mode,
|
|
245
|
+
secure,
|
|
246
|
+
run: ({ game, visualSource, topology }) => captureGameAtRuntime({
|
|
247
|
+
game,
|
|
248
|
+
visualSource,
|
|
249
|
+
scenarioId,
|
|
250
|
+
mode: mode === "arcade-test" ? "arcade-built" : "standalone-dev",
|
|
251
|
+
secure,
|
|
252
|
+
urls: topology.urls,
|
|
253
|
+
artifactRoot: resolveVisualArtifactRoot(
|
|
254
|
+
topology.process?.cwd ?? game.rootDir
|
|
255
|
+
)
|
|
256
|
+
})
|
|
257
|
+
});
|
|
258
|
+
export {
|
|
259
|
+
captureVisuals,
|
|
260
|
+
captureVisualsAtRuntime,
|
|
261
|
+
listVisualScenarios
|
|
262
|
+
};
|
|
263
|
+
//# sourceMappingURL=visual.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/visual.ts","../src/tooling/airjam-agent-inspection.ts"],"sourcesContent":["import path from \"node:path\";\nimport { z } from \"zod\";\nimport { runCommandResult } from \"./commands.js\";\nimport {\n getTopology,\n startDev,\n stopDev,\n tryAttachToRunningDev,\n} from \"./dev.js\";\nimport { pathExists, readJsonFile } from \"./fs-utils.js\";\nimport { inspectGame } from \"./games.js\";\nimport {\n resolveDevtoolsHelperArgs,\n resolveDevtoolsHelperScript,\n} from \"./helper-scripts.js\";\nimport { inspectAirJamAgentConfig } from \"./tooling/airjam-agent-inspection.js\";\nimport type {\n AirJamSurfaceUrlSummary,\n AirJamVisualArtifactMode,\n AirJamVisualCaptureInspection,\n AirJamVisualCaptureSummary,\n AirJamVisualScenarioList,\n AirJamVisualScenarioMetadata,\n CaptureVisualsOptions,\n CaptureVisualsResult,\n ListVisualScenariosOptions,\n} from \"./types.js\";\n\nexport type {\n AirJamVisualArtifactMode,\n AirJamVisualCaptureInspection,\n AirJamVisualCaptureSummary,\n AirJamVisualScenarioList,\n AirJamVisualScenarioMetadata,\n CaptureVisualsOptions,\n CaptureVisualsResult,\n ListVisualScenariosOptions,\n} from \"./types.js\";\n\ntype ResolvedVisualSource = {\n configPath: string;\n scenarioModulePath: string;\n};\n\nconst captureUrlsSchema = z.object({\n appOrigin: z.url(),\n hostUrl: z.url(),\n controllerBaseUrl: z.url(),\n publicHost: z.url(),\n localBuildUrl: z.url().nullable(),\n browserBuildUrl: z.url().nullable(),\n});\n\nexport type CaptureVisualsAtRuntimeOptions = Pick<\n CaptureVisualsOptions,\n \"cwd\" | \"gameId\" | \"scenarioId\" | \"secure\"\n> & {\n mode: AirJamVisualArtifactMode;\n urls: AirJamSurfaceUrlSummary;\n artifactRoot: string;\n};\n\nconst resolveVisualArtifactRoot = (rootDir: string): string =>\n path.join(rootDir, \".airjam\", \"artifacts\", \"visual\");\n\nconst parseHelperJson = <T>(output: string): T => {\n const startIndex = output.indexOf(\"{\");\n const endIndex = output.lastIndexOf(\"}\");\n if (startIndex === -1 || endIndex === -1 || endIndex < startIndex) {\n throw new Error(`Expected JSON helper output but received:\\n${output}`);\n }\n\n return JSON.parse(output.slice(startIndex, endIndex + 1)) as T;\n};\n\nconst runTsxHelper = <T>({\n helperFile,\n args,\n cwd,\n}: {\n helperFile: string;\n args: string[];\n cwd: string;\n}): T => {\n const result = runCommandResult({\n command: process.execPath,\n args: [...resolveDevtoolsHelperArgs(helperFile), ...args],\n cwd,\n });\n if (!result.ok) {\n throw new Error(\n `Air Jam visual helper failed.\\n\\n${result.stderr || result.stdout}`,\n );\n }\n\n return parseHelperJson<T>(result.stdout);\n};\n\nconst resolveVisualSource = async (\n configPath: string | null,\n): Promise<ResolvedVisualSource | null> => {\n if (!configPath) {\n return null;\n }\n\n const scenarioModulePath = await inspectAirJamAgentConfig(configPath).then(\n (inspection) => inspection.visualScenariosModulePath,\n );\n return scenarioModulePath ? { configPath, scenarioModulePath } : null;\n};\n\nconst readScenarioMetadata = async ({\n artifactRoot,\n summary,\n}: {\n artifactRoot: string;\n summary: AirJamVisualCaptureInspection[\"summary\"];\n}): Promise<AirJamVisualScenarioMetadata[]> => {\n const entries = await Promise.all(\n summary.scenarios.map(async (scenario) => {\n const metadataPath = path.join(\n artifactRoot,\n scenario.relativeDir,\n \"metadata.json\",\n );\n return (await pathExists(metadataPath))\n ? readJsonFile<AirJamVisualScenarioMetadata>(metadataPath)\n : null;\n }),\n );\n\n return entries.filter(\n (entry): entry is AirJamVisualScenarioMetadata => entry !== null,\n );\n};\n\nexport const listVisualScenarios = async ({\n cwd = process.cwd(),\n gameId,\n}: ListVisualScenariosOptions = {}): Promise<AirJamVisualScenarioList> => {\n const game = await inspectGame({ cwd, gameId });\n const source = await resolveVisualSource(game.configPath);\n if (!source) {\n throw new Error(\n `No visual scenarios published for \"${game.id}\" in ${game.rootDir}.`,\n );\n }\n\n const result = runTsxHelper<{\n gameId: string;\n scenarios: AirJamVisualScenarioList[\"scenarios\"];\n }>({\n helperFile: resolveDevtoolsHelperScript(\"list-visual-scenarios.ts\"),\n cwd: game.rootDir,\n args: [`--config=${source.configPath}`],\n });\n return {\n gameId: result.gameId,\n scenarioModulePath: source.scenarioModulePath,\n scenarios: result.scenarios,\n };\n};\n\nconst withVisualSession = async <T>({\n cwd = process.cwd(),\n gameId,\n mode = \"standalone-dev\",\n secure = false,\n run,\n}: {\n cwd?: string;\n gameId?: string;\n mode?: \"standalone-dev\" | \"arcade-dev\" | \"arcade-test\";\n secure?: boolean;\n run: (input: {\n game: Awaited<ReturnType<typeof inspectGame>>;\n visualSource: ResolvedVisualSource;\n topology: Awaited<ReturnType<typeof getTopology>>;\n }) => Promise<T>;\n}): Promise<T> => {\n const game = await inspectGame({ cwd, gameId });\n const visualSource = await resolveVisualSource(game.configPath);\n if (!visualSource) {\n throw new Error(\n `No visual scenarios published for \"${game.id}\" in ${game.rootDir}.`,\n );\n }\n\n const attachedTopology = await tryAttachToRunningDev({\n cwd,\n gameId: game.id,\n mode,\n secure,\n });\n const session = attachedTopology\n ? {\n topology: attachedTopology,\n reusedExistingProcess: true,\n managedProcessId: attachedTopology.process?.id ?? null,\n }\n : await startDev({ cwd, gameId: game.id, mode, secure }).then(\n (started) => ({\n topology: started.topology,\n reusedExistingProcess: started.reusedExistingProcess,\n managedProcessId: started.process.id,\n }),\n );\n\n try {\n return await run({ game, visualSource, topology: session.topology });\n } finally {\n if (!session.reusedExistingProcess && session.managedProcessId) {\n await stopDev({ cwd, processId: session.managedProcessId });\n }\n }\n};\n\nconst captureGameAtRuntime = async ({\n game,\n visualSource,\n scenarioId,\n mode,\n secure,\n urls,\n artifactRoot,\n}: Omit<CaptureVisualsAtRuntimeOptions, \"cwd\" | \"gameId\"> & {\n game: Awaited<ReturnType<typeof inspectGame>>;\n visualSource: ResolvedVisualSource;\n}): Promise<CaptureVisualsResult> => {\n const resolvedUrls = captureUrlsSchema.parse(urls);\n runTsxHelper<AirJamVisualCaptureSummary>({\n helperFile: resolveDevtoolsHelperScript(\"run-visual-capture.ts\"),\n cwd: game.rootDir,\n args: [\n `--game-id=${game.id}`,\n `--config=${visualSource.configPath}`,\n `--module-path=${visualSource.scenarioModulePath}`,\n `--artifact-root=${artifactRoot}`,\n `--mode=${mode === \"arcade-built\" ? \"arcade-test\" : \"standalone-dev\"}`,\n `--app-origin=${resolvedUrls.appOrigin}`,\n `--host-url=${resolvedUrls.hostUrl}`,\n `--controller-base-url=${resolvedUrls.controllerBaseUrl}`,\n `--public-host=${resolvedUrls.publicHost}`,\n ...(resolvedUrls.localBuildUrl\n ? [`--local-build-url=${resolvedUrls.localBuildUrl}`]\n : []),\n ...(resolvedUrls.browserBuildUrl\n ? [`--browser-build-url=${resolvedUrls.browserBuildUrl}`]\n : []),\n ...(scenarioId ? [`--scenario-id=${scenarioId}`] : []),\n ...(secure ? [\"--secure\"] : []),\n ],\n });\n const summaryPath = path.join(artifactRoot, game.id, \"capture-summary.json\");\n const summary = await readJsonFile<AirJamVisualCaptureSummary>(summaryPath);\n return {\n gameId: game.id,\n artifactRoot,\n summaryPath,\n summary,\n scenarios: await readScenarioMetadata({ artifactRoot, summary }),\n };\n};\n\nexport const captureVisualsAtRuntime = async ({\n cwd = process.cwd(),\n gameId,\n ...runtime\n}: CaptureVisualsAtRuntimeOptions): Promise<CaptureVisualsResult> => {\n const game = await inspectGame({ cwd, gameId });\n const visualSource = await resolveVisualSource(game.configPath);\n if (!visualSource) {\n throw new Error(\n `No visual scenarios published for \"${game.id}\" in ${game.rootDir}.`,\n );\n }\n return captureGameAtRuntime({ game, visualSource, ...runtime });\n};\n\nexport const captureVisuals = async ({\n cwd = process.cwd(),\n gameId,\n scenarioId,\n mode = \"standalone-dev\",\n secure = false,\n}: CaptureVisualsOptions = {}): Promise<CaptureVisualsResult> =>\n withVisualSession({\n cwd,\n gameId,\n mode,\n secure,\n run: ({ game, visualSource, topology }) =>\n captureGameAtRuntime({\n game,\n visualSource,\n scenarioId,\n mode: mode === \"arcade-test\" ? \"arcade-built\" : \"standalone-dev\",\n secure,\n urls: topology.urls,\n artifactRoot: resolveVisualArtifactRoot(\n topology.process?.cwd ?? game.rootDir,\n ),\n }),\n });\n","import path from \"node:path\";\nimport { runCommandResult } from \"../commands.js\";\nimport {\n resolveDevtoolsHelperArgs,\n resolveDevtoolsHelperScript,\n} from \"../helper-scripts.js\";\n\ntype AirJamAgentInspection = {\n hasAgent: boolean;\n visualScenariosModulePath: string | null;\n};\n\nconst parseHelperJson = <T>(output: string): T => {\n const startIndex = output.indexOf(\"{\");\n const endIndex = output.lastIndexOf(\"}\");\n if (startIndex === -1 || endIndex === -1 || endIndex < startIndex) {\n throw new Error(`Expected JSON helper output but received:\\n${output}`);\n }\n\n return JSON.parse(output.slice(startIndex, endIndex + 1)) as T;\n};\n\nexport const inspectAirJamAgentConfig = async (\n configPath: string,\n): Promise<AirJamAgentInspection> => {\n const result = runCommandResult({\n command: process.execPath,\n args: [\n ...resolveDevtoolsHelperArgs(\n resolveDevtoolsHelperScript(\"inspect-airjam-agent.ts\"),\n ),\n \"--config\",\n configPath,\n ],\n cwd: path.dirname(configPath),\n });\n\n if (!result.ok) {\n throw new Error(\n `Air Jam agent config hel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yC,WAAW;AAC1E,SAAO;AAAA,IACL,QAAQ,KAAK;AAAA,IACb;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW,MAAM,qBAAqB,EAAE,cAAc,QAAQ,CAAC;AAAA,EACjE;AACF;AAEO,IAAM,0BAA0B,OAAO;AAAA,EAC5C,MAAM,QAAQ,IAAI;AAAA,EAClB;AAAA,EACA,GAAG;AACL,MAAqE;AACnE,QAAM,OAAO,MAAM,YAAY,EAAE,KAAK,OAAO,CAAC;AAC9C,QAAM,eAAe,MAAM,oBAAoB,KAAK,UAAU;AAC9D,MAAI,CAAC,cAAc;AACjB,UAAM,IAAI;AAAA,MACR,sCAAsC,KAAK,EAAE,QAAQ,KAAK,OAAO;AAAA,IACnE;AAAA,EACF;AACA,SAAO,qBAAqB,EAAE,MAAM,cAAc,GAAG,QAAQ,CAAC;AAChE;AAEO,IAAM,iBAAiB,OAAO;AAAA,EACnC,MAAM,QAAQ,IAAI;AAAA,EAClB;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,SAAS;AACX,IAA2B,CAAC,MAC1B,kBAAkB;AAAA,EAChB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,KAAK,CAAC,EAAE,MAAM,cAAc,SAAS,MACnC,qBAAqB;AAAA,IACnB;AAAA,IACA;AAAA,IACA;AAAA,IACA,MAAM,SAAS,gBAAgB,iBAAiB;AAAA,IAChD;AAAA,IACA,MAAM,SAAS;AAAA,IACf,cAAc;AAAA,MACZ,SAAS,SAAS,OAAO,KAAK;AAAA,IAChC;AAAA,EACF,CAAC;AACL,CAAC;","names":["path","path","parseHelperJson"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,116 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@air-jam/devtools",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
|
|
3
|
+
"version": "0.9.3",
|
|
4
|
+
"engines": {
|
|
5
|
+
"node": ">=22.0.0"
|
|
6
|
+
},
|
|
7
|
+
"description": "Air Jam authoring, inspection and evaluation toolchain for CLI, MCP and Studio consumers",
|
|
8
|
+
"private": false,
|
|
9
|
+
"type": "module",
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://github.com/vucinatim/air-jam.git",
|
|
14
|
+
"directory": "packages/devtools"
|
|
15
|
+
},
|
|
16
|
+
"homepage": "https://github.com/vucinatim/air-jam#readme",
|
|
17
|
+
"bugs": {
|
|
18
|
+
"url": "https://github.com/vucinatim/air-jam/issues"
|
|
19
|
+
},
|
|
20
|
+
"exports": {
|
|
21
|
+
"./harness/visual": {
|
|
22
|
+
"types": "./dist/harness/visual.d.ts",
|
|
23
|
+
"import": "./dist/harness/visual.js"
|
|
24
|
+
},
|
|
25
|
+
"./mcp-config": {
|
|
26
|
+
"types": "./dist/mcp-config.d.ts",
|
|
27
|
+
"import": "./dist/mcp-config.js"
|
|
28
|
+
},
|
|
29
|
+
"./controller": {
|
|
30
|
+
"types": "./dist/controller.d.ts",
|
|
31
|
+
"import": "./dist/controller.js"
|
|
32
|
+
},
|
|
33
|
+
"./agent": {
|
|
34
|
+
"types": "./dist/agent.d.ts",
|
|
35
|
+
"import": "./dist/agent.js"
|
|
36
|
+
},
|
|
37
|
+
"./context": {
|
|
38
|
+
"types": "./dist/context.d.ts",
|
|
39
|
+
"import": "./dist/context.js"
|
|
40
|
+
},
|
|
41
|
+
"./dev": {
|
|
42
|
+
"types": "./dist/dev.d.ts",
|
|
43
|
+
"import": "./dist/dev.js"
|
|
44
|
+
},
|
|
45
|
+
"./game-session": {
|
|
46
|
+
"types": "./dist/game-session.d.ts",
|
|
47
|
+
"import": "./dist/game-session.js"
|
|
48
|
+
},
|
|
49
|
+
"./game-session-broker": {
|
|
50
|
+
"types": "./dist/game-session-broker.d.ts",
|
|
51
|
+
"import": "./dist/game-session-broker.js"
|
|
52
|
+
},
|
|
53
|
+
"./games": {
|
|
54
|
+
"types": "./dist/games.d.ts",
|
|
55
|
+
"import": "./dist/games.js"
|
|
56
|
+
},
|
|
57
|
+
"./logs": {
|
|
58
|
+
"types": "./dist/logs.d.ts",
|
|
59
|
+
"import": "./dist/logs.js"
|
|
60
|
+
},
|
|
61
|
+
"./platform-auth": {
|
|
62
|
+
"types": "./dist/platform-auth.d.ts",
|
|
63
|
+
"import": "./dist/platform-auth.js"
|
|
64
|
+
},
|
|
65
|
+
"./platform-game-media": {
|
|
66
|
+
"types": "./dist/platform-game-media.d.ts",
|
|
67
|
+
"import": "./dist/platform-game-media.js"
|
|
68
|
+
},
|
|
69
|
+
"./platform-games": {
|
|
70
|
+
"types": "./dist/platform-games.d.ts",
|
|
71
|
+
"import": "./dist/platform-games.js"
|
|
72
|
+
},
|
|
73
|
+
"./quality": {
|
|
74
|
+
"types": "./dist/quality.d.ts",
|
|
75
|
+
"import": "./dist/quality.js"
|
|
76
|
+
},
|
|
77
|
+
"./release": {
|
|
78
|
+
"types": "./dist/release.d.ts",
|
|
79
|
+
"import": "./dist/release.js"
|
|
80
|
+
},
|
|
81
|
+
"./visual": {
|
|
82
|
+
"types": "./dist/visual.d.ts",
|
|
83
|
+
"import": "./dist/visual.js"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"files": [
|
|
87
|
+
"dist",
|
|
88
|
+
"src"
|
|
89
|
+
],
|
|
90
|
+
"dependencies": {
|
|
91
|
+
"@air-jam/sdk": "^0.9.3",
|
|
92
|
+
"cross-spawn": "^7.0.6",
|
|
93
|
+
"playwright-core": "^1.58.2",
|
|
94
|
+
"socket.io-client": "^4.8.3",
|
|
95
|
+
"tsx": "^4.20.6",
|
|
96
|
+
"yauzl": "^3.2.1",
|
|
97
|
+
"yazl": "^3.3.1",
|
|
98
|
+
"zod": "^4.2.1"
|
|
99
|
+
},
|
|
100
|
+
"devDependencies": {
|
|
101
|
+
"@types/node": "^24.10.1",
|
|
102
|
+
"@types/cross-spawn": "^6.0.6",
|
|
103
|
+
"@types/yauzl": "^2.10.3",
|
|
104
|
+
"@types/yazl": "^2.4.5",
|
|
105
|
+
"socket.io": "^4.8.1",
|
|
106
|
+
"tsup": "^8.5.1",
|
|
107
|
+
"typescript": "~5.9.3",
|
|
108
|
+
"vitest": "^3.2.4"
|
|
109
|
+
},
|
|
110
|
+
"scripts": {
|
|
111
|
+
"build": "node ../../scripts/ensure-workspace-package-build.mjs @air-jam/sdk && tsup",
|
|
112
|
+
"test": "node ../../scripts/ensure-workspace-package-build.mjs @air-jam/sdk && vitest run --config vitest.config.ts",
|
|
113
|
+
"test:watch": "vitest --config vitest.config.ts",
|
|
114
|
+
"typecheck": "node ../../scripts/ensure-workspace-package-build.mjs @air-jam/sdk && tsc --noEmit && tsc -p tests/tsconfig.json --noEmit"
|
|
115
|
+
}
|
|
6
116
|
}
|