/** * OpenClaw internalization auto-consumer service. * * PRI-624 (Codex Closure Slice C): the downstream execution logic now lives in * the shared host-neutral `runInternalizationConsumerCycle` * (`@principles/host-runtime`), extracted verbatim from this service so the * OpenClaw scheduler and the Companion workspace worker execute ONE * implementation. This module keeps only what is genuinely OpenClaw-specific: * the service lifecycle (timer chain per workspace), the OpenClaw tool * catalog, the plugin logger, and SystemLogger event emission. */ import type { OpenClawPluginServiceContext, PluginLogger } from '../openclaw-sdk.js'; export interface InternalizationAutoConsumerServiceShape { id: string; start: (ctx: OpenClawPluginServiceContext) => void; stop?: (ctx: OpenClawPluginServiceContext) => void; } /** * PRI-741 (review round): persist the OpenClaw tool declaration as workspace * provenance — host-neutral consumers (pd-cli activation / run-once) load it * to run reliability validation with the SAME registry instead of guessing * the host. The declaration derives from this package's constants (single * source) and is a FACT about the host: it is refreshed on EVERY gateway * start, independent of the internalization consumer flag, so a flag-off * workspace never keeps a stale declaration whose phantom names defeat the * activation gate's hasHostTool check. */ export declare function persistOpenClawToolDeclaration(workspaceDir: string, logger: { warn: (msg: string) => void; }): void; export declare function runConsumerCycle(workspaceDir: string, logger: PluginLogger): Promise; export declare const InternalizationAutoConsumerService: InternalizationAutoConsumerServiceShape;