import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import type { ToolPolicyInput } from "@mono-agent/agent-harness"; import type { RuntimeOptionsExtension } from "./runtime-option-extensions.js"; export declare const MEMORY_REMEMBER_MCP_SERVER_NAME = "mono-agent-memory-write"; export declare const REMEMBER_TOOL_NAME = "Remember"; export declare const REMEMBER_MAX_CHARACTERS = 500; /** * The write half of the memory surface, kept separate from `MemoryRecall`. * * `remember` alone is not enough to gate on: a read-only store still has the * method and would only ever throw, so the capability must be answered * affirmatively. Backends without a deterministic write path (Supermemory) * simply never implement `supportsRemember` and are excluded. */ export interface RememberCapableStore { remember(conversationId: string, text: string, options?: { readonly abortSignal?: AbortSignal; }): Promise<{ readonly id: string; readonly source: string; readonly text: string; readonly duplicate: boolean; }>; supportsRemember(): boolean; } /** Fail-closed: only a store that affirms the capability may expose the tool. */ export declare function isRememberCapableStore(store: unknown): store is RememberCapableStore; type RememberPolicy = Pick; /** Whether a policy entry names the app-owned Remember surface. */ export declare function isRememberToolPolicyName(name: string): boolean; /** * Durable memory writes follow the normal app-owned allow/deny boundary. * * This is deliberately unlike read-only `MemoryRecall`, which is provisioned * from `memory.recallTool.enabled` and is not allowlist-gated: an operator must * be able to withhold a durable write surface without disabling recall. */ export declare function isRememberToolAllowed(policy: RememberPolicy | undefined): boolean; /** Register the single `Remember` tool against one conversation's writable store. */ export declare function createMemoryRememberServer(store: RememberCapableStore, conversationId: string, env?: Record): McpServer; export interface MemoryRememberRuntimeExtensionOptions { /** Best-effort diagnostic when the loopback tool endpoint cannot start. */ readonly onUnavailable?: (error: unknown) => void; readonly env?: Record; } /** Expose `Remember` for each request, bound to that request's conversation. */ export declare function createMemoryRememberRuntimeExtension(store: RememberCapableStore, options?: MemoryRememberRuntimeExtensionOptions): RuntimeOptionsExtension; export {}; //# sourceMappingURL=memory-remember.d.ts.map