@dcl-regenesislabs/opendcl 0.1.4-22810336737.commit-ccefb95 → 0.1.4-22903887861.commit-4a41677

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 CHANGED
@@ -46,7 +46,7 @@ npm install -g @dcl-regenesislabs/opendcl
46
46
  opendcl
47
47
  ```
48
48
 
49
- On first run, type `/setup` to configure a cloud API provider (Anthropic, OpenAI, Google, etc.) or `/setup-ollama` to install [Ollama](https://ollama.com/) and use a free local model.
49
+ On first run, type `/setup` to configure a cloud API provider (Anthropic, OpenAI, Google, etc.).
50
50
 
51
51
  ### In an Empty Folder
52
52
 
@@ -94,7 +94,6 @@ This uses the open [skills](https://github.com/vercel-labs/skills) CLI to copy S
94
94
  | Command | Description |
95
95
  |---------|-------------|
96
96
  | `/setup` | Configure a cloud API provider (Anthropic, OpenAI, Google, etc.) |
97
- | `/setup-ollama` | Install Ollama and configure a free local LLM model |
98
97
  | `/init` | Scaffold a new Decentraland scene in the current directory |
99
98
  | `/preview` | Start the Bevy-web preview server and open the scene in browser |
100
99
  | `/deploy` | Deploy the scene to Genesis City or a World (auto-detects from scene.json) |
@@ -154,7 +153,6 @@ opendcl/
154
153
  │ ├── dcl-preview.ts # /preview command
155
154
  │ ├── dcl-deploy.ts # /deploy command
156
155
  │ ├── dcl-setup.ts # /setup command (cloud API provider config)
157
- │ ├── dcl-setup-ollama.ts # /setup-ollama command (Ollama setup wizard)
158
156
  │ ├── dcl-status.ts # Thinking/streaming status (elapsed time + tokens)
159
157
  │ ├── dcl-update-check.ts # Checks npm for newer OpenDCL versions
160
158
  │ ├── dcl-validate.ts # Post-write TypeScript validation
package/dist/index.js CHANGED
@@ -45,7 +45,6 @@ const extensions = [
45
45
  "dcl-init.ts",
46
46
  "dcl-deploy.ts",
47
47
  "dcl-setup.ts",
48
- "dcl-setup-ollama.ts",
49
48
  "dcl-validate.ts",
50
49
  "dcl-header.ts",
51
50
  "dcl-update-check.ts",
@@ -54,6 +53,10 @@ const extensions = [
54
53
  "dcl-asset-path.ts",
55
54
  "dcl-screenshot.ts",
56
55
  ];
56
+ // Conditionally load dcl-setup-ollama (hidden by default, enable with ENABLE_OLLAMA_SETUP=true)
57
+ if (process.env.ENABLE_OLLAMA_SETUP === "true") {
58
+ extensions.push("dcl-setup-ollama.ts");
59
+ }
57
60
  for (const ext of extensions) {
58
61
  args.push("-e", join(extDir, ext));
59
62
  }
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;AAEzC,uFAAuF;AACvF,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,EAAE,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;AACtD,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,CAAC;IACrC,OAAO,CAAC,GAAG,CAAC,mBAAmB,GAAG,QAAQ,CAAC;AAC7C,CAA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,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"}
@@ -209,7 +209,7 @@ const extension: ExtensionFactory = (pi) => {
209
209
  pi.on("session_start", async (_event, ctx) => {
210
210
  if (!(await isProviderConfigured())) {
211
211
  ctx.ui.notify(
212
- "Get started by running /setup (cloud providers) or /setup-ollama (free local models)",
212
+ "Get started by running /setup to configure a cloud provider",
213
213
  "warning",
214
214
  );
215
215
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcl-regenesislabs/opendcl",
3
- "version": "0.1.4-22810336737.commit-ccefb95",
3
+ "version": "0.1.4-22903887861.commit-4a41677",
4
4
  "description": "AI coding assistant for Decentraland SDK7 scene development",
5
5
  "type": "module",
6
6
  "bin": {
@@ -67,5 +67,5 @@
67
67
  "prompts/",
68
68
  "context/"
69
69
  ],
70
- "commit": "ccefb9582a7d0dedb41c3a0c8326a23cade8def2"
70
+ "commit": "4a4167760132e6b2be9adbf0486f4b061222db69"
71
71
  }
@@ -11,31 +11,37 @@ For basic CRDT multiplayer (no server), see the `multiplayer-sync` skill instead
11
11
 
12
12
  ## Setup
13
13
 
14
- Install the auth-server SDK branch:
14
+ ### 1. Install the auth-server SDK branch (MANDATORY)
15
+
16
+ You **must** use the `auth-server` tag — the standard `@dcl/sdk` does NOT include authoritative server APIs (`isServer`, `registerMessages`, `Storage`, `EnvVar`, etc.):
15
17
 
16
18
  ```bash
