|
1 | 1 | import os |
| 2 | +import yaml |
2 | 3 | import json |
3 | 4 | import logging |
4 | 5 | import shutil |
5 | 6 | import subprocess |
6 | 7 | import uuid |
7 | | -from datetime import datetime |
8 | | -from typing import Any, Dict, List, Optional, Union |
| 8 | +from datetime import datetime, timedelta |
| 9 | +from typing import Any, Dict, List, Optional, Union, Tuple |
9 | 10 |
|
10 | 11 | logger = logging.getLogger(__name__) |
11 | 12 |
|
12 | 13 | from ledgermind.core.core.router import MemoryRouter |
13 | 14 | from ledgermind.core.core.schemas import ( |
14 | 15 | MemoryEvent, MemoryDecision, ResolutionIntent, TrustBoundary, |
15 | | - DecisionContent, DecisionStream, ProposalContent, DecisionPhase, DecisionVitality, KIND_DECISION, KIND_PROPOSAL, KIND_INTERVENTION, |
| 16 | + DecisionContent, DecisionStream, ProposalContent, DecisionPhase, DecisionVitality, ProposalStatus, SEMANTIC_KINDS, KIND_DECISION, KIND_PROPOSAL, KIND_INTERVENTION, |
16 | 17 | LedgermindConfig |
17 | 18 | ) |
18 | 19 | from ledgermind.core.core.exceptions import InvariantViolation, ConflictError |
|
28 | 29 | from ledgermind.core.stores.vector import VectorStore |
29 | 30 | from ledgermind.core.core.targets import TargetRegistry |
30 | 31 |
|
| 32 | +from ledgermind.core.utils.events import EventEmitter |
31 | 33 |
|
32 | 34 | # Optional observability |
33 | 35 | try: |
@@ -120,6 +122,7 @@ def __init__(self, |
120 | 122 | self.targets = TargetRegistry(self.semantic.repo_path) |
121 | 123 |
|
122 | 124 | # Performance: Pre-initialize shared reasoning components |
| 125 | + from ledgermind.core.reasoning.lifecycle import LifecycleEngine |
123 | 126 | self._lifecycle = LifecycleEngine() |
124 | 127 |
|
125 | 128 | @property |
@@ -352,7 +355,7 @@ def process_event(self, |
352 | 355 | self.semantic.update_decision( |
353 | 356 | old_id, |
354 | 357 | {"status": "superseded"}, |
355 | | - commit_msg="Deactivating for transition" |
| 358 | + commit_msg=f"Deactivating for transition" |
356 | 359 | ) |
357 | 360 | else: |
358 | 361 | logger.info(f"Target {old_id} already superseded or missing during transition.") |
|
0 commit comments