starmux 0.12.0 → 0.13.0

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 (93) hide show
  1. package/dist/src/cli/mac-mcp-gateway.js +4 -3
  2. package/dist/src/cli/mac-mcp-gateway.js.map +1 -1
  3. package/dist/src/cli/starmux.js +1 -1
  4. package/dist/src/cli/starmux.js.map +1 -1
  5. package/dist/src/runtime-paths.js +3 -3
  6. package/dist/src/runtime-paths.js.map +1 -1
  7. package/dist/vendor/desktop-commander/LICENSE +21 -0
  8. package/dist/vendor/desktop-commander/dist/bootstrap.js +22 -0
  9. package/dist/vendor/desktop-commander/dist/command-manager.js +246 -0
  10. package/dist/vendor/desktop-commander/dist/config-field-definitions.js +37 -0
  11. package/dist/vendor/desktop-commander/dist/config-manager.js +634 -0
  12. package/dist/vendor/desktop-commander/dist/config-recovery.js +81 -0
  13. package/dist/vendor/desktop-commander/dist/config.js +19 -0
  14. package/dist/vendor/desktop-commander/dist/custom-stdio.js +358 -0
  15. package/dist/vendor/desktop-commander/dist/error-handlers.js +15 -0
  16. package/dist/vendor/desktop-commander/dist/handlers/edit-search-handlers.js +6 -0
  17. package/dist/vendor/desktop-commander/dist/handlers/filesystem-handlers.js +450 -0
  18. package/dist/vendor/desktop-commander/dist/handlers/history-handlers.js +67 -0
  19. package/dist/vendor/desktop-commander/dist/handlers/index.js +7 -0
  20. package/dist/vendor/desktop-commander/dist/handlers/process-handlers.js +15 -0
  21. package/dist/vendor/desktop-commander/dist/handlers/search-answers.js +172 -0
  22. package/dist/vendor/desktop-commander/dist/handlers/search-handlers.js +136 -0
  23. package/dist/vendor/desktop-commander/dist/handlers/terminal-handlers.js +35 -0
  24. package/dist/vendor/desktop-commander/dist/index.js +88 -0
  25. package/dist/vendor/desktop-commander/dist/search-manager.js +1262 -0
  26. package/dist/vendor/desktop-commander/dist/server.js +1414 -0
  27. package/dist/vendor/desktop-commander/dist/terminal-manager.js +757 -0
  28. package/dist/vendor/desktop-commander/dist/tools/config.js +211 -0
  29. package/dist/vendor/desktop-commander/dist/tools/edit.js +455 -0
  30. package/dist/vendor/desktop-commander/dist/tools/feedback.js +10 -0
  31. package/dist/vendor/desktop-commander/dist/tools/filesystem.js +1047 -0
  32. package/dist/vendor/desktop-commander/dist/tools/fuzzySearch.js +74 -0
  33. package/dist/vendor/desktop-commander/dist/tools/fuzzySearchCore.js +125 -0
  34. package/dist/vendor/desktop-commander/dist/tools/improved-process-tools.js +726 -0
  35. package/dist/vendor/desktop-commander/dist/tools/mime-types.js +28 -0
  36. package/dist/vendor/desktop-commander/dist/tools/pdf/extract-images.js +131 -0
  37. package/dist/vendor/desktop-commander/dist/tools/pdf/index.js +4 -0
  38. package/dist/vendor/desktop-commander/dist/tools/pdf/lib/pdf2md.js +78 -0
  39. package/dist/vendor/desktop-commander/dist/tools/pdf/manipulations.js +112 -0
  40. package/dist/vendor/desktop-commander/dist/tools/pdf/markdown.js +30 -0
  41. package/dist/vendor/desktop-commander/dist/tools/pdf/utils.js +45 -0
  42. package/dist/vendor/desktop-commander/dist/tools/process.js +90 -0
  43. package/dist/vendor/desktop-commander/dist/tools/prompts.js +259 -0
  44. package/dist/vendor/desktop-commander/dist/tools/schemas.js +242 -0
  45. package/dist/vendor/desktop-commander/dist/tools/usage.js +24 -0
  46. package/dist/vendor/desktop-commander/dist/types.js +1 -0
  47. package/dist/vendor/desktop-commander/dist/ui/config-editor/config-editor-runtime.js +150 -0
  48. package/dist/vendor/desktop-commander/dist/ui/config-editor/index.html +13 -0
  49. package/dist/vendor/desktop-commander/dist/ui/config-editor/styles.css +587 -0
  50. package/dist/vendor/desktop-commander/dist/ui/contracts.js +57 -0
  51. package/dist/vendor/desktop-commander/dist/ui/file-preview/index.html +16 -0
  52. package/dist/vendor/desktop-commander/dist/ui/file-preview/preview-runtime.js +471 -0
  53. package/dist/vendor/desktop-commander/dist/ui/file-preview/shared/preview-file-types.js +59 -0
  54. package/dist/vendor/desktop-commander/dist/ui/file-preview/styles.css +1631 -0
  55. package/dist/vendor/desktop-commander/dist/ui/resources.js +93 -0
  56. package/dist/vendor/desktop-commander/dist/utils/ab-test.js +122 -0
  57. package/dist/vendor/desktop-commander/dist/utils/atomic-write.js +80 -0
  58. package/dist/vendor/desktop-commander/dist/utils/capture.js +40 -0
  59. package/dist/vendor/desktop-commander/dist/utils/dockerPrompt.js +9 -0
  60. package/dist/vendor/desktop-commander/dist/utils/exit-process.js +31 -0
  61. package/dist/vendor/desktop-commander/dist/utils/feature-flags.js +18 -0
  62. package/dist/vendor/desktop-commander/dist/utils/files/base.js +5 -0
  63. package/dist/vendor/desktop-commander/dist/utils/files/binary.js +65 -0
  64. package/dist/vendor/desktop-commander/dist/utils/files/docx.js +694 -0
  65. package/dist/vendor/desktop-commander/dist/utils/files/excel.js +497 -0
  66. package/dist/vendor/desktop-commander/dist/utils/files/factory.js +168 -0
  67. package/dist/vendor/desktop-commander/dist/utils/files/image.js +89 -0
  68. package/dist/vendor/desktop-commander/dist/utils/files/index.js +14 -0
  69. package/dist/vendor/desktop-commander/dist/utils/files/pdf.js +124 -0
  70. package/dist/vendor/desktop-commander/dist/utils/files/text.js +423 -0
  71. package/dist/vendor/desktop-commander/dist/utils/fuzzySearchLogger.js +126 -0
  72. package/dist/vendor/desktop-commander/dist/utils/internal-facts.js +23 -0
  73. package/dist/vendor/desktop-commander/dist/utils/lazy-package.js +44 -0
  74. package/dist/vendor/desktop-commander/dist/utils/lineEndingHandler.js +77 -0
  75. package/dist/vendor/desktop-commander/dist/utils/logger.js +72 -0
  76. package/dist/vendor/desktop-commander/dist/utils/mcp-ui-ab-test.js +62 -0
  77. package/dist/vendor/desktop-commander/dist/utils/open-browser.js +2 -0
  78. package/dist/vendor/desktop-commander/dist/utils/process-detection.js +260 -0
  79. package/dist/vendor/desktop-commander/dist/utils/process-tree.js +223 -0
  80. package/dist/vendor/desktop-commander/dist/utils/rename.js +74 -0
  81. package/dist/vendor/desktop-commander/dist/utils/ripgrep-resolver.js +69 -0
  82. package/dist/vendor/desktop-commander/dist/utils/shell.js +187 -0
  83. package/dist/vendor/desktop-commander/dist/utils/system-info.js +727 -0
  84. package/dist/vendor/desktop-commander/dist/utils/terminal-timestamps.js +18 -0
  85. package/dist/vendor/desktop-commander/dist/utils/toolHistory.js +309 -0
  86. package/dist/vendor/desktop-commander/dist/utils/trackTools.js +55 -0
  87. package/dist/vendor/desktop-commander/dist/utils/unsupportedParams.js +66 -0
  88. package/dist/vendor/desktop-commander/dist/utils/usageTracker.js +225 -0
  89. package/dist/vendor/desktop-commander/dist/utils/welcome-onboarding.js +2 -0
  90. package/dist/vendor/desktop-commander/dist/utils/withTimeout.js +85 -0
  91. package/dist/vendor/desktop-commander/dist/version.js +1 -0
  92. package/dist/vendor/desktop-commander/package.json +15 -0
  93. package/package.json +14 -2
