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