@wonderwhy-er/desktop-commander 0.2.52 → 0.3.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.
- package/dist/command-manager.d.ts +7 -2
- package/dist/command-manager.js +16 -11
- 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/handlers/filesystem-handlers.d.ts +1 -1
- package/dist/handlers/filesystem-handlers.js +26 -16
- 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 +17 -3
- package/dist/remote-device/desktop-commander-integration.d.ts +1 -0
- 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/realtime-health-telemetry.d.ts +35 -0
- package/dist/remote-device/realtime-health-telemetry.js +110 -0
- package/dist/remote-device/remote-channel.d.ts +36 -4
- package/dist/remote-device/remote-channel.js +230 -50
- package/dist/remote-device/scripts/blocking-offline-update.js +108 -69
- 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 +124 -222
- 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 +12 -4
- package/dist/tools/filesystem.d.ts +30 -6
- package/dist/tools/filesystem.js +246 -140
- package/dist/tools/improved-process-tools.d.ts +9 -3
- package/dist/tools/improved-process-tools.js +171 -68
- 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/schemas.d.ts +1 -11
- package/dist/tools/schemas.js +15 -14
- package/dist/types.d.ts +1 -1
- package/dist/ui/config-editor/config-editor-runtime.js +53 -53
- package/dist/ui/config-editor/src/app.js +2 -15
- package/dist/ui/file-preview/preview-runtime.js +190 -182
- 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/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 +93 -33
- 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 +25 -0
- package/dist/utils/lazy-package.js +44 -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.d.ts +1 -0
- package/dist/utils/system-info.js +40 -25
- package/dist/utils/trackTools.js +2 -1
- package/dist/utils/usageTracker.d.ts +0 -39
- package/dist/utils/usageTracker.js +1 -161
- 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 +32 -16
- 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
package/dist/tools/schemas.js
CHANGED
|
@@ -41,7 +41,10 @@ export const ForceTerminateArgsSchema = z.object({
|
|
|
41
41
|
});
|
|
42
42
|
export const ListSessionsArgsSchema = z.object({});
|
|
43
43
|
export const KillProcessArgsSchema = z.object({
|
|
44
|
-
|
|
44
|
+
// process.kill reads 0 and negative PIDs as process groups: 0 is the server's
|
|
45
|
+
// own (on Windows the server itself), -1 every process the user may signal.
|
|
46
|
+
// A refinement rather than .positive(), so the published schema is unchanged.
|
|
47
|
+
pid: z.number().refine((pid) => pid > 0, { message: 'Number must be greater than 0' }),
|
|
45
48
|
});
|
|
46
49
|
// Filesystem tools schemas
|
|
47
50
|
export const ReadFileArgsSchema = z.object({
|
|
@@ -161,6 +164,12 @@ export const GiveFeedbackArgsSchema = z.object({
|
|
|
161
164
|
// - platform (auto)
|
|
162
165
|
// - client_id (auto)
|
|
163
166
|
});
|
|
167
|
+
/** A whole number (at least `min`, if given), rejected with a message that says so */
|
|
168
|
+
function wholeNumber(name, min) {
|
|
169
|
+
const message = `${name} must be a whole number${min === undefined ? '' : ` of at least ${min}`}`;
|
|
170
|
+
const number = z.number().int({ message });
|
|
171
|
+
return min === undefined ? number : number.min(min, { message });
|
|
172
|
+
}
|
|
164
173
|
// Search schemas (renamed for natural language)
|
|
165
174
|
export const StartSearchArgsSchema = z.object({
|
|
166
175
|
path: z.string(),
|
|
@@ -168,10 +177,10 @@ export const StartSearchArgsSchema = z.object({
|
|
|
168
177
|
searchType: z.enum(['files', 'content']).default('files'),
|
|
169
178
|
filePattern: z.string().optional(),
|
|
170
179
|
ignoreCase: z.boolean().optional().default(true),
|
|
171
|
-
maxResults:
|
|
180
|
+
maxResults: wholeNumber('maxResults', 0).optional(), // 0: no limit
|
|
172
181
|
includeHidden: z.boolean().optional().default(false),
|
|
173
|
-
contextLines:
|
|
174
|
-
timeout_ms:
|
|
182
|
+
contextLines: wholeNumber('contextLines', 0).optional().default(5),
|
|
183
|
+
timeout_ms: wholeNumber('timeout_ms', 0).optional(), // Match process naming convention; 0: no time limit
|
|
175
184
|
earlyTermination: z.boolean().optional(), // Stop search early when exact filename match is found (default: true for files, false for content)
|
|
176
185
|
literalSearch: z.boolean().optional().default(false), // Force literal string matching (-F flag) instead of regex
|
|
177
186
|
// 'ui' marks widget-fired calls (e.g. markdown link-target search);
|
|
@@ -180,20 +189,13 @@ export const StartSearchArgsSchema = z.object({
|
|
|
180
189
|
});
|
|
181
190
|
export const GetMoreSearchResultsArgsSchema = z.object({
|
|
182
191
|
sessionId: z.string(),
|
|
183
|
-
offset:
|
|
184
|
-
length:
|
|
192
|
+
offset: wholeNumber('offset').optional().default(0), // Same as file reading
|
|
193
|
+
length: wholeNumber('length', 1).optional().default(100), // Same as file reading (but smaller default)
|
|
185
194
|
});
|
|
186
195
|
export const StopSearchArgsSchema = z.object({
|
|
187
196
|
sessionId: z.string(),
|
|
188
197
|
});
|
|
189
198
|
export const ListSearchesArgsSchema = z.object({});
|
|
190
|
-
// Prompts tool schema - SIMPLIFIED (only get_prompt action)
|
|
191
|
-
export const GetPromptsArgsSchema = z.object({
|
|
192
|
-
action: z.enum(['get_prompt']),
|
|
193
|
-
promptId: z.string(),
|
|
194
|
-
// Disabled to check if it makes sense or should be removed or changed
|
|
195
|
-
// anonymous_user_use_case: z.string().optional(),
|
|
196
|
-
});
|
|
197
199
|
// Tool history schema
|
|
198
200
|
export const GetRecentToolCallsArgsSchema = z.object({
|
|
199
201
|
maxResults: z.number().min(1).max(1000).optional().default(50),
|
|
@@ -236,6 +238,5 @@ export const toolArgSchemas = {
|
|
|
236
238
|
get_usage_stats: GetUsageStatsArgsSchema,
|
|
237
239
|
get_recent_tool_calls: GetRecentToolCallsArgsSchema,
|
|
238
240
|
give_feedback_to_desktop_commander: GiveFeedbackArgsSchema,
|
|
239
|
-
get_prompts: GetPromptsArgsSchema,
|
|
240
241
|
track_ui_event: TrackUiEventArgsSchema,
|
|
241
242
|
};
|
package/dist/types.d.ts
CHANGED