@wonderwhy-er/desktop-commander 0.2.37 → 0.2.38
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/README.md +239 -100
- package/dist/command-manager.js +6 -3
- package/dist/config-field-definitions.d.ts +41 -0
- package/dist/config-field-definitions.js +37 -0
- package/dist/config-manager.d.ts +2 -0
- package/dist/config-manager.js +22 -2
- package/dist/handlers/filesystem-handlers.js +6 -11
- package/dist/handlers/macos-control-handlers.d.ts +16 -0
- package/dist/handlers/macos-control-handlers.js +81 -0
- package/dist/lib.d.ts +10 -0
- package/dist/lib.js +10 -0
- package/dist/remote-device/remote-channel.js +1 -1
- package/dist/server.js +3 -1
- package/dist/tools/config.d.ts +71 -0
- package/dist/tools/config.js +117 -2
- package/dist/tools/macos-control/ax-adapter.d.ts +55 -0
- package/dist/tools/macos-control/ax-adapter.js +438 -0
- package/dist/tools/macos-control/cdp-adapter.d.ts +23 -0
- package/dist/tools/macos-control/cdp-adapter.js +402 -0
- package/dist/tools/macos-control/orchestrator.d.ts +77 -0
- package/dist/tools/macos-control/orchestrator.js +136 -0
- package/dist/tools/macos-control/role-aliases.d.ts +5 -0
- package/dist/tools/macos-control/role-aliases.js +34 -0
- package/dist/tools/macos-control/types.d.ts +129 -0
- package/dist/tools/macos-control/types.js +1 -0
- package/dist/tools/schemas.d.ts +3 -0
- package/dist/tools/schemas.js +1 -0
- package/dist/types.d.ts +0 -1
- package/dist/ui/config-editor/config-editor-runtime.js +14181 -0
- package/dist/ui/config-editor/index.html +13 -0
- package/dist/ui/config-editor/src/app.d.ts +43 -0
- package/dist/ui/config-editor/src/app.js +840 -0
- package/dist/ui/config-editor/src/array-modal.d.ts +19 -0
- package/dist/ui/config-editor/src/array-modal.js +185 -0
- package/dist/ui/config-editor/src/main.d.ts +1 -0
- package/dist/ui/config-editor/src/main.js +2 -0
- package/dist/ui/config-editor/styles.css +586 -0
- package/dist/ui/file-preview/preview-runtime.js +13336 -757
- package/dist/ui/file-preview/shared/preview-file-types.js +3 -1
- package/dist/ui/file-preview/src/app.d.ts +5 -1
- package/dist/ui/file-preview/src/app.js +114 -200
- package/dist/ui/file-preview/src/components/html-renderer.d.ts +1 -5
- package/dist/ui/file-preview/src/components/html-renderer.js +11 -27
- package/dist/ui/file-preview/styles.css +117 -83
- package/dist/ui/resources.d.ts +7 -0
- package/dist/ui/resources.js +16 -2
- package/dist/ui/shared/compact-row.d.ts +11 -0
- package/dist/ui/shared/compact-row.js +18 -0
- package/dist/ui/shared/host-context.d.ts +15 -0
- package/dist/ui/shared/host-context.js +51 -0
- package/dist/ui/shared/tool-bridge.d.ts +30 -0
- package/dist/ui/shared/tool-bridge.js +137 -0
- package/dist/ui/shared/tool-shell.d.ts +9 -0
- package/dist/ui/shared/tool-shell.js +46 -4
- package/dist/ui/shared/ui-event-tracker.d.ts +9 -0
- package/dist/ui/shared/ui-event-tracker.js +27 -0
- package/dist/utils/capture.js +3 -3
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +8 -4
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
export type MacosControlErrorCode = 'UNSUPPORTED_PLATFORM' | 'HELPER_NOT_FOUND' | 'HELPER_EXEC_FAILED' | 'HELPER_PROTOCOL_ERROR' | 'PERMISSION_DENIED' | 'INVALID_ARGUMENT' | 'NOT_FOUND' | 'TIMEOUT' | 'ACTION_FAILED' | 'CDP_CONNECT_FAILED' | 'CDP_NOT_CONNECTED' | 'CDP_CALL_FAILED' | 'INTERNAL_ERROR';
|
|
2
|
+
export interface MacosControlError {
|
|
3
|
+
code: MacosControlErrorCode;
|
|
4
|
+
message: string;
|
|
5
|
+
details?: Record<string, unknown>;
|
|
6
|
+
retriable?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface MacosControlResult<T = unknown> {
|
|
9
|
+
ok: boolean;
|
|
10
|
+
data?: T;
|
|
11
|
+
error?: MacosControlError;
|
|
12
|
+
}
|
|
13
|
+
export interface AxElement {
|
|
14
|
+
id: string;
|
|
15
|
+
app: string;
|
|
16
|
+
pid: number;
|
|
17
|
+
role: string;
|
|
18
|
+
title?: string;
|
|
19
|
+
label?: string;
|
|
20
|
+
desc?: string;
|
|
21
|
+
text?: string;
|
|
22
|
+
checked?: boolean;
|
|
23
|
+
selected?: boolean;
|
|
24
|
+
focused?: boolean;
|
|
25
|
+
actions?: string[];
|
|
26
|
+
bounds: [number, number, number, number];
|
|
27
|
+
}
|
|
28
|
+
export interface AxAppInfo {
|
|
29
|
+
name: string;
|
|
30
|
+
pid: number;
|
|
31
|
+
bundleId?: string;
|
|
32
|
+
active: boolean;
|
|
33
|
+
}
|
|
34
|
+
export interface AxStatus {
|
|
35
|
+
platform: NodeJS.Platform;
|
|
36
|
+
hasPermission: boolean;
|
|
37
|
+
helperPath?: string;
|
|
38
|
+
helperVersion?: string;
|
|
39
|
+
processInfo?: string;
|
|
40
|
+
}
|
|
41
|
+
export interface AxBatchCommand {
|
|
42
|
+
action: 'activate' | 'find' | 'click' | 'find_and_click' | 'type' | 'key' | 'wait' | 'wait_for' | 'get_state' | 'scroll';
|
|
43
|
+
app?: string;
|
|
44
|
+
text?: string;
|
|
45
|
+
role?: string;
|
|
46
|
+
id?: string;
|
|
47
|
+
timeout_ms?: number;
|
|
48
|
+
depth?: number;
|
|
49
|
+
limit?: number;
|
|
50
|
+
key?: string;
|
|
51
|
+
modifiers?: string[];
|
|
52
|
+
index?: number;
|
|
53
|
+
if_exists?: boolean;
|
|
54
|
+
ms?: number;
|
|
55
|
+
x?: number;
|
|
56
|
+
y?: number;
|
|
57
|
+
direction?: 'up' | 'down';
|
|
58
|
+
amount?: number;
|
|
59
|
+
}
|
|
60
|
+
export interface AxBatchResultItem {
|
|
61
|
+
action: string;
|
|
62
|
+
success: boolean;
|
|
63
|
+
skipped?: boolean;
|
|
64
|
+
element?: AxElement;
|
|
65
|
+
error?: string;
|
|
66
|
+
[key: string]: unknown;
|
|
67
|
+
}
|
|
68
|
+
export interface AxBatchResult {
|
|
69
|
+
success: boolean;
|
|
70
|
+
results: AxBatchResultItem[];
|
|
71
|
+
failedAt: number | null;
|
|
72
|
+
completed: number;
|
|
73
|
+
total: number;
|
|
74
|
+
}
|
|
75
|
+
export interface ElectronDebugTarget {
|
|
76
|
+
id: string;
|
|
77
|
+
type: string;
|
|
78
|
+
title: string;
|
|
79
|
+
url: string;
|
|
80
|
+
webSocketDebuggerUrl?: string;
|
|
81
|
+
}
|
|
82
|
+
export interface ElectronDebugAttachResult {
|
|
83
|
+
sessionId: string;
|
|
84
|
+
host: string;
|
|
85
|
+
port: number;
|
|
86
|
+
targetId: string;
|
|
87
|
+
targetTitle: string;
|
|
88
|
+
targetUrl: string;
|
|
89
|
+
availableTargets: Array<{
|
|
90
|
+
id: string;
|
|
91
|
+
title: string;
|
|
92
|
+
url: string;
|
|
93
|
+
type: string;
|
|
94
|
+
}>;
|
|
95
|
+
}
|
|
96
|
+
export interface ElectronDebugEvalResult {
|
|
97
|
+
result?: unknown;
|
|
98
|
+
type?: string;
|
|
99
|
+
description?: string;
|
|
100
|
+
subtype?: string;
|
|
101
|
+
}
|
|
102
|
+
export interface AxElementSignature {
|
|
103
|
+
app: string;
|
|
104
|
+
role: string;
|
|
105
|
+
title?: string;
|
|
106
|
+
label?: string;
|
|
107
|
+
text?: string;
|
|
108
|
+
bounds?: [number, number, number, number];
|
|
109
|
+
}
|
|
110
|
+
export interface HelperRequest {
|
|
111
|
+
command: string;
|
|
112
|
+
args?: Record<string, unknown>;
|
|
113
|
+
requestId?: string;
|
|
114
|
+
}
|
|
115
|
+
export interface HelperError {
|
|
116
|
+
code: string;
|
|
117
|
+
message: string;
|
|
118
|
+
details?: Record<string, unknown>;
|
|
119
|
+
}
|
|
120
|
+
export interface HelperResponse<T = unknown> {
|
|
121
|
+
ok: boolean;
|
|
122
|
+
data?: T;
|
|
123
|
+
error?: HelperError;
|
|
124
|
+
meta?: {
|
|
125
|
+
requestId?: string;
|
|
126
|
+
durationMs?: number;
|
|
127
|
+
[key: string]: unknown;
|
|
128
|
+
};
|
|
129
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/tools/schemas.d.ts
CHANGED
|
@@ -3,12 +3,15 @@ export declare const GetConfigArgsSchema: z.ZodObject<{}, "strip", z.ZodTypeAny,
|
|
|
3
3
|
export declare const SetConfigValueArgsSchema: z.ZodObject<{
|
|
4
4
|
key: z.ZodString;
|
|
5
5
|
value: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">, z.ZodNull]>;
|
|
6
|
+
origin: z.ZodOptional<z.ZodEnum<["ui", "llm"]>>;
|
|
6
7
|
}, "strip", z.ZodTypeAny, {
|
|
7
8
|
value: string | number | boolean | string[] | null;
|
|
8
9
|
key: string;
|
|
10
|
+
origin?: "ui" | "llm" | undefined;
|
|
9
11
|
}, {
|
|
10
12
|
value: string | number | boolean | string[] | null;
|
|
11
13
|
key: string;
|
|
14
|
+
origin?: "ui" | "llm" | undefined;
|
|
12
15
|
}>;
|
|
13
16
|
export declare const ListProcessesArgsSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
14
17
|
export declare const StartProcessArgsSchema: z.ZodObject<{
|
package/dist/tools/schemas.js
CHANGED