import { ThreadObject } from '../types/memory.js'; import { MemoryModule } from '../modules/memory/memory.module.js'; import '../modules/memory/base.memory.js'; import '../types/document.js'; import '../types/list.js'; import '../types/schedule.js'; /** * Collects attached document ids for the current turn: ids recorded on * earlier messages' `metadata.documentIds` / `metadata.documentId` * (chronological), then the current request's ids. Deduped, order-preserving. */ declare function collectAttachedDocumentIds(thread: ThreadObject, requestDocumentIds?: string[]): string[]; /** * Resolves the attached documents to fresh rendered text and pushes ONE * in-memory USER message onto `thread.messages` so fulfillment sees the * bodies. Never persisted — intent triggering (which runs before this) and * stored history keep only the short display text. * * Isolation point: if the injection strategy changes (system-prompt * grounding, provider-native document parts), only this function changes. * * Authorization: resolution is deliberately read-open — ids are resolved via * `getDocument` without a per-user ownership check, matching the deployment's * role-based read-open document policy (cross-user document conversations are * a supported flow). Deployments that need owner-only attachment must enforce * authorization before passing ids into the query pipeline. */ declare function injectAttachedDocuments(memoryModule: MemoryModule, thread: ThreadObject, requestDocumentIds?: string[], filterText?: (text: string) => Promise): Promise; export { collectAttachedDocumentIds, injectAttachedDocuments };