@ai-matrx/desktop-protocol 0.14.0 → 0.15.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/CHANGELOG.md +16 -0
- package/dist/client.cjs +396 -38
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +2 -2
- package/dist/client.d.ts +2 -2
- package/dist/client.js +396 -38
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +479 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +668 -6
- package/dist/index.d.ts +668 -6
- package/dist/index.js +479 -13
- package/dist/index.js.map +1 -1
- package/dist/{models-DqFPqtNS.d.cts → models-iOvmEOHd.d.cts} +1105 -1
- package/dist/{models-DqFPqtNS.d.ts → models-iOvmEOHd.d.ts} +1105 -1
- package/dist/react.d.cts +549 -0
- package/dist/react.d.ts +549 -0
- package/generated/desktop-protocol.schema.json +1560 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// src/schema/primitives.ts
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
var PROTOCOL_MAJOR = 1;
|
|
4
|
-
var PROTOCOL_MINOR =
|
|
4
|
+
var PROTOCOL_MINOR = 4;
|
|
5
5
|
var PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}`;
|
|
6
6
|
var ProtocolVersion = z.string().regex(/^[1-9][0-9]{0,2}\.[0-9]{1,3}$/);
|
|
7
7
|
var RequestId = z.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
|
|
@@ -1012,6 +1012,341 @@ var ClipboardReadResult = z15.strictObject({
|
|
|
1012
1012
|
var ClipboardWriteParams = z15.strictObject({ text: z15.string().max(1048576) });
|
|
1013
1013
|
var ClipboardWriteResult = z15.strictObject({ bytes: nonNegInt });
|
|
1014
1014
|
|
|
1015
|
+
// src/schema/system.ts
|
|
1016
|
+
import { z as z16 } from "zod";
|
|
1017
|
+
var SystemOpenUrlParams = z16.strictObject({
|
|
1018
|
+
/** http, https or mailto; opened in the person's default app for it. */
|
|
1019
|
+
url: z16.string().min(1).max(4096)
|
|
1020
|
+
});
|
|
1021
|
+
var SystemOpenUrlResult = z16.strictObject({ url: z16.string().max(4096) });
|
|
1022
|
+
var SystemOpenPathParams = z16.strictObject({
|
|
1023
|
+
path: AbsPath,
|
|
1024
|
+
/** Show it in the file manager (Finder, Explorer) instead of opening it. */
|
|
1025
|
+
reveal: z16.boolean().default(false)
|
|
1026
|
+
});
|
|
1027
|
+
var SystemOpenPathResult = z16.strictObject({ path: AbsPath, revealed: z16.boolean() });
|
|
1028
|
+
var SystemNotifyParams = z16.strictObject({
|
|
1029
|
+
title: z16.string().min(1).max(128),
|
|
1030
|
+
body: z16.string().max(1024).default("")
|
|
1031
|
+
});
|
|
1032
|
+
var SystemNotifyResult = z16.strictObject({
|
|
1033
|
+
/** False when this computer has no notification service to show it (a bare Linux box). */
|
|
1034
|
+
shown: z16.boolean()
|
|
1035
|
+
});
|
|
1036
|
+
|
|
1037
|
+
// src/schema/screen.ts
|
|
1038
|
+
import { z as z17 } from "zod";
|
|
1039
|
+
var ScreenDisplay = z17.strictObject({
|
|
1040
|
+
/** The OS's display id; pass it to screen.capture. */
|
|
1041
|
+
id: nonNegInt,
|
|
1042
|
+
name: z17.string().max(128),
|
|
1043
|
+
/** Position and size in the OS's logical points (x and y may be negative left of or above the main display). */
|
|
1044
|
+
x: z17.int(),
|
|
1045
|
+
y: z17.int(),
|
|
1046
|
+
width: z17.int().min(1),
|
|
1047
|
+
height: z17.int().min(1),
|
|
1048
|
+
/** Pixels per point (2 on a Retina display). */
|
|
1049
|
+
scale: z17.number().min(0.1).max(8),
|
|
1050
|
+
primary: z17.boolean()
|
|
1051
|
+
});
|
|
1052
|
+
var ScreenListParams = z17.strictObject({});
|
|
1053
|
+
var ScreenListResult = z17.strictObject({ displays: z17.array(ScreenDisplay).max(32) });
|
|
1054
|
+
var ScreenCaptureParams = z17.strictObject({
|
|
1055
|
+
/** The display (from screen.list); the primary display when absent. */
|
|
1056
|
+
display_id: nonNegInt.optional(),
|
|
1057
|
+
format: z17.enum(["jpeg", "png"]).default("jpeg"),
|
|
1058
|
+
/** Scale the picture down to at most this width in pixels (kept when already smaller). */
|
|
1059
|
+
max_width: z17.int().min(160).max(7680).default(1600)
|
|
1060
|
+
});
|
|
1061
|
+
var ScreenCaptureResult = z17.strictObject({
|
|
1062
|
+
display_id: nonNegInt,
|
|
1063
|
+
mime_type: z17.enum(["image/jpeg", "image/png"]),
|
|
1064
|
+
width: z17.int().min(1),
|
|
1065
|
+
height: z17.int().min(1),
|
|
1066
|
+
/** The display's full resolution in pixels, before scaling. */
|
|
1067
|
+
source_width: z17.int().min(1),
|
|
1068
|
+
source_height: z17.int().min(1),
|
|
1069
|
+
/** The image, base64 (at most 6 MiB of text). */
|
|
1070
|
+
data_base64: z17.string().max(6291456)
|
|
1071
|
+
});
|
|
1072
|
+
|
|
1073
|
+
// src/schema/window.ts
|
|
1074
|
+
import { z as z18 } from "zod";
|
|
1075
|
+
var WindowInfo = z18.strictObject({
|
|
1076
|
+
/** The OS's window handle (macOS window number, Windows HWND, X11 window id). */
|
|
1077
|
+
id: nonNegInt,
|
|
1078
|
+
title: z18.string().max(512),
|
|
1079
|
+
/** Position and size in logical points. */
|
|
1080
|
+
x: z18.int(),
|
|
1081
|
+
y: z18.int(),
|
|
1082
|
+
width: z18.int().min(0),
|
|
1083
|
+
height: z18.int().min(0)
|
|
1084
|
+
});
|
|
1085
|
+
var WindowListParams = z18.strictObject({
|
|
1086
|
+
/** Case-insensitive substring of the window title. */
|
|
1087
|
+
title: z18.string().min(1).max(256).optional(),
|
|
1088
|
+
limit: z18.int().min(1).max(500).default(100)
|
|
1089
|
+
});
|
|
1090
|
+
var WindowListResult = z18.strictObject({
|
|
1091
|
+
windows: z18.array(WindowInfo).max(500),
|
|
1092
|
+
total: nonNegInt,
|
|
1093
|
+
truncated: z18.boolean()
|
|
1094
|
+
});
|
|
1095
|
+
var WindowFocusParams = z18.strictObject({ id: nonNegInt });
|
|
1096
|
+
var WindowFocusResult = z18.strictObject({ window: WindowInfo });
|
|
1097
|
+
var WindowMoveParams = z18.strictObject({
|
|
1098
|
+
id: nonNegInt,
|
|
1099
|
+
/** New top-left corner; unchanged when absent. */
|
|
1100
|
+
x: z18.int().optional(),
|
|
1101
|
+
y: z18.int().optional(),
|
|
1102
|
+
/** New size; unchanged when absent. */
|
|
1103
|
+
width: z18.int().min(50).max(16384).optional(),
|
|
1104
|
+
height: z18.int().min(50).max(16384).optional()
|
|
1105
|
+
});
|
|
1106
|
+
var WindowMoveResult = z18.strictObject({ window: WindowInfo });
|
|
1107
|
+
var WindowMinimizeParams = z18.strictObject({ id: nonNegInt });
|
|
1108
|
+
var WindowMinimizeResult = z18.strictObject({ id: nonNegInt });
|
|
1109
|
+
|
|
1110
|
+
// src/schema/input.ts
|
|
1111
|
+
import { z as z19 } from "zod";
|
|
1112
|
+
var InputKey = z19.enum([
|
|
1113
|
+
"cmd",
|
|
1114
|
+
"ctrl",
|
|
1115
|
+
"alt",
|
|
1116
|
+
"shift",
|
|
1117
|
+
"meta",
|
|
1118
|
+
"a",
|
|
1119
|
+
"b",
|
|
1120
|
+
"c",
|
|
1121
|
+
"d",
|
|
1122
|
+
"e",
|
|
1123
|
+
"f",
|
|
1124
|
+
"g",
|
|
1125
|
+
"h",
|
|
1126
|
+
"i",
|
|
1127
|
+
"j",
|
|
1128
|
+
"k",
|
|
1129
|
+
"l",
|
|
1130
|
+
"m",
|
|
1131
|
+
"n",
|
|
1132
|
+
"o",
|
|
1133
|
+
"p",
|
|
1134
|
+
"q",
|
|
1135
|
+
"r",
|
|
1136
|
+
"s",
|
|
1137
|
+
"t",
|
|
1138
|
+
"u",
|
|
1139
|
+
"v",
|
|
1140
|
+
"w",
|
|
1141
|
+
"x",
|
|
1142
|
+
"y",
|
|
1143
|
+
"z",
|
|
1144
|
+
"0",
|
|
1145
|
+
"1",
|
|
1146
|
+
"2",
|
|
1147
|
+
"3",
|
|
1148
|
+
"4",
|
|
1149
|
+
"5",
|
|
1150
|
+
"6",
|
|
1151
|
+
"7",
|
|
1152
|
+
"8",
|
|
1153
|
+
"9",
|
|
1154
|
+
"f1",
|
|
1155
|
+
"f2",
|
|
1156
|
+
"f3",
|
|
1157
|
+
"f4",
|
|
1158
|
+
"f5",
|
|
1159
|
+
"f6",
|
|
1160
|
+
"f7",
|
|
1161
|
+
"f8",
|
|
1162
|
+
"f9",
|
|
1163
|
+
"f10",
|
|
1164
|
+
"f11",
|
|
1165
|
+
"f12",
|
|
1166
|
+
"enter",
|
|
1167
|
+
"tab",
|
|
1168
|
+
"escape",
|
|
1169
|
+
"space",
|
|
1170
|
+
"backspace",
|
|
1171
|
+
"delete",
|
|
1172
|
+
"up",
|
|
1173
|
+
"down",
|
|
1174
|
+
"left",
|
|
1175
|
+
"right",
|
|
1176
|
+
"home",
|
|
1177
|
+
"end",
|
|
1178
|
+
"pageup",
|
|
1179
|
+
"pagedown",
|
|
1180
|
+
"minus",
|
|
1181
|
+
"equal",
|
|
1182
|
+
"comma",
|
|
1183
|
+
"period",
|
|
1184
|
+
"slash",
|
|
1185
|
+
"semicolon",
|
|
1186
|
+
"quote",
|
|
1187
|
+
"bracketleft",
|
|
1188
|
+
"bracketright",
|
|
1189
|
+
"backslash",
|
|
1190
|
+
"grave"
|
|
1191
|
+
]);
|
|
1192
|
+
var InputTypeTextParams = z19.strictObject({ text: z19.string().min(1).max(1e4) });
|
|
1193
|
+
var InputTypeTextResult = z19.strictObject({ characters: z19.int().min(1) });
|
|
1194
|
+
var InputHotkeyParams = z19.strictObject({
|
|
1195
|
+
/** Pressed together in order and released in reverse: ["cmd", "shift", "t"]. */
|
|
1196
|
+
keys: z19.array(InputKey).min(1).max(6)
|
|
1197
|
+
});
|
|
1198
|
+
var InputHotkeyResult = z19.strictObject({ keys: z19.array(InputKey) });
|
|
1199
|
+
var InputPoint = z19.strictObject({ x: z19.int(), y: z19.int() });
|
|
1200
|
+
var InputMouseMoveParams = z19.strictObject({
|
|
1201
|
+
/** Screen position in logical points (the coordinates screen.list and window.list report). */
|
|
1202
|
+
x: z19.int(),
|
|
1203
|
+
y: z19.int()
|
|
1204
|
+
});
|
|
1205
|
+
var InputMouseMoveResult = z19.strictObject({
|
|
1206
|
+
/** Where the pointer is now, read back from the OS. */
|
|
1207
|
+
position: InputPoint
|
|
1208
|
+
});
|
|
1209
|
+
var InputMouseClickParams = z19.strictObject({
|
|
1210
|
+
/** Move here first; clicks where the pointer is when absent. */
|
|
1211
|
+
x: z19.int().optional(),
|
|
1212
|
+
y: z19.int().optional(),
|
|
1213
|
+
button: z19.enum(["left", "right", "middle"]).default("left"),
|
|
1214
|
+
double: z19.boolean().default(false)
|
|
1215
|
+
});
|
|
1216
|
+
var InputMouseClickResult = z19.strictObject({
|
|
1217
|
+
position: InputPoint,
|
|
1218
|
+
button: z19.enum(["left", "right", "middle"]),
|
|
1219
|
+
double: z19.boolean()
|
|
1220
|
+
});
|
|
1221
|
+
|
|
1222
|
+
// src/schema/power.ts
|
|
1223
|
+
import { z as z20 } from "zod";
|
|
1224
|
+
var PowerStatusParams = z20.strictObject({});
|
|
1225
|
+
var PowerStatusResult = z20.strictObject({
|
|
1226
|
+
has_battery: z20.boolean(),
|
|
1227
|
+
/** 0–100; null without a battery. */
|
|
1228
|
+
percent: z20.number().min(0).max(100).nullable(),
|
|
1229
|
+
charging: z20.boolean().nullable(),
|
|
1230
|
+
/** On wall power; null where the OS does not say. */
|
|
1231
|
+
plugged_in: z20.boolean().nullable(),
|
|
1232
|
+
/** Minutes of battery left; null when charging, unknown or without a battery. */
|
|
1233
|
+
minutes_left: nonNegInt.nullable(),
|
|
1234
|
+
/** Matrx 2 is keeping the computer awake (power.prevent_sleep) until this time; null when it is not. */
|
|
1235
|
+
awake_until_ms: epochMs.nullable()
|
|
1236
|
+
});
|
|
1237
|
+
var PowerPreventSleepParams = z20.strictObject({
|
|
1238
|
+
/** Keep the computer awake this long; 0 lets it sleep again now. */
|
|
1239
|
+
seconds: z20.int().min(0).max(86400),
|
|
1240
|
+
/** Shown where the OS lists what keeps it awake. */
|
|
1241
|
+
reason: z20.string().min(1).max(128).default("Matrx 2 is working")
|
|
1242
|
+
});
|
|
1243
|
+
var PowerPreventSleepResult = z20.strictObject({
|
|
1244
|
+
/** When it may sleep again; null after seconds 0. */
|
|
1245
|
+
awake_until_ms: epochMs.nullable()
|
|
1246
|
+
});
|
|
1247
|
+
|
|
1248
|
+
// src/schema/resources.ts
|
|
1249
|
+
import { z as z21 } from "zod";
|
|
1250
|
+
var ResourcesDisk = z21.strictObject({
|
|
1251
|
+
/** Where it is mounted ("/", "C:"). */
|
|
1252
|
+
mount: z21.string().max(512),
|
|
1253
|
+
/** The file system ("apfs", "NTFS", "ext4"). */
|
|
1254
|
+
fs: z21.string().max(64),
|
|
1255
|
+
size_bytes: nonNegInt,
|
|
1256
|
+
used_bytes: nonNegInt,
|
|
1257
|
+
available_bytes: nonNegInt
|
|
1258
|
+
});
|
|
1259
|
+
var ResourcesSnapshotParams = z21.strictObject({});
|
|
1260
|
+
var ResourcesSnapshotResult = z21.strictObject({
|
|
1261
|
+
cpu: z21.strictObject({
|
|
1262
|
+
/** Busy share of all cores, 0–100, measured now. */
|
|
1263
|
+
percent: z21.number().min(0).max(100),
|
|
1264
|
+
cores: z21.int().min(1),
|
|
1265
|
+
/** 1, 5 and 15 minute load averages; null on Windows. */
|
|
1266
|
+
load: z21.array(z21.number().min(0)).length(3).nullable()
|
|
1267
|
+
}),
|
|
1268
|
+
memory: z21.strictObject({ total_bytes: nonNegInt, used_bytes: nonNegInt, available_bytes: nonNegInt }),
|
|
1269
|
+
swap: z21.strictObject({ total_bytes: nonNegInt, used_bytes: nonNegInt }),
|
|
1270
|
+
disks: z21.array(ResourcesDisk).max(64),
|
|
1271
|
+
uptime_seconds: nonNegInt
|
|
1272
|
+
});
|
|
1273
|
+
|
|
1274
|
+
// src/schema/fs-watch.ts
|
|
1275
|
+
import { z as z22 } from "zod";
|
|
1276
|
+
var FsWatchId = z22.string().regex(/^fw_[A-Za-z0-9]{12,40}$/);
|
|
1277
|
+
var FsWatchStartParams = z22.strictObject({
|
|
1278
|
+
path: AbsPath,
|
|
1279
|
+
recursive: z22.boolean().default(true),
|
|
1280
|
+
/** Globs relative to `path` whose changes are not reported (".git/**", "node_modules/**"). */
|
|
1281
|
+
ignore: z22.array(z22.string().max(256)).max(64).default([])
|
|
1282
|
+
});
|
|
1283
|
+
var FsWatchStartResult = z22.strictObject({
|
|
1284
|
+
watch_id: FsWatchId,
|
|
1285
|
+
path: AbsPath,
|
|
1286
|
+
/** The watch ends by itself if nobody reads it for 30 minutes. */
|
|
1287
|
+
expires_at_ms: epochMs
|
|
1288
|
+
});
|
|
1289
|
+
var FsWatchEventsParams = z22.strictObject({
|
|
1290
|
+
watch_id: FsWatchId,
|
|
1291
|
+
/** Wait up to this long for a first change when none is waiting (0 answers at once). */
|
|
1292
|
+
wait_ms: z22.int().min(0).max(25e3).default(0)
|
|
1293
|
+
});
|
|
1294
|
+
var FsWatchEventsResult = z22.strictObject({
|
|
1295
|
+
/** What changed since the last read, oldest first; re-checked against the disk when read. */
|
|
1296
|
+
changes: z22.array(FsChange).max(1e3),
|
|
1297
|
+
/** Changes were dropped (more than 1000 waited): list the folder again. */
|
|
1298
|
+
overflow: z22.boolean(),
|
|
1299
|
+
expires_at_ms: epochMs
|
|
1300
|
+
});
|
|
1301
|
+
var FsWatchStopParams = z22.strictObject({ watch_id: FsWatchId });
|
|
1302
|
+
var FsWatchStopResult = z22.strictObject({ watch_id: FsWatchId });
|
|
1303
|
+
|
|
1304
|
+
// src/schema/exec-job.ts
|
|
1305
|
+
import { z as z23 } from "zod";
|
|
1306
|
+
var ExecJobId = z23.string().regex(/^job_[A-Za-z0-9]{12,40}$/);
|
|
1307
|
+
var ExecJobStartParams = z23.strictObject({
|
|
1308
|
+
command: z23.string().min(1).max(131072),
|
|
1309
|
+
/** The folder it runs in; the home folder when absent. */
|
|
1310
|
+
cwd: AbsPath.optional(),
|
|
1311
|
+
env: z23.record(z23.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/).max(128), z23.string().max(32768)).optional()
|
|
1312
|
+
});
|
|
1313
|
+
var ExecJobStartResult = z23.strictObject({ job_id: ExecJobId, pid: z23.int().min(1), cwd: AbsPath });
|
|
1314
|
+
var ExecJobOutputParams = z23.strictObject({
|
|
1315
|
+
job_id: ExecJobId,
|
|
1316
|
+
/** Byte offset into the job's output to read from (next_offset of the last read; 0 = the start). */
|
|
1317
|
+
offset: nonNegInt.default(0),
|
|
1318
|
+
/** Wait up to this long for new output or the exit when none is waiting (0 answers at once). */
|
|
1319
|
+
wait_ms: z23.int().min(0).max(25e3).default(0),
|
|
1320
|
+
max_bytes: z23.int().min(1024).max(1048576).default(65536)
|
|
1321
|
+
});
|
|
1322
|
+
var ExecJobOutputResult = z23.strictObject({
|
|
1323
|
+
/** stdout and stderr interleaved as they arrived (UTF-8). */
|
|
1324
|
+
output: z23.string(),
|
|
1325
|
+
next_offset: nonNegInt,
|
|
1326
|
+
/** Bytes before `offset` that are gone (the job keeps its last 4 MiB). */
|
|
1327
|
+
dropped_bytes: nonNegInt,
|
|
1328
|
+
running: z23.boolean(),
|
|
1329
|
+
exit_code: z23.int().nullable()
|
|
1330
|
+
});
|
|
1331
|
+
var ExecJobStopParams = z23.strictObject({
|
|
1332
|
+
job_id: ExecJobId,
|
|
1333
|
+
/** End it at once (SIGKILL; on Windows the whole tree with /F) instead of asking it to quit. */
|
|
1334
|
+
force: z23.boolean().default(false)
|
|
1335
|
+
});
|
|
1336
|
+
var ExecJobStopResult = z23.strictObject({ job_id: ExecJobId, exited: z23.boolean(), exit_code: z23.int().nullable() });
|
|
1337
|
+
var ExecJobInfo = z23.strictObject({
|
|
1338
|
+
job_id: ExecJobId,
|
|
1339
|
+
command: z23.string().max(1024),
|
|
1340
|
+
pid: z23.int().min(1),
|
|
1341
|
+
cwd: AbsPath,
|
|
1342
|
+
running: z23.boolean(),
|
|
1343
|
+
exit_code: z23.int().nullable(),
|
|
1344
|
+
started_at_ms: epochMs,
|
|
1345
|
+
output_bytes: nonNegInt
|
|
1346
|
+
});
|
|
1347
|
+
var ExecJobListParams = z23.strictObject({});
|
|
1348
|
+
var ExecJobListResult = z23.strictObject({ jobs: z23.array(ExecJobInfo).max(64) });
|
|
1349
|
+
|
|
1015
1350
|
// src/schema/registry.ts
|
|
1016
1351
|
var FS_ERR = ["NOT_FOUND", "PERMISSION_DENIED_OS", "INVALID_PARAMS", "RESOURCE_BUSY", "INTERNAL"];
|
|
1017
1352
|
var OPS = {
|
|
@@ -1053,7 +1388,30 @@ var OPS = {
|
|
|
1053
1388
|
"proc.ports": { params: ProcPortsParams, result: ProcPortsResult, kind: "unary", since: "1.3", errors: ["INVALID_PARAMS", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1054
1389
|
"proc.kill": { params: ProcKillParams, result: ProcKillResult, kind: "unary", since: "1.3", errors: ["NOT_FOUND", "AUTH_FORBIDDEN", "PERMISSION_DENIED_OS", "INVALID_PARAMS", "INTERNAL"] },
|
|
1055
1390
|
"clipboard.read": { params: ClipboardReadParams, result: ClipboardReadResult, kind: "unary", since: "1.3", errors: ["PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1056
|
-
"clipboard.write": { params: ClipboardWriteParams, result: ClipboardWriteResult, kind: "unary", since: "1.3", errors: ["PLATFORM_UNSUPPORTED", "PAYLOAD_TOO_LARGE", "INTERNAL"] }
|
|
1391
|
+
"clipboard.write": { params: ClipboardWriteParams, result: ClipboardWriteResult, kind: "unary", since: "1.3", errors: ["PLATFORM_UNSUPPORTED", "PAYLOAD_TOO_LARGE", "INTERNAL"] },
|
|
1392
|
+
"fs.watch.start": { params: FsWatchStartParams, result: FsWatchStartResult, kind: "unary", since: "1.4", errors: [...FS_ERR, "RATE_LIMITED"] },
|
|
1393
|
+
"fs.watch.events": { params: FsWatchEventsParams, result: FsWatchEventsResult, kind: "unary", since: "1.4", errors: ["RESOURCE_GONE", "INVALID_PARAMS", "INTERNAL"] },
|
|
1394
|
+
"fs.watch.stop": { params: FsWatchStopParams, result: FsWatchStopResult, kind: "unary", since: "1.4", errors: ["RESOURCE_GONE", "INVALID_PARAMS"] },
|
|
1395
|
+
"exec.job.start": { params: ExecJobStartParams, result: ExecJobStartResult, kind: "unary", since: "1.4", errors: ["INVALID_PARAMS", "NOT_FOUND", "RATE_LIMITED", "INTERNAL"] },
|
|
1396
|
+
"exec.job.output": { params: ExecJobOutputParams, result: ExecJobOutputResult, kind: "unary", since: "1.4", errors: ["RESOURCE_GONE", "INVALID_PARAMS"] },
|
|
1397
|
+
"exec.job.stop": { params: ExecJobStopParams, result: ExecJobStopResult, kind: "unary", since: "1.4", errors: ["RESOURCE_GONE", "INVALID_PARAMS", "INTERNAL"] },
|
|
1398
|
+
"exec.job.list": { params: ExecJobListParams, result: ExecJobListResult, kind: "unary", since: "1.4", errors: ["INTERNAL"] },
|
|
1399
|
+
"system.open_url": { params: SystemOpenUrlParams, result: SystemOpenUrlResult, kind: "unary", since: "1.4", errors: ["INVALID_PARAMS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1400
|
+
"system.open_path": { params: SystemOpenPathParams, result: SystemOpenPathResult, kind: "unary", since: "1.4", errors: ["NOT_FOUND", "INVALID_PARAMS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1401
|
+
"system.notify": { params: SystemNotifyParams, result: SystemNotifyResult, kind: "unary", since: "1.4", errors: ["PERMISSION_DENIED_OS", "INTERNAL"] },
|
|
1402
|
+
"screen.list": { params: ScreenListParams, result: ScreenListResult, kind: "unary", since: "1.4", errors: ["PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1403
|
+
"screen.capture": { params: ScreenCaptureParams, result: ScreenCaptureResult, kind: "unary", since: "1.4", errors: ["NOT_FOUND", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "PAYLOAD_TOO_LARGE", "INTERNAL"] },
|
|
1404
|
+
"window.list": { params: WindowListParams, result: WindowListResult, kind: "unary", since: "1.4", errors: ["PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1405
|
+
"window.focus": { params: WindowFocusParams, result: WindowFocusResult, kind: "unary", since: "1.4", errors: ["NOT_FOUND", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1406
|
+
"window.move": { params: WindowMoveParams, result: WindowMoveResult, kind: "unary", since: "1.4", errors: ["NOT_FOUND", "INVALID_PARAMS", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1407
|
+
"window.minimize": { params: WindowMinimizeParams, result: WindowMinimizeResult, kind: "unary", since: "1.4", errors: ["NOT_FOUND", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1408
|
+
"input.type_text": { params: InputTypeTextParams, result: InputTypeTextResult, kind: "unary", since: "1.4", errors: ["PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1409
|
+
"input.hotkey": { params: InputHotkeyParams, result: InputHotkeyResult, kind: "unary", since: "1.4", errors: ["INVALID_PARAMS", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1410
|
+
"input.mouse_move": { params: InputMouseMoveParams, result: InputMouseMoveResult, kind: "unary", since: "1.4", errors: ["PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1411
|
+
"input.mouse_click": { params: InputMouseClickParams, result: InputMouseClickResult, kind: "unary", since: "1.4", errors: ["INVALID_PARAMS", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1412
|
+
"power.status": { params: PowerStatusParams, result: PowerStatusResult, kind: "unary", since: "1.4", errors: ["INTERNAL"] },
|
|
1413
|
+
"power.prevent_sleep": { params: PowerPreventSleepParams, result: PowerPreventSleepResult, kind: "unary", since: "1.4", errors: ["PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
|
|
1414
|
+
"resources.snapshot": { params: ResourcesSnapshotParams, result: ResourcesSnapshotResult, kind: "unary", since: "1.4", errors: ["INTERNAL"] }
|
|
1057
1415
|
};
|
|
1058
1416
|
var EVENTS = {
|
|
1059
1417
|
"fs.changed": FsChangedEvent,
|
|
@@ -1218,6 +1576,60 @@ var NAMED_SCHEMAS = {
|
|
|
1218
1576
|
ClipboardReadResult,
|
|
1219
1577
|
ClipboardWriteParams,
|
|
1220
1578
|
ClipboardWriteResult,
|
|
1579
|
+
SystemOpenUrlParams,
|
|
1580
|
+
SystemOpenUrlResult,
|
|
1581
|
+
SystemOpenPathParams,
|
|
1582
|
+
SystemOpenPathResult,
|
|
1583
|
+
SystemNotifyParams,
|
|
1584
|
+
SystemNotifyResult,
|
|
1585
|
+
ScreenDisplay,
|
|
1586
|
+
ScreenListParams,
|
|
1587
|
+
ScreenListResult,
|
|
1588
|
+
ScreenCaptureParams,
|
|
1589
|
+
ScreenCaptureResult,
|
|
1590
|
+
WindowInfo,
|
|
1591
|
+
WindowListParams,
|
|
1592
|
+
WindowListResult,
|
|
1593
|
+
WindowFocusParams,
|
|
1594
|
+
WindowFocusResult,
|
|
1595
|
+
WindowMoveParams,
|
|
1596
|
+
WindowMoveResult,
|
|
1597
|
+
WindowMinimizeParams,
|
|
1598
|
+
WindowMinimizeResult,
|
|
1599
|
+
InputKey,
|
|
1600
|
+
InputPoint,
|
|
1601
|
+
InputTypeTextParams,
|
|
1602
|
+
InputTypeTextResult,
|
|
1603
|
+
InputHotkeyParams,
|
|
1604
|
+
InputHotkeyResult,
|
|
1605
|
+
InputMouseMoveParams,
|
|
1606
|
+
InputMouseMoveResult,
|
|
1607
|
+
InputMouseClickParams,
|
|
1608
|
+
InputMouseClickResult,
|
|
1609
|
+
PowerStatusParams,
|
|
1610
|
+
PowerStatusResult,
|
|
1611
|
+
PowerPreventSleepParams,
|
|
1612
|
+
PowerPreventSleepResult,
|
|
1613
|
+
ResourcesDisk,
|
|
1614
|
+
ResourcesSnapshotParams,
|
|
1615
|
+
ResourcesSnapshotResult,
|
|
1616
|
+
FsWatchId,
|
|
1617
|
+
FsWatchStartParams,
|
|
1618
|
+
FsWatchStartResult,
|
|
1619
|
+
FsWatchEventsParams,
|
|
1620
|
+
FsWatchEventsResult,
|
|
1621
|
+
FsWatchStopParams,
|
|
1622
|
+
FsWatchStopResult,
|
|
1623
|
+
ExecJobId,
|
|
1624
|
+
ExecJobStartParams,
|
|
1625
|
+
ExecJobStartResult,
|
|
1626
|
+
ExecJobOutputParams,
|
|
1627
|
+
ExecJobOutputResult,
|
|
1628
|
+
ExecJobStopParams,
|
|
1629
|
+
ExecJobStopResult,
|
|
1630
|
+
ExecJobInfo,
|
|
1631
|
+
ExecJobListParams,
|
|
1632
|
+
ExecJobListResult,
|
|
1221
1633
|
ToolLevel,
|
|
1222
1634
|
ToolOutcome,
|
|
1223
1635
|
ToolPlatform,
|
|
@@ -1323,7 +1735,7 @@ function forPeer(op, part, value, version) {
|
|
|
1323
1735
|
var VERSIONED_RESULT_OPS = [...RESULT_PATH.keys()];
|
|
1324
1736
|
|
|
1325
1737
|
// src/contract.ts
|
|
1326
|
-
var CONTRACT_SHA256 = "
|
|
1738
|
+
var CONTRACT_SHA256 = "a5378bb523cbf52619f16e2accc788931ffb443e762052db4ca42c598792c181";
|
|
1327
1739
|
|
|
1328
1740
|
// src/close-policy.ts
|
|
1329
1741
|
var CLOSE_RULES = {
|
|
@@ -1372,19 +1784,19 @@ var TOOL_CATALOG = [
|
|
|
1372
1784
|
{ name: "fs_search", group: "files_shell", state: "built", path: "sandbox_proxy", ops: ["fs.search_paths", "fs.search_content"], platforms: ALL, summary: "Find files by name or content" },
|
|
1373
1785
|
{ name: "shell_execute", group: "files_shell", state: "built", path: "sandbox_proxy", ops: ["exec.run"], platforms: ALL, summary: "Run a command; cd carries over" },
|
|
1374
1786
|
{ name: "shell_python", group: "files_shell", state: "built", path: "sandbox_proxy", ops: ["exec.run"], platforms: ALL, summary: "Run a Python script" },
|
|
1375
|
-
{ name: "shell_job", group: "files_shell", state: "
|
|
1787
|
+
{ name: "shell_job", group: "files_shell", state: "built", path: "device_op", ops: ["exec.job.start", "exec.job.output", "exec.job.stop", "exec.job.list"], platforms: ALL, summary: "Background commands: start, read output, stop" },
|
|
1376
1788
|
// ── 2. Computer control (TS owners) ──────────────────────────────────────────────────────────
|
|
1377
1789
|
{ name: "desktop_process", group: "os_control", state: "built", path: "device_op", ops: ["proc.list", "proc.ports", "proc.kill"], platforms: ALL, summary: "Running processes and ports; stop one" },
|
|
1378
|
-
{ name: "desktop_apps", group: "os_control", state: "
|
|
1379
|
-
{ name: "desktop_system", group: "os_control", state: "
|
|
1790
|
+
{ name: "desktop_apps", group: "os_control", state: "built", path: "device_op", ops: ["apps.list", "apps.open"], platforms: ALL, summary: "Installed apps; open or bring one forward" },
|
|
1791
|
+
{ name: "desktop_system", group: "os_control", state: "built", path: "device_op", ops: ["sysinfo.get", "system.open_url", "system.open_path", "system.notify"], platforms: ALL, summary: "System facts, open, notify" },
|
|
1380
1792
|
{ name: "desktop_clipboard", group: "os_control", state: "built", path: "device_op", ops: ["clipboard.read", "clipboard.write"], platforms: ALL, summary: "Read and write the clipboard's text" },
|
|
1381
|
-
{ name: "desktop_screen", group: "os_control", state: "
|
|
1382
|
-
{ name: "desktop_window", group: "os_control", state: "
|
|
1383
|
-
{ name: "desktop_input", group: "os_control", state: "
|
|
1793
|
+
{ name: "desktop_screen", group: "os_control", state: "built", path: "device_op", ops: ["screen.list", "screen.capture"], platforms: ALL, summary: "Displays and screenshots" },
|
|
1794
|
+
{ name: "desktop_window", group: "os_control", state: "built", path: "device_op", ops: ["window.list", "window.focus", "window.move", "window.minimize"], platforms: ALL, summary: "Find, focus and arrange windows" },
|
|
1795
|
+
{ name: "desktop_input", group: "os_control", state: "built", path: "device_op", ops: ["input.type_text", "input.hotkey", "input.mouse_click", "input.mouse_move"], platforms: ALL, summary: "Keyboard and mouse" },
|
|
1384
1796
|
{ name: "desktop_audio", group: "os_control", state: "planned", path: "device_op", ops: ["audio.devices", "audio.record", "audio.play"], platforms: ALL, summary: "Audio devices, record, play" },
|
|
1385
|
-
{ name: "desktop_power", group: "os_control", state: "
|
|
1386
|
-
{ name: "desktop_resources", group: "os_control", state: "
|
|
1387
|
-
{ name: "fs_watch", group: "os_control", state: "
|
|
1797
|
+
{ name: "desktop_power", group: "os_control", state: "built", path: "device_op", ops: ["power.status", "power.prevent_sleep"], platforms: ALL, summary: "Battery and keep awake" },
|
|
1798
|
+
{ name: "desktop_resources", group: "os_control", state: "built", path: "device_op", ops: ["resources.snapshot"], platforms: ALL, summary: "CPU, memory and disk use" },
|
|
1799
|
+
{ name: "fs_watch", group: "os_control", state: "built", path: "device_op", ops: ["fs.watch.start", "fs.watch.events", "fs.watch.stop"], platforms: ALL, summary: "Watch a folder; read what changed" },
|
|
1388
1800
|
// ── 3. Personal apps and automation ──────────────────────────────────────────────────────────
|
|
1389
1801
|
{ name: "desktop_automation", group: "personal_automation", state: "planned", path: "device_op", ops: ["automation.script"], platforms: ["darwin", "win32"], summary: "AppleScript on a Mac, PowerShell on Windows" },
|
|
1390
1802
|
{ name: "desktop_mail", group: "personal_automation", state: "planned", path: "device_op", ops: ["mail.accounts", "mail.list", "mail.send"], platforms: ["darwin"], summary: "The Mail app" },
|
|
@@ -1485,7 +1897,7 @@ var LEGACY_ACTIONS = {
|
|
|
1485
1897
|
"local_monitor.resources": tool("desktop_resources"),
|
|
1486
1898
|
"local_monitor.battery": tool("desktop_power"),
|
|
1487
1899
|
"local_monitor.disk_usage": tool("desktop_resources"),
|
|
1488
|
-
"local_monitor.top_processes": tool("
|
|
1900
|
+
"local_monitor.top_processes": tool("desktop_process"),
|
|
1489
1901
|
"local_monitor.watch_directory": tool("fs_watch"),
|
|
1490
1902
|
"local_monitor.watch_events": tool("fs_watch"),
|
|
1491
1903
|
"local_monitor.stop_watch": tool("fs_watch"),
|
|
@@ -1714,6 +2126,16 @@ export {
|
|
|
1714
2126
|
EventMsg,
|
|
1715
2127
|
ExecCwdEvent,
|
|
1716
2128
|
ExecExitedEvent,
|
|
2129
|
+
ExecJobId,
|
|
2130
|
+
ExecJobInfo,
|
|
2131
|
+
ExecJobListParams,
|
|
2132
|
+
ExecJobListResult,
|
|
2133
|
+
ExecJobOutputParams,
|
|
2134
|
+
ExecJobOutputResult,
|
|
2135
|
+
ExecJobStartParams,
|
|
2136
|
+
ExecJobStartResult,
|
|
2137
|
+
ExecJobStopParams,
|
|
2138
|
+
ExecJobStopResult,
|
|
1717
2139
|
ExecListParams,
|
|
1718
2140
|
ExecListResult,
|
|
1719
2141
|
ExecPtyKillParams,
|
|
@@ -1763,11 +2185,28 @@ export {
|
|
|
1763
2185
|
FsSearchPathsResult,
|
|
1764
2186
|
FsStatParams,
|
|
1765
2187
|
FsStatResult,
|
|
2188
|
+
FsWatchEventsParams,
|
|
2189
|
+
FsWatchEventsResult,
|
|
2190
|
+
FsWatchId,
|
|
1766
2191
|
FsWatchParams,
|
|
1767
2192
|
FsWatchResult,
|
|
2193
|
+
FsWatchStartParams,
|
|
2194
|
+
FsWatchStartResult,
|
|
2195
|
+
FsWatchStopParams,
|
|
2196
|
+
FsWatchStopResult,
|
|
1768
2197
|
FsWriteParams,
|
|
1769
2198
|
FsWriteResult,
|
|
1770
2199
|
HelloMsg,
|
|
2200
|
+
InputHotkeyParams,
|
|
2201
|
+
InputHotkeyResult,
|
|
2202
|
+
InputKey,
|
|
2203
|
+
InputMouseClickParams,
|
|
2204
|
+
InputMouseClickResult,
|
|
2205
|
+
InputMouseMoveParams,
|
|
2206
|
+
InputMouseMoveResult,
|
|
2207
|
+
InputPoint,
|
|
2208
|
+
InputTypeTextParams,
|
|
2209
|
+
InputTypeTextResult,
|
|
1771
2210
|
LEGACY_ACTIONS,
|
|
1772
2211
|
LEGACY_DISPATCHERS,
|
|
1773
2212
|
Limits,
|
|
@@ -1796,6 +2235,10 @@ export {
|
|
|
1796
2235
|
PROTOCOL_MAJOR,
|
|
1797
2236
|
PROTOCOL_MINOR,
|
|
1798
2237
|
PROTOCOL_VERSION,
|
|
2238
|
+
PowerPreventSleepParams,
|
|
2239
|
+
PowerPreventSleepResult,
|
|
2240
|
+
PowerStatusParams,
|
|
2241
|
+
PowerStatusResult,
|
|
1799
2242
|
ProcInfo,
|
|
1800
2243
|
ProcKillParams,
|
|
1801
2244
|
ProcKillResult,
|
|
@@ -1826,10 +2269,18 @@ export {
|
|
|
1826
2269
|
RequestMsg,
|
|
1827
2270
|
ResourceId,
|
|
1828
2271
|
ResourceInfo,
|
|
2272
|
+
ResourcesDisk,
|
|
2273
|
+
ResourcesSnapshotParams,
|
|
2274
|
+
ResourcesSnapshotResult,
|
|
1829
2275
|
ResponseMsg,
|
|
1830
2276
|
SERVICES,
|
|
1831
2277
|
SERVICE_MAX_FRAME_BYTES,
|
|
1832
2278
|
SUBPROTOCOL,
|
|
2279
|
+
ScreenCaptureParams,
|
|
2280
|
+
ScreenCaptureResult,
|
|
2281
|
+
ScreenDisplay,
|
|
2282
|
+
ScreenListParams,
|
|
2283
|
+
ScreenListResult,
|
|
1833
2284
|
ServiceCancel,
|
|
1834
2285
|
ServiceErrorMsg,
|
|
1835
2286
|
ServiceHello,
|
|
@@ -1857,6 +2308,12 @@ export {
|
|
|
1857
2308
|
StreamMsg,
|
|
1858
2309
|
SysinfoGetParams,
|
|
1859
2310
|
SysinfoGetResult,
|
|
2311
|
+
SystemNotifyParams,
|
|
2312
|
+
SystemNotifyResult,
|
|
2313
|
+
SystemOpenPathParams,
|
|
2314
|
+
SystemOpenPathResult,
|
|
2315
|
+
SystemOpenUrlParams,
|
|
2316
|
+
SystemOpenUrlResult,
|
|
1860
2317
|
TOOL_CATALOG,
|
|
1861
2318
|
TOOL_GROUPS,
|
|
1862
2319
|
TOOL_LEVELS,
|
|
@@ -1873,6 +2330,15 @@ export {
|
|
|
1873
2330
|
TranscriptionModelInfo,
|
|
1874
2331
|
VERSIONED_RESULT_OPS,
|
|
1875
2332
|
Welcome,
|
|
2333
|
+
WindowFocusParams,
|
|
2334
|
+
WindowFocusResult,
|
|
2335
|
+
WindowInfo,
|
|
2336
|
+
WindowListParams,
|
|
2337
|
+
WindowListResult,
|
|
2338
|
+
WindowMinimizeParams,
|
|
2339
|
+
WindowMinimizeResult,
|
|
2340
|
+
WindowMoveParams,
|
|
2341
|
+
WindowMoveResult,
|
|
1876
2342
|
announcedVersion,
|
|
1877
2343
|
assertFrameHeader,
|
|
1878
2344
|
buildToolStatus,
|