@dcl-regenesislabs/opendcl 0.1.4-22337368589.commit-8d0fe5a → 0.1.4-22555336781.commit-12e2bc1
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.
|
@@ -6,10 +6,12 @@ Premium 3D models from the official Decentraland Creator Hub. All models are fre
|
|
|
6
6
|
|
|
7
7
|
**How to use**:
|
|
8
8
|
1. Find a model below that matches your scene
|
|
9
|
-
2. Download it
|
|
10
|
-
|
|
9
|
+
2. Download it — the output path **must** start with `models/`:
|
|
10
|
+
`curl -o models/<filename>.glb "<URL>"`
|
|
11
|
+
3. Reference it: `GltfContainer.create(entity, { src: 'models/<filename>.glb' })`
|
|
11
12
|
|
|
12
|
-
> **Important**:
|
|
13
|
+
> **Important**: Always download into `models/`. Never write to the scene root.
|
|
14
|
+
> Correct: `curl -o models/Sofa_Black.glb "..."` | Wrong: `curl -o Sofa_Black.glb "..."`
|
|
13
15
|
|
|
14
16
|
---
|
|
15
17
|
|
package/context/audio-catalog.md
CHANGED
|
@@ -6,10 +6,12 @@ Free audio files from the official Decentraland Creator Hub asset packs. All sou
|
|
|
6
6
|
|
|
7
7
|
**How to use**:
|
|
8
8
|
1. Find a sound below that matches your scene
|
|
9
|
-
2. Download it
|
|
10
|
-
|
|
9
|
+
2. Download it — the output path **must** start with `sounds/`:
|
|
10
|
+
`curl -o sounds/<filename>.mp3 "<URL>"`
|
|
11
|
+
3. Reference it: `AudioSource.create(entity, { audioClipUrl: 'sounds/<filename>.mp3', playing: true, loop: false })`
|
|
11
12
|
|
|
12
|
-
> **Important**:
|
|
13
|
+
> **Important**: Always download into `sounds/`. Never write to the scene root.
|
|
14
|
+
> Correct: `curl -o sounds/click.mp3 "..."` | Wrong: `curl -o click.mp3 "..."`
|
|
13
15
|
|
|
14
16
|
---
|
|
15
17
|
|
|
@@ -9,6 +9,15 @@ Free CC0-licensed GLB 3D models curated from the [Open Source 3D Assets](https:/
|
|
|
9
9
|
- **Creator**: Polygonal Mind
|
|
10
10
|
- **License**: CC0 (Public Domain)
|
|
11
11
|
|
|
12
|
+
**How to use**:
|
|
13
|
+
1. Find a model below that matches your scene
|
|
14
|
+
2. Download it — the output path **must** start with `models/`:
|
|
15
|
+
`curl -o models/<filename>.glb "<URL>"`
|
|
16
|
+
3. Reference it: `GltfContainer.create(entity, { src: 'models/<filename>.glb' })`
|
|
17
|
+
|
|
18
|
+
> **Important**: Always download into `models/`. Never write to the scene root.
|
|
19
|
+
> Correct: `curl -o models/Tree_01.glb "..."` | Wrong: `curl -o Tree_01.glb "..."`
|
|
20
|
+
|
|
12
21
|
Base URL for all downloads:
|
|
13
22
|
```
|
|
14
23
|
https://raw.githubusercontent.com/ToxSam/cc0-models-Polygonal-Mind/main/projects/
|
package/dist/index.js
CHANGED
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,WAAW,CAAC;AAE1C,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AACtC,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AA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AAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,UAAU,EAAE,cAAc,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC;AAClG,eAAe,CAAC,SAAiB,CAAC,sBAAsB,GAAG;IACzD,IAAY,CAAC,UAAU,CACtB,YAAY,cAAc,gEAAgE,cAAc,EAAE,CAC3G,CAAC;AACJ,CAAC,CAAC;AAEF,yFAAyF;AACzF,uFAAuF;AACvF,8FAA8F;AAC9F,2EAA2E;AAC3E,MAAM,WAAW,GAAI,eAAe,CAAC,SAAiB,CAAC,2BAA2B,CAAC;AAClF,eAAe,CAAC,SAAiB,CAAC,2BAA2B,GAAG,UAAU,QAAgB;IACzF,MAAM,QAAQ,GAAG,WAAW,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAClD,IAAI,QAAQ;QAAE,OAAO,QAAQ,CAAC;IAC9B,OAAO,wBAAwB,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"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Asset Path Guard Extension
|
|
3
|
+
*
|
|
4
|
+
* Blocks curl downloads that place asset files in the wrong directory.
|
|
5
|
+
* Models (.glb/.gltf) must go into models/, audio (.mp3/.ogg/.wav) into sounds/.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import type { ExtensionFactory } from "@mariozechner/pi-coding-agent";
|
|
9
|
+
|
|
10
|
+
interface AssetViolation {
|
|
11
|
+
file: string;
|
|
12
|
+
expected: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const ASSET_RULES: { pattern: RegExp; dir: string }[] = [
|
|
16
|
+
{ pattern: /\.gl(?:b|tf)$/i, dir: "models/" },
|
|
17
|
+
{ pattern: /\.(?:mp3|ogg|wav)$/i, dir: "sounds/" },
|
|
18
|
+
];
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Check a curl command for asset files downloaded to the wrong directory.
|
|
22
|
+
* Returns null if the command is fine, or a violation object if it should be blocked.
|
|
23
|
+
*/
|
|
24
|
+
export function checkCurlOutput(command: string): AssetViolation | null {
|
|
25
|
+
const outputMatches = command.matchAll(/-o\s+["']?([^\s"']+)/g);
|
|
26
|
+
for (const match of outputMatches) {
|
|
27
|
+
const outputPath = match[1];
|
|
28
|
+
for (const rule of ASSET_RULES) {
|
|
29
|
+
if (rule.pattern.test(outputPath) && !outputPath.includes(rule.dir)) {
|
|
30
|
+
const relativePath = outputPath.replace(/^\.\//, "");
|
|
31
|
+
return {
|
|
32
|
+
file: relativePath,
|
|
33
|
+
expected: rule.dir + relativePath,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const extension: ExtensionFactory = (pi) => {
|
|
42
|
+
pi.on("tool_call", async (event) => {
|
|
43
|
+
if (event.toolName !== "bash") return;
|
|
44
|
+
|
|
45
|
+
const command = (event.input as { command?: string }).command ?? "";
|
|
46
|
+
const violation = checkCurlOutput(command);
|
|
47
|
+
if (!violation) return;
|
|
48
|
+
|
|
49
|
+
return {
|
|
50
|
+
block: true,
|
|
51
|
+
reason: [
|
|
52
|
+
"Asset files must be downloaded into the correct directory.",
|
|
53
|
+
`Use: curl -o ${violation.expected} instead of curl -o ${violation.file}`,
|
|
54
|
+
"Models (.glb/.gltf) → models/ Audio (.mp3/.ogg/.wav) → sounds/",
|
|
55
|
+
].join("\n"),
|
|
56
|
+
};
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export default extension;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcl-regenesislabs/opendcl",
|
|
3
|
-
"version": "0.1.4-
|
|
3
|
+
"version": "0.1.4-22555336781.commit-12e2bc1",
|
|
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": "12e2bc1a70db6216feafebf6564faa40515c72c0"
|
|
70
70
|
}
|