@noorm/marie-cli 0.1.17 → 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.
- package/README.md +7 -15
- package/SENTINEL.md +4 -7
- package/dist/cli-new/components/AgenticSpinner.js +28 -0
- package/dist/cli-new/components/AgenticSpinner.js.map +1 -0
- package/dist/cli-new/components/App.js +16 -63
- package/dist/cli-new/components/App.js.map +1 -1
- package/dist/cli-new/components/ApprovalDialog.js +3 -2
- package/dist/cli-new/components/ApprovalDialog.js.map +1 -1
- package/dist/cli-new/components/Banner.js +16 -5
- package/dist/cli-new/components/Banner.js.map +1 -1
- package/dist/cli-new/components/ChatArea.js +6 -7
- package/dist/cli-new/components/ChatArea.js.map +1 -1
- package/dist/cli-new/components/Header.js +14 -8
- package/dist/cli-new/components/Header.js.map +1 -1
- package/dist/cli-new/components/InputArea.js +98 -31
- package/dist/cli-new/components/InputArea.js.map +1 -1
- package/dist/cli-new/components/MessageBubble.js +28 -19
- package/dist/cli-new/components/MessageBubble.js.map +1 -1
- package/dist/cli-new/components/SessionSwitcher.js +6 -9
- package/dist/cli-new/components/SessionSwitcher.js.map +1 -1
- package/dist/cli-new/components/SetupWizard.js +80 -257
- package/dist/cli-new/components/SetupWizard.js.map +1 -1
- package/dist/cli-new/components/ToolCallDisplay.js +20 -5
- package/dist/cli-new/components/ToolCallDisplay.js.map +1 -1
- package/dist/cli-new/components/WizardSteps.js +22 -0
- package/dist/cli-new/components/WizardSteps.js.map +1 -0
- package/dist/cli-new/constants/SetupConstants.js +42 -0
- package/dist/cli-new/constants/SetupConstants.js.map +1 -0
- package/dist/cli-new/hooks/useGit.js +19 -62
- package/dist/cli-new/hooks/useGit.js.map +1 -1
- package/dist/cli-new/hooks/useMarie.js +26 -18
- package/dist/cli-new/hooks/useMarie.js.map +1 -1
- package/dist/cli-new/hooks/useSessions.js +1 -1
- package/dist/cli-new/hooks/useSessions.js.map +1 -1
- package/dist/cli-new/hooks/useSetupWizard.js +88 -0
- package/dist/cli-new/hooks/useSetupWizard.js.map +1 -0
- package/dist/cli-new/hooks/useUpdateCheck.js +4 -3
- package/dist/cli-new/hooks/useUpdateCheck.js.map +1 -1
- package/dist/cli-new/index.js +2 -4
- package/dist/cli-new/index.js.map +1 -1
- package/dist/cli-new/services/CommandService.js +104 -0
- package/dist/cli-new/services/CommandService.js.map +1 -0
- package/dist/cli-new/services/GitService.js +91 -0
- package/dist/cli-new/services/GitService.js.map +1 -0
- package/dist/cli-new/services/MarieService.js +77 -0
- package/dist/cli-new/services/MarieService.js.map +1 -0
- package/dist/cli-new/services/auth-server.js +128 -0
- package/dist/cli-new/services/auth-server.js.map +1 -0
- package/dist/cli-new/styles/theme.js +17 -17
- package/dist/cli-new/styles/theme.js.map +1 -1
- package/dist/cli-new/utils/version.js +24 -0
- package/dist/cli-new/utils/version.js.map +1 -0
- package/dist/monolith/adapters/CliMarieAdapter.js +19 -18
- package/dist/monolith/adapters/CliMarieAdapter.js.map +1 -1
- package/dist/monolith/cli/CliFileSystemPort.js +17 -3
- package/dist/monolith/cli/CliFileSystemPort.js.map +1 -1
- package/dist/monolith/cli/MarieToolDefinitionsCLI.js +44 -33
- package/dist/monolith/cli/MarieToolDefinitionsCLI.js.map +1 -1
- package/dist/monolith/cli/index.js +11 -20
- package/dist/monolith/cli/index.js.map +1 -1
- package/dist/monolith/cli/services/JoyAutomationServiceCLI.js +15 -62
- package/dist/monolith/cli/services/JoyAutomationServiceCLI.js.map +1 -1
- package/dist/monolith/cli/storage.js +154 -65
- package/dist/monolith/cli/storage.js.map +1 -1
- package/dist/monolith/domain/joy/RitualService.js +44 -46
- package/dist/monolith/domain/joy/RitualService.js.map +1 -1
- package/dist/monolith/domain/marie/MarieCortex.js +148 -0
- package/dist/monolith/domain/marie/MarieCortex.js.map +1 -0
- package/dist/monolith/domain/marie/PersonalityRenderer.js +97 -0
- package/dist/monolith/domain/marie/PersonalityRenderer.js.map +1 -0
- package/dist/monolith/infrastructure/Configuration.js +68 -0
- package/dist/monolith/infrastructure/Configuration.js.map +1 -0
- package/dist/monolith/infrastructure/CoreInfrastructure.js +204 -0
- package/dist/monolith/infrastructure/CoreInfrastructure.js.map +1 -0
- package/dist/monolith/infrastructure/ai/agents/MarieAscendant.js +3 -3
- package/dist/monolith/infrastructure/ai/agents/MarieAscendant.js.map +1 -1
- package/dist/monolith/infrastructure/ai/context/ContextArchiveService.js +51 -57
- package/dist/monolith/infrastructure/ai/context/ContextArchiveService.js.map +1 -1
- package/dist/monolith/infrastructure/ai/context/ContextManager.js +142 -98
- package/dist/monolith/infrastructure/ai/context/ContextManager.js.map +1 -1
- package/dist/monolith/infrastructure/ai/core/MarieEngine.js +104 -556
- package/dist/monolith/infrastructure/ai/core/MarieEngine.js.map +1 -1
- package/dist/monolith/infrastructure/ai/core/MarieEventDispatcher.js +1 -37
- package/dist/monolith/infrastructure/ai/core/MarieEventDispatcher.js.map +1 -1
- package/dist/monolith/infrastructure/ai/core/MarieLockManager.js +30 -5
- package/dist/monolith/infrastructure/ai/core/MarieLockManager.js.map +1 -1
- package/dist/monolith/infrastructure/ai/core/MarieProgressTracker.js +176 -196
- package/dist/monolith/infrastructure/ai/core/MarieProgressTracker.js.map +1 -1
- package/dist/monolith/infrastructure/ai/core/MariePulseService.js +41 -7
- package/dist/monolith/infrastructure/ai/core/MariePulseService.js.map +1 -1
- package/dist/monolith/infrastructure/ai/core/MarieSanitizer.js +303 -63
- package/dist/monolith/infrastructure/ai/core/MarieSanitizer.js.map +1 -1
- package/dist/monolith/infrastructure/ai/core/MarieSemaphore.js +47 -4
- package/dist/monolith/infrastructure/ai/core/MarieSemaphore.js.map +1 -1
- package/dist/monolith/infrastructure/ai/core/MarieSession.js +95 -15
- package/dist/monolith/infrastructure/ai/core/MarieSession.js.map +1 -1
- package/dist/monolith/infrastructure/ai/core/MarieStabilityMonitor.js +21 -0
- package/dist/monolith/infrastructure/ai/core/MarieStabilityMonitor.js.map +1 -1
- package/dist/monolith/infrastructure/ai/core/MarieToolMender.js +12 -0
- package/dist/monolith/infrastructure/ai/core/MarieToolMender.js.map +1 -1
- package/dist/monolith/infrastructure/ai/core/MarieToolProcessor.js +339 -481
- package/dist/monolith/infrastructure/ai/core/MarieToolProcessor.js.map +1 -1
- package/dist/monolith/infrastructure/ai/core/MarieVitality.js +238 -0
- package/dist/monolith/infrastructure/ai/core/MarieVitality.js.map +1 -0
- package/dist/monolith/infrastructure/ai/core/ReasoningBudget.js +23 -12
- package/dist/monolith/infrastructure/ai/core/ReasoningBudget.js.map +1 -1
- package/dist/monolith/infrastructure/ai/core/SessionLogService.js +9 -2
- package/dist/monolith/infrastructure/ai/core/SessionLogService.js.map +1 -1
- package/dist/monolith/infrastructure/ai/providers/AIProvider.js +402 -1
- package/dist/monolith/infrastructure/ai/providers/AIProvider.js.map +1 -1
- package/dist/monolith/infrastructure/ai/providers/DreamBeesProvider.js +114 -0
- package/dist/monolith/infrastructure/ai/providers/DreamBeesProvider.js.map +1 -0
- package/dist/monolith/infrastructure/ai/providers/OpenRouterProvider.js +426 -370
- package/dist/monolith/infrastructure/ai/providers/OpenRouterProvider.js.map +1 -1
- package/dist/monolith/infrastructure/ai/providers/OpenRouterStreamParser.js +235 -241
- package/dist/monolith/infrastructure/ai/providers/OpenRouterStreamParser.js.map +1 -1
- package/dist/monolith/infrastructure/ai/workerAi.js +185 -0
- package/dist/monolith/infrastructure/ai/workerAi.js.map +1 -0
- package/dist/monolith/infrastructure/config/ConfigService.js +216 -359
- package/dist/monolith/infrastructure/config/ConfigService.js.map +1 -1
- package/dist/monolith/infrastructure/joy/CognitiveRituals.js +8 -0
- package/dist/monolith/infrastructure/joy/CognitiveRituals.js.map +1 -0
- package/dist/monolith/infrastructure/joy/JoyTools.js +23 -43
- package/dist/monolith/infrastructure/joy/JoyTools.js.map +1 -1
- package/dist/monolith/infrastructure/persistence/MarieMindAutonomics.js +4 -0
- package/dist/monolith/infrastructure/persistence/MarieMindAutonomics.js.map +1 -0
- package/dist/monolith/infrastructure/persistence/MarieMindEngine.js +11 -0
- package/dist/monolith/infrastructure/persistence/MarieMindEngine.js.map +1 -0
- package/dist/monolith/infrastructure/persistence/NoormmeAutonomics.js +135 -0
- package/dist/monolith/infrastructure/persistence/NoormmeAutonomics.js.map +1 -0
- package/dist/monolith/infrastructure/persistence/NoormmeEngine.js +523 -0
- package/dist/monolith/infrastructure/persistence/NoormmeEngine.js.map +1 -0
- package/dist/monolith/infrastructure/persistence/NoormmeSchema.js +179 -0
- package/dist/monolith/infrastructure/persistence/NoormmeSchema.js.map +1 -0
- package/dist/monolith/infrastructure/persistence/NoormmeSeeder.js +94 -0
- package/dist/monolith/infrastructure/persistence/NoormmeSeeder.js.map +1 -0
- package/dist/monolith/infrastructure/persistence/NoormmeTools.js +371 -0
- package/dist/monolith/infrastructure/persistence/NoormmeTools.js.map +1 -0
- package/dist/monolith/infrastructure/services/MarieMemoryStore.js +133 -134
- package/dist/monolith/infrastructure/services/MarieMemoryStore.js.map +1 -1
- package/dist/monolith/infrastructure/tools/MarieToolDefinitions.js +6 -1578
- package/dist/monolith/infrastructure/tools/MarieToolDefinitions.js.map +1 -1
- package/dist/monolith/infrastructure/tools/PureStreamParser.js +68 -80
- package/dist/monolith/infrastructure/tools/PureStreamParser.js.map +1 -1
- package/dist/monolith/infrastructure/tools/SharedToolDefinitions.js +12 -11
- package/dist/monolith/infrastructure/tools/SharedToolDefinitions.js.map +1 -1
- package/dist/monolith/infrastructure/tools/SovereignTools.js +326 -0
- package/dist/monolith/infrastructure/tools/SovereignTools.js.map +1 -0
- package/dist/monolith/infrastructure/tools/ToolRegistry.js +45 -26
- package/dist/monolith/infrastructure/tools/ToolRegistry.js.map +1 -1
- package/dist/monolith/infrastructure/tools/definitions/AnalysisTools.js +232 -0
- package/dist/monolith/infrastructure/tools/definitions/AnalysisTools.js.map +1 -0
- package/dist/monolith/infrastructure/tools/definitions/AutomationTools.js +274 -0
- package/dist/monolith/infrastructure/tools/definitions/AutomationTools.js.map +1 -0
- package/dist/monolith/infrastructure/tools/definitions/ContextTools.js +71 -0
- package/dist/monolith/infrastructure/tools/definitions/ContextTools.js.map +1 -0
- package/dist/monolith/infrastructure/tools/definitions/CoreTools.js +37 -0
- package/dist/monolith/infrastructure/tools/definitions/CoreTools.js.map +1 -0
- package/dist/monolith/infrastructure/tools/definitions/DiagnosticTools.js +154 -0
- package/dist/monolith/infrastructure/tools/definitions/DiagnosticTools.js.map +1 -0
- package/dist/monolith/infrastructure/tools/definitions/NavigationTools.js +197 -0
- package/dist/monolith/infrastructure/tools/definitions/NavigationTools.js.map +1 -0
- package/dist/monolith/infrastructure/tools/definitions/PlanningTools.js +300 -0
- package/dist/monolith/infrastructure/tools/definitions/PlanningTools.js.map +1 -0
- package/dist/monolith/plumbing/Plumbing.js +238 -0
- package/dist/monolith/plumbing/Plumbing.js.map +1 -0
- package/dist/monolith/plumbing/PlumbingAnalysis.js +109 -0
- package/dist/monolith/plumbing/PlumbingAnalysis.js.map +1 -0
- package/dist/monolith/plumbing/PlumbingSystem.js +169 -0
- package/dist/monolith/plumbing/PlumbingSystem.js.map +1 -0
- package/dist/monolith/plumbing/analysis/ComplexityService.js +30 -34
- package/dist/monolith/plumbing/analysis/ComplexityService.js.map +1 -1
- package/dist/monolith/plumbing/analysis/DependencyService.js +55 -44
- package/dist/monolith/plumbing/analysis/DependencyService.js.map +1 -1
- package/dist/monolith/plumbing/analysis/DiscoveryService.js +40 -42
- package/dist/monolith/plumbing/analysis/DiscoveryService.js.map +1 -1
- package/dist/monolith/plumbing/analysis/JoyMapService.js +52 -56
- package/dist/monolith/plumbing/analysis/JoyMapService.js.map +1 -1
- package/dist/monolith/plumbing/analysis/LintService.js +118 -118
- package/dist/monolith/plumbing/analysis/LintService.js.map +1 -1
- package/dist/monolith/plumbing/analysis/MarieSentinelService.js +278 -269
- package/dist/monolith/plumbing/analysis/MarieSentinelService.js.map +1 -1
- package/dist/monolith/plumbing/analysis/QualityGuardrailService.js +116 -114
- package/dist/monolith/plumbing/analysis/QualityGuardrailService.js.map +1 -1
- package/dist/monolith/plumbing/analysis/SurgicalMender.js +57 -59
- package/dist/monolith/plumbing/analysis/SurgicalMender.js.map +1 -1
- package/dist/monolith/plumbing/analysis/TestService.js +89 -89
- package/dist/monolith/plumbing/analysis/TestService.js.map +1 -1
- package/dist/monolith/plumbing/filesystem/FileService.js +123 -195
- package/dist/monolith/plumbing/filesystem/FileService.js.map +1 -1
- package/dist/monolith/plumbing/filesystem/PathResolver.js +7 -8
- package/dist/monolith/plumbing/filesystem/PathResolver.js.map +1 -1
- package/dist/monolith/plumbing/git/GitService.js +4 -4
- package/dist/monolith/plumbing/git/GitService.js.map +1 -1
- package/dist/monolith/plumbing/lsp/SymbolService.js +5 -34
- package/dist/monolith/plumbing/lsp/SymbolService.js.map +1 -1
- package/dist/monolith/plumbing/terminal/ProcessRegistry.js +20 -22
- package/dist/monolith/plumbing/terminal/ProcessRegistry.js.map +1 -1
- package/dist/monolith/plumbing/terminal/TerminalService.js +127 -136
- package/dist/monolith/plumbing/terminal/TerminalService.js.map +1 -1
- package/dist/monolith/plumbing/utils/EnvironmentUtils.js +3 -23
- package/dist/monolith/plumbing/utils/EnvironmentUtils.js.map +1 -1
- package/dist/monolith/plumbing/utils/JsonUtils.js +252 -311
- package/dist/monolith/plumbing/utils/JsonUtils.js.map +1 -1
- package/dist/monolith/plumbing/utils/MutexUtils.js.map +1 -1
- package/dist/monolith/plumbing/utils/PlumbingCore.js +549 -0
- package/dist/monolith/plumbing/utils/PlumbingCore.js.map +1 -0
- package/dist/monolith/plumbing/utils/PrefixTree.js +61 -114
- package/dist/monolith/plumbing/utils/PrefixTree.js.map +1 -1
- package/dist/monolith/plumbing/utils/StreamTagDetector.js +89 -127
- package/dist/monolith/plumbing/utils/StreamTagDetector.js.map +1 -1
- package/dist/monolith/plumbing/utils/StringUtils.js +87 -89
- package/dist/monolith/plumbing/utils/StringUtils.js.map +1 -1
- package/dist/monolith/runtime/MarieRuntime.js +76 -417
- package/dist/monolith/runtime/MarieRuntime.js.map +1 -1
- package/dist/monolith/runtime/RuntimeAdapterBase.js +1 -1
- package/dist/monolith/runtime/RuntimeAdapterBase.js.map +1 -1
- package/dist/monolith/runtime/providerFactory.js +1 -7
- package/dist/monolith/runtime/providerFactory.js.map +1 -1
- package/dist/monolith/services/HealthService.js +29 -32
- package/dist/monolith/services/HealthService.js.map +1 -1
- package/dist/monolith/services/JoyAutomationService.js +58 -95
- package/dist/monolith/services/JoyAutomationService.js.map +1 -1
- package/dist/monolith/services/MarieAutomationService.js +59 -0
- package/dist/monolith/services/MarieAutomationService.js.map +1 -0
- package/dist/monolith/services/MarieGhostService.js +46 -161
- package/dist/monolith/services/MarieGhostService.js.map +1 -1
- package/dist/monolith/services/MarieServices.js +102 -0
- package/dist/monolith/services/MarieServices.js.map +1 -0
- package/dist/monolith/services/MarieTypes.js +2 -0
- package/dist/monolith/services/MarieTypes.js.map +1 -0
- package/dist/monolith/services/UpdateService.js +47 -49
- package/dist/monolith/services/UpdateService.js.map +1 -1
- package/dist/prompts.js +11 -5
- package/dist/prompts.js.map +1 -1
- package/dist/test_prefix_tree.js +9 -9
- package/dist/test_prefix_tree.js.map +1 -1
- package/package.json +18 -88
- package/run_test.js +5 -0
- package/.marie_visual_verify_1771225696548/progress_bar_check.txt +0 -1
- package/dist/extension.cjs +0 -635
- package/dist/extension.js +0 -473
- package/dist/extension.js.map +0 -1
- package/dist/monolith/adapters/VscodeMarieAdapter.js +0 -81
- package/dist/monolith/adapters/VscodeMarieAdapter.js.map +0 -1
- package/dist/monolith/domain/joy/JoyTools.js +0 -535
- package/dist/monolith/domain/joy/JoyTools.js.map +0 -1
- package/dist/monolith/infrastructure/ai/agents/MarieYOLO.js +0 -207
- package/dist/monolith/infrastructure/ai/agents/MarieYOLO.js.map +0 -1
- package/dist/monolith/infrastructure/ai/core/GhostPort.js +0 -2
- package/dist/monolith/infrastructure/ai/core/GhostPort.js.map +0 -1
- package/dist/monolith/infrastructure/ai/core/MarieYOLOTypes.js +0 -2
- package/dist/monolith/infrastructure/ai/core/MarieYOLOTypes.js.map +0 -1
- package/dist/monolith/infrastructure/ai/core/VscodeFileSystemPort.js +0 -33
- package/dist/monolith/infrastructure/ai/core/VscodeFileSystemPort.js.map +0 -1
- package/dist/monolith/infrastructure/ai/providers/AnthropicProvider.js +0 -148
- package/dist/monolith/infrastructure/ai/providers/AnthropicProvider.js.map +0 -1
- package/dist/monolith/infrastructure/ai/providers/CerebrasProvider.js +0 -208
- package/dist/monolith/infrastructure/ai/providers/CerebrasProvider.js.map +0 -1
- package/dist/monolith/plumbing/ui/DecorationService.js +0 -54
- package/dist/monolith/plumbing/ui/DecorationService.js.map +0 -1
- package/dist/monolith/services/JoyLogService.js +0 -48
- package/dist/monolith/services/JoyLogService.js.map +0 -1
- package/dist/monolith/services/JoyService.js +0 -209
- package/dist/monolith/services/JoyService.js.map +0 -1
- package/dist/monolith/services/MarieSCMProvider.js +0 -41
- package/dist/monolith/services/MarieSCMProvider.js.map +0 -1
- package/dist/test_agent_stream_control_plane.js +0 -170
- package/dist/test_agent_stream_control_plane.js.map +0 -1
- package/dist/test_strategy_integration.js +0 -114
- package/dist/test_strategy_integration.js.map +0 -1
- package/dist/test_streaming_fragility.js +0 -191
- package/dist/test_streaming_fragility.js.map +0 -1
- package/dist/webview-ui/App.js +0 -16
- package/dist/webview-ui/App.js.map +0 -1
- package/dist/webview-ui/Providers.js +0 -6
- package/dist/webview-ui/Providers.js.map +0 -1
- package/dist/webview-ui/components/ApprovalPanel.js +0 -8
- package/dist/webview-ui/components/ApprovalPanel.js.map +0 -1
- package/dist/webview-ui/components/ChatPanel.js +0 -19
- package/dist/webview-ui/components/ChatPanel.js.map +0 -1
- package/dist/webview-ui/components/Composer.js +0 -19
- package/dist/webview-ui/components/Composer.js.map +0 -1
- package/dist/webview-ui/components/HeaderBar.js +0 -5
- package/dist/webview-ui/components/HeaderBar.js.map +0 -1
- package/dist/webview-ui/components/SessionList.js +0 -14
- package/dist/webview-ui/components/SessionList.js.map +0 -1
- package/dist/webview-ui/context/WebviewStateContext.js +0 -146
- package/dist/webview-ui/context/WebviewStateContext.js.map +0 -1
- package/dist/webview-ui/main.css +0 -1
- package/dist/webview-ui/main.js +0 -108
- package/dist/webview-ui/main.js.map +0 -1
- package/dist/webview-ui/types.js +0 -2
- package/dist/webview-ui/types.js.map +0 -1
- package/dist/webview-ui/vscode.js +0 -4
- package/dist/webview-ui/vscode.js.map +0 -1
- package/lint_output.txt +0 -705
- package/lint_output_v2.txt +0 -711
- package/marie-coder-0.1.16.vsix +0 -0
|
@@ -1,124 +1,185 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { sanitize } from "./MarieSanitizer.js";
|
|
2
|
+
import { isHighImpact, renderMessage, } from "../../../domain/marie/PersonalityRenderer.js";
|
|
3
|
+
import { getMaxReasoningEventsPerTurn, getMaxReasoningCharsPerTurn, } from "../../config/ConfigService.js";
|
|
4
|
+
/**
|
|
5
|
+
* Principle 1: Collapsed Infrastructure.
|
|
6
|
+
* MarieProgressTracker now handles all event routing, throttling, and state tracking.
|
|
7
|
+
*/
|
|
2
8
|
export class MarieProgressTracker {
|
|
3
9
|
callbacks;
|
|
4
10
|
run;
|
|
5
|
-
// REASONING BUDGET: Prevent infinite reasoning growth
|
|
6
11
|
reasoningEventCount = 0;
|
|
7
12
|
reasoningCharCount = 0;
|
|
8
|
-
|
|
9
|
-
|
|
13
|
+
// Dispatcher logic integration
|
|
14
|
+
toolNames = new Map();
|
|
15
|
+
pendingContent = "";
|
|
16
|
+
pendingToolDeltas = new Map();
|
|
17
|
+
throttleTimer = null;
|
|
18
|
+
toolThrottleTimer = null;
|
|
19
|
+
THROTTLE_MS = 50;
|
|
20
|
+
TOOL_THROTTLE_MS = 100;
|
|
21
|
+
recentEvents = [];
|
|
22
|
+
recentLogs = [];
|
|
23
|
+
static RING_BUFFER_SIZE = 50;
|
|
10
24
|
constructor(callbacks, run) {
|
|
11
25
|
this.callbacks = callbacks;
|
|
12
26
|
this.run = run;
|
|
13
27
|
}
|
|
14
|
-
/**
|
|
15
|
-
* Resets reasoning budget for new engine turn.
|
|
16
|
-
* Call this at the start of each chatLoop iteration.
|
|
17
|
-
*/
|
|
18
|
-
resetReasoningBudget() {
|
|
19
|
-
this.reasoningEventCount = 0;
|
|
20
|
-
this.reasoningCharCount = 0;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Checks if reasoning budget is exhausted.
|
|
24
|
-
*/
|
|
25
|
-
isReasoningBudgetExhausted() {
|
|
26
|
-
return (this.reasoningEventCount >=
|
|
27
|
-
MarieProgressTracker.MAX_REASONING_EVENTS_PER_TURN ||
|
|
28
|
-
this.reasoningCharCount >=
|
|
29
|
-
MarieProgressTracker.MAX_REASONING_CHARS_PER_TURN);
|
|
30
|
-
}
|
|
31
28
|
getRun() {
|
|
32
29
|
return this.run;
|
|
33
30
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
31
|
+
dispatch(event) {
|
|
32
|
+
switch (event.type) {
|
|
33
|
+
case "stage_change":
|
|
34
|
+
this.flushContent();
|
|
35
|
+
this.updateStage(event);
|
|
36
|
+
break;
|
|
37
|
+
case "content_delta":
|
|
38
|
+
this.handleContentDelta(event);
|
|
39
|
+
break;
|
|
40
|
+
case "tool_call_delta":
|
|
41
|
+
this.handleToolDelta(event);
|
|
42
|
+
break;
|
|
43
|
+
case "usage":
|
|
44
|
+
this.flushContent();
|
|
45
|
+
this.run.usage = event.usage;
|
|
46
|
+
this.emitEvent({
|
|
47
|
+
type: "usage",
|
|
48
|
+
runId: this.run.runId,
|
|
49
|
+
usage: event.usage,
|
|
50
|
+
elapsedMs: this.elapsedMs(),
|
|
51
|
+
});
|
|
52
|
+
break;
|
|
57
53
|
}
|
|
58
|
-
const sanitizedEvent = MarieSanitizer.sanitize(event);
|
|
59
|
-
this.callbacks?.onEvent?.(sanitizedEvent);
|
|
60
54
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
if (now - this.lastSecondTimestamp > 1000) {
|
|
66
|
-
this.eventCountInLastSecond = 0;
|
|
67
|
-
this.lastSecondTimestamp = now;
|
|
55
|
+
handleContentDelta(event) {
|
|
56
|
+
this.pendingContent += event.text;
|
|
57
|
+
if (!this.throttleTimer) {
|
|
58
|
+
this.throttleTimer = setTimeout(() => this.flushContent(), this.THROTTLE_MS);
|
|
68
59
|
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
60
|
+
}
|
|
61
|
+
flushContent() {
|
|
62
|
+
if (!this.pendingContent)
|
|
63
|
+
return;
|
|
64
|
+
const text = this.pendingContent;
|
|
65
|
+
this.pendingContent = "";
|
|
66
|
+
this.throttleTimer = null;
|
|
67
|
+
this.emitStream(text);
|
|
68
|
+
this.emitEvent({
|
|
69
|
+
type: "content_delta",
|
|
70
|
+
runId: this.run.runId,
|
|
71
|
+
text,
|
|
72
|
+
elapsedMs: this.elapsedMs(),
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
handleToolDelta(event) {
|
|
76
|
+
if (!event.argumentsDelta)
|
|
77
|
+
return;
|
|
78
|
+
const idx = event.index !== undefined ? String(event.index) : "default";
|
|
79
|
+
if (event.name && !this.toolNames.has(idx))
|
|
80
|
+
this.toolNames.set(idx, event.name);
|
|
81
|
+
const current = this.pendingToolDeltas.get(idx) || "";
|
|
82
|
+
this.pendingToolDeltas.set(idx, current + event.argumentsDelta);
|
|
83
|
+
if (!this.toolThrottleTimer) {
|
|
84
|
+
this.toolThrottleTimer = setTimeout(() => this.flushToolDeltas(), this.TOOL_THROTTLE_MS);
|
|
74
85
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
86
|
+
}
|
|
87
|
+
flushToolDeltas() {
|
|
88
|
+
for (const [idx, delta] of Array.from(this.pendingToolDeltas.entries())) {
|
|
89
|
+
const name = this.toolNames.get(idx) || "";
|
|
90
|
+
this.emitEvent({
|
|
91
|
+
type: "tool_delta",
|
|
92
|
+
runId: this.run.runId,
|
|
93
|
+
name,
|
|
94
|
+
inputDelta: delta,
|
|
95
|
+
elapsedMs: this.elapsedMs(),
|
|
96
|
+
});
|
|
97
|
+
if (delta.includes('"path"') || delta.includes('"file"')) {
|
|
98
|
+
const pathMatch = delta.match(/"path"\s*:\s*"([^"]*)"/);
|
|
99
|
+
if (pathMatch) {
|
|
100
|
+
this.run.activeFilePath = pathMatch[1];
|
|
101
|
+
this.emitProgressUpdate();
|
|
102
|
+
}
|
|
81
103
|
}
|
|
82
104
|
}
|
|
83
|
-
|
|
105
|
+
this.pendingToolDeltas.clear();
|
|
106
|
+
this.toolThrottleTimer = null;
|
|
107
|
+
}
|
|
108
|
+
updateStage(event) {
|
|
109
|
+
const stage = event.stage;
|
|
110
|
+
this.run.steps += 1;
|
|
111
|
+
if (["responding", "calling_tool", "editing"].includes(stage)) {
|
|
112
|
+
this.setObjectiveStatus("understand_request", "completed");
|
|
113
|
+
this.setObjectiveStatus("execute_plan", "in_progress", event.label || "Executing...");
|
|
114
|
+
this.run.activeObjectiveId = "execute_plan";
|
|
115
|
+
}
|
|
116
|
+
this.emitEvent({
|
|
117
|
+
type: "stage",
|
|
118
|
+
runId: this.run.runId,
|
|
119
|
+
stage,
|
|
120
|
+
label: event.label || stage,
|
|
121
|
+
elapsedMs: this.elapsedMs(),
|
|
122
|
+
});
|
|
123
|
+
this.emitProgressUpdate(event.label || `Stage: ${stage}`);
|
|
84
124
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
125
|
+
emitEvent(event) {
|
|
126
|
+
if (event.type === "reasoning") {
|
|
127
|
+
this.reasoningEventCount++;
|
|
128
|
+
const text = event.text || "";
|
|
129
|
+
this.reasoningCharCount += text.length;
|
|
130
|
+
if (this.reasoningEventCount > getMaxReasoningEventsPerTurn())
|
|
131
|
+
return;
|
|
132
|
+
if (this.reasoningCharCount > getMaxReasoningCharsPerTurn())
|
|
133
|
+
return;
|
|
134
|
+
// Truncate individual reasoning blobs if they are too large
|
|
135
|
+
if (text.length > 2000) {
|
|
136
|
+
event.text =
|
|
137
|
+
text.substring(0, 2000) + "... [Reasoning Truncated]";
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
const sanitized = sanitize(event);
|
|
141
|
+
this.recentEvents.push(sanitized);
|
|
142
|
+
if (this.recentEvents.length > MarieProgressTracker.RING_BUFFER_SIZE)
|
|
143
|
+
this.recentEvents.shift();
|
|
144
|
+
this.callbacks?.onEvent?.(sanitized);
|
|
92
145
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
objective.verificationEvidence = evidence;
|
|
146
|
+
resetReasoningBudget() {
|
|
147
|
+
this.reasoningEventCount = 0;
|
|
148
|
+
this.reasoningCharCount = 0;
|
|
97
149
|
}
|
|
98
|
-
|
|
99
|
-
|
|
150
|
+
recordLog(log) {
|
|
151
|
+
this.recentLogs.push(log);
|
|
152
|
+
if (this.recentLogs.length > MarieProgressTracker.RING_BUFFER_SIZE) {
|
|
153
|
+
this.recentLogs.shift();
|
|
154
|
+
}
|
|
100
155
|
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
156
|
+
getDiagnosticSnapshot() {
|
|
157
|
+
return {
|
|
158
|
+
runMetadata: {
|
|
159
|
+
runId: this.run.runId,
|
|
160
|
+
sessionId: this.run.originatingSessionId,
|
|
161
|
+
startedAt: this.run.startedAt,
|
|
162
|
+
activeTool: this.run.activeToolName,
|
|
163
|
+
currentContext: this.run.currentContext,
|
|
164
|
+
lifecycleStage: this.run.lifecycleStage,
|
|
165
|
+
},
|
|
166
|
+
events: [...this.recentEvents],
|
|
167
|
+
logs: [...this.recentLogs],
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
setObjectiveStatus(id, status, context) {
|
|
171
|
+
const obj = this.run.objectives.find((o) => o.id === id);
|
|
172
|
+
if (obj) {
|
|
173
|
+
obj.status = status;
|
|
174
|
+
if (context)
|
|
175
|
+
obj.context = context;
|
|
104
176
|
}
|
|
105
177
|
}
|
|
106
|
-
recordToolUsage(
|
|
178
|
+
recordToolUsage(name) {
|
|
107
179
|
this.run.tools++;
|
|
108
|
-
if (!this.run.toolUsage)
|
|
180
|
+
if (!this.run.toolUsage)
|
|
109
181
|
this.run.toolUsage = {};
|
|
110
|
-
|
|
111
|
-
this.run.toolUsage[toolName] = (this.run.toolUsage[toolName] || 0) + 1;
|
|
112
|
-
}
|
|
113
|
-
recordFileChange(file, added, removed) {
|
|
114
|
-
if (!this.run.codeStats) {
|
|
115
|
-
this.run.codeStats = { modifiedFiles: {} };
|
|
116
|
-
}
|
|
117
|
-
if (!this.run.codeStats.modifiedFiles[file]) {
|
|
118
|
-
this.run.codeStats.modifiedFiles[file] = { added: 0, removed: 0 };
|
|
119
|
-
}
|
|
120
|
-
this.run.codeStats.modifiedFiles[file].added += added;
|
|
121
|
-
this.run.codeStats.modifiedFiles[file].removed += removed;
|
|
182
|
+
this.run.toolUsage[name] = (this.run.toolUsage[name] || 0) + 1;
|
|
122
183
|
}
|
|
123
184
|
recordHeuristicFix(toolName) {
|
|
124
185
|
if (!this.run.heuristicFixes)
|
|
@@ -129,78 +190,30 @@ export class MarieProgressTracker {
|
|
|
129
190
|
this.emitProgressUpdate(msg);
|
|
130
191
|
}
|
|
131
192
|
}
|
|
132
|
-
|
|
133
|
-
|
|
193
|
+
recordFileChange(file, added, removed) {
|
|
194
|
+
if (!this.run.codeStats)
|
|
195
|
+
this.run.codeStats = { modifiedFiles: {} };
|
|
196
|
+
if (!this.run.codeStats.modifiedFiles[file])
|
|
197
|
+
this.run.codeStats.modifiedFiles[file] = { added: 0, removed: 0 };
|
|
198
|
+
this.run.codeStats.modifiedFiles[file].added += added;
|
|
199
|
+
this.run.codeStats.modifiedFiles[file].removed += removed;
|
|
200
|
+
}
|
|
134
201
|
emitStream(chunk) {
|
|
135
202
|
this.callbacks?.onStream?.(chunk, this.run.runId);
|
|
136
203
|
}
|
|
137
204
|
emitProgressUpdate(context) {
|
|
138
205
|
if (context) {
|
|
139
|
-
this.run.currentContext = context
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
this.pendingUpdate = true;
|
|
143
|
-
return;
|
|
206
|
+
this.run.currentContext = isHighImpact(context)
|
|
207
|
+
? renderMessage(context)
|
|
208
|
+
: context;
|
|
144
209
|
}
|
|
145
210
|
this.internalEmitProgress();
|
|
146
|
-
this.updateDebounceTimer = setTimeout(() => {
|
|
147
|
-
this.updateDebounceTimer = null;
|
|
148
|
-
if (this.pendingUpdate) {
|
|
149
|
-
this.pendingUpdate = false;
|
|
150
|
-
this.internalEmitProgress();
|
|
151
|
-
}
|
|
152
|
-
}, 150); // 150ms debounce for UI stability
|
|
153
211
|
}
|
|
154
|
-
lastObjectivesJson = "";
|
|
155
|
-
lastAchievedJson = "";
|
|
156
212
|
internalEmitProgress() {
|
|
157
213
|
const completed = this.run.objectives.filter((o) => o.status === "completed").length;
|
|
158
214
|
const completionPercent = this.run.objectives.length > 0
|
|
159
215
|
? Math.round((completed / this.run.objectives.length) * 100)
|
|
160
216
|
: 0;
|
|
161
|
-
// PLANETARY STABILITY: Context Pressure Monitor
|
|
162
|
-
const totalLogs = this.run.logs?.length || 0;
|
|
163
|
-
const totalEvents = this.run.events?.length || 0;
|
|
164
|
-
const pressure = totalLogs + totalEvents;
|
|
165
|
-
if (pressure > 1000) {
|
|
166
|
-
this.emitEvent({
|
|
167
|
-
type: "reasoning",
|
|
168
|
-
runId: this.run.runId,
|
|
169
|
-
text: `⚠️ CONTEXT PRESSURE: ${pressure} items in memory. Trimming background telemetry...`,
|
|
170
|
-
elapsedMs: this.elapsedMs(),
|
|
171
|
-
});
|
|
172
|
-
// Prune events to keep RAM low (keep first 50 and last 100)
|
|
173
|
-
if (this.run.events && this.run.events.length > 500) {
|
|
174
|
-
this.run.events = [
|
|
175
|
-
...this.run.events.slice(0, 50),
|
|
176
|
-
{
|
|
177
|
-
type: "reasoning",
|
|
178
|
-
text: "... [Planetary Pruning: Events recovered] ...",
|
|
179
|
-
},
|
|
180
|
-
...this.run.events.slice(-100),
|
|
181
|
-
];
|
|
182
|
-
}
|
|
183
|
-
// Prune logs to keep RAM low
|
|
184
|
-
if (this.run.logs && this.run.logs.length > 500) {
|
|
185
|
-
this.run.logs = [
|
|
186
|
-
...this.run.logs.slice(0, 50),
|
|
187
|
-
{
|
|
188
|
-
type: "reasoning",
|
|
189
|
-
text: "... [Planetary Pruning: Logs recovered] ...",
|
|
190
|
-
},
|
|
191
|
-
...this.run.logs.slice(-100),
|
|
192
|
-
];
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
// SPECTRAL INTEGRITY: UI Delta Compression
|
|
196
|
-
const objectivesSnapshot = this.run.objectives.map((o) => ({ ...o }));
|
|
197
|
-
const currentObjectivesJson = JSON.stringify(objectivesSnapshot);
|
|
198
|
-
const achievedSnapshot = [...this.run.achieved];
|
|
199
|
-
const currentAchievedJson = JSON.stringify(achievedSnapshot);
|
|
200
|
-
const objectivesChanged = currentObjectivesJson !== this.lastObjectivesJson;
|
|
201
|
-
const achievedChanged = currentAchievedJson !== this.lastAchievedJson;
|
|
202
|
-
this.lastObjectivesJson = currentObjectivesJson;
|
|
203
|
-
this.lastAchievedJson = currentAchievedJson;
|
|
204
217
|
this.emitEvent({
|
|
205
218
|
type: "progress_update",
|
|
206
219
|
runId: this.run.runId,
|
|
@@ -208,55 +221,22 @@ export class MarieProgressTracker {
|
|
|
208
221
|
activeObjectiveId: this.run.activeObjectiveId,
|
|
209
222
|
activeToolName: this.run.activeToolName,
|
|
210
223
|
lastToolName: this.run.lastToolName,
|
|
211
|
-
objectives:
|
|
212
|
-
achieved:
|
|
224
|
+
objectives: this.run.objectives,
|
|
225
|
+
achieved: this.run.achieved,
|
|
213
226
|
context: this.run.currentContext,
|
|
214
|
-
lifecycleStage: this.run.lifecycleStage,
|
|
215
|
-
ritualComplete: this.run.ritualComplete,
|
|
216
227
|
activeFilePath: this.run.activeFilePath,
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
passFocus: this.run.passFocus,
|
|
220
|
-
isResuming: this.run.isResuming,
|
|
221
|
-
passHistory: this.run.passHistory ? [...this.run.passHistory] : undefined,
|
|
222
|
-
metrics: this.run.metrics ? { ...this.run.metrics } : undefined,
|
|
223
|
-
heuristicFixes: this.run.heuristicFixes
|
|
224
|
-
? [...this.run.heuristicFixes]
|
|
225
|
-
: undefined,
|
|
226
|
-
ascensionState: this.run.ascensionState,
|
|
227
|
-
elapsedMs: Date.now() - this.run.startedAt,
|
|
228
|
-
});
|
|
229
|
-
}
|
|
230
|
-
flush() {
|
|
231
|
-
if (this.updateDebounceTimer) {
|
|
232
|
-
clearTimeout(this.updateDebounceTimer);
|
|
233
|
-
this.updateDebounceTimer = null;
|
|
234
|
-
}
|
|
235
|
-
this.pendingUpdate = false;
|
|
236
|
-
this.internalEmitProgress();
|
|
237
|
-
}
|
|
238
|
-
dispose() {
|
|
239
|
-
if (this.updateDebounceTimer) {
|
|
240
|
-
clearTimeout(this.updateDebounceTimer);
|
|
241
|
-
this.updateDebounceTimer = null;
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
emitPassTransition(currentPass, totalPasses, passFocus) {
|
|
245
|
-
this.run.currentPass = currentPass;
|
|
246
|
-
this.run.totalPasses = totalPasses;
|
|
247
|
-
this.run.passFocus = passFocus;
|
|
248
|
-
this.emitEvent({
|
|
249
|
-
type: "pass_transition",
|
|
250
|
-
runId: this.run.runId,
|
|
251
|
-
currentPass,
|
|
252
|
-
totalPasses,
|
|
253
|
-
passFocus,
|
|
228
|
+
metrics: this.run.metrics,
|
|
229
|
+
performanceMetrics: this.run.performanceMetrics,
|
|
254
230
|
elapsedMs: this.elapsedMs(),
|
|
255
231
|
});
|
|
256
|
-
this.emitProgressUpdate();
|
|
257
232
|
}
|
|
258
233
|
elapsedMs() {
|
|
259
234
|
return Date.now() - this.run.startedAt;
|
|
260
235
|
}
|
|
236
|
+
clear() {
|
|
237
|
+
this.toolNames.clear();
|
|
238
|
+
this.flushContent();
|
|
239
|
+
this.flushToolDeltas();
|
|
240
|
+
}
|
|
261
241
|
}
|
|
262
242
|
//# sourceMappingURL=MarieProgressTracker.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarieProgressTracker.js","sourceRoot":"","sources":["../../../../../src/monolith/infrastructure/ai/core/MarieProgressTracker.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"MarieProgressTracker.js","sourceRoot":"","sources":["../../../../../src/monolith/infrastructure/ai/core/MarieProgressTracker.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,QAAQ,EAAiB,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EACL,YAAY,EACZ,aAAa,GACd,MAAM,8CAA8C,CAAC;AAEtD,OAAO,EACL,4BAA4B,EAC5B,2BAA2B,GAC5B,MAAM,+BAA+B,CAAC;AAEvC;;;GAGG;AACH,MAAM,OAAO,oBAAoB;IAkBrB;IACA;IAlBF,mBAAmB,GAAW,CAAC,CAAC;IAChC,kBAAkB,GAAW,CAAC,CAAC;IAEvC,+BAA+B;IACvB,SAAS,GAAG,IAAI,GAAG,EAAkB,CAAC;IACtC,cAAc,GAAW,EAAE,CAAC;IAC5B,iBAAiB,GAAwB,IAAI,GAAG,EAAE,CAAC;IACnD,aAAa,GAA0B,IAAI,CAAC;IAC5C,iBAAiB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,CAAC,iBAAiB;YAC7C,cAAc,EAAE,IAAI,CAAC,GAAG,CAAC,cAAc;YACvC,YAAY,EAAE,IAAI,CAAC,GAAG,CAAC,YAAY;YACnC,UAAU,EAAE,IAAI,CAAC,GAAG,CAAC,UAAU;YAC/B,QAAQ,EAAE,IAAI,CAAC,GAAG,CAAC,QAAQ;YAC3B,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC,cAAc;YAChC,cAAc,EAAE,IAAI,CAAC,GAAG,CAAC,cAAc;YACvC,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC,OAAO;YACzB,kBAAkB,EAAE,IAAI,CAAC,GAAG,CAAC,kBAAkB;YAC/C,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE;SACrB,CAAC,CAAC;IACZ,CAAC;IAEM,SAAS;QACd,OAAO,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC;IACzC,CAAC;IAEM,KAAK;QACV,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;QACvB,IAAI,CAAC,YAAY,EAAE,CAAC;QACpB,IAAI,CAAC,eAAe,EAAE,CAAC;IACzB,CAAC"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { MarieGhostService } from "../../../services/MarieGhostService.js";
|
|
2
|
+
import { ConfigService } from "../../config/ConfigService.js";
|
|
3
|
+
import { NoormmeEngine } from "../../persistence/NoormmeEngine.js";
|
|
4
|
+
import { MarieStabilityMonitor } from "./MarieStabilityMonitor.js";
|
|
2
5
|
/**
|
|
3
6
|
* ATMOSPHERIC SEPARATION: MariePulseService
|
|
4
7
|
* Handles the engine's "vital signs": reasoning heartbeats, turn collision watchdogs,
|
|
@@ -13,20 +16,31 @@ export class MariePulseService {
|
|
|
13
16
|
}
|
|
14
17
|
/**
|
|
15
18
|
* SUB-ATOMIC INTEGRITY: Reactive Lock Recovery
|
|
16
|
-
* If the engine lock is held for
|
|
19
|
+
* If the engine lock is held for too long, it's likely a zombie turn. Force-release.
|
|
17
20
|
*/
|
|
18
21
|
startTurnWatchdog(onRecover) {
|
|
19
22
|
this.stopTurnWatchdog();
|
|
20
|
-
|
|
21
|
-
|
|
23
|
+
const timeout = ConfigService.getWatchdogTimeoutMs();
|
|
24
|
+
this.watchdogTimer = setTimeout(async () => {
|
|
25
|
+
console.error(`[MariePulseService] LOCK RECOVERY: AI Engine lock held for >${timeout / 1000}s. Force-releasing...`);
|
|
22
26
|
this.tracker.emitEvent({
|
|
23
27
|
type: "reasoning",
|
|
24
28
|
runId: this.tracker.getRun().runId,
|
|
25
|
-
text:
|
|
29
|
+
text: `🚨 LOCK RECOVERY: Stale reasoning process detected (>${timeout / 1000}s). Force-releasing engine lock.`,
|
|
26
30
|
elapsedMs: this.tracker.elapsedMs(),
|
|
27
31
|
});
|
|
32
|
+
// PHASE 14: Report recovery event to NOORMME
|
|
33
|
+
try {
|
|
34
|
+
const db = await NoormmeEngine.getInstance();
|
|
35
|
+
await db.agent.cortex.metrics.recordMetric("engine_lock_recovery", timeout, {
|
|
36
|
+
metadata: { watchdogTimeoutMs: timeout }
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
catch (e) {
|
|
40
|
+
console.warn("[MariePulseService] Failed to report recovery event", e);
|
|
41
|
+
}
|
|
28
42
|
onRecover();
|
|
29
|
-
},
|
|
43
|
+
}, timeout);
|
|
30
44
|
return this.watchdogTimer;
|
|
31
45
|
}
|
|
32
46
|
stopTurnWatchdog() {
|
|
@@ -40,14 +54,34 @@ export class MariePulseService {
|
|
|
40
54
|
*/
|
|
41
55
|
startHeartbeat() {
|
|
42
56
|
this.stopHeartbeat();
|
|
57
|
+
const baseTimeout = ConfigService.getHeartbeatTimeoutMs();
|
|
58
|
+
// PHASE 22: Adaptive Scaling
|
|
59
|
+
const throttle = MarieStabilityMonitor.getThrottleFactor();
|
|
60
|
+
const timeout = baseTimeout / throttle;
|
|
61
|
+
if (throttle < 1.0) {
|
|
62
|
+
console.log(`[MariePulseService] Adaptive Vitality: Scaling heartbeat by ${throttle.toFixed(2)}x (Timeout: ${timeout}ms)`);
|
|
63
|
+
}
|
|
43
64
|
this.heartbeatTimer = setTimeout(() => {
|
|
44
65
|
this.tracker.emitEvent({
|
|
45
66
|
type: "reasoning",
|
|
46
67
|
runId: this.tracker.getRun().runId,
|
|
47
|
-
text:
|
|
68
|
+
text: `🚨 PLANETARY STABILITY HAZARD: AI reasoning hang detected (>${timeout / 1000}s).`,
|
|
69
|
+
elapsedMs: this.tracker.elapsedMs(),
|
|
70
|
+
});
|
|
71
|
+
}, timeout);
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* PHASE 22: Stability Preservation Check
|
|
75
|
+
*/
|
|
76
|
+
checkShedding() {
|
|
77
|
+
if (MarieStabilityMonitor.isHighPressure()) {
|
|
78
|
+
this.tracker.emitEvent({
|
|
79
|
+
type: "reasoning",
|
|
80
|
+
runId: this.tracker.getRun().runId,
|
|
81
|
+
text: `🧊 STABILITY PRESERVATION: System under pressure. Throttling non-essential cognitive tasks...`,
|
|
48
82
|
elapsedMs: this.tracker.elapsedMs(),
|
|
49
83
|
});
|
|
50
|
-
}
|
|
84
|
+
}
|
|
51
85
|
}
|
|
52
86
|
stopHeartbeat() {
|
|
53
87
|
if (this.heartbeatTimer) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MariePulseService.js","sourceRoot":"","sources":["../../../../../src/monolith/infrastructure/ai/core/MariePulseService.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"MariePulseService.js","sourceRoot":"","sources":["../../../../../src/monolith/infrastructure/ai/core/MariePulseService.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,oCAA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