17
19
  npm install @dcl/sdk@auth-server
18
20
  ```
19
21
 
20
- Your `scene.json` must include a world name:
22
+ ### 2. Configure scene.json
23
+
24
+ Your `scene.json` **must** include these properties:
25
+
26
+ - **`authoritativeMultiplayer: true`** — enables the authoritative server runtime.
27
+ - **`worldConfiguration.name`** — identifies the world for deployment, Storage, and EnvVar.
28
+ - **`logsPermissions`** — array of wallet addresses allowed to see server logs in the console. Without this, server `console.log()` output is hidden.
21
29
 
22
30
  ```json
23
31
  {
32
+ "authoritativeMultiplayer": true,
24
33
  "worldConfiguration": {
25
- "name": "my-world-name"
26
- }
34
+ "name": "my-world-name.dcl.eth"
35
+ },
36
+ "logsPermissions": ["0xYourWalletAddress"]
27
37
  }
28
38
  ```
29
39
 
30
- Run the scene:
40
+ ### 3. Run the scene
31
41
 
32
- ```bash
33
- # With authoritative server (required for this pattern)
34
- npx @dcl/hammurabi-server@next
42
+ Just use the normal preview — it automatically starts the authoritative server in the background when `authoritativeMultiplayer: true` is set in scene.json.
35
43
 
36
- # Standard dev server (no auth server, for client-only testing)
37
- npm run start
38
- ```
44
+ > **Debugging note (do NOT tell the user to run this):** Under the hood, the preview runs `npx @dcl/hammurabi-server@next`. If the auth server isn't starting, check that the hammurabi process is running and look for errors in its output.
39
45
 
40
46
  ## Server/Client Branching
41
47
 
@@ -170,22 +176,18 @@ room.onMessage('gameEvent', (data) => {
170
176
  })
171
177
  ```
172
178
 
173
- ### Wait for Room Connection
179
+ ### Wait for State Sync
174
180
 
175
- Before sending messages from the client, wait for the connected scene room:
181
+ Before sending messages from the client, wait until state is synchronized:
176
182
 
177
183
  ```typescript
178
- import { engine } from '@dcl/sdk/ecs'
179
- import { RealmInfo } from '@dcl/sdk/ecs'
184
+ import { isStateSynchronized } from '@dcl/sdk/network'
180
185
 
181
- let joined = false
182
186
  engine.addSystem(() => {
183
- if (joined) return
184
- const realm = RealmInfo.getOrNull(engine.RootEntity)
185
- if (realm?.isConnectedSceneRoom) {
186
- joined = true
187
- room.send('playerJoin', { displayName: 'Player' })
188
- }
187
+ if (!isStateSynchronized()) return
188
+
189
+ // Safe to send messages now
190
+ room.send('playerJoin', { displayName: 'Player' })
189
191
  })
190
192
  ```
191
193
 
@@ -321,9 +323,10 @@ Put synced components and messages in `shared/` so both server and client import
321
323
  ## Important Notes
322
324
 
323
325
  - **Use `Schemas.Int64` for timestamps**: `Schemas.Number` corrupts large numbers (13+ digits). Always use `Schemas.Int64` for values like `Date.now()`.
324
- - **Room readiness**: Clients must wait for `RealmInfo.get(engine.RootEntity).isConnectedSceneRoom` before sending messages.
326
+ - **State sync readiness**: Clients must wait for `isStateSynchronized()` (from `@dcl/sdk/network`) to return `true` before sending messages.
325
327
  - **Custom vs built-in validation**: Custom components use global `validateBeforeChange((value) => ...)`. Built-in components (Transform, GltfContainer) use per-entity `validateBeforeChange(entity, (value) => ...)`.
326
328
  - **Single codebase**: Both server and client run the same `index.ts` entry point. Use `isServer()` to branch.
327
329
  - **No Node.js APIs**: The DCL runtime uses sandboxed QuickJS — no `fs`, `http`, etc. `setTimeout`/`setInterval` are supported. Use SDK-provided APIs (Storage, EnvVar, engine systems) for server-side operations.
328
- - **SDK branch**: The auth-server pattern requires `@dcl/sdk@auth-server`, not the standard `@dcl/sdk` package.
330
+ - **SDK branch (MANDATORY)**: The auth-server pattern requires `npm install @dcl/sdk@auth-server`, not the standard `@dcl/sdk`. Without it, `isServer()`, `registerMessages()`, `Storage`, and `EnvVar` are unavailable.
331
+ - **scene.json required fields**: `authoritativeMultiplayer: true` must be set, and `logsPermissions: ["0xWalletAddress"]` must list wallet addresses that should see server logs.
329
332
  - For basic CRDT multiplayer without a server, see the `multiplayer-sync` skill.