@goodandready/dsh-image-gen 0.9.0 → 0.9.1
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/index.js +6 -6
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -391,7 +391,7 @@ export function apply(ctx, config) {
|
|
|
391
391
|
ctx.inject(['settings'], (sctx) => {
|
|
392
392
|
const scope = sctx.settings.register(NS, Config, { base: config })
|
|
393
393
|
migrateLegacySettings(sctx, scope)
|
|
394
|
-
getConfig = () => scope
|
|
394
|
+
getConfig = () => (scope?.get?.() ?? config) ?? config
|
|
395
395
|
sctx.effect(() => () => {
|
|
396
396
|
getConfig = () => config
|
|
397
397
|
})
|
|
@@ -813,7 +813,7 @@ export function apply(ctx, config) {
|
|
|
813
813
|
async execute(args, exec) {
|
|
814
814
|
const source = await resolveSource(ctx, exec, args.image)
|
|
815
815
|
if (!source || !source.bytes) throw new Error('Source image not found: ' + args.image)
|
|
816
|
-
const cfg =
|
|
816
|
+
const cfg = live()
|
|
817
817
|
const res = await removeBackgroundFal(
|
|
818
818
|
{ fetchImpl: fetch, resolveKey: (ref) => resolveApiKey(ctx, ref), cfg },
|
|
819
819
|
{ imageBytes: source.bytes, mediaType: source.mediaType, model: args.model, signal: exec.signal }
|
|
@@ -871,7 +871,7 @@ export function apply(ctx, config) {
|
|
|
871
871
|
async execute(args, exec) {
|
|
872
872
|
const source = await resolveSource(ctx, exec, args.image)
|
|
873
873
|
if (!source || !source.bytes) throw new Error('Source image not found: ' + args.image)
|
|
874
|
-
const cfg =
|
|
874
|
+
const cfg = live()
|
|
875
875
|
const res = await upscaleImageFal(
|
|
876
876
|
{ fetchImpl: fetch, resolveKey: (ref) => resolveApiKey(ctx, ref), cfg },
|
|
877
877
|
{ imageBytes: source.bytes, mediaType: source.mediaType, scale: args.scale, prompt: args.prompt, creativity: args.creativity, signal: exec.signal }
|
|
@@ -925,7 +925,7 @@ export function apply(ctx, config) {
|
|
|
925
925
|
async execute(args, exec) {
|
|
926
926
|
const source = await resolveSource(ctx, exec, args.image)
|
|
927
927
|
if (!source || !source.bytes) throw new Error('Source image not found: ' + args.image)
|
|
928
|
-
const cfg =
|
|
928
|
+
const cfg = live()
|
|
929
929
|
const res = traceToSvg(source.bytes, { colorMode: args.color_mode })
|
|
930
930
|
const stem = `${slugify(args.output_name || 'vector')}-${Date.now().toString(36)}`
|
|
931
931
|
const name = `${stem}.svg`
|
|
@@ -975,7 +975,7 @@ export function apply(ctx, config) {
|
|
|
975
975
|
if (s && s.bytes) sources.push(s)
|
|
976
976
|
}
|
|
977
977
|
if (sources.length === 0) throw new Error('No valid images found to blend')
|
|
978
|
-
const cfg =
|
|
978
|
+
const cfg = live()
|
|
979
979
|
const res = await blendImagesFal(
|
|
980
980
|
{ fetchImpl: fetch, resolveKey: (ref) => resolveApiKey(ctx, ref), cfg },
|
|
981
981
|
{ images: sources, weights: args.weights, prompt: args.prompt, signal: exec.signal }
|
|
@@ -1027,7 +1027,7 @@ export function apply(ctx, config) {
|
|
|
1027
1027
|
},
|
|
1028
1028
|
async execute(args, exec) {
|
|
1029
1029
|
const ratios = Array.isArray(args.aspect_ratios) && args.aspect_ratios.length ? args.aspect_ratios : ['1:1', '16:9', '9:16']
|
|
1030
|
-
const cfg =
|
|
1030
|
+
const cfg = live()
|
|
1031
1031
|
const generateTool = ctx.tools.get('generate_image')
|
|
1032
1032
|
const results = []
|
|
1033
1033
|
const seedBase = Math.floor(Math.random() * 100000)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@goodandready/dsh-image-gen",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.1",
|
|
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",
|