@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
@@ -9,6 +9,71 @@
9
9
  * - ChatGPT: Uses window.openai.widgetState
10
10
  * - Other hosts: No-op (rely on standard ui/notifications/tool-result)
11
11
  */
12
+ const FALLBACK_WIDGET_STATE_KEY_PREFIX = 'desktop-commander:widget-state';
13
+ const FALLBACK_WIDGET_INSTANCE_MARKER = '__dc_widget_id__:';
14
+ function createWidgetInstanceId() {
15
+ const cryptoObject = typeof globalThis.crypto === 'object' ? globalThis.crypto : undefined;
16
+ if (typeof cryptoObject?.randomUUID === 'function') {
17
+ return cryptoObject.randomUUID();
18
+ }
19
+ return `widget-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 10)}`;
20
+ }
21
+ function readWidgetInstanceIdFromWindowName(windowName) {
22
+ const markerIndex = windowName.indexOf(FALLBACK_WIDGET_INSTANCE_MARKER);
23
+ if (markerIndex === -1) {
24
+ return undefined;
25
+ }
26
+ const encodedValue = windowName
27
+ .slice(markerIndex + FALLBACK_WIDGET_INSTANCE_MARKER.length)
28
+ .split('|', 1)[0];
29
+ if (!encodedValue) {
30
+ return undefined;
31
+ }
32
+ try {
33
+ return decodeURIComponent(encodedValue);
34
+ }
35
+ catch {
36
+ return encodedValue;
37
+ }
38
+ }
39
+ function getFallbackWidgetInstanceId() {
40
+ if (typeof window === 'undefined') {
41
+ return 'unknown-instance';
42
+ }
43
+ const currentWindowName = typeof window.name === 'string' ? window.name : '';
44
+ const existingInstanceId = readWidgetInstanceIdFromWindowName(currentWindowName);
45
+ if (existingInstanceId) {
46
+ return existingInstanceId;
47
+ }
48
+ const instanceId = createWidgetInstanceId();
49
+ const marker = `${FALLBACK_WIDGET_INSTANCE_MARKER}${encodeURIComponent(instanceId)}`;
50
+ try {
51
+ window.name = currentWindowName ? `${currentWindowName}|${marker}` : marker;
52
+ }
53
+ catch {
54
+ // Ignore window.name write failures and fall back to the in-memory id.
55
+ }
56
+ return instanceId;
57
+ }
58
+ function getFallbackWidgetStateKey() {
59
+ if (typeof window === 'undefined') {
60
+ return `${FALLBACK_WIDGET_STATE_KEY_PREFIX}:unknown`;
61
+ }
62
+ const appPath = window.location.pathname || 'unknown';
63
+ const instanceId = getFallbackWidgetInstanceId();
64
+ return `${FALLBACK_WIDGET_STATE_KEY_PREFIX}:${appPath}:${encodeURIComponent(instanceId)}`;
65
+ }
66
+ function getSessionStorage() {
67
+ if (typeof window === 'undefined') {
68
+ return undefined;
69
+ }
70
+ try {
71
+ return window.sessionStorage;
72
+ }
73
+ catch {
74
+ return undefined;
75
+ }
76
+ }
12
77
  /**
13
78
  * Check if we're running in ChatGPT (has special widget state API)
14
79
  */
