/** * Autonomous memory — shared constants. * * Single source of truth for defaults, limits, and magic strings used across * the memory store, tools, flush phase, and tests. Changing a value here * changes it everywhere — no hunting through files. */ /** Default embedding provider when {@link process.env.MEMORY_EMBEDDINGS_PROVIDER} is unset. */ export declare const DEFAULT_MEMORY_PROVIDER: "bedrock"; /** Default embedding model (Titan v2 — AWS-native, 6× cheaper than Cohere v4). */ export declare const DEFAULT_MEMORY_MODEL = "amazon.titan-embed-text-v2:0"; /** Default vector width (Titan v2 supports 256 / 512 / 1024). */ export declare const DEFAULT_MEMORY_DIMENSIONS = 1024; /** Default Postgres table name; can be overridden via env for dev/prod sharing. */ export declare const DEFAULT_MEMORY_TABLE = "agent_memories"; /** Default Postgres schema. */ export declare const DEFAULT_MEMORY_SCHEMA = "public"; /** Phase values used by the flush-phase gate. */ export declare const MEMORY_PHASE_NORMAL = "normal"; export declare const MEMORY_PHASE_FLUSHING = "memory_flushing"; /** * Search defaults — aligned with upstream's upstream defaults. * * Sources: * - `upstream reference` → maxResults=6 * - `upstream reference` → maxInjectedChars=4000 * * Keeping these in lockstep with upstream means the mandatory-recall tool * description, budget clamps, and eval corpora line up with upstream's * tuning — we inherit their calibration instead of re-tuning from scratch. */ export declare const DEFAULT_MAX_SEARCH_RESULTS = 6; export declare const DEFAULT_MIN_SCORE = 0.1; export declare const DEFAULT_MAX_INJECTED_CHARS = 4000; /** Hybrid retrieval weights — 70% vector cosine, 30% BM25 / ts_rank text score. */ export declare const HYBRID_VECTOR_WEIGHT = 0.7; export declare const HYBRID_TEXT_WEIGHT = 0.3; /** * Phase 2 rerank defaults — ported from upstream. * * Sources: * - `upstream reference` → lambda=0.7 * - `upstream reference` → halfLifeDays=30 * * Both features are opt-in (enabled=false by default) — the Phase 2 * features are layered on top of hybrid search and don't change default * behavior for callers that upgrade in place. */ export declare const DEFAULT_MMR_ENABLED = false; export declare const DEFAULT_MMR_LAMBDA = 0.7; export declare const DEFAULT_TEMPORAL_DECAY_ENABLED = false; export declare const DEFAULT_TEMPORAL_DECAY_HALF_LIFE_DAYS = 30; export declare const DEFAULT_RECALL_TRACKING_ENABLED = false; export declare const DEFAULT_CITATIONS_MODE: "auto"; /** * Flush trigger margins (token counts) — aligned with upstream upstream. * * Sources: * - `upstream reference` → softThreshold=4000 * - `upstream reference` → reserveFloor=20000 */ export declare const DEFAULT_FLUSH_SOFT_THRESHOLD_TOKENS = 4000; export declare const DEFAULT_FLUSH_RESERVE_FLOOR_TOKENS = 20000; /** Hard cap on append calls per flush phase — prevents runaway writes. */ export declare const DEFAULT_MAX_APPENDS_PER_FLUSH = 20; /** * Hard cap on agentic loop iterations inside {@link runMemoryFlush}. * * Each iteration = one model.invoke() followed by execution of any * `memory_append` tool_calls it emits. Mirrors upstream's flush-plan * loop cap; 8 is enough for ~2–3 reflections of batched notes while * protecting against runaway cycles if the model refuses to stop. */ export declare const DEFAULT_MAX_FLUSH_ITERATIONS = 8; /** Path prefix enforced on every append. Paths outside this are rejected. */ export declare const MEMORY_PATH_PREFIX = "memory/"; /** Tool names — kept as constants so server code + tests never drift. */ export declare const MEMORY_SEARCH_TOOL_NAME = "memory_search"; export declare const MEMORY_GET_TOOL_NAME = "memory_get"; export declare const MEMORY_APPEND_TOOL_NAME = "memory_append"; /** * Mandatory-recall description — the single most load-bearing line in the * whole memory system. Do not soften, shorten, or reword without an eval run. * * Ported VERBATIM from upstream `extensions/memory-core/src/tools.ts:186`. * The wiki/corpus clause is retained even though Phase 1 doesn't ship * compiled-wiki supplements — keeping the string identical means upstream's * eval corpora remain drop-in valid. */ export declare const MEMORY_SEARCH_DESCRIPTION: string; /** * Ported VERBATIM from upstream `extensions/memory-core/src/tools.ts:322`. */ export declare const MEMORY_GET_DESCRIPTION: string; /** * `memory_append` tool description. * * Phase 1 historically wrote to a single date-keyed file * (`memory/YYYY-MM-DD.md`), ported verbatim from upstream. That scheme * is now replaced by an 8-path canonical whitelist — see * {@link ./paths.MEMORY_ALL_PATHS}. The tool description no longer * names a specific file; the flush-turn prompt renders the full rubric * inline so the model sees every writable path at inference time. */ export declare const MEMORY_APPEND_DESCRIPTION: string; /** * Reply token that signals the flush turn produced no user-visible output. * Ported VERBATIM from upstream `src/auto-reply/tokens.ts:4`. */ export declare const SILENT_REPLY_TOKEN = "NO_REPLY"; /** * Placeholder replaced at flush time with the rendered path-rubric for * the caller's scope. See `renderPathsRubric()` in `./paths.ts` and * `resolveFlushPrompts()` in `../prompts/memoryFlushPrompt.ts`. * * Kept as a unique sentinel so `replaceAll` is safe even if the rubric * content happens to contain regex metacharacters. */ export declare const FLUSH_PROMPT_RUBRIC_PLACEHOLDER = "{{MEMORY_PATHS_RUBRIC}}"; export declare const DEFAULT_MEMORY_FLUSH_PROMPT: string; export declare const DEFAULT_MEMORY_FLUSH_SYSTEM_PROMPT: string;