import type { Context } from './context-types.ts'; import { Config, type ResolvedSidebarConfig, type SidebarConfig } from './config.ts'; export { Config }; export type { SidebarConfig, ResolvedSidebarConfig }; export type { Context } from './context-types.ts'; export type { BetterSidebarService, TabDescriptor, TabComponentProps, FileViewerDescriptor, FileViewerProps, FileFetchStrategy, } from './client/service.ts'; /** Plugin identity for cordis.yml rows. */ export declare const name = "dsh-better-sidebar"; /** Services required before mounting: the webserver routes, the session store, the web runtime's trusted hosts, and the tool registry. */ export declare const inject: string[]; /** Content type served by /sidebar/file (binary-safe fallback for unknowns). */ export declare function mediaTypeForPath(path: string): string; /** * The live face of the side card settings namespace, bound to the settings * service when it is mounted. The DSH settings RPC domain only serves * allowlisted namespaces (api-proxy exposedNamespaces), so the client reads * and writes THIS namespace through the plugin's own fenced /sidebar routes, * which call the seam in-process — no configuration-client gate involved. */ export interface SidebarSettingsFace { /** The current resolved value + revision (undefined while the settings service is absent). */ get(): { value?: unknown; revision?: number; }; /** * Whether the dsh-web-ui family's aionui-panel has been selected as the * right-panel provider (the `aionui-panel` settings namespace resolves * `rightPanel: 'aionui-panel'`). While true the sidebar must not mount — * the two right panels are mutually exclusive. False when the namespace is * absent (no aionui installed) or the provider is anything else. */ externalDisable(): boolean; /** Merge a patch (revision-guarded) and return the fresh resolved view. */ update(patch: Record, expectedRevision?: number): Promise<{ value?: unknown; revision?: number; }>; } /** * Plugin body: mount the fenced routes and the pty lifecycle. * @param ctx - host plugin context (webServer, sessions, webRuntime). * @param config - deployment-provided limits; the Loader validates against * {@link Config} and fills defaults, direct callers get them from * {@link resolveSidebarConfig}. */ export declare function apply(ctx: Context, config?: SidebarConfig): void; /** * The WS close reason for a failed terminal attach. A missing configured * shell gets a SHORT machine-readable marker (`shell-not-found:`, * capped by BYTES — a WS close reason allows at most 123 bytes, which `ws` * validates with `Buffer.byteLength`) that the client maps to a localized, * actionable banner; every other failure keeps the raw message (the * model-side tool errors read it verbatim). */ export declare function wsCloseReasonOf(error: unknown): string;