/** * dsh-research: the curated research plugin index, inside Settings. * * The panel exists because the alternative is a long command. Installing five * packages by hand means reading a website, selecting a line, and trusting it * — this plugin turns that into a list you scroll and a button you press. * * It deliberately does NOT install anything, and the reason is not that * installing is unsafe. `dsh-market` already installs from a curated registry * with a same-origin check, a mutation lock, duplicate-alias guards, retry of * dependencies left by a failed install, and Windows shim handling — months * of edge cases. Reimplementing that to save a paste would be reimplementing * it badly. What is missing from that market is not installation but * curation: which fifteen of eleven hundred plugins a researcher wants. So * this panel does the part nobody else does, and hands over the command. * @module dsh-research */ import type { Context } from '@deepseek-ai/cordis'; import Schema from '@deepseek-ai/schemastery'; import type { MarketItem } from './shared/route.js'; export { CATALOG_ROUTE, CATALOG_URL, CATALOG_URL_ZH, INSTALL_ROUTE, REMOVE_ROUTE, RESTART_ROUTE } from './shared/route.js'; export type { CatalogPage, CatalogResponse, InstallResponse, MarketItem, RestartResponse } from './shared/route.js'; export { normalizeCatalog } from './catalog.js'; export { argvProfile, attachedToTerminal, dshArgv, installPackage, installSpec, modulePathProfile, pluginArgs, profileDir, quoteCmdArg, removePackage, resolveProfile, restartCommand, scheduleRestart, spawnEnv, trustedRestartRequest } from './install.js'; export type { DshInvocation, InstallOutcome, RestartOutcome } from './install.js'; /** Cordis plugin name used by loader diagnostics. */ export declare const name = "research-market"; /** Services required before `apply` runs; `webServer` is injected lazily. */ export declare const inject: string[]; /** Plugin configuration. */ export interface Config { /** Catalog endpoint implementing the market provider contract. */ catalogUrl?: string; /** Chinese-language catalog endpoint. */ catalogUrlZh?: string; /** Profile an install mutates; defaults to the one this host booted. */ profile?: string; /** Offer the install and remove buttons. */ allowInstall?: boolean; /** Offer the restart button. */ allowRestart?: boolean; /** Seconds a fetched snapshot is reused before refetching. */ cacheSeconds?: number; /** Milliseconds to wait for the catalog before falling back to cache. */ timeoutMs?: number; } export declare const Config: Schema; /** * Register the catalog route. * * The route is the plugin's whole Node surface: it fetches, normalizes and * caches, so the panel never talks to a third-party host itself and a slow * catalog cannot make the settings page hang. * @param ctx - plugin context; `webServer` arrives through injection. * @param config - schemastery-validated config with defaults applied. */ export declare function apply(ctx: Context, config: Config): void; export type { MarketItem as CatalogItem };