/// /** * Harness Widgets —browser half entry. * * Registers the right-hand widget rail, the header capsule toggle, and the * two settings surfaces (General rows + the component-settings section). One shared bridge * holds the persisted prefs, the folded session stats, and the OpenCode usage * payload fetched from the Host's same-origin `/api/opencode-usage` route. */ import type { Context as ClientContext } from '@deepseek-ai/cordis'; import './styles/tokens.module.css'; import './styles/card.module.css'; import './styles/rail.module.css'; import './styles/panel.module.css'; import './styles/market.module.css'; import './styles/primitives.module.css'; /** Required services: the slot registry (React is a platform module). */ export declare const inject: string[]; /** * THIRD-PARTY UNIT REGISTRATION (ARCH-004 / roadmap `widgets-market`). * * Another client bundle can contribute a widget unit without forking this repo: * * ```ts * import { registerExternalUnit } from 'dsh-widgets/client' * * ctx.effect(() => registerExternalUnit({ manifest, widget })) * ``` * * `registerExternalUnit` validates the unit against the same rules the build * pipeline applies to a built-in one (`lib/contract/external.ts`) and THROWS with * the full violation list when a rule is broken — an unreviewed bundle must not be * able to impersonate a built-in, wait on a data source that does not exist, or * list itself in a language nobody can read. `scripts/validate-external-unit.mjs` * is the same checklist as a submission gate, so a contributor can pass review * before shipping. The returned disposer removes the unit again. */ export { registerExternalUnit, externalUnits, knownSources } from './lib/registry'; export { validateExternalUnit, type ExternalWidgetUnit, type ExternalManifest } from './lib/contract/external'; /** * Client plugin body: restore persisted prefs, register the rail and settings * surfaces, and wire the live session stats + OpenCode usage into one bridge. * @param ctx - client root context (carries the injected `slots` service). */ export declare function apply(ctx: ClientContext): void;