@sunub/obsidian-mcp-server 0.3.4 → 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.
Files changed (323) hide show
  1. package/build/config.d.ts +2 -27
  2. package/build/config.js +11 -31
  3. package/build/config.js.map +1 -1
  4. package/build/db.js +3 -0
  5. package/build/db.js.map +1 -1
  6. package/build/index.js +28 -6
  7. package/build/index.js.map +1 -1
  8. package/build/server.js +16 -13
  9. package/build/server.js.map +1 -1
  10. package/build/setup.d.ts +4 -0
  11. package/build/setup.js +114 -0
  12. package/build/setup.js.map +1 -0
  13. package/build/tools/create_document_with_properties/index.d.ts +5 -5
  14. package/build/tools/create_document_with_properties/index.js +2 -2
  15. package/build/tools/create_document_with_properties/index.js.map +1 -1
  16. package/build/tools/create_document_with_properties/params.d.ts +8 -8
  17. package/build/tools/create_document_with_properties/params.js +1 -1
  18. package/build/tools/create_document_with_properties/params.js.map +1 -1
  19. package/build/tools/generate_property/index.d.ts +1 -1
  20. package/build/tools/generate_property/index.js +1 -1
  21. package/build/tools/generate_property/index.js.map +1 -1
  22. package/build/tools/generate_property/params.d.ts +4 -4
  23. package/build/tools/index.d.ts +8 -8
  24. package/build/tools/index.js +5 -5
  25. package/build/tools/index.js.map +1 -1
  26. package/build/tools/organize_attachments/index.d.ts +1 -1
  27. package/build/tools/organize_attachments/index.js +2 -2
  28. package/build/tools/organize_attachments/index.js.map +1 -1
  29. package/build/tools/vault/index.d.ts +2 -2
  30. package/build/tools/vault/index.js +7 -8
  31. package/build/tools/vault/index.js.map +1 -1
  32. package/build/tools/vault/params.d.ts +4 -4
  33. package/build/tools/vault/types/collect_context.d.ts +58 -58
  34. package/build/tools/vault/types/collect_context.js +1 -1
  35. package/build/tools/vault/types/collect_context.js.map +1 -1
  36. package/build/tools/vault/types/list_all.d.ts +42 -42
  37. package/build/tools/vault/types/list_all.js +2 -2
  38. package/build/tools/vault/types/list_all.js.map +1 -1
  39. package/build/tools/vault/types/read_specific.d.ts +6 -6
  40. package/build/tools/vault/types/read_specific.js +1 -1
  41. package/build/tools/vault/types/read_specific.js.map +1 -1
  42. package/build/tools/vault/types/search.d.ts +70 -70
  43. package/build/tools/vault/utils/actions/collect_context.d.ts +1 -1
  44. package/build/tools/vault/utils/actions/collect_context.js +4 -4
  45. package/build/tools/vault/utils/actions/collect_context.js.map +1 -1
  46. package/build/tools/vault/utils/actions/list_all.d.ts +1 -1
  47. package/build/tools/vault/utils/actions/list_all.js +1 -1
  48. package/build/tools/vault/utils/actions/list_all.js.map +1 -1
  49. package/build/tools/vault/utils/actions/load_memory.d.ts +1 -1
  50. package/build/tools/vault/utils/actions/load_memory.js +3 -3
  51. package/build/tools/vault/utils/actions/load_memory.js.map +1 -1
  52. package/build/tools/vault/utils/actions/read.d.ts +1 -1
  53. package/build/tools/vault/utils/actions/read.js +1 -1
  54. package/build/tools/vault/utils/actions/read.js.map +1 -1
  55. package/build/tools/vault/utils/actions/search.d.ts +1 -1
  56. package/build/tools/vault/utils/actions/search.js +25 -15
  57. package/build/tools/vault/utils/actions/search.js.map +1 -1
  58. package/build/tools/vault/utils/shared.d.ts +1 -1
  59. package/build/tools/vault/utils.d.ts +7 -8
  60. package/build/tools/vault/utils.js +7 -8
  61. package/build/tools/vault/utils.js.map +1 -1
  62. package/build/tools/write_property/index.d.ts +5 -5
  63. package/build/tools/write_property/index.js +1 -1
  64. package/build/tools/write_property/index.js.map +1 -1
  65. package/build/tools/write_property/params.d.ts +8 -8
  66. package/build/utils/DirectoryWalker.d.ts +1 -1
  67. package/build/utils/Embedder.d.ts +11 -0
  68. package/build/utils/Embedder.js +46 -0
  69. package/build/utils/Embedder.js.map +1 -0
  70. package/build/utils/Indexer.d.ts +4 -2
  71. package/build/utils/Indexer.js +19 -2
  72. package/build/utils/Indexer.js.map +1 -1
  73. package/build/utils/LLMClient.js +16 -0
  74. package/build/utils/LLMClient.js.map +1 -1
  75. package/build/utils/LocalReranker.d.ts +17 -0
  76. package/build/utils/LocalReranker.js +71 -0
  77. package/build/utils/LocalReranker.js.map +1 -0
  78. package/build/utils/RAGIndexer.d.ts +10 -1
  79. package/build/utils/RAGIndexer.js +59 -27
  80. package/build/utils/RAGIndexer.js.map +1 -1
  81. package/build/utils/RerankerClient.d.ts +6 -6
  82. package/build/utils/RerankerClient.js +20 -1
  83. package/build/utils/RerankerClient.js.map +1 -1
  84. package/build/utils/VaultManger/VaultManager.d.ts +38 -2
  85. package/build/utils/VaultManger/VaultManager.js +268 -13
  86. package/build/utils/VaultManger/VaultManager.js.map +1 -1
  87. package/build/utils/VaultManger/index.d.ts +3 -3
  88. package/build/utils/VaultManger/index.js +2 -2
  89. package/build/utils/VaultManger/index.js.map +1 -1
  90. package/build/utils/VaultManger/types.d.ts +1 -1
  91. package/build/utils/VaultWatcher.d.ts +1 -1
  92. package/build/utils/VaultWatcher.js +12 -55
  93. package/build/utils/VaultWatcher.js.map +1 -1
  94. package/build/utils/VectorDB.js +31 -6
  95. package/build/utils/VectorDB.js.map +1 -1
  96. package/build/utils/constants.d.ts +3 -0
  97. package/build/utils/constants.js +14 -0
  98. package/build/utils/constants.js.map +1 -0
  99. package/build/utils/getVaultManager.d.ts +1 -1
  100. package/build/utils/getVaultManager.js +1 -1
  101. package/build/utils/getVaultManager.js.map +1 -1
  102. package/build/utils/processor/MatterParser.d.ts +1 -1
  103. package/build/utils/processor/MatterParser.js +1 -1
  104. package/build/utils/processor/MatterParser.js.map +1 -1
  105. package/build/utils/processor/types.d.ts +4 -0
  106. package/build/utils/processor/types.js +1 -0
  107. package/build/utils/processor/types.js.map +1 -1
  108. package/package.json +16 -49
  109. package/LICENSE +0 -15
  110. package/README.md +0 -512
  111. package/build/cli/AppContainer.d.ts +0 -1
  112. package/build/cli/AppContainer.js +0 -197
  113. package/build/cli/AppContainer.js.map +0 -1
  114. package/build/cli/app.d.ts +0 -1
  115. package/build/cli/app.js +0 -7
  116. package/build/cli/app.js.map +0 -1
  117. package/build/cli/colors.d.ts +0 -15
  118. package/build/cli/colors.js +0 -15
  119. package/build/cli/colors.js.map +0 -1
  120. package/build/cli/commands/types.d.ts +0 -19
  121. package/build/cli/commands/types.js +0 -11
  122. package/build/cli/commands/types.js.map +0 -1
  123. package/build/cli/config/SettingContext.d.ts +0 -1
  124. package/build/cli/config/SettingContext.js +0 -2
  125. package/build/cli/config/SettingContext.js.map +0 -1
  126. package/build/cli/config/mcpServersConfig.d.ts +0 -30
  127. package/build/cli/config/mcpServersConfig.js +0 -119
  128. package/build/cli/config/mcpServersConfig.js.map +0 -1
  129. package/build/cli/config/settingSchema.d.ts +0 -180
  130. package/build/cli/config/settingSchema.js +0 -128
  131. package/build/cli/config/settingSchema.js.map +0 -1
  132. package/build/cli/constants.d.ts +0 -47
  133. package/build/cli/constants.js +0 -101
  134. package/build/cli/constants.js.map +0 -1
  135. package/build/cli/context/InputContext.d.ts +0 -12
  136. package/build/cli/context/InputContext.js +0 -10
  137. package/build/cli/context/InputContext.js.map +0 -1
  138. package/build/cli/context/KeypressContext.d.ts +0 -30
  139. package/build/cli/context/KeypressContext.js +0 -200
  140. package/build/cli/context/KeypressContext.js.map +0 -1
  141. package/build/cli/context/KeypressContext.util.d.ts +0 -7
  142. package/build/cli/context/KeypressContext.util.js +0 -474
  143. package/build/cli/context/KeypressContext.util.js.map +0 -1
  144. package/build/cli/hooks/useAtCompletion.d.ts +0 -12
  145. package/build/cli/hooks/useAtCompletion.js +0 -5
  146. package/build/cli/hooks/useAtCompletion.js.map +0 -1
  147. package/build/cli/hooks/useCommandCompletion.d.ts +0 -59
  148. package/build/cli/hooks/useCommandCompletion.js +0 -344
  149. package/build/cli/hooks/useCommandCompletion.js.map +0 -1
  150. package/build/cli/hooks/useCompletion.d.ts +0 -22
  151. package/build/cli/hooks/useCompletion.js +0 -84
  152. package/build/cli/hooks/useCompletion.js.map +0 -1
  153. package/build/cli/hooks/useDispatcher.d.ts +0 -6
  154. package/build/cli/hooks/useDispatcher.js +0 -286
  155. package/build/cli/hooks/useDispatcher.js.map +0 -1
  156. package/build/cli/hooks/useFocus.d.ts +0 -2
  157. package/build/cli/hooks/useFocus.js +0 -3
  158. package/build/cli/hooks/useFocus.js.map +0 -1
  159. package/build/cli/hooks/useInputHistory.d.ts +0 -24
  160. package/build/cli/hooks/useInputHistory.js +0 -159
  161. package/build/cli/hooks/useInputHistory.js.map +0 -1
  162. package/build/cli/hooks/useKeyMatchers.d.ts +0 -17
  163. package/build/cli/hooks/useKeyMatchers.js +0 -13
  164. package/build/cli/hooks/useKeyMatchers.js.map +0 -1
  165. package/build/cli/hooks/useKeypress.d.ts +0 -19
  166. package/build/cli/hooks/useKeypress.js +0 -28
  167. package/build/cli/hooks/useKeypress.js.map +0 -1
  168. package/build/cli/hooks/useLlmStream.d.ts +0 -12
  169. package/build/cli/hooks/useLlmStream.js +0 -365
  170. package/build/cli/hooks/useLlmStream.js.map +0 -1
  171. package/build/cli/hooks/useMcpClient.d.ts +0 -10
  172. package/build/cli/hooks/useMcpClient.js +0 -100
  173. package/build/cli/hooks/useMcpClient.js.map +0 -1
  174. package/build/cli/hooks/useMcpManager.d.ts +0 -22
  175. package/build/cli/hooks/useMcpManager.js +0 -86
  176. package/build/cli/hooks/useMcpManager.js.map +0 -1
  177. package/build/cli/hooks/usePromptCompletion.d.ts +0 -19
  178. package/build/cli/hooks/usePromptCompletion.js +0 -13
  179. package/build/cli/hooks/usePromptCompletion.js.map +0 -1
  180. package/build/cli/hooks/useRagContext.d.ts +0 -6
  181. package/build/cli/hooks/useRagContext.js +0 -83
  182. package/build/cli/hooks/useRagContext.js.map +0 -1
  183. package/build/cli/hooks/useShellCompletion.d.ts +0 -18
  184. package/build/cli/hooks/useShellCompletion.js +0 -10
  185. package/build/cli/hooks/useShellCompletion.js.map +0 -1
  186. package/build/cli/hooks/useSlashCompletion.d.ts +0 -21
  187. package/build/cli/hooks/useSlashCompletion.js +0 -11
  188. package/build/cli/hooks/useSlashCompletion.js.map +0 -1
  189. package/build/cli/hooks/useTerminalSize.d.ts +0 -9
  190. package/build/cli/hooks/useTerminalSize.js +0 -26
  191. package/build/cli/hooks/useTerminalSize.js.map +0 -1
  192. package/build/cli/index.d.ts +0 -1
  193. package/build/cli/index.js +0 -39
  194. package/build/cli/index.js.map +0 -1
  195. package/build/cli/key/input.d.ts +0 -5
  196. package/build/cli/key/input.js +0 -9
  197. package/build/cli/key/input.js.map +0 -1
  198. package/build/cli/key/keyBindings.d.ts +0 -152
  199. package/build/cli/key/keyBindings.js +0 -630
  200. package/build/cli/key/keyBindings.js.map +0 -1
  201. package/build/cli/key/keyMatchers.d.ts +0 -27
  202. package/build/cli/key/keyMatchers.js +0 -33
  203. package/build/cli/key/keyMatchers.js.map +0 -1
  204. package/build/cli/key/mouse.d.ts +0 -23
  205. package/build/cli/key/mouse.js +0 -155
  206. package/build/cli/key/mouse.js.map +0 -1
  207. package/build/cli/key/text-buffer-bestcase.d.ts +0 -867
  208. package/build/cli/key/text-buffer-bestcase.js +0 -2754
  209. package/build/cli/key/text-buffer-bestcase.js.map +0 -1
  210. package/build/cli/key/text-buffer.d.ts +0 -509
  211. package/build/cli/key/text-buffer.js +0 -918
  212. package/build/cli/key/text-buffer.js.map +0 -1
  213. package/build/cli/main.d.ts +0 -1
  214. package/build/cli/main.js +0 -20
  215. package/build/cli/main.js.map +0 -1
  216. package/build/cli/reference/HistoryItemDisplay.d.ts +0 -23
  217. package/build/cli/reference/HistoryItemDisplay.js +0 -63
  218. package/build/cli/reference/HistoryItemDisplay.js.map +0 -1
  219. package/build/cli/reference/InputContext.d.ts +0 -17
  220. package/build/cli/reference/InputContext.js +0 -16
  221. package/build/cli/reference/InputContext.js.map +0 -1
  222. package/build/cli/reference/KerypressContext.d.ts +0 -37
  223. package/build/cli/reference/KerypressContext.js +0 -791
  224. package/build/cli/reference/KerypressContext.js.map +0 -1
  225. package/build/cli/reference/MainContent.d.ts +0 -6
  226. package/build/cli/reference/MainContent.js +0 -207
  227. package/build/cli/reference/MainContent.js.map +0 -1
  228. package/build/cli/reference/UIStateContext.d.ts +0 -188
  229. package/build/cli/reference/UIStateContext.js +0 -16
  230. package/build/cli/reference/UIStateContext.js.map +0 -1
  231. package/build/cli/reference/text-buffer.d.ts +0 -867
  232. package/build/cli/reference/text-buffer.js +0 -2754
  233. package/build/cli/reference/text-buffer.js.map +0 -1
  234. package/build/cli/reference/useGeminiStream.d.ts +0 -42
  235. package/build/cli/reference/useGeminiStream.js +0 -1404
  236. package/build/cli/reference/useGeminiStream.js.map +0 -1
  237. package/build/cli/services/McpClientService.d.ts +0 -32
  238. package/build/cli/services/McpClientService.js +0 -123
  239. package/build/cli/services/McpClientService.js.map +0 -1
  240. package/build/cli/services/McpManager.d.ts +0 -28
  241. package/build/cli/services/McpManager.js +0 -146
  242. package/build/cli/services/McpManager.js.map +0 -1
  243. package/build/cli/theme/builtin/default-dark.d.ts +0 -7
  244. package/build/cli/theme/builtin/default-dark.js +0 -143
  245. package/build/cli/theme/builtin/default-dark.js.map +0 -1
  246. package/build/cli/theme/builtin/no-color.d.ts +0 -7
  247. package/build/cli/theme/builtin/no-color.js +0 -125
  248. package/build/cli/theme/builtin/no-color.js.map +0 -1
  249. package/build/cli/theme/builtin/tokyonight-dark.d.ts +0 -7
  250. package/build/cli/theme/builtin/tokyonight-dark.js +0 -146
  251. package/build/cli/theme/builtin/tokyonight-dark.js.map +0 -1
  252. package/build/cli/theme/semantic-colors.d.ts +0 -2
  253. package/build/cli/theme/semantic-colors.js +0 -19
  254. package/build/cli/theme/semantic-colors.js.map +0 -1
  255. package/build/cli/theme/semantic-tokens.d.ts +0 -42
  256. package/build/cli/theme/semantic-tokens.js +0 -77
  257. package/build/cli/theme/semantic-tokens.js.map +0 -1
  258. package/build/cli/theme/theme-manager.d.ts +0 -32
  259. package/build/cli/theme/theme-manager.js +0 -150
  260. package/build/cli/theme/theme-manager.js.map +0 -1
  261. package/build/cli/theme/theme.d.ts +0 -107
  262. package/build/cli/theme/theme.js +0 -333
  263. package/build/cli/theme/theme.js.map +0 -1
  264. package/build/cli/tmp.d.ts +0 -1
  265. package/build/cli/tmp.js +0 -27
  266. package/build/cli/tmp.js.map +0 -1
  267. package/build/cli/types.d.ts +0 -72
  268. package/build/cli/types.js +0 -8
  269. package/build/cli/types.js.map +0 -1
  270. package/build/cli/ui/ConnectionStatus.d.ts +0 -13
  271. package/build/cli/ui/ConnectionStatus.js +0 -24
  272. package/build/cli/ui/ConnectionStatus.js.map +0 -1
  273. package/build/cli/ui/HelpCommands.d.ts +0 -5
  274. package/build/cli/ui/HelpCommands.js +0 -11
  275. package/build/cli/ui/HelpCommands.js.map +0 -1
  276. package/build/cli/ui/HistoryItemDisplay.d.ts +0 -9
  277. package/build/cli/ui/HistoryItemDisplay.js +0 -38
  278. package/build/cli/ui/HistoryItemDisplay.js.map +0 -1
  279. package/build/cli/ui/InputPrompt-bestcase.d.ts +0 -63
  280. package/build/cli/ui/InputPrompt-bestcase.js +0 -1301
  281. package/build/cli/ui/InputPrompt-bestcase.js.map +0 -1
  282. package/build/cli/ui/InputPrompt.d.ts +0 -12
  283. package/build/cli/ui/InputPrompt.js +0 -145
  284. package/build/cli/ui/InputPrompt.js.map +0 -1
  285. package/build/cli/ui/InputPrompt.tmp.d.ts +0 -7
  286. package/build/cli/ui/InputPrompt.tmp.js +0 -215
  287. package/build/cli/ui/InputPrompt.tmp.js.map +0 -1
  288. package/build/cli/ui/MainContent.d.ts +0 -10
  289. package/build/cli/ui/MainContent.js +0 -24
  290. package/build/cli/ui/MainContent.js.map +0 -1
  291. package/build/cli/ui/MouseContext.d.ts +0 -1
  292. package/build/cli/ui/MouseContext.js +0 -2
  293. package/build/cli/ui/MouseContext.js.map +0 -1
  294. package/build/cli/ui/SuggestionsDisplay.d.ts +0 -25
  295. package/build/cli/ui/SuggestionsDisplay.js +0 -45
  296. package/build/cli/ui/SuggestionsDisplay.js.map +0 -1
  297. package/build/cli/ui/ThinkingIndicator.d.ts +0 -2
  298. package/build/cli/ui/ThinkingIndicator.js +0 -16
  299. package/build/cli/ui/ThinkingIndicator.js.map +0 -1
  300. package/build/cli/ui/layout/DefaultAppLayout.d.ts +0 -2
  301. package/build/cli/ui/layout/DefaultAppLayout.js +0 -6
  302. package/build/cli/ui/layout/DefaultAppLayout.js.map +0 -1
  303. package/build/cli/ui/shared/ExpandableText.d.ts +0 -14
  304. package/build/cli/ui/shared/ExpandableText.js +0 -19
  305. package/build/cli/ui/shared/ExpandableText.js.map +0 -1
  306. package/build/cli/utils/cache.d.ts +0 -21
  307. package/build/cli/utils/cache.js +0 -56
  308. package/build/cli/utils/cache.js.map +0 -1
  309. package/build/cli/utils/commandUtils.d.ts +0 -11
  310. package/build/cli/utils/commandUtils.js +0 -16
  311. package/build/cli/utils/commandUtils.js.map +0 -1
  312. package/build/cli/utils/debugLogger.d.ts +0 -12
  313. package/build/cli/utils/debugLogger.js +0 -54
  314. package/build/cli/utils/debugLogger.js.map +0 -1
  315. package/build/cli/utils/historyStorage.d.ts +0 -13
  316. package/build/cli/utils/historyStorage.js +0 -64
  317. package/build/cli/utils/historyStorage.js.map +0 -1
  318. package/build/cli/utils/textUtil.d.ts +0 -68
  319. package/build/cli/utils/textUtil.js +0 -236
  320. package/build/cli/utils/textUtil.js.map +0 -1
  321. package/build/tools/vault/utils/actions/search_semantic.d.ts +0 -3
  322. package/build/tools/vault/utils/actions/search_semantic.js +0 -71
  323. package/build/tools/vault/utils/actions/search_semantic.js.map +0 -1
