@goodandready/dsh-image-gen 0.10.15 → 0.10.17
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.md +16 -0
- package/README.ru.md +16 -0
- package/lib/index.js +33 -1410
- package/lib/providers.js +61 -1
- package/lib/register-tools.js +22 -0
- package/lib/tools/editing.js +325 -0
- package/lib/tools/frontend.js +258 -0
- package/lib/tools/generation.js +575 -0
- package/lib/tools/inspect.js +117 -0
- package/lib/tools/processing.js +324 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -31,6 +31,14 @@
|
|
|
31
31
|
|
|
32
32
|
---
|
|
33
33
|
|
|
34
|
+
## 🚀 Updates v0.10.17: Modular Tool Lifecycle (#216, #217)
|
|
35
|
+
* **Tool modules extracted from `apply()`**: host lifecycle in `lib/index.js` is now a thin cordis entry (~650 lines). Tool definitions live in `lib/tools/{generation,processing,editing,inspect,frontend}.js` behind `lib/register-tools.js`.
|
|
36
|
+
* **Per-tool labeled `ctx.effect`**: each of the 15 tools registers in its own effect (`dsh-image-gen: tool <name>`) for clean unload/reload disposal.
|
|
37
|
+
* **Project meta**: `AGENTS.md` and `index.md` document architecture, constraints, and the test matrix (internal workflow files — not shipped in the npm package).
|
|
38
|
+
* **Design contract**: `docs/design/DESIGN.md` no longer advertises the removed HistoryGallery UI (#203).
|
|
39
|
+
* **Regression lock**: `test/lifecycle-structure.test.mjs` asserts modular layout, labeled effects, and meta files. Suite: **132 unit tests**.
|
|
40
|
+
|
|
41
|
+
|
|
34
42
|
## ⚡ Overview
|
|
35
43
|
|
|
36
44
|
**`@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.
|
|
@@ -84,6 +92,14 @@
|
|
|
84
92
|
* **Subscription Aspect Ratio Mapping**: maps aspect ratios (`16:9`, `3:2`, `9:16`, `2:3`) to appropriate subscription dimensions (`1536x1024` / `1024x1536`) instead of falling back to default square `1024x1024`.
|
|
85
93
|
|
|
86
94
|
|
|
95
|
+
### 🚀 What's New in v0.10.16
|
|
96
|
+
* **Safe Attachment Service Fallback (#214)**: Added graceful fallback handling in `saveAttachmentSafe` across all 8 visual tools (`generate_image`, variations, `remove_background`, `upscale_image`, `blend_images`, etc.). When running in headless CLI mode or when the attachment store is unavailable, outputs are safely written to disk with full file paths and data references rather than crashing tool execution.
|
|
97
|
+
* **HTTP Image Endpoint Strict Validation**: Hardened `/dsh-image-gen/image` route against malformed or NaN parameters (`b`, `w`, `h`), cleanly responding with HTTP 400 or 404 without leaking internal system traces.
|
|
98
|
+
* **ComfyUI Node Error Extraction**: Integrated `extractComfyNodeErrors` to parse node execution errors from `/history/{pid}` status responses, immediately reporting root-cause node diagnostics rather than timing out.
|
|
99
|
+
* **Custom Provider Error Normalization**: Standardized gateway error extracts through `formatErrorMessage`, eliminating raw JSON or `[object Object]` artifacts on 4xx/5xx API responses.
|
|
100
|
+
* **Cache & History Consistency**: Ensured content-addressed disk cache hits synchronize seamlessly with generation history and sidecar metadata.
|
|
101
|
+
* **Test Suite Expansion**: Added `test/batch4-hardening.test.mjs`, expanding test coverage to **128 automated unit tests (100% pass)**.
|
|
102
|
+
|
|
87
103
|
### 🚀 What's New in v0.10.15
|
|
88
104
|
* **Loop Guard Zero-Limit Bypass (#212)**: Fixed an edge case where setting `loopGuardLimit: 0` (configured to disable protection) enforced a limit of 1 due to `Math.max(1, limit)`. Setting limit to 0 now properly bypasses loop checks.
|
|
89
105
|
* **Security Hardening (Token Masking)**: Added automatic pattern masking for Replicate API tokens (`r8_...`) and Google Gemini API keys (`AIza...`) in `sanitizeErrorAndLogs`.
|
package/README.ru.md
CHANGED
|
@@ -24,6 +24,14 @@
|
|
|
24
24
|
</div>
|
|
25
25
|
|
|
26
26
|
---
|
|
27
|
+
## 🚀 Обновления v0.10.17: модульный жизненный цикл тулов (#216, #217)
|
|
28
|
+
* **Тулы вынесены из `apply()`**: host `lib/index.js` — тонкая cordis-точка входа. Определения тулов — в `lib/tools/*` через `lib/register-tools.js`.
|
|
29
|
+
* **Свой labeled `ctx.effect` на каждый tool** (`dsh-image-gen: tool <name>`) для корректной выгрузки.
|
|
30
|
+
* **Meta-файлы проекта**: `AGENTS.md` и `index.md` (не попадают в npm-пакет).
|
|
31
|
+
* **DESIGN.md** больше не упоминает удалённую HistoryGallery (#203).
|
|
32
|
+
* **Тесты**: `lifecycle-structure` + полный suite — **132 unit tests**.
|
|
33
|
+
|
|
34
|
+
|
|
27
35
|
|
|
28
36
|
## ⚡ Обзор возможностей
|
|
29
37
|
|
|
@@ -130,6 +138,14 @@ graph LR
|
|
|
130
138
|
- **100% интернационализация (#140)**: устранены захардкоженные русские строки, добавлены переводы на русский, английский и китайский языки.
|
|
131
139
|
|
|
132
140
|
|
|
141
|
+
### 🚀 Что нового в v0.10.16
|
|
142
|
+
* **Безопасный Fallback сервиса вложений (#214)**: Реализована функция `saveAttachmentSafe` во всех 8 визуальных инструментах (`generate_image`, вариации, `remove_background`, `upscale_image`, `blend_images` и др.). При запуске в автономном режиме без сервиса вложений или при сбое хранилища инструмент гарантированно сохраняет файл на диск и отдает пути без падения.
|
|
143
|
+
* **Строгая валидация HTTP-эндпоинта картинок**: В обработчике `/dsh-image-gen/image` усилена проверка query-параметров (`b`, `w`, `h`), защищающая от `NaN` и отрицательных чисел, а также исключающая утечку внутренних трассировок при 404/500 ошибках.
|
|
144
|
+
* **Диагностика ошибок нод ComfyUI**: Добавлена функция `extractComfyNodeErrors`, мгновенно извлекающая сообщения об ошибках нод из `/history/{pid}` при сбое генерации вместо бесконечного ожидания таймаута.
|
|
145
|
+
* **Нормализация ошибок Custom/OpenAI API**: Ошибки сторонних шлюзов и API провайдеров единообразно форматируются через `formatErrorMessage`, предотвращая появление `[object Object]` или громоздких дампов JSON.
|
|
146
|
+
* **Согласованность истории и дискового кэша**: Попадания в кэш корректно поддерживают актуальность метаданных sidecar и истории генераций.
|
|
147
|
+
* **Расширение тестов**: Добавлен тестовый набор `test/batch4-hardening.test.mjs`, общее количество тестов выросло до **128 (100% pass)**.
|
|
148
|
+
|
|
133
149
|
### 🚀 Что нового в v0.10.15
|
|
134
150
|
* **Обход Loop Guard при нулевом лимите (#212)**: Исправлена ошибка, когда при значении `loopGuardLimit: 0` (отключение защиты) срабатывал `Math.max(1, 0) = 1` и блокировал вызовы на 2-й итерации. При значении 0 лимит теперь полностью отключается.
|
|
135
151
|
* **Усиление безопасности токенов**: В `sanitizeErrorAndLogs` добавлено маскирование токенов Replicate (`r8_...`) и ключей Google Gemini (`AIza...`).
|