@wonderwhy-er/desktop-commander 0.2.52 → 0.3.1-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +20 -20
- package/README.md +1152 -1152
- package/dist/bootstrap.js +0 -0
- package/dist/command-manager.d.ts +7 -2
- package/dist/command-manager.js +16 -11
- package/dist/config-field-definitions.js +0 -0
- package/dist/config-manager.d.ts +55 -3
- package/dist/config-manager.js +329 -87
- package/dist/config-recovery.d.ts +28 -0
- package/dist/config-recovery.js +81 -0
- package/dist/config.d.ts +1 -0
- package/dist/config.js +9 -0
- package/dist/custom-stdio.js +0 -0
- package/dist/data/onboarding-prompts.json +70 -70
- package/dist/error-handlers.js +0 -0
- package/dist/handlers/filesystem-handlers.d.ts +1 -1
- package/dist/handlers/filesystem-handlers.js +28 -18
- package/dist/handlers/search-answers.d.ts +58 -0
- package/dist/handlers/search-answers.js +172 -0
- package/dist/handlers/search-handlers.js +4 -92
- package/dist/index.js +14 -7
- package/dist/npm-scripts/remote.js +36 -22
- package/dist/remote-device/desktop-commander-integration.js +19 -25
- package/dist/remote-device/device.d.ts +14 -0
- package/dist/remote-device/device.js +137 -30
- package/dist/remote-device/diagnostics/device-log.d.ts +63 -0
- package/dist/remote-device/diagnostics/device-log.js +219 -0
- package/dist/remote-device/diagnostics/redact.d.ts +1 -0
- package/dist/remote-device/diagnostics/redact.js +76 -0
- package/dist/remote-device/diagnostics/report.d.ts +118 -0
- package/dist/remote-device/diagnostics/report.js +748 -0
- package/dist/remote-device/diagnostics/upload.d.ts +11 -0
- package/dist/remote-device/diagnostics/upload.js +59 -0
- package/dist/remote-device/remote-channel.d.ts +12 -0
- package/dist/remote-device/remote-channel.js +55 -8
- package/dist/remote-device/scripts/blocking-offline-update.js +133 -96
- package/dist/remote-device/transport-telemetry.d.ts +32 -0
- package/dist/remote-device/transport-telemetry.js +48 -0
- package/dist/search-manager.d.ts +239 -27
- package/dist/search-manager.js +746 -312
- package/dist/server.js +654 -621
- package/dist/setup-claude-server.js +942 -942
- package/dist/terminal-manager.d.ts +138 -21
- package/dist/terminal-manager.js +300 -215
- package/dist/tools/config.d.ts +1 -1
- package/dist/tools/config.js +21 -70
- package/dist/tools/edit.js +14 -6
- package/dist/tools/filesystem.d.ts +30 -6
- package/dist/tools/filesystem.js +246 -140
- package/dist/tools/fuzzySearch.js +9 -9
- package/dist/tools/improved-process-tools.d.ts +9 -3
- package/dist/tools/improved-process-tools.js +181 -78
- package/dist/tools/pdf/extract-images.d.ts +2 -0
- package/dist/tools/pdf/extract-images.js +4 -1
- package/dist/tools/pdf/index.d.ts +5 -3
- package/dist/tools/pdf/index.js +4 -3
- package/dist/tools/pdf/lib/pdf2md.d.ts +8 -1
- package/dist/tools/pdf/lib/pdf2md.js +12 -5
- package/dist/tools/pdf/manipulations.d.ts +12 -1
- package/dist/tools/pdf/manipulations.js +17 -4
- package/dist/tools/pdf/markdown.d.ts +96 -0
- package/dist/tools/pdf/markdown.js +485 -20
- package/dist/tools/pdf/utils.d.ts +2 -2
- package/dist/tools/pdf/utils.js +4 -4
- package/dist/tools/process.js +8 -5
- package/dist/tools/prompts.js +1 -1
- package/dist/tools/schemas.d.ts +1 -1
- package/dist/tools/schemas.js +15 -6
- package/dist/track-installation.js +387 -387
- package/dist/types.d.ts +1 -1
- package/dist/types.js +0 -0
- package/dist/ui/config-editor/config-editor-runtime.js +6 -6
- package/dist/ui/config-editor/index.html +13 -13
- package/dist/ui/config-editor/src/app.js +32 -45
- package/dist/ui/config-editor/src/array-modal.js +32 -32
- package/dist/ui/config-editor/styles.css +586 -586
- package/dist/ui/file-preview/index.html +16 -16
- package/dist/ui/file-preview/src/app.js +8 -8
- package/dist/ui/file-preview/src/document-layout.js +31 -31
- package/dist/ui/file-preview/src/document-outline.js +8 -8
- package/dist/ui/file-preview/src/markdown/conflict-dialog.js +33 -33
- package/dist/ui/file-preview/src/markdown/controller.js +9 -9
- package/dist/ui/file-preview/src/markdown/editor.js +31 -31
- package/dist/ui/file-preview/styles.css +1630 -1630
- package/dist/uninstall-claude-server.js +745 -745
- package/dist/utils/ab-test.js +27 -9
- package/dist/utils/atomic-write.d.ts +14 -0
- package/dist/utils/atomic-write.js +80 -0
- package/dist/utils/capture.d.ts +17 -1
- package/dist/utils/capture.js +177 -68
- package/dist/utils/exit-process.d.ts +24 -0
- package/dist/utils/exit-process.js +31 -0
- package/dist/utils/feature-flags.js +2 -1
- package/dist/utils/files/base.d.ts +3 -1
- package/dist/utils/files/binary.js +4 -4
- package/dist/utils/files/docx.d.ts +3 -0
- package/dist/utils/files/docx.js +24 -9
- package/dist/utils/files/excel.d.ts +10 -0
- package/dist/utils/files/excel.js +96 -36
- package/dist/utils/files/factory.d.ts +22 -1
- package/dist/utils/files/factory.js +59 -4
- package/dist/utils/files/image.d.ts +12 -4
- package/dist/utils/files/image.js +19 -8
- package/dist/utils/files/index.d.ts +5 -3
- package/dist/utils/files/index.js +4 -3
- package/dist/utils/files/pdf.js +18 -36
- package/dist/utils/files/text.d.ts +21 -5
- package/dist/utils/files/text.js +90 -86
- package/dist/utils/internal-facts.d.ts +3 -0
- package/dist/utils/internal-facts.js +23 -0
- package/dist/utils/lazy-package.d.ts +23 -0
- package/dist/utils/lazy-package.js +42 -0
- package/dist/utils/open-browser.js +2 -1
- package/dist/utils/process-detection.d.ts +24 -5
- package/dist/utils/process-detection.js +199 -89
- package/dist/utils/process-tree.d.ts +14 -0
- package/dist/utils/process-tree.js +223 -0
- package/dist/utils/rename.d.ts +9 -0
- package/dist/utils/rename.js +74 -0
- package/dist/utils/ripgrep-resolver.js +9 -14
- package/dist/utils/shell.d.ts +42 -0
- package/dist/utils/shell.js +187 -0
- package/dist/utils/system-info.js +99 -97
- package/dist/utils/trackTools.js +2 -1
- package/dist/utils/usageTracker.js +49 -49
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/node_modules/@desktop-commander/telemetry-contract/README.md +56 -0
- package/node_modules/@desktop-commander/telemetry-contract/package.json +32 -0
- package/node_modules/@desktop-commander/telemetry-contract/transport.d.ts +38 -0
- package/node_modules/@desktop-commander/telemetry-contract/transport.js +164 -0
- package/package.json +10 -3
- package/vendor/telemetry-contract/README.md +56 -0
- package/vendor/telemetry-contract/package.json +32 -0
- package/vendor/telemetry-contract/transport.d.ts +38 -0
- package/vendor/telemetry-contract/transport.js +164 -0
- package/vendor/telemetry-contract/transport.test.js +39 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
-
<title>Desktop Commander Config Editor</title>
|
|
7
|
-
<link rel="stylesheet" href="./styles.css" />
|
|
8
|
-
</head>
|
|
9
|
-
<body>
|
|
10
|
-
<div id="app"></div>
|
|
11
|
-
<script src="./config-editor-runtime.js"></script>
|
|
12
|
-
</body>
|
|
13
|
-
</html>
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
+
<title>Desktop Commander Config Editor</title>
|
|
7
|
+
<link rel="stylesheet" href="./styles.css" />
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<div id="app"></div>
|
|
11
|
+
<script src="./config-editor-runtime.js"></script>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|
|
@@ -241,25 +241,12 @@ function getSettingSummary(entry) {
|
|
|
241
241
|
}
|
|
242
242
|
return `${count} folder${count === 1 ? '' : 's'} allowed`;
|
|
243
243
|
}
|
|
244
|
+
// Shell options come only from the server (uiHints.availableShells, detected in src/utils/shell.ts).
|
|
244
245
|
function getShellOptions(payload, currentShell) {
|
|
245
246
|
const hintedShells = Array.isArray(payload?.uiHints?.availableShells)
|
|
246
247
|
? payload.uiHints.availableShells.filter((shell) => typeof shell === 'string' && shell.trim().length > 0)
|
|
247
248
|
: [];
|
|
248
|
-
const
|
|
249
|
-
const systemInfo = isObjectRecord(config?.systemInfo) ? config.systemInfo : null;
|
|
250
|
-
const isWindows = Boolean(systemInfo && systemInfo.isWindows === true);
|
|
251
|
-
const isMacOS = Boolean(systemInfo && systemInfo.isMacOS === true);
|
|
252
|
-
const baseOptions = hintedShells.length > 0
|
|
253
|
-
? hintedShells
|
|
254
|
-
: isWindows
|
|
255
|
-
? ['powershell.exe', 'pwsh.exe', 'cmd.exe', 'bash.exe']
|
|
256
|
-
: isMacOS
|
|
257
|
-
? ['/bin/zsh', '/bin/bash', '/bin/sh', '/usr/bin/fish', 'zsh', 'bash', 'sh', 'fish']
|
|
258
|
-
: ['/bin/bash', '/bin/sh', '/usr/bin/fish', '/bin/zsh', 'bash', 'sh', 'fish', 'zsh'];
|
|
259
|
-
const options = new Set();
|
|
260
|
-
for (const shell of baseOptions) {
|
|
261
|
-
options.add(shell);
|
|
262
|
-
}
|
|
249
|
+
const options = new Set(hintedShells);
|
|
263
250
|
if (currentShell.trim().length > 0) {
|
|
264
251
|
options.add(currentShell);
|
|
265
252
|
}
|
|
@@ -444,14 +431,14 @@ function render(container, controller, chrome, hooks = {}) {
|
|
|
444
431
|
const options = shellOptions
|
|
445
432
|
.map((shell) => `<option value="${escapeHtml(shell)}" ${shell === currentShell ? 'selected' : ''}>${escapeHtml(shell)}</option>`)
|
|
446
433
|
.join('');
|
|
447
|
-
controlHtml = `
|
|
448
|
-
<div class="setting-shell-control">
|
|
449
|
-
<select class="setting-inline-select" data-action="shell-select" data-key-index="${index}">
|
|
450
|
-
${options}
|
|
451
|
-
<option value="__custom__" ${isCustomShell ? 'selected' : ''}>Custom...</option>
|
|
452
|
-
</select>
|
|
453
|
-
<input class="setting-inline-input setting-shell-custom${isCustomShell ? '' : ' hidden'}" data-action="shell-custom" data-key-index="${index}" type="text" value="${escapeHtml(currentShell)}" placeholder="Type custom shell path"/>
|
|
454
|
-
</div>
|
|
434
|
+
controlHtml = `
|
|
435
|
+
<div class="setting-shell-control">
|
|
436
|
+
<select class="setting-inline-select" data-action="shell-select" data-key-index="${index}">
|
|
437
|
+
${options}
|
|
438
|
+
<option value="__custom__" ${isCustomShell ? 'selected' : ''}>Custom...</option>
|
|
439
|
+
</select>
|
|
440
|
+
<input class="setting-inline-input setting-shell-custom${isCustomShell ? '' : ' hidden'}" data-action="shell-custom" data-key-index="${index}" type="text" value="${escapeHtml(currentShell)}" placeholder="Type custom shell path"/>
|
|
441
|
+
</div>
|
|
455
442
|
`;
|
|
456
443
|
}
|
|
457
444
|
else if (entry.valueType === 'boolean') {
|
|
@@ -470,30 +457,30 @@ function render(container, controller, chrome, hooks = {}) {
|
|
|
470
457
|
else {
|
|
471
458
|
controlHtml = `<input class="setting-inline-input" data-action="edit-string" data-key-index="${index}" type="text" value="${escapeHtml(String(entry.value ?? ''))}"/>`;
|
|
472
459
|
}
|
|
473
|
-
return `
|
|
474
|
-
<section class="setting-row">
|
|
475
|
-
<div class="setting-info">
|
|
476
|
-
<h3>${escapeHtml(keyTitle)}</h3>
|
|
477
|
-
${description ? `<p>${escapeHtml(description)}</p>` : ''}
|
|
478
|
-
<p class="setting-summary${summary ? '' : ' hidden'}" data-setting-summary-key="${escapeHtml(entry.key)}">${summary ? escapeHtml(summary) : ''}</p>
|
|
479
|
-
</div>
|
|
480
|
-
<div class="setting-control">${controlHtml}</div>
|
|
481
|
-
</section>
|
|
460
|
+
return `
|
|
461
|
+
<section class="setting-row">
|
|
462
|
+
<div class="setting-info">
|
|
463
|
+
<h3>${escapeHtml(keyTitle)}</h3>
|
|
464
|
+
${description ? `<p>${escapeHtml(description)}</p>` : ''}
|
|
465
|
+
<p class="setting-summary${summary ? '' : ' hidden'}" data-setting-summary-key="${escapeHtml(entry.key)}">${summary ? escapeHtml(summary) : ''}</p>
|
|
466
|
+
</div>
|
|
467
|
+
<div class="setting-control">${controlHtml}</div>
|
|
468
|
+
</section>
|
|
482
469
|
`;
|
|
483
470
|
}).join('');
|
|
484
|
-
container.innerHTML = `
|
|
485
|
-
<main id="tool-shell" class="${shellClasses}">
|
|
486
|
-
${renderCompactRow({ id: 'compact-toggle', label: 'View config', filename: 'Desktop Commander', variant: 'ready', expandable: true, expanded: chrome.expanded, interactive: true })}
|
|
487
|
-
|
|
488
|
-
<section class="panel config-card">
|
|
489
|
-
<div class="panel-content-wrapper">
|
|
490
|
-
<div class="settings-stack" aria-label="Desktop Commander settings">${settingsHtml}</div>
|
|
491
|
-
</div>
|
|
492
|
-
</section>
|
|
493
|
-
|
|
494
|
-
${renderArrayModalMarkup('List Setting')}
|
|
495
|
-
</main>
|
|
496
|
-
<div id="config-tooltip" class="config-tooltip" role="status" aria-live="polite" hidden></div>
|
|
471
|
+
container.innerHTML = `
|
|
472
|
+
<main id="tool-shell" class="${shellClasses}">
|
|
473
|
+
${renderCompactRow({ id: 'compact-toggle', label: 'View config', filename: 'Desktop Commander', variant: 'ready', expandable: true, expanded: chrome.expanded, interactive: true })}
|
|
474
|
+
|
|
475
|
+
<section class="panel config-card">
|
|
476
|
+
<div class="panel-content-wrapper">
|
|
477
|
+
<div class="settings-stack" aria-label="Desktop Commander settings">${settingsHtml}</div>
|
|
478
|
+
</div>
|
|
479
|
+
</section>
|
|
480
|
+
|
|
481
|
+
${renderArrayModalMarkup('List Setting')}
|
|
482
|
+
</main>
|
|
483
|
+
<div id="config-tooltip" class="config-tooltip" role="status" aria-live="polite" hidden></div>
|
|
497
484
|
`;
|
|
498
485
|
const toolShell = container.querySelector('#tool-shell');
|
|
499
486
|
const compactRow = container.querySelector('.compact-row--ready');
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { escapeHtml } from '../../shared/escape-html.js';
|
|
2
2
|
export function renderArrayModalMarkup(initialTitle) {
|
|
3
|
-
return `
|
|
4
|
-
<div class="array-modal" id="array-modal" hidden>
|
|
5
|
-
<div class="array-modal-card">
|
|
6
|
-
<header>
|
|
7
|
-
<h3 id="array-modal-title">${escapeHtml(initialTitle)}</h3>
|
|
8
|
-
<div class="array-modal-actions">
|
|
9
|
-
<button type="button" id="array-modal-save" aria-label="Save list changes">
|
|
10
|
-
<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M5 13l4 4L19 7"></path></svg>
|
|
11
|
-
</button>
|
|
12
|
-
<button type="button" id="array-modal-close" aria-label="Close list editor">
|
|
13
|
-
<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M7 7l10 10M17 7L7 17"></path></svg>
|
|
14
|
-
</button>
|
|
15
|
-
</div>
|
|
16
|
-
</header>
|
|
17
|
-
<p class="array-modal-description" id="array-modal-description"></p>
|
|
18
|
-
<p class="array-modal-hint">Type an item, then press Enter (or click away) to add it. A new empty row appears automatically.</p>
|
|
19
|
-
<p class="array-modal-error hidden" id="array-modal-error" role="status" aria-live="polite"></p>
|
|
20
|
-
<div class="array-modal-list" id="array-modal-list"></div>
|
|
21
|
-
</div>
|
|
22
|
-
</div>
|
|
3
|
+
return `
|
|
4
|
+
<div class="array-modal" id="array-modal" hidden>
|
|
5
|
+
<div class="array-modal-card">
|
|
6
|
+
<header>
|
|
7
|
+
<h3 id="array-modal-title">${escapeHtml(initialTitle)}</h3>
|
|
8
|
+
<div class="array-modal-actions">
|
|
9
|
+
<button type="button" id="array-modal-save" aria-label="Save list changes">
|
|
10
|
+
<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M5 13l4 4L19 7"></path></svg>
|
|
11
|
+
</button>
|
|
12
|
+
<button type="button" id="array-modal-close" aria-label="Close list editor">
|
|
13
|
+
<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M7 7l10 10M17 7L7 17"></path></svg>
|
|
14
|
+
</button>
|
|
15
|
+
</div>
|
|
16
|
+
</header>
|
|
17
|
+
<p class="array-modal-description" id="array-modal-description"></p>
|
|
18
|
+
<p class="array-modal-hint">Type an item, then press Enter (or click away) to add it. A new empty row appears automatically.</p>
|
|
19
|
+
<p class="array-modal-error hidden" id="array-modal-error" role="status" aria-live="polite"></p>
|
|
20
|
+
<div class="array-modal-list" id="array-modal-list"></div>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
23
|
`;
|
|
24
24
|
}
|
|
25
25
|
export function createArrayModalController(options) {
|
|
@@ -65,18 +65,18 @@ export function createArrayModalController(options) {
|
|
|
65
65
|
if (!modalList) {
|
|
66
66
|
return;
|
|
67
67
|
}
|
|
68
|
-
modalList.innerHTML = `
|
|
69
|
-
<div class="array-modal-row array-modal-row--new">
|
|
70
|
-
<input id="array-modal-new-item" type="text" placeholder="Add item" aria-label="Add new item" />
|
|
71
|
-
</div>
|
|
72
|
-
${modalItems.map((item, index) => `
|
|
73
|
-
<div class="array-modal-row" data-modal-index="${index}">
|
|
74
|
-
<input class="array-modal-item-input" type="text" value="${escapeHtml(item)}" aria-label="Item ${index + 1}" />
|
|
75
|
-
<button type="button" class="array-modal-item-remove" aria-label="Remove item ${index + 1}">
|
|
76
|
-
<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M3 6h18M8 6V4h8v2M6 6l1 14h10l1-14M10 10v7M14 10v7"></path></svg>
|
|
77
|
-
</button>
|
|
78
|
-
</div>
|
|
79
|
-
`).join('')}
|
|
68
|
+
modalList.innerHTML = `
|
|
69
|
+
<div class="array-modal-row array-modal-row--new">
|
|
70
|
+
<input id="array-modal-new-item" type="text" placeholder="Add item" aria-label="Add new item" />
|
|
71
|
+
</div>
|
|
72
|
+
${modalItems.map((item, index) => `
|
|
73
|
+
<div class="array-modal-row" data-modal-index="${index}">
|
|
74
|
+
<input class="array-modal-item-input" type="text" value="${escapeHtml(item)}" aria-label="Item ${index + 1}" />
|
|
75
|
+
<button type="button" class="array-modal-item-remove" aria-label="Remove item ${index + 1}">
|
|
76
|
+
<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M3 6h18M8 6V4h8v2M6 6l1 14h10l1-14M10 10v7M14 10v7"></path></svg>
|
|
77
|
+
</button>
|
|
78
|
+
</div>
|
|
79
|
+
`).join('')}
|
|
80
80
|
`;
|
|
81
81
|
const addModalItem = (value) => {
|
|
82
82
|
const normalized = value.trim();
|