@zseven-w/dsh-game-studio 0.1.0-rc.2 → 0.1.0-rc.3

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.de.md CHANGED
@@ -14,7 +14,7 @@
14
14
  </p>
15
15
 
16
16
  <p align="center">
17
- <sub>Paket: <code>@zseven-w/dsh-game-studio</code> &middot; Aktuelles Plugin-Release: <code>0.1.0-rc.2</code> &middot; Getestet mit DSH <code>0.2.1-rc.5</code></sub>
17
+ <sub>Paket: <code>@zseven-w/dsh-game-studio</code> &middot; Aktuelles Plugin-Release: <code>0.1.0-rc.3</code> &middot; Getestet mit DSH <code>0.2.1-rc.5</code></sub>
18
18
  </p>
19
19
 
20
20
  <br />
@@ -41,7 +41,7 @@ Bitte den Agenten in einfachen Worten um ein Spiel — „ein 3D-Spiel: ein rote
41
41
  | 🕰️ **Versionsverlauf** | Jeder Build, der das Spiel verändert hat, wird gespeichert; `game_studio_restore_version` bringt Code, Regeln und Grafiken gemeinsam zurück. |
42
42
  | 📦 **Ein-Datei-Export** | `game_studio_export` schreibt eine in sich geschlossene HTML-Datei ohne Netzwerkzugriff — öffne sie in einem beliebigen Browser oder lade sie auf einen beliebigen statischen Host. |
43
43
  | 📱 **Probiere es auf deinem Telefon** | `game_studio_share` öffnet einen temporären, schreibgeschützten Link in deinem lokalen Netzwerk, mit QR-Code in der Seitenleiste. |
44
- | 🗂️ **Meine Spiele** | Über das **+** der Seitenleiste **Game Studio · Meine Spiele** wählen: jedes Spiel im Arbeitsbereich als Karte mit dem Bild des letzten Testlaufs. Ein Klick zum Spielen – ohne Agent, ohne Tokens. |
44
+ | 🗂️ **Meine Spiele** | Über das **+** der Seitenleiste **Game Studio · My games** wählen: jedes Spiel im Arbeitsbereich als Kachel mit dem Bild des letzten Testlaufs, filterbar nach 2D/3D und sortierbar nach Datum, Versionen oder Name. Ein Klick zum Spielen – ohne Agent, ohne Tokens. **Export wall** packt die angezeigten Spiele in eine Offline-Seite zum Weiterschicken. |
45
45
 
46
46
  ## Damit gebaute Spiele
47
47
 
@@ -84,6 +84,8 @@ Gemessen in einem echten DSH mit DeepSeek-V4.1-Flash, jedes Spiel aus einem Satz
84
84
  | `game_studio_restore_version` | Stellt eine frühere Version des gesamten Spiels wieder her. |
85
85
  | `game_studio_export` | Exportiert eine in sich geschlossene, offline HTML-Datei. |
86
86
  | `game_studio_share` | Öffnet (oder schließt) einen temporären, schreibgeschützten Link im lokalen Netzwerk, damit ein Telefon das Spiel spielen kann. |
87
+ | `game_studio_list` | Listet die Spiele im Arbeitsbereich mit Titel, 2D/3D, Build-Stand und Versionen, damit der Agent „das Pinguin-Spiel“ beim Namen findet. |
88
+ | `game_studio_export_wall` | Exportiert die Spielewand: eine Offline-HTML-Seite mit einer Kachel pro gebautem Spiel; ein Klick auf eine Kachel startet es. |
87
89
 
88
90
  Die Schaltflächen der Seitenleiste (Anwenden, Zurücksetzen, Bauen, Exportieren, Wiederherstellen, Teilen) rufen dieselben Operationen über den Befehl `/game-studio` auf.
89
91
 
package/README.es.md CHANGED
@@ -14,7 +14,7 @@
14
14
  </p>
15
15
 
16
16
  <p align="center">
17
- <sub>Paquete: <code>@zseven-w/dsh-game-studio</code> &middot; Versión actual del plugin: <code>0.1.0-rc.2</code> &middot; Probado con DSH <code>0.2.1-rc.5</code></sub>
17
+ <sub>Paquete: <code>@zseven-w/dsh-game-studio</code> &middot; Versión actual del plugin: <code>0.1.0-rc.3</code> &middot; Probado con DSH <code>0.2.1-rc.5</code></sub>
18
18
  </p>
19
19
 
20
20
  <br />
@@ -41,7 +41,7 @@ Pídele al agente un juego en palabras sencillas — «un juego 3D: un panda roj
41
41
  | 🕰️ **Historial de versiones** | Cada compilación que cambió el juego se guarda; `game_studio_restore_version` restaura juntos el código, las reglas y el arte. |
42
42
  | 📦 **Exportación en un solo archivo** | `game_studio_export` escribe un archivo HTML autosuficiente y sin acceso a la red — ábrelo en cualquier navegador o ponlo en cualquier servidor estático. |
43
43
  | 📱 **Pruébalo en tu teléfono** | `game_studio_share` abre un enlace temporal de solo lectura en tu red local, con un código QR en la barra lateral. |
44
- | 🗂️ **Mis juegos** | Abre el **+** de la barra lateral y elige **Game Studio · Mis juegos**: cada juego del espacio de trabajo aparece como una tarjeta con la imagen de su última prueba. Un clic para jugar, sin agente y sin tokens. |
44
+ | 🗂️ **Mis juegos** | Abre el **+** de la barra lateral y elige **Game Studio · My games**: cada juego del espacio de trabajo como una tarjeta con la imagen de su última prueba, con filtro 2D/3D y orden por fecha, versiones o nombre. Un clic para jugar, sin agente y sin tokens. **Export wall** reúne los juegos mostrados en una sola página sin conexión para enviarla a tus amigos. |
45
45
 
46
46
  ## Juegos hechos con él
47
47
 
@@ -84,6 +84,8 @@ Medido en un DSH real con DeepSeek-V4.1-Flash, cada juego creado a partir de una
84
84
  | `game_studio_restore_version` | Restaura una versión anterior del juego completo. |
85
85
  | `game_studio_export` | Exporta un único archivo HTML autosuficiente y sin conexión. |
86
86
  | `game_studio_share` | Abre (o cierra) un enlace temporal de solo lectura en la red local para que un teléfono pueda jugar. |
87
+ | `game_studio_list` | Lista los juegos del espacio de trabajo con título, 2D/3D, estado de compilación y versiones, para que el agente encuentre «el juego del pingüino» por su nombre. |
88
+ | `game_studio_export_wall` | Exporta el muro de juegos: una página HTML sin conexión con una tarjeta por juego compilado; haz clic en una para jugar. |
87
89
 
88
90
  Los botones de la barra lateral (aplicar, revertir, compilar, exportar, restaurar, compartir) llaman a las mismas operaciones a través del comando `/game-studio`.
89
91
 
package/README.fr.md CHANGED
@@ -14,7 +14,7 @@
14
14
  </p>
15
15
 
16
16
  <p align="center">
17
- <sub>Paquet : <code>@zseven-w/dsh-game-studio</code> &middot; Version actuelle du plugin : <code>0.1.0-rc.2</code> &middot; Testé avec DSH <code>0.2.1-rc.5</code></sub>
17
+ <sub>Paquet : <code>@zseven-w/dsh-game-studio</code> &middot; Version actuelle du plugin : <code>0.1.0-rc.3</code> &middot; Testé avec DSH <code>0.2.1-rc.5</code></sub>
18
18
  </p>
19
19
 
20
20
  <br />
@@ -41,7 +41,7 @@ Demandez un jeu à l'agent en mots simples — « un jeu 3D : un panda roux réc
41
41
  | 🕰️ **Historique des versions** | Chaque build qui a modifié le jeu est enregistré ; `game_studio_restore_version` restaure code, règles et illustrations ensemble. |
42
42
  | 📦 **Export en un seul fichier** | `game_studio_export` écrit un fichier HTML autonome sans accès réseau — ouvrez-le dans n'importe quel navigateur ou déposez-le sur n'importe quel hébergement statique. |
43
43
  | 📱 **Essayez-le sur votre téléphone** | `game_studio_share` ouvre un lien temporaire en lecture seule sur votre réseau local, avec un code QR dans la barre latérale. |
44
- | 🗂️ **Mes jeux** | Ouvrez le **+** de la barre latérale et choisissez **Game Studio · Mes jeux** : chaque jeu de l'espace de travail y apparaît en carte, avec l'image de son dernier test. Un clic pour jouer — sans agent, sans jetons. |
44
+ | 🗂️ **Mes jeux** | Ouvrez le **+** de la barre latérale et choisissez **Game Studio · My games** : chaque jeu de l'espace de travail en vignette, avec l'image de son dernier test, filtrable 2D/3D et triable par date, versions ou nom. Un clic pour jouer — sans agent, sans jetons. **Export wall** réunit les jeux affichés dans une seule page hors ligne à envoyer à des amis. |
45
45
 
46
46
  ## Des jeux faits avec
47
47
 
@@ -84,6 +84,8 @@ Mesuré dans un vrai DSH avec DeepSeek-V4.1-Flash, chaque jeu créé à partir d
84
84
  | `game_studio_restore_version` | Restaure une version antérieure du jeu entier. |
85
85
  | `game_studio_export` | Exporte un seul fichier HTML autonome et hors ligne. |
86
86
  | `game_studio_share` | Ouvre (ou ferme) un lien temporaire en lecture seule sur le réseau local pour qu'un téléphone puisse jouer au jeu. |
87
+ | `game_studio_list` | Liste les jeux de l'espace de travail avec titre, 2D/3D, état de build et versions, pour que l'agent trouve « le jeu du manchot » par son nom. |
88
+ | `game_studio_export_wall` | Exporte le mur de jeux : une page HTML hors ligne avec une vignette par jeu construit ; un clic sur une vignette pour y jouer. |
87
89
 
88
90
  Les boutons de la barre latérale (appliquer, annuler, compiler, exporter, restaurer, partager) appellent les mêmes opérations via la commande `/game-studio`.
89
91
 
package/README.hi.md CHANGED
@@ -14,7 +14,7 @@
14
14
  </p>
15
15
 
16
16
  <p align="center">
17
- <sub>पैकेज: <code>@zseven-w/dsh-game-studio</code> &middot; वर्तमान प्लगइन रिलीज़: <code>0.1.0-rc.2</code> &middot; DSH <code>0.2.1-rc.5</code> के साथ परीक्षित</sub>
17
+ <sub>पैकेज: <code>@zseven-w/dsh-game-studio</code> &middot; वर्तमान प्लगइन रिलीज़: <code>0.1.0-rc.3</code> &middot; DSH <code>0.2.1-rc.5</code> के साथ परीक्षित</sub>
18
18
  </p>
19
19
 
20
20
  <br />
@@ -41,7 +41,7 @@
41
41
  | 🕰️ **वर्ज़न हिस्ट्री** | गेम में बदलाव करने वाला हर बिल्ड सेव होता है; `game_studio_restore_version` कोड, नियम और आर्ट तीनों को एक साथ वापस ले आता है। |
42
42
  | 📦 **सिंगल-फ़ाइल एक्सपोर्ट** | `game_studio_export` बिना किसी नेटवर्क एक्सेस वाली एक आत्मनिर्भर HTML फ़ाइल बनाता है — इसे किसी भी ब्राउज़र में खोलें या किसी भी स्टैटिक होस्ट पर डालें। |
43
43
  | 📱 **अपने फ़ोन पर आज़माएँ** | `game_studio_share` साइडबार में एक QR कोड के साथ आपके लोकल नेटवर्क पर एक अस्थायी रीड-ओनली लिंक खोलता है। |
44
- | 🗂️ **मेरे गेम** | साइडबार का **+** खोलें और **Game Studio · मेरे गेम** चुनें: वर्कस्पेस का हर गेम आख़िरी प्लेटेस्ट की तस्वीर के साथ एक कार्ड के रूप में दिखता है। क्लिक करते ही खेलें — न agent, न टोकन। |
44
+ | 🗂️ **मेरे गेम** | साइडबार का **+** खोलें और **Game Studio · My games** चुनें: वर्कस्पेस का हर गेम आख़िरी प्लेटेस्ट की तस्वीर वाली टाइल के रूप में दिखता है, 2D/3D फ़िल्टर और तारीख़, वर्शन या नाम से क्रम के साथ। क्लिक करते ही खेलें — न agent, न टोकन। **Export wall** दिख रहे गेम्स को एक ऑफ़लाइन पेज में बाँधता है जिसे दोस्तों को भेज सकते हैं। |
45
45
 
46
46
  ## इससे बने गेम
47
47
 
