/** * Resolve dsh image blocks to Codex `localImage` inputs (Q3). * * dsh stores images as opaque content-addressed attachment refs; the resolver * reads the bytes through `ctx.attachments`, materializes them under a * per-gateway temp directory, and hands the local path to the app-server * (`localImage`, protocol-verified). Images pass through untouched: visual * understanding is handled by the hosts' shared `ocgw-vision` skill (TeamAI), * not by this plugin. * * @module dsh-subagent-codex-plus/gateway/images */ import type { Context } from '@deepseek-ai/cordis'; import type { ImageAttachmentRef } from '@deepseek-ai/dsh-attachment'; import type { GatewayLocalImageInput } from './wire.ts'; /** Map a dsh media type to a file extension (falls back to `.img`). */ export declare function mediaTypeExt(mediaType: string): string; /** One resolved image: the Codex input block. */ export interface ResolvedImage { readonly input: GatewayLocalImageInput; } /** Materializes dsh attachment bytes into Codex-local image files. */ export declare class GatewayImageResolver { private readonly ctx; private dir; private index; constructor(ctx: Context); /** * Read one attachment and stage it for the app-server. * @param attachment - durable ref from the dsh message block. */ resolve(attachment: ImageAttachmentRef): Promise; /** Remove the staged image directory (idempotent). */ dispose(): Promise; private ensureDir; }