@noorm/marie-cli 0.1.18 → 0.1.25

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 (251) hide show
  1. package/README.md +7 -15
  2. package/SENTINEL.md +4 -7
  3. package/dist/cli-new/components/App.js +16 -63
  4. package/dist/cli-new/components/App.js.map +1 -1
  5. package/dist/cli-new/components/ApprovalDialog.js +2 -1
  6. package/dist/cli-new/components/ApprovalDialog.js.map +1 -1
  7. package/dist/cli-new/components/Banner.js +4 -3
  8. package/dist/cli-new/components/Banner.js.map +1 -1
  9. package/dist/cli-new/components/ChatArea.js +6 -7
  10. package/dist/cli-new/components/ChatArea.js.map +1 -1
  11. package/dist/cli-new/components/Header.js +13 -7
  12. package/dist/cli-new/components/Header.js.map +1 -1
  13. package/dist/cli-new/components/InputArea.js +73 -12
  14. package/dist/cli-new/components/InputArea.js.map +1 -1
  15. package/dist/cli-new/components/MessageBubble.js +26 -18
  16. package/dist/cli-new/components/MessageBubble.js.map +1 -1
  17. package/dist/cli-new/components/SessionSwitcher.js +4 -7
  18. package/dist/cli-new/components/SessionSwitcher.js.map +1 -1
  19. package/dist/cli-new/components/SetupWizard.js +80 -257
  20. package/dist/cli-new/components/SetupWizard.js.map +1 -1
  21. package/dist/cli-new/components/ToolCallDisplay.js +20 -5
  22. package/dist/cli-new/components/ToolCallDisplay.js.map +1 -1
  23. package/dist/cli-new/components/WizardSteps.js +22 -0
  24. package/dist/cli-new/components/WizardSteps.js.map +1 -0
  25. package/dist/cli-new/constants/SetupConstants.js +42 -0
  26. package/dist/cli-new/constants/SetupConstants.js.map +1 -0
  27. package/dist/cli-new/hooks/useGit.js +19 -62
  28. package/dist/cli-new/hooks/useGit.js.map +1 -1
  29. package/dist/cli-new/hooks/useMarie.js +26 -18
  30. package/dist/cli-new/hooks/useMarie.js.map +1 -1
  31. package/dist/cli-new/hooks/useSessions.js +1 -1
  32. package/dist/cli-new/hooks/useSessions.js.map +1 -1
  33. package/dist/cli-new/hooks/useSetupWizard.js +88 -0
  34. package/dist/cli-new/hooks/useSetupWizard.js.map +1 -0
  35. package/dist/cli-new/hooks/useUpdateCheck.js +4 -3
  36. package/dist/cli-new/hooks/useUpdateCheck.js.map +1 -1
  37. package/dist/cli-new/index.js +2 -4
  38. package/dist/cli-new/index.js.map +1 -1
  39. package/dist/cli-new/services/CommandService.js +104 -0
  40. package/dist/cli-new/services/CommandService.js.map +1 -0
  41. package/dist/cli-new/services/GitService.js +91 -0
  42. package/dist/cli-new/services/GitService.js.map +1 -0
  43. package/dist/cli-new/services/MarieService.js +77 -0
  44. package/dist/cli-new/services/MarieService.js.map +1 -0
  45. package/dist/cli-new/services/auth-server.js +128 -0
  46. package/dist/cli-new/services/auth-server.js.map +1 -0
  47. package/dist/cli-new/utils/version.js +24 -0
  48. package/dist/cli-new/utils/version.js.map +1 -0
  49. package/dist/monolith/adapters/CliMarieAdapter.js +12 -11
  50. package/dist/monolith/adapters/CliMarieAdapter.js.map +1 -1
  51. package/dist/monolith/cli/CliFileSystemPort.js +17 -3
  52. package/dist/monolith/cli/CliFileSystemPort.js.map +1 -1
  53. package/dist/monolith/cli/MarieToolDefinitionsCLI.js +39 -31
  54. package/dist/monolith/cli/MarieToolDefinitionsCLI.js.map +1 -1
  55. package/dist/monolith/cli/index.js +5 -20
  56. package/dist/monolith/cli/index.js.map +1 -1
  57. package/dist/monolith/cli/services/JoyAutomationServiceCLI.js +15 -62
  58. package/dist/monolith/cli/services/JoyAutomationServiceCLI.js.map +1 -1
  59. package/dist/monolith/cli/storage.js +142 -72
  60. package/dist/monolith/cli/storage.js.map +1 -1
  61. package/dist/monolith/domain/joy/RitualService.js +44 -46
  62. package/dist/monolith/domain/joy/RitualService.js.map +1 -1
  63. package/dist/monolith/domain/marie/MarieCortex.js +148 -0
  64. package/dist/monolith/domain/marie/MarieCortex.js.map +1 -0
  65. package/dist/monolith/domain/marie/PersonalityRenderer.js +97 -0
  66. package/dist/monolith/domain/marie/PersonalityRenderer.js.map +1 -0
  67. package/dist/monolith/infrastructure/Configuration.js +68 -0
  68. package/dist/monolith/infrastructure/Configuration.js.map +1 -0
  69. package/dist/monolith/infrastructure/CoreInfrastructure.js +204 -0
  70. package/dist/monolith/infrastructure/CoreInfrastructure.js.map +1 -0
  71. package/dist/monolith/infrastructure/ai/agents/MarieAscendant.js +3 -3
  72. package/dist/monolith/infrastructure/ai/agents/MarieAscendant.js.map +1 -1
  73. package/dist/monolith/infrastructure/ai/context/ContextArchiveService.js +6 -27
  74. package/dist/monolith/infrastructure/ai/context/ContextArchiveService.js.map +1 -1
  75. package/dist/monolith/infrastructure/ai/context/ContextManager.js +142 -131
  76. package/dist/monolith/infrastructure/ai/context/ContextManager.js.map +1 -1
  77. package/dist/monolith/infrastructure/ai/core/MarieEngine.js +115 -1077
  78. package/dist/monolith/infrastructure/ai/core/MarieEngine.js.map +1 -1
  79. package/dist/monolith/infrastructure/ai/core/MarieEventDispatcher.js +1 -37
  80. package/dist/monolith/infrastructure/ai/core/MarieEventDispatcher.js.map +1 -1
  81. package/dist/monolith/infrastructure/ai/core/MarieLockManager.js +6 -1
  82. package/dist/monolith/infrastructure/ai/core/MarieLockManager.js.map +1 -1
  83. package/dist/monolith/infrastructure/ai/core/MarieProgressTracker.js +172 -221
  84. package/dist/monolith/infrastructure/ai/core/MarieProgressTracker.js.map +1 -1
  85. package/dist/monolith/infrastructure/ai/core/MarieSanitizer.js +292 -141
  86. package/dist/monolith/infrastructure/ai/core/MarieSanitizer.js.map +1 -1
  87. package/dist/monolith/infrastructure/ai/core/MarieToolProcessor.js +331 -614
  88. package/dist/monolith/infrastructure/ai/core/MarieToolProcessor.js.map +1 -1
  89. package/dist/monolith/infrastructure/ai/core/MarieVitality.js +238 -0
  90. package/dist/monolith/infrastructure/ai/core/MarieVitality.js.map +1 -0
  91. package/dist/monolith/infrastructure/ai/core/SessionLogService.js +9 -2
  92. package/dist/monolith/infrastructure/ai/core/SessionLogService.js.map +1 -1
  93. package/dist/monolith/infrastructure/ai/providers/AIProvider.js +402 -1
  94. package/dist/monolith/infrastructure/ai/providers/AIProvider.js.map +1 -1
  95. package/dist/monolith/infrastructure/ai/providers/DreamBeesProvider.js +114 -0
  96. package/dist/monolith/infrastructure/ai/providers/DreamBeesProvider.js.map +1 -0
  97. package/dist/monolith/infrastructure/ai/providers/OpenRouterProvider.js +426 -392
  98. package/dist/monolith/infrastructure/ai/providers/OpenRouterProvider.js.map +1 -1
  99. package/dist/monolith/infrastructure/ai/providers/OpenRouterStreamParser.js +235 -241
  100. package/dist/monolith/infrastructure/ai/providers/OpenRouterStreamParser.js.map +1 -1
  101. package/dist/monolith/infrastructure/ai/workerAi.js +185 -0
  102. package/dist/monolith/infrastructure/ai/workerAi.js.map +1 -0
  103. package/dist/monolith/infrastructure/config/ConfigService.js +216 -503
  104. package/dist/monolith/infrastructure/config/ConfigService.js.map +1 -1
  105. package/dist/monolith/infrastructure/joy/CognitiveRituals.js +4 -165
  106. package/dist/monolith/infrastructure/joy/CognitiveRituals.js.map +1 -1
  107. package/dist/monolith/infrastructure/joy/JoyTools.js +14 -47
  108. package/dist/monolith/infrastructure/joy/JoyTools.js.map +1 -1
  109. package/dist/monolith/infrastructure/persistence/MarieMindAutonomics.js +4 -0
  110. package/dist/monolith/infrastructure/persistence/MarieMindAutonomics.js.map +1 -0
  111. package/dist/monolith/infrastructure/persistence/MarieMindEngine.js +11 -0
  112. package/dist/monolith/infrastructure/persistence/MarieMindEngine.js.map +1 -0
  113. package/dist/monolith/infrastructure/persistence/NoormmeAutonomics.js +123 -106
  114. package/dist/monolith/infrastructure/persistence/NoormmeAutonomics.js.map +1 -1
  115. package/dist/monolith/infrastructure/persistence/NoormmeEngine.js +508 -63
  116. package/dist/monolith/infrastructure/persistence/NoormmeEngine.js.map +1 -1
  117. package/dist/monolith/infrastructure/persistence/NoormmeSchema.js +68 -39
  118. package/dist/monolith/infrastructure/persistence/NoormmeSchema.js.map +1 -1
  119. package/dist/monolith/infrastructure/persistence/NoormmeSeeder.js +80 -67
  120. package/dist/monolith/infrastructure/persistence/NoormmeSeeder.js.map +1 -1
  121. package/dist/monolith/infrastructure/persistence/NoormmeTools.js +122 -75
  122. package/dist/monolith/infrastructure/persistence/NoormmeTools.js.map +1 -1
  123. package/dist/monolith/infrastructure/services/MarieMemoryStore.js +133 -134
  124. package/dist/monolith/infrastructure/services/MarieMemoryStore.js.map +1 -1
  125. package/dist/monolith/infrastructure/tools/MarieToolDefinitions.js +6 -30
  126. package/dist/monolith/infrastructure/tools/MarieToolDefinitions.js.map +1 -1
  127. package/dist/monolith/infrastructure/tools/PureStreamParser.js +68 -80
  128. package/dist/monolith/infrastructure/tools/PureStreamParser.js.map +1 -1
  129. package/dist/monolith/infrastructure/tools/SharedToolDefinitions.js +12 -11
  130. package/dist/monolith/infrastructure/tools/SharedToolDefinitions.js.map +1 -1
  131. package/dist/monolith/infrastructure/tools/SovereignTools.js +326 -0
  132. package/dist/monolith/infrastructure/tools/SovereignTools.js.map +1 -0
  133. package/dist/monolith/infrastructure/tools/ToolRegistry.js +45 -26
  134. package/dist/monolith/infrastructure/tools/ToolRegistry.js.map +1 -1
  135. package/dist/monolith/infrastructure/tools/definitions/AnalysisTools.js +39 -153
  136. package/dist/monolith/infrastructure/tools/definitions/AnalysisTools.js.map +1 -1
  137. package/dist/monolith/infrastructure/tools/definitions/AutomationTools.js +31 -46
  138. package/dist/monolith/infrastructure/tools/definitions/AutomationTools.js.map +1 -1
  139. package/dist/monolith/infrastructure/tools/definitions/ContextTools.js +41 -13
  140. package/dist/monolith/infrastructure/tools/definitions/ContextTools.js.map +1 -1
  141. package/dist/monolith/infrastructure/tools/definitions/CoreTools.js +10 -14
  142. package/dist/monolith/infrastructure/tools/definitions/CoreTools.js.map +1 -1
  143. package/dist/monolith/infrastructure/tools/definitions/DiagnosticTools.js +39 -70
  144. package/dist/monolith/infrastructure/tools/definitions/DiagnosticTools.js.map +1 -1
  145. package/dist/monolith/infrastructure/tools/definitions/NavigationTools.js +30 -181
  146. package/dist/monolith/infrastructure/tools/definitions/NavigationTools.js.map +1 -1
  147. package/dist/monolith/infrastructure/tools/definitions/PlanningTools.js +12 -9
  148. package/dist/monolith/infrastructure/tools/definitions/PlanningTools.js.map +1 -1
  149. package/dist/monolith/plumbing/Plumbing.js +238 -0
  150. package/dist/monolith/plumbing/Plumbing.js.map +1 -0
  151. package/dist/monolith/plumbing/PlumbingAnalysis.js +109 -0
  152. package/dist/monolith/plumbing/PlumbingAnalysis.js.map +1 -0
  153. package/dist/monolith/plumbing/PlumbingSystem.js +169 -0
  154. package/dist/monolith/plumbing/PlumbingSystem.js.map +1 -0
  155. package/dist/monolith/plumbing/analysis/ComplexityService.js +30 -34
  156. package/dist/monolith/plumbing/analysis/ComplexityService.js.map +1 -1
  157. package/dist/monolith/plumbing/analysis/DependencyService.js +55 -44
  158. package/dist/monolith/plumbing/analysis/DependencyService.js.map +1 -1
  159. package/dist/monolith/plumbing/analysis/DiscoveryService.js +40 -42
  160. package/dist/monolith/plumbing/analysis/DiscoveryService.js.map +1 -1
  161. package/dist/monolith/plumbing/analysis/JoyMapService.js +52 -56
  162. package/dist/monolith/plumbing/analysis/JoyMapService.js.map +1 -1
  163. package/dist/monolith/plumbing/analysis/LintService.js +118 -118
  164. package/dist/monolith/plumbing/analysis/LintService.js.map +1 -1
  165. package/dist/monolith/plumbing/analysis/MarieSentinelService.js +278 -268
  166. package/dist/monolith/plumbing/analysis/MarieSentinelService.js.map +1 -1
  167. package/dist/monolith/plumbing/analysis/QualityGuardrailService.js +116 -114
  168. package/dist/monolith/plumbing/analysis/QualityGuardrailService.js.map +1 -1
  169. package/dist/monolith/plumbing/analysis/SurgicalMender.js +57 -59
  170. package/dist/monolith/plumbing/analysis/SurgicalMender.js.map +1 -1
  171. package/dist/monolith/plumbing/analysis/TestService.js +89 -89
  172. package/dist/monolith/plumbing/analysis/TestService.js.map +1 -1
  173. package/dist/monolith/plumbing/filesystem/FileService.js +123 -195
  174. package/dist/monolith/plumbing/filesystem/FileService.js.map +1 -1
  175. package/dist/monolith/plumbing/filesystem/PathResolver.js +7 -8
  176. package/dist/monolith/plumbing/filesystem/PathResolver.js.map +1 -1
  177. package/dist/monolith/plumbing/git/GitService.js +4 -4
  178. package/dist/monolith/plumbing/git/GitService.js.map +1 -1
  179. package/dist/monolith/plumbing/lsp/SymbolService.js +5 -34
  180. package/dist/monolith/plumbing/lsp/SymbolService.js.map +1 -1
  181. package/dist/monolith/plumbing/terminal/ProcessRegistry.js +20 -22
  182. package/dist/monolith/plumbing/terminal/ProcessRegistry.js.map +1 -1
  183. package/dist/monolith/plumbing/terminal/TerminalService.js +127 -141
  184. package/dist/monolith/plumbing/terminal/TerminalService.js.map +1 -1
  185. package/dist/monolith/plumbing/utils/EnvironmentUtils.js +3 -23
  186. package/dist/monolith/plumbing/utils/EnvironmentUtils.js.map +1 -1
  187. package/dist/monolith/plumbing/utils/JsonUtils.js +252 -311
  188. package/dist/monolith/plumbing/utils/JsonUtils.js.map +1 -1
  189. package/dist/monolith/plumbing/utils/PlumbingCore.js +549 -0
  190. package/dist/monolith/plumbing/utils/PlumbingCore.js.map +1 -0
  191. package/dist/monolith/plumbing/utils/PrefixTree.js +61 -114
  192. package/dist/monolith/plumbing/utils/PrefixTree.js.map +1 -1
  193. package/dist/monolith/plumbing/utils/StreamTagDetector.js +89 -127
  194. package/dist/monolith/plumbing/utils/StreamTagDetector.js.map +1 -1
  195. package/dist/monolith/plumbing/utils/StringUtils.js +87 -89
  196. package/dist/monolith/plumbing/utils/StringUtils.js.map +1 -1
  197. package/dist/monolith/runtime/MarieRuntime.js +76 -499
  198. package/dist/monolith/runtime/MarieRuntime.js.map +1 -1
  199. package/dist/monolith/runtime/RuntimeAdapterBase.js +1 -1
  200. package/dist/monolith/runtime/RuntimeAdapterBase.js.map +1 -1
  201. package/dist/monolith/runtime/providerFactory.js +1 -7
  202. package/dist/monolith/runtime/providerFactory.js.map +1 -1
  203. package/dist/monolith/services/HealthService.js +29 -32
  204. package/dist/monolith/services/HealthService.js.map +1 -1
  205. package/dist/monolith/services/JoyAutomationService.js +58 -95
  206. package/dist/monolith/services/JoyAutomationService.js.map +1 -1
  207. package/dist/monolith/services/MarieAutomationService.js +59 -0
  208. package/dist/monolith/services/MarieAutomationService.js.map +1 -0
  209. package/dist/monolith/services/MarieGhostService.js +46 -173
  210. package/dist/monolith/services/MarieGhostService.js.map +1 -1
  211. package/dist/monolith/services/MarieServices.js +102 -0
  212. package/dist/monolith/services/MarieServices.js.map +1 -0
  213. package/dist/monolith/services/MarieTypes.js +2 -0
  214. package/dist/monolith/services/MarieTypes.js.map +1 -0
  215. package/dist/monolith/services/UpdateService.js +47 -49
  216. package/dist/monolith/services/UpdateService.js.map +1 -1
  217. package/dist/prompts.js +11 -5
  218. package/dist/prompts.js.map +1 -1
  219. package/dist/test_prefix_tree.js +9 -9
  220. package/dist/test_prefix_tree.js.map +1 -1
  221. package/package.json +18 -89
  222. package/run_test.js +5 -0
  223. package/.marie_visual_verify_1771225696548/progress_bar_check.txt +0 -1
  224. package/dist/extension.cjs +0 -1155
  225. package/dist/extension.js +0 -474
  226. package/dist/extension.js.map +0 -1
  227. package/dist/monolith/adapters/VscodeMarieAdapter.js +0 -81
  228. package/dist/monolith/adapters/VscodeMarieAdapter.js.map +0 -1
  229. package/dist/monolith/infrastructure/ai/core/GhostPort.js +0 -2
  230. package/dist/monolith/infrastructure/ai/core/GhostPort.js.map +0 -1
  231. package/dist/monolith/infrastructure/ai/core/VscodeFileSystemPort.js +0 -33
  232. package/dist/monolith/infrastructure/ai/core/VscodeFileSystemPort.js.map +0 -1
  233. package/dist/monolith/infrastructure/ai/providers/AnthropicProvider.js +0 -154
  234. package/dist/monolith/infrastructure/ai/providers/AnthropicProvider.js.map +0 -1
  235. package/dist/monolith/infrastructure/ai/providers/CerebrasProvider.js +0 -214
  236. package/dist/monolith/infrastructure/ai/providers/CerebrasProvider.js.map +0 -1
  237. package/dist/monolith/plumbing/ui/DecorationService.js +0 -54
  238. package/dist/monolith/plumbing/ui/DecorationService.js.map +0 -1
  239. package/dist/monolith/services/JoyLogService.js +0 -48
  240. package/dist/monolith/services/JoyLogService.js.map +0 -1
  241. package/dist/monolith/services/JoyService.js +0 -209
  242. package/dist/monolith/services/JoyService.js.map +0 -1
  243. package/dist/monolith/services/MarieSCMProvider.js +0 -41
  244. package/dist/monolith/services/MarieSCMProvider.js.map +0 -1
  245. package/dist/webview-ui/main.css +0 -1
  246. package/dist/webview-ui/main.js +0 -108
  247. package/lint_output.txt +0 -705
  248. package/lint_output_v2.txt +0 -711
  249. package/test-mind-p6.sqlite +0 -0
  250. package/test-mind-p6.sqlite-shm +0 -0
  251. package/test-mind-p6.sqlite-wal +0 -0
