import type { PluginHookBeforePromptBuildEvent, PluginHookAgentContext, PluginHookBeforePromptBuildResult, PluginLogger } from '../openclaw-sdk.js'; import { WorkspaceContext } from '../core/workspace-context.js'; import type { ContextInjectionConfig } from '../types.js'; import type { ActivePrinciplePromptResult } from '@principles/host-runtime'; import { SignalCollectorHost } from '../core/signal-collector-host.js'; import type { PromptHookApi } from './prompt-types.js'; import type { InjectablePrinciple } from '../core/principle-injection.js'; export interface LegacyPrinciplePromptSelection { active: InjectablePrinciple[]; probation: InjectablePrinciple[]; content: string; selectedIds: ReadonlySet; /** PRI-562 Phase 0: either budget-bounded selection dropped candidates. */ wasTruncated: boolean; } export declare function selectLegacyPrinciplesForPrompt(workspaceDir: string, reducer: Pick, logger?: PluginLogger): LegacyPrinciplePromptSelection; /** * Reset all module-level prompt state for a workspace. * Intended for test isolation — call in beforeEach(). */ export declare function resetPromptStateForTest(workspaceDir?: string): void; export declare function getSignalCollectorHost(wctx: WorkspaceContext, logger?: PluginLogger): SignalCollectorHost; /** * OpenClaw API Prompt Hook * Constructs the system prompt injected into LLM context for Principles Disciple */ /** * Loads context injection config from .pd/config.yaml via loadPdConfigForPlugin. * The resolved config is computed by the core config layer (pd-config-effective.ts), * which merges user partial input with DEFAULT_CONTEXT_INJECTION defaults. * @internal Used by evolution engine for context settings */ export declare function loadContextInjectionConfig(workspaceDir: string): ContextInjectionConfig; export declare function handleBeforePromptBuild(event: PluginHookBeforePromptBuildEvent, ctx: PluginHookAgentContext & { api?: PromptHookApi; }, sharedActivePrinciplePrompt?: ActivePrinciplePromptResult, preparedLegacyPrinciples?: LegacyPrinciplePromptSelection): Promise;