@khorsheed/dsh-game 0.1.0 → 0.1.1
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/CHANGELOG.md +8 -0
- package/lib/client.js +637 -295
- package/lib/index.js +144 -1
- package/lib/typert.host.js +142 -35
- package/lib/typert.remote-client.d.ts +4 -1
- package/lib/typert.remote-client.js +81 -25
- package/lib/types/agent.js +2 -1
- package/lib/types/client/DesignView.js +3 -3
- package/lib/types/client/ElementsView.js +13 -5
- package/lib/types/client/GameTab.js +11 -6
- package/lib/types/client/PlayView.js +3 -1
- package/lib/types/client/Preview3D.d.ts +3 -1
- package/lib/types/client/Preview3D.js +4 -2
- package/lib/types/client/ProjectSwitcher.js +2 -2
- package/lib/types/client/contract.d.ts +7 -1
- package/lib/types/client/index.js +34 -0
- package/lib/types/client/locales.d.ts +3 -0
- package/lib/types/client/locales.js +6 -0
- package/lib/types/client/preview-entry.d.ts +1 -1
- package/lib/types/client/preview-entry.js +4 -1
- package/lib/types/client/reveal.d.ts +43 -0
- package/lib/types/client/reveal.js +73 -0
- package/lib/types/project.d.ts +6 -0
- package/lib/types/project.js +10 -0
- package/lib/types/remote.d.ts +3 -1
- package/lib/types/remote.js +7 -0
- package/lib/types/skills.js +1 -0
- package/lib/types/store.d.ts +22 -1
- package/lib/types/store.js +99 -1
- package/lib/types/tools.js +15 -7
- package/lib/types/types.d.ts +26 -0
- package/lib/types/vfs.d.ts +2 -0
- package/package.json +1 -1
package/lib/types/types.d.ts
CHANGED
|
@@ -243,6 +243,8 @@ export interface ElementView {
|
|
|
243
243
|
readonly look3d: Look3D | null;
|
|
244
244
|
/** The 设定 text (the element's `lore` field): who it is, its temper, how it meets the player. '' when unwritten. */
|
|
245
245
|
readonly lore: string;
|
|
246
|
+
/** When its file last changed (ms), for listing the newest first. */
|
|
247
|
+
readonly updatedAt?: number;
|
|
246
248
|
}
|
|
247
249
|
/** Longest 设定 the panel saves. */
|
|
248
250
|
export declare const LORE_MAX = 2000;
|
|
@@ -319,6 +321,30 @@ export interface VersionRecord {
|
|
|
319
321
|
/** One line about what changed (the turn's last words, or the plugin's own note). */
|
|
320
322
|
readonly note?: string;
|
|
321
323
|
}
|
|
324
|
+
/** Where in the game tab the agent asked the user to look (`game_show`). */
|
|
325
|
+
export interface ShowTarget {
|
|
326
|
+
readonly view: 'play' | 'elements' | 'design' | 'versions';
|
|
327
|
+
readonly elementId?: string;
|
|
328
|
+
readonly chapterId?: string;
|
|
329
|
+
}
|
|
330
|
+
/** The agent's latest 「请用户看这里」 for a project. */
|
|
331
|
+
export interface ShowRequest {
|
|
332
|
+
readonly seq: number;
|
|
333
|
+
readonly target: ShowTarget;
|
|
334
|
+
/** What to look at, in the agent's words (shown with the notice). */
|
|
335
|
+
readonly note: string;
|
|
336
|
+
readonly at: string;
|
|
337
|
+
}
|
|
338
|
+
/** A session's bound project's newest version, as the page polls it. */
|
|
339
|
+
export interface LiveVersion {
|
|
340
|
+
readonly projectId: string;
|
|
341
|
+
readonly version: number;
|
|
342
|
+
readonly kind: 'deployed' | 'candidate' | 'none';
|
|
343
|
+
readonly at: string | null;
|
|
344
|
+
readonly by?: VersionSource;
|
|
345
|
+
/** The agent's latest request to show the user something, if any since the host started. */
|
|
346
|
+
readonly show?: ShowRequest;
|
|
347
|
+
}
|
|
322
348
|
/** Who cut a version. */
|
|
323
349
|
export type VersionSource = 'user' | 'agent' | 'turn';
|
|
324
350
|
/** What the working files hold that the play area does not (the panel's 有新改动还没进游戏 bar). */
|
package/lib/types/vfs.d.ts
CHANGED
|
@@ -58,6 +58,8 @@ export type FrameMessage = {
|
|
|
58
58
|
readonly gamedev: 'preview-clips';
|
|
59
59
|
readonly names: readonly string[];
|
|
60
60
|
readonly parts: ModelParts | null;
|
|
61
|
+
} | {
|
|
62
|
+
readonly gamedev: 'preview-turned';
|
|
61
63
|
};
|
|
62
64
|
/** What a loaded glTF model can be tuned by (the preview reports it once loaded). */
|
|
63
65
|
export interface ModelParts {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@khorsheed/dsh-game",
|
|
3
3
|
"description": "Game-development mode: build and play a small 2D web game with the agent — a right-sidebar game-design workbench (live-tuned params, element look editor with 3-variant proposals, chaptered design doc, versions with candidate confirm, rollback and single-file export), projects in the session workspace, end-of-turn checks (data validation, headless smoke run, the project's own test scripts) that steer failures back into the same turn and deploy passing versions, and panel edits attached to the next send; tools and skills ship as the `./agent` entry the game preset grants",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"types": "lib/types/index.d.ts",
|