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.
- package/dist/agent-prompts.d.ts +1 -0
- package/dist/agent-prompts.js +14 -5
- package/dist/agent.js +14 -0
- package/dist/castleJson.d.ts +0 -2
- package/dist/castleJson.js +0 -39
- package/dist/devSessionFrameBudget.d.ts +14 -0
- package/dist/devSessionFrameBudget.js +64 -0
- package/dist/devSessionServer.js +15 -0
- package/dist/editorConfig.d.ts +1 -1
- package/dist/editorConfig.js +12 -4
- package/dist/ide.js +28 -59
- package/dist/imports.js +2 -4
- package/dist/init.js +9 -8
- package/dist/multiplayerDoc.d.ts +1 -0
- package/dist/multiplayerDoc.js +228 -0
- package/dist/platformDoc.d.ts +1 -0
- package/dist/platformDoc.js +21 -2
- package/dist/scriptErrors.d.ts +23 -0
- package/dist/scriptErrors.js +147 -0
- package/dist/serve.js +233 -4
- package/dist/shell/assets/index-kMH1qj6D.js +449 -0
- package/dist/shell/index.html +1 -1
- package/dist/viteClientStub.d.ts +18 -0
- package/dist/viteClientStub.js +193 -0
- package/kits/base/CLAUDE.md +3 -3
- package/kits/base/castle.json +1 -3
- package/kits/base/sdk/README.md +17 -0
- package/kits/multiplayer-2d/castle.json +0 -9
- package/kits/multiplayer-3d/castle.json +0 -8
- package/kits/physics-2d/CLAUDE.md +5 -6
- package/kits/physics-2d/castle.json +1 -11
- package/kits/physics-2d/editors/SceneEditor.jsx +42 -3
- package/kits/physics-2d/editors/behaviorRegistry.js +8 -2
- package/kits/physics-2d/engine/ErrorOverlay.jsx +69 -0
- package/kits/physics-2d/engine/ScenePlayer.jsx +2 -67
- package/kits/physics-2d/engine/liveReload.js +5 -4
- package/kits/physics-3d/castle.json +0 -11
- package/kits/real-time/castle.json +0 -6
- package/kits/turn-based/CLAUDE.md +6 -3
- package/kits/turn-based/castle.json +1 -14
- package/package.json +1 -1
- 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`
|
|
118
|
-
//
|
|
119
|
-
// and an editor handed '' for it would
|
|
120
|
-
// sure whatever was actually opened is
|
|
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",
|
|
@@ -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
|
|
101
|
-
|
|
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-
|
|
20
|
+
"publishedVersion": "2026-09-17T20:55:48.861Z",
|
|
34
21
|
"server": {
|
|
35
22
|
"main": "code/server/index.js",
|
|
36
23
|
"maxPlayers": 8,
|