@@ -84,6 +84,8 @@
84
84
  | `game_studio_restore_version` | पूरे गेम के किसी पुराने वर्ज़न को रीस्टोर करें। |
85
85
  | `game_studio_export` | एक आत्मनिर्भर, ऑफ़लाइन HTML फ़ाइल एक्सपोर्ट करें। |
86
86
  | `game_studio_share` | लोकल नेटवर्क पर एक अस्थायी रीड-ओनली लिंक खोलें (या बंद करें) ताकि फ़ोन पर गेम खेला जा सके। |
87
+ | `game_studio_list` | वर्कस्पेस के गेम्स को शीर्षक, 2D/3D, बिल्ड स्थिति और वर्शन के साथ सूचीबद्ध करता है, ताकि agent "वह पेंगुइन वाला गेम" नाम से ढूँढ सके। |
88
+ | `game_studio_export_wall` | गेम वॉल एक्सपोर्ट करता है: हर बने हुए गेम की एक टाइल वाला ऑफ़लाइन HTML पेज; टाइल पर क्लिक करके खेलें। |
87
89
 
88
90
  साइडबार के बटन (apply, revert, build, export, restore, share) `/game-studio` कमांड के माध्यम से इन्हीं ऑपरेशनों को कॉल करते हैं।
89
91
 
package/README.id.md CHANGED
@@ -14,7 +14,7 @@
14
14
  </p>
15
15
 
16
16
  <p align="center">
17
- <sub>Paket: <code>@zseven-w/dsh-game-studio</code> &middot; Rilis plugin saat ini: <code>0.1.0-rc.2</code> &middot; Diuji dengan DSH <code>0.2.1-rc.5</code></sub>
17
+ <sub>Paket: <code>@zseven-w/dsh-game-studio</code> &middot; Rilis plugin saat ini: <code>0.1.0-rc.3</code> &middot; Diuji dengan DSH <code>0.2.1-rc.5</code></sub>
18
18
  </p>
19
19
 
20
20
  <br />
@@ -41,7 +41,7 @@ Mintalah sebuah game kepada agen dengan kata-kata sederhana — "game 3D: seekor
41
41
  | 🕰️ **Riwayat versi** | Setiap build yang mengubah game akan disimpan; `game_studio_restore_version` mengembalikan kode, aturan, dan seni secara bersamaan. |
42
42
  | 📦 **Ekspor satu file** | `game_studio_export` menulis file HTML mandiri tanpa akses jaringan — buka di browser apa pun atau unggah ke layanan hosting statis mana pun. |
43
43
  | 📱 **Coba di ponsel Anda** | `game_studio_share` membuka tautan baca-saja sementara di jaringan lokal Anda, lengkap dengan kode QR di bilah sisi. |
44
- | 🗂️ **Game saya** | Buka **+** di bilah samping dan pilih **Game Studio · Game saya**: setiap game di ruang kerja tampil sebagai kartu dengan gambar uji main terakhir. Klik untuk bermain, tanpa agent dan tanpa token. |
44
+ | 🗂️ **Game saya** | Buka **+** di bilah samping dan pilih **Game Studio · My games**: setiap game di ruang kerja tampil sebagai ubin dengan gambar uji main terakhir, bisa disaring 2D/3D dan diurutkan menurut waktu, jumlah versi, atau nama. Klik untuk bermain, tanpa agent dan tanpa token. **Export wall** mengemas game yang tampil menjadi satu halaman offline untuk dikirim ke teman. |
45
45
 
46
46
  ## Game yang dibuat dengannya
47
47
 
@@ -84,6 +84,8 @@ Diukur pada DSH nyata dengan DeepSeek-V4.1-Flash, setiap game dibuat dari satu k
84
84
  | `game_studio_restore_version` | Memulihkan versi sebelumnya dari keseluruhan game. |
85
85
  | `game_studio_export` | Mengekspor satu file HTML mandiri yang dapat dijalankan secara offline. |
86
86
  | `game_studio_share` | Membuka (atau menutup) tautan baca-saja sementara di jaringan lokal agar ponsel dapat memainkan game tersebut. |
87
+ | `game_studio_list` | Mendaftar game di ruang kerja beserta judul, 2D/3D, status build, dan jumlah versi, agar agent menemukan "game penguin itu" dari namanya. |
88
+ | `game_studio_export_wall` | Mengekspor dinding game: satu halaman HTML offline dengan satu ubin per game yang sudah di-build; klik ubin untuk bermain. |
87
89
 
88
90
  Tombol-tombol di bilah sisi (terapkan, kembalikan, bangun, ekspor, pulihkan, bagikan) memanggil operasi yang sama melalui perintah `/game-studio`.
89
91
 
package/README.ja.md CHANGED
@@ -14,7 +14,7 @@
14
14
  </p>
15
15
 
16
16
  <p align="center">
17
- <sub>パッケージ: <code>@zseven-w/dsh-game-studio</code> &middot; 現在のプラグインリリース: <code>0.1.0-rc.2</code> &middot; 動作確認: DSH <code>0.2.1-rc.5</code></sub>
17
+ <sub>パッケージ: <code>@zseven-w/dsh-game-studio</code> &middot; 現在のプラグインリリース: <code>0.1.0-rc.3</code> &middot; 動作確認: DSH <code>0.2.1-rc.5</code></sub>
18
18
  </p>
19
19
 
20
20
  <br />
@@ -41,7 +41,7 @@
41
41
  | 🕰️ **バージョン履歴** | ゲームを変更したすべてのビルドが保存され、`game_studio_restore_version` がコード・ルール・アートをまとめて復元します。 |
42
42
  | 📦 **1ファイルエクスポート** | `game_studio_export` は、ネットワークアクセスのない自己完結型HTMLファイルを書き出します — 任意のブラウザで開いたり、任意の静的ホストに置けます。 |
43
43
  | 📱 **スマートフォンで試す** | `game_studio_share` はローカルネットワークに一時的な読み取り専用リンクを開きます。サイドバーにQRコードが表示されます。 |
44
- | 🗂️ **マイゲーム** | 右サイドバーの **+** から **ゲーム工房 · マイゲーム** を選ぶと、ワークスペースで作ったゲームが最新のプレイテスト画面つきのカードで並びます。クリックするだけで遊べて、agent もトークンも使いません。 |
44
+ | 🗂️ **マイゲーム** | 右サイドバーの **+** から **Game Studio · My games** を選ぶと、ワークスペースのゲームが最新のプレイテスト画面を表紙にしたタイルで一面に並びます。2D/3D で絞り込み、更新順・バージョン数・名前で並べ替えでき、クリックするだけで遊べます(agent もトークンも使いません)。**Export wall** で表示中のゲームを1つのオフラインページにまとめて友だちに送れます。 |
45
45
 
46
46
  ## これで作ったゲーム
47
47
 
@@ -84,6 +84,8 @@
84
84
  | `game_studio_restore_version` | ゲーム全体の以前のバージョンを復元します。 |
85
85
  | `game_studio_export` | 自己完結型のオフラインHTMLファイルを1つエクスポートします。 |
86
86
  | `game_studio_share` | スマートフォンからゲームを遊べるよう、ローカルネットワークに一時的な読み取り専用リンクを開きます(閉じることもできます)。 |
87
+ | `game_studio_list` | ワークスペースのゲームをタイトル・2D/3D・ビルド状態・バージョン数つきで一覧にし、agent が「あのペンギンのゲーム」を名前で見つけられるようにします。 |
88
+ | `game_studio_export_wall` | ゲームウォールをエクスポート:ビルド済みのゲームを1タイルずつ並べたオフラインHTMLページ。タイルをクリックで遊べます。 |
87
89
 
88
90
  サイドバーのボタン(適用、元に戻す、ビルド、エクスポート、復元、共有)は、`/game-studio` コマンド経由で同じ操作を呼び出します。
89
91
 
package/README.ko.md CHANGED
@@ -14,7 +14,7 @@
14
14
  </p>
15
15
 
16
16
  <p align="center">
17
- <sub>패키지: <code>@zseven-w/dsh-game-studio</code> &middot; 현재 플러그인 릴리스: <code>0.1.0-rc.2</code> &middot; DSH <code>0.2.1-rc.5</code>로 테스트됨</sub>
17
+ <sub>패키지: <code>@zseven-w/dsh-game-studio</code> &middot; 현재 플러그인 릴리스: <code>0.1.0-rc.3</code> &middot; DSH <code>0.2.1-rc.5</code>로 테스트됨</sub>
18
18
  </p>
19
19
 
20
20
  <br />
@@ -41,7 +41,7 @@
41
41
  | 🕰️ **버전 기록** | 게임을 변경한 모든 빌드가 저장됩니다. `game_studio_restore_version`이 코드, 규칙, 아트를 한꺼번에 되돌립니다. |
42
42
  | 📦 **단일 파일 내보내기** | `game_studio_export`가 네트워크 접근 없이 자립적인 HTML 파일 하나를 만듭니다 — 어떤 브라우저에서든 열거나 아무 정적 호스트에 올릴 수 있습니다. |
43
43
  | 📱 **휴대폰에서 사용해 보기** | `game_studio_share`가 로컬 네트워크에 임시 읽기 전용 링크를 열고, 사이드바에 QR 코드를 보여줍니다. |
44
- | 🗂️ **내 게임** | 오른쪽 사이드바의 **+** 에서 **게임 공방 · 내 게임**을 고르면, 워크스페이스에서 만든 모든 게임이 최근 플레이테스트 화면을 표지로 한 카드로 나옵니다. 클릭하면 바로 플레이하며 agent도 토큰도 쓰지 않습니다. |
44
+ | 🗂️ **내 게임** | 오른쪽 사이드바의 **+** 에서 **Game Studio · My games**를 고르면, 워크스페이스의 게임이 최근 플레이테스트 화면을 표지로 한 타일로 펼쳐집니다. 2D/3D로 거르고 최근순·버전 수·이름순으로 정렬할 수 있으며, 클릭하면 바로 플레이합니다(agent·토큰 사용 없음). **Export wall**은 보이는 게임을 오프라인 페이지 하나로 묶어 친구에게 보낼 수 있게 합니다. |
45
45
 
46
46
  ## 이걸로 만든 게임
47
47
 
@@ -84,6 +84,8 @@
84
84
  | `game_studio_restore_version` | 게임 전체의 이전 버전을 복원합니다. |
85
85
  | `game_studio_export` | 자립적이고 오프라인인 HTML 파일 하나로 내보냅니다. |
86
86
  | `game_studio_share` | 휴대폰에서 게임을 플레이할 수 있도록 로컬 네트워크에 임시 읽기 전용 링크를 열거나 닫습니다. |
87
+ | `game_studio_list` | 워크스페이스의 게임을 제목·2D/3D·빌드 여부·버전 수와 함께 나열해, agent가 "그 펭귄 게임"을 이름으로 찾게 합니다. |
88
+ | `game_studio_export_wall` | 게임 월 내보내기: 빌드된 게임마다 타일 하나씩 있는 오프라인 HTML 페이지. 타일을 클릭하면 플레이합니다. |
87
89
 
88
90
  사이드바의 버튼(적용, 되돌리기, 빌드, 내보내기, 복원, 공유)은 `/game-studio` 명령을 통해 같은 작업을 수행합니다.
89
91
 
package/README.md CHANGED
@@ -14,7 +14,7 @@
14
14
  </p>
15
15
 
16
16
  <p align="center">
17
- <sub>Package: <code>@zseven-w/dsh-game-studio</code> &middot; Current plugin release: <code>0.1.0-rc.2</code> &middot; Tested with DSH <code>0.2.1-rc.5</code></sub>
17
+ <sub>Package: <code>@zseven-w/dsh-game-studio</code> &middot; Current plugin release: <code>0.1.0-rc.3</code> &middot; Tested with DSH <code>0.2.1-rc.5</code></sub>
18
18
  </p>
19
19
 
20
20
  <br />
@@ -41,7 +41,7 @@ Ask the agent for a game in plain words — "a 3D game: a red panda collects bam
41
41
  | 🕰️ **Version history** | Every build that changed the game is saved; `game_studio_restore_version` brings back code, rules and art together. |
42
42
  | 📦 **One-file export** | `game_studio_export` writes a self-contained HTML file with no network access — open it in any browser or put it on any static host. |
43
43
  | 📱 **Try it on your phone** | `game_studio_share` opens a temporary read-only link on your local network, with a QR code in the sidebar. |
44
- | 🗂️ **My games** | Open the sidebar's **+** and pick **Game Studio · My games**: every game in the workspace as a card with its latest playtest picture. Click one to play it — no agent, no tokens. |
44
+ | 🗂️ **My games** | Open the sidebar's **+** and pick **Game Studio · My games**: every game in the workspace as a tile with its latest playtest picture, filtered by 2D/3D and sorted by recency, versions or name. Click one to play it — no agent, no tokens. **Export wall** packs the games shown into one offline page to send to friends. |
45
45
 