@@ -0,0 +1,85 @@
1
+ /**
2
+ * Executes a promise with a timeout. If the promise doesn't resolve or reject within
3
+ * the specified timeout, returns the provided default value.
4
+ *
5
+ * @param operation The promise to execute
6
+ * @param timeoutMs Timeout in milliseconds
7
+ * @param operationName Name of the operation (for logs)
8
+ * @param defaultValue Value to return if the operation times out
9
+ * @returns Promise that resolves with the operation result or the default value on timeout
10
+ */
11
+ export function withTimeout(operation, timeoutMs, operationName, defaultValue) {
12
+ // Don't sanitize operation name for logs - only telemetry will sanitize if needed
13
+ return new Promise((resolve, reject) => {
14
+ let isCompleted = false;
15
+ // Set up timeout
16
+ const timeoutId = setTimeout(() => {
17
+ if (!isCompleted) {
18
+ isCompleted = true;
19
+ if (defaultValue !== null) {
20
+ resolve(defaultValue);
21
+ }
22
+ else {
23
+ // Keep the original operation name in the error message
24
+ // Telemetry sanitization happens at the capture level
25
+ reject(`__ERROR__: ${operationName} timed out after ${timeoutMs / 1000} seconds`);
26
+ }
27
+ }
28
+ }, timeoutMs);
29
+ // Execute the operation
30
+ operation
31
+ .then(result => {
32
+ if (!isCompleted) {
33
+ isCompleted = true;
34
+ clearTimeout(timeoutId);
35
+ resolve(result);
36
+ }
37
+ })
38
+ .catch(error => {
39
+ if (!isCompleted) {
40
+ isCompleted = true;
41
+ clearTimeout(timeoutId);
42
+ if (defaultValue !== null) {
43
+ resolve(defaultValue);
44
+ }
45
+ else {
46
+ // Pass the original error unchanged - sanitization for telemetry happens in capture
47
+ reject(error);
48
+ }
49
+ }
50
+ });
51
+ });
52
+ }
53
+ /**
54
+ * Run an operation under a timeout WITH real cancellation.
55
+ *
56
+ * Unlike withTimeout (which only races a timer and leaves the underlying work
57
+ * running — holding its libuv thread/fd until the OS call returns), this passes
58
+ * an AbortSignal into the operation and aborts it when the timeout fires, so a
59
+ * read/stream that honors the signal is cancelled and its resources released.
60
+ *
61
+ * Rejects with an Error whose `.code` is 'ETIMEDOUT' on timeout (so existing
62
+ * ETIMEDOUT handling / permission-error mapping keeps working).
63
+ *
64
+ * Caveat: an operation wedged inside a single un-interruptible syscall only
65
+ * observes the abort once that syscall returns; library reads that ignore the
66
+ * signal (e.g. Excel/PDF parsers) still get the timeout rejection but keep
67
+ * running in the background until they finish on their own.
68
+ */
69
+ export function runWithAbortableTimeout(operation, timeoutMs, operationName) {
70
+ const controller = new AbortController();
71
+ let timeoutId;
72
+ const timeout = new Promise((_, reject) => {
73
+ timeoutId = setTimeout(() => {
74
+ controller.abort();
75
+ const error = new Error(`${operationName} timed out after ${timeoutMs / 1000} seconds`);
76
+ error.code = 'ETIMEDOUT';
77
+ reject(error);
78
+ }, timeoutMs);
79
+ });
80
+ const op = operation(controller.signal);
81
+ // Swallow the late abort rejection so it can't surface as an unhandled
82
+ // rejection after the timeout has already settled the race.
83
+ op.catch(() => { });
84
+ return Promise.race([op, timeout]).finally(() => clearTimeout(timeoutId));
85
+ }
@@ -0,0 +1 @@
1
+ export const VERSION = '0.3.1';
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@wonderwhy-er/desktop-commander",
3
+ "version": "0.3.1",
4
+ "description": "Purified zero-telemetry build of Desktop Commander MCP for Starmux",
5
+ "license": "MIT",
6
+ "author": "Eduards Ruzga",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/wonderwhy-er/DesktopCommanderMCP.git"
10
+ },
11
+ "type": "module",
12
+ "bin": {
13
+ "desktop-commander": "dist/index.js"
14
+ }
15
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "starmux",
3
- "version": "0.12.0",
3
+ "version": "0.13.0",
4
4
  "description": "Connect AI clients to files, terminals and development tools on your own computer.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -28,22 +28,34 @@
