dsh-game-material-master 0.10.1 → 0.11.0

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.en.md CHANGED
@@ -12,7 +12,18 @@ third-party service.
12
12
  [![npm](https://img.shields.io/npm/v/dsh-game-material-master?color=blue)](https://www.npmjs.com/package/dsh-game-material-master)
13
13
  [![license](https://img.shields.io/badge/license-MIT-green)](LICENSE)
14
14
 
15
- > **🆕 0.10.0 update**: the conversational surface is now a single **`game_material`** tool
15
+ > **🆕 0.11.0 update**: both map editors gain a full **Agent loop** — `mapInspect` / `isoInspect` read cells,
16
+ > objects, stamps, markers and passability by region, while `mapRender` / `isoRender` synchronously produce a
17
+ > **check image** (region crop, zoom, optional marker / grid / passability / outline overlays) and return a local
18
+ > absolute path for `read_image`. `applyMapOps` / `applyIsoOps` add **`dryRun`** (validate without writing) and
19
+ > **`ifRevision`** (reject stale writes instead of overwriting newer edits). Markers carry **kind / color / note /
20
+ > tags** (`marker update`; export formats move to `@5` / `@2`); stamps can be **moved / rotated**, the minimum
21
+ > footprint drops to **1×1**, and passability can be **repainted from the asset properties**; 45° objects can be
22
+ > **duplicated**; tile imports accept a **local path**; every project / task has a **Copy ID** button. Also fixes
23
+ > the multi-cell stamp brush leaking into marker / eraser tools. Wire methods 184 → **188**, new
24
+ > `verify-map-agent` self-check.
25
+ >
26
+ > **0.10.0 update**: the conversational surface is now a single **`game_material`** tool
16
27
  > (`action` picks `guide / intake / call / status / wait / review / approve / reviewMode / upload`).
17
28
  > The always-resident context drops from **49 KB to about 4 KB**; flows and method tables are loaded on demand
18
29
  > through `action:"guide"`. Module ⑤ is replaced by a fully local **45° isometric map editor** (2:1 diamonds,
@@ -342,7 +353,7 @@ not pay for them in context.
342
353
 
343
354
  | action | What it does |
344
355
  |---|---|
345
- | `guide` | Read the manual: `overview` / `workflow` / `config` / `methods` / `ai-asset` / eight module topics |
356
+ | `guide` | Read the manual: `overview` / `workflow` / `config` / `methods` / `ai-asset` / `map-agent` / eight module topics |
346
357
  | `intake` | **Step 0 of the fixed workflow**: nail down the key parameters and review mode before doing anything |
347
358
  | `call` | Universal channel: every remote method of the plugin is individually callable (`{method, payload}`) |
348
359
  | `upload` | Upload assets by local file path (character sheet / reference image / first and last frames / parts…) |
@@ -361,6 +372,14 @@ game_material({ action: "call", method: "runTurnVideo", payload: { projectId } }
361
372
  game_material({ action: "wait", module: "sprite", id: projectId })
362
373
  ```
363
374
 
375
+ The map editors also expose an Agent loop — inspect state, draw, render a check image, then read it:
376
+
377
+ ```js
378
+ game_material({ action: "call", method: "mapInspect", payload: { projectId, region: { r0: 0, c0: 0, r1: 16, c1: 16 } } })
379
+ game_material({ action: "call", method: "mapRender", payload: { projectId, region: { r0: 0, c0: 0, r1: 16, c1: 16 }, overlay: { markers: true, grid: true } } })
380
+ // pass the returned localPath to read_image; use isoInspect / isoRender for the 45° editor
381
+ ```
382
+
364
383
  The old per-tool registrations (`game_material_call` / `game_material_status` / …) have been merged into this single
365
384
  tool; see [docs/ENGINEERING.md](docs/ENGINEERING.md#对话调用agent-也能驱动整条流水线) for the migration mapping.
366
385
 
@@ -368,6 +387,9 @@ Review links are **deep links**: an `openUrl` posted by the agent in its reply t
368
387
  matching plugin page when clicked, landing on the right module / project / stage without any navigating
369
388
  on your part.
370
389
 
390
+ Every project / task header also has a **Copy ID** button (side-list rows show `⧉`); one click copies
391
+ the `projectId` / `jobId` to the clipboard so you can paste it to the agent.
392
+
371
393
  ---
372
394
 
373
395
  ## Installation
@@ -381,7 +403,7 @@ dsh plugin --profile web add /path/to/dsh-game-material-master
381
403
  ```
382
404
 
383
405
  The package is published to npm: [dsh-game-material-master](https://www.npmjs.com/package/dsh-game-material-master)
384
- (currently `0.10.1`, `latest`). It has no runtime dependencies, so `dsh plugin add` is all you need.
406
+ (currently `0.11.0`, `latest`). It has no runtime dependencies, so `dsh plugin add` is all you need.
385
407
 
386
408
  **DSH version**: `>=0.2.0-rc.2 <0.3.0` (the `engines.dsh` field; since DSH 0.2.1 the plugin manager checks it first).
387
409
  When a Web deployment uses `--public-url https://host/prefix/`, deep links and asset URLs include that path prefix.
@@ -661,3 +683,7 @@ The screenshots in this document were taken by Playwright against the real UI; t
661
683
  Configure ToAPIs in settings, then select ToAPIs as the image backend and/or enable its video option. Ark/MiniMax remain the defaults; ComfyUI, custom protocols and local processing remain available. Use `https://toapis.cn/v1` in China or `https://toapis.com/v1` internationally. ToAPIs uses asynchronous media endpoints, not a drop-in synchronous OpenAI image URL.
662
684
 
663
685
  [Configuration, billing and task recovery](https://github.com/universe-st/dsh-game-material-master/blob/main/docs/TOAPIS.md). Keys stay on the host; generation is billable. Check account pricing and model settings first.
686
+
687
+ ## ToAPIs
688
+
689
+ ToAPIs is an optional image/video provider using your own key. Homepages: [China](https://toapis.cn/) / [International](https://toapis.com/); Base URLs: `https://toapis.cn/v1` / `https://toapis.com/v1`. [Configuration, scoped pricing and quick reuse](https://github.com/universe-st/dsh-game-material-master/blob/main/docs/TOAPIS.md) · [Real DSH eight-direction and sprite export acceptance](https://github.com/universe-st/dsh-game-material-master/blob/main/docs/toapis-live-20261024/README.md). See the guide for native transparent GPT Image, square videos and actual screenshots; availability depends on merge/release status.
package/README.md CHANGED
@@ -10,7 +10,14 @@
10
10
  [![npm](https://img.shields.io/npm/v/dsh-game-material-master?color=blue)](https://www.npmjs.com/package/dsh-game-material-master)
11
11
  [![license](https://img.shields.io/badge/license-MIT-green)](LICENSE)
12
12
 
13
- > **🆕 0.10.0 更新**:对话工具面收成一个 **`game_material`**(`action` 选 `guide / intake / call / status /
13
+ > **🆕 0.11.0 更新**:两套地图编辑器补上 **Agent 闭环** —— `mapInspect` / `isoInspect` 按区域读逐格、物件、整图、标记与通行性,
14
+ > `mapRender` / `isoRender` 同步出**检查图**(区域裁切、放大、可叠标记 / 网格 / 通行性 / 轮廓,返回本机绝对路径交给 `read_image`);
15
+ > `applyMapOps` / `applyIsoOps` 新增 **`dryRun`**(只校验不写盘)与 **`ifRevision`**(旧版本直接拒绝,防覆盖)。
16
+ > 标记可带 **类型 / 颜色 / 备注 / 标签**(`marker update`,导出格式升到 `@5` / `@2`);整图支持**移动 / 旋转**、最小占格放宽到 **1×1**,
17
+ > 素材属性里可**重画通行区域**;45° 物件可**复制**;导入素材支持直接传**本机路径**;所有项目 / 任务都能**一键复制 ID**。
18
+ > 另外修掉「整图多格笔刷被标记 / 橡皮借用」的问题。wire 方法 184 → **188**,新增自检 `verify-map-agent`。
19
+ >
20
+ > **0.10.0 更新**:对话工具面收成一个 **`game_material`**(`action` 选 `guide / intake / call / status /
14
21
  > wait / review / approve / reviewMode / upload`),常驻上下文从 **49 KB 降到约 4 KB**,流程与方法表改成按需读手册;
15
22
  > 模块⑤换成**全本地的 45° 地图编辑器**(2:1 等距、4×4 自动连接、多格 / 高处物件、动画地块、标记层、环绕、
16
23
  > 一键生成;还能「**AI 生成素材**」:自动开对话生成,整理好回链到「新增素材」确认导入);
@@ -19,6 +26,11 @@
19
26
  > 0.9.x 的 **音效生成**(Seed-Audio)与网络重试修复继续保留。
20
27
  >
21
28
  > **0.10.1 修复**:45° 地图编辑器「一键生成 → 大陆」不再崩溃(高度场中点插值写到了不存在的格子上)。
29
+ >
30
+ > **0.10.2 更新**:ToAPIs 生图可选**原生透明背景**(GPT Image,下载原图不再二次抠像),图生视频可选
31
+ > **画幅比例**(方形角色用 1:1);透明首帧会先铺白再交给视频模型。感谢
32
+ > [PR #8](https://github.com/universe-st/dsh-game-material-master/pull/8)([@YamiAnn](https://github.com/YamiAnn))
33
+ > 与真机验收记录。
22
34
  > 完整变更见 [AGENTS.md 发布记录](https://github.com/universe-st/dsh-game-material-master/blob/main/AGENTS.md#已发布版本)。
23
35
 
24
36
  ![游戏素材大师 · 工作台](https://raw.githubusercontent.com/universe-st/dsh-game-material-master/main/docs/images/gmm-00-workbench.png)
@@ -277,7 +289,7 @@ flowchart LR
277
289
 
278
290
  | action | 作用 |
279
291
  |---|---|
280
- | `guide` | 读手册:`overview` / `workflow` / `config` / `methods` / `ai-asset` / 八个模块主题 |
292
+ | `guide` | 读手册:`overview` / `workflow` / `config` / `methods` / `ai-asset` / `map-agent` / 八个模块主题 |
281
293
  | `intake` | **固定流程第 0 步**:先把关键参数与审核模式问清楚,再动手 |
282
294
  | `call` | 万能通道:插件全部远程方法逐个可调(`{method, payload}`) |
283
295
  | `upload` | 按本机文件路径上传素材(设定图 / 参考图 / 首尾帧 / 部件…) |
@@ -296,12 +308,23 @@ game_material({ action: "call", method: "runTurnVideo", payload: { projectId } }
296
308
  game_material({ action: "wait", module: "sprite", id: projectId })
297
309
  ```
298
310
 
311
+ 地图编辑器还支持 Agent 专用的「读状态 → 画 → 看效果图」闭环:
312
+
313
+ ```js
314
+ game_material({ action: "call", method: "mapInspect", payload: { projectId, region: { r0: 0, c0: 0, r1: 16, c1: 16 } } })
315
+ game_material({ action: "call", method: "mapRender", payload: { projectId, region: { r0: 0, c0: 0, r1: 16, c1: 16 }, overlay: { markers: true, grid: true } } })
316
+ // 把返回的 localPath 交给 read_image;iso 用 isoInspect / isoRender
317
+ ```
318
+
299
319
  旧版按 `game_material_call` / `game_material_status` / … 逐个注册的工具已经合并到上面这一个工具,
300
320
  迁移对照见 [docs/ENGINEERING.md](docs/ENGINEERING.md#对话调用agent-也能驱动整条流水线)。
301
321
 
302
322
  验收链接是**深链接**:agent 在回复里贴出的 `openUrl` 点一下就切到插件对应页面,原地落到
303
323
  对应模块 / 项目 / 阶段上,不需要你自己翻。
304
324
 
325
+ 每个模块的项目 / 任务标题旁都有「**复制 ID**」按钮(侧栏项目行里还有 `⧉`),点一下就把
326
+ `projectId` / `jobId` 复制到剪贴板,直接粘贴给 agent 即可。
327
+
305
328
  ---
306
329
 
307
330
  ## 安装
@@ -315,7 +338,7 @@ dsh plugin --profile web add /path/to/dsh-game-material-master
315
338
  ```
316
339
 
317
340
  包已发布到 npm:[dsh-game-material-master](https://www.npmjs.com/package/dsh-game-material-master)
318
- (当前 `0.10.1`,`latest`)。本包没有运行时依赖,`dsh plugin add` 拉下来即可用。
341
+ (当前 `0.11.0`,`latest`)。本包没有运行时依赖,`dsh plugin add` 拉下来即可用。
319
342
 
320
343
  **DSH 版本**:`>=0.2.0-rc.2 <0.3.0`(`package.json` 的 `engines.dsh`;DSH 0.2.1 起插件管理器优先按它判断兼容性)。
321
344
  Web 部署用 `--public-url https://host/prefix/` 时,深链接与产物地址会跟着补路径前缀。
@@ -557,3 +580,7 @@ T("第 {n0} 帧", { n0: index + 1 }) // 带插值,英
557
580
  设置页可独立配置 ToAPIs,再将生图后端切为 ToAPIs,或打开「使用 ToAPIs 生成视频」。默认仍是火山方舟/MiniMax,ComfyUI、自定义协议和本地处理保持可选。国内 `https://toapis.cn/v1`,国际 `https://toapis.com/v1`;异步任务需要专用协议,不是把 OpenAI 的地址换一下即可。
558
581
 
559
582
  [配置、计费与恢复说明](https://github.com/universe-st/dsh-game-material-master/blob/main/docs/TOAPIS.md)。API Key仅在宿主保存,生成真实计费;先在自己的账号核对报价和参数。
583
+
584
+ ## ToAPIs
585
+
586
+ ToAPIs 可作为可选图片/视频 Provider,使用用户自己的 Key。官网:[国内站](https://toapis.cn/)/[国际站](https://toapis.com/);Base URL 分别为 `https://toapis.cn/v1`/`https://toapis.com/v1`。[配置、价格口径与快速复用](https://github.com/universe-st/dsh-game-material-master/blob/main/docs/TOAPIS.md) · [真实 DSH 八方向与精灵导出验收](https://github.com/universe-st/dsh-game-material-master/blob/main/docs/toapis-live-20261024/README.md)。原生透明 GPT Image、方形视频与实测截图见文档;功能可用版本以合并/发布状态为准。