46
46
  ## Games made with it
47
47
 
@@ -84,6 +84,8 @@ Measured in a real DSH with DeepSeek-V4.1-Flash, each game made from one sentenc
84
84
  | `game_studio_restore_version` | Restore an earlier version of the whole game. |
85
85
  | `game_studio_export` | Export one self-contained, offline HTML file. |
86
86
  | `game_studio_share` | Open (or close) a temporary read-only link on the local network so a phone can play the game. |
87
+ | `game_studio_list` | List the games in the working directory with title, 2D/3D, build state and versions, so the agent finds "the penguin game" by name. |
88
+ | `game_studio_export_wall` | Export the game wall: one offline HTML page with a tile per built game; click a tile to play it. |
87
89
 
88
90
  The sidebar's buttons (apply, revert, build, export, restore, share) call the same operations through the `/game-studio` command.
89
91
 
package/README.pt.md CHANGED
@@ -14,7 +14,7 @@
14
14
  </p>
15
15
 
16
16
  <p align="center">
17
- <sub>Pacote: <code>@zseven-w/dsh-game-studio</code> &middot; Versão atual do plugin: <code>0.1.0-rc.2</code> &middot; Testado com DSH <code>0.2.1-rc.5</code></sub>
17
+ <sub>Pacote: <code>@zseven-w/dsh-game-studio</code> &middot; Versão atual do plugin: <code>0.1.0-rc.3</code> &middot; Testado com DSH <code>0.2.1-rc.5</code></sub>
18
18
  </p>
19
19
 
20
20
  <br />
@@ -41,7 +41,7 @@ Peça um jogo ao agente em palavras simples — "um jogo 3D: um panda-vermelho c
41
41
  | 🕰️ **Histórico de versões** | Cada build que alterou o jogo é salvo; `game_studio_restore_version` traz de volta código, regras e arte juntos. |
42
42
  | 📦 **Exportação em arquivo único** | `game_studio_export` grava um arquivo HTML autossuficiente sem acesso à rede — abra em qualquer navegador ou coloque em qualquer hospedagem estática. |
43
43
  | 📱 **Teste no seu celular** | `game_studio_share` abre um link temporário somente leitura na sua rede local, com um QR code na barra lateral. |
44
- | 🗂️ **Meus jogos** | Abra o **+** da barra lateral e escolha **Game Studio · Meus jogos**: cada jogo do espaço de trabalho aparece como um cartão com a imagem do último teste. Um clique para jogar, sem agente e sem tokens. |
44
+ | 🗂️ **Meus jogos** | Abra o **+** da barra lateral e escolha **Game Studio · My games**: cada jogo do espaço de trabalho como um bloco com a imagem do último teste, com filtro 2D/3D e ordem por data, versões ou nome. Um clique para jogar, sem agente e sem tokens. **Export wall** junta os jogos exibidos numa única página offline para enviar aos amigos. |
45
45
 
46
46
  ## Jogos feitos com ele
47
47
 
@@ -84,6 +84,8 @@ Medido em um DSH real com DeepSeek-V4.1-Flash, cada jogo feito a partir de uma f
84
84
  | `game_studio_restore_version` | Restaura uma versão anterior do jogo inteiro. |
85
85
  | `game_studio_export` | Exporta um único arquivo HTML autossuficiente e offline. |
86
86
  | `game_studio_share` | Abre (ou fecha) um link temporário somente leitura na rede local para que um celular possa jogar o jogo. |
87
+ | `game_studio_list` | Lista os jogos do espaço de trabalho com título, 2D/3D, estado do build e versões, para o agente achar "o jogo do pinguim" pelo nome. |
88
+ | `game_studio_export_wall` | Exporta o mural de jogos: uma página HTML offline com um bloco por jogo compilado; clique num bloco para jogar. |
87
89
 
88
90
  Os botões da barra lateral (aplicar, reverter, construir, exportar, restaurar, compartilhar) chamam as mesmas operações por meio do comando `/game-studio`.
89
91
 
package/README.ru.md CHANGED
@@ -14,7 +14,7 @@
14
14
  </p>
15
15
 
16
16
  <p align="center">
17
- <sub>Пакет: <code>@zseven-w/dsh-game-studio</code> &middot; Текущий релиз плагина: <code>0.1.0-rc.2</code> &middot; Протестировано с DSH <code>0.2.1-rc.5</code></sub>
17
+ <sub>Пакет: <code>@zseven-w/dsh-game-studio</code> &middot; Текущий релиз плагина: <code>0.1.0-rc.3</code> &middot; Протестировано с DSH <code>0.2.1-rc.5</code></sub>
18
18
  </p>
19
19
 
20
20
  <br />
@@ -41,7 +41,7 @@
41
41
  | 🕰️ **История версий** | Каждая сборка, изменившая игру, сохраняется; `game_studio_restore_version` возвращает код, правила и графику вместе. |
42
42
  | 📦 **Экспорт в один файл** | `game_studio_export` записывает полностью автономный HTML-файл без доступа к сети — откройте его в любом браузере или разместите на любом статическом хостинге. |
43
43
  | 📱 **Проверка на телефоне** | `game_studio_share` открывает временную ссылку только для чтения в вашей локальной сети с QR-кодом на боковой панели. |
44
- | 🗂️ **Мои игры** | Нажмите **+** в правой панели и выберите **Game Studio · Мои игры**: каждая игра рабочей области — карточка с кадром последнего теста. Один клик — и играете, без агента и без токенов. |
44
+ | 🗂️ **Мои игры** | Нажмите **+** в правой панели и выберите **Game Studio · My games**: каждая игра рабочей области — плитка с кадром последнего теста, с фильтром 2D/3D и сортировкой по дате, версиям или названию. Один клик — и играете, без агента и без токенов. **Export wall** собирает показанные игры в одну офлайн-страницу, которую можно отправить друзьям. |
45
45
 
46
46
  ## Игры, сделанные с ним
47
47
 
@@ -84,6 +84,8 @@
84
84
  | `game_studio_restore_version` | Восстанавливает более раннюю версию всей игры целиком. |
85
85
  | `game_studio_export` | Экспортирует один автономный HTML-файл, работающий без интернета. |
86
86
  | `game_studio_share` | Открывает (или закрывает) временную ссылку только для чтения в локальной сети, чтобы в игру можно было поиграть с телефона. |
87
+ | `game_studio_list` | Показывает игры рабочей области с названием, 2D/3D, состоянием сборки и числом версий, чтобы агент находил «ту игру с пингвином» по имени. |
88
+ | `game_studio_export_wall` | Экспортирует стену игр: офлайн-страница HTML с плиткой для каждой собранной игры; клик по плитке запускает игру. |
87
89
 
88
90
  Кнопки на боковой панели (применить, вернуть, собрать, экспортировать, восстановить, поделиться) вызывают те же самые операции через команду `/game-studio`.
89
91
 
package/README.th.md CHANGED
@@ -14,7 +14,7 @@
14
14
  </p>
15
15
 
16
16
  <p align="center">
17
- <sub>แพ็กเกจ: <code>@zseven-w/dsh-game-studio</code> &middot; เวอร์ชันปลั๊กอินปัจจุบัน: <code>0.1.0-rc.2</code> &middot; ทดสอบกับ DSH <code>0.2.1-rc.5</code></sub>
17
+ <sub>แพ็กเกจ: <code>@zseven-w/dsh-game-studio</code> &middot; เวอร์ชันปลั๊กอินปัจจุบัน: <code>0.1.0-rc.3</code> &middot; ทดสอบกับ DSH <code>0.2.1-rc.5</code></sub>
18
18
  </p>
19
19
 
20
20
  <br />
@@ -41,7 +41,7 @@
41
41
  | 🕰️ **ประวัติเวอร์ชัน** | ทุกบิลด์ที่มีการเปลี่ยนแปลงตัวเกมจะถูกบันทึกไว้ โดย `game_studio_restore_version` จะกู้คืนทั้งโค้ด กฎกติกา และภาพอาร์ตกลับมาพร้อมกัน |
42
42
  | 📦 **ส่งออกเป็นไฟล์เดียว** | `game_studio_export` จะเขียนไฟล์ HTML ที่ครบจบในตัวเองโดยไม่ต้องเชื่อมต่อเครือข่าย — เปิดเล่นในเบราว์เซอร์ใดก็ได้ หรือนำไปวางบนโฮสต์สำหรับไฟล์สแตติกได้ทุกที่ |
43
43
  | 📱 **ลองเล่นบนโทรศัพท์ของคุณ** | `game_studio_share` จะเปิดลิงก์แบบอ่านอย่างเดียวชั่วคราวบนเครือข่ายในบ้านหรือวงแลนของคุณ พร้อมแสดงคิวอาร์โค้ดในแถบด้านข้าง |
44
- | 🗂️ **เกมของฉัน** | กด **+** ที่แถบด้านขวาแล้วเลือก **Game Studio · เกมของฉัน** ทุกเกมในเวิร์กสเปซจะแสดงเป็นการ์ดพร้อมภาพจากการทดสอบเล่นครั้งล่าสุด คลิกเดียวก็เล่นได้ ไม่ต้องผ่าน agent และไม่ใช้โทเคน |
44
+ | 🗂️ **เกมของฉัน** | กด **+** ที่แถบด้านขวาแล้วเลือก **Game Studio · My games** ทุกเกมในเวิร์กสเปซจะแสดงเป็นไทล์พร้อมภาพจากการทดสอบเล่นครั้งล่าสุด กรองตาม 2D/3D และเรียงตามเวลา จำนวนเวอร์ชัน หรือชื่อได้ คลิกเดียวก็เล่นได้ ไม่ต้องผ่าน agent และไม่ใช้โทเคน **Export wall** รวมเกมที่แสดงอยู่เป็นหน้าเว็บออฟไลน์หน้าเดียวส่งให้เพื่อนได้ |
45
45
 
46
46
  ## เกมที่สร้างด้วยปลั๊กอินนี้
47
47
 
@@ -84,6 +84,8 @@
84
84
  | `game_studio_restore_version` | กู้คืนตัวเกมทั้งหมดกลับไปยังเวอร์ชันก่อนหน้า |
85
85
  | `game_studio_export` | ส่งออกเป็นไฟล์ HTML แบบออฟไลน์ที่ครบจบในตัวเองเพียงไฟล์เดียว |
86
86
  | `game_studio_share` | เปิด (หรือปิด) ลิงก์แบบอ่านอย่างเดียวชั่วคราวบนเครือข่ายในพื้นที่ เพื่อให้โทรศัพท์สามารถเข้าเล่นเกมได้ |
87
+ | `game_studio_list` | แสดงรายการเกมในเวิร์กสเปซพร้อมชื่อ 2D/3D สถานะบิลด์ และจำนวนเวอร์ชัน ให้ agent หา "เกมเพนกวินนั้น" จากชื่อได้ |
88
+ | `game_studio_export_wall` | ส่งออกกำแพงเกม: หน้า HTML ออฟไลน์ที่มีไทล์ละเกมสำหรับทุกเกมที่บิลด์แล้ว คลิกไทล์เพื่อเล่น |
87
89
 
88
90
  ปุ่มต่าง ๆ ในแถบด้านข้าง (นำไปใช้, ย้อนกลับ, บิลด์, ส่งออก, กู้คืน, แชร์) จะเรียกใช้งานการทำงานเดียวกันนี้ผ่านคำสั่ง `/game-studio`
89
91
 
package/README.tr.md CHANGED
@@ -14,7 +14,7 @@
14
14
  </p>
15
15
 
16
16
  <p align="center">
17
- <sub>Paket: <code>@zseven-w/dsh-game-studio</code> &middot; Güncel eklenti sürümü: <code>0.1.0-rc.2</code> &middot; DSH <code>0.2.1-rc.5</code> ile test edildi</sub>
17
+ <sub>Paket: <code>@zseven-w/dsh-game-studio</code> &middot; Güncel eklenti sürümü: <code>0.1.0-rc.3</code> &middot; DSH <code>0.2.1-rc.5</code> ile test edildi</sub>
18
18
  </p>
19
19
 
20
20
  <br />
@@ -41,7 +41,7 @@ Ajandan günlük dille bir oyun isteyin — "3D bir oyun: kırmızı bir panda o
41
41
  | 🕰️ **Sürüm geçmişi** | Oyunu değiştiren her derleme kaydedilir; `game_studio_restore_version` kodu, kuralları ve görselleri birlikte geri getirir. |