@@ -1,118 +1,135 @@
1
- import { MarieLockManager } from "../ai/core/MarieLockManager.js";
1
+ import { MarieVitality } from "../ai/core/MarieVitality.js";
2
+ import { MarieProgressTracker } from "../ai/core/MarieProgressTracker.js";
3
+ /** Race a promise against a timeout. Returns the result or undefined if timed out. */
4
+ function withTimeout(promise, ms, label) {
5
+ let timer;
6
+ return Promise.race([
7
+ promise.then((result) => {
8
+ clearTimeout(timer);
9
+ return result;
10
+ }),
11
+ new Promise((resolve) => {
12
+ timer = setTimeout(() => {
13
+ // Reduced log noise for timeouts
14
+ resolve(undefined);
15
+ }, ms);
16
+ if (timer && typeof timer === "object" && "unref" in timer)
17
+ timer.unref();
18
+ }),
19
+ ]);
20
+ }
21
+ const AUTONOMIC_TIMEOUT_MS = 10_000; // 10s cap for each heavy operation
2
22
  /**
3
- * NoormmeAutonomics - Handles background cognitive pulses, health probes, and DNA tuning.
23
+ * Handles background cognitive pulses, health probes, and DNA tuning.
4
24
  */
5
- export class NoormmeAutonomics {
6
- static async runPulses(db) {
7
- // PHASE 21: Autonomic Lock
8
- // Prevent concurrent maintenance tasks across sessions
9
- const lockId = "autonomic_pulse_lock";
10
- let resolvePulse;
11
- const pulsePromise = new Promise(r => resolvePulse = r);
12
- try {
13
- // Wait for existing pulse or acquire
14
- await MarieLockManager.global.acquireLock(lockId, true);
15
- MarieLockManager.global.registerExecution(lockId, true, pulsePromise);
16
- console.log("[NoormmeAutonomics] Starting Sovereign Autonomic Pulses...");
17
- // 1. Agentic DNA Tuning
18
- await this.tuneDNA(db);
19
- // 2. Ritual Orchestration
20
- await this.orchestrateRituals(db);
21
- // 3. Health Probes
22
- await this.runHealthProbes(db);
23
- // 4. Governance Audit
24
- await this.runGovernanceAudit(db);
25
- }
26
- finally {
27
- if (resolvePulse)
28
- resolvePulse();
25
+ export async function runPulses(db) {
26
+ const lockId = "autonomic_pulse_lock";
27
+ // PHASE: Throttling (Run once every 24 hours)
28
+ try {
29
+ const lastRunResult = (await db.execute("SELECT value FROM telemetry WHERE key = 'last_autonomic_run'"));
30
+ const lastRun = lastRunResult.rows?.[0]?.value;
31
+ if (lastRun && Date.now() - Number(lastRun) < 24 * 60 * 60 * 1000) {
32
+ return; // Skip if run recently
29
33
  }
30
34
  }
31
- static async tuneDNA(db) {
32
- try {
33
- const sessionCountResult = await db.execute("SELECT COUNT(*) as count FROM sessions");
34
- const sessionCount = sessionCountResult.rows?.[0]?.count ?? 0;
35
- const dynamicAggressiveness = Math.min(0.9, 0.6 + (sessionCount / 1000));
36
- db.config.agentic.evolution.mutationAggressiveness = dynamicAggressiveness;
37
- console.log(`[NoormmeAutonomics] DNA Resonated: ${dynamicAggressiveness.toFixed(2)}`);
38
- }
39
- catch (e) {
40
- console.warn("[NoormmeAutonomics] DNA tuning failed", e);
35
+ catch (e) { }
36
+ let resolvePulse;
37
+ const pulsePromise = new Promise((r) => (resolvePulse = r));
38
+ try {
39
+ const tracker = new MarieProgressTracker(undefined, {
40
+ runId: "autonomic",
41
+ startedAt: Date.now(),
42
+ steps: 0,
43
+ tools: 0,
44
+ objectives: [],
45
+ achieved: [],
46
+ });
47
+ const vitality = new MarieVitality(tracker);
48
+ await vitality.acquireLock(lockId, true);
49
+ vitality.registerExecution(lockId, true, pulsePromise);
50
+ // console.log("[NoormmeAutonomics] Maintenance in progress...");
51
+ const start = Date.now();
52
+ await tuneDNA(db);
53
+ await orchestrateRituals(db);
54
+ await runHealthProbes(db);
55
+ await runGovernanceAudit(db);
56
+ // Record last run
57
+ await db.execute("INSERT OR REPLACE INTO telemetry (key, value) VALUES ('last_autonomic_run', ?)", [Date.now().toString()]);
58
+ // console.log(`[NoormmeAutonomics] Maintenance complete (took ${Date.now() - start}ms).`);
59
+ }
60
+ catch (e) {
61
+ // console.warn("[NoormmeAutonomics] Maintenance cycle encountered issues", e);
62
+ }
63
+ finally {
64
+ if (resolvePulse)
65
+ resolvePulse();
66
+ }
67
+ }
68
+ async function tuneDNA(db) {
69
+ try {
70
+ const sessionCountResult = (await db.execute("SELECT COUNT(*) as count FROM sessions"));
71
+ const sessionCount = sessionCountResult.rows?.[0]?.count ?? 0;
72
+ const dynamicAggressiveness = Math.min(0.9, 0.6 + sessionCount / 1000);
73
+ db.config.agentic.evolution.mutationAggressiveness =
74
+ dynamicAggressiveness;
75
+ }
76
+ catch (e) { }
77
+ }
78
+ async function orchestrateRituals(db) {
79
+ try {
80
+ await withTimeout(db.agent.cortex.rituals.runPendingRituals(), AUTONOMIC_TIMEOUT_MS, "runPendingRituals");
81
+ const result = (await db.execute("SELECT id FROM agent_rituals LIMIT 1"));
82
+ const rows = result.rows || [];
83
+ if (rows.length === 0) {
84
+ await db.agent.cortex.rituals.scheduleRitual("Daily Mind Compression", "compression", "daily");
85
+ await db.agent.cortex.rituals.scheduleRitual("Structural Optimization", "optimization", "weekly");
86
+ await db.agent.cortex.rituals.scheduleRitual("Knowledge Pruning", "pruning", "daily");
87
+ await db.agent.cortex.rituals.scheduleRitual("Sovereign Evolution", "evolution", "weekly");
41
88
  }
89
+ await compressMind(db);
90
+ await pruneKnowledge(db);
91
+ // Skip heavy self-iteration during startup pulse
92
+ }
93
+ catch (e) { }
94
+ }
95
+ async function runHealthProbes(db) {
96
+ try {
97
+ await withTimeout(db.agent.cortex.tests.runAllProbes(), AUTONOMIC_TIMEOUT_MS, "runAllProbes");
42
98
  }
43
- static async orchestrateRituals(db) {
44
- try {
45
- const rituals = await db.agent.cortex.rituals.runPendingRituals();
46
- console.log(`[NoormmeAutonomics] Rituals executed: ${rituals}`);
47
- const rows = await db.execute("SELECT id FROM agent_rituals LIMIT 1");
48
- if (rows.length === 0) {
49
- console.log("[NoormmeAutonomics] Scheduling baseline rituals...");
50
- await db.agent.cortex.rituals.scheduleRitual("Daily Mind Compression", "compression", "daily");
51
- await db.agent.cortex.rituals.scheduleRitual("Structural Optimization", "optimization", "weekly");
52
- await db.agent.cortex.rituals.scheduleRitual("Knowledge Pruning", "pruning", "daily");
53
- await db.agent.cortex.rituals.scheduleRitual("Sovereign Evolution", "evolution", "weekly");
54
- }
55
- // PHASE 21: Session-Proximity Check
56
- // Do not prune memory if a session was active very recently (< 1 hour)
57
- const recentSession = await db.execute(`
99
+ catch (e) { }
100
+ }
101
+ async function runGovernanceAudit(db) {
102
+ try {
103
+ await withTimeout(db.agent.cortex.policies.evaluateContext({}), AUTONOMIC_TIMEOUT_MS, "evaluateAllPolicies");
104
+ }
105
+ catch (e) { }
106
+ }
107
+ async function compressMind(db) {
108
+ try {
109
+ // console.log("[NoormmeAutonomics] Running memory consolidation...");
110
+ await withTimeout(db.execute(`
111
+ DELETE FROM sessions
112
+ WHERE id NOT IN (
58
113
  SELECT id FROM sessions
59
- WHERE updated_at > datetime('now', '-1 hour')
60
- LIMIT 1
61
- `);
62
- if (recentSession.length > 0) {
63
- console.log("[NoormmeAutonomics] Active session detected within 1 hour. Delaying aggressive knowledge pruning.");
64
- }
65
- else {
66
- void db.agent.cortex.selfIterate().catch(e => console.warn("[NoormmeAutonomics] Self-iteration pulse failed", e));
67
- }
68
- }
69
- catch (e) {
70
- console.warn("[NoormmeAutonomics] Ritual orchestration failed", e);
71
- }
114
+ ORDER BY timestamp DESC
115
+ LIMIT 1000
116
+ )
117
+ AND NOT EXISTS (
118
+ SELECT 1 FROM session_metadata
119
+ WHERE session_metadata.id = sessions.sessionId
120
+ AND session_metadata.isPinned = 1
121
+ )`), 5000, "cleanupSessions");
72
122
  }
73
- static async runHealthProbes(db) {
74
- try {
75
- console.log("[NoormmeAutonomics] Running autonomic health probes...");
76
- await db.agent.cortex.tests.registerProbe("Core Integrity", "audit:check_schema_consistency");
77
- await db.agent.cortex.tests.registerProbe("Memory Coherence", "audit:check_memory_integrity");
78
- await db.agent.cortex.tests.registerProbe("Data Sanity", "audit:check_data_integrity");
79
- void db.agent.cortex.tests.runAllProbes().then(results => {
80
- const failures = results.filter(r => !r.success);
81
- if (failures.length > 0) {
82
- console.warn(`[NoormmeAutonomics] 💀 HEALTH BREACH: ${failures.map(f => f.name).join(", ")}`);
83
- }
84
- else {
85
- console.log("[NoormmeAutonomics] Health: ALL GREEN");
86
- }
87
- });
88
- }
89
- catch (e) {
90
- console.warn("[NoormmeAutonomics] Health probes failed", e);
91
- }
123
+ catch (e) {
124
+ // console.warn("[NoormmeAutonomics] Failed to prune unpinned histories.", e);
92
125
  }
93
- static async runGovernanceAudit(db) {
94
- try {
95
- console.log("[NoormmeAutonomics] Performing governance audit...");
96
- const auditResults = await db.agent.cortex.governor.performAudit();
97
- if (auditResults.issues?.length > 0) {
98
- console.warn(`[NoormmeAutonomics] Governance Issues: ${auditResults.issues.join(", ")}`);
99
- }
100
- const repairs = await db.agent.cortex.governor.suggestRepairs();
101
- for (const repair of repairs) {
102
- if (repair.includes("index") || repair.includes("INDEX")) {
103
- try {
104
- await db.execute(repair);
105
- console.log(`[NoormmeAutonomics] Applied Repair: ${repair}`);
106
- }
107
- catch (e) {
108
- console.warn(`[NoormmeAutonomics] Repair failed: ${repair}`, e);
109
- }
110
- }
111
- }
112
- }
113
- catch (e) {
114
- console.warn("[NoormmeAutonomics] Governance audit failed", e);
115
- }
126
+ }
127
+ async function pruneKnowledge(db) {
128
+ try {
129
+ // console.log("[NoormmeAutonomics] Pruning obsolete knowledge points...");
130
+ // Decay high-volatility, low-reliance anchors
131
+ await withTimeout(db.execute("DELETE FROM anchors WHERE timestamp < ? AND type = 'ephemeral'", [Date.now() - 7 * 24 * 60 * 60 * 1000]), 5000, "pruneEphemeralKnowledge");
116
132
  }
133
+ catch (e) { }
117
134
  }
118
135
  //# sourceMappingURL=NoormmeAutonomics.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NoormmeAutonomics.js","sourceRoot":"","sources":["../../../../src/monolith/infrastructure/persistence/NoormmeAutonomics.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElE;;GAEG;AACH,MAAM,OAAO,iBAAiB;IACnB,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,EAAW;QACrC,2BAA2B;QAC3B,uDAAuD;QACvD,MAAM,MAAM,GAAG,sBAAsB,CAAC;QAEtC,IAAI,YAAsC,CAAC;QAC3C,MAAM,YAAY,GAAG,IAAI,OAAO,CAAO,CAAC,CAAC,EAAE,CAAC,YAAY,GAAG,CAAC,CAAC,CAAC;QAE9D,IAAI,CAAC;YACD,qCAAqC;YACrC,MAAM,gBAAgB,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;YACxD,gBAAgB,CAAC,MAAM,CAAC,iBAAiB,CAAC,MAAM,EAAE,IAAI,EAAE,YAAY,CAAC,CAAC;YAEtE,OAAO,CAAC,GAAG,CAAC,4DAA4D,CAAC,CAAC;YAE1E,wBAAwB;YACxB,MAAM,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;YAEvB,0BAA0B;YAC1B,MAAM,IAAI,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAC;YAElC,mBAAmB;YACnB,MAAM,IAAI,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC;YAE/B,sBAAsB;YACtB,MAAM,IAAI,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAC;QACtC,CAAC;gBAAS,CAAC;YACP,IAAI,YAAY;gBA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AM,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,EAAE,CAAC;YAChE,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;gBAC3B,IAAI,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;oBACvD,IAAI,CAAC;wBACD,MAAM,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;wBACzB,OAAO,CAAC,GAAG,CAAC,uCAAuC,MAAM,EAAE,CAAC,CAAC;oBACjE,CAAC;oBAAC,OAAO,CAAC,EAAE,CAAC;wBACT,OAAO,CAAC,IAAI,CAAC,sCAAsC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC;oBACpE,CAAC;gBACL,CAAC;YACL,CAAC;QACL,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACT,OAAO,CAAC,IAAI,CAAC,6CAA6C,EAAE,CAAC,CAAC,CAAC;QACnE,CAAC;IACL,CAAC;CACJ"}
1
+ {"version":3,"file":"NoormmeAutonomics.js","sourceRoot":"","sources":["../../../../src/monolith/infrastructure/persistence/NoormmeAutonomics.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAE1E,sFAAsF;AACtF,SAAS,WAAW,CAClB,OAAmB,EACnB,EAAU,EACV,KAAa;IAEb,IAAI,KAAoC,CAAC;IACzC,OAAO,OAAO,CAAC,IAAI,CAAC;QAClB,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE;YACtB,YAAY,CAAC,KAAK,CAAC,CAAC;YACpB,OAAO,MAAM,CAAC;QAChB,CAAC,CAAC;QACF,IAAI,OAAO,CAAY,CAAC,OAAO,EAAE,EAAE;YACjC,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE;gBACtB,iCAAiC;gBACj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