@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 CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.15.0 (protocol 1.4)
4
+
5
+ - Computer control: `system.open_url` / `system.open_path` / `system.notify`; `screen.list` /
6
+ `screen.capture` (a display as JPEG or PNG, scaled to `max_width`); `window.list` /
7
+ `window.focus` / `window.move` / `window.minimize`; `input.type_text` / `input.hotkey` /
8
+ `input.mouse_move` / `input.mouse_click`; `power.status` / `power.prevent_sleep`;
9
+ `resources.snapshot` (CPU, memory, swap, disks).
10
+ - Polled folder watches for callers that ask rather than hold a stream: `fs.watch.start` /
11
+ `fs.watch.events` / `fs.watch.stop`. Background jobs: `exec.job.start` / `exec.job.output` /
12
+ `exec.job.stop` / `exec.job.list`.
13
+ - TOOL_CATALOG: shell_job, desktop_apps, desktop_system, desktop_screen, desktop_window,
14
+ desktop_input, desktop_power, desktop_resources and fs_watch are built; desktop_resources is
15
+ `resources.snapshot` only (the busiest processes are desktop_process).
16
+
17
+ Consumer action: none (new ops only; an older app answers UNKNOWN_OPERATION).
18
+
3
19
  ## 0.14.0 (protocol 1.3)
4
20
 
5
21
  - The `proc` capability: `proc.list` (by CPU, memory, pid or name; a name filter), `proc.ports`
package/dist/client.cjs CHANGED
@@ -126,7 +126,7 @@ var import_zod2 = require("zod");
126
126
  // src/schema/primitives.ts
127
127
  var import_zod = require("zod");
128
128
  var PROTOCOL_MAJOR = 1;
