import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; import type { VaultMemoryApi } from './cloud.js'; import type { ProjectScope } from './project-scope.js'; type Scoper = (input: Record & { projectId?: string | undefined; scope?: ProjectScope | undefined; }) => Promise>; export type TemporalFact = { id: string; fact: string; relation: string; source: { id: string; name: string; }; target: { id: string; name: string; }; validAt: string | null; invalidAt: string | null; createdAt: string; expiredAt: string | null; memoryIds: string[]; projectIds: string[]; }; export type FactStatus = 'current' | 'ended' | 'superseded' | 'not_yet_valid'; export declare const GRAPH_UNAVAILABLE_MESSAGE = "O grafo temporal ainda n\u00E3o est\u00E1 habilitado nesta conta (temporal graph not enabled yet). Nada est\u00E1 errado: use vault_go_search ou vault_go_search_index para recuperar mem\u00F3rias."; /** * "What was true on 2026-03-01" means the end of that day, so a bare date * becomes its last UTC millisecond; full datetimes pass through unchanged. */ export declare function normalizeAsOf(value: string | undefined): string | undefined; /** Classifies a fact against the reference instant (asOf or now). */ export declare function factStatus(fact: Pick, reference: number): FactStatus; /** Compact text for the model plus the full structured payload for clients that read structuredContent. */ export declare function formatFacts(facts: TemporalFact[], options: { asOf?: string | undefined; includeExpired: boolean; header?: string; }): { text: string; structured: { facts: { status: FactStatus; id: string; fact: string; relation: string; source: { id: string; name: string; }; target: { id: string; name: string; }; validAt: string | null; invalidAt: string | null; createdAt: string; expiredAt: string | null; memoryIds: string[]; projectIds: string[]; }[]; count: number; asOf: string | null; includeExpired: boolean; memoryIds: string[]; }; }; type Entity = { id: string; name: string; summary?: string; labels?: string[]; createdAt?: string; }; export declare function formatEntities(value: unknown): { text: string; structured: { entities: Entity[]; count: number; }; }; type ErrorContext = { notFound?: string | undefined; }; /** Maps API failures: graph_unavailable is an expected state, not an error; validation errors stay actionable. */ export declare function temporalErrorResult(error: unknown, context?: ErrorContext): { content: { type: "text"; text: string; }[]; structuredContent: Record; } | { content: { type: "text"; text: string; }[]; isError: boolean; }; export declare function registerTemporalGraphTools(server: McpServer, cloud: VaultMemoryApi, scoped: Scoper): void; export {};