@ai-matrx/desktop-protocol 0.21.14 → 0.21.16

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