import z from "@deepseek-ai/schemastery"; import { Context, Volatile } from "@deepseek-ai/cordis"; //#region src/app/host/visual-tools.d.ts /** Stable Cordis plugin name (the Loader row id in `cordis.patch.yml`). */ declare const name = "pi-tui-visual-tools"; /** * The Host services this row uses: the registry it owns, the live Agent (the * executing Session identity plus the official turn-boundary reader) and the * official Session read service that returns a committed observation. */ declare const inject: string[]; /** * The two stable, namespaced generating tool names. * * These stay DEFINED here (not re-exported from `domain/visual/tools.ts`) for two * reasons: `@xmoon76/dsh-pi-tui/visual-tools` has publicly exported them since the * row shipped, so removing them would be a breaking change to a published entry, * and a re-export would add the domain module's declaration region to the * packaged `dist/visual-tools.d.mts`. They are compile-time literals, so the * domain's copy is the same value and the two can never disagree at runtime. */ declare const CHART_TOOL_NAME = "dsh_pi_tui_chart"; declare const SVG_TOOL_NAME = "dsh_pi_tui_svg"; /** * The row's profile-wide availability switch. `enabled` is a volatile field: * the Settings service projects it into an editable form section, and a write * is committed into this live reference without remounting the row. The * default is ON, so an existing profile needs no migration. */ interface Config { readonly enabled: Volatile; } /** The Config schema the Loader resolves (default ON, live form field). */ declare const Config: z; /** * Register this Host row: reconcile the three tool registrations with the * `enabled` Config reference at mount and after every volatile commit. * * `ctx.reflect.get` is the documented permanent-Host-plane idiom * (`docs/architecture/host-client.md`): this module IS the Host plane, so the * registry read is not Client-side coupling and the client-boundary inventory * stays inside the existing baseline. The explicit `inject` above guarantees * every service. * * The Loader commits every volatile value BEFORE it dispatches * `loader/volatile-update`, so the listener must read the reference (never the * event payload) and ignore unrelated paths. A throwing listener is contained * by the Loader: the write stays committed, and the next read of * {@link VISUAL_TOOLS_STATUS_SERVICE} proves the registration did not follow. * * Reconciliation is SERIALIZED: a `tools/change` listener may synchronously * write the Config back from inside a registration/disposal callback, so that * request is queued and applied after the current transition reaches a * consistent group instead of interleaving two transitions. * * @param ctx - the Host context that owns this row's fiber. * @param config - the resolved Config (the live `enabled` reference). */ declare function apply(ctx: Context, config: Config): void; //#endregion export { CHART_TOOL_NAME, Config, SVG_TOOL_NAME, apply, inject, name };