42
42
  | 📦 **Tek dosya dışa aktarma** | `game_studio_export` ağ erişimi olmayan, bağımsız bir HTML dosyası yazar — istediğiniz tarayıcıda açın veya herhangi bir statik barındırma hizmetine koyun. |
43
43
  | 📱 **Telefonunuzda deneyin** | `game_studio_share` kenar çubuğunda bir QR koduyla yerel ağınızda geçici, salt okunur bir bağlantı açar. |
44
- | 🗂️ **Oyunlarım** | Kenar çubuğundaki **+** ile **Game Studio · Oyunlarım**'ı seçin: çalışma alanındaki her oyun, son test görüntüsüyle bir kart olarak listelenir. Tıklayıp oynayın; agent da token da gerekmez. |
44
+ | 🗂️ **Oyunlarım** | Kenar çubuğundaki **+** ile **Game Studio · My games**'i seçin: çalışma alanındaki her oyun son test görüntüsüyle bir kutucuk olarak listelenir; 2D/3D süzgeci ve tarih, sürüm ya da ada göre sıralama vardır. Tıklayıp oynayın; agent da token da gerekmez. **Export wall**, gösterilen oyunları arkadaşlarınıza gönderebileceğiniz tek bir çevrimdışı sayfada toplar. |
45
45
 
46
46
  ## Onunla yapılan oyunlar
47
47
 
@@ -84,6 +84,8 @@ Gerçek bir DSH içinde DeepSeek-V4.1-Flash ile ölçüldü; her oyun yeni bir o
84
84
  | `game_studio_restore_version` | Tüm oyunun daha önceki bir sürümünü geri yükler. |
85
85
  | `game_studio_export` | Tek bir bağımsız, çevrimdışı HTML dosyası dışa aktarır. |
86
86
  | `game_studio_share` | Bir telefonun oyunu oynayabilmesi için yerel ağda geçici, salt okunur bir bağlantı açar (veya kapatır). |
87
+ | `game_studio_list` | Çalışma alanındaki oyunları başlık, 2D/3D, derleme durumu ve sürüm sayısıyla listeler; agent "o penguen oyununu" adından bulur. |
88
+ | `game_studio_export_wall` | Oyun duvarını dışa aktarır: derlenmiş her oyun için bir kutucuk içeren çevrimdışı bir HTML sayfası; kutucuğa tıklayınca oyun açılır. |
87
89
 
88
90
  Kenar çubuğunun düğmeleri (uygula, geri al, derle, dışa aktar, geri yükle, paylaş) aynı işlemleri `/game-studio` komutu üzerinden çağırır.
89
91
 
package/README.vi.md CHANGED
@@ -14,7 +14,7 @@
14
14
  </p>
15
15
 
16
16
  <p align="center">
17
- <sub>Gói: <code>@zseven-w/dsh-game-studio</code> &middot; Bản phát hành plugin hiện tại: <code>0.1.0-rc.2</code> &middot; Đã thử nghiệm với DSH <code>0.2.1-rc.5</code></sub>
17
+ <sub>Gói: <code>@zseven-w/dsh-game-studio</code> &middot; Bản phát hành plugin hiện tại: <code>0.1.0-rc.3</code> &middot; Đã thử nghiệm với DSH <code>0.2.1-rc.5</code></sub>
18
18
  </p>
19
19
 
20
20
  <br />
@@ -41,7 +41,7 @@ Yêu cầu agent tạo một trò chơi bằng lời lẽ tự nhiên — "một
41
41
  | 🕰️ **Lịch sử phiên bản** | Mọi bản dựng làm thay đổi trò chơi đều được lưu lại; `game_studio_restore_version` khôi phục đồng thời cả mã, luật chơi và đồ họa. |
42
42
  | 📦 **Xuất một tệp duy nhất** | `game_studio_export` ghi ra một tệp HTML độc lập không cần kết nối mạng — mở được trên mọi trình duyệt hoặc đưa lên bất kỳ máy chủ tĩnh nào. |
43
43
  | 📱 **Thử ngay trên điện thoại** | `game_studio_share` mở một liên kết chỉ đọc tạm thời trên mạng cục bộ của bạn, kèm mã QR ở thanh bên. |
44
- | 🗂️ **Trò chơi của tôi** | Mở nút **+** ở thanh bên và chọn **Game Studio · Trò chơi của tôi**: mỗi trò chơi trong không gian làm việc là một thẻ kèm ảnh lần chơi thử gần nhất. Bấm là chơi, không cần agent, không tốn token. |
44
+ | 🗂️ **Trò chơi của tôi** | Mở nút **+** ở thanh bên và chọn **Game Studio · My games**: mỗi trò chơi trong không gian làm việc là một ô kèm ảnh lần chơi thử gần nhất, lọc theo 2D/3D và sắp xếp theo thời gian, số phiên bản hoặc tên. Bấm là chơi, không cần agent, không tốn token. **Export wall** gói các trò đang hiển thị thành một trang ngoại tuyến để gửi cho bạn bè. |
45
45
 
46
46
  ## Những trò chơi làm bằng nó
47
47
 
@@ -84,6 +84,8 @@ Bốn trò chơi từ các lần thử nghiệm. Mỗi trò bắt đầu từ m
84
84
  | `game_studio_restore_version` | Khôi phục một phiên bản trước đó của toàn bộ trò chơi. |
85
85
  | `game_studio_export` | Xuất ra một tệp HTML độc lập, chạy ngoại tuyến. |
86
86
  | `game_studio_share` | Mở (hoặc đóng) một liên kết chỉ đọc tạm thời trên mạng cục bộ để điện thoại có thể chơi trò chơi. |
87
+ | `game_studio_list` | Liệt kê các trò chơi trong không gian làm việc với tên, 2D/3D, trạng thái build và số phiên bản, để agent tìm "trò chim cánh cụt đó" theo tên. |
88
+ | `game_studio_export_wall` | Xuất bức tường trò chơi: một trang HTML ngoại tuyến, mỗi trò đã build một ô; bấm vào ô để chơi. |
87
89
 
88
90
  Các nút ở thanh bên (áp dụng, hoàn tác, dựng, xuất, khôi phục, chia sẻ) cũng gọi cùng các thao tác này thông qua lệnh `/game-studio`.
89
91
 
package/README.zh-TW.md CHANGED
@@ -14,7 +14,7 @@
14
14
  </p>
15
15
 
16
16
  <p align="center">
17
- <sub>套件:<code>@zseven-w/dsh-game-studio</code> &middot; 目前的外掛版本:<code>0.1.0-rc.2</code> &middot; 已在 DSH <code>0.2.1-rc.5</code> 下測試</sub>
17
+ <sub>套件:<code>@zseven-w/dsh-game-studio</code> &middot; 目前的外掛版本:<code>0.1.0-rc.3</code> &middot; 已在 DSH <code>0.2.1-rc.5</code> 下測試</sub>
18
18
  </p>
19
19
 
20
20
  <br />
@@ -41,7 +41,7 @@
41
41
  | 🕰️ **版本歷史** | 每個改變遊戲的建置都會被保存;`game_studio_restore_version` 會把程式碼、規則與美術圖一起帶回來。 |
42
42
  | 📦 **單檔匯出** | `game_studio_export` 會寫出一個自包含、不需網路的 HTML 檔案——用任何瀏覽器開啟,或放到任何靜態網頁空間。 |
43
43
  | 📱 **在手機上試玩** | `game_studio_share` 會在你的區域網路上開啟一條臨時的唯讀連結,並在側邊欄顯示 QR Code。 |
44
- | 🗂️ **我的遊戲** | 點右欄的 **+**,選 **遊戲工坊 · 我的遊戲**:工作區裡做過的每個遊戲都是一張卡片,封面是最近一次試玩的畫面。點一下就能玩,不經過 agent,也不花 token。 |
44
+ | 🗂️ **遊戲牆** | 點右欄的 **+**,選 **游戏工坊 · 游戏墙**(介面為簡體中文或英文 **Game Studio · My games**):工作區裡做過的遊戲鋪滿一面牆,封面是最近一次試玩的畫面,可按 2D/3D 篩選,按最近修改、版本數或名稱排序。點一下就能玩,不經過 agent,也不花 token。**导出游戏墙**(Export wall)會把牆上的遊戲打包成一個離線網頁,傳給朋友就能玩。 |
45
45
 
46
46
  ## 用它做出來的遊戲
47
47
 
@@ -84,6 +84,8 @@
84
84
  | `game_studio_restore_version` | 回復整個遊戲的較早版本。 |
85
85
  | `game_studio_export` | 匯出一個自包含的離線 HTML 檔案。 |
86
86
  | `game_studio_share` | 在區域網路上開啟(或關閉)一條臨時的唯讀連結,讓手機可以遊玩這款遊戲。 |
87
+ | `game_studio_list` | 列出工作區裡的遊戲(標題、2D/3D、是否已建置、版本數),agent 能按名字找到「那個企鵝遊戲」。 |
88
+ | `game_studio_export_wall` | 匯出遊戲牆:一個離線 HTML 頁面,每個已建置的遊戲一格,點格子就能玩。 |
87
89
 
88
90
  側邊欄的按鈕(套用、還原、建置、匯出、回復、分享)透過 `/game-studio` 指令呼叫相同的操作。
89
91
 
package/README.zh.md CHANGED
@@ -14,7 +14,7 @@
14
14
  </p>
15
15
 
16
16
  <p align="center">
17
- <sub>包名:<code>@zseven-w/dsh-game-studio</code> &middot; 当前插件版本:<code>0.1.0-rc.2</code> &middot; 已在 DSH <code>0.2.1-rc.5</code> 上测试</sub>
17
+ <sub>包名:<code>@zseven-w/dsh-game-studio</code> &middot; 当前插件版本:<code>0.1.0-rc.3</code> &middot; 已在 DSH <code>0.2.1-rc.5</code> 上测试</sub>
18
18
  </p>
19
19
 
20
20
  <br />
@@ -41,7 +41,7 @@
41
41
  | 🕰️ **版本历史** | 每次让游戏发生变化的构建都会保存;`game_studio_restore_version` 把代码、规则和美术一起恢复。 |
42
42
  | 📦 **单文件导出** | `game_studio_export` 生成一个不联网、自包含的 HTML 文件,用任何浏览器打开,或放到任意静态托管上。 |
43
43
  | 📱 **在手机上试玩** | `game_studio_share` 在本地网络上开一个临时只读链接,侧栏里会显示二维码。 |
44
- | 🗂️ **我的游戏** | 点右栏的 **+**,选 **游戏工坊 · 我的游戏**:工作区里做过的每个游戏都是一张卡片,封面是最近一次试玩的画面。点一下就能玩,不经过 agent,也不花 token。 |
44
+ | 🗂️ **游戏墙** | 点右栏的 **+**,选 **游戏工坊 · 游戏墙**:工作区里做过的游戏铺满一面墙,封面是最近一次试玩的画面,可按 2D/3D 筛选,按最近修改、版本数或名称排序。点一下就能玩,不经过 agent,也不花 token。**导出游戏墙**会把墙上的游戏打包成一个离线网页,发给朋友就能玩。 |
45
45
 
46
46
  ## 用它做出来的游戏
47
47
 
@@ -84,6 +84,8 @@
84
84
  | `game_studio_restore_version` | 把整个游戏恢复到较早的版本。 |
85
85
  | `game_studio_export` | 导出一个自包含、可离线游玩的 HTML 文件。 |
86
86
  | `game_studio_share` | 在本地网络开启(或关闭)一个临时只读链接,让手机也能玩。 |
87
+ | `game_studio_list` | 列出工作区里的游戏(标题、2D/3D、是否已构建、版本数),agent 能按名字找到「那个企鹅游戏」。 |
88
+ | `game_studio_export_wall` | 导出游戏墙:一个离线 HTML 页面,每个已构建的游戏一个格子,点格子就能玩。 |
87
89
 
88
90
  侧栏上的按钮(应用、撤回、构建、导出、恢复、分享)通过 `/game-studio` 命令调用同样的操作。
89
91
 
