GooDAnDReaDY/dsh-image-gen ↗★ 5
@goodandready/dsh-image-gen
多渠道图像生成、处理与无损JSON输出 适合需要进行图像生成、抠图、矢量化,并要求严格输入校验的高级视觉用户。
安裝
$
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, andvectorize_imagenow consistently returntoLosslessJsonand formatted markdownsummaryfor text-only LLMs. - Strict Input Image Validation:
extract_design_tokens,image_to_css_gradient, andcheck_image_contrastexplicitly validate source image readability instead of silent fallback. - Unit Testing Suite: Added
test/tool-consistency.test.mjscovering tokenization, gradient generator, and PWA suite.
📦 @goodandready/dsh-image-gen
Comprehensive Visual Generation & Image Processing Suite for DeepSeek Harness
🇬🇧 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
0600permissions after write. - Dead Code Removal & Module Split: Removed unused
listCuratedStyles; split oversized server modules —providers.jsutils extracted toprovider-utils.js,processing.jsintoprocessing-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 triggersdsh plugin add @goodandready/dsh-image-gen@latestrestricted to loopback and private LAN connections. - 1:1 Settings Synchronization: Fully synchronized host
Configschema inlib/index.jswith client UI fields (lib/client.js), exposingautoEnhancePromptanddefaultStylePresetunder the✨ Enhancertab. - Active Diagnostic Probes: Added real HTTP network probes in
testProviderConnectionfor Replicate (/v1/models), Google Gemini (/v1beta/models), and ByteDance Seedream with timeout protection and live roundtrip latency tracking. - Strict Multi-Language Compliance: Pure standard
enandzhlocalization bundles embedded in core package; modularized Russian language support viagoodandready/dsh-russian-langper 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, androle="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) inFalSettingsCardControllerandCardForm.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.mjsverifying 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
FalImageCardand 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.svgat 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
zhandenUI dictionary integration; Russian locale registered viagoodandready/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 (
sidebarRightTabsandsidebar.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), optionalautoEnhancePromptsetting, andstyle_presettool 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_packmulti-ratio workflows now execute concurrently with a concurrency limit (concurrency: 3) viaasyncPool`, reducing generation wait times by up to 3x. - Zero-Delay Initial Polling: Eliminated artificial initial delay in
pollStatusand 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.mdandindex.mddocument architecture, constraints, and the test matrix (internal workflow files — not shipped in the npm package). - Design contract:
docs/design/DESIGN.mdno longer advertises the removed HistoryGallery UI (#203). - Regression lock:
test/lifecycle-structure.test.mjsasserts 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
Parameterschunks 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, savesmockup-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