@framers/agentos 0.1.101 → 0.1.102

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.
Files changed (176) hide show
  1. package/README.md +16 -0
  2. package/dist/memory/config.d.ts +39 -0
  3. package/dist/memory/config.d.ts.map +1 -1
  4. package/dist/memory/config.js.map +1 -1
  5. package/dist/memory/consolidation/ConsolidationLoop.d.ts +177 -0
  6. package/dist/memory/consolidation/ConsolidationLoop.d.ts.map +1 -0
  7. package/dist/memory/consolidation/ConsolidationLoop.js +517 -0
  8. package/dist/memory/consolidation/ConsolidationLoop.js.map +1 -0
  9. package/dist/memory/consolidation/ConsolidationPipeline.d.ts.map +1 -1
  10. package/dist/memory/consolidation/ConsolidationPipeline.js +7 -0
  11. package/dist/memory/consolidation/ConsolidationPipeline.js.map +1 -1
  12. package/dist/memory/consolidation/index.d.ts +8 -0
  13. package/dist/memory/consolidation/index.d.ts.map +1 -0
  14. package/dist/memory/consolidation/index.js +7 -0
  15. package/dist/memory/consolidation/index.js.map +1 -0
  16. package/dist/memory/decay/DecayModel.d.ts +33 -0
  17. package/dist/memory/decay/DecayModel.d.ts.map +1 -1
  18. package/dist/memory/decay/DecayModel.js +31 -0
  19. package/dist/memory/decay/DecayModel.js.map +1 -1
  20. package/dist/memory/facade/Memory.d.ts +228 -0
  21. package/dist/memory/facade/Memory.d.ts.map +1 -0
  22. package/dist/memory/facade/Memory.js +823 -0
  23. package/dist/memory/facade/Memory.js.map +1 -0
  24. package/dist/memory/facade/index.d.ts +13 -0
  25. package/dist/memory/facade/index.d.ts.map +1 -0
  26. package/dist/memory/facade/index.js +11 -0
  27. package/dist/memory/facade/index.js.map +1 -0
  28. package/dist/memory/facade/types.d.ts +606 -0
  29. package/dist/memory/facade/types.d.ts.map +1 -0
  30. package/dist/memory/facade/types.js +11 -0
  31. package/dist/memory/facade/types.js.map +1 -0
  32. package/dist/memory/feedback/RetrievalFeedbackSignal.d.ts +132 -0
  33. package/dist/memory/feedback/RetrievalFeedbackSignal.d.ts.map +1 -0
  34. package/dist/memory/feedback/RetrievalFeedbackSignal.js +178 -0
  35. package/dist/memory/feedback/RetrievalFeedbackSignal.js.map +1 -0
  36. package/dist/memory/feedback/index.d.ts +13 -0
  37. package/dist/memory/feedback/index.d.ts.map +1 -0
  38. package/dist/memory/feedback/index.js +12 -0
  39. package/dist/memory/feedback/index.js.map +1 -0
  40. package/dist/memory/index.d.ts +22 -0
  41. package/dist/memory/index.d.ts.map +1 -1
  42. package/dist/memory/index.js +24 -0
  43. package/dist/memory/index.js.map +1 -1
  44. package/dist/memory/ingestion/ChunkingEngine.d.ts +143 -0
  45. package/dist/memory/ingestion/ChunkingEngine.d.ts.map +1 -0
  46. package/dist/memory/ingestion/ChunkingEngine.js +508 -0
  47. package/dist/memory/ingestion/ChunkingEngine.js.map +1 -0
  48. package/dist/memory/ingestion/DoclingLoader.d.ts +44 -0
  49. package/dist/memory/ingestion/DoclingLoader.d.ts.map +1 -0
  50. package/dist/memory/ingestion/DoclingLoader.js +228 -0
  51. package/dist/memory/ingestion/DoclingLoader.js.map +1 -0
  52. package/dist/memory/ingestion/DocxLoader.d.ts +37 -0
  53. package/dist/memory/ingestion/DocxLoader.d.ts.map +1 -0
  54. package/dist/memory/ingestion/DocxLoader.js +111 -0
  55. package/dist/memory/ingestion/DocxLoader.js.map +1 -0
  56. package/dist/memory/ingestion/FolderScanner.d.ts +116 -0
  57. package/dist/memory/ingestion/FolderScanner.d.ts.map +1 -0
  58. package/dist/memory/ingestion/FolderScanner.js +127 -0
  59. package/dist/memory/ingestion/FolderScanner.js.map +1 -0
  60. package/dist/memory/ingestion/HtmlLoader.d.ts +49 -0
  61. package/dist/memory/ingestion/HtmlLoader.d.ts.map +1 -0
  62. package/dist/memory/ingestion/HtmlLoader.js +202 -0
  63. package/dist/memory/ingestion/HtmlLoader.js.map +1 -0
  64. package/dist/memory/ingestion/IDocumentLoader.d.ts +63 -0
  65. package/dist/memory/ingestion/IDocumentLoader.d.ts.map +1 -0
  66. package/dist/memory/ingestion/IDocumentLoader.js +11 -0
  67. package/dist/memory/ingestion/IDocumentLoader.js.map +1 -0
  68. package/dist/memory/ingestion/LoaderRegistry.d.ts +140 -0
  69. package/dist/memory/ingestion/LoaderRegistry.d.ts.map +1 -0
  70. package/dist/memory/ingestion/LoaderRegistry.js +229 -0
  71. package/dist/memory/ingestion/LoaderRegistry.js.map +1 -0
  72. package/dist/memory/ingestion/MarkdownLoader.d.ts +50 -0
  73. package/dist/memory/ingestion/MarkdownLoader.d.ts.map +1 -0
  74. package/dist/memory/ingestion/MarkdownLoader.js +169 -0
  75. package/dist/memory/ingestion/MarkdownLoader.js.map +1 -0
  76. package/dist/memory/ingestion/MultimodalAggregator.d.ts +88 -0
  77. package/dist/memory/ingestion/MultimodalAggregator.d.ts.map +1 -0
  78. package/dist/memory/ingestion/MultimodalAggregator.js +96 -0
  79. package/dist/memory/ingestion/MultimodalAggregator.js.map +1 -0
  80. package/dist/memory/ingestion/OcrPdfLoader.d.ts +41 -0
  81. package/dist/memory/ingestion/OcrPdfLoader.d.ts.map +1 -0
  82. package/dist/memory/ingestion/OcrPdfLoader.js +149 -0
  83. package/dist/memory/ingestion/OcrPdfLoader.js.map +1 -0
  84. package/dist/memory/ingestion/PdfLoader.d.ts +78 -0
  85. package/dist/memory/ingestion/PdfLoader.d.ts.map +1 -0
  86. package/dist/memory/ingestion/PdfLoader.js +179 -0
  87. package/dist/memory/ingestion/PdfLoader.js.map +1 -0
  88. package/dist/memory/ingestion/TextLoader.d.ts +66 -0
  89. package/dist/memory/ingestion/TextLoader.d.ts.map +1 -0
  90. package/dist/memory/ingestion/TextLoader.js +207 -0
  91. package/dist/memory/ingestion/TextLoader.js.map +1 -0
  92. package/dist/memory/ingestion/UrlLoader.d.ts +95 -0
  93. package/dist/memory/ingestion/UrlLoader.d.ts.map +1 -0
  94. package/dist/memory/ingestion/UrlLoader.js +174 -0
  95. package/dist/memory/ingestion/UrlLoader.js.map +1 -0
  96. package/dist/memory/io/ChatGptImporter.d.ts +85 -0
  97. package/dist/memory/io/ChatGptImporter.d.ts.map +1 -0
  98. package/dist/memory/io/ChatGptImporter.js +231 -0
  99. package/dist/memory/io/ChatGptImporter.js.map +1 -0
  100. package/dist/memory/io/JsonExporter.d.ts +67 -0
  101. package/dist/memory/io/JsonExporter.d.ts.map +1 -0
  102. package/dist/memory/io/JsonExporter.js +132 -0
  103. package/dist/memory/io/JsonExporter.js.map +1 -0
  104. package/dist/memory/io/JsonImporter.d.ts +84 -0
  105. package/dist/memory/io/JsonImporter.d.ts.map +1 -0
  106. package/dist/memory/io/JsonImporter.js +234 -0
  107. package/dist/memory/io/JsonImporter.js.map +1 -0
  108. package/dist/memory/io/MarkdownExporter.d.ts +95 -0
  109. package/dist/memory/io/MarkdownExporter.d.ts.map +1 -0
  110. package/dist/memory/io/MarkdownExporter.js +130 -0
  111. package/dist/memory/io/MarkdownExporter.js.map +1 -0
  112. package/dist/memory/io/MarkdownImporter.d.ts +84 -0
  113. package/dist/memory/io/MarkdownImporter.d.ts.map +1 -0
  114. package/dist/memory/io/MarkdownImporter.js +166 -0
  115. package/dist/memory/io/MarkdownImporter.js.map +1 -0
  116. package/dist/memory/io/ObsidianExporter.d.ts +80 -0
  117. package/dist/memory/io/ObsidianExporter.d.ts.map +1 -0
  118. package/dist/memory/io/ObsidianExporter.js +127 -0
  119. package/dist/memory/io/ObsidianExporter.js.map +1 -0
  120. package/dist/memory/io/ObsidianImporter.d.ts +93 -0
  121. package/dist/memory/io/ObsidianImporter.d.ts.map +1 -0
  122. package/dist/memory/io/ObsidianImporter.js +221 -0
  123. package/dist/memory/io/ObsidianImporter.js.map +1 -0
  124. package/dist/memory/io/SqliteExporter.d.ts +47 -0
  125. package/dist/memory/io/SqliteExporter.d.ts.map +1 -0
  126. package/dist/memory/io/SqliteExporter.js +56 -0
  127. package/dist/memory/io/SqliteExporter.js.map +1 -0
  128. package/dist/memory/io/SqliteImporter.d.ts +82 -0
  129. package/dist/memory/io/SqliteImporter.d.ts.map +1 -0
  130. package/dist/memory/io/SqliteImporter.js +232 -0
  131. package/dist/memory/io/SqliteImporter.js.map +1 -0
  132. package/dist/memory/io/index.d.ts +31 -0
  133. package/dist/memory/io/index.d.ts.map +1 -0
  134. package/dist/memory/io/index.js +31 -0
  135. package/dist/memory/io/index.js.map +1 -0
  136. package/dist/memory/store/SqliteBrain.d.ts +125 -0
  137. package/dist/memory/store/SqliteBrain.d.ts.map +1 -0
  138. package/dist/memory/store/SqliteBrain.js +407 -0
  139. package/dist/memory/store/SqliteBrain.js.map +1 -0
  140. package/dist/memory/store/SqliteKnowledgeGraph.d.ts +259 -0
  141. package/dist/memory/store/SqliteKnowledgeGraph.d.ts.map +1 -0
  142. package/dist/memory/store/SqliteKnowledgeGraph.js +1062 -0
  143. package/dist/memory/store/SqliteKnowledgeGraph.js.map +1 -0
  144. package/dist/memory/store/SqliteMemoryGraph.d.ts +251 -0
  145. package/dist/memory/store/SqliteMemoryGraph.d.ts.map +1 -0
  146. package/dist/memory/store/SqliteMemoryGraph.js +637 -0
  147. package/dist/memory/store/SqliteMemoryGraph.js.map +1 -0
  148. package/dist/memory/tools/MemoryAddTool.d.ts +98 -0
  149. package/dist/memory/tools/MemoryAddTool.d.ts.map +1 -0
  150. package/dist/memory/tools/MemoryAddTool.js +131 -0
  151. package/dist/memory/tools/MemoryAddTool.js.map +1 -0
  152. package/dist/memory/tools/MemoryDeleteTool.d.ts +83 -0
  153. package/dist/memory/tools/MemoryDeleteTool.d.ts.map +1 -0
  154. package/dist/memory/tools/MemoryDeleteTool.js +96 -0
  155. package/dist/memory/tools/MemoryDeleteTool.js.map +1 -0
  156. package/dist/memory/tools/MemoryMergeTool.d.ts +95 -0
  157. package/dist/memory/tools/MemoryMergeTool.d.ts.map +1 -0
  158. package/dist/memory/tools/MemoryMergeTool.js +164 -0
  159. package/dist/memory/tools/MemoryMergeTool.js.map +1 -0
  160. package/dist/memory/tools/MemoryReflectTool.d.ts +86 -0
  161. package/dist/memory/tools/MemoryReflectTool.d.ts.map +1 -0
  162. package/dist/memory/tools/MemoryReflectTool.js +102 -0
  163. package/dist/memory/tools/MemoryReflectTool.js.map +1 -0
  164. package/dist/memory/tools/MemorySearchTool.d.ts +117 -0
  165. package/dist/memory/tools/MemorySearchTool.d.ts.map +1 -0
  166. package/dist/memory/tools/MemorySearchTool.js +162 -0
  167. package/dist/memory/tools/MemorySearchTool.js.map +1 -0
  168. package/dist/memory/tools/MemoryUpdateTool.d.ts +92 -0
  169. package/dist/memory/tools/MemoryUpdateTool.d.ts.map +1 -0
  170. package/dist/memory/tools/MemoryUpdateTool.js +125 -0
  171. package/dist/memory/tools/MemoryUpdateTool.js.map +1 -0
  172. package/dist/memory/tools/index.d.ts +32 -0
  173. package/dist/memory/tools/index.d.ts.map +1 -0
  174. package/dist/memory/tools/index.js +26 -0
  175. package/dist/memory/tools/index.js.map +1 -0
  176. package/package.json +6 -1