package/lib/client.js CHANGED
@@ -79,10 +79,10 @@ var zh = {
79
79
  "row.apply": "\u5DF2\u6362\u4E0A\u65B0\u7D20\u6750",
80
80
  "row.revert": "\u5DF2\u64A4\u56DE\u7D20\u6750",
81
81
  "row.export": "\u5DF2\u5BFC\u51FA",
82
- "guide.title": "\u6E38\u620F\u5DE5\u574A \xB7 \u6211\u7684\u6E38\u620F",
82
+ "guide.title": "\u6E38\u620F\u5DE5\u574A \xB7 \u6E38\u620F\u5899",
83
83
  "guide.description": "\u8FD9\u4E2A\u5DE5\u4F5C\u533A\u91CC\u505A\u8FC7\u7684\u6E38\u620F\uFF0C\u70B9\u5F00\u5C31\u80FD\u73A9",
84
- "shelf.title": "\u6211\u7684\u6E38\u620F",
85
- "shelf.count": "{count} \u4E2A\u6E38\u620F",
84
+ "shelf.title": "\u6E38\u620F\u5899",
85
+ "shelf.count": "{count} \u6B3E",
86
86
  "shelf.refresh": "\u5237\u65B0",
87
87
  "shelf.scanning": "\u6B63\u5728\u627E\u8FD9\u4E2A\u5DE5\u4F5C\u533A\u91CC\u7684\u6E38\u620F\u2026",
88
88
  "shelf.empty": "\u8FD9\u4E2A\u5DE5\u4F5C\u533A\u91CC\u8FD8\u6CA1\u6709\u6E38\u620F\u3002\u5728\u5BF9\u8BDD\u91CC\u8BF4\u4E00\u53E5\uFF0C\u6BD4\u5982\u300C\u505A\u4E00\u4E2A\u5C0F\u6E38\u620F\uFF1A\u5C0F\u732B\u5728\u53A8\u623F\u5077\u9C7C\u5E72\uFF0C\u522B\u649E\u4E0A\u626B\u5730\u673A\u5668\u4EBA\u300D\u3002",
@@ -90,7 +90,17 @@ var zh = {
90
90
  "shelf.noSession": "\u5148\u6253\u5F00\u4E00\u4E2A\u4F1A\u8BDD\uFF0C\u624D\u80FD\u770B\u5230\u5B83\u5DE5\u4F5C\u533A\u91CC\u7684\u6E38\u620F\u3002",
91
91
  "shelf.notBuilt": "\u8FD8\u6CA1\u6784\u5EFA",
92
92
  "shelf.versions": "{count} \u4E2A\u7248\u672C",
93
- "shelf.play": "\u6253\u5F00\u300A{title}\u300B"
93
+ "shelf.play": "\u6253\u5F00\u300A{title}\u300B",
94
+ "shelf.all": "\u5168\u90E8",
95
+ "shelf.sortRecent": "\u6700\u8FD1\u4FEE\u6539",
96
+ "shelf.sortVersions": "\u7248\u672C\u6700\u591A",
97
+ "shelf.sortName": "\u540D\u79F0",
98
+ "shelf.export": "\u5BFC\u51FA\u6E38\u620F\u5899",
99
+ "shelf.exportHint": "\u628A\u5899\u4E0A\u73B0\u5728\u663E\u793A\u7684\u6E38\u620F\u6253\u5305\u6210\u4E00\u4E2A\u79BB\u7EBF\u7F51\u9875\uFF0C\u70B9\u54EA\u4E2A\u73A9\u54EA\u4E2A\uFF0C\u53EF\u4EE5\u53D1\u7ED9\u670B\u53CB",
100
+ "shelf.exporting": "\u6B63\u5728\u5BFC\u51FA\u2026",
101
+ "shelf.exported": "\u5DF2\u5BFC\u51FA\uFF1A{file}\uFF08{count} \u6B3E \xB7 {size}\uFF09",
102
+ "shelf.exportSkipped": "\u53E6\u6709 {count} \u6B3E\u8FD8\u6CA1\u6784\u5EFA\uFF0C\u6CA1\u653E\u8FDB\u53BB\u3002",
103
+ "shelf.exportFailed": "\u5BFC\u51FA\u5931\u8D25\uFF1A{message}"
94
104
  };
95
105
  var en = {
96
106
  "tab.title": "Game Studio \xB7 {name}",
@@ -151,7 +161,17 @@ var en = {
151
161
  "shelf.noSession": "Open a session to see the games in its workspace.",
152
162
  "shelf.notBuilt": "Not built yet",
153
163
  "shelf.versions": "{count} versions",
154
- "shelf.play": 'Open "{title}"'
164
+ "shelf.play": 'Open "{title}"',
165
+ "shelf.all": "All",
166
+ "shelf.sortRecent": "Recent",
167
+ "shelf.sortVersions": "Most versions",
168
+ "shelf.sortName": "Name",
169
+ "shelf.export": "Export wall",
170
+ "shelf.exportHint": "Pack the games shown here into one offline web page where any tile can be played; send it to friends",
171
+ "shelf.exporting": "Exporting\u2026",
172
+ "shelf.exported": "Exported: {file} ({count} games \xB7 {size})",
173
+ "shelf.exportSkipped": "{count} more were never built and were left out.",
174
+ "shelf.exportFailed": "Export failed: {message}"
155
175
  };
156
176
 
157
177
  // src/client/shelf.ts
@@ -267,6 +287,20 @@ async function scanShelf(list, read, root, signal, options = {}) {
267
287
  games.sort((a, b) => b.updatedAt.localeCompare(a.updatedAt) || a.title.localeCompare(b.title));
268
288
  return { games, partial: found.partial };
269
289
  }
290
+ var collator = new Intl.Collator(["zh-Hans-CN", "en"], { numeric: true, sensitivity: "base" });
291
+ function viewGames(games, filter, sort) {
292
+ const shown = games.filter((game) => filter === "all" || game.dimension === filter);
293
+ if (sort === "versions") return [...shown].sort((a, b) => b.versions - a.versions || b.updatedAt.localeCompare(a.updatedAt));
294
+ if (sort === "name") return [...shown].sort((a, b) => collator.compare(a.title, b.title));
295
+ return shown;
296
+ }
297
+ function dimensionCounts(games) {
298
+ return {
299
+ all: games.length,
300
+ "2d": games.filter((game) => game.dimension === "2d").length,
301
+ "3d": games.filter((game) => game.dimension === "3d").length
302
+ };
303
+ }
270
304
 
271
305
  // src/client/index.tsx
272
306
  var import_jsx_runtime = require("react/jsx-runtime");
@@ -649,17 +683,34 @@ function JobLine({ job, t }) {
649
683
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { ...s.small, color: tok.danger, marginBottom: 6 }, children: t(key, { provider, failed: String(job.failed), detail }) });
650
684
  }
651
685
  var shelfStyle = {
652
- grid: { display: "grid", gridTemplateColumns: "repeat(auto-fill, minmax(150px, 1fr))", gap: 10, padding: 10, overflow: "auto", minHeight: 0, alignContent: "start" },
653
- card: { font: "inherit", textAlign: "left", display: "flex", flexDirection: "column", gap: 0, padding: 0, borderRadius: 10, border: `1px solid ${tok.border}`, background: "transparent", color: "inherit", cursor: "pointer", overflow: "hidden" },
654
- cover: { width: "100%", aspectRatio: "16 / 10", objectFit: "cover", display: "block", background: tok.layer },
655
- coverContain: { width: "100%", aspectRatio: "16 / 10", objectFit: "contain", display: "block", background: tok.layer },
656
- body: { padding: "6px 8px 8px", display: "flex", flexDirection: "column", gap: 2, minWidth: 0 },
657
- name: { fontWeight: 600, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }
686
+ // Scrolling lives on this wrapper: a height-capped grid would squeeze its rows below the tiles' aspect-ratio height.
687
+ scroll: { flex: "1 1 auto", minHeight: 0, overflow: "auto" },
688
+ grid: { display: "grid", gridTemplateColumns: "repeat(auto-fill, minmax(168px, 1fr))", gridAutoRows: "max-content", gap: 8, padding: 10 },
689
+ tile: { position: "relative", display: "block", width: "100%", aspectRatio: "4 / 3", padding: 0, border: 0, borderRadius: 10, overflow: "hidden", cursor: "pointer", font: "inherit", textAlign: "left", color: "#fff", background: "#1d1f24" },
690
+ // Character art (no playtest yet) sits whole on a soft backdrop above the caption.
691
+ art: { position: "absolute", inset: "8% 12% 30%", width: "76%", height: "62%", objectFit: "contain" },
692
+ artBackdrop: { position: "absolute", inset: 0, background: "radial-gradient(circle at 50% 40%, #3a3f4b 0%, #1d1f24 75%)" },
693
+ shot: { position: "absolute", inset: 0, width: "100%", height: "100%", objectFit: "cover" },
694
+ caption: { position: "absolute", left: 0, right: 0, bottom: 0, padding: "28px 10px 8px", background: "linear-gradient(to top, rgba(0,0,0,.82) 0%, rgba(0,0,0,.55) 55%, rgba(0,0,0,0) 100%)", display: "flex", flexDirection: "column", gap: 2, minWidth: 0 },
695
+ name: { fontWeight: 600, fontSize: 14, lineHeight: 1.3, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", textShadow: "0 1px 2px rgba(0,0,0,.5)" },
696
+ meta: { fontSize: 11, lineHeight: 1.3, color: "rgba(255,255,255,.72)", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" },
697
+ controls: { display: "flex", alignItems: "center", gap: 6, padding: "8px 10px 0", flexWrap: "wrap" },
698
+ chip: { font: "inherit", fontSize: 12, padding: "3px 11px", borderRadius: 999, border: 0, cursor: "pointer" },
699
+ sort: { font: "inherit", fontSize: 12, padding: "2px 4px", border: 0, background: "transparent", cursor: "pointer" }
658
700
  };
701
+ var SHELF_CSS = `
702
+ [data-view="shelf"] .dgs-tile img { transition: transform .25s ease; }
703
+ [data-view="shelf"] .dgs-tile:hover img, [data-view="shelf"] .dgs-tile:focus-visible img { transform: scale(1.05); }
704
+ [data-view="shelf"] .dgs-tile:focus-visible { outline: 2px solid var(--dsw-alias-interactive-border-focus, #4c8bf5); outline-offset: 2px; }
705
+ [data-view="shelf"] .dgs-chip { background: var(--dsw-alias-bg-layer-1, rgba(128,128,128,.12)); color: var(--dsw-alias-label-primary, inherit); }
706
+ [data-view="shelf"] .dgs-chip[aria-pressed="true"] { background: var(--dsw-alias-label-primary, #222); color: var(--dsw-alias-bg-base, #fff); font-weight: 600; }
707
+ [data-view="shelf"] .dgs-sort { color: var(--dsw-alias-label-secondary, #888); }
708
+ [data-view="shelf"] .dgs-sort[aria-pressed="true"] { color: var(--dsw-alias-label-primary, inherit); font-weight: 600; }
709
+ `;
659
710
  function when(iso) {
660
711
  const date = new Date(iso);
661
712
  if (Number.isNaN(date.getTime())) return "";
662
- return date.toLocaleString(void 0, { month: "short", day: "numeric", hour: "2-digit", minute: "2-digit" });
713
+ return date.toLocaleDateString(void 0, { month: "short", day: "numeric" });
663
714
  }
664
715
  function ShelfCard({ game, sessionId, readBytes, t, open }) {
665
716
  const url = useFileUrl(readBytes, sessionId, game.cover, game.updatedAt);
@@ -670,24 +721,29 @@ function ShelfCard({ game, sessionId, readBytes, t, open }) {
670
721
  game.versions > 0 ? t("shelf.versions", { count: String(game.versions) }) : "",
671
722
  when(game.updatedAt)
672
723
  ].filter(Boolean).join(" \xB7 ");
673
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", { type: "button", style: shelfStyle.card, onClick: () => {
724
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", { type: "button", className: "dgs-tile", style: shelfStyle.tile, onClick: () => {
674
725
  open(game);
675
- }, title: t("shelf.play", { title: game.title }), "data-project": game.project, children: [
676
- url ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", { src: url, alt: "", style: screenshot ? shelfStyle.cover : shelfStyle.coverContain }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: shelfStyle.cover }),
677
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: shelfStyle.body, children: [
726
+ }, title: t("shelf.play", { title: game.title }), "aria-label": t("shelf.play", { title: game.title }), "data-project": game.project, children: [
727
+ !screenshot && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: shelfStyle.artBackdrop }),
728
+ url && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", { src: url, alt: "", style: screenshot ? shelfStyle.shot : shelfStyle.art }),
729
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: shelfStyle.caption, children: [
678
730
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: shelfStyle.name, children: game.title }),
679
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: s.small, children: meta })
731
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: shelfStyle.meta, children: meta })
680
732
  ] })
681
733
  ] });
682
734
  }
