@goodandready/dsh-image-gen 0.11.1 → 0.11.2

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 CHANGED
@@ -458,7 +458,8 @@ export async function enhancePrompt(ctx, cfg, prompt, signal, provider) {
458
458
  }
459
459
  }
460
460
 
461
- export function apply(ctx, config) {
461
+ export function apply(ctx, rawConfig) {
462
+ const config = Config(rawConfig ?? {})
462
463
  if (ctx.systemPrompt && typeof ctx.systemPrompt.section === 'function') {
463
464
  ctx.systemPrompt.section({
464
465
  name: 'tool:image-generation',
@@ -70,7 +70,7 @@ export function registerGenerationTools(ctx, deps) {
70
70
  },
71
71
  image_size: {
72
72
  type: 'string',
73
- description: `One of: ${IMAGE_SIZES.join(', ')}. Default: ${config.defaultSize}.`,
73
+ description: `One of: ${IMAGE_SIZES.join(', ')}. Default: ${config?.defaultSize || 'square_hd'}.`,
74
74
  },
75
75
  aspect_ratio: {
76
76
  type: 'string',
@@ -84,7 +84,7 @@ export function registerGenerationTools(ctx, deps) {
84
84
  output_format: {
85
85
  type: 'string',
86
86
  enum: OUTPUT_FORMATS,
87
- description: `Output format. Default: ${config.defaultFormat}.`,
87
+ description: `Output format. Default: ${config?.defaultFormat || 'png'}.`,
88
88
  },
89
89
  output_name: {
90
90
  type: 'string',
@@ -219,7 +219,7 @@ export function registerGenerationTools(ctx, deps) {
219
219
  },
220
220
  },
221
221
  isConcurrencySafe: () => false,
222
- timeoutMs: config.timeoutMs + 30000,
222
+ timeoutMs: (config?.timeoutMs || 180000) + 30000,
223
223
  async execute(args, exec) {
224
224
  const cfg = live()
225
225
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goodandready/dsh-image-gen",
3
- "version": "0.11.1",
3
+ "version": "0.11.2",
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",