@sunub/obsidian-mcp-server 0.3.6 → 0.3.9
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/build/config.d.ts +1 -27
- package/build/config.js +4 -31
- package/build/config.js.map +1 -1
- package/build/db.js +3 -0
- package/build/db.js.map +1 -1
- package/build/index.js +3 -0
- package/build/index.js.map +1 -1
- package/build/server.js +1 -1
- package/build/server.js.map +1 -1
- package/build/setup.d.ts +1 -0
- package/build/setup.js +4 -2
- package/build/setup.js.map +1 -1
- package/build/tools/create_document_with_properties/index.d.ts +5 -5
- package/build/tools/create_document_with_properties/index.js +2 -2
- package/build/tools/create_document_with_properties/index.js.map +1 -1
- package/build/tools/create_document_with_properties/params.d.ts +8 -8
- package/build/tools/create_document_with_properties/params.js +1 -1
- package/build/tools/create_document_with_properties/params.js.map +1 -1
- package/build/tools/generate_property/index.d.ts +1 -1
- package/build/tools/generate_property/index.js +1 -1
- package/build/tools/generate_property/index.js.map +1 -1
- package/build/tools/generate_property/params.d.ts +4 -4
- package/build/tools/index.d.ts +8 -8
- package/build/tools/index.js +5 -5
- package/build/tools/index.js.map +1 -1
- package/build/tools/organize_attachments/index.d.ts +1 -1
- package/build/tools/organize_attachments/index.js +2 -2
- package/build/tools/organize_attachments/index.js.map +1 -1
- package/build/tools/vault/index.d.ts +1 -1
- package/build/tools/vault/index.js +3 -3
- package/build/tools/vault/index.js.map +1 -1
- package/build/tools/vault/params.d.ts +2 -2
- package/build/tools/vault/types/collect_context.d.ts +32 -32
- package/build/tools/vault/types/collect_context.js +1 -1
- package/build/tools/vault/types/collect_context.js.map +1 -1
- package/build/tools/vault/types/list_all.d.ts +12 -12
- package/build/tools/vault/types/list_all.js +2 -2
- package/build/tools/vault/types/list_all.js.map +1 -1
- package/build/tools/vault/types/read_specific.d.ts +6 -6
- package/build/tools/vault/types/read_specific.js +1 -1
- package/build/tools/vault/types/read_specific.js.map +1 -1
- package/build/tools/vault/types/search.d.ts +10 -10
- package/build/tools/vault/utils/actions/collect_context.d.ts +1 -1
- package/build/tools/vault/utils/actions/collect_context.js +4 -4
- package/build/tools/vault/utils/actions/collect_context.js.map +1 -1
- package/build/tools/vault/utils/actions/list_all.d.ts +1 -1
- package/build/tools/vault/utils/actions/list_all.js +1 -1
- package/build/tools/vault/utils/actions/list_all.js.map +1 -1
- package/build/tools/vault/utils/actions/load_memory.d.ts +1 -1
- package/build/tools/vault/utils/actions/load_memory.js +3 -3
- package/build/tools/vault/utils/actions/load_memory.js.map +1 -1
- package/build/tools/vault/utils/actions/read.d.ts +1 -1
- package/build/tools/vault/utils/actions/read.js +1 -1
- package/build/tools/vault/utils/actions/read.js.map +1 -1
- package/build/tools/vault/utils/actions/search.d.ts +1 -1
- package/build/tools/vault/utils/actions/search.js +2 -2
- package/build/tools/vault/utils/actions/search.js.map +1 -1
- package/build/tools/vault/utils/shared.d.ts +1 -1
- package/build/tools/vault/utils.d.ts +7 -7
- package/build/tools/vault/utils.js +7 -7
- package/build/tools/vault/utils.js.map +1 -1
- package/build/tools/write_property/index.d.ts +5 -5
- package/build/tools/write_property/index.js +1 -1
- package/build/tools/write_property/index.js.map +1 -1
- package/build/tools/write_property/params.d.ts +8 -8
- package/build/utils/DirectoryWalker.d.ts +1 -1
- package/build/utils/Embedder.js +1 -1
- package/build/utils/Embedder.js.map +1 -1
- package/build/utils/Indexer.d.ts +2 -2
- package/build/utils/Indexer.js +2 -2
- package/build/utils/Indexer.js.map +1 -1
- package/build/utils/LLMClient.js +16 -0
- package/build/utils/LLMClient.js.map +1 -1
- package/build/utils/LocalReranker.js +1 -1
- package/build/utils/LocalReranker.js.map +1 -1
- package/build/utils/RAGIndexer.d.ts +1 -1
- package/build/utils/RAGIndexer.js +6 -6
- package/build/utils/RAGIndexer.js.map +1 -1
- package/build/utils/RerankerClient.js +20 -1
- package/build/utils/RerankerClient.js.map +1 -1
- package/build/utils/VaultManger/VaultManager.d.ts +3 -3
- package/build/utils/VaultManger/VaultManager.js +9 -9
- package/build/utils/VaultManger/VaultManager.js.map +1 -1
- package/build/utils/VaultManger/index.d.ts +3 -3
- package/build/utils/VaultManger/index.js +2 -2
- package/build/utils/VaultManger/index.js.map +1 -1
- package/build/utils/VaultManger/types.d.ts +1 -1
- package/build/utils/VaultWatcher.js +1 -1
- package/build/utils/VaultWatcher.js.map +1 -1
- package/build/utils/VectorDB.js +31 -6
- package/build/utils/VectorDB.js.map +1 -1
- package/build/utils/getVaultManager.d.ts +1 -1
- package/build/utils/getVaultManager.js +1 -1
- package/build/utils/getVaultManager.js.map +1 -1
- package/build/utils/processor/MatterParser.d.ts +1 -1
- package/build/utils/processor/MatterParser.js +1 -1
- package/build/utils/processor/MatterParser.js.map +1 -1
- package/package.json +13 -49
- package/LICENSE +0 -15
- package/README.md +0 -512
- package/build/cli/App.d.ts +0 -1
- package/build/cli/App.js +0 -194
- package/build/cli/App.js.map +0 -1
- package/build/cli/AppContainer.d.ts +0 -1
- package/build/cli/AppContainer.js +0 -18
- package/build/cli/AppContainer.js.map +0 -1
- package/build/cli/colors.d.ts +0 -15
- package/build/cli/colors.js +0 -15
- package/build/cli/colors.js.map +0 -1
- package/build/cli/commands/types.d.ts +0 -19
- package/build/cli/commands/types.js +0 -11
- package/build/cli/commands/types.js.map +0 -1
- package/build/cli/config/SettingContext.d.ts +0 -1
- package/build/cli/config/SettingContext.js +0 -2
- package/build/cli/config/SettingContext.js.map +0 -1
- package/build/cli/config/mcpServersConfig.d.ts +0 -30
- package/build/cli/config/mcpServersConfig.js +0 -119
- package/build/cli/config/mcpServersConfig.js.map +0 -1
- package/build/cli/config/settingSchema.d.ts +0 -180
- package/build/cli/config/settingSchema.js +0 -128
- package/build/cli/config/settingSchema.js.map +0 -1
- package/build/cli/constants.d.ts +0 -47
- package/build/cli/constants.js +0 -101
- package/build/cli/constants.js.map +0 -1
- package/build/cli/context/InputContext.d.ts +0 -12
- package/build/cli/context/InputContext.js +0 -10
- package/build/cli/context/InputContext.js.map +0 -1
- package/build/cli/context/KeypressContext.d.ts +0 -30
- package/build/cli/context/KeypressContext.js +0 -200
- package/build/cli/context/KeypressContext.js.map +0 -1
- package/build/cli/context/KeypressContext.util.d.ts +0 -7
- package/build/cli/context/KeypressContext.util.js +0 -476
- package/build/cli/context/KeypressContext.util.js.map +0 -1
- package/build/cli/hooks/useAtCompletion.d.ts +0 -12
- package/build/cli/hooks/useAtCompletion.js +0 -5
- package/build/cli/hooks/useAtCompletion.js.map +0 -1
- package/build/cli/hooks/useCommandCompletion.d.ts +0 -59
- package/build/cli/hooks/useCommandCompletion.js +0 -344
- package/build/cli/hooks/useCommandCompletion.js.map +0 -1
- package/build/cli/hooks/useCompletion.d.ts +0 -22
- package/build/cli/hooks/useCompletion.js +0 -84
- package/build/cli/hooks/useCompletion.js.map +0 -1
- package/build/cli/hooks/useDispatcher.d.ts +0 -6
- package/build/cli/hooks/useDispatcher.js +0 -286
- package/build/cli/hooks/useDispatcher.js.map +0 -1
- package/build/cli/hooks/useFocus.d.ts +0 -2
- package/build/cli/hooks/useFocus.js +0 -3
- package/build/cli/hooks/useFocus.js.map +0 -1
- package/build/cli/hooks/useInputHistory.d.ts +0 -24
- package/build/cli/hooks/useInputHistory.js +0 -159
- package/build/cli/hooks/useInputHistory.js.map +0 -1
- package/build/cli/hooks/useKeyMatchers.d.ts +0 -17
- package/build/cli/hooks/useKeyMatchers.js +0 -13
- package/build/cli/hooks/useKeyMatchers.js.map +0 -1
- package/build/cli/hooks/useKeypress.d.ts +0 -19
- package/build/cli/hooks/useKeypress.js +0 -28
- package/build/cli/hooks/useKeypress.js.map +0 -1
- package/build/cli/hooks/useLlmStream/constants.d.ts +0 -4
- package/build/cli/hooks/useLlmStream/constants.js +0 -5
- package/build/cli/hooks/useLlmStream/constants.js.map +0 -1
- package/build/cli/hooks/useLlmStream/index.d.ts +0 -2
- package/build/cli/hooks/useLlmStream/index.js +0 -2
- package/build/cli/hooks/useLlmStream/index.js.map +0 -1
- package/build/cli/hooks/useLlmStream/llmService.d.ts +0 -2
- package/build/cli/hooks/useLlmStream/llmService.js +0 -110
- package/build/cli/hooks/useLlmStream/llmService.js.map +0 -1
- package/build/cli/hooks/useLlmStream/types.d.ts +0 -38
- package/build/cli/hooks/useLlmStream/types.js +0 -2
- package/build/cli/hooks/useLlmStream/types.js.map +0 -1
- package/build/cli/hooks/useLlmStream/useLlmStream.d.ts +0 -12
- package/build/cli/hooks/useLlmStream/useLlmStream.js +0 -162
- package/build/cli/hooks/useLlmStream/useLlmStream.js.map +0 -1
- package/build/cli/hooks/useLlmStream/utils.d.ts +0 -15
- package/build/cli/hooks/useLlmStream/utils.js +0 -108
- package/build/cli/hooks/useLlmStream/utils.js.map +0 -1
- package/build/cli/hooks/useMcpClient.d.ts +0 -10
- package/build/cli/hooks/useMcpClient.js +0 -100
- package/build/cli/hooks/useMcpClient.js.map +0 -1
- package/build/cli/hooks/useMcpManager.d.ts +0 -26
- package/build/cli/hooks/useMcpManager.js +0 -89
- package/build/cli/hooks/useMcpManager.js.map +0 -1
- package/build/cli/hooks/usePromptCompletion.d.ts +0 -19
- package/build/cli/hooks/usePromptCompletion.js +0 -13
- package/build/cli/hooks/usePromptCompletion.js.map +0 -1
- package/build/cli/hooks/useRagContext.d.ts +0 -6
- package/build/cli/hooks/useRagContext.js +0 -83
- package/build/cli/hooks/useRagContext.js.map +0 -1
- package/build/cli/hooks/useShellCompletion.d.ts +0 -18
- package/build/cli/hooks/useShellCompletion.js +0 -10
- package/build/cli/hooks/useShellCompletion.js.map +0 -1
- package/build/cli/hooks/useSlashCompletion.d.ts +0 -21
- package/build/cli/hooks/useSlashCompletion.js +0 -11
- package/build/cli/hooks/useSlashCompletion.js.map +0 -1
- package/build/cli/hooks/useTerminalSize.d.ts +0 -4
- package/build/cli/hooks/useTerminalSize.js +0 -21
- package/build/cli/hooks/useTerminalSize.js.map +0 -1
- package/build/cli/index.d.ts +0 -1
- package/build/cli/index.js +0 -10
- package/build/cli/index.js.map +0 -1
- package/build/cli/key/input.d.ts +0 -5
- package/build/cli/key/input.js +0 -9
- package/build/cli/key/input.js.map +0 -1
- package/build/cli/key/keyBindings.d.ts +0 -152
- package/build/cli/key/keyBindings.js +0 -630
- package/build/cli/key/keyBindings.js.map +0 -1
- package/build/cli/key/keyMatchers.d.ts +0 -19
- package/build/cli/key/keyMatchers.js +0 -25
- package/build/cli/key/keyMatchers.js.map +0 -1
- package/build/cli/key/mouse.d.ts +0 -23
- package/build/cli/key/mouse.js +0 -155
- package/build/cli/key/mouse.js.map +0 -1
- package/build/cli/key/text-buffer-bestcase.d.ts +0 -867
- package/build/cli/key/text-buffer-bestcase.js +0 -2754
- package/build/cli/key/text-buffer-bestcase.js.map +0 -1
- package/build/cli/key/text-buffer.d.ts +0 -506
- package/build/cli/key/text-buffer.js +0 -919
- package/build/cli/key/text-buffer.js.map +0 -1
- package/build/cli/main.d.ts +0 -1
- package/build/cli/main.js +0 -20
- package/build/cli/main.js.map +0 -1
- package/build/cli/reference/HistoryItemDisplay.d.ts +0 -23
- package/build/cli/reference/HistoryItemDisplay.js +0 -63
- package/build/cli/reference/HistoryItemDisplay.js.map +0 -1
- package/build/cli/reference/InputContext.d.ts +0 -17
- package/build/cli/reference/InputContext.js +0 -16
- package/build/cli/reference/InputContext.js.map +0 -1
- package/build/cli/reference/KerypressContext.d.ts +0 -37
- package/build/cli/reference/KerypressContext.js +0 -791
- package/build/cli/reference/KerypressContext.js.map +0 -1
- package/build/cli/reference/MainContent.d.ts +0 -6
- package/build/cli/reference/MainContent.js +0 -207
- package/build/cli/reference/MainContent.js.map +0 -1
- package/build/cli/reference/UIStateContext.d.ts +0 -188
- package/build/cli/reference/UIStateContext.js +0 -16
- package/build/cli/reference/UIStateContext.js.map +0 -1
- package/build/cli/reference/text-buffer.d.ts +0 -867
- package/build/cli/reference/text-buffer.js +0 -2754
- package/build/cli/reference/text-buffer.js.map +0 -1
- package/build/cli/reference/useGeminiStream.d.ts +0 -42
- package/build/cli/reference/useGeminiStream.js +0 -1404
- package/build/cli/reference/useGeminiStream.js.map +0 -1
- package/build/cli/services/McpClientService.d.ts +0 -32
- package/build/cli/services/McpClientService.js +0 -123
- package/build/cli/services/McpClientService.js.map +0 -1
- package/build/cli/services/McpManager.d.ts +0 -28
- package/build/cli/services/McpManager.js +0 -146
- package/build/cli/services/McpManager.js.map +0 -1
- package/build/cli/theme/builtin/default-dark.d.ts +0 -7
- package/build/cli/theme/builtin/default-dark.js +0 -143
- package/build/cli/theme/builtin/default-dark.js.map +0 -1
- package/build/cli/theme/builtin/no-color.d.ts +0 -7
- package/build/cli/theme/builtin/no-color.js +0 -125
- package/build/cli/theme/builtin/no-color.js.map +0 -1
- package/build/cli/theme/builtin/tokyonight-dark.d.ts +0 -7
- package/build/cli/theme/builtin/tokyonight-dark.js +0 -146
- package/build/cli/theme/builtin/tokyonight-dark.js.map +0 -1
- package/build/cli/theme/semantic-colors.d.ts +0 -2
- package/build/cli/theme/semantic-colors.js +0 -19
- package/build/cli/theme/semantic-colors.js.map +0 -1
- package/build/cli/theme/semantic-tokens.d.ts +0 -42
- package/build/cli/theme/semantic-tokens.js +0 -77
- package/build/cli/theme/semantic-tokens.js.map +0 -1
- package/build/cli/theme/theme-manager.d.ts +0 -32
- package/build/cli/theme/theme-manager.js +0 -150
- package/build/cli/theme/theme-manager.js.map +0 -1
- package/build/cli/theme/theme.d.ts +0 -107
- package/build/cli/theme/theme.js +0 -333
- package/build/cli/theme/theme.js.map +0 -1
- package/build/cli/tmp.d.ts +0 -1
- package/build/cli/tmp.js +0 -27
- package/build/cli/tmp.js.map +0 -1
- package/build/cli/types.d.ts +0 -74
- package/build/cli/types.js +0 -8
- package/build/cli/types.js.map +0 -1
- package/build/cli/ui/ConnectionStatus.d.ts +0 -13
- package/build/cli/ui/ConnectionStatus.js +0 -24
- package/build/cli/ui/ConnectionStatus.js.map +0 -1
- package/build/cli/ui/HelpCommands.d.ts +0 -5
- package/build/cli/ui/HelpCommands.js +0 -11
- package/build/cli/ui/HelpCommands.js.map +0 -1
- package/build/cli/ui/HistoryItemDisplay.d.ts +0 -9
- package/build/cli/ui/HistoryItemDisplay.js +0 -38
- package/build/cli/ui/HistoryItemDisplay.js.map +0 -1
- package/build/cli/ui/InputPrompt-bestcase.d.ts +0 -63
- package/build/cli/ui/InputPrompt-bestcase.js +0 -1301
- package/build/cli/ui/InputPrompt-bestcase.js.map +0 -1
- package/build/cli/ui/InputPrompt.d.ts +0 -13
- package/build/cli/ui/InputPrompt.js +0 -145
- package/build/cli/ui/InputPrompt.js.map +0 -1
- package/build/cli/ui/InputPrompt.tmp.d.ts +0 -7
- package/build/cli/ui/InputPrompt.tmp.js +0 -215
- package/build/cli/ui/InputPrompt.tmp.js.map +0 -1
- package/build/cli/ui/LLMErrorComponent.d.ts +0 -6
- package/build/cli/ui/LLMErrorComponent.js +0 -14
- package/build/cli/ui/LLMErrorComponent.js.map +0 -1
- package/build/cli/ui/LLMHealthChecker.d.ts +0 -8
- package/build/cli/ui/LLMHealthChecker.js +0 -22
- package/build/cli/ui/LLMHealthChecker.js.map +0 -1
- package/build/cli/ui/MCPServers.d.ts +0 -11
- package/build/cli/ui/MCPServers.js +0 -18
- package/build/cli/ui/MCPServers.js.map +0 -1
- package/build/cli/ui/MainContent.d.ts +0 -10
- package/build/cli/ui/MainContent.js +0 -24
- package/build/cli/ui/MainContent.js.map +0 -1
- package/build/cli/ui/MouseContext.d.ts +0 -1
- package/build/cli/ui/MouseContext.js +0 -2
- package/build/cli/ui/MouseContext.js.map +0 -1
- package/build/cli/ui/SuggestionsDisplay.d.ts +0 -25
- package/build/cli/ui/SuggestionsDisplay.js +0 -45
- package/build/cli/ui/SuggestionsDisplay.js.map +0 -1
- package/build/cli/ui/ThinkingIndicator.d.ts +0 -2
- package/build/cli/ui/ThinkingIndicator.js +0 -16
- package/build/cli/ui/ThinkingIndicator.js.map +0 -1
- package/build/cli/ui/layout/DefaultAppLayout.d.ts +0 -2
- package/build/cli/ui/layout/DefaultAppLayout.js +0 -6
- package/build/cli/ui/layout/DefaultAppLayout.js.map +0 -1
- package/build/cli/ui/shared/ExpandableText.d.ts +0 -14
- package/build/cli/ui/shared/ExpandableText.js +0 -19
- package/build/cli/ui/shared/ExpandableText.js.map +0 -1
- package/build/cli/utils/cache.d.ts +0 -21
- package/build/cli/utils/cache.js +0 -56
- package/build/cli/utils/cache.js.map +0 -1
- package/build/cli/utils/commandUtils.d.ts +0 -11
- package/build/cli/utils/commandUtils.js +0 -16
- package/build/cli/utils/commandUtils.js.map +0 -1
- package/build/cli/utils/debugLogger.d.ts +0 -12
- package/build/cli/utils/debugLogger.js +0 -54
- package/build/cli/utils/debugLogger.js.map +0 -1
- package/build/cli/utils/historyStorage.d.ts +0 -13
- package/build/cli/utils/historyStorage.js +0 -64
- package/build/cli/utils/historyStorage.js.map +0 -1
- package/build/cli/utils/textUtil.d.ts +0 -68
- package/build/cli/utils/textUtil.js +0 -236
- package/build/cli/utils/textUtil.js.map +0 -1
package/build/cli/App.js
DELETED
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Box, Text } from "ink";
|
|
3
|
-
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
4
|
-
import { InputContext } from "./context/InputContext.js";
|
|
5
|
-
import { KeypressProvider } from "./context/KeypressContext.js";
|
|
6
|
-
import { useDispatcher } from "./hooks/useDispatcher.js";
|
|
7
|
-
import { useInputHistoryStore } from "./hooks/useInputHistory.js";
|
|
8
|
-
import { useLlmStream } from "./hooks/useLlmStream/index.js";
|
|
9
|
-
import { useMcpManager } from "./hooks/useMcpManager.js";
|
|
10
|
-
import { useRagContext } from "./hooks/useRagContext.js";
|
|
11
|
-
import { useTerminalSize } from "./hooks/useTerminalSize.js";
|
|
12
|
-
import { useTextBuffer } from "./key/text-buffer.js";
|
|
13
|
-
import { calculatePromptWidths, InputPrompt } from "./ui/InputPrompt.js";
|
|
14
|
-
import { MainContent } from "./ui/MainContent.js";
|
|
15
|
-
import { MCPServers } from "./ui/MCPServers.js";
|
|
16
|
-
import { debugLogger } from "./utils/debugLogger.js";
|
|
17
|
-
import { historyStorage } from "./utils/historyStorage.js";
|
|
18
|
-
export const App = () => {
|
|
19
|
-
const [shellModeActive] = useState(false);
|
|
20
|
-
const [copyModeEnabled] = useState(false);
|
|
21
|
-
const [showEscapePrompt] = useState(false);
|
|
22
|
-
const { columns: terminalWidth, rows: terminalHeight } = useTerminalSize();
|
|
23
|
-
const mainAreaWidth = terminalWidth;
|
|
24
|
-
const { inputWidth, suggestionsWidth } = useMemo(() => {
|
|
25
|
-
const { inputWidth, suggestionsWidth } = calculatePromptWidths(mainAreaWidth);
|
|
26
|
-
return { inputWidth, suggestionsWidth };
|
|
27
|
-
}, [mainAreaWidth]);
|
|
28
|
-
const availableTerminalHeight = Math.max(0, terminalHeight - 2);
|
|
29
|
-
const { inputHistory, addInput, initializeFromLogger } = useInputHistoryStore();
|
|
30
|
-
useEffect(() => {
|
|
31
|
-
void initializeFromLogger(historyStorage);
|
|
32
|
-
}, [initializeFromLogger]);
|
|
33
|
-
// MCP Manager — 다중 MCP 서버 연결 관리
|
|
34
|
-
const { isConnected: mcpConnected, connections: mcpConnections, tools: mcpTools, toolsByServer: mcpToolsByServer, callTool, errors: mcpErrors, serverCount: mcpServerCount, connectedCount: mcpConnectedCount, isAnyConnecting, hasAnyError, } = useMcpManager();
|
|
35
|
-
const { handleDispatch } = useDispatcher(mcpTools);
|
|
36
|
-
const { fetchContext } = useRagContext(callTool, mcpConnected);
|
|
37
|
-
const buffer = useTextBuffer({
|
|
38
|
-
initialText: "",
|
|
39
|
-
viewportWidth: inputWidth,
|
|
40
|
-
viewportHeight: availableTerminalHeight,
|
|
41
|
-
});
|
|
42
|
-
const inputState = useMemo(() => ({
|
|
43
|
-
buffer,
|
|
44
|
-
userMessages: inputHistory,
|
|
45
|
-
shellModeActive,
|
|
46
|
-
showEscapePrompt,
|
|
47
|
-
copyModeEnabled,
|
|
48
|
-
inputWidth,
|
|
49
|
-
suggestionsWidth,
|
|
50
|
-
}), [
|
|
51
|
-
buffer,
|
|
52
|
-
inputHistory,
|
|
53
|
-
shellModeActive,
|
|
54
|
-
showEscapePrompt,
|
|
55
|
-
copyModeEnabled,
|
|
56
|
-
inputWidth,
|
|
57
|
-
suggestionsWidth,
|
|
58
|
-
]);
|
|
59
|
-
// --- Phase 4~6: history + pendingItem 기반 상태 관리 ---
|
|
60
|
-
const [history, setHistory] = useState([]);
|
|
61
|
-
const nextIdRef = useRef(1);
|
|
62
|
-
const { pendingItem, streamingState, isLoading, error, sendMessage, reset, clearHistory, } = useLlmStream(callTool, mcpTools);
|
|
63
|
-
// 이관 Effect: 스트림 완료 → history로 이동
|
|
64
|
-
useEffect(() => {
|
|
65
|
-
if (pendingItem?.isComplete) {
|
|
66
|
-
setHistory((prev) => [
|
|
67
|
-
...prev,
|
|
68
|
-
{
|
|
69
|
-
id: nextIdRef.current++,
|
|
70
|
-
type: "assistant",
|
|
71
|
-
content: pendingItem.content,
|
|
72
|
-
timestamp: Date.now(),
|
|
73
|
-
},
|
|
74
|
-
]);
|
|
75
|
-
reset();
|
|
76
|
-
}
|
|
77
|
-
}, [pendingItem, reset]);
|
|
78
|
-
// 에러 로깅
|
|
79
|
-
useEffect(() => {
|
|
80
|
-
if (error) {
|
|
81
|
-
debugLogger.error("[AppContainer] LLM stream error:", error.message);
|
|
82
|
-
}
|
|
83
|
-
}, [error]);
|
|
84
|
-
const handleFinalSubmit = useCallback(async (value) => {
|
|
85
|
-
if (!value.trim() || isLoading)
|
|
86
|
-
return;
|
|
87
|
-
// Add to UI state session & past session recalculator
|
|
88
|
-
addInput(value);
|
|
89
|
-
// Save to physical file via storage utility
|
|
90
|
-
void historyStorage.appendMessage(value);
|
|
91
|
-
if (value.startsWith("/")) {
|
|
92
|
-
// 슬래시 커맨드 → Dispatcher → MCP 도구 호출
|
|
93
|
-
buffer.setText("");
|
|
94
|
-
const result = await handleDispatch(value, callTool);
|
|
95
|
-
// 로컬 액션 처리
|
|
96
|
-
if (result.content === "__CLEAR_HISTORY__") {
|
|
97
|
-
setHistory([]);
|
|
98
|
-
clearHistory();
|
|
99
|
-
setHistory((prev) => [
|
|
100
|
-
...prev,
|
|
101
|
-
{
|
|
102
|
-
id: nextIdRef.current++,
|
|
103
|
-
type: "info",
|
|
104
|
-
content: "대화 히스토리가 초기화되었습니다.",
|
|
105
|
-
timestamp: Date.now(),
|
|
106
|
-
},
|
|
107
|
-
]);
|
|
108
|
-
return;
|
|
109
|
-
}
|
|
110
|
-
if (result.content === "__LIST_TOOLS__") {
|
|
111
|
-
const toolsText = mcpConnected
|
|
112
|
-
? Array.from(mcpToolsByServer.entries())
|
|
113
|
-
.map(([serverName, serverTools]) => {
|
|
114
|
-
const toolList = serverTools
|
|
115
|
-
.map((t) => ` • ${t.name}${t.description ? ` — ${t.description}` : ""}`)
|
|
116
|
-
.join("\n");
|
|
117
|
-
return `[${serverName}] (${serverTools.length} tools)\n${toolList}`;
|
|
118
|
-
})
|
|
119
|
-
.join("\n\n")
|
|
120
|
-
: "MCP 서버에 연결되지 않았습니다.";
|
|
121
|
-
setHistory((prev) => [
|
|
122
|
-
...prev,
|
|
123
|
-
{
|
|
124
|
-
id: nextIdRef.current++,
|
|
125
|
-
type: "info",
|
|
126
|
-
content: `사용 가능한 MCP 도구:\n${toolsText}`,
|
|
127
|
-
timestamp: Date.now(),
|
|
128
|
-
},
|
|
129
|
-
]);
|
|
130
|
-
return;
|
|
131
|
-
}
|
|
132
|
-
// 도구 결과 또는 일반 응답을 히스토리에 추가
|
|
133
|
-
if (result.type === "llm_required") {
|
|
134
|
-
// LLM 지시문 페이로드 → 사용자 입력을 히스토리에 표시 후 LLM으로 파이프
|
|
135
|
-
setHistory((prev) => [
|
|
136
|
-
...prev,
|
|
137
|
-
{
|
|
138
|
-
id: nextIdRef.current++,
|
|
139
|
-
type: "user",
|
|
140
|
-
content: result.userIntent ?? value,
|
|
141
|
-
timestamp: Date.now(),
|
|
142
|
-
},
|
|
143
|
-
]);
|
|
144
|
-
// 도구 결과(instructions + content_preview)를 RAG 컨텍스트처럼 LLM에 주입
|
|
145
|
-
void sendMessage(result.userIntent ?? value, result.content);
|
|
146
|
-
}
|
|
147
|
-
else {
|
|
148
|
-
setHistory((prev) => [
|
|
149
|
-
...prev,
|
|
150
|
-
{
|
|
151
|
-
id: nextIdRef.current++,
|
|
152
|
-
type: result.type === "unknown_command" ? "error" : "info",
|
|
153
|
-
content: result.content,
|
|
154
|
-
timestamp: Date.now(),
|
|
155
|
-
},
|
|
156
|
-
]);
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
else {
|
|
160
|
-
// 일반 텍스트 → RAG 컨텍스트 조회 → LLM 스트리밍
|
|
161
|
-
setHistory((prev) => [
|
|
162
|
-
...prev,
|
|
163
|
-
{
|
|
164
|
-
id: nextIdRef.current++,
|
|
165
|
-
type: "user",
|
|
166
|
-
content: value,
|
|
167
|
-
timestamp: Date.now(),
|
|
168
|
-
},
|
|
169
|
-
]);
|
|
170
|
-
// 입력창 즉시 초기화 (Phase 6 피드백 루프)
|
|
171
|
-
buffer.setText("");
|
|
172
|
-
// RAG 컨텍스트 조회 (MCP 연결 시에만)
|
|
173
|
-
const ragContext = await fetchContext(value);
|
|
174
|
-
void sendMessage(value, ragContext);
|
|
175
|
-
}
|
|
176
|
-
}, [
|
|
177
|
-
addInput,
|
|
178
|
-
buffer,
|
|
179
|
-
callTool,
|
|
180
|
-
clearHistory,
|
|
181
|
-
fetchContext,
|
|
182
|
-
handleDispatch,
|
|
183
|
-
isLoading,
|
|
184
|
-
mcpConnected,
|
|
185
|
-
mcpToolsByServer,
|
|
186
|
-
sendMessage,
|
|
187
|
-
]);
|
|
188
|
-
return (_jsx(KeypressProvider, { children: _jsx(InputContext.Provider, { value: inputState, children: _jsxs(Box, { flexDirection: "column", width: "100%", children: [_jsx(MCPServers, { isConnected: mcpConnected, connections: mcpConnections, serverCount: mcpServerCount, connectedCount: mcpConnectedCount, errors: mcpErrors }), _jsx(MainContent, { history: history, pendingItem: pendingItem, streamingState: streamingState, width: mainAreaWidth }), error && (_jsx(Box, { paddingX: 1, marginBottom: 1, children: _jsxs(Text, { color: "red", bold: true, children: ["\u2716 ", error.message] }) })), _jsx(InputPrompt, { onSubmit: handleFinalSubmit, focus: streamingState === "idle" && mcpConnected, placeholder: isAnyConnecting
|
|
189
|
-
? ` MCP 서버 연결 중... (${mcpConnectedCount}/${mcpServerCount})`
|
|
190
|
-
: hasAnyError && !mcpConnected
|
|
191
|
-
? " MCP 연결에 실패했습니다"
|
|
192
|
-
: " Type your message..." })] }) }) }));
|
|
193
|
-
};
|
|
194
|
-
//# sourceMappingURL=App.js.map
|
package/build/cli/App.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"App.js","sourceRoot":"","sources":["../../src/cli/App.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,EAAE,qBAAqB,E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cAChB,KAAC,YAAY,CAAC,QAAQ,IAAC,KAAK,EAAE,UAAU,YACvC,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,KAAK,EAAC,MAAM,aAEvC,KAAC,UAAU,IACV,WAAW,EAAE,YAAY,EACzB,WAAW,EAAE,cAAc,EAC3B,WAAW,EAAE,cAAc,EAC3B,cAAc,EAAE,iBAAiB,EACjC,MAAM,EAAE,SAAS,GAChB,EAEF,KAAC,WAAW,IACX,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,WAAW,EACxB,cAAc,EAAE,cAAc,EAC9B,KAAK,EAAE,aAAa,GACnB,EAGD,KAAK,IAAI,CACT,KAAC,GAAG,IAAC,QAAQ,EAAE,CAAC,EAAE,YAAY,EAAE,CAAC,YAChC,MAAC,IAAI,IAAC,KAAK,EAAC,KAAK,EAAC,IAAI,8BAClB,KAAK,CAAC,OAAO,IACV,GACF,CACN,EACD,KAAC,WAAW,IACX,QAAQ,EAAE,iBAAiB,EAC3B,KAAK,EAAE,cAAc,KAAK,MAAM,IAAI,YAAY,EAChD,WAAW,EACV,eAAe;4BACd,CAAC,CAAC,oBAAoB,iBAAiB,IAAI,cAAc,GAAG;4BAC5D,CAAC,CAAC,WAAW,IAAI,CAAC,YAAY;gCAC7B,CAAC,CAAC,iBAAiB;gCACnB,CAAC,CAAC,uBAAuB,GAE3B,IACG,GACiB,GACN,CACnB,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const AppContainer: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from "react";
|
|
3
|
-
import { App } from "./App.js";
|
|
4
|
-
import { LLMErrorComponent } from "./ui/LLMErrorComponent.js";
|
|
5
|
-
import { LLMHealthChecker } from "./ui/LLMHealthChecker.js";
|
|
6
|
-
export const AppContainer = () => {
|
|
7
|
-
const [llmStatus, setLLMStatus] = useState("checking");
|
|
8
|
-
const [errorMessage, setErrorMessage] = useState("");
|
|
9
|
-
const llmApi_URL = (process.env["LLM_API_URL"] || "http://127.0.0.1:8080").replace(/\/$/, "");
|
|
10
|
-
if (llmStatus === "checking") {
|
|
11
|
-
return (_jsx(LLMHealthChecker, { llmApi_URL: llmApi_URL, setLLMStatus: setLLMStatus, setErrorMessage: setErrorMessage }));
|
|
12
|
-
}
|
|
13
|
-
if (llmStatus === "error") {
|
|
14
|
-
return (_jsx(LLMErrorComponent, { apiUrl: llmApi_URL, errorMessage: errorMessage }));
|
|
15
|
-
}
|
|
16
|
-
return _jsx(App, {});
|
|
17
|
-
};
|
|
18
|
-
//# sourceMappingURL=AppContainer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AppContainer.js","sourceRoot":"","sources":["../../src/cli/AppContainer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAG5D,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,EAAE;IAChC,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAkB,UAAU,CAAC,CAAC;IACxE,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IACrD,MAAM,UAAU,GAAG,CAClB,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,uBAAuB,CACrD,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IAErB,IAAI,SAAS,KAAK,UAAU,EAAE,CAAC;QAC9B,OAAO,CACN,KAAC,gBAAgB,IAChB,UAAU,EAAE,UAAU,EACtB,YAAY,EAAE,YAAY,EAC1B,eAAe,EAAE,eAAe,GAC/B,CACF,CAAC;IACH,CAAC;IAED,IAAI,SAAS,KAAK,OAAO,EAAE,CAAC;QAC3B,OAAO,CACN,KAAC,iBAAiB,IAAC,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,GAAI,CACrE,CAAC;IACH,CAAC;IAED,OAAO,KAAC,GAAG,KAAG,CAAC;AAChB,CAAC,CAAC"}
|
package/build/cli/colors.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared color constants for the CLI UI.
|
|
3
|
-
*/
|
|
4
|
-
export declare const Colors: {
|
|
5
|
-
readonly Gray: "#808080";
|
|
6
|
-
readonly DimGray: "#696969";
|
|
7
|
-
readonly LightGray: "#d3d3d3";
|
|
8
|
-
readonly Cyan: "#00bcd4";
|
|
9
|
-
readonly Green: "#4caf50";
|
|
10
|
-
readonly Yellow: "#ffeb3b";
|
|
11
|
-
readonly Red: "#f44336";
|
|
12
|
-
readonly White: "#ffffff";
|
|
13
|
-
readonly Black: "#000000";
|
|
14
|
-
};
|
|
15
|
-
export type ColorKey = keyof typeof Colors;
|
package/build/cli/colors.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared color constants for the CLI UI.
|
|
3
|
-
*/
|
|
4
|
-
export const Colors = {
|
|
5
|
-
Gray: "#808080",
|
|
6
|
-
DimGray: "#696969",
|
|
7
|
-
LightGray: "#d3d3d3",
|
|
8
|
-
Cyan: "#00bcd4",
|
|
9
|
-
Green: "#4caf50",
|
|
10
|
-
Yellow: "#ffeb3b",
|
|
11
|
-
Red: "#f44336",
|
|
12
|
-
White: "#ffffff",
|
|
13
|
-
Black: "#000000",
|
|
14
|
-
};
|
|
15
|
-
//# sourceMappingURL=colors.js.map
|
package/build/cli/colors.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"colors.js","sourceRoot":"","sources":["../../src/cli/colors.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG;IACrB,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,SAAS;IACpB,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,SAAS;IAChB,MAAM,EAAE,SAAS;IACjB,GAAG,EAAE,SAAS;IACd,KAAK,EAAE,SAAS;IAChB,KAAK,EAAE,SAAS;CACP,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export declare enum CommandKind {
|
|
2
|
-
BUILT_IN = "built-in",
|
|
3
|
-
USER_FILE = "user-file",
|
|
4
|
-
WORKSPACE_FILE = "workspace-file",
|
|
5
|
-
EXTENSION_FILE = "extension-file",
|
|
6
|
-
MCP_PROMPT = "mcp-prompt",
|
|
7
|
-
AGENT = "agent",
|
|
8
|
-
SKILL = "skill"
|
|
9
|
-
}
|
|
10
|
-
export interface SlashCommand {
|
|
11
|
-
name: string;
|
|
12
|
-
description?: string;
|
|
13
|
-
action?: (args: string) => void | Promise<void>;
|
|
14
|
-
completion?: (query: string) => Promise<string[]>;
|
|
15
|
-
subcommands?: SlashCommand[];
|
|
16
|
-
}
|
|
17
|
-
export interface CommandContext {
|
|
18
|
-
[key: string]: unknown;
|
|
19
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export var CommandKind;
|
|
2
|
-
(function (CommandKind) {
|
|
3
|
-
CommandKind["BUILT_IN"] = "built-in";
|
|
4
|
-
CommandKind["USER_FILE"] = "user-file";
|
|
5
|
-
CommandKind["WORKSPACE_FILE"] = "workspace-file";
|
|
6
|
-
CommandKind["EXTENSION_FILE"] = "extension-file";
|
|
7
|
-
CommandKind["MCP_PROMPT"] = "mcp-prompt";
|
|
8
|
-
CommandKind["AGENT"] = "agent";
|
|
9
|
-
CommandKind["SKILL"] = "skill";
|
|
10
|
-
})(CommandKind || (CommandKind = {}));
|
|
11
|
-
//# sourceMappingURL=types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/cli/commands/types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,WAQX;AARD,WAAY,WAAW;IACtB,oCAAqB,CAAA;IACrB,sCAAuB,CAAA;IACvB,gDAAiC,CAAA;IACjC,gDAAiC,CAAA;IACjC,wCAAyB,CAAA;IACzB,8BAAe,CAAA;IACf,8BAAe,CAAA;AAChB,CAAC,EARW,WAAW,KAAX,WAAW,QAQtB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SettingContext.js","sourceRoot":"","sources":["../../../src/cli/config/SettingContext.tsx"],"names":[],"mappings":""}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
declare const mcpServerEntrySchema: z.ZodObject<{
|
|
3
|
-
command: z.ZodString;
|
|
4
|
-
args: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
5
|
-
env: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
6
|
-
cwd: z.ZodOptional<z.ZodString>;
|
|
7
|
-
disabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
8
|
-
}, "strip", z.ZodTypeAny, {
|
|
9
|
-
command: string;
|
|
10
|
-
args: string[];
|
|
11
|
-
env: Record<string, string>;
|
|
12
|
-
disabled: boolean;
|
|
13
|
-
cwd?: string | undefined;
|
|
14
|
-
}, {
|
|
15
|
-
command: string;
|
|
16
|
-
cwd?: string | undefined;
|
|
17
|
-
args?: string[] | undefined;
|
|
18
|
-
env?: Record<string, string> | undefined;
|
|
19
|
-
disabled?: boolean | undefined;
|
|
20
|
-
}>;
|
|
21
|
-
export type McpServerEntry = z.infer<typeof mcpServerEntrySchema>;
|
|
22
|
-
export interface McpServerConfig {
|
|
23
|
-
name: string;
|
|
24
|
-
command: string;
|
|
25
|
-
args: string[];
|
|
26
|
-
env: Record<string, string>;
|
|
27
|
-
cwd?: string;
|
|
28
|
-
}
|
|
29
|
-
export declare function loadMcpServersConfig(): McpServerConfig[];
|
|
30
|
-
export {};
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import { existsSync, readFileSync } from "node:fs";
|
|
2
|
-
import { join, resolve } from "node:path";
|
|
3
|
-
import { z } from "zod";
|
|
4
|
-
import { configSchema } from "../../config.js";
|
|
5
|
-
import { debugLogger } from "../utils/debugLogger.js";
|
|
6
|
-
const mcpServerEntrySchema = z.object({
|
|
7
|
-
command: z.string().min(1),
|
|
8
|
-
args: z.array(z.string()).optional().default([]),
|
|
9
|
-
env: z.record(z.string(), z.string()).optional().default({}),
|
|
10
|
-
cwd: z.string().optional(),
|
|
11
|
-
disabled: z.boolean().optional().default(false),
|
|
12
|
-
});
|
|
13
|
-
const mcpServersFileSchema = z.object({
|
|
14
|
-
mcpServers: z.record(z.string(), mcpServerEntrySchema),
|
|
15
|
-
});
|
|
16
|
-
const ENV_VAR_PATTERN = /\$\{([^}:]+?)(?::-(.*?))?\}/g;
|
|
17
|
-
function substituteEnvVars(value) {
|
|
18
|
-
return value.replace(ENV_VAR_PATTERN, (_match, varName, defaultValue) => {
|
|
19
|
-
const envValue = process.env[varName];
|
|
20
|
-
if (envValue !== undefined && envValue !== "") {
|
|
21
|
-
return envValue;
|
|
22
|
-
}
|
|
23
|
-
if (defaultValue !== undefined) {
|
|
24
|
-
return defaultValue;
|
|
25
|
-
}
|
|
26
|
-
return "";
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
function substituteEnvInRecord(record) {
|
|
30
|
-
const result = {};
|
|
31
|
-
for (const [key, value] of Object.entries(record)) {
|
|
32
|
-
result[key] = substituteEnvVars(value);
|
|
33
|
-
}
|
|
34
|
-
return result;
|
|
35
|
-
}
|
|
36
|
-
function findConfigFile() {
|
|
37
|
-
const candidates = [
|
|
38
|
-
join(process.cwd(), "mcp-servers.json"),
|
|
39
|
-
join(process.cwd(), ".mcp-servers.json"),
|
|
40
|
-
];
|
|
41
|
-
for (const candidate of candidates) {
|
|
42
|
-
if (existsSync(candidate)) {
|
|
43
|
-
return candidate;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
return null;
|
|
47
|
-
}
|
|
48
|
-
function buildFallbackConfig() {
|
|
49
|
-
try {
|
|
50
|
-
const env = configSchema.parse({
|
|
51
|
-
vaultPath: process.env["VAULT_DIR_PATH"],
|
|
52
|
-
loggingLevel: process.env["LOGGING_LEVEL"],
|
|
53
|
-
llmApiUrl: process.env["LLM_API_URL"],
|
|
54
|
-
llmEmbeddingApiUrl: process.env["LLM_EMBEDDING_API_URL"],
|
|
55
|
-
llmEmbeddingModel: process.env["LLM_EMBEDDING_MODEL"],
|
|
56
|
-
llmChatModel: process.env["LLM_CHAT_MODEL"],
|
|
57
|
-
});
|
|
58
|
-
if (!env.vaultPath) {
|
|
59
|
-
debugLogger.warn("[McpConfig] VAULT_DIR_PATH가 설정되지 않아 폴백 서버를 생성할 수 없습니다.");
|
|
60
|
-
return [];
|
|
61
|
-
}
|
|
62
|
-
const projectRoot = process.cwd();
|
|
63
|
-
const serverEntry = "build/index.js";
|
|
64
|
-
return [
|
|
65
|
-
{
|
|
66
|
-
name: "obsidian",
|
|
67
|
-
command: "node",
|
|
68
|
-
args: [serverEntry],
|
|
69
|
-
cwd: projectRoot,
|
|
70
|
-
env: {
|
|
71
|
-
VAULT_DIR_PATH: env.vaultPath,
|
|
72
|
-
LLM_API_URL: env.llmApiUrl ?? "http://127.0.0.1:8080",
|
|
73
|
-
LLM_EMBEDDING_API_URL: env.llmEmbeddingApiUrl ?? "http://127.0.0.1:8081",
|
|
74
|
-
LLM_EMBEDDING_MODEL: env.llmEmbeddingModel ?? "nomic-embed-text",
|
|
75
|
-
LLM_CHAT_MODEL: env.llmChatModel ?? "llama3",
|
|
76
|
-
LOGGING_LEVEL: process.env["LOGGING_LEVEL"] ?? "info",
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
];
|
|
80
|
-
}
|
|
81
|
-
catch (err) {
|
|
82
|
-
debugLogger.error("[McpConfig] 폴백 설정 생성 실패:", err);
|
|
83
|
-
return [];
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
export function loadMcpServersConfig() {
|
|
87
|
-
const configPath = findConfigFile();
|
|
88
|
-
if (!configPath) {
|
|
89
|
-
debugLogger.warn("[McpConfig] mcp-servers.json을 찾을 수 없습니다. 환경변수 폴백을 사용합니다.");
|
|
90
|
-
return buildFallbackConfig();
|
|
91
|
-
}
|
|
92
|
-
try {
|
|
93
|
-
const raw = readFileSync(configPath, "utf-8");
|
|
94
|
-
const parsed = JSON.parse(raw);
|
|
95
|
-
const validated = mcpServersFileSchema.parse(parsed);
|
|
96
|
-
const configs = [];
|
|
97
|
-
for (const [name, entry] of Object.entries(validated.mcpServers)) {
|
|
98
|
-
if (entry.disabled) {
|
|
99
|
-
debugLogger.info(`[McpConfig] "${name}" 서버가 비활성화되어 있어 건너뜁니다.`);
|
|
100
|
-
continue;
|
|
101
|
-
}
|
|
102
|
-
configs.push({
|
|
103
|
-
name,
|
|
104
|
-
command: substituteEnvVars(entry.command),
|
|
105
|
-
args: entry.args.map(substituteEnvVars),
|
|
106
|
-
env: substituteEnvInRecord(entry.env),
|
|
107
|
-
cwd: entry.cwd ? resolve(entry.cwd) : process.cwd(),
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
debugLogger.info(`[McpConfig] ${configPath}에서 ${configs.length}개의 MCP 서버 설정을 로드했습니다.`);
|
|
111
|
-
return configs;
|
|
112
|
-
}
|
|
113
|
-
catch (err) {
|
|
114
|
-
debugLogger.error(`[McpConfig] 설정 파일 파싱 실패 (${configPath}):`, err);
|
|
115
|
-
debugLogger.warn("[McpConfig] 환경변수 폴백을 사용합니다.");
|
|
116
|
-
return buildFallbackConfig();
|
|
117
|
-
}
|
|
118
|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,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC;QAChD,OAAO,mBAAmB,EAAE,CAAC;IAC9B,CAAC;AACF,CAAC"}
|
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
export type SettingsType = "boolean" | "string" | "number" | "array" | "object" | "enum";
|
|
2
|
-
export type SettingsValue = boolean | string | number | string[] | object | undefined;
|
|
3
|
-
export declare enum MergeStrategy {
|
|
4
|
-
SHALLOW_MERGE = "shallow_merge",
|
|
5
|
-
CONCAT = "concat",
|
|
6
|
-
UNION = "union",
|
|
7
|
-
REPLACE = "replace"
|
|
8
|
-
}
|
|
9
|
-
export interface SettingEnumOption {
|
|
10
|
-
value: string;
|
|
11
|
-
label: string;
|
|
12
|
-
}
|
|
13
|
-
export interface SettingCollectionDefinition {
|
|
14
|
-
type: SettingsType;
|
|
15
|
-
description?: string;
|
|
16
|
-
ref?: string;
|
|
17
|
-
}
|
|
18
|
-
export interface SettingDefinition {
|
|
19
|
-
type: SettingsType;
|
|
20
|
-
label: string;
|
|
21
|
-
category: string;
|
|
22
|
-
requiresRestart: boolean;
|
|
23
|
-
default: SettingsValue;
|
|
24
|
-
description?: string;
|
|
25
|
-
parentKey?: string;
|
|
26
|
-
childKey?: string;
|
|
27
|
-
key?: string;
|
|
28
|
-
properties?: SettingsSchema;
|
|
29
|
-
showInDialog?: boolean;
|
|
30
|
-
ignoreInDocs?: boolean;
|
|
31
|
-
mergeStrategy?: MergeStrategy;
|
|
32
|
-
/** Enum type options */
|
|
33
|
-
options?: readonly SettingEnumOption[];
|
|
34
|
-
/**
|
|
35
|
-
* For collection types (e.g. arrays), describes the shape of each item.
|
|
36
|
-
*/
|
|
37
|
-
items?: SettingCollectionDefinition;
|
|
38
|
-
/**
|
|
39
|
-
* For map-like objects without explicit `properties`, describes the shape of the values.
|
|
40
|
-
*/
|
|
41
|
-
additionalProperties?: SettingCollectionDefinition;
|
|
42
|
-
/**
|
|
43
|
-
* Optional unit to display after the value (e.g. '%').
|
|
44
|
-
*/
|
|
45
|
-
unit?: string;
|
|
46
|
-
/**
|
|
47
|
-
* Optional reference identifier for generators that emit a `$ref`.
|
|
48
|
-
*/
|
|
49
|
-
ref?: string;
|
|
50
|
-
}
|
|
51
|
-
export interface SettingsSchema {
|
|
52
|
-
[key: string]: SettingDefinition;
|
|
53
|
-
}
|
|
54
|
-
export declare const SETTINGS_SCHEMA: {
|
|
55
|
-
readonly obsidian: {
|
|
56
|
-
readonly type: "object";
|
|
57
|
-
readonly label: "Obsidian Vault";
|
|
58
|
-
readonly category: "Obsidian";
|
|
59
|
-
readonly requiresRestart: true;
|
|
60
|
-
readonly default: {};
|
|
61
|
-
readonly description: "Obsidian Vault 연동 및 데이터 관리 설정";
|
|
62
|
-
readonly showInDialog: true;
|
|
63
|
-
readonly properties: {
|
|
64
|
-
readonly vaultPath: {
|
|
65
|
-
readonly type: "string";
|
|
66
|
-
readonly label: "Vault 절대 경로";
|
|
67
|
-
readonly category: "Obsidian";
|
|
68
|
-
readonly requiresRestart: true;
|
|
69
|
-
readonly default: "";
|
|
70
|
-
readonly description: "Obsidian Vault 디렉토리의 절대 경로 (VAULT_DIR_PATH)";
|
|
71
|
-
readonly showInDialog: true;
|
|
72
|
-
};
|
|
73
|
-
readonly loggingLevel: {
|
|
74
|
-
readonly type: "enum";
|
|
75
|
-
readonly label: "로그 레벨";
|
|
76
|
-
readonly category: "Obsidian";
|
|
77
|
-
readonly requiresRestart: false;
|
|
78
|
-
readonly default: "info";
|
|
79
|
-
readonly description: "서버 로그 기록 상세 수준";
|
|
80
|
-
readonly showInDialog: true;
|
|
81
|
-
readonly options: readonly [{
|
|
82
|
-
readonly value: "debug";
|
|
83
|
-
readonly label: "Debug";
|
|
84
|
-
}, {
|
|
85
|
-
readonly value: "info";
|
|
86
|
-
readonly label: "Info";
|
|
87
|
-
}, {
|
|
88
|
-
readonly value: "warn";
|
|
89
|
-
readonly label: "Warn";
|
|
90
|
-
}, {
|
|
91
|
-
readonly value: "error";
|
|
92
|
-
readonly label: "Error";
|
|
93
|
-
}];
|
|
94
|
-
};
|
|
95
|
-
readonly metricsLogPath: {
|
|
96
|
-
readonly type: "string";
|
|
97
|
-
readonly label: "메트릭 로그 경로";
|
|
98
|
-
readonly category: "Obsidian";
|
|
99
|
-
readonly requiresRestart: false;
|
|
100
|
-
readonly default: "";
|
|
101
|
-
readonly description: "토큰 사용량 등 메트릭을 기록할 JSONL 파일 경로 (VAULT_METRICS_LOG_PATH)";
|
|
102
|
-
readonly showInDialog: true;
|
|
103
|
-
};
|
|
104
|
-
};
|
|
105
|
-
};
|
|
106
|
-
readonly llm: {
|
|
107
|
-
readonly type: "object";
|
|
108
|
-
readonly label: "LLM (Local RAG)";
|
|
109
|
-
readonly category: "RAG";
|
|
110
|
-
readonly requiresRestart: true;
|
|
111
|
-
readonly default: {};
|
|
112
|
-
readonly description: "로컬 AI 모델 연동 및 임베딩 설정";
|
|
113
|
-
readonly showInDialog: true;
|
|
114
|
-
readonly properties: {
|
|
115
|
-
readonly apiUrl: {
|
|
116
|
-
readonly type: "string";
|
|
117
|
-
readonly label: "Chat API URL";
|
|
118
|
-
readonly category: "RAG";
|
|
119
|
-
readonly requiresRestart: true;
|
|
120
|
-
readonly default: "http://127.0.0.1:8080";
|
|
121
|
-
readonly description: "로컬 LLM 채팅 서버 주소 (LLM_API_URL)";
|
|
122
|
-
readonly showInDialog: true;
|
|
123
|
-
};
|
|
124
|
-
readonly embeddingApiUrl: {
|
|
125
|
-
readonly type: "string";
|
|
126
|
-
readonly label: "Embedding API URL";
|
|
127
|
-
readonly category: "RAG";
|
|
128
|
-
readonly requiresRestart: true;
|
|
129
|
-
readonly default: "http://127.0.0.1:8081";
|
|
130
|
-
readonly description: "로컬 임베딩 서버 주소 (LLM_EMBEDDING_API_URL)";
|
|
131
|
-
readonly showInDialog: true;
|
|
132
|
-
};
|
|
133
|
-
readonly embedModel: {
|
|
134
|
-
readonly type: "string";
|
|
135
|
-
readonly label: "임베딩 모델";
|
|
136
|
-
readonly category: "RAG";
|
|
137
|
-
readonly requiresRestart: true;
|
|
138
|
-
readonly default: "nomic-embed-text";
|
|
139
|
-
readonly description: "벡터화에 사용할 임베딩 모델명 (LLM_EMBEDDING_MODEL)";
|
|
140
|
-
readonly showInDialog: true;
|
|
141
|
-
};
|
|
142
|
-
readonly chatModel: {
|
|
143
|
-
readonly type: "string";
|
|
144
|
-
readonly label: "채팅 모델";
|
|
145
|
-
readonly category: "RAG";
|
|
146
|
-
readonly requiresRestart: true;
|
|
147
|
-
readonly default: "llama3";
|
|
148
|
-
readonly description: "답변 생성에 사용할 모델명 (LLM_CHAT_MODEL)";
|
|
149
|
-
readonly showInDialog: true;
|
|
150
|
-
};
|
|
151
|
-
};
|
|
152
|
-
};
|
|
153
|
-
readonly general: {
|
|
154
|
-
readonly type: "object";
|
|
155
|
-
readonly label: "일반 설정";
|
|
156
|
-
readonly category: "General";
|
|
157
|
-
readonly requiresRestart: false;
|
|
158
|
-
readonly default: {};
|
|
159
|
-
readonly description: "일반적인 애플리케이션 설정";
|
|
160
|
-
readonly showInDialog: true;
|
|
161
|
-
readonly properties: {
|
|
162
|
-
readonly defaultApprovalMode: {
|
|
163
|
-
readonly type: "enum";
|
|
164
|
-
readonly label: "도구 승인 모드";
|
|
165
|
-
readonly category: "General";
|
|
166
|
-
readonly requiresRestart: false;
|
|
167
|
-
readonly default: "default";
|
|
168
|
-
readonly description: "도구 실행 시 승인 절차를 제어합니다.";
|
|
169
|
-
readonly showInDialog: true;
|
|
170
|
-
readonly options: readonly [{
|
|
171
|
-
readonly value: "default";
|
|
172
|
-
readonly label: "승인 필요";
|
|
173
|
-
}, {
|
|
174
|
-
readonly value: "auto_edit";
|
|
175
|
-
readonly label: "자동 수정 허용";
|
|
176
|
-
}];
|
|
177
|
-
};
|
|
178
|
-
};
|
|
179
|
-
};
|
|
180
|
-
};
|