Serchio

20250803_1747_cipher_cli_log

Aug 3rd, 2025
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 31.30 KB | None | 0 0
  1. 17:47:13 INFO: Loading agent config from /home/serchio/.cipher/cipher.yml
  2. 17:47:13 DEBUG: Loading cipher config from: /home/serchio/.cipher/cipher.yml
  3. 17:47:13 DEBUG: MemAgent: Using standard services
  4. 17:47:13 DEBUG: Initializing event manager...
  5. 17:47:13 DEBUG: ServiceEventBus initialized
  6. 17:47:13 DEBUG: EventManager initialized
  7. 17:47:13 DEBUG: Event emitted
  8. 17:47:13 INFO: MCP Manager: MCPManager initialized
  9. 17:47:13 INFO: MCP Manager: Registered client: filesystem
  10. Secure MCP Filesystem Server running on stdio
  11. 17:47:13 DEBUG: Event emitted
  12. Client does not support MCP Roots, using allowed directories set from server args: [ '/home/serchio' ]
  13. 17:47:13 DEBUG: Event emitted
  14. 17:47:13 DEBUG: [EMBEDDING:MANAGER] Simple embedding manager initialized
  15. 17:47:13 DEBUG: Found explicit embedding configuration in YAML, using it
  16. 17:47:13 DEBUG: [EMBEDDING:MANAGER] Creating embedder from YAML configuration
  17. 17:47:13 DEBUG: Creating embedder
  18. 17:47:13 DEBUG: [EMBEDDING] Ollama embedder initialized
  19. 17:47:13 INFO: [EMBEDDING:MANAGER] Embedder registered successfully from YAML
  20. 17:47:13 DEBUG: Event emitted
  21. 17:47:13 DEBUG: Reflection memory enabled, using dual collection vector manager
  22. 17:47:13 DEBUG: Overriding vector store dimension from agent config
  23. 17:47:13 DEBUG: ServiceCache: Cache miss, creating dualCollectionVectorStore:3372079315
  24. 17:47:13 DEBUG: Creating new dual collection vector store instance
  25. 17:47:13 INFO: [VectorStoreFactory] Creating dual collection vector storage from environment
  26. 17:47:13 INFO: DualCollectionVectorManager: Initialized with dual collections
  27. 17:47:13 INFO: DualCollectionVectorManager: Connecting collections...
  28. 17:47:13 DEBUG: [VectorStore:Milvus] Backend initialized with connection pooling
  29. 17:47:13 DEBUG: [VectorStore:Milvus] Connecting to Milvus via connection pool
  30. 17:47:13 DEBUG: MilvusConnectionPool: Creating new connection
  31. 17:47:14 DEBUG: MilvusConnectionPool: Connection created and pooled
  32. 17:47:14 DEBUG: [VectorStore:Milvus] Collection already exists: knowledge_memory
  33. 17:47:14 DEBUG: [VectorStore:Milvus] Successfully connected
  34. 17:47:14 INFO: [VectorStoreManager] Vector storage system connected
  35. 17:47:14 INFO: DualCollectionVectorManager: Knowledge collection connected
  36. 17:47:14 DEBUG: [VectorStore:Milvus] Backend initialized with connection pooling
  37. 17:47:14 DEBUG: [VectorStore:Milvus] Connecting to Milvus via connection pool
  38. 17:47:14 DEBUG: MilvusConnectionPool: Reusing existing connection
  39. 17:47:14 DEBUG: [VectorStore:Milvus] Collection already exists: reflection_memory
  40. 17:47:14 DEBUG: [VectorStore:Milvus] Successfully connected
  41. 17:47:14 INFO: [VectorStoreManager] Vector storage system connected
  42. 17:47:14 INFO: DualCollectionVectorManager: Reflection collection connected
  43. 17:47:14 DEBUG: ServiceCache: Cached dualCollectionVectorStore:3372079315
  44. 17:47:14 DEBUG: Dual collection vector storage manager initialized successfully
  45. 17:47:14 INFO: [KG-Factory] Creating knowledge graph from environment
  46. 17:47:14 DEBUG: [KG-Factory] Creating knowledge graph system
  47. 17:47:14 DEBUG: [KG-Manager] Initialized with backend type: neo4j
  48. 17:47:14 INFO: [KG-Manager] Connecting to neo4j backend...
  49. 17:47:14 DEBUG: [KG-Manager] Loading Neo4j backend module...
  50. 17:47:14 DEBUG: [KG-Neo4j] Initialized with config:
  51. 17:47:14 DEBUG: [KG-Neo4j] Creating driver for neo4j://nogne.xyz:7687
  52. 17:47:14 INFO: [KG-Neo4j] Connected successfully to neo4j://nogne.xyz:7687
  53. 17:47:14 DEBUG: [KG-Neo4j] Created indexes
  54. 17:47:14 DEBUG: [KG-Manager] Started health monitoring (interval: 5000ms)
  55. 17:47:14 INFO: [KG-Manager] Connected successfully to neo4j backend
  56. 17:47:14 INFO: [KG-Factory] Knowledge graph system created successfully
  57. 17:47:14 DEBUG: Knowledge graph manager initialized successfully
  58. 17:47:14 DEBUG: ServiceCache: Cache miss, creating contextManager:26449362832
  59. 17:47:14 DEBUG: Created context manager
  60. 17:47:14 DEBUG: ContextManager initialized with formatter
  61. 17:47:14 DEBUG: ServiceCache: Cached contextManager:26449362832
  62. 17:47:14 DEBUG: Verified API key
  63. 17:47:14 INFO: InternalToolRegistry: Initializing...
  64. 17:47:14 INFO: InternalToolRegistry: Initialized successfully
  65. 17:47:14 DEBUG: Workspace memory is disabled - excluding all workspace tools
  66. 17:47:14 DEBUG: Knowledge graph enabled, loading knowledge graph tools
  67. 17:47:14 DEBUG: SessionManager: Starting initialization...
  68. 17:47:14 INFO: SessionManager: Initializing persistence storage...
  69. 17:47:14 DEBUG: SessionManager: Attempting to initialize PostgreSQL storage...
  70. 17:47:14 DEBUG: SessionManager: Using PostgreSQL individual parameters
  71. 17:47:14 INFO: [StorageManager] Initialized with configuration
  72. 17:47:14 INFO: [StorageManager] Starting connection attempt 1
  73. 17:47:14 INFO: InMemoryBackend connected
  74. 17:47:14 INFO: [StorageManager:Cache] Connected successfully
  75. 17:47:14 INFO: Connecting to PostgreSQL database
  76. 17:47:14 DEBUG: TokenizerCache: Cache miss, creating new tokenizer
  77. 17:47:14 DEBUG: Creating tokenizer
  78. 17:47:14 DEBUG: TokenizerCache: Tokenizer cached
  79. 17:47:14 DEBUG: ServiceCache: Cache miss, creating compressionStrategy:25840307394
  80. 17:47:14 DEBUG: Creating compression strategy
  81. 17:47:14 DEBUG: MiddleRemovalStrategy initialized
  82. 17:47:14 DEBUG: OldestRemovalStrategy initialized
  83. 17:47:14 DEBUG: HybridStrategy initialized
  84. 17:47:14 DEBUG: ServiceCache: Cached compressionStrategy:25840307394
  85. 17:47:14 DEBUG: [TokenAware] Token count reset (no messages or tokenizer)
  86. 17:47:14 DEBUG: Token-aware compression configured
  87. 17:47:14 DEBUG: Token-aware compression configured for LLM service
  88. 17:47:15 DEBUG: OpenAI tokenizer initialized with tiktoken
  89. 17:47:15 DEBUG: PostgreSQL connection test successful
  90. 17:47:15 DEBUG: PostgreSQL tables and indexes created
  91. 17:47:15 INFO: PostgreSQL backend connected successfully
  92. 17:47:15 INFO: [StorageManager:Database] Connected successfully
  93. 17:47:15 INFO: [StorageManager] Storage system connected
  94. 17:47:15 INFO: SessionManager: PostgreSQL persistence storage initialized successfully
  95. 17:47:15 INFO: SessionManager: Storage initialized with database backend: postgres
  96. 17:47:15 INFO: SessionManager: Found 1 session keys in storage with prefix 'cipher:sessions:'
  97. 17:47:15 DEBUG: SessionManager: Session keys found: cipher:sessions:default
  98. 17:47:15 DEBUG: Session default: Using PostgreSQL for history provider (lazy-loaded)
  99. 17:47:15 INFO: [StorageManager] Initialized with configuration
  100. 17:47:15 INFO: [StorageManager] Starting connection attempt 1
  101. 17:47:15 INFO: InMemoryBackend connected
  102. 17:47:15 INFO: [StorageManager:Cache] Connected successfully
  103. 17:47:15 INFO: Connecting to PostgreSQL database
  104. 17:47:15 DEBUG: PostgreSQL connection test successful
  105. 17:47:15 DEBUG: PostgreSQL tables and indexes created
  106. 17:47:15 INFO: PostgreSQL backend connected successfully
  107. 17:47:15 INFO: [StorageManager:Database] Connected successfully
  108. 17:47:15 INFO: [StorageManager] Storage system connected
  109. 17:47:15 DEBUG: Session default: Database history provider lazy-initialized with postgres backend.
  110. 17:47:15 DEBUG: Created context manager
  111. 17:47:15 DEBUG: ContextManager initialized with formatter
  112. 17:47:15 DEBUG: Session default: Created session-specific context manager with history provider
  113. 17:47:15 INFO: DatabaseHistoryProvider: Cleared conversation history for session default
  114. 17:47:17 INFO: Session default: Restored 16 messages to context manager
  115. 17:47:17 DEBUG: SessionManager: Loaded session default from persistent storage with 16 messages
  116. 17:47:17 DEBUG: SessionManager: Successfully restored session default
  117. 17:47:17 DEBUG: SessionManager: Session restoration completed
  118. 17:47:17 INFO: SessionManager: Initialization complete. Loaded 1/1 sessions from storage. Current in-memory sessions: 1
  119. 17:47:17 DEBUG: SessionManager initialized with max sessions: 100, TTL: 3600000ms
  120. 17:47:17 DEBUG: Event emitted
  121. 17:47:17 DEBUG: Event emitted
  122. 17:47:17 INFO: Initializing CLI interface...
  123. 17:47:17 INFO: CLI interface ready
  124. 17:47:17 DEBUG: CLI: Initializing session: default
  125. 17:47:17 DEBUG: SessionEventBus initialized
  126. 17:47:17 DEBUG: SessionEventBus created
  127. 17:47:17 DEBUG: Event emitted
  128. 17:47:17 INFO: Session default: Serialized with 16 messages
  129. 17:47:17 DEBUG: SessionManager: Saved session default to persistent storage with 16 messages
  130. 17:47:17 DEBUG: Updated activity for session: default
  131. 17:47:17 DEBUG: SessionManager: Retrieved active session default. Total active sessions: 1
  132. 17:47:17 DEBUG: CLI: Initializing session default
  133. 17:47:17 DEBUG: Created context manager
  134. 17:47:17 DEBUG: ContextManager initialized with formatter
  135. 17:47:17 DEBUG: Session default: Created session-specific context manager with history provider
  136. 17:47:17 DEBUG: CLI: Session default initialized successfully
  137. 17:47:17 DEBUG: CLI: Getting session for compression info: default
  138. 17:47:17 DEBUG: Event emitted
  139. 17:47:17 INFO: Session default: Serialized with 16 messages
  140. 17:47:17 DEBUG: SessionManager: Saved session default to persistent storage with 16 messages
  141. 17:47:17 DEBUG: Updated activity for session: default
  142. 17:47:17 DEBUG: SessionManager: Retrieved active session default. Total active sessions: 1
  143. 🚀 Welcome to Cipher Interactive CLI!
  144. Your memory-powered coding assistant is ready.
  145. • Type /help to see available commands
  146. • Use /exit or /quit to end the session
  147. • Regular messages will be sent to the AI agent
  148.  
  149. cipher> Please search persistent memory for the quicksort algorithm.
  150. 🤔 Thinking...
  151. 17:47:26 DEBUG: Event emitted
  152. 17:47:26 INFO: Session default: Serialized with 16 messages
  153. 17:47:26 DEBUG: SessionManager: Saved session default to persistent storage with 16 messages
  154. 17:47:26 DEBUG: Updated activity for session: default
  155. 17:47:26 DEBUG: SessionManager: Retrieved active session default. Total active sessions: 1
  156. 17:47:26 DEBUG: MemAgent.run: using session default
  157. 17:47:26 DEBUG: ConversationSession.run called
  158. 17:47:26 DEBUG: Running session default with input: Please search persistent memory for the quicksort algorithm. and imageDataInput: undefined and stream: false
  159. 17:47:26 DEBUG: Using configured evalLlm for evaluation tasks
  160. 17:47:26 DEBUG: ConversationSession: Reasoning services initialized
  161. 17:47:26 DEBUG: Session default: Conversation history restored (lazy-loaded)
  162. 17:47:26 DEBUG: Verified API key
  163. 17:47:26 DEBUG: Session default: LLM service lazy-initialized
  164. 17:47:26 DEBUG: Adding user message: [
  165.   {
  166.     "type": "text",
  167.     "text": "Please search persistent memory for the quicksort algorithm."
  168.   }
  169. ]
  170. 17:47:26 DEBUG: TokenizerCache: Cache hit
  171. 17:47:26 DEBUG: ServiceCache: Cache hit for compressionStrategy:25840307394
  172. 17:47:26 INFO: Token counting: tiktoken count
  173. 17:47:26 INFO: [TokenAware] Token count updated: 832 tokens for 16 messages
  174. 17:47:26 DEBUG: Token-aware compression configured
  175. 17:47:26 DEBUG: Token-aware compression configured for LLM service
  176. 17:47:26 DEBUG: Adding message to context: {
  177.   "role": "user",
  178.   "content": [
  179.     {
  180.       "type": "text",
  181.       "text": "Please search persistent memory for the quicksort algorithm."
  182.     }
  183.   ]
  184. }
  185. 17:47:26 DEBUG: Total messages in context: 17
  186. 17:47:26 INFO: [TokenAware] Token count updated: 842 tokens for 17 messages
  187. 17:47:26 INFO: UnifiedToolManager: Getting tools for provider: openrouter
  188. 17:47:26 DEBUG: UnifiedToolManager: Getting all tools
  189. 17:47:26 DEBUG: UnifiedToolManager: Loading MCP tools
  190. 17:47:26 DEBUG: UnifiedToolManager: Retrieved 14 MCP tools
  191. 17:47:26 DEBUG: UnifiedToolManager: Loaded 14 MCP tools
  192. 17:47:26 DEBUG: UnifiedToolManager: Loading internal tools
  193. 17:47:26 DEBUG: UnifiedToolManager: Retrieved 17 internal tools
  194. 17:47:26 DEBUG: UnifiedToolManager: CLI mode - 4 search tools accessible to LLM
  195. 17:47:26 DEBUG: UnifiedToolManager: Combined tools loaded successfully (mode: cli)
  196. 17:47:26 INFO: UnifiedToolManager: Got 27 total tools
  197. 17:47:26 INFO: UnifiedToolManager: Formatting tools for OpenAI
  198. 17:47:26 DEBUG: Tools in OpenRouter response: 27
  199. 17:47:26 DEBUG: [SystemPrompt] Built complete system prompt (267 chars)
  200. 17:47:26 DEBUG: Formatted 18 messages from history of 17 messages
  201. 17:47:32 INFO: 💭 I'll search for the quicksort algorithm in the persistent memory.
  202. 17:47:32 DEBUG: Adding message to context: {
  203.  "role": "assistant",
  204.  "content": "I'll search for the quicksort algorithm in the persistent memory.\n\n",
  205.  "toolCalls": [
  206.    {
  207.      "id": "call_becf2b80b6c2402c9321a9e4",
  208.      "index": 0,
  209.      "type": "function",
  210.      "function": {
  211.        "name": "cipher_enhanced_search",
  212.        "arguments": "{\"query\": \"quicksort algorithm implementation code\", \"searchType\": \"nodes\", \"limit\": 10}"
  213.      }
  214.    }
  215.  ]
  216. }
  217. 17:47:32 DEBUG: Total messages in context: 18
  218. 17:47:32 INFO: [TokenAware] Token count updated: 855 tokens for 18 messages
  219. 17:47:32 DEBUG: OpenRouter tool call initiated: {
  220.  "id": "call_becf2b80b6c2402c9321a9e4",
  221.  "index": 0,
  222.  "type": "function",
  223.  "function": {
  224.    "name": "cipher_enhanced_search",
  225.    "arguments": "{\"query\": \"quicksort algorithm implementation code\", \"searchType\": \"nodes\", \"limit\": 10}"
  226.  }
  227. }
  228. 17:47:32 INFO: 🔧 Using tool: cipher_enhanced_search
  229. 17:47:32 DEBUG: UnifiedToolManager: Executing tool 'cipher_enhanced_search'
  230. 17:47:32 DEBUG: UnifiedToolManager: Routing 'cipher_enhanced_search' to internal tool manager
  231. 17:47:32 DEBUG: InternalToolManager: Executing tool 'cipher_enhanced_search'
  232. 17:47:32 INFO: EnhancedSearch: Processing enhanced search query
  233. 17:47:32 DEBUG: Adding user message: [
  234.  {
  235.    "type": "text",
  236.    "text": "\nYou are a query processing system for a knowledge graph search. Your job is to understand the user's search intent and convert it into an optimized search query.\n\nOriginal query: \"quicksort algorithm implementation code\"\n\nAnalyze the query and provide:\n1. The search intent (what is the user looking for?)\n2. Key entities or concepts to search for\n3. Relationship context if any\n4. Optimized search terms\n5. Confidence level (0.0-1.0)\n\nExamples:\n- \"find people who like ice cream\" -> entities: [\"people\", \"ice cream\"], relationship: \"LIKES\", optimized: \"Person LIKES ice cream\"\n- \"Long's friends\" -> entities: [\"Long\"], relationship: \"KNOWS\", optimized: \"Long KNOWS Person\"\n- \"companies in San Francisco\" -> entities: [\"companies\", \"San Francisco\"], relationship: \"LOCATED_IN\", optimized: \"Organization LOCATED_IN San Francisco\"\n\nRespond with a JSON object:\n{\n  \"intent\": \"description of search intent\",\n  \"entities\": [\"entity1\", \"entity2\"],\n  \"relationships\": [\"RELATIONSHIP_TYPE\"],\n  \"optimizedQuery\": \"optimized search terms\",\n  \"searchType\": \"exact\" | \"fuzzy\" | \"semantic\" | \"natural\",\n  \"confidence\": 0.0-1.0\n}\n\nRespond ONLY with the JSON object:"
  237.  }
  238. ]
  239. 17:47:32 DEBUG: Adding message to context: {
  240.  "role": "user",
  241.  "content": [
  242.    {
  243.      "type": "text",
  244.      "text": "\nYou are a query processing system for a knowledge graph search. Your job is to understand the user's search intent and convert it into an optimized search query.\n\nOriginal query: \"quicksort algorithm implementation code\"\n\nAnalyze the query and provide:\n1. The search intent (what is the user looking for?)\n2. Key entities or concepts to search for\n3. Relationship context if any\n4. Optimized search terms\n5. Confidence level (0.0-1.0)\n\nExamples:\n- \"find people who like ice cream\" -> entities: [\"people\", \"ice cream\"], relationship: \"LIKES\", optimized: \"Person LIKES ice cream\"\n- \"Long's friends\" -> entities: [\"Long\"], relationship: \"KNOWS\", optimized: \"Long KNOWS Person\"\n- \"companies in San Francisco\" -> entities: [\"companies\", \"San Francisco\"], relationship: \"LOCATED_IN\", optimized: \"Organization LOCATED_IN San Francisco\"\n\nRespond with a JSON object:\n{\n  \"intent\": \"description of search intent\",\n  \"entities\": [\"entity1\", \"entity2\"],\n  \"relationships\": [\"RELATIONSHIP_TYPE\"],\n  \"optimizedQuery\": \"optimized search terms\",\n  \"searchType\": \"exact\" | \"fuzzy\" | \"semantic\" | \"natural\",\n  \"confidence\": 0.0-1.0\n}\n\nRespond ONLY with the JSON object:"
  245.    }
  246.  ]
  247. }
  248. 17:47:32 DEBUG: Total messages in context: 1
  249. 17:47:32 INFO: [TokenAware] Token count updated: 289 tokens for 1 messages
  250. 17:47:32 DEBUG: Tools in OpenRouter response: 14
  251. 17:47:32 DEBUG: [SystemPrompt] Built complete system prompt (267 chars)
  252. 17:47:32 DEBUG: Formatted 2 messages from history of 1 messages
  253. 17:47:37 DEBUG: Adding message to context: {
  254.  "role": "assistant",
  255.  "content": "{\n  \"intent\": \"User is looking for code implementation of the quicksort algorithm\",\n  \"entities\": [\"quicksort\", \"algorithm\", \"implementation\", \"code\"],\n  \"relationships\": [\"IMPLEMENTATION_OF\", \"CODE_FOR\"],\n  \"optimizedQuery\": \"quicksort algorithm implementation code\",\n  \"searchType\": \"exact\",\n  \"confidence\": 0.95\n}"
  256. }
  257. 17:47:37 DEBUG: Total messages in context: 2
  258. 17:47:37 INFO: [TokenAware] Token count updated: 369 tokens for 2 messages
  259. 17:47:37 DEBUG: EnhancedSearch: Error in exact node search
  260. 17:47:37 DEBUG: [KG-Neo4j] Found 6 nodes
  261. 17:47:37 DEBUG: EnhancedSearch: Error in property search
  262. 17:47:37 DEBUG: [KG-Neo4j] Found 0 neighbors for node concept_quicksort_1754235439101
  263. 17:47:37 DEBUG: [KG-Neo4j] Found 0 neighbors for node concept_algorithm_1754235439186
  264. 17:47:37 INFO: EnhancedSearch: Search completed successfully
  265. 17:47:37 DEBUG: InternalToolManager: Tool 'cipher_enhanced_search' executed successfully
  266. 17:47:37 INFO: 📋 Tool Result:
  267. ✅ Enhanced search completed - found 2 nodes, 0 edges, 0 related entities
  268. 17:47:37 DEBUG: Adding message to context: {
  269.  "role": "tool",
  270.  "content": "{\"success\":true,\"message\":\"Enhanced search completed - found 2 nodes, 0 edges, 0 related entities\",\"timestamp\":\"2025-08-03T15:47:32.437Z\",\"query\":{\"original\":\"quicksort algorithm implementation code\",\"processed\":\"quicksort algorithm implementation code\",\"type\":\"exact\",\"confidence\":0.95},\"results\":{\"nodes\":[{\"id\":\"concept_quicksort_1754235439101\",\"labels\":[\"Concept\"],\"properties\":{\"createdAt\":\"2025-08-03T15:37:19.101Z\",\"confidence\":0.95,\"extractedFrom\":\"JavaScript Quicksort Implementation: function quicksort(arr) { if (arr.length <= 1) { return arr; } const pivot = arr[Math.floor(arr.length / 2)]; const left = []; const middle = []; const right = []; for (let element of arr) { if (element < pivot) { left.push(element); } else if (element > pivot) { right.push(element); } else { middle.push(element); } } return [...quicksort(left), ...middle, ...quicksort(right)]; } This is a recursive implementation of the quicksort algorithm that sorts an array by selecting a pivot element and partitioning the array around it.\",\"name\":\"quicksort\",\"id\":\"concept_quicksort_1754235439101\"},\"score\":0.8,\"matchReason\":\"Fuzzy name match\"},{\"id\":\"concept_algorithm_1754235439186\",\"labels\":[\"Concept\"],\"properties\":{\"createdAt\":\"2025-08-03T15:37:19.186Z\",\"confidence\":0.9,\"extractedFrom\":\"JavaScript Quicksort Implementation: function quicksort(arr) { if (arr.length <= 1) { return arr; } const pivot = arr[Math.floor(arr.length / 2)]; const left = []; const middle = []; const right = []; for (let element of arr) { if (element < pivot) { left.push(element); } else if (element > pivot) { right.push(element); } else { middle.push(element); } } return [...quicksort(left), ...middle, ...quicksort(right)]; } This is a recursive implementation of the quicksort algorithm that sorts an array by selecting a pivot element and partitioning the array around it.\",\"name\":\"algorithm\",\"id\":\"concept_algorithm_1754235439186\"},\"score\":0.8,\"matchReason\":\"Fuzzy name match\"}],\"edges\":[],\"related\":[],\"totalCount\":2,\"executionTime\":4640}}",
  271.  "toolCallId": "call_becf2b80b6c2402c9321a9e4",
  272.  "name": "cipher_enhanced_search"
  273. }
  274. 17:47:37 DEBUG: Total messages in context: 19
  275. 17:47:37 INFO: [TokenAware] Token count updated: 1372 tokens for 19 messages
  276. 17:47:37 DEBUG: Tools in OpenRouter response: 27
  277. 17:47:37 DEBUG: [SystemPrompt] Built complete system prompt (267 chars)
  278. 17:47:37 DEBUG: Formatted 20 messages from history of 19 messages
  279. 17:47:57 DEBUG: Adding message to context: {
  280.  "role": "assistant",
  281.  "content": "I found information about the quicksort algorithm in the persistent memory. There are two relevant nodes:\n\n1. A \"quicksort\" concept node containing a JavaScript implementation:\n```javascript\nfunction quicksort(arr) {\n  if (arr.length <= 1) {\n    return arr;\n  }\n  const pivot = arr[Math.floor(arr.length / 2)];\n  const left = [];\n  const middle = [];\n  const right = [];\n  for (let element of arr) {\n    if (element < pivot) {\n      left.push(element);\n    } else if (element > pivot) {\n      right.push(element);\n    } else {\n      middle.push(element);\n    }\n  }\n  return [...quicksort(left), ...middle, ...quicksort(right)];\n}\n```\n\nThis is described as a recursive implementation of the quicksort algorithm that sorts an array by selecting a pivot element and partitioning the array around it.\n\n2. An \"algorithm\" concept node that appears to be related to the same implementation.\n\nWould you like me to explain how this quicksort implementation works or provide any additional information about it?"
  282. }
  283. 17:47:57 DEBUG: Total messages in context: 20
  284. 17:47:57 INFO: [TokenAware] Token count updated: 1596 tokens for 20 messages
  285. ┌─────────────────────────────────────────────────────────────────────────── 🤖 AI Response ────────────────────────────────────────────────────────────────────────────┐
  286. │                                                                                                                                                                       │
  287. │   I found information about the quicksort algorithm in the persistent memory. There are two relevant nodes:                                                           │
  288. │                                                                                                                                                                       │
  289. │   1. A "quicksort" concept node containing a JavaScript implementation:                                                                                               │
  290. │   ```javascript                                                                                                                                                       │
  291. │   function quicksort(arr) {                                                                                                                                           │
  292. │     if (arr.length <= 1) {                                                                                                                                            │
  293. │       return arr;                                                                                                                                                     │
  294. │     }                                                                                                                                                                 │
  295. │     const pivot = arr[Math.floor(arr.length / 2)];                                                                                                                    │
  296. │     const left = [];                                                                                                                                                  │
  297. │     const middle = [];                                                                                                                                                │
  298. │     const right = [];                                                                                                                                                 │
  299. │     for (let element of arr) {                                                                                                                                        │
  300. │       if (element < pivot) {                                                                                                                                          │
  301. │         left.push(element);                                                                                                                                           │
  302. │       } else if (element > pivot) {                                                                                                                                   │
  303. │         right.push(element);                                                                                                                                          │
  304. │       } else {                                                                                                                                                        │
  305. │         middle.push(element);                                                                                                                                         │
  306. │       }                                                                                                                                                               │
  307. │     }                                                                                                                                                                 │
  308. │     return [...quicksort(left), ...middle, ...quicksort(right)];                                                                                                      │
  309. │   }                                                                                                                                                                   │
  310. │   ```                                                                                                                                                                 │
  311. │                                                                                                                                                                       │
  312. │   This is described as a recursive implementation of the quicksort algorithm that sorts an array by selecting a pivot element and partitioning the array around it.   │
  313. │                                                                                                                                                                       │
  314. │   2. An "algorithm" concept node that appears to be related to the same implementation.                                                                               │
  315. │                                                                                                                                                                       │
  316. │   Would you like me to explain how this quicksort implementation works or provide any additional information about it?                                                │
  317. │                                                                                                                                                                       │
  318. └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
  319. 17:47:57 DEBUG: Event emitted
  320. 17:47:57 DEBUG: Starting background memory operations
  321. 17:47:57 DEBUG: ConversationSession.enforceMemoryExtraction called
  322. 17:47:57 DEBUG: enforceMemoryExtraction: unifiedToolManager at entry
  323. 17:47:57 DEBUG: ConversationSession: Enforcing memory extraction for interaction
  324. 17:47:57 DEBUG: ConversationSession: Memory tools to execute
  325. 17:47:57 DEBUG: ConversationSession: Extracted comprehensive interaction data
  326. 17:47:57 DEBUG: UnifiedToolManager: Executing tool 'cipher_extract_and_operate_memory' (without loading)
  327. 17:47:57 DEBUG: UnifiedToolManager: Routing 'cipher_extract_and_operate_memory' to internal tool manager (without loading)
  328. 17:47:57 DEBUG: InternalToolManager: Executing tool 'cipher_extract_and_operate_memory'
  329. 17:47:57 DEBUG: ExtractAndOperateMemory: Skipping non-significant fact
  330. 17:47:57 DEBUG: ExtractAndOperateMemory: Using knowledge collection
  331. 17:47:57 DEBUG: ExtractAndOperateMemory: Processing fact 1/3
  332. 17:47:57 DEBUG: [EMBEDDING] Starting Ollama embedding
  333. 17:47:57 INFO: Session default: Serialized with 20 messages
  334. 17:47:57 DEBUG: [EMBEDDING] Ollama embedding completed
  335. 17:47:57 DEBUG: ExtractAndOperateMemory: Similarity search completed for fact 1
  336. 17:47:57 DEBUG: OpenRouterService: Direct generate call (bypassing conversation context)
  337. 17:47:57 DEBUG: SessionManager: Saved session default to persistent storage with 20 messages
  338. 17:47:57 DEBUG: Updated activity for session: default
  339. 17:47:57 DEBUG: SessionManager: Retrieved active session default. Total active sessions: 1
  340. 17:48:20 DEBUG: OpenRouterService: Direct generate completed
  341. 17:48:20 DEBUG: ExtractAndOperateMemory: LLM decision for fact 1
  342. 17:48:20 DEBUG: ExtractAndOperateMemory: Processing fact 2/3
  343. 17:48:20 DEBUG: [EMBEDDING] Starting Ollama embedding
  344. 17:48:20 DEBUG: [EMBEDDING] Ollama embedding completed
  345. 17:48:20 DEBUG: ExtractAndOperateMemory: Similarity search completed for fact 2
  346. 17:48:20 DEBUG: OpenRouterService: Direct generate call (bypassing conversation context)
  347. 17:48:25 DEBUG: OpenRouterService: Direct generate completed
  348. 17:48:25 DEBUG: ExtractAndOperateMemory: LLM decision for fact 2
  349. 17:48:25 DEBUG: ExtractAndOperateMemory: Processing fact 3/3
  350. 17:48:25 DEBUG: [EMBEDDING] Starting Ollama embedding
  351. 17:48:25 DEBUG: [EMBEDDING] Ollama embedding completed
  352. 17:48:25 DEBUG: ExtractAndOperateMemory: Similarity search completed for fact 3
  353. 17:48:25 DEBUG: OpenRouterService: Direct generate call (bypassing conversation context)
  354. 17:48:27 ERROR: InternalToolManager: Tool 'cipher_extract_and_operate_memory' execution failed
  355. 17:48:27 ERROR: UnifiedToolManager: Tool execution failed for 'cipher_extract_and_operate_memory' (without loading)
  356. 17:48:27 DEBUG: ConversationSession: Default memory tool execution failed
  357. 17:48:27 DEBUG: ConversationSession: No memory tools executed successfully
  358. 17:48:27 DEBUG: Background memory operations completed successfully
  359. cipher> 17:48:45 DEBUG: OpenRouterService: Direct generate completed
  360. 17:48:45 DEBUG: ExtractAndOperateMemory: LLM decision for fact 3
  361. 17:48:45 DEBUG: ExtractAndOperateMemory: Starting memory persistence operations
  362. 17:48:45 DEBUG: [EMBEDDING] Starting Ollama embedding
  363. 17:48:45 DEBUG: [EMBEDDING] Ollama embedding completed
  364. 17:48:45 DEBUG: [VectorStore:Milvus] Updated vector 1754235703001
  365. 17:48:45 DEBUG: ExtractAndOperateMemory: UPDATE operation completed
  366. 17:48:45 DEBUG: [EMBEDDING] Starting Ollama embedding
  367. 17:48:45 DEBUG: [EMBEDDING] Ollama embedding completed
  368. 17:48:45 DEBUG: Inserted 1 vectors
  369. 17:48:45 DEBUG: ExtractAndOperateMemory: ADD operation completed
  370. 17:48:45 DEBUG: [EMBEDDING] Starting Ollama embedding
  371. 17:48:45 DEBUG: [EMBEDDING] Ollama embedding completed
  372. 17:48:45 DEBUG: [VectorStore:Milvus] Updated vector 1754234963000
  373. 17:48:45 DEBUG: ExtractAndOperateMemory: UPDATE operation completed
  374. 17:48:45 DEBUG: ExtractAndOperateMemory: Memory persistence completed
Advertisement
Add Comment
Please, Sign In to add comment