@@ -1,6 +0,0 @@
1
- import type { CallToolFn } from "../types.js";
2
- export interface UseRagContextReturn {
3
- fetchContext: (query: string) => Promise<string | null>;
4
- isFetching: boolean;
5
- }
6
- export declare const useRagContext: (callTool: CallToolFn, isConnected: boolean) => UseRagContextReturn;
@@ -1,83 +0,0 @@
1
- import { useCallback, useState } from "react";
2
- import { debugLogger } from "../utils/debugLogger.js";
3
- const MAX_CONTEXT_CHARS = 4000;
4
- const ANSI_RE =
5
- // biome-ignore lint/suspicious/noControlCharactersInRegex: ANSI escape sequences intentionally matched
6
- /[\u001b\u009b][[()#;?]*(?:\d{1,4}(?:;\d{0,4})*)?[A-Za-z0-9=><~]/g;
7
- function stripAnsi(text) {
8
- return text.replace(ANSI_RE, "");
9
- }
10
- function extractTextFromResult(result) {
11
- return result.content
12
- .filter((c) => c.type === "text" && c.text)
13
- .map((c) => c.text ?? "")
14
- .join("\n");
15
- }
16
- function hasValidResults(result) {
17
- if (result.isError) {
18
- return false;
19
- }
20
- const text = extractTextFromResult(result);
21
- return text.length > 0 && !text.includes("No results found");
22
- }
23
- function formatAsContext(rawText) {
24
- const truncated = rawText.length > MAX_CONTEXT_CHARS
25
- ? `${rawText.slice(0, MAX_CONTEXT_CHARS)}\n... (결과가 잘렸습니다)`
26
- : rawText;
27
- return [
28
- "[Vault Context]",
29
- "아래는 사용자의 Obsidian Vault에서 찾은 관련 문서입니다. 이 컨텍스트를 참고하여 답변해주세요.",
30
- "",
31
- truncated,
32
- "",
33
- "[End Vault Context]",
34
- ].join("\n");
35
- }
36
- export const useRagContext = (callTool, isConnected) => {
37
- const [isFetching, setIsFetching] = useState(false);
38
- const fetchContext = useCallback(async (rawQuery) => {
39
- if (!isConnected) {
40
- debugLogger.debug("[RAG] MCP not connected, skipping context fetch.");
41
- return null;
42
- }
43
- const query = stripAnsi(rawQuery).trim();
44
- setIsFetching(true);
45
- debugLogger.debug(`[RAG] Fetching context for: "${query}"`);
46
- try {
47
- const semanticResult = await callTool("vault", {
48
- action: "search_vault_by_semantic",
49
- query,
50
- limit: 5,
51
- });
52
- if (hasValidResults(semanticResult)) {
53
- const text = extractTextFromResult(semanticResult);
54
- debugLogger.debug(`[RAG] Semantic search returned ${text.length} chars.`);
55
- return formatAsContext(text);
56
- }
57
- debugLogger.debug("[RAG] Semantic search empty, falling back to keyword search.");
58
- const keywordResult = await callTool("vault", {
59
- action: "search",
60
- keyword: query,
61
- limit: 5,
62
- includeContent: true,
63
- compressionMode: "balanced",
64
- });
65
- if (hasValidResults(keywordResult)) {
66
- const text = extractTextFromResult(keywordResult);
67
- debugLogger.debug(`[RAG] Keyword search returned ${text.length} chars.`);
68
- return formatAsContext(text);
69
- }
70
- debugLogger.debug("[RAG] No relevant context found in Vault.");
71
- return null;
72
- }
73
- catch (err) {
74
- debugLogger.error("[RAG] Context fetch failed:", err);
75
- return null;
76
- }
77
- finally {
78
- setIsFetching(false);
79
- }
80
- }, [callTool, isConnected]);
81
- return { fetchContext, isFetching };
82
- };
83
- //# sourceMappingURL=useRagContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useRagContext.js","sourceRoot":"","sources":["../../../src/cli/hooks/useRagContext.ts"],"names":[],"mappings":"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"}
@@ -1,18 +0,0 @@
1
- import type React from "react";
2
- import type { Suggestion } from "../ui/SuggestionsDisplay.js";
3
- export interface UseShellCompletionOptions {
4
- enabled: boolean;
5
- line: string;
6
- cursorCol: number;
7
- cwd: string;
8
- setSuggestions: React.Dispatch<React.SetStateAction<Suggestion[]>>;
9
- setIsLoadingSuggestions: React.Dispatch<React.SetStateAction<boolean>>;
10
- }
11
- export interface ShellCompletionRange {
12
- query: string | null;
13
- completionStart: number;
14
- completionEnd: number;
15
- activeStart: number;
16
- }
17
- /** Stub: Shell path/command completion. */
18
- export declare function useShellCompletion(_options: UseShellCompletionOptions): ShellCompletionRange;
@@ -1,10 +0,0 @@
1
- /** Stub: Shell path/command completion. */
2
- export function useShellCompletion(_options) {
3
- return {
4
- query: null,
5
- completionStart: -1,
6
- completionEnd: -1,
7
- activeStart: -1,
8
- };
9
- }
10
- //# sourceMappingURL=useShellCompletion.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useShellCompletion.js","sourceRoot":"","sources":["../../../src/cli/hooks/useShellCompletion.ts"],"names":[],"mappings":"AAmBA,2CAA2C;AAC3C,MAAM,UAAU,kBAAkB,CACjC,QAAmC;IAEnC,OAAO;QACN,KAAK,EAAE,IAAI;QACX,eAAe,EAAE,CAAC,CAAC;QACnB,aAAa,EAAE,CAAC,CAAC;QACjB,WAAW,EAAE,CAAC,CAAC;KACf,CAAC;AACH,CAAC"}
@@ -1,21 +0,0 @@
1
- import type React from "react";
2
- import type { CommandContext, SlashCommand } from "../commands/types.js";
3
- import type { Suggestion } from "../ui/SuggestionsDisplay.js";
4
- export interface UseSlashCompletionOptions {
5
- enabled: boolean;
6
- query: string | null;
7
- slashCommands: readonly SlashCommand[];
8
- commandContext: CommandContext;
9
- setSuggestions: React.Dispatch<React.SetStateAction<Suggestion[]>>;
10
- setIsLoadingSuggestions: React.Dispatch<React.SetStateAction<boolean>>;
11
- setIsPerfectMatch: React.Dispatch<React.SetStateAction<boolean>>;
12
- }
13
- export interface SlashCompletionRange {
14
- completionStart: number;
15
- completionEnd: number;
16
- getCommandFromSuggestion: (suggestion: Suggestion) => SlashCommand | undefined;
17
- isArgumentCompletion: boolean;
18
- leafCommand: SlashCommand | null;
19
- }
20
- /** Stub: Slash-command completion. */
21
- export declare function useSlashCompletion(_options: UseSlashCompletionOptions): SlashCompletionRange;
@@ -1,11 +0,0 @@
1
- /** Stub: Slash-command completion. */
2
- export function useSlashCompletion(_options) {
3
- return {
4
- completionStart: -1,
5
- completionEnd: -1,
6
- getCommandFromSuggestion: () => undefined,
7
- isArgumentCompletion: false,
8
- leafCommand: null,
9
- };
10
- }
11
- //# sourceMappingURL=useSlashCompletion.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useSlashCompletion.js","sourceRoot":"","sources":["../../../src/cli/hooks/useSlashCompletion.ts"],"names":[],"mappings":"AAwBA,sCAAsC;AACtC,MAAM,UAAU,kBAAkB,CACjC,QAAmC;IAEnC,OAAO;QACN,eAAe,EAAE,CAAC,CAAC;QACnB,aAAa,EAAE,CAAC,CAAC;QACjB,wBAAwB,EAAE,GAAG,EAAE,CAAC,SAAS;QACzC,oBAAoB,EAAE,KAAK;QAC3B,WAAW,EAAE,IAAI;KACjB,CAAC;AACH,CAAC"}
@@ -1,9 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- export declare function useTerminalSize(): {
7
- columns: number;
8
- rows: number;
9
- };
@@ -1,26 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import { useEffect, useState } from "react";
7
- export function useTerminalSize() {
8
- const [size, setSize] = useState({
9
- columns: process.stdout.columns || 60,
10
- rows: process.stdout.rows || 20,
11
- });
12
- useEffect(() => {
13
- function updateSize() {
14
- setSize({
15
- columns: process.stdout.columns || 60,
16
- rows: process.stdout.rows || 20,
17
- });
18
- }
19
- process.stdout.on("resize", updateSize);
20
- return () => {
21
- process.stdout.off("resize", updateSize);
22
- };
23
- }, []);
24
- return size;
25
- }
26
- //# sourceMappingURL=useTerminalSize.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useTerminalSize.js","sourceRoot":"","sources":["../../../src/cli/hooks/useTerminalSize.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE5C,MAAM,UAAU,eAAe;IAC9B,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC;QAChC,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,OAAO,IAAI,EAAE;QACrC,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE;KAC/B,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE;QACd,SAAS,UAAU;YAClB,OAAO,CAAC;gBACP,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,OAAO,IAAI,EAAE;gBACrC,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE;aAC/B,CAAC,CAAC;QACJ,CAAC;QAED,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;QACxC,OAAO,GAAG,EAAE;YACX,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;QAC1C,CAAC,CAAC;IACH,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,IAAI,CAAC;AACb,CAAC"}
@@ -1 +0,0 @@
1
- import "dotenv/config";
@@ -1,39 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import chalk from "chalk";
3
- import { render } from "ink";
4
- import { AppContainer } from "./AppContainer.js";
5
- import { debugLogger } from "./utils/debugLogger.js";
6
- import "dotenv/config";
7
- async function checkLLMHealth() {
8
- const apiUrl = (process.env["LLM_API_URL"] || "http://127.0.0.1:8080").replace(/\/$/, "");
9
- try {
10
- const response = await fetch(`${apiUrl}/v1/models`);
11
- if (!response.ok) {
12
- debugLogger.warn(`[CLI] LLM endpoint ${apiUrl} returned ${response.status}. Continuing anyway...`);
13
- return false;
14
- }
15
- debugLogger.info(`[CLI] Successfully verified LLM API at ${apiUrl}.`);
16
- return true;
17
- }
18
- catch (_error) {
19
- debugLogger.warn(`[CLI] Could not connect to LLM API at ${apiUrl}. Make sure your server is running.`);
20
- const errorMessage = "[ERROR] LLM Server Connection Failed\n\nTo use semantic search and RAG features, a local LLM server (such as llama.cpp) must be running.\n\n[Action Required]\n1. Start your local LLM server.\n2. Ensure the environment variables (LLM_API_URL, LLM_EMBEDDING_API_URL) correctly match the running server's URL.\n3. Restart the service with the synchronized settings.";
21
- debugLogger.error(errorMessage);
22
- return false;
23
- }
24
- }
25
- async function start() {
26
- debugLogger.info("App starting - verifying environment.");
27
- const isHealthy = await checkLLMHealth();
28
- if (isHealthy) {
29
- const { waitUntilExit } = render(_jsx(AppContainer, {}));
30
- await waitUntilExit();
31
- console.log(chalk.yellow("\n[Notice] CLI Agent has exited."));
32
- console.log(chalk.gray("If you have LLM or MCP servers running via PM2, you can manage them with:"));
33
- console.log(chalk.cyan(" pm2 status # Check process status"));
34
- console.log(chalk.cyan(" pm2 stop all # Stop all processes"));
35
- debugLogger.info("App exited gracefully.");
36
- }
37
- }
38
- start();
39
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,eAAe,CAAC;AAEvB,KAAK,UAAU,cAAc;IAC5B,MAAM,MAAM,GAAG,CACd,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,uBAAuB,CACrD,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IAErB,IAAI,CAAC;QACJ,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,MAAM,YAAY,CAAC,CAAC;QACpD,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;YAClB,WAAW,CAAC,IAAI,CACf,sBAAsB,MAAM,aAAa,QAAQ,CAAC,MAAM,wBAAwB,CAChF,CAAC;YACF,OAAO,KAAK,CAAC;QACd,CAAC;QACD,WAAW,CAAC,IAAI,CAAC,0CAA0C,MAAM,GAAG,CAAC,CAAC;QACtE,OAAO,IAAI,CAAC;IACb,CAAC;IAAC,OAAO,MAAM,EAAE,CAAC;QACjB,WAAW,CAAC,IAAI,CACf,yCAAyC,MAAM,qCAAqC,CACpF,CAAC;QACF,MAAM,YAAY,GACjB,4WAA4W,CAAC;QAC9W,WAAW,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QAChC,OAAO,KAAK,CAAC;IACd,CAAC;AACF,CAAC;AAED,KAAK,UAAU,KAAK;IACnB,WAAW,CAAC,IAAI,CAAC,uCAAuC,CAAC,CAAC;IAC1D,MAAM,SAAS,GAAG,MAAM,cAAc,EAAE,CAAC;IACzC,IAAI,SAAS,EAAE,CAAC;QACf,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,CAAC,KAAC,YAAY,KAAG,CAAC,CAAC;QACnD,MAAM,aAAa,EAAE,CAAC;QAEtB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,kCAAkC,CAAC,CAAC,CAAC;QAC9D,OAAO,CAAC,GAAG,CACV,KAAK,CAAC,IAAI,CACT,2EAA2E,CAC3E,CACD,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,8CAA8C,CAAC,CAAC,CAAC;QACxE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,4CAA4C,CAAC,CAAC,CAAC;QAEtE,WAAW,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;IAC5C,CAAC;AACF,CAAC;AAED,KAAK,EAAE,CAAC"}
@@ -1,5 +0,0 @@
1
- export declare const ESC = "\u001B";
2
- export declare const SGR_EVENT_PREFIX = "\u001B[<";
3
- export declare const X11_EVENT_PREFIX = "\u001B[M";
4
- export declare const SGR_MOUSE_REGEX: RegExp;
5
- export declare const X11_MOUSE_REGEX: RegExp;
@@ -1,9 +0,0 @@
1
- export const ESC = "\u001b";
2
- export const SGR_EVENT_PREFIX = `${ESC}[<`;
3
- export const X11_EVENT_PREFIX = `${ESC}[M`;
4
- // biome-ignore lint/suspicious/noControlCharactersInRegex:터미널 입력을 파싱하기 위한 정규식입니다.
5
- export const SGR_MOUSE_REGEX = /^\x1b\[<(\d+);(\d+);(\d+)([mM])/; // SGR mouse events
6
- // X11 is ESC [ M followed by 3 bytes.
7
- // biome-ignore lint/suspicious/noControlCharactersInRegex:터미널 입력을 파싱하기 위한 정규식입니다.
8
- export const X11_MOUSE_REGEX = /^\x1b\[M([\s\S]{3})/;
9
- //# sourceMappingURL=input.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"input.js","sourceRoot":"","sources":["../../../src/cli/key/input.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,GAAG,GAAG,QAAQ,CAAC;AAC5B,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,GAAG,IAAI,CAAC;AAC3C,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,GAAG,IAAI,CAAC;AAE3C,kFAAkF;AAClF,MAAM,CAAC,MAAM,eAAe,GAAG,iCAAiC,CAAC,CAAC,mBAAmB;AACrF,sCAAsC;AAEtC,kFAAkF;AAClF,MAAM,CAAC,MAAM,eAAe,GAAG,qBAAqB,CAAC"}
@@ -1,152 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import { z } from "zod";
7
- /**
8
- * Command enum for all available keyboard shortcuts
9
- */
10
- import type { Key } from "../hooks/useKeypress.js";
11
- export declare enum Command {
12
- RETURN = "basic.confirm",
13
- ESCAPE = "basic.cancel",
14
- QUIT = "basic.quit",
15
- EXIT = "basic.exit",
16
- HOME = "cursor.home",
17
- END = "cursor.end",
18
- MOVE_UP = "cursor.up",
19
- MOVE_DOWN = "cursor.down",
20
- MOVE_LEFT = "cursor.left",
21
- MOVE_RIGHT = "cursor.right",
22
- MOVE_WORD_LEFT = "cursor.wordLeft",
23
- MOVE_WORD_RIGHT = "cursor.wordRight",
24
- KILL_LINE_RIGHT = "edit.deleteRightAll",
25
- KILL_LINE_LEFT = "edit.deleteLeftAll",
26
- CLEAR_INPUT = "edit.clear",
27
- DELETE_WORD_BACKWARD = "edit.deleteWordLeft",
28
- DELETE_WORD_FORWARD = "edit.deleteWordRight",
29
- DELETE_CHAR_LEFT = "edit.deleteLeft",
30
- DELETE_CHAR_RIGHT = "edit.deleteRight",
31
- UNDO = "edit.undo",
32
- REDO = "edit.redo",
33
- SCROLL_UP = "scroll.up",
34
- SCROLL_DOWN = "scroll.down",
35
- SCROLL_HOME = "scroll.home",
36
- SCROLL_END = "scroll.end",
37
- PAGE_UP = "scroll.pageUp",
38
- PAGE_DOWN = "scroll.pageDown",
39
- HISTORY_UP = "history.previous",
40
- HISTORY_DOWN = "history.next",
41
- REVERSE_SEARCH = "history.search.start",
42
- SUBMIT_REVERSE_SEARCH = "history.search.submit",
43
- ACCEPT_SUGGESTION_REVERSE_SEARCH = "history.search.accept",
44
- NAVIGATION_UP = "nav.up",
45
- NAVIGATION_DOWN = "nav.down",
46
- DIALOG_NAVIGATION_UP = "nav.dialog.up",
47
- DIALOG_NAVIGATION_DOWN = "nav.dialog.down",
48
- DIALOG_NEXT = "nav.dialog.next",
49
- DIALOG_PREV = "nav.dialog.previous",
50
- ACCEPT_SUGGESTION = "suggest.accept",
51
- COMPLETION_UP = "suggest.focusPrevious",
52
- COMPLETION_DOWN = "suggest.focusNext",
53
- EXPAND_SUGGESTION = "suggest.expand",
54
- COLLAPSE_SUGGESTION = "suggest.collapse",
55
- SUBMIT = "input.submit",
56
- QUEUE_MESSAGE = "input.queueMessage",
57
- NEWLINE = "input.newline",
58
- OPEN_EXTERNAL_EDITOR = "input.openExternalEditor",
59
- DEPRECATED_OPEN_EXTERNAL_EDITOR = "input.deprecatedOpenExternalEditor",
60
- PASTE_CLIPBOARD = "input.paste",
61
- SHOW_ERROR_DETAILS = "app.showErrorDetails",
62
- SHOW_FULL_TODOS = "app.showFullTodos",
63
- SHOW_IDE_CONTEXT_DETAIL = "app.showIdeContextDetail",
64
- TOGGLE_MARKDOWN = "app.toggleMarkdown",
65
- TOGGLE_COPY_MODE = "app.toggleCopyMode",
66
- TOGGLE_MOUSE_MODE = "app.toggleMouseMode",
67
- TOGGLE_YOLO = "app.toggleYolo",
68
- CYCLE_APPROVAL_MODE = "app.cycleApprovalMode",
69
- SHOW_MORE_LINES = "app.showMoreLines",
70
- EXPAND_PASTE = "app.expandPaste",
71
- FOCUS_SHELL_INPUT = "app.focusShellInput",
72
- UNFOCUS_SHELL_INPUT = "app.unfocusShellInput",
73
- CLEAR_SCREEN = "app.clearScreen",
74
- RESTART_APP = "app.restart",
75
- SUSPEND_APP = "app.suspend",
76
- SHOW_SHELL_INPUT_UNFOCUS_WARNING = "app.showShellUnfocusWarning",
77
- BACKGROUND_SHELL_ESCAPE = "background.escape",
78
- BACKGROUND_SHELL_SELECT = "background.select",
79
- TOGGLE_BACKGROUND_SHELL = "background.toggle",
80
- TOGGLE_BACKGROUND_SHELL_LIST = "background.toggleList",
81
- KILL_BACKGROUND_SHELL = "background.kill",
82
- UNFOCUS_BACKGROUND_SHELL = "background.unfocus",
83
- UNFOCUS_BACKGROUND_SHELL_LIST = "background.unfocusList",
84
- SHOW_BACKGROUND_SHELL_UNFOCUS_WARNING = "background.unfocusWarning",
85
- UPDATE_EXTENSION = "extension.update",
86
- LINK_EXTENSION = "extension.link",
87
- DUMP_FRAME = "app.dumpFrame",
88
- START_RECORDING = "app.startRecording",
89
- STOP_RECORDING = "app.stopRecording"
90
- }
91
- /**
92
- * Data-driven key binding structure for user configuration
93
- */
94
- export declare class KeyBinding {
95
- private static readonly VALID_LONG_KEYS;
96
- /** The key name (e.g., 'a', 'enter', 'tab', 'escape') */
97
- readonly name: string;
98
- readonly shift: boolean;
99
- readonly alt: boolean;
100
- readonly ctrl: boolean;
101
- readonly cmd: boolean;
102
- constructor(pattern: string);
103
- matches(key: Key): boolean;
104
- equals(other: KeyBinding): boolean;
105
- }
106
- /**
107
- * Configuration type mapping commands to their key bindings
108
- */
109
- export type KeyBindingConfig = Map<Command, readonly KeyBinding[]>;
110
- /**
111
- * Default key binding configuration
112
- * Matches the original hard-coded logic exactly
113
- */
114
- export declare const defaultKeyBindingConfig: KeyBindingConfig;
115
- interface CommandCategory {
116
- readonly title: string;
117
- readonly commands: readonly Command[];
118
- }
119
- /**
120
- * Presentation metadata for grouping commands in documentation or UI.
121
- */
122
- export declare const commandCategories: readonly CommandCategory[];
123
- /**
124
- * Human-readable descriptions for each command, used in docs/tooling.
125
- */
126
- export declare const commandDescriptions: Readonly<Record<Command, string>>;
127
- export declare const keybindingsSchema: z.ZodArray<z.ZodEffects<z.ZodObject<{
128
- command: z.ZodEffects<z.ZodString, {
129
- command: Command;
130
- negate: boolean;
131
- }, string>;
132
- key: z.ZodString;
133
- }, "strip", z.ZodTypeAny, {
134
- key: string;
135
- command: {
136
- command: Command;
137
- negate: boolean;
138
- };
139
- }, {
140
- key: string;
141
- command: string;
142
- }>, {
143
- commandEntry: {
144
- command: Command;
145
- negate: boolean;
146
- };
147
- key: string;
148
- }, {
149
- key: string;
150
- command: string;
151
- }>, "many">;
152
- export {};