@ai-matrx/desktop-protocol 0.21.15 → 0.21.17

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.js CHANGED
@@ -112,7 +112,7 @@ import { z as z2 } from "zod";
112
112
  import { z } from "zod";
113
113
  import { UUID_SHAPE_PATTERN } from "@ai-matrx/kit/uuid";
114
114
  var PROTOCOL_MAJOR = 1;
115
- var PROTOCOL_MINOR = 22;
115
+ var PROTOCOL_MINOR = 24;
116
116
  var PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}`;
117
117
  var ProtocolVersion = z.string().regex(/^[1-9][0-9]{0,2}\.[0-9]{1,3}$/);
118
118
  var RequestId = z.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
@@ -416,6 +416,23 @@ var SysinfoGetResult = z5.strictObject({
416
416
  })
417
417
  )
418
418
  });
419
+ var SysinfoHardwareParams = z5.strictObject({});
420
+ var SysinfoHardwareResult = z5.strictObject({
421
+ /** "Mac Studio", "MacBook Pro", "ThinkPad X1 Carbon". */
422
+ model_name: z5.string().max(128).nullable(),
423
+ /** What tells two of that model apart: "M3 Ultra, 2025", "14-inch, Nov 2023". */
424
+ model_detail: z5.string().max(128).nullable(),
425
+ /** "Mac15,14", the vendor's model number. */
426
+ model_identifier: z5.string().max(128).nullable(),
427
+ /** "Apple M3 Ultra", "Intel Core i7-1185G7". */
428
+ chip: z5.string().max(128).nullable(),
429
+ serial_number: z5.string().max(128).nullable(),
430
+ /** The OS's own name with its release name: "macOS Tahoe", "Windows 11 Pro", "Ubuntu". */
431
+ os_name: z5.string().max(64).nullable(),
432
+ /** "26.6.2". */
433
+ os_version: z5.string().max(64).nullable(),
434
+ os_build: z5.string().max(64).nullable()
435
+ });
419
436
 
420
437
  // src/schema/fs.ts
421
438
  import { z as z6 } from "zod";
@@ -948,164 +965,257 @@ var WebBrowserFetchResult = z13.strictObject({
948
965
  });
949
966
  var ToolsServiceProgress = z13.strictObject({ phase: z13.enum(["fetching", "installing"]), done: nonNegInt, total: nonNegInt });
950
967
 
951
- // src/schema/proc.ts
968
+ // src/schema/account.ts
952
969
  import { z as z14 } from "zod";
953
- var ProcSort = z14.enum(["cpu", "memory", "pid", "name"]);
954
- var ProcListParams = z14.strictObject({
970
+ import { UUID_SHAPE_PATTERN as UUID_SHAPE_PATTERN2 } from "@ai-matrx/kit/uuid";
971
+ var AccountRowId = z14.string().regex(UUID_SHAPE_PATTERN2);
972
+ var AccountReadState = z14.enum(["ok", "signed_out", "unavailable"]);
973
+ var AccountAgent = z14.strictObject({
974
+ id: AccountRowId,
975
+ name: z14.string().min(1).max(200),
976
+ description: z14.string().max(2e3),
977
+ /** The agent's category ("" when it has none): the library's folders. */
978
+ category: z14.string().max(120),
979
+ /** The agent's kind as the platform names it (user, builtin, orchestra…). */
980
+ agent_type: z14.string().max(40),
981
+ is_favorite: z14.boolean(),
982
+ /** The person owns it (false: shared with them). */
983
+ is_owner: z14.boolean(),
984
+ /** Who shared it, when it is shared with the person. */
985
+ shared_by: z14.string().max(320).nullable(),
986
+ /** The organization it belongs to. */
987
+ organization: z14.string().max(200).nullable(),
988
+ updated_at_ms: epochMs
989
+ });
990
+ var AccountAgentsListParams = z14.strictObject({});
991
+ var AccountAgentsListResult = z14.strictObject({
992
+ state: AccountReadState,
993
+ /** One line when state is not "ok" (what went wrong, in plain words); null otherwise. */
994
+ problem: z14.string().max(300).nullable(),
995
+ agents: z14.array(AccountAgent).max(2e3)
996
+ });
997
+ var VaultItemKind = z14.enum(["login", "passkey", "key", "other"]);
998
+ var VaultFieldSummary = z14.strictObject({
999
+ key: z14.string().min(1).max(120),
1000
+ /** visible: shown as written; revealable: copyable on request; sealed: never leaves the server. */
1001
+ handling: z14.enum(["visible", "revealable", "sealed"]),
1002
+ /** The masked hint the server keeps ("••••ab12"), or "" when it keeps none. */
1003
+ hint: z14.string().max(200)
1004
+ });
1005
+ var VaultItemSummary = z14.strictObject({
1006
+ id: AccountRowId,
1007
+ name: z14.string().min(1).max(200),
1008
+ kind: VaultItemKind,
1009
+ /** The platform's definition ("website_login", "native_passkey", "custom"…). */
1010
+ definition: z14.string().max(80),
1011
+ /** The sign-in's user name hint (its "username" field's hint); null when it has none. */
1012
+ username: z14.string().max(200).nullable(),
1013
+ /** The sites a sign-in is for. */
1014
+ urls: z14.array(z14.string().max(2048)).max(20),
1015
+ notes: z14.string().max(4e3).nullable(),
1016
+ fields: z14.array(VaultFieldSummary).max(50),
1017
+ /** Shared with the person by someone else (Passwords' shared groups). */
1018
+ shared: z14.boolean(),
1019
+ /** active, or the server's other states (a deleted item waits in "deleted"). */
1020
+ status: z14.string().max(40),
1021
+ created_at_ms: epochMs,
1022
+ updated_at_ms: epochMs
1023
+ });
1024
+ var AccountVaultListParams = z14.strictObject({});
1025
+ var AccountVaultListResult = z14.strictObject({
1026
+ state: AccountReadState,
1027
+ problem: z14.string().max(300).nullable(),
1028
+ items: z14.array(VaultItemSummary).max(5e3)
1029
+ });
1030
+ var AccountVaultCopyParams = z14.strictObject({
1031
+ item_id: AccountRowId,
1032
+ field_key: z14.string().min(1).max(120)
1033
+ });
1034
+ var AccountVaultCopyResult = z14.strictObject({
1035
+ copied: z14.boolean(),
1036
+ /** When the clipboard is cleared again if it still holds the value (Passwords clears a copied password). */
1037
+ clears_at_ms: epochMs
1038
+ });
1039
+
1040
+ // src/schema/proc.ts
1041
+ import { z as z15 } from "zod";
1042
+ var ProcSort = z15.enum(["cpu", "memory", "pid", "name"]);
1043
+ var ProcListParams = z15.strictObject({
955
1044
  /** Case-insensitive substring of the process name or its command line. */
956
- name: z14.string().min(1).max(128).optional(),
1045
+ name: z15.string().min(1).max(128).optional(),
957
1046
  sort: ProcSort.default("cpu"),
958
- limit: z14.int().min(1).max(500).default(50)
1047
+ limit: z15.int().min(1).max(500).default(50)
959
1048
  });
960
- var ProcInfo = z14.strictObject({
961
- pid: z14.int().min(0),
1049
+ var ProcInfo = z15.strictObject({
1050
+ pid: z15.int().min(0),
962
1051
  /** Parent process id; null where the OS does not report it. */
963
- ppid: z14.int().min(0).nullable(),
964
- name: z14.string().max(256),
1052
+ ppid: z15.int().min(0).nullable(),
1053
+ name: z15.string().max(256),
965
1054
  /** The command line, cut to 1024 characters. */
966
- command: z14.string().max(1024),
1055
+ command: z15.string().max(1024),
967
1056
  /** Share of one core, as `ps` and Task Manager report it; null where the OS does not say. */
968
- cpu_percent: z14.number().min(0).nullable(),
1057
+ cpu_percent: z15.number().min(0).nullable(),
969
1058
  memory_bytes: nonNegInt.nullable(),
970
- user: z14.string().max(128).nullable()
1059
+ user: z15.string().max(128).nullable()
971
1060
  });
972
- var ProcListResult = z14.strictObject({
973
- processes: z14.array(ProcInfo).max(500),
1061
+ var ProcListResult = z15.strictObject({
1062
+ processes: z15.array(ProcInfo).max(500),
974
1063
  /** Processes that matched before `limit`. */
975
1064
  total: nonNegInt,
976
- truncated: z14.boolean()
1065
+ truncated: z15.boolean()
977
1066
  });
978
- var ProcPortsParams = z14.strictObject({
1067
+ var ProcPortsParams = z15.strictObject({
979
1068
  /** Only this port. */
980
- port: z14.int().min(1).max(65535).optional()
1069
+ port: z15.int().min(1).max(65535).optional()
981
1070
  });
982
- var ProcPort = z14.strictObject({
983
- port: z14.int().min(1).max(65535),
984
- protocol: z14.enum(["tcp", "udp"]),
1071
+ var ProcPort = z15.strictObject({
1072
+ port: z15.int().min(1).max(65535),
1073
+ protocol: z15.enum(["tcp", "udp"]),
985
1074
  /** The local address it listens on ("127.0.0.1", "*", "::"). */
986
- address: z14.string().max(64),
987
- pid: z14.int().min(0).nullable(),
988
- process: z14.string().max(256).nullable()
1075
+ address: z15.string().max(64),
1076
+ pid: z15.int().min(0).nullable(),
1077
+ process: z15.string().max(256).nullable()
989
1078
  });
990
- var ProcPortsResult = z14.strictObject({ ports: z14.array(ProcPort).max(4e3) });
991
- var ProcKillParams = z14.strictObject({
992
- pid: z14.int().min(1),
1079
+ var ProcPortsResult = z15.strictObject({ ports: z15.array(ProcPort).max(4e3) });
1080
+ var ProcKillParams = z15.strictObject({
1081
+ pid: z15.int().min(1),
993
1082
  /** Kill outright (SIGKILL; on Windows the same /F) instead of asking it to quit. */
994
- force: z14.boolean().default(false)
1083
+ force: z15.boolean().default(false)
995
1084
  });
996
- var ProcKillResult = z14.strictObject({
997
- pid: z14.int().min(1),
998
- signal: z14.enum(["SIGTERM", "SIGKILL"]),
1085
+ var ProcKillResult = z15.strictObject({
1086
+ pid: z15.int().min(1),
1087
+ signal: z15.enum(["SIGTERM", "SIGKILL"]),
999
1088
  /** True when the process was gone within 3 s. */
1000
- exited: z14.boolean()
1089
+ exited: z15.boolean()
1001
1090
  });
1002
1091
 
1003
1092
  // src/schema/system.ts
1004
- import { z as z15 } from "zod";
1005
- var SystemOpenUrlParams = z15.strictObject({
1093
+ import { z as z16 } from "zod";
1094
+ var SystemOpenUrlParams = z16.strictObject({
1006
1095
  /** http, https or mailto; opened in the person's default app for it. */
1007
- url: z15.string().min(1).max(4096)
1096
+ url: z16.string().min(1).max(4096)
1008
1097
  });
1009
- var SystemOpenUrlResult = z15.strictObject({ url: z15.string().max(4096) });
1010
- var SystemOpenPathParams = z15.strictObject({
1098
+ var SystemOpenUrlResult = z16.strictObject({ url: z16.string().max(4096) });
1099
+ var SystemOpenPathParams = z16.strictObject({
1011
1100
  path: AbsPath,
1012
1101
  /** Show it in the file manager (Finder, Explorer) instead of opening it. */
1013
- reveal: z15.boolean().default(false)
1102
+ reveal: z16.boolean().default(false)
1014
1103
  });
1015
- var SystemOpenPathResult = z15.strictObject({ path: AbsPath, revealed: z15.boolean() });
1016
- var SystemNotifyParams = z15.strictObject({
1017
- title: z15.string().min(1).max(128),
1018
- body: z15.string().max(1024).default("")
1104
+ var SystemOpenPathResult = z16.strictObject({ path: AbsPath, revealed: z16.boolean() });
1105
+ var SystemNotifyParams = z16.strictObject({
1106
+ title: z16.string().min(1).max(128),
1107
+ body: z16.string().max(1024).default("")
1019
1108
  });
1020
- var SystemNotifyResult = z15.strictObject({
1109
+ var SystemNotifyResult = z16.strictObject({
1021
1110
  /** False when this computer has no notification service to show it (a bare Linux box). */
1022
- shown: z15.boolean()
1023
- });
1111
+ shown: z16.boolean()
1112
+ });
1113
+ var SystemSettingsPane = z16.enum([
1114
+ "displays",
1115
+ "night_shift",
1116
+ "sound",
1117
+ "keyboard",
1118
+ "keyboard_shortcuts",
1119
+ "text_input",
1120
+ "dictation",
1121
+ "energy",
1122
+ "about",
1123
+ "storage",
1124
+ "system_report"
1125
+ ]);
1126
+ var SystemOpenSettingsParams = z16.strictObject({ pane: SystemSettingsPane });
1127
+ var SystemOpenSettingsResult = z16.strictObject({ pane: SystemSettingsPane });
1024
1128
 
1025
1129
  // src/schema/screen.ts
1026
- import { z as z16 } from "zod";
1027
- var ScreenDisplay = z16.strictObject({
1130
+ import { z as z17 } from "zod";
1131
+ var ScreenDisplay = z17.strictObject({
1028
1132
  /** The OS's display id; pass it to screen.capture. */
1029
1133
  id: nonNegInt,
1030
- name: z16.string().max(128),
1134
+ name: z17.string().max(128),
1031
1135
  /** Position and size in the OS's logical points (x and y may be negative left of or above the main display). */
1032
- x: z16.int(),
1033
- y: z16.int(),
1034
- width: z16.int().min(1),
1035
- height: z16.int().min(1),
1136
+ x: z17.int(),
1137
+ y: z17.int(),
1138
+ width: z17.int().min(1),
1139
+ height: z17.int().min(1),
1036
1140
  /** Pixels per point (2 on a Retina display). */
1037
- scale: z16.number().min(0.1).max(8),
1038
- primary: z16.boolean()
1039
- });
1040
- var ScreenListParams = z16.strictObject({});
1041
- var ScreenListResult = z16.strictObject({ displays: z16.array(ScreenDisplay).max(32) });
1042
- var ScreenCaptureParams = z16.strictObject({
1141
+ scale: z17.number().min(0.1).max(8),
1142
+ primary: z17.boolean(),
1143
+ /** (1.24) Clockwise rotation in degrees (Displays' Rotation: 0 is Standard). */
1144
+ rotation: z17.int().min(0).max(359).optional(),
1145
+ /** (1.24) Refresh rate in hertz; absent where the OS does not say. */
1146
+ refresh_hz: z17.number().min(0).max(1e3).optional(),
1147
+ /** (1.24) The computer's own screen (a laptop's), not one plugged in. */
1148
+ builtin: z17.boolean().optional()
1149
+ });
1150
+ var ScreenListParams = z17.strictObject({});
1151
+ var ScreenListResult = z17.strictObject({ displays: z17.array(ScreenDisplay).max(32) });
1152
+ var ScreenCaptureParams = z17.strictObject({
1043
1153
  /** The display (from screen.list); the primary display when absent. */
1044
1154
  display_id: nonNegInt.optional(),
1045
- format: z16.enum(["jpeg", "png"]).default("jpeg"),
1155
+ format: z17.enum(["jpeg", "png"]).default("jpeg"),
1046
1156
  /** Scale the picture down to at most this width in pixels (kept when already smaller). */
1047
- max_width: z16.int().min(160).max(7680).default(1600)
1157
+ max_width: z17.int().min(160).max(7680).default(1600)
1048
1158
  });
1049
- var ScreenCaptureResult = z16.strictObject({
1159
+ var ScreenCaptureResult = z17.strictObject({
1050
1160
  display_id: nonNegInt,
1051
- mime_type: z16.enum(["image/jpeg", "image/png"]),
1052
- width: z16.int().min(1),
1053
- height: z16.int().min(1),
1161
+ mime_type: z17.enum(["image/jpeg", "image/png"]),
1162
+ width: z17.int().min(1),
1163
+ height: z17.int().min(1),
1054
1164
  /** The display's full resolution in pixels, before scaling. */
1055
- source_width: z16.int().min(1),
1056
- source_height: z16.int().min(1),
1165
+ source_width: z17.int().min(1),
1166
+ source_height: z17.int().min(1),
1057
1167
  /** The image, base64 (at most 6 MiB of text). */
1058
- data_base64: z16.string().max(6291456)
1168
+ data_base64: z17.string().max(6291456)
1059
1169
  });
1060
1170
 
1061
1171
  // src/schema/window.ts
1062
- import { z as z17 } from "zod";
1063
- var WindowInfo = z17.strictObject({
1172
+ import { z as z18 } from "zod";
1173
+ var WindowInfo = z18.strictObject({
1064
1174
  /** The OS's window handle (macOS window number, Windows HWND, X11 window id). */
1065
1175
  id: nonNegInt,
1066
- title: z17.string().max(512),
1176
+ title: z18.string().max(512),
1067
1177
  /** Position and size in logical points. */
1068
- x: z17.int(),
1069
- y: z17.int(),
1070
- width: z17.int().min(0),
1071
- height: z17.int().min(0),
1178
+ x: z18.int(),
1179
+ y: z18.int(),
1180
+ width: z18.int().min(0),
1181
+ height: z18.int().min(0),
1072
1182
  /**
1073
1183
  * The application that owns the window, by the name the OS shows people; absent when the OS does
1074
1184
  * not say. Optional (never null, the schema rule) because it was added in protocol 1.7: an older
1075
1185
  * app's answer has no such field (FIELDS_SINCE).
1076
1186
  */
1077
- app: z17.string().max(256).optional(),
1187
+ app: z18.string().max(256).optional(),
1078
1188
  /** The owning process id; absent when the OS does not say. Added in protocol 1.7. */
1079
- pid: z17.int().min(0).optional()
1189
+ pid: z18.int().min(0).optional()
1080
1190
  });
1081
- var WindowListParams = z17.strictObject({
1191
+ var WindowListParams = z18.strictObject({
1082
1192
  /** Case-insensitive substring of the window title. */
1083
- title: z17.string().min(1).max(256).optional(),
1084
- limit: z17.int().min(1).max(500).default(100)
1193
+ title: z18.string().min(1).max(256).optional(),
1194
+ limit: z18.int().min(1).max(500).default(100)
1085
1195
  });
1086
- var WindowListResult = z17.strictObject({
1087
- windows: z17.array(WindowInfo).max(500),
1196
+ var WindowListResult = z18.strictObject({
1197
+ windows: z18.array(WindowInfo).max(500),
1088
1198
  total: nonNegInt,
1089
- truncated: z17.boolean()
1199
+ truncated: z18.boolean()
1090
1200
  });
1091
- var WindowFocusParams = z17.strictObject({ id: nonNegInt });
1092
- var WindowFocusResult = z17.strictObject({ window: WindowInfo });
1093
- var WindowMoveParams = z17.strictObject({
1201
+ var WindowFocusParams = z18.strictObject({ id: nonNegInt });
1202
+ var WindowFocusResult = z18.strictObject({ window: WindowInfo });
1203
+ var WindowMoveParams = z18.strictObject({
1094
1204
  id: nonNegInt,
1095
1205
  /** New top-left corner; unchanged when absent. */
1096
- x: z17.int().optional(),
1097
- y: z17.int().optional(),
1206
+ x: z18.int().optional(),
1207
+ y: z18.int().optional(),
1098
1208
  /** New size; unchanged when absent. */
1099
- width: z17.int().min(50).max(16384).optional(),
1100
- height: z17.int().min(50).max(16384).optional()
1209
+ width: z18.int().min(50).max(16384).optional(),
1210
+ height: z18.int().min(50).max(16384).optional()
1101
1211
  });
1102
- var WindowMoveResult = z17.strictObject({ window: WindowInfo });
1103
- var WindowMinimizeParams = z17.strictObject({ id: nonNegInt });
1104
- var WindowMinimizeResult = z17.strictObject({ id: nonNegInt });
1212
+ var WindowMoveResult = z18.strictObject({ window: WindowInfo });
1213
+ var WindowMinimizeParams = z18.strictObject({ id: nonNegInt });
1214
+ var WindowMinimizeResult = z18.strictObject({ id: nonNegInt });
1105
1215
 
1106
1216
  // src/schema/input.ts
1107
- import { z as z18 } from "zod";
1108
- var InputKey = z18.enum([
1217
+ import { z as z19 } from "zod";
1218
+ var InputKey = z19.enum([
1109
1219
  "cmd",
1110
1220
  "ctrl",
1111
1221
  "alt",
@@ -1185,181 +1295,240 @@ var InputKey = z18.enum([
1185
1295
  "backslash",
1186
1296
  "grave"
1187
1297
  ]);
1188
- var InputTypeTextParams = z18.strictObject({ text: z18.string().min(1).max(1e4) });
1189
- var InputTypeTextResult = z18.strictObject({ characters: z18.int().min(1) });
1190
- var InputHotkeyParams = z18.strictObject({
1298
+ var InputTypeTextParams = z19.strictObject({ text: z19.string().min(1).max(1e4) });
1299
+ var InputTypeTextResult = z19.strictObject({ characters: z19.int().min(1) });
1300
+ var InputHotkeyParams = z19.strictObject({
1191
1301
  /** Pressed together in order and released in reverse: ["cmd", "shift", "t"]. */
1192
- keys: z18.array(InputKey).min(1).max(6)
1302
+ keys: z19.array(InputKey).min(1).max(6)
1193
1303
  });
1194
- var InputHotkeyResult = z18.strictObject({ keys: z18.array(InputKey) });
1195
- var InputPoint = z18.strictObject({ x: z18.int(), y: z18.int() });
1196
- var InputMouseMoveParams = z18.strictObject({
1304
+ var InputHotkeyResult = z19.strictObject({ keys: z19.array(InputKey) });
1305
+ var InputPoint = z19.strictObject({ x: z19.int(), y: z19.int() });
1306
+ var InputMouseMoveParams = z19.strictObject({
1197
1307
  /** Screen position in logical points (the coordinates screen.list and window.list report). */
1198
- x: z18.int(),
1199
- y: z18.int()
1308
+ x: z19.int(),
1309
+ y: z19.int()
1200
1310
  });
1201
- var InputMouseMoveResult = z18.strictObject({
1311
+ var InputMouseMoveResult = z19.strictObject({
1202
1312
  /** Where the pointer is now, read back from the OS. */
1203
1313
  position: InputPoint
1204
1314
  });
1205
- var InputMouseClickParams = z18.strictObject({
1315
+ var InputMouseClickParams = z19.strictObject({
1206
1316
  /** Move here first; clicks where the pointer is when absent. */
1207
- x: z18.int().optional(),
1208
- y: z18.int().optional(),
1209
- button: z18.enum(["left", "right", "middle"]).default("left"),
1210
- double: z18.boolean().default(false)
1317
+ x: z19.int().optional(),
1318
+ y: z19.int().optional(),
1319
+ button: z19.enum(["left", "right", "middle"]).default("left"),
1320
+ double: z19.boolean().default(false)
1211
1321
  });
1212
- var InputMouseClickResult = z18.strictObject({
1322
+ var InputMouseClickResult = z19.strictObject({
1213
1323
  position: InputPoint,
1214
- button: z18.enum(["left", "right", "middle"]),
1215
- double: z18.boolean()
1324
+ button: z19.enum(["left", "right", "middle"]),
1325
+ double: z19.boolean()
1326
+ });
1327
+ var InputKeyboardSettingsParams = z19.strictObject({});
1328
+ var InputKeyboardSettingsResult = z19.strictObject({
1329
+ /** Key repeat is off (a held key types once). */
1330
+ repeat_off: z19.boolean().nullable(),
1331
+ /** Time between repeats while a key is held (Key repeat rate: shorter is faster). */
1332
+ repeat_interval_ms: nonNegInt.nullable(),
1333
+ /** Time a key is held before it starts repeating (Delay until repeat). */
1334
+ repeat_delay_ms: nonNegInt.nullable(),
1335
+ /** What the fn / globe key does alone. */
1336
+ fn_key: z19.enum(["nothing", "input_source", "emoji", "dictation"]).nullable(),
1337
+ /** Tab moves focus between every control. */
1338
+ keyboard_navigation: z19.boolean().nullable(),
1339
+ /** The enabled input sources by name ("U.S.", "ABC – Extended"). */
1340
+ input_sources: z19.array(z19.string().max(128)).max(64),
1341
+ /** A key repeat change takes effect only after the person logs out and in again (macOS). */
1342
+ applies_after_login: z19.boolean()
1343
+ });
1344
+ var InputSetKeyboardSettingsParams = z19.strictObject({
1345
+ repeat_off: z19.boolean().optional(),
1346
+ repeat_interval_ms: z19.int().min(15).max(2e3).optional(),
1347
+ repeat_delay_ms: z19.int().min(150).max(2e3).optional(),
1348
+ keyboard_navigation: z19.boolean().optional()
1216
1349
  });
1217
1350
 
1218
1351
  // src/schema/power.ts
1219
- import { z as z19 } from "zod";
1220
- var PowerStatusParams = z19.strictObject({});
1221
- var PowerStatusResult = z19.strictObject({
1222
- has_battery: z19.boolean(),
1352
+ import { z as z20 } from "zod";
1353
+ var PowerEnergy = z20.strictObject({
1354
+ display_sleep_minutes: nonNegInt.nullable(),
1355
+ /** The computer itself sleeps after this long idle; null = never (Prevent automatic sleeping). */
1356
+ sleep_minutes: nonNegInt.nullable(),
1357
+ /** Hard disks sleep after this long; null = never. */
1358
+ disk_sleep_minutes: nonNegInt.nullable(),
1359
+ wake_for_network: z20.boolean().nullable(),
1360
+ restart_after_power_failure: z20.boolean().nullable(),
1361
+ /** Low Power Mode (Energy Mode "Low Power"). */
1362
+ low_power_mode: z20.boolean().nullable()
1363
+ });
1364
+ var PowerStatusParams = z20.strictObject({});
1365
+ var PowerStatusResult = z20.strictObject({
1366
+ has_battery: z20.boolean(),
1223
1367
  /** 0–100; null without a battery. */
1224
- percent: z19.number().min(0).max(100).nullable(),
1225
- charging: z19.boolean().nullable(),
1368
+ percent: z20.number().min(0).max(100).nullable(),
1369
+ charging: z20.boolean().nullable(),
1226
1370
  /** On wall power; null where the OS does not say. */
1227
- plugged_in: z19.boolean().nullable(),
1371
+ plugged_in: z20.boolean().nullable(),
1228
1372
  /** Minutes of battery left; null when charging, unknown or without a battery. */
1229
1373
  minutes_left: nonNegInt.nullable(),
1230
1374
  /** Matrx 2 is keeping the computer awake (power.prevent_sleep) until this time; null when it is not. */
1231
- awake_until_ms: epochMs.nullable()
1375
+ awake_until_ms: epochMs.nullable(),
1376
+ /** (1.24) The OS's own energy settings; absent where it keeps none Matrx 2 can read. */
1377
+ energy: PowerEnergy.optional()
1232
1378
  });
1233
- var PowerPreventSleepParams = z19.strictObject({
1379
+ var PowerHistoryParams = z20.strictObject({});
1380
+ var PowerHistoryPoint = z20.strictObject({ at_ms: epochMs, percent: z20.number().min(0).max(100), plugged_in: z20.boolean() });
1381
+ var PowerHistoryResult = z20.strictObject({
1382
+ /** Oldest first; empty without a battery or where the OS keeps no log. */
1383
+ points: z20.array(PowerHistoryPoint).max(5e3)
1384
+ });
1385
+ var PowerPreventSleepParams = z20.strictObject({
1234
1386
  /** Keep the computer awake this long; 0 lets it sleep again now. */
1235
- seconds: z19.int().min(0).max(86400),
1387
+ seconds: z20.int().min(0).max(86400),
1236
1388
  /** Shown where the OS lists what keeps it awake. */
1237
- reason: z19.string().min(1).max(128).default("Matrx 2 is working")
1389
+ reason: z20.string().min(1).max(128).default("Matrx 2 is working")
1238
1390
  });
1239
- var PowerPreventSleepResult = z19.strictObject({
1391
+ var PowerPreventSleepResult = z20.strictObject({
1240
1392
  /** When it may sleep again; null after seconds 0. */
1241
1393
  awake_until_ms: epochMs.nullable()
1242
1394
  });
1243
1395
 
1244
1396
  // src/schema/audio.ts
1245
- import { z as z20 } from "zod";
1246
- var AudioDevice = z20.strictObject({
1397
+ import { z as z21 } from "zod";
1398
+ var AudioDevice = z21.strictObject({
1247
1399
  /** The OS's name for it, as audio.record takes it. */
1248
- id: z20.string().min(1).max(256),
1249
- name: z20.string().max(256),
1250
- default: z20.boolean()
1251
- });
1252
- var AudioDevicesParams = z20.strictObject({});
1253
- var AudioDevicesResult = z20.strictObject({
1254
- inputs: z20.array(AudioDevice).max(64),
1255
- outputs: z20.array(AudioDevice).max(64)
1256
- });
1257
- var AudioRecordParams = z20.strictObject({
1258
- seconds: z20.number().min(0.5).max(600),
1400
+ id: z21.string().min(1).max(256),
1401
+ name: z21.string().max(256),
1402
+ default: z21.boolean(),
1403
+ /** (1.24) How it is connected, as Sound's Type column says it: "Built-in", "USB", "Bluetooth",
1404
+ * "DisplayPort", "HDMI", "AirPlay", "Virtual". Absent where the OS does not say. */
1405
+ kind: z21.string().max(64).optional()
1406
+ });
1407
+ var AudioDevicesParams = z21.strictObject({});
1408
+ var AudioDevicesResult = z21.strictObject({
1409
+ inputs: z21.array(AudioDevice).max(64),
1410
+ outputs: z21.array(AudioDevice).max(64)
1411
+ });
1412
+ var AudioRecordParams = z21.strictObject({
1413
+ seconds: z21.number().min(0.5).max(600),
1259
1414
  /** The microphone (from audio.devices); the default input when absent. */
1260
- device_id: z20.string().min(1).max(256).optional(),
1415
+ device_id: z21.string().min(1).max(256).optional(),
1261
1416
  /** Where the WAV file goes; a new file in the temp folder when absent. */
1262
1417
  path: AbsPath.optional()
1263
1418
  });
1264
- var AudioRecordResult = z20.strictObject({
1419
+ var AudioRecordResult = z21.strictObject({
1265
1420
  path: AbsPath,
1266
- seconds: z20.number().min(0),
1421
+ seconds: z21.number().min(0),
1267
1422
  bytes: nonNegInt,
1268
1423
  /** Loudest sample, 0–1: 0 means the device gave silence. */
1269
- peak: z20.number().min(0).max(1)
1424
+ peak: z21.number().min(0).max(1)
1425
+ });
1426
+ var AudioPlayParams = z21.strictObject({ path: AbsPath });
1427
+ var AudioPlayResult = z21.strictObject({ path: AbsPath, seconds: z21.number().min(0) });
1428
+ var AudioLevelsParams = z21.strictObject({});
1429
+ var AudioLevelsResult = z21.strictObject({
1430
+ output_volume: z21.number().min(0).max(100).nullable(),
1431
+ output_muted: z21.boolean().nullable(),
1432
+ input_volume: z21.number().min(0).max(100).nullable(),
1433
+ /** The alert (beep) volume, a share of the output volume. */
1434
+ alert_volume: z21.number().min(0).max(100).nullable()
1435
+ });
1436
+ var AudioSetLevelsParams = z21.strictObject({
1437
+ output_volume: z21.number().min(0).max(100).optional(),
1438
+ output_muted: z21.boolean().optional(),
1439
+ input_volume: z21.number().min(0).max(100).optional(),
1440
+ alert_volume: z21.number().min(0).max(100).optional()
1270
1441
  });
1271
- var AudioPlayParams = z20.strictObject({ path: AbsPath });
1272
- var AudioPlayResult = z20.strictObject({ path: AbsPath, seconds: z20.number().min(0) });
1273
1442
 
1274
1443
  // src/schema/resources.ts
1275
- import { z as z21 } from "zod";
1276
- var ResourcesDisk = z21.strictObject({
1444
+ import { z as z22 } from "zod";
1445
+ var ResourcesDisk = z22.strictObject({
1277
1446
  /** Where it is mounted ("/", "C:"). */
1278
- mount: z21.string().max(512),
1447
+ mount: z22.string().max(512),
1279
1448
  /** The volume's name as the file manager shows it ("Macintosh HD", "Local Disk (C:)"). Since 1.17. */
1280
- name: z21.string().max(256).optional(),
1449
+ name: z22.string().max(256).optional(),
1281
1450
  /** The file system ("apfs", "NTFS", "ext4"). */
1282
- fs: z21.string().max(64),
1451
+ fs: z22.string().max(64),
1283
1452
  size_bytes: nonNegInt,
1284
1453
  used_bytes: nonNegInt,
1285
1454
  available_bytes: nonNegInt
1286
1455
  });
1287
- var ResourcesSnapshotParams = z21.strictObject({});
1288
- var ResourcesSnapshotResult = z21.strictObject({
1289
- cpu: z21.strictObject({
1456
+ var ResourcesSnapshotParams = z22.strictObject({});
1457
+ var ResourcesSnapshotResult = z22.strictObject({
1458
+ cpu: z22.strictObject({
1290
1459
  /** Busy share of all cores, 0–100, measured now. */
1291
- percent: z21.number().min(0).max(100),
1292
- cores: z21.int().min(1),
1460
+ percent: z22.number().min(0).max(100),
1461
+ cores: z22.int().min(1),
1293
1462
  /** 1, 5 and 15 minute load averages; null on Windows. */
1294
- load: z21.array(z21.number().min(0)).length(3).nullable()
1463
+ load: z22.array(z22.number().min(0)).length(3).nullable()
1295
1464
  }),
1296
- memory: z21.strictObject({ total_bytes: nonNegInt, used_bytes: nonNegInt, available_bytes: nonNegInt }),
1297
- swap: z21.strictObject({ total_bytes: nonNegInt, used_bytes: nonNegInt }),
1298
- disks: z21.array(ResourcesDisk).max(64),
1465
+ memory: z22.strictObject({ total_bytes: nonNegInt, used_bytes: nonNegInt, available_bytes: nonNegInt }),
1466
+ swap: z22.strictObject({ total_bytes: nonNegInt, used_bytes: nonNegInt }),
1467
+ disks: z22.array(ResourcesDisk).max(64),
1299
1468
  uptime_seconds: nonNegInt
1300
1469
  });
1301
- var ResourcesJobKind = z21.enum(["type-check", "tests", "build", "lint", "dev server", "language server", "search"]);
1302
- var ResourcesStrain = z21.enum(["good", "strain", "overloaded"]);
1303
- var ResourcesPressure = z21.enum(["normal", "warning", "critical"]);
1304
- var ResourcesJob = z21.strictObject({
1470
+ var ResourcesJobKind = z22.enum(["type-check", "tests", "build", "lint", "dev server", "language server", "search"]);
1471
+ var ResourcesStrain = z22.enum(["good", "strain", "overloaded"]);
1472
+ var ResourcesPressure = z22.enum(["normal", "warning", "critical"]);
1473
+ var ResourcesJob = z22.strictObject({
1305
1474
  /** The job's root process (Stop takes its whole tree). */
1306
- pid: z21.int().min(0),
1475
+ pid: z22.int().min(0),
1307
1476
  kind: ResourcesJobKind,
1308
1477
  /** Its heaviest process's command line, shortened ("…/lib/tsc --noEmit -p tsconfig.json"). */
1309
- command: z21.string().max(256),
1478
+ command: z22.string().max(256),
1310
1479
  /** Who started it: "Claude Code", "Codex", "Cursor", "VS Code", "Terminal", "local stack", "detached"; null when unknown. */
1311
- started_by: z21.string().max(64).nullable(),
1480
+ started_by: z22.string().max(64).nullable(),
1312
1481
  /** Whatever started it is gone and nothing waits for it. */
1313
- orphan: z21.boolean(),
1482
+ orphan: z22.boolean(),
1314
1483
  /** A type-check queued for its turn (no compiler running yet). */
1315
- waiting: z21.boolean(),
1484
+ waiting: z22.boolean(),
1316
1485
  /** The project folder it runs in ("matrx-frontend"); null when not in one. */
1317
- folder: z21.string().max(256).nullable(),
1486
+ folder: z22.string().max(256).nullable(),
1318
1487
  /** The same command in the same folder, running this many times (1 = no duplicate). */
1319
- duplicates: z21.int().min(1),
1320
- processes: z21.int().min(1),
1488
+ duplicates: z22.int().min(1),
1489
+ processes: z22.int().min(1),
1321
1490
  /** Sum over the tree, as `ps` reports it: 100 = one full core. */
1322
- cpu_percent: z21.number().min(0),
1491
+ cpu_percent: z22.number().min(0),
1323
1492
  /** Real memory (macOS: the physical footprint Activity Monitor shows, compressed included). */
1324
1493
  memory_bytes: nonNegInt,
1325
1494
  started_at_ms: epochMs.nullable(),
1326
1495
  /** False for an app, an agent session, a terminal, a system process, the local stack or Matrx 2 itself. */
1327
- stoppable: z21.boolean()
1496
+ stoppable: z22.boolean()
1328
1497
  });
1329
- var ResourcesProcess = z21.strictObject({
1330
- pid: z21.int().min(0),
1498
+ var ResourcesProcess = z22.strictObject({
1499
+ pid: z22.int().min(0),
1331
1500
  /** The command line, shortened. */
1332
- name: z21.string().max(256),
1333
- cpu_percent: z21.number().min(0),
1501
+ name: z22.string().max(256),
1502
+ cpu_percent: z22.number().min(0),
1334
1503
  memory_bytes: nonNegInt,
1335
- started_by: z21.string().max(64).nullable(),
1504
+ started_by: z22.string().max(64).nullable(),
1336
1505
  /** The job it belongs to ("type-check in aidream"); null when none. */
1337
- job: z21.string().max(256).nullable(),
1506
+ job: z22.string().max(256).nullable(),
1338
1507
  started_at_ms: epochMs.nullable()
1339
1508
  });
1340
- var ResourcesVerdict = z21.strictObject({
1509
+ var ResourcesVerdict = z22.strictObject({
1341
1510
  level: ResourcesStrain,
1342
1511
  /** One sentence ("Your Mac is under strain. 3 type-checks are running at once."). */
1343
- text: z21.string().max(256),
1512
+ text: z22.string().max(256),
1344
1513
  /** The biggest jobs behind it; null when all is well. */
1345
- cause: z21.string().max(1024).nullable()
1514
+ cause: z22.string().max(1024).nullable()
1346
1515
  });
1347
- var ResourcesSample = z21.strictObject({
1516
+ var ResourcesSample = z22.strictObject({
1348
1517
  at_ms: epochMs,
1349
1518
  /** The 1-minute load average. */
1350
- load: z21.number().min(0),
1519
+ load: z22.number().min(0),
1351
1520
  memory_used_bytes: nonNegInt,
1352
1521
  typechecks: nonNegInt
1353
1522
  });
1354
- var ResourcesActivityParams = z21.strictObject({});
1355
- var ResourcesActivityResult = z21.strictObject({
1523
+ var ResourcesActivityParams = z22.strictObject({});
1524
+ var ResourcesActivityResult = z22.strictObject({
1356
1525
  /** False until the first reading (a second or two after start). */
1357
- ready: z21.boolean(),
1526
+ ready: z22.boolean(),
1358
1527
  sampled_at_ms: epochMs.nullable(),
1359
- cores: z21.int().min(1),
1528
+ cores: z22.int().min(1),
1360
1529
  /** 1, 5 and 15 minute load averages. */
1361
- load: z21.array(z21.number().min(0)).length(3),
1362
- memory: z21.strictObject({
1530
+ load: z22.array(z22.number().min(0)).length(3),
1531
+ memory: z22.strictObject({
1363
1532
  total_bytes: nonNegInt,
1364
1533
  /** Activity Monitor's Memory Used: app memory + wired + compressed. */
1365
1534
  used_bytes: nonNegInt,
@@ -1370,49 +1539,49 @@ var ResourcesActivityResult = z21.strictObject({
1370
1539
  pressure: ResourcesPressure.nullable()
1371
1540
  }),
1372
1541
  verdict: ResourcesVerdict,
1373
- typechecks: z21.strictObject({ running: nonNegInt, waiting: nonNegInt, comfort: nonNegInt }),
1542
+ typechecks: z22.strictObject({ running: nonNegInt, waiting: nonNegInt, comfort: nonNegInt }),
1374
1543
  /** Heaviest first (1 GB weighs as much as 16 % of a core). */
1375
- jobs: z21.array(ResourcesJob).max(200),
1544
+ jobs: z22.array(ResourcesJob).max(200),
1376
1545
  /** The 15 heaviest by memory and the 15 busiest by CPU, together. */
1377
- top: z21.array(ResourcesProcess).max(30),
1546
+ top: z22.array(ResourcesProcess).max(30),
1378
1547
  /** The last hour, oldest first. */
1379
- history: z21.array(ResourcesSample).max(1200)
1548
+ history: z22.array(ResourcesSample).max(1200)
1380
1549
  });
1381
- var ResourcesStopJobParams = z21.strictObject({ pid: z21.int().min(1) });
1382
- var ResourcesStopJobResult = z21.strictObject({
1550
+ var ResourcesStopJobParams = z22.strictObject({ pid: z22.int().min(1) });
1551
+ var ResourcesStopJobResult = z22.strictObject({
1383
1552
  /** Processes signalled; whatever is still running 5 seconds later is force-stopped. */
1384
1553
  processes: nonNegInt,
1385
1554
  /** It had finished before the request arrived. */
1386
- already_finished: z21.boolean()
1555
+ already_finished: z22.boolean()
1387
1556
  });
1388
- var ResourcesIncident = z21.strictObject({
1557
+ var ResourcesIncident = z22.strictObject({
1389
1558
  at_ms: epochMs,
1390
1559
  verdict: ResourcesVerdict,
1391
- load: z21.number().min(0),
1560
+ load: z22.number().min(0),
1392
1561
  memory_used_bytes: nonNegInt,
1393
1562
  compressed_bytes: nonNegInt,
1394
1563
  pressure: ResourcesPressure.nullable(),
1395
- jobs: z21.array(
1396
- z21.strictObject({
1564
+ jobs: z22.array(
1565
+ z22.strictObject({
1397
1566
  kind: ResourcesJobKind,
1398
- started_by: z21.string().max(64).nullable(),
1399
- folder: z21.string().max(256).nullable(),
1400
- command: z21.string().max(256),
1401
- cpu_percent: z21.number().min(0),
1567
+ started_by: z22.string().max(64).nullable(),
1568
+ folder: z22.string().max(256).nullable(),
1569
+ command: z22.string().max(256),
1570
+ cpu_percent: z22.number().min(0),
1402
1571
  memory_bytes: nonNegInt,
1403
- duplicates: z21.int().min(1)
1572
+ duplicates: z22.int().min(1)
1404
1573
  })
1405
1574
  ).max(8)
1406
1575
  });
1407
- var ResourcesIncidentsParams = z21.strictObject({ limit: z21.int().min(1).max(200).default(50) });
1408
- var ResourcesIncidentsResult = z21.strictObject({
1576
+ var ResourcesIncidentsParams = z22.strictObject({ limit: z22.int().min(1).max(200).default(50) });
1577
+ var ResourcesIncidentsResult = z22.strictObject({
1409
1578
  /** Newest first; at most one a minute is written. */
1410
- incidents: z21.array(ResourcesIncident).max(200)
1579
+ incidents: z22.array(ResourcesIncident).max(200)
1411
1580
  });
1412
1581
 
1413
1582
  // src/schema/diag.ts
1414
- import { z as z22 } from "zod";
1415
- var DiagProcess = z22.enum([
1583
+ import { z as z23 } from "zod";
1584
+ var DiagProcess = z23.enum([
1416
1585
  "main",
1417
1586
  "renderer",
1418
1587
  "hosted_page",
@@ -1425,7 +1594,7 @@ var DiagProcess = z22.enum([
1425
1594
  "coding_sessions",
1426
1595
  "claude_accounts"
1427
1596
  ]);
1428
- var DiagErrorKind = z22.enum([
1597
+ var DiagErrorKind = z23.enum([
1429
1598
  "uncaught_exception",
1430
1599
  "unhandled_rejection",
1431
1600
  "renderer_crash",
@@ -1437,235 +1606,235 @@ var DiagErrorKind = z22.enum([
1437
1606
  "banner",
1438
1607
  "logged_error"
1439
1608
  ]);
1440
- var DiagErrorStatus = z22.enum(["waiting", "sent", "resolved"]);
1441
- var DiagErrorEntry = z22.strictObject({
1609
+ var DiagErrorStatus = z23.enum(["waiting", "sent", "resolved"]);
1610
+ var DiagErrorEntry = z23.strictObject({
1442
1611
  /** sha256 prefix over process, kind, source, code and the normalized message. */
1443
- signature: z22.string().regex(/^[0-9a-f]{32}$/),
1612
+ signature: z23.string().regex(/^[0-9a-f]{32}$/),
1444
1613
  process: DiagProcess,
1445
1614
  kind: DiagErrorKind,
1446
1615
  /** Where: a cap.op, a log event, a screen or page name. */
1447
- source: z22.string().min(1).max(128),
1616
+ source: z23.string().min(1).max(128),
1448
1617
  /** An ErrorCode, an exit code or signal, an error class; null when there is none. */
1449
- code: z22.string().max(64).nullable(),
1618
+ code: z23.string().max(64).nullable(),
1450
1619
  /** The first occurrence's message, personal data removed. */
1451
- message: z22.string().max(500),
1620
+ message: z23.string().max(500),
1452
1621
  count: nonNegInt,
1453
1622
  first_seen_ms: epochMs,
1454
1623
  last_seen_ms: epochMs,
1455
1624
  status: DiagErrorStatus,
1456
1625
  /** What the agent who resolved it wrote; null until resolved. */
1457
- resolution_note: z22.string().max(500).nullable(),
1458
- app_version: z22.string().max(64)
1626
+ resolution_note: z23.string().max(500).nullable(),
1627
+ app_version: z23.string().max(64)
1459
1628
  });
1460
- var DiagErrorsListParams = z22.strictObject({
1629
+ var DiagErrorsListParams = z23.strictObject({
1461
1630
  /** open = waiting or sent; all includes resolved. */
1462
- status: z22.enum(["open", "all"]).default("open"),
1463
- limit: z22.int().min(1).max(500).default(200)
1631
+ status: z23.enum(["open", "all"]).default("open"),
1632
+ limit: z23.int().min(1).max(500).default(200)
1464
1633
  });
1465
- var DiagErrorsListResult = z22.strictObject({
1634
+ var DiagErrorsListResult = z23.strictObject({
1466
1635
  /** Newest last_seen first. */
1467
- entries: z22.array(DiagErrorEntry).max(500),
1636
+ entries: z23.array(DiagErrorEntry).max(500),
1468
1637
  total_signatures: nonNegInt,
1469
1638
  total_occurrences: nonNegInt,
1470
1639
  /** Signatures with occurrences not yet delivered. */
1471
1640
  waiting: nonNegInt,
1472
1641
  /** signed_out = kept until sign-in; ok = the last delivery worked; failing = the last delivery failed (kept, retried). */
1473
- delivery: z22.enum(["signed_out", "ok", "failing"]),
1642
+ delivery: z23.enum(["signed_out", "ok", "failing"]),
1474
1643
  last_delivery_ms: epochMs.nullable()
1475
1644
  });
1476
- var DiagErrorsReportParams = z22.strictObject({
1477
- process: z22.enum(["renderer", "hosted_page"]),
1478
- kind: z22.enum(["uncaught_exception", "unhandled_rejection", "console_error", "banner"]),
1645
+ var DiagErrorsReportParams = z23.strictObject({
1646
+ process: z23.enum(["renderer", "hosted_page"]),
1647
+ kind: z23.enum(["uncaught_exception", "unhandled_rejection", "console_error", "banner"]),
1479
1648
  /** The screen or page, e.g. "code.chats". */
1480
- source: z22.string().min(1).max(128),
1481
- message: z22.string().min(1).max(2e3),
1482
- code: z22.string().max(64).optional(),
1483
- stack: z22.string().max(8e3).optional()
1649
+ source: z23.string().min(1).max(128),
1650
+ message: z23.string().min(1).max(2e3),
1651
+ code: z23.string().max(64).optional(),
1652
+ stack: z23.string().max(8e3).optional()
1484
1653
  });
1485
- var DiagErrorsReportResult = z22.strictObject({
1486
- signature: z22.string().regex(/^[0-9a-f]{32}$/)
1654
+ var DiagErrorsReportResult = z23.strictObject({
1655
+ signature: z23.string().regex(/^[0-9a-f]{32}$/)
1487
1656
  });
1488
- var DiagErrorsChangedEvent = z22.strictObject({
1657
+ var DiagErrorsChangedEvent = z23.strictObject({
1489
1658
  total_signatures: nonNegInt,
1490
1659
  waiting: nonNegInt
1491
1660
  });
1492
1661
 
1493
1662
  // src/schema/stack.ts
1494
- import { z as z23 } from "zod";
1495
- var StackServerName = z23.string().regex(/^[a-z0-9_-]{1,64}$/);
1496
- var StackTone = z23.enum(["good", "wait", "bad", "off"]);
1497
- var StackServer = z23.strictObject({
1663
+ import { z as z24 } from "zod";
1664
+ var StackServerName = z24.string().regex(/^[a-z0-9_-]{1,64}$/);
1665
+ var StackTone = z24.enum(["good", "wait", "bad", "off"]);
1666
+ var StackServer = z24.strictObject({
1498
1667
  name: StackServerName,
1499
1668
  /** One word: Healthy, Starting, Unhealthy, Restarting, Stopping, Waiting, Stopped, Crashed, Off. */
1500
- label: z23.string().max(32),
1669
+ label: z24.string().max(32),
1501
1670
  tone: StackTone,
1502
1671
  /** What is going on, in one or two plain sentences. */
1503
- sentence: z23.string().max(2e3),
1672
+ sentence: z24.string().max(2e3),
1504
1673
  /** The config's own description of the server. */
1505
- description: z23.string().max(512),
1674
+ description: z24.string().max(512),
1506
1675
  /** Where the server answers, when its description names an address. */
1507
- open_url: z23.string().max(2048).nullable(),
1508
- log_file: z23.string().max(4096),
1676
+ open_url: z24.string().max(2048).nullable(),
1677
+ log_file: z24.string().max(4096),
1509
1678
  /** When its log file was last written. */
1510
1679
  last_output_at_ms: epochMs.nullable(),
1511
1680
  started_at_ms: epochMs.nullable(),
1512
1681
  restarts: nonNegInt,
1513
- exit_code: z23.int().nullable(),
1514
- pid: z23.int().nullable(),
1682
+ exit_code: z24.int().nullable(),
1683
+ pid: z24.int().nullable(),
1515
1684
  /** (1.18) CPU of the server's process and everything under it, in percent of one core; absent when it is not running. */
1516
- cpu_percent: z23.number().min(0).optional(),
1685
+ cpu_percent: z24.number().min(0).optional(),
1517
1686
  /** (1.18) Memory of the same processes: the physical footprint (Activity Monitor's Memory) summed; absent when it is not running. */
1518
1687
  memory_bytes: nonNegInt.optional()
1519
1688
  });
1520
- var StackEvent = z23.strictObject({
1689
+ var StackEvent = z24.strictObject({
1521
1690
  at_ms: epochMs,
1522
1691
  /** A server name, or "stack" for the stack as a whole. */
1523
- server: z23.string().max(64),
1692
+ server: z24.string().max(64),
1524
1693
  /** started · stopped · healthy · unhealthy · crashed · exited · restarting · stopping · action · action-done · action-failed · setup · error */
1525
- kind: z23.string().max(32),
1526
- text: z23.string().max(4e3)
1694
+ kind: z24.string().max(32),
1695
+ text: z24.string().max(4e3)
1527
1696
  });
1528
- var StackStateParams = z23.strictObject({});
1529
- var StackStateResult = z23.strictObject({
1697
+ var StackStateParams = z24.strictObject({});
1698
+ var StackStateResult = z24.strictObject({
1530
1699
  /** The stack's config file, when found. */
1531
- config_path: z23.string().max(4096).nullable(),
1700
+ config_path: z24.string().max(4096).nullable(),
1532
1701
  /** Why the stack cannot be run from here (no config, no process-compose), else null. */
1533
- problem: z23.string().max(1e3).nullable(),
1534
- stack_up: z23.boolean(),
1702
+ problem: z24.string().max(1e3).nullable(),
1703
+ stack_up: z24.boolean(),
1535
1704
  stack_started_at_ms: epochMs.nullable(),
1536
- servers: z23.array(StackServer).max(64),
1705
+ servers: z24.array(StackServer).max(64),
1537
1706
  /** One line about the one-shot setup steps ("Docker Desktop: running."), or null. */
1538
- setup_note: z23.string().max(500).nullable(),
1707
+ setup_note: z24.string().max(500).nullable(),
1539
1708
  /** Start everything / Stop everything in flight. */
1540
- pending: z23.strictObject({ verb: z23.enum(["start", "stop"]), label: z23.string().max(64), since_ms: epochMs }).nullable(),
1709
+ pending: z24.strictObject({ verb: z24.enum(["start", "stop"]), label: z24.string().max(64), since_ms: epochMs }).nullable(),
1541
1710
  /** The newest entries last. */
1542
- events: z23.array(StackEvent).max(300)
1711
+ events: z24.array(StackEvent).max(300)
1543
1712
  });
1544
- var StackStartParams = z23.strictObject({});
1545
- var StackStopParams = z23.strictObject({});
1546
- var StackRunResult = z23.strictObject({ accepted: z23.boolean() });
1547
- var StackServerActionParams = z23.strictObject({
1713
+ var StackStartParams = z24.strictObject({});
1714
+ var StackStopParams = z24.strictObject({});
1715
+ var StackRunResult = z24.strictObject({ accepted: z24.boolean() });
1716
+ var StackServerActionParams = z24.strictObject({
1548
1717
  name: StackServerName,
1549
- verb: z23.enum(["start", "stop", "restart"])
1718
+ verb: z24.enum(["start", "stop", "restart"])
1550
1719
  });
1551
- var StackServerActionResult = z23.strictObject({ message: z23.string().max(1e3) });
1552
- var StackLogsParams = z23.strictObject({
1720
+ var StackServerActionResult = z24.strictObject({ message: z24.string().max(1e3) });
1721
+ var StackLogsParams = z24.strictObject({
1553
1722
  name: StackServerName,
1554
1723
  /** Without `offset`: the last this-many complete lines. With it: new lines after it, at most this many. */
1555
- lines: z23.int().min(1).max(2e5).default(2e3),
1724
+ lines: z24.int().min(1).max(2e5).default(2e3),
1556
1725
  /** Byte offset the last read ended at: answer only what was written after it (follow). */
1557
1726
  offset: nonNegInt.optional(),
1558
1727
  /** A "Clear" point: the lines written after this byte offset (no `offset`). */
1559
1728
  since: nonNegInt.optional(),
1560
1729
  /** With `offset`: wait up to this long for a new line when none is waiting (0 answers at once). */
1561
- wait_ms: z23.int().min(0).max(25e3).default(0)
1730
+ wait_ms: z24.int().min(0).max(25e3).default(0)
1562
1731
  });
1563
- var StackLogsResult = z23.strictObject({
1732
+ var StackLogsResult = z24.strictObject({
1564
1733
  /** Complete lines, colour codes removed. */
1565
- lines: z23.array(z23.string().max(65536)).max(2e5),
1734
+ lines: z24.array(z24.string().max(65536)).max(2e5),
1566
1735
  /** Where these lines end: pass it back as `offset` to follow. */
1567
1736
  offset: nonNegInt,
1568
1737
  /** False when `since` no longer exists (the log rotated): the lines are the plain tail instead. */
1569
- since_valid: z23.boolean(),
1738
+ since_valid: z24.boolean(),
1570
1739
  /** The log was rotated or truncated since `offset`: these lines start the file again. */
1571
- reset: z23.boolean(),
1572
- log_file: z23.string().max(4096)
1740
+ reset: z24.boolean(),
1741
+ log_file: z24.string().max(4096)
1573
1742
  });
1574
- var StackErrorsParams = z23.strictObject({
1575
- window_minutes: z23.int().min(1).max(1440).default(60)
1743
+ var StackErrorsParams = z24.strictObject({
1744
+ window_minutes: z24.int().min(1).max(1440).default(60)
1576
1745
  });
1577
- var StackErrorsResult = z23.strictObject({
1746
+ var StackErrorsResult = z24.strictObject({
1578
1747
  /** Per server: a heading line ("=== aidream — errors in the last 60 minutes (<file>) ===") and each error with the 10 lines after it. */
1579
- sections: z23.array(z23.strictObject({ name: StackServerName, heading: z23.string().max(4096), lines: z23.array(z23.string().max(65536)).max(5e3) })).max(64),
1580
- window_minutes: z23.int().min(1).max(1440)
1748
+ sections: z24.array(z24.strictObject({ name: StackServerName, heading: z24.string().max(4096), lines: z24.array(z24.string().max(65536)).max(5e3) })).max(64),
1749
+ window_minutes: z24.int().min(1).max(1440)
1581
1750
  });
1582
1751
 
1583
1752
  // src/schema/fs-watch.ts
1584
- import { z as z24 } from "zod";
1585
- var FsWatchId = z24.string().regex(/^fw_[A-Za-z0-9]{12,40}$/);
1586
- var FsWatchStartParams = z24.strictObject({
1753
+ import { z as z25 } from "zod";
1754
+ var FsWatchId = z25.string().regex(/^fw_[A-Za-z0-9]{12,40}$/);
1755
+ var FsWatchStartParams = z25.strictObject({
1587
1756
  path: AbsPath,
1588
- recursive: z24.boolean().default(true),
1757
+ recursive: z25.boolean().default(true),
1589
1758
  /** Globs relative to `path` whose changes are not reported (".git/**", "node_modules/**"). */
1590
- ignore: z24.array(z24.string().max(256)).max(64).default([])
1759
+ ignore: z25.array(z25.string().max(256)).max(64).default([])
1591
1760
  });
1592
- var FsWatchStartResult = z24.strictObject({
1761
+ var FsWatchStartResult = z25.strictObject({
1593
1762
  watch_id: FsWatchId,
1594
1763
  path: AbsPath,
1595
1764
  /** The watch ends by itself if nobody reads it for 30 minutes. */
1596
1765
  expires_at_ms: epochMs
1597
1766
  });
1598
- var FsWatchEventsParams = z24.strictObject({
1767
+ var FsWatchEventsParams = z25.strictObject({
1599
1768
  watch_id: FsWatchId,
1600
1769
  /** Wait up to this long for a first change when none is waiting (0 answers at once). */
1601
- wait_ms: z24.int().min(0).max(25e3).default(0)
1770
+ wait_ms: z25.int().min(0).max(25e3).default(0)
1602
1771
  });
1603
- var FsWatchEventsResult = z24.strictObject({
1772
+ var FsWatchEventsResult = z25.strictObject({
1604
1773
  /** What changed since the last read, oldest first; re-checked against the disk when read. */
1605
- changes: z24.array(FsChange).max(1e3),
1774
+ changes: z25.array(FsChange).max(1e3),
1606
1775
  /** Changes were dropped (more than 1000 waited): list the folder again. */
1607
- overflow: z24.boolean(),
1776
+ overflow: z25.boolean(),
1608
1777
  expires_at_ms: epochMs
1609
1778
  });
1610
- var FsWatchStopParams = z24.strictObject({ watch_id: FsWatchId });
1611
- var FsWatchStopResult = z24.strictObject({ watch_id: FsWatchId });
1779
+ var FsWatchStopParams = z25.strictObject({ watch_id: FsWatchId });
1780
+ var FsWatchStopResult = z25.strictObject({ watch_id: FsWatchId });
1612
1781
 
1613
1782
  // src/schema/exec-job.ts
1614
- import { z as z25 } from "zod";
1615
- var ExecJobId = z25.string().regex(/^job_[A-Za-z0-9]{12,40}$/);
1616
- var ExecJobStartParams = z25.strictObject({
1617
- command: z25.string().min(1).max(131072),
1783
+ import { z as z26 } from "zod";
1784
+ var ExecJobId = z26.string().regex(/^job_[A-Za-z0-9]{12,40}$/);
1785
+ var ExecJobStartParams = z26.strictObject({
1786
+ command: z26.string().min(1).max(131072),
1618
1787
  /** The folder it runs in; the home folder when absent. */
1619
1788
  cwd: AbsPath.optional(),
1620
- env: z25.record(z25.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/).max(128), z25.string().max(32768)).optional()
1789
+ env: z26.record(z26.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/).max(128), z26.string().max(32768)).optional()
1621
1790
  });
1622
- var ExecJobStartResult = z25.strictObject({ job_id: ExecJobId, pid: z25.int().min(1), cwd: AbsPath });
1623
- var ExecJobOutputParams = z25.strictObject({
1791
+ var ExecJobStartResult = z26.strictObject({ job_id: ExecJobId, pid: z26.int().min(1), cwd: AbsPath });
1792
+ var ExecJobOutputParams = z26.strictObject({
1624
1793
  job_id: ExecJobId,
1625
1794
  /** Byte offset into the job's output to read from (next_offset of the last read; 0 = the start). */
1626
1795
  offset: nonNegInt.default(0),
1627
1796
  /** Wait up to this long for new output or the exit when none is waiting (0 answers at once). */
1628
- wait_ms: z25.int().min(0).max(25e3).default(0),
1629
- max_bytes: z25.int().min(1024).max(1048576).default(65536)
1797
+ wait_ms: z26.int().min(0).max(25e3).default(0),
1798
+ max_bytes: z26.int().min(1024).max(1048576).default(65536)
1630
1799
  });
1631
- var ExecJobOutputResult = z25.strictObject({
1800
+ var ExecJobOutputResult = z26.strictObject({
1632
1801
  /** stdout and stderr interleaved as they arrived (UTF-8). */
1633
- output: z25.string(),
1802
+ output: z26.string(),
1634
1803
  next_offset: nonNegInt,
1635
1804
  /** Bytes before `offset` that are gone (the job keeps its last 4 MiB). */
1636
1805
  dropped_bytes: nonNegInt,
1637
- running: z25.boolean(),
1638
- exit_code: z25.int().nullable()
1806
+ running: z26.boolean(),
1807
+ exit_code: z26.int().nullable()
1639
1808
  });
1640
- var ExecJobStopParams = z25.strictObject({
1809
+ var ExecJobStopParams = z26.strictObject({
1641
1810
  job_id: ExecJobId,
1642
1811
  /** End it at once (SIGKILL; on Windows the whole tree with /F) instead of asking it to quit. */
1643
- force: z25.boolean().default(false)
1812
+ force: z26.boolean().default(false)
1644
1813
  });
1645
- var ExecJobStopResult = z25.strictObject({ job_id: ExecJobId, exited: z25.boolean(), exit_code: z25.int().nullable() });
1646
- var ExecJobInfo = z25.strictObject({
1814
+ var ExecJobStopResult = z26.strictObject({ job_id: ExecJobId, exited: z26.boolean(), exit_code: z26.int().nullable() });
1815
+ var ExecJobInfo = z26.strictObject({
1647
1816
  job_id: ExecJobId,
1648
- command: z25.string().max(1024),
1649
- pid: z25.int().min(1),
1817
+ command: z26.string().max(1024),
1818
+ pid: z26.int().min(1),
1650
1819
  cwd: AbsPath,
1651
- running: z25.boolean(),
1652
- exit_code: z25.int().nullable(),
1820
+ running: z26.boolean(),
1821
+ exit_code: z26.int().nullable(),
1653
1822
  started_at_ms: epochMs,
1654
1823
  output_bytes: nonNegInt
1655
1824
  });
1656
- var ExecJobListParams = z25.strictObject({});
1657
- var ExecJobListResult = z25.strictObject({ jobs: z25.array(ExecJobInfo).max(64) });
1825
+ var ExecJobListParams = z26.strictObject({});
1826
+ var ExecJobListResult = z26.strictObject({ jobs: z26.array(ExecJobInfo).max(64) });
1658
1827
 
1659
1828
  // src/schema/coding.ts
1660
- import { z as z26 } from "zod";
1661
- import { UUID_SHAPE_PATTERN as UUID_SHAPE_PATTERN2 } from "@ai-matrx/kit/uuid";
1662
- var CodingServiceCredentials = z26.strictObject({
1663
- access_token: z26.string().min(16).max(16384),
1664
- user_id: z26.string().regex(UUID_SHAPE_PATTERN2),
1829
+ import { z as z27 } from "zod";
1830
+ import { UUID_SHAPE_PATTERN as UUID_SHAPE_PATTERN3 } from "@ai-matrx/kit/uuid";
1831
+ var CodingServiceCredentials = z27.strictObject({
1832
+ access_token: z27.string().min(16).max(16384),
1833
+ user_id: z27.string().regex(UUID_SHAPE_PATTERN3),
1665
1834
  /** The AI Matrx server this app talks to (production, or a local server on the nightly copy). */
1666
- server_url: z26.string().min(1).max(2048).regex(/^https?:\/\/[^\s/?#]+(\/[^\s?#]*)?$/)
1835
+ server_url: z27.string().min(1).max(2048).regex(/^https?:\/\/[^\s/?#]+(\/[^\s?#]*)?$/)
1667
1836
  });
1668
- var CodingHistoryBlocked = z26.enum([
1837
+ var CodingHistoryBlocked = z27.enum([
1669
1838
  "signed_out",
1670
1839
  "offline",
1671
1840
  "organization_required",
@@ -1673,11 +1842,11 @@ var CodingHistoryBlocked = z26.enum([
1673
1842
  "cloud_list_unavailable",
1674
1843
  "history_too_large"
1675
1844
  ]);
1676
- var CodingHistoryFailure = z26.strictObject({
1677
- session_id: z26.string().max(64),
1678
- reason: z26.string().max(300)
1845
+ var CodingHistoryFailure = z27.strictObject({
1846
+ session_id: z27.string().max(64),
1847
+ reason: z27.string().max(300)
1679
1848
  });
1680
- var CodingHistoryRun = z26.strictObject({
1849
+ var CodingHistoryRun = z27.strictObject({
1681
1850
  /** Claude Code sessions found on this computer. */
1682
1851
  local_sessions: nonNegInt,
1683
1852
  /** Of those, already complete in AI Matrx. */
@@ -1692,39 +1861,39 @@ var CodingHistoryRun = z26.strictObject({
1692
1861
  /** Changed while being read; a later run takes them. */
1693
1862
  changed: nonNegInt,
1694
1863
  failed: nonNegInt,
1695
- failures: z26.array(CodingHistoryFailure).max(20),
1864
+ failures: z27.array(CodingHistoryFailure).max(20),
1696
1865
  /** Candidates not reached yet. */
1697
1866
  remaining: nonNegInt,
1698
1867
  /** The one line a person reads, e.g. "Imported 12 of 14 sessions. 140 already in AI Matrx." */
1699
- summary: z26.string().max(400)
1868
+ summary: z27.string().max(400)
1700
1869
  });
1701
- var CodingHistoryStep = z26.strictObject({
1870
+ var CodingHistoryStep = z27.strictObject({
1702
1871
  /** Null when the run could not start (blocked before a plan existed). */
1703
- plan_id: z26.string().regex(/^[0-9a-f]{32}$/).nullable(),
1704
- finished: z26.boolean(),
1872
+ plan_id: z27.string().regex(/^[0-9a-f]{32}$/).nullable(),
1873
+ finished: z27.boolean(),
1705
1874
  blocked: CodingHistoryBlocked.nullable(),
1706
1875
  run: CodingHistoryRun
1707
1876
  });
1708
- var CodingPlanMissingParams = z26.strictObject({ credentials: CodingServiceCredentials.nullable() });
1709
- var CodingImportNextParams = z26.strictObject({
1710
- plan_id: z26.string().regex(/^[0-9a-f]{32}$/),
1877
+ var CodingPlanMissingParams = z27.strictObject({ credentials: CodingServiceCredentials.nullable() });
1878
+ var CodingImportNextParams = z27.strictObject({
1879
+ plan_id: z27.string().regex(/^[0-9a-f]{32}$/),
1711
1880
  credentials: CodingServiceCredentials.nullable()
1712
1881
  });
1713
- var CodingServiceProgress = z26.strictObject({
1714
- phase: z26.enum(["checking", "importing"]),
1882
+ var CodingServiceProgress = z27.strictObject({
1883
+ phase: z27.enum(["checking", "importing"]),
1715
1884
  done: nonNegInt,
1716
1885
  total: nonNegInt
1717
1886
  });
1718
- var CodingHistoryImportMissingParams = z26.strictObject({});
1719
- var CodingHistoryImportMissingResult = z26.strictObject({
1720
- state: z26.enum(["done", "blocked", "cancelled"]),
1887
+ var CodingHistoryImportMissingParams = z27.strictObject({});
1888
+ var CodingHistoryImportMissingResult = z27.strictObject({
1889
+ state: z27.enum(["done", "blocked", "cancelled"]),
1721
1890
  blocked: CodingHistoryBlocked.nullable(),
1722
1891
  run: CodingHistoryRun,
1723
1892
  elapsed_ms: nonNegInt
1724
1893
  });
1725
- var CodingHistoryProgressEvent = z26.strictObject({
1894
+ var CodingHistoryProgressEvent = z27.strictObject({
1726
1895
  request_id: RequestId,
1727
- phase: z26.enum(["checking", "importing"]),
1896
+ phase: z27.enum(["checking", "importing"]),
1728
1897
  /** Sessions settled so far, of `total` candidates (0 of 0 while checking). */
1729
1898
  done: nonNegInt,
1730
1899
  total: nonNegInt,
@@ -1733,23 +1902,23 @@ var CodingHistoryProgressEvent = z26.strictObject({
1733
1902
  });
1734
1903
 
1735
1904
  // src/schema/apps.ts
1736
- import { z as z27 } from "zod";
1737
- import { UUID_SHAPE_PATTERN as UUID_SHAPE_PATTERN3 } from "@ai-matrx/kit/uuid";
1738
- var AppKey = z27.string().regex(/^[a-z][a-z0-9_-]{0,39}$/);
1739
- var AppProfileId = z27.string().regex(UUID_SHAPE_PATTERN3);
1740
- var AppProfileLocator = z27.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}$/);
1741
- var AppSupport = z27.enum(["supported", "partial", "unsupported"]);
1742
- var AppFeatureStatus = z27.strictObject({
1905
+ import { z as z28 } from "zod";
1906
+ import { UUID_SHAPE_PATTERN as UUID_SHAPE_PATTERN4 } from "@ai-matrx/kit/uuid";
1907
+ var AppKey = z28.string().regex(/^[a-z][a-z0-9_-]{0,39}$/);
1908
+ var AppProfileId = z28.string().regex(UUID_SHAPE_PATTERN4);
1909
+ var AppProfileLocator = z28.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}$/);
1910
+ var AppSupport = z28.enum(["supported", "partial", "unsupported"]);
1911
+ var AppFeatureStatus = z28.strictObject({
1743
1912
  status: AppSupport,
1744
1913
  /** One line, set whenever status is not "supported". */
1745
- reason: z27.string().max(140).nullable()
1914
+ reason: z28.string().max(140).nullable()
1746
1915
  });
1747
- var AppInfo = z27.strictObject({
1916
+ var AppInfo = z28.strictObject({
1748
1917
  app_key: AppKey,
1749
- name: z27.string().max(64),
1750
- installed: z27.boolean(),
1918
+ name: z28.string().max(64),
1919
+ installed: z28.boolean(),
1751
1920
  /** The app's own version string, or null when it is not installed or does not say. */
1752
- version: z27.string().max(64).nullable(),
1921
+ version: z28.string().max(64).nullable(),
1753
1922
  /** The install found (an .app bundle, an .exe, a binary), or null. */
1754
1923
  location: AbsPath.nullable(),
1755
1924
  /** Open the app at all on this OS. */
@@ -1759,148 +1928,148 @@ var AppInfo = z27.strictObject({
1759
1928
  /** Plan usage read from the app's own files on this OS. */
1760
1929
  usage: AppFeatureStatus
1761
1930
  });
1762
- var AppUsageReading = z27.strictObject({
1763
- window: z27.enum(["five_hour", "weekly", "extra"]),
1931
+ var AppUsageReading = z28.strictObject({
1932
+ window: z28.enum(["five_hour", "weekly", "extra"]),
1764
1933
  /** 0–100 for five_hour and weekly; extra-usage spend as a percent of its cap (may pass 100). */
1765
- percent: z27.number().min(0).max(1e4),
1934
+ percent: z28.number().min(0).max(1e4),
1766
1935
  /** When the app recorded it. */
1767
1936
  sampled_at_ms: epochMs,
1768
1937
  /** True when the window has rolled over since the sample, so the figure has reset. */
1769
- reset_since: z27.boolean()
1938
+ reset_since: z28.boolean()
1770
1939
  });
1771
- var AppProfile = z27.strictObject({
1940
+ var AppProfile = z28.strictObject({
1772
1941
  /** The row's id; null for a folder found on disk that no row names yet. */
1773
1942
  id: AppProfileId.nullable(),
1774
1943
  app_key: AppKey,
1775
- display_name: z27.string().min(1).max(120),
1944
+ display_name: z28.string().min(1).max(120),
1776
1945
  /** The account the person means to be signed in here; null when not stated (never guessed). */
1777
- account_identity: z27.string().min(3).max(320).nullable(),
1946
+ account_identity: z28.string().min(3).max(320).nullable(),
1778
1947
  profile_locator: AppProfileLocator.nullable(),
1779
1948
  /** The device the row is tied to; null when the row names none. */
1780
1949
  device_id: DeviceId.nullable(),
1781
1950
  /** The folder this profile resolves to on this device; null for a row tied to another device. */
1782
1951
  folder: AbsPath.nullable(),
1783
1952
  /** The folder exists on this device. */
1784
- on_disk: z27.boolean(),
1953
+ on_disk: z28.boolean(),
1785
1954
  /** An instance with this profile is running; null when it could not be determined. */
1786
- running: z27.boolean().nullable(),
1955
+ running: z28.boolean().nullable(),
1787
1956
  /** Usage the app recorded for this profile; null when the app exposes none here. */
1788
- usage: z27.array(AppUsageReading).nullable(),
1957
+ usage: z28.array(AppUsageReading).nullable(),
1789
1958
  last_opened_ms: epochMs.nullable()
1790
1959
  });
1791
- var AppsListParams = z27.strictObject({});
1792
- var AppsListResult = z27.strictObject({ apps: z27.array(AppInfo) });
1793
- var AppsProfilesListParams = z27.strictObject({
1960
+ var AppsListParams = z28.strictObject({});
1961
+ var AppsListResult = z28.strictObject({ apps: z28.array(AppInfo) });
1962
+ var AppsProfilesListParams = z28.strictObject({
1794
1963
  /** Only this app's profiles; every app's when absent. */
1795
1964
  app_key: AppKey.optional()
1796
1965
  });
1797
- var AppsProfilesListResult = z27.strictObject({
1798
- profiles: z27.array(AppProfile),
1966
+ var AppsProfilesListResult = z28.strictObject({
1967
+ profiles: z28.array(AppProfile),
1799
1968
  /**
1800
1969
  * Whether the saved rows could be read: false while signed out or offline, when only folders
1801
1970
  * found on disk are listed.
1802
1971
  */
1803
- registry: z27.enum(["ok", "signed_out", "unavailable"])
1972
+ registry: z28.enum(["ok", "signed_out", "unavailable"])
1804
1973
  });
1805
- var AppsProfilesSaveParams = z27.strictObject({
1974
+ var AppsProfilesSaveParams = z28.strictObject({
1806
1975
  id: AppProfileId.optional(),
1807
1976
  app_key: AppKey,
1808
- display_name: z27.string().min(1).max(120),
1809
- account_identity: z27.string().min(3).max(320).nullable(),
1977
+ display_name: z28.string().min(1).max(120),
1978
+ account_identity: z28.string().min(3).max(320).nullable(),
1810
1979
  /** On create: the folder to use (one found on disk), or null for the app's default profile. Ignored on update. */
1811
1980
  profile_locator: AppProfileLocator.nullable(),
1812
1981
  /** On create with profile_locator null: make a new folder named after display_name instead. */
1813
- new_folder: z27.boolean().default(false)
1982
+ new_folder: z28.boolean().default(false)
1814
1983
  });
1815
1984
  var AppsProfilesSaveResult = AppProfile;
1816
- var AppsProfilesRemoveParams = z27.strictObject({ id: AppProfileId });
1817
- var AppsProfilesRemoveResult = z27.strictObject({ removed: z27.boolean() });
1818
- var AppsOpenParams = z27.strictObject({
1985
+ var AppsProfilesRemoveParams = z28.strictObject({ id: AppProfileId });
1986
+ var AppsProfilesRemoveResult = z28.strictObject({ removed: z28.boolean() });
1987
+ var AppsOpenParams = z28.strictObject({
1819
1988
  app_key: AppKey,
1820
1989
  profile_id: AppProfileId.optional()
1821
1990
  });
1822
- var AppsOpenResult = z27.strictObject({
1991
+ var AppsOpenResult = z28.strictObject({
1823
1992
  /** True when an instance with this profile was already running; it is brought forward. */
1824
- already_running: z27.boolean(),
1993
+ already_running: z28.boolean(),
1825
1994
  folder: AbsPath.nullable()
1826
1995
  });
1827
1996
 
1828
1997
  // src/schema/apps-chats.ts
1829
- import { z as z28 } from "zod";
1830
- var ChatId = z28.string().regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/);
1831
- var ChatPlace = z28.string().regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/);
1832
- var ChatProjectId = z28.string().regex(/^[a-z0-9][a-z0-9-]{0,63}$/);
1833
- var ChatWindow = z28.strictObject({
1998
+ import { z as z29 } from "zod";
1999
+ var ChatId = z29.string().regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/);
2000
+ var ChatPlace = z29.string().regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/);
2001
+ var ChatProjectId = z29.string().regex(/^[a-z0-9][a-z0-9-]{0,63}$/);
2002
+ var ChatWindow = z29.strictObject({
1834
2003
  key: ChatPlace,
1835
2004
  /** The app's default profile (Claude: the main window, which lists every account's chats). */
1836
- main: z28.boolean(),
2005
+ main: z29.boolean(),
1837
2006
  /** The account the window is signed into, when known. */
1838
- account: z28.string().max(320).nullable()
2007
+ account: z29.string().max(320).nullable()
1839
2008
  });
1840
- var ChatProject = z28.strictObject({
2009
+ var ChatProject = z29.strictObject({
1841
2010
  id: ChatProjectId,
1842
- name: z28.string().min(1).max(200),
1843
- archived: z28.boolean(),
2011
+ name: z29.string().min(1).max(200),
2012
+ archived: z29.boolean(),
1844
2013
  /** Chats in it. */
1845
2014
  count: nonNegInt
1846
2015
  });
1847
- var ChatPin = z28.strictObject({
2016
+ var ChatPin = z29.strictObject({
1848
2017
  /** The window whose account pins it; an account with no window of its own is named by its email. */
1849
- window: z28.string().min(1).max(320),
2018
+ window: z29.string().min(1).max(320),
1850
2019
  /** When that account's pin list was last read; null when the reading has no time. */
1851
2020
  observed_at_ms: epochMs.nullable()
1852
2021
  });
1853
- var ChatRunning = z28.strictObject({
2022
+ var ChatRunning = z29.strictObject({
1854
2023
  window: ChatPlace,
1855
2024
  /** process: a live process resumed this chat there (exact); activity: that window's own record moved in the last 3 minutes. */
1856
- how: z28.enum(["process", "activity"])
2025
+ how: z29.enum(["process", "activity"])
1857
2026
  });
1858
- var ChatHidden = z28.strictObject({
2027
+ var ChatHidden = z29.strictObject({
1859
2028
  window: ChatPlace,
1860
- reason: z28.string().max(200)
2029
+ reason: z29.string().max(200)
1861
2030
  });
1862
- var ChatLastUse = z28.strictObject({
2031
+ var ChatLastUse = z29.strictObject({
1863
2032
  /** The conversation's last reply. */
1864
2033
  at_ms: epochMs,
1865
2034
  window: ChatPlace.nullable(),
1866
- account: z28.string().max(320).nullable(),
2035
+ account: z29.string().max(320).nullable(),
1867
2036
  /** How the window was decided (one short line). */
1868
- how: z28.string().max(120).nullable(),
2037
+ how: z29.string().max(120).nullable(),
1869
2038
  /** The account's 1-hour prompt cache is still warm. */
1870
- cache_warm: z28.boolean(),
2039
+ cache_warm: z29.boolean(),
1871
2040
  cache_minutes_left: nonNegInt
1872
2041
  });
1873
- var ChatAppProject = z28.strictObject({
1874
- id: z28.string().min(1).max(200),
1875
- name: z28.string().max(200)
2042
+ var ChatAppProject = z29.strictObject({
2043
+ id: z29.string().min(1).max(200),
2044
+ name: z29.string().max(200)
1876
2045
  });
1877
- var ChatTitleSource = z28.enum(["app", "app-remembered", "custom-title", "ai-title", "agent-name", "summary", "first-prompt", "last-prompt"]);
1878
- var ChatRow = z28.strictObject({
2046
+ var ChatTitleSource = z29.enum(["app", "app-remembered", "custom-title", "ai-title", "agent-name", "summary", "first-prompt", "last-prompt"]);
2047
+ var ChatRow = z29.strictObject({
1879
2048
  id: ChatId,
1880
2049
  /** The short id people see (the listing's first 8 characters). */
1881
- short_id: z28.string().max(16),
2050
+ short_id: z29.string().max(16),
1882
2051
  /** The listing's own name (Claude: local_<id>), null for a chat only in the holder. */
1883
- record: z28.string().max(160).nullable(),
1884
- title: z28.string().max(1e3),
2052
+ record: z29.string().max(160).nullable(),
2053
+ title: z29.string().max(1e3),
1885
2054
  last_active_ms: epochMs.nullable(),
1886
2055
  created_ms: epochMs.nullable(),
1887
- projects: z28.array(ChatProjectId).max(500),
1888
- starred: z28.boolean(),
1889
- pinned_in: z28.array(ChatPin).max(200),
2056
+ projects: z29.array(ChatProjectId).max(500),
2057
+ starred: z29.boolean(),
2058
+ pinned_in: z29.array(ChatPin).max(200),
1890
2059
  /** Every place it is listed now: window keys, plus "holder". */
1891
- places: z28.array(ChatPlace).max(200),
1892
- held: z28.boolean(),
1893
- running: z28.array(ChatRunning).max(200),
1894
- hidden_in: z28.array(ChatHidden).max(200),
2060
+ places: z29.array(ChatPlace).max(200),
2061
+ held: z29.boolean(),
2062
+ running: z29.array(ChatRunning).max(200),
2063
+ hidden_in: z29.array(ChatHidden).max(200),
1895
2064
  /** Kept out of the main window on purpose. */
1896
- hidden_from_main: z28.boolean(),
2065
+ hidden_from_main: z29.boolean(),
1897
2066
  /** Listed in a side window and not yet copied into main. */
1898
- main_pending: z28.boolean(),
2067
+ main_pending: z29.boolean(),
1899
2068
  /** A scheduled routine's run (its task id). */
1900
- scheduled: z28.string().max(200).nullable(),
2069
+ scheduled: z29.string().max(200).nullable(),
1901
2070
  /** Created recently and in no project: offered for filing. */
1902
- new_unfiled: z28.boolean(),
1903
- warnings: z28.array(z28.string().max(400)).max(20),
2071
+ new_unfiled: z29.boolean(),
2072
+ warnings: z29.array(z29.string().max(400)).max(20),
1904
2073
  last_use: ChatLastUse.nullable(),
1905
2074
  /** 1.13: the app's own project the chat is grouped under in the app (Codex), read only; absent = none or not an app that groups. */
1906
2075
  app_project: ChatAppProject.optional(),
@@ -1910,340 +2079,344 @@ var ChatRow = z28.strictObject({
1910
2079
  * 1.14: the chat's own title before the person's rename (the one title rule, `@ai-matrx/coding-sessions/sessions`);
1911
2080
  * `title` is what to show (`title_override` when set, else this).
1912
2081
  */
1913
- original_title: z28.string().max(1e3).optional(),
2082
+ original_title: z29.string().max(1e3).optional(),
1914
2083
  /** 1.14: where `original_title` came from (the one rule's sources, strongest first; 1.15: a closed set). */
1915
2084
  title_source: ChatTitleSource.optional(),
1916
2085
  /** 1.14: the person's rename inside Matrx (Coding Sessions), applied once by the row builder; absent = none. */
1917
- title_override: z28.string().min(1).max(300).optional(),
2086
+ title_override: z29.string().min(1).max(300).optional(),
1918
2087
  /** 1.15: the app itself archived it (hidden_in says where and why, in words for people; this is the typed fact). */
1919
- archived: z28.boolean().optional()
2088
+ archived: z29.boolean().optional()
1920
2089
  });
1921
- var ChatFamily = z28.strictObject({
2090
+ var ChatFamily = z29.strictObject({
1922
2091
  id: ChatId,
1923
2092
  fork_of: ChatId.nullable(),
1924
2093
  copy_of: ChatId.nullable()
1925
2094
  });
1926
- var AppsChatsListParams = z28.strictObject({
2095
+ var AppsChatsListParams = z29.strictObject({
1927
2096
  app_key: AppKey,
1928
2097
  /** Only these chats (a live update re-reads just what changed). */
1929
- ids: z28.array(ChatId).max(500).optional()
2098
+ ids: z29.array(ChatId).max(500).optional()
1930
2099
  });
1931
- var AppsChatsListResult = z28.strictObject({
2100
+ var AppsChatsListResult = z29.strictObject({
1932
2101
  app_key: AppKey,
1933
2102
  /** Bumps on every change the index sees; `apps.chats.changed` carries the same number. */
1934
2103
  version: nonNegInt,
1935
- windows: z28.array(ChatWindow).max(200),
1936
- projects: z28.array(ChatProject).max(5e3),
1937
- chats: z28.array(ChatRow).max(2e4),
2104
+ windows: z29.array(ChatWindow).max(200),
2105
+ projects: z29.array(ChatProject).max(5e3),
2106
+ chats: z29.array(ChatRow).max(2e4),
1938
2107
  /** How long a chat in no project counts as new. */
1939
2108
  new_window_ms: nonNegInt,
1940
2109
  /** 1.9: this is the copy saved at the last read, shown while everything is read again. */
1941
- updating: z28.boolean().optional(),
2110
+ updating: z29.boolean().optional(),
1942
2111
  /** 1.9: false while the folder watches are down (changes are not arriving); `apps.chats.watch_state` says when it changes. */
1943
- live: z28.boolean().optional(),
2112
+ live: z29.boolean().optional(),
1944
2113
  /** 1.10: every listed chat that is a fork or a copy of another (read from the conversations' first lines). */
1945
- families: z28.array(ChatFamily).max(2e4).optional()
2114
+ families: z29.array(ChatFamily).max(2e4).optional()
1946
2115
  });
1947
- var AppsChatsWatchParams = z28.strictObject({ app_key: AppKey });
1948
- var AppsChatsWatchResult = z28.strictObject({ resource_id: ResourceId, version: nonNegInt });
1949
- var AppsChatsChangedEvent = z28.strictObject({
2116
+ var AppsChatsWatchParams = z29.strictObject({ app_key: AppKey });
2117
+ var AppsChatsWatchResult = z29.strictObject({ resource_id: ResourceId, version: nonNegInt });
2118
+ var AppsChatsChangedEvent = z29.strictObject({
1950
2119
  app_key: AppKey,
1951
2120
  version: nonNegInt,
1952
- ids: z28.array(ChatId).max(1e3),
1953
- all: z28.boolean()
2121
+ ids: z29.array(ChatId).max(1e3),
2122
+ all: z29.boolean()
1954
2123
  });
1955
- var AppsChatsWatchStateEvent = z28.strictObject({
2124
+ var AppsChatsWatchStateEvent = z29.strictObject({
1956
2125
  app_key: AppKey,
1957
- live: z28.boolean(),
1958
- updating: z28.boolean(),
1959
- reason: z28.string().max(300).nullable()
2126
+ live: z29.boolean(),
2127
+ updating: z29.boolean(),
2128
+ reason: z29.string().max(300).nullable()
1960
2129
  });
1961
- var AppsChatsPlaceParams = z28.strictObject({
2130
+ var AppsChatsPlaceParams = z29.strictObject({
1962
2131
  app_key: AppKey,
1963
2132
  chat_id: ChatId,
1964
- action: z28.enum(["place", "take_off", "hold"]),
2133
+ action: z29.enum(["place", "take_off", "hold"]),
1965
2134
  /** The window (for place and take_off). */
1966
2135
  window: ChatPlace.optional(),
1967
2136
  /** take_off where it is open: stop it there first (the person confirmed). */
1968
- stop_if_open: z28.boolean().default(false)
2137
+ stop_if_open: z29.boolean().default(false)
1969
2138
  });
1970
- var AppsChatsPlaceResult = z28.strictObject({ chat: ChatRow, message: z28.string().max(400) });
1971
- var AppsProjectsFileManyParams = z28.strictObject({
2139
+ var AppsChatsPlaceResult = z29.strictObject({ chat: ChatRow, message: z29.string().max(400) });
2140
+ var AppsProjectsFileManyParams = z29.strictObject({
1972
2141
  app_key: AppKey,
1973
- chat_ids: z28.array(ChatId).min(1).max(500),
2142
+ chat_ids: z29.array(ChatId).min(1).max(500),
1974
2143
  project_id: ChatProjectId.optional(),
1975
- new_project_name: z28.string().min(1).max(200).optional()
2144
+ new_project_name: z29.string().min(1).max(200).optional()
1976
2145
  });
1977
- var AppsProjectsFileManyResult = z28.strictObject({ chats: z28.array(ChatRow).max(500), project: ChatProject });
1978
- var AppsProjectsUpdateParams = z28.strictObject({
2146
+ var AppsProjectsFileManyResult = z29.strictObject({ chats: z29.array(ChatRow).max(500), project: ChatProject });
2147
+ var AppsProjectsUpdateParams = z29.strictObject({
1979
2148
  app_key: AppKey,
1980
2149
  project_id: ChatProjectId,
1981
- name: z28.string().min(1).max(200).optional(),
1982
- archived: z28.boolean().optional()
2150
+ name: z29.string().min(1).max(200).optional(),
2151
+ archived: z29.boolean().optional()
1983
2152
  });
1984
- var AppsProjectsUpdateResult = z28.strictObject({ project: ChatProject });
1985
- var AppsProjectsCopyParams = z28.strictObject({ app_key: AppKey, project_id: ChatProjectId, new_project_name: z28.string().min(1).max(200) });
1986
- var AppsProjectsCopyResult = z28.strictObject({ project: ChatProject });
1987
- var AppsProjectsFileParams = z28.strictObject({
2153
+ var AppsProjectsUpdateResult = z29.strictObject({ project: ChatProject });
2154
+ var AppsProjectsCopyParams = z29.strictObject({ app_key: AppKey, project_id: ChatProjectId, new_project_name: z29.string().min(1).max(200) });
2155
+ var AppsProjectsCopyResult = z29.strictObject({ project: ChatProject });
2156
+ var AppsProjectsFileParams = z29.strictObject({
1988
2157
  app_key: AppKey,
1989
2158
  chat_id: ChatId,
1990
2159
  project_id: ChatProjectId.optional(),
1991
- new_project_name: z28.string().min(1).max(200).optional()
2160
+ new_project_name: z29.string().min(1).max(200).optional()
1992
2161
  });
1993
- var AppsProjectsFileResult = z28.strictObject({ chat: ChatRow, project: ChatProject });
1994
- var AppsProjectsUnfileParams = z28.strictObject({ app_key: AppKey, chat_id: ChatId, project_id: ChatProjectId });
1995
- var AppsProjectsUnfileResult = z28.strictObject({ chat: ChatRow });
1996
- var AppsChatsStarParams = z28.strictObject({ app_key: AppKey, chat_id: ChatId, starred: z28.boolean() });
1997
- var AppsChatsStarResult = z28.strictObject({ chat: ChatRow });
2162
+ var AppsProjectsFileResult = z29.strictObject({ chat: ChatRow, project: ChatProject });
2163
+ var AppsProjectsUnfileParams = z29.strictObject({ app_key: AppKey, chat_id: ChatId, project_id: ChatProjectId });
2164
+ var AppsProjectsUnfileResult = z29.strictObject({ chat: ChatRow });
2165
+ var AppsChatsStarParams = z29.strictObject({ app_key: AppKey, chat_id: ChatId, starred: z29.boolean() });
2166
+ var AppsChatsStarResult = z29.strictObject({ chat: ChatRow });
1998
2167
 
1999
2168
  // src/schema/apps-accounts.ts
2000
- import { z as z29 } from "zod";
2001
- var AppWindowInfo = z29.strictObject({
2169
+ import { z as z30 } from "zod";
2170
+ var AppWindowInfo = z30.strictObject({
2002
2171
  key: ChatPlace,
2003
2172
  /** The app's default profile (Claude: main, which may sign into any account). */
2004
- main: z29.boolean(),
2173
+ main: z30.boolean(),
2005
2174
  /** The account the window is meant for (null for main). */
2006
- account: z29.string().max(320).nullable(),
2175
+ account: z30.string().max(320).nullable(),
2007
2176
  /** The account signed in there now: an email, or the account id while it has no saved name. */
2008
- signed_in: z29.string().max(320).nullable(),
2009
- signed_in_is_email: z29.boolean(),
2177
+ signed_in: z30.string().max(320).nullable(),
2178
+ signed_in_is_email: z30.boolean(),
2010
2179
  /** Signed into another account than the one it is meant for. */
2011
- mismatch: z29.boolean(),
2180
+ mismatch: z30.boolean(),
2012
2181
  /** Its folder exists. */
2013
- created: z29.boolean(),
2182
+ created: z30.boolean(),
2014
2183
  /** Open now. */
2015
- running: z29.boolean(),
2184
+ running: z30.boolean(),
2016
2185
  /** Chats open in it now (a process resuming each one). */
2017
2186
  open_chats: nonNegInt
2018
2187
  });
2019
- var AccountUsage = z29.strictObject({
2188
+ var AccountUsage = z30.strictObject({
2020
2189
  /** The account's email, or "org <8 chars>" when no window has ever sampled that org. */
2021
- account: z29.string().max(320),
2022
- org: z29.string().max(80).nullable(),
2190
+ account: z30.string().max(320),
2191
+ org: z30.string().max(80).nullable(),
2023
2192
  /** False when the org was sampled in several accounts' windows and the vote is not clear (≥ 75 %). */
2024
- account_certain: z29.boolean(),
2193
+ account_certain: z30.boolean(),
2025
2194
  /** 5-hour use in percent (0 once the reading is over 5 hours old). */
2026
- five_hour: z29.number().nullable(),
2027
- five_hour_reset_since: z29.boolean(),
2195
+ five_hour: z30.number().nullable(),
2196
+ five_hour_reset_since: z30.boolean(),
2028
2197
  /** Weekly use in percent (0 once the week reset after the reading). */
2029
- weekly: z29.number().nullable(),
2030
- weekly_reset_since: z29.boolean(),
2198
+ weekly: z30.number().nullable(),
2199
+ weekly_reset_since: z30.boolean(),
2031
2200
  /** Extra-usage spend in percent of its cap, when on. */
2032
- extra_usage: z29.number().nullable(),
2201
+ extra_usage: z30.number().nullable(),
2033
2202
  extra_usage_as_of_ms: epochMs.nullable(),
2034
2203
  as_of_ms: epochMs,
2035
2204
  /** The windows meant for this account (and main when main took the reading). */
2036
- windows: z29.array(ChatPlace).max(200),
2205
+ windows: z30.array(ChatPlace).max(200),
2037
2206
  /** The window that took the reading is open now and the reading is under 30 minutes old. */
2038
- live: z29.boolean(),
2207
+ live: z30.boolean(),
2039
2208
  /** The next weekly reset, when known. */
2040
2209
  weekly_resets_at_ms: epochMs.nullable(),
2041
2210
  /** That reset time is Claude's own (its reading, or a reset seen in its usage history). */
2042
- weekly_reset_official: z29.boolean().nullable(),
2211
+ weekly_reset_official: z30.boolean().nullable(),
2043
2212
  /** 1.13: the account's plan as the app names it (Codex: "pro", "prolite"), when recorded. */
2044
- plan: z29.string().max(80).optional(),
2213
+ plan: z30.string().max(80).optional(),
2045
2214
  /** 1.13: the account's credit balance as the app records it (Codex), when recorded. */
2046
- credits: z29.string().max(40).optional()
2215
+ credits: z30.string().max(40).optional()
2047
2216
  });
2048
- var AccountReset = z29.strictObject({
2217
+ var AccountReset = z30.strictObject({
2049
2218
  window: ChatPlace,
2050
- account: z29.string().max(320).nullable(),
2219
+ account: z30.string().max(320).nullable(),
2051
2220
  next_reset_ms: epochMs.nullable(),
2052
2221
  /** claude: the app's own reading; usage_history: a weekly drop seen in its usage record; your_list: the person's own entry. */
2053
- source: z29.enum(["claude", "usage_history", "your_list"]).nullable(),
2222
+ source: z30.enum(["claude", "usage_history", "your_list"]).nullable(),
2054
2223
  /** claude or usage_history. */
2055
- official: z29.boolean(),
2224
+ official: z30.boolean(),
2056
2225
  /** Set when the person's list disagrees with the official time. */
2057
- note: z29.string().max(200).nullable()
2226
+ note: z30.string().max(200).nullable()
2058
2227
  });
2059
- var AppsWindowsListParams = z29.strictObject({ app_key: AppKey });
2060
- var AppsWindowsListResult = z29.strictObject({ app_key: AppKey, windows: z29.array(AppWindowInfo).max(200) });
2061
- var AppsAccountsUsageParams = z29.strictObject({ app_key: AppKey });
2062
- var AppsAccountsUsageResult = z29.strictObject({
2228
+ var AppsWindowsListParams = z30.strictObject({ app_key: AppKey });
2229
+ var AppsWindowsListResult = z30.strictObject({ app_key: AppKey, windows: z30.array(AppWindowInfo).max(200) });
2230
+ var AppsAccountsUsageParams = z30.strictObject({ app_key: AppKey });
2231
+ var AppsAccountsUsageResult = z30.strictObject({
2063
2232
  app_key: AppKey,
2064
- accounts: z29.array(AccountUsage).max(500),
2233
+ accounts: z30.array(AccountUsage).max(500),
2065
2234
  /** 1.12: the rows are right but something around them failed (a newly read reset time could not be saved); shown, never hidden. */
2066
- problem: z29.string().max(400).optional()
2235
+ problem: z30.string().max(400).optional()
2067
2236
  });
2068
- var AppsAccountsResetsParams = z29.strictObject({ app_key: AppKey });
2069
- var AppsAccountsResetsResult = z29.strictObject({
2237
+ var AppsAccountsResetsParams = z30.strictObject({ app_key: AppKey });
2238
+ var AppsAccountsResetsResult = z30.strictObject({
2070
2239
  app_key: AppKey,
2071
- resets: z29.array(AccountReset).max(200),
2240
+ resets: z30.array(AccountReset).max(200),
2072
2241
  /** 1.12: as on `apps.accounts.usage`. */
2073
- problem: z29.string().max(400).optional()
2242
+ problem: z30.string().max(400).optional()
2074
2243
  });
2075
- var AppsWindowActionResult = z29.strictObject({ message: z29.string().max(400) });
2076
- var AppsWindowsOpenParams = z29.strictObject({ app_key: AppKey, window: ChatPlace });
2077
- var AppsWindowsReloadParams = z29.strictObject({ app_key: AppKey, window: ChatPlace });
2078
- var ShownSection = z29.strictObject({
2079
- title: z29.string().max(300),
2244
+ var AppsWindowActionResult = z30.strictObject({ message: z30.string().max(400) });
2245
+ var AppsWindowsOpenParams = z30.strictObject({ app_key: AppKey, window: ChatPlace });
2246
+ var AppsWindowsReloadParams = z30.strictObject({ app_key: AppKey, window: ChatPlace });
2247
+ var ShownSection = z30.strictObject({
2248
+ title: z30.string().max(300),
2080
2249
  /** Rows drawn under it (a collapsed section draws none). */
2081
- rows: z29.number().int().nonnegative(),
2082
- expanded: z29.boolean()
2250
+ rows: z30.number().int().nonnegative(),
2251
+ expanded: z30.boolean()
2083
2252
  });
2084
- var AppsWindowsShownParams = z29.strictObject({ app_key: AppKey, window: ChatPlace });
2085
- var AppsWindowsShownResult = z29.strictObject({
2253
+ var AppsWindowsShownParams = z30.strictObject({ app_key: AppKey, window: ChatPlace });
2254
+ var AppsWindowsShownResult = z30.strictObject({
2086
2255
  window: ChatPlace,
2087
- open: z29.boolean(),
2088
- sections: z29.array(ShownSection).max(200),
2089
- problem: z29.string().max(400).nullable()
2256
+ open: z30.boolean(),
2257
+ sections: z30.array(ShownSection).max(200),
2258
+ problem: z30.string().max(400).nullable()
2090
2259
  });
2091
- var AppsWindowsRestartParams = z29.strictObject({ app_key: AppKey, window: ChatPlace, force: z29.boolean().default(false) });
2092
- var AppsWindowsRefreshUsageParams = z29.strictObject({ app_key: AppKey, window: ChatPlace });
2093
- var AppsProjectsMoveParams = z29.strictObject({
2260
+ var AppsWindowsRestartParams = z30.strictObject({ app_key: AppKey, window: ChatPlace, force: z30.boolean().default(false) });
2261
+ var AppsWindowsRefreshUsageParams = z30.strictObject({ app_key: AppKey, window: ChatPlace });
2262
+ var AppsProjectsMoveParams = z30.strictObject({
2094
2263
  app_key: AppKey,
2095
2264
  chat_id: ChatId,
2096
2265
  from_project_id: ChatProjectId,
2097
2266
  to_project_id: ChatProjectId.optional(),
2098
- new_project_name: z29.string().min(1).max(200).optional()
2099
- });
2100
- var AppsProjectsMoveResult = z29.strictObject({ chat: ChatRow, project: ChatProject });
2101
- var AppsProjectsCreateParams = z29.strictObject({ app_key: AppKey, name: z29.string().min(1).max(200) });
2102
- var AppsProjectsCreateResult = z29.strictObject({ project: ChatProject });
2103
- var AppsProjectsImportPinsParams = z29.strictObject({ app_key: AppKey });
2104
- var AppsProjectsImportPinsResult = z29.strictObject({ message: z29.string().max(400) });
2105
- var ProjectMoveChat = z29.strictObject({ chat_id: ChatId, title: z29.string().max(300) });
2106
- var ProjectMoveSkip = z29.strictObject({ chat_id: ChatId, title: z29.string().max(300), window: ChatPlace.nullable(), reason: z29.string().max(400) });
2107
- var ProjectMoveGroup = z29.strictObject({
2108
- ok: z29.boolean(),
2109
- name: z29.string().max(200),
2267
+ new_project_name: z30.string().min(1).max(200).optional()
2268
+ });
2269
+ var AppsProjectsMoveResult = z30.strictObject({ chat: ChatRow, project: ChatProject });
2270
+ var AppsProjectsCreateParams = z30.strictObject({ app_key: AppKey, name: z30.string().min(1).max(200) });
2271
+ var AppsProjectsCreateResult = z30.strictObject({ project: ChatProject });
2272
+ var AppsProjectsImportPinsParams = z30.strictObject({ app_key: AppKey });
2273
+ var AppsProjectsImportPinsResult = z30.strictObject({ message: z30.string().max(400) });
2274
+ var ProjectMoveChat = z30.strictObject({ chat_id: ChatId, title: z30.string().max(300) });
2275
+ var ProjectMoveSkip = z30.strictObject({ chat_id: ChatId, title: z30.string().max(300), window: ChatPlace.nullable(), reason: z30.string().max(400) });
2276
+ var ProjectMoveGroup = z30.strictObject({
2277
+ ok: z30.boolean(),
2278
+ name: z30.string().max(200),
2110
2279
  /** Why it is not (or was not) grouped — e.g. the window is open. */
2111
- reason: z29.string().max(400).optional(),
2280
+ reason: z30.string().max(400).optional(),
2112
2281
  /** Chats that get (or got) the group; already in it; taken from another group of the window. */
2113
2282
  assign: nonNegInt.optional(),
2114
2283
  already: nonNegInt.optional(),
2115
2284
  from_other_groups: nonNegInt.optional(),
2116
2285
  /** A group of that name was already there (reused, never doubled). */
2117
- group_exists: z29.boolean().optional()
2286
+ group_exists: z30.boolean().optional()
2118
2287
  });
2119
- var AppsProjectsToWindowParams = z29.strictObject({
2288
+ var AppsProjectsToWindowParams = z30.strictObject({
2120
2289
  app_key: AppKey,
2121
2290
  project_id: ChatProjectId,
2122
2291
  window: ChatPlace,
2123
2292
  /** Also take each chat off its other side windows where safe (never main, the holder, an open window). */
2124
- take_off: z29.boolean().default(false),
2293
+ take_off: z30.boolean().default(false),
2125
2294
  /** Also group them under the project's name in that window's sidebar (closed windows only). */
2126
- group: z29.boolean().default(false),
2127
- dry_run: z29.boolean().default(false)
2295
+ group: z30.boolean().default(false),
2296
+ dry_run: z30.boolean().default(false)
2128
2297
  });
2129
- var AppsProjectsToWindowResult = z29.strictObject({
2298
+ var AppsProjectsToWindowResult = z30.strictObject({
2130
2299
  project_id: ChatProjectId,
2131
2300
  window: ChatPlace,
2132
- dry_run: z29.boolean(),
2133
- place: z29.array(ProjectMoveChat).max(5e3),
2134
- already: z29.array(ProjectMoveChat).max(5e3),
2135
- take_off: z29.array(ProjectMoveChat.extend({ window: ChatPlace })).max(2e4),
2136
- skipped: z29.array(ProjectMoveSkip).max(2e4),
2301
+ dry_run: z30.boolean(),
2302
+ place: z30.array(ProjectMoveChat).max(5e3),
2303
+ already: z30.array(ProjectMoveChat).max(5e3),
2304
+ take_off: z30.array(ProjectMoveChat.extend({ window: ChatPlace })).max(2e4),
2305
+ skipped: z30.array(ProjectMoveSkip).max(2e4),
2137
2306
  /** Chats of the project from other apps (no windows to place into), left as they are. */
2138
2307
  other_apps: nonNegInt,
2139
2308
  group: ProjectMoveGroup.nullable(),
2140
- message: z29.string().max(400)
2309
+ message: z30.string().max(400)
2141
2310
  });
2142
- var ColdChat = z29.strictObject({
2311
+ var ColdChat = z30.strictObject({
2143
2312
  id: ChatId,
2144
- title: z29.string().max(1e3),
2145
- repo: z29.string().max(200).nullable(),
2146
- window: z29.string().max(64).nullable(),
2147
- account: z29.string().max(320).nullable(),
2148
- model_name: z29.string().max(120).nullable(),
2313
+ title: z30.string().max(1e3),
2314
+ repo: z30.string().max(200).nullable(),
2315
+ window: z30.string().max(64).nullable(),
2316
+ account: z30.string().max(320).nullable(),
2317
+ model_name: z30.string().max(120).nullable(),
2149
2318
  context_tokens: nonNegInt,
2150
2319
  cold_at_ms: epochMs,
2151
2320
  /** Waking it once the cache is cold. */
2152
- cold_cost: z29.number().nullable(),
2321
+ cold_cost: z30.number().nullable(),
2153
2322
  /** Waking it while the cache is warm. */
2154
- warm_cost: z29.number().nullable(),
2323
+ warm_cost: z30.number().nullable(),
2155
2324
  /** Its account is on extra usage (a 5-minute cache, and real money). */
2156
- extra_usage: z29.boolean(),
2325
+ extra_usage: z30.boolean(),
2157
2326
  /** A scheduled routine's run. */
2158
- scheduled: z29.boolean(),
2327
+ scheduled: z30.boolean(),
2159
2328
  /** It can be shown in its window (started in the desktop app). */
2160
- openable: z29.boolean(),
2329
+ openable: z30.boolean(),
2161
2330
  /** How its window was decided, or why it can't be opened. */
2162
- how: z29.string().max(200).nullable()
2331
+ how: z30.string().max(200).nullable()
2163
2332
  });
2164
- var AppsChatsColdParams = z29.strictObject({ app_key: AppKey });
2165
- var AppsChatsColdResult = z29.strictObject({
2333
+ var AppsChatsColdParams = z30.strictObject({ app_key: AppKey });
2334
+ var AppsChatsColdResult = z30.strictObject({
2166
2335
  app_key: AppKey,
2167
2336
  /** Waiting for the person with a warm cache, most urgent first. */
2168
- waiting: z29.array(ColdChat).max(2e3),
2337
+ waiting: z30.array(ColdChat).max(2e3),
2169
2338
  /** Went cold in the last while. */
2170
- recently_cold: z29.array(ColdChat).max(2e3),
2339
+ recently_cold: z30.array(ColdChat).max(2e3),
2171
2340
  /** Chats working right now (not waiting). */
2172
2341
  working: nonNegInt
2173
2342
  });
2174
- var AppsChatsOpenParams = z29.strictObject({ app_key: AppKey, chat_id: ChatId, window: ChatPlace.optional() });
2175
- var SpendSplit = z29.strictObject({ main: z29.number(), helpers: z29.number() });
2176
- var SpendScopes = z29.strictObject({ today: SpendSplit, week: SpendSplit });
2177
- var SpendAccount = z29.strictObject({
2178
- account: z29.string().max(320),
2343
+ var AppsChatsOpenParams = z30.strictObject({ app_key: AppKey, chat_id: ChatId, window: ChatPlace.optional() });
2344
+ var SpendSplit = z30.strictObject({ main: z30.number(), helpers: z30.number() });
2345
+ var SpendScopes = z30.strictObject({ today: SpendSplit, week: SpendSplit });
2346
+ var SpendAccount = z30.strictObject({
2347
+ account: z30.string().max(320),
2179
2348
  spend: SpendScopes,
2180
- last_hour: z29.number().nullable(),
2181
- last_5h: z29.number().nullable(),
2182
- five_hour: z29.number().nullable(),
2183
- weekly: z29.number().nullable(),
2349
+ last_hour: z30.number().nullable(),
2350
+ last_5h: z30.number().nullable(),
2351
+ five_hour: z30.number().nullable(),
2352
+ weekly: z30.number().nullable(),
2184
2353
  as_of_ms: epochMs.nullable(),
2185
2354
  weekly_resets_at_ms: epochMs.nullable(),
2186
2355
  /** When the 5-hour or weekly limit is projected to be reached at the current burn. */
2187
2356
  five_hour_full_at_ms: epochMs.nullable(),
2188
2357
  weekly_full_at_ms: epochMs.nullable(),
2189
2358
  /** The reading is too old to project. */
2190
- stale: z29.boolean()
2359
+ stale: z30.boolean()
2191
2360
  });
2192
- var SpendModel = z29.strictObject({ model: z29.string().max(120), name: z29.string().max(120), spend: SpendScopes });
2193
- var SpendChat = z29.strictObject({
2361
+ var SpendModel = z30.strictObject({ model: z30.string().max(120), name: z30.string().max(120), spend: SpendScopes });
2362
+ var SpendChat = z30.strictObject({
2194
2363
  id: ChatId,
2195
- title: z29.string().max(1e3),
2196
- repo: z29.string().max(200).nullable(),
2197
- window: z29.string().max(64).nullable(),
2364
+ title: z30.string().max(1e3),
2365
+ repo: z30.string().max(200).nullable(),
2366
+ window: z30.string().max(64).nullable(),
2198
2367
  spend: SpendScopes,
2199
2368
  helpers: nonNegInt
2200
2369
  });
2201
- var SpendHelper = z29.strictObject({ model: z29.string().max(120), steps: nonNegInt, over_steps: z29.boolean(), description: z29.string().max(400) });
2202
- var SpendLive = z29.strictObject({ id: ChatId, title: z29.string().max(1e3), window: z29.string().max(64).nullable(), helpers: z29.array(SpendHelper).max(200) });
2203
- var SpendIdleScope = z29.strictObject({ count: nonNegInt, tokens: nonNegInt, cost: z29.number(), avoidable: z29.number() });
2204
- var SpendIdle = z29.strictObject({ id: ChatId, chat: z29.string().max(1e3), who: z29.string().max(400), today: SpendIdleScope, week: SpendIdleScope, last_ms: epochMs });
2205
- var SpendStart = z29.strictObject({ repo: z29.string().max(200), count: nonNegInt, median: nonNegInt, latest: z29.array(nonNegInt).max(20), alarm: z29.string().max(400).nullable() });
2206
- var AppsSpendParams = z29.strictObject({ app_key: AppKey });
2207
- var AppsSpendResult = z29.strictObject({
2370
+ var SpendHelper = z30.strictObject({ model: z30.string().max(120), steps: nonNegInt, over_steps: z30.boolean(), description: z30.string().max(400) });
2371
+ var SpendLive = z30.strictObject({ id: ChatId, title: z30.string().max(1e3), window: z30.string().max(64).nullable(), helpers: z30.array(SpendHelper).max(200) });
2372
+ var SpendIdleScope = z30.strictObject({ count: nonNegInt, tokens: nonNegInt, cost: z30.number(), avoidable: z30.number() });
2373
+ var SpendIdle = z30.strictObject({ id: ChatId, chat: z30.string().max(1e3), who: z30.string().max(400), today: SpendIdleScope, week: SpendIdleScope, last_ms: epochMs });
2374
+ var SpendStart = z30.strictObject({ repo: z30.string().max(200), count: nonNegInt, median: nonNegInt, latest: z30.array(nonNegInt).max(20), alarm: z30.string().max(400).nullable() });
2375
+ var SpendDay = z30.strictObject({ date: z30.string().regex(/^\d{4}-\d{2}-\d{2}$/), main: z30.number(), helpers: z30.number() });
2376
+ var AppsSpendParams = z30.strictObject({ app_key: AppKey });
2377
+ var AppsSpendResult = z30.strictObject({
2208
2378
  app_key: AppKey,
2209
2379
  /** False while older chats are still being read. */
2210
- complete: z29.boolean(),
2211
- today_total: z29.number(),
2212
- week_total: z29.number(),
2213
- idle_today: z29.number(),
2214
- idle_week: z29.number(),
2380
+ complete: z30.boolean(),
2381
+ today_total: z30.number(),
2382
+ week_total: z30.number(),
2383
+ idle_today: z30.number(),
2384
+ idle_week: z30.number(),
2215
2385
  /** Models with no known list price. */
2216
- unpriced: z29.array(z29.string().max(120)).max(100),
2386
+ unpriced: z30.array(z30.string().max(120)).max(100),
2217
2387
  /** Helpers past their step budget, unusual starting sizes. */
2218
- alarms: z29.array(z29.string().max(400)).max(200),
2219
- live: z29.array(SpendLive).max(200),
2220
- accounts: z29.array(SpendAccount).max(200),
2221
- models: z29.array(SpendModel).max(100),
2222
- chats: z29.array(SpendChat).max(500),
2223
- idle: z29.array(SpendIdle).max(500),
2224
- starts: z29.array(SpendStart).max(200)
2225
- });
2226
- var AppsSyncStatusParams = z29.strictObject({ app_key: AppKey });
2227
- var AppsSyncStatusResult = z29.strictObject({
2228
- healthy: z29.boolean(),
2229
- summary: z29.string().max(400),
2230
- problems: z29.array(z29.string().max(400)).max(200),
2231
- warnings: z29.array(z29.string().max(400)).max(200),
2388
+ alarms: z30.array(z30.string().max(400)).max(200),
2389
+ live: z30.array(SpendLive).max(200),
2390
+ accounts: z30.array(SpendAccount).max(200),
2391
+ models: z30.array(SpendModel).max(100),
2392
+ /** (1.24) The last 7 days, oldest first (today last). */
2393
+ days: z30.array(SpendDay).max(14).optional(),
2394
+ chats: z30.array(SpendChat).max(500),
2395
+ idle: z30.array(SpendIdle).max(500),
2396
+ starts: z30.array(SpendStart).max(200)
2397
+ });
2398
+ var AppsSyncStatusParams = z30.strictObject({ app_key: AppKey });
2399
+ var AppsSyncStatusResult = z30.strictObject({
2400
+ healthy: z30.boolean(),
2401
+ summary: z30.string().max(400),
2402
+ problems: z30.array(z30.string().max(400)).max(200),
2403
+ warnings: z30.array(z30.string().max(400)).max(200),
2232
2404
  /** Accounts seen with no saved name yet (Save account names fixes them). */
2233
- unnamed_accounts: z29.array(z29.string().max(80)).max(200),
2405
+ unnamed_accounts: z30.array(z30.string().max(80)).max(200),
2234
2406
  /** The full report. */
2235
- output: z29.string().max(2e5)
2407
+ output: z30.string().max(2e5)
2236
2408
  });
2237
- var AppsSyncRunParams = z29.strictObject({ app_key: AppKey });
2238
- var AppsWindowsProcessesParams = z29.strictObject({ app_key: AppKey });
2239
- var AppsWindowsProcessesResult = z29.strictObject({ processes: z29.array(z29.string().max(2e3)).max(2e3) });
2240
- var AppsWindowsAddParams = z29.strictObject({ app_key: AppKey, window: ChatPlace, email: z29.string().min(3).max(320) });
2241
- var AppsWindowsSaveNamesParams = z29.strictObject({ app_key: AppKey });
2409
+ var AppsSyncRunParams = z30.strictObject({ app_key: AppKey });
2410
+ var AppsWindowsProcessesParams = z30.strictObject({ app_key: AppKey });
2411
+ var AppsWindowsProcessesResult = z30.strictObject({ processes: z30.array(z30.string().max(2e3)).max(2e3) });
2412
+ var AppsWindowsAddParams = z30.strictObject({ app_key: AppKey, window: ChatPlace, email: z30.string().min(3).max(320) });
2413
+ var AppsWindowsSaveNamesParams = z30.strictObject({ app_key: AppKey });
2242
2414
 
2243
2415
  // src/schema/registry.ts
2244
2416
  var FS_ERR = ["NOT_FOUND", "PERMISSION_DENIED_OS", "INVALID_PARAMS", "RESOURCE_BUSY", "INTERNAL"];
2245
2417
  var OPS = {
2246
2418
  "sysinfo.get": { params: SysinfoGetParams, result: SysinfoGetResult, kind: "unary", since: "1.0", errors: ["INTERNAL"] },
2419
+ "sysinfo.hardware": { params: SysinfoHardwareParams, result: SysinfoHardwareResult, kind: "unary", since: "1.24", errors: ["INTERNAL"] },
2247
2420
  "fs.list": { params: FsListParams, result: FsListResult, kind: "unary", since: "1.0", errors: FS_ERR },
2248
2421
  "fs.stat": { params: FsStatParams, result: FsStatResult, kind: "unary", since: "1.0", errors: FS_ERR },
2249
2422
  "fs.read": { params: FsReadParams, result: FsReadResult, kind: "unary", since: "1.0", errors: [...FS_ERR, "PAYLOAD_TOO_LARGE"] },
@@ -2320,6 +2493,7 @@ var OPS = {
2320
2493
  "exec.job.stop": { params: ExecJobStopParams, result: ExecJobStopResult, kind: "unary", since: "1.4", errors: ["RESOURCE_GONE", "INVALID_PARAMS", "INTERNAL"] },
2321
2494
  "exec.job.list": { params: ExecJobListParams, result: ExecJobListResult, kind: "unary", since: "1.4", errors: ["INTERNAL"] },
2322
2495
  "system.open_url": { params: SystemOpenUrlParams, result: SystemOpenUrlResult, kind: "unary", since: "1.4", errors: ["INVALID_PARAMS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
2496
+ "system.open_settings": { params: SystemOpenSettingsParams, result: SystemOpenSettingsResult, kind: "unary", since: "1.24", errors: ["PLATFORM_UNSUPPORTED", "INTERNAL"] },
2323
2497
  "system.open_path": { params: SystemOpenPathParams, result: SystemOpenPathResult, kind: "unary", since: "1.4", errors: ["NOT_FOUND", "INVALID_PARAMS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
2324
2498
  "system.notify": { params: SystemNotifyParams, result: SystemNotifyResult, kind: "unary", since: "1.4", errors: ["PERMISSION_DENIED_OS", "INTERNAL"] },
2325
2499
  "screen.list": { params: ScreenListParams, result: ScreenListResult, kind: "unary", since: "1.4", errors: ["PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
@@ -2329,16 +2503,21 @@ var OPS = {
2329
2503
  "window.move": { params: WindowMoveParams, result: WindowMoveResult, kind: "unary", since: "1.4", errors: ["NOT_FOUND", "INVALID_PARAMS", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
2330
2504
  "window.minimize": { params: WindowMinimizeParams, result: WindowMinimizeResult, kind: "unary", since: "1.4", errors: ["NOT_FOUND", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
2331
2505
  "input.type_text": { params: InputTypeTextParams, result: InputTypeTextResult, kind: "unary", since: "1.4", errors: ["PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
2506
+ "input.keyboard_settings": { params: InputKeyboardSettingsParams, result: InputKeyboardSettingsResult, kind: "unary", since: "1.24", errors: ["PLATFORM_UNSUPPORTED", "INTERNAL"] },
2507
+ "input.set_keyboard_settings": { params: InputSetKeyboardSettingsParams, result: InputKeyboardSettingsResult, kind: "unary", since: "1.24", errors: ["INVALID_PARAMS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
2332
2508
  "input.hotkey": { params: InputHotkeyParams, result: InputHotkeyResult, kind: "unary", since: "1.4", errors: ["INVALID_PARAMS", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
2333
2509
  "input.mouse_move": { params: InputMouseMoveParams, result: InputMouseMoveResult, kind: "unary", since: "1.4", errors: ["PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
2334
2510
  "input.mouse_click": { params: InputMouseClickParams, result: InputMouseClickResult, kind: "unary", since: "1.4", errors: ["INVALID_PARAMS", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
2335
2511
  "power.status": { params: PowerStatusParams, result: PowerStatusResult, kind: "unary", since: "1.4", errors: ["INTERNAL"] },
2512
+ "power.history": { params: PowerHistoryParams, result: PowerHistoryResult, kind: "unary", since: "1.24", errors: ["INTERNAL"] },
2336
2513
  "power.prevent_sleep": { params: PowerPreventSleepParams, result: PowerPreventSleepResult, kind: "unary", since: "1.4", errors: ["PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
2337
2514
  "resources.snapshot": { params: ResourcesSnapshotParams, result: ResourcesSnapshotResult, kind: "unary", since: "1.4", errors: ["INTERNAL"] },
2338
2515
  "resources.activity": { params: ResourcesActivityParams, result: ResourcesActivityResult, kind: "unary", since: "1.17", errors: ["PLATFORM_UNSUPPORTED", "INTERNAL"] },
2339
2516
  "resources.stop_job": { params: ResourcesStopJobParams, result: ResourcesStopJobResult, kind: "unary", since: "1.17", errors: ["NOT_FOUND", "CONFLICT", "AUTH_FORBIDDEN", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
2340
2517
  "resources.incidents": { params: ResourcesIncidentsParams, result: ResourcesIncidentsResult, kind: "unary", since: "1.17", errors: ["INTERNAL"] },
2341
2518
  "audio.devices": { params: AudioDevicesParams, result: AudioDevicesResult, kind: "unary", since: "1.6", errors: ["PLATFORM_UNSUPPORTED", "INTERNAL"] },
2519
+ "audio.levels": { params: AudioLevelsParams, result: AudioLevelsResult, kind: "unary", since: "1.24", errors: ["PLATFORM_UNSUPPORTED", "INTERNAL"] },
2520
+ "audio.set_levels": { params: AudioSetLevelsParams, result: AudioLevelsResult, kind: "unary", since: "1.24", errors: ["INVALID_PARAMS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
2342
2521
  "audio.record": { params: AudioRecordParams, result: AudioRecordResult, kind: "unary", since: "1.6", errors: ["NOT_FOUND", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "RESOURCE_BUSY", "INTERNAL"] },
2343
2522
  "audio.play": { params: AudioPlayParams, result: AudioPlayResult, kind: "unary", since: "1.6", errors: ["NOT_FOUND", "INVALID_PARAMS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
2344
2523
  // The local AI Matrx servers (aidream's process-compose stack), supervised from Matrx 2's core.
@@ -2370,7 +2549,11 @@ var OPS = {
2370
2549
  "web.fetch": { params: WebFetchParams, result: WebFetchResult, kind: "unary", since: "1.22", errors: ["INVALID_PARAMS", "TIMEOUT", "RESOURCE_BUSY", "AUTH_REQUIRED", "INTERNAL"] },
2371
2550
  "web.scrape": { params: WebScrapeParams, result: WebScrapeResult, kind: "unary", since: "1.22", errors: ["INVALID_PARAMS", "TIMEOUT", "RESOURCE_BUSY", "AUTH_REQUIRED", "INTERNAL"] },
2372
2551
  "web.search": { params: WebSearchParams, result: WebSearchResult, kind: "unary", since: "1.22", errors: ["INVALID_PARAMS", "TIMEOUT", "RESOURCE_BUSY", "AUTH_REQUIRED", "INTERNAL"] },
2373
- "web.fetch_with_browser": { params: WebBrowserFetchParams, result: WebBrowserFetchResult, kind: "unary", since: "1.22", errors: ["INVALID_PARAMS", "TIMEOUT", "RESOURCE_BUSY", "AUTH_REQUIRED", "INTERNAL"] }
2552
+ "web.fetch_with_browser": { params: WebBrowserFetchParams, result: WebBrowserFetchResult, kind: "unary", since: "1.22", errors: ["INVALID_PARAMS", "TIMEOUT", "RESOURCE_BUSY", "AUTH_REQUIRED", "INTERNAL"] },
2553
+ // 1.23: the signed-in person's own agents and Vault, read as them (the desktop's Agents library and Vault).
2554
+ "account.agents.list": { params: AccountAgentsListParams, result: AccountAgentsListResult, kind: "unary", since: "1.23", errors: ["INTERNAL"] },
2555
+ "account.vault.list": { params: AccountVaultListParams, result: AccountVaultListResult, kind: "unary", since: "1.23", errors: ["INTERNAL"] },
2556
+ "account.vault.copy": { params: AccountVaultCopyParams, result: AccountVaultCopyResult, kind: "unary", since: "1.23", errors: ["AUTH_REQUIRED", "AUTH_FORBIDDEN", "NOT_FOUND", "INVALID_PARAMS", "DEVICE_OFFLINE", "INTERNAL"] }
2374
2557
  };
2375
2558
  var EVENTS = {
2376
2559
  "fs.changed": FsChangedEvent,