/** * Message utilities for stripping OpenClaw-injected metadata from agent * messages before passing them to brv CLI. * * OpenClaw prepends structured metadata blocks (sentinel + fenced JSON) to * user message content and wraps assistant output in / tags. * These are AI-facing constructs that should not leak into brv queries or * curated context. */ /** * Strip all OpenClaw-injected metadata blocks from user message content, * returning only the actual user text. * * Each block follows the pattern: * * ```json * { ... } * ``` * * Trailing "Untrusted context" suffix blocks are also removed. */ export declare function stripUserMetadata(text: string): string; /** * Parse the "Conversation info" and "Sender" metadata blocks from user * message content to extract sender name and timestamp for clean curate * attribution. */ export declare function extractSenderInfo(text: string): { name?: string; timestamp?: string; } | null; export declare function stripAssistantTags(text: string): string; /** Extract agent ID from sessionKey format: "agent:::..." */ export declare function extractAgentId(sessionKey?: string): string | undefined; /** * Resolve workspace directory from sessionKey. * Reads agent workspace from ~/.openclaw/openclaw.json: * agents.list[id].workspace → agent-specific workspace * agents.defaults.workspace → fallback default * Falls back to legacy convention if the config is unreadable. */ export declare function resolveWorkspaceDir(sessionKey?: string, baseCwd?: string): string | undefined;