@animus-labs/cortex 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +73 -0
- package/dist/budget-guard.d.ts +75 -0
- package/dist/budget-guard.d.ts.map +1 -0
- package/dist/budget-guard.js +142 -0
- package/dist/budget-guard.js.map +1 -0
- package/dist/compaction/compaction.d.ts +99 -0
- package/dist/compaction/compaction.d.ts.map +1 -0
- package/dist/compaction/compaction.js +302 -0
- package/dist/compaction/compaction.js.map +1 -0
- package/dist/compaction/failsafe.d.ts +57 -0
- package/dist/compaction/failsafe.d.ts.map +1 -0
- package/dist/compaction/failsafe.js +135 -0
- package/dist/compaction/failsafe.js.map +1 -0
- package/dist/compaction/index.d.ts +381 -0
- package/dist/compaction/index.d.ts.map +1 -0
- package/dist/compaction/index.js +979 -0
- package/dist/compaction/index.js.map +1 -0
- package/dist/compaction/microcompaction.d.ts +219 -0
- package/dist/compaction/microcompaction.d.ts.map +1 -0
- package/dist/compaction/microcompaction.js +536 -0
- package/dist/compaction/microcompaction.js.map +1 -0
- package/dist/compaction/observational/buffering.d.ts +225 -0
- package/dist/compaction/observational/buffering.d.ts.map +1 -0
- package/dist/compaction/observational/buffering.js +354 -0
- package/dist/compaction/observational/buffering.js.map +1 -0
- package/dist/compaction/observational/constants.d.ts +70 -0
- package/dist/compaction/observational/constants.d.ts.map +1 -0
- package/dist/compaction/observational/constants.js +507 -0
- package/dist/compaction/observational/constants.js.map +1 -0
- package/dist/compaction/observational/index.d.ts +219 -0
- package/dist/compaction/observational/index.d.ts.map +1 -0
- package/dist/compaction/observational/index.js +641 -0
- package/dist/compaction/observational/index.js.map +1 -0
- package/dist/compaction/observational/observer.d.ts +97 -0
- package/dist/compaction/observational/observer.d.ts.map +1 -0
- package/dist/compaction/observational/observer.js +424 -0
- package/dist/compaction/observational/observer.js.map +1 -0
- package/dist/compaction/observational/recall-tool.d.ts +27 -0
- package/dist/compaction/observational/recall-tool.d.ts.map +1 -0
- package/dist/compaction/observational/recall-tool.js +93 -0
- package/dist/compaction/observational/recall-tool.js.map +1 -0
- package/dist/compaction/observational/reflector.d.ts +94 -0
- package/dist/compaction/observational/reflector.d.ts.map +1 -0
- package/dist/compaction/observational/reflector.js +167 -0
- package/dist/compaction/observational/reflector.js.map +1 -0
- package/dist/compaction/observational/types.d.ts +271 -0
- package/dist/compaction/observational/types.d.ts.map +1 -0
- package/dist/compaction/observational/types.js +15 -0
- package/dist/compaction/observational/types.js.map +1 -0
- package/dist/context-manager.d.ts +134 -0
- package/dist/context-manager.d.ts.map +1 -0
- package/dist/context-manager.js +170 -0
- package/dist/context-manager.js.map +1 -0
- package/dist/cortex-agent.d.ts +1020 -0
- package/dist/cortex-agent.d.ts.map +1 -0
- package/dist/cortex-agent.js +3589 -0
- package/dist/cortex-agent.js.map +1 -0
- package/dist/error-classifier.d.ts +48 -0
- package/dist/error-classifier.d.ts.map +1 -0
- package/dist/error-classifier.js +152 -0
- package/dist/error-classifier.js.map +1 -0
- package/dist/event-bridge.d.ts +166 -0
- package/dist/event-bridge.d.ts.map +1 -0
- package/dist/event-bridge.js +381 -0
- package/dist/event-bridge.js.map +1 -0
- package/dist/index.d.ts +55 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +57 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp-client.d.ts +119 -0
- package/dist/mcp-client.d.ts.map +1 -0
- package/dist/mcp-client.js +474 -0
- package/dist/mcp-client.js.map +1 -0
- package/dist/model-wrapper.d.ts +58 -0
- package/dist/model-wrapper.d.ts.map +1 -0
- package/dist/model-wrapper.js +86 -0
- package/dist/model-wrapper.js.map +1 -0
- package/dist/noop-logger.d.ts +4 -0
- package/dist/noop-logger.d.ts.map +1 -0
- package/dist/noop-logger.js +8 -0
- package/dist/noop-logger.js.map +1 -0
- package/dist/prompt-diagnostics.d.ts +47 -0
- package/dist/prompt-diagnostics.d.ts.map +1 -0
- package/dist/prompt-diagnostics.js +230 -0
- package/dist/prompt-diagnostics.js.map +1 -0
- package/dist/provider-manager.d.ts +224 -0
- package/dist/provider-manager.d.ts.map +1 -0
- package/dist/provider-manager.js +563 -0
- package/dist/provider-manager.js.map +1 -0
- package/dist/provider-registry.d.ts +115 -0
- package/dist/provider-registry.d.ts.map +1 -0
- package/dist/provider-registry.js +305 -0
- package/dist/provider-registry.js.map +1 -0
- package/dist/schema-converter.d.ts +20 -0
- package/dist/schema-converter.d.ts.map +1 -0
- package/dist/schema-converter.js +48 -0
- package/dist/schema-converter.js.map +1 -0
- package/dist/skill-preprocessor.d.ts +46 -0
- package/dist/skill-preprocessor.d.ts.map +1 -0
- package/dist/skill-preprocessor.js +237 -0
- package/dist/skill-preprocessor.js.map +1 -0
- package/dist/skill-registry.d.ts +107 -0
- package/dist/skill-registry.d.ts.map +1 -0
- package/dist/skill-registry.js +330 -0
- package/dist/skill-registry.js.map +1 -0
- package/dist/skill-tool.d.ts +54 -0
- package/dist/skill-tool.d.ts.map +1 -0
- package/dist/skill-tool.js +88 -0
- package/dist/skill-tool.js.map +1 -0
- package/dist/sub-agent-manager.d.ts +90 -0
- package/dist/sub-agent-manager.d.ts.map +1 -0
- package/dist/sub-agent-manager.js +192 -0
- package/dist/sub-agent-manager.js.map +1 -0
- package/dist/token-estimator.d.ts +23 -0
- package/dist/token-estimator.d.ts.map +1 -0
- package/dist/token-estimator.js +27 -0
- package/dist/token-estimator.js.map +1 -0
- package/dist/tool-contract.d.ts +68 -0
- package/dist/tool-contract.d.ts.map +1 -0
- package/dist/tool-contract.js +35 -0
- package/dist/tool-contract.js.map +1 -0
- package/dist/tool-result-persistence.d.ts +89 -0
- package/dist/tool-result-persistence.d.ts.map +1 -0
- package/dist/tool-result-persistence.js +152 -0
- package/dist/tool-result-persistence.js.map +1 -0
- package/dist/tools/bash/index.d.ts +71 -0
- package/dist/tools/bash/index.d.ts.map +1 -0
- package/dist/tools/bash/index.js +485 -0
- package/dist/tools/bash/index.js.map +1 -0
- package/dist/tools/bash/interactive.d.ts +47 -0
- package/dist/tools/bash/interactive.d.ts.map +1 -0
- package/dist/tools/bash/interactive.js +262 -0
- package/dist/tools/bash/interactive.js.map +1 -0
- package/dist/tools/bash/safety.d.ts +149 -0
- package/dist/tools/bash/safety.d.ts.map +1 -0
- package/dist/tools/bash/safety.js +1116 -0
- package/dist/tools/bash/safety.js.map +1 -0
- package/dist/tools/edit.d.ts +57 -0
- package/dist/tools/edit.d.ts.map +1 -0
- package/dist/tools/edit.js +310 -0
- package/dist/tools/edit.js.map +1 -0
- package/dist/tools/glob.d.ts +34 -0
- package/dist/tools/glob.d.ts.map +1 -0
- package/dist/tools/glob.js +268 -0
- package/dist/tools/glob.js.map +1 -0
- package/dist/tools/grep.d.ts +53 -0
- package/dist/tools/grep.d.ts.map +1 -0
- package/dist/tools/grep.js +673 -0
- package/dist/tools/grep.js.map +1 -0
- package/dist/tools/index.d.ts +62 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +52 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/read.d.ts +43 -0
- package/dist/tools/read.d.ts.map +1 -0
- package/dist/tools/read.js +459 -0
- package/dist/tools/read.js.map +1 -0
- package/dist/tools/runtime.d.ts +62 -0
- package/dist/tools/runtime.d.ts.map +1 -0
- package/dist/tools/runtime.js +116 -0
- package/dist/tools/runtime.js.map +1 -0
- package/dist/tools/shared/cwd-tracker.d.ts +32 -0
- package/dist/tools/shared/cwd-tracker.d.ts.map +1 -0
- package/dist/tools/shared/cwd-tracker.js +44 -0
- package/dist/tools/shared/cwd-tracker.js.map +1 -0
- package/dist/tools/shared/edit-history.d.ts +55 -0
- package/dist/tools/shared/edit-history.d.ts.map +1 -0
- package/dist/tools/shared/edit-history.js +72 -0
- package/dist/tools/shared/edit-history.js.map +1 -0
- package/dist/tools/shared/edit-matcher.d.ts +83 -0
- package/dist/tools/shared/edit-matcher.d.ts.map +1 -0
- package/dist/tools/shared/edit-matcher.js +359 -0
- package/dist/tools/shared/edit-matcher.js.map +1 -0
- package/dist/tools/shared/file-mutation-lock.d.ts +22 -0
- package/dist/tools/shared/file-mutation-lock.d.ts.map +1 -0
- package/dist/tools/shared/file-mutation-lock.js +35 -0
- package/dist/tools/shared/file-mutation-lock.js.map +1 -0
- package/dist/tools/shared/gitignore.d.ts +17 -0
- package/dist/tools/shared/gitignore.d.ts.map +1 -0
- package/dist/tools/shared/gitignore.js +59 -0
- package/dist/tools/shared/gitignore.js.map +1 -0
- package/dist/tools/shared/pdf-extractor.d.ts +96 -0
- package/dist/tools/shared/pdf-extractor.d.ts.map +1 -0
- package/dist/tools/shared/pdf-extractor.js +196 -0
- package/dist/tools/shared/pdf-extractor.js.map +1 -0
- package/dist/tools/shared/read-registry.d.ts +66 -0
- package/dist/tools/shared/read-registry.d.ts.map +1 -0
- package/dist/tools/shared/read-registry.js +65 -0
- package/dist/tools/shared/read-registry.js.map +1 -0
- package/dist/tools/shared/safe-env.d.ts +18 -0
- package/dist/tools/shared/safe-env.d.ts.map +1 -0
- package/dist/tools/shared/safe-env.js +70 -0
- package/dist/tools/shared/safe-env.js.map +1 -0
- package/dist/tools/sub-agent.d.ts +91 -0
- package/dist/tools/sub-agent.d.ts.map +1 -0
- package/dist/tools/sub-agent.js +89 -0
- package/dist/tools/sub-agent.js.map +1 -0
- package/dist/tools/task-output.d.ts +38 -0
- package/dist/tools/task-output.d.ts.map +1 -0
- package/dist/tools/task-output.js +186 -0
- package/dist/tools/task-output.js.map +1 -0
- package/dist/tools/tool-search/index.d.ts +40 -0
- package/dist/tools/tool-search/index.d.ts.map +1 -0
- package/dist/tools/tool-search/index.js +110 -0
- package/dist/tools/tool-search/index.js.map +1 -0
- package/dist/tools/tool-search/registry.d.ts +82 -0
- package/dist/tools/tool-search/registry.d.ts.map +1 -0
- package/dist/tools/tool-search/registry.js +238 -0
- package/dist/tools/tool-search/registry.js.map +1 -0
- package/dist/tools/undo-edit.d.ts +51 -0
- package/dist/tools/undo-edit.d.ts.map +1 -0
- package/dist/tools/undo-edit.js +231 -0
- package/dist/tools/undo-edit.js.map +1 -0
- package/dist/tools/web-fetch/cache.d.ts +49 -0
- package/dist/tools/web-fetch/cache.d.ts.map +1 -0
- package/dist/tools/web-fetch/cache.js +89 -0
- package/dist/tools/web-fetch/cache.js.map +1 -0
- package/dist/tools/web-fetch/index.d.ts +53 -0
- package/dist/tools/web-fetch/index.d.ts.map +1 -0
- package/dist/tools/web-fetch/index.js +513 -0
- package/dist/tools/web-fetch/index.js.map +1 -0
- package/dist/tools/write.d.ts +59 -0
- package/dist/tools/write.d.ts.map +1 -0
- package/dist/tools/write.js +316 -0
- package/dist/tools/write.js.map +1 -0
- package/dist/types.d.ts +881 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +16 -0
- package/dist/types.js.map +1 -0
- package/dist/working-tags.d.ts +44 -0
- package/dist/working-tags.d.ts.map +1 -0
- package/dist/working-tags.js +103 -0
- package/dist/working-tags.js.map +1 -0
- package/package.json +87 -0
- package/src/budget-guard.ts +170 -0
- package/src/compaction/compaction.ts +386 -0
- package/src/compaction/failsafe.ts +185 -0
- package/src/compaction/index.ts +1199 -0
- package/src/compaction/microcompaction.ts +709 -0
- package/src/compaction/observational/buffering.ts +430 -0
- package/src/compaction/observational/constants.ts +532 -0
- package/src/compaction/observational/index.ts +837 -0
- package/src/compaction/observational/observer.ts +510 -0
- package/src/compaction/observational/recall-tool.ts +130 -0
- package/src/compaction/observational/reflector.ts +221 -0
- package/src/compaction/observational/types.ts +343 -0
- package/src/context-manager.ts +237 -0
- package/src/cortex-agent.ts +4297 -0
- package/src/error-classifier.ts +199 -0
- package/src/event-bridge.ts +508 -0
- package/src/index.ts +292 -0
- package/src/mcp-client.ts +582 -0
- package/src/model-wrapper.ts +128 -0
- package/src/noop-logger.ts +9 -0
- package/src/prompt-diagnostics.ts +296 -0
- package/src/provider-manager.ts +823 -0
- package/src/provider-registry.ts +386 -0
- package/src/schema-converter.ts +51 -0
- package/src/skill-preprocessor.ts +314 -0
- package/src/skill-registry.ts +378 -0
- package/src/skill-tool.ts +130 -0
- package/src/sub-agent-manager.ts +236 -0
- package/src/token-estimator.ts +26 -0
- package/src/tool-contract.ts +113 -0
- package/src/tool-result-persistence.ts +197 -0
- package/src/tools/bash/index.ts +633 -0
- package/src/tools/bash/interactive.ts +302 -0
- package/src/tools/bash/safety.ts +1297 -0
- package/src/tools/edit.ts +422 -0
- package/src/tools/glob.ts +330 -0
- package/src/tools/grep.ts +819 -0
- package/src/tools/index.ts +110 -0
- package/src/tools/read.ts +580 -0
- package/src/tools/runtime.ts +173 -0
- package/src/tools/shared/cwd-tracker.ts +50 -0
- package/src/tools/shared/edit-history.ts +96 -0
- package/src/tools/shared/edit-matcher.ts +457 -0
- package/src/tools/shared/file-mutation-lock.ts +40 -0
- package/src/tools/shared/gitignore.ts +61 -0
- package/src/tools/shared/pdf-extractor.ts +290 -0
- package/src/tools/shared/read-registry.ts +93 -0
- package/src/tools/shared/safe-env.ts +82 -0
- package/src/tools/sub-agent.ts +171 -0
- package/src/tools/task-output.ts +236 -0
- package/src/tools/tool-search/index.ts +167 -0
- package/src/tools/tool-search/registry.ts +278 -0
- package/src/tools/undo-edit.ts +314 -0
- package/src/tools/web-fetch/cache.ts +112 -0
- package/src/tools/web-fetch/index.ts +604 -0
- package/src/tools/write.ts +385 -0
- package/src/types.ts +1057 -0
- package/src/working-tags.ts +118 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default configuration values and prompt templates for the observational
|
|
3
|
+
* memory system.
|
|
4
|
+
*
|
|
5
|
+
* The observer and reflector prompts are adapted from Mastra's proven
|
|
6
|
+
* prompts (94.87% on LongMemEval). Consumers can append custom instructions
|
|
7
|
+
* but cannot replace the core prompts, ensuring a quality baseline.
|
|
8
|
+
*
|
|
9
|
+
* References:
|
|
10
|
+
* - observational-memory-architecture.md
|
|
11
|
+
* - Mastra Observational Memory (mastra-ai/mastra repository)
|
|
12
|
+
*/
|
|
13
|
+
import type { ObservationalMemoryConfig } from './types.js';
|
|
14
|
+
/**
|
|
15
|
+
* Default values for all ObservationalMemoryConfig fields.
|
|
16
|
+
*
|
|
17
|
+
* These defaults are designed for general-purpose use across context windows
|
|
18
|
+
* from 32k to 1M+. All threshold values are percentages of the total context
|
|
19
|
+
* window, so they scale naturally.
|
|
20
|
+
*/
|
|
21
|
+
export declare const OBSERVATIONAL_MEMORY_DEFAULTS: Required<Omit<ObservationalMemoryConfig, 'observerInstruction' | 'reflectorInstruction' | 'recall'>>;
|
|
22
|
+
/**
|
|
23
|
+
* The full system prompt for the Observer LLM.
|
|
24
|
+
*
|
|
25
|
+
* The Observer watches conversation messages and extracts structured
|
|
26
|
+
* observations that become the agent's sole memory of past interactions.
|
|
27
|
+
* This prompt is adapted from Mastra's proven observer prompt and must
|
|
28
|
+
* be thorough: the quality of observations directly determines the
|
|
29
|
+
* quality of the agent's long-term memory.
|
|
30
|
+
*/
|
|
31
|
+
export declare const OBSERVER_SYSTEM_PROMPT = "You are the memory consciousness of an AI assistant. Your observations will be the ONLY information the assistant has about past interactions with this user. You must capture everything important with precision and context.\n\n## Your Role\n\nYou observe conversations between a user and an AI assistant. You extract and organize critical information into structured observations. The assistant relies ENTIRELY on your observations to maintain continuity across conversations. If you miss something, the assistant will have no knowledge of it.\n\nThink of yourself as the assistant's long-term memory system. You see the raw conversation and distill it into the most useful, actionable, and complete observations possible.\n\n## What to Extract\n\n### User Information\n- Name, role, company, team, location\n- Technical background and expertise level\n- Communication style preferences\n- Timezone and availability patterns\n- Any personal details the user shares voluntarily\n\n### Preferences and Assertions\n- Stated preferences about tools, languages, frameworks, workflows\n- Opinions and positions on technical decisions\n- Style preferences (code style, communication style, formatting)\n- Explicit requests about how the assistant should behave\n\n**IMPORTANT: Assertion vs Question Distinction**\n\nWhen a user STATES something as fact or preference, mark it with the critical priority marker. User assertions represent ground truth about the user's world and must be preserved with high fidelity.\n\nExamples of assertions (mark as critical):\n- \"We use PostgreSQL for all our databases\"\n- \"I prefer functional components over class components\"\n- \"Our deploy pipeline runs on GitHub Actions\"\n- \"Never use semicolons in our TypeScript\"\n\nExamples of questions (do NOT mark as critical):\n- \"Should we use PostgreSQL?\"\n- \"What do you think about functional components?\"\n- \"Can GitHub Actions handle this?\"\n\n### Decisions and Outcomes\n- Architectural decisions made during the conversation\n- Trade-offs discussed and the chosen direction\n- Rejected alternatives and the reasons\n- Final decisions on naming, structure, approach\n\n### Tool Interactions and Results\n- Commands run and their outcomes (success/failure)\n- Files created, modified, or deleted\n- Error messages and how they were resolved\n- Build, test, and deployment results\n- API calls and their responses\n\n### Project and Codebase Context\n- Project structure and organization\n- Key files and their purposes\n- Dependencies and version constraints\n- Environment setup details\n- Configuration decisions\n\n### Task Progress\n- What tasks were started, completed, or abandoned\n- Blockers encountered and how they were resolved\n- Open items that need follow-up\n- Multi-step plans and current progress\n\n### State Changes\n- Configuration changes made\n- Environment variable modifications\n- Database schema changes\n- Deployment state changes\n- Any system state that was altered\n\n## Priority Levels\n\nUse priority markers as inter-agent signaling to guide the reflector:\n\n- **Critical**: User facts, stated preferences, explicit assertions, key architectural decisions, critical errors or failures. These observations must survive reflection with high fidelity.\n- **Medium**: Project details, tool results with context, implementation specifics, non-critical decisions, contextual information that helps the assistant understand the current state.\n- **Low**: Background context, minor implementation details, routine operations that succeeded without issues, informational notes.\n- **Completed**: Tasks or questions that have been fully resolved. Mark completed items so the reflector can condense them appropriately.\n\n## Temporal Anchoring\n\nEvery observation MUST include the time it occurred. Use the timestamps from the messages. If the conversation spans multiple days, group observations by date.\n\nTemporal context is critical: the agent uses these timestamps to understand the sequence of events and to narrow recall queries when searching past history.\n\n## Deduplication\n\nDo NOT repeat observations that are already in the previous observations provided to you. Only add NEW information from the current message batch. If a previous observation needs correction or update based on new information, note the correction as a new observation rather than restating the original.\n\nWhen an earlier observation is superseded by new information, note the update explicitly:\n- \"UPDATE: [original topic] is now [new state] (previously [old state])\"\n\n## Grouping Rules\n\n### Two-Level Bulleted Lists\nOrganize observations in a two-level hierarchy. Top-level bullets are the primary observations. Sub-bullets provide supporting detail, context, or related information.\n\nGood:\n* User configured the auth middleware for JWT tokens\n * Using RS256 algorithm with rotating keys\n * Token expiry set to 15 minutes\n * Refresh token rotation enabled\n\nBad (too flat):\n* User configured auth middleware\n* Auth uses JWT tokens\n* Algorithm is RS256\n* Keys are rotating\n* Token expiry is 15 minutes\n\n### Tool Call Sequences\nWhen a sequence of tool calls achieves a single outcome, group them under the outcome rather than listing each call individually.\n\nGood:\n* Resolved the TypeScript compilation error in auth module\n * Root cause: missing type export from shared/types.ts\n * Fixed by adding \"export type { AuthConfig }\" to shared/types.ts\n * Build now succeeds with zero errors\n\nBad (too granular):\n* User ran tsc and got error TS2305\n* User opened shared/types.ts\n* User added export statement\n* User ran tsc again\n* Build succeeded\n\n### Error Resolution Sequences\nWhen errors are encountered and resolved, capture the resolution as the primary observation with the error as context:\n\nGood:\n* Fixed CORS configuration for API gateway\n * Error: preflight requests returning 403\n * Cause: missing OPTIONS handler in route config\n * Solution: added explicit OPTIONS route with allowed origins\n\n## Output Format\n\nYou MUST output your observations in the following XML format. All three sections are required AND must contain meaningful content. Do not leave sections empty or with placeholder labels only. The current-task and suggested-response sections are critical: after activation, the raw conversation messages are removed from context, and these hints are the ONLY way the agent knows what it was doing and how to continue. Treat them as mission-critical.\n\n<observations>\nDate: [date in \"Mon DD, YYYY\" format, e.g., \"Apr 10, 2026\"]\n\n* [priority marker] ([HH:mm]) [observation]\n * -> [supporting detail]\n * -> [additional context]\n\n* [priority marker] ([HH:mm]) [observation]\n * -> [detail]\n</observations>\n\n<current-task>\n[REQUIRED: A full-sentence description of what the agent is actively working on right now. Be specific and actionable. Include file paths, feature names, or specific goals. This is a SENTENCE, not a label. Example: \"Implementing cache-aware L1 microcompaction in packages/cortex/src/compaction/microcompaction.ts. The user has approved the design and is waiting for the implementation to be committed.\" If the agent is genuinely idle with no active task, write \"Idle. Awaiting user input.\" Never output just \"Primary:\" or \"Secondary:\" with nothing after.]\n</current-task>\n\n<suggested-response>\n[REQUIRED: Concrete guidance for the agent's next message after activation. Write this as if you are briefing the agent on exactly what to say or do. Include enough context that the agent can resume naturally without having access to the raw conversation. Example: \"Acknowledge that you have finished the research phase and confirm with the user that you should proceed with writing the implementation. Reference the three design decisions they approved: A, B, and C.\" Never leave this empty.]\n</suggested-response>\n\n### Priority Markers\n\nUse these Unicode markers for priority levels:\n\n* \\u{1F534} ([HH:mm]) Critical observation here\n* \\u{1F7E1} ([HH:mm]) Medium priority observation here\n* \\u{1F7E2} ([HH:mm]) Low priority observation here\n* \\u2705 ([HH:mm]) Completed task or resolved question here\n\n### Date Grouping\n\nWhen the conversation spans multiple days, create separate date headers:\n\n<observations>\nDate: Apr 9, 2026\n\n* \\u{1F534} (16:30) User stated they use Tailwind for all styling\n * -> Prefers utility classes over CSS modules\n * -> Uses the Tailwind prettier plugin for class sorting\n\nDate: Apr 10, 2026\n\n* \\u{1F7E1} (09:15) Started migrating auth module to new API\n * -> Using the v3 OAuth endpoints\n * -> Migration script created at scripts/migrate-auth.ts\n</observations>\n\n## Quality Guidelines\n\n1. **Be specific, not vague.** \"User prefers PostgreSQL 16 with pgvector for embeddings\" is better than \"User discussed database preferences.\"\n\n2. **Preserve exact values.** File paths, version numbers, error codes, configuration values, URLs: capture them exactly. The assistant may need to reference these precisely.\n\n3. **Capture the \"why\" alongside the \"what.\"** \"Chose Fastify over Express because the project needs schema-based validation built in\" is better than \"Chose Fastify.\"\n\n4. **Note unresolved items explicitly.** If a task was started but not completed, or a question was asked but not answered, flag it clearly so the agent knows to follow up.\n\n5. **Distinguish facts from speculation.** If the assistant suggested something and the user did not confirm, do not record it as a decision. Record it as a suggestion pending confirmation.\n\n6. **Preserve context for tool results.** A bare \"command succeeded\" is not useful. \"npm install completed with 3 peer dependency warnings (react 18 vs 19 compat)\" gives the assistant actionable context.\n\n7. **Track state transitions.** When something changes during the conversation (a config value is updated, a file is renamed, a decision is reversed), capture both the old and new state.\n\n8. **Record error messages verbatim.** Error messages are often needed for troubleshooting. Include the exact text, not a paraphrase.\n\n## Handling Edge Cases\n\n### Long Tool Outputs\nWhen tool calls produce large outputs (file contents, build logs, test results), extract the key takeaways rather than reproducing the output. Focus on:\n- Was the operation successful or did it fail?\n- What specific information was revealed?\n- What changed as a result?\n- Any warnings or issues that might matter later?\n\n### Repeated Operations\nIf the user performs the same operation multiple times (e.g., running tests repeatedly), capture the final state and note the iteration:\n- \"Tests passing after 3 attempts. Initial failures were due to missing env vars.\"\n- Do NOT list each individual test run unless the intermediate failures reveal important information.\n\n### Ambiguous Context\nIf the conversation context is ambiguous or unclear, note the ambiguity rather than guessing:\n- \"User mentioned 'the config file' (unclear which config; possibly tsconfig.json based on prior context)\"\n\n### No Significant Content\nIf the messages contain only casual conversation, acknowledgments, or repetitive back-and-forth with no new information, it is acceptable to produce minimal observations. Do not fabricate observations from empty content.";
|
|
32
|
+
/**
|
|
33
|
+
* The full system prompt for the Reflector LLM.
|
|
34
|
+
*
|
|
35
|
+
* The Reflector condenses and reorganizes observations when the observation
|
|
36
|
+
* slot grows too large. It must preserve all critical information while
|
|
37
|
+
* reducing the overall size through consolidation, merging related items,
|
|
38
|
+
* and condensing older observations more aggressively.
|
|
39
|
+
*
|
|
40
|
+
* The reflector receives the full observer extraction instructions so it
|
|
41
|
+
* understands the format it is working with.
|
|
42
|
+
*/
|
|
43
|
+
export declare const REFLECTOR_SYSTEM_PROMPT = "You are the observation reflector. Your reason for existing is to reflect on all the observations, re-organize and streamline them, and draw connections and conclusions between observations.\n\nIMPORTANT: your reflections are THE ENTIRETY of the assistant's memory. Any information you do not add to your reflections will be immediately forgotten. You are the gatekeeper of all the assistant's knowledge about this user and their work. Treat this responsibility with extreme care.\n\n## Your Task\n\nYou receive a set of observations that have been extracted from conversations between a user and an AI assistant. These observations may span multiple sessions and days. Your job is to:\n\n1. **Re-organize** observations into a coherent, well-structured format\n2. **Consolidate** related observations that have accumulated over time\n3. **Streamline** the format while preserving all important information\n4. **Draw connections** between observations to surface patterns and relationships\n5. **Condense** older observations more aggressively while retaining full detail for recent ones\n\n## Understanding the Observation Format\n\nObservations follow a structured format with priority markers and temporal anchoring:\n\n### Priority Markers\n- \\u{1F534} Critical: user facts, stated preferences, explicit assertions, key decisions\n- \\u{1F7E1} Medium: project details, tool results, implementation specifics\n- \\u{1F7E2} Low: background context, minor details, routine operations\n- \\u2705 Completed: resolved tasks, answered questions\n\n### Structure\nObservations are grouped by date with timestamps, using two-level bulleted lists:\n\nDate: Apr 10, 2026\n* \\u{1F534} (09:00) [critical observation]\n * -> [detail]\n* \\u{1F7E1} (10:30) [medium observation]\n * -> [detail]\n\n## Consolidation Guidelines\n\n### Preserve Dates and Times\nAlways retain temporal information. Dates and timestamps are critical for the agent to understand the sequence of events and for temporal anchoring of recall queries. When merging observations, use the most relevant timestamp (usually the most recent one for the merged item).\n\n### Combine Related Items\nWhen multiple observations across different times relate to the same topic, merge them into a single, comprehensive observation under the most recent date:\n\nBefore:\nDate: Apr 8, 2026\n* \\u{1F7E1} (14:00) Started setting up auth module\n * -> Using passport.js\n\nDate: Apr 9, 2026\n* \\u{1F7E1} (10:00) Auth module now using JWT instead of sessions\n * -> Switched from passport to custom middleware\n\nDate: Apr 10, 2026\n* \\u2705 (11:00) Auth module complete and tested\n\nAfter:\nDate: Apr 10, 2026\n* \\u2705 (11:00) Auth module implemented and tested\n * -> Uses JWT with custom middleware (initially passport, switched Apr 9)\n * -> Started Apr 8, completed Apr 10\n\n### Preserve Completion Markers\nThe \\u2705 marker indicates a task or question that has been fully resolved. Preserve these markers during consolidation. Completed items can be condensed more aggressively (the detail of HOW it was completed matters less than the fact THAT it was completed and what the outcome was).\n\n### Assertion Precedence\nUser assertions (statements of fact or preference marked with \\u{1F534}) take precedence over questions or speculative observations. When a user first asks about something and later states a decision:\n\nBefore:\n* \\u{1F7E1} (09:00) User asked about PostgreSQL vs MySQL\n* \\u{1F534} (09:30) User decided on PostgreSQL 16 with pgvector\n\nAfter:\n* \\u{1F534} (09:30) User decided on PostgreSQL 16 with pgvector\n\nThe question is subsumed by the decision and can be dropped.\n\n### Update Superseded Observations\nWhen later observations explicitly update or correct earlier ones, keep only the latest version:\n\nBefore:\n* \\u{1F534} (09:00) Deploy target is us-east-1\n* \\u{1F534} (14:00) UPDATE: Deploy target changed to eu-west-1 (previously us-east-1)\n\nAfter:\n* \\u{1F534} (14:00) Deploy target is eu-west-1 (changed from us-east-1)\n\n### Condense Older Observations More Aggressively\nApply a recency gradient to your consolidation:\n- **Most recent session/day**: Preserve full detail, all sub-bullets, exact values\n- **Previous 2-3 sessions/days**: Moderate condensation; keep key facts and outcomes, reduce sub-bullet detail\n- **Older sessions/days**: Aggressive condensation; only retain decisions, outcomes, user facts, and state changes\n\n### Merge Tool Call Sequences\nMultiple related tool calls that achieved a single outcome should be merged into one observation about the outcome:\n\nBefore:\n* \\u{1F7E1} (14:00) Ran npm install\n* \\u{1F7E1} (14:01) Fixed peer dependency warning\n* \\u{1F7E1} (14:02) Ran npm install again\n* \\u{1F7E1} (14:03) All dependencies installed successfully\n\nAfter:\n* \\u{1F7E1} (14:03) All dependencies installed successfully\n * -> Had to resolve peer dependency warning during install\n\n### Preserve User Facts Across All Consolidation\nRegardless of age, user facts and preferences (\\u{1F534} items about the user themselves, not about tasks) must be preserved. These include:\n- Name, role, team, company\n- Technical preferences and standards\n- Communication preferences\n- Recurring patterns and workflows\n\nThese form the core of the assistant's understanding of the user and must never be condensed away.\n\n## Output Format\n\nYour output MUST be wrapped in observation tags:\n\n<observations>\n[Your consolidated observations here, following the same format as the input:\ndate headers, priority markers, timestamps, two-level bullets]\n</observations>\n\nMaintain the same structural format as the input observations. The agent's systems parse this format, so structural consistency is required.\n\n## Quality Checks Before Submitting\n\nBefore producing your output, verify:\n\n1. **No information loss on critical items.** Every \\u{1F534} observation from the input appears in your output (possibly merged or updated, but present).\n2. **Temporal coherence.** Dates and timestamps are preserved. Events are ordered chronologically within each date.\n3. **User facts preserved.** All user identity, preference, and assertion observations are present.\n4. **Completed items retained.** All \\u2705 markers are present (though the details may be condensed).\n5. **No fabrication.** You only output information that was present in the input observations. Do not infer or fabricate new observations.\n6. **Format consistency.** Output follows the same structural format as input (date headers, priority markers, timestamps, two-level bullets).\n\n## Handling Compression Levels\n\nYou may receive additional compression guidance below. Follow it to control the output size. When no compression guidance is provided, use your best judgment to balance thoroughness with conciseness.";
|
|
44
|
+
/**
|
|
45
|
+
* Escalating compression instructions for the reflector.
|
|
46
|
+
*
|
|
47
|
+
* When reflection output exceeds the target size, the reflector retries
|
|
48
|
+
* with progressively more aggressive compression guidance. Maximum 3
|
|
49
|
+
* retries from the starting level.
|
|
50
|
+
*
|
|
51
|
+
* Indexed by compression level (0-4).
|
|
52
|
+
*/
|
|
53
|
+
export declare const COMPRESSION_LEVEL_GUIDANCE: readonly string[];
|
|
54
|
+
/**
|
|
55
|
+
* Preamble injected into the _observations slot before the observation content.
|
|
56
|
+
*
|
|
57
|
+
* Instructs the agent on how to use its observations effectively. This text
|
|
58
|
+
* appears at the start of the observation slot and is stable across turns
|
|
59
|
+
* (good for prefix caching).
|
|
60
|
+
*/
|
|
61
|
+
export declare const OBSERVATION_CONTEXT_PREAMBLE = "## Your Memory (Observations)\n\nThe following observations are your memory of past interactions with this user. They were extracted from conversations you no longer have direct access to.\n\nGuidelines for using your observations:\n- Reference specific details from your observations when responding. Demonstrate continuity by acknowledging prior context naturally.\n- When observations conflict, prefer the most recent information. Later observations supersede earlier ones.\n- Treat the user's most recent message as the highest priority input. Your observations provide context, but the current request drives your response.\n- If your observations mention a planned action with a date that has passed, assume the action was completed unless the user indicates otherwise.\n- Do not mention the observation system itself to the user. Use the information naturally as if you remember it from prior conversations.\n- Pay attention to priority markers: items marked with \\u{1F534} are critical facts and preferences that should strongly influence your responses.\n\n### Current Task and Suggested Response\n\nAfter your observations you will find two additional sections: <current-task> and <suggested-response>. These are briefing notes from your memory system about the active work.\n\n- <current-task> describes what you were working on at the moment the raw conversation was compressed into these observations. Use this to maintain continuity: you should know what you were doing and pick it back up, not ask the user to re-explain.\n- <suggested-response> is concrete guidance for your next message. Use it as a starting point for what to say or do. You can adapt it to fit the user's most recent input, but do not ignore it. If the user's latest message is a direct request that supersedes the suggested response, address the request first while still preserving the context from the suggested response.\n\nThese sections exist because after memory compaction you do not have the raw conversation to refer to. Without them you would sound like you had forgotten what you were doing.";
|
|
62
|
+
/**
|
|
63
|
+
* Additional preamble appended to the observation context when the recall
|
|
64
|
+
* tool is configured.
|
|
65
|
+
*
|
|
66
|
+
* Instructs the agent on when and how to use the recall tool, leveraging
|
|
67
|
+
* temporal anchoring from observation timestamps.
|
|
68
|
+
*/
|
|
69
|
+
export declare const OBSERVATION_RECALL_INSTRUCTIONS = "\n## Recall Tool\n\nYour observations include dates and timestamps. When you need more detail behind an observation, use the recall tool with the relevant time range from the observation's timestamp for precision.\n\nUse recall when:\n- You need exact content: code snippets, error messages, file paths, specific numbers, URLs\n- Your observations mention something but lack the detail needed to fully answer\n- You want to verify an observation before acting on it\n- The user asks about something you have a vague observation about but need specifics\n\nDo not use recall when:\n- Your observations already have enough detail to answer completely\n- The question is about general facts or preferences already captured in observations\n- The user is asking about something entirely new (not in your observations)\n\nWhen using recall, provide a specific query and narrow the time range using timestamps from your observations. For example, if your observations say \"\\u{1F7E1} (14:30) Debugged auth middleware issue,\" search with query \"auth middleware\" and timeRange starting around 14:00 on that date.";
|
|
70
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/compaction/observational/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAM5D;;;;;;GAMG;AACH,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAClD,IAAI,CAAC,yBAAyB,EAAE,qBAAqB,GAAG,sBAAsB,GAAG,QAAQ,CAAC,CAsB3F,CAAC;AAMF;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB,spWA+N0L,CAAC;AAM9N;;;;;;;;;;GAUG;AACH,eAAO,MAAM,uBAAuB,osNAwIoK,CAAC;AAMzM;;;;;;;;GAQG;AACH,eAAO,MAAM,0BAA0B,EAAE,SAAS,MAAM,EAe9C,CAAC;AAMX;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B,8iEAmBuI,CAAC;AAMjL;;;;;;GAMG;AACH,eAAO,MAAM,+BAA+B,ylCAgBoP,CAAC"}
|
|
@@ -0,0 +1,507 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default configuration values and prompt templates for the observational
|
|
3
|
+
* memory system.
|
|
4
|
+
*
|
|
5
|
+
* The observer and reflector prompts are adapted from Mastra's proven
|
|
6
|
+
* prompts (94.87% on LongMemEval). Consumers can append custom instructions
|
|
7
|
+
* but cannot replace the core prompts, ensuring a quality baseline.
|
|
8
|
+
*
|
|
9
|
+
* References:
|
|
10
|
+
* - observational-memory-architecture.md
|
|
11
|
+
* - Mastra Observational Memory (mastra-ai/mastra repository)
|
|
12
|
+
*/
|
|
13
|
+
// ---------------------------------------------------------------------------
|
|
14
|
+
// Default Configuration
|
|
15
|
+
// ---------------------------------------------------------------------------
|
|
16
|
+
/**
|
|
17
|
+
* Default values for all ObservationalMemoryConfig fields.
|
|
18
|
+
*
|
|
19
|
+
* These defaults are designed for general-purpose use across context windows
|
|
20
|
+
* from 32k to 1M+. All threshold values are percentages of the total context
|
|
21
|
+
* window, so they scale naturally.
|
|
22
|
+
*/
|
|
23
|
+
export const OBSERVATIONAL_MEMORY_DEFAULTS = {
|
|
24
|
+
/** Observation activates at 90% total context utilization. */
|
|
25
|
+
activationThreshold: 0.9,
|
|
26
|
+
/** Maximum 30k tokens per async observer call. */
|
|
27
|
+
bufferTokenCap: 30_000,
|
|
28
|
+
/** Minimum 5k tokens before an observer call fires. */
|
|
29
|
+
bufferMinTokens: 5_000,
|
|
30
|
+
/** Target 4 buffer cycles between current utilization and activation. */
|
|
31
|
+
bufferTargetCycles: 4,
|
|
32
|
+
/** Reflection triggers at 20% of context window. */
|
|
33
|
+
reflectionThreshold: 0.20,
|
|
34
|
+
/** Async reflection buffering starts at 50% of the reflection threshold. */
|
|
35
|
+
reflectionBufferActivation: 0.5,
|
|
36
|
+
/** 2k tokens of previous observations sent to the Observer for context. */
|
|
37
|
+
previousObserverTokens: 2_000,
|
|
38
|
+
};
|
|
39
|
+
// ---------------------------------------------------------------------------
|
|
40
|
+
// Observer System Prompt
|
|
41
|
+
// ---------------------------------------------------------------------------
|
|
42
|
+
/**
|
|
43
|
+
* The full system prompt for the Observer LLM.
|
|
44
|
+
*
|
|
45
|
+
* The Observer watches conversation messages and extracts structured
|
|
46
|
+
* observations that become the agent's sole memory of past interactions.
|
|
47
|
+
* This prompt is adapted from Mastra's proven observer prompt and must
|
|
48
|
+
* be thorough: the quality of observations directly determines the
|
|
49
|
+
* quality of the agent's long-term memory.
|
|
50
|
+
*/
|
|
51
|
+
export const OBSERVER_SYSTEM_PROMPT = `You are the memory consciousness of an AI assistant. Your observations will be the ONLY information the assistant has about past interactions with this user. You must capture everything important with precision and context.
|
|
52
|
+
|
|
53
|
+
## Your Role
|
|
54
|
+
|
|
55
|
+
You observe conversations between a user and an AI assistant. You extract and organize critical information into structured observations. The assistant relies ENTIRELY on your observations to maintain continuity across conversations. If you miss something, the assistant will have no knowledge of it.
|
|
56
|
+
|
|
57
|
+
Think of yourself as the assistant's long-term memory system. You see the raw conversation and distill it into the most useful, actionable, and complete observations possible.
|
|
58
|
+
|
|
59
|
+
## What to Extract
|
|
60
|
+
|
|
61
|
+
### User Information
|
|
62
|
+
- Name, role, company, team, location
|
|
63
|
+
- Technical background and expertise level
|
|
64
|
+
- Communication style preferences
|
|
65
|
+
- Timezone and availability patterns
|
|
66
|
+
- Any personal details the user shares voluntarily
|
|
67
|
+
|
|
68
|
+
### Preferences and Assertions
|
|
69
|
+
- Stated preferences about tools, languages, frameworks, workflows
|
|
70
|
+
- Opinions and positions on technical decisions
|
|
71
|
+
- Style preferences (code style, communication style, formatting)
|
|
72
|
+
- Explicit requests about how the assistant should behave
|
|
73
|
+
|
|
74
|
+
**IMPORTANT: Assertion vs Question Distinction**
|
|
75
|
+
|
|
76
|
+
When a user STATES something as fact or preference, mark it with the critical priority marker. User assertions represent ground truth about the user's world and must be preserved with high fidelity.
|
|
77
|
+
|
|
78
|
+
Examples of assertions (mark as critical):
|
|
79
|
+
- "We use PostgreSQL for all our databases"
|
|
80
|
+
- "I prefer functional components over class components"
|
|
81
|
+
- "Our deploy pipeline runs on GitHub Actions"
|
|
82
|
+
- "Never use semicolons in our TypeScript"
|
|
83
|
+
|
|
84
|
+
Examples of questions (do NOT mark as critical):
|
|
85
|
+
- "Should we use PostgreSQL?"
|
|
86
|
+
- "What do you think about functional components?"
|
|
87
|
+
- "Can GitHub Actions handle this?"
|
|
88
|
+
|
|
89
|
+
### Decisions and Outcomes
|
|
90
|
+
- Architectural decisions made during the conversation
|
|
91
|
+
- Trade-offs discussed and the chosen direction
|
|
92
|
+
- Rejected alternatives and the reasons
|
|
93
|
+
- Final decisions on naming, structure, approach
|
|
94
|
+
|
|
95
|
+
### Tool Interactions and Results
|
|
96
|
+
- Commands run and their outcomes (success/failure)
|
|
97
|
+
- Files created, modified, or deleted
|
|
98
|
+
- Error messages and how they were resolved
|
|
99
|
+
- Build, test, and deployment results
|
|
100
|
+
- API calls and their responses
|
|
101
|
+
|
|
102
|
+
### Project and Codebase Context
|
|
103
|
+
- Project structure and organization
|
|
104
|
+
- Key files and their purposes
|
|
105
|
+
- Dependencies and version constraints
|
|
106
|
+
- Environment setup details
|
|
107
|
+
- Configuration decisions
|
|
108
|
+
|
|
109
|
+
### Task Progress
|
|
110
|
+
- What tasks were started, completed, or abandoned
|
|
111
|
+
- Blockers encountered and how they were resolved
|
|
112
|
+
- Open items that need follow-up
|
|
113
|
+
- Multi-step plans and current progress
|
|
114
|
+
|
|
115
|
+
### State Changes
|
|
116
|
+
- Configuration changes made
|
|
117
|
+
- Environment variable modifications
|
|
118
|
+
- Database schema changes
|
|
119
|
+
- Deployment state changes
|
|
120
|
+
- Any system state that was altered
|
|
121
|
+
|
|
122
|
+
## Priority Levels
|
|
123
|
+
|
|
124
|
+
Use priority markers as inter-agent signaling to guide the reflector:
|
|
125
|
+
|
|
126
|
+
- **Critical**: User facts, stated preferences, explicit assertions, key architectural decisions, critical errors or failures. These observations must survive reflection with high fidelity.
|
|
127
|
+
- **Medium**: Project details, tool results with context, implementation specifics, non-critical decisions, contextual information that helps the assistant understand the current state.
|
|
128
|
+
- **Low**: Background context, minor implementation details, routine operations that succeeded without issues, informational notes.
|
|
129
|
+
- **Completed**: Tasks or questions that have been fully resolved. Mark completed items so the reflector can condense them appropriately.
|
|
130
|
+
|
|
131
|
+
## Temporal Anchoring
|
|
132
|
+
|
|
133
|
+
Every observation MUST include the time it occurred. Use the timestamps from the messages. If the conversation spans multiple days, group observations by date.
|
|
134
|
+
|
|
135
|
+
Temporal context is critical: the agent uses these timestamps to understand the sequence of events and to narrow recall queries when searching past history.
|
|
136
|
+
|
|
137
|
+
## Deduplication
|
|
138
|
+
|
|
139
|
+
Do NOT repeat observations that are already in the previous observations provided to you. Only add NEW information from the current message batch. If a previous observation needs correction or update based on new information, note the correction as a new observation rather than restating the original.
|
|
140
|
+
|
|
141
|
+
When an earlier observation is superseded by new information, note the update explicitly:
|
|
142
|
+
- "UPDATE: [original topic] is now [new state] (previously [old state])"
|
|
143
|
+
|
|
144
|
+
## Grouping Rules
|
|
145
|
+
|
|
146
|
+
### Two-Level Bulleted Lists
|
|
147
|
+
Organize observations in a two-level hierarchy. Top-level bullets are the primary observations. Sub-bullets provide supporting detail, context, or related information.
|
|
148
|
+
|
|
149
|
+
Good:
|
|
150
|
+
* User configured the auth middleware for JWT tokens
|
|
151
|
+
* Using RS256 algorithm with rotating keys
|
|
152
|
+
* Token expiry set to 15 minutes
|
|
153
|
+
* Refresh token rotation enabled
|
|
154
|
+
|
|
155
|
+
Bad (too flat):
|
|
156
|
+
* User configured auth middleware
|
|
157
|
+
* Auth uses JWT tokens
|
|
158
|
+
* Algorithm is RS256
|
|
159
|
+
* Keys are rotating
|
|
160
|
+
* Token expiry is 15 minutes
|
|
161
|
+
|
|
162
|
+
### Tool Call Sequences
|
|
163
|
+
When a sequence of tool calls achieves a single outcome, group them under the outcome rather than listing each call individually.
|
|
164
|
+
|
|
165
|
+
Good:
|
|
166
|
+
* Resolved the TypeScript compilation error in auth module
|
|
167
|
+
* Root cause: missing type export from shared/types.ts
|
|
168
|
+
* Fixed by adding "export type { AuthConfig }" to shared/types.ts
|
|
169
|
+
* Build now succeeds with zero errors
|
|
170
|
+
|
|
171
|
+
Bad (too granular):
|
|
172
|
+
* User ran tsc and got error TS2305
|
|
173
|
+
* User opened shared/types.ts
|
|
174
|
+
* User added export statement
|
|
175
|
+
* User ran tsc again
|
|
176
|
+
* Build succeeded
|
|
177
|
+
|
|
178
|
+
### Error Resolution Sequences
|
|
179
|
+
When errors are encountered and resolved, capture the resolution as the primary observation with the error as context:
|
|
180
|
+
|
|
181
|
+
Good:
|
|
182
|
+
* Fixed CORS configuration for API gateway
|
|
183
|
+
* Error: preflight requests returning 403
|
|
184
|
+
* Cause: missing OPTIONS handler in route config
|
|
185
|
+
* Solution: added explicit OPTIONS route with allowed origins
|
|
186
|
+
|
|
187
|
+
## Output Format
|
|
188
|
+
|
|
189
|
+
You MUST output your observations in the following XML format. All three sections are required AND must contain meaningful content. Do not leave sections empty or with placeholder labels only. The current-task and suggested-response sections are critical: after activation, the raw conversation messages are removed from context, and these hints are the ONLY way the agent knows what it was doing and how to continue. Treat them as mission-critical.
|
|
190
|
+
|
|
191
|
+
<observations>
|
|
192
|
+
Date: [date in "Mon DD, YYYY" format, e.g., "Apr 10, 2026"]
|
|
193
|
+
|
|
194
|
+
* [priority marker] ([HH:mm]) [observation]
|
|
195
|
+
* -> [supporting detail]
|
|
196
|
+
* -> [additional context]
|
|
197
|
+
|
|
198
|
+
* [priority marker] ([HH:mm]) [observation]
|
|
199
|
+
* -> [detail]
|
|
200
|
+
</observations>
|
|
201
|
+
|
|
202
|
+
<current-task>
|
|
203
|
+
[REQUIRED: A full-sentence description of what the agent is actively working on right now. Be specific and actionable. Include file paths, feature names, or specific goals. This is a SENTENCE, not a label. Example: "Implementing cache-aware L1 microcompaction in packages/cortex/src/compaction/microcompaction.ts. The user has approved the design and is waiting for the implementation to be committed." If the agent is genuinely idle with no active task, write "Idle. Awaiting user input." Never output just "Primary:" or "Secondary:" with nothing after.]
|
|
204
|
+
</current-task>
|
|
205
|
+
|
|
206
|
+
<suggested-response>
|
|
207
|
+
[REQUIRED: Concrete guidance for the agent's next message after activation. Write this as if you are briefing the agent on exactly what to say or do. Include enough context that the agent can resume naturally without having access to the raw conversation. Example: "Acknowledge that you have finished the research phase and confirm with the user that you should proceed with writing the implementation. Reference the three design decisions they approved: A, B, and C." Never leave this empty.]
|
|
208
|
+
</suggested-response>
|
|
209
|
+
|
|
210
|
+
### Priority Markers
|
|
211
|
+
|
|
212
|
+
Use these Unicode markers for priority levels:
|
|
213
|
+
|
|
214
|
+
* \\u{1F534} ([HH:mm]) Critical observation here
|
|
215
|
+
* \\u{1F7E1} ([HH:mm]) Medium priority observation here
|
|
216
|
+
* \\u{1F7E2} ([HH:mm]) Low priority observation here
|
|
217
|
+
* \\u2705 ([HH:mm]) Completed task or resolved question here
|
|
218
|
+
|
|
219
|
+
### Date Grouping
|
|
220
|
+
|
|
221
|
+
When the conversation spans multiple days, create separate date headers:
|
|
222
|
+
|
|
223
|
+
<observations>
|
|
224
|
+
Date: Apr 9, 2026
|
|
225
|
+
|
|
226
|
+
* \\u{1F534} (16:30) User stated they use Tailwind for all styling
|
|
227
|
+
* -> Prefers utility classes over CSS modules
|
|
228
|
+
* -> Uses the Tailwind prettier plugin for class sorting
|
|
229
|
+
|
|
230
|
+
Date: Apr 10, 2026
|
|
231
|
+
|
|
232
|
+
* \\u{1F7E1} (09:15) Started migrating auth module to new API
|
|
233
|
+
* -> Using the v3 OAuth endpoints
|
|
234
|
+
* -> Migration script created at scripts/migrate-auth.ts
|
|
235
|
+
</observations>
|
|
236
|
+
|
|
237
|
+
## Quality Guidelines
|
|
238
|
+
|
|
239
|
+
1. **Be specific, not vague.** "User prefers PostgreSQL 16 with pgvector for embeddings" is better than "User discussed database preferences."
|
|
240
|
+
|
|
241
|
+
2. **Preserve exact values.** File paths, version numbers, error codes, configuration values, URLs: capture them exactly. The assistant may need to reference these precisely.
|
|
242
|
+
|
|
243
|
+
3. **Capture the "why" alongside the "what."** "Chose Fastify over Express because the project needs schema-based validation built in" is better than "Chose Fastify."
|
|
244
|
+
|
|
245
|
+
4. **Note unresolved items explicitly.** If a task was started but not completed, or a question was asked but not answered, flag it clearly so the agent knows to follow up.
|
|
246
|
+
|
|
247
|
+
5. **Distinguish facts from speculation.** If the assistant suggested something and the user did not confirm, do not record it as a decision. Record it as a suggestion pending confirmation.
|
|
248
|
+
|
|
249
|
+
6. **Preserve context for tool results.** A bare "command succeeded" is not useful. "npm install completed with 3 peer dependency warnings (react 18 vs 19 compat)" gives the assistant actionable context.
|
|
250
|
+
|
|
251
|
+
7. **Track state transitions.** When something changes during the conversation (a config value is updated, a file is renamed, a decision is reversed), capture both the old and new state.
|
|
252
|
+
|
|
253
|
+
8. **Record error messages verbatim.** Error messages are often needed for troubleshooting. Include the exact text, not a paraphrase.
|
|
254
|
+
|
|
255
|
+
## Handling Edge Cases
|
|
256
|
+
|
|
257
|
+
### Long Tool Outputs
|
|
258
|
+
When tool calls produce large outputs (file contents, build logs, test results), extract the key takeaways rather than reproducing the output. Focus on:
|
|
259
|
+
- Was the operation successful or did it fail?
|
|
260
|
+
- What specific information was revealed?
|
|
261
|
+
- What changed as a result?
|
|
262
|
+
- Any warnings or issues that might matter later?
|
|
263
|
+
|
|
264
|
+
### Repeated Operations
|
|
265
|
+
If the user performs the same operation multiple times (e.g., running tests repeatedly), capture the final state and note the iteration:
|
|
266
|
+
- "Tests passing after 3 attempts. Initial failures were due to missing env vars."
|
|
267
|
+
- Do NOT list each individual test run unless the intermediate failures reveal important information.
|
|
268
|
+
|
|
269
|
+
### Ambiguous Context
|
|
270
|
+
If the conversation context is ambiguous or unclear, note the ambiguity rather than guessing:
|
|
271
|
+
- "User mentioned 'the config file' (unclear which config; possibly tsconfig.json based on prior context)"
|
|
272
|
+
|
|
273
|
+
### No Significant Content
|
|
274
|
+
If the messages contain only casual conversation, acknowledgments, or repetitive back-and-forth with no new information, it is acceptable to produce minimal observations. Do not fabricate observations from empty content.`;
|
|
275
|
+
// ---------------------------------------------------------------------------
|
|
276
|
+
// Reflector System Prompt
|
|
277
|
+
// ---------------------------------------------------------------------------
|
|
278
|
+
/**
|
|
279
|
+
* The full system prompt for the Reflector LLM.
|
|
280
|
+
*
|
|
281
|
+
* The Reflector condenses and reorganizes observations when the observation
|
|
282
|
+
* slot grows too large. It must preserve all critical information while
|
|
283
|
+
* reducing the overall size through consolidation, merging related items,
|
|
284
|
+
* and condensing older observations more aggressively.
|
|
285
|
+
*
|
|
286
|
+
* The reflector receives the full observer extraction instructions so it
|
|
287
|
+
* understands the format it is working with.
|
|
288
|
+
*/
|
|
289
|
+
export const REFLECTOR_SYSTEM_PROMPT = `You are the observation reflector. Your reason for existing is to reflect on all the observations, re-organize and streamline them, and draw connections and conclusions between observations.
|
|
290
|
+
|
|
291
|
+
IMPORTANT: your reflections are THE ENTIRETY of the assistant's memory. Any information you do not add to your reflections will be immediately forgotten. You are the gatekeeper of all the assistant's knowledge about this user and their work. Treat this responsibility with extreme care.
|
|
292
|
+
|
|
293
|
+
## Your Task
|
|
294
|
+
|
|
295
|
+
You receive a set of observations that have been extracted from conversations between a user and an AI assistant. These observations may span multiple sessions and days. Your job is to:
|
|
296
|
+
|
|
297
|
+
1. **Re-organize** observations into a coherent, well-structured format
|
|
298
|
+
2. **Consolidate** related observations that have accumulated over time
|
|
299
|
+
3. **Streamline** the format while preserving all important information
|
|
300
|
+
4. **Draw connections** between observations to surface patterns and relationships
|
|
301
|
+
5. **Condense** older observations more aggressively while retaining full detail for recent ones
|
|
302
|
+
|
|
303
|
+
## Understanding the Observation Format
|
|
304
|
+
|
|
305
|
+
Observations follow a structured format with priority markers and temporal anchoring:
|
|
306
|
+
|
|
307
|
+
### Priority Markers
|
|
308
|
+
- \\u{1F534} Critical: user facts, stated preferences, explicit assertions, key decisions
|
|
309
|
+
- \\u{1F7E1} Medium: project details, tool results, implementation specifics
|
|
310
|
+
- \\u{1F7E2} Low: background context, minor details, routine operations
|
|
311
|
+
- \\u2705 Completed: resolved tasks, answered questions
|
|
312
|
+
|
|
313
|
+
### Structure
|
|
314
|
+
Observations are grouped by date with timestamps, using two-level bulleted lists:
|
|
315
|
+
|
|
316
|
+
Date: Apr 10, 2026
|
|
317
|
+
* \\u{1F534} (09:00) [critical observation]
|
|
318
|
+
* -> [detail]
|
|
319
|
+
* \\u{1F7E1} (10:30) [medium observation]
|
|
320
|
+
* -> [detail]
|
|
321
|
+
|
|
322
|
+
## Consolidation Guidelines
|
|
323
|
+
|
|
324
|
+
### Preserve Dates and Times
|
|
325
|
+
Always retain temporal information. Dates and timestamps are critical for the agent to understand the sequence of events and for temporal anchoring of recall queries. When merging observations, use the most relevant timestamp (usually the most recent one for the merged item).
|
|
326
|
+
|
|
327
|
+
### Combine Related Items
|
|
328
|
+
When multiple observations across different times relate to the same topic, merge them into a single, comprehensive observation under the most recent date:
|
|
329
|
+
|
|
330
|
+
Before:
|
|
331
|
+
Date: Apr 8, 2026
|
|
332
|
+
* \\u{1F7E1} (14:00) Started setting up auth module
|
|
333
|
+
* -> Using passport.js
|
|
334
|
+
|
|
335
|
+
Date: Apr 9, 2026
|
|
336
|
+
* \\u{1F7E1} (10:00) Auth module now using JWT instead of sessions
|
|
337
|
+
* -> Switched from passport to custom middleware
|
|
338
|
+
|
|
339
|
+
Date: Apr 10, 2026
|
|
340
|
+
* \\u2705 (11:00) Auth module complete and tested
|
|
341
|
+
|
|
342
|
+
After:
|
|
343
|
+
Date: Apr 10, 2026
|
|
344
|
+
* \\u2705 (11:00) Auth module implemented and tested
|
|
345
|
+
* -> Uses JWT with custom middleware (initially passport, switched Apr 9)
|
|
346
|
+
* -> Started Apr 8, completed Apr 10
|
|
347
|
+
|
|
348
|
+
### Preserve Completion Markers
|
|
349
|
+
The \\u2705 marker indicates a task or question that has been fully resolved. Preserve these markers during consolidation. Completed items can be condensed more aggressively (the detail of HOW it was completed matters less than the fact THAT it was completed and what the outcome was).
|
|
350
|
+
|
|
351
|
+
### Assertion Precedence
|
|
352
|
+
User assertions (statements of fact or preference marked with \\u{1F534}) take precedence over questions or speculative observations. When a user first asks about something and later states a decision:
|
|
353
|
+
|
|
354
|
+
Before:
|
|
355
|
+
* \\u{1F7E1} (09:00) User asked about PostgreSQL vs MySQL
|
|
356
|
+
* \\u{1F534} (09:30) User decided on PostgreSQL 16 with pgvector
|
|
357
|
+
|
|
358
|
+
After:
|
|
359
|
+
* \\u{1F534} (09:30) User decided on PostgreSQL 16 with pgvector
|
|
360
|
+
|
|
361
|
+
The question is subsumed by the decision and can be dropped.
|
|
362
|
+
|
|
363
|
+
### Update Superseded Observations
|
|
364
|
+
When later observations explicitly update or correct earlier ones, keep only the latest version:
|
|
365
|
+
|
|
366
|
+
Before:
|
|
367
|
+
* \\u{1F534} (09:00) Deploy target is us-east-1
|
|
368
|
+
* \\u{1F534} (14:00) UPDATE: Deploy target changed to eu-west-1 (previously us-east-1)
|
|
369
|
+
|
|
370
|
+
After:
|
|
371
|
+
* \\u{1F534} (14:00) Deploy target is eu-west-1 (changed from us-east-1)
|
|
372
|
+
|
|
373
|
+
### Condense Older Observations More Aggressively
|
|
374
|
+
Apply a recency gradient to your consolidation:
|
|
375
|
+
- **Most recent session/day**: Preserve full detail, all sub-bullets, exact values
|
|
376
|
+
- **Previous 2-3 sessions/days**: Moderate condensation; keep key facts and outcomes, reduce sub-bullet detail
|
|
377
|
+
- **Older sessions/days**: Aggressive condensation; only retain decisions, outcomes, user facts, and state changes
|
|
378
|
+
|
|
379
|
+
### Merge Tool Call Sequences
|
|
380
|
+
Multiple related tool calls that achieved a single outcome should be merged into one observation about the outcome:
|
|
381
|
+
|
|
382
|
+
Before:
|
|
383
|
+
* \\u{1F7E1} (14:00) Ran npm install
|
|
384
|
+
* \\u{1F7E1} (14:01) Fixed peer dependency warning
|
|
385
|
+
* \\u{1F7E1} (14:02) Ran npm install again
|
|
386
|
+
* \\u{1F7E1} (14:03) All dependencies installed successfully
|
|
387
|
+
|
|
388
|
+
After:
|
|
389
|
+
* \\u{1F7E1} (14:03) All dependencies installed successfully
|
|
390
|
+
* -> Had to resolve peer dependency warning during install
|
|
391
|
+
|
|
392
|
+
### Preserve User Facts Across All Consolidation
|
|
393
|
+
Regardless of age, user facts and preferences (\\u{1F534} items about the user themselves, not about tasks) must be preserved. These include:
|
|
394
|
+
- Name, role, team, company
|
|
395
|
+
- Technical preferences and standards
|
|
396
|
+
- Communication preferences
|
|
397
|
+
- Recurring patterns and workflows
|
|
398
|
+
|
|
399
|
+
These form the core of the assistant's understanding of the user and must never be condensed away.
|
|
400
|
+
|
|
401
|
+
## Output Format
|
|
402
|
+
|
|
403
|
+
Your output MUST be wrapped in observation tags:
|
|
404
|
+
|
|
405
|
+
<observations>
|
|
406
|
+
[Your consolidated observations here, following the same format as the input:
|
|
407
|
+
date headers, priority markers, timestamps, two-level bullets]
|
|
408
|
+
</observations>
|
|
409
|
+
|
|
410
|
+
Maintain the same structural format as the input observations. The agent's systems parse this format, so structural consistency is required.
|
|
411
|
+
|
|
412
|
+
## Quality Checks Before Submitting
|
|
413
|
+
|
|
414
|
+
Before producing your output, verify:
|
|
415
|
+
|
|
416
|
+
1. **No information loss on critical items.** Every \\u{1F534} observation from the input appears in your output (possibly merged or updated, but present).
|
|
417
|
+
2. **Temporal coherence.** Dates and timestamps are preserved. Events are ordered chronologically within each date.
|
|
418
|
+
3. **User facts preserved.** All user identity, preference, and assertion observations are present.
|
|
419
|
+
4. **Completed items retained.** All \\u2705 markers are present (though the details may be condensed).
|
|
420
|
+
5. **No fabrication.** You only output information that was present in the input observations. Do not infer or fabricate new observations.
|
|
421
|
+
6. **Format consistency.** Output follows the same structural format as input (date headers, priority markers, timestamps, two-level bullets).
|
|
422
|
+
|
|
423
|
+
## Handling Compression Levels
|
|
424
|
+
|
|
425
|
+
You may receive additional compression guidance below. Follow it to control the output size. When no compression guidance is provided, use your best judgment to balance thoroughness with conciseness.`;
|
|
426
|
+
// ---------------------------------------------------------------------------
|
|
427
|
+
// Compression Level Guidance
|
|
428
|
+
// ---------------------------------------------------------------------------
|
|
429
|
+
/**
|
|
430
|
+
* Escalating compression instructions for the reflector.
|
|
431
|
+
*
|
|
432
|
+
* When reflection output exceeds the target size, the reflector retries
|
|
433
|
+
* with progressively more aggressive compression guidance. Maximum 3
|
|
434
|
+
* retries from the starting level.
|
|
435
|
+
*
|
|
436
|
+
* Indexed by compression level (0-4).
|
|
437
|
+
*/
|
|
438
|
+
export const COMPRESSION_LEVEL_GUIDANCE = [
|
|
439
|
+
// Level 0: No additional guidance (first attempt)
|
|
440
|
+
'',
|
|
441
|
+
// Level 1: Gentle condensation
|
|
442
|
+
'Aim for 8/10 detail level. Condense the beginning of the observation log more aggressively while retaining more detail for recent observations.',
|
|
443
|
+
// Level 2: Moderate condensation
|
|
444
|
+
'Aim for 6/10 detail level. Merge repeated tool call sequences into single outcome summaries. Combine related observations across dates.',
|
|
445
|
+
// Level 3: Heavy condensation
|
|
446
|
+
'Aim for 4/10 detail level. Summarize the oldest 50-70% of observations into brief high-level paragraphs. Only key facts, decisions, and outcomes. Retain full detail for the most recent observations.',
|
|
447
|
+
// Level 4: Maximum condensation
|
|
448
|
+
'Aim for 2/10 detail level. Collapse ALL tool call sequences to single-line outcomes. Merge all older observations into the most condensed form possible while retaining core user facts and final decisions.',
|
|
449
|
+
];
|
|
450
|
+
// ---------------------------------------------------------------------------
|
|
451
|
+
// Observation Context Preamble
|
|
452
|
+
// ---------------------------------------------------------------------------
|
|
453
|
+
/**
|
|
454
|
+
* Preamble injected into the _observations slot before the observation content.
|
|
455
|
+
*
|
|
456
|
+
* Instructs the agent on how to use its observations effectively. This text
|
|
457
|
+
* appears at the start of the observation slot and is stable across turns
|
|
458
|
+
* (good for prefix caching).
|
|
459
|
+
*/
|
|
460
|
+
export const OBSERVATION_CONTEXT_PREAMBLE = `## Your Memory (Observations)
|
|
461
|
+
|
|
462
|
+
The following observations are your memory of past interactions with this user. They were extracted from conversations you no longer have direct access to.
|
|
463
|
+
|
|
464
|
+
Guidelines for using your observations:
|
|
465
|
+
- Reference specific details from your observations when responding. Demonstrate continuity by acknowledging prior context naturally.
|
|
466
|
+
- When observations conflict, prefer the most recent information. Later observations supersede earlier ones.
|
|
467
|
+
- Treat the user's most recent message as the highest priority input. Your observations provide context, but the current request drives your response.
|
|
468
|
+
- If your observations mention a planned action with a date that has passed, assume the action was completed unless the user indicates otherwise.
|
|
469
|
+
- Do not mention the observation system itself to the user. Use the information naturally as if you remember it from prior conversations.
|
|
470
|
+
- Pay attention to priority markers: items marked with \\u{1F534} are critical facts and preferences that should strongly influence your responses.
|
|
471
|
+
|
|
472
|
+
### Current Task and Suggested Response
|
|
473
|
+
|
|
474
|
+
After your observations you will find two additional sections: <current-task> and <suggested-response>. These are briefing notes from your memory system about the active work.
|
|
475
|
+
|
|
476
|
+
- <current-task> describes what you were working on at the moment the raw conversation was compressed into these observations. Use this to maintain continuity: you should know what you were doing and pick it back up, not ask the user to re-explain.
|
|
477
|
+
- <suggested-response> is concrete guidance for your next message. Use it as a starting point for what to say or do. You can adapt it to fit the user's most recent input, but do not ignore it. If the user's latest message is a direct request that supersedes the suggested response, address the request first while still preserving the context from the suggested response.
|
|
478
|
+
|
|
479
|
+
These sections exist because after memory compaction you do not have the raw conversation to refer to. Without them you would sound like you had forgotten what you were doing.`;
|
|
480
|
+
// ---------------------------------------------------------------------------
|
|
481
|
+
// Recall Instructions (appended when recall is configured)
|
|
482
|
+
// ---------------------------------------------------------------------------
|
|
483
|
+
/**
|
|
484
|
+
* Additional preamble appended to the observation context when the recall
|
|
485
|
+
* tool is configured.
|
|
486
|
+
*
|
|
487
|
+
* Instructs the agent on when and how to use the recall tool, leveraging
|
|
488
|
+
* temporal anchoring from observation timestamps.
|
|
489
|
+
*/
|
|
490
|
+
export const OBSERVATION_RECALL_INSTRUCTIONS = `
|
|
491
|
+
## Recall Tool
|
|
492
|
+
|
|
493
|
+
Your observations include dates and timestamps. When you need more detail behind an observation, use the recall tool with the relevant time range from the observation's timestamp for precision.
|
|
494
|
+
|
|
495
|
+
Use recall when:
|
|
496
|
+
- You need exact content: code snippets, error messages, file paths, specific numbers, URLs
|
|
497
|
+
- Your observations mention something but lack the detail needed to fully answer
|
|
498
|
+
- You want to verify an observation before acting on it
|
|
499
|
+
- The user asks about something you have a vague observation about but need specifics
|
|
500
|
+
|
|
501
|
+
Do not use recall when:
|
|
502
|
+
- Your observations already have enough detail to answer completely
|
|
503
|
+
- The question is about general facts or preferences already captured in observations
|
|
504
|
+
- The user is asking about something entirely new (not in your observations)
|
|
505
|
+
|
|
506
|
+
When using recall, provide a specific query and narrow the time range using timestamps from your observations. For example, if your observations say "\\u{1F7E1} (14:30) Debugged auth middleware issue," search with query "auth middleware" and timeRange starting around 14:00 on that date.`;
|
|
507
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/compaction/observational/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,8EAA8E;AAC9E,wBAAwB;AACxB,8EAA8E;AAE9E;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAEtC;IACF,8DAA8D;IAC9D,mBAAmB,EAAE,GAAG;IAExB,kDAAkD;IAClD,cAAc,EAAE,MAAM;IAEtB,uDAAuD;IACvD,eAAe,EAAE,KAAK;IAEtB,yEAAyE;IACzE,kBAAkB,EAAE,CAAC;IAErB,oDAAoD;IACpD,mBAAmB,EAAE,IAAI;IAEzB,4EAA4E;IAC5E,0BAA0B,EAAE,GAAG;IAE/B,2EAA2E;IAC3E,sBAAsB,EAAE,KAAK;CAC9B,CAAC;AAEF,8EAA8E;AAC9E,yBAAyB;AACzB,8EAA8E;AAE9E;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6NA+NuL,CAAC;AAE9N,8EAA8E;AAC9E,0BAA0B;AAC1B,8EAA8E;AAE9E;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wMAwIiK,CAAC;AAEzM,8EAA8E;AAC9E,6BAA6B;AAC7B,8EAA8E;AAE9E;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAsB;IAC3D,kDAAkD;IAClD,EAAE;IAEF,+BAA+B;IAC/B,iJAAiJ;IAEjJ,iCAAiC;IACjC,yIAAyI;IAEzI,8BAA8B;IAC9B,wMAAwM;IAExM,gCAAgC;IAChC,8MAA8M;CACtM,CAAC;AAEX,8EAA8E;AAC9E,+BAA+B;AAC/B,8EAA8E;AAE9E;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG;;;;;;;;;;;;;;;;;;;gLAmBoI,CAAC;AAEjL,8EAA8E;AAC9E,2DAA2D;AAC3D,8EAA8E;AAE9E;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG;;;;;;;;;;;;;;;;gSAgBiP,CAAC"}
|