683
735
  function ShelfTab(props) {
684
- const { useTabInfo, t, shelfSession, readBytes, listDir, useSessions } = props;
736
+ const { useTabInfo, t, shelfSession, readBytes, listDir, runCommand, useSessions } = props;
685
737
  const { tab } = useTabInfo();
686
738
  const sessionId = shelfSession || props.sessionId;
687
739
  const cwd = useSessions ? useSessions((sessions) => sessions?.byId?.[sessionId]?.cwd) : void 0;
688
740
  const [version, setVersion] = (0, import_react.useState)(0);
689
741
  const [scan, setScan] = (0, import_react.useState)();
690
742
  const visible = tab?.visible !== false;
743
+ const [filter, setFilter] = (0, import_react.useState)("all");
744
+ const [sort, setSort] = (0, import_react.useState)("recent");
745
+ const [busy, setBusy] = (0, import_react.useState)(false);
746
+ const [notice, setNotice] = (0, import_react.useState)();
691
747
  (0, import_react.useEffect)(() => {
692
748
  const listener = () => {
693
749
  setVersion((value) => value + 1);
@@ -713,17 +769,94 @@ function ShelfTab(props) {
713
769
  const open = (0, import_react.useCallback)((game) => {
714
770
  tab.actions.openResource(studioAddress(sessionId, game.project));
715
771
  }, [tab, sessionId]);
772
+ const shown = (0, import_react.useMemo)(() => scan ? viewGames(scan.games, filter, sort) : [], [scan, filter, sort]);
773
+ const counts = (0, import_react.useMemo)(() => dimensionCounts(scan?.games ?? []), [scan]);
774
+ const exportWall = (0, import_react.useCallback)(async () => {
775
+ setBusy(true);
776
+ setNotice(void 0);
777
+ try {
778
+ const lang = t("shelf.refresh") === "\u5237\u65B0" ? "zh" : "en";
779
+ const result = await runCommand(sessionId, `wall ${JSON.stringify({ projects: shown.map((game) => game.project), lang })}`);
780
+ if (!result.ok) {
781
+ setNotice({ kind: "error", text: t("shelf.exportFailed", { message: result.text }) });
782
+ return;
783
+ }
784
+ const wall = JSON.parse(result.text);
785
+ const text = t("shelf.exported", { file: wall.file, count: String(wall.games), size: `${(wall.bytes / 1048576).toFixed(1)} MB` });
786
+ setNotice({ kind: "info", text: wall.skipped.length > 0 ? `${text} ${t("shelf.exportSkipped", { count: String(wall.skipped.length) })}` : text });
787
+ } finally {
788
+ setBusy(false);
789
+ }
790
+ }, [runCommand, sessionId, shown, t]);
791
+ const chip = (value, label) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
792
+ "button",
793
+ {
794
+ type: "button",
795
+ className: "dgs-chip",
796
+ "aria-pressed": filter === value,
797
+ style: shelfStyle.chip,
798
+ onClick: () => {
799
+ setFilter(value);
800
+ },
801
+ children: [
802
+ label,
803
+ " ",
804
+ counts[value]
805
+ ]
806
+ },
807
+ value
808
+ );
809
+ const order = (value, label) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
810
+ "button",
811
+ {
812
+ type: "button",
813
+ className: "dgs-sort",
814
+ "aria-pressed": sort === value,
815
+ style: shelfStyle.sort,
816
+ onClick: () => {
817
+ setSort(value);
818
+ },
819
+ children: label
820
+ },
821
+ value
822
+ );
716
823
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: s.root, "data-plugin": "dsh-game-studio", "data-view": "shelf", children: [
824
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("style", { children: SHELF_CSS }),
717
825
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: s.bar, children: [
718
826
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: s.title, children: t("shelf.title") }),
719
- scan && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: s.small, children: t("shelf.count", { count: String(scan.games.length) }) }),
827
+ scan && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: s.small, children: t("shelf.count", { count: String(shown.length) }) }),
720
828
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", style: s.button, onClick: () => {
721
829
  setVersion((value) => value + 1);
722
- }, children: t("shelf.refresh") })
830
+ }, children: t("shelf.refresh") }),
831
+ scan && scan.games.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
832
+ "button",
833
+ {
834
+ type: "button",
835
+ style: s.button,
836
+ disabled: busy || shown.length === 0,
837
+ title: t("shelf.exportHint"),
838
+ onClick: () => {
839
+ void exportWall();
840
+ },
841
+ children: busy ? t("shelf.exporting") : t("shelf.export")
842
+ }
843
+ )
723
844
  ] }),
845
+ notice && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: notice.kind === "error" ? s.error : s.hint, children: notice.text }),
724
846
  !sessionId || !cwd ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: s.hint, children: t("shelf.noSession") }) : scan === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: s.hint, children: t("shelf.scanning") }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
725
847
  scan.partial && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: s.hint, children: t("shelf.partial") }),
726
- scan.games.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { ...s.hint, borderBottom: 0 }, children: t("shelf.empty") }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: shelfStyle.grid, children: scan.games.map((game) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ShelfCard, { game, sessionId, readBytes, t, open }, game.project)) })
848
+ scan.games.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { ...s.hint, borderBottom: 0 }, children: t("shelf.empty") }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
849
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: shelfStyle.controls, children: [
850
+ chip("all", t("shelf.all")),
851
+ counts["2d"] > 0 && chip("2d", "2D"),
852
+ counts["3d"] > 0 && chip("3d", "3D"),
853
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: { flex: 1 } }),
854
+ order("recent", t("shelf.sortRecent")),
855
+ order("versions", t("shelf.sortVersions")),
856
+ order("name", t("shelf.sortName"))
857
+ ] }),
858
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: shelfStyle.scroll, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: shelfStyle.grid, children: shown.map((game) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ShelfCard, { game, sessionId, readBytes, t, open }, game.project)) }) })
859
+ ] })
727
860
  ] })
728
861
  ] });
729
862
  }
@@ -813,7 +946,7 @@ function apply(ctx) {
813
946
  name: "sidebar.right.pane.tab",
814
947
  key: SHELF_ID,
815
948
  locale: NS,
816
- inject: (sessionId) => ({ shelfSession: typeof sessionId === "string" ? sessionId : "", readBytes, listDir })
949
+ inject: (sessionId) => ({ shelfSession: typeof sessionId === "string" ? sessionId : "", readBytes, listDir, runCommand })
817
950
  }, ShelfTab)), "dsh-game-studio: shelf body");
