@babylonjs-toolkit/agent 1.2.4 → 1.2.5
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 +1 -1
- package/package.json +1 -1
- package/skills/bt-execute/scripts/dashboard.mjs +16 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Babylon Toolkit Desktop Agent (1.2.
|
|
1
|
+
# Babylon Toolkit Desktop Agent (1.2.5)
|
|
2
2
|
|
|
3
3
|
The desktop agent owns the entire pipeline end to end — frontend and UI design, gameplay code, shaders, generated art and audio, 3D models in headless Blender, whole game levels and prefabs in a terminal-driven Unity Editor, the interactive glTF export, the web build, the dev server, and visual QA by screenshotting both Unity and the running browser.
|
|
4
4
|
|
package/package.json
CHANGED
|
@@ -107,13 +107,28 @@ const SNAPSHOT_SHAPES_HELP = [
|
|
|
107
107
|
|
|
108
108
|
const [command, featureFolder, ...rest] = process.argv.slice(2);
|
|
109
109
|
|
|
110
|
+
/**
|
|
111
|
+
* The feature's slug: the folder's name, as bt-spec creates it. A folder renamed after the fact keeps its files'
|
|
112
|
+
* original names, so when `documents/<folder name>_dashboard.js` is missing and the folder holds exactly one
|
|
113
|
+
* `documents/*_dashboard.js`, that file's prefix is the slug.
|
|
114
|
+
* @param {string} folder The feature folder.
|
|
115
|
+
* @returns {string}
|
|
116
|
+
*/
|
|
117
|
+
function featureSlug(folder) {
|
|
118
|
+
const folderName = basename(folder.replace(/[\\/]+$/, ''));
|
|
119
|
+
const documentsFolder = join(folder, 'documents');
|
|
120
|
+
if (existsSync(join(documentsFolder, `${folderName}_dashboard.js`)) || !existsSync(documentsFolder)) return folderName;
|
|
121
|
+
const dataFiles = readdirSync(documentsFolder).filter((name) => name.endsWith('_dashboard.js'));
|
|
122
|
+
return dataFiles.length === 1 ? dataFiles[0].slice(0, -'_dashboard.js'.length) : folderName;
|
|
123
|
+
}
|
|
124
|
+
|
|
110
125
|
/**
|
|
111
126
|
* Reads the paths of a feature folder's two data files.
|
|
112
127
|
* @param {string} folder The feature folder, `.agents/specs/<slug>`.
|
|
113
128
|
* @returns {{ slug: string, dashboardPath: string, livePath: string }}
|
|
114
129
|
*/
|
|
115
130
|
function dataPaths(folder) {
|
|
116
|
-
const slug =
|
|
131
|
+
const slug = featureSlug(folder);
|
|
117
132
|
return {
|
|
118
133
|
slug,
|
|
119
134
|
dashboardPath: join(folder, 'documents', `${slug}_dashboard.js`),
|