@@ -20,14 +85,47 @@ export function isChatGPT() {
20
85
  * Create a widget state storage adapter.
21
86
  *
22
87
  * On ChatGPT: Uses window.openai.widgetState for persistence
23
- * On other hosts: Returns no-op adapter (state comes from ui/notifications/tool-result)
88
+ * On other hosts: Uses sessionStorage as a fallback so the preview can survive
89
+ * transient interruptions (page refresh on hosts that don't re-send tool_result,
90
+ * visibility/focus loss, etc.).
91
+ * The fallback cache key is scoped by app pathname and a per-frame widget id
92
+ * persisted in window.name, so different widgets in the same origin/session
93
+ * do not overwrite one another's cached state.
24
94
  */
25
95
  export function createWidgetStateStorage(validator) {
26
96
  if (!isChatGPT()) {
27
- // Other hosts don't have widget state persistence - return no-op
97
+ const storage = getSessionStorage();
98
+ const storageKey = getFallbackWidgetStateKey();
28
99
  return {
29
- read: () => undefined,
30
- write: () => { }
100
+ read() {
101
+ if (!storage)
102
+ return undefined;
103
+ try {
104
+ const raw = storage.getItem(storageKey);
105
+ if (!raw)
106
+ return undefined;
107
+ const parsed = JSON.parse(raw);
108
+ const payload = parsed?.payload;
109
+ if (payload === undefined)
110
+ return undefined;
111
+ if (validator && !validator(payload))
112
+ return undefined;
113
+ return payload;
114
+ }
115
+ catch {
116
+ return undefined;
117
+ }
118
+ },
119
+ write(state) {
120
+ if (!storage)
121
+ return;
122
+ try {
123
+ storage.setItem(storageKey, JSON.stringify({ payload: state }));
124
+ }
125
+ catch {
126
+ // Ignore storage failures
127
+ }
128
+ }
31
129
  };
32
130
  }
33
131
  // ChatGPT-specific implementation
@@ -1,6 +1,6 @@
1
1
  import { platform } from 'os';
2
2
  import * as https from 'https';
3
- import { configManager } from '../config-manager.js';
3
+ import { configManager, isTelemetryDisabledValue } from '../config-manager.js';
4
4
  import { currentClient } from '../server.js';
5
5
  let VERSION = 'unknown';
6
6
  try {
@@ -56,7 +56,7 @@ export const captureBase = async (captureURL, event, properties) => {
56
56
  // Check if telemetry is enabled in config (defaults to true if not set)
57
57
  const telemetryEnabled = await configManager.getValue('telemetryEnabled');
58
58
  // If telemetry is explicitly disabled or GA credentials are missing, don't send
59
- if (telemetryEnabled === false || !captureURL) {
59
+ if (isTelemetryDisabledValue(telemetryEnabled) || !captureURL) {
60
60
  return;
61
61
  }
62
62
  // Get or create the client ID if not already initialized
@@ -336,7 +336,7 @@ const buildEventProperties = async (properties) => {
336
336
  const sendToTelemetryProxy = async (event, eventProperties) => {
337
337
  try {
338
338
  const telemetryEnabled = await configManager.getValue('telemetryEnabled');
339
- if (telemetryEnabled === false)
339
+ if (isTelemetryDisabledValue(telemetryEnabled))
340
340
  return;
341
341
  const payload = JSON.stringify({
342
342
  client_id: uniqueUserId,
@@ -87,6 +87,8 @@ export interface FileResult {
87
87
  export interface FileMetadata {
88
88
  /** For images */
89
89
  isImage?: boolean;
90
+ /** For directories (read_file fallback to listDirectory) */
91
+ isDirectory?: boolean;
90
92
  /** For binary files */
91
93
  isBinary?: boolean;
92
94
  /** For Excel files */
@@ -24,7 +24,7 @@ export async function openBrowser(url) {
24
24
  break;
25
25
  case 'win32':
26
26
  // Windows 'start' is a shell builtin, use spawn with shell but pass URL as separate arg
27
- spawn('cmd', ['/c', 'start', '', url], { shell: false }).on('close', (code) => {
27
+ spawn('cmd', ['/c', 'start', '', url], { shell: false, windowsHide: true }).on('close', (code) => {
28
28
  code === 0 ? resolve() : reject(new Error(`Exit code ${code}`));
29
29
  });
30
30
  break;
@@ -0,0 +1,8 @@
1
+ export declare const UI_CALL_CONTEXT_META_KEY = "dcUiContext";
2
+ export interface UiCallTelemetryFields {
3
+ call_origin: 'ui' | 'llm';
4
+ ui_component?: string;
5
+ ui_action?: string;
6
+ ui_invocation_id?: string;
7
+ }
8
+ export declare function extractUiCallTelemetryFields(metadata: unknown): UiCallTelemetryFields;
@@ -0,0 +1,72 @@
1
+ // Shared key used by UI widgets to attach call-origin metadata inside tools/call _meta.
2
+ export const UI_CALL_CONTEXT_META_KEY = 'dcUiContext';
3
+ function normalizeLabel(value, maxLength) {
4
+ // Keep telemetry labels compact and query-friendly (snake-like + bounded length).
5
+ if (typeof value !== 'string') {
6
+ return undefined;
7
+ }
8
+ const trimmed = value.trim();
9
+ if (trimmed.length === 0) {
10
+ return undefined;
11
+ }
12
+ const normalized = trimmed
13
+ .toLowerCase()
14
+ .replace(/[^a-z0-9_.:-]+/g, '_')
15
+ .replace(/^_+|_+$/g, '')
16
+ .slice(0, maxLength);
17
+ if (normalized.length === 0) {
18
+ return undefined;
19
+ }
20
+ return normalized;
21
+ }
22
+ function normalizeInvocationId(value, maxLength) {
23
+ // Invocation IDs are correlation-only; strip unusual characters and cap length.
24
+ if (typeof value !== 'string') {
25
+ return undefined;
26
+ }
27
+ const trimmed = value.trim();
28
+ if (trimmed.length === 0) {
29
+ return undefined;
30
+ }
31
+ const clipped = trimmed.slice(0, maxLength);
32
+ const sanitized = clipped.replace(/[^A-Za-z0-9_.:-]+/g, '');
33
+ if (sanitized.length === 0) {
34
+ return undefined;
35
+ }
36
+ return sanitized;
37
+ }
38
+ function isRecord(value) {
39
+ return typeof value === 'object' && value !== null;
40
+ }
41
+ export function extractUiCallTelemetryFields(metadata) {
42
+ // Default classification is LLM unless an explicit UI-origin envelope is present.
43
+ const base = { call_origin: 'llm' };
44
+ if (!isRecord(metadata)) {
45
+ return base;
46
+ }
47
+ const rawContext = metadata[UI_CALL_CONTEXT_META_KEY];
48
+ if (!isRecord(rawContext)) {
49
+ return base;
50
+ }
51
+ const rawOrigin = typeof rawContext.callOrigin === 'string'
52
+ ? rawContext.callOrigin.trim().toLowerCase()
53
+ : '';
54
+ if (rawOrigin !== 'ui') {
55
+ // We only elevate to UI when the caller explicitly declares callOrigin="ui".
56
+ return base;
57
+ }
58
+ const result = { call_origin: 'ui' };
59
+ const component = normalizeLabel(rawContext.uiComponent, 64);
60
+ if (component) {
61
+ result.ui_component = component;
62
+ }
63
+ const action = normalizeLabel(rawContext.uiAction, 64);
64
+ if (action) {
65
+ result.ui_action = action;
66
+ }
67
+ const invocationId = normalizeInvocationId(rawContext.uiInvocationId, 120);
68
+ if (invocationId) {
69
+ result.ui_invocation_id = invocationId;
70
+ }
71
+ return result;
72
+ }
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "0.2.37";
1
+ export declare const VERSION = "0.2.39";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.2.37';
1
+ export const VERSION = '0.2.39';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wonderwhy-er/desktop-commander",
3
- "version": "0.2.37",
3
+ "version": "0.2.39",
4
4
  "description": "MCP server for terminal operations and file editing",
5
5
  "mcpName": "io.github.wonderwhy-er/desktop-commander",
6
6
  "license": "MIT",
@@ -31,7 +31,7 @@
31
31
  "bump": "node scripts/sync-version.js --bump",
32
32
  "bump:minor": "node scripts/sync-version.js --bump --minor",
33
33
  "bump:major": "node scripts/sync-version.js --bump --major",
34
- "build": "tsc && shx cp setup-claude-server.js uninstall-claude-server.js track-installation.js dist/ && shx chmod +x dist/*.js && shx mkdir -p dist/data && shx cp src/data/onboarding-prompts.json dist/data/ && shx mkdir -p dist/remote-device/scripts && shx cp src/remote-device/scripts/blocking-offline-update.js dist/remote-device/scripts/ && node scripts/build-ui-runtime.cjs file-preview",
34
+ "build": "tsc && shx cp setup-claude-server.js uninstall-claude-server.js track-installation.js dist/ && shx chmod +x dist/*.js && shx mkdir -p dist/data && shx cp src/data/onboarding-prompts.json dist/data/ && shx mkdir -p dist/remote-device/scripts && shx cp src/remote-device/scripts/blocking-offline-update.js dist/remote-device/scripts/ && node scripts/build-ui-runtime.cjs",
35
35
  "watch": "tsc --watch",
36
36
  "start": "node dist/index.js",
37
37
  "start:debug": "node --inspect-brk=9229 dist/index.js",
@@ -56,7 +56,9 @@
56
56
  "logs:view": "npm run build && node scripts/view-fuzzy-logs.js",
57
57
  "logs:analyze": "npm run build && node scripts/analyze-fuzzy-logs.js",
58
58
  "logs:clear": "npm run build && node scripts/clear-fuzzy-logs.js",
59
- "logs:export": "npm run build && node scripts/export-fuzzy-logs.js"
59
+ "logs:export": "npm run build && node scripts/export-fuzzy-logs.js",
60
+ "count-tokens": "npm run build && node scripts/count-tokens.js",
61
+ "count-tokens:json": "npm run build && node scripts/count-tokens.js --json"
60
62
  },
61
63
  "publishConfig": {
62
64
  "access": "public"
@@ -84,6 +86,10 @@
84
86
  "@modelcontextprotocol/sdk": "^1.9.0",
85
87
  "@opendocsg/pdf2md": "^0.2.2",
86
88
  "@supabase/supabase-js": "^2.89.0",
89
+ "@tiptap/core": "^3.22.3",
90
+ "@tiptap/extension-image": "^3.22.3",
91
+ "@tiptap/pm": "^3.22.3",
92
+ "@tiptap/starter-kit": "^3.22.3",
87
93
  "@vscode/ripgrep": "^1.15.9",
88
94
  "cross-fetch": "^4.1.0",
89
95
  "exceljs": "^4.4.0",
@@ -101,6 +107,7 @@
101
107
  "remark-gfm": "^4.0.1",
102
108
  "remark-parse": "^11.0.0",
103
109
  "sharp": "^0.34.5",
110
+ "tiptap-markdown": "^0.9.0",
104
111
  "unified": "^11.0.5",
105
112
  "unpdf": "^1.4.0",
106
113
  "zod": "^3.24.1",
@@ -111,9 +118,11 @@
111
118
  },
112
119
  "devDependencies": {
113
120
  "@anthropic-ai/mcpb": "^1.2.0",
121
+ "@modelcontextprotocol/ext-apps": "^1.0.1",
114
122
  "@types/node": "^20.17.24",
115
123
  "commander": "^13.1.0",
116
- "esbuild": "^0.27.3",
124
+ "esbuild": "^0.27.2",
125
+ "js-tiktoken": "^1.0.21",
117
126
  "nexe": "^5.0.0-beta.4",
118
127
  "nodemon": "^3.0.2",
119
128
  "shx": "^0.3.4",
@@ -1,123 +0,0 @@
1
- {
2
- "version": "1.0.0",
3
- "description": "Spec-Kit prompts for specification-driven development workflows",
4
- "prompts": [
5
- {
6
- "id": "spec_001",
7
- "title": "Initialize Spec-Kit Project",
8
- "description": "Set up a new project with spec-driven development workflow including templates, scripts, and AI agent integration.",
9
- "prompt": "Let's initialize a new spec-driven development project! 🎯\n\n**Project Setup Process:**\n\n1. **Check Current Environment**: I'll verify if we're already in a spec-kit project (look for `.specify` folder)\n2. **Initialize New Project**: Set up project structure with `specify init <project-name>`\n3. **Configure AI Integration**: Choose your preferred AI agent (claude, copilot, gemini, cursor, etc.)\n4. **Explain Workflow**: Show you the available slash commands and methodology\n\n**What's the name of your new project?**\n\n*Example: `my-photo-app` or `user-auth-service`*\n\nOnce initialized, you'll have access to the complete spec-driven workflow:\n• `/constitution` - Define project principles\n• `/specify` - Create feature specifications\n• `/plan` - Generate technical plans\n• `/tasks` - Break down into actionable tasks\n• `/implement` - Execute implementation\n\nReady to get started?",
10
- "categories": ["spec-kit"],
11
- "secondaryTag": "Setup",
12
- "votes": 0,
13
- "gaClicks": 0,
14
- "icon": "Rocket",
15
- "author": "GitHub Spec-Kit",
16
- "verified": true
17
- },
18
- {
19
- "id": "spec_002",
20
- "title": "Create Project Constitution",
21
- "description": "Define project principles and governance that will guide all development decisions and ensure consistency across features.",
22
- "prompt": "Let's establish your project constitution - the foundational principles that will guide all development! 📜\n\n**Constitution Creation Process:**\n\n1. **Analyze Current Context**: I'll check if you already have a constitution and understand your project\n2. **Define Core Principles**: Create non-negotiable rules for your development process\n3. **Set Governance**: Establish how principles are updated and enforced\n4. **Sync Dependencies**: Ensure all templates align with your new principles\n\n**What principles should guide your project?**\n\n*Examples:*\n• Code quality standards (testing requirements, review processes)\n• User experience consistency (accessibility-first, performance targets)\n• Technical constraints (preferred frameworks, deployment requirements)\n• Security requirements (authentication standards, data protection)\n\n**Tell me about your project's core values and constraints:**\n\nI'll create a comprehensive constitution that includes:\n• Principle definitions with clear rationale\n• Amendment procedures and versioning\n• Compliance review expectations\n• Template synchronization\n\nThis becomes the foundation for all future specifications and technical decisions!",
23
- "categories": ["spec-kit"],
24
- "secondaryTag": "Setup",
25
- "votes": 0,
26
- "gaClicks": 0,
27
- "icon": "BookOpen",
28
- "author": "GitHub Spec-Kit",
29
- "verified": true
30
- },
31
- {
32
- "id": "spec_003",
33
- "title": "Create Feature Specification",
34
- "description": "Generate a comprehensive feature specification from natural language description using spec-kit methodology and templates.",
35
- "prompt": "Let's create a detailed feature specification using the spec-kit methodology! 📋\n\n**Specification Process:**\n\n1. **Create Feature Branch**: I'll run the create-new-feature script to set up a new branch and spec file\n2. **Generate Comprehensive Spec**: Use the spec-kit template to create:\n • User scenarios and testing approaches\n • Functional requirements (testable and unambiguous)\n • Key entities and data models\n • Success criteria and acceptance criteria\n3. **Mark Clarifications**: Highlight any areas that need more detail with [NEEDS CLARIFICATION] markers\n4. **Review Checklist**: Validate completeness and business alignment\n\n**What feature do you want to build?**\n\n*Be as detailed as possible about WHAT and WHY, avoid HOW:*\n\n*Examples:*\n• \"User authentication system with login, logout, and password reset\"\n• \"Photo album management with drag-and-drop organization\"\n• \"Real-time chat with message history and user presence\"\n• \"Task management with projects, assignments, and Kanban boards\"\n\n**Feature Description:**\n\nI'll focus on:\n✅ What users need and why\n✅ Business requirements and user scenarios\n✅ Testable functional requirements\n❌ Technical implementation details (saved for planning phase)\n\nReady to create your specification?",
36
- "categories": ["spec-kit"],
37
- "secondaryTag": "Specification",
38
- "votes": 0,
39
- "gaClicks": 0,
40
- "icon": "FileText",
41
- "author": "GitHub Spec-Kit",
42
- "verified": true
43
- },
44
- {
45
- "id": "spec_004",
46
- "title": "Clarify Specification Requirements",
47
- "description": "Run structured clarification workflow to resolve ambiguous requirements and ensure specification completeness before planning.",
48
- "prompt": "Let's clarify any ambiguous areas in your specification before moving to technical planning! 🔍\n\n**Clarification Workflow:**\n\n1. **Analyze Current Spec**: I'll read your feature specification and identify areas marked with [NEEDS CLARIFICATION]\n2. **Structured Questioning**: Ask targeted questions about:\n • User types and permissions\n • Data retention and deletion policies\n • Performance targets and scale requirements\n • Error handling behaviors\n • Integration requirements\n3. **Document Answers**: Record all clarifications in the specification\n4. **Validate Completeness**: Ensure all requirements are testable and unambiguous\n\n**Current clarification areas in your spec:**\n\nI'll systematically work through each unclear aspect:\n• Who are the users and what are their roles?\n• What are the data and storage requirements?\n• What are the performance and scale expectations?\n• How should errors and edge cases be handled?\n• What integrations or external dependencies exist?\n\n**Ready to clarify your specification?**\n\n*This step is crucial for reducing rework during planning and implementation phases.*\n\nOnce clarified, your specification will be ready for technical planning with `/plan`!",
49
- "categories": ["spec-kit"],
50
- "secondaryTag": "Specification",
51
- "votes": 0,
52
- "gaClicks": 0,
53
- "icon": "HelpCircle",
54
- "author": "GitHub Spec-Kit",
55
- "verified": true
56
- },
57
- {
58
- "id": "spec_005",
59
- "title": "Generate Technical Implementation Plan",
60
- "description": "Create detailed technical plan from specification including architecture, tech stack, data models, and implementation strategy.",
61
- "prompt": "Let's create a comprehensive technical implementation plan for your feature! 🏗️\n\n**Planning Process:**\n\n1. **Analyze Specification**: I'll read your feature spec and understand all requirements\n2. **Check Constitution**: Ensure alignment with project principles and constraints\n3. **Generate Implementation Plan**: Create detailed technical plan including:\n • Architecture and tech stack decisions\n • Data models based on key entities\n • API contracts and interfaces\n • Research for technical decisions\n • Quickstart validation scenarios\n4. **Validate Against Gates**: Check simplicity, anti-abstraction, and constitutional compliance\n\n**What's your preferred technology approach?**\n\n*Specify your tech stack and architectural preferences:*\n\n*Examples:*\n• \"React with TypeScript, Node.js backend, PostgreSQL database\"\n• \"Vanilla HTML/CSS/JavaScript, SQLite for local storage\"\n• \"Python FastAPI, Redis for caching, Docker deployment\"\n• \"Vue.js frontend, .NET Core API, SQL Server database\"\n\n**Technical Context:**\n\nI'll generate:\n📋 **Implementation Plan** - Architecture and approach\n🗄️ **Data Model** - Entities and relationships\n🔌 **API Contracts** - Endpoints and specifications\n🔬 **Research Notes** - Technical decisions and rationale\n⚡ **Quickstart Guide** - Key validation scenarios\n\nReady to create your technical plan?",
62
- "categories": ["spec-kit"],
63
- "secondaryTag": "Planning",
64
- "votes": 0,
65
- "gaClicks": 0,
66
- "icon": "Blueprint",
67
- "author": "GitHub Spec-Kit",
68
- "verified": true
69
- },
70
- {
71
- "id": "spec_006",
72
- "title": "Generate Implementation Tasks",
73
- "description": "Break down technical plan into actionable, dependency-ordered tasks ready for execution with parallel execution markers.",
74
- "prompt": "Let's break down your implementation plan into actionable tasks! ✅\n\n**Task Generation Process:**\n\n1. **Analyze Design Artifacts**: I'll read your plan.md, data-model.md, contracts/, and other design documents\n2. **Generate Task Breakdown**: Create specific tasks organized by phases:\n • **Setup Tasks**: Project init, dependencies, configuration\n • **Test Tasks [P]**: Contract tests, integration scenarios (parallel)\n • **Core Tasks**: Models, services, CLI commands, endpoints\n • **Integration Tasks**: Database, middleware, logging\n • **Polish Tasks [P]**: Unit tests, performance, docs (parallel)\n3. **Order Dependencies**: Ensure proper execution sequence (TDD approach)\n4. **Mark Parallelization**: Identify tasks that can run simultaneously with [P]\n\n**Task Generation Rules:**\n• Each contract → test task marked [P]\n• Each entity → model creation task marked [P]\n• Each endpoint → implementation task\n• Different files = parallel [P]\n• Same files = sequential\n• Tests before implementation (TDD)\n\n**Additional context for task generation:**\n\n*Any specific requirements or preferences for the implementation approach?*\n\nI'll create a `tasks.md` file with:\n📝 **Numbered Tasks** (T001, T002, etc.)\n📁 **File Paths** for each task\n🔗 **Dependencies** clearly marked\n⚡ **Parallel Groups** for efficient execution\n\nReady to generate your implementation tasks?",
75
- "categories": ["spec-kit"],
76
- "secondaryTag": "Planning",
77
- "votes": 0,
78
- "gaClicks": 0,
79
- "icon": "CheckSquare",
80
- "author": "GitHub Spec-Kit",
81
- "verified": true
82
- },
83
- {
84
- "id": "spec_007",
85
- "title": "Execute Feature Implementation",
86
- "description": "Execute all implementation tasks following the task breakdown with TDD approach, dependency management, and progress tracking.",
87
- "prompt": "Let's implement your feature following the spec-driven task breakdown! 🚀\n\n**Implementation Process:**\n\n1. **Load Implementation Context**: I'll read all your design documents:\n • tasks.md (execution plan)\n • plan.md (architecture and tech stack)\n • data-model.md (entities and relationships)\n • contracts/ (API specifications)\n • research.md (technical decisions)\n\n2. **Execute Phase-by-Phase**:\n • **Setup**: Project structure, dependencies, configuration\n • **Tests**: Contract tests and integration scenarios (TDD)\n • **Core**: Models, services, CLI commands, endpoints\n • **Integration**: Database, middleware, logging\n • **Polish**: Unit tests, performance, documentation\n\n3. **Follow Execution Rules**:\n • Respect task dependencies (sequential vs parallel)\n • Tests before implementation (TDD approach)\n • File-based coordination (same file = sequential)\n • Mark completed tasks with [X]\n\n4. **Progress Tracking**: Report after each completed task with validation\n\n**Implementation preferences:**\n\n*Any specific notes for the implementation (deployment targets, testing frameworks, etc.)?*\n\nI'll execute tasks systematically:\n✅ **Validate Prerequisites** - All documents ready\n📋 **Phase-by-Phase Execution** - Setup → Tests → Core → Integration → Polish\n🔄 **Real-time Progress** - Track completion and handle errors\n🎯 **Final Validation** - Ensure specs match implementation\n\nReady to build your feature?",
88
- "categories": ["spec-kit"],
89
- "secondaryTag": "Implementation",
90
- "votes": 0,
91
- "gaClicks": 0,
92
- "icon": "Play",
93
- "author": "GitHub Spec-Kit",
94
- "verified": true
95
- },
96
- {
97
- "id": "spec_008",
98
- "title": "Analyze Spec-Kit Project Status",
99
- "description": "Comprehensive analysis of current spec-kit project state including features, phases, and recommended next steps.",
100
- "prompt": "Let me analyze your spec-kit project and show you the current state! 📊\n\n**Project Analysis Process:**\n\n1. **Project Structure Review**: I'll examine your `.specify` directory and validate:\n • Templates and scripts availability\n • Project constitution and principles\n • Current branch and feature context\n\n2. **Feature Inventory**: Scan the `specs/` directory to identify:\n • All features and their completion status\n • Current phase (specification, planning, tasks, implementation)\n • Missing or incomplete artifacts\n\n3. **Health Check**: Verify project follows spec-kit best practices:\n • All required templates present\n • Script permissions and functionality\n • Git branch structure and workflow\n\n4. **Progress Assessment**: For the current feature:\n • What phase are you in?\n • What files exist vs. what's missing?\n • What's the logical next step?\n\n**Current Project Overview:**\n\nI'll provide:\n📋 **Feature Status Matrix** - All features and their phases\n🎯 **Current Focus** - Active feature and next steps\n⚙️ **Configuration Health** - Templates and scripts status\n📈 **Recommendations** - Suggested workflow continuations\n\n**Any specific areas you'd like me to focus on?**\n\n*Examples: \"Focus on feature completion status\" or \"Check for any configuration issues\"*\n\nLet me give you a complete project status report!",
101
- "categories": ["spec-kit"],
102
- "secondaryTag": "Analysis",
103
- "votes": 0,
104
- "gaClicks": 0,
105
- "icon": "BarChart3",
106
- "author": "GitHub Spec-Kit",
107
- "verified": true
108
- },
109
- {
110
- "id": "spec_009",
111
- "title": "Validate Spec-Kit Workflow Compliance",
112
- "description": "Check project adherence to spec-kit methodology and constitutional requirements with recommendations for improvements.",
113
- "prompt": "Let's validate your project's compliance with spec-kit methodology and constitutional requirements! ✅\n\n**Compliance Validation Process:**\n\n1. **Constitutional Compliance**: I'll check if your features align with project constitution:\n • Principle adherence in specifications\n • Technical decisions follow governance\n • Implementation respects constraints\n\n2. **Methodology Validation**: Verify proper spec-kit workflow:\n • Specifications focus on WHAT/WHY (not HOW)\n • Technical plans follow from specifications\n • Tasks properly break down implementation\n • Test-driven development approach\n\n3. **Quality Assessment**: Review specification and planning quality:\n • Requirements are testable and unambiguous\n • No [NEEDS CLARIFICATION] markers remain\n • Success criteria are measurable\n • Technical decisions have clear rationale\n\n4. **Process Adherence**: Check workflow execution:\n • Proper phase progression (spec → plan → tasks → implement)\n • Branch management and version control\n • Documentation completeness\n\n**Compliance Report:**\n\nI'll generate:\n📋 **Constitutional Alignment** - Principle compliance score\n🔄 **Workflow Adherence** - Methodology following assessment\n📝 **Quality Metrics** - Specification and planning quality\n⚠️ **Issue Identification** - Areas needing attention\n🎯 **Recommendations** - Specific improvement actions\n\n**Any specific compliance areas you're concerned about?**\n\nReady for a complete compliance assessment?",
114
- "categories": ["spec-kit"],
115
- "secondaryTag": "Analysis",
116
- "votes": 0,
117
- "gaClicks": 0,
118
- "icon": "Shield",
119
- "author": "GitHub Spec-Kit",
120
- "verified": true
121
- }
122
- ]
123
- }
@@ -1,6 +0,0 @@
1
- import { ServerResult } from '../types.js';
2
- /**
3
- * Handle execute_node command
4
- * Executes Node.js code using the same Node runtime as the MCP
5
- */
6
- export declare function handleExecuteNode(args: unknown): Promise<ServerResult>;
@@ -1,73 +0,0 @@
1
- import { spawn } from 'child_process';
2
- import fs from 'fs/promises';
3
- import path from 'path';
4
- import { fileURLToPath } from 'url';
5
- import { ExecuteNodeArgsSchema } from '../tools/schemas.js';
6
- // Get the directory where the MCP is installed (for requiring packages like exceljs)
7
- const __filename = fileURLToPath(import.meta.url);
8
- const __dirname = path.dirname(__filename);
9
- const mcpRoot = path.resolve(__dirname, '..', '..');
10
- /**
11
- * Handle execute_node command
12
- * Executes Node.js code using the same Node runtime as the MCP
13
- */
14
- export async function handleExecuteNode(args) {
15
- const parsed = ExecuteNodeArgsSchema.parse(args);
16
- const { code, timeout_ms } = parsed;
17
- // Create temp file IN THE MCP DIRECTORY so ES module imports resolve correctly
18
- // (ES modules resolve packages relative to file location, not NODE_PATH or cwd)
19
- const tempFile = path.join(mcpRoot, `.mcp-exec-${Date.now()}-${Math.random().toString(36).slice(2)}.mjs`);
20
- // User code runs directly - imports will resolve from mcpRoot/node_modules
21
- const wrappedCode = code;
22
- try {
23
- await fs.writeFile(tempFile, wrappedCode, 'utf8');
24
- const result = await new Promise((resolve) => {
25
- const proc = spawn(process.execPath, [tempFile], {
26
- cwd: mcpRoot,
27
- timeout: timeout_ms
28
- });
29
- let stdout = '';
30
- let stderr = '';
31
- proc.stdout.on('data', (data) => {
32
- stdout += data.toString();
33
- });
34
- proc.stderr.on('data', (data) => {
35
- stderr += data.toString();
36
- });
37
- proc.on('close', (exitCode) => {
38
- resolve({ stdout, stderr, exitCode: exitCode ?? 1 });
39
- });
40
- proc.on('error', (err) => {
41
- resolve({ stdout, stderr: stderr + '\n' + err.message, exitCode: 1 });
42
- });
43
- });
44
- // Clean up temp file
45
- await fs.unlink(tempFile).catch(() => { });
46
- if (result.exitCode !== 0) {
47
- return {
48
- content: [{
49
- type: "text",
50
- text: `Execution failed (exit code ${result.exitCode}):\n${result.stderr}\n${result.stdout}`
51
- }],
52
- isError: true
53
- };
54
- }
55
- return {
56
- content: [{
57
- type: "text",
58
- text: result.stdout || '(no output)'
59
- }]
60
- };
61
- }
62
- catch (error) {
63
- // Clean up temp file on error
64
- await fs.unlink(tempFile).catch(() => { });
65
- return {
66
- content: [{
67
- type: "text",
68
- text: `Failed to execute Node.js code: ${error instanceof Error ? error.message : String(error)}`
69
- }],
70
- isError: true
71
- };
72
- }
73
- }
@@ -1,11 +0,0 @@
1
- import { ServerResult } from '../types.js';
2
- /**
3
- * Test tool to intentionally crash the server
4
- * Used for testing crash logging and error recovery
5
- */
6
- export declare function handleTestCrash(_args: unknown): Promise<ServerResult>;
7
- /**
8
- * Test tool to crash search specifically
9
- * Simulates ripgrep spawn error
10
- */
11
- export declare function handleTestSearchCrash(_args: unknown): Promise<ServerResult>;
@@ -1,26 +0,0 @@
1
- /**
2
- * Test tool to intentionally crash the server
3
- * Used for testing crash logging and error recovery
4
- */
5
- export async function handleTestCrash(_args) {
6
- // This will throw an uncaught exception
7
- throw new Error('🧪 TEST CRASH: Intentional uncaught exception for crash logging verification');
8
- }
9
- /**
10
- * Test tool to crash search specifically
11
- * Simulates ripgrep spawn error
12
- */
13
- export async function handleTestSearchCrash(_args) {
14
- // Import spawn to simulate a crash
15
- const { spawn } = await import('child_process');
16
- // Try to spawn a non-existent command to simulate ENOENT
17
- const child = spawn('/nonexistent/path/to/rg', ['test', '/tmp']);
18
- // This will trigger an error event on spawn failure
19
- // The error handler should catch this
20
- return {
21
- content: [{
22
- type: "text",
23
- text: "🧪 Attempted to spawn non-existent ripgrep to test crash handling"
24
- }]
25
- };
26
- }
@@ -1,45 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * HTTP Server Entry Point for Desktop Commander
4
- *
5
- * This file is used by Smithery CLI to create a Streamable HTTP server.
6
- * For local stdio usage, see src/index.ts
7
- *
8
- * This is a thin wrapper that:
9
- * 1. Applies configuration from Smithery
10
- * 2. Returns the existing MCP server for HTTP transport
11
- */
12
- interface ServerConfig {
13
- config?: {
14
- allowedDirectories?: string[];
15
- blockedCommands?: string[];
16
- defaultShell?: string;
17
- fileReadLineLimit?: number;
18
- fileWriteLineLimit?: number;
19
- telemetryEnabled?: boolean;
20
- };
21
- }
22
- export default function createServer({ config }?: ServerConfig): Promise<import("@modelcontextprotocol/sdk/server").Server<{
23
- method: string;
24
- params?: {
25
- [x: string]: unknown;
26
- _meta?: {
27
- [x: string]: unknown;
28
- progressToken?: string | number | undefined;
29
- } | undefined;
30
- } | undefined;
31
- }, {
32
- method: string;
33
- params?: {
34
- [x: string]: unknown;
35
- _meta?: {
36
- [x: string]: unknown;
37
- } | undefined;
38
- } | undefined;
39
- }, {
40
- [x: string]: unknown;
41
- _meta?: {
42
- [x: string]: unknown;
43
- } | undefined;
44
- }>>;
45
- export {};