/** * dsh-wx-skin — host half: server-side persistence for the skin settings. * * The browser half keeps a copy of the settings in localStorage, which is * scoped to the page origin. The desktop app (dsh-wx-desktop) launches * `dsh web --port 0`, so the OS assigns a fresh port — and therefore a fresh * origin and an empty localStorage bucket — on every launch, which used to * wipe the background image. These two webServer routes move the durable copy * of the settings into the DSH home directory, where it survives any origin * change and is shared by every client on this machine (browser GUI at :3080 * and the desktop app alike): * * GET /dsh-wx-skin/load → { ok, settings } * POST /dsh-wx-skin/save → { ok } * POST /dsh-wx-skin/folder → { ok, root, images, truncated } (scan a picked folder) * GET /dsh-wx-skin/image → image bytes (slideshow background) * * The schema lives in the browser half (sanitizeSettings); the host stores * and returns the raw JSON blob it receives. Routes answer only a local * carrier's document (the browser GUI on this Host's loopback authority, or the * official Desktop application on `dsh-app://app`) and the file is written * atomically (temp + rename) so concurrent clients cannot corrupt it. Image * bytes are served only from inside the folder the user picked (the last scan in * this process, else `settings.folderPath`), so the route can never be turned * into a general file reader. When the webServer service is unavailable the host * half stays a no-op and the client falls back to its localStorage behavior. * @module dsh-wx-skin */ import type { Context } from '@deepseek-ai/cordis'; export declare const name = "dsh-wx-skin"; /** Services required before the routes can be registered. */ export declare const inject: string[]; /** * Absolute registration keys served by the host half (outside /api, mirrors the * /dsh-wx-* conventions). The browser half addresses the same resources through * its own document-relative `*_ROUTE` forms: app-owned browser references must * follow the document base (`` injected by the shell) so one * prefix-stripping proxy mount reaches the same listener, while route keys stay * absolute * (`.agents/notes/implemented/architecture/2026-09-14-web-document-relative-app-routes.md` * in the DSH checkout). */ export declare const LOAD_PATH = "/dsh-wx-skin/load"; export declare const SAVE_PATH = "/dsh-wx-skin/save"; export declare const FOLDER_PATH = "/dsh-wx-skin/folder"; export declare const IMAGE_PATH = "/dsh-wx-skin/image"; /** * Apply the host half: register the skin-settings persistence, folder-scan, and * image-serving routes. * @param ctx - the Cordis context. */ export declare function apply(ctx: Context): void; //# sourceMappingURL=index.d.ts.map