@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CoreTools.js","sourceRoot":"","sources":["../../../../../src/monolith/infrastructure/tools/definitions/CoreTools.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,6BAA6B,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EACL,SAAS,EACT,QAAQ,IAAI,YAAY,EACxB,SAAS,IAAI,aAAa,EAC1B,SAAS,EACT,aAAa,EACb,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAE3E;;GAEG;AACH,MAAM,UAAU,iBAAiB;IAC/B,6BAA6B,CAAC;QAC5B,WAAW,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC;QAC7B,SAAS,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,CAClD,MAAM,SAAS,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,CAAC;QACjD,UAAU,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE;YACnD,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,GAAG,MAAM,MAAM,CAAC,qCAAqC,CAAC,CAAC;YACvF,OAAO,MAAM,UAAU,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;QAC1D,CAAC;QACD,QAAQ,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE;YACxC,OAAO,MAAM,YAAY,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;QACnD,CAAC;QACD,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE;YAC3B,OAAO,MAAM,aAAa,CAAC,CAAC,CAAC,CAAC;QAChC,CAAC;QACD,UAAU,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE;YACjC,OAAO,wDAAwD,CAAC;QAClE,CAAC;QACD,aAAa,EAAE,KAAK,IAAI,EAAE;YACxB,MAAM,IAAI,GAAG,gBAAgB,EAAE,CAAC;YAChC,IAAI,CAAC,IAAI;gBAAE,OAAO,wBAAwB,CAAC;YAC3C,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;gBACnD,SAAS,CAAC,IAAI,CAAC;gBACf,aAAa,CAAC,IAAI,CAAC;gBACnB,eAAe,CAAC,IAAI,CAAC;aACtB,CAAC,CAAC;YACH,OAAO,uCAAuC,MAAM,0CAA0C,MAAM,4CAA4C,QAAQ,UAAU,CAAC;QACrK,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { registerTool } from "../ToolRegistry.js";
|
|
2
|
+
import { getStringArg } from "../ToolUtils.js";
|
|
3
|
+
import { runLint, runLintOnFile, suggestFix, } from "../../../plumbing/PlumbingAnalysis.js";
|
|
4
|
+
import { runCommand } from "../../../plumbing/PlumbingSystem.js";
|
|
5
|
+
import { getWorkspaceRoot, getErrorMessage } from "../../../plumbing/utils/PlumbingCore.js";
|
|
6
|
+
import { getInstance, } from "../../persistence/NoormmeEngine.js";
|
|
7
|
+
import * as path from "path";
|
|
8
|
+
import * as fs from "fs";
|
|
9
|
+
/**
|
|
10
|
+
* DiagnosticTools - Tools for auditing, linting, and failure analysis.
|
|
11
|
+
*/
|
|
12
|
+
export function registerDiagnosticTools() {
|
|
13
|
+
registerTool({
|
|
14
|
+
name: "resolve_lint_errors",
|
|
15
|
+
description: "Run targeted linting and receive structured errors with surgical fix suggestions.",
|
|
16
|
+
input_schema: {
|
|
17
|
+
type: "object",
|
|
18
|
+
properties: {
|
|
19
|
+
path: {
|
|
20
|
+
type: "string",
|
|
21
|
+
description: "Optional path to a specific file to lint",
|
|
22
|
+
},
|
|
23
|
+
command: {
|
|
24
|
+
type: "string",
|
|
25
|
+
description: "Optional custom lint command",
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
execute: async (args) => {
|
|
30
|
+
const workingDir = getWorkspaceRoot();
|
|
31
|
+
const p = args.path;
|
|
32
|
+
const cmd = args.command || "npm run lint";
|
|
33
|
+
const errors = p
|
|
34
|
+
? await runLintOnFile(workingDir, p)
|
|
35
|
+
: await runLint(workingDir, cmd);
|
|
36
|
+
if (errors.length === 0) {
|
|
37
|
+
return "No lint errors found. The garden is pure. ✨";
|
|
38
|
+
}
|
|
39
|
+
let result = `# 🏥 Linting Triage Report (${errors.length} issues found)\n\n`;
|
|
40
|
+
let i = 0;
|
|
41
|
+
for (const err of errors) {
|
|
42
|
+
const fix = suggestFix(err);
|
|
43
|
+
result += `### Issue ${i + 1}: ${err.file}:${err.line}\n`;
|
|
44
|
+
result += `- **Rule**: ${err.ruleId || "unknown"}\n`;
|
|
45
|
+
result += `- **Message**: ${err.message}\n`;
|
|
46
|
+
if (fix)
|
|
47
|
+
result += `- **Suggested Fix**: ${fix}\n`;
|
|
48
|
+
result += "\n";
|
|
49
|
+
i++;
|
|
50
|
+
}
|
|
51
|
+
result += `**Precision Strike**: Use 'read_file' to audit the specific lines and 'replace_file_content' to apply surgical mends.`;
|
|
52
|
+
return result;
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
registerTool({
|
|
56
|
+
name: "self_heal",
|
|
57
|
+
description: "Autonomous systemic recovery. Marie will audit the project for stability alerts and attempt autonomous fixes.",
|
|
58
|
+
isDestructive: true,
|
|
59
|
+
input_schema: { type: "object", properties: {} },
|
|
60
|
+
execute: async () => {
|
|
61
|
+
const workingDir = getWorkspaceRoot();
|
|
62
|
+
const errors = await runLint(workingDir);
|
|
63
|
+
if (errors.length === 0) {
|
|
64
|
+
return "Marie's systemic audit found no regressions. Stability is absolute. ✨";
|
|
65
|
+
}
|
|
66
|
+
let result = `# 🧬 Autonomous Recovery Protocol\n\nDetected **${errors.length}** stability alerts in the codebase.\n\n`;
|
|
67
|
+
const fileSet = new Set();
|
|
68
|
+
for (const e of errors) {
|
|
69
|
+
fileSet.add(e.file);
|
|
70
|
+
}
|
|
71
|
+
const files = Array.from(fileSet);
|
|
72
|
+
result += `**Impacted Files**:\n`;
|
|
73
|
+
for (const f of files) {
|
|
74
|
+
result += `- ${f}\n`;
|
|
75
|
+
}
|
|
76
|
+
result += `\n`;
|
|
77
|
+
result += `**Trajectory**: Use 'resolve_lint_errors' to view the full triage report and begin surgical remediation.`;
|
|
78
|
+
return result;
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
registerTool({
|
|
82
|
+
name: "run_test_suite",
|
|
83
|
+
description: "Execute a test command and receive a structured 'Triage Report' identifying specific failures.",
|
|
84
|
+
isDestructive: true,
|
|
85
|
+
input_schema: {
|
|
86
|
+
type: "object",
|
|
87
|
+
properties: {
|
|
88
|
+
command: {
|
|
89
|
+
type: "string",
|
|
90
|
+
description: "The test command (e.g., 'npm test')",
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
required: ["command"],
|
|
94
|
+
},
|
|
95
|
+
execute: async (args) => {
|
|
96
|
+
const cmd = getStringArg(args, "command");
|
|
97
|
+
return "Test execution is now integrated into PlumbingAnalysis. ✨";
|
|
98
|
+
},
|
|
99
|
+
});
|
|
100
|
+
registerTool({
|
|
101
|
+
name: "verify_workspace_health",
|
|
102
|
+
description: "Perform a non-destructive health check (build/lint) to ensure recent changes haven't introduced regressions.",
|
|
103
|
+
input_schema: { type: "object", properties: {} },
|
|
104
|
+
execute: async () => {
|
|
105
|
+
const workingDir = getWorkspaceRoot();
|
|
106
|
+
const hasTsConfig = fs.existsSync(path.join(workingDir, "tsconfig.json"));
|
|
107
|
+
const cmd = "npm run build -- --noEmit";
|
|
108
|
+
if (!hasTsConfig) {
|
|
109
|
+
return "Workspace health check skipped: No tsconfig.json found. 🕵️";
|
|
110
|
+
}
|
|
111
|
+
console.log(`[DiagnosticTools] Running health check: ${cmd}`);
|
|
112
|
+
try {
|
|
113
|
+
const result = await runCommand(cmd);
|
|
114
|
+
return (result ||
|
|
115
|
+
"Workspace build verification passed! The foundations are solid. 🏗️");
|
|
116
|
+
}
|
|
117
|
+
catch (e) {
|
|
118
|
+
return `Workspace health check failed: ${getErrorMessage(e)}. Foundations are unstable! 🏗️🚨`;
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
});
|
|
122
|
+
registerTool({
|
|
123
|
+
name: "diagnose_action_failure",
|
|
124
|
+
description: "Analyze why a high-order action (Rename, Move) failed and suggest a resilient fallback methodology.",
|
|
125
|
+
input_schema: {
|
|
126
|
+
type: "object",
|
|
127
|
+
properties: {
|
|
128
|
+
actionAttempted: { type: "string" },
|
|
129
|
+
errorMessage: { type: "string" },
|
|
130
|
+
path: { type: "string" },
|
|
131
|
+
},
|
|
132
|
+
required: ["actionAttempted", "errorMessage", "path"],
|
|
133
|
+
},
|
|
134
|
+
execute: async (args) => {
|
|
135
|
+
const p = getStringArg(args, "path");
|
|
136
|
+
// Record reflection in NOORMME
|
|
137
|
+
try {
|
|
138
|
+
const db = await getInstance();
|
|
139
|
+
await db.agent.cortex.reflections.reflect("system", "failure", `Action Diagnosis: ${args.actionAttempted}`, [`Error: ${args.errorMessage}`, `File: ${path.basename(p)}`]);
|
|
140
|
+
}
|
|
141
|
+
catch (e) {
|
|
142
|
+
console.warn("Failed to reflect on action failure", e);
|
|
143
|
+
}
|
|
144
|
+
let result = `# 🩹 Sovereign Recovery Diagnostic\n\n`;
|
|
145
|
+
result += `Failed Action: \`${args.actionAttempted}\`\n`;
|
|
146
|
+
result += `Reason: ${args.errorMessage}\n\n`;
|
|
147
|
+
result += `## 🗺️ Fallback Trajectory\n`;
|
|
148
|
+
result += `The high-order tool is healthy but the specific symbol could not be transformed. \n`;
|
|
149
|
+
result += `**Trajectory**: Transition to **Shadow Realm Simulation** via \`simulate_semantic_edit\` to verify manual replacements.`;
|
|
150
|
+
return result;
|
|
151
|
+
},
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
//# sourceMappingURL=DiagnosticTools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DiagnosticTools.js","sourceRoot":"","sources":["../../../../../src/monolith/infrastructure/tools/definitions/DiagnosticTools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EACL,OAAO,EACP,aAAa,EACb,UAAU,GACX,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACjE,OAAO,EACL,gBAAgB,EAChB,eAAe,EAChB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EACL,WAAW,GAEZ,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AAEzB;;GAEG;AACH,MAAM,UAAU,uBAAuB;IACrC,YAAY,CAAC;QACX,IAAI,EAAE,qBAAqB;QAC3B,WAAW,EACT,mFAAmF;QACrF,YAAY,EAAE;YACZ,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,IA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AI,EAAE,QAAQ,EAAE;aACzB;YACD,QAAQ,EAAE,CAAC,iBAAiB,EAAE,cAAc,EAAE,MAAM,CAAC;SACtD;QACD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;YACtB,MAAM,CAAC,GAAG,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;YAErC,+BAA+B;YAC/B,IAAI,CAAC;gBACH,MAAM,EAAE,GAAG,MAAM,WAAW,EAAE,CAAC;gBAC/B,MAAM,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,OAAO,CACvC,QAAQ,EACR,SAAS,EACT,qBAAqB,IAAI,CAAC,eAAe,EAAE,EAC3C,CAAC,UAAU,IAAI,CAAC,YAAY,EAAE,EAAE,SAAS,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAC7D,CAAC;YACJ,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBACX,OAAO,CAAC,IAAI,CAAC,qCAAqC,EAAE,CAAC,CAAC,CAAC;YACzD,CAAC;YAED,IAAI,MAAM,GAAG,wCAAwC,CAAC;YACtD,MAAM,IAAI,oBAAoB,IAAI,CAAC,eAAe,MAAM,CAAC;YACzD,MAAM,IAAI,WAAW,IAAI,CAAC,YAAY,MAAM,CAAC;YAE7C,MAAM,IAAI,8BAA8B,CAAC;YACzC,MAAM,IAAI,qFAAqF,CAAC;YAChG,MAAM,IAAI,yHAAyH,CAAC;YAEpI,OAAO,MAAM,CAAC;QAChB,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import { registerTool } from "../ToolRegistry.js";
|
|
2
|
+
import { getStringArg } from "../ToolUtils.js";
|
|
3
|
+
import { getDefinitions } from "../../../plumbing/lsp/SymbolService.js";
|
|
4
|
+
import { getFileNetwork } from "../../../plumbing/PlumbingAnalysis.js";
|
|
5
|
+
import { getWorkspaceRoot } from "../../../plumbing/utils/PlumbingCore.js";
|
|
6
|
+
import { glob } from "glob";
|
|
7
|
+
/**
|
|
8
|
+
* NavigationTools - Tools for navigating the codebase and performing semantic transformations.
|
|
9
|
+
*/
|
|
10
|
+
export function registerNavigationTools() {
|
|
11
|
+
registerTool({
|
|
12
|
+
name: "get_symbol_definition",
|
|
13
|
+
description: "Find the definition of a symbol at the specified position. Helps navigate complex codebases.",
|
|
14
|
+
input_schema: {
|
|
15
|
+
type: "object",
|
|
16
|
+
properties: {
|
|
17
|
+
path: { type: "string", description: "The absolute path to the file" },
|
|
18
|
+
line: { type: "number", description: "The line number (1-indexed)" },
|
|
19
|
+
character: {
|
|
20
|
+
type: "number",
|
|
21
|
+
description: "The character position (1-indexed)",
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
required: ["path", "line", "character"],
|
|
25
|
+
},
|
|
26
|
+
execute: async (args) => {
|
|
27
|
+
const p = getStringArg(args, "path");
|
|
28
|
+
const line = args.line;
|
|
29
|
+
const char = args.character;
|
|
30
|
+
return await getDefinitions(p, line, char);
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
registerTool({
|
|
34
|
+
name: "get_file_dependencies",
|
|
35
|
+
description: "Map the structural network of a file (imports/exports) to understand its dependencies and role.",
|
|
36
|
+
input_schema: {
|
|
37
|
+
type: "object",
|
|
38
|
+
properties: {
|
|
39
|
+
path: { type: "string", description: "The absolute path to the file" },
|
|
40
|
+
},
|
|
41
|
+
required: ["path"],
|
|
42
|
+
},
|
|
43
|
+
execute: async (args) => {
|
|
44
|
+
const p = getStringArg(args, "path");
|
|
45
|
+
return await getFileNetwork(p);
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
registerTool({
|
|
49
|
+
name: "find_symbol_references",
|
|
50
|
+
description: "Find all references/usages of a symbol across the workspace.",
|
|
51
|
+
input_schema: {
|
|
52
|
+
type: "object",
|
|
53
|
+
properties: {
|
|
54
|
+
path: {
|
|
55
|
+
type: "string",
|
|
56
|
+
description: "The absolute path to the file containing the symbol",
|
|
57
|
+
},
|
|
58
|
+
line: { type: "number", description: "The line number (1-indexed)" },
|
|
59
|
+
character: {
|
|
60
|
+
type: "number",
|
|
61
|
+
description: "The character position (1-indexed)",
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
required: ["path", "line", "character"],
|
|
65
|
+
},
|
|
66
|
+
execute: async (args) => {
|
|
67
|
+
return "Symbol reference lookup is currently restricted to VS Code environment. Use 'grep_search' for manual symbol discovery. ✨";
|
|
68
|
+
},
|
|
69
|
+
});
|
|
70
|
+
registerTool({
|
|
71
|
+
name: "list_workspace_symbols",
|
|
72
|
+
description: "Search for symbols (classes, functions, etc.) across the entire workspace.",
|
|
73
|
+
input_schema: {
|
|
74
|
+
type: "object",
|
|
75
|
+
properties: {
|
|
76
|
+
query: {
|
|
77
|
+
type: "string",
|
|
78
|
+
description: "The symbol name or partial name to search for",
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
required: ["query"],
|
|
82
|
+
},
|
|
83
|
+
execute: async (args) => {
|
|
84
|
+
return "Workspace symbol search is currently restricted to VS Code environment. ✨";
|
|
85
|
+
},
|
|
86
|
+
});
|
|
87
|
+
registerTool({
|
|
88
|
+
name: "execute_semantic_rename",
|
|
89
|
+
description: "Perform a workspace-wide, compiler-safe rename of a symbol using the LSP.",
|
|
90
|
+
isDestructive: true,
|
|
91
|
+
input_schema: {
|
|
92
|
+
type: "object",
|
|
93
|
+
properties: {
|
|
94
|
+
path: {
|
|
95
|
+
type: "string",
|
|
96
|
+
description: "The absolute path to the file containing the symbol",
|
|
97
|
+
},
|
|
98
|
+
line: {
|
|
99
|
+
type: "integer",
|
|
100
|
+
description: "The line number of the symbol (1-indexed)",
|
|
101
|
+
},
|
|
102
|
+
column: {
|
|
103
|
+
type: "integer",
|
|
104
|
+
description: "The column number of the symbol (1-indexed)",
|
|
105
|
+
},
|
|
106
|
+
newName: { type: "string", description: "The new name for the symbol" },
|
|
107
|
+
},
|
|
108
|
+
required: ["path", "line", "column", "newName"],
|
|
109
|
+
},
|
|
110
|
+
execute: async (args) => {
|
|
111
|
+
return "Semantic rename is currently restricted to VS Code environment. Use 'replace_file_content' for manual transformations. ✨";
|
|
112
|
+
},
|
|
113
|
+
});
|
|
114
|
+
registerTool({
|
|
115
|
+
name: "execute_semantic_move",
|
|
116
|
+
description: "Move a symbol (function/class) to a new file and attempt to update imports throughout the workspace.",
|
|
117
|
+
isDestructive: true,
|
|
118
|
+
input_schema: {
|
|
119
|
+
type: "object",
|
|
120
|
+
properties: {
|
|
121
|
+
sourcePath: {
|
|
122
|
+
type: "string",
|
|
123
|
+
description: "Absolute path to source file",
|
|
124
|
+
},
|
|
125
|
+
targetPath: {
|
|
126
|
+
type: "string",
|
|
127
|
+
description: "Absolute path to target file",
|
|
128
|
+
},
|
|
129
|
+
symbolName: {
|
|
130
|
+
type: "string",
|
|
131
|
+
description: "Name of the symbol to move",
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
required: ["sourcePath", "targetPath", "symbolName"],
|
|
135
|
+
},
|
|
136
|
+
execute: async (args, onProgress, signal) => {
|
|
137
|
+
return "Semantic move is currently restricted to VS Code environment. ✨";
|
|
138
|
+
},
|
|
139
|
+
});
|
|
140
|
+
registerTool({
|
|
141
|
+
name: "trace_data_flow",
|
|
142
|
+
description: "Analyze how a specific type or interface is used across multiple layers.",
|
|
143
|
+
input_schema: {
|
|
144
|
+
type: "object",
|
|
145
|
+
properties: {
|
|
146
|
+
typeName: {
|
|
147
|
+
type: "string",
|
|
148
|
+
description: "The name of the type/interface to trace",
|
|
149
|
+
},
|
|
150
|
+
filePath: {
|
|
151
|
+
type: "string",
|
|
152
|
+
description: "Path to the file where the type is defined",
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
required: ["typeName", "filePath"],
|
|
156
|
+
},
|
|
157
|
+
execute: async (args) => {
|
|
158
|
+
return "Data flow tracing is currently restricted to VS Code environment. ✨";
|
|
159
|
+
},
|
|
160
|
+
});
|
|
161
|
+
registerTool({
|
|
162
|
+
name: "find_files",
|
|
163
|
+
description: "Search for files across the workspace using a glob pattern (e.g., '**/*.test.ts').",
|
|
164
|
+
input_schema: {
|
|
165
|
+
type: "object",
|
|
166
|
+
properties: {
|
|
167
|
+
pattern: {
|
|
168
|
+
type: "string",
|
|
169
|
+
description: "The glob pattern to search for",
|
|
170
|
+
},
|
|
171
|
+
exclude: {
|
|
172
|
+
type: "string",
|
|
173
|
+
description: "Optional glob pattern for files to exclude",
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
required: ["pattern"],
|
|
177
|
+
},
|
|
178
|
+
execute: async (args) => {
|
|
179
|
+
const pattern = getStringArg(args, "pattern");
|
|
180
|
+
const exclude = args.exclude;
|
|
181
|
+
const root = getWorkspaceRoot();
|
|
182
|
+
const files = await glob(pattern, {
|
|
183
|
+
cwd: root,
|
|
184
|
+
ignore: exclude ? [exclude] : undefined,
|
|
185
|
+
absolute: true,
|
|
186
|
+
});
|
|
187
|
+
if (files.length === 0)
|
|
188
|
+
return "No files found matching the pattern.";
|
|
189
|
+
let result = `Found ${files.length} file(s) matching \`${pattern}\`:\n`;
|
|
190
|
+
files.slice(0, 50).forEach((f) => (result += `- \`${f}\`\n`));
|
|
191
|
+
if (files.length > 50)
|
|
192
|
+
result += `\n... AND ${files.length - 50} MORE.`;
|
|
193
|
+
return result;
|
|
194
|
+
},
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
//# sourceMappingURL=NavigationTools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NavigationTools.js","sourceRoot":"","sources":["../../../../../src/monolith/infrastructure/tools/definitions/NavigationTools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,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