818
951
  for (const tool of TOOLS) {
819
952
  ctx.slots.inject("tool.call.toolview", () => ctx.slots.register({
package/lib/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // src/index.ts
2
- import { copyFile as copyFile3, mkdir as mkdir6, readFile as readFile10, stat as stat5 } from "node:fs/promises";
3
- import { basename as basename4, join as join9, relative as relative2 } from "node:path";
2
+ import { copyFile as copyFile3, mkdir as mkdir7, readFile as readFile11, stat as stat5 } from "node:fs/promises";
3
+ import { basename as basename4, join as join10, relative as relative3 } from "node:path";
4
4
  import { defineTool } from "@deepseek-ai/dsh-tools";
5
5
 
6
6
  // src/assets.ts
@@ -355,6 +355,9 @@ async function runtimeScripts(manifest) {
355
355
  }
356
356
  return scripts;
357
357
  }
358
+ async function runtimeTag(id) {
359
+ return `<script>${inlineSafe(await readFile4(RUNTIME_FILES[id], "utf8"))}</script>`;
360
+ }
358
361
  function inlineSafe(text) {
359
362
  return text.replace(/<\/(script)/giu, "<\\/$1").replace(/<!--/gu, "<\\!--");
360
363
  }
@@ -3524,6 +3527,357 @@ async function askUser(approval, exec, toolName, notice, kind) {
3524
3527
  throw new StudioError(`Nobody could approve this ${kind} (no approval prompt, or the approval policy is "never"). ${fallback}`, "NO_APPROVAL");
3525
3528
  }
3526
3529
 
3530
+ // src/wall.ts
3531
+ import { lstat, mkdir as mkdir6, readdir as readdir6, readFile as readFile10 } from "node:fs/promises";
3532
+ import { join as join9, relative as relative2 } from "node:path";
3533
+
3534
+ // src/client/shelf.ts
3535
+ var SKIP = /* @__PURE__ */ new Set(["node_modules", "dist", "assets", "build", "out", "vendor", "target"]);
3536
+ var IMAGE = /\.(png|jpe?g|webp|svg)$/iu;
3537
+ var DEFAULTS = { maxDepth: 2, maxLists: 80, concurrency: 4 };
3538
+ function joinPath(dir, name2) {
3539
+ return `${dir.replace(/[\\/]+$/u, "")}/${name2}`;
3540
+ }
3541
+ function isDir(entry) {
3542
+ return entry.type === "directory";
3543
+ }
3544
+ async function findGameDirs(list, root, signal, options = {}) {
3545
+ const { maxDepth, maxLists } = { ...DEFAULTS, ...options };
3546
+ const dirs = [];
3547
+ let partial = false;
3548
+ let lists = 0;
3549
+ let level = [root];
3550
+ for (let depth = 0; depth <= maxDepth && level.length > 0; depth++) {
3551
+ const next = [];
3552
+ for (const dir of level) {
3553
+ if (signal.aborted) return { dirs, partial: true };
3554
+ if (lists >= maxLists) {
3555
+ partial = true;
3556
+ break;
3557
+ }
3558
+ lists += 1;
3559
+ let listing;
3560
+ try {
3561
+ listing = await list(dir, signal);
3562
+ } catch {
3563
+ continue;
3564
+ }
3565
+ if (listing.truncated) partial = true;
3566
+ const names = new Map(listing.entries.map((entry) => [entry.name, entry]));
3567
+ const manifest = names.get("game.json");
3568
+ const studio = names.get(".studio");
3569
+ if (manifest && !isDir(manifest) && studio && isDir(studio)) {
3570
+ dirs.push(dir);
3571
+ continue;
3572
+ }
3573
+ if (depth === maxDepth) continue;
3574
+ for (const entry of listing.entries) {
3575
+ if (isDir(entry) && !entry.name.startsWith(".") && !SKIP.has(entry.name)) next.push(joinPath(dir, entry.name));
3576
+ }
3577
+ }
3578
+ if (lists >= maxLists && next.length > 0) partial = true;
3579
+ level = next.sort();
3580
+ }
3581
+ return { dirs, partial };
3582
+ }
3583
+ async function readJson2(read, path, signal) {
3584
+ try {
3585
+ return JSON.parse(await read(path, signal));
3586
+ } catch {
3587
+ return void 0;
3588
+ }
3589
+ }
3590
+ async function listNames(list, path, signal) {
3591
+ try {
3592
+ return (await list(path, signal)).entries;
3593
+ } catch {
3594
+ return [];
3595
+ }
3596
+ }
3597
+ async function pickCover(list, project, manifest, signal) {
3598
+ const studio = joinPath(project, ".studio");
3599
+ const studioEntries = await listNames(list, studio, signal);
3600
+ if (studioEntries.some((entry) => entry.name === "cover.jpg" && !isDir(entry))) return joinPath(studio, "cover.jpg");
3601
+ if (studioEntries.some((entry) => entry.name === "playtest" && isDir(entry))) {
3602
+ const playtests = joinPath(studio, "playtest");
3603
+ const runs = (await listNames(list, playtests, signal)).filter((entry) => isDir(entry) && entry.name.startsWith("run-")).map((entry) => entry.name).sort().reverse();
3604
+ for (const run of runs.slice(0, 3)) {
3605
+ const shots = new Set((await listNames(list, joinPath(playtests, run), signal)).map((entry) => entry.name));
3606
+ for (const shot of ["mid.jpg", "title.jpg", "end.jpg"]) if (shots.has(shot)) return joinPath(joinPath(playtests, run), shot);
3607
+ }
3608
+ }
3609
+ const slots = manifest?.slots ?? {};
3610
+ const hero = slots.hero ?? Object.values(slots)[0];
3611
+ const file = typeof hero?.file === "string" ? hero.file : void 0;
3612
+ return file && IMAGE.test(file) && !file.startsWith("/") && !file.includes("..") ? joinPath(project, file) : void 0;
3613
+ }
3614
+ async function describeGame(list, read, project, signal) {
3615
+ const [manifest, state] = await Promise.all([
3616
+ readJson2(read, joinPath(project, "game.json"), signal),
3617
+ readJson2(read, joinPath(project, ".studio/state.json"), signal)
3618
+ ]);
3619
+ const title = [state?.title, manifest?.title].find((value) => typeof value === "string" && value.trim() !== "");
3620
+ const template = manifest?.template;
3621
+ const orientation = (state?.orientation ?? manifest?.orientation) === "landscape" ? "landscape" : "portrait";
3622
+ const versions = Array.isArray(state?.versions) ? state.versions : [];
3623
+ const newest = versions[0];
3624
+ const updatedAt = typeof state?.updatedAt === "string" ? state.updatedAt : typeof newest?.createdAt === "string" ? newest.createdAt : "";
3625
+ return {
3626
+ project,
3627
+ title: title ?? project.split(/[\\/]/u).filter(Boolean).at(-1) ?? project,
3628
+ dimension: template === "voxel" ? "3d" : template === "collector" ? "2d" : void 0,
3629
+ orientation,
3630
+ built: state?.build !== null && state?.build !== void 0,
3631
+ versions: versions.length,
3632
+ updatedAt,
3633
+ cover: await pickCover(list, project, manifest, signal)
3634
+ };
3635
+ }
3636
+ async function scanShelf(list, read, root, signal, options = {}) {
3637
+ const { concurrency } = { ...DEFAULTS, ...options };
3638
+ const found = await findGameDirs(list, root, signal, options);
3639
+ const games = [];
3640
+ for (let i = 0; i < found.dirs.length; i += concurrency) {
3641
+ if (signal.aborted) break;
3642
+ games.push(...await Promise.all(found.dirs.slice(i, i + concurrency).map((dir) => describeGame(list, read, dir, signal))));
3643
+ }
3644
+ games.sort((a, b) => b.updatedAt.localeCompare(a.updatedAt) || a.title.localeCompare(b.title));
3645
+ return { games, partial: found.partial };
3646
+ }
3647
+ var collator = new Intl.Collator(["zh-Hans-CN", "en"], { numeric: true, sensitivity: "base" });
3648
+
3649
+ // src/wall.ts
3650
+ var fsList = async (path) => {
3651
+ const entries = await readdir6(path, { withFileTypes: true });
3652
+ return { entries: entries.map((entry) => ({ name: entry.name, type: entry.isDirectory() ? "directory" : entry.isFile() ? "file" : "other" })), truncated: false };
3653
+ };
3654
+ var fsRead = async (path) => readFile10(path, "utf8");
3655
+ function listGames(root, signal = new AbortController().signal) {
3656
+ return scanShelf(fsList, fsRead, root, signal);
3657
+ }
3658
+ var MAX_WALL_BYTES = 64 * 1024 * 1024;
3659
+ var COVER_WIDTH = 480;
3660
+ var MAX_COVER_BYTES = 600 * 1024;
3661
+ async function isPlainFile(path) {
3662
+ try {
3663
+ return (await lstat(path)).isFile();
3664
+ } catch {
3665
+ return false;
3666
+ }
3667
+ }
3668
+ async function coverData(path) {
3669
+ if (!path || !await isPlainFile(path)) return void 0;
3670
+ const bytes = await readFile10(path);
3671
+ const lower = path.toLowerCase();
3672
+ if (lower.endsWith(".png")) {
3673
+ try {
3674
+ const small = encodePng(shrinkToWidth(decodePng(bytes), COVER_WIDTH));
3675
+ return `data:image/png;base64,${Buffer.from(small).toString("base64")}`;
3676
+ } catch {
3677
+ return void 0;
3678
+ }
3679
+ }
3680
+ if (bytes.byteLength > MAX_COVER_BYTES) return void 0;
3681
+ const type = lower.endsWith(".svg") ? "image/svg+xml" : lower.endsWith(".webp") ? "image/webp" : /\.jpe?g$/u.test(lower) ? "image/jpeg" : void 0;
3682
+ return type ? `data:${type};base64,${bytes.toString("base64")}` : void 0;
3683
+ }
3684
+ function slugOf(name2) {
3685
+ return name2.normalize("NFKC").replace(/[^\p{L}\p{N}]+/gu, "-").replace(/^-|-$/gu, "").toLowerCase() || "game-wall";
3686
+ }
3687
+ function scriptJson(value) {
3688
+ return JSON.stringify(value).replace(/</gu, "\\u003c").replace(/\u2028/gu, "\\u2028").replace(/\u2029/gu, "\\u2029");
3689
+ }
3690
+ function guessLang(games) {
3691
+ return games.some((game) => /[㐀-鿿]/u.test(game.title)) ? "zh" : "en";
3692
+ }
3693
+ async function exportWall(options) {
3694
+ const { root } = options;
3695
+ const signal = options.signal ?? new AbortController().signal;
3696
+ const scan = await listGames(root, signal);
3697
+ const byPath = new Map(scan.games.map((game) => [game.project, game]));
3698
+ const skipped = [];
3699
+ let chosen;
3700
+ if (options.projects && options.projects.length > 0) {
3701
+ chosen = [];
3702
+ for (const path of options.projects) {
3703
+ const dir2 = resolveInside(root, path);
3704
+ const game = byPath.get(dir2);
3705
+ if (game) chosen.push(game);
3706
+ else skipped.push({ path, reason: "not a game folder (needs game.json and .studio/)" });
3707
+ }
3708
+ } else chosen = scan.games;
3709
+ const runtimes = {};
3710
+ for (const id of RUNTIMES) {
3711
+ try {
3712
+ runtimes[id] = await runtimeTag(id);
3713
+ } catch {
3714
+ }
3715
+ }
3716
+ const usedRuntimes = /* @__PURE__ */ new Set();
3717
+ const entries = [];
3718
+ for (const game of chosen) {
3719
+ if (signal.aborted) throw new StudioError("Export was cancelled", "CANCELLED");
3720
+ const rel = relative2(root, game.project) || ".";
3721
+ const artifact = join9(game.project, "dist", "index.html");
3722
+ if (!await isPlainFile(artifact)) {
3723
+ skipped.push({ path: rel, reason: "not built yet" });
3724
+ continue;
3725
+ }
3726
+ let html = await readFile10(artifact, "utf8");
3727
+ for (const id of RUNTIMES) {
3728
+ const tag = runtimes[id];
3729
+ if (tag && html.includes(tag)) {
3730
+ html = html.split(tag).join(`<!--dsh-runtime:${id}-->`);
3731
+ usedRuntimes.add(id);
3732
+ }
3733
+ }
3734
+ entries.push({
3735
+ title: game.title,
3736
+ dimension: game.dimension ?? "",
3737
+ orientation: game.orientation,
3738
+ versions: game.versions,
3739
+ updatedAt: game.updatedAt,
3740
+ cover: await coverData(game.cover),
3741
+ html
3742
+ });
3743
+ }
3744
+ if (entries.length === 0) throw new StudioError("No built games to put on the wall", "NOTHING_TO_EXPORT");
3745
+ const lang = options.lang ?? guessLang(chosen);
3746
+ const data = {
3747
+ lang,
3748
+ exportedAt: (/* @__PURE__ */ new Date()).toISOString(),
3749
+ runtimes: Object.fromEntries([...usedRuntimes].map((id) => [id, runtimes[id]])),
3750
+ games: entries
3751
+ };
3752
+ const page = renderWallPage(lang, scriptJson(data));
3753
+ const bytes = Buffer.byteLength(page);
3754
+ if (bytes > MAX_WALL_BYTES) {
3755
+ throw new StudioError(`The wall would be ${(bytes / 1048576).toFixed(1)} MB; the limit is ${MAX_WALL_BYTES / 1048576} MB. Export fewer games.`, "TOO_LARGE");
3756
+ }
3757
+ const dir = join9(root, "export");
3758
+ await mkdir6(dir, { recursive: true });
3759
+ const file = join9(dir, `${slugOf(options.name ?? "game-wall")}.html`);
3760
+ await writeFileAtomic(file, page);
3761
+ return { file, bytes, games: entries.length, skipped };
3762
+ }
3763
+ var COPY = {
3764
+ zh: { title: "\u6E38\u620F\u5899", count: "{n} \u6B3E", all: "\u5168\u90E8", made: "\u7528 DSH \u6E38\u620F\u5DE5\u574A\u505A\u7684 \xB7 \u5BFC\u51FA\u4E8E {date}", back: "\u2190 \u8FD4\u56DE\u6E38\u620F\u5899", versions: "{n} \u4E2A\u7248\u672C", hint: "Esc \u8FD4\u56DE" },
3765
+ en: { title: "Game wall", count: "{n} games", all: "All", made: "Made with DSH Game Studio \xB7 exported {date}", back: "\u2190 Back to the wall", versions: "{n} versions", hint: "Esc to go back" }
3766
+ };
3767
+ var CSP2 = [
3768
+ "default-src 'none'",
3769
+ "img-src data: blob:",
3770
+ "media-src data: blob:",
3771
+ "font-src data:",
3772
+ "style-src 'unsafe-inline'",
3773
+ "script-src 'unsafe-inline'",
3774
+ "connect-src 'none'",
3775
+ "form-action 'none'"
3776
+ ].join("; ");
3777
+ function renderWallPage(lang, json) {
3778
+ const copy = COPY[lang];
3779
+ return `<!doctype html>
3780
+ <html lang="${lang === "zh" ? "zh-CN" : "en"}"><head><meta charset="utf-8">
3781
+ <meta name="viewport" content="width=device-width,initial-scale=1">
3782
+ <meta http-equiv="Content-Security-Policy" content="${CSP2}">
3783
+ <title>${copy.title}</title>
3784
+ <style>
3785
+ :root{color-scheme:dark;--bg:#111317;--fg:#f2f3f5;--muted:#9aa0aa;--chip:#23262d;--chip-on:#f2f3f5;--chip-on-fg:#111317}
3786
+ *{box-sizing:border-box}html,body{margin:0;background:var(--bg);color:var(--fg);font:14px/1.4 -apple-system,BlinkMacSystemFont,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",system-ui,sans-serif}
3787
+ header{padding:20px 16px 8px;max-width:1280px;margin:0 auto}
3788
+ h1{margin:0;font-size:24px;display:flex;align-items:baseline;gap:10px}h1 small{font-size:14px;color:var(--muted);font-weight:400}
3789
+ .made{margin:4px 0 0;color:var(--muted);font-size:12px}.made a{color:inherit}
3790
+ .chips{display:flex;gap:8px;margin:14px 0 4px;flex-wrap:wrap}
3791
+ .chip{font:inherit;border:0;border-radius:999px;padding:5px 14px;background:var(--chip);color:var(--fg);cursor:pointer}
3792
+ .chip[aria-pressed="true"]{background:var(--chip-on);color:var(--chip-on-fg);font-weight:600}
3793
+ main{display:grid;grid-template-columns:repeat(auto-fill,minmax(168px,1fr));gap:10px;padding:8px 16px 28px;max-width:1280px;margin:0 auto}
3794
+ .tile{position:relative;aspect-ratio:4/3;border:0;padding:0;border-radius:12px;overflow:hidden;cursor:pointer;background:#1d1f24;color:#fff;font:inherit;text-align:left}
3795
+ .tile .shot{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transition:transform .25s ease}
3796
+ .tile .art{position:absolute;inset:8% 12% 30%;width:76%;height:62%;object-fit:contain;transition:transform .25s ease}
3797
+ .tile.art-bg{background:radial-gradient(circle at 50% 40%,#3a3f4b 0%,#1d1f24 75%)}
3798
+ .tile:hover img,.tile:focus-visible img{transform:scale(1.05)}.tile:focus-visible{outline:2px solid #4c8bf5;outline-offset:2px}
3799
+ .cap{position:absolute;left:0;right:0;bottom:0;padding:28px 10px 8px;background:linear-gradient(to top,rgba(0,0,0,.82),rgba(0,0,0,.55) 55%,rgba(0,0,0,0))}
3800
+ .name{display:block;font-weight:600;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-shadow:0 1px 2px rgba(0,0,0,.5)}
3801
+ .meta{display:block;font-size:12px;color:rgba(255,255,255,.72);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
3802
+ #player{position:fixed;inset:0;background:#000;display:none;z-index:10}#player.open{display:block}
3803
+ #player iframe{position:absolute;top:40px;left:0;width:100%;height:calc(100% - 40px);border:0}
3804
+ #bar{position:absolute;top:0;left:0;right:0;height:40px;display:flex;align-items:center;gap:10px;padding:0 10px;background:#16181c;border-bottom:1px solid #2a2d33}
3805
+ #bar strong{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
3806
+ #back{font:inherit;font-size:13px;border:0;border-radius:999px;padding:5px 12px;background:#2a2d33;color:#fff;cursor:pointer;flex:none}
3807
+ #back:hover,#back:focus-visible{background:#3a3e46}
3808
+ #back small{opacity:.7;margin-left:6px}
3809
+ </style></head><body>
3810
+ <header><h1>${copy.title} <small id="count"></small></h1><p class="made" id="made"></p><div class="chips" id="chips"></div></header>
3811
+ <main id="wall"></main>
3812
+ <div id="player" role="dialog" aria-modal="true"><div id="bar"><button id="back" type="button">${copy.back}<small>${copy.hint}</small></button><strong id="playing"></strong></div></div>
3813
+ <script type="application/json" id="data">${json}</script>
3814
+ <script>
3815
+ (function () {
3816
+ var COPY = ${JSON.stringify(copy)};
3817
+ var data = JSON.parse(document.getElementById('data').textContent);
3818
+ var wall = document.getElementById('wall'), chips = document.getElementById('chips'), player = document.getElementById('player');
3819
+ var filter = 'all', frame = null;
3820
+ function fill(text, n) { return text.replace('{n}', String(n)).replace('{date}', n); }
3821
+ var made = document.getElementById('made');
3822
+ made.appendChild(document.createTextNode(fill(COPY.made, data.exportedAt.slice(0, 10)) + ' \xB7 '));
3823
+ var link = document.createElement('a'); link.href = 'https://github.com/ZSeven-W/dsh-game-studio'; link.target = '_blank'; link.rel = 'noopener';
3824
+ link.textContent = 'github.com/ZSeven-W/dsh-game-studio'; made.appendChild(link);
3825
+ function counts() { var c = { all: data.games.length, '2d': 0, '3d': 0 }; data.games.forEach(function (g) { if (c[g.dimension] !== undefined) c[g.dimension]++; }); return c; }
3826
+ function renderChips() {
3827
+ var c = counts(); chips.innerHTML = '';
3828
+ [['all', COPY.all], ['2d', '2D'], ['3d', '3D']].forEach(function (pair) {
3829
+ if (pair[0] !== 'all' && c[pair[0]] === 0) return;
3830
+ var b = document.createElement('button'); b.type = 'button'; b.className = 'chip';
3831
+ b.textContent = pair[1] + ' ' + c[pair[0]]; b.setAttribute('aria-pressed', String(filter === pair[0]));
3832
+ b.onclick = function () { filter = pair[0]; renderChips(); renderWall(); }; chips.appendChild(b);
3833
+ });
3834
+ }
3835
+ function renderWall() {
3836
+ wall.innerHTML = ''; var shown = 0;
3837
+ data.games.forEach(function (g, i) {
3838
+ if (filter !== 'all' && g.dimension !== filter) return; shown++;
3839
+ var shot = g.cover && g.cover.indexOf('data:image/jpeg') === 0;
3840
+ var t = document.createElement('button'); t.type = 'button'; t.className = 'tile' + (shot ? '' : ' art-bg'); t.title = g.title;
3841
+ if (g.cover) { var img = document.createElement('img'); img.src = g.cover; img.alt = ''; img.className = shot ? 'shot' : 'art'; t.appendChild(img); }
3842
+ var cap = document.createElement('span'); cap.className = 'cap';
3843
+ var name = document.createElement('span'); name.className = 'name'; name.textContent = g.title;
3844
+ var meta = document.createElement('span'); meta.className = 'meta';
3845
+ meta.textContent = [g.dimension ? g.dimension.toUpperCase() : '', g.versions > 0 ? fill(COPY.versions, g.versions) : ''].filter(Boolean).join(' \xB7 ');
3846
+ cap.appendChild(name); cap.appendChild(meta); t.appendChild(cap);
3847
+ t.onclick = function () { play(i); }; wall.appendChild(t);
3848
+ });
3849
+ document.getElementById('count').textContent = fill(COPY.count, shown);
3850
+ }
3851
+ function play(i) {
3852
+ var g = data.games[i];
3853
+ var html = g.html.replace(/<!--dsh-runtime:([a-z0-9]+)-->/g, function (all, id) { return data.runtimes[id] || all; });
3854
+ close();
3855
+ frame = document.createElement('iframe');
3856
+ frame.setAttribute('sandbox', 'allow-scripts allow-same-origin allow-pointer-lock');
3857
+ frame.setAttribute('allow', 'fullscreen; gamepad; autoplay');
3858
+ frame.title = g.title; frame.srcdoc = html;
3859
+ frame.onload = function () {
3860
+ try {
3861
+ frame.contentWindow.addEventListener('keydown', function (e) { if (e.key === 'Escape') close(); });
3862
+ } catch (e) { /* not reachable */ }
3863
+ try { frame.contentWindow.focus(); } catch (e) { frame.focus(); }
3864
+ };
3865
+ player.appendChild(frame); player.classList.add('open'); document.title = g.title;
3866
+ document.getElementById('playing').textContent = g.title;
3867
+ }
3868
+ function close() {
3869
+ if (frame) { frame.remove(); frame = null; }
3870
+ player.classList.remove('open'); document.title = COPY.title;
3871
+ }
3872
+ document.getElementById('back').onclick = close;
3873
+ document.addEventListener('keydown', function (e) { if (e.key === 'Escape') close(); });
3874
+ renderChips(); renderWall();
3875
+ })();
3876
+ </script>
3877
+ </body></html>
3878
+ `;
3879
+ }
3880
+
3527
3881
  // src/providers/openai.ts
3528
3882
  import { EnvHttpProxyAgent, FormData, fetch as proxyFetch } from "undici";
3529
3883
  var OPENAI_DEFAULT_MODEL = "gpt-image-2.5-flare";
@@ -3804,8 +4158,8 @@ function apply(ctx, config = {}) {
3804
4158
  const build = await buildProject(dir, "Exported");
3805
4159
  await writeState(dir, build);
3806
4160
  const slug = (fileName ?? manifest.title).normalize("NFKC").replace(/[^\p{L}\p{N}]+/gu, "-").replace(/^-|-$/gu, "").toLowerCase() || "game";
3807
- const target = join9(paths.exportDir(dir), `${slug}.html`);
3808
- await mkdir6(paths.exportDir(dir), { recursive: true });
4161
+ const target = join10(paths.exportDir(dir), `${slug}.html`);
4162
+ await mkdir7(paths.exportDir(dir), { recursive: true });
3809
4163
  await copyFile3(build.artifact, target);
3810
4164
  return { file: target, bytes: (await stat5(target)).size, buildId: build.buildId };
3811
4165
  }
@@ -3982,6 +4336,53 @@ function apply(ctx, config = {}) {
3982
4336
  return { project: dir, slot: args.slot, restored, buildId: build.buildId };
3983
4337
  }
3984
4338
  }));
