dsh-gpt-image: Integrating GPT Image into DeepSeek Harness

Introduction

In DeepSeek Harness (DSH), a common approach for building agents involves maintaining a separate set of “image generation scripts + a local Playground,” along with hand-writing HTTP wrappers on the model side. As the number of images grows, prompts, config profiles, async tasks, and file paths easily become misaligned, making it difficult for the agent to reliably “adjust image generation on its own.”

Below is an introduction to the community plugin dsh-gpt-image (maintained by yyfabab1). It ports the capability models from GPT Image Playground (gpt-image2ground) into DSH: multi-provider support, multiple config profiles, text-to-image and image-to-image, async polling, custom interface templates, and extensions into a pipeline for game assets (spec validation, review, installation, pixel art processing, etc.). The plugin is categorized under “Model Inference” in SkillHub and currently has approximately 3 stars on GitHub. The npm package name is @dsh-external/dsh-gpt-image, version 1.11.0, licensed under MIT. It relies only on Node ≥20 node: built-in modules at runtime, so no dependency tree needs to be pulled when installing into a profile.

The DSH ecosystem follows the philosophy that “everything is a plugin”; the SkillHub plugin directory is a community site and has no official affiliation with DeepSeek or 幻方 (High-Flyer).

What is this

dsh-gpt-image is positioned as a “GPT Image Output Station”: it exposes image generation capabilities as DSH tools (README self-check indicates 27 tools and 4 sidebar pages). A browser-accessible panel is available at http://127.0.0.1:3080/gpt-image to view history and verify results. The original “Material Forge” (素材锻造炉) has been merged into this plugin, and the README suggests keeping only this image generation plugin in DSH.

Parts aligned with the Playground include: profiles configuration files, config import/export (compatible with gpt-image-config.json), generate (Images / Responses mode), edit (image-to-image and mask inpainting), async tasks via generate + job, and project-based file saving (<asset_name>_sequence.png, <asset_name>.json, Image_List.md).

Core Features

Generation and Editing

  • Text-to-Image: generate, supports apiMode: images or the image_generation tool under Responses.
  • Image-to-Image / Inpainting: edit, uses multipart to pass image[] and mask.
  • Async Tasks: Set wait_s=0 in generate to obtain a task_id, then use job to query or wait for completion.
  • Video Generation: The video tool supports text-to-video, as well as modes like keyframe and reference; first_frame / images can accept local paths directly (the plugin handles public URLs). The README notes that video uses async interfaces like Agnes, distinct from the image generation line.
  • Multi-Provider: Built-in templates for openai / sb2api async / fal, etc., plus support for custom provider declarative templates.

Asset Pipeline and Quality

  • Quality Foundation (quality tool): Spec validation and auto-repair, pixel art purification and true pixel determination, coordination, derived variants, atlases, visual tags, score routing, preferences, and regression (summarized in the README as Group A–E capabilities).
  • Spec as Code: resolveSpec parses in the order of built-in defaults → <game_directory>/asset-specs.json → “Asset List to Draw.md” → explicit parameters; dimensions, transparency, whitespace, and fringe that can be auto-fixed are repaired first, while unfixable issues are escalated to manual handling.
  • Automation Orchestration (auto): Declarative YAML pipelines (post-processing, slicing, validation, routing, auto-review, installation, etc.), combined with DSH task board cron for auto action=maintenance daily upkeep. The plugin has no resident process; scheduling and directory watching require external scheduler assistance (explained in README).
  • Asset Studio (studio): Templates, variant matrices, costs, referential integrity, backup/rollback, style libraries, etc. (Group F–J).
  • Review and Installation: The gallery is disk-based; human intervention primarily occurs in “Review” and “Conflict” steps; qualified assets can proceed to install. The sidebar provides a generation gallery and verification badges (Pass / Spec Mismatch / Not Referenced / Unused).

Interface and Operations

  • The left sidebar “Generate” icon and the session header “Generate” button open the same gallery (floating layer version closes with Esc).
  • Cost gates, free tier accounting, disk guards, preview image *_labeled.png size controls, etc., see respective README sections.
  • Self-check: node scripts\inventory.mjs verifies the pairing of 27 tools / 32 routes / 4 sidebar pages; npm test is the entry point for unit tests.

Installation and Activation

