Get full operation sequence for a session
(self, session_id: str)
| 162 | return results |
| 163 | |
| 164 | def get_operation_sequence(self, session_id: str) -> List[Dict]: |
| 165 | """Get full operation sequence for a session""" |
| 166 | cursor = self.conn.cursor() |
| 167 | cursor.execute(""" |
| 168 | SELECT operation_type, parameters, context, timestamp |
| 169 | FROM operations |
| 170 | WHERE session_id = ? AND was_successful = TRUE |
| 171 | ORDER BY timestamp |
| 172 | """, (session_id,)) |
| 173 | |
| 174 | operations = [] |
| 175 | for row in cursor.fetchall(): |
| 176 | operations.append({ |
| 177 | "type": row[0], |
| 178 | "parameters": json.loads(row[1]), |
| 179 | "context": json.loads(row[2]), |
| 180 | "timestamp": row[3] |
| 181 | }) |
| 182 | |
| 183 | return operations |
| 184 | |
| 185 | def _detect_and_store_patterns(self): |
| 186 | """Detect patterns in recent operations""" |
nothing calls this directly
no outgoing calls
no test coverage detected