@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,118 +1,162 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ConfigService } from "../../config/ConfigService.js";
|
|
1
|
+
import { getModel, getMaxContextTokens, getKeepRecentMessages, getTokensPerChar, } from "../../config/ConfigService.js";
|
|
3
2
|
import { SUMMARIZATION_SYSTEM_PROMPT, SUMMARIZATION_USER_PROMPT, } from "../../../../prompts.js";
|
|
4
3
|
import { getErrorMessage } from "../../../plumbing/utils/ErrorUtils.js";
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
4
|
+
import { extractText } from "../../../plumbing/utils/StringUtils.js";
|
|
5
|
+
import { safeSpread, safeGetKeys, safeGetEntries, } from "../core/MarieSanitizer.js";
|
|
6
|
+
function estimateTokens(text, tokensPerChar) {
|
|
7
|
+
return Math.ceil(text.length * tokensPerChar);
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Recursively estimates tokens in an object without JSON.stringify serialization.
|
|
11
|
+
* Prevents massive GC spikes for large objects (e.g. file content).
|
|
12
|
+
*/
|
|
13
|
+
function estimateObjectTokens(obj, tokensPerChar, depth = 0) {
|
|
14
|
+
if (!obj || depth > 10)
|
|
15
|
+
return 0;
|
|
16
|
+
if (typeof obj === "string")
|
|
17
|
+
return estimateTokens(obj, tokensPerChar);
|
|
18
|
+
if (typeof obj === "number" || typeof obj === "boolean")
|
|
19
|
+
return 1;
|
|
20
|
+
let total = 0;
|
|
21
|
+
try {
|
|
22
22
|
if (Array.isArray(obj)) {
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
// Limit array breadth for estimation
|
|
24
|
+
const limitedArr = obj.slice(0, 100);
|
|
25
|
+
for (const item of limitedArr) {
|
|
26
|
+
total += estimateObjectTokens(item, tokensPerChar, depth + 1);
|
|
25
27
|
}
|
|
26
28
|
}
|
|
27
29
|
else if (typeof obj === "object") {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
const safeObj = safeSpread(obj);
|
|
31
|
+
// Use safeGetKeys to avoid engine-level enumeration explosion
|
|
32
|
+
const keys = safeGetKeys(safeObj, 100);
|
|
33
|
+
for (const key of keys) {
|
|
34
|
+
total += estimateTokens(key, tokensPerChar); // Key tokens
|
|
35
|
+
total += estimateObjectTokens(safeObj[key], tokensPerChar, depth + 1); // Value tokens
|
|
31
36
|
}
|
|
32
37
|
}
|
|
33
|
-
return total;
|
|
34
38
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
39
|
+
catch (e) {
|
|
40
|
+
// Ignore enumeration errors during estimation
|
|
41
|
+
}
|
|
42
|
+
return total;
|
|
43
|
+
}
|
|
44
|
+
function getMessageTokens(message, tokensPerChar) {
|
|
45
|
+
if (typeof message.content === "string") {
|
|
46
|
+
return estimateTokens(message.content, tokensPerChar);
|
|
47
|
+
}
|
|
48
|
+
else if (Array.isArray(message.content)) {
|
|
49
|
+
return message.content.reduce((acc, block) => {
|
|
50
|
+
if (block.type === "text") {
|
|
51
|
+
return acc + estimateTokens(block.text, tokensPerChar);
|
|
52
|
+
}
|
|
53
|
+
if (block.type === "tool_use") {
|
|
54
|
+
return acc + estimateObjectTokens(block.input, tokensPerChar, 0);
|
|
55
|
+
}
|
|
56
|
+
if (block.type === "tool_result") {
|
|
57
|
+
// optimized: avoid JSON.stringify if content is string
|
|
58
|
+
if (typeof block.content === "string") {
|
|
59
|
+
return acc + estimateTokens(block.content, tokensPerChar);
|
|
53
60
|
}
|
|
54
|
-
return acc;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
61
|
+
return acc + estimateObjectTokens(block.content, tokensPerChar, 0);
|
|
62
|
+
}
|
|
63
|
+
return acc;
|
|
64
|
+
}, 0);
|
|
58
65
|
}
|
|
59
|
-
|
|
60
|
-
|
|
66
|
+
return 0;
|
|
67
|
+
}
|
|
68
|
+
function getTotalTokens(messages, tokensPerChar) {
|
|
69
|
+
return messages.reduce((acc, msg) => acc + getMessageTokens(msg, tokensPerChar), 0);
|
|
70
|
+
}
|
|
71
|
+
export async function manageContext(messages, provider, state) {
|
|
72
|
+
const maxTokens = getMaxContextTokens();
|
|
73
|
+
const tokensPerChar = getTokensPerChar(); // Hoisted config access
|
|
74
|
+
const currentTokens = getTotalTokens(messages, tokensPerChar);
|
|
75
|
+
// PROACTIVE PRUNING: Summarize at 90% capacity to ensure zero 400 errors
|
|
76
|
+
if (currentTokens >= maxTokens * 0.9) {
|
|
77
|
+
messages = await summarizeHistory(messages, provider, state, tokensPerChar, currentTokens);
|
|
61
78
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
79
|
+
// SPECTRAL MEMORY INJECTION: Retrieve relevant long-term memories
|
|
80
|
+
return await injectSpectralMemories(messages, provider);
|
|
81
|
+
}
|
|
82
|
+
async function injectSpectralMemories(messages, provider) {
|
|
83
|
+
try {
|
|
84
|
+
const lastUserMsg = messages
|
|
85
|
+
.slice()
|
|
86
|
+
.reverse()
|
|
87
|
+
.find((m) => m.role === "user" && typeof m.content === "string");
|
|
88
|
+
if (!lastUserMsg)
|
|
68
89
|
return messages;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
if (messages.length <= keepRecent) {
|
|
90
|
+
const { getInstance } = await import("../../persistence/NoormmeEngine.js");
|
|
91
|
+
const db = await getInstance();
|
|
92
|
+
if (!db.agent.cortex.vectors)
|
|
73
93
|
return messages;
|
|
74
|
-
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
94
|
+
const embedding = await provider.createEmbedding(lastUserMsg.content);
|
|
95
|
+
const memories = await db.agent.cortex.vectors.search(embedding, {
|
|
96
|
+
limit: 3,
|
|
97
|
+
});
|
|
98
|
+
if (memories.length > 0) {
|
|
99
|
+
const memoryContext = memories
|
|
100
|
+
.map((m) => `- ${m.content} (Similarity: ${(m.similarity * 100).toFixed(1)}%)`)
|
|
101
|
+
.join("\n");
|
|
102
|
+
const injectedMessages = [...messages];
|
|
103
|
+
injectedMessages.splice(messages.length - 1, 0, {
|
|
104
|
+
role: "user",
|
|
105
|
+
content: `[SPECTRAL MEMORIES - STRATEGIC CONTEXT]\n${memoryContext}\n\n(Use these memories to inform your response if relevant. Do not mention "Spectral Memories" to the user unless they ask.)`,
|
|
106
|
+
virtual: true,
|
|
86
107
|
});
|
|
87
|
-
|
|
88
|
-
"Summary unavailable.";
|
|
89
|
-
// Ascension Preservation: Prepend state snapshot to the summary so it survives compression
|
|
90
|
-
let ascensionNote = "";
|
|
91
|
-
if (state) {
|
|
92
|
-
const hotspots = Object.entries(state.errorHotspots)
|
|
93
|
-
.filter(([_, c]) => c >= 2)
|
|
94
|
-
.map(([f, c]) => `${f}(${c}x)`)
|
|
95
|
-
.join(", ");
|
|
96
|
-
const strategy = state.lastDecree?.strategy || "EXECUTE";
|
|
97
|
-
const strategyReason = state.lastDecree?.reason || "None";
|
|
98
|
-
ascensionNote = `[ASCENSION STATE] Strategy: ${strategy}, Mood: ${state.mood}, Spirit Pressure (Flow): ${state.spiritPressure}/100, Victory Streak: ${state.victoryStreak}${hotspots ? `, Hotspots: ${hotspots}` : ""}, Last Intent: ${strategyReason}\n\n`;
|
|
99
|
-
}
|
|
100
|
-
const newHistory = [
|
|
101
|
-
{
|
|
102
|
-
role: "user",
|
|
103
|
-
content: `[System Note: Previous conversation summary]\n${ascensionNote}${summaryText}`,
|
|
104
|
-
},
|
|
105
|
-
...recentMessages,
|
|
106
|
-
];
|
|
107
|
-
vscode.window.showInformationMessage(`Marie finished tidying. Tokens reduced from ${currentTokens} to ${this.getTotalTokens(newHistory, tokensPerChar)}.`);
|
|
108
|
-
return newHistory;
|
|
108
|
+
return injectedMessages;
|
|
109
109
|
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
110
|
+
}
|
|
111
|
+
catch (e) {
|
|
112
|
+
console.warn("[ContextManager] Failed to inject spectral memories", e);
|
|
113
|
+
}
|
|
114
|
+
return messages;
|
|
115
|
+
}
|
|
116
|
+
async function summarizeHistory(messages, provider, state, tokensPerChar, currentTokens) {
|
|
117
|
+
console.log(`[Marie] Tidying up conversation history (${currentTokens} tokens)...`);
|
|
118
|
+
const keepRecent = getKeepRecentMessages();
|
|
119
|
+
if (messages.length <= keepRecent) {
|
|
120
|
+
return messages;
|
|
121
|
+
}
|
|
122
|
+
const olderMessages = messages.slice(0, messages.length - keepRecent);
|
|
123
|
+
const recentMessages = messages.slice(messages.length - keepRecent);
|
|
124
|
+
try {
|
|
125
|
+
const summaryResponse = await provider.createMessage({
|
|
126
|
+
model: getModel(),
|
|
127
|
+
max_tokens: 1024,
|
|
128
|
+
messages: olderMessages.concat({
|
|
129
|
+
role: "user",
|
|
130
|
+
content: SUMMARIZATION_USER_PROMPT,
|
|
131
|
+
}),
|
|
132
|
+
system: SUMMARIZATION_SYSTEM_PROMPT,
|
|
133
|
+
});
|
|
134
|
+
const summaryText = extractText(summaryResponse.content) || "Summary unavailable.";
|
|
135
|
+
// Ascension Preservation: Prepend state snapshot to the summary so it survives compression
|
|
136
|
+
let ascensionNote = "";
|
|
137
|
+
if (state) {
|
|
138
|
+
const hotspots = safeGetEntries(safeSpread(state.errorHotspots), 20)
|
|
139
|
+
.filter(([_, c]) => c >= 2)
|
|
140
|
+
.map(([f, c]) => `${f}(${c}x)`)
|
|
141
|
+
.join(", ");
|
|
142
|
+
const strategy = state.lastDecree?.strategy || "EXECUTE";
|
|
143
|
+
const strategyReason = state.lastDecree?.reason || "None";
|
|
144
|
+
ascensionNote = `[ASCENSION STATE] Strategy: ${strategy}, Mood: ${state.mood}, Transcendence Level: ${state.spiritPressure}/100, Victory Streak: ${state.victoryStreak}${hotspots ? `, Hotspots: ${hotspots}` : ""}, Last Intent: ${strategyReason}\n\n`;
|
|
115
145
|
}
|
|
146
|
+
const newHistory = [
|
|
147
|
+
{
|
|
148
|
+
role: "user",
|
|
149
|
+
content: `[System Note: Previous conversation summary]\n${ascensionNote}${summaryText}`,
|
|
150
|
+
},
|
|
151
|
+
...recentMessages,
|
|
152
|
+
];
|
|
153
|
+
console.log(`[Marie] Finished tidying. Tokens reduced from ${currentTokens} to ${getTotalTokens(newHistory, tokensPerChar)}.`);
|
|
154
|
+
return newHistory;
|
|
155
|
+
}
|
|
156
|
+
catch (error) {
|
|
157
|
+
const message = getErrorMessage(error);
|
|
158
|
+
console.error("[Marie] Context summarization failed:", message);
|
|
159
|
+
return messages;
|
|
116
160
|
}
|
|
117
161
|
}
|
|
118
162
|
//# sourceMappingURL=ContextManager.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextManager.js","sourceRoot":"","sources":["../../../../../src/monolith/infrastructure/ai/context/ContextManager.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ContextManager.js","sourceRoot":"","sources":["../../../../../src/monolith/infrastructure/ai/context/ContextManager.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,mBAAmB,EACnB,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,2BAA2B,EAC3B,yBAAyB,GAC1B,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAErE,OAAO,EACL,UAAU,EAEV,WAAW,EACX,cAAc,GACf,MAAM,2BAA2B,CAAC;AAEnC,SAAS,cAAc,CAAC,IAAY,EAAE,aAAqB;IACzD,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,aAAa,CAAC,CAAC;AAChD,CAAC;AAED;;;GAGG;AACH,SAAS,oBAAoB,CAC3B,GAAQ,EACR,aAAqB,EACrB,QAAgB,CAAC;IAEjB,IAAI,CAAC,GAAG,IAAI,KAAK,GAAG,EAAE;QAAE,OAAO,CAAC,CAAC;IACjC,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,OAAO,cAAc,CAAC,GAAG,EAAE,aAAa,CAAC,CAAC;IACvE,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,OAAO,GAAG,KAAK,SAAS;QAAE,OAAO,CAAC,CAAC;IAElE,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,IAAI,CAAC;QACH,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;YACvB,qCAAqC;YACrC,MAAM,UAAU,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;YACrC,KAAK,MAAM,IAAI,IAAI,UAAU,EAAE,CAAC;gBAC9B,KAAK,IAAI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