//#region types/deepseek-ai.d.ts /** * @deepseek-ai mock type declarations * * For local development and testing. * At runtime these are provided by the DSH host framework. */ declare module '@deepseek-ai/cordis' { export interface Context { webServer: { register(route: { kind: 'exact' | 'prefix'; path: string; handler: (req: any, res: any) => void; }): void; }; logger: { info(...args: any[]): void; warn(...args: any[]): void; error(...args: any[]): void; }; inject(names: string[], callback: (scope: any) => void): void; get(name: string, strict?: boolean): any; effect(callback: () => (() => void) | void, label?: string): () => void; connection: { fetch: { register(route: { path: string; methods: string[]; requestBody: 'buffered' | 'streaming'; fetch: (request: any) => Promise; }): () => void; }; rpc: { call(channel: string, endpoint: string, payload: unknown, signal?: AbortSignal): Promise; }; }; systemPrompt?: { context(contribution: { name: string; order: number; text: (context: any) => string; }): () => void; section(contribution: any): () => void; }; sessionController?: { prompt(request: any, signal?: AbortSignal): Promise; }; } } declare module '@deepseek-ai/dsh-host-webserver' { // empty } declare module '@deepseek-ai/dsh-client-runtime/client' { export interface ClientContext { slots: any; get(name: string, strict?: boolean): any; /** Cordis 生命周期:回调返回 disposer,插件卸载时调用。 */ effect(callback: () => (() => void) | void, label?: string): () => void; connection?: { rpc: { call(channel: string, endpoint: string, payload: unknown, signal?: AbortSignal): Promise; }; }; } } //#endregion //#region src/client/token-estimator.d.ts /** 估算一段文本的 token 数。 */ declare function estimateTokens(text: string): number; //#endregion //#region src/client-entry.d.ts /** * 插件名与包名保持一致。 * * 单包发布后 Host 与 Client 共用包名 `dsh-webds-bridge`;客户端 bundle 的 * `__ModuleLoader__.load({ id })` 也必须用这个全名(见 scripts/wrap-client-bundle.mjs), * 否则 dsh-client-modules 按包名找不到对应模块。 */ declare const name = "dsh-webds-bridge"; /** * Injected dependencies。 * * `slots` 用于把设置页面板注册进 `settings.section`。声明后 Cordis 会等该服务就绪再 * 运行 apply;拿不到服务时插件不会静默半启动。 */ declare const inject: readonly ["slots"]; /** * Plugin apply function * @param ctx - Client context */ declare function apply(ctx: void 0): void; //# sourceMappingURL=client-entry.d.ts.map //#endregion export { apply, estimateTokens, inject, name }; //# sourceMappingURL=client.d.cts.map