@@ -0,0 +1,98 @@
1
+ /**
2
+ * @fileoverview MemoryAddTool — lets an agent store a new memory trace.
3
+ *
4
+ * The agent calls this tool to remember important facts, decisions, or
5
+ * observations. Each invocation inserts a fresh row into `memory_traces`
6
+ * with strength 1.0 (full encoding strength at creation time).
7
+ *
8
+ * ID format: `mt_<timestamp>_<counter>` — monotonically increasing within a
9
+ * process, collision-safe across typical agent interaction rates.
10
+ *
11
+ * @module memory/tools/MemoryAddTool
12
+ */
13
+ import type { ITool, ToolExecutionResult, ToolExecutionContext, JSONSchemaObject } from '../../core/tools/ITool.js';
14
+ import type { SqliteBrain } from '../store/SqliteBrain.js';
15
+ /**
16
+ * Input arguments for {@link MemoryAddTool}.
17
+ *
18
+ * @property content - The text content of the memory to store.
19
+ * @property type - Tulving memory type (episodic, semantic, procedural, prospective). Defaults to 'episodic'.
20
+ * @property scope - Visibility scope (thread, user, persona, organization). Defaults to 'user'.
21
+ * @property tags - Optional array of free-form tag strings for filtering.
22
+ */
23
+ export interface MemoryAddInput extends Record<string, any> {
24
+ content: string;
25
+ type?: string;
26
+ scope?: string;
27
+ tags?: string[];
28
+ }
29
+ /**
30
+ * Output returned by {@link MemoryAddTool} on success.
31
+ *
32
+ * @property traceId - The unique ID of the newly stored memory trace.
33
+ */
34
+ export interface MemoryAddOutput {
35
+ traceId: string;
36
+ }
37
+ /**
38
+ * ITool implementation that stores a new memory trace in the agent's
39
+ * SQLite brain database.
40
+ *
41
+ * **Usage:**
42
+ * ```ts
43
+ * const tool = new MemoryAddTool(brain);
44
+ * const result = await tool.execute(
45
+ * { content: 'User prefers dark mode.', tags: ['preference', 'ui'] },
46
+ * context,
47
+ * );
48
+ * // result.output.traceId → 'mt_1711234567890_0'
49
+ * ```
50
+ */
51
+ export declare class MemoryAddTool implements ITool<MemoryAddInput, MemoryAddOutput> {
52
+ private readonly brain;
53
+ /** Globally unique tool identifier. */
54
+ readonly id = "memory-add-v1";
55
+ /** LLM-facing tool name (snake_case, as the LLM will call it). */
56
+ readonly name = "memory_add";
57
+ /** Human-readable display name for UIs and logs. */
58
+ readonly displayName = "Add Memory";
59
+ /**
60
+ * Description shown to the LLM when deciding which tool to invoke.
61
+ * Must be comprehensive enough for the model to understand when to call this.
62
+ */
63
+ readonly description = "Store a new memory trace. The agent calls this to remember important facts, decisions, or observations.";
64
+ /** Logical category for discovery and grouping. */
65
+ readonly category = "memory";
66
+ /**
67
+ * This tool writes to the database.
68
+ * Callers may request confirmation before execution when `hasSideEffects = true`.
69
+ */
70
+ readonly hasSideEffects = true;
71
+ /**
72
+ * JSON schema for input validation and LLM tool-call construction.
73
+ * All optional fields default gracefully inside `execute()`.
74
+ */
75
+ readonly inputSchema: JSONSchemaObject;
76
+ /**
77
+ * @param brain - The agent's shared SQLite brain database connection.
78
+ */
79
+ constructor(brain: SqliteBrain);
80
+ /**
81
+ * Insert a new memory trace row into `memory_traces`.
82
+ *
83
+ * Defaults applied when optional fields are absent:
84
+ * - `type` → `'episodic'`
85
+ * - `scope` → `'user'`
86
+ * - `tags` → `[]`
87
+ *
88
+ * The trace is created with `strength = 1.0` (maximum encoding strength)
89
+ * and `deleted = 0` (active). No embedding is computed here — the background
90
+ * EmbeddingEncoder will embed it asynchronously.
91
+ *
92
+ * @param args - Memory add input (content, optional type/scope/tags).
93
+ * @param _context - Tool execution context (not used by this tool).
94
+ * @returns `{ traceId }` on success, or an error result.
95
+ */
96
+ execute(args: MemoryAddInput, _context: ToolExecutionContext): Promise<ToolExecutionResult<MemoryAddOutput>>;
97
+ }
98
+ //# sourceMappingURL=MemoryAddTool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MemoryAddTool.d.ts","sourceRoot":"","sources":["../../../src/memory/tools/MemoryAddTool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AACpH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAa3D;;;;;;;GAOG;AACH,MAAM,WAAW,cAAe,SAAQ,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IACzD,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAED;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;CACjB;AAMD;;;;;;;;;;;;;GAaG;AACH,qBAAa,aAAc,YAAW,KAAK,CAAC,cAAc,EAAE,eAAe,CAAC;IA2D9D,OAAO,CAAC,QAAQ,CAAC,KAAK;IA1DlC,uCAAuC;IACvC,QAAQ,CAAC,EAAE,mBAAmB;IAE9B,kEAAkE;IAClE,QAAQ,CAAC,IAAI,gBAAgB;IAE7B,oDAAoD;IACpD,QAAQ,CAAC,WAAW,gBAAgB;IAEpC;;;OAGG;IACH,QAAQ,CAAC,WAAW,6GACwF;IAE5G,mDAAmD;IACnD,QAAQ,CAAC,QAAQ,YAAY;IAE7B;;;OAGG;IACH,QAAQ,CAAC,cAAc,QAAQ;IAE/B;;;OAGG;IACH,QAAQ,CAAC,WAAW,EAAE,gBAAgB,CAwBpC;IAEF;;OAEG;gBAC0B,KAAK,EAAE,WAAW;IAM/C;;;;;;;;;;;;;;;OAeG;IACG,OAAO,CACX,IAAI,EAAE,cAAc,EACpB,QAAQ,EAAE,oBAAoB,GAC7B,OAAO,CAAC,mBAAmB,CAAC,eAAe,CAAC,CAAC;CA0BjD"}
@@ -0,0 +1,131 @@
1
+ /**
2
+ * @fileoverview MemoryAddTool — lets an agent store a new memory trace.
3
+ *
4
+ * The agent calls this tool to remember important facts, decisions, or
5
+ * observations. Each invocation inserts a fresh row into `memory_traces`
6
+ * with strength 1.0 (full encoding strength at creation time).
7
+ *
8
+ * ID format: `mt_<timestamp>_<counter>` — monotonically increasing within a
9
+ * process, collision-safe across typical agent interaction rates.
10
+ *
11
+ * @module memory/tools/MemoryAddTool
12
+ */
13
+ // ---------------------------------------------------------------------------
14
+ // Counter for unique ID generation within the process lifetime
15
+ // ---------------------------------------------------------------------------
16
+ /** Monotonic counter shared across all MemoryAddTool instances in the process. */
17
+ let _idCounter = 0;
18
+ // ---------------------------------------------------------------------------
19
+ // MemoryAddTool
20
+ // ---------------------------------------------------------------------------
21
+ /**
22
+ * ITool implementation that stores a new memory trace in the agent's
23
+ * SQLite brain database.
24
+ *
25
+ * **Usage:**
26
+ * ```ts
27
+ * const tool = new MemoryAddTool(brain);
28
+ * const result = await tool.execute(
29
+ * { content: 'User prefers dark mode.', tags: ['preference', 'ui'] },
30
+ * context,
31
+ * );
32
+ * // result.output.traceId → 'mt_1711234567890_0'
33
+ * ```
34
+ */
35
+ export class MemoryAddTool {
36
+ /**
37
+ * @param brain - The agent's shared SQLite brain database connection.
38
+ */
39
+ constructor(brain) {
40
+ this.brain = brain;
41
+ /** Globally unique tool identifier. */
42
+ this.id = 'memory-add-v1';
43
+ /** LLM-facing tool name (snake_case, as the LLM will call it). */
44
+ this.name = 'memory_add';
45
+ /** Human-readable display name for UIs and logs. */
46
+ this.displayName = 'Add Memory';
47
+ /**
48
+ * Description shown to the LLM when deciding which tool to invoke.
49
+ * Must be comprehensive enough for the model to understand when to call this.
50
+ */
51
+ this.description = 'Store a new memory trace. The agent calls this to remember important facts, decisions, or observations.';
52
+ /** Logical category for discovery and grouping. */
53
+ this.category = 'memory';
54
+ /**
55
+ * This tool writes to the database.
56
+ * Callers may request confirmation before execution when `hasSideEffects = true`.
57
+ */
58
+ this.hasSideEffects = true;
59
+ /**
60
+ * JSON schema for input validation and LLM tool-call construction.
61
+ * All optional fields default gracefully inside `execute()`.
62
+ */
63
+ this.inputSchema = {
64
+ type: 'object',
65
+ properties: {
66
+ content: {
67
+ type: 'string',
68
+ description: 'The text content of the memory to store.',
69
+ },
70
+ type: {
71
+ type: 'string',
72
+ enum: ['episodic', 'semantic', 'procedural', 'prospective'],
73
+ description: 'Tulving memory type. Defaults to "episodic".',
74
+ },
75
+ scope: {
76
+ type: 'string',
77
+ enum: ['thread', 'user', 'persona', 'organization'],
78
+ description: 'Visibility scope of the trace. Defaults to "user".',
79
+ },
80
+ tags: {
81
+ type: 'array',
82
+ items: { type: 'string' },
83
+ description: 'Optional free-form tags for filtering and retrieval.',
84
+ },
85
+ },
86
+ required: ['content'],
87
+ };
88
+ }
89
+ // ---------------------------------------------------------------------------
90
+ // execute
91
+ // ---------------------------------------------------------------------------
92
+ /**
93
+ * Insert a new memory trace row into `memory_traces`.
94
+ *
95
+ * Defaults applied when optional fields are absent:
96
+ * - `type` → `'episodic'`
97
+ * - `scope` → `'user'`
98
+ * - `tags` → `[]`
99
+ *
100
+ * The trace is created with `strength = 1.0` (maximum encoding strength)
101
+ * and `deleted = 0` (active). No embedding is computed here — the background
102
+ * EmbeddingEncoder will embed it asynchronously.
103
+ *
104
+ * @param args - Memory add input (content, optional type/scope/tags).
105
+ * @param _context - Tool execution context (not used by this tool).
106
+ * @returns `{ traceId }` on success, or an error result.
107
+ */
108
+ async execute(args, _context) {
109
+ try {
110
+ const now = Date.now();
111
+ const traceId = `mt_${now}_${_idCounter++}`;
112
+ const type = args.type ?? 'episodic';
113
+ const scope = args.scope ?? 'user';
114
+ const tags = JSON.stringify(args.tags ?? []);
115
+ this.brain.db
116
+ .prepare(`INSERT INTO memory_traces
117
+ (id, type, scope, content, embedding, strength, created_at,
118
+ last_accessed, retrieval_count, tags, emotions, metadata, deleted)
119
+ VALUES (?, ?, ?, ?, NULL, 1.0, ?, NULL, 0, ?, '{}', '{}', 0)`)
120
+ .run(traceId, type, scope, args.content, now, tags);
121
+ return { success: true, output: { traceId } };
122
+ }
123
+ catch (err) {
124
+ return {
125
+ success: false,
126
+ error: err instanceof Error ? err.message : String(err),
127
+ };
128
+ }
129
+ }
130
+ }
131
+ //# sourceMappingURL=MemoryAddTool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MemoryAddTool.js","sourceRoot":"","sources":["../../../src/memory/tools/MemoryAddTool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAKH,8EAA8E;AAC9E,+DAA+D;AAC/D,8EAA8E;AAE9E,kFAAkF;AAClF,IAAI,UAAU,GAAG,CAAC,CAAC;AA8BnB,8EAA8E;AAC9E,gBAAgB;AAChB,8EAA8E;AAE9E;;;;;;;;;;;;;GAaG;AACH,MAAM,OAAO,aAAa;IAwDxB;;OAEG;IACH,YAA6B,KAAkB;QAAlB,UAAK,GAAL,KAAK,CAAa;QA1D/C,uCAAuC;QAC9B,OAAE,GAAG,eAAe,CAAC;QAE9B,kEAAkE;QACzD,SAAI,GAAG,YAAY,CAAC;QAE7B,oDAAoD;QAC3C,gBAAW,GAAG,YAAY,CAAC;QAEpC;;;WAGG;QACM,gBAAW,GAClB,yGAAyG,CAAC;QAE5G,mDAAmD;QAC1C,aAAQ,GAAG,QAAQ,CAAC;QAE7B;;;WAGG;QACM,mBAAc,GAAG,IAAI,CAAC;QAE/B;;;WAGG;QACM,gBAAW,GAAqB;YACvC,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,OAAO,EAAE;oBACP,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,0CAA0C;iBACxD;gBACD,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,CAAC;oBAC3D,WAAW,EAAE,8CAA8C;iBAC5D;gBACD,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,cAAc,CAAC;oBACnD,WAAW,EAAE,oDAAoD;iBAClE;gBACD,IAAI,EAAE;oBACJ,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBACzB,WAAW,EAAE,sDAAsD;iBACpE;aACF;YACD,QAAQ,EAAE,CAAC,SAAS,CAAC;SACtB,CAAC;IAKgD,CAAC;IAEnD,8EAA8E;IAC9E,UAAU;IACV,8EAA8E;IAE9E;;;;;;;;;;;;;;;OAeG;IACH,KAAK,CAAC,OAAO,CACX,IAAoB,EACpB,QAA8B;QAE9B,IAAI,CAAC;YACH,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;YACvB,MAAM,OAAO,GAAG,MAAM,GAAG,IAAI,UAAU,EAAE,EAAE,CAAC;YAE5C,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,UAAU,CAAC;YACrC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,MAAM,CAAC;YACnC,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC;YAE7C,IAAI,CAAC,KAAK,CAAC,EAAE;iBACV,OAAO,CACN;;;wEAG8D,CAC/D;iBACA,GAAG,CAAC,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;YAEtD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,EAAE,CAAC;QAChD,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO;gBACL,OAAO,EAAE,KAAK;gBACd,KAAK,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;aACxD,CAAC;QACJ,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,83 @@
1
+ /**
2
+ * @fileoverview MemoryDeleteTool — lets an agent soft-delete a memory trace.
3
+ *
4
+ * Deletion is always a soft-delete: the row in `memory_traces` is kept intact
5
+ * but its `deleted` flag is set to `1`. This preserves the audit trail and
6
+ * allows the consolidation engine to later log or compact the removal.
7
+ *
8
+ * The optional `reason` argument is currently captured in the tool contract
9
+ * but not stored in the database; it is reserved for a future `deleted_reason`
10
+ * column when schema migration tooling is in place.
11
+ *
12
+ * @module memory/tools/MemoryDeleteTool
13
+ */
14
+ import type { ITool, ToolExecutionResult, ToolExecutionContext, JSONSchemaObject } from '../../core/tools/ITool.js';
15
+ import type { SqliteBrain } from '../store/SqliteBrain.js';
16
+ /**
17
+ * Input arguments for {@link MemoryDeleteTool}.
18
+ *
19
+ * @property traceId - ID of the trace to soft-delete.
20
+ * @property reason - Optional human-readable explanation for the deletion.
21
+ * Useful for agents to self-document their pruning decisions.
22
+ */
23
+ export interface MemoryDeleteInput extends Record<string, any> {
24
+ traceId: string;
25
+ reason?: string;
26
+ }
27
+ /**
28
+ * Output returned by {@link MemoryDeleteTool} on success.
29
+ *
30
+ * @property deleted - `true` if the trace was found and marked deleted.
31
+ * `false` if no active trace matched the given `traceId`.
32
+ */
33
+ export interface MemoryDeleteOutput {
34
+ deleted: boolean;
35
+ }
36
+ /**
37
+ * ITool implementation that soft-deletes a memory trace from the agent's
38
+ * SQLite brain database.
39
+ *
40
+ * **Usage:**
41
+ * ```ts
42
+ * const tool = new MemoryDeleteTool(brain);
43
+ * const result = await tool.execute(
44
+ * { traceId: 'mt_1711234567890_0', reason: 'Information is outdated.' },
45
+ * context,
46
+ * );
47
+ * // result.output.deleted → true
48
+ * ```
49
+ */
50
+ export declare class MemoryDeleteTool implements ITool<MemoryDeleteInput, MemoryDeleteOutput> {
51
+ private readonly brain;
52
+ /** Globally unique tool identifier. */
53
+ readonly id = "memory-delete-v1";
54
+ /** LLM-facing tool name. */
55
+ readonly name = "memory_delete";
56
+ /** Human-readable display name. */
57
+ readonly displayName = "Delete Memory";
58
+ /** LLM-facing description. */
59
+ readonly description: string;
60
+ /** Logical category for discovery and grouping. */
61
+ readonly category = "memory";
62
+ /** This tool writes to the database. */
63
+ readonly hasSideEffects = true;
64
+ /** JSON schema for input validation and LLM tool-call construction. */
65
+ readonly inputSchema: JSONSchemaObject;
66
+ /**
67
+ * @param brain - The agent's shared SQLite brain database connection.
68
+ */
69
+ constructor(brain: SqliteBrain);
70
+ /**
71
+ * Set `deleted = 1` on the memory trace matching `traceId`.
72
+ *
73
+ * The WHERE clause filters to `deleted = 0` so that attempting to
74
+ * delete an already-deleted trace returns `{ deleted: false }` rather
75
+ * than silently succeeding — this gives callers accurate feedback.
76
+ *
77
+ * @param args - Delete input (traceId, optional reason).
78
+ * @param _context - Tool execution context (not used by this tool).
79
+ * @returns `{ deleted }` status, or an error result.
80
+ */
81
+ execute(args: MemoryDeleteInput, _context: ToolExecutionContext): Promise<ToolExecutionResult<MemoryDeleteOutput>>;
82
+ }
83
+ //# sourceMappingURL=MemoryDeleteTool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MemoryDeleteTool.d.ts","sourceRoot":"","sources":["../../../src/memory/tools/MemoryDeleteTool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AACpH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAM3D;;;;;;GAMG;AACH,MAAM,WAAW,iBAAkB,SAAQ,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAC5D,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;GAKG;AACH,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,OAAO,CAAC;CAClB;AAMD;;;;;;;;;;;;;GAaG;AACH,qBAAa,gBAAiB,YAAW,KAAK,CAAC,iBAAiB,EAAE,kBAAkB,CAAC;IAyCvE,OAAO,CAAC,QAAQ,CAAC,KAAK;IAxClC,uCAAuC;IACvC,QAAQ,CAAC,EAAE,sBAAsB;IAEjC,4BAA4B;IAC5B,QAAQ,CAAC,IAAI,mBAAmB;IAEhC,mCAAmC;IACnC,QAAQ,CAAC,WAAW,mBAAmB;IAEvC,8BAA8B;IAC9B,QAAQ,CAAC,WAAW,SAG+C;IAEnE,mDAAmD;IACnD,QAAQ,CAAC,QAAQ,YAAY;IAE7B,wCAAwC;IACxC,QAAQ,CAAC,cAAc,QAAQ;IAE/B,uEAAuE;IACvE,QAAQ,CAAC,WAAW,EAAE,gBAAgB,CAapC;IAEF;;OAEG;gBAC0B,KAAK,EAAE,WAAW;IAM/C;;;;;;;;;;OAUG;IACG,OAAO,CACX,IAAI,EAAE,iBAAiB,EACvB,QAAQ,EAAE,oBAAoB,GAC7B,OAAO,CAAC,mBAAmB,CAAC,kBAAkB,CAAC,CAAC;CAcpD"}
@@ -0,0 +1,96 @@
1
+ /**
2
+ * @fileoverview MemoryDeleteTool — lets an agent soft-delete a memory trace.
3
+ *
4
+ * Deletion is always a soft-delete: the row in `memory_traces` is kept intact
5
+ * but its `deleted` flag is set to `1`. This preserves the audit trail and
6
+ * allows the consolidation engine to later log or compact the removal.
7
+ *
8
+ * The optional `reason` argument is currently captured in the tool contract
9
+ * but not stored in the database; it is reserved for a future `deleted_reason`
10
+ * column when schema migration tooling is in place.
11
+ *
12
+ * @module memory/tools/MemoryDeleteTool
13
+ */
14
+ // ---------------------------------------------------------------------------
15
+ // MemoryDeleteTool
16
+ // ---------------------------------------------------------------------------
17
+ /**
18
+ * ITool implementation that soft-deletes a memory trace from the agent's
19
+ * SQLite brain database.
20
+ *
21
+ * **Usage:**
22
+ * ```ts
23
+ * const tool = new MemoryDeleteTool(brain);
24
+ * const result = await tool.execute(
25
+ * { traceId: 'mt_1711234567890_0', reason: 'Information is outdated.' },
26
+ * context,
27
+ * );
28
+ * // result.output.deleted → true
29
+ * ```
30
+ */
31
+ export class MemoryDeleteTool {
32
+ /**
33
+ * @param brain - The agent's shared SQLite brain database connection.
34
+ */
35
+ constructor(brain) {
36
+ this.brain = brain;
37
+ /** Globally unique tool identifier. */
38
+ this.id = 'memory-delete-v1';
39
+ /** LLM-facing tool name. */
40
+ this.name = 'memory_delete';
41
+ /** Human-readable display name. */
42
+ this.displayName = 'Delete Memory';
43
+ /** LLM-facing description. */
44
+ this.description = 'Soft-delete a memory trace by ID. The trace is not physically removed — ' +
45
+ 'it is flagged as deleted and excluded from future searches and consolidation. ' +
46
+ 'Use when a fact is outdated, incorrect, or no longer relevant.';
47
+ /** Logical category for discovery and grouping. */
48
+ this.category = 'memory';
49
+ /** This tool writes to the database. */
50
+ this.hasSideEffects = true;
51
+ /** JSON schema for input validation and LLM tool-call construction. */
52
+ this.inputSchema = {
53
+ type: 'object',
54
+ properties: {
55
+ traceId: {
56
+ type: 'string',
57
+ description: 'The unique ID of the memory trace to delete.',
58
+ },
59
+ reason: {
60
+ type: 'string',
61
+ description: 'Optional human-readable reason for deleting this memory.',
62
+ },
63
+ },
64
+ required: ['traceId'],
65
+ };
66
+ }
67
+ // ---------------------------------------------------------------------------
68
+ // execute
69
+ // ---------------------------------------------------------------------------
70
+ /**
71
+ * Set `deleted = 1` on the memory trace matching `traceId`.
72
+ *
73
+ * The WHERE clause filters to `deleted = 0` so that attempting to
74
+ * delete an already-deleted trace returns `{ deleted: false }` rather
75
+ * than silently succeeding — this gives callers accurate feedback.
76
+ *
77
+ * @param args - Delete input (traceId, optional reason).
78
+ * @param _context - Tool execution context (not used by this tool).
79
+ * @returns `{ deleted }` status, or an error result.
80
+ */
81
+ async execute(args, _context) {
82
+ try {
83
+ const info = this.brain.db
84
+ .prepare(`UPDATE memory_traces SET deleted = 1 WHERE id = ? AND deleted = 0`)
85
+ .run(args.traceId);
86
+ return { success: true, output: { deleted: info.changes > 0 } };
87
+ }
88
+ catch (err) {
89
+ return {
90
+ success: false,
91
+ error: err instanceof Error ? err.message : String(err),
92
+ };
93
+ }
94
+ }
95
+ }
96
+ //# sourceMappingURL=MemoryDeleteTool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MemoryDeleteTool.js","sourceRoot":"","sources":["../../../src/memory/tools/MemoryDeleteTool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AA+BH,8EAA8E;AAC9E,mBAAmB;AACnB,8EAA8E;AAE9E;;;;;;;;;;;;;GAaG;AACH,MAAM,OAAO,gBAAgB;IAsC3B;;OAEG;IACH,YAA6B,KAAkB;QAAlB,UAAK,GAAL,KAAK,CAAa;QAxC/C,uCAAuC;QAC9B,OAAE,GAAG,kBAAkB,CAAC;QAEjC,4BAA4B;QACnB,SAAI,GAAG,eAAe,CAAC;QAEhC,mCAAmC;QAC1B,gBAAW,GAAG,eAAe,CAAC;QAEvC,8BAA8B;QACrB,gBAAW,GAClB,0EAA0E;YAC1E,gFAAgF;YAChF,gEAAgE,CAAC;QAEnE,mDAAmD;QAC1C,aAAQ,GAAG,QAAQ,CAAC;QAE7B,wCAAwC;QAC/B,mBAAc,GAAG,IAAI,CAAC;QAE/B,uEAAuE;QAC9D,gBAAW,GAAqB;YACvC,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,OAAO,EAAE;oBACP,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,8CAA8C;iBAC5D;gBACD,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,0DAA0D;iBACxE;aACF;YACD,QAAQ,EAAE,CAAC,SAAS,CAAC;SACtB,CAAC;IAKgD,CAAC;IAEnD,8EAA8E;IAC9E,UAAU;IACV,8EAA8E;IAE9E;;;;;;;;;;OAUG;IACH,KAAK,CAAC,OAAO,CACX,IAAuB,EACvB,QAA8B;QAE9B,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE;iBACvB,OAAO,CAAC,mEAAmE,CAAC;iBAC5E,GAAG,CAAC,IAAI,CAAC,OAAO,CAAwB,CAAC;YAE5C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,GAAG,CAAC,EAAE,EAAE,CAAC;QAClE,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO;gBACL,OAAO,EAAE,KAAK;gBACd,KAAK,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;aACxD,CAAC;QACJ,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,95 @@
1
+ /**
2
+ * @fileoverview MemoryMergeTool — lets an agent merge multiple memory traces
3
+ * into a single, consolidated trace.
4
+ *
5
+ * The merge process:
6
+ * 1. Load all specified traces from the database.
7
+ * 2. Select the survivor — the trace with the highest `retrieval_count`
8
+ * (most-frequently accessed, i.e. most valuable). Ties broken by taking
9
+ * the first trace in the provided `traceIds` array.
10
+ * 3. Determine merged content — use `mergedContent` if the agent supplied it,
11
+ * otherwise concatenate all trace contents with ` | ` as separator.
12
+ * 4. Update the survivor's content, clear its embedding (stale after merge),
13
+ * and union the tags from all merged traces (deduplicated).
14
+ * 5. Soft-delete all non-survivor traces.
15
+ *
16
+ * @module memory/tools/MemoryMergeTool
17
+ */
18
+ import type { ITool, ToolExecutionResult, ToolExecutionContext, JSONSchemaObject } from '../../core/tools/ITool.js';
19
+ import type { SqliteBrain } from '../store/SqliteBrain.js';
20
+ /**
21
+ * Input arguments for {@link MemoryMergeTool}.
22
+ *
23
+ * @property traceIds - Array of trace IDs to merge. Must contain at least 2 IDs.
24
+ * @property mergedContent - Optional pre-composed merged content. If omitted, the
25
+ * contents of all traces are concatenated with ` | `.
26
+ */
27
+ export interface MemoryMergeInput extends Record<string, any> {
28
+ traceIds: string[];
29
+ mergedContent?: string;
30
+ }
31
+ /**
32
+ * Output returned by {@link MemoryMergeTool} on success.
33
+ *
34
+ * @property survivorId - The ID of the trace that survived the merge.
35
+ * @property deletedIds - IDs of all traces that were soft-deleted.
36
+ */
37
+ export interface MemoryMergeOutput {
38
+ survivorId: string;
39
+ deletedIds: string[];
40
+ }
41
+ /**
42
+ * ITool implementation that merges multiple memory traces into one.
43
+ *
44
+ * **Usage:**
45
+ * ```ts
46
+ * const tool = new MemoryMergeTool(brain);
47
+ * const result = await tool.execute(
48
+ * {
49
+ * traceIds: ['mt_1_0', 'mt_2_0', 'mt_3_0'],
50
+ * mergedContent: 'Consolidated insight from three related observations.',
51
+ * },
52
+ * context,
53
+ * );
54
+ * // result.output → { survivorId: 'mt_1_0', deletedIds: ['mt_2_0', 'mt_3_0'] }
55
+ * ```
56
+ */
57
+ export declare class MemoryMergeTool implements ITool<MemoryMergeInput, MemoryMergeOutput> {
58
+ private readonly brain;
59
+ /** Globally unique tool identifier. */
60
+ readonly id = "memory-merge-v1";
61
+ /** LLM-facing tool name. */
62
+ readonly name = "memory_merge";
63
+ /** Human-readable display name. */
64
+ readonly displayName = "Merge Memories";
65
+ /** LLM-facing description. */
66
+ readonly description: string;
67
+ /** Logical category for discovery and grouping. */
68
+ readonly category = "memory";
69
+ /** This tool writes to the database. */
70
+ readonly hasSideEffects = true;
71
+ /** JSON schema for input validation and LLM tool-call construction. */
72
+ readonly inputSchema: JSONSchemaObject;
73
+ /**
74
+ * @param brain - The agent's shared SQLite brain database connection.
75
+ */
76
+ constructor(brain: SqliteBrain);
77
+ /**
78
+ * Merge the specified traces into one survivor.
79
+ *
80
+ * Steps:
81
+ * 1. Validate that at least 2 trace IDs were supplied.
82
+ * 2. Load all matching, non-deleted traces from the database.
83
+ * 3. Pick survivor by highest `retrieval_count`; fallback to first found.
84
+ * 4. Compute merged content (provided or concatenated).
85
+ * 5. Union all tags, deduplicate.
86
+ * 6. Update survivor: new content, cleared embedding, unioned tags.
87
+ * 7. Soft-delete all non-survivor traces.
88
+ *
89
+ * @param args - Merge input (traceIds, optional mergedContent).
90
+ * @param _context - Tool execution context (not used by this tool).
91
+ * @returns `{ survivorId, deletedIds }` on success, or an error result.
92
+ */
93
+ execute(args: MemoryMergeInput, _context: ToolExecutionContext): Promise<ToolExecutionResult<MemoryMergeOutput>>;
94
+ }
95
+ //# sourceMappingURL=MemoryMergeTool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MemoryMergeTool.d.ts","sourceRoot":"","sources":["../../../src/memory/tools/MemoryMergeTool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AACpH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAkB3D;;;;;;GAMG;AACH,MAAM,WAAW,gBAAiB,SAAQ,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAC3D,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AAMD;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,eAAgB,YAAW,KAAK,CAAC,gBAAgB,EAAE,iBAAiB,CAAC;IA4CpE,OAAO,CAAC,QAAQ,CAAC,KAAK;IA3ClC,uCAAuC;IACvC,QAAQ,CAAC,EAAE,qBAAqB;IAEhC,4BAA4B;IAC5B,QAAQ,CAAC,IAAI,kBAAkB;IAE/B,mCAAmC;IACnC,QAAQ,CAAC,WAAW,oBAAoB;IAExC,8BAA8B;IAC9B,QAAQ,CAAC,WAAW,SAGsE;IAE1F,mDAAmD;IACnD,QAAQ,CAAC,QAAQ,YAAY;IAE7B,wCAAwC;IACxC,QAAQ,CAAC,cAAc,QAAQ;IAE/B,uEAAuE;IACvE,QAAQ,CAAC,WAAW,EAAE,gBAAgB,CAgBpC;IAEF;;OAEG;gBAC0B,KAAK,EAAE,WAAW;IAM/C;;;;;;;;;;;;;;;OAeG;IACG,OAAO,CACX,IAAI,EAAE,gBAAgB,EACtB,QAAQ,EAAE,oBAAoB,GAC7B,OAAO,CAAC,mBAAmB,CAAC,iBAAiB,CAAC,CAAC;CAmFnD"}