/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { BaseDeclarativeTool, BaseToolInvocation, type ToolEditConfirmationDetails, type ToolResult } from './tools.js'; import type { MessageBus } from '../confirmation-bus/message-bus.js'; import { type ModifiableDeclarativeTool, type ModifyContext } from './modifiable-tool.js'; export declare const LLXPRT_CONFIG_DIR = ".llxprt"; export declare const GEMINI_DIR = ".llxprt"; export declare const DEFAULT_CONTEXT_FILENAME = "LLXPRT.md"; export declare const CORE_MEMORY_FILENAME = ".LLXPRT_SYSTEM"; export declare const MEMORY_SECTION_HEADER = "## LLxprt Code Added Memories"; export declare function setLlxprtMdFilename(newFilename: string | string[]): void; export declare function getCurrentLlxprtMdFilename(): string; export declare function getAllLlxprtMdFilenames(): string[]; type MemoryScope = 'global' | 'project' | 'core.global' | 'core.project'; interface SaveMemoryParams { fact: string; scope?: MemoryScope; modified_by_user?: boolean; modified_content?: string; } export declare function getGlobalCoreMemoryFilePath(): string; export declare function getProjectCoreMemoryFilePath(workingDir: string): string; declare class MemoryToolInvocation extends BaseToolInvocation { private static readonly allowlist; private workingDir?; constructor(params: SaveMemoryParams, messageBus?: MessageBus); setWorkingDir(workingDir: string): void; getMemoryFilePath(): string; readMemoryFileContent(): Promise; getToolName(): string; getDescription(): string; shouldConfirmExecute(_abortSignal: AbortSignal): Promise; execute(_signal: AbortSignal): Promise; } export declare class MemoryTool extends BaseDeclarativeTool implements ModifiableDeclarativeTool { private config?; static readonly Name: string; constructor(config?: { getWorkingDir: () => string; } | undefined, messageBus?: MessageBus); protected validateToolParamValues(params: SaveMemoryParams): string | null; protected createInvocation(params: SaveMemoryParams, messageBus?: MessageBus): MemoryToolInvocation; static performAddMemoryEntry(text: string, memoryFilePath: string, fsAdapter: { readFile: (path: string, encoding: 'utf-8') => Promise; writeFile: (path: string, data: string, encoding: 'utf-8') => Promise; mkdir: (path: string, options: { recursive: boolean; }) => Promise; }): Promise; getModifyContext(_abortSignal: AbortSignal): ModifyContext; } export {};