129
- var PROTOCOL_MINOR = 3;
129
+ var PROTOCOL_MINOR = 4;
130
130
  var PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}`;
131
131
  var ProtocolVersion = import_zod.z.string().regex(/^[1-9][0-9]{0,2}\.[0-9]{1,3}$/);
132
132
  var RequestId = import_zod.z.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
@@ -876,23 +876,358 @@ var ProcKillResult = import_zod12.z.strictObject({
876
876
  exited: import_zod12.z.boolean()
877
877
  });
878
878
 
879
- // src/schema/apps.ts
879
+ // src/schema/system.ts
880
880
  var import_zod13 = require("zod");
881
- var AppKey = import_zod13.z.string().regex(/^[a-z][a-z0-9_-]{0,39}$/);
882
- var AppProfileId = import_zod13.z.string().regex(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/);
883
- var AppProfileLocator = import_zod13.z.string().min(1).max(512).regex(/^[A-Za-z0-9 _()+@,-][A-Za-z0-9 ._()+@,-]{0,127}(\/[A-Za-z0-9 _()+@,-][A-Za-z0-9 ._()+@,-]{0,127}){0,7}$/);
884
- var AppSupport = import_zod13.z.enum(["supported", "partial", "unsupported"]);
885
- var AppFeatureStatus = import_zod13.z.strictObject({
881
+ var SystemOpenUrlParams = import_zod13.z.strictObject({
882
+ /** http, https or mailto; opened in the person's default app for it. */
883
+ url: import_zod13.z.string().min(1).max(4096)
884
+ });
885
+ var SystemOpenUrlResult = import_zod13.z.strictObject({ url: import_zod13.z.string().max(4096) });
886
+ var SystemOpenPathParams = import_zod13.z.strictObject({
887
+ path: AbsPath,
888
+ /** Show it in the file manager (Finder, Explorer) instead of opening it. */
889
+ reveal: import_zod13.z.boolean().default(false)
890
+ });
891
+ var SystemOpenPathResult = import_zod13.z.strictObject({ path: AbsPath, revealed: import_zod13.z.boolean() });
892
+ var SystemNotifyParams = import_zod13.z.strictObject({
893
+ title: import_zod13.z.string().min(1).max(128),
894
+ body: import_zod13.z.string().max(1024).default("")
895
+ });
896
+ var SystemNotifyResult = import_zod13.z.strictObject({
897
+ /** False when this computer has no notification service to show it (a bare Linux box). */
898
+ shown: import_zod13.z.boolean()
899
+ });
900
+
901
+ // src/schema/screen.ts
902
+ var import_zod14 = require("zod");
903
+ var ScreenDisplay = import_zod14.z.strictObject({
904
+ /** The OS's display id; pass it to screen.capture. */
905
+ id: nonNegInt,
906
+ name: import_zod14.z.string().max(128),
907
+ /** Position and size in the OS's logical points (x and y may be negative left of or above the main display). */
908
+ x: import_zod14.z.int(),
909
+ y: import_zod14.z.int(),
910
+ width: import_zod14.z.int().min(1),
911
+ height: import_zod14.z.int().min(1),
912
+ /** Pixels per point (2 on a Retina display). */
913
+ scale: import_zod14.z.number().min(0.1).max(8),
914
+ primary: import_zod14.z.boolean()
915
+ });
916
+ var ScreenListParams = import_zod14.z.strictObject({});
917
+ var ScreenListResult = import_zod14.z.strictObject({ displays: import_zod14.z.array(ScreenDisplay).max(32) });
918
+ var ScreenCaptureParams = import_zod14.z.strictObject({
919
+ /** The display (from screen.list); the primary display when absent. */
920
+ display_id: nonNegInt.optional(),
921
+ format: import_zod14.z.enum(["jpeg", "png"]).default("jpeg"),
922
+ /** Scale the picture down to at most this width in pixels (kept when already smaller). */
923
+ max_width: import_zod14.z.int().min(160).max(7680).default(1600)
924
+ });
925
+ var ScreenCaptureResult = import_zod14.z.strictObject({
926
+ display_id: nonNegInt,
927
+ mime_type: import_zod14.z.enum(["image/jpeg", "image/png"]),
928
+ width: import_zod14.z.int().min(1),
929
+ height: import_zod14.z.int().min(1),
930
+ /** The display's full resolution in pixels, before scaling. */
931
+ source_width: import_zod14.z.int().min(1),
932
+ source_height: import_zod14.z.int().min(1),
933
+ /** The image, base64 (at most 6 MiB of text). */
934
+ data_base64: import_zod14.z.string().max(6291456)
935
+ });
936
+
937
+ // src/schema/window.ts
938
+ var import_zod15 = require("zod");
939
+ var WindowInfo = import_zod15.z.strictObject({
940
+ /** The OS's window handle (macOS window number, Windows HWND, X11 window id). */
941
+ id: nonNegInt,
942
+ title: import_zod15.z.string().max(512),
943
+ /** Position and size in logical points. */
944
+ x: import_zod15.z.int(),
945
+ y: import_zod15.z.int(),
946
+ width: import_zod15.z.int().min(0),
947
+ height: import_zod15.z.int().min(0)
948
+ });
949
+ var WindowListParams = import_zod15.z.strictObject({
950
+ /** Case-insensitive substring of the window title. */
951
+ title: import_zod15.z.string().min(1).max(256).optional(),
952
+ limit: import_zod15.z.int().min(1).max(500).default(100)
953
+ });
954
+ var WindowListResult = import_zod15.z.strictObject({
955
+ windows: import_zod15.z.array(WindowInfo).max(500),
956
+ total: nonNegInt,
957
+ truncated: import_zod15.z.boolean()
958
+ });
959
+ var WindowFocusParams = import_zod15.z.strictObject({ id: nonNegInt });
960
+ var WindowFocusResult = import_zod15.z.strictObject({ window: WindowInfo });
961
+ var WindowMoveParams = import_zod15.z.strictObject({
962
+ id: nonNegInt,
963
+ /** New top-left corner; unchanged when absent. */
964
+ x: import_zod15.z.int().optional(),
965
+ y: import_zod15.z.int().optional(),
966
+ /** New size; unchanged when absent. */
967
+ width: import_zod15.z.int().min(50).max(16384).optional(),
968
+ height: import_zod15.z.int().min(50).max(16384).optional()
969
+ });
970
+ var WindowMoveResult = import_zod15.z.strictObject({ window: WindowInfo });
971
+ var WindowMinimizeParams = import_zod15.z.strictObject({ id: nonNegInt });
972
+ var WindowMinimizeResult = import_zod15.z.strictObject({ id: nonNegInt });
973
+
974
+ // src/schema/input.ts
975
+ var import_zod16 = require("zod");
976
+ var InputKey = import_zod16.z.enum([
977
+ "cmd",
978
+ "ctrl",
979
+ "alt",
980
+ "shift",
981
+ "meta",
982
+ "a",
983
+ "b",
984
+ "c",
985
+ "d",
986
+ "e",
987
+ "f",
988
+ "g",
989
+ "h",
990
+ "i",
991
+ "j",
992
+ "k",
993
+ "l",
994
+ "m",
995
+ "n",
996
+ "o",
997
+ "p",
998
+ "q",
999
+ "r",
1000
+ "s",
1001
+ "t",
1002
+ "u",
1003
+ "v",
1004
+ "w",
1005
+ "x",
1006
+ "y",
1007
+ "z",
1008
+ "0",
1009
+ "1",
1010
+ "2",
1011
+ "3",
1012
+ "4",
1013
+ "5",
1014
+ "6",
1015
+ "7",
1016
+ "8",
1017
+ "9",
1018
+ "f1",
1019
+ "f2",
1020
+ "f3",
1021
+ "f4",
1022
+ "f5",
1023
+ "f6",
1024
+ "f7",
1025
+ "f8",
1026
+ "f9",
1027
+ "f10",
1028
+ "f11",
1029
+ "f12",
1030
+ "enter",
1031
+ "tab",
1032
+ "escape",
1033
+ "space",
1034
+ "backspace",
1035
+ "delete",
1036
+ "up",
1037
+ "down",
1038
+ "left",
1039
+ "right",
1040
+ "home",
1041
+ "end",
1042
+ "pageup",
1043
+ "pagedown",
1044
+ "minus",
1045
+ "equal",
1046
+ "comma",
1047
+ "period",
1048
+ "slash",
1049
+ "semicolon",
1050
+ "quote",
1051
+ "bracketleft",
1052
+ "bracketright",
1053
+ "backslash",
1054
+ "grave"
1055
+ ]);
1056
+ var InputTypeTextParams = import_zod16.z.strictObject({ text: import_zod16.z.string().min(1).max(1e4) });
1057
+ var InputTypeTextResult = import_zod16.z.strictObject({ characters: import_zod16.z.int().min(1) });
1058
+ var InputHotkeyParams = import_zod16.z.strictObject({
1059
+ /** Pressed together in order and released in reverse: ["cmd", "shift", "t"]. */
1060
+ keys: import_zod16.z.array(InputKey).min(1).max(6)
1061
+ });
1062
+ var InputHotkeyResult = import_zod16.z.strictObject({ keys: import_zod16.z.array(InputKey) });
1063
+ var InputPoint = import_zod16.z.strictObject({ x: import_zod16.z.int(), y: import_zod16.z.int() });
1064
+ var InputMouseMoveParams = import_zod16.z.strictObject({
1065
+ /** Screen position in logical points (the coordinates screen.list and window.list report). */
1066
+ x: import_zod16.z.int(),
1067
+ y: import_zod16.z.int()
1068
+ });
1069
+ var InputMouseMoveResult = import_zod16.z.strictObject({
1070
+ /** Where the pointer is now, read back from the OS. */
1071
+ position: InputPoint
1072
+ });
1073
+ var InputMouseClickParams = import_zod16.z.strictObject({
1074
+ /** Move here first; clicks where the pointer is when absent. */
1075
+ x: import_zod16.z.int().optional(),
1076
+ y: import_zod16.z.int().optional(),
1077
+ button: import_zod16.z.enum(["left", "right", "middle"]).default("left"),
1078
+ double: import_zod16.z.boolean().default(false)
1079
+ });
1080
+ var InputMouseClickResult = import_zod16.z.strictObject({
1081
+ position: InputPoint,
1082
+ button: import_zod16.z.enum(["left", "right", "middle"]),
1083
+ double: import_zod16.z.boolean()
1084
+ });
1085
+
1086
+ // src/schema/power.ts
1087
+ var import_zod17 = require("zod");
1088
+ var PowerStatusParams = import_zod17.z.strictObject({});
1089
+ var PowerStatusResult = import_zod17.z.strictObject({
1090
+ has_battery: import_zod17.z.boolean(),
1091
+ /** 0–100; null without a battery. */
1092
+ percent: import_zod17.z.number().min(0).max(100).nullable(),
1093
+ charging: import_zod17.z.boolean().nullable(),
1094
+ /** On wall power; null where the OS does not say. */
1095
+ plugged_in: import_zod17.z.boolean().nullable(),
1096
+ /** Minutes of battery left; null when charging, unknown or without a battery. */
1097
+ minutes_left: nonNegInt.nullable(),
1098
+ /** Matrx 2 is keeping the computer awake (power.prevent_sleep) until this time; null when it is not. */
1099
+ awake_until_ms: epochMs.nullable()
1100
+ });
1101
+ var PowerPreventSleepParams = import_zod17.z.strictObject({
1102
+ /** Keep the computer awake this long; 0 lets it sleep again now. */
1103
+ seconds: import_zod17.z.int().min(0).max(86400),
1104
+ /** Shown where the OS lists what keeps it awake. */
1105
+ reason: import_zod17.z.string().min(1).max(128).default("Matrx 2 is working")
1106
+ });
1107
+ var PowerPreventSleepResult = import_zod17.z.strictObject({
1108
+ /** When it may sleep again; null after seconds 0. */
1109
+ awake_until_ms: epochMs.nullable()
1110
+ });
1111
+
1112
+ // src/schema/resources.ts
1113
+ var import_zod18 = require("zod");
1114
+ var ResourcesDisk = import_zod18.z.strictObject({
1115
+ /** Where it is mounted ("/", "C:"). */
1116
+ mount: import_zod18.z.string().max(512),
1117
+ /** The file system ("apfs", "NTFS", "ext4"). */
1118
+ fs: import_zod18.z.string().max(64),
1119
+ size_bytes: nonNegInt,
1120
+ used_bytes: nonNegInt,
1121
+ available_bytes: nonNegInt
1122
+ });
1123
+ var ResourcesSnapshotParams = import_zod18.z.strictObject({});
1124
+ var ResourcesSnapshotResult = import_zod18.z.strictObject({
1125
+ cpu: import_zod18.z.strictObject({
1126
+ /** Busy share of all cores, 0–100, measured now. */
1127
+ percent: import_zod18.z.number().min(0).max(100),
1128
+ cores: import_zod18.z.int().min(1),
1129
+ /** 1, 5 and 15 minute load averages; null on Windows. */
1130
+ load: import_zod18.z.array(import_zod18.z.number().min(0)).length(3).nullable()
1131
+ }),
1132
+ memory: import_zod18.z.strictObject({ total_bytes: nonNegInt, used_bytes: nonNegInt, available_bytes: nonNegInt }),
1133
+ swap: import_zod18.z.strictObject({ total_bytes: nonNegInt, used_bytes: nonNegInt }),
1134
+ disks: import_zod18.z.array(ResourcesDisk).max(64),
1135
+ uptime_seconds: nonNegInt
1136
+ });
1137
+
1138
+ // src/schema/fs-watch.ts
1139
+ var import_zod19 = require("zod");
1140
+ var FsWatchId = import_zod19.z.string().regex(/^fw_[A-Za-z0-9]{12,40}$/);
1141
+ var FsWatchStartParams = import_zod19.z.strictObject({
1142
+ path: AbsPath,
1143
+ recursive: import_zod19.z.boolean().default(true),
1144
+ /** Globs relative to `path` whose changes are not reported (".git/**", "node_modules/**"). */
1145
+ ignore: import_zod19.z.array(import_zod19.z.string().max(256)).max(64).default([])
1146
+ });
1147
+ var FsWatchStartResult = import_zod19.z.strictObject({
1148
+ watch_id: FsWatchId,
1149
+ path: AbsPath,
1150
+ /** The watch ends by itself if nobody reads it for 30 minutes. */
1151
+ expires_at_ms: epochMs
1152
+ });
1153
+ var FsWatchEventsParams = import_zod19.z.strictObject({
1154
+ watch_id: FsWatchId,
1155
+ /** Wait up to this long for a first change when none is waiting (0 answers at once). */
1156
+ wait_ms: import_zod19.z.int().min(0).max(25e3).default(0)
1157
+ });
1158
+ var FsWatchEventsResult = import_zod19.z.strictObject({
1159
+ /** What changed since the last read, oldest first; re-checked against the disk when read. */
1160
+ changes: import_zod19.z.array(FsChange).max(1e3),
1161
+ /** Changes were dropped (more than 1000 waited): list the folder again. */
1162
+ overflow: import_zod19.z.boolean(),
1163
+ expires_at_ms: epochMs
1164
+ });
1165
+ var FsWatchStopParams = import_zod19.z.strictObject({ watch_id: FsWatchId });
1166
+ var FsWatchStopResult = import_zod19.z.strictObject({ watch_id: FsWatchId });
1167
+
1168
+ // src/schema/exec-job.ts
1169
+ var import_zod20 = require("zod");
1170
+ var ExecJobId = import_zod20.z.string().regex(/^job_[A-Za-z0-9]{12,40}$/);
1171
+ var ExecJobStartParams = import_zod20.z.strictObject({
1172
+ command: import_zod20.z.string().min(1).max(131072),
1173
+ /** The folder it runs in; the home folder when absent. */
1174
+ cwd: AbsPath.optional(),
1175
+ env: import_zod20.z.record(import_zod20.z.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/).max(128), import_zod20.z.string().max(32768)).optional()
1176
+ });
1177
+ var ExecJobStartResult = import_zod20.z.strictObject({ job_id: ExecJobId, pid: import_zod20.z.int().min(1), cwd: AbsPath });
1178
+ var ExecJobOutputParams = import_zod20.z.strictObject({
1179
+ job_id: ExecJobId,
1180
+ /** Byte offset into the job's output to read from (next_offset of the last read; 0 = the start). */
1181
+ offset: nonNegInt.default(0),
1182
+ /** Wait up to this long for new output or the exit when none is waiting (0 answers at once). */
1183
+ wait_ms: import_zod20.z.int().min(0).max(25e3).default(0),
1184
+ max_bytes: import_zod20.z.int().min(1024).max(1048576).default(65536)
1185
+ });
1186
+ var ExecJobOutputResult = import_zod20.z.strictObject({
1187
+ /** stdout and stderr interleaved as they arrived (UTF-8). */
1188
+ output: import_zod20.z.string(),
1189
+ next_offset: nonNegInt,
1190
+ /** Bytes before `offset` that are gone (the job keeps its last 4 MiB). */
1191
+ dropped_bytes: nonNegInt,
1192
+ running: import_zod20.z.boolean(),
1193
+ exit_code: import_zod20.z.int().nullable()
1194
+ });
1195
+ var ExecJobStopParams = import_zod20.z.strictObject({
1196
+ job_id: ExecJobId,
1197
+ /** End it at once (SIGKILL; on Windows the whole tree with /F) instead of asking it to quit. */
1198
+ force: import_zod20.z.boolean().default(false)
1199
+ });
1200
+ var ExecJobStopResult = import_zod20.z.strictObject({ job_id: ExecJobId, exited: import_zod20.z.boolean(), exit_code: import_zod20.z.int().nullable() });
1201
+ var ExecJobInfo = import_zod20.z.strictObject({
1202
+ job_id: ExecJobId,
1203
+ command: import_zod20.z.string().max(1024),
1204
+ pid: import_zod20.z.int().min(1),
1205
+ cwd: AbsPath,
1206
+ running: import_zod20.z.boolean(),
1207
+ exit_code: import_zod20.z.int().nullable(),
1208
+ started_at_ms: epochMs,
1209
+ output_bytes: nonNegInt
1210
+ });
1211
+ var ExecJobListParams = import_zod20.z.strictObject({});
1212
+ var ExecJobListResult = import_zod20.z.strictObject({ jobs: import_zod20.z.array(ExecJobInfo).max(64) });
1213
+
1214
+ // src/schema/apps.ts
1215
+ var import_zod21 = require("zod");
1216
+ var AppKey = import_zod21.z.string().regex(/^[a-z][a-z0-9_-]{0,39}$/);
1217
+ var AppProfileId = import_zod21.z.string().regex(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/);
1218
+ var AppProfileLocator = import_zod21.z.string().min(1).max(512).regex(/^[A-Za-z0-9 _()+@,-][A-Za-z0-9 ._()+@,-]{0,127}(\/[A-Za-z0-9 _()+@,-][A-Za-z0-9 ._()+@,-]{0,127}){0,7}$/);
1219
+ var AppSupport = import_zod21.z.enum(["supported", "partial", "unsupported"]);
1220
+ var AppFeatureStatus = import_zod21.z.strictObject({
886
1221
  status: AppSupport,
887
1222
  /** One line, set whenever status is not "supported". */
888
- reason: import_zod13.z.string().max(140).nullable()
1223
+ reason: import_zod21.z.string().max(140).nullable()
889
1224
  });
890
- var AppInfo = import_zod13.z.strictObject({
1225
+ var AppInfo = import_zod21.z.strictObject({
891
1226
  app_key: AppKey,
892
- name: import_zod13.z.string().max(64),
893
- installed: import_zod13.z.boolean(),
1227
+ name: import_zod21.z.string().max(64),
1228
+ installed: import_zod21.z.boolean(),
894
1229
  /** The app's own version string, or null when it is not installed or does not say. */
895
- version: import_zod13.z.string().max(64).nullable(),
1230
+ version: import_zod21.z.string().max(64).nullable(),
896
1231
  /** The install found (an .app bundle, an .exe, a binary), or null. */
897
1232
  location: AbsPath.nullable(),
898
1233
  /** Open the app at all on this OS. */
@@ -902,69 +1237,69 @@ var AppInfo = import_zod13.z.strictObject({
902
1237
  /** Plan usage read from the app's own files on this OS. */
903
1238
  usage: AppFeatureStatus
904
1239
  });
905
- var AppUsageReading = import_zod13.z.strictObject({
906
- window: import_zod13.z.enum(["five_hour", "weekly", "extra"]),
1240
+ var AppUsageReading = import_zod21.z.strictObject({
1241
+ window: import_zod21.z.enum(["five_hour", "weekly", "extra"]),
907
1242
  /** 0–100 for five_hour and weekly; extra-usage spend as a percent of its cap (may pass 100). */
908
- percent: import_zod13.z.number().min(0).max(1e4),
1243
+ percent: import_zod21.z.number().min(0).max(1e4),
909
1244
  /** When the app recorded it. */
910
1245
  sampled_at_ms: epochMs,
911
1246
  /** True when the window has rolled over since the sample, so the figure has reset. */
912
- reset_since: import_zod13.z.boolean()
1247
+ reset_since: import_zod21.z.boolean()
913
1248
  });
914
- var AppProfile = import_zod13.z.strictObject({
1249
+ var AppProfile = import_zod21.z.strictObject({
915
1250
  /** The row's id; null for a folder found on disk that no row names yet. */
916
1251
  id: AppProfileId.nullable(),
917
1252
  app_key: AppKey,
918
- display_name: import_zod13.z.string().min(1).max(120),
1253
+ display_name: import_zod21.z.string().min(1).max(120),
919
1254
  /** The account the person means to be signed in here; null when not stated (never guessed). */
920
- account_identity: import_zod13.z.string().min(3).max(320).nullable(),
1255
+ account_identity: import_zod21.z.string().min(3).max(320).nullable(),
921
1256
  profile_locator: AppProfileLocator.nullable(),
922
1257
  /** The device the row is tied to; null when the row names none. */
923
1258
  device_id: DeviceId.nullable(),
924
1259
  /** The folder this profile resolves to on this device; null for a row tied to another device. */
925
1260
  folder: AbsPath.nullable(),
926
1261
  /** The folder exists on this device. */
927
- on_disk: import_zod13.z.boolean(),
1262
+ on_disk: import_zod21.z.boolean(),
928
1263
  /** An instance with this profile is running; null when it could not be determined. */
929
- running: import_zod13.z.boolean().nullable(),
1264
+ running: import_zod21.z.boolean().nullable(),
930
1265
  /** Usage the app recorded for this profile; null when the app exposes none here. */
931
- usage: import_zod13.z.array(AppUsageReading).nullable(),
1266
+ usage: import_zod21.z.array(AppUsageReading).nullable(),
932
1267
  last_opened_ms: epochMs.nullable()
933
1268
  });
934
- var AppsListParams = import_zod13.z.strictObject({});
935
- var AppsListResult = import_zod13.z.strictObject({ apps: import_zod13.z.array(AppInfo) });
936
- var AppsProfilesListParams = import_zod13.z.strictObject({
1269
+ var AppsListParams = import_zod21.z.strictObject({});
1270
+ var AppsListResult = import_zod21.z.strictObject({ apps: import_zod21.z.array(AppInfo) });
1271
+ var AppsProfilesListParams = import_zod21.z.strictObject({
937
1272
  /** Only this app's profiles; every app's when absent. */
938
1273
  app_key: AppKey.optional()
939
1274
  });
940
- var AppsProfilesListResult = import_zod13.z.strictObject({
941
- profiles: import_zod13.z.array(AppProfile),
1275
+ var AppsProfilesListResult = import_zod21.z.strictObject({
1276
+ profiles: import_zod21.z.array(AppProfile),
942
1277
  /**
943
1278
  * Whether the saved rows could be read: false while signed out or offline, when only folders
944
1279
  * found on disk are listed.
945
1280
  */
946
- registry: import_zod13.z.enum(["ok", "signed_out", "unavailable"])
1281
+ registry: import_zod21.z.enum(["ok", "signed_out", "unavailable"])
947
1282
  });
948
- var AppsProfilesSaveParams = import_zod13.z.strictObject({
1283
+ var AppsProfilesSaveParams = import_zod21.z.strictObject({
949
1284
  id: AppProfileId.optional(),
950
1285
  app_key: AppKey,
951
- display_name: import_zod13.z.string().min(1).max(120),
952
- account_identity: import_zod13.z.string().min(3).max(320).nullable(),
1286
+ display_name: import_zod21.z.string().min(1).max(120),
1287
+ account_identity: import_zod21.z.string().min(3).max(320).nullable(),
953
1288
  /** On create: the folder to use (one found on disk), or null for the app's default profile. Ignored on update. */
954
1289
  profile_locator: AppProfileLocator.nullable(),
955
1290
  /** On create with profile_locator null: make a new folder named after display_name instead. */
956
- new_folder: import_zod13.z.boolean().default(false)
1291
+ new_folder: import_zod21.z.boolean().default(false)
957
1292
  });
958
1293
  var AppsProfilesSaveResult = AppProfile;
959
- var AppsProfilesRemoveParams = import_zod13.z.strictObject({ id: AppProfileId });
960
- var AppsProfilesRemoveResult = import_zod13.z.strictObject({ removed: import_zod13.z.boolean() });
961
- var AppsOpenParams = import_zod13.z.strictObject({
1294
+ var AppsProfilesRemoveParams = import_zod21.z.strictObject({ id: AppProfileId });
1295
+ var AppsProfilesRemoveResult = import_zod21.z.strictObject({ removed: import_zod21.z.boolean() });
1296
+ var AppsOpenParams = import_zod21.z.strictObject({
962
1297
  app_key: AppKey,
963
1298
  profile_id: AppProfileId.optional()
964
1299
  });
965
- var AppsOpenResult = import_zod13.z.strictObject({
1300
+ var AppsOpenResult = import_zod21.z.strictObject({
966
1301
  /** True when an instance with this profile was already running; it is brought forward. */
967
- already_running: import_zod13.z.boolean(),
1302
+ already_running: import_zod21.z.boolean(),
968
1303
  folder: AbsPath.nullable()
969
1304
  });
970
1305
 
@@ -1009,7 +1344,30 @@ var OPS = {
1009
1344
  "proc.ports": { params: ProcPortsParams, result: ProcPortsResult, kind: "unary", since: "1.3", errors: ["INVALID_PARAMS", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
1010
1345
  "proc.kill": { params: ProcKillParams, result: ProcKillResult, kind: "unary", since: "1.3", errors: ["NOT_FOUND", "AUTH_FORBIDDEN", "PERMISSION_DENIED_OS", "INVALID_PARAMS", "INTERNAL"] },
1011
1346
  "clipboard.read": { params: ClipboardReadParams, result: ClipboardReadResult, kind: "unary", since: "1.3", errors: ["PLATFORM_UNSUPPORTED", "INTERNAL"] },
1012
- "clipboard.write": { params: ClipboardWriteParams, result: ClipboardWriteResult, kind: "unary", since: "1.3", errors: ["PLATFORM_UNSUPPORTED", "PAYLOAD_TOO_LARGE", "INTERNAL"] }
1347
+ "clipboard.write": { params: ClipboardWriteParams, result: ClipboardWriteResult, kind: "unary", since: "1.3", errors: ["PLATFORM_UNSUPPORTED", "PAYLOAD_TOO_LARGE", "INTERNAL"] },
1348
+ "fs.watch.start": { params: FsWatchStartParams, result: FsWatchStartResult, kind: "unary", since: "1.4", errors: [...FS_ERR, "RATE_LIMITED"] },
1349
+ "fs.watch.events": { params: FsWatchEventsParams, result: FsWatchEventsResult, kind: "unary", since: "1.4", errors: ["RESOURCE_GONE", "INVALID_PARAMS", "INTERNAL"] },
1350
+ "fs.watch.stop": { params: FsWatchStopParams, result: FsWatchStopResult, kind: "unary", since: "1.4", errors: ["RESOURCE_GONE", "INVALID_PARAMS"] },
1351
+ "exec.job.start": { params: ExecJobStartParams, result: ExecJobStartResult, kind: "unary", since: "1.4", errors: ["INVALID_PARAMS", "NOT_FOUND", "RATE_LIMITED", "INTERNAL"] },
1352
+ "exec.job.output": { params: ExecJobOutputParams, result: ExecJobOutputResult, kind: "unary", since: "1.4", errors: ["RESOURCE_GONE", "INVALID_PARAMS"] },
1353
+ "exec.job.stop": { params: ExecJobStopParams, result: ExecJobStopResult, kind: "unary", since: "1.4", errors: ["RESOURCE_GONE", "INVALID_PARAMS", "INTERNAL"] },
1354
+ "exec.job.list": { params: ExecJobListParams, result: ExecJobListResult, kind: "unary", since: "1.4", errors: ["INTERNAL"] },
1355
+ "system.open_url": { params: SystemOpenUrlParams, result: SystemOpenUrlResult, kind: "unary", since: "1.4", errors: ["INVALID_PARAMS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
1356
+ "system.open_path": { params: SystemOpenPathParams, result: SystemOpenPathResult, kind: "unary", since: "1.4", errors: ["NOT_FOUND", "INVALID_PARAMS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
1357
+ "system.notify": { params: SystemNotifyParams, result: SystemNotifyResult, kind: "unary", since: "1.4", errors: ["PERMISSION_DENIED_OS", "INTERNAL"] },
1358
+ "screen.list": { params: ScreenListParams, result: ScreenListResult, kind: "unary", since: "1.4", errors: ["PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
1359
+ "screen.capture": { params: ScreenCaptureParams, result: ScreenCaptureResult, kind: "unary", since: "1.4", errors: ["NOT_FOUND", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "PAYLOAD_TOO_LARGE", "INTERNAL"] },
1360
+ "window.list": { params: WindowListParams, result: WindowListResult, kind: "unary", since: "1.4", errors: ["PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
1361
+ "window.focus": { params: WindowFocusParams, result: WindowFocusResult, kind: "unary", since: "1.4", errors: ["NOT_FOUND", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
1362
+ "window.move": { params: WindowMoveParams, result: WindowMoveResult, kind: "unary", since: "1.4", errors: ["NOT_FOUND", "INVALID_PARAMS", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
1363
+ "window.minimize": { params: WindowMinimizeParams, result: WindowMinimizeResult, kind: "unary", since: "1.4", errors: ["NOT_FOUND", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
1364
+ "input.type_text": { params: InputTypeTextParams, result: InputTypeTextResult, kind: "unary", since: "1.4", errors: ["PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
1365
+ "input.hotkey": { params: InputHotkeyParams, result: InputHotkeyResult, kind: "unary", since: "1.4", errors: ["INVALID_PARAMS", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
1366
+ "input.mouse_move": { params: InputMouseMoveParams, result: InputMouseMoveResult, kind: "unary", since: "1.4", errors: ["PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
1367
+ "input.mouse_click": { params: InputMouseClickParams, result: InputMouseClickResult, kind: "unary", since: "1.4", errors: ["INVALID_PARAMS", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
1368
+ "power.status": { params: PowerStatusParams, result: PowerStatusResult, kind: "unary", since: "1.4", errors: ["INTERNAL"] },
1369
+ "power.prevent_sleep": { params: PowerPreventSleepParams, result: PowerPreventSleepResult, kind: "unary", since: "1.4", errors: ["PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
1370
+ "resources.snapshot": { params: ResourcesSnapshotParams, result: ResourcesSnapshotResult, kind: "unary", since: "1.4", errors: ["INTERNAL"] }
1013
1371
  };
1014
1372
  var EVENTS = {
1015
1373
  "fs.changed": FsChangedEvent,