//#region extensions/crypto/src/hooks/prompt-builder.d.ts /** * before_prompt_build hook — System prompt injection * * Injects identity, persona, intent confirmation, mode context, wallet state, * and self-improvement context into every LLM prompt. * * Uses prependSystemContext for static/cacheable content (identity, rules) * and prependContext for dynamic per-user content (persona, mode, wallet, memory). * * Context Diet: heavy blocks (sequential execution, compound ops, learned skills) * are injected conditionally based on relevance heuristics to reduce token waste. * * @see https://github.com/openclaw/openclaw — upstream hook shape (v2026.3.7+) */ /** Dependencies injected by the plugin register() function. */ interface PromptBuilderDeps { getWalletState: () => { connected: boolean; address?: string | null; chainId?: number | null; mode?: string | null; }; logger?: { info?: (message: string, ...args: unknown[]) => void; warn?: (message: string, ...args: unknown[]) => void; } | null; } /** * Build the system prompt injection for a given hook event. * * Returns `{ prependSystemContext, prependContext }` or `undefined` if * there is nothing to inject. */ declare function buildPromptContext(event: any, ctx: any, deps: PromptBuilderDeps): { prependSystemContext?: string; prependContext?: string; } | undefined; //#endregion export { PromptBuilderDeps, buildPromptContext }; //# sourceMappingURL=prompt-builder.d.mts.map