GooDAnDReaDY/dsh-image-gen ↗★ 5

@goodandready/dsh-image-gen

Image generation for DeepSeek Harness: a generate_image tool with pluggable providers — the FAL queue, any OpenAI-compatible images API, or a ChatGPT/Grok subscription with no API key at all. The picture is shown inline in the conversation; the model receives either a link (works with any chat model) or the image itself (needs dsh-vision-bridge or a vision-capable model). 适合需要进行图像生成、抠图、矢量化,并要求严格输入校验的高级视觉用户。

パッケージ
@goodandready/dsh-image-gen
互換性
未検証
Harness ピア範囲
^0.1.0-rc.6
Cordis ピア範囲
^4.0.1
バージョン
0.10.26
ライセンス
MIT
最終更新
2026/09/22

インストール

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:GooDAnDReaDY/dsh-image-gen

ドキュメント

README 全文を読む ↗

🚀 Updates v0.10.8: Lossless JSON Unification, Dual-Output & Strict Validation (#199)

  • Lossless JSON & Dual-Output Unification: upscale_image, remove_background, blend_images, and vectorize_image now consistently return toLosslessJson and formatted markdown summary for text-only LLMs.
  • Strict Input Image Validation: extract_design_tokens, image_to_css_gradient, and check_image_contrast explicitly validate source image readability instead of silent fallback.
  • Unit Testing Suite: Added test/tool-consistency.test.mjs covering tokenization, gradient generator, and PWA suite.

📦 @goodandready/dsh-image-gen

Comprehensive Visual Generation & Image Processing Suite for DeepSeek Harness

npm version license DSH Plugin Node version

All Projects

🇬🇧 English • 🇷🇺 Русский • 🇨🇳 中文说明

  ⭐ If you like this plugin, please star it on GitHub — it shows me that the plugin is useful to you and motivates me to keep developing it.
  

  🐛 If you find a bug or would like to request a feature, open a GitHub issue in any language — I will review your proposal and implement useful suggestions in a future plugin version.

🚀 Updates v0.10.26: Architecture Decomposition & Repository Sanitization (#235, #238, #239)

  • Architecture & Modular Decomposition (#239): All server modules in lib/ now strictly meet the )`.
  • Sensitive File Hardening: History, cache meta/data, and spend-meter writes now enforce 0600 permissions after write.
  • Dead Code Removal & Module Split: Removed unused listCuratedStyles; split oversized server modules — providers.js utils extracted to provider-utils.js, processing.js into processing-basic.js + processing-advanced.js. Client file split is tracked separately (#244).

🚀 Updates v0.10.23: In-App Auto-Updater, Settings Synchronization, Active Probes & Language Purity (#232)

  • One-Click In-App Auto-Updater: Direct 1-click update support inside the plugin Settings Card (UpdaterSection) backed by /api/dsh-image-gen/update. Fetches the npm registry for release manifests, verifies semver differences, and securely triggers dsh plugin add @goodandready/dsh-image-gen@latest restricted to loopback and private LAN connections.
  • 1:1 Settings Synchronization: Fully synchronized host Config schema in lib/index.js with client UI fields (lib/client.js), exposing autoEnhancePrompt and defaultStylePreset under the ✨ Enhancer tab.
  • Active Diagnostic Probes: Added real HTTP network probes in testProviderConnection for Replicate (/v1/models), Google Gemini (/v1beta/models), and ByteDance Seedream with timeout protection and live roundtrip latency tracking.
  • Strict Multi-Language Compliance: Pure standard en and zh localization bundles embedded in core package; modularized Russian language support via goodandready/dsh-russian-lang per DSH plugin guidelines. Exactly 0 Cyrillic characters in product code (lib/).
  • WAI-ARIA Accessibility Hardening: Enhanced tab navigation and input form validation with role="tablist", role="tab", aria-selected, aria-controls, role="tabpanel", aria-describedby, and role="alert".

🚀 Updates v0.10.22: Referential Stability & React Error #185 Infinite Loop Fix (#230)

  • Settings Card Referential Stability: Resolved React Error #185 (Maximum update depth exceeded) in FalSettingsCardController and CardForm.prototype.bind. Store snapshots are referentially cached during render cycles (Object.is(prev, next) === true), completely preventing infinite re-render loops in React 18 / useSyncExternalStore.
  • Deep DSH Store Integration: Added seamless runtime integration with @deepseek-ai/dsh-client-store (runtime.createSnapshotStore) paired with a robust standalone snapshot caching fallback.
  • Automated Regression Test Suite: Added dedicated referential identity test in test/client-syntax.test.mjs verifying snapshot immutability across repeated reads, single-notification publish triggers, and clean listener lifecycle.

🚀 Updates v0.10.21: Variations Workbench, Smart Aspect Ratio Crop & Brand Asset Pack (#228)

  • Variations & Style Remix Workbench: Interactive visual drawer embedded directly in FalImageCard and Gallery. Fine-tune variations with a continuous creativity / denoising strength slider (0.05 to 0.95), preset quick buttons ("Subtle 0.25", "Creative 0.65"), and prompt modifier guidance.
  • Intelligent Aspect-Ratio Canvas Cropper & Resizer (smart_crop_image): Instant lossless aspect ratio framing for social and responsive surfaces (1:1, 16:9, 9:16, 4:3, 3:2, 2:3) supporting focal heuristics (auto_focus, center, rule_of_thirds, letterbox) via zero-dependency pure Node.js SVG vector raster wrapper.
  • Project Asset Pack & Social Card Exporter (export_asset_pack): Production-ready automated brand asset generation producing SVG favicons, PWA application icon suite (icon-192.svg, icon-512.svg), manifest.webmanifest, high-resolution OpenGraph social banner preview (og-card.svg at 1200×630), and an asset manifest catalog (catalog.json).
  • Dedicated Toolviews for 12 Visual Tools: Direct interactive action buttons and visual renderers in conversation sessions for all generation, editing, inpainting, remix, crop, export, and collage tools.
  • Strict Localization Standard: Complete zh and en UI dictionary integration; Russian locale registered via goodandready/dsh-russian-lang.

🚀 Updates v0.10.19: Sidebar Gallery, Diagnostics & Style Engine (#224)

  • Native Sidebar Gallery & History Drawer: Integrated directly into DSH's native right sidebar pane (sidebarRightTabs and sidebar.right.pane.tab), betterSidebar, and a quick-access utility chip in the conversation header (conversation.session.header.utilities). Browse past generations, inspect metadata, copy prompts, and export links without cluttering the chat.
  • Interactive Provider Diagnostics: Real-time "Test Connection" button in the Settings Card under the Providers tab. Ping Fal.ai, ComfyUI, Automatic1111, or Custom OpenAI-compatible endpoints with live roundtrip latency tracking and status badges (Ready, High Latency, Unreachable).
  • Curated Style Presets & Smart Prompt Polisher: Built-in artistic engine with 10 curated styles (cinematic, photorealistic, anime, minimalist_vector, isometric_3d, analog_film, cyberpunk, pixel_art, oil_painting, claymation), optional autoEnhancePrompt setting, and style_preset tool parameter.
  • Collage & Comparison Grid Assembler (assemble_image_grid): Stitch 2 to 4 images into clean side-by-side, 2x2 grid, or vertical collage comparison graphics via pure Node.js SVG raster rendering, zero heavy external binaries ( 1, promptsarray) andgenerate_image_pack multi-ratio workflows now execute concurrently with a concurrency limit (concurrency: 3) via asyncPool`, reducing generation wait times by up to 3x.
  • Zero-Delay Initial Polling: Eliminated artificial initial delay in pollStatus and queue runners (Fal.ai, ComfyUI), inspecting generation status immediately on first attempt and shaving 1–1.5s off fast generative workflows.
  • Sub-Millisecond L1 In-Memory Cache: Built-in 32-entry in-memory LRU cache atop disk cache L2 provides instantaneous (`) for clean unload/reload disposal.
  • Project meta: AGENTS.md and index.md document architecture, constraints, and the test matrix (internal workflow files — not shipped in the npm package).
  • Design contract: docs/design/DESIGN.md no longer advertises the removed HistoryGallery UI (#203).
  • Regression lock: test/lifecycle-structure.test.mjs asserts modular layout, labeled effects, and meta files. Suite: 132 unit tests.

⚡ Overview

@goodandready/dsh-image-gen is a premier graphic generation and visual processing suite for DeepSeek Harness. It equips autonomous agents with an extensible set of tools for image generation, transformation, background removal, upscaling, vectorization, multi-reference blending, and quality inspection across 8 generative backends.


🛡️ Reliability, Performance & Quality (v0.10.0)

  • Exponential Backoff with Jitter: Adaptive polling for FAL, Replicate, and ComfyUI queues protects against HTTP 429 rate limits.
  • Error Classification in Fallback Cascade: Client-side errors (Content Policy, 400 Bad Request, NSFW) fail fast without wasting API credits on other providers.
  • Deterministic Hash Caching: Exact matches of prompt, model, and seed return instantly from local storage with zero API expense.
  • ComfyUI & Automatic1111 Drag-and-Drop: Metadata is packed into PNG Parameters chunks in standard format.
  • Dimension Snapping: Automatic normalization to multiples of 64 guarantees VAE bucket compatibility.
  • Enhanced Style Presets: Built-in styles include tailor-made negative prompts and optimal guidance scale settings.

🛠️ Complete Tools Reference

  • generate_image: Generate images with pluggable providers, seeds, aspect ratios, and style presets.
  • edit_image: Targeted inpainting and modification with automatic session reference resolution (#142, #144, #145).
  • vary_image: Controlled variation generation preserving composition (#143, #144).
  • remove_background: Extract subject with transparent PNG output (FAL BiRefNet / Rembg).
  • upscale_image: 2x / 4x super-resolution with clarity reconstruction.
  • vectorize_image: Convert raster graphics to clean scalable SVG vectors with palette quantization.
  • blend_images: Multi-reference composition mixing.
  • generate_image_pack: Simultaneous multi-aspect ratio rendering with graceful partial recovery.
  • generate_responsive_mockups (#173): One shared product prompt rendered as Mobile (9:16), Tablet (3:4) and Desktop (16:9) UI mockups in parallel. Keeps style/palette coherent across viewports, saves mockup-mobile.png / mockup-tablet.png / mockup-desktop.png, and shows a tabbed viewport preview in chat.
  • compare_images: Pixel-level visual difference ratio comparison.
  • inspect_image_quality: Automated visual audit, Laplacian sharpness scoring, and defect detection.
  • extract_design_tokens: Ex