@wonderwhy-er/desktop-commander 0.2.37 → 0.2.39

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 (383) hide show
  1. package/README.md +290 -100
  2. package/dist/command-manager.js +6 -3
  3. package/dist/config-field-definitions.d.ts +41 -0
  4. package/dist/config-field-definitions.js +37 -0
  5. package/dist/config-manager.d.ts +2 -0
  6. package/dist/config-manager.js +22 -2
  7. package/dist/handlers/filesystem-handlers.d.ts +5 -0
  8. package/dist/handlers/filesystem-handlers.js +19 -12
  9. package/dist/remote-device/desktop-commander-integration.js +1 -1
  10. package/dist/remote-device/remote-channel.js +1 -1
  11. package/dist/search-manager.js +31 -38
  12. package/dist/server.js +11 -4
  13. package/dist/terminal-manager.js +4 -2
  14. package/dist/tools/config.d.ts +71 -0
  15. package/dist/tools/config.js +117 -2
  16. package/dist/tools/edit.js +34 -1
  17. package/dist/tools/filesystem.js +91 -3
  18. package/dist/tools/improved-process-tools.js +2 -1
  19. package/dist/tools/schemas.d.ts +3 -0
  20. package/dist/tools/schemas.js +1 -0
  21. package/dist/types.d.ts +0 -1
  22. package/dist/ui/config-editor/app.d.ts +43 -0
  23. package/dist/ui/config-editor/app.js +840 -0
  24. package/dist/ui/config-editor/array-modal.d.ts +19 -0
  25. package/dist/ui/config-editor/array-modal.js +185 -0
  26. package/dist/ui/config-editor/config-editor-runtime.js +150 -0
  27. package/dist/ui/config-editor/index.html +13 -0
  28. package/dist/ui/config-editor/main.js +2 -0
  29. package/dist/ui/config-editor/src/App.d.ts +43 -0
  30. package/dist/ui/config-editor/src/App.js +840 -0
  31. package/dist/ui/config-editor/src/array-modal.d.ts +19 -0
  32. package/dist/ui/config-editor/src/array-modal.js +185 -0
  33. package/dist/ui/config-editor/src/components/layout.d.ts +4 -0
  34. package/dist/ui/config-editor/src/components/layout.js +83 -0
  35. package/dist/ui/config-editor/src/components/toolbar.d.ts +1 -0
  36. package/dist/ui/config-editor/src/components/toolbar.js +21 -0
  37. package/dist/ui/config-editor/src/config-values.d.ts +6 -0
  38. package/dist/ui/config-editor/src/config-values.js +61 -0
  39. package/dist/ui/config-editor/src/contracts.d.ts +14 -0
  40. package/dist/ui/config-editor/src/contracts.js +3 -0
  41. package/dist/ui/config-editor/src/directory-browser.d.ts +6 -0
  42. package/dist/ui/config-editor/src/directory-browser.js +71 -0
  43. package/dist/ui/config-editor/src/layout.d.ts +5 -0
  44. package/dist/ui/config-editor/src/layout.js +90 -0
  45. package/dist/ui/config-editor/src/main.js +2 -0
  46. package/dist/ui/config-editor/src/parsing.d.ts +5 -0
  47. package/dist/ui/config-editor/src/parsing.js +50 -0
  48. package/dist/ui/config-editor/src/toolbar.d.ts +1 -0
  49. package/dist/ui/config-editor/src/toolbar.js +18 -0
  50. package/dist/ui/config-editor/src/types.d.ts +17 -0
  51. package/dist/ui/config-editor/src/types.js +3 -0
  52. package/dist/ui/config-editor/src/utils/config-values.d.ts +9 -0
  53. package/dist/ui/config-editor/src/utils/config-values.js +61 -0
  54. package/dist/ui/config-editor/src/utils/directory-browser.d.ts +31 -0
  55. package/dist/ui/config-editor/src/utils/directory-browser.js +201 -0
  56. package/dist/ui/config-editor/src/utils/parsing.d.ts +8 -0
  57. package/dist/ui/config-editor/src/utils/parsing.js +50 -0
  58. package/dist/ui/config-editor/styles.css +587 -0
  59. package/dist/ui/file-preview/app.d.ts +8 -0
  60. package/dist/ui/file-preview/app.js +2020 -0
  61. package/dist/ui/file-preview/components/code-viewer.d.ts +6 -0
  62. package/dist/ui/file-preview/components/code-viewer.js +73 -0
  63. package/dist/ui/file-preview/components/highlighting.d.ts +2 -0
  64. package/dist/ui/file-preview/components/highlighting.js +54 -0
  65. package/dist/ui/file-preview/components/html-renderer.d.ts +5 -0
  66. package/dist/ui/file-preview/components/html-renderer.js +47 -0
  67. package/dist/ui/file-preview/components/markdown-renderer.d.ts +1 -0
  68. package/dist/ui/file-preview/components/markdown-renderer.js +67 -0
  69. package/dist/ui/file-preview/components/toolbar.d.ts +6 -0
  70. package/dist/ui/file-preview/components/toolbar.js +75 -0
  71. package/dist/ui/file-preview/image-preview.d.ts +3 -0
  72. package/dist/ui/file-preview/image-preview.js +21 -0
  73. package/dist/ui/file-preview/main.js +5 -0
  74. package/dist/ui/file-preview/markdown/editor.d.ts +36 -0
  75. package/dist/ui/file-preview/markdown/editor.js +643 -0
  76. package/dist/ui/file-preview/markdown/linking.d.ts +9 -0
  77. package/dist/ui/file-preview/markdown/linking.js +210 -0
  78. package/dist/ui/file-preview/markdown/outline.d.ts +7 -0
  79. package/dist/ui/file-preview/markdown/outline.js +40 -0
  80. package/dist/ui/file-preview/markdown/preview.d.ts +8 -0
  81. package/dist/ui/file-preview/markdown/preview.js +33 -0
  82. package/dist/ui/file-preview/markdown/slugify.d.ts +3 -0
  83. package/dist/ui/file-preview/markdown/slugify.js +31 -0
  84. package/dist/ui/file-preview/markdown/toc.d.ts +11 -0
  85. package/dist/ui/file-preview/markdown/toc.js +75 -0
  86. package/dist/ui/file-preview/markdown/utils.d.ts +1 -0
  87. package/dist/ui/file-preview/markdown/utils.js +15 -0
  88. package/dist/ui/file-preview/markdown/workspace-controller.d.ts +25 -0
  89. package/dist/ui/file-preview/markdown/workspace-controller.js +40 -0
  90. package/dist/ui/file-preview/preview-runtime.js +399 -13969
  91. package/dist/ui/file-preview/shared/preview-file-types.d.ts +1 -1
  92. package/dist/ui/file-preview/shared/preview-file-types.js +3 -1
  93. package/dist/ui/file-preview/src/App.d.ts +4 -0
  94. package/dist/ui/file-preview/src/App.js +564 -0
  95. package/dist/ui/file-preview/src/components/CodeViewer.d.ts +6 -0
  96. package/dist/ui/file-preview/src/components/CodeViewer.js +60 -0
  97. package/dist/ui/file-preview/src/components/HtmlRenderer.d.ts +8 -0
  98. package/dist/ui/file-preview/src/components/HtmlRenderer.js +45 -0
  99. package/dist/ui/file-preview/src/components/MarkdownRenderer.d.ts +1 -0
  100. package/dist/ui/file-preview/src/components/MarkdownRenderer.js +15 -0
  101. package/dist/ui/file-preview/src/components/editor-toolbar.d.ts +15 -0
  102. package/dist/ui/file-preview/src/components/editor-toolbar.js +384 -0
  103. package/dist/ui/file-preview/src/components/html-renderer.d.ts +1 -5
  104. package/dist/ui/file-preview/src/components/html-renderer.js +11 -27
  105. package/dist/ui/file-preview/src/components/markdown-editor.d.ts +29 -0
  106. package/dist/ui/file-preview/src/components/markdown-editor.js +535 -0
  107. package/dist/ui/file-preview/src/components/markdown-renderer.js +47 -9
  108. package/dist/ui/file-preview/src/directory-controller.d.ts +8 -0
  109. package/dist/ui/file-preview/src/directory-controller.js +233 -0
  110. package/dist/ui/file-preview/src/document-layout.d.ts +20 -0
  111. package/dist/ui/file-preview/src/document-layout.js +109 -0
  112. package/dist/ui/file-preview/src/document-outline.d.ts +17 -0
  113. package/dist/ui/file-preview/src/document-outline.js +97 -0
  114. package/dist/ui/file-preview/src/document-workspace.d.ts +19 -0
  115. package/dist/ui/file-preview/src/document-workspace.js +33 -0
  116. package/dist/ui/file-preview/src/file-type-handlers.d.ts +10 -0
  117. package/dist/ui/file-preview/src/file-type-handlers.js +98 -0
  118. package/dist/ui/file-preview/src/host/external-actions.d.ts +19 -0
  119. package/dist/ui/file-preview/src/host/external-actions.js +94 -0
  120. package/dist/ui/file-preview/src/host/selection-context.d.ts +9 -0
  121. package/dist/ui/file-preview/src/host/selection-context.js +106 -0
  122. package/dist/ui/file-preview/src/markdown/block-merge.d.ts +25 -0
  123. package/dist/ui/file-preview/src/markdown/block-merge.js +86 -0
  124. package/dist/ui/file-preview/src/markdown/conflict-dialog.d.ts +40 -0
  125. package/dist/ui/file-preview/src/markdown/conflict-dialog.js +163 -0
  126. package/dist/ui/file-preview/src/markdown/controller.d.ts +38 -0
  127. package/dist/ui/file-preview/src/markdown/controller.js +921 -0
  128. package/dist/ui/file-preview/src/markdown/editor.d.ts +35 -0
  129. package/dist/ui/file-preview/src/markdown/editor.js +691 -0
  130. package/dist/ui/file-preview/src/markdown/link-modal.d.ts +13 -0
  131. package/dist/ui/file-preview/src/markdown/link-modal.js +213 -0
  132. package/dist/ui/file-preview/src/markdown/linking.d.ts +16 -0
  133. package/dist/ui/file-preview/src/markdown/linking.js +228 -0
  134. package/dist/ui/file-preview/src/markdown/outline.d.ts +2 -0
  135. package/dist/ui/file-preview/src/markdown/outline.js +16 -0
  136. package/dist/ui/file-preview/src/markdown/parser.d.ts +30 -0
  137. package/dist/ui/file-preview/src/markdown/parser.js +38 -0
  138. package/dist/ui/file-preview/src/markdown/preview.d.ts +1 -0
  139. package/dist/ui/file-preview/src/markdown/preview.js +20 -0
  140. package/dist/ui/file-preview/src/markdown/raw-editor.d.ts +8 -0
  141. package/dist/ui/file-preview/src/markdown/raw-editor.js +61 -0
  142. package/dist/ui/file-preview/src/markdown/selection-toolbar.d.ts +14 -0
  143. package/dist/ui/file-preview/src/markdown/selection-toolbar.js +128 -0
  144. package/dist/ui/file-preview/src/markdown/slugify.d.ts +3 -0
  145. package/dist/ui/file-preview/src/markdown/slugify.js +31 -0
  146. package/dist/ui/file-preview/src/markdown/toc.d.ts +11 -0
  147. package/dist/ui/file-preview/src/markdown/toc.js +75 -0
  148. package/dist/ui/file-preview/src/markdown/utils.d.ts +1 -0
  149. package/dist/ui/file-preview/src/markdown/utils.js +15 -0
  150. package/dist/ui/file-preview/src/markdown-workspace/editor.d.ts +36 -0
  151. package/dist/ui/file-preview/src/markdown-workspace/editor.js +643 -0
  152. package/dist/ui/file-preview/src/markdown-workspace/linking.d.ts +9 -0
  153. package/dist/ui/file-preview/src/markdown-workspace/linking.js +210 -0
  154. package/dist/ui/file-preview/src/markdown-workspace/outline.d.ts +7 -0
  155. package/dist/ui/file-preview/src/markdown-workspace/outline.js +40 -0
  156. package/dist/ui/file-preview/src/markdown-workspace/preview.d.ts +8 -0
  157. package/dist/ui/file-preview/src/markdown-workspace/preview.js +33 -0
  158. package/dist/ui/file-preview/src/markdown-workspace/slugify.d.ts +3 -0
  159. package/dist/ui/file-preview/src/markdown-workspace/slugify.js +31 -0
  160. package/dist/ui/file-preview/src/markdown-workspace/toc.d.ts +11 -0
  161. package/dist/ui/file-preview/src/markdown-workspace/toc.js +75 -0
  162. package/dist/ui/file-preview/src/markdown-workspace/utils.d.ts +1 -0
  163. package/dist/ui/file-preview/src/markdown-workspace/utils.js +15 -0
  164. package/dist/ui/file-preview/src/markdown-workspace/workspace-controller.d.ts +25 -0
  165. package/dist/ui/file-preview/src/markdown-workspace/workspace-controller.js +40 -0
  166. package/dist/ui/file-preview/src/model.d.ts +34 -0
  167. package/dist/ui/file-preview/src/panel-actions.d.ts +17 -0
  168. package/dist/ui/file-preview/src/panel-actions.js +182 -0
  169. package/dist/ui/file-preview/src/path-utils.d.ts +6 -0
  170. package/dist/ui/file-preview/src/path-utils.js +64 -0
  171. package/dist/ui/file-preview/src/payload-utils.d.ts +11 -0
  172. package/dist/ui/file-preview/src/payload-utils.js +94 -0
  173. package/dist/ui/file-preview/styles.css +1144 -277
  174. package/dist/ui/file-preview/types.d.ts +1 -0
  175. package/dist/ui/file-preview/types.js +1 -0
  176. package/dist/ui/resources.d.ts +7 -0
  177. package/dist/ui/resources.js +16 -2
  178. package/dist/ui/server-integration.d.ts +13 -0
  179. package/dist/ui/server-integration.js +31 -0
  180. package/dist/ui/shared/ToolHeader.d.ts +9 -0
  181. package/dist/ui/shared/ToolHeader.js +29 -0
  182. package/dist/ui/shared/app-bootstrap.d.ts +9 -0
  183. package/dist/ui/shared/app-bootstrap.js +15 -0
  184. package/dist/ui/shared/compact-row.d.ts +11 -0
  185. package/dist/ui/shared/compact-row.js +18 -0
  186. package/dist/ui/shared/guards.d.ts +1 -0
  187. package/dist/ui/shared/guards.js +3 -0
  188. package/dist/ui/shared/host-context.d.ts +15 -0
  189. package/dist/ui/shared/host-context.js +51 -0
  190. package/dist/ui/shared/host-lifecycle.d.ts +1 -0
  191. package/dist/ui/shared/host-lifecycle.js +8 -2
  192. package/dist/ui/shared/tool-bridge.d.ts +30 -0
  193. package/dist/ui/shared/tool-bridge.js +137 -0
  194. package/dist/ui/shared/tool-shell.d.ts +9 -0
  195. package/dist/ui/shared/tool-shell.js +46 -4
  196. package/dist/ui/shared/ui-event-tracker.d.ts +9 -0
  197. package/dist/ui/shared/ui-event-tracker.js +27 -0
  198. package/dist/ui/shared/widget-state.d.ts +6 -1
  199. package/dist/ui/shared/widget-state.js +102 -4
  200. package/dist/utils/capture.js +3 -3
  201. package/dist/utils/files/base.d.ts +2 -0
  202. package/dist/utils/open-browser.js +1 -1
  203. package/dist/utils/ui-call-context.d.ts +8 -0
  204. package/dist/utils/ui-call-context.js +72 -0
  205. package/dist/version.d.ts +1 -1
  206. package/dist/version.js +1 -1
  207. package/package.json +13 -4
  208. package/dist/data/spec-kit-prompts.json +0 -123
  209. package/dist/handlers/node-handlers.d.ts +0 -6
  210. package/dist/handlers/node-handlers.js +0 -73
  211. package/dist/handlers/test-crash-handler.d.ts +0 -11
  212. package/dist/handlers/test-crash-handler.js +0 -26
  213. package/dist/http-index.d.ts +0 -45
  214. package/dist/http-index.js +0 -51
  215. package/dist/http-server-auto-tunnel.js +0 -667
  216. package/dist/http-server-named-tunnel.d.ts +0 -2
  217. package/dist/http-server-named-tunnel.js +0 -167
  218. package/dist/http-server-tunnel.d.ts +0 -2
  219. package/dist/http-server-tunnel.js +0 -111
  220. package/dist/http-server.d.ts +0 -2
  221. package/dist/http-server.js +0 -270
  222. package/dist/index-oauth.d.ts +0 -2
  223. package/dist/index-oauth.js +0 -201
  224. package/dist/oauth/auth-middleware.d.ts +0 -20
  225. package/dist/oauth/auth-middleware.js +0 -62
  226. package/dist/oauth/index.d.ts +0 -3
  227. package/dist/oauth/index.js +0 -3
  228. package/dist/oauth/oauth-manager.d.ts +0 -80
  229. package/dist/oauth/oauth-manager.js +0 -179
  230. package/dist/oauth/oauth-routes.d.ts +0 -3
  231. package/dist/oauth/oauth-routes.js +0 -377
  232. package/dist/oauth/provider.d.ts +0 -22
  233. package/dist/oauth/provider.js +0 -124
  234. package/dist/oauth/server.d.ts +0 -18
  235. package/dist/oauth/server.js +0 -160
  236. package/dist/oauth/types.d.ts +0 -54
  237. package/dist/oauth/types.js +0 -2
  238. package/dist/remote-device/templates/auth-success.d.ts +0 -1
  239. package/dist/remote-device/templates/auth-success.js +0 -30
  240. package/dist/setup.log +0 -275
  241. package/dist/test-setup.js +0 -14
  242. package/dist/tools/docx/builders/html-builder.d.ts +0 -17
  243. package/dist/tools/docx/builders/html-builder.js +0 -92
  244. package/dist/tools/docx/builders/image.d.ts +0 -14
  245. package/dist/tools/docx/builders/image.js +0 -84
  246. package/dist/tools/docx/builders/index.d.ts +0 -11
  247. package/dist/tools/docx/builders/index.js +0 -11
  248. package/dist/tools/docx/builders/markdown-builder.d.ts +0 -2
  249. package/dist/tools/docx/builders/markdown-builder.js +0 -260
  250. package/dist/tools/docx/builders/paragraph.d.ts +0 -12
  251. package/dist/tools/docx/builders/paragraph.js +0 -29
  252. package/dist/tools/docx/builders/table.d.ts +0 -10
  253. package/dist/tools/docx/builders/table.js +0 -138
  254. package/dist/tools/docx/builders/utils.d.ts +0 -5
  255. package/dist/tools/docx/builders/utils.js +0 -18
  256. package/dist/tools/docx/constants.d.ts +0 -32
  257. package/dist/tools/docx/constants.js +0 -61
  258. package/dist/tools/docx/converters/markdown-to-html.d.ts +0 -17
  259. package/dist/tools/docx/converters/markdown-to-html.js +0 -111
  260. package/dist/tools/docx/create.d.ts +0 -21
  261. package/dist/tools/docx/create.js +0 -386
  262. package/dist/tools/docx/dom.d.ts +0 -139
  263. package/dist/tools/docx/dom.js +0 -448
  264. package/dist/tools/docx/errors.d.ts +0 -28
  265. package/dist/tools/docx/errors.js +0 -48
  266. package/dist/tools/docx/extractors/images.d.ts +0 -14
  267. package/dist/tools/docx/extractors/images.js +0 -40
  268. package/dist/tools/docx/extractors/metadata.d.ts +0 -14
  269. package/dist/tools/docx/extractors/metadata.js +0 -64
  270. package/dist/tools/docx/extractors/sections.d.ts +0 -14
  271. package/dist/tools/docx/extractors/sections.js +0 -61
  272. package/dist/tools/docx/html.d.ts +0 -17
  273. package/dist/tools/docx/html.js +0 -111
  274. package/dist/tools/docx/index.d.ts +0 -10
  275. package/dist/tools/docx/index.js +0 -10
  276. package/dist/tools/docx/markdown.d.ts +0 -84
  277. package/dist/tools/docx/markdown.js +0 -507
  278. package/dist/tools/docx/modify.d.ts +0 -28
  279. package/dist/tools/docx/modify.js +0 -271
  280. package/dist/tools/docx/operations/handlers/index.d.ts +0 -39
  281. package/dist/tools/docx/operations/handlers/index.js +0 -152
  282. package/dist/tools/docx/operations/html-manipulator.d.ts +0 -24
  283. package/dist/tools/docx/operations/html-manipulator.js +0 -352
  284. package/dist/tools/docx/operations/index.d.ts +0 -14
  285. package/dist/tools/docx/operations/index.js +0 -61
  286. package/dist/tools/docx/operations/operation-handlers.d.ts +0 -3
  287. package/dist/tools/docx/operations/operation-handlers.js +0 -67
  288. package/dist/tools/docx/operations/preprocessor.d.ts +0 -14
  289. package/dist/tools/docx/operations/preprocessor.js +0 -44
  290. package/dist/tools/docx/operations/xml-replacer.d.ts +0 -9
  291. package/dist/tools/docx/operations/xml-replacer.js +0 -35
  292. package/dist/tools/docx/operations.d.ts +0 -13
  293. package/dist/tools/docx/operations.js +0 -13
  294. package/dist/tools/docx/ops/delete-paragraph-at-body-index.d.ts +0 -11
  295. package/dist/tools/docx/ops/delete-paragraph-at-body-index.js +0 -23
  296. package/dist/tools/docx/ops/header-replace-text-exact.d.ts +0 -13
  297. package/dist/tools/docx/ops/header-replace-text-exact.js +0 -55
  298. package/dist/tools/docx/ops/index.d.ts +0 -17
  299. package/dist/tools/docx/ops/index.js +0 -70
  300. package/dist/tools/docx/ops/insert-image-after-text.d.ts +0 -24
  301. package/dist/tools/docx/ops/insert-image-after-text.js +0 -128
  302. package/dist/tools/docx/ops/insert-paragraph-after-text.d.ts +0 -12
  303. package/dist/tools/docx/ops/insert-paragraph-after-text.js +0 -74
  304. package/dist/tools/docx/ops/insert-table-after-text.d.ts +0 -19
  305. package/dist/tools/docx/ops/insert-table-after-text.js +0 -57
  306. package/dist/tools/docx/ops/replace-hyperlink-url.d.ts +0 -12
  307. package/dist/tools/docx/ops/replace-hyperlink-url.js +0 -37
  308. package/dist/tools/docx/ops/replace-paragraph-at-body-index.d.ts +0 -9
  309. package/dist/tools/docx/ops/replace-paragraph-at-body-index.js +0 -25
  310. package/dist/tools/docx/ops/replace-paragraph-text-exact.d.ts +0 -21
  311. package/dist/tools/docx/ops/replace-paragraph-text-exact.js +0 -36
  312. package/dist/tools/docx/ops/replace-table-cell-text.d.ts +0 -25
  313. package/dist/tools/docx/ops/replace-table-cell-text.js +0 -85
  314. package/dist/tools/docx/ops/set-color-for-paragraph-exact.d.ts +0 -9
  315. package/dist/tools/docx/ops/set-color-for-paragraph-exact.js +0 -24
  316. package/dist/tools/docx/ops/set-color-for-style.d.ts +0 -13
  317. package/dist/tools/docx/ops/set-color-for-style.js +0 -31
  318. package/dist/tools/docx/ops/set-paragraph-style-at-body-index.d.ts +0 -8
  319. package/dist/tools/docx/ops/set-paragraph-style-at-body-index.js +0 -57
  320. package/dist/tools/docx/ops/table-set-cell-text.d.ts +0 -9
  321. package/dist/tools/docx/ops/table-set-cell-text.js +0 -40
  322. package/dist/tools/docx/parsers/image-extractor.d.ts +0 -18
  323. package/dist/tools/docx/parsers/image-extractor.js +0 -61
  324. package/dist/tools/docx/parsers/index.d.ts +0 -9
  325. package/dist/tools/docx/parsers/index.js +0 -9
  326. package/dist/tools/docx/parsers/paragraph-parser.d.ts +0 -2
  327. package/dist/tools/docx/parsers/paragraph-parser.js +0 -88
  328. package/dist/tools/docx/parsers/table-parser.d.ts +0 -9
  329. package/dist/tools/docx/parsers/table-parser.js +0 -72
  330. package/dist/tools/docx/parsers/xml-parser.d.ts +0 -25
  331. package/dist/tools/docx/parsers/xml-parser.js +0 -71
  332. package/dist/tools/docx/parsers/zip-reader.d.ts +0 -23
  333. package/dist/tools/docx/parsers/zip-reader.js +0 -52
  334. package/dist/tools/docx/read.d.ts +0 -27
  335. package/dist/tools/docx/read.js +0 -308
  336. package/dist/tools/docx/relationships.d.ts +0 -22
  337. package/dist/tools/docx/relationships.js +0 -76
  338. package/dist/tools/docx/structure.d.ts +0 -25
  339. package/dist/tools/docx/structure.js +0 -102
  340. package/dist/tools/docx/styled-html-parser.d.ts +0 -23
  341. package/dist/tools/docx/styled-html-parser.js +0 -1262
  342. package/dist/tools/docx/types.d.ts +0 -213
  343. package/dist/tools/docx/types.js +0 -5
  344. package/dist/tools/docx/utils/escaping.d.ts +0 -13
  345. package/dist/tools/docx/utils/escaping.js +0 -26
  346. package/dist/tools/docx/utils/images.d.ts +0 -9
  347. package/dist/tools/docx/utils/images.js +0 -26
  348. package/dist/tools/docx/utils/index.d.ts +0 -12
  349. package/dist/tools/docx/utils/index.js +0 -17
  350. package/dist/tools/docx/utils/markdown.d.ts +0 -13
  351. package/dist/tools/docx/utils/markdown.js +0 -32
  352. package/dist/tools/docx/utils/paths.d.ts +0 -15
  353. package/dist/tools/docx/utils/paths.js +0 -27
  354. package/dist/tools/docx/utils/versioning.d.ts +0 -25
  355. package/dist/tools/docx/utils/versioning.js +0 -55
  356. package/dist/tools/docx/utils.d.ts +0 -101
  357. package/dist/tools/docx/utils.js +0 -299
  358. package/dist/tools/docx/validate.d.ts +0 -33
  359. package/dist/tools/docx/validate.js +0 -49
  360. package/dist/tools/docx/validators.d.ts +0 -13
  361. package/dist/tools/docx/validators.js +0 -40
  362. package/dist/tools/docx/write.d.ts +0 -17
  363. package/dist/tools/docx/write.js +0 -88
  364. package/dist/tools/docx/xml-view-test.js +0 -63
  365. package/dist/tools/docx/xml-view.d.ts +0 -56
  366. package/dist/tools/docx/xml-view.js +0 -169
  367. package/dist/tools/docx/zip.d.ts +0 -21
  368. package/dist/tools/docx/zip.js +0 -35
  369. package/dist/tools/pdf-processor.js +0 -3
  370. package/dist/tools/search.d.ts +0 -32
  371. package/dist/tools/search.js +0 -202
  372. package/dist/ui/file-preview/src/app.d.ts +0 -4
  373. package/dist/ui/file-preview/src/app.js +0 -800
  374. package/dist/utils/crash-logger.d.ts +0 -18
  375. package/dist/utils/crash-logger.js +0 -44
  376. package/dist/utils/dedent.d.ts +0 -8
  377. package/dist/utils/dedent.js +0 -38
  378. /package/dist/{http-server-auto-tunnel.d.ts → ui/config-editor/main.d.ts} +0 -0
  379. /package/dist/{test-docx.d.ts → ui/config-editor/src/main.d.ts} +0 -0
  380. /package/dist/{tools/docx/xml-view-test.d.ts → ui/file-preview/main.d.ts} +0 -0
  381. /package/dist/ui/file-preview/src/components/{toolbar.d.ts → Toolbar.d.ts} +0 -0
  382. /package/dist/ui/file-preview/src/components/{toolbar.js → Toolbar.js} +0 -0
  383. /package/dist/{tools/pdf-processor.d.ts → ui/file-preview/src/model.js} +0 -0