28
28
  "build:test": "npm run build",
29
29
  "prepare": "node scripts/prepare.mjs",
30
30
  "prepack": "npm run build",
31
+ "sync:upstream": "npm install --save-dev --save-exact @wonderwhy-er/desktop-commander@latest --ignore-scripts && npm run build",
31
32
  "test:oauth:keycloak": "npm run build && node --test dist/test/keycloak.integration.js"
32
33
  },
33
34
  "dependencies": {
34
35
  "@modelcontextprotocol/sdk": "1.32.1",
35
- "@wonderwhy-er/desktop-commander": "0.3.0",
36
+ "@opendocsg/pdf2md": "0.3.4",
37
+ "@vscode/ripgrep": "1.18.0",
38
+ "exceljs": "4.4.0",
39
+ "fastest-levenshtein": "1.0.16",
40
+ "isbinaryfile": "5.0.7",
36
41
  "jose": "6.2.12",
37
42
  "jsonc-parser": "3.3.1",
43
+ "pdf-lib": "1.17.1",
44
+ "pizzip": "3.3.0",
45
+ "proper-lockfile": "4.1.2",
46
+ "sharp": "0.35.5",
47
+ "unpdf": "1.8.0",
38
48
  "zod": "3.25.76",
39
49
  "zod-to-json-schema": "3.25.2"
40
50
  },
41
51
  "devDependencies": {
42
52
  "@types/node": "22.20.5",
53
+ "@wonderwhy-er/desktop-commander": "0.3.1",
43
54
  "typescript": "5.9.3"
44
55
  },
45
56
  "files": [
46
57
  "dist/src",
58
+ "dist/vendor",
47
59
  "src/dc-workspace-http.mjs",
48
60
  "scripts/prepare.mjs",
49
61
  "test/fixtures/p1-fixture.txt",