castle-web-cli 0.4.194 → 0.4.195

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.
Files changed (42) hide show
  1. package/dist/agent-prompts.d.ts +1 -0
  2. package/dist/agent-prompts.js +14 -5
  3. package/dist/agent.js +14 -0
  4. package/dist/castleJson.d.ts +0 -2
  5. package/dist/castleJson.js +0 -39
  6. package/dist/devSessionFrameBudget.d.ts +14 -0
  7. package/dist/devSessionFrameBudget.js +64 -0
  8. package/dist/devSessionServer.js +15 -0
  9. package/dist/editorConfig.d.ts +1 -1
  10. package/dist/editorConfig.js +12 -4
  11. package/dist/ide.js +28 -59
  12. package/dist/imports.js +2 -4
  13. package/dist/init.js +9 -8
  14. package/dist/multiplayerDoc.d.ts +1 -0
  15. package/dist/multiplayerDoc.js +228 -0
  16. package/dist/platformDoc.d.ts +1 -0
  17. package/dist/platformDoc.js +21 -2
  18. package/dist/scriptErrors.d.ts +23 -0
  19. package/dist/scriptErrors.js +147 -0
  20. package/dist/serve.js +233 -4
  21. package/dist/shell/assets/index-kMH1qj6D.js +449 -0
  22. package/dist/shell/index.html +1 -1
  23. package/dist/viteClientStub.d.ts +18 -0
  24. package/dist/viteClientStub.js +193 -0
  25. package/kits/base/CLAUDE.md +3 -3
  26. package/kits/base/castle.json +1 -3
  27. package/kits/base/sdk/README.md +17 -0
  28. package/kits/multiplayer-2d/castle.json +0 -9
  29. package/kits/multiplayer-3d/castle.json +0 -8
  30. package/kits/physics-2d/CLAUDE.md +5 -6
  31. package/kits/physics-2d/castle.json +1 -11
  32. package/kits/physics-2d/editors/SceneEditor.jsx +42 -3
  33. package/kits/physics-2d/editors/behaviorRegistry.js +8 -2
  34. package/kits/physics-2d/engine/ErrorOverlay.jsx +69 -0
  35. package/kits/physics-2d/engine/ScenePlayer.jsx +2 -67
  36. package/kits/physics-2d/engine/liveReload.js +5 -4
  37. package/kits/physics-3d/castle.json +0 -11
  38. package/kits/real-time/castle.json +0 -6
  39. package/kits/turn-based/CLAUDE.md +6 -3
  40. package/kits/turn-based/castle.json +1 -14
  41. package/package.json +1 -1
  42. package/dist/shell/assets/index-ColHKJYj.js +0 -449
@@ -114,10 +114,11 @@ export async function hydrateDeclaredFiles({ knownExts, knownFiles, ensurePath }
114
114
  })
115
115
  );
116
116
  const extra = Object.fromEntries(entries.filter(Boolean));
117
- // `list` is the deck's CURATED listing, so a declared file the deck left out
118
- // of visiblePaths is not in it. The shell can still open that file by path,
119
- // and an editor handed '' for it would be back to the original bug -- so make
120
- // sure whatever was actually opened is present, curated or not.
117
+ // `list` leaves out whatever the deck hides from its Files tree
118
+ // (`editor.hiddenPaths`), so a declared file named there is not in it. The
119
+ // shell can still open that file by path, and an editor handed '' for it would
120
+ // be back to the original bug -- so make sure whatever was actually opened is
121
+ // present, listed or not.
121
122
  if (ensurePath && knownFiles[ensurePath] === undefined && extra[ensurePath] === undefined) {
122
123
  const one = await readDeclaredFile(ensurePath);
123
124
  if (one !== null) extra[ensurePath] = one;
@@ -18,17 +18,6 @@
18
18
  "file": "scenes/main.scene"
19
19
  }
20
20
  ],
21
- "hiddenPaths": [],
22
- "visiblePaths": [
23
- "drawings/**",
24
- "models/**",
25
- "scenes/**",
26
- "blueprints/**",
27
- "behaviors/**",
28
- "assets/**",
29
- "theme.style",
30
- "fonts.generated.js"
31
- ],
32
21
  "fileTypes": [
33
22
  {
34
23
  "ext": ".scene",
@@ -1,11 +1,5 @@
1
1
  {
2
2
  "title": "real-time",
3
- "editor": {
4
- "hiddenPaths": [],
5
- "visiblePaths": [
6
- "code/**"
7
- ]
8
- },
9
3
  "imports": {
10
4
  "castle.base": {
11
5
  "deckId": "yRcmH4_aYllE",
@@ -13,7 +13,8 @@ This kit adds no engine and no editors. What it holds:
13
13
  - `room.js` -- the room, and the clock it reads. The part a deck keeps.
14
14
  - `code/server/index.js` -- the starter game: two seats claim squares on a
15
15
  4x4 board, and the fuller board wins. Rules, not bookkeeping, so a deck
16
- rewrites this.
16
+ rewrites this once on its way to being its own game -- after that the file is
17
+ the creator's, not a starter to go back to.
17
18
  - `code/behaviors/Board.jsx`, `Square.jsx`, `scenes/main.scene`,
18
19
  `blueprints/`, `drawings/square.sprite` -- that game's client half.
19
20
  - `testing.js` -- a `MultiplayerServerSession` double, a movable clock, the room
@@ -97,8 +98,10 @@ spectators, departures, session freshness. Every number, every rule and every
97
98
  message is the deck's.
98
99
 
99
100
  The starter game in `code/server/index.js` is a deck's to replace, and replacing
100
- it is the normal path: write `server/index.js`, point `server.main` at it, and
101
- the room stays. It is the shape such a server takes -- rule functions, then the
101
+ it is the normal path the FIRST time a deck becomes its own game -- never a way
102
+ to fix or reset a deck that already has one, whose `server/index.js` is the
103
+ creator's work and only ever gets targeted edits: write `server/index.js`, point
104
+ `server.main` at it, and the room stays. It is the shape such a server takes -- rule functions, then the
102
105
  session callbacks:
103
106
 
104
107
  ```js
@@ -1,19 +1,6 @@
1
1
  {
2
2
  "title": "turn-based",
3
3
  "editor": {
4
- "hiddenPaths": [],
5
- "visiblePaths": [
6
- "code/**",
7
- "server/**",
8
- "behaviors/**",
9
- "room.js",
10
- "testing.js",
11
- "scenes/**",
12
- "blueprints/**",
13
- "drawings/**",
14
- "theme.style",
15
- "fonts.generated.js"
16
- ],
17
4
  "defaultPlayFile": "scenes/main.scene"
18
5
  },
19
6
  "imports": {
@@ -30,7 +17,7 @@
30
17
  "autoUpdateWhenImported": true,
31
18
  "deckId": "K6-Xs7dCoMVi",
32
19
  "cardId": "Kh_08IYATpC3",
33
- "publishedVersion": "2026-09-16T21:20:29.544Z",
20
+ "publishedVersion": "2026-09-17T20:55:48.861Z",
34
21
  "server": {
35
22
  "main": "code/server/index.js",
36
23
  "maxPlayers": 8,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "castle-web-cli",
3
- "version": "0.4.194",
3
+ "version": "0.4.195",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/castle-xyz/castle-experimental-web.git"