import type * as HydraDB from "../index.js"; export interface MemoriesIngestItem { /** * ACL is the item's access-control list (PRO-1684), the same contract as * an app_knowledge item's `acl` on a split database: bare emails, * user_email:/group:/domain: principals, or the __public__/__private__ * sentinels. Omitted (nil) leaves the context unrestricted; an explicitly * empty list stores __private__. Normalised here, all-or-nothing, so a * malformed principal is a 400 on the request rather than a silently * mis-scoped context. Enforced by every read that takes `acl`. */ acl?: string[]; attributes?: Record; /** Extracted text content of the source document. */ content?: string; /** * ContextCategory files this context under one of the three buckets * (PRO-1618). Omitted or "auto" leaves it to HydraDB; naming a bucket pins * it and inference will not overwrite it. See * domain/ingestion/context_category.go. */ contextCategory?: HydraDB.MemoriesIngestItemContextCategory; contextId?: string; /** * Conversation is the canonical name; `messages` is accepted as an alias. * Both are the shape a developer already builds for OpenAI or Anthropic. */ conversation?: HydraDB.MemoriesConversationTurn[]; customAttributes?: Record; customInstructions?: string; enrich?: boolean; happenedAt?: string; /** * IsMarkdown tells the pipeline the text is markdown, so it is chunked on * structure rather than as flat prose. The split memories[] path has always * carried it; a unified database has no other ingest shape, so without it * here a markdown sync has nowhere to say so. */ isMarkdown?: boolean; messages?: HydraDB.MemoriesConversationTurn[]; /** Text is the canonical name; `content` is accepted as an alias. */ text?: string; /** * Title names the context. It becomes the context's document title, and it * is what distinguishes two items whose text is identical: the document id * is generated from the title, so without one they collide. */ title?: string; /** * UserName is the speaker identity for a TEXT item. A conversation names * its speaker per turn instead, and that stays authoritative: this field * only fills in when the turns supplied none. Empty ends up as "User", * matching the split path, so the pipeline is never handed a blank. */ userName?: string; }