package/README.md CHANGED
@@ -19,12 +19,25 @@ Work with code and text, run processes, and automate tasks, going far beyond oth
19
19
 
20
20
  ## 👋 We’re hiring — come build with us: https://desktopcommander.app/careers/
21
21
 
22
+ ## 🖥️ Try the Desktop Commander App (Beta)
23
+
24
+ **Want a better experience?** The Desktop Commander App gives you everything the MCP server does, plus:
25
+
26
+ - **Use any AI model** — Claude, GPT-4.5, Gemini 2.5, or any model you prefer
27
+ - **See file changes live** — visual file previews as AI edits your files
28
+ - **Add custom MCPs and context** — extend with your own tools, no config files
29
+ - **Coming soon** — skills system, dictation, background scheduled tasks, and more
30
+
31
+ **👉 [Download the App](https://desktopcommander.app/#download)** (macOS & Windows)
32
+
33
+ > The MCP server below still works great with Claude Desktop and other MCP clients — the app is for those who want a dedicated, polished experience.
34
+
22
35
  ## Table of Contents
23
36
  - [Features](#features)
24
37
  - [How to install](#how-to-install)
25
- - [Remote MCP (ChatGPT, Claude Web)](#remote-mcp-chatgpt-claude-web)
26
38
  - [Getting Started](#getting-started)
27
39
  - [Usage](#usage)
40
+ - [File Preview UI & Markdown Editor](#file-preview-ui--markdown-editor)
28
41
  - [Handling Long-Running Commands](#handling-long-running-commands)
29
42
  - [Work in Progress and TODOs](#roadmap)
30
43
  - [Sponsors and Supporters](#support-desktop-commander)
@@ -42,23 +55,27 @@ Execute long-running terminal commands on your computer and manage processes thr
42
55
  ## Features
43
56
 
44
57
  - **Remote AI Control** - Use Desktop Commander from ChatGPT, Claude web, and other AI services via [Remote MCP](https://mcp.desktopcommander.app)
58
+ - **File Preview UI** - Visual file previews in Claude Desktop with rendered markdown, inline images, expandable content, built-in markdown editor, and quick "Open in folder" access
45
59
  - **Enhanced terminal commands with interactive process control**
46
60
  - **Execute code in memory (Python, Node.js, R) without saving files**
47
61
  - **Instant data analysis - just ask to analyze CSV/JSON/Excel files**
48
62
  - **Native Excel file support** - Read, write, edit, and search Excel files (.xlsx, .xls, .xlsm) without external tools
49
63
  - **PDF support** - Read PDFs with text extraction, create new PDFs from markdown, modify existing PDFs
64
+ - **DOCX support** - Read, create, edit, and search Word documents (.docx) with surgical XML editing and markdown-to-DOCX conversion
50
65
  - **Interact with running processes (SSH, databases, development servers)**
51
66
  - Execute terminal commands with output streaming
52
67
  - Command timeout and background execution support
53
68
  - Process management (list and kill processes)
54
69
  - Session management for long-running commands
70
+ - **Process output pagination** - Read terminal output with offset/length controls to prevent context overflow
55
71
  - Server configuration management:
56
72
  - Get/set configuration values
57
73
  - Update multiple settings at once
58
74
  - Dynamic configuration changes without server restart
59
75
  - Full filesystem operations:
60
- - Read/write files (text, Excel, PDF)
76
+ - Read/write files (text, Excel, PDF, DOCX)
61
77
  - Create/list directories
78
+ - **Recursive directory listing** with configurable depth and context overflow protection for large folders
62
79
  - Move files/directories
63
80
  - Search files and content (including Excel content)
64
81
  - Get file metadata
@@ -73,14 +90,23 @@ Execute long-running terminal commands on your computer and manage processes thr
73
90
  - All tool calls are automatically logged
74
91
  - Log rotation with 10MB size limit
75
92
  - Detailed timestamps and arguments
93
+ - Security hardening:
94
+ - Symlink traversal prevention on file operations
95
+ - Command blocklist with bypass protection
96
+ - [Docker isolation](#option-6-docker-installation--auto-updates-no-nodejs-required) for full sandboxing
97
+ - See [SECURITY.md](SECURITY.md) for details
76
98
 
77
99
  ## How to install
78
100
 
79
- Desktop Commander offers multiple installation methods to fit different user needs and technical requirements.
101
+ ### Install in Claude Desktop
80
102
 
81
- > **📋 Update & Uninstall Information:** Before choosing an installation option, note that **only Options 1, 2, 3, and 6 have automatic updates**. Options 4 and 5 require manual updates. See the sections below for update and uninstall instructions for each option.
103
+ Desktop Commander offers multiple installation methods for Claude Desktop.
104
+
105
+ > **📋 Update & Uninstall Information:** Options 1, 2, 3, 4, and 6 have automatic updates. Option 5 requires manual updates. See below for details.
106
+
107
+ <details>
108
+ <summary><b>Option 1: Install through npx ⭐ Auto-Updates (Requires Node.js)</b></summary>
82
109
 
83
- ### Option 1: Install through npx ⭐ **Auto-Updates** **Requires Node.js**
84
110
  Just run this in terminal:
85
111
  ```
86
112
  npx @wonderwhy-er/desktop-commander@latest setup
@@ -101,36 +127,42 @@ Restart Claude if running.
101
127
  **🔄 Manual Update:** Run the setup command again
102
128
  **🗑️ Uninstall:** Run `npx @wonderwhy-er/desktop-commander@latest remove`
103
129
 
104
- ### Option 2: Using bash script installer (macOS) ⭐ **Auto-Updates** **Installs Node.js if needed**
105
- For macOS users, you can use our automated bash installer which will check your Node.js version, install it if needed, and automatically configure Desktop Commander:
130
+ </details>
131
+
132
+ <details>
133
+ <summary><b>Option 2: Using bash script installer (macOS) ⭐ Auto-Updates (Installs Node.js if needed)</b></summary>
134
+
106
135
  ```
107
136
  curl -fsSL https://raw.githubusercontent.com/wonderwhy-er/DesktopCommanderMCP/refs/heads/main/install.sh | bash
108
137
  ```
109
- This script handles all dependencies and configuration automatically for a seamless setup experience.
138
+ This script handles all dependencies and configuration automatically.
110
139
 
111
- **✅ Auto-Updates:** Yes - requires manual updates
140
+ **✅ Auto-Updates:** Yes
112
141
  **🔄 Manual Update:** Re-run the bash installer command above
113
142
  **🗑️ Uninstall:** Run `npx @wonderwhy-er/desktop-commander@latest remove`
114
143
 
115
- ### Option 3: Installing via Smithery ⭐ **Auto-Updates** **Requires Node.js**
144
+ </details>
116
145
 
117
- To install Desktop Commander for Claude Desktop via [Smithery](https://smithery.ai/server/@wonderwhy-er/desktop-commander):
146
+ <details>
147
+ <summary><b>Option 3: Installing via Smithery ⭐ Auto-Updates (Requires Node.js)</b></summary>
118
148
 
119
- 1. **Visit the Smithery page:** https://smithery.ai/server/@wonderwhy-er/desktop-commander
149
+ 1. **Visit:** https://smithery.ai/server/@wonderwhy-er/desktop-commander
120
150
  2. **Login to Smithery** if you haven't already
121
151
  3. **Select your client** (Claude Desktop) on the right side
122
152
  4. **Install with the provided key** that appears after selecting your client
123
153
  5. **Restart Claude Desktop**
124
154
 
125
- The old command-line installation method is no longer supported. Please use the web interface above for the most reliable installation experience.
126
-
127
155
  **✅ Auto-Updates:** Yes - automatically updates when you restart Claude
128
156
  **🔄 Manual Update:** Visit the Smithery page and reinstall
129
157
 
130
- ### Option 4: Add to claude_desktop_config manually ⭐ **Auto-Updates** **Requires Node.js**
158
+ </details>
159
+
160
+ <details>
161
+ <summary><b>Option 4: Add to claude_desktop_config manually ⭐ Auto-Updates (Requires Node.js)</b></summary>
162
+
131
163
  Add this entry to your claude_desktop_config.json:
132
164
 
133
- - On Mac: `~/Library/Application\ Support/Claude/claude_desktop_config.json`
165
+ - On Mac: `~/Library/Application Support/Claude/claude_desktop_config.json`
134
166
  - On Windows: `%APPDATA%\Claude\claude_desktop_config.json`
135
167
  - On Linux: `~/.config/Claude/claude_desktop_config.json`
136
168
 
@@ -151,10 +183,13 @@ Restart Claude if running.
151
183
 
152
184
  **✅ Auto-Updates:** Yes - automatically updates when you restart Claude
153
185
  **🔄 Manual Update:** Run the setup command again
154
- **🗑️ Uninstall:** Run `npx @wonderwhy-er/desktop-commander@latest remove` or remove the "desktop-commander" entry from your claude_desktop_config.json file
186
+ **🗑️ Uninstall:** Run `npx @wonderwhy-er/desktop-commander@latest remove` or remove the entry from your claude_desktop_config.json
187
+
188
+ </details>
189
+
190
+ <details>
191
+ <summary><b>Option 5: Checkout locally ❌ Manual Updates (Requires Node.js)</b></summary>
155
192
 
156
- ### ### Option 5: Checkout locally ❌ **Manual Updates** **Requires Node.js** ❌ **Manual Updates** **Requires Node.js**
157
- 1. Clone and build:
158
193
  ```bash
159
194
  git clone https://github.com/wonderwhy-er/DesktopCommanderMCP.git
160
195
  cd DesktopCommanderMCP
@@ -162,27 +197,20 @@ npm run setup
162
197
  ```
163
198
  Restart Claude if running.
164
199
 
165
- The setup command will:
166
- - Install dependencies
167
- - Build the server
168
- - Configure Claude's desktop app
169
- - Add MCP servers to Claude's config if needed
200
+ The setup command will install dependencies, build the server, and configure Claude's desktop app.
170
201
 
171
202
  **❌ Auto-Updates:** No - requires manual git updates
172
203
  **🔄 Manual Update:** `cd DesktopCommanderMCP && git pull && npm run setup`
173
- **🗑️ Uninstall:** Run `npx @wonderwhy-er/desktop-commander@latest remove` or remove the cloned directory and remove MCP server entry from Claude config
204
+ **🗑️ Uninstall:** Run `npx @wonderwhy-er/desktop-commander@latest remove` or remove the cloned directory and MCP server entry from Claude config
174
205
 
175
- ### Option 6: Docker Installation 🐳 ⭐ **Auto-Updates** **No Node.js Required**
176
-
177
- Perfect for users who want complete or partial isolation or don't have Node.js installed. Desktop Commander runs in a sandboxed Docker container with a persistent work environment.
206
+ </details>
178
207
 
179
- #### Prerequisites
180
- - [Docker Desktop](https://www.docker.com/products/docker-desktop/) installed **and running**
181
- - Claude Desktop app installed
208
+ <details>
209
+ <summary><b>Option 6: Docker Installation 🐳 ⭐ Auto-Updates (No Node.js Required)</b></summary>
182
210
 
183
- **Important:** Make sure Docker Desktop is fully started before running the installer.
211
+ Perfect for users who want isolation or don't have Node.js installed. Runs in a sandboxed Docker container with a persistent work environment.
184
212
 
185
- #### Automated Installation (Recommended)
213
+ **Prerequisites:** [Docker Desktop](https://www.docker.com/products/docker-desktop/) installed **and running**, Claude Desktop app installed.
186
214
 
187
215
  **macOS/Linux:**
188
216
  ```bash
@@ -191,29 +219,15 @@ bash <(curl -fsSL https://raw.githubusercontent.com/wonderwhy-er/DesktopCommande
191
219
 
192
220
  **Windows PowerShell:**
193
221
  ```powershell
194
- # Download and run the installer (one-liner)
195
222
  iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/wonderwhy-er/DesktopCommanderMCP/refs/heads/main/install-docker.ps1'))
196
223
  ```
197
224
 
198
- The automated installer will:
199
- - Check Docker installation
200
- - Pull the latest Docker image
201
- - Prompt you to select folders for mounting
202
- - Configure Claude Desktop automatically
203
- - Restart Claude if possible
204
-
205
- #### How Docker Persistence Works
206
- Desktop Commander creates a persistent work environment that remembers everything between sessions:
207
- - **Your development tools**: Any software you install (Node.js, Python, databases, etc.) stays installed
208
- - **Your configurations**: Git settings, SSH keys, shell preferences, and other personal configs are preserved
209
- - **Your work files**: Projects and files in the workspace area persist across restarts
210
- - **Package caches**: Downloaded packages and dependencies are cached for faster future installs
211
-
212
- Think of it like having your own dedicated development computer that never loses your setup, but runs safely isolated from your main system.
225
+ The installer will check Docker, pull the image, prompt for folder mounting, and configure Claude Desktop.
213
226
 
214
- #### Manual Docker Configuration
227
+ **Docker persistence:** Your tools, configs, work files, and package caches all survive restarts.
215
228
 
216
- If you prefer manual setup, add this to your claude_desktop_config.json:
229
+ <details>
230
+ <summary>Manual Docker Configuration</summary>
217
231
 
218
232
  **Basic setup (no file access):**
219
233
  ```json
@@ -221,12 +235,7 @@ If you prefer manual setup, add this to your claude_desktop_config.json:
221
235
  "mcpServers": {
222
236
  "desktop-commander-in-docker": {
223
237
  "command": "docker",
224
- "args": [
225
- "run",
226
- "-i",
227
- "--rm",
228
- "mcp/desktop-commander:latest"
229
- ]
238
+ "args": ["run", "-i", "--rm", "mcp/desktop-commander:latest"]
230
239
  }
231
240
  }
232
241
  }
@@ -239,9 +248,7 @@ If you prefer manual setup, add this to your claude_desktop_config.json:
239
248
  "desktop-commander-in-docker": {
240
249
  "command": "docker",
241
250
  "args": [
242
- "run",
243
- "-i",
244
- "--rm",
251
+ "run", "-i", "--rm",
245
252
  "-v", "/Users/username/Desktop:/mnt/desktop",
246
253
  "-v", "/Users/username/Documents:/mnt/documents",
247
254
  "mcp/desktop-commander:latest"
@@ -272,77 +279,208 @@ If you prefer manual setup, add this to your claude_desktop_config.json:
272
279
  }
273
280
  ```
274
281
 
275
- #### Docker Benefits
276
- ✅ **Controlled Isolation:** Runs in sandboxed environment with persistent development state
277
- ✅ **No Node.js Required:** Everything included in the container
278
- ✅ **Cross-Platform:** Same experience on all operating systems
279
- ✅ **Persistent Environment:** Your tools, files, configs, and work survives restarts
280
-
281
- **✅ Auto-Updates:** Yes - `latest` tag automatically gets newer versions
282
- **🔄 Manual Update:** `docker pull mcp/desktop-commander:latest` then restart Claude
282
+ </details>
283
283
 
284
- #### Docker Management Commands
284
+ <details>
285
+ <summary>Docker Management Commands</summary>
285
286
 
286
287
  **macOS/Linux:**
287
-
288
- Check installation status:
289
288
  ```bash
289
+ # Check status
290
290
  bash <(curl -fsSL https://raw.githubusercontent.com/wonderwhy-er/DesktopCommanderMCP/refs/heads/main/install-docker.sh) --status
291
- ```
292
291
 
293
- Reset all persistent data (removes all installed tools and configs):
294
- ```bash
292
+ # Reset all persistent data
295
293
  bash <(curl -fsSL https://raw.githubusercontent.com/wonderwhy-er/DesktopCommanderMCP/refs/heads/main/install-docker.sh) --reset
296
294
  ```
297
295
 
298
296
  **Windows PowerShell:**
299
-
300
- Check status:
301
297
  ```powershell
298
+ # Check status
302
299
  $script = (New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/wonderwhy-er/DesktopCommanderMCP/refs/heads/main/install-docker.ps1'); & ([ScriptBlock]::Create("$script")) -Status
303
- ```
304
300
 
305
- Reset all data:
306
- ```powershell
301
+ # Reset all data
307
302
  $script = (New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/wonderwhy-er/DesktopCommanderMCP/refs/heads/main/install-docker.ps1'); & ([ScriptBlock]::Create("$script")) -Reset
308
- ```
309
303
 
310
- Show help:
311
- ```powershell
304
+ # Show help
312
305
  $script = (New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/wonderwhy-er/DesktopCommanderMCP/refs/heads/main/install-docker.ps1'); & ([ScriptBlock]::Create("$script")) -Help
313
306
  ```
314
307
 
315
- Verbose output:
316
- ```powershell
317
- $script = (New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/wonderwhy-er/DesktopCommanderMCP/refs/heads/main/install-docker.ps1'); & ([ScriptBlock]::Create("$script")) -VerboseOutput
318
- ```
319
-
320
- #### Troubleshooting Docker Installation
321
- If you broke the Docker container or need a fresh start:
308
+ **Troubleshooting:** Reset and reinstall from scratch:
322
309
  ```bash
323
- # Reset and reinstall from scratch
324
310
  bash <(curl -fsSL https://raw.githubusercontent.com/wonderwhy-er/DesktopCommanderMCP/refs/heads/main/install-docker.sh) --reset && bash <(curl -fsSL https://raw.githubusercontent.com/wonderwhy-er/DesktopCommanderMCP/refs/heads/main/install-docker.sh)
325
311
  ```
326
- This will completely reset your persistent environment and reinstall everything fresh with exception of not touching mounted folders
327
312
 
328
- ## Remote MCP (ChatGPT, Claude Web) 🌐
313
+ </details>
314
+
315
+ **✅ Auto-Updates:** Yes - `latest` tag automatically gets newer versions
316
+ **🔄 Manual Update:** `docker pull mcp/desktop-commander:latest` then restart Claude
317
+
318
+ </details>
319
+
320
+ ### Install in Other Clients
321
+
322
+ Desktop Commander works with any MCP-compatible client. The standard JSON configuration is:
323
+
324
+ ```json
325
+ {
326
+ "mcpServers": {
327
+ "desktop-commander": {
328
+ "command": "npx",
329
+ "args": ["-y", "@wonderwhy-er/desktop-commander@latest"]
330
+ }
331
+ }
332
+ }
333
+ ```
334
+
335
+ Add this to your client's MCP configuration file at the locations below:
336
+
337
+ <details>
338
+ <summary><b>Cursor</b></summary>
339
+
340
+ [Install MCP Server in Cursor](https://cursor.directory/mcp/desktop-commander-mcp)
341
+
342
+ Or add manually to `~/.cursor/mcp.json` (global) or `.cursor/mcp.json` in your project folder (project-specific).
343
+
344
+ See [Cursor MCP docs](https://docs.cursor.com/context/model-context-protocol) for more info.
345
+
346
+ </details>
347
+
348
+ <details>
349
+ <summary><b>Windsurf</b></summary>
350
+
351
+ Add to `~/.codeium/windsurf/mcp_config.json`. See [Windsurf MCP docs](https://docs.windsurf.com/windsurf/cascade/mcp) for more info.
352
+
353
+ </details>
354
+
355
+ <details>
356
+ <summary><b>VS Code / GitHub Copilot</b></summary>
357
+
358
+ Add to `.vscode/mcp.json` in your project or VS Code User Settings (JSON). Make sure MCP is enabled under Chat > MCP. Works in Agent mode.
359
+
360
+ See [VS Code MCP docs](https://code.visualstudio.com/docs/copilot/chat/mcp-servers) for more info.
361
+
362
+ </details>
363
+
364
+ <details>
365
+ <summary><b>Cline</b></summary>
366
+
367
+ Configure through the Cline extension settings in VS Code. Open the Cline sidebar, click the MCP Servers icon, and add the JSON configuration above. See [Cline MCP docs](https://docs.cline.bot/mcp/configuring-mcp-servers) for more info.
368
+
369
+ </details>
370
+
371
+ <details>
372
+ <summary><b>Roo Code</b></summary>
373
+
374
+ Add to your Roo Code MCP configuration file. See [Roo Code MCP docs](https://docs.roocode.com/features/mcp/using-mcp-in-roo) for more info.
375
+
376
+ </details>
377
+
378
+ <details>
379
+ <summary><b>Claude Code</b></summary>
380
+
381
+ ```sh
382
+ claude mcp add --scope user desktop-commander -- npx -y @wonderwhy-er/desktop-commander@latest
383
+ ```
384
+
385
+ Remove `--scope user` to install for the current project only. See [Claude Code MCP docs](https://docs.anthropic.com/en/docs/claude-code/mcp) for more info.
386
+
387
+ </details>
388
+
389
+ <details>
390
+ <summary><b>Trae</b></summary>
391
+
392
+ Use the "Add manually" feature and paste the JSON configuration above. See [Trae MCP docs](https://docs.trae.ai/ide/model-context-protocol?_lang=en) for more info.
393
+
394
+ </details>
395
+
396
+ <details>
397
+ <summary><b>Kiro</b></summary>
398
+
399
+ Navigate to `Kiro` > `MCP Servers`, click `+ Add`, and paste the JSON configuration above. See [Kiro MCP docs](https://kiro.dev/docs/mcp/configuration/) for more info.
400
+
401
+ </details>
402
+
403
+ <details>
404
+ <summary><b>Codex (OpenAI)</b></summary>
405
+
406
+ Codex uses TOML configuration. Run this command to add Desktop Commander:
407
+
408
+ ```sh
409
+ codex mcp add desktop-commander -- npx -y @wonderwhy-er/desktop-commander@latest
410
+ ```
411
+
412
+ Or manually add to `~/.codex/config.toml`:
413
+
414
+ ```toml
415
+ [mcp_servers.desktop-commander]
416
+ command = "npx"
417
+ args = ["-y", "@wonderwhy-er/desktop-commander@latest"]
418
+ ```
419
+
420
+ See [Codex MCP docs](https://developers.openai.com/codex/mcp/) for more info.
421
+
422
+ </details>
423
+
424
+ <details>
425
+ <summary><b>JetBrains (AI Assistant)</b></summary>
426
+
427
+ In JetBrains IDEs, go to **Settings → Tools → AI Assistant → Model Context Protocol (MCP)**, click `+` Add, select **As JSON**, and paste the JSON configuration above. See [JetBrains MCP docs](https://www.jetbrains.com/help/ai-assistant/configure-an-mcp-server.html) for more info.
428
+
429
+ </details>
430
+
431
+ <details>
432
+ <summary><b>Gemini CLI</b></summary>
433
+
434
+ Add to `~/.gemini/settings.json`:
435
+
436
+ ```json
437
+ {
438
+ "mcpServers": {
439
+ "desktop-commander": {
440
+ "command": "npx",
441
+ "args": ["-y", "@wonderwhy-er/desktop-commander@latest"]
442
+ }
443
+ }
444
+ }
445
+ ```
446
+
447
+ See [Gemini CLI docs](https://github.com/google-gemini/gemini-cli) for more info.
448
+
449
+ </details>
450
+
451
+ <details>
452
+ <summary><b>Augment Code</b></summary>
453
+
454
+ Press `Cmd/Ctrl+Shift+P`, open the Augment panel, and add a new MCP server named `desktop-commander` with the JSON configuration above. See [Augment Code MCP docs](https://docs.augmentcode.com/setup-augment/mcp) for more info.
455
+
456
+ </details>
457
+
458
+ <details>
459
+ <summary><b>Qwen Code</b></summary>
460
+
461
+ Run this command to add Desktop Commander:
462
+
463
+ ```sh
464
+ qwen mcp add desktop-commander -- npx -y @wonderwhy-er/desktop-commander@latest
465
+ ```
466
+
467
+ Or add to `.qwen/settings.json` (project) or `~/.qwen/settings.json` (global). See [Qwen Code MCP docs](https://qwenlm.github.io/qwen-code-docs/en/developers/tools/mcp-server/) for more info.
329
468
 
330
- Use Desktop Commander from **ChatGPT**, **Claude web**, and other AI services through their MCP/Connector integrations - no Claude Desktop app required.
469
+ </details>
331
470
 
332
- **👉 Get started at [mcp.desktopcommander.app](https://mcp.desktopcommander.app)**
471
+ <details>
472
+ <summary><b>ChatGPT / Claude Web (Remote MCP)</b></summary>
333
473
 
334
- The website provides complete instructions for:
335
- - Installing and running the Remote Device on your computer
336
- - Connecting your AI service (ChatGPT, Claude, etc.)
337
- - Managing your devices and sessions
474
+ Use Desktop Commander from **ChatGPT**, **Claude web**, and other AI services via Remote MCP — no desktop app required.
338
475
 
339
- ### How It Works
476
+ **👉 [Get started at mcp.desktopcommander.app](https://mcp.desktopcommander.app)**
340
477
 
478
+ How it works:
341
479
  1. You run a lightweight **Remote Device** on your computer
342
480
  2. It connects securely to the cloud Remote MCP service
343
481
  3. Your AI sends commands through the cloud to your device
344
482
  4. Commands execute locally, results return to your AI
345
- 5. **You stay in control** - stop anytime with `Ctrl+C`
483
+ 5. **You stay in control** stop anytime with `Ctrl+C`
346
484
 
347
485
  ### Security
348
486
 
@@ -350,6 +488,8 @@ The website provides complete instructions for:
350
488
  - ✅ Commands execute under your user permissions
351
489
  - ✅ Secure OAuth authentication and encrypted communication channel
352
490
 
491
+ </details>
492
+
353
493
  ## Updating & Uninstalling Desktop Commander
354
494
 
355
495
  ### Automatic Updates (Options 1, 2, 3, 4 & 6)
@@ -555,6 +695,56 @@ Desktop Commander can be run in Docker containers for **complete isolation from
555
695
  - Claude can see and analyze the actual image content
556
696
  - Default 30-second timeout for URL requests
557
697
 
698
+ ## File Preview UI & Markdown Editor
699
+
700
+ Desktop Commander includes a rich file preview widget in Claude Desktop that renders files visually as AI works with them.
701
+
702
+ ### Supported file types
703
+ - **Markdown** — rendered preview with a built-in editor
704
+ - **Images** — inline display (PNG, JPEG, GIF, WebP, etc.)
705
+ - **Code files** — syntax-highlighted source view
706
+ - **HTML** — rendered preview with toggle to source view
707
+ - **Directories** — interactive tree with expand/collapse and lazy loading
708
+ - **PDF, Excel, DOCX** — native content extraction and display
709
+
710
+ ### Markdown Editor
711
+
712
+ When viewing a `.md` file in Claude Desktop, you can edit it directly inside the preview panel — no need to open a separate app.
713
+
714
+ **How to use:**
715
+ 1. Ask Claude to read or create a markdown file
716
+ 2. Expand the file preview to fullscreen using the **⤢ Expand** button
717
+ 3. The editor activates automatically in fullscreen mode
718
+ 4. Edit your content with a live preview toggle, copy, undo, and save controls
719
+ 5. Changes are saved back to disk; collapse to return to inline view
720
+
721
+ **Editor features:**
722
+ - Live **edit / preview toggle** — switch between raw markdown and rendered output
723
+ - **Auto-save** to disk with save status indicator
724
+ - **Undo** support to revert unsaved changes
725
+ - **Copy** button to grab the full markdown source
726
+ - **Open in editor** — launch your default markdown app directly from the panel
727
+ - Partial-file awareness — loads and merges surrounding lines when the file was only partially read
728
+ - Text selection context — select text in preview mode and the AI can reference your selection
729
+
730
+ ### Directory Browser
731
+
732
+ When Claude runs `list_directory`, the result opens as an interactive file tree inside the preview panel — not just raw text output.
733
+
734
+ **Features:**
735
+ - **Expandable tree** — folders expand and collapse on click; top-level contents shown immediately
736
+ - **Lazy loading** — subfolders load on demand to keep the initial view fast
737
+ - **Large directory handling** — directories with many items show a `⚠ click to load all` button instead of overwhelming the view
738
+ - **Open in Finder/Explorer** — each folder has a quick-open button to reveal it in your file manager
739
+ - **Click to preview** — clicking any file in the tree opens it in the file preview panel directly
740
+ - **Back navigation** — after opening a file from the tree, a ← Back button returns you to the directory view
741
+
742
+ ### Other preview features
743
+ - **Expand / collapse** — toggle between compact summary row and full panel
744
+ - **Open in folder** — reveal the file in Finder/Explorer with one click
745
+ - **Load more lines** — incrementally load content above or below a partial read window
746
+ - **Text selection** — highlight text in any preview; the AI can see and reference your selection
747
+
558
748
  ## Fuzzy Search Log Analysis (npm scripts)
559
749
 
560
750
  The fuzzy search logging system includes convenient npm scripts for analyzing logs outside of the MCP environment:
@@ -229,9 +229,12 @@ class CommandManager {
229
229
  }
230
230
  catch (error) {
231
231
  console.error('Error validating command:', error);
232
- // If there's an error, default to allowing the command
233
- // This is less secure but prevents blocking all commands due to config issues
234
- return true;
232
+ capture('server_validate_command_error', {
233
+ error: error instanceof Error ? error.message : String(error)
234
+ });
235
+ // Fail closed: deny the command if validation encounters an error.
236
+ // This prevents a config read failure from bypassing all command filtering.
237
+ return false;
235
238
  }
236
239
  }
237
240
  }
@@ -0,0 +1,41 @@
1
+ export type ConfigFieldValueType = 'string' | 'number' | 'boolean' | 'array' | 'null';
2
+ export type ConfigFieldDefinition = {
3
+ label: string;
4
+ description: string;
5
+ valueType: ConfigFieldValueType;
6
+ };
7
+ export declare const CONFIG_FIELD_DEFINITIONS: {
8
+ readonly blockedCommands: {
9
+ readonly label: "Blocked Commands";
10
+ readonly description: "This is your personal safety blocklist. If a command appears here, Desktop Commander will refuse to run it even if a prompt asks for it. Add risky commands you never want executed by mistake.";
11
+ readonly valueType: "array";
12
+ };
13
+ readonly allowedDirectories: {
14
+ readonly label: "Allowed Folders";
15
+ readonly description: "These are the folders Desktop Commander is allowed to read and edit. Think of this as a permission list. Keeping it small is safer. If this list is empty, Desktop Commander can access your entire filesystem.";
16
+ readonly valueType: "array";
17
+ };
18
+ readonly defaultShell: {
19
+ readonly label: "Default Shell";
20
+ readonly description: "This is the shell used for new command sessions (for example /bin/bash or /bin/zsh). Only change this if you know your environment requires a specific shell.";
21
+ readonly valueType: "string";
22
+ };
23
+ readonly telemetryEnabled: {
24
+ readonly label: "Anonymous Telemetry";
25
+ readonly description: "When on, Desktop Commander sends anonymous usage information that helps improve product quality. When off, no telemetry data is sent.";
26
+ readonly valueType: "boolean";
27
+ };
28
+ readonly fileReadLineLimit: {
29
+ readonly label: "File Read Limit";
30
+ readonly description: "Maximum number of lines returned from a file in one read action. Lower numbers keep responses short and safer; higher numbers return more text at once.";
31
+ readonly valueType: "number";
32
+ };
33
+ readonly fileWriteLineLimit: {
34
+ readonly label: "File Write Limit";
35
+ readonly description: "Maximum number of lines that can be written in one edit operation. This helps prevent accidental oversized writes and keeps file changes predictable.";
36
+ readonly valueType: "number";
37
+ };
38
+ };
39
+ export type ConfigFieldKey = keyof typeof CONFIG_FIELD_DEFINITIONS;
40
+ export declare const CONFIG_FIELD_KEYS: ConfigFieldKey[];
41
+ export declare function isConfigFieldKey(value: string): value is ConfigFieldKey;
@@ -0,0 +1,37 @@
1
+ // Single source of truth for user-editable configuration fields.
2
+ export const CONFIG_FIELD_DEFINITIONS = {
3
+ blockedCommands: {
4
+ label: 'Blocked Commands',
5
+ description: 'This is your personal safety blocklist. If a command appears here, Desktop Commander will refuse to run it even if a prompt asks for it. Add risky commands you never want executed by mistake.',
6
+ valueType: 'array',
7
+ },
8
+ allowedDirectories: {
9
+ label: 'Allowed Folders',
10
+ description: 'These are the folders Desktop Commander is allowed to read and edit. Think of this as a permission list. Keeping it small is safer. If this list is empty, Desktop Commander can access your entire filesystem.',
11
+ valueType: 'array',
12
+ },
13
+ defaultShell: {
14
+ label: 'Default Shell',
15
+ description: 'This is the shell used for new command sessions (for example /bin/bash or /bin/zsh). Only change this if you know your environment requires a specific shell.',
16
+ valueType: 'string',
17
+ },
18
+ telemetryEnabled: {
19
+ label: 'Anonymous Telemetry',
20
+ description: 'When on, Desktop Commander sends anonymous usage information that helps improve product quality. When off, no telemetry data is sent.',
21
+ valueType: 'boolean',
22
+ },
23
+ fileReadLineLimit: {
24
+ label: 'File Read Limit',
25
+ description: 'Maximum number of lines returned from a file in one read action. Lower numbers keep responses short and safer; higher numbers return more text at once.',
26
+ valueType: 'number',
27
+ },
28
+ fileWriteLineLimit: {
29
+ label: 'File Write Limit',
30
+ description: 'Maximum number of lines that can be written in one edit operation. This helps prevent accidental oversized writes and keeps file changes predictable.',
31
+ valueType: 'number',
32
+ },
33
+ };
34
+ export const CONFIG_FIELD_KEYS = Object.keys(CONFIG_FIELD_DEFINITIONS);
35
+ export function isConfigFieldKey(value) {
36
+ return Object.prototype.hasOwnProperty.call(CONFIG_FIELD_DEFINITIONS, value);
37
+ }
@@ -13,6 +13,8 @@ export interface ClientInfo {
13
13
  name: string;
14
14
  version: string;
15
15
  }
16
+ export declare function normalizeTelemetryEnabledValue(value: unknown): unknown;
17
+ export declare function isTelemetryDisabledValue(value: unknown): boolean;
16
18
  /**
17
19
  * Singleton config manager for the server
18
20
  */