import type { Context } from '@deepseek-ai/cordis'; /** Loose ApiProxy surface used by catalog + model helpers. */ export type ApiProxySessions = { list?: (req: { rpcId: string; payload: unknown; }) => Promise; history?: (req: { rpcId: string; payload: unknown; }) => Promise; models?: (req: { rpcId: string; payload: unknown; }) => Promise; selectModel?: (req: { rpcId: string; payload: unknown; }) => Promise; /** Create a session (used by /new; payload: workspaceId | cwd). */ create?: (req: { rpcId: string; payload: unknown; }) => Promise; /** * Prompt dispatch (Web 端同通道):文本 + 图片字节(base64)经宿主附件服务持久化后 * 进入会话;含图片时会校验当前模型是否支持图像输入。 */ prompt?: (req: { rpcId: string; payload: unknown; }) => Promise; }; export type ApiProxyLike = { workspace?: { list?: (req: { rpcId: string; payload: unknown; }) => Promise; }; sessions?: ApiProxySessions; }; /** * Resolve host apiProxy without requiring Cordis inject. * Direct `ctx.apiProxy` throws "cannot get property without inject" on real fibers. */ export declare function resolveApiProxy(ctx: Context): ApiProxyLike | undefined;