@dcl-regenesislabs/opendcl 0.1.3 → 0.1.4-22337368589.commit-8d0fe5a
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/dist/index.js
CHANGED
|
@@ -27,10 +27,14 @@ if (!existsSync(settingsPath)) {
|
|
|
27
27
|
}
|
|
28
28
|
// Build args: start with user's CLI args
|
|
29
29
|
const args = process.argv.slice(2);
|
|
30
|
-
// Inject DCL system prompt (
|
|
30
|
+
// Inject DCL system prompt (strip YAML frontmatter, resolve context/ paths to absolute)
|
|
31
31
|
if (!args.includes("--system-prompt")) {
|
|
32
32
|
const raw = readFileSync(join(packageDir, "prompts/system.md"), "utf-8");
|
|
33
|
-
const
|
|
33
|
+
const contextDir = join(packageDir, "context");
|
|
34
|
+
const systemPrompt = raw
|
|
35
|
+
.replace(/^---\n[\s\S]*?\n---\n/, "")
|
|
36
|
+
.replace(/context\/([\w-]+\.md)/g, (_, filename) => join(contextDir, filename))
|
|
37
|
+
.trim();
|
|
34
38
|
args.push("--system-prompt", systemPrompt);
|
|
35
39
|
}
|
|
36
40
|
// Load our extensions
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;GAIG;AAEH,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WA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AwB,CAAC,QAAQ,CAAC,CAAC;AAC5C,CAAC,CAAC;AAEF,IAAI,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACvB,OAAO,CAAC,KAAK,CAAC,sBAAsB,EAAE,GAAG,CAAC,CAAC;IAC3C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/extensions/dcl-init.ts
CHANGED
|
@@ -43,7 +43,7 @@ const extension: ExtensionFactory = (pi) => {
|
|
|
43
43
|
parameters: Type.Object({}),
|
|
44
44
|
async execute(_id, _params, _signal, _onUpdate, ctx) {
|
|
45
45
|
const result = await initScene(ctx.cwd, pi);
|
|
46
|
-
if (!result.isError) await ctx.reload();
|
|
46
|
+
if (!result.isError && 'reload' in ctx) await (ctx as any).reload();
|
|
47
47
|
return { content: [{ type: "text" as const, text: result.message }], details: undefined };
|
|
48
48
|
},
|
|
49
49
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcl-regenesislabs/opendcl",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4-22337368589.commit-8d0fe5a",
|
|
4
4
|
"description": "AI coding assistant for Decentraland SDK7 scene development",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"prompts/",
|
|
67
67
|
"context/"
|
|
68
68
|
],
|
|
69
|
-
"commit": "
|
|
69
|
+
"commit": "8d0fe5a0f4b0f42d764cb734512ce31a1dabb8a4"
|
|
70
70
|
}
|
|
@@ -97,7 +97,7 @@ Always check both asset catalogs before suggesting the user create or find their
|
|
|
97
97
|
|
|
98
98
|
### Creator Hub Asset Packs (2,700+ models)
|
|
99
99
|
|
|
100
|
-
Read `context/asset-packs-catalog.md` for official Decentraland models across 12 themed packs (Cyberpunk, Fantasy, Gallery, Sci-fi, Western, Pirates, etc.) with furniture, structures, decorations, nature, and more.
|
|
100
|
+
Read `{baseDir}/../../context/asset-packs-catalog.md` for official Decentraland models across 12 themed packs (Cyberpunk, Fantasy, Gallery, Sci-fi, Western, Pirates, etc.) with furniture, structures, decorations, nature, and more.
|
|
101
101
|
|
|
102
102
|
To use a Creator Hub model:
|
|
103
103
|
```bash
|
|
@@ -112,7 +112,7 @@ GltfContainer.create(entity, { src: 'models/arcade_machine.glb' })
|
|
|
112
112
|
|
|
113
113
|
### Open Source CC0 Models (991 models)
|
|
114
114
|
|
|
115
|
-
Read `context/open-source-3d-assets.md` for free CC0-licensed models from Polygonal Mind, organized by 18 themed collections (MomusPark, Medieval Fair, Cyberpunk, Sci-fi, etc.) with direct GitHub download URLs.
|
|
115
|
+
Read `{baseDir}/../../context/open-source-3d-assets.md` for free CC0-licensed models from Polygonal Mind, organized by 18 themed collections (MomusPark, Medieval Fair, Cyberpunk, Sci-fi, etc.) with direct GitHub download URLs.
|
|
116
116
|
|
|
117
117
|
```bash
|
|
118
118
|
curl -o models/tree.glb "https://raw.githubusercontent.com/ToxSam/cc0-models-Polygonal-Mind/main/projects/MomusPark/Tree_01_Art.glb"
|
|
@@ -204,7 +204,7 @@ To make audio non-spatial (same volume everywhere), there's no built-in flag —
|
|
|
204
204
|
|
|
205
205
|
Always check the audio catalog before creating placeholder sound file references. It contains 50 free sounds from the Creator Hub asset packs.
|
|
206
206
|
|
|
207
|
-
Read `context/audio-catalog.md` for music tracks (ambient, dance, medieval, sci-fi, etc.), ambient sounds (birds, city, factory, etc.), interaction sounds (buttons, doors, levers, chests), sound effects (explosions, sirens, bells), and game mechanic sounds (win/lose, heal, respawn, damage).
|
|
207
|
+
Read `{baseDir}/../../context/audio-catalog.md` for music tracks (ambient, dance, medieval, sci-fi, etc.), ambient sounds (birds, city, factory, etc.), interaction sounds (buttons, doors, levers, chests), sound effects (explosions, sirens, bells), and game mechanic sounds (win/lose, heal, respawn, damage).
|
|
208
208
|
|
|
209
209
|
To use a catalog sound:
|
|
210
210
|
```bash
|
|
@@ -24,9 +24,9 @@ Never manually create scene.json, package.json, or tsconfig.json — the SDK tem
|
|
|
24
24
|
|
|
25
25
|
Before writing scene code, check both asset catalogs for free models that match the user's theme:
|
|
26
26
|
|
|
27
|
-
1. Read `context/asset-packs-catalog.md` (2,700+ Creator Hub models — furniture, structures, decorations, nature, etc.)
|
|
28
|
-
2. Read `context/open-source-3d-assets.md` (991 CC0 models — cyberpunk, medieval, nature, sci-fi, etc.)
|
|
29
|
-
3. Read `context/audio-catalog.md` (50 free sounds — music, ambient, SFX, game mechanics, etc.)
|
|
27
|
+
1. Read `{baseDir}/../../context/asset-packs-catalog.md` (2,700+ Creator Hub models — furniture, structures, decorations, nature, etc.)
|
|
28
|
+
2. Read `{baseDir}/../../context/open-source-3d-assets.md` (991 CC0 models — cyberpunk, medieval, nature, sci-fi, etc.)
|
|
29
|
+
3. Read `{baseDir}/../../context/audio-catalog.md` (50 free sounds — music, ambient, SFX, game mechanics, etc.)
|
|
30
30
|
4. Suggest matching models and sounds to the user
|
|
31
31
|
5. Download selected models into the scene's `models/` directory:
|
|
32
32
|
```bash
|
|
@@ -279,4 +279,4 @@ Beyond the commonly used anchor points, the full list includes:
|
|
|
279
279
|
- **Never use `Transform.getMutable(engine.PlayerEntity)` to move the player** — it does not work. Always use `movePlayerTo` from `~system/RestrictedActions`
|
|
280
280
|
- `Transform.get(engine.PlayerEntity)` is valid for **reading** position only
|
|
281
281
|
|
|
282
|
-
For component field details, see `context/components-reference.md`.
|
|
282
|
+
For component field details, see `{baseDir}/../../context/components-reference.md`.
|