From f0c1d28a2ee43c6414a160bfd816bcd3833dba11 Mon Sep 17 00:00:00 2001 From: QQ Date: Wed, 11 Nov 2026 22:28:15 +0800 Subject: [PATCH] Import lib/types/client/open-folder.d.ts --- lib/types/client/open-folder.d.ts | 34 +++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 lib/types/client/open-folder.d.ts diff --git a/lib/types/client/open-folder.d.ts b/lib/types/client/open-folder.d.ts new file mode 100644 index 0000000..a958be5 --- /dev/null +++ b/lib/types/client/open-folder.d.ts @@ -0,0 +1,34 @@ +/** + * Transport for the official open-in-app host routes served by + * `@deepseek-ai/dsh-host-open-in-app`. The project row offers "open this + * project's folder" by asking that host half for the applications it verified + * as installed, then POSTing the launcher it already resolved — this plugin + * never probes or spawns a launcher itself, and a host without the capability + * (no resolved application, e.g. an SSH launch) simply yields no menu entry. + */ +/** GET route serving the probed application ids (host-owned constant). */ +export declare const OPEN_IN_APP_APPS_ROUTE = "/open-in-app/apps"; +/** POST route launching one resolved application on one absolute directory. */ +export declare const OPEN_IN_APP_OPEN_ROUTE = "/open-in-app/open"; +/** + * The installed file-manager id for this host, or undefined when the host + * resolved none (the row then offers no "open in folder" entry). + * @param apps - installed catalog ids from the apps route. + * @returns the preferred available id. + */ +export declare function folderAppId(apps: readonly string[]): string | undefined; +/** + * Read the host's installed-application ids. A host without the capability + * (or one that refuses) reads as an empty list rather than an error, so the + * caller can treat "no apps" and "no route" identically. + * @param signal - aborts the read when the browser half unmounts. + * @returns installed catalog ids, in host menu order. + */ +export declare function fetchOpenInApps(signal?: AbortSignal): Promise; +/** + * Launch one installed application on one absolute directory. + * @param appId - catalog id from the apps route. + * @param path - the project's absolute directory. + * @returns after the host acknowledged the launch; rejects on any refusal. + */ +export declare function openPathInApp(appId: string, path: string): Promise;