It is recommended to add the plugin source from the built-in DSH store (README: “Install from DSH Store”):

https://gcore.jsdelivr.net/gh/yyfabab1/dsh-gpt-image@main/market-index.json

Path: Settings → Plugins → Discover → Add Plugin Source, enter the address above.

Windows users can use the one-click script within the plugin package (check first, then install):

一键安装.bat check
一键安装.bat

The script checks Windows / Node 20+, locates the DSH profile, self-checks tools and sidebars, creates directory links (copies if linking fails), and restarts DSH; set set AUTO_NORESTART=1 to skip the restart. The README notes it has only been verified on the author’s machine (Windows + Node 22); see 安装说明.html (Installation Instructions) in the package for risks.

Manual Installation (README original):

dsh plugin --profile web add @dsh-external/dsh-gpt-image

For local development, you can use a directory junction to point to the source code (Windows example):

mklink /J "%USERPROFILE%\.dsh\profiles\web\node_modules\@dsh-external\dsh-gpt-image" "D:\your_path\dsh-gpt-image"

Restart DSH after installation. Tools with the prefix _dsh_external_dsh_gpt_image_* will appear on the model side. For API Keys, baseUrls, and model names for various providers, see the repository’s docs/API_KEYS.md or 安装说明.html.

Typical Usage

The agent can reproduce the examples in the README via tool calls (parameters are JSON-style illustrations; actual usage depends on the DSH tool schema).

Text-to-Image and Save to Project:

generate(prompt="Pixel style tower defense flame tower, top-down, game asset", project="tower-defense", name="tower_fire",
         size="1024x1024", quality="low", n=4)

Image-to-Image:

edit(prompt="Change background to snow mountain night scene", image="D:\games\art\hero.png", project="rpg", name="hero_night")

Async Generation:

generate(prompt="A poster", project="poster", wait_s=0)
job(task_id="task_abc", action="wait")

Pixel Art (Auto-supplements grid constraints to prompt):

generate(prompt="Flame tower icon", name="tower_fire", project="td",
         pixel={ width: 32, height: 32, palette: 16 })

Import Local Image for Video Generation:

video(prompt="Using <Picture 1> character as reference, running through a flower field, low angle tracking shot",
      mode="reference", images=["D:\\games\\art\\hero.png"], seconds=5)

Declarative Asset Pipeline (excerpt, modify YAML not code):

name: My Asset Pipeline
on: [manual, new_asset]
steps:
  - id: postprocess
    use: postprocess
    opts: {defringe: true, sharpen: true}
  - id: slice
    use: slice
  - id: validate
    use: validate
  - id: route
    use: route
  - id: auto_review
    use: auto_review
    opts: {min_confidence: 0.85, sample_after_approve: 0.1}
  - id: install
    use: install

File saving rules (README):

<output_root>/<project>/<asset_name>_1.png
<output_root>/<project>/<asset_name>.json
<output_root>/<project>/Image_List.md

Use Cases and Notes

Who it’s for: Developers who need the model in DSH to reliably call image generation/editing/video APIs and incorporate outputs into a “Project Directory + Specs + Review + Installation” closed loop; when batch generating UI, icons, sprite sheets, and animation-related assets for indie games or toolchains, the verification in the README and the quality / assets / install tools are quite suitable.

Please be aware before use:

  1. The plugin reads/writes local files and calls configured network interfaces with the current DSH process permissions; please read the source code and MIT license before installing, and assess API Keys and cost gate settings yourself.
  2. Calling third-party services like OpenAI, fal, Agnes, etc., will incur costs or be subject to queue limits; the README provides actual test notes on free tiers and video queue 503s, subject to the service provider’s policies at the time.
  3. Some capabilities (player behavior analysis, real A/B testing, resident directory watching, auto-push alerts) will be downgraded in standalone or no-return scenarios, or require DSH cron / webhook cooperation; do not treat them as built-in operations backends.
  4. The one-click installation script and store index are published by the maintainer; non-Windows environments should rely mainly on dsh plugin add and store sources.

Conclusion

Following the steps above, you can use a unified tool interface in DSH to complete the long chain from image generation, image editing, video, to pixel art purification and asset installation, while carrying over the familiar config profiles and template syntax from the Playground. For further details, please refer to the repository README.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye