@goodandready/dsh-image-gen 0.11.37 → 0.11.38
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/lib/client.js +570 -495
- package/lib/index.js +2 -0
- package/lib/live-progress.js +9 -0
- package/lib/providers/backends/custom.js +2 -2
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -47,6 +47,7 @@ import { registerVaultRoutes, readBoundedRequestBody } from './vault.js'
|
|
|
47
47
|
import { registerLiveProgressRoutes } from './live-progress.js'
|
|
48
48
|
import { registerSettingsRoutes } from './settings-route.js'
|
|
49
49
|
import { clearAllAnchors } from './anchor-helpers.js'
|
|
50
|
+
import { clearSpendReservations } from './cost-meter.js'
|
|
50
51
|
import { resetLoopGuard, getLoopGuardState } from './loop-guard.js'
|
|
51
52
|
import { Config, plainConfig, volatileConfig, publicConfig, ensureConfig } from './config-schema.js'
|
|
52
53
|
import { resolveSource } from './resolve-source.js'
|
|
@@ -474,5 +475,6 @@ export function apply(ctx, rawConfig) {
|
|
|
474
475
|
|
|
475
476
|
ctx.effect(() => () => {
|
|
476
477
|
toolController?.dispose?.()
|
|
478
|
+
clearSpendReservations()
|
|
477
479
|
}, 'dsh-image-gen: tool registration cleanup')
|
|
478
480
|
}
|
package/lib/live-progress.js
CHANGED
|
@@ -255,6 +255,15 @@ export function registerLiveProgressRoutes(ctx) {
|
|
|
255
255
|
|
|
256
256
|
res.write(': connected\n\n')
|
|
257
257
|
|
|
258
|
+
const current = getLiveProgress(callId)
|
|
259
|
+
if (current) {
|
|
260
|
+
try {
|
|
261
|
+
res.write(`data: ${JSON.stringify(current)}\n\n`)
|
|
262
|
+
} catch (_err) {
|
|
263
|
+
// Ignore stream write failure on initial snapshot replay (#429)
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
258
267
|
const unsubscribe = subscribeLiveProgress(callId, (data) => {
|
|
259
268
|
try {
|
|
260
269
|
res.write(`data: ${JSON.stringify(data)}\n\n`)
|
|
@@ -23,13 +23,13 @@ export function createCustomGenerator(deps, job) {
|
|
|
23
23
|
throw new Error('Custom provider (OpenAI-compatible) does not support facial identity references (FaceID) — use ComfyUI (IP-Adapter/InstantID) or FAL')
|
|
24
24
|
}
|
|
25
25
|
const base = String(cfg.customBaseURL || '').replace(/\/+$/, '')
|
|
26
|
-
if (!base) throw new Error('Custom image provider: base URL is not configured (Settings
|
|
26
|
+
if (!base) throw new Error('Custom image provider: base URL is not configured (Settings -> Image generation)')
|
|
27
27
|
if (!cfg.customModel) throw new Error('Custom image provider: model is not configured')
|
|
28
28
|
|
|
29
29
|
// Empty key reference indicates unauthenticated gateway.
|
|
30
30
|
const key = cfg.customKeyEnv ? await resolveKey(cfg.customKeyEnv) : ''
|
|
31
31
|
if (job.faceReference && !source) {
|
|
32
|
-
throw new Error('Custom provider (OpenAI-compatible) does not support facial identity references (FaceID)
|
|
32
|
+
throw new Error('Custom provider (OpenAI-compatible) does not support facial identity references (FaceID) — use ComfyUI (IP-Adapter/InstantID) or FAL')
|
|
33
33
|
}
|
|
34
34
|
const isEdit = Boolean(source && source.bytes)
|
|
35
35
|
const headers = {}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@goodandready/dsh-image-gen",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.38",
|
|
4
4
|
"description": "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).",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"deepseek-harness",
|