4339
+ ctx.tools.register(defineTool({
4340
+ name: "game_studio_list",
4341
+ description: 'List the games in the working directory (every folder with game.json and .studio/, up to two levels down), most recently changed first, with title, 2D/3D, whether it is built, and how many versions it has. Use it to find the game the user means ("the penguin game") before editing it, instead of searching the folders yourself. The user sees the same games on the Game wall in the sidebar (+ \u2192 Game Studio \xB7 My games).',
4342
+ parameters: {},
4343
+ output: { schema: json, render: (_args, value) => [{ type: "text", text: JSON.stringify(value) }] },
4344
+ async execute(_args, exec) {
4345
+ const cwd = await projectDir(exec, ".");
4346
+ const scan = await listGames(cwd, exec.signal);
4347
+ return {
4348
+ games: scan.games.map((game) => ({
4349
+ path: relative3(cwd, game.project) || ".",
4350
+ title: game.title,
4351
+ dimension: game.dimension ?? "unknown",
4352
+ built: game.built,
4353
+ versions: game.versions,
4354
+ updatedAt: game.updatedAt
4355
+ })),
4356
+ ...scan.partial ? { note: "The workspace is large; only part of it was searched. Ask the user for the folder if the game is missing." } : {}
4357
+ };
4358
+ }
4359
+ }));
4360
+ ctx.tools.register(defineTool({
4361
+ name: "game_studio_export_wall",
4362
+ description: "Export the game wall: one offline HTML page with a tile for every built game in the working directory (or the ones listed), where clicking a tile plays that game full-window. Good for sending to friends or putting on a static host. Written to export/<name>.html in the working directory. Games are not rebuilt; ones never built are left out and reported.",
4363
+ parameters: {
4364
+ games: { type: "string", description: "Optional JSON array of game folders (relative paths from game_studio_list) in display order. Default: every game, newest first." },
4365
+ name: { type: "string", description: "File name without extension. Default game-wall." },
4366
+ lang: { type: "string", enum: ["zh", "en"], description: "Page language. Default: zh when the game titles are Chinese, else en." }
4367
+ },
4368
+ output: { schema: json, render: (_args, value) => [{ type: "text", text: JSON.stringify(value) }] },
4369
+ async execute(args, exec) {
4370
+ const cwd = await projectDir(exec, ".");
4371
+ let projects;
4372
+ if (typeof args.games === "string" && args.games.trim() !== "") {
4373
+ let parsed;
4374
+ try {
4375
+ parsed = JSON.parse(args.games);
4376
+ } catch {
4377
+ throw new StudioError("games must be a JSON array of folder paths", "BAD_GAMES");
4378
+ }
4379
+ if (!Array.isArray(parsed) || !parsed.every((item) => typeof item === "string")) throw new StudioError("games must be a JSON array of folder paths", "BAD_GAMES");
4380
+ projects = parsed;
4381
+ }
4382
+ const result = await exportWall({ root: cwd, projects, name: args.name, lang: args.lang, signal: exec.signal });
4383
+ return { ...result, file: relative3(cwd, result.file) };
4384
+ }
4385
+ }));
3985
4386
  ctx.tools.register(defineTool({
3986
4387
  name: "game_studio_export",
3987
4388
  description: "Export the game as one self-contained HTML file (no network, works offline, opens in any browser or on a static host) into the project's export/ folder.",
@@ -4070,7 +4471,7 @@ function apply(ctx, config = {}) {
4070
4471
  let budget = Math.min(limits.maxImageBytes ?? Infinity, limits.maxMessageImageBytes ?? Infinity);
4071
4472
  const order = ["characters", "mid", "end", "title"];
4072
4473
  for (const shot of [...report.shots].sort((a, b) => order.indexOf(a.name) - order.indexOf(b.name))) {
4073
- const data = await readFile10(shot.file);
4474
+ const data = await readFile11(shot.file);
4074
4475
  if (data.byteLength > budget) continue;
4075
4476
  try {
4076
4477
  images.push({ name: shot.name, attachment: await attachments.saveImage({ data: new Uint8Array(data), mediaType: shot.mediaType, name: basename4(shot.file) }) });
@@ -4087,7 +4488,7 @@ function apply(ctx, config = {}) {
4087
4488
  finalPhase: report.finalPhase,
4088
4489
  bestScore: report.bestScore,
4089
4490
  errors: report.errors.length,
4090
- runDir: relative2(dir, report.runDir),
4491
+ runDir: relative3(dir, report.runDir),
4091
4492
  images
4092
4493
  };
4093
4494
  }
@@ -4124,8 +4525,8 @@ function apply(ctx, config = {}) {
4124
4525
  ctx.inject(["commands"], (child) => {
4125
4526
  child.commands.register({
4126
4527
  name: "game-studio",
4127
- description: "Game Studio sidebar actions (apply, revert, build, export, restore, share, unshare)",
4128
- input: { hint: '<apply|revert|build|export|restore|share|unshare> {"project": "...", ...}' },
4528
+ description: "Game Studio sidebar actions (apply, revert, build, export, restore, share, unshare, wall)",
4529
+ input: { hint: '<apply|revert|build|export|restore|share|unshare|wall> {"project": "...", ...}' },
4129
4530
  async handler({ agent: agent2, rawInput }) {
4130
4531
  try {
4131
4532
  const input = String(rawInput).trim();
@@ -4133,6 +4534,12 @@ function apply(ctx, config = {}) {
4133
4534
  const action = space < 0 ? input : input.slice(0, space);
4134
4535
  const payload = space < 0 ? {} : JSON.parse(input.slice(space + 1));
4135
4536
  const cwd = await ctx.workingDirectory.ensure(agent2);
4537
+ if (action === "wall") {
4538
+ const projects = Array.isArray(payload.projects) ? payload.projects.filter((item) => typeof item === "string") : void 0;
4539
+ const lang = payload.lang === "zh" || payload.lang === "en" ? payload.lang : void 0;
4540
+ const wall = await exportWall({ root: cwd, projects, lang });
4541
+ return { kind: "success", text: JSON.stringify(wall) };
4542
+ }
4136
4543
  const dir = resolveInside(cwd, String(payload.project ?? ""));
4137
4544
  let result;
4138
4545
  if (action === "apply") result = await applyCandidate(dir, String(payload.slot), String(payload.candidate));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zseven-w/dsh-game-studio",
3
- "version": "0.1.0-rc.2",
3
+ "version": "0.1.0-rc.3",
4
4
  "description": "Game studio for DeepSeek Harness: describe a small game, play it in the right sidebar, and swap its art for your own generated assets.",
5
5
  "license": "MIT",
6
6
  "repository": {